@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.
Files changed (47) hide show
  1. package/dist/bin/chunk-2DM36AIF.js +60 -0
  2. package/dist/bin/chunk-3TV5KLB7.js +105 -0
  3. package/dist/bin/chunk-54HDPH52.js +116 -0
  4. package/dist/bin/chunk-AKHG66MJ.js +2359 -0
  5. package/dist/bin/chunk-ASIK3ESJ.js +37 -0
  6. package/dist/bin/chunk-AV7FB56K.js +14 -0
  7. package/dist/bin/chunk-D6MRFOU6.js +62 -0
  8. package/dist/bin/chunk-DQ2PXUF5.js +44 -0
  9. package/dist/bin/chunk-GE4ESXBP.js +57 -0
  10. package/dist/bin/chunk-K4XCYO2X.js +1637 -0
  11. package/dist/bin/chunk-KHQQRHZY.js +969 -0
  12. package/dist/bin/chunk-KSHJCBUY.js +938 -0
  13. package/dist/bin/chunk-KW25ZB6Z.js +14 -0
  14. package/dist/bin/chunk-SYAMBCRY.js +54 -0
  15. package/dist/bin/chunk-T4MZMT2A.js +122 -0
  16. package/dist/bin/chunk-U43L2J36.js +1875 -0
  17. package/dist/bin/chunk-UKX3KEC2.js +37 -0
  18. package/dist/bin/chunk-X7GJVU6X.js +182 -0
  19. package/dist/bin/cli.js +23 -61
  20. package/dist/bin/dist-es-4LCK4BMD.js +81 -0
  21. package/dist/bin/dist-es-4ULGGWP4.js +361 -0
  22. package/dist/bin/dist-es-7BYCFULM.js +7 -0
  23. package/dist/bin/dist-es-A2JHLMIV.js +154 -0
  24. package/dist/bin/dist-es-AWY666YH.js +292 -0
  25. package/dist/bin/dist-es-KUMQWKJB.js +194 -0
  26. package/dist/bin/dist-es-TNZXIBKF.js +292 -0
  27. package/dist/bin/dist-es-TV7F3ZAE.js +7 -0
  28. package/dist/bin/dist-es-XD3WAN5D.js +154 -0
  29. package/dist/bin/dist-es-YGJKPYIO.js +81 -0
  30. package/dist/bin/dist-es-YYROUSP5.js +62 -0
  31. package/dist/bin/dist-es-ZOY57CKU.js +62 -0
  32. package/dist/bin/dist-es-ZVXNFAFI.js +194 -0
  33. package/dist/bin/esm-ID5USS7G.js +4773 -0
  34. package/dist/bin/loadSso-55OGDGPY.js +484 -0
  35. package/dist/bin/loadSso-UYOIOSOA.js +480 -0
  36. package/dist/bin/sso-oidc-BHBT6MBW.js +732 -0
  37. package/dist/bin/sso-oidc-WOAY6JEM.js +733 -0
  38. package/dist/bin/sts-22SIO74C.js +1109 -0
  39. package/dist/bin/sts-SCV3QXFF.js +1064 -0
  40. package/dist/bin/sts-YWYJ3LVJ.js +1064 -0
  41. package/dist/cjs/workloads/stateless/broadcast/client/provider.d.ts +3 -1
  42. package/dist/cjs/workloads/stateless/broadcast/client/provider.js +16 -5
  43. package/dist/cjs/workloads/stateless/task/dispatcher.js +31 -0
  44. package/dist/esm/workloads/stateless/broadcast/client/provider.d.ts +3 -1
  45. package/dist/esm/workloads/stateless/broadcast/client/provider.js +16 -5
  46. package/dist/esm/workloads/stateless/task/dispatcher.js +8 -0
  47. package/package.json +1 -1
@@ -0,0 +1,194 @@
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, chain } from './chunk-54HDPH52.js';
6
+ import './chunk-DQ2PXUF5.js';
7
+
8
+ createRequire(import.meta.url);
9
+
10
+ // ../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveCredentialSource.js
11
+ var resolveCredentialSource = (credentialSource, profileName, logger) => {
12
+ const sourceProvidersMap = {
13
+ EcsContainer: async (options) => {
14
+ const { fromHttp } = await import('./dist-es-XD3WAN5D.js');
15
+ const { fromContainerMetadata } = await import('./dist-es-4ULGGWP4.js');
16
+ logger?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer");
17
+ return async () => chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);
18
+ },
19
+ Ec2InstanceMetadata: async (options) => {
20
+ logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");
21
+ const { fromInstanceMetadata } = await import('./dist-es-4ULGGWP4.js');
22
+ return async () => fromInstanceMetadata(options)().then(setNamedProvider);
23
+ },
24
+ Environment: async (options) => {
25
+ logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");
26
+ const { fromEnv } = await import('./dist-es-7BYCFULM.js');
27
+ return async () => fromEnv(options)().then(setNamedProvider);
28
+ }
29
+ };
30
+ if (credentialSource in sourceProvidersMap) {
31
+ return sourceProvidersMap[credentialSource];
32
+ } else {
33
+ throw new CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger });
34
+ }
35
+ };
36
+ var setNamedProvider = (creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_NAMED_PROVIDER", "p");
37
+
38
+ // ../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js
39
+ var isAssumeRoleProfile = (arg, { profile = "default", logger } = {}) => {
40
+ 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 }));
41
+ };
42
+ var isAssumeRoleWithSourceProfile = (arg, { profile, logger }) => {
43
+ const withSourceProfile = typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined";
44
+ if (withSourceProfile) {
45
+ logger?.debug?.(` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`);
46
+ }
47
+ return withSourceProfile;
48
+ };
49
+ var isCredentialSourceProfile = (arg, { profile, logger }) => {
50
+ const withProviderProfile = typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined";
51
+ if (withProviderProfile) {
52
+ logger?.debug?.(` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`);
53
+ }
54
+ return withProviderProfile;
55
+ };
56
+ var resolveAssumeRoleCredentials = async (profileName, profiles, options, visitedProfiles = {}) => {
57
+ options.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");
58
+ const profileData = profiles[profileName];
59
+ const { source_profile, region } = profileData;
60
+ if (!options.roleAssumer) {
61
+ const { getDefaultRoleAssumer } = await import('./sts-SCV3QXFF.js');
62
+ options.roleAssumer = getDefaultRoleAssumer({
63
+ ...options.clientConfig,
64
+ credentialProviderLogger: options.logger,
65
+ parentClientConfig: {
66
+ ...options?.parentClientConfig,
67
+ region: region ?? options?.parentClientConfig?.region
68
+ }
69
+ }, options.clientPlugins);
70
+ }
71
+ if (source_profile && source_profile in visitedProfiles) {
72
+ throw new CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${getProfileName(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(", "), { logger: options.logger });
73
+ }
74
+ options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`);
75
+ const sourceCredsProvider = source_profile ? resolveProfileData(source_profile, profiles, options, {
76
+ ...visitedProfiles,
77
+ [source_profile]: true
78
+ }, isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {})) : (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))();
79
+ if (isCredentialSourceWithoutRoleArn(profileData)) {
80
+ return sourceCredsProvider.then((creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
81
+ } else {
82
+ const params = {
83
+ RoleArn: profileData.role_arn,
84
+ RoleSessionName: profileData.role_session_name || `aws-sdk-js-${Date.now()}`,
85
+ ExternalId: profileData.external_id,
86
+ DurationSeconds: parseInt(profileData.duration_seconds || "3600", 10)
87
+ };
88
+ const { mfa_serial } = profileData;
89
+ if (mfa_serial) {
90
+ if (!options.mfaCodeProvider) {
91
+ throw new CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, { logger: options.logger, tryNextLink: false });
92
+ }
93
+ params.SerialNumber = mfa_serial;
94
+ params.TokenCode = await options.mfaCodeProvider(mfa_serial);
95
+ }
96
+ const sourceCreds = await sourceCredsProvider;
97
+ return options.roleAssumer(sourceCreds, params).then((creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
98
+ }
99
+ };
100
+ var isCredentialSourceWithoutRoleArn = (section) => {
101
+ return !section.role_arn && !!section.credential_source;
102
+ };
103
+
104
+ // ../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js
105
+ var isProcessProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string";
106
+ var resolveProcessCredentials = async (options, profile) => import('./dist-es-4LCK4BMD.js').then(({ fromProcess }) => fromProcess({
107
+ ...options,
108
+ profile
109
+ })().then((creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_PROCESS", "v")));
110
+
111
+ // ../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveSsoCredentials.js
112
+ var resolveSsoCredentials = async (profile, profileData, options = {}) => {
113
+ const { fromSSO } = await import('./dist-es-TNZXIBKF.js');
114
+ return fromSSO({
115
+ profile,
116
+ logger: options.logger,
117
+ parentClientConfig: options.parentClientConfig,
118
+ clientConfig: options.clientConfig
119
+ })().then((creds) => {
120
+ if (profileData.sso_session) {
121
+ return setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO", "r");
122
+ } else {
123
+ return setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO_LEGACY", "t");
124
+ }
125
+ });
126
+ };
127
+ 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");
128
+
129
+ // ../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveStaticCredentials.js
130
+ 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;
131
+ var resolveStaticCredentials = async (profile, options) => {
132
+ options?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");
133
+ const credentials = {
134
+ accessKeyId: profile.aws_access_key_id,
135
+ secretAccessKey: profile.aws_secret_access_key,
136
+ sessionToken: profile.aws_session_token,
137
+ ...profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope },
138
+ ...profile.aws_account_id && { accountId: profile.aws_account_id }
139
+ };
140
+ return setCredentialFeature(credentials, "CREDENTIALS_PROFILE", "n");
141
+ };
142
+
143
+ // ../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js
144
+ 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;
145
+ var resolveWebIdentityCredentials = async (profile, options) => import('./dist-es-ZOY57CKU.js').then(({ fromTokenFile }) => fromTokenFile({
146
+ webIdentityTokenFile: profile.web_identity_token_file,
147
+ roleArn: profile.role_arn,
148
+ roleSessionName: profile.role_session_name,
149
+ roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,
150
+ logger: options.logger,
151
+ parentClientConfig: options.parentClientConfig
152
+ })().then((creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q")));
153
+
154
+ // ../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js
155
+ var resolveProfileData = async (profileName, profiles, options, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {
156
+ const data = profiles[profileName];
157
+ if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {
158
+ return resolveStaticCredentials(data, options);
159
+ }
160
+ if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) {
161
+ return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles);
162
+ }
163
+ if (isStaticCredsProfile(data)) {
164
+ return resolveStaticCredentials(data, options);
165
+ }
166
+ if (isWebIdentityProfile(data)) {
167
+ return resolveWebIdentityCredentials(data, options);
168
+ }
169
+ if (isProcessProfile(data)) {
170
+ return resolveProcessCredentials(options, profileName);
171
+ }
172
+ if (isSsoProfile(data)) {
173
+ return await resolveSsoCredentials(profileName, data, options);
174
+ }
175
+ throw new CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });
176
+ };
177
+
178
+ // ../../node_modules/@aws-sdk/credential-provider-ini/dist-es/fromIni.js
179
+ var fromIni = (_init = {}) => async ({ callerClientConfig } = {}) => {
180
+ const init = {
181
+ ..._init,
182
+ parentClientConfig: {
183
+ ...callerClientConfig,
184
+ ..._init.parentClientConfig
185
+ }
186
+ };
187
+ init.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");
188
+ const profiles = await parseKnownFiles(init);
189
+ return resolveProfileData(getProfileName({
190
+ profile: _init.profile ?? callerClientConfig?.profile
191
+ }), profiles, init);
192
+ };
193
+
194
+ export { fromIni };