woodstone 0.1.9 → 0.1.11

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/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "woodstone",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "woodstone": "src/index.js"
7
7
  },
8
8
  "scripts": {
9
9
  "dev": "tsx watch src/index.ts",
10
- "build": "tsc && cp package.json build/ && cp libs/woodstone-engine.wasm build/libs/"
10
+ "build": "rm -rf build/ && tsc && cp package.json build/ && cp libs/woodstone-engine.wasm build/libs/",
11
+ "publish": "cd build/ && npm publish"
11
12
  },
12
13
  "author": "axryans",
13
14
  "license": "UNLICENSED",
package/src/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env node
1
2
  import { Hono } from 'hono';
2
3
  import { serve } from '@hono/node-server';
3
4
  import initialise from './initialise.js';
package/src/initialise.js CHANGED
@@ -17,7 +17,7 @@ export default async function initialise(c) {
17
17
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
18
18
  const wasm = globalThis;
19
19
  const go = new wasm.Go();
20
- const wasm_file = await readFile(path.resolve("./libs/woodstone-engine.wasm"));
20
+ const wasm_file = await readFile("../libs/woodstone-engine.wasm");
21
21
  const wasm_engine = await WebAssembly.instantiate(wasm_file, go.importObject);
22
22
  go.run(wasm_engine.instance);
23
23
  const index_file = wasm.getIndexFile();