@podge/cli 0.2.0-beta.0 → 0.2.0-beta.6

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.
@@ -34,7 +34,7 @@ function registerDebugCommands(program) {
34
34
  .action(() => {
35
35
  const config = (0, config_1.getConfig)();
36
36
  console.log(` API URL: ${(0, config_1.getApiUrl)()}${config.apiUrl ? " (override)" : ""}`);
37
- console.log(` App URL: ${(0, config_1.getAppUrl)()}${config.appUrl ? " (override)" : ""}`);
37
+ console.log(` App URL: ${(0, config_1.getAppUrl)()} (derived from API URL)`);
38
38
  console.log(` Config: ~/.podge/config.json`);
39
39
  });
40
40
  }
package/dist/index.js CHANGED
@@ -18,7 +18,13 @@ const program = new commander_1.Command();
18
18
  program
19
19
  .name("podge")
20
20
  .description("Podge CLI — manage workspaces, collections, and search")
21
- .version(pkg.version);
21
+ .version(pkg.version, "-v, --version");
22
+ program
23
+ .command("version")
24
+ .description("Show the installed CLI version")
25
+ .action(() => {
26
+ console.log(pkg.version);
27
+ });
22
28
  (0, auth_1.registerAuthCommands)(program);
23
29
  (0, config_1.registerConfigCommands)(program);
24
30
  (0, workspaces_1.registerWorkspaceCommands)(program);
@@ -5,7 +5,6 @@ export interface Credentials {
5
5
  export interface Config {
6
6
  workspace?: string;
7
7
  environment?: string;
8
- appUrl?: string;
9
8
  apiUrl?: string;
10
9
  }
11
10
  export declare function getCredentials(): Credentials | null;
@@ -82,14 +82,12 @@ function writeConfig(config) {
82
82
  }
83
83
  exports.writeConfig = writeConfig;
84
84
  const DEFAULT_API_URL = "https://dev.podge.dev/api";
85
- const DEFAULT_APP_URL = "https://app.podge.io";
86
85
  function getApiUrl() {
87
86
  const config = getConfig();
88
87
  return config.apiUrl ?? DEFAULT_API_URL;
89
88
  }
90
89
  exports.getApiUrl = getApiUrl;
91
90
  function getAppUrl() {
92
- const config = getConfig();
93
- return config.appUrl ?? DEFAULT_APP_URL;
91
+ return getApiUrl().replace(/\/api$/, "");
94
92
  }
95
93
  exports.getAppUrl = getAppUrl;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@podge/cli",
3
- "version": "0.2.0-beta.0",
3
+ "version": "0.2.0-beta.6",
4
4
  "description": "CLI for Podge — manage workspaces, collections, and search",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -10,6 +10,14 @@
10
10
  "files": [
11
11
  "dist"
12
12
  ],
13
+ "scripts": {
14
+ "build": "tsc",
15
+ "dev": "tsc --watch",
16
+ "clean": "rm -rf dist",
17
+ "start": "node dist/index.js",
18
+ "prepublishOnly": "pnpm run clean && pnpm run build",
19
+ "release": "bash scripts/release.sh"
20
+ },
13
21
  "dependencies": {
14
22
  "axios": "^1.6.0",
15
23
  "chalk": "^4.1.2",
@@ -26,11 +34,5 @@
26
34
  "repository": {
27
35
  "type": "git",
28
36
  "url": "https://github.com/rudeluv/podge-cli.git"
29
- },
30
- "scripts": {
31
- "build": "tsc",
32
- "dev": "tsc --watch",
33
- "clean": "rm -rf dist",
34
- "start": "node dist/index.js"
35
37
  }
36
- }
38
+ }