@aidc-toolkit/dev 0.9.15-beta → 0.9.17-beta
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/config/publish.json +53 -0
- package/dev.iml +9 -0
- package/dist/eslint-config-template.js +99 -0
- package/dist/eslint-config-template.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -171
- package/dist/index.js.map +1 -0
- package/dist/{command-util.d.ts → utility.d.ts} +6 -1
- package/dist/utility.d.ts.map +1 -0
- package/dist/utility.js +57 -0
- package/dist/utility.js.map +1 -0
- package/eslint.config.ts +1 -1
- package/package.json +9 -11
- package/src/index.ts +1 -1
- package/src/publish-external.ts +332 -0
- package/src/publish-internal.ts +111 -0
- package/src/publish.ts +273 -0
- package/src/{command-util.ts → utility.ts} +24 -1
- package/tsconfig-build-dev-local.json +9 -0
- package/tsconfig-build-dev.json +9 -0
- package/tsconfig-build-local.json +11 -0
- package/{tsconfig-declaration.json → tsconfig-build.json} +1 -4
- package/tsconfig.json +6 -3
- package/bin/publish-dev +0 -8
- package/bin/publish-dev-local +0 -8
- package/config/release.json +0 -27
- package/dist/command-util.d.ts.map +0 -1
- package/dist/index.cjs +0 -225
- package/dist/index.d.cts +0 -10
- package/dist/publish-dev.d.ts +0 -5
- package/dist/publish-dev.d.ts.map +0 -1
- package/src/publish-dev.ts +0 -110
- package/src/release.ts +0 -426
- package/tsconfig-declaration-local.json +0 -14
- package/tsup.config.ts +0 -8
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"organization": "aidc-toolkit",
|
|
3
|
+
"repositories": {
|
|
4
|
+
"dev": {
|
|
5
|
+
"dependencyType": "external",
|
|
6
|
+
"excludeFiles": [
|
|
7
|
+
"src/publish.ts",
|
|
8
|
+
"src/publish-internal.ts",
|
|
9
|
+
"src/publish-external.ts",
|
|
10
|
+
"config/publish.json",
|
|
11
|
+
"config/publish.secure.json"
|
|
12
|
+
],
|
|
13
|
+
"lastExternalVersion": "0.9.16-beta",
|
|
14
|
+
"lastInternalPublished": "2025-03-02T19:42:30.219Z"
|
|
15
|
+
},
|
|
16
|
+
"core": {
|
|
17
|
+
"dependencyType": "external",
|
|
18
|
+
"lastExternalVersion": "0.9.16-beta",
|
|
19
|
+
"lastInternalPublished": "2025-03-02T19:46:27.439Z"
|
|
20
|
+
},
|
|
21
|
+
"utility": {
|
|
22
|
+
"dependencyType": "external",
|
|
23
|
+
"lastExternalVersion": "0.9.16-beta",
|
|
24
|
+
"lastInternalPublished": "2025-03-02T19:46:37.087Z"
|
|
25
|
+
},
|
|
26
|
+
"gs1": {
|
|
27
|
+
"dependencyType": "external",
|
|
28
|
+
"lastExternalVersion": "0.9.16-beta",
|
|
29
|
+
"lastInternalPublished": "2025-03-02T19:46:50.266Z"
|
|
30
|
+
},
|
|
31
|
+
"demo": {
|
|
32
|
+
"dependencyType": "none",
|
|
33
|
+
"lastExternalVersion": "0.9.16-beta"
|
|
34
|
+
},
|
|
35
|
+
"app-extension": {
|
|
36
|
+
"dependencyType": "internal",
|
|
37
|
+
"lastExternalVersion": "0.9.16-beta",
|
|
38
|
+
"internal": true,
|
|
39
|
+
"lastInternalPublished": "2025-03-02T19:47:50.192Z"
|
|
40
|
+
},
|
|
41
|
+
"app-generator": {
|
|
42
|
+
"dependencyType": "internal",
|
|
43
|
+
"lastExternalVersion": "0.9.16-beta",
|
|
44
|
+
"internal": true,
|
|
45
|
+
"lastInternalPublished": "2025-03-02T19:47:58.982Z"
|
|
46
|
+
},
|
|
47
|
+
"aidc-toolkit.github.io": {
|
|
48
|
+
"directory": "doc",
|
|
49
|
+
"dependencyType": "none",
|
|
50
|
+
"lastExternalVersion": "0.9.16-beta"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
package/dev.iml
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="WEB_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
4
|
+
<exclude-output />
|
|
5
|
+
<content url="file://$MODULE_DIR$" />
|
|
6
|
+
<orderEntry type="inheritedJdk" />
|
|
7
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
8
|
+
</component>
|
|
9
|
+
</module>
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import js from "@eslint/js";
|
|
2
|
+
import stylistic from "@stylistic/eslint-plugin";
|
|
3
|
+
import esLintConfigLove from "eslint-config-love";
|
|
4
|
+
import jsdoc from "eslint-plugin-jsdoc";
|
|
5
|
+
import tseslint from "typescript-eslint";
|
|
6
|
+
export const esLintConfigAIDCToolkit = tseslint.config({
|
|
7
|
+
ignores: ["dist"]
|
|
8
|
+
}, js.configs.recommended, ...tseslint.configs.strictTypeChecked, stylistic.configs.recommended, jsdoc.configs["flat/recommended-typescript"], esLintConfigLove, {
|
|
9
|
+
languageOptions: {
|
|
10
|
+
parserOptions: {
|
|
11
|
+
projectService: true
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
linterOptions: {
|
|
15
|
+
reportUnusedDisableDirectives: "error"
|
|
16
|
+
},
|
|
17
|
+
rules: {
|
|
18
|
+
"complexity": "off",
|
|
19
|
+
"max-depth": ["error", 10],
|
|
20
|
+
"max-lines": "off",
|
|
21
|
+
"no-dupe-class-members": "off",
|
|
22
|
+
"no-redeclare": "off",
|
|
23
|
+
"no-unused-vars": "off",
|
|
24
|
+
"@typescript-eslint/class-literal-property-style": "off",
|
|
25
|
+
"@typescript-eslint/class-methods-use-this": "off",
|
|
26
|
+
"@typescript-eslint/init-declarations": "off",
|
|
27
|
+
"@typescript-eslint/max-params": "off",
|
|
28
|
+
"@typescript-eslint/no-empty-function": "off",
|
|
29
|
+
"@typescript-eslint/no-empty-object-type": "off",
|
|
30
|
+
"@typescript-eslint/no-magic-numbers": "off",
|
|
31
|
+
"@typescript-eslint/no-unnecessary-type-parameters": "off",
|
|
32
|
+
"@typescript-eslint/no-unused-vars": [
|
|
33
|
+
"error",
|
|
34
|
+
{
|
|
35
|
+
argsIgnorePattern: "^_",
|
|
36
|
+
varsIgnorePattern: "^_",
|
|
37
|
+
caughtErrorsIgnorePattern: "^_"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"@typescript-eslint/prefer-destructuring": "off",
|
|
41
|
+
"@typescript-eslint/unbound-method": ["error", {
|
|
42
|
+
ignoreStatic: true
|
|
43
|
+
}],
|
|
44
|
+
"@stylistic/array-bracket-newline": ["error", "consistent"],
|
|
45
|
+
"@stylistic/brace-style": ["error", "1tbs", {
|
|
46
|
+
allowSingleLine: false
|
|
47
|
+
}],
|
|
48
|
+
"@stylistic/comma-dangle": ["error", "never"],
|
|
49
|
+
"@stylistic/indent": ["error", 4],
|
|
50
|
+
"@stylistic/member-delimiter-style": ["error", {
|
|
51
|
+
multiline: {
|
|
52
|
+
delimiter: "semi",
|
|
53
|
+
requireLast: true
|
|
54
|
+
},
|
|
55
|
+
singleline: {
|
|
56
|
+
delimiter: "semi"
|
|
57
|
+
}
|
|
58
|
+
}],
|
|
59
|
+
"@stylistic/no-trailing-spaces": ["off"],
|
|
60
|
+
"@stylistic/operator-linebreak": ["error", "after"],
|
|
61
|
+
"@stylistic/quotes": ["error", "double"],
|
|
62
|
+
"@stylistic/semi": ["error", "always"],
|
|
63
|
+
"@stylistic/object-curly-newline": ["error", {
|
|
64
|
+
ObjectExpression: {
|
|
65
|
+
multiline: true,
|
|
66
|
+
minProperties: 1
|
|
67
|
+
},
|
|
68
|
+
ObjectPattern: {
|
|
69
|
+
multiline: true,
|
|
70
|
+
minProperties: 1
|
|
71
|
+
}
|
|
72
|
+
}],
|
|
73
|
+
"@stylistic/object-property-newline": "error",
|
|
74
|
+
"jsdoc/require-description": ["warn", {
|
|
75
|
+
contexts: ["ClassDeclaration", "ClassProperty", "FunctionDeclaration", "MethodDefinition", "TSEnumDeclaration", "TSInterfaceDeclaration", "TSModuleDeclaration", "TSTypeAliasDeclaration"]
|
|
76
|
+
}],
|
|
77
|
+
"jsdoc/require-jsdoc": ["warn", {
|
|
78
|
+
contexts: ["ClassDeclaration", "ClassProperty", "FunctionDeclaration", "MethodDefinition", "TSEnumDeclaration", "TSInterfaceDeclaration", "TSModuleDeclaration", "TSTypeAliasDeclaration"]
|
|
79
|
+
}],
|
|
80
|
+
"jsdoc/require-returns": ["warn", {
|
|
81
|
+
checkGetters: false
|
|
82
|
+
}],
|
|
83
|
+
"jsdoc/tag-lines": ["warn", "any", {
|
|
84
|
+
count: 1,
|
|
85
|
+
startLines: 1
|
|
86
|
+
}]
|
|
87
|
+
}
|
|
88
|
+
}, {
|
|
89
|
+
files: [
|
|
90
|
+
"test/**/*"
|
|
91
|
+
],
|
|
92
|
+
rules: {
|
|
93
|
+
"max-nested-callbacks": "off",
|
|
94
|
+
"jsdoc/require-jsdoc": "off",
|
|
95
|
+
"@typescript-eslint/dot-notation": "off",
|
|
96
|
+
"@typescript-eslint/no-unsafe-type-assertion": "off"
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
//# sourceMappingURL=eslint-config-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eslint-config-template.js","sourceRoot":"","sources":["../src/eslint-config-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,SAAS,MAAM,0BAA0B,CAAC;AACjD,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AAEzC,MAAM,CAAC,MAAM,uBAAuB,GAAG,QAAQ,CAAC,MAAM,CAClD;IACI,OAAO,EAAE,CAAC,MAAM,CAAC;CACpB,EACD,EAAE,CAAC,OAAO,CAAC,WAAW,EACtB,GAAG,QAAQ,CAAC,OAAO,CAAC,iBAAiB,EACrC,SAAS,CAAC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ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,cAAc,6BAA6B,CAAC;AAC5C,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,cAAc,6BAA6B,CAAC;AAC5C,cAAc,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,174 +1,3 @@
|
|
|
1
|
-
// src/eslint-config-template.ts
|
|
2
|
-
import js from "@eslint/js";
|
|
3
|
-
import stylistic from "@stylistic/eslint-plugin";
|
|
4
|
-
import esLintConfigLove from "eslint-config-love";
|
|
5
|
-
import jsdoc from "eslint-plugin-jsdoc";
|
|
6
|
-
import tseslint from "typescript-eslint";
|
|
7
|
-
var esLintConfigAIDCToolkit = tseslint.config(
|
|
8
|
-
{
|
|
9
|
-
ignores: ["dist"]
|
|
10
|
-
},
|
|
11
|
-
js.configs.recommended,
|
|
12
|
-
...tseslint.configs.strictTypeChecked,
|
|
13
|
-
stylistic.configs.recommended,
|
|
14
|
-
jsdoc.configs["flat/recommended-typescript"],
|
|
15
|
-
esLintConfigLove,
|
|
16
|
-
{
|
|
17
|
-
languageOptions: {
|
|
18
|
-
parserOptions: {
|
|
19
|
-
projectService: true
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
linterOptions: {
|
|
23
|
-
reportUnusedDisableDirectives: "error"
|
|
24
|
-
},
|
|
25
|
-
rules: {
|
|
26
|
-
"complexity": "off",
|
|
27
|
-
"max-depth": ["error", 10],
|
|
28
|
-
"max-lines": "off",
|
|
29
|
-
"no-dupe-class-members": "off",
|
|
30
|
-
"no-redeclare": "off",
|
|
31
|
-
"no-unused-vars": "off",
|
|
32
|
-
"@typescript-eslint/class-literal-property-style": "off",
|
|
33
|
-
"@typescript-eslint/class-methods-use-this": "off",
|
|
34
|
-
"@typescript-eslint/init-declarations": "off",
|
|
35
|
-
"@typescript-eslint/max-params": "off",
|
|
36
|
-
"@typescript-eslint/no-empty-function": "off",
|
|
37
|
-
"@typescript-eslint/no-empty-object-type": "off",
|
|
38
|
-
"@typescript-eslint/no-magic-numbers": "off",
|
|
39
|
-
"@typescript-eslint/no-unnecessary-type-parameters": "off",
|
|
40
|
-
"@typescript-eslint/no-unused-vars": [
|
|
41
|
-
"error",
|
|
42
|
-
{
|
|
43
|
-
argsIgnorePattern: "^_",
|
|
44
|
-
varsIgnorePattern: "^_",
|
|
45
|
-
caughtErrorsIgnorePattern: "^_"
|
|
46
|
-
}
|
|
47
|
-
],
|
|
48
|
-
"@typescript-eslint/prefer-destructuring": "off",
|
|
49
|
-
"@typescript-eslint/unbound-method": ["error", {
|
|
50
|
-
ignoreStatic: true
|
|
51
|
-
}],
|
|
52
|
-
"@stylistic/array-bracket-newline": ["error", "consistent"],
|
|
53
|
-
"@stylistic/brace-style": ["error", "1tbs", {
|
|
54
|
-
allowSingleLine: false
|
|
55
|
-
}],
|
|
56
|
-
"@stylistic/comma-dangle": ["error", "never"],
|
|
57
|
-
"@stylistic/indent": ["error", 4],
|
|
58
|
-
"@stylistic/member-delimiter-style": ["error", {
|
|
59
|
-
multiline: {
|
|
60
|
-
delimiter: "semi",
|
|
61
|
-
requireLast: true
|
|
62
|
-
},
|
|
63
|
-
singleline: {
|
|
64
|
-
delimiter: "semi"
|
|
65
|
-
}
|
|
66
|
-
}],
|
|
67
|
-
"@stylistic/no-trailing-spaces": ["off"],
|
|
68
|
-
"@stylistic/operator-linebreak": ["error", "after"],
|
|
69
|
-
"@stylistic/quotes": ["error", "double"],
|
|
70
|
-
"@stylistic/semi": ["error", "always"],
|
|
71
|
-
"@stylistic/object-curly-newline": ["error", {
|
|
72
|
-
ObjectExpression: {
|
|
73
|
-
multiline: true,
|
|
74
|
-
minProperties: 1
|
|
75
|
-
},
|
|
76
|
-
ObjectPattern: {
|
|
77
|
-
multiline: true,
|
|
78
|
-
minProperties: 1
|
|
79
|
-
}
|
|
80
|
-
}],
|
|
81
|
-
"@stylistic/object-property-newline": "error",
|
|
82
|
-
"jsdoc/require-description": ["warn", {
|
|
83
|
-
contexts: ["ClassDeclaration", "ClassProperty", "FunctionDeclaration", "MethodDefinition", "TSEnumDeclaration", "TSInterfaceDeclaration", "TSModuleDeclaration", "TSTypeAliasDeclaration"]
|
|
84
|
-
}],
|
|
85
|
-
"jsdoc/require-jsdoc": ["warn", {
|
|
86
|
-
contexts: ["ClassDeclaration", "ClassProperty", "FunctionDeclaration", "MethodDefinition", "TSEnumDeclaration", "TSInterfaceDeclaration", "TSModuleDeclaration", "TSTypeAliasDeclaration"]
|
|
87
|
-
}],
|
|
88
|
-
"jsdoc/require-returns": ["warn", {
|
|
89
|
-
checkGetters: false
|
|
90
|
-
}],
|
|
91
|
-
"jsdoc/tag-lines": ["warn", "any", {
|
|
92
|
-
count: 1,
|
|
93
|
-
startLines: 1
|
|
94
|
-
}]
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
files: [
|
|
99
|
-
"test/**/*"
|
|
100
|
-
],
|
|
101
|
-
rules: {
|
|
102
|
-
"max-nested-callbacks": "off",
|
|
103
|
-
"jsdoc/require-jsdoc": "off",
|
|
104
|
-
"@typescript-eslint/dot-notation": "off",
|
|
105
|
-
"@typescript-eslint/no-unsafe-type-assertion": "off"
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
);
|
|
109
|
-
|
|
110
|
-
// src/publish-dev.ts
|
|
111
|
-
import * as fs from "fs";
|
|
112
|
-
|
|
113
|
-
// src/command-util.ts
|
|
114
|
-
import { spawnSync } from "child_process";
|
|
115
|
-
function run(captureOutput, command, ...args) {
|
|
116
|
-
const spawnResult = spawnSync(command, args, {
|
|
117
|
-
stdio: ["inherit", captureOutput ? "pipe" : "inherit", "inherit"]
|
|
118
|
-
});
|
|
119
|
-
if (spawnResult.error !== void 0) {
|
|
120
|
-
throw spawnResult.error;
|
|
121
|
-
}
|
|
122
|
-
if (spawnResult.status === null) {
|
|
123
|
-
throw new Error(`Terminated by signal ${spawnResult.signal}`);
|
|
124
|
-
}
|
|
125
|
-
if (spawnResult.status !== 0) {
|
|
126
|
-
throw new Error(`Failed with status ${spawnResult.status}`);
|
|
127
|
-
}
|
|
128
|
-
return captureOutput ? spawnResult.stdout.toString().split("\n").slice(0, -1) : [];
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// src/publish-dev.ts
|
|
132
|
-
function zeroPadded(n, length) {
|
|
133
|
-
return `${"0".repeat(length - 1)}${n}`.slice(-length);
|
|
134
|
-
}
|
|
135
|
-
function fixAlphaDependencies(atOrganization, dependencies) {
|
|
136
|
-
if (dependencies !== void 0) {
|
|
137
|
-
for (const dependency in dependencies) {
|
|
138
|
-
if (dependency.split("/")[0] === atOrganization) {
|
|
139
|
-
dependencies[dependency] = "alpha";
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
function publishDev() {
|
|
145
|
-
run(false, "npm", "update", "--save");
|
|
146
|
-
const now = /* @__PURE__ */ new Date();
|
|
147
|
-
const packageConfigurationPath = "package.json";
|
|
148
|
-
const backupPackageConfigurationPath = "_package.json";
|
|
149
|
-
const packageConfiguration = JSON.parse(fs.readFileSync(packageConfigurationPath).toString());
|
|
150
|
-
const atOrganization = packageConfiguration.name.split("/")[0];
|
|
151
|
-
fixAlphaDependencies(atOrganization, packageConfiguration.devDependencies);
|
|
152
|
-
fixAlphaDependencies(atOrganization, packageConfiguration.dependencies);
|
|
153
|
-
fs.writeFileSync(packageConfigurationPath, `${JSON.stringify(packageConfiguration, null, 2)}
|
|
154
|
-
`);
|
|
155
|
-
fs.renameSync(packageConfigurationPath, backupPackageConfigurationPath);
|
|
156
|
-
try {
|
|
157
|
-
const [majorVersion, minorVersion, patchVersion] = packageConfiguration.version.split("-")[0].split(".").map((versionString) => Number(versionString));
|
|
158
|
-
packageConfiguration.version = `${majorVersion}.${minorVersion}.${patchVersion + 1}-alpha.${now.getFullYear()}${zeroPadded(now.getMonth() + 1, 2)}${zeroPadded(now.getDate(), 2)}${zeroPadded(now.getHours(), 2)}${zeroPadded(now.getMinutes(), 2)}`;
|
|
159
|
-
fs.writeFileSync(packageConfigurationPath, `${JSON.stringify(packageConfiguration, null, 2)}
|
|
160
|
-
`);
|
|
161
|
-
run(false, "npm", "run", "build:dev");
|
|
162
|
-
run(false, "npm", "publish", "--tag", "alpha");
|
|
163
|
-
} finally {
|
|
164
|
-
fs.rmSync(packageConfigurationPath);
|
|
165
|
-
fs.renameSync(backupPackageConfigurationPath, packageConfigurationPath);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
export {
|
|
169
|
-
esLintConfigAIDCToolkit,
|
|
170
|
-
publishDev
|
|
171
|
-
};
|
|
172
1
|
/*!
|
|
173
2
|
* Copyright © 2024-2025 Dolphin Data Development Ltd. and AIDC Toolkit
|
|
174
3
|
* contributors
|
|
@@ -185,3 +14,6 @@ export {
|
|
|
185
14
|
* See the License for the specific language governing permissions and
|
|
186
15
|
* limitations under the License.
|
|
187
16
|
*/
|
|
17
|
+
export * from "./eslint-config-template.js";
|
|
18
|
+
export * from "./utility.js";
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,cAAc,6BAA6B,CAAC;AAC5C,cAAc,cAAc,CAAC"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import { Logger } from "tslog";
|
|
2
|
+
/**
|
|
3
|
+
* Logger with a default minimum level of Info.
|
|
4
|
+
*/
|
|
5
|
+
export declare const logger: Logger<unknown>;
|
|
1
6
|
/**
|
|
2
7
|
* Run a command and optionally capture its output.
|
|
3
8
|
*
|
|
@@ -14,4 +19,4 @@
|
|
|
14
19
|
* Output if captured or empty array if not.
|
|
15
20
|
*/
|
|
16
21
|
export declare function run(captureOutput: boolean, command: string, ...args: string[]): string[];
|
|
17
|
-
//# sourceMappingURL=
|
|
22
|
+
//# sourceMappingURL=utility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../src/utility.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAS/B;;GAEG;AACH,eAAO,MAAM,MAAM,iBAEjB,CAAC;AAEH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,GAAG,CAAC,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CA0BxF"}
|
package/dist/utility.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { spawnSync } from "child_process";
|
|
2
|
+
import { Logger } from "tslog";
|
|
3
|
+
/**
|
|
4
|
+
* Log level.
|
|
5
|
+
*/
|
|
6
|
+
var LogLevel;
|
|
7
|
+
(function (LogLevel) {
|
|
8
|
+
LogLevel[LogLevel["Silly"] = 0] = "Silly";
|
|
9
|
+
LogLevel[LogLevel["Trace"] = 1] = "Trace";
|
|
10
|
+
LogLevel[LogLevel["Debug"] = 2] = "Debug";
|
|
11
|
+
LogLevel[LogLevel["Info"] = 3] = "Info";
|
|
12
|
+
LogLevel[LogLevel["Warn"] = 4] = "Warn";
|
|
13
|
+
LogLevel[LogLevel["Error"] = 5] = "Error";
|
|
14
|
+
LogLevel[LogLevel["Fatal"] = 6] = "Fatal";
|
|
15
|
+
})(LogLevel || (LogLevel = {}));
|
|
16
|
+
/**
|
|
17
|
+
* Logger with a default minimum level of Info.
|
|
18
|
+
*/
|
|
19
|
+
export const logger = new Logger({
|
|
20
|
+
minLevel: LogLevel.Info
|
|
21
|
+
});
|
|
22
|
+
/**
|
|
23
|
+
* Run a command and optionally capture its output.
|
|
24
|
+
*
|
|
25
|
+
* @param captureOutput
|
|
26
|
+
* If true, output is captured and returned.
|
|
27
|
+
*
|
|
28
|
+
* @param command
|
|
29
|
+
* Command to run.
|
|
30
|
+
*
|
|
31
|
+
* @param args
|
|
32
|
+
* Arguments to command.
|
|
33
|
+
*
|
|
34
|
+
* @returns
|
|
35
|
+
* Output if captured or empty array if not.
|
|
36
|
+
*/
|
|
37
|
+
export function run(captureOutput, command, ...args) {
|
|
38
|
+
logger.debug(`Running command "${command}" with arguments ${JSON.stringify(args)}.`);
|
|
39
|
+
const spawnResult = spawnSync(command, args, {
|
|
40
|
+
stdio: ["inherit", captureOutput ? "pipe" : "inherit", "inherit"]
|
|
41
|
+
});
|
|
42
|
+
if (spawnResult.error !== undefined) {
|
|
43
|
+
throw spawnResult.error;
|
|
44
|
+
}
|
|
45
|
+
if (spawnResult.status === null) {
|
|
46
|
+
throw new Error(`Terminated by signal ${spawnResult.signal}`);
|
|
47
|
+
}
|
|
48
|
+
if (spawnResult.status !== 0) {
|
|
49
|
+
throw new Error(`Failed with status ${spawnResult.status}`);
|
|
50
|
+
}
|
|
51
|
+
const output = captureOutput ? spawnResult.stdout.toString().split("\n").slice(0, -1) : [];
|
|
52
|
+
if (captureOutput) {
|
|
53
|
+
logger.debug(`Output is ${JSON.stringify(output)}.`);
|
|
54
|
+
}
|
|
55
|
+
return output;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=utility.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utility.js","sourceRoot":"","sources":["../src/utility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B;;GAEG;AACH,IAAK,QAEJ;AAFD,WAAK,QAAQ;IACT,yCAAK,CAAA;IAAE,yCAAK,CA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AC;IAE3F,IAAI,aAAa,EAAE,CAAC;QAChB,MAAM,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACzD,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
package/eslint.config.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aidc-toolkit/dev",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.17-beta",
|
|
4
4
|
"description": "Shared development artefacts for AIDC Toolkit",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -21,15 +21,12 @@
|
|
|
21
21
|
"scripts": {
|
|
22
22
|
"copy-workflows": "copy-files-from-to --config copy-workflows.json",
|
|
23
23
|
"lint": "eslint",
|
|
24
|
-
"build:core": "
|
|
25
|
-
"build:dev": "npm run build:core
|
|
26
|
-
"build:release": "npm run build:core --
|
|
24
|
+
"build:core": "rimraf dist && tsc --project",
|
|
25
|
+
"build:dev": "npm run build:core -- tsconfig-build-dev-local.json",
|
|
26
|
+
"build:release": "npm run build:core -- tsconfig-build-local.json",
|
|
27
27
|
"build:doc": "npm run build:dev",
|
|
28
|
-
"publish-
|
|
29
|
-
"
|
|
30
|
-
},
|
|
31
|
-
"bin": {
|
|
32
|
-
"publish-dev": "bin/publish-dev"
|
|
28
|
+
"publish-internal": "tsx src/publish-internal.ts",
|
|
29
|
+
"publish-external": "tsx src/publish-external.ts"
|
|
33
30
|
},
|
|
34
31
|
"devDependencies": {
|
|
35
32
|
"copy-files-from-to": "^3.12.1"
|
|
@@ -37,14 +34,15 @@
|
|
|
37
34
|
"dependencies": {
|
|
38
35
|
"@eslint/js": "^9.20.0",
|
|
39
36
|
"@octokit/types": "^13.8.0",
|
|
40
|
-
"@stylistic/eslint-plugin": "^4.0
|
|
37
|
+
"@stylistic/eslint-plugin": "^4.1.0",
|
|
41
38
|
"eslint": "^9.21.0",
|
|
42
39
|
"eslint-config-love": "^118.0.0",
|
|
43
40
|
"eslint-plugin-jsdoc": "^50.6.3",
|
|
44
41
|
"jiti": "^2.4.2",
|
|
45
42
|
"octokit": "^4.1.2",
|
|
43
|
+
"rimraf": "^6.0.1",
|
|
46
44
|
"ts-node": "^10.9.2",
|
|
47
|
-
"
|
|
45
|
+
"tslog": "^4.9.3",
|
|
48
46
|
"tsx": "^4.19.3",
|
|
49
47
|
"typescript": "^5.7.3",
|
|
50
48
|
"typescript-eslint": "^8.25.0",
|
package/src/index.ts
CHANGED