dedot 0.11.0 → 0.11.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/cjs/smoldot/worker.js +8 -0
- package/package.json +22 -21
- package/smoldot/worker.d.ts +1 -0
- package/smoldot/worker.js +6 -0
- package/cjs/smoldot/worker/index.js +0 -18
- package/smoldot/worker/index.d.ts +0 -1
- package/smoldot/worker/index.js +0 -2
- /package/cjs/smoldot/{with-worker/index.js → with-worker.js} +0 -0
- /package/smoldot/{with-worker/index.d.ts → with-worker.d.ts} +0 -0
- /package/smoldot/{with-worker/index.js → with-worker.js} +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
// Inspired By: https://smol-dot.github.io/smoldot/doc-javascript/#md:usage-with-a-worker
|
|
5
|
+
const bytecode_1 = require("smoldot/bytecode");
|
|
6
|
+
const worker_1 = require("smoldot/worker");
|
|
7
|
+
(0, bytecode_1.compileBytecode)().then((bytecode) => postMessage(bytecode));
|
|
8
|
+
onmessage = (msg) => (0, worker_1.run)(msg.data);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dedot",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "A delightful JavaScript/TypeScript client for Polkadot & Substrate",
|
|
5
5
|
"author": "Thang X. Vu <thang@dedot.dev>",
|
|
6
6
|
"homepage": "https://dedot.dev",
|
|
@@ -21,17 +21,18 @@
|
|
|
21
21
|
"clean": "rm -rf ./dist && rm -rf ./tsconfig.tsbuildinfo ./tsconfig.build.tsbuildinfo"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@dedot/api": "0.11.
|
|
25
|
-
"@dedot/cli": "0.11.
|
|
26
|
-
"@dedot/codecs": "0.11.
|
|
27
|
-
"@dedot/contracts": "0.11.
|
|
28
|
-
"@dedot/merkleized-metadata": "0.11.
|
|
29
|
-
"@dedot/providers": "0.11.
|
|
30
|
-
"@dedot/runtime-specs": "0.11.
|
|
31
|
-
"@dedot/shape": "0.11.
|
|
32
|
-
"@dedot/smoldot": "0.11.
|
|
33
|
-
"@dedot/types": "0.11.
|
|
34
|
-
"@dedot/utils": "0.11.
|
|
24
|
+
"@dedot/api": "0.11.1",
|
|
25
|
+
"@dedot/cli": "0.11.1",
|
|
26
|
+
"@dedot/codecs": "0.11.1",
|
|
27
|
+
"@dedot/contracts": "0.11.1",
|
|
28
|
+
"@dedot/merkleized-metadata": "0.11.1",
|
|
29
|
+
"@dedot/providers": "0.11.1",
|
|
30
|
+
"@dedot/runtime-specs": "0.11.1",
|
|
31
|
+
"@dedot/shape": "0.11.1",
|
|
32
|
+
"@dedot/smoldot": "0.11.1",
|
|
33
|
+
"@dedot/types": "0.11.1",
|
|
34
|
+
"@dedot/utils": "0.11.1",
|
|
35
|
+
"smoldot": "^2.0.34"
|
|
35
36
|
},
|
|
36
37
|
"exports": {
|
|
37
38
|
".": {
|
|
@@ -101,16 +102,16 @@
|
|
|
101
102
|
"default": "./smoldot/index.js"
|
|
102
103
|
},
|
|
103
104
|
"./smoldot/worker": {
|
|
104
|
-
"types": "./smoldot/worker
|
|
105
|
-
"import": "./smoldot/worker
|
|
106
|
-
"require": "./cjs/smoldot/worker
|
|
107
|
-
"default": "./smoldot/worker
|
|
105
|
+
"types": "./smoldot/worker.d.ts",
|
|
106
|
+
"import": "./smoldot/worker.js",
|
|
107
|
+
"require": "./cjs/smoldot/worker.js",
|
|
108
|
+
"default": "./smoldot/worker.js"
|
|
108
109
|
},
|
|
109
110
|
"./smoldot/with-worker": {
|
|
110
|
-
"types": "./smoldot/with-worker
|
|
111
|
-
"import": "./smoldot/with-worker
|
|
112
|
-
"require": "./cjs/smoldot/with-worker
|
|
113
|
-
"default": "./smoldot/with-worker
|
|
111
|
+
"types": "./smoldot/with-worker.d.ts",
|
|
112
|
+
"import": "./smoldot/with-worker.js",
|
|
113
|
+
"require": "./cjs/smoldot/with-worker.js",
|
|
114
|
+
"default": "./smoldot/with-worker.js"
|
|
114
115
|
}
|
|
115
116
|
},
|
|
116
117
|
"publishConfig": {
|
|
@@ -121,7 +122,7 @@
|
|
|
121
122
|
"node": ">=18"
|
|
122
123
|
},
|
|
123
124
|
"license": "Apache-2.0",
|
|
124
|
-
"gitHead": "
|
|
125
|
+
"gitHead": "f38fc00ea34f4cdac2fb7d57099febe841cf860f",
|
|
125
126
|
"module": "./index.js",
|
|
126
127
|
"types": "./index.d.ts"
|
|
127
128
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
// Inspired By: https://smol-dot.github.io/smoldot/doc-javascript/#md:usage-with-a-worker
|
|
3
|
+
import { compileBytecode } from 'smoldot/bytecode';
|
|
4
|
+
import { run } from 'smoldot/worker';
|
|
5
|
+
compileBytecode().then((bytecode) => postMessage(bytecode));
|
|
6
|
+
onmessage = (msg) => run(msg.data);
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
// @ts-nocheck
|
|
18
|
-
__exportStar(require("@dedot/smoldot/worker"), exports);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@dedot/smoldot/worker';
|
package/smoldot/worker/index.js
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|