@stacksjs/actions 0.70.22 → 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-0m948f1p.js +0 -2177
- package/dist/chunk-23btgw5e.js +0 -1402
- package/dist/chunk-2dvnt46s.js +0 -7657
- package/dist/chunk-3y8t4qyf.js +0 -72
- package/dist/chunk-494jp8d5.js +0 -54
- package/dist/chunk-5wdfth6e.js +0 -901
- package/dist/chunk-8qsrwjam.js +0 -92
- package/dist/chunk-90y2wmyz.js +0 -2376
- package/dist/chunk-92e6scf8.js +0 -379
- package/dist/chunk-9v6qtbez.js +0 -45
- package/dist/chunk-a13x0e43.js +0 -1180
- package/dist/chunk-atahpwz7.js +0 -5762
- package/dist/chunk-bz3nmjmp.js +0 -212
- package/dist/chunk-ddw2jq8f.js +0 -179250
- package/dist/chunk-frw3va9v.js +0 -69
- package/dist/chunk-hqmjfnnn.js +0 -105
- package/dist/chunk-jq06qn43.js +0 -410
- package/dist/chunk-mbvdyeyw.js +0 -50
- package/dist/chunk-mdj7x1vs.js +0 -790
- package/dist/chunk-mdqphqep.js +0 -438
- package/dist/chunk-ny592jcd.js +0 -133
- package/dist/chunk-p0c688mg.js +0 -729
- package/dist/chunk-q9dmga3k.js +0 -11
- package/dist/chunk-qhh0v93n.js +0 -73
- package/dist/chunk-qka5w6cv.js +0 -1282
- package/dist/chunk-qkm8e752.js +0 -51
- package/dist/chunk-rbsehxzg.js +0 -65
- package/dist/chunk-rfdmx5yh.js +0 -170
- package/dist/chunk-s3xxrvrk.js +0 -311
- package/dist/chunk-w6fdq4hk.js +0 -14425
- package/dist/chunk-wkwtsvym.js +0 -477
- package/dist/chunk-y08qabyb.js +0 -3821
- package/dist/chunk-yyvh669b.js +0 -197
- package/dist/chunk-ze46550n.js +0 -0
- package/dist/chunk-zhrbz0qv.js +0 -661
- 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,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve the target channel and git ref from CLI options and persisted channel.
|
|
3
|
+
* Priority: --version > --canary > --stable > persisted channel
|
|
4
|
+
*/
|
|
5
|
+
export declare function resolveUpgradeContext(options: {
|
|
6
|
+
version?: string
|
|
7
|
+
canary?: boolean
|
|
8
|
+
stable?: boolean
|
|
9
|
+
}, currentChannel: 'stable' | 'canary'): UpgradeContext;
|
|
10
|
+
/**
|
|
11
|
+
* Build the gitit template string for a path under the stacks repo.
|
|
12
|
+
* `subPath` is relative to the repo root (e.g. `storage/framework/core`).
|
|
13
|
+
*/
|
|
14
|
+
export declare function buildTemplateString(ref: string, subPath?: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Read a version from a package.json file. Returns null on any error.
|
|
17
|
+
*/
|
|
18
|
+
export declare function readVersion(pkgPath: string): string | null;
|
|
19
|
+
/**
|
|
20
|
+
* Read the persisted channel from the channel file.
|
|
21
|
+
*/
|
|
22
|
+
export declare function readChannel(channelFilePath: string): 'stable' | 'canary';
|
|
23
|
+
/**
|
|
24
|
+
* Persist the channel to the channel file.
|
|
25
|
+
*/
|
|
26
|
+
export declare function writeChannel(channelFilePath: string, ch: 'stable' | 'canary'): void;
|
|
27
|
+
/**
|
|
28
|
+
* Determine the user-facing log message for the upgrade action.
|
|
29
|
+
*/
|
|
30
|
+
export declare function resolveUpgradeMessage(ctx: UpgradeContext, currentChannel: 'stable' | 'canary', isStableFlag: boolean): string;
|
|
31
|
+
/**
|
|
32
|
+
* Determine the user-facing success message after an upgrade.
|
|
33
|
+
*/
|
|
34
|
+
export declare function resolveSuccessMessage(ctx: UpgradeContext, currentVersion: string | null, newVersion: string | null, currentChannel: 'stable' | 'canary', force: boolean): string;
|
|
35
|
+
/**
|
|
36
|
+
* Auto-detect a local stacks checkout the user might be developing against.
|
|
37
|
+
*
|
|
38
|
+
* Order:
|
|
39
|
+
* 1. `STACKS_LOCAL_PATH` env var (explicit)
|
|
40
|
+
* 2. Sibling directory: `<project>/../stacks`
|
|
41
|
+
* 3. `~/Code/stacks` and a few common dev paths
|
|
42
|
+
*
|
|
43
|
+
* Returns null if nothing looks like a stacks checkout. We confirm by checking
|
|
44
|
+
* for `storage/framework/core/buddy/package.json` — the canonical marker.
|
|
45
|
+
*/
|
|
46
|
+
export declare function detectLocalStacks(projectRoot: string): string | null;
|
|
47
|
+
/**
|
|
48
|
+
* Walk a directory recursively and return a Map of relative-path → entry,
|
|
49
|
+
* with each entry's size + content hash captured at the time of the call.
|
|
50
|
+
* Hashing the entire tree at snapshot time (rather than at diff time) means
|
|
51
|
+
* the "before" snapshot stays valid even after `cpSync` overwrites the
|
|
52
|
+
* files in place.
|
|
53
|
+
*
|
|
54
|
+
* Async because we read each file via `Bun.file().arrayBuffer()`. On a
|
|
55
|
+
* 3000-file framework tree this completes in ~50ms — `Bun.hash` is xxh3,
|
|
56
|
+
* not a crypto hash, and the I/O is fully parallelized.
|
|
57
|
+
*/
|
|
58
|
+
export declare function snapshotTree(root: string, skip?: string[]): Promise<Map<string, SnapshotEntry>>;
|
|
59
|
+
/**
|
|
60
|
+
* Diff two snapshots produced by `snapshotTree`. Pure comparison — both
|
|
61
|
+
* inputs already carry their content hash, so this is just bookkeeping.
|
|
62
|
+
*/
|
|
63
|
+
export declare function diffSnapshots(before: Map<string, SnapshotEntry>, after: Map<string, SnapshotEntry>): ChangeSummary;
|
|
64
|
+
export declare const MANAGED_PATHS: ManagedPath[];
|
|
65
|
+
export declare interface UpgradeContext {
|
|
66
|
+
channel: 'stable' | 'canary'
|
|
67
|
+
ref: string
|
|
68
|
+
targetVersion?: string
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Framework-managed paths, relative to the project root, that `buddy update`
|
|
72
|
+
* keeps in sync with the upstream stacks repo. Each entry can be a directory
|
|
73
|
+
* (synced recursively) or a single file. The `subPath` is the path inside the
|
|
74
|
+
* upstream stacks checkout — almost always the same as `localPath`, except
|
|
75
|
+
* for root scripts that live at the project root in apps but at the repo root
|
|
76
|
+
* in the stacks monorepo.
|
|
77
|
+
*/
|
|
78
|
+
export declare interface ManagedPath {
|
|
79
|
+
localPath: string
|
|
80
|
+
subPath: string
|
|
81
|
+
isFile?: boolean
|
|
82
|
+
skip?: string[]
|
|
83
|
+
label: string
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Snapshot entry. We capture size + content hash at snapshot time so the
|
|
87
|
+
* before/after diff can detect "actually changed" vs "just re-copied with
|
|
88
|
+
* fresh mtimes". `cpSync` and `downloadTemplate` always touch mtimes,
|
|
89
|
+
* even when the destination bytes are identical to the source — using
|
|
90
|
+
* mtime as the change signal turns every no-op upgrade into a "1600
|
|
91
|
+
* changed" report.
|
|
92
|
+
*/
|
|
93
|
+
export declare interface SnapshotEntry {
|
|
94
|
+
size: number
|
|
95
|
+
hash: bigint
|
|
96
|
+
}
|
|
97
|
+
export declare interface ChangeSummary {
|
|
98
|
+
added: number
|
|
99
|
+
changed: number
|
|
100
|
+
removed: number
|
|
101
|
+
unchanged: number
|
|
102
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k}from"../../chunk-2kaj93p5.js";import"../../chunk-96b7fcmd.js";export{e as writeChannel,j as snapshotTree,f as resolveUpgradeMessage,a as resolveUpgradeContext,g as resolveSuccessMessage,c as readVersion,d as readChannel,k as diffSnapshots,i as detectLocalStacks,b as buildTemplateString,h as MANAGED_PATHS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{a as k,b as f,c as C,d as j,e as x,f as P,g as T,h as G,i as S,j as E,k as h}from"../../chunk-2kaj93p5.js";import{gb as m}from"../../chunk-96b7fcmd.js";import{copyFileSync as u,cpSync as g,existsSync as Y,mkdirSync as w,readFileSync as i,rmSync as c}from"fs";import{dirname as n,join as U}from"path";import $ from"process";import{parseOptions as s}from"@stacksjs/cli";import{downloadTemplate as y}from"@stacksjs/gitit";import{path as Z}from"@stacksjs/path";import{ExitCode as D}from"@stacksjs/types";var J=s(),N=Z.projectPath(),p=U(N,".stacks-channel"),L=j(p),B=k(J,L),d=Z.projectPath("storage/framework/core/buddy/package.json"),o=C(d),t=J.from?Z.projectPath(J.from):null,V=t??S(N),M=!!V;console.log(P(B,L,!!J.stable));console.log(M?` source: local checkout at ${V}`:` source: github:stacksjs/stacks#${B.ref}`);if(!J.force){let z=await qq(N);if(z.length>0){console.warn(`
|
|
3
|
+
\u26A0 The following framework-managed paths have uncommitted changes:`);for(let q of z)console.warn(` - ${q}`);console.warn(`
|
|
4
|
+
Aborting to avoid clobbering your edits.`),console.warn(` Re-run with --force to overwrite, or commit / stash the changes first.
|
|
5
|
+
`),$.exit(D.FatalError)}}var H=Z.frameworkPath("core/actions/src/upgrade/framework.ts"),F=await l(H),_={added:0,changed:0,removed:0,unchanged:0},A=[];try{for(let z of G){let q=U(N,z.localPath),K=z.isFile?await b(q):await E(q,z.skip);if(M&&V)await zq(V,z,q);else{if(z.isFile)continue;await Kq(B.ref,z,q,!!J.force)}let Q=z.isFile?await b(q):await E(q,z.skip),W=h(K,Q);_.added+=W.added,_.changed+=W.changed,_.removed+=W.removed,_.unchanged+=W.unchanged,A.push({managed:z,summary:W})}if(!M)await Qq(B.ref)}catch(z){console.error("\u2718 Failed to upgrade Stacks framework:",z?.message||z),$.exit(D.FatalError)}var r=C(d),R=await l(H),a=$.argv.includes("--__restarted");if(F!==0n&&R!==0n&&F!==R&&!a){console.log(`Upgrade pulled a newer version of the upgrade action \u2014 re-running once to pick up new sync paths and hooks.
|
|
6
|
+
`);let z=$.argv.slice(2).filter((Q)=>Q!=="--__restarted"),K=await Bun.spawn({cmd:[$.argv[0]||"bun",H,...z,"--__restarted"],cwd:N,stdout:"inherit",stderr:"inherit"}).exited;$.exit(K??0)}if(!B.targetVersion)x(p,B.channel);console.log(`\u2714 ${T(B,o,r,L,!!J.force)}`);console.log("Sync summary:");for(let{managed:z,summary:q}of A)if(z.isFile){let K=q.added+q.changed>0;console.log(` ${z.label.padEnd(10)} ${K?"updated":"unchanged"}`)}else if(q.added+q.changed+q.removed===0)console.log(` ${z.label.padEnd(10)} unchanged (${q.unchanged} files)`);else console.log(` ${z.label.padEnd(10)} +${q.added} ~${q.changed} -${q.removed} (${q.unchanged} unchanged)`);var e=!J.noPostinstall&&J.postinstall!==!1;if(e)await Wq({aggregate:_,perPath:A,projectRoot:N});if(B.channel==="canary"&&!B.targetVersion)console.warn("\u26A0 Canary builds may contain bugs or breaking changes. Not recommended for production.");$.exit(D.Success);async function qq(z){let q=U(z,".git");if(!Y(q))return[];try{let K=Bun.spawn({cmd:["git","-C",z,"status","--porcelain","--",...G.map((W)=>W.localPath)],stdout:"pipe",stderr:"pipe"}),Q=await new Response(K.stdout).text();return await K.exited,Q.split(`
|
|
7
|
+
`).filter((W)=>W.length>0).map((W)=>W.slice(3))}catch{return[]}}async function l(z){try{if(!Y(z))return 0n;let q=await Bun.file(z).arrayBuffer();return Bun.hash(q)}catch{return 0n}}async function b(z){let q=new Map;if(!Y(z))return q;try{let K=Bun.file(z);if(K.size>0){let Q=await K.arrayBuffer();q.set("self",{size:K.size,hash:Bun.hash(Q)})}}catch{}return q}async function zq(z,q,K){let Q=U(z,q.subPath);if(!Y(Q)){console.warn(` skip ${q.label}: source missing at ${Q}`);return}if(q.isFile){w(n(K),{recursive:!0}),u(Q,K);return}w(K,{recursive:!0}),g(Q,K,{recursive:!0,force:!0,filter:(W)=>{if(!q.skip)return!0;let v=W.split("/").pop()||"";return!q.skip.includes(v)}})}async function Kq(z,q,K,Q){let W=f(z,q.subPath);await y(W,{dir:K,force:!0,forceClean:!1,preferOffline:!Q})}async function Qq(z){let q=Z.projectPath(".tmp-upgrade");try{await y(`github:stacksjs/stacks#${z}`,{dir:q,force:!0,forceClean:!0,preferOffline:!0,silent:!0});for(let K of G){if(!K.isFile)continue;let Q=U(q,K.subPath),W=Z.projectPath(K.localPath);try{if(Y(Q)&&Y(W))u(Q,W)}catch{}}}catch{}finally{if(Y(q))c(q,{recursive:!0,force:!0})}}async function Wq(z){let{aggregate:q,perPath:K,projectRoot:Q}=z;if(q.added+q.changed+q.removed===0){console.log("Nothing changed \u2014 skipping post-sync hooks.");return}console.log("Regenerating auto-import manifest...");try{let{generateAutoImportFiles:X}=await import("@stacksjs/server");await X()}catch(X){console.warn(` auto-imports failed (non-fatal): ${X?.message||X}`)}if(K.some((X)=>{let{managed:I,summary:O}=X;if(I.isFile)return!1;if(I.label!=="core"&&I.label!=="defaults")return!1;if(O.added+O.changed===0)return!1;return Xq(U(Q,I.localPath))})){console.log("Running `bun install` to refresh dependencies...");try{let I=await Bun.spawn({cmd:[$.argv[0]||"bun","install"],cwd:Q,stdout:"inherit",stderr:"inherit"}).exited;if(I!==0)console.warn(` bun install exited with code ${I} (non-fatal)`)}catch(X){console.warn(` bun install failed (non-fatal): ${X?.message||X}`)}}let v=U(Q,"database","migrations");if(Y(v)){console.log("Running pending migrations...");try{let X=Z.frameworkPath("core/buddy/src/cli.ts"),O=await Bun.spawn({cmd:[$.argv[0]||"bun",X,"migrate"],cwd:Q,stdout:"inherit",stderr:"inherit"}).exited;if(O!==0)console.warn(` migrate exited with code ${O} (non-fatal \u2014 DB may not be set up yet)`)}catch(X){console.warn(` migrate failed (non-fatal): ${X?.message||X}`)}}}function Xq(z){try{if(!Y(z))return!1;return i(U(z,"package.json"),"utf-8").length>0}catch{return Y(z)}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import"../../chunk-s735m9mg.js";import{Ya as r}from"../../chunk-n1y0gpv6.js";import"../../chunk-96b7fcmd.js";import e from"process";import{parseArgs as o}from"@stacksjs/cli";import{Action as i}from"@stacksjs/enums";import{ExitCode as t}from"@stacksjs/types";var a=o();if(a?.framework||a?.all)await r(i.UpgradeFramework,a);if(a?.dependencies||a?.all)await r(i.UpgradeDeps,a);if(a?.bun||a?.all)await r(i.UpgradeBun,a);if(a?.shell||a?.all)await r(i.UpgradeShell,a);if(a?.binary||a?.all)await r(i.UpgradeBinary,a);e.exit(t.Success);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var{$:K}=globalThis.Bun;import N from"process";import{italic as U,runCommand as I}from"@stacksjs/cli";import{log as q}from"@stacksjs/logging";import{path as A}from"@stacksjs/path";import{writeFile as V}from"@stacksjs/storage";import{ExitCode as W}from"@stacksjs/types";var O=(await K`echo $HOME`.text()).trim(),H=A.join(O,".zshrc"),J=A.shellPath("src/buddy.plugin.zsh"),D=A.join(O,".oh-my-zsh/custom/plugins/buddy/");q.info(`Setting up Oh My Zsh via ${H}...`);K.cwd(A.dirname(H));var G=await K`cat ${A.basename(H)}`.text(),Q=/^(?!#).*plugins=\(([^)]+)\)/m,M=G.match(Q);if(M){let B=M[1]?.split(/\s+/).filter(Boolean);if(!B)q.error("Maybe the plugins line in your .zshrc file could not be found? If this continues being an issue, please reach out to us on Discord."),N.exit(W.FatalError);if(!B.includes("buddy")){B.push("buddy");let S=`plugins=(
|
|
3
|
+
${B.map((T)=>T.trim()).join(`
|
|
4
|
+
`)}
|
|
5
|
+
)`;G=G.replace(Q,S),await V(H,G),q.info(`Copying buddy zsh plugin ${J} to ${D}...`),await I(`mkdir -p ${D}`),await I(`cp -rf ${J} ${D}`),q.success("Copied buddy zsh plugin")}else q.info("Buddy is already set up"),q.info("Ensuring `buddy` is updated..."),await I(`cp -rf ${J} ${D}`),q.success("Updated buddy zsh plugin to latest version")}q.success("Oh My Zsh Setup Complete");q.info(U("To see changes reflect, you may need to open a new terminal window"));if(N.env.TERM_PROGRAM==="vscode")q.info("\u2318\u21E7P terminal.create.new.terminal");
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { UpgradeOptions } from '@stacksjs/types';
|
|
2
|
+
// import { determineDebugLevel } from '@stacksjs/utils'
|
|
3
|
+
// export async function checkForUncommittedChanges(path = './stacks', options: UpgradeOptions) {
|
|
4
|
+
export declare function checkForUncommittedChanges(options: UpgradeOptions): void;
|
|
5
|
+
export declare function downloadFrameworkUpdate(options: UpgradeOptions): Promise<void>;
|
|
6
|
+
// export async function updateDependencies(options: UpgradeOptions) {
|
|
7
|
+
export declare function updateDependencies(): Promise<void>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import"../chunk-96b7fcmd.js";import r from"process";import{intro as b,outro as e,runCommand as d}from"@stacksjs/cli";import{NpmScript as j}from"@stacksjs/enums";import{log as k}from"@stacksjs/logging";import{projectPath as u}from"@stacksjs/path";import*as c from"@stacksjs/storage";import{ExitCode as n}from"@stacksjs/types";var i="0.70.25";function v(s){try{console.log("checkForUncommittedChanges",s)}catch(t){console.error(t)}}async function f(s){let a=u("updates");if(c.doesFolderExist(a))await c.deleteFolder(a);k.info("Downloading framework updates..."),await d("giget stacks updates",s),k.success(`Your framework updated correctly to version: v${i}`)}async function B(){let s=await b("buddy upgrade:dependencies"),t=await d(j.UpgradeDependencies,{cwd:u()});if(t.isErr)await e("While running the upgrade:dependencies command, there was an issue",{startTime:s,useSeconds:!0},t.error),r.exit(n.FatalError);await e("Freshly updated your dependencies.",{startTime:s,useSeconds:!0}),r.exit(n.Success)}export{B as updateDependencies,f as downloadFrameworkUpdate,v as checkForUncommittedChanges};
|
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/actions",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.70.
|
|
4
|
+
"version": "0.70.25",
|
|
5
5
|
"description": "The Stacks actions.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
|
-
"contributors": [
|
|
7
|
+
"contributors": [
|
|
8
|
+
"Chris Breuer <chris@stacksjs.com>"
|
|
9
|
+
],
|
|
8
10
|
"license": "MIT",
|
|
9
11
|
"funding": "https://github.com/sponsors/chrisbbreuer",
|
|
10
12
|
"homepage": "https://github.com/stacksjs/stacks/tree/main/storage/framework/core/actions#readme",
|
|
@@ -22,43 +24,57 @@
|
|
|
22
24
|
"framework",
|
|
23
25
|
"typescript",
|
|
24
26
|
"javascript",
|
|
25
|
-
"bun"
|
|
26
|
-
"vite"
|
|
27
|
+
"bun"
|
|
27
28
|
],
|
|
28
29
|
"exports": {
|
|
29
30
|
".": {
|
|
31
|
+
"bun": "./src/index.ts",
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
30
33
|
"import": "./dist/index.js"
|
|
31
34
|
},
|
|
35
|
+
"./run-action": {
|
|
36
|
+
"bun": "./src/run-action.ts",
|
|
37
|
+
"types": "./dist/run-action.d.ts",
|
|
38
|
+
"import": "./dist/run-action.js"
|
|
39
|
+
},
|
|
32
40
|
"./*": {
|
|
41
|
+
"bun": "./src/*",
|
|
33
42
|
"import": "./dist/*"
|
|
34
43
|
}
|
|
35
44
|
},
|
|
36
45
|
"module": "dist/index.js",
|
|
37
46
|
"types": "dist/index.d.ts",
|
|
38
|
-
"files": [
|
|
47
|
+
"files": [
|
|
48
|
+
"README.md",
|
|
49
|
+
"dist"
|
|
50
|
+
],
|
|
39
51
|
"scripts": {
|
|
40
52
|
"build": "bun build.ts",
|
|
41
53
|
"typecheck": "bun tsc --noEmit",
|
|
42
54
|
"prepublishOnly": "bun run build"
|
|
43
55
|
},
|
|
56
|
+
"dependencies": {
|
|
57
|
+
"@stacksjs/bunpress": "^0.1.5",
|
|
58
|
+
"@stacksjs/ts-cloud": "^0.2.15",
|
|
59
|
+
"@stacksjs/ts-md": "^0.1.1"
|
|
60
|
+
},
|
|
44
61
|
"devDependencies": {
|
|
45
|
-
"@stacksjs/api": "0.70.
|
|
46
|
-
"@stacksjs/cli": "0.70.
|
|
47
|
-
"@stacksjs/config": "0.70.
|
|
48
|
-
"@stacksjs/database": "0.70.
|
|
49
|
-
"@stacksjs/
|
|
50
|
-
"
|
|
51
|
-
"@stacksjs/
|
|
52
|
-
"@stacksjs/
|
|
53
|
-
"@stacksjs/
|
|
54
|
-
"@stacksjs/
|
|
55
|
-
"@stacksjs/
|
|
56
|
-
"@stacksjs/
|
|
57
|
-
"@stacksjs/
|
|
58
|
-
"@stacksjs/
|
|
59
|
-
"@stacksjs/
|
|
60
|
-
"@stacksjs/
|
|
61
|
-
"
|
|
62
|
-
"vue-component-meta": "^2.2.8"
|
|
62
|
+
"@stacksjs/api": "0.70.23",
|
|
63
|
+
"@stacksjs/cli": "0.70.23",
|
|
64
|
+
"@stacksjs/config": "0.70.23",
|
|
65
|
+
"@stacksjs/database": "0.70.23",
|
|
66
|
+
"@stacksjs/tlsx": "^0.13.2",
|
|
67
|
+
"better-dx": "^0.2.12",
|
|
68
|
+
"@stacksjs/dns": "0.70.23",
|
|
69
|
+
"@stacksjs/enums": "0.70.23",
|
|
70
|
+
"@stacksjs/env": "0.70.23",
|
|
71
|
+
"@stacksjs/error-handling": "0.70.23",
|
|
72
|
+
"@stacksjs/logging": "0.70.23",
|
|
73
|
+
"@stacksjs/path": "0.70.23",
|
|
74
|
+
"@stacksjs/security": "0.70.23",
|
|
75
|
+
"@stacksjs/storage": "0.70.23",
|
|
76
|
+
"@stacksjs/strings": "0.70.23",
|
|
77
|
+
"@stacksjs/utils": "0.70.23",
|
|
78
|
+
"@stacksjs/validation": "0.70.23"
|
|
63
79
|
}
|
|
64
80
|
}
|
package/dist/action-types.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
declare const domain: unknown;
|
|
2
|
-
declare const validActions: unknown;
|
|
3
|
-
export declare type ActionPath = ${files
|
|
4
|
-
.filter(file => file.endsWith('.ts'))
|
|
5
|
-
.map(value => `'${domain}/${value.replace('.ts', '')}'`)
|
|
6
|
-
.join(' | ')}
|
|
7
|
-
`
|
|
8
|
-
|
|
9
|
-
await storage.writeFile(p.frameworkPath('types/actions.d.ts'), validActions)
|
package/dist/action.d.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import type { JobOptions } from '@stacksjs/types';
|
|
2
|
-
|
|
3
|
-
declare interface ActionValidations {
|
|
4
|
-
[key: string]: {
|
|
5
|
-
rule: ReturnType<typeof schema.string>
|
|
6
|
-
message?: string | Record<string, string>
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
declare type Request = any
|
|
10
|
-
interface ActionOptions {
|
|
11
|
-
name?: string
|
|
12
|
-
description?: string
|
|
13
|
-
apiResponse?: boolean
|
|
14
|
-
validations?: ActionValidations
|
|
15
|
-
method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'
|
|
16
|
-
rate?: JobOptions['rate']
|
|
17
|
-
tries?: JobOptions['tries']
|
|
18
|
-
backoff?: JobOptions['backoff']
|
|
19
|
-
enabled?: JobOptions['enabled']
|
|
20
|
-
path?: string
|
|
21
|
-
requestFile?: string
|
|
22
|
-
handle: (options?: Request) => Promise<any> | string | number | boolean
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export class Action {
|
|
26
|
-
name?: string
|
|
27
|
-
description?: string
|
|
28
|
-
rate?: ActionOptions['rate']
|
|
29
|
-
tries?: ActionOptions['tries']
|
|
30
|
-
backoff?: ActionOptions['backoff']
|
|
31
|
-
enabled?: ActionOptions['enabled']
|
|
32
|
-
path?: ActionOptions['path']
|
|
33
|
-
method?: ActionOptions['method']
|
|
34
|
-
validations?: ActionOptions['validations']
|
|
35
|
-
requestFile?: string
|
|
36
|
-
handle: ActionOptions['handle']
|
|
37
|
-
|
|
38
|
-
constructor({
|
|
39
|
-
name,
|
|
40
|
-
description,
|
|
41
|
-
validations,
|
|
42
|
-
handle,
|
|
43
|
-
rate,
|
|
44
|
-
tries,
|
|
45
|
-
backoff,
|
|
46
|
-
enabled,
|
|
47
|
-
path,
|
|
48
|
-
method,
|
|
49
|
-
requestFile,
|
|
50
|
-
}: ActionOptions) {
|
|
51
|
-
|
|
52
|
-
this.name = name
|
|
53
|
-
this.description = description
|
|
54
|
-
this.validations = validations
|
|
55
|
-
this.rate = rate
|
|
56
|
-
this.tries = tries
|
|
57
|
-
this.backoff = backoff
|
|
58
|
-
this.enabled = enabled
|
|
59
|
-
this.path = path
|
|
60
|
-
this.method = method
|
|
61
|
-
this.handle = handle
|
|
62
|
-
this.requestFile = requestFile
|
|
63
|
-
}
|
|
64
|
-
}
|
package/dist/actions.d.ts
DELETED
package/dist/add.d.ts
DELETED
package/dist/add.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./chunk-9v6qtbez.js";
|
|
3
|
-
|
|
4
|
-
// src/add.ts
|
|
5
|
-
import { installPackage } from "@stacksjs/cli";
|
|
6
|
-
async function invoke(options) {
|
|
7
|
-
if (options?.table)
|
|
8
|
-
await addTable();
|
|
9
|
-
if (options?.calendar)
|
|
10
|
-
await addCalendar();
|
|
11
|
-
}
|
|
12
|
-
async function add(options) {
|
|
13
|
-
return await invoke(options);
|
|
14
|
-
}
|
|
15
|
-
async function addTable() {
|
|
16
|
-
await installPackage("@stacksjs/table");
|
|
17
|
-
}
|
|
18
|
-
async function addCalendar() {
|
|
19
|
-
await installPackage("@stacksjs/calendar");
|
|
20
|
-
}
|
|
21
|
-
async function installPackages(names) {
|
|
22
|
-
for (const name of names)
|
|
23
|
-
await installPackage(name);
|
|
24
|
-
}
|
|
25
|
-
export {
|
|
26
|
-
invoke,
|
|
27
|
-
installPackages,
|
|
28
|
-
addTable,
|
|
29
|
-
addCalendar,
|
|
30
|
-
add
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export { add };
|
package/dist/api.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare const options: unknown;
|
package/dist/binary.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
// src/build/component-libs.ts
|
|
3
|
-
import { runCommand } from "@stacksjs/cli";
|
|
4
|
-
import { NpmScript } from "@stacksjs/enums";
|
|
5
|
-
import { frameworkPath } from "@stacksjs/path";
|
|
6
|
-
await runCommand(NpmScript.BuildComponents, {
|
|
7
|
-
cwd: frameworkPath(),
|
|
8
|
-
verbose: true
|
|
9
|
-
});
|
package/dist/build/core.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"../chunk-wkwtsvym.js";
|
|
3
|
-
import"../chunk-9v6qtbez.js";
|
|
4
|
-
|
|
5
|
-
// src/build/core.ts
|
|
6
|
-
var {$ } = globalThis.Bun;
|
|
7
|
-
import process from "node:process";
|
|
8
|
-
import { dim, italic, log } from "@stacksjs/cli";
|
|
9
|
-
import { corePath } from "@stacksjs/path";
|
|
10
|
-
import { glob } from "@stacksjs/storage";
|
|
11
|
-
log.info("Building core packages");
|
|
12
|
-
var dirs = (await glob([corePath("*")], { onlyDirectories: true })).sort();
|
|
13
|
-
if (dirs.length === 0) {
|
|
14
|
-
log.info("No core packages found");
|
|
15
|
-
process.exit(1 /* FatalError */);
|
|
16
|
-
}
|
|
17
|
-
for (const folder of dirs) {
|
|
18
|
-
log.info(`\uD83C\uDFD7\uFE0F Building ${italic(dim(folder))}`);
|
|
19
|
-
$.cwd(folder);
|
|
20
|
-
await $`bun run build`;
|
|
21
|
-
log.success(`${italic(dim(folder))} built`);
|
|
22
|
-
console.log(``);
|
|
23
|
-
}
|
package/dist/build/stacks.js
DELETED
package/dist/build.js
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
generateTypes
|
|
4
|
-
} from "./generate/index.js";
|
|
5
|
-
import"./chunk-jq06qn43.js";
|
|
6
|
-
import"./helpers/vscode-custom-data.js";
|
|
7
|
-
import"./chunk-494jp8d5.js";
|
|
8
|
-
import"./chunk-ddw2jq8f.js";
|
|
9
|
-
import"./chunk-mdj7x1vs.js";
|
|
10
|
-
import"./chunk-p0c688mg.js";
|
|
11
|
-
import"./chunk-qkm8e752.js";
|
|
12
|
-
import"./chunk-a13x0e43.js";
|
|
13
|
-
import"./chunk-mdqphqep.js";
|
|
14
|
-
import"./chunk-qhh0v93n.js";
|
|
15
|
-
import"./chunk-0m948f1p.js";
|
|
16
|
-
import"./chunk-hqmjfnnn.js";
|
|
17
|
-
import"./chunk-yyvh669b.js";
|
|
18
|
-
import"./chunk-23btgw5e.js";
|
|
19
|
-
import"./chunk-mbvdyeyw.js";
|
|
20
|
-
import"./chunk-zzerxbrm.js";
|
|
21
|
-
import"./chunk-atahpwz7.js";
|
|
22
|
-
import"./chunk-90y2wmyz.js";
|
|
23
|
-
import"./chunk-frw3va9v.js";
|
|
24
|
-
import"./chunk-2dvnt46s.js";
|
|
25
|
-
import"./chunk-w6fdq4hk.js";
|
|
26
|
-
import"./chunk-wkwtsvym.js";
|
|
27
|
-
import"./chunk-ze46550n.js";
|
|
28
|
-
import"./helpers/utils.js";
|
|
29
|
-
import"./chunk-9v6qtbez.js";
|
|
30
|
-
|
|
31
|
-
// src/build.ts
|
|
32
|
-
import { NpmScript } from "@stacksjs/enums";
|
|
33
|
-
import { log } from "@stacksjs/logging";
|
|
34
|
-
import { hasComponents, hasFunctions } from "@stacksjs/storage";
|
|
35
|
-
import { runNpmScript } from "@stacksjs/utils";
|
|
36
|
-
async function invoke(options) {
|
|
37
|
-
if (options.components)
|
|
38
|
-
await componentLibraries(options);
|
|
39
|
-
else if (options.vueComponents)
|
|
40
|
-
await vueComponentLibrary(options);
|
|
41
|
-
else if (options.webComponents || options.elements)
|
|
42
|
-
await webComponentLibrary(options);
|
|
43
|
-
else if (options.functions)
|
|
44
|
-
await functionsLibrary(options);
|
|
45
|
-
else if (options.docs)
|
|
46
|
-
await docs(options);
|
|
47
|
-
else if (options.stacks)
|
|
48
|
-
await stacks(options);
|
|
49
|
-
await generateTypes();
|
|
50
|
-
}
|
|
51
|
-
async function build(options) {
|
|
52
|
-
return await invoke(options);
|
|
53
|
-
}
|
|
54
|
-
async function componentLibraries(options) {
|
|
55
|
-
await runNpmScript(NpmScript.GenerateEntries, options);
|
|
56
|
-
await vueComponentLibrary(options);
|
|
57
|
-
await webComponentLibrary(options);
|
|
58
|
-
}
|
|
59
|
-
async function vueComponentLibrary(options) {
|
|
60
|
-
if (hasComponents()) {
|
|
61
|
-
log.info("Building your component library...");
|
|
62
|
-
await runNpmScript(NpmScript.BuildComponents, options);
|
|
63
|
-
log.success("Your component library was built successfully");
|
|
64
|
-
} else {
|
|
65
|
-
log.warn("No components found.");
|
|
66
|
-
log.info("Before you can build components,");
|
|
67
|
-
log.info("you need to have created some in the ./components folder.");
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
async function webComponentLibrary(options) {
|
|
71
|
-
log.info("Building your component library for production use & npm/CDN distribution...");
|
|
72
|
-
if (hasComponents()) {
|
|
73
|
-
await runNpmScript(NpmScript.BuildWebComponents, options);
|
|
74
|
-
log.success("Your Web Component library was built successfully");
|
|
75
|
-
} else {
|
|
76
|
-
log.info("No components found.");
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
async function docs(options) {
|
|
80
|
-
log.info("Building the documentation site...");
|
|
81
|
-
await runNpmScript(NpmScript.BuildDocs, options);
|
|
82
|
-
log.success("Docs built successfully");
|
|
83
|
-
}
|
|
84
|
-
async function stacks(options) {
|
|
85
|
-
log.info("Building the Stacks Framework...");
|
|
86
|
-
await runNpmScript(NpmScript.BuildStacks, options);
|
|
87
|
-
log.success("Stacks built successfully");
|
|
88
|
-
}
|
|
89
|
-
async function functionsLibrary(options) {
|
|
90
|
-
if (hasFunctions()) {
|
|
91
|
-
log.info("Building your functions library for production usages...");
|
|
92
|
-
log.info("Production usages include: manual npm distribution and/or CDN distribution");
|
|
93
|
-
await runNpmScript(NpmScript.BuildFunctions, options);
|
|
94
|
-
log.success("Functions library built successfully");
|
|
95
|
-
} else {
|
|
96
|
-
log.info("No functions found");
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
export {
|
|
100
|
-
webComponentLibrary,
|
|
101
|
-
vueComponentLibrary,
|
|
102
|
-
stacks,
|
|
103
|
-
invoke,
|
|
104
|
-
functionsLibrary,
|
|
105
|
-
docs,
|
|
106
|
-
componentLibraries,
|
|
107
|
-
build
|
|
108
|
-
};
|
package/dist/bump.d.ts
DELETED
package/dist/bump.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
// src/bump.ts
|
|
3
|
-
import { log, parseOptions, runCommand } from "@stacksjs/cli";
|
|
4
|
-
import { path as p } from "@stacksjs/path";
|
|
5
|
-
var options = parseOptions();
|
|
6
|
-
var changelogCommand = options?.dryRun ? "buddy changelog --quiet --dry-run" : "buddy changelog --quiet";
|
|
7
|
-
var bumpCommand = options?.dryRun ? `bunx --bun bumpp ./package.json ./**/package.json ../package.json ../defaults/ide/vscode/package.json ../views/** ../cloud/package.json ../server/package.json ../orm/package.json ../docs/package.json ../api/package.json ../email/package.json ../libs/**/package.json ../system-tray/package.json --no-push` : `bunx --bun bumpp ./package.json ./**/package.json ../package.json ../defaults/ide/vscode/package.json ../views/** ../cloud/package.json ../server/package.json ../orm/package.json ../docs/package.json ../api/package.json ../email/package.json ../libs/**/package.json ../system-tray/package.json --all`;
|
|
8
|
-
log.debug(`Running: ${bumpCommand}`);
|
|
9
|
-
log.debug(`In frameworkPath: ${p.frameworkPath()}`);
|
|
10
|
-
await runCommand(bumpCommand, {
|
|
11
|
-
cwd: p.frameworkPath("core"),
|
|
12
|
-
stdin: "inherit"
|
|
13
|
-
});
|
|
14
|
-
await runCommand(changelogCommand, {
|
|
15
|
-
cwd: p.projectPath(),
|
|
16
|
-
stdin: "inherit"
|
|
17
|
-
});
|
package/dist/changelog.d.ts
DELETED
package/dist/changelog.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
// src/changelog.ts
|
|
3
|
-
import { execSync, log, parseOptions, runCommand } from "@stacksjs/cli";
|
|
4
|
-
import { projectPath } from "@stacksjs/path";
|
|
5
|
-
log.debug("Generating changelog");
|
|
6
|
-
var fromRevision = await execSync("git describe --abbrev=0 --tags HEAD^");
|
|
7
|
-
log.debug("FromRevision", fromRevision);
|
|
8
|
-
var toRevision = await execSync("git describe");
|
|
9
|
-
log.debug("ToRevision", toRevision);
|
|
10
|
-
var options = parseOptions();
|
|
11
|
-
log.debug("Changelog Options", options);
|
|
12
|
-
var command = options?.dryRun ? `bunx --bun changelogen --no-output --from ${fromRevision} --to ${toRevision}` : `bunx --bun changelogen --output CHANGELOG.md --from ${fromRevision} --to ${toRevision}`;
|
|
13
|
-
await runCommand(command, {
|
|
14
|
-
cwd: projectPath(),
|
|
15
|
-
quiet: options?.quiet,
|
|
16
|
-
verbose: options?.verbose
|
|
17
|
-
});
|