@cdk8s/awscdk-resolver 0.0.6 → 0.0.8
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/.jsii +5 -5
- package/lib/resolve.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/package.json +5 -5
- package/node_modules/@aws-sdk/client-sso/package.json +3 -3
- package/node_modules/@aws-sdk/client-sts/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-node/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/package.json +3 -3
- package/node_modules/@aws-sdk/util-endpoints/dist-cjs/getEndpointUrlConfig.js +25 -0
- package/node_modules/@aws-sdk/util-endpoints/dist-es/getEndpointUrlConfig.js +21 -0
- package/node_modules/@aws-sdk/util-endpoints/dist-types/getEndpointUrlConfig.d.ts +2 -0
- package/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/getEndpointUrlConfig.d.ts +4 -0
- package/node_modules/@aws-sdk/util-endpoints/package.json +2 -1
- package/node_modules/@smithy/abort-controller/package.json +2 -2
- package/node_modules/@smithy/config-resolver/package.json +4 -4
- package/node_modules/@smithy/credential-provider-imds/package.json +5 -5
- package/node_modules/@smithy/eventstream-codec/package.json +2 -2
- package/node_modules/@smithy/fetch-http-handler/package.json +5 -5
- package/node_modules/@smithy/hash-node/package.json +2 -2
- package/node_modules/@smithy/invalid-dependency/package.json +2 -2
- package/node_modules/@smithy/middleware-content-length/package.json +4 -4
- package/node_modules/@smithy/middleware-endpoint/package.json +5 -5
- package/node_modules/@smithy/middleware-retry/package.json +8 -8
- package/node_modules/@smithy/middleware-serde/package.json +3 -3
- package/node_modules/@smithy/middleware-stack/package.json +2 -2
- package/node_modules/@smithy/node-config-provider/dist-cjs/fromSharedConfigFiles.js +2 -1
- package/node_modules/@smithy/node-config-provider/dist-es/fromSharedConfigFiles.js +2 -1
- package/node_modules/@smithy/node-config-provider/dist-types/fromSharedConfigFiles.d.ts +2 -2
- package/node_modules/@smithy/node-config-provider/dist-types/ts3.4/fromSharedConfigFiles.d.ts +2 -2
- package/node_modules/@smithy/node-config-provider/package.json +4 -4
- package/node_modules/@smithy/node-http-handler/package.json +5 -5
- package/node_modules/@smithy/property-provider/package.json +2 -2
- package/node_modules/@smithy/protocol-http/package.json +2 -2
- package/node_modules/@smithy/querystring-builder/package.json +2 -2
- package/node_modules/@smithy/querystring-parser/package.json +2 -2
- package/node_modules/@smithy/service-error-classification/package.json +2 -2
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getConfigData.js +21 -0
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSsoSessionData.js +4 -3
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/loadSharedConfigFiles.js +4 -3
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/parseIni.js +28 -9
- package/node_modules/@smithy/shared-ini-file-loader/dist-es/getConfigData.js +17 -0
- package/node_modules/@smithy/shared-ini-file-loader/dist-es/getSsoSessionData.js +4 -3
- package/node_modules/@smithy/shared-ini-file-loader/dist-es/loadSharedConfigFiles.js +3 -2
- package/node_modules/@smithy/shared-ini-file-loader/dist-es/parseIni.js +28 -9
- package/node_modules/@smithy/shared-ini-file-loader/dist-types/getConfigData.d.ts +8 -0
- package/node_modules/@smithy/shared-ini-file-loader/dist-types/loadSharedConfigFiles.d.ts +1 -0
- package/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getConfigData.d.ts +8 -0
- package/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/loadSharedConfigFiles.d.ts +1 -0
- package/node_modules/@smithy/shared-ini-file-loader/package.json +2 -2
- package/node_modules/@smithy/signature-v4/package.json +5 -5
- package/node_modules/@smithy/smithy-client/package.json +4 -4
- package/node_modules/@smithy/types/dist-cjs/profile.js +7 -0
- package/node_modules/@smithy/types/dist-es/profile.js +6 -1
- package/node_modules/@smithy/types/dist-types/profile.d.ts +8 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/profile.d.ts +8 -0
- package/node_modules/@smithy/types/package.json +1 -1
- package/node_modules/@smithy/url-parser/package.json +3 -3
- package/node_modules/@smithy/util-defaults-mode-browser/package.json +4 -4
- package/node_modules/@smithy/util-defaults-mode-node/package.json +7 -7
- package/node_modules/@smithy/util-middleware/package.json +2 -2
- package/node_modules/@smithy/util-retry/package.json +3 -3
- package/node_modules/@smithy/util-stream/package.json +5 -5
- package/node_modules/@smithy/util-waiter/package.json +3 -3
- package/package.json +12 -12
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getProfileData.js +0 -10
- package/node_modules/@smithy/shared-ini-file-loader/dist-es/getProfileData.js +0 -6
- package/node_modules/@smithy/shared-ini-file-loader/dist-types/getProfileData.d.ts +0 -7
- package/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getProfileData.d.ts +0 -7
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@smithy/node-config-provider",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.1.1",
|
4
4
|
"description": "Load config default values from ini config files and environmental variable",
|
5
5
|
"scripts": {
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
@@ -24,9 +24,9 @@
|
|
24
24
|
"module": "./dist-es/index.js",
|
25
25
|
"types": "./dist-types/index.d.ts",
|
26
26
|
"dependencies": {
|
27
|
-
"@smithy/property-provider": "^2.0.
|
28
|
-
"@smithy/shared-ini-file-loader": "^2.0
|
29
|
-
"@smithy/types": "^2.3.
|
27
|
+
"@smithy/property-provider": "^2.0.12",
|
28
|
+
"@smithy/shared-ini-file-loader": "^2.2.0",
|
29
|
+
"@smithy/types": "^2.3.5",
|
30
30
|
"tslib": "^2.5.0"
|
31
31
|
},
|
32
32
|
"devDependencies": {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@smithy/node-http-handler",
|
3
|
-
"version": "2.1.
|
3
|
+
"version": "2.1.7",
|
4
4
|
"description": "Provides a way to make requests",
|
5
5
|
"scripts": {
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
@@ -25,10 +25,10 @@
|
|
25
25
|
"module": "./dist-es/index.js",
|
26
26
|
"types": "./dist-types/index.d.ts",
|
27
27
|
"dependencies": {
|
28
|
-
"@smithy/abort-controller": "^2.0.
|
29
|
-
"@smithy/protocol-http": "^3.0.
|
30
|
-
"@smithy/querystring-builder": "^2.0.
|
31
|
-
"@smithy/types": "^2.3.
|
28
|
+
"@smithy/abort-controller": "^2.0.11",
|
29
|
+
"@smithy/protocol-http": "^3.0.7",
|
30
|
+
"@smithy/querystring-builder": "^2.0.11",
|
31
|
+
"@smithy/types": "^2.3.5",
|
32
32
|
"tslib": "^2.5.0"
|
33
33
|
},
|
34
34
|
"devDependencies": {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@smithy/property-provider",
|
3
|
-
"version": "2.0.
|
3
|
+
"version": "2.0.12",
|
4
4
|
"scripts": {
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
6
6
|
"build:cjs": "yarn g:tsc -p tsconfig.cjs.json",
|
@@ -22,7 +22,7 @@
|
|
22
22
|
},
|
23
23
|
"license": "Apache-2.0",
|
24
24
|
"dependencies": {
|
25
|
-
"@smithy/types": "^2.3.
|
25
|
+
"@smithy/types": "^2.3.5",
|
26
26
|
"tslib": "^2.5.0"
|
27
27
|
},
|
28
28
|
"engines": {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@smithy/protocol-http",
|
3
|
-
"version": "3.0.
|
3
|
+
"version": "3.0.7",
|
4
4
|
"scripts": {
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
6
6
|
"build:cjs": "yarn g:tsc -p tsconfig.cjs.json",
|
@@ -23,7 +23,7 @@
|
|
23
23
|
},
|
24
24
|
"license": "Apache-2.0",
|
25
25
|
"dependencies": {
|
26
|
-
"@smithy/types": "^2.3.
|
26
|
+
"@smithy/types": "^2.3.5",
|
27
27
|
"tslib": "^2.5.0"
|
28
28
|
},
|
29
29
|
"engines": {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@smithy/querystring-builder",
|
3
|
-
"version": "2.0.
|
3
|
+
"version": "2.0.11",
|
4
4
|
"scripts": {
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
6
6
|
"build:cjs": "yarn g:tsc -p tsconfig.cjs.json",
|
@@ -22,7 +22,7 @@
|
|
22
22
|
},
|
23
23
|
"license": "Apache-2.0",
|
24
24
|
"dependencies": {
|
25
|
-
"@smithy/types": "^2.3.
|
25
|
+
"@smithy/types": "^2.3.5",
|
26
26
|
"@smithy/util-uri-escape": "^2.0.0",
|
27
27
|
"tslib": "^2.5.0"
|
28
28
|
},
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@smithy/querystring-parser",
|
3
|
-
"version": "2.0.
|
3
|
+
"version": "2.0.11",
|
4
4
|
"scripts": {
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
6
6
|
"build:cjs": "yarn g:tsc -p tsconfig.cjs.json",
|
@@ -22,7 +22,7 @@
|
|
22
22
|
},
|
23
23
|
"license": "Apache-2.0",
|
24
24
|
"dependencies": {
|
25
|
-
"@smithy/types": "^2.3.
|
25
|
+
"@smithy/types": "^2.3.5",
|
26
26
|
"tslib": "^2.5.0"
|
27
27
|
},
|
28
28
|
"engines": {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@smithy/service-error-classification",
|
3
|
-
"version": "2.0.
|
3
|
+
"version": "2.0.4",
|
4
4
|
"scripts": {
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
6
6
|
"build:cjs": "yarn g:tsc -p tsconfig.cjs.json",
|
@@ -54,6 +54,6 @@
|
|
54
54
|
"directory": ".release/package"
|
55
55
|
},
|
56
56
|
"dependencies": {
|
57
|
-
"@smithy/types": "^2.3.
|
57
|
+
"@smithy/types": "^2.3.5"
|
58
58
|
}
|
59
59
|
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getConfigData = void 0;
|
4
|
+
const types_1 = require("@smithy/types");
|
5
|
+
const loadSharedConfigFiles_1 = require("./loadSharedConfigFiles");
|
6
|
+
const getConfigData = (data) => Object.entries(data)
|
7
|
+
.filter(([key]) => {
|
8
|
+
const sections = key.split(loadSharedConfigFiles_1.CONFIG_PREFIX_SEPARATOR);
|
9
|
+
if (sections.length === 2 && Object.values(types_1.IniSectionType).includes(sections[0])) {
|
10
|
+
return true;
|
11
|
+
}
|
12
|
+
return false;
|
13
|
+
})
|
14
|
+
.reduce((acc, [key, value]) => {
|
15
|
+
const updatedKey = key.startsWith(types_1.IniSectionType.PROFILE) ? key.split(loadSharedConfigFiles_1.CONFIG_PREFIX_SEPARATOR)[1] : key;
|
16
|
+
acc[updatedKey] = value;
|
17
|
+
return acc;
|
18
|
+
}, {
|
19
|
+
...(data.default && { default: data.default }),
|
20
|
+
});
|
21
|
+
exports.getConfigData = getConfigData;
|
@@ -1,8 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.getSsoSessionData = void 0;
|
4
|
-
const
|
4
|
+
const types_1 = require("@smithy/types");
|
5
|
+
const loadSharedConfigFiles_1 = require("./loadSharedConfigFiles");
|
5
6
|
const getSsoSessionData = (data) => Object.entries(data)
|
6
|
-
.filter(([key]) =>
|
7
|
-
.reduce((acc, [key, value]) => ({ ...acc, [
|
7
|
+
.filter(([key]) => key.startsWith(types_1.IniSectionType.SSO_SESSION + loadSharedConfigFiles_1.CONFIG_PREFIX_SEPARATOR))
|
8
|
+
.reduce((acc, [key, value]) => ({ ...acc, [key.split(loadSharedConfigFiles_1.CONFIG_PREFIX_SEPARATOR)[1]]: value }), {});
|
8
9
|
exports.getSsoSessionData = getSsoSessionData;
|
@@ -1,12 +1,13 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.loadSharedConfigFiles = void 0;
|
3
|
+
exports.loadSharedConfigFiles = exports.CONFIG_PREFIX_SEPARATOR = void 0;
|
4
|
+
const getConfigData_1 = require("./getConfigData");
|
4
5
|
const getConfigFilepath_1 = require("./getConfigFilepath");
|
5
6
|
const getCredentialsFilepath_1 = require("./getCredentialsFilepath");
|
6
|
-
const getProfileData_1 = require("./getProfileData");
|
7
7
|
const parseIni_1 = require("./parseIni");
|
8
8
|
const slurpFile_1 = require("./slurpFile");
|
9
9
|
const swallowError = () => ({});
|
10
|
+
exports.CONFIG_PREFIX_SEPARATOR = ".";
|
10
11
|
const loadSharedConfigFiles = async (init = {}) => {
|
11
12
|
const { filepath = (0, getCredentialsFilepath_1.getCredentialsFilepath)(), configFilepath = (0, getConfigFilepath_1.getConfigFilepath)() } = init;
|
12
13
|
const parsedFiles = await Promise.all([
|
@@ -14,7 +15,7 @@ const loadSharedConfigFiles = async (init = {}) => {
|
|
14
15
|
ignoreCache: init.ignoreCache,
|
15
16
|
})
|
16
17
|
.then(parseIni_1.parseIni)
|
17
|
-
.then(
|
18
|
+
.then(getConfigData_1.getConfigData)
|
18
19
|
.catch(swallowError),
|
19
20
|
(0, slurpFile_1.slurpFile)(filepath, {
|
20
21
|
ignoreCache: init.ignoreCache,
|
@@ -1,31 +1,50 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.parseIni = void 0;
|
4
|
+
const types_1 = require("@smithy/types");
|
5
|
+
const loadSharedConfigFiles_1 = require("./loadSharedConfigFiles");
|
6
|
+
const prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-]+)\2$/;
|
4
7
|
const profileNameBlockList = ["__proto__", "profile __proto__"];
|
5
8
|
const parseIni = (iniData) => {
|
6
9
|
const map = {};
|
7
10
|
let currentSection;
|
11
|
+
let currentSubSection;
|
8
12
|
for (let line of iniData.split(/\r?\n/)) {
|
9
13
|
line = line.split(/(^|\s)[;#]/)[0].trim();
|
10
14
|
const isSection = line[0] === "[" && line[line.length - 1] === "]";
|
11
15
|
if (isSection) {
|
12
|
-
currentSection =
|
13
|
-
|
14
|
-
|
16
|
+
currentSection = undefined;
|
17
|
+
currentSubSection = undefined;
|
18
|
+
const sectionName = line.substring(1, line.length - 1);
|
19
|
+
const matches = prefixKeyRegex.exec(sectionName);
|
20
|
+
if (matches) {
|
21
|
+
const [, prefix, , name] = matches;
|
22
|
+
if (Object.values(types_1.IniSectionType).includes(prefix)) {
|
23
|
+
currentSection = [prefix, name].join(loadSharedConfigFiles_1.CONFIG_PREFIX_SEPARATOR);
|
24
|
+
}
|
25
|
+
}
|
26
|
+
else {
|
27
|
+
currentSection = sectionName;
|
28
|
+
}
|
29
|
+
if (profileNameBlockList.includes(sectionName)) {
|
30
|
+
throw new Error(`Found invalid profile name "${sectionName}"`);
|
15
31
|
}
|
16
32
|
}
|
17
33
|
else if (currentSection) {
|
18
34
|
const indexOfEqualsSign = line.indexOf("=");
|
19
|
-
|
20
|
-
const end = line.length - 1;
|
21
|
-
const isAssignment = indexOfEqualsSign !== -1 && indexOfEqualsSign !== start && indexOfEqualsSign !== end;
|
22
|
-
if (isAssignment) {
|
35
|
+
if (![0, -1].includes(indexOfEqualsSign)) {
|
23
36
|
const [name, value] = [
|
24
37
|
line.substring(0, indexOfEqualsSign).trim(),
|
25
38
|
line.substring(indexOfEqualsSign + 1).trim(),
|
26
39
|
];
|
27
|
-
|
28
|
-
|
40
|
+
if (value === "") {
|
41
|
+
currentSubSection = name;
|
42
|
+
}
|
43
|
+
else {
|
44
|
+
map[currentSection] = map[currentSection] || {};
|
45
|
+
const key = currentSubSection ? [currentSubSection, name].join(loadSharedConfigFiles_1.CONFIG_PREFIX_SEPARATOR) : name;
|
46
|
+
map[currentSection][key] = value;
|
47
|
+
}
|
29
48
|
}
|
30
49
|
}
|
31
50
|
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { IniSectionType } from "@smithy/types";
|
2
|
+
import { CONFIG_PREFIX_SEPARATOR } from "./loadSharedConfigFiles";
|
3
|
+
export const getConfigData = (data) => Object.entries(data)
|
4
|
+
.filter(([key]) => {
|
5
|
+
const sections = key.split(CONFIG_PREFIX_SEPARATOR);
|
6
|
+
if (sections.length === 2 && Object.values(IniSectionType).includes(sections[0])) {
|
7
|
+
return true;
|
8
|
+
}
|
9
|
+
return false;
|
10
|
+
})
|
11
|
+
.reduce((acc, [key, value]) => {
|
12
|
+
const updatedKey = key.startsWith(IniSectionType.PROFILE) ? key.split(CONFIG_PREFIX_SEPARATOR)[1] : key;
|
13
|
+
acc[updatedKey] = value;
|
14
|
+
return acc;
|
15
|
+
}, {
|
16
|
+
...(data.default && { default: data.default }),
|
17
|
+
});
|
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
import { IniSectionType } from "@smithy/types";
|
2
|
+
import { CONFIG_PREFIX_SEPARATOR } from "./loadSharedConfigFiles";
|
2
3
|
export const getSsoSessionData = (data) => Object.entries(data)
|
3
|
-
.filter(([key]) =>
|
4
|
-
.reduce((acc, [key, value]) => ({ ...acc, [
|
4
|
+
.filter(([key]) => key.startsWith(IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR))
|
5
|
+
.reduce((acc, [key, value]) => ({ ...acc, [key.split(CONFIG_PREFIX_SEPARATOR)[1]]: value }), {});
|
@@ -1,9 +1,10 @@
|
|
1
|
+
import { getConfigData } from "./getConfigData";
|
1
2
|
import { getConfigFilepath } from "./getConfigFilepath";
|
2
3
|
import { getCredentialsFilepath } from "./getCredentialsFilepath";
|
3
|
-
import { getProfileData } from "./getProfileData";
|
4
4
|
import { parseIni } from "./parseIni";
|
5
5
|
import { slurpFile } from "./slurpFile";
|
6
6
|
const swallowError = () => ({});
|
7
|
+
export const CONFIG_PREFIX_SEPARATOR = ".";
|
7
8
|
export const loadSharedConfigFiles = async (init = {}) => {
|
8
9
|
const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init;
|
9
10
|
const parsedFiles = await Promise.all([
|
@@ -11,7 +12,7 @@ export const loadSharedConfigFiles = async (init = {}) => {
|
|
11
12
|
ignoreCache: init.ignoreCache,
|
12
13
|
})
|
13
14
|
.then(parseIni)
|
14
|
-
.then(
|
15
|
+
.then(getConfigData)
|
15
16
|
.catch(swallowError),
|
16
17
|
slurpFile(filepath, {
|
17
18
|
ignoreCache: init.ignoreCache,
|
@@ -1,28 +1,47 @@
|
|
1
|
+
import { IniSectionType } from "@smithy/types";
|
2
|
+
import { CONFIG_PREFIX_SEPARATOR } from "./loadSharedConfigFiles";
|
3
|
+
const prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-]+)\2$/;
|
1
4
|
const profileNameBlockList = ["__proto__", "profile __proto__"];
|
2
5
|
export const parseIni = (iniData) => {
|
3
6
|
const map = {};
|
4
7
|
let currentSection;
|
8
|
+
let currentSubSection;
|
5
9
|
for (let line of iniData.split(/\r?\n/)) {
|
6
10
|
line = line.split(/(^|\s)[;#]/)[0].trim();
|
7
11
|
const isSection = line[0] === "[" && line[line.length - 1] === "]";
|
8
12
|
if (isSection) {
|
9
|
-
currentSection =
|
10
|
-
|
11
|
-
|
13
|
+
currentSection = undefined;
|
14
|
+
currentSubSection = undefined;
|
15
|
+
const sectionName = line.substring(1, line.length - 1);
|
16
|
+
const matches = prefixKeyRegex.exec(sectionName);
|
17
|
+
if (matches) {
|
18
|
+
const [, prefix, , name] = matches;
|
19
|
+
if (Object.values(IniSectionType).includes(prefix)) {
|
20
|
+
currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR);
|
21
|
+
}
|
22
|
+
}
|
23
|
+
else {
|
24
|
+
currentSection = sectionName;
|
25
|
+
}
|
26
|
+
if (profileNameBlockList.includes(sectionName)) {
|
27
|
+
throw new Error(`Found invalid profile name "${sectionName}"`);
|
12
28
|
}
|
13
29
|
}
|
14
30
|
else if (currentSection) {
|
15
31
|
const indexOfEqualsSign = line.indexOf("=");
|
16
|
-
|
17
|
-
const end = line.length - 1;
|
18
|
-
const isAssignment = indexOfEqualsSign !== -1 && indexOfEqualsSign !== start && indexOfEqualsSign !== end;
|
19
|
-
if (isAssignment) {
|
32
|
+
if (![0, -1].includes(indexOfEqualsSign)) {
|
20
33
|
const [name, value] = [
|
21
34
|
line.substring(0, indexOfEqualsSign).trim(),
|
22
35
|
line.substring(indexOfEqualsSign + 1).trim(),
|
23
36
|
];
|
24
|
-
|
25
|
-
|
37
|
+
if (value === "") {
|
38
|
+
currentSubSection = name;
|
39
|
+
}
|
40
|
+
else {
|
41
|
+
map[currentSection] = map[currentSection] || {};
|
42
|
+
const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name;
|
43
|
+
map[currentSection][key] = value;
|
44
|
+
}
|
26
45
|
}
|
27
46
|
}
|
28
47
|
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { ParsedIniData } from "@smithy/types";
|
2
|
+
/**
|
3
|
+
* Returns the config data from parsed ini data.
|
4
|
+
* * Returns data for `default`
|
5
|
+
* * Returns profile name without prefix.
|
6
|
+
* * Returns non-profiles as is.
|
7
|
+
*/
|
8
|
+
export declare const getConfigData: (data: ParsedIniData) => ParsedIniData;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { ParsedIniData } from "@smithy/types";
|
2
|
+
/**
|
3
|
+
* Returns the config data from parsed ini data.
|
4
|
+
* * Returns data for `default`
|
5
|
+
* * Returns profile name without prefix.
|
6
|
+
* * Returns non-profiles as is.
|
7
|
+
*/
|
8
|
+
export declare const getConfigData: (data: ParsedIniData) => ParsedIniData;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@smithy/signature-v4",
|
3
|
-
"version": "2.0.
|
3
|
+
"version": "2.0.11",
|
4
4
|
"description": "A standalone implementation of the AWS Signature V4 request signing algorithm",
|
5
5
|
"main": "./dist-cjs/index.js",
|
6
6
|
"module": "./dist-es/index.js",
|
@@ -24,18 +24,18 @@
|
|
24
24
|
},
|
25
25
|
"license": "Apache-2.0",
|
26
26
|
"dependencies": {
|
27
|
-
"@smithy/eventstream-codec": "^2.0.
|
27
|
+
"@smithy/eventstream-codec": "^2.0.11",
|
28
28
|
"@smithy/is-array-buffer": "^2.0.0",
|
29
|
-
"@smithy/types": "^2.3.
|
29
|
+
"@smithy/types": "^2.3.5",
|
30
30
|
"@smithy/util-hex-encoding": "^2.0.0",
|
31
|
-
"@smithy/util-middleware": "^2.0.
|
31
|
+
"@smithy/util-middleware": "^2.0.4",
|
32
32
|
"@smithy/util-uri-escape": "^2.0.0",
|
33
33
|
"@smithy/util-utf8": "^2.0.0",
|
34
34
|
"tslib": "^2.5.0"
|
35
35
|
},
|
36
36
|
"devDependencies": {
|
37
37
|
"@aws-crypto/sha256-js": "3.0.0",
|
38
|
-
"@smithy/protocol-http": "^3.0.
|
38
|
+
"@smithy/protocol-http": "^3.0.7",
|
39
39
|
"@tsconfig/recommended": "1.0.1",
|
40
40
|
"concurrently": "7.0.0",
|
41
41
|
"downlevel-dts": "0.10.1",
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@smithy/smithy-client",
|
3
|
-
"version": "2.1.
|
3
|
+
"version": "2.1.10",
|
4
4
|
"scripts": {
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
6
6
|
"build:cjs": "yarn g:tsc -p tsconfig.cjs.json",
|
@@ -23,9 +23,9 @@
|
|
23
23
|
},
|
24
24
|
"license": "Apache-2.0",
|
25
25
|
"dependencies": {
|
26
|
-
"@smithy/middleware-stack": "^2.0.
|
27
|
-
"@smithy/types": "^2.3.
|
28
|
-
"@smithy/util-stream": "^2.0.
|
26
|
+
"@smithy/middleware-stack": "^2.0.5",
|
27
|
+
"@smithy/types": "^2.3.5",
|
28
|
+
"@smithy/util-stream": "^2.0.15",
|
29
29
|
"tslib": "^2.5.0"
|
30
30
|
},
|
31
31
|
"engines": {
|
@@ -1,2 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.IniSectionType = void 0;
|
4
|
+
var IniSectionType;
|
5
|
+
(function (IniSectionType) {
|
6
|
+
IniSectionType["PROFILE"] = "profile";
|
7
|
+
IniSectionType["SSO_SESSION"] = "sso-session";
|
8
|
+
IniSectionType["SERVICES"] = "services";
|
9
|
+
})(IniSectionType = exports.IniSectionType || (exports.IniSectionType = {}));
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@smithy/url-parser",
|
3
|
-
"version": "2.0.
|
3
|
+
"version": "2.0.11",
|
4
4
|
"scripts": {
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
6
6
|
"build:cjs": "yarn g:tsc -p tsconfig.cjs.json",
|
@@ -22,8 +22,8 @@
|
|
22
22
|
},
|
23
23
|
"license": "Apache-2.0",
|
24
24
|
"dependencies": {
|
25
|
-
"@smithy/querystring-parser": "^2.0.
|
26
|
-
"@smithy/types": "^2.3.
|
25
|
+
"@smithy/querystring-parser": "^2.0.11",
|
26
|
+
"@smithy/types": "^2.3.5",
|
27
27
|
"tslib": "^2.5.0"
|
28
28
|
},
|
29
29
|
"typesVersions": {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@smithy/util-defaults-mode-browser",
|
3
|
-
"version": "2.0.
|
3
|
+
"version": "2.0.14",
|
4
4
|
"scripts": {
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
6
6
|
"build:cjs": "yarn g:tsc -p tsconfig.cjs.json",
|
@@ -22,9 +22,9 @@
|
|
22
22
|
},
|
23
23
|
"license": "Apache-2.0",
|
24
24
|
"dependencies": {
|
25
|
-
"@smithy/property-provider": "^2.0.
|
26
|
-
"@smithy/smithy-client": "^2.1.
|
27
|
-
"@smithy/types": "^2.3.
|
25
|
+
"@smithy/property-provider": "^2.0.12",
|
26
|
+
"@smithy/smithy-client": "^2.1.10",
|
27
|
+
"@smithy/types": "^2.3.5",
|
28
28
|
"bowser": "^2.11.0",
|
29
29
|
"tslib": "^2.5.0"
|
30
30
|
},
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@smithy/util-defaults-mode-node",
|
3
|
-
"version": "2.0.
|
3
|
+
"version": "2.0.18",
|
4
4
|
"scripts": {
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
6
6
|
"build:cjs": "yarn g:tsc -p tsconfig.cjs.json",
|
@@ -22,12 +22,12 @@
|
|
22
22
|
},
|
23
23
|
"license": "Apache-2.0",
|
24
24
|
"dependencies": {
|
25
|
-
"@smithy/config-resolver": "^2.0.
|
26
|
-
"@smithy/credential-provider-imds": "^2.0.
|
27
|
-
"@smithy/node-config-provider": "^2.
|
28
|
-
"@smithy/property-provider": "^2.0.
|
29
|
-
"@smithy/smithy-client": "^2.1.
|
30
|
-
"@smithy/types": "^2.3.
|
25
|
+
"@smithy/config-resolver": "^2.0.14",
|
26
|
+
"@smithy/credential-provider-imds": "^2.0.16",
|
27
|
+
"@smithy/node-config-provider": "^2.1.1",
|
28
|
+
"@smithy/property-provider": "^2.0.12",
|
29
|
+
"@smithy/smithy-client": "^2.1.10",
|
30
|
+
"@smithy/types": "^2.3.5",
|
31
31
|
"tslib": "^2.5.0"
|
32
32
|
},
|
33
33
|
"devDependencies": {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@smithy/util-middleware",
|
3
|
-
"version": "2.0.
|
3
|
+
"version": "2.0.4",
|
4
4
|
"description": "Shared utilities for to be used in middleware packages.",
|
5
5
|
"main": "./dist-cjs/index.js",
|
6
6
|
"module": "./dist-es/index.js",
|
@@ -26,7 +26,7 @@
|
|
26
26
|
},
|
27
27
|
"license": "Apache-2.0",
|
28
28
|
"dependencies": {
|
29
|
-
"@smithy/types": "^2.3.
|
29
|
+
"@smithy/types": "^2.3.5",
|
30
30
|
"tslib": "^2.5.0"
|
31
31
|
},
|
32
32
|
"devDependencies": {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@smithy/util-retry",
|
3
|
-
"version": "2.0.
|
3
|
+
"version": "2.0.4",
|
4
4
|
"description": "Shared retry utilities to be used in middleware packages.",
|
5
5
|
"main": "./dist-cjs/index.js",
|
6
6
|
"module": "./dist-es/index.js",
|
@@ -27,8 +27,8 @@
|
|
27
27
|
},
|
28
28
|
"license": "Apache-2.0",
|
29
29
|
"dependencies": {
|
30
|
-
"@smithy/service-error-classification": "^2.0.
|
31
|
-
"@smithy/types": "^2.3.
|
30
|
+
"@smithy/service-error-classification": "^2.0.4",
|
31
|
+
"@smithy/types": "^2.3.5",
|
32
32
|
"tslib": "^2.5.0"
|
33
33
|
},
|
34
34
|
"devDependencies": {
|