@webda/gcp 2.0.0-beta.1 → 2.0.0
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/lib/index.d.ts +4 -1
- package/lib/index.js +4 -17
- package/lib/index.js.map +1 -1
- package/lib/index.spec.d.ts +1 -1
- package/lib/index.spec.js +4 -22
- package/lib/index.spec.js.map +1 -1
- package/lib/services/firestore.d.ts +1 -1
- package/lib/services/firestore.js +207 -255
- package/lib/services/firestore.js.map +1 -1
- package/lib/services/firestore.spec.js +132 -169
- package/lib/services/firestore.spec.js.map +1 -1
- package/lib/services/index.d.ts +1 -1
- package/lib/services/index.js +1 -17
- package/lib/services/index.js.map +1 -1
- package/lib/services/pubsub.d.ts +1 -1
- package/lib/services/pubsub.js +19 -39
- package/lib/services/pubsub.js.map +1 -1
- package/lib/services/pubsub.spec.js +45 -58
- package/lib/services/pubsub.spec.js.map +1 -1
- package/lib/services/queue.d.ts +1 -1
- package/lib/services/queue.js +63 -89
- package/lib/services/queue.js.map +1 -1
- package/lib/services/queue.spec.js +75 -92
- package/lib/services/queue.spec.js.map +1 -1
- package/lib/services/storage.d.ts +2 -0
- package/lib/services/storage.js +93 -126
- package/lib/services/storage.js.map +1 -1
- package/lib/services/storage.spec.js +113 -169
- package/lib/services/storage.spec.js.map +1 -1
- package/package.json +14 -11
- package/webda.module.json +216 -74
|
@@ -1,61 +1,30 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
6
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
const storage_1 = require("@google-cloud/storage");
|
|
19
|
-
const mocha_1 = require("@testdeck/mocha");
|
|
20
|
-
const binary_spec_1 = require("@webda/core/lib/services/binary.spec");
|
|
21
|
-
const assert = require("assert");
|
|
22
|
-
const path = require("path");
|
|
23
|
-
const sinon = require("sinon");
|
|
7
|
+
import { Storage as GCS } from "@google-cloud/storage";
|
|
8
|
+
import { suite, test } from "@testdeck/mocha";
|
|
9
|
+
import { BinaryTest } from "@webda/core/lib/services/binary.spec.js";
|
|
10
|
+
import * as assert from "assert";
|
|
11
|
+
import * as path from "path";
|
|
12
|
+
import * as sinon from "sinon";
|
|
13
|
+
import { getCommonJS } from "@webda/core";
|
|
14
|
+
const { __dirname } = getCommonJS(import.meta.url);
|
|
24
15
|
class MockFile {
|
|
25
16
|
constructor(path) { }
|
|
26
|
-
delete() {
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
setMetadata() {
|
|
39
|
-
return __awaiter(this, void 0, void 0, function* () { });
|
|
40
|
-
}
|
|
41
|
-
createWriteStream() {
|
|
42
|
-
return __awaiter(this, void 0, void 0, function* () { });
|
|
43
|
-
}
|
|
44
|
-
getSignedUrl() {
|
|
45
|
-
return __awaiter(this, void 0, void 0, function* () { });
|
|
46
|
-
}
|
|
47
|
-
publicUrl() {
|
|
48
|
-
return __awaiter(this, void 0, void 0, function* () { });
|
|
49
|
-
}
|
|
50
|
-
getMetadata() {
|
|
51
|
-
return __awaiter(this, void 0, void 0, function* () { });
|
|
52
|
-
}
|
|
53
|
-
createReadStream() {
|
|
54
|
-
return __awaiter(this, void 0, void 0, function* () { });
|
|
55
|
-
}
|
|
56
|
-
move() {
|
|
57
|
-
return __awaiter(this, void 0, void 0, function* () { });
|
|
58
|
-
}
|
|
17
|
+
async delete() { }
|
|
18
|
+
async getFiles() { }
|
|
19
|
+
async exists() { }
|
|
20
|
+
async save() { }
|
|
21
|
+
async setMetadata() { }
|
|
22
|
+
async createWriteStream() { }
|
|
23
|
+
async getSignedUrl() { }
|
|
24
|
+
async publicUrl() { }
|
|
25
|
+
async getMetadata() { }
|
|
26
|
+
async createReadStream() { }
|
|
27
|
+
async move() { }
|
|
59
28
|
}
|
|
60
29
|
class MockBucket {
|
|
61
30
|
file(path) {
|
|
@@ -63,151 +32,126 @@ class MockBucket {
|
|
|
63
32
|
}
|
|
64
33
|
}
|
|
65
34
|
const BUCKET = "webda-dev";
|
|
66
|
-
let StorageTest = class StorageTest extends
|
|
67
|
-
before() {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
// Prepare for Mocked Version
|
|
78
|
-
if (!process.env.NO_MOCK && false) {
|
|
79
|
-
sinon.stub(this.getBinary(), "getStorageBucket").callsFake(() => {
|
|
80
|
-
return new MockBucket();
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
after() {
|
|
86
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
87
|
-
yield this.cleanData();
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
install() {
|
|
91
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
92
|
-
var storage = new storage_1.Storage();
|
|
93
|
-
try {
|
|
94
|
-
let [metadata] = yield storage.bucket(BUCKET).getMetadata();
|
|
95
|
-
if (!metadata) {
|
|
96
|
-
yield storage.createBucket(BUCKET, { location: "US-WEST2", storageClass: "COLDLINE" });
|
|
97
|
-
yield storage.bucket(BUCKET).getMetadata();
|
|
98
|
-
}
|
|
99
|
-
//this.webda.log("INFO", `Google cloud storage bucket '${BUCKET}' exists`);
|
|
100
|
-
}
|
|
101
|
-
catch (e) {
|
|
102
|
-
this.webda.log("ERROR", `Google cloud storage error (${e.message})`);
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
cleanData() {
|
|
107
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
-
var storage = new storage_1.Storage();
|
|
109
|
-
const [files] = yield storage.bucket(BUCKET).getFiles({
|
|
110
|
-
prefix: this.prefix,
|
|
35
|
+
let StorageTest = class StorageTest extends BinaryTest {
|
|
36
|
+
async before() {
|
|
37
|
+
this.buildWebda();
|
|
38
|
+
await this.install();
|
|
39
|
+
await super.before();
|
|
40
|
+
this.prefix = this.getBinary().getWebda().getUuid();
|
|
41
|
+
this.getBinary().getParameters().prefix = this.prefix;
|
|
42
|
+
// Prepare for Mocked Version
|
|
43
|
+
if (!process.env.NO_MOCK && false) {
|
|
44
|
+
sinon.stub(this.getBinary(), "getStorageBucket").callsFake(() => {
|
|
45
|
+
return new MockBucket();
|
|
111
46
|
});
|
|
112
|
-
|
|
113
|
-
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
async after() {
|
|
50
|
+
await this.cleanData();
|
|
51
|
+
}
|
|
52
|
+
async install() {
|
|
53
|
+
var storage = new GCS();
|
|
54
|
+
try {
|
|
55
|
+
let [metadata] = await storage.bucket(BUCKET).getMetadata();
|
|
56
|
+
if (!metadata) {
|
|
57
|
+
await storage.createBucket(BUCKET, { location: "US-WEST2", storageClass: "COLDLINE" });
|
|
58
|
+
await storage.bucket(BUCKET).getMetadata();
|
|
114
59
|
}
|
|
60
|
+
//this.webda.log("INFO", `Google cloud storage bucket '${BUCKET}' exists`);
|
|
61
|
+
}
|
|
62
|
+
catch (e) {
|
|
63
|
+
this.webda.log("ERROR", `Google cloud storage error (${e.message})`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
async cleanData() {
|
|
67
|
+
var storage = new GCS();
|
|
68
|
+
const [files] = await storage.bucket(BUCKET).getFiles({
|
|
69
|
+
prefix: this.prefix,
|
|
115
70
|
});
|
|
71
|
+
for (let file of files) {
|
|
72
|
+
await file.delete();
|
|
73
|
+
}
|
|
116
74
|
}
|
|
117
75
|
// Override getNotFound as exception is raised after
|
|
118
76
|
// @test
|
|
119
77
|
// async getNotFound() {}
|
|
120
|
-
putObject() {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
assert.deepStrictEqual((yield getFile.getMetadata())[0].metadata, { meta1: "meta1" });
|
|
127
|
-
});
|
|
78
|
+
async putObject() {
|
|
79
|
+
const body = `RAW Body: ${new Date()}`;
|
|
80
|
+
const name = `${this.prefix}/plop/test`;
|
|
81
|
+
await this.getBinary().putObject(name, Buffer.from(body), { meta1: "meta1" }, BUCKET);
|
|
82
|
+
let getFile = this.getBinary().getStorageBucket().file(name);
|
|
83
|
+
assert.deepStrictEqual((await getFile.getMetadata())[0].metadata, { meta1: "meta1" });
|
|
128
84
|
}
|
|
129
85
|
// Override getNotFound as exception is raised after
|
|
130
|
-
getNotFound() {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
yield executor.execute(ctx);
|
|
154
|
-
assert.ok(ctx.getResponseHeaders().Location === undefined);
|
|
155
|
-
assert.notStrictEqual(JSON.parse(ctx.getResponseBody()).Location, undefined);
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
cascadeDelete() {
|
|
159
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
160
|
-
let stubDelete = sinon.stub(this.getBinary(), "_cleanUsage").callsFake(() => {
|
|
161
|
-
throw new Error();
|
|
162
|
-
});
|
|
163
|
-
try {
|
|
164
|
-
// @ts-ignore
|
|
165
|
-
yield this.getBinary().cascadeDelete({ hash: "pp" }, "pp");
|
|
166
|
-
}
|
|
167
|
-
finally {
|
|
168
|
-
stubDelete.restore();
|
|
169
|
-
}
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
defaultGCS() {
|
|
173
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
174
|
-
let { user1, ctx } = yield this.setupDefault();
|
|
175
|
-
// COV for double
|
|
176
|
-
const binary = this.getBinary();
|
|
177
|
-
const from = `${this.prefix}/rawAccess`;
|
|
178
|
-
const to = `${this.prefix}/movedAccess`;
|
|
179
|
-
yield binary.putObject(from, path.join(__dirname, "..", "..", "test", "Dockerfile.txt"));
|
|
180
|
-
yield binary.moveObject({ key: from }, { key: to });
|
|
181
|
-
assert.deepStrictEqual(binary.getSignedUrlHeaders(), {});
|
|
182
|
-
const meta = yield binary.getMeta({ bucket: "webda-dev", key: to });
|
|
183
|
-
assert.deepStrictEqual(meta, { size: 311, contentType: "text/plain" });
|
|
184
|
-
assert.ok(/https:\/\/storage\.googleapis\.com\/webda-dev\/webda-dev/.exec(yield binary.getPublicUrl({ key: "webda-dev" })));
|
|
185
|
-
yield binary.deleteObject({ key: to });
|
|
86
|
+
async getNotFound() { }
|
|
87
|
+
async httpGetError() {
|
|
88
|
+
// GET is not through classic binary
|
|
89
|
+
// Skip it
|
|
90
|
+
}
|
|
91
|
+
async redirectUrl() {
|
|
92
|
+
let { user1, ctx } = await this.setupDefault();
|
|
93
|
+
// Making sure we are redirected on GET
|
|
94
|
+
let executor = this.getExecutor(ctx, "test.webda.io", "GET", `/binary/users/${user1.getUuid()}/images/0`, {});
|
|
95
|
+
await executor.execute(ctx);
|
|
96
|
+
assert.ok(ctx.getResponseHeaders().Location !== undefined);
|
|
97
|
+
}
|
|
98
|
+
async redirectUrlInfo() {
|
|
99
|
+
let { user1, ctx } = await this.setupDefault();
|
|
100
|
+
// Making sure we are redirected on GET
|
|
101
|
+
let executor = this.getExecutor(ctx, "test.webda.io", "GET", `/binary/users/${user1.getUuid()}/images/0/url`, {});
|
|
102
|
+
await executor.execute(ctx);
|
|
103
|
+
assert.ok(ctx.getResponseHeaders().Location === undefined);
|
|
104
|
+
assert.notStrictEqual(JSON.parse(ctx.getResponseBody()).Location, undefined);
|
|
105
|
+
}
|
|
106
|
+
async cascadeDelete() {
|
|
107
|
+
let stubDelete = sinon.stub(this.getBinary(), "_cleanUsage").callsFake(() => {
|
|
108
|
+
throw new Error();
|
|
186
109
|
});
|
|
110
|
+
try {
|
|
111
|
+
// @ts-ignore
|
|
112
|
+
await this.getBinary().cascadeDelete({ hash: "pp" }, "pp");
|
|
113
|
+
}
|
|
114
|
+
finally {
|
|
115
|
+
stubDelete.restore();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
async defaultGCS() {
|
|
119
|
+
let { user1, ctx } = await this.setupDefault();
|
|
120
|
+
// COV for double
|
|
121
|
+
const binary = this.getBinary();
|
|
122
|
+
const from = `${this.prefix}/rawAccess`;
|
|
123
|
+
const to = `${this.prefix}/movedAccess`;
|
|
124
|
+
await binary.putObject(from, path.join(__dirname, "..", "..", "test", "Dockerfile.txt"));
|
|
125
|
+
await binary.moveObject({ key: from }, { key: to });
|
|
126
|
+
assert.deepStrictEqual(binary.getSignedUrlHeaders(), {});
|
|
127
|
+
const meta = await binary.getMeta({ bucket: "webda-dev", key: to });
|
|
128
|
+
assert.deepStrictEqual(meta, { size: 311, contentType: "text/plain" });
|
|
129
|
+
assert.ok(/https:\/\/storage\.googleapis\.com\/webda-dev\/webda-dev/.exec(await binary.getPublicUrl({ key: "webda-dev" })));
|
|
130
|
+
await binary.deleteObject({ key: to });
|
|
187
131
|
}
|
|
188
132
|
};
|
|
189
133
|
__decorate([
|
|
190
|
-
|
|
134
|
+
test
|
|
191
135
|
], StorageTest.prototype, "putObject", null);
|
|
192
136
|
__decorate([
|
|
193
|
-
|
|
137
|
+
test
|
|
194
138
|
], StorageTest.prototype, "getNotFound", null);
|
|
195
139
|
__decorate([
|
|
196
|
-
|
|
140
|
+
test
|
|
197
141
|
], StorageTest.prototype, "httpGetError", null);
|
|
198
142
|
__decorate([
|
|
199
|
-
|
|
143
|
+
test
|
|
200
144
|
], StorageTest.prototype, "redirectUrl", null);
|
|
201
145
|
__decorate([
|
|
202
|
-
|
|
146
|
+
test
|
|
203
147
|
], StorageTest.prototype, "redirectUrlInfo", null);
|
|
204
148
|
__decorate([
|
|
205
|
-
|
|
149
|
+
test
|
|
206
150
|
], StorageTest.prototype, "cascadeDelete", null);
|
|
207
151
|
__decorate([
|
|
208
|
-
|
|
152
|
+
test
|
|
209
153
|
], StorageTest.prototype, "defaultGCS", null);
|
|
210
154
|
StorageTest = __decorate([
|
|
211
|
-
|
|
155
|
+
suite
|
|
212
156
|
], StorageTest);
|
|
213
157
|
//# sourceMappingURL=storage.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.spec.js","sourceRoot":"","sources":["../../src/services/storage.spec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"storage.spec.js","sourceRoot":"","sources":["../../src/services/storage.spec.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OA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AAM,MAAM,CAAC,UAAU,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;QACpD,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,mBAAmB,EAAE,EAAE,EAAE,CAAC,CAAC;QACzD,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;QACpE,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC,CAAC;QACvE,MAAM,CAAC,EAAE,CACP,0DAA0D,CAAC,IAAI,CAAC,MAAM,MAAM,CAAC,YAAY,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,CAAC,CAAC,CACjH,CAAC;QACF,MAAM,MAAM,CAAC,YAAY,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;IACzC,CAAC;CACF,CAAA;AApEC;IADC,IAAI;4CAQJ;AAID;IADC,IAAI;8CACiB;AAGtB;IADC,IAAI;+CAIJ;AAGD;IADC,IAAI;8CAOJ;AAGD;IADC,IAAI;kDAQJ;AAGD;IADC,IAAI;gDAWJ;AAGD;IADC,IAAI;6CAgBJ;AApHG,WAAW;IADhB,KAAK;GACA,WAAW,CAqHhB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webda/gcp",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Webda GCP Services implementation",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"pretest": "npm run build",
|
|
9
9
|
"lint": "prettier --check src/**/*",
|
|
10
10
|
"lint:fix": "prettier --write src/**/*",
|
|
11
|
-
"test": "
|
|
11
|
+
"test": "c8 mocha --recursive --exit --timeout=100000 src/**/*.spec.ts"
|
|
12
12
|
},
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
@@ -31,12 +31,11 @@
|
|
|
31
31
|
"homepage": "https://github.com/loopingz/webda.io#readme",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@google-cloud/firestore": "^5.0.2",
|
|
34
|
-
"@google-cloud/pubsub": "^
|
|
35
|
-
"@google-cloud/storage": "~
|
|
36
|
-
"@webda/core": "^2.0.0
|
|
34
|
+
"@google-cloud/pubsub": "^3.0.0",
|
|
35
|
+
"@google-cloud/storage": "~6.1.0",
|
|
36
|
+
"@webda/core": "^2.0.0"
|
|
37
37
|
},
|
|
38
|
-
"
|
|
39
|
-
"extends": "@istanbuljs/nyc-config-typescript",
|
|
38
|
+
"c8": {
|
|
40
39
|
"report-dir": "./reports",
|
|
41
40
|
"reporter": [
|
|
42
41
|
"html",
|
|
@@ -54,10 +53,14 @@
|
|
|
54
53
|
},
|
|
55
54
|
"devDependencies": {
|
|
56
55
|
"@testdeck/mocha": "^0.2.0",
|
|
57
|
-
"@types/node": "14.
|
|
58
|
-
"@webda/async": "^2.0.0
|
|
59
|
-
"@webda/shell": "^2.0.0
|
|
56
|
+
"@types/node": "14.6.0",
|
|
57
|
+
"@webda/async": "^2.0.0",
|
|
58
|
+
"@webda/shell": "^2.0.0",
|
|
60
59
|
"sinon": "^14.0.0"
|
|
61
60
|
},
|
|
62
|
-
"
|
|
61
|
+
"type": "module",
|
|
62
|
+
"engines": {
|
|
63
|
+
"node": ">=14.6.0"
|
|
64
|
+
},
|
|
65
|
+
"gitHead": "5764db57432f146c84b2e8f52cf49fb5ded3af29"
|
|
63
66
|
}
|