@veryfront/ext-content-mdx 0.1.1190 → 0.1.1191
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/deno.d.ts +5 -0
- package/esm/deno.js +9 -4
- package/esm/src/errors/error-registry/module.d.ts +4 -0
- package/esm/src/errors/error-registry/module.d.ts.map +1 -1
- package/esm/src/errors/error-registry/module.js +16 -0
- package/esm/src/errors/error-registry.d.ts +2 -0
- package/esm/src/errors/error-registry.d.ts.map +1 -1
- package/esm/src/errors/types.d.ts.map +1 -1
- package/esm/src/errors/types.js +5 -2
- package/esm/src/platform/compat/error-introspection.d.ts +12 -1
- package/esm/src/platform/compat/error-introspection.d.ts.map +1 -1
- package/esm/src/platform/compat/error-introspection.js +40 -5
- package/esm/src/platform/compat/path/basic-operations.d.ts.map +1 -1
- package/esm/src/platform/compat/path/basic-operations.js +6 -2
- package/esm/src/platform/compat/path/portable.d.ts.map +1 -1
- package/esm/src/platform/compat/path/portable.js +98 -54
- package/esm/src/platform/compat/path/resolution.d.ts.map +1 -1
- package/esm/src/platform/compat/path/resolution.js +14 -5
- package/esm/src/platform/compat/primordials/array.d.ts +8 -0
- package/esm/src/platform/compat/primordials/array.d.ts.map +1 -0
- package/esm/src/platform/compat/primordials/array.js +33 -0
- package/esm/src/transforms/import-rewriter/url-builder.d.ts.map +1 -1
- package/esm/src/transforms/import-rewriter/url-builder.js +40 -14
- package/esm/src/utils/base64url.d.ts.map +1 -1
- package/esm/src/utils/base64url.js +10 -4
- package/esm/src/utils/bundle-manifest.d.ts +19 -1
- package/esm/src/utils/bundle-manifest.d.ts.map +1 -1
- package/esm/src/utils/bundle-manifest.js +124 -27
- package/esm/src/utils/constants/limits.d.ts +1 -1
- package/esm/src/utils/constants/limits.d.ts.map +1 -1
- package/esm/src/utils/constants/limits.js +1 -1
- package/esm/src/utils/hash-utils.d.ts.map +1 -1
- package/esm/src/utils/hash-utils.js +32 -6
- package/esm/src/utils/id.d.ts +16 -0
- package/esm/src/utils/id.d.ts.map +1 -0
- package/esm/src/utils/id.js +69 -0
- package/esm/src/utils/import-lockfile.d.ts +52 -1
- package/esm/src/utils/import-lockfile.d.ts.map +1 -1
- package/esm/src/utils/import-lockfile.js +1042 -58
- package/esm/src/utils/index.d.ts +1 -1
- package/esm/src/utils/index.d.ts.map +1 -1
- package/esm/src/utils/index.js +1 -1
- package/esm/src/utils/logger/logger.d.ts +1 -0
- package/esm/src/utils/logger/logger.d.ts.map +1 -1
- package/esm/src/utils/logger/logger.js +359 -78
- package/esm/src/utils/logger/redact.d.ts +4 -2
- package/esm/src/utils/logger/redact.d.ts.map +1 -1
- package/esm/src/utils/logger/redact.js +300 -112
- package/esm/src/utils/logger/serialization.d.ts +3 -0
- package/esm/src/utils/logger/serialization.d.ts.map +1 -0
- package/esm/src/utils/logger/serialization.js +81 -0
- package/esm/src/utils/memoize.d.ts +1 -1
- package/esm/src/utils/memoize.d.ts.map +1 -1
- package/esm/src/utils/memoize.js +16 -5
- package/esm/src/utils/path-utils.d.ts.map +1 -1
- package/esm/src/utils/path-utils.js +4 -2
- package/esm/src/utils/sleep.d.ts +8 -0
- package/esm/src/utils/sleep.d.ts.map +1 -1
- package/esm/src/utils/sleep.js +11 -2
- package/esm/src/utils/timer.d.ts +10 -0
- package/esm/src/utils/timer.d.ts.map +1 -0
- package/esm/src/utils/timer.js +19 -0
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +2 -2
package/esm/deno.d.ts
CHANGED
|
@@ -277,6 +277,8 @@ declare namespace _default {
|
|
|
277
277
|
"#veryfront/trigger/": string;
|
|
278
278
|
"#veryfront/server": string;
|
|
279
279
|
"#veryfront/server/project-env": string;
|
|
280
|
+
"#veryfront/extensions/dev-ui": string;
|
|
281
|
+
"#veryfront/extensions/dev-ui/protocol": string;
|
|
280
282
|
"#veryfront/extensions/websocket": string;
|
|
281
283
|
"#veryfront/testing": string;
|
|
282
284
|
"#veryfront/testing/assert": string;
|
|
@@ -373,6 +375,8 @@ declare namespace _default {
|
|
|
373
375
|
export let tasks: {
|
|
374
376
|
setup: string;
|
|
375
377
|
generate: string;
|
|
378
|
+
"generate:dev-ui": string;
|
|
379
|
+
"generate:dev-ui:check": string;
|
|
376
380
|
"generate:manifests:check": string;
|
|
377
381
|
start: string;
|
|
378
382
|
"start:headless": string;
|
|
@@ -381,6 +385,7 @@ declare namespace _default {
|
|
|
381
385
|
production: string;
|
|
382
386
|
"build:prepare": string;
|
|
383
387
|
build: string;
|
|
388
|
+
"build:proxy-lock": string;
|
|
384
389
|
"build:npm": string;
|
|
385
390
|
release: string;
|
|
386
391
|
test: string;
|
package/esm/deno.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
"name": "veryfront",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1191",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"nodeModulesDir": "auto",
|
|
6
6
|
"minimumDependencyAge": {
|
|
@@ -347,6 +347,8 @@ export default {
|
|
|
347
347
|
"#veryfront/trigger/": "./src/trigger/",
|
|
348
348
|
"#veryfront/server": "./src/server/index.ts",
|
|
349
349
|
"#veryfront/server/project-env": "./src/server/project-env/index.ts",
|
|
350
|
+
"#veryfront/extensions/dev-ui": "./src/extensions/dev-ui/index.ts",
|
|
351
|
+
"#veryfront/extensions/dev-ui/protocol": "./src/extensions/dev-ui/protocol.ts",
|
|
350
352
|
"#veryfront/extensions/websocket": "./src/extensions/websocket/index.ts",
|
|
351
353
|
"#veryfront/testing": "./src/testing/index.ts",
|
|
352
354
|
"#veryfront/testing/assert": "./src/testing/assert.ts",
|
|
@@ -448,8 +450,10 @@ export default {
|
|
|
448
450
|
},
|
|
449
451
|
"tasks": {
|
|
450
452
|
"setup": "deno run --allow-all scripts/setup.ts",
|
|
451
|
-
"generate": "deno run -A scripts/build/generate-templates-manifest.ts && deno
|
|
452
|
-
"generate:
|
|
453
|
+
"generate": "deno run -A scripts/build/generate-templates-manifest.ts && deno task generate:dev-ui && deno run -A scripts/build/prebundle-client-scripts.ts && deno run -A scripts/build/prebundle-bridge.ts && deno run -A scripts/build/prebundle-rsc-scripts.ts && deno run -A scripts/build/prebundle-hydration-runtime.ts",
|
|
454
|
+
"generate:dev-ui": "deno run -A extensions/ext-dev-ui-react/scripts/generate-styles.ts && deno run -A extensions/ext-dev-ui-react/scripts/prebundle.ts",
|
|
455
|
+
"generate:dev-ui:check": "deno run -A extensions/ext-dev-ui-react/scripts/generate-styles.ts --check && deno run -A extensions/ext-dev-ui-react/scripts/prebundle.ts --check",
|
|
456
|
+
"generate:manifests:check": "deno run -A scripts/build/generate-templates-manifest.ts --check && deno task generate:dev-ui:check && deno run -A scripts/build/prebundle-hydration-runtime.ts --check && deno run -A scripts/build/prebundle-client-scripts.ts --check",
|
|
453
457
|
"start": "deno task generate && deno run --allow-read --allow-write --allow-net --allow-env --allow-run --allow-sys --unstable-worker-options --unstable-net cli/main.ts",
|
|
454
458
|
"start:headless": "deno task generate && deno run --allow-read --allow-write --allow-net --allow-env --allow-run --allow-sys --unstable-worker-options --unstable-net cli/main.ts --headless",
|
|
455
459
|
"proxy": "deno task generate && deno run --allow-read --allow-write --allow-net --allow-env --allow-run --allow-sys --unstable-worker-options --unstable-net cli/main.ts serve --mode=proxy",
|
|
@@ -457,6 +461,7 @@ export default {
|
|
|
457
461
|
"production": "deno task generate && deno run --allow-read --allow-write --allow-net --allow-env --allow-run --allow-sys --unstable-worker-options --unstable-net cli/main.ts serve --mode=production",
|
|
458
462
|
"build:prepare": "deno run -A scripts/build/generate-integrations-module.ts && deno task generate && deno run -A scripts/build/prepare-framework-sources.ts",
|
|
459
463
|
"build": "deno task build:prepare && deno run -A scripts/build/compile-binary.ts --output ./bin/veryfront",
|
|
464
|
+
"build:proxy-lock": "deno cache --node-modules-dir=none --lock scripts/build/proxy-deno.lock cli/proxy-main.ts",
|
|
460
465
|
"build:npm": "deno run -A scripts/build/generate-integrations-module.ts && deno task generate && deno run --config=scripts/test.deno.json --frozen -A scripts/build/build-npm-dnt.ts",
|
|
461
466
|
"release": "deno run -A scripts/release.ts",
|
|
462
467
|
"test": "deno task generate && DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --preload=src/schemas/_test-setup.ts --no-check --parallel --allow-all '--ignore=tests/e2e,tests/integration/compiled-binary-e2e.test.ts' --unstable-worker-options --unstable-net",
|
|
@@ -519,7 +524,7 @@ export default {
|
|
|
519
524
|
"lint:ban-test-only": "deno run --allow-read scripts/lint/ban-test-only.ts",
|
|
520
525
|
"lint:sanitizer-baseline": "deno run --allow-read scripts/lint/check-sanitizer-baseline.ts",
|
|
521
526
|
"lint:skipped-tests": "deno run --allow-read scripts/lint/check-skipped-tests-baseline.ts",
|
|
522
|
-
"test:scripts": "deno test --config=scripts/test.deno.json --no-check --allow-read --allow-write --allow-run scripts/ci/publish-npm-packages.test.ts scripts/build/dnt-polyfill.test.ts scripts/build/generate-sbom.test.ts scripts/build/npm-dependency-sources.test.ts scripts/build/npm-extension-package-metadata.test.ts scripts/build/npm-package-metadata.test.ts scripts/build/npm-react-shims.test.ts scripts/build/prepare-framework-sources.test.ts scripts/docs/docs-coverage.test.ts scripts/docs/generate-api-reference.test.ts scripts/docs/guide-validation.test.ts scripts/lint/audit-core-deps.test.ts scripts/lint/audit-dependency-boundaries.test.ts scripts/lint/audit-extension-capabilities.test.ts scripts/lint/audit-extension-contracts.test.ts scripts/lint/audit-deps.test.ts scripts/lint/check-module-boundaries.test.ts scripts/lint/lint-config.test.ts scripts/lint/ban-test-only.test.ts scripts/lint/check-sanitizer-baseline.test.ts scripts/lint/check-skipped-tests-baseline.test.ts scripts/lint/check-test-typecheck-baseline.test.ts scripts/lint/check-coverage.test.ts scripts/security/audit-npm.test.ts scripts/security/submit-dependency-snapshot.test.ts && deno task test:tool-search-live",
|
|
527
|
+
"test:scripts": "deno test --config=scripts/test.deno.json --no-check --allow-read --allow-write --allow-run scripts/ci/publish-npm-packages.test.ts scripts/build/compile-binary.test.ts scripts/build/dnt-polyfill.test.ts scripts/build/generate-sbom.test.ts scripts/build/npm-dependency-sources.test.ts scripts/build/npm-extension-package-metadata.test.ts scripts/build/npm-package-metadata.test.ts scripts/build/npm-react-shims.test.ts scripts/build/prepare-framework-sources.test.ts scripts/docs/docs-coverage.test.ts scripts/docs/generate-api-reference.test.ts scripts/docs/guide-validation.test.ts scripts/lint/audit-core-deps.test.ts scripts/lint/audit-dependency-boundaries.test.ts scripts/lint/audit-extension-capabilities.test.ts scripts/lint/audit-extension-contracts.test.ts scripts/lint/audit-deps.test.ts scripts/lint/check-module-boundaries.test.ts scripts/lint/lint-config.test.ts scripts/lint/ban-test-only.test.ts scripts/lint/check-sanitizer-baseline.test.ts scripts/lint/check-skipped-tests-baseline.test.ts scripts/lint/check-test-typecheck-baseline.test.ts scripts/lint/check-coverage.test.ts scripts/security/audit-npm.test.ts scripts/security/submit-dependency-snapshot.test.ts && deno task test:tool-search-live",
|
|
523
528
|
"test:sentry-runtime-packages": "deno test --config=scripts/test.deno.json --no-check --no-lock --allow-read --allow-write --allow-run --allow-env=DENO_DIR,HOME,XDG_CACHE_HOME,LOCALAPPDATA,USERPROFILE scripts/build/sentry-runtime-packages.test.ts",
|
|
524
529
|
"test:tool-search-live": "VF_DISABLE_LRU_INTERVAL=1 deno test --no-check -A tests/agent/verify-tool-search-live.test.ts",
|
|
525
530
|
"test:cross-runtime": "deno run --allow-all src/platform/compat/cross-runtime.test.ts",
|
|
@@ -4,6 +4,8 @@ export declare const CIRCULAR_DEPENDENCY: import("../types.js").RegisteredError;
|
|
|
4
4
|
export declare const INVALID_IMPORT: import("../types.js").RegisteredError;
|
|
5
5
|
export declare const DEPENDENCY_MISSING: import("../types.js").RegisteredError;
|
|
6
6
|
export declare const VERSION_MISMATCH: import("../types.js").RegisteredError;
|
|
7
|
+
export declare const LOCKFILE_FORMAT_MISMATCH: import("../types.js").RegisteredError;
|
|
8
|
+
export declare const LOCKFILE_READ_ERROR: import("../types.js").RegisteredError;
|
|
7
9
|
/** Registry fragment for MODULE errors (slug → definition). */
|
|
8
10
|
export declare const MODULE_REGISTRY: {
|
|
9
11
|
readonly "module-not-found": import("../types.js").RegisteredError;
|
|
@@ -12,5 +14,7 @@ export declare const MODULE_REGISTRY: {
|
|
|
12
14
|
readonly "invalid-import": import("../types.js").RegisteredError;
|
|
13
15
|
readonly "dependency-missing": import("../types.js").RegisteredError;
|
|
14
16
|
readonly "version-mismatch": import("../types.js").RegisteredError;
|
|
17
|
+
readonly "lockfile-format-mismatch": import("../types.js").RegisteredError;
|
|
18
|
+
readonly "lockfile-read-error": import("../types.js").RegisteredError;
|
|
15
19
|
};
|
|
16
20
|
//# sourceMappingURL=module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../src/src/errors/error-registry/module.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,uCAM3B,CAAC;AAEH,eAAO,MAAM,uBAAuB,uCAMlC,CAAC;AAEH,eAAO,MAAM,mBAAmB,uCAM9B,CAAC;AAEH,eAAO,MAAM,cAAc,uCAMzB,CAAC;AAEH,eAAO,MAAM,kBAAkB,uCAM7B,CAAC;AAEH,eAAO,MAAM,gBAAgB,uCAM3B,CAAC;AAEH,+DAA+D;AAC/D,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../src/src/errors/error-registry/module.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,uCAM3B,CAAC;AAEH,eAAO,MAAM,uBAAuB,uCAMlC,CAAC;AAEH,eAAO,MAAM,mBAAmB,uCAM9B,CAAC;AAEH,eAAO,MAAM,cAAc,uCAMzB,CAAC;AAEH,eAAO,MAAM,kBAAkB,uCAM7B,CAAC;AAEH,eAAO,MAAM,gBAAgB,uCAM3B,CAAC;AAEH,eAAO,MAAM,wBAAwB,uCAMnC,CAAC;AAEH,eAAO,MAAM,mBAAmB,uCAM9B,CAAC;AAEH,+DAA+D;AAC/D,eAAO,MAAM,eAAe;;;;;;;;;CASlB,CAAC"}
|
|
@@ -41,6 +41,20 @@ export const VERSION_MISMATCH = defineError({
|
|
|
41
41
|
title: "Dependency version mismatch",
|
|
42
42
|
suggestion: "Update dependencies to compatible versions",
|
|
43
43
|
});
|
|
44
|
+
export const LOCKFILE_FORMAT_MISMATCH = defineError({
|
|
45
|
+
slug: "lockfile-format-mismatch",
|
|
46
|
+
category: "MODULE",
|
|
47
|
+
status: 409,
|
|
48
|
+
title: "Lockfile format is not supported",
|
|
49
|
+
suggestion: "Upgrade Veryfront or migrate the lockfile before modifying it",
|
|
50
|
+
});
|
|
51
|
+
export const LOCKFILE_READ_ERROR = defineError({
|
|
52
|
+
slug: "lockfile-read-error",
|
|
53
|
+
category: "MODULE",
|
|
54
|
+
status: 500,
|
|
55
|
+
title: "Lockfile could not be read safely",
|
|
56
|
+
suggestion: "Check file access or restore a valid lockfile before retrying",
|
|
57
|
+
});
|
|
44
58
|
/** Registry fragment for MODULE errors (slug → definition). */
|
|
45
59
|
export const MODULE_REGISTRY = {
|
|
46
60
|
"module-not-found": MODULE_NOT_FOUND,
|
|
@@ -49,4 +63,6 @@ export const MODULE_REGISTRY = {
|
|
|
49
63
|
"invalid-import": INVALID_IMPORT,
|
|
50
64
|
"dependency-missing": DEPENDENCY_MISSING,
|
|
51
65
|
"version-mismatch": VERSION_MISMATCH,
|
|
66
|
+
"lockfile-format-mismatch": LOCKFILE_FORMAT_MISMATCH,
|
|
67
|
+
"lockfile-read-error": LOCKFILE_READ_ERROR,
|
|
52
68
|
};
|
|
@@ -73,6 +73,8 @@ export declare const ERROR_REGISTRY: Readonly<{
|
|
|
73
73
|
readonly "invalid-import": import("./types.js").RegisteredError;
|
|
74
74
|
readonly "dependency-missing": import("./types.js").RegisteredError;
|
|
75
75
|
readonly "version-mismatch": import("./types.js").RegisteredError;
|
|
76
|
+
readonly "lockfile-format-mismatch": import("./types.js").RegisteredError;
|
|
77
|
+
readonly "lockfile-read-error": import("./types.js").RegisteredError;
|
|
76
78
|
} & {
|
|
77
79
|
readonly "port-in-use": import("./types.js").RegisteredError;
|
|
78
80
|
readonly "server-start-error": import("./types.js").RegisteredError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-registry.d.ts","sourceRoot":"","sources":["../../../src/src/errors/error-registry.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAgBhD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"error-registry.d.ts","sourceRoot":"","sources":["../../../src/src/errors/error-registry.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAgBhD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY1B,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,cAAc,CAAC;AAEpD;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,wCAE7C;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,aAAa,0CAE1D;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,SAAS,EAAE,CAEzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/src/errors/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/src/errors/types.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,MAAM,MAAM,aAAa,GACrB,QAAQ,GACR,OAAO,GACP,SAAS,GACT,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,UAAU,GACV,KAAK,GACL,QAAQ,GACR,OAAO,GACP,SAAS,CAAC;AAEd;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,aAAa,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,aAAa,CAAC;IACxB,MAAM,EAAE,MAAM,CA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GAAG,sBAAsB,GAAG,IAAI,CAGpF;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,cAAc,GACpB,sBAAsB,GAAG,IAAI,CAuD/B"}
|
package/esm/src/errors/types.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { buildErrorDocsUrl, sanitizeBoundedDiagnosticText } from "./diagnostic-policy.js";
|
|
2
|
+
const apply = Reflect.apply;
|
|
2
3
|
const freeze = Object.freeze;
|
|
3
4
|
const getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors;
|
|
4
5
|
const numberIsFinite = Number.isFinite;
|
|
5
6
|
const VERYFRONT_ERROR_INSTANCES = new WeakSet();
|
|
7
|
+
const weakSetAdd = WeakSet.prototype.add;
|
|
8
|
+
const weakSetHas = WeakSet.prototype.has;
|
|
6
9
|
const ERROR_CATEGORIES = new Set([
|
|
7
10
|
"CONFIG",
|
|
8
11
|
"BUILD",
|
|
@@ -63,7 +66,7 @@ export class VeryfrontError extends Error {
|
|
|
63
66
|
context;
|
|
64
67
|
constructor(message, options) {
|
|
65
68
|
super(message);
|
|
66
|
-
VERYFRONT_ERROR_INSTANCES
|
|
69
|
+
apply(weakSetAdd, VERYFRONT_ERROR_INSTANCES, [this]);
|
|
67
70
|
this.name = "VeryfrontError";
|
|
68
71
|
this.slug = options.slug;
|
|
69
72
|
this.category = options.category;
|
|
@@ -120,7 +123,7 @@ export class VeryfrontError extends Error {
|
|
|
120
123
|
export function isVeryfrontErrorInstance(error) {
|
|
121
124
|
return typeof error === "object" &&
|
|
122
125
|
error !== null &&
|
|
123
|
-
VERYFRONT_ERROR_INSTANCES
|
|
126
|
+
apply(weakSetHas, VERYFRONT_ERROR_INSTANCES, [error]) === true;
|
|
124
127
|
}
|
|
125
128
|
/**
|
|
126
129
|
* Read a VeryfrontError once into plain data.
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether this runtime can distinguish Proxy values without evaluating a trap.
|
|
3
|
+
* Callers that need a fail-closed guarantee must not treat a `false` result
|
|
4
|
+
* from {@link isProxyWithoutHooks} as proof when this capability is absent.
|
|
5
|
+
*/
|
|
6
|
+
export declare const canIdentifyProxyWithoutHooks: boolean;
|
|
1
7
|
/** True when own stack descriptors can be inspected without formatting them. */
|
|
2
8
|
export declare const canInspectErrorStackDescriptorWithoutHooks: boolean;
|
|
3
9
|
/**
|
|
@@ -22,7 +28,12 @@ export declare function isNativeErrorWithoutHooks(value: unknown): value is Erro
|
|
|
22
28
|
* prototype name or constructor name; unreadable/exotic shapes fail closed.
|
|
23
29
|
*/
|
|
24
30
|
export declare function readNativeErrorNameWithoutHooks(error: Error): string;
|
|
25
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* Identify a Proxy without evaluating any trap on the proxied value.
|
|
33
|
+
*
|
|
34
|
+
* Returns `false` without inspecting `value` when
|
|
35
|
+
* {@link canIdentifyProxyWithoutHooks} is false.
|
|
36
|
+
*/
|
|
26
37
|
export declare function isProxyWithoutHooks(value: unknown): boolean;
|
|
27
38
|
/** Identify a genuine Uint8Array without evaluating project-owned hooks. */
|
|
28
39
|
export declare function isUint8ArrayWithoutHooks(value: unknown): value is Uint8Array;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-introspection.d.ts","sourceRoot":"","sources":["../../../../src/src/platform/compat/error-introspection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"error-introspection.d.ts","sourceRoot":"","sources":["../../../../src/src/platform/compat/error-introspection.ts"],"names":[],"mappings":"AA0DA;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,SAAkC,CAAC;AA8F5E,gFAAgF;AAChF,eAAO,MAAM,0CAA0C,SAA0C,CAAC;AAgClG;;;;;;;;;;GAUG;AACH,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,CAuBjF;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,KAAK,CAExE;AA6BD;;;;GAIG;AACH,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAkBpE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE3D;AAED,4EAA4E;AAC5E,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAE5E;AAED,gFAAgF;AAChF,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,OAAO,CAAC,OAAO,CAAC,CAE3B;AAED;;;;GAIG;AACH,wBAAgB,iCAAiC,CAC/C,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAgBnD"}
|
|
@@ -16,15 +16,45 @@ const apply = Reflect.apply;
|
|
|
16
16
|
const NativeError = Error;
|
|
17
17
|
const NativeAsyncFunctionPrototype = getPrototypeOf(async function () { });
|
|
18
18
|
const toStringTagSymbol = Symbol.toStringTag;
|
|
19
|
+
function hasOwn(object, key) {
|
|
20
|
+
return apply(objectHasOwnProperty, object, [key]);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Capture the portable Error brand primitive during trusted framework
|
|
24
|
+
* bootstrap, before tenant code can replace mutable globals. Edge runtimes do
|
|
25
|
+
* not expose an immutable host-module equivalent, so this capture boundary is
|
|
26
|
+
* the authority for later no-hook Error checks.
|
|
27
|
+
*/
|
|
28
|
+
function captureErrorIsError() {
|
|
29
|
+
const descriptor = getOwnPropertyDescriptor(NativeError, "isError");
|
|
30
|
+
return descriptor && hasOwn(descriptor, "value") &&
|
|
31
|
+
typeof descriptor.value === "function"
|
|
32
|
+
? descriptor.value
|
|
33
|
+
: undefined;
|
|
34
|
+
}
|
|
35
|
+
const capturedErrorIsError = captureErrorIsError();
|
|
19
36
|
const unavailableBrandCheck = (_value) => false;
|
|
37
|
+
function portableErrorBrandCheck(value) {
|
|
38
|
+
if (!capturedErrorIsError)
|
|
39
|
+
return false;
|
|
40
|
+
try {
|
|
41
|
+
return apply(capturedErrorIsError, NativeError, [value]) === true;
|
|
42
|
+
}
|
|
43
|
+
catch (_) {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
20
47
|
const nativeAsyncFunctionBrandCheck = nativeBrandChecks?.isAsyncFunction ?? unavailableBrandCheck;
|
|
21
|
-
const nativeErrorBrandCheck = nativeBrandChecks?.isNativeError ??
|
|
48
|
+
const nativeErrorBrandCheck = nativeBrandChecks?.isNativeError ?? portableErrorBrandCheck;
|
|
22
49
|
const nativePromiseBrandCheck = nativeBrandChecks?.isPromise ?? unavailableBrandCheck;
|
|
23
50
|
const nativeProxyBrandCheck = nativeBrandChecks?.isProxy ?? unavailableBrandCheck;
|
|
24
51
|
const nativeUint8ArrayBrandCheck = nativeBrandChecks?.isUint8Array ?? unavailableBrandCheck;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Whether this runtime can distinguish Proxy values without evaluating a trap.
|
|
54
|
+
* Callers that need a fail-closed guarantee must not treat a `false` result
|
|
55
|
+
* from {@link isProxyWithoutHooks} as proof when this capability is absent.
|
|
56
|
+
*/
|
|
57
|
+
export const canIdentifyProxyWithoutHooks = nativeBrandChecks !== undefined;
|
|
28
58
|
function createDataDescriptor(value) {
|
|
29
59
|
const descriptor = createObject(null);
|
|
30
60
|
descriptor.configurable = true;
|
|
@@ -219,7 +249,12 @@ export function readNativeErrorNameWithoutHooks(error) {
|
|
|
219
249
|
return "Error";
|
|
220
250
|
}
|
|
221
251
|
}
|
|
222
|
-
/**
|
|
252
|
+
/**
|
|
253
|
+
* Identify a Proxy without evaluating any trap on the proxied value.
|
|
254
|
+
*
|
|
255
|
+
* Returns `false` without inspecting `value` when
|
|
256
|
+
* {@link canIdentifyProxyWithoutHooks} is false.
|
|
257
|
+
*/
|
|
223
258
|
export function isProxyWithoutHooks(value) {
|
|
224
259
|
return nativeProxyBrandCheck(value);
|
|
225
260
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basic-operations.d.ts","sourceRoot":"","sources":["../../../../../src/src/platform/compat/path/basic-operations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"basic-operations.d.ts","sourceRoot":"","sources":["../../../../../src/src/platform/compat/path/basic-operations.ts"],"names":[],"mappings":"AAqBA,yEAAyE;AACzE,wBAAgB,IAAI,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAU/C;AAED,wCAAwC;AACxC,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAI5C;AAED,oCAAoC;AACpC,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAK3D;AAED,4CAA4C;AAC5C,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAI5C"}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { hasWindowsLikePath, portableBasename, portableDirname, portableExtname, portableJoin, removeTrailingSeparatorsExceptRoot, runtimeUsesWindowsPaths, toPortableSeparators, } from "./portable.js";
|
|
2
2
|
import { getNativePathImplementation } from "./runtime.js";
|
|
3
|
+
const ArrayPrototypeEvery = Array.prototype.every;
|
|
4
|
+
const ArrayPrototypeSome = Array.prototype.some;
|
|
5
|
+
const ReflectApply = Reflect.apply;
|
|
3
6
|
function usesWindowsFlavor(paths) {
|
|
4
|
-
return runtimeUsesWindowsPaths() ||
|
|
7
|
+
return runtimeUsesWindowsPaths() ||
|
|
8
|
+
ReflectApply(ArrayPrototypeSome, paths, [hasWindowsLikePath]);
|
|
5
9
|
}
|
|
6
10
|
/** Join and normalize path segments using their detected path flavor. */
|
|
7
11
|
export function join(...paths) {
|
|
8
|
-
if (paths
|
|
12
|
+
if (ReflectApply(ArrayPrototypeEvery, paths, [(path) => path.length === 0]))
|
|
9
13
|
return "/";
|
|
10
14
|
const windows = usesWindowsFlavor(paths);
|
|
11
15
|
const pathApi = getNativePathImplementation(windows);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"portable.d.ts","sourceRoot":"","sources":["../../../../../src/src/platform/compat/path/portable.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"portable.d.ts","sourceRoot":"","sources":["../../../../../src/src/platform/compat/path/portable.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAoD7C,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAExD;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzD;AA2FD,wBAAgB,kCAAkC,CAChD,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,OAAO,GACf,MAAM,CAUR;AAOD,wBAAgB,uBAAuB,IAAI,OAAO,CASjD;AAyBD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,CAkBxE;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,CAI/E;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,CAqBtE;AAED,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,OAAO,EAAE,OAAO,GACf,MAAM,CAuCR;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,CAKtE;AAED,wBAAg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