@inkandswitch/patchwork-bootloader 0.4.3 → 0.5.0
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/CHANGELOG.md +29 -0
- package/dist/automerge-worker.js +533 -771
- package/dist/externals-list.d.ts +5 -0
- package/dist/externals-list.js +41 -0
- package/dist/externals.d.ts +14 -3
- package/dist/externals.js +50 -38
- package/dist/global.css +30 -0
- package/dist/module-loader.d.ts +0 -5
- package/dist/module-loader.js +0 -6
- package/dist/service-worker.js +178 -205
- package/dist/setup.d.ts +2 -1
- package/dist/setup.js +251 -375
- package/dist/sync-config.d.ts +1 -1
- package/dist/sync-config.js +3 -1
- package/package.json +15 -14
- package/src/automerge-worker.ts +634 -839
- package/src/externals-list.ts +43 -0
- package/src/externals.ts +64 -38
- package/src/global.css +30 -0
- package/src/module-loader.ts +0 -6
- package/src/service-worker.ts +224 -238
- package/src/setup.ts +287 -401
- package/src/sync-config.ts +6 -1
- package/dist/site.d.ts +0 -111
- package/dist/site.js +0 -602
- package/dist/vite/importmap-plugin.d.ts +0 -4
- package/dist/vite/importmap-plugin.js +0 -105
- package/dist/vite/patchwork-plugin.d.ts +0 -14
- package/dist/vite/patchwork-plugin.js +0 -8
- package/dist/vite/service-worker-plugin.d.ts +0 -2
- package/dist/vite/service-worker-plugin.js +0 -42
- package/src/site.ts +0 -859
- package/src/vite/importmap-plugin.ts +0 -133
- package/src/vite/patchwork-plugin.ts +0 -20
- package/src/vite/service-worker-plugin.ts +0 -46
package/dist/sync-config.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** localStorage key: optional override for the classic sync WebSocket URL. */
|
|
2
2
|
export declare const CLASSIC_SYNC_SERVER_KEY = "patchworkClassicSyncServer";
|
|
3
|
-
export declare const DEFAULT_CLASSIC_SYNC_SERVER
|
|
3
|
+
export declare const DEFAULT_CLASSIC_SYNC_SERVER: string;
|
|
4
4
|
export declare function readClassicSyncServer(storage?: Pick<Storage, "getItem">): string;
|
|
5
5
|
export type ConnectClassicSyncMessage = {
|
|
6
6
|
type: "connect-classic-sync";
|
package/dist/sync-config.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/** localStorage key: optional override for the classic sync WebSocket URL. */
|
|
2
2
|
export const CLASSIC_SYNC_SERVER_KEY = "patchworkClassicSyncServer";
|
|
3
|
-
export const DEFAULT_CLASSIC_SYNC_SERVER = "
|
|
3
|
+
export const DEFAULT_CLASSIC_SYNC_SERVER = typeof __CLASSIC_SYNC_SERVER__ !== "undefined"
|
|
4
|
+
? __CLASSIC_SYNC_SERVER__
|
|
5
|
+
: "wss://sync3.automerge.org";
|
|
4
6
|
export function readClassicSyncServer(storage = globalThis.localStorage) {
|
|
5
7
|
const override = storage.getItem(CLASSIC_SYNC_SERVER_KEY)?.trim();
|
|
6
8
|
if (!override)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkandswitch/patchwork-bootloader",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"author": "chee",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"import": "./dist/externals.js",
|
|
18
18
|
"types": "./dist/externals.d.ts"
|
|
19
19
|
},
|
|
20
|
-
"./
|
|
21
|
-
"import": "./dist/
|
|
22
|
-
"types": "./dist/
|
|
20
|
+
"./externals-list": {
|
|
21
|
+
"import": "./dist/externals-list.js",
|
|
22
|
+
"types": "./dist/externals-list.d.ts"
|
|
23
23
|
},
|
|
24
24
|
"./service-worker": {
|
|
25
25
|
"import": "./dist/service-worker.js",
|
|
@@ -29,18 +29,19 @@
|
|
|
29
29
|
"import": "./dist/automerge-worker.js",
|
|
30
30
|
"types": "./dist/automerge-worker.d.ts"
|
|
31
31
|
},
|
|
32
|
+
"./module-loader": {
|
|
33
|
+
"import": "./dist/module-loader.js",
|
|
34
|
+
"types": "./dist/module-loader.d.ts"
|
|
35
|
+
},
|
|
32
36
|
"./module-loader-worker": {
|
|
33
37
|
"import": "./dist/module-loader-worker.js",
|
|
34
38
|
"types": "./dist/module-loader-worker.d.ts"
|
|
35
39
|
},
|
|
36
|
-
"./site": {
|
|
37
|
-
"import": "./dist/site.js",
|
|
38
|
-
"types": "./dist/site.d.ts"
|
|
39
|
-
},
|
|
40
40
|
"./types": {
|
|
41
41
|
"import": "./dist/types.js",
|
|
42
42
|
"types": "./dist/types.d.ts"
|
|
43
|
-
}
|
|
43
|
+
},
|
|
44
|
+
"./global.css": "./dist/global.css"
|
|
44
45
|
},
|
|
45
46
|
"dependencies": {
|
|
46
47
|
"@automerge/automerge": "3.3.2",
|
|
@@ -62,10 +63,10 @@
|
|
|
62
63
|
"service-worker-types": "npm:@types/serviceworker@^0.0.153",
|
|
63
64
|
"solid-js": "^1.9.13",
|
|
64
65
|
"tinyargs": "^0.1.4",
|
|
65
|
-
"@inkandswitch/patchwork-elements": "^4.0.
|
|
66
|
-
"@inkandswitch/patchwork-filesystem": "^0.2.
|
|
67
|
-
"@inkandswitch/patchwork-
|
|
68
|
-
"@inkandswitch/patchwork-
|
|
66
|
+
"@inkandswitch/patchwork-elements": "^4.0.2",
|
|
67
|
+
"@inkandswitch/patchwork-filesystem": "^0.2.3",
|
|
68
|
+
"@inkandswitch/patchwork-providers": "^0.4.2",
|
|
69
|
+
"@inkandswitch/patchwork-plugins": "^1.0.1"
|
|
69
70
|
},
|
|
70
71
|
"peerDependencies": {
|
|
71
72
|
"@automerge/automerge": "3.3.2",
|
|
@@ -88,7 +89,7 @@
|
|
|
88
89
|
}
|
|
89
90
|
},
|
|
90
91
|
"scripts": {
|
|
91
|
-
"build": "tsc",
|
|
92
|
+
"build": "tsc && cp src/global.css dist/global.css",
|
|
92
93
|
"dev": "tsc -w --preserveWatchOutput"
|
|
93
94
|
}
|
|
94
95
|
}
|