@supacloud/cli 0.109.2 → 0.110.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/dist/index.js CHANGED
@@ -10045,13 +10045,22 @@ var reference = String2({ minLength: 1, maxLength: 128, pattern: "^[A-Za-z][A-Za
10045
10045
  var references = _Array_(reference, { uniqueItems: true });
10046
10046
  var kind = Union([Literal("api"), Literal("jobs"), Literal("webhook"), Literal("function")]);
10047
10047
  var isolation = Union([Literal("shared"), Literal("process")]);
10048
+ var targetName = String2({ pattern: "^[a-z][a-z0-9-]{0,62}$" });
10049
+ var functionSlug = String2({ pattern: "^[a-z][a-z0-9-]{0,62}$" });
10048
10050
  var mode = Union([Literal("required"), Literal("none")]);
10049
10051
  var DeliveryFilePathSchema = String2({
10050
10052
  maxLength: 512,
10051
10053
  pattern: "^(?:[A-Za-z0-9_-][A-Za-z0-9_.-]*/)*[A-Za-z0-9_-][A-Za-z0-9_.-]*$"
10052
10054
  });
10053
10055
  var functionTarget = _Object_({
10054
- slug: String2({ pattern: "^[a-z][a-z0-9-]{0,62}$" }),
10056
+ slug: functionSlug,
10057
+ entrypoint: DeliveryFilePathSchema,
10058
+ verifyJwt: Boolean2()
10059
+ }, objectOptions);
10060
+ var automaticFunction = _Object_({
10061
+ name: Optional(targetName),
10062
+ slug: functionSlug,
10063
+ modules: _Array_(reference, { minItems: 1, uniqueItems: true }),
10055
10064
  entrypoint: DeliveryFilePathSchema,
10056
10065
  verifyJwt: Boolean2()
10057
10066
  }, objectOptions);
@@ -10059,7 +10068,7 @@ var DeliveryOptionsSchema = _Object_({
10059
10068
  version: Literal(1),
10060
10069
  execution: Optional(WorkerExecutionSchema),
10061
10070
  targets: Optional(_Array_(_Object_({
10062
- name: String2({ pattern: "^[a-z][a-z0-9-]{0,62}$" }),
10071
+ name: targetName,
10063
10072
  kind,
10064
10073
  modules: Optional(_Array_(reference, { minItems: 1, uniqueItems: true })),
10065
10074
  isolation: Optional(isolation),
@@ -10067,6 +10076,7 @@ var DeliveryOptionsSchema = _Object_({
10067
10076
  compute: Optional(ComputeResourcesSchema),
10068
10077
  function: Optional(functionTarget)
10069
10078
  }, objectOptions))),
10079
+ functions: Optional(_Array_(automaticFunction, { maxItems: 32 })),
10070
10080
  runtime: Optional(_Object_({
10071
10081
  processIsolation: Boolean2(),
10072
10082
  durableQueue: Boolean2(),
@@ -10245,6 +10255,7 @@ var DeliveryObjectSchema = _Object_({
10245
10255
  Literal("compiled-module-factory"),
10246
10256
  Literal("bun-http-application"),
10247
10257
  Literal("bun-worker-application"),
10258
+ Literal("bun-function-application"),
10248
10259
  Literal("go-worker-application"),
10249
10260
  Literal("scriptc-worker-application")
10250
10261
  ]),
@@ -10320,7 +10331,7 @@ function parseDeliveryBuildManifest(value) {
10320
10331
  }
10321
10332
  for (const object of value.objects) {
10322
10333
  const target = value.plan.targets.find((target) => target.name === object.name);
10323
- if (["bun-worker-application", "go-worker-application", "scriptc-worker-application"].includes(object.entryKind) && target?.kind !== "jobs" || object.entryKind === "bun-http-application" && target?.kind === "jobs") {
10334
+ if (["bun-worker-application", "go-worker-application", "scriptc-worker-application"].includes(object.entryKind) && target?.kind !== "jobs" || object.entryKind === "bun-http-application" && target?.kind === "jobs" || object.entryKind === "bun-function-application" && target?.kind !== "function" || target?.kind === "function" && object.entryKind !== "bun-function-application") {
10324
10335
  throw new Error("Delivery executable kind does not match its target.");
10325
10336
  }
10326
10337
  if (new Set(object.files.map((file) => file.path)).size !== object.files.length || !object.files.some((file) => file.path === object.entrypoint) || deliveryObjectDigest(object) !== object.objectId) {
@@ -10441,7 +10452,7 @@ function parseApplicationReleaseRecord(candidate) {
10441
10452
  var ApplicationConfigurationIdSchema = String2({
10442
10453
  pattern: "^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$"
10443
10454
  });
10444
- var targetName = String2({ pattern: "^[a-z][a-z0-9-]{0,62}$" });
10455
+ var targetName2 = String2({ pattern: "^[a-z][a-z0-9-]{0,62}$" });
10445
10456
  var variableName = String2({ pattern: "^[A-Z][A-Z0-9_]{0,127}$" });
10446
10457
  var kind2 = Union([Literal("http"), Literal("worker")]);
10447
10458
  var hosts = _Array_(String2({ minLength: 1, maxLength: 253 }), { maxItems: 32, uniqueItems: true });
@@ -10449,7 +10460,7 @@ var bunVersion = String2({ pattern: "^\\d+\\.\\d+\\.\\d+$", maxLength: 32 });
10449
10460
  var ApplicationConfigurationSchema = _Object_({
10450
10461
  bun_version: bunVersion,
10451
10462
  targets: _Array_(_Object_({
10452
- name: targetName,
10463
+ name: targetName2,
10453
10464
  kind: kind2,
10454
10465
  hosts,
10455
10466
  environment: Record(variableName, String2({ maxLength: 16384 }), {
@@ -10472,7 +10483,7 @@ var ApplicationConfigurationViewSchema = _Object_({
10472
10483
  created_at: String2(),
10473
10484
  bun_version: bunVersion,
10474
10485
  targets: _Array_(_Object_({
10475
- name: targetName,
10486
+ name: targetName2,
10476
10487
  kind: kind2,
10477
10488
  hosts,
10478
10489
  environment_names: _Array_(variableName, { maxItems: 128, uniqueItems: true })
@@ -15220,7 +15231,8 @@ function projectedFunctionLimits(candidate) {
15220
15231
  timeout_ms: 900000,
15221
15232
  max_request_body_bytes: Number.MAX_SAFE_INTEGER,
15222
15233
  max_response_body_bytes: Number.MAX_SAFE_INTEGER,
15223
- wait_until_timeout_ms: 900000
15234
+ wait_until_timeout_ms: 900000,
15235
+ max_heap_bytes: 512 * 1024 * 1024
15224
15236
  };
15225
15237
  for (const field of Object.keys(maxima)) {
15226
15238
  const value = record[field];
@@ -15743,7 +15755,8 @@ var functionLimitsRecordSchema = _Object_({
15743
15755
  timeout_ms: Optional(Integer({ minimum: 1, maximum: 900000 })),
15744
15756
  max_request_body_bytes: Optional(Integer({ minimum: 1, maximum: Number.MAX_SAFE_INTEGER })),
15745
15757
  max_response_body_bytes: Optional(Integer({ minimum: 1, maximum: Number.MAX_SAFE_INTEGER })),
15746
- wait_until_timeout_ms: Optional(Integer({ minimum: 1, maximum: 900000 }))
15758
+ wait_until_timeout_ms: Optional(Integer({ minimum: 1, maximum: 900000 })),
15759
+ max_heap_bytes: Optional(Integer({ minimum: 1, maximum: 512 * 1024 * 1024 }))
15747
15760
  }, { additionalProperties: false });
15748
15761
  function parseFunctionLimits(input) {
15749
15762
  if (typeof input !== "string")
@@ -21684,10 +21697,10 @@ var starter_metadata_default = {
21684
21697
  generatedBy: "supacloud/starter-metadata-v1",
21685
21698
  packages: {
21686
21699
  compiler: {
21687
- version: "0.51.2"
21700
+ version: "0.52.0"
21688
21701
  },
21689
21702
  app: {
21690
- version: "0.33.0",
21703
+ version: "0.34.0",
21691
21704
  dependencies: {
21692
21705
  rxjs: "7.8.2"
21693
21706
  }
@@ -33234,7 +33247,7 @@ async function runProjectDeployment(http, args) {
33234
33247
  // package.json
33235
33248
  var package_default = {
33236
33249
  name: "@supacloud/cli",
33237
- version: "0.109.2",
33250
+ version: "0.110.0",
33238
33251
  description: "Project-scoped CLI for SupaCloud users",
33239
33252
  type: "module",
33240
33253
  main: "./dist/index.js",
@@ -33286,14 +33299,14 @@ var package_default = {
33286
33299
  directory: "packages/cli"
33287
33300
  },
33288
33301
  dependencies: {
33289
- "@supacloud/compiler": "^0.51.2",
33290
- "@supacloud/delivery": "0.21.1",
33302
+ "@supacloud/compiler": "^0.52.0",
33303
+ "@supacloud/delivery": "0.22.0",
33291
33304
  "@supacloud/db": "0.20.1",
33292
33305
  typebox: "1.4.2"
33293
33306
  },
33294
33307
  overrides: {
33295
33308
  "@supacloud/contracts": "0.15.1",
33296
- "@supacloud/delivery": "0.21.1",
33309
+ "@supacloud/delivery": "0.22.0",
33297
33310
  "@graphql-tools/utils": "^12.0.4"
33298
33311
  },
33299
33312
  devDependencies: {
@@ -11,6 +11,7 @@ type FunctionLimits = {
11
11
  max_request_body_bytes?: number;
12
12
  max_response_body_bytes?: number;
13
13
  wait_until_timeout_ms?: number;
14
+ max_heap_bytes?: number;
14
15
  };
15
16
  export type FunctionConfigInput = {
16
17
  verify_jwt?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supacloud/cli",
3
- "version": "0.109.2",
3
+ "version": "0.110.0",
4
4
  "description": "Project-scoped CLI for SupaCloud users",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -52,14 +52,14 @@
52
52
  "directory": "packages/cli"
53
53
  },
54
54
  "dependencies": {
55
- "@supacloud/compiler": "^0.51.2",
56
- "@supacloud/delivery": "0.21.1",
55
+ "@supacloud/compiler": "^0.52.0",
56
+ "@supacloud/delivery": "0.22.0",
57
57
  "@supacloud/db": "0.20.1",
58
58
  "typebox": "1.4.2"
59
59
  },
60
60
  "overrides": {
61
61
  "@supacloud/contracts": "0.15.1",
62
- "@supacloud/delivery": "0.21.1",
62
+ "@supacloud/delivery": "0.22.0",
63
63
  "@graphql-tools/utils": "^12.0.4"
64
64
  },
65
65
  "devDependencies": {