station-kit 1.0.1 → 1.0.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/dist/cli.js +14 -3
- package/dist/cli.js.map +1 -1
- package/package.json +7 -6
- package/src/cli.ts +14 -3
- package/tsconfig.next.json +18 -3
package/dist/cli.js
CHANGED
|
@@ -3,12 +3,23 @@
|
|
|
3
3
|
// (signals, broadcasts, configs) can be imported with full resolution.
|
|
4
4
|
import { execPath } from "node:process";
|
|
5
5
|
import { spawn } from "node:child_process";
|
|
6
|
-
import {
|
|
6
|
+
import { createRequire } from "node:module";
|
|
7
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
7
8
|
const MARKER = "__STATION_TSX_LOADED";
|
|
8
9
|
if (!process.env[MARKER]) {
|
|
9
|
-
//
|
|
10
|
+
// Resolve tsx from station-kit's own dependencies (not the user's project)
|
|
11
|
+
const require = createRequire(import.meta.url);
|
|
12
|
+
let tsxSpecifier;
|
|
13
|
+
try {
|
|
14
|
+
const tsxEntry = require.resolve("tsx");
|
|
15
|
+
tsxSpecifier = pathToFileURL(tsxEntry).href;
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
// Fallback: bare specifier (user may have tsx installed)
|
|
19
|
+
tsxSpecifier = "tsx";
|
|
20
|
+
}
|
|
10
21
|
const main = fileURLToPath(new URL("./cli-main.js", import.meta.url));
|
|
11
|
-
const child = spawn(execPath, ["--import",
|
|
22
|
+
const child = spawn(execPath, ["--import", tsxSpecifier, main], {
|
|
12
23
|
stdio: "inherit",
|
|
13
24
|
env: { ...process.env, [MARKER]: "1" },
|
|
14
25
|
});
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,8EAA8E;AAC9E,uEAAuE;AAEvE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,O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CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;IACpD,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;QACxB,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;QACzD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC;KAAM,CAAC;IACN,wCAAwC;IACxC,MAAM,MAAM,CAAC,eAAe,CAAC,CAAC;AAChC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "station-kit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Dashboard for station-signal — inspect and control signals and broadcasts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -14,12 +14,13 @@
|
|
|
14
14
|
"exports": {
|
|
15
15
|
".": {
|
|
16
16
|
"types": "./dist/index.d.ts",
|
|
17
|
-
"import": "./dist/index.js"
|
|
17
|
+
"import": "./dist/index.js",
|
|
18
|
+
"default": "./dist/index.js"
|
|
18
19
|
}
|
|
19
20
|
},
|
|
20
21
|
"peerDependencies": {
|
|
21
|
-
"station-signal": "1.0.
|
|
22
|
-
"station-broadcast": "1.0.
|
|
22
|
+
"station-signal": "1.0.2",
|
|
23
|
+
"station-broadcast": "1.0.2"
|
|
23
24
|
},
|
|
24
25
|
"dependencies": {
|
|
25
26
|
"hono": "^4",
|
|
@@ -38,8 +39,8 @@
|
|
|
38
39
|
"@types/react": "^19",
|
|
39
40
|
"@types/react-dom": "^19",
|
|
40
41
|
"@types/ws": "^8",
|
|
41
|
-
"station-
|
|
42
|
-
"station-
|
|
42
|
+
"station-signal": "1.0.2",
|
|
43
|
+
"station-broadcast": "1.0.2"
|
|
43
44
|
},
|
|
44
45
|
"scripts": {
|
|
45
46
|
"build": "tsc",
|
package/src/cli.ts
CHANGED
|
@@ -5,14 +5,25 @@
|
|
|
5
5
|
|
|
6
6
|
import { execPath } from "node:process";
|
|
7
7
|
import { spawn } from "node:child_process";
|
|
8
|
-
import {
|
|
8
|
+
import { createRequire } from "node:module";
|
|
9
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
9
10
|
|
|
10
11
|
const MARKER = "__STATION_TSX_LOADED";
|
|
11
12
|
|
|
12
13
|
if (!process.env[MARKER]) {
|
|
13
|
-
//
|
|
14
|
+
// Resolve tsx from station-kit's own dependencies (not the user's project)
|
|
15
|
+
const require = createRequire(import.meta.url);
|
|
16
|
+
let tsxSpecifier: string;
|
|
17
|
+
try {
|
|
18
|
+
const tsxEntry = require.resolve("tsx");
|
|
19
|
+
tsxSpecifier = pathToFileURL(tsxEntry).href;
|
|
20
|
+
} catch {
|
|
21
|
+
// Fallback: bare specifier (user may have tsx installed)
|
|
22
|
+
tsxSpecifier = "tsx";
|
|
23
|
+
}
|
|
24
|
+
|
|
14
25
|
const main = fileURLToPath(new URL("./cli-main.js", import.meta.url));
|
|
15
|
-
const child = spawn(execPath, ["--import",
|
|
26
|
+
const child = spawn(execPath, ["--import", tsxSpecifier, main], {
|
|
16
27
|
stdio: "inherit",
|
|
17
28
|
env: { ...process.env, [MARKER]: "1" },
|
|
18
29
|
});
|
package/tsconfig.next.json
CHANGED
|
@@ -1,13 +1,28 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": "../../tsconfig.base.json",
|
|
3
2
|
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
4
|
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"moduleResolution": "bundler",
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"allowSyntheticDefaultImports": true,
|
|
9
|
+
"strict": true,
|
|
10
|
+
"strictNullChecks": true,
|
|
11
|
+
"noImplicitAny": true,
|
|
12
|
+
"noUnusedLocals": false,
|
|
13
|
+
"noUnusedParameters": false,
|
|
14
|
+
"noFallthroughCasesInSwitch": true,
|
|
15
|
+
"forceConsistentCasingInFileNames": true,
|
|
16
|
+
"resolveJsonModule": true,
|
|
17
|
+
"declaration": true,
|
|
18
|
+
"declarationMap": true,
|
|
19
|
+
"sourceMap": true,
|
|
20
|
+
"skipLibCheck": true,
|
|
21
|
+
"isolatedModules": true,
|
|
5
22
|
"jsx": "preserve",
|
|
6
23
|
"noEmit": true,
|
|
7
24
|
"incremental": true,
|
|
8
25
|
"allowJs": true,
|
|
9
|
-
"noUnusedLocals": false,
|
|
10
|
-
"noUnusedParameters": false,
|
|
11
26
|
"plugins": [{ "name": "next" }]
|
|
12
27
|
},
|
|
13
28
|
"include": ["src/app", "next-env.d.ts", ".next/types/**/*.ts"],
|