@holo-js/cli 0.2.6 → 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 +417 -109
- package/dist/{broadcast-JBQWQZSO.mjs → broadcast-PJLFVZH4.mjs} +12 -12
- package/dist/cache-KR4ACOYD.mjs +137 -0
- package/dist/{cache-migrations-77TLXIVG.mjs → cache-migrations-J34RE4WH.mjs} +13 -13
- package/dist/{chunk-LXGQCG56.mjs → chunk-2XXJ76YC.mjs} +1 -1
- package/dist/chunk-3ICVWL2M.mjs +491 -0
- package/dist/{chunk-YEFJBN56.mjs → chunk-4VYR2ARA.mjs} +11 -8
- package/dist/{chunk-VP2E62DF.mjs → chunk-7KZVFDSI.mjs} +49 -349
- package/dist/chunk-AZ6NVJAP.mjs +360 -0
- package/dist/chunk-CT23GSEC.mjs +156 -0
- package/dist/{chunk-7B2RVYLL.mjs → chunk-FFTJKBQF.mjs} +293 -399
- package/dist/{chunk-KS5TWO75.mjs → chunk-I3RRWDLV.mjs} +7 -7
- package/dist/{chunk-J76GH2DR.mjs → chunk-L3YATEQY.mjs} +129 -86
- package/dist/{chunk-4K4CWMMP.mjs → chunk-L6FF22IV.mjs} +76 -61
- package/dist/{chunk-ILU426CF.mjs → chunk-PVVGQSUP.mjs} +482 -2
- package/dist/chunk-XBOVM6LO.mjs +41 -0
- package/dist/{chunk-I7QBCEV7.mjs → chunk-Y355VYRN.mjs} +5 -3
- package/dist/{chunk-VRGB6DIS.mjs → chunk-YJWHIQ45.mjs} +2 -0
- package/dist/{config-MD27U4FM.mjs → config-XVPV6DJW.mjs} +3 -3
- package/dist/{dev-L4Y2GU2E.mjs → dev-NTQTEY5B.mjs} +9 -8
- package/dist/{discovery-GWTBF5RZ.mjs → discovery-TMPUQQHI.mjs} +8 -6
- package/dist/{generators-VCYISHWO.mjs → generators-3FDCCJDC.mjs} +16 -15
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +419 -111
- package/dist/{media-migrations-BNVAPYEM.mjs → media-migrations-UJ6BMUSZ.mjs} +12 -12
- package/dist/plugins-USHY6SPF.mjs +24 -0
- package/dist/{queue-5BXSDFCO.mjs → queue-6U7JU4T6.mjs} +53 -17
- package/dist/{queue-D4LSWNS2.mjs → queue-VJEFD6SE.mjs} +55 -19
- package/dist/{queue-migrations-EF4AMMSY.mjs → queue-migrations-6YUUOKMH.mjs} +17 -14
- package/dist/{runtime-RPMZMTD4.mjs → runtime-FVRB4O2M.mjs} +8 -8
- package/dist/{runtime-GSXF4NB3.mjs → runtime-P5R7H3B4.mjs} +1 -1
- package/dist/runtime-worker.mjs +7 -1
- package/dist/{scaffold-NJ5VH73M.mjs → scaffold-F3AZDNPG.mjs} +9 -4
- package/dist/{security-K5PZS3E3.mjs → security-X4274RHX.mjs} +8 -7
- package/package.json +35 -8
- package/dist/broadcast-YGJFCEPP.mjs +0 -204
- package/dist/cache-HUGRWOHQ.mjs +0 -66
- package/dist/cache-OSJ4PD52.mjs +0 -66
- package/dist/cache-migrations-FKAHRP24.mjs +0 -173
- package/dist/chunk-AJLRAC5M.mjs +0 -497
- package/dist/chunk-C624G3R2.mjs +0 -3306
- package/dist/chunk-D7O4SU6N.mjs +0 -2
- package/dist/chunk-FGQ2I2YH.mjs +0 -22
- package/dist/chunk-LBJAJLKU.mjs +0 -25
- package/dist/dev-YPBQBEOE.mjs +0 -44
- package/dist/generators-H4NTV4DB.mjs +0 -520
- package/dist/media-migrations-NNB3DAQR.mjs +0 -106
- package/dist/queue-migrations-LXEWXJYT.mjs +0 -168
- package/dist/runtime-UKBJQFXM.mjs +0 -57
- package/dist/scaffold-VV3KTYGO.mjs +0 -139
- package/dist/security-JR4P7L2C.mjs +0 -71
|
@@ -2,27 +2,27 @@ import {
|
|
|
2
2
|
hasRegisteredCreateTableMigration,
|
|
3
3
|
hasRegisteredMigrationSlug,
|
|
4
4
|
nextMigrationTemplate
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-2XXJ76YC.mjs";
|
|
6
6
|
import {
|
|
7
7
|
writeLine
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-D7O4SU6N.mjs";
|
|
11
|
-
import {
|
|
12
|
-
prepareProjectDiscovery
|
|
13
|
-
} from "./chunk-VP2E62DF.mjs";
|
|
14
|
-
import "./chunk-7B2RVYLL.mjs";
|
|
8
|
+
} from "./chunk-Y355VYRN.mjs";
|
|
9
|
+
import "./chunk-FFTJKBQF.mjs";
|
|
15
10
|
import {
|
|
16
11
|
ensureProjectConfig
|
|
17
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-4VYR2ARA.mjs";
|
|
13
|
+
import {
|
|
14
|
+
prepareProjectDiscovery
|
|
15
|
+
} from "./chunk-7KZVFDSI.mjs";
|
|
18
16
|
import {
|
|
19
17
|
loadGeneratedProjectRegistry
|
|
20
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-L3YATEQY.mjs";
|
|
19
|
+
import "./chunk-3ICVWL2M.mjs";
|
|
20
|
+
import "./chunk-AZ6NVJAP.mjs";
|
|
21
21
|
import {
|
|
22
22
|
makeProjectRelativePath,
|
|
23
23
|
resolveDefaultArtifactPath,
|
|
24
24
|
writeTextFile
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-PVVGQSUP.mjs";
|
|
26
26
|
|
|
27
27
|
// src/media-migrations.ts
|
|
28
28
|
import { readdir } from "fs/promises";
|
|
@@ -93,7 +93,7 @@ async function createMediaTableMigration(projectRoot, options = {}) {
|
|
|
93
93
|
}
|
|
94
94
|
async function runMediaTableCommand(io, projectRoot) {
|
|
95
95
|
const migrationFilePath = await createMediaTableMigration(projectRoot);
|
|
96
|
-
const { runProjectPrepare } = await import("./dev-
|
|
96
|
+
const { runProjectPrepare } = await import("./dev-NTQTEY5B.mjs");
|
|
97
97
|
await runProjectPrepare(projectRoot);
|
|
98
98
|
writeLine(io.stdout, `Created migration: ${makeProjectRelativePath(projectRoot, migrationFilePath)}`);
|
|
99
99
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
activateProjectPlugin,
|
|
3
|
+
deactivateProjectPlugin,
|
|
4
|
+
loadHoloPluginFromPackage,
|
|
5
|
+
loadProjectPluginCommands,
|
|
6
|
+
loadProjectPluginFrameworkDescriptors,
|
|
7
|
+
normalizeHoloPluginDefinition,
|
|
8
|
+
readProjectPluginNames,
|
|
9
|
+
resolveProjectPlugins,
|
|
10
|
+
writeProjectPluginNames
|
|
11
|
+
} from "./chunk-3ICVWL2M.mjs";
|
|
12
|
+
import "./chunk-AZ6NVJAP.mjs";
|
|
13
|
+
import "./chunk-PVVGQSUP.mjs";
|
|
14
|
+
export {
|
|
15
|
+
activateProjectPlugin,
|
|
16
|
+
deactivateProjectPlugin,
|
|
17
|
+
loadHoloPluginFromPackage,
|
|
18
|
+
loadProjectPluginCommands,
|
|
19
|
+
loadProjectPluginFrameworkDescriptors,
|
|
20
|
+
normalizeHoloPluginDefinition,
|
|
21
|
+
readProjectPluginNames,
|
|
22
|
+
resolveProjectPlugins,
|
|
23
|
+
writeProjectPluginNames
|
|
24
|
+
};
|
|
@@ -1,35 +1,38 @@
|
|
|
1
1
|
import {
|
|
2
2
|
initializeProjectRuntime
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-I3RRWDLV.mjs";
|
|
4
|
+
import {
|
|
5
|
+
loadProjectDatabaseDrivers
|
|
6
|
+
} from "./chunk-XBOVM6LO.mjs";
|
|
4
7
|
import {
|
|
5
8
|
isIgnorableWatchError,
|
|
6
9
|
isRecursiveWatchUnsupported,
|
|
7
10
|
normalizeWatchedFilePath,
|
|
8
11
|
runProjectPrepare,
|
|
9
12
|
toPosixSlashes
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-LBJAJLKU.mjs";
|
|
13
|
+
} from "./chunk-L6FF22IV.mjs";
|
|
14
|
+
import "./chunk-CT23GSEC.mjs";
|
|
13
15
|
import {
|
|
14
16
|
writeLine
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import {
|
|
18
|
-
prepareProjectDiscovery
|
|
19
|
-
} from "./chunk-VP2E62DF.mjs";
|
|
20
|
-
import "./chunk-C624G3R2.mjs";
|
|
17
|
+
} from "./chunk-Y355VYRN.mjs";
|
|
18
|
+
import "./chunk-FFTJKBQF.mjs";
|
|
21
19
|
import {
|
|
22
20
|
ensureProjectConfig,
|
|
23
21
|
loadProjectConfig
|
|
24
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-4VYR2ARA.mjs";
|
|
23
|
+
import {
|
|
24
|
+
prepareProjectDiscovery
|
|
25
|
+
} from "./chunk-7KZVFDSI.mjs";
|
|
25
26
|
import {
|
|
26
27
|
loadGeneratedProjectRegistry
|
|
27
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-L3YATEQY.mjs";
|
|
29
|
+
import "./chunk-3ICVWL2M.mjs";
|
|
30
|
+
import "./chunk-AZ6NVJAP.mjs";
|
|
28
31
|
import {
|
|
29
32
|
HOLO_RUNTIME_ROOT,
|
|
30
33
|
bundleProjectModule,
|
|
31
34
|
resolveProjectPackageImportSpecifier
|
|
32
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-PVVGQSUP.mjs";
|
|
33
36
|
|
|
34
37
|
// src/queue.ts
|
|
35
38
|
import { spawn } from "child_process";
|
|
@@ -67,9 +70,17 @@ var QUEUE_LISTEN_IGNORED_DIRECTORY_NAMES = /* @__PURE__ */ new Set([
|
|
|
67
70
|
var QUEUE_LISTEN_IGNORED_PATH_PREFIXES = [
|
|
68
71
|
HOLO_RUNTIME_ROOT
|
|
69
72
|
].map(toPosixSlashes);
|
|
73
|
+
var BUILT_IN_QUEUE_DRIVER_NAMES = /* @__PURE__ */ new Set(["database", "redis", "sync"]);
|
|
70
74
|
async function loadQueueCliModule(projectRoot) {
|
|
71
75
|
return await import(resolveProjectPackageImportSpecifier(projectRoot, "@holo-js/queue"));
|
|
72
76
|
}
|
|
77
|
+
async function loadQueueRedisDriverFactory(projectRoot) {
|
|
78
|
+
const queueRedis = await import(resolveProjectPackageImportSpecifier(projectRoot, "@holo-js/queue-redis"));
|
|
79
|
+
if (!queueRedis.redisQueueDriverFactory) {
|
|
80
|
+
throw new Error("Queue driver package @holo-js/queue-redis does not export redisQueueDriverFactory.");
|
|
81
|
+
}
|
|
82
|
+
return queueRedis.redisQueueDriverFactory;
|
|
83
|
+
}
|
|
73
84
|
function isIgnoredQueueListenPath(filePath) {
|
|
74
85
|
const normalized = toPosixSlashes(filePath);
|
|
75
86
|
if (QUEUE_LISTEN_IGNORED_PATH_PREFIXES.some((prefix) => normalized === prefix || normalized.startsWith(`${prefix}/`))) {
|
|
@@ -77,6 +88,18 @@ function isIgnoredQueueListenPath(filePath) {
|
|
|
77
88
|
}
|
|
78
89
|
return normalized.split("/").filter(Boolean).some((segment) => QUEUE_LISTEN_IGNORED_DIRECTORY_NAMES.has(segment));
|
|
79
90
|
}
|
|
91
|
+
function resolveQueuePluginDriverLoader(queueModule, connectionName, connection) {
|
|
92
|
+
if (!connection || BUILT_IN_QUEUE_DRIVER_NAMES.has(connection.driver)) {
|
|
93
|
+
return void 0;
|
|
94
|
+
}
|
|
95
|
+
const loadQueuePluginDrivers = queueModule.loadQueuePluginDrivers?.bind(queueModule);
|
|
96
|
+
if (loadQueuePluginDrivers) {
|
|
97
|
+
return loadQueuePluginDrivers;
|
|
98
|
+
}
|
|
99
|
+
throw new Error(
|
|
100
|
+
`[Holo CLI] Queue connection "${connectionName}" uses plugin driver "${connection.driver}", but the installed @holo-js/queue package does not support queue plugin drivers.`
|
|
101
|
+
);
|
|
102
|
+
}
|
|
80
103
|
async function collectQueueWatchTree(rootPath, directories, projectRoot, project) {
|
|
81
104
|
const relativePath = toPosixSlashes(relative(projectRoot, rootPath));
|
|
82
105
|
if (relativePath && isIgnoredQueueListenPath(relativePath)) {
|
|
@@ -309,16 +332,28 @@ async function runQueueWorkCommand(io, projectRoot, options, dependencies = {})
|
|
|
309
332
|
await environment.cleanup();
|
|
310
333
|
}
|
|
311
334
|
}
|
|
312
|
-
async function initializeQueueMaintenanceEnvironment(projectRoot, connectionName) {
|
|
313
|
-
const loadedConfig = await loadConfigDirectory(projectRoot);
|
|
314
|
-
const queueModule = await loadQueueCliModule(projectRoot);
|
|
335
|
+
async function initializeQueueMaintenanceEnvironment(projectRoot, connectionName, dependencies = {}) {
|
|
336
|
+
const loadedConfig = await (dependencies.loadConfig ?? loadConfigDirectory)(projectRoot);
|
|
337
|
+
const queueModule = await (dependencies.loadQueueModule ?? loadQueueCliModule)(projectRoot);
|
|
315
338
|
const resolvedConnectionName = connectionName?.trim() || loadedConfig.queue.default;
|
|
316
339
|
const connection = loadedConfig.queue.connections[resolvedConnectionName];
|
|
340
|
+
const loadQueuePluginDrivers = resolveQueuePluginDriverLoader(queueModule, resolvedConnectionName, connection);
|
|
317
341
|
if (!connection || connection.driver !== "database") {
|
|
342
|
+
const driverFactories = connection?.driver === "redis" ? [await loadQueueRedisDriverFactory(projectRoot)] : void 0;
|
|
318
343
|
queueModule.configureQueueRuntime({
|
|
319
344
|
config: loadedConfig.queue,
|
|
320
|
-
redisConfig: loadedConfig.redis
|
|
345
|
+
redisConfig: loadedConfig.redis,
|
|
346
|
+
...driverFactories ? { driverFactories } : {}
|
|
321
347
|
});
|
|
348
|
+
if (loadQueuePluginDrivers) {
|
|
349
|
+
try {
|
|
350
|
+
await loadQueuePluginDrivers(projectRoot, loadedConfig.app.plugins);
|
|
351
|
+
} catch (error) {
|
|
352
|
+
await queueModule.shutdownQueueRuntime().catch(() => {
|
|
353
|
+
});
|
|
354
|
+
throw error;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
322
357
|
return {
|
|
323
358
|
async cleanup() {
|
|
324
359
|
await queueModule.shutdownQueueRuntime();
|
|
@@ -331,6 +366,7 @@ async function initializeQueueMaintenanceEnvironment(projectRoot, connectionName
|
|
|
331
366
|
redisConfig: loadedConfig.redis,
|
|
332
367
|
...createQueueDbRuntimeOptions()
|
|
333
368
|
});
|
|
369
|
+
await loadProjectDatabaseDrivers(projectRoot, loadedConfig.database);
|
|
334
370
|
const manager = resolveRuntimeConnectionManagerOptions({
|
|
335
371
|
db: loadedConfig.database
|
|
336
372
|
});
|
|
@@ -1,35 +1,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
loadProjectDatabaseDrivers
|
|
3
|
+
} from "./chunk-XBOVM6LO.mjs";
|
|
4
|
+
import {
|
|
5
|
+
initializeProjectRuntime
|
|
6
|
+
} from "./chunk-I3RRWDLV.mjs";
|
|
1
7
|
import {
|
|
2
8
|
isIgnorableWatchError,
|
|
3
9
|
isRecursiveWatchUnsupported,
|
|
4
10
|
normalizeWatchedFilePath,
|
|
5
11
|
runProjectPrepare,
|
|
6
12
|
toPosixSlashes
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-L6FF22IV.mjs";
|
|
14
|
+
import "./chunk-CT23GSEC.mjs";
|
|
9
15
|
import {
|
|
10
16
|
writeLine
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import
|
|
13
|
-
initializeProjectRuntime
|
|
14
|
-
} from "./chunk-KS5TWO75.mjs";
|
|
15
|
-
import "./chunk-LBJAJLKU.mjs";
|
|
16
|
-
import "./chunk-D7O4SU6N.mjs";
|
|
17
|
-
import {
|
|
18
|
-
prepareProjectDiscovery
|
|
19
|
-
} from "./chunk-VP2E62DF.mjs";
|
|
20
|
-
import "./chunk-7B2RVYLL.mjs";
|
|
17
|
+
} from "./chunk-Y355VYRN.mjs";
|
|
18
|
+
import "./chunk-FFTJKBQF.mjs";
|
|
21
19
|
import {
|
|
22
20
|
ensureProjectConfig,
|
|
23
21
|
loadProjectConfig
|
|
24
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-4VYR2ARA.mjs";
|
|
23
|
+
import {
|
|
24
|
+
prepareProjectDiscovery
|
|
25
|
+
} from "./chunk-7KZVFDSI.mjs";
|
|
25
26
|
import {
|
|
26
27
|
loadGeneratedProjectRegistry
|
|
27
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-L3YATEQY.mjs";
|
|
29
|
+
import "./chunk-3ICVWL2M.mjs";
|
|
30
|
+
import "./chunk-AZ6NVJAP.mjs";
|
|
28
31
|
import {
|
|
29
32
|
HOLO_RUNTIME_ROOT,
|
|
30
33
|
bundleProjectModule,
|
|
31
34
|
resolveProjectPackageImportSpecifier
|
|
32
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-PVVGQSUP.mjs";
|
|
33
36
|
|
|
34
37
|
// src/queue.ts
|
|
35
38
|
import { spawn } from "child_process";
|
|
@@ -67,9 +70,17 @@ var QUEUE_LISTEN_IGNORED_DIRECTORY_NAMES = /* @__PURE__ */ new Set([
|
|
|
67
70
|
var QUEUE_LISTEN_IGNORED_PATH_PREFIXES = [
|
|
68
71
|
HOLO_RUNTIME_ROOT
|
|
69
72
|
].map(toPosixSlashes);
|
|
73
|
+
var BUILT_IN_QUEUE_DRIVER_NAMES = /* @__PURE__ */ new Set(["database", "redis", "sync"]);
|
|
70
74
|
async function loadQueueCliModule(projectRoot) {
|
|
71
75
|
return await import(resolveProjectPackageImportSpecifier(projectRoot, "@holo-js/queue"));
|
|
72
76
|
}
|
|
77
|
+
async function loadQueueRedisDriverFactory(projectRoot) {
|
|
78
|
+
const queueRedis = await import(resolveProjectPackageImportSpecifier(projectRoot, "@holo-js/queue-redis"));
|
|
79
|
+
if (!queueRedis.redisQueueDriverFactory) {
|
|
80
|
+
throw new Error("Queue driver package @holo-js/queue-redis does not export redisQueueDriverFactory.");
|
|
81
|
+
}
|
|
82
|
+
return queueRedis.redisQueueDriverFactory;
|
|
83
|
+
}
|
|
73
84
|
function isIgnoredQueueListenPath(filePath) {
|
|
74
85
|
const normalized = toPosixSlashes(filePath);
|
|
75
86
|
if (QUEUE_LISTEN_IGNORED_PATH_PREFIXES.some((prefix) => normalized === prefix || normalized.startsWith(`${prefix}/`))) {
|
|
@@ -77,6 +88,18 @@ function isIgnoredQueueListenPath(filePath) {
|
|
|
77
88
|
}
|
|
78
89
|
return normalized.split("/").filter(Boolean).some((segment) => QUEUE_LISTEN_IGNORED_DIRECTORY_NAMES.has(segment));
|
|
79
90
|
}
|
|
91
|
+
function resolveQueuePluginDriverLoader(queueModule, connectionName, connection) {
|
|
92
|
+
if (!connection || BUILT_IN_QUEUE_DRIVER_NAMES.has(connection.driver)) {
|
|
93
|
+
return void 0;
|
|
94
|
+
}
|
|
95
|
+
const loadQueuePluginDrivers = queueModule.loadQueuePluginDrivers?.bind(queueModule);
|
|
96
|
+
if (loadQueuePluginDrivers) {
|
|
97
|
+
return loadQueuePluginDrivers;
|
|
98
|
+
}
|
|
99
|
+
throw new Error(
|
|
100
|
+
`[Holo CLI] Queue connection "${connectionName}" uses plugin driver "${connection.driver}", but the installed @holo-js/queue package does not support queue plugin drivers.`
|
|
101
|
+
);
|
|
102
|
+
}
|
|
80
103
|
async function collectQueueWatchTree(rootPath, directories, projectRoot, project) {
|
|
81
104
|
const relativePath = toPosixSlashes(relative(projectRoot, rootPath));
|
|
82
105
|
if (relativePath && isIgnoredQueueListenPath(relativePath)) {
|
|
@@ -309,16 +332,28 @@ async function runQueueWorkCommand(io, projectRoot, options, dependencies = {})
|
|
|
309
332
|
await environment.cleanup();
|
|
310
333
|
}
|
|
311
334
|
}
|
|
312
|
-
async function initializeQueueMaintenanceEnvironment(projectRoot, connectionName) {
|
|
313
|
-
const loadedConfig = await loadConfigDirectory(projectRoot);
|
|
314
|
-
const queueModule = await loadQueueCliModule(projectRoot);
|
|
335
|
+
async function initializeQueueMaintenanceEnvironment(projectRoot, connectionName, dependencies = {}) {
|
|
336
|
+
const loadedConfig = await (dependencies.loadConfig ?? loadConfigDirectory)(projectRoot);
|
|
337
|
+
const queueModule = await (dependencies.loadQueueModule ?? loadQueueCliModule)(projectRoot);
|
|
315
338
|
const resolvedConnectionName = connectionName?.trim() || loadedConfig.queue.default;
|
|
316
339
|
const connection = loadedConfig.queue.connections[resolvedConnectionName];
|
|
340
|
+
const loadQueuePluginDrivers = resolveQueuePluginDriverLoader(queueModule, resolvedConnectionName, connection);
|
|
317
341
|
if (!connection || connection.driver !== "database") {
|
|
342
|
+
const driverFactories = connection?.driver === "redis" ? [await loadQueueRedisDriverFactory(projectRoot)] : void 0;
|
|
318
343
|
queueModule.configureQueueRuntime({
|
|
319
344
|
config: loadedConfig.queue,
|
|
320
|
-
redisConfig: loadedConfig.redis
|
|
345
|
+
redisConfig: loadedConfig.redis,
|
|
346
|
+
...driverFactories ? { driverFactories } : {}
|
|
321
347
|
});
|
|
348
|
+
if (loadQueuePluginDrivers) {
|
|
349
|
+
try {
|
|
350
|
+
await loadQueuePluginDrivers(projectRoot, loadedConfig.app.plugins);
|
|
351
|
+
} catch (error) {
|
|
352
|
+
await queueModule.shutdownQueueRuntime().catch(() => {
|
|
353
|
+
});
|
|
354
|
+
throw error;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
322
357
|
return {
|
|
323
358
|
async cleanup() {
|
|
324
359
|
await queueModule.shutdownQueueRuntime();
|
|
@@ -331,6 +366,7 @@ async function initializeQueueMaintenanceEnvironment(projectRoot, connectionName
|
|
|
331
366
|
redisConfig: loadedConfig.redis,
|
|
332
367
|
...createQueueDbRuntimeOptions()
|
|
333
368
|
});
|
|
369
|
+
await loadProjectDatabaseDrivers(projectRoot, loadedConfig.database);
|
|
334
370
|
const manager = resolveRuntimeConnectionManagerOptions({
|
|
335
371
|
db: loadedConfig.database
|
|
336
372
|
});
|
|
@@ -1,33 +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-LBJAJLKU.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-VP2E62DF.mjs";
|
|
19
|
-
import "./chunk-C624G3R2.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-
|
|
23
|
+
} from "./chunk-L3YATEQY.mjs";
|
|
24
|
+
import "./chunk-3ICVWL2M.mjs";
|
|
25
|
+
import "./chunk-AZ6NVJAP.mjs";
|
|
26
26
|
import {
|
|
27
27
|
makeProjectRelativePath,
|
|
28
28
|
resolveDefaultArtifactPath,
|
|
29
29
|
writeTextFile
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-PVVGQSUP.mjs";
|
|
31
31
|
|
|
32
32
|
// src/queue-migrations.ts
|
|
33
33
|
import { resolve } from "path";
|
|
@@ -38,6 +38,9 @@ var DEFAULT_FAILED_JOBS_TABLE = "failed_jobs";
|
|
|
38
38
|
async function loadQueueConfig(projectRoot) {
|
|
39
39
|
return (await loadConfigDirectory(projectRoot)).queue;
|
|
40
40
|
}
|
|
41
|
+
function isDatabaseQueueConnection(connection) {
|
|
42
|
+
return connection.driver === "database";
|
|
43
|
+
}
|
|
41
44
|
function normalizeQueueMigrationName(tableName) {
|
|
42
45
|
return normalizeMigrationSlug(`create_${tableName.replaceAll(".", "_")}_table`);
|
|
43
46
|
}
|
|
@@ -103,7 +106,7 @@ function renderFailedJobsTableMigration(tableName) {
|
|
|
103
106
|
].join("\n");
|
|
104
107
|
}
|
|
105
108
|
function resolveDatabaseQueueTables(queueConfig) {
|
|
106
|
-
const configured = Object.values(queueConfig.connections).filter(
|
|
109
|
+
const configured = Object.values(queueConfig.connections).filter(isDatabaseQueueConnection).map((connection) => connection.table);
|
|
107
110
|
return Object.freeze(configured.length > 0 ? [...new Set(configured)] : [DEFAULT_DATABASE_QUEUE_TABLE]);
|
|
108
111
|
}
|
|
109
112
|
async function runQueueTableCommand(io, projectRoot) {
|
|
@@ -22,14 +22,14 @@ import {
|
|
|
22
22
|
resolveRuntimeWorkerPath,
|
|
23
23
|
runRuntimeInvocation,
|
|
24
24
|
withRuntimeEnvironment
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-I3RRWDLV.mjs";
|
|
26
|
+
import "./chunk-FFTJKBQF.mjs";
|
|
27
|
+
import "./chunk-4VYR2ARA.mjs";
|
|
28
|
+
import "./chunk-7KZVFDSI.mjs";
|
|
29
|
+
import "./chunk-L3YATEQY.mjs";
|
|
30
|
+
import "./chunk-3ICVWL2M.mjs";
|
|
31
|
+
import "./chunk-AZ6NVJAP.mjs";
|
|
32
|
+
import "./chunk-PVVGQSUP.mjs";
|
|
33
33
|
export {
|
|
34
34
|
RUNTIME_MIGRATION_NAME_PATTERN,
|
|
35
35
|
cacheProjectConfig,
|
package/dist/runtime-worker.mjs
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
loadProjectDatabaseDrivers
|
|
3
|
+
} from "./chunk-XBOVM6LO.mjs";
|
|
4
|
+
|
|
1
5
|
// src/runtime-worker.ts
|
|
2
6
|
import { mkdir, writeFile } from "fs/promises";
|
|
3
7
|
import { dirname } from "path";
|
|
@@ -193,7 +197,9 @@ function writeOutput(message) {
|
|
|
193
197
|
process.stdout.write(`${message}
|
|
194
198
|
`);
|
|
195
199
|
}
|
|
196
|
-
var
|
|
200
|
+
var resolvedRuntimeConfig = resolveRuntimeConfig(payload.runtimeConfig);
|
|
201
|
+
await loadProjectDatabaseDrivers(payload.projectRoot ?? process.cwd(), resolvedRuntimeConfig.db);
|
|
202
|
+
var manager = resolveRuntimeConnectionManagerOptions(resolvedRuntimeConfig);
|
|
197
203
|
configureDB(manager);
|
|
198
204
|
try {
|
|
199
205
|
await manager.initializeAll();
|
|
@@ -56,20 +56,24 @@ import {
|
|
|
56
56
|
upsertMediaPackageDependency,
|
|
57
57
|
upsertNotificationsPackageDependency,
|
|
58
58
|
upsertSecurityPackageDependency
|
|
59
|
-
} from "./chunk-
|
|
60
|
-
import "./chunk-
|
|
59
|
+
} from "./chunk-FFTJKBQF.mjs";
|
|
60
|
+
import "./chunk-4VYR2ARA.mjs";
|
|
61
|
+
import "./chunk-7KZVFDSI.mjs";
|
|
61
62
|
import {
|
|
62
63
|
renderAuthProviderRouteFiles,
|
|
63
64
|
renderFrameworkFiles,
|
|
64
65
|
renderFrameworkRunner,
|
|
66
|
+
renderFrameworkRunnerForDescriptor,
|
|
65
67
|
renderNextBroadcastConfigRoute
|
|
66
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-L3YATEQY.mjs";
|
|
69
|
+
import "./chunk-3ICVWL2M.mjs";
|
|
70
|
+
import "./chunk-AZ6NVJAP.mjs";
|
|
67
71
|
import {
|
|
68
72
|
isSupportedCacheInstallerDriver,
|
|
69
73
|
isSupportedQueueInstallerDriver,
|
|
70
74
|
normalizeScaffoldOptionalPackages,
|
|
71
75
|
sanitizePackageName
|
|
72
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-PVVGQSUP.mjs";
|
|
73
77
|
export {
|
|
74
78
|
authFeaturesRequireConfigUpdate,
|
|
75
79
|
detectAuthInstallFeaturesFromConfig,
|
|
@@ -104,6 +108,7 @@ export {
|
|
|
104
108
|
renderEnvFileContents,
|
|
105
109
|
renderFrameworkFiles,
|
|
106
110
|
renderFrameworkRunner,
|
|
111
|
+
renderFrameworkRunnerForDescriptor,
|
|
107
112
|
renderMailConfig,
|
|
108
113
|
renderMailEnvFiles,
|
|
109
114
|
renderMediaConfig,
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
writeLine
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-Y355VYRN.mjs";
|
|
4
|
+
import "./chunk-FFTJKBQF.mjs";
|
|
5
|
+
import "./chunk-4VYR2ARA.mjs";
|
|
6
|
+
import "./chunk-7KZVFDSI.mjs";
|
|
7
|
+
import "./chunk-L3YATEQY.mjs";
|
|
8
|
+
import "./chunk-3ICVWL2M.mjs";
|
|
9
|
+
import "./chunk-AZ6NVJAP.mjs";
|
|
9
10
|
import {
|
|
10
11
|
resolveProjectPackageImportSpecifier
|
|
11
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-PVVGQSUP.mjs";
|
|
12
13
|
|
|
13
14
|
// src/security.ts
|
|
14
15
|
import { loadConfigDirectory } from "@holo-js/config";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holo-js/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Holo-JS Framework - project creation, discovery, and operational CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,17 +28,44 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@clack/prompts": "^1.5.1",
|
|
31
|
-
"@holo-js/
|
|
32
|
-
"@holo-js/
|
|
33
|
-
"@holo-js/
|
|
34
|
-
"@holo-js/
|
|
31
|
+
"@holo-js/auth": "^0.3.1",
|
|
32
|
+
"@holo-js/cache-db": "^0.3.1",
|
|
33
|
+
"@holo-js/config": "^0.3.1",
|
|
34
|
+
"@holo-js/core": "^0.3.1",
|
|
35
|
+
"@holo-js/db": "^0.3.1",
|
|
36
|
+
"@holo-js/kernel": "^0.3.1",
|
|
37
|
+
"@holo-js/security": "^0.3.1",
|
|
38
|
+
"@holo-js/storage": "^0.3.1",
|
|
35
39
|
"esbuild": "^0.27.4",
|
|
36
40
|
"inflection": "^3.0.2"
|
|
37
41
|
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"@holo-js/broadcast": "^0.3.1",
|
|
44
|
+
"@holo-js/mail": "^0.3.1",
|
|
45
|
+
"@holo-js/session": "^0.3.1",
|
|
46
|
+
"@holo-js/queue": "^0.3.1"
|
|
47
|
+
},
|
|
48
|
+
"peerDependenciesMeta": {
|
|
49
|
+
"@holo-js/broadcast": {
|
|
50
|
+
"optional": true
|
|
51
|
+
},
|
|
52
|
+
"@holo-js/mail": {
|
|
53
|
+
"optional": true
|
|
54
|
+
},
|
|
55
|
+
"@holo-js/queue": {
|
|
56
|
+
"optional": true
|
|
57
|
+
},
|
|
58
|
+
"@holo-js/session": {
|
|
59
|
+
"optional": true
|
|
60
|
+
}
|
|
61
|
+
},
|
|
38
62
|
"devDependencies": {
|
|
39
|
-
"@holo-js/
|
|
40
|
-
"@holo-js/
|
|
41
|
-
"@holo-js/
|
|
63
|
+
"@holo-js/broadcast": "^0.3.1",
|
|
64
|
+
"@holo-js/events": "^0.3.1",
|
|
65
|
+
"@holo-js/mail": "^0.3.1",
|
|
66
|
+
"@holo-js/queue": "^0.3.1",
|
|
67
|
+
"@holo-js/queue-db": "^0.3.1",
|
|
68
|
+
"@holo-js/session": "^0.3.1",
|
|
42
69
|
"@types/node": "^22.10.2",
|
|
43
70
|
"tsup": "^8.3.5",
|
|
44
71
|
"typescript": "^5.7.2",
|