skybridge 0.0.0-dev.fe3d450 → 0.0.0-dev.fe48ef8
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/README.md +17 -8
- package/dist/cli/detect-port.d.ts +18 -0
- package/dist/cli/detect-port.js +61 -0
- package/dist/cli/detect-port.js.map +1 -0
- package/dist/cli/header.js +1 -1
- package/dist/cli/header.js.map +1 -1
- package/dist/cli/types.d.ts +5 -0
- package/dist/cli/types.js +2 -0
- package/dist/cli/types.js.map +1 -0
- package/dist/cli/use-messages.d.ts +3 -0
- package/dist/cli/use-messages.js +11 -0
- package/dist/cli/use-messages.js.map +1 -0
- package/dist/cli/use-nodemon.d.ts +2 -6
- package/dist/cli/use-nodemon.js +20 -17
- package/dist/cli/use-nodemon.js.map +1 -1
- package/dist/cli/use-tunnel.d.ts +14 -0
- package/dist/cli/use-tunnel.js +97 -0
- package/dist/cli/use-tunnel.js.map +1 -0
- package/dist/commands/build.js +1 -1
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/dev.d.ts +3 -1
- package/dist/commands/dev.js +25 -7
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/start.d.ts +3 -1
- package/dist/commands/start.js +36 -15
- package/dist/commands/start.js.map +1 -1
- package/dist/server/asset-base-url-transform-plugin.d.ts +5 -6
- package/dist/server/asset-base-url-transform-plugin.js +8 -9
- package/dist/server/asset-base-url-transform-plugin.js.map +1 -1
- package/dist/server/asset-base-url-transform-plugin.test.js +12 -13
- package/dist/server/asset-base-url-transform-plugin.test.js.map +1 -1
- package/dist/server/express.d.ts +15 -0
- package/dist/server/express.js +77 -0
- package/dist/server/express.js.map +1 -0
- package/dist/server/express.test.d.ts +1 -0
- package/dist/server/express.test.js +252 -0
- package/dist/server/express.test.js.map +1 -0
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js.map +1 -1
- package/dist/server/metric.d.ts +14 -0
- package/dist/server/metric.js +62 -0
- package/dist/server/metric.js.map +1 -0
- package/dist/server/middleware.d.ts +124 -0
- package/dist/server/middleware.js +93 -0
- package/dist/server/middleware.js.map +1 -0
- package/dist/server/middleware.test-d.d.ts +1 -0
- package/dist/server/middleware.test-d.js +75 -0
- package/dist/server/middleware.test-d.js.map +1 -0
- package/dist/server/middleware.test.d.ts +1 -0
- package/dist/server/middleware.test.js +490 -0
- package/dist/server/middleware.test.js.map +1 -0
- package/dist/server/server.d.ts +52 -1
- package/dist/server/server.js +179 -13
- package/dist/server/server.js.map +1 -1
- package/dist/server/templates/development.hbs +0 -53
- package/dist/server/widgetsDevServer.d.ts +2 -1
- package/dist/server/widgetsDevServer.js +5 -5
- package/dist/server/widgetsDevServer.js.map +1 -1
- package/dist/test/utils.d.ts +5 -1
- package/dist/test/utils.js +3 -2
- package/dist/test/utils.js.map +1 -1
- package/dist/test/widget.test.js +98 -19
- package/dist/test/widget.test.js.map +1 -1
- package/dist/version.d.ts +1 -0
- package/dist/version.js +5 -0
- package/dist/version.js.map +1 -0
- package/dist/web/bridges/apps-sdk/adaptor.d.ts +7 -5
- package/dist/web/bridges/apps-sdk/adaptor.js +39 -16
- package/dist/web/bridges/apps-sdk/adaptor.js.map +1 -1
- package/dist/web/bridges/apps-sdk/bridge.d.ts +1 -1
- package/dist/web/bridges/apps-sdk/index.d.ts +1 -1
- package/dist/web/bridges/apps-sdk/index.js.map +1 -1
- package/dist/web/bridges/apps-sdk/types.d.ts +24 -13
- package/dist/web/bridges/apps-sdk/types.js.map +1 -1
- package/dist/web/bridges/mcp-app/adaptor.d.ts +16 -4
- package/dist/web/bridges/mcp-app/adaptor.js +121 -38
- package/dist/web/bridges/mcp-app/adaptor.js.map +1 -1
- package/dist/web/bridges/mcp-app/bridge.d.ts +13 -30
- package/dist/web/bridges/mcp-app/bridge.js +43 -196
- package/dist/web/bridges/mcp-app/bridge.js.map +1 -1
- package/dist/web/bridges/mcp-app/use-mcp-app-context.d.ts +5 -3
- package/dist/web/bridges/mcp-app/use-mcp-app-context.js +2 -2
- package/dist/web/bridges/mcp-app/use-mcp-app-context.js.map +1 -1
- package/dist/web/bridges/mcp-app/use-mcp-app-context.test.js +1 -41
- package/dist/web/bridges/mcp-app/use-mcp-app-context.test.js.map +1 -1
- package/dist/web/bridges/types.d.ts +15 -4
- package/dist/web/components/modal-provider.js +2 -4
- package/dist/web/components/modal-provider.js.map +1 -1
- package/dist/web/create-store.js +15 -1
- package/dist/web/create-store.js.map +1 -1
- package/dist/web/create-store.test.js +9 -4
- package/dist/web/create-store.test.js.map +1 -1
- package/dist/web/data-llm.test.js +11 -8
- package/dist/web/data-llm.test.js.map +1 -1
- package/dist/web/hooks/index.d.ts +1 -1
- package/dist/web/hooks/index.js.map +1 -1
- package/dist/web/hooks/test/utils.js +4 -0
- package/dist/web/hooks/test/utils.js.map +1 -1
- package/dist/web/hooks/use-display-mode.d.ts +3 -3
- package/dist/web/hooks/use-display-mode.js.map +1 -1
- package/dist/web/hooks/use-display-mode.test-d.d.ts +1 -0
- package/dist/web/hooks/use-display-mode.test-d.js +8 -0
- package/dist/web/hooks/use-display-mode.test-d.js.map +1 -0
- package/dist/web/hooks/use-files.d.ts +2 -1
- package/dist/web/hooks/use-files.js +1 -0
- package/dist/web/hooks/use-files.js.map +1 -1
- package/dist/web/hooks/use-files.test.js +27 -3
- package/dist/web/hooks/use-files.test.js.map +1 -1
- package/dist/web/hooks/use-layout.test.js +3 -3
- package/dist/web/hooks/use-layout.test.js.map +1 -1
- package/dist/web/hooks/use-open-external.d.ts +3 -1
- package/dist/web/hooks/use-open-external.js +1 -1
- package/dist/web/hooks/use-open-external.js.map +1 -1
- package/dist/web/hooks/use-open-external.test.js +26 -11
- package/dist/web/hooks/use-open-external.test.js.map +1 -1
- package/dist/web/hooks/use-request-modal.test.js +5 -1
- package/dist/web/hooks/use-request-modal.test.js.map +1 -1
- package/dist/web/hooks/use-set-open-in-app-url.test.js +5 -11
- package/dist/web/hooks/use-set-open-in-app-url.test.js.map +1 -1
- package/dist/web/hooks/use-tool-info.test.js +1 -1
- package/dist/web/hooks/use-tool-info.test.js.map +1 -1
- package/dist/web/hooks/use-user.js +18 -2
- package/dist/web/hooks/use-user.js.map +1 -1
- package/dist/web/hooks/use-user.test.js +29 -1
- package/dist/web/hooks/use-user.test.js.map +1 -1
- package/dist/web/hooks/use-widget-state.test.js +123 -7
- package/dist/web/hooks/use-widget-state.test.js.map +1 -1
- package/dist/web/plugin/plugin.js +17 -9
- package/dist/web/plugin/plugin.js.map +1 -1
- package/dist/web/plugin/transform-data-llm.js +1 -1
- package/dist/web/plugin/transform-data-llm.js.map +1 -1
- package/dist/web/plugin/validate-widget.d.ts +5 -0
- package/dist/web/plugin/validate-widget.js +27 -0
- package/dist/web/plugin/validate-widget.js.map +1 -0
- package/dist/web/plugin/validate-widget.test.d.ts +1 -0
- package/dist/web/plugin/validate-widget.test.js +42 -0
- package/dist/web/plugin/validate-widget.test.js.map +1 -0
- package/dist/web/proxy.js +0 -1
- package/dist/web/proxy.js.map +1 -1
- package/package.json +30 -25
- package/tsconfig.base.json +31 -0
package/README.md
CHANGED
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
<br />
|
|
6
6
|
|
|
7
|
-
# Skybridge
|
|
8
|
-
|
|
9
7
|
**Build ChatGPT & MCP Apps. The Modern TypeScript Way.**
|
|
10
8
|
|
|
11
9
|
The fullstack TypeScript framework for AI-embedded widgets.<br />
|
|
@@ -33,9 +31,9 @@ ChatGPT Apps and MCP Apps let you embed **rich, interactive UIs** directly in AI
|
|
|
33
31
|
|
|
34
32
|
| | |
|
|
35
33
|
|:--|:--|
|
|
36
|
-
|
|
|
34
|
+
| 🌐 **Write once, run everywhere** — Skybridge works seamlessly with ChatGPT (Apps SDK) and MCP-compatible clients. | ✅ **End-to-End Type Safety** — tRPC-style inference from server to widget. Autocomplete everywhere. |
|
|
37
35
|
| 🔄 **Widget-to-Model Sync** — Keep the model aware of UI state with `data-llm`. Dual surfaces, one source of truth. | ⚒️ **React Query-style Hooks** — `isPending`, `isError`, callbacks. State management you already know. |
|
|
38
|
-
|
|
|
36
|
+
| 👨💻 **Full dev environment** — HMR, debug traces, and local devtools. | 📦 **Showcase Examples** — Production-ready examples to learn from and build upon. |
|
|
39
37
|
|
|
40
38
|
<br />
|
|
41
39
|
|
|
@@ -120,10 +118,21 @@ Explore production-ready examples:
|
|
|
120
118
|
|
|
121
119
|
| Example | Description | Demo | Code |
|
|
122
120
|
|------------------------|----------------------------------------------------------------------------------|-----------------------------------------------------|-------------------------------------------------------------------------------------|
|
|
123
|
-
| **
|
|
124
|
-
| **
|
|
125
|
-
| **
|
|
126
|
-
| **
|
|
121
|
+
| **Awaze — Cottage Search** | Holiday cottage search and booking experience — browse properties, filter by location, and explore availability | [Try Demo](https://mcp.cottages.com/try) | — |
|
|
122
|
+
| **Capitals Explorer** | Interactive world map with geolocation and Wikipedia integration | [Try Demo](https://capitals.skybridge.tech/try) | [View Code](https://github.com/alpic-ai/skybridge/tree/main/examples/capitals) |
|
|
123
|
+
| **Ecommerce Carousel** | Product carousel with cart, localization, and modals | [Try Demo](https://ecommerce.skybridge.tech/try) | [View Code](https://github.com/alpic-ai/skybridge/tree/main/examples/ecom-carousel) |
|
|
124
|
+
| **Everything** | Comprehensive playground showcasing all hooks and features | [Try Demo](https://everything.skybridge.tech/try) | [View Code](https://github.com/alpic-ai/skybridge/tree/main/examples/everything) |
|
|
125
|
+
| **Investigation Game** | Interactive murder mystery game with multi-screen gameplay and dynamic story progression | [Try Demo](https://investigation-game.skybridge.tech/try) | [View Code](https://github.com/alpic-ai/skybridge/tree/main/examples/investigation-game) |
|
|
126
|
+
| **Productivity** | Data visualization dashboard demonstrating Skybridge capabilities for MCP Apps | [Try Demo](https://productivity.skybridge.tech/try) | [View Code](https://github.com/alpic-ai/skybridge/tree/main/examples/productivity) |
|
|
127
|
+
| **Time's Up** | Word-guessing party game where the user gives hints and the AI tries to guess the secret word | [Try Demo](https://times-up.skybridge.tech/try) | [View Code](https://github.com/alpic-ai/skybridge/tree/main/examples/times-up) |
|
|
128
|
+
| **Lumo — Interactive AI Tutor** | Adaptive educational tutor with Mermaid.js diagrams, mind maps, quizzes, and fill-in-the-blank exercises | [Try Demo](https://lumo-mcp-app-39519fdd.alpic.live/try) | [View Code](https://github.com/connorads/lumo-mcp-app) |
|
|
129
|
+
| **Auth — Auth0** | Full OAuth authentication with Auth0 and personalized coffee shop search | — | [View Code](https://github.com/alpic-ai/skybridge/tree/main/examples/auth-auth0) |
|
|
130
|
+
| **Auth — Clerk** | Full OAuth authentication with Clerk and personalized coffee shop search | — | [View Code](https://github.com/alpic-ai/skybridge/tree/main/examples/auth-clerk) |
|
|
131
|
+
| **Auth — Stytch** | Full OAuth authentication with Stytch and personalized coffee shop search | — | [View Code](https://github.com/alpic-ai/skybridge/tree/main/examples/auth-stytch) |
|
|
132
|
+
| **Auth — WorkOS AuthKit** | Full OAuth authentication with WorkOS AuthKit and personalized coffee shop search | — | [View Code](https://github.com/alpic-ai/skybridge/tree/main/examples/auth-workos) |
|
|
133
|
+
| **Flight Booking** | Flight booking carousel with dynamic search and booking flow | [Try Demo](https://flight-booking.skybridge.tech/try) | [View Code](https://github.com/alpic-ai/skybridge/tree/main/examples/flight-booking) |
|
|
134
|
+
| **Generative UI** | Dynamic UI generation using json-render and Skybridge | [Try Demo](https://generative-ui.skybridge.tech/try) | [View Code](https://github.com/alpic-ai/skybridge/tree/main/examples/generative-ui) |
|
|
135
|
+
| **Manifest Starter** | Starter app with Manifest UI agentic components out-of-the-box | [Try Demo](https://manifest-ui.skybridge.tech/try) | [View Code](https://github.com/alpic-ai/skybridge/tree/main/examples/manifest-ui) |
|
|
127
136
|
|
|
128
137
|
See all examples in the [Showcase](https://docs.skybridge.tech/showcase) or browse the [examples/](examples/) directory.
|
|
129
138
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare function resolvePort(flagPort?: number): Promise<{
|
|
2
|
+
port: number;
|
|
3
|
+
fallback: boolean;
|
|
4
|
+
envWarning?: undefined;
|
|
5
|
+
} | {
|
|
6
|
+
port: number;
|
|
7
|
+
fallback: boolean;
|
|
8
|
+
envWarning: string;
|
|
9
|
+
}>;
|
|
10
|
+
/**
|
|
11
|
+
* Returns the given port if available, otherwise lets the OS
|
|
12
|
+
* pick a free port via `listen(0)`.
|
|
13
|
+
*
|
|
14
|
+
* @param host - Bind address for the check. Pass `"localhost"` for
|
|
15
|
+
* services that bind to 127.0.0.1 (e.g. Vite HMR). Omit for
|
|
16
|
+
* services that bind to all interfaces (e.g. the HTTP server).
|
|
17
|
+
*/
|
|
18
|
+
export declare function detectAvailablePort(startPort: number, host?: string): Promise<number>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import net from "node:net";
|
|
2
|
+
const DEFAULT_PORT = 3000;
|
|
3
|
+
export async function resolvePort(flagPort) {
|
|
4
|
+
if (flagPort && flagPort > 1) {
|
|
5
|
+
return { port: flagPort, fallback: false };
|
|
6
|
+
}
|
|
7
|
+
const rawEnv = process.env.PORT;
|
|
8
|
+
if (rawEnv) {
|
|
9
|
+
const parsed = Number(rawEnv);
|
|
10
|
+
if (Number.isInteger(parsed) && parsed > 0) {
|
|
11
|
+
return { port: parsed, fallback: false };
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
port: await detectAvailablePort(DEFAULT_PORT),
|
|
15
|
+
fallback: false,
|
|
16
|
+
envWarning: `Invalid PORT="${rawEnv}", ignoring and using default`,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
const port = await detectAvailablePort(DEFAULT_PORT);
|
|
20
|
+
return { port, fallback: port !== DEFAULT_PORT };
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Returns the given port if available, otherwise lets the OS
|
|
24
|
+
* pick a free port via `listen(0)`.
|
|
25
|
+
*
|
|
26
|
+
* @param host - Bind address for the check. Pass `"localhost"` for
|
|
27
|
+
* services that bind to 127.0.0.1 (e.g. Vite HMR). Omit for
|
|
28
|
+
* services that bind to all interfaces (e.g. the HTTP server).
|
|
29
|
+
*/
|
|
30
|
+
export async function detectAvailablePort(startPort, host) {
|
|
31
|
+
const available = await isPortAvailable(startPort, host);
|
|
32
|
+
if (available) {
|
|
33
|
+
return startPort;
|
|
34
|
+
}
|
|
35
|
+
return new Promise((resolve, reject) => {
|
|
36
|
+
const server = net.createServer();
|
|
37
|
+
server.once("error", reject);
|
|
38
|
+
server.once("listening", () => {
|
|
39
|
+
const addr = server.address();
|
|
40
|
+
if (addr && typeof addr === "object") {
|
|
41
|
+
const { port } = addr;
|
|
42
|
+
server.close(() => resolve(port));
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
server.close(() => reject(new Error("Failed to detect available port")));
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
server.listen(0, host);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function isPortAvailable(port, host) {
|
|
52
|
+
return new Promise((resolve) => {
|
|
53
|
+
const server = net.createServer();
|
|
54
|
+
server.once("error", () => resolve(false));
|
|
55
|
+
server.once("listening", () => {
|
|
56
|
+
server.close(() => resolve(true));
|
|
57
|
+
});
|
|
58
|
+
server.listen(port, host);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=detect-port.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detect-port.js","sourceRoot":"","sources":["../../src/cli/detect-port.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,UAAU,CAAC;AAE3B,MAAM,YAAY,GAAG,IAAI,CAAC;AAE1B,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,QAAiB;IACjD,IAAI,QAAQ,IAAI,QAAQ,GAAG,CAAC,EAAE,CAAC;QAC7B,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC7C,CAAC;IAED,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;IAChC,I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,CAAC,CAAC,CAAC;YACpC,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAChB,MAAM,CAAC,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC,CACrD,CAAC;YACJ,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,eAAe,CAAC,IAAY,EAAE,IAAa;IAClD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,MAAM,MAAM,GAAG,GAAG,CAAC,YAAY,EAAE,CAAC;QAElC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;QAC3C,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE;YAC5B,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/cli/header.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Text } from "ink";
|
|
3
3
|
export const Header = ({ version, children, }) => {
|
|
4
|
-
return (_jsxs(Box, { marginBottom: 1, children: [_jsxs(Text, { color: "cyan", bold: true, children: ["\u26F0", " ", "
|
|
4
|
+
return (_jsxs(Box, { marginBottom: 1, children: [_jsxs(Text, { color: "cyan", bold: true, children: ["\u26F0", " ", "Skybridge"] }), _jsxs(Text, { color: "cyan", children: [" v", version] }), children] }));
|
|
5
5
|
};
|
|
6
6
|
//# sourceMappingURL=header.js.map
|
package/dist/cli/header.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.js","sourceRoot":"","sources":["../../src/cli/header.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhC,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EACrB,OAAO,EACP,QAAQ,GAIT,EAAE,EAAE;IACH,OAAO,CACL,MAAC,GAAG,IAAC,YAAY,EAAE,CAAC,aAClB,MAAC,IAAI,IAAC,KAAK,EAAC,MAAM,EAAC,IAAI,6BACnB,IAAI,
|
|
1
|
+
{"version":3,"file":"header.js","sourceRoot":"","sources":["../../src/cli/header.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhC,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EACrB,OAAO,EACP,QAAQ,GAIT,EAAE,EAAE;IACH,OAAO,CACL,MAAC,GAAG,IAAC,YAAY,EAAE,CAAC,aAClB,MAAC,IAAI,IAAC,KAAK,EAAC,MAAM,EAAC,IAAI,6BACnB,IAAI,iBACD,EACP,MAAC,IAAI,IAAC,KAAK,EAAC,MAAM,mBAAI,OAAO,IAAQ,EACpC,QAAQ,IACL,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/cli/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { useCallback, useState } from "react";
|
|
3
|
+
const MAX_MESSAGES = 10;
|
|
4
|
+
export function useMessages() {
|
|
5
|
+
const [messages, setMessages] = useState([]);
|
|
6
|
+
const push = useCallback((text, type) => {
|
|
7
|
+
setMessages((prev) => [...prev, { id: randomUUID(), text, type }].slice(-MAX_MESSAGES));
|
|
8
|
+
}, []);
|
|
9
|
+
return [messages, push];
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=use-messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-messages.js","sourceRoot":"","sources":["../../src/cli/use-messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG9C,MAAM,YAAY,GAAG,EAAE,CAAC;AAIxB,MAAM,UAAU,WAAW;IACzB,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAiB,EAAE,CAAC,CAAC;IAE7D,MAAM,IAAI,GAAG,WAAW,CAAc,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE;QACnD,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE,CACnB,CAAC,GAAG,IAAI,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CACjE,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
3
|
-
type: "log" | "restart" | "error";
|
|
4
|
-
};
|
|
5
|
-
export declare function useNodemon(env: NodeJS.ProcessEnv): Array<Message>;
|
|
6
|
-
export {};
|
|
1
|
+
import type { PushMessage } from "./use-messages.js";
|
|
2
|
+
export declare function useNodemon(env: NodeJS.ProcessEnv, pushMessage: PushMessage): void;
|
package/dist/cli/use-nodemon.js
CHANGED
|
@@ -1,24 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
import nodemonOriginal from "nodemon";
|
|
4
|
+
import { useEffect } from "react";
|
|
3
5
|
const nodemon = nodemonOriginal;
|
|
4
|
-
export function useNodemon(env) {
|
|
5
|
-
const [messages, setMessages] = useState([]);
|
|
6
|
+
export function useNodemon(env, pushMessage) {
|
|
6
7
|
useEffect(() => {
|
|
7
|
-
nodemon
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
const configFile = resolve(process.cwd(), "nodemon.json");
|
|
9
|
+
const config = existsSync(configFile)
|
|
10
|
+
? {
|
|
11
|
+
configFile,
|
|
12
|
+
}
|
|
13
|
+
: {
|
|
14
|
+
watch: ["server/src"],
|
|
15
|
+
ext: "ts,json",
|
|
16
|
+
exec: "tsx server/src/index.ts",
|
|
17
|
+
};
|
|
18
|
+
nodemon({ ...config, env, stdout: false });
|
|
12
19
|
const handleStdoutData = (chunk) => {
|
|
13
20
|
const message = chunk.toString().trim();
|
|
14
21
|
if (message) {
|
|
15
|
-
|
|
22
|
+
pushMessage(message, "log");
|
|
16
23
|
}
|
|
17
24
|
};
|
|
18
25
|
const handleStderrData = (chunk) => {
|
|
19
26
|
const message = chunk.toString().trim();
|
|
20
27
|
if (message) {
|
|
21
|
-
|
|
28
|
+
pushMessage(message, "error");
|
|
22
29
|
}
|
|
23
30
|
};
|
|
24
31
|
const setupStdoutListener = () => {
|
|
@@ -39,10 +46,7 @@ export function useNodemon(env) {
|
|
|
39
46
|
});
|
|
40
47
|
nodemon.on("restart", (files) => {
|
|
41
48
|
const restartMessage = `Server restarted due to file changes: ${files.join(", ")}`;
|
|
42
|
-
|
|
43
|
-
...prev,
|
|
44
|
-
{ text: restartMessage, type: "restart" },
|
|
45
|
-
]);
|
|
49
|
+
pushMessage(restartMessage, "restart");
|
|
46
50
|
setupStdoutListener();
|
|
47
51
|
setupStderrListener();
|
|
48
52
|
});
|
|
@@ -55,7 +59,6 @@ export function useNodemon(env) {
|
|
|
55
59
|
}
|
|
56
60
|
nodemon.emit("quit");
|
|
57
61
|
};
|
|
58
|
-
}, [env]);
|
|
59
|
-
return messages;
|
|
62
|
+
}, [env, pushMessage]);
|
|
60
63
|
}
|
|
61
64
|
//# sourceMappingURL=use-nodemon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-nodemon.js","sourceRoot":"","sources":["../../src/cli/use-nodemon.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"use-nodemon.js","sourceRoot":"","sources":["../../src/cli/use-nodemon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,eAAe,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIlC,MAAM,OAAO,GAAG,eAAkC,CAAC;AAEnD,MAAM,UAAU,UAAU,CACxB,GAAsB,EACtB,WAAwB;IAExB,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC,CAAC;QAE1D,MAAM,MAAM,GAAG,UAAU,CAAC,UAAU,CAAC;YACnC,CAAC,CAAC;gBACE,UAAU;aACX;YACH,CAAC,CAAC;gBACE,KAAK,EAAE,CAAC,YAAY,CAAC;gBACrB,GAAG,EAAE,SAAS;gBACd,IAAI,EAAE,yBAAyB;aAChC,CAAC;QAEN,OAAO,CAAC,EAAE,GAAG,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;QAE3C,MAAM,gBAAgB,GAAG,CAAC,KAAa,EAAE,EAAE;YACzC,MAAM,OAAO,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC;YACxC,IAAI,OAAO,EAAE,CAAC;gBACZ,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;YAC9B,CAAC;QACH,CAAC,CAAC;QAEF,MAAM,gB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AC,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;YAC/C,CAAC;YACD,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;gBACnB,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;YAC/C,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PushMessage } from "./use-messages.js";
|
|
2
|
+
export type TunnelState = {
|
|
3
|
+
status: "idle";
|
|
4
|
+
} | {
|
|
5
|
+
status: "starting";
|
|
6
|
+
message: string;
|
|
7
|
+
} | {
|
|
8
|
+
status: "connected";
|
|
9
|
+
url: string;
|
|
10
|
+
} | {
|
|
11
|
+
status: "error";
|
|
12
|
+
message: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function useTunnel(port: number | null, pushMessage: PushMessage, verbose: boolean): TunnelState;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
export function useTunnel(port, pushMessage, verbose) {
|
|
4
|
+
const [state, setState] = useState(port === null
|
|
5
|
+
? { status: "idle" }
|
|
6
|
+
: { status: "starting", message: "Starting tunnel…" });
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
if (port === null) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
const tunnelProcess = spawn("npx", ["--yes", "alpic", "tunnel", "--port", String(port), "--plain"], {
|
|
12
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
13
|
+
});
|
|
14
|
+
let stderrBuffer = "";
|
|
15
|
+
let connected = false;
|
|
16
|
+
const timeout = setTimeout(() => {
|
|
17
|
+
if (!connected) {
|
|
18
|
+
setState({
|
|
19
|
+
status: "error",
|
|
20
|
+
message: "Tunnel connection timed out after one minute",
|
|
21
|
+
});
|
|
22
|
+
tunnelProcess.kill();
|
|
23
|
+
}
|
|
24
|
+
}, 60_000);
|
|
25
|
+
const pushLog = (text, type) => {
|
|
26
|
+
const time = new Date().toLocaleTimeString("en-US", {
|
|
27
|
+
hour: "numeric",
|
|
28
|
+
minute: "2-digit",
|
|
29
|
+
second: "2-digit",
|
|
30
|
+
hour12: true,
|
|
31
|
+
});
|
|
32
|
+
pushMessage(`${time} [tunnel] ${text}`, type);
|
|
33
|
+
};
|
|
34
|
+
const handleStdout = (data) => {
|
|
35
|
+
const lines = data.toString().trim().split("\n").filter(Boolean);
|
|
36
|
+
for (const line of lines) {
|
|
37
|
+
if (connected) {
|
|
38
|
+
if (verbose) {
|
|
39
|
+
pushLog(line, "log");
|
|
40
|
+
}
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
const match = line.match(/Forwarding:\s+(https:\/\/\S+)\s*->\s*(\S+)/);
|
|
44
|
+
if (match?.[1]) {
|
|
45
|
+
connected = true;
|
|
46
|
+
clearTimeout(timeout);
|
|
47
|
+
const url = match[1].replace(/\/$/, "");
|
|
48
|
+
setState({ status: "connected", url });
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
setState({ status: "starting", message: line });
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
const handleStderr = (data) => {
|
|
56
|
+
const text = data.toString().trim();
|
|
57
|
+
if (!text) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
stderrBuffer = (stderrBuffer + text).slice(-1024);
|
|
61
|
+
if (verbose && connected) {
|
|
62
|
+
for (const line of text.split("\n").filter(Boolean)) {
|
|
63
|
+
pushLog(line, "error");
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
if (tunnelProcess.stdout) {
|
|
68
|
+
tunnelProcess.stdout.on("data", handleStdout);
|
|
69
|
+
}
|
|
70
|
+
if (tunnelProcess.stderr) {
|
|
71
|
+
tunnelProcess.stderr.on("data", handleStderr);
|
|
72
|
+
}
|
|
73
|
+
tunnelProcess.on("error", (err) => {
|
|
74
|
+
clearTimeout(timeout);
|
|
75
|
+
setState({ status: "error", message: err.message });
|
|
76
|
+
});
|
|
77
|
+
tunnelProcess.on("close", (code) => {
|
|
78
|
+
clearTimeout(timeout);
|
|
79
|
+
if (code !== 0 && code !== null) {
|
|
80
|
+
const detail = stderrBuffer.trim() || `exited with code ${code}`;
|
|
81
|
+
const hint = verbose
|
|
82
|
+
? `Try manually: npx alpic tunnel --port ${port}`
|
|
83
|
+
: "Re-run with --verbose to see full tunnel logs";
|
|
84
|
+
setState({
|
|
85
|
+
status: "error",
|
|
86
|
+
message: `${detail}. ${hint}`,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
return () => {
|
|
91
|
+
clearTimeout(timeout);
|
|
92
|
+
tunnelProcess.kill();
|
|
93
|
+
};
|
|
94
|
+
}, [port, pushMessage, verbose]);
|
|
95
|
+
return state;
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=use-tunnel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-tunnel.js","sourceRoot":"","sources":["../../src/cli/use-tunnel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAS5C,MAAM,UAAU,SAAS,CACvB,IAAmB,EACnB,WAAwB,EACxB,OAAgB;IAEhB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAChC,IAAI,KAAK,IAAI;QACX,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE;QACpB,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,kBAAkB,EAAE,CACxD,CAAC;IA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
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"
|
|
6
|
+
port: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
|
+
tunnel: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
9
|
};
|
|
8
10
|
run(): Promise<void>;
|
|
9
11
|
}
|
package/dist/commands/dev.js
CHANGED
|
@@ -1,29 +1,47 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Command, Flags } from "@oclif/core";
|
|
3
3
|
import { Box, render, Text } from "ink";
|
|
4
|
+
import { resolvePort } from "../cli/detect-port.js";
|
|
4
5
|
import { Header } from "../cli/header.js";
|
|
6
|
+
import { useMessages } from "../cli/use-messages.js";
|
|
5
7
|
import { useNodemon } from "../cli/use-nodemon.js";
|
|
8
|
+
import { useTunnel } from "../cli/use-tunnel.js";
|
|
6
9
|
import { useTypeScriptCheck } from "../cli/use-typescript-check.js";
|
|
7
10
|
export default class Dev extends Command {
|
|
8
11
|
static description = "Start development server";
|
|
9
12
|
static examples = ["skybridge"];
|
|
10
13
|
static flags = {
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
port: Flags.integer({
|
|
15
|
+
char: "p",
|
|
16
|
+
description: "Port to run the server on",
|
|
17
|
+
min: 1,
|
|
18
|
+
}),
|
|
19
|
+
tunnel: Flags.boolean({
|
|
20
|
+
description: "Open an Alpic tunnel for remote testing",
|
|
21
|
+
default: false,
|
|
22
|
+
}),
|
|
23
|
+
verbose: Flags.boolean({
|
|
24
|
+
char: "v",
|
|
25
|
+
description: "Show tunnel logs",
|
|
26
|
+
default: false,
|
|
13
27
|
}),
|
|
14
28
|
};
|
|
15
29
|
async run() {
|
|
16
30
|
const { flags } = await this.parse(Dev);
|
|
31
|
+
const { port, fallback, envWarning } = await resolvePort(flags.port);
|
|
32
|
+
if (envWarning) {
|
|
33
|
+
this.warn(envWarning);
|
|
34
|
+
}
|
|
17
35
|
const env = {
|
|
18
36
|
...process.env,
|
|
19
|
-
|
|
20
|
-
? { SKYBRIDGE_USE_FORWARDED_HOST: "true" }
|
|
21
|
-
: {}),
|
|
37
|
+
__PORT: String(port),
|
|
22
38
|
};
|
|
23
39
|
const App = () => {
|
|
24
40
|
const tsErrors = useTypeScriptCheck();
|
|
25
|
-
const messages =
|
|
26
|
-
|
|
41
|
+
const [messages, pushMessage] = useMessages();
|
|
42
|
+
useNodemon(env, pushMessage);
|
|
43
|
+
const tunnelState = useTunnel(flags.tunnel ? port : null, pushMessage, flags.verbose);
|
|
44
|
+
return (_jsxs(Box, { flexDirection: "column", padding: 1, marginLeft: 1, children: [_jsx(Header, { version: this.config.version }), _jsxs(Box, { children: [_jsxs(Text, { children: ["\uD83C\uDFE0", " "] }), fallback ? (_jsx(Text, { color: "yellow", children: "3000 in use, running on " })) : (_jsx(Text, { children: "Running on " })), _jsx(Text, { color: "green", children: `http://localhost:${port}/mcp` })] }), _jsxs(Box, { marginBottom: 1, children: [_jsxs(Text, { color: "#20a832", children: ["\u2192", " "] }), _jsxs(Text, { color: "white", bold: true, children: ["Test locally with DevTools:", " "] }), _jsx(Text, { color: "green", children: `http://localhost:${port}/` })] }), tunnelState.status === "idle" && (_jsxs(Box, { children: [_jsxs(Text, { children: ["\uD83C\uDF0D", " "] }), _jsx(Text, { children: "Get a public URL and LLM Playground access with " }), _jsx(Text, { color: "cyan", bold: true, children: "--tunnel" }), _jsx(Text, { children: "." })] })), tunnelState.status === "starting" && (_jsxs(Box, { children: [_jsxs(Text, { children: ["\uD83C\uDF0D", " "] }), _jsx(Text, { color: "yellow", children: tunnelState.message })] })), tunnelState.status === "connected" && (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsxs(Box, { children: [_jsxs(Text, { children: ["\uD83C\uDF0D", " "] }), _jsx(Text, { children: "Exposed on " }), _jsx(Text, { color: "green", children: `${tunnelState.url}/mcp` })] }), _jsxs(Box, { children: [_jsxs(Text, { color: "#20a832", children: ["\u2192", " "] }), _jsxs(Text, { color: "white", bold: true, children: ["Test with an LLM on Playground:", " "] }), _jsx(Text, { color: "green", children: `${tunnelState.url}/try` })] })] })), tunnelState.status === "error" && (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsxs(Box, { children: [_jsxs(Text, { children: ["\uD83C\uDF0D", " "] }), _jsxs(Text, { color: "red", children: ["Cannot open tunnel: ", tunnelState.message] })] }), _jsxs(Box, { children: [_jsxs(Text, { color: "#20a832", children: ["\u2192", " "] }), _jsx(Text, { color: "red", children: `Try manually: npx alpic tunnel --port ${port}` })] })] })), _jsxs(Box, { children: [_jsxs(Text, { children: ["\uD83D\uDEDF", " "] }), _jsx(Text, { children: "Need help? Reach us on " }), _jsx(Text, { color: "white", underline: true, children: "https://discord.alpic.ai" })] }), tsErrors.length > 0 && (_jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { color: "red", bold: true, children: "\u26A0\uFE0F TypeScript errors found:" }), tsErrors.map((error) => (_jsxs(Box, { marginLeft: 2, flexDirection: "column", children: [_jsxs(Box, { children: [_jsx(Text, { color: "white", children: error.file }), _jsxs(Text, { color: "grey", children: ["(", error.line, ",", error.col, "):", " "] })] }), _jsx(Box, { marginLeft: 2, children: _jsx(Text, { color: "red", children: error.message }) })] }, `${error.file}:${error.line}:${error.col}`)))] })), messages.length > 0 && (_jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { color: "white", bold: true, children: "Logs:" }), messages.map((message) => (_jsx(Box, { marginLeft: 2, children: message.type === "restart" ? (_jsxs(_Fragment, { children: [_jsxs(Text, { color: "green", children: ["\u2713", " "] }), _jsx(Text, { color: "white", children: message.text })] })) : message.type === "error" ? (_jsx(Text, { color: "red", children: message.text })) : (_jsx(Text, { children: message.text })) }, message.id)))] }))] }));
|
|
27
45
|
};
|
|
28
46
|
render(_jsx(App, {}), { exitOnCtrlC: true, patchConsole: true });
|
|
29
47
|
}
|
package/dist/commands/dev.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.js","sourceRoot":"","sources":["../../src/commands/dev.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,OAAO;IACtC,MAAM,CAAU,WAAW,GAAG,0BAA0B,CAAC;IACzD,MAAM,CAAU,QAAQ,GAAG,CAAC,WAAW,CAAC,CAAC;IACzC,MAAM,CAAU,KAAK,GAAG;QACtB,
|
|
1
|
+
{"version":3,"file":"dev.js","sourceRoot":"","sources":["../../src/commands/dev.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,OAAO;IACtC,MAAM,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E,CACP,IACG,CACP,CAAC;QACJ,CAAC,CAAC;QAEF,MAAM,CAAC,KAAC,GAAG,KAAG,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7D,CAAC"}
|
package/dist/commands/start.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ import { Command } from "@oclif/core";
|
|
|
2
2
|
export default class Start extends Command {
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
|
-
static flags: {
|
|
5
|
+
static flags: {
|
|
6
|
+
port: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
|
+
};
|
|
6
8
|
run(): Promise<void>;
|
|
7
9
|
}
|