canopycms-cdk 0.0.67 → 0.0.68-int.93
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/lambda/asset-transform/dist/handler.js +52 -28
- package/package.json +4 -4
- package/worker/dist/index.js +691 -408
|
@@ -4304,7 +4304,8 @@ var init_field = __esm({
|
|
|
4304
4304
|
});
|
|
4305
4305
|
objectFieldSchema = fieldBaseSchema.extend({
|
|
4306
4306
|
type: external_exports.literal("object"),
|
|
4307
|
-
fields: external_exports.array(external_exports.lazy(() => fieldHolder[0])).min(1)
|
|
4307
|
+
fields: external_exports.array(external_exports.lazy(() => fieldHolder[0])).min(1),
|
|
4308
|
+
itemTitleField: external_exports.string().min(1).optional()
|
|
4308
4309
|
});
|
|
4309
4310
|
inlineGroupFieldSchema = external_exports.object({
|
|
4310
4311
|
type: external_exports.literal("group"),
|
|
@@ -4545,6 +4546,9 @@ var init_config = __esm({
|
|
|
4545
4546
|
defaultRemoteUrl: defaultRemoteUrlSchema.optional(),
|
|
4546
4547
|
gitBotAuthorName: gitBotAuthorNameSchema,
|
|
4547
4548
|
gitBotAuthorEmail: gitBotAuthorEmailSchema,
|
|
4549
|
+
// Unset reads as on for Edited-by and off for Co-authored-by (services.ts submitBranch).
|
|
4550
|
+
gitEditedByTrailers: external_exports.boolean().optional(),
|
|
4551
|
+
gitCoAuthoredByTrailers: external_exports.boolean().optional(),
|
|
4548
4552
|
githubTokenEnvVar: githubTokenEnvVarSchema.optional(),
|
|
4549
4553
|
// Required by design (follow-up to SEC-C1): a prod deploy that omits `mode` must fail
|
|
4550
4554
|
// validation loudly rather than silently running header-trusting dev auth semantics.
|
|
@@ -4556,7 +4560,6 @@ var init_config = __esm({
|
|
|
4556
4560
|
// Default false/unset — the standard AWS Lambda+worker topology must leave this unset.
|
|
4557
4561
|
allowNetworkRemoteInProd: external_exports.boolean().optional(),
|
|
4558
4562
|
settingsBranch: external_exports.string().optional(),
|
|
4559
|
-
autoCreateSettingsPR: external_exports.boolean().optional(),
|
|
4560
4563
|
// `.optional()`, NOT bare `deploymentNameSchema`: its own `.default('prod')` would make
|
|
4561
4564
|
// `parse(undefined)` resolve to 'prod' instead of staying `undefined`, collapsing the
|
|
4562
4565
|
// env > config > modeDefault precedence chain `resolveDeploymentName`
|
|
@@ -6858,7 +6861,7 @@ var require_node = __commonJS({
|
|
|
6858
6861
|
var tty = require("tty");
|
|
6859
6862
|
var util2 = require("util");
|
|
6860
6863
|
exports2.init = init;
|
|
6861
|
-
exports2.log =
|
|
6864
|
+
exports2.log = log11;
|
|
6862
6865
|
exports2.formatArgs = formatArgs;
|
|
6863
6866
|
exports2.save = save;
|
|
6864
6867
|
exports2.load = load;
|
|
@@ -6993,7 +6996,7 @@ var require_node = __commonJS({
|
|
|
6993
6996
|
}
|
|
6994
6997
|
return (/* @__PURE__ */ new Date()).toISOString() + " ";
|
|
6995
6998
|
}
|
|
6996
|
-
function
|
|
6999
|
+
function log11(...args) {
|
|
6997
7000
|
return process.stderr.write(util2.formatWithOptions(exports2.inspectOpts, ...args) + "\n");
|
|
6998
7001
|
}
|
|
6999
7002
|
function save(namespaces) {
|
|
@@ -7047,27 +7050,27 @@ var require_src2 = __commonJS({
|
|
|
7047
7050
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
7048
7051
|
var fs_1 = require("fs");
|
|
7049
7052
|
var debug_1 = __importDefault(require_src());
|
|
7050
|
-
var
|
|
7053
|
+
var log11 = debug_1.default("@kwsites/file-exists");
|
|
7051
7054
|
function check(path3, isFile, isDirectory) {
|
|
7052
|
-
|
|
7055
|
+
log11(`checking %s`, path3);
|
|
7053
7056
|
try {
|
|
7054
7057
|
const stat = fs_1.statSync(path3);
|
|
7055
7058
|
if (stat.isFile() && isFile) {
|
|
7056
|
-
|
|
7059
|
+
log11(`[OK] path represents a file`);
|
|
7057
7060
|
return true;
|
|
7058
7061
|
}
|
|
7059
7062
|
if (stat.isDirectory() && isDirectory) {
|
|
7060
|
-
|
|
7063
|
+
log11(`[OK] path represents a directory`);
|
|
7061
7064
|
return true;
|
|
7062
7065
|
}
|
|
7063
|
-
|
|
7066
|
+
log11(`[FAIL] path represents something other than a file or directory`);
|
|
7064
7067
|
return false;
|
|
7065
7068
|
} catch (e) {
|
|
7066
7069
|
if (e.code === "ENOENT") {
|
|
7067
|
-
|
|
7070
|
+
log11(`[FAIL] path is not accessible: %o`, e);
|
|
7068
7071
|
return false;
|
|
7069
7072
|
}
|
|
7070
|
-
|
|
7073
|
+
log11(`[FATAL] %o`, e);
|
|
7071
7074
|
throw e;
|
|
7072
7075
|
}
|
|
7073
7076
|
}
|
|
@@ -12661,7 +12664,7 @@ var require_merge2 = __commonJS({
|
|
|
12661
12664
|
var require_addPairToJSMap = __commonJS({
|
|
12662
12665
|
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/addPairToJSMap.js"(exports2) {
|
|
12663
12666
|
"use strict";
|
|
12664
|
-
var
|
|
12667
|
+
var log11 = require_log();
|
|
12665
12668
|
var merge = require_merge2();
|
|
12666
12669
|
var stringify = require_stringify2();
|
|
12667
12670
|
var identity = require_identity();
|
|
@@ -12710,7 +12713,7 @@ var require_addPairToJSMap = __commonJS({
|
|
|
12710
12713
|
let jsonStr = JSON.stringify(strKey);
|
|
12711
12714
|
if (jsonStr.length > 40)
|
|
12712
12715
|
jsonStr = jsonStr.substring(0, 36) + '..."';
|
|
12713
|
-
|
|
12716
|
+
log11.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.`);
|
|
12714
12717
|
ctx.mapKeyWarned = true;
|
|
12715
12718
|
}
|
|
12716
12719
|
return strKey;
|
|
@@ -18106,7 +18109,7 @@ var require_public_api = __commonJS({
|
|
|
18106
18109
|
var composer = require_composer();
|
|
18107
18110
|
var Document = require_Document();
|
|
18108
18111
|
var errors = require_errors();
|
|
18109
|
-
var
|
|
18112
|
+
var log11 = require_log();
|
|
18110
18113
|
var identity = require_identity();
|
|
18111
18114
|
var lineCounter = require_line_counter();
|
|
18112
18115
|
var parser4 = require_parser();
|
|
@@ -18158,7 +18161,7 @@ var require_public_api = __commonJS({
|
|
|
18158
18161
|
const doc = parseDocument2(src, options2);
|
|
18159
18162
|
if (!doc)
|
|
18160
18163
|
return null;
|
|
18161
|
-
doc.warnings.forEach((warning) =>
|
|
18164
|
+
doc.warnings.forEach((warning) => log11.warn(doc.options.logLevel, warning));
|
|
18162
18165
|
if (doc.errors.length > 0) {
|
|
18163
18166
|
if (doc.options.logLevel !== "silent")
|
|
18164
18167
|
throw doc.errors[0];
|
|
@@ -19195,7 +19198,7 @@ var require_dist_node5 = __commonJS({
|
|
|
19195
19198
|
}
|
|
19196
19199
|
function fetchWrapper(requestOptions) {
|
|
19197
19200
|
var _a3, _b, _c, _d;
|
|
19198
|
-
const
|
|
19201
|
+
const log11 = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;
|
|
19199
19202
|
const parseSuccessResponseBody = ((_a3 = requestOptions.request) == null ? void 0 : _a3.parseSuccessResponseBody) !== false;
|
|
19200
19203
|
if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) {
|
|
19201
19204
|
requestOptions.body = JSON.stringify(requestOptions.body);
|
|
@@ -19230,7 +19233,7 @@ var require_dist_node5 = __commonJS({
|
|
|
19230
19233
|
if ("deprecation" in headers) {
|
|
19231
19234
|
const matches = headers.link && headers.link.match(/<([^<>]+)>; rel="deprecation"/);
|
|
19232
19235
|
const deprecationLink = matches && matches.pop();
|
|
19233
|
-
|
|
19236
|
+
log11.warn(
|
|
19234
19237
|
`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`
|
|
19235
19238
|
);
|
|
19236
19239
|
}
|
|
@@ -24093,6 +24096,10 @@ var DebugLogger = class {
|
|
|
24093
24096
|
throw new Error(errorMsg);
|
|
24094
24097
|
}
|
|
24095
24098
|
}
|
|
24099
|
+
/**
|
|
24100
|
+
* Keyed by label alone, so two overlapping timers with one label overwrite each other;
|
|
24101
|
+
* anything that can run concurrently uses {@link timed}.
|
|
24102
|
+
*/
|
|
24096
24103
|
time(label) {
|
|
24097
24104
|
this.timers.set(label, Date.now());
|
|
24098
24105
|
}
|
|
@@ -24107,12 +24114,16 @@ var DebugLogger = class {
|
|
|
24107
24114
|
this.debug(category, `${label} completed`, { durationMs: duration });
|
|
24108
24115
|
return duration;
|
|
24109
24116
|
}
|
|
24117
|
+
/**
|
|
24118
|
+
* Log `<label> completed {durationMs}` once `fn` settles. The start time is local to the
|
|
24119
|
+
* call, so concurrent spans with the same label on one logger never overwrite each other.
|
|
24120
|
+
*/
|
|
24110
24121
|
async timed(category, label, fn) {
|
|
24111
|
-
|
|
24122
|
+
const start = Date.now();
|
|
24112
24123
|
try {
|
|
24113
24124
|
return await fn();
|
|
24114
24125
|
} finally {
|
|
24115
|
-
this.
|
|
24126
|
+
this.debug(category, `${label} completed`, { durationMs: Date.now() - start });
|
|
24116
24127
|
}
|
|
24117
24128
|
}
|
|
24118
24129
|
};
|
|
@@ -25722,11 +25733,11 @@ function taskCallback(task, response, callback = NOOP) {
|
|
|
25722
25733
|
response.then(onSuccess, onError2);
|
|
25723
25734
|
}
|
|
25724
25735
|
function addDeprecationNoticeToError(err2) {
|
|
25725
|
-
let
|
|
25736
|
+
let log11 = (name) => {
|
|
25726
25737
|
console.warn(
|
|
25727
25738
|
`simple-git deprecation notice: accessing GitResponseError.${name} should be GitResponseError.git.${name}, this will no longer be available in version 3`
|
|
25728
25739
|
);
|
|
25729
|
-
|
|
25740
|
+
log11 = NOOP;
|
|
25730
25741
|
};
|
|
25731
25742
|
return Object.create(err2, Object.getOwnPropertyNames(err2.git).reduce(descriptorReducer, {}));
|
|
25732
25743
|
function descriptorReducer(all, name) {
|
|
@@ -25737,7 +25748,7 @@ function addDeprecationNoticeToError(err2) {
|
|
|
25737
25748
|
enumerable: false,
|
|
25738
25749
|
configurable: false,
|
|
25739
25750
|
get() {
|
|
25740
|
-
|
|
25751
|
+
log11(name);
|
|
25741
25752
|
return err2.git[name];
|
|
25742
25753
|
}
|
|
25743
25754
|
};
|
|
@@ -28400,6 +28411,11 @@ init_flatten();
|
|
|
28400
28411
|
// ../canopycms/src/validation/entry-type-reference-validator.ts
|
|
28401
28412
|
init_validation2();
|
|
28402
28413
|
|
|
28414
|
+
// ../canopycms/src/utils/request-timing.ts
|
|
28415
|
+
var import_node_async_hooks = require("node:async_hooks");
|
|
28416
|
+
var storage = new import_node_async_hooks.AsyncLocalStorage();
|
|
28417
|
+
var log4 = createDebugLogger({ prefix: "CanopyCMS" });
|
|
28418
|
+
|
|
28403
28419
|
// ../canopycms/src/git-manager.ts
|
|
28404
28420
|
init_error();
|
|
28405
28421
|
|
|
@@ -28409,10 +28425,10 @@ init_error();
|
|
|
28409
28425
|
init_logger();
|
|
28410
28426
|
|
|
28411
28427
|
// ../canopycms/src/git-manager.ts
|
|
28412
|
-
var
|
|
28428
|
+
var log5 = createDebugLogger({ prefix: "GitManager" });
|
|
28413
28429
|
|
|
28414
28430
|
// ../canopycms/src/branch-workspace.ts
|
|
28415
|
-
var
|
|
28431
|
+
var log6 = createDebugLogger({ prefix: "BranchWorkspace" });
|
|
28416
28432
|
|
|
28417
28433
|
// ../canopycms/src/content-store.ts
|
|
28418
28434
|
var import_gray_matter2 = __toESM(require_gray_matter(), 1);
|
|
@@ -28523,7 +28539,7 @@ init_normalize();
|
|
|
28523
28539
|
init_error();
|
|
28524
28540
|
|
|
28525
28541
|
// ../canopycms/src/entry-link-resolver.ts
|
|
28526
|
-
var
|
|
28542
|
+
var log7 = createDebugLogger({ prefix: "EntryLinks" });
|
|
28527
28543
|
var BASE58_CHAR = "[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]";
|
|
28528
28544
|
var ENTRY_LINK_PATTERN = new RegExp(`entry:(${BASE58_CHAR}{12})(#[^\\s)>"']*)?`, "g");
|
|
28529
28545
|
|
|
@@ -30162,7 +30178,7 @@ init_operating_mode();
|
|
|
30162
30178
|
|
|
30163
30179
|
// ../canopycms/src/settings-workspace.ts
|
|
30164
30180
|
init_error();
|
|
30165
|
-
var
|
|
30181
|
+
var log8 = createDebugLogger({ prefix: "SettingsWorkspace" });
|
|
30166
30182
|
|
|
30167
30183
|
// ../canopycms/src/github-service.ts
|
|
30168
30184
|
var import_rest = __toESM(require_dist_node12(), 1);
|
|
@@ -30170,6 +30186,11 @@ var import_plugin_throttling = __toESM(require_dist_node13(), 1);
|
|
|
30170
30186
|
init_operating_mode();
|
|
30171
30187
|
init_error();
|
|
30172
30188
|
init_logger();
|
|
30189
|
+
|
|
30190
|
+
// ../canopycms/src/submission-attribution.ts
|
|
30191
|
+
init_logger();
|
|
30192
|
+
|
|
30193
|
+
// ../canopycms/src/github-service.ts
|
|
30173
30194
|
var ThrottledOctokit = import_rest.Octokit.plugin(import_plugin_throttling.throttling);
|
|
30174
30195
|
|
|
30175
30196
|
// ../canopycms/src/services.ts
|
|
@@ -30181,6 +30202,9 @@ var debugLogger = createDebugLogger({ prefix: "TaskQueue" });
|
|
|
30181
30202
|
// ../canopycms/src/task-queue/task-queue-config.ts
|
|
30182
30203
|
init_config3();
|
|
30183
30204
|
|
|
30205
|
+
// ../canopycms/src/services.ts
|
|
30206
|
+
init_error();
|
|
30207
|
+
|
|
30184
30208
|
// ../canopycms/src/url-path-resolver.ts
|
|
30185
30209
|
init_normalize();
|
|
30186
30210
|
|
|
@@ -30189,10 +30213,10 @@ var import_gray_matter3 = __toESM(require_gray_matter(), 1);
|
|
|
30189
30213
|
var import_yaml3 = __toESM(require_dist4(), 1);
|
|
30190
30214
|
init_content_id_index();
|
|
30191
30215
|
init_error();
|
|
30192
|
-
var
|
|
30216
|
+
var log9 = createDebugLogger({ prefix: "ContentListing" });
|
|
30193
30217
|
|
|
30194
30218
|
// ../canopycms/src/context.ts
|
|
30195
|
-
var
|
|
30219
|
+
var log10 = createDebugLogger({ prefix: "Context" });
|
|
30196
30220
|
|
|
30197
30221
|
// ../canopycms/src/server.ts
|
|
30198
30222
|
init_operating_mode();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "canopycms-cdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.68-int.93",
|
|
4
4
|
"description": "AWS CDK constructs and EC2 worker for CanopyCMS deployment",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"aws-cdk-lib": "^2.260.0",
|
|
33
33
|
"constructs": "^10.0.0",
|
|
34
|
-
"canopycms": "0.0.
|
|
34
|
+
"canopycms": "0.0.68-int.93"
|
|
35
35
|
},
|
|
36
36
|
"peerDependenciesMeta": {
|
|
37
37
|
"aws-cdk-lib": {
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"tsx": "^4.19.0",
|
|
57
57
|
"typescript": "^5.6.3",
|
|
58
58
|
"vitest": "^4.1.0",
|
|
59
|
-
"canopycms": "0.0.
|
|
60
|
-
"canopycms
|
|
59
|
+
"canopycms-auth-clerk": "0.0.68-int.93",
|
|
60
|
+
"canopycms": "0.0.68-int.93"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
63
|
"build": "rm -rf dist && tsc && node ../../scripts/add-js-extensions.mjs dist",
|