@blue-quickjs/quickjs-wasm-constants 0.2.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 @blue-labs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,12 @@
1
+ # quickjs-wasm-constants
2
+
3
+ Shared constants and types describing QuickJS wasm build artifacts. This package is used by both `@blue-quickjs/quickjs-wasm` and `@blue-quickjs/quickjs-wasm-build`.
4
+
5
+ ## Usage
6
+
7
+ ```ts
8
+ import {
9
+ QUICKJS_WASM_BASENAME,
10
+ type QuickjsWasmBuildMetadata,
11
+ } from '@blue-quickjs/quickjs-wasm-constants';
12
+ ```
@@ -0,0 +1,2 @@
1
+ export * from './lib/quickjs-wasm-constants.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from './lib/quickjs-wasm-constants.js';
@@ -0,0 +1,47 @@
1
+ export type QuickjsWasmVariant = 'wasm32' | 'wasm64';
2
+ export type QuickjsWasmBuildType = 'release' | 'debug';
3
+ export declare const QUICKJS_WASM_BASENAME = "quickjs-eval.wasm";
4
+ export declare const QUICKJS_WASM_LOADER_BASENAME = "quickjs-eval.js";
5
+ export declare const QUICKJS_WASM_DEBUG_BASENAME = "quickjs-eval-debug.wasm";
6
+ export declare const QUICKJS_WASM_DEBUG_LOADER_BASENAME = "quickjs-eval-debug.js";
7
+ export declare const QUICKJS_WASM64_BASENAME = "quickjs-eval-wasm64.wasm";
8
+ export declare const QUICKJS_WASM64_LOADER_BASENAME = "quickjs-eval-wasm64.js";
9
+ export declare const QUICKJS_WASM64_DEBUG_BASENAME = "quickjs-eval-wasm64-debug.wasm";
10
+ export declare const QUICKJS_WASM64_DEBUG_LOADER_BASENAME = "quickjs-eval-wasm64-debug.js";
11
+ export declare const QUICKJS_WASM_METADATA_BASENAME = "quickjs-wasm-build.metadata.json";
12
+ export interface QuickjsWasmBuildArtifactInfo {
13
+ filename: string;
14
+ sha256: string;
15
+ size: number;
16
+ }
17
+ export interface QuickjsWasmBuildVariantMetadata {
18
+ engineBuildHash: string;
19
+ wasm: QuickjsWasmBuildArtifactInfo;
20
+ loader: QuickjsWasmBuildArtifactInfo;
21
+ variantFlags?: string[];
22
+ buildType: QuickjsWasmBuildType;
23
+ buildFlags?: string[];
24
+ }
25
+ export interface QuickjsWasmMemoryConfig {
26
+ initial: number | null;
27
+ maximum: number | null;
28
+ stackSize: number | null;
29
+ allowGrowth: boolean;
30
+ }
31
+ export interface QuickjsWasmDeterminismConfig {
32
+ sourceDateEpoch: number | null;
33
+ flags: string[];
34
+ }
35
+ export interface QuickjsWasmBuildConfig {
36
+ memory: QuickjsWasmMemoryConfig;
37
+ determinism: QuickjsWasmDeterminismConfig;
38
+ }
39
+ export interface QuickjsWasmBuildMetadata {
40
+ quickjsVersion: string;
41
+ quickjsCommit: string | null;
42
+ emscriptenVersion: string;
43
+ engineBuildHash: string | null;
44
+ build: QuickjsWasmBuildConfig;
45
+ variants: Partial<Record<QuickjsWasmVariant, Partial<Record<QuickjsWasmBuildType, QuickjsWasmBuildVariantMetadata>>>>;
46
+ }
47
+ //# sourceMappingURL=quickjs-wasm-constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quickjs-wasm-constants.d.ts","sourceRoot":"","sources":["../../src/lib/quickjs-wasm-constants.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACrD,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,OAAO,CAAC;AAEvD,eAAO,MAAM,qBAAqB,sBAAsB,CAAC;AACzD,eAAO,MAAM,4BAA4B,oBAAoB,CAAC;AAC9D,eAAO,MAAM,2BAA2B,4BAA4B,CAAC;AACrE,eAAO,MAAM,kCAAkC,0BAA0B,CAAC;AAC1E,eAAO,MAAM,uBAAuB,6BAA6B,CAAC;AAClE,eAAO,MAAM,8BAA8B,2BAA2B,CAAC;AACvE,eAAO,MAAM,6BAA6B,mCAAmC,CAAC;AAC9E,eAAO,MAAM,oCAAoC,iCACjB,CAAC;AACjC,eAAO,MAAM,8BAA8B,qCACP,CAAC;AAErC,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,+BAA+B;IAC9C,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,4BAA4B,CAAC;IACnC,MAAM,EAAE,4BAA4B,CAAC;IACrC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,SAAS,EAAE,oBAAoB,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,4BAA4B;IAC3C,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,uBAAuB,CAAC;IAChC,WAAW,EAAE,4BAA4B,CAAC;CAC3C;AAED,MAAM,WAAW,wBAAwB;IACvC,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,KAAK,EAAE,sBAAsB,CAAC;IAC9B,QAAQ,EAAE,OAAO,CACf,MAAM,CACJ,kBAAkB,EAClB,OAAO,CAAC,MAAM,CAAC,oBAAoB,EAAE,+BAA+B,CAAC,CAAC,CACvE,CACF,CAAC;CACH"}
@@ -0,0 +1,9 @@
1
+ export const QUICKJS_WASM_BASENAME = 'quickjs-eval.wasm';
2
+ export const QUICKJS_WASM_LOADER_BASENAME = 'quickjs-eval.js';
3
+ export const QUICKJS_WASM_DEBUG_BASENAME = 'quickjs-eval-debug.wasm';
4
+ export const QUICKJS_WASM_DEBUG_LOADER_BASENAME = 'quickjs-eval-debug.js';
5
+ export const QUICKJS_WASM64_BASENAME = 'quickjs-eval-wasm64.wasm';
6
+ export const QUICKJS_WASM64_LOADER_BASENAME = 'quickjs-eval-wasm64.js';
7
+ export const QUICKJS_WASM64_DEBUG_BASENAME = 'quickjs-eval-wasm64-debug.wasm';
8
+ export const QUICKJS_WASM64_DEBUG_LOADER_BASENAME = 'quickjs-eval-wasm64-debug.js';
9
+ export const QUICKJS_WASM_METADATA_BASENAME = 'quickjs-wasm-build.metadata.json';
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "@blue-quickjs/quickjs-wasm-constants",
3
+ "version": "0.2.0",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ "./package.json": "./package.json",
10
+ ".": {
11
+ "@blue-quickjs/source": "./src/index.ts",
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.js",
14
+ "default": "./dist/index.js"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "!**/*.tsbuildinfo"
20
+ ],
21
+ "nx": {
22
+ "name": "quickjs-wasm-constants"
23
+ },
24
+ "dependencies": {
25
+ "tslib": "^2.3.0"
26
+ },
27
+ "license": "MIT",
28
+ "publishConfig": {
29
+ "access": "public"
30
+ },
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "git+https://github.com/bluecontract/blue-quickjs.git"
34
+ }
35
+ }