@unyt/datex 0.0.3 → 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)
|
|
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,12 +1,17 @@
|
|
|
1
1
|
import * as dntShim from "../../_dnt.shims.js";
|
|
2
2
|
import * as imports from "./datex_core_js.internal.js";
|
|
3
3
|
// for deno-to-node builds, fetch does not support streaming webassembly instantiation
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
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)), {
|
|
7
12
|
"./datex_core_js.internal.js": imports,
|
|
8
13
|
})
|
|
9
|
-
: await WebAssembly.
|
|
14
|
+
: await WebAssembly.instantiate(await dntShim.Deno.readFile(new URL("datex_core_js.wasm", globalThis[Symbol.for("import-meta-ponyfill-esmodule")](import.meta).url)), {
|
|
10
15
|
"./datex_core_js.internal.js": imports,
|
|
11
16
|
})).instance;
|
|
12
17
|
export * from "./datex_core_js.internal.js";
|
|
Binary file
|
|
@@ -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.
|
|
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", {
|