riverbankcms 0.22.0 → 0.22.1
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 +3 -3
- package/dist/cli/index.mjs +1087 -429
- package/dist/{entryCommands-CoGu0G2R.mjs → entryCommands-Bu-z9kxb.mjs} +176 -76
- package/dist/{eventUpsertInputSchema-B0ubhUu5.mjs → eventUpsertInputSchema-xHmuEKwM.mjs} +2 -2
- package/dist/load-config-BRd0EUsF.mjs +4 -0
- package/dist/{load-config-j58KSqxl.mjs → load-config-pAPKpeE0.mjs} +2 -2
- package/dist/{plan-C4IphkPc.mjs → plan-DUdJbgTV.mjs} +1 -1
- package/dist/scaffold/index.mjs +2 -2
- package/dist/{sdk-event-upsert-BqjzK2zT.mjs → sdk-event-upsert-B3gflo1K.mjs} +344 -133
- package/dist/{src-zzwJUef5.mjs → src-RfhyMOpX.mjs} +133 -81
- package/dist/testing.mjs +4 -4
- package/package.json +1 -1
- package/dist/load-config-Kg45qY-N.mjs +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $t as
|
|
3
|
-
import {
|
|
4
|
-
import { n as CliSdkPeerError, t as loadConfigFile } from "./load-config-
|
|
2
|
+
import { $t as pageDesignIntentSchemaVersion, A as getSiteCommandMetadata, B as eventBookingOfferIntentSchema, Dn as getDirectImageUrlForSiteScopedPath, E as parseAndPlanCommandBatchForTypes, Gn as getExtensionForMimeType, Hn as slugifyMediaIdentifier, J as createCommandRef, Jn as normalizeAmbiguousStoragePathForSite, Kn as getMimeType, O as evaluateSiteCommandBatchExposure, P as entryIdentifierForCommand, Qt as pageDesignBoundaryTreatmentSchema, Rn as buildMediaIdentifierFromFilename, T as createDryRunReport, Vn as resolveMediaIdentifier, Wt as buttonStyleSelectionSchema, Xn as FILE_SIZE_LIMITS, Y as createContentEntryRef, Zn as MAX_MANAGEMENT_MEDIA_UPLOAD_BYTES, at as slugPart, en as footerPreferencesSchema, fr as asPageFlowPresetId, k as evaluateSiteCommandExposure, lr as asAppearancePresetId, m as isInternalResolvedLinkValue, n as sdkCourseBookingSettingsSchema, nt as createSiteCommandSiteRef, pr as asSiteStyleId, r as sdkEventOccurrenceInputSchema, s as RESOLVED_INTERNAL_LINK_ENTITY_TYPES, w as stableStringify, wt as themeSchema, x as resolvePageUpsertSeo, y as eventVisibilitySchema } from "./sdk-event-upsert-B3gflo1K.mjs";
|
|
3
|
+
import { Hn as ok, In as unsafeAsStaffMemberId, M as parseFooterCompositionV1, Qt as assertNever, S as parseManagementKey, Sn as unsafeAsEventSeriesId, Tn as unsafeAsOccurrenceId, Vn as err, a as canonicalizeConfiguredBookingVerticalConfig, b as createSecret, c as resolveSiteVerticalBookingConfig, fn as unsafeAsAppointmentResourceId, i as areConfiguredBookingVerticalConfigsEqual, l as DEFAULT_EVENT_TYPE_PRESETS, ln as parseSiteId, m as publicReadFreshnessSeconds, o as parseVerticalId, s as parseVerticalPresetId, sn as parsePageId, t as resolveEventCatalogue, u as EVENT_PRESET_VALUES, x as exposeSecret, xn as unsafeAsEventOfferingId } from "./src-RfhyMOpX.mjs";
|
|
4
|
+
import { n as CliSdkPeerError, t as loadConfigFile } from "./load-config-pAPKpeE0.mjs";
|
|
5
5
|
import { Command } from "commander";
|
|
6
6
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
7
7
|
import * as fs$1 from "fs/promises";
|
|
@@ -414,6 +414,12 @@ const newsletterUsageLocationSchemas = [z.object({
|
|
|
414
414
|
campaignName: z.string()
|
|
415
415
|
})];
|
|
416
416
|
const mediaUsageLocationSchema = z.discriminatedUnion("kind", [
|
|
417
|
+
z.object({
|
|
418
|
+
kind: z.literal("appointmentService"),
|
|
419
|
+
siteId: identifierSchema,
|
|
420
|
+
serviceId: identifierSchema,
|
|
421
|
+
serviceTitle: z.string()
|
|
422
|
+
}),
|
|
417
423
|
...newsletterUsageLocationSchemas,
|
|
418
424
|
z.object({
|
|
419
425
|
kind: z.literal("pageBlock"),
|
|
@@ -661,6 +667,8 @@ const sdkPullTruncationSchema = z.union([
|
|
|
661
667
|
})
|
|
662
668
|
]);
|
|
663
669
|
const sdkPullPageSchema = z.object({
|
|
670
|
+
seoTitle: z.string().nullable().optional(),
|
|
671
|
+
seoDescription: z.string().nullable().optional(),
|
|
664
672
|
id: sdkIdentifierSchema$1,
|
|
665
673
|
identifier: sdkIdentifierSchema$1,
|
|
666
674
|
title: z.string(),
|
|
@@ -1839,6 +1847,34 @@ function createHttpClient(config) {
|
|
|
1839
1847
|
};
|
|
1840
1848
|
}
|
|
1841
1849
|
|
|
1850
|
+
//#endregion
|
|
1851
|
+
//#region ../management-client/src/appointmentServices.ts
|
|
1852
|
+
function createAppointmentServiceOperations(http) {
|
|
1853
|
+
return {
|
|
1854
|
+
async list() {
|
|
1855
|
+
const result = await http.get("/appointment-services");
|
|
1856
|
+
return result.services;
|
|
1857
|
+
},
|
|
1858
|
+
async get(serviceId) {
|
|
1859
|
+
try {
|
|
1860
|
+
const result = await http.get(`/appointment-services/${encodeURIComponent(serviceId)}`);
|
|
1861
|
+
return result.service;
|
|
1862
|
+
} catch (error) {
|
|
1863
|
+
if (is404Error(error)) return null;
|
|
1864
|
+
throw error;
|
|
1865
|
+
}
|
|
1866
|
+
},
|
|
1867
|
+
async create(input) {
|
|
1868
|
+
const result = await http.post("/appointment-services", input, "write");
|
|
1869
|
+
return result.service;
|
|
1870
|
+
},
|
|
1871
|
+
async update(serviceId, input) {
|
|
1872
|
+
const result = await http.patch(`/appointment-services/${encodeURIComponent(serviceId)}`, input);
|
|
1873
|
+
return result.service;
|
|
1874
|
+
}
|
|
1875
|
+
};
|
|
1876
|
+
}
|
|
1877
|
+
|
|
1842
1878
|
//#endregion
|
|
1843
1879
|
//#region ../management-client/src/entries.ts
|
|
1844
1880
|
/**
|
|
@@ -1907,6 +1943,8 @@ function mapPulledPage(page) {
|
|
|
1907
1943
|
id: page.id,
|
|
1908
1944
|
identifier: page.identifier,
|
|
1909
1945
|
title: page.title,
|
|
1946
|
+
...page.seoTitle !== undefined ? { seoTitle: page.seoTitle } : {},
|
|
1947
|
+
...page.seoDescription !== undefined ? { seoDescription: page.seoDescription } : {},
|
|
1910
1948
|
path: page.path,
|
|
1911
1949
|
status: page.status,
|
|
1912
1950
|
hasUnpublishedChanges: page.hasUnpublishedChanges,
|
|
@@ -2617,6 +2655,7 @@ function createManagementClient(config) {
|
|
|
2617
2655
|
}
|
|
2618
2656
|
const http = createHttpClient(config);
|
|
2619
2657
|
return {
|
|
2658
|
+
appointmentServices: createAppointmentServiceOperations(http),
|
|
2620
2659
|
entries: createEntryOperations(http),
|
|
2621
2660
|
pages: createPageOperations(http),
|
|
2622
2661
|
blocks: createBlockOperations(http),
|
|
@@ -6357,6 +6396,47 @@ const SDK_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
6357
6396
|
}
|
|
6358
6397
|
});
|
|
6359
6398
|
|
|
6399
|
+
//#endregion
|
|
6400
|
+
//#region ../api/src/sdkAppointmentServiceEndpointDefinitions.ts
|
|
6401
|
+
const SDK_APPOINTMENT_SERVICE_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
6402
|
+
sdkListAppointmentServices: {
|
|
6403
|
+
path: "/sdk/{siteId}/appointment-services",
|
|
6404
|
+
method: "GET",
|
|
6405
|
+
auth: "service",
|
|
6406
|
+
responseKind: "json",
|
|
6407
|
+
errors: ["server:internal_error"]
|
|
6408
|
+
},
|
|
6409
|
+
sdkCreateAppointmentService: {
|
|
6410
|
+
path: "/sdk/{siteId}/appointment-services",
|
|
6411
|
+
method: "POST",
|
|
6412
|
+
auth: "service",
|
|
6413
|
+
responseKind: "json",
|
|
6414
|
+
errors: [
|
|
6415
|
+
"validation:invalid_input",
|
|
6416
|
+
"resource:not_found",
|
|
6417
|
+
"server:internal_error"
|
|
6418
|
+
]
|
|
6419
|
+
},
|
|
6420
|
+
sdkGetAppointmentService: {
|
|
6421
|
+
path: "/sdk/{siteId}/appointment-services/{serviceId}",
|
|
6422
|
+
method: "GET",
|
|
6423
|
+
auth: "service",
|
|
6424
|
+
responseKind: "json",
|
|
6425
|
+
errors: ["resource:not_found", "server:internal_error"]
|
|
6426
|
+
},
|
|
6427
|
+
sdkUpdateAppointmentService: {
|
|
6428
|
+
path: "/sdk/{siteId}/appointment-services/{serviceId}",
|
|
6429
|
+
method: "PATCH",
|
|
6430
|
+
auth: "service",
|
|
6431
|
+
responseKind: "json",
|
|
6432
|
+
errors: [
|
|
6433
|
+
"validation:invalid_input",
|
|
6434
|
+
"resource:not_found",
|
|
6435
|
+
"server:internal_error"
|
|
6436
|
+
]
|
|
6437
|
+
}
|
|
6438
|
+
});
|
|
6439
|
+
|
|
6360
6440
|
//#endregion
|
|
6361
6441
|
//#region ../api/src/sdkPageDesignEndpointDefinitions.ts
|
|
6362
6442
|
/**
|
|
@@ -12404,6 +12484,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
12404
12484
|
auth: "service",
|
|
12405
12485
|
responseKind: "json"
|
|
12406
12486
|
},
|
|
12487
|
+
...SDK_APPOINTMENT_SERVICE_ENDPOINT_DEFINITIONS,
|
|
12407
12488
|
sdkUpsertEventCategory: {
|
|
12408
12489
|
path: "/sdk/{siteId}/event-categories",
|
|
12409
12490
|
method: "POST",
|
|
@@ -17095,6 +17176,8 @@ function convertPulledPagesToLocal(remotePages) {
|
|
|
17095
17176
|
return remotePages.map((page) => ({
|
|
17096
17177
|
identifier: page.identifier,
|
|
17097
17178
|
title: page.title,
|
|
17179
|
+
...page.seoTitle != null ? { seoTitle: page.seoTitle } : {},
|
|
17180
|
+
...page.seoDescription != null ? { seoDescription: page.seoDescription } : {},
|
|
17098
17181
|
path: page.path,
|
|
17099
17182
|
status: page.status,
|
|
17100
17183
|
hasUnpublishedChanges: page.hasUnpublishedChanges,
|
|
@@ -20831,6 +20914,18 @@ function calculateEntryDiffs(localEntries, remoteEntries, options) {
|
|
|
20831
20914
|
};
|
|
20832
20915
|
}
|
|
20833
20916
|
|
|
20917
|
+
//#endregion
|
|
20918
|
+
//#region src/site-commands/pageMetadata.ts
|
|
20919
|
+
/** The supported metadata sent by a CLI page upsert; empty SEO is omitted. */
|
|
20920
|
+
function pageMetadataForUpsert(page) {
|
|
20921
|
+
return {
|
|
20922
|
+
title: page.title,
|
|
20923
|
+
path: page.path,
|
|
20924
|
+
...page.seoTitle ? { seoTitle: page.seoTitle } : {},
|
|
20925
|
+
...page.seoDescription ? { seoDescription: page.seoDescription } : {}
|
|
20926
|
+
};
|
|
20927
|
+
}
|
|
20928
|
+
|
|
20834
20929
|
//#endregion
|
|
20835
20930
|
//#region src/sync/pageDiff.ts
|
|
20836
20931
|
function createPageSummary() {
|
|
@@ -20879,7 +20974,9 @@ function recordBlockDiff(summary, diff) {
|
|
|
20879
20974
|
case "unchanged":
|
|
20880
20975
|
summary.unchanged++;
|
|
20881
20976
|
break;
|
|
20882
|
-
case "reorder":
|
|
20977
|
+
case "reorder":
|
|
20978
|
+
summary.update++;
|
|
20979
|
+
break;
|
|
20883
20980
|
}
|
|
20884
20981
|
}
|
|
20885
20982
|
function createBlockDiffs(blocks, pageIdentifier, summary) {
|
|
@@ -20922,64 +21019,47 @@ function classifyBlock(localBlock, remoteBlock, pageIdentifier) {
|
|
|
20922
21019
|
};
|
|
20923
21020
|
}
|
|
20924
21021
|
function buildRemoteBlockLookup(remoteBlocks) {
|
|
20925
|
-
|
|
20926
|
-
for (const block of remoteBlocks) lookup.set(block.identifier, block);
|
|
20927
|
-
return lookup;
|
|
21022
|
+
return new Map(remoteBlocks.map((block) => [block.identifier, block]));
|
|
20928
21023
|
}
|
|
20929
|
-
function
|
|
20930
|
-
|
|
20931
|
-
for (const localBlock of localBlocks) {
|
|
20932
|
-
const diff = classifyBlock(localBlock, remoteLookup.get(localBlock.identifier), pageIdentifier);
|
|
20933
|
-
diffs.push(diff);
|
|
20934
|
-
recordBlockDiff(summary, diff);
|
|
20935
|
-
}
|
|
20936
|
-
return diffs;
|
|
21024
|
+
function localBlockDiffs(localBlocks, remoteLookup, pageIdentifier) {
|
|
21025
|
+
return localBlocks.map((block) => classifyBlock(block, remoteLookup.get(block.identifier), pageIdentifier));
|
|
20937
21026
|
}
|
|
20938
|
-
function
|
|
20939
|
-
|
|
20940
|
-
|
|
20941
|
-
|
|
20942
|
-
|
|
20943
|
-
|
|
20944
|
-
pageIdentifier
|
|
20945
|
-
};
|
|
20946
|
-
diffs.push(diff);
|
|
20947
|
-
recordBlockDiff(summary, diff);
|
|
20948
|
-
}
|
|
21027
|
+
function deletedBlockDiffs(remoteBlocks, localBlockIdentifiers, pageIdentifier) {
|
|
21028
|
+
return remoteBlocks.filter((block) => !localBlockIdentifiers.has(block.identifier)).map((block) => ({
|
|
21029
|
+
type: "delete",
|
|
21030
|
+
identifier: block.identifier,
|
|
21031
|
+
pageIdentifier
|
|
21032
|
+
}));
|
|
20949
21033
|
}
|
|
20950
|
-
function
|
|
20951
|
-
const
|
|
20952
|
-
|
|
20953
|
-
|
|
20954
|
-
|
|
20955
|
-
|
|
20956
|
-
|
|
20957
|
-
});
|
|
20958
|
-
return;
|
|
20959
|
-
}
|
|
21034
|
+
function blockReorderDiff(localBlocks, remoteBlocks, remoteLookup, localBlockIdentifiers, pageIdentifier, diffs) {
|
|
21035
|
+
const reorder = {
|
|
21036
|
+
type: "reorder",
|
|
21037
|
+
identifier: pageIdentifier,
|
|
21038
|
+
pageIdentifier
|
|
21039
|
+
};
|
|
21040
|
+
if (diffs.some((diff) => diff.type === "create") && remoteBlocks.length > 0) return reorder;
|
|
20960
21041
|
const localOrder = localBlocks.filter((block) => remoteLookup.has(block.identifier)).map((block) => block.identifier);
|
|
20961
21042
|
const remoteOrder = remoteBlocks.filter((block) => localBlockIdentifiers.has(block.identifier)).sort((a, b) => a.position - b.position).map((block) => block.identifier);
|
|
20962
|
-
|
|
20963
|
-
diffs.push({
|
|
20964
|
-
type: "reorder",
|
|
20965
|
-
identifier: pageIdentifier,
|
|
20966
|
-
pageIdentifier
|
|
20967
|
-
});
|
|
20968
|
-
}
|
|
21043
|
+
return localOrder.length > 1 && !equal(localOrder, remoteOrder) ? reorder : undefined;
|
|
20969
21044
|
}
|
|
20970
21045
|
function calculateBlockDiffs(localBlocks, remoteBlocks, pageIdentifier, summary) {
|
|
20971
21046
|
const remoteLookup = buildRemoteBlockLookup(remoteBlocks);
|
|
20972
21047
|
const localBlockIdentifiers = new Set(localBlocks.map((block) => block.identifier));
|
|
20973
|
-
const
|
|
20974
|
-
|
|
20975
|
-
|
|
21048
|
+
const contentDiffs = [...localBlockDiffs(localBlocks, remoteLookup, pageIdentifier), ...deletedBlockDiffs(remoteBlocks, localBlockIdentifiers, pageIdentifier)];
|
|
21049
|
+
const reorder = blockReorderDiff(localBlocks, remoteBlocks, remoteLookup, localBlockIdentifiers, pageIdentifier, contentDiffs);
|
|
21050
|
+
const diffs = [...contentDiffs, ...reorder ? [reorder] : []];
|
|
21051
|
+
diffs.forEach((diff) => recordBlockDiff(summary, diff));
|
|
20976
21052
|
return diffs;
|
|
20977
21053
|
}
|
|
20978
21054
|
function changedPageFields(localPage, remotePage) {
|
|
20979
|
-
const
|
|
20980
|
-
|
|
20981
|
-
|
|
20982
|
-
|
|
21055
|
+
const localSeo = resolvePageUpsertSeo(pageMetadataForUpsert(localPage));
|
|
21056
|
+
const remoteSeo = resolvePageUpsertSeo(remotePage);
|
|
21057
|
+
return [
|
|
21058
|
+
...localPage.title !== remotePage.title ? ["title"] : [],
|
|
21059
|
+
...localPage.path !== remotePage.path ? ["path"] : [],
|
|
21060
|
+
...localSeo.seoTitle !== remoteSeo.seoTitle ? ["seoTitle"] : [],
|
|
21061
|
+
...localSeo.seoDescription !== remoteSeo.seoDescription ? ["seoDescription"] : []
|
|
21062
|
+
];
|
|
20983
21063
|
}
|
|
20984
21064
|
function classifyPage(localPage, remotePage, options, blockSummary) {
|
|
20985
21065
|
if (!remotePage) {
|
|
@@ -21002,20 +21082,12 @@ function classifyPage(localPage, remotePage, options, blockSummary) {
|
|
|
21002
21082
|
}
|
|
21003
21083
|
const blockDiffs = calculateBlockDiffs(localPage.blocks ?? [], remotePage.blocks ?? [], localPage.identifier, blockSummary);
|
|
21004
21084
|
const changes = changedPageFields(localPage, remotePage);
|
|
21005
|
-
const hasBlockChanges = blockDiffs.some((diff) => diff.type !== "unchanged");
|
|
21006
|
-
if (changes.length > 0 || hasBlockChanges) {
|
|
21007
|
-
return {
|
|
21008
|
-
type: "update",
|
|
21009
|
-
identifier: localPage.identifier,
|
|
21010
|
-
changes: changes.length > 0 ? changes : undefined,
|
|
21011
|
-
blocks: blockDiffs,
|
|
21012
|
-
remoteBlockIdentifiers: (remotePage.blocks ?? []).map((block) => block.identifier),
|
|
21013
|
-
statusChange
|
|
21014
|
-
};
|
|
21015
|
-
}
|
|
21016
21085
|
return {
|
|
21017
|
-
type: "unchanged",
|
|
21086
|
+
type: changes.length > 0 ? "update" : "unchanged",
|
|
21018
21087
|
identifier: localPage.identifier,
|
|
21088
|
+
changes: changes.length > 0 ? changes : undefined,
|
|
21089
|
+
blocks: blockDiffs,
|
|
21090
|
+
remoteBlockIdentifiers: (remotePage.blocks ?? []).map((block) => block.identifier),
|
|
21019
21091
|
statusChange
|
|
21020
21092
|
};
|
|
21021
21093
|
}
|
|
@@ -21037,6 +21109,10 @@ function calculatePageDiffs(localPages, remotePages, options) {
|
|
|
21037
21109
|
blockSummary
|
|
21038
21110
|
};
|
|
21039
21111
|
}
|
|
21112
|
+
/** A page may have block operations without changing its metadata. */
|
|
21113
|
+
function hasPageOperations(diff) {
|
|
21114
|
+
return diff.type !== "unchanged" || Boolean(diff.statusChange) || (diff.blocks ?? []).some((block) => block.type !== "unchanged");
|
|
21115
|
+
}
|
|
21040
21116
|
|
|
21041
21117
|
//#endregion
|
|
21042
21118
|
//#region src/sync/navigationDiffMatching.ts
|
|
@@ -21206,7 +21282,10 @@ function buildBlockChanges(pageDiff, localPages, remotePages, mode) {
|
|
|
21206
21282
|
function buildPageChanges(diff, lookups, mode) {
|
|
21207
21283
|
const changes = [];
|
|
21208
21284
|
for (const pageDiff of diff.pages) {
|
|
21209
|
-
if (pageDiff.type === "unchanged" && !pageDiff.statusChange)
|
|
21285
|
+
if (pageDiff.type === "unchanged" && !pageDiff.statusChange) {
|
|
21286
|
+
changes.push(...buildBlockChanges(pageDiff, lookups.localPages, lookups.remotePages, mode));
|
|
21287
|
+
continue;
|
|
21288
|
+
}
|
|
21210
21289
|
const change = {
|
|
21211
21290
|
type: "page",
|
|
21212
21291
|
identifier: pageDiff.identifier,
|
|
@@ -21436,11 +21515,13 @@ function calculatePullBlockDiffs(remoteBlocks, localBlocks, pageIdentifier, summ
|
|
|
21436
21515
|
return diff;
|
|
21437
21516
|
});
|
|
21438
21517
|
}
|
|
21439
|
-
function changedPullPageFields(
|
|
21440
|
-
|
|
21441
|
-
|
|
21442
|
-
|
|
21443
|
-
|
|
21518
|
+
function changedPullPageFields(localPage, remotePage) {
|
|
21519
|
+
return [
|
|
21520
|
+
...localPage.title !== remotePage.title ? ["title"] : [],
|
|
21521
|
+
...localPage.path !== remotePage.path ? ["path"] : [],
|
|
21522
|
+
...localPage.seoTitle !== (remotePage.seoTitle ?? undefined) ? ["seoTitle"] : [],
|
|
21523
|
+
...localPage.seoDescription !== (remotePage.seoDescription ?? undefined) ? ["seoDescription"] : []
|
|
21524
|
+
];
|
|
21444
21525
|
}
|
|
21445
21526
|
function calculatePullPageDiffs(remotePages, local) {
|
|
21446
21527
|
const diffs = [];
|
|
@@ -21460,7 +21541,7 @@ function calculatePullPageDiffs(remotePages, local) {
|
|
|
21460
21541
|
continue;
|
|
21461
21542
|
}
|
|
21462
21543
|
const blockDiffs = calculatePullBlockDiffs(remotePage.blocks ?? [], localPage.blocks ?? [], remotePage.identifier, blockSummary);
|
|
21463
|
-
const changes = changedPullPageFields(
|
|
21544
|
+
const changes = changedPullPageFields(localPage, remotePage);
|
|
21464
21545
|
const diff = changes.length > 0 || blockDiffs.some((block) => block.type !== "unchanged") ? {
|
|
21465
21546
|
type: "update",
|
|
21466
21547
|
identifier: remotePage.identifier,
|
|
@@ -21716,11 +21797,17 @@ function formatPageDetails(diff, localPages, remotePages) {
|
|
|
21716
21797
|
const localPage = localPages.get(diff.identifier);
|
|
21717
21798
|
const remotePage = remotePages.get(diff.identifier);
|
|
21718
21799
|
if (!localPage || !remotePage) return [];
|
|
21719
|
-
const
|
|
21720
|
-
|
|
21721
|
-
|
|
21722
|
-
|
|
21723
|
-
|
|
21800
|
+
const localFields = {
|
|
21801
|
+
title: localPage.title,
|
|
21802
|
+
path: localPage.path,
|
|
21803
|
+
...resolvePageUpsertSeo(pageMetadataForUpsert(localPage))
|
|
21804
|
+
};
|
|
21805
|
+
const remoteFields = {
|
|
21806
|
+
title: remotePage.title,
|
|
21807
|
+
path: remotePage.path,
|
|
21808
|
+
...resolvePageUpsertSeo(remotePage)
|
|
21809
|
+
};
|
|
21810
|
+
return findChangedFieldsWithValues(localFields, remoteFields).map((change) => ` ${formatFieldChange(change)}`);
|
|
21724
21811
|
}
|
|
21725
21812
|
function buildIdentifierLookup(items) {
|
|
21726
21813
|
const lookup = new Map();
|
|
@@ -21737,6 +21824,11 @@ function formatHumanDiff(diff, local, remote) {
|
|
|
21737
21824
|
const localPages = buildIdentifierLookup(local.pages);
|
|
21738
21825
|
const remotePages = buildIdentifierLookup(remote.pages);
|
|
21739
21826
|
appendOperationSections$1(lines, "Pages", diff.pages, CREATE_UPDATE_OPERATIONS, (page) => page.identifier, (page) => formatPageDetails(page, localPages, remotePages));
|
|
21827
|
+
appendOperationSections$1(lines, "Blocks", diff.pages.flatMap((page) => page.blocks ?? []), [...ENTRY_OPERATIONS, {
|
|
21828
|
+
type: "reorder",
|
|
21829
|
+
label: "reordered",
|
|
21830
|
+
marker: "~"
|
|
21831
|
+
}], (block) => `${block.pageIdentifier}/${block.identifier}`);
|
|
21740
21832
|
appendOperationSections$1(lines, "Navigation", diff.navigation, CREATE_UPDATE_OPERATIONS, (navigation) => navigation.type === "update" && navigation.changes ? `${navigation.location} [${navigation.changes.join(", ")}]` : navigation.location);
|
|
21741
21833
|
if (diff.settings) {
|
|
21742
21834
|
lines.push("\nSettings (updated):");
|
|
@@ -21956,13 +22048,21 @@ function appendSingleUpdateSection(lines, title, detail) {
|
|
|
21956
22048
|
lines.push(`\n${title}:`);
|
|
21957
22049
|
lines.push(` ~ ${detail}`);
|
|
21958
22050
|
}
|
|
22051
|
+
function appendPageDetailSections(lines, pages) {
|
|
22052
|
+
appendOperationSections(lines, "Pages", pages, CREATE_UPDATE_DETAIL_OPERATIONS, (page) => formatIdentifierDetail(page.identifier, page.changes));
|
|
22053
|
+
appendOperationSections(lines, "Blocks", pages.flatMap((page) => page.blocks ?? []), [...CREATE_UPDATE_DELETE_DETAIL_OPERATIONS, {
|
|
22054
|
+
type: "reorder",
|
|
22055
|
+
label: "reordered",
|
|
22056
|
+
marker: "~"
|
|
22057
|
+
}], (block) => formatIdentifierDetail(`${block.pageIdentifier}/${block.identifier}`, block.changes));
|
|
22058
|
+
}
|
|
21959
22059
|
/** Format detailed diff for display. */
|
|
21960
22060
|
function formatDiffDetail(diff) {
|
|
21961
22061
|
const lines = [];
|
|
21962
22062
|
for (const [contentType, entryDiffs] of diff.entries) {
|
|
21963
22063
|
appendOperationSections(lines, contentType, entryDiffs, CREATE_UPDATE_DELETE_DETAIL_OPERATIONS, (entry) => formatIdentifierDetail(entry.identifier, entry.changes));
|
|
21964
22064
|
}
|
|
21965
|
-
|
|
22065
|
+
appendPageDetailSections(lines, diff.pages);
|
|
21966
22066
|
appendOperationSections(lines, "Navigation", diff.navigation, CREATE_UPDATE_DETAIL_OPERATIONS, (navigation) => navigation.location);
|
|
21967
22067
|
if (diff.settings) {
|
|
21968
22068
|
appendSingleUpdateSection(lines, "Settings (updated)", `[${diff.settings.changes.join(", ")}]`);
|
|
@@ -23202,4 +23302,4 @@ function optionalTitle(data) {
|
|
|
23202
23302
|
}
|
|
23203
23303
|
|
|
23204
23304
|
//#endregion
|
|
23205
|
-
export {
|
|
23305
|
+
export { normalizeMediaValueToIdentifierOnly as $, bindRequestTimeout as $t, formatDiffDetail as A, transportSuggestion as An, navigationIdentity as At, buildFieldChanges as B, sdkEventScheduleSchema as Bn, preparePushConfigTarget as Bt, reportFromOutcomes as C, parseEnvironmentSelection as Cn, fileExists$1 as Ct, normalizeRemoteHomepageReference as D, withRiverbankEnv as Dn, writeJsonFileAtomic as Dt, createEmptySyncResult as E, requireEnvironmentWriteAuthorization as En, writeJsonFile$1 as Et, calculatePullDiff as F, isLocalConfigured as Fn, navigationCommandItemToManagementInput as Ft, syncLocalMediaForPull as G, APPOINTMENT_SERVICE_VISIBILITY_VALUES as Gt, formatFieldPath as H, linkPayloadSchema as Hn, extractApiErrorMessage as Ht, buildJsonDiff as I, isRemoteConfigured as In, normalizeNavigationConfigItemForCommand as It, admitBinaryWriteDestination as J, ApiEnvelopeError as Jt, applyLocalMediaPush as K, ApiRequestError as Kt, hasPageOperations as L, loadSdkEnvironment as Ln, applyPushConfigPlan as Lt, hasPendingChanges as M, createOutput as Mn, convertPulledFooterToLocal as Mt, findChangedFieldsWithValues as N, getEnvPrefix as Nn, convertPulledNavigationToLocal as Nt, calculateDiff as O, ErrorCodes as On, isMediaValue as Ot, formatHumanDiff as P, getEnvironmentDebugInfo as Pn, convertPulledPagesToLocal as Pt, normalizeMediaIdentifierInput as Q, mapEnvironmentExecutionOutcomesJson as Qt, pageMetadataForUpsert as R, createManagementClient as Rn, createPushConfigCommand as Rt, planCliCommandBatchForBindings as S, executeEnvironmentPlan as Sn, ensureDir$1 as St, executeResidualSettingsSyncPlan as T, planEnvironmentWriteAuthorization as Tn, readJsonFile as Tt, revalidateLocalMediaPushPlan as U, portablePageDesignSchema as Un, normalizeApiError as Ut, formatFieldChange as V, sdkSettingsUpdateSchema as Vn, revalidatePushConfigPlan as Vt, syncLocalMediaForPush as W, sdkConfiguredBookingVerticalConfigSchema as Wn, isRecord$5 as Wt, writeBinaryFileAtomic as X, deriveCmsApiUrlFromDashboardUrl as Xt, readStableBinaryFile as Y, unwrapResponse as Yt, sha256 as Z, API_ENDPOINTS as Zt, commandExecutionToReport as _, runWithInvocation as _n, metadataFilePath as _t, executeEntryCommandPlanAsReport as a, createOutputForCommand as an, readEntries as at, executeCompiledCliCommandPlanAsReport as b, withErrorHandling as bn, writeMetadataFile as bt, titleFromEntryData as c, getOutputContext as cn, readEventsMeta as ct, unsafeAsCliEntryIdentifier as d, managementClientConfigFor as dn, readNavigationMeta as dt, confirmAction as en, walkLocalContentMedia as et, unsafeAsCliFormSlug as f, mapEntryForOutput as fn, readPagesMeta as ft, commandCompileFailureToReport as g, resolveCommandPath as gn, ensureMetadataDir as gt, mutationCounterForEffect as h, parsePaginationOptions as hn, writeMediaManifest as ht, entrySiteCommandTypes as i, createListCommand as in, findLegacyEntryFiles as it, formatDiffSummary as j, CliExit as jn, navigationIdentityMap as jt, calculateFooterDiff as k, formatError as kn, duplicateNavigationIdentityMessage as kt, unsafeAsCliBlockIdentifier as l, getOutputOnlyContext as ln, readFooterMeta as lt, commandReportToSyncResult as m, parseJsonData as mn, readVenuesMeta as mt, entryCommandCompileErrorToReport as n, createCommandContext as nn, downloadMedia as nt, executeEntryCommandPlanAsSyncResult as o, currentInvocationEnvelope as on, readAllMeta as ot, unsafeAsCliPageIdentifier as p, parseJsonArray as pn, readSettingsMeta as pt, prepareLocalMediaForPush as q, createBearerAPIClient as qt, entryCommandReportToSyncResult as r, createGetCommand as rn, extractMediaIdentifiers as rt, syncResultForEntryCommandCompileError as s, formatDateShort as sn, readEventCategoriesMeta as st, compileEntryPushCommands as t, createClientForEnv as tn, buildStorageUrl as tt, unsafeAsCliContentTypeKey as u, handleCommandError as un, readFormsMeta as ut, commandReportHasFailures as v, withCommandContext as vn, metadataTargetFromEnvironment as vt, mergeManySyncResults as w, planEnvironmentExecution as wn, listFiles as wt, formatManagementError as x, withOutputOnlyErrorHandling as xn, writeMetadataRecordMap as xt, executeCliCommandPlan as y, withConfirmation as yn, readMetadataFile as yt, calculateEntryDiffs as z, ManagementApiError as zn, loadPushConfigTarget as zt };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { _ as normalizeLinkValue, a as classifySdkEventSchedule, g as linkSchema, i as sdkEventUpsertOptionalFieldSchemas, n as sdkCourseBookingSettingsSchema, o as classifySdkEventBookingOffer } from "./sdk-event-upsert-
|
|
3
|
-
import { u as EVENT_PRESET_VALUES } from "./src-
|
|
2
|
+
import { _ as normalizeLinkValue, a as classifySdkEventSchedule, g as linkSchema, i as sdkEventUpsertOptionalFieldSchemas, n as sdkCourseBookingSettingsSchema, o as classifySdkEventBookingOffer } from "./sdk-event-upsert-B3gflo1K.mjs";
|
|
3
|
+
import { u as EVENT_PRESET_VALUES } from "./src-RfhyMOpX.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
|
|
6
6
|
//#region ../blocks/src/lib/typeGuards.ts
|
|
@@ -7,7 +7,7 @@ import { existsSync as existsSync$1 } from "fs";
|
|
|
7
7
|
import { fileURLToPath } from "url";
|
|
8
8
|
|
|
9
9
|
//#region package.json
|
|
10
|
-
var version = "0.22.
|
|
10
|
+
var version = "0.22.1";
|
|
11
11
|
var peerDependencies = { "@riverbankcms/sdk": ">=0.157.0 <1.0.0" };
|
|
12
12
|
var package_default = {
|
|
13
13
|
name: "riverbankcms",
|
|
@@ -83,7 +83,7 @@ var package_default = {
|
|
|
83
83
|
//#endregion
|
|
84
84
|
//#region src/version.ts
|
|
85
85
|
/** The package manifest is the source-run fallback; builds inject this value. */
|
|
86
|
-
const CLI_VERSION = typeof "0.22.
|
|
86
|
+
const CLI_VERSION = typeof "0.22.1" === "string" ? "0.22.1" : version;
|
|
87
87
|
/**
|
|
88
88
|
* The CLI's SDK peer range is bundled from the CLI manifest alongside its
|
|
89
89
|
* version. Runtime config loading uses this value as the single compatibility
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { Hn as ok, Vn as err, ln as parseSiteId } from "./src-RfhyMOpX.mjs";
|
|
3
3
|
import { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
import { dirname, isAbsolute, join, parse, relative, resolve, sep } from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
package/dist/scaffold/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "../src-
|
|
3
|
-
import { a as prepareScaffoldExecution, d as loadGeneratedPackageRanges, i as preflightScaffoldTargets, l as deriveGeneratedPackageRanges, o as writeScaffoldFiles, r as preflightScaffoldPlan, s as deriveScaffoldLocalManifest, t as deriveScaffoldPlan, u as findPackageManifestPath } from "../plan-
|
|
2
|
+
import "../src-RfhyMOpX.mjs";
|
|
3
|
+
import { a as prepareScaffoldExecution, d as loadGeneratedPackageRanges, i as preflightScaffoldTargets, l as deriveGeneratedPackageRanges, o as writeScaffoldFiles, r as preflightScaffoldPlan, s as deriveScaffoldLocalManifest, t as deriveScaffoldPlan, u as findPackageManifestPath } from "../plan-DUdJbgTV.mjs";
|
|
4
4
|
|
|
5
5
|
export { deriveGeneratedPackageRanges, deriveScaffoldLocalManifest, deriveScaffoldPlan, findPackageManifestPath, loadGeneratedPackageRanges, preflightScaffoldPlan, preflightScaffoldTargets, prepareScaffoldExecution, writeScaffoldFiles };
|