@cmssy/core 19.15.0 → 19.17.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/{content-client-MPHJMucu.d.cts → content-client-EAeHiBv2.d.cts} +6 -2
- package/dist/{content-client-MPHJMucu.d.ts → content-client-EAeHiBv2.d.ts} +6 -2
- package/dist/{csp-DKvpTbqW.d.ts → csp-CYbG4uan.d.cts} +8 -3
- package/dist/{csp-B7EAjPSy.d.cts → csp-DE59VC7Q.d.ts} +8 -3
- package/dist/index.cjs +312 -14
- package/dist/index.d.cts +113 -10
- package/dist/index.d.ts +113 -10
- package/dist/index.js +301 -16
- package/dist/internal/locale.cjs +21 -8
- package/dist/internal/locale.d.cts +2 -2
- package/dist/internal/locale.d.ts +2 -2
- package/dist/internal/locale.js +21 -8
- package/dist/internal.cjs +29 -12
- package/dist/internal.d.cts +7 -6
- package/dist/internal.d.ts +7 -6
- package/dist/internal.js +29 -12
- package/dist/{locale-DfW5CAIM.d.cts → locale-CUk6dYTo.d.cts} +2 -2
- package/dist/{locale-B3M-PFm4.d.ts → locale-Ds2uJX5V.d.ts} +2 -2
- package/dist/preflight.cjs +1 -1
- package/dist/preflight.d.cts +2 -2
- package/dist/preflight.d.ts +2 -2
- package/dist/preflight.js +1 -1
- package/package.json +2 -2
package/dist/internal.js
CHANGED
|
@@ -152,7 +152,7 @@ function documentText(document2) {
|
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
// src/version.ts
|
|
155
|
-
var CMSSY_CORE_VERSION = "19.
|
|
155
|
+
var CMSSY_CORE_VERSION = "19.17.0" ;
|
|
156
156
|
var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
|
|
157
157
|
|
|
158
158
|
// src/data/http.ts
|
|
@@ -591,13 +591,26 @@ function asBucket(value) {
|
|
|
591
591
|
// src/data/graphql-request.ts
|
|
592
592
|
async function graphqlRequest(config, query, variables, options = {}, label = "request") {
|
|
593
593
|
const url = options.public ? resolvePublicUrl(config) : resolveApiUrl(config.apiUrl);
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
594
|
+
const text = documentText(query);
|
|
595
|
+
return postGraphql(
|
|
596
|
+
url,
|
|
597
|
+
text,
|
|
598
|
+
withConfigChannel(config, text, variables),
|
|
599
|
+
{
|
|
600
|
+
fetch: options.fetch,
|
|
601
|
+
signal: options.signal,
|
|
602
|
+
headers: options.headers,
|
|
603
|
+
retry: options.retry,
|
|
604
|
+
label
|
|
605
|
+
}
|
|
606
|
+
);
|
|
607
|
+
}
|
|
608
|
+
function withConfigChannel(config, document2, variables) {
|
|
609
|
+
const channel = config.channel?.trim();
|
|
610
|
+
if (!channel || !/\$channel\b/.test(document2)) return variables;
|
|
611
|
+
const current = variables ?? {};
|
|
612
|
+
if (current.channel !== void 0) return variables;
|
|
613
|
+
return { ...current, channel };
|
|
601
614
|
}
|
|
602
615
|
var SITE_CONFIG_QUERY = typedOperation(`query PublicSiteConfig($workspaceSlug: String!) {
|
|
603
616
|
public {
|
|
@@ -1332,11 +1345,13 @@ function cmssyCspHeaders(options) {
|
|
|
1332
1345
|
"Content-Security-Policy": frameAncestors(options.editorOrigin)
|
|
1333
1346
|
};
|
|
1334
1347
|
}
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1348
|
+
var BUYER_PRICES_QUERY = typedOperation(`query BuyerPrices(
|
|
1349
|
+
$workspaceId: ID!
|
|
1350
|
+
$items: [PriceQueryItem!]!
|
|
1351
|
+
$channel: String
|
|
1352
|
+
) {
|
|
1338
1353
|
account {
|
|
1339
|
-
prices(workspaceId: $workspaceId, items: $items) {
|
|
1354
|
+
prices(workspaceId: $workspaceId, items: $items, channel: $channel) {
|
|
1340
1355
|
recordId
|
|
1341
1356
|
variantKey
|
|
1342
1357
|
currency
|
|
@@ -1345,6 +1360,7 @@ var BUYER_PRICES_QUERY = typedOperation(`query BuyerPrices($workspaceId: ID!, $i
|
|
|
1345
1360
|
listed
|
|
1346
1361
|
basePrice
|
|
1347
1362
|
source
|
|
1363
|
+
listSource
|
|
1348
1364
|
minQuantity
|
|
1349
1365
|
maxQuantity
|
|
1350
1366
|
increment
|
|
@@ -1354,6 +1370,7 @@ var BUYER_PRICES_QUERY = typedOperation(`query BuyerPrices($workspaceId: ID!, $i
|
|
|
1354
1370
|
}
|
|
1355
1371
|
displayMode
|
|
1356
1372
|
taxRate
|
|
1373
|
+
taxTreatmentKind
|
|
1357
1374
|
priceAmount {
|
|
1358
1375
|
net
|
|
1359
1376
|
tax
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { F as FetchLike, R as RetryOption } from './content-client-
|
|
1
|
+
import { CmssyLocaleContext, CmssySiteLocales } from '@cmssy/types';
|
|
2
|
+
import { F as FetchLike, R as RetryOption, C as CmssyClientConfig } from './content-client-EAeHiBv2.cjs';
|
|
3
3
|
|
|
4
4
|
interface CmssyTypedDocument<Result, Variables> {
|
|
5
5
|
__apiType?: (variables: Variables) => Result;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { F as FetchLike, R as RetryOption } from './content-client-
|
|
1
|
+
import { CmssyLocaleContext, CmssySiteLocales } from '@cmssy/types';
|
|
2
|
+
import { F as FetchLike, R as RetryOption, C as CmssyClientConfig } from './content-client-EAeHiBv2.js';
|
|
3
3
|
|
|
4
4
|
interface CmssyTypedDocument<Result, Variables> {
|
|
5
5
|
__apiType?: (variables: Variables) => Result;
|
package/dist/preflight.cjs
CHANGED
|
@@ -152,7 +152,7 @@ function documentText(document) {
|
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
// src/version.ts
|
|
155
|
-
var CMSSY_CORE_VERSION = "19.
|
|
155
|
+
var CMSSY_CORE_VERSION = "19.17.0" ;
|
|
156
156
|
var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
|
|
157
157
|
|
|
158
158
|
// src/content/content-client.ts
|
package/dist/preflight.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FetchLike } from './content-client-
|
|
2
|
-
import
|
|
1
|
+
import { F as FetchLike, C as CmssyClientConfig } from './content-client-EAeHiBv2.cjs';
|
|
2
|
+
import '@cmssy/types';
|
|
3
3
|
|
|
4
4
|
interface EditDiagnosticsConfig {
|
|
5
5
|
apiUrl?: string;
|
package/dist/preflight.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FetchLike } from './content-client-
|
|
2
|
-
import
|
|
1
|
+
import { F as FetchLike, C as CmssyClientConfig } from './content-client-EAeHiBv2.js';
|
|
2
|
+
import '@cmssy/types';
|
|
3
3
|
|
|
4
4
|
interface EditDiagnosticsConfig {
|
|
5
5
|
apiUrl?: string;
|
package/dist/preflight.js
CHANGED
|
@@ -150,7 +150,7 @@ function documentText(document) {
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
// src/version.ts
|
|
153
|
-
var CMSSY_CORE_VERSION = "19.
|
|
153
|
+
var CMSSY_CORE_VERSION = "19.17.0" ;
|
|
154
154
|
var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
|
|
155
155
|
|
|
156
156
|
// src/content/content-client.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cmssy/core",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.17.0",
|
|
4
4
|
"description": "Framework-agnostic cmssy gateway: GraphQL client, block/field system, editor protocol. No React, no Next.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cmssy",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"vitest": "^2.1.0"
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
|
-
"@cmssy/types": "0.
|
|
90
|
+
"@cmssy/types": "0.68.0",
|
|
91
91
|
"jose": "^6.2.3"
|
|
92
92
|
},
|
|
93
93
|
"scripts": {
|