@esportsplus/typescript 0.8.9 → 0.8.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +9 -9
- package/.gitattributes +2 -2
- package/.github/dependabot.yml +22 -22
- package/.github/workflows/bump.yml +6 -6
- package/.github/workflows/publish.yml +13 -13
- package/bin/tsc +24 -24
- package/bin/tsc-alias +24 -23
- package/package.json +32 -32
- package/src/types.ts +33 -33
- package/tsconfig.base.json +40 -40
- package/tsconfig.browser.json +2 -2
- package/tsconfig.json +2 -2
- package/tsconfig.node.json +2 -2
- package/tsconfig.package.json +6 -6
package/.editorconfig
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
root = true
|
|
2
|
-
|
|
3
|
-
[*]
|
|
4
|
-
indent_style = space
|
|
5
|
-
indent_size = 4
|
|
6
|
-
charset = utf-8
|
|
7
|
-
trim_trailing_whitespace = true
|
|
8
|
-
insert_final_newline = true
|
|
9
|
-
end_of_line = lf
|
|
1
|
+
root = true
|
|
2
|
+
|
|
3
|
+
[*]
|
|
4
|
+
indent_style = space
|
|
5
|
+
indent_size = 4
|
|
6
|
+
charset = utf-8
|
|
7
|
+
trim_trailing_whitespace = true
|
|
8
|
+
insert_final_newline = true
|
|
9
|
+
end_of_line = lf
|
package/.gitattributes
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
# Auto detect text files and perform LF normalization
|
|
2
|
-
* text=auto
|
|
1
|
+
# Auto detect text files and perform LF normalization
|
|
2
|
+
* text=auto
|
package/.github/dependabot.yml
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
-
# package ecosystems to update and where the package manifests are located.
|
|
3
|
-
# Please see the documentation for all configuration options:
|
|
4
|
-
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
|
5
|
-
|
|
6
|
-
version: 2
|
|
7
|
-
registries:
|
|
8
|
-
npm-npmjs:
|
|
9
|
-
token: ${{secrets.NPM_TOKEN}}
|
|
10
|
-
type: npm-registry
|
|
11
|
-
url: https://registry.npmjs.org
|
|
12
|
-
updates:
|
|
13
|
-
- package-ecosystem: "npm"
|
|
14
|
-
directory: "/"
|
|
15
|
-
groups:
|
|
16
|
-
production-dependencies:
|
|
17
|
-
dependency-type: "production"
|
|
18
|
-
development-dependencies:
|
|
19
|
-
dependency-type: "development"
|
|
20
|
-
registries:
|
|
21
|
-
- npm-npmjs
|
|
22
|
-
schedule:
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
|
3
|
+
# Please see the documentation for all configuration options:
|
|
4
|
+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
|
5
|
+
|
|
6
|
+
version: 2
|
|
7
|
+
registries:
|
|
8
|
+
npm-npmjs:
|
|
9
|
+
token: ${{secrets.NPM_TOKEN}}
|
|
10
|
+
type: npm-registry
|
|
11
|
+
url: https://registry.npmjs.org
|
|
12
|
+
updates:
|
|
13
|
+
- package-ecosystem: "npm"
|
|
14
|
+
directory: "/"
|
|
15
|
+
groups:
|
|
16
|
+
production-dependencies:
|
|
17
|
+
dependency-type: "production"
|
|
18
|
+
development-dependencies:
|
|
19
|
+
dependency-type: "development"
|
|
20
|
+
registries:
|
|
21
|
+
- npm-npmjs
|
|
22
|
+
schedule:
|
|
23
23
|
interval: "daily"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
name: bump
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches: '**' # only trigger on branches, not on tags
|
|
5
|
-
jobs:
|
|
6
|
-
bump:
|
|
1
|
+
name: bump
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: '**' # only trigger on branches, not on tags
|
|
5
|
+
jobs:
|
|
6
|
+
bump:
|
|
7
7
|
uses: esportsplus/workflows/.github/workflows/bump.yml@main
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
name: publish to npm
|
|
2
|
-
on:
|
|
3
|
-
release:
|
|
4
|
-
types: [published]
|
|
5
|
-
workflow_dispatch:
|
|
6
|
-
workflow_run:
|
|
7
|
-
workflows: [bump]
|
|
8
|
-
types:
|
|
9
|
-
- completed
|
|
10
|
-
jobs:
|
|
11
|
-
publish:
|
|
12
|
-
secrets:
|
|
13
|
-
NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN_PUBLISHING }}
|
|
1
|
+
name: publish to npm
|
|
2
|
+
on:
|
|
3
|
+
release:
|
|
4
|
+
types: [published]
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
workflow_run:
|
|
7
|
+
workflows: [bump]
|
|
8
|
+
types:
|
|
9
|
+
- completed
|
|
10
|
+
jobs:
|
|
11
|
+
publish:
|
|
12
|
+
secrets:
|
|
13
|
+
NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN_PUBLISHING }}
|
|
14
14
|
uses: esportsplus/workflows/.github/workflows/publish.yml@main
|
package/bin/tsc
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const { spawn } = require('child_process');
|
|
4
|
-
const fs = require('fs');
|
|
5
|
-
const path = require('path');
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
function find(script) {
|
|
9
|
-
let dir =
|
|
10
|
-
|
|
11
|
-
while (dir !== path.parse(dir).root) {
|
|
12
|
-
let filepath = path.resolve(dir, `node_modules/.bin/${script}`);
|
|
13
|
-
|
|
14
|
-
if (fs.existsSync(filepath)) {
|
|
15
|
-
return filepath;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
dir = path.dirname(dir);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
throw new Error(`@esportsplus/cli-passthrough:
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { spawn } = require('child_process');
|
|
4
|
+
const fs = require('fs');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
function find(script) {
|
|
9
|
+
let dir = path.resolve(__dirname, '../');
|
|
10
|
+
|
|
11
|
+
while (dir !== path.parse(dir).root) {
|
|
12
|
+
let filepath = path.resolve(dir, `node_modules/.bin/${script}`);
|
|
13
|
+
|
|
14
|
+
if (fs.existsSync(filepath)) {
|
|
15
|
+
return filepath;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
dir = path.dirname(dir);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
throw new Error(`@esportsplus/cli-passthrough: could not find ${script}`);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
25
|
spawn(find('tsc'), process.argv.slice(2), { shell: true, stdio: 'inherit' });
|
package/bin/tsc-alias
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const { spawn } = require('child_process');
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { spawn } = require('child_process');
|
|
4
|
+
const fs = require('fs');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
function find(script) {
|
|
9
|
+
let dir = path.resolve(__dirname, '../');
|
|
10
|
+
|
|
11
|
+
while (dir !== path.parse(dir).root) {
|
|
12
|
+
let filepath = path.resolve(dir, `node_modules/.bin/${script}`);
|
|
13
|
+
|
|
14
|
+
if (fs.existsSync(filepath)) {
|
|
15
|
+
return filepath;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
dir = path.dirname(dir);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
throw new Error(`@esportsplus/cli-passthrough: could not find ${script}`);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
24
25
|
spawn(find('tsc-alias'), process.argv.slice(2), { shell: true, stdio: 'inherit' });
|
package/package.json
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
{
|
|
2
|
-
"author": "ICJR",
|
|
3
|
-
"bin": {
|
|
4
|
-
"tsc": "./bin/tsc",
|
|
5
|
-
"tsc-alias": "./bin/tsc-alias"
|
|
6
|
-
},
|
|
7
|
-
"dependencies": {
|
|
8
|
-
"tsc-alias": "^1.8.16",
|
|
9
|
-
"typescript": "^5.8.3"
|
|
10
|
-
},
|
|
11
|
-
"exports": {
|
|
12
|
-
"./package.json": "./package.json",
|
|
13
|
-
"./tsconfig.browser.json": "./tsconfig.browser.json",
|
|
14
|
-
"./tsconfig.node.json": "./tsconfig.node.json",
|
|
15
|
-
"./tsconfig.package.json": "./tsconfig.package.json",
|
|
16
|
-
".": {
|
|
17
|
-
"types": "./build/index.d.ts",
|
|
18
|
-
"default": "./build/index.js"
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
"main": "build/index.js",
|
|
22
|
-
"name": "@esportsplus/typescript",
|
|
23
|
-
"private": false,
|
|
24
|
-
"scripts": {
|
|
25
|
-
"build": "tsc && tsc-alias",
|
|
26
|
-
"-": "-",
|
|
27
|
-
"prepare": "npm run build",
|
|
28
|
-
"prepublishOnly": "npm run build"
|
|
29
|
-
},
|
|
30
|
-
"types": "build/index.d.ts",
|
|
31
|
-
"version": "0.8.
|
|
32
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"author": "ICJR",
|
|
3
|
+
"bin": {
|
|
4
|
+
"tsc": "./bin/tsc",
|
|
5
|
+
"tsc-alias": "./bin/tsc-alias"
|
|
6
|
+
},
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"tsc-alias": "^1.8.16",
|
|
9
|
+
"typescript": "^5.8.3"
|
|
10
|
+
},
|
|
11
|
+
"exports": {
|
|
12
|
+
"./package.json": "./package.json",
|
|
13
|
+
"./tsconfig.browser.json": "./tsconfig.browser.json",
|
|
14
|
+
"./tsconfig.node.json": "./tsconfig.node.json",
|
|
15
|
+
"./tsconfig.package.json": "./tsconfig.package.json",
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./build/index.d.ts",
|
|
18
|
+
"default": "./build/index.js"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"main": "build/index.js",
|
|
22
|
+
"name": "@esportsplus/typescript",
|
|
23
|
+
"private": false,
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "tsc && tsc-alias",
|
|
26
|
+
"-": "-",
|
|
27
|
+
"prepare": "npm run build",
|
|
28
|
+
"prepublishOnly": "npm run build"
|
|
29
|
+
},
|
|
30
|
+
"types": "build/index.d.ts",
|
|
31
|
+
"version": "0.8.10"
|
|
32
|
+
}
|
package/src/types.ts
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
type DeepReadonly<T> = T extends (...args: any[]) => any
|
|
2
|
-
? T
|
|
3
|
-
: T extends Array<infer R>
|
|
4
|
-
? ReadonlyArray<DeepReadonly<R>>
|
|
5
|
-
: T extends object
|
|
6
|
-
? { readonly [K in keyof T]: DeepReadonly<T[K]> }
|
|
7
|
-
: T;
|
|
8
|
-
|
|
9
|
-
type Function = (...args: unknown[]) => Promise<unknown> | unknown;
|
|
10
|
-
|
|
11
|
-
type NeverAsync<T> =
|
|
12
|
-
T extends Promise<unknown>
|
|
13
|
-
? never
|
|
14
|
-
: T extends (...args: unknown[]) => unknown
|
|
15
|
-
? NeverAsync<ReturnType<T>> extends never
|
|
16
|
-
? never
|
|
17
|
-
: T
|
|
18
|
-
: T;
|
|
19
|
-
|
|
20
|
-
type NeverFunction<T> =
|
|
21
|
-
T extends Promise<unknown>
|
|
22
|
-
? never
|
|
23
|
-
: T extends (...args: unknown[]) => unknown
|
|
24
|
-
? never
|
|
25
|
-
: T;
|
|
26
|
-
|
|
27
|
-
type Prettify<T> = {
|
|
28
|
-
[K in keyof T]: T[K];
|
|
29
|
-
} & {};
|
|
30
|
-
|
|
31
|
-
type UnionRecord<U, V extends Record<string, unknown>> = Prettify<U & { [K in keyof U]?: undefined } & V>;
|
|
32
|
-
|
|
33
|
-
|
|
1
|
+
type DeepReadonly<T> = T extends (...args: any[]) => any
|
|
2
|
+
? T
|
|
3
|
+
: T extends Array<infer R>
|
|
4
|
+
? ReadonlyArray<DeepReadonly<R>>
|
|
5
|
+
: T extends object
|
|
6
|
+
? { readonly [K in keyof T]: DeepReadonly<T[K]> }
|
|
7
|
+
: T;
|
|
8
|
+
|
|
9
|
+
type Function = (...args: unknown[]) => Promise<unknown> | unknown;
|
|
10
|
+
|
|
11
|
+
type NeverAsync<T> =
|
|
12
|
+
T extends Promise<unknown>
|
|
13
|
+
? never
|
|
14
|
+
: T extends (...args: unknown[]) => unknown
|
|
15
|
+
? NeverAsync<ReturnType<T>> extends never
|
|
16
|
+
? never
|
|
17
|
+
: T
|
|
18
|
+
: T;
|
|
19
|
+
|
|
20
|
+
type NeverFunction<T> =
|
|
21
|
+
T extends Promise<unknown>
|
|
22
|
+
? never
|
|
23
|
+
: T extends (...args: unknown[]) => unknown
|
|
24
|
+
? never
|
|
25
|
+
: T;
|
|
26
|
+
|
|
27
|
+
type Prettify<T> = {
|
|
28
|
+
[K in keyof T]: T[K];
|
|
29
|
+
} & {};
|
|
30
|
+
|
|
31
|
+
type UnionRecord<U, V extends Record<string, unknown>> = Prettify<U & { [K in keyof U]?: undefined } & V>;
|
|
32
|
+
|
|
33
|
+
|
|
34
34
|
export type { DeepReadonly, Function, NeverAsync, NeverFunction, Prettify, UnionRecord };
|
package/tsconfig.base.json
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"allowJs": true,
|
|
5
|
-
"allowSyntheticDefaultImports": true,
|
|
6
|
-
"baseUrl": "${configDir}",
|
|
7
|
-
"declaration": false,
|
|
8
|
-
"esModuleInterop": true,
|
|
9
|
-
"isolatedModules": true,
|
|
10
|
-
"lib": [
|
|
11
|
-
"dom",
|
|
12
|
-
"dom.iterable",
|
|
13
|
-
"esnext"
|
|
14
|
-
],
|
|
15
|
-
"module": "esnext",
|
|
16
|
-
"moduleDetection": "force",
|
|
17
|
-
"moduleResolution": "bundler",
|
|
18
|
-
"noUnusedLocals": true,
|
|
19
|
-
"noUnusedParameters": true,
|
|
20
|
-
"outDir": "${configDir}/build",
|
|
21
|
-
"paths": {
|
|
22
|
-
"~/*": [
|
|
23
|
-
"${configDir}/src/*"
|
|
24
|
-
],
|
|
25
|
-
"~/storage/*": [
|
|
26
|
-
"${configDir}/storage/*"
|
|
27
|
-
]
|
|
28
|
-
},
|
|
29
|
-
"removeComments": true,
|
|
30
|
-
"resolveJsonModule": true,
|
|
31
|
-
"skipLibCheck": true,
|
|
32
|
-
"strict": true,
|
|
33
|
-
"target": "esnext"
|
|
34
|
-
},
|
|
35
|
-
"include": [
|
|
36
|
-
"${configDir}/src"
|
|
37
|
-
],
|
|
38
|
-
"tsc-alias": {
|
|
39
|
-
"resolveFullPaths": true,
|
|
40
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"allowJs": true,
|
|
5
|
+
"allowSyntheticDefaultImports": true,
|
|
6
|
+
"baseUrl": "${configDir}",
|
|
7
|
+
"declaration": false,
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"isolatedModules": true,
|
|
10
|
+
"lib": [
|
|
11
|
+
"dom",
|
|
12
|
+
"dom.iterable",
|
|
13
|
+
"esnext"
|
|
14
|
+
],
|
|
15
|
+
"module": "esnext",
|
|
16
|
+
"moduleDetection": "force",
|
|
17
|
+
"moduleResolution": "bundler",
|
|
18
|
+
"noUnusedLocals": true,
|
|
19
|
+
"noUnusedParameters": true,
|
|
20
|
+
"outDir": "${configDir}/build",
|
|
21
|
+
"paths": {
|
|
22
|
+
"~/*": [
|
|
23
|
+
"${configDir}/src/*"
|
|
24
|
+
],
|
|
25
|
+
"~/storage/*": [
|
|
26
|
+
"${configDir}/storage/*"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"removeComments": true,
|
|
30
|
+
"resolveJsonModule": true,
|
|
31
|
+
"skipLibCheck": true,
|
|
32
|
+
"strict": true,
|
|
33
|
+
"target": "esnext"
|
|
34
|
+
},
|
|
35
|
+
"include": [
|
|
36
|
+
"${configDir}/src"
|
|
37
|
+
],
|
|
38
|
+
"tsc-alias": {
|
|
39
|
+
"resolveFullPaths": true,
|
|
40
|
+
}
|
|
41
41
|
}
|
package/tsconfig.browser.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.base.json"
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.base.json"
|
|
3
3
|
}
|
package/tsconfig.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.package.json"
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.package.json"
|
|
3
3
|
}
|
package/tsconfig.node.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.base.json"
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.base.json"
|
|
3
3
|
}
|
package/tsconfig.package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"declaration": true,
|
|
4
|
-
"declarationDir": "${configDir}/build"
|
|
5
|
-
},
|
|
6
|
-
"extends": "./tsconfig.base.json"
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"declaration": true,
|
|
4
|
+
"declarationDir": "${configDir}/build"
|
|
5
|
+
},
|
|
6
|
+
"extends": "./tsconfig.base.json"
|
|
7
7
|
}
|