everything-dev 1.7.2 → 1.8.0
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/api.cjs +1 -1
- package/dist/api.mjs +1 -1
- package/dist/app.cjs +82 -51
- package/dist/app.cjs.map +1 -1
- package/dist/app.mjs +82 -51
- package/dist/app.mjs.map +1 -1
- package/dist/cli/upgrade.cjs.map +1 -1
- package/dist/cli/upgrade.mjs.map +1 -1
- package/dist/components/dev-view.cjs +6 -3
- package/dist/components/dev-view.cjs.map +1 -1
- package/dist/components/dev-view.mjs +6 -3
- package/dist/components/dev-view.mjs.map +1 -1
- package/dist/components/streaming-view.cjs +5 -2
- package/dist/components/streaming-view.cjs.map +1 -1
- package/dist/components/streaming-view.mjs +5 -2
- package/dist/components/streaming-view.mjs.map +1 -1
- package/dist/config.cjs +28 -5
- package/dist/config.cjs.map +1 -1
- package/dist/config.d.cts.map +1 -1
- package/dist/config.d.mts.map +1 -1
- package/dist/config.mjs +28 -5
- package/dist/config.mjs.map +1 -1
- package/dist/contract.cjs +1 -0
- package/dist/contract.cjs.map +1 -1
- package/dist/contract.d.cts +14 -6
- package/dist/contract.d.cts.map +1 -1
- package/dist/contract.d.mts +14 -6
- package/dist/contract.d.mts.map +1 -1
- package/dist/contract.mjs +1 -0
- package/dist/contract.mjs.map +1 -1
- package/dist/dev-logs.cjs +6 -2
- package/dist/dev-logs.cjs.map +1 -1
- package/dist/dev-logs.mjs +7 -2
- package/dist/dev-logs.mjs.map +1 -1
- package/dist/dev-session.cjs +27 -23
- package/dist/dev-session.cjs.map +1 -1
- package/dist/dev-session.mjs +27 -24
- package/dist/dev-session.mjs.map +1 -1
- package/dist/federation.server.cjs +1 -1
- package/dist/federation.server.mjs +1 -1
- package/dist/host.cjs +4 -3
- package/dist/host.cjs.map +1 -1
- package/dist/host.d.cts.map +1 -1
- package/dist/host.d.mts.map +1 -1
- package/dist/host.mjs +4 -3
- package/dist/host.mjs.map +1 -1
- package/dist/integrity.cjs +68 -2
- package/dist/integrity.cjs.map +1 -1
- package/dist/integrity.d.cts +14 -1
- package/dist/integrity.d.cts.map +1 -1
- package/dist/integrity.d.mts +14 -1
- package/dist/integrity.d.mts.map +1 -1
- package/dist/integrity.mjs +66 -3
- package/dist/integrity.mjs.map +1 -1
- package/dist/mf.cjs +32 -0
- package/dist/mf.cjs.map +1 -1
- package/dist/mf.d.cts +3 -1
- package/dist/mf.d.cts.map +1 -1
- package/dist/mf.d.mts +3 -1
- package/dist/mf.d.mts.map +1 -1
- package/dist/mf.mjs +32 -1
- package/dist/mf.mjs.map +1 -1
- package/dist/orchestrator.cjs +167 -317
- package/dist/orchestrator.cjs.map +1 -1
- package/dist/orchestrator.d.cts +24 -21
- package/dist/orchestrator.d.cts.map +1 -1
- package/dist/orchestrator.d.mts +24 -21
- package/dist/orchestrator.d.mts.map +1 -1
- package/dist/orchestrator.mjs +168 -316
- package/dist/orchestrator.mjs.map +1 -1
- package/dist/plugin.cjs +38 -107
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.cts +19 -5
- package/dist/plugin.d.cts.map +1 -1
- package/dist/plugin.d.mts +19 -5
- package/dist/plugin.d.mts.map +1 -1
- package/dist/plugin.mjs +39 -108
- package/dist/plugin.mjs.map +1 -1
- package/dist/service-descriptor.cjs +188 -0
- package/dist/service-descriptor.cjs.map +1 -0
- package/dist/service-descriptor.d.cts +107 -0
- package/dist/service-descriptor.d.cts.map +1 -0
- package/dist/service-descriptor.d.mts +107 -0
- package/dist/service-descriptor.d.mts.map +1 -0
- package/dist/service-descriptor.mjs +182 -0
- package/dist/service-descriptor.mjs.map +1 -0
- package/dist/types.cjs +8 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +18 -3
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +18 -3
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs +8 -1
- package/dist/types.mjs.map +1 -1
- package/dist/ui/index.cjs +1 -0
- package/dist/ui/index.d.cts +2 -2
- package/dist/ui/index.d.mts +2 -2
- package/dist/ui/index.mjs +2 -2
- package/dist/ui/runtime.cjs +4 -0
- package/dist/ui/runtime.cjs.map +1 -1
- package/dist/ui/runtime.d.cts +2 -1
- package/dist/ui/runtime.d.cts.map +1 -1
- package/dist/ui/runtime.d.mts +2 -1
- package/dist/ui/runtime.d.mts.map +1 -1
- package/dist/ui/runtime.mjs +4 -1
- package/dist/ui/runtime.mjs.map +1 -1
- package/package.json +12 -4
- package/skills/dev-workflow/SKILL.md +105 -0
- package/skills/publish-sync/SKILL.md +130 -0
- package/src/app.ts +98 -204
- package/src/cli/upgrade.ts +20 -4
- package/src/components/dev-view.tsx +8 -3
- package/src/components/streaming-view.ts +7 -2
- package/src/config.ts +40 -8
- package/src/contract.ts +1 -0
- package/src/dev-logs.ts +8 -1
- package/src/dev-session.ts +56 -79
- package/src/host.ts +4 -3
- package/src/integrity.ts +96 -10
- package/src/mf.ts +42 -0
- package/src/orchestrator.ts +232 -411
- package/src/plugin.ts +48 -136
- package/src/service-descriptor.ts +258 -0
- package/src/types.ts +8 -1
- package/src/ui/runtime.ts +5 -0
- package/dist/process-registry.cjs +0 -120
- package/dist/process-registry.cjs.map +0 -1
- package/dist/process-registry.d.cts +0 -25
- package/dist/process-registry.d.cts.map +0 -1
- package/dist/process-registry.d.mts +0 -25
- package/dist/process-registry.d.mts.map +0 -1
- package/dist/process-registry.mjs +0 -119
- package/dist/process-registry.mjs.map +0 -1
- package/src/process-registry.ts +0 -154
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
let effect = require("effect");
|
|
3
|
+
|
|
4
|
+
//#region src/service-descriptor.ts
|
|
5
|
+
var ServiceDescriptorMap = class extends effect.Context.Tag("ServiceDescriptorMap")() {};
|
|
6
|
+
var DevRuntimeConfig = class extends effect.Context.Tag("DevRuntimeConfig")() {};
|
|
7
|
+
const PLUGIN_READY_PATTERNS = [
|
|
8
|
+
/ready in/i,
|
|
9
|
+
/compiled.*successfully/i,
|
|
10
|
+
/listening/i,
|
|
11
|
+
/started/i
|
|
12
|
+
];
|
|
13
|
+
const PLUGIN_ERROR_PATTERNS = [/error/i, /failed/i];
|
|
14
|
+
const SERVICE_CONFIGS = {
|
|
15
|
+
host: {
|
|
16
|
+
command: "bun",
|
|
17
|
+
args: ["run", "dev"],
|
|
18
|
+
readyPatterns: [/Host (dev|production) server running at/i, /Server running at/i],
|
|
19
|
+
errorPatterns: [
|
|
20
|
+
/error:/i,
|
|
21
|
+
/failed/i,
|
|
22
|
+
/exception/i
|
|
23
|
+
],
|
|
24
|
+
defaultPort: 3e3,
|
|
25
|
+
readinessPath: "/health"
|
|
26
|
+
},
|
|
27
|
+
auth: {
|
|
28
|
+
command: "bun",
|
|
29
|
+
args: ["run", "dev"],
|
|
30
|
+
readyPatterns: PLUGIN_READY_PATTERNS,
|
|
31
|
+
errorPatterns: PLUGIN_ERROR_PATTERNS,
|
|
32
|
+
defaultPort: 3002,
|
|
33
|
+
readinessPath: "/remoteEntry.js"
|
|
34
|
+
},
|
|
35
|
+
ui: {
|
|
36
|
+
command: "bun",
|
|
37
|
+
args: ["run", "dev"],
|
|
38
|
+
readyPatterns: [
|
|
39
|
+
/\bready\s+built in\b/i,
|
|
40
|
+
/\bLocal:\b/i,
|
|
41
|
+
/\bcompiled\b.*successfully/i
|
|
42
|
+
],
|
|
43
|
+
errorPatterns: [/error/i, /failed to compile/i],
|
|
44
|
+
defaultPort: 3003,
|
|
45
|
+
readinessPath: "/remoteEntry.js"
|
|
46
|
+
},
|
|
47
|
+
"ui-ssr": {
|
|
48
|
+
command: "bun",
|
|
49
|
+
args: ["run", "dev:ssr"],
|
|
50
|
+
readyPatterns: [/\bready\s+built in\b/i, /\bcompiled\b.*successfully/i],
|
|
51
|
+
errorPatterns: [/error/i, /failed/i],
|
|
52
|
+
defaultPort: 3004,
|
|
53
|
+
readinessPath: "/"
|
|
54
|
+
},
|
|
55
|
+
api: {
|
|
56
|
+
command: "bun",
|
|
57
|
+
args: ["run", "dev"],
|
|
58
|
+
readyPatterns: PLUGIN_READY_PATTERNS,
|
|
59
|
+
errorPatterns: PLUGIN_ERROR_PATTERNS,
|
|
60
|
+
defaultPort: 3001,
|
|
61
|
+
readinessPath: "/remoteEntry.js"
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
function buildServiceDescriptorMap(runtimeConfig, options) {
|
|
65
|
+
const map = /* @__PURE__ */ new Map();
|
|
66
|
+
const ssr = options?.ssr ?? false;
|
|
67
|
+
const hostIsRemote = runtimeConfig.host.source === "remote";
|
|
68
|
+
const hostProbeUrl = hostIsRemote ? runtimeConfig.host.remoteUrl ?? runtimeConfig.host.url : runtimeConfig.host.url;
|
|
69
|
+
map.set("host", {
|
|
70
|
+
key: "host",
|
|
71
|
+
source: runtimeConfig.host.source,
|
|
72
|
+
url: hostProbeUrl,
|
|
73
|
+
remoteUrl: runtimeConfig.host.remoteUrl,
|
|
74
|
+
entry: hostIsRemote ? hostProbeUrl ? `${hostProbeUrl}/mf-manifest.json` : "/mf-manifest.json" : runtimeConfig.host.entry,
|
|
75
|
+
name: runtimeConfig.host.name,
|
|
76
|
+
localPath: runtimeConfig.host.localPath,
|
|
77
|
+
port: runtimeConfig.host.port,
|
|
78
|
+
integrity: runtimeConfig.host.integrity,
|
|
79
|
+
secrets: runtimeConfig.host.secrets,
|
|
80
|
+
...SERVICE_CONFIGS.host
|
|
81
|
+
});
|
|
82
|
+
map.set("ui", {
|
|
83
|
+
key: "ui",
|
|
84
|
+
source: runtimeConfig.ui.source,
|
|
85
|
+
url: runtimeConfig.ui.url,
|
|
86
|
+
remoteUrl: runtimeConfig.ui.source === "remote" ? runtimeConfig.ui.url : void 0,
|
|
87
|
+
entry: runtimeConfig.ui.entry,
|
|
88
|
+
name: runtimeConfig.ui.name,
|
|
89
|
+
localPath: runtimeConfig.ui.localPath,
|
|
90
|
+
port: runtimeConfig.ui.port,
|
|
91
|
+
integrity: runtimeConfig.ui.integrity,
|
|
92
|
+
ssr,
|
|
93
|
+
...SERVICE_CONFIGS.ui
|
|
94
|
+
});
|
|
95
|
+
if (ssr && runtimeConfig.ui.source === "local") map.set("ui-ssr", {
|
|
96
|
+
key: "ui-ssr",
|
|
97
|
+
source: runtimeConfig.ui.source,
|
|
98
|
+
url: runtimeConfig.ui.ssrUrl ?? "",
|
|
99
|
+
entry: "",
|
|
100
|
+
name: "ui-ssr",
|
|
101
|
+
localPath: runtimeConfig.ui.localPath,
|
|
102
|
+
port: runtimeConfig.ui.ssrUrl ? Number.parseInt(new URL(runtimeConfig.ui.ssrUrl).port, 10) : (runtimeConfig.ui.port ?? 3003) + 1,
|
|
103
|
+
...SERVICE_CONFIGS["ui-ssr"]
|
|
104
|
+
});
|
|
105
|
+
map.set("api", {
|
|
106
|
+
key: "api",
|
|
107
|
+
source: runtimeConfig.api.source,
|
|
108
|
+
url: runtimeConfig.api.url,
|
|
109
|
+
remoteUrl: runtimeConfig.api.source === "remote" ? runtimeConfig.api.url : void 0,
|
|
110
|
+
entry: runtimeConfig.api.entry,
|
|
111
|
+
name: runtimeConfig.api.name,
|
|
112
|
+
localPath: runtimeConfig.api.localPath,
|
|
113
|
+
port: runtimeConfig.api.port,
|
|
114
|
+
integrity: runtimeConfig.api.integrity,
|
|
115
|
+
proxy: runtimeConfig.api.proxy,
|
|
116
|
+
variables: runtimeConfig.api.variables,
|
|
117
|
+
secrets: runtimeConfig.api.secrets,
|
|
118
|
+
...SERVICE_CONFIGS.api
|
|
119
|
+
});
|
|
120
|
+
if (runtimeConfig.auth) map.set("auth", {
|
|
121
|
+
key: "auth",
|
|
122
|
+
source: runtimeConfig.auth.source,
|
|
123
|
+
url: runtimeConfig.auth.url,
|
|
124
|
+
remoteUrl: runtimeConfig.auth.source === "remote" ? runtimeConfig.auth.url : void 0,
|
|
125
|
+
entry: runtimeConfig.auth.entry,
|
|
126
|
+
name: runtimeConfig.auth.name,
|
|
127
|
+
localPath: runtimeConfig.auth.localPath,
|
|
128
|
+
port: runtimeConfig.auth.port,
|
|
129
|
+
integrity: runtimeConfig.auth.integrity,
|
|
130
|
+
proxy: runtimeConfig.auth.proxy,
|
|
131
|
+
variables: runtimeConfig.auth.variables,
|
|
132
|
+
secrets: runtimeConfig.auth.secrets,
|
|
133
|
+
...SERVICE_CONFIGS.auth
|
|
134
|
+
});
|
|
135
|
+
if (runtimeConfig.plugins) {
|
|
136
|
+
let pluginBasePort = 3010;
|
|
137
|
+
for (const [pluginId, pluginConfig] of Object.entries(runtimeConfig.plugins)) {
|
|
138
|
+
const pluginKey = `plugin:${pluginId}`;
|
|
139
|
+
const resolvedPort = pluginConfig.port ?? pluginBasePort;
|
|
140
|
+
pluginBasePort = resolvedPort + 1;
|
|
141
|
+
map.set(pluginKey, {
|
|
142
|
+
key: pluginKey,
|
|
143
|
+
source: pluginConfig.source,
|
|
144
|
+
url: pluginConfig.url,
|
|
145
|
+
remoteUrl: pluginConfig.source === "remote" ? pluginConfig.url : void 0,
|
|
146
|
+
entry: pluginConfig.entry,
|
|
147
|
+
name: pluginConfig.name,
|
|
148
|
+
localPath: pluginConfig.localPath,
|
|
149
|
+
port: resolvedPort,
|
|
150
|
+
integrity: pluginConfig.integrity,
|
|
151
|
+
proxy: pluginConfig.proxy,
|
|
152
|
+
variables: pluginConfig.variables,
|
|
153
|
+
secrets: pluginConfig.secrets,
|
|
154
|
+
command: "bun",
|
|
155
|
+
args: ["run", "dev"],
|
|
156
|
+
readyPatterns: PLUGIN_READY_PATTERNS,
|
|
157
|
+
errorPatterns: PLUGIN_ERROR_PATTERNS,
|
|
158
|
+
defaultPort: resolvedPort,
|
|
159
|
+
readinessPath: "/remoteEntry.js"
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return map;
|
|
164
|
+
}
|
|
165
|
+
const ServiceDescriptorMapLive = (map) => effect.Layer.succeed(ServiceDescriptorMap, map);
|
|
166
|
+
const DevRuntimeConfigLive = (config) => effect.Layer.succeed(DevRuntimeConfig, config);
|
|
167
|
+
function buildDescription(map) {
|
|
168
|
+
const descriptors = [...map.values()].filter((d) => d.key !== "ui-ssr" && !d.key.startsWith("plugin:"));
|
|
169
|
+
const allLocal = descriptors.every((d) => d.source === "local");
|
|
170
|
+
const hasProxy = [...map.values()].some((d) => d.proxy && d.source === "local");
|
|
171
|
+
if (allLocal && !hasProxy) return "Full Local Development";
|
|
172
|
+
const parts = [];
|
|
173
|
+
for (const d of descriptors) if (d.source === "remote") {
|
|
174
|
+
const label = d.key === "host" ? "Remote Host" : d.key === "ui" ? "Remote UI" : d.key === "api" ? hasProxy ? void 0 : "Remote API" : d.key === "auth" ? "Remote Auth" : void 0;
|
|
175
|
+
if (label) parts.push(label);
|
|
176
|
+
}
|
|
177
|
+
if (hasProxy) parts.push("Proxy API → Production");
|
|
178
|
+
return parts.join(" + ") || "Remote Mode";
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
//#endregion
|
|
182
|
+
exports.DevRuntimeConfig = DevRuntimeConfig;
|
|
183
|
+
exports.DevRuntimeConfigLive = DevRuntimeConfigLive;
|
|
184
|
+
exports.ServiceDescriptorMap = ServiceDescriptorMap;
|
|
185
|
+
exports.ServiceDescriptorMapLive = ServiceDescriptorMapLive;
|
|
186
|
+
exports.buildDescription = buildDescription;
|
|
187
|
+
exports.buildServiceDescriptorMap = buildServiceDescriptorMap;
|
|
188
|
+
//# sourceMappingURL=service-descriptor.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-descriptor.cjs","names":["Context","Layer"],"sources":["../src/service-descriptor.ts"],"sourcesContent":["import { Context, Layer } from \"effect\";\nimport type { RuntimeConfig, SourceMode } from \"./types\";\n\nexport interface ServiceDescriptor {\n key: string;\n source: SourceMode;\n url: string;\n remoteUrl?: string;\n entry: string;\n name: string;\n localPath?: string;\n port?: number;\n readinessPath: string;\n defaultPort: number;\n integrity?: string;\n proxy?: string;\n variables?: Record<string, string>;\n secrets?: string[];\n ssr?: boolean;\n command?: string;\n args?: string[];\n readyPatterns?: RegExp[];\n errorPatterns?: RegExp[];\n}\n\nexport class ServiceDescriptorMap extends Context.Tag(\"ServiceDescriptorMap\")<\n ServiceDescriptorMap,\n Map<string, ServiceDescriptor>\n>() {}\n\nexport class DevRuntimeConfig extends Context.Tag(\"DevRuntimeConfig\")<\n DevRuntimeConfig,\n RuntimeConfig\n>() {}\n\nconst PLUGIN_READY_PATTERNS = [/ready in/i, /compiled.*successfully/i, /listening/i, /started/i];\n\nconst PLUGIN_ERROR_PATTERNS = [/error/i, /failed/i];\n\nconst SERVICE_CONFIGS: Record<\n string,\n Pick<\n ServiceDescriptor,\n \"command\" | \"args\" | \"readyPatterns\" | \"errorPatterns\" | \"defaultPort\" | \"readinessPath\"\n >\n> = {\n host: {\n command: \"bun\",\n args: [\"run\", \"dev\"],\n readyPatterns: [/Host (dev|production) server running at/i, /Server running at/i],\n errorPatterns: [/error:/i, /failed/i, /exception/i],\n defaultPort: 3000,\n readinessPath: \"/health\",\n },\n auth: {\n command: \"bun\",\n args: [\"run\", \"dev\"],\n readyPatterns: PLUGIN_READY_PATTERNS,\n errorPatterns: PLUGIN_ERROR_PATTERNS,\n defaultPort: 3002,\n readinessPath: \"/remoteEntry.js\",\n },\n ui: {\n command: \"bun\",\n args: [\"run\", \"dev\"],\n readyPatterns: [/\\bready\\s+built in\\b/i, /\\bLocal:\\b/i, /\\bcompiled\\b.*successfully/i],\n errorPatterns: [/error/i, /failed to compile/i],\n defaultPort: 3003,\n readinessPath: \"/remoteEntry.js\",\n },\n \"ui-ssr\": {\n command: \"bun\",\n args: [\"run\", \"dev:ssr\"],\n readyPatterns: [/\\bready\\s+built in\\b/i, /\\bcompiled\\b.*successfully/i],\n errorPatterns: [/error/i, /failed/i],\n defaultPort: 3004,\n readinessPath: \"/\",\n },\n api: {\n command: \"bun\",\n args: [\"run\", \"dev\"],\n readyPatterns: PLUGIN_READY_PATTERNS,\n errorPatterns: PLUGIN_ERROR_PATTERNS,\n defaultPort: 3001,\n readinessPath: \"/remoteEntry.js\",\n },\n};\n\nexport function buildServiceDescriptorMap(\n runtimeConfig: RuntimeConfig,\n options?: { ssr?: boolean; proxy?: boolean },\n): Map<string, ServiceDescriptor> {\n const map = new Map<string, ServiceDescriptor>();\n const ssr = options?.ssr ?? false;\n\n const hostIsRemote = runtimeConfig.host.source === \"remote\";\n const hostProbeUrl = hostIsRemote\n ? (runtimeConfig.host.remoteUrl ?? runtimeConfig.host.url)\n : runtimeConfig.host.url;\n map.set(\"host\", {\n key: \"host\",\n source: runtimeConfig.host.source,\n url: hostProbeUrl,\n remoteUrl: runtimeConfig.host.remoteUrl,\n entry: hostIsRemote\n ? hostProbeUrl\n ? `${hostProbeUrl}/mf-manifest.json`\n : \"/mf-manifest.json\"\n : runtimeConfig.host.entry,\n name: runtimeConfig.host.name,\n localPath: runtimeConfig.host.localPath,\n port: runtimeConfig.host.port,\n integrity: runtimeConfig.host.integrity,\n secrets: runtimeConfig.host.secrets,\n ...SERVICE_CONFIGS.host,\n });\n\n map.set(\"ui\", {\n key: \"ui\",\n source: runtimeConfig.ui.source,\n url: runtimeConfig.ui.url,\n remoteUrl: runtimeConfig.ui.source === \"remote\" ? runtimeConfig.ui.url : undefined,\n entry: runtimeConfig.ui.entry,\n name: runtimeConfig.ui.name,\n localPath: runtimeConfig.ui.localPath,\n port: runtimeConfig.ui.port,\n integrity: runtimeConfig.ui.integrity,\n ssr,\n ...SERVICE_CONFIGS.ui,\n });\n\n if (ssr && runtimeConfig.ui.source === \"local\") {\n map.set(\"ui-ssr\", {\n key: \"ui-ssr\",\n source: runtimeConfig.ui.source,\n url: runtimeConfig.ui.ssrUrl ?? \"\",\n entry: \"\",\n name: \"ui-ssr\",\n localPath: runtimeConfig.ui.localPath,\n port: runtimeConfig.ui.ssrUrl\n ? Number.parseInt(new URL(runtimeConfig.ui.ssrUrl).port, 10)\n : (runtimeConfig.ui.port ?? 3003) + 1,\n ...SERVICE_CONFIGS[\"ui-ssr\"],\n });\n }\n\n map.set(\"api\", {\n key: \"api\",\n source: runtimeConfig.api.source,\n url: runtimeConfig.api.url,\n remoteUrl: runtimeConfig.api.source === \"remote\" ? runtimeConfig.api.url : undefined,\n entry: runtimeConfig.api.entry,\n name: runtimeConfig.api.name,\n localPath: runtimeConfig.api.localPath,\n port: runtimeConfig.api.port,\n integrity: runtimeConfig.api.integrity,\n proxy: runtimeConfig.api.proxy,\n variables: runtimeConfig.api.variables,\n secrets: runtimeConfig.api.secrets,\n ...SERVICE_CONFIGS.api,\n });\n\n if (runtimeConfig.auth) {\n map.set(\"auth\", {\n key: \"auth\",\n source: runtimeConfig.auth.source,\n url: runtimeConfig.auth.url,\n remoteUrl: runtimeConfig.auth.source === \"remote\" ? runtimeConfig.auth.url : undefined,\n entry: runtimeConfig.auth.entry,\n name: runtimeConfig.auth.name,\n localPath: runtimeConfig.auth.localPath,\n port: runtimeConfig.auth.port,\n integrity: runtimeConfig.auth.integrity,\n proxy: runtimeConfig.auth.proxy,\n variables: runtimeConfig.auth.variables,\n secrets: runtimeConfig.auth.secrets,\n ...SERVICE_CONFIGS.auth,\n });\n }\n\n if (runtimeConfig.plugins) {\n let pluginBasePort = 3010;\n for (const [pluginId, pluginConfig] of Object.entries(runtimeConfig.plugins)) {\n const pluginKey = `plugin:${pluginId}`;\n const resolvedPort = pluginConfig.port ?? pluginBasePort;\n pluginBasePort = resolvedPort + 1;\n\n map.set(pluginKey, {\n key: pluginKey,\n source: pluginConfig.source,\n url: pluginConfig.url,\n remoteUrl: pluginConfig.source === \"remote\" ? pluginConfig.url : undefined,\n entry: pluginConfig.entry,\n name: pluginConfig.name,\n localPath: pluginConfig.localPath,\n port: resolvedPort,\n integrity: pluginConfig.integrity,\n proxy: pluginConfig.proxy,\n variables: pluginConfig.variables,\n secrets: pluginConfig.secrets,\n command: \"bun\",\n args: [\"run\", \"dev\"],\n readyPatterns: PLUGIN_READY_PATTERNS,\n errorPatterns: PLUGIN_ERROR_PATTERNS,\n defaultPort: resolvedPort,\n readinessPath: \"/remoteEntry.js\",\n });\n }\n }\n\n return map;\n}\n\nexport interface AppOrchestrator {\n packages: string[];\n description: string;\n env: Record<string, string>;\n port?: number;\n interactive?: boolean;\n noLogs?: boolean;\n}\n\nexport const ServiceDescriptorMapLive = (map: Map<string, ServiceDescriptor>) =>\n Layer.succeed(ServiceDescriptorMap, map);\n\nexport const DevRuntimeConfigLive = (config: RuntimeConfig) =>\n Layer.succeed(DevRuntimeConfig, config);\n\nexport function buildDescription(map: Map<string, ServiceDescriptor>): string {\n const descriptors = [...map.values()].filter(\n (d) => d.key !== \"ui-ssr\" && !d.key.startsWith(\"plugin:\"),\n );\n\n const allLocal = descriptors.every((d) => d.source === \"local\");\n const hasProxy = [...map.values()].some((d) => d.proxy && d.source === \"local\");\n if (allLocal && !hasProxy) return \"Full Local Development\";\n\n const parts: string[] = [];\n for (const d of descriptors) {\n if (d.source === \"remote\") {\n const label =\n d.key === \"host\"\n ? \"Remote Host\"\n : d.key === \"ui\"\n ? \"Remote UI\"\n : d.key === \"api\"\n ? hasProxy\n ? undefined\n : \"Remote API\"\n : d.key === \"auth\"\n ? \"Remote Auth\"\n : undefined;\n if (label) parts.push(label);\n }\n }\n if (hasProxy) parts.push(\"Proxy API → Production\");\n return parts.join(\" + \") || \"Remote Mode\";\n}\n"],"mappings":";;;;AAyBA,IAAa,uBAAb,cAA0CA,eAAQ,IAAI,uBAAuB,EAG1E,CAAC;AAEJ,IAAa,mBAAb,cAAsCA,eAAQ,IAAI,mBAAmB,EAGlE,CAAC;AAEJ,MAAM,wBAAwB;CAAC;CAAa;CAA2B;CAAc;CAAW;AAEhG,MAAM,wBAAwB,CAAC,UAAU,UAAU;AAEnD,MAAM,kBAMF;CACF,MAAM;EACJ,SAAS;EACT,MAAM,CAAC,OAAO,MAAM;EACpB,eAAe,CAAC,4CAA4C,qBAAqB;EACjF,eAAe;GAAC;GAAW;GAAW;GA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;AAGhC,KAAI,SAAU,OAAM,KAAK,yBAAyB;AAClD,QAAO,MAAM,KAAK,MAAM,IAAI"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { SourceMode } from "./types.cjs";
|
|
2
|
+
import { Context } from "effect";
|
|
3
|
+
|
|
4
|
+
//#region src/service-descriptor.d.ts
|
|
5
|
+
interface ServiceDescriptor {
|
|
6
|
+
key: string;
|
|
7
|
+
source: SourceMode;
|
|
8
|
+
url: string;
|
|
9
|
+
remoteUrl?: string;
|
|
10
|
+
entry: string;
|
|
11
|
+
name: string;
|
|
12
|
+
localPath?: string;
|
|
13
|
+
port?: number;
|
|
14
|
+
readinessPath: string;
|
|
15
|
+
defaultPort: number;
|
|
16
|
+
integrity?: string;
|
|
17
|
+
proxy?: string;
|
|
18
|
+
variables?: Record<string, string>;
|
|
19
|
+
secrets?: string[];
|
|
20
|
+
ssr?: boolean;
|
|
21
|
+
command?: string;
|
|
22
|
+
args?: string[];
|
|
23
|
+
readyPatterns?: RegExp[];
|
|
24
|
+
errorPatterns?: RegExp[];
|
|
25
|
+
}
|
|
26
|
+
declare const ServiceDescriptorMap_base: Context.TagClass<ServiceDescriptorMap, "ServiceDescriptorMap", Map<string, ServiceDescriptor>>;
|
|
27
|
+
declare class ServiceDescriptorMap extends ServiceDescriptorMap_base {}
|
|
28
|
+
declare const DevRuntimeConfig_base: Context.TagClass<DevRuntimeConfig, "DevRuntimeConfig", {
|
|
29
|
+
env: "development" | "production";
|
|
30
|
+
account: string;
|
|
31
|
+
networkId: "mainnet" | "testnet";
|
|
32
|
+
host: {
|
|
33
|
+
name: string;
|
|
34
|
+
url: string;
|
|
35
|
+
entry: string;
|
|
36
|
+
source: "local" | "remote";
|
|
37
|
+
integrity?: string | undefined;
|
|
38
|
+
localPath?: string | undefined;
|
|
39
|
+
port?: number | undefined;
|
|
40
|
+
secrets?: string[] | undefined;
|
|
41
|
+
remoteUrl?: string | undefined;
|
|
42
|
+
};
|
|
43
|
+
ui: {
|
|
44
|
+
name: string;
|
|
45
|
+
url: string;
|
|
46
|
+
entry: string;
|
|
47
|
+
source: "local" | "remote";
|
|
48
|
+
integrity?: string | undefined;
|
|
49
|
+
localPath?: string | undefined;
|
|
50
|
+
port?: number | undefined;
|
|
51
|
+
ssrUrl?: string | undefined;
|
|
52
|
+
ssrIntegrity?: string | undefined;
|
|
53
|
+
};
|
|
54
|
+
api: {
|
|
55
|
+
name: string;
|
|
56
|
+
url: string;
|
|
57
|
+
entry: string;
|
|
58
|
+
source: "local" | "remote";
|
|
59
|
+
integrity?: string | undefined;
|
|
60
|
+
localPath?: string | undefined;
|
|
61
|
+
port?: number | undefined;
|
|
62
|
+
proxy?: string | undefined;
|
|
63
|
+
variables?: Record<string, string> | undefined;
|
|
64
|
+
secrets?: string[] | undefined;
|
|
65
|
+
};
|
|
66
|
+
domain?: string | undefined;
|
|
67
|
+
title?: string | undefined;
|
|
68
|
+
repository?: string | undefined;
|
|
69
|
+
shared?: {
|
|
70
|
+
ui?: Record<string, {
|
|
71
|
+
version: string;
|
|
72
|
+
requiredVersion?: string | undefined;
|
|
73
|
+
singleton?: boolean | undefined;
|
|
74
|
+
eager?: boolean | undefined;
|
|
75
|
+
strictVersion?: boolean | undefined;
|
|
76
|
+
shareScope?: string | undefined;
|
|
77
|
+
}> | undefined;
|
|
78
|
+
} | undefined;
|
|
79
|
+
auth?: {
|
|
80
|
+
name: string;
|
|
81
|
+
url: string;
|
|
82
|
+
entry: string;
|
|
83
|
+
source: "local" | "remote";
|
|
84
|
+
integrity?: string | undefined;
|
|
85
|
+
localPath?: string | undefined;
|
|
86
|
+
port?: number | undefined;
|
|
87
|
+
proxy?: string | undefined;
|
|
88
|
+
variables?: Record<string, string> | undefined;
|
|
89
|
+
secrets?: string[] | undefined;
|
|
90
|
+
} | undefined;
|
|
91
|
+
plugins?: Record<string, {
|
|
92
|
+
name: string;
|
|
93
|
+
url: string;
|
|
94
|
+
entry: string;
|
|
95
|
+
source: "local" | "remote";
|
|
96
|
+
localPath?: string | undefined;
|
|
97
|
+
port?: number | undefined;
|
|
98
|
+
proxy?: string | undefined;
|
|
99
|
+
variables?: Record<string, string> | undefined;
|
|
100
|
+
secrets?: string[] | undefined;
|
|
101
|
+
integrity?: string | undefined;
|
|
102
|
+
}> | undefined;
|
|
103
|
+
}>;
|
|
104
|
+
declare class DevRuntimeConfig extends DevRuntimeConfig_base {}
|
|
105
|
+
//#endregion
|
|
106
|
+
export { DevRuntimeConfig, ServiceDescriptor, ServiceDescriptorMap };
|
|
107
|
+
//# sourceMappingURL=service-descriptor.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-descriptor.d.cts","names":[],"sources":["../src/service-descriptor.ts"],"mappings":";;;;UAGiB,iBAAA;EACf,GAAA;EACA,MAAA,EAAQ,UAAA;EACR,GAAA;EACA,SAAA;EACA,KAAA;EACA,IAAA;EACA,SAAA;EACA,IAAA;EACA,aAAA;EACA,WAAA;EACA,SAAA;EACA,KAAA;EACA,SAAA,GAAY,MAAA;EACZ,OAAA;EACA,GAAA;EACA,OAAA;EACA,IAAA;EACA,aAAA,GAAgB,MAAA;EAChB,aAAA,GAAgB,MAAA;AAAA;AAAA,cACjB,yBAAA;cAEY,oBAAA,SAA6B,yBAAA;AAAA,cAGpC,qBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAEO,gBAAA,SAAyB,qBAAA"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { SourceMode } from "./types.mjs";
|
|
2
|
+
import { Context, Layer } from "effect";
|
|
3
|
+
|
|
4
|
+
//#region src/service-descriptor.d.ts
|
|
5
|
+
interface ServiceDescriptor {
|
|
6
|
+
key: string;
|
|
7
|
+
source: SourceMode;
|
|
8
|
+
url: string;
|
|
9
|
+
remoteUrl?: string;
|
|
10
|
+
entry: string;
|
|
11
|
+
name: string;
|
|
12
|
+
localPath?: string;
|
|
13
|
+
port?: number;
|
|
14
|
+
readinessPath: string;
|
|
15
|
+
defaultPort: number;
|
|
16
|
+
integrity?: string;
|
|
17
|
+
proxy?: string;
|
|
18
|
+
variables?: Record<string, string>;
|
|
19
|
+
secrets?: string[];
|
|
20
|
+
ssr?: boolean;
|
|
21
|
+
command?: string;
|
|
22
|
+
args?: string[];
|
|
23
|
+
readyPatterns?: RegExp[];
|
|
24
|
+
errorPatterns?: RegExp[];
|
|
25
|
+
}
|
|
26
|
+
declare const ServiceDescriptorMap_base: Context.TagClass<ServiceDescriptorMap, "ServiceDescriptorMap", Map<string, ServiceDescriptor>>;
|
|
27
|
+
declare class ServiceDescriptorMap extends ServiceDescriptorMap_base {}
|
|
28
|
+
declare const DevRuntimeConfig_base: Context.TagClass<DevRuntimeConfig, "DevRuntimeConfig", {
|
|
29
|
+
env: "development" | "production";
|
|
30
|
+
account: string;
|
|
31
|
+
networkId: "mainnet" | "testnet";
|
|
32
|
+
host: {
|
|
33
|
+
name: string;
|
|
34
|
+
url: string;
|
|
35
|
+
entry: string;
|
|
36
|
+
source: "local" | "remote";
|
|
37
|
+
integrity?: string | undefined;
|
|
38
|
+
localPath?: string | undefined;
|
|
39
|
+
port?: number | undefined;
|
|
40
|
+
secrets?: string[] | undefined;
|
|
41
|
+
remoteUrl?: string | undefined;
|
|
42
|
+
};
|
|
43
|
+
ui: {
|
|
44
|
+
name: string;
|
|
45
|
+
url: string;
|
|
46
|
+
entry: string;
|
|
47
|
+
source: "local" | "remote";
|
|
48
|
+
integrity?: string | undefined;
|
|
49
|
+
localPath?: string | undefined;
|
|
50
|
+
port?: number | undefined;
|
|
51
|
+
ssrUrl?: string | undefined;
|
|
52
|
+
ssrIntegrity?: string | undefined;
|
|
53
|
+
};
|
|
54
|
+
api: {
|
|
55
|
+
name: string;
|
|
56
|
+
url: string;
|
|
57
|
+
entry: string;
|
|
58
|
+
source: "local" | "remote";
|
|
59
|
+
integrity?: string | undefined;
|
|
60
|
+
localPath?: string | undefined;
|
|
61
|
+
port?: number | undefined;
|
|
62
|
+
proxy?: string | undefined;
|
|
63
|
+
variables?: Record<string, string> | undefined;
|
|
64
|
+
secrets?: string[] | undefined;
|
|
65
|
+
};
|
|
66
|
+
domain?: string | undefined;
|
|
67
|
+
title?: string | undefined;
|
|
68
|
+
repository?: string | undefined;
|
|
69
|
+
shared?: {
|
|
70
|
+
ui?: Record<string, {
|
|
71
|
+
version: string;
|
|
72
|
+
requiredVersion?: string | undefined;
|
|
73
|
+
singleton?: boolean | undefined;
|
|
74
|
+
eager?: boolean | undefined;
|
|
75
|
+
strictVersion?: boolean | undefined;
|
|
76
|
+
shareScope?: string | undefined;
|
|
77
|
+
}> | undefined;
|
|
78
|
+
} | undefined;
|
|
79
|
+
auth?: {
|
|
80
|
+
name: string;
|
|
81
|
+
url: string;
|
|
82
|
+
entry: string;
|
|
83
|
+
source: "local" | "remote";
|
|
84
|
+
integrity?: string | undefined;
|
|
85
|
+
localPath?: string | undefined;
|
|
86
|
+
port?: number | undefined;
|
|
87
|
+
proxy?: string | undefined;
|
|
88
|
+
variables?: Record<string, string> | undefined;
|
|
89
|
+
secrets?: string[] | undefined;
|
|
90
|
+
} | undefined;
|
|
91
|
+
plugins?: Record<string, {
|
|
92
|
+
name: string;
|
|
93
|
+
url: string;
|
|
94
|
+
entry: string;
|
|
95
|
+
source: "local" | "remote";
|
|
96
|
+
localPath?: string | undefined;
|
|
97
|
+
port?: number | undefined;
|
|
98
|
+
proxy?: string | undefined;
|
|
99
|
+
variables?: Record<string, string> | undefined;
|
|
100
|
+
secrets?: string[] | undefined;
|
|
101
|
+
integrity?: string | undefined;
|
|
102
|
+
}> | undefined;
|
|
103
|
+
}>;
|
|
104
|
+
declare class DevRuntimeConfig extends DevRuntimeConfig_base {}
|
|
105
|
+
//#endregion
|
|
106
|
+
export { DevRuntimeConfig, ServiceDescriptor, ServiceDescriptorMap };
|
|
107
|
+
//# sourceMappingURL=service-descriptor.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-descriptor.d.mts","names":[],"sources":["../src/service-descriptor.ts"],"mappings":";;;;UAGiB,iBAAA;EACf,GAAA;EACA,MAAA,EAAQ,UAAA;EACR,GAAA;EACA,SAAA;EACA,KAAA;EACA,IAAA;EACA,SAAA;EACA,IAAA;EACA,aAAA;EACA,WAAA;EACA,SAAA;EACA,KAAA;EACA,SAAA,GAAY,MAAA;EACZ,OAAA;EACA,GAAA;EACA,OAAA;EACA,IAAA;EACA,aAAA,GAAgB,MAAA;EAChB,aAAA,GAAgB,MAAA;AAAA;AAAA,cACjB,yBAAA;cAEY,oBAAA,SAA6B,yBAAA;AAAA,cAGpC,qBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAEO,gBAAA,SAAyB,qBAAA"}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { Context, Layer } from "effect";
|
|
2
|
+
|
|
3
|
+
//#region src/service-descriptor.ts
|
|
4
|
+
var ServiceDescriptorMap = class extends Context.Tag("ServiceDescriptorMap")() {};
|
|
5
|
+
var DevRuntimeConfig = class extends Context.Tag("DevRuntimeConfig")() {};
|
|
6
|
+
const PLUGIN_READY_PATTERNS = [
|
|
7
|
+
/ready in/i,
|
|
8
|
+
/compiled.*successfully/i,
|
|
9
|
+
/listening/i,
|
|
10
|
+
/started/i
|
|
11
|
+
];
|
|
12
|
+
const PLUGIN_ERROR_PATTERNS = [/error/i, /failed/i];
|
|
13
|
+
const SERVICE_CONFIGS = {
|
|
14
|
+
host: {
|
|
15
|
+
command: "bun",
|
|
16
|
+
args: ["run", "dev"],
|
|
17
|
+
readyPatterns: [/Host (dev|production) server running at/i, /Server running at/i],
|
|
18
|
+
errorPatterns: [
|
|
19
|
+
/error:/i,
|
|
20
|
+
/failed/i,
|
|
21
|
+
/exception/i
|
|
22
|
+
],
|
|
23
|
+
defaultPort: 3e3,
|
|
24
|
+
readinessPath: "/health"
|
|
25
|
+
},
|
|
26
|
+
auth: {
|
|
27
|
+
command: "bun",
|
|
28
|
+
args: ["run", "dev"],
|
|
29
|
+
readyPatterns: PLUGIN_READY_PATTERNS,
|
|
30
|
+
errorPatterns: PLUGIN_ERROR_PATTERNS,
|
|
31
|
+
defaultPort: 3002,
|
|
32
|
+
readinessPath: "/remoteEntry.js"
|
|
33
|
+
},
|
|
34
|
+
ui: {
|
|
35
|
+
command: "bun",
|
|
36
|
+
args: ["run", "dev"],
|
|
37
|
+
readyPatterns: [
|
|
38
|
+
/\bready\s+built in\b/i,
|
|
39
|
+
/\bLocal:\b/i,
|
|
40
|
+
/\bcompiled\b.*successfully/i
|
|
41
|
+
],
|
|
42
|
+
errorPatterns: [/error/i, /failed to compile/i],
|
|
43
|
+
defaultPort: 3003,
|
|
44
|
+
readinessPath: "/remoteEntry.js"
|
|
45
|
+
},
|
|
46
|
+
"ui-ssr": {
|
|
47
|
+
command: "bun",
|
|
48
|
+
args: ["run", "dev:ssr"],
|
|
49
|
+
readyPatterns: [/\bready\s+built in\b/i, /\bcompiled\b.*successfully/i],
|
|
50
|
+
errorPatterns: [/error/i, /failed/i],
|
|
51
|
+
defaultPort: 3004,
|
|
52
|
+
readinessPath: "/"
|
|
53
|
+
},
|
|
54
|
+
api: {
|
|
55
|
+
command: "bun",
|
|
56
|
+
args: ["run", "dev"],
|
|
57
|
+
readyPatterns: PLUGIN_READY_PATTERNS,
|
|
58
|
+
errorPatterns: PLUGIN_ERROR_PATTERNS,
|
|
59
|
+
defaultPort: 3001,
|
|
60
|
+
readinessPath: "/remoteEntry.js"
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
function buildServiceDescriptorMap(runtimeConfig, options) {
|
|
64
|
+
const map = /* @__PURE__ */ new Map();
|
|
65
|
+
const ssr = options?.ssr ?? false;
|
|
66
|
+
const hostIsRemote = runtimeConfig.host.source === "remote";
|
|
67
|
+
const hostProbeUrl = hostIsRemote ? runtimeConfig.host.remoteUrl ?? runtimeConfig.host.url : runtimeConfig.host.url;
|
|
68
|
+
map.set("host", {
|
|
69
|
+
key: "host",
|
|
70
|
+
source: runtimeConfig.host.source,
|
|
71
|
+
url: hostProbeUrl,
|
|
72
|
+
remoteUrl: runtimeConfig.host.remoteUrl,
|
|
73
|
+
entry: hostIsRemote ? hostProbeUrl ? `${hostProbeUrl}/mf-manifest.json` : "/mf-manifest.json" : runtimeConfig.host.entry,
|
|
74
|
+
name: runtimeConfig.host.name,
|
|
75
|
+
localPath: runtimeConfig.host.localPath,
|
|
76
|
+
port: runtimeConfig.host.port,
|
|
77
|
+
integrity: runtimeConfig.host.integrity,
|
|
78
|
+
secrets: runtimeConfig.host.secrets,
|
|
79
|
+
...SERVICE_CONFIGS.host
|
|
80
|
+
});
|
|
81
|
+
map.set("ui", {
|
|
82
|
+
key: "ui",
|
|
83
|
+
source: runtimeConfig.ui.source,
|
|
84
|
+
url: runtimeConfig.ui.url,
|
|
85
|
+
remoteUrl: runtimeConfig.ui.source === "remote" ? runtimeConfig.ui.url : void 0,
|
|
86
|
+
entry: runtimeConfig.ui.entry,
|
|
87
|
+
name: runtimeConfig.ui.name,
|
|
88
|
+
localPath: runtimeConfig.ui.localPath,
|
|
89
|
+
port: runtimeConfig.ui.port,
|
|
90
|
+
integrity: runtimeConfig.ui.integrity,
|
|
91
|
+
ssr,
|
|
92
|
+
...SERVICE_CONFIGS.ui
|
|
93
|
+
});
|
|
94
|
+
if (ssr && runtimeConfig.ui.source === "local") map.set("ui-ssr", {
|
|
95
|
+
key: "ui-ssr",
|
|
96
|
+
source: runtimeConfig.ui.source,
|
|
97
|
+
url: runtimeConfig.ui.ssrUrl ?? "",
|
|
98
|
+
entry: "",
|
|
99
|
+
name: "ui-ssr",
|
|
100
|
+
localPath: runtimeConfig.ui.localPath,
|
|
101
|
+
port: runtimeConfig.ui.ssrUrl ? Number.parseInt(new URL(runtimeConfig.ui.ssrUrl).port, 10) : (runtimeConfig.ui.port ?? 3003) + 1,
|
|
102
|
+
...SERVICE_CONFIGS["ui-ssr"]
|
|
103
|
+
});
|
|
104
|
+
map.set("api", {
|
|
105
|
+
key: "api",
|
|
106
|
+
source: runtimeConfig.api.source,
|
|
107
|
+
url: runtimeConfig.api.url,
|
|
108
|
+
remoteUrl: runtimeConfig.api.source === "remote" ? runtimeConfig.api.url : void 0,
|
|
109
|
+
entry: runtimeConfig.api.entry,
|
|
110
|
+
name: runtimeConfig.api.name,
|
|
111
|
+
localPath: runtimeConfig.api.localPath,
|
|
112
|
+
port: runtimeConfig.api.port,
|
|
113
|
+
integrity: runtimeConfig.api.integrity,
|
|
114
|
+
proxy: runtimeConfig.api.proxy,
|
|
115
|
+
variables: runtimeConfig.api.variables,
|
|
116
|
+
secrets: runtimeConfig.api.secrets,
|
|
117
|
+
...SERVICE_CONFIGS.api
|
|
118
|
+
});
|
|
119
|
+
if (runtimeConfig.auth) map.set("auth", {
|
|
120
|
+
key: "auth",
|
|
121
|
+
source: runtimeConfig.auth.source,
|
|
122
|
+
url: runtimeConfig.auth.url,
|
|
123
|
+
remoteUrl: runtimeConfig.auth.source === "remote" ? runtimeConfig.auth.url : void 0,
|
|
124
|
+
entry: runtimeConfig.auth.entry,
|
|
125
|
+
name: runtimeConfig.auth.name,
|
|
126
|
+
localPath: runtimeConfig.auth.localPath,
|
|
127
|
+
port: runtimeConfig.auth.port,
|
|
128
|
+
integrity: runtimeConfig.auth.integrity,
|
|
129
|
+
proxy: runtimeConfig.auth.proxy,
|
|
130
|
+
variables: runtimeConfig.auth.variables,
|
|
131
|
+
secrets: runtimeConfig.auth.secrets,
|
|
132
|
+
...SERVICE_CONFIGS.auth
|
|
133
|
+
});
|
|
134
|
+
if (runtimeConfig.plugins) {
|
|
135
|
+
let pluginBasePort = 3010;
|
|
136
|
+
for (const [pluginId, pluginConfig] of Object.entries(runtimeConfig.plugins)) {
|
|
137
|
+
const pluginKey = `plugin:${pluginId}`;
|
|
138
|
+
const resolvedPort = pluginConfig.port ?? pluginBasePort;
|
|
139
|
+
pluginBasePort = resolvedPort + 1;
|
|
140
|
+
map.set(pluginKey, {
|
|
141
|
+
key: pluginKey,
|
|
142
|
+
source: pluginConfig.source,
|
|
143
|
+
url: pluginConfig.url,
|
|
144
|
+
remoteUrl: pluginConfig.source === "remote" ? pluginConfig.url : void 0,
|
|
145
|
+
entry: pluginConfig.entry,
|
|
146
|
+
name: pluginConfig.name,
|
|
147
|
+
localPath: pluginConfig.localPath,
|
|
148
|
+
port: resolvedPort,
|
|
149
|
+
integrity: pluginConfig.integrity,
|
|
150
|
+
proxy: pluginConfig.proxy,
|
|
151
|
+
variables: pluginConfig.variables,
|
|
152
|
+
secrets: pluginConfig.secrets,
|
|
153
|
+
command: "bun",
|
|
154
|
+
args: ["run", "dev"],
|
|
155
|
+
readyPatterns: PLUGIN_READY_PATTERNS,
|
|
156
|
+
errorPatterns: PLUGIN_ERROR_PATTERNS,
|
|
157
|
+
defaultPort: resolvedPort,
|
|
158
|
+
readinessPath: "/remoteEntry.js"
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
return map;
|
|
163
|
+
}
|
|
164
|
+
const ServiceDescriptorMapLive = (map) => Layer.succeed(ServiceDescriptorMap, map);
|
|
165
|
+
const DevRuntimeConfigLive = (config) => Layer.succeed(DevRuntimeConfig, config);
|
|
166
|
+
function buildDescription(map) {
|
|
167
|
+
const descriptors = [...map.values()].filter((d) => d.key !== "ui-ssr" && !d.key.startsWith("plugin:"));
|
|
168
|
+
const allLocal = descriptors.every((d) => d.source === "local");
|
|
169
|
+
const hasProxy = [...map.values()].some((d) => d.proxy && d.source === "local");
|
|
170
|
+
if (allLocal && !hasProxy) return "Full Local Development";
|
|
171
|
+
const parts = [];
|
|
172
|
+
for (const d of descriptors) if (d.source === "remote") {
|
|
173
|
+
const label = d.key === "host" ? "Remote Host" : d.key === "ui" ? "Remote UI" : d.key === "api" ? hasProxy ? void 0 : "Remote API" : d.key === "auth" ? "Remote Auth" : void 0;
|
|
174
|
+
if (label) parts.push(label);
|
|
175
|
+
}
|
|
176
|
+
if (hasProxy) parts.push("Proxy API → Production");
|
|
177
|
+
return parts.join(" + ") || "Remote Mode";
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
//#endregion
|
|
181
|
+
export { DevRuntimeConfig, DevRuntimeConfigLive, ServiceDescriptorMap, ServiceDescriptorMapLive, buildDescription, buildServiceDescriptorMap };
|
|
182
|
+
//# sourceMappingURL=service-descriptor.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-descriptor.mjs","names":[],"sources":["../src/service-descriptor.ts"],"sourcesContent":["import { Context, Layer } from \"effect\";\nimport type { RuntimeConfig, SourceMode } from \"./types\";\n\nexport interface ServiceDescriptor {\n key: string;\n source: SourceMode;\n url: string;\n remoteUrl?: string;\n entry: string;\n name: string;\n localPath?: string;\n port?: number;\n readinessPath: string;\n defaultPort: number;\n integrity?: string;\n proxy?: string;\n variables?: Record<string, string>;\n secrets?: string[];\n ssr?: boolean;\n command?: string;\n args?: string[];\n readyPatterns?: RegExp[];\n errorPatterns?: RegExp[];\n}\n\nexport class ServiceDescriptorMap extends Context.Tag(\"ServiceDescriptorMap\")<\n ServiceDescriptorMap,\n Map<string, ServiceDescriptor>\n>() {}\n\nexport class DevRuntimeConfig extends Context.Tag(\"DevRuntimeConfig\")<\n DevRuntimeConfig,\n RuntimeConfig\n>() {}\n\nconst PLUGIN_READY_PATTERNS = [/ready in/i, /compiled.*successfully/i, /listening/i, /started/i];\n\nconst PLUGIN_ERROR_PATTERNS = [/error/i, /failed/i];\n\nconst SERVICE_CONFIGS: Record<\n string,\n Pick<\n ServiceDescriptor,\n \"command\" | \"args\" | \"readyPatterns\" | \"errorPatterns\" | \"defaultPort\" | \"readinessPath\"\n >\n> = {\n host: {\n command: \"bun\",\n args: [\"run\", \"dev\"],\n readyPatterns: [/Host (dev|production) server running at/i, /Server running at/i],\n errorPatterns: [/error:/i, /failed/i, /exception/i],\n defaultPort: 3000,\n readinessPath: \"/health\",\n },\n auth: {\n command: \"bun\",\n args: [\"run\", \"dev\"],\n readyPatterns: PLUGIN_READY_PATTERNS,\n errorPatterns: PLUGIN_ERROR_PATTERNS,\n defaultPort: 3002,\n readinessPath: \"/remoteEntry.js\",\n },\n ui: {\n command: \"bun\",\n args: [\"run\", \"dev\"],\n readyPatterns: [/\\bready\\s+built in\\b/i, /\\bLocal:\\b/i, /\\bcompiled\\b.*successfully/i],\n errorPatterns: [/error/i, /failed to compile/i],\n defaultPort: 3003,\n readinessPath: \"/remoteEntry.js\",\n },\n \"ui-ssr\": {\n command: \"bun\",\n args: [\"run\", \"dev:ssr\"],\n readyPatterns: [/\\bready\\s+built in\\b/i, /\\bcompiled\\b.*successfully/i],\n errorPatterns: [/error/i, /failed/i],\n defaultPort: 3004,\n readinessPath: \"/\",\n },\n api: {\n command: \"bun\",\n args: [\"run\", \"dev\"],\n readyPatterns: PLUGIN_READY_PATTERNS,\n errorPatterns: PLUGIN_ERROR_PATTERNS,\n defaultPort: 3001,\n readinessPath: \"/remoteEntry.js\",\n },\n};\n\nexport function buildServiceDescriptorMap(\n runtimeConfig: RuntimeConfig,\n options?: { ssr?: boolean; proxy?: boolean },\n): Map<string, ServiceDescriptor> {\n const map = new Map<string, ServiceDescriptor>();\n const ssr = options?.ssr ?? false;\n\n const hostIsRemote = runtimeConfig.host.source === \"remote\";\n const hostProbeUrl = hostIsRemote\n ? (runtimeConfig.host.remoteUrl ?? runtimeConfig.host.url)\n : runtimeConfig.host.url;\n map.set(\"host\", {\n key: \"host\",\n source: runtimeConfig.host.source,\n url: hostProbeUrl,\n remoteUrl: runtimeConfig.host.remoteUrl,\n entry: hostIsRemote\n ? hostProbeUrl\n ? `${hostProbeUrl}/mf-manifest.json`\n : \"/mf-manifest.json\"\n : runtimeConfig.host.entry,\n name: runtimeConfig.host.name,\n localPath: runtimeConfig.host.localPath,\n port: runtimeConfig.host.port,\n integrity: runtimeConfig.host.integrity,\n secrets: runtimeConfig.host.secrets,\n ...SERVICE_CONFIGS.host,\n });\n\n map.set(\"ui\", {\n key: \"ui\",\n source: runtimeConfig.ui.source,\n url: runtimeConfig.ui.url,\n remoteUrl: runtimeConfig.ui.source === \"remote\" ? runtimeConfig.ui.url : undefined,\n entry: runtimeConfig.ui.entry,\n name: runtimeConfig.ui.name,\n localPath: runtimeConfig.ui.localPath,\n port: runtimeConfig.ui.port,\n integrity: runtimeConfig.ui.integrity,\n ssr,\n ...SERVICE_CONFIGS.ui,\n });\n\n if (ssr && runtimeConfig.ui.source === \"local\") {\n map.set(\"ui-ssr\", {\n key: \"ui-ssr\",\n source: runtimeConfig.ui.source,\n url: runtimeConfig.ui.ssrUrl ?? \"\",\n entry: \"\",\n name: \"ui-ssr\",\n localPath: runtimeConfig.ui.localPath,\n port: runtimeConfig.ui.ssrUrl\n ? Number.parseInt(new URL(runtimeConfig.ui.ssrUrl).port, 10)\n : (runtimeConfig.ui.port ?? 3003) + 1,\n ...SERVICE_CONFIGS[\"ui-ssr\"],\n });\n }\n\n map.set(\"api\", {\n key: \"api\",\n source: runtimeConfig.api.source,\n url: runtimeConfig.api.url,\n remoteUrl: runtimeConfig.api.source === \"remote\" ? runtimeConfig.api.url : undefined,\n entry: runtimeConfig.api.entry,\n name: runtimeConfig.api.name,\n localPath: runtimeConfig.api.localPath,\n port: runtimeConfig.api.port,\n integrity: runtimeConfig.api.integrity,\n proxy: runtimeConfig.api.proxy,\n variables: runtimeConfig.api.variables,\n secrets: runtimeConfig.api.secrets,\n ...SERVICE_CONFIGS.api,\n });\n\n if (runtimeConfig.auth) {\n map.set(\"auth\", {\n key: \"auth\",\n source: runtimeConfig.auth.source,\n url: runtimeConfig.auth.url,\n remoteUrl: runtimeConfig.auth.source === \"remote\" ? runtimeConfig.auth.url : undefined,\n entry: runtimeConfig.auth.entry,\n name: runtimeConfig.auth.name,\n localPath: runtimeConfig.auth.localPath,\n port: runtimeConfig.auth.port,\n integrity: runtimeConfig.auth.integrity,\n proxy: runtimeConfig.auth.proxy,\n variables: runtimeConfig.auth.variables,\n secrets: runtimeConfig.auth.secrets,\n ...SERVICE_CONFIGS.auth,\n });\n }\n\n if (runtimeConfig.plugins) {\n let pluginBasePort = 3010;\n for (const [pluginId, pluginConfig] of Object.entries(runtimeConfig.plugins)) {\n const pluginKey = `plugin:${pluginId}`;\n const resolvedPort = pluginConfig.port ?? pluginBasePort;\n pluginBasePort = resolvedPort + 1;\n\n map.set(pluginKey, {\n key: pluginKey,\n source: pluginConfig.source,\n url: pluginConfig.url,\n remoteUrl: pluginConfig.source === \"remote\" ? pluginConfig.url : undefined,\n entry: pluginConfig.entry,\n name: pluginConfig.name,\n localPath: pluginConfig.localPath,\n port: resolvedPort,\n integrity: pluginConfig.integrity,\n proxy: pluginConfig.proxy,\n variables: pluginConfig.variables,\n secrets: pluginConfig.secrets,\n command: \"bun\",\n args: [\"run\", \"dev\"],\n readyPatterns: PLUGIN_READY_PATTERNS,\n errorPatterns: PLUGIN_ERROR_PATTERNS,\n defaultPort: resolvedPort,\n readinessPath: \"/remoteEntry.js\",\n });\n }\n }\n\n return map;\n}\n\nexport interface AppOrchestrator {\n packages: string[];\n description: string;\n env: Record<string, string>;\n port?: number;\n interactive?: boolean;\n noLogs?: boolean;\n}\n\nexport const ServiceDescriptorMapLive = (map: Map<string, ServiceDescriptor>) =>\n Layer.succeed(ServiceDescriptorMap, map);\n\nexport const DevRuntimeConfigLive = (config: RuntimeConfig) =>\n Layer.succeed(DevRuntimeConfig, config);\n\nexport function buildDescription(map: Map<string, ServiceDescriptor>): string {\n const descriptors = [...map.values()].filter(\n (d) => d.key !== \"ui-ssr\" && !d.key.startsWith(\"plugin:\"),\n );\n\n const allLocal = descriptors.every((d) => d.source === \"local\");\n const hasProxy = [...map.values()].some((d) => d.proxy && d.source === \"local\");\n if (allLocal && !hasProxy) return \"Full Local Development\";\n\n const parts: string[] = [];\n for (const d of descriptors) {\n if (d.source === \"remote\") {\n const label =\n d.key === \"host\"\n ? \"Remote Host\"\n : d.key === \"ui\"\n ? \"Remote UI\"\n : d.key === \"api\"\n ? hasProxy\n ? undefined\n : \"Remote API\"\n : d.key === \"auth\"\n ? \"Remote Auth\"\n : undefined;\n if (label) parts.push(label);\n }\n }\n if (hasProxy) parts.push(\"Proxy API → Production\");\n return parts.join(\" + \") || \"Remote Mode\";\n}\n"],"mappings":";;;AAyBA,IAAa,uBAAb,cAA0C,QAAQ,IAAI,uBAAuB,EAG1E,CAAC;AAEJ,IAAa,mBAAb,cAAsC,QAAQ,IAAI,mBAAmB,EAGlE,CAAC;AAEJ,MAAM,wBAAwB;CAAC;CAAa;CAA2B;CAAc;CAAW;AAEhG,MAAM,wBAAwB,CAAC,UAAU,UAAU;AAEnD,MAAM,kBAMF;CACF,MAAM;EACJ,SAAS;EACT,MAAM,CAAC,OAAO,MAAM;EACpB,eAAe,CAAC,4CAA4C,qBAAqB;EACjF,eAAe;GAAC;GAAW;GAAW;GAAa;EACnD,aAAa;EACb,eAAe;EAChB;CACD,MAAM;EACJ,SAAS;EACT,MAAM,CAAC,OAAO,MAAM;EACpB,eAAe;EACf,eAAe;EACf,aAAa;EACb,eAAe;EAChB;CACD,IAAI;EACF,SAAS;EACT,MAAM,CAAC,OAAO,MAAM;EACpB,eAAe;GAAC;GAAyB;GAAe;GAA8B;EACtF,eAAe,CAAC,UAAU,qBAAqB;EAC/C,aAAa;EACb,eAAe;EAChB;CACD,UAAU;EACR,SAAS;EACT,MAAM,CAAC,OAAO,UAAU;EACxB,eAAe,CAAC,yBAAyB,8BAA8B;EACvE,eAAe,CAAC,UAAU,UAAU;EACpC,aAAa;EACb,eAAe;EAChB;CACD,KAAK;EACH,SAAS;EACT,MAAM,CAAC,OAAO,MAAM;EACpB,eAAe;EACf,eAAe;EACf,aAAa;EACb,eAAe;EAChB;CACF;AAED,SAAgB,0BACd,eACA,SACgC;CAChC,MAAM,sBAAM,IAAI,KAAgC;CAChD,MAAM,MAA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