@slashid/jump-page 0.0.7-beta.2 → 0.0.7-beta.4

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 +14 -7
  2. package/package.json +2 -2
package/cli.js CHANGED
@@ -1,9 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { program } from "commander";
4
3
  import { createRequire } from "node:module";
4
+ import path from "node:path";
5
+ import { fileURLToPath } from "node:url";
6
+
7
+ import { program } from "commander";
5
8
  import { preview } from "astro";
6
9
 
10
+ const __filename = fileURLToPath(import.meta.url);
11
+ const __dirname = path.dirname(__filename);
12
+
7
13
  const require = createRequire(import.meta.url);
8
14
 
9
15
  const packageJson = require("./package.json");
@@ -24,11 +30,7 @@ program
24
30
  },
25
31
  4321
26
32
  )
27
- .option(
28
- "-a, --api-url <char>",
29
- "SlashID API URL",
30
- "https://slashid.local"
31
- )
33
+ .option("-a, --api-url <char>", "SlashID API URL", "https://slashid.local")
32
34
  .option(
33
35
  "-s, --sdk-url <char>",
34
36
  "SlashID SDK URL",
@@ -38,8 +40,13 @@ program
38
40
  process.env.PUBLIC_SID_SDK_URL = options.sdkUrl;
39
41
  process.env.PUBLIC_SID_API_URL = options.apiUrl;
40
42
 
43
+ console.log("outdir", path.resolve(__dirname, "dist"));
44
+
41
45
  // TODO this will build with the default values, not the ones passed in
42
- await preview({ server: { port: options.port } });
46
+ await preview({
47
+ server: { port: options.port },
48
+ outDir: path.resolve(__dirname, "dist"),
49
+ });
43
50
  });
44
51
 
45
52
  // Parse the command line arguments
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@slashid/jump-page",
3
3
  "type": "module",
4
- "version": "0.0.7-beta.2",
4
+ "version": "0.0.7-beta.4",
5
5
  "private": false,
6
6
  "publishConfig": {
7
- "access": "restricted"
7
+ "access": "public"
8
8
  },
9
9
  "bin": {
10
10
  "sid-jump-cli": "./cli.js"