withruntime 0.2.1 → 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.
Files changed (2) hide show
  1. package/cli.js +6 -7
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -1,8 +1,7 @@
1
1
  #!/usr/bin/env node
2
- // Forward to the official Runtime Cloud CLI in @withruntime/cloud.
3
- import { createRequire } from "node:module";
4
- import { dirname, join } from "node:path";
5
- import { pathToFileURL } from "node:url";
6
- const require = createRequire(import.meta.url);
7
- const main = require.resolve("@withruntime/cloud");
8
- await import(pathToFileURL(join(dirname(main), "cli.js")).href);
2
+ // Forward to the official Runtime Cloud CLI in @withruntime/cloud. The CLI runs
3
+ // only when it is the entry point, so point argv[1] at it before importing it.
4
+ import { fileURLToPath } from "node:url";
5
+ const cli = new URL("./cli.js", import.meta.resolve("@withruntime/cloud"));
6
+ process.argv[1] = fileURLToPath(cli);
7
+ await import(cli.href);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "withruntime",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Runtime Cloud's CLI. This name forwards to @withruntime/cloud, the official package from withruntime.com.",
5
5
  "homepage": "https://withruntime.com",
6
6
  "license": "MIT",