@holo-js/cli 0.2.4 → 0.2.6

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.
Files changed (30) hide show
  1. package/dist/agent-skills-CHAXS2YN.mjs +180 -0
  2. package/dist/bin/holo.mjs +105 -25
  3. package/dist/{broadcast-AVYI67BU.mjs → broadcast-JBQWQZSO.mjs} +2 -1
  4. package/dist/{broadcast-CMPONJ5J.mjs → broadcast-YGJFCEPP.mjs} +2 -1
  5. package/dist/{cache-2EUUQJX2.mjs → cache-HUGRWOHQ.mjs} +1 -1
  6. package/dist/{cache-4OVL2YTS.mjs → cache-OSJ4PD52.mjs} +1 -1
  7. package/dist/{cache-migrations-LGTPRUDS.mjs → cache-migrations-77TLXIVG.mjs} +6 -6
  8. package/dist/{cache-migrations-TJWWJB4I.mjs → cache-migrations-FKAHRP24.mjs} +6 -6
  9. package/dist/{chunk-HZJWXL2W.mjs → chunk-4K4CWMMP.mjs} +3 -3
  10. package/dist/{chunk-6UDDQUXY.mjs → chunk-7B2RVYLL.mjs} +67 -67
  11. package/dist/{chunk-ZHFXVJBE.mjs → chunk-AJLRAC5M.mjs} +3 -3
  12. package/dist/{chunk-LGU5YVKP.mjs → chunk-C624G3R2.mjs} +67 -67
  13. package/dist/{dev-I4NZRFTS.mjs → dev-L4Y2GU2E.mjs} +2 -2
  14. package/dist/{dev-WOOZOWLR.mjs → dev-YPBQBEOE.mjs} +2 -2
  15. package/dist/{generators-FUOVIC2E.mjs → generators-H4NTV4DB.mjs} +2 -2
  16. package/dist/{generators-Y47HYPQT.mjs → generators-VCYISHWO.mjs} +2 -2
  17. package/dist/index.mjs +105 -25
  18. package/dist/{media-migrations-FGYPWPBF.mjs → media-migrations-BNVAPYEM.mjs} +6 -6
  19. package/dist/{media-migrations-N63DGHGG.mjs → media-migrations-NNB3DAQR.mjs} +6 -6
  20. package/dist/{queue-HB22LB66.mjs → queue-5BXSDFCO.mjs} +7 -7
  21. package/dist/{queue-UQ6TPIK4.mjs → queue-D4LSWNS2.mjs} +7 -7
  22. package/dist/{queue-migrations-FENTWONO.mjs → queue-migrations-EF4AMMSY.mjs} +21 -20
  23. package/dist/{queue-migrations-HJ4Z55FB.mjs → queue-migrations-LXEWXJYT.mjs} +21 -20
  24. package/dist/{runtime-7KCBHTRV.mjs → runtime-RPMZMTD4.mjs} +1 -1
  25. package/dist/{runtime-PLE3TUX2.mjs → runtime-UKBJQFXM.mjs} +1 -1
  26. package/dist/{scaffold-2PPKFFAZ.mjs → scaffold-NJ5VH73M.mjs} +1 -1
  27. package/dist/{scaffold-3LLBQ2JF.mjs → scaffold-VV3KTYGO.mjs} +1 -1
  28. package/dist/{security-NAOOXRFV.mjs → security-JR4P7L2C.mjs} +1 -1
  29. package/dist/{security-QFDYNF2Z.mjs → security-K5PZS3E3.mjs} +1 -1
  30. package/package.json +8 -8
package/dist/index.mjs CHANGED
@@ -29,7 +29,7 @@ import {
29
29
  } from "./chunk-I7QBCEV7.mjs";
30
30
  import "./chunk-D7O4SU6N.mjs";
31
31
  import "./chunk-VP2E62DF.mjs";
32
- import "./chunk-6UDDQUXY.mjs";
32
+ import "./chunk-C624G3R2.mjs";
33
33
  import "./chunk-YEFJBN56.mjs";
34
34
  import "./chunk-J76GH2DR.mjs";
35
35
  import {
@@ -116,6 +116,7 @@ var AUTH_INSTALL_FEATURES = ["social", "workos", "clerk"];
116
116
  var AUTH_SOCIAL_PROVIDER_MODES = ["default", "specific"];
117
117
  var EVENTS_QUEUE_ACTIONS = ["skip", "enable"];
118
118
  var MODEL_GENERATOR_OPTIONS = ["migration", "observer", "seeder", "factory"];
119
+ var COMMAND_LIST_DESCRIPTION_COLUMN = 32;
119
120
  var runtimeModulePromise;
120
121
  var queueModulePromise;
121
122
  var cacheModulePromise;
@@ -130,44 +131,45 @@ var projectConfigModulePromise;
130
131
  var projectDiscoveryModulePromise;
131
132
  var projectRuntimeModulePromise;
132
133
  var projectScaffoldModulePromise;
134
+ var agentSkillsModulePromise;
133
135
  function loadRuntimeModule() {
134
- runtimeModulePromise ??= import("./runtime-PLE3TUX2.mjs");
136
+ runtimeModulePromise ??= import("./runtime-UKBJQFXM.mjs");
135
137
  return runtimeModulePromise;
136
138
  }
137
139
  function loadQueueModule() {
138
- queueModulePromise ??= import("./queue-UQ6TPIK4.mjs");
140
+ queueModulePromise ??= import("./queue-5BXSDFCO.mjs");
139
141
  return queueModulePromise;
140
142
  }
141
143
  function loadCacheModule() {
142
- cacheModulePromise ??= import("./cache-2EUUQJX2.mjs");
144
+ cacheModulePromise ??= import("./cache-HUGRWOHQ.mjs");
143
145
  return cacheModulePromise;
144
146
  }
145
147
  function loadQueueMigrationsModule() {
146
- queueMigrationsModulePromise ??= import("./queue-migrations-HJ4Z55FB.mjs");
148
+ queueMigrationsModulePromise ??= import("./queue-migrations-EF4AMMSY.mjs");
147
149
  return queueMigrationsModulePromise;
148
150
  }
149
151
  function loadCacheMigrationsModule() {
150
- cacheMigrationsModulePromise ??= import("./cache-migrations-TJWWJB4I.mjs");
152
+ cacheMigrationsModulePromise ??= import("./cache-migrations-77TLXIVG.mjs");
151
153
  return cacheMigrationsModulePromise;
152
154
  }
153
155
  function loadMediaMigrationsModule() {
154
- mediaMigrationsModulePromise ??= import("./media-migrations-FGYPWPBF.mjs");
156
+ mediaMigrationsModulePromise ??= import("./media-migrations-NNB3DAQR.mjs");
155
157
  return mediaMigrationsModulePromise;
156
158
  }
157
159
  function loadGeneratorsModule() {
158
- generatorsModulePromise ??= import("./generators-FUOVIC2E.mjs");
160
+ generatorsModulePromise ??= import("./generators-H4NTV4DB.mjs");
159
161
  return generatorsModulePromise;
160
162
  }
161
163
  function loadBroadcastModule() {
162
- broadcastModulePromise ??= import("./broadcast-CMPONJ5J.mjs");
164
+ broadcastModulePromise ??= import("./broadcast-YGJFCEPP.mjs");
163
165
  return broadcastModulePromise;
164
166
  }
165
167
  function loadSecurityModule() {
166
- securityModulePromise ??= import("./security-NAOOXRFV.mjs");
168
+ securityModulePromise ??= import("./security-JR4P7L2C.mjs");
167
169
  return securityModulePromise;
168
170
  }
169
171
  function loadDevModule() {
170
- devModulePromise ??= import("./dev-I4NZRFTS.mjs");
172
+ devModulePromise ??= import("./dev-L4Y2GU2E.mjs");
171
173
  return devModulePromise;
172
174
  }
173
175
  function loadProjectConfigModule() {
@@ -183,9 +185,13 @@ function loadProjectRuntimeModule() {
183
185
  return projectRuntimeModulePromise;
184
186
  }
185
187
  function loadProjectScaffoldModule() {
186
- projectScaffoldModulePromise ??= import("./scaffold-2PPKFFAZ.mjs");
188
+ projectScaffoldModulePromise ??= import("./scaffold-VV3KTYGO.mjs");
187
189
  return projectScaffoldModulePromise;
188
190
  }
191
+ function loadAgentSkillsModule() {
192
+ agentSkillsModulePromise ??= import("./agent-skills-CHAXS2YN.mjs");
193
+ return agentSkillsModulePromise;
194
+ }
189
195
  async function resolveRuntimeExecutor(runtimeExecutor) {
190
196
  return runtimeExecutor ?? (await loadRuntimeModule()).withRuntimeEnvironment;
191
197
  }
@@ -253,23 +259,47 @@ function createCommandContext(io, projectRoot, loadProject, input) {
253
259
  loadProject
254
260
  };
255
261
  }
262
+ function serializePassthroughInput(input) {
263
+ const tokens = [...input.args];
264
+ for (const [name, value] of Object.entries(input.flags)) {
265
+ if (value === false) {
266
+ continue;
267
+ }
268
+ const flag = name.length === 1 ? `-${name}` : `--${name}`;
269
+ const values = Array.isArray(value) ? value : [value];
270
+ for (const currentValue of values) {
271
+ tokens.push(flag);
272
+ if (currentValue !== true) {
273
+ tokens.push(String(currentValue));
274
+ }
275
+ }
276
+ }
277
+ return tokens;
278
+ }
256
279
  function printCommandList(io, registry) {
257
280
  const internal = registry.filter((command) => command.source === "internal");
258
281
  const app = registry.filter((command) => command.source === "app");
259
- writeLine(io.stdout, "Internal Commands");
260
- for (const command of internal) {
261
- writeLine(io.stdout, ` ${command.usage} ${command.description}`);
262
- }
282
+ writeLine(io.stdout, "Usage:");
283
+ writeLine(io.stdout, " holo <command> [options] [arguments]");
263
284
  writeLine(io.stdout);
264
- writeLine(io.stdout, "App Commands");
285
+ writeLine(io.stdout, "Internal commands:");
286
+ printCommandListEntries(io, internal);
287
+ writeLine(io.stdout);
288
+ writeLine(io.stdout, "App commands:");
265
289
  if (app.length === 0) {
266
290
  writeLine(io.stdout, " (none)");
267
291
  return;
268
292
  }
269
- for (const command of app) {
270
- writeLine(io.stdout, ` ${command.usage} ${command.description}`);
293
+ printCommandListEntries(io, app);
294
+ }
295
+ function printCommandListEntries(io, commands) {
296
+ for (const command of commands) {
297
+ printCommandListEntry(io, command);
271
298
  }
272
299
  }
300
+ function printCommandListEntry(io, command) {
301
+ writeLine(io.stdout, ` ${command.name.padEnd(COMMAND_LIST_DESCRIPTION_COLUMN)}${command.description}`);
302
+ }
273
303
  function printCommandHelp(io, command) {
274
304
  writeLine(io.stdout, command.usage);
275
305
  writeLine(io.stdout, command.description);
@@ -372,6 +402,50 @@ function createInternalCommands(context, runtimeExecutor, queueExecutors = {}, p
372
402
  writeLine(context.stdout, ` ${resolvePackageManagerDevCommand(packageManager)}`);
373
403
  }
374
404
  },
405
+ {
406
+ name: "agents:install",
407
+ aliases: ["agent:install", "ai:install"],
408
+ description: "Install Holo-JS docs-search skills for coding agents.",
409
+ usage: "holo agents:install [--agent <all|codex|claude|cursor|windsurf|opencode|gemini|kiro>] [--global] [--force]",
410
+ source: "internal",
411
+ async prepare(input) {
412
+ const { normalizeAgentSkillTargets, SUPPORTED_AGENT_SKILL_TARGETS } = await loadAgentSkillsModule();
413
+ const requestedAgents = (collectMultiStringFlag(input.flags, "agent") ?? []).flatMap((entry) => splitCsv(entry) ?? []);
414
+ const agents = requestedAgents.length > 0 ? normalizeAgentSkillTargets(requestedAgents) : isInteractive(context, input.flags) ? await promptMultiChoice(context, "Coding agents", SUPPORTED_AGENT_SKILL_TARGETS, {
415
+ required: true,
416
+ initialValues: [...SUPPORTED_AGENT_SKILL_TARGETS]
417
+ }) : normalizeAgentSkillTargets([]);
418
+ return {
419
+ args: [],
420
+ flags: {
421
+ agent: agents,
422
+ ...resolveBooleanFlag(input.flags, "global") === true ? { global: true } : {},
423
+ ...resolveBooleanFlag(input.flags, "force") === true ? { force: true } : {}
424
+ }
425
+ };
426
+ },
427
+ async run(commandContext) {
428
+ const { installAgentSkills } = await loadAgentSkillsModule();
429
+ const agents = collectMultiStringFlag(commandContext.flags, "agent") ?? [];
430
+ const results = await installAgentSkills(context.projectRoot, {
431
+ agents,
432
+ global: commandContext.flags.global === true,
433
+ force: commandContext.flags.force === true
434
+ });
435
+ const created = results.filter((result) => result.status === "created").length;
436
+ const updated = results.filter((result) => result.status === "updated").length;
437
+ const unchanged = results.filter((result) => result.status === "unchanged").length;
438
+ const changed = created + updated;
439
+ writeLine(
440
+ context.stdout,
441
+ changed > 0 ? "Installed Holo-JS agent skills." : "Holo-JS agent skills are already installed."
442
+ );
443
+ for (const result of results) {
444
+ writeLine(context.stdout, ` - ${result.status} ${result.agent}: ${result.path}`);
445
+ }
446
+ writeLine(context.stdout, ` - summary: ${created} created, ${updated} updated, ${unchanged} unchanged`);
447
+ }
448
+ },
375
449
  {
376
450
  name: "key:generate",
377
451
  description: "Generate APP_KEY in the project .env file when it is missing.",
@@ -755,13 +829,18 @@ function createInternalCommands(context, runtimeExecutor, queueExecutors = {}, p
755
829
  {
756
830
  name: "start",
757
831
  description: "Run the production framework server with Holo runtime preloads.",
758
- usage: "holo start",
832
+ usage: "holo start [...frameworkArgs]",
759
833
  source: "internal",
760
- async prepare() {
761
- return { args: [], flags: {} };
834
+ async prepare(input) {
835
+ return { args: input.args, flags: input.flags };
762
836
  },
763
- async run() {
837
+ async run(input) {
764
838
  const runProjectStartServer = await resolveProjectExecutor(projectExecutors, "runProjectStartServer");
839
+ const passthroughArgs = serializePassthroughInput(input);
840
+ if (passthroughArgs.length > 0) {
841
+ await runProjectStartServer(context, context.projectRoot, void 0, passthroughArgs);
842
+ return;
843
+ }
765
844
  await runProjectStartServer(context, context.projectRoot);
766
845
  }
767
846
  },
@@ -1581,7 +1660,8 @@ function findCommand(registry, name) {
1581
1660
  async function runCli(argv, io) {
1582
1661
  try {
1583
1662
  const requestedCommandName = argv[0];
1584
- const projectRoot = requestedCommandName === "new" ? io.cwd : await (await loadProjectRuntimeModule()).findProjectRoot(io.cwd);
1663
+ const usesCurrentDirectoryAsProjectRoot = requestedCommandName === "new" || requestedCommandName === "agents:install" || requestedCommandName === "agent:install" || requestedCommandName === "ai:install";
1664
+ const projectRoot = usesCurrentDirectoryAsProjectRoot ? io.cwd : await (await loadProjectRuntimeModule()).findProjectRoot(io.cwd);
1585
1665
  let cachedProject;
1586
1666
  const loadProject = async () => {
1587
1667
  cachedProject ??= await (await loadProjectConfigModule()).loadProjectConfig(projectRoot);
@@ -1596,7 +1676,7 @@ async function runCli(argv, io) {
1596
1676
  };
1597
1677
  const internalCommands = createInternalCommands(internalContext);
1598
1678
  const registry = [...internalCommands];
1599
- const canSkipAppDiscovery = requestedCommandName === "config:cache" || requestedCommandName === "config:clear" || requestedCommandName === "key:generate" || requestedCommandName === "new" || requestedCommandName === "install" || requestedCommandName === "auth:notifications:publish" || requestedCommandName === "prepare" || requestedCommandName === "dev" || requestedCommandName === "build" || requestedCommandName === "cache:table" || requestedCommandName === "cache:clear" || requestedCommandName === "cache:forget" || requestedCommandName === "media:table" || requestedCommandName === "broadcast:work" || requestedCommandName === "queue:table" || requestedCommandName === "queue:failed-table" || requestedCommandName === "queue:work" || requestedCommandName === "queue:listen" || requestedCommandName === "queue:failed" || requestedCommandName === "queue:retry" || requestedCommandName === "queue:forget" || requestedCommandName === "queue:flush" || requestedCommandName === "queue:restart" || requestedCommandName === "queue:clear" || requestedCommandName === "rate-limit:clear";
1679
+ const canSkipAppDiscovery = requestedCommandName === "config:cache" || requestedCommandName === "config:clear" || requestedCommandName === "key:generate" || requestedCommandName === "new" || requestedCommandName === "install" || requestedCommandName === "agents:install" || requestedCommandName === "agent:install" || requestedCommandName === "ai:install" || requestedCommandName === "auth:notifications:publish" || requestedCommandName === "prepare" || requestedCommandName === "dev" || requestedCommandName === "build" || requestedCommandName === "cache:table" || requestedCommandName === "cache:clear" || requestedCommandName === "cache:forget" || requestedCommandName === "media:table" || requestedCommandName === "broadcast:work" || requestedCommandName === "queue:table" || requestedCommandName === "queue:failed-table" || requestedCommandName === "queue:work" || requestedCommandName === "queue:listen" || requestedCommandName === "queue:failed" || requestedCommandName === "queue:retry" || requestedCommandName === "queue:forget" || requestedCommandName === "queue:flush" || requestedCommandName === "queue:restart" || requestedCommandName === "queue:clear" || requestedCommandName === "rate-limit:clear";
1600
1680
  if (!canSkipAppDiscovery) {
1601
1681
  const initialProject = await loadProject();
1602
1682
  const appCommands = (await (await loadProjectDiscoveryModule()).discoverAppCommands(projectRoot, initialProject.config)).map((entry) => createAppCommandDefinition(entry));
@@ -3,15 +3,15 @@ import {
3
3
  hasRegisteredMigrationSlug,
4
4
  nextMigrationTemplate
5
5
  } from "./chunk-LXGQCG56.mjs";
6
- import "./chunk-LBJAJLKU.mjs";
7
6
  import {
8
7
  writeLine
9
8
  } from "./chunk-I7QBCEV7.mjs";
9
+ import "./chunk-LBJAJLKU.mjs";
10
10
  import "./chunk-D7O4SU6N.mjs";
11
11
  import {
12
12
  prepareProjectDiscovery
13
13
  } from "./chunk-VP2E62DF.mjs";
14
- import "./chunk-6UDDQUXY.mjs";
14
+ import "./chunk-7B2RVYLL.mjs";
15
15
  import {
16
16
  ensureProjectConfig
17
17
  } from "./chunk-YEFJBN56.mjs";
@@ -35,10 +35,10 @@ function normalizeMediaMigrationName(tableName = DEFAULT_MEDIA_TABLE) {
35
35
  function renderMediaTableMigration(tableName = DEFAULT_MEDIA_TABLE) {
36
36
  const tableNameLiteral = JSON.stringify(tableName);
37
37
  return [
38
- "import { defineMigration, type MigrationContext } from '@holo-js/db'",
38
+ "import { defineMigration } from '@holo-js/db'",
39
39
  "",
40
40
  "export default defineMigration({",
41
- " async up({ schema }: MigrationContext) {",
41
+ " async up({ schema }) {",
42
42
  ` await schema.createTable(${tableNameLiteral}, (table) => {`,
43
43
  " table.id()",
44
44
  " table.uuid('uuid').unique()",
@@ -60,7 +60,7 @@ function renderMediaTableMigration(tableName = DEFAULT_MEDIA_TABLE) {
60
60
  " table.index(['model_type', 'model_id', 'collection_name'])",
61
61
  " })",
62
62
  " },",
63
- " async down({ schema }: MigrationContext) {",
63
+ " async down({ schema }) {",
64
64
  ` await schema.dropTable(${tableNameLiteral})`,
65
65
  " },",
66
66
  "})",
@@ -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-I4NZRFTS.mjs");
96
+ const { runProjectPrepare } = await import("./dev-YPBQBEOE.mjs");
97
97
  await runProjectPrepare(projectRoot);
98
98
  writeLine(io.stdout, `Created migration: ${makeProjectRelativePath(projectRoot, migrationFilePath)}`);
99
99
  }
@@ -3,15 +3,15 @@ import {
3
3
  hasRegisteredMigrationSlug,
4
4
  nextMigrationTemplate
5
5
  } from "./chunk-LXGQCG56.mjs";
6
+ import "./chunk-LBJAJLKU.mjs";
6
7
  import {
7
8
  writeLine
8
9
  } from "./chunk-I7QBCEV7.mjs";
9
- import "./chunk-LBJAJLKU.mjs";
10
10
  import "./chunk-D7O4SU6N.mjs";
11
11
  import {
12
12
  prepareProjectDiscovery
13
13
  } from "./chunk-VP2E62DF.mjs";
14
- import "./chunk-LGU5YVKP.mjs";
14
+ import "./chunk-C624G3R2.mjs";
15
15
  import {
16
16
  ensureProjectConfig
17
17
  } from "./chunk-YEFJBN56.mjs";
@@ -35,10 +35,10 @@ function normalizeMediaMigrationName(tableName = DEFAULT_MEDIA_TABLE) {
35
35
  function renderMediaTableMigration(tableName = DEFAULT_MEDIA_TABLE) {
36
36
  const tableNameLiteral = JSON.stringify(tableName);
37
37
  return [
38
- "import { defineMigration, type MigrationContext } from '@holo-js/db'",
38
+ "import { defineMigration } from '@holo-js/db'",
39
39
  "",
40
40
  "export default defineMigration({",
41
- " async up({ schema }: MigrationContext) {",
41
+ " async up({ schema }) {",
42
42
  ` await schema.createTable(${tableNameLiteral}, (table) => {`,
43
43
  " table.id()",
44
44
  " table.uuid('uuid').unique()",
@@ -60,7 +60,7 @@ function renderMediaTableMigration(tableName = DEFAULT_MEDIA_TABLE) {
60
60
  " table.index(['model_type', 'model_id', 'collection_name'])",
61
61
  " })",
62
62
  " },",
63
- " async down({ schema }: MigrationContext) {",
63
+ " async down({ schema }) {",
64
64
  ` await schema.dropTable(${tableNameLiteral})`,
65
65
  " },",
66
66
  "})",
@@ -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-WOOZOWLR.mjs");
96
+ const { runProjectPrepare } = await import("./dev-L4Y2GU2E.mjs");
97
97
  await runProjectPrepare(projectRoot);
98
98
  writeLine(io.stdout, `Created migration: ${makeProjectRelativePath(projectRoot, migrationFilePath)}`);
99
99
  }
@@ -1,23 +1,23 @@
1
+ import {
2
+ initializeProjectRuntime
3
+ } from "./chunk-KS5TWO75.mjs";
1
4
  import {
2
5
  isIgnorableWatchError,
3
6
  isRecursiveWatchUnsupported,
4
7
  normalizeWatchedFilePath,
5
8
  runProjectPrepare,
6
9
  toPosixSlashes
7
- } from "./chunk-HZJWXL2W.mjs";
10
+ } from "./chunk-4K4CWMMP.mjs";
8
11
  import "./chunk-FGQ2I2YH.mjs";
12
+ import "./chunk-LBJAJLKU.mjs";
9
13
  import {
10
14
  writeLine
11
15
  } from "./chunk-I7QBCEV7.mjs";
12
- import {
13
- initializeProjectRuntime
14
- } from "./chunk-KS5TWO75.mjs";
15
- import "./chunk-LBJAJLKU.mjs";
16
16
  import "./chunk-D7O4SU6N.mjs";
17
17
  import {
18
18
  prepareProjectDiscovery
19
19
  } from "./chunk-VP2E62DF.mjs";
20
- import "./chunk-LGU5YVKP.mjs";
20
+ import "./chunk-C624G3R2.mjs";
21
21
  import {
22
22
  ensureProjectConfig,
23
23
  loadProjectConfig
@@ -261,7 +261,7 @@ async function getQueueRuntimeEnvironment(projectRoot) {
261
261
  throw new Error(`Discovered job "${entry.sourcePath}" does not export a Holo job.`);
262
262
  }
263
263
  if (!queueModule?.getRegisteredQueueJob(entry.name)) {
264
- queueModule.registerQueueJob(queueModule.normalizeQueueJobDefinition(job), {
264
+ queueModule.registerQueueJob(job, {
265
265
  name: entry.name,
266
266
  sourcePath: entry.sourcePath
267
267
  });
@@ -1,23 +1,23 @@
1
- import {
2
- initializeProjectRuntime
3
- } from "./chunk-KS5TWO75.mjs";
4
1
  import {
5
2
  isIgnorableWatchError,
6
3
  isRecursiveWatchUnsupported,
7
4
  normalizeWatchedFilePath,
8
5
  runProjectPrepare,
9
6
  toPosixSlashes
10
- } from "./chunk-ZHFXVJBE.mjs";
7
+ } from "./chunk-AJLRAC5M.mjs";
11
8
  import "./chunk-FGQ2I2YH.mjs";
12
- import "./chunk-LBJAJLKU.mjs";
13
9
  import {
14
10
  writeLine
15
11
  } from "./chunk-I7QBCEV7.mjs";
12
+ import {
13
+ initializeProjectRuntime
14
+ } from "./chunk-KS5TWO75.mjs";
15
+ import "./chunk-LBJAJLKU.mjs";
16
16
  import "./chunk-D7O4SU6N.mjs";
17
17
  import {
18
18
  prepareProjectDiscovery
19
19
  } from "./chunk-VP2E62DF.mjs";
20
- import "./chunk-6UDDQUXY.mjs";
20
+ import "./chunk-7B2RVYLL.mjs";
21
21
  import {
22
22
  ensureProjectConfig,
23
23
  loadProjectConfig
@@ -261,7 +261,7 @@ async function getQueueRuntimeEnvironment(projectRoot) {
261
261
  throw new Error(`Discovered job "${entry.sourcePath}" does not export a Holo job.`);
262
262
  }
263
263
  if (!queueModule?.getRegisteredQueueJob(entry.name)) {
264
- queueModule.registerQueueJob(queueModule.normalizeQueueJobDefinition(job), {
264
+ queueModule.registerQueueJob(job, {
265
265
  name: entry.name,
266
266
  sourcePath: entry.sourcePath
267
267
  });
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runProjectPrepare
3
- } from "./chunk-HZJWXL2W.mjs";
3
+ } from "./chunk-4K4CWMMP.mjs";
4
4
  import "./chunk-FGQ2I2YH.mjs";
5
5
  import {
6
6
  getRegistryMigrationSlug,
@@ -8,15 +8,15 @@ import {
8
8
  hasRegisteredMigrationSlug,
9
9
  nextMigrationTemplate
10
10
  } from "./chunk-LXGQCG56.mjs";
11
+ import "./chunk-LBJAJLKU.mjs";
11
12
  import {
12
13
  writeLine
13
14
  } from "./chunk-I7QBCEV7.mjs";
14
- import "./chunk-LBJAJLKU.mjs";
15
15
  import "./chunk-D7O4SU6N.mjs";
16
16
  import {
17
17
  prepareProjectDiscovery
18
18
  } from "./chunk-VP2E62DF.mjs";
19
- import "./chunk-LGU5YVKP.mjs";
19
+ import "./chunk-C624G3R2.mjs";
20
20
  import {
21
21
  ensureProjectConfig
22
22
  } from "./chunk-YEFJBN56.mjs";
@@ -41,15 +41,17 @@ async function loadQueueConfig(projectRoot) {
41
41
  function normalizeQueueMigrationName(tableName) {
42
42
  return normalizeMigrationSlug(`create_${tableName.replaceAll(".", "_")}_table`);
43
43
  }
44
+ function renderStringLiteral(value) {
45
+ return JSON.stringify(value);
46
+ }
44
47
  function renderQueueTableMigration(tableName) {
45
- const tableNameLiteral = JSON.stringify(tableName);
46
48
  const indexPrefix = tableName.replaceAll(".", "_");
47
49
  return [
48
- "import { defineMigration, type MigrationContext } from '@holo-js/db'",
50
+ "import { defineMigration } from '@holo-js/db'",
49
51
  "",
50
52
  "export default defineMigration({",
51
- " async up({ schema }: MigrationContext) {",
52
- ` await schema.createTable(${tableNameLiteral}, (table) => {`,
53
+ " async up({ schema }) {",
54
+ ` await schema.createTable(${renderStringLiteral(tableName)}, (table) => {`,
53
55
  " table.string('id').primaryKey()",
54
56
  " table.string('job')",
55
57
  " table.string('connection')",
@@ -61,27 +63,26 @@ function renderQueueTableMigration(tableName) {
61
63
  " table.bigInteger('reserved_at').nullable()",
62
64
  " table.string('reservation_id').nullable()",
63
65
  " table.bigInteger('created_at')",
64
- ` table.index(['queue', 'available_at'], ${JSON.stringify(`${indexPrefix}_queue_available_at_index`)})`,
65
- ` table.index(['queue', 'reserved_at'], ${JSON.stringify(`${indexPrefix}_queue_reserved_at_index`)})`,
66
- ` table.index(['reservation_id'], ${JSON.stringify(`${indexPrefix}_reservation_id_index`)})`,
66
+ ` table.index(['queue', 'available_at'], ${renderStringLiteral(`${indexPrefix}_queue_available_at_index`)})`,
67
+ ` table.index(['queue', 'reserved_at'], ${renderStringLiteral(`${indexPrefix}_queue_reserved_at_index`)})`,
68
+ ` table.index(['reservation_id'], ${renderStringLiteral(`${indexPrefix}_reservation_id_index`)})`,
67
69
  " })",
68
70
  " },",
69
- " async down({ schema }: MigrationContext) {",
70
- ` await schema.dropTable(${tableNameLiteral})`,
71
+ " async down({ schema }) {",
72
+ ` await schema.dropTable(${renderStringLiteral(tableName)})`,
71
73
  " },",
72
74
  "})",
73
75
  ""
74
76
  ].join("\n");
75
77
  }
76
78
  function renderFailedJobsTableMigration(tableName) {
77
- const tableNameLiteral = JSON.stringify(tableName);
78
79
  const indexPrefix = tableName.replaceAll(".", "_");
79
80
  return [
80
- "import { defineMigration, type MigrationContext } from '@holo-js/db'",
81
+ "import { defineMigration } from '@holo-js/db'",
81
82
  "",
82
83
  "export default defineMigration({",
83
- " async up({ schema }: MigrationContext) {",
84
- ` await schema.createTable(${tableNameLiteral}, (table) => {`,
84
+ " async up({ schema }) {",
85
+ ` await schema.createTable(${renderStringLiteral(tableName)}, (table) => {`,
85
86
  " table.string('id').primaryKey()",
86
87
  " table.string('job_id')",
87
88
  " table.string('job')",
@@ -90,12 +91,12 @@ function renderFailedJobsTableMigration(tableName) {
90
91
  " table.text('payload')",
91
92
  " table.text('exception')",
92
93
  " table.bigInteger('failed_at')",
93
- ` table.index(['job_id'], ${JSON.stringify(`${indexPrefix}_job_id_index`)})`,
94
- ` table.index(['failed_at'], ${JSON.stringify(`${indexPrefix}_failed_at_index`)})`,
94
+ ` table.index(['job_id'], ${renderStringLiteral(`${indexPrefix}_job_id_index`)})`,
95
+ ` table.index(['failed_at'], ${renderStringLiteral(`${indexPrefix}_failed_at_index`)})`,
95
96
  " })",
96
97
  " },",
97
- " async down({ schema }: MigrationContext) {",
98
- ` await schema.dropTable(${tableNameLiteral})`,
98
+ " async down({ schema }) {",
99
+ ` await schema.dropTable(${renderStringLiteral(tableName)})`,
99
100
  " },",
100
101
  "})",
101
102
  ""
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runProjectPrepare
3
- } from "./chunk-ZHFXVJBE.mjs";
3
+ } from "./chunk-AJLRAC5M.mjs";
4
4
  import "./chunk-FGQ2I2YH.mjs";
5
5
  import {
6
6
  getRegistryMigrationSlug,
@@ -8,15 +8,15 @@ import {
8
8
  hasRegisteredMigrationSlug,
9
9
  nextMigrationTemplate
10
10
  } from "./chunk-LXGQCG56.mjs";
11
- import "./chunk-LBJAJLKU.mjs";
12
11
  import {
13
12
  writeLine
14
13
  } from "./chunk-I7QBCEV7.mjs";
14
+ import "./chunk-LBJAJLKU.mjs";
15
15
  import "./chunk-D7O4SU6N.mjs";
16
16
  import {
17
17
  prepareProjectDiscovery
18
18
  } from "./chunk-VP2E62DF.mjs";
19
- import "./chunk-6UDDQUXY.mjs";
19
+ import "./chunk-7B2RVYLL.mjs";
20
20
  import {
21
21
  ensureProjectConfig
22
22
  } from "./chunk-YEFJBN56.mjs";
@@ -41,15 +41,17 @@ async function loadQueueConfig(projectRoot) {
41
41
  function normalizeQueueMigrationName(tableName) {
42
42
  return normalizeMigrationSlug(`create_${tableName.replaceAll(".", "_")}_table`);
43
43
  }
44
+ function renderStringLiteral(value) {
45
+ return JSON.stringify(value);
46
+ }
44
47
  function renderQueueTableMigration(tableName) {
45
- const tableNameLiteral = JSON.stringify(tableName);
46
48
  const indexPrefix = tableName.replaceAll(".", "_");
47
49
  return [
48
- "import { defineMigration, type MigrationContext } from '@holo-js/db'",
50
+ "import { defineMigration } from '@holo-js/db'",
49
51
  "",
50
52
  "export default defineMigration({",
51
- " async up({ schema }: MigrationContext) {",
52
- ` await schema.createTable(${tableNameLiteral}, (table) => {`,
53
+ " async up({ schema }) {",
54
+ ` await schema.createTable(${renderStringLiteral(tableName)}, (table) => {`,
53
55
  " table.string('id').primaryKey()",
54
56
  " table.string('job')",
55
57
  " table.string('connection')",
@@ -61,27 +63,26 @@ function renderQueueTableMigration(tableName) {
61
63
  " table.bigInteger('reserved_at').nullable()",
62
64
  " table.string('reservation_id').nullable()",
63
65
  " table.bigInteger('created_at')",
64
- ` table.index(['queue', 'available_at'], ${JSON.stringify(`${indexPrefix}_queue_available_at_index`)})`,
65
- ` table.index(['queue', 'reserved_at'], ${JSON.stringify(`${indexPrefix}_queue_reserved_at_index`)})`,
66
- ` table.index(['reservation_id'], ${JSON.stringify(`${indexPrefix}_reservation_id_index`)})`,
66
+ ` table.index(['queue', 'available_at'], ${renderStringLiteral(`${indexPrefix}_queue_available_at_index`)})`,
67
+ ` table.index(['queue', 'reserved_at'], ${renderStringLiteral(`${indexPrefix}_queue_reserved_at_index`)})`,
68
+ ` table.index(['reservation_id'], ${renderStringLiteral(`${indexPrefix}_reservation_id_index`)})`,
67
69
  " })",
68
70
  " },",
69
- " async down({ schema }: MigrationContext) {",
70
- ` await schema.dropTable(${tableNameLiteral})`,
71
+ " async down({ schema }) {",
72
+ ` await schema.dropTable(${renderStringLiteral(tableName)})`,
71
73
  " },",
72
74
  "})",
73
75
  ""
74
76
  ].join("\n");
75
77
  }
76
78
  function renderFailedJobsTableMigration(tableName) {
77
- const tableNameLiteral = JSON.stringify(tableName);
78
79
  const indexPrefix = tableName.replaceAll(".", "_");
79
80
  return [
80
- "import { defineMigration, type MigrationContext } from '@holo-js/db'",
81
+ "import { defineMigration } from '@holo-js/db'",
81
82
  "",
82
83
  "export default defineMigration({",
83
- " async up({ schema }: MigrationContext) {",
84
- ` await schema.createTable(${tableNameLiteral}, (table) => {`,
84
+ " async up({ schema }) {",
85
+ ` await schema.createTable(${renderStringLiteral(tableName)}, (table) => {`,
85
86
  " table.string('id').primaryKey()",
86
87
  " table.string('job_id')",
87
88
  " table.string('job')",
@@ -90,12 +91,12 @@ function renderFailedJobsTableMigration(tableName) {
90
91
  " table.text('payload')",
91
92
  " table.text('exception')",
92
93
  " table.bigInteger('failed_at')",
93
- ` table.index(['job_id'], ${JSON.stringify(`${indexPrefix}_job_id_index`)})`,
94
- ` table.index(['failed_at'], ${JSON.stringify(`${indexPrefix}_failed_at_index`)})`,
94
+ ` table.index(['job_id'], ${renderStringLiteral(`${indexPrefix}_job_id_index`)})`,
95
+ ` table.index(['failed_at'], ${renderStringLiteral(`${indexPrefix}_failed_at_index`)})`,
95
96
  " })",
96
97
  " },",
97
- " async down({ schema }: MigrationContext) {",
98
- ` await schema.dropTable(${tableNameLiteral})`,
98
+ " async down({ schema }) {",
99
+ ` await schema.dropTable(${renderStringLiteral(tableName)})`,
99
100
  " },",
100
101
  "})",
101
102
  ""
@@ -26,7 +26,7 @@ import {
26
26
  import "./chunk-LBJAJLKU.mjs";
27
27
  import "./chunk-D7O4SU6N.mjs";
28
28
  import "./chunk-VP2E62DF.mjs";
29
- import "./chunk-LGU5YVKP.mjs";
29
+ import "./chunk-7B2RVYLL.mjs";
30
30
  import "./chunk-YEFJBN56.mjs";
31
31
  import "./chunk-J76GH2DR.mjs";
32
32
  import "./chunk-ILU426CF.mjs";
@@ -26,7 +26,7 @@ import {
26
26
  import "./chunk-LBJAJLKU.mjs";
27
27
  import "./chunk-D7O4SU6N.mjs";
28
28
  import "./chunk-VP2E62DF.mjs";
29
- import "./chunk-6UDDQUXY.mjs";
29
+ import "./chunk-C624G3R2.mjs";
30
30
  import "./chunk-YEFJBN56.mjs";
31
31
  import "./chunk-J76GH2DR.mjs";
32
32
  import "./chunk-ILU426CF.mjs";
@@ -56,7 +56,7 @@ import {
56
56
  upsertMediaPackageDependency,
57
57
  upsertNotificationsPackageDependency,
58
58
  upsertSecurityPackageDependency
59
- } from "./chunk-6UDDQUXY.mjs";
59
+ } from "./chunk-7B2RVYLL.mjs";
60
60
  import "./chunk-YEFJBN56.mjs";
61
61
  import {
62
62
  renderAuthProviderRouteFiles,
@@ -56,7 +56,7 @@ import {
56
56
  upsertMediaPackageDependency,
57
57
  upsertNotificationsPackageDependency,
58
58
  upsertSecurityPackageDependency
59
- } from "./chunk-LGU5YVKP.mjs";
59
+ } from "./chunk-C624G3R2.mjs";
60
60
  import "./chunk-YEFJBN56.mjs";
61
61
  import {
62
62
  renderAuthProviderRouteFiles,