@polkadot-api/sm-provider 0.1.16 → 0.2.1-canary.527fbf8

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.
@@ -1,34 +1,32 @@
1
- import { AddChainError, AlreadyDestroyedError, CrashError, JsonRpcDisabledError } from '@polkadot-api/smoldot';
1
+ import { JsonRpcDisabledError } from '@polkadot-api/smoldot';
2
2
  import { getSyncProvider } from '@polkadot-api/json-rpc-provider-proxy';
3
3
 
4
4
  let pending;
5
- const isRecoverable = (error) => !(error instanceof AddChainError || error instanceof AlreadyDestroyedError || error instanceof CrashError || error instanceof JsonRpcDisabledError);
6
- const getSmProvider = (chain) => getSyncProvider(async () => {
7
- while (pending) await pending;
5
+ const chains = /* @__PURE__ */ new WeakSet();
6
+ const getSmProvider = (getChain) => getSyncProvider((onReady) => {
7
+ let isRunning = true;
8
8
  let resolvedChain;
9
- if (chain instanceof Promise) {
10
- pending = chain;
11
- resolvedChain = await chain;
12
- pending = null;
13
- } else resolvedChain = chain;
14
- return (listener, onError) => {
15
- let listening = true;
9
+ const provider = (onMsg, onHalt) => {
10
+ let listening = isRunning;
16
11
  (async () => {
17
12
  do {
18
13
  let message = "";
19
14
  try {
20
15
  message = await resolvedChain.nextJsonRpcResponse();
21
16
  } catch (e) {
22
- if (listening && isRecoverable(e)) onError();
17
+ if (listening) {
18
+ if (e instanceof JsonRpcDisabledError) console.error(e);
19
+ else onHalt(e);
20
+ }
23
21
  return;
24
22
  }
25
23
  if (!listening) break;
26
- listener(message);
24
+ onMsg(JSON.parse(message));
27
25
  } while (listening);
28
26
  })();
29
27
  return {
30
28
  send(msg) {
31
- resolvedChain.sendJsonRpc(msg);
29
+ resolvedChain.sendJsonRpc(JSON.stringify(msg));
32
30
  },
33
31
  disconnect() {
34
32
  listening = false;
@@ -36,6 +34,32 @@ const getSmProvider = (chain) => getSyncProvider(async () => {
36
34
  }
37
35
  };
38
36
  };
37
+ (async () => {
38
+ while (isRunning && pending) await pending;
39
+ try {
40
+ const chain = getChain();
41
+ if (chain instanceof Promise) {
42
+ pending = chain.catch(() => {
43
+ });
44
+ resolvedChain = await chain;
45
+ pending = null;
46
+ } else resolvedChain = chain;
47
+ if (chains.has(resolvedChain)) {
48
+ console.warn(
49
+ "Can't re-use Chain: Make sure to return a new Chain on the getSmProvider factory"
50
+ );
51
+ return;
52
+ }
53
+ chains.add(resolvedChain);
54
+ if (isRunning) onReady(provider);
55
+ else resolvedChain.remove();
56
+ } catch {
57
+ if (isRunning) onReady(null);
58
+ }
59
+ })();
60
+ return () => {
61
+ isRunning = false;
62
+ };
39
63
  });
40
64
 
41
65
  export { getSmProvider };
@@ -1 +1 @@
1
- {"version":3,"file":"sm-provider.mjs","sources":["../../src/sm-provider.ts"],"sourcesContent":["import {\n AddChainError,\n AlreadyDestroyedError,\n CrashError,\n JsonRpcDisabledError,\n type Chain,\n} from \"@polkadot-api/smoldot\"\nimport type { JsonRpcProvider } from \"@polkadot-api/json-rpc-provider\"\nimport { getSyncProvider } from \"@polkadot-api/json-rpc-provider-proxy\"\n\nlet pending: Promise<Chain> | null\n\nconst isRecoverable = (error: any) =>\n !(\n error instanceof AddChainError ||\n error instanceof AlreadyDestroyedError ||\n error instanceof CrashError ||\n error instanceof JsonRpcDisabledError\n )\n\nexport const getSmProvider = (chain: Chain | Promise<Chain>): JsonRpcProvider =>\n getSyncProvider(async () => {\n while (pending) await pending\n\n let resolvedChain: Chain\n if (chain instanceof Promise) {\n pending = chain\n resolvedChain = await chain\n pending = null\n } else resolvedChain = chain\n\n return (listener, onError) => {\n let listening = true\n ;(async () => {\n do {\n let message = \"\"\n try {\n message = await resolvedChain.nextJsonRpcResponse()\n } catch (e) {\n if (listening && isRecoverable(e)) onError()\n return\n }\n if (!listening) break\n listener(message)\n } while (listening)\n })()\n\n return {\n send(msg: string) {\n resolvedChain.sendJsonRpc(msg)\n },\n disconnect() {\n listening = false\n resolvedChain.remove()\n },\n }\n }\n })\n"],"names":[],"mapp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../../src/sm-provider.ts"],"sourcesContent":["import { JsonRpcDisabledError, type Chain } from \"@polkadot-api/smoldot\"\nimport type { JsonRpcProvider } from \"@polkadot-api/json-rpc-provider\"\nimport {\n getSyncProvider,\n InnerJsonRpcProvider,\n} from \"@polkadot-api/json-rpc-provider-proxy\"\n\nlet pending: Promise<any> | null\n\nconst chains = new WeakSet<Chain>()\n\nexport const getSmProvider = (\n getChain: () => Chain | Promise<Chain>,\n): JsonRpcProvider =>\n getSyncProvider((onReady) => {\n let isRunning = true\n let resolvedChain: Chain\n const provider: InnerJsonRpcProvider = (onMsg, onHalt) => {\n let listening = isRunning\n ;(async () => {\n do {\n let message = \"\"\n try {\n message = await resolvedChain.nextJsonRpcResponse()\n } catch (e) {\n if (listening) {\n if (e instanceof JsonRpcDisabledError) console.error(e)\n else onHalt(e)\n }\n return\n }\n if (!listening) break\n onMsg(JSON.parse(message))\n } while (listening)\n })()\n\n return {\n send(msg) {\n resolvedChain.sendJsonRpc(JSON.stringify(msg))\n },\n disconnect() {\n listening = false\n resolvedChain.remove()\n },\n }\n }\n\n ;(async () => {\n while (isRunning && pending) await pending\n\n try {\n const chain = getChain()\n if (chain instanceof Promise) {\n pending = chain.catch(() => {})\n resolvedChain = await chain\n pending = null\n } else resolvedChain = chain\n\n if (chains.has(resolvedChain)) {\n console.warn(\n \"Can't re-use Chain: Make sure to return a new Chain on the getSmProvider factory\",\n )\n return\n }\n chains.add(resolvedChain)\n\n if (isRunning) onReady(provider)\n else resolvedChain.remove()\n } catch {\n if (isRunning) onReady(null)\n }\n })()\n\n return () => {\n isRunning = false\n }\n })\n"],"names":[],"mappings":";;;AAOA,IAAI,OAAA;AAEJ,MAAM,MAAA,uBAAa,OAAA,EAAe;AAE3B,MAAM,aAAA,GAAgB,CAC3B,QAAA,KAEA,eAAA,CAAgB,CAAC,OAAA,KAAY;AAC3B,EAAA,IAAI,SAAA,GAAY,IAAA;AAChB,EAAA,IAAI,aAAA;AACJ,EAAA,MAAM,QAAA,G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,CAAA,EAAG;AAC7B,QAAA,OAAA,CAAQ,IAAA;AAAA,UACN;AAAA,SACF;AACA,QAAA;AAAA,MACF;AACA,MAAA,MAAA,CAAO,IAAI,aAAa,CAAA;AAExB,MAAA,IAAI,SAAA,UAAmB,QAAQ,CAAA;AAAA,yBACZ,MAAA,EAAO;AAAA,IAC5B,CAAA,CAAA,MAAQ;AACN,MAAA,IAAI,SAAA,UAAmB,IAAI,CAAA;AAAA,IAC7B;AAAA,EACF,CAAA,GAAG;AAEH,EAAA,OAAO,MAAM;AACX,IAAA,SAAA,GAAY,KAAA;AAAA,EACd,CAAA;AACF,CAAC;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Chain } from '@polkadot-api/smoldot';
2
2
  import { JsonRpcProvider } from '@polkadot-api/json-rpc-provider';
3
3
 
4
- declare const getSmProvider: (chain: Chain | Promise<Chain>) => JsonRpcProvider;
4
+ declare const getSmProvider: (getChain: () => Chain | Promise<Chain>) => JsonRpcProvider;
5
5
 
6
6
  export { getSmProvider };
package/dist/index.js CHANGED
@@ -4,33 +4,31 @@ var smoldot = require('@polkadot-api/smoldot');
4
4
  var jsonRpcProviderProxy = require('@polkadot-api/json-rpc-provider-proxy');
5
5
 
6
6
  let pending;
7
- const isRecoverable = (error) => !(error instanceof smoldot.AddChainError || error instanceof smoldot.AlreadyDestroyedError || error instanceof smoldot.CrashError || error instanceof smoldot.JsonRpcDisabledError);
8
- const getSmProvider = (chain) => jsonRpcProviderProxy.getSyncProvider(async () => {
9
- while (pending) await pending;
7
+ const chains = /* @__PURE__ */ new WeakSet();
8
+ const getSmProvider = (getChain) => jsonRpcProviderProxy.getSyncProvider((onReady) => {
9
+ let isRunning = true;
10
10
  let resolvedChain;
11
- if (chain instanceof Promise) {
12
- pending = chain;
13
- resolvedChain = await chain;
14
- pending = null;
15
- } else resolvedChain = chain;
16
- return (listener, onError) => {
17
- let listening = true;
11
+ const provider = (onMsg, onHalt) => {
12
+ let listening = isRunning;
18
13
  (async () => {
19
14
  do {
20
15
  let message = "";
21
16
  try {
22
17
  message = await resolvedChain.nextJsonRpcResponse();
23
18
  } catch (e) {
24
- if (listening && isRecoverable(e)) onError();
19
+ if (listening) {
20
+ if (e instanceof smoldot.JsonRpcDisabledError) console.error(e);
21
+ else onHalt(e);
22
+ }
25
23
  return;
26
24
  }
27
25
  if (!listening) break;
28
- listener(message);
26
+ onMsg(JSON.parse(message));
29
27
  } while (listening);
30
28
  })();
31
29
  return {
32
30
  send(msg) {
33
- resolvedChain.sendJsonRpc(msg);
31
+ resolvedChain.sendJsonRpc(JSON.stringify(msg));
34
32
  },
35
33
  disconnect() {
36
34
  listening = false;
@@ -38,6 +36,32 @@ const getSmProvider = (chain) => jsonRpcProviderProxy.getSyncProvider(async () =
38
36
  }
39
37
  };
40
38
  };
39
+ (async () => {
40
+ while (isRunning && pending) await pending;
41
+ try {
42
+ const chain = getChain();
43
+ if (chain instanceof Promise) {
44
+ pending = chain.catch(() => {
45
+ });
46
+ resolvedChain = await chain;
47
+ pending = null;
48
+ } else resolvedChain = chain;
49
+ if (chains.has(resolvedChain)) {
50
+ console.warn(
51
+ "Can't re-use Chain: Make sure to return a new Chain on the getSmProvider factory"
52
+ );
53
+ return;
54
+ }
55
+ chains.add(resolvedChain);
56
+ if (isRunning) onReady(provider);
57
+ else resolvedChain.remove();
58
+ } catch {
59
+ if (isRunning) onReady(null);
60
+ }
61
+ })();
62
+ return () => {
63
+ isRunning = false;
64
+ };
41
65
  });
42
66
 
43
67
  exports.getSmProvider = getSmProvider;
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/sm-provider.ts"],"sourcesContent":["import {\n AddChainError,\n AlreadyDestroyedError,\n CrashError,\n JsonRpcDisabledError,\n type Chain,\n} from \"@polkadot-api/smoldot\"\nimport type { JsonRpcProvider } from \"@polkadot-api/json-rpc-provider\"\nimport { getSyncProvider } from \"@polkadot-api/json-rpc-provider-proxy\"\n\nlet pending: Promise<Chain> | null\n\nconst isRecoverable = (error: any) =>\n !(\n error instanceof AddChainError ||\n error instanceof AlreadyDestroyedError ||\n error instanceof CrashError ||\n error instanceof JsonRpcDisabledError\n )\n\nexport const getSmProvider = (chain: Chain | Promise<Chain>): JsonRpcProvider =>\n getSyncProvider(async () => {\n while (pending) await pending\n\n let resolvedChain: Chain\n if (chain instanceof Promise) {\n pending = chain\n resolvedChain = await chain\n pending = null\n } else resolvedChain = chain\n\n return (listener, onError) => {\n let listening = true\n ;(async () => {\n do {\n let message = \"\"\n try {\n message = await resolvedChain.nextJsonRpcResponse()\n } catch (e) {\n if (listening && isRecoverable(e)) onError()\n return\n }\n if (!listening) break\n listener(message)\n } while (listening)\n })()\n\n return {\n send(msg: string) {\n resolvedChain.sendJsonRpc(msg)\n },\n disconnect() {\n listening = false\n resolvedChain.remove()\n },\n }\n }\n })\n"],"names":["AddChainError","AlreadyDestroyedError","CrashError","JsonRpcDisabledError","getSyncProvider"],"mappings":";;;;;AAUA,IAAI,OAAA;AAEJ,MAAM,aAAA,GAAgB,CAAC,KAAA,KACrB,EACE,KAAA,YAAiBA,yBACjB,KAAA,YAAiBC,6BAAA,IACjB,KAAA,YAAiBC,kBAAA,IACjB,KAAA,YAAiBC,4BAAA,CAAA;AAGd,MAAM,aAAA,GAAgB,CAAC,KAAA,KAC5BC,oCAAA,CAAgB,YAAY;AAC1B,EAAA,OAAO,SAAS,MAAM,OAAA;AAEtB,EAAA,IAAI,aAAA;AACJ,EAAA,IAAI,iBAAiB,OAAA,EAAS;AAC5B,IAAA,OAAA,GAAU,KAAA;AACV,IAAA,aAAA,GAAgB,MAAM,KAAA;AACtB,IAAA,OAAA,GAAU,IAAA;AAAA,EACZ,OAAO,aAAA,GAAgB,KAAA;AAEvB,EAAA,OAAO,CAAC,UAAU,OAAA,KAAY;AAC5B,IAAA,IAAI,SAAA,GAAY,IAAA;AACf,IAAA,CAAC,YAAY;AACZ,MAAA,GAAG;AACD,QAAA,IAAI,OAAA,GAAU,EAAA;AACd,QAAA,IAAI;AACF,UAAA,OAAA,GAAU,MAAM,cAAc,mBAAA,EAAoB;AAAA,QACpD,SAAS,CAAA,EAAG;AACV,UAAA,IAAI,SAAA,IAAa,aAAA,CAAc,CAAC,CAAA,EAAG,OAAA,EAAQ;AAC3C,UAAA;AAAA,QACF;AACA,QAAA,IAAI,CAAC,SAAA,EAAW;AAChB,QAAA,QAAA,CAAS,OAAO,CAAA;AAAA,MAClB,CAAA,QAAS,SAAA;AAAA,IACX,CAAA,GAAG;AAEH,IAAA,OAAO;AAAA,MACL,KAAK,GAAA,EAAa;AAChB,QAAA,aAAA,CAAc,YAAY,GAAG,CAAA;AAAA,MAC/B,CAAA;AAAA,MACA,UAAA,GAAa;AACX,QAAA,SAAA,GAAY,KAAA;AACZ,QAAA,aAAA,CAAc,MAAA,EAAO;AAAA,MACvB;AAAA,KACF;AAAA,EACF,CAAA;AACF,CAAC;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../src/sm-provider.ts"],"sourcesContent":["import { JsonRpcDisabledError, type Chain } from \"@polkadot-api/smoldot\"\nimport type { JsonRpcProvider } from \"@polkadot-api/json-rpc-provider\"\nimport {\n getSyncProvider,\n InnerJsonRpcProvider,\n} from \"@polkadot-api/json-rpc-provider-proxy\"\n\nlet pending: Promise<any> | null\n\nconst chains = new WeakSet<Chain>()\n\nexport const getSmProvider = (\n getChain: () => Chain | Promise<Chain>,\n): JsonRpcProvider =>\n getSyncProvider((onReady) => {\n let isRunning = true\n let resolvedChain: Chain\n const provider: InnerJsonRpcProvider = (onMsg, onHalt) => {\n let listening = isRunning\n ;(async () => {\n do {\n let message = \"\"\n try {\n message = await resolvedChain.nextJsonRpcResponse()\n } catch (e) {\n if (listening) {\n if (e instanceof JsonRpcDisabledError) console.error(e)\n else onHalt(e)\n }\n return\n }\n if (!listening) break\n onMsg(JSON.parse(message))\n } while (listening)\n })()\n\n return {\n send(msg) {\n resolvedChain.sendJsonRpc(JSON.stringify(msg))\n },\n disconnect() {\n listening = false\n resolvedChain.remove()\n },\n }\n }\n\n ;(async () => {\n while (isRunning && pending) await pending\n\n try {\n const chain = getChain()\n if (chain instanceof Promise) {\n pending = chain.catch(() => {})\n resolvedChain = await chain\n pending = null\n } else resolvedChain = chain\n\n if (chains.has(resolvedChain)) {\n console.warn(\n \"Can't re-use Chain: Make sure to return a new Chain on the getSmProvider factory\",\n )\n return\n }\n chains.add(resolvedChain)\n\n if (isRunning) onReady(provider)\n else resolvedChain.remove()\n } catch {\n if (isRunning) onReady(null)\n }\n })()\n\n return () => {\n isRunning = false\n }\n })\n"],"names":["getSyncProvider","JsonRpcDisabledError"],"mappings":";;;;;AAOA,IAAI,OAAA;AAEJ,MAAM,MAAA,uBAAa,OAAA,EAAe;AAE3B,MAAM,aAAA,GAAgB,CAC3B,QAAA,KAEAA,oCAAA,CAAgB,CAAC,OAAA,KAAY;AAC3B,EAAA,IAAI,SAAA,GAAY,IAAA;AAChB,EAAA,IAAI,aAAA;AACJ,EAAA,MAAM,QAAA,GAAiC,CAAC,KAAA,EAAO,MAAA,KAAW;AACxD,IAAA,IAAI,SAAA,GAAY,SAAA;AACf,IAAA,CAAC,YAAY;AACZ,MAAA,GAAG;AACD,QAAA,IAAI,OAAA,GAAU,EAAA;AACd,QAAA,IAAI;AACF,UAAA,OAAA,GAAU,MAAM,cAAc,mBAAA,EAAoB;AAAA,QACpD,SAAS,CAAA,EAAG;AACV,UAAA,IAAI,SAAA,EAAW;AACb,YAAA,IAAI,CAAA,YAAaC,4BAAA,EAAsB,OAAA,CAAQ,KAAA,CAAM,CAAC,CAAA;AAAA,wBAC1C,CAAC,CAAA;AAAA,UACf;AACA,UAAA;AAAA,QACF;AACA,QAAA,IAAI,CAAC,SAAA,EAAW;AAChB,QAAA,KAAA,CAAM,IAAA,CAAK,KAAA,CAAM,OAAO,CAAC,CAAA;AAAA,MAC3B,CAAA,QAAS,SAAA;AAAA,IACX,CAAA,GAAG;AAEH,IAAA,OAAO;AAAA,MACL,KAAK,GAAA,EAAK;AACR,QAAA,aAAA,CAAc,WAAA,CAAY,IAAA,CAAK,SAAA,CAAU,GAAG,CAAC,CAAA;AAAA,MAC/C,CAAA;AAAA,MACA,UAAA,GAAa;AACX,QAAA,SAAA,GAAY,KAAA;AACZ,QAAA,aAAA,CAAc,MAAA,EAAO;AAAA,MACvB;AAAA,KACF;AAAA,EACF,CAAA;AAEC,EAAA,CAAC,YAAY;AACZ,IAAA,OAAO,SAAA,IAAa,SAAS,MAAM,OAAA;AAEnC,IAAA,IAAI;AACF,MAAA,MAAM,QAAQ,QAAA,EAAS;AACvB,MAAA,IAAI,iBAAiB,OAAA,EAAS;AAC5B,QAAA,OAAA,GAAU,KAAA,CAAM,MAAM,MAAM;AAAA,QAAC,CAAC,CAAA;AAC9B,QAAA,aAAA,GAAgB,MAAM,KAAA;AACtB,QAAA,OAAA,GAAU,IAAA;AAAA,MACZ,OAAO,aAAA,GAAgB,KAAA;AAEvB,MAAA,IAAI,MAAA,CAAO,GAAA,CAAI,aAAa,CAAA,EAAG;AAC7B,QAAA,OAAA,CAAQ,IAAA;AAAA,UACN;AAAA,SACF;AACA,QAAA;AAAA,MACF;AACA,MAAA,MAAA,CAAO,IAAI,aAAa,CAAA;AAExB,MAAA,IAAI,SAAA,UAAmB,QAAQ,CAAA;AAAA,yBACZ,MAAA,EAAO;AAAA,IAC5B,CAAA,CAAA,MAAQ;AACN,MAAA,IAAI,SAAA,UAAmB,IAAI,CAAA;AAAA,IAC7B;AAAA,EACF,CAAA,GAAG;AAEH,EAAA,OAAO,MAAM;AACX,IAAA,SAAA,GAAY,KAAA;AAAA,EACd,CAAA;AACF,CAAC;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polkadot-api/sm-provider",
3
- "version": "0.1.16",
3
+ "version": "0.2.1-canary.527fbf8",
4
4
  "author": "Josep M Sobrepere (https://github.com/josepot)",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,14 +35,14 @@
35
35
  "dist"
36
36
  ],
37
37
  "dependencies": {
38
- "@polkadot-api/json-rpc-provider": "0.0.4",
39
- "@polkadot-api/json-rpc-provider-proxy": "0.2.8"
38
+ "@polkadot-api/json-rpc-provider": "0.1.1-canary.527fbf8",
39
+ "@polkadot-api/json-rpc-provider-proxy": "0.3.1-canary.527fbf8"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@polkadot-api/smoldot": ">=0.3"
43
43
  },
44
44
  "devDependencies": {
45
- "@polkadot-api/smoldot": "0.3.15"
45
+ "@polkadot-api/smoldot": "0.3.16-canary.527fbf8"
46
46
  },
47
47
  "scripts": {
48
48
  "build-core": "tsc --noEmit && rollup -c ../../../rollup.config.js",