@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.
- package/LICENSE +21 -0
- package/README.md +41 -2
- package/dist/bin.d.ts +3 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +4 -0
- package/dist/bin.js.map +1 -0
- package/dist/collector/server.d.ts +28 -0
- package/dist/collector/server.d.ts.map +1 -0
- package/dist/collector/server.js +1258 -0
- package/dist/collector/server.js.map +1 -0
- package/dist/collector/test-runs.d.ts +40 -0
- package/dist/collector/test-runs.d.ts.map +1 -0
- package/dist/collector/test-runs.js +153 -0
- package/dist/collector/test-runs.js.map +1 -0
- package/dist/commands/baseline.d.ts +25 -0
- package/dist/commands/baseline.d.ts.map +1 -0
- package/dist/commands/baseline.js +151 -0
- package/dist/commands/baseline.js.map +1 -0
- package/dist/commands/capture.d.ts +13 -0
- package/dist/commands/capture.d.ts.map +1 -0
- package/dist/commands/capture.js +277 -0
- package/dist/commands/capture.js.map +1 -0
- package/dist/commands/compare.d.ts +17 -0
- package/dist/commands/compare.d.ts.map +1 -0
- package/dist/commands/compare.js +95 -0
- package/dist/commands/compare.js.map +1 -0
- package/dist/commands/coverage.d.ts +9 -0
- package/dist/commands/coverage.d.ts.map +1 -0
- package/dist/commands/coverage.js +124 -0
- package/dist/commands/coverage.js.map +1 -0
- package/dist/commands/dev.d.ts +19 -0
- package/dist/commands/dev.d.ts.map +1 -0
- package/dist/commands/dev.js +296 -0
- package/dist/commands/dev.js.map +1 -0
- package/dist/commands/diagnose.d.ts +22 -0
- package/dist/commands/diagnose.d.ts.map +1 -0
- package/dist/commands/diagnose.js +235 -0
- package/dist/commands/diagnose.js.map +1 -0
- package/dist/commands/doctor.d.ts +7 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +176 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/export.d.ts +9 -0
- package/dist/commands/export.d.ts.map +1 -0
- package/dist/commands/export.js +55 -0
- package/dist/commands/export.js.map +1 -0
- package/dist/commands/init.d.ts +11 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +203 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/mcp.d.ts +12 -0
- package/dist/commands/mcp.d.ts.map +1 -0
- package/dist/commands/mcp.js +32 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/commands/regression-shared.d.ts +12 -0
- package/dist/commands/regression-shared.d.ts.map +1 -0
- package/dist/commands/regression-shared.js +149 -0
- package/dist/commands/regression-shared.js.map +1 -0
- package/dist/commands/runs.d.ts +13 -0
- package/dist/commands/runs.d.ts.map +1 -0
- package/dist/commands/runs.js +85 -0
- package/dist/commands/runs.js.map +1 -0
- package/dist/commands/status.d.ts +7 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +70 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/uninstall.d.ts +15 -0
- package/dist/commands/uninstall.d.ts.map +1 -0
- package/dist/commands/uninstall.js +209 -0
- package/dist/commands/uninstall.js.map +1 -0
- package/dist/http.d.ts +7 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +54 -0
- package/dist/http.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/output.d.ts +16 -0
- package/dist/output.d.ts.map +1 -0
- package/dist/output.js +60 -0
- package/dist/output.js.map +1 -0
- package/dist/program.d.ts +4 -0
- package/dist/program.d.ts.map +1 -0
- package/dist/program.js +54 -0
- package/dist/program.js.map +1 -0
- package/dist/project.d.ts +35 -0
- package/dist/project.d.ts.map +1 -0
- package/dist/project.js +169 -0
- package/dist/project.js.map +1 -0
- package/dist/runtime.d.ts +26 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +89 -0
- package/dist/runtime.js.map +1 -0
- package/dist/session.d.ts +10 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +23 -0
- package/dist/session.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +2 -0
- package/dist/version.js.map +1 -0
- package/package.json +58 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 StackNext contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,42 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @stacknext/cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Local-first runtime debugging, diagnostics and Playwright regression testing for
|
|
4
|
+
Next.js App Router apps and AI coding agents.
|
|
5
|
+
|
|
6
|
+
StackNext collects OpenTelemetry spans plus Drizzle/Prisma query events and
|
|
7
|
+
Next.js errors over loopback, stores them in a bounded in-memory sample, and
|
|
8
|
+
exposes a dashboard, CLI and read-only MCP server. It also derives deterministic
|
|
9
|
+
diagnostic findings and compares Playwright-linked runtime captures against
|
|
10
|
+
saved baselines. No cloud account, hosted backend, AI API key or telemetry
|
|
11
|
+
upload.
|
|
12
|
+
|
|
13
|
+
## Quick start
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install --save-dev @stacknext/cli @stacknext/next
|
|
17
|
+
npx stacknext init
|
|
18
|
+
npx stacknext doctor
|
|
19
|
+
npx stacknext dev
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
`init` detects Next.js 15/16 with the App Router, writes
|
|
23
|
+
`stacknext.config.json`, and creates `instrumentation.ts` (or
|
|
24
|
+
`instrumentation.js` for a JavaScript project) only when none exists. Existing
|
|
25
|
+
instrumentation is preserved and a manual hook is printed.
|
|
26
|
+
`dev` starts the loopback collector and the app's own `dev` script.
|
|
27
|
+
|
|
28
|
+
Add `@stacknext/drizzle`, `@stacknext/prisma`, or `@stacknext/playwright` only
|
|
29
|
+
when you use those integrations.
|
|
30
|
+
|
|
31
|
+
## Requirements
|
|
32
|
+
|
|
33
|
+
- Node.js 20.9 or newer
|
|
34
|
+
- Next.js 15 or 16, App Router, Node.js runtime
|
|
35
|
+
- Playwright 1.40+ for runtime regression capture
|
|
36
|
+
|
|
37
|
+
Next.js Edge runtime and the Pages Router are not supported. The package is
|
|
38
|
+
ESM-only. See the [project README](https://github.com/marrrkkk/stacknext#readme),
|
|
39
|
+
[getting started](https://github.com/marrrkkk/stacknext/blob/main/docs/getting-started.md)
|
|
40
|
+
and [compatibility matrix](https://github.com/marrrkkk/stacknext/blob/main/docs/compatibility.md).
|
|
41
|
+
|
|
42
|
+
License: MIT.
|
package/dist/bin.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":""}
|
package/dist/bin.js
ADDED
package/dist/bin.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAEnC,MAAM,IAAI,EAAE,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { TelemetryStore, type HealthResponse, type NextOtelVerboseStatus, type StackNextConfig } from '@stacknext/core';
|
|
2
|
+
export interface StartCollectorOptions {
|
|
3
|
+
port: number;
|
|
4
|
+
token: string;
|
|
5
|
+
projectName: string;
|
|
6
|
+
config: StackNextConfig;
|
|
7
|
+
dashboardDir: string | null;
|
|
8
|
+
version?: string;
|
|
9
|
+
host?: string;
|
|
10
|
+
log?: (message: string) => void;
|
|
11
|
+
autoPort?: boolean;
|
|
12
|
+
sseHeartbeatMs?: number;
|
|
13
|
+
/** Project whose saved runs, baselines and comparisons are served read-only. */
|
|
14
|
+
projectDir?: string;
|
|
15
|
+
/** Overrides environment/config inference, mainly for tests and `stacknext dev`. */
|
|
16
|
+
nextOtelVerbose?: NextOtelVerboseStatus;
|
|
17
|
+
}
|
|
18
|
+
export interface CollectorHandle {
|
|
19
|
+
port: number;
|
|
20
|
+
url: string;
|
|
21
|
+
token: string;
|
|
22
|
+
store: TelemetryStore;
|
|
23
|
+
health: () => HealthResponse;
|
|
24
|
+
close: () => Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
export declare function resolveDashboardDir(): Promise<string>;
|
|
27
|
+
export declare function startCollector(options: StartCollectorOptions): Promise<CollectorHandle>;
|
|
28
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/collector/server.ts"],"names":[],"mappings":"AAOA,OAAO,EAKL,cAAc,EAkBd,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EAYrB,MAAM,iBAAiB,CAAA;AAoCxB,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,eAAe,CAAA;IACvB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,gFAAgF;IAChF,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,oFAAoF;IACpF,eAAe,CAAC,EAAE,qBAAqB,CAAA;CACxC;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,cAAc,CAAA;IACrB,MAAM,EAAE,MAAM,cAAc,CAAA;IAC5B,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC3B;AAoSD,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,MAAM,CAAC,CA2B3D;AAoBD,wBAAsB,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,eAAe,CAAC,CA+gC7F"}
|