@jr2804/livesync-cli 1.0.0-cli → 1.0.16-cli.1
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/README.md +44 -3
- package/dist/AwsRestJsonProtocol-BPmCQzXa.cjs +391 -0
- package/dist/CredentialsProviderError-DQ_v7TCm.cjs +45 -0
- package/dist/XmlShapeDeserializer-B1_gcW92.cjs +2097 -0
- package/dist/chain-D9g13I5f.cjs +21 -0
- package/dist/common-B3KclSP_.cjs +375 -0
- package/dist/configLoader-Cur07c2S.cjs +149 -0
- package/dist/date-utils-Dr5LXq4_.cjs +338 -0
- package/dist/dist-es-BU2b9jKG.cjs +274 -0
- package/dist/dist-es-CaaxKLO9.cjs +52 -0
- package/dist/dist-es-D7nIauPC.cjs +60 -0
- package/dist/dist-es-DhxfSNMj.cjs +128 -0
- package/dist/dist-es-FcX9AtZC.cjs +433 -0
- package/dist/dist-es-vq3O1QUl.cjs +331 -0
- package/dist/{index.browser-DZqJcWQp.cjs → event-streams-DmrxQXpO.cjs} +3 -3
- package/dist/extensions-DkDzTVCO.cjs +4823 -0
- package/dist/externalDataInterceptor-D7DaIG7M.cjs +24 -0
- package/dist/getSSOTokenFromFile-D0KPH2qZ.cjs +36 -0
- package/dist/httpRequest-C7Ex2WeE.cjs +59 -0
- package/dist/index.cjs +5949 -1556
- package/dist/loadSharedConfigFiles-CqEQHuLW.cjs +117 -0
- package/dist/loadSso-Dn78jIWR.cjs +639 -0
- package/dist/package-BC7A0_n0.cjs +158 -0
- package/dist/parseKnownFiles-DLeTaAhg.cjs +21 -0
- package/dist/readFile-B3ey_wDD.cjs +46 -0
- package/dist/sdk-stream-mixin-YBLWtp6l.cjs +146 -0
- package/dist/{index.browser-DbH0tIYi.cjs → serde-DtADB-gG.cjs} +178 -310
- package/dist/setCredentialFeature-qcUbSyqa.cjs +13 -0
- package/dist/signin-DHnd2WFx.cjs +715 -0
- package/dist/sso-oidc-B4fkm2gn.cjs +901 -0
- package/dist/stream-collector-jwXXBEUn.cjs +584 -0
- package/dist/sts-C9aqjeec.cjs +1531 -0
- package/package.json +8 -5
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
const require_readFile = require("./readFile-B3ey_wDD.cjs");
|
|
2
|
+
let path = require("path");
|
|
3
|
+
//#region ../../../node_modules/@smithy/types/dist-es/profile.js
|
|
4
|
+
var IniSectionType;
|
|
5
|
+
(function(IniSectionType) {
|
|
6
|
+
IniSectionType["PROFILE"] = "profile";
|
|
7
|
+
IniSectionType["SSO_SESSION"] = "sso-session";
|
|
8
|
+
IniSectionType["SERVICES"] = "services";
|
|
9
|
+
})(IniSectionType || (IniSectionType = {}));
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region ../../../node_modules/@smithy/shared-ini-file-loader/dist-es/getProfileName.js
|
|
12
|
+
var ENV_PROFILE = "AWS_PROFILE";
|
|
13
|
+
var getProfileName = (init) => init.profile || process.env["AWS_PROFILE"] || "default";
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region ../../../node_modules/@smithy/shared-ini-file-loader/dist-es/getConfigData.js
|
|
16
|
+
var getConfigData = (data) => Object.entries(data).filter(([key]) => {
|
|
17
|
+
const indexOfSeparator = key.indexOf(".");
|
|
18
|
+
if (indexOfSeparator === -1) return false;
|
|
19
|
+
return Object.values(IniSectionType).includes(key.substring(0, indexOfSeparator));
|
|
20
|
+
}).reduce((acc, [key, value]) => {
|
|
21
|
+
const indexOfSeparator = key.indexOf(".");
|
|
22
|
+
const updatedKey = key.substring(0, indexOfSeparator) === IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key;
|
|
23
|
+
acc[updatedKey] = value;
|
|
24
|
+
return acc;
|
|
25
|
+
}, { ...data.default && { default: data.default } });
|
|
26
|
+
var getConfigFilepath = () => process.env["AWS_CONFIG_FILE"] || (0, path.join)(require_readFile.getHomeDir(), ".aws", "config");
|
|
27
|
+
var getCredentialsFilepath = () => process.env["AWS_SHARED_CREDENTIALS_FILE"] || (0, path.join)(require_readFile.getHomeDir(), ".aws", "credentials");
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region ../../../node_modules/@smithy/shared-ini-file-loader/dist-es/parseIni.js
|
|
30
|
+
var prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/;
|
|
31
|
+
var profileNameBlockList = ["__proto__", "profile __proto__"];
|
|
32
|
+
var parseIni = (iniData) => {
|
|
33
|
+
const map = {};
|
|
34
|
+
let currentSection;
|
|
35
|
+
let currentSubSection;
|
|
36
|
+
for (const iniLine of iniData.split(/\r?\n/)) {
|
|
37
|
+
const trimmedLine = iniLine.split(/(^|\s)[;#]/)[0].trim();
|
|
38
|
+
if (trimmedLine[0] === "[" && trimmedLine[trimmedLine.length - 1] === "]") {
|
|
39
|
+
currentSection = void 0;
|
|
40
|
+
currentSubSection = void 0;
|
|
41
|
+
const sectionName = trimmedLine.substring(1, trimmedLine.length - 1);
|
|
42
|
+
const matches = prefixKeyRegex.exec(sectionName);
|
|
43
|
+
if (matches) {
|
|
44
|
+
const [, prefix, , name] = matches;
|
|
45
|
+
if (Object.values(IniSectionType).includes(prefix)) currentSection = [prefix, name].join(".");
|
|
46
|
+
} else currentSection = sectionName;
|
|
47
|
+
if (profileNameBlockList.includes(sectionName)) throw new Error(`Found invalid profile name "${sectionName}"`);
|
|
48
|
+
} else if (currentSection) {
|
|
49
|
+
const indexOfEqualsSign = trimmedLine.indexOf("=");
|
|
50
|
+
if (![0, -1].includes(indexOfEqualsSign)) {
|
|
51
|
+
const [name, value] = [trimmedLine.substring(0, indexOfEqualsSign).trim(), trimmedLine.substring(indexOfEqualsSign + 1).trim()];
|
|
52
|
+
if (value === "") currentSubSection = name;
|
|
53
|
+
else {
|
|
54
|
+
if (currentSubSection && iniLine.trimStart() === iniLine) currentSubSection = void 0;
|
|
55
|
+
map[currentSection] = map[currentSection] || {};
|
|
56
|
+
const key = currentSubSection ? [currentSubSection, name].join(".") : name;
|
|
57
|
+
map[currentSection][key] = value;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return map;
|
|
63
|
+
};
|
|
64
|
+
//#endregion
|
|
65
|
+
//#region ../../../node_modules/@smithy/shared-ini-file-loader/dist-es/loadSharedConfigFiles.js
|
|
66
|
+
var swallowError = () => ({});
|
|
67
|
+
var loadSharedConfigFiles = async (init = {}) => {
|
|
68
|
+
const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init;
|
|
69
|
+
const homeDir = require_readFile.getHomeDir();
|
|
70
|
+
const relativeHomeDirPrefix = "~/";
|
|
71
|
+
let resolvedFilepath = filepath;
|
|
72
|
+
if (filepath.startsWith(relativeHomeDirPrefix)) resolvedFilepath = (0, path.join)(homeDir, filepath.slice(2));
|
|
73
|
+
let resolvedConfigFilepath = configFilepath;
|
|
74
|
+
if (configFilepath.startsWith(relativeHomeDirPrefix)) resolvedConfigFilepath = (0, path.join)(homeDir, configFilepath.slice(2));
|
|
75
|
+
const parsedFiles = await Promise.all([require_readFile.readFile(resolvedConfigFilepath, { ignoreCache: init.ignoreCache }).then(parseIni).then(getConfigData).catch(swallowError), require_readFile.readFile(resolvedFilepath, { ignoreCache: init.ignoreCache }).then(parseIni).catch(swallowError)]);
|
|
76
|
+
return {
|
|
77
|
+
configFile: parsedFiles[0],
|
|
78
|
+
credentialsFile: parsedFiles[1]
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
//#endregion
|
|
82
|
+
Object.defineProperty(exports, "ENV_PROFILE", {
|
|
83
|
+
enumerable: true,
|
|
84
|
+
get: function() {
|
|
85
|
+
return ENV_PROFILE;
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
Object.defineProperty(exports, "IniSectionType", {
|
|
89
|
+
enumerable: true,
|
|
90
|
+
get: function() {
|
|
91
|
+
return IniSectionType;
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
Object.defineProperty(exports, "getConfigFilepath", {
|
|
95
|
+
enumerable: true,
|
|
96
|
+
get: function() {
|
|
97
|
+
return getConfigFilepath;
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
Object.defineProperty(exports, "getProfileName", {
|
|
101
|
+
enumerable: true,
|
|
102
|
+
get: function() {
|
|
103
|
+
return getProfileName;
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
Object.defineProperty(exports, "loadSharedConfigFiles", {
|
|
107
|
+
enumerable: true,
|
|
108
|
+
get: function() {
|
|
109
|
+
return loadSharedConfigFiles;
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
Object.defineProperty(exports, "parseIni", {
|
|
113
|
+
enumerable: true,
|
|
114
|
+
get: function() {
|
|
115
|
+
return parseIni;
|
|
116
|
+
}
|
|
117
|
+
});
|