@holo-js/cli 0.1.4 → 0.1.5

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 (56) hide show
  1. package/dist/bin/holo.mjs +192 -35
  2. package/dist/{broadcast-CSSARTSA.mjs → broadcast-RT5KVZWP.mjs} +5 -5
  3. package/dist/{cache-4G6QGIZO.mjs → cache-NHCCHT44.mjs} +5 -5
  4. package/dist/{cache-migrations-NATT5WPQ.mjs → cache-migrations-R2RL2RVD.mjs} +15 -16
  5. package/dist/{chunk-EUIVXVJL.mjs → chunk-57SJ566R.mjs} +1 -1
  6. package/dist/chunk-5BLEC66P.mjs +284 -0
  7. package/dist/{chunk-JX2ZH6XY.mjs → chunk-5EU32E7X.mjs} +3 -3
  8. package/dist/{chunk-Q5F6C2D4.mjs → chunk-BAFQ2GOA.mjs} +1 -1
  9. package/dist/{chunk-CUL4RJTG.mjs → chunk-F4MT6GBK.mjs} +1 -1
  10. package/dist/{chunk-3OTCSFDG.mjs → chunk-MXKNQACM.mjs} +544 -82
  11. package/dist/{chunk-QYLSMF7V.mjs → chunk-OZUDZEAW.mjs} +142 -28
  12. package/dist/{chunk-66FHW725.mjs → chunk-R6BWRY3E.mjs} +28 -2
  13. package/dist/{chunk-ZLRO7HXY.mjs → chunk-SCCPDJGO.mjs} +156 -15
  14. package/dist/{chunk-VT5IDQG6.mjs → chunk-UZTDQKIY.mjs} +61 -44
  15. package/dist/{chunk-MZXN2YMI.mjs → chunk-VCEO6N5T.mjs} +3542 -2517
  16. package/dist/{config-LS5USBRB.mjs → config-5JSC6KJG.mjs} +3 -3
  17. package/dist/{dev-LZ3O2E3U.mjs → dev-OSLYSBTL.mjs} +7 -7
  18. package/dist/{discovery-GBLAUTXS.mjs → discovery-JLT2EOGH.mjs} +3 -3
  19. package/dist/{generators-DSN4GWJI.mjs → generators-ZIWACCBE.mjs} +134 -16
  20. package/dist/index.d.ts +1 -1
  21. package/dist/index.mjs +189 -32
  22. package/dist/media-migrations-UBAL2YVV.mjs +117 -0
  23. package/dist/{queue-FV35LLPR.mjs → queue-I66EISVS.mjs} +14 -14
  24. package/dist/{queue-migrations-SSIYKK5S.mjs → queue-migrations-UIAMAB6E.mjs} +24 -20
  25. package/dist/{runtime-EFZ5H5IL.mjs → runtime-MMQGO4PP.mjs} +9 -7
  26. package/dist/{runtime-OOSJ5JBY.mjs → runtime-ZKD6URAV.mjs} +1 -1
  27. package/dist/{scaffold-7OTDH4UR.mjs → scaffold-ISDVICNQ.mjs} +18 -5
  28. package/dist/{security-ATKDC26E.mjs → security-OZXTMYXF.mjs} +10 -7
  29. package/package.json +13 -12
  30. package/dist/broadcast-YSIJCL3R.mjs +0 -85
  31. package/dist/cache-OWQY4E7W.mjs +0 -67
  32. package/dist/cache-migrations-RVEA6CEU.mjs +0 -155
  33. package/dist/chunk-BWW5TDFI.mjs +0 -4
  34. package/dist/chunk-D4GG556Y.mjs +0 -23
  35. package/dist/chunk-DMH2B4UQ.mjs +0 -343
  36. package/dist/chunk-ET7UXHHQ.mjs +0 -166
  37. package/dist/chunk-G5ADO27Q.mjs +0 -463
  38. package/dist/chunk-GSQ3HTRO.mjs +0 -165
  39. package/dist/chunk-H7TJ4FB3.mjs +0 -848
  40. package/dist/chunk-ICJR7TS4.mjs +0 -66
  41. package/dist/chunk-M7J3YTHR.mjs +0 -26
  42. package/dist/chunk-QFUSWV3J.mjs +0 -3237
  43. package/dist/chunk-S7P7EBM3.mjs +0 -787
  44. package/dist/chunk-SRWJU3A5.mjs +0 -11
  45. package/dist/chunk-URK7C3VQ.mjs +0 -538
  46. package/dist/chunk-XUYKPU5Q.mjs +0 -272
  47. package/dist/config-DMWBMMGD.mjs +0 -26
  48. package/dist/dev-KQFT7RHR.mjs +0 -43
  49. package/dist/discovery-R733D2PO.mjs +0 -29
  50. package/dist/generators-WX45BI4U.mjs +0 -426
  51. package/dist/queue-6OG7VJ34.mjs +0 -626
  52. package/dist/queue-migrations-NK2EYX3J.mjs +0 -163
  53. package/dist/runtime-4BV3JODY.mjs +0 -56
  54. package/dist/runtime-ANBO7VQM.mjs +0 -33
  55. package/dist/scaffold-DRKBGS2K.mjs +0 -120
  56. package/dist/security-R7VH6W5H.mjs +0 -69
@@ -1,66 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- fileExists
4
- } from "./chunk-M7J3YTHR.mjs";
5
-
6
- // src/migrations.ts
7
- import { join } from "path";
8
- import {
9
- generateMigrationTemplate,
10
- inferMigrationTableName,
11
- inferMigrationTemplateKind,
12
- normalizeMigrationSlug
13
- } from "@holo-js/db";
14
- var MIGRATION_NAME_PREFIX_PATTERN = /^\d{4}_\d{2}_\d{2}_\d{6}_/;
15
- function stripMigrationNamePrefix(name) {
16
- return name.replace(MIGRATION_NAME_PREFIX_PATTERN, "");
17
- }
18
- function getRegistryMigrationSlug(name) {
19
- return normalizeMigrationSlug(stripMigrationNamePrefix(name));
20
- }
21
- function hasRegisteredMigrationSlug(registry, migrationSlug) {
22
- return Boolean(registry?.migrations.some((entry) => {
23
- try {
24
- return getRegistryMigrationSlug(entry.name) === migrationSlug;
25
- } catch {
26
- return false;
27
- }
28
- }));
29
- }
30
- function hasRegisteredCreateTableMigration(registry, tableName) {
31
- const expectedSlug = `create_${tableName}_table`;
32
- return Boolean(registry?.migrations.some((entry) => {
33
- try {
34
- const slug = getRegistryMigrationSlug(entry.name);
35
- if (slug === expectedSlug) {
36
- return true;
37
- }
38
- if (inferMigrationTemplateKind(slug) !== "create_table") {
39
- return false;
40
- }
41
- return inferMigrationTableName(slug, "create_table") === tableName;
42
- } catch {
43
- return false;
44
- }
45
- }));
46
- }
47
- async function nextMigrationTemplate(name, migrationsDir, options = {}) {
48
- let offsetSeconds = 0;
49
- while (true) {
50
- const candidate = generateMigrationTemplate(name, {
51
- date: new Date(Date.now() + offsetSeconds * 1e3),
52
- ...options
53
- });
54
- if (!await fileExists(join(migrationsDir, candidate.fileName))) {
55
- return candidate;
56
- }
57
- offsetSeconds += 1;
58
- }
59
- }
60
-
61
- export {
62
- getRegistryMigrationSlug,
63
- hasRegisteredMigrationSlug,
64
- hasRegisteredCreateTableMigration,
65
- nextMigrationTemplate
66
- };
@@ -1,26 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- readTextFile
4
- } from "./chunk-66FHW725.mjs";
5
-
6
- // src/fs-utils.ts
7
- import { stat } from "fs/promises";
8
- async function fileExists(path) {
9
- try {
10
- await stat(path);
11
- return true;
12
- } catch {
13
- return false;
14
- }
15
- }
16
- async function ensureAbsent(path) {
17
- const existing = await readTextFile(path);
18
- if (typeof existing !== "undefined") {
19
- throw new TypeError(`Refusing to overwrite existing file: ${path}`);
20
- }
21
- }
22
-
23
- export {
24
- fileExists,
25
- ensureAbsent
26
- };