envx-cli-tmr 1.0.10 → 1.0.12
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/bin/envx.js +8 -8
- package/lib/auth.js +3 -1
- package/package.json +1 -1
package/bin/envx.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { Command } from "commander";
|
|
4
|
-
import { login } from "
|
|
5
|
-
import { projects } from "
|
|
6
|
-
import { pull } from "
|
|
7
|
-
import { push } from "
|
|
8
|
-
import { join } from "
|
|
9
|
-
import { invite } from "
|
|
10
|
-
import { create } from "
|
|
11
|
-
import { init } from "
|
|
4
|
+
import { login } from "../commands/login.js";
|
|
5
|
+
import { projects } from "../commands/projects.js";
|
|
6
|
+
import { pull } from "../commands/pull.js";
|
|
7
|
+
import { push } from "../commands/push.js";
|
|
8
|
+
import { join } from "../commands/join.js";
|
|
9
|
+
import { invite } from "../commands/invite.js";
|
|
10
|
+
import { create } from "../commands/create.js";
|
|
11
|
+
import { init } from "../commands/init.js"; // 1. Added init import
|
|
12
12
|
|
|
13
13
|
const program = new Command();
|
|
14
14
|
|
package/lib/auth.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
2
|
import path from "path";
|
|
3
|
+
import os from "os"; // 1. Import the built-in OS module
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
// 2. Use os.homedir() instead of process.env.HOME
|
|
6
|
+
const TOKEN_PATH = path.join(os.homedir(), ".envx-token");
|
|
5
7
|
|
|
6
8
|
export function saveToken(token) {
|
|
7
9
|
fs.writeFileSync(TOKEN_PATH, token);
|