veryfront 0.0.9 → 0.0.10
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/ai/index.js +238 -45
- package/dist/ai/index.js.map +4 -4
- package/dist/ai/react.d.ts +103 -2
- package/dist/cli.js +3912 -865
- package/dist/components.js +42 -38
- package/dist/components.js.map +4 -4
- package/dist/config.js +8 -0
- package/dist/config.js.map +3 -3
- package/dist/data.js +19 -2
- package/dist/data.js.map +4 -4
- package/dist/index.js +70 -52
- package/dist/index.js.map +4 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -131,7 +131,6 @@ function __loggerResetForTests(options = {}) {
|
|
|
131
131
|
var LogLevel, originalConsole, cachedLogLevel, ConsoleLogger, getDefaultLevel, trackedLoggers, cliLogger, serverLogger, rendererLogger, bundlerLogger, agentLogger, logger;
|
|
132
132
|
var init_logger = __esm({
|
|
133
133
|
"src/core/utils/logger/logger.ts"() {
|
|
134
|
-
"use strict";
|
|
135
134
|
init_env();
|
|
136
135
|
LogLevel = /* @__PURE__ */ ((LogLevel2) => {
|
|
137
136
|
LogLevel2[LogLevel2["DEBUG"] = 0] = "DEBUG";
|
|
@@ -237,7 +236,6 @@ var init_build = __esm({
|
|
|
237
236
|
var SECONDS_PER_MINUTE, MINUTES_PER_HOUR, HOURS_PER_DAY, MS_PER_SECOND, DEFAULT_LRU_MAX_ENTRIES, COMPONENT_LOADER_MAX_ENTRIES, COMPONENT_LOADER_TTL_MS, MDX_RENDERER_MAX_ENTRIES, MDX_RENDERER_TTL_MS, RENDERER_CORE_MAX_ENTRIES, RENDERER_CORE_TTL_MS, TSX_LAYOUT_MAX_ENTRIES, TSX_LAYOUT_TTL_MS, DATA_FETCHING_MAX_ENTRIES, DATA_FETCHING_TTL_MS, MDX_CACHE_TTL_PRODUCTION_MS, MDX_CACHE_TTL_DEVELOPMENT_MS, BUNDLE_CACHE_TTL_PRODUCTION_MS, BUNDLE_CACHE_TTL_DEVELOPMENT_MS, BUNDLE_MANIFEST_PROD_TTL_MS, BUNDLE_MANIFEST_DEV_TTL_MS, RSC_MANIFEST_CACHE_TTL_MS, SERVER_ACTION_DEFAULT_TTL_SEC, DENO_KV_SAFE_SIZE_LIMIT_BYTES, HTTP_CACHE_SHORT_MAX_AGE_SEC, HTTP_CACHE_MEDIUM_MAX_AGE_SEC, HTTP_CACHE_LONG_MAX_AGE_SEC, ONE_DAY_MS, CACHE_CLEANUP_INTERVAL_MS, LRU_DEFAULT_MAX_ENTRIES, LRU_DEFAULT_MAX_SIZE_BYTES, CLEANUP_INTERVAL_MULTIPLIER;
|
|
238
237
|
var init_cache = __esm({
|
|
239
238
|
"src/core/utils/constants/cache.ts"() {
|
|
240
|
-
"use strict";
|
|
241
239
|
SECONDS_PER_MINUTE = 60;
|
|
242
240
|
MINUTES_PER_HOUR = 60;
|
|
243
241
|
HOURS_PER_DAY = 24;
|
|
@@ -311,7 +309,6 @@ function getUnoCSSTailwindResetUrl() {
|
|
|
311
309
|
var ESM_CDN_BASE, JSDELIVR_CDN_BASE, DENO_STD_BASE, REACT_VERSION_17, REACT_VERSION_18_2, REACT_VERSION_18_3, REACT_VERSION_19_RC, REACT_VERSION_19, REACT_DEFAULT_VERSION, DEFAULT_ALLOWED_CDN_HOSTS, DENO_STD_VERSION, UNOCSS_VERSION;
|
|
312
310
|
var init_cdn = __esm({
|
|
313
311
|
"src/core/utils/constants/cdn.ts"() {
|
|
314
|
-
"use strict";
|
|
315
312
|
ESM_CDN_BASE = "https://esm.sh";
|
|
316
313
|
JSDELIVR_CDN_BASE = "https://cdn.jsdelivr.net";
|
|
317
314
|
DENO_STD_BASE = "https://deno.land";
|
|
@@ -526,7 +523,7 @@ var init_deno = __esm({
|
|
|
526
523
|
"deno.json"() {
|
|
527
524
|
deno_default = {
|
|
528
525
|
name: "veryfront",
|
|
529
|
-
version: "0.0.
|
|
526
|
+
version: "0.0.10",
|
|
530
527
|
nodeModulesDir: "auto",
|
|
531
528
|
workspace: [
|
|
532
529
|
"./examples/async-worker-redis",
|
|
@@ -1238,22 +1235,44 @@ var init_bundle_manifest_init = __esm({
|
|
|
1238
1235
|
}
|
|
1239
1236
|
});
|
|
1240
1237
|
|
|
1238
|
+
// src/platform/compat/runtime.ts
|
|
1239
|
+
var isDeno, isNode, isBun, isCloudflare;
|
|
1240
|
+
var init_runtime = __esm({
|
|
1241
|
+
"src/platform/compat/runtime.ts"() {
|
|
1242
|
+
"use strict";
|
|
1243
|
+
isDeno = typeof Deno !== "undefined";
|
|
1244
|
+
isNode = typeof globalThis.process !== "undefined" && globalThis.process?.versions?.node !== void 0;
|
|
1245
|
+
isBun = typeof globalThis.Bun !== "undefined";
|
|
1246
|
+
isCloudflare = typeof globalThis !== "undefined" && "caches" in globalThis && "WebSocketPair" in globalThis;
|
|
1247
|
+
}
|
|
1248
|
+
});
|
|
1249
|
+
|
|
1250
|
+
// src/platform/compat/process.ts
|
|
1251
|
+
import process2 from "node:process";
|
|
1252
|
+
function getEnv(key) {
|
|
1253
|
+
if (isDeno) {
|
|
1254
|
+
return process2.env(key);
|
|
1255
|
+
}
|
|
1256
|
+
return process2.env[key];
|
|
1257
|
+
}
|
|
1258
|
+
var init_process = __esm({
|
|
1259
|
+
"src/platform/compat/process.ts"() {
|
|
1260
|
+
"use strict";
|
|
1261
|
+
init_runtime();
|
|
1262
|
+
}
|
|
1263
|
+
});
|
|
1264
|
+
|
|
1241
1265
|
// src/core/utils/feature-flags.ts
|
|
1242
1266
|
function isRSCEnabled(config) {
|
|
1243
1267
|
if (config?.experimental?.rsc !== void 0) {
|
|
1244
1268
|
return config.experimental.rsc;
|
|
1245
1269
|
}
|
|
1246
|
-
|
|
1247
|
-
return process.env("VERYFRONT_EXPERIMENTAL_RSC") === "1";
|
|
1248
|
-
}
|
|
1249
|
-
if (typeof process !== "undefined" && process?.env) {
|
|
1250
|
-
return process.env.VERYFRONT_EXPERIMENTAL_RSC === "1";
|
|
1251
|
-
}
|
|
1252
|
-
return false;
|
|
1270
|
+
return getEnv("VERYFRONT_EXPERIMENTAL_RSC") === "1";
|
|
1253
1271
|
}
|
|
1254
1272
|
var init_feature_flags = __esm({
|
|
1255
1273
|
"src/core/utils/feature-flags.ts"() {
|
|
1256
1274
|
"use strict";
|
|
1275
|
+
init_process();
|
|
1257
1276
|
}
|
|
1258
1277
|
});
|
|
1259
1278
|
|
|
@@ -1712,6 +1731,7 @@ var init_define_config = __esm({
|
|
|
1712
1731
|
"src/core/config/define-config.ts"() {
|
|
1713
1732
|
"use strict";
|
|
1714
1733
|
init_veryfront_error();
|
|
1734
|
+
init_process();
|
|
1715
1735
|
}
|
|
1716
1736
|
});
|
|
1717
1737
|
|
|
@@ -2163,9 +2183,9 @@ var init_filesystem_adapter = __esm({
|
|
|
2163
2183
|
}
|
|
2164
2184
|
async makeTempDir(prefix) {
|
|
2165
2185
|
const { mkdtemp } = await import("node:fs/promises");
|
|
2166
|
-
const { join:
|
|
2186
|
+
const { join: join8 } = await import("node:path");
|
|
2167
2187
|
const { tmpdir } = await import("node:os");
|
|
2168
|
-
return await mkdtemp(
|
|
2188
|
+
return await mkdtemp(join8(tmpdir(), prefix));
|
|
2169
2189
|
}
|
|
2170
2190
|
watch(paths, options) {
|
|
2171
2191
|
const pathArray = Array.isArray(paths) ? paths : [paths];
|
|
@@ -2226,20 +2246,20 @@ var init_filesystem_adapter = __esm({
|
|
|
2226
2246
|
});
|
|
2227
2247
|
|
|
2228
2248
|
// src/platform/adapters/node/environment-adapter.ts
|
|
2229
|
-
import
|
|
2249
|
+
import process3 from "node:process";
|
|
2230
2250
|
var NodeEnvironmentAdapter;
|
|
2231
2251
|
var init_environment_adapter = __esm({
|
|
2232
2252
|
"src/platform/adapters/node/environment-adapter.ts"() {
|
|
2233
2253
|
"use strict";
|
|
2234
2254
|
NodeEnvironmentAdapter = class {
|
|
2235
2255
|
get(key) {
|
|
2236
|
-
return
|
|
2256
|
+
return process3.env[key];
|
|
2237
2257
|
}
|
|
2238
2258
|
set(key, value) {
|
|
2239
|
-
|
|
2259
|
+
process3.env[key] = value;
|
|
2240
2260
|
}
|
|
2241
2261
|
toObject() {
|
|
2242
|
-
return { ...
|
|
2262
|
+
return { ...process3.env };
|
|
2243
2263
|
}
|
|
2244
2264
|
};
|
|
2245
2265
|
}
|
|
@@ -7184,18 +7204,6 @@ var init_error_catalog = __esm({
|
|
|
7184
7204
|
}
|
|
7185
7205
|
});
|
|
7186
7206
|
|
|
7187
|
-
// src/platform/compat/runtime.ts
|
|
7188
|
-
var isDeno, isNode, isBun, isCloudflare;
|
|
7189
|
-
var init_runtime = __esm({
|
|
7190
|
-
"src/platform/compat/runtime.ts"() {
|
|
7191
|
-
"use strict";
|
|
7192
|
-
isDeno = typeof Deno !== "undefined";
|
|
7193
|
-
isNode = typeof globalThis.process !== "undefined" && globalThis.process?.versions?.node !== void 0;
|
|
7194
|
-
isBun = typeof globalThis.Bun !== "undefined";
|
|
7195
|
-
isCloudflare = typeof globalThis !== "undefined" && "caches" in globalThis && "WebSocketPair" in globalThis;
|
|
7196
|
-
}
|
|
7197
|
-
});
|
|
7198
|
-
|
|
7199
7207
|
// src/platform/compat/console/ansi.ts
|
|
7200
7208
|
var ansi, red, green, yellow, blue, magenta, cyan, white, gray, bold, dim, italic, underline, strikethrough, reset;
|
|
7201
7209
|
var init_ansi = __esm({
|
|
@@ -7378,14 +7386,6 @@ var init_error_formatter = __esm({
|
|
|
7378
7386
|
}
|
|
7379
7387
|
});
|
|
7380
7388
|
|
|
7381
|
-
// src/platform/compat/process.ts
|
|
7382
|
-
import process3 from "node:process";
|
|
7383
|
-
var init_process = __esm({
|
|
7384
|
-
"src/platform/compat/process.ts"() {
|
|
7385
|
-
init_runtime();
|
|
7386
|
-
}
|
|
7387
|
-
});
|
|
7388
|
-
|
|
7389
7389
|
// src/core/errors/user-friendly/error-wrapper.ts
|
|
7390
7390
|
var init_error_wrapper = __esm({
|
|
7391
7391
|
"src/core/errors/user-friendly/error-wrapper.ts"() {
|
|
@@ -7481,9 +7481,9 @@ var init_filesystem_adapter2 = __esm({
|
|
|
7481
7481
|
}
|
|
7482
7482
|
async makeTempDir(prefix) {
|
|
7483
7483
|
const { mkdtemp } = await import("node:fs/promises");
|
|
7484
|
-
const { join:
|
|
7484
|
+
const { join: join8 } = await import("node:path");
|
|
7485
7485
|
const { tmpdir } = await import("node:os");
|
|
7486
|
-
return await mkdtemp(
|
|
7486
|
+
return await mkdtemp(join8(tmpdir(), prefix));
|
|
7487
7487
|
}
|
|
7488
7488
|
watch(paths, options) {
|
|
7489
7489
|
const pathArray = Array.isArray(paths) ? paths : [paths];
|
|
@@ -7817,16 +7817,16 @@ function createMockAdapter() {
|
|
|
7817
7817
|
files.set(path, content);
|
|
7818
7818
|
return Promise.resolve();
|
|
7819
7819
|
},
|
|
7820
|
-
exists:
|
|
7820
|
+
exists: (path) => {
|
|
7821
7821
|
if (files.has(path))
|
|
7822
|
-
return true;
|
|
7822
|
+
return Promise.resolve(true);
|
|
7823
7823
|
if (directories.has(path))
|
|
7824
|
-
return true;
|
|
7824
|
+
return Promise.resolve(true);
|
|
7825
7825
|
for (const filePath of files.keys()) {
|
|
7826
7826
|
if (filePath.startsWith(path + "/"))
|
|
7827
|
-
return true;
|
|
7827
|
+
return Promise.resolve(true);
|
|
7828
7828
|
}
|
|
7829
|
-
return false;
|
|
7829
|
+
return Promise.resolve(false);
|
|
7830
7830
|
},
|
|
7831
7831
|
readDir: async function* (path) {
|
|
7832
7832
|
const entries = /* @__PURE__ */ new Map();
|
|
@@ -8501,6 +8501,7 @@ var LRUCacheAdapter = class {
|
|
|
8501
8501
|
|
|
8502
8502
|
// src/core/utils/lru-wrapper.ts
|
|
8503
8503
|
init_utils();
|
|
8504
|
+
init_process();
|
|
8504
8505
|
var LRUCache = class {
|
|
8505
8506
|
adapter;
|
|
8506
8507
|
cleanupTimer;
|
|
@@ -8576,7 +8577,7 @@ function shouldDisableInterval() {
|
|
|
8576
8577
|
return true;
|
|
8577
8578
|
}
|
|
8578
8579
|
try {
|
|
8579
|
-
return
|
|
8580
|
+
return getEnv("VF_DISABLE_LRU_INTERVAL") === "1";
|
|
8580
8581
|
} catch {
|
|
8581
8582
|
return false;
|
|
8582
8583
|
}
|
|
@@ -9381,8 +9382,19 @@ init_path_utils();
|
|
|
9381
9382
|
// src/routing/matchers/index.ts
|
|
9382
9383
|
init_utils();
|
|
9383
9384
|
|
|
9384
|
-
// src/
|
|
9385
|
-
import
|
|
9385
|
+
// src/platform/compat/path-helper.ts
|
|
9386
|
+
import nodePath from "node:path";
|
|
9387
|
+
var pathMod = null;
|
|
9388
|
+
var denoPathPromise = null;
|
|
9389
|
+
if (typeof Deno === "undefined") {
|
|
9390
|
+
pathMod = nodePath;
|
|
9391
|
+
} else {
|
|
9392
|
+
denoPathPromise = import("path").then((mod) => {
|
|
9393
|
+
pathMod = mod;
|
|
9394
|
+
return pathMod;
|
|
9395
|
+
});
|
|
9396
|
+
}
|
|
9397
|
+
var sep = nodePath.sep;
|
|
9386
9398
|
|
|
9387
9399
|
// src/routing/client/dom-utils.ts
|
|
9388
9400
|
init_utils();
|
|
@@ -9405,7 +9417,7 @@ init_utils();
|
|
|
9405
9417
|
// src/routing/api/handler.ts
|
|
9406
9418
|
init_utils();
|
|
9407
9419
|
init_config();
|
|
9408
|
-
import { join as
|
|
9420
|
+
import { join as join7 } from "path";
|
|
9409
9421
|
init_veryfront_error();
|
|
9410
9422
|
|
|
9411
9423
|
// src/http/responses.ts
|
|
@@ -10162,7 +10174,7 @@ function createRscInstruments(meter, config) {
|
|
|
10162
10174
|
}
|
|
10163
10175
|
|
|
10164
10176
|
// src/observability/instruments/instruments-factory.ts
|
|
10165
|
-
|
|
10177
|
+
function initializeInstruments(meter, config, runtimeState) {
|
|
10166
10178
|
const instruments = {
|
|
10167
10179
|
httpRequestCounter: null,
|
|
10168
10180
|
httpRequestDuration: null,
|
|
@@ -10212,7 +10224,7 @@ async function initializeInstruments(meter, config, runtimeState) {
|
|
|
10212
10224
|
} catch (error2) {
|
|
10213
10225
|
serverLogger.warn("[metrics] Failed to initialize metric instruments", error2);
|
|
10214
10226
|
}
|
|
10215
|
-
return instruments;
|
|
10227
|
+
return Promise.resolve(instruments);
|
|
10216
10228
|
}
|
|
10217
10229
|
|
|
10218
10230
|
// src/observability/metrics/recorder.ts
|
|
@@ -11461,9 +11473,11 @@ init_utils();
|
|
|
11461
11473
|
// src/security/secure-fs.ts
|
|
11462
11474
|
init_utils();
|
|
11463
11475
|
|
|
11476
|
+
// src/routing/api/api-route-matcher.ts
|
|
11477
|
+
init_process();
|
|
11478
|
+
|
|
11464
11479
|
// src/routing/api/module-loader/loader.ts
|
|
11465
11480
|
init_utils();
|
|
11466
|
-
import { dirname as dirname2, isAbsolute, join as join6, resolve } from "path";
|
|
11467
11481
|
|
|
11468
11482
|
// src/routing/api/module-loader/esbuild-plugin.ts
|
|
11469
11483
|
init_utils();
|
|
@@ -11480,12 +11494,16 @@ init_utils();
|
|
|
11480
11494
|
// src/routing/api/module-loader/loader.ts
|
|
11481
11495
|
init_veryfront_error();
|
|
11482
11496
|
|
|
11497
|
+
// src/platform/compat/fs.ts
|
|
11498
|
+
init_veryfront_error();
|
|
11499
|
+
init_runtime();
|
|
11500
|
+
|
|
11483
11501
|
// src/routing/api/route-discovery.ts
|
|
11484
11502
|
import { relative } from "path";
|
|
11485
11503
|
|
|
11486
11504
|
// src/core/utils/file-discovery.ts
|
|
11487
11505
|
init_deno2();
|
|
11488
|
-
import { join as
|
|
11506
|
+
import { join as join6 } from "path";
|
|
11489
11507
|
|
|
11490
11508
|
// src/routing/api/route-executor.ts
|
|
11491
11509
|
init_veryfront_error();
|