@v-office/website-sdk 2.26.0 → 2.27.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/cli.mjs +2 -2
- package/dist/{client--T_tQSjV.mjs → client-DB3QXXOo.mjs} +72 -3
- package/dist/index.mjs +1 -1
- package/dist/instructions/CHANGELOG.md +1 -0
- package/dist/instructions/MIGRATION.md +1 -0
- package/dist/instructions/versions/2.27.0/CHANGELOG.md +26 -0
- package/dist/instructions/versions/2.27.0/MIGRATION.md +10 -0
- package/dist/{rentals-D4wmqjzL.mjs → rentals-DG0ofi7C.mjs} +1 -1
- package/dist/{search-DtBtzIGf.mjs → search-CZSFERmD.mjs} +1 -1
- package/instructions/CHANGELOG.md +1 -0
- package/instructions/MIGRATION.md +1 -0
- package/instructions/versions/2.27.0/CHANGELOG.md +26 -0
- package/instructions/versions/2.27.0/MIGRATION.md +10 -0
- package/instructions/versions/2.27.0/release.json +3 -0
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { Ht as defineWebsiteSDKOptions, Wt as defineV9PropertyHighlightSourcesFromUnknown, c as makeV9GraphQLClient, d as makeV0OpenApiClientFetchLive, l as V0OpenApiClient, t as createWebsiteSDK } from "./client
|
|
2
|
+
import { Ht as defineWebsiteSDKOptions, Wt as defineV9PropertyHighlightSourcesFromUnknown, c as makeV9GraphQLClient, d as makeV0OpenApiClientFetchLive, l as V0OpenApiClient, t as createWebsiteSDK } from "./client-DB3QXXOo.mjs";
|
|
3
3
|
import { c as parseVofficeRatingData } from "./v9-data-C3SWtDGs.mjs";
|
|
4
4
|
import { s as rentalsAllWithoutFeedbacksQuery } from "./operations-DwURbo0b.mjs";
|
|
5
5
|
import { SearchSearchSortSchema, defineCustomAttributesFromUnknown } from "@v-office/sdk-core";
|
|
@@ -18,7 +18,7 @@ var CLICheckFailed = class extends Error {
|
|
|
18
18
|
const toCLIError = (message, cause) => cause instanceof Error ? new CLICheckFailed(`${message}: ${cause.message}`, { cause }) : new CLICheckFailed(message, { cause });
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region package.json
|
|
21
|
-
var version = "2.
|
|
21
|
+
var version = "2.27.0";
|
|
22
22
|
//#endregion
|
|
23
23
|
//#region src/cli/output.ts
|
|
24
24
|
const toJson = (value) => Effect.try({
|
|
@@ -352,13 +352,80 @@ const defineWebsiteSDKOptions = (options) => options;
|
|
|
352
352
|
*
|
|
353
353
|
* A registered symbol on `globalThis`, not module state: a build loads the SDK more than once
|
|
354
354
|
* (the content loaders and the prerendered pages run separately bundled copies), and every copy
|
|
355
|
-
* must land in the one record. No imports, so it is as safe in a browser bundle as in Node.
|
|
355
|
+
* must land in the one record. No runtime imports, so it is as safe in a browser bundle as in Node.
|
|
356
356
|
*/
|
|
357
357
|
const CONSTRUCTED_BACKENDS_KEY = Symbol.for("@v-office/website-sdk/backends");
|
|
358
358
|
const recordConstructedBackend = (backend) => {
|
|
359
359
|
const record = globalThis;
|
|
360
360
|
(record[CONSTRUCTED_BACKENDS_KEY] ??= /* @__PURE__ */ new Set()).add(backend);
|
|
361
361
|
};
|
|
362
|
+
/**
|
|
363
|
+
* Every distinct config and options this process has constructed a website SDK with, as JSON of
|
|
364
|
+
* the top-level fields `createWebsiteSDK` reads (their values as passed), recorded like the backends and read by
|
|
365
|
+
* `@v-office/site-manifest` (`websiteSdks`). The platform learns from it the public token and the
|
|
366
|
+
* options the site really uses, whatever its own code looks like. A set of JSON strings: a build
|
|
367
|
+
* constructs the SDK once per content loader and page, and identical constructions are one entry,
|
|
368
|
+
* whatever the order of their keys (two entries would read as two different SDKs); the JSON is
|
|
369
|
+
* what the SDK was told at that moment. Created when the SDK is loaded, so an empty set is a build
|
|
370
|
+
* that loaded it and constructed none, and no set at all is a build without this SDK (or one too
|
|
371
|
+
* old to keep the record). A construction that is not JSON adds `UNRECORDABLE_SDK` instead: the
|
|
372
|
+
* record then no longer names every SDK the build constructed, and the manifest leaves it out
|
|
373
|
+
* rather than report part of it.
|
|
374
|
+
*/
|
|
375
|
+
const CONSTRUCTED_SDKS_KEY = Symbol.for("@v-office/website-sdk/sdks");
|
|
376
|
+
globalThis[CONSTRUCTED_SDKS_KEY] ??= /* @__PURE__ */ new Set();
|
|
377
|
+
/** Not JSON of an object, so it can stand for no construction; site-manifest reads the same text. */
|
|
378
|
+
const UNRECORDABLE_SDK = "unrecordable";
|
|
379
|
+
/** The top-level fields `createWebsiteSDK` reads, the only ones recorded: a property it ignores (a
|
|
380
|
+
* spread settings object, the build's environment) never reaches the manifest or the platform.
|
|
381
|
+
* Their values are recorded as passed: they are what the SDK received, and projecting each
|
|
382
|
+
* option's nested shape here would repeat the SDK's types at runtime. Checked against those
|
|
383
|
+
* types, so a new field does not compile until it is listed here. */
|
|
384
|
+
const V10_CONFIG_FIELDS = {
|
|
385
|
+
backend: true,
|
|
386
|
+
apiEndpoint: true,
|
|
387
|
+
searchEndpoint: true,
|
|
388
|
+
accessToken: true,
|
|
389
|
+
imageBaseUrl: true
|
|
390
|
+
};
|
|
391
|
+
const V9_CONFIG_FIELDS = {
|
|
392
|
+
backend: true,
|
|
393
|
+
graphqlUrl: true,
|
|
394
|
+
apiKey: true,
|
|
395
|
+
imageProxyBaseUrl: true,
|
|
396
|
+
v0ApiBaseUrl: true,
|
|
397
|
+
v1ApiBaseUrl: true,
|
|
398
|
+
rentalDataAttributes: true,
|
|
399
|
+
facilityObjectGroupRelationAttributeId: true
|
|
400
|
+
};
|
|
401
|
+
const OPTION_FIELDS = {
|
|
402
|
+
translationOverrides: true,
|
|
403
|
+
customAttributes: true,
|
|
404
|
+
v9PropertyHighlightSources: true,
|
|
405
|
+
v9Reviews: true,
|
|
406
|
+
customAttributeFilterDefinitions: true,
|
|
407
|
+
rentalHighlightPrioritization: true,
|
|
408
|
+
rentalPropertyHighlightPrioritization: true,
|
|
409
|
+
rentalScope: true,
|
|
410
|
+
shouldAddProposedAdditionalServiceAmount: true,
|
|
411
|
+
searchAllRentalsAtOnce: true
|
|
412
|
+
};
|
|
413
|
+
const declared = (value, fields) => Object.fromEntries(Object.entries(value).filter(([key]) => Object.hasOwn(fields, key)));
|
|
414
|
+
/** Writes each object's keys sorted; arrays keep their order, which can mean something. */
|
|
415
|
+
const sortedKeys = (_key, value) => value !== null && typeof value === "object" && !Array.isArray(value) ? Object.fromEntries(Object.entries(value).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0)) : value;
|
|
416
|
+
const recordConstructedSdk = (config, options) => {
|
|
417
|
+
let json;
|
|
418
|
+
try {
|
|
419
|
+
json = JSON.stringify({
|
|
420
|
+
config: declared(config, config.backend === "v9" ? V9_CONFIG_FIELDS : V10_CONFIG_FIELDS),
|
|
421
|
+
options: declared(options ?? {}, OPTION_FIELDS)
|
|
422
|
+
}, sortedKeys);
|
|
423
|
+
} catch {
|
|
424
|
+
json = UNRECORDABLE_SDK;
|
|
425
|
+
}
|
|
426
|
+
const record = globalThis;
|
|
427
|
+
(record[CONSTRUCTED_SDKS_KEY] ??= /* @__PURE__ */ new Set()).add(json);
|
|
428
|
+
};
|
|
362
429
|
//#endregion
|
|
363
430
|
//#region src/payment/browser.ts
|
|
364
431
|
const getBrowser = () => Effect.gen(function* () {
|
|
@@ -5790,7 +5857,7 @@ const parseV9SearchCursor = (cursor) => Effect.gen(function* () {
|
|
|
5790
5857
|
return page;
|
|
5791
5858
|
});
|
|
5792
5859
|
const loadV9SearchRuntime = Effect.tryPromise({
|
|
5793
|
-
try: () => import("./search-
|
|
5860
|
+
try: () => import("./search-CZSFERmD.mjs"),
|
|
5794
5861
|
catch: (cause) => new CoreSDKError({
|
|
5795
5862
|
source: "v9",
|
|
5796
5863
|
operation: "v9.search.runtime",
|
|
@@ -6437,7 +6504,7 @@ const orderRentalsById = ({ rentalIds, rentals }) => {
|
|
|
6437
6504
|
});
|
|
6438
6505
|
};
|
|
6439
6506
|
const loadV9RentalsRuntime = Effect.tryPromise({
|
|
6440
|
-
try: () => import("./rentals-
|
|
6507
|
+
try: () => import("./rentals-DG0ofi7C.mjs"),
|
|
6441
6508
|
catch: (cause) => new CoreSDKError({
|
|
6442
6509
|
source: "v9",
|
|
6443
6510
|
operation: "v9.rentals.runtime",
|
|
@@ -6581,6 +6648,7 @@ function createWebsiteSDK({ config, options }) {
|
|
|
6581
6648
|
options: v9Options
|
|
6582
6649
|
});
|
|
6583
6650
|
recordConstructedBackend("v9");
|
|
6651
|
+
recordConstructedSdk(config, options);
|
|
6584
6652
|
return {
|
|
6585
6653
|
backend: "v9",
|
|
6586
6654
|
static: {
|
|
@@ -6658,6 +6726,7 @@ function createWebsiteSDK({ config, options }) {
|
|
|
6658
6726
|
dispose: () => runtime.dispose()
|
|
6659
6727
|
};
|
|
6660
6728
|
recordConstructedBackend("v10");
|
|
6729
|
+
recordConstructedSdk(config, options);
|
|
6661
6730
|
return sdk;
|
|
6662
6731
|
}
|
|
6663
6732
|
//#endregion
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as SearchPropertiesResponseSchema, A as ErgoBankSchema, At as getStartDateSelectedAvailabilityEffect, B as OnOfficeUnitCollectionResponseSchema, Bt as submitPaymentOption, C as DocumentResourceResponseSchema, Ct as bookInsuranceEffect, D as DocumentSummarySchema, Dt as getFiltersEffect, E as DocumentStatusUpdateRequestSchema, Et as getBankTransferDetailsEffect, F as ErgoPlanSearchRequestSchema, Ft as searchEffect, G as QuotePricesPayloadSchema, H as PaymentScheduleItemSchema, Ht as defineWebsiteSDKOptions, I as ErgoPolicyNumberRequestSchema, It as selectCancellationPolicyEffect, J as QuoteServiceSchema, K as QuotePricesResponseSchema, L as ErgoReadPreContractRequestSchema, Lt as selectInsuranceEffect, M as ErgoCommonFieldsSchema, Mt as mapSearchEffect, N as ErgoCreatePreContractRequestSchema, Nt as quoteEffect, O as DocumentTypeSchema, Ot as getInitialAvailabilityEffect, P as ErgoPersonSchema, Pt as removeAdditionalServiceEffect, Q as RoomImageSchema, R as ErgoTripAndCustomerRequestSchema, Rt as selectInsurancePaymentEffect, S as DocumentCollectionResponseSchema, St as bookEffect, T as DocumentStatusSchema, Tt as createInsurancePreContractEffect, U as PaymentScheduleSchema, Ut as defineV9PropertyHighlightSources, V as OnOfficeUnitSchema, Vt as submitPaymentOptionEffect, W as QuoteLineSchema, Wt as defineV9PropertyHighlightSourcesFromUnknown, X as RawVofficeObjectSchema, Y as RawObjectResponseSchema, Z as RegionListResponseSchema, _ as ApiEnvelopeBaseSchema, _t as V1_BASE_URL, at as SetupResponseSchema, b as CurrentMemberResponseSchema, bt as decodeV1OperationResponse, ct as TileTagSchema, d as makeV0OpenApiClientFetchLive, dt as UnitIdsResponseSchema, et as ServiceBeonDataSchema, f as makeV0OpenApiClientLive, ft as UnitListItemSchema, g as makeV1OpenApiClientLive, gt as UnitServicePriceSchema, h as makeV1OpenApiClientFetchLive, ht as UnitResponseSchema, it as SetupDataSchema, j as ErgoBookRequestSchema, jt as getTermsAndPrivacyPolicyEffect, k as ErgoAddressSchema, kt as getRentalsEffect, l as V0OpenApiClient, lt as TravelInsuranceBookingSchema, m as V1OpenApiClientError, mt as UnitOfferSchema, nt as ServiceLimitSchema, ot as TileCollectionResponseSchema, p as V1OpenApiClient, pt as UnitListResponseSchema, q as QuoteSchema, rt as ServiceListResponseSchema, st as TileSchema, t as createWebsiteSDK, tt as ServiceImageSchema, u as V0OpenApiClientError, ut as TravelInsuranceBookingStoreRequestSchema, v as CalendarDaySchema, vt as V1_OPERATIONS, w as DocumentResourceSchema, wt as clearAdditionalServicesEffect, x as CustomerUnitSummarySchema, xt as addAdditionalServiceEffect, y as CalendarResponseSchema, yt as VideoResponseSchema, z as FacilityListResponseSchema, zt as submitContactEffect } from "./client
|
|
1
|
+
import { $ as SearchPropertiesResponseSchema, A as ErgoBankSchema, At as getStartDateSelectedAvailabilityEffect, B as OnOfficeUnitCollectionResponseSchema, Bt as submitPaymentOption, C as DocumentResourceResponseSchema, Ct as bookInsuranceEffect, D as DocumentSummarySchema, Dt as getFiltersEffect, E as DocumentStatusUpdateRequestSchema, Et as getBankTransferDetailsEffect, F as ErgoPlanSearchRequestSchema, Ft as searchEffect, G as QuotePricesPayloadSchema, H as PaymentScheduleItemSchema, Ht as defineWebsiteSDKOptions, I as ErgoPolicyNumberRequestSchema, It as selectCancellationPolicyEffect, J as QuoteServiceSchema, K as QuotePricesResponseSchema, L as ErgoReadPreContractRequestSchema, Lt as selectInsuranceEffect, M as ErgoCommonFieldsSchema, Mt as mapSearchEffect, N as ErgoCreatePreContractRequestSchema, Nt as quoteEffect, O as DocumentTypeSchema, Ot as getInitialAvailabilityEffect, P as ErgoPersonSchema, Pt as removeAdditionalServiceEffect, Q as RoomImageSchema, R as ErgoTripAndCustomerRequestSchema, Rt as selectInsurancePaymentEffect, S as DocumentCollectionResponseSchema, St as bookEffect, T as DocumentStatusSchema, Tt as createInsurancePreContractEffect, U as PaymentScheduleSchema, Ut as defineV9PropertyHighlightSources, V as OnOfficeUnitSchema, Vt as submitPaymentOptionEffect, W as QuoteLineSchema, Wt as defineV9PropertyHighlightSourcesFromUnknown, X as RawVofficeObjectSchema, Y as RawObjectResponseSchema, Z as RegionListResponseSchema, _ as ApiEnvelopeBaseSchema, _t as V1_BASE_URL, at as SetupResponseSchema, b as CurrentMemberResponseSchema, bt as decodeV1OperationResponse, ct as TileTagSchema, d as makeV0OpenApiClientFetchLive, dt as UnitIdsResponseSchema, et as ServiceBeonDataSchema, f as makeV0OpenApiClientLive, ft as UnitListItemSchema, g as makeV1OpenApiClientLive, gt as UnitServicePriceSchema, h as makeV1OpenApiClientFetchLive, ht as UnitResponseSchema, it as SetupDataSchema, j as ErgoBookRequestSchema, jt as getTermsAndPrivacyPolicyEffect, k as ErgoAddressSchema, kt as getRentalsEffect, l as V0OpenApiClient, lt as TravelInsuranceBookingSchema, m as V1OpenApiClientError, mt as UnitOfferSchema, nt as ServiceLimitSchema, ot as TileCollectionResponseSchema, p as V1OpenApiClient, pt as UnitListResponseSchema, q as QuoteSchema, rt as ServiceListResponseSchema, st as TileSchema, t as createWebsiteSDK, tt as ServiceImageSchema, u as V0OpenApiClientError, ut as TravelInsuranceBookingStoreRequestSchema, v as CalendarDaySchema, vt as V1_OPERATIONS, w as DocumentResourceSchema, wt as clearAdditionalServicesEffect, x as CustomerUnitSummarySchema, xt as addAdditionalServiceEffect, y as CalendarResponseSchema, yt as VideoResponseSchema, z as FacilityListResponseSchema, zt as submitContactEffect } from "./client-DB3QXXOo.mjs";
|
|
2
2
|
import { AdditionalServiceLimitExceeded, CoreSDKError, CoreSDKError as CMSError, CustomAttributeCatalogSchema, GuestQuoteSchema, InvalidAdditionalServiceQuantity, LocaleSchema, SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS, SearchMapSearchInputSchema, SearchMapSearchOutputSchema, SearchSearchFieldOrderBySchema, SearchSearchFieldSortSchema, SearchSearchInputSchema, SearchSearchOutputSchema, SearchSearchPriceSortSchema, SearchSearchRandomSortSchema, SearchSearchRatingSortSchema, SearchSearchSortSchema, SearchSortDirectionSchema, UnknownAdditionalService, defineCustomAttributes, defineCustomAttributesFromUnknown, fetchCustomAttributeCatalog, parseCustomAttributeCatalog, validateContactSubmitInput } from "@v-office/sdk-core";
|
|
3
3
|
//#region codegen/v9/heuristic-generation/public-api.ts
|
|
4
4
|
const customDataAttribute = (name) => name;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Release notes of `@v-office/website-sdk`, newest first. Each version has its own directory.
|
|
6
6
|
|
|
7
|
+
- `versions/2.27.0/CHANGELOG.md`: release notes for 2.27.0
|
|
7
8
|
- `versions/2.26.0/CHANGELOG.md`: release notes for 2.26.0
|
|
8
9
|
- `versions/2.25.0/CHANGELOG.md`: release notes for 2.25.0
|
|
9
10
|
- `versions/2.24.1/CHANGELOG.md`: release notes for 2.24.1
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Migration guides of `@v-office/website-sdk`, newest first. Apply them in order when skipping versions.
|
|
6
6
|
|
|
7
|
+
- `versions/2.27.0/MIGRATION.md`: Migration: 2.26.0 to 2.27.0
|
|
7
8
|
- `versions/2.26.0/MIGRATION.md`: Migration: 2.25.0 to 2.26.0
|
|
8
9
|
- `versions/2.25.0/MIGRATION.md`: Migration: 2.24.1 to 2.25.0
|
|
9
10
|
- `versions/2.24.1/MIGRATION.md`: Migration: 2.24.0 to 2.24.1
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Changelog: 2.27.0
|
|
2
|
+
|
|
3
|
+
The platform needs the token and the options a website really uses its SDK with, to keep the
|
|
4
|
+
website's public token current and to use the SDK on the site's behalf the same way. Like the
|
|
5
|
+
backend since 2.24.0, it reads them from the one place where they are final: what
|
|
6
|
+
`createWebsiteSDK` was constructed with. This release records them for the build's site manifest
|
|
7
|
+
(`@v-office/site-manifest` 0.2.0).
|
|
8
|
+
|
|
9
|
+
## Added
|
|
10
|
+
|
|
11
|
+
- `createWebsiteSDK` records the `config` and `options` of every SDK it constructs, once the
|
|
12
|
+
config was accepted, as JSON in a set under
|
|
13
|
+
`globalThis[Symbol.for("@v-office/website-sdk/sdks")]`. Only the top-level config and
|
|
14
|
+
option fields the SDK reads are recorded, their values as passed: a property it ignores (a
|
|
15
|
+
spread settings object, environment variables) is left out and never reaches the manifest. Identical constructions are one entry,
|
|
16
|
+
whatever the order of their keys: the JSON lists each object's keys sorted, arrays as given.
|
|
17
|
+
The set exists as soon as the SDK is loaded, so an empty set means none was constructed.
|
|
18
|
+
`@v-office/site-manifest` writes it to `dist/site-manifest.json` as `websiteSdks`. A config the
|
|
19
|
+
SDK refuses records nothing. A construction whose fields are not JSON (a cycle or a BigInt in a
|
|
20
|
+
field the SDK reads) does not fail the SDK and records `"unrecordable"`
|
|
21
|
+
instead, so the manifest does not report the others as if they were all.
|
|
22
|
+
|
|
23
|
+
## Changed
|
|
24
|
+
|
|
25
|
+
- Nothing else. The record has no effect on what the SDK does, needs no import and is safe in a
|
|
26
|
+
browser bundle. It holds the public token the config already carries into the bundle.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Gt as V9_FACILITY_ATTRIBUTE_KEYS } from "./client
|
|
1
|
+
import { Gt as V9_FACILITY_ATTRIBUTE_KEYS } from "./client-DB3QXXOo.mjs";
|
|
2
2
|
import { i as VofficeUnitDataPropertyMetadata, l as parseVofficeUnitData, n as VofficeUnitDataPropertyCategoryLabelKeys, o as parseVofficeFacilityData, r as VofficeUnitDataPropertyCategoryValues, s as parseVofficeFeedbackData, t as VofficeUnitDataFieldSchemas } from "./v9-data-C3SWtDGs.mjs";
|
|
3
3
|
import { a as rentalsAllByFacilityObjectGroupsWithoutFeedbacksQuery, i as rentalIdsQuery, o as rentalsAllFeedbacksQuery, r as rentalFacilitiesForObjectGroupRelationQuery, s as rentalsAllWithoutFeedbacksQuery } from "./operations-DwURbo0b.mjs";
|
|
4
4
|
import { a as toFacilityImages, c as toLocalizedString, i as toLocation, o as toImages, r as renderVofficePropertyAttribute, s as toAddress, t as toRentalHighlights } from "./to-rental-highlights-BL5m3Uen.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as parseQueryParameters, i as collectQueryParameters, n as makeV9CustomAttributeFilterCapabilities, o as toQueryString, r as toBasicQueryInputs, s as applyVofficeFilterDerivedBasicQueryInputs } from "./client
|
|
1
|
+
import { a as parseQueryParameters, i as collectQueryParameters, n as makeV9CustomAttributeFilterCapabilities, o as toQueryString, r as toBasicQueryInputs, s as applyVofficeFilterDerivedBasicQueryInputs } from "./client-DB3QXXOo.mjs";
|
|
2
2
|
import { l as parseVofficeUnitData } from "./v9-data-C3SWtDGs.mjs";
|
|
3
3
|
import { n as searchQuery, t as mapSearchQuery } from "./operations-DwURbo0b.mjs";
|
|
4
4
|
import { i as toLocation, n as toV9RentalHighlightKey, o as toImages, s as toAddress, t as toRentalHighlights } from "./to-rental-highlights-BL5m3Uen.mjs";
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Release notes of `@v-office/website-sdk`, newest first. Each version has its own directory.
|
|
6
6
|
|
|
7
|
+
- `versions/2.27.0/CHANGELOG.md`: release notes for 2.27.0
|
|
7
8
|
- `versions/2.26.0/CHANGELOG.md`: release notes for 2.26.0
|
|
8
9
|
- `versions/2.25.0/CHANGELOG.md`: release notes for 2.25.0
|
|
9
10
|
- `versions/2.24.1/CHANGELOG.md`: release notes for 2.24.1
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Migration guides of `@v-office/website-sdk`, newest first. Apply them in order when skipping versions.
|
|
6
6
|
|
|
7
|
+
- `versions/2.27.0/MIGRATION.md`: Migration: 2.26.0 to 2.27.0
|
|
7
8
|
- `versions/2.26.0/MIGRATION.md`: Migration: 2.25.0 to 2.26.0
|
|
8
9
|
- `versions/2.25.0/MIGRATION.md`: Migration: 2.24.1 to 2.25.0
|
|
9
10
|
- `versions/2.24.1/MIGRATION.md`: Migration: 2.24.0 to 2.24.1
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Changelog: 2.27.0
|
|
2
|
+
|
|
3
|
+
The platform needs the token and the options a website really uses its SDK with, to keep the
|
|
4
|
+
website's public token current and to use the SDK on the site's behalf the same way. Like the
|
|
5
|
+
backend since 2.24.0, it reads them from the one place where they are final: what
|
|
6
|
+
`createWebsiteSDK` was constructed with. This release records them for the build's site manifest
|
|
7
|
+
(`@v-office/site-manifest` 0.2.0).
|
|
8
|
+
|
|
9
|
+
## Added
|
|
10
|
+
|
|
11
|
+
- `createWebsiteSDK` records the `config` and `options` of every SDK it constructs, once the
|
|
12
|
+
config was accepted, as JSON in a set under
|
|
13
|
+
`globalThis[Symbol.for("@v-office/website-sdk/sdks")]`. Only the top-level config and
|
|
14
|
+
option fields the SDK reads are recorded, their values as passed: a property it ignores (a
|
|
15
|
+
spread settings object, environment variables) is left out and never reaches the manifest. Identical constructions are one entry,
|
|
16
|
+
whatever the order of their keys: the JSON lists each object's keys sorted, arrays as given.
|
|
17
|
+
The set exists as soon as the SDK is loaded, so an empty set means none was constructed.
|
|
18
|
+
`@v-office/site-manifest` writes it to `dist/site-manifest.json` as `websiteSdks`. A config the
|
|
19
|
+
SDK refuses records nothing. A construction whose fields are not JSON (a cycle or a BigInt in a
|
|
20
|
+
field the SDK reads) does not fail the SDK and records `"unrecordable"`
|
|
21
|
+
instead, so the manifest does not report the others as if they were all.
|
|
22
|
+
|
|
23
|
+
## Changed
|
|
24
|
+
|
|
25
|
+
- Nothing else. The record has no effect on what the SDK does, needs no import and is safe in a
|
|
26
|
+
browser bundle. It holds the public token the config already carries into the bundle.
|