@esri/solution-web-tool 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 +4 -4
- package/dist/cjs/index.d.ts +0 -22
- package/dist/cjs/index.js +0 -27
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/web-tool-processor.d.ts +0 -78
- package/dist/cjs/web-tool-processor.js +0 -261
- package/dist/cjs/web-tool-processor.js.map +0 -1
- package/dist/esm/index.d.ts +0 -22
- package/dist/esm/index.js +0 -23
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/web-tool-processor.d.ts +0 -78
- package/dist/esm/web-tool-processor.js +0 -251
- package/dist/esm/web-tool-processor.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@esri/solution-web-tool",
|
|
3
|
-
"version": "6.0
|
|
3
|
+
"version": "6.1.0-alpha.0",
|
|
4
4
|
"description": "Manages the creation and deployment of web tool geoprocessing service item type for @esri/solution.js.",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"npm-check-updates": "^17.1.0"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@esri/solution-common": "^6.0
|
|
25
|
-
"@esri/solution-simple-types": "^6.0
|
|
24
|
+
"@esri/solution-common": "^6.1.0-alpha.0",
|
|
25
|
+
"@esri/solution-simple-types": "^6.1.0-alpha.0",
|
|
26
26
|
"tslib": "1.14.1"
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"esri",
|
|
70
70
|
"ES6"
|
|
71
71
|
],
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "19cbc20f4da03baa4676b3fad82abcea533432c3"
|
|
73
73
|
}
|
package/dist/cjs/index.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/** @license
|
|
2
|
-
* Copyright 2024 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
|
-
* Manages the creation and deployment of web tool geoprocessing service item types.
|
|
18
|
-
*
|
|
19
|
-
* @module solution-web-tool
|
|
20
|
-
*/
|
|
21
|
-
import * as WebToolProcessor from "./web-tool-processor";
|
|
22
|
-
export { WebToolProcessor };
|
package/dist/cjs/index.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/** @license
|
|
3
|
-
* Copyright 2024 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.WebToolProcessor = void 0;
|
|
19
|
-
const tslib_1 = require("tslib");
|
|
20
|
-
/**
|
|
21
|
-
* Manages the creation and deployment of web tool geoprocessing service item types.
|
|
22
|
-
*
|
|
23
|
-
* @module solution-web-tool
|
|
24
|
-
*/
|
|
25
|
-
const WebToolProcessor = tslib_1.__importStar(require("./web-tool-processor"));
|
|
26
|
-
exports.WebToolProcessor = WebToolProcessor;
|
|
27
|
-
//# 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;AACH,+EAAyD;AAEhD,4CAAgB"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/** @license
|
|
2
|
-
* Copyright 2024 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
|
-
* Manages the creation and deployment of web-experience item types.
|
|
18
|
-
*
|
|
19
|
-
* @module solution-web-tool
|
|
20
|
-
*/
|
|
21
|
-
import * as common from "@esri/solution-common";
|
|
22
|
-
/**
|
|
23
|
-
* Creates a template from a Web Tool Geoprocessing item
|
|
24
|
-
*
|
|
25
|
-
* @param {any} itemInfo: The base item info
|
|
26
|
-
* @param {UserSession} destAuthentication Credentials for requests to the destination organization
|
|
27
|
-
* @param {UserSession} srcAuthentication Credentials for requests to source items
|
|
28
|
-
* @param {any} templateDictionary Hash of facts: folder id, org URL, adlib replacements
|
|
29
|
-
* @returns {Promise<IItemTemplate>}
|
|
30
|
-
*/
|
|
31
|
-
export declare function convertItemToTemplate(itemInfo: any, destAuthentication: common.UserSession, srcAuthentication: common.UserSession, templateDictionary: any): Promise<common.IItemTemplate>;
|
|
32
|
-
/**
|
|
33
|
-
* Creates a Web Tool Geoprocessing item from a template
|
|
34
|
-
*
|
|
35
|
-
* @param {IItemTemplate} template The template
|
|
36
|
-
* @param {any} templateDictionary The template dictionary
|
|
37
|
-
* @param {UserSession} destinationAuthentication The destination user session info
|
|
38
|
-
* @param itemProgressCallback An item progress callback
|
|
39
|
-
* @returns {Promise<ICreateItemFromTemplateResponse>}
|
|
40
|
-
*/
|
|
41
|
-
export declare function createItemFromTemplate(template: common.IItemTemplate, templateDictionary: any, destinationAuthentication: common.UserSession, itemProgressCallback: common.IItemProgressCallback): Promise<common.ICreateItemFromTemplateResponse>;
|
|
42
|
-
/**
|
|
43
|
-
* Get the urls available on the portal self.
|
|
44
|
-
*
|
|
45
|
-
* @param {IItemTemplate} template The template
|
|
46
|
-
* @param {any} templateDictionary The template dictionary
|
|
47
|
-
* @param {UserSession} destinationAuthentication The destination user session info
|
|
48
|
-
* @returns List of http and https helper urls
|
|
49
|
-
*/
|
|
50
|
-
export declare function createWebTool(template: common.IItemTemplate, templateDictionary: any, destinationAuthentication: common.UserSession): Promise<any>;
|
|
51
|
-
/**
|
|
52
|
-
* Get the URL for the Notebook server in Enterprise.
|
|
53
|
-
*
|
|
54
|
-
* @param portalBaseUrl URL of the portal endpoint, e.g., "https://gisserver.domain.com/server"
|
|
55
|
-
* @param authentication Credentials for the request to AGO
|
|
56
|
-
* @returns URL for the Notebook server Enterprise application (e.g., "https://abc123.esri.com:6443/gis"),
|
|
57
|
-
* or an empty string if Notebook server is not installed
|
|
58
|
-
*/
|
|
59
|
-
export declare function getNotebookServerCreateServiceURL(portalBaseUrl: string, authentication: common.UserSession, templateDictionary: any): Promise<string>;
|
|
60
|
-
/**
|
|
61
|
-
* Get the URL for the Notebook server in Enterprise.
|
|
62
|
-
*
|
|
63
|
-
* @param portalBaseUrl URL of the portal endpoint, e.g., "https://gisserver.domain.com/server"
|
|
64
|
-
* @param authentication Credentials for the request to AGO
|
|
65
|
-
* @returns URL for the Notebook server Enterprise application (e.g., "https://abc123.esri.com:6443/gis"),
|
|
66
|
-
* or an empty string if Notebook server is not installed
|
|
67
|
-
*/
|
|
68
|
-
export declare function getNotebookEnterpriseServerRootURL(portalBaseUrl: string, authentication: common.UserSession): Promise<string>;
|
|
69
|
-
/**
|
|
70
|
-
* Move the web tool to the solution folder on enterprise.
|
|
71
|
-
* This will happen automatically for Online.
|
|
72
|
-
*
|
|
73
|
-
* @param {string} itemId The webtools item id
|
|
74
|
-
* @param {any} templateDictionary The template dictionary
|
|
75
|
-
* @param {UserSession} destinationAuthentication The destination user session info
|
|
76
|
-
* @returns a promise that will resolve when the move is complete
|
|
77
|
-
*/
|
|
78
|
-
export declare function moveToFolder(itemId: string, templateDictionary: any, destinationAuthentication: common.UserSession): Promise<void>;
|
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/** @license
|
|
3
|
-
* Copyright 2024 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.moveToFolder = exports.getNotebookEnterpriseServerRootURL = exports.getNotebookServerCreateServiceURL = exports.createWebTool = exports.createItemFromTemplate = exports.convertItemToTemplate = void 0;
|
|
19
|
-
const tslib_1 = require("tslib");
|
|
20
|
-
/**
|
|
21
|
-
* Manages the creation and deployment of web-experience item types.
|
|
22
|
-
*
|
|
23
|
-
* @module solution-web-tool
|
|
24
|
-
*/
|
|
25
|
-
const common = tslib_1.__importStar(require("@esri/solution-common"));
|
|
26
|
-
const solution_simple_types_1 = require("@esri/solution-simple-types");
|
|
27
|
-
/**
|
|
28
|
-
* Creates a template from a Web Tool Geoprocessing item
|
|
29
|
-
*
|
|
30
|
-
* @param {any} itemInfo: The base item info
|
|
31
|
-
* @param {UserSession} destAuthentication Credentials for requests to the destination organization
|
|
32
|
-
* @param {UserSession} srcAuthentication Credentials for requests to source items
|
|
33
|
-
* @param {any} templateDictionary Hash of facts: folder id, org URL, adlib replacements
|
|
34
|
-
* @returns {Promise<IItemTemplate>}
|
|
35
|
-
*/
|
|
36
|
-
function convertItemToTemplate(itemInfo, destAuthentication, srcAuthentication, templateDictionary) {
|
|
37
|
-
// Delegate to simple types
|
|
38
|
-
return solution_simple_types_1.simpleTypes.convertItemToTemplate(itemInfo, destAuthentication, srcAuthentication, templateDictionary);
|
|
39
|
-
}
|
|
40
|
-
exports.convertItemToTemplate = convertItemToTemplate;
|
|
41
|
-
/**
|
|
42
|
-
* Creates a Web Tool Geoprocessing item from a template
|
|
43
|
-
*
|
|
44
|
-
* @param {IItemTemplate} template The template
|
|
45
|
-
* @param {any} templateDictionary The template dictionary
|
|
46
|
-
* @param {UserSession} destinationAuthentication The destination user session info
|
|
47
|
-
* @param itemProgressCallback An item progress callback
|
|
48
|
-
* @returns {Promise<ICreateItemFromTemplateResponse>}
|
|
49
|
-
*/
|
|
50
|
-
function createItemFromTemplate(template, templateDictionary, destinationAuthentication, itemProgressCallback) {
|
|
51
|
-
return new Promise((resolve) => {
|
|
52
|
-
// Interrupt process if progress callback returns `false`
|
|
53
|
-
if (!itemProgressCallback(template.itemId, common.EItemProgressStatus.Started, 0)) {
|
|
54
|
-
itemProgressCallback(template.itemId, common.EItemProgressStatus.Ignored, 0);
|
|
55
|
-
resolve(common.generateEmptyCreationResponse(template.type));
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
// Replace the templatized symbols in a copy of the template
|
|
59
|
-
let newItemTemplate = common.cloneObject(template);
|
|
60
|
-
newItemTemplate = common.replaceInTemplate(newItemTemplate, templateDictionary);
|
|
61
|
-
if (template.item.thumbnail) {
|
|
62
|
-
newItemTemplate.item.thumbnail = template.item.thumbnail;
|
|
63
|
-
}
|
|
64
|
-
createWebTool(newItemTemplate, templateDictionary, destinationAuthentication).then((createResponse) => {
|
|
65
|
-
// Interrupt process if progress callback returns `false`
|
|
66
|
-
if (!itemProgressCallback(template.itemId, common.EItemProgressStatus.Created, template.estimatedDeploymentCostFactor / 2, createResponse.itemId)) {
|
|
67
|
-
itemProgressCallback(template.itemId, common.EItemProgressStatus.Cancelled, 0);
|
|
68
|
-
common.removeItem(createResponse.itemId, destinationAuthentication).then(() => resolve(common.generateEmptyCreationResponse(template.type)), () => resolve(common.generateEmptyCreationResponse(template.type)));
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
// Add the new item to the settings
|
|
72
|
-
templateDictionary[template.itemId] = {
|
|
73
|
-
itemId: createResponse.itemId,
|
|
74
|
-
itemUrl: templateDictionary["portalBaseUrl"] +
|
|
75
|
-
"/sharing/rest/content/items/" +
|
|
76
|
-
createResponse.itemId,
|
|
77
|
-
};
|
|
78
|
-
newItemTemplate.itemId = createResponse.itemId;
|
|
79
|
-
newItemTemplate.item.id = createResponse.itemId;
|
|
80
|
-
newItemTemplate.data = {};
|
|
81
|
-
delete newItemTemplate.item.thumbnail;
|
|
82
|
-
moveToFolder(newItemTemplate.itemId, templateDictionary, destinationAuthentication).then(() => {
|
|
83
|
-
// get the GPServer url from the webtoolService.json resource
|
|
84
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
85
|
-
common
|
|
86
|
-
.getItemResourcesFiles(createResponse.itemId, destinationAuthentication)
|
|
87
|
-
.then((resourcesResponse) => {
|
|
88
|
-
let webtoolServicePromise = Promise.resolve();
|
|
89
|
-
resourcesResponse.some((v) => {
|
|
90
|
-
if (v.name === "webtoolService.json") {
|
|
91
|
-
webtoolServicePromise = common.blobToJson(v);
|
|
92
|
-
return true;
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
96
|
-
webtoolServicePromise.then((webtoolServiceResponse) => {
|
|
97
|
-
templateDictionary[template.itemId].url = webtoolServiceResponse?.serviceUrl;
|
|
98
|
-
// Update the template again now that we have the new item id
|
|
99
|
-
newItemTemplate = common.replaceInTemplate(newItemTemplate, templateDictionary);
|
|
100
|
-
// Update the item with snippet, description, popupInfo, etc.
|
|
101
|
-
common
|
|
102
|
-
.updateItemExtended({
|
|
103
|
-
...newItemTemplate.item,
|
|
104
|
-
}, newItemTemplate.data, destinationAuthentication, template.item.thumbnail, undefined, templateDictionary)
|
|
105
|
-
.then(() => {
|
|
106
|
-
// Interrupt process if progress callback returns `false`
|
|
107
|
-
if (!itemProgressCallback(template.itemId, common.EItemProgressStatus.Finished, template.estimatedDeploymentCostFactor / 2, createResponse.itemId)) {
|
|
108
|
-
itemProgressCallback(template.itemId, common.EItemProgressStatus.Cancelled, 0);
|
|
109
|
-
common.removeItem(createResponse.itemId, destinationAuthentication).then(() => resolve(common.generateEmptyCreationResponse(template.type)), () => resolve(common.generateEmptyCreationResponse(template.type)));
|
|
110
|
-
}
|
|
111
|
-
else {
|
|
112
|
-
// Update the template to match what we've stored in AGO
|
|
113
|
-
common.getItemBase(newItemTemplate.itemId, destinationAuthentication).then((updatedItem) => {
|
|
114
|
-
newItemTemplate.item = updatedItem;
|
|
115
|
-
resolve({
|
|
116
|
-
item: newItemTemplate,
|
|
117
|
-
id: createResponse.itemId,
|
|
118
|
-
type: newItemTemplate.type,
|
|
119
|
-
postProcess: false,
|
|
120
|
-
});
|
|
121
|
-
}, () => {
|
|
122
|
-
itemProgressCallback(template.itemId, common.EItemProgressStatus.Failed, 0);
|
|
123
|
-
common.removeItem(createResponse.itemId, destinationAuthentication).then(() => resolve(common.generateEmptyCreationResponse(template.type)), () => resolve(common.generateEmptyCreationResponse(template.type)));
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
}, () => {
|
|
127
|
-
itemProgressCallback(template.itemId, common.EItemProgressStatus.Failed, 0);
|
|
128
|
-
common.removeItem(createResponse.itemId, destinationAuthentication).then(() => resolve(common.generateEmptyCreationResponse(template.type)), () => resolve(common.generateEmptyCreationResponse(template.type)));
|
|
129
|
-
});
|
|
130
|
-
});
|
|
131
|
-
});
|
|
132
|
-
}, () => {
|
|
133
|
-
itemProgressCallback(template.itemId, common.EItemProgressStatus.Failed, 0);
|
|
134
|
-
common.removeItem(createResponse.itemId, destinationAuthentication).then(() => resolve(common.generateEmptyCreationResponse(template.type)), () => resolve(common.generateEmptyCreationResponse(template.type)));
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
}, () => {
|
|
138
|
-
itemProgressCallback(template.itemId, common.EItemProgressStatus.Failed, 0);
|
|
139
|
-
resolve(common.generateEmptyCreationResponse(template.type)); // fails to create item
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
exports.createItemFromTemplate = createItemFromTemplate;
|
|
145
|
-
/**
|
|
146
|
-
* Get the urls available on the portal self.
|
|
147
|
-
*
|
|
148
|
-
* @param {IItemTemplate} template The template
|
|
149
|
-
* @param {any} templateDictionary The template dictionary
|
|
150
|
-
* @param {UserSession} destinationAuthentication The destination user session info
|
|
151
|
-
* @returns List of http and https helper urls
|
|
152
|
-
*/
|
|
153
|
-
function createWebTool(template, templateDictionary, destinationAuthentication) {
|
|
154
|
-
return new Promise((resolve, reject) => {
|
|
155
|
-
getNotebookServerCreateServiceURL(templateDictionary.portalBaseUrl, destinationAuthentication, templateDictionary).then((url) => {
|
|
156
|
-
if (url) {
|
|
157
|
-
const params = {
|
|
158
|
-
serviceProperties: {
|
|
159
|
-
description: template.item.description,
|
|
160
|
-
provider: "notebooks",
|
|
161
|
-
type: "GPServer",
|
|
162
|
-
jsonProperties: {
|
|
163
|
-
timeoutInMinutes: template.data.timeoutInMinutes,
|
|
164
|
-
title: template.item.title,
|
|
165
|
-
notebookId: template.data.notebookId,
|
|
166
|
-
tasks: [
|
|
167
|
-
{
|
|
168
|
-
type: "notebook",
|
|
169
|
-
name: template.data.name,
|
|
170
|
-
},
|
|
171
|
-
],
|
|
172
|
-
},
|
|
173
|
-
},
|
|
174
|
-
};
|
|
175
|
-
const requestOptions = {
|
|
176
|
-
httpMethod: "POST",
|
|
177
|
-
authentication: destinationAuthentication,
|
|
178
|
-
params,
|
|
179
|
-
headers: {
|
|
180
|
-
"Accept": "application/json",
|
|
181
|
-
"Authorization": `Bearer ${destinationAuthentication.token}`,
|
|
182
|
-
"Content-Type": "application/json",
|
|
183
|
-
"X-Esri-Authorization": `Bearer ${destinationAuthentication.token}`,
|
|
184
|
-
},
|
|
185
|
-
};
|
|
186
|
-
common.request(url, requestOptions).then((response) => {
|
|
187
|
-
resolve(response);
|
|
188
|
-
}, (e) => {
|
|
189
|
-
reject(e);
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
else {
|
|
193
|
-
reject();
|
|
194
|
-
}
|
|
195
|
-
}, (e) => {
|
|
196
|
-
reject(e);
|
|
197
|
-
});
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
exports.createWebTool = createWebTool;
|
|
201
|
-
/**
|
|
202
|
-
* Get the URL for the Notebook server in Enterprise.
|
|
203
|
-
*
|
|
204
|
-
* @param portalBaseUrl URL of the portal endpoint, e.g., "https://gisserver.domain.com/server"
|
|
205
|
-
* @param authentication Credentials for the request to AGO
|
|
206
|
-
* @returns URL for the Notebook server Enterprise application (e.g., "https://abc123.esri.com:6443/gis"),
|
|
207
|
-
* or an empty string if Notebook server is not installed
|
|
208
|
-
*/
|
|
209
|
-
async function getNotebookServerCreateServiceURL(portalBaseUrl, authentication, templateDictionary) {
|
|
210
|
-
const notebookUrl = templateDictionary.isPortal
|
|
211
|
-
? await getNotebookEnterpriseServerRootURL(portalBaseUrl, authentication)
|
|
212
|
-
: templateDictionary.portalUrls?.notebooks.https.length > 0
|
|
213
|
-
? templateDictionary.portalUrls.notebooks.https[0]
|
|
214
|
-
: "";
|
|
215
|
-
return notebookUrl && templateDictionary.isPortal
|
|
216
|
-
? `${notebookUrl}/admin/services/createService?f=json&request.preventCache=${Date.now()}`
|
|
217
|
-
: notebookUrl
|
|
218
|
-
? `https://${notebookUrl}/admin/services/createService?f=json&request.preventCache=${Date.now()}`
|
|
219
|
-
: "";
|
|
220
|
-
}
|
|
221
|
-
exports.getNotebookServerCreateServiceURL = getNotebookServerCreateServiceURL;
|
|
222
|
-
/**
|
|
223
|
-
* Get the URL for the Notebook server in Enterprise.
|
|
224
|
-
*
|
|
225
|
-
* @param portalBaseUrl URL of the portal endpoint, e.g., "https://gisserver.domain.com/server"
|
|
226
|
-
* @param authentication Credentials for the request to AGO
|
|
227
|
-
* @returns URL for the Notebook server Enterprise application (e.g., "https://abc123.esri.com:6443/gis"),
|
|
228
|
-
* or an empty string if Notebook server is not installed
|
|
229
|
-
*/
|
|
230
|
-
async function getNotebookEnterpriseServerRootURL(portalBaseUrl, authentication) {
|
|
231
|
-
// Get the servers
|
|
232
|
-
const servers = await common.getEnterpriseServers(`${portalBaseUrl}/sharing/rest`, authentication);
|
|
233
|
-
// Find the Notebook server
|
|
234
|
-
const notebookServer = servers.find((s) => s.serverFunction.indexOf("NotebookServer") > -1);
|
|
235
|
-
if (!notebookServer) {
|
|
236
|
-
return "";
|
|
237
|
-
}
|
|
238
|
-
return notebookServer.url;
|
|
239
|
-
}
|
|
240
|
-
exports.getNotebookEnterpriseServerRootURL = getNotebookEnterpriseServerRootURL;
|
|
241
|
-
/**
|
|
242
|
-
* Move the web tool to the solution folder on enterprise.
|
|
243
|
-
* This will happen automatically for Online.
|
|
244
|
-
*
|
|
245
|
-
* @param {string} itemId The webtools item id
|
|
246
|
-
* @param {any} templateDictionary The template dictionary
|
|
247
|
-
* @param {UserSession} destinationAuthentication The destination user session info
|
|
248
|
-
* @returns a promise that will resolve when the move is complete
|
|
249
|
-
*/
|
|
250
|
-
async function moveToFolder(itemId, templateDictionary, destinationAuthentication) {
|
|
251
|
-
if (templateDictionary.isPortal) {
|
|
252
|
-
const moveResult = await common.moveItemToFolder(itemId, templateDictionary.folderId, destinationAuthentication);
|
|
253
|
-
const hasFailure = !moveResult.success;
|
|
254
|
-
if (hasFailure) {
|
|
255
|
-
return Promise.reject("Failed to move webTool item");
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
return Promise.resolve();
|
|
259
|
-
}
|
|
260
|
-
exports.moveToFolder = moveToFolder;
|
|
261
|
-
//# sourceMappingURL=web-tool-processor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"web-tool-processor.js","sourceRoot":"","sources":["../../src/web-tool-processor.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;AAEH;;;;GAIG;AAEH,sEAAgD;AAChD,uEAA0D;AAE1D;;;;;;;;GAQG;AACH,SAAgB,qBAAqB,CACnC,QAAa,EACb,kBAAsC,EACtC,iBAAqC,EACrC,kBAAuB;IAEvB,2BAA2B;IAC3B,OAAO,mCAAW,CAAC,qBAAqB,CAAC,QAAQ,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,kBAAkB,CAAC,CAAC;AAChH,CAAC;AARD,sDAQC;AAED;;;;;;;;GAQG;AACH,SAAgB,sBAAsB,CACpC,QAA8B,EAC9B,kBAAuB,EACvB,yBAA6C,EAC7C,oBAAkD;IAElD,OAA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
* 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
|
-
* Manages the creation and deployment of web tool geoprocessing service item types.
|
|
18
|
-
*
|
|
19
|
-
* @module solution-web-tool
|
|
20
|
-
*/
|
|
21
|
-
import * as WebToolProcessor from "./web-tool-processor";
|
|
22
|
-
export { WebToolProcessor };
|
package/dist/esm/index.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** @license
|
|
2
|
-
* Copyright 2024 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
|
-
* Manages the creation and deployment of web tool geoprocessing service item types.
|
|
18
|
-
*
|
|
19
|
-
* @module solution-web-tool
|
|
20
|
-
*/
|
|
21
|
-
import * as WebToolProcessor from "./web-tool-processor";
|
|
22
|
-
export { WebToolProcessor };
|
|
23
|
-
//# 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;AACH,OAAO,KAAK,gBAAgB,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/** @license
|
|
2
|
-
* Copyright 2024 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
|
-
* Manages the creation and deployment of web-experience item types.
|
|
18
|
-
*
|
|
19
|
-
* @module solution-web-tool
|
|
20
|
-
*/
|
|
21
|
-
import * as common from "@esri/solution-common";
|
|
22
|
-
/**
|
|
23
|
-
* Creates a template from a Web Tool Geoprocessing item
|
|
24
|
-
*
|
|
25
|
-
* @param {any} itemInfo: The base item info
|
|
26
|
-
* @param {UserSession} destAuthentication Credentials for requests to the destination organization
|
|
27
|
-
* @param {UserSession} srcAuthentication Credentials for requests to source items
|
|
28
|
-
* @param {any} templateDictionary Hash of facts: folder id, org URL, adlib replacements
|
|
29
|
-
* @returns {Promise<IItemTemplate>}
|
|
30
|
-
*/
|
|
31
|
-
export declare function convertItemToTemplate(itemInfo: any, destAuthentication: common.UserSession, srcAuthentication: common.UserSession, templateDictionary: any): Promise<common.IItemTemplate>;
|
|
32
|
-
/**
|
|
33
|
-
* Creates a Web Tool Geoprocessing item from a template
|
|
34
|
-
*
|
|
35
|
-
* @param {IItemTemplate} template The template
|
|
36
|
-
* @param {any} templateDictionary The template dictionary
|
|
37
|
-
* @param {UserSession} destinationAuthentication The destination user session info
|
|
38
|
-
* @param itemProgressCallback An item progress callback
|
|
39
|
-
* @returns {Promise<ICreateItemFromTemplateResponse>}
|
|
40
|
-
*/
|
|
41
|
-
export declare function createItemFromTemplate(template: common.IItemTemplate, templateDictionary: any, destinationAuthentication: common.UserSession, itemProgressCallback: common.IItemProgressCallback): Promise<common.ICreateItemFromTemplateResponse>;
|
|
42
|
-
/**
|
|
43
|
-
* Get the urls available on the portal self.
|
|
44
|
-
*
|
|
45
|
-
* @param {IItemTemplate} template The template
|
|
46
|
-
* @param {any} templateDictionary The template dictionary
|
|
47
|
-
* @param {UserSession} destinationAuthentication The destination user session info
|
|
48
|
-
* @returns List of http and https helper urls
|
|
49
|
-
*/
|
|
50
|
-
export declare function createWebTool(template: common.IItemTemplate, templateDictionary: any, destinationAuthentication: common.UserSession): Promise<any>;
|
|
51
|
-
/**
|
|
52
|
-
* Get the URL for the Notebook server in Enterprise.
|
|
53
|
-
*
|
|
54
|
-
* @param portalBaseUrl URL of the portal endpoint, e.g., "https://gisserver.domain.com/server"
|
|
55
|
-
* @param authentication Credentials for the request to AGO
|
|
56
|
-
* @returns URL for the Notebook server Enterprise application (e.g., "https://abc123.esri.com:6443/gis"),
|
|
57
|
-
* or an empty string if Notebook server is not installed
|
|
58
|
-
*/
|
|
59
|
-
export declare function getNotebookServerCreateServiceURL(portalBaseUrl: string, authentication: common.UserSession, templateDictionary: any): Promise<string>;
|
|
60
|
-
/**
|
|
61
|
-
* Get the URL for the Notebook server in Enterprise.
|
|
62
|
-
*
|
|
63
|
-
* @param portalBaseUrl URL of the portal endpoint, e.g., "https://gisserver.domain.com/server"
|
|
64
|
-
* @param authentication Credentials for the request to AGO
|
|
65
|
-
* @returns URL for the Notebook server Enterprise application (e.g., "https://abc123.esri.com:6443/gis"),
|
|
66
|
-
* or an empty string if Notebook server is not installed
|
|
67
|
-
*/
|
|
68
|
-
export declare function getNotebookEnterpriseServerRootURL(portalBaseUrl: string, authentication: common.UserSession): Promise<string>;
|
|
69
|
-
/**
|
|
70
|
-
* Move the web tool to the solution folder on enterprise.
|
|
71
|
-
* This will happen automatically for Online.
|
|
72
|
-
*
|
|
73
|
-
* @param {string} itemId The webtools item id
|
|
74
|
-
* @param {any} templateDictionary The template dictionary
|
|
75
|
-
* @param {UserSession} destinationAuthentication The destination user session info
|
|
76
|
-
* @returns a promise that will resolve when the move is complete
|
|
77
|
-
*/
|
|
78
|
-
export declare function moveToFolder(itemId: string, templateDictionary: any, destinationAuthentication: common.UserSession): Promise<void>;
|
|
@@ -1,251 +0,0 @@
|
|
|
1
|
-
/** @license
|
|
2
|
-
* Copyright 2024 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
|
-
* Manages the creation and deployment of web-experience item types.
|
|
18
|
-
*
|
|
19
|
-
* @module solution-web-tool
|
|
20
|
-
*/
|
|
21
|
-
import * as common from "@esri/solution-common";
|
|
22
|
-
import { simpleTypes } from "@esri/solution-simple-types";
|
|
23
|
-
/**
|
|
24
|
-
* Creates a template from a Web Tool Geoprocessing item
|
|
25
|
-
*
|
|
26
|
-
* @param {any} itemInfo: The base item info
|
|
27
|
-
* @param {UserSession} destAuthentication Credentials for requests to the destination organization
|
|
28
|
-
* @param {UserSession} srcAuthentication Credentials for requests to source items
|
|
29
|
-
* @param {any} templateDictionary Hash of facts: folder id, org URL, adlib replacements
|
|
30
|
-
* @returns {Promise<IItemTemplate>}
|
|
31
|
-
*/
|
|
32
|
-
export function convertItemToTemplate(itemInfo, destAuthentication, srcAuthentication, templateDictionary) {
|
|
33
|
-
// Delegate to simple types
|
|
34
|
-
return simpleTypes.convertItemToTemplate(itemInfo, destAuthentication, srcAuthentication, templateDictionary);
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Creates a Web Tool Geoprocessing item from a template
|
|
38
|
-
*
|
|
39
|
-
* @param {IItemTemplate} template The template
|
|
40
|
-
* @param {any} templateDictionary The template dictionary
|
|
41
|
-
* @param {UserSession} destinationAuthentication The destination user session info
|
|
42
|
-
* @param itemProgressCallback An item progress callback
|
|
43
|
-
* @returns {Promise<ICreateItemFromTemplateResponse>}
|
|
44
|
-
*/
|
|
45
|
-
export function createItemFromTemplate(template, templateDictionary, destinationAuthentication, itemProgressCallback) {
|
|
46
|
-
return new Promise((resolve) => {
|
|
47
|
-
// Interrupt process if progress callback returns `false`
|
|
48
|
-
if (!itemProgressCallback(template.itemId, common.EItemProgressStatus.Started, 0)) {
|
|
49
|
-
itemProgressCallback(template.itemId, common.EItemProgressStatus.Ignored, 0);
|
|
50
|
-
resolve(common.generateEmptyCreationResponse(template.type));
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
// Replace the templatized symbols in a copy of the template
|
|
54
|
-
let newItemTemplate = common.cloneObject(template);
|
|
55
|
-
newItemTemplate = common.replaceInTemplate(newItemTemplate, templateDictionary);
|
|
56
|
-
if (template.item.thumbnail) {
|
|
57
|
-
newItemTemplate.item.thumbnail = template.item.thumbnail;
|
|
58
|
-
}
|
|
59
|
-
createWebTool(newItemTemplate, templateDictionary, destinationAuthentication).then((createResponse) => {
|
|
60
|
-
// Interrupt process if progress callback returns `false`
|
|
61
|
-
if (!itemProgressCallback(template.itemId, common.EItemProgressStatus.Created, template.estimatedDeploymentCostFactor / 2, createResponse.itemId)) {
|
|
62
|
-
itemProgressCallback(template.itemId, common.EItemProgressStatus.Cancelled, 0);
|
|
63
|
-
common.removeItem(createResponse.itemId, destinationAuthentication).then(() => resolve(common.generateEmptyCreationResponse(template.type)), () => resolve(common.generateEmptyCreationResponse(template.type)));
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
// Add the new item to the settings
|
|
67
|
-
templateDictionary[template.itemId] = {
|
|
68
|
-
itemId: createResponse.itemId,
|
|
69
|
-
itemUrl: templateDictionary["portalBaseUrl"] +
|
|
70
|
-
"/sharing/rest/content/items/" +
|
|
71
|
-
createResponse.itemId,
|
|
72
|
-
};
|
|
73
|
-
newItemTemplate.itemId = createResponse.itemId;
|
|
74
|
-
newItemTemplate.item.id = createResponse.itemId;
|
|
75
|
-
newItemTemplate.data = {};
|
|
76
|
-
delete newItemTemplate.item.thumbnail;
|
|
77
|
-
moveToFolder(newItemTemplate.itemId, templateDictionary, destinationAuthentication).then(() => {
|
|
78
|
-
// get the GPServer url from the webtoolService.json resource
|
|
79
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
80
|
-
common
|
|
81
|
-
.getItemResourcesFiles(createResponse.itemId, destinationAuthentication)
|
|
82
|
-
.then((resourcesResponse) => {
|
|
83
|
-
let webtoolServicePromise = Promise.resolve();
|
|
84
|
-
resourcesResponse.some((v) => {
|
|
85
|
-
if (v.name === "webtoolService.json") {
|
|
86
|
-
webtoolServicePromise = common.blobToJson(v);
|
|
87
|
-
return true;
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
91
|
-
webtoolServicePromise.then((webtoolServiceResponse) => {
|
|
92
|
-
templateDictionary[template.itemId].url = webtoolServiceResponse?.serviceUrl;
|
|
93
|
-
// Update the template again now that we have the new item id
|
|
94
|
-
newItemTemplate = common.replaceInTemplate(newItemTemplate, templateDictionary);
|
|
95
|
-
// Update the item with snippet, description, popupInfo, etc.
|
|
96
|
-
common
|
|
97
|
-
.updateItemExtended({
|
|
98
|
-
...newItemTemplate.item,
|
|
99
|
-
}, newItemTemplate.data, destinationAuthentication, template.item.thumbnail, undefined, templateDictionary)
|
|
100
|
-
.then(() => {
|
|
101
|
-
// Interrupt process if progress callback returns `false`
|
|
102
|
-
if (!itemProgressCallback(template.itemId, common.EItemProgressStatus.Finished, template.estimatedDeploymentCostFactor / 2, createResponse.itemId)) {
|
|
103
|
-
itemProgressCallback(template.itemId, common.EItemProgressStatus.Cancelled, 0);
|
|
104
|
-
common.removeItem(createResponse.itemId, destinationAuthentication).then(() => resolve(common.generateEmptyCreationResponse(template.type)), () => resolve(common.generateEmptyCreationResponse(template.type)));
|
|
105
|
-
}
|
|
106
|
-
else {
|
|
107
|
-
// Update the template to match what we've stored in AGO
|
|
108
|
-
common.getItemBase(newItemTemplate.itemId, destinationAuthentication).then((updatedItem) => {
|
|
109
|
-
newItemTemplate.item = updatedItem;
|
|
110
|
-
resolve({
|
|
111
|
-
item: newItemTemplate,
|
|
112
|
-
id: createResponse.itemId,
|
|
113
|
-
type: newItemTemplate.type,
|
|
114
|
-
postProcess: false,
|
|
115
|
-
});
|
|
116
|
-
}, () => {
|
|
117
|
-
itemProgressCallback(template.itemId, common.EItemProgressStatus.Failed, 0);
|
|
118
|
-
common.removeItem(createResponse.itemId, destinationAuthentication).then(() => resolve(common.generateEmptyCreationResponse(template.type)), () => resolve(common.generateEmptyCreationResponse(template.type)));
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
}, () => {
|
|
122
|
-
itemProgressCallback(template.itemId, common.EItemProgressStatus.Failed, 0);
|
|
123
|
-
common.removeItem(createResponse.itemId, destinationAuthentication).then(() => resolve(common.generateEmptyCreationResponse(template.type)), () => resolve(common.generateEmptyCreationResponse(template.type)));
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
}, () => {
|
|
128
|
-
itemProgressCallback(template.itemId, common.EItemProgressStatus.Failed, 0);
|
|
129
|
-
common.removeItem(createResponse.itemId, destinationAuthentication).then(() => resolve(common.generateEmptyCreationResponse(template.type)), () => resolve(common.generateEmptyCreationResponse(template.type)));
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
}, () => {
|
|
133
|
-
itemProgressCallback(template.itemId, common.EItemProgressStatus.Failed, 0);
|
|
134
|
-
resolve(common.generateEmptyCreationResponse(template.type)); // fails to create item
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Get the urls available on the portal self.
|
|
141
|
-
*
|
|
142
|
-
* @param {IItemTemplate} template The template
|
|
143
|
-
* @param {any} templateDictionary The template dictionary
|
|
144
|
-
* @param {UserSession} destinationAuthentication The destination user session info
|
|
145
|
-
* @returns List of http and https helper urls
|
|
146
|
-
*/
|
|
147
|
-
export function createWebTool(template, templateDictionary, destinationAuthentication) {
|
|
148
|
-
return new Promise((resolve, reject) => {
|
|
149
|
-
getNotebookServerCreateServiceURL(templateDictionary.portalBaseUrl, destinationAuthentication, templateDictionary).then((url) => {
|
|
150
|
-
if (url) {
|
|
151
|
-
const params = {
|
|
152
|
-
serviceProperties: {
|
|
153
|
-
description: template.item.description,
|
|
154
|
-
provider: "notebooks",
|
|
155
|
-
type: "GPServer",
|
|
156
|
-
jsonProperties: {
|
|
157
|
-
timeoutInMinutes: template.data.timeoutInMinutes,
|
|
158
|
-
title: template.item.title,
|
|
159
|
-
notebookId: template.data.notebookId,
|
|
160
|
-
tasks: [
|
|
161
|
-
{
|
|
162
|
-
type: "notebook",
|
|
163
|
-
name: template.data.name,
|
|
164
|
-
},
|
|
165
|
-
],
|
|
166
|
-
},
|
|
167
|
-
},
|
|
168
|
-
};
|
|
169
|
-
const requestOptions = {
|
|
170
|
-
httpMethod: "POST",
|
|
171
|
-
authentication: destinationAuthentication,
|
|
172
|
-
params,
|
|
173
|
-
headers: {
|
|
174
|
-
"Accept": "application/json",
|
|
175
|
-
"Authorization": `Bearer ${destinationAuthentication.token}`,
|
|
176
|
-
"Content-Type": "application/json",
|
|
177
|
-
"X-Esri-Authorization": `Bearer ${destinationAuthentication.token}`,
|
|
178
|
-
},
|
|
179
|
-
};
|
|
180
|
-
common.request(url, requestOptions).then((response) => {
|
|
181
|
-
resolve(response);
|
|
182
|
-
}, (e) => {
|
|
183
|
-
reject(e);
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
else {
|
|
187
|
-
reject();
|
|
188
|
-
}
|
|
189
|
-
}, (e) => {
|
|
190
|
-
reject(e);
|
|
191
|
-
});
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* Get the URL for the Notebook server in Enterprise.
|
|
196
|
-
*
|
|
197
|
-
* @param portalBaseUrl URL of the portal endpoint, e.g., "https://gisserver.domain.com/server"
|
|
198
|
-
* @param authentication Credentials for the request to AGO
|
|
199
|
-
* @returns URL for the Notebook server Enterprise application (e.g., "https://abc123.esri.com:6443/gis"),
|
|
200
|
-
* or an empty string if Notebook server is not installed
|
|
201
|
-
*/
|
|
202
|
-
export async function getNotebookServerCreateServiceURL(portalBaseUrl, authentication, templateDictionary) {
|
|
203
|
-
const notebookUrl = templateDictionary.isPortal
|
|
204
|
-
? await getNotebookEnterpriseServerRootURL(portalBaseUrl, authentication)
|
|
205
|
-
: templateDictionary.portalUrls?.notebooks.https.length > 0
|
|
206
|
-
? templateDictionary.portalUrls.notebooks.https[0]
|
|
207
|
-
: "";
|
|
208
|
-
return notebookUrl && templateDictionary.isPortal
|
|
209
|
-
? `${notebookUrl}/admin/services/createService?f=json&request.preventCache=${Date.now()}`
|
|
210
|
-
: notebookUrl
|
|
211
|
-
? `https://${notebookUrl}/admin/services/createService?f=json&request.preventCache=${Date.now()}`
|
|
212
|
-
: "";
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* Get the URL for the Notebook server in Enterprise.
|
|
216
|
-
*
|
|
217
|
-
* @param portalBaseUrl URL of the portal endpoint, e.g., "https://gisserver.domain.com/server"
|
|
218
|
-
* @param authentication Credentials for the request to AGO
|
|
219
|
-
* @returns URL for the Notebook server Enterprise application (e.g., "https://abc123.esri.com:6443/gis"),
|
|
220
|
-
* or an empty string if Notebook server is not installed
|
|
221
|
-
*/
|
|
222
|
-
export async function getNotebookEnterpriseServerRootURL(portalBaseUrl, authentication) {
|
|
223
|
-
// Get the servers
|
|
224
|
-
const servers = await common.getEnterpriseServers(`${portalBaseUrl}/sharing/rest`, authentication);
|
|
225
|
-
// Find the Notebook server
|
|
226
|
-
const notebookServer = servers.find((s) => s.serverFunction.indexOf("NotebookServer") > -1);
|
|
227
|
-
if (!notebookServer) {
|
|
228
|
-
return "";
|
|
229
|
-
}
|
|
230
|
-
return notebookServer.url;
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* Move the web tool to the solution folder on enterprise.
|
|
234
|
-
* This will happen automatically for Online.
|
|
235
|
-
*
|
|
236
|
-
* @param {string} itemId The webtools item id
|
|
237
|
-
* @param {any} templateDictionary The template dictionary
|
|
238
|
-
* @param {UserSession} destinationAuthentication The destination user session info
|
|
239
|
-
* @returns a promise that will resolve when the move is complete
|
|
240
|
-
*/
|
|
241
|
-
export async function moveToFolder(itemId, templateDictionary, destinationAuthentication) {
|
|
242
|
-
if (templateDictionary.isPortal) {
|
|
243
|
-
const moveResult = await common.moveItemToFolder(itemId, templateDictionary.folderId, destinationAuthentication);
|
|
244
|
-
const hasFailure = !moveResult.success;
|
|
245
|
-
if (hasFailure) {
|
|
246
|
-
return Promise.reject("Failed to move webTool item");
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
return Promise.resolve();
|
|
250
|
-
}
|
|
251
|
-
//# sourceMappingURL=web-tool-processor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3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