@hazae41/turbine 0.1.7 → 0.1.8

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
@@ -11,5 +11,5 @@ deno install --global npm:@hazae41/turbine --name turbine
11
11
  ## Usage
12
12
 
13
13
  ```bash
14
- turbine serve --data=./local --port=80 --uuid=7d07d60d-cb47-4b6f-ad1d-f2650610ce67
14
+ turbine serve ./local --port=80
15
15
  ```
package/out/mod.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- export * from "./mods/mod.ts";
2
+ export * from "./mods/mod.d.ts";
3
3
  export declare function main(args: string[]): Promise<void>;
package/out/mod.js CHANGED
@@ -17,7 +17,7 @@ export async function main(args) {
17
17
  }
18
18
  break;
19
19
  }
20
- console.log("serve [--uuid=<uuid>] [--data=<data folder as path>] [--port=<port>] [--dev]");
20
+ console.log("serve [--data=<data folder as path>] [--port=<port>] [--dev]");
21
21
  return;
22
22
  }
23
23
  if (import.meta.main) {
package/out/mods/mod.d.ts CHANGED
@@ -1 +1 @@
1
- export * from "./turbine/mod.ts";
1
+ export * from "./turbine/mod.d.ts";
@@ -1 +1 @@
1
- export * from "./server/mod.ts";
1
+ export * from "./server/mod.d.ts";
@@ -6,18 +6,6 @@ export async function main(args) {
6
6
  const options = {};
7
7
  for (let i = 0; i < args.length; i++) {
8
8
  const arg = args[i];
9
- if (arg.startsWith("--env=")) {
10
- process.loadEnvFile(arg.slice("--env=".length));
11
- continue;
12
- }
13
- if (arg.startsWith("--uuid=")) {
14
- options.uuid = arg.slice("--uuid=".length);
15
- continue;
16
- }
17
- if (arg.startsWith("--data=")) {
18
- options.path = arg.slice("--data=".length);
19
- continue;
20
- }
21
9
  if (arg.startsWith("--port=")) {
22
10
  options.port = Number(arg.slice("--port=".length));
23
11
  continue;
@@ -26,11 +14,11 @@ export async function main(args) {
26
14
  process.env.NODE_ENV = "development";
27
15
  continue;
28
16
  }
29
- throw new Error(`Unknown argument: ${arg}`);
17
+ options.path = arg;
30
18
  }
31
- const { uuid = process.env.UUID || "98e31aaf-c518-430b-8863-eed26c44d91f", path = process.env.DATA || "./data", port = Number(process.env.PORT) || 8080 } = options;
19
+ const { path = "./data", port = 8080 } = options;
32
20
  console.log("Starting...");
33
- const worker = await RpcWorkerClient.spawn(uuid, path);
21
+ const worker = await RpcWorkerClient.spawn(path);
34
22
  const server = new Server(worker);
35
23
  Deno.serve({ hostname: "0.0.0.0", port }, (request) => server.respond(request));
36
24
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@hazae41/turbine",
4
- "version": "0.1.7",
4
+ "version": "0.1.8",
5
5
  "description": "Bobine over HTTP and WebSocket",
6
6
  "repository": "github:hazae41/turbine",
7
7
  "author": "hazae41",
@@ -9,8 +9,8 @@
9
9
  "scripts": {
10
10
  "examine": "deno lint ./src && deno check ./src && deno test -R ./src",
11
11
  "prepack": "rm -rf ./out && tsc && tscousin",
12
- "produce": "deno run -A ./src/mod.ts serve --data=./local --uuid=7d07d60d-cb47-4b6f-ad1d-f2650610ce67",
13
- "develop": "deno run -A ./src/mod.ts serve --data=./local --uuid=7d07d60d-cb47-4b6f-ad1d-f2650610ce67 --dev"
12
+ "produce": "deno run -A ./src/mod.ts serve ./local",
13
+ "develop": "deno run -A ./src/mod.ts serve ./local --dev"
14
14
  },
15
15
  "files": [
16
16
  "./out"
@@ -23,14 +23,14 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "@hazae41/binary": "^2.1.1",
26
- "@hazae41/bobine": "^0.1.8",
26
+ "@hazae41/bobine": "^0.1.11",
27
27
  "@hazae41/jsonrpc": "^1.2.1",
28
28
  "@hazae41/mutex": "^3.0.1",
29
29
  "@hazae41/webpack": "^1.0.1"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@hazae41/phobos": "^2.0.16",
33
- "@hazae41/tscousin": "^1.0.28",
33
+ "@hazae41/tscousin": "^1.0.33",
34
34
  "@types/node": "^26.6.11",
35
35
  "typescript": "^7.0.2"
36
36
  },