@supacloud/cli 0.115.3 → 0.116.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.
Files changed (2) hide show
  1. package/dist/index.js +27 -24
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -22198,16 +22198,16 @@ var starter_metadata_default = {
22198
22198
  generatedBy: "supacloud/starter-metadata-v1",
22199
22199
  packages: {
22200
22200
  compiler: {
22201
- version: "0.55.0"
22201
+ version: "0.56.0"
22202
22202
  },
22203
22203
  app: {
22204
- version: "0.36.0",
22204
+ version: "0.37.0",
22205
22205
  dependencies: {
22206
22206
  rxjs: "7.8.2"
22207
22207
  }
22208
22208
  },
22209
22209
  elysia: {
22210
- version: "0.38.1"
22210
+ version: "0.39.0"
22211
22211
  },
22212
22212
  commands: {
22213
22213
  version: "0.11.2"
@@ -22515,7 +22515,8 @@ const server = Bun.serve({
22515
22515
  });
22516
22516
  console.log("Local demo: " + server.url);
22517
22517
  `;
22518
- var APPLICATION_SOURCE = (name) => `import { createApplication, createSupAuthRequestContext, type SupAuthContextOptions, type ApplicationOptions, type CommandGovernance } from "@supacloud/elysia";
22518
+ var APPLICATION_SOURCE = (name) => `import { createApplication } from "@supacloud/elysia";
22519
+ import { createSupAuthRequestContext, type SupAuthContextOptions, type ApplicationOptions, type CommandGovernance } from "@supacloud/elysia";
22519
22520
  import { createCompiledModules } from "../generated/application";
22520
22521
 
22521
22522
  export interface AppAdapters {
@@ -22527,10 +22528,8 @@ export interface AppAdapters {
22527
22528
 
22528
22529
  // The host verifies external identity (SupAuth for unified login) before creating requestContext.
22529
22530
  export function createApp(adapters: AppAdapters) {
22530
- const { onExecution, ...rest } = adapters;
22531
22531
  return createApplication({
22532
- ...rest,
22533
- ...(onExecution === undefined ? {} : { onExecution }),
22532
+ ...adapters,
22534
22533
  name: ${JSON.stringify(name)},
22535
22534
  modules: createCompiledModules(),
22536
22535
  });
@@ -25658,7 +25657,8 @@ export function createDemo() {
25658
25657
  return sandbox;
25659
25658
  }
25660
25659
  `,
25661
- "src/application.ts": `import { createApplication, createSupAuthRequestContext, type SupAuthContextOptions, type ApplicationOptions, type CommandGovernance } from "@supacloud/elysia";
25660
+ "src/application.ts": `import { createApplication } from "@supacloud/elysia";
25661
+ import { createSupAuthRequestContext, type SupAuthContextOptions, type ApplicationOptions, type CommandGovernance } from "@supacloud/elysia";
25662
25662
  import { createCompiledModules } from "../generated/application";
25663
25663
 
25664
25664
  export interface AppAdapters {
@@ -25670,10 +25670,8 @@ export interface AppAdapters {
25670
25670
 
25671
25671
  // The host verifies external identity (SupAuth for unified login) before creating requestContext.
25672
25672
  export function createApp(adapters: AppAdapters) {
25673
- const { onExecution, ...rest } = adapters;
25674
25673
  return createApplication({
25675
- ...rest,
25676
- ...(onExecution === undefined ? {} : { onExecution }),
25674
+ ...adapters,
25677
25675
  name: ${JSON.stringify(name)},
25678
25676
  modules: createCompiledModules(),
25679
25677
  });
@@ -25736,11 +25734,7 @@ function readReview(value: unknown): Review {
25736
25734
  }
25737
25735
 
25738
25736
  @Injectable({ scope: "request" })
25739
- @Command({
25740
- name: "review.approve", permission: "review.approve", transaction: "required",
25741
- idempotency: "required", audit: "review.approved", aspects: [requireRequest],
25742
- })
25743
- export class ApproveReview {
25737
+ export class ReviewApproval {
25744
25738
  constructor(@Inject(DB_CLIENT) private readonly store: ReviewStore) {}
25745
25739
 
25746
25740
  async execute(id: string, expectedVersion: number): Promise<Review> {
@@ -25760,6 +25754,15 @@ export class ApproveReview {
25760
25754
  }
25761
25755
  }
25762
25756
 
25757
+ @Injectable({ scope: "request" })
25758
+ @Command({
25759
+ name: "review.approve", permission: "review.approve", transaction: "required",
25760
+ idempotency: "required", audit: "review.approved", aspects: [requireRequest],
25761
+ })
25762
+ export class ApproveReview extends ReviewApproval {
25763
+ constructor(@Inject(DB_CLIENT) store: ReviewStore) { super(store); }
25764
+ }
25765
+
25763
25766
  type ReviewError =
25764
25767
  | { readonly _tag: "AUTHENTICATION_REQUIRED" }
25765
25768
  | { readonly _tag: "REVIEW_NOT_FOUND" }
@@ -25773,7 +25776,7 @@ type ReviewError =
25773
25776
 
25774
25777
  @Controller("/reviews")
25775
25778
  export class ReviewController {
25776
- constructor(@Inject(ApproveReview) private readonly approveReview: ApproveReview) {}
25779
+ constructor(@Inject(ReviewApproval) private readonly reviewApproval: ReviewApproval) {}
25777
25780
 
25778
25781
  @Get("/health", {
25779
25782
  responses: { 200: HealthResult },
@@ -25804,13 +25807,13 @@ export class ReviewController {
25804
25807
  },
25805
25808
  })
25806
25809
  approve(@Param("id") id: string, @Body() body: ApprovalBody): Effect.Effect<Review, ReviewError, never> {
25807
- return Effect.promise(() => this.approveReview.execute(id, body.expectedVersion));
25810
+ return Effect.promise(() => this.reviewApproval.execute(id, body.expectedVersion));
25808
25811
  }
25809
25812
  }
25810
25813
 
25811
25814
  export const ReviewFeature = defineFeatureSlice({
25812
25815
  name: "review", tags: ["type:feature"], spec: reviewSpec,
25813
- providers: [ApproveReview, VerifyReviewAttachment, ReviewUploads, ReviewReceipts, ReviewTasks],
25816
+ providers: [ReviewApproval, ApproveReview, VerifyReviewAttachment, ReviewUploads, ReviewReceipts, ReviewTasks],
25814
25817
  controllers: [ReviewController, ReviewUploadsController, ReviewReceiptsController, ReviewTasksController],
25815
25818
  jobs: [VerifyReviewAttachment],
25816
25819
  });
@@ -26999,7 +27002,7 @@ export class ${className}Controller {
26999
27002
  @Inject(Detail${className}Query) private readonly detailQuery: Detail${className}Query,
27000
27003
  @Inject(Receipt${className}Query) private readonly receiptQuery: Receipt${className}Query,
27001
27004
  @Inject(JobStatus${className}Query) private readonly jobStatusQuery: JobStatus${className}Query,
27002
- @Inject(Approve${className}Command) private readonly approveCommand: Approve${className}Command,
27005
+ @Inject(${className}Service) private readonly service: ${className}Service,
27003
27006
  ) {}
27004
27007
 
27005
27008
  @Get("/", {
@@ -27067,7 +27070,7 @@ export class ${className}Controller {
27067
27070
  @Param("id") id: string,
27068
27071
  @Body() body: ${className}ApproveInput,
27069
27072
  ): Effect.Effect<${className}Result, ${className}ApproveError, never> {
27070
- return Effect.promise(() => this.approveCommand.execute(id, body));
27073
+ return Effect.promise(() => this.service.approve(id, body));
27071
27074
  }
27072
27075
 
27073
27076
  @Get("/:id/operations/:operationId", {
@@ -33840,7 +33843,7 @@ async function runProjectDeployment(http, args) {
33840
33843
  // package.json
33841
33844
  var package_default = {
33842
33845
  name: "@supacloud/cli",
33843
- version: "0.115.3",
33846
+ version: "0.116.0",
33844
33847
  description: "Project-scoped CLI for SupaCloud users",
33845
33848
  type: "module",
33846
33849
  main: "./dist/index.js",
@@ -33892,7 +33895,7 @@ var package_default = {
33892
33895
  directory: "packages/cli"
33893
33896
  },
33894
33897
  dependencies: {
33895
- "@supacloud/compiler": "^0.55.0",
33898
+ "@supacloud/compiler": "^0.56.0",
33896
33899
  "@supacloud/delivery": "0.24.0",
33897
33900
  "@supacloud/db": "0.20.5",
33898
33901
  typebox: "1.4.3"
@@ -33904,7 +33907,7 @@ var package_default = {
33904
33907
  },
33905
33908
  devDependencies: {
33906
33909
  "@supabase/supabase-js": "2.118.0",
33907
- "@supacloud/elysia": "0.38.1",
33910
+ "@supacloud/elysia": "0.39.0",
33908
33911
  "@types/bun": "^1.4.4",
33909
33912
  effect: "4.0.5",
33910
33913
  elysia: "2.0.0-rc.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supacloud/cli",
3
- "version": "0.115.3",
3
+ "version": "0.116.0",
4
4
  "description": "Project-scoped CLI for SupaCloud users",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -52,7 +52,7 @@
52
52
  "directory": "packages/cli"
53
53
  },
54
54
  "dependencies": {
55
- "@supacloud/compiler": "^0.55.0",
55
+ "@supacloud/compiler": "^0.56.0",
56
56
  "@supacloud/delivery": "0.24.0",
57
57
  "@supacloud/db": "0.20.5",
58
58
  "typebox": "1.4.3"
@@ -64,7 +64,7 @@
64
64
  },
65
65
  "devDependencies": {
66
66
  "@supabase/supabase-js": "2.118.0",
67
- "@supacloud/elysia": "0.38.1",
67
+ "@supacloud/elysia": "0.39.0",
68
68
  "@types/bun": "^1.4.4",
69
69
  "effect": "4.0.5",
70
70
  "elysia": "2.0.0-rc.1",