@esri/solution-velocity 6.0.5-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.
Files changed (31) hide show
  1. package/package.json +3 -3
  2. package/dist/cjs/helpers/get-velocity-dependencies.d.ts +0 -57
  3. package/dist/cjs/helpers/get-velocity-dependencies.js +0 -120
  4. package/dist/cjs/helpers/get-velocity-dependencies.js.map +0 -1
  5. package/dist/cjs/helpers/velocity-helpers.d.ts +0 -244
  6. package/dist/cjs/helpers/velocity-helpers.js +0 -567
  7. package/dist/cjs/helpers/velocity-helpers.js.map +0 -1
  8. package/dist/cjs/helpers/velocity-templatize.d.ts +0 -71
  9. package/dist/cjs/helpers/velocity-templatize.js +0 -114
  10. package/dist/cjs/helpers/velocity-templatize.js.map +0 -1
  11. package/dist/cjs/index.d.ts +0 -17
  12. package/dist/cjs/index.js +0 -22
  13. package/dist/cjs/index.js.map +0 -1
  14. package/dist/cjs/velocity-processor.d.ts +0 -60
  15. package/dist/cjs/velocity-processor.js +0 -134
  16. package/dist/cjs/velocity-processor.js.map +0 -1
  17. package/dist/esm/helpers/get-velocity-dependencies.d.ts +0 -57
  18. package/dist/esm/helpers/get-velocity-dependencies.js +0 -113
  19. package/dist/esm/helpers/get-velocity-dependencies.js.map +0 -1
  20. package/dist/esm/helpers/velocity-helpers.d.ts +0 -244
  21. package/dist/esm/helpers/velocity-helpers.js +0 -545
  22. package/dist/esm/helpers/velocity-helpers.js.map +0 -1
  23. package/dist/esm/helpers/velocity-templatize.d.ts +0 -71
  24. package/dist/esm/helpers/velocity-templatize.js +0 -106
  25. package/dist/esm/helpers/velocity-templatize.js.map +0 -1
  26. package/dist/esm/index.d.ts +0 -17
  27. package/dist/esm/index.js +0 -18
  28. package/dist/esm/index.js.map +0 -1
  29. package/dist/esm/velocity-processor.d.ts +0 -60
  30. package/dist/esm/velocity-processor.js +0 -128
  31. package/dist/esm/velocity-processor.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/solution-velocity",
3
- "version": "6.0.5-alpha.0",
3
+ "version": "6.1.0-alpha.0",
4
4
  "description": "Manages the creation and deployment of Velocity item types for @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.5-alpha.0",
25
+ "@esri/solution-common": "^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": "fbecb9f8977e44ba6254f9b68b43292b3ab525ae"
72
+ "gitHead": "19cbc20f4da03baa4676b3fad82abcea533432c3"
73
73
  }
@@ -1,57 +0,0 @@
1
- /** @license
2
- * Copyright 2021 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
- import { IItemTemplate, UserSession } from "@esri/solution-common";
17
- /**
18
- * Get the dependencies from the velocity data sources, feeds, and outputs.
19
- * Only dependencies that do NOT have the typeKeyword "IoTFeatureLayer" are returned.
20
- *
21
- * @param template The template that for the velocity item
22
- * @param authentication The credentials for any requests
23
- *
24
- * @returns a list of dependency ids
25
- */
26
- export declare function getVelocityDependencies(template: IItemTemplate, authentication: UserSession): Promise<string[]>;
27
- /**
28
- * Any feature services with the typeKeyword "IoTFeatureLayer" should not be templatized or
29
- * listed as a dependency.
30
- * We can’t create Velocity feature layers in their spatiotemporal datastore as we have no api.
31
- *
32
- * @param dependencies Any dependencies that have been found for this item
33
- * @param authentication The credentials for any requests
34
- *
35
- * @returns a list of dependency ids
36
- * @private
37
- */
38
- export declare function _validateDependencies(dependencies: string[], authentication: UserSession): Promise<string[]>;
39
- /**
40
- * Get the dependencies from the velocity feeds
41
- * This function will update the input dependencies argument
42
- *
43
- * @param feeds The list of feeds from the velocity template
44
- * @param dependencies The current list of dependencies
45
- * @private
46
- */
47
- export declare function _getFeedDependencies(feeds: any[], dependencies: string[]): void;
48
- /**
49
- * Get the dependencies from the velocity outputs or dataSources.
50
- * This function will update the input dependencies argument
51
- *
52
- * @param outputs The list of outputs from the velocity item
53
- * @param dependencies The current list of dependencies
54
- * @param prop The individual prop to evaluate
55
- * @private
56
- */
57
- export declare function _getDependencies(outputs: any[], dependencies: string[]): void;
@@ -1,120 +0,0 @@
1
- "use strict";
2
- /** @license
3
- * Copyright 2021 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._getDependencies = exports._getFeedDependencies = exports._validateDependencies = exports.getVelocityDependencies = void 0;
19
- const solution_common_1 = require("@esri/solution-common");
20
- /**
21
- * Get the dependencies from the velocity data sources, feeds, and outputs.
22
- * Only dependencies that do NOT have the typeKeyword "IoTFeatureLayer" are returned.
23
- *
24
- * @param template The template that for the velocity item
25
- * @param authentication The credentials for any requests
26
- *
27
- * @returns a list of dependency ids
28
- */
29
- function getVelocityDependencies(template, authentication) {
30
- const dependencies = [];
31
- [
32
- (0, solution_common_1.getProp)(template, "data.feeds") ? template.data.feeds : [],
33
- (0, solution_common_1.getProp)(template, "data.feed") ? [template.data.feed] : [],
34
- ].forEach((f) => _getFeedDependencies(f, dependencies));
35
- [
36
- (0, solution_common_1.getProp)(template, "data.sources") ? template.data.sources : [],
37
- (0, solution_common_1.getProp)(template, "data.source") ? [template.data.source] : [],
38
- (0, solution_common_1.getProp)(template, "data.outputs") ? template.data.outputs : [],
39
- (0, solution_common_1.getProp)(template, "data.output") ? [template.data.output] : [],
40
- ].forEach((d) => _getDependencies(d, dependencies));
41
- return _validateDependencies(dependencies, authentication);
42
- }
43
- exports.getVelocityDependencies = getVelocityDependencies;
44
- /**
45
- * Any feature services with the typeKeyword "IoTFeatureLayer" should not be templatized or
46
- * listed as a dependency.
47
- * We can’t create Velocity feature layers in their spatiotemporal datastore as we have no api.
48
- *
49
- * @param dependencies Any dependencies that have been found for this item
50
- * @param authentication The credentials for any requests
51
- *
52
- * @returns a list of dependency ids
53
- * @private
54
- */
55
- function _validateDependencies(dependencies, authentication) {
56
- const defs = dependencies.map((d) => {
57
- return (0, solution_common_1.getItemBase)(d, authentication);
58
- });
59
- return Promise.all(defs).then((itemInfos) => {
60
- return Promise.resolve(itemInfos.reduce((prev, cur) => {
61
- if (cur.typeKeywords.indexOf("IoTFeatureLayer") < 0) {
62
- prev.push(cur.id);
63
- }
64
- return prev;
65
- }, []));
66
- });
67
- }
68
- exports._validateDependencies = _validateDependencies;
69
- /**
70
- * Get the dependencies from the velocity feeds
71
- * This function will update the input dependencies argument
72
- *
73
- * @param feeds The list of feeds from the velocity template
74
- * @param dependencies The current list of dependencies
75
- * @private
76
- */
77
- function _getFeedDependencies(feeds, dependencies) {
78
- feeds.reduce((prev, cur) => {
79
- const id = cur.id || undefined;
80
- /* istanbul ignore else */
81
- if (id && prev.indexOf(id) < 0) {
82
- prev.push(id);
83
- }
84
- return prev;
85
- }, dependencies);
86
- // run through standard dependency check as well
87
- // in some cases the feed does not have the id property but will have
88
- // a portalItemId value in the properties
89
- _getDependencies(feeds, dependencies);
90
- }
91
- exports._getFeedDependencies = _getFeedDependencies;
92
- /**
93
- * Get the dependencies from the velocity outputs or dataSources.
94
- * This function will update the input dependencies argument
95
- *
96
- * @param outputs The list of outputs from the velocity item
97
- * @param dependencies The current list of dependencies
98
- * @param prop The individual prop to evaluate
99
- * @private
100
- */
101
- function _getDependencies(outputs, dependencies) {
102
- outputs.reduce((prev, cur) => {
103
- const names = (0, solution_common_1.getProp)(cur, "name") ? [cur.name] : solution_common_1.BASE_NAMES;
104
- names.forEach((n) => {
105
- solution_common_1.PROP_NAMES.forEach((p) => {
106
- // skip map service and stream service ids
107
- /* istanbul ignore else */
108
- if (p.indexOf("mapServicePortalItemID") < 0 && p.indexOf("streamServicePortalItemID") < 0) {
109
- const id = cur.properties ? cur.properties[n + p] : undefined;
110
- if (id && prev.indexOf(id) < 0) {
111
- prev.push(id);
112
- }
113
- }
114
- });
115
- });
116
- return prev;
117
- }, dependencies);
118
- }
119
- exports._getDependencies = _getDependencies;
120
- //# sourceMappingURL=get-velocity-dependencies.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-velocity-dependencies.js","sourceRoot":"","sources":["../../../src/helpers/get-velocity-dependencies.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,2DAAiH;AAEjH;;;;;;;;GAQG;AACH,SAAgB,uBAAuB,CAAC,QAAuB,EAAE,cAA2B;IAC1F,MAAM,YAAY,GAAa,EAAE,CAAC;IAElC;QACE,IAAA,yBAAO,EAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;QAC1D,IAAA,yBAAO,EAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE;KAC3D,CAAC,OAAO,CAAC,CAAC,CAAC,EAA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AI,CAAC,CAAC,OAAO,CAAC,2BAA2B,CAAC,GAAG,CAAC,EAAE;oBACzF,MAAM,EAAE,GAAW,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;oBACtE,IAAI,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE;wBAC9B,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;qBACf;iBACF;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC,EAAE,YAAY,CAAC,CAAC;AACnB,CAAC;AAjBD,4CAiBC"}
@@ -1,244 +0,0 @@
1
- /** @license
2
- * Copyright 2021 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
- import { IItemTemplate, IVelocityTitle, UserSession } from "@esri/solution-common";
17
- /**
18
- * Common function to build urls for reading and interacting with the velocity api
19
- *
20
- *
21
- * @param authentication Credentials for the requests
22
- * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
23
- * @param type The type of velocity item we are constructing a url for
24
- * @param id Optional The id of the velocity item we are constructing a url for
25
- * @param isDeploy Optional Is this being constructed as a part of deployment
26
- * @param urlPrefix Optional prefix args necessary for some url construction
27
- * @param urlSuffix Optional suffix args necessary for some url construction
28
- *
29
- * @returns a promise that will resolve the constructed url
30
- *
31
- */
32
- export declare function getVelocityUrl(authentication: UserSession, templateDictionary: any, type: string, id?: string, isDeploy?: boolean, urlPrefix?: string, urlSuffix?: string): Promise<string>;
33
- /**
34
- * Handles the creation of velocity items.
35
- *
36
- * @param authentication Credentials for the requests
37
- * @param template The current itemTemplate that is being used for deployment
38
- * @param data The velocity item data used to create the items.
39
- * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
40
- * @param autoStart This can be leveraged to start certain velocity items after they are created.
41
- *
42
- * @returns a promise that will resolve an object containing the item, id, type, and post process flag
43
- *
44
- */
45
- export declare function postVelocityData(authentication: UserSession, template: IItemTemplate, data: any, templateDictionary: any, autoStart?: boolean): Promise<any>;
46
- /**
47
- * Velocity item titles must be unique across the organization.
48
- * Check and ensure we set a unique title
49
- *
50
- * @param authentication Credentials for the requests
51
- * @param label The current label of the item from the solution template
52
- * @param url The base velocity url for checking status
53
- *
54
- * @returns a promise that will resolve a unique title
55
- *
56
- */
57
- export declare function getTitle(authentication: UserSession, label: string, url: string): Promise<IVelocityTitle>;
58
- /**
59
- * Validate the data that will be used and handle any reported issues with the outputs.
60
- * The output names must be unique across the organization.
61
- *
62
- * This function will update the data arg that is passed in with a unique name.
63
- *
64
- * @param authentication Credentials for the requests
65
- * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
66
- * @param type The type of velocity item
67
- * @param data The data used to construct the velocity item
68
- * @param titles The list of know titles that exist in the org
69
- * @param dataOutputs The velocity items output objects
70
- * @param feeds The velocity items feed objects
71
- *
72
- * @returns a promise that will resolve the data object passed in with any necessary changes.
73
- *
74
- * @private
75
- */
76
- export declare function _validateOutputs(authentication: UserSession, templateDictionary: any, type: string, data: any, titles: any[], dataOutputs?: any[], feeds?: any[]): Promise<any>;
77
- /**
78
- * Check the validate results for any name conflicts and store the conflicting names.
79
- *
80
- * @param validateResults The results object to check for name conflict errors
81
- *
82
- * @returns a list of names that already exist in the org
83
- *
84
- * @private
85
- */
86
- export declare function _validateMessages(validateResults: any): string[];
87
- /**
88
- * Updates the feed object with a new name when validation fails.
89
- *
90
- * @param feeds The feed objects from the velocity item.
91
- * @param data The full data object used for deploying the velocity item.
92
- * @param names The names that failed due to duplicate error in validation.
93
- *
94
- * @private
95
- */
96
- export declare function _updateFeed(feeds: any[], data: any, names: string[]): void;
97
- /**
98
- * Updates the data object with a new name when validation fails.
99
- *
100
- * @param dataOutputs The data output objects from the velocity item.
101
- * @param data The full data object used for deploying the velocity item.
102
- * @param names The names that failed due to duplicate error in validation.
103
- *
104
- * @private
105
- */
106
- export declare function _updateDataOutput(dataOutputs: any[], data: any, names: string[]): void;
107
- /**
108
- * Get a unique label for the item.
109
- *
110
- * @param names The names that failed due to duplicate error in validation.
111
- * @param dataOutput The current data output that is being evaluated.
112
- *
113
- * @returns an object with a unique label and the outputs id when a name
114
- * conflict is found...otherwise returns undefined
115
- *
116
- * @private
117
- */
118
- export declare function _getOutputLabel(names: any[], dataOutput: any): any;
119
- /**
120
- * Will return the provided title if it does not exist as a property
121
- * in one of the objects at the defined path. Otherwise the title will
122
- * have a numerical value attached.
123
- *
124
- * This is based on "getUniqueTitle" from common but adds the "_" replacement check for velocity names.
125
- * Could switch to using common if Velocity has a way to get a list of all names that are already used.
126
- *
127
- * @param title The root title to test
128
- * @param templateDictionary Hash of the facts
129
- * @param path to the objects to evaluate for potantial name clashes
130
- *
131
- * @returns string The unique title to use
132
- *
133
- */
134
- export declare function getUniqueTitle(title: string, templateDictionary: any, path: string): string;
135
- /**
136
- * Start the item if validation passes and the item is executable.
137
- *
138
- * @param authentication Credentials for the requests
139
- * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
140
- * @param template the item template that has the details for deployment
141
- * @param id the new id for the velocity item that was deployed
142
- *
143
- * @returns a promise that will resolve with the validation results
144
- * or the start results when validation indicates the item is executable
145
- *
146
- * @private
147
- */
148
- export declare function _validateAndStart(authentication: UserSession, templateDictionary: any, template: IItemTemplate, id: string): Promise<any>;
149
- /**
150
- * Validate the velocity item.
151
- * Used to help find and handle duplicate name errors.
152
- *
153
- * @param authentication Credentials for the requests
154
- * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
155
- * @param type The type of velocity item we are constructing a url for
156
- * @param id? Optional The id of the velocity item we are constructing a url for
157
- * @param body? Optional the request body to validate.
158
- *
159
- * @returns a promise that will resolve with an object containing messages
160
- * indicating any issues found when validating such as name conflict errors
161
- *
162
- */
163
- export declare function validate(authentication: UserSession, templateDictionary: any, type: string, id?: string, body?: any): Promise<any>;
164
- /**
165
- * Start the given velocity item that has been deployed.
166
- *
167
- * @param authentication Credentials for the requests
168
- * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
169
- * @param type The type of velocity item we are constructing a url for
170
- * @param id? Optional The id of the velocity item we are constructing a url for
171
- *
172
- * @returns a promise that will resolve with the result of the start call
173
- *
174
- */
175
- export declare function start(authentication: UserSession, templateDictionary: any, type: string, id?: string): Promise<any>;
176
- /**
177
- * Gets the required request options for requests to the velocity API.
178
- *
179
- * @param authentication Credentials for the requests
180
- * @param method Indicate if "GET" or "POST"
181
- *
182
- * @returns generic request options used for various calls to velocity api
183
- *
184
- * @private
185
- */
186
- export declare function _getRequestOpts(authentication: UserSession, method: string): RequestInit;
187
- /**
188
- * Generic fetch function for making calls to the velocity API.
189
- *
190
- * @param authentication Credentials for the requests
191
- * @param url The url from the velocity API to handle reading and writing
192
- * @param method The method for the request "GET" or "POST"
193
- * @param body The body for POST requests
194
- *
195
- * @returns a promise that will resolve with the result of the fetch call
196
- *
197
- * @private
198
- */
199
- export declare function _fetch(authentication: UserSession, url: string, method: string, // GET or POST
200
- body?: any): Promise<any>;
201
- /**
202
- * Remove key properties if the dependency was removed due to having the "IoTFeatureLayer" typeKeyword
203
- * This function will update the input template.
204
- *
205
- * @param template The template that for the velocity item
206
- *
207
- */
208
- export declare function cleanDataSourcesAndFeeds(template: IItemTemplate, velocityUrl: string): void;
209
- /**
210
- * Remove key properties from the input source or feed
211
- *
212
- * @param sourcesOrFeeds The list of dataSources or feeds
213
- * @param dependencies The list of dependencies
214
- *
215
- * @private
216
- */
217
- export declare function _removeIdProps(sourcesOrFeeds: any[], dependencies: string[], velocityUrl: string): void;
218
- /**
219
- * Remove key properties from the outputs.
220
- *
221
- * @param outputs The list of outputs
222
- * @param dependencies The list of dependencies
223
- *
224
- * @private
225
- */
226
- export declare function _removeIdPropsAndSetName(outputs: any[], dependencies: string[]): void;
227
- /**
228
- * Generic helper function to remove key properties .
229
- *
230
- * @param props the list of props to update
231
- * @param prop the individual prop to remove
232
- * @param dependencies The list of dependencies
233
- *
234
- * @private
235
- */
236
- export declare function _removeProp(props: any, prop: string, dependencies: string[]): void;
237
- /**
238
- * Update the feature layer name to include the solution item id.
239
- *
240
- * @param props the list of props to update
241
- *
242
- * @private
243
- */
244
- export declare function _updateName(props: any): void;