@esri/solution-common 6.6.1-next.3 → 6.6.1-next.31
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.
|
@@ -19,9 +19,12 @@
|
|
|
19
19
|
import { IFolderIdOptions, IGetGroupContentOptions, IGetUserOptions, IGroup, IGroupContentResult, IGetRelatedItemsResponse, IGroupSharingOptions, IItem, IItemRelationshipOptions, IItemResourceOptions, IItemResourceResponse, IPortal, IRemoveItemResourceOptions, ISearchOptions, ISearchResult, ISharingResponse, IUpdateGroupOptions, IUpdateItemOptions, IUpdateItemResponse, IUser, IUserGroupOptions, IUserItemOptions, SearchQueryBuilder } from "@esri/arcgis-rest-portal";
|
|
20
20
|
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
21
21
|
import { IAddToServiceDefinitionOptions, IAddToServiceDefinitionResult, IQueryRelatedOptions, IQueryRelatedResponse } from "@esri/arcgis-rest-feature-service";
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
22
|
+
export { createFeatureService as svcAdminCreateFeatureService, queryFeatures, addFeatures, applyEdits, } from "@esri/arcgis-rest-feature-service";
|
|
23
|
+
export type { IAddToServiceDefinitionOptions, IAddToServiceDefinitionResult, ICreateServiceParams, ICreateServiceResult, IExtent, ISpatialReference, IFeature, IQueryRelatedOptions, IQueryRelatedResponse, IRelatedRecordGroup, } from "@esri/arcgis-rest-feature-service";
|
|
24
|
+
export { addItemData as restAddItemData, addItemRelationship, createFolder, createGroup, createItem, createItemInFolder, moveItem, protectItem, SearchQueryBuilder, getGroupCategorySchema as restGetGroupCategorySchema, getItem, getItemData, getItemResources as restGetItemResources, getUserContent, getPortal as restGetPortal, getPortalUrl, searchGroupContent, setItemAccess, searchGroups as restSearchGroups, removeGroupUsers, removeItem as restRemoveItem, } from "@esri/arcgis-rest-portal";
|
|
25
|
+
export type { IAddFolderResponse, IAddItemDataOptions, ICreateItemOptions, ICreateItemResponse, IFolder, IFolderIdOptions, IGetGroupContentOptions, IGetRelatedItemsResponse, IGroup, IGroupAdd, IGroupCategorySchema as restIGroupCategorySchema, IItem, IItemRelationshipOptions, IItemResourceOptions, IItemResourceResponse, IManageItemRelationshipOptions, IMoveItemOptions, IMoveItemResponse, IPagedResponse, IPagingParams, IPortal, IRemoveItemResourceOptions, ISearchGroupContentOptions, ISearchOptions, ISearchResult, ISetAccessOptions, ISharingResponse, ItemRelationshipType, IUpdateGroupOptions, IUpdateItemOptions, IUpdateItemResponse, IUser, IUserContentResponse, IUserGroupOptions, IGroupSharingOptions, IUserItemOptions, } from "@esri/arcgis-rest-portal";
|
|
26
|
+
export { ArcGISAuthError, encodeFormData, ArcGISIdentityManager as UserSession } from "@esri/arcgis-rest-request";
|
|
27
|
+
export type { IArcGISIdentityManagerOptions, ICredential, IRequestOptions, IParams } from "@esri/arcgis-rest-request";
|
|
25
28
|
export interface IFolderSuccessResult {
|
|
26
29
|
success: boolean;
|
|
27
30
|
folder: {
|
|
@@ -158,9 +158,11 @@ exports.deleteViewProps = deleteViewProps;
|
|
|
158
158
|
*/
|
|
159
159
|
function cacheFieldInfos(layer, fieldInfos, isView, isPortal) {
|
|
160
160
|
// cache the source fields as they are in the original source
|
|
161
|
-
|
|
161
|
+
// Note: layer.id is commonly 0 for the first layer, so use a presence check
|
|
162
|
+
// (not a truthy check) to avoid skipping the layer with id === 0.
|
|
163
|
+
if (layer && layer.id !== undefined && layer.id !== null) {
|
|
162
164
|
fieldInfos[layer.id] = {
|
|
163
|
-
sourceFields: JSON.parse(JSON.stringify(layer.fields)),
|
|
165
|
+
sourceFields: layer.fields ? JSON.parse(JSON.stringify(layer.fields)) : [],
|
|
164
166
|
type: layer.type,
|
|
165
167
|
id: layer.id,
|
|
166
168
|
};
|
|
@@ -461,7 +463,10 @@ function setNamesAndTitles(templates) {
|
|
|
461
463
|
baseName = baseName.replace(/_[0-9A-F]{32}/gi, "");
|
|
462
464
|
// The name length limit is 98
|
|
463
465
|
// Limit the baseName to 50 characters before the _<guid>
|
|
464
|
-
|
|
466
|
+
// If the baseName includes '{{params' it is likely being used in a template replacement, so do not truncate.
|
|
467
|
+
const name = baseName.includes("{{params")
|
|
468
|
+
? baseName + "_" + guid
|
|
469
|
+
: baseName.substring(0, 50) + "_" + guid;
|
|
465
470
|
// If the name + GUID already exists then append "_occurrenceCount"
|
|
466
471
|
t.item.name = names.indexOf(name) === -1 ? name : `${name}_${names.filter((n) => n === name).length}`;
|
|
467
472
|
names.push(name);
|
|
@@ -826,7 +831,12 @@ function addFeatureServiceDefinition(serviceUrl, listToAdd, templateDictionary,
|
|
|
826
831
|
removeLayerOptimization(item);
|
|
827
832
|
// this can still chunk layers
|
|
828
833
|
options = _updateAddOptions(itemTemplate, options, layerChunks, isSelfReferential, authentication);
|
|
829
|
-
|
|
834
|
+
// Route based on the discriminator set by getLayersAndTables (which derives from
|
|
835
|
+
// properties.layers vs properties.tables) rather than the layer object's own `type`
|
|
836
|
+
// field. The latter may be missing when users supply custom layer JSON via
|
|
837
|
+
// params (e.g. {{params.buildSolution.items.<id>.service.layers}}), which would
|
|
838
|
+
// otherwise cause every layer to be pushed into the `tables` array.
|
|
839
|
+
if (toAdd.type === "layer" || item.type === "Feature Layer") {
|
|
830
840
|
options.layers.push(item);
|
|
831
841
|
}
|
|
832
842
|
else {
|
|
@@ -19,9 +19,12 @@
|
|
|
19
19
|
import { IFolderIdOptions, IGetGroupContentOptions, IGetUserOptions, IGroup, IGroupContentResult, IGetRelatedItemsResponse, IGroupSharingOptions, IItem, IItemRelationshipOptions, IItemResourceOptions, IItemResourceResponse, IPortal, IRemoveItemResourceOptions, ISearchOptions, ISearchResult, ISharingResponse, IUpdateGroupOptions, IUpdateItemOptions, IUpdateItemResponse, IUser, IUserGroupOptions, IUserItemOptions, SearchQueryBuilder } from "@esri/arcgis-rest-portal";
|
|
20
20
|
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
21
21
|
import { IAddToServiceDefinitionOptions, IAddToServiceDefinitionResult, IQueryRelatedOptions, IQueryRelatedResponse } from "@esri/arcgis-rest-feature-service";
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
22
|
+
export { createFeatureService as svcAdminCreateFeatureService, queryFeatures, addFeatures, applyEdits, } from "@esri/arcgis-rest-feature-service";
|
|
23
|
+
export type { IAddToServiceDefinitionOptions, IAddToServiceDefinitionResult, ICreateServiceParams, ICreateServiceResult, IExtent, ISpatialReference, IFeature, IQueryRelatedOptions, IQueryRelatedResponse, IRelatedRecordGroup, } from "@esri/arcgis-rest-feature-service";
|
|
24
|
+
export { addItemData as restAddItemData, addItemRelationship, createFolder, createGroup, createItem, createItemInFolder, moveItem, protectItem, SearchQueryBuilder, getGroupCategorySchema as restGetGroupCategorySchema, getItem, getItemData, getItemResources as restGetItemResources, getUserContent, getPortal as restGetPortal, getPortalUrl, searchGroupContent, setItemAccess, searchGroups as restSearchGroups, removeGroupUsers, removeItem as restRemoveItem, } from "@esri/arcgis-rest-portal";
|
|
25
|
+
export type { IAddFolderResponse, IAddItemDataOptions, ICreateItemOptions, ICreateItemResponse, IFolder, IFolderIdOptions, IGetGroupContentOptions, IGetRelatedItemsResponse, IGroup, IGroupAdd, IGroupCategorySchema as restIGroupCategorySchema, IItem, IItemRelationshipOptions, IItemResourceOptions, IItemResourceResponse, IManageItemRelationshipOptions, IMoveItemOptions, IMoveItemResponse, IPagedResponse, IPagingParams, IPortal, IRemoveItemResourceOptions, ISearchGroupContentOptions, ISearchOptions, ISearchResult, ISetAccessOptions, ISharingResponse, ItemRelationshipType, IUpdateGroupOptions, IUpdateItemOptions, IUpdateItemResponse, IUser, IUserContentResponse, IUserGroupOptions, IGroupSharingOptions, IUserItemOptions, } from "@esri/arcgis-rest-portal";
|
|
26
|
+
export { ArcGISAuthError, encodeFormData, ArcGISIdentityManager as UserSession } from "@esri/arcgis-rest-request";
|
|
27
|
+
export type { IArcGISIdentityManagerOptions, ICredential, IRequestOptions, IParams } from "@esri/arcgis-rest-request";
|
|
25
28
|
export interface IFolderSuccessResult {
|
|
26
29
|
success: boolean;
|
|
27
30
|
folder: {
|
package/dist/esm/arcgisRestJS.js
CHANGED
|
@@ -21,7 +21,7 @@ import { request as restRequest } from "@esri/arcgis-rest-request";
|
|
|
21
21
|
import { addToServiceDefinition, queryRelated as restQueryRelated, } from "@esri/arcgis-rest-feature-service";
|
|
22
22
|
export { createFeatureService as svcAdminCreateFeatureService, queryFeatures, addFeatures, applyEdits, } from "@esri/arcgis-rest-feature-service";
|
|
23
23
|
export { addItemData as restAddItemData, addItemRelationship, createFolder, createGroup, createItem, createItemInFolder, moveItem, protectItem, SearchQueryBuilder, getGroupCategorySchema as restGetGroupCategorySchema, getItem, getItemData, getItemResources as restGetItemResources, getUserContent, getPortal as restGetPortal, getPortalUrl, searchGroupContent, setItemAccess, searchGroups as restSearchGroups, removeGroupUsers, removeItem as restRemoveItem, } from "@esri/arcgis-rest-portal";
|
|
24
|
-
export { ArcGISAuthError, encodeFormData, ArcGISIdentityManager as UserSession
|
|
24
|
+
export { ArcGISAuthError, encodeFormData, ArcGISIdentityManager as UserSession } from "@esri/arcgis-rest-request";
|
|
25
25
|
//custom export functions that mimic the same export function from arcgis-rest-js
|
|
26
26
|
//to bypass unit test error:
|
|
27
27
|
//Error: <spyOn> : <functon or property> is not declared writable or has no setter
|
|
@@ -151,9 +151,11 @@ export function deleteViewProps(layer, isPortal) {
|
|
|
151
151
|
*/
|
|
152
152
|
export function cacheFieldInfos(layer, fieldInfos, isView, isPortal) {
|
|
153
153
|
// cache the source fields as they are in the original source
|
|
154
|
-
|
|
154
|
+
// Note: layer.id is commonly 0 for the first layer, so use a presence check
|
|
155
|
+
// (not a truthy check) to avoid skipping the layer with id === 0.
|
|
156
|
+
if (layer && layer.id !== undefined && layer.id !== null) {
|
|
155
157
|
fieldInfos[layer.id] = {
|
|
156
|
-
sourceFields: JSON.parse(JSON.stringify(layer.fields)),
|
|
158
|
+
sourceFields: layer.fields ? JSON.parse(JSON.stringify(layer.fields)) : [],
|
|
157
159
|
type: layer.type,
|
|
158
160
|
id: layer.id,
|
|
159
161
|
};
|
|
@@ -443,7 +445,10 @@ export function setNamesAndTitles(templates) {
|
|
|
443
445
|
baseName = baseName.replace(/_[0-9A-F]{32}/gi, "");
|
|
444
446
|
// The name length limit is 98
|
|
445
447
|
// Limit the baseName to 50 characters before the _<guid>
|
|
446
|
-
|
|
448
|
+
// If the baseName includes '{{params' it is likely being used in a template replacement, so do not truncate.
|
|
449
|
+
const name = baseName.includes("{{params")
|
|
450
|
+
? baseName + "_" + guid
|
|
451
|
+
: baseName.substring(0, 50) + "_" + guid;
|
|
447
452
|
// If the name + GUID already exists then append "_occurrenceCount"
|
|
448
453
|
t.item.name = names.indexOf(name) === -1 ? name : `${name}_${names.filter((n) => n === name).length}`;
|
|
449
454
|
names.push(name);
|
|
@@ -800,7 +805,12 @@ export function addFeatureServiceDefinition(serviceUrl, listToAdd, templateDicti
|
|
|
800
805
|
removeLayerOptimization(item);
|
|
801
806
|
// this can still chunk layers
|
|
802
807
|
options = _updateAddOptions(itemTemplate, options, layerChunks, isSelfReferential, authentication);
|
|
803
|
-
|
|
808
|
+
// Route based on the discriminator set by getLayersAndTables (which derives from
|
|
809
|
+
// properties.layers vs properties.tables) rather than the layer object's own `type`
|
|
810
|
+
// field. The latter may be missing when users supply custom layer JSON via
|
|
811
|
+
// params (e.g. {{params.buildSolution.items.<id>.service.layers}}), which would
|
|
812
|
+
// otherwise cause every layer to be pushed into the `tables` array.
|
|
813
|
+
if (toAdd.type === "layer" || item.type === "Feature Layer") {
|
|
804
814
|
options.layers.push(item);
|
|
805
815
|
}
|
|
806
816
|
else {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
Built
|
|
1
|
+
Built 05/08/2026 20:42:57.59
|
|
2
2
|
develop
|
|
3
|
-
commit
|
|
3
|
+
commit ea055007165a3f7366221b2dfd128bf4ae8963f3
|
|
4
4
|
Author: Ryan Cosby <ryan9313@esri.com>
|
|
5
|
-
Date: Thu
|
|
5
|
+
Date: Thu May 7 20:49:49 2026 -0700
|
|
6
6
|
|
|
7
|
-
v6.6.1-next.
|
|
7
|
+
v6.6.1-next.30
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@esri/solution-common",
|
|
3
|
-
"version": "6.6.1-next.
|
|
3
|
+
"version": "6.6.1-next.31",
|
|
4
4
|
"description": "Provides general helper functions for @esri/solution.js.",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"build": "npm-run-all --parallel build:*",
|
|
49
|
-
"build:cjs": "tsc --outDir ./dist/cjs -m commonjs",
|
|
49
|
+
"build:cjs": "tsc --outDir ./dist/cjs -m commonjs --moduleResolution node",
|
|
50
50
|
"postbuild:cjs": "node ../../scripts/create-dist-package-jsons.mjs",
|
|
51
51
|
"build:esm": "tsc --outDir ./dist/esm --declaration",
|
|
52
52
|
"postbuild:esm": "node ../../scripts/create-dist-package-jsons.mjs",
|
|
53
53
|
"dev": "npm-run-all --parallel dev:*",
|
|
54
|
-
"dev:cjs": "tsc -w --outDir ./dist/cjs -m commonjs",
|
|
54
|
+
"dev:cjs": "tsc -w --outDir ./dist/cjs -m commonjs --moduleResolution node",
|
|
55
55
|
"dev:esm": "tsc -w --outDir ./dist/esm --declaration",
|
|
56
56
|
"getupdates": "npm-check-updates --upgrade"
|
|
57
57
|
},
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"esri",
|
|
97
97
|
"ES6"
|
|
98
98
|
],
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "ea055007165a3f7366221b2dfd128bf4ae8963f3"
|
|
100
100
|
}
|