@stacksjs/actions 0.70.9 → 0.70.11
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/build/core.js +1 -1
- package/dist/build.js +18 -3
- package/dist/chunk-1hqs8kt1.js +179252 -0
- package/dist/{chunk-fxan91t8.js → chunk-2dvnt46s.js} +31 -31
- package/dist/chunk-38cnnp2b.js +3823 -0
- package/dist/chunk-3d7m14ee.js +212 -0
- package/dist/chunk-76zhb40c.js +92 -0
- package/dist/chunk-7s5qcjkt.js +105 -0
- package/dist/{chunk-v1qz355d.js → chunk-8fdqje2t.js} +4 -4
- package/dist/chunk-9exgwfkw.js +1283 -0
- package/dist/chunk-a13x0e43.js +1180 -0
- package/dist/chunk-a7k3cdby.js +2266 -0
- package/dist/chunk-b5g5w1hh.js +1482 -0
- package/dist/chunk-bf8bq8pc.js +205 -0
- package/dist/chunk-bst5srwz.js +662 -0
- package/dist/{chunk-6jdq6549.js → chunk-djkz87qs.js} +18 -3
- package/dist/chunk-f6a9g4qa.js +902 -0
- package/dist/chunk-frw3va9v.js +69 -0
- package/dist/chunk-hsak03yh.js +311 -0
- package/dist/{chunk-8swsxabt.js → chunk-k2wcwm7g.js} +63 -3
- package/dist/chunk-mdj7x1vs.js +790 -0
- package/dist/chunk-mdqphqep.js +438 -0
- package/dist/chunk-p0c688mg.js +729 -0
- package/dist/chunk-pjjzff0p.js +2116 -0
- package/dist/chunk-q81mf99q.js +169 -0
- package/dist/chunk-q9dmga3k.js +11 -0
- package/dist/chunk-qhh0v93n.js +73 -0
- package/dist/chunk-qkm8e752.js +51 -0
- package/dist/chunk-saqpg5nd.js +118 -0
- package/dist/chunk-t5em30ak.js +379 -0
- package/dist/chunk-veja9rez.js +5764 -0
- package/dist/chunk-zsm2c35w.js +72 -0
- package/dist/chunk-zzerxbrm.js +107 -0
- package/dist/database/seed.js +18 -3
- package/dist/deploy/index.js +1 -1
- package/dist/examples.js +1 -1
- package/dist/fresh.js +1 -1
- package/dist/generate/index.js +19 -4
- package/dist/helpers/component-meta.js +10 -10
- package/dist/helpers/lib-entries.js +1 -1
- package/dist/index.js +18 -3
- package/dist/key-generate.js +1 -1
- package/dist/lint/fix.js +1 -1
- package/dist/make.js +1 -1
- package/dist/prepublish.js +1 -1
- package/dist/release.js +18 -3
- package/dist/test/feature.js +1 -1
- package/dist/test/index.js +1 -1
- package/dist/test/unit.js +1 -1
- package/dist/types.js +1 -1
- package/dist/upgrade/index.js +1 -1
- package/dist/upgrade.js +2 -2
- package/package.json +17 -17
- package/dist/chunk-8tjc3whz.js +0 -77989
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
getProfileName,
|
|
4
|
+
parseKnownFiles
|
|
5
|
+
} from "./chunk-bf8bq8pc.js";
|
|
6
|
+
import {
|
|
7
|
+
CredentialsProviderError,
|
|
8
|
+
chain
|
|
9
|
+
} from "./chunk-zzerxbrm.js";
|
|
10
|
+
import {
|
|
11
|
+
require_client
|
|
12
|
+
} from "./chunk-frw3va9v.js";
|
|
13
|
+
import"./chunk-saqpg5nd.js";
|
|
14
|
+
import {
|
|
15
|
+
__require,
|
|
16
|
+
__toESM
|
|
17
|
+
} from "./chunk-9v6qtbez.js";
|
|
18
|
+
|
|
19
|
+
// ../../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js
|
|
20
|
+
var import_client2 = __toESM(require_client(), 1);
|
|
21
|
+
|
|
22
|
+
// ../../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveCredentialSource.js
|
|
23
|
+
var import_client = __toESM(require_client(), 1);
|
|
24
|
+
var resolveCredentialSource = (credentialSource, profileName, logger) => {
|
|
25
|
+
const sourceProvidersMap = {
|
|
26
|
+
EcsContainer: async (options) => {
|
|
27
|
+
const { fromHttp } = await import("./chunk-q81mf99q.js");
|
|
28
|
+
const { fromContainerMetadata } = await import("./chunk-t5em30ak.js");
|
|
29
|
+
logger?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer");
|
|
30
|
+
return async () => chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);
|
|
31
|
+
},
|
|
32
|
+
Ec2InstanceMetadata: async (options) => {
|
|
33
|
+
logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");
|
|
34
|
+
const { fromInstanceMetadata } = await import("./chunk-t5em30ak.js");
|
|
35
|
+
return async () => fromInstanceMetadata(options)().then(setNamedProvider);
|
|
36
|
+
},
|
|
37
|
+
Environment: async (options) => {
|
|
38
|
+
logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");
|
|
39
|
+
const { fromEnv } = await import("./chunk-qkm8e752.js");
|
|
40
|
+
return async () => fromEnv(options)().then(setNamedProvider);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
if (credentialSource in sourceProvidersMap) {
|
|
44
|
+
return sourceProvidersMap[credentialSource];
|
|
45
|
+
} else {
|
|
46
|
+
throw new CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger });
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
var setNamedProvider = (creds) => import_client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_NAMED_PROVIDER", "p");
|
|
50
|
+
|
|
51
|
+
// ../../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js
|
|
52
|
+
var isAssumeRoleProfile = (arg, { profile = "default", logger } = {}) => {
|
|
53
|
+
return Boolean(arg) && typeof arg === "object" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1 && ["undefined", "string"].indexOf(typeof arg.external_id) > -1 && ["undefined", "string"].indexOf(typeof arg.mfa_serial) > -1 && (isAssumeRoleWithSourceProfile(arg, { profile, logger }) || isCredentialSourceProfile(arg, { profile, logger }));
|
|
54
|
+
};
|
|
55
|
+
var isAssumeRoleWithSourceProfile = (arg, { profile, logger }) => {
|
|
56
|
+
const withSourceProfile = typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined";
|
|
57
|
+
if (withSourceProfile) {
|
|
58
|
+
logger?.debug?.(` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`);
|
|
59
|
+
}
|
|
60
|
+
return withSourceProfile;
|
|
61
|
+
};
|
|
62
|
+
var isCredentialSourceProfile = (arg, { profile, logger }) => {
|
|
63
|
+
const withProviderProfile = typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined";
|
|
64
|
+
if (withProviderProfile) {
|
|
65
|
+
logger?.debug?.(` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`);
|
|
66
|
+
}
|
|
67
|
+
return withProviderProfile;
|
|
68
|
+
};
|
|
69
|
+
var resolveAssumeRoleCredentials = async (profileName, profiles, options, visitedProfiles = {}) => {
|
|
70
|
+
options.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");
|
|
71
|
+
const profileData = profiles[profileName];
|
|
72
|
+
const { source_profile, region } = profileData;
|
|
73
|
+
if (!options.roleAssumer) {
|
|
74
|
+
const { getDefaultRoleAssumer } = await import("./chunk-9exgwfkw.js");
|
|
75
|
+
options.roleAssumer = getDefaultRoleAssumer({
|
|
76
|
+
...options.clientConfig,
|
|
77
|
+
credentialProviderLogger: options.logger,
|
|
78
|
+
parentClientConfig: {
|
|
79
|
+
...options?.parentClientConfig,
|
|
80
|
+
region: region ?? options?.parentClientConfig?.region
|
|
81
|
+
}
|
|
82
|
+
}, options.clientPlugins);
|
|
83
|
+
}
|
|
84
|
+
if (source_profile && source_profile in visitedProfiles) {
|
|
85
|
+
throw new CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${getProfileName(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(", "), { logger: options.logger });
|
|
86
|
+
}
|
|
87
|
+
options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`);
|
|
88
|
+
const sourceCredsProvider = source_profile ? resolveProfileData(source_profile, profiles, options, {
|
|
89
|
+
...visitedProfiles,
|
|
90
|
+
[source_profile]: true
|
|
91
|
+
}, isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {})) : (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))();
|
|
92
|
+
if (isCredentialSourceWithoutRoleArn(profileData)) {
|
|
93
|
+
return sourceCredsProvider.then((creds) => import_client2.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
|
|
94
|
+
} else {
|
|
95
|
+
const params = {
|
|
96
|
+
RoleArn: profileData.role_arn,
|
|
97
|
+
RoleSessionName: profileData.role_session_name || `aws-sdk-js-${Date.now()}`,
|
|
98
|
+
ExternalId: profileData.external_id,
|
|
99
|
+
DurationSeconds: parseInt(profileData.duration_seconds || "3600", 10)
|
|
100
|
+
};
|
|
101
|
+
const { mfa_serial } = profileData;
|
|
102
|
+
if (mfa_serial) {
|
|
103
|
+
if (!options.mfaCodeProvider) {
|
|
104
|
+
throw new CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, { logger: options.logger, tryNextLink: false });
|
|
105
|
+
}
|
|
106
|
+
params.SerialNumber = mfa_serial;
|
|
107
|
+
params.TokenCode = await options.mfaCodeProvider(mfa_serial);
|
|
108
|
+
}
|
|
109
|
+
const sourceCreds = await sourceCredsProvider;
|
|
110
|
+
return options.roleAssumer(sourceCreds, params).then((creds) => import_client2.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
var isCredentialSourceWithoutRoleArn = (section) => {
|
|
114
|
+
return !section.role_arn && !!section.credential_source;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
// ../../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js
|
|
118
|
+
var import_client3 = __toESM(require_client(), 1);
|
|
119
|
+
var isProcessProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string";
|
|
120
|
+
var resolveProcessCredentials = async (options, profile) => import("./chunk-76zhb40c.js").then(({ fromProcess }) => fromProcess({
|
|
121
|
+
...options,
|
|
122
|
+
profile
|
|
123
|
+
})().then((creds) => import_client3.setCredentialFeature(creds, "CREDENTIALS_PROFILE_PROCESS", "v")));
|
|
124
|
+
|
|
125
|
+
// ../../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveSsoCredentials.js
|
|
126
|
+
var import_client4 = __toESM(require_client(), 1);
|
|
127
|
+
var resolveSsoCredentials = async (profile, profileData, options = {}) => {
|
|
128
|
+
const { fromSSO } = await import("./chunk-hsak03yh.js");
|
|
129
|
+
return fromSSO({
|
|
130
|
+
profile,
|
|
131
|
+
logger: options.logger,
|
|
132
|
+
parentClientConfig: options.parentClientConfig,
|
|
133
|
+
clientConfig: options.clientConfig
|
|
134
|
+
})().then((creds) => {
|
|
135
|
+
if (profileData.sso_session) {
|
|
136
|
+
return import_client4.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO", "r");
|
|
137
|
+
} else {
|
|
138
|
+
return import_client4.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO_LEGACY", "t");
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
};
|
|
142
|
+
var isSsoProfile = (arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string");
|
|
143
|
+
|
|
144
|
+
// ../../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveStaticCredentials.js
|
|
145
|
+
var import_client5 = __toESM(require_client(), 1);
|
|
146
|
+
var isStaticCredsProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1 && ["undefined", "string"].indexOf(typeof arg.aws_account_id) > -1;
|
|
147
|
+
var resolveStaticCredentials = async (profile, options) => {
|
|
148
|
+
options?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");
|
|
149
|
+
const credentials = {
|
|
150
|
+
accessKeyId: profile.aws_access_key_id,
|
|
151
|
+
secretAccessKey: profile.aws_secret_access_key,
|
|
152
|
+
sessionToken: profile.aws_session_token,
|
|
153
|
+
...profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope },
|
|
154
|
+
...profile.aws_account_id && { accountId: profile.aws_account_id }
|
|
155
|
+
};
|
|
156
|
+
return import_client5.setCredentialFeature(credentials, "CREDENTIALS_PROFILE", "n");
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
// ../../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js
|
|
160
|
+
var import_client6 = __toESM(require_client(), 1);
|
|
161
|
+
var isWebIdentityProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1;
|
|
162
|
+
var resolveWebIdentityCredentials = async (profile, options) => import("./chunk-zsm2c35w.js").then(({ fromTokenFile }) => fromTokenFile({
|
|
163
|
+
webIdentityTokenFile: profile.web_identity_token_file,
|
|
164
|
+
roleArn: profile.role_arn,
|
|
165
|
+
roleSessionName: profile.role_session_name,
|
|
166
|
+
roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,
|
|
167
|
+
logger: options.logger,
|
|
168
|
+
parentClientConfig: options.parentClientConfig
|
|
169
|
+
})().then((creds) => import_client6.setCredentialFeature(creds, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q")));
|
|
170
|
+
|
|
171
|
+
// ../../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js
|
|
172
|
+
var resolveProfileData = async (profileName, profiles, options, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {
|
|
173
|
+
const data = profiles[profileName];
|
|
174
|
+
if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {
|
|
175
|
+
return resolveStaticCredentials(data, options);
|
|
176
|
+
}
|
|
177
|
+
if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) {
|
|
178
|
+
return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles);
|
|
179
|
+
}
|
|
180
|
+
if (isStaticCredsProfile(data)) {
|
|
181
|
+
return resolveStaticCredentials(data, options);
|
|
182
|
+
}
|
|
183
|
+
if (isWebIdentityProfile(data)) {
|
|
184
|
+
return resolveWebIdentityCredentials(data, options);
|
|
185
|
+
}
|
|
186
|
+
if (isProcessProfile(data)) {
|
|
187
|
+
return resolveProcessCredentials(options, profileName);
|
|
188
|
+
}
|
|
189
|
+
if (isSsoProfile(data)) {
|
|
190
|
+
return await resolveSsoCredentials(profileName, data, options);
|
|
191
|
+
}
|
|
192
|
+
throw new CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
// ../../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/fromIni.js
|
|
196
|
+
var fromIni = (_init = {}) => async ({ callerClientConfig } = {}) => {
|
|
197
|
+
const init = {
|
|
198
|
+
..._init,
|
|
199
|
+
parentClientConfig: {
|
|
200
|
+
...callerClientConfig,
|
|
201
|
+
..._init.parentClientConfig
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
init.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");
|
|
205
|
+
const profiles = await parseKnownFiles(init);
|
|
206
|
+
return resolveProfileData(getProfileName({
|
|
207
|
+
profile: _init.profile ?? callerClientConfig?.profile
|
|
208
|
+
}), profiles, init);
|
|
209
|
+
};
|
|
210
|
+
export {
|
|
211
|
+
fromIni
|
|
212
|
+
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
getProfileName,
|
|
4
|
+
parseKnownFiles
|
|
5
|
+
} from "./chunk-bf8bq8pc.js";
|
|
6
|
+
import {
|
|
7
|
+
CredentialsProviderError
|
|
8
|
+
} from "./chunk-zzerxbrm.js";
|
|
9
|
+
import {
|
|
10
|
+
require_client
|
|
11
|
+
} from "./chunk-frw3va9v.js";
|
|
12
|
+
import"./chunk-saqpg5nd.js";
|
|
13
|
+
import {
|
|
14
|
+
__toESM
|
|
15
|
+
} from "./chunk-9v6qtbez.js";
|
|
16
|
+
|
|
17
|
+
// ../../../../node_modules/@aws-sdk/credential-provider-process/dist-es/resolveProcessCredentials.js
|
|
18
|
+
import { exec } from "node:child_process";
|
|
19
|
+
import { promisify } from "node:util";
|
|
20
|
+
|
|
21
|
+
// ../../../../node_modules/@aws-sdk/credential-provider-process/dist-es/getValidatedProcessCredentials.js
|
|
22
|
+
var import_client = __toESM(require_client(), 1);
|
|
23
|
+
var getValidatedProcessCredentials = (profileName, data, profiles) => {
|
|
24
|
+
if (data.Version !== 1) {
|
|
25
|
+
throw Error(`Profile ${profileName} credential_process did not return Version 1.`);
|
|
26
|
+
}
|
|
27
|
+
if (data.AccessKeyId === undefined || data.SecretAccessKey === undefined) {
|
|
28
|
+
throw Error(`Profile ${profileName} credential_process returned invalid credentials.`);
|
|
29
|
+
}
|
|
30
|
+
if (data.Expiration) {
|
|
31
|
+
const currentTime = new Date;
|
|
32
|
+
const expireTime = new Date(data.Expiration);
|
|
33
|
+
if (expireTime < currentTime) {
|
|
34
|
+
throw Error(`Profile ${profileName} credential_process returned expired credentials.`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
let accountId = data.AccountId;
|
|
38
|
+
if (!accountId && profiles?.[profileName]?.aws_account_id) {
|
|
39
|
+
accountId = profiles[profileName].aws_account_id;
|
|
40
|
+
}
|
|
41
|
+
const credentials = {
|
|
42
|
+
accessKeyId: data.AccessKeyId,
|
|
43
|
+
secretAccessKey: data.SecretAccessKey,
|
|
44
|
+
...data.SessionToken && { sessionToken: data.SessionToken },
|
|
45
|
+
...data.Expiration && { expiration: new Date(data.Expiration) },
|
|
46
|
+
...data.CredentialScope && { credentialScope: data.CredentialScope },
|
|
47
|
+
...accountId && { accountId }
|
|
48
|
+
};
|
|
49
|
+
import_client.setCredentialFeature(credentials, "CREDENTIALS_PROCESS", "w");
|
|
50
|
+
return credentials;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
// ../../../../node_modules/@aws-sdk/credential-provider-process/dist-es/resolveProcessCredentials.js
|
|
54
|
+
var resolveProcessCredentials = async (profileName, profiles, logger) => {
|
|
55
|
+
const profile = profiles[profileName];
|
|
56
|
+
if (profiles[profileName]) {
|
|
57
|
+
const credentialProcess = profile["credential_process"];
|
|
58
|
+
if (credentialProcess !== undefined) {
|
|
59
|
+
const execPromise = promisify(exec);
|
|
60
|
+
try {
|
|
61
|
+
const { stdout } = await execPromise(credentialProcess);
|
|
62
|
+
let data;
|
|
63
|
+
try {
|
|
64
|
+
data = JSON.parse(stdout.trim());
|
|
65
|
+
} catch {
|
|
66
|
+
throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);
|
|
67
|
+
}
|
|
68
|
+
return getValidatedProcessCredentials(profileName, data, profiles);
|
|
69
|
+
} catch (error) {
|
|
70
|
+
throw new CredentialsProviderError(error.message, { logger });
|
|
71
|
+
}
|
|
72
|
+
} else {
|
|
73
|
+
throw new CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger });
|
|
74
|
+
}
|
|
75
|
+
} else {
|
|
76
|
+
throw new CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {
|
|
77
|
+
logger
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
// ../../../../node_modules/@aws-sdk/credential-provider-process/dist-es/fromProcess.js
|
|
83
|
+
var fromProcess = (init = {}) => async ({ callerClientConfig } = {}) => {
|
|
84
|
+
init.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");
|
|
85
|
+
const profiles = await parseKnownFiles(init);
|
|
86
|
+
return resolveProcessCredentials(getProfileName({
|
|
87
|
+
profile: init.profile ?? callerClientConfig?.profile
|
|
88
|
+
}), profiles, init.logger);
|
|
89
|
+
};
|
|
90
|
+
export {
|
|
91
|
+
fromProcess
|
|
92
|
+
};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getProfileName,
|
|
3
|
+
loadSharedConfigFiles
|
|
4
|
+
} from "./chunk-bf8bq8pc.js";
|
|
5
|
+
import {
|
|
6
|
+
CredentialsProviderError,
|
|
7
|
+
chain,
|
|
8
|
+
fromStatic,
|
|
9
|
+
memoize
|
|
10
|
+
} from "./chunk-zzerxbrm.js";
|
|
11
|
+
|
|
12
|
+
// ../../../../node_modules/@smithy/node-config-provider/dist-es/getSelectorName.js
|
|
13
|
+
function getSelectorName(functionString) {
|
|
14
|
+
try {
|
|
15
|
+
const constants = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? []));
|
|
16
|
+
constants.delete("CONFIG");
|
|
17
|
+
constants.delete("CONFIG_PREFIX_SEPARATOR");
|
|
18
|
+
constants.delete("ENV");
|
|
19
|
+
return [...constants].join(", ");
|
|
20
|
+
} catch (e) {
|
|
21
|
+
return functionString;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// ../../../../node_modules/@smithy/node-config-provider/dist-es/fromEnv.js
|
|
26
|
+
var fromEnv = (envVarSelector, logger) => async () => {
|
|
27
|
+
try {
|
|
28
|
+
const config = envVarSelector(process.env);
|
|
29
|
+
if (config === undefined) {
|
|
30
|
+
throw new Error;
|
|
31
|
+
}
|
|
32
|
+
return config;
|
|
33
|
+
} catch (e) {
|
|
34
|
+
throw new CredentialsProviderError(e.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, { logger });
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// ../../../../node_modules/@smithy/node-config-provider/dist-es/fromSharedConfigFiles.js
|
|
39
|
+
var fromSharedConfigFiles = (configSelector, { preferredFile = "config", ...init } = {}) => async () => {
|
|
40
|
+
const profile = getProfileName(init);
|
|
41
|
+
const { configFile, credentialsFile } = await loadSharedConfigFiles(init);
|
|
42
|
+
const profileFromCredentials = credentialsFile[profile] || {};
|
|
43
|
+
const profileFromConfig = configFile[profile] || {};
|
|
44
|
+
const mergedProfile = preferredFile === "config" ? { ...profileFromCredentials, ...profileFromConfig } : { ...profileFromConfig, ...profileFromCredentials };
|
|
45
|
+
try {
|
|
46
|
+
const cfgFile = preferredFile === "config" ? configFile : credentialsFile;
|
|
47
|
+
const configValue = configSelector(mergedProfile, cfgFile);
|
|
48
|
+
if (configValue === undefined) {
|
|
49
|
+
throw new Error;
|
|
50
|
+
}
|
|
51
|
+
return configValue;
|
|
52
|
+
} catch (e) {
|
|
53
|
+
throw new CredentialsProviderError(e.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, { logger: init.logger });
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
// ../../../../node_modules/@smithy/node-config-provider/dist-es/fromStatic.js
|
|
58
|
+
var isFunction = (func) => typeof func === "function";
|
|
59
|
+
var fromStatic2 = (defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : fromStatic(defaultValue);
|
|
60
|
+
|
|
61
|
+
// ../../../../node_modules/@smithy/node-config-provider/dist-es/configLoader.js
|
|
62
|
+
var loadConfig = ({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => memoize(chain(fromEnv(environmentVariableSelector), fromSharedConfigFiles(configFileSelector, configuration), fromStatic2(defaultValue)));
|
|
63
|
+
// ../../../../node_modules/@smithy/querystring-parser/dist-es/index.js
|
|
64
|
+
function parseQueryString(querystring) {
|
|
65
|
+
const query = {};
|
|
66
|
+
querystring = querystring.replace(/^\?/, "");
|
|
67
|
+
if (querystring) {
|
|
68
|
+
for (const pair of querystring.split("&")) {
|
|
69
|
+
let [key, value = null] = pair.split("=");
|
|
70
|
+
key = decodeURIComponent(key);
|
|
71
|
+
if (value) {
|
|
72
|
+
value = decodeURIComponent(value);
|
|
73
|
+
}
|
|
74
|
+
if (!(key in query)) {
|
|
75
|
+
query[key] = value;
|
|
76
|
+
} else if (Array.isArray(query[key])) {
|
|
77
|
+
query[key].push(value);
|
|
78
|
+
} else {
|
|
79
|
+
query[key] = [query[key], value];
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return query;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// ../../../../node_modules/@smithy/url-parser/dist-es/index.js
|
|
87
|
+
var parseUrl = (url) => {
|
|
88
|
+
if (typeof url === "string") {
|
|
89
|
+
return parseUrl(new URL(url));
|
|
90
|
+
}
|
|
91
|
+
const { hostname, pathname, port, protocol, search } = url;
|
|
92
|
+
let query;
|
|
93
|
+
if (search) {
|
|
94
|
+
query = parseQueryString(search);
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
hostname,
|
|
98
|
+
port: port ? parseInt(port) : undefined,
|
|
99
|
+
protocol,
|
|
100
|
+
path: pathname,
|
|
101
|
+
query
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
export { loadConfig, parseUrl };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
db
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-1hqs8kt1.js";
|
|
4
4
|
import {
|
|
5
5
|
customValidate,
|
|
6
6
|
isObjectNotEmpty,
|
|
7
7
|
validateField
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-2dvnt46s.js";
|
|
9
9
|
import {
|
|
10
10
|
kebabCase,
|
|
11
11
|
pascalCase
|
|
@@ -319,8 +319,8 @@ class Router {
|
|
|
319
319
|
return this.routes;
|
|
320
320
|
}
|
|
321
321
|
async importRoutes() {
|
|
322
|
-
await import("./chunk-
|
|
323
|
-
await import("./chunk-
|
|
322
|
+
await import("./chunk-djkz87qs.js");
|
|
323
|
+
await import("./chunk-k2wcwm7g.js");
|
|
324
324
|
}
|
|
325
325
|
async resolveCallback(callback) {
|
|
326
326
|
if (callback instanceof Promise) {
|