@digipair/skill-s3 0.136.3 → 0.136.4
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/AwsRestJsonProtocol.esm.js +208 -123
- package/dist/externalDataInterceptor.esm.js +1 -1
- package/dist/getSSOTokenFromFile.esm.js +4 -4
- package/dist/index.esm.js +10 -8
- package/dist/index.esm10.js +81 -89
- package/dist/index.esm11.js +659 -420
- package/dist/index.esm12.js +231 -1138
- package/dist/index.esm13.js +896 -1600
- package/dist/index.esm14.js +210 -0
- package/dist/index.esm15.js +4780 -0
- package/dist/index.esm16.js +2057 -0
- package/dist/index.esm17.js +434 -0
- package/dist/index.esm18.js +1265 -0
- package/dist/index.esm19.js +456 -0
- package/dist/index.esm2.js +58503 -11
- package/dist/index.esm20.js +4885 -0
- package/dist/index.esm3.js +787 -51789
- package/dist/index.esm4.js +1154 -88
- package/dist/index.esm5.js +268 -4827
- package/dist/index.esm6.js +954 -951
- package/dist/index.esm7.js +2425 -119
- package/dist/index.esm8.js +124 -426
- package/dist/index.esm9.js +123 -2399
- package/dist/loadSso.esm.js +4966 -187
- package/dist/loadSso.esm2.js +6584 -0
- package/dist/{package.esm.js → loadSsoSessionData.esm.js} +155 -122
- package/dist/noAuth.esm.js +165 -0
- package/dist/parseKnownFiles.esm.js +1 -1
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/lib/skill-s3.d.ts +6 -0
- package/dist/src/lib/skill-s3.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/create-aggregated-client.esm.js +0 -366
package/dist/index.esm10.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import '
|
|
4
|
-
import '
|
|
5
|
-
import '
|
|
1
|
+
import { parse } from 'url';
|
|
2
|
+
import { Buffer } from 'buffer';
|
|
3
|
+
import { request } from 'http';
|
|
4
|
+
import { P as ProviderError, C as CredentialsProviderError, p as parseUrl, l as loadConfig } from './index.esm2.js';
|
|
5
|
+
import 'path';
|
|
6
|
+
import 'os';
|
|
6
7
|
import 'node:fs/promises';
|
|
8
|
+
import 'stream';
|
|
9
|
+
import 'crypto';
|
|
7
10
|
import 'node:stream';
|
|
8
|
-
import '
|
|
9
|
-
import '
|
|
11
|
+
import 'https';
|
|
12
|
+
import 'process';
|
|
10
13
|
import 'node:fs';
|
|
11
|
-
import '
|
|
12
|
-
import 'node:zlib';
|
|
14
|
+
import 'zlib';
|
|
13
15
|
|
|
14
16
|
function _define_property$5(obj, key, value) {
|
|
15
17
|
if (key in obj) {
|
|
@@ -39,62 +41,6 @@ function _object_spread$4(target) {
|
|
|
39
41
|
}
|
|
40
42
|
return target;
|
|
41
43
|
}
|
|
42
|
-
function _type_of$1(obj) {
|
|
43
|
-
"@swc/helpers - typeof";
|
|
44
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
45
|
-
}
|
|
46
|
-
var isImdsCredentials = function(arg) {
|
|
47
|
-
return Boolean(arg) && (typeof arg === "undefined" ? "undefined" : _type_of$1(arg)) === "object" && typeof arg.AccessKeyId === "string" && typeof arg.SecretAccessKey === "string" && typeof arg.Token === "string" && typeof arg.Expiration === "string";
|
|
48
|
-
};
|
|
49
|
-
var fromImdsCredentials = function(creds) {
|
|
50
|
-
return _object_spread$4({
|
|
51
|
-
accessKeyId: creds.AccessKeyId,
|
|
52
|
-
secretAccessKey: creds.SecretAccessKey,
|
|
53
|
-
sessionToken: creds.Token,
|
|
54
|
-
expiration: new Date(creds.Expiration)
|
|
55
|
-
}, creds.AccountId && {
|
|
56
|
-
accountId: creds.AccountId
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
var DEFAULT_TIMEOUT = 1000;
|
|
61
|
-
var DEFAULT_MAX_RETRIES = 0;
|
|
62
|
-
var providerConfigFromInit = function(param) {
|
|
63
|
-
var _param_maxRetries = param.maxRetries, maxRetries = _param_maxRetries === void 0 ? DEFAULT_MAX_RETRIES : _param_maxRetries, _param_timeout = param.timeout, timeout = _param_timeout === void 0 ? DEFAULT_TIMEOUT : _param_timeout;
|
|
64
|
-
return {
|
|
65
|
-
maxRetries: maxRetries,
|
|
66
|
-
timeout: timeout
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
function _define_property$4(obj, key, value) {
|
|
71
|
-
if (key in obj) {
|
|
72
|
-
Object.defineProperty(obj, key, {
|
|
73
|
-
value: value,
|
|
74
|
-
enumerable: true,
|
|
75
|
-
configurable: true,
|
|
76
|
-
writable: true
|
|
77
|
-
});
|
|
78
|
-
} else {
|
|
79
|
-
obj[key] = value;
|
|
80
|
-
}
|
|
81
|
-
return obj;
|
|
82
|
-
}
|
|
83
|
-
function _object_spread$3(target) {
|
|
84
|
-
for(var i = 1; i < arguments.length; i++){
|
|
85
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
86
|
-
var ownKeys = Object.keys(source);
|
|
87
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
88
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
89
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
90
|
-
}));
|
|
91
|
-
}
|
|
92
|
-
ownKeys.forEach(function(key) {
|
|
93
|
-
_define_property$4(target, key, source[key]);
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
return target;
|
|
97
|
-
}
|
|
98
44
|
function ownKeys$3(object, enumerableOnly) {
|
|
99
45
|
var keys = Object.keys(object);
|
|
100
46
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -117,7 +63,7 @@ function _object_spread_props$3(target, source) {
|
|
|
117
63
|
function httpRequest(options) {
|
|
118
64
|
return new Promise(function(resolve, reject) {
|
|
119
65
|
var _options_hostname;
|
|
120
|
-
var req =
|
|
66
|
+
var req = request(_object_spread_props$3(_object_spread$4({
|
|
121
67
|
method: "GET"
|
|
122
68
|
}, options), {
|
|
123
69
|
hostname: (_options_hostname = options.hostname) === null || _options_hostname === void 0 ? void 0 : _options_hostname.replace(/^\[(.+)\]$/, "$1")
|
|
@@ -151,6 +97,62 @@ function httpRequest(options) {
|
|
|
151
97
|
});
|
|
152
98
|
}
|
|
153
99
|
|
|
100
|
+
function _define_property$4(obj, key, value) {
|
|
101
|
+
if (key in obj) {
|
|
102
|
+
Object.defineProperty(obj, key, {
|
|
103
|
+
value: value,
|
|
104
|
+
enumerable: true,
|
|
105
|
+
configurable: true,
|
|
106
|
+
writable: true
|
|
107
|
+
});
|
|
108
|
+
} else {
|
|
109
|
+
obj[key] = value;
|
|
110
|
+
}
|
|
111
|
+
return obj;
|
|
112
|
+
}
|
|
113
|
+
function _object_spread$3(target) {
|
|
114
|
+
for(var i = 1; i < arguments.length; i++){
|
|
115
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
116
|
+
var ownKeys = Object.keys(source);
|
|
117
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
118
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
119
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
120
|
+
}));
|
|
121
|
+
}
|
|
122
|
+
ownKeys.forEach(function(key) {
|
|
123
|
+
_define_property$4(target, key, source[key]);
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
return target;
|
|
127
|
+
}
|
|
128
|
+
function _type_of$1(obj) {
|
|
129
|
+
"@swc/helpers - typeof";
|
|
130
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
131
|
+
}
|
|
132
|
+
var isImdsCredentials = function(arg) {
|
|
133
|
+
return Boolean(arg) && (typeof arg === "undefined" ? "undefined" : _type_of$1(arg)) === "object" && typeof arg.AccessKeyId === "string" && typeof arg.SecretAccessKey === "string" && typeof arg.Token === "string" && typeof arg.Expiration === "string";
|
|
134
|
+
};
|
|
135
|
+
var fromImdsCredentials = function(creds) {
|
|
136
|
+
return _object_spread$3({
|
|
137
|
+
accessKeyId: creds.AccessKeyId,
|
|
138
|
+
secretAccessKey: creds.SecretAccessKey,
|
|
139
|
+
sessionToken: creds.Token,
|
|
140
|
+
expiration: new Date(creds.Expiration)
|
|
141
|
+
}, creds.AccountId && {
|
|
142
|
+
accountId: creds.AccountId
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
var DEFAULT_TIMEOUT = 1000;
|
|
147
|
+
var DEFAULT_MAX_RETRIES = 0;
|
|
148
|
+
var providerConfigFromInit = function(param) {
|
|
149
|
+
var _param_maxRetries = param.maxRetries, maxRetries = _param_maxRetries === void 0 ? DEFAULT_MAX_RETRIES : _param_maxRetries, _param_timeout = param.timeout, timeout = _param_timeout === void 0 ? DEFAULT_TIMEOUT : _param_timeout;
|
|
150
|
+
return {
|
|
151
|
+
maxRetries: maxRetries,
|
|
152
|
+
timeout: timeout
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
|
|
154
156
|
var retry = function(toRetry, maxRetries) {
|
|
155
157
|
var promise = toRetry();
|
|
156
158
|
for(var i = 0; i < maxRetries; i++){
|
|
@@ -404,14 +406,14 @@ var requestFromEcsImds = function() {
|
|
|
404
406
|
};
|
|
405
407
|
}();
|
|
406
408
|
var CMDS_IP = "169.254.170.2";
|
|
407
|
-
var GREENGRASS_HOSTS =
|
|
408
|
-
|
|
409
|
-
"127.0.0.1"
|
|
410
|
-
|
|
411
|
-
var GREENGRASS_PROTOCOLS =
|
|
412
|
-
"http:",
|
|
413
|
-
"https:"
|
|
414
|
-
|
|
409
|
+
var GREENGRASS_HOSTS = {
|
|
410
|
+
localhost: true,
|
|
411
|
+
"127.0.0.1": true
|
|
412
|
+
};
|
|
413
|
+
var GREENGRASS_PROTOCOLS = {
|
|
414
|
+
"http:": true,
|
|
415
|
+
"https:": true
|
|
416
|
+
};
|
|
415
417
|
var getCmdsUri = function() {
|
|
416
418
|
var _ref = _async_to_generator$3(function(param) {
|
|
417
419
|
var logger, parsed;
|
|
@@ -427,21 +429,14 @@ var getCmdsUri = function() {
|
|
|
427
429
|
];
|
|
428
430
|
}
|
|
429
431
|
if (process.env[ENV_CMDS_FULL_URI]) {
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
} catch (e) {
|
|
433
|
-
throw new CredentialsProviderError("".concat(process.env[ENV_CMDS_FULL_URI], " is not a valid container metadata service URL"), {
|
|
434
|
-
tryNextLink: false,
|
|
435
|
-
logger: logger
|
|
436
|
-
});
|
|
437
|
-
}
|
|
438
|
-
if (!parsed.hostname || !GREENGRASS_HOSTS.has(parsed.hostname)) {
|
|
432
|
+
parsed = parse(process.env[ENV_CMDS_FULL_URI]);
|
|
433
|
+
if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) {
|
|
439
434
|
throw new CredentialsProviderError("".concat(parsed.hostname, " is not a valid container metadata service hostname"), {
|
|
440
435
|
tryNextLink: false,
|
|
441
436
|
logger: logger
|
|
442
437
|
});
|
|
443
438
|
}
|
|
444
|
-
if (!parsed.protocol || !
|
|
439
|
+
if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) {
|
|
445
440
|
throw new CredentialsProviderError("".concat(parsed.protocol, " is not a valid container metadata service protocol"), {
|
|
446
441
|
tryNextLink: false,
|
|
447
442
|
logger: logger
|
|
@@ -449,12 +444,9 @@ var getCmdsUri = function() {
|
|
|
449
444
|
}
|
|
450
445
|
return [
|
|
451
446
|
2,
|
|
452
|
-
{
|
|
453
|
-
protocol: parsed.protocol,
|
|
454
|
-
hostname: parsed.hostname,
|
|
455
|
-
path: parsed.pathname + parsed.search,
|
|
447
|
+
_object_spread_props$2(_object_spread$2({}, parsed), {
|
|
456
448
|
port: parsed.port ? parseInt(parsed.port, 10) : undefined
|
|
457
|
-
}
|
|
449
|
+
})
|
|
458
450
|
];
|
|
459
451
|
}
|
|
460
452
|
throw new CredentialsProviderError("The container metadata credential provider cannot be used unless" + " the ".concat(ENV_CMDS_RELATIVE_URI, " or ").concat(ENV_CMDS_FULL_URI, " environment") + " variable is set", {
|