@holo-js/cli 0.1.6 → 0.1.7
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/bin/holo.mjs +45 -31
- package/dist/{broadcast-2AZIC5ZP.mjs → broadcast-2SYWLGDX.mjs} +4 -4
- package/dist/{cache-5OROX4GL.mjs → cache-FEKU2TK4.mjs} +4 -4
- package/dist/{cache-migrations-7XFVLTOC.mjs → cache-migrations-7RLM2QIS.mjs} +5 -5
- package/dist/{chunk-UZTDQKIY.mjs → chunk-2SE5STJ2.mjs} +1 -1
- package/dist/{chunk-OZUDZEAW.mjs → chunk-3KLRV6JF.mjs} +23 -5
- package/dist/{chunk-ODJA3TFG.mjs → chunk-42ASVV4I.mjs} +6 -4
- package/dist/{chunk-MXKNQACM.mjs → chunk-GEMG3HIO.mjs} +1183 -1
- package/dist/{chunk-USACXIIB.mjs → chunk-GWW5VBKY.mjs} +86 -1139
- package/dist/{chunk-5BLEC66P.mjs → chunk-PWTS5LZZ.mjs} +1 -1
- package/dist/{config-5JSC6KJG.mjs → config-IZR77Y5M.mjs} +2 -2
- package/dist/{dev-F6QUWNCR.mjs → dev-KBHPQSHI.mjs} +5 -5
- package/dist/{discovery-JLT2EOGH.mjs → discovery-BKA2Z6PR.mjs} +2 -2
- package/dist/{generators-WVKJLAYB.mjs → generators-K7A7MNY6.mjs} +5 -5
- package/dist/index.mjs +45 -31
- package/dist/{media-migrations-DU7WEKAY.mjs → media-migrations-RBF4QZZ5.mjs} +6 -6
- package/dist/{queue-NOLVWPCH.mjs → queue-PSPL63KS.mjs} +6 -6
- package/dist/{queue-migrations-HXNTZMGL.mjs → queue-migrations-3PI7RAB3.mjs} +5 -5
- package/dist/{runtime-462O2BDR.mjs → runtime-PGE4HSSF.mjs} +5 -5
- package/dist/{scaffold-WOJV2ZZI.mjs → scaffold-AR5QZYMK.mjs} +7 -6
- package/dist/{security-5VGM467J.mjs → security-JEV55QRY.mjs} +4 -4
- package/package.json +7 -7
package/dist/bin/holo.mjs
CHANGED
|
@@ -26,10 +26,10 @@ import {
|
|
|
26
26
|
fileExists
|
|
27
27
|
} from "../chunk-57SJ566R.mjs";
|
|
28
28
|
import "../chunk-D7O4SU6N.mjs";
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
29
|
+
import "../chunk-2SE5STJ2.mjs";
|
|
30
|
+
import "../chunk-GWW5VBKY.mjs";
|
|
31
|
+
import "../chunk-PWTS5LZZ.mjs";
|
|
32
|
+
import "../chunk-GEMG3HIO.mjs";
|
|
33
33
|
import {
|
|
34
34
|
SUPPORTED_AUTH_SOCIAL_PROVIDERS
|
|
35
35
|
} from "../chunk-R6BWRY3E.mjs";
|
|
@@ -120,51 +120,51 @@ var projectDiscoveryModulePromise;
|
|
|
120
120
|
var projectRuntimeModulePromise;
|
|
121
121
|
var projectScaffoldModulePromise;
|
|
122
122
|
function loadRuntimeModule() {
|
|
123
|
-
runtimeModulePromise ??= import("../runtime-
|
|
123
|
+
runtimeModulePromise ??= import("../runtime-PGE4HSSF.mjs");
|
|
124
124
|
return runtimeModulePromise;
|
|
125
125
|
}
|
|
126
126
|
function loadQueueModule() {
|
|
127
|
-
queueModulePromise ??= import("../queue-
|
|
127
|
+
queueModulePromise ??= import("../queue-PSPL63KS.mjs");
|
|
128
128
|
return queueModulePromise;
|
|
129
129
|
}
|
|
130
130
|
function loadCacheModule() {
|
|
131
|
-
cacheModulePromise ??= import("../cache-
|
|
131
|
+
cacheModulePromise ??= import("../cache-FEKU2TK4.mjs");
|
|
132
132
|
return cacheModulePromise;
|
|
133
133
|
}
|
|
134
134
|
function loadQueueMigrationsModule() {
|
|
135
|
-
queueMigrationsModulePromise ??= import("../queue-migrations-
|
|
135
|
+
queueMigrationsModulePromise ??= import("../queue-migrations-3PI7RAB3.mjs");
|
|
136
136
|
return queueMigrationsModulePromise;
|
|
137
137
|
}
|
|
138
138
|
function loadCacheMigrationsModule() {
|
|
139
|
-
cacheMigrationsModulePromise ??= import("../cache-migrations-
|
|
139
|
+
cacheMigrationsModulePromise ??= import("../cache-migrations-7RLM2QIS.mjs");
|
|
140
140
|
return cacheMigrationsModulePromise;
|
|
141
141
|
}
|
|
142
142
|
function loadMediaMigrationsModule() {
|
|
143
|
-
mediaMigrationsModulePromise ??= import("../media-migrations-
|
|
143
|
+
mediaMigrationsModulePromise ??= import("../media-migrations-RBF4QZZ5.mjs");
|
|
144
144
|
return mediaMigrationsModulePromise;
|
|
145
145
|
}
|
|
146
146
|
function loadGeneratorsModule() {
|
|
147
|
-
generatorsModulePromise ??= import("../generators-
|
|
147
|
+
generatorsModulePromise ??= import("../generators-K7A7MNY6.mjs");
|
|
148
148
|
return generatorsModulePromise;
|
|
149
149
|
}
|
|
150
150
|
function loadBroadcastModule() {
|
|
151
|
-
broadcastModulePromise ??= import("../broadcast-
|
|
151
|
+
broadcastModulePromise ??= import("../broadcast-2SYWLGDX.mjs");
|
|
152
152
|
return broadcastModulePromise;
|
|
153
153
|
}
|
|
154
154
|
function loadSecurityModule() {
|
|
155
|
-
securityModulePromise ??= import("../security-
|
|
155
|
+
securityModulePromise ??= import("../security-JEV55QRY.mjs");
|
|
156
156
|
return securityModulePromise;
|
|
157
157
|
}
|
|
158
158
|
function loadDevModule() {
|
|
159
|
-
devModulePromise ??= import("../dev-
|
|
159
|
+
devModulePromise ??= import("../dev-KBHPQSHI.mjs");
|
|
160
160
|
return devModulePromise;
|
|
161
161
|
}
|
|
162
162
|
function loadProjectConfigModule() {
|
|
163
|
-
projectConfigModulePromise ??= import("../config-
|
|
163
|
+
projectConfigModulePromise ??= import("../config-IZR77Y5M.mjs");
|
|
164
164
|
return projectConfigModulePromise;
|
|
165
165
|
}
|
|
166
166
|
function loadProjectDiscoveryModule() {
|
|
167
|
-
projectDiscoveryModulePromise ??= import("../discovery-
|
|
167
|
+
projectDiscoveryModulePromise ??= import("../discovery-BKA2Z6PR.mjs");
|
|
168
168
|
return projectDiscoveryModulePromise;
|
|
169
169
|
}
|
|
170
170
|
function loadProjectRuntimeModule() {
|
|
@@ -172,7 +172,7 @@ function loadProjectRuntimeModule() {
|
|
|
172
172
|
return projectRuntimeModulePromise;
|
|
173
173
|
}
|
|
174
174
|
function loadProjectScaffoldModule() {
|
|
175
|
-
projectScaffoldModulePromise ??= import("../scaffold-
|
|
175
|
+
projectScaffoldModulePromise ??= import("../scaffold-AR5QZYMK.mjs");
|
|
176
176
|
return projectScaffoldModulePromise;
|
|
177
177
|
}
|
|
178
178
|
async function resolveRuntimeExecutor(runtimeExecutor) {
|
|
@@ -181,7 +181,8 @@ async function resolveRuntimeExecutor(runtimeExecutor) {
|
|
|
181
181
|
var projectExecutorLoaders = {
|
|
182
182
|
runProjectPrepare: async () => (await loadDevModule()).runProjectPrepare,
|
|
183
183
|
runProjectDevServer: async () => (await loadDevModule()).runProjectDevServer,
|
|
184
|
-
runProjectLifecycleScript: async () => (await loadDevModule()).runProjectLifecycleScript
|
|
184
|
+
runProjectLifecycleScript: async () => (await loadDevModule()).runProjectLifecycleScript,
|
|
185
|
+
runProjectDependencyInstall: async () => (await loadDevModule()).runProjectDependencyInstall
|
|
185
186
|
};
|
|
186
187
|
async function resolveProjectExecutor(projectExecutors, key) {
|
|
187
188
|
const existing = projectExecutors[key];
|
|
@@ -274,18 +275,6 @@ function printCommandHelp(io, command) {
|
|
|
274
275
|
writeLine(io.stdout, command.usage);
|
|
275
276
|
writeLine(io.stdout, command.description);
|
|
276
277
|
}
|
|
277
|
-
function resolvePackageManagerInstallCommand(packageManager) {
|
|
278
|
-
switch (packageManager) {
|
|
279
|
-
case "bun":
|
|
280
|
-
return "bun install";
|
|
281
|
-
case "npm":
|
|
282
|
-
return "npm install";
|
|
283
|
-
case "pnpm":
|
|
284
|
-
return "pnpm install";
|
|
285
|
-
case "yarn":
|
|
286
|
-
return "yarn install";
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
278
|
function resolvePackageManagerDevCommand(packageManager) {
|
|
290
279
|
switch (packageManager) {
|
|
291
280
|
case "bun":
|
|
@@ -298,6 +287,17 @@ function resolvePackageManagerDevCommand(packageManager) {
|
|
|
298
287
|
return "yarn dev";
|
|
299
288
|
}
|
|
300
289
|
}
|
|
290
|
+
async function runProjectDependencyInstallAfterPackageJsonUpdate(context, projectExecutors, updatedPackageJson) {
|
|
291
|
+
if (!updatedPackageJson) {
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
await runProjectDependencyInstallForProject(context, projectExecutors, context.projectRoot);
|
|
295
|
+
}
|
|
296
|
+
async function runProjectDependencyInstallForProject(context, projectExecutors, projectRoot) {
|
|
297
|
+
const runProjectDependencyInstall = await resolveProjectExecutor(projectExecutors, "runProjectDependencyInstall");
|
|
298
|
+
await runProjectDependencyInstall(context, projectRoot);
|
|
299
|
+
writeLine(context.stdout, " - installed dependencies");
|
|
300
|
+
}
|
|
301
301
|
function createInternalCommands(context, runtimeExecutor, queueExecutors = {}, projectExecutors = {}, broadcastExecutors = {}, securityExecutors = {}, cacheExecutors = {}, mediaExecutors = {}) {
|
|
302
302
|
return [
|
|
303
303
|
{
|
|
@@ -350,10 +350,10 @@ function createInternalCommands(context, runtimeExecutor, queueExecutors = {}, p
|
|
|
350
350
|
optionalPackages
|
|
351
351
|
});
|
|
352
352
|
writeLine(context.stdout, `Created Holo project: ${targetDir}`);
|
|
353
|
+
await runProjectDependencyInstallForProject(context, projectExecutors, targetDir);
|
|
353
354
|
writeLine(context.stdout);
|
|
354
355
|
writeLine(context.stdout, "Next steps");
|
|
355
356
|
writeLine(context.stdout, ` cd ${projectName}`);
|
|
356
|
-
writeLine(context.stdout, ` ${resolvePackageManagerInstallCommand(packageManager)}`);
|
|
357
357
|
writeLine(context.stdout, ` ${resolvePackageManagerDevCommand(packageManager)}`);
|
|
358
358
|
}
|
|
359
359
|
},
|
|
@@ -458,6 +458,11 @@ function createInternalCommands(context, runtimeExecutor, queueExecutors = {}, p
|
|
|
458
458
|
if (queueResult.updatedEnvExample) writeLine(context.stdout, " - updated .env.example");
|
|
459
459
|
if (queueResult.createdJobsDirectory) writeLine(context.stdout, " - created server/jobs");
|
|
460
460
|
}
|
|
461
|
+
await runProjectDependencyInstallAfterPackageJsonUpdate(
|
|
462
|
+
context,
|
|
463
|
+
projectExecutors,
|
|
464
|
+
eventsResult.updatedPackageJson || queueResult?.updatedPackageJson === true
|
|
465
|
+
);
|
|
461
466
|
return;
|
|
462
467
|
}
|
|
463
468
|
if (target === "auth") {
|
|
@@ -480,6 +485,7 @@ function createInternalCommands(context, runtimeExecutor, queueExecutors = {}, p
|
|
|
480
485
|
if (result2.updatedEnv) writeLine(context.stdout, " - updated .env");
|
|
481
486
|
if (result2.updatedEnvExample) writeLine(context.stdout, " - updated .env.example");
|
|
482
487
|
if (result2.createdMigrationFiles.length > 0) writeLine(context.stdout, ` - created ${result2.createdMigrationFiles.length} auth migrations`);
|
|
488
|
+
await runProjectDependencyInstallAfterPackageJsonUpdate(context, projectExecutors, result2.updatedPackageJson);
|
|
483
489
|
return;
|
|
484
490
|
}
|
|
485
491
|
if (target === "authorization") {
|
|
@@ -492,6 +498,7 @@ function createInternalCommands(context, runtimeExecutor, queueExecutors = {}, p
|
|
|
492
498
|
if (result2.createdAbilitiesDirectory) writeLine(context.stdout, " - created server/abilities");
|
|
493
499
|
if (result2.createdPoliciesReadme) writeLine(context.stdout, " - created server/policies/README.md");
|
|
494
500
|
if (result2.createdAbilitiesReadme) writeLine(context.stdout, " - created server/abilities/README.md");
|
|
501
|
+
await runProjectDependencyInstallAfterPackageJsonUpdate(context, projectExecutors, result2.updatedPackageJson);
|
|
495
502
|
return;
|
|
496
503
|
}
|
|
497
504
|
if (target === "notifications") {
|
|
@@ -504,6 +511,7 @@ function createInternalCommands(context, runtimeExecutor, queueExecutors = {}, p
|
|
|
504
511
|
if (result2.createdMigrationFiles.length > 0) {
|
|
505
512
|
writeLine(context.stdout, ` - created ${result2.createdMigrationFiles.length} notifications migration`);
|
|
506
513
|
}
|
|
514
|
+
await runProjectDependencyInstallAfterPackageJsonUpdate(context, projectExecutors, result2.updatedPackageJson);
|
|
507
515
|
return;
|
|
508
516
|
}
|
|
509
517
|
if (target === "mail") {
|
|
@@ -516,6 +524,7 @@ function createInternalCommands(context, runtimeExecutor, queueExecutors = {}, p
|
|
|
516
524
|
if (result2.updatedEnvExample) writeLine(context.stdout, " - updated .env.example");
|
|
517
525
|
if (result2.createdMailConfig) writeLine(context.stdout, " - created config/mail.ts");
|
|
518
526
|
if (result2.createdMailDirectory) writeLine(context.stdout, " - created server/mail");
|
|
527
|
+
await runProjectDependencyInstallAfterPackageJsonUpdate(context, projectExecutors, result2.updatedPackageJson);
|
|
519
528
|
return;
|
|
520
529
|
}
|
|
521
530
|
if (target === "broadcast") {
|
|
@@ -531,6 +540,7 @@ function createInternalCommands(context, runtimeExecutor, queueExecutors = {}, p
|
|
|
531
540
|
if (result2.createdChannelsDirectory) writeLine(context.stdout, " - created server/channels");
|
|
532
541
|
if (result2.createdBroadcastAuthRoute) writeLine(context.stdout, " - created /broadcasting/auth route");
|
|
533
542
|
if (result2.createdFrameworkSetup) writeLine(context.stdout, " - created framework Flux setup");
|
|
543
|
+
await runProjectDependencyInstallAfterPackageJsonUpdate(context, projectExecutors, result2.updatedPackageJson);
|
|
534
544
|
return;
|
|
535
545
|
}
|
|
536
546
|
if (target === "security") {
|
|
@@ -541,6 +551,7 @@ function createInternalCommands(context, runtimeExecutor, queueExecutors = {}, p
|
|
|
541
551
|
if (result2.updatedPackageJson) writeLine(context.stdout, " - updated package.json");
|
|
542
552
|
if (result2.createdSecurityConfig) writeLine(context.stdout, " - created config/security.ts");
|
|
543
553
|
if (result2.createdCorsConfig) writeLine(context.stdout, " - created config/cors.ts");
|
|
554
|
+
await runProjectDependencyInstallAfterPackageJsonUpdate(context, projectExecutors, result2.updatedPackageJson);
|
|
544
555
|
return;
|
|
545
556
|
}
|
|
546
557
|
if (target === "cache") {
|
|
@@ -556,6 +567,7 @@ function createInternalCommands(context, runtimeExecutor, queueExecutors = {}, p
|
|
|
556
567
|
if (result2.updatedEnv) writeLine(context.stdout, " - updated .env");
|
|
557
568
|
if (result2.updatedEnvExample) writeLine(context.stdout, " - updated .env.example");
|
|
558
569
|
if (result2.databaseDriver) writeLine(context.stdout, ' - run "holo cache:table" to create the cache tables');
|
|
570
|
+
await runProjectDependencyInstallAfterPackageJsonUpdate(context, projectExecutors, result2.updatedPackageJson);
|
|
559
571
|
return;
|
|
560
572
|
}
|
|
561
573
|
if (target === "media") {
|
|
@@ -566,6 +578,7 @@ function createInternalCommands(context, runtimeExecutor, queueExecutors = {}, p
|
|
|
566
578
|
if (result2.createdMediaConfig) writeLine(context.stdout, " - created config/media.ts");
|
|
567
579
|
if (result2.updatedPackageJson) writeLine(context.stdout, " - updated package.json");
|
|
568
580
|
if (result2.createdMigrationFiles.length > 0) writeLine(context.stdout, " - created media migration");
|
|
581
|
+
await runProjectDependencyInstallAfterPackageJsonUpdate(context, projectExecutors, result2.updatedPackageJson);
|
|
569
582
|
return;
|
|
570
583
|
}
|
|
571
584
|
if (target !== "queue") {
|
|
@@ -582,6 +595,7 @@ function createInternalCommands(context, runtimeExecutor, queueExecutors = {}, p
|
|
|
582
595
|
if (result.updatedEnv) writeLine(context.stdout, " - updated .env");
|
|
583
596
|
if (result.updatedEnvExample) writeLine(context.stdout, " - updated .env.example");
|
|
584
597
|
if (result.createdJobsDirectory) writeLine(context.stdout, " - created server/jobs");
|
|
598
|
+
await runProjectDependencyInstallAfterPackageJsonUpdate(context, projectExecutors, result.updatedPackageJson);
|
|
585
599
|
}
|
|
586
600
|
},
|
|
587
601
|
{
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
import "./chunk-D7O4SU6N.mjs";
|
|
5
5
|
import {
|
|
6
6
|
prepareProjectDiscovery
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-2SE5STJ2.mjs";
|
|
8
|
+
import "./chunk-GWW5VBKY.mjs";
|
|
9
9
|
import {
|
|
10
10
|
loadProjectConfig
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-PWTS5LZZ.mjs";
|
|
12
12
|
import {
|
|
13
13
|
loadGeneratedProjectRegistry
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-GEMG3HIO.mjs";
|
|
15
15
|
import {
|
|
16
16
|
importProjectModule,
|
|
17
17
|
resolveProjectPackageImportSpecifier
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
writeLine
|
|
3
3
|
} from "./chunk-ZXDU7RHU.mjs";
|
|
4
4
|
import "./chunk-D7O4SU6N.mjs";
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-2SE5STJ2.mjs";
|
|
6
|
+
import "./chunk-GWW5VBKY.mjs";
|
|
7
|
+
import "./chunk-PWTS5LZZ.mjs";
|
|
8
|
+
import "./chunk-GEMG3HIO.mjs";
|
|
9
9
|
import {
|
|
10
10
|
resolveProjectPackageImportSpecifier
|
|
11
11
|
} from "./chunk-R6BWRY3E.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runProjectPrepare
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-42ASVV4I.mjs";
|
|
4
4
|
import "./chunk-F4MT6GBK.mjs";
|
|
5
5
|
import {
|
|
6
6
|
getRegistryMigrationSlug,
|
|
@@ -15,14 +15,14 @@ import "./chunk-57SJ566R.mjs";
|
|
|
15
15
|
import "./chunk-D7O4SU6N.mjs";
|
|
16
16
|
import {
|
|
17
17
|
prepareProjectDiscovery
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-2SE5STJ2.mjs";
|
|
19
|
+
import "./chunk-GWW5VBKY.mjs";
|
|
20
20
|
import {
|
|
21
21
|
ensureProjectConfig
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-PWTS5LZZ.mjs";
|
|
23
23
|
import {
|
|
24
24
|
loadGeneratedProjectRegistry
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-GEMG3HIO.mjs";
|
|
26
26
|
import {
|
|
27
27
|
makeProjectRelativePath,
|
|
28
28
|
resolveDefaultArtifactPath,
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
} from "./chunk-57SJ566R.mjs";
|
|
4
4
|
import {
|
|
5
5
|
prepareProjectDiscovery
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2SE5STJ2.mjs";
|
|
7
7
|
import {
|
|
8
8
|
loadProjectConfig,
|
|
9
9
|
resolveGeneratedSchemaPath
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PWTS5LZZ.mjs";
|
|
11
11
|
import {
|
|
12
12
|
loadGeneratedProjectRegistry
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-GEMG3HIO.mjs";
|
|
14
14
|
import {
|
|
15
15
|
CLI_RUNTIME_ROOT,
|
|
16
16
|
bundleProjectModule
|
|
@@ -566,11 +566,11 @@ function runRuntimeInvocation(command, args, options) {
|
|
|
566
566
|
function getRuntimeFailureMessage(kind, result) {
|
|
567
567
|
const stderr = result.stderr?.trim();
|
|
568
568
|
if (stderr) {
|
|
569
|
-
return stderr;
|
|
569
|
+
return formatRuntimeFailureText(stderr);
|
|
570
570
|
}
|
|
571
571
|
const stdout = result.stdout?.trim();
|
|
572
572
|
if (stdout) {
|
|
573
|
-
return stdout;
|
|
573
|
+
return formatRuntimeFailureText(stdout);
|
|
574
574
|
}
|
|
575
575
|
const errorCode = result.error && "code" in result.error ? result.error.code : void 0;
|
|
576
576
|
if (typeof errorCode === "string" && errorCode.length > 0) {
|
|
@@ -578,6 +578,24 @@ function getRuntimeFailureMessage(kind, result) {
|
|
|
578
578
|
}
|
|
579
579
|
return `Runtime command "${kind}" failed.`;
|
|
580
580
|
}
|
|
581
|
+
function stripRuntimeErrorPrefix(line) {
|
|
582
|
+
return line.replace(/^(?:[A-Za-z][\w.]*Error|Error):\s+/, "");
|
|
583
|
+
}
|
|
584
|
+
function isRuntimeErrorSourceLine(line) {
|
|
585
|
+
return line.startsWith("throw ") || line.startsWith("at ") || line === "^" || /^\^+$/.test(line);
|
|
586
|
+
}
|
|
587
|
+
function formatRuntimeFailureText(text) {
|
|
588
|
+
const lines = text.split(/\r?\n/).map((line) => line.trim()).filter(Boolean);
|
|
589
|
+
const friendlyLine = lines.find((line) => line.includes("Unable to ") && !isRuntimeErrorSourceLine(line));
|
|
590
|
+
if (friendlyLine) {
|
|
591
|
+
return stripRuntimeErrorPrefix(friendlyLine);
|
|
592
|
+
}
|
|
593
|
+
const errorLine = lines.find((line) => /^(?:[A-Za-z][\w.]*Error|Error):\s+/.test(line));
|
|
594
|
+
if (errorLine) {
|
|
595
|
+
return stripRuntimeErrorPrefix(errorLine);
|
|
596
|
+
}
|
|
597
|
+
return lines[0] ?? text.trim();
|
|
598
|
+
}
|
|
581
599
|
async function withRuntimeEnvironment(projectRoot, kind, options, callback) {
|
|
582
600
|
if (kind === "seed") {
|
|
583
601
|
const project = await loadProjectConfig(projectRoot, { required: true });
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
prepareProjectDiscovery
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2SE5STJ2.mjs";
|
|
4
4
|
import {
|
|
5
|
-
renderFrameworkRunner,
|
|
6
5
|
syncManagedDriverDependencies
|
|
7
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GWW5VBKY.mjs";
|
|
8
7
|
import {
|
|
9
8
|
ensureGeneratedSchemaPlaceholder,
|
|
10
9
|
ensureProjectConfig
|
|
11
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PWTS5LZZ.mjs";
|
|
11
|
+
import {
|
|
12
|
+
renderFrameworkRunner
|
|
13
|
+
} from "./chunk-GEMG3HIO.mjs";
|
|
12
14
|
import {
|
|
13
15
|
readTextFile,
|
|
14
16
|
writeTextFile
|