@naturalcycles/cloud-storage-lib 1.6.1 → 1.6.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/cloudStorage.js +3 -3
- package/dist/commonStorage.d.ts +2 -0
- package/package.json +2 -2
- package/src/cloudStorage.ts +3 -3
- package/src/commonStorage.ts +2 -0
package/dist/cloudStorage.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CloudStorage = exports.Storage = void 0;
|
|
4
|
-
const js_lib_1 = require("@naturalcycles/js-lib");
|
|
5
4
|
const storage_1 = require("@google-cloud/storage");
|
|
6
5
|
Object.defineProperty(exports, "Storage", { enumerable: true, get: function () { return storage_1.Storage; } });
|
|
6
|
+
const js_lib_1 = require("@naturalcycles/js-lib");
|
|
7
7
|
const nodejs_lib_1 = require("@naturalcycles/nodejs-lib");
|
|
8
8
|
class CloudStorage {
|
|
9
9
|
/**
|
|
@@ -59,7 +59,7 @@ class CloudStorage {
|
|
|
59
59
|
.bucket(bucketName)
|
|
60
60
|
.getFilesStream({
|
|
61
61
|
prefix,
|
|
62
|
-
maxResults: opt.limit,
|
|
62
|
+
maxResults: opt.limit || undefined,
|
|
63
63
|
})
|
|
64
64
|
.pipe((0, nodejs_lib_1.transformMapSimple)(f => fullPaths ? f.name : (0, js_lib_1._substringAfterLast)(f.name, '/')));
|
|
65
65
|
}
|
|
@@ -69,7 +69,7 @@ class CloudStorage {
|
|
|
69
69
|
.bucket(bucketName)
|
|
70
70
|
.getFilesStream({
|
|
71
71
|
prefix,
|
|
72
|
-
maxResults: opt.limit,
|
|
72
|
+
maxResults: opt.limit || undefined,
|
|
73
73
|
})
|
|
74
74
|
.pipe((0, nodejs_lib_1.transformMap)(async (f) => {
|
|
75
75
|
const [content] = await f.download();
|
package/dist/commonStorage.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"@google-cloud/storage": "^7.0.0",
|
|
8
8
|
"@naturalcycles/db-lib": "^8.25.0",
|
|
9
9
|
"@naturalcycles/js-lib": "^14.41.0",
|
|
10
|
-
"@naturalcycles/nodejs-lib": "^
|
|
10
|
+
"@naturalcycles/nodejs-lib": "^13.1.0"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@naturalcycles/dev-lib": "^13.0.1",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"engines": {
|
|
36
36
|
"node": ">=18.12.0"
|
|
37
37
|
},
|
|
38
|
-
"version": "1.6.
|
|
38
|
+
"version": "1.6.3",
|
|
39
39
|
"description": "",
|
|
40
40
|
"author": "Natural Cycles Team",
|
|
41
41
|
"license": "MIT"
|
package/src/cloudStorage.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Readable, Writable } from 'node:stream'
|
|
2
|
-
import { _substringAfterLast } from '@naturalcycles/js-lib'
|
|
3
2
|
import { File, Storage, StorageOptions } from '@google-cloud/storage'
|
|
3
|
+
import { _substringAfterLast } from '@naturalcycles/js-lib'
|
|
4
4
|
import { ReadableTyped, transformMap, transformMapSimple } from '@naturalcycles/nodejs-lib'
|
|
5
5
|
import { CommonStorage, CommonStorageGetOptions, FileEntry } from './commonStorage'
|
|
6
6
|
import { GCPServiceAccount } from './model'
|
|
@@ -90,7 +90,7 @@ export class CloudStorage implements CommonStorage {
|
|
|
90
90
|
.bucket(bucketName)
|
|
91
91
|
.getFilesStream({
|
|
92
92
|
prefix,
|
|
93
|
-
maxResults: opt.limit,
|
|
93
|
+
maxResults: opt.limit || undefined,
|
|
94
94
|
})
|
|
95
95
|
.pipe(
|
|
96
96
|
transformMapSimple<File, string>(f =>
|
|
@@ -106,7 +106,7 @@ export class CloudStorage implements CommonStorage {
|
|
|
106
106
|
.bucket(bucketName)
|
|
107
107
|
.getFilesStream({
|
|
108
108
|
prefix,
|
|
109
|
-
maxResults: opt.limit,
|
|
109
|
+
maxResults: opt.limit || undefined,
|
|
110
110
|
})
|
|
111
111
|
.pipe(
|
|
112
112
|
transformMap<File, FileEntry>(async f => {
|