everything-dev 1.14.0 → 1.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/upgrade.cjs +2 -1
- package/dist/cli/upgrade.cjs.map +1 -1
- package/dist/cli/upgrade.mjs +2 -1
- package/dist/cli/upgrade.mjs.map +1 -1
- package/dist/contract.d.cts +31 -31
- package/dist/contract.d.mts +31 -31
- package/dist/orchestrator.cjs +0 -1
- package/dist/orchestrator.cjs.map +1 -1
- package/dist/plugin.cjs +39 -44
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.cts +31 -31
- package/dist/plugin.d.mts +31 -31
- package/dist/plugin.mjs +39 -44
- package/dist/plugin.mjs.map +1 -1
- package/dist/shared.cjs +0 -10
- package/dist/shared.cjs.map +1 -1
- package/dist/shared.mjs +1 -9
- package/dist/shared.mjs.map +1 -1
- package/package.json +4 -30
- package/src/cli/upgrade.ts +1 -0
- package/src/plugin.ts +57 -49
- package/dist/api.cjs +0 -124
- package/dist/api.cjs.map +0 -1
- package/dist/api.d.cts +0 -36
- package/dist/api.d.cts.map +0 -1
- package/dist/api.d.mts +0 -36
- package/dist/api.d.mts.map +0 -1
- package/dist/api.mjs +0 -119
- package/dist/api.mjs.map +0 -1
- package/dist/federation.server.cjs +0 -27
- package/dist/federation.server.cjs.map +0 -1
- package/dist/federation.server.mjs +0 -27
- package/dist/federation.server.mjs.map +0 -1
- package/dist/host.cjs +0 -402
- package/dist/host.cjs.map +0 -1
- package/dist/host.d.cts +0 -22
- package/dist/host.d.cts.map +0 -1
- package/dist/host.d.mts +0 -22
- package/dist/host.d.mts.map +0 -1
- package/dist/host.mjs +0 -399
- package/dist/host.mjs.map +0 -1
- package/dist/orchestrator.d.cts +0 -44
- package/dist/orchestrator.d.cts.map +0 -1
- package/dist/orchestrator.d.mts +0 -44
- package/dist/orchestrator.d.mts.map +0 -1
- package/dist/service-descriptor.d.cts +0 -137
- package/dist/service-descriptor.d.cts.map +0 -1
- package/dist/service-descriptor.d.mts +0 -137
- package/dist/service-descriptor.d.mts.map +0 -1
- package/dist/shared.d.cts +0 -36
- package/dist/shared.d.cts.map +0 -1
- package/dist/shared.d.mts +0 -36
- package/dist/shared.d.mts.map +0 -1
- package/src/api.ts +0 -181
- package/src/federation.server.ts +0 -43
- package/src/host.ts +0 -573
package/dist/plugin.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { z } from "./sdk.mjs";
|
|
2
|
+
import { ContractProcedure, MergedErrorMap, Schema } from "./node_modules/@orpc/contract/dist/shared/contract.TuRtB1Ca.mjs";
|
|
2
3
|
import * as _$every_plugin0 from "every-plugin";
|
|
3
|
-
import * as _$_orpc_contract0 from "@orpc/contract";
|
|
4
4
|
|
|
5
5
|
//#region src/plugin.d.ts
|
|
6
6
|
declare const _default: _$every_plugin0.LoadedPluginWithBinding<{
|
|
7
|
-
dev:
|
|
7
|
+
dev: ContractProcedure<z.ZodObject<{
|
|
8
8
|
host: z.ZodDefault<z.ZodEnum<{
|
|
9
9
|
local: "local";
|
|
10
10
|
remote: "remote";
|
|
@@ -32,8 +32,8 @@ declare const _default: _$every_plugin0.LoadedPluginWithBinding<{
|
|
|
32
32
|
}>;
|
|
33
33
|
description: z.ZodString;
|
|
34
34
|
processes: z.ZodArray<z.ZodString>;
|
|
35
|
-
}, z.core.$strip>,
|
|
36
|
-
start:
|
|
35
|
+
}, z.core.$strip>, MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
|
|
36
|
+
start: ContractProcedure<z.ZodObject<{
|
|
37
37
|
port: z.ZodOptional<z.ZodNumber>;
|
|
38
38
|
interactive: z.ZodOptional<z.ZodBoolean>;
|
|
39
39
|
account: z.ZodOptional<z.ZodString>;
|
|
@@ -49,8 +49,8 @@ declare const _default: _$every_plugin0.LoadedPluginWithBinding<{
|
|
|
49
49
|
}>;
|
|
50
50
|
url: z.ZodString;
|
|
51
51
|
error: z.ZodOptional<z.ZodString>;
|
|
52
|
-
}, z.core.$strip>,
|
|
53
|
-
build:
|
|
52
|
+
}, z.core.$strip>, MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
|
|
53
|
+
build: ContractProcedure<z.ZodObject<{
|
|
54
54
|
packages: z.ZodDefault<z.ZodString>;
|
|
55
55
|
force: z.ZodDefault<z.ZodBoolean>;
|
|
56
56
|
deploy: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -62,8 +62,8 @@ declare const _default: _$every_plugin0.LoadedPluginWithBinding<{
|
|
|
62
62
|
built: z.ZodArray<z.ZodString>;
|
|
63
63
|
skipped: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
64
64
|
deployed: z.ZodOptional<z.ZodBoolean>;
|
|
65
|
-
}, z.core.$strip>,
|
|
66
|
-
config:
|
|
65
|
+
}, z.core.$strip>, MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
|
|
66
|
+
config: ContractProcedure<Schema<unknown, unknown>, z.ZodObject<{
|
|
67
67
|
config: z.ZodNullable<z.ZodObject<{
|
|
68
68
|
account: z.ZodString;
|
|
69
69
|
extends: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
@@ -178,8 +178,8 @@ declare const _default: _$every_plugin0.LoadedPluginWithBinding<{
|
|
|
178
178
|
}, z.core.$strip>>;
|
|
179
179
|
packages: z.ZodArray<z.ZodString>;
|
|
180
180
|
remotes: z.ZodArray<z.ZodString>;
|
|
181
|
-
}, z.core.$strip>,
|
|
182
|
-
pluginAdd:
|
|
181
|
+
}, z.core.$strip>, MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
|
|
182
|
+
pluginAdd: ContractProcedure<z.ZodObject<{
|
|
183
183
|
source: z.ZodString;
|
|
184
184
|
as: z.ZodOptional<z.ZodString>;
|
|
185
185
|
production: z.ZodOptional<z.ZodString>;
|
|
@@ -194,8 +194,8 @@ declare const _default: _$every_plugin0.LoadedPluginWithBinding<{
|
|
|
194
194
|
integrity: z.ZodOptional<z.ZodString>;
|
|
195
195
|
version: z.ZodOptional<z.ZodString>;
|
|
196
196
|
error: z.ZodOptional<z.ZodString>;
|
|
197
|
-
}, z.core.$strip>,
|
|
198
|
-
pluginRemove:
|
|
197
|
+
}, z.core.$strip>, MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
|
|
198
|
+
pluginRemove: ContractProcedure<z.ZodObject<{
|
|
199
199
|
key: z.ZodString;
|
|
200
200
|
}, z.core.$strip>, z.ZodObject<{
|
|
201
201
|
status: z.ZodEnum<{
|
|
@@ -204,8 +204,8 @@ declare const _default: _$every_plugin0.LoadedPluginWithBinding<{
|
|
|
204
204
|
}>;
|
|
205
205
|
key: z.ZodString;
|
|
206
206
|
error: z.ZodOptional<z.ZodString>;
|
|
207
|
-
}, z.core.$strip>,
|
|
208
|
-
pluginList:
|
|
207
|
+
}, z.core.$strip>, MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
|
|
208
|
+
pluginList: ContractProcedure<Schema<unknown, unknown>, z.ZodObject<{
|
|
209
209
|
status: z.ZodEnum<{
|
|
210
210
|
error: "error";
|
|
211
211
|
listed: "listed";
|
|
@@ -224,8 +224,8 @@ declare const _default: _$every_plugin0.LoadedPluginWithBinding<{
|
|
|
224
224
|
name: z.ZodOptional<z.ZodString>;
|
|
225
225
|
}, z.core.$strip>>;
|
|
226
226
|
error: z.ZodOptional<z.ZodString>;
|
|
227
|
-
}, z.core.$strip>,
|
|
228
|
-
pluginPublish:
|
|
227
|
+
}, z.core.$strip>, MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
|
|
228
|
+
pluginPublish: ContractProcedure<z.ZodObject<{
|
|
229
229
|
key: z.ZodString;
|
|
230
230
|
}, z.core.$strip>, z.ZodObject<{
|
|
231
231
|
status: z.ZodEnum<{
|
|
@@ -239,8 +239,8 @@ declare const _default: _$every_plugin0.LoadedPluginWithBinding<{
|
|
|
239
239
|
integrity: z.ZodOptional<z.ZodString>;
|
|
240
240
|
version: z.ZodOptional<z.ZodString>;
|
|
241
241
|
error: z.ZodOptional<z.ZodString>;
|
|
242
|
-
}, z.core.$strip>,
|
|
243
|
-
publish:
|
|
242
|
+
}, z.core.$strip>, MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
|
|
243
|
+
publish: ContractProcedure<z.ZodObject<{
|
|
244
244
|
deploy: z.ZodDefault<z.ZodBoolean>;
|
|
245
245
|
dryRun: z.ZodDefault<z.ZodBoolean>;
|
|
246
246
|
packages: z.ZodDefault<z.ZodString>;
|
|
@@ -260,8 +260,8 @@ declare const _default: _$every_plugin0.LoadedPluginWithBinding<{
|
|
|
260
260
|
error: z.ZodOptional<z.ZodString>;
|
|
261
261
|
built: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
262
262
|
skipped: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
263
|
-
}, z.core.$strip>,
|
|
264
|
-
keyPublish:
|
|
263
|
+
}, z.core.$strip>, MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
|
|
264
|
+
keyPublish: ContractProcedure<z.ZodObject<{
|
|
265
265
|
allowance: z.ZodDefault<z.ZodString>;
|
|
266
266
|
}, z.core.$strip>, z.ZodObject<{
|
|
267
267
|
status: z.ZodEnum<{
|
|
@@ -279,8 +279,8 @@ declare const _default: _$every_plugin0.LoadedPluginWithBinding<{
|
|
|
279
279
|
publicKey: z.ZodOptional<z.ZodString>;
|
|
280
280
|
privateKey: z.ZodOptional<z.ZodString>;
|
|
281
281
|
error: z.ZodOptional<z.ZodString>;
|
|
282
|
-
}, z.core.$strip>,
|
|
283
|
-
init:
|
|
282
|
+
}, z.core.$strip>, MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
|
|
283
|
+
init: ContractProcedure<z.ZodObject<{
|
|
284
284
|
extends: z.ZodOptional<z.ZodString>;
|
|
285
285
|
extendsAccount: z.ZodOptional<z.ZodString>;
|
|
286
286
|
extendsGateway: z.ZodOptional<z.ZodString>;
|
|
@@ -306,8 +306,8 @@ declare const _default: _$every_plugin0.LoadedPluginWithBinding<{
|
|
|
306
306
|
plugins: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
307
307
|
filesCopied: z.ZodNumber;
|
|
308
308
|
error: z.ZodOptional<z.ZodString>;
|
|
309
|
-
}, z.core.$strip>,
|
|
310
|
-
sync:
|
|
309
|
+
}, z.core.$strip>, MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
|
|
310
|
+
sync: ContractProcedure<z.ZodObject<{
|
|
311
311
|
dryRun: z.ZodDefault<z.ZodBoolean>;
|
|
312
312
|
force: z.ZodDefault<z.ZodBoolean>;
|
|
313
313
|
noInstall: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -321,8 +321,8 @@ declare const _default: _$every_plugin0.LoadedPluginWithBinding<{
|
|
|
321
321
|
skipped: z.ZodArray<z.ZodString>;
|
|
322
322
|
added: z.ZodArray<z.ZodString>;
|
|
323
323
|
error: z.ZodOptional<z.ZodString>;
|
|
324
|
-
}, z.core.$strip>,
|
|
325
|
-
upgrade:
|
|
324
|
+
}, z.core.$strip>, MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
|
|
325
|
+
upgrade: ContractProcedure<z.ZodObject<{
|
|
326
326
|
dryRun: z.ZodDefault<z.ZodBoolean>;
|
|
327
327
|
force: z.ZodDefault<z.ZodBoolean>;
|
|
328
328
|
noInstall: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -352,8 +352,8 @@ declare const _default: _$every_plugin0.LoadedPluginWithBinding<{
|
|
|
352
352
|
migrated: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
353
353
|
changelogUrl: z.ZodOptional<z.ZodString>;
|
|
354
354
|
error: z.ZodOptional<z.ZodString>;
|
|
355
|
-
}, z.core.$strip>,
|
|
356
|
-
status:
|
|
355
|
+
}, z.core.$strip>, MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
|
|
356
|
+
status: ContractProcedure<Schema<unknown, unknown>, z.ZodObject<{
|
|
357
357
|
status: z.ZodEnum<{
|
|
358
358
|
error: "error";
|
|
359
359
|
ok: "ok";
|
|
@@ -374,8 +374,8 @@ declare const _default: _$every_plugin0.LoadedPluginWithBinding<{
|
|
|
374
374
|
}>;
|
|
375
375
|
parentReachable: z.ZodOptional<z.ZodBoolean>;
|
|
376
376
|
error: z.ZodOptional<z.ZodString>;
|
|
377
|
-
}, z.core.$strip>,
|
|
378
|
-
typesGen:
|
|
377
|
+
}, z.core.$strip>, MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
|
|
378
|
+
typesGen: ContractProcedure<z.ZodObject<{
|
|
379
379
|
env: z.ZodOptional<z.ZodEnum<{
|
|
380
380
|
development: "development";
|
|
381
381
|
production: "production";
|
|
@@ -395,7 +395,7 @@ declare const _default: _$every_plugin0.LoadedPluginWithBinding<{
|
|
|
395
395
|
remote: "remote";
|
|
396
396
|
}>>;
|
|
397
397
|
error: z.ZodOptional<z.ZodString>;
|
|
398
|
-
}, z.core.$strip>,
|
|
398
|
+
}, z.core.$strip>, MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
|
|
399
399
|
}, z.ZodObject<{
|
|
400
400
|
configPath: z.ZodOptional<z.ZodString>;
|
|
401
401
|
}, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, undefined, {
|
package/dist/plugin.mjs
CHANGED
|
@@ -145,18 +145,21 @@ function listPluginAttachments(config) {
|
|
|
145
145
|
};
|
|
146
146
|
}).sort((a, b) => a.key.localeCompare(b.key));
|
|
147
147
|
}
|
|
148
|
-
async function
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
await syncApiContractBridge({
|
|
148
|
+
async function generateCodeArtifacts(configDir, config, opts) {
|
|
149
|
+
writePluginSidebarGen(configDir, config);
|
|
150
|
+
if (opts?.env) writeResolvedConfig(configDir, config, opts.env, opts.extendsChain);
|
|
151
|
+
const runtimeConfig = opts?.runtimeConfig ?? (await loadConfig({ cwd: configDir }))?.runtime;
|
|
152
|
+
if (!runtimeConfig) return null;
|
|
153
|
+
const bridge = await syncApiContractBridge({
|
|
155
154
|
configDir,
|
|
156
|
-
runtimeConfig
|
|
157
|
-
apiBaseUrl:
|
|
155
|
+
runtimeConfig,
|
|
156
|
+
apiBaseUrl: runtimeConfig.api.url
|
|
158
157
|
});
|
|
159
|
-
|
|
158
|
+
return {
|
|
159
|
+
sidebarPath: join(configDir, "ui/src/lib/plugin-sidebar.gen.ts"),
|
|
160
|
+
resolvedConfigPath: opts?.env ? join(configDir, ".bos/bos.resolved-config.json") : void 0,
|
|
161
|
+
contractBridgePath: bridge.bridgePath
|
|
162
|
+
};
|
|
160
163
|
}
|
|
161
164
|
function extractPublishedUrl(output) {
|
|
162
165
|
const match = output.match(/https?:\/\/[^\s"'<>]+/g);
|
|
@@ -320,7 +323,7 @@ var plugin_default = createPlugin({
|
|
|
320
323
|
plugins: nextPlugins
|
|
321
324
|
};
|
|
322
325
|
await saveBosConfig(deps.configDir, deps.bosConfig);
|
|
323
|
-
await
|
|
326
|
+
await generateCodeArtifacts(deps.configDir, deps.bosConfig);
|
|
324
327
|
const stored = deps.bosConfig.plugins?.[key];
|
|
325
328
|
const storedObj = stored && typeof stored === "object" ? stored : {};
|
|
326
329
|
return {
|
|
@@ -350,7 +353,7 @@ var plugin_default = createPlugin({
|
|
|
350
353
|
plugins: Object.keys(nextPlugins).length > 0 ? nextPlugins : void 0
|
|
351
354
|
};
|
|
352
355
|
await saveBosConfig(deps.configDir, deps.bosConfig);
|
|
353
|
-
await
|
|
356
|
+
await generateCodeArtifacts(deps.configDir, deps.bosConfig);
|
|
354
357
|
return {
|
|
355
358
|
status: "removed",
|
|
356
359
|
key: input.key
|
|
@@ -477,7 +480,7 @@ var plugin_default = createPlugin({
|
|
|
477
480
|
} catch (registryError) {
|
|
478
481
|
console.warn(`[publish] Plugin registry write skipped: ${registryError instanceof Error ? registryError.message : registryError}`);
|
|
479
482
|
}
|
|
480
|
-
await
|
|
483
|
+
await generateCodeArtifacts(deps.configDir, deps.bosConfig);
|
|
481
484
|
}
|
|
482
485
|
return {
|
|
483
486
|
status: "published",
|
|
@@ -509,10 +512,6 @@ var plugin_default = createPlugin({
|
|
|
509
512
|
const refreshed = await loadConfig({ cwd: deps.configDir });
|
|
510
513
|
deps.bosConfig = refreshed?.config ?? deps.bosConfig;
|
|
511
514
|
deps.runtimeConfig = refreshed?.runtime ?? deps.runtimeConfig;
|
|
512
|
-
if (deps.bosConfig) {
|
|
513
|
-
writeResolvedConfig(deps.configDir, deps.bosConfig, "development", refreshed?.source.extended);
|
|
514
|
-
writePluginSidebarGen(deps.configDir, deps.bosConfig);
|
|
515
|
-
}
|
|
516
515
|
if (!deps.bosConfig) return {
|
|
517
516
|
status: "error",
|
|
518
517
|
description: "No bos.config.json found",
|
|
@@ -535,6 +534,11 @@ var plugin_default = createPlugin({
|
|
|
535
534
|
hostPort,
|
|
536
535
|
ssr
|
|
537
536
|
});
|
|
537
|
+
await generateCodeArtifacts(deps.configDir, deps.bosConfig, {
|
|
538
|
+
env: "development",
|
|
539
|
+
extendsChain: refreshed?.source.extended,
|
|
540
|
+
runtimeConfig
|
|
541
|
+
});
|
|
538
542
|
const services = buildServiceDescriptorMap(runtimeConfig, {
|
|
539
543
|
ssr,
|
|
540
544
|
proxy
|
|
@@ -545,11 +549,6 @@ var plugin_default = createPlugin({
|
|
|
545
549
|
const proxyUrl = resolveProxyUrl(deps.bosConfig);
|
|
546
550
|
if (proxyUrl) displayEnv.API_PROXY = proxyUrl;
|
|
547
551
|
}
|
|
548
|
-
await syncApiContractBridge({
|
|
549
|
-
configDir: deps.configDir,
|
|
550
|
-
runtimeConfig,
|
|
551
|
-
apiBaseUrl: runtimeConfig.api.url
|
|
552
|
-
});
|
|
553
552
|
const orchestrator = {
|
|
554
553
|
packages,
|
|
555
554
|
env: displayEnv,
|
|
@@ -600,7 +599,10 @@ var plugin_default = createPlugin({
|
|
|
600
599
|
env: "production",
|
|
601
600
|
plugins: runtimePlugins
|
|
602
601
|
});
|
|
603
|
-
|
|
602
|
+
await generateCodeArtifacts(deps.configDir, config, {
|
|
603
|
+
env: "production",
|
|
604
|
+
runtimeConfig
|
|
605
|
+
});
|
|
604
606
|
const productionEnv = {};
|
|
605
607
|
const warnings = [];
|
|
606
608
|
if (!process.env.CORS_ORIGIN && config.domain) {
|
|
@@ -619,11 +621,6 @@ var plugin_default = createPlugin({
|
|
|
619
621
|
}
|
|
620
622
|
if (missingSecrets.length > 0) warnings.push(`Missing ${missingSecrets.length} secret(s): ${missingSecrets.join(", ")}`);
|
|
621
623
|
const services = buildServiceDescriptorMap(runtimeConfig);
|
|
622
|
-
await syncApiContractBridge({
|
|
623
|
-
configDir: deps.configDir,
|
|
624
|
-
runtimeConfig,
|
|
625
|
-
apiBaseUrl: runtimeConfig.api.url
|
|
626
|
-
});
|
|
627
624
|
const stagingEnvVars = isStaging ? { BOS_GATEWAY: config.staging?.domain ?? config.domain ?? "" } : {};
|
|
628
625
|
const configSource = remoteConfig ? `bos://${account}/${domain}` : findConfigPath() ?? "bos.config.json";
|
|
629
626
|
const configSourceHttp = remoteConfig && account && domain ? buildRegistryConfigUrl(account, domain) : void 0;
|
|
@@ -661,8 +658,6 @@ var plugin_default = createPlugin({
|
|
|
661
658
|
skipped: []
|
|
662
659
|
};
|
|
663
660
|
const buildEnv = input.deploy ? "production" : "development";
|
|
664
|
-
writeResolvedConfig(deps.configDir, deps.bosConfig, buildEnv);
|
|
665
|
-
writePluginSidebarGen(deps.configDir, deps.bosConfig);
|
|
666
661
|
const targets = selectWorkspaceTargets(input.packages, deps.bosConfig);
|
|
667
662
|
if (targets.length === 0) return {
|
|
668
663
|
status: "error",
|
|
@@ -677,10 +672,9 @@ var plugin_default = createPlugin({
|
|
|
677
672
|
env: buildEnv,
|
|
678
673
|
plugins: deps.runtimeConfig?.plugins
|
|
679
674
|
});
|
|
680
|
-
await
|
|
681
|
-
|
|
682
|
-
runtimeConfig
|
|
683
|
-
apiBaseUrl: runtimeConfig.api.url
|
|
675
|
+
await generateCodeArtifacts(deps.configDir, deps.bosConfig, {
|
|
676
|
+
env: buildEnv,
|
|
677
|
+
runtimeConfig
|
|
684
678
|
});
|
|
685
679
|
const { built, skipped } = await buildWorkspaceTargets({
|
|
686
680
|
configDir: deps.configDir,
|
|
@@ -728,6 +722,10 @@ var plugin_default = createPlugin({
|
|
|
728
722
|
skipped
|
|
729
723
|
};
|
|
730
724
|
if (input.deploy) {
|
|
725
|
+
await generateCodeArtifacts(deps.configDir, deps.bosConfig, {
|
|
726
|
+
env: "production",
|
|
727
|
+
runtimeConfig: deps.runtimeConfig ?? void 0
|
|
728
|
+
});
|
|
731
729
|
const result = await buildWorkspaceTargets({
|
|
732
730
|
configDir: deps.configDir,
|
|
733
731
|
bosConfig: deps.bosConfig,
|
|
@@ -951,7 +949,7 @@ var plugin_default = createPlugin({
|
|
|
951
949
|
await generateDatabaseMigrations(directory);
|
|
952
950
|
}
|
|
953
951
|
const initConfig = await loadConfig({ cwd: directory });
|
|
954
|
-
if (initConfig?.config)
|
|
952
|
+
if (initConfig?.config) await generateCodeArtifacts(directory, initConfig.config);
|
|
955
953
|
s.stop("Project initialized");
|
|
956
954
|
return {
|
|
957
955
|
status: "initialized",
|
|
@@ -996,7 +994,7 @@ var plugin_default = createPlugin({
|
|
|
996
994
|
const result = await syncTemplate(projectDir, input);
|
|
997
995
|
if (result.status === "synced" || result.status === "dry-run") {
|
|
998
996
|
const syncedConfig = await loadConfig({ cwd: projectDir });
|
|
999
|
-
if (syncedConfig?.config)
|
|
997
|
+
if (syncedConfig?.config) await generateCodeArtifacts(projectDir, syncedConfig.config);
|
|
1000
998
|
}
|
|
1001
999
|
return result;
|
|
1002
1000
|
} catch (error) {
|
|
@@ -1076,12 +1074,9 @@ var plugin_default = createPlugin({
|
|
|
1076
1074
|
source: refreshed.runtime.api.source
|
|
1077
1075
|
};
|
|
1078
1076
|
}
|
|
1079
|
-
|
|
1080
|
-
configDir: projectDir,
|
|
1081
|
-
runtimeConfig: refreshed.runtime,
|
|
1082
|
-
apiBaseUrl: refreshed.runtime.api.url
|
|
1083
|
-
});
|
|
1077
|
+
await generateCodeArtifacts(projectDir, refreshed.config, { runtimeConfig: refreshed.runtime });
|
|
1084
1078
|
const generated = [
|
|
1079
|
+
"ui/src/lib/plugin-sidebar.gen.ts",
|
|
1085
1080
|
"ui/src/lib/api-types.gen.ts",
|
|
1086
1081
|
"api/src/lib/plugins-types.gen.ts",
|
|
1087
1082
|
"api/src/lib/auth-types.gen.ts"
|
|
@@ -1091,10 +1086,10 @@ var plugin_default = createPlugin({
|
|
|
1091
1086
|
return {
|
|
1092
1087
|
status: "success",
|
|
1093
1088
|
generated,
|
|
1094
|
-
fetched:
|
|
1095
|
-
skipped:
|
|
1089
|
+
fetched: refreshed.runtime.api.source === "remote" ? [refreshed.runtime.api.url] : [],
|
|
1090
|
+
skipped: refreshed.runtime.api.source === "local" ? ["api (local)"] : [],
|
|
1096
1091
|
failed: [],
|
|
1097
|
-
source:
|
|
1092
|
+
source: refreshed.runtime.api.source
|
|
1098
1093
|
};
|
|
1099
1094
|
} catch (error) {
|
|
1100
1095
|
return {
|