@dxos/plugin-wnfs 0.8.4-staging.60fe92afc8 → 0.9.1-main.c7dcc2e112

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/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.8.4-staging.60fe92afc8",
3
+ "version": "0.9.1-main.c7dcc2e112",
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
  ],
@@ -86,19 +87,19 @@
86
87
  "multiformats": "^13.2.2",
87
88
  "uint8arrays": "^5.1.0",
88
89
  "wnfs": "0.2.2",
89
- "@dxos/app-framework": "0.8.4-staging.60fe92afc8",
90
- "@dxos/app-toolkit": "0.8.4-staging.60fe92afc8",
91
- "@dxos/crypto": "0.8.4-staging.60fe92afc8",
92
- "@dxos/echo": "0.8.4-staging.60fe92afc8",
93
- "@dxos/invariant": "0.8.4-staging.60fe92afc8",
94
- "@dxos/log": "0.8.4-staging.60fe92afc8",
95
- "@dxos/plugin-client": "0.8.4-staging.60fe92afc8",
96
- "@dxos/keys": "0.8.4-staging.60fe92afc8",
97
- "@dxos/plugin-file": "0.8.4-staging.60fe92afc8",
98
- "@dxos/react-client": "0.8.4-staging.60fe92afc8",
99
- "@dxos/react-ui": "0.8.4-staging.60fe92afc8",
100
- "@dxos/util": "0.8.4-staging.60fe92afc8",
101
- "@dxos/types": "0.8.4-staging.60fe92afc8"
90
+ "@dxos/app-framework": "0.9.1-main.c7dcc2e112",
91
+ "@dxos/app-toolkit": "0.9.1-main.c7dcc2e112",
92
+ "@dxos/crypto": "0.9.1-main.c7dcc2e112",
93
+ "@dxos/echo": "0.9.1-main.c7dcc2e112",
94
+ "@dxos/keys": "0.9.1-main.c7dcc2e112",
95
+ "@dxos/plugin-client": "0.9.1-main.c7dcc2e112",
96
+ "@dxos/log": "0.9.1-main.c7dcc2e112",
97
+ "@dxos/plugin-file": "0.9.1-main.c7dcc2e112",
98
+ "@dxos/invariant": "0.9.1-main.c7dcc2e112",
99
+ "@dxos/react-client": "0.9.1-main.c7dcc2e112",
100
+ "@dxos/types": "0.9.1-main.c7dcc2e112",
101
+ "@dxos/util": "0.9.1-main.c7dcc2e112",
102
+ "@dxos/react-ui": "0.9.1-main.c7dcc2e112"
102
103
  },
103
104
  "devDependencies": {
104
105
  "@types/react": "~19.2.7",
@@ -106,17 +107,17 @@
106
107
  "react": "~19.2.3",
107
108
  "react-dom": "~19.2.3",
108
109
  "vite": "^8.0.16",
109
- "@dxos/random": "0.8.4-staging.60fe92afc8",
110
- "@dxos/ui-theme": "0.8.4-staging.60fe92afc8",
111
- "@dxos/storybook-utils": "0.8.4-staging.60fe92afc8",
112
- "@dxos/plugin-testing": "0.8.4-staging.60fe92afc8"
110
+ "@dxos/plugin-testing": "0.9.1-main.c7dcc2e112",
111
+ "@dxos/storybook-utils": "0.9.1-main.c7dcc2e112",
112
+ "@dxos/random": "0.9.1-main.c7dcc2e112",
113
+ "@dxos/ui-theme": "0.9.1-main.c7dcc2e112"
113
114
  },
114
115
  "peerDependencies": {
115
116
  "effect": "3.21.3",
116
117
  "react": "~19.2.3",
117
118
  "react-dom": "~19.2.3",
118
- "@dxos/react-ui": "0.8.4-staging.60fe92afc8",
119
- "@dxos/ui-theme": "0.8.4-staging.60fe92afc8"
119
+ "@dxos/react-ui": "0.9.1-main.c7dcc2e112",
120
+ "@dxos/ui-theme": "0.9.1-main.c7dcc2e112"
120
121
  },
121
122
  "publishConfig": {
122
123
  "access": "public"
@@ -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.id, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },
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: Capability.LazyCapability<
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: Capability.LazyCapability<
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
- export const meta = Plugin.makeMeta({
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
- WNFS organizes files inside a cryptographic "dark forest" — a content-addressed private file system
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);
@@ -9,7 +9,7 @@ import { meta } from '#meta';
9
9
  export const translations = [
10
10
  {
11
11
  'en-US': {
12
- [meta.id]: {
12
+ [meta.profile.key]: {
13
13
  'plugin.name': 'WNFS',
14
14
  },
15
15
  },
@@ -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.id}.capability.blockstore`);
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.id}.capability.instances`);
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
- }