@holo-js/cli 0.3.0 → 0.3.1
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 +38 -35
- package/dist/{broadcast-5VZM5SGQ.mjs → broadcast-PJLFVZH4.mjs} +9 -11
- package/dist/{cache-A42JSVYA.mjs → cache-KR4ACOYD.mjs} +8 -9
- package/dist/{cache-migrations-4WKSEN2Q.mjs → cache-migrations-J34RE4WH.mjs} +13 -15
- package/dist/{chunk-OLZEMIDQ.mjs → chunk-2XXJ76YC.mjs} +1 -1
- package/dist/{chunk-3RFRE7XG.mjs → chunk-3ICVWL2M.mjs} +2 -2
- package/dist/{chunk-JVLZ3SOW.mjs → chunk-4VYR2ARA.mjs} +2 -2
- package/dist/{chunk-QSVMXMTQ.mjs → chunk-7KZVFDSI.mjs} +3 -3
- package/dist/{chunk-TRYHX5S4.mjs → chunk-AZ6NVJAP.mjs} +1 -1
- package/dist/{chunk-LHK5YUR4.mjs → chunk-CT23GSEC.mjs} +1 -1
- package/dist/{chunk-6BHJLCAO.mjs → chunk-FFTJKBQF.mjs} +43 -13
- package/dist/{chunk-EQUFFLRG.mjs → chunk-I3RRWDLV.mjs} +5 -5
- package/dist/{chunk-R4ZYMEDU.mjs → chunk-L3YATEQY.mjs} +1 -1
- package/dist/{chunk-TH5YCOZB.mjs → chunk-L6FF22IV.mjs} +28 -17
- package/dist/{chunk-YACY2572.mjs → chunk-PVVGQSUP.mjs} +47 -47
- package/dist/{chunk-I7QBCEV7.mjs → chunk-Y355VYRN.mjs} +5 -3
- package/dist/{chunk-VRGB6DIS.mjs → chunk-YJWHIQ45.mjs} +2 -0
- package/dist/{config-BZHQK532.mjs → config-XVPV6DJW.mjs} +3 -3
- package/dist/{dev-7KGRV56X.mjs → dev-NTQTEY5B.mjs} +9 -10
- package/dist/{discovery-HNH3BLDL.mjs → discovery-TMPUQQHI.mjs} +4 -4
- package/dist/{generators-3FVW4AEJ.mjs → generators-3FDCCJDC.mjs} +14 -16
- package/dist/index.mjs +38 -35
- package/dist/{media-migrations-EG34NYAG.mjs → media-migrations-UJ6BMUSZ.mjs} +10 -12
- package/dist/{plugins-ZGLB6JO6.mjs → plugins-USHY6SPF.mjs} +3 -3
- package/dist/{queue-BEZDCZCY.mjs → queue-6U7JU4T6.mjs} +11 -13
- package/dist/{queue-R54DUUYA.mjs → queue-VJEFD6SE.mjs} +13 -15
- package/dist/{queue-migrations-AM3AKT76.mjs → queue-migrations-6YUUOKMH.mjs} +13 -15
- package/dist/{runtime-4TJYZLQV.mjs → runtime-FVRB4O2M.mjs} +8 -10
- package/dist/{runtime-VR5BDPYQ.mjs → runtime-P5R7H3B4.mjs} +1 -1
- package/dist/{scaffold-ASEX5LEX.mjs → scaffold-F3AZDNPG.mjs} +7 -6
- package/dist/{security-KYTLP4DF.mjs → security-X4274RHX.mjs} +8 -9
- package/package.json +19 -19
- package/dist/broadcast-AABT52BK.mjs +0 -206
- package/dist/cache-DUVBBOZU.mjs +0 -138
- package/dist/cache-migrations-PD2T5AV4.mjs +0 -175
- package/dist/chunk-HX6MOYBO.mjs +0 -2
- package/dist/chunk-KRADH7PK.mjs +0 -501
- package/dist/chunk-LALDNNPH.mjs +0 -428
- package/dist/chunk-M3IPUCTM.mjs +0 -25
- package/dist/chunk-OI54DOHK.mjs +0 -3170
- package/dist/dev-GQT37XJU.mjs +0 -46
- package/dist/generators-JWVNGUUE.mjs +0 -523
- package/dist/media-migrations-LGI7R7AR.mjs +0 -108
- package/dist/queue-migrations-U477YSFD.mjs +0 -173
- package/dist/runtime-MSRQD5W5.mjs +0 -59
- package/dist/scaffold-ZAD3XUSD.mjs +0 -143
- package/dist/security-4QLV7QCH.mjs +0 -73
package/dist/bin/holo.mjs
CHANGED
|
@@ -16,32 +16,30 @@ import {
|
|
|
16
16
|
resolveNewProjectInput,
|
|
17
17
|
resolveStringFlag,
|
|
18
18
|
splitCsv
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-YJWHIQ45.mjs";
|
|
20
20
|
import {
|
|
21
21
|
hasProjectDependency,
|
|
22
22
|
pinProjectDependencyVersions,
|
|
23
23
|
removeProjectDependency,
|
|
24
24
|
upsertProjectDependency
|
|
25
|
-
} from "../chunk-
|
|
26
|
-
import {
|
|
27
|
-
fileExists
|
|
28
|
-
} from "../chunk-M3IPUCTM.mjs";
|
|
25
|
+
} from "../chunk-CT23GSEC.mjs";
|
|
29
26
|
import {
|
|
30
27
|
runWithSpinner,
|
|
31
|
-
supportsSpinner,
|
|
32
28
|
writeLine
|
|
33
|
-
} from "../chunk-
|
|
34
|
-
import
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
import "../chunk-
|
|
39
|
-
import "../chunk-
|
|
40
|
-
import "../chunk-
|
|
29
|
+
} from "../chunk-Y355VYRN.mjs";
|
|
30
|
+
import {
|
|
31
|
+
ensureEmptyDirectory,
|
|
32
|
+
fileExists
|
|
33
|
+
} from "../chunk-FFTJKBQF.mjs";
|
|
34
|
+
import "../chunk-4VYR2ARA.mjs";
|
|
35
|
+
import "../chunk-7KZVFDSI.mjs";
|
|
36
|
+
import "../chunk-L3YATEQY.mjs";
|
|
37
|
+
import "../chunk-3ICVWL2M.mjs";
|
|
38
|
+
import "../chunk-AZ6NVJAP.mjs";
|
|
41
39
|
import {
|
|
42
40
|
APP_CONFIG_FILE_NAMES,
|
|
43
41
|
SUPPORTED_AUTH_SOCIAL_PROVIDERS
|
|
44
|
-
} from "../chunk-
|
|
42
|
+
} from "../chunk-PVVGQSUP.mjs";
|
|
45
43
|
|
|
46
44
|
// src/cli.ts
|
|
47
45
|
import { cp, mkdtemp, readFile as readFile2, rm, writeFile as writeFile2 } from "fs/promises";
|
|
@@ -133,31 +131,31 @@ var projectRuntimeModulePromise;
|
|
|
133
131
|
var projectScaffoldModulePromise;
|
|
134
132
|
var agentSkillsModulePromise;
|
|
135
133
|
function loadRuntimeModule() {
|
|
136
|
-
runtimeModulePromise ??= import("../runtime-
|
|
134
|
+
runtimeModulePromise ??= import("../runtime-FVRB4O2M.mjs");
|
|
137
135
|
return runtimeModulePromise;
|
|
138
136
|
}
|
|
139
137
|
function loadSecurityModule() {
|
|
140
|
-
securityModulePromise ??= import("../security-
|
|
138
|
+
securityModulePromise ??= import("../security-X4274RHX.mjs");
|
|
141
139
|
return securityModulePromise;
|
|
142
140
|
}
|
|
143
141
|
function loadProjectConfigModule() {
|
|
144
|
-
projectConfigModulePromise ??= import("../config-
|
|
142
|
+
projectConfigModulePromise ??= import("../config-XVPV6DJW.mjs");
|
|
145
143
|
return projectConfigModulePromise;
|
|
146
144
|
}
|
|
147
145
|
function loadProjectDiscoveryModule() {
|
|
148
|
-
projectDiscoveryModulePromise ??= import("../discovery-
|
|
146
|
+
projectDiscoveryModulePromise ??= import("../discovery-TMPUQQHI.mjs");
|
|
149
147
|
return projectDiscoveryModulePromise;
|
|
150
148
|
}
|
|
151
149
|
function loadProjectPluginsModule() {
|
|
152
|
-
projectPluginsModulePromise ??= import("../plugins-
|
|
150
|
+
projectPluginsModulePromise ??= import("../plugins-USHY6SPF.mjs");
|
|
153
151
|
return projectPluginsModulePromise;
|
|
154
152
|
}
|
|
155
153
|
function loadProjectRuntimeModule() {
|
|
156
|
-
projectRuntimeModulePromise ??= import("../runtime-
|
|
154
|
+
projectRuntimeModulePromise ??= import("../runtime-P5R7H3B4.mjs");
|
|
157
155
|
return projectRuntimeModulePromise;
|
|
158
156
|
}
|
|
159
157
|
function loadProjectScaffoldModule() {
|
|
160
|
-
projectScaffoldModulePromise ??= import("../scaffold-
|
|
158
|
+
projectScaffoldModulePromise ??= import("../scaffold-F3AZDNPG.mjs");
|
|
161
159
|
return projectScaffoldModulePromise;
|
|
162
160
|
}
|
|
163
161
|
function loadAgentSkillsModule() {
|
|
@@ -165,7 +163,7 @@ function loadAgentSkillsModule() {
|
|
|
165
163
|
return agentSkillsModulePromise;
|
|
166
164
|
}
|
|
167
165
|
async function resolveRuntimeExecutor(runtimeExecutor) {
|
|
168
|
-
runtimeModulePromise ??= import("../runtime-
|
|
166
|
+
runtimeModulePromise ??= import("../runtime-FVRB4O2M.mjs");
|
|
169
167
|
return runtimeExecutor ?? (await runtimeModulePromise).withRuntimeEnvironment;
|
|
170
168
|
}
|
|
171
169
|
async function resolveExecutor(executors, loader, key) {
|
|
@@ -173,17 +171,17 @@ async function resolveExecutor(executors, loader, key) {
|
|
|
173
171
|
return existing ? existing : await loader();
|
|
174
172
|
}
|
|
175
173
|
async function resolveProjectExecutor(executors, key) {
|
|
176
|
-
devModulePromise ??= import("../dev-
|
|
174
|
+
devModulePromise ??= import("../dev-NTQTEY5B.mjs");
|
|
177
175
|
return resolveExecutor(executors, async () => (await devModulePromise)[key], key);
|
|
178
176
|
}
|
|
179
177
|
async function resolveQueueExecutor(executors, key) {
|
|
180
178
|
return resolveExecutor(executors, async () => {
|
|
181
179
|
if (key === "runQueueFailedTableCommand" || key === "runQueueTableCommand") {
|
|
182
|
-
queueMigrationsModulePromise ??= import("../queue-migrations-
|
|
180
|
+
queueMigrationsModulePromise ??= import("../queue-migrations-6YUUOKMH.mjs");
|
|
183
181
|
const migrations = await queueMigrationsModulePromise;
|
|
184
182
|
return key === "runQueueFailedTableCommand" ? migrations.runQueueFailedTableCommand : migrations.runQueueTableCommand;
|
|
185
183
|
}
|
|
186
|
-
queueModulePromise ??= import("../queue-
|
|
184
|
+
queueModulePromise ??= import("../queue-VJEFD6SE.mjs");
|
|
187
185
|
const queue = await queueModulePromise;
|
|
188
186
|
const resolved = {
|
|
189
187
|
runQueueFailedCommand: queue.runQueueFailedCommand,
|
|
@@ -201,10 +199,10 @@ async function resolveQueueExecutor(executors, key) {
|
|
|
201
199
|
async function resolveCacheExecutor(executors, key) {
|
|
202
200
|
return resolveExecutor(executors, async () => {
|
|
203
201
|
if (key === "runCacheTableCommand") {
|
|
204
|
-
cacheMigrationsModulePromise ??= import("../cache-migrations-
|
|
202
|
+
cacheMigrationsModulePromise ??= import("../cache-migrations-J34RE4WH.mjs");
|
|
205
203
|
return (await cacheMigrationsModulePromise).runCacheTableCommand;
|
|
206
204
|
}
|
|
207
|
-
cacheModulePromise ??= import("../cache-
|
|
205
|
+
cacheModulePromise ??= import("../cache-KR4ACOYD.mjs");
|
|
208
206
|
const cache = await cacheModulePromise;
|
|
209
207
|
const resolved = {
|
|
210
208
|
runCacheClearCommand: cache.runCacheClearCommand,
|
|
@@ -214,15 +212,15 @@ async function resolveCacheExecutor(executors, key) {
|
|
|
214
212
|
}, key);
|
|
215
213
|
}
|
|
216
214
|
async function resolveMediaExecutor(executors, key) {
|
|
217
|
-
mediaMigrationsModulePromise ??= import("../media-migrations-
|
|
215
|
+
mediaMigrationsModulePromise ??= import("../media-migrations-UJ6BMUSZ.mjs");
|
|
218
216
|
return resolveExecutor(executors, async () => (await mediaMigrationsModulePromise)[key], key);
|
|
219
217
|
}
|
|
220
218
|
async function resolveBroadcastExecutor(executors, key) {
|
|
221
|
-
broadcastModulePromise ??= import("../broadcast-
|
|
219
|
+
broadcastModulePromise ??= import("../broadcast-PJLFVZH4.mjs");
|
|
222
220
|
return resolveExecutor(executors, async () => (await broadcastModulePromise)[key], key);
|
|
223
221
|
}
|
|
224
222
|
async function resolveGeneratorCommand(key) {
|
|
225
|
-
generatorsModulePromise ??= import("../generators-
|
|
223
|
+
generatorsModulePromise ??= import("../generators-3FDCCJDC.mjs");
|
|
226
224
|
return (await generatorsModulePromise)[key];
|
|
227
225
|
}
|
|
228
226
|
|
|
@@ -457,7 +455,12 @@ function createInternalCommands(context, runtimeExecutor, queueExecutors = {}, p
|
|
|
457
455
|
usage: "holo new <name> [--framework <nuxt|next|sveltekit>] [--database <sqlite|mysql|postgres>] [--package-manager <bun|npm|pnpm|yarn>] [--package <storage|events|queue|validation|forms|auth|authorization|notifications|mail|broadcast|realtime|security|cache>] [--storage-default-disk <local|public>]",
|
|
458
456
|
source: "internal",
|
|
459
457
|
async prepare(input) {
|
|
460
|
-
const resolved = await resolveNewProjectInput(
|
|
458
|
+
const resolved = await resolveNewProjectInput(
|
|
459
|
+
context,
|
|
460
|
+
input,
|
|
461
|
+
void 0,
|
|
462
|
+
(projectName) => ensureEmptyDirectory(resolve2(context.cwd, projectName), projectName)
|
|
463
|
+
);
|
|
461
464
|
return {
|
|
462
465
|
args: [resolved.projectName],
|
|
463
466
|
flags: {
|
|
@@ -496,11 +499,11 @@ function createInternalCommands(context, runtimeExecutor, queueExecutors = {}, p
|
|
|
496
499
|
writeLine(context.stdout, `Created Holo project: ${targetDir}`);
|
|
497
500
|
await runWithSpinner(
|
|
498
501
|
context,
|
|
499
|
-
|
|
502
|
+
`Installing dependencies with ${packageManager}...`,
|
|
500
503
|
() => runProjectDependencyInstallForProject(context, projectExecutors, targetDir, {
|
|
501
|
-
writeStatus:
|
|
504
|
+
writeStatus: false
|
|
502
505
|
}),
|
|
503
|
-
|
|
506
|
+
`Dependencies installed with ${packageManager}.`
|
|
504
507
|
);
|
|
505
508
|
writeLine(context.stdout);
|
|
506
509
|
writeLine(context.stdout, "Next steps");
|
|
@@ -1,27 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
initializeProjectRuntime
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-M3IPUCTM.mjs";
|
|
3
|
+
} from "./chunk-I3RRWDLV.mjs";
|
|
5
4
|
import {
|
|
6
5
|
writeLine
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-6BHJLCAO.mjs";
|
|
6
|
+
} from "./chunk-Y355VYRN.mjs";
|
|
7
|
+
import "./chunk-FFTJKBQF.mjs";
|
|
10
8
|
import {
|
|
11
9
|
loadProjectConfig
|
|
12
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-4VYR2ARA.mjs";
|
|
13
11
|
import {
|
|
14
12
|
prepareProjectDiscovery
|
|
15
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7KZVFDSI.mjs";
|
|
16
14
|
import {
|
|
17
15
|
loadGeneratedProjectRegistry
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-L3YATEQY.mjs";
|
|
17
|
+
import "./chunk-3ICVWL2M.mjs";
|
|
18
|
+
import "./chunk-AZ6NVJAP.mjs";
|
|
21
19
|
import {
|
|
22
20
|
importProjectModule,
|
|
23
21
|
resolveProjectPackageImportSpecifier
|
|
24
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-PVVGQSUP.mjs";
|
|
25
23
|
|
|
26
24
|
// src/broadcast.ts
|
|
27
25
|
import { basename, extname, resolve } from "path";
|
|
@@ -3,17 +3,16 @@ import {
|
|
|
3
3
|
} from "./chunk-XBOVM6LO.mjs";
|
|
4
4
|
import {
|
|
5
5
|
writeLine
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-TRYHX5S4.mjs";
|
|
6
|
+
} from "./chunk-Y355VYRN.mjs";
|
|
7
|
+
import "./chunk-FFTJKBQF.mjs";
|
|
8
|
+
import "./chunk-4VYR2ARA.mjs";
|
|
9
|
+
import "./chunk-7KZVFDSI.mjs";
|
|
10
|
+
import "./chunk-L3YATEQY.mjs";
|
|
11
|
+
import "./chunk-3ICVWL2M.mjs";
|
|
12
|
+
import "./chunk-AZ6NVJAP.mjs";
|
|
14
13
|
import {
|
|
15
14
|
resolveProjectPackageImportSpecifier
|
|
16
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-PVVGQSUP.mjs";
|
|
17
16
|
|
|
18
17
|
// src/cache.ts
|
|
19
18
|
import { loadConfigDirectory } from "@holo-js/config";
|
|
@@ -1,35 +1,33 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runProjectPrepare
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-L6FF22IV.mjs";
|
|
4
|
+
import "./chunk-CT23GSEC.mjs";
|
|
5
5
|
import {
|
|
6
6
|
getRegistryMigrationSlug,
|
|
7
7
|
hasRegisteredCreateTableMigration,
|
|
8
8
|
hasRegisteredMigrationSlug,
|
|
9
9
|
nextMigrationTemplate
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-M3IPUCTM.mjs";
|
|
10
|
+
} from "./chunk-2XXJ76YC.mjs";
|
|
12
11
|
import {
|
|
13
12
|
writeLine
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import {
|
|
17
|
-
prepareProjectDiscovery
|
|
18
|
-
} from "./chunk-QSVMXMTQ.mjs";
|
|
19
|
-
import "./chunk-OI54DOHK.mjs";
|
|
13
|
+
} from "./chunk-Y355VYRN.mjs";
|
|
14
|
+
import "./chunk-FFTJKBQF.mjs";
|
|
20
15
|
import {
|
|
21
16
|
ensureProjectConfig
|
|
22
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-4VYR2ARA.mjs";
|
|
18
|
+
import {
|
|
19
|
+
prepareProjectDiscovery
|
|
20
|
+
} from "./chunk-7KZVFDSI.mjs";
|
|
23
21
|
import {
|
|
24
22
|
loadGeneratedProjectRegistry
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-L3YATEQY.mjs";
|
|
24
|
+
import "./chunk-3ICVWL2M.mjs";
|
|
25
|
+
import "./chunk-AZ6NVJAP.mjs";
|
|
28
26
|
import {
|
|
29
27
|
makeProjectRelativePath,
|
|
30
28
|
resolveDefaultArtifactPath,
|
|
31
29
|
writeTextFile
|
|
32
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-PVVGQSUP.mjs";
|
|
33
31
|
|
|
34
32
|
// src/cache-migrations.ts
|
|
35
33
|
import { resolve } from "path";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeCommandAliases
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AZ6NVJAP.mjs";
|
|
4
4
|
import {
|
|
5
5
|
APP_CONFIG_FILE_NAMES,
|
|
6
6
|
pathExists,
|
|
7
7
|
readTextFile,
|
|
8
8
|
resolveFirstExistingPath,
|
|
9
9
|
writeTextFile
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PVVGQSUP.mjs";
|
|
11
11
|
|
|
12
12
|
// src/project/plugins.ts
|
|
13
13
|
import { createRequire } from "module";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadGeneratedProjectRegistry
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-L3YATEQY.mjs";
|
|
4
4
|
import {
|
|
5
5
|
APP_CONFIG_FILE_NAMES,
|
|
6
6
|
DATABASE_CONFIG_FILE_NAMES,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
isModulePackage,
|
|
9
9
|
pathExists,
|
|
10
10
|
resolveFirstExistingPath
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-PVVGQSUP.mjs";
|
|
12
12
|
|
|
13
13
|
// src/project/config.ts
|
|
14
14
|
import { createHash } from "crypto";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadGeneratedProjectRegistry,
|
|
3
3
|
writeGeneratedProjectRegistry
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-L3YATEQY.mjs";
|
|
5
5
|
import {
|
|
6
6
|
assertUniqueCommandTokens,
|
|
7
7
|
assertUniqueEntries,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
resolveRegisteredPath,
|
|
33
33
|
unregisterAuthorizationDefinitionNames,
|
|
34
34
|
validateMigrationName
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-AZ6NVJAP.mjs";
|
|
36
36
|
import {
|
|
37
37
|
hasEventDefinitionMarker,
|
|
38
38
|
hasListenerDefinitionMarker,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
loadQueueDiscoveryModule,
|
|
44
44
|
makeProjectRelativePath,
|
|
45
45
|
pathExists
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-PVVGQSUP.mjs";
|
|
47
47
|
|
|
48
48
|
// src/project/discovery.ts
|
|
49
49
|
import { resolve } from "path";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadProjectConfig,
|
|
3
3
|
resolveGeneratedSchemaPath
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4VYR2ARA.mjs";
|
|
5
5
|
import {
|
|
6
6
|
loadGeneratedProjectRegistry,
|
|
7
7
|
relativeImportPath,
|
|
@@ -17,10 +17,10 @@ import {
|
|
|
17
17
|
renderNextHoloHelper,
|
|
18
18
|
renderNextRuntimeBootstrap,
|
|
19
19
|
renderSvelteViteConfig
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-L3YATEQY.mjs";
|
|
21
21
|
import {
|
|
22
22
|
loadProjectPluginFrameworkDescriptors
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-3ICVWL2M.mjs";
|
|
24
24
|
import {
|
|
25
25
|
AUTH_CONFIG_FILE_NAMES,
|
|
26
26
|
AUTH_SOCIAL_PROVIDER_PACKAGE_NAMES,
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
resolveFirstExistingPath,
|
|
61
61
|
sanitizePackageName,
|
|
62
62
|
writeTextFile
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-PVVGQSUP.mjs";
|
|
64
64
|
|
|
65
65
|
// src/project/scaffold.ts
|
|
66
66
|
import { mkdir as mkdir3, readdir as readdir2 } from "fs/promises";
|
|
@@ -1393,13 +1393,43 @@ function mergeInstalledAuthFeatures(current, requested) {
|
|
|
1393
1393
|
}
|
|
1394
1394
|
|
|
1395
1395
|
// src/project/scaffold/framework.ts
|
|
1396
|
-
import { mkdir as mkdir2,
|
|
1396
|
+
import { mkdir as mkdir2, writeFile } from "fs/promises";
|
|
1397
1397
|
import { dirname, resolve as resolve3 } from "path";
|
|
1398
1398
|
import {
|
|
1399
|
-
normalizeHoloProjectConfig
|
|
1399
|
+
normalizeHoloProjectConfig as normalizeHoloProjectConfig2
|
|
1400
1400
|
} from "@holo-js/kernel";
|
|
1401
1401
|
import { renderGeneratedSchemaPlaceholder } from "@holo-js/db";
|
|
1402
1402
|
|
|
1403
|
+
// src/fs-utils.ts
|
|
1404
|
+
import { readdir, stat } from "fs/promises";
|
|
1405
|
+
|
|
1406
|
+
// src/project.ts
|
|
1407
|
+
import { normalizeHoloProjectConfig } from "@holo-js/kernel";
|
|
1408
|
+
|
|
1409
|
+
// src/fs-utils.ts
|
|
1410
|
+
async function fileExists(path) {
|
|
1411
|
+
try {
|
|
1412
|
+
await stat(path);
|
|
1413
|
+
return true;
|
|
1414
|
+
} catch {
|
|
1415
|
+
return false;
|
|
1416
|
+
}
|
|
1417
|
+
}
|
|
1418
|
+
async function ensureAbsent(path) {
|
|
1419
|
+
const existing = await readTextFile(path);
|
|
1420
|
+
if (typeof existing !== "undefined") {
|
|
1421
|
+
throw new TypeError(`Refusing to overwrite existing file: ${path}`);
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
async function ensureEmptyDirectory(path, displayPath = path) {
|
|
1425
|
+
const entries = await readdir(path).catch(() => []);
|
|
1426
|
+
if (entries.length > 0) {
|
|
1427
|
+
throw new Error(
|
|
1428
|
+
`The destination "${displayPath}" already exists and is not empty. Choose a different project name or empty that folder first.`
|
|
1429
|
+
);
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1403
1433
|
// src/project/scaffold/project-renderers.ts
|
|
1404
1434
|
import {
|
|
1405
1435
|
createMigrationFileName
|
|
@@ -2317,12 +2347,9 @@ ${normalizedGroup.join("\n")}
|
|
|
2317
2347
|
`;
|
|
2318
2348
|
}
|
|
2319
2349
|
async function scaffoldProject(projectRoot, options) {
|
|
2320
|
-
|
|
2321
|
-
if (existingEntries.length > 0) {
|
|
2322
|
-
throw new Error(`Refusing to scaffold into a non-empty directory: ${projectRoot}`);
|
|
2323
|
-
}
|
|
2350
|
+
await ensureEmptyDirectory(projectRoot);
|
|
2324
2351
|
const { env, example } = renderScaffoldEnvFiles(options);
|
|
2325
|
-
const config =
|
|
2352
|
+
const config = normalizeHoloProjectConfig2();
|
|
2326
2353
|
const generatedSchemaPath = resolveGeneratedSchemaPath(projectRoot, config);
|
|
2327
2354
|
const optionalPackages = normalizeScaffoldOptionalPackages(options.optionalPackages);
|
|
2328
2355
|
const storageEnabled = optionalPackages.includes("storage");
|
|
@@ -2962,7 +2989,7 @@ async function installMediaIntoProject(projectRoot) {
|
|
|
2962
2989
|
if (!mediaConfigPath) {
|
|
2963
2990
|
await writeTextFile(resolve4(projectRoot, "config/media.ts"), renderMediaConfig());
|
|
2964
2991
|
}
|
|
2965
|
-
const { createMediaTableMigration } = await import("./media-migrations-
|
|
2992
|
+
const { createMediaTableMigration } = await import("./media-migrations-UJ6BMUSZ.mjs");
|
|
2966
2993
|
const migrationFilePath = await createMediaTableMigration(projectRoot, {
|
|
2967
2994
|
skipIfExists: true
|
|
2968
2995
|
});
|
|
@@ -3166,5 +3193,8 @@ export {
|
|
|
3166
3193
|
installMediaIntoProject,
|
|
3167
3194
|
installSecurityIntoProject,
|
|
3168
3195
|
installCacheIntoProject,
|
|
3169
|
-
installBroadcastIntoProject
|
|
3196
|
+
installBroadcastIntoProject,
|
|
3197
|
+
fileExists,
|
|
3198
|
+
ensureAbsent,
|
|
3199
|
+
ensureEmptyDirectory
|
|
3170
3200
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fileExists
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FFTJKBQF.mjs";
|
|
4
4
|
import {
|
|
5
5
|
loadProjectConfig,
|
|
6
6
|
resolveGeneratedSchemaPath
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4VYR2ARA.mjs";
|
|
8
8
|
import {
|
|
9
9
|
prepareProjectDiscovery
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-7KZVFDSI.mjs";
|
|
11
11
|
import {
|
|
12
12
|
loadGeneratedProjectRegistry
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-L3YATEQY.mjs";
|
|
14
14
|
import {
|
|
15
15
|
CLI_RUNTIME_ROOT,
|
|
16
16
|
GENERATED_SCHEMA_RUNTIME_PATH,
|
|
17
17
|
bundleProjectModule
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-PVVGQSUP.mjs";
|
|
19
19
|
|
|
20
20
|
// src/runtime.ts
|
|
21
21
|
import { spawn } from "child_process";
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import {
|
|
2
2
|
hasProjectDependency
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CT23GSEC.mjs";
|
|
4
4
|
import {
|
|
5
5
|
syncManagedDriverDependencies
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FFTJKBQF.mjs";
|
|
7
7
|
import {
|
|
8
8
|
ensureGeneratedSchemaPlaceholder,
|
|
9
9
|
ensureProjectConfig
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-4VYR2ARA.mjs";
|
|
11
11
|
import {
|
|
12
12
|
prepareProjectDiscovery
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7KZVFDSI.mjs";
|
|
14
14
|
import {
|
|
15
15
|
renderFrameworkRunnerForDescriptor
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-L3YATEQY.mjs";
|
|
17
17
|
import {
|
|
18
18
|
loadProjectPluginFrameworkDescriptors
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-3ICVWL2M.mjs";
|
|
20
20
|
import {
|
|
21
21
|
getFrameworkDescriptorByIdFrom,
|
|
22
22
|
getFrameworkDescriptorsWith,
|
|
23
23
|
readTextFile,
|
|
24
24
|
writeTextFile
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-PVVGQSUP.mjs";
|
|
26
26
|
|
|
27
27
|
// src/dev.ts
|
|
28
28
|
import { spawnSync, spawn } from "child_process";
|
|
@@ -125,21 +125,32 @@ async function runProjectStartServer(io, projectRoot, spawnProcess = spawn, pass
|
|
|
125
125
|
throw new Error(`Project production server failed with exit code ${result.code ?? "unknown"}.`);
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
async function runProjectDependencyInstall(io, projectRoot,
|
|
128
|
+
async function runProjectDependencyInstall(io, projectRoot, spawnProcess = spawn) {
|
|
129
129
|
const invocation = await resolvePackageManagerInstallInvocation(projectRoot);
|
|
130
|
-
const
|
|
130
|
+
const child = spawnProcess(invocation.command, [...invocation.args], {
|
|
131
131
|
cwd: projectRoot,
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
env: process.env,
|
|
133
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
134
134
|
});
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
let stdout = "";
|
|
136
|
+
let stderr = "";
|
|
137
|
+
child.stdout?.on("data", (chunk) => stdout += String(chunk));
|
|
138
|
+
child.stderr?.on("data", (chunk) => stderr += String(chunk));
|
|
139
|
+
const result = await new Promise((resolvePromise) => {
|
|
140
|
+
child.on("error", (error) => resolvePromise({ kind: "error", error }));
|
|
141
|
+
child.on("close", (code) => resolvePromise({ kind: "close", code }));
|
|
142
|
+
});
|
|
143
|
+
if (result.kind === "error") {
|
|
144
|
+
throw result.error;
|
|
137
145
|
}
|
|
138
|
-
if (
|
|
139
|
-
io.
|
|
146
|
+
if (stdout) {
|
|
147
|
+
io.stdout.write(stdout);
|
|
140
148
|
}
|
|
141
|
-
if (
|
|
142
|
-
|
|
149
|
+
if (stderr) {
|
|
150
|
+
io.stderr.write(stderr);
|
|
151
|
+
}
|
|
152
|
+
if (result.code !== 0) {
|
|
153
|
+
throw new Error(stderr.trim() || stdout.trim() || "Project dependency installation failed.");
|
|
143
154
|
}
|
|
144
155
|
}
|
|
145
156
|
async function runProjectPrepare(projectRoot, io, options = {}) {
|