@venkateshcv1809/prosetta-sdk 0.3.0-develop.43348270046.1 → 0.4.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.
@@ -1 +1 @@
1
- var ProsettaSDK=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});let t=`PROSETTA_WASM_PATH`,n={[t]:void 0};function r(){let e=globalThis.process,t={PROSETTA_WASM_PATH:`<path_to_wasm_file>/prosetta.wasm`};return Object.fromEntries(Object.keys(n).map(n=>[n,t[n]||e?.env[n]]))}let i=`Set ${t} to a local prosetta.wasm path or an HTTP(S) URL.`,a,o,s=0;function c(){if(a)return Promise.resolve(a);if(o)return o;let e=s,t=u();return o=t,t.then(t=>(e===s&&(a=t),t)).finally(()=>{e===s&&(o=void 0)})}function l(){s+=1,a=void 0,o=void 0}async function u(){let{PROSETTA_WASM_PATH:e}=r();if(!e)throw Error(i);if(d(e)){let t=await fetch(e);if(!t.ok)throw Error(`Failed to download WASM from ${e}: ${t.status} ${t.statusText}`);return WebAssembly.compile(await t.arrayBuffer())}let t=globalThis.process?.getBuiltinModule?.(`fs`);if(!t)throw Error(`Loading a local WASM file requires Node.js with process.getBuiltinModule().`);let n=await t.promises.readFile(e);return WebAssembly.compile(n)}function d(e){return/^https?:\/\//i.test(e)}function f(){return c()}function p(){l()}return e.init=f,e.shutdown=p,e})({});
1
+ var ProsettaSDK=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});let t=`PROSETTA_WASM_PATH`,n={[t]:void 0};function r(){let e=globalThis.process,t={PROSETTA_WASM_PATH:`https://github.com/venkateshcv1809/polyglot-rosetta/releases/latest/download/prosetta.wasm`};return Object.fromEntries(Object.keys(n).map(n=>[n,t[n]||e?.env[n]]))}let i=`Set ${t} to a local prosetta.wasm path or an HTTP(S) URL.`,a,o,s=0;function c(){if(a)return Promise.resolve(a);if(o)return o;let e=s,t=u();return o=t,t.then(t=>(e===s&&(a=t),t)).finally(()=>{e===s&&(o=void 0)})}function l(){s+=1,a=void 0,o=void 0}async function u(){let{PROSETTA_WASM_PATH:e}=r();if(!e)throw Error(i);if(d(e)){let t=await fetch(e);if(!t.ok)throw Error(`Failed to download WASM from ${e}: ${t.status} ${t.statusText}`);return WebAssembly.compile(await t.arrayBuffer())}let t=globalThis.process?.getBuiltinModule?.(`fs`);if(!t)throw Error(`Loading a local WASM file requires Node.js with process.getBuiltinModule().`);let n=await t.promises.readFile(e);return WebAssembly.compile(n)}function d(e){return/^https?:\/\//i.test(e)}function f(){return c()}function p(){l()}return e.init=f,e.shutdown=p,e})({});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@venkateshcv1809/prosetta-sdk",
3
- "version": "0.3.0-develop.43348270046.1",
3
+ "version": "0.4.0",
4
4
  "description": "JavaScript SDK wrapper for the Polyglot Rosetta WebAssembly runtime.",
5
5
  "license": "MIT",
6
6
  "repository": {