@aws-cdk/toolkit-lib 0.1.8 → 0.2.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 (58) hide show
  1. package/api-extractor.json +36 -0
  2. package/build-info.json +2 -2
  3. package/db.json.gz +0 -0
  4. package/lib/actions/bootstrap/index.d.ts +1 -1
  5. package/lib/actions/bootstrap/index.js +1 -1
  6. package/lib/actions/deploy/index.d.ts +1 -21
  7. package/lib/actions/deploy/index.js +1 -1
  8. package/lib/actions/deploy/private/deploy-options.d.ts +16 -4
  9. package/lib/actions/deploy/private/deploy-options.js +1 -1
  10. package/lib/actions/deploy/private/helpers.d.ts +3 -3
  11. package/lib/actions/deploy/private/helpers.js +5 -5
  12. package/lib/actions/destroy/index.d.ts +0 -6
  13. package/lib/actions/destroy/index.js +1 -1
  14. package/lib/actions/diff/index.d.ts +1 -1
  15. package/lib/actions/diff/index.js +1 -1
  16. package/lib/actions/diff/private/helpers.d.ts +3 -0
  17. package/lib/actions/diff/private/helpers.js +89 -1
  18. package/lib/actions/watch/index.d.ts +0 -14
  19. package/lib/actions/watch/index.js +1 -1
  20. package/lib/api/cloud-assembly/index.d.ts +1 -1
  21. package/lib/api/cloud-assembly/index.js +4 -2
  22. package/lib/api/cloud-assembly/private/context-aware-source.d.ts +1 -1
  23. package/lib/api/cloud-assembly/private/context-aware-source.js +5 -4
  24. package/lib/api/cloud-assembly/private/exec.js +5 -4
  25. package/lib/api/cloud-assembly/private/prepare-source.d.ts +1 -1
  26. package/lib/api/cloud-assembly/private/prepare-source.js +11 -10
  27. package/lib/api/cloud-assembly/private/source-builder.d.ts +0 -6
  28. package/lib/api/cloud-assembly/private/source-builder.js +6 -6
  29. package/lib/api/cloud-assembly/private/stack-assembly.d.ts +2 -2
  30. package/lib/api/cloud-assembly/private/stack-assembly.js +10 -10
  31. package/lib/api/shared-private.d.ts +4 -0
  32. package/lib/api/shared-private.js +11283 -52
  33. package/lib/api/shared-private.js.map +4 -4
  34. package/lib/api/shared-public.d.ts +266 -1386
  35. package/lib/api/shared-public.js +32 -923
  36. package/lib/api/shared-public.js.map +4 -4
  37. package/lib/index_bg.wasm +0 -0
  38. package/lib/private/util.js +35 -14
  39. package/lib/private/util.js.map +4 -4
  40. package/lib/toolkit/index.d.ts +2 -1
  41. package/lib/toolkit/index.js +3 -2
  42. package/lib/toolkit/non-interactive-io-host.d.ts +80 -0
  43. package/lib/toolkit/non-interactive-io-host.js +129 -0
  44. package/lib/toolkit/private/index.d.ts +1 -2
  45. package/lib/toolkit/private/index.js +1 -1
  46. package/lib/toolkit/toolkit.d.ts +39 -24
  47. package/lib/toolkit/toolkit.js +137 -170
  48. package/lib/toolkit/types.d.ts +163 -0
  49. package/lib/toolkit/types.js +3 -0
  50. package/lib/util/promises.d.ts +12 -0
  51. package/lib/util/promises.js +17 -0
  52. package/lib/util/shell-env.d.ts +10 -0
  53. package/lib/util/shell-env.js +19 -0
  54. package/package.json +14 -11
  55. package/tsconfig.dts.json +9 -0
  56. package/lib/api/aws-cdk.d.ts +0 -20
  57. package/lib/api/aws-cdk.js +0 -11041
  58. package/lib/api/aws-cdk.js.map +0 -7
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
 
30
20
  // lib/api/shared-public.ts
@@ -32,49 +22,14 @@ var shared_public_exports = {};
32
22
  __export(shared_public_exports, {
33
23
  AssemblyError: () => AssemblyError,
34
24
  AuthenticationError: () => AuthenticationError,
35
- ContextProviderError: () => ContextProviderError,
36
- DiffFormatter: () => DiffFormatter,
37
25
  ExpandStackSelection: () => ExpandStackSelection,
38
26
  NonHotswappableReason: () => NonHotswappableReason,
39
27
  PermissionChangeType: () => PermissionChangeType,
40
- RequireApproval: () => RequireApproval,
41
28
  StackSelectionStrategy: () => StackSelectionStrategy,
42
- ToolkitError: () => ToolkitError,
43
- removeNonImportResources: () => removeNonImportResources
29
+ ToolkitError: () => ToolkitError
44
30
  });
45
31
  module.exports = __toCommonJS(shared_public_exports);
46
32
 
47
- // ../tmp-toolkit-helpers/src/api/cloud-assembly/stack-selector.ts
48
- var StackSelectionStrategy = /* @__PURE__ */ ((StackSelectionStrategy2) => {
49
- StackSelectionStrategy2["ALL_STACKS"] = "all-stacks";
50
- StackSelectionStrategy2["MAIN_ASSEMBLY"] = "main-assembly";
51
- StackSelectionStrategy2["ONLY_SINGLE"] = "only-single";
52
- StackSelectionStrategy2["PATTERN_MATCH"] = "pattern-match";
53
- StackSelectionStrategy2["PATTERN_MUST_MATCH"] = "pattern-must-match";
54
- StackSelectionStrategy2["PATTERN_MUST_MATCH_SINGLE"] = "pattern-must-match-single";
55
- return StackSelectionStrategy2;
56
- })(StackSelectionStrategy || {});
57
- var ExpandStackSelection = /* @__PURE__ */ ((ExpandStackSelection2) => {
58
- ExpandStackSelection2["NONE"] = "none";
59
- ExpandStackSelection2["UPSTREAM"] = "upstream";
60
- ExpandStackSelection2["DOWNSTREAM"] = "downstream";
61
- return ExpandStackSelection2;
62
- })(ExpandStackSelection || {});
63
-
64
- // ../tmp-toolkit-helpers/src/api/diff/diff-formatter.ts
65
- var import_node_util = require("node:util");
66
- var import_stream = require("stream");
67
- var cxschema = __toESM(require("@aws-cdk/cloud-assembly-schema"));
68
- var import_cloudformation_diff = require("@aws-cdk/cloudformation-diff");
69
- var chalk = __toESM(require("chalk"));
70
-
71
- // ../tmp-toolkit-helpers/src/api/io/private/span.ts
72
- var uuid = __toESM(require("uuid"));
73
-
74
- // ../tmp-toolkit-helpers/src/util/archive.ts
75
- var glob = __toESM(require("glob"));
76
- var archiver = require("archiver");
77
-
78
33
  // ../tmp-toolkit-helpers/src/api/toolkit-error.ts
79
34
  var TOOLKIT_ERROR_SYMBOL = Symbol.for("@aws-cdk/toolkit-lib.ToolkitError");
80
35
  var AUTHENTICATION_ERROR_SYMBOL = Symbol.for("@aws-cdk/toolkit-lib.AuthenticationError");
@@ -108,8 +63,8 @@ var ToolkitError = class _ToolkitError extends Error {
108
63
  /**
109
64
  * An AssemblyError with an original error as cause
110
65
  */
111
- static withCause(message2, error2) {
112
- return new _ToolkitError(message2, "toolkit", error2);
66
+ static withCause(message, error) {
67
+ return new _ToolkitError(message, "toolkit", error);
113
68
  }
114
69
  /**
115
70
  * The type of the error, defaults to "toolkit".
@@ -123,8 +78,8 @@ var ToolkitError = class _ToolkitError extends Error {
123
78
  * The specific original cause of the error, if available
124
79
  */
125
80
  cause;
126
- constructor(message2, type = "toolkit", cause) {
127
- super(message2);
81
+ constructor(message, type = "toolkit", cause) {
82
+ super(message);
128
83
  Object.setPrototypeOf(this, _ToolkitError.prototype);
129
84
  Object.defineProperty(this, TOOLKIT_ERROR_SYMBOL, { value: true });
130
85
  this.name = new.target.name;
@@ -138,8 +93,8 @@ var AuthenticationError = class _AuthenticationError extends ToolkitError {
138
93
  * Denotes the source of the error as user.
139
94
  */
140
95
  source = "user";
141
- constructor(message2) {
142
- super(message2, "authentication");
96
+ constructor(message) {
97
+ super(message, "authentication");
143
98
  Object.setPrototypeOf(this, _AuthenticationError.prototype);
144
99
  Object.defineProperty(this, AUTHENTICATION_ERROR_SYMBOL, { value: true });
145
100
  }
@@ -148,14 +103,14 @@ var AssemblyError = class _AssemblyError extends ToolkitError {
148
103
  /**
149
104
  * An AssemblyError with an original error as cause
150
105
  */
151
- static withCause(message2, error2) {
152
- return new _AssemblyError(message2, void 0, error2);
106
+ static withCause(message, error) {
107
+ return new _AssemblyError(message, void 0, error);
153
108
  }
154
109
  /**
155
110
  * An AssemblyError with a list of stacks as cause
156
111
  */
157
- static withStacks(message2, stacks) {
158
- return new _AssemblyError(message2, stacks);
112
+ static withStacks(message, stacks) {
113
+ return new _AssemblyError(message, stacks);
159
114
  }
160
115
  /**
161
116
  * Denotes the source of the error as user.
@@ -168,866 +123,32 @@ var AssemblyError = class _AssemblyError extends ToolkitError {
168
123
  * Absence indicates synthesis didn't fully complete.
169
124
  */
170
125
  stacks;
171
- constructor(message2, stacks, cause) {
172
- super(message2, "assembly", cause);
126
+ constructor(message, stacks, cause) {
127
+ super(message, "assembly", cause);
173
128
  Object.setPrototypeOf(this, _AssemblyError.prototype);
174
129
  Object.defineProperty(this, ASSEMBLY_ERROR_SYMBOL, { value: true });
175
130
  this.stacks = stacks;
176
131
  }
177
132
  };
178
- var ContextProviderError = class _ContextProviderError extends ToolkitError {
179
- /**
180
- * Denotes the source of the error as user.
181
- */
182
- source = "user";
183
- constructor(message2) {
184
- super(message2, "context-provider");
185
- Object.setPrototypeOf(this, _ContextProviderError.prototype);
186
- Object.defineProperty(this, CONTEXT_PROVIDER_ERROR_SYMBOL, { value: true });
187
- }
188
- };
189
-
190
- // ../tmp-toolkit-helpers/src/util/types.ts
191
- var isArray = Array.isArray;
192
-
193
- // ../tmp-toolkit-helpers/src/util/yaml-cfn.ts
194
- var yaml = __toESM(require("yaml"));
195
- var yaml_types = __toESM(require("yaml/types"));
196
- function makeTagForCfnIntrinsic(intrinsicName, addFnPrefix) {
197
- return {
198
- identify(value) {
199
- return typeof value === "string";
200
- },
201
- tag: `!${intrinsicName}`,
202
- resolve: (_doc, cstNode) => {
203
- const ret = {};
204
- ret[addFnPrefix ? `Fn::${intrinsicName}` : intrinsicName] = // the +1 is to account for the ! the short form begins with
205
- parseYamlStrWithCfnTags(cstNode.toString().substring(intrinsicName.length + 1));
206
- return ret;
207
- }
208
- };
209
- }
210
- var shortForms = [
211
- "Base64",
212
- "Cidr",
213
- "FindInMap",
214
- "GetAZs",
215
- "ImportValue",
216
- "Join",
217
- "Sub",
218
- "Select",
219
- "Split",
220
- "Transform",
221
- "And",
222
- "Equals",
223
- "If",
224
- "Not",
225
- "Or",
226
- "GetAtt"
227
- ].map((name) => makeTagForCfnIntrinsic(name, true)).concat(
228
- makeTagForCfnIntrinsic("Ref", false),
229
- makeTagForCfnIntrinsic("Condition", false)
230
- );
231
- function parseYamlStrWithCfnTags(text) {
232
- return yaml.parse(text, {
233
- customTags: shortForms,
234
- schema: "core"
235
- });
236
- }
237
133
 
238
- // ../tmp-toolkit-helpers/src/util/version-range.ts
239
- var semver = __toESM(require("semver"));
240
-
241
- // ../tmp-toolkit-helpers/src/api/io/private/level-priority.ts
242
- var levels = [
243
- "trace",
244
- "debug",
245
- "info",
246
- "warn",
247
- "result",
248
- "error"
249
- ];
250
- var orderedLevels = Object.fromEntries(Object.entries(levels).map((a) => a.reverse()));
251
-
252
- // ../tmp-toolkit-helpers/src/api/io/private/message-maker.ts
253
- function message(level, details) {
254
- const maker = (text, data) => ({
255
- time: /* @__PURE__ */ new Date(),
256
- level,
257
- code: details.code,
258
- message: text,
259
- data
260
- });
261
- return {
262
- ...details,
263
- level,
264
- msg: maker,
265
- is: (m) => m.code === details.code
266
- };
267
- }
268
- var trace = (details) => message("trace", details);
269
- var debug = (details) => message("debug", details);
270
- var info = (details) => message("info", details);
271
- var warn = (details) => message("warn", details);
272
- var error = (details) => message("error", details);
273
- var result = (details) => message("result", details);
274
- function request(level, details) {
275
- const maker = (text, data) => ({
276
- time: /* @__PURE__ */ new Date(),
277
- level,
278
- code: details.code,
279
- message: text,
280
- data,
281
- defaultResponse: details.defaultResponse
282
- });
283
- return {
284
- ...details,
285
- level,
286
- req: maker
287
- };
288
- }
289
- var confirm = (details) => request("info", {
290
- ...details,
291
- defaultResponse: true
292
- });
293
-
294
- // ../tmp-toolkit-helpers/src/api/io/private/messages.ts
295
- var IO = {
296
- // Defaults (0000)
297
- DEFAULT_TOOLKIT_INFO: info({
298
- code: "CDK_TOOLKIT_I0000",
299
- description: "Default info messages emitted from the Toolkit"
300
- }),
301
- DEFAULT_TOOLKIT_DEBUG: debug({
302
- code: "CDK_TOOLKIT_I0000",
303
- description: "Default debug messages emitted from the Toolkit"
304
- }),
305
- DEFAULT_TOOLKIT_WARN: warn({
306
- code: "CDK_TOOLKIT_W0000",
307
- description: "Default warning messages emitted from the Toolkit"
308
- }),
309
- DEFAULT_TOOLKIT_ERROR: error({
310
- code: "CDK_TOOLKIT_E0000",
311
- description: "Default error messages emitted from the Toolkit"
312
- }),
313
- DEFAULT_TOOLKIT_TRACE: trace({
314
- code: "CDK_TOOLKIT_I0000",
315
- description: "Default trace messages emitted from the Toolkit"
316
- }),
317
- // 1: Synth (1xxx)
318
- CDK_TOOLKIT_I1000: info({
319
- code: "CDK_TOOLKIT_I1000",
320
- description: "Provides synthesis times.",
321
- interface: "Duration"
322
- }),
323
- CDK_TOOLKIT_I1001: trace({
324
- code: "CDK_TOOLKIT_I1001",
325
- description: "Cloud Assembly synthesis is starting",
326
- interface: "StackSelectionDetails"
327
- }),
328
- CDK_TOOLKIT_I1901: result({
329
- code: "CDK_TOOLKIT_I1901",
330
- description: "Provides stack data",
331
- interface: "StackAndAssemblyData"
332
- }),
333
- CDK_TOOLKIT_I1902: result({
334
- code: "CDK_TOOLKIT_I1902",
335
- description: "Successfully deployed stacks",
336
- interface: "AssemblyData"
337
- }),
338
- // 2: List (2xxx)
339
- CDK_TOOLKIT_I2901: result({
340
- code: "CDK_TOOLKIT_I2901",
341
- description: "Provides details on the selected stacks and their dependencies",
342
- interface: "StackDetailsPayload"
343
- }),
344
- // 3: Import & Migrate
345
- CDK_TOOLKIT_E3900: error({
346
- code: "CDK_TOOLKIT_E3900",
347
- description: "Resource import failed",
348
- interface: "ErrorPayload"
349
- }),
350
- // 4: Diff (4xxx)
351
- CDK_TOOLKIT_I4000: trace({
352
- code: "CDK_TOOLKIT_I4000",
353
- description: "Diff stacks is starting",
354
- interface: "StackSelectionDetails"
355
- }),
356
- CDK_TOOLKIT_I4001: info({
357
- code: "CDK_TOOLKIT_I4001",
358
- description: "Output of the diff command",
359
- interface: "DiffResult"
360
- }),
361
- // 5: Deploy & Watch (5xxx)
362
- CDK_TOOLKIT_I5000: info({
363
- code: "CDK_TOOLKIT_I5000",
364
- description: "Provides deployment times",
365
- interface: "Duration"
366
- }),
367
- CDK_TOOLKIT_I5001: info({
368
- code: "CDK_TOOLKIT_I5001",
369
- description: "Provides total time in deploy action, including synth and rollback",
370
- interface: "Duration"
371
- }),
372
- CDK_TOOLKIT_I5002: info({
373
- code: "CDK_TOOLKIT_I5002",
374
- description: "Provides time for resource migration",
375
- interface: "Duration"
376
- }),
377
- CDK_TOOLKIT_W5021: warn({
378
- code: "CDK_TOOLKIT_W5021",
379
- description: "Empty non-existent stack, deployment is skipped"
380
- }),
381
- CDK_TOOLKIT_W5022: warn({
382
- code: "CDK_TOOLKIT_W5022",
383
- description: "Empty existing stack, stack will be destroyed"
384
- }),
385
- CDK_TOOLKIT_I5031: info({
386
- code: "CDK_TOOLKIT_I5031",
387
- description: "Informs about any log groups that are traced as part of the deployment"
388
- }),
389
- CDK_TOOLKIT_I5032: debug({
390
- code: "CDK_TOOLKIT_I5032",
391
- description: "Start monitoring log groups",
392
- interface: "CloudWatchLogMonitorControlEvent"
393
- }),
394
- CDK_TOOLKIT_I5033: info({
395
- code: "CDK_TOOLKIT_I5033",
396
- description: "A log event received from Cloud Watch",
397
- interface: "CloudWatchLogEvent"
398
- }),
399
- CDK_TOOLKIT_I5034: debug({
400
- code: "CDK_TOOLKIT_I5034",
401
- description: "Stop monitoring log groups",
402
- interface: "CloudWatchLogMonitorControlEvent"
403
- }),
404
- CDK_TOOLKIT_E5035: error({
405
- code: "CDK_TOOLKIT_E5035",
406
- description: "A log monitoring error",
407
- interface: "ErrorPayload"
408
- }),
409
- CDK_TOOLKIT_I5050: confirm({
410
- code: "CDK_TOOLKIT_I5050",
411
- description: "Confirm rollback during deployment",
412
- interface: "ConfirmationRequest"
413
- }),
414
- CDK_TOOLKIT_I5060: confirm({
415
- code: "CDK_TOOLKIT_I5060",
416
- description: "Confirm deploy security sensitive changes",
417
- interface: "DeployConfirmationRequest"
418
- }),
419
- CDK_TOOLKIT_I5100: info({
420
- code: "CDK_TOOLKIT_I5100",
421
- description: "Stack deploy progress",
422
- interface: "StackDeployProgress"
423
- }),
424
- // Assets (52xx)
425
- CDK_TOOLKIT_I5210: trace({
426
- code: "CDK_TOOLKIT_I5210",
427
- description: "Started building a specific asset",
428
- interface: "BuildAsset"
429
- }),
430
- CDK_TOOLKIT_I5211: trace({
431
- code: "CDK_TOOLKIT_I5211",
432
- description: "Building the asset has completed",
433
- interface: "Duration"
434
- }),
435
- CDK_TOOLKIT_I5220: trace({
436
- code: "CDK_TOOLKIT_I5220",
437
- description: "Started publishing a specific asset",
438
- interface: "PublishAsset"
439
- }),
440
- CDK_TOOLKIT_I5221: trace({
441
- code: "CDK_TOOLKIT_I5221",
442
- description: "Publishing the asset has completed",
443
- interface: "Duration"
444
- }),
445
- // Watch (53xx)
446
- CDK_TOOLKIT_I5310: debug({
447
- code: "CDK_TOOLKIT_I5310",
448
- description: "The computed settings used for file watching",
449
- interface: "WatchSettings"
450
- }),
451
- CDK_TOOLKIT_I5311: info({
452
- code: "CDK_TOOLKIT_I5311",
453
- description: "File watching started",
454
- interface: "FileWatchEvent"
455
- }),
456
- CDK_TOOLKIT_I5312: info({
457
- code: "CDK_TOOLKIT_I5312",
458
- description: "File event detected, starting deployment",
459
- interface: "FileWatchEvent"
460
- }),
461
- CDK_TOOLKIT_I5313: info({
462
- code: "CDK_TOOLKIT_I5313",
463
- description: "File event detected during active deployment, changes are queued",
464
- interface: "FileWatchEvent"
465
- }),
466
- CDK_TOOLKIT_I5314: info({
467
- code: "CDK_TOOLKIT_I5314",
468
- description: "Initial watch deployment started"
469
- }),
470
- CDK_TOOLKIT_I5315: info({
471
- code: "CDK_TOOLKIT_I5315",
472
- description: "Queued watch deployment started"
473
- }),
474
- // Hotswap (54xx)
475
- CDK_TOOLKIT_I5400: trace({
476
- code: "CDK_TOOLKIT_I5400",
477
- description: "Attempting a hotswap deployment",
478
- interface: "HotswapDeploymentAttempt"
479
- }),
480
- CDK_TOOLKIT_I5401: trace({
481
- code: "CDK_TOOLKIT_I5401",
482
- description: "Computed details for the hotswap deployment",
483
- interface: "HotswapDeploymentDetails"
484
- }),
485
- CDK_TOOLKIT_I5402: info({
486
- code: "CDK_TOOLKIT_I5402",
487
- description: "A hotswappable change is processed as part of a hotswap deployment",
488
- interface: "HotswappableChange"
489
- }),
490
- CDK_TOOLKIT_I5403: info({
491
- code: "CDK_TOOLKIT_I5403",
492
- description: "The hotswappable change has completed processing",
493
- interface: "HotswappableChange"
494
- }),
495
- CDK_TOOLKIT_I5410: info({
496
- code: "CDK_TOOLKIT_I5410",
497
- description: "Hotswap deployment has ended, a full deployment might still follow if needed",
498
- interface: "HotswapResult"
499
- }),
500
- // Stack Monitor (55xx)
501
- CDK_TOOLKIT_I5501: info({
502
- code: "CDK_TOOLKIT_I5501",
503
- description: "Stack Monitoring: Start monitoring of a single stack",
504
- interface: "StackMonitoringControlEvent"
505
- }),
506
- CDK_TOOLKIT_I5502: info({
507
- code: "CDK_TOOLKIT_I5502",
508
- description: "Stack Monitoring: Activity event for a single stack",
509
- interface: "StackActivity"
510
- }),
511
- CDK_TOOLKIT_I5503: info({
512
- code: "CDK_TOOLKIT_I5503",
513
- description: "Stack Monitoring: Finished monitoring of a single stack",
514
- interface: "StackMonitoringControlEvent"
515
- }),
516
- // Success (59xx)
517
- CDK_TOOLKIT_I5900: result({
518
- code: "CDK_TOOLKIT_I5900",
519
- description: "Deployment results on success",
520
- interface: "SuccessfulDeployStackResult"
521
- }),
522
- CDK_TOOLKIT_I5901: info({
523
- code: "CDK_TOOLKIT_I5901",
524
- description: "Generic deployment success messages"
525
- }),
526
- CDK_TOOLKIT_W5400: warn({
527
- code: "CDK_TOOLKIT_W5400",
528
- description: "Hotswap disclosure message"
529
- }),
530
- // errors
531
- CDK_TOOLKIT_E5001: error({
532
- code: "CDK_TOOLKIT_E5001",
533
- description: "No stacks found"
534
- }),
535
- CDK_TOOLKIT_E5500: error({
536
- code: "CDK_TOOLKIT_E5500",
537
- description: "Stack Monitoring error",
538
- interface: "ErrorPayload"
539
- }),
540
- // 6: Rollback (6xxx)
541
- CDK_TOOLKIT_I6000: info({
542
- code: "CDK_TOOLKIT_I6000",
543
- description: "Provides rollback times",
544
- interface: "Duration"
545
- }),
546
- CDK_TOOLKIT_I6100: info({
547
- code: "CDK_TOOLKIT_I6100",
548
- description: "Stack rollback progress",
549
- interface: "StackRollbackProgress"
550
- }),
551
- CDK_TOOLKIT_E6001: error({
552
- code: "CDK_TOOLKIT_E6001",
553
- description: "No stacks found"
554
- }),
555
- CDK_TOOLKIT_E6900: error({
556
- code: "CDK_TOOLKIT_E6900",
557
- description: "Rollback failed",
558
- interface: "ErrorPayload"
559
- }),
560
- // 7: Destroy (7xxx)
561
- CDK_TOOLKIT_I7000: info({
562
- code: "CDK_TOOLKIT_I7000",
563
- description: "Provides destroy times",
564
- interface: "Duration"
565
- }),
566
- CDK_TOOLKIT_I7001: trace({
567
- code: "CDK_TOOLKIT_I7001",
568
- description: "Provides destroy time for a single stack",
569
- interface: "Duration"
570
- }),
571
- CDK_TOOLKIT_I7010: confirm({
572
- code: "CDK_TOOLKIT_I7010",
573
- description: "Confirm destroy stacks",
574
- interface: "ConfirmationRequest"
575
- }),
576
- CDK_TOOLKIT_I7100: info({
577
- code: "CDK_TOOLKIT_I7100",
578
- description: "Stack destroy progress",
579
- interface: "StackDestroyProgress"
580
- }),
581
- CDK_TOOLKIT_I7101: trace({
582
- code: "CDK_TOOLKIT_I7101",
583
- description: "Start stack destroying",
584
- interface: "StackDestroy"
585
- }),
586
- CDK_TOOLKIT_I7900: result({
587
- code: "CDK_TOOLKIT_I7900",
588
- description: "Stack deletion succeeded",
589
- interface: "cxapi.CloudFormationStackArtifact"
590
- }),
591
- CDK_TOOLKIT_E7010: error({
592
- code: "CDK_TOOLKIT_E7010",
593
- description: "Action was aborted due to negative confirmation of request"
594
- }),
595
- CDK_TOOLKIT_E7900: error({
596
- code: "CDK_TOOLKIT_E7900",
597
- description: "Stack deletion failed",
598
- interface: "ErrorPayload"
599
- }),
600
- // 9: Bootstrap (9xxx)
601
- CDK_TOOLKIT_I9000: info({
602
- code: "CDK_TOOLKIT_I9000",
603
- description: "Provides bootstrap times",
604
- interface: "Duration"
605
- }),
606
- CDK_TOOLKIT_I9100: info({
607
- code: "CDK_TOOLKIT_I9100",
608
- description: "Bootstrap progress",
609
- interface: "BootstrapEnvironmentProgress"
610
- }),
611
- CDK_TOOLKIT_I9900: result({
612
- code: "CDK_TOOLKIT_I9900",
613
- description: "Bootstrap results on success",
614
- interface: "cxapi.Environment"
615
- }),
616
- CDK_TOOLKIT_E9900: error({
617
- code: "CDK_TOOLKIT_E9900",
618
- description: "Bootstrap failed",
619
- interface: "ErrorPayload"
620
- }),
621
- // Notices
622
- CDK_TOOLKIT_I0100: info({
623
- code: "CDK_TOOLKIT_I0100",
624
- description: "Notices decoration (the header or footer of a list of notices)"
625
- }),
626
- CDK_TOOLKIT_W0101: warn({
627
- code: "CDK_TOOLKIT_W0101",
628
- description: "A notice that is marked as a warning"
629
- }),
630
- CDK_TOOLKIT_E0101: error({
631
- code: "CDK_TOOLKIT_E0101",
632
- description: "A notice that is marked as an error"
633
- }),
634
- CDK_TOOLKIT_I0101: info({
635
- code: "CDK_TOOLKIT_I0101",
636
- description: "A notice that is marked as informational"
637
- }),
638
- // Assembly codes
639
- DEFAULT_ASSEMBLY_TRACE: trace({
640
- code: "CDK_ASSEMBLY_I0000",
641
- description: "Default trace messages emitted from Cloud Assembly operations"
642
- }),
643
- DEFAULT_ASSEMBLY_DEBUG: debug({
644
- code: "CDK_ASSEMBLY_I0000",
645
- description: "Default debug messages emitted from Cloud Assembly operations"
646
- }),
647
- DEFAULT_ASSEMBLY_INFO: info({
648
- code: "CDK_ASSEMBLY_I0000",
649
- description: "Default info messages emitted from Cloud Assembly operations"
650
- }),
651
- DEFAULT_ASSEMBLY_WARN: warn({
652
- code: "CDK_ASSEMBLY_W0000",
653
- description: "Default warning messages emitted from Cloud Assembly operations"
654
- }),
655
- CDK_ASSEMBLY_I0010: debug({
656
- code: "CDK_ASSEMBLY_I0010",
657
- description: "Generic environment preparation debug messages"
658
- }),
659
- CDK_ASSEMBLY_W0010: warn({
660
- code: "CDK_ASSEMBLY_W0010",
661
- description: "Emitted if the found framework version does not support context overflow"
662
- }),
663
- CDK_ASSEMBLY_I0042: debug({
664
- code: "CDK_ASSEMBLY_I0042",
665
- description: "Writing updated context",
666
- interface: "UpdatedContext"
667
- }),
668
- CDK_ASSEMBLY_I0240: debug({
669
- code: "CDK_ASSEMBLY_I0240",
670
- description: "Context lookup was stopped as no further progress was made. ",
671
- interface: "MissingContext"
672
- }),
673
- CDK_ASSEMBLY_I0241: debug({
674
- code: "CDK_ASSEMBLY_I0241",
675
- description: "Fetching missing context. This is an iterative message that may appear multiple times with different missing keys.",
676
- interface: "MissingContext"
677
- }),
678
- CDK_ASSEMBLY_I1000: debug({
679
- code: "CDK_ASSEMBLY_I1000",
680
- description: "Cloud assembly output starts"
681
- }),
682
- CDK_ASSEMBLY_I1001: info({
683
- code: "CDK_ASSEMBLY_I1001",
684
- description: "Output lines emitted by the cloud assembly to stdout"
685
- }),
686
- CDK_ASSEMBLY_E1002: error({
687
- code: "CDK_ASSEMBLY_E1002",
688
- description: "Output lines emitted by the cloud assembly to stderr"
689
- }),
690
- CDK_ASSEMBLY_I1003: info({
691
- code: "CDK_ASSEMBLY_I1003",
692
- description: "Cloud assembly output finished"
693
- }),
694
- CDK_ASSEMBLY_E1111: error({
695
- code: "CDK_ASSEMBLY_E1111",
696
- description: "Incompatible CDK CLI version. Upgrade needed.",
697
- interface: "ErrorPayload"
698
- }),
699
- CDK_ASSEMBLY_I0150: debug({
700
- code: "CDK_ASSEMBLY_I0150",
701
- description: "Indicates the use of a pre-synthesized cloud assembly directory"
702
- }),
703
- CDK_ASSEMBLY_I0300: info({
704
- code: "CDK_ASSEMBLY_I0300",
705
- description: "An info message emitted by a Context Provider",
706
- interface: "ContextProviderMessageSource"
707
- }),
708
- CDK_ASSEMBLY_I0301: debug({
709
- code: "CDK_ASSEMBLY_I0301",
710
- description: "A debug message emitted by a Context Provider",
711
- interface: "ContextProviderMessageSource"
712
- }),
713
- // Assembly Annotations
714
- CDK_ASSEMBLY_I9999: info({
715
- code: "CDK_ASSEMBLY_I9999",
716
- description: "Annotations emitted by the cloud assembly",
717
- interface: "cxapi.SynthesisMessage"
718
- }),
719
- CDK_ASSEMBLY_W9999: warn({
720
- code: "CDK_ASSEMBLY_W9999",
721
- description: "Warnings emitted by the cloud assembly",
722
- interface: "cxapi.SynthesisMessage"
723
- }),
724
- CDK_ASSEMBLY_E9999: error({
725
- code: "CDK_ASSEMBLY_E9999",
726
- description: "Errors emitted by the cloud assembly",
727
- interface: "cxapi.SynthesisMessage"
728
- }),
729
- // SDK codes
730
- CDK_SDK_I0000: trace({
731
- code: "CDK_SDK_I0000",
732
- description: "An SDK message."
733
- }),
734
- CDK_SDK_I0100: trace({
735
- code: "CDK_SDK_I0100",
736
- description: "An SDK trace. SDK traces are emitted as traces to the IoHost, but contain the original SDK logging level.",
737
- interface: "SdkTrace"
738
- })
739
- };
740
- var SPAN = {
741
- SYNTH_ASSEMBLY: {
742
- name: "Synthesis",
743
- start: IO.CDK_TOOLKIT_I1001,
744
- end: IO.CDK_TOOLKIT_I1000
745
- },
746
- DEPLOY_STACK: {
747
- name: "Deployment",
748
- start: IO.CDK_TOOLKIT_I5100,
749
- end: IO.CDK_TOOLKIT_I5001
750
- },
751
- ROLLBACK_STACK: {
752
- name: "Rollback",
753
- start: IO.CDK_TOOLKIT_I6100,
754
- end: IO.CDK_TOOLKIT_I6000
755
- },
756
- DIFF_STACK: {
757
- name: "Diff",
758
- start: IO.CDK_TOOLKIT_I4000,
759
- end: IO.CDK_TOOLKIT_I4001
760
- },
761
- DESTROY_STACK: {
762
- name: "Destroy",
763
- start: IO.CDK_TOOLKIT_I7100,
764
- end: IO.CDK_TOOLKIT_I7001
765
- },
766
- DESTROY_ACTION: {
767
- name: "Destroy",
768
- start: IO.CDK_TOOLKIT_I7101,
769
- end: IO.CDK_TOOLKIT_I7000
770
- },
771
- BOOTSTRAP_SINGLE: {
772
- name: "Bootstrap",
773
- start: IO.CDK_TOOLKIT_I9100,
774
- end: IO.CDK_TOOLKIT_I9000
775
- },
776
- BUILD_ASSET: {
777
- name: "Build Asset",
778
- start: IO.CDK_TOOLKIT_I5210,
779
- end: IO.CDK_TOOLKIT_I5211
780
- },
781
- PUBLISH_ASSET: {
782
- name: "Publish Asset",
783
- start: IO.CDK_TOOLKIT_I5220,
784
- end: IO.CDK_TOOLKIT_I5221
785
- },
786
- HOTSWAP: {
787
- name: "hotswap-deployment",
788
- start: IO.CDK_TOOLKIT_I5400,
789
- end: IO.CDK_TOOLKIT_I5410
790
- }
791
- };
792
-
793
- // ../tmp-toolkit-helpers/src/api/io/private/io-default-messages.ts
794
- var util = __toESM(require("util"));
795
- var IoDefaultMessages = class {
796
- constructor(ioHelper) {
797
- this.ioHelper = ioHelper;
798
- }
799
- notify(msg) {
800
- return this.ioHelper.notify(msg);
801
- }
802
- requestResponse(msg) {
803
- return this.ioHelper.requestResponse(msg);
804
- }
805
- error(input, ...args) {
806
- this.emitMessage(IO.DEFAULT_TOOLKIT_ERROR, input, ...args);
807
- }
808
- warn(input, ...args) {
809
- this.emitMessage(IO.DEFAULT_TOOLKIT_WARN, input, ...args);
810
- }
811
- warning(input, ...args) {
812
- this.emitMessage(IO.DEFAULT_TOOLKIT_WARN, input, ...args);
813
- }
814
- info(input, ...args) {
815
- this.emitMessage(IO.DEFAULT_TOOLKIT_INFO, input, ...args);
816
- }
817
- debug(input, ...args) {
818
- this.emitMessage(IO.DEFAULT_TOOLKIT_DEBUG, input, ...args);
819
- }
820
- trace(input, ...args) {
821
- this.emitMessage(IO.DEFAULT_TOOLKIT_TRACE, input, ...args);
822
- }
823
- result(input, ...args) {
824
- const message2 = args.length > 0 ? util.format(input, ...args) : input;
825
- void this.ioHelper.notify({
826
- time: /* @__PURE__ */ new Date(),
827
- code: IO.DEFAULT_TOOLKIT_INFO.code,
828
- level: "result",
829
- message: message2,
830
- data: void 0
831
- });
832
- }
833
- emitMessage(maker, input, ...args) {
834
- const message2 = args.length > 0 ? util.format(input, ...args) : input;
835
- void this.ioHelper.notify(maker.msg(message2));
836
- }
837
- };
838
-
839
- // ../tmp-toolkit-helpers/src/api/require-approval.ts
840
- var RequireApproval = /* @__PURE__ */ ((RequireApproval2) => {
841
- RequireApproval2["NEVER"] = "never";
842
- RequireApproval2["ANY_CHANGE"] = "any-change";
843
- RequireApproval2["BROADENING"] = "broadening";
844
- return RequireApproval2;
845
- })(RequireApproval || {});
846
-
847
- // ../tmp-toolkit-helpers/src/api/diff/diff-formatter.ts
848
- var StringWriteStream = class extends import_stream.Writable {
849
- buffer = [];
850
- constructor() {
851
- super();
852
- }
853
- _write(chunk, _encoding, callback) {
854
- this.buffer.push(chunk.toString());
855
- callback();
856
- }
857
- toString() {
858
- return this.buffer.join("");
859
- }
860
- };
861
- var DiffFormatter = class {
862
- ioHelper;
863
- oldTemplate;
864
- newTemplate;
865
- constructor(props) {
866
- this.ioHelper = props.ioHelper;
867
- this.oldTemplate = props.oldTemplate;
868
- this.newTemplate = props.newTemplate;
869
- }
870
- /**
871
- * Format the stack diff
872
- */
873
- formatStackDiff(options) {
874
- const ioDefaultHelper = new IoDefaultMessages(this.ioHelper);
875
- return this.formatStackDiffHelper(
876
- this.oldTemplate,
877
- options.stackName,
878
- options.nestedStackTemplates,
879
- {
880
- ...options,
881
- ioDefaultHelper
882
- }
883
- );
884
- }
885
- formatStackDiffHelper(oldTemplate, stackName, nestedStackTemplates, options) {
886
- let diff = (0, import_cloudformation_diff.fullDiff)(oldTemplate, this.newTemplate.template, options.changeSet, options.isImport);
887
- const stream = new StringWriteStream();
888
- let numStacksWithChanges = 0;
889
- let formattedDiff = "";
890
- let filteredChangesCount = 0;
891
- try {
892
- if (stackName && (!options.quiet || !diff.isEmpty)) {
893
- stream.write((0, import_node_util.format)(`Stack ${chalk.bold(stackName)}
894
- `));
895
- }
896
- if (!options.quiet && options.isImport) {
897
- stream.write("Parameters and rules created during migration do not affect resource configuration.\n");
898
- }
899
- if (diff.differenceCount && !options.strict) {
900
- const mangledNewTemplate = JSON.parse((0, import_cloudformation_diff.mangleLikeCloudFormation)(JSON.stringify(this.newTemplate.template)));
901
- const mangledDiff = (0, import_cloudformation_diff.fullDiff)(this.oldTemplate, mangledNewTemplate, options.changeSet);
902
- filteredChangesCount = Math.max(0, diff.differenceCount - mangledDiff.differenceCount);
903
- if (filteredChangesCount > 0) {
904
- diff = mangledDiff;
905
- }
906
- }
907
- if (!options.strict) {
908
- obscureDiff(diff);
909
- }
910
- if (!diff.isEmpty) {
911
- numStacksWithChanges++;
912
- (0, import_cloudformation_diff.formatDifferences)(stream, diff, {
913
- ...logicalIdMapFromTemplate(this.oldTemplate),
914
- ...buildLogicalToPathMap(this.newTemplate)
915
- }, options.context);
916
- } else if (!options.quiet) {
917
- stream.write(chalk.green("There were no differences\n"));
918
- }
919
- if (filteredChangesCount > 0) {
920
- stream.write(chalk.yellow(`Omitted ${filteredChangesCount} changes because they are likely mangled non-ASCII characters. Use --strict to print them.
921
- `));
922
- }
923
- } finally {
924
- formattedDiff = stream.toString();
925
- stream.end();
926
- }
927
- for (const nestedStackLogicalId of Object.keys(nestedStackTemplates ?? {})) {
928
- if (!nestedStackTemplates) {
929
- break;
930
- }
931
- const nestedStack = nestedStackTemplates[nestedStackLogicalId];
932
- this.newTemplate._template = nestedStack.generatedTemplate;
933
- const nextDiff = this.formatStackDiffHelper(
934
- nestedStack.deployedTemplate,
935
- nestedStack.physicalName ?? nestedStackLogicalId,
936
- nestedStack.nestedStackTemplates,
937
- options
938
- );
939
- numStacksWithChanges += nextDiff.numStacksWithChanges;
940
- formattedDiff += nextDiff.formattedDiff;
941
- }
942
- return {
943
- numStacksWithChanges,
944
- formattedDiff
945
- };
946
- }
947
- /**
948
- * Format the security diff
949
- */
950
- formatSecurityDiff(options) {
951
- const ioDefaultHelper = new IoDefaultMessages(this.ioHelper);
952
- const diff = (0, import_cloudformation_diff.fullDiff)(this.oldTemplate, this.newTemplate.template, options.changeSet);
953
- if (diffRequiresApproval(diff, options.requireApproval)) {
954
- const stream = new StringWriteStream();
955
- stream.write((0, import_node_util.format)(`Stack ${chalk.bold(options.stackName)}
956
- `));
957
- ioDefaultHelper.warning(`This deployment will make potentially sensitive changes according to your current security approval level (--require-approval ${options.requireApproval}).`);
958
- ioDefaultHelper.warning("Please confirm you intend to make the following modifications:\n");
959
- try {
960
- (0, import_cloudformation_diff.formatSecurityChanges)(stream, diff, buildLogicalToPathMap(this.newTemplate));
961
- } finally {
962
- stream.end();
963
- }
964
- const formattedDiff = stream.toString();
965
- return { formattedDiff };
966
- }
967
- return {};
968
- }
969
- };
970
- function diffRequiresApproval(diff, requireApproval) {
971
- switch (requireApproval) {
972
- case "never" /* NEVER */:
973
- return false;
974
- case "any-change" /* ANY_CHANGE */:
975
- return diff.permissionsAnyChanges;
976
- case "broadening" /* BROADENING */:
977
- return diff.permissionsBroadened;
978
- default:
979
- throw new ToolkitError(`Unrecognized approval level: ${requireApproval}`);
980
- }
981
- }
982
- function buildLogicalToPathMap(stack) {
983
- const map = {};
984
- for (const md of stack.findMetadataByType(cxschema.ArtifactMetadataEntryType.LOGICAL_ID)) {
985
- map[md.data] = md.path;
986
- }
987
- return map;
988
- }
989
- function logicalIdMapFromTemplate(template) {
990
- const ret = {};
991
- for (const [logicalId, resource] of Object.entries(template.Resources ?? {})) {
992
- const path = resource?.Metadata?.["aws:cdk:path"];
993
- if (path) {
994
- ret[logicalId] = path;
995
- }
996
- }
997
- return ret;
998
- }
999
- function obscureDiff(diff) {
1000
- if (diff.unknown) {
1001
- diff.unknown = diff.unknown.filter((change) => {
1002
- if (!change) {
1003
- return true;
1004
- }
1005
- if (change.newValue?.CheckBootstrapVersion) {
1006
- return false;
1007
- }
1008
- if (change.oldValue?.CheckBootstrapVersion) {
1009
- return false;
1010
- }
1011
- return true;
1012
- });
1013
- }
1014
- if (diff.resources) {
1015
- diff.resources = diff.resources.filter((change) => {
1016
- if (!change) {
1017
- return true;
1018
- }
1019
- if (change.newResourceType === "AWS::CDK::Metadata") {
1020
- return false;
1021
- }
1022
- if (change.oldResourceType === "AWS::CDK::Metadata") {
1023
- return false;
1024
- }
1025
- return true;
1026
- });
1027
- }
1028
- }
134
+ // ../tmp-toolkit-helpers/src/api/cloud-assembly/stack-selector.ts
135
+ var StackSelectionStrategy = /* @__PURE__ */ ((StackSelectionStrategy2) => {
136
+ StackSelectionStrategy2["ALL_STACKS"] = "all-stacks";
137
+ StackSelectionStrategy2["MAIN_ASSEMBLY"] = "main-assembly";
138
+ StackSelectionStrategy2["ONLY_SINGLE"] = "only-single";
139
+ StackSelectionStrategy2["PATTERN_MATCH"] = "pattern-match";
140
+ StackSelectionStrategy2["PATTERN_MUST_MATCH"] = "pattern-must-match";
141
+ StackSelectionStrategy2["PATTERN_MUST_MATCH_SINGLE"] = "pattern-must-match-single";
142
+ return StackSelectionStrategy2;
143
+ })(StackSelectionStrategy || {});
144
+ var ExpandStackSelection = /* @__PURE__ */ ((ExpandStackSelection2) => {
145
+ ExpandStackSelection2["NONE"] = "none";
146
+ ExpandStackSelection2["UPSTREAM"] = "upstream";
147
+ ExpandStackSelection2["DOWNSTREAM"] = "downstream";
148
+ return ExpandStackSelection2;
149
+ })(ExpandStackSelection || {});
1029
150
 
1030
- // ../tmp-toolkit-helpers/src/api/io/payloads/diff.ts
151
+ // ../tmp-toolkit-helpers/src/payloads/diff.ts
1031
152
  var PermissionChangeType = /* @__PURE__ */ ((PermissionChangeType2) => {
1032
153
  PermissionChangeType2["NONE"] = "none";
1033
154
  PermissionChangeType2["BROADENING"] = "broadening";
@@ -1035,7 +156,7 @@ var PermissionChangeType = /* @__PURE__ */ ((PermissionChangeType2) => {
1035
156
  return PermissionChangeType2;
1036
157
  })(PermissionChangeType || {});
1037
158
 
1038
- // ../tmp-toolkit-helpers/src/api/io/payloads/hotswap.ts
159
+ // ../tmp-toolkit-helpers/src/payloads/hotswap.ts
1039
160
  var NonHotswappableReason = /* @__PURE__ */ ((NonHotswappableReason2) => {
1040
161
  NonHotswappableReason2["TAGS"] = "tags";
1041
162
  NonHotswappableReason2["PROPERTIES"] = "properties";
@@ -1048,26 +169,14 @@ var NonHotswappableReason = /* @__PURE__ */ ((NonHotswappableReason2) => {
1048
169
  NonHotswappableReason2["NESTED_STACK_CREATION"] = "nested-stack-creation";
1049
170
  return NonHotswappableReason2;
1050
171
  })(NonHotswappableReason || {});
1051
-
1052
- // ../tmp-toolkit-helpers/src/api/resource-import/importer.ts
1053
- function removeNonImportResources(stack) {
1054
- const template = stack.template;
1055
- delete template.Resources.CDKMetadata;
1056
- delete template.Outputs;
1057
- return template;
1058
- }
1059
172
  // Annotate the CommonJS export names for ESM import in node:
1060
173
  0 && (module.exports = {
1061
174
  AssemblyError,
1062
175
  AuthenticationError,
1063
- ContextProviderError,
1064
- DiffFormatter,
1065
176
  ExpandStackSelection,
1066
177
  NonHotswappableReason,
1067
178
  PermissionChangeType,
1068
- RequireApproval,
1069
179
  StackSelectionStrategy,
1070
- ToolkitError,
1071
- removeNonImportResources
180
+ ToolkitError
1072
181
  });
1073
182
  //# sourceMappingURL=shared-public.js.map