@illumiarq/lumis 1.2.9 → 1.2.11
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/bridges/project-bridge.d.ts +2 -0
- package/dist/bridges/project-bridge.d.ts.map +1 -0
- package/dist/bridges/project-bridge.js +174 -0
- package/dist/bridges/project-bridge.js.map +1 -0
- package/dist/cli.d.ts +1 -16
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +538 -170
- package/dist/cli.js.map +1 -1
- package/dist/commands/app/cache-workflows.d.ts +7 -0
- package/dist/commands/app/cache-workflows.d.ts.map +1 -0
- package/dist/commands/app/cache-workflows.js +139 -0
- package/dist/commands/app/cache-workflows.js.map +1 -0
- package/dist/commands/app/command-runtime.d.ts +11 -0
- package/dist/commands/app/command-runtime.d.ts.map +1 -0
- package/dist/commands/app/command-runtime.js +41 -0
- package/dist/commands/app/command-runtime.js.map +1 -0
- package/dist/commands/app/config-cache.d.ts +3 -0
- package/dist/commands/app/config-cache.d.ts.map +1 -0
- package/dist/commands/app/config-cache.js +75 -0
- package/dist/commands/app/config-cache.js.map +1 -0
- package/dist/commands/app/config-publish.d.ts +2 -0
- package/dist/commands/app/config-publish.d.ts.map +1 -0
- package/dist/commands/app/config-publish.js +68 -0
- package/dist/commands/app/config-publish.js.map +1 -0
- package/dist/commands/app/config-stubs.d.ts +3 -0
- package/dist/commands/app/config-stubs.d.ts.map +1 -0
- package/dist/commands/app/config-stubs.js +154 -0
- package/dist/commands/app/config-stubs.js.map +1 -0
- package/dist/commands/app/database.d.ts +3 -0
- package/dist/commands/app/database.d.ts.map +1 -0
- package/dist/commands/app/database.js +221 -0
- package/dist/commands/app/database.js.map +1 -0
- package/dist/commands/app/docs.d.ts +7 -0
- package/dist/commands/app/docs.d.ts.map +1 -0
- package/dist/commands/app/docs.js +61 -0
- package/dist/commands/app/docs.js.map +1 -0
- package/dist/commands/app/routes.d.ts +5 -0
- package/dist/commands/app/routes.d.ts.map +1 -0
- package/dist/commands/app/routes.js +95 -0
- package/dist/commands/app/routes.js.map +1 -0
- package/dist/commands/app/security.d.ts +3 -0
- package/dist/commands/app/security.d.ts.map +1 -0
- package/dist/commands/app/security.js +15 -0
- package/dist/commands/app/security.js.map +1 -0
- package/dist/commands/app/worker-schedule.d.ts +5 -0
- package/dist/commands/app/worker-schedule.d.ts.map +1 -0
- package/dist/commands/app/worker-schedule.js +94 -0
- package/dist/commands/app/worker-schedule.js.map +1 -0
- package/dist/commands/app-commands.d.ts +19 -0
- package/dist/commands/app-commands.d.ts.map +1 -0
- package/dist/commands/app-commands.js +77 -0
- package/dist/commands/app-commands.js.map +1 -0
- package/dist/commands/build-vercel-fn.d.ts +9 -0
- package/dist/commands/build-vercel-fn.d.ts.map +1 -0
- package/dist/commands/build-vercel-fn.js +32 -0
- package/dist/commands/build-vercel-fn.js.map +1 -0
- package/dist/commands/build.d.ts +14 -0
- package/dist/commands/build.d.ts.map +1 -0
- package/dist/commands/build.js +24 -0
- package/dist/commands/build.js.map +1 -0
- package/dist/commands/info.d.ts +9 -0
- package/dist/commands/info.d.ts.map +1 -0
- package/dist/commands/info.js +41 -0
- package/dist/commands/info.js.map +1 -0
- package/dist/commands/keys.d.ts +3 -0
- package/dist/commands/keys.d.ts.map +1 -0
- package/dist/commands/keys.js +60 -0
- package/dist/commands/keys.js.map +1 -0
- package/dist/commands/maintenance.d.ts +9 -0
- package/dist/commands/maintenance.d.ts.map +1 -0
- package/dist/commands/maintenance.js +38 -0
- package/dist/commands/maintenance.js.map +1 -0
- package/dist/commands/module-list.d.ts +2 -0
- package/dist/commands/module-list.d.ts.map +1 -0
- package/dist/commands/module-list.js +27 -0
- package/dist/commands/module-list.js.map +1 -0
- package/dist/commands/preview.d.ts +14 -0
- package/dist/commands/preview.d.ts.map +1 -0
- package/dist/commands/preview.js +49 -0
- package/dist/commands/preview.js.map +1 -0
- package/dist/commands/serve.d.ts +16 -0
- package/dist/commands/serve.d.ts.map +1 -0
- package/dist/commands/serve.js +61 -0
- package/dist/commands/serve.js.map +1 -0
- package/dist/{output/ansi.d.ts → console.d.ts} +8 -4
- package/dist/console.d.ts.map +1 -0
- package/dist/{output/ansi.js → console.js} +12 -4
- package/dist/console.js.map +1 -0
- package/dist/index.d.ts +15 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -12
- package/dist/index.js.map +1 -1
- package/dist/paths.d.ts +26 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/paths.js +83 -0
- package/dist/paths.js.map +1 -0
- package/dist/server-wrapper.d.ts +12 -0
- package/dist/server-wrapper.d.ts.map +1 -0
- package/dist/server-wrapper.js +63 -0
- package/dist/server-wrapper.js.map +1 -0
- package/dist/vercel-wrapper.d.ts +6 -0
- package/dist/vercel-wrapper.d.ts.map +1 -0
- package/dist/vercel-wrapper.js +50 -0
- package/dist/vercel-wrapper.js.map +1 -0
- package/package.json +19 -37
- package/README.md +0 -38
- package/dist/adapter-loader.d.ts +0 -67
- package/dist/adapter-loader.d.ts.map +0 -1
- package/dist/adapter-loader.js +0 -273
- package/dist/adapter-loader.js.map +0 -1
- package/dist/commands/commands.command.d.ts +0 -38
- package/dist/commands/commands.command.d.ts.map +0 -1
- package/dist/commands/commands.command.js +0 -176
- package/dist/commands/commands.command.js.map +0 -1
- package/dist/commands/doctor.command.d.ts +0 -9
- package/dist/commands/doctor.command.d.ts.map +0 -1
- package/dist/commands/doctor.command.js +0 -640
- package/dist/commands/doctor.command.js.map +0 -1
- package/dist/commands/init.command.d.ts +0 -9
- package/dist/commands/init.command.d.ts.map +0 -1
- package/dist/commands/init.command.js +0 -121
- package/dist/commands/init.command.js.map +0 -1
- package/dist/commands/intent.command.d.ts +0 -26
- package/dist/commands/intent.command.d.ts.map +0 -1
- package/dist/commands/intent.command.js +0 -211
- package/dist/commands/intent.command.js.map +0 -1
- package/dist/commands/ir-rebuild.command.d.ts +0 -9
- package/dist/commands/ir-rebuild.command.d.ts.map +0 -1
- package/dist/commands/ir-rebuild.command.js +0 -36
- package/dist/commands/ir-rebuild.command.js.map +0 -1
- package/dist/commands/ir-show.command.d.ts +0 -9
- package/dist/commands/ir-show.command.d.ts.map +0 -1
- package/dist/commands/ir-show.command.js +0 -32
- package/dist/commands/ir-show.command.js.map +0 -1
- package/dist/commands/make.command.d.ts +0 -9
- package/dist/commands/make.command.d.ts.map +0 -1
- package/dist/commands/make.command.js +0 -93
- package/dist/commands/make.command.js.map +0 -1
- package/dist/commands/pack.command.d.ts +0 -16
- package/dist/commands/pack.command.d.ts.map +0 -1
- package/dist/commands/pack.command.js +0 -44
- package/dist/commands/pack.command.js.map +0 -1
- package/dist/commands/runtime.command.d.ts +0 -6
- package/dist/commands/runtime.command.d.ts.map +0 -1
- package/dist/commands/runtime.command.js +0 -379
- package/dist/commands/runtime.command.js.map +0 -1
- package/dist/commands/runtime.d.ts +0 -45
- package/dist/commands/runtime.d.ts.map +0 -1
- package/dist/commands/runtime.js +0 -66
- package/dist/commands/runtime.js.map +0 -1
- package/dist/commands/tinker-agent-plan.d.ts +0 -26
- package/dist/commands/tinker-agent-plan.d.ts.map +0 -1
- package/dist/commands/tinker-agent-plan.js +0 -115
- package/dist/commands/tinker-agent-plan.js.map +0 -1
- package/dist/commands/tinker-chat-commands.d.ts +0 -19
- package/dist/commands/tinker-chat-commands.d.ts.map +0 -1
- package/dist/commands/tinker-chat-commands.js +0 -263
- package/dist/commands/tinker-chat-commands.js.map +0 -1
- package/dist/commands/tinker-chat-runtime.d.ts +0 -30
- package/dist/commands/tinker-chat-runtime.d.ts.map +0 -1
- package/dist/commands/tinker-chat-runtime.js +0 -227
- package/dist/commands/tinker-chat-runtime.js.map +0 -1
- package/dist/commands/tinker-classic-mode.d.ts +0 -15
- package/dist/commands/tinker-classic-mode.d.ts.map +0 -1
- package/dist/commands/tinker-classic-mode.js +0 -160
- package/dist/commands/tinker-classic-mode.js.map +0 -1
- package/dist/commands/tinker-eval.command.d.ts +0 -3
- package/dist/commands/tinker-eval.command.d.ts.map +0 -1
- package/dist/commands/tinker-eval.command.js +0 -151
- package/dist/commands/tinker-eval.command.js.map +0 -1
- package/dist/commands/tinker-repl-display.d.ts +0 -15
- package/dist/commands/tinker-repl-display.d.ts.map +0 -1
- package/dist/commands/tinker-repl-display.js +0 -147
- package/dist/commands/tinker-repl-display.js.map +0 -1
- package/dist/commands/tinker-session-runtime.d.ts +0 -27
- package/dist/commands/tinker-session-runtime.d.ts.map +0 -1
- package/dist/commands/tinker-session-runtime.js +0 -196
- package/dist/commands/tinker-session-runtime.js.map +0 -1
- package/dist/commands/tinker.command.d.ts +0 -9
- package/dist/commands/tinker.command.d.ts.map +0 -1
- package/dist/commands/tinker.command.js +0 -142
- package/dist/commands/tinker.command.js.map +0 -1
- package/dist/commands/use.command.d.ts +0 -10
- package/dist/commands/use.command.d.ts.map +0 -1
- package/dist/commands/use.command.js +0 -69
- package/dist/commands/use.command.js.map +0 -1
- package/dist/config-loader.d.ts +0 -68
- package/dist/config-loader.d.ts.map +0 -1
- package/dist/config-loader.js +0 -81
- package/dist/config-loader.js.map +0 -1
- package/dist/launcher.d.ts +0 -16
- package/dist/launcher.d.ts.map +0 -1
- package/dist/launcher.js +0 -301
- package/dist/launcher.js.map +0 -1
- package/dist/lib/file-scanner.d.ts +0 -8
- package/dist/lib/file-scanner.d.ts.map +0 -1
- package/dist/lib/file-scanner.js +0 -70
- package/dist/lib/file-scanner.js.map +0 -1
- package/dist/lib/tinker-memory.d.ts +0 -19
- package/dist/lib/tinker-memory.d.ts.map +0 -1
- package/dist/lib/tinker-memory.js +0 -107
- package/dist/lib/tinker-memory.js.map +0 -1
- package/dist/lib/tinker-observer.d.ts +0 -47
- package/dist/lib/tinker-observer.d.ts.map +0 -1
- package/dist/lib/tinker-observer.js +0 -77
- package/dist/lib/tinker-observer.js.map +0 -1
- package/dist/lib/tinker-policy.d.ts +0 -21
- package/dist/lib/tinker-policy.d.ts.map +0 -1
- package/dist/lib/tinker-policy.js +0 -102
- package/dist/lib/tinker-policy.js.map +0 -1
- package/dist/lib/tinker-replay.d.ts +0 -51
- package/dist/lib/tinker-replay.d.ts.map +0 -1
- package/dist/lib/tinker-replay.js +0 -123
- package/dist/lib/tinker-replay.js.map +0 -1
- package/dist/output/ansi.d.ts.map +0 -1
- package/dist/output/ansi.js.map +0 -1
- package/dist/output/plan-display.d.ts +0 -4
- package/dist/output/plan-display.d.ts.map +0 -1
- package/dist/output/plan-display.js +0 -49
- package/dist/output/plan-display.js.map +0 -1
- package/dist/output/result-display.d.ts +0 -5
- package/dist/output/result-display.d.ts.map +0 -1
- package/dist/output/result-display.js +0 -17
- package/dist/output/result-display.js.map +0 -1
- package/dist/plugins/tinker-plugin.d.ts +0 -86
- package/dist/plugins/tinker-plugin.d.ts.map +0 -1
- package/dist/plugins/tinker-plugin.js +0 -42
- package/dist/plugins/tinker-plugin.js.map +0 -1
- package/dist/router-preferences.d.ts +0 -5
- package/dist/router-preferences.d.ts.map +0 -1
- package/dist/router-preferences.js +0 -22
- package/dist/router-preferences.js.map +0 -1
- package/dist/runtime/executor.d.ts +0 -33
- package/dist/runtime/executor.d.ts.map +0 -1
- package/dist/runtime/executor.js +0 -180
- package/dist/runtime/executor.js.map +0 -1
- package/dist/runtime/orchestration.d.ts +0 -43
- package/dist/runtime/orchestration.d.ts.map +0 -1
- package/dist/runtime/orchestration.js +0 -209
- package/dist/runtime/orchestration.js.map +0 -1
- package/dist/runtime/policy.d.ts +0 -23
- package/dist/runtime/policy.d.ts.map +0 -1
- package/dist/runtime/policy.js +0 -43
- package/dist/runtime/policy.js.map +0 -1
- package/dist/runtime/profiles.d.ts +0 -15
- package/dist/runtime/profiles.d.ts.map +0 -1
- package/dist/runtime/profiles.js +0 -131
- package/dist/runtime/profiles.js.map +0 -1
- package/dist/runtime/transcripts.d.ts +0 -59
- package/dist/runtime/transcripts.d.ts.map +0 -1
- package/dist/runtime/transcripts.js +0 -172
- package/dist/runtime/transcripts.js.map +0 -1
- package/dist/tools/git-diff.d.ts +0 -3
- package/dist/tools/git-diff.d.ts.map +0 -1
- package/dist/tools/git-diff.js +0 -16
- package/dist/tools/git-diff.js.map +0 -1
- package/dist/tools/index.d.ts +0 -24
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/index.js +0 -88
- package/dist/tools/index.js.map +0 -1
- package/dist/tools/lint.d.ts +0 -3
- package/dist/tools/lint.d.ts.map +0 -1
- package/dist/tools/lint.js +0 -35
- package/dist/tools/lint.js.map +0 -1
- package/dist/tools/read-file.d.ts +0 -3
- package/dist/tools/read-file.d.ts.map +0 -1
- package/dist/tools/read-file.js +0 -47
- package/dist/tools/read-file.js.map +0 -1
- package/dist/tools/run-command.d.ts +0 -3
- package/dist/tools/run-command.d.ts.map +0 -1
- package/dist/tools/run-command.js +0 -71
- package/dist/tools/run-command.js.map +0 -1
- package/dist/tools/run-tests.d.ts +0 -3
- package/dist/tools/run-tests.d.ts.map +0 -1
- package/dist/tools/run-tests.js +0 -49
- package/dist/tools/run-tests.js.map +0 -1
- package/dist/tools/tool-dispatch.d.ts +0 -32
- package/dist/tools/tool-dispatch.d.ts.map +0 -1
- package/dist/tools/tool-dispatch.js +0 -120
- package/dist/tools/tool-dispatch.js.map +0 -1
- package/dist/tools/typecheck.d.ts +0 -3
- package/dist/tools/typecheck.d.ts.map +0 -1
- package/dist/tools/typecheck.js +0 -48
- package/dist/tools/typecheck.js.map +0 -1
- package/dist/tools/types.d.ts +0 -62
- package/dist/tools/types.d.ts.map +0 -1
- package/dist/tools/types.js +0 -7
- package/dist/tools/types.js.map +0 -1
- package/dist/tools/write-file.d.ts +0 -15
- package/dist/tools/write-file.d.ts.map +0 -1
- package/dist/tools/write-file.js +0 -52
- package/dist/tools/write-file.js.map +0 -1
- package/dist/tracing/types.d.ts +0 -10
- package/dist/tracing/types.d.ts.map +0 -1
- package/dist/tracing/types.js +0 -2
- package/dist/tracing/types.js.map +0 -1
|
@@ -2,18 +2,26 @@ const ESC = '\u001B[';
|
|
|
2
2
|
function wrap(code, value) {
|
|
3
3
|
return `${ESC}${code}m${value}${ESC}0m`;
|
|
4
4
|
}
|
|
5
|
-
export const
|
|
5
|
+
export const ui = {
|
|
6
6
|
bold: (value) => wrap('1', value),
|
|
7
7
|
dim: (value) => wrap('2', value),
|
|
8
8
|
red: (value) => wrap('31', value),
|
|
9
9
|
green: (value) => wrap('32', value),
|
|
10
10
|
yellow: (value) => wrap('33', value),
|
|
11
|
-
|
|
11
|
+
blue: (value) => wrap('34', value),
|
|
12
12
|
magenta: (value) => wrap('35', value),
|
|
13
|
+
cyan: (value) => wrap('36', value),
|
|
13
14
|
gray: (value) => wrap('90', value),
|
|
14
|
-
|
|
15
|
+
section: (label) => `${wrap('1;35', 'Lumis')} ${wrap('2', '::')} ${wrap('1;36', label)}`,
|
|
15
16
|
ok: (value) => `${wrap('32', '✓')} ${value}`,
|
|
16
17
|
warn: (value) => `${wrap('33', '▲')} ${value}`,
|
|
17
18
|
fail: (value) => `${wrap('31', '✖')} ${value}`,
|
|
19
|
+
bullet: (value) => `${wrap('36', '•')} ${value}`,
|
|
18
20
|
};
|
|
19
|
-
|
|
21
|
+
export function writeLine(message = '') {
|
|
22
|
+
process.stdout.write(`${message}\n`);
|
|
23
|
+
}
|
|
24
|
+
export function writeError(message) {
|
|
25
|
+
process.stderr.write(`${message}\n`);
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=console.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console.js","sourceRoot":"","sources":["../src/console.ts"],"names":[],"mappings":"AAAA,MAAM,GAAG,GAAG,SAAS,CAAC;AAEtB,SAAS,IAAI,CAAC,IAAY,EAAE,KAAa;IACvC,OAAO,GAAG,GAAG,GAAG,IAAI,IAAI,KAAK,GAAG,GAAG,IAAI,CAAC;AAC1C,CAAC;AAED,MAAM,CAAC,MAAM,EAAE,GAAG;IAChB,IAAI,EAAE,CAAC,KAAa,EAAU,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAA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,GAAG,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,KAAK,EAAE;CACjE,CAAC;AAEF,MAAM,UAAU,SAAS,CAAC,OAAO,GAAG,EAAE;IACpC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,IAAI,CAAC,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,OAAe;IACxC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,IAAI,CAAC,CAAC;AACvC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export type {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export { appendRuntimeTranscriptIndex, loadRuntimeTranscriptIndex, persistRuntimeTranscript, pruneRuntimeTranscripts, saveRuntimeTranscriptIndex, summarizeRuntimeTranscripts, } from './runtime/transcripts.js';
|
|
17
|
-
export type { RuntimeExecutionRequest, RuntimeExecutionResult, RuntimeTranscriptEntry, } from './runtime/executor.js';
|
|
18
|
-
export type { RuntimeOrchestrationResult, RuntimeTaskExecution, RuntimeTaskName } from './runtime/orchestration.js';
|
|
19
|
-
export type { PersistedRuntimeTranscript, PruneRuntimeTranscriptsOptions, PruneRuntimeTranscriptsResult, RuntimeTranscriptSummary, RuntimeTranscriptIndex, RuntimeTranscriptIndexEntry, } from './runtime/transcripts.js';
|
|
1
|
+
export { serveApp } from './commands/serve.js';
|
|
2
|
+
export { buildApp } from './commands/build.js';
|
|
3
|
+
export { buildVercelFunction } from './commands/build-vercel-fn.js';
|
|
4
|
+
export { previewApp } from './commands/preview.js';
|
|
5
|
+
export { showInfo } from './commands/info.js';
|
|
6
|
+
export { listModules } from './commands/module-list.js';
|
|
7
|
+
export { generateKeys, rotateKeys } from './commands/keys.js';
|
|
8
|
+
export { enableMaintenanceMode, disableMaintenanceMode } from './commands/maintenance.js';
|
|
9
|
+
export { showResolvedConfig, cacheRoutes, clearRouteCache, listRoutes, checkRoutes, cacheSearchIndex, clearSearchIndex, cacheViews, clearViews, publishStubs, installAuth, runDatabaseCommand, } from './commands/app-commands.js';
|
|
10
|
+
export { writeServerWrapper } from './server-wrapper.js';
|
|
11
|
+
export { writeVercelFunctionWrapper } from './vercel-wrapper.js';
|
|
12
|
+
export * from './paths.js';
|
|
13
|
+
export type { ServeOptions } from './commands/serve.js';
|
|
14
|
+
export type { BuildOptions } from './commands/build.js';
|
|
15
|
+
export type { PreviewOptions } from './commands/preview.js';
|
|
20
16
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,YAAY,EACZ,WAAW,EACX,kBAAkB,GACnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACjE,cAAc,YAAY,CAAC;AAE3B,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export
|
|
1
|
+
export { serveApp } from './commands/serve.js';
|
|
2
|
+
export { buildApp } from './commands/build.js';
|
|
3
|
+
export { buildVercelFunction } from './commands/build-vercel-fn.js';
|
|
4
|
+
export { previewApp } from './commands/preview.js';
|
|
5
|
+
export { showInfo } from './commands/info.js';
|
|
6
|
+
export { listModules } from './commands/module-list.js';
|
|
7
|
+
export { generateKeys, rotateKeys } from './commands/keys.js';
|
|
8
|
+
export { enableMaintenanceMode, disableMaintenanceMode } from './commands/maintenance.js';
|
|
9
|
+
export { showResolvedConfig, cacheRoutes, clearRouteCache, listRoutes, checkRoutes, cacheSearchIndex, clearSearchIndex, cacheViews, clearViews, publishStubs, installAuth, runDatabaseCommand, } from './commands/app-commands.js';
|
|
10
|
+
export { writeServerWrapper } from './server-wrapper.js';
|
|
11
|
+
export { writeVercelFunctionWrapper } from './vercel-wrapper.js';
|
|
12
|
+
export * from './paths.js';
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,YAAY,EACZ,WAAW,EACX,kBAAkB,GACnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACjE,cAAc,YAAY,CAAC"}
|
package/dist/paths.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const ARC_DIR = ".arc";
|
|
2
|
+
export declare const ARC_NODE_APP = ".arc/node/app.js";
|
|
3
|
+
export declare const ARC_SERVER = ".arc/.server.mjs";
|
|
4
|
+
export declare const VERCEL_API_DIR = "api";
|
|
5
|
+
export declare const VERCEL_API_ENTRY = "api/index.js";
|
|
6
|
+
export declare const APP_ENV_FILE = ".env";
|
|
7
|
+
export declare function arcDir(cwd: string): string;
|
|
8
|
+
export declare function arcNodeApp(cwd: string): string;
|
|
9
|
+
export declare function arcServer(cwd: string): string;
|
|
10
|
+
export declare function vercelApiDir(cwd: string): string;
|
|
11
|
+
export declare function vercelApiEntry(cwd: string): string;
|
|
12
|
+
export declare function appEnvFile(cwd: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Reads the `paths.storage` key from canonical Lumis config locations.
|
|
15
|
+
* Defaults to `"storage"` if not set.
|
|
16
|
+
*
|
|
17
|
+
* Resolution order:
|
|
18
|
+
* 1. pkg/lumis.config.ts
|
|
19
|
+
* 2. pkg/lumis/config.ts
|
|
20
|
+
* 3. src/config/lumis.ts
|
|
21
|
+
* 4. lumis.config.ts
|
|
22
|
+
* 5. pkg/lumis.config.json
|
|
23
|
+
* 6. lumis.config.json
|
|
24
|
+
*/
|
|
25
|
+
export declare function readStorageRoot(cwd?: string): string;
|
|
26
|
+
//# sourceMappingURL=paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,SAAS,CAAC;AAC9B,eAAO,MAAM,YAAY,qBAA2B,CAAC;AACrD,eAAO,MAAM,UAAU,qBAA2B,CAAC;AACnD,eAAO,MAAM,cAAc,QAAQ,CAAC;AACpC,eAAO,MAAM,gBAAgB,iBAA+B,CAAC;AAE7D,eAAO,MAAM,YAAY,SAAS,CAAC;AAEnC,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE1C;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7C;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE9C;AA6CD;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,GAAG,SAAgB,GAAG,MAAM,CAc3D"}
|
package/dist/paths.js
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
+
import { join, resolve } from 'node:path';
|
|
3
|
+
export const ARC_DIR = '.arc';
|
|
4
|
+
export const ARC_NODE_APP = `${ARC_DIR}/node/app.js`;
|
|
5
|
+
export const ARC_SERVER = `${ARC_DIR}/.server.mjs`;
|
|
6
|
+
export const VERCEL_API_DIR = 'api';
|
|
7
|
+
export const VERCEL_API_ENTRY = `${VERCEL_API_DIR}/index.js`;
|
|
8
|
+
export const APP_ENV_FILE = '.env';
|
|
9
|
+
export function arcDir(cwd) {
|
|
10
|
+
return resolve(cwd, ARC_DIR);
|
|
11
|
+
}
|
|
12
|
+
export function arcNodeApp(cwd) {
|
|
13
|
+
return resolve(cwd, ARC_NODE_APP);
|
|
14
|
+
}
|
|
15
|
+
export function arcServer(cwd) {
|
|
16
|
+
return resolve(cwd, ARC_SERVER);
|
|
17
|
+
}
|
|
18
|
+
export function vercelApiDir(cwd) {
|
|
19
|
+
return resolve(cwd, VERCEL_API_DIR);
|
|
20
|
+
}
|
|
21
|
+
export function vercelApiEntry(cwd) {
|
|
22
|
+
return resolve(cwd, VERCEL_API_ENTRY);
|
|
23
|
+
}
|
|
24
|
+
export function appEnvFile(cwd) {
|
|
25
|
+
return resolve(cwd, APP_ENV_FILE);
|
|
26
|
+
}
|
|
27
|
+
/** Canonical Lumiarq apps use `src/storage`; legacy apps may set `paths.storage` explicitly. */
|
|
28
|
+
const STORAGE_ROOT_DEFAULT = 'src/storage';
|
|
29
|
+
const LUMIS_CONFIG_CANDIDATES = [
|
|
30
|
+
'pkg/lumis.config.ts',
|
|
31
|
+
'pkg/lumis/config.ts',
|
|
32
|
+
'src/config/lumis.ts',
|
|
33
|
+
'lumis.config.ts',
|
|
34
|
+
'pkg/lumis.config.json',
|
|
35
|
+
'lumis.config.json',
|
|
36
|
+
];
|
|
37
|
+
function extractStorageRootFromTs(raw) {
|
|
38
|
+
const pathsBlock = raw.match(/paths\s*:\s*\{[^}]*storage\s*:\s*['"]([^'"]+)['"]/s);
|
|
39
|
+
if (pathsBlock?.[1]) {
|
|
40
|
+
return pathsBlock[1];
|
|
41
|
+
}
|
|
42
|
+
const direct = raw.match(/storage\s*:\s*['"]([^'"]+)['"]/);
|
|
43
|
+
return direct?.[1] ?? null;
|
|
44
|
+
}
|
|
45
|
+
function readStorageRootFromConfigFile(filePath) {
|
|
46
|
+
try {
|
|
47
|
+
const raw = readFileSync(filePath, 'utf8');
|
|
48
|
+
if (filePath.endsWith('.json')) {
|
|
49
|
+
const config = JSON.parse(raw);
|
|
50
|
+
return config.paths?.storage ?? null;
|
|
51
|
+
}
|
|
52
|
+
return extractStorageRootFromTs(raw);
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Reads the `paths.storage` key from canonical Lumis config locations.
|
|
60
|
+
* Defaults to `"storage"` if not set.
|
|
61
|
+
*
|
|
62
|
+
* Resolution order:
|
|
63
|
+
* 1. pkg/lumis.config.ts
|
|
64
|
+
* 2. pkg/lumis/config.ts
|
|
65
|
+
* 3. src/config/lumis.ts
|
|
66
|
+
* 4. lumis.config.ts
|
|
67
|
+
* 5. pkg/lumis.config.json
|
|
68
|
+
* 6. lumis.config.json
|
|
69
|
+
*/
|
|
70
|
+
export function readStorageRoot(cwd = process.cwd()) {
|
|
71
|
+
for (const candidate of LUMIS_CONFIG_CANDIDATES) {
|
|
72
|
+
const configPath = join(cwd, candidate);
|
|
73
|
+
if (!existsSync(configPath)) {
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
const storageRoot = readStorageRootFromConfigFile(configPath);
|
|
77
|
+
if (storageRoot) {
|
|
78
|
+
return storageRoot;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return STORAGE_ROOT_DEFAULT;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=paths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC;AAC9B,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,OAAO,cAAc,CAAC;AACrD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,OAAO,cAAc,CAAC;AACnD,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC;AACpC,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,cAAc,WAAW,CAAC;AAE7D,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC;AAEnC,MAAM,UAAU,MAAM,CAAC,GAAW;IAChC,OAAO,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,GAAW;IACpC,OAAO,OAAO,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,GAAW;IACnC,OAAO,OAAO,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,GAAW;IACtC,OAAO,OAAO,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,GAAW;IACxC,OAAO,OAAO,CAAC,GAAG,E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uB,EAAE,CAAC;QAChD,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QACxC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YAC5B,SAAS;QACX,CAAC;QAED,MAAM,WAAW,GAAG,6BAA6B,CAAC,UAAU,CAAC,CAAC;QAC9D,IAAI,WAAW,EAAE,CAAC;YAChB,OAAO,WAAW,CAAC;QACrB,CAAC;IACH,CAAC;IAED,OAAO,oBAAoB,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Writes `.arc/.server.mjs` — a self-contained Node ESM bootstrap that
|
|
3
|
+
* imports the built app bundle and starts the Node HTTP adapter.
|
|
4
|
+
*
|
|
5
|
+
* esbuild bundles `@illumiarq/adapters/node` inline so the wrapper needs no
|
|
6
|
+
* extra dependencies at runtime. Falls back to writing plain ESM (bare
|
|
7
|
+
* specifier) if esbuild is unavailable.
|
|
8
|
+
*
|
|
9
|
+
* @returns Absolute path to the written file.
|
|
10
|
+
*/
|
|
11
|
+
export declare function writeServerWrapper(port: number, cwd: string): string;
|
|
12
|
+
//# sourceMappingURL=server-wrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-wrapper.d.ts","sourceRoot":"","sources":["../src/server-wrapper.ts"],"names":[],"mappings":"AAyBA;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAwCpE"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { writeFileSync, mkdirSync } from 'node:fs';
|
|
2
|
+
import { spawnSync } from 'node:child_process';
|
|
3
|
+
import { resolve } from 'node:path';
|
|
4
|
+
import { arcDir, arcServer } from './paths.js';
|
|
5
|
+
/**
|
|
6
|
+
* The ESM source that will become .arc/.server.mjs.
|
|
7
|
+
*
|
|
8
|
+
* The app bundle (./node/app.js) stays external — its path is preserved
|
|
9
|
+
* as-is in the output so the relative import resolves correctly at runtime
|
|
10
|
+
* from inside .arc/.
|
|
11
|
+
*
|
|
12
|
+
* @illumiarq/adapters/node is BUNDLED by esbuild so the wrapper is
|
|
13
|
+
* self-contained regardless of pnpm hoisting.
|
|
14
|
+
*/
|
|
15
|
+
function wrapperSource(port) {
|
|
16
|
+
return [
|
|
17
|
+
`import appPromise from './node/app.js';`,
|
|
18
|
+
`import { startNodeServer } from '@illumiarq/adapters/node';`,
|
|
19
|
+
`const app = await appPromise;`,
|
|
20
|
+
`await startNodeServer(app, { port: ${port} });`,
|
|
21
|
+
'',
|
|
22
|
+
].join('\n');
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Writes `.arc/.server.mjs` — a self-contained Node ESM bootstrap that
|
|
26
|
+
* imports the built app bundle and starts the Node HTTP adapter.
|
|
27
|
+
*
|
|
28
|
+
* esbuild bundles `@illumiarq/adapters/node` inline so the wrapper needs no
|
|
29
|
+
* extra dependencies at runtime. Falls back to writing plain ESM (bare
|
|
30
|
+
* specifier) if esbuild is unavailable.
|
|
31
|
+
*
|
|
32
|
+
* @returns Absolute path to the written file.
|
|
33
|
+
*/
|
|
34
|
+
export function writeServerWrapper(port, cwd) {
|
|
35
|
+
const dir = arcDir(cwd);
|
|
36
|
+
const wrapperPath = arcServer(cwd);
|
|
37
|
+
mkdirSync(dir, { recursive: true });
|
|
38
|
+
// Try to bundle @illumiarq/adapters/node inline via esbuild --stdin
|
|
39
|
+
const result = spawnSync('node_modules/.bin/esbuild', [
|
|
40
|
+
'--bundle',
|
|
41
|
+
'--platform=node',
|
|
42
|
+
'--target=node20',
|
|
43
|
+
'--format=esm',
|
|
44
|
+
`--outfile=${wrapperPath}`,
|
|
45
|
+
'--external:./node/app.js',
|
|
46
|
+
// --sourcefile sets the virtual file path for stdin,
|
|
47
|
+
// which tells esbuild to resolve imports relative to cwd.
|
|
48
|
+
`--sourcefile=${resolve(cwd, 'stdin-entry.js')}`,
|
|
49
|
+
'--log-level=error',
|
|
50
|
+
], {
|
|
51
|
+
cwd,
|
|
52
|
+
input: wrapperSource(port),
|
|
53
|
+
encoding: 'utf8',
|
|
54
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
55
|
+
});
|
|
56
|
+
if (result.status !== 0) {
|
|
57
|
+
// esbuild unavailable — write plain ESM; runtime relies on
|
|
58
|
+
// @illumiarq/adapters being reachable via node_modules at cwd.
|
|
59
|
+
writeFileSync(wrapperPath, `// Auto-generated by @illumiarq/lumis — do not edit.\n${wrapperSource(port)}`, 'utf8');
|
|
60
|
+
}
|
|
61
|
+
return wrapperPath;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=server-wrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-wrapper.js","sourceRoot":"","sources":["../src/server-wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE/C;;;;;;;;;GASG;AACH,SAAS,aAAa,CAAC,IAAY;IACjC,OAAO;QACL,yCAAyC;QACzC,6DAA6D;QAC7D,+BAA+B;QAC/B,sCAAsC,IAAI,MAAM;QAChD,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAY,EAAE,GAAW;IAC1D,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IACxB,MAAM,WAAW,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;IAEnC,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAEpC,oEAAoE;IACpE,MAAM,MAAM,GAAG,SAAS,CACtB,2BAA2B,EAC3B;QACE,UAAU;QACV,iBAAiB;QACjB,iBAAiB;QACjB,cAAc;QACd,aAAa,WAAW,EAAE;QAC1B,0BAA0B;QAC1B,qDAAqD;QACrD,0DAA0D;QAC1D,gBAAgB,OAAO,CAAC,GAAG,EAAE,gBAAgB,CAAC,EAAE;QAChD,mBAAmB;KACpB,EACD;QACE,GAAG;QACH,KAAK,EAAE,aAAa,CAAC,IAAI,CAAC;QAC1B,QAAQ,EAAE,MAAM;QAChB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;KAChC,CACF,CAAC;IAEF,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,2DAA2D;QAC3D,+DAA+D;QAC/D,aAAa,CACX,WAAW,EACX,yDAAyD,aAAa,CAAC,IAAI,CAAC,EAAE,EAC9E,MAAM,CACP,CAAC;IACJ,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vercel-wrapper.d.ts","sourceRoot":"","sources":["../src/vercel-wrapper.ts"],"names":[],"mappings":"AAuBA;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CA+B9D"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { spawnSync } from 'node:child_process';
|
|
3
|
+
import { resolve } from 'node:path';
|
|
4
|
+
import { vercelApiDir, vercelApiEntry } from './paths.js';
|
|
5
|
+
function wrapperSource() {
|
|
6
|
+
return [
|
|
7
|
+
`import appPromise from '../.arc/node/app.js';`,
|
|
8
|
+
`import { handle } from 'hono/vercel';`,
|
|
9
|
+
'',
|
|
10
|
+
`const app = await appPromise;`,
|
|
11
|
+
`const router = app?.router ?? app;`,
|
|
12
|
+
'',
|
|
13
|
+
`if (!router || typeof router.fetch !== 'function') {`,
|
|
14
|
+
` throw new Error('LumiARQ Vercel adapter expected a Hono app at app.router.');`,
|
|
15
|
+
`}`,
|
|
16
|
+
'',
|
|
17
|
+
`export const config = { runtime: 'nodejs' };`,
|
|
18
|
+
`export default handle(router);`,
|
|
19
|
+
'',
|
|
20
|
+
].join('\n');
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Writes a Vercel function entry at api/index.js that proxies every request
|
|
24
|
+
* to the booted LumiARQ Hono router from .arc/node/app.js.
|
|
25
|
+
*/
|
|
26
|
+
export function writeVercelFunctionWrapper(cwd) {
|
|
27
|
+
const apiDir = vercelApiDir(cwd);
|
|
28
|
+
const apiEntry = vercelApiEntry(cwd);
|
|
29
|
+
mkdirSync(apiDir, { recursive: true });
|
|
30
|
+
const result = spawnSync('node_modules/.bin/esbuild', [
|
|
31
|
+
'--bundle',
|
|
32
|
+
'--platform=node',
|
|
33
|
+
'--target=node20',
|
|
34
|
+
'--format=esm',
|
|
35
|
+
`--outfile=${apiEntry}`,
|
|
36
|
+
'--external:../.arc/node/app.js',
|
|
37
|
+
`--sourcefile=${resolve(cwd, 'api', 'stdin-entry.js')}`,
|
|
38
|
+
'--log-level=error',
|
|
39
|
+
], {
|
|
40
|
+
cwd,
|
|
41
|
+
input: wrapperSource(),
|
|
42
|
+
encoding: 'utf8',
|
|
43
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
44
|
+
});
|
|
45
|
+
if (result.status !== 0) {
|
|
46
|
+
writeFileSync(apiEntry, `${wrapperSource()}`, 'utf8');
|
|
47
|
+
}
|
|
48
|
+
return apiEntry;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=vercel-wrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vercel-wrapper.js","sourceRoot":"","sources":["../src/vercel-wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA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AClB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@illumiarq/lumis",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.11",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"description": "
|
|
6
|
-
"publishConfig": {
|
|
7
|
-
"access": "public"
|
|
8
|
-
},
|
|
5
|
+
"description": "LumiARQ dev CLI — extends @lumiarq/lumis with serve / build / preview commands",
|
|
9
6
|
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
10
9
|
"bin": {
|
|
11
10
|
"lumis": "./dist/cli.js"
|
|
12
11
|
},
|
|
13
|
-
"main": "./dist/index.js",
|
|
14
|
-
"types": "./dist/index.d.ts",
|
|
15
12
|
"exports": {
|
|
16
13
|
".": {
|
|
17
14
|
"import": "./dist/index.js",
|
|
@@ -23,40 +20,25 @@
|
|
|
23
20
|
],
|
|
24
21
|
"scripts": {
|
|
25
22
|
"build": "tsc -p tsconfig.build.json",
|
|
26
|
-
"typecheck": "tsc
|
|
23
|
+
"typecheck": "tsc --noEmit",
|
|
27
24
|
"test": "vitest run",
|
|
28
|
-
"
|
|
29
|
-
"lint": "eslint src tests --ext .ts",
|
|
30
|
-
"publish:dry-run": "node scripts/publish.mjs",
|
|
31
|
-
"publish:all": "node scripts/publish.mjs --publish"
|
|
25
|
+
"clean": "rm -rf dist"
|
|
32
26
|
},
|
|
33
27
|
"dependencies": {
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
36
|
-
"@
|
|
37
|
-
"@
|
|
38
|
-
"@lumiarq/
|
|
39
|
-
"@lumiarq/pack-lumiarq": "workspace:*",
|
|
40
|
-
"@lumiarq/pack-nextjs": "workspace:*",
|
|
41
|
-
"@lumiarq/planner": "workspace:*",
|
|
42
|
-
"@lumiarq/rag": "workspace:*",
|
|
43
|
-
"@lumiarq/tinker": "workspace:*",
|
|
44
|
-
"@lumiarq/verifier": "workspace:*"
|
|
28
|
+
"@illumiarq/adapters": "workspace:*",
|
|
29
|
+
"@illumiarq/auth-starter": "workspace:*",
|
|
30
|
+
"@illumiarq/search": "workspace:*",
|
|
31
|
+
"@illumiarq/veil": "workspace:*",
|
|
32
|
+
"@lumiarq/lumis": "^1.2.0"
|
|
45
33
|
},
|
|
46
34
|
"devDependencies": {
|
|
47
|
-
"@
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"eslint": "^9.23.0",
|
|
53
|
-
"turbo": "^2.3.3",
|
|
54
|
-
"typescript": "^5.8.2",
|
|
55
|
-
"vitest": "^2.1.8"
|
|
56
|
-
},
|
|
57
|
-
"engines": {
|
|
58
|
-
"node": ">=20.0.0",
|
|
59
|
-
"pnpm": ">=9.0.0"
|
|
35
|
+
"@types/node": "^22.0.0",
|
|
36
|
+
"esbuild": "^0.25.0",
|
|
37
|
+
"tsx": "^4.21.0",
|
|
38
|
+
"typescript": "^5.7.2",
|
|
39
|
+
"vitest": "^2.1.9"
|
|
60
40
|
},
|
|
61
|
-
"
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public"
|
|
43
|
+
}
|
|
62
44
|
}
|
package/README.md
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# @lumiarq/lumis
|
|
2
|
-
|
|
3
|
-
Lumis is the CLI host package for the Lumiarq code-generation and verification stack.
|
|
4
|
-
|
|
5
|
-
## What it does
|
|
6
|
-
|
|
7
|
-
- Detects the best framework pack for a project
|
|
8
|
-
- Builds and updates IR from adapters
|
|
9
|
-
- Runs commands like `doctor`, `init`, `runtime`, and `commands`
|
|
10
|
-
- Orchestrates runtime profiles, transcript storage, and post-make tasks
|
|
11
|
-
|
|
12
|
-
## Install
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
npm install -g @lumiarq/lumis
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
Or run locally in a project:
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
npx @lumiarq/lumis --help
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Development
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
pnpm install
|
|
28
|
-
pnpm turbo run build
|
|
29
|
-
pnpm turbo run test
|
|
30
|
-
pnpm turbo run typecheck
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Contributing
|
|
34
|
-
|
|
35
|
-
1. Open an issue describing the feature or bug.
|
|
36
|
-
2. Add tests with your change.
|
|
37
|
-
3. Keep exports stable and update docs for user-facing behavior.
|
|
38
|
-
4. Run `pnpm turbo run test typecheck build` before creating a PR.
|
package/dist/adapter-loader.d.ts
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import type { LumisAdapter, LumisPackModule } from '@lumiarq/context';
|
|
2
|
-
export declare function getBuiltinPacks(): LumisPackModule[];
|
|
3
|
-
/**
|
|
4
|
-
* Convenience helper for callers that still operate on adapters directly.
|
|
5
|
-
*
|
|
6
|
-
* @returns Built-in adapters derived from the built-in pack registry.
|
|
7
|
-
*/
|
|
8
|
-
export declare function getBuiltinAdapters(): LumisAdapter[];
|
|
9
|
-
/**
|
|
10
|
-
* Discover and return all pack modules available to the current project.
|
|
11
|
-
* Combines built-in packs with packs declared in package.json dependencies.
|
|
12
|
-
*
|
|
13
|
-
* @param projectRoot - Path to the project for which to discover packs.
|
|
14
|
-
* @returns Array of discovered pack modules.
|
|
15
|
-
*/
|
|
16
|
-
export declare function getAvailablePacks(projectRoot: string): Promise<LumisPackModule[]>;
|
|
17
|
-
/**
|
|
18
|
-
* Lookup a built-in pack by either manifest framework id or adapter name.
|
|
19
|
-
*
|
|
20
|
-
* @param framework - Framework or adapter name to lookup.
|
|
21
|
-
* @returns Matching pack or null if no match is found.
|
|
22
|
-
*/
|
|
23
|
-
export declare function getBuiltinPackByFramework(framework: string): LumisPackModule | null;
|
|
24
|
-
export declare function detectBestPack(projectRoot: string, packs?: LumisPackModule[]): Promise<LumisPackModule | null>;
|
|
25
|
-
/**
|
|
26
|
-
* Adapter-only detection path for backward compatibility.
|
|
27
|
-
*
|
|
28
|
-
* @param projectRoot - Path to the project for which to detect an adapter.
|
|
29
|
-
* @param adapters - Optional list of adapters to consider for detection. Defaults to built-in adapters.
|
|
30
|
-
* @returns Best matching adapter, or null when no compatible adapter is detected.
|
|
31
|
-
*
|
|
32
|
-
* Selection strategy: Highest detection confidence wins.
|
|
33
|
-
*/
|
|
34
|
-
export declare function detectBestAdapter(projectRoot: string, adapters?: LumisAdapter[]): Promise<LumisAdapter | null>;
|
|
35
|
-
/**
|
|
36
|
-
* Resolve a pack for a project.
|
|
37
|
-
*
|
|
38
|
-
* @param projectRoot - Path to the project for which to resolve a pack.
|
|
39
|
-
* @param options.configuredAdapter - Optional adapter/framework hint from configuration. If provided, we will first attempt to match this to a built-in pack before falling back to detection.
|
|
40
|
-
* @param options.packs - Optional list of packs to consider for resolution. Defaults to built-in packs.
|
|
41
|
-
* @returns Resolved pack module, or null when no compatible pack can be resolved.
|
|
42
|
-
*
|
|
43
|
-
* Resolution strategy:
|
|
44
|
-
* If a configured adapter/framework is provided and matches a built-in pack,
|
|
45
|
-
* it is preferred. Otherwise we fall back to automatic detection.
|
|
46
|
-
*/
|
|
47
|
-
export declare function resolvePackForProject(projectRoot: string, options?: {
|
|
48
|
-
configuredAdapter?: string;
|
|
49
|
-
packs?: LumisPackModule[];
|
|
50
|
-
}): Promise<LumisPackModule | null>;
|
|
51
|
-
/**
|
|
52
|
-
* Resolve adapter for a project through pack resolution.
|
|
53
|
-
*
|
|
54
|
-
* @param projectRoot - Path to the project for which to resolve an adapter.
|
|
55
|
-
* @param options.configuredAdapter - Optional adapter/framework hint from configuration. If provided, we will first attempt to match this to a built-in pack before falling back to detection.
|
|
56
|
-
* @param options.packs - Optional list of packs to consider for resolution. Defaults to built-in packs.
|
|
57
|
-
* @returns Resolved adapter, or null when no compatible pack/adapter can be resolved.
|
|
58
|
-
*
|
|
59
|
-
* Resolution strategy:
|
|
60
|
-
* If a configured adapter/framework is provided and matches a built-in pack,
|
|
61
|
-
* it is preferred. Otherwise we fall back to automatic detection.
|
|
62
|
-
*/
|
|
63
|
-
export declare function resolveAdapterForProject(projectRoot: string, options?: {
|
|
64
|
-
configuredAdapter?: string;
|
|
65
|
-
packs?: LumisPackModule[];
|
|
66
|
-
}): Promise<LumisAdapter | null>;
|
|
67
|
-
//# sourceMappingURL=adapter-loader.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adapter-loader.d.ts","sourceRoot":"","sources":["../src/adapter-loader.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AA+GrE,wBAAgB,eAAe,IAAI,eAAe,EAAE,CAEnD;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,YAAY,EAAE,CAEnD;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAmBvF;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAMnF;AA0BD,wBAAsB,cAAc,CACnC,WAAW,EAAE,MAAM,EACnB,KAAK,CAAC,EAAE,eAAe,EAAE,GACvB,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAmCjC;AAED;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CACtC,WAAW,EAAE,MAAM,EACnB,QAAQ,GAAE,YAAY,EAAyB,GAC7C,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAe9B;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,qBAAqB,CAC1C,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE;IACT,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,KAAK,CAAC,EAAE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