@supacloud/cli 0.107.1 → 0.108.1
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/index.js
CHANGED
|
@@ -21603,7 +21603,7 @@ var starter_metadata_default = {
|
|
|
21603
21603
|
version: "0.11.0"
|
|
21604
21604
|
},
|
|
21605
21605
|
contracts: {
|
|
21606
|
-
version: "0.
|
|
21606
|
+
version: "0.15.0"
|
|
21607
21607
|
},
|
|
21608
21608
|
db: {
|
|
21609
21609
|
version: "0.20.0",
|
|
@@ -21949,7 +21949,7 @@ function baseFiles(name, sdkDependencies) {
|
|
|
21949
21949
|
check: "bun run compile && bun run check:generated && bun run typecheck && bun run test",
|
|
21950
21950
|
test: "bun run compile && bun --no-env-file scripts/environment.ts test bun test",
|
|
21951
21951
|
dev: "bun --no-env-file scripts/environment.ts development bun scripts/dev.ts",
|
|
21952
|
-
build: "bun run compile && bun run typecheck && bun build src/application.ts --target bun --minify --outdir
|
|
21952
|
+
build: "bun run compile && bun run typecheck && bun build src/application.ts --target bun --minify --outdir output/supacloud",
|
|
21953
21953
|
"env:development": "bun --no-env-file scripts/environment.ts development",
|
|
21954
21954
|
"env:test": "bun --no-env-file scripts/environment.ts test",
|
|
21955
21955
|
"env:staging": "bun --no-env-file scripts/environment.ts staging",
|
|
@@ -21990,7 +21990,7 @@ function baseFiles(name, sdkDependencies) {
|
|
|
21990
21990
|
}),
|
|
21991
21991
|
"bunfig.toml": `env = false
|
|
21992
21992
|
`,
|
|
21993
|
-
".gitignore": ["node_modules/", "dist/", ".env", ".env.*", "!.env.*.example", "!.env.test", ""].join(`
|
|
21993
|
+
".gitignore": ["node_modules/", "dist/", "output/supacloud/", ".env", ".env.*", "!.env.*.example", "!.env.test", ""].join(`
|
|
21994
21994
|
`),
|
|
21995
21995
|
".env.development.example": `APP_ENV=development
|
|
21996
21996
|
PORT=3000
|
|
@@ -22144,10 +22144,15 @@ do not widen them to \`unknown\` just to accept unvalidated data.
|
|
|
22144
22144
|
## Production Boundary
|
|
22145
22145
|
|
|
22146
22146
|
\`bun run build\` emits an application factory, not a server. Import \`createApp\`
|
|
22147
|
-
from \`
|
|
22147
|
+
from \`output/supacloud/application.js\` in your trusted host and supply real dependency,
|
|
22148
22148
|
request-context and command-governance adapters. The memory sandbox is
|
|
22149
22149
|
development/test only.
|
|
22150
22150
|
|
|
22151
|
+
Keep backend bundles outside the frontend output directory. Vite normally cleans
|
|
22152
|
+
\`dist/\` before building; server artifacts placed there can be deleted or included
|
|
22153
|
+
in a public frontend archive. Use disjoint output directories, not a disabled
|
|
22154
|
+
frontend clean step. Compiler source artifacts remain in \`generated/\`.
|
|
22155
|
+
|
|
22151
22156
|
## Inspection And Repair
|
|
22152
22157
|
|
|
22153
22158
|
\`\`\`sh
|
|
@@ -22234,6 +22239,10 @@ sandbox. Bind persistence, authorization and audit to durable adapters before
|
|
|
22234
22239
|
invoking it in production. Do not schedule destructive work without an
|
|
22235
22240
|
idempotency key.
|
|
22236
22241
|
|
|
22242
|
+
\`bun run build\` emits \`output/supacloud/application.js\`, an application factory,
|
|
22243
|
+
not a deployed Worker. Keep it outside any frontend output directory such as
|
|
22244
|
+
\`dist/\`; frontend clean steps and public archives must not own server bundles.
|
|
22245
|
+
|
|
22237
22246
|
## Inspection And Repair
|
|
22238
22247
|
|
|
22239
22248
|
\`\`\`sh
|
|
@@ -22338,6 +22347,10 @@ explicit options; do not install every recipe into this application.
|
|
|
22338
22347
|
## Integration and delivery
|
|
22339
22348
|
|
|
22340
22349
|
createApp requires application-owned trusted identity and durable adapters.
|
|
22350
|
+
\`bun run build\` emits \`output/supacloud/application.js\`, not a deployed server.
|
|
22351
|
+
Keep this backend directory separate from frontend output such as \`dist/\`,
|
|
22352
|
+
which frontend tools may clean and publish. Do not disable frontend cleanup to
|
|
22353
|
+
preserve backend artifacts; use disjoint output directories.
|
|
22341
22354
|
Database migrations and seed data require an explicitly selected development
|
|
22342
22355
|
database and a reviewed application script; the CLI never infers a production target.
|
|
22343
22356
|
Commit generated/ after compilation. At release, check generated drift before
|
|
@@ -25096,7 +25109,7 @@ function appStarterFiles(name) {
|
|
|
25096
25109
|
test: "bun run compile && bun --no-env-file scripts/environment.ts test bun test",
|
|
25097
25110
|
dev: "bun --no-env-file scripts/environment.ts development bun scripts/dev.ts",
|
|
25098
25111
|
"dev:integration": "bun --no-env-file scripts/environment.ts development bun scripts/integration.ts",
|
|
25099
|
-
build: "bun run db:check && bun run compile && bun run typecheck && bun build src/application.ts --target bun --minify --outdir
|
|
25112
|
+
build: "bun run db:check && bun run compile && bun run typecheck && bun build src/application.ts --target bun --minify --outdir output/supacloud",
|
|
25100
25113
|
"env:development": "bun --no-env-file scripts/environment.ts development",
|
|
25101
25114
|
"env:test": "bun --no-env-file scripts/environment.ts test",
|
|
25102
25115
|
"env:staging": "bun --no-env-file scripts/environment.ts staging",
|
|
@@ -25147,6 +25160,7 @@ function appStarterFiles(name) {
|
|
|
25147
25160
|
".gitignore": [
|
|
25148
25161
|
"node_modules/",
|
|
25149
25162
|
"dist/",
|
|
25163
|
+
"output/supacloud/",
|
|
25150
25164
|
"output/database-audit/",
|
|
25151
25165
|
"db/migration-candidates/",
|
|
25152
25166
|
".env",
|
|
@@ -25737,16 +25751,21 @@ must also pin and validate the expected project and API origin.
|
|
|
25737
25751
|
|
|
25738
25752
|
## Production Boundary
|
|
25739
25753
|
|
|
25740
|
-
\`bun run build\` creates
|
|
25754
|
+
\`bun run build\` creates output/supacloud/application.js, an application factory, not a
|
|
25741
25755
|
production server. The compiler is a devDependency and is absent from that
|
|
25742
25756
|
runtime entry. The memory demo is kept in scripts/ and refuses staging/production.
|
|
25743
25757
|
|
|
25744
|
-
Import createApp from
|
|
25758
|
+
Import createApp from output/supacloud/application.js in your trusted host and supply:
|
|
25745
25759
|
|
|
25746
25760
|
- deps.dbClient implementing ReviewStore, with reads/writes bound to a real transaction;
|
|
25747
25761
|
- requestContext from verified identity, never a body-supplied actor;
|
|
25748
25762
|
- commandGovernance authorization, durable idempotency, transaction and audit adapters.
|
|
25749
25763
|
|
|
25764
|
+
Keep backend bundles outside the frontend output directory. Vite normally cleans
|
|
25765
|
+
dist/ before building; server artifacts placed there can be deleted or included
|
|
25766
|
+
in a public frontend archive. Use disjoint output directories, not a disabled
|
|
25767
|
+
frontend clean step. Compiler source artifacts remain in generated/.
|
|
25768
|
+
|
|
25750
25769
|
The starter also includes src/host/review-postgres.ts and src/delivery-host.ts.
|
|
25751
25770
|
The PostgreSQL adapter executes the same compiled approval handler with durable
|
|
25752
25771
|
receipts, audit, current membership/ownership checks on replay and transaction-bound
|
|
@@ -25837,7 +25856,7 @@ startup before any request is served.
|
|
|
25837
25856
|
## Unified User Center
|
|
25838
25857
|
|
|
25839
25858
|
For enterprise unified login, use SupAuth as the external user center. This
|
|
25840
|
-
starter exports createSupAuthApp(identity, adapters) from
|
|
25859
|
+
starter exports createSupAuthApp(identity, adapters) from output/supacloud/application.js.
|
|
25841
25860
|
Supply issuer, audience, clientId, projectId, an explicit HTTPS jwksUrl and resolveAccess
|
|
25842
25861
|
that reads current application-local access. The runtime verifies credential
|
|
25843
25862
|
signatures, configured issuer and audience, allowed asymmetric algorithms/keys
|
|
@@ -26373,6 +26392,38 @@ export const ${className}JobStatuses = new InjectionToken<${className}JobStatusP
|
|
|
26373
26392
|
export const ${className}Refresher = new InjectionToken<${className}RefreshPort>(
|
|
26374
26393
|
"${name}.refresher", { scope: "job" },
|
|
26375
26394
|
);
|
|
26395
|
+
`,
|
|
26396
|
+
[`${name}.client.ts`]: `import {
|
|
26397
|
+
createFeatureSliceCommandClient,
|
|
26398
|
+
type AuthoritativeCommandContract,
|
|
26399
|
+
type AuthoritativeCommandTransport,
|
|
26400
|
+
type FeatureSliceCommandClient,
|
|
26401
|
+
type FeatureSliceCommandClientOptions,
|
|
26402
|
+
} from "@supacloud/contracts/client";
|
|
26403
|
+
import type { ${className}ApproveCommand } from "./${name}.model";
|
|
26404
|
+
import { ${className}ApproveInvalidateTags } from "./${name}.contracts";
|
|
26405
|
+
|
|
26406
|
+
/**
|
|
26407
|
+
* Browser/client boundary for the Feature transition.
|
|
26408
|
+
*
|
|
26409
|
+
* The transport must call the real generated API/RPC path. The framework owns
|
|
26410
|
+
* pending identity, read-only recovery and explicit invalidation metadata;
|
|
26411
|
+
* persistence, authorization and the receipt source remain application-owned.
|
|
26412
|
+
*/
|
|
26413
|
+
export type ${className}CommandTransport = AuthoritativeCommandTransport<${className}ApproveCommand>;
|
|
26414
|
+
export type ${className}CommandContract<Acknowledgement, Authority> =
|
|
26415
|
+
AuthoritativeCommandContract<${className}ApproveCommand, Acknowledgement, Authority>;
|
|
26416
|
+
|
|
26417
|
+
export function create${className}CommandClient<Acknowledgement, Authority>(
|
|
26418
|
+
contract: ${className}CommandContract<Acknowledgement, Authority>,
|
|
26419
|
+
transport: ${className}CommandTransport,
|
|
26420
|
+
options: FeatureSliceCommandClientOptions<${className}ApproveCommand>,
|
|
26421
|
+
): FeatureSliceCommandClient<${className}ApproveCommand, Authority> {
|
|
26422
|
+
return createFeatureSliceCommandClient(contract, transport, {
|
|
26423
|
+
...options,
|
|
26424
|
+
invalidateTags: options.invalidateTags ?? ${className}ApproveInvalidateTags,
|
|
26425
|
+
});
|
|
26426
|
+
}
|
|
26376
26427
|
`,
|
|
26377
26428
|
[`${name}.service.ts`]: `import {
|
|
26378
26429
|
FeatureAdapterError, Inject, Injectable, Optional, REQUEST_CONTEXT, requireFeatureOperationResult,
|
|
@@ -33054,7 +33105,7 @@ async function runProjectDeployment(http, args) {
|
|
|
33054
33105
|
// package.json
|
|
33055
33106
|
var package_default = {
|
|
33056
33107
|
name: "@supacloud/cli",
|
|
33057
|
-
version: "0.
|
|
33108
|
+
version: "0.108.1",
|
|
33058
33109
|
description: "Project-scoped CLI for SupaCloud users",
|
|
33059
33110
|
type: "module",
|
|
33060
33111
|
main: "./dist/index.js",
|
|
@@ -33112,7 +33163,7 @@ var package_default = {
|
|
|
33112
33163
|
typebox: "1.3.37"
|
|
33113
33164
|
},
|
|
33114
33165
|
overrides: {
|
|
33115
|
-
"@supacloud/contracts": "0.
|
|
33166
|
+
"@supacloud/contracts": "0.15.0",
|
|
33116
33167
|
"@supacloud/delivery": "0.21.0",
|
|
33117
33168
|
"@graphql-tools/utils": "^12.0.4"
|
|
33118
33169
|
},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supacloud/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.108.1",
|
|
4
4
|
"description": "Project-scoped CLI for SupaCloud users",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"typebox": "1.3.37"
|
|
59
59
|
},
|
|
60
60
|
"overrides": {
|
|
61
|
-
"@supacloud/contracts": "0.
|
|
61
|
+
"@supacloud/contracts": "0.15.0",
|
|
62
62
|
"@supacloud/delivery": "0.21.0",
|
|
63
63
|
"@graphql-tools/utils": "^12.0.4"
|
|
64
64
|
},
|