@oliphaunt/liboliphaunt-wasix-tools 0.2.0 → 0.2.3
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/THIRD_PARTY_NOTICES.md +5 -5
- package/THIRD_PARTY_NOTICES.oliphaunt-wasix.md +5 -5
- package/assets/pg_dump.wasix.wasm +0 -0
- package/assets/psql.wasix.wasm +0 -0
- package/index.d.ts +1 -1
- package/index.js +4 -4
- package/native.js +46 -0
- package/package.json +15 -5
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -6,15 +6,15 @@ Oliphaunt source code in this repository is licensed under the MIT license in
|
|
|
6
6
|
This file is the repository-level notice index. Product-specific runtime and
|
|
7
7
|
packaging notices live next to the product that ships the relevant artifacts:
|
|
8
8
|
|
|
9
|
-
- `src/
|
|
10
|
-
- `src/
|
|
9
|
+
- `src/native/runtime/THIRD_PARTY_NOTICES.md`
|
|
10
|
+
- `src/wasix/sdks/rust/THIRD_PARTY_NOTICES.md`
|
|
11
11
|
|
|
12
12
|
Shared PostgreSQL source pins, third-party source pins, and extension metadata
|
|
13
|
-
are maintained in `src/postgres
|
|
13
|
+
are maintained in `src/third-party/postgres/`, `src/third-party/`, and
|
|
14
14
|
`src/extensions/`. Generated release artifacts must include the notices and
|
|
15
15
|
exact pinned license bytes for every product and third-party component they
|
|
16
16
|
ship.
|
|
17
17
|
|
|
18
18
|
Canonical runtime license snapshots live in
|
|
19
|
-
`src/
|
|
20
|
-
enforced by `tools/
|
|
19
|
+
`src/third-party/`; their source pins and digests are
|
|
20
|
+
enforced by `tools/packaging/release-notices.mts`.
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
and target-specific Wasmer AOT artifacts.
|
|
5
5
|
|
|
6
6
|
The PostgreSQL runtime is derived from PostgreSQL 18 source pinned under
|
|
7
|
-
`src/postgres
|
|
8
|
-
`src/
|
|
7
|
+
`src/third-party/postgres/` and built with the WASM/WASIX patch stack owned by
|
|
8
|
+
`src/wasix/runtime/assets/build/postgres/patches/`. Selected
|
|
9
9
|
runtime and extension carriers also embed ICU 76.1 and OpenSSL 3.5.6.
|
|
10
10
|
|
|
11
11
|
Every carrier that embeds these components includes their exact pinned license
|
|
@@ -18,7 +18,7 @@ bytes under `THIRD_PARTY_LICENSES/`:
|
|
|
18
18
|
`286ddeaac037533bbdce65b3c689e3f7ffebf0f6`.
|
|
19
19
|
|
|
20
20
|
Third-party source pins for optional external extensions are maintained in
|
|
21
|
-
`src/
|
|
22
|
-
`
|
|
23
|
-
`
|
|
21
|
+
`src/third-party/`, and WASIX toolchain inputs are maintained in
|
|
22
|
+
`tools/dev/`. Exact SQL extension selection is modeled in
|
|
23
|
+
`extensions/`; generated WASM assets must include only the
|
|
24
24
|
extension artifacts explicitly selected for the release payload.
|
|
Binary file
|
package/assets/psql.wasix.wasm
CHANGED
|
Binary file
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type WasixToolModule = Readonly<{ name: 'pg_dump' | 'psql'; sha256: string; size: number; source: string }>;
|
|
1
|
+
export type WasixToolModule = Readonly<{ name: 'pg_dump' | 'psql'; sha256: string; size: number; source: string; aot?: Readonly<{source: string; manifest: string}> }>;
|
|
2
2
|
export type WasixToolsDescriptor = Readonly<{ schema: 'oliphaunt-wasix-tools-v1'; product: 'oliphaunt-wasix-tools'; version: string; runtimeProduct: 'liboliphaunt-wasix'; runtimeVersion: string; pgDump: WasixToolModule; psql: WasixToolModule }>;
|
|
3
3
|
declare const descriptor: WasixToolsDescriptor;
|
|
4
4
|
export default descriptor;
|
package/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export default Object.freeze({
|
|
2
2
|
schema: 'oliphaunt-wasix-tools-v1',
|
|
3
3
|
product: 'oliphaunt-wasix-tools',
|
|
4
|
-
version: "0.2.
|
|
4
|
+
version: "0.2.3",
|
|
5
5
|
runtimeProduct: 'liboliphaunt-wasix',
|
|
6
|
-
runtimeVersion: "0.
|
|
7
|
-
pgDump: Object.freeze({ name: "pg_dump", sha256: "
|
|
8
|
-
psql: Object.freeze({ name: "psql", sha256: "
|
|
6
|
+
runtimeVersion: "0.3.1",
|
|
7
|
+
pgDump: Object.freeze({ name: "pg_dump", sha256: "7bed69d03782da2608fe1abdc2ac247cbdacd5a0ef5cd82fbe508865de5e6b8a", size: 1324813, source: new URL('./assets/pg_dump.wasix.wasm', import.meta.url).href }),
|
|
8
|
+
psql: Object.freeze({ name: "psql", sha256: "306882fc087056990cba6e3c05e6ea04959a1bb9e44fbfe9b2bb0ef70a45f20f", size: 1430530, source: new URL('./assets/psql.wasix.wasm', import.meta.url).href }),
|
|
9
9
|
});
|
package/native.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
import { dirname, join } from 'node:path';
|
|
4
|
+
import { pathToFileURL } from 'node:url';
|
|
5
|
+
import portable from './index.js';
|
|
6
|
+
|
|
7
|
+
const require = createRequire(import.meta.url);
|
|
8
|
+
const targets = {
|
|
9
|
+
'linux-arm64': 'linux-arm64-gnu',
|
|
10
|
+
'linux-x64': 'linux-x64-gnu',
|
|
11
|
+
'darwin-arm64': 'darwin-arm64',
|
|
12
|
+
'win32-x64': 'win32-x64-msvc',
|
|
13
|
+
};
|
|
14
|
+
const target = targets[`${process.platform}-${process.arch}`];
|
|
15
|
+
if (!target)
|
|
16
|
+
throw new Error(`WASIX PostgreSQL tools do not support ${process.platform}/${process.arch}`);
|
|
17
|
+
const root = dirname(require.resolve(`@oliphaunt/liboliphaunt-wasix-tools-${target}/package.json`));
|
|
18
|
+
const carrier = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8'));
|
|
19
|
+
if (carrier.version !== portable.version)
|
|
20
|
+
throw new Error('WASIX tools AOT carrier version differs from the portable tools package');
|
|
21
|
+
const manifestFile = join(root, 'assets/manifest.json');
|
|
22
|
+
const manifest = JSON.parse(readFileSync(manifestFile, 'utf8'));
|
|
23
|
+
const tool = (descriptor) => {
|
|
24
|
+
const artifact = manifest.artifacts.find(({ name }) => name === `tool:${descriptor.name}`);
|
|
25
|
+
if (
|
|
26
|
+
!artifact ||
|
|
27
|
+
typeof artifact.path !== 'string' ||
|
|
28
|
+
artifact.path.includes('..') ||
|
|
29
|
+
artifact.path.includes('/') ||
|
|
30
|
+
artifact.path.includes('\\')
|
|
31
|
+
) {
|
|
32
|
+
throw new Error(`WASIX tools AOT carrier is missing ${descriptor.name}`);
|
|
33
|
+
}
|
|
34
|
+
return Object.freeze({
|
|
35
|
+
...descriptor,
|
|
36
|
+
aot: Object.freeze({
|
|
37
|
+
source: pathToFileURL(join(root, 'assets', artifact.path)).href,
|
|
38
|
+
manifest: pathToFileURL(manifestFile).href,
|
|
39
|
+
}),
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
export default Object.freeze({
|
|
43
|
+
...portable,
|
|
44
|
+
pgDump: tool(portable.pgDump),
|
|
45
|
+
psql: tool(portable.psql),
|
|
46
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oliphaunt/liboliphaunt-wasix-tools",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Portable WASIX pg_dump and psql modules for Oliphaunt hosts.",
|
|
5
5
|
"license": "MIT AND PostgreSQL AND Unicode-3.0",
|
|
6
6
|
"type": "module",
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
"url": "git+https://github.com/f0rr0/oliphaunt.git"
|
|
11
11
|
},
|
|
12
12
|
"oliphaunt": {
|
|
13
|
-
"product": "
|
|
13
|
+
"product": "postgres-tools-wasix",
|
|
14
14
|
"kind": "wasix-tools",
|
|
15
15
|
"runtime": "wasix",
|
|
16
16
|
"target": "portable",
|
|
17
|
-
"runtimeVersion": "0.
|
|
17
|
+
"runtimeVersion": "0.3.1",
|
|
18
18
|
"descriptorSchema": "oliphaunt-wasix-tools-v1"
|
|
19
19
|
},
|
|
20
20
|
"publishConfig": {
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"files": [
|
|
25
25
|
"README.md",
|
|
26
26
|
"index.js",
|
|
27
|
+
"native.js",
|
|
27
28
|
"index.d.ts",
|
|
28
29
|
"assets",
|
|
29
30
|
"LICENSE",
|
|
@@ -32,12 +33,21 @@
|
|
|
32
33
|
"THIRD_PARTY_LICENSES/PostgreSQL-COPYRIGHT",
|
|
33
34
|
"THIRD_PARTY_LICENSES/ICU-LICENSE"
|
|
34
35
|
],
|
|
36
|
+
"optionalDependencies": {
|
|
37
|
+
"@oliphaunt/liboliphaunt-wasix-tools-linux-arm64-gnu": "0.2.3",
|
|
38
|
+
"@oliphaunt/liboliphaunt-wasix-tools-linux-x64-gnu": "0.2.3",
|
|
39
|
+
"@oliphaunt/liboliphaunt-wasix-tools-darwin-arm64": "0.2.3",
|
|
40
|
+
"@oliphaunt/liboliphaunt-wasix-tools-win32-x64-msvc": "0.2.3"
|
|
41
|
+
},
|
|
35
42
|
"exports": {
|
|
36
43
|
".": {
|
|
37
44
|
"types": "./index.d.ts",
|
|
38
|
-
"
|
|
45
|
+
"browser": "./index.js",
|
|
46
|
+
"node": "./native.js",
|
|
47
|
+
"bun": "./native.js",
|
|
48
|
+
"deno": "./native.js",
|
|
39
49
|
"default": "./index.js"
|
|
40
50
|
},
|
|
41
51
|
"./package.json": "./package.json"
|
|
42
52
|
}
|
|
43
|
-
}
|
|
53
|
+
}
|