@produck/agent-toolkit 0.9.1 → 0.9.2
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/bin/command/sync-coverage/index.mjs +7 -2
- package/bin/command/sync-git/help.txt +1 -1
- package/bin/command/sync-git/index.mjs +15 -4
- package/bin/command/sync-install/index.mjs +1 -1
- package/bin/command/sync-lint/eslint.config.template.mjs +3 -16
- package/bin/command/sync-lint/index.mjs +14 -2
- package/bin/command/sync-publish/index.mjs +9 -4
- package/package.json +3 -3
- package/publish-assets/eslint.config.template.mjs +3 -16
- package/publish-assets/instructions/produck/tooling-version-baseline.json +1 -1
|
@@ -21,8 +21,13 @@ const TOOLING_BASELINE_CANDIDATE_PATHS = [
|
|
|
21
21
|
];
|
|
22
22
|
const GLOB_TOKEN_PATTERN = /[*?{}[\]]/;
|
|
23
23
|
const REQUIRED_ROOT_COVERAGE_SCRIPT_KEY = 'produck:coverage';
|
|
24
|
-
const REQUIRED_ROOT_COVERAGE_SCRIPT_VALUE =
|
|
25
|
-
'c8
|
|
24
|
+
const REQUIRED_ROOT_COVERAGE_SCRIPT_VALUE = [
|
|
25
|
+
'c8',
|
|
26
|
+
'--config .c8rc.json',
|
|
27
|
+
'npm run test',
|
|
28
|
+
'--workspaces',
|
|
29
|
+
'--if-present',
|
|
30
|
+
].join(' ');
|
|
26
31
|
const REQUIRED_COVERAGE_SCRIPT_KEY = 'produck:coverage';
|
|
27
32
|
const REQUIRED_TEST_SCRIPT_KEY = 'test';
|
|
28
33
|
const DEFAULT_TEST_SCRIPT_VALUE =
|
|
@@ -4,7 +4,7 @@ Usage:
|
|
|
4
4
|
|
|
5
5
|
Behavior:
|
|
6
6
|
- Applies organization-required root shared scripts:
|
|
7
|
-
- scripts.produck:baseline = npm exec --package=@produck/agent-toolkit@latest -- agent-toolkit enforce-node-baseline --cwd .
|
|
7
|
+
- scripts.produck:baseline = npm exec --package=@produck/agent-toolkit@latest -- agent-toolkit enforce-node-baseline --cwd . && npm run produck:install
|
|
8
8
|
- scripts.produck:commit:check = npm run produck:format && npm run produck:lint
|
|
9
9
|
- scripts.prepare = husky
|
|
10
10
|
- Applies organization-required root shared managed devDependencies:
|
|
@@ -29,11 +29,22 @@ const HUSKY_DIR = '.husky';
|
|
|
29
29
|
const PRE_COMMIT_HOOK_FILE = 'pre-commit';
|
|
30
30
|
const COMMIT_MSG_HOOK_FILE = 'commit-msg';
|
|
31
31
|
const REQUIRED_BASELINE_SCRIPT_KEY = 'produck:baseline';
|
|
32
|
-
const REQUIRED_BASELINE_SCRIPT_VALUE =
|
|
33
|
-
|
|
32
|
+
const REQUIRED_BASELINE_SCRIPT_VALUE = [
|
|
33
|
+
[
|
|
34
|
+
'npm exec',
|
|
35
|
+
'--package=@produck/agent-toolkit@latest',
|
|
36
|
+
'--',
|
|
37
|
+
'agent-toolkit',
|
|
38
|
+
'enforce-node-baseline',
|
|
39
|
+
'--cwd .',
|
|
40
|
+
].join(' '),
|
|
41
|
+
'npm run produck:install',
|
|
42
|
+
].join(' && ');
|
|
34
43
|
const REQUIRED_COMMIT_CHECK_SCRIPT_KEY = 'produck:commit:check';
|
|
35
|
-
const REQUIRED_COMMIT_CHECK_SCRIPT_VALUE =
|
|
36
|
-
'npm run produck:format
|
|
44
|
+
const REQUIRED_COMMIT_CHECK_SCRIPT_VALUE = [
|
|
45
|
+
'npm run produck:format',
|
|
46
|
+
'npm run produck:lint',
|
|
47
|
+
].join(' && ');
|
|
37
48
|
const REQUIRED_PREPARE_SCRIPT_KEY = 'prepare';
|
|
38
49
|
const REQUIRED_PREPARE_SCRIPT_VALUE = 'husky';
|
|
39
50
|
|
|
@@ -9,7 +9,7 @@ const COMMAND_DIR = path.dirname(fileURLToPath(import.meta.url));
|
|
|
9
9
|
const HELP_FILE = path.resolve(COMMAND_DIR, 'help.txt');
|
|
10
10
|
const LEGACY_INSTALL_SCRIPT_KEY = 'deps:install';
|
|
11
11
|
const REQUIRED_INSTALL_SCRIPT_KEY = 'produck:install';
|
|
12
|
-
const REQUIRED_INSTALL_SCRIPT_VALUE = 'npm -v
|
|
12
|
+
const REQUIRED_INSTALL_SCRIPT_VALUE = ['npm -v', 'npm install'].join(' && ');
|
|
13
13
|
|
|
14
14
|
export function printSyncInstallHelp() {
|
|
15
15
|
printTextResource(HELP_FILE);
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import js from '@eslint/js';
|
|
2
2
|
import globals from 'globals';
|
|
3
3
|
import tseslint from 'typescript-eslint';
|
|
4
|
-
import json from '@eslint/json';
|
|
5
|
-
import markdown from '@eslint/markdown';
|
|
6
4
|
import { defineConfig } from 'eslint/config';
|
|
7
5
|
import * as ProduckRule from '@produck/eslint-rules';
|
|
8
6
|
|
|
@@ -14,19 +12,8 @@ export default defineConfig([
|
|
|
14
12
|
languageOptions: { globals: { ...globals.browser, ...globals.node } },
|
|
15
13
|
},
|
|
16
14
|
tseslint.configs.recommended,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
plugins: { json },
|
|
21
|
-
language: 'json/json',
|
|
22
|
-
extends: ['json/recommended'],
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
files: ['**/*.md'],
|
|
26
|
-
plugins: { markdown },
|
|
27
|
-
language: 'markdown/gfm',
|
|
28
|
-
extends: ['markdown/recommended'],
|
|
29
|
-
},
|
|
30
|
-
ProduckRule.config,
|
|
15
|
+
ProduckRule.config.ecma,
|
|
16
|
+
ProduckRule.config.json,
|
|
17
|
+
ProduckRule.config.markdown,
|
|
31
18
|
ProduckRule.excludeGitIgnore(import.meta.url),
|
|
32
19
|
]);
|
|
@@ -21,6 +21,12 @@ const TOOLING_BASELINE_CANDIDATE_PATHS = [
|
|
|
21
21
|
];
|
|
22
22
|
const ESLINT_RULES_PACKAGE_NAME = '@produck/eslint-rules';
|
|
23
23
|
const ESLINT_CONFIG_FILE = 'eslint.config.mjs';
|
|
24
|
+
const REQUIRED_ESLINT_ENTRIES = [
|
|
25
|
+
'ProduckRule.config.ecma',
|
|
26
|
+
'ProduckRule.config.json',
|
|
27
|
+
'ProduckRule.config.markdown',
|
|
28
|
+
'ProduckRule.excludeGitIgnore(import.meta.url)',
|
|
29
|
+
];
|
|
24
30
|
|
|
25
31
|
const REQUIRED_LINT_SCRIPT_KEY = 'produck:lint';
|
|
26
32
|
const REQUIRED_LINT_SCRIPT_VALUE = 'eslint --fix . --max-warnings=0';
|
|
@@ -169,7 +175,7 @@ function patchEslintConfig(existing) {
|
|
|
169
175
|
}
|
|
170
176
|
|
|
171
177
|
output =
|
|
172
|
-
`${output.slice(0, exportEnd)} ProduckRule.config,\n ProduckRule.excludeGitIgnore(import.meta.url),\n` +
|
|
178
|
+
`${output.slice(0, exportEnd)} ProduckRule.config.ecma,\n ProduckRule.config.json,\n ProduckRule.config.markdown,\n ProduckRule.excludeGitIgnore(import.meta.url),\n` +
|
|
173
179
|
output.slice(exportEnd);
|
|
174
180
|
|
|
175
181
|
if (!output.endsWith('\n')) {
|
|
@@ -235,8 +241,14 @@ export function runSyncLint(options) {
|
|
|
235
241
|
nextEslintConfigText = REQUIRED_ESLINT_CONFIG;
|
|
236
242
|
} else if (previousEslintConfig === REQUIRED_ESLINT_CONFIG) {
|
|
237
243
|
matchesRequiredEslintConfig = true;
|
|
238
|
-
} else if (
|
|
244
|
+
} else if (
|
|
245
|
+
previousEslintConfig.includes(ESLINT_RULES_PACKAGE_NAME) &&
|
|
246
|
+
REQUIRED_ESLINT_ENTRIES.every((e) => previousEslintConfig.includes(e))
|
|
247
|
+
) {
|
|
239
248
|
matchesRequiredEslintConfig = true;
|
|
249
|
+
} else if (previousEslintConfig.includes(ESLINT_RULES_PACKAGE_NAME)) {
|
|
250
|
+
eslintConfigAction = 'replaced';
|
|
251
|
+
nextEslintConfigText = REQUIRED_ESLINT_CONFIG;
|
|
240
252
|
} else {
|
|
241
253
|
const patched = patchEslintConfig(previousEslintConfig);
|
|
242
254
|
if (patched.ok) {
|
|
@@ -16,11 +16,16 @@ const LERNA_TEMPLATE_CANDIDATE_PATHS = [
|
|
|
16
16
|
];
|
|
17
17
|
|
|
18
18
|
const REQUIRED_PUBLISH_CHECK_SCRIPT_KEY = 'produck:publish:check';
|
|
19
|
-
const REQUIRED_PUBLISH_CHECK_SCRIPT_VALUE =
|
|
20
|
-
'npm run produck:install
|
|
19
|
+
const REQUIRED_PUBLISH_CHECK_SCRIPT_VALUE = [
|
|
20
|
+
'npm run produck:install',
|
|
21
|
+
'npm run produck:coverage',
|
|
22
|
+
'npm run produck:commit:check',
|
|
23
|
+
].join(' && ');
|
|
21
24
|
const REQUIRED_PUBLISH_SCRIPT_KEY = 'produck:publish';
|
|
22
|
-
const REQUIRED_PUBLISH_SCRIPT_VALUE =
|
|
23
|
-
'npm run produck:publish:check
|
|
25
|
+
const REQUIRED_PUBLISH_SCRIPT_VALUE = [
|
|
26
|
+
'npm run produck:publish:check',
|
|
27
|
+
'npm run publish --',
|
|
28
|
+
].join(' && ');
|
|
24
29
|
const REQUIRED_LERNA_VERSION_COMMIT_HOOKS = false;
|
|
25
30
|
|
|
26
31
|
export function printSyncPublishHelp() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@produck/agent-toolkit",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.2",
|
|
4
4
|
"description": "Central CLI toolkit for organization AI execution workflows",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
},
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@produck/eslint-rules": "^0.
|
|
32
|
+
"@produck/eslint-rules": "^0.4.0",
|
|
33
33
|
"c8": "11.0.0"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "aa9500630476fb423720f0b0056096e0e87e4c21"
|
|
36
36
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import js from '@eslint/js';
|
|
2
2
|
import globals from 'globals';
|
|
3
3
|
import tseslint from 'typescript-eslint';
|
|
4
|
-
import json from '@eslint/json';
|
|
5
|
-
import markdown from '@eslint/markdown';
|
|
6
4
|
import { defineConfig } from 'eslint/config';
|
|
7
5
|
import * as ProduckRule from '@produck/eslint-rules';
|
|
8
6
|
|
|
@@ -14,19 +12,8 @@ export default defineConfig([
|
|
|
14
12
|
languageOptions: { globals: { ...globals.browser, ...globals.node } },
|
|
15
13
|
},
|
|
16
14
|
tseslint.configs.recommended,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
plugins: { json },
|
|
21
|
-
language: 'json/json',
|
|
22
|
-
extends: ['json/recommended'],
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
files: ['**/*.md'],
|
|
26
|
-
plugins: { markdown },
|
|
27
|
-
language: 'markdown/gfm',
|
|
28
|
-
extends: ['markdown/recommended'],
|
|
29
|
-
},
|
|
30
|
-
ProduckRule.config,
|
|
15
|
+
ProduckRule.config.ecma,
|
|
16
|
+
ProduckRule.config.json,
|
|
17
|
+
ProduckRule.config.markdown,
|
|
31
18
|
ProduckRule.excludeGitIgnore(import.meta.url),
|
|
32
19
|
]);
|