@contentful/experience-design-system-cli 2.39.1-dev-build-c634a249.0 → 2.39.1-dev-build-4580d8be.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/app.js +98 -10
- package/dist/index.js +139 -10
- package/dist/package.json +1 -1
- package/package.json +3 -3
package/dist/app.js
CHANGED
|
@@ -19758,11 +19758,11 @@ function buildVisibleRows(props) {
|
|
|
19758
19758
|
if (!expanded) continue;
|
|
19759
19759
|
const subtree = computeCycleMemberSubtree(key);
|
|
19760
19760
|
const isLastAtDepthSubtree = (idx) => {
|
|
19761
|
-
const
|
|
19761
|
+
const own2 = subtree[idx].depth;
|
|
19762
19762
|
for (let j = idx + 1; j < subtree.length; j++) {
|
|
19763
19763
|
const d = subtree[j].depth;
|
|
19764
|
-
if (d <
|
|
19765
|
-
if (d ===
|
|
19764
|
+
if (d < own2) return true;
|
|
19765
|
+
if (d === own2) return false;
|
|
19766
19766
|
}
|
|
19767
19767
|
return true;
|
|
19768
19768
|
};
|
|
@@ -19882,11 +19882,11 @@ function buildVisibleRows(props) {
|
|
|
19882
19882
|
injectedChildren.push({ name: c2.name, depth: c2.depth, isCycleChild: false });
|
|
19883
19883
|
}
|
|
19884
19884
|
const isLastAtDepth = (idx) => {
|
|
19885
|
-
const
|
|
19885
|
+
const own2 = injectedChildren[idx].depth;
|
|
19886
19886
|
for (let j = idx + 1; j < injectedChildren.length; j++) {
|
|
19887
19887
|
const d = injectedChildren[j].depth;
|
|
19888
|
-
if (d <
|
|
19889
|
-
if (d ===
|
|
19888
|
+
if (d < own2) return true;
|
|
19889
|
+
if (d === own2) return false;
|
|
19890
19890
|
}
|
|
19891
19891
|
return true;
|
|
19892
19892
|
};
|
|
@@ -22303,6 +22303,94 @@ var DTCGTokenSchema2 = z4.strictObject({
|
|
|
22303
22303
|
// packages/experience-design-system-types/dist/src/dtcg/validate.js
|
|
22304
22304
|
var TOKEN_TYPE_SET4 = new Set(DESIGN_TOKEN_TYPES2);
|
|
22305
22305
|
|
|
22306
|
+
// packages/experience-design-system-types/dist/src/property-contract/json-value.js
|
|
22307
|
+
var nodeTypes = globalThis.process?.getBuiltinModule?.("node:util")?.types;
|
|
22308
|
+
|
|
22309
|
+
// packages/experience-design-system-types/dist/src/property-contract/date-time-value.js
|
|
22310
|
+
import * as z5 from "zod/mini";
|
|
22311
|
+
var dateTimeValueSchema = z5.iso.datetime({ offset: true });
|
|
22312
|
+
|
|
22313
|
+
// packages/experience-design-system-types/dist/src/property-contract/target-definition.js
|
|
22314
|
+
var TARGET_PROPERTY_TYPES = [
|
|
22315
|
+
"String",
|
|
22316
|
+
"Number",
|
|
22317
|
+
"Boolean",
|
|
22318
|
+
"Array",
|
|
22319
|
+
"Record",
|
|
22320
|
+
"Integer",
|
|
22321
|
+
"DateTime",
|
|
22322
|
+
"RichText",
|
|
22323
|
+
"JSON",
|
|
22324
|
+
"ResourceLink",
|
|
22325
|
+
"Literal",
|
|
22326
|
+
"DiscriminatedUnion"
|
|
22327
|
+
];
|
|
22328
|
+
var SAME_SPACE_RESOURCE_SOURCE = "crn:contentful:::content:spaces/$self/environments/$self";
|
|
22329
|
+
var targetDefinitionJsonSchema = {
|
|
22330
|
+
$schema: "http://json-schema.org/draft-07/schema#",
|
|
22331
|
+
$ref: "#/definitions/target",
|
|
22332
|
+
definitions: {
|
|
22333
|
+
target: {
|
|
22334
|
+
type: "object",
|
|
22335
|
+
required: ["type"],
|
|
22336
|
+
properties: {
|
|
22337
|
+
type: { enum: [...TARGET_PROPERTY_TYPES] },
|
|
22338
|
+
id: { type: "string" },
|
|
22339
|
+
name: { type: "string" },
|
|
22340
|
+
description: { type: "string" },
|
|
22341
|
+
required: { type: "boolean" },
|
|
22342
|
+
values: { type: "array", minItems: 1 },
|
|
22343
|
+
defaultValue: {},
|
|
22344
|
+
items: { $ref: "#/definitions/target" },
|
|
22345
|
+
fields: { type: "object", minProperties: 1, additionalProperties: { $ref: "#/definitions/target" } },
|
|
22346
|
+
allowedResources: {
|
|
22347
|
+
type: "array",
|
|
22348
|
+
minItems: 1,
|
|
22349
|
+
items: {
|
|
22350
|
+
type: "object",
|
|
22351
|
+
required: ["type", "source"],
|
|
22352
|
+
properties: {
|
|
22353
|
+
type: { enum: ["Contentful:Entry", "Contentful:Asset"] },
|
|
22354
|
+
source: { const: SAME_SPACE_RESOURCE_SOURCE },
|
|
22355
|
+
allowedTypes: { type: "array", items: { type: "string" } }
|
|
22356
|
+
},
|
|
22357
|
+
allOf: [
|
|
22358
|
+
{
|
|
22359
|
+
if: { properties: { type: { const: "Contentful:Entry" } } },
|
|
22360
|
+
then: { required: ["allowedTypes"] },
|
|
22361
|
+
else: { not: { required: ["allowedTypes"] } }
|
|
22362
|
+
}
|
|
22363
|
+
],
|
|
22364
|
+
additionalProperties: false
|
|
22365
|
+
}
|
|
22366
|
+
},
|
|
22367
|
+
value: {},
|
|
22368
|
+
valueType: { $ref: "#/definitions/target" },
|
|
22369
|
+
discriminator: { type: "string", minLength: 1 },
|
|
22370
|
+
members: {
|
|
22371
|
+
type: "array",
|
|
22372
|
+
minItems: 2,
|
|
22373
|
+
uniqueItems: true,
|
|
22374
|
+
items: {
|
|
22375
|
+
allOf: [
|
|
22376
|
+
{ $ref: "#/definitions/target" },
|
|
22377
|
+
{ type: "object", properties: { type: { const: "Record" } }, required: ["type", "fields"] }
|
|
22378
|
+
]
|
|
22379
|
+
}
|
|
22380
|
+
}
|
|
22381
|
+
},
|
|
22382
|
+
allOf: [
|
|
22383
|
+
{
|
|
22384
|
+
if: { properties: { type: { const: "DiscriminatedUnion" } } },
|
|
22385
|
+
then: { required: ["discriminator", "members"] },
|
|
22386
|
+
else: { not: { anyOf: [{ required: ["discriminator"] }, { required: ["members"] }] } }
|
|
22387
|
+
}
|
|
22388
|
+
],
|
|
22389
|
+
additionalProperties: false
|
|
22390
|
+
}
|
|
22391
|
+
}
|
|
22392
|
+
};
|
|
22393
|
+
|
|
22306
22394
|
// packages/experience-design-system-cli/src/tui/import/steps/preview-validation-error/logic.ts
|
|
22307
22395
|
function failedComponentNames(errors) {
|
|
22308
22396
|
return [...new Set(errors.map((error) => error.componentName))];
|
|
@@ -22423,14 +22511,14 @@ function computeRenderStatuses(closure, directIssues) {
|
|
|
22423
22511
|
for (const node of closure.nodes) {
|
|
22424
22512
|
nodesByName.set(node.name, { name: node.name, path: node.path });
|
|
22425
22513
|
}
|
|
22426
|
-
const
|
|
22514
|
+
const own2 = /* @__PURE__ */ new Map();
|
|
22427
22515
|
for (const node of closure.nodes) {
|
|
22428
22516
|
const s = directIssues.get(node.name);
|
|
22429
|
-
if (s && s !== "ok")
|
|
22517
|
+
if (s && s !== "ok") own2.set(node.name, s);
|
|
22430
22518
|
}
|
|
22431
22519
|
const inheritedSources = /* @__PURE__ */ new Map();
|
|
22432
22520
|
for (const node of closure.nodes) {
|
|
22433
|
-
const ownStatus =
|
|
22521
|
+
const ownStatus = own2.get(node.name);
|
|
22434
22522
|
if (!ownStatus) continue;
|
|
22435
22523
|
for (let i = 0; i < node.path.length - 1; i++) {
|
|
22436
22524
|
const ancestor = node.path[i];
|
|
@@ -22438,7 +22526,7 @@ function computeRenderStatuses(closure, directIssues) {
|
|
|
22438
22526
|
inheritedSources.get(ancestor).set(node.name, ownStatus);
|
|
22439
22527
|
}
|
|
22440
22528
|
}
|
|
22441
|
-
for (const [name, status] of
|
|
22529
|
+
for (const [name, status] of own2.entries()) {
|
|
22442
22530
|
out.set(name, {
|
|
22443
22531
|
status,
|
|
22444
22532
|
isOwn: true,
|
package/dist/index.js
CHANGED
|
@@ -22666,11 +22666,11 @@ function buildVisibleRows(props) {
|
|
|
22666
22666
|
if (!expanded) continue;
|
|
22667
22667
|
const subtree = computeCycleMemberSubtree(key);
|
|
22668
22668
|
const isLastAtDepthSubtree = (idx) => {
|
|
22669
|
-
const
|
|
22669
|
+
const own2 = subtree[idx].depth;
|
|
22670
22670
|
for (let j = idx + 1; j < subtree.length; j++) {
|
|
22671
22671
|
const d = subtree[j].depth;
|
|
22672
|
-
if (d <
|
|
22673
|
-
if (d ===
|
|
22672
|
+
if (d < own2) return true;
|
|
22673
|
+
if (d === own2) return false;
|
|
22674
22674
|
}
|
|
22675
22675
|
return true;
|
|
22676
22676
|
};
|
|
@@ -22790,11 +22790,11 @@ function buildVisibleRows(props) {
|
|
|
22790
22790
|
injectedChildren.push({ name: c2.name, depth: c2.depth, isCycleChild: false });
|
|
22791
22791
|
}
|
|
22792
22792
|
const isLastAtDepth = (idx) => {
|
|
22793
|
-
const
|
|
22793
|
+
const own2 = injectedChildren[idx].depth;
|
|
22794
22794
|
for (let j = idx + 1; j < injectedChildren.length; j++) {
|
|
22795
22795
|
const d = injectedChildren[j].depth;
|
|
22796
|
-
if (d <
|
|
22797
|
-
if (d ===
|
|
22796
|
+
if (d < own2) return true;
|
|
22797
|
+
if (d === own2) return false;
|
|
22798
22798
|
}
|
|
22799
22799
|
return true;
|
|
22800
22800
|
};
|
|
@@ -25551,12 +25551,141 @@ var init_dtcg2 = __esm({
|
|
|
25551
25551
|
}
|
|
25552
25552
|
});
|
|
25553
25553
|
|
|
25554
|
+
// packages/experience-design-system-types/dist/src/property-contract/json-value.js
|
|
25555
|
+
var nodeTypes;
|
|
25556
|
+
var init_json_value = __esm({
|
|
25557
|
+
"packages/experience-design-system-types/dist/src/property-contract/json-value.js"() {
|
|
25558
|
+
"use strict";
|
|
25559
|
+
nodeTypes = globalThis.process?.getBuiltinModule?.("node:util")?.types;
|
|
25560
|
+
}
|
|
25561
|
+
});
|
|
25562
|
+
|
|
25563
|
+
// packages/experience-design-system-types/dist/src/property-contract/date-time-value.js
|
|
25564
|
+
import * as z5 from "zod/mini";
|
|
25565
|
+
var dateTimeValueSchema;
|
|
25566
|
+
var init_date_time_value = __esm({
|
|
25567
|
+
"packages/experience-design-system-types/dist/src/property-contract/date-time-value.js"() {
|
|
25568
|
+
"use strict";
|
|
25569
|
+
dateTimeValueSchema = z5.iso.datetime({ offset: true });
|
|
25570
|
+
}
|
|
25571
|
+
});
|
|
25572
|
+
|
|
25573
|
+
// packages/experience-design-system-types/dist/src/property-contract/discriminated-union.js
|
|
25574
|
+
var init_discriminated_union = __esm({
|
|
25575
|
+
"packages/experience-design-system-types/dist/src/property-contract/discriminated-union.js"() {
|
|
25576
|
+
"use strict";
|
|
25577
|
+
init_json_value();
|
|
25578
|
+
}
|
|
25579
|
+
});
|
|
25580
|
+
|
|
25581
|
+
// packages/experience-design-system-types/dist/src/property-contract/target-definition.js
|
|
25582
|
+
var TARGET_PROPERTY_TYPES, SAME_SPACE_RESOURCE_SOURCE, targetDefinitionJsonSchema;
|
|
25583
|
+
var init_target_definition = __esm({
|
|
25584
|
+
"packages/experience-design-system-types/dist/src/property-contract/target-definition.js"() {
|
|
25585
|
+
"use strict";
|
|
25586
|
+
init_json_value();
|
|
25587
|
+
init_date_time_value();
|
|
25588
|
+
init_discriminated_union();
|
|
25589
|
+
TARGET_PROPERTY_TYPES = [
|
|
25590
|
+
"String",
|
|
25591
|
+
"Number",
|
|
25592
|
+
"Boolean",
|
|
25593
|
+
"Array",
|
|
25594
|
+
"Record",
|
|
25595
|
+
"Integer",
|
|
25596
|
+
"DateTime",
|
|
25597
|
+
"RichText",
|
|
25598
|
+
"JSON",
|
|
25599
|
+
"ResourceLink",
|
|
25600
|
+
"Literal",
|
|
25601
|
+
"DiscriminatedUnion"
|
|
25602
|
+
];
|
|
25603
|
+
SAME_SPACE_RESOURCE_SOURCE = "crn:contentful:::content:spaces/$self/environments/$self";
|
|
25604
|
+
targetDefinitionJsonSchema = {
|
|
25605
|
+
$schema: "http://json-schema.org/draft-07/schema#",
|
|
25606
|
+
$ref: "#/definitions/target",
|
|
25607
|
+
definitions: {
|
|
25608
|
+
target: {
|
|
25609
|
+
type: "object",
|
|
25610
|
+
required: ["type"],
|
|
25611
|
+
properties: {
|
|
25612
|
+
type: { enum: [...TARGET_PROPERTY_TYPES] },
|
|
25613
|
+
id: { type: "string" },
|
|
25614
|
+
name: { type: "string" },
|
|
25615
|
+
description: { type: "string" },
|
|
25616
|
+
required: { type: "boolean" },
|
|
25617
|
+
values: { type: "array", minItems: 1 },
|
|
25618
|
+
defaultValue: {},
|
|
25619
|
+
items: { $ref: "#/definitions/target" },
|
|
25620
|
+
fields: { type: "object", minProperties: 1, additionalProperties: { $ref: "#/definitions/target" } },
|
|
25621
|
+
allowedResources: {
|
|
25622
|
+
type: "array",
|
|
25623
|
+
minItems: 1,
|
|
25624
|
+
items: {
|
|
25625
|
+
type: "object",
|
|
25626
|
+
required: ["type", "source"],
|
|
25627
|
+
properties: {
|
|
25628
|
+
type: { enum: ["Contentful:Entry", "Contentful:Asset"] },
|
|
25629
|
+
source: { const: SAME_SPACE_RESOURCE_SOURCE },
|
|
25630
|
+
allowedTypes: { type: "array", items: { type: "string" } }
|
|
25631
|
+
},
|
|
25632
|
+
allOf: [
|
|
25633
|
+
{
|
|
25634
|
+
if: { properties: { type: { const: "Contentful:Entry" } } },
|
|
25635
|
+
then: { required: ["allowedTypes"] },
|
|
25636
|
+
else: { not: { required: ["allowedTypes"] } }
|
|
25637
|
+
}
|
|
25638
|
+
],
|
|
25639
|
+
additionalProperties: false
|
|
25640
|
+
}
|
|
25641
|
+
},
|
|
25642
|
+
value: {},
|
|
25643
|
+
valueType: { $ref: "#/definitions/target" },
|
|
25644
|
+
discriminator: { type: "string", minLength: 1 },
|
|
25645
|
+
members: {
|
|
25646
|
+
type: "array",
|
|
25647
|
+
minItems: 2,
|
|
25648
|
+
uniqueItems: true,
|
|
25649
|
+
items: {
|
|
25650
|
+
allOf: [
|
|
25651
|
+
{ $ref: "#/definitions/target" },
|
|
25652
|
+
{ type: "object", properties: { type: { const: "Record" } }, required: ["type", "fields"] }
|
|
25653
|
+
]
|
|
25654
|
+
}
|
|
25655
|
+
}
|
|
25656
|
+
},
|
|
25657
|
+
allOf: [
|
|
25658
|
+
{
|
|
25659
|
+
if: { properties: { type: { const: "DiscriminatedUnion" } } },
|
|
25660
|
+
then: { required: ["discriminator", "members"] },
|
|
25661
|
+
else: { not: { anyOf: [{ required: ["discriminator"] }, { required: ["members"] }] } }
|
|
25662
|
+
}
|
|
25663
|
+
],
|
|
25664
|
+
additionalProperties: false
|
|
25665
|
+
}
|
|
25666
|
+
}
|
|
25667
|
+
};
|
|
25668
|
+
}
|
|
25669
|
+
});
|
|
25670
|
+
|
|
25671
|
+
// packages/experience-design-system-types/dist/src/property-contract/index.js
|
|
25672
|
+
var init_property_contract = __esm({
|
|
25673
|
+
"packages/experience-design-system-types/dist/src/property-contract/index.js"() {
|
|
25674
|
+
"use strict";
|
|
25675
|
+
init_json_value();
|
|
25676
|
+
init_date_time_value();
|
|
25677
|
+
init_discriminated_union();
|
|
25678
|
+
init_target_definition();
|
|
25679
|
+
}
|
|
25680
|
+
});
|
|
25681
|
+
|
|
25554
25682
|
// packages/experience-design-system-types/dist/src/index.js
|
|
25555
25683
|
var init_src4 = __esm({
|
|
25556
25684
|
"packages/experience-design-system-types/dist/src/index.js"() {
|
|
25557
25685
|
"use strict";
|
|
25558
25686
|
init_cdf2();
|
|
25559
25687
|
init_dtcg2();
|
|
25688
|
+
init_property_contract();
|
|
25560
25689
|
}
|
|
25561
25690
|
});
|
|
25562
25691
|
|
|
@@ -25696,14 +25825,14 @@ function computeRenderStatuses(closure, directIssues) {
|
|
|
25696
25825
|
for (const node of closure.nodes) {
|
|
25697
25826
|
nodesByName.set(node.name, { name: node.name, path: node.path });
|
|
25698
25827
|
}
|
|
25699
|
-
const
|
|
25828
|
+
const own2 = /* @__PURE__ */ new Map();
|
|
25700
25829
|
for (const node of closure.nodes) {
|
|
25701
25830
|
const s = directIssues.get(node.name);
|
|
25702
|
-
if (s && s !== "ok")
|
|
25831
|
+
if (s && s !== "ok") own2.set(node.name, s);
|
|
25703
25832
|
}
|
|
25704
25833
|
const inheritedSources = /* @__PURE__ */ new Map();
|
|
25705
25834
|
for (const node of closure.nodes) {
|
|
25706
|
-
const ownStatus =
|
|
25835
|
+
const ownStatus = own2.get(node.name);
|
|
25707
25836
|
if (!ownStatus) continue;
|
|
25708
25837
|
for (let i = 0; i < node.path.length - 1; i++) {
|
|
25709
25838
|
const ancestor = node.path[i];
|
|
@@ -25711,7 +25840,7 @@ function computeRenderStatuses(closure, directIssues) {
|
|
|
25711
25840
|
inheritedSources.get(ancestor).set(node.name, ownStatus);
|
|
25712
25841
|
}
|
|
25713
25842
|
}
|
|
25714
|
-
for (const [name, status] of
|
|
25843
|
+
for (const [name, status] of own2.entries()) {
|
|
25715
25844
|
out.set(name, {
|
|
25716
25845
|
status,
|
|
25717
25846
|
isOwn: true,
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-cli",
|
|
3
|
-
"version": "2.39.1-dev-build-
|
|
3
|
+
"version": "2.39.1-dev-build-4580d8be.0",
|
|
4
4
|
"description": "Contentful Experiences design system import CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"ts-morph": "^27.0.2",
|
|
46
46
|
"typescript": "^5.9.3",
|
|
47
47
|
"zod": "^4.6.5",
|
|
48
|
-
"@contentful/experience-design-system-backend-pipeline": "2.39.1-dev-build-
|
|
49
|
-
"@contentful/experience-design-system-types": "2.39.1-dev-build-
|
|
48
|
+
"@contentful/experience-design-system-backend-pipeline": "2.39.1-dev-build-4580d8be.0",
|
|
49
|
+
"@contentful/experience-design-system-types": "2.39.1-dev-build-4580d8be.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@tsconfig/node24": "^24.0.4",
|