veryfront 0.1.318 → 0.1.320

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/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.318",
3
+ "version": "0.1.320",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "workspace": [
@@ -1,4 +1,4 @@
1
1
  export declare function isLikelyScannerProbePath(pathname: string): boolean;
2
- export type ProxyFailureLogLevel = "warn" | "error";
2
+ export type ProxyFailureLogLevel = "info" | "warn" | "error";
3
3
  export declare function getProxyFailureLogLevel(status: number, method: string, pathname: string): ProxyFailureLogLevel;
4
4
  //# sourceMappingURL=log-noise.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"log-noise.d.ts","sourceRoot":"","sources":["../../../src/src/proxy/log-noise.ts"],"names":[],"mappings":"AAcA,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAQlE;AAED,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,OAAO,CAAC;AAEpD,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,oBAAoB,CAUtB"}
1
+ {"version":3,"file":"log-noise.d.ts","sourceRoot":"","sources":["../../../src/src/proxy/log-noise.ts"],"names":[],"mappings":"AAcA,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAQlE;AAED,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE7D,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,oBAAoB,CAWtB"}
@@ -25,5 +25,7 @@ export function getProxyFailureLogLevel(status, method, pathname) {
25
25
  isLikelyScannerProbePath(pathname)) {
26
26
  return "warn";
27
27
  }
28
+ if (status < 400)
29
+ return "info";
28
30
  return status < 500 ? "warn" : "error";
29
31
  }
@@ -246,7 +246,7 @@ function forwardToServer(req) {
246
246
  }, async () => {
247
247
  if (ctx.error) {
248
248
  const ms = Math.round(performance.now() - startTime);
249
- const logLevel = ctx.error.status < 500 ? "warn" : "error";
249
+ const logLevel = getProxyFailureLogLevel(ctx.error.status, req.method, url.pathname);
250
250
  proxyLogger[logLevel](`${ctx.error.status} ${req.method} ${url.pathname}`, { ms });
251
251
  endSpan(spanInfo?.span, ctx.error.status);
252
252
  return createProxyErrorResponse(ctx.error);
@@ -91,7 +91,7 @@ export async function ensureProjectDiscovery(ctx) {
91
91
  errors: result.errors.length,
92
92
  };
93
93
  if (result.agents.size === 0 && result.tools.size === 0 && shouldWarnOnEmptyAiDiscovery) {
94
- logger.warn("Primitive discovery found 0 agents and 0 tools", {
94
+ logger.info("Primitive discovery found 0 agents and 0 tools", {
95
95
  ...logData,
96
96
  errorMessages: result.errors.map((e) => e.error.message).slice(0, 5),
97
97
  baseDir: ctx.projectDir,
@@ -59,7 +59,7 @@ async function cacheHttpModuleInternal(url, options) {
59
59
  if (deps.length > 0) {
60
60
  const depsValid = await validateBundleDepsExist(deps, cacheDir);
61
61
  if (!depsValid) {
62
- httpCacheLog.warn("Local cache has missing deps, will re-fetch", {
62
+ httpCacheLog.debug("Local cache has missing deps, will re-fetch", {
63
63
  url: normalizedUrl,
64
64
  hash,
65
65
  missingDeps: deps.length,
@@ -113,7 +113,7 @@ async function cacheHttpModuleInternal(url, options) {
113
113
  if (deps.length > 0) {
114
114
  const depsExist = await validateBundleDepsExist(deps, cacheDir);
115
115
  if (!depsExist) {
116
- httpCacheLog.warn("Cached code has missing bundle deps, will re-fetch", {
116
+ httpCacheLog.debug("Cached code has missing bundle deps, will re-fetch", {
117
117
  url: normalizedUrl,
118
118
  hash,
119
119
  missingDeps: deps.length,
@@ -106,7 +106,7 @@ export async function readDistributedCache(transformCacheKey, projectId, content
106
106
  }
107
107
  const unresolvedDeps = await findMissingFileDependenciesInCode(moduleCode, log);
108
108
  if (unresolvedDeps.length > 0) {
109
- log.warn(`${LOG_PREFIX_MDX_LOADER} Cached code has ${unresolvedDeps.length} missing file dependencies, invalidating`, { normalizedPath, missingDeps: unresolvedDeps.slice(0, 5) });
109
+ log.debug(`${LOG_PREFIX_MDX_LOADER} Cached code has ${unresolvedDeps.length} missing file dependencies, invalidating`, { normalizedPath, missingDeps: unresolvedDeps.slice(0, 5) });
110
110
  moduleCode = null;
111
111
  }
112
112
  }
@@ -28,7 +28,7 @@ function logInitOnce() {
28
28
  if (_initLogged)
29
29
  return;
30
30
  _initLogged = true;
31
- logger.warn(`${LOG_PREFIX} Initialized`, {
31
+ logger.debug(`${LOG_PREFIX} Initialized`, {
32
32
  importMetaUrl: globalThis[Symbol.for("import-meta-ponyfill-esmodule")](import.meta).url,
33
33
  frameworkRoot: FRAMEWORK_ROOT,
34
34
  embeddedSrcDir: EMBEDDED_SRC_DIR,
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.318";
1
+ export declare const VERSION = "0.1.320";
2
2
  //# sourceMappingURL=version-constant.d.ts.map
@@ -1,3 +1,3 @@
1
1
  // Keep in sync with deno.json version.
2
2
  // scripts/release.ts updates this constant during releases.
3
- export const VERSION = "0.1.318";
3
+ export const VERSION = "0.1.320";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfront",
3
- "version": "0.1.318",
3
+ "version": "0.1.320",
4
4
  "description": "The simplest way to build AI-powered apps",
5
5
  "keywords": [
6
6
  "react",
package/src/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.318",
3
+ "version": "0.1.320",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "workspace": [
@@ -22,7 +22,7 @@ export function isLikelyScannerProbePath(pathname: string): boolean {
22
22
  .some((segment) => SCANNER_PROBE_SEGMENTS.has(segment));
23
23
  }
24
24
 
25
- export type ProxyFailureLogLevel = "warn" | "error";
25
+ export type ProxyFailureLogLevel = "info" | "warn" | "error";
26
26
 
27
27
  export function getProxyFailureLogLevel(
28
28
  status: number,
@@ -37,5 +37,6 @@ export function getProxyFailureLogLevel(
37
37
  return "warn";
38
38
  }
39
39
 
40
+ if (status < 400) return "info";
40
41
  return status < 500 ? "warn" : "error";
41
42
  }
@@ -302,7 +302,7 @@ function forwardToServer(req: Request): Promise<Response> {
302
302
  async () => {
303
303
  if (ctx.error) {
304
304
  const ms = Math.round(performance.now() - startTime);
305
- const logLevel = ctx.error.status < 500 ? "warn" : "error";
305
+ const logLevel = getProxyFailureLogLevel(ctx.error.status, req.method, url.pathname);
306
306
  proxyLogger[logLevel](`${ctx.error.status} ${req.method} ${url.pathname}`, { ms });
307
307
  endSpan(spanInfo?.span, ctx.error.status);
308
308
  return createProxyErrorResponse(ctx.error);
@@ -115,7 +115,7 @@ export async function ensureProjectDiscovery(ctx: HandlerContext): Promise<void>
115
115
  if (
116
116
  result.agents.size === 0 && result.tools.size === 0 && shouldWarnOnEmptyAiDiscovery
117
117
  ) {
118
- logger.warn("Primitive discovery found 0 agents and 0 tools", {
118
+ logger.info("Primitive discovery found 0 agents and 0 tools", {
119
119
  ...logData,
120
120
  errorMessages: result.errors.map((e) => e.error.message).slice(0, 5),
121
121
  baseDir: ctx.projectDir,
@@ -110,7 +110,7 @@ async function cacheHttpModuleInternal(url: string, options: CacheOptions): Prom
110
110
  if (deps.length > 0) {
111
111
  const depsValid = await validateBundleDepsExist(deps, cacheDir);
112
112
  if (!depsValid) {
113
- httpCacheLog.warn("Local cache has missing deps, will re-fetch", {
113
+ httpCacheLog.debug("Local cache has missing deps, will re-fetch", {
114
114
  url: normalizedUrl,
115
115
  hash,
116
116
  missingDeps: deps.length,
@@ -172,7 +172,7 @@ async function cacheHttpModuleInternal(url: string, options: CacheOptions): Prom
172
172
  if (deps.length > 0) {
173
173
  const depsExist = await validateBundleDepsExist(deps, cacheDir);
174
174
  if (!depsExist) {
175
- httpCacheLog.warn("Cached code has missing bundle deps, will re-fetch", {
175
+ httpCacheLog.debug("Cached code has missing bundle deps, will re-fetch", {
176
176
  url: normalizedUrl,
177
177
  hash,
178
178
  missingDeps: deps.length,
@@ -151,7 +151,7 @@ export async function readDistributedCache(
151
151
 
152
152
  const unresolvedDeps = await findMissingFileDependenciesInCode(moduleCode, log);
153
153
  if (unresolvedDeps.length > 0) {
154
- log.warn(
154
+ log.debug(
155
155
  `${LOG_PREFIX_MDX_LOADER} Cached code has ${unresolvedDeps.length} missing file dependencies, invalidating`,
156
156
  { normalizedPath, missingDeps: unresolvedDeps.slice(0, 5) },
157
157
  );
@@ -71,7 +71,7 @@ let _initLogged = false;
71
71
  function logInitOnce(): void {
72
72
  if (_initLogged) return;
73
73
  _initLogged = true;
74
- logger.warn(`${LOG_PREFIX} Initialized`, {
74
+ logger.debug(`${LOG_PREFIX} Initialized`, {
75
75
  importMetaUrl: import.meta.url,
76
76
  frameworkRoot: FRAMEWORK_ROOT,
77
77
  embeddedSrcDir: EMBEDDED_SRC_DIR,
@@ -1,3 +1,3 @@
1
1
  // Keep in sync with deno.json version.
2
2
  // scripts/release.ts updates this constant during releases.
3
- export const VERSION = "0.1.318";
3
+ export const VERSION = "0.1.320";