@pi-r/gcp 0.8.0 → 0.8.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.
- package/client/index.js +10 -14
- package/package.json +29 -29
package/client/index.js
CHANGED
|
@@ -552,13 +552,9 @@ async function executeBatchQuery(credential, batch, sessionKey) {
|
|
|
552
552
|
.then(() => {
|
|
553
553
|
resolve();
|
|
554
554
|
})
|
|
555
|
-
.catch(
|
|
556
|
-
reject(error);
|
|
557
|
-
});
|
|
555
|
+
.catch(reject);
|
|
558
556
|
})
|
|
559
|
-
.catch(
|
|
560
|
-
reject(error);
|
|
561
|
-
});
|
|
557
|
+
.catch(reject);
|
|
562
558
|
}
|
|
563
559
|
});
|
|
564
560
|
});
|
|
@@ -609,7 +605,9 @@ async function executeBatchQuery(credential, batch, sessionKey) {
|
|
|
609
605
|
rows = [];
|
|
610
606
|
await new Promise((resolve, reject) => {
|
|
611
607
|
db.createReadStream(options)
|
|
612
|
-
.on('data', row =>
|
|
608
|
+
.on('data', row => {
|
|
609
|
+
rows.push(getRowData(row.id, row.data));
|
|
610
|
+
})
|
|
613
611
|
.on('error', reject)
|
|
614
612
|
.on('end', resolve);
|
|
615
613
|
});
|
|
@@ -713,19 +711,17 @@ async function executeBatchQuery(credential, batch, sessionKey) {
|
|
|
713
711
|
db.runQuery(task.select('__key__'), options).then(entities => {
|
|
714
712
|
if ((0, types_1.isArray)(entities)) {
|
|
715
713
|
const items = entities.map((entity) => db.key(entity[db.KEY]));
|
|
716
|
-
db.save({ key: items, data: update })
|
|
714
|
+
db.save({ key: items, data: update })
|
|
715
|
+
.then(() => {
|
|
717
716
|
resolve();
|
|
718
|
-
})
|
|
719
|
-
reject
|
|
720
|
-
});
|
|
717
|
+
})
|
|
718
|
+
.catch(reject);
|
|
721
719
|
}
|
|
722
720
|
else {
|
|
723
721
|
resolve();
|
|
724
722
|
}
|
|
725
723
|
})
|
|
726
|
-
.catch(
|
|
727
|
-
reject(err);
|
|
728
|
-
});
|
|
724
|
+
.catch(reject);
|
|
729
725
|
});
|
|
730
726
|
}
|
|
731
727
|
[rows] = await db.runQuery(task, options);
|
package/package.json
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@pi-r/gcp",
|
|
3
|
-
"version": "0.8.
|
|
4
|
-
"description": "Google (GCP) cloud functions for E-mc.",
|
|
5
|
-
"main": "client/index.js",
|
|
6
|
-
"publishConfig": {
|
|
7
|
-
"access": "public"
|
|
8
|
-
},
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/anpham6/pi-r.git",
|
|
12
|
-
"directory": "src/cloud/gcp"
|
|
13
|
-
},
|
|
14
|
-
"keywords": [
|
|
15
|
-
"squared",
|
|
16
|
-
"e-mc",
|
|
17
|
-
"squared-functions"
|
|
18
|
-
],
|
|
19
|
-
"author": "An Pham <anpham6@gmail.com>",
|
|
20
|
-
"license": "MIT",
|
|
21
|
-
"homepage": "https://github.com/anpham6/pi-r#readme",
|
|
22
|
-
"dependencies": {
|
|
23
|
-
"@e-mc/cloud": "^0.10.
|
|
24
|
-
"@e-mc/module": "^0.10.
|
|
25
|
-
"@e-mc/types": "^0.10.
|
|
26
|
-
"@google-cloud/firestore": "^7.
|
|
27
|
-
"@google-cloud/storage": "^7.
|
|
28
|
-
}
|
|
29
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@pi-r/gcp",
|
|
3
|
+
"version": "0.8.2",
|
|
4
|
+
"description": "Google (GCP) cloud functions for E-mc.",
|
|
5
|
+
"main": "client/index.js",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/anpham6/pi-r.git",
|
|
12
|
+
"directory": "src/cloud/gcp"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"squared",
|
|
16
|
+
"e-mc",
|
|
17
|
+
"squared-functions"
|
|
18
|
+
],
|
|
19
|
+
"author": "An Pham <anpham6@gmail.com>",
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"homepage": "https://github.com/anpham6/pi-r#readme",
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@e-mc/cloud": "^0.10.2",
|
|
24
|
+
"@e-mc/module": "^0.10.2",
|
|
25
|
+
"@e-mc/types": "^0.10.2",
|
|
26
|
+
"@google-cloud/firestore": "^7.10.0",
|
|
27
|
+
"@google-cloud/storage": "^7.13.0"
|
|
28
|
+
}
|
|
29
|
+
}
|