@esri/solution-viewer 6.0.4-alpha.0 → 6.1.0-alpha.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/package.json +3 -3
- package/dist/cjs/index.d.ts +0 -21
- package/dist/cjs/index.js +0 -25
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/viewer.d.ts +0 -54
- package/dist/cjs/viewer.js +0 -259
- package/dist/cjs/viewer.js.map +0 -1
- package/dist/esm/index.d.ts +0 -21
- package/dist/esm/index.js +0 -22
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/viewer.d.ts +0 -54
- package/dist/esm/viewer.js +0 -251
- package/dist/esm/viewer.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@esri/solution-viewer",
|
|
3
|
-
"version": "6.0
|
|
3
|
+
"version": "6.1.0-alpha.0",
|
|
4
4
|
"description": "Simplifies access to @esri/solution.js.",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"npm-check-updates": "^17.1.0"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@esri/solution-common": "^6.0
|
|
25
|
+
"@esri/solution-common": "^6.1.0-alpha.0",
|
|
26
26
|
"tslib": "1.14.1"
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"esri",
|
|
77
77
|
"ES6"
|
|
78
78
|
],
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "19cbc20f4da03baa4676b3fad82abcea533432c3"
|
|
80
80
|
}
|
package/dist/cjs/index.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/** @license
|
|
2
|
-
* Copyright 2018 Esri
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* Provides the access to the solution's contents.
|
|
18
|
-
*
|
|
19
|
-
* @module viewer
|
|
20
|
-
*/
|
|
21
|
-
export * from "./viewer";
|
package/dist/cjs/index.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/** @license
|
|
3
|
-
* Copyright 2018 Esri
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
const tslib_1 = require("tslib");
|
|
19
|
-
/**
|
|
20
|
-
* Provides the access to the solution's contents.
|
|
21
|
-
*
|
|
22
|
-
* @module viewer
|
|
23
|
-
*/
|
|
24
|
-
tslib_1.__exportStar(require("./viewer"), exports);
|
|
25
|
-
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH;;;;GAIG;AAEH,mDAAyB"}
|
package/dist/cjs/viewer.d.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/** @license
|
|
2
|
-
* Copyright 2018 Esri
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* Provides the access to the solution's contents.
|
|
18
|
-
*
|
|
19
|
-
* @module viewer
|
|
20
|
-
*/
|
|
21
|
-
import * as common from "@esri/solution-common";
|
|
22
|
-
/**
|
|
23
|
-
* Checks a Solution.
|
|
24
|
-
*
|
|
25
|
-
* @param item Solution id
|
|
26
|
-
* @param authentication Credentials for the request to AGO
|
|
27
|
-
* @returns List of results of checks of Solution
|
|
28
|
-
*/
|
|
29
|
-
export declare function checkSolution(itemId: string, authentication?: common.UserSession): Promise<string[]>;
|
|
30
|
-
/**
|
|
31
|
-
* Compares two AGO items, fetching them if only their id is supplied.
|
|
32
|
-
*
|
|
33
|
-
* @param item1 First item or its AGO id
|
|
34
|
-
* @param item2 Second item or its AGO id
|
|
35
|
-
* @param authentication Credentials for the request to AGO
|
|
36
|
-
* @returns True if objects are the same
|
|
37
|
-
* @see Only comparable properties are compared; see deleteItemProps() in the `common` package
|
|
38
|
-
*/
|
|
39
|
-
export declare function compareItems(item1: any, item2: any, authentication?: common.UserSession): Promise<boolean>;
|
|
40
|
-
/**
|
|
41
|
-
* Creates a hierarchy of the items in a Solution template.
|
|
42
|
-
*
|
|
43
|
-
* @param templates Array of templates from a Solution
|
|
44
|
-
* @returns List of top-level items, each containing a recursive list of its dependencies
|
|
45
|
-
*/
|
|
46
|
-
export declare function getItemHierarchy(templates: common.IItemTemplate[]): common.IHierarchyElement[];
|
|
47
|
-
/**
|
|
48
|
-
* Finds the top-level items in a Solution template--the items that are not dependencies of any other item.
|
|
49
|
-
*
|
|
50
|
-
* @param templates Array of templates from a Solution
|
|
51
|
-
* @returns List of top-level item ids
|
|
52
|
-
* @private
|
|
53
|
-
*/
|
|
54
|
-
export declare function _getTopLevelItemIds(templates: common.IItemTemplate[]): string[];
|
package/dist/cjs/viewer.js
DELETED
|
@@ -1,259 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/** @license
|
|
3
|
-
* Copyright 2018 Esri
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports._getTopLevelItemIds = exports.getItemHierarchy = exports.compareItems = exports.checkSolution = void 0;
|
|
19
|
-
const tslib_1 = require("tslib");
|
|
20
|
-
/**
|
|
21
|
-
* Provides the access to the solution's contents.
|
|
22
|
-
*
|
|
23
|
-
* @module viewer
|
|
24
|
-
*/
|
|
25
|
-
const common = tslib_1.__importStar(require("@esri/solution-common"));
|
|
26
|
-
// ------------------------------------------------------------------------------------------------------------------ //
|
|
27
|
-
/**
|
|
28
|
-
* Checks a Solution.
|
|
29
|
-
*
|
|
30
|
-
* @param item Solution id
|
|
31
|
-
* @param authentication Credentials for the request to AGO
|
|
32
|
-
* @returns List of results of checks of Solution
|
|
33
|
-
*/
|
|
34
|
-
function checkSolution(itemId, authentication = null) {
|
|
35
|
-
const resultsHtml = [`Item ${itemId}`];
|
|
36
|
-
let item;
|
|
37
|
-
let isTemplate = true;
|
|
38
|
-
let templateItems;
|
|
39
|
-
let templateItemIds;
|
|
40
|
-
let currentAction = " while getting complete item";
|
|
41
|
-
return (common
|
|
42
|
-
.getCompleteItem(itemId, authentication)
|
|
43
|
-
// ---------- Is it a Template or Deployed Solution? -----------------------------------------------------------//
|
|
44
|
-
.then((results) => {
|
|
45
|
-
currentAction = "";
|
|
46
|
-
item = results;
|
|
47
|
-
if (!item) {
|
|
48
|
-
throw new Error(`item is not found`);
|
|
49
|
-
}
|
|
50
|
-
else if (item.base.type !== "Solution") {
|
|
51
|
-
throw new Error(`item is not a Solution`);
|
|
52
|
-
}
|
|
53
|
-
else if (item.base.typeKeywords.includes("Template")) {
|
|
54
|
-
resultsHtml.push(`✔ item is a Template Solution`);
|
|
55
|
-
}
|
|
56
|
-
else if (item.base.typeKeywords.includes("Deployed")) {
|
|
57
|
-
isTemplate = false;
|
|
58
|
-
resultsHtml.push(`✔ item is a Deployed Solution`);
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
throw new Error(`item is neither a Template Solution nor a Deployed Solution`);
|
|
62
|
-
}
|
|
63
|
-
// base: IItem; text/plain JSON
|
|
64
|
-
// data: File; */*
|
|
65
|
-
// thumbnail: File; image/*
|
|
66
|
-
// metadata: File; application/xml
|
|
67
|
-
// resources: File[]; list of */*
|
|
68
|
-
// fwdRelatedItems: IRelatedItems[]; list of forward relationshipType/relatedItems[] pairs
|
|
69
|
-
// revRelatedItems: IRelatedItems[]; list of reverse relationshipType/relatedItems[] pairs
|
|
70
|
-
return common.blobToJson(item.data);
|
|
71
|
-
})
|
|
72
|
-
// ---------- Check the Solution2Item relationship from a Deployed Solution to each deployed item --------------//
|
|
73
|
-
.then((itemDataJson) => {
|
|
74
|
-
templateItems = itemDataJson?.templates;
|
|
75
|
-
/* istanbul ignore else */
|
|
76
|
-
if (!templateItems || templateItems.length === 0) {
|
|
77
|
-
throw new Error(`Solution's data are not valid JSON or the Solution contains no items`);
|
|
78
|
-
}
|
|
79
|
-
templateItemIds = templateItems.map((template) => template.itemId).sort();
|
|
80
|
-
if (!isTemplate) {
|
|
81
|
-
// Make sure that there's a Solution2Item relationship to each deployed item
|
|
82
|
-
const fwdRelatedItemIds = item.fwdRelatedItems
|
|
83
|
-
.filter((relationshipSet) => relationshipSet.relationshipType === "Solution2Item")
|
|
84
|
-
.reduce((flatSet, relationshipSet) => flatSet.concat(relationshipSet.relatedItemIds), [])
|
|
85
|
-
.sort();
|
|
86
|
-
if (templateItemIds.length < fwdRelatedItemIds.length) {
|
|
87
|
-
resultsHtml.push("✖ there are forward Solution2Item relationship(s) to unknown item(s)");
|
|
88
|
-
}
|
|
89
|
-
else if (templateItemIds.length > fwdRelatedItemIds.length) {
|
|
90
|
-
resultsHtml.push("✖ missing forward Solution2Item relationship(s)");
|
|
91
|
-
}
|
|
92
|
-
else if (JSON.stringify(templateItemIds) !== JSON.stringify(fwdRelatedItemIds)) {
|
|
93
|
-
resultsHtml.push("✖ mismatching forward Solution2Item relationship(s)");
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
resultsHtml.push("✔ matching forward Solution2Item relationship(s)");
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
return resultsHtml;
|
|
100
|
-
})
|
|
101
|
-
// ---------- Check that all dependency references are items in Solution ---------------------------------------//
|
|
102
|
-
.then(() => {
|
|
103
|
-
const dependencyIds = templateItems
|
|
104
|
-
.reduce((flatSet, template) => flatSet.concat(template.dependencies), [])
|
|
105
|
-
.reduce((noDupSet, dependency) => {
|
|
106
|
-
/* istanbul ignore else */
|
|
107
|
-
if (!noDupSet.includes(dependency))
|
|
108
|
-
noDupSet.push(dependency);
|
|
109
|
-
return noDupSet;
|
|
110
|
-
}, [])
|
|
111
|
-
.sort();
|
|
112
|
-
const missingItems = dependencyIds.filter((dependencyId) => !templateItemIds.includes(dependencyId));
|
|
113
|
-
if (missingItems.length === 0) {
|
|
114
|
-
resultsHtml.push("✔ all dependencies are in Solution");
|
|
115
|
-
}
|
|
116
|
-
else {
|
|
117
|
-
resultsHtml.push("✖ dependencies that aren't in Solution: " + JSON.stringify(missingItems));
|
|
118
|
-
}
|
|
119
|
-
return resultsHtml;
|
|
120
|
-
})
|
|
121
|
-
// ---------- Done ---------------------------------------------------------------------------------------------//
|
|
122
|
-
.then(() => {
|
|
123
|
-
return resultsHtml;
|
|
124
|
-
})
|
|
125
|
-
// ---------- Fatal error --------------------------------------------------------------------------------------//
|
|
126
|
-
.catch((error) => {
|
|
127
|
-
resultsHtml.push(`✖ error${currentAction}: ${error.message}`);
|
|
128
|
-
return resultsHtml;
|
|
129
|
-
}));
|
|
130
|
-
}
|
|
131
|
-
exports.checkSolution = checkSolution;
|
|
132
|
-
/**
|
|
133
|
-
* Compares two AGO items, fetching them if only their id is supplied.
|
|
134
|
-
*
|
|
135
|
-
* @param item1 First item or its AGO id
|
|
136
|
-
* @param item2 Second item or its AGO id
|
|
137
|
-
* @param authentication Credentials for the request to AGO
|
|
138
|
-
* @returns True if objects are the same
|
|
139
|
-
* @see Only comparable properties are compared; see deleteItemProps() in the `common` package
|
|
140
|
-
*/
|
|
141
|
-
function compareItems(item1, item2, authentication = null) {
|
|
142
|
-
return new Promise((resolve, reject) => {
|
|
143
|
-
// If an input is a string, fetch the item; otherwise, clone the input because we will modify the
|
|
144
|
-
// item base to remove incomparable properties
|
|
145
|
-
let itemBaseDef1;
|
|
146
|
-
if (typeof item1 === "string") {
|
|
147
|
-
itemBaseDef1 = common.getItemBase(item1, authentication);
|
|
148
|
-
}
|
|
149
|
-
else {
|
|
150
|
-
itemBaseDef1 = Promise.resolve(common.cloneObject(item1));
|
|
151
|
-
}
|
|
152
|
-
let itemBaseDef2;
|
|
153
|
-
if (typeof item2 === "string") {
|
|
154
|
-
itemBaseDef2 = common.getItemBase(item2, authentication);
|
|
155
|
-
}
|
|
156
|
-
else {
|
|
157
|
-
itemBaseDef2 = Promise.resolve(common.cloneObject(item2));
|
|
158
|
-
}
|
|
159
|
-
Promise.all([itemBaseDef1, itemBaseDef2]).then((responses) => {
|
|
160
|
-
const [itemBase1, itemBase2] = responses;
|
|
161
|
-
common.deleteItemProps(itemBase1);
|
|
162
|
-
common.deleteItemProps(itemBase2);
|
|
163
|
-
if (itemBase1.type === "Solution") {
|
|
164
|
-
delete itemBase1.typeKeywords;
|
|
165
|
-
delete itemBase1.size;
|
|
166
|
-
delete itemBase2.typeKeywords;
|
|
167
|
-
delete itemBase2.size;
|
|
168
|
-
}
|
|
169
|
-
/*console.log("----------------------------------------------------------------");
|
|
170
|
-
console.log("item 1 " + item1 + ": ", JSON.stringify(itemBase1, null, 2));
|
|
171
|
-
console.log("item 2 " + item2 + ": ", JSON.stringify(itemBase2, null, 2));
|
|
172
|
-
console.log("----------------------------------------------------------------");*/
|
|
173
|
-
resolve(common.compareJSONNoEmptyStrings(itemBase1, itemBase2));
|
|
174
|
-
}, (e) => reject(e));
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
exports.compareItems = compareItems;
|
|
178
|
-
/**
|
|
179
|
-
* Creates a hierarchy of the items in a Solution template.
|
|
180
|
-
*
|
|
181
|
-
* @param templates Array of templates from a Solution
|
|
182
|
-
* @returns List of top-level items, each containing a recursive list of its dependencies
|
|
183
|
-
*/
|
|
184
|
-
function getItemHierarchy(templates) {
|
|
185
|
-
const hierarchy = [];
|
|
186
|
-
// Get the template specified by id out of a list of templates
|
|
187
|
-
function getTemplateInSolution(templates, id) {
|
|
188
|
-
const iTemplate = templates.findIndex((template) => id === template.itemId);
|
|
189
|
-
return iTemplate >= 0 ? templates[iTemplate] : null;
|
|
190
|
-
}
|
|
191
|
-
// Hierarchically list the dependencies of specified node
|
|
192
|
-
function traceItemId(id, accumulatedHierarchy, alreadyVisitedIds = []) {
|
|
193
|
-
// Get the dependencies of the node
|
|
194
|
-
const template = getTemplateInSolution(templates, id);
|
|
195
|
-
/* istanbul ignore else */
|
|
196
|
-
if (template) {
|
|
197
|
-
const templateEntry = {
|
|
198
|
-
id,
|
|
199
|
-
dependencies: [],
|
|
200
|
-
};
|
|
201
|
-
// Visit each dependency, but only if this template is not in the alreadyVisitedIds list to avoid infinite loops
|
|
202
|
-
if (alreadyVisitedIds.indexOf(id) < 0) {
|
|
203
|
-
// Add dependency to alreadyVisitedIds list
|
|
204
|
-
alreadyVisitedIds.push(id);
|
|
205
|
-
template.dependencies.forEach((dependencyId) => {
|
|
206
|
-
// Remove dependency from list of templates to visit in the top-level loop
|
|
207
|
-
const iDependencyTemplate = templateItemIds.indexOf(dependencyId);
|
|
208
|
-
if (iDependencyTemplate >= 0) {
|
|
209
|
-
templateItemIds.splice(iDependencyTemplate, 1);
|
|
210
|
-
}
|
|
211
|
-
traceItemId(dependencyId, templateEntry.dependencies, alreadyVisitedIds);
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
accumulatedHierarchy.push(templateEntry);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
// Start with top-level nodes and add in the rest of the nodes to catch cycles without top-level nodes
|
|
218
|
-
let templateItemIds = _getTopLevelItemIds(templates);
|
|
219
|
-
const otherItems = templates
|
|
220
|
-
.filter((template) => templateItemIds.indexOf(template.itemId) < 0) // only keep non-top-level nodes
|
|
221
|
-
.sort((a, b) => b.dependencies.length - a.dependencies.length); // sort so that nodes with more dependencies come first--reduces stubs
|
|
222
|
-
templateItemIds = templateItemIds.concat(otherItems.map((template) => template.itemId));
|
|
223
|
-
// Step through the list of nodes; we'll also remove nodes as we visit them
|
|
224
|
-
let itemId = templateItemIds.shift();
|
|
225
|
-
while (typeof itemId !== "undefined") {
|
|
226
|
-
traceItemId(itemId, hierarchy);
|
|
227
|
-
itemId = templateItemIds.shift();
|
|
228
|
-
}
|
|
229
|
-
return hierarchy;
|
|
230
|
-
}
|
|
231
|
-
exports.getItemHierarchy = getItemHierarchy;
|
|
232
|
-
// ------------------------------------------------------------------------------------------------------------------ //
|
|
233
|
-
/**
|
|
234
|
-
* Finds the top-level items in a Solution template--the items that are not dependencies of any other item.
|
|
235
|
-
*
|
|
236
|
-
* @param templates Array of templates from a Solution
|
|
237
|
-
* @returns List of top-level item ids
|
|
238
|
-
* @private
|
|
239
|
-
*/
|
|
240
|
-
function _getTopLevelItemIds(templates) {
|
|
241
|
-
// Find the top-level nodes. Start with all nodes, then remove those that other nodes depend on
|
|
242
|
-
const topLevelItemCandidateIds = templates.map(function (template) {
|
|
243
|
-
return template.itemId;
|
|
244
|
-
});
|
|
245
|
-
templates.forEach(function (template) {
|
|
246
|
-
(template.dependencies || []).forEach(function (dependencyId) {
|
|
247
|
-
const iNode = topLevelItemCandidateIds.indexOf(dependencyId);
|
|
248
|
-
/* istanbul ignore else */
|
|
249
|
-
if (iNode >= 0) {
|
|
250
|
-
// Node is somebody's dependency, so remove the node from the list of top-level nodes
|
|
251
|
-
// If iNode == -1, then it's a shared dependency and it has already been removed
|
|
252
|
-
topLevelItemCandidateIds.splice(iNode, 1);
|
|
253
|
-
}
|
|
254
|
-
});
|
|
255
|
-
});
|
|
256
|
-
return topLevelItemCandidateIds;
|
|
257
|
-
}
|
|
258
|
-
exports._getTopLevelItemIds = _getTopLevelItemIds;
|
|
259
|
-
//# sourceMappingURL=viewer.js.map
|
package/dist/cjs/viewer.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"viewer.js","sourceRoot":"","sources":["../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CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,YAAY;YAC1D,MAAM,KAAK,GAAG,wBAAwB,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YAE7D,0BAA0B;YAC1B,IAAI,KAAK,IAAI,CAAC,EAAE;gBACd,qFAAqF;gBACrF,gFAAgF;gBAChF,wBAAwB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;aAC3C;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,wBAAwB,CAAC;AAClC,CAAC;AApBD,kDAoBC"}
|
package/dist/esm/index.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/** @license
|
|
2
|
-
* Copyright 2018 Esri
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* Provides the access to the solution's contents.
|
|
18
|
-
*
|
|
19
|
-
* @module viewer
|
|
20
|
-
*/
|
|
21
|
-
export * from "./viewer";
|
package/dist/esm/index.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/** @license
|
|
2
|
-
* Copyright 2018 Esri
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* Provides the access to the solution's contents.
|
|
18
|
-
*
|
|
19
|
-
* @module viewer
|
|
20
|
-
*/
|
|
21
|
-
export * from "./viewer";
|
|
22
|
-
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;GAIG;AAEH,cAAc,UAAU,CAAC"}
|
package/dist/esm/viewer.d.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/** @license
|
|
2
|
-
* Copyright 2018 Esri
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* Provides the access to the solution's contents.
|
|
18
|
-
*
|
|
19
|
-
* @module viewer
|
|
20
|
-
*/
|
|
21
|
-
import * as common from "@esri/solution-common";
|
|
22
|
-
/**
|
|
23
|
-
* Checks a Solution.
|
|
24
|
-
*
|
|
25
|
-
* @param item Solution id
|
|
26
|
-
* @param authentication Credentials for the request to AGO
|
|
27
|
-
* @returns List of results of checks of Solution
|
|
28
|
-
*/
|
|
29
|
-
export declare function checkSolution(itemId: string, authentication?: common.UserSession): Promise<string[]>;
|
|
30
|
-
/**
|
|
31
|
-
* Compares two AGO items, fetching them if only their id is supplied.
|
|
32
|
-
*
|
|
33
|
-
* @param item1 First item or its AGO id
|
|
34
|
-
* @param item2 Second item or its AGO id
|
|
35
|
-
* @param authentication Credentials for the request to AGO
|
|
36
|
-
* @returns True if objects are the same
|
|
37
|
-
* @see Only comparable properties are compared; see deleteItemProps() in the `common` package
|
|
38
|
-
*/
|
|
39
|
-
export declare function compareItems(item1: any, item2: any, authentication?: common.UserSession): Promise<boolean>;
|
|
40
|
-
/**
|
|
41
|
-
* Creates a hierarchy of the items in a Solution template.
|
|
42
|
-
*
|
|
43
|
-
* @param templates Array of templates from a Solution
|
|
44
|
-
* @returns List of top-level items, each containing a recursive list of its dependencies
|
|
45
|
-
*/
|
|
46
|
-
export declare function getItemHierarchy(templates: common.IItemTemplate[]): common.IHierarchyElement[];
|
|
47
|
-
/**
|
|
48
|
-
* Finds the top-level items in a Solution template--the items that are not dependencies of any other item.
|
|
49
|
-
*
|
|
50
|
-
* @param templates Array of templates from a Solution
|
|
51
|
-
* @returns List of top-level item ids
|
|
52
|
-
* @private
|
|
53
|
-
*/
|
|
54
|
-
export declare function _getTopLevelItemIds(templates: common.IItemTemplate[]): string[];
|
package/dist/esm/viewer.js
DELETED
|
@@ -1,251 +0,0 @@
|
|
|
1
|
-
/** @license
|
|
2
|
-
* Copyright 2018 Esri
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* Provides the access to the solution's contents.
|
|
18
|
-
*
|
|
19
|
-
* @module viewer
|
|
20
|
-
*/
|
|
21
|
-
import * as common from "@esri/solution-common";
|
|
22
|
-
// ------------------------------------------------------------------------------------------------------------------ //
|
|
23
|
-
/**
|
|
24
|
-
* Checks a Solution.
|
|
25
|
-
*
|
|
26
|
-
* @param item Solution id
|
|
27
|
-
* @param authentication Credentials for the request to AGO
|
|
28
|
-
* @returns List of results of checks of Solution
|
|
29
|
-
*/
|
|
30
|
-
export function checkSolution(itemId, authentication = null) {
|
|
31
|
-
const resultsHtml = [`Item ${itemId}`];
|
|
32
|
-
let item;
|
|
33
|
-
let isTemplate = true;
|
|
34
|
-
let templateItems;
|
|
35
|
-
let templateItemIds;
|
|
36
|
-
let currentAction = " while getting complete item";
|
|
37
|
-
return (common
|
|
38
|
-
.getCompleteItem(itemId, authentication)
|
|
39
|
-
// ---------- Is it a Template or Deployed Solution? -----------------------------------------------------------//
|
|
40
|
-
.then((results) => {
|
|
41
|
-
currentAction = "";
|
|
42
|
-
item = results;
|
|
43
|
-
if (!item) {
|
|
44
|
-
throw new Error(`item is not found`);
|
|
45
|
-
}
|
|
46
|
-
else if (item.base.type !== "Solution") {
|
|
47
|
-
throw new Error(`item is not a Solution`);
|
|
48
|
-
}
|
|
49
|
-
else if (item.base.typeKeywords.includes("Template")) {
|
|
50
|
-
resultsHtml.push(`✔ item is a Template Solution`);
|
|
51
|
-
}
|
|
52
|
-
else if (item.base.typeKeywords.includes("Deployed")) {
|
|
53
|
-
isTemplate = false;
|
|
54
|
-
resultsHtml.push(`✔ item is a Deployed Solution`);
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
throw new Error(`item is neither a Template Solution nor a Deployed Solution`);
|
|
58
|
-
}
|
|
59
|
-
// base: IItem; text/plain JSON
|
|
60
|
-
// data: File; */*
|
|
61
|
-
// thumbnail: File; image/*
|
|
62
|
-
// metadata: File; application/xml
|
|
63
|
-
// resources: File[]; list of */*
|
|
64
|
-
// fwdRelatedItems: IRelatedItems[]; list of forward relationshipType/relatedItems[] pairs
|
|
65
|
-
// revRelatedItems: IRelatedItems[]; list of reverse relationshipType/relatedItems[] pairs
|
|
66
|
-
return common.blobToJson(item.data);
|
|
67
|
-
})
|
|
68
|
-
// ---------- Check the Solution2Item relationship from a Deployed Solution to each deployed item --------------//
|
|
69
|
-
.then((itemDataJson) => {
|
|
70
|
-
templateItems = itemDataJson?.templates;
|
|
71
|
-
/* istanbul ignore else */
|
|
72
|
-
if (!templateItems || templateItems.length === 0) {
|
|
73
|
-
throw new Error(`Solution's data are not valid JSON or the Solution contains no items`);
|
|
74
|
-
}
|
|
75
|
-
templateItemIds = templateItems.map((template) => template.itemId).sort();
|
|
76
|
-
if (!isTemplate) {
|
|
77
|
-
// Make sure that there's a Solution2Item relationship to each deployed item
|
|
78
|
-
const fwdRelatedItemIds = item.fwdRelatedItems
|
|
79
|
-
.filter((relationshipSet) => relationshipSet.relationshipType === "Solution2Item")
|
|
80
|
-
.reduce((flatSet, relationshipSet) => flatSet.concat(relationshipSet.relatedItemIds), [])
|
|
81
|
-
.sort();
|
|
82
|
-
if (templateItemIds.length < fwdRelatedItemIds.length) {
|
|
83
|
-
resultsHtml.push("✖ there are forward Solution2Item relationship(s) to unknown item(s)");
|
|
84
|
-
}
|
|
85
|
-
else if (templateItemIds.length > fwdRelatedItemIds.length) {
|
|
86
|
-
resultsHtml.push("✖ missing forward Solution2Item relationship(s)");
|
|
87
|
-
}
|
|
88
|
-
else if (JSON.stringify(templateItemIds) !== JSON.stringify(fwdRelatedItemIds)) {
|
|
89
|
-
resultsHtml.push("✖ mismatching forward Solution2Item relationship(s)");
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
resultsHtml.push("✔ matching forward Solution2Item relationship(s)");
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
return resultsHtml;
|
|
96
|
-
})
|
|
97
|
-
// ---------- Check that all dependency references are items in Solution ---------------------------------------//
|
|
98
|
-
.then(() => {
|
|
99
|
-
const dependencyIds = templateItems
|
|
100
|
-
.reduce((flatSet, template) => flatSet.concat(template.dependencies), [])
|
|
101
|
-
.reduce((noDupSet, dependency) => {
|
|
102
|
-
/* istanbul ignore else */
|
|
103
|
-
if (!noDupSet.includes(dependency))
|
|
104
|
-
noDupSet.push(dependency);
|
|
105
|
-
return noDupSet;
|
|
106
|
-
}, [])
|
|
107
|
-
.sort();
|
|
108
|
-
const missingItems = dependencyIds.filter((dependencyId) => !templateItemIds.includes(dependencyId));
|
|
109
|
-
if (missingItems.length === 0) {
|
|
110
|
-
resultsHtml.push("✔ all dependencies are in Solution");
|
|
111
|
-
}
|
|
112
|
-
else {
|
|
113
|
-
resultsHtml.push("✖ dependencies that aren't in Solution: " + JSON.stringify(missingItems));
|
|
114
|
-
}
|
|
115
|
-
return resultsHtml;
|
|
116
|
-
})
|
|
117
|
-
// ---------- Done ---------------------------------------------------------------------------------------------//
|
|
118
|
-
.then(() => {
|
|
119
|
-
return resultsHtml;
|
|
120
|
-
})
|
|
121
|
-
// ---------- Fatal error --------------------------------------------------------------------------------------//
|
|
122
|
-
.catch((error) => {
|
|
123
|
-
resultsHtml.push(`✖ error${currentAction}: ${error.message}`);
|
|
124
|
-
return resultsHtml;
|
|
125
|
-
}));
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Compares two AGO items, fetching them if only their id is supplied.
|
|
129
|
-
*
|
|
130
|
-
* @param item1 First item or its AGO id
|
|
131
|
-
* @param item2 Second item or its AGO id
|
|
132
|
-
* @param authentication Credentials for the request to AGO
|
|
133
|
-
* @returns True if objects are the same
|
|
134
|
-
* @see Only comparable properties are compared; see deleteItemProps() in the `common` package
|
|
135
|
-
*/
|
|
136
|
-
export function compareItems(item1, item2, authentication = null) {
|
|
137
|
-
return new Promise((resolve, reject) => {
|
|
138
|
-
// If an input is a string, fetch the item; otherwise, clone the input because we will modify the
|
|
139
|
-
// item base to remove incomparable properties
|
|
140
|
-
let itemBaseDef1;
|
|
141
|
-
if (typeof item1 === "string") {
|
|
142
|
-
itemBaseDef1 = common.getItemBase(item1, authentication);
|
|
143
|
-
}
|
|
144
|
-
else {
|
|
145
|
-
itemBaseDef1 = Promise.resolve(common.cloneObject(item1));
|
|
146
|
-
}
|
|
147
|
-
let itemBaseDef2;
|
|
148
|
-
if (typeof item2 === "string") {
|
|
149
|
-
itemBaseDef2 = common.getItemBase(item2, authentication);
|
|
150
|
-
}
|
|
151
|
-
else {
|
|
152
|
-
itemBaseDef2 = Promise.resolve(common.cloneObject(item2));
|
|
153
|
-
}
|
|
154
|
-
Promise.all([itemBaseDef1, itemBaseDef2]).then((responses) => {
|
|
155
|
-
const [itemBase1, itemBase2] = responses;
|
|
156
|
-
common.deleteItemProps(itemBase1);
|
|
157
|
-
common.deleteItemProps(itemBase2);
|
|
158
|
-
if (itemBase1.type === "Solution") {
|
|
159
|
-
delete itemBase1.typeKeywords;
|
|
160
|
-
delete itemBase1.size;
|
|
161
|
-
delete itemBase2.typeKeywords;
|
|
162
|
-
delete itemBase2.size;
|
|
163
|
-
}
|
|
164
|
-
/*console.log("----------------------------------------------------------------");
|
|
165
|
-
console.log("item 1 " + item1 + ": ", JSON.stringify(itemBase1, null, 2));
|
|
166
|
-
console.log("item 2 " + item2 + ": ", JSON.stringify(itemBase2, null, 2));
|
|
167
|
-
console.log("----------------------------------------------------------------");*/
|
|
168
|
-
resolve(common.compareJSONNoEmptyStrings(itemBase1, itemBase2));
|
|
169
|
-
}, (e) => reject(e));
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Creates a hierarchy of the items in a Solution template.
|
|
174
|
-
*
|
|
175
|
-
* @param templates Array of templates from a Solution
|
|
176
|
-
* @returns List of top-level items, each containing a recursive list of its dependencies
|
|
177
|
-
*/
|
|
178
|
-
export function getItemHierarchy(templates) {
|
|
179
|
-
const hierarchy = [];
|
|
180
|
-
// Get the template specified by id out of a list of templates
|
|
181
|
-
function getTemplateInSolution(templates, id) {
|
|
182
|
-
const iTemplate = templates.findIndex((template) => id === template.itemId);
|
|
183
|
-
return iTemplate >= 0 ? templates[iTemplate] : null;
|
|
184
|
-
}
|
|
185
|
-
// Hierarchically list the dependencies of specified node
|
|
186
|
-
function traceItemId(id, accumulatedHierarchy, alreadyVisitedIds = []) {
|
|
187
|
-
// Get the dependencies of the node
|
|
188
|
-
const template = getTemplateInSolution(templates, id);
|
|
189
|
-
/* istanbul ignore else */
|
|
190
|
-
if (template) {
|
|
191
|
-
const templateEntry = {
|
|
192
|
-
id,
|
|
193
|
-
dependencies: [],
|
|
194
|
-
};
|
|
195
|
-
// Visit each dependency, but only if this template is not in the alreadyVisitedIds list to avoid infinite loops
|
|
196
|
-
if (alreadyVisitedIds.indexOf(id) < 0) {
|
|
197
|
-
// Add dependency to alreadyVisitedIds list
|
|
198
|
-
alreadyVisitedIds.push(id);
|
|
199
|
-
template.dependencies.forEach((dependencyId) => {
|
|
200
|
-
// Remove dependency from list of templates to visit in the top-level loop
|
|
201
|
-
const iDependencyTemplate = templateItemIds.indexOf(dependencyId);
|
|
202
|
-
if (iDependencyTemplate >= 0) {
|
|
203
|
-
templateItemIds.splice(iDependencyTemplate, 1);
|
|
204
|
-
}
|
|
205
|
-
traceItemId(dependencyId, templateEntry.dependencies, alreadyVisitedIds);
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
accumulatedHierarchy.push(templateEntry);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
// Start with top-level nodes and add in the rest of the nodes to catch cycles without top-level nodes
|
|
212
|
-
let templateItemIds = _getTopLevelItemIds(templates);
|
|
213
|
-
const otherItems = templates
|
|
214
|
-
.filter((template) => templateItemIds.indexOf(template.itemId) < 0) // only keep non-top-level nodes
|
|
215
|
-
.sort((a, b) => b.dependencies.length - a.dependencies.length); // sort so that nodes with more dependencies come first--reduces stubs
|
|
216
|
-
templateItemIds = templateItemIds.concat(otherItems.map((template) => template.itemId));
|
|
217
|
-
// Step through the list of nodes; we'll also remove nodes as we visit them
|
|
218
|
-
let itemId = templateItemIds.shift();
|
|
219
|
-
while (typeof itemId !== "undefined") {
|
|
220
|
-
traceItemId(itemId, hierarchy);
|
|
221
|
-
itemId = templateItemIds.shift();
|
|
222
|
-
}
|
|
223
|
-
return hierarchy;
|
|
224
|
-
}
|
|
225
|
-
// ------------------------------------------------------------------------------------------------------------------ //
|
|
226
|
-
/**
|
|
227
|
-
* Finds the top-level items in a Solution template--the items that are not dependencies of any other item.
|
|
228
|
-
*
|
|
229
|
-
* @param templates Array of templates from a Solution
|
|
230
|
-
* @returns List of top-level item ids
|
|
231
|
-
* @private
|
|
232
|
-
*/
|
|
233
|
-
export function _getTopLevelItemIds(templates) {
|
|
234
|
-
// Find the top-level nodes. Start with all nodes, then remove those that other nodes depend on
|
|
235
|
-
const topLevelItemCandidateIds = templates.map(function (template) {
|
|
236
|
-
return template.itemId;
|
|
237
|
-
});
|
|
238
|
-
templates.forEach(function (template) {
|
|
239
|
-
(template.dependencies || []).forEach(function (dependencyId) {
|
|
240
|
-
const iNode = topLevelItemCandidateIds.indexOf(dependencyId);
|
|
241
|
-
/* istanbul ignore else */
|
|
242
|
-
if (iNode >= 0) {
|
|
243
|
-
// Node is somebody's dependency, so remove the node from the list of top-level nodes
|
|
244
|
-
// If iNode == -1, then it's a shared dependency and it has already been removed
|
|
245
|
-
topLevelItemCandidateIds.splice(iNode, 1);
|
|
246
|
-
}
|
|
247
|
-
});
|
|
248
|
-
});
|
|
249
|
-
return topLevelItemCandidateIds;
|
|
250
|
-
}
|
|
251
|
-
//# sourceM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