@comet/upgrade 1.65.0 → 1.67.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/lib/index.js +7 -1
- package/lib/v8/comet-config-provider.js +305 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -142,7 +142,13 @@ async function updateDependencies(targetVersion, isMajorUpdate = false) {
|
|
|
142
142
|
}
|
|
143
143
|
const packageJson = JSON.parse(fs_1.default.readFileSync(`${microservice}/package.json`).toString());
|
|
144
144
|
const dependencies = packages[microservice].filter((packageName) => packageJson.dependencies?.[packageName] !== undefined);
|
|
145
|
-
const devDependencies = [
|
|
145
|
+
const devDependencies = [
|
|
146
|
+
"@comet/cli",
|
|
147
|
+
"@comet/eslint-config",
|
|
148
|
+
"@comet/eslint-plugin",
|
|
149
|
+
"@comet/admin-generator",
|
|
150
|
+
"@comet/api-generator",
|
|
151
|
+
].filter((packageName) => packageJson.devDependencies?.[packageName] !== undefined);
|
|
146
152
|
if (dependencies.length === 0 && devDependencies.length === 0) {
|
|
147
153
|
console.warn(`Microservice '${microservice}' has no Comet DXP dependencies. Skipping install`);
|
|
148
154
|
continue;
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const glob_1 = require("glob");
|
|
4
|
+
const ts_morph_1 = require("ts-morph");
|
|
5
|
+
async function cometConfigProvider() {
|
|
6
|
+
const project = new ts_morph_1.Project({ tsConfigFilePath: "./admin/tsconfig.json" });
|
|
7
|
+
const appTsxFile = project.getSourceFile("admin/src/App.tsx");
|
|
8
|
+
if (!appTsxFile) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
const cometConfigProviderImport = appTsxFile.getImportDeclaration((importDeclaration) => importDeclaration.getModuleSpecifierValue() === "@comet/cms-admin" &&
|
|
12
|
+
importDeclaration.getNamedImports().some((namedImport) => namedImport.getName() === "CometConfigProvider"));
|
|
13
|
+
if (cometConfigProviderImport) {
|
|
14
|
+
// Script has already been run, skip
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const files = glob_1.glob.sync(["admin/src/**/*.ts", "admin/src/**/*.tsx"]);
|
|
18
|
+
let hasPageTree = false;
|
|
19
|
+
// Renames and removals
|
|
20
|
+
for (const filePath of files) {
|
|
21
|
+
const sourceFile = project.getSourceFile(filePath);
|
|
22
|
+
if (!sourceFile) {
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
const cmsAdminImport = sourceFile.getImportDeclaration((importDeclaration) => importDeclaration.getModuleSpecifierValue() === "@comet/cms-admin");
|
|
26
|
+
if (!cmsAdminImport) {
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
// useLocale -> useContentLanguage
|
|
30
|
+
const useLocaleImport = cmsAdminImport.getNamedImports().find((namedImport) => namedImport.getName() === "useLocale");
|
|
31
|
+
if (useLocaleImport) {
|
|
32
|
+
useLocaleImport.remove();
|
|
33
|
+
cmsAdminImport.addNamedImport("useContentLanguage");
|
|
34
|
+
sourceFile.getDescendantsOfKind(ts_morph_1.SyntaxKind.CallExpression).forEach((callExpression) => {
|
|
35
|
+
const identifier = callExpression.getFirstDescendantByKind(ts_morph_1.SyntaxKind.Identifier);
|
|
36
|
+
if (identifier && identifier.getText() === "useLocale") {
|
|
37
|
+
identifier.replaceWithText("useContentLanguage");
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
// useSitesConfig -> useSiteConfigs
|
|
42
|
+
const useSitesConfigImport = cmsAdminImport.getNamedImports().find((namedImport) => namedImport.getName() === "useSitesConfig");
|
|
43
|
+
if (useSitesConfigImport) {
|
|
44
|
+
useSitesConfigImport.remove();
|
|
45
|
+
cmsAdminImport.addNamedImport("useSiteConfigs");
|
|
46
|
+
sourceFile.getDescendantsOfKind(ts_morph_1.SyntaxKind.CallExpression).forEach((callExpression) => {
|
|
47
|
+
const identifier = callExpression.getFirstDescendantByKind(ts_morph_1.SyntaxKind.Identifier);
|
|
48
|
+
if (identifier && identifier.getText() === "useSitesConfig") {
|
|
49
|
+
identifier.replaceWithText("useSiteConfigs");
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
// useCmsBlockContext -> useBlockContext
|
|
54
|
+
const useCmsBlockContextImport = cmsAdminImport.getNamedImports().find((namedImport) => namedImport.getName() === "useCmsBlockContext");
|
|
55
|
+
if (useCmsBlockContextImport) {
|
|
56
|
+
useCmsBlockContextImport.remove();
|
|
57
|
+
cmsAdminImport.addNamedImport("useBlockContext");
|
|
58
|
+
sourceFile.getDescendantsOfKind(ts_morph_1.SyntaxKind.CallExpression).forEach((callExpression) => {
|
|
59
|
+
const identifier = callExpression.getFirstDescendantByKind(ts_morph_1.SyntaxKind.Identifier);
|
|
60
|
+
if (identifier && identifier.getText() === "useCmsBlockContext") {
|
|
61
|
+
identifier.replaceWithText("useBlockContext");
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
// Remove allCategories prop from PagesPage component
|
|
66
|
+
if (cmsAdminImport.getNamedImports().some((namedImport) => namedImport.getName() === "PagesPage")) {
|
|
67
|
+
hasPageTree = true;
|
|
68
|
+
[
|
|
69
|
+
...sourceFile.getDescendantsOfKind(ts_morph_1.SyntaxKind.JsxOpeningElement),
|
|
70
|
+
...sourceFile.getDescendantsOfKind(ts_morph_1.SyntaxKind.JsxSelfClosingElement), // <PagesPage />
|
|
71
|
+
].forEach((jsxElement) => {
|
|
72
|
+
const tagName = jsxElement.getTagNameNode().getText();
|
|
73
|
+
if (tagName === "PagesPage") {
|
|
74
|
+
const allCategoriesProp = jsxElement.getAttribute("allCategories");
|
|
75
|
+
if (allCategoriesProp) {
|
|
76
|
+
allCategoriesProp.remove();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
// useConfig -> useCometConfig
|
|
82
|
+
const configImport = sourceFile.getImportDeclaration((importDeclaration) => importDeclaration.getModuleSpecifierValue() === "@src/config");
|
|
83
|
+
if (configImport) {
|
|
84
|
+
configImport
|
|
85
|
+
.getNamedImports()
|
|
86
|
+
.find((namedImport) => namedImport.getName() === "useConfig")
|
|
87
|
+
?.remove();
|
|
88
|
+
if (configImport.getNamedImports().length === 0) {
|
|
89
|
+
configImport.remove();
|
|
90
|
+
}
|
|
91
|
+
cmsAdminImport.addNamedImport("useCometConfig");
|
|
92
|
+
sourceFile.getDescendantsOfKind(ts_morph_1.SyntaxKind.CallExpression).forEach((callExpression) => {
|
|
93
|
+
const identifier = callExpression.getFirstDescendantByKind(ts_morph_1.SyntaxKind.Identifier);
|
|
94
|
+
if (identifier && identifier.getText() === "useConfig") {
|
|
95
|
+
identifier.replaceWithText("useCometConfig");
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
await sourceFile.save();
|
|
100
|
+
}
|
|
101
|
+
for (const filePath of ["admin/src/config.ts", "admin/src/config.tsx"]) {
|
|
102
|
+
const sourceFile = project.getSourceFile(filePath);
|
|
103
|
+
if (!sourceFile) {
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
// Rename sitesConfig -> siteConfigs
|
|
107
|
+
sourceFile
|
|
108
|
+
.getFirstDescendant((node) => node.getKind() === ts_morph_1.SyntaxKind.Identifier && node.getText() === "sitesConfig")
|
|
109
|
+
?.replaceWithText("siteConfigs");
|
|
110
|
+
// Remove Config type
|
|
111
|
+
sourceFile
|
|
112
|
+
.getFirstDescendant((node) => node.getKind() === ts_morph_1.SyntaxKind.TypeAliasDeclaration &&
|
|
113
|
+
node.getFirstDescendantByKind(ts_morph_1.SyntaxKind.Identifier)?.getText() === "Config")
|
|
114
|
+
?.replaceWithText("");
|
|
115
|
+
// Remove ConfigContext
|
|
116
|
+
sourceFile
|
|
117
|
+
.getFirstDescendant((node) => node.getKind() === ts_morph_1.SyntaxKind.VariableStatement &&
|
|
118
|
+
node.getFirstDescendantByKind(ts_morph_1.SyntaxKind.Identifier)?.getText() === "ConfigContext")
|
|
119
|
+
?.replaceWithText("");
|
|
120
|
+
// Remove ConfigProvider
|
|
121
|
+
sourceFile
|
|
122
|
+
.getFirstDescendant((node) => node.getKind() === ts_morph_1.SyntaxKind.FunctionDeclaration &&
|
|
123
|
+
node.getFirstDescendantByKind(ts_morph_1.SyntaxKind.Identifier)?.getText() === "ConfigProvider")
|
|
124
|
+
?.replaceWithText("");
|
|
125
|
+
// Remove useConfig
|
|
126
|
+
sourceFile
|
|
127
|
+
.getFirstDescendant((node) => node.getKind() === ts_morph_1.SyntaxKind.FunctionDeclaration &&
|
|
128
|
+
node.getDescendantsOfKind(ts_morph_1.SyntaxKind.Identifier).some((identifier) => identifier.getText() === "useConfig"))
|
|
129
|
+
?.replaceWithText("");
|
|
130
|
+
await sourceFile.save();
|
|
131
|
+
}
|
|
132
|
+
// Merge config providers
|
|
133
|
+
appTsxFile
|
|
134
|
+
.getImportDeclaration((importDeclaration) => importDeclaration.getModuleSpecifierValue() === "@comet/cms-admin")
|
|
135
|
+
?.addNamedImport("CometConfigProvider");
|
|
136
|
+
const rootJsxElement = appTsxFile.getFirstDescendantByKindOrThrow(ts_morph_1.SyntaxKind.JsxElement);
|
|
137
|
+
rootJsxElement.replaceWithText(`<CometConfigProvider
|
|
138
|
+
{...config}
|
|
139
|
+
graphQLApiUrl={\`\${config.apiUrl}/graphql\`}
|
|
140
|
+
>
|
|
141
|
+
${rootJsxElement.getFullText()}
|
|
142
|
+
</CometConfigProvider>
|
|
143
|
+
`);
|
|
144
|
+
const cometConfigProviderElement = appTsxFile.getFirstDescendantByKindOrThrow(ts_morph_1.SyntaxKind.JsxElement);
|
|
145
|
+
const cometConfigProviderOpeningElement = cometConfigProviderElement.getFirstDescendantByKindOrThrow(ts_morph_1.SyntaxKind.JsxOpeningElement);
|
|
146
|
+
// Application ConfigProvider
|
|
147
|
+
const configProviderElement = cometConfigProviderElement.getFirstDescendant((node) => node.getKind() === ts_morph_1.SyntaxKind.JsxElement &&
|
|
148
|
+
node.getFirstChildByKind(ts_morph_1.SyntaxKind.JsxOpeningElement)?.getTagNameNode().getText() === "ConfigProvider");
|
|
149
|
+
if (configProviderElement) {
|
|
150
|
+
configProviderElement.replaceWithText(configProviderElement
|
|
151
|
+
.getJsxChildren()
|
|
152
|
+
.map((child) => child.getText())
|
|
153
|
+
.join(""));
|
|
154
|
+
}
|
|
155
|
+
let pageTreeCategoriesVariableName;
|
|
156
|
+
let pageTreeDocumentTypesVariableName;
|
|
157
|
+
let additionalPageTreeNodeFragmentVariableName;
|
|
158
|
+
// CmsBlockContextProvider
|
|
159
|
+
const cmsBlockContextProviderElement = cometConfigProviderElement.getFirstDescendant((node) => node.getKind() === ts_morph_1.SyntaxKind.JsxElement &&
|
|
160
|
+
node.getFirstChildByKind(ts_morph_1.SyntaxKind.JsxOpeningElement)?.getTagNameNode().getText() === "CmsBlockContextProvider");
|
|
161
|
+
if (cmsBlockContextProviderElement) {
|
|
162
|
+
// Find variable names for page tree config
|
|
163
|
+
const openingElement = cmsBlockContextProviderElement.getFirstChildByKindOrThrow(ts_morph_1.SyntaxKind.JsxOpeningElement);
|
|
164
|
+
pageTreeCategoriesVariableName = openingElement
|
|
165
|
+
.getAttribute("pageTreeCategories")
|
|
166
|
+
?.getFirstChildByKind(ts_morph_1.SyntaxKind.JsxExpression)
|
|
167
|
+
?.getFirstChildByKind(ts_morph_1.SyntaxKind.Identifier)
|
|
168
|
+
?.getText();
|
|
169
|
+
pageTreeDocumentTypesVariableName = openingElement
|
|
170
|
+
.getAttribute("pageTreeDocumentTypes")
|
|
171
|
+
?.getFirstChildByKind(ts_morph_1.SyntaxKind.JsxExpression)
|
|
172
|
+
?.getFirstChildByKind(ts_morph_1.SyntaxKind.Identifier)
|
|
173
|
+
?.getText();
|
|
174
|
+
additionalPageTreeNodeFragmentVariableName = openingElement
|
|
175
|
+
.getAttribute("additionalPageTreeNodeFragment")
|
|
176
|
+
?.getFirstChildByKind(ts_morph_1.SyntaxKind.JsxExpression)
|
|
177
|
+
?.getFirstChildByKind(ts_morph_1.SyntaxKind.Identifier)
|
|
178
|
+
?.getText();
|
|
179
|
+
cmsBlockContextProviderElement.replaceWithText(cmsBlockContextProviderElement
|
|
180
|
+
.getJsxChildren()
|
|
181
|
+
.map((child) => child.getText())
|
|
182
|
+
.join(""));
|
|
183
|
+
// Remove apiClient variable
|
|
184
|
+
appTsxFile
|
|
185
|
+
.getFirstDescendant((node) => node.getKind() === ts_morph_1.SyntaxKind.VariableStatement &&
|
|
186
|
+
node.getFirstDescendantByKind(ts_morph_1.SyntaxKind.Identifier)?.getText() === "apiClient")
|
|
187
|
+
?.replaceWithText("");
|
|
188
|
+
}
|
|
189
|
+
// Page tree
|
|
190
|
+
if (hasPageTree) {
|
|
191
|
+
cometConfigProviderOpeningElement.addAttribute({
|
|
192
|
+
name: "pageTree",
|
|
193
|
+
initializer: `{{
|
|
194
|
+
categories: ${pageTreeCategoriesVariableName ?? "pageTreeCategories"},
|
|
195
|
+
documentTypes: ${pageTreeDocumentTypesVariableName ?? "pageTreeDocumentTypes"},
|
|
196
|
+
${additionalPageTreeNodeFragmentVariableName ? `additionalPageTreeNodeFragment: ${additionalPageTreeNodeFragmentVariableName},` : ""}
|
|
197
|
+
}}`,
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
// DAM
|
|
201
|
+
const damConfigProviderElement = cometConfigProviderElement.getFirstDescendant((node) => node.getKind() === ts_morph_1.SyntaxKind.JsxElement &&
|
|
202
|
+
node.getFirstChildByKind(ts_morph_1.SyntaxKind.JsxOpeningElement)?.getTagNameNode().getText() === "DamConfigProvider");
|
|
203
|
+
if (damConfigProviderElement) {
|
|
204
|
+
const openingElement = damConfigProviderElement.getFirstChildByKindOrThrow(ts_morph_1.SyntaxKind.JsxOpeningElement);
|
|
205
|
+
const damConfig = openingElement
|
|
206
|
+
.getAttribute("value")
|
|
207
|
+
?.getFirstChildByKind(ts_morph_1.SyntaxKind.JsxExpression)
|
|
208
|
+
?.getFirstChildByKind(ts_morph_1.SyntaxKind.ObjectLiteralExpression);
|
|
209
|
+
if (damConfig) {
|
|
210
|
+
damConfig.insertSpreadAssignment(0, { expression: "config.dam" });
|
|
211
|
+
cometConfigProviderOpeningElement.addAttribute({ name: "dam", initializer: `{${damConfig.getText()}}` });
|
|
212
|
+
}
|
|
213
|
+
cometConfigProviderOpeningElement.addAttribute({ name: "imgproxy", initializer: "{config.imgproxy}" });
|
|
214
|
+
damConfigProviderElement.replaceWithText(damConfigProviderElement
|
|
215
|
+
.getJsxChildren()
|
|
216
|
+
.map((child) => child.getText())
|
|
217
|
+
.join(""));
|
|
218
|
+
}
|
|
219
|
+
// Dependencies
|
|
220
|
+
const dependenciesConfigProviderElement = cometConfigProviderElement.getFirstDescendant((node) => node.getKind() === ts_morph_1.SyntaxKind.JsxElement &&
|
|
221
|
+
node.getFirstChildByKind(ts_morph_1.SyntaxKind.JsxOpeningElement)?.getTagNameNode().getText() === "DependenciesConfigProvider");
|
|
222
|
+
if (dependenciesConfigProviderElement) {
|
|
223
|
+
const openingElement = dependenciesConfigProviderElement.getFirstChildByKindOrThrow(ts_morph_1.SyntaxKind.JsxOpeningElement);
|
|
224
|
+
const dependenciesConfig = openingElement
|
|
225
|
+
.getAttribute("entityDependencyMap")
|
|
226
|
+
?.getFirstChildByKind(ts_morph_1.SyntaxKind.JsxExpression)
|
|
227
|
+
?.getFirstChildByKind(ts_morph_1.SyntaxKind.ObjectLiteralExpression);
|
|
228
|
+
if (dependenciesConfig) {
|
|
229
|
+
cometConfigProviderOpeningElement.addAttribute({
|
|
230
|
+
name: "dependencies",
|
|
231
|
+
initializer: `{{entityDependencyMap: ${dependenciesConfig.getText()},}}`,
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
dependenciesConfigProviderElement.replaceWithText(dependenciesConfigProviderElement
|
|
235
|
+
.getJsxChildren()
|
|
236
|
+
.map((child) => child.getText())
|
|
237
|
+
.join(""));
|
|
238
|
+
}
|
|
239
|
+
// Site configs
|
|
240
|
+
const siteConfigsProviderElement = cometConfigProviderElement.getFirstDescendant((node) => node.getKind() === ts_morph_1.SyntaxKind.JsxElement &&
|
|
241
|
+
node.getFirstChildByKind(ts_morph_1.SyntaxKind.JsxOpeningElement)?.getTagNameNode().getText() === "SitesConfigProvider");
|
|
242
|
+
if (siteConfigsProviderElement) {
|
|
243
|
+
const openingElement = siteConfigsProviderElement.getFirstChildByKindOrThrow(ts_morph_1.SyntaxKind.JsxOpeningElement);
|
|
244
|
+
const siteConfigsConfig = openingElement
|
|
245
|
+
.getAttribute("value")
|
|
246
|
+
?.getFirstChildByKind(ts_morph_1.SyntaxKind.JsxExpression)
|
|
247
|
+
?.getFirstChildByKind(ts_morph_1.SyntaxKind.ObjectLiteralExpression);
|
|
248
|
+
if (siteConfigsConfig) {
|
|
249
|
+
// configs: config.sitesConfig -> configs: config.siteConfigs
|
|
250
|
+
siteConfigsConfig
|
|
251
|
+
.getFirstDescendant((node) => node.getKind() === ts_morph_1.SyntaxKind.PropertyAssignment && node.getFirstChildByKind(ts_morph_1.SyntaxKind.Identifier)?.getText() === "configs")
|
|
252
|
+
?.replaceWithText("configs: config.siteConfigs");
|
|
253
|
+
cometConfigProviderOpeningElement.addAttribute({
|
|
254
|
+
name: "siteConfigs",
|
|
255
|
+
initializer: `{${siteConfigsConfig.getText()}}`,
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
siteConfigsProviderElement.replaceWithText(siteConfigsProviderElement
|
|
259
|
+
.getJsxChildren()
|
|
260
|
+
.map((child) => child.getText())
|
|
261
|
+
.join(""));
|
|
262
|
+
}
|
|
263
|
+
// Build information
|
|
264
|
+
const buildInformationProviderElement = cometConfigProviderElement.getFirstDescendant((node) => node.getKind() === ts_morph_1.SyntaxKind.JsxElement &&
|
|
265
|
+
node.getFirstChildByKind(ts_morph_1.SyntaxKind.JsxOpeningElement)?.getTagNameNode().getText() === "BuildInformationProvider");
|
|
266
|
+
if (buildInformationProviderElement) {
|
|
267
|
+
const openingElement = buildInformationProviderElement.getFirstChildByKindOrThrow(ts_morph_1.SyntaxKind.JsxOpeningElement);
|
|
268
|
+
const buildInformationConfig = openingElement
|
|
269
|
+
.getAttribute("value")
|
|
270
|
+
?.getFirstChildByKind(ts_morph_1.SyntaxKind.JsxExpression)
|
|
271
|
+
?.getFirstChildByKind(ts_morph_1.SyntaxKind.ObjectLiteralExpression);
|
|
272
|
+
if (buildInformationConfig) {
|
|
273
|
+
cometConfigProviderOpeningElement.addAttribute({
|
|
274
|
+
name: "buildInformation",
|
|
275
|
+
initializer: `{${buildInformationConfig.getText()}}`,
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
buildInformationProviderElement.replaceWithText(buildInformationProviderElement
|
|
279
|
+
.getJsxChildren()
|
|
280
|
+
.map((child) => child.getText())
|
|
281
|
+
.join(""));
|
|
282
|
+
}
|
|
283
|
+
// Content language
|
|
284
|
+
const localeProviderElement = cometConfigProviderElement.getFirstDescendant((node) => node.getKind() === ts_morph_1.SyntaxKind.JsxElement &&
|
|
285
|
+
node.getFirstChildByKind(ts_morph_1.SyntaxKind.JsxOpeningElement)?.getTagNameNode().getText() === "LocaleProvider");
|
|
286
|
+
if (localeProviderElement) {
|
|
287
|
+
const openingElement = localeProviderElement.getFirstChildByKindOrThrow(ts_morph_1.SyntaxKind.JsxOpeningElement);
|
|
288
|
+
const resolveLocalForScopeFunction = openingElement
|
|
289
|
+
.getAttribute("resolveLocaleForScope")
|
|
290
|
+
?.getFirstChildByKind(ts_morph_1.SyntaxKind.JsxExpression)
|
|
291
|
+
?.getFirstChildByKind(ts_morph_1.SyntaxKind.ArrowFunction);
|
|
292
|
+
if (resolveLocalForScopeFunction) {
|
|
293
|
+
cometConfigProviderOpeningElement.addAttribute({
|
|
294
|
+
name: "contentLanguage",
|
|
295
|
+
initializer: `{{ resolveContentLanguageForScope: ${resolveLocalForScopeFunction.getText()}, }}`,
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
localeProviderElement.replaceWithText(localeProviderElement
|
|
299
|
+
.getJsxChildren()
|
|
300
|
+
.map((child) => child.getText())
|
|
301
|
+
.join(""));
|
|
302
|
+
}
|
|
303
|
+
await appTsxFile.save();
|
|
304
|
+
}
|
|
305
|
+
exports.default = cometConfigProvider;
|