@monolayer/sdk 1.2.5 → 1.3.0-canary.2
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/dist/bin/chunk-2DM36AIF.js +60 -0
- package/dist/bin/chunk-3TV5KLB7.js +105 -0
- package/dist/bin/chunk-54HDPH52.js +116 -0
- package/dist/bin/chunk-AKHG66MJ.js +2359 -0
- package/dist/bin/chunk-ASIK3ESJ.js +37 -0
- package/dist/bin/chunk-AV7FB56K.js +14 -0
- package/dist/bin/chunk-D6MRFOU6.js +62 -0
- package/dist/bin/chunk-DQ2PXUF5.js +44 -0
- package/dist/bin/chunk-GE4ESXBP.js +57 -0
- package/dist/bin/chunk-K4XCYO2X.js +1637 -0
- package/dist/bin/chunk-KHQQRHZY.js +969 -0
- package/dist/bin/chunk-KSHJCBUY.js +938 -0
- package/dist/bin/chunk-KW25ZB6Z.js +14 -0
- package/dist/bin/chunk-SYAMBCRY.js +54 -0
- package/dist/bin/chunk-T4MZMT2A.js +122 -0
- package/dist/bin/chunk-U43L2J36.js +1875 -0
- package/dist/bin/chunk-UKX3KEC2.js +37 -0
- package/dist/bin/chunk-X7GJVU6X.js +182 -0
- package/dist/bin/cli.js +23 -61
- package/dist/bin/dist-es-4LCK4BMD.js +81 -0
- package/dist/bin/dist-es-4ULGGWP4.js +361 -0
- package/dist/bin/dist-es-7BYCFULM.js +7 -0
- package/dist/bin/dist-es-A2JHLMIV.js +154 -0
- package/dist/bin/dist-es-AWY666YH.js +292 -0
- package/dist/bin/dist-es-KUMQWKJB.js +194 -0
- package/dist/bin/dist-es-TNZXIBKF.js +292 -0
- package/dist/bin/dist-es-TV7F3ZAE.js +7 -0
- package/dist/bin/dist-es-XD3WAN5D.js +154 -0
- package/dist/bin/dist-es-YGJKPYIO.js +81 -0
- package/dist/bin/dist-es-YYROUSP5.js +62 -0
- package/dist/bin/dist-es-ZOY57CKU.js +62 -0
- package/dist/bin/dist-es-ZVXNFAFI.js +194 -0
- package/dist/bin/esm-ID5USS7G.js +4773 -0
- package/dist/bin/loadSso-55OGDGPY.js +484 -0
- package/dist/bin/loadSso-UYOIOSOA.js +480 -0
- package/dist/bin/sso-oidc-BHBT6MBW.js +732 -0
- package/dist/bin/sso-oidc-WOAY6JEM.js +733 -0
- package/dist/bin/sts-22SIO74C.js +1109 -0
- package/dist/bin/sts-SCV3QXFF.js +1064 -0
- package/dist/bin/sts-YWYJ3LVJ.js +1064 -0
- package/dist/cjs/workloads/stateless/broadcast/client/provider.d.ts +3 -1
- package/dist/cjs/workloads/stateless/broadcast/client/provider.js +16 -5
- package/dist/cjs/workloads/stateless/task/dispatcher.js +31 -0
- package/dist/esm/workloads/stateless/broadcast/client/provider.d.ts +3 -1
- package/dist/esm/workloads/stateless/broadcast/client/provider.js +16 -5
- package/dist/esm/workloads/stateless/task/dispatcher.js +8 -0
- package/package.json +1 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { createRequire } from 'module';
|
|
2
|
+
import { setCredentialFeature } from './chunk-KW25ZB6Z.js';
|
|
3
|
+
import { CredentialsProviderError } from './chunk-54HDPH52.js';
|
|
4
|
+
|
|
5
|
+
createRequire(import.meta.url);
|
|
6
|
+
|
|
7
|
+
// ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/credential-provider-env/dist-es/fromEnv.js
|
|
8
|
+
var ENV_KEY = "AWS_ACCESS_KEY_ID";
|
|
9
|
+
var ENV_SECRET = "AWS_SECRET_ACCESS_KEY";
|
|
10
|
+
var ENV_SESSION = "AWS_SESSION_TOKEN";
|
|
11
|
+
var ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION";
|
|
12
|
+
var ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE";
|
|
13
|
+
var ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID";
|
|
14
|
+
var fromEnv = (init) => async () => {
|
|
15
|
+
init?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");
|
|
16
|
+
const accessKeyId = process.env[ENV_KEY];
|
|
17
|
+
const secretAccessKey = process.env[ENV_SECRET];
|
|
18
|
+
const sessionToken = process.env[ENV_SESSION];
|
|
19
|
+
const expiry = process.env[ENV_EXPIRATION];
|
|
20
|
+
const credentialScope = process.env[ENV_CREDENTIAL_SCOPE];
|
|
21
|
+
const accountId = process.env[ENV_ACCOUNT_ID];
|
|
22
|
+
if (accessKeyId && secretAccessKey) {
|
|
23
|
+
const credentials = {
|
|
24
|
+
accessKeyId,
|
|
25
|
+
secretAccessKey,
|
|
26
|
+
...sessionToken && { sessionToken },
|
|
27
|
+
...expiry && { expiration: new Date(expiry) },
|
|
28
|
+
...credentialScope && { credentialScope },
|
|
29
|
+
...accountId && { accountId }
|
|
30
|
+
};
|
|
31
|
+
setCredentialFeature(credentials, "CREDENTIALS_ENV_VARS", "g");
|
|
32
|
+
return credentials;
|
|
33
|
+
}
|
|
34
|
+
throw new CredentialsProviderError("Unable to find environment variable credentials.", { logger: init?.logger });
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export { ENV_ACCOUNT_ID, ENV_CREDENTIAL_SCOPE, ENV_EXPIRATION, ENV_KEY, ENV_SECRET, ENV_SESSION, fromEnv };
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { createRequire } from 'module';
|
|
2
|
+
import { IniSectionType } from './chunk-D6MRFOU6.js';
|
|
3
|
+
import { join, sep } from 'path';
|
|
4
|
+
import { homedir } from 'os';
|
|
5
|
+
import { promises } from 'fs';
|
|
6
|
+
import { createHash } from 'crypto';
|
|
7
|
+
|
|
8
|
+
createRequire(import.meta.url);
|
|
9
|
+
|
|
10
|
+
// ../../node_modules/@smithy/shared-ini-file-loader/dist-es/getProfileName.js
|
|
11
|
+
var ENV_PROFILE = "AWS_PROFILE";
|
|
12
|
+
var DEFAULT_PROFILE = "default";
|
|
13
|
+
var getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE;
|
|
14
|
+
var homeDirCache = {};
|
|
15
|
+
var getHomeDirCacheKey = () => {
|
|
16
|
+
if (process && process.geteuid) {
|
|
17
|
+
return `${process.geteuid()}`;
|
|
18
|
+
}
|
|
19
|
+
return "DEFAULT";
|
|
20
|
+
};
|
|
21
|
+
var getHomeDir = () => {
|
|
22
|
+
const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${sep}` } = process.env;
|
|
23
|
+
if (HOME)
|
|
24
|
+
return HOME;
|
|
25
|
+
if (USERPROFILE)
|
|
26
|
+
return USERPROFILE;
|
|
27
|
+
if (HOMEPATH)
|
|
28
|
+
return `${HOMEDRIVE}${HOMEPATH}`;
|
|
29
|
+
const homeDirCacheKey = getHomeDirCacheKey();
|
|
30
|
+
if (!homeDirCache[homeDirCacheKey])
|
|
31
|
+
homeDirCache[homeDirCacheKey] = homedir();
|
|
32
|
+
return homeDirCache[homeDirCacheKey];
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// ../../node_modules/@smithy/shared-ini-file-loader/dist-es/getConfigFilepath.js
|
|
36
|
+
var ENV_CONFIG_PATH = "AWS_CONFIG_FILE";
|
|
37
|
+
var getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || join(getHomeDir(), ".aws", "config");
|
|
38
|
+
|
|
39
|
+
// ../../node_modules/@smithy/shared-ini-file-loader/dist-es/getConfigData.js
|
|
40
|
+
var getConfigData = (data) => Object.entries(data).filter(([key]) => {
|
|
41
|
+
const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);
|
|
42
|
+
if (indexOfSeparator === -1) {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
return Object.values(IniSectionType).includes(key.substring(0, indexOfSeparator));
|
|
46
|
+
}).reduce((acc, [key, value]) => {
|
|
47
|
+
const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);
|
|
48
|
+
const updatedKey = key.substring(0, indexOfSeparator) === IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key;
|
|
49
|
+
acc[updatedKey] = value;
|
|
50
|
+
return acc;
|
|
51
|
+
}, {
|
|
52
|
+
...data.default && { default: data.default }
|
|
53
|
+
});
|
|
54
|
+
var ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE";
|
|
55
|
+
var getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || join(getHomeDir(), ".aws", "credentials");
|
|
56
|
+
|
|
57
|
+
// ../../node_modules/@smithy/shared-ini-file-loader/dist-es/parseIni.js
|
|
58
|
+
var prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/;
|
|
59
|
+
var profileNameBlockList = ["__proto__", "profile __proto__"];
|
|
60
|
+
var parseIni = (iniData) => {
|
|
61
|
+
const map = {};
|
|
62
|
+
let currentSection;
|
|
63
|
+
let currentSubSection;
|
|
64
|
+
for (const iniLine of iniData.split(/\r?\n/)) {
|
|
65
|
+
const trimmedLine = iniLine.split(/(^|\s)[;#]/)[0].trim();
|
|
66
|
+
const isSection = trimmedLine[0] === "[" && trimmedLine[trimmedLine.length - 1] === "]";
|
|
67
|
+
if (isSection) {
|
|
68
|
+
currentSection = void 0;
|
|
69
|
+
currentSubSection = void 0;
|
|
70
|
+
const sectionName = trimmedLine.substring(1, trimmedLine.length - 1);
|
|
71
|
+
const matches = prefixKeyRegex.exec(sectionName);
|
|
72
|
+
if (matches) {
|
|
73
|
+
const [, prefix, , name] = matches;
|
|
74
|
+
if (Object.values(IniSectionType).includes(prefix)) {
|
|
75
|
+
currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR);
|
|
76
|
+
}
|
|
77
|
+
} else {
|
|
78
|
+
currentSection = sectionName;
|
|
79
|
+
}
|
|
80
|
+
if (profileNameBlockList.includes(sectionName)) {
|
|
81
|
+
throw new Error(`Found invalid profile name "${sectionName}"`);
|
|
82
|
+
}
|
|
83
|
+
} else if (currentSection) {
|
|
84
|
+
const indexOfEqualsSign = trimmedLine.indexOf("=");
|
|
85
|
+
if (![0, -1].includes(indexOfEqualsSign)) {
|
|
86
|
+
const [name, value] = [
|
|
87
|
+
trimmedLine.substring(0, indexOfEqualsSign).trim(),
|
|
88
|
+
trimmedLine.substring(indexOfEqualsSign + 1).trim()
|
|
89
|
+
];
|
|
90
|
+
if (value === "") {
|
|
91
|
+
currentSubSection = name;
|
|
92
|
+
} else {
|
|
93
|
+
if (currentSubSection && iniLine.trimStart() === iniLine) {
|
|
94
|
+
currentSubSection = void 0;
|
|
95
|
+
}
|
|
96
|
+
map[currentSection] = map[currentSection] || {};
|
|
97
|
+
const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name;
|
|
98
|
+
map[currentSection][key] = value;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return map;
|
|
104
|
+
};
|
|
105
|
+
var { readFile } = promises;
|
|
106
|
+
var filePromisesHash = {};
|
|
107
|
+
var slurpFile = (path, options) => {
|
|
108
|
+
if (!filePromisesHash[path] || options?.ignoreCache) {
|
|
109
|
+
filePromisesHash[path] = readFile(path, "utf8");
|
|
110
|
+
}
|
|
111
|
+
return filePromisesHash[path];
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
// ../../node_modules/@smithy/shared-ini-file-loader/dist-es/loadSharedConfigFiles.js
|
|
115
|
+
var swallowError = () => ({});
|
|
116
|
+
var CONFIG_PREFIX_SEPARATOR = ".";
|
|
117
|
+
var loadSharedConfigFiles = async (init = {}) => {
|
|
118
|
+
const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init;
|
|
119
|
+
const homeDir = getHomeDir();
|
|
120
|
+
const relativeHomeDirPrefix = "~/";
|
|
121
|
+
let resolvedFilepath = filepath;
|
|
122
|
+
if (filepath.startsWith(relativeHomeDirPrefix)) {
|
|
123
|
+
resolvedFilepath = join(homeDir, filepath.slice(2));
|
|
124
|
+
}
|
|
125
|
+
let resolvedConfigFilepath = configFilepath;
|
|
126
|
+
if (configFilepath.startsWith(relativeHomeDirPrefix)) {
|
|
127
|
+
resolvedConfigFilepath = join(homeDir, configFilepath.slice(2));
|
|
128
|
+
}
|
|
129
|
+
const parsedFiles = await Promise.all([
|
|
130
|
+
slurpFile(resolvedConfigFilepath, {
|
|
131
|
+
ignoreCache: init.ignoreCache
|
|
132
|
+
}).then(parseIni).then(getConfigData).catch(swallowError),
|
|
133
|
+
slurpFile(resolvedFilepath, {
|
|
134
|
+
ignoreCache: init.ignoreCache
|
|
135
|
+
}).then(parseIni).catch(swallowError)
|
|
136
|
+
]);
|
|
137
|
+
return {
|
|
138
|
+
configFile: parsedFiles[0],
|
|
139
|
+
credentialsFile: parsedFiles[1]
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
// ../../node_modules/@smithy/shared-ini-file-loader/dist-es/getSsoSessionData.js
|
|
144
|
+
var getSsoSessionData = (data) => Object.entries(data).filter(([key]) => key.startsWith(IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {});
|
|
145
|
+
|
|
146
|
+
// ../../node_modules/@smithy/shared-ini-file-loader/dist-es/loadSsoSessionData.js
|
|
147
|
+
var swallowError2 = () => ({});
|
|
148
|
+
var loadSsoSessionData = async (init = {}) => slurpFile(init.configFilepath ?? getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError2);
|
|
149
|
+
|
|
150
|
+
// ../../node_modules/@smithy/shared-ini-file-loader/dist-es/mergeConfigFiles.js
|
|
151
|
+
var mergeConfigFiles = (...files) => {
|
|
152
|
+
const merged = {};
|
|
153
|
+
for (const file of files) {
|
|
154
|
+
for (const [key, values] of Object.entries(file)) {
|
|
155
|
+
if (merged[key] !== void 0) {
|
|
156
|
+
Object.assign(merged[key], values);
|
|
157
|
+
} else {
|
|
158
|
+
merged[key] = values;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
return merged;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
// ../../node_modules/@smithy/shared-ini-file-loader/dist-es/parseKnownFiles.js
|
|
166
|
+
var parseKnownFiles = async (init) => {
|
|
167
|
+
const parsedFiles = await loadSharedConfigFiles(init);
|
|
168
|
+
return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile);
|
|
169
|
+
};
|
|
170
|
+
var getSSOTokenFilepath = (id) => {
|
|
171
|
+
const hasher = createHash("sha1");
|
|
172
|
+
const cacheName = hasher.update(id).digest("hex");
|
|
173
|
+
return join(getHomeDir(), ".aws", "sso", "cache", `${cacheName}.json`);
|
|
174
|
+
};
|
|
175
|
+
var { readFile: readFile2 } = promises;
|
|
176
|
+
var getSSOTokenFromFile = async (id) => {
|
|
177
|
+
const ssoTokenFilepath = getSSOTokenFilepath(id);
|
|
178
|
+
const ssoTokenText = await readFile2(ssoTokenFilepath, "utf8");
|
|
179
|
+
return JSON.parse(ssoTokenText);
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
export { CONFIG_PREFIX_SEPARATOR, ENV_PROFILE, getProfileName, getSSOTokenFilepath, getSSOTokenFromFile, loadSharedConfigFiles, loadSsoSessionData, parseKnownFiles };
|
package/dist/bin/cli.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env tsx
|
|
2
2
|
import { createRequire } from 'module';
|
|
3
|
+
import { __commonJS, __require, __export, __esm, __toESM, __toCommonJS } from './chunk-DQ2PXUF5.js';
|
|
3
4
|
import { exit, cwd as cwd$1 } from 'process';
|
|
4
5
|
import { kebabCase, camelCase, snakeCase, pascalCase } from 'case-anything';
|
|
5
6
|
import * as fs2 from 'fs';
|
|
@@ -25,46 +26,7 @@ import { Wait, getContainerRuntimeClient, ImageName, GenericContainer } from 'te
|
|
|
25
26
|
import getPort from 'get-port';
|
|
26
27
|
import dotenv from 'dotenv';
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
var __create = Object.create;
|
|
30
|
-
var __defProp = Object.defineProperty;
|
|
31
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
32
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
33
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
34
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
35
|
-
var __require = /* @__PURE__ */ ((x) => typeof require$1 !== "undefined" ? require$1 : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
36
|
-
get: (a, b) => (typeof require$1 !== "undefined" ? require$1 : a)[b]
|
|
37
|
-
}) : x)(function(x) {
|
|
38
|
-
if (typeof require$1 !== "undefined") return require$1.apply(this, arguments);
|
|
39
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
40
|
-
});
|
|
41
|
-
var __esm = (fn, res) => function __init() {
|
|
42
|
-
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
43
|
-
};
|
|
44
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
45
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
46
|
-
};
|
|
47
|
-
var __export = (target, all) => {
|
|
48
|
-
for (var name in all)
|
|
49
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
50
|
-
};
|
|
51
|
-
var __copyProps = (to, from, except, desc) => {
|
|
52
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
53
|
-
for (let key of __getOwnPropNames(from))
|
|
54
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
55
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
56
|
-
}
|
|
57
|
-
return to;
|
|
58
|
-
};
|
|
59
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
60
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
61
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
62
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
63
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
64
|
-
__defProp(target, "default", { value: mod, enumerable: true }) ,
|
|
65
|
-
mod
|
|
66
|
-
));
|
|
67
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
createRequire(import.meta.url);
|
|
68
30
|
|
|
69
31
|
// ../../node_modules/commander/lib/error.js
|
|
70
32
|
var require_error = __commonJS({
|
|
@@ -17687,7 +17649,7 @@ var require_cli_table3 = __commonJS({
|
|
|
17687
17649
|
});
|
|
17688
17650
|
|
|
17689
17651
|
// ../../node_modules/commander/esm.mjs
|
|
17690
|
-
var import_index = __toESM(require_commander());
|
|
17652
|
+
var import_index = __toESM(require_commander(), 1);
|
|
17691
17653
|
var {
|
|
17692
17654
|
program,
|
|
17693
17655
|
createCommand,
|
|
@@ -17704,7 +17666,7 @@ var {
|
|
|
17704
17666
|
} = import_index.default;
|
|
17705
17667
|
|
|
17706
17668
|
// src/cli/actions/after-rollout.ts
|
|
17707
|
-
var import_prompts = __toESM(require_prompts3());
|
|
17669
|
+
var import_prompts = __toESM(require_prompts3(), 1);
|
|
17708
17670
|
|
|
17709
17671
|
// ../../node_modules/ora/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
17710
17672
|
var ANSI_BACKGROUND_OFFSET = 10;
|
|
@@ -18542,7 +18504,7 @@ cliCursor.toggle = (force, writableStream) => {
|
|
|
18542
18504
|
var cli_cursor_default = cliCursor;
|
|
18543
18505
|
|
|
18544
18506
|
// ../../node_modules/ora/index.js
|
|
18545
|
-
var import_cli_spinners = __toESM(require_cli_spinners());
|
|
18507
|
+
var import_cli_spinners = __toESM(require_cli_spinners(), 1);
|
|
18546
18508
|
|
|
18547
18509
|
// ../../node_modules/log-symbols/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
18548
18510
|
var ANSI_BACKGROUND_OFFSET2 = 10;
|
|
@@ -19205,7 +19167,7 @@ var stdinDiscarder = new StdinDiscarder();
|
|
|
19205
19167
|
var stdin_discarder_default = stdinDiscarder;
|
|
19206
19168
|
|
|
19207
19169
|
// ../../node_modules/ora/index.js
|
|
19208
|
-
__toESM(require_cli_spinners());
|
|
19170
|
+
__toESM(require_cli_spinners(), 1);
|
|
19209
19171
|
var Ora = class {
|
|
19210
19172
|
#linesToClear = 0;
|
|
19211
19173
|
#isDiscardingStdin = false;
|
|
@@ -19600,7 +19562,7 @@ function packageJSONScripts() {
|
|
|
19600
19562
|
}
|
|
19601
19563
|
|
|
19602
19564
|
// src/cli/actions/before-rollout.ts
|
|
19603
|
-
var import_prompts2 = __toESM(require_prompts3());
|
|
19565
|
+
var import_prompts2 = __toESM(require_prompts3(), 1);
|
|
19604
19566
|
function beforeRollout(command) {
|
|
19605
19567
|
return command.command("before-rollout").description("add a before rollout workload").action(async () => {
|
|
19606
19568
|
const script = await promtScriptName2();
|
|
@@ -19636,7 +19598,7 @@ function packageJSONScripts2() {
|
|
|
19636
19598
|
}
|
|
19637
19599
|
|
|
19638
19600
|
// src/cli/actions/bootstrap.ts
|
|
19639
|
-
var import_prompts3 = __toESM(require_prompts3());
|
|
19601
|
+
var import_prompts3 = __toESM(require_prompts3(), 1);
|
|
19640
19602
|
function bootstrap(command) {
|
|
19641
19603
|
return command.command("bootstrap").description("add a bootstrap workload").action(async () => {
|
|
19642
19604
|
const script = await promtScriptName3();
|
|
@@ -19678,7 +19640,7 @@ function broadcast(command) {
|
|
|
19678
19640
|
}
|
|
19679
19641
|
|
|
19680
19642
|
// src/cli/actions/bucket.ts
|
|
19681
|
-
var import_prompts4 = __toESM(require_prompts3());
|
|
19643
|
+
var import_prompts4 = __toESM(require_prompts3(), 1);
|
|
19682
19644
|
|
|
19683
19645
|
// src/scaffolding/bucket-workload.ts
|
|
19684
19646
|
function addBucketWorkload(bucket2) {
|
|
@@ -19731,7 +19693,7 @@ async function prompBucketName() {
|
|
|
19731
19693
|
}
|
|
19732
19694
|
|
|
19733
19695
|
// src/cli/actions/cron.ts
|
|
19734
|
-
var import_prompts5 = __toESM(require_prompts3());
|
|
19696
|
+
var import_prompts5 = __toESM(require_prompts3(), 1);
|
|
19735
19697
|
|
|
19736
19698
|
// src/scaffolding/cron-workload.ts
|
|
19737
19699
|
function addCronWorkload(cron2) {
|
|
@@ -19783,7 +19745,7 @@ async function promptCronName() {
|
|
|
19783
19745
|
}
|
|
19784
19746
|
|
|
19785
19747
|
// src/cli/actions/postgres-database.ts
|
|
19786
|
-
var import_prompts7 = __toESM(require_prompts3());
|
|
19748
|
+
var import_prompts7 = __toESM(require_prompts3(), 1);
|
|
19787
19749
|
async function importConfig() {
|
|
19788
19750
|
const imported = await import(path9.join(cwd(), "monolayer.config.ts"));
|
|
19789
19751
|
return imported.default && imported.default.default ? imported.default.default : imported.default;
|
|
@@ -19879,11 +19841,11 @@ var PostgresDatabase = class extends Database {
|
|
|
19879
19841
|
};
|
|
19880
19842
|
|
|
19881
19843
|
// src/workloads/stateless/broadcast/client/client.tsx
|
|
19882
|
-
__toESM(require_react());
|
|
19844
|
+
__toESM(require_react(), 1);
|
|
19883
19845
|
|
|
19884
19846
|
// src/workloads/stateless/broadcast/client/broadcast-provider.tsx
|
|
19885
|
-
var import_react = __toESM(require_react());
|
|
19886
|
-
__toESM(require_jsx_runtime());
|
|
19847
|
+
var import_react = __toESM(require_react(), 1);
|
|
19848
|
+
__toESM(require_jsx_runtime(), 1);
|
|
19887
19849
|
(0, import_react.createContext)(null);
|
|
19888
19850
|
remember(
|
|
19889
19851
|
"TestDispatchers",
|
|
@@ -19891,7 +19853,7 @@ remember(
|
|
|
19891
19853
|
);
|
|
19892
19854
|
|
|
19893
19855
|
// src/workloads/stateless/broadcast/client/provider.tsx
|
|
19894
|
-
__toESM(require_jsx_runtime());
|
|
19856
|
+
__toESM(require_jsx_runtime(), 1);
|
|
19895
19857
|
async function addEnvVar(name, value) {
|
|
19896
19858
|
const spinner = ora();
|
|
19897
19859
|
spinner.start("Adding environment variable to .env.local");
|
|
@@ -19940,7 +19902,7 @@ async function updateDotenvFile(vars = []) {
|
|
|
19940
19902
|
writeFileSync$1(envFilePath, newContent.join("\n"));
|
|
19941
19903
|
});
|
|
19942
19904
|
}
|
|
19943
|
-
var import_prompts6 = __toESM(require_prompts3());
|
|
19905
|
+
var import_prompts6 = __toESM(require_prompts3(), 1);
|
|
19944
19906
|
async function addScriptToPackageJson(name, scriptValue) {
|
|
19945
19907
|
const packageJsonPath = path__default.join(cwd$1(), "package.json");
|
|
19946
19908
|
const packageJson = JSON.parse(readFileSync$1(packageJsonPath, "utf-8"));
|
|
@@ -20150,7 +20112,7 @@ async function promptDatabaseName() {
|
|
|
20150
20112
|
}
|
|
20151
20113
|
|
|
20152
20114
|
// src/cli/actions/task.ts
|
|
20153
|
-
var import_prompts8 = __toESM(require_prompts3());
|
|
20115
|
+
var import_prompts8 = __toESM(require_prompts3(), 1);
|
|
20154
20116
|
function addTaskWorkload(task2) {
|
|
20155
20117
|
const template = taskWorkload(task2);
|
|
20156
20118
|
const spinner = ora();
|
|
@@ -20631,7 +20593,7 @@ var Make = class {
|
|
|
20631
20593
|
};
|
|
20632
20594
|
|
|
20633
20595
|
// src/scan/workload-imports.ts
|
|
20634
|
-
var import_picocolors = __toESM(require_picocolors());
|
|
20596
|
+
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
20635
20597
|
function assertPostgresDatabase(workload) {
|
|
20636
20598
|
}
|
|
20637
20599
|
function assertBucket(workload) {
|
|
@@ -21029,7 +20991,7 @@ var MinioContainer = class extends ContainerWithURI {
|
|
|
21029
20991
|
};
|
|
21030
20992
|
|
|
21031
20993
|
// src/containers/admin/create-database.ts
|
|
21032
|
-
var import_pg = __toESM(require_lib3());
|
|
20994
|
+
var import_pg = __toESM(require_lib3(), 1);
|
|
21033
20995
|
async function createPostgresDatabase(workload) {
|
|
21034
20996
|
const client = new import_pg.default.Pool({
|
|
21035
20997
|
connectionString: adminCredentials(workload)
|
|
@@ -21143,7 +21105,7 @@ async function pullImages(images) {
|
|
|
21143
21105
|
}
|
|
21144
21106
|
|
|
21145
21107
|
// src/cli/spinner-message.ts
|
|
21146
|
-
var import_picocolors2 = __toESM(require_picocolors());
|
|
21108
|
+
var import_picocolors2 = __toESM(require_picocolors(), 1);
|
|
21147
21109
|
function spinnerMessage(workload, prefix) {
|
|
21148
21110
|
let message = "";
|
|
21149
21111
|
if (workload.constructor.name === "PostgresDatabase" || workload.constructor.name === "MySqlDatabase") {
|
|
@@ -21361,7 +21323,7 @@ function testStart(program2) {
|
|
|
21361
21323
|
}
|
|
21362
21324
|
|
|
21363
21325
|
// src/cli/print-status.ts
|
|
21364
|
-
var import_cli_table3 = __toESM(require_cli_table3());
|
|
21326
|
+
var import_cli_table3 = __toESM(require_cli_table3(), 1);
|
|
21365
21327
|
function printStatus(statuses) {
|
|
21366
21328
|
const table = new import_cli_table3.default({
|
|
21367
21329
|
head: ["Workload", "Type", "Status", "Ports", "Container ID"],
|
|
@@ -21463,8 +21425,8 @@ function testStop(program2) {
|
|
|
21463
21425
|
}
|
|
21464
21426
|
|
|
21465
21427
|
// src/cli/actions/trigger.ts
|
|
21466
|
-
var import_picocolors3 = __toESM(require_picocolors());
|
|
21467
|
-
var import_prompts9 = __toESM(require_prompts3());
|
|
21428
|
+
var import_picocolors3 = __toESM(require_picocolors(), 1);
|
|
21429
|
+
var import_prompts9 = __toESM(require_prompts3(), 1);
|
|
21468
21430
|
function trigger(program2) {
|
|
21469
21431
|
const trigger2 = program2.command("trigger").description("trigger commmands");
|
|
21470
21432
|
triggerCron(trigger2);
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { createRequire } from 'module';
|
|
2
|
+
import { parseKnownFiles, getProfileName } from './chunk-X7GJVU6X.js';
|
|
3
|
+
import { setCredentialFeature } from './chunk-AV7FB56K.js';
|
|
4
|
+
import './chunk-D6MRFOU6.js';
|
|
5
|
+
import { CredentialsProviderError } from './chunk-54HDPH52.js';
|
|
6
|
+
import './chunk-DQ2PXUF5.js';
|
|
7
|
+
import { exec } from 'child_process';
|
|
8
|
+
import { promisify } from 'util';
|
|
9
|
+
|
|
10
|
+
createRequire(import.meta.url);
|
|
11
|
+
|
|
12
|
+
// ../../node_modules/@aws-sdk/credential-provider-process/dist-es/getValidatedProcessCredentials.js
|
|
13
|
+
var getValidatedProcessCredentials = (profileName, data, profiles) => {
|
|
14
|
+
if (data.Version !== 1) {
|
|
15
|
+
throw Error(`Profile ${profileName} credential_process did not return Version 1.`);
|
|
16
|
+
}
|
|
17
|
+
if (data.AccessKeyId === void 0 || data.SecretAccessKey === void 0) {
|
|
18
|
+
throw Error(`Profile ${profileName} credential_process returned invalid credentials.`);
|
|
19
|
+
}
|
|
20
|
+
if (data.Expiration) {
|
|
21
|
+
const currentTime = /* @__PURE__ */ new Date();
|
|
22
|
+
const expireTime = new Date(data.Expiration);
|
|
23
|
+
if (expireTime < currentTime) {
|
|
24
|
+
throw Error(`Profile ${profileName} credential_process returned expired credentials.`);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
let accountId = data.AccountId;
|
|
28
|
+
if (!accountId && profiles?.[profileName]?.aws_account_id) {
|
|
29
|
+
accountId = profiles[profileName].aws_account_id;
|
|
30
|
+
}
|
|
31
|
+
const credentials = {
|
|
32
|
+
accessKeyId: data.AccessKeyId,
|
|
33
|
+
secretAccessKey: data.SecretAccessKey,
|
|
34
|
+
...data.SessionToken && { sessionToken: data.SessionToken },
|
|
35
|
+
...data.Expiration && { expiration: new Date(data.Expiration) },
|
|
36
|
+
...data.CredentialScope && { credentialScope: data.CredentialScope },
|
|
37
|
+
...accountId && { accountId }
|
|
38
|
+
};
|
|
39
|
+
setCredentialFeature(credentials, "CREDENTIALS_PROCESS", "w");
|
|
40
|
+
return credentials;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
// ../../node_modules/@aws-sdk/credential-provider-process/dist-es/resolveProcessCredentials.js
|
|
44
|
+
var resolveProcessCredentials = async (profileName, profiles, logger) => {
|
|
45
|
+
const profile = profiles[profileName];
|
|
46
|
+
if (profiles[profileName]) {
|
|
47
|
+
const credentialProcess = profile["credential_process"];
|
|
48
|
+
if (credentialProcess !== void 0) {
|
|
49
|
+
const execPromise = promisify(exec);
|
|
50
|
+
try {
|
|
51
|
+
const { stdout } = await execPromise(credentialProcess);
|
|
52
|
+
let data;
|
|
53
|
+
try {
|
|
54
|
+
data = JSON.parse(stdout.trim());
|
|
55
|
+
} catch {
|
|
56
|
+
throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);
|
|
57
|
+
}
|
|
58
|
+
return getValidatedProcessCredentials(profileName, data, profiles);
|
|
59
|
+
} catch (error) {
|
|
60
|
+
throw new CredentialsProviderError(error.message, { logger });
|
|
61
|
+
}
|
|
62
|
+
} else {
|
|
63
|
+
throw new CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger });
|
|
64
|
+
}
|
|
65
|
+
} else {
|
|
66
|
+
throw new CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {
|
|
67
|
+
logger
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
// ../../node_modules/@aws-sdk/credential-provider-process/dist-es/fromProcess.js
|
|
73
|
+
var fromProcess = (init = {}) => async ({ callerClientConfig } = {}) => {
|
|
74
|
+
init.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");
|
|
75
|
+
const profiles = await parseKnownFiles(init);
|
|
76
|
+
return resolveProcessCredentials(getProfileName({
|
|
77
|
+
profile: init.profile ?? callerClientConfig?.profile
|
|
78
|
+
}), profiles, init.logger);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export { fromProcess };
|