@indigoai-us/hq-cli 5.6.1 → 5.6.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.
@@ -25,7 +25,7 @@
25
25
  * `initial_sync.ok=false`). Manifest + config may have been written.
26
26
  */
27
27
 
28
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="325d7bbf-c44d-5bba-a156-072302ab1536")}catch(e){}}();
28
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="aacb5bf2-8362-5336-b864-43296c30a1d6")}catch(e){}}();
29
29
  import chalk from "chalk";
30
30
  import * as fs from "node:fs";
31
31
  import * as path from "node:path";
@@ -180,7 +180,7 @@ export function createDefaultVaultClient(apiUrl, accessToken) {
180
180
  };
181
181
  return {
182
182
  async findCompanyBySlug(slug) {
183
- const url = `${apiUrl.replace(/\/$/, "")}/v1/entities/by-slug/company/${encodeURIComponent(slug)}`;
183
+ const url = `${apiUrl.replace(/\/$/, "")}/entity/by-slug/company/${encodeURIComponent(slug)}`;
184
184
  const res = await fetch(url, { method: "GET", headers });
185
185
  if (res.status === 404)
186
186
  return null;
@@ -195,7 +195,7 @@ export function createDefaultVaultClient(apiUrl, accessToken) {
195
195
  return data.entity;
196
196
  },
197
197
  async createCompanyEntity(input) {
198
- const url = `${apiUrl.replace(/\/$/, "")}/v1/entities`;
198
+ const url = `${apiUrl.replace(/\/$/, "")}/entity`;
199
199
  const body = {
200
200
  type: "company",
201
201
  slug: input.slug,
@@ -213,11 +213,11 @@ export function createDefaultVaultClient(apiUrl, accessToken) {
213
213
  // 409 means a concurrent client created it between our GET and POST —
214
214
  // surface it as a vault error. The orchestrator is responsible for
215
215
  // retrying GET if it wants idempotency on collisions.
216
- throw new ProvisionError(1, `Vault POST /v1/entities failed: ${res.status} ${res.statusText} — ${text}`);
216
+ throw new ProvisionError(1, `Vault POST /entity failed: ${res.status} ${res.statusText} — ${text}`);
217
217
  }
218
218
  const data = (await res.json());
219
219
  if (!data.entity) {
220
- throw new ProvisionError(1, `Vault POST /v1/entities returned ${res.status} with no entity body`);
220
+ throw new ProvisionError(1, `Vault POST /entity returned ${res.status} with no entity body`);
221
221
  }
222
222
  return data.entity;
223
223
  },
@@ -426,4 +426,4 @@ export function registerCloudProvisionCommands(program) {
426
426
  });
427
427
  }
428
428
  //# sourceMappingURL=cloud-provision.js.map
429
- //# debugId=325d7bbf-c44d-5bba-a156-072302ab1536
429
+ //# debugId=aacb5bf2-8362-5336-b864-43296c30a1d6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indigoai-us/hq-cli",
3
- "version": "5.6.1",
3
+ "version": "5.6.2",
4
4
  "description": "HQ by Indigo management CLI — modules and cloud sync",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -374,7 +374,7 @@ describe("createDefaultVaultClient", () => {
374
374
  expect(out).toEqual(entity);
375
375
  // Verify request shape
376
376
  const call = fetchSpy.mock.calls[0];
377
- expect(call[0]).toBe(`${apiUrl}/v1/entities`);
377
+ expect(call[0]).toBe(`${apiUrl}/entity`);
378
378
  expect((call[1] as RequestInit)?.method).toBe("POST");
379
379
  const body = JSON.parse(((call[1] as RequestInit)?.body as string) ?? "{}");
380
380
  expect(body).toEqual({ type: "company", slug: "indigo", name: "Indigo" });
@@ -346,7 +346,7 @@ export function createDefaultVaultClient(
346
346
  };
347
347
  return {
348
348
  async findCompanyBySlug(slug: string): Promise<VaultEntity | null> {
349
- const url = `${apiUrl.replace(/\/$/, "")}/v1/entities/by-slug/company/${encodeURIComponent(
349
+ const url = `${apiUrl.replace(/\/$/, "")}/entity/by-slug/company/${encodeURIComponent(
350
350
  slug,
351
351
  )}`;
352
352
  const res = await fetch(url, { method: "GET", headers });
@@ -372,7 +372,7 @@ export function createDefaultVaultClient(
372
372
  name: string;
373
373
  ownerUid?: string;
374
374
  }): Promise<VaultEntity> {
375
- const url = `${apiUrl.replace(/\/$/, "")}/v1/entities`;
375
+ const url = `${apiUrl.replace(/\/$/, "")}/entity`;
376
376
  const body: Record<string, unknown> = {
377
377
  type: "company",
378
378
  slug: input.slug,
@@ -391,14 +391,14 @@ export function createDefaultVaultClient(
391
391
  // retrying GET if it wants idempotency on collisions.
392
392
  throw new ProvisionError(
393
393
  1,
394
- `Vault POST /v1/entities failed: ${res.status} ${res.statusText} — ${text}`,
394
+ `Vault POST /entity failed: ${res.status} ${res.statusText} — ${text}`,
395
395
  );
396
396
  }
397
397
  const data = (await res.json()) as { entity?: VaultEntity };
398
398
  if (!data.entity) {
399
399
  throw new ProvisionError(
400
400
  1,
401
- `Vault POST /v1/entities returned ${res.status} with no entity body`,
401
+ `Vault POST /entity returned ${res.status} with no entity body`,
402
402
  );
403
403
  }
404
404
  return data.entity;