@oliphaunt/wasix-tools 0.1.0 → 0.2.2

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/CHANGELOG.md CHANGED
@@ -1,33 +1,12 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.0 (2026-09-05)
3
+ ## [0.2.2]() (2026-09-29)
4
4
 
5
5
 
6
- ### ⚠ BREAKING CHANGES
7
-
8
- * **wasix-ts:** run host runtimes through Rust Node-API ([#156](https://github.com/f0rr0/oliphaunt/issues/156))
9
- * **sdk:** unify embedded PostgreSQL public APIs ([#153](https://github.com/f0rr0/oliphaunt/issues/153))
10
- * Rust WASIX removes temporary/application-data storage variants, and browser IndexedDB uses the new per-database v3 layout without migrating prior generations.
11
-
12
- ### Features
13
-
14
- * **sdk:** unify embedded PostgreSQL public APIs ([#153](https://github.com/f0rr0/oliphaunt/issues/153)) ([4384d1b](https://github.com/f0rr0/oliphaunt/commit/4384d1bdfafee07e4e1963ac68027b4bcf002a1e))
15
- * unify native and WASIX runtimes and SDKs ([#129](https://github.com/f0rr0/oliphaunt/issues/129)) ([fae2bd7](https://github.com/f0rr0/oliphaunt/commit/fae2bd7bde00ae436d9b62ba6a37d919679ac790))
16
- * **wasix-ts:** run host runtimes through Rust Node-API ([#156](https://github.com/f0rr0/oliphaunt/issues/156)) ([28e07be](https://github.com/f0rr0/oliphaunt/commit/28e07be782388915b28ad3fd30e3e78143710d28))
17
-
18
-
19
- ### Bug Fixes
20
-
21
- * **ci:** preserve native lifecycle server sessions ([#165](https://github.com/f0rr0/oliphaunt/issues/165)) ([b8cab0b](https://github.com/f0rr0/oliphaunt/commit/b8cab0be2b86c6b9fab4c279add89113c5797d23))
22
-
23
-
24
- ### Performance Improvements
25
-
26
- * **js:** streamline exec response handling ([#158](https://github.com/f0rr0/oliphaunt/issues/158)) ([5eaf05b](https://github.com/f0rr0/oliphaunt/commit/5eaf05b8a8d21bd974b9fcb6d618103be5689151))
27
- * **wasix:** preserve and accelerate seek end ([#154](https://github.com/f0rr0/oliphaunt/issues/154)) ([169852f](https://github.com/f0rr0/oliphaunt/commit/169852f22d1c5eab4cfd30c17ccca014b8d84592))
6
+ ### Code Refactoring
28
7
 
8
+ * organize sources by native and WASIX runtime families ([#215](https://github.com/f0rr0/oliphaunt/issues/215)) ([a8f9bfe](https://github.com/f0rr0/oliphaunt/commit/a8f9bfe75f4cff0426f0089eb248783efacbde2e))
29
9
 
30
- ### Code Refactoring
10
+ ## Changelog
31
11
 
32
- * **ci:** align product and release task boundaries ([#170](https://github.com/f0rr0/oliphaunt/issues/170)) ([009a5f5](https://github.com/f0rr0/oliphaunt/commit/009a5f5ec0659d70f6a22902c071a81e0806fabe))
33
- * **ci:** model independent product dependencies ([#173](https://github.com/f0rr0/oliphaunt/issues/173)) ([2d5f90c](https://github.com/f0rr0/oliphaunt/commit/2d5f90c837ef7ecd8b43c2547e4b3c9b04767121))
12
+ This product carries forward the PostgreSQL utility packages previously released with liboliphaunt-wasix. Existing published versions remain in their original release history.
package/README.md CHANGED
@@ -13,7 +13,7 @@ They reset PostgreSQL session state before and after running, so raw-protocol
13
13
  callers must not expect prepared statements or session settings to survive.
14
14
 
15
15
  ```sh
16
- pnpm add @oliphaunt/wasix-ts @oliphaunt/wasix-tools
16
+ bun add @oliphaunt/wasix-ts @oliphaunt/wasix-tools
17
17
  ```
18
18
 
19
19
  ```ts
@@ -41,3 +41,22 @@ input and `pg_restore` are not part of this package.
41
41
 
42
42
  Tool failures throw `PostgresToolError` with `tool`, `exitCode`, `stdout`, and
43
43
  `stderr` fields.
44
+
45
+ ## Maintainer commands
46
+
47
+ After installing the pinned workspace tools and dependencies, run these from
48
+ this directory:
49
+
50
+ ```sh
51
+ moon run oliphaunt-wasix-tools-ts:build
52
+ moon run oliphaunt-wasix-tools-ts:typecheck
53
+ moon run oliphaunt-wasix-tools-ts:test
54
+ moon run oliphaunt-wasix-tools-ts:package
55
+ ```
56
+
57
+ Build and typecheck first build the SDK's actual declarations; they do not
58
+ compile PostgreSQL, Wasmer or the Node addon. Packaging depends on this build
59
+ and stages only the facade. `bun run build` and `bun run typecheck` consume an
60
+ already built SDK. The separate `postgres-tools-wasix:test-consumer` and
61
+ `postgres-tools-wasix:test-browser` tasks produce the runtime/tool dependencies
62
+ and exercise the installed packages on their respective hosts.
@@ -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/runtimes/liboliphaunt/native/THIRD_PARTY_NOTICES.md`
10
- - `src/bindings/wasix-rust/THIRD_PARTY_NOTICES.md`
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/versions/18/`, `src/sources/third-party/`, and
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/runtimes/liboliphaunt/licenses/`; their source pins and digests are
20
- enforced by `tools/release/release-notices.mjs`.
19
+ `src/third-party/`; their source pins and digests are
20
+ enforced by `tools/packaging/release-notices.mts`.
package/lib/index.js CHANGED
@@ -1,8 +1,6 @@
1
1
  import tools from '@oliphaunt/liboliphaunt-wasix-tools';
2
- import { getWasixDatabaseIdentity, runWasixToolProcess } from '@oliphaunt/wasix-ts/internal/tools';
2
+ import { runWasixToolProcess } from '@oliphaunt/wasix-ts/internal/tools';
3
3
  assertToolsCarrier();
4
- const VIRTUAL_TOOL_HOST = '127.0.0.1';
5
- const VIRTUAL_TOOL_PORT = '65432';
6
4
  // PostgreSQL 18 getopt_long optstrings. A value-taking option owns the rest
7
5
  // of its token, so a managed-looking character inside that value stays data.
8
6
  const PG_DUMP_SHORT_OPTIONS = 'abBcCd:e:E:f:F:h:j:n:N:Op:RsS:t:T:U:vwWxXZ:';
@@ -54,16 +52,7 @@ export class PostgresToolError extends Error {
54
52
  /** Run standard PostgreSQL plain pg_dump against an open WASIX database. */
55
53
  export async function pgDump(database, options = {}) {
56
54
  const args = validatedArguments('pg_dump', options.args, pgDumpManagedArgument, PG_DUMP_SHORT_OPTIONS, PG_DUMP_VALUE_OPTIONS);
57
- const identity = getWasixDatabaseIdentity(database);
58
- return runTool('pg_dump', database, [
59
- ...args,
60
- '--encoding=UTF8',
61
- '--no-password',
62
- `--username=${identity.username}`,
63
- `--host=${VIRTUAL_TOOL_HOST}`,
64
- `--port=${VIRTUAL_TOOL_PORT}`,
65
- `--dbname=${identity.database}`,
66
- ]);
55
+ return runTool('pg_dump', database, args);
67
56
  }
68
57
  /**
69
58
  * Run standard non-interactive psql. Browsers require a `/worker` database;
@@ -79,21 +68,9 @@ export async function psql(database, options = {}) {
79
68
  if (command === undefined && script === undefined && args.length === 0) {
80
69
  throw new TypeError('psql requires non-interactive input through command, script, or args');
81
70
  }
82
- const inputArgs = command !== undefined ? ['--command', command] : script !== undefined ? ['--file=-'] : [];
83
- const identity = getWasixDatabaseIdentity(database);
84
- return runTool('psql', database, [
85
- ...args,
86
- '--no-psqlrc',
87
- '--no-password',
88
- '--set=ON_ERROR_STOP=1',
89
- `--username=${identity.username}`,
90
- `--host=${VIRTUAL_TOOL_HOST}`,
91
- `--port=${VIRTUAL_TOOL_PORT}`,
92
- `--dbname=${identity.database}`,
93
- ...inputArgs,
94
- ], script === undefined ? undefined : new TextEncoder().encode(script));
71
+ return runTool('psql', database, args, script === undefined ? undefined : new TextEncoder().encode(script), command);
95
72
  }
96
- async function runTool(name, database, args, stdin) {
73
+ async function runTool(name, database, args, stdin, command) {
97
74
  const descriptor = name === 'pg_dump' ? tools.pgDump : tools.psql;
98
75
  let result;
99
76
  try {
@@ -102,6 +79,7 @@ async function runTool(name, database, args, stdin) {
102
79
  tool: descriptor,
103
80
  args,
104
81
  stdin,
82
+ command,
105
83
  });
106
84
  }
107
85
  catch (cause) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliphaunt/wasix-tools",
3
- "version": "0.1.0",
3
+ "version": "0.2.2",
4
4
  "description": "Optional in-process PostgreSQL pg_dump and psql runners for Oliphaunt WASIX.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -8,7 +8,7 @@
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+https://github.com/f0rr0/oliphaunt.git",
11
- "directory": "src/bindings/wasix-ts/tools-package"
11
+ "directory": "src/wasix/postgres-tools/ts"
12
12
  },
13
13
  "bugs": {
14
14
  "url": "https://github.com/f0rr0/oliphaunt/issues"
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "oliphaunt": {
22
22
  "runtimeProduct": "liboliphaunt-wasix",
23
- "runtimeVersion": "0.2.0"
23
+ "runtimeVersion": "0.3.0"
24
24
  },
25
25
  "exports": {
26
26
  ".": {
@@ -39,14 +39,14 @@
39
39
  "THIRD_PARTY_NOTICES.md"
40
40
  ],
41
41
  "dependencies": {
42
- "@oliphaunt/liboliphaunt-wasix-tools": "0.2.0"
42
+ "@oliphaunt/liboliphaunt-wasix-tools": "0.2.2"
43
43
  },
44
44
  "peerDependencies": {
45
- "@oliphaunt/wasix-ts": "0.1.0"
45
+ "@oliphaunt/wasix-ts": "0.2.0"
46
46
  },
47
47
  "engines": {
48
48
  "node": ">=22.13 <25",
49
49
  "bun": ">=1.3.14",
50
50
  "deno": ">=2.8.1"
51
51
  }
52
- }
52
+ }