@intuitionrobotics/file-upload 0.41.67 → 0.41.70
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/app-backend/api/_upload.js +1 -1
- package/app-backend/api/_upload.js.map +1 -1
- package/app-backend/api/v1/upload/get-url.js +10 -54
- package/app-backend/api/v1/upload/get-url.js.map +1 -1
- package/app-backend/core/module-pack.js +8 -14
- package/app-backend/core/module-pack.js.map +1 -1
- package/app-backend/modules/BucketListener.js +17 -68
- package/app-backend/modules/BucketListener.js.map +1 -1
- package/app-backend/modules/ServerUploaderModule.js +16 -59
- package/app-backend/modules/ServerUploaderModule.js.map +1 -1
- package/app-backend/modules/UploaderModule.js +89 -200
- package/app-backend/modules/UploaderModule.js.map +1 -1
- package/app-backend/modules/UploaderTempFileModule.js +20 -35
- package/app-backend/modules/UploaderTempFileModule.js.map +1 -1
- package/app-frontend/core/module-pack.js +5 -11
- package/app-frontend/core/module-pack.js.map +1 -1
- package/app-frontend/modules/UploaderModule.js +25 -76
- package/app-frontend/modules/UploaderModule.js.map +1 -1
- package/package.json +4 -4
- package/shared/modules/BaseUploaderModule.js +75 -155
- package/shared/modules/BaseUploaderModule.js.map +1 -1
|
@@ -1,17 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -21,33 +8,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
9
|
});
|
|
23
10
|
};
|
|
24
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
25
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
26
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
27
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
28
|
-
function step(op) {
|
|
29
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
30
|
-
while (_) try {
|
|
31
|
-
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;
|
|
32
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
33
|
-
switch (op[0]) {
|
|
34
|
-
case 0: case 1: t = op; break;
|
|
35
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
36
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
37
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
38
|
-
default:
|
|
39
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
40
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
41
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
42
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
43
|
-
if (t[2]) _.ops.pop();
|
|
44
|
-
_.trys.pop(); continue;
|
|
45
|
-
}
|
|
46
|
-
op = body.call(thisArg, _);
|
|
47
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
48
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52
12
|
exports.UploaderModule = exports.UploaderModule_Class = exports.Temp_Path = void 0;
|
|
53
13
|
/*
|
|
@@ -68,180 +28,109 @@ exports.UploaderModule = exports.UploaderModule_Class = exports.Temp_Path = void
|
|
|
68
28
|
* See the License for the specific language governing permissions and
|
|
69
29
|
* limitations under the License.
|
|
70
30
|
*/
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
31
|
+
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
32
|
+
const backend_1 = require("@intuitionrobotics/firebase/backend");
|
|
33
|
+
const types_1 = require("../../shared/types");
|
|
34
|
+
const UploaderTempFileModule_1 = require("./UploaderTempFileModule");
|
|
35
|
+
const backend_2 = require("@intuitionrobotics/push-pub-sub/backend");
|
|
76
36
|
exports.Temp_Path = "files-temp";
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
_this.postProcessor = validator;
|
|
37
|
+
class UploaderModule_Class extends ts_common_1.Module {
|
|
38
|
+
constructor() {
|
|
39
|
+
super(...arguments);
|
|
40
|
+
this.setPostProcessor = (validator) => {
|
|
41
|
+
this.postProcessor = validator;
|
|
83
42
|
};
|
|
84
|
-
|
|
85
|
-
|
|
43
|
+
this.getProcessor = (k) => {
|
|
44
|
+
const postProcessorElement = this.postProcessor[k];
|
|
86
45
|
if (!postProcessorElement)
|
|
87
|
-
throw new ts_common_1.ImplementationMissingException(
|
|
46
|
+
throw new ts_common_1.ImplementationMissingException(`Missing validator for type ${k}`);
|
|
88
47
|
return postProcessorElement;
|
|
89
48
|
};
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
case 2:
|
|
114
|
-
bucket = _a.sent();
|
|
115
|
-
return [4 /*yield*/, bucket.getFile(tempMeta.path)];
|
|
116
|
-
case 3:
|
|
117
|
-
file = _a.sent();
|
|
118
|
-
if (!tempMeta.public) return [3 /*break*/, 8];
|
|
119
|
-
_a.label = 4;
|
|
120
|
-
case 4:
|
|
121
|
-
_a.trys.push([4, 6, , 8]);
|
|
122
|
-
return [4 /*yield*/, file.makePublic()];
|
|
123
|
-
case 5:
|
|
124
|
-
_a.sent();
|
|
125
|
-
return [3 /*break*/, 8];
|
|
126
|
-
case 6:
|
|
127
|
-
e_1 = _a.sent();
|
|
128
|
-
return [4 /*yield*/, this.notifyFrontend(tempMeta.feId, types_1.UploadResult.Failure, "Failed to make the file public: " + tempMeta.name, e_1)];
|
|
129
|
-
case 7:
|
|
130
|
-
_a.sent();
|
|
131
|
-
return [3 /*break*/, 8];
|
|
132
|
-
case 8:
|
|
133
|
-
_a.trys.push([8, 10, , 12]);
|
|
134
|
-
return [4 /*yield*/, val(transaction, file, tempMeta)];
|
|
135
|
-
case 9:
|
|
136
|
-
_a.sent();
|
|
137
|
-
return [3 /*break*/, 12];
|
|
138
|
-
case 10:
|
|
139
|
-
e_2 = _a.sent();
|
|
140
|
-
return [4 /*yield*/, this.notifyFrontend(tempMeta.feId, types_1.UploadResult.Failure, "Post-processing failed for file: " + tempMeta.name, e_2)];
|
|
141
|
-
case 11:
|
|
142
|
-
//TODO delete the file and the temp doc
|
|
143
|
-
return [2 /*return*/, _a.sent()];
|
|
144
|
-
case 12: return [2 /*return*/, this.notifyFrontend(tempMeta.feId, types_1.UploadResult.Success, "Successfully parsed and processed file " + tempMeta.name)];
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
}); })];
|
|
148
|
-
case 1:
|
|
149
|
-
_a.sent();
|
|
150
|
-
return [2 /*return*/];
|
|
49
|
+
this.fileUploaded = (filePath) => __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
if (!filePath)
|
|
51
|
+
throw new ts_common_1.ThisShouldNotHappenException("Missing file path");
|
|
52
|
+
this.logInfo(`Looking for file with path ${filePath}`);
|
|
53
|
+
yield UploaderTempFileModule_1.UploaderTempFileModule.runInTransaction((transaction) => __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
// I use collection and not the module directly since I want to handle failure my way
|
|
55
|
+
const tempMeta = yield transaction.queryUnique(UploaderTempFileModule_1.UploaderTempFileModule.collection, { where: { path: filePath } });
|
|
56
|
+
if (!tempMeta)
|
|
57
|
+
return this.logInfo(`File with path: ${filePath}, not found in temp collection db`);
|
|
58
|
+
this.logInfo(`Found temp meta with _id: ${tempMeta._id}`, tempMeta);
|
|
59
|
+
const val = this.postProcessor[tempMeta.key];
|
|
60
|
+
this.logInfo(`Found a validator ${!!val}`);
|
|
61
|
+
if (!val)
|
|
62
|
+
return this.notifyFrontend(tempMeta.feId, types_1.UploadResult.Failure, `Missing a validator for ${tempMeta.key} for file: ${tempMeta.name}`);
|
|
63
|
+
const bucket = yield this.storage.getOrCreateBucket(tempMeta.bucketName);
|
|
64
|
+
const file = yield bucket.getFile(tempMeta.path);
|
|
65
|
+
if (tempMeta.public) {
|
|
66
|
+
try {
|
|
67
|
+
yield file.makePublic();
|
|
68
|
+
}
|
|
69
|
+
catch (e) {
|
|
70
|
+
yield this.notifyFrontend(tempMeta.feId, types_1.UploadResult.Failure, `Failed to make the file public: ${tempMeta.name}`, e);
|
|
71
|
+
}
|
|
151
72
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
_this.notifyFrontend = function (feId, result, message, cause) { return __awaiter(_this, void 0, void 0, function () {
|
|
155
|
-
var data;
|
|
156
|
-
return __generator(this, function (_a) {
|
|
157
|
-
switch (_a.label) {
|
|
158
|
-
case 0:
|
|
159
|
-
cause && this.logWarning(cause);
|
|
160
|
-
data = { message: message, result: result, cause: cause };
|
|
161
|
-
return [4 /*yield*/, backend_2.PushPubSubModule.pushToKey(types_1.fileUploadedKey, { feId: feId }, data)];
|
|
162
|
-
case 1:
|
|
163
|
-
_a.sent();
|
|
164
|
-
return [2 /*return*/];
|
|
73
|
+
try {
|
|
74
|
+
yield val(transaction, file, tempMeta);
|
|
165
75
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}
|
|
170
|
-
UploaderModule_Class.prototype.__onFileUploaded = function (filePath) {
|
|
171
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
172
|
-
return __generator(this, function (_a) {
|
|
173
|
-
switch (_a.label) {
|
|
174
|
-
case 0: return [4 /*yield*/, this.fileUploaded(filePath)];
|
|
175
|
-
case 1:
|
|
176
|
-
_a.sent();
|
|
177
|
-
return [2 /*return*/];
|
|
76
|
+
catch (e) {
|
|
77
|
+
//TODO delete the file and the temp doc
|
|
78
|
+
return yield this.notifyFrontend(tempMeta.feId, types_1.UploadResult.Failure, `Post-processing failed for file: ${tempMeta.name}`, e);
|
|
178
79
|
}
|
|
179
|
-
|
|
80
|
+
return this.notifyFrontend(tempMeta.feId, types_1.UploadResult.Success, `Successfully parsed and processed file ${tempMeta.name}`);
|
|
81
|
+
}));
|
|
82
|
+
});
|
|
83
|
+
this.notifyFrontend = (feId, result, message, cause) => __awaiter(this, void 0, void 0, function* () {
|
|
84
|
+
cause && this.logWarning(cause);
|
|
85
|
+
const data = { message, result, cause };
|
|
86
|
+
yield backend_2.PushPubSubModule.pushToKey(types_1.fileUploadedKey, { feId }, data);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
__onFileUploaded(filePath) {
|
|
90
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
+
yield this.fileUploaded(filePath);
|
|
180
92
|
});
|
|
181
|
-
}
|
|
182
|
-
|
|
93
|
+
}
|
|
94
|
+
init() {
|
|
183
95
|
if (!this.postProcessor)
|
|
184
96
|
throw new ts_common_1.ImplementationMissingException("You must set a postProcessor for the UploaderModule");
|
|
185
97
|
this.storage = backend_1.FirebaseModule.createAdminSession(this.config.uploaderProjectId).getStorage();
|
|
186
|
-
}
|
|
187
|
-
|
|
98
|
+
}
|
|
99
|
+
getUrl(body, pathPrefix = exports.Temp_Path) {
|
|
188
100
|
var _a;
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
if (_file.public)
|
|
220
|
-
instance.public = _file.public;
|
|
221
|
-
if (_file.metadata)
|
|
222
|
-
instance.metadata = _file.metadata;
|
|
223
|
-
return [4 /*yield*/, UploaderTempFileModule_1.UploaderTempFileModule.upsert(instance)];
|
|
224
|
-
case 1:
|
|
225
|
-
temp = _a.sent();
|
|
226
|
-
return [4 /*yield*/, bucket.getFile(temp.path)];
|
|
227
|
-
case 2:
|
|
228
|
-
file = _a.sent();
|
|
229
|
-
return [4 /*yield*/, file.getWriteSecuredUrl(_file.mimeType, ts_common_1.Hour)];
|
|
230
|
-
case 3:
|
|
231
|
-
url = _a.sent();
|
|
232
|
-
return [2 /*return*/, {
|
|
233
|
-
secureUrl: url.securedUrl,
|
|
234
|
-
tempDoc: temp
|
|
235
|
-
}];
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
}); }))];
|
|
239
|
-
}
|
|
240
|
-
});
|
|
101
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
102
|
+
const bucketName = (_a = this.config) === null || _a === void 0 ? void 0 : _a.bucketName;
|
|
103
|
+
const bucket = yield this.storage.getOrCreateBucket(bucketName);
|
|
104
|
+
return Promise.all(body.map((_file) => __awaiter(this, void 0, void 0, function* () {
|
|
105
|
+
const key = _file.key || _file.mimeType;
|
|
106
|
+
this.getProcessor(key);
|
|
107
|
+
const _id = ts_common_1.generateHex(32);
|
|
108
|
+
const path = `${pathPrefix}/${_id}`;
|
|
109
|
+
const instance = {
|
|
110
|
+
_id,
|
|
111
|
+
feId: _file.feId,
|
|
112
|
+
name: _file.name,
|
|
113
|
+
mimeType: _file.mimeType,
|
|
114
|
+
key,
|
|
115
|
+
path,
|
|
116
|
+
_audit: ts_common_1.auditBy("be-stub"),
|
|
117
|
+
bucketName: bucket.bucketName
|
|
118
|
+
};
|
|
119
|
+
if (_file.public)
|
|
120
|
+
instance.public = _file.public;
|
|
121
|
+
if (_file.metadata)
|
|
122
|
+
instance.metadata = _file.metadata;
|
|
123
|
+
const temp = yield UploaderTempFileModule_1.UploaderTempFileModule.upsert(instance);
|
|
124
|
+
const file = yield bucket.getFile(temp.path);
|
|
125
|
+
const url = yield file.getWriteSecuredUrl(_file.mimeType, ts_common_1.Hour);
|
|
126
|
+
return {
|
|
127
|
+
secureUrl: url.securedUrl,
|
|
128
|
+
tempDoc: temp
|
|
129
|
+
};
|
|
130
|
+
})));
|
|
241
131
|
});
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
}(ts_common_1.Module));
|
|
132
|
+
}
|
|
133
|
+
}
|
|
245
134
|
exports.UploaderModule_Class = UploaderModule_Class;
|
|
246
135
|
exports.UploaderModule = new UploaderModule_Class();
|
|
247
136
|
//# sourceMappingURL=UploaderModule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UploaderModule.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/UploaderModule.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UploaderModule.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/UploaderModule.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,4DAOsC;AACtC,iEAK6C;AAC7C,8CAO4B;AAC5B,qEAAgE;AAChE,qEAAyE;AAG5D,QAAA,SAAS,GAAG,YAAY,CAAC;AAStC,MAAa,oBACZ,SAAQ,kBAAc;IADvB;;QAYC,qBAAgB,GAAG,CAAC,SAAyC,EAAE,EAAE;YAChE,IAAI,CAAC,aAAa,GAAG,SAAS,CAAC;QAChC,CAAC,CAAC;QAEK,iBAAY,GAAG,CAAC,CAAS,EAAE,EAAE;YACnC,MAAM,oBAAoB,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;YACnD,IAAI,CAAC,oBAAoB;gBACxB,MAAM,IAAI,0CAA8B,CAAC,8BAA8B,CAAC,EAAE,CAAC,CAAC;YAE7E,OAAO,oBAAoB,CAAC;QAC7B,CAAC,CAAC;QA6CF,iBAAY,GAAG,CAAO,QAAiB,EAAE,EAAE;YAC1C,IAAI,CAAC,QAAQ;gBACZ,MAAM,IAAI,wCAA4B,CAAC,mBAAmB,CAAC,CAAC;YAE7D,IAAI,CAAC,OAAO,CAAC,8BAA8B,QAAQ,EAAE,CAAC,CAAC;YAEvD,MAAM,+CAAsB,CAAC,gBAAgB,CAAC,CAAO,WAAiC,EAAE,EAAE;gBACzF,qFAAqF;gBACrF,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,WAAW,CAAC,+CAAsB,CAAC,UAAU,EAAE,EAAC,KAAK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@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
3
|
exports.UploaderTempFileModule = exports.UploaderTempFileModule_Class = exports.validateName = exports.TEMP_COLLECTION = void 0;
|
|
17
4
|
/*
|
|
@@ -32,32 +19,30 @@ exports.UploaderTempFileModule = exports.UploaderTempFileModule_Class = exports.
|
|
|
32
19
|
* See the License for the specific language governing permissions and
|
|
33
20
|
* limitations under the License.
|
|
34
21
|
*/
|
|
35
|
-
|
|
36
|
-
|
|
22
|
+
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
23
|
+
const backend_1 = require("@intuitionrobotics/db-api-generator/backend");
|
|
37
24
|
exports.TEMP_COLLECTION = "temp-files-upload";
|
|
38
25
|
exports.validateName = ts_common_1.validateRegexp(/^.{3,}$/);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return _super.call(this, exports.TEMP_COLLECTION, UploaderTempFileModule_Class._validator, "temp-files") || this;
|
|
26
|
+
class UploaderTempFileModule_Class extends backend_1.BaseDB_ApiGenerator {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(exports.TEMP_COLLECTION, UploaderTempFileModule_Class._validator, "temp-files");
|
|
43
29
|
}
|
|
44
|
-
|
|
30
|
+
apis(pathPart) {
|
|
45
31
|
return [];
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
_id: backend_1.validateUniqueId,
|
|
49
|
-
name: exports.validateName,
|
|
50
|
-
feId: ts_common_1.validateExists(true),
|
|
51
|
-
mimeType: ts_common_1.validateExists(true),
|
|
52
|
-
key: ts_common_1.validateExists(true),
|
|
53
|
-
path: ts_common_1.validateExists(true),
|
|
54
|
-
_audit: ts_common_1.auditValidator(),
|
|
55
|
-
bucketName: ts_common_1.validateExists(true),
|
|
56
|
-
public: undefined,
|
|
57
|
-
metadata: undefined
|
|
58
|
-
};
|
|
59
|
-
return UploaderTempFileModule_Class;
|
|
60
|
-
}(backend_1.BaseDB_ApiGenerator));
|
|
32
|
+
}
|
|
33
|
+
}
|
|
61
34
|
exports.UploaderTempFileModule_Class = UploaderTempFileModule_Class;
|
|
35
|
+
UploaderTempFileModule_Class._validator = {
|
|
36
|
+
_id: backend_1.validateUniqueId,
|
|
37
|
+
name: exports.validateName,
|
|
38
|
+
feId: ts_common_1.validateExists(true),
|
|
39
|
+
mimeType: ts_common_1.validateExists(true),
|
|
40
|
+
key: ts_common_1.validateExists(true),
|
|
41
|
+
path: ts_common_1.validateExists(true),
|
|
42
|
+
_audit: ts_common_1.auditValidator(),
|
|
43
|
+
bucketName: ts_common_1.validateExists(true),
|
|
44
|
+
public: undefined,
|
|
45
|
+
metadata: undefined
|
|
46
|
+
};
|
|
62
47
|
exports.UploaderTempFileModule = new UploaderTempFileModule_Class();
|
|
63
48
|
//# sourceMappingURL=UploaderTempFileModule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UploaderTempFileModule.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/UploaderTempFileModule.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UploaderTempFileModule.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/UploaderTempFileModule.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,4DAKsC;AAEtC,yEAGqD;AAGxC,QAAA,eAAe,GAAG,mBAAmB,CAAC;AAEtC,QAAA,YAAY,GAAG,0BAAc,CAAC,SAAS,CAAC,CAAC;AAEtD,MAAa,4BACZ,SAAQ,6BAAiC;IAczC;QACC,KAAK,CAAC,uBAAe,EAAE,4BAA4B,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IAC/E,CAAC;IAED,IAAI,CAAC,QAAiB;QACrB,OAAO,EAAE,CAAC;IACX,CAAC;;AArBF,oEAsBC;AApBO,uCAAU,GAAgC;IAChD,GAAG,EAAE,0BAAgB;IACrB,IAAI,EAAE,oBAAY;IAClB,IAAI,EAAE,0BAAc,CAAC,IAAI,CAAC;IAC1B,QAAQ,EAAE,0BAAc,CAAC,IAAI,CAAC;IAC9B,GAAG,EAAE,0BAAc,CAAC,IAAI,CAAC;IACzB,IAAI,EAAE,0BAAc,CAAC,IAAI,CAAC;IAC1B,MAAM,EAAE,0BAAc,EAAE;IACxB,UAAU,EAAE,0BAAc,CAAC,IAAI,CAAC;IAChC,MAAM,EAAE,SAAS;IACjB,QAAQ,EAAE,SAAS;CACnB,CAAC;AAWU,QAAA,sBAAsB,GAAG,IAAI,4BAA4B,EAAE,CAAC"}
|
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __spreadArrays = (this && this.__spreadArrays) || function () {
|
|
3
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
4
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
5
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
6
|
-
r[k] = a[j];
|
|
7
|
-
return r;
|
|
8
|
-
};
|
|
9
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
3
|
exports.Frontend_ModulePack_Uploader = void 0;
|
|
11
4
|
/*
|
|
@@ -26,9 +19,10 @@ exports.Frontend_ModulePack_Uploader = void 0;
|
|
|
26
19
|
* See the License for the specific language governing permissions and
|
|
27
20
|
* limitations under the License.
|
|
28
21
|
*/
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
exports.Frontend_ModulePack_Uploader =
|
|
22
|
+
const UploaderModule_1 = require("../modules/UploaderModule");
|
|
23
|
+
const frontend_1 = require("@intuitionrobotics/push-pub-sub/frontend");
|
|
24
|
+
exports.Frontend_ModulePack_Uploader = [
|
|
25
|
+
...frontend_1.Frontend_ModulePack_PushPubSub,
|
|
32
26
|
UploaderModule_1.UploaderModule
|
|
33
|
-
]
|
|
27
|
+
];
|
|
34
28
|
//# sourceMappingURL=module-pack.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-pack.js","sourceRoot":"","sources":["../../../src/main/app-frontend/core/module-pack.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"module-pack.js","sourceRoot":"","sources":["../../../src/main/app-frontend/core/module-pack.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,8DAAyD;AACzD,uEAAwF;AAE3E,QAAA,4BAA4B,GAAG;IAC3C,GAAG,yCAA8B;IACjC,+BAAc;CACd,CAAC"}
|
|
@@ -1,17 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -21,33 +8,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
9
|
});
|
|
23
10
|
};
|
|
24
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
25
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
26
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
27
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
28
|
-
function step(op) {
|
|
29
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
30
|
-
while (_) try {
|
|
31
|
-
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;
|
|
32
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
33
|
-
switch (op[0]) {
|
|
34
|
-
case 0: case 1: t = op; break;
|
|
35
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
36
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
37
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
38
|
-
default:
|
|
39
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
40
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
41
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
42
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
43
|
-
if (t[2]) _.ops.pop();
|
|
44
|
-
_.trys.pop(); continue;
|
|
45
|
-
}
|
|
46
|
-
op = body.call(thisArg, _);
|
|
47
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
48
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52
12
|
exports.UploaderModule = exports.UploaderModule_Class = void 0;
|
|
53
13
|
/*
|
|
@@ -68,48 +28,38 @@ exports.UploaderModule = exports.UploaderModule_Class = void 0;
|
|
|
68
28
|
* See the License for the specific language governing permissions and
|
|
69
29
|
* limitations under the License.
|
|
70
30
|
*/
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
_this.dispatch_fileStatusChange = new frontend_1.ThunderDispatcher("__onFileStatusChanged");
|
|
81
|
-
return _this;
|
|
31
|
+
const frontend_1 = require("@intuitionrobotics/thunderstorm/frontend");
|
|
32
|
+
const types_1 = require("../../shared/types");
|
|
33
|
+
const frontend_2 = require("@intuitionrobotics/push-pub-sub/frontend");
|
|
34
|
+
const BaseUploaderModule_1 = require("../../shared/modules/BaseUploaderModule");
|
|
35
|
+
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
36
|
+
class UploaderModule_Class extends BaseUploaderModule_1.BaseUploaderModule_Class {
|
|
37
|
+
constructor() {
|
|
38
|
+
super(frontend_1.XhrHttpModule);
|
|
39
|
+
this.dispatch_fileStatusChange = new frontend_1.ThunderDispatcher("__onFileStatusChanged");
|
|
82
40
|
}
|
|
83
|
-
|
|
41
|
+
dispatchFileStatusChange(id) {
|
|
84
42
|
this.dispatch_fileStatusChange.dispatchUI([id]);
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
return this.uploadImpl(files.map((
|
|
43
|
+
super.dispatchFileStatusChange(id);
|
|
44
|
+
}
|
|
45
|
+
upload(files, key, _public) {
|
|
46
|
+
return this.uploadImpl(files.map((file => {
|
|
89
47
|
return {
|
|
90
48
|
name: file.name,
|
|
91
49
|
mimeType: file.type,
|
|
92
|
-
key
|
|
93
|
-
file
|
|
50
|
+
key,
|
|
51
|
+
file,
|
|
94
52
|
public: _public
|
|
95
53
|
};
|
|
96
54
|
})));
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
case 0:
|
|
103
|
-
frontend_2.PushPubSubModule.subscribeMulti(toSubscribe.map(function (r) { return ({ pushKey: types_1.fileUploadedKey, props: { feId: r.tempDoc.feId } }); }));
|
|
104
|
-
return [4 /*yield*/, ts_common_1.timeout(ts_common_1.Second)];
|
|
105
|
-
case 1:
|
|
106
|
-
_a.sent();
|
|
107
|
-
return [2 /*return*/];
|
|
108
|
-
}
|
|
109
|
-
});
|
|
55
|
+
}
|
|
56
|
+
subscribeToPush(toSubscribe) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
frontend_2.PushPubSubModule.subscribeMulti(toSubscribe.map(r => ({ pushKey: types_1.fileUploadedKey, props: { feId: r.tempDoc.feId } })));
|
|
59
|
+
yield ts_common_1.timeout(ts_common_1.Second);
|
|
110
60
|
});
|
|
111
|
-
}
|
|
112
|
-
|
|
61
|
+
}
|
|
62
|
+
__onMessageReceived(notification) {
|
|
113
63
|
var _a, _b;
|
|
114
64
|
this.logInfo("Message received from service worker", notification.pushKey, notification.props, notification.data);
|
|
115
65
|
if (notification.pushKey !== types_1.fileUploadedKey)
|
|
@@ -123,9 +73,8 @@ var UploaderModule_Class = /** @class */ (function (_super) {
|
|
|
123
73
|
break;
|
|
124
74
|
}
|
|
125
75
|
frontend_2.PushPubSubModule.unsubscribe({ pushKey: types_1.fileUploadedKey, props: notification.props });
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
}(BaseUploaderModule_1.BaseUploaderModule_Class));
|
|
76
|
+
}
|
|
77
|
+
}
|
|
129
78
|
exports.UploaderModule_Class = UploaderModule_Class;
|
|
130
79
|
exports.UploaderModule = new UploaderModule_Class();
|
|
131
80
|
//# sourceMappingURL=UploaderModule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UploaderModule.js","sourceRoot":"","sources":["../../../src/main/app-frontend/modules/UploaderModule.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UploaderModule.js","sourceRoot":"","sources":["../../../src/main/app-frontend/modules/UploaderModule.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,uEAIkD;AAClD,8CAM4B;AAC5B,uEAGkD;AAClD,gFAIiD;AAEjD,4DAGsC;AAEtC,MAAa,oBACZ,SAAQ,6CAA6C;IAKrD;QACC,KAAK,CAAC,wBAAa,CAAC,CAAC;QAHH,8BAAyB,GAAG,IAAI,4BAAiB,CAA+C,uBAAuB,CAAC,CAAC;IAI5I,CAAC;IAES,wBAAwB,CAAC,EAAW;QAC7C,IAAI,CAAC,yBAAyB,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAChD,KAAK,CAAC,wBAAwB,CAAC,EAAE,CAAC,CAAC;IACpC,CAAC;IAED,MAAM,CAAC,KAAa,EAAE,GAAY,EAAE,OAAiB;QACpD,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE;YACxC,OAAO;gBACN,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,QAAQ,EAAE,IAAI,CAAC,IAAI;gBACnB,GAAG;gBACH,IAAI;gBACJ,MAAM,EAAE,OAAO;aACf,CAAC;QACH,CAAC,CAAC,CAAC,CAAC,CAAC;IACN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