@stacknext/cli 0.0.0-stage → 0.6.1

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 (103) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +41 -2
  3. package/dist/bin.d.ts +3 -0
  4. package/dist/bin.d.ts.map +1 -0
  5. package/dist/bin.js +4 -0
  6. package/dist/bin.js.map +1 -0
  7. package/dist/collector/server.d.ts +28 -0
  8. package/dist/collector/server.d.ts.map +1 -0
  9. package/dist/collector/server.js +1258 -0
  10. package/dist/collector/server.js.map +1 -0
  11. package/dist/collector/test-runs.d.ts +40 -0
  12. package/dist/collector/test-runs.d.ts.map +1 -0
  13. package/dist/collector/test-runs.js +153 -0
  14. package/dist/collector/test-runs.js.map +1 -0
  15. package/dist/commands/baseline.d.ts +25 -0
  16. package/dist/commands/baseline.d.ts.map +1 -0
  17. package/dist/commands/baseline.js +151 -0
  18. package/dist/commands/baseline.js.map +1 -0
  19. package/dist/commands/capture.d.ts +13 -0
  20. package/dist/commands/capture.d.ts.map +1 -0
  21. package/dist/commands/capture.js +277 -0
  22. package/dist/commands/capture.js.map +1 -0
  23. package/dist/commands/compare.d.ts +17 -0
  24. package/dist/commands/compare.d.ts.map +1 -0
  25. package/dist/commands/compare.js +95 -0
  26. package/dist/commands/compare.js.map +1 -0
  27. package/dist/commands/coverage.d.ts +9 -0
  28. package/dist/commands/coverage.d.ts.map +1 -0
  29. package/dist/commands/coverage.js +124 -0
  30. package/dist/commands/coverage.js.map +1 -0
  31. package/dist/commands/dev.d.ts +19 -0
  32. package/dist/commands/dev.d.ts.map +1 -0
  33. package/dist/commands/dev.js +296 -0
  34. package/dist/commands/dev.js.map +1 -0
  35. package/dist/commands/diagnose.d.ts +22 -0
  36. package/dist/commands/diagnose.d.ts.map +1 -0
  37. package/dist/commands/diagnose.js +235 -0
  38. package/dist/commands/diagnose.js.map +1 -0
  39. package/dist/commands/doctor.d.ts +7 -0
  40. package/dist/commands/doctor.d.ts.map +1 -0
  41. package/dist/commands/doctor.js +176 -0
  42. package/dist/commands/doctor.js.map +1 -0
  43. package/dist/commands/export.d.ts +9 -0
  44. package/dist/commands/export.d.ts.map +1 -0
  45. package/dist/commands/export.js +55 -0
  46. package/dist/commands/export.js.map +1 -0
  47. package/dist/commands/init.d.ts +11 -0
  48. package/dist/commands/init.d.ts.map +1 -0
  49. package/dist/commands/init.js +203 -0
  50. package/dist/commands/init.js.map +1 -0
  51. package/dist/commands/mcp.d.ts +12 -0
  52. package/dist/commands/mcp.d.ts.map +1 -0
  53. package/dist/commands/mcp.js +32 -0
  54. package/dist/commands/mcp.js.map +1 -0
  55. package/dist/commands/regression-shared.d.ts +12 -0
  56. package/dist/commands/regression-shared.d.ts.map +1 -0
  57. package/dist/commands/regression-shared.js +149 -0
  58. package/dist/commands/regression-shared.js.map +1 -0
  59. package/dist/commands/runs.d.ts +13 -0
  60. package/dist/commands/runs.d.ts.map +1 -0
  61. package/dist/commands/runs.js +85 -0
  62. package/dist/commands/runs.js.map +1 -0
  63. package/dist/commands/status.d.ts +7 -0
  64. package/dist/commands/status.d.ts.map +1 -0
  65. package/dist/commands/status.js +70 -0
  66. package/dist/commands/status.js.map +1 -0
  67. package/dist/commands/uninstall.d.ts +15 -0
  68. package/dist/commands/uninstall.d.ts.map +1 -0
  69. package/dist/commands/uninstall.js +209 -0
  70. package/dist/commands/uninstall.js.map +1 -0
  71. package/dist/http.d.ts +7 -0
  72. package/dist/http.d.ts.map +1 -0
  73. package/dist/http.js +54 -0
  74. package/dist/http.js.map +1 -0
  75. package/dist/index.d.ts +22 -0
  76. package/dist/index.d.ts.map +1 -0
  77. package/dist/index.js +22 -0
  78. package/dist/index.js.map +1 -0
  79. package/dist/output.d.ts +16 -0
  80. package/dist/output.d.ts.map +1 -0
  81. package/dist/output.js +60 -0
  82. package/dist/output.js.map +1 -0
  83. package/dist/program.d.ts +4 -0
  84. package/dist/program.d.ts.map +1 -0
  85. package/dist/program.js +54 -0
  86. package/dist/program.js.map +1 -0
  87. package/dist/project.d.ts +35 -0
  88. package/dist/project.d.ts.map +1 -0
  89. package/dist/project.js +169 -0
  90. package/dist/project.js.map +1 -0
  91. package/dist/runtime.d.ts +26 -0
  92. package/dist/runtime.d.ts.map +1 -0
  93. package/dist/runtime.js +89 -0
  94. package/dist/runtime.js.map +1 -0
  95. package/dist/session.d.ts +10 -0
  96. package/dist/session.d.ts.map +1 -0
  97. package/dist/session.js +23 -0
  98. package/dist/session.js.map +1 -0
  99. package/dist/version.d.ts +2 -0
  100. package/dist/version.d.ts.map +1 -0
  101. package/dist/version.js +2 -0
  102. package/dist/version.js.map +1 -0
  103. package/package.json +58 -3
@@ -0,0 +1,23 @@
1
+ import { readRuntimeState, isProcessAlive, removeRuntimeState } from './runtime.js';
2
+ export class NotRunningError extends Error {
3
+ constructor(message) {
4
+ super(message);
5
+ this.name = 'NotRunningError';
6
+ }
7
+ }
8
+ /**
9
+ * Returns runtime state only when the recorded process is still alive. Stale
10
+ * state is removed so the next `dev` run can start cleanly.
11
+ */
12
+ export async function requireRunningState(projectDir) {
13
+ const state = await readRuntimeState(projectDir);
14
+ if (!state) {
15
+ throw new NotRunningError('StackNext is not running for this project. Start it with "stacknext dev".');
16
+ }
17
+ if (!isProcessAlive(state.pid)) {
18
+ await removeRuntimeState(projectDir);
19
+ throw new NotRunningError('The recorded StackNext process is no longer running. Start it with "stacknext dev".');
20
+ }
21
+ return state;
22
+ }
23
+ //# sourceMappingURL=session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.js","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAGnF,MAAM,OAAO,eAAgB,SAAQ,KAAK;IACxC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAA;IAC/B,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,UAAkB;IAC1D,MAAM,KAAK,GAAG,MAAM,gBAAgB,CAAC,UAAU,CAAC,CAAA;IAChD,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,eAAe,CACvB,2EAA2E,CAC5E,CAAA;IACH,CAAC;IACD,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/B,MAAM,kBAAkB,CAAC,UAAU,CAAC,CAAA;QACpC,MAAM,IAAI,eAAe,CACvB,qFAAqF,CACtF,CAAA;IACH,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const CLI_VERSION = "0.6.1";
2
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,UAAU,CAAA"}
@@ -0,0 +1,2 @@
1
+ export const CLI_VERSION = '0.6.1';
2
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,61 @@
1
1
  {
2
2
  "name": "@stacknext/cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.6.1",
4
+ "description": "Local-first runtime debugging, diagnostics and Playwright regression testing for Next.js",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "bin": {
8
+ "stacknext": "./dist/bin.js"
9
+ },
10
+ "files": [
11
+ "dist"
12
+ ],
13
+ "main": "./dist/index.js",
14
+ "types": "./dist/index.d.ts",
15
+ "exports": {
16
+ ".": {
17
+ "types": "./dist/index.d.ts",
18
+ "import": "./dist/index.js",
19
+ "default": "./dist/index.js"
20
+ },
21
+ "./package.json": "./package.json"
22
+ },
23
+ "dependencies": {
24
+ "@stacknext/core": "0.6.1",
25
+ "@stacknext/dashboard": "0.6.1",
26
+ "@stacknext/diagnostics": "0.6.1",
27
+ "@stacknext/mcp": "0.6.1",
28
+ "@stacknext/regression": "0.6.1",
29
+ "commander": "14.0.3",
30
+ "zod": "4.6.7"
31
+ },
32
+ "engines": {
33
+ "node": ">=20.9.0"
34
+ },
35
+ "author": "StackNext contributors",
36
+ "homepage": "https://github.com/marrrkkk/stacknext#readme",
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "git+https://github.com/marrrkkk/stacknext.git",
40
+ "directory": "packages/cli"
41
+ },
42
+ "bugs": {
43
+ "url": "https://github.com/marrrkkk/stacknext/issues"
44
+ },
45
+ "keywords": [
46
+ "stacknext",
47
+ "nextjs",
48
+ "cli",
49
+ "opentelemetry",
50
+ "debugging",
51
+ "regression-testing",
52
+ "local-first"
53
+ ],
54
+ "publishConfig": {
55
+ "access": "public"
56
+ },
57
+ "scripts": {
58
+ "build": "tsc -p tsconfig.build.json",
59
+ "typecheck": "tsc -p tsconfig.json --noEmit"
60
+ }
6
61
  }