@rsaglobaltech/specgate 0.17.4 → 0.17.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.
Files changed (33) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/README.md +33 -33
  3. package/dist/packages/core/src/domain/DoneVerification.js +2 -2
  4. package/dist/packages/core/src/domain/DoneVerification.js.map +1 -1
  5. package/dist/packages/core/src/domain/ResumeState.js +23 -4
  6. package/dist/packages/core/src/domain/ResumeState.js.map +1 -1
  7. package/dist/packages/core/src/domain/SpecSections.js +24 -0
  8. package/dist/packages/core/src/domain/SpecSections.js.map +1 -1
  9. package/dist/packages/core/src/domain/WriteScope.js +42 -8
  10. package/dist/packages/core/src/domain/WriteScope.js.map +1 -1
  11. package/dist/packages/core/src/infrastructure/HarnessConfigFile.js +29 -0
  12. package/dist/packages/core/src/infrastructure/HarnessConfigFile.js.map +1 -1
  13. package/dist/packages/core/test/unit/spec-sections.test.js +12 -0
  14. package/dist/packages/core/test/unit/spec-sections.test.js.map +1 -1
  15. package/dist/packages/core/test/unit/write-scope-status.test.js +4 -0
  16. package/dist/packages/core/test/unit/write-scope-status.test.js.map +1 -1
  17. package/dist/scripts/cli/commands/config/ConfigSetCommand.js +42 -2
  18. package/dist/scripts/cli/commands/config/ConfigSetCommand.js.map +1 -1
  19. package/dist/scripts/cli/commands/harness/RunCommand.js +3 -5
  20. package/dist/scripts/cli/commands/harness/RunCommand.js.map +1 -1
  21. package/dist/scripts/cli/commands/project/InitProjectCommand.js +1 -1
  22. package/dist/scripts/cli/commands/project/InitProjectCommand.js.map +1 -1
  23. package/dist/scripts/cli/commands/quality/CheckCommand.js +1 -1
  24. package/dist/scripts/cli/commands/quality/CheckCommand.js.map +1 -1
  25. package/dist/scripts/cli/commands/quality/ValidateSpecsCommand.js +74 -0
  26. package/dist/scripts/cli/commands/quality/ValidateSpecsCommand.js.map +1 -1
  27. package/dist/scripts/docs/nav.js +10 -0
  28. package/dist/scripts/docs/nav.js.map +1 -1
  29. package/dist/scripts/lib/deadline-runner.js +43 -0
  30. package/dist/scripts/lib/deadline-runner.js.map +1 -0
  31. package/dist/scripts/lib/run-with-deadline.js +63 -0
  32. package/dist/scripts/lib/run-with-deadline.js.map +1 -0
  33. package/package.json +1 -1
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.runWithDeadline = runWithDeadline;
37
+ /**
38
+ * `spawnSync` for an agent command whose time limit holds (#66): the command
39
+ * runs under `deadline-runner`, which kills its whole process group at the
40
+ * deadline. Same result shape as `spawnSync`, with `error.code === "ETIMEDOUT"`
41
+ * on timeout so callers keep branching on what they already branch on.
42
+ */
43
+ const path = __importStar(require("node:path"));
44
+ const node_child_process_1 = require("node:child_process");
45
+ const RUNNER = path.join(__dirname, "deadline-runner.js");
46
+ function runWithDeadline(command, opts) {
47
+ const r = (0, node_child_process_1.spawnSync)(process.execPath, [RUNNER], {
48
+ cwd: opts.cwd,
49
+ encoding: "utf8",
50
+ maxBuffer: opts.maxBuffer,
51
+ stdio: ["ignore", "pipe", "pipe"],
52
+ env: { ...process.env, HARNESS_CMD: command, HARNESS_DEADLINE_MS: String(opts.timeoutMs) },
53
+ // A backstop only: the runner kills the group at the deadline itself.
54
+ timeout: opts.timeoutMs + 30_000,
55
+ killSignal: "SIGKILL",
56
+ });
57
+ if (r.status === 124 && !r.error) {
58
+ const error = Object.assign(new Error("spawnSync ETIMEDOUT"), { code: "ETIMEDOUT" });
59
+ return { ...r, error };
60
+ }
61
+ return r;
62
+ }
63
+ //# sourceMappingURL=run-with-deadline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-with-deadline.js","sourceRoot":"","sources":["../../../scripts/lib/run-with-deadline.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,0CAmBC;AA9BD;;;;;GAKG;AACH,gDAAkC;AAClC,2DAAiE;AAEjE,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;AAE1D,SAAgB,eAAe,CAC7B,OAAe,EACf,IAA2D;IAE3D,MAAM,CAAC,GAAG,IAAA,8BAAS,EAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,EAAE;QAC9C,GAAG,EAAE,IAAI,CAAC,GAAG;QACb,QAAQ,EAAE,MAAM;QAChB,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC;QACjC,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;QAC1F,sEAAsE;QACtE,OAAO,EAAE,IAAI,CAAC,SAAS,GAAG,MAAM;QAChC,UAAU,EAAE,SAAS;KACtB,CAAC,CAAC;IACH,IAAI,CAAC,CAAC,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;QACjC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,qBAAqB,CAAC,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;QACrF,OAAO,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC;IACzB,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsaglobaltech/specgate",
3
- "version": "0.17.4",
3
+ "version": "0.17.6",
4
4
  "description": "Specs as executable contracts — requirements, scenarios and traceability that CI enforces.",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",