@usecontextlayer/cli 0.14.0 → 0.14.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.
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { S as execa, _ as record, a as getAccessToken, b as url, c as whoami, d as boolean, f as discriminatedUnion, g as object, h as looseObject, i as secretNameSchema, l as env, m as literal, n as readLocalManifest, o as getCurrentUser, p as hostname, r as credentialModeSchema, s as login, t as getLocalAppId, u as array, v as string, x as uuid, y as unknown } from "./app-DUUpiXEm.mjs";
2
+ import { S as execa, _ as record, a as getAccessToken, b as url, c as whoami, d as boolean, f as discriminatedUnion, g as object, h as looseObject, i as secretNameSchema, l as env, m as literal, n as readLocalManifest, o as getCurrentUser, p as hostname, r as connectionRequirementSchema, s as login, t as getLocalAppId, u as array, v as string, x as uuid, y as unknown } from "./app-CJgT3IKd.mjs";
3
3
  import { cp, readFile, writeFile } from "node:fs/promises";
4
4
  import path, { join } from "node:path";
5
5
  import { EventEmitter } from "node:events";
@@ -3004,6 +3004,13 @@ async function runLocalAgent(name, prompt) {
3004
3004
  }
3005
3005
  }
3006
3006
  //#endregion
3007
+ //#region ../shared/dist/app-connections.mjs
3008
+ const appConnectionSchema = connectionRequirementSchema.extend({
3009
+ connection_id: string().nullable(),
3010
+ slug: string()
3011
+ });
3012
+ const appConnectionsSchema = object({ connections: array(appConnectionSchema) });
3013
+ //#endregion
3007
3014
  //#region owner.ts
3008
3015
  const ownerOptionsSchema = object({ org: string().min(1).optional() });
3009
3016
  async function resolveOwner(org, headers) {
@@ -3069,12 +3076,7 @@ async function listAppConnections(target) {
3069
3076
  method: "POST"
3070
3077
  });
3071
3078
  if (!response.ok) throw new Error(`App connections request failed: HTTP ${response.status}`);
3072
- const { connections } = object({ connections: array(object({
3073
- connection_id: string().nullable(),
3074
- mode: credentialModeSchema,
3075
- slug: string(),
3076
- toolkit: string()
3077
- })) }).parse(await response.json());
3079
+ const { connections } = appConnectionsSchema.parse(await response.json());
3078
3080
  if (!connections.length) {
3079
3081
  console.log("No connection requirements.");
3080
3082
  return;
@@ -3160,7 +3162,7 @@ async function gitCredential(operation) {
3160
3162
  }
3161
3163
  //#endregion
3162
3164
  //#region package.json
3163
- var version = "0.14.0";
3165
+ var version = "0.14.2";
3164
3166
  //#endregion
3165
3167
  //#region ../../node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js
3166
3168
  const getCodePointsLength = (() => {