@dxos/plugin-wnfs 0.9.0 → 0.9.1-staging.ee54ba693a
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/lib/neutral/WnfsPlugin.mjs +2 -2
- package/dist/lib/neutral/WnfsPlugin.mjs.map +4 -4
- package/dist/lib/neutral/capabilities/index.mjs.map +2 -2
- package/dist/lib/neutral/{chunk-QODCKFTY.mjs → chunk-2WLTMUHV.mjs} +3 -3
- package/dist/lib/neutral/{chunk-QODCKFTY.mjs.map → chunk-2WLTMUHV.mjs.map} +3 -3
- package/dist/lib/neutral/chunk-H2YCLSRI.mjs +47 -0
- package/dist/lib/neutral/chunk-H2YCLSRI.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +2 -2
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/meta.mjs +1 -1
- package/dist/lib/neutral/plugin.mjs +1 -1
- package/dist/lib/neutral/translations.mjs +1 -1
- package/dist/lib/neutral/translations.mjs.map +3 -3
- package/dist/lib/neutral/types/index.mjs +1 -1
- package/dist/types/dx.config.d.ts +28 -0
- package/dist/types/dx.config.d.ts.map +1 -0
- package/dist/types/src/capabilities/backend.d.ts +1 -2
- package/dist/types/src/capabilities/backend.d.ts.map +1 -1
- package/dist/types/src/capabilities/blockstore.d.ts +1 -1
- package/dist/types/src/capabilities/index.d.ts +3 -4
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/url-resolver.d.ts +1 -2
- package/dist/types/src/capabilities/url-resolver.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +32 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/types/WnfsCapabilities.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +33 -0
- package/package.json +28 -27
- package/src/WnfsPlugin.tsx +1 -1
- package/src/capabilities/index.ts +2 -9
- package/src/meta.ts +2 -27
- package/src/translations.ts +1 -1
- package/src/types/WnfsCapabilities.ts +2 -2
- package/dist/lib/neutral/chunk-KUQHRT52.mjs +0 -39
- package/dist/lib/neutral/chunk-KUQHRT52.mjs.map +0 -7
package/dx.config.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Config2 } from '@dxos/app-framework/config';
|
|
6
|
+
import { trim } from '@dxos/util';
|
|
7
|
+
|
|
8
|
+
export default Config2.make({
|
|
9
|
+
plugin: {
|
|
10
|
+
key: 'org.dxos.plugin.wnfs',
|
|
11
|
+
name: 'WNFS',
|
|
12
|
+
author: 'DXOS',
|
|
13
|
+
description: trim`
|
|
14
|
+
Decentralized, end-to-end encrypted file storage for DXOS Composer built on the Web Native File System (WNFS) protocol.
|
|
15
|
+
|
|
16
|
+
WNFS organizes files inside a cryptographic "dark forest" — a content-addressed private file system
|
|
17
|
+
where each write produces a new immutable root CID. Files are stored as IPLD blocks (CIDv1, sha2-256),
|
|
18
|
+
cached locally in IndexedDB, and asynchronously replicated to the DXOS edge blob service as CAR archives.
|
|
19
|
+
Uploads and reads are scoped to a DXOS Space; the forest root CID is persisted atomically on the
|
|
20
|
+
space's ECHO properties so the file system state survives across sessions and devices.
|
|
21
|
+
|
|
22
|
+
The plugin registers as a \`FileCapabilities.Backend\` and \`FileCapabilities.UrlResolver\` so any plugin
|
|
23
|
+
that uses \`plugin-file\` (e.g. \`plugin-gallery\`) can upload files and resolve \`wnfs://\` URLs without
|
|
24
|
+
coupling to the storage implementation. The blockstore automatically queues blocks while offline and
|
|
25
|
+
flushes them when connectivity is restored.
|
|
26
|
+
`,
|
|
27
|
+
icon: { key: 'ph--file-cloud--regular', hue: 'teal' },
|
|
28
|
+
source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-wnfs',
|
|
29
|
+
spec: 'PLUGIN.mdl',
|
|
30
|
+
tags: ['labs'],
|
|
31
|
+
dependsOn: ['org.dxos.plugin.file'],
|
|
32
|
+
},
|
|
33
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-wnfs",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1-staging.ee54ba693a",
|
|
4
4
|
"description": "WNFS file management plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
"types": "dist/types/src/index.d.ts",
|
|
72
72
|
"files": [
|
|
73
73
|
"dist",
|
|
74
|
+
"dx.config.ts",
|
|
74
75
|
"src",
|
|
75
76
|
"PLUGIN.mdl"
|
|
76
77
|
],
|
|
@@ -79,44 +80,44 @@
|
|
|
79
80
|
"blockstore-core": "^5.0.1",
|
|
80
81
|
"blockstore-idb": "^2.0.0",
|
|
81
82
|
"debounce": "^2.2.0",
|
|
82
|
-
"effect": "3.21.
|
|
83
|
+
"effect": "3.21.4",
|
|
83
84
|
"idb-keyval": "^6.2.1",
|
|
84
85
|
"interface-blockstore": "^5.2.10",
|
|
85
86
|
"it-all": "^3.0.6",
|
|
86
87
|
"multiformats": "^13.2.2",
|
|
87
88
|
"uint8arrays": "^5.1.0",
|
|
88
89
|
"wnfs": "0.2.2",
|
|
89
|
-
"@dxos/app-framework": "0.9.
|
|
90
|
-
"@dxos/
|
|
91
|
-
"@dxos/
|
|
92
|
-
"@dxos/
|
|
93
|
-
"@dxos/
|
|
94
|
-
"@dxos/
|
|
95
|
-
"@dxos/
|
|
96
|
-
"@dxos/
|
|
97
|
-
"@dxos/
|
|
98
|
-
"@dxos/
|
|
99
|
-
"@dxos/
|
|
100
|
-
"@dxos/
|
|
101
|
-
"@dxos/
|
|
90
|
+
"@dxos/app-framework": "0.9.1-staging.ee54ba693a",
|
|
91
|
+
"@dxos/app-toolkit": "0.9.1-staging.ee54ba693a",
|
|
92
|
+
"@dxos/crypto": "0.9.1-staging.ee54ba693a",
|
|
93
|
+
"@dxos/echo": "0.9.1-staging.ee54ba693a",
|
|
94
|
+
"@dxos/invariant": "0.9.1-staging.ee54ba693a",
|
|
95
|
+
"@dxos/log": "0.9.1-staging.ee54ba693a",
|
|
96
|
+
"@dxos/plugin-client": "0.9.1-staging.ee54ba693a",
|
|
97
|
+
"@dxos/plugin-file": "0.9.1-staging.ee54ba693a",
|
|
98
|
+
"@dxos/react-client": "0.9.1-staging.ee54ba693a",
|
|
99
|
+
"@dxos/react-ui": "0.9.1-staging.ee54ba693a",
|
|
100
|
+
"@dxos/types": "0.9.1-staging.ee54ba693a",
|
|
101
|
+
"@dxos/util": "0.9.1-staging.ee54ba693a",
|
|
102
|
+
"@dxos/keys": "0.9.1-staging.ee54ba693a"
|
|
102
103
|
},
|
|
103
104
|
"devDependencies": {
|
|
104
|
-
"@types/react": "~19.2.
|
|
105
|
+
"@types/react": "~19.2.17",
|
|
105
106
|
"@types/react-dom": "~19.2.3",
|
|
106
|
-
"react": "~19.2.
|
|
107
|
-
"react-dom": "~19.2.
|
|
107
|
+
"react": "~19.2.7",
|
|
108
|
+
"react-dom": "~19.2.7",
|
|
108
109
|
"vite": "^8.0.16",
|
|
109
|
-
"@dxos/plugin-testing": "0.9.
|
|
110
|
-
"@dxos/random": "0.9.
|
|
111
|
-
"@dxos/
|
|
112
|
-
"@dxos/
|
|
110
|
+
"@dxos/plugin-testing": "0.9.1-staging.ee54ba693a",
|
|
111
|
+
"@dxos/random": "0.9.1-staging.ee54ba693a",
|
|
112
|
+
"@dxos/ui-theme": "0.9.1-staging.ee54ba693a",
|
|
113
|
+
"@dxos/storybook-utils": "0.9.1-staging.ee54ba693a"
|
|
113
114
|
},
|
|
114
115
|
"peerDependencies": {
|
|
115
|
-
"effect": "3.21.
|
|
116
|
-
"react": "~19.2.
|
|
117
|
-
"react-dom": "~19.2.
|
|
118
|
-
"@dxos/react-ui": "0.9.
|
|
119
|
-
"@dxos/ui-theme": "0.9.
|
|
116
|
+
"effect": "3.21.4",
|
|
117
|
+
"react": "~19.2.7",
|
|
118
|
+
"react-dom": "~19.2.7",
|
|
119
|
+
"@dxos/react-ui": "0.9.1-staging.ee54ba693a",
|
|
120
|
+
"@dxos/ui-theme": "0.9.1-staging.ee54ba693a"
|
|
120
121
|
},
|
|
121
122
|
"publishConfig": {
|
|
122
123
|
"access": "public"
|
package/src/WnfsPlugin.tsx
CHANGED
|
@@ -43,7 +43,7 @@ export const WnfsPlugin = Plugin.define(meta).pipe(
|
|
|
43
43
|
activate: UrlResolver,
|
|
44
44
|
}),
|
|
45
45
|
AppPlugin.addPluginAssetModule({
|
|
46
|
-
asset: { pluginId: meta.
|
|
46
|
+
asset: { pluginId: meta.profile.key, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },
|
|
47
47
|
}),
|
|
48
48
|
Plugin.make,
|
|
49
49
|
);
|
|
@@ -3,16 +3,9 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Capability } from '@dxos/app-framework';
|
|
6
|
-
import { type FileCapabilities } from '@dxos/plugin-file/types';
|
|
7
6
|
|
|
8
|
-
export const Backend
|
|
9
|
-
void,
|
|
10
|
-
Capability.Capability<Capability.InterfaceDef<FileCapabilities.Backend>>
|
|
11
|
-
> = Capability.lazy('Backend', () => import('./backend'));
|
|
7
|
+
export const Backend = Capability.lazy('Backend', () => import('./backend'));
|
|
12
8
|
|
|
13
9
|
export const Blockstore = Capability.lazy('Blockstore', () => import('./blockstore'));
|
|
14
10
|
|
|
15
|
-
export const UrlResolver
|
|
16
|
-
void,
|
|
17
|
-
Capability.Capability<Capability.InterfaceDef<FileCapabilities.UrlResolver>>
|
|
18
|
-
> = Capability.lazy('UrlResolver', () => import('./url-resolver'));
|
|
11
|
+
export const UrlResolver = Capability.lazy('UrlResolver', () => import('./url-resolver'));
|
package/src/meta.ts
CHANGED
|
@@ -3,32 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Plugin } from '@dxos/app-framework';
|
|
6
|
-
import { DXN } from '@dxos/keys';
|
|
7
|
-
import { meta as fileMeta } from '@dxos/plugin-file';
|
|
8
|
-
import { trim } from '@dxos/util';
|
|
9
6
|
|
|
10
|
-
|
|
11
|
-
key: DXN.make('org.dxos.plugin.wnfs'),
|
|
12
|
-
name: 'WNFS',
|
|
13
|
-
author: 'DXOS',
|
|
14
|
-
description: trim`
|
|
15
|
-
Decentralized, end-to-end encrypted file storage for DXOS Composer built on the Web Native File System (WNFS) protocol.
|
|
7
|
+
import config from '../dx.config';
|
|
16
8
|
|
|
17
|
-
|
|
18
|
-
where each write produces a new immutable root CID. Files are stored as IPLD blocks (CIDv1, sha2-256),
|
|
19
|
-
cached locally in IndexedDB, and asynchronously replicated to the DXOS edge blob service as CAR archives.
|
|
20
|
-
Uploads and reads are scoped to a DXOS Space; the forest root CID is persisted atomically on the
|
|
21
|
-
space's ECHO properties so the file system state survives across sessions and devices.
|
|
22
|
-
|
|
23
|
-
The plugin registers as a \`FileCapabilities.Backend\` and \`FileCapabilities.UrlResolver\` so any plugin
|
|
24
|
-
that uses \`plugin-file\` (e.g. \`plugin-gallery\`) can upload files and resolve \`wnfs://\` URLs without
|
|
25
|
-
coupling to the storage implementation. The blockstore automatically queues blocks while offline and
|
|
26
|
-
flushes them when connectivity is restored.
|
|
27
|
-
`,
|
|
28
|
-
icon: 'ph--file-cloud--regular',
|
|
29
|
-
iconHue: 'teal',
|
|
30
|
-
source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-wnfs',
|
|
31
|
-
spec: 'PLUGIN.mdl',
|
|
32
|
-
tags: ['labs'],
|
|
33
|
-
dependsOn: [fileMeta.id],
|
|
34
|
-
});
|
|
9
|
+
export const meta = Plugin.getMetaFromConfig(config);
|
package/src/translations.ts
CHANGED
|
@@ -12,7 +12,7 @@ import { type SpaceId } from '@dxos/keys';
|
|
|
12
12
|
|
|
13
13
|
import { meta } from '#meta';
|
|
14
14
|
|
|
15
|
-
export const Blockstore = Capability.make<BlockstoreInterface>(`${meta.
|
|
15
|
+
export const Blockstore = Capability.make<BlockstoreInterface>(`${meta.profile.key}.capability.blockstore`);
|
|
16
16
|
|
|
17
17
|
export type Instances = Record<SpaceId, { directory: PrivateDirectory; forest: PrivateForest }>;
|
|
18
|
-
export const Instances = Capability.make<Instances>(`${meta.
|
|
18
|
+
export const Instances = Capability.make<Instances>(`${meta.profile.key}.capability.instances`);
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// src/meta.ts
|
|
2
|
-
import { Plugin } from "@dxos/app-framework";
|
|
3
|
-
import { DXN } from "@dxos/keys";
|
|
4
|
-
import { meta as fileMeta } from "@dxos/plugin-file";
|
|
5
|
-
import { trim } from "@dxos/util";
|
|
6
|
-
var meta = Plugin.makeMeta({
|
|
7
|
-
key: DXN.make("org.dxos.plugin.wnfs"),
|
|
8
|
-
name: "WNFS",
|
|
9
|
-
author: "DXOS",
|
|
10
|
-
description: trim`
|
|
11
|
-
Decentralized, end-to-end encrypted file storage for DXOS Composer built on the Web Native File System (WNFS) protocol.
|
|
12
|
-
|
|
13
|
-
WNFS organizes files inside a cryptographic "dark forest" — a content-addressed private file system
|
|
14
|
-
where each write produces a new immutable root CID. Files are stored as IPLD blocks (CIDv1, sha2-256),
|
|
15
|
-
cached locally in IndexedDB, and asynchronously replicated to the DXOS edge blob service as CAR archives.
|
|
16
|
-
Uploads and reads are scoped to a DXOS Space; the forest root CID is persisted atomically on the
|
|
17
|
-
space's ECHO properties so the file system state survives across sessions and devices.
|
|
18
|
-
|
|
19
|
-
The plugin registers as a \`FileCapabilities.Backend\` and \`FileCapabilities.UrlResolver\` so any plugin
|
|
20
|
-
that uses \`plugin-file\` (e.g. \`plugin-gallery\`) can upload files and resolve \`wnfs://\` URLs without
|
|
21
|
-
coupling to the storage implementation. The blockstore automatically queues blocks while offline and
|
|
22
|
-
flushes them when connectivity is restored.
|
|
23
|
-
`,
|
|
24
|
-
icon: "ph--file-cloud--regular",
|
|
25
|
-
iconHue: "teal",
|
|
26
|
-
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-wnfs",
|
|
27
|
-
spec: "PLUGIN.mdl",
|
|
28
|
-
tags: [
|
|
29
|
-
"labs"
|
|
30
|
-
],
|
|
31
|
-
dependsOn: [
|
|
32
|
-
fileMeta.id
|
|
33
|
-
]
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
export {
|
|
37
|
-
meta
|
|
38
|
-
};
|
|
39
|
-
//# sourceMappingURL=chunk-KUQHRT52.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { DXN } from '@dxos/keys';\nimport { meta as fileMeta } from '@dxos/plugin-file';\nimport { trim } from '@dxos/util';\n\nexport const meta = Plugin.makeMeta({\n key: DXN.make('org.dxos.plugin.wnfs'),\n name: 'WNFS',\n author: 'DXOS',\n description: trim`\n Decentralized, end-to-end encrypted file storage for DXOS Composer built on the Web Native File System (WNFS) protocol.\n\n WNFS organizes files inside a cryptographic \"dark forest\" — a content-addressed private file system\n where each write produces a new immutable root CID. Files are stored as IPLD blocks (CIDv1, sha2-256),\n cached locally in IndexedDB, and asynchronously replicated to the DXOS edge blob service as CAR archives.\n Uploads and reads are scoped to a DXOS Space; the forest root CID is persisted atomically on the\n space's ECHO properties so the file system state survives across sessions and devices.\n\n The plugin registers as a \\`FileCapabilities.Backend\\` and \\`FileCapabilities.UrlResolver\\` so any plugin\n that uses \\`plugin-file\\` (e.g. \\`plugin-gallery\\`) can upload files and resolve \\`wnfs://\\` URLs without\n coupling to the storage implementation. The blockstore automatically queues blocks while offline and\n flushes them when connectivity is restored.\n `,\n icon: 'ph--file-cloud--regular',\n iconHue: 'teal',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-wnfs',\n spec: 'PLUGIN.mdl',\n tags: ['labs'],\n dependsOn: [fileMeta.id],\n});\n"],
|
|
5
|
-
"mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,WAAW;AACpB,SAASC,QAAQC,gBAAgB;AACjC,SAASC,YAAY;AAEd,IAAMF,OAAOF,OAAOK,SAAS;EAClCC,KAAKL,IAAIM,KAAK,sBAAA;EACdC,MAAM;EACNC,QAAQ;EACRC,aAAaN;;;;;;;;;;;;;;EAcbO,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC,MAAM;EACNC,MAAM;IAAC;;EACPC,WAAW;IAACb,SAASc;;AACvB,CAAA;",
|
|
6
|
-
"names": ["Plugin", "DXN", "meta", "fileMeta", "trim", "makeMeta", "key", "make", "name", "author", "description", "icon", "iconHue", "source", "spec", "tags", "dependsOn", "id"]
|
|
7
|
-
}
|