@veryfront/ext-content-mdx 0.1.1188 → 0.1.1190
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/deno.js +6 -3
- package/esm/src/errors/error-registry/agent.d.ts +2 -0
- package/esm/src/errors/error-registry/agent.d.ts.map +1 -1
- package/esm/src/errors/error-registry/agent.js +8 -0
- package/esm/src/errors/error-registry/server.d.ts +6 -0
- package/esm/src/errors/error-registry/server.d.ts.map +1 -1
- package/esm/src/errors/error-registry/server.js +18 -0
- package/esm/src/errors/error-registry.d.ts +3 -0
- package/esm/src/errors/error-registry.d.ts.map +1 -1
- package/esm/src/extensions/websocket/node-websocket-server-provider.d.ts +4 -4
- package/esm/src/extensions/websocket/node-websocket-server-provider.d.ts.map +1 -1
- package/esm/src/extensions/websocket/node-websocket-server-provider.js +4 -4
- package/esm/src/platform/adapters/file-snapshot-error.d.ts +7 -0
- package/esm/src/platform/adapters/file-snapshot-error.d.ts.map +1 -1
- package/esm/src/platform/adapters/file-snapshot-error.js +13 -0
- package/esm/src/platform/adapters/path-containment.d.ts +9 -0
- package/esm/src/platform/adapters/path-containment.d.ts.map +1 -0
- package/esm/src/platform/adapters/path-containment.js +13 -0
- package/esm/src/platform/adapters/runtime/shared/native-snapshot-identity.d.ts +13 -0
- package/esm/src/platform/adapters/runtime/shared/native-snapshot-identity.d.ts.map +1 -0
- package/esm/src/platform/adapters/runtime/shared/native-snapshot-identity.js +12 -0
- package/esm/src/platform/adapters/runtime/shared/node-filesystem-adapter.d.ts +7 -0
- package/esm/src/platform/adapters/runtime/shared/node-filesystem-adapter.d.ts.map +1 -1
- package/esm/src/platform/adapters/runtime/shared/node-filesystem-adapter.js +62 -18
- package/esm/src/utils/constants/limits.d.ts +2 -0
- package/esm/src/utils/constants/limits.d.ts.map +1 -1
- package/esm/src/utils/constants/limits.js +2 -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.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
"name": "veryfront",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1190",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"nodeModulesDir": "auto",
|
|
6
6
|
"minimumDependencyAge": {
|
|
@@ -478,7 +478,7 @@ export default {
|
|
|
478
478
|
"storybook": "npm --prefix storybook run storybook",
|
|
479
479
|
"build:storybook": "npm --prefix storybook run build-storybook",
|
|
480
480
|
"storybook:check": "deno test --no-lock --config=scripts/test.deno.json --no-check --allow-read scripts/storybook/storybook-workbench.test.ts",
|
|
481
|
-
"lint": "DENO_NO_PACKAGE_JSON=1 deno lint
|
|
481
|
+
"lint": "DENO_NO_PACKAGE_JSON=1 deno lint && deno lint --config=scripts/test.deno.json scripts/test/ scripts/build/dnt-polyfill.ts scripts/build/dnt-polyfill.test.ts scripts/build/npm-package-metadata.test.ts scripts/build/prepare-framework-sources.test.ts && deno lint --config=scripts/codemods/deno.json scripts/codemods/",
|
|
482
482
|
"fmt": "deno fmt src/ cli/ react/ && deno fmt --config=scripts/test.deno.json scripts/test/ scripts/build/dnt-polyfill.ts scripts/build/dnt-polyfill.test.ts scripts/build/prepare-framework-sources.test.ts && deno fmt --config=scripts/codemods/deno.json scripts/codemods/",
|
|
483
483
|
"fmt:check": "deno fmt --check src/ cli/ react/ && deno fmt --check --config=scripts/test.deno.json scripts/test/ scripts/build/dnt-polyfill.ts scripts/build/dnt-polyfill.test.ts scripts/build/prepare-framework-sources.test.ts && deno fmt --check --config=scripts/codemods/deno.json scripts/codemods/",
|
|
484
484
|
"typecheck": "deno task generate:manifests:check && deno check src/index.ts cli/main.ts src/server/index.ts src/routing/api/index.ts src/rendering/index.ts src/platform/index.ts src/platform/adapters/index.ts src/build/index.ts src/build/production-build/index.ts src/transforms/index.ts src/config/index.ts src/utils/index.ts src/data/index.ts src/security/index.ts src/middleware/index.ts src/server/handlers/dev/index.ts src/server/handlers/request/api/index.ts src/rendering/cache/index.ts src/rendering/cache/stores/index.ts src/rendering/rsc/actions/index.ts src/html/index.ts src/html/hydration-script-builder/runtime/main.ts src/modules/index.ts src/proxy/main.ts src/react/components/ui/index.ts src/chat/index.ts src/markdown/index.ts src/mdx/index.ts src/fs/index.ts src/oauth/index.ts src/agent/index.ts src/agent/service/route-export.check.ts src/eval/index.ts src/tool/index.ts src/workflow/index.ts src/prompt/index.ts src/resource/index.ts src/runs/index.ts src/mcp/index.ts src/provider/index.ts",
|
|
@@ -519,7 +519,7 @@ export default {
|
|
|
519
519
|
"lint:ban-test-only": "deno run --allow-read scripts/lint/ban-test-only.ts",
|
|
520
520
|
"lint:sanitizer-baseline": "deno run --allow-read scripts/lint/check-sanitizer-baseline.ts",
|
|
521
521
|
"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/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",
|
|
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",
|
|
523
523
|
"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
524
|
"test:tool-search-live": "VF_DISABLE_LRU_INTERVAL=1 deno test --no-check -A tests/agent/verify-tool-search-live.test.ts",
|
|
525
525
|
"test:cross-runtime": "deno run --allow-all src/platform/compat/cross-runtime.test.ts",
|
|
@@ -546,8 +546,11 @@ export default {
|
|
|
546
546
|
"include": [
|
|
547
547
|
"src/**/*.ts",
|
|
548
548
|
"src/**/*.tsx",
|
|
549
|
+
"src/**/*.js",
|
|
549
550
|
"cli/**/*.ts",
|
|
550
551
|
"cli/**/*.tsx",
|
|
552
|
+
"extensions/**/*.ts",
|
|
553
|
+
"extensions/**/*.tsx",
|
|
551
554
|
"react/**/*.ts",
|
|
552
555
|
"react/**/*.tsx"
|
|
553
556
|
],
|
|
@@ -5,6 +5,7 @@ export declare const AGENT_INTENT_ERROR: import("../types.js").RegisteredError;
|
|
|
5
5
|
export declare const ORCHESTRATION_ERROR: import("../types.js").RegisteredError;
|
|
6
6
|
export declare const COST_LIMIT_EXCEEDED: import("../types.js").RegisteredError;
|
|
7
7
|
export declare const TOOL_ID_CONFLICT: import("../types.js").RegisteredError;
|
|
8
|
+
export declare const DURABLE_RUN_EVENT_PERSISTENCE_FAILED: import("../types.js").RegisteredError;
|
|
8
9
|
/** Registry fragment for AGENT errors (slug → definition). */
|
|
9
10
|
export declare const AGENT_REGISTRY: {
|
|
10
11
|
readonly "agent-error": import("../types.js").RegisteredError;
|
|
@@ -14,5 +15,6 @@ export declare const AGENT_REGISTRY: {
|
|
|
14
15
|
readonly "orchestration-error": import("../types.js").RegisteredError;
|
|
15
16
|
readonly "cost-limit-exceeded": import("../types.js").RegisteredError;
|
|
16
17
|
readonly "tool-id-conflict": import("../types.js").RegisteredError;
|
|
18
|
+
readonly "durable-run-event-persistence-failed": import("../types.js").RegisteredError;
|
|
17
19
|
};
|
|
18
20
|
//# sourceMappingURL=agent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../../src/src/errors/error-registry/agent.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,uCAMtB,CAAC;AAEH,eAAO,MAAM,eAAe,uCAM1B,CAAC;AAEH,eAAO,MAAM,aAAa,uCAMxB,CAAC;AAEH,eAAO,MAAM,kBAAkB,uCAM7B,CAAC;AAEH,eAAO,MAAM,mBAAmB,uCAM9B,CAAC;AAEH,eAAO,MAAM,mBAAmB,uCAM9B,CAAC;AAEH,eAAO,MAAM,gBAAgB,uCAM3B,CAAC;AAEH,8DAA8D;AAC9D,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../../src/src/errors/error-registry/agent.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,uCAMtB,CAAC;AAEH,eAAO,MAAM,eAAe,uCAM1B,CAAC;AAEH,eAAO,MAAM,aAAa,uCAMxB,CAAC;AAEH,eAAO,MAAM,kBAAkB,uCAM7B,CAAC;AAEH,eAAO,MAAM,mBAAmB,uCAM9B,CAAC;AAEH,eAAO,MAAM,mBAAmB,uCAM9B,CAAC;AAEH,eAAO,MAAM,gBAAgB,uCAM3B,CAAC;AAEH,eAAO,MAAM,oCAAoC,uCAO/C,CAAC;AAEH,8DAA8D;AAC9D,eAAO,MAAM,cAAc;;;;;;;;;CASjB,CAAC"}
|
|
@@ -48,6 +48,13 @@ export const TOOL_ID_CONFLICT = defineError({
|
|
|
48
48
|
title: "Tool ID conflict",
|
|
49
49
|
suggestion: "Use a unique tool ID or rename one of the conflicting tools",
|
|
50
50
|
});
|
|
51
|
+
export const DURABLE_RUN_EVENT_PERSISTENCE_FAILED = defineError({
|
|
52
|
+
slug: "durable-run-event-persistence-failed",
|
|
53
|
+
category: "AGENT",
|
|
54
|
+
status: 500,
|
|
55
|
+
title: "Durable run event persistence failed",
|
|
56
|
+
suggestion: "Correct invalid or oversized event data, or retry after durable event storage recovers",
|
|
57
|
+
});
|
|
51
58
|
/** Registry fragment for AGENT errors (slug → definition). */
|
|
52
59
|
export const AGENT_REGISTRY = {
|
|
53
60
|
"agent-error": AGENT_ERROR,
|
|
@@ -57,4 +64,5 @@ export const AGENT_REGISTRY = {
|
|
|
57
64
|
"orchestration-error": ORCHESTRATION_ERROR,
|
|
58
65
|
"cost-limit-exceeded": COST_LIMIT_EXCEEDED,
|
|
59
66
|
"tool-id-conflict": TOOL_ID_CONFLICT,
|
|
67
|
+
"durable-run-event-persistence-failed": DURABLE_RUN_EVENT_PERSISTENCE_FAILED,
|
|
60
68
|
};
|
|
@@ -19,6 +19,10 @@ export declare const CACHE_INVARIANT_VIOLATION: import("../types.js").Registered
|
|
|
19
19
|
export declare const RELEASE_NOT_FOUND: import("../types.js").RegisteredError;
|
|
20
20
|
/** Both primary and fallback operations failed (replaces FallbackExecutionError) */
|
|
21
21
|
export declare const FALLBACK_EXHAUSTED: import("../types.js").RegisteredError;
|
|
22
|
+
/** Persisted RAG index is malformed or failed structural validation. */
|
|
23
|
+
export declare const RAG_STORE_CORRUPT: import("../types.js").RegisteredError;
|
|
24
|
+
/** A persisted RAG index operation could not be completed safely. */
|
|
25
|
+
export declare const RAG_STORE_UNAVAILABLE: import("../types.js").RegisteredError;
|
|
22
26
|
/** Registry fragment for SERVER errors (slug → definition). */
|
|
23
27
|
export declare const SERVER_REGISTRY: {
|
|
24
28
|
readonly "port-in-use": import("../types.js").RegisteredError;
|
|
@@ -37,5 +41,7 @@ export declare const SERVER_REGISTRY: {
|
|
|
37
41
|
readonly "cache-invariant-violation": import("../types.js").RegisteredError;
|
|
38
42
|
readonly "release-not-found": import("../types.js").RegisteredError;
|
|
39
43
|
readonly "fallback-exhausted": import("../types.js").RegisteredError;
|
|
44
|
+
readonly "rag-store-corrupt": import("../types.js").RegisteredError;
|
|
45
|
+
readonly "rag-store-unavailable": import("../types.js").RegisteredError;
|
|
40
46
|
};
|
|
41
47
|
//# sourceMappingURL=server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../src/src/errors/error-registry/server.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,uCAMtB,CAAC;AAEH,eAAO,MAAM,kBAAkB,uCAM7B,CAAC;AAEH,eAAO,MAAM,WAAW,uCAMtB,CAAC;AAEH,eAAO,MAAM,gBAAgB,uCAM3B,CAAC;AAEH,eAAO,MAAM,aAAa,uCAMxB,CAAC;AAEH,eAAO,MAAM,kBAAkB,uCAM7B,CAAC;AAEH,eAAO,MAAM,6BAA6B,uCAMxC,CAAC;AAEH,eAAO,MAAM,iBAAiB,uCAM5B,CAAC;AAEH,eAAO,MAAM,oBAAo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E;AACxE,eAAO,MAAM,iBAAiB,uCAM5B,CAAC;AAEH,qEAAqE;AACrE,eAAO,MAAM,qBAAqB,uCAMhC,CAAC;AAEH,+DAA+D;AAC/D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;CAmBlB,CAAC"}
|
|
@@ -116,6 +116,22 @@ export const FALLBACK_EXHAUSTED = defineError({
|
|
|
116
116
|
title: "Primary and fallback operations both failed",
|
|
117
117
|
suggestion: "Check service availability and connectivity",
|
|
118
118
|
});
|
|
119
|
+
/** Persisted RAG index is malformed or failed structural validation. */
|
|
120
|
+
export const RAG_STORE_CORRUPT = defineError({
|
|
121
|
+
slug: "rag-store-corrupt",
|
|
122
|
+
category: "SERVER",
|
|
123
|
+
status: 500,
|
|
124
|
+
title: "RAG store file is corrupt",
|
|
125
|
+
suggestion: "Repair or move the store file aside, then retry; it was not overwritten",
|
|
126
|
+
});
|
|
127
|
+
/** A persisted RAG index operation could not be completed safely. */
|
|
128
|
+
export const RAG_STORE_UNAVAILABLE = defineError({
|
|
129
|
+
slug: "rag-store-unavailable",
|
|
130
|
+
category: "SERVER",
|
|
131
|
+
status: 500,
|
|
132
|
+
title: "RAG store file is unavailable",
|
|
133
|
+
suggestion: "Check storage availability, permissions, and concurrent operations, then retry",
|
|
134
|
+
});
|
|
119
135
|
/** Registry fragment for SERVER errors (slug → definition). */
|
|
120
136
|
export const SERVER_REGISTRY = {
|
|
121
137
|
"port-in-use": PORT_IN_USE,
|
|
@@ -134,4 +150,6 @@ export const SERVER_REGISTRY = {
|
|
|
134
150
|
"cache-invariant-violation": CACHE_INVARIANT_VIOLATION,
|
|
135
151
|
"release-not-found": RELEASE_NOT_FOUND,
|
|
136
152
|
"fallback-exhausted": FALLBACK_EXHAUSTED,
|
|
153
|
+
"rag-store-corrupt": RAG_STORE_CORRUPT,
|
|
154
|
+
"rag-store-unavailable": RAG_STORE_UNAVAILABLE,
|
|
137
155
|
};
|
|
@@ -90,6 +90,8 @@ export declare const ERROR_REGISTRY: Readonly<{
|
|
|
90
90
|
readonly "cache-invariant-violation": import("./types.js").RegisteredError;
|
|
91
91
|
readonly "release-not-found": import("./types.js").RegisteredError;
|
|
92
92
|
readonly "fallback-exhausted": import("./types.js").RegisteredError;
|
|
93
|
+
readonly "rag-store-corrupt": import("./types.js").RegisteredError;
|
|
94
|
+
readonly "rag-store-unavailable": import("./types.js").RegisteredError;
|
|
93
95
|
} & {
|
|
94
96
|
readonly "client-boundary-violation": import("./types.js").RegisteredError;
|
|
95
97
|
readonly "server-only-in-client": import("./types.js").RegisteredError;
|
|
@@ -125,6 +127,7 @@ export declare const ERROR_REGISTRY: Readonly<{
|
|
|
125
127
|
readonly "orchestration-error": import("./types.js").RegisteredError;
|
|
126
128
|
readonly "cost-limit-exceeded": import("./types.js").RegisteredError;
|
|
127
129
|
readonly "tool-id-conflict": import("./types.js").RegisteredError;
|
|
130
|
+
readonly "durable-run-event-persistence-failed": import("./types.js").RegisteredError;
|
|
128
131
|
}>;
|
|
129
132
|
export type ErrorSlug = keyof typeof ERROR_REGISTRY;
|
|
130
133
|
/**
|
|
@@ -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,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Dependency-free contract for Node.js WebSocket server implementations.
|
|
3
3
|
*
|
|
4
|
-
* Core owns HTTP upgrade authorization and lifecycle. An
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Core owns HTTP upgrade authorization and lifecycle. An extension owns the
|
|
5
|
+
* protocol implementation used to complete an authorized upgrade on an
|
|
6
|
+
* existing Node socket.
|
|
7
7
|
*/
|
|
8
8
|
export declare const NodeWebSocketServerProviderName = "NodeWebSocketServerProvider";
|
|
9
9
|
export declare const NODE_WEBSOCKET_SERVER_PROVIDER_PACKAGE = "@veryfront/ext-node-websocket-ws";
|
|
10
|
-
export declare const NODE_WEBSOCKET_SERVER_PROVIDER_MISSING_MESSAGE = "Node.js WebSocket upgrades require
|
|
10
|
+
export declare const NODE_WEBSOCKET_SERVER_PROVIDER_MISSING_MESSAGE = "Node.js WebSocket upgrades require @veryfront/ext-node-websocket-ws; install it or remove the extension disable directive.";
|
|
11
11
|
export type NodeWebSocketMessageData = ArrayBuffer | ArrayBufferView | readonly ArrayBufferView[];
|
|
12
12
|
/** Minimal connection surface consumed by core's runtime-neutral adapter. */
|
|
13
13
|
export interface NodeWebSocketConnection extends EventTarget {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-websocket-server-provider.d.ts","sourceRoot":"","sources":["../../../../src/src/extensions/websocket/node-websocket-server-provider.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,eAAO,MAAM,+BAA+B,gCAAgC,CAAC;AAC7E,eAAO,MAAM,sCAAsC,qCAAqC,CAAC;AACzF,eAAO,MAAM,8CAA8C,
|
|
1
|
+
{"version":3,"file":"node-websocket-server-provider.d.ts","sourceRoot":"","sources":["../../../../src/src/extensions/websocket/node-websocket-server-provider.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,eAAO,MAAM,+BAA+B,gCAAgC,CAAC;AAC7E,eAAO,MAAM,sCAAsC,qCAAqC,CAAC;AACzF,eAAO,MAAM,8CAA8C,+HAC4E,CAAC;AAIxI,MAAM,MAAM,wBAAwB,GAChC,WAAW,GACX,eAAe,GACf,SAAS,eAAe,EAAE,CAAC;AAE/B,6EAA6E;AAC7E,MAAM,WAAW,uBAAwB,SAAQ,WAAW;IAC1D,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;IAC9C,EAAE,CACA,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,CAAC,IAAI,EAAE,wBAAwB,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI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,MAAM,EAAE,MAAM,EAAE,uBAAuB,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;CAC9E;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,YAAY,EAAE,CACrB,OAAO,EAAE,0BAA0B,KAChC,mBAAmB,CAAC;CAC1B;AAmED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,OAAO,GACb,QAAQ,CAAC,mBAAmB,CAAC,CAgC/B;AASD;;;GAGG;AACH,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,OAAO,GACb,QAAQ,CAAC,2BAA2B,CAAC,CAqCvC;AAED,wEAAwE;AACxE,wBAAgB,iCAAiC,CAC/C,YAAY,EAAE,CACZ,OAAO,EAAE,0BAA0B,KAChC,mBAAmB,GACvB,QAAQ,CAAC,2BAA2B,CAAC,CAEvC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Dependency-free contract for Node.js WebSocket server implementations.
|
|
3
3
|
*
|
|
4
|
-
* Core owns HTTP upgrade authorization and lifecycle. An
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Core owns HTTP upgrade authorization and lifecycle. An extension owns the
|
|
5
|
+
* protocol implementation used to complete an authorized upgrade on an
|
|
6
|
+
* existing Node socket.
|
|
7
7
|
*/
|
|
8
8
|
import { types as nodeUtilTypes } from "node:util";
|
|
9
9
|
export const NodeWebSocketServerProviderName = "NodeWebSocketServerProvider";
|
|
10
10
|
export const NODE_WEBSOCKET_SERVER_PROVIDER_PACKAGE = "@veryfront/ext-node-websocket-ws";
|
|
11
|
-
export const NODE_WEBSOCKET_SERVER_PROVIDER_MISSING_MESSAGE = `Node.js WebSocket upgrades require
|
|
11
|
+
export const NODE_WEBSOCKET_SERVER_PROVIDER_MISSING_MESSAGE = `Node.js WebSocket upgrades require ${NODE_WEBSOCKET_SERVER_PROVIDER_PACKAGE}; install it or remove the extension disable directive.`;
|
|
12
12
|
const isProxy = nodeUtilTypes.isProxy;
|
|
13
13
|
function serverInspectionError(cause) {
|
|
14
14
|
return new TypeError("Node WebSocket server must expose data-function on, close, handleUpgrade, and emit methods", cause === undefined ? undefined : { cause });
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/** Error raised when a requested snapshot path is not an admissible regular file. */
|
|
2
|
+
export declare class FileSnapshotPathError extends TypeError {
|
|
3
|
+
readonly name = "FileSnapshotPathError";
|
|
4
|
+
constructor(message: string);
|
|
5
|
+
}
|
|
6
|
+
/** Return whether a value is a framework-created snapshot path rejection. */
|
|
7
|
+
export declare function isFileSnapshotPathError(value: unknown): value is FileSnapshotPathError;
|
|
1
8
|
/** Error raised when a file changes while a stable snapshot is being read. */
|
|
2
9
|
export declare class FileSnapshotChangedError extends Error {
|
|
3
10
|
readonly name = "FileSnapshotChangedError";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-snapshot-error.d.ts","sourceRoot":"","sources":["../../../../src/src/platform/adapters/file-snapshot-error.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"file-snapshot-error.d.ts","sourceRoot":"","sources":["../../../../src/src/platform/adapters/file-snapshot-error.ts"],"names":[],"mappings":"AAGA,qFAAqF;AACrF,qBAAa,qBAAsB,SAAQ,SAAS;IAClD,SAAkB,IAAI,2BAA2B;gBAErC,OAAO,EAAE,MAAM;CAI5B;AAED,6EAA6E;AAC7E,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,qBAAqB,CAEhC;AAED,8EAA8E;AAC9E,qBAAa,wBAAyB,SAAQ,KAAK;IACjD,SAAkB,IAAI,8BAA8B;gBAExC,OAAO,SAA0C;CAI9D;AAED,gFAAgF;AAChF,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,wBAAwB,CAEnC"}
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
const changedErrors = new WeakSet();
|
|
2
|
+
const rejectedPathErrors = new WeakSet();
|
|
3
|
+
/** Error raised when a requested snapshot path is not an admissible regular file. */
|
|
4
|
+
export class FileSnapshotPathError extends TypeError {
|
|
5
|
+
name = "FileSnapshotPathError";
|
|
6
|
+
constructor(message) {
|
|
7
|
+
super(message);
|
|
8
|
+
rejectedPathErrors.add(this);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
/** Return whether a value is a framework-created snapshot path rejection. */
|
|
12
|
+
export function isFileSnapshotPathError(value) {
|
|
13
|
+
return typeof value === "object" && value !== null && rejectedPathErrors.has(value);
|
|
14
|
+
}
|
|
2
15
|
/** Error raised when a file changes while a stable snapshot is being read. */
|
|
3
16
|
export class FileSnapshotChangedError extends Error {
|
|
4
17
|
name = "FileSnapshotChangedError";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test whether an absolute candidate is equal to or beneath an absolute root.
|
|
3
|
+
*
|
|
4
|
+
* The Veryfront path facade deliberately returns portable `/` separators on
|
|
5
|
+
* every host, including Windows. Containment must therefore use the facade's
|
|
6
|
+
* contract instead of the native runtime separator.
|
|
7
|
+
*/
|
|
8
|
+
export declare function isPathContainedBy(candidate: string, root: string): boolean;
|
|
9
|
+
//# sourceMappingURL=path-containment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-containment.d.ts","sourceRoot":"","sources":["../../../../src/src/platform/adapters/path-containment.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAI1E"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { isAbsolute, relative } from "../compat/path/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Test whether an absolute candidate is equal to or beneath an absolute root.
|
|
4
|
+
*
|
|
5
|
+
* The Veryfront path facade deliberately returns portable `/` separators on
|
|
6
|
+
* every host, including Windows. Containment must therefore use the facade's
|
|
7
|
+
* contract instead of the native runtime separator.
|
|
8
|
+
*/
|
|
9
|
+
export function isPathContainedBy(candidate, root) {
|
|
10
|
+
const relation = relative(root, candidate);
|
|
11
|
+
return relation === "." ||
|
|
12
|
+
(relation !== ".." && !relation.startsWith("../") && !isAbsolute(relation));
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Native path semantics used by exact file-snapshot adapters. */
|
|
2
|
+
export type NativeSnapshotPlatform = "posix" | "windows";
|
|
3
|
+
/**
|
|
4
|
+
* File identity must distinguish an opened handle from a pathname replacement.
|
|
5
|
+
* Some filesystems report a zero inode/file-index when that guarantee is not
|
|
6
|
+
* available. Exact snapshots fail closed instead of treating that value as an
|
|
7
|
+
* identity shared by unrelated files.
|
|
8
|
+
*/
|
|
9
|
+
export declare function hasUsableNativeFileIdentity(stat: Readonly<{
|
|
10
|
+
dev: bigint;
|
|
11
|
+
ino: bigint;
|
|
12
|
+
}>): boolean;
|
|
13
|
+
//# sourceMappingURL=native-snapshot-identity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-snapshot-identity.d.ts","sourceRoot":"","sources":["../../../../../../src/src/platform/adapters/runtime/shared/native-snapshot-identity.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,SAAS,CAAC;AAEzD;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,QAAQ,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,GAC3C,OAAO,CAKT"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File identity must distinguish an opened handle from a pathname replacement.
|
|
3
|
+
* Some filesystems report a zero inode/file-index when that guarantee is not
|
|
4
|
+
* available. Exact snapshots fail closed instead of treating that value as an
|
|
5
|
+
* identity shared by unrelated files.
|
|
6
|
+
*/
|
|
7
|
+
export function hasUsableNativeFileIdentity(stat) {
|
|
8
|
+
// libuv maps Windows st_dev to the volume serial number and may report zero
|
|
9
|
+
// when the volume query is unsupported. A positive device/volume identity is
|
|
10
|
+
// required so equal file indices on different volumes cannot compare equal.
|
|
11
|
+
return stat.dev > 0n && stat.ino > 0n;
|
|
12
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { DirEntry, FileInfo, FileSystemAdapter, FileWatcher, WatchOptions } from "../../base.js";
|
|
2
2
|
import { setupNodeFsWatcher } from "./shared-watcher.js";
|
|
3
|
+
import { type NativeSnapshotPlatform } from "./native-snapshot-identity.js";
|
|
3
4
|
export interface NodeFileSystemLogger {
|
|
4
5
|
error(message: string, context?: Record<string, unknown>): void;
|
|
5
6
|
debug(message: string, context?: Record<string, unknown>): void;
|
|
@@ -29,11 +30,17 @@ export interface NodeFileSystemOperations {
|
|
|
29
30
|
export interface NodeFileSystemCapabilityOptions {
|
|
30
31
|
/** Test seam for runtime constants. An own undefined value means unavailable. */
|
|
31
32
|
readonly noFollow?: number;
|
|
33
|
+
/** Test seam for native open and path semantics. */
|
|
34
|
+
readonly platform?: NativeSnapshotPlatform;
|
|
32
35
|
/** Test seam for create-new primitive availability. */
|
|
33
36
|
readonly exclusiveCreate?: boolean;
|
|
34
37
|
/** Test seam for deterministic filesystem races and write failures. */
|
|
35
38
|
readonly operations?: Partial<NodeFileSystemOperations>;
|
|
36
39
|
}
|
|
40
|
+
/** Runtime whose Node-compatible filesystem implementation backs the adapter. */
|
|
41
|
+
export type NodeCompatibleRuntimeProvenance = "node" | "bun" | "deno" | "unknown";
|
|
42
|
+
export declare function hasUsableWindowsSnapshotIdentity(runtime: NodeCompatibleRuntimeProvenance): boolean;
|
|
43
|
+
export declare function readNodeFileSnapshotWithinLimit(operations: NodeFileSystemOperations, platform: NativeSnapshotPlatform, noFollow: number | undefined, path: string, containmentRoot: string, byteLimit: number): Promise<Uint8Array>;
|
|
37
44
|
/**
|
|
38
45
|
* Filesystem implementation shared by runtimes that provide Node-compatible
|
|
39
46
|
* `node:fs` APIs (currently Node.js and Bun).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-filesystem-adapter.d.ts","sourceRoot":"","sources":["../../../../../../src/src/platform/adapters/runtime/shared/node-filesystem-adapter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"node-filesystem-adapter.d.ts","sourceRoot":"","sources":["../../../../../../src/src/platform/adapters/runtime/shared/node-filesystem-adapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,QAAQ,EAER,QAAQ,EACR,iBAAiB,EACjB,WAAW,EACX,YAAY,EACb,MAAM,eAAe,CAAC;AACvB,OAAO,EAA4C,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAcnG,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,+BAA+B,CAAC;AAGvC,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAChE,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CACjE;AAUD,UAAU,oBAAoB;IAC5B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,MAAM,IAAI,OAAO,CAAC;IAClB,cAAc,IAAI,OAAO,CAAC;CAC3B;AAED,UAAU,cAAc;IACtB,IAAI,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACtC,IAAI,CACF,MAAM,EAAE,UAAU,E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AAI,CAAC;IAKrE,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAKtE,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAIlD,SAAS,CAAC,YAAY,CACpB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC,GAChD,OAAO,CAAC,IAAI,CAAC;IAIhB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,WAAW;CAmIrE;AAED,MAAM,WAAW,+BAA+B;IAC9C,2BAA2B,CAAC,CAC1B,IAAI,EAAE,MAAM,EACZ,eAAe,EAAE,MAAM,EACvB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,UAAU,CAAC,CAAC;IACvB,wBAAwB,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7E"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as dntShim from "../../../../../_dnt.shims.js";
|
|
1
2
|
import { createFileWatcher, createWatcherIterator, setupNodeFsWatcher } from "./shared-watcher.js";
|
|
2
3
|
import { makeNodeTempDir } from "./temp-dir.js";
|
|
3
4
|
import { isProxyWithoutHooks } from "../../../compat/error-introspection.js";
|
|
@@ -5,8 +6,11 @@ import { isCanonicalNotFoundError } from "../../../compat/not-found-error.js";
|
|
|
5
6
|
import { readBoundedFilePrefix, readFileWithinLimit, withFileHandle, } from "../../bounded-file-read.js";
|
|
6
7
|
import { markNativeFileSystemAdapter } from "../../native-file-system-provenance.js";
|
|
7
8
|
import { constants as nodeFsConstants } from "node:fs";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
9
|
+
import { resolve } from "../../../compat/path/index.js";
|
|
10
|
+
import { runtimeUsesWindowsPaths } from "../../../compat/path/portable.js";
|
|
11
|
+
import { FileSnapshotChangedError, FileSnapshotPathError } from "../../file-snapshot-error.js";
|
|
12
|
+
import { hasUsableNativeFileIdentity, } from "./native-snapshot-identity.js";
|
|
13
|
+
import { isPathContainedBy } from "../../path-containment.js";
|
|
10
14
|
const silentLogger = {
|
|
11
15
|
error: () => { },
|
|
12
16
|
debug: () => { },
|
|
@@ -56,10 +60,25 @@ const nodeFileSystemOperations = {
|
|
|
56
60
|
function hasOwn(value, property) {
|
|
57
61
|
return Object.prototype.hasOwnProperty.call(value, property);
|
|
58
62
|
}
|
|
59
|
-
function
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
function detectNodeCompatibleRuntime() {
|
|
64
|
+
const runtime = dntShim.dntGlobalThis;
|
|
65
|
+
const versions = runtime.process?.versions;
|
|
66
|
+
if (typeof versions?.deno === "string" || runtime.Deno !== undefined)
|
|
67
|
+
return "deno";
|
|
68
|
+
if (typeof versions?.bun === "string" || runtime.Bun !== undefined)
|
|
69
|
+
return "bun";
|
|
70
|
+
if (runtime.process?.release?.name === "node" &&
|
|
71
|
+
typeof versions?.node === "string") {
|
|
72
|
+
return "node";
|
|
73
|
+
}
|
|
74
|
+
return "unknown";
|
|
75
|
+
}
|
|
76
|
+
export function hasUsableWindowsSnapshotIdentity(runtime) {
|
|
77
|
+
// Node exposes bigint file identity and generation fields on Windows. Each
|
|
78
|
+
// snapshot still validates that the native identity is present and usable.
|
|
79
|
+
// Bun and Deno do not currently document an equivalent contract, so their
|
|
80
|
+
// Windows adapters must fail closed.
|
|
81
|
+
return runtime === "node";
|
|
63
82
|
}
|
|
64
83
|
function requirePositiveSafeInteger(value) {
|
|
65
84
|
if (!Number.isSafeInteger(value) || value <= 0) {
|
|
@@ -75,6 +94,11 @@ function sameGeneration(left, right) {
|
|
|
75
94
|
left.mtimeNs === right.mtimeNs &&
|
|
76
95
|
left.ctimeNs === right.ctimeNs;
|
|
77
96
|
}
|
|
97
|
+
function requireUsableIdentity(stat, message) {
|
|
98
|
+
if (!hasUsableNativeFileIdentity(stat)) {
|
|
99
|
+
throw changed(message);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
78
102
|
function changed(message, cause) {
|
|
79
103
|
const error = new FileSnapshotChangedError(message);
|
|
80
104
|
if (cause !== undefined) {
|
|
@@ -108,24 +132,36 @@ function throwSnapshotChangeForPathRace(message, cause) {
|
|
|
108
132
|
}
|
|
109
133
|
throwSnapshotChangeForMissingPath(message, cause);
|
|
110
134
|
}
|
|
111
|
-
async function readNodeFileSnapshotWithinLimit(operations, noFollow, path, containmentRoot, byteLimit) {
|
|
135
|
+
export async function readNodeFileSnapshotWithinLimit(operations, platform, noFollow, path, containmentRoot, byteLimit) {
|
|
112
136
|
requirePositiveSafeInteger(byteLimit);
|
|
137
|
+
let openFlags;
|
|
138
|
+
if (platform === "windows") {
|
|
139
|
+
openFlags = "r";
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
if (typeof noFollow !== "number" || noFollow === 0) {
|
|
143
|
+
throw new TypeError("This runtime cannot guarantee no-follow snapshot opens");
|
|
144
|
+
}
|
|
145
|
+
openFlags = nodeFsConstants.O_RDONLY | noFollow;
|
|
146
|
+
}
|
|
113
147
|
const lexicalRoot = resolve(containmentRoot);
|
|
114
148
|
const candidate = resolve(path);
|
|
115
|
-
if (!isContainedPath(candidate, lexicalRoot)) {
|
|
116
|
-
throw new TypeError("Snapshot path must be contained by the requested root");
|
|
117
|
-
}
|
|
118
149
|
const canonicalRoot = await operations.realpath(lexicalRoot);
|
|
150
|
+
if (!isPathContainedBy(candidate, lexicalRoot) &&
|
|
151
|
+
!isPathContainedBy(candidate, canonicalRoot)) {
|
|
152
|
+
throw new FileSnapshotPathError("Snapshot path must be contained by the requested root");
|
|
153
|
+
}
|
|
119
154
|
const pathnameBefore = await operations.lstat(candidate);
|
|
120
155
|
if (pathnameBefore.isSymbolicLink()) {
|
|
121
|
-
throw new
|
|
156
|
+
throw new FileSnapshotPathError("Snapshot path must not be a symbolic link");
|
|
122
157
|
}
|
|
123
158
|
if (!pathnameBefore.isFile()) {
|
|
124
|
-
throw new
|
|
159
|
+
throw new FileSnapshotPathError("Snapshot path must identify a regular file");
|
|
125
160
|
}
|
|
161
|
+
requireUsableIdentity(pathnameBefore, "Stable native file identity is unavailable for the snapshot path");
|
|
126
162
|
return await withFileHandle(async () => {
|
|
127
163
|
try {
|
|
128
|
-
return await operations.open(candidate,
|
|
164
|
+
return await operations.open(candidate, openFlags);
|
|
129
165
|
}
|
|
130
166
|
catch (cause) {
|
|
131
167
|
throwSnapshotChangeForPathRace("File identity became uncertain while opening the snapshot", cause);
|
|
@@ -138,6 +174,7 @@ async function readNodeFileSnapshotWithinLimit(operations, noFollow, path, conta
|
|
|
138
174
|
catch (cause) {
|
|
139
175
|
throwSnapshotChangeForMissingPath("Opened file identity could not be verified", cause);
|
|
140
176
|
}
|
|
177
|
+
requireUsableIdentity(handleBefore, "Stable native file identity is unavailable for the opened snapshot");
|
|
141
178
|
if (!handleBefore.isFile() || !sameGeneration(pathnameBefore, handleBefore)) {
|
|
142
179
|
throw changed("File identity changed while opening the snapshot");
|
|
143
180
|
}
|
|
@@ -157,8 +194,9 @@ async function readNodeFileSnapshotWithinLimit(operations, noFollow, path, conta
|
|
|
157
194
|
!sameGeneration(handleBefore, pathnameOpened)) {
|
|
158
195
|
throw changed("File identity changed while opening the snapshot");
|
|
159
196
|
}
|
|
160
|
-
|
|
161
|
-
|
|
197
|
+
requireUsableIdentity(pathnameOpened, "Stable native file identity is unavailable while verifying the snapshot");
|
|
198
|
+
if (!isPathContainedBy(canonicalTarget, canonicalRoot)) {
|
|
199
|
+
throw new FileSnapshotPathError("Snapshot target must be contained by the canonical root");
|
|
162
200
|
}
|
|
163
201
|
if (handleBefore.size < 0n) {
|
|
164
202
|
throw changed("File size became uncertain while opening the snapshot");
|
|
@@ -200,12 +238,14 @@ async function readNodeFileSnapshotWithinLimit(operations, noFollow, path, conta
|
|
|
200
238
|
catch (cause) {
|
|
201
239
|
throwSnapshotChangeForPathRace("File identity became uncertain after reading the snapshot", cause);
|
|
202
240
|
}
|
|
241
|
+
requireUsableIdentity(handleAfter, "Stable native file identity is unavailable after reading the snapshot");
|
|
242
|
+
requireUsableIdentity(pathnameAfter, "Stable native file identity is unavailable after reading the snapshot path");
|
|
203
243
|
if (!pathnameAfter.isFile() ||
|
|
204
244
|
pathnameAfter.isSymbolicLink() ||
|
|
205
245
|
!sameGeneration(handleBefore, handleAfter) ||
|
|
206
246
|
!sameGeneration(handleBefore, pathnameAfter) ||
|
|
207
247
|
canonicalTargetAfter !== canonicalTarget ||
|
|
208
|
-
!
|
|
248
|
+
!isPathContainedBy(canonicalTargetAfter, canonicalRoot)) {
|
|
209
249
|
throw changed("File snapshot changed during the read");
|
|
210
250
|
}
|
|
211
251
|
return bytes;
|
|
@@ -227,9 +267,13 @@ export class NodeCompatibleFileSystemAdapter {
|
|
|
227
267
|
...options.operations,
|
|
228
268
|
};
|
|
229
269
|
const noFollow = hasOwn(options, "noFollow") ? options.noFollow : nodeFsConstants.O_NOFOLLOW;
|
|
230
|
-
|
|
270
|
+
const platform = options.platform ?? (runtimeUsesWindowsPaths() ? "windows" : "posix");
|
|
271
|
+
const canOpenExactSnapshot = platform === "windows"
|
|
272
|
+
? hasUsableWindowsSnapshotIdentity(detectNodeCompatibleRuntime())
|
|
273
|
+
: typeof noFollow === "number" && noFollow !== 0;
|
|
274
|
+
if (canOpenExactSnapshot) {
|
|
231
275
|
Object.defineProperty(this, "readFileSnapshotWithinLimit", {
|
|
232
|
-
value: (path, containmentRoot, byteLimit) => readNodeFileSnapshotWithinLimit(operations, noFollow, path, containmentRoot, byteLimit),
|
|
276
|
+
value: (path, containmentRoot, byteLimit) => readNodeFileSnapshotWithinLimit(operations, platform, noFollow, path, containmentRoot, byteLimit),
|
|
233
277
|
enumerable: true,
|
|
234
278
|
});
|
|
235
279
|
}
|
|
@@ -21,6 +21,8 @@ export declare const HANDLER_CACHE_MAX_ENTRIES = 256;
|
|
|
21
21
|
/** Maximum key length accepted by the shared in-memory cache adapter. */
|
|
22
22
|
export declare const MAX_CACHE_KEY_CHARACTERS = 16384;
|
|
23
23
|
export declare const MAX_PATH_LENGTH_CHARS = 4096;
|
|
24
|
+
/** Maximum number of path segments admitted by framework route resolvers. */
|
|
25
|
+
export declare const MAX_ROUTE_SEGMENTS = 64;
|
|
24
26
|
export declare const MAX_PORT_NUMBER = 65535;
|
|
25
27
|
export declare const MIN_PORT_NUMBER = 1;
|
|
26
28
|
export declare const MAX_URL_LENGTH_FOR_VALIDATION = 2048;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"limits.d.ts","sourceRoot":"","sources":["../../../../src/src/utils/constants/limits.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAC9C,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAChD,eAAO,MAAM,8BAA8B,MAAM,CAAC;AAClD,eAAO,MAAM,6BAA6B,MAAM,CAAC;AACjD,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC,gCAAgC;AAChC,eAAO,MAAM,oBAAoB,OAAO,CAAC;AACzC,eAAO,MAAM,8BAA8B,QAAQ,CAAC;AACpD,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC,eAAO,MAAM,sBAAsB,KAAK,CAAC;AACzC,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC,qCAAqC;AACrC,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAC1C,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAC5C,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAC3C,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAC7C,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAC/C,eAAO,MAA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1C,6EAA6E;AAC7E,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,eAAe,QAAQ,CAAC;AACrC,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,eAAO,MAAM,6BAA6B,OAAO,CAAC;AAElD,gCAAgC;AAChC,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC,gFAAgF;AAChF,eAAO,MAAM,kBAAkB,aAAgB,CAAC"}
|
|
@@ -21,6 +21,8 @@ export const HANDLER_CACHE_MAX_ENTRIES = 256;
|
|
|
21
21
|
/** Maximum key length accepted by the shared in-memory cache adapter. */
|
|
22
22
|
export const MAX_CACHE_KEY_CHARACTERS = 16_384;
|
|
23
23
|
export const MAX_PATH_LENGTH_CHARS = 4096;
|
|
24
|
+
/** Maximum number of path segments admitted by framework route resolvers. */
|
|
25
|
+
export const MAX_ROUTE_SEGMENTS = 64;
|
|
24
26
|
export const MAX_PORT_NUMBER = 65535;
|
|
25
27
|
export const MIN_PORT_NUMBER = 1;
|
|
26
28
|
export const MAX_URL_LENGTH_FOR_VALIDATION = 2048;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veryfront/ext-content-mdx",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1190",
|
|
4
4
|
"description": "Veryfront first-party extension package for ext-content-mdx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"veryfront",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"vfile": "6.0.3"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"veryfront": "^0.1.
|
|
70
|
+
"veryfront": "^0.1.1190"
|
|
71
71
|
},
|
|
72
72
|
"type": "module",
|
|
73
73
|
"types": "./esm/extensions/ext-content-mdx/src/index.d.ts",
|