Compare commits
3 Commits
41da641ab9
...
yage/dev/v
Author | SHA1 | Date | |
---|---|---|---|
6abb0fc7b8 | |||
695a01fb3d | |||
d1a17e4285 |
@ -102,6 +102,7 @@ jobs:
|
|||||||
&& echo "source=(scwrypts.tar.gz)" >> PKGBUILD
|
&& echo "source=(scwrypts.tar.gz)" >> PKGBUILD
|
||||||
&& echo "sha256sums=(SKIP)" >> PKGBUILD
|
&& echo "sha256sums=(SKIP)" >> PKGBUILD
|
||||||
&& makepkg --noconfirm -si
|
&& makepkg --noconfirm -si
|
||||||
|
&& echo validating scwrypts version
|
||||||
&& scwrypts --version | grep "^scwrypts v$PKGVER$"
|
&& scwrypts --version | grep "^scwrypts v$PKGVER$"
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -2,23 +2,22 @@ from types import SimpleNamespace
|
|||||||
|
|
||||||
from pytest import fixture
|
from pytest import fixture
|
||||||
|
|
||||||
from scwrypts.test import generate
|
from scwrypts.test import get_generator
|
||||||
from scwrypts.test.character_set import uri
|
from scwrypts.test.character_set import uri
|
||||||
|
|
||||||
options = {
|
generate = get_generator({
|
||||||
'str_length_minimum': 8,
|
'str_length_minimum': 8,
|
||||||
'str_length_maximum': 128,
|
'str_length_maximum': 128,
|
||||||
'uuid_output_type': str,
|
'uuid_output_type': str,
|
||||||
}
|
})
|
||||||
|
|
||||||
def get_request_client_sample_data():
|
def get_request_client_sample_data():
|
||||||
return {
|
return {
|
||||||
'base_url' : generate(str, options | {'character_set': uri}),
|
'base_url' : generate(str, {'character_set': uri}),
|
||||||
'endpoint' : generate(str, options | {'character_set': uri}),
|
'endpoint' : generate(str, {'character_set': uri}),
|
||||||
'method' : generate(str, options),
|
'method' : generate(str),
|
||||||
'response' : generate('requests_Response', options | {'depth': 4}),
|
'response' : generate('requests_Response', {'depth': 4}),
|
||||||
'payload' : generate(dict, {
|
'payload' : generate(dict, {
|
||||||
**options,
|
|
||||||
'depth': 1,
|
'depth': 1,
|
||||||
'data_types': { str, 'uuid' },
|
'data_types': { str, 'uuid' },
|
||||||
}),
|
}),
|
||||||
@ -30,13 +29,11 @@ def fixture_sample():
|
|||||||
**get_request_client_sample_data(),
|
**get_request_client_sample_data(),
|
||||||
|
|
||||||
headers = generate(dict, {
|
headers = generate(dict, {
|
||||||
**options,
|
|
||||||
'depth': 1,
|
'depth': 1,
|
||||||
'data_types': { str, 'uuid' },
|
'data_types': { str, 'uuid' },
|
||||||
}),
|
}),
|
||||||
|
|
||||||
payload_headers = generate(dict, {
|
payload_headers = generate(dict, {
|
||||||
**options,
|
|
||||||
'depth': 1,
|
'depth': 1,
|
||||||
'data_types': { str, 'uuid' },
|
'data_types': { str, 'uuid' },
|
||||||
}),
|
}),
|
||||||
|
@ -2,15 +2,14 @@ from types import SimpleNamespace
|
|||||||
|
|
||||||
from pytest import fixture
|
from pytest import fixture
|
||||||
|
|
||||||
from scwrypts.test import generate
|
|
||||||
from scwrypts.test.character_set import uri
|
from scwrypts.test.character_set import uri
|
||||||
from ..conftest import options, get_request_client_sample_data
|
from ..conftest import generate, get_request_client_sample_data
|
||||||
|
|
||||||
|
|
||||||
@fixture(name='sample')
|
@fixture(name='sample')
|
||||||
def fixture_sample():
|
def fixture_sample():
|
||||||
return SimpleNamespace(
|
return SimpleNamespace(
|
||||||
**get_request_client_sample_data(),
|
**get_request_client_sample_data(),
|
||||||
api_token = generate(str, options | {'character_set': uri}),
|
api_token = generate(str, {'character_set': uri}),
|
||||||
query = generate(str, options),
|
query = generate(str),
|
||||||
)
|
)
|
||||||
|
@ -3,9 +3,8 @@ from types import SimpleNamespace
|
|||||||
|
|
||||||
from pytest import fixture
|
from pytest import fixture
|
||||||
|
|
||||||
from scwrypts.test import generate
|
|
||||||
from scwrypts.test.character_set import uri
|
from scwrypts.test.character_set import uri
|
||||||
from ..conftest import options, get_request_client_sample_data
|
from ..conftest import generate, get_request_client_sample_data
|
||||||
|
|
||||||
@fixture(name='sample')
|
@fixture(name='sample')
|
||||||
def fixture_sample():
|
def fixture_sample():
|
||||||
@ -14,12 +13,12 @@ def fixture_sample():
|
|||||||
**get_request_client_sample_data(),
|
**get_request_client_sample_data(),
|
||||||
'base_url': 'https://discord.com/api',
|
'base_url': 'https://discord.com/api',
|
||||||
},
|
},
|
||||||
bot_token = generate(str, options | {'character_set': uri}),
|
bot_token = generate(str, {'character_set': uri}),
|
||||||
username = generate(str, options | {'character_set': ascii_letters + digits}),
|
username = generate(str, {'character_set': ascii_letters + digits}),
|
||||||
avatar_url = generate(str, options | {'character_set': uri}),
|
avatar_url = generate(str, {'character_set': uri}),
|
||||||
webhook = generate(str, options | {'character_set': uri}),
|
webhook = generate(str, {'character_set': uri}),
|
||||||
channel_id = generate(str, options | {'character_set': uri}),
|
channel_id = generate(str, {'character_set': uri}),
|
||||||
content_header = generate(str, options),
|
content_header = generate(str),
|
||||||
content_footer = generate(str, options),
|
content_footer = generate(str),
|
||||||
content = generate(str, options),
|
content = generate(str),
|
||||||
)
|
)
|
||||||
|
@ -3,9 +3,8 @@ from types import SimpleNamespace
|
|||||||
|
|
||||||
from pytest import fixture
|
from pytest import fixture
|
||||||
|
|
||||||
from scwrypts.test import generate
|
|
||||||
from scwrypts.test.character_set import uri
|
from scwrypts.test.character_set import uri
|
||||||
from ..conftest import options, get_request_client_sample_data
|
from ..conftest import generate, get_request_client_sample_data
|
||||||
|
|
||||||
@fixture(name='sample')
|
@fixture(name='sample')
|
||||||
def fixture_sample():
|
def fixture_sample():
|
||||||
@ -14,6 +13,6 @@ def fixture_sample():
|
|||||||
**get_request_client_sample_data(),
|
**get_request_client_sample_data(),
|
||||||
'base_url': 'https://api.linear.app',
|
'base_url': 'https://api.linear.app',
|
||||||
},
|
},
|
||||||
api_token = generate(str, options | {'character_set': uri}),
|
api_token = generate(str, {'character_set': uri}),
|
||||||
query = generate(str, options),
|
query = generate(str),
|
||||||
)
|
)
|
||||||
|
32
scwrypts
32
scwrypts
@ -6,11 +6,6 @@ source "$(dirname $(readlink -f "$0"))/zsh/lib/import.driver.zsh" || exit 42
|
|||||||
cd "$SCWRYPTS_ROOT__scwrypts"
|
cd "$SCWRYPTS_ROOT__scwrypts"
|
||||||
GIT_SCWRYPTS() { git -C "$SCWRYPTS_ROOT__scwrypts" $@; }
|
GIT_SCWRYPTS() { git -C "$SCWRYPTS_ROOT__scwrypts" $@; }
|
||||||
|
|
||||||
local INSTALLATION_TYPE
|
|
||||||
[ ! -d "$SCWRYPTS_ROOT__scwrypts/.git" ] && [ ! -f "$SCWRYPTS_ROOT__scwrypts/.git" ] \
|
|
||||||
&& INSTALLATION_TYPE=$(cat "$SCWRYPTS_ROOT__scwrypts/MANAGED_BY" 2>/dev/null) \
|
|
||||||
|| INSTALLATION_TYPE=manual \
|
|
||||||
;
|
|
||||||
|
|
||||||
local ERRORS=0
|
local ERRORS=0
|
||||||
local USAGE='
|
local USAGE='
|
||||||
@ -38,6 +33,7 @@ source "$(dirname $(readlink -f "$0"))/zsh/lib/import.driver.zsh" || exit 42
|
|||||||
-h, --help display this message and exit
|
-h, --help display this message and exit
|
||||||
-l, --list print out command list and exit
|
-l, --list print out command list and exit
|
||||||
--list-envs print out environment list and exit
|
--list-envs print out environment list and exit
|
||||||
|
--root print out SCWRYPTS_ROOT__scwrypts and exit
|
||||||
--update update scwrypts library to latest version
|
--update update scwrypts library to latest version
|
||||||
--version print out scwrypts version and exit
|
--version print out scwrypts version and exit
|
||||||
|
|
||||||
@ -86,15 +82,20 @@ source "$(dirname $(readlink -f "$0"))/zsh/lib/import.driver.zsh" || exit 42
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
--version )
|
--version )
|
||||||
case $INSTALLATION_TYPE in
|
case $SCWRYPTS_INSTALLATION_TYPE in
|
||||||
manual ) echo "scwrypts $(GIT_SCWRYPTS describe --tags) (via GIT)" ;;
|
manual ) echo "scwrypts $(GIT_SCWRYPTS describe --tags) (via GIT)" ;;
|
||||||
* ) echo scwrypts $(cat "$SCWRYPTS_ROOT__scwrypts/VERSION") ;;
|
* ) echo scwrypts $(cat "$SCWRYPTS_ROOT__scwrypts/VERSION") ;;
|
||||||
esac
|
esac
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
--root )
|
||||||
|
echo "$SCWRYPTS_ROOT__scwrypts"
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
|
||||||
--update )
|
--update )
|
||||||
case $INSTALLATION_TYPE in
|
case $SCWRYPTS_INSTALLATION_TYPE in
|
||||||
aur )
|
aur )
|
||||||
SCWRYPTS_LOG_LEVEL=3 REMINDER "
|
SCWRYPTS_LOG_LEVEL=3 REMINDER "
|
||||||
This installation is built from the AUR. Update through 'makepkg' or use
|
This installation is built from the AUR. Update through 'makepkg' or use
|
||||||
@ -102,6 +103,10 @@ source "$(dirname $(readlink -f "$0"))/zsh/lib/import.driver.zsh" || exit 42
|
|||||||
"
|
"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
homebrew )
|
||||||
|
SCWRYPTS_LOG_LEVEL=3 REMINDER "This installation is managed by homebrew. Update me with 'brew update scwrypts'"
|
||||||
|
;;
|
||||||
|
|
||||||
manual )
|
manual )
|
||||||
GIT_SCWRYPTS fetch --quiet origin main
|
GIT_SCWRYPTS fetch --quiet origin main
|
||||||
GIT_SCWRYPTS fetch --quiet origin main --tags
|
GIT_SCWRYPTS fetch --quiet origin main --tags
|
||||||
@ -294,9 +299,17 @@ source "$(dirname $(readlink -f "$0"))/zsh/lib/import.driver.zsh" || exit 42
|
|||||||
|
|
||||||
[[ $ENV_REQUIRED =~ true ]] && {
|
[[ $ENV_REQUIRED =~ true ]] && {
|
||||||
[ ! $ENV_NAME ] && ENV_NAME=$(SCWRYPTS__SELECT_ENV)
|
[ ! $ENV_NAME ] && ENV_NAME=$(SCWRYPTS__SELECT_ENV)
|
||||||
|
[ ! $ENV_NAME ] && ABORT
|
||||||
|
|
||||||
|
export ENV_NAME
|
||||||
|
export SCWRYPTS_ENV=$ENV_NAME
|
||||||
|
|
||||||
for GROUP in ${SCWRYPTS_GROUPS[@]}
|
for GROUP in ${SCWRYPTS_GROUPS[@]}
|
||||||
do
|
do
|
||||||
|
local REQUIRED_REGEX=$(eval echo '$SCWRYPTS_REQUIRED_ENVIRONMENT_REGEX__'$GROUP)
|
||||||
|
[ $REQUIRED_REGEX ] && {
|
||||||
|
[[ $ENV_NAME =~ $REQUIRED_REGEX ]] || continue
|
||||||
|
}
|
||||||
local ENV_FILE=$(SCWRYPTS__GET_ENV_FILE "$ENV_NAME" "$GROUP")
|
local ENV_FILE=$(SCWRYPTS__GET_ENV_FILE "$ENV_NAME" "$GROUP")
|
||||||
source "$ENV_FILE" || FAIL 5 "missing or invalid environment '$GROUP/$ENV_NAME'"
|
source "$ENV_FILE" || FAIL 5 "missing or invalid environment '$GROUP/$ENV_NAME'"
|
||||||
|
|
||||||
@ -305,8 +318,6 @@ source "$(dirname $(readlink -f "$0"))/zsh/lib/import.driver.zsh" || exit 42
|
|||||||
source "$f" || FAIL 5 "invalid static config '$f'"
|
source "$f" || FAIL 5 "invalid static config '$f'"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
export ENV_NAME
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[ $REQUIRED_ENVIRONMENT_REGEX ] && {
|
[ $REQUIRED_ENVIRONMENT_REGEX ] && {
|
||||||
@ -314,11 +325,12 @@ source "$(dirname $(readlink -f "$0"))/zsh/lib/import.driver.zsh" || exit 42
|
|||||||
|| FAIL 5 "group '$SCWRYPT_GROUP' requires current environment name to match '$REQUIRED_ENVIRONMENT_REGEX' (currently $ENV_NAME)"
|
|| FAIL 5 "group '$SCWRYPT_GROUP' requires current environment name to match '$REQUIRED_ENVIRONMENT_REGEX' (currently $ENV_NAME)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
##########################################
|
##########################################
|
||||||
|
|
||||||
[ ! $SUBSCWRYPT ] && export SUBSCWRYPT=0
|
[ ! $SUBSCWRYPT ] && export SUBSCWRYPT=0
|
||||||
|
|
||||||
[[ $INSTALLATION_TYPE =~ ^manual$ ]] && {
|
[[ $SCWRYPTS_INSTALLATION_TYPE =~ ^manual$ ]] && {
|
||||||
[[ $SUBSCWRYPT -eq 0 ]] && [[ $ENV_NAME =~ prod ]] && [[ $SCWRYPTS_LOG_LEVEL -gt 0 ]] && {
|
[[ $SUBSCWRYPT -eq 0 ]] && [[ $ENV_NAME =~ prod ]] && [[ $SCWRYPTS_LOG_LEVEL -gt 0 ]] && {
|
||||||
STATUS "on '$ENV_NAME'; checking diff against origin/main"
|
STATUS "on '$ENV_NAME'; checking diff against origin/main"
|
||||||
|
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
#####################################################################
|
#####################################################################
|
||||||
|
|
||||||
command -v scwrypts &>/dev/null || {
|
: \
|
||||||
echo 'scwrypts is required in your PATH in order to use the zsh plugins; skipping' >&2
|
&& command -v scwrypts &>/dev/null \
|
||||||
|
&& source "$(scwrypts --root)/zsh/lib/import.driver.zsh" \
|
||||||
|
&& unset __SCWRYPT \
|
||||||
|
|| {
|
||||||
|
echo 'scwrypts must be in PATH and properly configured; skipping zsh plugin setup' >&2
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
NO_EXPORT_CONFIG=1 source "${0:a:h}/zsh/lib/import.driver.zsh" || return 42
|
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
|
||||||
|
@ -1,11 +1,20 @@
|
|||||||
[[ $__SCWRYPT -eq 1 ]] && return 0
|
[[ $__SCWRYPT -eq 1 ]] && return 0
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
|
||||||
[ ! $SCWRYPTS_ROOT ] \
|
SCWRYPTS_ROOT="$(cd -- ${0:a:h}; git rev-parse --show-toplevel 2>/dev/null)"
|
||||||
&& SCWRYPTS_ROOT="$(cd $(dirname "${0:a:h}"); git rev-parse --show-toplevel 2>/dev/null)"
|
|
||||||
|
|
||||||
[ ! $SCWRYPTS_ROOT ] && [ -d /usr/share/scwrypts ] \
|
[ $SCWRYPTS_ROOT ] && [ -d "$SCWRYPTS_ROOT" ] \
|
||||||
&& SCWRYPTS_ROOT=/usr/share/scwrypts
|
|| SCWRYPTS_ROOT="$(echo "${0:a:h}" | sed -n 's|\(share/scwrypts\).*$|\1|p')"
|
||||||
|
|
||||||
|
[ $SCWRYPTS_ROOT ] && [ -d "$SCWRYPTS_ROOT" ] || {
|
||||||
|
echo "cannot determine scwrypts root path for current installation; aborting"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
[ -f "$SCWRYPTS_ROOT__scwrypts/MANAGED_BY" ] \
|
||||||
|
&& export SCWRYPTS_INSTALLATION_TYPE=$(cat "$SCWRYPTS_ROOT__scwrypts/MANAGED_BY") \
|
||||||
|
|| export SCWRYPTS_INSTALLATION_TYPE=manual \
|
||||||
|
;
|
||||||
|
|
||||||
export SCWRYPTS_ROOT__scwrypts="$SCWRYPTS_ROOT"
|
export SCWRYPTS_ROOT__scwrypts="$SCWRYPTS_ROOT"
|
||||||
|
|
||||||
@ -21,11 +30,13 @@ USER_CONFIG_OVERRIDES="$SCWRYPTS_CONFIG_PATH/config.zsh"
|
|||||||
}
|
}
|
||||||
source "$USER_CONFIG_OVERRIDES"
|
source "$USER_CONFIG_OVERRIDES"
|
||||||
|
|
||||||
[ ! -d $SCWRYPTS_CONFIG_PATH ] && mkdir -p $SCWRYPTS_CONFIG_PATH
|
mkdir -p \
|
||||||
[ ! -d $SCWRYPTS_DATA_PATH ] && mkdir -p $SCWRYPTS_DATA_PATH
|
"$SCWRYPTS_CONFIG_PATH" \
|
||||||
[ ! -d $SCWRYPTS_ENV_PATH ] && mkdir -p $SCWRYPTS_ENV_PATH
|
"$SCWRYPTS_DATA_PATH" \
|
||||||
[ ! -d $SCWRYPTS_LOG_PATH ] && mkdir -p $SCWRYPTS_LOG_PATH
|
"$SCWRYPTS_ENV_PATH" \
|
||||||
[ ! -d $SCWRYPTS_OUTPUT_PATH ] && mkdir -p $SCWRYPTS_OUTPUT_PATH
|
"$SCWRYPTS_LOG_PATH" \
|
||||||
|
"$SCWRYPTS_OUTPUT_PATH" \
|
||||||
|
;
|
||||||
|
|
||||||
export \
|
export \
|
||||||
SCWRYPTS_GROUPS \
|
SCWRYPTS_GROUPS \
|
||||||
@ -62,7 +73,8 @@ done
|
|||||||
&& [ ! "$SCWRYPTS_AUTODETECT_GROUP_BASEDIR" ] \
|
&& [ ! "$SCWRYPTS_AUTODETECT_GROUP_BASEDIR" ] \
|
||||||
&& [ $GITHUB_WORKSPACE ] \
|
&& [ $GITHUB_WORKSPACE ] \
|
||||||
&& [ ! $SCWRYPTS_GITHUB_NO_AUTOLOAD ] \
|
&& [ ! $SCWRYPTS_GITHUB_NO_AUTOLOAD ] \
|
||||||
&& SCWRYPTS_AUTODETECT_GROUP_BASEDIR="$GITHUB_WORKSPACE"
|
&& SCWRYPTS_AUTODETECT_GROUP_BASEDIR="$GITHUB_WORKSPACE" \
|
||||||
|
;
|
||||||
|
|
||||||
[ "$SCWRYPTS_AUTODETECT_GROUP_BASEDIR" ] && [ -d "$SCWRYPTS_AUTODETECT_GROUP_BASEDIR" ] && {
|
[ "$SCWRYPTS_AUTODETECT_GROUP_BASEDIR" ] && [ -d "$SCWRYPTS_AUTODETECT_GROUP_BASEDIR" ] && {
|
||||||
for GROUP_LOADER in $(find "$SCWRYPTS_AUTODETECT_GROUP_BASEDIR" -type f -name \*scwrypts.zsh)
|
for GROUP_LOADER in $(find "$SCWRYPTS_AUTODETECT_GROUP_BASEDIR" -type f -name \*scwrypts.zsh)
|
||||||
@ -72,5 +84,4 @@ done
|
|||||||
}
|
}
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
[ $NO_EXPORT_CONFIG ] || __SCWRYPT=1 # arbitrary; indicates currently inside a scwrypt
|
__SCWRYPT=1 # arbitrary; indicates currently inside a scwrypt
|
||||||
true
|
|
||||||
|
100
zx/lib/package.json
Normal file
100
zx/lib/package.json
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
{
|
||||||
|
"name": "scwrypts",
|
||||||
|
"main": "dist/index.js",
|
||||||
|
"type": "module",
|
||||||
|
"files": [
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
|
"description": "scwrypts integration for typescript",
|
||||||
|
"scripts": {
|
||||||
|
"build": "rm -rf ./dist && tsc",
|
||||||
|
"test": "jest",
|
||||||
|
"lint": "eslint . && prettier --check src/",
|
||||||
|
"format": "prettier --write src/"
|
||||||
|
},
|
||||||
|
"author": "Wryn (yage) Wagner",
|
||||||
|
"license": "GPL-3.0",
|
||||||
|
"devDependencies": {
|
||||||
|
"@jest/globals": "^29.7.0",
|
||||||
|
"@types/jest": "^29.5.12",
|
||||||
|
"@types/node": "^20.11.19",
|
||||||
|
"@types/uuid": "^9.0.8",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^7.0.2",
|
||||||
|
"@typescript-eslint/parser": "^7.0.2",
|
||||||
|
"eslint": "^8.56.0",
|
||||||
|
"jest": "^29.7.0",
|
||||||
|
"prettier": "^3.2.5",
|
||||||
|
"ts-jest": "^29.1.2",
|
||||||
|
"ts-node": "^10.9.2",
|
||||||
|
"typescript": "^5.3.3",
|
||||||
|
"uuid": "^9.0.1"
|
||||||
|
},
|
||||||
|
"eslintConfig": {
|
||||||
|
"ignorePatterns": [
|
||||||
|
"dist",
|
||||||
|
"node_modules"
|
||||||
|
],
|
||||||
|
"env": {
|
||||||
|
"node": true,
|
||||||
|
"es2021": true
|
||||||
|
},
|
||||||
|
"extends": [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended"
|
||||||
|
],
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"env": {
|
||||||
|
"node": true
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
".eslintrc.{js,cjs}"
|
||||||
|
],
|
||||||
|
"parserOptions": {
|
||||||
|
"sourceType": "script"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parser": "@typescript-eslint/parser",
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaVersion": "latest",
|
||||||
|
"sourceType": "module"
|
||||||
|
},
|
||||||
|
"plugins": [
|
||||||
|
"@typescript-eslint"
|
||||||
|
],
|
||||||
|
"rules": {
|
||||||
|
"linebreak-style": [
|
||||||
|
"error",
|
||||||
|
"unix"
|
||||||
|
],
|
||||||
|
"quotes": [
|
||||||
|
"error",
|
||||||
|
"single"
|
||||||
|
],
|
||||||
|
"semi": [
|
||||||
|
"error",
|
||||||
|
"always"
|
||||||
|
],
|
||||||
|
"comma-dangle": [
|
||||||
|
"error",
|
||||||
|
"always-multiline"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"prettier": {
|
||||||
|
"printWidth": 120,
|
||||||
|
"singleQuote": true,
|
||||||
|
"trailingComma": "all"
|
||||||
|
},
|
||||||
|
"jest": {
|
||||||
|
"preset": "ts-jest",
|
||||||
|
"clearMocks": true,
|
||||||
|
"moduleNameMapper": {
|
||||||
|
"^(\\.{1,2}/.*)\\.js$": "$1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"execa": "^8.0.1"
|
||||||
|
}
|
||||||
|
}
|
@ -1,86 +0,0 @@
|
|||||||
---
|
|
||||||
name: scwrypts
|
|
||||||
author: Wryn (yage) Wagner
|
|
||||||
description: scwrypts integration for typescript
|
|
||||||
license: GPL-3.0
|
|
||||||
type: module
|
|
||||||
main: dist/index.js
|
|
||||||
|
|
||||||
files:
|
|
||||||
- dist
|
|
||||||
|
|
||||||
scripts:
|
|
||||||
build: rm -rf ./dist && tsc
|
|
||||||
test: jest
|
|
||||||
lint: eslint . && prettier --check src/
|
|
||||||
format: prettier --write src/
|
|
||||||
|
|
||||||
#####################################################################
|
|
||||||
|
|
||||||
dependencies:
|
|
||||||
execa: ^8.0.1
|
|
||||||
|
|
||||||
devDependencies:
|
|
||||||
'@jest/globals': ^29.7.0
|
|
||||||
'@types/jest': ^29.5.12
|
|
||||||
'@types/node': ^20.11.19
|
|
||||||
'@types/uuid': ^9.0.8
|
|
||||||
'@typescript-eslint/eslint-plugin': ^7.0.2
|
|
||||||
'@typescript-eslint/parser': ^7.0.2
|
|
||||||
eslint: ^8.56.0
|
|
||||||
jest: ^29.7.0
|
|
||||||
prettier: ^3.2.5
|
|
||||||
ts-jest: ^29.1.2
|
|
||||||
ts-node: ^10.9.2
|
|
||||||
typescript: ^5.3.3
|
|
||||||
uuid: ^9.0.1
|
|
||||||
|
|
||||||
#####################################################################
|
|
||||||
|
|
||||||
eslintConfig:
|
|
||||||
ignorePatterns:
|
|
||||||
- dist
|
|
||||||
- node_modules
|
|
||||||
env:
|
|
||||||
node: true
|
|
||||||
es2021: true
|
|
||||||
extends:
|
|
||||||
- eslint:recommended
|
|
||||||
- plugin:@typescript-eslint/recommended
|
|
||||||
overrides:
|
|
||||||
- env:
|
|
||||||
node: true
|
|
||||||
files:
|
|
||||||
- .eslintrc.{js,cjs}
|
|
||||||
parserOptions:
|
|
||||||
sourceType: script
|
|
||||||
parser: '@typescript-eslint/parser'
|
|
||||||
parserOptions:
|
|
||||||
ecmaVersion: latest
|
|
||||||
sourceType: module
|
|
||||||
plugins:
|
|
||||||
- '@typescript-eslint'
|
|
||||||
rules:
|
|
||||||
linebreak-style:
|
|
||||||
- error
|
|
||||||
- unix
|
|
||||||
quotes:
|
|
||||||
- error
|
|
||||||
- single
|
|
||||||
semi:
|
|
||||||
- error
|
|
||||||
- always
|
|
||||||
comma-dangle:
|
|
||||||
- error
|
|
||||||
- always-multiline
|
|
||||||
|
|
||||||
prettier:
|
|
||||||
printWidth: 120
|
|
||||||
singleQuote: true
|
|
||||||
trailingComma: all
|
|
||||||
|
|
||||||
jest:
|
|
||||||
preset: ts-jest
|
|
||||||
clearMocks: true
|
|
||||||
moduleNameMapper:
|
|
||||||
^(\.{1,2}/.*)\.js$: $1
|
|
Reference in New Issue
Block a user