@aws-cdk/toolkit-lib 0.1.4 → 0.1.5

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 (77) hide show
  1. package/build-info.json +2 -2
  2. package/lib/actions/bootstrap/index.d.ts +1 -1
  3. package/lib/actions/bootstrap/index.js +1 -1
  4. package/lib/actions/bootstrap/private/helpers.d.ts +1 -1
  5. package/lib/actions/bootstrap/private/helpers.js +1 -1
  6. package/lib/actions/deploy/index.d.ts +4 -2
  7. package/lib/actions/deploy/index.js +4 -1
  8. package/lib/actions/deploy/private/deploy-options.d.ts +1 -1
  9. package/lib/actions/deploy/private/deploy-options.js +1 -1
  10. package/lib/actions/deploy/private/helpers.d.ts +3 -2
  11. package/lib/actions/deploy/private/helpers.js +1 -1
  12. package/lib/actions/diff/private/helpers.d.ts +5 -5
  13. package/lib/actions/diff/private/helpers.js +13 -11
  14. package/lib/actions/list/index.d.ts +0 -4
  15. package/lib/actions/list/index.js +1 -1
  16. package/lib/api/aws-cdk.d.ts +3 -4
  17. package/lib/api/aws-cdk.js +948 -548
  18. package/lib/api/aws-cdk.js.map +4 -4
  19. package/lib/api/cloud-assembly/index.d.ts +1 -1
  20. package/lib/api/cloud-assembly/index.js +2 -2
  21. package/lib/api/cloud-assembly/private/cached-source.d.ts +2 -2
  22. package/lib/api/cloud-assembly/private/cached-source.js +1 -1
  23. package/lib/api/cloud-assembly/private/context-aware-source.d.ts +4 -4
  24. package/lib/api/cloud-assembly/private/context-aware-source.js +11 -12
  25. package/lib/api/cloud-assembly/private/identity-source.d.ts +1 -1
  26. package/lib/api/cloud-assembly/private/identity-source.js +1 -1
  27. package/lib/api/cloud-assembly/private/prepare-source.d.ts +5 -5
  28. package/lib/api/cloud-assembly/private/prepare-source.js +8 -6
  29. package/lib/api/cloud-assembly/private/source-builder.d.ts +4 -4
  30. package/lib/api/cloud-assembly/private/source-builder.js +24 -12
  31. package/lib/api/cloud-assembly/private/stack-assembly.d.ts +3 -3
  32. package/lib/api/cloud-assembly/private/stack-assembly.js +1 -1
  33. package/lib/api/cloud-assembly/private/stack-selectors.d.ts +1 -1
  34. package/lib/api/cloud-assembly/private/stack-selectors.js +1 -1
  35. package/lib/api/cloud-assembly/source-builder.d.ts +36 -0
  36. package/lib/api/cloud-assembly/source-builder.js +1 -1
  37. package/lib/api/cloud-assembly/stack-selector.d.ts +2 -81
  38. package/lib/api/cloud-assembly/stack-selector.js +5 -62
  39. package/lib/api/io/private/index.d.ts +3 -5
  40. package/lib/api/io/private/index.js +7 -6
  41. package/lib/api/io/private/io-host-wrappers.d.ts +17 -0
  42. package/lib/api/io/private/io-host-wrappers.js +74 -0
  43. package/lib/api/io/private/sdk-logger.d.ts +3 -0
  44. package/lib/api/io/private/sdk-logger.js +124 -0
  45. package/lib/api/shared-private.js +655 -26
  46. package/lib/api/shared-private.js.map +4 -4
  47. package/lib/api/shared-public.d.ts +2365 -31
  48. package/lib/api/shared-public.js +78 -5
  49. package/lib/api/shared-public.js.map +4 -4
  50. package/lib/index.d.ts +3 -0
  51. package/lib/index.js +4 -1
  52. package/lib/private/util.js +9 -4
  53. package/lib/private/util.js.map +2 -2
  54. package/lib/toolkit/index.d.ts +1 -1
  55. package/lib/toolkit/index.js +2 -2
  56. package/lib/toolkit/private/index.d.ts +4 -4
  57. package/lib/toolkit/private/index.js +1 -1
  58. package/lib/toolkit/toolkit.d.ts +6 -8
  59. package/lib/toolkit/toolkit.js +148 -122
  60. package/lib/util/concurrency.d.ts +1 -1
  61. package/lib/util/concurrency.js +2 -2
  62. package/package.json +5 -4
  63. package/CODE_REGISTRY.md +0 -38
  64. package/lib/api/cloud-assembly/context.d.ts +0 -9
  65. package/lib/api/cloud-assembly/context.js +0 -3
  66. package/lib/api/io/private/codes.d.ts +0 -47
  67. package/lib/api/io/private/codes.js +0 -175
  68. package/lib/api/io/private/level-priority.d.ts +0 -11
  69. package/lib/api/io/private/level-priority.js +0 -33
  70. package/lib/api/io/private/logger.d.ts +0 -31
  71. package/lib/api/io/private/logger.js +0 -190
  72. package/lib/api/io/private/messages.d.ts +0 -62
  73. package/lib/api/io/private/messages.js +0 -162
  74. package/lib/api/io/private/timer.d.ts +0 -29
  75. package/lib/api/io/private/timer.js +0 -55
  76. package/lib/toolkit/types.d.ts +0 -76
  77. package/lib/toolkit/types.js +0 -3
@@ -23,15 +23,43 @@ __export(shared_public_exports, {
23
23
  AssemblyError: () => AssemblyError,
24
24
  AuthenticationError: () => AuthenticationError,
25
25
  ContextProviderError: () => ContextProviderError,
26
+ ExpandStackSelection: () => ExpandStackSelection,
27
+ PermissionChangeType: () => PermissionChangeType,
28
+ StackSelectionStrategy: () => StackSelectionStrategy,
26
29
  ToolkitError: () => ToolkitError
27
30
  });
28
31
  module.exports = __toCommonJS(shared_public_exports);
29
32
 
33
+ // ../tmp-toolkit-helpers/src/api/cloud-assembly/stack-selector.ts
34
+ var StackSelectionStrategy = /* @__PURE__ */ ((StackSelectionStrategy2) => {
35
+ StackSelectionStrategy2["ALL_STACKS"] = "all-stacks";
36
+ StackSelectionStrategy2["MAIN_ASSEMBLY"] = "main-assembly";
37
+ StackSelectionStrategy2["ONLY_SINGLE"] = "only-single";
38
+ StackSelectionStrategy2["PATTERN_MATCH"] = "pattern-match";
39
+ StackSelectionStrategy2["PATTERN_MUST_MATCH"] = "pattern-must-match";
40
+ StackSelectionStrategy2["PATTERN_MUST_MATCH_SINGLE"] = "pattern-must-match-single";
41
+ return StackSelectionStrategy2;
42
+ })(StackSelectionStrategy || {});
43
+ var ExpandStackSelection = /* @__PURE__ */ ((ExpandStackSelection2) => {
44
+ ExpandStackSelection2["NONE"] = "none";
45
+ ExpandStackSelection2["UPSTREAM"] = "upstream";
46
+ ExpandStackSelection2["DOWNSTREAM"] = "downstream";
47
+ return ExpandStackSelection2;
48
+ })(ExpandStackSelection || {});
49
+
50
+ // ../tmp-toolkit-helpers/src/api/io/payloads/diff.ts
51
+ var PermissionChangeType = /* @__PURE__ */ ((PermissionChangeType2) => {
52
+ PermissionChangeType2["NONE"] = "none";
53
+ PermissionChangeType2["BROADENING"] = "broadening";
54
+ PermissionChangeType2["NON_BROADENING"] = "non-broadening";
55
+ return PermissionChangeType2;
56
+ })(PermissionChangeType || {});
57
+
30
58
  // ../tmp-toolkit-helpers/src/api/toolkit-error.ts
31
- var TOOLKIT_ERROR_SYMBOL = Symbol.for("@aws-cdk/toolkit.ToolkitError");
32
- var AUTHENTICATION_ERROR_SYMBOL = Symbol.for("@aws-cdk/toolkit.AuthenticationError");
33
- var ASSEMBLY_ERROR_SYMBOL = Symbol.for("@aws-cdk/toolkit.AssemblyError");
34
- var CONTEXT_PROVIDER_ERROR_SYMBOL = Symbol.for("@aws-cdk/toolkit.ContextProviderError");
59
+ var TOOLKIT_ERROR_SYMBOL = Symbol.for("@aws-cdk/toolkit-lib.ToolkitError");
60
+ var AUTHENTICATION_ERROR_SYMBOL = Symbol.for("@aws-cdk/toolkit-lib.AuthenticationError");
61
+ var ASSEMBLY_ERROR_SYMBOL = Symbol.for("@aws-cdk/toolkit-lib.AssemblyError");
62
+ var CONTEXT_PROVIDER_ERROR_SYMBOL = Symbol.for("@aws-cdk/toolkit-lib.ContextProviderError");
35
63
  var ToolkitError = class _ToolkitError extends Error {
36
64
  /**
37
65
  * Determines if a given error is an instance of ToolkitError.
@@ -61,15 +89,24 @@ var ToolkitError = class _ToolkitError extends Error {
61
89
  * The type of the error, defaults to "toolkit".
62
90
  */
63
91
  type;
92
+ /**
93
+ * Denotes the source of the error as the toolkit.
94
+ */
95
+ source;
64
96
  constructor(message, type = "toolkit") {
65
97
  super(message);
66
98
  Object.setPrototypeOf(this, _ToolkitError.prototype);
67
99
  Object.defineProperty(this, TOOLKIT_ERROR_SYMBOL, { value: true });
68
100
  this.name = new.target.name;
69
101
  this.type = type;
102
+ this.source = "toolkit";
70
103
  }
71
104
  };
72
105
  var AuthenticationError = class _AuthenticationError extends ToolkitError {
106
+ /**
107
+ * Denotes the source of the error as user.
108
+ */
109
+ source = "user";
73
110
  constructor(message) {
74
111
  super(message, "authentication");
75
112
  Object.setPrototypeOf(this, _AuthenticationError.prototype);
@@ -77,13 +114,46 @@ var AuthenticationError = class _AuthenticationError extends ToolkitError {
77
114
  }
78
115
  };
79
116
  var AssemblyError = class _AssemblyError extends ToolkitError {
80
- constructor(message) {
117
+ /**
118
+ * An AssemblyError with an original error as cause
119
+ */
120
+ static withCause(message, error) {
121
+ return new _AssemblyError(message, void 0, error);
122
+ }
123
+ /**
124
+ * An AssemblyError with a list of stacks as cause
125
+ */
126
+ static withStacks(message, stacks) {
127
+ return new _AssemblyError(message, stacks);
128
+ }
129
+ /**
130
+ * Denotes the source of the error as user.
131
+ */
132
+ source = "user";
133
+ /**
134
+ * The stacks that caused the error, if available
135
+ *
136
+ * The `messages` property of each `cxapi.CloudFormationStackArtifact` will contain the respective errors.
137
+ * Absence indicates synthesis didn't fully complete.
138
+ */
139
+ stacks;
140
+ /**
141
+ * The specific original cause of the error, if available
142
+ */
143
+ cause;
144
+ constructor(message, stacks, cause) {
81
145
  super(message, "assembly");
82
146
  Object.setPrototypeOf(this, _AssemblyError.prototype);
83
147
  Object.defineProperty(this, ASSEMBLY_ERROR_SYMBOL, { value: true });
148
+ this.stacks = stacks;
149
+ this.cause = cause;
84
150
  }
85
151
  };
86
152
  var ContextProviderError = class _ContextProviderError extends ToolkitError {
153
+ /**
154
+ * Denotes the source of the error as user.
155
+ */
156
+ source = "user";
87
157
  constructor(message) {
88
158
  super(message, "context-provider");
89
159
  Object.setPrototypeOf(this, _ContextProviderError.prototype);
@@ -95,6 +165,9 @@ var ContextProviderError = class _ContextProviderError extends ToolkitError {
95
165
  AssemblyError,
96
166
  AuthenticationError,
97
167
  ContextProviderError,
168
+ ExpandStackSelection,
169
+ PermissionChangeType,
170
+ StackSelectionStrategy,
98
171
  ToolkitError
99
172
  });
100
173
  //# sourceMappingURL=shared-public.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["shared-public.ts", "../../../tmp-toolkit-helpers/src/api/toolkit-error.ts"],
4
- "sourcesContent": ["/* eslint-disable import/no-restricted-paths */\n\nexport * from '../../../tmp-toolkit-helpers/src/api';\n", "const TOOLKIT_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit.ToolkitError');\nconst AUTHENTICATION_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit.AuthenticationError');\nconst ASSEMBLY_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit.AssemblyError');\nconst CONTEXT_PROVIDER_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit.ContextProviderError');\n\n/**\n * Represents a general toolkit error in the AWS CDK Toolkit.\n */\nexport class ToolkitError extends Error {\n /**\n * Determines if a given error is an instance of ToolkitError.\n */\n public static isToolkitError(x: any): x is ToolkitError {\n return x !== null && typeof(x) === 'object' && TOOLKIT_ERROR_SYMBOL in x;\n }\n\n /**\n * Determines if a given error is an instance of AuthenticationError.\n */\n public static isAuthenticationError(x: any): x is AuthenticationError {\n return this.isToolkitError(x) && AUTHENTICATION_ERROR_SYMBOL in x;\n }\n\n /**\n * Determines if a given error is an instance of AssemblyError.\n */\n public static isAssemblyError(x: any): x is AssemblyError {\n return this.isToolkitError(x) && ASSEMBLY_ERROR_SYMBOL in x;\n }\n\n /**\n * Determines if a given error is an instance of AssemblyError.\n */\n public static isContextProviderError(x: any): x is ContextProviderError {\n return this.isToolkitError(x) && CONTEXT_PROVIDER_ERROR_SYMBOL in x;\n }\n\n /**\n * The type of the error, defaults to \"toolkit\".\n */\n public readonly type: string;\n\n constructor(message: string, type: string = 'toolkit') {\n super(message);\n Object.setPrototypeOf(this, ToolkitError.prototype);\n Object.defineProperty(this, TOOLKIT_ERROR_SYMBOL, { value: true });\n this.name = new.target.name;\n this.type = type;\n }\n}\n\n/**\n * Represents an authentication-specific error in the AWS CDK Toolkit.\n */\nexport class AuthenticationError extends ToolkitError {\n constructor(message: string) {\n super(message, 'authentication');\n Object.setPrototypeOf(this, AuthenticationError.prototype);\n Object.defineProperty(this, AUTHENTICATION_ERROR_SYMBOL, { value: true });\n }\n}\n\n/**\n * Represents an authentication-specific error in the AWS CDK Toolkit.\n */\nexport class AssemblyError extends ToolkitError {\n constructor(message: string) {\n super(message, 'assembly');\n Object.setPrototypeOf(this, AssemblyError.prototype);\n Object.defineProperty(this, ASSEMBLY_ERROR_SYMBOL, { value: true });\n }\n}\n\n/**\n * Represents an error originating from a Context Provider\n */\nexport class ContextProviderError extends ToolkitError {\n constructor(message: string) {\n super(message, 'context-provider');\n Object.setPrototypeOf(this, ContextProviderError.prototype);\n Object.defineProperty(this, CONTEXT_PROVIDER_ERROR_SYMBOL, { value: true });\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAM,uBAAuB,OAAO,IAAI,+BAA+B;AACvE,IAAM,8BAA8B,OAAO,IAAI,sCAAsC;AACrF,IAAM,wBAAwB,OAAO,IAAI,gCAAgC;AACzE,IAAM,gCAAgC,OAAO,IAAI,uCAAuC;AAKjF,IAAM,eAAN,MAAM,sBAAqB,MAAM;AAAA;AAAA;AAAA;AAAA,EAItC,OAAc,eAAe,GAA2B;AACtD,WAAO,MAAM,QAAQ,OAAO,MAAO,YAAY,wBAAwB;AAAA,EACzE;AAAA;AAAA;AAAA;AAAA,EAKA,OAAc,sBAAsB,GAAkC;AACpE,WAAO,KAAK,eAAe,CAAC,KAAK,+BAA+B;AAAA,EAClE;AAAA;AAAA;AAAA;AAAA,EAKA,OAAc,gBAAgB,GAA4B;AACxD,WAAO,KAAK,eAAe,CAAC,KAAK,yBAAyB;AAAA,EAC5D;AAAA;AAAA;AAAA;AAAA,EAKA,OAAc,uBAAuB,GAAmC;AACtE,WAAO,KAAK,eAAe,CAAC,KAAK,iCAAiC;AAAA,EACpE;AAAA;AAAA;AAAA;AAAA,EAKgB;AAAA,EAEhB,YAAY,SAAiB,OAAe,WAAW;AACrD,UAAM,OAAO;AACb,WAAO,eAAe,MAAM,cAAa,SAAS;AAClD,WAAO,eAAe,MAAM,sBAAsB,EAAE,OAAO,KAAK,CAAC;AACjE,SAAK,OAAO,WAAW;AACvB,SAAK,OAAO;AAAA,EACd;AACF;AAKO,IAAM,sBAAN,MAAM,6BAA4B,aAAa;AAAA,EACpD,YAAY,SAAiB;AAC3B,UAAM,SAAS,gBAAgB;AAC/B,WAAO,eAAe,MAAM,qBAAoB,SAAS;AACzD,WAAO,eAAe,MAAM,6BAA6B,EAAE,OAAO,KAAK,CAAC;AAAA,EAC1E;AACF;AAKO,IAAM,gBAAN,MAAM,uBAAsB,aAAa;AAAA,EAC9C,YAAY,SAAiB;AAC3B,UAAM,SAAS,UAAU;AACzB,WAAO,eAAe,MAAM,eAAc,SAAS;AACnD,WAAO,eAAe,MAAM,uBAAuB,EAAE,OAAO,KAAK,CAAC;AAAA,EACpE;AACF;AAKO,IAAM,uBAAN,MAAM,8BAA6B,aAAa;AAAA,EACrD,YAAY,SAAiB;AAC3B,UAAM,SAAS,kBAAkB;AACjC,WAAO,eAAe,MAAM,sBAAqB,SAAS;AAC1D,WAAO,eAAe,MAAM,+BAA+B,EAAE,OAAO,KAAK,CAAC;AAAA,EAC5E;AACF;",
6
- "names": []
3
+ "sources": ["shared-public.ts", "../../../tmp-toolkit-helpers/src/api/cloud-assembly/stack-selector.ts", "../../../tmp-toolkit-helpers/src/api/io/payloads/diff.ts", "../../../tmp-toolkit-helpers/src/api/toolkit-error.ts"],
4
+ "sourcesContent": ["/* eslint-disable import/no-restricted-paths */\n\nexport * from '../../../tmp-toolkit-helpers/src/api';\n", "/**\n * Which stacks should be selected from a cloud assembly\n */\nexport enum StackSelectionStrategy {\n /**\n * Returns all stacks in the app regardless of patterns,\n * including stacks inside nested assemblies.\n */\n ALL_STACKS = 'all-stacks',\n\n /**\n * Returns all stacks in the main (top level) assembly only.\n */\n MAIN_ASSEMBLY = 'main-assembly',\n\n /**\n * If the assembly includes a single stack, returns it.\n * Otherwise throws an exception.\n */\n ONLY_SINGLE = 'only-single',\n\n /**\n * Return stacks matched by patterns.\n * If no stacks are found, execution is halted successfully.\n * Most likely you don't want to use this but `StackSelectionStrategy.MUST_MATCH_PATTERN`\n */\n PATTERN_MATCH = 'pattern-match',\n\n /**\n * Return stacks matched by patterns.\n * Throws an exception if the patterns don't match at least one stack in the assembly.\n */\n PATTERN_MUST_MATCH = 'pattern-must-match',\n\n /**\n * Returns if exactly one stack is matched by the pattern(s).\n * Throws an exception if no stack, or more than exactly one stack are matched.\n */\n PATTERN_MUST_MATCH_SINGLE = 'pattern-must-match-single',\n}\n\n/**\n * When selecting stacks, what other stacks to include because of dependencies\n */\nexport enum ExpandStackSelection {\n /**\n * Don't select any extra stacks\n */\n NONE = 'none',\n\n /**\n * Include stacks that this stack depends on\n */\n UPSTREAM = 'upstream',\n\n /**\n * Include stacks that depend on this stack\n */\n DOWNSTREAM = 'downstream',\n\n /**\n * @TODO\n * Include both directions.\n * I.e. stacks that this stack depends on, and stacks that depend on this stack.\n */\n // FULL = 'full',\n}\n\n/**\n * A specification of which stacks should be selected\n */\nexport interface StackSelector {\n /**\n * The behavior if if no selectors are provided.\n */\n strategy: StackSelectionStrategy;\n\n /**\n * A list of patterns to match the stack hierarchical ids\n * Only used with `PATTERN_*` selection strategies.\n */\n patterns?: string[];\n\n /**\n * Expand the selection to upstream/downstream stacks.\n * @default ExpandStackSelection.None only select the specified/matched stacks\n */\n expand?: ExpandStackSelection;\n\n /**\n * By default, we throw an exception if the assembly contains no stacks.\n * Set to `false`, to halt execution for empty assemblies without error.\n *\n * Note that actions can still throw if a stack selection result is empty,\n * but the assembly contains stacks in principle.\n *\n * @default true\n */\n failOnEmpty?: boolean;\n}\n", "/**\n * Different types of permission related changes in a diff\n */\nexport enum PermissionChangeType {\n /**\n * No permission changes\n */\n NONE = 'none',\n\n /**\n * Permissions are broadening\n */\n BROADENING = 'broadening',\n\n /**\n * Permissions are changed but not broadening\n */\n NON_BROADENING = 'non-broadening',\n}\n", "import type * as cxapi from '@aws-cdk/cx-api';\n\nconst TOOLKIT_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit-lib.ToolkitError');\nconst AUTHENTICATION_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit-lib.AuthenticationError');\nconst ASSEMBLY_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit-lib.AssemblyError');\nconst CONTEXT_PROVIDER_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit-lib.ContextProviderError');\n\n/**\n * Represents a general toolkit error in the AWS CDK Toolkit.\n */\nexport class ToolkitError extends Error {\n /**\n * Determines if a given error is an instance of ToolkitError.\n */\n public static isToolkitError(x: any): x is ToolkitError {\n return x !== null && typeof(x) === 'object' && TOOLKIT_ERROR_SYMBOL in x;\n }\n\n /**\n * Determines if a given error is an instance of AuthenticationError.\n */\n public static isAuthenticationError(x: any): x is AuthenticationError {\n return this.isToolkitError(x) && AUTHENTICATION_ERROR_SYMBOL in x;\n }\n\n /**\n * Determines if a given error is an instance of AssemblyError.\n */\n public static isAssemblyError(x: any): x is AssemblyError {\n return this.isToolkitError(x) && ASSEMBLY_ERROR_SYMBOL in x;\n }\n\n /**\n * Determines if a given error is an instance of AssemblyError.\n */\n public static isContextProviderError(x: any): x is ContextProviderError {\n return this.isToolkitError(x) && CONTEXT_PROVIDER_ERROR_SYMBOL in x;\n }\n\n /**\n * The type of the error, defaults to \"toolkit\".\n */\n public readonly type: string;\n\n /**\n * Denotes the source of the error as the toolkit.\n */\n public readonly source: 'toolkit' | 'user';\n\n constructor(message: string, type: string = 'toolkit') {\n super(message);\n Object.setPrototypeOf(this, ToolkitError.prototype);\n Object.defineProperty(this, TOOLKIT_ERROR_SYMBOL, { value: true });\n this.name = new.target.name;\n this.type = type;\n this.source = 'toolkit';\n }\n}\n\n/**\n * Represents an authentication-specific error in the AWS CDK Toolkit.\n */\nexport class AuthenticationError extends ToolkitError {\n /**\n * Denotes the source of the error as user.\n */\n public readonly source = 'user';\n\n constructor(message: string) {\n super(message, 'authentication');\n Object.setPrototypeOf(this, AuthenticationError.prototype);\n Object.defineProperty(this, AUTHENTICATION_ERROR_SYMBOL, { value: true });\n }\n}\n\n/**\n * Represents an error causes by cloud assembly synthesis\n *\n * This includes errors thrown during app execution, as well as failing annotations.\n */\nexport class AssemblyError extends ToolkitError {\n /**\n * An AssemblyError with an original error as cause\n */\n public static withCause(message: string, error: unknown): AssemblyError {\n return new AssemblyError(message, undefined, error);\n }\n\n /**\n * An AssemblyError with a list of stacks as cause\n */\n public static withStacks(message: string, stacks?: cxapi.CloudFormationStackArtifact[]): AssemblyError {\n return new AssemblyError(message, stacks);\n }\n\n /**\n * Denotes the source of the error as user.\n */\n public readonly source = 'user';\n\n /**\n * The stacks that caused the error, if available\n *\n * The `messages` property of each `cxapi.CloudFormationStackArtifact` will contain the respective errors.\n * Absence indicates synthesis didn't fully complete.\n */\n public readonly stacks?: cxapi.CloudFormationStackArtifact[];\n\n /**\n * The specific original cause of the error, if available\n */\n public readonly cause?: unknown;\n\n private constructor(message: string, stacks?: cxapi.CloudFormationStackArtifact[], cause?: unknown) {\n super(message, 'assembly');\n Object.setPrototypeOf(this, AssemblyError.prototype);\n Object.defineProperty(this, ASSEMBLY_ERROR_SYMBOL, { value: true });\n this.stacks = stacks;\n this.cause = cause;\n }\n}\n\n/**\n * Represents an error originating from a Context Provider\n */\nexport class ContextProviderError extends ToolkitError {\n /**\n * Denotes the source of the error as user.\n */\n public readonly source = 'user';\n\n constructor(message: string) {\n super(message, 'context-provider');\n Object.setPrototypeOf(this, ContextProviderError.prototype);\n Object.defineProperty(this, CONTEXT_PROVIDER_ERROR_SYMBOL, { value: true });\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACGO,IAAK,yBAAL,kBAAKA,4BAAL;AAKL,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,CAAC;AAAA,EAC5E;AACF;",
6
+ "names": ["StackSelectionStrategy", "ExpandStackSelection", "PermissionChangeType"]
7
7
  }
package/lib/index.d.ts CHANGED
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module toolkit-lib
3
+ */
1
4
  export * from './toolkit';
2
5
  export * from './actions';
3
6
  export * from './api/aws-auth';
package/lib/index.js CHANGED
@@ -1,4 +1,7 @@
1
1
  "use strict";
2
+ /**
3
+ * @module toolkit-lib
4
+ */
2
5
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
6
  if (k2 === undefined) k2 = k;
4
7
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -22,4 +25,4 @@ __exportStar(require("./api/aws-auth"), exports);
22
25
  __exportStar(require("./api/cloud-assembly"), exports);
23
26
  __exportStar(require("./api/io"), exports);
24
27
  __exportStar(require("./api/shared-public"), exports);
25
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsZ0JBQWdCO0FBQ2hCLDRDQUEwQjtBQUMxQiw0Q0FBMEI7QUFFMUIsa0JBQWtCO0FBQ2xCLGlEQUErQjtBQUMvQix1REFBcUM7QUFDckMsMkNBQXlCO0FBQ3pCLHNEQUFvQyIsInNvdXJjZXNDb250ZW50IjpbIi8vIFRoZSBtYWluIHNob3dcbmV4cG9ydCAqIGZyb20gJy4vdG9vbGtpdCc7XG5leHBvcnQgKiBmcm9tICcuL2FjdGlvbnMnO1xuXG4vLyBTdXBwb3J0aW5nIGFjdHNcbmV4cG9ydCAqIGZyb20gJy4vYXBpL2F3cy1hdXRoJztcbmV4cG9ydCAqIGZyb20gJy4vYXBpL2Nsb3VkLWFzc2VtYmx5JztcbmV4cG9ydCAqIGZyb20gJy4vYXBpL2lvJztcbmV4cG9ydCAqIGZyb20gJy4vYXBpL3NoYXJlZC1wdWJsaWMnO1xuIl19
28
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7O0dBRUc7Ozs7Ozs7Ozs7Ozs7Ozs7QUFFSCxnQkFBZ0I7QUFDaEIsNENBQTBCO0FBQzFCLDRDQUEwQjtBQUUxQixrQkFBa0I7QUFDbEIsaURBQStCO0FBQy9CLHVEQUFxQztBQUNyQywyQ0FBeUI7QUFDekIsc0RBQW9DIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBAbW9kdWxlIHRvb2xraXQtbGliXG4gKi9cblxuLy8gVGhlIG1haW4gc2hvd1xuZXhwb3J0ICogZnJvbSAnLi90b29sa2l0JztcbmV4cG9ydCAqIGZyb20gJy4vYWN0aW9ucyc7XG5cbi8vIFN1cHBvcnRpbmcgYWN0c1xuZXhwb3J0ICogZnJvbSAnLi9hcGkvYXdzLWF1dGgnO1xuZXhwb3J0ICogZnJvbSAnLi9hcGkvY2xvdWQtYXNzZW1ibHknO1xuZXhwb3J0ICogZnJvbSAnLi9hcGkvaW8nO1xuZXhwb3J0ICogZnJvbSAnLi9hcGkvc2hhcmVkLXB1YmxpYyc7XG4iXX0=
@@ -247,10 +247,10 @@ var os = __toESM(require("os"));
247
247
  var path2 = __toESM(require("path"));
248
248
 
249
249
  // ../tmp-toolkit-helpers/src/api/toolkit-error.ts
250
- var TOOLKIT_ERROR_SYMBOL = Symbol.for("@aws-cdk/toolkit.ToolkitError");
251
- var AUTHENTICATION_ERROR_SYMBOL = Symbol.for("@aws-cdk/toolkit.AuthenticationError");
252
- var ASSEMBLY_ERROR_SYMBOL = Symbol.for("@aws-cdk/toolkit.AssemblyError");
253
- var CONTEXT_PROVIDER_ERROR_SYMBOL = Symbol.for("@aws-cdk/toolkit.ContextProviderError");
250
+ var TOOLKIT_ERROR_SYMBOL = Symbol.for("@aws-cdk/toolkit-lib.ToolkitError");
251
+ var AUTHENTICATION_ERROR_SYMBOL = Symbol.for("@aws-cdk/toolkit-lib.AuthenticationError");
252
+ var ASSEMBLY_ERROR_SYMBOL = Symbol.for("@aws-cdk/toolkit-lib.AssemblyError");
253
+ var CONTEXT_PROVIDER_ERROR_SYMBOL = Symbol.for("@aws-cdk/toolkit-lib.ContextProviderError");
254
254
  var ToolkitError = class _ToolkitError extends Error {
255
255
  /**
256
256
  * Determines if a given error is an instance of ToolkitError.
@@ -280,12 +280,17 @@ var ToolkitError = class _ToolkitError extends Error {
280
280
  * The type of the error, defaults to "toolkit".
281
281
  */
282
282
  type;
283
+ /**
284
+ * Denotes the source of the error as the toolkit.
285
+ */
286
+ source;
283
287
  constructor(message, type = "toolkit") {
284
288
  super(message);
285
289
  Object.setPrototypeOf(this, _ToolkitError.prototype);
286
290
  Object.defineProperty(this, TOOLKIT_ERROR_SYMBOL, { value: true });
287
291
  this.name = new.target.name;
288
292
  this.type = type;
293
+ this.source = "toolkit";
289
294
  }
290
295
  };
291
296
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["util.ts", "../../../tmp-toolkit-helpers/src/util/archive.ts", "../../../tmp-toolkit-helpers/src/util/format-error.ts", "../../../tmp-toolkit-helpers/src/util/arrays.ts", "../../../tmp-toolkit-helpers/src/util/bool.ts", "../../../tmp-toolkit-helpers/src/util/bytes.ts", "../../../tmp-toolkit-helpers/src/util/cloudformation.ts", "../../../tmp-toolkit-helpers/src/util/content-hash.ts", "../../../tmp-toolkit-helpers/src/util/directories.ts", "../../../tmp-toolkit-helpers/src/api/toolkit-error.ts", "../../../tmp-toolkit-helpers/src/util/json.ts", "../../../tmp-toolkit-helpers/src/util/types.ts", "../../../tmp-toolkit-helpers/src/util/objects.ts", "../../../tmp-toolkit-helpers/src/util/parallel.ts", "../../../tmp-toolkit-helpers/src/util/serialize.ts", "../../../tmp-toolkit-helpers/src/util/yaml-cfn.ts", "../../../tmp-toolkit-helpers/src/util/string-manipulation.ts", "../../../tmp-toolkit-helpers/src/util/type-brands.ts", "../../../tmp-toolkit-helpers/src/util/version-range.ts"],
4
- "sourcesContent": ["/* eslint-disable import/no-restricted-paths */\n\nexport * from '../../../tmp-toolkit-helpers/src/util';\n", "import { error } from 'console';\nimport { createWriteStream, promises as fs } from 'fs';\nimport * as path from 'path';\nimport * as glob from 'glob';\nimport { formatErrorMessage } from './format-error';\n\n// eslint-disable-next-line @typescript-eslint/no-require-imports\nconst archiver = require('archiver');\n\n// Adapted from cdk-assets\nexport async function zipDirectory(directory: string, outputFile: string): Promise<void> {\n // We write to a temporary file and rename at the last moment. This is so that if we are\n // interrupted during this process, we don't leave a half-finished file in the target location.\n const temporaryOutputFile = `${outputFile}.${randomString()}._tmp`;\n await writeZipFile(directory, temporaryOutputFile);\n await moveIntoPlace(temporaryOutputFile, outputFile);\n}\n\nfunction writeZipFile(directory: string, outputFile: string): Promise<void> {\n return new Promise(async (ok, fail) => {\n // The below options are needed to support following symlinks when building zip files:\n // - nodir: This will prevent symlinks themselves from being copied into the zip.\n // - follow: This will follow symlinks and copy the files within.\n const globOptions = {\n dot: true,\n nodir: true,\n follow: true,\n cwd: directory,\n };\n const files = glob.sync('**', globOptions); // The output here is already sorted\n\n const output = createWriteStream(outputFile);\n\n const archive = archiver('zip');\n archive.on('warning', fail);\n archive.on('error', fail);\n\n // archive has been finalized and the output file descriptor has closed, resolve promise\n // this has to be done before calling `finalize` since the events may fire immediately after.\n // see https://www.npmjs.com/package/archiver\n output.once('close', ok);\n\n archive.pipe(output);\n\n // Append files serially to ensure file order\n for (const file of files) {\n const fullPath = path.resolve(directory, file);\n // Exactly 2 promises\n // eslint-disable-next-line @cdklabs/promiseall-no-unbounded-parallelism\n const [data, stat] = await Promise.all([fs.readFile(fullPath), fs.stat(fullPath)]);\n archive.append(data, {\n name: file,\n mode: stat.mode,\n });\n }\n\n await archive.finalize();\n });\n}\n\n/**\n * Rename the file to the target location, taking into account:\n *\n * - That we may see EPERM on Windows while an Antivirus scanner still has the\n * file open, so retry a couple of times.\n * - This same function may be called in parallel and be interrupted at any point.\n */\nasync function moveIntoPlace(source: string, target: string) {\n let delay = 100;\n let attempts = 5;\n while (true) {\n try {\n // 'rename' is guaranteed to overwrite an existing target, as long as it is a file (not a directory)\n await fs.rename(source, target);\n return;\n } catch (e: any) {\n if (e.code !== 'EPERM' || attempts-- <= 0) {\n throw e;\n }\n error(formatErrorMessage(e));\n await sleep(Math.floor(Math.random() * delay));\n delay *= 2;\n }\n }\n}\n\nfunction sleep(ms: number) {\n return new Promise(ok => setTimeout(ok, ms));\n}\n\nfunction randomString() {\n return Math.random().toString(36).replace(/[^a-z0-9]+/g, '');\n}\n", "/**\n * Takes in an error and returns a correctly formatted string of its error message.\n * If it is an AggregateError, it will return a string with all the inner errors\n * formatted and separated by a newline.\n *\n * @param error The error to format\n * @returns A string with the error message(s) of the error\n */\nexport function formatErrorMessage(error: any): string {\n if (error && Array.isArray(error.errors)) {\n const innerMessages = error.errors\n .map((innerError: { message: any; toString: () => any }) => (innerError?.message || innerError?.toString()))\n .join('\\n');\n return `AggregateError: ${innerMessages}`;\n }\n\n // Fallback for regular Error or other types\n return error?.message || error?.toString() || 'Unknown error';\n}\n", "/**\n * Map a function over an array and concatenate the results\n */\nexport function flatMap<T, U>(xs: T[], fn: ((x: T, i: number) => U[])): U[] {\n return flatten(xs.map(fn));\n}\n\n/**\n * Flatten a list of lists into a list of elements\n */\nexport function flatten<T>(xs: T[][]): T[] {\n return Array.prototype.concat.apply([], xs);\n}\n\n/**\n * Partition a collection by removing and returning all elements that match a predicate\n *\n * Note: the input collection is modified in-place!\n */\nexport function partition<T>(collection: T[], pred: (x: T) => boolean): T[] {\n const ret: T[] = [];\n let i = 0;\n while (i < collection.length) {\n if (pred(collection[i])) {\n ret.push(collection.splice(i, 1)[0]);\n } else {\n i++;\n }\n }\n return ret;\n}\n", "/**\n * Converts a boolean into a number.\n *\n * @param bool input boolean\n * @returns 1 if bool is true, and 0 if false\n */\nexport function numberFromBool(bool: boolean): number {\n return +bool;\n}\n", "/**\n * Format bytes as a human readable string\n *\n * @param bytes Number of bytes to format\n * @param decimals Number of decimal places to show (default 2)\n * @returns Formatted string with appropriate unit suffix\n */\nexport function formatBytes(bytes: number, decimals: number = 2): string {\n decimals = decimals < 0 ? 0 : decimals;\n\n if (bytes === 0) {\n return '0 Bytes';\n }\n\n const k = 1024;\n const sizes = ['Bytes', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB'];\n\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n\n return `${parseFloat((bytes / Math.pow(k, i)).toFixed(decimals))} ${sizes[i]}`;\n}\n", "/**\n * Validate SNS topic arn\n */\nexport function validateSnsTopicArn(arn: string): boolean {\n return /^arn:aws:sns:[a-z0-9\\-]+:[0-9]+:[a-z0-9\\-\\_]+$/i.test(arn);\n}\n\n/**\n * Does a Stack Event have an error message based on the status.\n */\nexport function stackEventHasErrorMessage(status: string): boolean {\n return status.endsWith('_FAILED') || status === 'ROLLBACK_IN_PROGRESS' || status === 'UPDATE_ROLLBACK_IN_PROGRESS';\n}\n\n/**\n * Calculate the maximal length of all resource types for a given template.\n *\n * @param template the stack template to analyze\n * @param startWidth the initial width to start with. Defaults to the length of 'AWS::CloudFormation::Stack'.\n * @returns the determined width\n */\nexport function maxResourceTypeLength(template: any, startWidth = 'AWS::CloudFormation::Stack'.length): number {\n const resources = (template && template.Resources) || {};\n let maxWidth = startWidth;\n for (const id of Object.keys(resources)) {\n const type = resources[id].Type || '';\n if (type.length > maxWidth) {\n maxWidth = type.length;\n }\n }\n return maxWidth;\n}\n", "import * as crypto from 'crypto';\n\nexport function contentHash(data: string | Buffer | DataView) {\n return crypto.createHash('sha256').update(data).digest('hex');\n}\n\n/**\n * A stably sorted hash of an arbitrary JS object\n */\nexport function contentHashAny(value: unknown) {\n const ret = crypto.createHash('sha256');\n recurse(value);\n return ret.digest('hex');\n\n function recurse(x: unknown) {\n if (typeof x === 'string') {\n ret.update(x);\n return;\n }\n\n if (Array.isArray(x)) {\n ret.update('[');\n for (const e of x) {\n recurse(e);\n ret.update('||');\n }\n ret.update(']');\n return;\n }\n\n if (x && typeof x === 'object') {\n ret.update('{');\n for (const key of Object.keys(x).sort()) {\n ret.update(key);\n ret.update(':');\n recurse((x as any)[key]);\n }\n ret.update('}');\n return;\n }\n\n ret.update(`${x}${typeof x}`); // typeof to make sure hash('123') !== hash(123)\n }\n}\n", "import * as fs from 'fs';\nimport * as os from 'os';\nimport * as path from 'path';\nimport { ToolkitError } from '../api/toolkit-error';\n\n/**\n * Return a location that will be used as the CDK home directory.\n * Currently the only thing that is placed here is the cache.\n *\n * First try to use the users home directory (i.e. /home/someuser/),\n * but if that directory does not exist for some reason create a tmp directory.\n *\n * Typically it wouldn't make sense to create a one time use tmp directory for\n * the purpose of creating a cache, but since this only applies to users that do\n * not have a home directory (some CI systems?) this should be fine.\n */\nexport function cdkHomeDir() {\n const tmpDir = fs.realpathSync(os.tmpdir());\n let home;\n try {\n let userInfoHome: string | undefined = os.userInfo().homedir;\n // Node returns this if the user doesn't have a home directory\n /* istanbul ignore if: will not happen in normal setups */\n if (userInfoHome == '/var/empty') {\n userInfoHome = undefined;\n }\n home = path.join((userInfoHome ?? os.homedir()).trim(), '.cdk');\n } catch {\n }\n return process.env.CDK_HOME\n ? path.resolve(process.env.CDK_HOME)\n : home || fs.mkdtempSync(path.join(tmpDir, '.cdk')).trim();\n}\n\nexport function cdkCacheDir() {\n return path.join(cdkHomeDir(), 'cache');\n}\n\n/**\n * From the start location, find the directory that contains the bundled package's package.json\n *\n * You must assume the caller of this function will be bundled and the package root dir\n * is not going to be the same as the package the caller currently lives in.\n */\nexport function bundledPackageRootDir(start: string): string;\nexport function bundledPackageRootDir(start: string, fail: true): string;\nexport function bundledPackageRootDir(start: string, fail: false): string | undefined;\nexport function bundledPackageRootDir(start: string, fail?: boolean) {\n function _rootDir(dirname: string): string | undefined {\n const manifestPath = path.join(dirname, 'package.json');\n if (fs.existsSync(manifestPath)) {\n return dirname;\n }\n if (path.dirname(dirname) === dirname) {\n if (fail ?? true) {\n throw new ToolkitError('Unable to find package manifest');\n }\n return undefined;\n }\n return _rootDir(path.dirname(dirname));\n }\n\n return _rootDir(start);\n}\n", "const TOOLKIT_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit.ToolkitError');\nconst AUTHENTICATION_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit.AuthenticationError');\nconst ASSEMBLY_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit.AssemblyError');\nconst CONTEXT_PROVIDER_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit.ContextProviderError');\n\n/**\n * Represents a general toolkit error in the AWS CDK Toolkit.\n */\nexport class ToolkitError extends Error {\n /**\n * Determines if a given error is an instance of ToolkitError.\n */\n public static isToolkitError(x: any): x is ToolkitError {\n return x !== null && typeof(x) === 'object' && TOOLKIT_ERROR_SYMBOL in x;\n }\n\n /**\n * Determines if a given error is an instance of AuthenticationError.\n */\n public static isAuthenticationError(x: any): x is AuthenticationError {\n return this.isToolkitError(x) && AUTHENTICATION_ERROR_SYMBOL in x;\n }\n\n /**\n * Determines if a given error is an instance of AssemblyError.\n */\n public static isAssemblyError(x: any): x is AssemblyError {\n return this.isToolkitError(x) && ASSEMBLY_ERROR_SYMBOL in x;\n }\n\n /**\n * Determines if a given error is an instance of AssemblyError.\n */\n public static isContextProviderError(x: any): x is ContextProviderError {\n return this.isToolkitError(x) && CONTEXT_PROVIDER_ERROR_SYMBOL in x;\n }\n\n /**\n * The type of the error, defaults to \"toolkit\".\n */\n public readonly type: string;\n\n constructor(message: string, type: string = 'toolkit') {\n super(message);\n Object.setPrototypeOf(this, ToolkitError.prototype);\n Object.defineProperty(this, TOOLKIT_ERROR_SYMBOL, { value: true });\n this.name = new.target.name;\n this.type = type;\n }\n}\n\n/**\n * Represents an authentication-specific error in the AWS CDK Toolkit.\n */\nexport class AuthenticationError extends ToolkitError {\n constructor(message: string) {\n super(message, 'authentication');\n Object.setPrototypeOf(this, AuthenticationError.prototype);\n Object.defineProperty(this, AUTHENTICATION_ERROR_SYMBOL, { value: true });\n }\n}\n\n/**\n * Represents an authentication-specific error in the AWS CDK Toolkit.\n */\nexport class AssemblyError extends ToolkitError {\n constructor(message: string) {\n super(message, 'assembly');\n Object.setPrototypeOf(this, AssemblyError.prototype);\n Object.defineProperty(this, ASSEMBLY_ERROR_SYMBOL, { value: true });\n }\n}\n\n/**\n * Represents an error originating from a Context Provider\n */\nexport class ContextProviderError extends ToolkitError {\n constructor(message: string) {\n super(message, 'context-provider');\n Object.setPrototypeOf(this, ContextProviderError.prototype);\n Object.defineProperty(this, CONTEXT_PROVIDER_ERROR_SYMBOL, { value: true });\n }\n}\n", "/**\n * This gets the values of the jsonObject at the paths specified in propertiesToReturn.\n *\n * For example, jsonObject = {\n * key1: 'abc',\n * key2: {\n * foo: 'qwerty',\n * bar: 'data',\n * }\n * }\n *\n * propertiesToReturn = ['key1', 'key2.foo'];\n *\n * The returned object is:\n *\n * ```\n * {\n * key1: 'abc',\n * 'key2.foo': 'qwerty',\n * Identifier: identifier\n * }\n * ```\n */\nexport function getResultObj(jsonObject: any, identifier: string, propertiesToReturn: string[]): {[key: string]: any} {\n const propsObj = {};\n propertiesToReturn.forEach((propName) => {\n Object.assign(propsObj, { [propName]: findJsonValue(jsonObject, propName) });\n });\n Object.assign(propsObj, { ['Identifier']: identifier });\n return propsObj;\n}\n\n/**\n * This finds the value of the jsonObject at the path. Path is delimited by '.'.\n *\n * For example, jsonObject = {\n * key1: 'abc',\n * key2: {\n * foo: 'qwerty',\n * bar: 'data',\n * }\n * }\n *\n * If path is 'key1', then it will return 'abc'.\n * If path is 'key2.foo', then it will return 'qwerty'.\n * If path is 'key2', then it will return the object:\n * {\n * foo: 'qwerty',\n * bar: 'data',\n * }\n *\n * If the path is not found, an Error will be thrown stating which token is missing.\n */\nexport function findJsonValue(jsonObject: any, path: string): any {\n const paths = path.split('.');\n let obj = jsonObject;\n paths.forEach(p => {\n obj = obj[p];\n if (obj === undefined) {\n throw new TypeError(`Cannot read field ${path}. ${p} is not found.`);\n }\n });\n return obj;\n}\n", "/**\n * Type of a map mapping strings to some arbitrary type\n *\n * Name is not ideal, but:\n *\n * - Cannot call it Object, that already means something.\n * - Cannot call it Dict or Dictionary, since in other languages\n * those also allow specifying the key type.\n */\nexport type Obj<T> = {[key: string]: T};\n\n/**\n * Return whether the given value is an object\n *\n * Even though arrays technically are objects, we usually want to treat them differently,\n * so we return false in those cases.\n */\nexport function isObject(x: any): x is Obj<any> {\n return x !== null && typeof x === 'object' && !isArray(x);\n}\n\n/**\n * Return whether the given value is an array\n */\nexport const isArray = Array.isArray;\n\n/**\n * Return the value of the first argument if it's not undefined, otherwise the default\n */\nexport function ifDefined<T>(x: T | undefined, def: T): T {\n return typeof x !== 'undefined' ? x : def;\n}\n", "import { isArray, isObject, Obj } from './types';\nimport { ToolkitError } from '../api/toolkit-error';\n\n/**\n * Return a new object by adding missing keys into another object\n */\nexport function applyDefaults(hash: any, defaults: any) {\n const result: any = { };\n\n Object.keys(hash).forEach(k => result[k] = hash[k]);\n\n Object.keys(defaults)\n .filter(k => !(k in result))\n .forEach(k => result[k] = defaults[k]);\n\n return result;\n}\n\n/**\n * Return whether the given parameter is an empty object or empty list.\n */\nexport function isEmpty(x: any) {\n if (x == null) {\n return false;\n }\n if (isArray(x)) {\n return x.length === 0;\n }\n return Object.keys(x).length === 0;\n}\n\n/**\n * Deep clone a tree of objects, lists or scalars\n *\n * Does not support cycles.\n */\nexport function deepClone(x: any): any {\n if (typeof x === 'undefined') {\n return undefined;\n }\n if (x === null) {\n return null;\n }\n if (isArray(x)) {\n return x.map(deepClone);\n }\n if (isObject(x)) {\n return makeObject(mapObject(x, (k, v) => [k, deepClone(v)] as [string, any]));\n }\n return x;\n}\n\n/**\n * Map over an object, treating it as a dictionary\n */\nexport function mapObject<T, U>(x: Obj<T>, fn: (key: string, value: T) => U): U[] {\n const ret: U[] = [];\n Object.keys(x).forEach(key => {\n ret.push(fn(key, x[key]));\n });\n return ret;\n}\n\n/**\n * Construct an object from a list of (k, v) pairs\n */\nexport function makeObject<T>(pairs: Array<[string, T]>): Obj<T> {\n const ret: Obj<T> = {};\n for (const pair of pairs) {\n ret[pair[0]] = pair[1];\n }\n return ret;\n}\n\n/**\n * Deep get a value from a tree of nested objects\n *\n * Returns undefined if any part of the path was unset or\n * not an object.\n */\nexport function deepGet(x: any, path: string[]): any {\n path = path.slice();\n\n while (path.length > 0 && isObject(x)) {\n const key = path.shift()!;\n x = x[key];\n }\n return path.length === 0 ? x : undefined;\n}\n\n/**\n * Deep set a value in a tree of nested objects\n *\n * Throws an error if any part of the path is not an object.\n */\nexport function deepSet(x: any, path: string[], value: any) {\n path = path.slice();\n\n if (path.length === 0) {\n throw new ToolkitError('Path may not be empty');\n }\n\n while (path.length > 1 && isObject(x)) {\n const key = path.shift()!;\n if (!(key in x)) {\n x[key] = {};\n }\n x = x[key];\n }\n\n if (!isObject(x)) {\n throw new ToolkitError(`Expected an object, got '${x}'`);\n }\n\n if (value !== undefined) {\n x[path[0]] = value;\n } else {\n delete x[path[0]];\n }\n}\n\n/**\n * Recursively merge objects together\n *\n * The leftmost object is mutated and returned. Arrays are not merged\n * but overwritten just like scalars.\n *\n * If an object is merged into a non-object, the non-object is lost.\n */\nexport function deepMerge(...objects: Array<Obj<any> | undefined>) {\n function mergeOne(target: Obj<any>, source: Obj<any>) {\n for (const key of Object.keys(source)) {\n if (key === '__proto__' || key === 'constructor') {\n continue;\n }\n\n const value = source[key];\n\n if (isObject(value)) {\n if (!isObject(target[key])) {\n target[key] = {};\n } // Overwrite on purpose\n mergeOne(target[key], value);\n } else if (typeof value !== 'undefined') {\n target[key] = value;\n }\n }\n }\n\n const others = objects.filter(x => x != null) as Array<Obj<any>>;\n\n if (others.length === 0) {\n return {};\n }\n const into = others.splice(0, 1)[0];\n\n others.forEach(other => mergeOne(into, other));\n return into;\n}\n\n/**\n * Splits the given object into two, such that:\n *\n * 1. The size of the first object (after stringified in UTF-8) is less than or equal to the provided size limit.\n * 2. Merging the two objects results in the original one.\n */\nexport function splitBySize(data: any, maxSizeBytes: number): [any, any] {\n if (maxSizeBytes < 2) {\n // It's impossible to fit anything in the first object\n return [undefined, data];\n }\n const entries = Object.entries(data);\n return recurse(0, 0);\n\n function recurse(index: number, runningTotalSize: number): [any, any] {\n if (index >= entries.length) {\n // Everything fits in the first object\n return [data, undefined];\n }\n\n const size = runningTotalSize + entrySize(entries[index]);\n return (size > maxSizeBytes) ? cutAt(index) : recurse(index + 1, size);\n }\n\n function entrySize(entry: [string, unknown]) {\n return Buffer.byteLength(JSON.stringify(Object.fromEntries([entry])));\n }\n\n function cutAt(index: number): [any, any] {\n return [\n Object.fromEntries(entries.slice(0, index)),\n Object.fromEntries(entries.slice(index)),\n ];\n }\n}\n", "/**\n * Run a number of promise generators with max parallelism\n *\n * Order is not maintained between the input and output.\n */\nexport async function parallelPromises<A>(n: number, promises: Array<() => Promise<A>>): Promise<Array<A>> {\n const ret = new Array<A>();\n let count = 0;\n let error: Error | undefined;\n const queue = [...promises];\n\n return new Promise((ok, ko) => {\n tick();\n\n function tick() {\n if (count === 0 && error) {\n ko(error);\n return;\n }\n if (count === 0 && queue.length === 0) {\n ok(ret);\n return;\n }\n\n while (count < n && queue.length > 0 && !error) {\n const next = queue.shift();\n if (next !== undefined) {\n start(next);\n }\n }\n }\n\n function start(fn: () => Promise<A>) {\n count += 1;\n fn()\n .then((result) => {\n ret.push(result);\n })\n .catch((e) => {\n error = e;\n })\n .finally(() => {\n count -= 1;\n tick();\n });\n }\n });\n}\n", "import * as fs from 'fs/promises';\nimport { formatBytes } from './bytes';\nimport * as yaml_cfn from './yaml-cfn';\n\n/**\n * Stringify to YAML\n */\nexport function toYAML(obj: any): string {\n return yaml_cfn.serialize(obj);\n}\n\n/**\n * Parse either YAML or JSON\n */\nexport function deserializeStructure(str: string): any {\n return yaml_cfn.deserialize(str);\n}\n\n/**\n * Serialize to either YAML or JSON\n */\nexport function serializeStructure(object: any, json: boolean) {\n if (json) {\n return JSON.stringify(object, undefined, 2);\n } else {\n return toYAML(object);\n }\n}\n\n/**\n * Load a YAML or JSON file from disk\n */\nexport async function loadStructuredFile(fileName: string) {\n const contents = await fs.readFile(fileName, { encoding: 'utf-8' });\n return deserializeStructure(contents);\n}\n\n/**\n * Remove any template elements that we don't want to show users.\n */\nexport function obscureTemplate(template: any = {}) {\n if (template.Rules) {\n // see https://github.com/aws/aws-cdk/issues/17942\n if (template.Rules.CheckBootstrapVersion) {\n if (Object.keys(template.Rules).length > 1) {\n delete template.Rules.CheckBootstrapVersion;\n } else {\n delete template.Rules;\n }\n }\n }\n\n return template;\n}\n\n/**\n * Detects a buffer that has been converted to a JSON-like object\n * In Node, `Buffer`s have `toJSON()` method that converts the buffer\n * into a JS object that can be JSON stringified.\n * Unfortunately this conversion happens before the replacer is called,\n * so normal means of detecting a `Buffer` objet don't work anymore.\n * @see https://github.com/nodejs/node-v0.x-archive/issues/5110\n */\nfunction isJsonBuffer(value: any): value is {\n type: 'Buffer';\n data: number[];\n} {\n return typeof value === 'object'\n && 'type' in value\n && value.type === 'Buffer'\n && 'data' in value\n && Array.isArray(value.data);\n}\n\n/**\n * A JSON.stringify() replacer that converts Buffers into a string with information\n * Use this if you plan to print out JSON stringified objects that may contain a Buffer.\n * Without this, large buffers (think: Megabytes) will completely fill up the output\n * and even crash the system.\n */\nexport function replacerBufferWithInfo(_key: any, value: any): any {\n if (isJsonBuffer(value)) {\n return `<Buffer: ${formatBytes(value.data.length)}>`;\n }\n return value;\n}\n", "import * as yaml from 'yaml';\nimport * as yaml_cst from 'yaml/parse-cst';\nimport * as yaml_types from 'yaml/types';\n\n/**\n * Serializes the given data structure into valid YAML.\n *\n * @param obj the data structure to serialize\n * @returns a string containing the YAML representation of {@param obj}\n */\nexport function serialize(obj: any): string {\n const oldFold = yaml_types.strOptions.fold.lineWidth;\n try {\n yaml_types.strOptions.fold.lineWidth = 0;\n return yaml.stringify(obj, { schema: 'yaml-1.1' });\n } finally {\n yaml_types.strOptions.fold.lineWidth = oldFold;\n }\n}\n\n/**\n * Deserialize the YAML into the appropriate data structure.\n *\n * @param str the string containing YAML\n * @returns the data structure the YAML represents\n * (most often in case of CloudFormation, an object)\n */\nexport function deserialize(str: string): any {\n return parseYamlStrWithCfnTags(str);\n}\n\nfunction makeTagForCfnIntrinsic(intrinsicName: string, addFnPrefix: boolean): yaml_types.Schema.CustomTag {\n return {\n identify(value: any) {\n return typeof value === 'string';\n },\n tag: `!${intrinsicName}`,\n resolve: (_doc: yaml.Document, cstNode: yaml_cst.CST.Node) => {\n const ret: any = {};\n ret[addFnPrefix ? `Fn::${intrinsicName}` : intrinsicName] =\n // the +1 is to account for the ! the short form begins with\n parseYamlStrWithCfnTags(cstNode.toString().substring(intrinsicName.length + 1));\n return ret;\n },\n };\n}\n\nconst shortForms: yaml_types.Schema.CustomTag[] = [\n 'Base64', 'Cidr', 'FindInMap', 'GetAZs', 'ImportValue', 'Join', 'Sub',\n 'Select', 'Split', 'Transform', 'And', 'Equals', 'If', 'Not', 'Or', 'GetAtt',\n].map(name => makeTagForCfnIntrinsic(name, true)).concat(\n makeTagForCfnIntrinsic('Ref', false),\n makeTagForCfnIntrinsic('Condition', false),\n);\n\nfunction parseYamlStrWithCfnTags(text: string): any {\n return yaml.parse(text, {\n customTags: shortForms,\n schema: 'core',\n });\n}\n", "/**\n * Pad 's' on the left with 'char' until it is n characters wide\n */\nexport function padLeft(n: number, x: string, char: string = ' '): string {\n return char.repeat(Math.max(0, n - x.length)) + x;\n}\n\n/**\n * Pad 's' on the right with 'char' until it is n characters wide\n */\nexport function padRight(n: number, x: string, char: string = ' '): string {\n return x + char.repeat(Math.max(0, n - x.length));\n}\n\n/**\n * Formats time in milliseconds (which we get from 'Date.getTime()')\n * to a human-readable time; returns time in seconds rounded to 2\n * decimal places.\n */\nexport function formatTime(num: number): number {\n return roundPercentage(millisecondsToSeconds(num));\n}\n\n/**\n * Rounds a decimal number to two decimal points.\n * The function is useful for fractions that need to be outputted as percentages.\n */\nfunction roundPercentage(num: number): number {\n return Math.round(100 * num) / 100;\n}\n\n/**\n * Given a time in milliseconds, return an equivalent amount in seconds.\n */\nfunction millisecondsToSeconds(num: number): number {\n return num / 1000;\n}\n", "/**\n * Type branding\n *\n * This allows marking certain types as having gone through particular operations.\n *\n * Branded types can be used anywhere the base type is expected, but the base type\n * cannot be used where a branded type is expected; the values have to go through\n * a type assertion operation to confirm their brand.\n *\n * Usage:\n *\n * ```\n * type ValidatedString = Branded<string, 'PassedMyValidation'>;\n *\n * function validate(x: string): asserts x is ValidatedString {\n * // ... throw an error if not\n * }\n *\n * function isValid(x: string): x is ValidatedString {\n * // ... throw an error if not\n * }\n * ```\n */\n\n// This construct purely happens at type checking time. There is no run-time impact.\n// Hence, we never even have to construct values of this type.\ndeclare const __brand: unique symbol;\n\nexport type Brand<B> = { [__brand]: B };\nexport type Branded<T, B> = T & Brand<B>;\n\n/**\n * Marks a value as being branded a certain way.\n *\n * You should in general avoid calling this, and use validation or\n * asserting functions instead. However, this can be useful to produce\n * values which are branded by construction (really just an elaborate\n * way to write 'as').\n */\n/* c8 ignore next 3 */\nexport function createBranded<A extends Branded<any, any>>(value: TypeUnderlyingBrand<A>): A {\n return value as A;\n}\n\ntype TypeUnderlyingBrand<A> = A extends Branded<infer T, any> ? T : never;\n", "import * as semver from 'semver';\nimport { ToolkitError } from '../api/toolkit-error';\n\n// bracket - https://docs.oracle.com/middleware/1212/core/MAVEN/maven_version.htm#MAVEN401\n// pep - https://www.python.org/dev/peps/pep-0440/#version-specifiers\nexport type RangeType = 'bracket' | 'pep'\n\nexport function rangeFromSemver(ver: string, targetType: RangeType) {\n const re = ver.match(/^([^\\d]*)([\\d.]*)$/);\n if (!re || !semver.valid(re[2])) {\n throw new ToolkitError('not a semver or unsupported range syntax');\n }\n const prefixPart = re[1];\n const verPart = re[2];\n\n switch (targetType) {\n case 'bracket':\n switch (prefixPart) {\n case '':\n // if there's no prefix and the remaining is a valid semver, there's no range specified\n return ver;\n case '^':\n return `[${verPart},${semver.major(verPart)+1}.0.0)`;\n default:\n throw new ToolkitError(`unsupported range syntax - ${prefixPart}`);\n }\n case 'pep':\n switch (prefixPart) {\n case '':\n // if there's no prefix and the remaining is a valid semver, there's no range specified\n return `==${ver}`;\n case '^':\n return `>=${verPart},<${semver.major(verPart)+1}.0.0`;\n default:\n throw new ToolkitError(`unsupported range syntax - ${prefixPart}`);\n }\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,qBAAsB;AACtB,gBAAkD;AAClD,WAAsB;AACtB,WAAsB;;;ACKf,SAAS,mBAAmBA,QAAoB;AACrD,MAAIA,UAAS,MAAM,QAAQA,OAAM,MAAM,GAAG;AACxC,UAAM,gBAAgBA,OAAM,OACzB,IAAI,CAAC,eAAuD,YAAY,WAAW,YAAY,SAAS,CAAE,EAC1G,KAAK,IAAI;AACZ,WAAO,mBAAmB,aAAa;AAAA,EACzC;AAGA,SAAOA,QAAO,WAAWA,QAAO,SAAS,KAAK;AAChD;;;ADXA,IAAM,WAAW,QAAQ,UAAU;AAGnC,eAAsB,aAAa,WAAmB,YAAmC;AAGvF,QAAM,sBAAsB,GAAG,UA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AAe,KAAa;AACzE,SAAO,IAAI,KAAK,OAAO,KAAK,IAAI,GAAG,IAAI,EAAE,MAAM,CAAC;AAClD;AAOO,SAAS,WAAW,KAAqB;AAC9C,SAAO,gBAAgB,sBAAsB,GAAG,CAAC;AACnD;AAMA,SAAS,gBAAgB,KAAqB;AAC5C,SAAO,KAAK,MAAM,MAAM,GAAG,IAAI;AACjC;AAKA,SAAS,sBAAsB,KAAqB;AAClD,SAAO,MAAM;AACf;;;ACIO,SAAS,cAA2C,OAAkC;AAC3F,SAAO;AACT;;;AC1CA,aAAwB;AAOjB,SAAS,gBAAgB,KAAa,YAAuB;AAClE,QAAM,KAAK,IAAI,MAAM,oBAAoB;AACzC,MAAI,CAAC,MAAM,CAAQ,aAAM,GAAG,CAAC,CAAC,GAAG;AAC/B,UAAM,IAAI,aAAa,0CAA0C;AAAA,EACnE;AACA,QAAM,aAAa,GAAG,CAAC;AACvB,QAAM,UAAU,GAAG,CAAC;AAEpB,UAAQ,YAAY;AAAA,IAClB,KAAK;AACH,cAAQ,YAAY;AAAA,QAClB,KAAK;AAEH,iBAAO;AAAA,QACT,KAAK;AACH,iBAAO,IAAI,OAAO,IAAW,aAAM,OAAO,IAAE,CAAC;AAAA,QAC/C;AACE,gBAAM,IAAI,aAAa,8BAA8B,UAAU,EAAE;AAAA,MACrE;AAAA,IACF,KAAK;AACH,cAAQ,YAAY;AAAA,QAClB,KAAK;AAEH,iBAAO,KAAK,GAAG;AAAA,QACjB,KAAK;AACH,iBAAO,KAAK,OAAO,KAAY,aAAM,OAAO,IAAE,CAAC;AAAA,QACjD;AACE,gBAAM,IAAI,aAAa,8BAA8B,UAAU,EAAE;AAAA,MACrE;AAAA,EACJ;AACF;",
4
+ "sourcesContent": ["/* eslint-disable import/no-restricted-paths */\n\nexport * from '../../../tmp-toolkit-helpers/src/util';\n", "import { error } from 'console';\nimport { createWriteStream, promises as fs } from 'fs';\nimport * as path from 'path';\nimport * as glob from 'glob';\nimport { formatErrorMessage } from './format-error';\n\n// eslint-disable-next-line @typescript-eslint/no-require-imports\nconst archiver = require('archiver');\n\n// Adapted from cdk-assets\nexport async function zipDirectory(directory: string, outputFile: string): Promise<void> {\n // We write to a temporary file and rename at the last moment. This is so that if we are\n // interrupted during this process, we don't leave a half-finished file in the target location.\n const temporaryOutputFile = `${outputFile}.${randomString()}._tmp`;\n await writeZipFile(directory, temporaryOutputFile);\n await moveIntoPlace(temporaryOutputFile, outputFile);\n}\n\nfunction writeZipFile(directory: string, outputFile: string): Promise<void> {\n return new Promise(async (ok, fail) => {\n // The below options are needed to support following symlinks when building zip files:\n // - nodir: This will prevent symlinks themselves from being copied into the zip.\n // - follow: This will follow symlinks and copy the files within.\n const globOptions = {\n dot: true,\n nodir: true,\n follow: true,\n cwd: directory,\n };\n const files = glob.sync('**', globOptions); // The output here is already sorted\n\n const output = createWriteStream(outputFile);\n\n const archive = archiver('zip');\n archive.on('warning', fail);\n archive.on('error', fail);\n\n // archive has been finalized and the output file descriptor has closed, resolve promise\n // this has to be done before calling `finalize` since the events may fire immediately after.\n // see https://www.npmjs.com/package/archiver\n output.once('close', ok);\n\n archive.pipe(output);\n\n // Append files serially to ensure file order\n for (const file of files) {\n const fullPath = path.resolve(directory, file);\n // Exactly 2 promises\n // eslint-disable-next-line @cdklabs/promiseall-no-unbounded-parallelism\n const [data, stat] = await Promise.all([fs.readFile(fullPath), fs.stat(fullPath)]);\n archive.append(data, {\n name: file,\n mode: stat.mode,\n });\n }\n\n await archive.finalize();\n });\n}\n\n/**\n * Rename the file to the target location, taking into account:\n *\n * - That we may see EPERM on Windows while an Antivirus scanner still has the\n * file open, so retry a couple of times.\n * - This same function may be called in parallel and be interrupted at any point.\n */\nasync function moveIntoPlace(source: string, target: string) {\n let delay = 100;\n let attempts = 5;\n while (true) {\n try {\n // 'rename' is guaranteed to overwrite an existing target, as long as it is a file (not a directory)\n await fs.rename(source, target);\n return;\n } catch (e: any) {\n if (e.code !== 'EPERM' || attempts-- <= 0) {\n throw e;\n }\n error(formatErrorMessage(e));\n await sleep(Math.floor(Math.random() * delay));\n delay *= 2;\n }\n }\n}\n\nfunction sleep(ms: number) {\n return new Promise(ok => setTimeout(ok, ms));\n}\n\nfunction randomString() {\n return Math.random().toString(36).replace(/[^a-z0-9]+/g, '');\n}\n", "/**\n * Takes in an error and returns a correctly formatted string of its error message.\n * If it is an AggregateError, it will return a string with all the inner errors\n * formatted and separated by a newline.\n *\n * @param error The error to format\n * @returns A string with the error message(s) of the error\n */\nexport function formatErrorMessage(error: any): string {\n if (error && Array.isArray(error.errors)) {\n const innerMessages = error.errors\n .map((innerError: { message: any; toString: () => any }) => (innerError?.message || innerError?.toString()))\n .join('\\n');\n return `AggregateError: ${innerMessages}`;\n }\n\n // Fallback for regular Error or other types\n return error?.message || error?.toString() || 'Unknown error';\n}\n", "/**\n * Map a function over an array and concatenate the results\n */\nexport function flatMap<T, U>(xs: T[], fn: ((x: T, i: number) => U[])): U[] {\n return flatten(xs.map(fn));\n}\n\n/**\n * Flatten a list of lists into a list of elements\n */\nexport function flatten<T>(xs: T[][]): T[] {\n return Array.prototype.concat.apply([], xs);\n}\n\n/**\n * Partition a collection by removing and returning all elements that match a predicate\n *\n * Note: the input collection is modified in-place!\n */\nexport function partition<T>(collection: T[], pred: (x: T) => boolean): T[] {\n const ret: T[] = [];\n let i = 0;\n while (i < collection.length) {\n if (pred(collection[i])) {\n ret.push(collection.splice(i, 1)[0]);\n } else {\n i++;\n }\n }\n return ret;\n}\n", "/**\n * Converts a boolean into a number.\n *\n * @param bool input boolean\n * @returns 1 if bool is true, and 0 if false\n */\nexport function numberFromBool(bool: boolean): number {\n return +bool;\n}\n", "/**\n * Format bytes as a human readable string\n *\n * @param bytes Number of bytes to format\n * @param decimals Number of decimal places to show (default 2)\n * @returns Formatted string with appropriate unit suffix\n */\nexport function formatBytes(bytes: number, decimals: number = 2): string {\n decimals = decimals < 0 ? 0 : decimals;\n\n if (bytes === 0) {\n return '0 Bytes';\n }\n\n const k = 1024;\n const sizes = ['Bytes', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB'];\n\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n\n return `${parseFloat((bytes / Math.pow(k, i)).toFixed(decimals))} ${sizes[i]}`;\n}\n", "/**\n * Validate SNS topic arn\n */\nexport function validateSnsTopicArn(arn: string): boolean {\n return /^arn:aws:sns:[a-z0-9\\-]+:[0-9]+:[a-z0-9\\-\\_]+$/i.test(arn);\n}\n\n/**\n * Does a Stack Event have an error message based on the status.\n */\nexport function stackEventHasErrorMessage(status: string): boolean {\n return status.endsWith('_FAILED') || status === 'ROLLBACK_IN_PROGRESS' || status === 'UPDATE_ROLLBACK_IN_PROGRESS';\n}\n\n/**\n * Calculate the maximal length of all resource types for a given template.\n *\n * @param template the stack template to analyze\n * @param startWidth the initial width to start with. Defaults to the length of 'AWS::CloudFormation::Stack'.\n * @returns the determined width\n */\nexport function maxResourceTypeLength(template: any, startWidth = 'AWS::CloudFormation::Stack'.length): number {\n const resources = (template && template.Resources) || {};\n let maxWidth = startWidth;\n for (const id of Object.keys(resources)) {\n const type = resources[id].Type || '';\n if (type.length > maxWidth) {\n maxWidth = type.length;\n }\n }\n return maxWidth;\n}\n", "import * as crypto from 'crypto';\n\nexport function contentHash(data: string | Buffer | DataView) {\n return crypto.createHash('sha256').update(data).digest('hex');\n}\n\n/**\n * A stably sorted hash of an arbitrary JS object\n */\nexport function contentHashAny(value: unknown) {\n const ret = crypto.createHash('sha256');\n recurse(value);\n return ret.digest('hex');\n\n function recurse(x: unknown) {\n if (typeof x === 'string') {\n ret.update(x);\n return;\n }\n\n if (Array.isArray(x)) {\n ret.update('[');\n for (const e of x) {\n recurse(e);\n ret.update('||');\n }\n ret.update(']');\n return;\n }\n\n if (x && typeof x === 'object') {\n ret.update('{');\n for (const key of Object.keys(x).sort()) {\n ret.update(key);\n ret.update(':');\n recurse((x as any)[key]);\n }\n ret.update('}');\n return;\n }\n\n ret.update(`${x}${typeof x}`); // typeof to make sure hash('123') !== hash(123)\n }\n}\n", "import * as fs from 'fs';\nimport * as os from 'os';\nimport * as path from 'path';\nimport { ToolkitError } from '../api/toolkit-error';\n\n/**\n * Return a location that will be used as the CDK home directory.\n * Currently the only thing that is placed here is the cache.\n *\n * First try to use the users home directory (i.e. /home/someuser/),\n * but if that directory does not exist for some reason create a tmp directory.\n *\n * Typically it wouldn't make sense to create a one time use tmp directory for\n * the purpose of creating a cache, but since this only applies to users that do\n * not have a home directory (some CI systems?) this should be fine.\n */\nexport function cdkHomeDir() {\n const tmpDir = fs.realpathSync(os.tmpdir());\n let home;\n try {\n let userInfoHome: string | undefined = os.userInfo().homedir;\n // Node returns this if the user doesn't have a home directory\n /* istanbul ignore if: will not happen in normal setups */\n if (userInfoHome == '/var/empty') {\n userInfoHome = undefined;\n }\n home = path.join((userInfoHome ?? os.homedir()).trim(), '.cdk');\n } catch {\n }\n return process.env.CDK_HOME\n ? path.resolve(process.env.CDK_HOME)\n : home || fs.mkdtempSync(path.join(tmpDir, '.cdk')).trim();\n}\n\nexport function cdkCacheDir() {\n return path.join(cdkHomeDir(), 'cache');\n}\n\n/**\n * From the start location, find the directory that contains the bundled package's package.json\n *\n * You must assume the caller of this function will be bundled and the package root dir\n * is not going to be the same as the package the caller currently lives in.\n */\nexport function bundledPackageRootDir(start: string): string;\nexport function bundledPackageRootDir(start: string, fail: true): string;\nexport function bundledPackageRootDir(start: string, fail: false): string | undefined;\nexport function bundledPackageRootDir(start: string, fail?: boolean) {\n function _rootDir(dirname: string): string | undefined {\n const manifestPath = path.join(dirname, 'package.json');\n if (fs.existsSync(manifestPath)) {\n return dirname;\n }\n if (path.dirname(dirname) === dirname) {\n if (fail ?? true) {\n throw new ToolkitError('Unable to find package manifest');\n }\n return undefined;\n }\n return _rootDir(path.dirname(dirname));\n }\n\n return _rootDir(start);\n}\n", "import type * as cxapi from '@aws-cdk/cx-api';\n\nconst TOOLKIT_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit-lib.ToolkitError');\nconst AUTHENTICATION_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit-lib.AuthenticationError');\nconst ASSEMBLY_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit-lib.AssemblyError');\nconst CONTEXT_PROVIDER_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit-lib.ContextProviderError');\n\n/**\n * Represents a general toolkit error in the AWS CDK Toolkit.\n */\nexport class ToolkitError extends Error {\n /**\n * Determines if a given error is an instance of ToolkitError.\n */\n public static isToolkitError(x: any): x is ToolkitError {\n return x !== null && typeof(x) === 'object' && TOOLKIT_ERROR_SYMBOL in x;\n }\n\n /**\n * Determines if a given error is an instance of AuthenticationError.\n */\n public static isAuthenticationError(x: any): x is AuthenticationError {\n return this.isToolkitError(x) && AUTHENTICATION_ERROR_SYMBOL in x;\n }\n\n /**\n * Determines if a given error is an instance of AssemblyError.\n */\n public static isAssemblyError(x: any): x is AssemblyError {\n return this.isToolkitError(x) && ASSEMBLY_ERROR_SYMBOL in x;\n }\n\n /**\n * Determines if a given error is an instance of AssemblyError.\n */\n public static isContextProviderError(x: any): x is ContextProviderError {\n return this.isToolkitError(x) && CONTEXT_PROVIDER_ERROR_SYMBOL in x;\n }\n\n /**\n * The type of the error, defaults to \"toolkit\".\n */\n public readonly type: string;\n\n /**\n * Denotes the source of the error as the toolkit.\n */\n public readonly source: 'toolkit' | 'user';\n\n constructor(message: string, type: string = 'toolkit') {\n super(message);\n Object.setPrototypeOf(this, ToolkitError.prototype);\n Object.defineProperty(this, TOOLKIT_ERROR_SYMBOL, { value: true });\n this.name = new.target.name;\n this.type = type;\n this.source = 'toolkit';\n }\n}\n\n/**\n * Represents an authentication-specific error in the AWS CDK Toolkit.\n */\nexport class AuthenticationError extends ToolkitError {\n /**\n * Denotes the source of the error as user.\n */\n public readonly source = 'user';\n\n constructor(message: string) {\n super(message, 'authentication');\n Object.setPrototypeOf(this, AuthenticationError.prototype);\n Object.defineProperty(this, AUTHENTICATION_ERROR_SYMBOL, { value: true });\n }\n}\n\n/**\n * Represents an error causes by cloud assembly synthesis\n *\n * This includes errors thrown during app execution, as well as failing annotations.\n */\nexport class AssemblyError extends ToolkitError {\n /**\n * An AssemblyError with an original error as cause\n */\n public static withCause(message: string, error: unknown): AssemblyError {\n return new AssemblyError(message, undefined, error);\n }\n\n /**\n * An AssemblyError with a list of stacks as cause\n */\n public static withStacks(message: string, stacks?: cxapi.CloudFormationStackArtifact[]): AssemblyError {\n return new AssemblyError(message, stacks);\n }\n\n /**\n * Denotes the source of the error as user.\n */\n public readonly source = 'user';\n\n /**\n * The stacks that caused the error, if available\n *\n * The `messages` property of each `cxapi.CloudFormationStackArtifact` will contain the respective errors.\n * Absence indicates synthesis didn't fully complete.\n */\n public readonly stacks?: cxapi.CloudFormationStackArtifact[];\n\n /**\n * The specific original cause of the error, if available\n */\n public readonly cause?: unknown;\n\n private constructor(message: string, stacks?: cxapi.CloudFormationStackArtifact[], cause?: unknown) {\n super(message, 'assembly');\n Object.setPrototypeOf(this, AssemblyError.prototype);\n Object.defineProperty(this, ASSEMBLY_ERROR_SYMBOL, { value: true });\n this.stacks = stacks;\n this.cause = cause;\n }\n}\n\n/**\n * Represents an error originating from a Context Provider\n */\nexport class ContextProviderError extends ToolkitError {\n /**\n * Denotes the source of the error as user.\n */\n public readonly source = 'user';\n\n constructor(message: string) {\n super(message, 'context-provider');\n Object.setPrototypeOf(this, ContextProviderError.prototype);\n Object.defineProperty(this, CONTEXT_PROVIDER_ERROR_SYMBOL, { value: true });\n }\n}\n", "/**\n * This gets the values of the jsonObject at the paths specified in propertiesToReturn.\n *\n * For example, jsonObject = {\n * key1: 'abc',\n * key2: {\n * foo: 'qwerty',\n * bar: 'data',\n * }\n * }\n *\n * propertiesToReturn = ['key1', 'key2.foo'];\n *\n * The returned object is:\n *\n * ```\n * {\n * key1: 'abc',\n * 'key2.foo': 'qwerty',\n * Identifier: identifier\n * }\n * ```\n */\nexport function getResultObj(jsonObject: any, identifier: string, propertiesToReturn: string[]): {[key: string]: any} {\n const propsObj = {};\n propertiesToReturn.forEach((propName) => {\n Object.assign(propsObj, { [propName]: findJsonValue(jsonObject, propName) });\n });\n Object.assign(propsObj, { ['Identifier']: identifier });\n return propsObj;\n}\n\n/**\n * This finds the value of the jsonObject at the path. Path is delimited by '.'.\n *\n * For example, jsonObject = {\n * key1: 'abc',\n * key2: {\n * foo: 'qwerty',\n * bar: 'data',\n * }\n * }\n *\n * If path is 'key1', then it will return 'abc'.\n * If path is 'key2.foo', then it will return 'qwerty'.\n * If path is 'key2', then it will return the object:\n * {\n * foo: 'qwerty',\n * bar: 'data',\n * }\n *\n * If the path is not found, an Error will be thrown stating which token is missing.\n */\nexport function findJsonValue(jsonObject: any, path: string): any {\n const paths = path.split('.');\n let obj = jsonObject;\n paths.forEach(p => {\n obj = obj[p];\n if (obj === undefined) {\n throw new TypeError(`Cannot read field ${path}. ${p} is not found.`);\n }\n });\n return obj;\n}\n", "/**\n * Type of a map mapping strings to some arbitrary type\n *\n * Name is not ideal, but:\n *\n * - Cannot call it Object, that already means something.\n * - Cannot call it Dict or Dictionary, since in other languages\n * those also allow specifying the key type.\n */\nexport type Obj<T> = {[key: string]: T};\n\n/**\n * Return whether the given value is an object\n *\n * Even though arrays technically are objects, we usually want to treat them differently,\n * so we return false in those cases.\n */\nexport function isObject(x: any): x is Obj<any> {\n return x !== null && typeof x === 'object' && !isArray(x);\n}\n\n/**\n * Return whether the given value is an array\n */\nexport const isArray = Array.isArray;\n\n/**\n * Return the value of the first argument if it's not undefined, otherwise the default\n */\nexport function ifDefined<T>(x: T | undefined, def: T): T {\n return typeof x !== 'undefined' ? x : def;\n}\n", "import type { Obj } from './types';\nimport { isArray, isObject } from './types';\nimport { ToolkitError } from '../api/toolkit-error';\n\n/**\n * Return a new object by adding missing keys into another object\n */\nexport function applyDefaults(hash: any, defaults: any) {\n const result: any = { };\n\n Object.keys(hash).forEach(k => result[k] = hash[k]);\n\n Object.keys(defaults)\n .filter(k => !(k in result))\n .forEach(k => result[k] = defaults[k]);\n\n return result;\n}\n\n/**\n * Return whether the given parameter is an empty object or empty list.\n */\nexport function isEmpty(x: any) {\n if (x == null) {\n return false;\n }\n if (isArray(x)) {\n return x.length === 0;\n }\n return Object.keys(x).length === 0;\n}\n\n/**\n * Deep clone a tree of objects, lists or scalars\n *\n * Does not support cycles.\n */\nexport function deepClone(x: any): any {\n if (typeof x === 'undefined') {\n return undefined;\n }\n if (x === null) {\n return null;\n }\n if (isArray(x)) {\n return x.map(deepClone);\n }\n if (isObject(x)) {\n return makeObject(mapObject(x, (k, v) => [k, deepClone(v)] as [string, any]));\n }\n return x;\n}\n\n/**\n * Map over an object, treating it as a dictionary\n */\nexport function mapObject<T, U>(x: Obj<T>, fn: (key: string, value: T) => U): U[] {\n const ret: U[] = [];\n Object.keys(x).forEach(key => {\n ret.push(fn(key, x[key]));\n });\n return ret;\n}\n\n/**\n * Construct an object from a list of (k, v) pairs\n */\nexport function makeObject<T>(pairs: Array<[string, T]>): Obj<T> {\n const ret: Obj<T> = {};\n for (const pair of pairs) {\n ret[pair[0]] = pair[1];\n }\n return ret;\n}\n\n/**\n * Deep get a value from a tree of nested objects\n *\n * Returns undefined if any part of the path was unset or\n * not an object.\n */\nexport function deepGet(x: any, path: string[]): any {\n path = path.slice();\n\n while (path.length > 0 && isObject(x)) {\n const key = path.shift()!;\n x = x[key];\n }\n return path.length === 0 ? x : undefined;\n}\n\n/**\n * Deep set a value in a tree of nested objects\n *\n * Throws an error if any part of the path is not an object.\n */\nexport function deepSet(x: any, path: string[], value: any) {\n path = path.slice();\n\n if (path.length === 0) {\n throw new ToolkitError('Path may not be empty');\n }\n\n while (path.length > 1 && isObject(x)) {\n const key = path.shift()!;\n if (!(key in x)) {\n x[key] = {};\n }\n x = x[key];\n }\n\n if (!isObject(x)) {\n throw new ToolkitError(`Expected an object, got '${x}'`);\n }\n\n if (value !== undefined) {\n x[path[0]] = value;\n } else {\n delete x[path[0]];\n }\n}\n\n/**\n * Recursively merge objects together\n *\n * The leftmost object is mutated and returned. Arrays are not merged\n * but overwritten just like scalars.\n *\n * If an object is merged into a non-object, the non-object is lost.\n */\nexport function deepMerge(...objects: Array<Obj<any> | undefined>) {\n function mergeOne(target: Obj<any>, source: Obj<any>) {\n for (const key of Object.keys(source)) {\n if (key === '__proto__' || key === 'constructor') {\n continue;\n }\n\n const value = source[key];\n\n if (isObject(value)) {\n if (!isObject(target[key])) {\n target[key] = {};\n } // Overwrite on purpose\n mergeOne(target[key], value);\n } else if (typeof value !== 'undefined') {\n target[key] = value;\n }\n }\n }\n\n const others = objects.filter(x => x != null) as Array<Obj<any>>;\n\n if (others.length === 0) {\n return {};\n }\n const into = others.splice(0, 1)[0];\n\n others.forEach(other => mergeOne(into, other));\n return into;\n}\n\n/**\n * Splits the given object into two, such that:\n *\n * 1. The size of the first object (after stringified in UTF-8) is less than or equal to the provided size limit.\n * 2. Merging the two objects results in the original one.\n */\nexport function splitBySize(data: any, maxSizeBytes: number): [any, any] {\n if (maxSizeBytes < 2) {\n // It's impossible to fit anything in the first object\n return [undefined, data];\n }\n const entries = Object.entries(data);\n return recurse(0, 0);\n\n function recurse(index: number, runningTotalSize: number): [any, any] {\n if (index >= entries.length) {\n // Everything fits in the first object\n return [data, undefined];\n }\n\n const size = runningTotalSize + entrySize(entries[index]);\n return (size > maxSizeBytes) ? cutAt(index) : recurse(index + 1, size);\n }\n\n function entrySize(entry: [string, unknown]) {\n return Buffer.byteLength(JSON.stringify(Object.fromEntries([entry])));\n }\n\n function cutAt(index: number): [any, any] {\n return [\n Object.fromEntries(entries.slice(0, index)),\n Object.fromEntries(entries.slice(index)),\n ];\n }\n}\n", "/**\n * Run a number of promise generators with max parallelism\n *\n * Order is not maintained between the input and output.\n */\nexport async function parallelPromises<A>(n: number, promises: Array<() => Promise<A>>): Promise<Array<A>> {\n const ret = new Array<A>();\n let count = 0;\n let error: Error | undefined;\n const queue = [...promises];\n\n return new Promise((ok, ko) => {\n tick();\n\n function tick() {\n if (count === 0 && error) {\n ko(error);\n return;\n }\n if (count === 0 && queue.length === 0) {\n ok(ret);\n return;\n }\n\n while (count < n && queue.length > 0 && !error) {\n const next = queue.shift();\n if (next !== undefined) {\n start(next);\n }\n }\n }\n\n function start(fn: () => Promise<A>) {\n count += 1;\n fn()\n .then((result) => {\n ret.push(result);\n })\n .catch((e) => {\n error = e;\n })\n .finally(() => {\n count -= 1;\n tick();\n });\n }\n });\n}\n", "import * as fs from 'fs/promises';\nimport { formatBytes } from './bytes';\nimport * as yaml_cfn from './yaml-cfn';\n\n/**\n * Stringify to YAML\n */\nexport function toYAML(obj: any): string {\n return yaml_cfn.serialize(obj);\n}\n\n/**\n * Parse either YAML or JSON\n */\nexport function deserializeStructure(str: string): any {\n return yaml_cfn.deserialize(str);\n}\n\n/**\n * Serialize to either YAML or JSON\n */\nexport function serializeStructure(object: any, json: boolean) {\n if (json) {\n return JSON.stringify(object, undefined, 2);\n } else {\n return toYAML(object);\n }\n}\n\n/**\n * Load a YAML or JSON file from disk\n */\nexport async function loadStructuredFile(fileName: string) {\n const contents = await fs.readFile(fileName, { encoding: 'utf-8' });\n return deserializeStructure(contents);\n}\n\n/**\n * Remove any template elements that we don't want to show users.\n */\nexport function obscureTemplate(template: any = {}) {\n if (template.Rules) {\n // see https://github.com/aws/aws-cdk/issues/17942\n if (template.Rules.CheckBootstrapVersion) {\n if (Object.keys(template.Rules).length > 1) {\n delete template.Rules.CheckBootstrapVersion;\n } else {\n delete template.Rules;\n }\n }\n }\n\n return template;\n}\n\n/**\n * Detects a buffer that has been converted to a JSON-like object\n * In Node, `Buffer`s have `toJSON()` method that converts the buffer\n * into a JS object that can be JSON stringified.\n * Unfortunately this conversion happens before the replacer is called,\n * so normal means of detecting a `Buffer` objet don't work anymore.\n * @see https://github.com/nodejs/node-v0.x-archive/issues/5110\n */\nfunction isJsonBuffer(value: any): value is {\n type: 'Buffer';\n data: number[];\n} {\n return typeof value === 'object'\n && 'type' in value\n && value.type === 'Buffer'\n && 'data' in value\n && Array.isArray(value.data);\n}\n\n/**\n * A JSON.stringify() replacer that converts Buffers into a string with information\n * Use this if you plan to print out JSON stringified objects that may contain a Buffer.\n * Without this, large buffers (think: Megabytes) will completely fill up the output\n * and even crash the system.\n */\nexport function replacerBufferWithInfo(_key: any, value: any): any {\n if (isJsonBuffer(value)) {\n return `<Buffer: ${formatBytes(value.data.length)}>`;\n }\n return value;\n}\n", "import * as yaml from 'yaml';\nimport type * as yaml_cst from 'yaml/parse-cst';\nimport * as yaml_types from 'yaml/types';\n\n/**\n * Serializes the given data structure into valid YAML.\n *\n * @param obj the data structure to serialize\n * @returns a string containing the YAML representation of {@param obj}\n */\nexport function serialize(obj: any): string {\n const oldFold = yaml_types.strOptions.fold.lineWidth;\n try {\n yaml_types.strOptions.fold.lineWidth = 0;\n return yaml.stringify(obj, { schema: 'yaml-1.1' });\n } finally {\n yaml_types.strOptions.fold.lineWidth = oldFold;\n }\n}\n\n/**\n * Deserialize the YAML into the appropriate data structure.\n *\n * @param str the string containing YAML\n * @returns the data structure the YAML represents\n * (most often in case of CloudFormation, an object)\n */\nexport function deserialize(str: string): any {\n return parseYamlStrWithCfnTags(str);\n}\n\nfunction makeTagForCfnIntrinsic(intrinsicName: string, addFnPrefix: boolean): yaml_types.Schema.CustomTag {\n return {\n identify(value: any) {\n return typeof value === 'string';\n },\n tag: `!${intrinsicName}`,\n resolve: (_doc: yaml.Document, cstNode: yaml_cst.CST.Node) => {\n const ret: any = {};\n ret[addFnPrefix ? `Fn::${intrinsicName}` : intrinsicName] =\n // the +1 is to account for the ! the short form begins with\n parseYamlStrWithCfnTags(cstNode.toString().substring(intrinsicName.length + 1));\n return ret;\n },\n };\n}\n\nconst shortForms: yaml_types.Schema.CustomTag[] = [\n 'Base64', 'Cidr', 'FindInMap', 'GetAZs', 'ImportValue', 'Join', 'Sub',\n 'Select', 'Split', 'Transform', 'And', 'Equals', 'If', 'Not', 'Or', 'GetAtt',\n].map(name => makeTagForCfnIntrinsic(name, true)).concat(\n makeTagForCfnIntrinsic('Ref', false),\n makeTagForCfnIntrinsic('Condition', false),\n);\n\nfunction parseYamlStrWithCfnTags(text: string): any {\n return yaml.parse(text, {\n customTags: shortForms,\n schema: 'core',\n });\n}\n", "/**\n * Pad 's' on the left with 'char' until it is n characters wide\n */\nexport function padLeft(n: number, x: string, char: string = ' '): string {\n return char.repeat(Math.max(0, n - x.length)) + x;\n}\n\n/**\n * Pad 's' on the right with 'char' until it is n characters wide\n */\nexport function padRight(n: number, x: string, char: string = ' '): string {\n return x + char.repeat(Math.max(0, n - x.length));\n}\n\n/**\n * Formats time in milliseconds (which we get from 'Date.getTime()')\n * to a human-readable time; returns time in seconds rounded to 2\n * decimal places.\n */\nexport function formatTime(num: number): number {\n return roundPercentage(millisecondsToSeconds(num));\n}\n\n/**\n * Rounds a decimal number to two decimal points.\n * The function is useful for fractions that need to be outputted as percentages.\n */\nfunction roundPercentage(num: number): number {\n return Math.round(100 * num) / 100;\n}\n\n/**\n * Given a time in milliseconds, return an equivalent amount in seconds.\n */\nfunction millisecondsToSeconds(num: number): number {\n return num / 1000;\n}\n", "/**\n * Type branding\n *\n * This allows marking certain types as having gone through particular operations.\n *\n * Branded types can be used anywhere the base type is expected, but the base type\n * cannot be used where a branded type is expected; the values have to go through\n * a type assertion operation to confirm their brand.\n *\n * Usage:\n *\n * ```\n * type ValidatedString = Branded<string, 'PassedMyValidation'>;\n *\n * function validate(x: string): asserts x is ValidatedString {\n * // ... throw an error if not\n * }\n *\n * function isValid(x: string): x is ValidatedString {\n * // ... throw an error if not\n * }\n * ```\n */\n\n// This construct purely happens at type checking time. There is no run-time impact.\n// Hence, we never even have to construct values of this type.\ndeclare const __brand: unique symbol;\n\nexport type Brand<B> = { [__brand]: B };\nexport type Branded<T, B> = T & Brand<B>;\n\n/**\n * Marks a value as being branded a certain way.\n *\n * You should in general avoid calling this, and use validation or\n * asserting functions instead. However, this can be useful to produce\n * values which are branded by construction (really just an elaborate\n * way to write 'as').\n */\n/* c8 ignore next 3 */\nexport function createBranded<A extends Branded<any, any>>(value: TypeUnderlyingBrand<A>): A {\n return value as A;\n}\n\ntype TypeUnderlyingBrand<A> = A extends Branded<infer T, any> ? T : never;\n", "import * as semver from 'semver';\nimport { ToolkitError } from '../api/toolkit-error';\n\n// bracket - https://docs.oracle.com/middleware/1212/core/MAVEN/maven_version.htm#MAVEN401\n// pep - https://www.python.org/dev/peps/pep-0440/#version-specifiers\nexport type RangeType = 'bracket' | 'pep'\n\nexport function rangeFromSemver(ver: string, targetType: RangeType) {\n const re = ver.match(/^([^\\d]*)([\\d.]*)$/);\n if (!re || !semver.valid(re[2])) {\n throw new ToolkitError('not a semver or unsupported range syntax');\n }\n const prefixPart = re[1];\n const verPart = re[2];\n\n switch (targetType) {\n case 'bracket':\n switch (prefixPart) {\n case '':\n // if there's no prefix and the remaining is a valid semver, there's no range specified\n return ver;\n case '^':\n return `[${verPart},${semver.major(verPart)+1}.0.0)`;\n default:\n throw new ToolkitError(`unsupported range syntax - ${prefixPart}`);\n }\n case 'pep':\n switch (prefixPart) {\n case '':\n // if there's no prefix and the remaining is a valid semver, there's no range specified\n return `==${ver}`;\n case '^':\n return `>=${verPart},<${semver.major(verPart)+1}.0.0`;\n default:\n throw new ToolkitError(`unsupported range syntax - ${prefixPart}`);\n }\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,qBAAsB;AACtB,gBAAkD;AAClD,WAAsB;AACtB,W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,EAAE;AAAA,MACrE;AAAA,IACF,KAAK;AACH,cAAQ,YAAY;AAAA,QAClB,KAAK;AAEH,iBAAO,KAAK,GAAG;AAAA,QACjB,KAAK;AACH,iBAAO,KAAK,OAAO,KAAY,aAAM,OAAO,IAAE,CAAC;AAAA,QACjD;AACE,gBAAM,IAAI,aAAa,8BAA8B,UAAU,EAAE;AAAA,MACrE;AAAA,EACJ;AACF;",
6
6
  "names": ["error", "fs", "fs", "path", "dirname", "path", "path", "error", "fs"]
7
7
  }
@@ -1,2 +1,2 @@
1
1
  export * from './toolkit';
2
- export * from './types';
2
+ export * from '../api/shared-public';
@@ -15,5 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./toolkit"), exports);
18
- __exportStar(require("./types"), exports);
19
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsNENBQTBCO0FBQzFCLDBDQUF3QiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vdG9vbGtpdCc7XG5leHBvcnQgKiBmcm9tICcuL3R5cGVzJztcbiJdfQ==
18
+ __exportStar(require("../api/shared-public"), exports);
19
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsNENBQTBCO0FBQzFCLHVEQUFxQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vdG9vbGtpdCc7XG5leHBvcnQgKiBmcm9tICcuLi9hcGkvc2hhcmVkLXB1YmxpYyc7XG4iXX0=
@@ -1,13 +1,13 @@
1
- import { SdkProvider } from '../../api/aws-cdk';
2
- import { ICloudAssemblySource } from '../../api/cloud-assembly';
1
+ import type { SdkProvider } from '../../api/aws-cdk';
2
+ import type { ICloudAssemblySource } from '../../api/cloud-assembly';
3
3
  import { StackAssembly } from '../../api/cloud-assembly/private';
4
- import { ActionAwareIoHost } from '../../api/shared-private';
4
+ import type { IoHelper } from '../../api/shared-private';
5
5
  /**
6
6
  * Helper struct to pass internal services around.
7
7
  */
8
8
  export interface ToolkitServices {
9
9
  sdkProvider: SdkProvider;
10
- ioHost: ActionAwareIoHost;
10
+ ioHelper: IoHelper;
11
11
  }
12
12
  /**
13
13
  * Creates a Toolkit internal CloudAssembly from a CloudAssemblySource.
@@ -17,4 +17,4 @@ async function assemblyFromSource(assemblySource, cache = true) {
17
17
  }
18
18
  return new private_1.StackAssembly(await assemblySource.produce());
19
19
  }
20
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQW9CQSxnREFVQztBQTNCRCw4REFBNEY7QUFXNUY7Ozs7O0dBS0c7QUFDSSxLQUFLLFVBQVUsa0JBQWtCLENBQUMsY0FBb0MsRUFBRSxRQUFpQixJQUFJO0lBQ2xHLElBQUksY0FBYyxZQUFZLHVCQUFhLEVBQUUsQ0FBQztRQUM1QyxPQUFPLGNBQWMsQ0FBQztJQUN4QixDQUFDO0lBRUQsSUFBSSxLQUFLLEVBQUUsQ0FBQztRQUNWLE9BQU8sSUFBSSx1QkFBYSxDQUFDLE1BQU0sSUFBSSxtQ0FBeUIsQ0FBQyxjQUFjLENBQUMsQ0FBQyxPQUFPLEVBQUUsQ0FBQyxDQUFDO0lBQzFGLENBQUM7SUFFR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YXNzZW1ibHlTb3VyY2U6IElDbG91ZEFzc2VtYmx5U291cmNlLCBjYWNoZTogYm9vbGVhbiA9IHRydWUpOiBQcm9taXNlPFN0YWNrQXNzZW1ibHk+IHtcbiAgaWYgKGFzc2VtYmx5U291cmNlIGluc3RhbmNlb2YgU3RhY2tBc3NlbWJseSkge1xuICAgIHJldHVybiBhc3NlbWJseVNvdXJjZTtcbiAgfVxuXG4gIGlmIChjYWNoZSkge1xuICAgIHJldHVybiBuZXcgU3RhY2tBc3NlbWJseShhd2FpdCBuZXcgQ2FjaGVkQ2xvdWRBc3NlbWJseVNvdXJjZShhc3NlbWJseVNvdXJjZSkucHJvZHVjZSgpKTtcbiAgfVxuXG4gIHJldHVybiBuZXcgU3RhY2tBc3NlbWJseShhd2FpdCBhc3NlbWJseVNvdXJjZS5wcm9kdWNlKCkpO1xufVxuIl19
@@ -1,16 +1,16 @@
1
- import { ToolkitServices } from './private';
2
- import { BootstrapEnvironments, BootstrapOptions } from '../actions/bootstrap';
1
+ import type { ToolkitServices } from './private';
2
+ import type { BootstrapEnvironments, BootstrapOptions } from '../actions/bootstrap';
3
3
  import { type DeployOptions } from '../actions/deploy';
4
4
  import { type DestroyOptions } from '../actions/destroy';
5
5
  import { type ListOptions } from '../actions/list';
6
6
  import { type RollbackOptions } from '../actions/rollback';
7
7
  import { type SynthOptions } from '../actions/synth';
8
- import { WatchOptions } from '../actions/watch';
8
+ import type { WatchOptions } from '../actions/watch';
9
9
  import { type SdkConfig } from '../api/aws-auth';
10
- import { StackDetails } from '../api/aws-cdk';
11
- import { ICloudAssemblySource } from '../api/cloud-assembly';
10
+ import type { ICloudAssemblySource } from '../api/cloud-assembly';
12
11
  import { CloudAssemblySourceBuilder } from '../api/cloud-assembly/private';
13
- import { IIoHost } from '../api/io';
12
+ import type { IIoHost } from '../api/io';
13
+ import type { StackDetails } from '../api/shared-public';
14
14
  export interface ToolkitOptions {
15
15
  /**
16
16
  * The IoHost implementation, handling the inline interactions between the Toolkit and an integration.
@@ -50,8 +50,6 @@ export interface ToolkitOptions {
50
50
  }
51
51
  /**
52
52
  * The AWS CDK Programmatic Toolkit
53
- *
54
- * @document ../../CODE_REGISTRY.md
55
53
  */
56
54
  export declare class Toolkit extends CloudAssemblySourceBuilder implements AsyncDisposable {
57
55
  private readonly props;