veryfront 0.1.1065 → 0.1.1067

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.
@@ -98,6 +98,7 @@ export interface PullOptions {
98
98
  export declare function resolvePullSource(options: PullOptions): PullSource;
99
99
  interface ProjectFile {
100
100
  path: string;
101
+ content: string;
101
102
  size: number;
102
103
  type: string;
103
104
  created_at: string;
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/pull/command.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAM3E,OAAO,EACL,eAAe,EAIhB,MAAM,wBAAwB,CAAC;AAiBhC;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;GAa7B,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;GAAgC,CAAC;AAE5D,MAAM,MAAM,QAAQ,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC;AAEzE;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;GAWxB,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,UAAU,GAClB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACrC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,gCAAgC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,0CAA0C;IAC1C,UAAU,CAAC,EAAE,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B;AA8aD;;GAEG;AACH,wBAAgB,WAAW,CAAC,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAoKpE"}
@@ -181,18 +181,9 @@ export async function getFileContent(client, projectSlug, path, source) {
181
181
  const response = await client.get(url);
182
182
  return response.content;
183
183
  }
184
- /** Concurrency limit for parallel file fetches */
184
+ /** Concurrency limit for parallel file writes. */
185
185
  const CONCURRENCY = 20;
186
- async function fetchFile(op, client, projectSlug, source) {
187
- try {
188
- const content = await getFileContent(client, projectSlug, op.relativePath, source);
189
- return { success: true, op: { ...op, content } };
190
- }
191
- catch (error) {
192
- return { success: false, path: op.relativePath, error: error };
193
- }
194
- }
195
- async function writePreparedFile(op, fs) {
186
+ async function writeFile(op, fs) {
196
187
  try {
197
188
  await fs.mkdir(dirname(op.path), { recursive: true });
198
189
  await fs.writeTextFile(op.path, op.content);
@@ -202,33 +193,18 @@ async function writePreparedFile(op, fs) {
202
193
  return { success: false, path: op.relativePath, error: error };
203
194
  }
204
195
  }
205
- async function writeFiles(ops, client, projectSlug, source, dryRun) {
196
+ async function writeFiles(ops, dryRun) {
206
197
  if (dryRun) {
207
198
  for (const op of ops)
208
199
  cliLogger.info(` Would write: ${op.relativePath}`);
209
200
  return { written: ops.length, failed: 0 };
210
201
  }
211
202
  const fs = createFileSystem();
212
- const prepared = [];
213
203
  let failed = 0;
204
+ let written = 0;
214
205
  for (let i = 0; i < ops.length; i += CONCURRENCY) {
215
206
  const batch = ops.slice(i, i + CONCURRENCY);
216
- const results = await Promise.all(batch.map((op) => fetchFile(op, client, projectSlug, source)));
217
- for (const result of results) {
218
- if (result.success) {
219
- prepared.push(result.op);
220
- continue;
221
- }
222
- cliLogger.error(`Failed to fetch ${result.path}:`, result.error);
223
- failed++;
224
- }
225
- }
226
- if (failed > 0)
227
- return { written: 0, failed };
228
- let written = 0;
229
- for (let i = 0; i < prepared.length; i += CONCURRENCY) {
230
- const batch = prepared.slice(i, i + CONCURRENCY);
231
- const results = await Promise.all(batch.map((op) => writePreparedFile(op, fs)));
207
+ const results = await Promise.all(batch.map((op) => writeFile(op, fs)));
232
208
  for (const result of results) {
233
209
  if (result.success) {
234
210
  written++;
@@ -452,18 +428,13 @@ async function pullSingleProject(projectSlug, projectDir, source, force, dryRun,
452
428
  const writeOps = [];
453
429
  const remotePaths = new Set();
454
430
  for (const file of files) {
431
+ let op;
455
432
  try {
456
- const op = await validateFilePath(file.path, projectDir);
433
+ op = await validateFilePath(file.path, projectDir);
457
434
  if (remotePaths.has(op.relativePath)) {
458
435
  throw new Error(`Duplicate remote file path: "${op.relativePath}"`);
459
436
  }
460
437
  remotePaths.add(op.relativePath);
461
- if (pruneIgnoreChecker &&
462
- (pruneIgnoreChecker.isIgnored(op.relativePath) ||
463
- !pruneIgnoreChecker.isSupportedExtension(op.relativePath))) {
464
- continue;
465
- }
466
- writeOps.push(op);
467
438
  }
468
439
  catch (error) {
469
440
  throw INVALID_ARGUMENT.create({
@@ -471,6 +442,17 @@ async function pullSingleProject(projectSlug, projectDir, source, force, dryRun,
471
442
  cause: error,
472
443
  });
473
444
  }
445
+ if (pruneIgnoreChecker &&
446
+ (pruneIgnoreChecker.isIgnored(op.relativePath) ||
447
+ !pruneIgnoreChecker.isSupportedExtension(op.relativePath))) {
448
+ continue;
449
+ }
450
+ if (typeof file.content !== "string") {
451
+ throw INVALID_ARGUMENT.create({
452
+ detail: `Veryfront returned invalid content for file "${file.path}". No local files were changed.`,
453
+ });
454
+ }
455
+ writeOps.push({ ...op, content: file.content });
474
456
  }
475
457
  let deleteOps = [];
476
458
  if (pruneIgnoreChecker) {
@@ -495,7 +477,7 @@ async function pullSingleProject(projectSlug, projectDir, source, force, dryRun,
495
477
  }
496
478
  }
497
479
  spinner = quiet ? createNoopSpinner() : createSpinner(`Writing files to ${projectDir}...`);
498
- const writeResult = await writeFiles(writeOps, client, projectSlug, source, dryRun);
480
+ const writeResult = await writeFiles(writeOps, dryRun);
499
481
  if (writeResult.failed > 0) {
500
482
  spinner.stop();
501
483
  throw new Error(`Failed to pull ${writeResult.failed} file${writeResult.failed === 1 ? "" : "s"}. No local files were pruned. Review git status and restore a clean worktree before retrying if any files were written.`);
package/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.1065",
3
+ "version": "0.1.1067",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "minimumDependencyAge": {
@@ -5,7 +5,7 @@
5
5
  * (Deno, Node.js) and handles veryfront package resolution.
6
6
  */
7
7
  import { createFileSystem } from "../platform/compat/fs.js";
8
- export declare const DISCOVERY_GLOBAL_VERYFRONT_MODULES: readonly ["veryfront/agent", "veryfront/tool", "veryfront/platform", "veryfront/prompt", "veryfront/resource", "veryfront/embedding", "veryfront/knowledge", "veryfront/workflow", "veryfront/eval", "veryfront/metrics", "veryfront/schemas", "veryfront/chat/uploads"];
8
+ export declare const DISCOVERY_GLOBAL_VERYFRONT_MODULES: readonly ["veryfront/agent", "veryfront/tool", "veryfront/platform", "veryfront/prompt", "veryfront/resource", "veryfront/embedding", "veryfront/knowledge", "veryfront/workflow", "veryfront/eval", "veryfront/metrics", "veryfront/schemas", "veryfront/integrations", "veryfront/chat/uploads"];
9
9
  interface DenoRewriteOptions {
10
10
  compiled?: boolean;
11
11
  resolveSpecifier?: (specifier: string) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"import-rewriter.d.ts","sourceRoot":"","sources":["../../../src/src/discovery/import-rewriter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,eAAO,MAAM,kCAAkC,0QAcrC,CAAC;AAEX,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;CAClD;AAkHD;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,kBAAuB,GAC/B,MAAM,CA2BR;AAqFD;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,EAAE,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,EACvC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,CAAC,CA2PjB"}
1
+ {"version":3,"file":"import-rewriter.d.ts","sourceRoot":"","sources":["../../../src/src/discovery/import-rewriter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,eAAO,MAAM,kCAAkC,oSAerC,CAAC;AAEX,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;CAClD;AAkHD;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,kBAAuB,GAC/B,MAAM,CA2BR;AAqFD;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,EAAE,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,EACvC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,CAAC,CA2PjB"}
@@ -19,6 +19,7 @@ export const DISCOVERY_GLOBAL_VERYFRONT_MODULES = [
19
19
  "veryfront/eval",
20
20
  "veryfront/metrics",
21
21
  "veryfront/schemas",
22
+ "veryfront/integrations",
22
23
  // Server-side chat upload route handler (app/api/uploads/route.ts).
23
24
  "veryfront/chat/uploads",
24
25
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"transpiler.d.ts","sourceRoot":"","sources":["../../../src/src/discovery/transpiler.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AA0MvD;;GAEG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,OAAO,CAAC,CAgIlB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C"}
1
+ {"version":3,"file":"transpiler.d.ts","sourceRoot":"","sources":["../../../src/src/discovery/transpiler.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AA4MvD;;GAEG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,OAAO,CAAC,CAgIlB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C"}
@@ -25,6 +25,7 @@ import * as workflowMod from "../workflow/index.js";
25
25
  import * as evalMod from "../eval/index.js";
26
26
  import * as metricsMod from "../metrics/index.js";
27
27
  import * as schemasMod from "../schemas/index.js";
28
+ import * as integrationsMod from "../integrations/index.js";
28
29
  import * as chatUploadsMod from "../chat/upload-handler.js";
29
30
  // Keyed by entry file + entry source hash; each entry additionally records the
30
31
  // bundled dependency contents it was built from and is only served while those
@@ -90,6 +91,7 @@ async function ensureVeryfrontGlobals() {
90
91
  "veryfront/eval": evalMod,
91
92
  "veryfront/metrics": metricsMod,
92
93
  "veryfront/schemas": schemasMod,
94
+ "veryfront/integrations": integrationsMod,
93
95
  "veryfront/chat/uploads": chatUploadsMod,
94
96
  };
95
97
  dntShim.dntGlobalThis.__VERYFRONT_MODULES__ = modules;
@@ -1,3 +1,3 @@
1
1
  /** Shared version value. */
2
- export declare const VERSION = "0.1.1065";
2
+ export declare const VERSION = "0.1.1067";
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.1065";
4
+ export const VERSION = "0.1.1067";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfront",
3
- "version": "0.1.1065",
3
+ "version": "0.1.1067",
4
4
  "description": "The simplest way to build AI-powered apps",
5
5
  "keywords": [
6
6
  "react",
@@ -328,10 +328,10 @@
328
328
  "@types/react": "19.2.14",
329
329
  "@types/react-dom": "19.2.3",
330
330
  "ws": "8.21.0",
331
- "@veryfront/ext-bundler-esbuild": "0.1.1065",
332
- "@veryfront/ext-content-mdx": "0.1.1065",
333
- "@veryfront/ext-css-tailwind": "0.1.1065",
334
- "@veryfront/ext-parser-babel": "0.1.1065"
331
+ "@veryfront/ext-bundler-esbuild": "0.1.1067",
332
+ "@veryfront/ext-content-mdx": "0.1.1067",
333
+ "@veryfront/ext-css-tailwind": "0.1.1067",
334
+ "@veryfront/ext-parser-babel": "0.1.1067"
335
335
  },
336
336
  "devDependencies": {
337
337
  "@types/node": "20.9.0"