@veryfront/ext-content-mdx 0.1.1230 → 0.1.1231-rc.11370

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 CHANGED
@@ -434,6 +434,7 @@ declare namespace _default {
434
434
  "docs:api-reference:check": string;
435
435
  "docs:errors": string;
436
436
  "docs:errors:check": string;
437
+ "docs:public:check": string;
437
438
  "docs:coverage": string;
438
439
  "docs:copy": string;
439
440
  "docs:validate": string;
package/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.1230",
3
+ "version": "0.1.1231-rc.11370",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "minimumDependencyAge": {
@@ -494,7 +494,7 @@ export default {
494
494
  "build:storybook": "npm --prefix storybook run build-storybook",
495
495
  "storybook:check": "deno test --no-lock --config=scripts/test.deno.json --no-check --allow-read scripts/storybook/storybook-workbench.test.ts",
496
496
  "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/",
497
- "lint:ci": "deno task lint && deno task lint:core-deps && deno task lint:cross-runtime-jsr && deno task lint:dependency-boundaries && deno task lint:module-boundaries && deno task lint:extension-contracts && deno task lint:extension-capabilities && deno task lint:ban-test-only && deno task lint:sanitizer-baseline && deno task lint:skipped-tests && deno task lint:chat-ratchets && deno task lint:esm-sh-codemod && deno task lint:test-typecheck && deno task lint:cwd-relative-test-reads && deno task storybook:check && deno task docs:api-reference:check && deno task docs:errors:check && deno test --frozen --config=scripts/test.deno.json --no-check --allow-read --allow-write scripts/ci/setup-deno-workflow.test.ts scripts/ci/prepare-rc-build.test.ts scripts/build/generated-artifact-checks.test.ts",
497
+ "lint:ci": "deno task lint && deno task lint:core-deps && deno task lint:cross-runtime-jsr && deno task lint:dependency-boundaries && deno task lint:module-boundaries && deno task lint:extension-contracts && deno task lint:extension-capabilities && deno task lint:ban-test-only && deno task lint:sanitizer-baseline && deno task lint:skipped-tests && deno task lint:chat-ratchets && deno task lint:esm-sh-codemod && deno task lint:test-typecheck && deno task lint:cwd-relative-test-reads && deno task storybook:check && deno task docs:api-reference:check && deno task docs:errors:check && deno task docs:public:check && deno test --frozen --config=scripts/test.deno.json --no-check --allow-read --allow-write scripts/ci/setup-deno-workflow.test.ts scripts/ci/prepare-rc-build.test.ts scripts/build/generated-artifact-checks.test.ts",
498
498
  "fmt": "deno fmt src/ cli/ react/ templates/ && 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/",
499
499
  "fmt:check": "deno fmt --check src/ cli/ react/ templates/ && 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/",
500
500
  "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",
@@ -510,6 +510,7 @@ export default {
510
510
  "docs:api-reference:check": "deno run --allow-read --allow-write --allow-run --allow-env scripts/docs/generate-api-reference.ts --check",
511
511
  "docs:errors": "deno run --allow-read --allow-write --allow-run --allow-env scripts/docs/generate-error-reference.ts",
512
512
  "docs:errors:check": "deno run --allow-read --allow-write --allow-run --allow-env scripts/docs/generate-error-reference.ts --check",
513
+ "docs:public:check": "deno run --allow-read scripts/docs/validate-public-docs.ts",
513
514
  "docs:coverage": "deno run --allow-read scripts/docs/docs-coverage.ts",
514
515
  "docs:copy": "rm -rf ../../docs/docs/code/api-reference && cp -r docs/api-reference/ ../../docs/docs/code/api-reference/",
515
516
  "docs:validate": "deno run --allow-read scripts/docs/validate-api-reference.ts && deno run --allow-read scripts/docs/validate-guides.ts && deno run --allow-read scripts/docs/validate-public-docs.ts && deno test --config=scripts/test.deno.json --no-check --allow-read scripts/docs/docs-coverage.test.ts && deno test --no-check --allow-read tests/docs/guide-contracts.test.ts tests/docs/guide-content.test.ts && DENO_TESTING=1 deno test --no-check --allow-all tests/docs/guide-examples.test.ts tests/docs/guide-code-examples.test.ts && deno run -A scripts/lint/check-doc-links.ts",
@@ -22,6 +22,33 @@ export declare function readNativeErrorStackWithoutHooks(error: Error): string |
22
22
  * Identify native Error values without evaluating project-owned Proxy traps.
23
23
  */
24
24
  export declare function isNativeErrorWithoutHooks(value: unknown): value is Error;
25
+ /**
26
+ * Identify an Error whose prototype chain may have been minted somewhere else.
27
+ *
28
+ * `value instanceof Error` compares against the `Error.prototype` of whichever
29
+ * realm this module was evaluated in. An Error produced in a worker, a `vm`
30
+ * context, or a second instance of this module graph — which the Node and Bun
31
+ * loaders both produce, one per package copy or per transpiled entry — carries
32
+ * a different `Error.prototype` and fails that comparison even though it is a
33
+ * genuine Error. Code that branches on `instanceof` to decide whether to keep
34
+ * an error therefore discards real errors at exactly those boundaries.
35
+ *
36
+ * The native brand check reads the runtime's own `[[ErrorData]]` internal slot,
37
+ * which no realm boundary changes, so it recognizes those errors. `instanceof`
38
+ * stays as a second branch because Bun does not report `DOMException` as a
39
+ * native error, and a DOMException — the shape every unattributed `AbortSignal`
40
+ * cancellation reason takes — must keep being recognized there.
41
+ *
42
+ * Values that merely look like errors (a plain object carrying `name` and
43
+ * `message`, or one tagged `[object Error]` through `Symbol.toStringTag`) are
44
+ * rejected by both branches, so this stays a brand check rather than a shape
45
+ * check.
46
+ *
47
+ * Unlike {@link isNativeErrorWithoutHooks} this can run project code: the
48
+ * `instanceof` branch consults `Symbol.hasInstance`. Callers that must not
49
+ * execute foreign hooks use the brand check directly.
50
+ */
51
+ export declare function isErrorAcrossRealms(value: unknown): value is Error;
25
52
  /**
26
53
  * Read a native Error's display name without executing instance, prototype, or
27
54
  * constructor accessors. Custom subclasses use their own data-valued
@@ -1 +1 @@
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"}
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;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,KAAK,CAElE;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"}
@@ -207,6 +207,35 @@ export function readNativeErrorStackWithoutHooks(error) {
207
207
  export function isNativeErrorWithoutHooks(value) {
208
208
  return nativeErrorBrandCheck(value);
209
209
  }
210
+ /**
211
+ * Identify an Error whose prototype chain may have been minted somewhere else.
212
+ *
213
+ * `value instanceof Error` compares against the `Error.prototype` of whichever
214
+ * realm this module was evaluated in. An Error produced in a worker, a `vm`
215
+ * context, or a second instance of this module graph — which the Node and Bun
216
+ * loaders both produce, one per package copy or per transpiled entry — carries
217
+ * a different `Error.prototype` and fails that comparison even though it is a
218
+ * genuine Error. Code that branches on `instanceof` to decide whether to keep
219
+ * an error therefore discards real errors at exactly those boundaries.
220
+ *
221
+ * The native brand check reads the runtime's own `[[ErrorData]]` internal slot,
222
+ * which no realm boundary changes, so it recognizes those errors. `instanceof`
223
+ * stays as a second branch because Bun does not report `DOMException` as a
224
+ * native error, and a DOMException — the shape every unattributed `AbortSignal`
225
+ * cancellation reason takes — must keep being recognized there.
226
+ *
227
+ * Values that merely look like errors (a plain object carrying `name` and
228
+ * `message`, or one tagged `[object Error]` through `Symbol.toStringTag`) are
229
+ * rejected by both branches, so this stays a brand check rather than a shape
230
+ * check.
231
+ *
232
+ * Unlike {@link isNativeErrorWithoutHooks} this can run project code: the
233
+ * `instanceof` branch consults `Symbol.hasInstance`. Callers that must not
234
+ * execute foreign hooks use the brand check directly.
235
+ */
236
+ export function isErrorAcrossRealms(value) {
237
+ return nativeErrorBrandCheck(value) || value instanceof NativeError;
238
+ }
210
239
  function readOwnDataString(value, key) {
211
240
  const descriptor = getOwnPropertyDescriptor(value, key);
212
241
  if (!descriptor || !hasOwn(descriptor, "value"))
@@ -1,4 +1,14 @@
1
- /** Convert an arbitrary abort reason into the framework's stable Error shape. */
1
+ /**
2
+ * Convert an arbitrary abort reason into the framework's stable Error shape.
3
+ *
4
+ * A cancellation reason is one of the few values that routinely crosses a realm
5
+ * on its way here — it is minted by whoever called `abort()`, which can be a
6
+ * worker, a host runtime, or another instance of this module graph. Testing it
7
+ * with `instanceof` would drop those reasons on the floor and replace the real
8
+ * cause of a cancellation with a generic message, so the brand check is used
9
+ * instead. Reasons that are not errors at all (a string, `undefined`, a plain
10
+ * object) still become the framework's AbortError, as before.
11
+ */
2
12
  export declare function createAbortError(reason?: unknown): Error;
3
13
  /** Throw the normalized abort reason when a signal has already been aborted. */
4
14
  export declare function throwIfAborted(abortSignal?: AbortSignal): void;
@@ -1 +1 @@
1
- {"version":3,"file":"abort.d.ts","sourceRoot":"","sources":["../../../src/src/utils/abort.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,wBAAgB,gBAAgB,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,KAAK,CASxD;AAED,gFAAgF;AAChF,wBAAgB,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,GAAG,IAAI,CAI9D;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAAC,CAAC,EACpC,KAAK,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,EACzB,WAAW,CAAC,EAAE,WAAW,GACxB,OAAO,CAAC,CAAC,CAAC,CAqBZ"}
1
+ {"version":3,"file":"abort.d.ts","sourceRoot":"","sources":["../../../src/src/utils/abort.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,KAAK,CASxD;AAED,gFAAgF;AAChF,wBAAgB,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,GAAG,IAAI,CAI9D;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAAC,CAAC,EACpC,KAAK,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,EACzB,WAAW,CAAC,EAAE,WAAW,GACxB,OAAO,CAAC,CAAC,CAAC,CAqBZ"}
@@ -1,6 +1,17 @@
1
- /** Convert an arbitrary abort reason into the framework's stable Error shape. */
1
+ import { isErrorAcrossRealms } from "../platform/compat/error-introspection.js";
2
+ /**
3
+ * Convert an arbitrary abort reason into the framework's stable Error shape.
4
+ *
5
+ * A cancellation reason is one of the few values that routinely crosses a realm
6
+ * on its way here — it is minted by whoever called `abort()`, which can be a
7
+ * worker, a host runtime, or another instance of this module graph. Testing it
8
+ * with `instanceof` would drop those reasons on the floor and replace the real
9
+ * cause of a cancellation with a generic message, so the brand check is used
10
+ * instead. Reasons that are not errors at all (a string, `undefined`, a plain
11
+ * object) still become the framework's AbortError, as before.
12
+ */
2
13
  export function createAbortError(reason) {
3
- if (reason instanceof Error) {
14
+ if (isErrorAcrossRealms(reason)) {
4
15
  return reason;
5
16
  }
6
17
  return new DOMException(typeof reason === "string" && reason.length > 0 ? reason : "The operation was aborted", "AbortError");
@@ -1,3 +1,3 @@
1
1
  /** Shared version value. */
2
- export declare const VERSION = "0.1.1230";
2
+ export declare const VERSION = "0.1.1231-rc.11370";
3
3
  //# sourceMappingURL=version-constant.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version-constant.d.ts","sourceRoot":"","sources":["../../../src/src/utils/version-constant.ts"],"names":[],"mappings":"AAEA,4BAA4B;AAC5B,eAAO,MAAM,OAAO,aAAa,CAAC"}
1
+ {"version":3,"file":"version-constant.d.ts","sourceRoot":"","sources":["../../../src/src/utils/version-constant.ts"],"names":[],"mappings":"AAEA,4BAA4B;AAC5B,eAAO,MAAM,OAAO,sBAAsB,CAAC"}
@@ -1,4 +1,4 @@
1
1
  // Keep in sync with deno.json version.
2
2
  // scripts/release.ts updates this constant during releases.
3
3
  /** Shared version value. */
4
- export const VERSION = "0.1.1230";
4
+ export const VERSION = "0.1.1231-rc.11370";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veryfront/ext-content-mdx",
3
- "version": "0.1.1230",
3
+ "version": "0.1.1231-rc.11370",
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.1230"
70
+ "veryfront": "^0.1.1231-rc.11370"
71
71
  },
72
72
  "type": "module",
73
73
  "types": "./esm/extensions/ext-content-mdx/src/index.d.ts",