cdk-cost-analyzer 0.1.46 → 0.1.48

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.
@@ -9,7 +9,7 @@ exports.modules = {
9
9
 
10
10
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11
11
  exports.resolveHttpAuthSchemeConfig = exports.defaultSSOOIDCHttpAuthSchemeProvider = exports.defaultSSOOIDCHttpAuthSchemeParametersProvider = void 0;
12
- const core_1 = __webpack_require__(8704);
12
+ const httpAuthSchemes_1 = __webpack_require__(7523);
13
13
  const util_middleware_1 = __webpack_require__(6324);
14
14
  const defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => {
15
15
  return {
@@ -56,7 +56,7 @@ const defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => {
56
56
  };
57
57
  exports.defaultSSOOIDCHttpAuthSchemeProvider = defaultSSOOIDCHttpAuthSchemeProvider;
58
58
  const resolveHttpAuthSchemeConfig = (config) => {
59
- const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);
59
+ const config_0 = (0, httpAuthSchemes_1.resolveAwsSdkSigV4Config)(config);
60
60
  return Object.assign(config_0, {
61
61
  authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []),
62
62
  });
@@ -64,6 +64,93 @@ const resolveHttpAuthSchemeConfig = (config) => {
64
64
  exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
65
65
 
66
66
 
67
+ /***/ }),
68
+
69
+ /***/ 3236:
70
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
71
+
72
+
73
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
74
+ exports.bdd = void 0;
75
+ const util_endpoints_1 = __webpack_require__(9674);
76
+ const k = "ref";
77
+ const a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "getAttr", g = { [k]: "Endpoint" }, h = { [k]: d }, i = {}, j = [{ [k]: "Region" }];
78
+ const _data = {
79
+ conditions: [
80
+ [c, [g]],
81
+ [c, j],
82
+ ["aws.partition", j, d],
83
+ [e, [{ [k]: "UseFIPS" }, b]],
84
+ [e, [{ [k]: "UseDualStack" }, b]],
85
+ [e, [{ fn: f, argv: [h, "supportsDualStack"] }, b]],
86
+ [e, [{ fn: f, argv: [h, "supportsFIPS"] }, b]],
87
+ ["stringEquals", [{ fn: f, argv: [h, "name"] }, "aws-us-gov"]],
88
+ ],
89
+ results: [
90
+ [a],
91
+ [a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
92
+ [a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
93
+ [g, i],
94
+ ["https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
95
+ [a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
96
+ ["https://oidc.{Region}.amazonaws.com", i],
97
+ ["https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", i],
98
+ [a, "FIPS is enabled but this partition does not support FIPS"],
99
+ ["https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
100
+ [a, "DualStack is enabled but this partition does not support DualStack"],
101
+ ["https://oidc.{Region}.{PartitionResult#dnsSuffix}", i],
102
+ [a, "Invalid Configuration: Missing Region"],
103
+ ],
104
+ };
105
+ const root = 2;
106
+ const r = 100_000_000;
107
+ const nodes = new Int32Array([
108
+ -1,
109
+ 1,
110
+ -1,
111
+ 0,
112
+ 13,
113
+ 3,
114
+ 1,
115
+ 4,
116
+ r + 12,
117
+ 2,
118
+ 5,
119
+ r + 12,
120
+ 3,
121
+ 8,
122
+ 6,
123
+ 4,
124
+ 7,
125
+ r + 11,
126
+ 5,
127
+ r + 9,
128
+ r + 10,
129
+ 4,
130
+ 11,
131
+ 9,
132
+ 6,
133
+ 10,
134
+ r + 8,
135
+ 7,
136
+ r + 6,
137
+ r + 7,
138
+ 5,
139
+ 12,
140
+ r + 5,
141
+ 6,
142
+ r + 4,
143
+ r + 5,
144
+ 3,
145
+ r + 1,
146
+ 14,
147
+ 4,
148
+ r + 2,
149
+ r + 3,
150
+ ]);
151
+ exports.bdd = util_endpoints_1.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
152
+
153
+
67
154
  /***/ }),
68
155
 
69
156
  /***/ 546:
@@ -74,13 +161,13 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
74
161
  exports.defaultEndpointResolver = void 0;
75
162
  const util_endpoints_1 = __webpack_require__(3068);
76
163
  const util_endpoints_2 = __webpack_require__(9674);
77
- const ruleset_1 = __webpack_require__(9947);
164
+ const bdd_1 = __webpack_require__(3236);
78
165
  const cache = new util_endpoints_2.EndpointCache({
79
166
  size: 50,
80
167
  params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
81
168
  });
82
169
  const defaultEndpointResolver = (endpointParams, context = {}) => {
83
- return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
170
+ return cache.get(endpointParams, () => (0, util_endpoints_2.decideEndpoint)(bdd_1.bdd, {
84
171
  endpointParams: endpointParams,
85
172
  logger: context.logger,
86
173
  }));
@@ -89,119 +176,6 @@ exports.defaultEndpointResolver = defaultEndpointResolver;
89
176
  util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
90
177
 
91
178
 
92
- /***/ }),
93
-
94
- /***/ 9947:
95
- /***/ ((__unused_webpack_module, exports) => {
96
-
97
-
98
- Object.defineProperty(exports, "__esModule", ({ value: true }));
99
- exports.ruleSet = void 0;
100
- const u = "required", v = "fn", w = "argv", x = "ref";
101
- const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, type: "string" }, j = { [u]: true, default: false, type: "boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }];
102
- const _data = {
103
- version: "1.0",
104
- parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i },
105
- rules: [
106
- {
107
- conditions: [{ [v]: b, [w]: [k] }],
108
- rules: [
109
- { conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d },
110
- { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d },
111
- { endpoint: { url: k, properties: n, headers: n }, type: e },
112
- ],
113
- type: f,
114
- },
115
- {
116
- conditions: [{ [v]: b, [w]: t }],
117
- rules: [
118
- {
119
- conditions: [{ [v]: "aws.partition", [w]: t, assign: g }],
120
- rules: [
121
- {
122
- conditions: [l, m],
123
- rules: [
124
- {
125
- conditions: [{ [v]: c, [w]: [a, o] }, q],
126
- rules: [
127
- {
128
- endpoint: {
129
- url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
130
- properties: n,
131
- headers: n,
132
- },
133
- type: e,
134
- },
135
- ],
136
- type: f,
137
- },
138
- { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d },
139
- ],
140
- type: f,
141
- },
142
- {
143
- conditions: r,
144
- rules: [
145
- {
146
- conditions: [{ [v]: c, [w]: [o, a] }],
147
- rules: [
148
- {
149
- conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }],
150
- endpoint: { url: "https://oidc.{Region}.amazonaws.com", properties: n, headers: n },
151
- type: e,
152
- },
153
- {
154
- endpoint: {
155
- url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",
156
- properties: n,
157
- headers: n,
158
- },
159
- type: e,
160
- },
161
- ],
162
- type: f,
163
- },
164
- { error: "FIPS is enabled but this partition does not support FIPS", type: d },
165
- ],
166
- type: f,
167
- },
168
- {
169
- conditions: s,
170
- rules: [
171
- {
172
- conditions: [q],
173
- rules: [
174
- {
175
- endpoint: {
176
- url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",
177
- properties: n,
178
- headers: n,
179
- },
180
- type: e,
181
- },
182
- ],
183
- type: f,
184
- },
185
- { error: "DualStack is enabled but this partition does not support DualStack", type: d },
186
- ],
187
- type: f,
188
- },
189
- {
190
- endpoint: { url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n },
191
- type: e,
192
- },
193
- ],
194
- type: f,
195
- },
196
- ],
197
- type: f,
198
- },
199
- { error: "Invalid Configuration: Missing Region", type: d },
200
- ],
201
- };
202
- exports.ruleSet = _data;
203
-
204
-
205
179
  /***/ }),
206
180
 
207
181
  /***/ 9443:
@@ -612,7 +586,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
612
586
  exports.getRuntimeConfig = void 0;
613
587
  const tslib_1 = __webpack_require__(1860);
614
588
  const package_json_1 = tslib_1.__importDefault(__webpack_require__(9955));
615
- const core_1 = __webpack_require__(8704);
589
+ const client_1 = __webpack_require__(5152);
590
+ const httpAuthSchemes_1 = __webpack_require__(7523);
616
591
  const util_user_agent_node_1 = __webpack_require__(1656);
617
592
  const config_resolver_1 = __webpack_require__(9316);
618
593
  const hash_node_1 = __webpack_require__(5092);
@@ -629,7 +604,7 @@ const getRuntimeConfig = (config) => {
629
604
  const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
630
605
  const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
631
606
  const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
632
- (0, core_1.emitWarningIfUnsupportedVersion)(process.version);
607
+ (0, client_1.emitWarningIfUnsupportedVersion)(process.version);
633
608
  const loaderConfig = {
634
609
  profile: config?.profile,
635
610
  logger: clientSharedValues.logger,
@@ -639,7 +614,7 @@ const getRuntimeConfig = (config) => {
639
614
  ...config,
640
615
  runtime: "node",
641
616
  defaultsMode,
642
- authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
617
+ authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(httpAuthSchemes_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
643
618
  bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
644
619
  defaultUserAgentProvider: config?.defaultUserAgentProvider ??
645
620
  (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
@@ -670,9 +645,9 @@ exports.getRuntimeConfig = getRuntimeConfig;
670
645
 
671
646
  Object.defineProperty(exports, "__esModule", ({ value: true }));
672
647
  exports.getRuntimeConfig = void 0;
673
- const core_1 = __webpack_require__(8704);
648
+ const httpAuthSchemes_1 = __webpack_require__(7523);
674
649
  const protocols_1 = __webpack_require__(7288);
675
- const core_2 = __webpack_require__(402);
650
+ const core_1 = __webpack_require__(402);
676
651
  const smithy_client_1 = __webpack_require__(1411);
677
652
  const url_parser_1 = __webpack_require__(4494);
678
653
  const util_base64_1 = __webpack_require__(8385);
@@ -693,12 +668,12 @@ const getRuntimeConfig = (config) => {
693
668
  {
694
669
  schemeId: "aws.auth#sigv4",
695
670
  identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
696
- signer: new core_1.AwsSdkSigV4Signer(),
671
+ signer: new httpAuthSchemes_1.AwsSdkSigV4Signer(),
697
672
  },
698
673
  {
699
674
  schemeId: "smithy.api#noAuth",
700
675
  identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
701
- signer: new core_2.NoAuthSigner(),
676
+ signer: new core_1.NoAuthSigner(),
702
677
  },
703
678
  ],
704
679
  logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
@@ -58,9 +58,13 @@ class EventStreamSerde {
58
58
  body: event.body,
59
59
  };
60
60
  }
61
- const unionMember = Object.keys(event).find((key) => {
62
- return key !== "__type";
63
- }) ?? "";
61
+ let unionMember = "";
62
+ for (const key in event) {
63
+ if (key !== "__type") {
64
+ unionMember = key;
65
+ break;
66
+ }
67
+ }
64
68
  const { additionalHeaders, body, eventType, explicitPayloadContentType } = this.writeEventBody(unionMember, unionSchema, event);
65
69
  const headers = {
66
70
  ":event-type": { type: "string", value: eventType },
@@ -81,9 +85,13 @@ class EventStreamSerde {
81
85
  const memberSchemas = unionSchema.getMemberSchemas();
82
86
  const initialResponseMarker = Symbol("initialResponseMarker");
83
87
  const asyncIterable = marshaller.deserialize(response.body, async (event) => {
84
- const unionMember = Object.keys(event).find((key) => {
85
- return key !== "__type";
86
- }) ?? "";
88
+ let unionMember = "";
89
+ for (const key in event) {
90
+ if (key !== "__type") {
91
+ unionMember = key;
92
+ break;
93
+ }
94
+ }
87
95
  const body = event[unionMember].body;
88
96
  if (unionMember === "initial-response") {
89
97
  const dataObject = await this.deserializer.read(responseSchema, body);
@@ -159,8 +167,8 @@ class EventStreamSerde {
159
167
  if (!responseSchema) {
160
168
  throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");
161
169
  }
162
- for (const [key, value] of Object.entries(firstEvent.value)) {
163
- initialResponseContainer[key] = value;
170
+ for (const key in firstEvent.value) {
171
+ initialResponseContainer[key] = firstEvent.value[key];
164
172
  }
165
173
  }
166
174
  return {