@jr2804/livesync-cli 1.0.0-cli → 1.0.0-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.
Files changed (33) hide show
  1. package/dist/AwsRestJsonProtocol-BPmCQzXa.cjs +391 -0
  2. package/dist/CredentialsProviderError-DQ_v7TCm.cjs +45 -0
  3. package/dist/XmlShapeDeserializer-B1_gcW92.cjs +2097 -0
  4. package/dist/bundle.cjs +152019 -0
  5. package/dist/chain-D9g13I5f.cjs +21 -0
  6. package/dist/common-B3KclSP_.cjs +375 -0
  7. package/dist/configLoader-Cur07c2S.cjs +149 -0
  8. package/dist/date-utils-Dr5LXq4_.cjs +338 -0
  9. package/dist/dist-es-BU2b9jKG.cjs +274 -0
  10. package/dist/dist-es-CaaxKLO9.cjs +52 -0
  11. package/dist/dist-es-D7nIauPC.cjs +60 -0
  12. package/dist/dist-es-DhxfSNMj.cjs +128 -0
  13. package/dist/dist-es-FcX9AtZC.cjs +433 -0
  14. package/dist/dist-es-vq3O1QUl.cjs +331 -0
  15. package/dist/esbuild.config.cjs +24 -0
  16. package/dist/event-streams-DmrxQXpO.cjs +195 -0
  17. package/dist/extensions-DkDzTVCO.cjs +4823 -0
  18. package/dist/externalDataInterceptor-D7DaIG7M.cjs +24 -0
  19. package/dist/getSSOTokenFromFile-D0KPH2qZ.cjs +36 -0
  20. package/dist/httpRequest-C7Ex2WeE.cjs +59 -0
  21. package/dist/loadSharedConfigFiles-CqEQHuLW.cjs +117 -0
  22. package/dist/loadSso-Dn78jIWR.cjs +639 -0
  23. package/dist/package-BC7A0_n0.cjs +158 -0
  24. package/dist/parseKnownFiles-DLeTaAhg.cjs +21 -0
  25. package/dist/readFile-B3ey_wDD.cjs +46 -0
  26. package/dist/sdk-stream-mixin-YBLWtp6l.cjs +146 -0
  27. package/dist/serde-DtADB-gG.cjs +597 -0
  28. package/dist/setCredentialFeature-qcUbSyqa.cjs +13 -0
  29. package/dist/signin-DHnd2WFx.cjs +715 -0
  30. package/dist/sso-oidc-B4fkm2gn.cjs +901 -0
  31. package/dist/stream-collector-jwXXBEUn.cjs +584 -0
  32. package/dist/sts-C9aqjeec.cjs +1531 -0
  33. package/package.json +2 -4
@@ -0,0 +1,24 @@
1
+ const require_readFile = require("./readFile-B3ey_wDD.cjs");
2
+ const require_getSSOTokenFromFile = require("./getSSOTokenFromFile-D0KPH2qZ.cjs");
3
+ //#region ../../../node_modules/@smithy/shared-ini-file-loader/dist-es/externalDataInterceptor.js
4
+ var externalDataInterceptor = {
5
+ getFileRecord() {
6
+ return require_readFile.fileIntercept;
7
+ },
8
+ interceptFile(path, contents) {
9
+ require_readFile.fileIntercept[path] = Promise.resolve(contents);
10
+ },
11
+ getTokenRecord() {
12
+ return require_getSSOTokenFromFile.tokenIntercept;
13
+ },
14
+ interceptToken(id, contents) {
15
+ require_getSSOTokenFromFile.tokenIntercept[id] = contents;
16
+ }
17
+ };
18
+ //#endregion
19
+ Object.defineProperty(exports, "externalDataInterceptor", {
20
+ enumerable: true,
21
+ get: function() {
22
+ return externalDataInterceptor;
23
+ }
24
+ });
@@ -0,0 +1,36 @@
1
+ const require_readFile = require("./readFile-B3ey_wDD.cjs");
2
+ let path = require("path");
3
+ let crypto = require("crypto");
4
+ let fs_promises = require("fs/promises");
5
+ //#region ../../../node_modules/@smithy/shared-ini-file-loader/dist-es/getSSOTokenFilepath.js
6
+ var getSSOTokenFilepath = (id) => {
7
+ const cacheName = (0, crypto.createHash)("sha1").update(id).digest("hex");
8
+ return (0, path.join)(require_readFile.getHomeDir(), ".aws", "sso", "cache", `${cacheName}.json`);
9
+ };
10
+ //#endregion
11
+ //#region ../../../node_modules/@smithy/shared-ini-file-loader/dist-es/getSSOTokenFromFile.js
12
+ var tokenIntercept = {};
13
+ var getSSOTokenFromFile = async (id) => {
14
+ if (tokenIntercept[id]) return tokenIntercept[id];
15
+ const ssoTokenText = await (0, fs_promises.readFile)(getSSOTokenFilepath(id), "utf8");
16
+ return JSON.parse(ssoTokenText);
17
+ };
18
+ //#endregion
19
+ Object.defineProperty(exports, "getSSOTokenFilepath", {
20
+ enumerable: true,
21
+ get: function() {
22
+ return getSSOTokenFilepath;
23
+ }
24
+ });
25
+ Object.defineProperty(exports, "getSSOTokenFromFile", {
26
+ enumerable: true,
27
+ get: function() {
28
+ return getSSOTokenFromFile;
29
+ }
30
+ });
31
+ Object.defineProperty(exports, "tokenIntercept", {
32
+ enumerable: true,
33
+ get: function() {
34
+ return tokenIntercept;
35
+ }
36
+ });
@@ -0,0 +1,59 @@
1
+ //#region ../../../node_modules/@smithy/protocol-http/dist-es/httpRequest.js
2
+ var HttpRequest = class HttpRequest {
3
+ method;
4
+ protocol;
5
+ hostname;
6
+ port;
7
+ path;
8
+ query;
9
+ headers;
10
+ username;
11
+ password;
12
+ fragment;
13
+ body;
14
+ constructor(options) {
15
+ this.method = options.method || "GET";
16
+ this.hostname = options.hostname || "localhost";
17
+ this.port = options.port;
18
+ this.query = options.query || {};
19
+ this.headers = options.headers || {};
20
+ this.body = options.body;
21
+ this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:";
22
+ this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/";
23
+ this.username = options.username;
24
+ this.password = options.password;
25
+ this.fragment = options.fragment;
26
+ }
27
+ static clone(request) {
28
+ const cloned = new HttpRequest({
29
+ ...request,
30
+ headers: { ...request.headers }
31
+ });
32
+ if (cloned.query) cloned.query = cloneQuery(cloned.query);
33
+ return cloned;
34
+ }
35
+ static isInstance(request) {
36
+ if (!request) return false;
37
+ const req = request;
38
+ return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object";
39
+ }
40
+ clone() {
41
+ return HttpRequest.clone(this);
42
+ }
43
+ };
44
+ function cloneQuery(query) {
45
+ return Object.keys(query).reduce((carry, paramName) => {
46
+ const param = query[paramName];
47
+ return {
48
+ ...carry,
49
+ [paramName]: Array.isArray(param) ? [...param] : param
50
+ };
51
+ }, {});
52
+ }
53
+ //#endregion
54
+ Object.defineProperty(exports, "HttpRequest", {
55
+ enumerable: true,
56
+ get: function() {
57
+ return HttpRequest;
58
+ }
59
+ });
@@ -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
+ });