@esri/solution-creator 6.4.0-next.20250930 → 6.4.0-next.20251002

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.
@@ -347,34 +347,36 @@ async function _postProcessTaskResource(templates, resourceItemFiles, templateDi
347
347
  const resourcePromises = taskKeys.map((k) => {
348
348
  return (0, solution_common_1.request)((0, solution_common_1.generateSourceResourceUrl)(`${templateDictionary.portalBaseUrl}/sharing/rest`, taskResources[k].itemId, taskResources[k].filename), requestOptions);
349
349
  });
350
- await Promise.all(resourcePromises).then(async (r) => {
351
- let resourceString = JSON.stringify(r);
352
- // replace urls first
353
- orderedUrls.forEach((url) => {
354
- // TypeScript for es2015 doesn't have a definition for `replaceAll`
355
- resourceString = resourceString.replaceAll(url, urlVarHash[url]);
356
- });
357
- // replace any item ids that aren't already variables
358
- Object.keys(itemIds).forEach((k) => {
359
- let pattern = new RegExp(`(?<!\\{\\{)${k}`, "g");
360
- // TypeScript for es2015 doesn't have a definition for `replaceAll`
361
- resourceString = resourceString.replaceAll(pattern, itemIds[k]);
362
- });
363
- // all urls and item ids should now be replaced with variables that contain the item ids
364
- // we need to add any ids that are not currently marked as dependencies to the webmap dependencies and update the resource
365
- const ids = (0, solution_common_1.uniqueStringList)(resourceString.match((0, solution_common_1.getAgoIdRegEx)()));
366
- resourceItemFiles = resourceItemFiles.map((file) => {
367
- if (file.filename === taskConfigName) {
368
- file.file = (0, solution_common_1.jsonToFile)(JSON.parse(resourceString), file.filename);
369
- // add any ids that we found to the source webmap
370
- templates.some((t) => {
371
- if (t.itemId === file.itemId) {
372
- t.dependencies = [...new Set([...t.dependencies, ...ids])];
373
- return true;
374
- }
375
- });
376
- }
377
- return file;
350
+ await Promise.all(resourcePromises).then(async (resources) => {
351
+ resources.forEach((r) => {
352
+ let resourceString = JSON.stringify(r);
353
+ // replace urls first
354
+ orderedUrls.forEach((url) => {
355
+ // TypeScript for es2015 doesn't have a definition for `replaceAll`
356
+ resourceString = resourceString.replaceAll(url, urlVarHash[url]);
357
+ });
358
+ // replace any item ids that aren't already variables
359
+ Object.keys(itemIds).forEach((k) => {
360
+ let pattern = new RegExp(`(?<!\\{\\{)${k}`, "g");
361
+ // TypeScript for es2015 doesn't have a definition for `replaceAll`
362
+ resourceString = resourceString.replaceAll(pattern, itemIds[k]);
363
+ });
364
+ // all urls and item ids should now be replaced with variables that contain the item ids
365
+ // we need to add any ids that are not currently marked as dependencies to the webmap dependencies and update the resource
366
+ const ids = (0, solution_common_1.uniqueStringList)(resourceString.match((0, solution_common_1.getAgoIdRegEx)()));
367
+ resourceItemFiles = resourceItemFiles.map((file) => {
368
+ if (file.filename === taskConfigName) {
369
+ file.file = (0, solution_common_1.jsonToFile)(JSON.parse(resourceString), file.filename);
370
+ // add any ids that we found to the source webmap
371
+ templates.some((t) => {
372
+ if (t.itemId === file.itemId) {
373
+ t.dependencies = [...new Set([...t.dependencies, ...ids])];
374
+ return true;
375
+ }
376
+ });
377
+ }
378
+ return file;
379
+ });
378
380
  });
379
381
  });
380
382
  return Promise.resolve(resourceItemFiles);
@@ -337,34 +337,36 @@ export async function _postProcessTaskResource(templates, resourceItemFiles, tem
337
337
  const resourcePromises = taskKeys.map((k) => {
338
338
  return request(generateSourceResourceUrl(`${templateDictionary.portalBaseUrl}/sharing/rest`, taskResources[k].itemId, taskResources[k].filename), requestOptions);
339
339
  });
340
- await Promise.all(resourcePromises).then(async (r) => {
341
- let resourceString = JSON.stringify(r);
342
- // replace urls first
343
- orderedUrls.forEach((url) => {
344
- // TypeScript for es2015 doesn't have a definition for `replaceAll`
345
- resourceString = resourceString.replaceAll(url, urlVarHash[url]);
346
- });
347
- // replace any item ids that aren't already variables
348
- Object.keys(itemIds).forEach((k) => {
349
- let pattern = new RegExp(`(?<!\\{\\{)${k}`, "g");
350
- // TypeScript for es2015 doesn't have a definition for `replaceAll`
351
- resourceString = resourceString.replaceAll(pattern, itemIds[k]);
352
- });
353
- // all urls and item ids should now be replaced with variables that contain the item ids
354
- // we need to add any ids that are not currently marked as dependencies to the webmap dependencies and update the resource
355
- const ids = uniqueStringList(resourceString.match(getAgoIdRegEx()));
356
- resourceItemFiles = resourceItemFiles.map((file) => {
357
- if (file.filename === taskConfigName) {
358
- file.file = jsonToFile(JSON.parse(resourceString), file.filename);
359
- // add any ids that we found to the source webmap
360
- templates.some((t) => {
361
- if (t.itemId === file.itemId) {
362
- t.dependencies = [...new Set([...t.dependencies, ...ids])];
363
- return true;
364
- }
365
- });
366
- }
367
- return file;
340
+ await Promise.all(resourcePromises).then(async (resources) => {
341
+ resources.forEach((r) => {
342
+ let resourceString = JSON.stringify(r);
343
+ // replace urls first
344
+ orderedUrls.forEach((url) => {
345
+ // TypeScript for es2015 doesn't have a definition for `replaceAll`
346
+ resourceString = resourceString.replaceAll(url, urlVarHash[url]);
347
+ });
348
+ // replace any item ids that aren't already variables
349
+ Object.keys(itemIds).forEach((k) => {
350
+ let pattern = new RegExp(`(?<!\\{\\{)${k}`, "g");
351
+ // TypeScript for es2015 doesn't have a definition for `replaceAll`
352
+ resourceString = resourceString.replaceAll(pattern, itemIds[k]);
353
+ });
354
+ // all urls and item ids should now be replaced with variables that contain the item ids
355
+ // we need to add any ids that are not currently marked as dependencies to the webmap dependencies and update the resource
356
+ const ids = uniqueStringList(resourceString.match(getAgoIdRegEx()));
357
+ resourceItemFiles = resourceItemFiles.map((file) => {
358
+ if (file.filename === taskConfigName) {
359
+ file.file = jsonToFile(JSON.parse(resourceString), file.filename);
360
+ // add any ids that we found to the source webmap
361
+ templates.some((t) => {
362
+ if (t.itemId === file.itemId) {
363
+ t.dependencies = [...new Set([...t.dependencies, ...ids])];
364
+ return true;
365
+ }
366
+ });
367
+ }
368
+ return file;
369
+ });
368
370
  });
369
371
  });
370
372
  return Promise.resolve(resourceItemFiles);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/solution-creator",
3
- "version": "6.4.0-next.20250930",
3
+ "version": "6.4.0-next.20251002",
4
4
  "description": "Manages the creation of a Solution item for @esri/solution.js.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -25,18 +25,18 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@esri/hub-common": "^17.0.2",
28
- "@esri/solution-common": "^6.4.0-next.20250930",
29
- "@esri/solution-feature-layer": "^6.4.0-next.20250930",
30
- "@esri/solution-file": "^6.4.0-next.20250930",
31
- "@esri/solution-form": "^6.4.0-next.20250930",
32
- "@esri/solution-group": "^6.4.0-next.20250930",
33
- "@esri/solution-hub-types": "^6.4.0-next.20250930",
34
- "@esri/solution-simple-types": "^6.4.0-next.20250930",
35
- "@esri/solution-storymap": "^6.4.0-next.20250930",
36
- "@esri/solution-velocity": "^6.4.0-next.20250930",
37
- "@esri/solution-web-experience": "^6.4.0-next.20250930",
38
- "@esri/solution-web-tool": "^6.4.0-next.20250930",
39
- "@esri/solution-workflow": "^6.4.0-next.20250930",
28
+ "@esri/solution-common": "^6.4.0-next.20251002",
29
+ "@esri/solution-feature-layer": "^6.4.0-next.20251002",
30
+ "@esri/solution-file": "^6.4.0-next.20251002",
31
+ "@esri/solution-form": "^6.4.0-next.20251002",
32
+ "@esri/solution-group": "^6.4.0-next.20251002",
33
+ "@esri/solution-hub-types": "^6.4.0-next.20251002",
34
+ "@esri/solution-simple-types": "^6.4.0-next.20251002",
35
+ "@esri/solution-storymap": "^6.4.0-next.20251002",
36
+ "@esri/solution-velocity": "^6.4.0-next.20251002",
37
+ "@esri/solution-web-experience": "^6.4.0-next.20251002",
38
+ "@esri/solution-web-tool": "^6.4.0-next.20251002",
39
+ "@esri/solution-workflow": "^6.4.0-next.20251002",
40
40
  "tslib": "1.14.1"
41
41
  },
42
42
  "scripts": {
@@ -91,5 +91,5 @@
91
91
  "esri",
92
92
  "ES6"
93
93
  ],
94
- "gitHead": "048c0a402804778c734165e8b428ae1d8ff7902e"
94
+ "gitHead": "ac336fc5f41d453e03b877ad21f59284bae8c37e"
95
95
  }