@su-sws/synthetic-web-team 0.2.5 → 0.2.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@su-sws/synthetic-web-team",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "Stanford Web Services standards and agent team: policy, patterns, recipes, fragments, prior art, 31 skills, the two-part install wizard, and the advisory compliance CLI.",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "repository": {
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "scripts": {
11
11
  "sync-skills": "node scripts/sync-skills.mjs",
12
- "validate": "node scripts/validate-skills.mjs && node scripts/validate-emit.mjs && node scripts/validate-install.mjs && node scripts/validate-criteria.mjs && node scripts/validate-state-classifier.mjs && node scripts/validate-hooks.mjs && node scripts/validate-acknowledged.mjs && node scripts/validate-layouts.mjs && node scripts/validate-divergences.mjs && node scripts/validate-frameworks.mjs && node scripts/validate-contained.mjs",
12
+ "validate": "node scripts/validate-skills.mjs && node scripts/validate-emit.mjs && node scripts/validate-install.mjs && node scripts/validate-criteria.mjs && node scripts/validate-state-classifier.mjs && node scripts/validate-hooks.mjs && node scripts/validate-acknowledged.mjs && node scripts/validate-layouts.mjs && node scripts/validate-divergences.mjs && node scripts/validate-frameworks.mjs && node scripts/validate-contained.mjs && node scripts/validate-packed.mjs",
13
13
  "check": "npm run validate && npm run sync-skills -- --check",
14
14
  "pack:all": "mkdir -p .pack && npm pack --pack-destination ./.pack && npm pack -w @su-sws/synthetic-web-team-mcp --pack-destination ./.pack"
15
15
  },
@@ -34,6 +34,15 @@ import { readInstalled } from '../../wizard/src/emit.mjs';
34
34
 
35
35
  const HERE = dirname(fileURLToPath(import.meta.url));
36
36
 
37
+ // The version of the published package, @su-sws/synthetic-web-team, from its
38
+ // root package.json, which ships. packages/cli/package.json is a workspace
39
+ // manifest the package does not include, so reading it crashed `sws version`
40
+ // in every install while passing in this repository.
41
+ const OWN_VERSION = (() => {
42
+ try { return JSON.parse(readFileSync(resolve(HERE, '..', '..', '..', 'package.json'), 'utf8')).version; }
43
+ catch { return null; }
44
+ })();
45
+
37
46
  // `standards/` ships in the same package as this file (@su-sws/synthetic-web-team), so the
38
47
  // relative walk below finds it in both the published layout and this
39
48
  // repository. There used to be an `import('@su-sws/standards')` fallback here;
@@ -437,10 +446,7 @@ async function run() {
437
446
  // it carries. No network call, no registry lookup.
438
447
  if (cmd === 'doctor') {
439
448
  const installed = readInstalled(root);
440
- const mine = (() => {
441
- try { return JSON.parse(readFileSync(resolve(HERE, '..', '..', '..', 'package.json'), 'utf8')).version; }
442
- catch { return null; }
443
- })();
449
+ const mine = OWN_VERSION;
444
450
  if (installed?.version && mine && installed.version !== mine) {
445
451
  note(` Standards in this project are v${installed.version}; this tool carries v${mine}.`);
446
452
  note(` To update: npx @su-sws/synthetic-web-team add .`);
@@ -762,7 +768,11 @@ switch (cmd) {
762
768
  process.exit(0);
763
769
  break;
764
770
  case 'version':
765
- console.log(JSON.parse(readFileSync(join(HERE, '..', 'package.json'), 'utf8')).version);
771
+ if (!OWN_VERSION) {
772
+ console.error('sws: could not read the version of @su-sws/synthetic-web-team');
773
+ process.exit(1);
774
+ }
775
+ console.log(OWN_VERSION);
766
776
  process.exit(0);
767
777
  break;
768
778
  default: