cdk-cost-analyzer 0.1.50 → 0.1.51
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.
- package/.cdk-cost-analyzer-cache/metadata.json +8 -8
- package/dist/action/136.index.js +1 -1
- package/dist/action/566.index.js +41 -43
- package/dist/action/579.index.js +1059 -4
- package/dist/action/605.index.js +21 -0
- package/dist/action/762.index.js +1 -1
- package/dist/action/998.index.js +1 -1
- package/dist/action/index.js +3 -3
- package/dist/releasetag.txt +1 -1
- package/package.json +4 -4
|
@@ -2,35 +2,35 @@
|
|
|
2
2
|
"entries": {
|
|
3
3
|
"AmazonS3:US East (N. Virginia):storageClass:General Purpose|volumeType:Standard": {
|
|
4
4
|
"price": 0.023,
|
|
5
|
-
"timestamp":
|
|
5
|
+
"timestamp": 1778599610986
|
|
6
6
|
},
|
|
7
7
|
"AmazonDynamoDB:US East (N. Virginia):group:DDB-ReadUnits|productFamily:Amazon DynamoDB PayPerRequest Throughput": {
|
|
8
8
|
"price": 0.023,
|
|
9
|
-
"timestamp":
|
|
9
|
+
"timestamp": 1778599610993
|
|
10
10
|
},
|
|
11
11
|
"AmazonDynamoDB:US East (N. Virginia):group:DDB-WriteUnits|productFamily:Amazon DynamoDB PayPerRequest Throughput": {
|
|
12
12
|
"price": 0.023,
|
|
13
|
-
"timestamp":
|
|
13
|
+
"timestamp": 1778599610993
|
|
14
14
|
},
|
|
15
15
|
"AmazonEC2:US East (N. Virginia):capacitystatus:Used|instanceType:t3.micro|operatingSystem:Linux|preInstalledSw:NA|tenancy:Shared": {
|
|
16
16
|
"price": 0.023,
|
|
17
|
-
"timestamp":
|
|
17
|
+
"timestamp": 1778599611009
|
|
18
18
|
},
|
|
19
19
|
"AWSLambda:US East (N. Virginia):group:AWS-Lambda-Requests": {
|
|
20
20
|
"price": 0.023,
|
|
21
|
-
"timestamp":
|
|
21
|
+
"timestamp": 1778599611014
|
|
22
22
|
},
|
|
23
23
|
"AWSLambda:US East (N. Virginia):group:AWS-Lambda-Duration": {
|
|
24
24
|
"price": 0.023,
|
|
25
|
-
"timestamp":
|
|
25
|
+
"timestamp": 1778599611014
|
|
26
26
|
},
|
|
27
27
|
"AmazonS3:EU (Frankfurt):storageClass:General Purpose|volumeType:Standard": {
|
|
28
28
|
"price": 0.023,
|
|
29
|
-
"timestamp":
|
|
29
|
+
"timestamp": 1778599619567
|
|
30
30
|
},
|
|
31
31
|
"AmazonS3:invalid-region-123:storageClass:General Purpose|volumeType:Standard": {
|
|
32
32
|
"price": 0.023,
|
|
33
|
-
"timestamp":
|
|
33
|
+
"timestamp": 1778599619611
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
}
|
package/dist/action/136.index.js
CHANGED
|
@@ -1939,7 +1939,7 @@ exports.validate = validate;
|
|
|
1939
1939
|
/***/ 9955:
|
|
1940
1940
|
/***/ ((module) => {
|
|
1941
1941
|
|
|
1942
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.997.
|
|
1942
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.997.6","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:types\' \'yarn:build:es\' && yarn build:cjs","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"yarn g:turbo run build -F=\\"$npm_package_name\\"","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=20.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"^3.974.8","@aws-sdk/middleware-host-header":"^3.972.10","@aws-sdk/middleware-logger":"^3.972.10","@aws-sdk/middleware-recursion-detection":"^3.972.11","@aws-sdk/middleware-user-agent":"^3.972.38","@aws-sdk/region-config-resolver":"^3.972.13","@aws-sdk/signature-v4-multi-region":"^3.996.25","@aws-sdk/types":"^3.973.8","@aws-sdk/util-endpoints":"^3.996.8","@aws-sdk/util-user-agent-browser":"^3.972.10","@aws-sdk/util-user-agent-node":"^3.973.24","@smithy/config-resolver":"^4.4.17","@smithy/core":"^3.23.17","@smithy/fetch-http-handler":"^5.3.17","@smithy/hash-node":"^4.2.14","@smithy/invalid-dependency":"^4.2.14","@smithy/middleware-content-length":"^4.2.14","@smithy/middleware-endpoint":"^4.4.32","@smithy/middleware-retry":"^4.5.7","@smithy/middleware-serde":"^4.2.20","@smithy/middleware-stack":"^4.2.14","@smithy/node-config-provider":"^4.3.14","@smithy/node-http-handler":"^4.6.1","@smithy/protocol-http":"^5.3.14","@smithy/smithy-client":"^4.12.13","@smithy/types":"^4.14.1","@smithy/url-parser":"^4.2.14","@smithy/util-base64":"^4.3.2","@smithy/util-body-length-browser":"^4.2.2","@smithy/util-body-length-node":"^4.2.3","@smithy/util-defaults-mode-browser":"^4.3.49","@smithy/util-defaults-mode-node":"^4.2.54","@smithy/util-endpoints":"^3.4.2","@smithy/util-middleware":"^4.2.14","@smithy/util-retry":"^4.3.6","@smithy/util-utf8":"^4.2.2","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","premove":"4.0.0","typescript":"~5.8.3"},"typesVersions":{"<4.5":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./cognito-identity.d.ts","./cognito-identity.js","./signin.d.ts","./signin.js","./sso-oidc.d.ts","./sso-oidc.js","./sso.d.ts","./sso.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/cognito-identity/runtimeConfig":"./dist-es/submodules/cognito-identity/runtimeConfig.browser","./dist-es/submodules/signin/runtimeConfig":"./dist-es/submodules/signin/runtimeConfig.browser","./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sso/runtimeConfig":"./dist-es/submodules/sso/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./package.json":"./package.json","./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"},"./signin":{"types":"./dist-types/submodules/signin/index.d.ts","module":"./dist-es/submodules/signin/index.js","node":"./dist-cjs/submodules/signin/index.js","import":"./dist-es/submodules/signin/index.js","require":"./dist-cjs/submodules/signin/index.js"},"./cognito-identity":{"types":"./dist-types/submodules/cognito-identity/index.d.ts","module":"./dist-es/submodules/cognito-identity/index.js","node":"./dist-cjs/submodules/cognito-identity/index.js","import":"./dist-es/submodules/cognito-identity/index.js","require":"./dist-cjs/submodules/cognito-identity/index.js"},"./sso":{"types":"./dist-types/submodules/sso/index.d.ts","module":"./dist-es/submodules/sso/index.js","node":"./dist-cjs/submodules/sso/index.js","import":"./dist-es/submodules/sso/index.js","require":"./dist-cjs/submodules/sso/index.js"}}}');
|
|
1943
1943
|
|
|
1944
1944
|
/***/ })
|
|
1945
1945
|
|
package/dist/action/566.index.js
CHANGED
|
@@ -9,32 +9,48 @@ exports.modules = {
|
|
|
9
9
|
var __webpack_unused_export__;
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
var node_url = __webpack_require__(3136);
|
|
13
|
+
var config = __webpack_require__(7291);
|
|
14
|
+
var node_http = __webpack_require__(7067);
|
|
15
|
+
var protocols = __webpack_require__(3422);
|
|
16
|
+
|
|
17
|
+
const isImdsCredentials = (arg) => Boolean(arg) &&
|
|
18
|
+
typeof arg === "object" &&
|
|
19
|
+
typeof arg.AccessKeyId === "string" &&
|
|
20
|
+
typeof arg.SecretAccessKey === "string" &&
|
|
21
|
+
typeof arg.Token === "string" &&
|
|
22
|
+
typeof arg.Expiration === "string";
|
|
23
|
+
const fromImdsCredentials = (creds) => ({
|
|
24
|
+
accessKeyId: creds.AccessKeyId,
|
|
25
|
+
secretAccessKey: creds.SecretAccessKey,
|
|
26
|
+
sessionToken: creds.Token,
|
|
27
|
+
expiration: new Date(creds.Expiration),
|
|
28
|
+
...(creds.AccountId && { accountId: creds.AccountId }),
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const DEFAULT_TIMEOUT = 1000;
|
|
32
|
+
const DEFAULT_MAX_RETRIES = 0;
|
|
33
|
+
const providerConfigFromInit = ({ maxRetries = DEFAULT_MAX_RETRIES, timeout = DEFAULT_TIMEOUT, }) => ({ maxRetries, timeout });
|
|
18
34
|
|
|
19
35
|
function httpRequest(options) {
|
|
20
36
|
return new Promise((resolve, reject) => {
|
|
21
|
-
const req =
|
|
37
|
+
const req = node_http.request({
|
|
22
38
|
method: "GET",
|
|
23
39
|
...options,
|
|
24
40
|
hostname: options.hostname?.replace(/^\[(.+)\]$/, "$1"),
|
|
25
41
|
});
|
|
26
42
|
req.on("error", (err) => {
|
|
27
|
-
reject(Object.assign(new
|
|
43
|
+
reject(Object.assign(new config.ProviderError("Unable to connect to instance metadata service"), err));
|
|
28
44
|
req.destroy();
|
|
29
45
|
});
|
|
30
46
|
req.on("timeout", () => {
|
|
31
|
-
reject(new
|
|
47
|
+
reject(new config.ProviderError("TimeoutError from instance metadata service"));
|
|
32
48
|
req.destroy();
|
|
33
49
|
});
|
|
34
50
|
req.on("response", (res) => {
|
|
35
51
|
const { statusCode = 400 } = res;
|
|
36
52
|
if (statusCode < 200 || 300 <= statusCode) {
|
|
37
|
-
reject(Object.assign(new
|
|
53
|
+
reject(Object.assign(new config.ProviderError("Error response received from instance metadata service"), { statusCode }));
|
|
38
54
|
req.destroy();
|
|
39
55
|
}
|
|
40
56
|
const chunks = [];
|
|
@@ -42,7 +58,7 @@ function httpRequest(options) {
|
|
|
42
58
|
chunks.push(chunk);
|
|
43
59
|
});
|
|
44
60
|
res.on("end", () => {
|
|
45
|
-
resolve(
|
|
61
|
+
resolve(Buffer.concat(chunks));
|
|
46
62
|
req.destroy();
|
|
47
63
|
});
|
|
48
64
|
});
|
|
@@ -50,24 +66,6 @@ function httpRequest(options) {
|
|
|
50
66
|
});
|
|
51
67
|
}
|
|
52
68
|
|
|
53
|
-
const isImdsCredentials = (arg) => Boolean(arg) &&
|
|
54
|
-
typeof arg === "object" &&
|
|
55
|
-
typeof arg.AccessKeyId === "string" &&
|
|
56
|
-
typeof arg.SecretAccessKey === "string" &&
|
|
57
|
-
typeof arg.Token === "string" &&
|
|
58
|
-
typeof arg.Expiration === "string";
|
|
59
|
-
const fromImdsCredentials = (creds) => ({
|
|
60
|
-
accessKeyId: creds.AccessKeyId,
|
|
61
|
-
secretAccessKey: creds.SecretAccessKey,
|
|
62
|
-
sessionToken: creds.Token,
|
|
63
|
-
expiration: new Date(creds.Expiration),
|
|
64
|
-
...(creds.AccountId && { accountId: creds.AccountId }),
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
const DEFAULT_TIMEOUT = 1000;
|
|
68
|
-
const DEFAULT_MAX_RETRIES = 0;
|
|
69
|
-
const providerConfigFromInit = ({ maxRetries = DEFAULT_MAX_RETRIES, timeout = DEFAULT_TIMEOUT, }) => ({ maxRetries, timeout });
|
|
70
|
-
|
|
71
69
|
const retry = (toRetry, maxRetries) => {
|
|
72
70
|
let promise = toRetry();
|
|
73
71
|
for (let i = 0; i < maxRetries; i++) {
|
|
@@ -85,7 +83,7 @@ const fromContainerMetadata = (init = {}) => {
|
|
|
85
83
|
const requestOptions = await getCmdsUri({ logger: init.logger });
|
|
86
84
|
const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions));
|
|
87
85
|
if (!isImdsCredentials(credsResponse)) {
|
|
88
|
-
throw new
|
|
86
|
+
throw new config.CredentialsProviderError("Invalid response received from instance metadata service.", {
|
|
89
87
|
logger: init.logger,
|
|
90
88
|
});
|
|
91
89
|
}
|
|
@@ -122,15 +120,15 @@ const getCmdsUri = async ({ logger }) => {
|
|
|
122
120
|
};
|
|
123
121
|
}
|
|
124
122
|
if (process.env[ENV_CMDS_FULL_URI]) {
|
|
125
|
-
const parsed =
|
|
123
|
+
const parsed = node_url.parse(process.env[ENV_CMDS_FULL_URI]);
|
|
126
124
|
if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) {
|
|
127
|
-
throw new
|
|
125
|
+
throw new config.CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, {
|
|
128
126
|
tryNextLink: false,
|
|
129
127
|
logger,
|
|
130
128
|
});
|
|
131
129
|
}
|
|
132
130
|
if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) {
|
|
133
|
-
throw new
|
|
131
|
+
throw new config.CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, {
|
|
134
132
|
tryNextLink: false,
|
|
135
133
|
logger,
|
|
136
134
|
});
|
|
@@ -140,7 +138,7 @@ const getCmdsUri = async ({ logger }) => {
|
|
|
140
138
|
port: parsed.port ? parseInt(parsed.port, 10) : undefined,
|
|
141
139
|
};
|
|
142
140
|
}
|
|
143
|
-
throw new
|
|
141
|
+
throw new config.CredentialsProviderError("The container metadata credential provider cannot be used unless" +
|
|
144
142
|
` the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment` +
|
|
145
143
|
" variable is set", {
|
|
146
144
|
tryNextLink: false,
|
|
@@ -148,7 +146,7 @@ const getCmdsUri = async ({ logger }) => {
|
|
|
148
146
|
});
|
|
149
147
|
};
|
|
150
148
|
|
|
151
|
-
class InstanceMetadataV1FallbackError extends
|
|
149
|
+
class InstanceMetadataV1FallbackError extends config.CredentialsProviderError {
|
|
152
150
|
tryNextLink;
|
|
153
151
|
name = "InstanceMetadataV1FallbackError";
|
|
154
152
|
constructor(message, tryNextLink = true) {
|
|
@@ -186,10 +184,10 @@ const ENDPOINT_MODE_CONFIG_OPTIONS = {
|
|
|
186
184
|
default: EndpointMode.IPv4,
|
|
187
185
|
};
|
|
188
186
|
|
|
189
|
-
const getInstanceMetadataEndpoint = async () =>
|
|
190
|
-
const getFromEndpointConfig = async () =>
|
|
187
|
+
const getInstanceMetadataEndpoint = async () => protocols.parseUrl((await getFromEndpointConfig()) || (await getFromEndpointModeConfig()));
|
|
188
|
+
const getFromEndpointConfig = async () => config.loadConfig(ENDPOINT_CONFIG_OPTIONS)();
|
|
191
189
|
const getFromEndpointModeConfig = async () => {
|
|
192
|
-
const endpointMode = await
|
|
190
|
+
const endpointMode = await config.loadConfig(ENDPOINT_MODE_CONFIG_OPTIONS)();
|
|
193
191
|
switch (endpointMode) {
|
|
194
192
|
case EndpointMode.IPv4:
|
|
195
193
|
return exports.yI.IPv4;
|
|
@@ -258,12 +256,12 @@ const getInstanceMetadataProvider = (init = {}) => {
|
|
|
258
256
|
if (isImdsV1Fallback) {
|
|
259
257
|
let fallbackBlockedFromProfile = false;
|
|
260
258
|
let fallbackBlockedFromProcessEnv = false;
|
|
261
|
-
const configValue = await
|
|
259
|
+
const configValue = await config.loadConfig({
|
|
262
260
|
environmentVariableSelector: (env) => {
|
|
263
261
|
const envValue = env[AWS_EC2_METADATA_V1_DISABLED];
|
|
264
262
|
fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false";
|
|
265
263
|
if (envValue === undefined) {
|
|
266
|
-
throw new
|
|
264
|
+
throw new config.CredentialsProviderError(`${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`, { logger: init.logger });
|
|
267
265
|
}
|
|
268
266
|
return fallbackBlockedFromProcessEnv;
|
|
269
267
|
},
|
|
@@ -362,7 +360,7 @@ const getCredentialsFromProfile = async (profile, options, init) => {
|
|
|
362
360
|
path: IMDS_PATH + profile,
|
|
363
361
|
})).toString());
|
|
364
362
|
if (!isImdsCredentials(credentialsResponse)) {
|
|
365
|
-
throw new
|
|
363
|
+
throw new config.CredentialsProviderError("Invalid response received from instance metadata service.", {
|
|
366
364
|
logger: init.logger,
|
|
367
365
|
});
|
|
368
366
|
}
|
|
@@ -376,8 +374,8 @@ exports.ENV_CMDS_FULL_URI = ENV_CMDS_FULL_URI;
|
|
|
376
374
|
exports.ENV_CMDS_RELATIVE_URI = ENV_CMDS_RELATIVE_URI;
|
|
377
375
|
exports.fromContainerMetadata = fromContainerMetadata;
|
|
378
376
|
exports.fromInstanceMetadata = fromInstanceMetadata;
|
|
379
|
-
|
|
380
|
-
|
|
377
|
+
__webpack_unused_export__ = getInstanceMetadataEndpoint;
|
|
378
|
+
__webpack_unused_export__ = httpRequest;
|
|
381
379
|
__webpack_unused_export__ = providerConfigFromInit;
|
|
382
380
|
|
|
383
381
|
|