@esri/solution-velocity 6.0.2-alpha.23 → 6.0.2-alpha.250423

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
@@ -1,567 +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._updateName = exports._removeProp = exports._removeIdPropsAndSetName = exports._removeIdProps = exports.cleanDataSourcesAndFeeds = exports._fetch = exports._getRequestOpts = exports.start = exports.validate = exports._validateAndStart = exports.getUniqueTitle = exports._getOutputLabel = exports._updateDataOutput = exports._updateFeed = exports._validateMessages = exports._validateOutputs = exports.getTitle = exports.postVelocityData = exports.getVelocityUrl = void 0;
19
- const solution_common_1 = require("@esri/solution-common");
20
- /**
21
- * Common function to build urls for reading and interacting with the velocity api
22
- *
23
- *
24
- * @param authentication Credentials for the requests
25
- * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
26
- * @param type The type of velocity item we are constructing a url for
27
- * @param id Optional The id of the velocity item we are constructing a url for
28
- * @param isDeploy Optional Is this being constructed as a part of deployment
29
- * @param urlPrefix Optional prefix args necessary for some url construction
30
- * @param urlSuffix Optional suffix args necessary for some url construction
31
- *
32
- * @returns a promise that will resolve the constructed url
33
- *
34
- */
35
- function getVelocityUrl(authentication, templateDictionary, type, id = "", isDeploy = false, urlPrefix = "", urlSuffix = "") {
36
- return (0, solution_common_1.getVelocityUrlBase)(authentication, templateDictionary).then((url) => {
37
- if (url) {
38
- const _type = type === "Real Time Analytic"
39
- ? "analytics/realtime"
40
- : type === "Big Data Analytic"
41
- ? "analytics/bigdata"
42
- : type.toLowerCase();
43
- const suffix = urlSuffix ? `/${urlSuffix}` : "";
44
- const prefix = urlPrefix ? `/${urlPrefix}` : "";
45
- return Promise.resolve(isDeploy
46
- ? `${url}/iot/${_type}${prefix}${suffix}`
47
- : id
48
- ? `${url}/iot/${_type}${prefix}/${id}${suffix}/?f=json&token=${authentication.token}`
49
- : `${url}/iot/${_type}${prefix}${suffix}/?f=json&token=${authentication.token}`);
50
- }
51
- else {
52
- return Promise.resolve(url);
53
- }
54
- });
55
- }
56
- exports.getVelocityUrl = getVelocityUrl;
57
- /**
58
- * Handles the creation of velocity items.
59
- *
60
- * @param authentication Credentials for the requests
61
- * @param template The current itemTemplate that is being used for deployment
62
- * @param data The velocity item data used to create the items.
63
- * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
64
- * @param autoStart This can be leveraged to start certain velocity items after they are created.
65
- *
66
- * @returns a promise that will resolve an object containing the item, id, type, and post process flag
67
- *
68
- */
69
- function postVelocityData(authentication, template, data, templateDictionary, autoStart = false) {
70
- return getVelocityUrl(authentication, templateDictionary, template.type, undefined, true).then((url) => {
71
- if (url) {
72
- return getTitle(authentication, data.label, url).then((titleInfo) => {
73
- const titles = titleInfo.titles;
74
- data.label = titleInfo.label;
75
- data.id = "";
76
- const body = (0, solution_common_1.replaceInTemplate)(data, templateDictionary);
77
- const dataOutputs = (data.outputs ? data.outputs : data.output ? [data.output] : []).map((o) => {
78
- return {
79
- id: o.id,
80
- name: o.properties[`${o.name}.name`],
81
- };
82
- });
83
- const feeds = (body.feeds ? body.feeds : body.feed ? [body.feed] : []).map((o) => {
84
- return {
85
- id: o.id ? o.id : o.properties[`${o.name}.portalItemId`] || "",
86
- name: o.label ? o.label : data.label,
87
- };
88
- });
89
- return _validateOutputs(authentication, templateDictionary, template.type, body, titles, dataOutputs, feeds).then((updatedBody) => {
90
- return _fetch(authentication, url, "POST", updatedBody).then((rr) => {
91
- template.item.url = `${url}/${rr.id}`;
92
- template.item.title = data.label;
93
- // Update the template dictionary
94
- templateDictionary[template.itemId]["url"] = template.item.url;
95
- templateDictionary[template.itemId]["label"] = data.label;
96
- templateDictionary[template.itemId]["itemId"] = rr.id;
97
- const finalResult = {
98
- item: (0, solution_common_1.replaceInTemplate)(template.item, templateDictionary),
99
- id: rr.id,
100
- type: template.type,
101
- postProcess: false,
102
- };
103
- if (autoStart) {
104
- return _validateAndStart(authentication, templateDictionary, template, rr.id).then(() => {
105
- return Promise.resolve(finalResult);
106
- });
107
- }
108
- else {
109
- return Promise.resolve(finalResult);
110
- }
111
- });
112
- });
113
- });
114
- }
115
- else {
116
- return Promise.reject((0, solution_common_1.fail)("Velocity NOT Supported by Organization"));
117
- }
118
- });
119
- }
120
- exports.postVelocityData = postVelocityData;
121
- /**
122
- * Velocity item titles must be unique across the organization.
123
- * Check and ensure we set a unique title
124
- *
125
- * @param authentication Credentials for the requests
126
- * @param label The current label of the item from the solution template
127
- * @param url The base velocity url for checking status
128
- *
129
- * @returns a promise that will resolve a unique title
130
- *
131
- */
132
- function getTitle(authentication, label, url) {
133
- return _fetch(authentication, `${url}StatusList?view=admin`, "GET").then((items) => {
134
- const titles = items && Array.isArray(items)
135
- ? items.map((item) => {
136
- return { title: item.label };
137
- })
138
- : [];
139
- return Promise.resolve({ label: getUniqueTitle(label, { titles }, "titles"), titles: titles.map((t) => t.title) });
140
- });
141
- }
142
- exports.getTitle = getTitle;
143
- /**
144
- * Validate the data that will be used and handle any reported issues with the outputs.
145
- * The output names must be unique across the organization.
146
- *
147
- * This function will update the data arg that is passed in with a unique name.
148
- *
149
- * @param authentication Credentials for the requests
150
- * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
151
- * @param type The type of velocity item
152
- * @param data The data used to construct the velocity item
153
- * @param titles The list of know titles that exist in the org
154
- * @param dataOutputs The velocity items output objects
155
- * @param feeds The velocity items feed objects
156
- *
157
- * @returns a promise that will resolve the data object passed in with any necessary changes.
158
- *
159
- * @private
160
- */
161
- function _validateOutputs(authentication, templateDictionary, type, data, titles, dataOutputs = [], feeds = []) {
162
- if (dataOutputs.length > 0 || feeds.length > 0) {
163
- return validate(authentication, templateDictionary, type, "", data).then((validateResults) => {
164
- const names = _validateMessages(validateResults);
165
- if (names.length > 0) {
166
- /* istanbul ignore else */
167
- if (dataOutputs.length > 0) {
168
- _updateDataOutput(dataOutputs, data, names);
169
- }
170
- /* istanbul ignore else */
171
- if (feeds.length > 0) {
172
- _updateFeed(feeds, data, names.concat(titles));
173
- }
174
- return _validateOutputs(authentication, templateDictionary, type, data, titles, dataOutputs, feeds);
175
- }
176
- else {
177
- return Promise.resolve(data);
178
- }
179
- });
180
- }
181
- else {
182
- return Promise.resolve(data);
183
- }
184
- }
185
- exports._validateOutputs = _validateOutputs;
186
- /**
187
- * Check the validate results for any name conflicts and store the conflicting names.
188
- *
189
- * @param validateResults The results object to check for name conflict errors
190
- *
191
- * @returns a list of names that already exist in the org
192
- *
193
- * @private
194
- */
195
- function _validateMessages(validateResults) {
196
- let messages = (0, solution_common_1.getProp)(validateResults, "validation.messages");
197
- const nodes = (0, solution_common_1.getProp)(validateResults, "nodes");
198
- /* istanbul ignore else */
199
- if (nodes && Array.isArray(nodes)) {
200
- nodes.forEach((node) => {
201
- messages = messages.concat((0, solution_common_1.getProp)(node, "validation.messages") || []);
202
- });
203
- }
204
- let names = [];
205
- /* istanbul ignore else */
206
- if (messages && Array.isArray(messages)) {
207
- messages.forEach((message) => {
208
- // I don't see a way to ask for all output names that exist
209
- // velocityUrl + /outputs/ just gives you generic defaults not what currently exists
210
- const nameErrors = [
211
- "VALIDATION_ANALYTICS__MULTIPLE_CREATE_FEATURE_LAYER_OUTPUTS_REFERENCE_SAME_LAYER_NAME",
212
- "VALIDATION_ANALYTICS__MULTIPLE_CREATE_STREAM_LAYER_OUTPUTS_REFERENCE_SAME_LAYER_NAME",
213
- "ITEM_MANAGER__CREATE_ANALYTIC_FAILED_DUPLICATE_OUTPUT_NAMES_IN_ORGANIZATION_NOT_ALLOWED",
214
- "ITEM_MANAGER__CREATE_BIG_DATA_ANALYTIC_FAILED_DUPLICATE_NAMES_NOT_ALLOWED",
215
- "ITEM_MANAGER__CREATE_REAL_TIME_ANALYTIC_FAILED_DUPLICATE_NAMES_NOT_ALLOWED",
216
- "ITEM_MANAGER__CREATE_FEED_FAILED_DUPLICATE_NAME",
217
- ];
218
- // The names returned here seem to replace " " with "_" so they do not match exactly
219
- /* istanbul ignore else */
220
- if (nameErrors.indexOf(message.key) > -1) {
221
- names = names.concat(message.args);
222
- }
223
- });
224
- }
225
- return names;
226
- }
227
- exports._validateMessages = _validateMessages;
228
- /**
229
- * Updates the feed object with a new name when validation fails.
230
- *
231
- * @param feeds The feed objects from the velocity item.
232
- * @param data The full data object used for deploying the velocity item.
233
- * @param names The names that failed due to duplicate error in validation.
234
- *
235
- * @private
236
- */
237
- function _updateFeed(feeds, data, names) {
238
- feeds.forEach((f) => {
239
- const update = _getOutputLabel(names, f);
240
- /* istanbul ignore else */
241
- if (update) {
242
- data.label = update.label;
243
- f.name = update.label;
244
- }
245
- });
246
- }
247
- exports._updateFeed = _updateFeed;
248
- /**
249
- * Updates the data object with a new name when validation fails.
250
- *
251
- * @param dataOutputs The data output objects from the velocity item.
252
- * @param data The full data object used for deploying the velocity item.
253
- * @param names The names that failed due to duplicate error in validation.
254
- *
255
- * @private
256
- */
257
- function _updateDataOutput(dataOutputs, data, names) {
258
- dataOutputs.forEach((dataOutput) => {
259
- const update = _getOutputLabel(names, dataOutput);
260
- /* istanbul ignore else */
261
- if (update) {
262
- const _outputs = (data.outputs ? data.outputs : data.output ? [data.output] : []).map((_dataOutput) => {
263
- /* istanbul ignore else */
264
- if (_dataOutput.id === update.id) {
265
- /* istanbul ignore else */
266
- if (_dataOutput.properties) {
267
- const nameProp = `${_dataOutput.name}.name`;
268
- /* istanbul ignore else */
269
- if (Object.keys(_dataOutput.properties).indexOf(nameProp) > -1) {
270
- _dataOutput.properties[nameProp] = update.label;
271
- }
272
- }
273
- }
274
- return _dataOutput;
275
- });
276
- /* istanbul ignore else */
277
- if (data.outputs) {
278
- data.outputs = _outputs;
279
- }
280
- /* istanbul ignore else */
281
- if (data.output) {
282
- data.output = _outputs[0];
283
- }
284
- }
285
- });
286
- }
287
- exports._updateDataOutput = _updateDataOutput;
288
- /**
289
- * Get a unique label for the item.
290
- *
291
- * @param names The names that failed due to duplicate error in validation.
292
- * @param dataOutput The current data output that is being evaluated.
293
- *
294
- * @returns an object with a unique label and the outputs id when a name
295
- * conflict is found...otherwise returns undefined
296
- *
297
- * @private
298
- */
299
- function _getOutputLabel(names, dataOutput) {
300
- const titles = names.map((name) => {
301
- return { title: name };
302
- });
303
- const label = getUniqueTitle(dataOutput.name, { titles }, "titles");
304
- return label !== dataOutput.name
305
- ? {
306
- label,
307
- id: dataOutput.id,
308
- }
309
- : undefined;
310
- }
311
- exports._getOutputLabel = _getOutputLabel;
312
- /**
313
- * Will return the provided title if it does not exist as a property
314
- * in one of the objects at the defined path. Otherwise the title will
315
- * have a numerical value attached.
316
- *
317
- * This is based on "getUniqueTitle" from common but adds the "_" replacement check for velocity names.
318
- * Could switch to using common if Velocity has a way to get a list of all names that are already used.
319
- *
320
- * @param title The root title to test
321
- * @param templateDictionary Hash of the facts
322
- * @param path to the objects to evaluate for potantial name clashes
323
- *
324
- * @returns string The unique title to use
325
- *
326
- */
327
- function getUniqueTitle(title, templateDictionary, path) {
328
- title = title ? title.trim() : "_";
329
- const objs = (0, solution_common_1.getProp)(templateDictionary, path) || [];
330
- const titles = objs.map((obj) => {
331
- return obj.title;
332
- });
333
- let newTitle = title;
334
- let i = 0;
335
- // replace added for velocitcy
336
- // validation seems to add "_" to names listed in outputs..so no way to compare without hacking the name
337
- while (titles.indexOf(newTitle) > -1 || titles.indexOf(newTitle.replace(/ /g, "_")) > -1) {
338
- i++;
339
- newTitle = title + " " + i;
340
- }
341
- return newTitle;
342
- }
343
- exports.getUniqueTitle = getUniqueTitle;
344
- /**
345
- * Start the item if validation passes and the item is executable.
346
- *
347
- * @param authentication Credentials for the requests
348
- * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
349
- * @param template the item template that has the details for deployment
350
- * @param id the new id for the velocity item that was deployed
351
- *
352
- * @returns a promise that will resolve with the validation results
353
- * or the start results when validation indicates the item is executable
354
- *
355
- * @private
356
- */
357
- function _validateAndStart(authentication, templateDictionary, template, id) {
358
- return validate(authentication, templateDictionary, template.type, id).then((validateResult) => {
359
- if (validateResult.executable) {
360
- return start(authentication, templateDictionary, template.type, id);
361
- }
362
- else {
363
- return Promise.resolve(validateResult);
364
- }
365
- });
366
- }
367
- exports._validateAndStart = _validateAndStart;
368
- /**
369
- * Validate the velocity item.
370
- * Used to help find and handle duplicate name errors.
371
- *
372
- * @param authentication Credentials for the requests
373
- * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
374
- * @param type The type of velocity item we are constructing a url for
375
- * @param id? Optional The id of the velocity item we are constructing a url for
376
- * @param body? Optional the request body to validate.
377
- *
378
- * @returns a promise that will resolve with an object containing messages
379
- * indicating any issues found when validating such as name conflict errors
380
- *
381
- */
382
- function validate(authentication, templateDictionary, type, id, body) {
383
- // /iot/feed/validate/{id}/
384
- // /iot/analytics/realtime/validate/{id}/
385
- return getVelocityUrl(authentication, templateDictionary, type, id, false, "validate", "").then((url) => {
386
- return _fetch(authentication, url, "POST", body).then((result) => {
387
- return Promise.resolve(result);
388
- });
389
- });
390
- }
391
- exports.validate = validate;
392
- /**
393
- * Start the given velocity item that has been deployed.
394
- *
395
- * @param authentication Credentials for the requests
396
- * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
397
- * @param type The type of velocity item we are constructing a url for
398
- * @param id? Optional The id of the velocity item we are constructing a url for
399
- *
400
- * @returns a promise that will resolve with the result of the start call
401
- *
402
- */
403
- function start(authentication, templateDictionary, type, id) {
404
- // /iot/feed/{id}/start/
405
- // /iot/analytics/realtime/{id}/start/
406
- return getVelocityUrl(authentication, templateDictionary, type, id, false, "", "start").then((url) => {
407
- return _fetch(authentication, url, "GET").then((result) => {
408
- return Promise.resolve(result);
409
- });
410
- });
411
- }
412
- exports.start = start;
413
- /**
414
- * Gets the required request options for requests to the velocity API.
415
- *
416
- * @param authentication Credentials for the requests
417
- * @param method Indicate if "GET" or "POST"
418
- *
419
- * @returns generic request options used for various calls to velocity api
420
- *
421
- * @private
422
- */
423
- function _getRequestOpts(authentication, method) {
424
- return {
425
- headers: {
426
- "Accept": "application/json",
427
- "Content-Type": "application/json",
428
- "Authorization": "token=" + authentication.token,
429
- },
430
- method,
431
- };
432
- }
433
- exports._getRequestOpts = _getRequestOpts;
434
- /**
435
- * Generic fetch function for making calls to the velocity API.
436
- *
437
- * @param authentication Credentials for the requests
438
- * @param url The url from the velocity API to handle reading and writing
439
- * @param method The method for the request "GET" or "POST"
440
- * @param body The body for POST requests
441
- *
442
- * @returns a promise that will resolve with the result of the fetch call
443
- *
444
- * @private
445
- */
446
- function _fetch(authentication, url, method, // GET or POST
447
- body) {
448
- const requestOpts = _getRequestOpts(authentication, method);
449
- /* istanbul ignore else */
450
- if (body) {
451
- requestOpts.body = JSON.stringify(body);
452
- }
453
- return fetch(url, requestOpts).then((r) => Promise.resolve(r.json()));
454
- }
455
- exports._fetch = _fetch;
456
- /**
457
- * Remove key properties if the dependency was removed due to having the "IoTFeatureLayer" typeKeyword
458
- * This function will update the input template.
459
- *
460
- * @param template The template that for the velocity item
461
- *
462
- */
463
- function cleanDataSourcesAndFeeds(template, velocityUrl) {
464
- const dependencies = template.dependencies;
465
- [
466
- (0, solution_common_1.getProp)(template, "data.sources") ? template.data.sources : [],
467
- (0, solution_common_1.getProp)(template, "data.source") ? [template.data.source] : [],
468
- (0, solution_common_1.getProp)(template, "data.feeds") ? template.data.feeds : [],
469
- (0, solution_common_1.getProp)(template, "data.feed") ? [template.data.feed] : [],
470
- ].forEach((d) => _removeIdProps(d, dependencies, velocityUrl));
471
- [
472
- (0, solution_common_1.getProp)(template, "data.outputs") ? template.data.outputs : [],
473
- (0, solution_common_1.getProp)(template, "data.output") ? [template.data.output] : [],
474
- ].forEach((outputs) => _removeIdPropsAndSetName(outputs, dependencies));
475
- }
476
- exports.cleanDataSourcesAndFeeds = cleanDataSourcesAndFeeds;
477
- /**
478
- * Remove key properties from the input source or feed
479
- *
480
- * @param sourcesOrFeeds The list of dataSources or feeds
481
- * @param dependencies The list of dependencies
482
- *
483
- * @private
484
- */
485
- function _removeIdProps(sourcesOrFeeds, dependencies, velocityUrl) {
486
- sourcesOrFeeds.forEach((dataSource) => {
487
- const idProp = "feature-layer.portalItemId";
488
- const layerIdProp = "feature-layer.layerId";
489
- /* istanbul ignore else */
490
- if (dataSource.properties) {
491
- /* istanbul ignore else */
492
- if (dataSource.properties[idProp]) {
493
- const id = dataSource.properties[idProp];
494
- /* istanbul ignore else */
495
- if (id && dependencies.indexOf(id) < 0) {
496
- delete dataSource.properties[idProp];
497
- delete dataSource.properties[layerIdProp];
498
- }
499
- }
500
- const urlProp = "simulator.url";
501
- const url = dataSource.properties[urlProp];
502
- // only remove velocity based simulator urls
503
- // otherwise we will leave as is with no templatization
504
- /* istanbul ignore else */
505
- if (url && url.indexOf(velocityUrl) > -1) {
506
- delete dataSource.properties[urlProp];
507
- }
508
- }
509
- });
510
- }
511
- exports._removeIdProps = _removeIdProps;
512
- /**
513
- * Remove key properties from the outputs.
514
- *
515
- * @param outputs The list of outputs
516
- * @param dependencies The list of dependencies
517
- *
518
- * @private
519
- */
520
- function _removeIdPropsAndSetName(outputs, dependencies) {
521
- outputs.forEach((output) => {
522
- /* istanbul ignore else */
523
- if (output.properties) {
524
- const names = (0, solution_common_1.getProp)(output, "name") ? [output.name] : solution_common_1.BASE_NAMES;
525
- names.forEach((n) => {
526
- solution_common_1.PROP_NAMES.forEach((p) => _removeProp(output.properties, n + p, dependencies));
527
- });
528
- _updateName(output.properties);
529
- }
530
- });
531
- }
532
- exports._removeIdPropsAndSetName = _removeIdPropsAndSetName;
533
- /**
534
- * Generic helper function to remove key properties .
535
- *
536
- * @param props the list of props to update
537
- * @param prop the individual prop to remove
538
- * @param dependencies The list of dependencies
539
- *
540
- * @private
541
- */
542
- function _removeProp(props, prop, dependencies) {
543
- const id = props[prop];
544
- /* istanbul ignore else */
545
- if (id && dependencies.indexOf(id) < 0) {
546
- delete props[prop];
547
- }
548
- }
549
- exports._removeProp = _removeProp;
550
- /**
551
- * Update the feature layer name to include the solution item id.
552
- *
553
- * @param props the list of props to update
554
- *
555
- * @private
556
- */
557
- function _updateName(props) {
558
- ["feat-lyr-new.name", "stream-lyr-new.name", "feat-lyr-existing.name"].forEach((n) => {
559
- const name = props[n];
560
- /* istanbul ignore else */
561
- if (name && name.indexOf("{{solutionItemId}}") < 0) {
562
- props[n] = `${name}_{{solutionItemId}}`;
563
- }
564
- });
565
- }
566
- exports._updateName = _updateName;
567
- //# sourceMappingURL=velocity-helpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"velocity-helpers.js","sourceRoot":"","sources":["../../../src/helpers/velocity-helpers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,2DAU+B;AAE/B;;;;;;;;;;;;;;GAcG;AACH,SAAgB,cAAc,CAC5B,cAA2B,EAC3B,kBAAuB,EACvB,IAAY,EACZ,KAAa,EAAE,EACf,WAAoB,KAAK,EACzB,YAAoB,EAAE,EACtB,YAAoB,EAAE;IAEtB,OAAO,IAAA,oCAAkB,EAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;QACzE,IAAI,GAAG,EAAE;YACP,MAAM,KAAK,GACT,IAAI,KAAK,oBAAoB;gBAC3B,CAAC,CAAC,oBAAoB;gBACtB,CAAC,CAAC,IAAI,KAAK,mBAAmB;oBAC5B,CAAC,CAAC,mBAAmB;oBACrB,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;YAE3B,MAAM,MAAM,GAAW,SAAS,CAAC,CAAC,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACxD,MAAM,MAAM,GAAW,SAAS,CAAC,CAAC,C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,SAAgB,WAAW,CAAC,KAAU;IACpC,CAAC,mBAAmB,EAAE,qBAAqB,EAAE,wBAAwB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;QACnF,MAAM,IAAI,GAAW,KAAK,CAAC,CAAC,CAAC,CAAC;QAC9B,0BAA0B;QAC1B,IAAI,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,GAAG,CAAC,EAAE;YAClD,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,qBAAqB,CAAC;SACzC;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AARD,kCAQC"}
@@ -1,71 +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 } from "@esri/solution-common";
17
- /**
18
- * Updates the template by adding variables for key properties that will
19
- * need to be swapped when deploying
20
- *
21
- * @param template velocity item info that should be templatized
22
- *
23
- * @returns void
24
- *
25
- */
26
- export declare function templatizeVelocity(template: IItemTemplate): void;
27
- /**
28
- * Generic wrapper for the templatize functions that
29
- * will get and set the key properties
30
- *
31
- * @param template velocity item info that should be templatized
32
- * @param prop the prop path to evaluate and set with a templatized variable
33
- * @param fn the templatize function that should be called for this prop
34
- *
35
- * @returns void
36
- *
37
- * @private
38
- */
39
- export declare function _templatize(template: IItemTemplate, prop: string, fn: (arg: any) => void): void;
40
- /**
41
- * Updates the template by adding variables for the itemId and the label
42
- * The label controls the name and must be unique for the org.
43
- *
44
- * @param feeds array of velocity feeds that should be templatized
45
- *
46
- * @returns The updated list of feed objects with templatized id and label
47
- *
48
- * @private
49
- */
50
- export declare function _templatizeFeeds(feeds: any[]): any;
51
- /**
52
- * Updates the portal item id and feature layer id variables for the feed properties.
53
- *
54
- * @param feed the feed object from the item
55
- *
56
- * @returns the updated feed object with templatized portalItemId and layer id
57
- *
58
- * @private
59
- */
60
- export declare function _templatizeFeed(feed: any): any;
61
- /**
62
- * Velocity datasources share the same props as feeds so they can leverage
63
- * the same templatize function
64
- *
65
- * @param dataSources array of data sources from the item
66
- *
67
- * @returns the updated dataSources object with templatized ids and labels
68
- *
69
- * @private
70
- */
71
- export declare function _templatizeDatasources(dataSources: any[]): any;