@aws-cdk/toolkit-lib 0.1.3 → 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 (91) hide show
  1. package/build-info.json +2 -2
  2. package/db.json.gz +0 -0
  3. package/lib/actions/bootstrap/index.d.ts +174 -0
  4. package/lib/actions/bootstrap/index.js +94 -0
  5. package/lib/actions/bootstrap/private/helpers.d.ts +5 -0
  6. package/lib/actions/bootstrap/private/helpers.js +23 -0
  7. package/lib/actions/bootstrap/private/index.d.ts +1 -0
  8. package/lib/actions/bootstrap/private/index.js +18 -0
  9. package/lib/actions/deploy/index.d.ts +4 -2
  10. package/lib/actions/deploy/index.js +4 -1
  11. package/lib/actions/deploy/private/deploy-options.d.ts +1 -1
  12. package/lib/actions/deploy/private/deploy-options.js +1 -1
  13. package/lib/actions/deploy/private/helpers.d.ts +3 -2
  14. package/lib/actions/deploy/private/helpers.js +1 -1
  15. package/lib/actions/destroy/index.d.ts +1 -1
  16. package/lib/actions/destroy/index.js +1 -1
  17. package/lib/actions/diff/private/helpers.d.ts +5 -5
  18. package/lib/actions/diff/private/helpers.js +13 -11
  19. package/lib/actions/index.d.ts +1 -0
  20. package/lib/actions/index.js +2 -1
  21. package/lib/api/aws-cdk.d.ts +5 -9
  22. package/lib/api/aws-cdk.js +1593 -735
  23. package/lib/api/aws-cdk.js.map +4 -4
  24. package/lib/api/bootstrap/bootstrap-template.yaml +707 -0
  25. package/lib/api/cloud-assembly/index.d.ts +1 -1
  26. package/lib/api/cloud-assembly/index.js +2 -2
  27. package/lib/api/cloud-assembly/private/cached-source.d.ts +2 -2
  28. package/lib/api/cloud-assembly/private/cached-source.js +1 -1
  29. package/lib/api/cloud-assembly/private/context-aware-source.d.ts +4 -4
  30. package/lib/api/cloud-assembly/private/context-aware-source.js +11 -12
  31. package/lib/api/cloud-assembly/private/identity-source.d.ts +1 -1
  32. package/lib/api/cloud-assembly/private/identity-source.js +1 -1
  33. package/lib/api/cloud-assembly/private/prepare-source.d.ts +5 -5
  34. package/lib/api/cloud-assembly/private/prepare-source.js +10 -7
  35. package/lib/api/cloud-assembly/private/source-builder.d.ts +4 -4
  36. package/lib/api/cloud-assembly/private/source-builder.js +24 -12
  37. package/lib/api/cloud-assembly/private/stack-assembly.d.ts +3 -3
  38. package/lib/api/cloud-assembly/private/stack-assembly.js +1 -1
  39. package/lib/api/cloud-assembly/private/stack-selectors.d.ts +1 -1
  40. package/lib/api/cloud-assembly/private/stack-selectors.js +1 -1
  41. package/lib/api/cloud-assembly/source-builder.d.ts +36 -0
  42. package/lib/api/cloud-assembly/source-builder.js +1 -1
  43. package/lib/api/cloud-assembly/stack-selector.d.ts +2 -81
  44. package/lib/api/cloud-assembly/stack-selector.js +5 -62
  45. package/lib/api/io/index.d.ts +1 -2
  46. package/lib/api/io/index.js +1 -17
  47. package/lib/api/io/private/index.d.ts +3 -6
  48. package/lib/api/io/private/index.js +7 -7
  49. package/lib/api/io/private/io-host-wrappers.d.ts +17 -0
  50. package/lib/api/io/private/io-host-wrappers.js +74 -0
  51. package/lib/api/io/private/sdk-logger.d.ts +3 -0
  52. package/lib/api/io/private/sdk-logger.js +124 -0
  53. package/lib/api/shared-private.d.ts +1 -0
  54. package/lib/api/shared-private.js +711 -0
  55. package/lib/api/shared-private.js.map +7 -0
  56. package/lib/api/shared-public.d.ts +2464 -1
  57. package/lib/api/shared-public.js +78 -5
  58. package/lib/api/shared-public.js.map +4 -4
  59. package/lib/index.d.ts +3 -0
  60. package/lib/index.js +4 -1
  61. package/lib/private/util.d.ts +1 -0
  62. package/lib/private/util.js +720 -0
  63. package/lib/private/util.js.map +7 -0
  64. package/lib/toolkit/index.d.ts +1 -1
  65. package/lib/toolkit/index.js +2 -2
  66. package/lib/toolkit/private/index.d.ts +12 -3
  67. package/lib/toolkit/private/index.js +18 -1
  68. package/lib/toolkit/toolkit.d.ts +10 -16
  69. package/lib/toolkit/toolkit.js +205 -152
  70. package/lib/util/concurrency.d.ts +5 -0
  71. package/lib/util/concurrency.js +11 -0
  72. package/package.json +12 -11
  73. package/CODE_REGISTRY.md +0 -35
  74. package/lib/api/io/io-host.d.ts +0 -15
  75. package/lib/api/io/io-host.js +0 -3
  76. package/lib/api/io/io-message.d.ts +0 -59
  77. package/lib/api/io/io-message.js +0 -3
  78. package/lib/api/io/private/codes.d.ts +0 -67
  79. package/lib/api/io/private/codes.js +0 -187
  80. package/lib/api/io/private/level-priority.d.ts +0 -11
  81. package/lib/api/io/private/level-priority.js +0 -33
  82. package/lib/api/io/private/logger.d.ts +0 -40
  83. package/lib/api/io/private/logger.js +0 -211
  84. package/lib/api/io/private/messages.d.ts +0 -58
  85. package/lib/api/io/private/messages.js +0 -163
  86. package/lib/api/io/private/timer.d.ts +0 -29
  87. package/lib/api/io/private/timer.js +0 -55
  88. package/lib/api/io/private/types.d.ts +0 -25
  89. package/lib/api/io/private/types.js +0 -3
  90. package/lib/toolkit/types.d.ts +0 -76
  91. 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\n// APIs\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,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["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,EAAAA,wBAAA,gBAAa;AAKb,EAAAA,wBAAA,mBAAgB;AAMhB,EAAAA,wBAAA,iBAAc;AAOd,EAAAA,wBAAA,mBAAgB;AAMhB,EAAAA,wBAAA,wBAAqB;AAMrB,EAAAA,wBAAA,+BAA4B;AAnClB,SAAAA;AAAA,GAAA;AAyCL,IAAK,uBAAL,kBAAKC,0BAAL;AAIL,EAAAA,sBAAA,UAAO;AAKP,EAAAA,sBAAA,cAAW;AAKX,EAAAA,sBAAA,gBAAa;AAdH,SAAAA;AAAA,GAAA;;;ACzCL,IAAK,uBAAL,kBAAKC,0BAAL;AAIL,EAAAA,sBAAA,UAAO;AAKP,EAAAA,sBAAA,gBAAa;AAKb,EAAAA,sBAAA,oBAAiB;AAdP,SAAAA;AAAA,GAAA;;;ACDZ,IAAM,uBAAuB,OAAO,IAAI,mCAAmC;AAC3E,IAAM,8BAA8B,OAAO,IAAI,0CAA0C;AACzF,IAAM,wBAAwB,OAAO,IAAI,oCAAoC;AAC7E,IAAM,gCAAgC,OAAO,IAAI,2CAA2C;AAKrF,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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AAY,SAAiB,QAA8C,OAAiB;AAClG,UAAM,SAAS,UAAU;AACzB,WAAO,eAAe,MAAM,eAAc,SAAS;AACnD,WAAO,eAAe,MAAM,uBAAuB,EAAE,OAAO,KAAK,CAAC;AAClE,SAAK,SAAS;AACd,SAAK,QAAQ;AAAA,EACf;AACF;AAKO,IAAM,uBAAN,MAAM,8BAA6B,aAAa;AAAA;AAAA;AAAA;AAAA,EAIrC,SAAS;AAAA,EAEzB,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": ["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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsZ0JBQWdCO0FBQ2hCLDRDQUEwQjtBQUMxQiw0Q0FBMEI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