veryfront 0.0.63 → 0.0.65
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/client.js +27 -0
- package/dist/ai/client.js.map +3 -3
- package/dist/ai/components.js +27 -0
- package/dist/ai/components.js.map +3 -3
- package/dist/ai/dev.js +27 -0
- package/dist/ai/dev.js.map +3 -3
- package/dist/ai/index.js +56 -29
- package/dist/ai/index.js.map +3 -3
- package/dist/ai/primitives.js +27 -0
- package/dist/ai/primitives.js.map +3 -3
- package/dist/ai/production.js +27 -0
- package/dist/ai/production.js.map +3 -3
- package/dist/ai/react.js +27 -0
- package/dist/ai/react.js.map +3 -3
- package/dist/ai/workflow-react.js +27 -0
- package/dist/ai/workflow-react.js.map +3 -3
- package/dist/ai/workflow.js +54 -25
- package/dist/ai/workflow.js.map +3 -3
- package/dist/cli.js +263 -3016
- package/dist/components.js +589 -226
- package/dist/components.js.map +4 -4
- package/dist/config.js +96 -25
- package/dist/config.js.map +3 -3
- package/dist/data.js +54 -25
- package/dist/data.js.map +3 -3
- package/dist/index.js +791 -232
- package/dist/index.js.map +4 -4
- package/dist/oauth/handlers.js +28 -1
- package/dist/oauth/handlers.js.map +3 -3
- package/dist/oauth/index.js +28 -1
- package/dist/oauth/index.js.map +3 -3
- package/dist/oauth/providers.js +28 -1
- package/dist/oauth/providers.js.map +3 -3
- package/dist/oauth/token-store.js +27 -0
- package/dist/oauth/token-store.js.map +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -38,6 +38,39 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
38
38
|
mod
|
|
39
39
|
));
|
|
40
40
|
|
|
41
|
+
// src/_shims/deno-env.ts
|
|
42
|
+
var denoEnvShim;
|
|
43
|
+
var init_deno_env = __esm({
|
|
44
|
+
"src/_shims/deno-env.ts"() {
|
|
45
|
+
"use strict";
|
|
46
|
+
denoEnvShim = {
|
|
47
|
+
get(key) {
|
|
48
|
+
return process.env[key];
|
|
49
|
+
},
|
|
50
|
+
set(key, value) {
|
|
51
|
+
process.env[key] = value;
|
|
52
|
+
},
|
|
53
|
+
delete(key) {
|
|
54
|
+
delete process.env[key];
|
|
55
|
+
},
|
|
56
|
+
has(key) {
|
|
57
|
+
return key in process.env;
|
|
58
|
+
},
|
|
59
|
+
toObject() {
|
|
60
|
+
return { ...process.env };
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
if (typeof globalThis.Deno === "undefined") {
|
|
64
|
+
globalThis.Deno = {
|
|
65
|
+
env: denoEnvShim,
|
|
66
|
+
cwd: () => process.cwd()
|
|
67
|
+
};
|
|
68
|
+
} else if (typeof globalThis.Deno.env === "undefined") {
|
|
69
|
+
globalThis.Deno.env = denoEnvShim;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
|
|
41
74
|
// src/core/utils/runtime-guards.ts
|
|
42
75
|
function hasDenoRuntime(global) {
|
|
43
76
|
return typeof global === "object" && global !== null && "Deno" in global && typeof global.Deno?.env?.get === "function";
|
|
@@ -51,6 +84,7 @@ function hasBunRuntime(global) {
|
|
|
51
84
|
var init_runtime_guards = __esm({
|
|
52
85
|
"src/core/utils/runtime-guards.ts"() {
|
|
53
86
|
"use strict";
|
|
87
|
+
init_deno_env();
|
|
54
88
|
}
|
|
55
89
|
});
|
|
56
90
|
|
|
@@ -83,6 +117,7 @@ function isDevelopmentEnvironment() {
|
|
|
83
117
|
var init_env = __esm({
|
|
84
118
|
"src/core/utils/logger/env.ts"() {
|
|
85
119
|
"use strict";
|
|
120
|
+
init_deno_env();
|
|
86
121
|
init_runtime_guards();
|
|
87
122
|
}
|
|
88
123
|
});
|
|
@@ -131,6 +166,8 @@ function __loggerResetForTests(options = {}) {
|
|
|
131
166
|
var LogLevel, originalConsole, cachedLogLevel, ConsoleLogger, getDefaultLevel, trackedLoggers, cliLogger, serverLogger, rendererLogger, bundlerLogger, agentLogger, logger;
|
|
132
167
|
var init_logger = __esm({
|
|
133
168
|
"src/core/utils/logger/logger.ts"() {
|
|
169
|
+
"use strict";
|
|
170
|
+
init_deno_env();
|
|
134
171
|
init_env();
|
|
135
172
|
LogLevel = /* @__PURE__ */ ((LogLevel2) => {
|
|
136
173
|
LogLevel2[LogLevel2["DEBUG"] = 0] = "DEBUG";
|
|
@@ -214,6 +251,7 @@ var init_logger = __esm({
|
|
|
214
251
|
var init_logger2 = __esm({
|
|
215
252
|
"src/core/utils/logger/index.ts"() {
|
|
216
253
|
"use strict";
|
|
254
|
+
init_deno_env();
|
|
217
255
|
init_logger();
|
|
218
256
|
init_env();
|
|
219
257
|
}
|
|
@@ -224,6 +262,7 @@ var DEFAULT_BUILD_CONCURRENCY, IMAGE_OPTIMIZATION;
|
|
|
224
262
|
var init_build = __esm({
|
|
225
263
|
"src/core/utils/constants/build.ts"() {
|
|
226
264
|
"use strict";
|
|
265
|
+
init_deno_env();
|
|
227
266
|
DEFAULT_BUILD_CONCURRENCY = 4;
|
|
228
267
|
IMAGE_OPTIMIZATION = {
|
|
229
268
|
DEFAULT_SIZES: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
|
|
@@ -236,6 +275,8 @@ var init_build = __esm({
|
|
|
236
275
|
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;
|
|
237
276
|
var init_cache = __esm({
|
|
238
277
|
"src/core/utils/constants/cache.ts"() {
|
|
278
|
+
"use strict";
|
|
279
|
+
init_deno_env();
|
|
239
280
|
SECONDS_PER_MINUTE = 60;
|
|
240
281
|
MINUTES_PER_HOUR = 60;
|
|
241
282
|
HOURS_PER_DAY = 24;
|
|
@@ -277,14 +318,14 @@ var init_deno = __esm({
|
|
|
277
318
|
"deno.json"() {
|
|
278
319
|
deno_default = {
|
|
279
320
|
name: "veryfront",
|
|
280
|
-
version: "0.0.
|
|
321
|
+
version: "0.0.65",
|
|
322
|
+
nodeModulesDir: "auto",
|
|
281
323
|
exclude: [
|
|
282
324
|
"npm/",
|
|
283
325
|
"dist/",
|
|
284
326
|
"coverage/",
|
|
285
327
|
"scripts/",
|
|
286
328
|
"examples/",
|
|
287
|
-
"tests/",
|
|
288
329
|
"src/cli/templates/files/",
|
|
289
330
|
"src/cli/templates/integrations/"
|
|
290
331
|
],
|
|
@@ -368,34 +409,36 @@ var init_deno = __esm({
|
|
|
368
409
|
"react-dom/client": "https://esm.sh/react-dom@18.3.1/client",
|
|
369
410
|
"react/jsx-runtime": "https://esm.sh/react@18.3.1/jsx-runtime",
|
|
370
411
|
"react/jsx-dev-runtime": "https://esm.sh/react@18.3.1/jsx-dev-runtime",
|
|
371
|
-
"@mdx-js/mdx": "
|
|
372
|
-
"@mdx-js/react": "
|
|
373
|
-
"unist-util-visit": "
|
|
374
|
-
"mdast-util-to-string": "
|
|
375
|
-
"github-slugger": "
|
|
376
|
-
"remark-gfm": "
|
|
377
|
-
"remark-frontmatter": "
|
|
378
|
-
"rehype-highlight": "
|
|
379
|
-
"rehype-slug": "
|
|
412
|
+
"@mdx-js/mdx": "npm:@mdx-js/mdx@3.0.0",
|
|
413
|
+
"@mdx-js/react": "npm:@mdx-js/react@3.0.0",
|
|
414
|
+
"unist-util-visit": "npm:unist-util-visit@5.0.0",
|
|
415
|
+
"mdast-util-to-string": "npm:mdast-util-to-string@4.0.0",
|
|
416
|
+
"github-slugger": "npm:github-slugger@2.0.0",
|
|
417
|
+
"remark-gfm": "npm:remark-gfm@4.0.1",
|
|
418
|
+
"remark-frontmatter": "npm:remark-frontmatter@5.0.0",
|
|
419
|
+
"rehype-highlight": "npm:rehype-highlight@7.0.2",
|
|
420
|
+
"rehype-slug": "npm:rehype-slug@6.0.0",
|
|
380
421
|
esbuild: "https://deno.land/x/esbuild@v0.20.1/wasm.js",
|
|
381
422
|
"esbuild/mod.js": "https://deno.land/x/esbuild@v0.20.1/mod.js",
|
|
382
|
-
"es-module-lexer": "
|
|
383
|
-
zod: "
|
|
384
|
-
"mime-types": "
|
|
385
|
-
mdast: "
|
|
386
|
-
hast: "
|
|
387
|
-
unist: "
|
|
388
|
-
unified: "
|
|
389
|
-
ai: "https://esm.sh/ai@5.0.
|
|
390
|
-
"ai/react": "https://esm.sh/@ai-sdk/react@2.0.
|
|
391
|
-
"@ai-sdk/react": "https://esm.sh/@ai-sdk/react@2.0.
|
|
392
|
-
"@ai-sdk/openai": "https://esm.sh/@ai-sdk/openai@2.0.
|
|
393
|
-
"@ai-sdk/anthropic": "https://esm.sh/@ai-sdk/anthropic@2.0.
|
|
423
|
+
"es-module-lexer": "npm:es-module-lexer@1.5.0",
|
|
424
|
+
zod: "npm:zod@3.23.8",
|
|
425
|
+
"mime-types": "npm:mime-types@2.1.35",
|
|
426
|
+
mdast: "npm:@types/mdast@4.0.3",
|
|
427
|
+
hast: "npm:@types/hast@3.0.3",
|
|
428
|
+
unist: "npm:@types/unist@3.0.2",
|
|
429
|
+
unified: "npm:unified@11.0.5",
|
|
430
|
+
ai: "https://esm.sh/ai@5.0.108?deps=react@18.3.1,react-dom@18.3.1",
|
|
431
|
+
"ai/react": "https://esm.sh/@ai-sdk/react@2.0.109?deps=react@18.3.1,react-dom@18.3.1",
|
|
432
|
+
"@ai-sdk/react": "https://esm.sh/@ai-sdk/react@2.0.109?deps=react@18.3.1,react-dom@18.3.1",
|
|
433
|
+
"@ai-sdk/openai": "https://esm.sh/@ai-sdk/openai@2.0.80",
|
|
434
|
+
"@ai-sdk/anthropic": "https://esm.sh/@ai-sdk/anthropic@2.0.54",
|
|
394
435
|
unocss: "https://esm.sh/unocss@0.59.0",
|
|
395
436
|
"@unocss/core": "https://esm.sh/@unocss/core@0.59.0",
|
|
396
437
|
"@unocss/preset-wind": "https://esm.sh/@unocss/preset-wind@0.59.0",
|
|
397
438
|
redis: "npm:redis",
|
|
398
|
-
pg: "npm:pg"
|
|
439
|
+
pg: "npm:pg",
|
|
440
|
+
"@opentelemetry/api": "npm:@opentelemetry/api@1",
|
|
441
|
+
"@opentelemetry/core": "npm:@opentelemetry/core@1"
|
|
399
442
|
},
|
|
400
443
|
compilerOptions: {
|
|
401
444
|
jsx: "react-jsx",
|
|
@@ -487,6 +530,7 @@ var isDeno, isNode, isBun, isCloudflare;
|
|
|
487
530
|
var init_runtime = __esm({
|
|
488
531
|
"src/platform/compat/runtime.ts"() {
|
|
489
532
|
"use strict";
|
|
533
|
+
init_deno_env();
|
|
490
534
|
isDeno = typeof Deno !== "undefined";
|
|
491
535
|
isNode = typeof globalThis.process !== "undefined" && globalThis.process?.versions?.node !== void 0;
|
|
492
536
|
isBun = typeof globalThis.Bun !== "undefined";
|
|
@@ -506,7 +550,7 @@ function cwd() {
|
|
|
506
550
|
}
|
|
507
551
|
function getEnv(key) {
|
|
508
552
|
if (isDeno) {
|
|
509
|
-
return
|
|
553
|
+
return Deno.env.get(key);
|
|
510
554
|
}
|
|
511
555
|
if (hasNodeProcess2) {
|
|
512
556
|
return nodeProcess.env[key];
|
|
@@ -547,6 +591,7 @@ var nodeProcess, hasNodeProcess2;
|
|
|
547
591
|
var init_process = __esm({
|
|
548
592
|
"src/platform/compat/process.ts"() {
|
|
549
593
|
"use strict";
|
|
594
|
+
init_deno_env();
|
|
550
595
|
init_runtime();
|
|
551
596
|
nodeProcess = globalThis.process;
|
|
552
597
|
hasNodeProcess2 = !!nodeProcess?.versions?.node;
|
|
@@ -558,6 +603,7 @@ var VERSION;
|
|
|
558
603
|
var init_version = __esm({
|
|
559
604
|
"src/core/utils/version.ts"() {
|
|
560
605
|
"use strict";
|
|
606
|
+
init_deno_env();
|
|
561
607
|
init_deno();
|
|
562
608
|
init_process();
|
|
563
609
|
VERSION = getEnv("VERYFRONT_VERSION") || (typeof deno_default.version === "string" ? deno_default.version : "0.0.0");
|
|
@@ -602,6 +648,8 @@ function getUnoCSSTailwindResetUrl() {
|
|
|
602
648
|
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;
|
|
603
649
|
var init_cdn = __esm({
|
|
604
650
|
"src/core/utils/constants/cdn.ts"() {
|
|
651
|
+
"use strict";
|
|
652
|
+
init_deno_env();
|
|
605
653
|
init_version();
|
|
606
654
|
ESM_CDN_BASE = "https://esm.sh";
|
|
607
655
|
JSDELIVR_CDN_BASE = "https://cdn.jsdelivr.net";
|
|
@@ -638,6 +686,7 @@ var ENV_VARS;
|
|
|
638
686
|
var init_env2 = __esm({
|
|
639
687
|
"src/core/utils/constants/env.ts"() {
|
|
640
688
|
"use strict";
|
|
689
|
+
init_deno_env();
|
|
641
690
|
ENV_VARS = {
|
|
642
691
|
DEBUG: "VERYFRONT_DEBUG",
|
|
643
692
|
DEEP_INSPECT: "VERYFRONT_DEEP_INSPECT",
|
|
@@ -652,7 +701,7 @@ var init_env2 = __esm({
|
|
|
652
701
|
var HASH_SEED_DJB2, HASH_SEED_FNV1A;
|
|
653
702
|
var init_hash = __esm({
|
|
654
703
|
"src/core/utils/constants/hash.ts"() {
|
|
655
|
-
|
|
704
|
+
init_deno_env();
|
|
656
705
|
HASH_SEED_DJB2 = 5381;
|
|
657
706
|
HASH_SEED_FNV1A = 2166136261;
|
|
658
707
|
}
|
|
@@ -662,7 +711,7 @@ var init_hash = __esm({
|
|
|
662
711
|
var KB_IN_BYTES, HTTP_MODULE_FETCH_TIMEOUT_MS, HMR_RECONNECT_DELAY_MS, HMR_RELOAD_DELAY_MS, HMR_FILE_WATCHER_DEBOUNCE_MS, HMR_KEEP_ALIVE_INTERVAL_MS, DASHBOARD_RECONNECT_DELAY_MS, SERVER_FUNCTION_DEFAULT_TIMEOUT_MS, PREFETCH_MAX_SIZE_BYTES, PREFETCH_DEFAULT_TIMEOUT_MS, PREFETCH_DEFAULT_DELAY_MS, HTTP_OK, HTTP_NO_CONTENT, HTTP_CREATED, HTTP_REDIRECT_FOUND, HTTP_NOT_MODIFIED, HTTP_BAD_REQUEST, HTTP_UNAUTHORIZED, HTTP_FORBIDDEN, HTTP_NOT_FOUND, HTTP_METHOD_NOT_ALLOWED, HTTP_GONE, HTTP_PAYLOAD_TOO_LARGE, HTTP_URI_TOO_LONG, HTTP_TOO_MANY_REQUESTS, HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE, HTTP_SERVER_ERROR, HTTP_INTERNAL_SERVER_ERROR, HTTP_BAD_GATEWAY, HTTP_NOT_IMPLEMENTED, HTTP_UNAVAILABLE, HTTP_NETWORK_CONNECT_TIMEOUT, HTTP_STATUS_SUCCESS_MIN, HTTP_STATUS_REDIRECT_MIN, HTTP_STATUS_CLIENT_ERROR_MIN, HTTP_STATUS_SERVER_ERROR_MIN, HTTP_CONTENT_TYPES, MS_PER_MINUTE, HTTP_CONTENT_TYPE_IMAGE_PNG, HTTP_CONTENT_TYPE_IMAGE_JPEG, HTTP_CONTENT_TYPE_IMAGE_WEBP, HTTP_CONTENT_TYPE_IMAGE_AVIF, HTTP_CONTENT_TYPE_IMAGE_SVG, HTTP_CONTENT_TYPE_IMAGE_GIF, HTTP_CONTENT_TYPE_IMAGE_ICO;
|
|
663
712
|
var init_http = __esm({
|
|
664
713
|
"src/core/utils/constants/http.ts"() {
|
|
665
|
-
|
|
714
|
+
init_deno_env();
|
|
666
715
|
init_cache();
|
|
667
716
|
KB_IN_BYTES = 1024;
|
|
668
717
|
HTTP_MODULE_FETCH_TIMEOUT_MS = 2500;
|
|
@@ -728,6 +777,7 @@ var HMR_MAX_MESSAGE_SIZE_BYTES, HMR_MAX_MESSAGES_PER_MINUTE, HMR_CLIENT_RELOAD_D
|
|
|
728
777
|
var init_hmr = __esm({
|
|
729
778
|
"src/core/utils/constants/hmr.ts"() {
|
|
730
779
|
"use strict";
|
|
780
|
+
init_deno_env();
|
|
731
781
|
init_http();
|
|
732
782
|
HMR_MAX_MESSAGE_SIZE_BYTES = 1024 * KB_IN_BYTES;
|
|
733
783
|
HMR_MAX_MESSAGES_PER_MINUTE = 100;
|
|
@@ -752,6 +802,7 @@ var Z_INDEX_DEV_INDICATOR, Z_INDEX_ERROR_OVERLAY, BREAKPOINT_SM, BREAKPOINT_MD,
|
|
|
752
802
|
var init_html = __esm({
|
|
753
803
|
"src/core/utils/constants/html.ts"() {
|
|
754
804
|
"use strict";
|
|
805
|
+
init_deno_env();
|
|
755
806
|
Z_INDEX_DEV_INDICATOR = 9998;
|
|
756
807
|
Z_INDEX_ERROR_OVERLAY = 9999;
|
|
757
808
|
BREAKPOINT_SM = 640;
|
|
@@ -767,6 +818,7 @@ var DEFAULT_DEV_SERVER_PORT, DEFAULT_REDIS_PORT, DEFAULT_API_SERVER_PORT, DEFAUL
|
|
|
767
818
|
var init_network = __esm({
|
|
768
819
|
"src/core/utils/constants/network.ts"() {
|
|
769
820
|
"use strict";
|
|
821
|
+
init_deno_env();
|
|
770
822
|
DEFAULT_DEV_SERVER_PORT = 3e3;
|
|
771
823
|
DEFAULT_REDIS_PORT = 6379;
|
|
772
824
|
DEFAULT_API_SERVER_PORT = 8080;
|
|
@@ -799,6 +851,7 @@ var MAX_PATH_TRAVERSAL_DEPTH, FORBIDDEN_PATH_PATTERNS, DIRECTORY_TRAVERSAL_PATTE
|
|
|
799
851
|
var init_security = __esm({
|
|
800
852
|
"src/core/utils/constants/security.ts"() {
|
|
801
853
|
"use strict";
|
|
854
|
+
init_deno_env();
|
|
802
855
|
MAX_PATH_TRAVERSAL_DEPTH = 10;
|
|
803
856
|
FORBIDDEN_PATH_PATTERNS = [
|
|
804
857
|
/\0/
|
|
@@ -816,6 +869,7 @@ var DEFAULT_PORT, DURATION_HISTOGRAM_BOUNDARIES_MS, SIZE_HISTOGRAM_BOUNDARIES_KB
|
|
|
816
869
|
var init_defaults = __esm({
|
|
817
870
|
"src/core/config/defaults.ts"() {
|
|
818
871
|
"use strict";
|
|
872
|
+
init_deno_env();
|
|
819
873
|
DEFAULT_PORT = 3e3;
|
|
820
874
|
DURATION_HISTOGRAM_BOUNDARIES_MS = [
|
|
821
875
|
5,
|
|
@@ -866,6 +920,8 @@ function normalizeChunkPath(filename, basePath = INTERNAL_PATH_PREFIXES.CHUNKS)
|
|
|
866
920
|
var DEFAULT_DASHBOARD_PORT, INTERNAL_PREFIX, INTERNAL_PATH_PREFIXES, INTERNAL_ENDPOINTS, BUILD_DIRS, PROJECT_DIRS, DEFAULT_CACHE_DIR, DEV_SERVER_ENDPOINTS;
|
|
867
921
|
var init_server = __esm({
|
|
868
922
|
"src/core/utils/constants/server.ts"() {
|
|
923
|
+
"use strict";
|
|
924
|
+
init_deno_env();
|
|
869
925
|
init_defaults();
|
|
870
926
|
DEFAULT_DASHBOARD_PORT = 3002;
|
|
871
927
|
INTERNAL_PREFIX = "/_veryfront";
|
|
@@ -951,6 +1007,7 @@ var init_server = __esm({
|
|
|
951
1007
|
var init_constants = __esm({
|
|
952
1008
|
"src/core/utils/constants/index.ts"() {
|
|
953
1009
|
"use strict";
|
|
1010
|
+
init_deno_env();
|
|
954
1011
|
init_build();
|
|
955
1012
|
init_cache();
|
|
956
1013
|
init_cdn();
|
|
@@ -970,6 +1027,7 @@ var PATHS, VERYFRONT_PATHS, FILE_EXTENSIONS;
|
|
|
970
1027
|
var init_paths = __esm({
|
|
971
1028
|
"src/core/utils/paths.ts"() {
|
|
972
1029
|
"use strict";
|
|
1030
|
+
init_deno_env();
|
|
973
1031
|
init_server();
|
|
974
1032
|
PATHS = {
|
|
975
1033
|
PAGES_DIR: "pages",
|
|
@@ -1033,6 +1091,7 @@ async function shortHash(content) {
|
|
|
1033
1091
|
var init_hash_utils = __esm({
|
|
1034
1092
|
"src/core/utils/hash-utils.ts"() {
|
|
1035
1093
|
"use strict";
|
|
1094
|
+
init_deno_env();
|
|
1036
1095
|
}
|
|
1037
1096
|
});
|
|
1038
1097
|
|
|
@@ -1078,6 +1137,7 @@ var MemoCache;
|
|
|
1078
1137
|
var init_memoize = __esm({
|
|
1079
1138
|
"src/core/utils/memoize.ts"() {
|
|
1080
1139
|
"use strict";
|
|
1140
|
+
init_deno_env();
|
|
1081
1141
|
MemoCache = class {
|
|
1082
1142
|
constructor() {
|
|
1083
1143
|
this.cache = /* @__PURE__ */ new Map();
|
|
@@ -1152,6 +1212,7 @@ function fromBase64Url(encoded) {
|
|
|
1152
1212
|
var init_path_utils = __esm({
|
|
1153
1213
|
"src/core/utils/path-utils.ts"() {
|
|
1154
1214
|
"use strict";
|
|
1215
|
+
init_deno_env();
|
|
1155
1216
|
init_logger();
|
|
1156
1217
|
}
|
|
1157
1218
|
});
|
|
@@ -1245,6 +1306,7 @@ function truncateString(str, maxLength) {
|
|
|
1245
1306
|
var init_format_utils = __esm({
|
|
1246
1307
|
"src/core/utils/format-utils.ts"() {
|
|
1247
1308
|
"use strict";
|
|
1309
|
+
init_deno_env();
|
|
1248
1310
|
init_logger();
|
|
1249
1311
|
}
|
|
1250
1312
|
});
|
|
@@ -1263,6 +1325,7 @@ var InMemoryBundleManifestStore, manifestStore;
|
|
|
1263
1325
|
var init_bundle_manifest = __esm({
|
|
1264
1326
|
"src/core/utils/bundle-manifest.ts"() {
|
|
1265
1327
|
"use strict";
|
|
1328
|
+
init_deno_env();
|
|
1266
1329
|
init_logger2();
|
|
1267
1330
|
init_hash_utils();
|
|
1268
1331
|
InMemoryBundleManifestStore = class {
|
|
@@ -1467,6 +1530,7 @@ async function warmupBundleManifest(store, keys) {
|
|
|
1467
1530
|
var init_bundle_manifest_init = __esm({
|
|
1468
1531
|
"src/core/utils/bundle-manifest-init.ts"() {
|
|
1469
1532
|
"use strict";
|
|
1533
|
+
init_deno_env();
|
|
1470
1534
|
init_logger2();
|
|
1471
1535
|
init_bundle_manifest();
|
|
1472
1536
|
init_cache();
|
|
@@ -1483,6 +1547,7 @@ function isRSCEnabled(config) {
|
|
|
1483
1547
|
var init_feature_flags = __esm({
|
|
1484
1548
|
"src/core/utils/feature-flags.ts"() {
|
|
1485
1549
|
"use strict";
|
|
1550
|
+
init_deno_env();
|
|
1486
1551
|
init_process();
|
|
1487
1552
|
}
|
|
1488
1553
|
});
|
|
@@ -1501,6 +1566,7 @@ function isCompiledBinary() {
|
|
|
1501
1566
|
var init_platform = __esm({
|
|
1502
1567
|
"src/core/utils/platform.ts"() {
|
|
1503
1568
|
"use strict";
|
|
1569
|
+
init_deno_env();
|
|
1504
1570
|
init_runtime();
|
|
1505
1571
|
init_process();
|
|
1506
1572
|
}
|
|
@@ -1727,6 +1793,7 @@ __export(utils_exports, {
|
|
|
1727
1793
|
});
|
|
1728
1794
|
var init_utils = __esm({
|
|
1729
1795
|
"src/core/utils/index.ts"() {
|
|
1796
|
+
init_deno_env();
|
|
1730
1797
|
init_runtime_guards();
|
|
1731
1798
|
init_logger2();
|
|
1732
1799
|
init_constants();
|
|
@@ -1760,6 +1827,7 @@ function toError(veryfrontError) {
|
|
|
1760
1827
|
var init_veryfront_error = __esm({
|
|
1761
1828
|
"src/core/errors/veryfront-error.ts"() {
|
|
1762
1829
|
"use strict";
|
|
1830
|
+
init_deno_env();
|
|
1763
1831
|
}
|
|
1764
1832
|
});
|
|
1765
1833
|
|
|
@@ -1769,6 +1837,7 @@ var corsSchema, veryfrontConfigSchema;
|
|
|
1769
1837
|
var init_schema = __esm({
|
|
1770
1838
|
"src/core/config/schema.ts"() {
|
|
1771
1839
|
"use strict";
|
|
1840
|
+
init_deno_env();
|
|
1772
1841
|
init_veryfront_error();
|
|
1773
1842
|
corsSchema = z.union([z.boolean(), z.object({ origin: z.string().optional() }).strict()]);
|
|
1774
1843
|
veryfrontConfigSchema = z.object({
|
|
@@ -1916,6 +1985,7 @@ var DEFAULT_CONFIG;
|
|
|
1916
1985
|
var init_loader = __esm({
|
|
1917
1986
|
"src/core/config/loader.ts"() {
|
|
1918
1987
|
"use strict";
|
|
1988
|
+
init_deno_env();
|
|
1919
1989
|
init_schema();
|
|
1920
1990
|
init_logger();
|
|
1921
1991
|
init_cdn();
|
|
@@ -1979,6 +2049,7 @@ function defineConfig(config) {
|
|
|
1979
2049
|
var init_define_config = __esm({
|
|
1980
2050
|
"src/core/config/define-config.ts"() {
|
|
1981
2051
|
"use strict";
|
|
2052
|
+
init_deno_env();
|
|
1982
2053
|
init_veryfront_error();
|
|
1983
2054
|
init_process();
|
|
1984
2055
|
}
|
|
@@ -1988,12 +2059,14 @@ var init_define_config = __esm({
|
|
|
1988
2059
|
var init_network_defaults = __esm({
|
|
1989
2060
|
"src/core/config/network-defaults.ts"() {
|
|
1990
2061
|
"use strict";
|
|
2062
|
+
init_deno_env();
|
|
1991
2063
|
}
|
|
1992
2064
|
});
|
|
1993
2065
|
|
|
1994
2066
|
// src/core/config/index.ts
|
|
1995
2067
|
var init_config = __esm({
|
|
1996
2068
|
"src/core/config/index.ts"() {
|
|
2069
|
+
init_deno_env();
|
|
1997
2070
|
init_loader();
|
|
1998
2071
|
init_define_config();
|
|
1999
2072
|
init_schema();
|
|
@@ -2012,6 +2085,7 @@ var DenoFileSystemAdapter, DenoEnvironmentAdapter, DenoServerAdapter, DenoShellA
|
|
|
2012
2085
|
var init_deno2 = __esm({
|
|
2013
2086
|
"src/platform/adapters/deno.ts"() {
|
|
2014
2087
|
"use strict";
|
|
2088
|
+
init_deno_env();
|
|
2015
2089
|
init_veryfront_error();
|
|
2016
2090
|
init_config();
|
|
2017
2091
|
init_utils();
|
|
@@ -2138,7 +2212,7 @@ var init_deno2 = __esm({
|
|
|
2138
2212
|
};
|
|
2139
2213
|
DenoEnvironmentAdapter = class {
|
|
2140
2214
|
get(key) {
|
|
2141
|
-
return
|
|
2215
|
+
return Deno.env.get(key);
|
|
2142
2216
|
}
|
|
2143
2217
|
set(key, value) {
|
|
2144
2218
|
Deno.env.set(key, value);
|
|
@@ -2334,6 +2408,7 @@ function createFileWatcher(iterator, cleanup) {
|
|
|
2334
2408
|
var init_shared_watcher = __esm({
|
|
2335
2409
|
"src/platform/adapters/shared-watcher.ts"() {
|
|
2336
2410
|
"use strict";
|
|
2411
|
+
init_deno_env();
|
|
2337
2412
|
}
|
|
2338
2413
|
});
|
|
2339
2414
|
|
|
@@ -2342,6 +2417,7 @@ var NodeFileSystemAdapter;
|
|
|
2342
2417
|
var init_filesystem_adapter = __esm({
|
|
2343
2418
|
"src/platform/adapters/node/filesystem-adapter.ts"() {
|
|
2344
2419
|
"use strict";
|
|
2420
|
+
init_deno_env();
|
|
2345
2421
|
init_shared_watcher();
|
|
2346
2422
|
init_utils();
|
|
2347
2423
|
NodeFileSystemAdapter = class {
|
|
@@ -2469,6 +2545,7 @@ var NodeEnvironmentAdapter;
|
|
|
2469
2545
|
var init_environment_adapter = __esm({
|
|
2470
2546
|
"src/platform/adapters/node/environment-adapter.ts"() {
|
|
2471
2547
|
"use strict";
|
|
2548
|
+
init_deno_env();
|
|
2472
2549
|
NodeEnvironmentAdapter = class {
|
|
2473
2550
|
get(key) {
|
|
2474
2551
|
return process2.env[key];
|
|
@@ -2483,119 +2560,20 @@ var init_environment_adapter = __esm({
|
|
|
2483
2560
|
}
|
|
2484
2561
|
});
|
|
2485
2562
|
|
|
2486
|
-
//
|
|
2487
|
-
var require_stream = __commonJS({
|
|
2488
|
-
"../../../../node_modules/ws/lib/stream.js"(exports, module) {
|
|
2489
|
-
"use strict";
|
|
2490
|
-
var { Duplex } = __require2("stream");
|
|
2491
|
-
function emitClose(stream2) {
|
|
2492
|
-
stream2.emit("close");
|
|
2493
|
-
}
|
|
2494
|
-
function duplexOnEnd() {
|
|
2495
|
-
if (!this.destroyed && this._writableState.finished) {
|
|
2496
|
-
this.destroy();
|
|
2497
|
-
}
|
|
2498
|
-
}
|
|
2499
|
-
function duplexOnError(err) {
|
|
2500
|
-
this.removeListener("error", duplexOnError);
|
|
2501
|
-
this.destroy();
|
|
2502
|
-
if (this.listenerCount("error") === 0) {
|
|
2503
|
-
this.emit("error", err);
|
|
2504
|
-
}
|
|
2505
|
-
}
|
|
2506
|
-
function createWebSocketStream2(ws, options) {
|
|
2507
|
-
let terminateOnDestroy = true;
|
|
2508
|
-
const duplex = new Duplex({
|
|
2509
|
-
...options,
|
|
2510
|
-
autoDestroy: false,
|
|
2511
|
-
emitClose: false,
|
|
2512
|
-
objectMode: false,
|
|
2513
|
-
writableObjectMode: false
|
|
2514
|
-
});
|
|
2515
|
-
ws.on("message", function message(msg, isBinary) {
|
|
2516
|
-
const data = !isBinary && duplex._readableState.objectMode ? msg.toString() : msg;
|
|
2517
|
-
if (!duplex.push(data))
|
|
2518
|
-
ws.pause();
|
|
2519
|
-
});
|
|
2520
|
-
ws.once("error", function error2(err) {
|
|
2521
|
-
if (duplex.destroyed)
|
|
2522
|
-
return;
|
|
2523
|
-
terminateOnDestroy = false;
|
|
2524
|
-
duplex.destroy(err);
|
|
2525
|
-
});
|
|
2526
|
-
ws.once("close", function close() {
|
|
2527
|
-
if (duplex.destroyed)
|
|
2528
|
-
return;
|
|
2529
|
-
duplex.push(null);
|
|
2530
|
-
});
|
|
2531
|
-
duplex._destroy = function(err, callback) {
|
|
2532
|
-
if (ws.readyState === ws.CLOSED) {
|
|
2533
|
-
callback(err);
|
|
2534
|
-
process.nextTick(emitClose, duplex);
|
|
2535
|
-
return;
|
|
2536
|
-
}
|
|
2537
|
-
let called = false;
|
|
2538
|
-
ws.once("error", function error2(err2) {
|
|
2539
|
-
called = true;
|
|
2540
|
-
callback(err2);
|
|
2541
|
-
});
|
|
2542
|
-
ws.once("close", function close() {
|
|
2543
|
-
if (!called)
|
|
2544
|
-
callback(err);
|
|
2545
|
-
process.nextTick(emitClose, duplex);
|
|
2546
|
-
});
|
|
2547
|
-
if (terminateOnDestroy)
|
|
2548
|
-
ws.terminate();
|
|
2549
|
-
};
|
|
2550
|
-
duplex._final = function(callback) {
|
|
2551
|
-
if (ws.readyState === ws.CONNECTING) {
|
|
2552
|
-
ws.once("open", function open() {
|
|
2553
|
-
duplex._final(callback);
|
|
2554
|
-
});
|
|
2555
|
-
return;
|
|
2556
|
-
}
|
|
2557
|
-
if (ws._socket === null)
|
|
2558
|
-
return;
|
|
2559
|
-
if (ws._socket._writableState.finished) {
|
|
2560
|
-
callback();
|
|
2561
|
-
if (duplex._readableState.endEmitted)
|
|
2562
|
-
duplex.destroy();
|
|
2563
|
-
} else {
|
|
2564
|
-
ws._socket.once("finish", function finish() {
|
|
2565
|
-
callback();
|
|
2566
|
-
});
|
|
2567
|
-
ws.close();
|
|
2568
|
-
}
|
|
2569
|
-
};
|
|
2570
|
-
duplex._read = function() {
|
|
2571
|
-
if (ws.isPaused)
|
|
2572
|
-
ws.resume();
|
|
2573
|
-
};
|
|
2574
|
-
duplex._write = function(chunk, encoding, callback) {
|
|
2575
|
-
if (ws.readyState === ws.CONNECTING) {
|
|
2576
|
-
ws.once("open", function open() {
|
|
2577
|
-
duplex._write(chunk, encoding, callback);
|
|
2578
|
-
});
|
|
2579
|
-
return;
|
|
2580
|
-
}
|
|
2581
|
-
ws.send(chunk, callback);
|
|
2582
|
-
};
|
|
2583
|
-
duplex.on("end", duplexOnEnd);
|
|
2584
|
-
duplex.on("error", duplexOnError);
|
|
2585
|
-
return duplex;
|
|
2586
|
-
}
|
|
2587
|
-
module.exports = createWebSocketStream2;
|
|
2588
|
-
}
|
|
2589
|
-
});
|
|
2590
|
-
|
|
2591
|
-
// ../../../../node_modules/ws/lib/constants.js
|
|
2563
|
+
// ../node_modules/ws/lib/constants.js
|
|
2592
2564
|
var require_constants = __commonJS({
|
|
2593
|
-
"
|
|
2565
|
+
"../node_modules/ws/lib/constants.js"(exports, module) {
|
|
2594
2566
|
"use strict";
|
|
2567
|
+
init_deno_env();
|
|
2568
|
+
var BINARY_TYPES = ["nodebuffer", "arraybuffer", "fragments"];
|
|
2569
|
+
var hasBlob = typeof Blob !== "undefined";
|
|
2570
|
+
if (hasBlob)
|
|
2571
|
+
BINARY_TYPES.push("blob");
|
|
2595
2572
|
module.exports = {
|
|
2596
|
-
BINARY_TYPES
|
|
2573
|
+
BINARY_TYPES,
|
|
2597
2574
|
EMPTY_BUFFER: Buffer.alloc(0),
|
|
2598
2575
|
GUID: "258EAFA5-E914-47DA-95CA-C5AB0DC85B11",
|
|
2576
|
+
hasBlob,
|
|
2599
2577
|
kForOnEventAttribute: Symbol("kIsForOnEventAttribute"),
|
|
2600
2578
|
kListener: Symbol("kListener"),
|
|
2601
2579
|
kStatusCode: Symbol("status-code"),
|
|
@@ -2606,10 +2584,11 @@ var require_constants = __commonJS({
|
|
|
2606
2584
|
}
|
|
2607
2585
|
});
|
|
2608
2586
|
|
|
2609
|
-
//
|
|
2587
|
+
// ../node_modules/ws/lib/buffer-util.js
|
|
2610
2588
|
var require_buffer_util = __commonJS({
|
|
2611
|
-
"
|
|
2589
|
+
"../node_modules/ws/lib/buffer-util.js"(exports, module) {
|
|
2612
2590
|
"use strict";
|
|
2591
|
+
init_deno_env();
|
|
2613
2592
|
var { EMPTY_BUFFER } = require_constants();
|
|
2614
2593
|
var FastBuffer = Buffer[Symbol.species];
|
|
2615
2594
|
function concat(list, totalLength) {
|
|
@@ -2688,10 +2667,11 @@ var require_buffer_util = __commonJS({
|
|
|
2688
2667
|
}
|
|
2689
2668
|
});
|
|
2690
2669
|
|
|
2691
|
-
//
|
|
2670
|
+
// ../node_modules/ws/lib/limiter.js
|
|
2692
2671
|
var require_limiter = __commonJS({
|
|
2693
|
-
"
|
|
2672
|
+
"../node_modules/ws/lib/limiter.js"(exports, module) {
|
|
2694
2673
|
"use strict";
|
|
2674
|
+
init_deno_env();
|
|
2695
2675
|
var kDone = Symbol("kDone");
|
|
2696
2676
|
var kRun = Symbol("kRun");
|
|
2697
2677
|
var Limiter = class {
|
|
@@ -2739,10 +2719,11 @@ var require_limiter = __commonJS({
|
|
|
2739
2719
|
}
|
|
2740
2720
|
});
|
|
2741
2721
|
|
|
2742
|
-
//
|
|
2722
|
+
// ../node_modules/ws/lib/permessage-deflate.js
|
|
2743
2723
|
var require_permessage_deflate = __commonJS({
|
|
2744
|
-
"
|
|
2724
|
+
"../node_modules/ws/lib/permessage-deflate.js"(exports, module) {
|
|
2745
2725
|
"use strict";
|
|
2726
|
+
init_deno_env();
|
|
2746
2727
|
var zlib = __require2("zlib");
|
|
2747
2728
|
var bufferUtil = require_buffer_util();
|
|
2748
2729
|
var Limiter = require_limiter();
|
|
@@ -3113,17 +3094,23 @@ var require_permessage_deflate = __commonJS({
|
|
|
3113
3094
|
}
|
|
3114
3095
|
function inflateOnError(err) {
|
|
3115
3096
|
this[kPerMessageDeflate]._inflate = null;
|
|
3097
|
+
if (this[kError]) {
|
|
3098
|
+
this[kCallback](this[kError]);
|
|
3099
|
+
return;
|
|
3100
|
+
}
|
|
3116
3101
|
err[kStatusCode] = 1007;
|
|
3117
3102
|
this[kCallback](err);
|
|
3118
3103
|
}
|
|
3119
3104
|
}
|
|
3120
3105
|
});
|
|
3121
3106
|
|
|
3122
|
-
//
|
|
3107
|
+
// ../node_modules/ws/lib/validation.js
|
|
3123
3108
|
var require_validation = __commonJS({
|
|
3124
|
-
"
|
|
3109
|
+
"../node_modules/ws/lib/validation.js"(exports, module) {
|
|
3125
3110
|
"use strict";
|
|
3111
|
+
init_deno_env();
|
|
3126
3112
|
var { isUtf8 } = __require2("buffer");
|
|
3113
|
+
var { hasBlob } = require_constants();
|
|
3127
3114
|
var tokenChars = [
|
|
3128
3115
|
0,
|
|
3129
3116
|
0,
|
|
@@ -3294,7 +3281,11 @@ var require_validation = __commonJS({
|
|
|
3294
3281
|
}
|
|
3295
3282
|
return true;
|
|
3296
3283
|
}
|
|
3284
|
+
function isBlob(value) {
|
|
3285
|
+
return hasBlob && typeof value === "object" && typeof value.arrayBuffer === "function" && typeof value.type === "string" && typeof value.stream === "function" && (value[Symbol.toStringTag] === "Blob" || value[Symbol.toStringTag] === "File");
|
|
3286
|
+
}
|
|
3297
3287
|
module.exports = {
|
|
3288
|
+
isBlob,
|
|
3298
3289
|
isValidStatusCode,
|
|
3299
3290
|
isValidUTF8: _isValidUTF8,
|
|
3300
3291
|
tokenChars
|
|
@@ -3315,10 +3306,11 @@ var require_validation = __commonJS({
|
|
|
3315
3306
|
}
|
|
3316
3307
|
});
|
|
3317
3308
|
|
|
3318
|
-
//
|
|
3309
|
+
// ../node_modules/ws/lib/receiver.js
|
|
3319
3310
|
var require_receiver = __commonJS({
|
|
3320
|
-
"
|
|
3311
|
+
"../node_modules/ws/lib/receiver.js"(exports, module) {
|
|
3321
3312
|
"use strict";
|
|
3313
|
+
init_deno_env();
|
|
3322
3314
|
var { Writable } = __require2("stream");
|
|
3323
3315
|
var PerMessageDeflate = require_permessage_deflate();
|
|
3324
3316
|
var {
|
|
@@ -3787,6 +3779,8 @@ var require_receiver = __commonJS({
|
|
|
3787
3779
|
data = concat(fragments, messageLength);
|
|
3788
3780
|
} else if (this._binaryType === "arraybuffer") {
|
|
3789
3781
|
data = toArrayBuffer(concat(fragments, messageLength));
|
|
3782
|
+
} else if (this._binaryType === "blob") {
|
|
3783
|
+
data = new Blob(fragments);
|
|
3790
3784
|
} else {
|
|
3791
3785
|
data = fragments;
|
|
3792
3786
|
}
|
|
@@ -3916,18 +3910,25 @@ var require_receiver = __commonJS({
|
|
|
3916
3910
|
}
|
|
3917
3911
|
});
|
|
3918
3912
|
|
|
3919
|
-
//
|
|
3913
|
+
// ../node_modules/ws/lib/sender.js
|
|
3920
3914
|
var require_sender = __commonJS({
|
|
3921
|
-
"
|
|
3915
|
+
"../node_modules/ws/lib/sender.js"(exports, module) {
|
|
3922
3916
|
"use strict";
|
|
3917
|
+
init_deno_env();
|
|
3923
3918
|
var { Duplex } = __require2("stream");
|
|
3924
3919
|
var { randomFillSync } = __require2("crypto");
|
|
3925
3920
|
var PerMessageDeflate = require_permessage_deflate();
|
|
3926
|
-
var { EMPTY_BUFFER } = require_constants();
|
|
3927
|
-
var { isValidStatusCode } = require_validation();
|
|
3921
|
+
var { EMPTY_BUFFER, kWebSocket, NOOP } = require_constants();
|
|
3922
|
+
var { isBlob, isValidStatusCode } = require_validation();
|
|
3928
3923
|
var { mask: applyMask, toBuffer } = require_buffer_util();
|
|
3929
3924
|
var kByteLength = Symbol("kByteLength");
|
|
3930
3925
|
var maskBuffer = Buffer.alloc(4);
|
|
3926
|
+
var RANDOM_POOL_SIZE = 8 * 1024;
|
|
3927
|
+
var randomPool;
|
|
3928
|
+
var randomPoolPointer = RANDOM_POOL_SIZE;
|
|
3929
|
+
var DEFAULT = 0;
|
|
3930
|
+
var DEFLATING = 1;
|
|
3931
|
+
var GET_BLOB_DATA = 2;
|
|
3931
3932
|
var Sender2 = class _Sender {
|
|
3932
3933
|
/**
|
|
3933
3934
|
* Creates a Sender instance.
|
|
@@ -3947,8 +3948,10 @@ var require_sender = __commonJS({
|
|
|
3947
3948
|
this._firstFragment = true;
|
|
3948
3949
|
this._compress = false;
|
|
3949
3950
|
this._bufferedBytes = 0;
|
|
3950
|
-
this._deflating = false;
|
|
3951
3951
|
this._queue = [];
|
|
3952
|
+
this._state = DEFAULT;
|
|
3953
|
+
this.onerror = NOOP;
|
|
3954
|
+
this[kWebSocket] = void 0;
|
|
3952
3955
|
}
|
|
3953
3956
|
/**
|
|
3954
3957
|
* Frames a piece of data according to the HyBi WebSocket protocol.
|
|
@@ -3981,7 +3984,17 @@ var require_sender = __commonJS({
|
|
|
3981
3984
|
if (options.generateMask) {
|
|
3982
3985
|
options.generateMask(mask);
|
|
3983
3986
|
} else {
|
|
3984
|
-
|
|
3987
|
+
if (randomPoolPointer === RANDOM_POOL_SIZE) {
|
|
3988
|
+
if (randomPool === void 0) {
|
|
3989
|
+
randomPool = Buffer.alloc(RANDOM_POOL_SIZE);
|
|
3990
|
+
}
|
|
3991
|
+
randomFillSync(randomPool, 0, RANDOM_POOL_SIZE);
|
|
3992
|
+
randomPoolPointer = 0;
|
|
3993
|
+
}
|
|
3994
|
+
mask[0] = randomPool[randomPoolPointer++];
|
|
3995
|
+
mask[1] = randomPool[randomPoolPointer++];
|
|
3996
|
+
mask[2] = randomPool[randomPoolPointer++];
|
|
3997
|
+
mask[3] = randomPool[randomPoolPointer++];
|
|
3985
3998
|
}
|
|
3986
3999
|
skipMasking = (mask[0] | mask[1] | mask[2] | mask[3]) === 0;
|
|
3987
4000
|
offset = 6;
|
|
@@ -4074,7 +4087,7 @@ var require_sender = __commonJS({
|
|
|
4074
4087
|
readOnly: false,
|
|
4075
4088
|
rsv1: false
|
|
4076
4089
|
};
|
|
4077
|
-
if (this.
|
|
4090
|
+
if (this._state !== DEFAULT) {
|
|
4078
4091
|
this.enqueue([this.dispatch, buf, false, options, cb]);
|
|
4079
4092
|
} else {
|
|
4080
4093
|
this.sendFrame(_Sender.frame(buf, options), cb);
|
|
@@ -4094,6 +4107,9 @@ var require_sender = __commonJS({
|
|
|
4094
4107
|
if (typeof data === "string") {
|
|
4095
4108
|
byteLength = Buffer.byteLength(data);
|
|
4096
4109
|
readOnly = false;
|
|
4110
|
+
} else if (isBlob(data)) {
|
|
4111
|
+
byteLength = data.size;
|
|
4112
|
+
readOnly = false;
|
|
4097
4113
|
} else {
|
|
4098
4114
|
data = toBuffer(data);
|
|
4099
4115
|
byteLength = data.length;
|
|
@@ -4112,7 +4128,13 @@ var require_sender = __commonJS({
|
|
|
4112
4128
|
readOnly,
|
|
4113
4129
|
rsv1: false
|
|
4114
4130
|
};
|
|
4115
|
-
if (
|
|
4131
|
+
if (isBlob(data)) {
|
|
4132
|
+
if (this._state !== DEFAULT) {
|
|
4133
|
+
this.enqueue([this.getBlobData, data, false, options, cb]);
|
|
4134
|
+
} else {
|
|
4135
|
+
this.getBlobData(data, false, options, cb);
|
|
4136
|
+
}
|
|
4137
|
+
} else if (this._state !== DEFAULT) {
|
|
4116
4138
|
this.enqueue([this.dispatch, data, false, options, cb]);
|
|
4117
4139
|
} else {
|
|
4118
4140
|
this.sendFrame(_Sender.frame(data, options), cb);
|
|
@@ -4132,6 +4154,9 @@ var require_sender = __commonJS({
|
|
|
4132
4154
|
if (typeof data === "string") {
|
|
4133
4155
|
byteLength = Buffer.byteLength(data);
|
|
4134
4156
|
readOnly = false;
|
|
4157
|
+
} else if (isBlob(data)) {
|
|
4158
|
+
byteLength = data.size;
|
|
4159
|
+
readOnly = false;
|
|
4135
4160
|
} else {
|
|
4136
4161
|
data = toBuffer(data);
|
|
4137
4162
|
byteLength = data.length;
|
|
@@ -4150,7 +4175,13 @@ var require_sender = __commonJS({
|
|
|
4150
4175
|
readOnly,
|
|
4151
4176
|
rsv1: false
|
|
4152
4177
|
};
|
|
4153
|
-
if (
|
|
4178
|
+
if (isBlob(data)) {
|
|
4179
|
+
if (this._state !== DEFAULT) {
|
|
4180
|
+
this.enqueue([this.getBlobData, data, false, options, cb]);
|
|
4181
|
+
} else {
|
|
4182
|
+
this.getBlobData(data, false, options, cb);
|
|
4183
|
+
}
|
|
4184
|
+
} else if (this._state !== DEFAULT) {
|
|
4154
4185
|
this.enqueue([this.dispatch, data, false, options, cb]);
|
|
4155
4186
|
} else {
|
|
4156
4187
|
this.sendFrame(_Sender.frame(data, options), cb);
|
|
@@ -4181,6 +4212,9 @@ var require_sender = __commonJS({
|
|
|
4181
4212
|
if (typeof data === "string") {
|
|
4182
4213
|
byteLength = Buffer.byteLength(data);
|
|
4183
4214
|
readOnly = false;
|
|
4215
|
+
} else if (isBlob(data)) {
|
|
4216
|
+
byteLength = data.size;
|
|
4217
|
+
readOnly = false;
|
|
4184
4218
|
} else {
|
|
4185
4219
|
data = toBuffer(data);
|
|
4186
4220
|
byteLength = data.length;
|
|
@@ -4198,38 +4232,75 @@ var require_sender = __commonJS({
|
|
|
4198
4232
|
}
|
|
4199
4233
|
if (options.fin)
|
|
4200
4234
|
this._firstFragment = true;
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
if (this.
|
|
4213
|
-
this.enqueue([this.
|
|
4235
|
+
const opts = {
|
|
4236
|
+
[kByteLength]: byteLength,
|
|
4237
|
+
fin: options.fin,
|
|
4238
|
+
generateMask: this._generateMask,
|
|
4239
|
+
mask: options.mask,
|
|
4240
|
+
maskBuffer: this._maskBuffer,
|
|
4241
|
+
opcode,
|
|
4242
|
+
readOnly,
|
|
4243
|
+
rsv1
|
|
4244
|
+
};
|
|
4245
|
+
if (isBlob(data)) {
|
|
4246
|
+
if (this._state !== DEFAULT) {
|
|
4247
|
+
this.enqueue([this.getBlobData, data, this._compress, opts, cb]);
|
|
4214
4248
|
} else {
|
|
4215
|
-
this.
|
|
4249
|
+
this.getBlobData(data, this._compress, opts, cb);
|
|
4216
4250
|
}
|
|
4251
|
+
} else if (this._state !== DEFAULT) {
|
|
4252
|
+
this.enqueue([this.dispatch, data, this._compress, opts, cb]);
|
|
4217
4253
|
} else {
|
|
4218
|
-
this.
|
|
4219
|
-
_Sender.frame(data, {
|
|
4220
|
-
[kByteLength]: byteLength,
|
|
4221
|
-
fin: options.fin,
|
|
4222
|
-
generateMask: this._generateMask,
|
|
4223
|
-
mask: options.mask,
|
|
4224
|
-
maskBuffer: this._maskBuffer,
|
|
4225
|
-
opcode,
|
|
4226
|
-
readOnly,
|
|
4227
|
-
rsv1: false
|
|
4228
|
-
}),
|
|
4229
|
-
cb
|
|
4230
|
-
);
|
|
4254
|
+
this.dispatch(data, this._compress, opts, cb);
|
|
4231
4255
|
}
|
|
4232
4256
|
}
|
|
4257
|
+
/**
|
|
4258
|
+
* Gets the contents of a blob as binary data.
|
|
4259
|
+
*
|
|
4260
|
+
* @param {Blob} blob The blob
|
|
4261
|
+
* @param {Boolean} [compress=false] Specifies whether or not to compress
|
|
4262
|
+
* the data
|
|
4263
|
+
* @param {Object} options Options object
|
|
4264
|
+
* @param {Boolean} [options.fin=false] Specifies whether or not to set the
|
|
4265
|
+
* FIN bit
|
|
4266
|
+
* @param {Function} [options.generateMask] The function used to generate the
|
|
4267
|
+
* masking key
|
|
4268
|
+
* @param {Boolean} [options.mask=false] Specifies whether or not to mask
|
|
4269
|
+
* `data`
|
|
4270
|
+
* @param {Buffer} [options.maskBuffer] The buffer used to store the masking
|
|
4271
|
+
* key
|
|
4272
|
+
* @param {Number} options.opcode The opcode
|
|
4273
|
+
* @param {Boolean} [options.readOnly=false] Specifies whether `data` can be
|
|
4274
|
+
* modified
|
|
4275
|
+
* @param {Boolean} [options.rsv1=false] Specifies whether or not to set the
|
|
4276
|
+
* RSV1 bit
|
|
4277
|
+
* @param {Function} [cb] Callback
|
|
4278
|
+
* @private
|
|
4279
|
+
*/
|
|
4280
|
+
getBlobData(blob, compress, options, cb) {
|
|
4281
|
+
this._bufferedBytes += options[kByteLength];
|
|
4282
|
+
this._state = GET_BLOB_DATA;
|
|
4283
|
+
blob.arrayBuffer().then((arrayBuffer) => {
|
|
4284
|
+
if (this._socket.destroyed) {
|
|
4285
|
+
const err = new Error(
|
|
4286
|
+
"The socket was closed while the blob was being read"
|
|
4287
|
+
);
|
|
4288
|
+
process.nextTick(callCallbacks, this, err, cb);
|
|
4289
|
+
return;
|
|
4290
|
+
}
|
|
4291
|
+
this._bufferedBytes -= options[kByteLength];
|
|
4292
|
+
const data = toBuffer(arrayBuffer);
|
|
4293
|
+
if (!compress) {
|
|
4294
|
+
this._state = DEFAULT;
|
|
4295
|
+
this.sendFrame(_Sender.frame(data, options), cb);
|
|
4296
|
+
this.dequeue();
|
|
4297
|
+
} else {
|
|
4298
|
+
this.dispatch(data, compress, options, cb);
|
|
4299
|
+
}
|
|
4300
|
+
}).catch((err) => {
|
|
4301
|
+
process.nextTick(onError, this, err, cb);
|
|
4302
|
+
});
|
|
4303
|
+
}
|
|
4233
4304
|
/**
|
|
4234
4305
|
* Dispatches a message.
|
|
4235
4306
|
*
|
|
@@ -4260,24 +4331,17 @@ var require_sender = __commonJS({
|
|
|
4260
4331
|
}
|
|
4261
4332
|
const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName];
|
|
4262
4333
|
this._bufferedBytes += options[kByteLength];
|
|
4263
|
-
this.
|
|
4334
|
+
this._state = DEFLATING;
|
|
4264
4335
|
perMessageDeflate.compress(data, options.fin, (_, buf) => {
|
|
4265
4336
|
if (this._socket.destroyed) {
|
|
4266
4337
|
const err = new Error(
|
|
4267
4338
|
"The socket was closed while data was being compressed"
|
|
4268
4339
|
);
|
|
4269
|
-
|
|
4270
|
-
cb(err);
|
|
4271
|
-
for (let i = 0; i < this._queue.length; i++) {
|
|
4272
|
-
const params = this._queue[i];
|
|
4273
|
-
const callback = params[params.length - 1];
|
|
4274
|
-
if (typeof callback === "function")
|
|
4275
|
-
callback(err);
|
|
4276
|
-
}
|
|
4340
|
+
callCallbacks(this, err, cb);
|
|
4277
4341
|
return;
|
|
4278
4342
|
}
|
|
4279
4343
|
this._bufferedBytes -= options[kByteLength];
|
|
4280
|
-
this.
|
|
4344
|
+
this._state = DEFAULT;
|
|
4281
4345
|
options.readOnly = false;
|
|
4282
4346
|
this.sendFrame(_Sender.frame(buf, options), cb);
|
|
4283
4347
|
this.dequeue();
|
|
@@ -4289,7 +4353,7 @@ var require_sender = __commonJS({
|
|
|
4289
4353
|
* @private
|
|
4290
4354
|
*/
|
|
4291
4355
|
dequeue() {
|
|
4292
|
-
while (
|
|
4356
|
+
while (this._state === DEFAULT && this._queue.length) {
|
|
4293
4357
|
const params = this._queue.shift();
|
|
4294
4358
|
this._bufferedBytes -= params[3][kByteLength];
|
|
4295
4359
|
Reflect.apply(params[0], this, params.slice(1));
|
|
@@ -4308,7 +4372,7 @@ var require_sender = __commonJS({
|
|
|
4308
4372
|
/**
|
|
4309
4373
|
* Sends a frame.
|
|
4310
4374
|
*
|
|
4311
|
-
* @param {Buffer[]} list The frame to send
|
|
4375
|
+
* @param {(Buffer | String)[]} list The frame to send
|
|
4312
4376
|
* @param {Function} [cb] Callback
|
|
4313
4377
|
* @private
|
|
4314
4378
|
*/
|
|
@@ -4324,13 +4388,28 @@ var require_sender = __commonJS({
|
|
|
4324
4388
|
}
|
|
4325
4389
|
};
|
|
4326
4390
|
module.exports = Sender2;
|
|
4391
|
+
function callCallbacks(sender, err, cb) {
|
|
4392
|
+
if (typeof cb === "function")
|
|
4393
|
+
cb(err);
|
|
4394
|
+
for (let i = 0; i < sender._queue.length; i++) {
|
|
4395
|
+
const params = sender._queue[i];
|
|
4396
|
+
const callback = params[params.length - 1];
|
|
4397
|
+
if (typeof callback === "function")
|
|
4398
|
+
callback(err);
|
|
4399
|
+
}
|
|
4400
|
+
}
|
|
4401
|
+
function onError(sender, err, cb) {
|
|
4402
|
+
callCallbacks(sender, err, cb);
|
|
4403
|
+
sender.onerror(err);
|
|
4404
|
+
}
|
|
4327
4405
|
}
|
|
4328
4406
|
});
|
|
4329
4407
|
|
|
4330
|
-
//
|
|
4408
|
+
// ../node_modules/ws/lib/event-target.js
|
|
4331
4409
|
var require_event_target = __commonJS({
|
|
4332
|
-
"
|
|
4410
|
+
"../node_modules/ws/lib/event-target.js"(exports, module) {
|
|
4333
4411
|
"use strict";
|
|
4412
|
+
init_deno_env();
|
|
4334
4413
|
var { kForOnEventAttribute, kListener } = require_constants();
|
|
4335
4414
|
var kCode = Symbol("kCode");
|
|
4336
4415
|
var kData = Symbol("kData");
|
|
@@ -4556,10 +4635,11 @@ var require_event_target = __commonJS({
|
|
|
4556
4635
|
}
|
|
4557
4636
|
});
|
|
4558
4637
|
|
|
4559
|
-
//
|
|
4638
|
+
// ../node_modules/ws/lib/extension.js
|
|
4560
4639
|
var require_extension = __commonJS({
|
|
4561
|
-
"
|
|
4640
|
+
"../node_modules/ws/lib/extension.js"(exports, module) {
|
|
4562
4641
|
"use strict";
|
|
4642
|
+
init_deno_env();
|
|
4563
4643
|
var { tokenChars } = require_validation();
|
|
4564
4644
|
function push(dest, name, elem) {
|
|
4565
4645
|
if (dest[name] === void 0)
|
|
@@ -4726,10 +4806,11 @@ var require_extension = __commonJS({
|
|
|
4726
4806
|
}
|
|
4727
4807
|
});
|
|
4728
4808
|
|
|
4729
|
-
//
|
|
4809
|
+
// ../node_modules/ws/lib/websocket.js
|
|
4730
4810
|
var require_websocket = __commonJS({
|
|
4731
|
-
"
|
|
4811
|
+
"../node_modules/ws/lib/websocket.js"(exports, module) {
|
|
4732
4812
|
"use strict";
|
|
4813
|
+
init_deno_env();
|
|
4733
4814
|
var EventEmitter = __require2("events");
|
|
4734
4815
|
var https = __require2("https");
|
|
4735
4816
|
var http = __require2("http");
|
|
@@ -4741,6 +4822,7 @@ var require_websocket = __commonJS({
|
|
|
4741
4822
|
var PerMessageDeflate = require_permessage_deflate();
|
|
4742
4823
|
var Receiver2 = require_receiver();
|
|
4743
4824
|
var Sender2 = require_sender();
|
|
4825
|
+
var { isBlob } = require_validation();
|
|
4744
4826
|
var {
|
|
4745
4827
|
BINARY_TYPES,
|
|
4746
4828
|
EMPTY_BUFFER,
|
|
@@ -4777,6 +4859,7 @@ var require_websocket = __commonJS({
|
|
|
4777
4859
|
this._closeFrameSent = false;
|
|
4778
4860
|
this._closeMessage = EMPTY_BUFFER;
|
|
4779
4861
|
this._closeTimer = null;
|
|
4862
|
+
this._errorEmitted = false;
|
|
4780
4863
|
this._extensions = {};
|
|
4781
4864
|
this._paused = false;
|
|
4782
4865
|
this._protocol = "";
|
|
@@ -4805,9 +4888,8 @@ var require_websocket = __commonJS({
|
|
|
4805
4888
|
}
|
|
4806
4889
|
}
|
|
4807
4890
|
/**
|
|
4808
|
-
*
|
|
4809
|
-
*
|
|
4810
|
-
* type).
|
|
4891
|
+
* For historical reasons, the custom "nodebuffer" type is used by the default
|
|
4892
|
+
* instead of "blob".
|
|
4811
4893
|
*
|
|
4812
4894
|
* @type {String}
|
|
4813
4895
|
*/
|
|
@@ -4912,10 +4994,12 @@ var require_websocket = __commonJS({
|
|
|
4912
4994
|
maxPayload: options.maxPayload,
|
|
4913
4995
|
skipUTF8Validation: options.skipUTF8Validation
|
|
4914
4996
|
});
|
|
4915
|
-
|
|
4997
|
+
const sender = new Sender2(socket, this._extensions, options.generateMask);
|
|
4916
4998
|
this._receiver = receiver;
|
|
4999
|
+
this._sender = sender;
|
|
4917
5000
|
this._socket = socket;
|
|
4918
5001
|
receiver[kWebSocket] = this;
|
|
5002
|
+
sender[kWebSocket] = this;
|
|
4919
5003
|
socket[kWebSocket] = this;
|
|
4920
5004
|
receiver.on("conclude", receiverOnConclude);
|
|
4921
5005
|
receiver.on("drain", receiverOnDrain);
|
|
@@ -4923,6 +5007,7 @@ var require_websocket = __commonJS({
|
|
|
4923
5007
|
receiver.on("message", receiverOnMessage);
|
|
4924
5008
|
receiver.on("ping", receiverOnPing);
|
|
4925
5009
|
receiver.on("pong", receiverOnPong);
|
|
5010
|
+
sender.onerror = senderOnError;
|
|
4926
5011
|
if (socket.setTimeout)
|
|
4927
5012
|
socket.setTimeout(0);
|
|
4928
5013
|
if (socket.setNoDelay)
|
|
@@ -4997,10 +5082,7 @@ var require_websocket = __commonJS({
|
|
|
4997
5082
|
this._socket.end();
|
|
4998
5083
|
}
|
|
4999
5084
|
});
|
|
5000
|
-
this
|
|
5001
|
-
this._socket.destroy.bind(this._socket),
|
|
5002
|
-
closeTimeout
|
|
5003
|
-
);
|
|
5085
|
+
setCloseTimer(this);
|
|
5004
5086
|
}
|
|
5005
5087
|
/**
|
|
5006
5088
|
* Pause the socket.
|
|
@@ -5262,7 +5344,7 @@ var require_websocket = __commonJS({
|
|
|
5262
5344
|
const isIpcUrl = parsedUrl.protocol === "ws+unix:";
|
|
5263
5345
|
let invalidUrlMessage;
|
|
5264
5346
|
if (parsedUrl.protocol !== "ws:" && !isSecure && !isIpcUrl) {
|
|
5265
|
-
invalidUrlMessage = `The URL's protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"`;
|
|
5347
|
+
invalidUrlMessage = `The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`;
|
|
5266
5348
|
} else if (isIpcUrl && !parsedUrl.pathname) {
|
|
5267
5349
|
invalidUrlMessage = "The URL's pathname is empty";
|
|
5268
5350
|
} else if (parsedUrl.hash) {
|
|
@@ -5406,7 +5488,8 @@ var require_websocket = __commonJS({
|
|
|
5406
5488
|
if (websocket.readyState !== WebSocket2.CONNECTING)
|
|
5407
5489
|
return;
|
|
5408
5490
|
req = websocket._req = null;
|
|
5409
|
-
|
|
5491
|
+
const upgrade = res.headers.upgrade;
|
|
5492
|
+
if (upgrade === void 0 || upgrade.toLowerCase() !== "websocket") {
|
|
5410
5493
|
abortHandshake(websocket, socket, "Invalid Upgrade header");
|
|
5411
5494
|
return;
|
|
5412
5495
|
}
|
|
@@ -5477,6 +5560,7 @@ var require_websocket = __commonJS({
|
|
|
5477
5560
|
}
|
|
5478
5561
|
function emitErrorAndClose(websocket, err) {
|
|
5479
5562
|
websocket._readyState = WebSocket2.CLOSING;
|
|
5563
|
+
websocket._errorEmitted = true;
|
|
5480
5564
|
websocket.emit("error", err);
|
|
5481
5565
|
websocket.emitClose();
|
|
5482
5566
|
}
|
|
@@ -5510,7 +5594,7 @@ var require_websocket = __commonJS({
|
|
|
5510
5594
|
}
|
|
5511
5595
|
function sendAfterClose(websocket, data, cb) {
|
|
5512
5596
|
if (data) {
|
|
5513
|
-
const length = toBuffer(data).length;
|
|
5597
|
+
const length = isBlob(data) ? data.size : toBuffer(data).length;
|
|
5514
5598
|
if (websocket._socket)
|
|
5515
5599
|
websocket._sender._bufferedBytes += length;
|
|
5516
5600
|
else
|
|
@@ -5549,7 +5633,10 @@ var require_websocket = __commonJS({
|
|
|
5549
5633
|
process.nextTick(resume, websocket._socket);
|
|
5550
5634
|
websocket.close(err[kStatusCode]);
|
|
5551
5635
|
}
|
|
5552
|
-
websocket.
|
|
5636
|
+
if (!websocket._errorEmitted) {
|
|
5637
|
+
websocket._errorEmitted = true;
|
|
5638
|
+
websocket.emit("error", err);
|
|
5639
|
+
}
|
|
5553
5640
|
}
|
|
5554
5641
|
function receiverOnFinish() {
|
|
5555
5642
|
this[kWebSocket].emitClose();
|
|
@@ -5569,6 +5656,26 @@ var require_websocket = __commonJS({
|
|
|
5569
5656
|
function resume(stream2) {
|
|
5570
5657
|
stream2.resume();
|
|
5571
5658
|
}
|
|
5659
|
+
function senderOnError(err) {
|
|
5660
|
+
const websocket = this[kWebSocket];
|
|
5661
|
+
if (websocket.readyState === WebSocket2.CLOSED)
|
|
5662
|
+
return;
|
|
5663
|
+
if (websocket.readyState === WebSocket2.OPEN) {
|
|
5664
|
+
websocket._readyState = WebSocket2.CLOSING;
|
|
5665
|
+
setCloseTimer(websocket);
|
|
5666
|
+
}
|
|
5667
|
+
this._socket.end();
|
|
5668
|
+
if (!websocket._errorEmitted) {
|
|
5669
|
+
websocket._errorEmitted = true;
|
|
5670
|
+
websocket.emit("error", err);
|
|
5671
|
+
}
|
|
5672
|
+
}
|
|
5673
|
+
function setCloseTimer(websocket) {
|
|
5674
|
+
websocket._closeTimer = setTimeout(
|
|
5675
|
+
websocket._socket.destroy.bind(websocket._socket),
|
|
5676
|
+
closeTimeout
|
|
5677
|
+
);
|
|
5678
|
+
}
|
|
5572
5679
|
function socketOnClose() {
|
|
5573
5680
|
const websocket = this[kWebSocket];
|
|
5574
5681
|
this.removeListener("close", socketOnClose);
|
|
@@ -5612,10 +5719,118 @@ var require_websocket = __commonJS({
|
|
|
5612
5719
|
}
|
|
5613
5720
|
});
|
|
5614
5721
|
|
|
5615
|
-
//
|
|
5722
|
+
// ../node_modules/ws/lib/stream.js
|
|
5723
|
+
var require_stream = __commonJS({
|
|
5724
|
+
"../node_modules/ws/lib/stream.js"(exports, module) {
|
|
5725
|
+
"use strict";
|
|
5726
|
+
init_deno_env();
|
|
5727
|
+
var WebSocket2 = require_websocket();
|
|
5728
|
+
var { Duplex } = __require2("stream");
|
|
5729
|
+
function emitClose(stream2) {
|
|
5730
|
+
stream2.emit("close");
|
|
5731
|
+
}
|
|
5732
|
+
function duplexOnEnd() {
|
|
5733
|
+
if (!this.destroyed && this._writableState.finished) {
|
|
5734
|
+
this.destroy();
|
|
5735
|
+
}
|
|
5736
|
+
}
|
|
5737
|
+
function duplexOnError(err) {
|
|
5738
|
+
this.removeListener("error", duplexOnError);
|
|
5739
|
+
this.destroy();
|
|
5740
|
+
if (this.listenerCount("error") === 0) {
|
|
5741
|
+
this.emit("error", err);
|
|
5742
|
+
}
|
|
5743
|
+
}
|
|
5744
|
+
function createWebSocketStream2(ws, options) {
|
|
5745
|
+
let terminateOnDestroy = true;
|
|
5746
|
+
const duplex = new Duplex({
|
|
5747
|
+
...options,
|
|
5748
|
+
autoDestroy: false,
|
|
5749
|
+
emitClose: false,
|
|
5750
|
+
objectMode: false,
|
|
5751
|
+
writableObjectMode: false
|
|
5752
|
+
});
|
|
5753
|
+
ws.on("message", function message(msg, isBinary) {
|
|
5754
|
+
const data = !isBinary && duplex._readableState.objectMode ? msg.toString() : msg;
|
|
5755
|
+
if (!duplex.push(data))
|
|
5756
|
+
ws.pause();
|
|
5757
|
+
});
|
|
5758
|
+
ws.once("error", function error2(err) {
|
|
5759
|
+
if (duplex.destroyed)
|
|
5760
|
+
return;
|
|
5761
|
+
terminateOnDestroy = false;
|
|
5762
|
+
duplex.destroy(err);
|
|
5763
|
+
});
|
|
5764
|
+
ws.once("close", function close() {
|
|
5765
|
+
if (duplex.destroyed)
|
|
5766
|
+
return;
|
|
5767
|
+
duplex.push(null);
|
|
5768
|
+
});
|
|
5769
|
+
duplex._destroy = function(err, callback) {
|
|
5770
|
+
if (ws.readyState === ws.CLOSED) {
|
|
5771
|
+
callback(err);
|
|
5772
|
+
process.nextTick(emitClose, duplex);
|
|
5773
|
+
return;
|
|
5774
|
+
}
|
|
5775
|
+
let called = false;
|
|
5776
|
+
ws.once("error", function error2(err2) {
|
|
5777
|
+
called = true;
|
|
5778
|
+
callback(err2);
|
|
5779
|
+
});
|
|
5780
|
+
ws.once("close", function close() {
|
|
5781
|
+
if (!called)
|
|
5782
|
+
callback(err);
|
|
5783
|
+
process.nextTick(emitClose, duplex);
|
|
5784
|
+
});
|
|
5785
|
+
if (terminateOnDestroy)
|
|
5786
|
+
ws.terminate();
|
|
5787
|
+
};
|
|
5788
|
+
duplex._final = function(callback) {
|
|
5789
|
+
if (ws.readyState === ws.CONNECTING) {
|
|
5790
|
+
ws.once("open", function open() {
|
|
5791
|
+
duplex._final(callback);
|
|
5792
|
+
});
|
|
5793
|
+
return;
|
|
5794
|
+
}
|
|
5795
|
+
if (ws._socket === null)
|
|
5796
|
+
return;
|
|
5797
|
+
if (ws._socket._writableState.finished) {
|
|
5798
|
+
callback();
|
|
5799
|
+
if (duplex._readableState.endEmitted)
|
|
5800
|
+
duplex.destroy();
|
|
5801
|
+
} else {
|
|
5802
|
+
ws._socket.once("finish", function finish() {
|
|
5803
|
+
callback();
|
|
5804
|
+
});
|
|
5805
|
+
ws.close();
|
|
5806
|
+
}
|
|
5807
|
+
};
|
|
5808
|
+
duplex._read = function() {
|
|
5809
|
+
if (ws.isPaused)
|
|
5810
|
+
ws.resume();
|
|
5811
|
+
};
|
|
5812
|
+
duplex._write = function(chunk, encoding, callback) {
|
|
5813
|
+
if (ws.readyState === ws.CONNECTING) {
|
|
5814
|
+
ws.once("open", function open() {
|
|
5815
|
+
duplex._write(chunk, encoding, callback);
|
|
5816
|
+
});
|
|
5817
|
+
return;
|
|
5818
|
+
}
|
|
5819
|
+
ws.send(chunk, callback);
|
|
5820
|
+
};
|
|
5821
|
+
duplex.on("end", duplexOnEnd);
|
|
5822
|
+
duplex.on("error", duplexOnError);
|
|
5823
|
+
return duplex;
|
|
5824
|
+
}
|
|
5825
|
+
module.exports = createWebSocketStream2;
|
|
5826
|
+
}
|
|
5827
|
+
});
|
|
5828
|
+
|
|
5829
|
+
// ../node_modules/ws/lib/subprotocol.js
|
|
5616
5830
|
var require_subprotocol = __commonJS({
|
|
5617
|
-
"
|
|
5831
|
+
"../node_modules/ws/lib/subprotocol.js"(exports, module) {
|
|
5618
5832
|
"use strict";
|
|
5833
|
+
init_deno_env();
|
|
5619
5834
|
var { tokenChars } = require_validation();
|
|
5620
5835
|
function parse(header) {
|
|
5621
5836
|
const protocols = /* @__PURE__ */ new Set();
|
|
@@ -5660,10 +5875,11 @@ var require_subprotocol = __commonJS({
|
|
|
5660
5875
|
}
|
|
5661
5876
|
});
|
|
5662
5877
|
|
|
5663
|
-
//
|
|
5878
|
+
// ../node_modules/ws/lib/websocket-server.js
|
|
5664
5879
|
var require_websocket_server = __commonJS({
|
|
5665
|
-
"
|
|
5880
|
+
"../node_modules/ws/lib/websocket-server.js"(exports, module) {
|
|
5666
5881
|
"use strict";
|
|
5882
|
+
init_deno_env();
|
|
5667
5883
|
var EventEmitter = __require2("events");
|
|
5668
5884
|
var http = __require2("http");
|
|
5669
5885
|
var { Duplex } = __require2("stream");
|
|
@@ -5862,25 +6078,28 @@ var require_websocket_server = __commonJS({
|
|
|
5862
6078
|
handleUpgrade(req, socket, head, cb) {
|
|
5863
6079
|
socket.on("error", socketOnError);
|
|
5864
6080
|
const key = req.headers["sec-websocket-key"];
|
|
6081
|
+
const upgrade = req.headers.upgrade;
|
|
5865
6082
|
const version = +req.headers["sec-websocket-version"];
|
|
5866
6083
|
if (req.method !== "GET") {
|
|
5867
6084
|
const message = "Invalid HTTP method";
|
|
5868
6085
|
abortHandshakeOrEmitwsClientError(this, req, socket, 405, message);
|
|
5869
6086
|
return;
|
|
5870
6087
|
}
|
|
5871
|
-
if (
|
|
6088
|
+
if (upgrade === void 0 || upgrade.toLowerCase() !== "websocket") {
|
|
5872
6089
|
const message = "Invalid Upgrade header";
|
|
5873
6090
|
abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
|
|
5874
6091
|
return;
|
|
5875
6092
|
}
|
|
5876
|
-
if (
|
|
6093
|
+
if (key === void 0 || !keyRegex.test(key)) {
|
|
5877
6094
|
const message = "Missing or invalid Sec-WebSocket-Key header";
|
|
5878
6095
|
abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
|
|
5879
6096
|
return;
|
|
5880
6097
|
}
|
|
5881
|
-
if (version !==
|
|
6098
|
+
if (version !== 13 && version !== 8) {
|
|
5882
6099
|
const message = "Missing or invalid Sec-WebSocket-Version header";
|
|
5883
|
-
abortHandshakeOrEmitwsClientError(this, req, socket, 400, message
|
|
6100
|
+
abortHandshakeOrEmitwsClientError(this, req, socket, 400, message, {
|
|
6101
|
+
"Sec-WebSocket-Version": "13, 8"
|
|
6102
|
+
});
|
|
5884
6103
|
return;
|
|
5885
6104
|
}
|
|
5886
6105
|
if (!this.shouldHandle(req)) {
|
|
@@ -6043,19 +6262,19 @@ var require_websocket_server = __commonJS({
|
|
|
6043
6262
|
` + Object.keys(headers).map((h) => `${h}: ${headers[h]}`).join("\r\n") + "\r\n\r\n" + message
|
|
6044
6263
|
);
|
|
6045
6264
|
}
|
|
6046
|
-
function abortHandshakeOrEmitwsClientError(server, req, socket, code, message) {
|
|
6265
|
+
function abortHandshakeOrEmitwsClientError(server, req, socket, code, message, headers) {
|
|
6047
6266
|
if (server.listenerCount("wsClientError")) {
|
|
6048
6267
|
const err = new Error(message);
|
|
6049
6268
|
Error.captureStackTrace(err, abortHandshakeOrEmitwsClientError);
|
|
6050
6269
|
server.emit("wsClientError", err, socket, req);
|
|
6051
6270
|
} else {
|
|
6052
|
-
abortHandshake(socket, code, message);
|
|
6271
|
+
abortHandshake(socket, code, message, headers);
|
|
6053
6272
|
}
|
|
6054
6273
|
}
|
|
6055
6274
|
}
|
|
6056
6275
|
});
|
|
6057
6276
|
|
|
6058
|
-
//
|
|
6277
|
+
// ../node_modules/ws/wrapper.mjs
|
|
6059
6278
|
var wrapper_exports = {};
|
|
6060
6279
|
__export(wrapper_exports, {
|
|
6061
6280
|
Receiver: () => import_receiver.default,
|
|
@@ -6067,7 +6286,8 @@ __export(wrapper_exports, {
|
|
|
6067
6286
|
});
|
|
6068
6287
|
var import_stream, import_receiver, import_sender, import_websocket, import_websocket_server, wrapper_default;
|
|
6069
6288
|
var init_wrapper = __esm({
|
|
6070
|
-
"
|
|
6289
|
+
"../node_modules/ws/wrapper.mjs"() {
|
|
6290
|
+
init_deno_env();
|
|
6071
6291
|
import_stream = __toESM(require_stream(), 1);
|
|
6072
6292
|
import_receiver = __toESM(require_receiver(), 1);
|
|
6073
6293
|
import_sender = __toESM(require_sender(), 1);
|
|
@@ -6184,6 +6404,7 @@ var pendingWebSocketUpgrades, wsServer, NodeServer;
|
|
|
6184
6404
|
var init_http_server = __esm({
|
|
6185
6405
|
"src/platform/adapters/node/http-server.ts"() {
|
|
6186
6406
|
"use strict";
|
|
6407
|
+
init_deno_env();
|
|
6187
6408
|
init_config();
|
|
6188
6409
|
pendingWebSocketUpgrades = /* @__PURE__ */ new Map();
|
|
6189
6410
|
wsServer = null;
|
|
@@ -6215,6 +6436,7 @@ var NodeServerAdapter, NodeWebSocket;
|
|
|
6215
6436
|
var init_websocket_adapter = __esm({
|
|
6216
6437
|
"src/platform/adapters/node/websocket-adapter.ts"() {
|
|
6217
6438
|
"use strict";
|
|
6439
|
+
init_deno_env();
|
|
6218
6440
|
init_veryfront_error();
|
|
6219
6441
|
init_utils();
|
|
6220
6442
|
init_http_server();
|
|
@@ -6371,6 +6593,7 @@ var NodeAdapter, nodeAdapter;
|
|
|
6371
6593
|
var init_adapter = __esm({
|
|
6372
6594
|
"src/platform/adapters/node/adapter.ts"() {
|
|
6373
6595
|
"use strict";
|
|
6596
|
+
init_deno_env();
|
|
6374
6597
|
init_filesystem_adapter();
|
|
6375
6598
|
init_environment_adapter();
|
|
6376
6599
|
init_websocket_adapter();
|
|
@@ -6418,6 +6641,7 @@ var init_adapter = __esm({
|
|
|
6418
6641
|
var init_node = __esm({
|
|
6419
6642
|
"src/platform/adapters/node/index.ts"() {
|
|
6420
6643
|
"use strict";
|
|
6644
|
+
init_deno_env();
|
|
6421
6645
|
init_adapter();
|
|
6422
6646
|
init_filesystem_adapter();
|
|
6423
6647
|
init_environment_adapter();
|
|
@@ -6441,6 +6665,7 @@ __export(node_exports, {
|
|
|
6441
6665
|
var init_node2 = __esm({
|
|
6442
6666
|
"src/platform/adapters/node.ts"() {
|
|
6443
6667
|
"use strict";
|
|
6668
|
+
init_deno_env();
|
|
6444
6669
|
init_node();
|
|
6445
6670
|
}
|
|
6446
6671
|
});
|
|
@@ -6450,6 +6675,7 @@ var VeryfrontError;
|
|
|
6450
6675
|
var init_types = __esm({
|
|
6451
6676
|
"src/core/errors/types.ts"() {
|
|
6452
6677
|
"use strict";
|
|
6678
|
+
init_deno_env();
|
|
6453
6679
|
VeryfrontError = class extends Error {
|
|
6454
6680
|
constructor(message, code, context) {
|
|
6455
6681
|
super(message);
|
|
@@ -6465,6 +6691,7 @@ var init_types = __esm({
|
|
|
6465
6691
|
var init_agent_errors = __esm({
|
|
6466
6692
|
"src/core/errors/agent-errors.ts"() {
|
|
6467
6693
|
"use strict";
|
|
6694
|
+
init_deno_env();
|
|
6468
6695
|
init_types();
|
|
6469
6696
|
}
|
|
6470
6697
|
});
|
|
@@ -6473,6 +6700,7 @@ var init_agent_errors = __esm({
|
|
|
6473
6700
|
var init_build_errors = __esm({
|
|
6474
6701
|
"src/core/errors/build-errors.ts"() {
|
|
6475
6702
|
"use strict";
|
|
6703
|
+
init_deno_env();
|
|
6476
6704
|
init_types();
|
|
6477
6705
|
}
|
|
6478
6706
|
});
|
|
@@ -6481,6 +6709,7 @@ var init_build_errors = __esm({
|
|
|
6481
6709
|
var init_runtime_errors = __esm({
|
|
6482
6710
|
"src/core/errors/runtime-errors.ts"() {
|
|
6483
6711
|
"use strict";
|
|
6712
|
+
init_deno_env();
|
|
6484
6713
|
init_types();
|
|
6485
6714
|
}
|
|
6486
6715
|
});
|
|
@@ -6490,6 +6719,7 @@ var FileSystemError;
|
|
|
6490
6719
|
var init_system_errors = __esm({
|
|
6491
6720
|
"src/core/errors/system-errors.ts"() {
|
|
6492
6721
|
"use strict";
|
|
6722
|
+
init_deno_env();
|
|
6493
6723
|
init_types();
|
|
6494
6724
|
FileSystemError = class extends VeryfrontError {
|
|
6495
6725
|
constructor(message, context) {
|
|
@@ -6504,6 +6734,7 @@ var init_system_errors = __esm({
|
|
|
6504
6734
|
var init_error_handlers = __esm({
|
|
6505
6735
|
"src/core/errors/error-handlers.ts"() {
|
|
6506
6736
|
"use strict";
|
|
6737
|
+
init_deno_env();
|
|
6507
6738
|
init_logger();
|
|
6508
6739
|
init_types();
|
|
6509
6740
|
}
|
|
@@ -6517,6 +6748,7 @@ var ErrorCode2;
|
|
|
6517
6748
|
var init_error_codes = __esm({
|
|
6518
6749
|
"src/core/errors/error-codes.ts"() {
|
|
6519
6750
|
"use strict";
|
|
6751
|
+
init_deno_env();
|
|
6520
6752
|
ErrorCode2 = {
|
|
6521
6753
|
CONFIG_NOT_FOUND: "VF001",
|
|
6522
6754
|
CONFIG_INVALID: "VF002",
|
|
@@ -6594,6 +6826,7 @@ function createSimpleError(code, title, message, steps) {
|
|
|
6594
6826
|
var init_factory = __esm({
|
|
6595
6827
|
"src/core/errors/catalog/factory.ts"() {
|
|
6596
6828
|
"use strict";
|
|
6829
|
+
init_deno_env();
|
|
6597
6830
|
init_error_codes();
|
|
6598
6831
|
}
|
|
6599
6832
|
});
|
|
@@ -6603,6 +6836,7 @@ var CONFIG_ERROR_CATALOG;
|
|
|
6603
6836
|
var init_config_errors = __esm({
|
|
6604
6837
|
"src/core/errors/catalog/config-errors.ts"() {
|
|
6605
6838
|
"use strict";
|
|
6839
|
+
init_deno_env();
|
|
6606
6840
|
init_error_codes();
|
|
6607
6841
|
init_factory();
|
|
6608
6842
|
CONFIG_ERROR_CATALOG = {
|
|
@@ -6709,6 +6943,7 @@ var BUILD_ERROR_CATALOG;
|
|
|
6709
6943
|
var init_build_errors2 = __esm({
|
|
6710
6944
|
"src/core/errors/catalog/build-errors.ts"() {
|
|
6711
6945
|
"use strict";
|
|
6946
|
+
init_deno_env();
|
|
6712
6947
|
init_error_codes();
|
|
6713
6948
|
init_factory();
|
|
6714
6949
|
BUILD_ERROR_CATALOG = {
|
|
@@ -6800,6 +7035,7 @@ var RUNTIME_ERROR_CATALOG;
|
|
|
6800
7035
|
var init_runtime_errors2 = __esm({
|
|
6801
7036
|
"src/core/errors/catalog/runtime-errors.ts"() {
|
|
6802
7037
|
"use strict";
|
|
7038
|
+
init_deno_env();
|
|
6803
7039
|
init_error_codes();
|
|
6804
7040
|
init_factory();
|
|
6805
7041
|
RUNTIME_ERROR_CATALOG = {
|
|
@@ -6897,6 +7133,7 @@ var ROUTE_ERROR_CATALOG;
|
|
|
6897
7133
|
var init_route_errors = __esm({
|
|
6898
7134
|
"src/core/errors/catalog/route-errors.ts"() {
|
|
6899
7135
|
"use strict";
|
|
7136
|
+
init_deno_env();
|
|
6900
7137
|
init_error_codes();
|
|
6901
7138
|
init_factory();
|
|
6902
7139
|
ROUTE_ERROR_CATALOG = {
|
|
@@ -6972,6 +7209,7 @@ var MODULE_ERROR_CATALOG;
|
|
|
6972
7209
|
var init_module_errors = __esm({
|
|
6973
7210
|
"src/core/errors/catalog/module-errors.ts"() {
|
|
6974
7211
|
"use strict";
|
|
7212
|
+
init_deno_env();
|
|
6975
7213
|
init_error_codes();
|
|
6976
7214
|
init_factory();
|
|
6977
7215
|
MODULE_ERROR_CATALOG = {
|
|
@@ -7060,6 +7298,7 @@ var SERVER_ERROR_CATALOG;
|
|
|
7060
7298
|
var init_server_errors = __esm({
|
|
7061
7299
|
"src/core/errors/catalog/server-errors.ts"() {
|
|
7062
7300
|
"use strict";
|
|
7301
|
+
init_deno_env();
|
|
7063
7302
|
init_error_codes();
|
|
7064
7303
|
init_factory();
|
|
7065
7304
|
SERVER_ERROR_CATALOG = {
|
|
@@ -7135,6 +7374,7 @@ var RSC_ERROR_CATALOG;
|
|
|
7135
7374
|
var init_rsc_errors = __esm({
|
|
7136
7375
|
"src/core/errors/catalog/rsc-errors.ts"() {
|
|
7137
7376
|
"use strict";
|
|
7377
|
+
init_deno_env();
|
|
7138
7378
|
init_error_codes();
|
|
7139
7379
|
init_factory();
|
|
7140
7380
|
RSC_ERROR_CATALOG = {
|
|
@@ -7222,6 +7462,7 @@ var DEV_ERROR_CATALOG;
|
|
|
7222
7462
|
var init_dev_errors = __esm({
|
|
7223
7463
|
"src/core/errors/catalog/dev-errors.ts"() {
|
|
7224
7464
|
"use strict";
|
|
7465
|
+
init_deno_env();
|
|
7225
7466
|
init_error_codes();
|
|
7226
7467
|
init_factory();
|
|
7227
7468
|
DEV_ERROR_CATALOG = {
|
|
@@ -7274,6 +7515,7 @@ var DEPLOYMENT_ERROR_CATALOG;
|
|
|
7274
7515
|
var init_deployment_errors = __esm({
|
|
7275
7516
|
"src/core/errors/catalog/deployment-errors.ts"() {
|
|
7276
7517
|
"use strict";
|
|
7518
|
+
init_deno_env();
|
|
7277
7519
|
init_error_codes();
|
|
7278
7520
|
init_factory();
|
|
7279
7521
|
DEPLOYMENT_ERROR_CATALOG = {
|
|
@@ -7326,6 +7568,7 @@ var GENERAL_ERROR_CATALOG;
|
|
|
7326
7568
|
var init_general_errors = __esm({
|
|
7327
7569
|
"src/core/errors/catalog/general-errors.ts"() {
|
|
7328
7570
|
"use strict";
|
|
7571
|
+
init_deno_env();
|
|
7329
7572
|
init_error_codes();
|
|
7330
7573
|
init_factory();
|
|
7331
7574
|
GENERAL_ERROR_CATALOG = {
|
|
@@ -7389,6 +7632,7 @@ var ERROR_CATALOG;
|
|
|
7389
7632
|
var init_catalog = __esm({
|
|
7390
7633
|
"src/core/errors/catalog/index.ts"() {
|
|
7391
7634
|
"use strict";
|
|
7635
|
+
init_deno_env();
|
|
7392
7636
|
init_config_errors();
|
|
7393
7637
|
init_build_errors2();
|
|
7394
7638
|
init_runtime_errors2();
|
|
@@ -7419,6 +7663,7 @@ var init_catalog = __esm({
|
|
|
7419
7663
|
var init_error_catalog = __esm({
|
|
7420
7664
|
"src/core/errors/user-friendly/error-catalog.ts"() {
|
|
7421
7665
|
"use strict";
|
|
7666
|
+
init_deno_env();
|
|
7422
7667
|
}
|
|
7423
7668
|
});
|
|
7424
7669
|
|
|
@@ -7426,6 +7671,7 @@ var init_error_catalog = __esm({
|
|
|
7426
7671
|
var ansi, red, green, yellow, blue, magenta, cyan, white, gray, bold, dim, italic, underline, strikethrough, reset;
|
|
7427
7672
|
var init_ansi = __esm({
|
|
7428
7673
|
"src/platform/compat/console/ansi.ts"() {
|
|
7674
|
+
init_deno_env();
|
|
7429
7675
|
ansi = (open, close) => (text2) => `\x1B[${open}m${text2}\x1B[${close}m`;
|
|
7430
7676
|
red = ansi(31, 39);
|
|
7431
7677
|
green = ansi(32, 39);
|
|
@@ -7467,6 +7713,7 @@ var colors;
|
|
|
7467
7713
|
var init_deno3 = __esm({
|
|
7468
7714
|
"src/platform/compat/console/deno.ts"() {
|
|
7469
7715
|
"use strict";
|
|
7716
|
+
init_deno_env();
|
|
7470
7717
|
init_ansi();
|
|
7471
7718
|
colors = {
|
|
7472
7719
|
red,
|
|
@@ -7522,6 +7769,7 @@ var pc, lazyColor, colors2, red2, green2, yellow2, blue2, cyan2, magenta2, white
|
|
|
7522
7769
|
var init_node3 = __esm({
|
|
7523
7770
|
"src/platform/compat/console/node.ts"() {
|
|
7524
7771
|
"use strict";
|
|
7772
|
+
init_deno_env();
|
|
7525
7773
|
pc = null;
|
|
7526
7774
|
lazyColor = (fn) => (s) => pc?.[fn]?.(s) ?? s;
|
|
7527
7775
|
colors2 = {
|
|
@@ -7577,6 +7825,7 @@ async function loadColors() {
|
|
|
7577
7825
|
var noOp, fallbackColors, _colors, colorsPromise;
|
|
7578
7826
|
var init_console = __esm({
|
|
7579
7827
|
"src/platform/compat/console/index.ts"() {
|
|
7828
|
+
init_deno_env();
|
|
7580
7829
|
init_runtime();
|
|
7581
7830
|
noOp = (text2) => text2;
|
|
7582
7831
|
fallbackColors = {
|
|
@@ -7604,6 +7853,7 @@ var init_console = __esm({
|
|
|
7604
7853
|
var init_error_identifier = __esm({
|
|
7605
7854
|
"src/core/errors/user-friendly/error-identifier.ts"() {
|
|
7606
7855
|
"use strict";
|
|
7856
|
+
init_deno_env();
|
|
7607
7857
|
}
|
|
7608
7858
|
});
|
|
7609
7859
|
|
|
@@ -7611,6 +7861,7 @@ var init_error_identifier = __esm({
|
|
|
7611
7861
|
var init_error_formatter = __esm({
|
|
7612
7862
|
"src/core/errors/user-friendly/error-formatter.ts"() {
|
|
7613
7863
|
"use strict";
|
|
7864
|
+
init_deno_env();
|
|
7614
7865
|
init_console();
|
|
7615
7866
|
init_error_catalog();
|
|
7616
7867
|
init_error_identifier();
|
|
@@ -7621,6 +7872,7 @@ var init_error_formatter = __esm({
|
|
|
7621
7872
|
var init_error_wrapper = __esm({
|
|
7622
7873
|
"src/core/errors/user-friendly/error-wrapper.ts"() {
|
|
7623
7874
|
"use strict";
|
|
7875
|
+
init_deno_env();
|
|
7624
7876
|
init_console();
|
|
7625
7877
|
init_process();
|
|
7626
7878
|
init_logger();
|
|
@@ -7632,6 +7884,7 @@ var init_error_wrapper = __esm({
|
|
|
7632
7884
|
var init_user_friendly = __esm({
|
|
7633
7885
|
"src/core/errors/user-friendly/index.ts"() {
|
|
7634
7886
|
"use strict";
|
|
7887
|
+
init_deno_env();
|
|
7635
7888
|
init_error_catalog();
|
|
7636
7889
|
init_error_formatter();
|
|
7637
7890
|
init_error_identifier();
|
|
@@ -7642,6 +7895,7 @@ var init_user_friendly = __esm({
|
|
|
7642
7895
|
// src/core/errors/index.ts
|
|
7643
7896
|
var init_errors = __esm({
|
|
7644
7897
|
"src/core/errors/index.ts"() {
|
|
7898
|
+
init_deno_env();
|
|
7645
7899
|
init_types();
|
|
7646
7900
|
init_agent_errors();
|
|
7647
7901
|
init_build_errors();
|
|
@@ -7658,6 +7912,7 @@ var BunFileSystemAdapter;
|
|
|
7658
7912
|
var init_filesystem_adapter2 = __esm({
|
|
7659
7913
|
"src/platform/adapters/bun/filesystem-adapter.ts"() {
|
|
7660
7914
|
"use strict";
|
|
7915
|
+
init_deno_env();
|
|
7661
7916
|
init_errors();
|
|
7662
7917
|
init_veryfront_error();
|
|
7663
7918
|
init_shared_watcher();
|
|
@@ -7815,6 +8070,7 @@ var BunEnvironmentAdapter;
|
|
|
7815
8070
|
var init_environment_adapter2 = __esm({
|
|
7816
8071
|
"src/platform/adapters/bun/environment-adapter.ts"() {
|
|
7817
8072
|
"use strict";
|
|
8073
|
+
init_deno_env();
|
|
7818
8074
|
BunEnvironmentAdapter = class {
|
|
7819
8075
|
get(key) {
|
|
7820
8076
|
return Bun.env[key];
|
|
@@ -7834,6 +8090,7 @@ var BunServerAdapter, BunWebSocket;
|
|
|
7834
8090
|
var init_websocket_adapter2 = __esm({
|
|
7835
8091
|
"src/platform/adapters/bun/websocket-adapter.ts"() {
|
|
7836
8092
|
"use strict";
|
|
8093
|
+
init_deno_env();
|
|
7837
8094
|
init_veryfront_error();
|
|
7838
8095
|
BunServerAdapter = class {
|
|
7839
8096
|
upgradeWebSocket(request) {
|
|
@@ -7907,6 +8164,7 @@ var BunServer;
|
|
|
7907
8164
|
var init_http_server2 = __esm({
|
|
7908
8165
|
"src/platform/adapters/bun/http-server.ts"() {
|
|
7909
8166
|
"use strict";
|
|
8167
|
+
init_deno_env();
|
|
7910
8168
|
init_config();
|
|
7911
8169
|
init_utils();
|
|
7912
8170
|
BunServer = class {
|
|
@@ -7931,6 +8189,7 @@ var BunAdapter, bunAdapter;
|
|
|
7931
8189
|
var init_adapter2 = __esm({
|
|
7932
8190
|
"src/platform/adapters/bun/adapter.ts"() {
|
|
7933
8191
|
"use strict";
|
|
8192
|
+
init_deno_env();
|
|
7934
8193
|
init_filesystem_adapter2();
|
|
7935
8194
|
init_environment_adapter2();
|
|
7936
8195
|
init_websocket_adapter2();
|
|
@@ -7977,6 +8236,7 @@ var init_adapter2 = __esm({
|
|
|
7977
8236
|
var init_bun = __esm({
|
|
7978
8237
|
"src/platform/adapters/bun/index.ts"() {
|
|
7979
8238
|
"use strict";
|
|
8239
|
+
init_deno_env();
|
|
7980
8240
|
init_adapter2();
|
|
7981
8241
|
init_filesystem_adapter2();
|
|
7982
8242
|
init_environment_adapter2();
|
|
@@ -8000,6 +8260,7 @@ __export(bun_exports, {
|
|
|
8000
8260
|
var init_bun2 = __esm({
|
|
8001
8261
|
"src/platform/adapters/bun.ts"() {
|
|
8002
8262
|
"use strict";
|
|
8263
|
+
init_deno_env();
|
|
8003
8264
|
init_bun();
|
|
8004
8265
|
}
|
|
8005
8266
|
});
|
|
@@ -8161,6 +8422,7 @@ function createMockAdapter() {
|
|
|
8161
8422
|
var init_mock = __esm({
|
|
8162
8423
|
"src/platform/adapters/mock.ts"() {
|
|
8163
8424
|
"use strict";
|
|
8425
|
+
init_deno_env();
|
|
8164
8426
|
init_veryfront_error();
|
|
8165
8427
|
}
|
|
8166
8428
|
});
|
|
@@ -8170,6 +8432,7 @@ var AdapterRegistry, runtime;
|
|
|
8170
8432
|
var init_registry = __esm({
|
|
8171
8433
|
"src/platform/adapters/registry.ts"() {
|
|
8172
8434
|
"use strict";
|
|
8435
|
+
init_deno_env();
|
|
8173
8436
|
AdapterRegistry = class {
|
|
8174
8437
|
constructor() {
|
|
8175
8438
|
this.instance = null;
|
|
@@ -8362,6 +8625,7 @@ async function getAdapter() {
|
|
|
8362
8625
|
}
|
|
8363
8626
|
var init_detect = __esm({
|
|
8364
8627
|
"src/platform/adapters/detect.ts"() {
|
|
8628
|
+
init_deno_env();
|
|
8365
8629
|
init_utils();
|
|
8366
8630
|
init_veryfront_error();
|
|
8367
8631
|
init_registry();
|
|
@@ -8371,13 +8635,31 @@ var init_detect = __esm({
|
|
|
8371
8635
|
}
|
|
8372
8636
|
});
|
|
8373
8637
|
|
|
8638
|
+
// src/index.ts
|
|
8639
|
+
init_deno_env();
|
|
8640
|
+
|
|
8641
|
+
// src/react/components/index.ts
|
|
8642
|
+
init_deno_env();
|
|
8643
|
+
|
|
8644
|
+
// src/react/components/AppWrapper.tsx
|
|
8645
|
+
init_deno_env();
|
|
8646
|
+
|
|
8374
8647
|
// src/react/components/LayoutComponent.tsx
|
|
8648
|
+
init_deno_env();
|
|
8375
8649
|
import { useMemo, useRef } from "react";
|
|
8376
8650
|
|
|
8377
8651
|
// src/build/transforms/mdx/index.ts
|
|
8652
|
+
init_deno_env();
|
|
8378
8653
|
init_utils();
|
|
8379
8654
|
|
|
8655
|
+
// src/core/utils/lru-wrapper.ts
|
|
8656
|
+
init_deno_env();
|
|
8657
|
+
|
|
8658
|
+
// src/core/utils/cache/stores/memory/lru-cache-adapter.ts
|
|
8659
|
+
init_deno_env();
|
|
8660
|
+
|
|
8380
8661
|
// src/core/utils/cache/stores/memory/lru-list-manager.ts
|
|
8662
|
+
init_deno_env();
|
|
8381
8663
|
var LRUListManager = class {
|
|
8382
8664
|
constructor() {
|
|
8383
8665
|
this.head = null;
|
|
@@ -8430,6 +8712,7 @@ var LRUListManager = class {
|
|
|
8430
8712
|
};
|
|
8431
8713
|
|
|
8432
8714
|
// src/core/utils/cache/eviction/eviction-manager.ts
|
|
8715
|
+
init_deno_env();
|
|
8433
8716
|
var EvictionManager = class {
|
|
8434
8717
|
constructor(options = {}) {
|
|
8435
8718
|
this.onEvict = options.onEvict;
|
|
@@ -8517,7 +8800,11 @@ var EvictionManager = class {
|
|
|
8517
8800
|
}
|
|
8518
8801
|
};
|
|
8519
8802
|
|
|
8803
|
+
// src/core/utils/cache/stores/memory/entry-manager.ts
|
|
8804
|
+
init_deno_env();
|
|
8805
|
+
|
|
8520
8806
|
// src/core/utils/cache/stores/memory/lru-node.ts
|
|
8807
|
+
init_deno_env();
|
|
8521
8808
|
var LRUNode = class {
|
|
8522
8809
|
constructor(key, entry, prev = null, next = null) {
|
|
8523
8810
|
this.key = key;
|
|
@@ -8836,9 +9123,11 @@ init_cache();
|
|
|
8836
9123
|
import React from "react";
|
|
8837
9124
|
|
|
8838
9125
|
// src/build/transforms/mdx/esm-module-loader.ts
|
|
9126
|
+
init_deno_env();
|
|
8839
9127
|
init_utils();
|
|
8840
9128
|
|
|
8841
9129
|
// src/core/utils/cache/keys/namespace.ts
|
|
9130
|
+
init_deno_env();
|
|
8842
9131
|
init_logger();
|
|
8843
9132
|
init_env();
|
|
8844
9133
|
var cacheNamespace = globalThis.__VF_CACHE_NAMESPACE__ || getEnvironmentVariable("VF_CACHE_NAMESPACE");
|
|
@@ -8846,12 +9135,17 @@ function getCacheNamespace() {
|
|
|
8846
9135
|
return cacheNamespace;
|
|
8847
9136
|
}
|
|
8848
9137
|
|
|
9138
|
+
// src/module-system/import-map/index.ts
|
|
9139
|
+
init_deno_env();
|
|
9140
|
+
|
|
8849
9141
|
// src/module-system/import-map/loader.ts
|
|
9142
|
+
init_deno_env();
|
|
8850
9143
|
init_utils();
|
|
8851
9144
|
init_config();
|
|
8852
9145
|
import { dirname, join as join2 } from "node:path";
|
|
8853
9146
|
|
|
8854
9147
|
// src/module-system/import-map/default-import-map.ts
|
|
9148
|
+
init_deno_env();
|
|
8855
9149
|
init_utils();
|
|
8856
9150
|
function getDefaultImportMap() {
|
|
8857
9151
|
const reactVersion = REACT_DEFAULT_VERSION;
|
|
@@ -8861,6 +9155,7 @@ function getDefaultImportMap() {
|
|
|
8861
9155
|
}
|
|
8862
9156
|
|
|
8863
9157
|
// src/module-system/import-map/resolver.ts
|
|
9158
|
+
init_deno_env();
|
|
8864
9159
|
function resolveImport(specifier, importMap, scope) {
|
|
8865
9160
|
if (scope && importMap.scopes?.[scope]?.[specifier]) {
|
|
8866
9161
|
return importMap.scopes[scope][specifier];
|
|
@@ -8885,6 +9180,7 @@ function resolveImport(specifier, importMap, scope) {
|
|
|
8885
9180
|
}
|
|
8886
9181
|
|
|
8887
9182
|
// src/module-system/import-map/transformer.ts
|
|
9183
|
+
init_deno_env();
|
|
8888
9184
|
function transformImportsWithMap(code, importMap, scope, options) {
|
|
8889
9185
|
let transformedCode = code;
|
|
8890
9186
|
transformedCode = transformedCode.replace(
|
|
@@ -8919,10 +9215,14 @@ function transformImportsWithMap(code, importMap, scope, options) {
|
|
|
8919
9215
|
return transformedCode;
|
|
8920
9216
|
}
|
|
8921
9217
|
|
|
9218
|
+
// src/module-system/import-map/merger.ts
|
|
9219
|
+
init_deno_env();
|
|
9220
|
+
|
|
8922
9221
|
// src/build/transforms/mdx/esm-module-loader.ts
|
|
8923
9222
|
init_runtime();
|
|
8924
9223
|
init_process();
|
|
8925
9224
|
import { join as join4 } from "node:path";
|
|
9225
|
+
var IS_TRUE_NODE = isNode && !isDeno;
|
|
8926
9226
|
var LOG_PREFIX_MDX_LOADER = "[mdx-loader]";
|
|
8927
9227
|
var LOG_PREFIX_MDX_RENDERER = "[mdx-renderer]";
|
|
8928
9228
|
var JSX_IMPORT_PATTERN = /import\s+([^'"]+)\s+from\s+['"]file:\/\/([^'"]+\.(jsx|tsx))['"];?/g;
|
|
@@ -8931,6 +9231,57 @@ var HTTP_IMPORT_PATTERN = /['"]https?:\/\/[^'"]+['"]/;
|
|
|
8931
9231
|
var ESBUILD_JSX_FACTORY = "React.createElement";
|
|
8932
9232
|
var ESBUILD_JSX_FRAGMENT = "React.Fragment";
|
|
8933
9233
|
var HTTP_MODULE_FETCH_TIMEOUT_MS2 = 3e4;
|
|
9234
|
+
var _resolvedPaths = {};
|
|
9235
|
+
async function resolveNodePackage(packageSpec) {
|
|
9236
|
+
if (!IS_TRUE_NODE)
|
|
9237
|
+
return null;
|
|
9238
|
+
if (packageSpec in _resolvedPaths)
|
|
9239
|
+
return _resolvedPaths[packageSpec];
|
|
9240
|
+
try {
|
|
9241
|
+
const { createRequire } = await import("node:module");
|
|
9242
|
+
const require2 = createRequire(import.meta.url);
|
|
9243
|
+
const resolved = require2.resolve(packageSpec);
|
|
9244
|
+
_resolvedPaths[packageSpec] = resolved;
|
|
9245
|
+
return resolved;
|
|
9246
|
+
} catch {
|
|
9247
|
+
_resolvedPaths[packageSpec] = null;
|
|
9248
|
+
return null;
|
|
9249
|
+
}
|
|
9250
|
+
}
|
|
9251
|
+
async function transformReactImportsToAbsolute(code) {
|
|
9252
|
+
if (!IS_TRUE_NODE)
|
|
9253
|
+
return code;
|
|
9254
|
+
const reactPath = await resolveNodePackage("react");
|
|
9255
|
+
const reactJsxPath = await resolveNodePackage("react/jsx-runtime");
|
|
9256
|
+
const reactJsxDevPath = await resolveNodePackage("react/jsx-dev-runtime");
|
|
9257
|
+
const reactDomPath = await resolveNodePackage("react-dom");
|
|
9258
|
+
let result = code;
|
|
9259
|
+
if (reactJsxPath) {
|
|
9260
|
+
result = result.replace(
|
|
9261
|
+
/from\s+['"]react\/jsx-runtime['"]/g,
|
|
9262
|
+
`from "file://${reactJsxPath}"`
|
|
9263
|
+
);
|
|
9264
|
+
}
|
|
9265
|
+
if (reactJsxDevPath) {
|
|
9266
|
+
result = result.replace(
|
|
9267
|
+
/from\s+['"]react\/jsx-dev-runtime['"]/g,
|
|
9268
|
+
`from "file://${reactJsxDevPath}"`
|
|
9269
|
+
);
|
|
9270
|
+
}
|
|
9271
|
+
if (reactDomPath) {
|
|
9272
|
+
result = result.replace(
|
|
9273
|
+
/from\s+['"]react-dom['"]/g,
|
|
9274
|
+
`from "file://${reactDomPath}"`
|
|
9275
|
+
);
|
|
9276
|
+
}
|
|
9277
|
+
if (reactPath) {
|
|
9278
|
+
result = result.replace(
|
|
9279
|
+
/from\s+['"]react['"]/g,
|
|
9280
|
+
`from "file://${reactPath}"`
|
|
9281
|
+
);
|
|
9282
|
+
}
|
|
9283
|
+
return result;
|
|
9284
|
+
}
|
|
8934
9285
|
function hashString(input) {
|
|
8935
9286
|
const HASH_SEED_FNV1A2 = 2166136261;
|
|
8936
9287
|
let hash = HASH_SEED_FNV1A2 >>> 0;
|
|
@@ -9005,7 +9356,7 @@ async function loadModuleESM(compiledProgramCode, context) {
|
|
|
9005
9356
|
const { getAdapter: getAdapter2 } = await Promise.resolve().then(() => (init_detect(), detect_exports));
|
|
9006
9357
|
const adapter = await getAdapter2();
|
|
9007
9358
|
if (!context.esmCacheDir) {
|
|
9008
|
-
if (
|
|
9359
|
+
if (IS_TRUE_NODE) {
|
|
9009
9360
|
const projectCacheDir = join4(
|
|
9010
9361
|
cwd(),
|
|
9011
9362
|
"node_modules",
|
|
@@ -9019,8 +9370,8 @@ async function loadModuleESM(compiledProgramCode, context) {
|
|
|
9019
9370
|
}
|
|
9020
9371
|
}
|
|
9021
9372
|
let rewritten;
|
|
9022
|
-
if (
|
|
9023
|
-
rewritten = compiledProgramCode;
|
|
9373
|
+
if (IS_TRUE_NODE) {
|
|
9374
|
+
rewritten = await transformReactImportsToAbsolute(compiledProgramCode);
|
|
9024
9375
|
} else {
|
|
9025
9376
|
rewritten = transformImportsWithMap(
|
|
9026
9377
|
compiledProgramCode,
|
|
@@ -9074,7 +9425,7 @@ ${transformed}`;
|
|
|
9074
9425
|
if (/\bconst\s+MDXLayout\b/.test(rewritten) && !/export\s+\{[^}]*MDXLayout/.test(rewritten)) {
|
|
9075
9426
|
rewritten += "\nexport { MDXLayout as __vfLayout };\n";
|
|
9076
9427
|
}
|
|
9077
|
-
if (
|
|
9428
|
+
if (IS_TRUE_NODE && HTTP_IMPORT_PATTERN.test(rewritten)) {
|
|
9078
9429
|
rendererLogger.info(`${LOG_PREFIX_MDX_LOADER} Bundling HTTP imports via esbuild for Node.js`);
|
|
9079
9430
|
const { build: build2 } = await import("esbuild/mod.js");
|
|
9080
9431
|
const tempSourcePath = join4(context.esmCacheDir, `temp-${hashString(rewritten)}.mjs`);
|
|
@@ -9164,12 +9515,15 @@ ${transformed}`;
|
|
|
9164
9515
|
}
|
|
9165
9516
|
|
|
9166
9517
|
// src/build/transforms/mdx/parser.ts
|
|
9518
|
+
init_deno_env();
|
|
9167
9519
|
init_utils();
|
|
9168
9520
|
|
|
9169
9521
|
// src/build/transforms/mdx/module-loader/metadata-extractor.ts
|
|
9522
|
+
init_deno_env();
|
|
9170
9523
|
init_utils();
|
|
9171
9524
|
|
|
9172
9525
|
// src/build/transforms/mdx/module-loader/string-parser.ts
|
|
9526
|
+
init_deno_env();
|
|
9173
9527
|
function extractBalancedBlock(source, startIndex, open, close) {
|
|
9174
9528
|
const closeCh = close || (open === "{" ? "}" : open === "[" ? "]" : ")");
|
|
9175
9529
|
let depth = 0;
|
|
@@ -9324,6 +9678,7 @@ function parseMDXCode(compiledCode) {
|
|
|
9324
9678
|
}
|
|
9325
9679
|
|
|
9326
9680
|
// src/build/transforms/mdx/mdx-cache-adapter.ts
|
|
9681
|
+
init_deno_env();
|
|
9327
9682
|
init_utils();
|
|
9328
9683
|
init_utils();
|
|
9329
9684
|
|
|
@@ -9423,6 +9778,7 @@ init_utils();
|
|
|
9423
9778
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
9424
9779
|
|
|
9425
9780
|
// src/react/components/ProviderComponent.tsx
|
|
9781
|
+
init_deno_env();
|
|
9426
9782
|
import { useMemo as useMemo2, useRef as useRef2 } from "react";
|
|
9427
9783
|
init_utils();
|
|
9428
9784
|
import { Fragment as Fragment2, jsx as jsx2 } from "react/jsx-runtime";
|
|
@@ -9431,6 +9787,7 @@ import { Fragment as Fragment2, jsx as jsx2 } from "react/jsx-runtime";
|
|
|
9431
9787
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
9432
9788
|
|
|
9433
9789
|
// src/react/components/Head.tsx
|
|
9790
|
+
init_deno_env();
|
|
9434
9791
|
import React2 from "react";
|
|
9435
9792
|
function Head({ children }) {
|
|
9436
9793
|
return React2.createElement(
|
|
@@ -9444,6 +9801,7 @@ function Head({ children }) {
|
|
|
9444
9801
|
}
|
|
9445
9802
|
|
|
9446
9803
|
// src/react/components/Link.tsx
|
|
9804
|
+
init_deno_env();
|
|
9447
9805
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
9448
9806
|
function Link({ prefetch = true, children, ...rest }) {
|
|
9449
9807
|
const props = {
|
|
@@ -9454,6 +9812,7 @@ function Link({ prefetch = true, children, ...rest }) {
|
|
|
9454
9812
|
}
|
|
9455
9813
|
|
|
9456
9814
|
// src/react/components/MDXProvider.tsx
|
|
9815
|
+
init_deno_env();
|
|
9457
9816
|
import { createContext, useContext } from "react";
|
|
9458
9817
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
9459
9818
|
var MDXContext = createContext({});
|
|
@@ -9468,10 +9827,15 @@ function useMDXComponents(components) {
|
|
|
9468
9827
|
return { ...contextComponents, ...components };
|
|
9469
9828
|
}
|
|
9470
9829
|
|
|
9830
|
+
// src/react/components/optimized-image/index.ts
|
|
9831
|
+
init_deno_env();
|
|
9832
|
+
|
|
9471
9833
|
// src/react/components/optimized-image/OptimizedImage.tsx
|
|
9834
|
+
init_deno_env();
|
|
9472
9835
|
init_utils();
|
|
9473
9836
|
|
|
9474
9837
|
// src/react/components/optimized-image/helpers.ts
|
|
9838
|
+
init_deno_env();
|
|
9475
9839
|
function getOptimizedPath(src, format, size, _quality = 80) {
|
|
9476
9840
|
const basePath = src.replace(/\.[^.]+$/, "");
|
|
9477
9841
|
const optimizedDir = ".veryfront/optimized-images";
|
|
@@ -9547,6 +9911,7 @@ function OptimizedImage({
|
|
|
9547
9911
|
}
|
|
9548
9912
|
|
|
9549
9913
|
// src/react/components/optimized-image/SimpleOptimizedImage.tsx
|
|
9914
|
+
init_deno_env();
|
|
9550
9915
|
init_utils();
|
|
9551
9916
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
9552
9917
|
var DEFAULT_SIZES2 = [...RESPONSIVE_IMAGE_WIDTHS];
|
|
@@ -9585,6 +9950,7 @@ function SimpleOptimizedImage({
|
|
|
9585
9950
|
}
|
|
9586
9951
|
|
|
9587
9952
|
// src/react/components/optimized-image/OptimizedBackgroundImage.tsx
|
|
9953
|
+
init_deno_env();
|
|
9588
9954
|
init_network();
|
|
9589
9955
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
9590
9956
|
function OptimizedBackgroundImage({
|
|
@@ -9608,26 +9974,39 @@ function OptimizedBackgroundImage({
|
|
|
9608
9974
|
}
|
|
9609
9975
|
|
|
9610
9976
|
// src/react/components/optimized-image/useOptimizedImage.ts
|
|
9977
|
+
init_deno_env();
|
|
9611
9978
|
init_utils();
|
|
9612
9979
|
var DEFAULT_SIZES3 = [...RESPONSIVE_IMAGE_WIDTHS];
|
|
9613
9980
|
|
|
9614
9981
|
// src/react/components/optimized-image/utils.tsx
|
|
9982
|
+
init_deno_env();
|
|
9615
9983
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
9616
9984
|
|
|
9985
|
+
// src/data/index.ts
|
|
9986
|
+
init_deno_env();
|
|
9987
|
+
|
|
9988
|
+
// src/data/data-fetcher.ts
|
|
9989
|
+
init_deno_env();
|
|
9990
|
+
|
|
9617
9991
|
// src/data/data-fetching-cache.ts
|
|
9992
|
+
init_deno_env();
|
|
9618
9993
|
init_cache();
|
|
9619
9994
|
init_process();
|
|
9620
9995
|
|
|
9621
9996
|
// src/data/server-data-fetcher.ts
|
|
9997
|
+
init_deno_env();
|
|
9622
9998
|
init_utils();
|
|
9623
9999
|
|
|
9624
10000
|
// src/data/static-data-fetcher.ts
|
|
10001
|
+
init_deno_env();
|
|
9625
10002
|
init_utils();
|
|
9626
10003
|
|
|
9627
10004
|
// src/data/static-paths-fetcher.ts
|
|
10005
|
+
init_deno_env();
|
|
9628
10006
|
init_utils();
|
|
9629
10007
|
|
|
9630
10008
|
// src/data/helpers.ts
|
|
10009
|
+
init_deno_env();
|
|
9631
10010
|
var redirect = (destination, permanent = false) => ({
|
|
9632
10011
|
redirect: { destination, permanent }
|
|
9633
10012
|
});
|
|
@@ -9635,13 +10014,35 @@ var notFound = () => ({
|
|
|
9635
10014
|
notFound: true
|
|
9636
10015
|
});
|
|
9637
10016
|
|
|
10017
|
+
// src/routing/index.ts
|
|
10018
|
+
init_deno_env();
|
|
10019
|
+
|
|
10020
|
+
// src/routing/matchers/index.ts
|
|
10021
|
+
init_deno_env();
|
|
10022
|
+
|
|
10023
|
+
// src/routing/matchers/pattern-route-matcher.ts
|
|
10024
|
+
init_deno_env();
|
|
10025
|
+
|
|
10026
|
+
// src/routing/matchers/route-parser.ts
|
|
10027
|
+
init_deno_env();
|
|
10028
|
+
|
|
10029
|
+
// src/routing/matchers/route-matcher.ts
|
|
10030
|
+
init_deno_env();
|
|
10031
|
+
|
|
9638
10032
|
// src/routing/matchers/pattern-route-matcher.ts
|
|
9639
10033
|
init_path_utils();
|
|
9640
10034
|
|
|
9641
10035
|
// src/routing/matchers/index.ts
|
|
9642
10036
|
init_utils();
|
|
9643
10037
|
|
|
10038
|
+
// src/routing/slug-mapper/index.ts
|
|
10039
|
+
init_deno_env();
|
|
10040
|
+
|
|
10041
|
+
// src/routing/slug-mapper/path-candidate-generator.ts
|
|
10042
|
+
init_deno_env();
|
|
10043
|
+
|
|
9644
10044
|
// src/platform/compat/path-helper.ts
|
|
10045
|
+
init_deno_env();
|
|
9645
10046
|
import nodePath from "node:path";
|
|
9646
10047
|
var pathMod = null;
|
|
9647
10048
|
if (typeof Deno === "undefined") {
|
|
@@ -9653,31 +10054,53 @@ if (typeof Deno === "undefined") {
|
|
|
9653
10054
|
}
|
|
9654
10055
|
var sep = nodePath.sep;
|
|
9655
10056
|
|
|
10057
|
+
// src/routing/slug-mapper/dynamic-route-matcher.ts
|
|
10058
|
+
init_deno_env();
|
|
10059
|
+
|
|
10060
|
+
// src/routing/slug-mapper/slug-normalizer.ts
|
|
10061
|
+
init_deno_env();
|
|
10062
|
+
|
|
10063
|
+
// src/routing/client/index.ts
|
|
10064
|
+
init_deno_env();
|
|
10065
|
+
|
|
9656
10066
|
// src/routing/client/dom-utils.ts
|
|
10067
|
+
init_deno_env();
|
|
9657
10068
|
init_utils();
|
|
9658
10069
|
|
|
9659
10070
|
// src/routing/client/navigation-handlers.ts
|
|
10071
|
+
init_deno_env();
|
|
9660
10072
|
init_utils();
|
|
9661
10073
|
init_config();
|
|
9662
10074
|
|
|
9663
10075
|
// src/routing/client/page-loader.ts
|
|
10076
|
+
init_deno_env();
|
|
9664
10077
|
init_utils();
|
|
9665
10078
|
init_errors();
|
|
9666
10079
|
|
|
9667
10080
|
// src/routing/client/page-transition.ts
|
|
10081
|
+
init_deno_env();
|
|
9668
10082
|
init_utils();
|
|
9669
10083
|
init_config();
|
|
9670
10084
|
|
|
10085
|
+
// src/security/client/html-sanitizer.ts
|
|
10086
|
+
init_deno_env();
|
|
10087
|
+
|
|
9671
10088
|
// src/routing/client/viewport-prefetch.ts
|
|
10089
|
+
init_deno_env();
|
|
9672
10090
|
init_utils();
|
|
9673
10091
|
|
|
10092
|
+
// src/routing/api/index.ts
|
|
10093
|
+
init_deno_env();
|
|
10094
|
+
|
|
9674
10095
|
// src/routing/api/handler.ts
|
|
10096
|
+
init_deno_env();
|
|
9675
10097
|
init_utils();
|
|
9676
10098
|
init_config();
|
|
9677
10099
|
import { join as join7 } from "node:path";
|
|
9678
10100
|
init_veryfront_error();
|
|
9679
10101
|
|
|
9680
10102
|
// src/http/responses.ts
|
|
10103
|
+
init_deno_env();
|
|
9681
10104
|
var HttpStatus = {
|
|
9682
10105
|
OK: 200,
|
|
9683
10106
|
CREATED: 201,
|
|
@@ -9788,7 +10211,17 @@ function isValidRedirectUrl(url) {
|
|
|
9788
10211
|
}
|
|
9789
10212
|
}
|
|
9790
10213
|
|
|
10214
|
+
// src/security/index.ts
|
|
10215
|
+
init_deno_env();
|
|
10216
|
+
|
|
10217
|
+
// src/security/http/base-handler.ts
|
|
10218
|
+
init_deno_env();
|
|
10219
|
+
|
|
10220
|
+
// src/security/http/response/index.ts
|
|
10221
|
+
init_deno_env();
|
|
10222
|
+
|
|
9791
10223
|
// src/security/http/response/constants.ts
|
|
10224
|
+
init_deno_env();
|
|
9792
10225
|
var CONTENT_TYPES = {
|
|
9793
10226
|
JSON: "application/json; charset=utf-8",
|
|
9794
10227
|
HTML: "text/html; charset=utf-8",
|
|
@@ -9803,13 +10236,34 @@ var CACHE_DURATIONS = {
|
|
|
9803
10236
|
LONG: 31536e3
|
|
9804
10237
|
};
|
|
9805
10238
|
|
|
10239
|
+
// src/security/http/response/builder.ts
|
|
10240
|
+
init_deno_env();
|
|
10241
|
+
|
|
10242
|
+
// src/security/http/response/fluent-methods.ts
|
|
10243
|
+
init_deno_env();
|
|
10244
|
+
|
|
10245
|
+
// src/security/http/cors/index.ts
|
|
10246
|
+
init_deno_env();
|
|
10247
|
+
|
|
10248
|
+
// src/security/http/cors/headers.ts
|
|
10249
|
+
init_deno_env();
|
|
10250
|
+
|
|
9806
10251
|
// src/security/http/cors/validators.ts
|
|
10252
|
+
init_deno_env();
|
|
9807
10253
|
init_logger();
|
|
9808
10254
|
|
|
10255
|
+
// src/observability/index.ts
|
|
10256
|
+
init_deno_env();
|
|
10257
|
+
|
|
10258
|
+
// src/observability/tracing/index.ts
|
|
10259
|
+
init_deno_env();
|
|
10260
|
+
|
|
9809
10261
|
// src/observability/tracing/manager.ts
|
|
10262
|
+
init_deno_env();
|
|
9810
10263
|
init_utils();
|
|
9811
10264
|
|
|
9812
10265
|
// src/observability/tracing/config.ts
|
|
10266
|
+
init_deno_env();
|
|
9813
10267
|
init_process();
|
|
9814
10268
|
var DEFAULT_CONFIG2 = {
|
|
9815
10269
|
enabled: false,
|
|
@@ -9861,6 +10315,7 @@ function isValidExporter(value) {
|
|
|
9861
10315
|
}
|
|
9862
10316
|
|
|
9863
10317
|
// src/observability/tracing/span-operations.ts
|
|
10318
|
+
init_deno_env();
|
|
9864
10319
|
init_utils();
|
|
9865
10320
|
var SpanOperations = class {
|
|
9866
10321
|
constructor(api, tracer2) {
|
|
@@ -9942,6 +10397,7 @@ var SpanOperations = class {
|
|
|
9942
10397
|
};
|
|
9943
10398
|
|
|
9944
10399
|
// src/observability/tracing/context-propagation.ts
|
|
10400
|
+
init_deno_env();
|
|
9945
10401
|
init_utils();
|
|
9946
10402
|
var ContextPropagation = class {
|
|
9947
10403
|
constructor(api, propagator) {
|
|
@@ -10048,12 +10504,10 @@ var TracingManager = class {
|
|
|
10048
10504
|
}
|
|
10049
10505
|
}
|
|
10050
10506
|
async initializeTracer(config) {
|
|
10051
|
-
const
|
|
10052
|
-
const api = await import(otelApiModule);
|
|
10507
|
+
const api = await import("@opentelemetry/api");
|
|
10053
10508
|
this.state.api = api;
|
|
10054
10509
|
this.state.tracer = api.trace.getTracer(config.serviceName || "veryfront", "0.1.0");
|
|
10055
|
-
const
|
|
10056
|
-
const { W3CTraceContextPropagator } = await import(otelCoreModule);
|
|
10510
|
+
const { W3CTraceContextPropagator } = await import("@opentelemetry/core");
|
|
10057
10511
|
const propagator = new W3CTraceContextPropagator();
|
|
10058
10512
|
this.state.propagator = propagator;
|
|
10059
10513
|
api.propagation.setGlobalPropagator(propagator);
|
|
@@ -10088,10 +10542,18 @@ var TracingManager = class {
|
|
|
10088
10542
|
};
|
|
10089
10543
|
var tracingManager = new TracingManager();
|
|
10090
10544
|
|
|
10545
|
+
// src/observability/tracing/span-names.ts
|
|
10546
|
+
init_deno_env();
|
|
10547
|
+
|
|
10548
|
+
// src/observability/metrics/index.ts
|
|
10549
|
+
init_deno_env();
|
|
10550
|
+
|
|
10091
10551
|
// src/observability/metrics/manager.ts
|
|
10552
|
+
init_deno_env();
|
|
10092
10553
|
init_utils();
|
|
10093
10554
|
|
|
10094
10555
|
// src/observability/metrics/config.ts
|
|
10556
|
+
init_deno_env();
|
|
10095
10557
|
init_process();
|
|
10096
10558
|
init_process();
|
|
10097
10559
|
var DEFAULT_METRICS_COLLECT_INTERVAL_MS2 = 6e4;
|
|
@@ -10139,10 +10601,15 @@ function getMemoryUsage() {
|
|
|
10139
10601
|
}
|
|
10140
10602
|
}
|
|
10141
10603
|
|
|
10604
|
+
// src/observability/instruments/index.ts
|
|
10605
|
+
init_deno_env();
|
|
10606
|
+
|
|
10142
10607
|
// src/observability/instruments/instruments-factory.ts
|
|
10608
|
+
init_deno_env();
|
|
10143
10609
|
init_utils();
|
|
10144
10610
|
|
|
10145
10611
|
// src/observability/instruments/build-instruments.ts
|
|
10612
|
+
init_deno_env();
|
|
10146
10613
|
init_config();
|
|
10147
10614
|
function createBuildInstruments(meter, config) {
|
|
10148
10615
|
const buildDuration = meter.createHistogram(
|
|
@@ -10176,6 +10643,7 @@ function createBuildInstruments(meter, config) {
|
|
|
10176
10643
|
}
|
|
10177
10644
|
|
|
10178
10645
|
// src/observability/instruments/cache-instruments.ts
|
|
10646
|
+
init_deno_env();
|
|
10179
10647
|
function createCacheInstruments(meter, config, runtimeState) {
|
|
10180
10648
|
const cacheGetCounter = meter.createCounter(
|
|
10181
10649
|
`${config.prefix}.cache.gets`,
|
|
@@ -10233,6 +10701,7 @@ function createCacheInstruments(meter, config, runtimeState) {
|
|
|
10233
10701
|
}
|
|
10234
10702
|
|
|
10235
10703
|
// src/observability/instruments/data-instruments.ts
|
|
10704
|
+
init_deno_env();
|
|
10236
10705
|
init_config();
|
|
10237
10706
|
function createDataInstruments(meter, config) {
|
|
10238
10707
|
const dataFetchDuration = meter.createHistogram(
|
|
@@ -10265,6 +10734,7 @@ function createDataInstruments(meter, config) {
|
|
|
10265
10734
|
}
|
|
10266
10735
|
|
|
10267
10736
|
// src/observability/instruments/http-instruments.ts
|
|
10737
|
+
init_deno_env();
|
|
10268
10738
|
init_config();
|
|
10269
10739
|
function createHttpInstruments(meter, config) {
|
|
10270
10740
|
const httpRequestCounter = meter.createCounter(
|
|
@@ -10297,6 +10767,7 @@ function createHttpInstruments(meter, config) {
|
|
|
10297
10767
|
}
|
|
10298
10768
|
|
|
10299
10769
|
// src/observability/instruments/memory-instruments.ts
|
|
10770
|
+
init_deno_env();
|
|
10300
10771
|
function createMemoryInstruments(meter, config) {
|
|
10301
10772
|
const memoryUsageGauge = meter.createObservableGauge(
|
|
10302
10773
|
`${config.prefix}.memory.usage`,
|
|
@@ -10331,6 +10802,7 @@ function createMemoryInstruments(meter, config) {
|
|
|
10331
10802
|
}
|
|
10332
10803
|
|
|
10333
10804
|
// src/observability/instruments/render-instruments.ts
|
|
10805
|
+
init_deno_env();
|
|
10334
10806
|
init_config();
|
|
10335
10807
|
function createRenderInstruments(meter, config) {
|
|
10336
10808
|
const renderDuration = meter.createHistogram(
|
|
@@ -10363,6 +10835,7 @@ function createRenderInstruments(meter, config) {
|
|
|
10363
10835
|
}
|
|
10364
10836
|
|
|
10365
10837
|
// src/observability/instruments/rsc-instruments.ts
|
|
10838
|
+
init_deno_env();
|
|
10366
10839
|
init_config();
|
|
10367
10840
|
function createRscInstruments(meter, config) {
|
|
10368
10841
|
const rscRenderDuration = meter.createHistogram(
|
|
@@ -10482,6 +10955,7 @@ function initializeInstruments(meter, config, runtimeState) {
|
|
|
10482
10955
|
}
|
|
10483
10956
|
|
|
10484
10957
|
// src/observability/metrics/recorder.ts
|
|
10958
|
+
init_deno_env();
|
|
10485
10959
|
var MetricsRecorder = class {
|
|
10486
10960
|
constructor(instruments, runtimeState) {
|
|
10487
10961
|
this.instruments = instruments;
|
|
@@ -10692,10 +11166,18 @@ function recordSecurityHeaders(attributes) {
|
|
|
10692
11166
|
getRecorder()?.recordSecurityHeaders?.(attributes);
|
|
10693
11167
|
}
|
|
10694
11168
|
|
|
11169
|
+
// src/observability/auto-instrument/index.ts
|
|
11170
|
+
init_deno_env();
|
|
11171
|
+
|
|
10695
11172
|
// src/observability/auto-instrument/orchestrator.ts
|
|
11173
|
+
init_deno_env();
|
|
10696
11174
|
init_utils();
|
|
10697
11175
|
|
|
11176
|
+
// src/observability/auto-instrument/configurator.ts
|
|
11177
|
+
init_deno_env();
|
|
11178
|
+
|
|
10698
11179
|
// src/observability/auto-instrument/http-instrumentation.ts
|
|
11180
|
+
init_deno_env();
|
|
10699
11181
|
init_utils();
|
|
10700
11182
|
import {
|
|
10701
11183
|
context as otContext,
|
|
@@ -10706,6 +11188,12 @@ import {
|
|
|
10706
11188
|
} from "@opentelemetry/api";
|
|
10707
11189
|
var tracer = trace.getTracer("veryfront-http");
|
|
10708
11190
|
|
|
11191
|
+
// src/observability/auto-instrument/react-instrumentation.ts
|
|
11192
|
+
init_deno_env();
|
|
11193
|
+
|
|
11194
|
+
// src/observability/auto-instrument/wrappers.ts
|
|
11195
|
+
init_deno_env();
|
|
11196
|
+
|
|
10709
11197
|
// src/security/http/cors/validators.ts
|
|
10710
11198
|
async function validateOrigin(requestOrigin, config) {
|
|
10711
11199
|
if (!config) {
|
|
@@ -10962,7 +11450,11 @@ function applyCORSHeadersSync(options) {
|
|
|
10962
11450
|
return;
|
|
10963
11451
|
}
|
|
10964
11452
|
|
|
11453
|
+
// src/security/http/cors/preflight.ts
|
|
11454
|
+
init_deno_env();
|
|
11455
|
+
|
|
10965
11456
|
// src/security/http/cors/constants.ts
|
|
11457
|
+
init_deno_env();
|
|
10966
11458
|
init_config();
|
|
10967
11459
|
init_process();
|
|
10968
11460
|
|
|
@@ -10970,9 +11462,11 @@ init_process();
|
|
|
10970
11462
|
init_logger();
|
|
10971
11463
|
|
|
10972
11464
|
// src/security/http/cors/middleware.ts
|
|
11465
|
+
init_deno_env();
|
|
10973
11466
|
init_veryfront_error();
|
|
10974
11467
|
|
|
10975
11468
|
// src/security/http/response/security-handler.ts
|
|
11469
|
+
init_deno_env();
|
|
10976
11470
|
function generateNonce() {
|
|
10977
11471
|
const array = new Uint8Array(16);
|
|
10978
11472
|
crypto.getRandomValues(array);
|
|
@@ -11077,6 +11571,7 @@ function applySecurityHeaders(headers, isDev, nonce, cspUserHeader, config, adap
|
|
|
11077
11571
|
}
|
|
11078
11572
|
|
|
11079
11573
|
// src/security/http/response/cache-handler.ts
|
|
11574
|
+
init_deno_env();
|
|
11080
11575
|
function buildCacheControl(strategy) {
|
|
11081
11576
|
let cacheControl;
|
|
11082
11577
|
if (typeof strategy === "string") {
|
|
@@ -11184,6 +11679,7 @@ function withAllow(methods) {
|
|
|
11184
11679
|
}
|
|
11185
11680
|
|
|
11186
11681
|
// src/security/http/response/response-methods.ts
|
|
11682
|
+
init_deno_env();
|
|
11187
11683
|
function json(data, status) {
|
|
11188
11684
|
this.headers.set("content-type", CONTENT_TYPES.JSON);
|
|
11189
11685
|
return new Response(JSON.stringify(data), {
|
|
@@ -11236,6 +11732,7 @@ function notModified(etag) {
|
|
|
11236
11732
|
}
|
|
11237
11733
|
|
|
11238
11734
|
// src/security/http/response/static-helpers.ts
|
|
11735
|
+
init_deno_env();
|
|
11239
11736
|
init_veryfront_error();
|
|
11240
11737
|
var ResponseBuilderClass = null;
|
|
11241
11738
|
function setResponseBuilderClass(builderClass) {
|
|
@@ -11390,10 +11887,24 @@ setResponseBuilderClass(
|
|
|
11390
11887
|
// src/security/http/base-handler.ts
|
|
11391
11888
|
init_utils();
|
|
11392
11889
|
|
|
11890
|
+
// src/security/input-validation/index.ts
|
|
11891
|
+
init_deno_env();
|
|
11892
|
+
|
|
11893
|
+
// src/security/input-validation/types.ts
|
|
11894
|
+
init_deno_env();
|
|
11895
|
+
|
|
11393
11896
|
// src/core/constants/index.ts
|
|
11897
|
+
init_deno_env();
|
|
11394
11898
|
init_constants();
|
|
11395
11899
|
|
|
11900
|
+
// src/core/constants/priorities.ts
|
|
11901
|
+
init_deno_env();
|
|
11902
|
+
|
|
11903
|
+
// src/core/constants/retry.ts
|
|
11904
|
+
init_deno_env();
|
|
11905
|
+
|
|
11396
11906
|
// src/core/constants/buffers.ts
|
|
11907
|
+
init_deno_env();
|
|
11397
11908
|
var BUFFER_SIZE_2_KB = 2048;
|
|
11398
11909
|
var BUFFER_SIZE_8_KB = 8192;
|
|
11399
11910
|
var DEFAULT_MAX_BODY_SIZE_BYTES = 1024 * 1024;
|
|
@@ -11404,8 +11915,15 @@ var PREFETCH_QUEUE_MAX_SIZE_BYTES = 1024 * 1024;
|
|
|
11404
11915
|
var MAX_BUNDLE_CHUNK_SIZE_BYTES = 4096 * 1024;
|
|
11405
11916
|
|
|
11406
11917
|
// src/core/constants/limits.ts
|
|
11918
|
+
init_deno_env();
|
|
11407
11919
|
var MAX_URL_LENGTH_FOR_VALIDATION = 2048;
|
|
11408
11920
|
|
|
11921
|
+
// src/core/constants/metrics.ts
|
|
11922
|
+
init_deno_env();
|
|
11923
|
+
|
|
11924
|
+
// src/core/constants/crypto.ts
|
|
11925
|
+
init_deno_env();
|
|
11926
|
+
|
|
11409
11927
|
// src/security/input-validation/types.ts
|
|
11410
11928
|
var DEFAULT_LIMITS = {
|
|
11411
11929
|
maxBodySize: DEFAULT_MAX_BODY_SIZE_BYTES,
|
|
@@ -11419,6 +11937,7 @@ var DEFAULT_LIMITS = {
|
|
|
11419
11937
|
};
|
|
11420
11938
|
|
|
11421
11939
|
// src/security/input-validation/errors.ts
|
|
11940
|
+
init_deno_env();
|
|
11422
11941
|
var ValidationError = class extends Error {
|
|
11423
11942
|
constructor(message, details) {
|
|
11424
11943
|
super(message);
|
|
@@ -11428,6 +11947,7 @@ var ValidationError = class extends Error {
|
|
|
11428
11947
|
};
|
|
11429
11948
|
|
|
11430
11949
|
// src/security/input-validation/limits.ts
|
|
11950
|
+
init_deno_env();
|
|
11431
11951
|
function validateRequestLimits(request, limits = {}) {
|
|
11432
11952
|
const config = { ...DEFAULT_LIMITS, ...limits };
|
|
11433
11953
|
validateUrlLength(request.url, config.maxUrlLength);
|
|
@@ -11503,9 +12023,11 @@ async function readBodyWithLimit(request, maxSize = DEFAULT_LIMITS.maxBodySize)
|
|
|
11503
12023
|
}
|
|
11504
12024
|
|
|
11505
12025
|
// src/security/input-validation/parsers.ts
|
|
12026
|
+
init_deno_env();
|
|
11506
12027
|
import { z as z2 } from "zod";
|
|
11507
12028
|
|
|
11508
12029
|
// src/security/input-validation/sanitizers.ts
|
|
12030
|
+
init_deno_env();
|
|
11509
12031
|
function sanitizeData(data) {
|
|
11510
12032
|
if (typeof data === "string") {
|
|
11511
12033
|
return sanitizeString(data);
|
|
@@ -11627,6 +12149,7 @@ function parseQueryParams(request, schema) {
|
|
|
11627
12149
|
}
|
|
11628
12150
|
|
|
11629
12151
|
// src/security/input-validation/schemas.ts
|
|
12152
|
+
init_deno_env();
|
|
11630
12153
|
import { z as z3 } from "zod";
|
|
11631
12154
|
var CommonSchemas = {
|
|
11632
12155
|
/**
|
|
@@ -11679,6 +12202,7 @@ var CommonSchemas = {
|
|
|
11679
12202
|
};
|
|
11680
12203
|
|
|
11681
12204
|
// src/security/input-validation/handler.ts
|
|
12205
|
+
init_deno_env();
|
|
11682
12206
|
function createValidatedHandler(config, handler) {
|
|
11683
12207
|
return async (request) => {
|
|
11684
12208
|
try {
|
|
@@ -11708,43 +12232,64 @@ function createValidatedHandler(config, handler) {
|
|
|
11708
12232
|
};
|
|
11709
12233
|
}
|
|
11710
12234
|
|
|
12235
|
+
// src/security/http/handlers-index.ts
|
|
12236
|
+
init_deno_env();
|
|
12237
|
+
|
|
11711
12238
|
// src/security/http/auth.ts
|
|
12239
|
+
init_deno_env();
|
|
11712
12240
|
init_veryfront_error();
|
|
11713
12241
|
|
|
11714
12242
|
// src/security/http/config.ts
|
|
12243
|
+
init_deno_env();
|
|
11715
12244
|
init_config();
|
|
11716
12245
|
init_utils();
|
|
11717
12246
|
|
|
12247
|
+
// src/security/http/middleware/index.ts
|
|
12248
|
+
init_deno_env();
|
|
12249
|
+
|
|
11718
12250
|
// src/security/http/middleware/config-loader.ts
|
|
12251
|
+
init_deno_env();
|
|
11719
12252
|
init_utils();
|
|
11720
12253
|
|
|
12254
|
+
// src/security/http/middleware/cors-handler.ts
|
|
12255
|
+
init_deno_env();
|
|
12256
|
+
|
|
11721
12257
|
// src/security/http/middleware/etag.ts
|
|
12258
|
+
init_deno_env();
|
|
11722
12259
|
init_hash();
|
|
11723
12260
|
|
|
11724
12261
|
// src/security/http/middleware/content-types.ts
|
|
12262
|
+
init_deno_env();
|
|
11725
12263
|
init_http();
|
|
11726
12264
|
|
|
11727
12265
|
// src/security/path-validation.ts
|
|
12266
|
+
init_deno_env();
|
|
11728
12267
|
init_utils();
|
|
11729
12268
|
|
|
11730
12269
|
// src/security/secure-fs.ts
|
|
12270
|
+
init_deno_env();
|
|
11731
12271
|
init_utils();
|
|
11732
12272
|
|
|
11733
12273
|
// src/routing/api/api-route-matcher.ts
|
|
12274
|
+
init_deno_env();
|
|
11734
12275
|
init_process();
|
|
11735
12276
|
|
|
11736
12277
|
// src/routing/api/module-loader/loader.ts
|
|
12278
|
+
init_deno_env();
|
|
11737
12279
|
init_utils();
|
|
11738
12280
|
|
|
11739
12281
|
// src/routing/api/module-loader/esbuild-plugin.ts
|
|
12282
|
+
init_deno_env();
|
|
11740
12283
|
init_utils();
|
|
11741
12284
|
init_utils();
|
|
11742
12285
|
init_utils();
|
|
11743
12286
|
|
|
11744
12287
|
// src/routing/api/module-loader/http-validator.ts
|
|
12288
|
+
init_deno_env();
|
|
11745
12289
|
init_veryfront_error();
|
|
11746
12290
|
|
|
11747
12291
|
// src/routing/api/module-loader/security-config.ts
|
|
12292
|
+
init_deno_env();
|
|
11748
12293
|
init_utils();
|
|
11749
12294
|
init_utils();
|
|
11750
12295
|
|
|
@@ -11752,6 +12297,7 @@ init_utils();
|
|
|
11752
12297
|
init_veryfront_error();
|
|
11753
12298
|
|
|
11754
12299
|
// src/platform/compat/fs.ts
|
|
12300
|
+
init_deno_env();
|
|
11755
12301
|
init_veryfront_error();
|
|
11756
12302
|
init_runtime();
|
|
11757
12303
|
|
|
@@ -11759,23 +12305,36 @@ init_runtime();
|
|
|
11759
12305
|
init_runtime();
|
|
11760
12306
|
|
|
11761
12307
|
// src/routing/api/route-discovery.ts
|
|
12308
|
+
init_deno_env();
|
|
11762
12309
|
import { relative } from "node:path";
|
|
11763
12310
|
|
|
11764
12311
|
// src/core/utils/file-discovery.ts
|
|
12312
|
+
init_deno_env();
|
|
11765
12313
|
init_deno2();
|
|
11766
12314
|
import { join as join6 } from "node:path";
|
|
11767
12315
|
|
|
12316
|
+
// src/routing/api/route-executor.ts
|
|
12317
|
+
init_deno_env();
|
|
12318
|
+
|
|
12319
|
+
// src/routing/api/context-builder.ts
|
|
12320
|
+
init_deno_env();
|
|
12321
|
+
|
|
11768
12322
|
// src/routing/api/route-executor.ts
|
|
11769
12323
|
init_veryfront_error();
|
|
11770
12324
|
|
|
11771
12325
|
// src/routing/api/method-validator.ts
|
|
12326
|
+
init_deno_env();
|
|
11772
12327
|
init_utils();
|
|
11773
12328
|
|
|
11774
12329
|
// src/routing/api/error-handler.ts
|
|
12330
|
+
init_deno_env();
|
|
11775
12331
|
init_utils();
|
|
11776
12332
|
init_utils();
|
|
11777
12333
|
init_utils();
|
|
11778
12334
|
|
|
12335
|
+
// src/routing/api/responses.ts
|
|
12336
|
+
init_deno_env();
|
|
12337
|
+
|
|
11779
12338
|
// src/index.ts
|
|
11780
12339
|
init_config();
|
|
11781
12340
|
export {
|