pim-import 4.25.0 → 4.25.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.
|
@@ -16,109 +16,8 @@ const publishEntry = async (entryId, type) => {
|
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
const publishTopicProduct = async (productEntry) => {
|
|
19
|
-
const defEnvLocaleCode = await contentful_1.getEnvironmentDefaultLocaleCode();
|
|
20
19
|
const pageId = products_1.getProductPageIdByCode(productEntry.sys.id);
|
|
21
20
|
await publishEntry(pageId, "page");
|
|
22
|
-
if (productEntry?.fields?.catalogs?.[defEnvLocaleCode].length) {
|
|
23
|
-
for (const catalog of productEntry.fields.catalogs[defEnvLocaleCode]) {
|
|
24
|
-
await publishEntry(catalog.sys.id, "topicCatalog");
|
|
25
|
-
await publishEntry(`${catalog.sys.id}_PAGE`, "page");
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
if (productEntry?.fields?.thumbnailImgix?.[defEnvLocaleCode]) {
|
|
29
|
-
const thumbnailImgix = productEntry?.fields?.thumbnailImgix?.[defEnvLocaleCode];
|
|
30
|
-
if (thumbnailImgix) {
|
|
31
|
-
await publishEntry(thumbnailImgix.sys.id, "wrapperImgix");
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
if (productEntry?.fields?.designers?.[defEnvLocaleCode].length) {
|
|
35
|
-
for (const designer of productEntry.fields.designers[defEnvLocaleCode]) {
|
|
36
|
-
await publishEntry(designer.sys.id, "topicDesigner");
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
if (productEntry?.fields?.categoriesArchitectural?.[defEnvLocaleCode].length) {
|
|
40
|
-
for (const category of productEntry.fields.categoriesArchitectural[defEnvLocaleCode]) {
|
|
41
|
-
await publishEntry(category.sys.id, "topicCategory");
|
|
42
|
-
await publishEntry(`${category.sys.id}_PAGE`, "page");
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
if (productEntry?.fields?.categoriesOutdoor?.[defEnvLocaleCode].length) {
|
|
46
|
-
for (const category of productEntry.fields.categoriesOutdoor[defEnvLocaleCode]) {
|
|
47
|
-
await publishEntry(category.sys.id, "topicCategory");
|
|
48
|
-
await publishEntry(`${category.sys.id}_PAGE`, "page");
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
if (productEntry?.fields?.categoriesDecorative?.[defEnvLocaleCode].length) {
|
|
52
|
-
for (const category of productEntry.fields.categoriesDecorative[defEnvLocaleCode]) {
|
|
53
|
-
await publishEntry(category.sys.id, "topicCategory");
|
|
54
|
-
await publishEntry(`${category.sys.id}_PAGE`, "page");
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
if (productEntry?.fields?.families?.[defEnvLocaleCode].length) {
|
|
58
|
-
for (const family of productEntry.fields.families[defEnvLocaleCode]) {
|
|
59
|
-
await publishEntry(family.sys.id, "topicFamily");
|
|
60
|
-
await publishEntry(`${family.sys.id}_PAGE`, "page");
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
if (productEntry?.fields?.subFamiliesArchitectural?.[defEnvLocaleCode].length) {
|
|
64
|
-
for (const subFamily of productEntry.fields.subFamiliesArchitectural[defEnvLocaleCode]) {
|
|
65
|
-
await publishEntry(subFamily.sys.id, "topicSubFamily");
|
|
66
|
-
await publishEntry(`${subFamily.sys.id}_PAGE`, "page");
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
if (productEntry?.fields?.subFamiliesOutdoor?.[defEnvLocaleCode].length) {
|
|
70
|
-
for (const subFamily of productEntry.fields.subFamiliesOutdoor[defEnvLocaleCode]) {
|
|
71
|
-
await publishEntry(subFamily.sys.id, "topicSubFamily");
|
|
72
|
-
await publishEntry(`${subFamily.sys.id}_PAGE`, "page");
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
if (productEntry?.fields?.subFamiliesDecorative?.[defEnvLocaleCode].length) {
|
|
76
|
-
for (const subFamily of productEntry.fields.subFamiliesDecorative[defEnvLocaleCode]) {
|
|
77
|
-
await publishEntry(subFamily.sys.id, "topicSubFamily");
|
|
78
|
-
await publishEntry(`${subFamily.sys.id}_PAGE`, "page");
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
if (productEntry?.fields?.modelsArchitectural?.[defEnvLocaleCode].length) {
|
|
82
|
-
for (const model of productEntry.fields.modelsArchitectural[defEnvLocaleCode]) {
|
|
83
|
-
await publishEntry(model.sys.id, "topicModel");
|
|
84
|
-
await publishEntry(`${model.sys.id}_PAGE`, "page");
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
if (productEntry?.fields?.modelsOutdoor?.[defEnvLocaleCode].length) {
|
|
88
|
-
for (const model of productEntry.fields.modelsOutdoor[defEnvLocaleCode]) {
|
|
89
|
-
await publishEntry(model.sys.id, "topicModel");
|
|
90
|
-
await publishEntry(`${model.sys.id}_PAGE`, "page");
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
if (productEntry?.fields?.modelsDecorative?.[defEnvLocaleCode].length) {
|
|
94
|
-
for (const model of productEntry.fields.modelsDecorative[defEnvLocaleCode]) {
|
|
95
|
-
await publishEntry(model.sys.id, "topicModel");
|
|
96
|
-
await publishEntry(`${model.sys.id}_PAGE`, "page");
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
if (productEntry?.fields?.subModelsArchitectural?.[defEnvLocaleCode].length) {
|
|
100
|
-
for (const subModel of productEntry.fields.subModelsArchitectural[defEnvLocaleCode]) {
|
|
101
|
-
await publishEntry(subModel.sys.id, "topicSubModel");
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
if (productEntry?.fields?.subModelsOutdoor?.[defEnvLocaleCode].length) {
|
|
105
|
-
for (const subModel of productEntry.fields.subModelsOutdoor[defEnvLocaleCode]) {
|
|
106
|
-
await publishEntry(subModel.sys.id, "topicSubModel");
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
if (productEntry?.fields?.subModelsDecorative?.[defEnvLocaleCode].length) {
|
|
110
|
-
for (const subModel of productEntry.fields.subModelsDecorative[defEnvLocaleCode]) {
|
|
111
|
-
await publishEntry(subModel.sys.id, "topicSubModel");
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
if (productEntry?.fields?.productLine?.[defEnvLocaleCode]) {
|
|
115
|
-
const productLine = productEntry?.fields?.productLine?.[defEnvLocaleCode];
|
|
116
|
-
await publishEntry(productLine.sys.id, "topicProductLine");
|
|
117
|
-
}
|
|
118
|
-
if (productEntry?.fields?.productSubLine?.[defEnvLocaleCode]) {
|
|
119
|
-
const productSubLine = productEntry?.fields?.productSubLine?.[defEnvLocaleCode];
|
|
120
|
-
await publishEntry(productSubLine.sys.id, "topicProductSubLine");
|
|
121
|
-
}
|
|
122
21
|
await productEntry.publish();
|
|
123
22
|
};
|
|
124
23
|
exports.publishTopicProduct = publishTopicProduct;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bulkPublish.js","sourceRoot":"","sources":["../../../src/pim/methods/bulkPublish.ts"],"names":[],"mappings":";;;AAEA,sDAI+B;AAC/B,0CAAmD;AACnD,yCAAoD;AACpD,qDAAwD;AAExD,MAAM,YAAY,GAAG,KAAK,EAAE,OAAe,EAAE,IAAY,EAAE,EAAE;IAC3D,MAAM,KAAK,GAAG,MAAM,yBAAY,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAChD,IAAI,KAAK,IAAI,KAAK,CAAC,OAAO,EAAE,EAAE;QAC5B,UAAG,CAAC,iBAAiB,OAAO,cAAc,IAAI,EAAE,CAAC,CAAC;QAClD,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC;KACvB;SAAM,IAAI,CAAC,KAAK,EAAE;QACjB,UAAG,CAAC,mBAAmB,OAAO,cAAc,IAAI,EAAE,EAAE,MAAM,CAAC,CAAC;KAC7D;AACH,CAAC,CAAC;AAEK,MAAM,mBAAmB,GAAG,KAAK,EAAE,YAAmB,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"b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;gBAC3C,IAAI,kBAAW,EAAE;oBACf,kBAAW,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;iBACzB;gBACD,MAAM,yBAAc,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;gBAExC,IAAI,kBAAW,EAAE;oBACf,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC;oBAC1D,kBAAW,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;iBACtC;aACF;YAAC,OAAO,GAAG,EAAE;gBACZ,MAAM,GAAG,iBAAiB,IAAI,CAAC,GAAG,CAAC,EAAE,SAAS,CAAC;gBAC/C,IAAI,kBAAW,EAAE;oBACf,kBAAW,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;iBACzB;aACF;SACF;KACF;IAED,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC;IACzC,OAAO;QACL,SAAS;QACT,KAAK;KACN,CAAC;AACJ,CAAC,CAAC;AArEW,QAAA,uBAAuB,2BAqElC"}
|
package/package.json
CHANGED
|
@@ -20,175 +20,175 @@ const publishEntry = async (entryId: string, type: string) => {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
export const publishTopicProduct = async (productEntry: Entry) => {
|
|
23
|
-
const defEnvLocaleCode = await getEnvironmentDefaultLocaleCode();
|
|
23
|
+
// const defEnvLocaleCode = await getEnvironmentDefaultLocaleCode();
|
|
24
24
|
|
|
25
25
|
// page
|
|
26
26
|
const pageId = getProductPageIdByCode(productEntry.sys.id);
|
|
27
27
|
await publishEntry(pageId, "page");
|
|
28
28
|
|
|
29
|
-
// catalogs
|
|
30
|
-
if (productEntry?.fields?.catalogs?.[defEnvLocaleCode].length) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
29
|
+
// // catalogs
|
|
30
|
+
// if (productEntry?.fields?.catalogs?.[defEnvLocaleCode].length) {
|
|
31
|
+
// for (const catalog of productEntry.fields.catalogs[defEnvLocaleCode]) {
|
|
32
|
+
// await publishEntry(catalog.sys.id, "topicCatalog");
|
|
33
|
+
// await publishEntry(`${catalog.sys.id}_PAGE`, "page");
|
|
34
|
+
// }
|
|
35
|
+
// }
|
|
36
36
|
|
|
37
|
-
// Thumbnail Imgix
|
|
38
|
-
if (productEntry?.fields?.thumbnailImgix?.[defEnvLocaleCode]) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
37
|
+
// // Thumbnail Imgix
|
|
38
|
+
// if (productEntry?.fields?.thumbnailImgix?.[defEnvLocaleCode]) {
|
|
39
|
+
// const thumbnailImgix =
|
|
40
|
+
// productEntry?.fields?.thumbnailImgix?.[defEnvLocaleCode];
|
|
41
|
+
// if (thumbnailImgix) {
|
|
42
|
+
// await publishEntry(thumbnailImgix.sys.id, "wrapperImgix");
|
|
43
|
+
// }
|
|
44
|
+
// }
|
|
45
45
|
|
|
46
|
-
// Designers
|
|
47
|
-
if (productEntry?.fields?.designers?.[defEnvLocaleCode].length) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
46
|
+
// // Designers
|
|
47
|
+
// if (productEntry?.fields?.designers?.[defEnvLocaleCode].length) {
|
|
48
|
+
// for (const designer of productEntry.fields.designers[defEnvLocaleCode]) {
|
|
49
|
+
// await publishEntry(designer.sys.id, "topicDesigner");
|
|
50
|
+
// }
|
|
51
|
+
// }
|
|
52
52
|
|
|
53
|
-
// categoriesArchitectural
|
|
54
|
-
if (
|
|
55
|
-
|
|
56
|
-
) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
53
|
+
// // categoriesArchitectural
|
|
54
|
+
// if (
|
|
55
|
+
// productEntry?.fields?.categoriesArchitectural?.[defEnvLocaleCode].length
|
|
56
|
+
// ) {
|
|
57
|
+
// for (const category of productEntry.fields.categoriesArchitectural[
|
|
58
|
+
// defEnvLocaleCode
|
|
59
|
+
// ]) {
|
|
60
|
+
// await publishEntry(category.sys.id, "topicCategory");
|
|
61
|
+
// await publishEntry(`${category.sys.id}_PAGE`, "page");
|
|
62
|
+
// }
|
|
63
|
+
// }
|
|
64
64
|
|
|
65
|
-
// categoriesOutdoor
|
|
66
|
-
if (productEntry?.fields?.categoriesOutdoor?.[defEnvLocaleCode].length) {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
65
|
+
// // categoriesOutdoor
|
|
66
|
+
// if (productEntry?.fields?.categoriesOutdoor?.[defEnvLocaleCode].length) {
|
|
67
|
+
// for (const category of productEntry.fields.categoriesOutdoor[
|
|
68
|
+
// defEnvLocaleCode
|
|
69
|
+
// ]) {
|
|
70
|
+
// await publishEntry(category.sys.id, "topicCategory");
|
|
71
|
+
// await publishEntry(`${category.sys.id}_PAGE`, "page");
|
|
72
|
+
// }
|
|
73
|
+
// }
|
|
74
74
|
|
|
75
|
-
// categoriesDecorative
|
|
76
|
-
if (productEntry?.fields?.categoriesDecorative?.[defEnvLocaleCode].length) {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
75
|
+
// // categoriesDecorative
|
|
76
|
+
// if (productEntry?.fields?.categoriesDecorative?.[defEnvLocaleCode].length) {
|
|
77
|
+
// for (const category of productEntry.fields.categoriesDecorative[
|
|
78
|
+
// defEnvLocaleCode
|
|
79
|
+
// ]) {
|
|
80
|
+
// await publishEntry(category.sys.id, "topicCategory");
|
|
81
|
+
// await publishEntry(`${category.sys.id}_PAGE`, "page");
|
|
82
|
+
// }
|
|
83
|
+
// }
|
|
84
84
|
|
|
85
|
-
// categoriesDecorative
|
|
86
|
-
if (productEntry?.fields?.families?.[defEnvLocaleCode].length) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
85
|
+
// // categoriesDecorative
|
|
86
|
+
// if (productEntry?.fields?.families?.[defEnvLocaleCode].length) {
|
|
87
|
+
// for (const family of productEntry.fields.families[defEnvLocaleCode]) {
|
|
88
|
+
// await publishEntry(family.sys.id, "topicFamily");
|
|
89
|
+
// await publishEntry(`${family.sys.id}_PAGE`, "page");
|
|
90
|
+
// }
|
|
91
|
+
// }
|
|
92
92
|
|
|
93
|
-
// subFamiliesArchitectural
|
|
94
|
-
if (
|
|
95
|
-
|
|
96
|
-
) {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
93
|
+
// // subFamiliesArchitectural
|
|
94
|
+
// if (
|
|
95
|
+
// productEntry?.fields?.subFamiliesArchitectural?.[defEnvLocaleCode].length
|
|
96
|
+
// ) {
|
|
97
|
+
// for (const subFamily of productEntry.fields.subFamiliesArchitectural[
|
|
98
|
+
// defEnvLocaleCode
|
|
99
|
+
// ]) {
|
|
100
|
+
// await publishEntry(subFamily.sys.id, "topicSubFamily");
|
|
101
|
+
// await publishEntry(`${subFamily.sys.id}_PAGE`, "page");
|
|
102
|
+
// }
|
|
103
|
+
// }
|
|
104
104
|
|
|
105
|
-
// subFamiliesOutdoor
|
|
106
|
-
if (productEntry?.fields?.subFamiliesOutdoor?.[defEnvLocaleCode].length) {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
105
|
+
// // subFamiliesOutdoor
|
|
106
|
+
// if (productEntry?.fields?.subFamiliesOutdoor?.[defEnvLocaleCode].length) {
|
|
107
|
+
// for (const subFamily of productEntry.fields.subFamiliesOutdoor[
|
|
108
|
+
// defEnvLocaleCode
|
|
109
|
+
// ]) {
|
|
110
|
+
// await publishEntry(subFamily.sys.id, "topicSubFamily");
|
|
111
|
+
// await publishEntry(`${subFamily.sys.id}_PAGE`, "page");
|
|
112
|
+
// }
|
|
113
|
+
// }
|
|
114
114
|
|
|
115
|
-
// subFamiliesDecorative
|
|
116
|
-
if (productEntry?.fields?.subFamiliesDecorative?.[defEnvLocaleCode].length) {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
115
|
+
// // subFamiliesDecorative
|
|
116
|
+
// if (productEntry?.fields?.subFamiliesDecorative?.[defEnvLocaleCode].length) {
|
|
117
|
+
// for (const subFamily of productEntry.fields.subFamiliesDecorative[
|
|
118
|
+
// defEnvLocaleCode
|
|
119
|
+
// ]) {
|
|
120
|
+
// await publishEntry(subFamily.sys.id, "topicSubFamily");
|
|
121
|
+
// await publishEntry(`${subFamily.sys.id}_PAGE`, "page");
|
|
122
|
+
// }
|
|
123
|
+
// }
|
|
124
124
|
|
|
125
|
-
// modelsArchitectural
|
|
126
|
-
if (productEntry?.fields?.modelsArchitectural?.[defEnvLocaleCode].length) {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}
|
|
125
|
+
// // modelsArchitectural
|
|
126
|
+
// if (productEntry?.fields?.modelsArchitectural?.[defEnvLocaleCode].length) {
|
|
127
|
+
// for (const model of productEntry.fields.modelsArchitectural[
|
|
128
|
+
// defEnvLocaleCode
|
|
129
|
+
// ]) {
|
|
130
|
+
// await publishEntry(model.sys.id, "topicModel");
|
|
131
|
+
// await publishEntry(`${model.sys.id}_PAGE`, "page");
|
|
132
|
+
// }
|
|
133
|
+
// }
|
|
134
134
|
|
|
135
|
-
// modelsOutdoor
|
|
136
|
-
if (productEntry?.fields?.modelsOutdoor?.[defEnvLocaleCode].length) {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
135
|
+
// // modelsOutdoor
|
|
136
|
+
// if (productEntry?.fields?.modelsOutdoor?.[defEnvLocaleCode].length) {
|
|
137
|
+
// for (const model of productEntry.fields.modelsOutdoor[defEnvLocaleCode]) {
|
|
138
|
+
// await publishEntry(model.sys.id, "topicModel");
|
|
139
|
+
// await publishEntry(`${model.sys.id}_PAGE`, "page");
|
|
140
|
+
// }
|
|
141
|
+
// }
|
|
142
142
|
|
|
143
|
-
// modelsDecorative
|
|
144
|
-
if (productEntry?.fields?.modelsDecorative?.[defEnvLocaleCode].length) {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}
|
|
143
|
+
// // modelsDecorative
|
|
144
|
+
// if (productEntry?.fields?.modelsDecorative?.[defEnvLocaleCode].length) {
|
|
145
|
+
// for (const model of productEntry.fields.modelsDecorative[
|
|
146
|
+
// defEnvLocaleCode
|
|
147
|
+
// ]) {
|
|
148
|
+
// await publishEntry(model.sys.id, "topicModel");
|
|
149
|
+
// await publishEntry(`${model.sys.id}_PAGE`, "page");
|
|
150
|
+
// }
|
|
151
|
+
// }
|
|
152
152
|
|
|
153
|
-
// subModelsArchitectural
|
|
154
|
-
if (productEntry?.fields?.subModelsArchitectural?.[defEnvLocaleCode].length) {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}
|
|
153
|
+
// // subModelsArchitectural
|
|
154
|
+
// if (productEntry?.fields?.subModelsArchitectural?.[defEnvLocaleCode].length) {
|
|
155
|
+
// for (const subModel of productEntry.fields.subModelsArchitectural[
|
|
156
|
+
// defEnvLocaleCode
|
|
157
|
+
// ]) {
|
|
158
|
+
// await publishEntry(subModel.sys.id, "topicSubModel");
|
|
159
|
+
// }
|
|
160
|
+
// }
|
|
161
161
|
|
|
162
|
-
// subModelsOutdoor
|
|
163
|
-
if (productEntry?.fields?.subModelsOutdoor?.[defEnvLocaleCode].length) {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}
|
|
162
|
+
// // subModelsOutdoor
|
|
163
|
+
// if (productEntry?.fields?.subModelsOutdoor?.[defEnvLocaleCode].length) {
|
|
164
|
+
// for (const subModel of productEntry.fields.subModelsOutdoor[
|
|
165
|
+
// defEnvLocaleCode
|
|
166
|
+
// ]) {
|
|
167
|
+
// await publishEntry(subModel.sys.id, "topicSubModel");
|
|
168
|
+
// }
|
|
169
|
+
// }
|
|
170
170
|
|
|
171
|
-
// subModelsDecorative
|
|
172
|
-
if (productEntry?.fields?.subModelsDecorative?.[defEnvLocaleCode].length) {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}
|
|
171
|
+
// // subModelsDecorative
|
|
172
|
+
// if (productEntry?.fields?.subModelsDecorative?.[defEnvLocaleCode].length) {
|
|
173
|
+
// for (const subModel of productEntry.fields.subModelsDecorative[
|
|
174
|
+
// defEnvLocaleCode
|
|
175
|
+
// ]) {
|
|
176
|
+
// await publishEntry(subModel.sys.id, "topicSubModel");
|
|
177
|
+
// }
|
|
178
|
+
// }
|
|
179
179
|
|
|
180
|
-
// productLine
|
|
181
|
-
if (productEntry?.fields?.productLine?.[defEnvLocaleCode]) {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}
|
|
180
|
+
// // productLine
|
|
181
|
+
// if (productEntry?.fields?.productLine?.[defEnvLocaleCode]) {
|
|
182
|
+
// const productLine = productEntry?.fields?.productLine?.[defEnvLocaleCode];
|
|
183
|
+
// await publishEntry(productLine.sys.id, "topicProductLine");
|
|
184
|
+
// }
|
|
185
185
|
|
|
186
|
-
// productSubLine
|
|
187
|
-
if (productEntry?.fields?.productSubLine?.[defEnvLocaleCode]) {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
}
|
|
186
|
+
// // productSubLine
|
|
187
|
+
// if (productEntry?.fields?.productSubLine?.[defEnvLocaleCode]) {
|
|
188
|
+
// const productSubLine =
|
|
189
|
+
// productEntry?.fields?.productSubLine?.[defEnvLocaleCode];
|
|
190
|
+
// await publishEntry(productSubLine.sys.id, "topicProductSubLine");
|
|
191
|
+
// }
|
|
192
192
|
|
|
193
193
|
// product
|
|
194
194
|
await productEntry.publish();
|