riverbankcms 0.39.0 → 0.40.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/acceptance/matrix.mjs +60 -108
- package/dist/cli/index.mjs +67628 -127321
- package/dist/{entryCommands-Bhfzc_c4.mjs → entryCommands-DC808i9P.mjs} +6944 -18241
- package/dist/{eventUpsertInputSchema-DgHnVmg3.mjs → eventUpsertInputSchema-DkVayfO1.mjs} +12 -19
- package/dist/{load-config-PWdp7mfa.mjs → load-config-BHD3Ugbc.mjs} +30 -146
- package/dist/load-config-DZyvZVAv.mjs +2 -0
- package/dist/{plan--EcVgusE.mjs → plan-DPzqAUzU.mjs} +244 -369
- package/dist/scaffold/index.mjs +1 -4
- package/dist/{sdk-event-upsert-CJBftm7i.mjs → sdk-event-upsert-Ch_VUpkB.mjs} +3803 -15338
- package/dist/src-C5150tVc.mjs +4712 -0
- package/dist/testing.mjs +1 -6
- package/package.json +11 -10
- package/dist/load-config-CspDSzHj.mjs +0 -4
- package/dist/src-CnUjAAn9.mjs +0 -11890
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "../
|
|
3
|
-
|
|
4
|
-
import { t as eventUpsertInputSchema } from "../eventUpsertInputSchema-DgHnVmg3.mjs";
|
|
5
|
-
|
|
6
|
-
//#region src/acceptance/matrix-builders.ts
|
|
2
|
+
import { t as eventUpsertInputSchema } from "../eventUpsertInputSchema-DkVayfO1.mjs";
|
|
3
|
+
// src/acceptance/matrix-builders.ts
|
|
7
4
|
const workflow = (scenario, stepId) => ({
|
|
8
5
|
kind: "scratch_workflow",
|
|
9
6
|
scenario,
|
|
@@ -13,10 +10,6 @@ const localAdapter = (reason) => ({
|
|
|
13
10
|
kind: "local_adapter",
|
|
14
11
|
reason
|
|
15
12
|
});
|
|
16
|
-
const exploratory = (reason) => ({
|
|
17
|
-
kind: "exploratory_only",
|
|
18
|
-
reason
|
|
19
|
-
});
|
|
20
13
|
const scratchExecute = (args, options = {}) => ({
|
|
21
14
|
kind: "scratch_execute",
|
|
22
15
|
representative: {
|
|
@@ -85,56 +78,52 @@ const richText = (text) => ({
|
|
|
85
78
|
}]
|
|
86
79
|
}]
|
|
87
80
|
});
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
titleSource: null,
|
|
96
|
-
description: null,
|
|
97
|
-
category: "marketing",
|
|
98
|
-
icon: null,
|
|
99
|
-
tags: null,
|
|
100
|
-
fields: [{
|
|
101
|
-
id: "headline",
|
|
102
|
-
type: "text",
|
|
103
|
-
label: "Headline",
|
|
81
|
+
const manifestScenario = {
|
|
82
|
+
id: "manifest-validation",
|
|
83
|
+
steps: [writeFileStep("fixture", ".acceptance/manifest.json", {
|
|
84
|
+
blocks: [{
|
|
85
|
+
id: "custom.acceptance",
|
|
86
|
+
title: "Acceptance block",
|
|
87
|
+
titleSource: null,
|
|
104
88
|
description: null,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
layout: {
|
|
111
|
-
type: "section",
|
|
112
|
-
props: null,
|
|
113
|
-
children: [{
|
|
89
|
+
category: "marketing",
|
|
90
|
+
icon: null,
|
|
91
|
+
tags: null,
|
|
92
|
+
fields: [{
|
|
93
|
+
id: "headline",
|
|
114
94
|
type: "text",
|
|
95
|
+
label: "Headline",
|
|
96
|
+
description: null,
|
|
97
|
+
required: true,
|
|
98
|
+
defaultValue: null,
|
|
99
|
+
multiline: false,
|
|
100
|
+
maxLength: null
|
|
101
|
+
}],
|
|
102
|
+
layout: {
|
|
103
|
+
type: "section",
|
|
115
104
|
props: null,
|
|
116
|
-
children:
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
105
|
+
children: [{
|
|
106
|
+
type: "text",
|
|
107
|
+
props: null,
|
|
108
|
+
children: null,
|
|
109
|
+
$bind: {
|
|
110
|
+
from: "content.headline",
|
|
111
|
+
fallback: null,
|
|
112
|
+
transforms: null
|
|
113
|
+
},
|
|
114
|
+
$repeat: null,
|
|
115
|
+
$when: null
|
|
116
|
+
}],
|
|
117
|
+
$bind: null,
|
|
122
118
|
$repeat: null,
|
|
123
119
|
$when: null
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
customCssRules: null,
|
|
132
|
-
customCssAtRules: null,
|
|
133
|
-
fixRationale: null
|
|
134
|
-
};
|
|
135
|
-
const manifestScenario = {
|
|
136
|
-
id: "manifest-validation",
|
|
137
|
-
steps: [writeFileStep("fixture", ".acceptance/manifest.json", manifestFixture), commandStep("validate", "manifest validate", [
|
|
120
|
+
}
|
|
121
|
+
}],
|
|
122
|
+
themePatch: null,
|
|
123
|
+
customCssRules: null,
|
|
124
|
+
customCssAtRules: null,
|
|
125
|
+
fixRationale: null
|
|
126
|
+
}), commandStep("validate", "manifest validate", [
|
|
138
127
|
"manifest",
|
|
139
128
|
"validate",
|
|
140
129
|
"--file",
|
|
@@ -142,9 +131,7 @@ const manifestScenario = {
|
|
|
142
131
|
"--json"
|
|
143
132
|
])]
|
|
144
133
|
};
|
|
145
|
-
|
|
146
|
-
//#endregion
|
|
147
|
-
//#region src/acceptance/content-scenario.ts
|
|
134
|
+
// src/acceptance/content-scenario.ts
|
|
148
135
|
const contentEditPage = {
|
|
149
136
|
identifier: "acceptance-content-edit",
|
|
150
137
|
title: "Content edit fixture",
|
|
@@ -204,9 +191,7 @@ const contentScenario = {
|
|
|
204
191
|
], { changedPath: "content/pages/acceptance-content-edit.json" })
|
|
205
192
|
]
|
|
206
193
|
};
|
|
207
|
-
|
|
208
|
-
//#endregion
|
|
209
|
-
//#region src/acceptance/navigation-scenario.ts
|
|
194
|
+
// src/acceptance/navigation-scenario.ts
|
|
210
195
|
const navigationScenario = {
|
|
211
196
|
id: "navigation-lifecycle",
|
|
212
197
|
steps: [commandStep("upsert", "navigation upsert", [
|
|
@@ -231,9 +216,7 @@ const navigationScenario = {
|
|
|
231
216
|
"--json"
|
|
232
217
|
])]
|
|
233
218
|
};
|
|
234
|
-
|
|
235
|
-
//#endregion
|
|
236
|
-
//#region src/acceptance/booking-settings-scenario.ts
|
|
219
|
+
// src/acceptance/booking-settings-scenario.ts
|
|
237
220
|
const bookingSettingsScenario = {
|
|
238
221
|
id: "booking-settings-lifecycle",
|
|
239
222
|
steps: [
|
|
@@ -280,9 +263,7 @@ const bookingSettingsScenario = {
|
|
|
280
263
|
assertJsonFileStep("assert-presets", "content/settings.json", ["verticalConfig", "selectedPresetIds"], ["fitness_pt.group_training"])
|
|
281
264
|
]
|
|
282
265
|
};
|
|
283
|
-
|
|
284
|
-
//#endregion
|
|
285
|
-
//#region src/acceptance/event-scenario.ts
|
|
266
|
+
// src/acceptance/event-scenario.ts
|
|
286
267
|
const eventAcceptanceInput = eventUpsertInputSchema.parse({
|
|
287
268
|
title: "CLI acceptance event",
|
|
288
269
|
slug: "acceptance-event",
|
|
@@ -410,14 +391,10 @@ const eventScenario = {
|
|
|
410
391
|
])
|
|
411
392
|
]
|
|
412
393
|
};
|
|
413
|
-
|
|
414
|
-
//#endregion
|
|
415
|
-
//#region src/acceptance/media-scenario.ts
|
|
416
|
-
const ONE_PIXEL_PNG = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAOaQqR0AAAAASUVORK5CYII=";
|
|
417
394
|
const mediaScenario = {
|
|
418
395
|
id: "media-library-lifecycle",
|
|
419
396
|
steps: [
|
|
420
|
-
writeBase64FileStep("fixture", ".acceptance/media/acceptance-media.png",
|
|
397
|
+
writeBase64FileStep("fixture", ".acceptance/media/acceptance-media.png", "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAOaQqR0AAAAASUVORK5CYII="),
|
|
421
398
|
commandStep("add", "media add", [
|
|
422
399
|
"media",
|
|
423
400
|
"add",
|
|
@@ -578,9 +555,7 @@ const mediaScenario = {
|
|
|
578
555
|
}] })
|
|
579
556
|
]
|
|
580
557
|
};
|
|
581
|
-
|
|
582
|
-
//#endregion
|
|
583
|
-
//#region src/acceptance/matrix.ts
|
|
558
|
+
// src/acceptance/matrix.ts
|
|
584
559
|
const expectedCommandFailure = { expectedExitCode: 1 };
|
|
585
560
|
const entryScenario = {
|
|
586
561
|
id: "entry-lifecycle",
|
|
@@ -767,13 +742,7 @@ const blockScenario = {
|
|
|
767
742
|
])
|
|
768
743
|
]
|
|
769
744
|
};
|
|
770
|
-
|
|
771
|
-
* Every entry is keyed by the complete Commander leaf path. The automated
|
|
772
|
-
* runner executes representatives and grouped scratch workflows; provider and
|
|
773
|
-
* uninitialized-state commands remain explicit guided QA cases instead of being
|
|
774
|
-
* faked with made-up identifiers.
|
|
775
|
-
*/
|
|
776
|
-
const acceptanceTuples = [
|
|
745
|
+
const CLI_ACCEPTANCE_CASES = [
|
|
777
746
|
["push-config", scratchDryRun([
|
|
778
747
|
"push-config",
|
|
779
748
|
"--env=local",
|
|
@@ -1031,8 +1000,7 @@ const acceptanceTuples = [
|
|
|
1031
1000
|
cwd: "nested",
|
|
1032
1001
|
output: "non-empty"
|
|
1033
1002
|
})]
|
|
1034
|
-
]
|
|
1035
|
-
const CLI_ACCEPTANCE_CASES = acceptanceTuples.map(([path, disposition]) => ({
|
|
1003
|
+
].map(([path, disposition]) => ({
|
|
1036
1004
|
path,
|
|
1037
1005
|
disposition
|
|
1038
1006
|
}));
|
|
@@ -1050,14 +1018,10 @@ function leafCommandPaths(program) {
|
|
|
1050
1018
|
return paths;
|
|
1051
1019
|
}
|
|
1052
1020
|
function assertRepresentativeParity(entry, disposition) {
|
|
1053
|
-
if (disposition.representative.args.length === 0) {
|
|
1054
|
-
throw new Error(`CLI acceptance case ${entry.path} has no representative scratch invocation`);
|
|
1055
|
-
}
|
|
1021
|
+
if (disposition.representative.args.length === 0) throw new Error(`CLI acceptance case ${entry.path} has no representative scratch invocation`);
|
|
1056
1022
|
const pathTokens = entry.path.split(" ");
|
|
1057
1023
|
const representativePath = disposition.representative.args.slice(0, pathTokens.length);
|
|
1058
|
-
if (!pathTokens.every((token, index) => representativePath[index] === token)) {
|
|
1059
|
-
throw new Error(`CLI acceptance case ${entry.path} executes a different representative command`);
|
|
1060
|
-
}
|
|
1024
|
+
if (!pathTokens.every((token, index) => representativePath[index] === token)) throw new Error(`CLI acceptance case ${entry.path} executes a different representative command`);
|
|
1061
1025
|
}
|
|
1062
1026
|
function assertWorkflowScenarioReferences(scenario) {
|
|
1063
1027
|
const scenarioIndex = new Map(scenario.steps.map((step, index) => [step.id, index]));
|
|
@@ -1066,29 +1030,21 @@ function assertWorkflowScenarioReferences(scenario) {
|
|
|
1066
1030
|
for (const argument of step.args) {
|
|
1067
1031
|
if (argument.kind !== "capture") continue;
|
|
1068
1032
|
const captureIndex = scenarioIndex.get(argument.stepId);
|
|
1069
|
-
if (captureIndex ===
|
|
1070
|
-
throw new Error(`CLI acceptance scenario ${scenario.id} captures ${argument.stepId} before it is produced`);
|
|
1071
|
-
}
|
|
1033
|
+
if (captureIndex === void 0 || captureIndex >= index) throw new Error(`CLI acceptance scenario ${scenario.id} captures ${argument.stepId} before it is produced`);
|
|
1072
1034
|
}
|
|
1073
1035
|
}
|
|
1074
1036
|
}
|
|
1075
1037
|
function assertWorkflowParity(entry, disposition) {
|
|
1076
1038
|
const { scenario, stepId } = disposition;
|
|
1077
|
-
if (scenario.id.trim().length === 0 || scenario.steps.length === 0) {
|
|
1078
|
-
|
|
1079
|
-
}
|
|
1080
|
-
const steps = new Map();
|
|
1039
|
+
if (scenario.id.trim().length === 0 || scenario.steps.length === 0) throw new Error(`CLI acceptance case ${entry.path} has an empty workflow scenario`);
|
|
1040
|
+
const steps = /* @__PURE__ */ new Map();
|
|
1081
1041
|
for (const step of scenario.steps) {
|
|
1082
1042
|
if (steps.has(step.id)) throw new Error(`CLI acceptance scenario ${scenario.id} repeats step ${step.id}`);
|
|
1083
1043
|
steps.set(step.id, step);
|
|
1084
1044
|
}
|
|
1085
1045
|
const target = steps.get(stepId);
|
|
1086
|
-
if (!target || target.kind !== "command") {
|
|
1087
|
-
|
|
1088
|
-
}
|
|
1089
|
-
if (target.path !== entry.path) {
|
|
1090
|
-
throw new Error(`CLI acceptance case ${entry.path} targets workflow step ${stepId} (${target.path})`);
|
|
1091
|
-
}
|
|
1046
|
+
if (!target || target.kind !== "command") throw new Error(`CLI acceptance case ${entry.path} targets unknown workflow command step ${stepId}`);
|
|
1047
|
+
if (target.path !== entry.path) throw new Error(`CLI acceptance case ${entry.path} targets workflow step ${stepId} (${target.path})`);
|
|
1092
1048
|
assertWorkflowScenarioReferences(scenario);
|
|
1093
1049
|
}
|
|
1094
1050
|
function assertAcceptanceDisposition(entry) {
|
|
@@ -1102,9 +1058,7 @@ function assertAcceptanceDisposition(entry) {
|
|
|
1102
1058
|
return;
|
|
1103
1059
|
case "local_adapter":
|
|
1104
1060
|
case "exploratory_only":
|
|
1105
|
-
if (entry.disposition.reason.trim().length === 0) {
|
|
1106
|
-
throw new Error(`CLI acceptance case ${entry.path} has no disposition rationale`);
|
|
1107
|
-
}
|
|
1061
|
+
if (entry.disposition.reason.trim().length === 0) throw new Error(`CLI acceptance case ${entry.path} has no disposition rationale`);
|
|
1108
1062
|
return;
|
|
1109
1063
|
default: {
|
|
1110
1064
|
const unreachable = entry.disposition;
|
|
@@ -1120,6 +1074,4 @@ function assertCliAcceptanceParity(program) {
|
|
|
1120
1074
|
if (missing.length > 0 || stale.length > 0 || expected.size !== CLI_ACCEPTANCE_CASES.length) throw new Error(`CLI acceptance matrix drifted (missing: ${missing.join(", ") || "none"}; stale: ${stale.join(", ") || "none"}).`);
|
|
1121
1075
|
CLI_ACCEPTANCE_CASES.forEach(assertAcceptanceDisposition);
|
|
1122
1076
|
}
|
|
1123
|
-
|
|
1124
|
-
//#endregion
|
|
1125
|
-
export { CLI_ACCEPTANCE_CASES, assertCliAcceptanceParity, leafCommandPaths };
|
|
1077
|
+
export { CLI_ACCEPTANCE_CASES, assertCliAcceptanceParity, leafCommandPaths };
|