@lobb-js/lobb-ext-storage 0.12.4 → 0.13.1
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/README.md +1 -1
- package/dist/lib/components/explorerNotSupported.svelte +1 -1
- package/dist/lib/components/foreignKeyComponent.svelte +1 -1
- package/extensions/storage/index.ts +0 -2
- package/extensions/storage/studio/lib/components/explorerNotSupported.svelte +1 -1
- package/extensions/storage/studio/lib/components/foreignKeyComponent.svelte +1 -1
- package/extensions/storage/workflows/index.ts +8 -0
- package/package.json +4 -7
- package/dist/tests/fileManager.spec.d.ts +0 -1
- package/dist/tests/fileManager.spec.js +0 -18
- package/dist/tests/package.json +0 -1
- package/dist/tests/playwright.config.cjs +0 -27
- package/dist/tests/playwright.config.d.cts +0 -2
- package/extensions/storage/studio/tests/fileManager.spec.ts +0 -23
- package/extensions/storage/studio/tests/package.json +0 -1
- package/extensions/storage/studio/tests/playwright.config.cjs +0 -27
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
# @lobb-js/lobb-ext-storage
|
|
1
|
+
# @lobb-js/lobb-ext-storage
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { FolderX } from "lucide-svelte";
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
|
-
<div class="border rounded-md p-4 bg-muted
|
|
5
|
+
<div class="border rounded-md p-4 bg-muted-soft flex items-center flex-col text-muted-foreground gap-2">
|
|
6
6
|
<FolderX size={35} />
|
|
7
7
|
<div class="flex flex-col justify-center items-center">
|
|
8
8
|
<div class="text-sm font-bold">Storage file system is not supported here</div>
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
}
|
|
29
29
|
</script>
|
|
30
30
|
|
|
31
|
-
<button onclick={handleClick} class="flex flex-col items-center gap-2 w-full border p-4 rounded-md bg-muted
|
|
31
|
+
<button onclick={handleClick} class="flex flex-col items-center gap-2 w-full border p-4 rounded-md bg-muted-soft">
|
|
32
32
|
{#if value}
|
|
33
33
|
<FileIcon entry={value} {utils} />
|
|
34
34
|
{:else}
|
|
@@ -4,7 +4,6 @@ export type { StorageFsCreateOne, StorageFsFindOne } from "./types.ts";
|
|
|
4
4
|
|
|
5
5
|
import packageJson from "../../package.json" with { type: "json" };
|
|
6
6
|
import { collections } from "./collections/index.ts";
|
|
7
|
-
import { init } from "./init.ts";
|
|
8
7
|
import { meta } from "./meta.ts";
|
|
9
8
|
import { migrations } from "./migrations.ts";
|
|
10
9
|
import { openapi } from "./openapi.ts";
|
|
@@ -15,7 +14,6 @@ export default function storage(extensionConfig: ExtensionConfig): Extension {
|
|
|
15
14
|
version: packageJson.version,
|
|
16
15
|
name: "storage",
|
|
17
16
|
icon: "Folders",
|
|
18
|
-
init: () => init(extensionConfig),
|
|
19
17
|
collections: (_lobb: any) => collections(extensionConfig),
|
|
20
18
|
migrations: migrations,
|
|
21
19
|
meta: meta,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { FolderX } from "lucide-svelte";
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
|
-
<div class="border rounded-md p-4 bg-muted
|
|
5
|
+
<div class="border rounded-md p-4 bg-muted-soft flex items-center flex-col text-muted-foreground gap-2">
|
|
6
6
|
<FolderX size={35} />
|
|
7
7
|
<div class="flex flex-col justify-center items-center">
|
|
8
8
|
<div class="text-sm font-bold">Storage file system is not supported here</div>
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
}
|
|
29
29
|
</script>
|
|
30
30
|
|
|
31
|
-
<button onclick={handleClick} class="flex flex-col items-center gap-2 w-full border p-4 rounded-md bg-muted
|
|
31
|
+
<button onclick={handleClick} class="flex flex-col items-center gap-2 w-full border p-4 rounded-md bg-muted-soft">
|
|
32
32
|
{#if value}
|
|
33
33
|
<FileIcon entry={value} {utils} />
|
|
34
34
|
{:else}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import type { ExtensionConfig } from "../config/extensionConfigSchema.ts";
|
|
2
2
|
import { getControllersWorkflows } from "./controllers.ts";
|
|
3
3
|
import { getServicesWorkflows } from "./services.ts";
|
|
4
|
+
import { init } from "../init.ts";
|
|
4
5
|
|
|
5
6
|
export function getWorkflows(extensionConfig: ExtensionConfig) {
|
|
6
7
|
return [
|
|
8
|
+
{
|
|
9
|
+
name: "storage_init",
|
|
10
|
+
eventName: "core.init",
|
|
11
|
+
handler: async () => {
|
|
12
|
+
await init(extensionConfig);
|
|
13
|
+
},
|
|
14
|
+
},
|
|
7
15
|
...getServicesWorkflows(extensionConfig),
|
|
8
16
|
...getControllersWorkflows(),
|
|
9
17
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobb-js/lobb-ext-storage",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -18,9 +18,8 @@
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
|
-
"test": "bun
|
|
21
|
+
"test": "bun test extensions/storage/tests",
|
|
22
22
|
"test:lobb": "bun test extensions/storage/tests",
|
|
23
|
-
"test:studio": "bun --bun playwright test --config extensions/storage/studio/tests/playwright.config.cjs",
|
|
24
23
|
"dev": "bun run --watch lobb.ts",
|
|
25
24
|
"dev:studio": "vite dev",
|
|
26
25
|
"build": "vite build",
|
|
@@ -28,22 +27,20 @@
|
|
|
28
27
|
"prepare": "svelte-kit sync || echo ''",
|
|
29
28
|
"preview": "vite preview",
|
|
30
29
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
31
|
-
"postinstall": "bun --bun playwright install chromium",
|
|
32
30
|
"prepublishOnly": "lobb-ext-prepublish",
|
|
33
31
|
"postpublish": "lobb-ext-postpublish",
|
|
34
32
|
"package": "svelte-package --input extensions/storage/studio"
|
|
35
33
|
},
|
|
36
34
|
"dependencies": {
|
|
37
|
-
"@lobb-js/core": "^0.
|
|
35
|
+
"@lobb-js/core": "^0.32.1",
|
|
38
36
|
"browser-fs-access": "^0.35.0",
|
|
39
37
|
"hono": "^4.7.0",
|
|
40
38
|
"openapi-types": "^12.1.3",
|
|
41
39
|
"path-browserify": "^1.0.1"
|
|
42
40
|
},
|
|
43
41
|
"devDependencies": {
|
|
44
|
-
"@lobb-js/studio": "^0.
|
|
42
|
+
"@lobb-js/studio": "^0.29.1",
|
|
45
43
|
"@lucide/svelte": "^0.563.1",
|
|
46
|
-
"@playwright/test": "^1.58.2",
|
|
47
44
|
"@sveltejs/adapter-node": "^5.5.4",
|
|
48
45
|
"@sveltejs/kit": "^2.60.1",
|
|
49
46
|
"@sveltejs/package": "^2.5.7",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { test, expect } from "@playwright/test";
|
|
2
|
-
const FILE_MANAGER_URL = "/studio/extensions/storage/file_manager";
|
|
3
|
-
test.describe("File Manager page", () => {
|
|
4
|
-
test.beforeEach(async ({ page }) => {
|
|
5
|
-
await page.goto(FILE_MANAGER_URL);
|
|
6
|
-
});
|
|
7
|
-
test("loads the file manager page", async ({ page }) => {
|
|
8
|
-
await expect(page).toHaveURL(new RegExp(FILE_MANAGER_URL));
|
|
9
|
-
});
|
|
10
|
-
test("shows the file manager nav link in the sidebar", async ({ page }) => {
|
|
11
|
-
await expect(page.locator(`a[href="${FILE_MANAGER_URL}"]`)).toBeVisible();
|
|
12
|
-
});
|
|
13
|
-
test("file manager page is accessible from the nav", async ({ page }) => {
|
|
14
|
-
await page.goto("/studio");
|
|
15
|
-
await page.locator(`a[href="${FILE_MANAGER_URL}"]`).click();
|
|
16
|
-
await expect(page).toHaveURL(new RegExp(FILE_MANAGER_URL));
|
|
17
|
-
});
|
|
18
|
-
});
|
package/dist/tests/package.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"type": "commonjs"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
const { defineConfig, devices } = require("@playwright/test");
|
|
2
|
-
|
|
3
|
-
module.exports = defineConfig({
|
|
4
|
-
testDir: __dirname,
|
|
5
|
-
testMatch: "**/*.spec.ts",
|
|
6
|
-
fullyParallel: true,
|
|
7
|
-
retries: 0,
|
|
8
|
-
expect: { timeout: 15000 },
|
|
9
|
-
use: {
|
|
10
|
-
baseURL: "http://localhost:3000",
|
|
11
|
-
trace: "on-first-retry",
|
|
12
|
-
headless: true,
|
|
13
|
-
},
|
|
14
|
-
projects: [
|
|
15
|
-
{
|
|
16
|
-
name: "chromium",
|
|
17
|
-
use: { ...devices["Desktop Chrome"] },
|
|
18
|
-
},
|
|
19
|
-
],
|
|
20
|
-
// Automatically start the dev server before running tests
|
|
21
|
-
webServer: {
|
|
22
|
-
command: "bun run dev",
|
|
23
|
-
url: "http://localhost:3000/studio",
|
|
24
|
-
reuseExistingServer: true,
|
|
25
|
-
cwd: "../../../../", // packages/storage-ext root
|
|
26
|
-
},
|
|
27
|
-
});
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { test, expect } from "@playwright/test";
|
|
2
|
-
|
|
3
|
-
const FILE_MANAGER_URL = "/studio/extensions/storage/file_manager";
|
|
4
|
-
|
|
5
|
-
test.describe("File Manager page", () => {
|
|
6
|
-
test.beforeEach(async ({ page }) => {
|
|
7
|
-
await page.goto(FILE_MANAGER_URL);
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
test("loads the file manager page", async ({ page }) => {
|
|
11
|
-
await expect(page).toHaveURL(new RegExp(FILE_MANAGER_URL));
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
test("shows the file manager nav link in the sidebar", async ({ page }) => {
|
|
15
|
-
await expect(page.locator(`a[href="${FILE_MANAGER_URL}"]`)).toBeVisible();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
test("file manager page is accessible from the nav", async ({ page }) => {
|
|
19
|
-
await page.goto("/studio");
|
|
20
|
-
await page.locator(`a[href="${FILE_MANAGER_URL}"]`).click();
|
|
21
|
-
await expect(page).toHaveURL(new RegExp(FILE_MANAGER_URL));
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"type": "commonjs"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
const { defineConfig, devices } = require("@playwright/test");
|
|
2
|
-
|
|
3
|
-
module.exports = defineConfig({
|
|
4
|
-
testDir: __dirname,
|
|
5
|
-
testMatch: "**/*.spec.ts",
|
|
6
|
-
fullyParallel: true,
|
|
7
|
-
retries: 0,
|
|
8
|
-
expect: { timeout: 15000 },
|
|
9
|
-
use: {
|
|
10
|
-
baseURL: "http://localhost:3000",
|
|
11
|
-
trace: "on-first-retry",
|
|
12
|
-
headless: true,
|
|
13
|
-
},
|
|
14
|
-
projects: [
|
|
15
|
-
{
|
|
16
|
-
name: "chromium",
|
|
17
|
-
use: { ...devices["Desktop Chrome"] },
|
|
18
|
-
},
|
|
19
|
-
],
|
|
20
|
-
// Automatically start the dev server before running tests
|
|
21
|
-
webServer: {
|
|
22
|
-
command: "bun run dev",
|
|
23
|
-
url: "http://localhost:3000/studio",
|
|
24
|
-
reuseExistingServer: true,
|
|
25
|
-
cwd: "../../../../", // packages/storage-ext root
|
|
26
|
-
},
|
|
27
|
-
});
|