@unyt/datex 0.0.2 → 0.0.4

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/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  <img align="right" src="assets/datex-logo-light.svg" width="150px" alt="The DATEX logo">
6
6
 
7
7
  The DATEX Core Library for JavaScript (DATEX Core JS) is based on the
8
- [DATEX Core](https://github.com/unyt-org/datex-core) rust library and provides a
8
+ [DATEX Core](https://github.com/unyt-org/datex-core) Rust library and provides a
9
9
  high-level API for working with DATEX in JavaScript and TypeScript. DATEX is
10
10
  developed and maintained by the [unyt.org](https://unyt.org) organization and
11
11
  community.
package/esm/deno.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unyt/datex",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "license": "MIT",
5
5
  "exports": "./src/mod.ts",
6
6
  "compilerOptions": {
@@ -1,14 +1,17 @@
1
1
  import * as dntShim from "../../_dnt.shims.js";
2
2
  import * as imports from "./datex_core_js.internal.js";
3
- // dnt-shim-ignore
4
- const isNodeOrBun = !globalThis.Deno &&
5
- (typeof globalThis.process !== "undefined") &&
6
- (typeof globalThis.process.versions.node !== "undefined");
7
- const wasm = (isNodeOrBun
8
- ? await WebAssembly.instantiate(await dntShim.Deno.readFile(new URL("datex_core_js.wasm", globalThis[Symbol.for("import-meta-ponyfill-esmodule")](import.meta).url)), {
3
+ // for deno-to-node builds, fetch does not support streaming webassembly instantiation
4
+ const isDntBuild = !!dntShim.dntGlobalThis[Symbol.for("import-meta-ponyfill-commonjs")];
5
+ const isBrowser = !globalThis.navigator?.userAgent.startsWith("Deno") &&
6
+ !globalThis.navigator?.userAgent.startsWith("Node.js") &&
7
+ !globalThis.navigator?.userAgent.startsWith("Bun");
8
+ const wasm = (isBrowser // TODO: Deno should also do instantiateStreaming (globalThis.Deno && !isDntBuild)
9
+ ? await WebAssembly.instantiateStreaming(
10
+ // dnt-shim-ignore
11
+ fetch(new URL("datex_core_js.wasm", import.meta.url)), {
9
12
  "./datex_core_js.internal.js": imports,
10
13
  })
11
- : await WebAssembly.instantiateStreaming(dntShim.fetch(new URL("datex_core_js.wasm", globalThis[Symbol.for("import-meta-ponyfill-esmodule")](import.meta).url)), {
14
+ : await WebAssembly.instantiate(await dntShim.Deno.readFile(new URL("datex_core_js.wasm", globalThis[Symbol.for("import-meta-ponyfill-esmodule")](import.meta).url)), {
12
15
  "./datex_core_js.internal.js": imports,
13
16
  })).instance;
14
17
  export * from "./datex_core_js.internal.js";
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../src/src/runtime/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAMtE,UAAU,UAAU;IAChB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,6BAA6B,CAAC,EAAE,OAAO,CAAC;CAC3C;AAGD,qBAAa,OAAO;;IAChB,SAAgB,UAAU,SAAW;gBAMzB,QAAQ,GAAE,MAAgB,EAAE,WAAW,CAAC,EAAE,UAAU;IAMhE;;OAEG;IACH,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,IAAI,OAAO,IAAI,MAAM,CAEpB;IAED,IAAI,MAAM,IAAI,QAAQ,CAErB;IAED,IAAI,MAAM,IAAI,QAAQ,CAErB;IAED;;OAEG;IACH,IAAI,QAAQ,IAAI,SAAS,CAExB;IAEM,OAAO,CAAC,YAAY,EAAE,MAAM,EAAE,SAAS,GAAE,OAAe,GAAG,MAAM;IAIjE,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO;CAG1D"}
1
+ {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../src/src/runtime/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAMtE,UAAU,UAAU;IAChB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,6BAA6B,CAAC,EAAE,OAAO,CAAC;CAC3C;AAED,qBAAa,OAAO;;IAChB,SAAgB,UAAU,SAAW;gBAMzB,QAAQ,GAAE,MAAgB,EAAE,WAAW,CAAC,EAAE,UAAU;IAMhE;;OAEG;IACH,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,IAAI,OAAO,IAAI,MAAM,CAEpB;IAED,IAAI,MAAM,IAAI,QAAQ,CAErB;IAED,IAAI,MAAM,IAAI,QAAQ,CAErB;IAED;;OAEG;IACH,IAAI,QAAQ,IAAI,SAAS,CAExB;IAEM,OAAO,CAAC,YAAY,EAAE,MAAM,EAAE,SAAS,GAAE,OAAe,GAAG,MAAM;IAIjE,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO;CAG1D"}
@@ -12,7 +12,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
12
12
  var _Runtime_runtime, _Runtime_memory, _Runtime_comHub;
13
13
  import { execute, execute_internal, init_runtime } from "../datex-core.js";
14
14
  // auto-generated version - do not edit:
15
- const VERSION = "0.0.2";
15
+ const VERSION = "0.0.4";
16
16
  export class Runtime {
17
17
  constructor(endpoint = "@unyt", debug_flags) {
18
18
  Object.defineProperty(this, "js_version", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unyt/datex",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/unyt-org/datex-core-js.git"