@voltro/cli 0.33.0 → 0.34.0
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/CHANGELOG.md +1801 -0
- package/bin/nodeEnvironment.d.mts +30 -0
- package/bin/nodeEnvironment.mjs +158 -0
- package/bin/voltro.mjs +69 -5
- package/dist/addCommand-BNeoeSxe.js +124 -0
- package/dist/addCommand-aXSQveak.js +2 -0
- package/dist/agentsMd-BTchIZku.js +2 -0
- package/dist/agentsMd-mhQMF1bx.js +254 -0
- package/dist/apiBuild-BICVGnEC.js +2 -0
- package/dist/{apiBuild-h9VHtnlw.js → apiBuild-DZF_f0_I.js} +46 -46
- package/dist/appPort-B_HpJ_ck.js +48 -0
- package/dist/baselineCommand-C2ClWZN3.js +2 -0
- package/dist/baselineCommand-DIttzO8A.js +227 -0
- package/dist/bin.js +71 -28
- package/dist/build-CE7Ca9gm.js +711 -0
- package/dist/cacheCommand-DA4OH9xt.js +42 -0
- package/dist/capabilitiesCommand-nq_pz5xd.js +123 -0
- package/dist/checkCommand-Dv8r9tGO.js +231 -0
- package/dist/checkCommand-YZDmkAGd.js +2 -0
- package/dist/{cliArgs-qdZSElM3.js → cliArgs-D4p8n7EE.js} +12 -1
- package/dist/cliError-BmdYnghb.js +10 -0
- package/dist/cliOutput-D1tSBoRM.js +15 -0
- package/dist/{cliRuntime-Oh517vCV.js → cliRuntime-Dh7UDinH.js} +20 -20
- package/dist/cloudClient-DWL-Hw_T.js +67 -0
- package/dist/cloudCmd-Cvv5HGaZ.js +364 -0
- package/dist/clusterCmd-CNXKlcvD.js +54 -0
- package/dist/codegen-CYM3Zqrf.js +605 -0
- package/dist/codegen-ChBi_hVa.js +2 -0
- package/dist/codegenCommand-DC6w2tNZ.js +30 -0
- package/dist/codemodRunner-DRRqXR74.js +5243 -0
- package/dist/commandRunner-BLAEFLjp.js +47 -0
- package/dist/commands-gutsz-Ac.js +808 -0
- package/dist/connectionConfig-UFlIEiys.js +66 -0
- package/dist/dashboardCommand-3YG8p-UA.js +25 -0
- package/dist/dataCommand-qL0r7fPO.js +535 -0
- package/dist/dataProfile-dW-PsfLB.js +15 -0
- package/dist/{dbCommand-DTLKAfbA.js → dbCommand-B6X0FZbq.js} +551 -401
- package/dist/dbCommand-CpdKLeQq.js +2 -0
- package/dist/{dev-C_P8FLSx.js → dev-CerMd0mW.js} +3122 -3129
- package/dist/dev-CoG-ZPx8.js +3 -0
- package/dist/devActivity-Dx_3nnGv.js +100 -0
- package/dist/devActivity.js +1 -1
- package/dist/dialectDriver-CgXnDfec.js +39 -0
- package/dist/discover-C9XKJDco.js +25 -0
- package/dist/doctorCommand-BvqGBwNG.js +2 -0
- package/dist/{checkCommand-xGhRFFg2.js → doctorCommand-CnDXQxfa.js} +520 -1278
- package/dist/dormancyCommand-Dszo57d6.js +69 -0
- package/dist/e2eCmd-BRabZww-.js +147 -0
- package/dist/embeddingsCommand-C0sKVRo1.js +73 -0
- package/dist/envCommand-DPgdV1Bq.js +60 -0
- package/dist/evalCommand-6RUfPen4.js +118 -0
- package/dist/evolveCommand-DHpkgjgH.js +281 -0
- package/dist/fileTaxonomy-CJfgOllU.js +457 -0
- package/dist/frameworkTableAssembly-BGHmck-x.js +2 -0
- package/dist/{frameworkTableAssembly-BwIrO5nv.js → frameworkTableAssembly-DkkP6BgC.js} +184 -148
- package/dist/generateCommand-oibemh97.js +147 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.js +4 -3
- package/dist/infoCommand-BJw9nLUR.js +60 -0
- package/dist/{inspect-BUUjt773.js → inspect-CBqFtAKA.js} +82 -40
- package/dist/inspect-C_T_WGvl.js +2 -0
- package/dist/inspectCmd-Bppy-GGw.js +224 -0
- package/dist/inspectFetch-Cm8_wVvp.js +151 -0
- package/dist/inspectMetrics-CfdKLh6t.js +72 -0
- package/dist/loadEnv-D9nEOClM.js +44 -0
- package/dist/logFileSink-C_D2wRN1.js +105 -0
- package/dist/logsCmd-CCca3KRZ.js +260 -0
- package/dist/manifestBuild-ChsKAhmn.js +2 -0
- package/dist/{manifestBuild-BLrVuSlM.js → manifestBuild-sxpwdKY1.js} +1 -1
- package/dist/metaCommands-7MJfZ5cf.js +196 -0
- package/dist/migrate-CBwOt_iV.js +83 -0
- package/dist/mssqlClusterPatch-_4cE_nun.js +44 -0
- package/dist/newCommand-COWOJ1_E.js +156 -0
- package/dist/nodeEnvironment-cGFAj1J8.js +28 -0
- package/dist/packageCommand-Cug_3Ogl.js +271 -0
- package/dist/pageConvention-cEiRxdab.js +5 -0
- package/dist/privacyCommand-C-Df56U_.js +146 -0
- package/dist/projectScaffold-DmzEKHib.js +2 -0
- package/dist/projectScaffold-LMMtaavR.js +814 -0
- package/dist/renderModeScan-D7J1B7Kw.js +105 -0
- package/dist/renderProfile-1OWWAAtx.js +81 -0
- package/dist/runtimeRegistry-DMeKfTHP.js +81 -0
- package/dist/runtimeTrace-CRxalXTs.js +91 -0
- package/dist/scheduleCmd--jksTrf6.js +69 -0
- package/dist/scheduleManifestCmd-D2x0CTTY.js +249 -0
- package/dist/schemaIr-UJybUUZW.js +103 -0
- package/dist/{sdkgen-C81QIkiL.js → sdkgen-CYJscZC7.js} +111 -209
- package/dist/seedRunner-TFHHiToI.js +329 -0
- package/dist/serveCommand-B_isw7q4.js +1647 -0
- package/dist/serveCommand-DOvbgRnQ.js +2 -0
- package/dist/serveEntry.js +5 -5
- package/dist/serverlessCommand-CfJZy6dS.js +482 -0
- package/dist/start-9LiUOfES.js +1087 -0
- package/dist/start-B-9Nsp-S.js +3 -0
- package/dist/startEntry.js +2 -2
- package/dist/staticCommand-Dr2M6tpU.js +304 -0
- package/dist/storageCommand-Co6NfLqN.js +42 -0
- package/dist/templates-De8IR5-c.js +102 -0
- package/dist/test-CI6iDsYc.js +115 -0
- package/dist/tracesCmd-CkEZQrtt.js +232 -0
- package/dist/tsconfigPaths-BWXBWgcl.js +107 -0
- package/dist/tsxLoader-EuXmSJ1K.js +51 -0
- package/dist/typecheckCommand-BlsWiCNq.js +61 -0
- package/dist/updateCommand-Bkptutss.js +585 -0
- package/dist/updateCommand-us1_hdIC.js +2 -0
- package/dist/{inspectMetrics-1xzTKAFx.js → webDev-CBYvPqQr.js} +975 -1559
- package/dist/webDev-Cg-fFiyd2.js +2 -0
- package/dist/webhookDiscovery-CrGAfhIG.js +2 -0
- package/dist/webhookDiscovery-D7VaeMlz.js +51 -0
- package/dist/webhooksCommand-CID96Rga.js +267 -0
- package/dist/workflowsCmd-D1VTmLMY.js +608 -0
- package/package.json +179 -17
- package/templates/AGENTS.core.md +58 -3
- package/templates/AGENTS.md +64 -7
- package/templates/agent-docs/_index.md +6 -4
- package/templates/agent-docs/_manifest.json +22 -5
- package/templates/agent-docs/ai.md +370 -0
- package/templates/agent-docs/authentication.md +265 -31
- package/templates/agent-docs/caching.md +6 -0
- package/templates/agent-docs/cli.md +794 -50
- package/templates/agent-docs/data.md +550 -11
- package/templates/agent-docs/database/migrations.md +174 -25
- package/templates/agent-docs/database/misc.md +156 -40
- package/templates/agent-docs/database/querying.md +19 -1
- package/templates/agent-docs/database/scaling.md +60 -0
- package/templates/agent-docs/database/schema.md +1 -0
- package/templates/agent-docs/database/seedsdialects.md +208 -19
- package/templates/agent-docs/database/transactions.md +68 -0
- package/templates/agent-docs/deployment.md +69 -3
- package/templates/agent-docs/introduction.md +87 -16
- package/templates/agent-docs/local-first-mobile.md +79 -4
- package/templates/agent-docs/multi-tenancy.md +95 -20
- package/templates/agent-docs/observability.md +58 -3
- package/templates/agent-docs/plugins/ai-flows.md +161 -2
- package/templates/agent-docs/plugins/analytics-postgres.md +1 -1
- package/templates/agent-docs/plugins/audit.md +37 -1
- package/templates/agent-docs/plugins/auth-social.md +143 -0
- package/templates/agent-docs/plugins/auth-workos.md +4 -2
- package/templates/agent-docs/plugins/auth.md +131 -6
- package/templates/agent-docs/plugins/billing.md +132 -15
- package/templates/agent-docs/plugins/cdc-out.md +46 -7
- package/templates/agent-docs/plugins/clickhouse.md +1 -1
- package/templates/agent-docs/plugins/duckdb.md +1 -1
- package/templates/agent-docs/plugins/flags.md +132 -0
- package/templates/agent-docs/plugins/governance.md +105 -7
- package/templates/agent-docs/plugins/multitenancy.md +9 -4
- package/templates/agent-docs/plugins/presence.md +13 -2
- package/templates/agent-docs/plugins/ratelimit.md +9 -0
- package/templates/agent-docs/plugins/search.md +157 -6
- package/templates/agent-docs/plugins/sso-saml.md +47 -8
- package/templates/agent-docs/plugins/webhooks.md +105 -0
- package/templates/agent-docs/plugins.md +150 -18
- package/templates/agent-docs/reference.md +60 -3
- package/templates/agent-docs/releases.md +1117 -0
- package/templates/agent-docs/routing.md +43 -25
- package/templates/agent-docs/scheduling.md +10 -0
- package/templates/agent-docs/schema-driven-ui.md +92 -12
- package/templates/agent-docs/security.md +426 -0
- package/templates/agent-docs/templates/apibackends.md +87 -18
- package/templates/agent-docs/templates/appshells.md +32 -14
- package/templates/agent-docs/templates/overview.md +13 -8
- package/templates/agent-docs/testing.md +211 -14
- package/templates/agent-docs/whats-new.md +1700 -104
- package/templates/agent-docs/workflows.md +130 -14
- package/templates/apps/api-ai/actions/summarize.action.ts +11 -0
- package/templates/apps/api-ai/package.json +8 -7
- package/templates/apps/api-auth/actions/me.action.ts +13 -0
- package/templates/apps/api-auth/package.json +9 -8
- package/templates/apps/api-backend/mutations/notes.create.mutation.ts +9 -0
- package/templates/apps/api-backend/package.json +12 -8
- package/templates/apps/api-backend/queries/notes.query.ts +30 -8
- package/templates/apps/api-backend-deactivation/actions/users.get.action.ts +14 -0
- package/templates/apps/api-backend-deactivation/mutations/users.create.mutation.ts +8 -0
- package/templates/apps/api-backend-deactivation/mutations/users.deactivate.mutation.ts +10 -0
- package/templates/apps/api-backend-deactivation/package.json +8 -7
- package/templates/apps/api-backend-mail/actions/sendWelcome.action.ts +17 -0
- package/templates/apps/api-backend-mail/mutations/notes.create.mutation.ts +9 -0
- package/templates/apps/api-backend-mail/package.json +9 -8
- package/templates/apps/api-backend-mail/queries/notes.query.ts +30 -8
- package/templates/apps/api-backend-mariadb/.env.example +14 -0
- package/templates/apps/api-backend-mariadb/mutations/notes.create.mutation.ts +9 -0
- package/templates/apps/api-backend-mariadb/package.json +10 -9
- package/templates/apps/api-backend-mariadb/queries/notes.query.ts +30 -8
- package/templates/apps/api-backend-sqlite/.env.example +14 -0
- package/templates/apps/api-backend-sqlite/mutations/notes.create.mutation.ts +9 -0
- package/templates/apps/api-backend-sqlite/package.json +9 -8
- package/templates/apps/api-backend-sqlite/queries/notes.query.ts +30 -8
- package/templates/apps/api-backend-storage/actions/uploadAvatar.action.ts +13 -0
- package/templates/apps/api-backend-storage/actions/uploadDocument.action.ts +12 -0
- package/templates/apps/api-backend-storage/mutations/notes.create.mutation.ts +9 -0
- package/templates/apps/api-backend-storage/package.json +9 -8
- package/templates/apps/api-backend-storage/queries/notes.query.ts +30 -8
- package/templates/apps/api-cms/actions/content.get.action.ts +7 -0
- package/templates/apps/api-cms/actions/content.types.action.ts +6 -0
- package/templates/apps/api-cms/actions/me.action.ts +13 -0
- package/templates/apps/api-cms/app.config.ts +19 -0
- package/templates/apps/api-cms/authz.ts +63 -0
- package/templates/apps/api-cms/mutations/content.publish.mutation.ts +10 -0
- package/templates/apps/api-cms/mutations/content.saveDraft.mutation.ts +10 -0
- package/templates/apps/api-cms/mutations/content.unpublish.mutation.ts +5 -0
- package/templates/apps/api-cms/package.json +11 -10
- package/templates/apps/api-cms/queries/content.list.query.ts +23 -7
- package/templates/apps/api-cms/tests/accessDecisions.test.ts +121 -0
- package/templates/apps/api-cms/tests/content.descriptors.test.ts +8 -4
- package/templates/apps/api-collab/mutations/documents.create.mutation.ts +8 -0
- package/templates/apps/api-collab/mutations/documents.setBody.mutation.ts +13 -0
- package/templates/apps/api-collab/package.json +9 -8
- package/templates/apps/api-collab/queries/documents.query.ts +19 -7
- package/templates/apps/api-data-advanced/package.json +9 -8
- package/templates/apps/api-data-advanced/queries/authors.withBooks.query.ts +12 -0
- package/templates/apps/api-data-advanced/queries/books.search.query.ts +9 -0
- package/templates/apps/api-durable/mutations/orders.approve.mutation.ts +17 -0
- package/templates/apps/api-durable/mutations/orders.place.mutation.ts +9 -0
- package/templates/apps/api-durable/package.json +9 -8
- package/templates/apps/api-feature-flags/actions/notes.export.action.ts +16 -0
- package/templates/apps/api-feature-flags/mutations/notes.create.mutation.ts +12 -0
- package/templates/apps/api-feature-flags/package.json +10 -9
- package/templates/apps/api-governance/README.md +30 -8
- package/templates/apps/api-governance/actions/profiles.get.action.server.ts +17 -1
- package/templates/apps/api-governance/actions/profiles.get.action.ts +29 -4
- package/templates/apps/api-governance/database/schema.ts +16 -4
- package/templates/apps/api-governance/mutations/profiles.create.mutation.ts +12 -0
- package/templates/apps/api-governance/package.json +9 -8
- package/templates/apps/api-kv/actions/sync.pull.action.ts +15 -0
- package/templates/apps/api-kv/actions/sync.reset.action.ts +13 -0
- package/templates/apps/api-kv/actions/sync.status.action.ts +7 -0
- package/templates/apps/api-kv/package.json +9 -8
- package/templates/apps/api-kv/queries/events.list.query.ts +19 -8
- package/templates/apps/api-moderation/mutations/comments.create.mutation.ts +11 -0
- package/templates/apps/api-moderation/mutations/posts.create.mutation.ts +13 -0
- package/templates/apps/api-moderation/package.json +9 -8
- package/templates/apps/api-observability/mutations/notes.create.mutation.ts +8 -0
- package/templates/apps/api-observability/package.json +9 -8
- package/templates/apps/api-observability/queries/notes.list.query.ts +13 -0
- package/templates/apps/api-ratelimit/mutations/notes.create.mutation.ts +14 -0
- package/templates/apps/api-ratelimit/package.json +9 -8
- package/templates/apps/api-rbac/package.json +9 -8
- package/templates/apps/api-rest/package.json +8 -7
- package/templates/apps/api-saas/mutations/projects.create.mutation.ts +13 -0
- package/templates/apps/api-saas/package.json +12 -11
- package/templates/apps/api-saas/queries/projects.list.query.ts +11 -0
- package/templates/apps/api-saas-starter/actions/me.action.ts +13 -0
- package/templates/apps/api-saas-starter/app.config.ts +19 -0
- package/templates/apps/api-saas-starter/authz.ts +75 -0
- package/templates/apps/api-saas-starter/mutations/invites.create.mutation.ts +10 -0
- package/templates/apps/api-saas-starter/mutations/projects.create.mutation.ts +9 -0
- package/templates/apps/api-saas-starter/package.json +15 -11
- package/templates/apps/api-saas-starter/queries/invites.list.query.ts +19 -8
- package/templates/apps/api-saas-starter/queries/projects.list.query.ts +18 -7
- package/templates/apps/api-saas-starter/tests/accessDecisions.test.ts +135 -0
- package/templates/apps/api-search/mutations/articles.create.mutation.ts +14 -0
- package/templates/apps/api-search/package.json +9 -8
- package/templates/apps/api-search/queries/articles.list.query.ts +21 -8
- package/templates/apps/api-status/README.md +10 -3
- package/templates/apps/api-status/app.config.ts +8 -3
- package/templates/apps/api-status/authz.ts +5 -3
- package/templates/apps/api-status/package.json +9 -8
- package/templates/apps/api-status/queries/components.list.query.ts +14 -6
- package/templates/apps/api-status/queries/incidents.live.query.ts +23 -10
- package/templates/apps/api-status/queries/updates.list.query.ts +16 -9
- package/templates/apps/api-status/tests/status.test.ts +9 -1
- package/templates/apps/api-versioning/actions/documents.asOf.action.ts +12 -0
- package/templates/apps/api-versioning/actions/documents.history.action.ts +13 -0
- package/templates/apps/api-versioning/mutations/documents.create.mutation.ts +9 -0
- package/templates/apps/api-versioning/mutations/documents.update.mutation.ts +12 -0
- package/templates/apps/api-versioning/package.json +9 -8
- package/templates/apps/api-webhooks/mutations/orders.fulfill.mutation.ts +16 -0
- package/templates/apps/api-webhooks/package.json +10 -9
- package/templates/apps/api-webhooks/queries/orders.list.query.ts +10 -0
- package/templates/apps/changelog/package.json +8 -6
- package/templates/apps/edge-functions/package.json +2 -2
- package/templates/apps/frontend-admin/package.json +10 -8
- package/templates/apps/frontend-admin/src/lib/admin.ts +20 -9
- package/templates/apps/frontend-admin/src/locales/de.ts +11 -1
- package/templates/apps/frontend-admin/src/locales/en.ts +13 -1
- package/templates/apps/frontend-admin/src/pages/admin/[entity]/page.tsx +65 -22
- package/templates/apps/frontend-admin/src/pages/admin/entity.test.tsx +130 -23
- package/templates/apps/frontend-admin/src/pages/admin/layout.tsx +3 -2
- package/templates/apps/frontend-admin/src/pages/admin/page.test.tsx +19 -2
- package/templates/apps/frontend-admin/src/pages/admin/page.tsx +9 -4
- package/templates/apps/frontend-app/app.config.ts +4 -3
- package/templates/apps/frontend-app/package.json +11 -8
- package/templates/apps/frontend-app/src/lib/api.ts +25 -0
- package/templates/apps/frontend-app/src/pages/page.test.tsx +130 -82
- package/templates/apps/frontend-app/src/pages/page.tsx +14 -18
- package/templates/apps/frontend-auth/package.json +10 -8
- package/templates/apps/frontend-blank/package.json +9 -7
- package/templates/apps/frontend-cms/package.json +11 -9
- package/templates/apps/frontend-collab/package.json +12 -9
- package/templates/apps/frontend-collab/src/pages/page.test.tsx +122 -78
- package/templates/apps/frontend-contact/package.json +9 -7
- package/templates/apps/frontend-dashboard/package.json +9 -7
- package/templates/apps/frontend-docs/package.json +9 -7
- package/templates/apps/frontend-i18n/package.json +8 -6
- package/templates/apps/frontend-landing/package.json +9 -7
- package/templates/apps/frontend-portal/package.json +10 -8
- package/templates/apps/frontend-saas/app.config.ts +10 -6
- package/templates/apps/frontend-saas/package.json +10 -8
- package/templates/apps/frontend-saas/src/lib/api.ts +27 -32
- package/templates/apps/frontend-saas/src/pages/dashboard/billing/page.tsx +7 -8
- package/templates/apps/frontend-saas/src/pages/dashboard/page.test.tsx +27 -3
- package/templates/apps/frontend-saas/src/pages/dashboard/page.tsx +4 -4
- package/templates/apps/frontend-saas/src/pages/dashboard/team/page.tsx +3 -4
- package/templates/apps/frontend-spa/package.json +9 -7
- package/templates/apps/frontend-ssr/package.json +9 -7
- package/templates/apps/frontend-ssr-api/package.json +10 -8
- package/templates/apps/frontend-static-blog/package.json +8 -6
- package/templates/apps/frontend-status/package.json +10 -8
- package/templates/apps/mobile-app/README.md +1 -0
- package/templates/apps/mobile-app/package.json +4 -2
- package/templates/apps/mobile-app/src/app/index.tsx +22 -12
- package/templates/apps/mobile-app/src/app/orders/[id].tsx +1 -1
- package/templates/apps/mobile-app/src/lib/api.ts +34 -0
- package/templates/apps/mobile-app/voltro.mobile.ts +4 -2
- package/templates/baselines/bare/.env.example +14 -0
- package/templates/baselines/bare/baseline.json +4 -4
- package/templates/baselines/compose/.env.example +14 -0
- package/templates/baselines/compose/README.md +1 -1
- package/templates/baselines/compose/baseline.json +5 -5
- package/templates/baselines/compose-mariadb/.env.example +14 -0
- package/templates/baselines/compose-mariadb/README.md +1 -1
- package/templates/baselines/compose-mariadb/baseline.json +5 -5
- package/templates/baselines/helm/.env.example +14 -0
- package/templates/baselines/helm/baseline.json +4 -4
- package/dist/apiBuild-C-x9YacA.js +0 -2
- package/dist/checkCommand-DRovTKza.js +0 -2
- package/dist/commands-CJfepbm4.js +0 -11541
- package/dist/dbCommand-b1gum4td.js +0 -2
- package/dist/dev-iiMtlkfs.js +0 -3
- package/dist/devActivity-BhIu6ncs.js +0 -159
- package/dist/frameworkTableAssembly-D-EebUQX.js +0 -2
- package/dist/inspect-mmBuRXmy.js +0 -2
- package/dist/manifestBuild-Dj8Jjoto.js +0 -2
- package/dist/seedRunner-Bqxgp7HZ.js +0 -230
- package/dist/serveCommand-DdaM4Hup.js +0 -1608
- package/dist/start-C0koT0UO.js +0 -1084
- /package/templates/apps/api-ai/actions/{summarize.action.server.tsx → summarize.action.server.ts} +0 -0
|
@@ -0,0 +1,814 @@
|
|
|
1
|
+
import { a as e, i as t, n, r, t as i } from "./templates-De8IR5-c.js";
|
|
2
|
+
import { i as a, n as o, t as s } from "./cloudClient-DWL-Hw_T.js";
|
|
3
|
+
import { t as c } from "./cliRuntime-Dh7UDinH.js";
|
|
4
|
+
import { n as l } from "./agentsMd-mhQMF1bx.js";
|
|
5
|
+
import { n as u } from "./addCommand-BNeoeSxe.js";
|
|
6
|
+
import { a as d, n as f, r as p } from "./baselineCommand-DIttzO8A.js";
|
|
7
|
+
import { basename as m, dirname as h, join as g, resolve as _ } from "node:path";
|
|
8
|
+
import { existsSync as v, mkdirSync as y, promises as b, writeFileSync as x } from "node:fs";
|
|
9
|
+
import { createLogger as S } from "@voltro/logger";
|
|
10
|
+
import { Effect as C } from "effect";
|
|
11
|
+
import { execFile as w } from "node:child_process";
|
|
12
|
+
import { promisify as T } from "node:util";
|
|
13
|
+
import { createInterface as E } from "node:readline/promises";
|
|
14
|
+
import { stdin as D, stdout as O } from "node:process";
|
|
15
|
+
//#region src/cloudScan.ts
|
|
16
|
+
var k = () => ({
|
|
17
|
+
queries: [],
|
|
18
|
+
mutations: [],
|
|
19
|
+
actions: [],
|
|
20
|
+
streams: [],
|
|
21
|
+
workflows: [],
|
|
22
|
+
schedules: [],
|
|
23
|
+
subscribers: [],
|
|
24
|
+
aggregates: [],
|
|
25
|
+
agents: [],
|
|
26
|
+
tools: [],
|
|
27
|
+
tables: [],
|
|
28
|
+
webhooks: [],
|
|
29
|
+
restRoutes: [],
|
|
30
|
+
plugins: [],
|
|
31
|
+
pageCount: 0
|
|
32
|
+
}), A = /* @__PURE__ */ new Set([
|
|
33
|
+
"node_modules",
|
|
34
|
+
".framework",
|
|
35
|
+
".git",
|
|
36
|
+
"dist",
|
|
37
|
+
"build",
|
|
38
|
+
".next",
|
|
39
|
+
".turbo",
|
|
40
|
+
"coverage"
|
|
41
|
+
]), j = (e) => {
|
|
42
|
+
if (/\.server\.(ts|tsx)$/.test(e) || /\.(test|spec)\.(ts|tsx)$/.test(e) || /\.generated\./.test(e)) return null;
|
|
43
|
+
let t = (t) => e.slice(0, -t.length);
|
|
44
|
+
return e.endsWith(".query.ts") ? {
|
|
45
|
+
key: "queries",
|
|
46
|
+
name: t(".query.ts")
|
|
47
|
+
} : e.endsWith(".mutation.ts") ? {
|
|
48
|
+
key: "mutations",
|
|
49
|
+
name: t(".mutation.ts")
|
|
50
|
+
} : e.endsWith(".action.ts") ? {
|
|
51
|
+
key: "actions",
|
|
52
|
+
name: t(".action.ts")
|
|
53
|
+
} : e.endsWith(".stream.ts") ? {
|
|
54
|
+
key: "streams",
|
|
55
|
+
name: t(".stream.ts")
|
|
56
|
+
} : e.endsWith(".workflow.tsx") ? {
|
|
57
|
+
key: "workflows",
|
|
58
|
+
name: t(".workflow.tsx")
|
|
59
|
+
} : e.endsWith(".cron.tsx") ? {
|
|
60
|
+
key: "schedules",
|
|
61
|
+
name: t(".cron.tsx")
|
|
62
|
+
} : e.endsWith(".subscribe.ts") ? {
|
|
63
|
+
key: "subscribers",
|
|
64
|
+
name: t(".subscribe.ts")
|
|
65
|
+
} : e.endsWith(".aggregate.ts") ? {
|
|
66
|
+
key: "aggregates",
|
|
67
|
+
name: t(".aggregate.ts")
|
|
68
|
+
} : e.endsWith(".agent.tsx") ? {
|
|
69
|
+
key: "agents",
|
|
70
|
+
name: t(".agent.tsx")
|
|
71
|
+
} : e.endsWith(".tool.tsx") ? {
|
|
72
|
+
key: "tools",
|
|
73
|
+
name: t(".tool.tsx")
|
|
74
|
+
} : e.endsWith(".webhook.tsx") ? {
|
|
75
|
+
key: "webhooks",
|
|
76
|
+
name: t(".webhook.tsx")
|
|
77
|
+
} : e.endsWith(".route.tsx") ? {
|
|
78
|
+
key: "restRoutes",
|
|
79
|
+
name: t(".route.tsx")
|
|
80
|
+
} : e.endsWith(".entity.ts") && !e.startsWith("_") ? {
|
|
81
|
+
key: "tables",
|
|
82
|
+
name: t(".entity.ts")
|
|
83
|
+
} : null;
|
|
84
|
+
}, M = /* @__PURE__ */ new Set([
|
|
85
|
+
"layout.tsx",
|
|
86
|
+
"error.tsx",
|
|
87
|
+
"loading.tsx",
|
|
88
|
+
"not-found.tsx"
|
|
89
|
+
]), N = async (e, t, n = e) => {
|
|
90
|
+
let r;
|
|
91
|
+
try {
|
|
92
|
+
r = await b.readdir(e, { withFileTypes: !0 });
|
|
93
|
+
} catch {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
for (let i of r) {
|
|
97
|
+
if (i.name.startsWith(".") && i.name !== "." && A.has(i.name) || A.has(i.name)) continue;
|
|
98
|
+
let r = g(e, i.name), a = r.slice(n.length + 1).split("\\").join("/");
|
|
99
|
+
i.isDirectory() ? await N(r, t, n) : i.isFile() && t(i.name, r, a);
|
|
100
|
+
}
|
|
101
|
+
}, ee = async (e) => {
|
|
102
|
+
let t;
|
|
103
|
+
try {
|
|
104
|
+
t = JSON.parse(await b.readFile(g(e, "package.json"), "utf8"));
|
|
105
|
+
} catch {
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
let n = {
|
|
109
|
+
...t.devDependencies,
|
|
110
|
+
...t.dependencies
|
|
111
|
+
}, r = n["@voltro/runtime"] ?? n["@voltro/cli"] ?? n["@voltro/protocol"] ?? n["@voltro/web"];
|
|
112
|
+
if (r === void 0) return null;
|
|
113
|
+
let i = r.match(/^[\^~]?(\d+\.\d+\.\d+(?:-[0-9A-Za-z.]+)?)$/);
|
|
114
|
+
if (i) return i[1];
|
|
115
|
+
for (let t of [
|
|
116
|
+
"@voltro/runtime",
|
|
117
|
+
"@voltro/cli",
|
|
118
|
+
"@voltro/protocol"
|
|
119
|
+
]) try {
|
|
120
|
+
let n = JSON.parse(await b.readFile(g(e, "node_modules", t, "package.json"), "utf8"));
|
|
121
|
+
if (typeof n.version == "string") return n.version;
|
|
122
|
+
} catch {}
|
|
123
|
+
return null;
|
|
124
|
+
}, te = async (e) => {
|
|
125
|
+
let t;
|
|
126
|
+
try {
|
|
127
|
+
t = await b.readFile(g(e, "app.config.ts"), "utf8");
|
|
128
|
+
} catch {
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
return {
|
|
132
|
+
name: t.match(/name\s*:\s*['"]([^'"]+)['"]/)?.[1] ?? m(e),
|
|
133
|
+
kind: t.match(/type\s*:\s*['"]([^'"]+)['"]/)?.[1] === "web" ? "web" : "api",
|
|
134
|
+
plugins: [...new Set([...t.matchAll(/([a-zA-Z][a-zA-Z0-9]*Plugin)\s*\(/g)].map((e) => e[1]))].sort()
|
|
135
|
+
};
|
|
136
|
+
}, ne = async (e) => {
|
|
137
|
+
let t = await te(e);
|
|
138
|
+
if (t === null) return null;
|
|
139
|
+
let n = k(), r = n;
|
|
140
|
+
await N(e, (e, t, n) => {
|
|
141
|
+
if ((n.startsWith("src/pages/") || n.includes("/src/pages/")) && e.endsWith(".tsx") && !M.has(e)) {
|
|
142
|
+
r.pageCount += 1;
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
let i = j(e);
|
|
146
|
+
i !== null && r[i.key].push(i.name);
|
|
147
|
+
});
|
|
148
|
+
for (let e of Object.keys(n)) Array.isArray(r[e]) && (r[e] = [...new Set(r[e])].sort());
|
|
149
|
+
return r.plugins = t.plugins, {
|
|
150
|
+
slug: m(e),
|
|
151
|
+
name: t.name,
|
|
152
|
+
kind: t.kind,
|
|
153
|
+
voltroVersion: await ee(e),
|
|
154
|
+
primitives: n
|
|
155
|
+
};
|
|
156
|
+
}, re = async (e, t = 5) => {
|
|
157
|
+
let n = [], r = async (e, i) => {
|
|
158
|
+
let a;
|
|
159
|
+
try {
|
|
160
|
+
a = await b.readdir(e, { withFileTypes: !0 });
|
|
161
|
+
} catch {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
if (a.some((e) => e.isFile() && e.name === "app.config.ts")) {
|
|
165
|
+
n.push(e);
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
if (!(i >= t)) for (let t of a) t.isDirectory() && !A.has(t.name) && await r(g(e, t.name), i + 1);
|
|
169
|
+
};
|
|
170
|
+
return await r(e, 0), n.sort();
|
|
171
|
+
}, P = async (e, t) => {
|
|
172
|
+
let n = await re(e), r = [];
|
|
173
|
+
for (let e of n) {
|
|
174
|
+
let t = await ne(e);
|
|
175
|
+
t !== null && r.push(t);
|
|
176
|
+
}
|
|
177
|
+
return {
|
|
178
|
+
scannedCommit: t,
|
|
179
|
+
apps: r
|
|
180
|
+
};
|
|
181
|
+
}, F = 8e3, I = "not logged in — skipped cloud registration. The Voltro Cloud ToS requires projects + apps to be registered; run `voltro cloud login`, then re-run (or `voltro cloud project create` + `voltro cloud scan`).", ie = async (e) => await a() === null ? {
|
|
182
|
+
willRegister: !1,
|
|
183
|
+
lines: [
|
|
184
|
+
"→ cloud registration: skipped — not logged in, so nothing was sent from this machine.",
|
|
185
|
+
" Registration is how SELF-HOSTED use is counted; the Voltro Cloud Terms of Service ask",
|
|
186
|
+
" for projects and apps to be registered once you have an account.",
|
|
187
|
+
" Register later: voltro cloud login then voltro cloud scan",
|
|
188
|
+
" Never ask again: scaffold with --no-register"
|
|
189
|
+
]
|
|
190
|
+
} : {
|
|
191
|
+
willRegister: !0,
|
|
192
|
+
lines: [
|
|
193
|
+
`→ registering project '${e}' with ${s()} (self-hosted usage tracking, ToS-governed)`,
|
|
194
|
+
" Sends: the project slug, and per app its name, kind, framework version and the NAMES of",
|
|
195
|
+
" declared primitives (queries, mutations, tables, plugins, …) plus a page count.",
|
|
196
|
+
" Never sends: source code, row data, environment values or secrets.",
|
|
197
|
+
" Skip with --no-register."
|
|
198
|
+
]
|
|
199
|
+
}, ae = (e, t) => e === 409 || /already|exist|duplicate|unique/i.test(t), oe = async (e, t) => {
|
|
200
|
+
let n = await a();
|
|
201
|
+
if (n === null) return {
|
|
202
|
+
kind: "skipped",
|
|
203
|
+
message: I
|
|
204
|
+
};
|
|
205
|
+
let r = await o("/projects", {
|
|
206
|
+
method: "POST",
|
|
207
|
+
token: n.token,
|
|
208
|
+
timeoutMs: F,
|
|
209
|
+
body: {
|
|
210
|
+
slug: e,
|
|
211
|
+
...t === void 0 ? {} : { name: t }
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
if (r.kind === "ok") {
|
|
215
|
+
let t = r.data;
|
|
216
|
+
return {
|
|
217
|
+
kind: "registered",
|
|
218
|
+
message: `project '${e}' registered (${s()})`,
|
|
219
|
+
...typeof t?.id == "string" ? { projectId: t.id } : {}
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
return ae(r.status, r.error) ? {
|
|
223
|
+
kind: "registered",
|
|
224
|
+
message: `project '${e}' already registered`
|
|
225
|
+
} : r.status === 402 ? {
|
|
226
|
+
kind: "failed",
|
|
227
|
+
message: `project quota reached — ${r.error}`
|
|
228
|
+
} : {
|
|
229
|
+
kind: "failed",
|
|
230
|
+
message: `cloud project registration failed: ${r.error}`
|
|
231
|
+
};
|
|
232
|
+
}, L = async (e, t) => {
|
|
233
|
+
let n = await a();
|
|
234
|
+
if (n === null) return {
|
|
235
|
+
kind: "skipped",
|
|
236
|
+
message: I
|
|
237
|
+
};
|
|
238
|
+
let r;
|
|
239
|
+
try {
|
|
240
|
+
r = await P(e, null);
|
|
241
|
+
} catch (e) {
|
|
242
|
+
return {
|
|
243
|
+
kind: "failed",
|
|
244
|
+
message: `inventory scan failed: ${e.message}`
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
if (r.apps.length === 0) return {
|
|
248
|
+
kind: "failed",
|
|
249
|
+
message: "no apps found to register"
|
|
250
|
+
};
|
|
251
|
+
let i = await o(`/projects/${encodeURIComponent(t)}/inventory`, {
|
|
252
|
+
method: "POST",
|
|
253
|
+
token: n.token,
|
|
254
|
+
timeoutMs: F,
|
|
255
|
+
body: r
|
|
256
|
+
});
|
|
257
|
+
return i.kind === "ok" ? {
|
|
258
|
+
kind: "registered",
|
|
259
|
+
message: `${r.apps.length} app(s) registered in the cloud`
|
|
260
|
+
} : {
|
|
261
|
+
kind: "failed",
|
|
262
|
+
message: `app registration failed: ${i.error}`
|
|
263
|
+
};
|
|
264
|
+
}, R = S({ scope: "voltro:scaffold" }), se = T(w), z = (e) => {
|
|
265
|
+
let t = _(e);
|
|
266
|
+
for (let e = 0; e < 12; e++) {
|
|
267
|
+
if (v(g(t, "pnpm-workspace.yaml"))) return t;
|
|
268
|
+
let e = h(t);
|
|
269
|
+
if (e === t) break;
|
|
270
|
+
t = e;
|
|
271
|
+
}
|
|
272
|
+
return null;
|
|
273
|
+
}, B = {
|
|
274
|
+
dev: "pnpm -r --parallel dev",
|
|
275
|
+
build: "pnpm -r build",
|
|
276
|
+
test: "pnpm -r test",
|
|
277
|
+
typecheck: "pnpm -r typecheck"
|
|
278
|
+
}, V = {
|
|
279
|
+
"@types/node": "^26.1.2",
|
|
280
|
+
typescript: "^6.0.3"
|
|
281
|
+
}, ce = JSON.stringify({ compilerOptions: {
|
|
282
|
+
target: "ES2024",
|
|
283
|
+
module: "ESNext",
|
|
284
|
+
moduleResolution: "Bundler",
|
|
285
|
+
lib: [
|
|
286
|
+
"ES2024",
|
|
287
|
+
"DOM",
|
|
288
|
+
"DOM.Iterable"
|
|
289
|
+
],
|
|
290
|
+
jsx: "react-jsx",
|
|
291
|
+
strict: !0,
|
|
292
|
+
noUncheckedIndexedAccess: !0,
|
|
293
|
+
exactOptionalPropertyTypes: !0,
|
|
294
|
+
esModuleInterop: !0,
|
|
295
|
+
skipLibCheck: !0,
|
|
296
|
+
resolveJsonModule: !0,
|
|
297
|
+
isolatedModules: !0,
|
|
298
|
+
allowImportingTsExtensions: !0,
|
|
299
|
+
noEmit: !0,
|
|
300
|
+
types: ["node"]
|
|
301
|
+
} }, null, 2) + "\n", H = [
|
|
302
|
+
[
|
|
303
|
+
"esbuild",
|
|
304
|
+
!0,
|
|
305
|
+
"vite's compiler — its postinstall places the platform binary; the web app does not build without it"
|
|
306
|
+
],
|
|
307
|
+
[
|
|
308
|
+
"@parcel/watcher",
|
|
309
|
+
!1,
|
|
310
|
+
"optional native file-watcher; chokidar covers the same job in pure JS"
|
|
311
|
+
],
|
|
312
|
+
[
|
|
313
|
+
"msgpackr-extract",
|
|
314
|
+
!1,
|
|
315
|
+
"optional native accelerator for @effect/rpc's msgpackr; it falls back to JS"
|
|
316
|
+
]
|
|
317
|
+
], le = `# Voltro workspace.
|
|
318
|
+
# apps/<project>/<app> — the project's apps (api, web, …)
|
|
319
|
+
# packages/<name> — repo-wide shared libraries
|
|
320
|
+
# packages/<project>/<name> — project-scoped libraries
|
|
321
|
+
packages:
|
|
322
|
+
- 'apps/*/*'
|
|
323
|
+
- 'packages/*'
|
|
324
|
+
- 'packages/*/*'
|
|
325
|
+
|
|
326
|
+
# Which dependencies may run install scripts. pnpm asks about every undecided
|
|
327
|
+
# one and (since pnpm 11) FAILS the install until you answer; these three come
|
|
328
|
+
# from the framework's own dependency tree, so the answers ship with the
|
|
329
|
+
# scaffold. Run \`pnpm approve-builds\` to revisit, or to answer a new one.
|
|
330
|
+
allowBuilds:
|
|
331
|
+
${H.map(([e, t, n]) => ` ${/^[a-z][a-z0-9-]*$/.test(e) ? e : `'${e}'`}: ${t} # ${n}`).join("\n")}
|
|
332
|
+
`, U = [
|
|
333
|
+
"node_modules/",
|
|
334
|
+
"dist/",
|
|
335
|
+
"build/",
|
|
336
|
+
"coverage/",
|
|
337
|
+
"*.tsbuildinfo",
|
|
338
|
+
".DS_Store",
|
|
339
|
+
".env",
|
|
340
|
+
".env.local",
|
|
341
|
+
".env.*.local",
|
|
342
|
+
".voltro/serverless/",
|
|
343
|
+
".voltro-baseline-backup/",
|
|
344
|
+
".framework/"
|
|
345
|
+
], ue = `# Voltro workspace — build output, machine-local state, and secrets.
|
|
346
|
+
# .env.local holds the per-project secrets \`voltro dev\` mints; never commit it.
|
|
347
|
+
${U.join("\n")}
|
|
348
|
+
`, de = () => {
|
|
349
|
+
let e = process.env.npm_config_user_agent;
|
|
350
|
+
if (!e) return null;
|
|
351
|
+
let t = /(^|\s)pnpm\/(\d+\.\d+\.\d+)/.exec(e);
|
|
352
|
+
return t ? `pnpm@${t[2]}` : null;
|
|
353
|
+
}, fe = (e) => {
|
|
354
|
+
let t = _(e);
|
|
355
|
+
for (let e = 0; e < 24; e++) {
|
|
356
|
+
if (v(g(t, ".git"))) return !0;
|
|
357
|
+
let e = h(t);
|
|
358
|
+
if (e === t) return !1;
|
|
359
|
+
t = e;
|
|
360
|
+
}
|
|
361
|
+
return !1;
|
|
362
|
+
}, W = async (e) => {
|
|
363
|
+
let n = z(e), r = n ?? _(e), i = [];
|
|
364
|
+
n || (y(r, { recursive: !0 }), await b.writeFile(g(r, "pnpm-workspace.yaml"), le, "utf8"), i.push("pnpm-workspace.yaml"));
|
|
365
|
+
let a = g(r, "package.json");
|
|
366
|
+
if (v(a)) {
|
|
367
|
+
let e = JSON.parse(await b.readFile(a, "utf8")), t = { ...e.scripts ?? {} }, n = { ...e.devDependencies ?? {} }, r = !1;
|
|
368
|
+
for (let [e, n] of Object.entries(B)) t[e] === void 0 && (t[e] = n, r = !0);
|
|
369
|
+
for (let [t, i] of Object.entries(V)) n[t] !== void 0 || e.dependencies?.[t] !== void 0 || (n[t] = i, r = !0);
|
|
370
|
+
r && (e.scripts = t, e.devDependencies = n, await b.writeFile(a, JSON.stringify(e, null, 2) + "\n", "utf8"), i.push("package.json"));
|
|
371
|
+
} else {
|
|
372
|
+
let e = de(), n = {
|
|
373
|
+
name: t(m(r)) || "voltro-workspace",
|
|
374
|
+
version: "0.0.0",
|
|
375
|
+
private: !0,
|
|
376
|
+
type: "module",
|
|
377
|
+
engines: {
|
|
378
|
+
node: ">=24.0.0",
|
|
379
|
+
pnpm: ">=10.0.0"
|
|
380
|
+
},
|
|
381
|
+
...e ? { packageManager: e } : {},
|
|
382
|
+
scripts: { ...B },
|
|
383
|
+
devDependencies: { ...V }
|
|
384
|
+
};
|
|
385
|
+
await b.writeFile(a, JSON.stringify(n, null, 2) + "\n", "utf8"), i.push("package.json");
|
|
386
|
+
}
|
|
387
|
+
let o = g(r, "tsconfig.base.json");
|
|
388
|
+
v(o) || (await b.writeFile(o, ce, "utf8"), i.push("tsconfig.base.json"));
|
|
389
|
+
let s = g(r, ".gitignore");
|
|
390
|
+
if (!v(s)) await b.writeFile(s, ue, "utf8"), i.push(".gitignore");
|
|
391
|
+
else {
|
|
392
|
+
let e = await b.readFile(s, "utf8"), t = new Set(e.split(/\r?\n/).map((e) => e.trim())), n = U.filter((e) => !t.has(e) && !t.has(`/${e}`));
|
|
393
|
+
if (n.length > 0) {
|
|
394
|
+
let t = e === "" || e.endsWith("\n") ? "" : "\n";
|
|
395
|
+
await b.writeFile(s, `${e}${t}\n# Voltro workspace\n${n.join("\n")}\n`, "utf8"), i.push(".gitignore");
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
let c = !1;
|
|
399
|
+
if (!fe(r)) try {
|
|
400
|
+
await se("git", ["init", "--quiet"], { cwd: r }), c = !0;
|
|
401
|
+
} catch {
|
|
402
|
+
R.warn("could not run `git init` — initialise version control yourself", { root: r });
|
|
403
|
+
}
|
|
404
|
+
return {
|
|
405
|
+
root: r,
|
|
406
|
+
written: i,
|
|
407
|
+
preexisting: n !== null,
|
|
408
|
+
gitInitialised: c
|
|
409
|
+
};
|
|
410
|
+
}, G = (e) => e.length < 2 || e.length > 50 ? !1 : /^[a-z][a-zA-Z0-9]*$/.test(e) || /^[a-z][a-z0-9-]*[a-z0-9]$/.test(e) ? !0 : (/^[a-z]$/.test(e), !1), K = (e) => {
|
|
411
|
+
let t = [], n = {};
|
|
412
|
+
for (let r = 0; r < e.length; r++) {
|
|
413
|
+
let i = e[r];
|
|
414
|
+
if (i.startsWith("--")) {
|
|
415
|
+
let t = i.indexOf("=");
|
|
416
|
+
t >= 0 ? n[i.slice(2, t)] = i.slice(t + 1) : r + 1 < e.length && !e[r + 1].startsWith("--") ? n[i.slice(2)] = e[++r] : n[i.slice(2)] = !0;
|
|
417
|
+
} else t.push(i);
|
|
418
|
+
}
|
|
419
|
+
return {
|
|
420
|
+
positional: t,
|
|
421
|
+
flags: n
|
|
422
|
+
};
|
|
423
|
+
}, pe = async (e, n) => {
|
|
424
|
+
let r = E({
|
|
425
|
+
input: D,
|
|
426
|
+
output: O
|
|
427
|
+
});
|
|
428
|
+
try {
|
|
429
|
+
for (;;) {
|
|
430
|
+
let i = (await r.question(`${e} [${n}]: `)).trim() || n;
|
|
431
|
+
if (!G(i)) {
|
|
432
|
+
console.log(" Invalid name: lowercase letters / digits / hyphens, max 50 chars, must start with a letter.");
|
|
433
|
+
continue;
|
|
434
|
+
}
|
|
435
|
+
return t(i);
|
|
436
|
+
}
|
|
437
|
+
} finally {
|
|
438
|
+
r.close();
|
|
439
|
+
}
|
|
440
|
+
}, me = async (e) => {
|
|
441
|
+
let t = await r();
|
|
442
|
+
if (t.length === 0) return R.error("no templates found", { hint: "templates ship under packages/cli/templates/apps/" }), 1;
|
|
443
|
+
let n = Math.max(...t.map((e) => e.id.length), 2), i = Math.max(...t.map((e) => e.kind.length), 4);
|
|
444
|
+
console.log(`${"id".padEnd(n)} ${"kind".padEnd(i)} summary`), console.log(`${"-".repeat(n)} ${"-".repeat(i)} ${"-".repeat(60)}`);
|
|
445
|
+
for (let e of t) console.log(`${e.id.padEnd(n)} ${e.kind.padEnd(i)} ${e.summary}`);
|
|
446
|
+
return 0;
|
|
447
|
+
}, q = {
|
|
448
|
+
start: 5190,
|
|
449
|
+
end: 5199
|
|
450
|
+
}, J = (e) => Number.isInteger(e.start) && Number.isInteger(e.end) && e.start >= 1024 && e.end <= 65535 && e.end >= e.start, Y = async (e) => {
|
|
451
|
+
let t = g(e, "project.json");
|
|
452
|
+
if (!v(t)) return null;
|
|
453
|
+
try {
|
|
454
|
+
return JSON.parse(await b.readFile(t, "utf8"));
|
|
455
|
+
} catch {
|
|
456
|
+
return null;
|
|
457
|
+
}
|
|
458
|
+
}, he = async (e, t) => {
|
|
459
|
+
let n = g(e, "project.json");
|
|
460
|
+
y(h(n), { recursive: !0 }), await b.writeFile(n, JSON.stringify(t, null, 2) + "\n", "utf8");
|
|
461
|
+
}, X = async (e, t, n) => {
|
|
462
|
+
let r = g(e, "project.json");
|
|
463
|
+
if (v(r)) return;
|
|
464
|
+
let i = {
|
|
465
|
+
name: t,
|
|
466
|
+
description: `Project '${t}' scaffolded by the voltro CLI.`,
|
|
467
|
+
portRange: n,
|
|
468
|
+
apps: {}
|
|
469
|
+
};
|
|
470
|
+
y(h(r), { recursive: !0 }), x(r, JSON.stringify(i, null, 2) + "\n", "utf8");
|
|
471
|
+
}, Z = async (e) => {
|
|
472
|
+
let t = await Y(e);
|
|
473
|
+
if (!t) return null;
|
|
474
|
+
let n = t.portRange ?? q, r = /* @__PURE__ */ new Set();
|
|
475
|
+
for (let e of Object.values(t.apps ?? {})) typeof e.port == "number" && r.add(e.port);
|
|
476
|
+
for (let e = n.start; e <= n.end; e++) if (!r.has(e)) return e;
|
|
477
|
+
return null;
|
|
478
|
+
}, ge = async (e, t, n, r) => {
|
|
479
|
+
let i = g(e, "project.json"), a = { name: "unknown" };
|
|
480
|
+
if (v(i)) try {
|
|
481
|
+
a = JSON.parse(await b.readFile(i, "utf8"));
|
|
482
|
+
} catch {}
|
|
483
|
+
let o = { ...a.apps ?? {} };
|
|
484
|
+
o[t] = r === void 0 ? {
|
|
485
|
+
kind: n,
|
|
486
|
+
path: t
|
|
487
|
+
} : {
|
|
488
|
+
kind: n,
|
|
489
|
+
path: t,
|
|
490
|
+
port: r
|
|
491
|
+
};
|
|
492
|
+
let s = {
|
|
493
|
+
...a,
|
|
494
|
+
apps: o
|
|
495
|
+
};
|
|
496
|
+
await b.writeFile(i, JSON.stringify(s, null, 2) + "\n", "utf8");
|
|
497
|
+
}, _e = (e, n) => {
|
|
498
|
+
let r = typeof n == "string" ? t(n) : void 0;
|
|
499
|
+
if (e.length > 1) return {
|
|
500
|
+
ok: !1,
|
|
501
|
+
error: `this monorepo hosts ${e.length} projects (${e.join(", ")}) — a monorepo must have exactly one`,
|
|
502
|
+
hint: "consolidate into one project (a monorepo = one cloud project); apps live inside it"
|
|
503
|
+
};
|
|
504
|
+
if (e.length === 1) {
|
|
505
|
+
let t = e[0];
|
|
506
|
+
return r !== void 0 && r !== t ? {
|
|
507
|
+
ok: !1,
|
|
508
|
+
error: `this monorepo already hosts project '${t}'; a monorepo has exactly one project`,
|
|
509
|
+
hint: `omit --to — apps always go into '${t}'`
|
|
510
|
+
} : {
|
|
511
|
+
ok: !0,
|
|
512
|
+
project: t
|
|
513
|
+
};
|
|
514
|
+
}
|
|
515
|
+
return r === void 0 ? {
|
|
516
|
+
ok: !1,
|
|
517
|
+
error: "no project in this monorepo yet",
|
|
518
|
+
hint: "run `voltro create-project <name>` first (a monorepo has exactly one project)"
|
|
519
|
+
} : {
|
|
520
|
+
ok: !0,
|
|
521
|
+
project: r
|
|
522
|
+
};
|
|
523
|
+
}, Q = async (e) => v(e) ? (await b.readdir(e, { withFileTypes: !0 })).filter((e) => e.isDirectory()).map((e) => e.name) : [], ve = async (e, t) => {
|
|
524
|
+
let n = await Y(e) ?? { name: t.projectSlug };
|
|
525
|
+
await he(e, {
|
|
526
|
+
...n,
|
|
527
|
+
cloud: {
|
|
528
|
+
...n.cloud,
|
|
529
|
+
...t
|
|
530
|
+
}
|
|
531
|
+
});
|
|
532
|
+
}, ye = (e, t) => {
|
|
533
|
+
let n = t.kind === "registered" ? "✓" : "⚠";
|
|
534
|
+
console.log(` ${n} ${e}: ${t.message}`);
|
|
535
|
+
}, be = async (e, t) => {
|
|
536
|
+
let n = (await Y(e))?.cloud?.projectSlug ?? t;
|
|
537
|
+
console.log();
|
|
538
|
+
let r = await ie(n);
|
|
539
|
+
for (let e of r.lines) console.log(e);
|
|
540
|
+
if (!r.willRegister) return;
|
|
541
|
+
let i = await oe(n);
|
|
542
|
+
ye("project", i), i.kind === "registered" && (await ve(e, {
|
|
543
|
+
projectSlug: n,
|
|
544
|
+
deploymentMode: "self_hosted",
|
|
545
|
+
registeredAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
546
|
+
...i.projectId === void 0 ? {} : { projectId: i.projectId }
|
|
547
|
+
}), ye("apps", await L(e, n)));
|
|
548
|
+
}, xe = async (e, t) => {
|
|
549
|
+
let n = z(process.cwd());
|
|
550
|
+
if (!n) return {
|
|
551
|
+
ok: !1,
|
|
552
|
+
error: "no pnpm-workspace.yaml above the current directory — run `voltro init`, then `voltro create-project <name>`"
|
|
553
|
+
};
|
|
554
|
+
let r = g(n, "apps"), i = await Q(r);
|
|
555
|
+
if (i.length === 0) return {
|
|
556
|
+
ok: !1,
|
|
557
|
+
error: "no project in this monorepo — run `voltro create-project <name>` first, then link"
|
|
558
|
+
};
|
|
559
|
+
if (i.length > 1) return {
|
|
560
|
+
ok: !1,
|
|
561
|
+
error: `this monorepo hosts ${i.length} projects (${i.join(", ")}) — a monorepo must have exactly one`
|
|
562
|
+
};
|
|
563
|
+
let a = i[0], o = g(r, a);
|
|
564
|
+
return await ve(o, {
|
|
565
|
+
projectSlug: e,
|
|
566
|
+
deploymentMode: t?.deploymentMode ?? "self_hosted",
|
|
567
|
+
registeredAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
568
|
+
...t?.orgSlug === void 0 ? {} : { orgSlug: t.orgSlug },
|
|
569
|
+
...t?.projectId === void 0 ? {} : { projectId: t.projectId }
|
|
570
|
+
}), {
|
|
571
|
+
ok: !0,
|
|
572
|
+
projectDir: o,
|
|
573
|
+
projectName: a
|
|
574
|
+
};
|
|
575
|
+
}, Se = async (r) => {
|
|
576
|
+
let { positional: a, flags: o } = K(r), s = a[0];
|
|
577
|
+
if (!s) return R.error("add-app: <appName> required", { usage: "voltro add-app <appName> --template <templateId> [--to <projectName>]" }), 2;
|
|
578
|
+
if (!G(s)) return R.error("add-app: invalid appName — use camelCase or kebab-case", { appName: s }), 2;
|
|
579
|
+
let c = o.template;
|
|
580
|
+
if (typeof c != "string") return R.error("add-app: --template <id> required", { hint: "run `voltro list-templates` to see available ids" }), 2;
|
|
581
|
+
let u = await n(c);
|
|
582
|
+
if (!u) return R.error("add-app: unknown template", {
|
|
583
|
+
templateId: c,
|
|
584
|
+
hint: "run `voltro list-templates` to see available ids"
|
|
585
|
+
}), 2;
|
|
586
|
+
let d = z(process.cwd());
|
|
587
|
+
if (!d) return R.error("add-app: no pnpm-workspace.yaml above the current directory — not a Voltro workspace", {
|
|
588
|
+
cwd: process.cwd(),
|
|
589
|
+
hint: "run `voltro init` to make this directory a workspace root, then `voltro create-project <name>`"
|
|
590
|
+
}), 2;
|
|
591
|
+
let f = g(d, "apps");
|
|
592
|
+
if (!v(f)) return R.error("add-app: apps/ root not found — no project scaffolded in this workspace yet", {
|
|
593
|
+
projectsRoot: f,
|
|
594
|
+
hint: "run `voltro create-project <name>` first"
|
|
595
|
+
}), 2;
|
|
596
|
+
let p = _e(await Q(f), typeof o.to == "string" ? o.to : void 0);
|
|
597
|
+
if (!p.ok) return R.error(`add-app: ${p.error}`, p.hint === void 0 ? {} : { hint: p.hint }), 2;
|
|
598
|
+
let m = p.project, h = g(f, m);
|
|
599
|
+
v(h) || (y(h, { recursive: !0 }), await X(h, m, q));
|
|
600
|
+
let _ = t(s), b = g(h, _);
|
|
601
|
+
if (v(b)) return R.error("add-app: target directory already exists", { targetDir: b }), 1;
|
|
602
|
+
let x = null;
|
|
603
|
+
if (u.kind === "web" && (x = await Z(h), x === null)) {
|
|
604
|
+
let e = (await Y(h))?.portRange ?? q;
|
|
605
|
+
return R.error("add-app: project portRange is exhausted", {
|
|
606
|
+
project: m,
|
|
607
|
+
range: `${e.start}-${e.end}`,
|
|
608
|
+
hint: "edit apps/<project>/project.json and widen portRange, or remove unused app entries"
|
|
609
|
+
}), 1;
|
|
610
|
+
}
|
|
611
|
+
let S = i(_, m, x ?? 0);
|
|
612
|
+
console.log(`→ scaffolding ${u.id} into ${b}${x === null ? "" : ` (port ${x})`}`);
|
|
613
|
+
let { written: C } = await e({
|
|
614
|
+
template: u,
|
|
615
|
+
targetDir: b,
|
|
616
|
+
vars: S
|
|
617
|
+
});
|
|
618
|
+
for (let e of C) console.log(` · ${e}`);
|
|
619
|
+
return await ge(h, _, u.kind, x === null ? void 0 : x), await l(d, {
|
|
620
|
+
appTemplates: [{
|
|
621
|
+
dir: b,
|
|
622
|
+
template: u.id
|
|
623
|
+
}],
|
|
624
|
+
preferPointer: !0
|
|
625
|
+
}).catch(() => void 0), console.log(), console.log(`✓ app '${_}' added to project '${m}' from template '${u.id}'.`), o["no-register"] !== !0 && await be(h, m), console.log(), console.log("Next steps:"), console.log(" pnpm install"), u.kind === "serverless" ? (console.log(` voltro serverless list apps/${m}/${_} # what would deploy`), console.log(` voltro serverless dev apps/${m}/${_}/... # run one locally`), console.log(" voltro serverless deploy --target node|cloudflare|scaleway")) : u.kind === "mobile" ? (console.log(" voltro dev # (in another shell) run the sibling api"), console.log(` cd apps/${m}/${_}`), console.log(" pnpm ios # or: pnpm android / pnpm start (Expo Go)"), console.log(" # set EXPO_PUBLIC_API_URL to your api's LAN address for a device/simulator")) : console.log(` pnpm --filter @${m}/${_} dev`), 0;
|
|
626
|
+
}, Ce = (e) => {
|
|
627
|
+
if (typeof e != "string") return null;
|
|
628
|
+
let t = /^(\d+)\s*(?:-|:|\.\.)\s*(\d+)$/.exec(e.trim());
|
|
629
|
+
if (!t) return null;
|
|
630
|
+
let n = {
|
|
631
|
+
start: Number(t[1]),
|
|
632
|
+
end: Number(t[2])
|
|
633
|
+
};
|
|
634
|
+
return J(n) ? n : null;
|
|
635
|
+
}, we = (e) => {
|
|
636
|
+
let t = Ce(e["port-range"]);
|
|
637
|
+
return {
|
|
638
|
+
...typeof e.api == "string" ? { api: e.api } : e.api === !0 ? { api: "api-backend" } : {},
|
|
639
|
+
...typeof e.web == "string" ? { web: e.web } : e.web === !0 ? { web: "frontend-blank" } : {},
|
|
640
|
+
...typeof e.mobile == "string" ? { mobile: e.mobile } : e.mobile === !0 ? { mobile: "mobile-app" } : {},
|
|
641
|
+
...t ? { portRange: t } : {},
|
|
642
|
+
...typeof e.baseline == "string" ? { baseline: e.baseline } : {},
|
|
643
|
+
...e.cache === "redis" ? { cache: "redis" } : {},
|
|
644
|
+
noInput: e["no-input"] === !0
|
|
645
|
+
};
|
|
646
|
+
}, Te = async () => {
|
|
647
|
+
let e = await d();
|
|
648
|
+
if (e.length === 0) return null;
|
|
649
|
+
let t = E({
|
|
650
|
+
input: D,
|
|
651
|
+
output: O
|
|
652
|
+
});
|
|
653
|
+
try {
|
|
654
|
+
console.log(), console.log("Pick a deploy baseline (or press Enter to skip):");
|
|
655
|
+
for (let t of e) console.log(` ${t.id.padEnd(10)} ${t.displayName} — ${t.summary}`);
|
|
656
|
+
for (;;) {
|
|
657
|
+
let n = (await t.question("Baseline [skip]: ")).trim().toLowerCase();
|
|
658
|
+
if (n === "" || n === "skip") return null;
|
|
659
|
+
let r = e.find((e) => e.id === n);
|
|
660
|
+
if (r) return r.id;
|
|
661
|
+
console.log(` Unknown baseline '${n}'. Pick one of: ${e.map((e) => e.id).join(", ")}.`);
|
|
662
|
+
}
|
|
663
|
+
} finally {
|
|
664
|
+
t.close();
|
|
665
|
+
}
|
|
666
|
+
}, Ee = async (e) => {
|
|
667
|
+
let t = E({
|
|
668
|
+
input: D,
|
|
669
|
+
output: O
|
|
670
|
+
});
|
|
671
|
+
try {
|
|
672
|
+
for (;;) {
|
|
673
|
+
let n = (await t.question(`Port range for this project's web apps [${e.start}-${e.end}]: `)).trim();
|
|
674
|
+
if (n === "") return e;
|
|
675
|
+
let r = Ce(n);
|
|
676
|
+
if (r) return r;
|
|
677
|
+
console.log(" Invalid range. Use e.g. 5190-5199 (start ≥ 1024, end ≤ 65535, end ≥ start).");
|
|
678
|
+
}
|
|
679
|
+
} finally {
|
|
680
|
+
t.close();
|
|
681
|
+
}
|
|
682
|
+
}, De = async (r) => {
|
|
683
|
+
let { positional: a, flags: o } = K(r), s = await W(process.cwd()), c = s.root;
|
|
684
|
+
if (!s.preexisting) {
|
|
685
|
+
console.log(`→ initialising workspace root ${c}`);
|
|
686
|
+
for (let e of s.written) console.log(` · ${e}`);
|
|
687
|
+
} else if (s.written.length > 0) {
|
|
688
|
+
console.log(`→ workspace root ${c}`);
|
|
689
|
+
for (let e of s.written) console.log(` · updated ${e}`);
|
|
690
|
+
}
|
|
691
|
+
s.gitInitialised && console.log(` · git init (${c} was not in a repository)`);
|
|
692
|
+
let m = g(c, "apps"), h = await Q(m);
|
|
693
|
+
if (h.length > 0) return R.error("create-project: this monorepo already hosts a project — a monorepo has exactly one", {
|
|
694
|
+
existing: h,
|
|
695
|
+
hint: "use `voltro add-app <name> --template <id>` to add apps to the existing project"
|
|
696
|
+
}), 1;
|
|
697
|
+
v(m) || y(m, { recursive: !0 });
|
|
698
|
+
let _ = we(o), b = a[0] ?? "";
|
|
699
|
+
if (b && !G(b)) return R.error("create-project: invalid name", { name: b }), 2;
|
|
700
|
+
if (!b) {
|
|
701
|
+
if (_.noInput) return R.error("create-project: name required (use positional arg or run interactively)"), 2;
|
|
702
|
+
b = await pe("Project name", "my-project");
|
|
703
|
+
}
|
|
704
|
+
b = t(b);
|
|
705
|
+
let x = g(m, b);
|
|
706
|
+
if (v(x)) return R.error("create-project: target directory already exists", { projectDir: x }), 1;
|
|
707
|
+
let S = _.api ?? null, C = _.web ?? null, w = _.mobile ?? null;
|
|
708
|
+
if (!S && !C) if (_.noInput) S = "api-backend", C = "frontend-blank";
|
|
709
|
+
else {
|
|
710
|
+
let e = E({
|
|
711
|
+
input: D,
|
|
712
|
+
output: O
|
|
713
|
+
});
|
|
714
|
+
try {
|
|
715
|
+
let t = (await e.question("Scaffold apps/api (api-backend) and apps/web (frontend-blank)? [Y/n]: ")).trim().toLowerCase();
|
|
716
|
+
(t === "" || t === "y" || t === "yes") && (S = "api-backend", C = "frontend-blank");
|
|
717
|
+
} finally {
|
|
718
|
+
e.close();
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
let T = S ? await n(S) : null, k = C ? await n(C) : null, A = w ? await n(w) : null;
|
|
722
|
+
if (S && !T) return R.error("create-project: unknown api template", { template: S }), 2;
|
|
723
|
+
if (C && !k) return R.error("create-project: unknown web template", { template: C }), 2;
|
|
724
|
+
if (w && !A) return R.error("create-project: unknown mobile template", { template: w }), 2;
|
|
725
|
+
if (T && T.kind !== "api") return R.error("create-project: template kind mismatch", {
|
|
726
|
+
id: T.id,
|
|
727
|
+
kind: T.kind,
|
|
728
|
+
expected: "api"
|
|
729
|
+
}), 2;
|
|
730
|
+
if (k && k.kind !== "web") return R.error("create-project: template kind mismatch", {
|
|
731
|
+
id: k.id,
|
|
732
|
+
kind: k.kind,
|
|
733
|
+
expected: "web"
|
|
734
|
+
}), 2;
|
|
735
|
+
if (A && A.kind !== "mobile") return R.error("create-project: template kind mismatch", {
|
|
736
|
+
id: A.id,
|
|
737
|
+
kind: A.kind,
|
|
738
|
+
expected: "mobile"
|
|
739
|
+
}), 2;
|
|
740
|
+
if (!T && !k && !A) return R.error("create-project: need at least one of --api, --web or --mobile"), 2;
|
|
741
|
+
let j = q;
|
|
742
|
+
if (_.portRange ? j = _.portRange : _.noInput || (j = await Ee(q)), !J(j)) return R.error("create-project: invalid port range", { range: `${j.start}-${j.end}` }), 2;
|
|
743
|
+
console.log(`\n→ creating ${x}`), y(x, { recursive: !0 }), await X(x, b, j);
|
|
744
|
+
let M = async (t, n) => {
|
|
745
|
+
let r = g(x, t), a = null;
|
|
746
|
+
if (n.kind === "web" && (a = await Z(x), a === null)) throw Error(`port range ${j.start}-${j.end} exhausted before app '${t}' could be allocated`);
|
|
747
|
+
let o = i(t, b, a ?? 0);
|
|
748
|
+
console.log(`→ ${n.id} → ${t}/${a === null ? "" : ` (port ${a})`}`);
|
|
749
|
+
let { written: s } = await e({
|
|
750
|
+
template: n,
|
|
751
|
+
targetDir: r,
|
|
752
|
+
vars: o
|
|
753
|
+
});
|
|
754
|
+
for (let e of s) console.log(` · ${t}/${e}`);
|
|
755
|
+
await ge(x, t, n.kind, a === null ? void 0 : a);
|
|
756
|
+
};
|
|
757
|
+
T && await M("api", T), k && await M("web", k), A && await M("mobile", A), await l(c, {
|
|
758
|
+
appTemplates: [
|
|
759
|
+
...T ? [{
|
|
760
|
+
dir: g(x, "api"),
|
|
761
|
+
template: T.id
|
|
762
|
+
}] : [],
|
|
763
|
+
...k ? [{
|
|
764
|
+
dir: g(x, "web"),
|
|
765
|
+
template: k.id
|
|
766
|
+
}] : [],
|
|
767
|
+
...A ? [{
|
|
768
|
+
dir: g(x, "mobile"),
|
|
769
|
+
template: A.id
|
|
770
|
+
}] : []
|
|
771
|
+
],
|
|
772
|
+
preferPointer: !0
|
|
773
|
+
}).catch(() => void 0);
|
|
774
|
+
let N = null;
|
|
775
|
+
if (_.baseline) {
|
|
776
|
+
let e = await p(_.baseline);
|
|
777
|
+
e ? N = e.id : R.warn("unknown baseline — skipping baseline step", {
|
|
778
|
+
requested: _.baseline,
|
|
779
|
+
available: (await d()).map((e) => e.id)
|
|
780
|
+
});
|
|
781
|
+
} else _.noInput || (N = await Te());
|
|
782
|
+
if (N) {
|
|
783
|
+
console.log(), console.log(`→ applying baseline '${N}' at workspace root ${c}`);
|
|
784
|
+
try {
|
|
785
|
+
let e = await f({
|
|
786
|
+
root: c,
|
|
787
|
+
baselineId: N,
|
|
788
|
+
projectName: b,
|
|
789
|
+
quiet: !0
|
|
790
|
+
});
|
|
791
|
+
console.log(` · ${e.written.length} files written, ${e.removed.length} removed`), e.backupDir && console.log(` · backup: ${e.backupDir.replace(c + "/", "")}`), e.previousBaselineId && e.previousBaselineId !== N && console.log(` · switched from previous baseline '${e.previousBaselineId}'`);
|
|
792
|
+
} catch (e) {
|
|
793
|
+
R.error("baseline apply failed", {
|
|
794
|
+
baselineId: N,
|
|
795
|
+
error: e instanceof Error ? e.message : String(e)
|
|
796
|
+
});
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
if (_.cache === "redis") {
|
|
800
|
+
console.log(), console.log("→ enabling Redis cache backend");
|
|
801
|
+
try {
|
|
802
|
+
let e = await u(c);
|
|
803
|
+
for (let t of e) console.log(` ✓ ${t}`);
|
|
804
|
+
} catch (e) {
|
|
805
|
+
R.error("cache enable failed", { error: e instanceof Error ? e.message : String(e) });
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
return console.log(), console.log(`✓ project '${b}' scaffolded under apps/${b}/.`), N && console.log(` baseline '${N}' applied at workspace root.`), o["no-register"] !== !0 && await be(x, b), console.log(), console.log("Next steps:"), console.log(" pnpm install"), console.log(" pnpm dev # every app in this workspace, in parallel"), T && console.log(` # or one at a time: pnpm --filter @${b}/api dev`), k && console.log(` # pnpm --filter @${b}/web dev`), A && (console.log(` cd apps/${b}/mobile && pnpm ios # Expo — owns its own dev loop, not \`voltro dev\``), console.log(" # point EXPO_PUBLIC_API_URL at the api's LAN address for a device/simulator")), N === "compose" ? (console.log(" pnpm db:up # postgres only (native dev)"), console.log(" pnpm dev:docker # OR full-stack docker dev")) : N === "helm" && (console.log(" pnpm helm:lint # verify the chart"), console.log(" pnpm helm:install:dev # deploy to a dev cluster")), 0;
|
|
809
|
+
}, $ = (e, t) => (n) => c(C.tryPromise({
|
|
810
|
+
try: () => e(n),
|
|
811
|
+
catch: (e) => e
|
|
812
|
+
}).pipe(C.orDie), { scope: t }), Oe = $(me, "voltro:list-templates"), ke = $(Se, "voltro:add-app"), Ae = $(De, "voltro:create-project");
|
|
813
|
+
//#endregion
|
|
814
|
+
export { z as a, Ae as c, L as d, P as f, W as i, Oe as l, V as n, xe as o, B as r, ke as s, H as t, _e as u };
|