@digipair/skill-s3 0.136.0 → 0.136.3
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 +1773 -0
- package/dist/create-aggregated-client.esm.js +366 -0
- package/dist/getSSOTokenFromFile.esm.js +4 -4
- package/dist/index.esm.js +8 -10
- package/dist/index.esm10.js +89 -81
- package/dist/index.esm11.js +1416 -1014
- package/dist/index.esm12.js +790 -3214
- package/dist/index.esm13.js +1600 -896
- package/dist/index.esm2.js +8 -10
- package/dist/index.esm3.js +40820 -47659
- package/dist/index.esm4.js +275 -780
- package/dist/index.esm5.js +4925 -113
- package/dist/index.esm6.js +865 -4383
- package/dist/index.esm7.js +10 -13
- package/dist/index.esm8.js +320 -1273
- package/dist/index.esm9.js +1367 -2081
- package/dist/loadSso.esm.js +1115 -1939
- package/dist/package.esm.js +316 -0
- package/package.json +1 -1
- package/dist/index.esm14.js +0 -7181
- package/dist/noAuth.esm.js +0 -165
- package/dist/parseJsonBody.esm.js +0 -216
- package/dist/src/index.d.ts +0 -2
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/lib/skill-s3.d.ts +0 -6
- package/dist/src/lib/skill-s3.d.ts.map +0 -1
package/dist/noAuth.esm.js
DELETED
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
2
|
-
try {
|
|
3
|
-
var info = gen[key](arg);
|
|
4
|
-
var value = info.value;
|
|
5
|
-
} catch (error) {
|
|
6
|
-
reject(error);
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
if (info.done) {
|
|
10
|
-
resolve(value);
|
|
11
|
-
} else {
|
|
12
|
-
Promise.resolve(value).then(_next, _throw);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
function _async_to_generator(fn) {
|
|
16
|
-
return function() {
|
|
17
|
-
var self = this, args = arguments;
|
|
18
|
-
return new Promise(function(resolve, reject) {
|
|
19
|
-
var gen = fn.apply(self, args);
|
|
20
|
-
function _next(value) {
|
|
21
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
22
|
-
}
|
|
23
|
-
function _throw(err) {
|
|
24
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
25
|
-
}
|
|
26
|
-
_next(undefined);
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
function _class_call_check(instance, Constructor) {
|
|
31
|
-
if (!(instance instanceof Constructor)) {
|
|
32
|
-
throw new TypeError("Cannot call a class as a function");
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
function _defineProperties(target, props) {
|
|
36
|
-
for(var i = 0; i < props.length; i++){
|
|
37
|
-
var descriptor = props[i];
|
|
38
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
39
|
-
descriptor.configurable = true;
|
|
40
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
41
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
function _create_class(Constructor, protoProps, staticProps) {
|
|
45
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
46
|
-
return Constructor;
|
|
47
|
-
}
|
|
48
|
-
function _ts_generator(thisArg, body) {
|
|
49
|
-
var f, y, t, g, _ = {
|
|
50
|
-
label: 0,
|
|
51
|
-
sent: function() {
|
|
52
|
-
if (t[0] & 1) throw t[1];
|
|
53
|
-
return t[1];
|
|
54
|
-
},
|
|
55
|
-
trys: [],
|
|
56
|
-
ops: []
|
|
57
|
-
};
|
|
58
|
-
return g = {
|
|
59
|
-
next: verb(0),
|
|
60
|
-
"throw": verb(1),
|
|
61
|
-
"return": verb(2)
|
|
62
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
63
|
-
return this;
|
|
64
|
-
}), g;
|
|
65
|
-
function verb(n) {
|
|
66
|
-
return function(v) {
|
|
67
|
-
return step([
|
|
68
|
-
n,
|
|
69
|
-
v
|
|
70
|
-
]);
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
function step(op) {
|
|
74
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
75
|
-
while(_)try {
|
|
76
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
77
|
-
if (y = 0, t) op = [
|
|
78
|
-
op[0] & 2,
|
|
79
|
-
t.value
|
|
80
|
-
];
|
|
81
|
-
switch(op[0]){
|
|
82
|
-
case 0:
|
|
83
|
-
case 1:
|
|
84
|
-
t = op;
|
|
85
|
-
break;
|
|
86
|
-
case 4:
|
|
87
|
-
_.label++;
|
|
88
|
-
return {
|
|
89
|
-
value: op[1],
|
|
90
|
-
done: false
|
|
91
|
-
};
|
|
92
|
-
case 5:
|
|
93
|
-
_.label++;
|
|
94
|
-
y = op[1];
|
|
95
|
-
op = [
|
|
96
|
-
0
|
|
97
|
-
];
|
|
98
|
-
continue;
|
|
99
|
-
case 7:
|
|
100
|
-
op = _.ops.pop();
|
|
101
|
-
_.trys.pop();
|
|
102
|
-
continue;
|
|
103
|
-
default:
|
|
104
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
105
|
-
_ = 0;
|
|
106
|
-
continue;
|
|
107
|
-
}
|
|
108
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
109
|
-
_.label = op[1];
|
|
110
|
-
break;
|
|
111
|
-
}
|
|
112
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
113
|
-
_.label = t[1];
|
|
114
|
-
t = op;
|
|
115
|
-
break;
|
|
116
|
-
}
|
|
117
|
-
if (t && _.label < t[2]) {
|
|
118
|
-
_.label = t[2];
|
|
119
|
-
_.ops.push(op);
|
|
120
|
-
break;
|
|
121
|
-
}
|
|
122
|
-
if (t[2]) _.ops.pop();
|
|
123
|
-
_.trys.pop();
|
|
124
|
-
continue;
|
|
125
|
-
}
|
|
126
|
-
op = body.call(thisArg, _);
|
|
127
|
-
} catch (e) {
|
|
128
|
-
op = [
|
|
129
|
-
6,
|
|
130
|
-
e
|
|
131
|
-
];
|
|
132
|
-
y = 0;
|
|
133
|
-
} finally{
|
|
134
|
-
f = t = 0;
|
|
135
|
-
}
|
|
136
|
-
if (op[0] & 5) throw op[1];
|
|
137
|
-
return {
|
|
138
|
-
value: op[0] ? op[1] : void 0,
|
|
139
|
-
done: true
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
var NoAuthSigner = /*#__PURE__*/ function() {
|
|
144
|
-
function NoAuthSigner() {
|
|
145
|
-
_class_call_check(this, NoAuthSigner);
|
|
146
|
-
}
|
|
147
|
-
_create_class(NoAuthSigner, [
|
|
148
|
-
{
|
|
149
|
-
key: "sign",
|
|
150
|
-
value: function sign(httpRequest, identity, signingProperties) {
|
|
151
|
-
return _async_to_generator(function() {
|
|
152
|
-
return _ts_generator(this, function(_state) {
|
|
153
|
-
return [
|
|
154
|
-
2,
|
|
155
|
-
httpRequest
|
|
156
|
-
];
|
|
157
|
-
});
|
|
158
|
-
})();
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
]);
|
|
162
|
-
return NoAuthSigner;
|
|
163
|
-
}();
|
|
164
|
-
|
|
165
|
-
export { NoAuthSigner as N };
|
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
import { j as collectBody, t as toUtf8 } from './index.esm3.js';
|
|
2
|
-
|
|
3
|
-
var collectBodyString = function(streamBody, context) {
|
|
4
|
-
return collectBody(streamBody, context).then(function(body) {
|
|
5
|
-
var _context_utf8Encoder;
|
|
6
|
-
return ((_context_utf8Encoder = context === null || context === void 0 ? void 0 : context.utf8Encoder) !== null && _context_utf8Encoder !== void 0 ? _context_utf8Encoder : toUtf8)(body);
|
|
7
|
-
});
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
11
|
-
try {
|
|
12
|
-
var info = gen[key](arg);
|
|
13
|
-
var value = info.value;
|
|
14
|
-
} catch (error) {
|
|
15
|
-
reject(error);
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
if (info.done) {
|
|
19
|
-
resolve(value);
|
|
20
|
-
} else {
|
|
21
|
-
Promise.resolve(value).then(_next, _throw);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
function _async_to_generator(fn) {
|
|
25
|
-
return function() {
|
|
26
|
-
var self = this, args = arguments;
|
|
27
|
-
return new Promise(function(resolve, reject) {
|
|
28
|
-
var gen = fn.apply(self, args);
|
|
29
|
-
function _next(value) {
|
|
30
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
31
|
-
}
|
|
32
|
-
function _throw(err) {
|
|
33
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
34
|
-
}
|
|
35
|
-
_next(undefined);
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
function _type_of(obj) {
|
|
40
|
-
"@swc/helpers - typeof";
|
|
41
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
42
|
-
}
|
|
43
|
-
function _ts_generator(thisArg, body) {
|
|
44
|
-
var f, y, t, g, _ = {
|
|
45
|
-
label: 0,
|
|
46
|
-
sent: function() {
|
|
47
|
-
if (t[0] & 1) throw t[1];
|
|
48
|
-
return t[1];
|
|
49
|
-
},
|
|
50
|
-
trys: [],
|
|
51
|
-
ops: []
|
|
52
|
-
};
|
|
53
|
-
return g = {
|
|
54
|
-
next: verb(0),
|
|
55
|
-
"throw": verb(1),
|
|
56
|
-
"return": verb(2)
|
|
57
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
58
|
-
return this;
|
|
59
|
-
}), g;
|
|
60
|
-
function verb(n) {
|
|
61
|
-
return function(v) {
|
|
62
|
-
return step([
|
|
63
|
-
n,
|
|
64
|
-
v
|
|
65
|
-
]);
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
function step(op) {
|
|
69
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
70
|
-
while(_)try {
|
|
71
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
72
|
-
if (y = 0, t) op = [
|
|
73
|
-
op[0] & 2,
|
|
74
|
-
t.value
|
|
75
|
-
];
|
|
76
|
-
switch(op[0]){
|
|
77
|
-
case 0:
|
|
78
|
-
case 1:
|
|
79
|
-
t = op;
|
|
80
|
-
break;
|
|
81
|
-
case 4:
|
|
82
|
-
_.label++;
|
|
83
|
-
return {
|
|
84
|
-
value: op[1],
|
|
85
|
-
done: false
|
|
86
|
-
};
|
|
87
|
-
case 5:
|
|
88
|
-
_.label++;
|
|
89
|
-
y = op[1];
|
|
90
|
-
op = [
|
|
91
|
-
0
|
|
92
|
-
];
|
|
93
|
-
continue;
|
|
94
|
-
case 7:
|
|
95
|
-
op = _.ops.pop();
|
|
96
|
-
_.trys.pop();
|
|
97
|
-
continue;
|
|
98
|
-
default:
|
|
99
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
100
|
-
_ = 0;
|
|
101
|
-
continue;
|
|
102
|
-
}
|
|
103
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
104
|
-
_.label = op[1];
|
|
105
|
-
break;
|
|
106
|
-
}
|
|
107
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
108
|
-
_.label = t[1];
|
|
109
|
-
t = op;
|
|
110
|
-
break;
|
|
111
|
-
}
|
|
112
|
-
if (t && _.label < t[2]) {
|
|
113
|
-
_.label = t[2];
|
|
114
|
-
_.ops.push(op);
|
|
115
|
-
break;
|
|
116
|
-
}
|
|
117
|
-
if (t[2]) _.ops.pop();
|
|
118
|
-
_.trys.pop();
|
|
119
|
-
continue;
|
|
120
|
-
}
|
|
121
|
-
op = body.call(thisArg, _);
|
|
122
|
-
} catch (e) {
|
|
123
|
-
op = [
|
|
124
|
-
6,
|
|
125
|
-
e
|
|
126
|
-
];
|
|
127
|
-
y = 0;
|
|
128
|
-
} finally{
|
|
129
|
-
f = t = 0;
|
|
130
|
-
}
|
|
131
|
-
if (op[0] & 5) throw op[1];
|
|
132
|
-
return {
|
|
133
|
-
value: op[0] ? op[1] : void 0,
|
|
134
|
-
done: true
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
var parseJsonBody = function(streamBody, context) {
|
|
139
|
-
return collectBodyString(streamBody, context).then(function(encoded) {
|
|
140
|
-
if (encoded.length) {
|
|
141
|
-
try {
|
|
142
|
-
return JSON.parse(encoded);
|
|
143
|
-
} catch (e) {
|
|
144
|
-
if ((e === null || e === void 0 ? void 0 : e.name) === "SyntaxError") {
|
|
145
|
-
Object.defineProperty(e, "$responseBodyText", {
|
|
146
|
-
value: encoded
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
throw e;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
return {};
|
|
153
|
-
});
|
|
154
|
-
};
|
|
155
|
-
var parseJsonErrorBody = function() {
|
|
156
|
-
var _ref = _async_to_generator(function(errorBody, context) {
|
|
157
|
-
var value, _value_message;
|
|
158
|
-
return _ts_generator(this, function(_state) {
|
|
159
|
-
switch(_state.label){
|
|
160
|
-
case 0:
|
|
161
|
-
return [
|
|
162
|
-
4,
|
|
163
|
-
parseJsonBody(errorBody, context)
|
|
164
|
-
];
|
|
165
|
-
case 1:
|
|
166
|
-
value = _state.sent();
|
|
167
|
-
value.message = (_value_message = value.message) !== null && _value_message !== void 0 ? _value_message : value.Message;
|
|
168
|
-
return [
|
|
169
|
-
2,
|
|
170
|
-
value
|
|
171
|
-
];
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
});
|
|
175
|
-
return function parseJsonErrorBody(errorBody, context) {
|
|
176
|
-
return _ref.apply(this, arguments);
|
|
177
|
-
};
|
|
178
|
-
}();
|
|
179
|
-
var loadRestJsonErrorCode = function(output, data) {
|
|
180
|
-
var findKey = function(object, key) {
|
|
181
|
-
return Object.keys(object).find(function(k) {
|
|
182
|
-
return k.toLowerCase() === key.toLowerCase();
|
|
183
|
-
});
|
|
184
|
-
};
|
|
185
|
-
var sanitizeErrorCode = function(rawValue) {
|
|
186
|
-
var cleanValue = rawValue;
|
|
187
|
-
if (typeof cleanValue === "number") {
|
|
188
|
-
cleanValue = cleanValue.toString();
|
|
189
|
-
}
|
|
190
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
191
|
-
cleanValue = cleanValue.split(",")[0];
|
|
192
|
-
}
|
|
193
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
194
|
-
cleanValue = cleanValue.split(":")[0];
|
|
195
|
-
}
|
|
196
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
197
|
-
cleanValue = cleanValue.split("#")[1];
|
|
198
|
-
}
|
|
199
|
-
return cleanValue;
|
|
200
|
-
};
|
|
201
|
-
var headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
202
|
-
if (headerKey !== undefined) {
|
|
203
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
204
|
-
}
|
|
205
|
-
if (data && (typeof data === "undefined" ? "undefined" : _type_of(data)) === "object") {
|
|
206
|
-
var codeKey = findKey(data, "code");
|
|
207
|
-
if (codeKey && data[codeKey] !== undefined) {
|
|
208
|
-
return sanitizeErrorCode(data[codeKey]);
|
|
209
|
-
}
|
|
210
|
-
if (data["__type"] !== undefined) {
|
|
211
|
-
return sanitizeErrorCode(data["__type"]);
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
};
|
|
215
|
-
|
|
216
|
-
export { parseJsonErrorBody as a, loadRestJsonErrorCode as l, parseJsonBody as p };
|
package/dist/src/index.d.ts
DELETED
package/dist/src/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { PinsSettings } from '@digipair/engine';
|
|
2
|
-
export declare const upload: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<import("@aws-sdk/client-s3").PutObjectCommandOutput>;
|
|
3
|
-
export declare const download: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<string>;
|
|
4
|
-
export declare const remove: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<import("@aws-sdk/client-s3").DeleteObjectCommandOutput>;
|
|
5
|
-
export declare const list: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<import("@aws-sdk/client-s3").ListObjectsV2CommandOutput>;
|
|
6
|
-
//# sourceMappingURL=skill-s3.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skill-s3.d.ts","sourceRoot":"","sources":["../../../src/lib/skill-s3.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AA0EhD,eAAO,MAAM,MAAM,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iEAC/B,CAAC;AAEpD,eAAO,MAAM,QAAQ,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,oBAC/B,CAAC;AAEtD,eAAO,MAAM,MAAM,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,oEAC/B,CAAC;AAEpD,eAAO,MAAM,IAAI,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,qEAC/B,CAAC"}
|