@camox/cli 0.48.0 → 0.52.1

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.
@@ -23,16 +23,17 @@ const DRAFT_ENDED_ERROR_CODE = "DRAFT_ENDED";
23
23
  /**
24
24
  * Why the publish tool published nothing of a draft with changes, and returned a fresh preview to
25
25
  * review again, by the error code of each: Live changed since the preview, the draft has blockers,
26
- * or translations are still running.
26
+ * translations are still running, or the draft's code changed since the preview.
27
27
  */
28
28
  const NOT_PUBLISHED_CODES = {
29
29
  conflictsChanged: "CONFLICTS_CHANGED",
30
30
  blocked: "PUBLISH_BLOCKED",
31
- translating: "TRANSLATIONS_PENDING"
31
+ translating: "TRANSLATIONS_PENDING",
32
+ revisionChanged: "REVISION_CHANGED"
32
33
  };
33
34
  //#endregion
34
35
  //#region src/lib/api.ts
35
- const CAMOX_API_URL = process.env.CAMOX_API_URL || "https://api.camox.dev";
36
+ const CAMOX_API_URL = process.env.CAMOX_API_URL || "https://api.camox.ai";
36
37
  installLocalhostDns(new URL(CAMOX_API_URL).hostname);
37
38
  function authHeaders(token) {
38
39
  return {
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export { a as verifySession } from "./api-BlAAQ7d9.mjs";
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { c as NOT_PUBLISHED_CODES, i as getProject, l as NO_DEVELOPMENT_DRAFT_ERROR, n as developmentDraftHeaders, o as DEVELOPMENT_DRAFT, r as getDevelopmentDraft, s as DRAFT_ENDED_ERROR_CODE, t as callTool } from "./api-DNIQC1ea.mjs";
2
+ import { c as NOT_PUBLISHED_CODES, i as getProject, l as NO_DEVELOPMENT_DRAFT_ERROR, n as developmentDraftHeaders, o as DEVELOPMENT_DRAFT, r as getDevelopmentDraft, s as DRAFT_ENDED_ERROR_CODE, t as callTool } from "./api-BlAAQ7d9.mjs";
3
3
  import { t as installLocalhostDns } from "./local-dns-DQIT1ucr.mjs";
4
4
  import { a as removeAuthTokenForUrl, i as readAuthTokenForUrl, n as isLoopbackUrl, o as verifyOneTimeToken, r as normalizeUrl, s as writeAuthTokenForUrl, t as createPreviewSignInUrl } from "./auth-core-xLeorUUV.mjs";
5
5
  import { object, or } from "@optique/core/constructs";
@@ -19,8 +19,8 @@ import { tmpdir } from "node:os";
19
19
  import path, { basename, extname, join } from "node:path";
20
20
  import { ZodError, z } from "zod";
21
21
  //#region src/lib/auth.ts
22
- const CAMOX_URL = process.env.CAMOX_URL || "https://app.camox.dev";
23
- const CAMOX_API_URL = process.env.CAMOX_API_URL || "https://api.camox.dev";
22
+ const CAMOX_URL = process.env.CAMOX_URL || "https://app.camox.ai";
23
+ const CAMOX_API_URL = process.env.CAMOX_API_URL || "https://api.camox.ai";
24
24
  const AUTH_TIMEOUT_MS = 3e5;
25
25
  function readAuthToken() {
26
26
  return readAuthTokenForUrl(CAMOX_URL);
@@ -118,7 +118,7 @@ async function authenticateUser() {
118
118
  async function getOrAuthenticate() {
119
119
  const stored = readAuthToken();
120
120
  if (stored) {
121
- const { verifySession } = await import("./api-DeE66CPa.mjs");
121
+ const { verifySession } = await import("./api-DPrc6jjc.mjs");
122
122
  if (await verifySession(stored.token)) {
123
123
  p.log.info(`Authenticated as ${stored.name}`);
124
124
  return stored;
@@ -954,7 +954,7 @@ async function handler$10(args) {
954
954
  //#region src/commands/init.ts
955
955
  const parser$9 = command("init", object({ command: constant("init") }));
956
956
  const handler$9 = init;
957
- const DASHBOARD_URL = process.env.CAMOX_URL || "https://app.camox.dev";
957
+ const DASHBOARD_URL = process.env.CAMOX_URL || "https://app.camox.ai";
958
958
  /**
959
959
  * Projects are created from the dashboard, which hosts them, so `camox init` (and
960
960
  * `npm create camox`, which runs it) only says where to go. It exits non-zero, since it created
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camox/cli",
3
- "version": "0.48.0",
3
+ "version": "0.52.1",
4
4
  "license": "MIT",
5
5
  "bin": {
6
6
  "camox": "./dist/index.mjs"
@@ -28,7 +28,7 @@
28
28
  "devDependencies": {
29
29
  "@types/node": "^24.12.4",
30
30
  "vite-plus": "1.3.0",
31
- "@camox/api-contract": "0.48.0"
31
+ "@camox/api-contract": "0.52.1"
32
32
  },
33
33
  "nx": {
34
34
  "tags": [
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export { a as verifySession } from "./api-DNIQC1ea.mjs";