@stacksjs/actions 0.70.23 → 0.70.25
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/chunk-2gh7kgpc.js +3 -0
- package/dist/chunk-2kaj93p5.js +3 -0
- package/dist/chunk-2qchdrf9.js +3 -0
- package/dist/chunk-3086k7zk.js +184 -0
- package/dist/chunk-3beht8ja.js +130 -0
- package/dist/chunk-60qjz7zb.js +3 -0
- package/dist/chunk-67y94dzt.js +658 -0
- package/dist/chunk-6x1m5rkr.js +17 -0
- package/dist/chunk-7bpdkc40.js +714 -0
- package/dist/chunk-96b7fcmd.js +3 -0
- package/dist/chunk-aw6d8zr3.js +7 -0
- package/dist/chunk-c8qt2xst.js +3 -0
- package/dist/chunk-d4srk6ma.js +3 -0
- package/dist/chunk-e9tcbk71.js +1 -0
- package/dist/chunk-gt77jmb5.js +46 -0
- package/dist/chunk-h93n2j40.js +95 -0
- package/dist/chunk-jd1yzkq5.js +3 -0
- package/dist/chunk-kzhgexj4.js +3 -0
- package/dist/chunk-n1y0gpv6.js +3 -0
- package/dist/chunk-n2fd1d0m.js +3 -0
- package/dist/chunk-n2x7v39b.js +5 -0
- package/dist/chunk-rdajkt2s.js +88 -0
- package/dist/chunk-s735m9mg.js +1 -0
- package/dist/chunk-schcaf73.js +3 -0
- package/dist/chunk-tc935b45.js +93 -0
- package/dist/chunk-v0wnrnaa.js +7 -0
- package/dist/chunk-w418anbq.js +5 -0
- package/dist/chunk-wnrgcx3d.js +114 -0
- package/dist/chunk-wv5yb5wb.js +101 -0
- package/dist/chunk-x471rxrn.js +7 -0
- package/dist/chunk-xg9xscqz.js +1 -0
- package/dist/src/action.d.ts +60 -0
- package/dist/src/action.js +2 -0
- package/dist/src/actions.d.ts +2 -0
- package/dist/src/actions.js +2 -0
- package/dist/src/add.d.ts +6 -0
- package/dist/src/add.js +2 -0
- package/dist/src/ai/request-model-access.d.ts +1 -0
- package/dist/src/ai/request-model-access.js +2 -0
- package/dist/src/auth/client.d.ts +1 -0
- package/dist/src/auth/client.js +3 -0
- package/dist/src/auth/prune.d.ts +1 -0
- package/dist/src/auth/prune.js +2 -0
- package/dist/src/auth/setup.d.ts +1 -0
- package/dist/src/auth/setup.js +148 -0
- package/dist/src/auth/token.d.ts +1 -0
- package/dist/src/auth/token.js +2 -0
- package/dist/src/build/cli.d.ts +1 -0
- package/dist/src/build/cli.js +2 -0
- package/dist/src/build/component-libs.d.ts +1 -0
- package/dist/src/build/component-libs.js +2 -0
- package/dist/src/build/core.d.ts +1 -0
- package/dist/src/build/core.js +2 -0
- package/dist/src/build/desktop.d.ts +1 -0
- package/dist/src/build/desktop.js +2 -0
- package/dist/src/build/docs.d.ts +1 -0
- package/dist/src/build/docs.js +2 -0
- package/dist/src/build/server.d.ts +1 -0
- package/dist/src/build/server.js +2 -0
- package/dist/src/build/stacks.d.ts +1 -0
- package/dist/src/build/stacks.js +2 -0
- package/dist/src/build/views.d.ts +1 -0
- package/dist/src/build/views.js +2 -0
- package/dist/{build.d.ts → src/build.d.ts} +1 -2
- package/dist/src/build.js +2 -0
- package/dist/src/bump.d.ts +1 -0
- package/dist/src/bump.js +2 -0
- package/dist/src/cdn/invalidate-cache.d.ts +1 -0
- package/dist/src/cdn/invalidate-cache.js +1 -0
- package/dist/src/changelog.d.ts +1 -0
- package/dist/src/changelog.js +2 -0
- package/dist/src/check/ports.d.ts +1 -0
- package/dist/src/check/ports.js +2 -0
- package/dist/src/clean.d.ts +1 -0
- package/dist/src/clean.js +2 -0
- package/dist/{commit.d.ts → src/commit.d.ts} +1 -2
- package/dist/src/commit.js +2 -0
- package/dist/src/copy-types.d.ts +1 -0
- package/dist/src/copy-types.js +3 -0
- package/dist/src/database/seed.d.ts +1 -0
- package/dist/src/database/seed.js +2 -0
- package/dist/src/deploy/create-receipt-rule.d.ts +1 -0
- package/dist/src/deploy/create-receipt-rule.js +2 -0
- package/dist/src/deploy/index.d.ts +1 -0
- package/dist/src/deploy/index.js +307 -0
- package/dist/src/dev/api.d.ts +1 -0
- package/dist/src/dev/api.js +6 -0
- package/dist/src/dev/components.d.ts +1 -0
- package/dist/src/dev/components.js +2 -0
- package/dist/src/dev/dashboard-globals.d.ts +4 -0
- package/dist/src/dev/dashboard-globals.js +3 -0
- package/dist/src/dev/dashboard-utils.d.ts +126 -0
- package/dist/src/dev/dashboard-utils.js +2 -0
- package/dist/src/dev/dashboard.d.ts +12 -0
- package/dist/src/dev/dashboard.js +8 -0
- package/dist/src/dev/desktop.d.ts +1 -0
- package/dist/src/dev/desktop.js +2 -0
- package/dist/src/dev/docs.d.ts +1 -0
- package/dist/src/dev/docs.js +2 -0
- package/dist/src/dev/index.d.ts +10 -0
- package/dist/src/dev/index.js +2 -0
- package/dist/src/dev/system-tray.d.ts +1 -0
- package/dist/src/dev/system-tray.js +2 -0
- package/dist/src/dev/views.d.ts +1 -0
- package/dist/src/dev/views.js +2 -0
- package/dist/src/discover-packages.d.ts +18 -0
- package/dist/src/discover-packages.js +2 -0
- package/dist/src/domains/add.d.ts +1 -0
- package/dist/src/domains/add.js +2 -0
- package/dist/src/domains/purchase.d.ts +1 -0
- package/dist/src/domains/purchase.js +2 -0
- package/dist/src/domains/remove.d.ts +1 -0
- package/dist/src/domains/remove.js +2 -0
- package/dist/{examples.d.ts → src/examples.d.ts} +1 -2
- package/dist/src/examples.js +2 -0
- package/dist/src/find-projects.d.ts +1 -0
- package/dist/src/find-projects.js +2 -0
- package/dist/src/fresh.d.ts +1 -0
- package/dist/src/fresh.js +2 -0
- package/dist/src/generate/action-types.d.ts +1 -0
- package/dist/src/generate/action-types.js +8 -0
- package/dist/src/generate/component-meta.d.ts +1 -0
- package/dist/src/generate/component-meta.js +3 -0
- package/dist/src/generate/custom-cli-file.d.ts +1 -0
- package/dist/src/generate/custom-cli-file.js +4 -0
- package/dist/src/generate/env-files.d.ts +1 -0
- package/dist/src/generate/env-files.js +26 -0
- package/dist/src/generate/ide-helpers.d.ts +1 -0
- package/dist/src/generate/ide-helpers.js +3 -0
- package/dist/src/generate/index.d.ts +36 -0
- package/dist/src/generate/index.js +2 -0
- package/dist/src/generate/lib-entries.d.ts +1 -0
- package/dist/src/generate/lib-entries.js +3 -0
- package/dist/src/generate/pantry-file.d.ts +1 -0
- package/dist/src/generate/pantry-file.js +2 -0
- package/dist/src/generate/symlink-core.d.ts +1 -0
- package/dist/src/generate/symlink-core.js +2 -0
- package/dist/src/generate/types.d.ts +1 -0
- package/dist/src/generate/types.js +2 -0
- package/dist/src/generate/vscode-custom-data.d.ts +1 -0
- package/dist/src/generate/vscode-custom-data.js +3 -0
- package/dist/src/generate/web-types.d.ts +1 -0
- package/dist/src/generate/web-types.js +1 -0
- package/dist/src/helpers/component-meta.d.ts +26 -0
- package/dist/src/helpers/component-meta.js +2 -0
- package/dist/src/helpers/index.d.ts +4 -0
- package/dist/src/helpers/index.js +2 -0
- package/dist/{lib-entries.d.ts → src/helpers/lib-entries.d.ts} +9 -5
- package/dist/src/helpers/lib-entries.js +2 -0
- package/dist/src/helpers/package-json.d.ts +2 -0
- package/dist/src/helpers/package-json.js +43 -0
- package/dist/src/helpers/utils.d.ts +23 -0
- package/dist/src/helpers/utils.js +2 -0
- package/dist/{vscode-custom-data.d.ts → src/helpers/vscode-custom-data.d.ts} +1 -1
- package/dist/src/helpers/vscode-custom-data.js +2 -0
- package/dist/src/index.d.ts +42 -0
- package/dist/src/index.js +2 -0
- package/dist/src/key-generate.d.ts +1 -0
- package/dist/src/key-generate.js +2 -0
- package/dist/src/lint/fix.d.ts +1 -0
- package/dist/src/lint/fix.js +4 -0
- package/dist/src/lint/index.d.ts +1 -0
- package/dist/src/lint/index.js +2 -0
- package/dist/src/make-command.d.ts +10 -0
- package/dist/src/make-command.js +2 -0
- package/dist/src/make-job.d.ts +5 -0
- package/dist/src/make-job.js +2 -0
- package/dist/src/make-policy.d.ts +10 -0
- package/dist/src/make-policy.js +2 -0
- package/dist/src/make-resource.d.ts +10 -0
- package/dist/src/make-resource.js +2 -0
- package/dist/{make.d.ts → src/make.d.ts} +11 -9
- package/dist/src/make.js +2 -0
- package/dist/src/migrate/database.d.ts +1 -0
- package/dist/src/migrate/database.js +2 -0
- package/dist/src/migrate/fresh.d.ts +1 -0
- package/dist/src/migrate/fresh.js +2 -0
- package/dist/src/orm/base.d.ts +1 -0
- package/dist/src/orm/base.js +2 -0
- package/dist/src/orm/test.d.ts +1 -0
- package/dist/src/orm/test.js +1 -0
- package/dist/src/prepublish.d.ts +1 -0
- package/dist/src/prepublish.js +2 -0
- package/dist/src/queue/clear.d.ts +1 -0
- package/dist/src/queue/clear.js +2 -0
- package/dist/src/queue/failed.d.ts +1 -0
- package/dist/src/queue/failed.js +5 -0
- package/dist/src/queue/flush.d.ts +1 -0
- package/dist/src/queue/flush.js +3 -0
- package/dist/src/queue/inspect.d.ts +1 -0
- package/dist/src/queue/inspect.js +8 -0
- package/dist/src/queue/monitor.d.ts +1 -0
- package/dist/src/queue/monitor.js +7 -0
- package/dist/src/queue/retry.d.ts +1 -0
- package/dist/src/queue/retry.js +2 -0
- package/dist/src/queue/schedule-list.d.ts +1 -0
- package/dist/src/queue/schedule-list.js +5 -0
- package/dist/src/queue/schedule.d.ts +1 -0
- package/dist/src/queue/schedule.js +2 -0
- package/dist/src/queue/status.d.ts +1 -0
- package/dist/src/queue/status.js +5 -0
- package/dist/src/queue/table.d.ts +1 -0
- package/dist/src/queue/table.js +2 -0
- package/dist/src/queue/work.d.ts +1 -0
- package/dist/src/queue/work.js +2 -0
- package/dist/src/release.d.ts +1 -0
- package/dist/src/release.js +3 -0
- package/dist/src/route/list.d.ts +1 -0
- package/dist/src/route/list.js +3 -0
- package/dist/src/run-action.d.ts +2 -0
- package/dist/src/run-action.js +2 -0
- package/dist/src/saas/setup.d.ts +1 -0
- package/dist/src/saas/setup.js +2 -0
- package/dist/src/scaffold-crud.d.ts +25 -0
- package/dist/src/scaffold-crud.js +2 -0
- package/dist/src/schedule/run.d.ts +1 -0
- package/dist/src/schedule/run.js +2 -0
- package/dist/src/search/flush.d.ts +1 -0
- package/dist/src/search/flush.js +2 -0
- package/dist/src/search/import.d.ts +1 -0
- package/dist/src/search/import.js +2 -0
- package/dist/src/search/settings-list.d.ts +1 -0
- package/dist/src/search/settings-list.js +2 -0
- package/dist/src/search/settings.d.ts +1 -0
- package/dist/src/search/settings.js +2 -0
- package/dist/src/serve/api.d.ts +1 -0
- package/dist/src/serve/api.js +2 -0
- package/dist/src/setup/index.d.ts +1 -0
- package/dist/src/setup/index.js +2 -0
- package/dist/src/setup/ssl.d.ts +38 -0
- package/dist/src/setup/ssl.js +2 -0
- package/dist/src/stacks.d.ts +4 -0
- package/dist/src/stacks.js +2 -0
- package/dist/src/templates.d.ts +8 -0
- package/dist/src/templates.js +2 -0
- package/dist/src/test/feature.d.ts +1 -0
- package/dist/src/test/feature.js +2 -0
- package/dist/src/test/index.d.ts +1 -0
- package/dist/src/test/index.js +2 -0
- package/dist/src/test/ui.d.ts +1 -0
- package/dist/src/test/ui.js +2 -0
- package/dist/src/test/unit.d.ts +1 -0
- package/dist/src/test/unit.js +2 -0
- package/dist/src/typecheck.d.ts +1 -0
- package/dist/src/typecheck.js +2 -0
- package/dist/{types.d.ts → src/types.d.ts} +1 -2
- package/dist/src/types.js +2 -0
- package/dist/src/upgrade/binary.d.ts +1 -0
- package/dist/src/upgrade/binary.js +2 -0
- package/dist/src/upgrade/bun.d.ts +1 -0
- package/dist/src/upgrade/bun.js +1 -0
- package/dist/src/upgrade/dependencies.d.ts +1 -0
- package/dist/src/upgrade/dependencies.js +2 -0
- package/dist/src/upgrade/framework-utils.d.ts +102 -0
- package/dist/src/upgrade/framework-utils.js +2 -0
- package/dist/src/upgrade/framework.d.ts +1 -0
- package/dist/src/upgrade/framework.js +7 -0
- package/dist/src/upgrade/index.d.ts +1 -0
- package/dist/src/upgrade/index.js +2 -0
- package/dist/src/upgrade/shell.d.ts +1 -0
- package/dist/src/upgrade/shell.js +5 -0
- package/dist/src/upgrade.d.ts +7 -0
- package/dist/src/upgrade.js +2 -0
- package/package.json +39 -23
- package/dist/action-types.d.ts +0 -9
- package/dist/action.d.ts +0 -64
- package/dist/actions.d.ts +0 -2
- package/dist/add.d.ts +0 -5
- package/dist/add.js +0 -33
- package/dist/api.d.ts +0 -1
- package/dist/binary.d.ts +0 -2
- package/dist/build/component-libs.js +0 -9
- package/dist/build/core.js +0 -23
- package/dist/build/stacks.js +0 -8
- package/dist/build.js +0 -108
- package/dist/bump.d.ts +0 -2
- package/dist/bump.js +0 -17
- package/dist/changelog.d.ts +0 -2
- package/dist/changelog.js +0 -17
- package/dist/chunk-2dvnt46s.js +0 -7657
- package/dist/chunk-494jp8d5.js +0 -54
- package/dist/chunk-4axj3j8y.js +0 -34
- package/dist/chunk-56ar3gp7.js +0 -3823
- package/dist/chunk-76zhb40c.js +0 -92
- package/dist/chunk-7s5qcjkt.js +0 -105
- package/dist/chunk-9v6qtbez.js +0 -45
- package/dist/chunk-a13x0e43.js +0 -1180
- package/dist/chunk-a7k3cdby.js +0 -2266
- package/dist/chunk-b5g5w1hh.js +0 -1482
- package/dist/chunk-bf8bq8pc.js +0 -205
- package/dist/chunk-ccnf3w1b.js +0 -2228
- package/dist/chunk-dvkgakrr.js +0 -1283
- package/dist/chunk-frw3va9v.js +0 -69
- package/dist/chunk-hvfeg6n6.js +0 -179248
- package/dist/chunk-mdj7x1vs.js +0 -790
- package/dist/chunk-mdqphqep.js +0 -438
- package/dist/chunk-mmskr8ar.js +0 -212
- package/dist/chunk-nrr524a7.js +0 -658
- package/dist/chunk-p0c688mg.js +0 -729
- package/dist/chunk-pacq2bz6.js +0 -902
- package/dist/chunk-psa9yf21.js +0 -72
- package/dist/chunk-q81mf99q.js +0 -169
- package/dist/chunk-q9dmga3k.js +0 -11
- package/dist/chunk-qhh0v93n.js +0 -73
- package/dist/chunk-qkm8e752.js +0 -51
- package/dist/chunk-saqpg5nd.js +0 -118
- package/dist/chunk-t5em30ak.js +0 -379
- package/dist/chunk-veja9rez.js +0 -5764
- package/dist/chunk-w4bfpxhm.js +0 -311
- package/dist/chunk-w6fdq4hk.js +0 -14425
- package/dist/chunk-wkwtsvym.js +0 -477
- package/dist/chunk-xgsmf4cy.js +0 -410
- package/dist/chunk-ykb33tkv.js +0 -177
- package/dist/chunk-ze46550n.js +0 -0
- package/dist/chunk-zzerxbrm.js +0 -107
- package/dist/clean.js +0 -6
- package/dist/commit.js +0 -22
- package/dist/component-meta.d.ts +0 -15
- package/dist/components.d.ts +0 -3
- package/dist/copy-types.d.ts +0 -1
- package/dist/copy-types.js +0 -14
- package/dist/core.d.ts +0 -1
- package/dist/create-receipt-rule.d.ts +0 -4
- package/dist/database/seed.js +0 -30
- package/dist/database.d.ts +0 -2
- package/dist/deploy/index.js +0 -48
- package/dist/dev/components.js +0 -11
- package/dist/dev/docs.js +0 -7
- package/dist/dev/index.js +0 -58
- package/dist/env-files.d.ts +0 -9
- package/dist/examples.js +0 -46
- package/dist/feature.d.ts +0 -2
- package/dist/find-projects.d.ts +0 -1
- package/dist/fix.d.ts +0 -1
- package/dist/flush.d.ts +0 -2
- package/dist/fresh.d.ts +0 -1
- package/dist/fresh.js +0 -21
- package/dist/generate/component-meta.js +0 -17
- package/dist/generate/ide-helpers.js +0 -18
- package/dist/generate/index.js +0 -216
- package/dist/generate/lib-entries.js +0 -30
- package/dist/generate/vscode-custom-data.js +0 -17
- package/dist/helpers/component-meta.js +0 -204227
- package/dist/helpers/lib-entries.js +0 -122
- package/dist/helpers/package-json.js +0 -96
- package/dist/helpers/utils.js +0 -76
- package/dist/helpers/vscode-custom-data.js +0 -43
- package/dist/import.d.ts +0 -2
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -172
- package/dist/key-generate.js +0 -15
- package/dist/lint/fix.js +0 -18
- package/dist/lint/index.js +0 -5
- package/dist/list.d.ts +0 -1
- package/dist/make.js +0 -349
- package/dist/package-json.d.ts +0 -92
- package/dist/pkgx-file.d.ts +0 -8
- package/dist/ports.d.ts +0 -2
- package/dist/prepublish.d.ts +0 -1
- package/dist/prepublish.js +0 -17
- package/dist/purchase.d.ts +0 -6
- package/dist/release.js +0 -49
- package/dist/remove.d.ts +0 -6
- package/dist/request-model-access.d.ts +0 -1
- package/dist/run.d.ts +0 -1
- package/dist/settings-list.d.ts +0 -2
- package/dist/settings.d.ts +0 -1
- package/dist/setup.d.ts +0 -1
- package/dist/shell.d.ts +0 -2
- package/dist/table.d.ts +0 -1
- package/dist/test/feature.js +0 -14
- package/dist/test/index.js +0 -14
- package/dist/test/ui.js +0 -6
- package/dist/test/unit.js +0 -14
- package/dist/typecheck.js +0 -6
- package/dist/types.js +0 -23
- package/dist/unit.d.ts +0 -2
- package/dist/upgrade/dependencies.js +0 -8
- package/dist/upgrade/index.js +0 -22
- package/dist/upgrade.d.ts +0 -5
- package/dist/upgrade.js +0 -50
- package/dist/utils.d.ts +0 -75
- package/dist/work.d.ts +0 -3
- /package/dist/{upgrade/framework.js → chunk-cdk2r2jd.js} +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{aa as R}from"./chunk-3086k7zk.js";import{Ya as L}from"./chunk-n1y0gpv6.js";import{gb as b}from"./chunk-96b7fcmd.js";import J from"process";import{italic as X,runCommand as V}from"@stacksjs/cli";import{ExitCode as Y}from"@stacksjs/types";import{localUrl as j}from"@stacksjs/config";import{Action as P}from"@stacksjs/enums";import{handleError as W}from"@stacksjs/error-handling";import{log as B}from"@stacksjs/logging";import{frameworkPath as D,path as Z,resolve as U}from"@stacksjs/path";import{createFolder as _,doesFolderExist as K,writeTextFile as w}from"@stacksjs/storage";import{template as f}from"@stacksjs/strings";var M=!1;function Iq(z){M=Boolean(z)}function Jq(){return M}function x(z,...q){return f(R[z],...q)}async function A(z,q){if(M){let G=q.split(`
|
|
3
|
+
`),H=G.slice(0,60).map((I)=>` ${I}`).join(`
|
|
4
|
+
`),Q=G.length>60?`
|
|
5
|
+
${X(`\u2026 ${G.length-60} more lines elided`)}`:"";B.info(`[dry-run] would write ${z} (${G.length} lines)`),J.stdout.write(`${H}${Q}
|
|
6
|
+
|
|
7
|
+
`);return}await w({path:z,data:q})}async function $(z,q,...G){await A(z,x(q,...G))}async function T(z){if(z.component)await u(z);if(z.database)y(z);if(z.function)await h(z);if(z.language)await g(z);if(z.middleware)await r(z);if(z.notification)await F(z);if(z.page)await N(z);if(z.stack)await m(z)}async function Qq(z){return await T(z)}async function Xq(z){try{let q=z.name;B.info("Creating your action..."),await C(z),B.success(`Created ${X(q)} action`)}catch(q){B.error("There was an error creating your action",q),J.exit(Y.FatalError)}}async function u(z){try{let q=z.name;B.info("Creating your component..."),await E(z),B.success(`Created ${X(q)} component`)}catch(q){B.error("There was an error creating your component",q),J.exit(Y.FatalError)}}async function C(z){let q=z.name,G=z,H=Boolean(G.withValidation||z["with-validation"]),Q=Boolean(G.withAuth||z["with-auth"]),I=H&&Q?"actionWithBoth":H?"actionWithValidation":Q?"actionWithAuth":"action";await $(Z.userActionsPath(q),I,q)}async function E(z){let q=z.name;await $(Z.userComponentsPath(`${q}.vue`),"component",q)}function y(z){try{let q=z.name;B.info(`Creating your ${X(q)} database...`),O(z),B.success(`Created ${X(q)} database`)}catch(q){B.error("There was an error creating your database",q),J.exit(Y.FatalError)}}function O(z){B.debug("createDatabase options",z)}function Yq(z){try{let q=z.name;B.info(`Creating your ${X(q)} factory...`),O(z),B.success(`Created ${X(q)} factory`)}catch(q){B.error("There was an error creating your factory",q),J.exit(Y.FatalError)}}async function Zq(z){let q=z.name||"MyFactory",G=q.endsWith("Factory")?q:`${q}Factory`;try{let{path:H}=await import("@stacksjs/path"),I=`${H.userDatabasePath("factories")}/${G}.ts`;if(await Bun.file(I).exists()){B.warn(`Factory ${G} already exists at ${I}`);return}let S=q.replace(/Factory$/,""),v=`import type { ${S}Model } from '@stacksjs/orm'
|
|
8
|
+
|
|
9
|
+
export function ${G}(): Partial<${S}Model> {
|
|
10
|
+
return {
|
|
11
|
+
// Define your factory attributes here
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default ${G}
|
|
16
|
+
`;await A(I,v),B.success(`Created factory: ${I}`)}catch(H){throw B.error(`Failed to create factory ${G}`,H),H}}async function F(z){try{let q=z.name;B.info(`Creating your ${X(q)} notification...`),await l(z),B.success(`Created ${X(q)} notification`)}catch(q){B.error("There was an error creating your notification",q),J.exit(Y.FatalError)}}async function N(z){try{let q=z.name;B.info("Creating your page..."),await k(z),B.success(`Created ${q} page`)}catch(q){B.error("There was an error creating your page",q),J.exit(Y.FatalError)}}async function k(z){let q=z.name;await $(Z.userViewsPath(`${q}.vue`),"page",q)}async function h(z){try{let q=z.name;B.info("Creating your function..."),await d(z),B.success(`Created ${q} function`)}catch(q){B.error("There was an error creating your function",q),J.exit(Y.FatalError)}}async function d(z){let q=z.name;await $(Z.userFunctionsPath(`${q}.ts`),"function",q)}async function g(z){try{let q=z.name;B.info("Creating your translation file..."),await c(z),B.success(`Created ${q} translation file`)}catch(q){B.error("There was an error creating your language.",q),J.exit(Y.FatalError)}}async function c(z){let q=z.name;await $(Z.resourcesPath(`lang/${q}.yml`),"language",q)}async function m(z){try{let q=z.name;B.info(`Creating your ${q} stack...`);let G=U(J.cwd(),q);if(K(G))B.error(`Directory "${q}" already exists`),J.exit(Y.FatalError);await _(G);let H=["app/Actions","app/Models","config","database/migrations","resources/views","resources/components","resources/functions","routes","public"];for(let I of H)await _(U(G,I));let Q=q.replace(/^@[^/]+\//,"").replace(/-stack$/,"");await $(U(G,"package.json"),"stackPackageJson",q,Q),B.success(`Successfully scaffolded your "${q}" stack`),B.info(""),B.info(` cd ${q}`),B.info(" # Add your models, actions, views, etc."),B.info(" # Then publish: bun publish"),B.info(""),B.info(" Users install it with:"),B.info(` buddy stack:install ${q}`)}catch(q){B.error("There was an error creating your stack",q),J.exit(Y.FatalError)}}async function l(z){let q=z.name;try{let G="EmailOptions";if(!K("notifications"))await _("./notifications");if(z.chat)G="ChatOptions";if(z.sms)G="SMSOptions";return await $(Z.userNotificationsPath(`${q}.ts`),"notification",G),!0}catch(G){return W("Error creating notification",G),!1}}async function $q(z){let q=z.name,G="dummy-name";if(!q[0])throw Error("options.name is required and cannot be empty");let H=q[0].toUpperCase()+q.slice(1),Q=D(`database/migrations/${H}.ts`);try{await $(Q,"migration","dummy-name"),B.success(`Successfully created your migration file at stacks/database/migrations/${H}.ts`)}catch(I){B.error(I)}}async function Uq(){await L(P.QueueTable)}async function _q(){let z=await j();B.info("Creating SSL certificate..."),await V(`tlsx ${z}`,{cwd:Z.storagePath("keys")}),B.success("Certificate created"),B.info("Installing SSL certificate..."),await V("tlsx -install",{cwd:Z.storagePath("keys")}),B.success("Certificate installed")}async function Mq(z){let q=z.name;if(!q[0])throw Error("options.name is required and cannot be empty");let G=q[0].toUpperCase()+q.slice(1),H=G.replace(/([A-Z])/g,"_$1").toLowerCase().replace(/^_/,"").replace(/([^s])$/,"$1s"),Q=Z.userModelsPath(`${G}.ts`);try{await $(Q,"model",G,H),B.success(`Model created: ${X(`app/Models/${G}.ts`)}`)}catch(I){B.error(I)}}async function r(z){let q=z.name;await $(Z.userMiddlewarePath(`${q}.ts`),"middleware",q)}
|
|
17
|
+
export{Iq as C,Jq as D,T as E,Qq as F,Xq as G,u as H,C as I,E as J,y as K,O as L,Yq as M,Zq as N,F as O,N as P,k as Q,h as R,d as S,g as T,c as U,m as V,l as W,$q as X,Uq as Y,_q as Z,Mq as _,r as $};
|