@milaboratories/pl-drivers 1.5.58 → 1.5.60
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/pl-drivers",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.60",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=20"
|
|
6
6
|
},
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"undici": "~7.5.0",
|
|
32
32
|
"zod": "~3.23.8",
|
|
33
33
|
"upath": "^2.0.1",
|
|
34
|
-
"@milaboratories/
|
|
35
|
-
"@milaboratories/
|
|
36
|
-
"@milaboratories/
|
|
37
|
-
"@milaboratories/
|
|
38
|
-
"@milaboratories/pl-model-common": "^1.15.
|
|
34
|
+
"@milaboratories/pl-tree": "^1.6.2",
|
|
35
|
+
"@milaboratories/pl-client": "^2.9.1",
|
|
36
|
+
"@milaboratories/ts-helpers": "^1.3.0",
|
|
37
|
+
"@milaboratories/computable": "^2.4.8",
|
|
38
|
+
"@milaboratories/pl-model-common": "^1.15.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"eslint": "^9.25.1",
|
package/src/drivers/ls.test.ts
CHANGED
|
@@ -39,6 +39,8 @@ test('should ok when list files from remote storage in ls driver', async () => {
|
|
|
39
39
|
throw Error();
|
|
40
40
|
});
|
|
41
41
|
|
|
42
|
+
const universalPath = (path: string) => path.startsWith('/') ? path.slice(1) : path;
|
|
43
|
+
|
|
42
44
|
const storages = await driver.getStorageList();
|
|
43
45
|
const library = storages.find((se) => se.name == env.libraryStorage)!.handle;
|
|
44
46
|
|
|
@@ -48,19 +50,20 @@ test('should ok when list files from remote storage in ls driver', async () => {
|
|
|
48
50
|
const testDir = topLevelDir.entries.find((d) => d.name.includes('ls_dir_structure'));
|
|
49
51
|
expect(testDir).toBeDefined();
|
|
50
52
|
expect(testDir!.type).toEqual('dir');
|
|
51
|
-
|
|
53
|
+
|
|
54
|
+
expect(universalPath(testDir!.fullPath)).toEqual('ls_dir_structure_test');
|
|
52
55
|
expect(testDir!.name).toEqual('ls_dir_structure_test');
|
|
53
56
|
|
|
54
57
|
const secondDirs = await driver.listFiles(library, testDir!.fullPath);
|
|
55
58
|
expect(secondDirs.entries).toHaveLength(2);
|
|
56
59
|
expect(secondDirs.entries[0].type).toEqual('dir');
|
|
57
|
-
expect(secondDirs.entries[0].fullPath).toEqual('
|
|
60
|
+
expect(universalPath(secondDirs.entries[0].fullPath)).toEqual('ls_dir_structure_test/abc');
|
|
58
61
|
expect(secondDirs.entries[0].name).toEqual('abc');
|
|
59
62
|
|
|
60
63
|
const f = await driver.listFiles(library, secondDirs.entries[0].fullPath);
|
|
61
64
|
expect(f.entries).toHaveLength(1);
|
|
62
65
|
expect(f.entries[0].type).toEqual('file');
|
|
63
|
-
expect(f.entries[0].fullPath).toEqual('
|
|
66
|
+
expect(universalPath(f.entries[0].fullPath)).toEqual('ls_dir_structure_test/abc/42.txt');
|
|
64
67
|
expect(f.entries[0].name).toEqual('42.txt');
|
|
65
68
|
expect((f.entries[0] as any).handle).toContain('index://index/');
|
|
66
69
|
});
|
|
@@ -227,7 +227,7 @@ test('index a blob', async () => {
|
|
|
227
227
|
await withTest(async ({ client, uploader }: TestArg) => {
|
|
228
228
|
const uploadId = await createBlobIndex(
|
|
229
229
|
client,
|
|
230
|
-
'
|
|
230
|
+
'another_answer_to_the_ultimate_question.txt',
|
|
231
231
|
env.libraryStorage,
|
|
232
232
|
);
|
|
233
233
|
const handleRes = await getSnapshot(client, uploadId);
|