canopycms-cdk 0.0.59 → 0.0.61-int.74

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.
@@ -4380,7 +4380,7 @@ var init_media = __esm({
4380
4380
  });
4381
4381
 
4382
4382
  // ../canopycms/src/config/schemas/config.ts
4383
- var defaultBranchAccessSchema, defaultPathAccessSchema, defaultBaseBranchSchema, defaultRemoteNameSchema, defaultRemoteUrlSchema, gitBotAuthorNameSchema, gitBotAuthorEmailSchema, githubTokenEnvVarSchema, operatingModeSchema, deployedAsSchema, contentRootSchema, sourceRootSchema, deploymentNameSchema, devContentSyncSchema, devConfigSchema, editorConfigSchema, CanopyConfigSchema;
4383
+ var defaultBranchAccessSchema, defaultPathAccessLevelSchema, defaultPathAccessLevelsSchema, defaultPathAccessSchema, defaultBaseBranchSchema, defaultRemoteNameSchema, defaultRemoteUrlSchema, gitBotAuthorNameSchema, gitBotAuthorEmailSchema, githubTokenEnvVarSchema, operatingModeSchema, deployedAsSchema, contentRootSchema, sourceRootSchema, deploymentNameSchema, devContentSyncSchema, devConfigSchema, editorConfigSchema, CanopyConfigSchema;
4384
4384
  var init_config = __esm({
4385
4385
  "../canopycms/src/config/schemas/config.ts"() {
4386
4386
  "use strict";
@@ -4388,7 +4388,13 @@ var init_config = __esm({
4388
4388
  init_collection();
4389
4389
  init_media();
4390
4390
  defaultBranchAccessSchema = external_exports.enum(["allow", "deny"]).default("deny");
4391
- defaultPathAccessSchema = external_exports.enum(["allow", "deny"]).default("deny");
4391
+ defaultPathAccessLevelSchema = external_exports.enum(["allow", "deny"]);
4392
+ defaultPathAccessLevelsSchema = external_exports.object({
4393
+ read: defaultPathAccessLevelSchema.optional(),
4394
+ edit: defaultPathAccessLevelSchema.optional(),
4395
+ review: defaultPathAccessLevelSchema.optional()
4396
+ }).strict();
4397
+ defaultPathAccessSchema = external_exports.union([defaultPathAccessLevelSchema, defaultPathAccessLevelsSchema]).default("deny");
4392
4398
  defaultBaseBranchSchema = external_exports.string().default("main");
4393
4399
  defaultRemoteNameSchema = external_exports.string().default("origin");
4394
4400
  defaultRemoteUrlSchema = external_exports.string().min(1);
@@ -4421,6 +4427,10 @@ var init_config = __esm({
4421
4427
  // have .default('deny'), so the field is optional on input but always resolves to
4422
4428
  // 'allow'/'deny' (never undefined) on output. An outer .optional() would short-circuit
4423
4429
  // before the inner default runs, defeating the fail-closed default (SCH-M1).
4430
+ // defaultPathAccessSchema's union keeps the same rule: the .default('deny') sits on the
4431
+ // OUTER union, not inside defaultPathAccessLevelsSchema, so an omitted top-level field
4432
+ // still resolves to 'deny' and an omitted level inside the object form stays undefined
4433
+ // (resolved to 'deny' at read time by resolveDefaultPathAccess).
4424
4434
  defaultBranchAccess: defaultBranchAccessSchema,
4425
4435
  defaultPathAccess: defaultPathAccessSchema,
4426
4436
  // .optional() deliberately defeats defaultBaseBranchSchema's .default('main'):
@@ -6727,7 +6737,7 @@ var require_node = __commonJS({
6727
6737
  var tty = require("tty");
6728
6738
  var util2 = require("util");
6729
6739
  exports2.init = init;
6730
- exports2.log = log9;
6740
+ exports2.log = log10;
6731
6741
  exports2.formatArgs = formatArgs;
6732
6742
  exports2.save = save;
6733
6743
  exports2.load = load;
@@ -6862,7 +6872,7 @@ var require_node = __commonJS({
6862
6872
  }
6863
6873
  return (/* @__PURE__ */ new Date()).toISOString() + " ";
6864
6874
  }
6865
- function log9(...args) {
6875
+ function log10(...args) {
6866
6876
  return process.stderr.write(util2.formatWithOptions(exports2.inspectOpts, ...args) + "\n");
6867
6877
  }
6868
6878
  function save(namespaces) {
@@ -6916,27 +6926,27 @@ var require_src2 = __commonJS({
6916
6926
  Object.defineProperty(exports2, "__esModule", { value: true });
6917
6927
  var fs_1 = require("fs");
6918
6928
  var debug_1 = __importDefault(require_src());
6919
- var log9 = debug_1.default("@kwsites/file-exists");
6929
+ var log10 = debug_1.default("@kwsites/file-exists");
6920
6930
  function check(path3, isFile, isDirectory) {
6921
- log9(`checking %s`, path3);
6931
+ log10(`checking %s`, path3);
6922
6932
  try {
6923
6933
  const stat = fs_1.statSync(path3);
6924
6934
  if (stat.isFile() && isFile) {
6925
- log9(`[OK] path represents a file`);
6935
+ log10(`[OK] path represents a file`);
6926
6936
  return true;
6927
6937
  }
6928
6938
  if (stat.isDirectory() && isDirectory) {
6929
- log9(`[OK] path represents a directory`);
6939
+ log10(`[OK] path represents a directory`);
6930
6940
  return true;
6931
6941
  }
6932
- log9(`[FAIL] path represents something other than a file or directory`);
6942
+ log10(`[FAIL] path represents something other than a file or directory`);
6933
6943
  return false;
6934
6944
  } catch (e) {
6935
6945
  if (e.code === "ENOENT") {
6936
- log9(`[FAIL] path is not accessible: %o`, e);
6946
+ log10(`[FAIL] path is not accessible: %o`, e);
6937
6947
  return false;
6938
6948
  }
6939
- log9(`[FATAL] %o`, e);
6949
+ log10(`[FATAL] %o`, e);
6940
6950
  throw e;
6941
6951
  }
6942
6952
  }
@@ -12528,7 +12538,7 @@ var require_merge2 = __commonJS({
12528
12538
  var require_addPairToJSMap = __commonJS({
12529
12539
  "../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/addPairToJSMap.js"(exports2) {
12530
12540
  "use strict";
12531
- var log9 = require_log();
12541
+ var log10 = require_log();
12532
12542
  var merge = require_merge2();
12533
12543
  var stringify = require_stringify2();
12534
12544
  var identity = require_identity();
@@ -12577,7 +12587,7 @@ var require_addPairToJSMap = __commonJS({
12577
12587
  let jsonStr = JSON.stringify(strKey);
12578
12588
  if (jsonStr.length > 40)
12579
12589
  jsonStr = jsonStr.substring(0, 36) + '..."';
12580
- log9.warn(ctx.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${jsonStr}. Set mapAsMap: true to use object keys.`);
12590
+ log10.warn(ctx.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${jsonStr}. Set mapAsMap: true to use object keys.`);
12581
12591
  ctx.mapKeyWarned = true;
12582
12592
  }
12583
12593
  return strKey;
@@ -17973,7 +17983,7 @@ var require_public_api = __commonJS({
17973
17983
  var composer = require_composer();
17974
17984
  var Document = require_Document();
17975
17985
  var errors = require_errors();
17976
- var log9 = require_log();
17986
+ var log10 = require_log();
17977
17987
  var identity = require_identity();
17978
17988
  var lineCounter = require_line_counter();
17979
17989
  var parser4 = require_parser();
@@ -18025,7 +18035,7 @@ var require_public_api = __commonJS({
18025
18035
  const doc = parseDocument(src, options2);
18026
18036
  if (!doc)
18027
18037
  return null;
18028
- doc.warnings.forEach((warning) => log9.warn(doc.options.logLevel, warning));
18038
+ doc.warnings.forEach((warning) => log10.warn(doc.options.logLevel, warning));
18029
18039
  if (doc.errors.length > 0) {
18030
18040
  if (doc.options.logLevel !== "silent")
18031
18041
  throw doc.errors[0];
@@ -19062,7 +19072,7 @@ var require_dist_node5 = __commonJS({
19062
19072
  }
19063
19073
  function fetchWrapper(requestOptions) {
19064
19074
  var _a3, _b, _c, _d;
19065
- const log9 = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;
19075
+ const log10 = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;
19066
19076
  const parseSuccessResponseBody = ((_a3 = requestOptions.request) == null ? void 0 : _a3.parseSuccessResponseBody) !== false;
19067
19077
  if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) {
19068
19078
  requestOptions.body = JSON.stringify(requestOptions.body);
@@ -19097,7 +19107,7 @@ var require_dist_node5 = __commonJS({
19097
19107
  if ("deprecation" in headers) {
19098
19108
  const matches = headers.link && headers.link.match(/<([^<>]+)>; rel="deprecation"/);
19099
19109
  const deprecationLink = matches && matches.pop();
19100
- log9.warn(
19110
+ log10.warn(
19101
19111
  `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`
19102
19112
  );
19103
19113
  }
@@ -25585,11 +25595,11 @@ function taskCallback(task, response, callback = NOOP) {
25585
25595
  response.then(onSuccess, onError2);
25586
25596
  }
25587
25597
  function addDeprecationNoticeToError(err2) {
25588
- let log9 = (name) => {
25598
+ let log10 = (name) => {
25589
25599
  console.warn(
25590
25600
  `simple-git deprecation notice: accessing GitResponseError.${name} should be GitResponseError.git.${name}, this will no longer be available in version 3`
25591
25601
  );
25592
- log9 = NOOP;
25602
+ log10 = NOOP;
25593
25603
  };
25594
25604
  return Object.create(err2, Object.getOwnPropertyNames(err2.git).reduce(descriptorReducer, {}));
25595
25605
  function descriptorReducer(all, name) {
@@ -25600,7 +25610,7 @@ function addDeprecationNoticeToError(err2) {
25600
25610
  enumerable: false,
25601
25611
  configurable: false,
25602
25612
  get() {
25603
- log9(name);
25613
+ log10(name);
25604
25614
  return err2.git[name];
25605
25615
  }
25606
25616
  };
@@ -29882,9 +29892,12 @@ var permissionPathSchema = external_exports.string().min(1).transform((val, ctx)
29882
29892
  return result.path;
29883
29893
  });
29884
29894
  var PermissionsFileSchema = external_exports.object({
29885
- version: external_exports.literal(1),
29886
- contentVersion: external_exports.number().optional(),
29887
- // For optimistic locking
29895
+ // Managed by writeOccJsonFile (see authorization/settings-file-store.ts) —
29896
+ // the single OCC counter for this file. Optional so a hand-written file
29897
+ // with no version field parses as version 0. A legacy `contentVersion`
29898
+ // field (if present) is silently stripped by this non-strict zod parse.
29899
+ version: external_exports.number().int().nonnegative().optional(),
29900
+ writeId: external_exports.string().optional(),
29888
29901
  updatedAt: external_exports.string().datetime(),
29889
29902
  updatedBy: external_exports.string(),
29890
29903
  pathPermissions: external_exports.array(
@@ -29900,12 +29913,18 @@ var PermissionsFileSchema = external_exports.object({
29900
29913
  // ../canopycms/src/authorization/permissions/loader.ts
29901
29914
  init_operating_mode();
29902
29915
 
29916
+ // ../canopycms/src/authorization/settings-file-store.ts
29917
+ init_error();
29918
+
29903
29919
  // ../canopycms/src/authorization/groups/schema.ts
29904
29920
  init_zod();
29905
29921
  var GroupsFileSchema = external_exports.object({
29906
- version: external_exports.literal(1),
29907
- contentVersion: external_exports.number().optional(),
29908
- // For optimistic locking
29922
+ // Managed by writeOccJsonFile (see authorization/settings-file-store.ts) —
29923
+ // the single OCC counter for this file. Optional so a hand-written file
29924
+ // with no version field parses as version 0. A legacy `contentVersion`
29925
+ // field (if present) is silently stripped by this non-strict zod parse.
29926
+ version: external_exports.number().int().nonnegative().optional(),
29927
+ writeId: external_exports.string().optional(),
29909
29928
  updatedAt: external_exports.string().datetime(),
29910
29929
  updatedBy: external_exports.string(),
29911
29930
  groups: external_exports.array(
@@ -29952,6 +29971,9 @@ init_error();
29952
29971
  init_id();
29953
29972
  var log8 = createDebugLogger({ prefix: "ContentListing" });
29954
29973
 
29974
+ // ../canopycms/src/context.ts
29975
+ var log9 = createDebugLogger({ prefix: "Context" });
29976
+
29955
29977
  // ../canopycms/src/server.ts
29956
29978
  init_operating_mode();
29957
29979
  init_schema();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "canopycms-cdk",
3
- "version": "0.0.59",
3
+ "version": "0.0.61-int.74",
4
4
  "description": "AWS CDK constructs and EC2 worker for CanopyCMS deployment",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -53,8 +53,8 @@
53
53
  "tsx": "^4.19.0",
54
54
  "typescript": "^5.6.3",
55
55
  "vitest": "^4.1.0",
56
- "canopycms": "0.0.59",
57
- "canopycms-auth-clerk": "0.0.59"
56
+ "canopycms": "0.0.61-int.74",
57
+ "canopycms-auth-clerk": "0.0.61-int.74"
58
58
  },
59
59
  "scripts": {
60
60
  "build": "tsc",