@holo-js/cli 0.3.0 → 0.3.2
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-GUQFANQ4.mjs} +9 -11
- package/dist/{cache-A42JSVYA.mjs → cache-PCM2BJJ2.mjs} +8 -9
- package/dist/{cache-migrations-4WKSEN2Q.mjs → cache-migrations-M6VC3JW3.mjs} +13 -15
- package/dist/{chunk-6BHJLCAO.mjs → chunk-BVULOZZ4.mjs} +52 -14
- package/dist/{chunk-TRYHX5S4.mjs → chunk-I6EXRSZM.mjs} +1 -1
- package/dist/{chunk-TH5YCOZB.mjs → chunk-JLZNWWFV.mjs} +28 -17
- package/dist/{chunk-R4ZYMEDU.mjs → chunk-NSG3OJDY.mjs} +116 -7
- package/dist/{chunk-YACY2572.mjs → chunk-OQEZ3MOE.mjs} +47 -47
- package/dist/{chunk-3RFRE7XG.mjs → chunk-SCVF2F3I.mjs} +2 -2
- package/dist/{chunk-EQUFFLRG.mjs → chunk-VQP6GHIQ.mjs} +6 -6
- package/dist/{chunk-QSVMXMTQ.mjs → chunk-VUJ4ITXR.mjs} +3 -3
- package/dist/{chunk-OLZEMIDQ.mjs → chunk-WMBFSYWK.mjs} +1 -1
- package/dist/{chunk-LHK5YUR4.mjs → chunk-XXQUCGBO.mjs} +1 -1
- package/dist/{chunk-I7QBCEV7.mjs → chunk-Y355VYRN.mjs} +5 -3
- package/dist/{chunk-VRGB6DIS.mjs → chunk-YJWHIQ45.mjs} +2 -0
- package/dist/{chunk-JVLZ3SOW.mjs → chunk-ZNJ4APGF.mjs} +2 -2
- package/dist/{config-BZHQK532.mjs → config-43W3SZUI.mjs} +3 -3
- package/dist/{dev-7KGRV56X.mjs → dev-SNXMGPLU.mjs} +9 -10
- package/dist/{discovery-HNH3BLDL.mjs → discovery-7TQXEUYW.mjs} +4 -4
- package/dist/{generators-3FVW4AEJ.mjs → generators-2KJ6OFWA.mjs} +14 -16
- package/dist/index.mjs +38 -35
- package/dist/{media-migrations-EG34NYAG.mjs → media-migrations-JMA7QMX7.mjs} +10 -12
- package/dist/{plugins-ZGLB6JO6.mjs → plugins-D6FWODCH.mjs} +3 -3
- package/dist/{queue-BEZDCZCY.mjs → queue-6QSL5VFZ.mjs} +11 -13
- package/dist/{queue-R54DUUYA.mjs → queue-SAPFMTB7.mjs} +13 -15
- package/dist/{queue-migrations-AM3AKT76.mjs → queue-migrations-GSREPIHP.mjs} +13 -15
- package/dist/{runtime-VR5BDPYQ.mjs → runtime-HYSSH54H.mjs} +1 -1
- package/dist/{runtime-4TJYZLQV.mjs → runtime-RX46GVZQ.mjs} +8 -10
- package/dist/runtime-worker.mjs +18 -1
- package/dist/{scaffold-ASEX5LEX.mjs → scaffold-HPNFLBF2.mjs} +7 -6
- package/dist/{security-KYTLP4DF.mjs → security-NR2WEPQ6.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
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
isRecord,
|
|
35
35
|
makeProjectRelativePath,
|
|
36
36
|
normalizeScaffoldOptionalPackages
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-OQEZ3MOE.mjs";
|
|
38
38
|
|
|
39
39
|
// src/templates.ts
|
|
40
40
|
import { dirname, relative, resolve } from "path";
|
|
@@ -653,6 +653,12 @@ function renderNextBroadcastAuthRoute() {
|
|
|
653
653
|
function renderNextBroadcastConfigRoute() {
|
|
654
654
|
return renderNextRouteBridge("../../../.holo-js/generated/next/broadcast-config-route", ["GET"]);
|
|
655
655
|
}
|
|
656
|
+
function renderNextRealtimeQueryRoute() {
|
|
657
|
+
return renderNextRouteBridge("../../../../.holo-js/generated/next/realtime-query-route", ["POST"]);
|
|
658
|
+
}
|
|
659
|
+
function renderNextRealtimeMutationRoute() {
|
|
660
|
+
return renderNextRouteBridge("../../../../.holo-js/generated/next/realtime-mutation-route", ["POST"]);
|
|
661
|
+
}
|
|
656
662
|
function renderNextGeneratedBroadcastConfigRoute() {
|
|
657
663
|
return [
|
|
658
664
|
"import { renderBroadcastClientConfigResponse } from '@holo-js/broadcast/client-config'",
|
|
@@ -701,7 +707,7 @@ function renderNextGeneratedBroadcastAuthRoute() {
|
|
|
701
707
|
].join("\n");
|
|
702
708
|
}
|
|
703
709
|
function renderNextGeneratedRealtimeDefinitions(importPaths = []) {
|
|
704
|
-
const imports = importPaths.map((importPath, index) => `import * as realtimeModule${index} from ${JSON.stringify(importPath)}`);
|
|
710
|
+
const imports = importPaths.map((importPath, index) => `import * as realtimeModule${index} from ${JSON.stringify(`${importPath}?holo-realtime-server`)}`);
|
|
705
711
|
const values = importPaths.map((_importPath, index) => `...Object.values(realtimeModule${index})`);
|
|
706
712
|
return [
|
|
707
713
|
...imports,
|
|
@@ -710,6 +716,47 @@ function renderNextGeneratedRealtimeDefinitions(importPaths = []) {
|
|
|
710
716
|
""
|
|
711
717
|
].join("\n");
|
|
712
718
|
}
|
|
719
|
+
function renderNextGeneratedRealtimeServerModules() {
|
|
720
|
+
return [
|
|
721
|
+
"declare module '*?holo-realtime-server' {",
|
|
722
|
+
" const realtimeModule: Readonly<Record<string, unknown>>",
|
|
723
|
+
" export = realtimeModule",
|
|
724
|
+
"}",
|
|
725
|
+
""
|
|
726
|
+
].join("\n");
|
|
727
|
+
}
|
|
728
|
+
function renderNextGeneratedRealtimeQueryRoute() {
|
|
729
|
+
return [
|
|
730
|
+
"import { handleRealtimeQueryRequest } from '@holo-js/realtime/server'",
|
|
731
|
+
"import { realtimeDefinitions } from './realtime-definitions'",
|
|
732
|
+
"import { holo } from './holo'",
|
|
733
|
+
"",
|
|
734
|
+
"export async function POST(request: Request) {",
|
|
735
|
+
" const app = await holo.getApp()",
|
|
736
|
+
" return await handleRealtimeQueryRequest(request, {",
|
|
737
|
+
" projectRoot: app.projectRoot,",
|
|
738
|
+
" definitions: realtimeDefinitions,",
|
|
739
|
+
" })",
|
|
740
|
+
"}",
|
|
741
|
+
""
|
|
742
|
+
].join("\n");
|
|
743
|
+
}
|
|
744
|
+
function renderNextGeneratedRealtimeMutationRoute() {
|
|
745
|
+
return [
|
|
746
|
+
"import { handleRealtimeMutationRequest } from '@holo-js/realtime/server'",
|
|
747
|
+
"import { realtimeDefinitions } from './realtime-definitions'",
|
|
748
|
+
"import { holo } from './holo'",
|
|
749
|
+
"",
|
|
750
|
+
"export async function POST(request: Request) {",
|
|
751
|
+
" const app = await holo.getApp()",
|
|
752
|
+
" return await handleRealtimeMutationRequest(request, {",
|
|
753
|
+
" projectRoot: app.projectRoot,",
|
|
754
|
+
" definitions: realtimeDefinitions,",
|
|
755
|
+
" })",
|
|
756
|
+
"}",
|
|
757
|
+
""
|
|
758
|
+
].join("\n");
|
|
759
|
+
}
|
|
713
760
|
function renderNextManagedRouteFiles(options = {}) {
|
|
714
761
|
return [
|
|
715
762
|
{ path: ".holo-js/generated/next/holo.ts", contents: renderNextHoloHelper() },
|
|
@@ -717,7 +764,12 @@ function renderNextManagedRouteFiles(options = {}) {
|
|
|
717
764
|
...options.storageEnabled ? [{ path: ".holo-js/generated/next/storage-route.ts", contents: renderNextGeneratedStorageRoute() }] : [],
|
|
718
765
|
...options.broadcastEnabled ? [{ path: ".holo-js/generated/next/broadcast-config-route.ts", contents: renderNextGeneratedBroadcastConfigRoute() }] : [],
|
|
719
766
|
...options.broadcastAuthEnabled ? [{ path: ".holo-js/generated/next/broadcast-auth-route.ts", contents: renderNextGeneratedBroadcastAuthRoute() }] : [],
|
|
720
|
-
...options.realtimeEnabled ? [
|
|
767
|
+
...options.realtimeEnabled ? [
|
|
768
|
+
{ path: ".holo-js/generated/next/realtime-definitions.ts", contents: renderNextGeneratedRealtimeDefinitions() },
|
|
769
|
+
{ path: ".holo-js/generated/next/realtime-server-modules.d.ts", contents: renderNextGeneratedRealtimeServerModules() },
|
|
770
|
+
{ path: ".holo-js/generated/next/realtime-query-route.ts", contents: renderNextGeneratedRealtimeQueryRoute() },
|
|
771
|
+
{ path: ".holo-js/generated/next/realtime-mutation-route.ts", contents: renderNextGeneratedRealtimeMutationRoute() }
|
|
772
|
+
] : []
|
|
721
773
|
];
|
|
722
774
|
}
|
|
723
775
|
function renderNextManagedHostedAuthRouteFiles(features) {
|
|
@@ -1005,6 +1057,10 @@ var FRAMEWORK_RENDERERS = {
|
|
|
1005
1057
|
...authEnabled ? [{ path: "app/api/auth/user/route.ts", contents: renderNextCurrentAuthRoute() }] : [],
|
|
1006
1058
|
...storageEnabled ? [{ path: "app/storage/[[...path]]/route.ts", contents: renderNextStorageRoute() }] : [],
|
|
1007
1059
|
...broadcastEnabled ? [{ path: "app/broadcasting/config/route.ts", contents: renderNextBroadcastConfigRoute() }] : [],
|
|
1060
|
+
...realtimeEnabled ? [
|
|
1061
|
+
{ path: "app/holo/realtime/query/route.ts", contents: renderNextRealtimeQueryRoute() },
|
|
1062
|
+
{ path: "app/holo/realtime/mutation/route.ts", contents: renderNextRealtimeMutationRoute() }
|
|
1063
|
+
] : [],
|
|
1008
1064
|
...renderNextManagedRouteFiles({ authEnabled, broadcastEnabled, storageEnabled, realtimeEnabled })
|
|
1009
1065
|
];
|
|
1010
1066
|
}
|
|
@@ -1463,6 +1519,8 @@ function renderManagedSvelteServerHooksModule(features) {
|
|
|
1463
1519
|
"import { renderBroadcastClientConfigResponse } from '@holo-js/broadcast/client-config'"
|
|
1464
1520
|
] : [],
|
|
1465
1521
|
...features.storageEnabled ? ["import { createPublicStorageResponse } from '@holo-js/storage'"] : [],
|
|
1522
|
+
...features.realtimeEnabled ? ["import { handleRealtimeMutationRequest, handleRealtimeQueryRequest } from '@holo-js/realtime/server'"] : [],
|
|
1523
|
+
...features.realtimeImportPaths.map((importPath, index) => `import * as holoRealtimeModule${index} from ${JSON.stringify(importPath)}`),
|
|
1466
1524
|
...features.clerkEnabled ? ["import { completeClerkAuth, loginWithClerk, logoutWithClerk, registerWithClerk } from '@holo-js/auth-clerk'"] : [],
|
|
1467
1525
|
...features.workosEnabled ? ["import { completeWorkosAuth, loginWithWorkos, logoutWithWorkos, registerWithWorkos } from '@holo-js/auth-workos'"] : [],
|
|
1468
1526
|
"import { holo } from './sveltekit/holo'",
|
|
@@ -1473,6 +1531,7 @@ function renderManagedSvelteServerHooksModule(features) {
|
|
|
1473
1531
|
...features.authEnabled ? ["handleHoloCurrentAuthRoute"] : [],
|
|
1474
1532
|
...features.storageEnabled ? ["handleHoloStorageRoute"] : [],
|
|
1475
1533
|
...features.broadcastEnabled ? ["handleHoloBroadcastConfigRoute", "handleHoloBroadcastAuthRoute"] : [],
|
|
1534
|
+
...features.realtimeEnabled ? ["handleHoloRealtimeQueryRoute", "handleHoloRealtimeMutationRoute"] : [],
|
|
1476
1535
|
...features.clerkEnabled ? [
|
|
1477
1536
|
"handleHoloClerkLoginRoute",
|
|
1478
1537
|
"handleHoloClerkRegisterRoute",
|
|
@@ -1496,6 +1555,9 @@ function renderManagedSvelteServerHooksModule(features) {
|
|
|
1496
1555
|
"",
|
|
1497
1556
|
"type HoloApp = Awaited<ReturnType<typeof holo.getApp>>",
|
|
1498
1557
|
"type HoloRouteHandler = (event: RequestEvent, app: HoloApp) => Promise<Response | undefined>",
|
|
1558
|
+
...features.realtimeEnabled ? [
|
|
1559
|
+
`const realtimeDefinitions = [${features.realtimeImportPaths.map((_path, index) => `...Object.values(holoRealtimeModule${index})`).join(", ")}] as const`
|
|
1560
|
+
] : [],
|
|
1499
1561
|
"",
|
|
1500
1562
|
"function isRoute(event: RequestEvent, method: string, paths: readonly string[]): boolean {",
|
|
1501
1563
|
" return event.request.method.toUpperCase() === method && paths.includes(event.url.pathname)",
|
|
@@ -1602,6 +1664,30 @@ function renderManagedSvelteServerHooksModule(features) {
|
|
|
1602
1664
|
"}",
|
|
1603
1665
|
""
|
|
1604
1666
|
] : [],
|
|
1667
|
+
...features.realtimeEnabled ? [
|
|
1668
|
+
"async function handleHoloRealtimeQueryRoute(event: RequestEvent, app: HoloApp): Promise<Response | undefined> {",
|
|
1669
|
+
" if (!isRoute(event, 'POST', ['/holo/realtime/query'])) {",
|
|
1670
|
+
" return undefined",
|
|
1671
|
+
" }",
|
|
1672
|
+
"",
|
|
1673
|
+
" return await handleRealtimeQueryRequest(event.request, {",
|
|
1674
|
+
" projectRoot: app.projectRoot,",
|
|
1675
|
+
" definitions: realtimeDefinitions,",
|
|
1676
|
+
" })",
|
|
1677
|
+
"}",
|
|
1678
|
+
"",
|
|
1679
|
+
"async function handleHoloRealtimeMutationRoute(event: RequestEvent, app: HoloApp): Promise<Response | undefined> {",
|
|
1680
|
+
" if (!isRoute(event, 'POST', ['/holo/realtime/mutation'])) {",
|
|
1681
|
+
" return undefined",
|
|
1682
|
+
" }",
|
|
1683
|
+
"",
|
|
1684
|
+
" return await handleRealtimeMutationRequest(event.request, {",
|
|
1685
|
+
" projectRoot: app.projectRoot,",
|
|
1686
|
+
" definitions: realtimeDefinitions,",
|
|
1687
|
+
" })",
|
|
1688
|
+
"}",
|
|
1689
|
+
""
|
|
1690
|
+
] : [],
|
|
1605
1691
|
...features.clerkEnabled ? renderSvelteHostedAuthHookRoutes("clerk", "Clerk") : [],
|
|
1606
1692
|
...features.workosEnabled ? renderSvelteHostedAuthHookRoutes("workos", "Workos") : [],
|
|
1607
1693
|
`const holoRouteHandlers: readonly HoloRouteHandler[] = [${routeHandlers.join(", ")}]`,
|
|
@@ -2002,10 +2088,20 @@ async function ensureNextManagedRoutes(projectRoot) {
|
|
|
2002
2088
|
await writeFileIfChanged(resolve2(projectRoot, file.path), file.contents);
|
|
2003
2089
|
}
|
|
2004
2090
|
if (realtimeEnabled) {
|
|
2005
|
-
await
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2091
|
+
await Promise.all([
|
|
2092
|
+
writeFileIfChanged(
|
|
2093
|
+
resolve2(projectRoot, ".holo-js/generated/next/realtime-definitions.ts"),
|
|
2094
|
+
await renderNextRealtimeDefinitions(projectRoot)
|
|
2095
|
+
),
|
|
2096
|
+
writeFileIfChanged(
|
|
2097
|
+
resolve2(projectRoot, "app/holo/realtime/query/route.ts"),
|
|
2098
|
+
renderNextRealtimeQueryRoute()
|
|
2099
|
+
),
|
|
2100
|
+
writeFileIfChanged(
|
|
2101
|
+
resolve2(projectRoot, "app/holo/realtime/mutation/route.ts"),
|
|
2102
|
+
renderNextRealtimeMutationRoute()
|
|
2103
|
+
)
|
|
2104
|
+
]);
|
|
2009
2105
|
}
|
|
2010
2106
|
await removeLegacyManagedHoloHelper(resolve2(projectRoot, "server/holo.ts"), renderNextHoloHelper());
|
|
2011
2107
|
}
|
|
@@ -2027,9 +2123,18 @@ async function readProjectDependencies(projectRoot) {
|
|
|
2027
2123
|
}
|
|
2028
2124
|
async function resolveSvelteManagedFeatures(projectRoot) {
|
|
2029
2125
|
const dependencies = await readProjectDependencies(projectRoot);
|
|
2126
|
+
const realtimeFiles = await collectRealtimeDefinitionFiles(resolve2(projectRoot, "server/realtime"));
|
|
2127
|
+
const generatedRoot = resolve2(projectRoot, ".holo-js/generated");
|
|
2128
|
+
const realtimeImportPaths = realtimeFiles.map((filePath) => {
|
|
2129
|
+
const withoutExtension = filePath.slice(0, -extname(filePath).length);
|
|
2130
|
+
const importPath = relative2(generatedRoot, withoutExtension).split(sep).join("/");
|
|
2131
|
+
return importPath.startsWith(".") ? importPath : `./${importPath}`;
|
|
2132
|
+
});
|
|
2030
2133
|
return {
|
|
2031
2134
|
authEnabled: dependencies.has("@holo-js/auth"),
|
|
2032
2135
|
broadcastEnabled: dependencies.has("@holo-js/broadcast"),
|
|
2136
|
+
realtimeEnabled: dependencies.has("@holo-js/realtime"),
|
|
2137
|
+
realtimeImportPaths,
|
|
2033
2138
|
storageEnabled: dependencies.has("@holo-js/storage"),
|
|
2034
2139
|
clerkEnabled: dependencies.has("@holo-js/auth-clerk"),
|
|
2035
2140
|
workosEnabled: dependencies.has("@holo-js/auth-workos")
|
|
@@ -2870,7 +2975,11 @@ export {
|
|
|
2870
2975
|
renderNextHoloHelper,
|
|
2871
2976
|
renderNextRuntimeBootstrap,
|
|
2872
2977
|
renderNextBroadcastConfigRoute,
|
|
2978
|
+
renderNextRealtimeQueryRoute,
|
|
2979
|
+
renderNextRealtimeMutationRoute,
|
|
2873
2980
|
renderNextGeneratedRealtimeDefinitions,
|
|
2981
|
+
renderNextGeneratedRealtimeQueryRoute,
|
|
2982
|
+
renderNextGeneratedRealtimeMutationRoute,
|
|
2874
2983
|
renderSvelteViteConfig,
|
|
2875
2984
|
renderAuthProviderRouteFiles,
|
|
2876
2985
|
renderAuthRouteFiles,
|
|
@@ -13,7 +13,7 @@ import { extname, join, relative, resolve } from "path";
|
|
|
13
13
|
// package.json
|
|
14
14
|
var package_default = {
|
|
15
15
|
name: "@holo-js/cli",
|
|
16
|
-
version: "0.3.
|
|
16
|
+
version: "0.3.2",
|
|
17
17
|
description: "Holo-JS Framework - project creation, discovery, and operational CLI",
|
|
18
18
|
type: "module",
|
|
19
19
|
license: "MIT",
|
|
@@ -94,51 +94,51 @@ var WORKSPACE_CATALOG = Object.freeze({
|
|
|
94
94
|
"@clerk/backend": "^3.4.7",
|
|
95
95
|
"@clack/prompts": "^1.5.1",
|
|
96
96
|
"@eslint/js": "^9.17.0",
|
|
97
|
-
"@holo-js/adapter-next": "^0.3.
|
|
98
|
-
"@holo-js/adapter-nuxt": "^0.3.
|
|
99
|
-
"@holo-js/adapter-sveltekit": "^0.3.
|
|
100
|
-
"@holo-js/adapter-shared": "^0.3.
|
|
101
|
-
"@holo-js/auth": "^0.3.
|
|
102
|
-
"@holo-js/auth-clerk": "^0.3.
|
|
103
|
-
"@holo-js/auth-social": "^0.3.
|
|
104
|
-
"@holo-js/auth-social-apple": "^0.3.
|
|
105
|
-
"@holo-js/auth-social-discord": "^0.3.
|
|
106
|
-
"@holo-js/auth-social-facebook": "^0.3.
|
|
107
|
-
"@holo-js/auth-social-github": "^0.3.
|
|
108
|
-
"@holo-js/auth-social-google": "^0.3.
|
|
109
|
-
"@holo-js/auth-social-linkedin": "^0.3.
|
|
110
|
-
"@holo-js/auth-workos": "^0.3.
|
|
111
|
-
"@holo-js/authorization": "^0.3.
|
|
112
|
-
"@holo-js/broadcast": "^0.3.
|
|
113
|
-
"@holo-js/cache": "^0.3.
|
|
114
|
-
"@holo-js/cache-db": "^0.3.
|
|
115
|
-
"@holo-js/cache-redis": "^0.3.
|
|
116
|
-
"@holo-js/cli": "^0.3.
|
|
117
|
-
"@holo-js/config": "^0.3.
|
|
118
|
-
"@holo-js/core": "^0.3.
|
|
119
|
-
"@holo-js/db": "^0.3.
|
|
120
|
-
"@holo-js/db-mysql": "^0.3.
|
|
121
|
-
"@holo-js/db-postgres": "^0.3.
|
|
122
|
-
"@holo-js/db-sqlite": "^0.3.
|
|
123
|
-
"@holo-js/events": "^0.3.
|
|
124
|
-
"@holo-js/flux": "^0.3.
|
|
125
|
-
"@holo-js/flux-react": "^0.3.
|
|
126
|
-
"@holo-js/flux-svelte": "^0.3.
|
|
127
|
-
"@holo-js/flux-vue": "^0.3.
|
|
128
|
-
"@holo-js/forms": "^0.3.
|
|
129
|
-
"@holo-js/kernel": "^0.3.
|
|
130
|
-
"@holo-js/mail": "^0.3.
|
|
131
|
-
"@holo-js/media": "^0.3.
|
|
132
|
-
"@holo-js/notifications": "^0.3.
|
|
133
|
-
"@holo-js/queue": "^0.3.
|
|
134
|
-
"@holo-js/queue-db": "^0.3.
|
|
135
|
-
"@holo-js/queue-redis": "^0.3.
|
|
136
|
-
"@holo-js/realtime": "^0.3.
|
|
137
|
-
"@holo-js/security": "^0.3.
|
|
138
|
-
"@holo-js/session": "^0.3.
|
|
139
|
-
"@holo-js/storage": "^0.3.
|
|
140
|
-
"@holo-js/storage-s3": "^0.3.
|
|
141
|
-
"@holo-js/validation": "^0.3.
|
|
97
|
+
"@holo-js/adapter-next": "^0.3.2",
|
|
98
|
+
"@holo-js/adapter-nuxt": "^0.3.2",
|
|
99
|
+
"@holo-js/adapter-sveltekit": "^0.3.2",
|
|
100
|
+
"@holo-js/adapter-shared": "^0.3.2",
|
|
101
|
+
"@holo-js/auth": "^0.3.2",
|
|
102
|
+
"@holo-js/auth-clerk": "^0.3.2",
|
|
103
|
+
"@holo-js/auth-social": "^0.3.2",
|
|
104
|
+
"@holo-js/auth-social-apple": "^0.3.2",
|
|
105
|
+
"@holo-js/auth-social-discord": "^0.3.2",
|
|
106
|
+
"@holo-js/auth-social-facebook": "^0.3.2",
|
|
107
|
+
"@holo-js/auth-social-github": "^0.3.2",
|
|
108
|
+
"@holo-js/auth-social-google": "^0.3.2",
|
|
109
|
+
"@holo-js/auth-social-linkedin": "^0.3.2",
|
|
110
|
+
"@holo-js/auth-workos": "^0.3.2",
|
|
111
|
+
"@holo-js/authorization": "^0.3.2",
|
|
112
|
+
"@holo-js/broadcast": "^0.3.2",
|
|
113
|
+
"@holo-js/cache": "^0.3.2",
|
|
114
|
+
"@holo-js/cache-db": "^0.3.2",
|
|
115
|
+
"@holo-js/cache-redis": "^0.3.2",
|
|
116
|
+
"@holo-js/cli": "^0.3.2",
|
|
117
|
+
"@holo-js/config": "^0.3.2",
|
|
118
|
+
"@holo-js/core": "^0.3.2",
|
|
119
|
+
"@holo-js/db": "^0.3.2",
|
|
120
|
+
"@holo-js/db-mysql": "^0.3.2",
|
|
121
|
+
"@holo-js/db-postgres": "^0.3.2",
|
|
122
|
+
"@holo-js/db-sqlite": "^0.3.2",
|
|
123
|
+
"@holo-js/events": "^0.3.2",
|
|
124
|
+
"@holo-js/flux": "^0.3.2",
|
|
125
|
+
"@holo-js/flux-react": "^0.3.2",
|
|
126
|
+
"@holo-js/flux-svelte": "^0.3.2",
|
|
127
|
+
"@holo-js/flux-vue": "^0.3.2",
|
|
128
|
+
"@holo-js/forms": "^0.3.2",
|
|
129
|
+
"@holo-js/kernel": "^0.3.2",
|
|
130
|
+
"@holo-js/mail": "^0.3.2",
|
|
131
|
+
"@holo-js/media": "^0.3.2",
|
|
132
|
+
"@holo-js/notifications": "^0.3.2",
|
|
133
|
+
"@holo-js/queue": "^0.3.2",
|
|
134
|
+
"@holo-js/queue-db": "^0.3.2",
|
|
135
|
+
"@holo-js/queue-redis": "^0.3.2",
|
|
136
|
+
"@holo-js/realtime": "^0.3.2",
|
|
137
|
+
"@holo-js/security": "^0.3.2",
|
|
138
|
+
"@holo-js/session": "^0.3.2",
|
|
139
|
+
"@holo-js/storage": "^0.3.2",
|
|
140
|
+
"@holo-js/storage-s3": "^0.3.2",
|
|
141
|
+
"@holo-js/validation": "^0.3.2",
|
|
142
142
|
"@nuxt/kit": "^4.4.4",
|
|
143
143
|
"@nuxt/module-builder": "^1.0.2",
|
|
144
144
|
"@sveltejs/adapter-node": "^5.5.4",
|
|
@@ -155,7 +155,7 @@ var WORKSPACE_CATALOG = Object.freeze({
|
|
|
155
155
|
"@vitest/coverage-v8": "^4.1.5",
|
|
156
156
|
"better-sqlite3": "^11.7.0",
|
|
157
157
|
"bullmq": "^5.71.0",
|
|
158
|
-
"create-holo-js": "^0.3.
|
|
158
|
+
"create-holo-js": "^0.3.2",
|
|
159
159
|
"esbuild": "^0.27.4",
|
|
160
160
|
"eslint": "^9.17.0",
|
|
161
161
|
"fast-check": "^4.5.3",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeCommandAliases
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-I6EXRSZM.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-OQEZ3MOE.mjs";
|
|
11
11
|
|
|
12
12
|
// src/project/plugins.ts
|
|
13
13
|
import { createRequire } from "module";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fileExists
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BVULOZZ4.mjs";
|
|
4
4
|
import {
|
|
5
5
|
loadProjectConfig,
|
|
6
6
|
resolveGeneratedSchemaPath
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZNJ4APGF.mjs";
|
|
8
8
|
import {
|
|
9
9
|
prepareProjectDiscovery
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VUJ4ITXR.mjs";
|
|
11
11
|
import {
|
|
12
12
|
loadGeneratedProjectRegistry
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-NSG3OJDY.mjs";
|
|
14
14
|
import {
|
|
15
15
|
CLI_RUNTIME_ROOT,
|
|
16
16
|
GENERATED_SCHEMA_RUNTIME_PATH,
|
|
17
17
|
bundleProjectModule
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-OQEZ3MOE.mjs";
|
|
19
19
|
|
|
20
20
|
// src/runtime.ts
|
|
21
21
|
import { spawn } from "child_process";
|
|
@@ -353,7 +353,7 @@ function formatRuntimeFailureText(text) {
|
|
|
353
353
|
return lines[0] ?? text.trim();
|
|
354
354
|
}
|
|
355
355
|
async function withRuntimeEnvironment(projectRoot, kind, options, callback) {
|
|
356
|
-
if (kind === "seed") {
|
|
356
|
+
if (kind === "migrate" || kind === "fresh" || kind === "rollback" || kind === "seed") {
|
|
357
357
|
const project = await loadProjectConfig(projectRoot, { required: true });
|
|
358
358
|
await prepareProjectDiscovery(projectRoot, project.config);
|
|
359
359
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadGeneratedProjectRegistry,
|
|
3
3
|
writeGeneratedProjectRegistry
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NSG3OJDY.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-I6EXRSZM.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-OQEZ3MOE.mjs";
|
|
47
47
|
|
|
48
48
|
// src/project/discovery.ts
|
|
49
49
|
import { resolve } from "path";
|
|
@@ -6,7 +6,10 @@ function writeLine(stream, message = "") {
|
|
|
6
6
|
}
|
|
7
7
|
async function runWithSpinner(io, message, task, successMessage = message) {
|
|
8
8
|
if (!supportsSpinner(io)) {
|
|
9
|
-
|
|
9
|
+
writeLine(io.stdout, message);
|
|
10
|
+
const result = await task();
|
|
11
|
+
writeLine(io.stdout, successMessage);
|
|
12
|
+
return result;
|
|
10
13
|
}
|
|
11
14
|
const loading = spinner({
|
|
12
15
|
input: io.stdin,
|
|
@@ -28,6 +31,5 @@ function supportsSpinner(io) {
|
|
|
28
31
|
|
|
29
32
|
export {
|
|
30
33
|
writeLine,
|
|
31
|
-
runWithSpinner
|
|
32
|
-
supportsSpinner
|
|
34
|
+
runWithSpinner
|
|
33
35
|
};
|
|
@@ -251,6 +251,7 @@ async function resolveNewProjectInput(io, input, prompts = {
|
|
|
251
251
|
prompt: (label) => prompt(io, label),
|
|
252
252
|
choose: (label, allowed, defaultValue) => promptChoice(io, label, allowed, defaultValue),
|
|
253
253
|
optionalPackages: () => promptOptionalPackages(io)
|
|
254
|
+
}, validateProjectName = async () => {
|
|
254
255
|
}) {
|
|
255
256
|
const flagProjectName = resolveStringFlag(input.flags, "name");
|
|
256
257
|
const positionalProjectName = input.args[0]?.trim();
|
|
@@ -262,6 +263,7 @@ async function resolveNewProjectInput(io, input, prompts = {
|
|
|
262
263
|
if (!projectName) {
|
|
263
264
|
throw new Error(interactive ? "Project creation cancelled." : "Missing required argument: Project name.");
|
|
264
265
|
}
|
|
266
|
+
await validateProjectName(projectName);
|
|
265
267
|
const framework = resolveStringFlag(input.flags, "framework") ? normalizeChoice(resolveStringFlag(input.flags, "framework"), SUPPORTED_NEW_FRAMEWORKS, "framework") : interactive ? await prompts.choose("Framework", SUPPORTED_NEW_FRAMEWORKS, "nuxt") : "nuxt";
|
|
266
268
|
const databaseDriver = resolveStringFlag(input.flags, "database") ? normalizeChoice(resolveStringFlag(input.flags, "database"), SUPPORTED_NEW_DATABASE_DRIVERS, "database driver") : interactive ? await prompts.choose("Database driver", SUPPORTED_NEW_DATABASE_DRIVERS, "sqlite") : "sqlite";
|
|
267
269
|
const packageManager = resolveStringFlag(input.flags, "package-manager") ? normalizeChoice(resolveStringFlag(input.flags, "package-manager"), SUPPORTED_NEW_PACKAGE_MANAGERS, "package manager") : interactive ? await prompts.choose("Package manager", SUPPORTED_NEW_PACKAGE_MANAGERS, "npm") : "npm";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadGeneratedProjectRegistry
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NSG3OJDY.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-OQEZ3MOE.mjs";
|
|
12
12
|
|
|
13
13
|
// src/project/config.ts
|
|
14
14
|
import { createHash } from "crypto";
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
serializeDatabaseConfig,
|
|
8
8
|
serializeProjectConfig,
|
|
9
9
|
writeProjectConfig
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-ZNJ4APGF.mjs";
|
|
11
|
+
import "./chunk-NSG3OJDY.mjs";
|
|
12
12
|
import {
|
|
13
13
|
readTextFile
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-OQEZ3MOE.mjs";
|
|
15
15
|
export {
|
|
16
16
|
defaultProjectConfig,
|
|
17
17
|
ensureGeneratedSchemaPlaceholder,
|
|
@@ -14,18 +14,17 @@ import {
|
|
|
14
14
|
runProjectPrepare,
|
|
15
15
|
runProjectStartServer,
|
|
16
16
|
toPosixSlashes
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-JLZNWWFV.mjs";
|
|
18
18
|
import {
|
|
19
19
|
hasProjectDependency
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-YACY2572.mjs";
|
|
20
|
+
} from "./chunk-XXQUCGBO.mjs";
|
|
21
|
+
import "./chunk-BVULOZZ4.mjs";
|
|
22
|
+
import "./chunk-ZNJ4APGF.mjs";
|
|
23
|
+
import "./chunk-VUJ4ITXR.mjs";
|
|
24
|
+
import "./chunk-NSG3OJDY.mjs";
|
|
25
|
+
import "./chunk-SCVF2F3I.mjs";
|
|
26
|
+
import "./chunk-I6EXRSZM.mjs";
|
|
27
|
+
import "./chunk-OQEZ3MOE.mjs";
|
|
29
28
|
export {
|
|
30
29
|
collectDirectoryTree,
|
|
31
30
|
collectDiscoveryWatchRoots,
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
loadRegisteredModels,
|
|
5
5
|
loadRegisteredSeeders,
|
|
6
6
|
prepareProjectDiscovery
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-VUJ4ITXR.mjs";
|
|
8
|
+
import "./chunk-NSG3OJDY.mjs";
|
|
9
9
|
import {
|
|
10
10
|
collectImportedBindingsBySource,
|
|
11
11
|
extractListensToItems,
|
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
resolveListenerEventNamesFromSource,
|
|
14
14
|
resolveNamedExport,
|
|
15
15
|
resolveNamedExportEntry
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-I6EXRSZM.mjs";
|
|
17
|
+
import "./chunk-OQEZ3MOE.mjs";
|
|
18
18
|
export {
|
|
19
19
|
collectImportedBindingsBySource,
|
|
20
20
|
discoverAppCommands,
|
|
@@ -1,31 +1,29 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveStringFlag
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YJWHIQ45.mjs";
|
|
4
4
|
import {
|
|
5
5
|
runProjectPrepare
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-JLZNWWFV.mjs";
|
|
7
|
+
import "./chunk-XXQUCGBO.mjs";
|
|
8
8
|
import {
|
|
9
9
|
hasRegisteredCreateTableMigration,
|
|
10
10
|
hasRegisteredMigrationSlug,
|
|
11
11
|
nextMigrationTemplate
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WMBFSYWK.mjs";
|
|
13
|
+
import {
|
|
14
|
+
writeLine
|
|
15
|
+
} from "./chunk-Y355VYRN.mjs";
|
|
13
16
|
import {
|
|
14
17
|
ensureAbsent,
|
|
15
18
|
fileExists
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import {
|
|
18
|
-
writeLine
|
|
19
|
-
} from "./chunk-I7QBCEV7.mjs";
|
|
20
|
-
import "./chunk-HX6MOYBO.mjs";
|
|
21
|
-
import "./chunk-6BHJLCAO.mjs";
|
|
19
|
+
} from "./chunk-BVULOZZ4.mjs";
|
|
22
20
|
import {
|
|
23
21
|
ensureGeneratedSchemaPlaceholder,
|
|
24
22
|
ensureProjectConfig
|
|
25
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-ZNJ4APGF.mjs";
|
|
26
24
|
import {
|
|
27
25
|
prepareProjectDiscovery
|
|
28
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-VUJ4ITXR.mjs";
|
|
29
27
|
import {
|
|
30
28
|
ensureSuffix,
|
|
31
29
|
loadGeneratedProjectRegistry,
|
|
@@ -47,16 +45,16 @@ import {
|
|
|
47
45
|
toKebabCase,
|
|
48
46
|
toPascalCase,
|
|
49
47
|
toSnakeCase
|
|
50
|
-
} from "./chunk-
|
|
51
|
-
import "./chunk-
|
|
48
|
+
} from "./chunk-NSG3OJDY.mjs";
|
|
49
|
+
import "./chunk-SCVF2F3I.mjs";
|
|
52
50
|
import {
|
|
53
51
|
collectFiles
|
|
54
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-I6EXRSZM.mjs";
|
|
55
53
|
import {
|
|
56
54
|
makeProjectRelativePath,
|
|
57
55
|
resolveDefaultArtifactPath,
|
|
58
56
|
writeTextFile
|
|
59
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-OQEZ3MOE.mjs";
|
|
60
58
|
|
|
61
59
|
// src/generators.ts
|
|
62
60
|
import { createHash } from "crypto";
|