@opengsd/gsd-core 1.3.1 → 1.4.0-rc.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/.claude-plugin/plugin.json +23 -0
- package/GEMINI.md +53 -0
- package/agents/gsd-advisor-researcher.md +1 -20
- package/agents/gsd-ai-researcher.md +2 -21
- package/agents/gsd-code-fixer.md +1 -1
- package/agents/gsd-code-reviewer.md +1 -1
- package/agents/gsd-domain-researcher.md +2 -21
- package/agents/gsd-eval-auditor.md +1 -1
- package/agents/gsd-eval-planner.md +1 -1
- package/agents/gsd-executor.md +1 -1
- package/agents/gsd-framework-selector.md +1 -1
- package/agents/gsd-nyquist-auditor.md +1 -1
- package/agents/gsd-pattern-mapper.md +1 -1
- package/agents/gsd-phase-researcher.md +92 -166
- package/agents/gsd-planner.md +9 -36
- package/agents/gsd-project-researcher.md +62 -141
- package/agents/gsd-security-auditor.md +1 -1
- package/agents/gsd-ui-auditor.md +1 -1
- package/agents/gsd-ui-checker.md +1 -1
- package/agents/gsd-ui-researcher.md +3 -22
- package/agents/gsd-user-profiler.md +1 -1
- package/agents/gsd-verifier.md +8 -2
- package/bin/install.js +1977 -339
- package/commands/gsd/autonomous.md +2 -0
- package/commands/gsd/execute-phase.md +2 -0
- package/commands/gsd/graphify.md +11 -6
- package/commands/gsd/import.md +6 -2
- package/commands/gsd/plan-phase.md +4 -2
- package/commands/gsd/progress.md +1 -0
- package/commands/gsd/stats.md +1 -0
- package/commands/gsd/update.md +3 -2
- package/gemini-extension.json +6 -0
- package/gsd-core/bin/check-latest-version.cjs +61 -6
- package/gsd-core/bin/gsd-tools.cjs +238 -32
- package/gsd-core/bin/lib/check-command-router.cjs +1 -0
- package/gsd-core/bin/lib/cli-exit.cjs +42 -0
- package/gsd-core/bin/lib/command-routing-hub.cjs +1 -1
- package/gsd-core/bin/lib/commands.cjs +5 -4
- package/gsd-core/bin/lib/config.cjs +28 -4
- package/gsd-core/bin/lib/core.cjs +72 -28
- package/gsd-core/bin/lib/graphify.cjs +2 -2
- package/gsd-core/bin/lib/init-command-router.cjs +2 -2
- package/gsd-core/bin/lib/init.cjs +19 -3
- package/gsd-core/bin/lib/install-profiles.cjs +58 -0
- package/gsd-core/bin/lib/installer-migration-report.cjs +3 -0
- package/gsd-core/bin/lib/installer-migrations/000-first-time-baseline.cjs +1 -1
- package/gsd-core/bin/lib/intel.cjs +3 -20
- package/gsd-core/bin/lib/package-legitimacy.cjs +368 -0
- package/gsd-core/bin/lib/phase.cjs +3 -3
- package/gsd-core/bin/lib/research-provider.cjs +137 -0
- package/gsd-core/bin/lib/research-store.cjs +167 -0
- package/gsd-core/bin/lib/roadmap-upgrade.cjs +4 -19
- package/gsd-core/bin/lib/runtime-artifact-layout.cjs +67 -9
- package/gsd-core/bin/lib/runtime-config-adapter-registry.cjs +56 -0
- package/gsd-core/bin/lib/runtime-homes.cjs +32 -11
- package/gsd-core/bin/lib/security.cjs +73 -0
- package/gsd-core/bin/lib/shell-command-projection.cjs +9 -0
- package/gsd-core/bin/lib/surface.cjs +54 -11
- package/gsd-core/bin/lib/validate.cjs +2 -2
- package/gsd-core/bin/lib/verification-command-router.cjs +31 -0
- package/gsd-core/bin/lib/verification.cjs +193 -0
- package/gsd-core/bin/lib/verify.cjs +2 -2
- package/gsd-core/bin/lib/workstream-inventory.cjs +1 -1
- package/gsd-core/bin/lib/worktree-base-ref.cjs +325 -0
- package/gsd-core/bin/lib/worktree-safety.cjs +31 -0
- package/gsd-core/bin/shared/config-schema.manifest.json +2 -1
- package/gsd-core/bin/verify-reapply-patches.cjs +8 -11
- package/gsd-core/references/planner-load-graph-context.md +36 -0
- package/gsd-core/references/planning-config.md +3 -1
- package/gsd-core/references/research-documentation-lookup.md +29 -0
- package/gsd-core/references/research-philosophy.md +29 -0
- package/gsd-core/references/research-verification-protocol.md +27 -0
- package/gsd-core/workflows/execute-phase.md +19 -8
- package/gsd-core/workflows/help/modes/full.md +4 -3
- package/gsd-core/workflows/ingest-docs.md +3 -2
- package/gsd-core/workflows/plan-phase.md +14 -10
- package/gsd-core/workflows/plan-review-convergence.md +3 -3
- package/gsd-core/workflows/review.md +24 -7
- package/gsd-core/workflows/ship.md +5 -8
- package/gsd-core/workflows/spec-phase.md +2 -1
- package/gsd-core/workflows/update.md +34 -6
- package/hooks/dist/gsd-config-reload.js +133 -0
- package/hooks/dist/gsd-context-monitor.js +1 -1
- package/hooks/dist/gsd-cursor-post-tool.js +75 -0
- package/hooks/dist/gsd-cursor-session-start.js +52 -0
- package/hooks/dist/gsd-workflow-guard.js +1 -0
- package/hooks/dist/gsd-worktree-path-guard.js +1 -1
- package/hooks/dist/managed-hooks-registry.cjs +3 -0
- package/hooks/gsd-config-reload.js +133 -0
- package/hooks/gsd-context-monitor.js +1 -1
- package/hooks/gsd-cursor-post-tool.js +75 -0
- package/hooks/gsd-cursor-session-start.js +52 -0
- package/hooks/gsd-workflow-guard.js +1 -0
- package/hooks/gsd-worktree-path-guard.js +1 -1
- package/hooks/hooks.json +69 -0
- package/hooks/managed-hooks-registry.cjs +3 -0
- package/package.json +8 -1
- package/scripts/affected-tests-lib.cjs +3 -2
- package/scripts/build-hooks.js +7 -0
- package/scripts/changeset/cli.cjs +226 -28
- package/scripts/changeset/lint.cjs +5 -4
- package/scripts/changeset/new.cjs +4 -4
- package/scripts/check-alias-drift.cjs +77 -71
- package/scripts/check-env.cjs +185 -179
- package/scripts/check-npm-integrity.cjs +115 -109
- package/scripts/ci-guard-runner.cjs +11 -5
- package/scripts/ci-prepare-test-scope.cjs +27 -22
- package/scripts/ci-rebase-check.cjs +46 -45
- package/scripts/ci-test-scope.cjs +126 -22
- package/scripts/diff-touches-shipped-paths.cjs +52 -44
- package/scripts/gen-inventory-manifest.cjs +38 -32
- package/scripts/gen-research-agents.cjs +276 -0
- package/scripts/issue-dedupe.cjs +278 -0
- package/scripts/lib/cli-exit.cjs +56 -0
- package/scripts/lint-command-contract.cjs +28 -22
- package/scripts/lint-descriptions.cjs +32 -28
- package/scripts/lint-docs-required.cjs +4 -4
- package/scripts/lint-legacy-dir-name.cjs +56 -52
- package/scripts/lint-pr-check-project-dir.cjs +3 -1
- package/scripts/lint-shell-command-projection-drift.cjs +27 -22
- package/scripts/lint-skill-deps.cjs +31 -26
- package/scripts/lint-test-file-count.allowlist.json +2 -0
- package/scripts/lint-test-file-count.cjs +5 -4
- package/scripts/mutation-matrix.cjs +6 -3
- package/scripts/prompt-injection-scan.sh +1 -1
- package/scripts/release-notes/discord-release-summary.cjs +373 -0
- package/scripts/release-notes/format-github-release-notes.cjs +8 -3
- package/scripts/release-tarball-smoke.cjs +6 -4
- package/scripts/research-profiles.cjs +149 -0
- package/scripts/run-affected-tests.cjs +2 -1
- package/scripts/run-cross-platform-tests.cjs +11 -7
- package/scripts/run-tests.cjs +8 -7
- package/scripts/strip-prose-atrefs.cjs +1 -1
- package/scripts/sync-manifest-versions.cjs +119 -0
- package/scripts/sync-runtime-launcher.cjs +0 -3
- package/scripts/verify-npm-publish.cjs +14 -26
package/scripts/run-tests.cjs
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
const { readdirSync, existsSync } = require('fs');
|
|
24
24
|
const { join } = require('path');
|
|
25
25
|
const { execFileSync } = require('child_process');
|
|
26
|
+
const { ExitError, runMain } = require('./lib/cli-exit.cjs');
|
|
26
27
|
|
|
27
28
|
const SUITES = ['all', 'unit', 'integration', 'install', 'security', 'slow'];
|
|
28
29
|
|
|
@@ -189,13 +190,13 @@ function main() {
|
|
|
189
190
|
if (parsed.error) {
|
|
190
191
|
console.error(`run-tests: ${parsed.error}`);
|
|
191
192
|
console.error(`Valid suites: ${SUITES.join(', ')}`);
|
|
192
|
-
|
|
193
|
+
throw new ExitError(2);
|
|
193
194
|
}
|
|
194
195
|
const suite = parsed.suite;
|
|
195
196
|
if (suite !== null && !SUITES.includes(suite)) {
|
|
196
197
|
console.error(`run-tests: unknown suite "${suite}"`);
|
|
197
198
|
console.error(`Valid suites: ${SUITES.join(', ')}`);
|
|
198
|
-
|
|
199
|
+
throw new ExitError(2);
|
|
199
200
|
}
|
|
200
201
|
|
|
201
202
|
const testDir = process.env.GSD_TEST_DIR
|
|
@@ -208,7 +209,7 @@ function main() {
|
|
|
208
209
|
|
|
209
210
|
if (allFiles.length === 0) {
|
|
210
211
|
console.error(`No test files found in ${testDir}`);
|
|
211
|
-
|
|
212
|
+
throw new ExitError(1);
|
|
212
213
|
}
|
|
213
214
|
|
|
214
215
|
let selectedNames;
|
|
@@ -216,7 +217,7 @@ function main() {
|
|
|
216
217
|
const explicit = selectExplicitFiles(allFiles, parsed.files, parsed.filesFrom);
|
|
217
218
|
if (explicit.error) {
|
|
218
219
|
console.error(`run-tests: ${explicit.error}`);
|
|
219
|
-
|
|
220
|
+
throw new ExitError(2);
|
|
220
221
|
}
|
|
221
222
|
selectedNames = explicit.files;
|
|
222
223
|
} else {
|
|
@@ -229,7 +230,7 @@ function main() {
|
|
|
229
230
|
// adversarial tests land) don't gate CI. CI consumers wanting strictness
|
|
230
231
|
// can grep stderr for "no tests in suite".
|
|
231
232
|
console.error(`run-tests: no tests in suite "${suite || 'all'}"`);
|
|
232
|
-
|
|
233
|
+
return 0;
|
|
233
234
|
}
|
|
234
235
|
|
|
235
236
|
// Build the gitignored bin/lib artifact if absent, before any test requires it.
|
|
@@ -304,11 +305,11 @@ function main() {
|
|
|
304
305
|
if (firstFailureExit === 0) firstFailureExit = code;
|
|
305
306
|
}
|
|
306
307
|
}
|
|
307
|
-
if (firstFailureExit !== 0)
|
|
308
|
+
if (firstFailureExit !== 0) return firstFailureExit;
|
|
308
309
|
}
|
|
309
310
|
|
|
310
311
|
if (require.main === module) {
|
|
311
|
-
main
|
|
312
|
+
runMain(main);
|
|
312
313
|
}
|
|
313
314
|
|
|
314
315
|
module.exports = { suiteOf };
|
|
@@ -30,7 +30,7 @@ const DRY_RUN = process.argv.includes('--dry-run');
|
|
|
30
30
|
const ROOT = path.join(__dirname, '..');
|
|
31
31
|
const COMMANDS_DIR = path.join(ROOT, 'commands', 'gsd');
|
|
32
32
|
|
|
33
|
-
const AT_PATH_PATTERN = /@(?:~|\$HOME)\/.+?gsd-core\/[^\s
|
|
33
|
+
const AT_PATH_PATTERN = /@(?:~|\$HOME)\/.+?gsd-core\/[^\s`)]+/;
|
|
34
34
|
const mkAtRe = () => new RegExp(AT_PATH_PATTERN.source, 'g');
|
|
35
35
|
|
|
36
36
|
function transformLine(line) {
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* sync-manifest-versions.cjs
|
|
6
|
+
*
|
|
7
|
+
* Stamps the package.json version into every runtime-integration manifest whose
|
|
8
|
+
* top-level `version` field MUST track the package version. Called automatically
|
|
9
|
+
* by the `version` npm lifecycle script so that `npm version X.Y.Z` keeps all
|
|
10
|
+
* registered manifests in sync.
|
|
11
|
+
*
|
|
12
|
+
* Usage:
|
|
13
|
+
* node scripts/sync-manifest-versions.cjs # stamp + report
|
|
14
|
+
* node scripts/sync-manifest-versions.cjs --stage # stamp + git-stage manifests
|
|
15
|
+
* node scripts/sync-manifest-versions.cjs --check # report drift, exit 1 if any
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const fs = require('fs');
|
|
19
|
+
const path = require('path');
|
|
20
|
+
const { execFileSync } = require('child_process');
|
|
21
|
+
|
|
22
|
+
const ROOT = path.resolve(__dirname, '..');
|
|
23
|
+
|
|
24
|
+
// Single source of truth: runtime-integration manifests whose top-level `version`
|
|
25
|
+
// MUST track package.json. Add a new manifest here so `npm version` keeps it in
|
|
26
|
+
// sync — the regression guard test (issue 844) fails if you forget.
|
|
27
|
+
const VERSIONED_MANIFESTS = [
|
|
28
|
+
'.claude-plugin/plugin.json',
|
|
29
|
+
'gemini-extension.json',
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
function readJson(p) {
|
|
33
|
+
return JSON.parse(fs.readFileSync(p, 'utf8'));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function getPackageVersion(root) {
|
|
37
|
+
const r = root || ROOT;
|
|
38
|
+
return readJson(path.join(r, 'package.json')).version;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Stamp `version` into each registered manifest, preserving field order and
|
|
42
|
+
// 2-space + trailing-newline formatting. Returns the list of changed rel paths.
|
|
43
|
+
function syncManifestVersions(opts) {
|
|
44
|
+
const root = (opts && opts.root) || ROOT;
|
|
45
|
+
const v = (opts && opts.version) != null ? opts.version : getPackageVersion(root);
|
|
46
|
+
const changed = [];
|
|
47
|
+
for (const rel of VERSIONED_MANIFESTS) {
|
|
48
|
+
const abs = path.join(root, rel);
|
|
49
|
+
const manifest = readJson(abs);
|
|
50
|
+
if (manifest.version !== v) {
|
|
51
|
+
manifest.version = v;
|
|
52
|
+
fs.writeFileSync(abs, JSON.stringify(manifest, null, 2) + '\n');
|
|
53
|
+
changed.push(rel);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return changed;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Registered manifests whose version != package version.
|
|
60
|
+
function findDrift(opts) {
|
|
61
|
+
const root = (opts && opts.root) || ROOT;
|
|
62
|
+
const v = (opts && opts.version) != null ? opts.version : getPackageVersion(root);
|
|
63
|
+
const drift = [];
|
|
64
|
+
for (const rel of VERSIONED_MANIFESTS) {
|
|
65
|
+
const found = readJson(path.join(root, rel)).version;
|
|
66
|
+
if (found !== v) drift.push({ manifest: rel, found, expected: v });
|
|
67
|
+
}
|
|
68
|
+
return drift;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Best-effort outside git; fail-closed inside a work tree so a release never
|
|
72
|
+
// ships a stale manifest that the working-tree test already accepted.
|
|
73
|
+
function stageManifests(opts) {
|
|
74
|
+
const root = (opts && opts.root) || ROOT;
|
|
75
|
+
let insideWorkTree = false;
|
|
76
|
+
try {
|
|
77
|
+
insideWorkTree = execFileSync('git', ['rev-parse', '--is-inside-work-tree'], {
|
|
78
|
+
cwd: root,
|
|
79
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
80
|
+
}).toString().trim() === 'true';
|
|
81
|
+
} catch {}
|
|
82
|
+
if (!insideWorkTree) {
|
|
83
|
+
console.warn('sync-manifest-versions: not a git work tree; skipping staging.');
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
try {
|
|
87
|
+
execFileSync('git', ['add', '--', ...VERSIONED_MANIFESTS], { cwd: root, stdio: ['ignore', 'ignore', 'pipe'] });
|
|
88
|
+
} catch (err) {
|
|
89
|
+
const detail = err && err.stderr ? err.stderr.toString().trim() : (err && err.message) || 'unknown error';
|
|
90
|
+
throw new Error(`sync-manifest-versions: failed to git-add manifests inside a work tree: ${detail}`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
module.exports = { VERSIONED_MANIFESTS, syncManifestVersions, findDrift, getPackageVersion, stageManifests };
|
|
95
|
+
|
|
96
|
+
if (require.main === module) {
|
|
97
|
+
const args = process.argv.slice(2);
|
|
98
|
+
const version = getPackageVersion();
|
|
99
|
+
if (args.includes('--check')) {
|
|
100
|
+
const drift = findDrift({ version });
|
|
101
|
+
if (drift.length) {
|
|
102
|
+
for (const d of drift) {
|
|
103
|
+
console.error('Manifest ' + d.manifest + ' version ' + d.found + ' != package.json ' + d.expected);
|
|
104
|
+
}
|
|
105
|
+
console.error('Run `node scripts/sync-manifest-versions.cjs` to fix.');
|
|
106
|
+
process.exitCode = 1;
|
|
107
|
+
} else {
|
|
108
|
+
console.log('All ' + VERSIONED_MANIFESTS.length + ' versioned manifests in sync at ' + version + '.');
|
|
109
|
+
}
|
|
110
|
+
} else {
|
|
111
|
+
const changed = syncManifestVersions({ version });
|
|
112
|
+
if (changed.length) {
|
|
113
|
+
console.log('Stamped ' + version + ' into: ' + changed.join(', '));
|
|
114
|
+
} else {
|
|
115
|
+
console.log('Versioned manifests already at ' + version + '.');
|
|
116
|
+
}
|
|
117
|
+
if (args.includes('--stage')) stageManifests();
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -96,9 +96,6 @@ function removeResolverLines(lines, preamble) {
|
|
|
96
96
|
const result = [];
|
|
97
97
|
let i = 0;
|
|
98
98
|
|
|
99
|
-
// Build a set of preamble lines for fast lookup (to strip previously-inserted preambles)
|
|
100
|
-
const preambleLineSet = new Set(preamble);
|
|
101
|
-
|
|
102
99
|
while (i < lines.length) {
|
|
103
100
|
const line = lines[i];
|
|
104
101
|
const trimmed = line.trim();
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
const cp = require('node:child_process');
|
|
11
|
+
const { ExitError, runMain } = require('./lib/cli-exit.cjs');
|
|
11
12
|
|
|
12
13
|
// ---- Constants ---------------------------------------------------------------
|
|
13
14
|
|
|
@@ -137,67 +138,57 @@ function parseArgs(argv) {
|
|
|
137
138
|
' --json emit structured JSON output\n' +
|
|
138
139
|
' --help, -h show this help\n'
|
|
139
140
|
);
|
|
140
|
-
|
|
141
|
+
throw new ExitError(0);
|
|
141
142
|
} else if (arg === '--package') {
|
|
142
143
|
const val = args.shift();
|
|
143
144
|
if (!val || val.startsWith('-')) {
|
|
144
|
-
|
|
145
|
-
process.exit(2);
|
|
145
|
+
throw new ExitError(2, 'error: --package requires a value');
|
|
146
146
|
}
|
|
147
147
|
opts.pkg = val;
|
|
148
148
|
} else if (arg === '--version') {
|
|
149
149
|
const val = args.shift();
|
|
150
150
|
if (!val || val.startsWith('-')) {
|
|
151
|
-
|
|
152
|
-
process.exit(2);
|
|
151
|
+
throw new ExitError(2, 'error: --version requires a value');
|
|
153
152
|
}
|
|
154
153
|
opts.version = val;
|
|
155
154
|
} else if (arg === '--dist-tag') {
|
|
156
155
|
const val = args.shift();
|
|
157
156
|
if (!val || val.startsWith('-')) {
|
|
158
|
-
|
|
159
|
-
process.exit(2);
|
|
157
|
+
throw new ExitError(2, 'error: --dist-tag requires a value');
|
|
160
158
|
}
|
|
161
159
|
opts.distTag = val;
|
|
162
160
|
} else if (arg === '--max-attempts') {
|
|
163
161
|
const val = args.shift();
|
|
164
162
|
if (!val || val.startsWith('-')) {
|
|
165
|
-
|
|
166
|
-
process.exit(2);
|
|
163
|
+
throw new ExitError(2, 'error: --max-attempts requires a value');
|
|
167
164
|
}
|
|
168
165
|
const n = parseInt(val, 10);
|
|
169
166
|
if (isNaN(n) || n < 1) {
|
|
170
|
-
|
|
171
|
-
process.exit(2);
|
|
167
|
+
throw new ExitError(2, 'error: --max-attempts must be a positive integer');
|
|
172
168
|
}
|
|
173
169
|
opts.maxAttempts = n;
|
|
174
170
|
} else if (arg === '--interval-ms') {
|
|
175
171
|
const val = args.shift();
|
|
176
172
|
if (!val || val.startsWith('-')) {
|
|
177
|
-
|
|
178
|
-
process.exit(2);
|
|
173
|
+
throw new ExitError(2, 'error: --interval-ms requires a value');
|
|
179
174
|
}
|
|
180
175
|
const n = parseInt(val, 10);
|
|
181
176
|
if (isNaN(n) || n < 0) {
|
|
182
|
-
|
|
183
|
-
process.exit(2);
|
|
177
|
+
throw new ExitError(2, 'error: --interval-ms must be a non-negative integer');
|
|
184
178
|
}
|
|
185
179
|
opts.intervalMs = n;
|
|
186
180
|
} else if (arg === '--json') {
|
|
187
181
|
opts.json = true;
|
|
188
182
|
} else {
|
|
189
|
-
|
|
190
|
-
process.exit(2);
|
|
183
|
+
throw new ExitError(2, `unknown argument: ${arg}`);
|
|
191
184
|
}
|
|
192
185
|
}
|
|
193
186
|
|
|
194
187
|
if (!opts.pkg) {
|
|
195
|
-
|
|
196
|
-
process.exit(2);
|
|
188
|
+
throw new ExitError(2, 'error: --package is required');
|
|
197
189
|
}
|
|
198
190
|
if (!opts.version) {
|
|
199
|
-
|
|
200
|
-
process.exit(2);
|
|
191
|
+
throw new ExitError(2, 'error: --version is required');
|
|
201
192
|
}
|
|
202
193
|
|
|
203
194
|
return opts;
|
|
@@ -237,16 +228,13 @@ async function main() {
|
|
|
237
228
|
}
|
|
238
229
|
}
|
|
239
230
|
|
|
240
|
-
|
|
231
|
+
return result.ok ? 0 : 1;
|
|
241
232
|
}
|
|
242
233
|
|
|
243
234
|
// ---- Guard -------------------------------------------------------------------
|
|
244
235
|
|
|
245
236
|
if (require.main === module) {
|
|
246
|
-
main
|
|
247
|
-
process.stderr.write(String((err && err.stack) || err) + '\n');
|
|
248
|
-
process.exit(1);
|
|
249
|
-
});
|
|
237
|
+
runMain(main);
|
|
250
238
|
}
|
|
251
239
|
|
|
252
240
|
module.exports = { verifyPublish, parseArgs, REASON, defaultFetchVersion, defaultFetchDistTag };
|