@vwork/cli 0.1.0 → 0.1.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/dist/config.js +2 -1
  2. package/package.json +1 -1
package/dist/config.js CHANGED
@@ -2,11 +2,12 @@ import { existsSync, readFileSync } from "node:fs";
2
2
  import { join } from "node:path";
3
3
  import { parseCommand } from "./command.js";
4
4
  export const DEFAULT_CLI_TRUSTED_USER_ID = "user_cli_dev";
5
+ export const DEFAULT_VWORK_API_URL = "https://vwork.vvicat.dev/api";
5
6
  export function resolveCliConfig(argv, env, cwd) {
6
7
  const command = parseCommand(argv);
7
8
  return resolveCliConfigFromFlags(command.flags, env, cwd);
8
9
  }
9
- export function resolveCliConfigFromFlags(flags, env, cwd, defaultApiUrl = "http://127.0.0.1:8787") {
10
+ export function resolveCliConfigFromFlags(flags, env, cwd, defaultApiUrl = DEFAULT_VWORK_API_URL) {
10
11
  const project = readProjectConfig(cwd);
11
12
  const apiUrl = stringFlag(flags["api-url"]) ?? env.VWORK_API_URL ?? project.apiUrl ?? defaultApiUrl;
12
13
  const appId = stringFlag(flags.app) ?? env.VWORK_APP_ID ?? project.appId ?? null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vwork/cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist/*.js",