veryfront 0.1.936 → 0.1.937

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.
@@ -1,5 +1,17 @@
1
1
  import type { ParsedArgs } from "../../shared/types.js";
2
2
  export declare function detectConfigSource(projectDir: string): Promise<string | null>;
3
3
  export declare function getEnvOverrides(): string[];
4
+ export type ConfigCommandData = {
5
+ projectSlug: string | null;
6
+ nodeEnv: string;
7
+ veryfrontEnv: string | null;
8
+ apiBaseUrl: string;
9
+ debug: boolean;
10
+ ci: boolean;
11
+ hasApiToken: boolean;
12
+ configSource: string | null;
13
+ envOverrides: string[];
14
+ };
15
+ export declare function getConfigCommandData(projectDir: string): Promise<ConfigCommandData>;
4
16
  export declare function handleConfigCommand(_args: ParsedArgs): Promise<void>;
5
17
  //# sourceMappingURL=handler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/config/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAexD,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAexB;AAED,wBAAgB,eAAe,IAAI,MAAM,EAAE,CAM1C;AAED,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA+C1E"}
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/config/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAexD,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAexB;AAED,wBAAgB,eAAe,IAAI,MAAM,EAAE,CAM1C;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,EAAE,EAAE,OAAO,CAAC;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,wBAAsB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAoBzF;AAED,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA+B1E"}
@@ -32,24 +32,28 @@ export function getEnvOverrides() {
32
32
  }
33
33
  return overrides;
34
34
  }
35
- export async function handleConfigCommand(_args) {
35
+ export async function getConfigCommandData(projectDir) {
36
36
  const { getEnvironmentConfig } = await import("../../../src/config/index.js");
37
- const { cwd } = await import("../../../src/platform/index.js");
38
37
  const config = getEnvironmentConfig();
39
- const projectDir = cwd();
38
+ const { readConfigFile } = await import("../../shared/config.js");
40
39
  const configSource = await detectConfigSource(projectDir);
41
40
  const envOverrides = getEnvOverrides();
42
- const configData = {
43
- projectSlug: config.projectSlug ?? null,
41
+ const fileConfig = await readConfigFile(projectDir);
42
+ return {
43
+ projectSlug: config.projectSlug ?? fileConfig?.projectSlug ?? null,
44
44
  nodeEnv: config.nodeEnv,
45
45
  veryfrontEnv: config.veryfrontEnv || null,
46
46
  apiBaseUrl: config.apiBaseUrl,
47
47
  debug: config.debug,
48
48
  ci: config.ci,
49
- hasApiToken: !!config.apiToken,
49
+ hasApiToken: !!(config.apiToken ?? fileConfig?.apiToken),
50
50
  configSource,
51
51
  envOverrides,
52
52
  };
53
+ }
54
+ export async function handleConfigCommand(_args) {
55
+ const { cwd } = await import("../../../src/platform/index.js");
56
+ const configData = await getConfigCommandData(cwd());
53
57
  if (isJsonMode()) {
54
58
  await outputJson(createSuccessEnvelope("config", configData));
55
59
  return;
@@ -63,8 +67,8 @@ export async function handleConfigCommand(_args) {
63
67
  cliLogger.info(` ${dim("CI:")} ${configData.ci}`);
64
68
  cliLogger.info(` ${dim("Authenticated:")} ${configData.hasApiToken ? "yes" : "no"}`);
65
69
  cliLogger.info(` ${dim("Config file:")} ${configData.configSource ?? "(none)"}`);
66
- if (envOverrides.length > 0) {
67
- cliLogger.info(` ${dim("Env overrides:")} ${envOverrides.join(", ")}`);
70
+ if (configData.envOverrides.length > 0) {
71
+ cliLogger.info(` ${dim("Env overrides:")} ${configData.envOverrides.join(", ")}`);
68
72
  }
69
73
  cliLogger.info("");
70
74
  }
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/workflow/command.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,2BAA2B,EAAE,MAAM,6CAA6C,CAAC;AAO1F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAKjD,MAAM,WAAW,eAAgB,SAAQ,YAAY;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,2BAA2B;IACnC,2BAA2B,CAAC,EAAE,OAAO,2BAA2B,CAAC;CAClE;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,sBAAsB,EAAE,GAC/B,MAAM,EAAE,CAUV;AAuFD,wBAAsB,eAAe,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAE7E;AAED,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,eAAe,EACxB,YAAY,GAAE,2BAAgC,GAC7C,OAAO,CAAC,IAAI,CAAC,CA6Ff"}
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/workflow/command.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,2BAA2B,EAAE,MAAM,6CAA6C,CAAC;AAO1F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAKjD,MAAM,WAAW,eAAgB,SAAQ,YAAY;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,2BAA2B;IACnC,2BAA2B,CAAC,EAAE,OAAO,2BAA2B,CAAC;CAClE;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,sBAAsB,EAAE,GAC/B,MAAM,EAAE,CAUV;AAuFD,wBAAsB,eAAe,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAE7E;AAED,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,eAAe,EACxB,YAAY,GAAE,2BAAgC,GAC7C,OAAO,CAAC,IAAI,CAAC,CAoGf"}
@@ -2,6 +2,7 @@ import * as dntShim from "../../../_dnt.shims.js";
2
2
  import { cliLogger } from "../../utils/index.js";
3
3
  import { exitProcess } from "../../utils/index.js";
4
4
  import { withProjectSourceContext } from "../../shared/project-source-context.js";
5
+ import { applyRuntimeAuthContext } from "../../shared/runtime-auth.js";
5
6
  import { agentRegistry } from "../../../src/agent/composition/index.js";
6
7
  import { discoverProjectAgentRuntime } from "../../../src/agent/project/agent-runtime.js";
7
8
  import { toolRegistry } from "../../../src/tool/registry.js";
@@ -107,6 +108,12 @@ export async function runWorkflowCommand(options, dependencies = {}) {
107
108
  }
108
109
  }
109
110
  const projectDir = options.projectDir ?? dntShim.Deno.cwd();
111
+ const { readConfigFile } = await import("../../shared/config.js");
112
+ const configFile = await readConfigFile(projectDir);
113
+ await applyRuntimeAuthContext({
114
+ projectDir,
115
+ projectSlug: configFile?.projectSlug,
116
+ });
110
117
  const discoverRuntime = dependencies.discoverProjectAgentRuntime ??
111
118
  discoverProjectAgentRuntime;
112
119
  await withProjectSourceContext(projectDir, async ({ adapter, proxyContext }) => {
package/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.936",
3
+ "version": "0.1.937",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "minimumDependencyAge": {
@@ -1,3 +1,3 @@
1
1
  /** Shared version value. */
2
- export declare const VERSION = "0.1.936";
2
+ export declare const VERSION = "0.1.937";
3
3
  //# sourceMappingURL=version-constant.d.ts.map
@@ -1,4 +1,4 @@
1
1
  // Keep in sync with deno.json version.
2
2
  // scripts/release.ts updates this constant during releases.
3
3
  /** Shared version value. */
4
- export const VERSION = "0.1.936";
4
+ export const VERSION = "0.1.937";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfront",
3
- "version": "0.1.936",
3
+ "version": "0.1.937",
4
4
  "description": "The simplest way to build AI-powered apps",
5
5
  "keywords": [
6
6
  "react",