@supacloud/cli 0.56.1 → 0.56.3

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 +36 -33
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -219944,9 +219944,9 @@ import { lstat as lstat2, readFile as readFile6, realpath as realpath3, rename a
219944
219944
  import { dirname as dirname6, isAbsolute as isAbsolute22, relative as relative7, resolve as resolve82, sep as sep7 } from "node:path";
219945
219945
  var ts12 = __toESM(require_typescript(), 1);
219946
219946
  import { existsSync as existsSync42 } from "node:fs";
219947
- import { dirname as dirname8, join as join72, relative as relative11, sep as sep10 } from "node:path";
219947
+ import { dirname as dirname9, join as join82, relative as relative11, sep as sep10 } from "node:path";
219948
219948
  import { existsSync as existsSync52 } from "node:fs";
219949
- import { join as join82, resolve as resolve14 } from "node:path";
219949
+ import { join as join92, resolve as resolve15 } from "node:path";
219950
219950
  import { pathToFileURL as pathToFileURL2 } from "node:url";
219951
219951
  var __defProp2 = Object.defineProperty;
219952
219952
  var __returnValue2 = (v) => v;
@@ -220072,6 +220072,9 @@ function buildContractManifest(graph, artifacts) {
220072
220072
  ...command?.permission === undefined ? {} : { permission: command.permission },
220073
220073
  requestSchemas: Object.fromEntries(["body", "params", "query", "headers", "cookie"].flatMap((key) => route[key] === undefined ? [] : [[key, route[key]]])),
220074
220074
  ...route.response === undefined ? {} : { responseSchema: route.response },
220075
+ ...route.responses === undefined ? {} : {
220076
+ responseSchemas: Object.fromEntries(Object.entries(route.responses).sort(([left], [right]) => left.localeCompare(right)))
220077
+ },
220075
220078
  ...route.contract?.evidence === undefined ? {} : { evidence: route.contract.evidence }
220076
220079
  });
220077
220080
  }
@@ -230098,7 +230101,7 @@ function createContextPack(graph, subject) {
230098
230101
  }
230099
230102
  const modules = graph.modules.filter((module) => selected.has(module.name));
230100
230103
  const queryDocuments = graph.graphql?.documents.filter((file) => modules.some((module) => {
230101
- const path = relative11(dirname8(module.file), file);
230104
+ const path = relative11(dirname9(module.file), file);
230102
230105
  return path !== ".." && !path.startsWith(`..${sep10}`);
230103
230106
  })) ?? [];
230104
230107
  const graphql = graph.graphql ? {
@@ -230209,8 +230212,8 @@ function doctorProject(rootDir, outDir, graph, upToDate, diagnostics = []) {
230209
230212
  },
230210
230213
  {
230211
230214
  name: "tsconfig",
230212
- ok: existsSync42(join72(rootDir, "tsconfig.json")),
230213
- detail: existsSync42(join72(rootDir, "tsconfig.json")) ? "tsconfig.json found" : "tsconfig.json missing"
230215
+ ok: existsSync42(join82(rootDir, "tsconfig.json")),
230216
+ detail: existsSync42(join82(rootDir, "tsconfig.json")) ? "tsconfig.json found" : "tsconfig.json missing"
230214
230217
  },
230215
230218
  {
230216
230219
  name: "modules",
@@ -230324,8 +230327,8 @@ function validateGovernanceConfig(config) {
230324
230327
  function resolveSupacloudConfig(config = {}, cwd = process.cwd()) {
230325
230328
  const resolved = defineSupacloudConfig(config);
230326
230329
  return {
230327
- rootDir: resolve14(cwd, resolved.root ?? DEFAULT_SUPACLOUD_CONFIG.root),
230328
- outDir: resolve14(cwd, resolved.outDir ?? DEFAULT_SUPACLOUD_CONFIG.outDir),
230330
+ rootDir: resolve15(cwd, resolved.root ?? DEFAULT_SUPACLOUD_CONFIG.root),
230331
+ outDir: resolve15(cwd, resolved.outDir ?? DEFAULT_SUPACLOUD_CONFIG.outDir),
230329
230332
  include: resolved.include ?? [...DEFAULT_SUPACLOUD_CONFIG.include],
230330
230333
  strict: resolved.strict ?? DEFAULT_SUPACLOUD_CONFIG.strict,
230331
230334
  requireRouteContracts: resolved.requireRouteContracts ?? DEFAULT_SUPACLOUD_CONFIG.requireRouteContracts,
@@ -230343,16 +230346,16 @@ function resolveSupacloudConfig(config = {}, cwd = process.cwd()) {
230343
230346
  treeShakeUnusedProviders: resolved.treeShakeUnusedProviders ?? DEFAULT_SUPACLOUD_CONFIG.treeShakeUnusedProviders,
230344
230347
  graphql: resolved.graphql ? {
230345
230348
  ...resolved.graphql,
230346
- schema: resolve14(cwd, resolved.graphql.schema)
230349
+ schema: resolve15(cwd, resolved.graphql.schema)
230347
230350
  } : undefined
230348
230351
  };
230349
230352
  }
230350
230353
  async function loadSupacloudConfig(cwd = process.cwd()) {
230351
230354
  const candidates = [
230352
- join82(cwd, "supacloud.config.ts"),
230353
- join82(cwd, "supacloud.config.mts"),
230354
- join82(cwd, "supacloud.config.js"),
230355
- join82(cwd, "supacloud.config.mjs")
230355
+ join92(cwd, "supacloud.config.ts"),
230356
+ join92(cwd, "supacloud.config.mts"),
230357
+ join92(cwd, "supacloud.config.js"),
230358
+ join92(cwd, "supacloud.config.mjs")
230356
230359
  ];
230357
230360
  const configPath = candidates.find((candidate) => existsSync52(candidate));
230358
230361
  if (!configPath)
@@ -230617,7 +230620,7 @@ test("partial and untagged inherited remote profiles cannot mix with selected fi
230617
230620
  // ../compiler/package.json
230618
230621
  var package_default = {
230619
230622
  name: "@supacloud/compiler",
230620
- version: "0.24.0",
230623
+ version: "0.25.0",
230621
230624
  description: "Static compiler for @supacloud/app metadata: builds the application graph from AST, validates it, and generates reflection-free factory code",
230622
230625
  type: "module",
230623
230626
  main: "./dist/index.js",
@@ -233684,7 +233687,7 @@ var MUTATION_TOOL_SCHEMA = {
233684
233687
  import { execFileSync } from "node:child_process";
233685
233688
  import { createHash as createHash7 } from "node:crypto";
233686
233689
  import { existsSync as existsSync12, mkdirSync as mkdirSync4, readdirSync as readdirSync4, readFileSync as readFileSync9, writeFileSync as writeFileSync3 } from "node:fs";
233687
- import { dirname as dirname9, join as join14, relative as relative8, resolve as resolve15 } from "node:path";
233690
+ import { dirname as dirname8, join as join14, relative as relative8, resolve as resolve14 } from "node:path";
233688
233691
  var SAFE_PROJECT_REF = /^[A-Za-z0-9_-]{1,64}$/;
233689
233692
  var BACKUP_ID = /^logical-full_[A-Za-z0-9_-]{1,64}_[a-f0-9]{32}$/;
233690
233693
  var SHA256 = /^[a-f0-9]{64}$/;
@@ -233978,13 +233981,13 @@ function collectScopeFiles(cwd, file, files, dir, task) {
233978
233981
  const results = [];
233979
233982
  const resolvePathWithFallbacks = (filePath) => {
233980
233983
  const trimmed = filePath.trim();
233981
- const resolved = resolve15(cwd, trimmed);
233984
+ const resolved = resolve14(cwd, trimmed);
233982
233985
  if (existsSync12(resolved))
233983
233986
  return resolved;
233984
233987
  const candidates = [
233985
- resolve15(cwd, "supacloud/fa/release-scopes", trimmed),
233986
- resolve15(cwd, "release-scopes", trimmed),
233987
- resolve15(cwd, "scopes", trimmed)
233988
+ resolve14(cwd, "supacloud/fa/release-scopes", trimmed),
233989
+ resolve14(cwd, "release-scopes", trimmed),
233990
+ resolve14(cwd, "scopes", trimmed)
233988
233991
  ];
233989
233992
  const found = candidates.find(existsSync12);
233990
233993
  if (found)
@@ -234007,10 +234010,10 @@ function collectScopeFiles(cwd, file, files, dir, task) {
234007
234010
  if (!taskFilter && (!dir || typeof dir !== "string" || !dir.trim())) {
234008
234011
  throw new Error("At least one of --file, --files, or --task is required for scope_rebind");
234009
234012
  }
234010
- const candidates = typeof dir === "string" && dir.trim() ? [resolve15(cwd, dir.trim())] : [
234011
- resolve15(cwd, "supacloud/fa/release-scopes"),
234012
- resolve15(cwd, "release-scopes"),
234013
- resolve15(cwd, "scopes")
234013
+ const candidates = typeof dir === "string" && dir.trim() ? [resolve14(cwd, dir.trim())] : [
234014
+ resolve14(cwd, "supacloud/fa/release-scopes"),
234015
+ resolve14(cwd, "release-scopes"),
234016
+ resolve14(cwd, "scopes")
234014
234017
  ];
234015
234018
  for (const directory of candidates) {
234016
234019
  if (existsSync12(directory)) {
@@ -234044,7 +234047,7 @@ function collectScopeFiles(cwd, file, files, dir, task) {
234044
234047
  return [...new Set(results)];
234045
234048
  }
234046
234049
  function handleScopeRebind(args) {
234047
- const cwd = typeof args.cwd === "string" && args.cwd.trim() ? resolve15(args.cwd.trim()) : process.cwd();
234050
+ const cwd = typeof args.cwd === "string" && args.cwd.trim() ? resolve14(args.cwd.trim()) : process.cwd();
234048
234051
  const targetBaseCommit = resolveGitBaseCommit(cwd, args.base_commit);
234049
234052
  const scopeFiles = collectScopeFiles(cwd, args.file, args.files, args.dir, args.task);
234050
234053
  const dryRun = args.dry_run === true;
@@ -234096,17 +234099,17 @@ function handleScopeRebind(args) {
234096
234099
  });
234097
234100
  }
234098
234101
  function handleScopeInspect(args) {
234099
- const cwd = typeof args.cwd === "string" && args.cwd.trim() ? resolve15(args.cwd.trim()) : process.cwd();
234102
+ const cwd = typeof args.cwd === "string" && args.cwd.trim() ? resolve14(args.cwd.trim()) : process.cwd();
234100
234103
  if (typeof args.file !== "string" || !args.file.trim()) {
234101
234104
  throw new Error("'file' is required for scope_inspect");
234102
234105
  }
234103
234106
  const trimmed = args.file.trim();
234104
- let filePath = resolve15(cwd, trimmed);
234107
+ let filePath = resolve14(cwd, trimmed);
234105
234108
  if (!existsSync12(filePath)) {
234106
234109
  const candidates = [
234107
- resolve15(cwd, "supacloud/fa/release-scopes", trimmed),
234108
- resolve15(cwd, "release-scopes", trimmed),
234109
- resolve15(cwd, "scopes", trimmed)
234110
+ resolve14(cwd, "supacloud/fa/release-scopes", trimmed),
234111
+ resolve14(cwd, "release-scopes", trimmed),
234112
+ resolve14(cwd, "scopes", trimmed)
234110
234113
  ];
234111
234114
  const found = candidates.find(existsSync12);
234112
234115
  if (found)
@@ -234166,7 +234169,7 @@ function parseCommaList(value) {
234166
234169
  return [];
234167
234170
  }
234168
234171
  function handleScopeCreate(args, fallbackRef) {
234169
- const cwd = typeof args.cwd === "string" && args.cwd.trim() ? resolve15(args.cwd.trim()) : process.cwd();
234172
+ const cwd = typeof args.cwd === "string" && args.cwd.trim() ? resolve14(args.cwd.trim()) : process.cwd();
234170
234173
  if (typeof args.file !== "string" || !args.file.trim()) {
234171
234174
  throw new Error("'file' is required for scope_create");
234172
234175
  }
@@ -234181,8 +234184,8 @@ function handleScopeCreate(args, fallbackRef) {
234181
234184
  throw new Error("'ref' is invalid for release controls");
234182
234185
  }
234183
234186
  const targetBaseCommit = resolveGitBaseCommit(cwd, args.base_commit);
234184
- const filePath = resolve15(cwd, args.file.trim());
234185
- mkdirSync4(dirname9(filePath), { recursive: true });
234187
+ const filePath = resolve14(cwd, args.file.trim());
234188
+ mkdirSync4(dirname8(filePath), { recursive: true });
234186
234189
  const scope = {
234187
234190
  baseCommit: targetBaseCommit,
234188
234191
  excludedFunctions: parseCommaList(args.excluded_functions),
@@ -235832,7 +235835,7 @@ function registerRemoteDevTools(server2, options = {}) {
235832
235835
  // package.json
235833
235836
  var package_default4 = {
235834
235837
  name: "@supacloud/cli",
235835
- version: "0.56.1",
235838
+ version: "0.56.3",
235836
235839
  description: "Project-scoped CLI for SupaCloud users",
235837
235840
  type: "module",
235838
235841
  main: "./dist/index.js",
@@ -235865,7 +235868,7 @@ var package_default4 = {
235865
235868
  },
235866
235869
  dependencies: {
235867
235870
  "@sinclair/typebox": "^0.34.52",
235868
- "@supacloud/compiler": "^0.24.0",
235871
+ "@supacloud/compiler": "^0.25.0",
235869
235872
  "@supacloud/db": "^0.2.0",
235870
235873
  fflate: "^0.8.3"
235871
235874
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supacloud/cli",
3
- "version": "0.56.1",
3
+ "version": "0.56.3",
4
4
  "description": "Project-scoped CLI for SupaCloud users",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@sinclair/typebox": "^0.34.52",
36
- "@supacloud/compiler": "^0.24.0",
36
+ "@supacloud/compiler": "^0.25.0",
37
37
  "@supacloud/db": "^0.2.0",
38
38
  "fflate": "^0.8.3"
39
39
  },