@veryfront/ext-content-mdx 0.1.1237 → 0.1.1239

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.1237",
3
+ "version": "0.1.1239",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "minimumDependencyAge": {
@@ -562,7 +562,7 @@ export default {
562
562
  },
563
563
  "test:all-runtimes": "deno task test:unit && deno task test:node && deno task test:bun",
564
564
  "test:e2e": "deno task test:e2e:playwright",
565
- "test:e2e:playwright": "PW_DISABLE_TS_ESM=1 npx playwright test --config=tests/e2e/playwright.config.cjs",
565
+ "test:e2e:playwright": "PW_DISABLE_TS_ESM=1 deno run -A npm:playwright@1.60.0 test --config=tests/e2e/playwright.config.cjs",
566
566
  "test:e2e:rsc-browser": "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 --no-check --allow-all tests/e2e/regressions/rsc-proxy-hydration.test.ts tests/e2e/regressions/2026-07-27-legacy-router-hydration.test.ts tests/e2e/regressions/2026-07-27-release-asset-page-island-hydration.test.ts tests/e2e/regressions/2026-08-14-server-layout-spa-fallback.test.ts --unstable-worker-options --unstable-net",
567
567
  "test:e2e:binary": "deno task generate && deno test --allow-all tests/integration/compiled-binary-e2e.test.ts",
568
568
  "test:e2e:binary:fresh": "deno task generate && VERYFRONT_BINARY_FRESH=1 deno test --allow-all tests/integration/compiled-binary-e2e.test.ts",
@@ -2,6 +2,7 @@ export declare const BUILD_FAILED: import("../types.js").RegisteredError;
2
2
  export declare const BUNDLE_ERROR: import("../types.js").RegisteredError;
3
3
  export declare const TYPESCRIPT_ERROR: import("../types.js").RegisteredError;
4
4
  export declare const MDX_COMPILE_ERROR: import("../types.js").RegisteredError;
5
+ export declare const MARKDOWN_COMPILE_ERROR: import("../types.js").RegisteredError;
5
6
  export declare const ASSET_OPTIMIZATION_ERROR: import("../types.js").RegisteredError;
6
7
  export declare const SSG_GENERATION_ERROR: import("../types.js").RegisteredError;
7
8
  export declare const SOURCEMAP_ERROR: import("../types.js").RegisteredError;
@@ -12,6 +13,7 @@ export declare const BUILD_REGISTRY: {
12
13
  readonly "bundle-error": import("../types.js").RegisteredError;
13
14
  readonly "typescript-error": import("../types.js").RegisteredError;
14
15
  readonly "mdx-compile-error": import("../types.js").RegisteredError;
16
+ readonly "markdown-compile-error": import("../types.js").RegisteredError;
15
17
  readonly "asset-optimization-error": import("../types.js").RegisteredError;
16
18
  readonly "ssg-generation-error": import("../types.js").RegisteredError;
17
19
  readonly "sourcemap-error": import("../types.js").RegisteredError;
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../../src/src/errors/error-registry/build.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,uCAMvB,CAAC;AAEH,eAAO,MAAM,YAAY,uCAMvB,CAAC;AAEH,eAAO,MAAM,gBAAgB,uCAM3B,CAAC;AAEH,eAAO,MAAM,iBAAiB,uCAM5B,CAAC;AAEH,eAAO,MAAM,wBAAwB,uCAMnC,CAAC;AAEH,eAAO,MAAM,oBAAoB,uCAM/B,CAAC;AAEH,eAAO,MAAM,eAAe,uCAM1B,CAAC;AAEH,eAAO,MAAM,iBAAiB,uCAM5B,CAAC;AAEH,8DAA8D;AAC9D,eAAO,MAAM,cAAc;;;;;;;;;CASjB,CAAC"}
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../../src/src/errors/error-registry/build.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,uCAMvB,CAAC;AAEH,eAAO,MAAM,YAAY,uCAMvB,CAAC;AAEH,eAAO,MAAM,gBAAgB,uCAM3B,CAAC;AAEH,eAAO,MAAM,iBAAiB,uCAM5B,CAAC;AAEH,eAAO,MAAM,sBAAsB,uCAMjC,CAAC;AAEH,eAAO,MAAM,wBAAwB,uCAMnC,CAAC;AAEH,eAAO,MAAM,oBAAoB,uCAM/B,CAAC;AAEH,eAAO,MAAM,eAAe,uCAM1B,CAAC;AAEH,eAAO,MAAM,iBAAiB,uCAM5B,CAAC;AAEH,8DAA8D;AAC9D,eAAO,MAAM,cAAc;;;;;;;;;;CAUjB,CAAC"}
@@ -27,6 +27,13 @@ export const MDX_COMPILE_ERROR = defineError({
27
27
  title: "MDX compilation failed",
28
28
  suggestion: "Check your MDX file syntax",
29
29
  });
30
+ export const MARKDOWN_COMPILE_ERROR = defineError({
31
+ slug: "markdown-compile-error",
32
+ category: "BUILD",
33
+ status: 500,
34
+ title: "Markdown compilation failed",
35
+ suggestion: "Check your Markdown file syntax and frontmatter",
36
+ });
30
37
  export const ASSET_OPTIMIZATION_ERROR = defineError({
31
38
  slug: "asset-optimization-error",
32
39
  category: "BUILD",
@@ -61,6 +68,7 @@ export const BUILD_REGISTRY = {
61
68
  "bundle-error": BUNDLE_ERROR,
62
69
  "typescript-error": TYPESCRIPT_ERROR,
63
70
  "mdx-compile-error": MDX_COMPILE_ERROR,
71
+ "markdown-compile-error": MARKDOWN_COMPILE_ERROR,
64
72
  "asset-optimization-error": ASSET_OPTIMIZATION_ERROR,
65
73
  "ssg-generation-error": SSG_GENERATION_ERROR,
66
74
  "sourcemap-error": SOURCEMAP_ERROR,
@@ -8,6 +8,8 @@ export declare const RELEASE_MISSING_VERSION: import("../types.js").RegisteredEr
8
8
  export declare const RELEASE_BUILD_TIMEOUT: import("../types.js").RegisteredError;
9
9
  export declare const DEPLOYMENT_VERIFICATION_TIMEOUT: import("../types.js").RegisteredError;
10
10
  export declare const PUSH_RECEIPT_MISSING: import("../types.js").RegisteredError;
11
+ export declare const PUSH_CONFLICT: import("../types.js").RegisteredError;
12
+ export declare const SYNC_STATE_INVALID: import("../types.js").RegisteredError;
11
13
  export declare const SOURCE_DIGEST_MISMATCH: import("../types.js").RegisteredError;
12
14
  export declare const PREVIEW_HOSTNAME_TOO_LONG: import("../types.js").RegisteredError;
13
15
  export declare const BRANCH_NOT_FOUND: import("../types.js").RegisteredError;
@@ -32,6 +34,8 @@ export declare const DEPLOY_REGISTRY: {
32
34
  readonly "release-build-timeout": import("../types.js").RegisteredError;
33
35
  readonly "deployment-verification-timeout": import("../types.js").RegisteredError;
34
36
  readonly "push-receipt-missing": import("../types.js").RegisteredError;
37
+ readonly "push-conflict": import("../types.js").RegisteredError;
38
+ readonly "sync-state-invalid": import("../types.js").RegisteredError;
35
39
  readonly "source-digest-mismatch": import("../types.js").RegisteredError;
36
40
  readonly "preview-hostname-too-long": import("../types.js").RegisteredError;
37
41
  readonly "branch-not-found": import("../types.js").RegisteredError;
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../../src/src/errors/error-registry/deploy.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,uCAM3B,CAAC;AAEH,eAAO,MAAM,cAAc,uCAMzB,CAAC;AAEH,eAAO,MAAM,eAAe,uCAM1B,CAAC;AAEH,eAAO,MAAM,yBAAyB,uCAMpC,CAAC;AAEH,eAAO,MAAM,qBAAqB,uCAMhC,CAAC;AAEH,eAAO,MAAM,wBAAwB,uCAOnC,CAAC;AAEH,eAAO,MAAM,uBAAuB,uCAMlC,CAAC;AAEH,eAAO,MAAM,qBAAqB,uCAMhC,CAAC;AAEH,eAAO,MAAM,+BAA+B,uCAM1C,CAAC;AAEH,eAAO,MAAM,oBAAoB,uCAM/B,CAAC;AAEH,eAAO,MAAM,sBAAsB,uCAMjC,CAAC;AAEH,eAAO,MAAM,yBAAyB,uCAMpC,CAAC;AAEH,eAAO,MAAM,gBAAgB,uCAM3B,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,uCAQhC,CAAC;AAEH,+DAA+D;AAC/D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;CAelB,CAAC"}
1
+ {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../../src/src/errors/error-registry/deploy.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,uCAM3B,CAAC;AAEH,eAAO,MAAM,cAAc,uCAMzB,CAAC;AAEH,eAAO,MAAM,eAAe,uCAM1B,CAAC;AAEH,eAAO,MAAM,yBAAyB,uCAMpC,CAAC;AAEH,eAAO,MAAM,qBAAqB,uCAMhC,CAAC;AAEH,eAAO,MAAM,wBAAwB,uCAOnC,CAAC;AAEH,eAAO,MAAM,uBAAuB,uCAMlC,CAAC;AAEH,eAAO,MAAM,qBAAqB,uCAMhC,CAAC;AAEH,eAAO,MAAM,+BAA+B,uCAM1C,CAAC;AAEH,eAAO,MAAM,oBAAoB,uCAM/B,CAAC;AAEH,eAAO,MAAM,aAAa,uCAOxB,CAAC;AAEH,eAAO,MAAM,kBAAkB,uCAM7B,CAAC;AAEH,eAAO,MAAM,sBAAsB,uCAMjC,CAAC;AAEH,eAAO,MAAM,yBAAyB,uCAMpC,CAAC;AAEH,eAAO,MAAM,gBAAgB,uCAM3B,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,uCAQhC,CAAC;AAEH,+DAA+D;AAC/D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;CAiBlB,CAAC"}
@@ -69,6 +69,20 @@ export const PUSH_RECEIPT_MISSING = defineError({
69
69
  title: "Push receipt not found",
70
70
  suggestion: "Run: veryfront push --branch main first",
71
71
  });
72
+ export const PUSH_CONFLICT = defineError({
73
+ slug: "push-conflict",
74
+ category: "DEPLOY",
75
+ status: 409,
76
+ title: "Push rejected because remote files changed",
77
+ suggestion: "Commit or stash local changes, run veryfront pull, reconcile the changes with Git, then push again",
78
+ });
79
+ export const SYNC_STATE_INVALID = defineError({
80
+ slug: "sync-state-invalid",
81
+ category: "DEPLOY",
82
+ status: 400,
83
+ title: "Local sync metadata is invalid",
84
+ suggestion: "Remove .veryfront/sync-state.json, run veryfront pull, and try again",
85
+ });
72
86
  export const SOURCE_DIGEST_MISMATCH = defineError({
73
87
  slug: "source-digest-mismatch",
74
88
  category: "DEPLOY",
@@ -118,6 +132,8 @@ export const DEPLOY_REGISTRY = {
118
132
  "release-build-timeout": RELEASE_BUILD_TIMEOUT,
119
133
  "deployment-verification-timeout": DEPLOYMENT_VERIFICATION_TIMEOUT,
120
134
  "push-receipt-missing": PUSH_RECEIPT_MISSING,
135
+ "push-conflict": PUSH_CONFLICT,
136
+ "sync-state-invalid": SYNC_STATE_INVALID,
121
137
  "source-digest-mismatch": SOURCE_DIGEST_MISMATCH,
122
138
  "preview-hostname-too-long": PREVIEW_HOSTNAME_TOO_LONG,
123
139
  "branch-not-found": BRANCH_NOT_FOUND,
@@ -46,6 +46,7 @@ export declare const ERROR_REGISTRY: Readonly<{
46
46
  readonly "bundle-error": import("./types.js").RegisteredError;
47
47
  readonly "typescript-error": import("./types.js").RegisteredError;
48
48
  readonly "mdx-compile-error": import("./types.js").RegisteredError;
49
+ readonly "markdown-compile-error": import("./types.js").RegisteredError;
49
50
  readonly "asset-optimization-error": import("./types.js").RegisteredError;
50
51
  readonly "ssg-generation-error": import("./types.js").RegisteredError;
51
52
  readonly "sourcemap-error": import("./types.js").RegisteredError;
@@ -122,6 +123,8 @@ export declare const ERROR_REGISTRY: Readonly<{
122
123
  readonly "release-build-timeout": import("./types.js").RegisteredError;
123
124
  readonly "deployment-verification-timeout": import("./types.js").RegisteredError;
124
125
  readonly "push-receipt-missing": import("./types.js").RegisteredError;
126
+ readonly "push-conflict": import("./types.js").RegisteredError;
127
+ readonly "sync-state-invalid": import("./types.js").RegisteredError;
125
128
  readonly "source-digest-mismatch": import("./types.js").RegisteredError;
126
129
  readonly "preview-hostname-too-long": import("./types.js").RegisteredError;
127
130
  readonly "branch-not-found": 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
+ {"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"}
@@ -2,5 +2,7 @@ export interface FrontmatterExtractionResult {
2
2
  body: string;
3
3
  frontmatter: Record<string, unknown>;
4
4
  }
5
+ /** Return true when an error came from MDX or Markdown YAML frontmatter parsing. */
6
+ export declare function isFrontmatterSyntaxError(error: unknown): error is SyntaxError;
5
7
  export declare function extractFrontmatter(content: string, providedFrontmatter?: Record<string, unknown>): FrontmatterExtractionResult;
6
8
  //# sourceMappingURL=frontmatter-extractor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"frontmatter-extractor.d.ts","sourceRoot":"","sources":["../../../../../src/src/transforms/mdx/compiler/frontmatter-extractor.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AA0CD,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EACf,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5C,2BAA2B,CAc7B"}
1
+ {"version":3,"file":"frontmatter-extractor.d.ts","sourceRoot":"","sources":["../../../../../src/src/transforms/mdx/compiler/frontmatter-extractor.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAQD,oFAAoF;AACpF,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW,CAU7E;AAsDD,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EACf,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5C,2BAA2B,CAc7B"}
@@ -1,9 +1,41 @@
1
1
  import { rendererLogger as logger } from "../../../utils/logger/logger.js";
2
2
  import { extract } from "../../../platform/compat/std/front-matter-yaml.js";
3
+ const FRONTMATTER_SYNTAX_ERROR = Symbol.for("veryfront.transforms.mdx.frontmatter-syntax-error");
4
+ const ObjectDefineProperty = Object.defineProperty;
5
+ const ObjectPrototypeHasOwnProperty = Object.prototype.hasOwnProperty;
6
+ const ReflectApply = Reflect.apply;
7
+ const ReflectGetOwnPropertyDescriptor = Reflect.getOwnPropertyDescriptor;
8
+ /** Return true when an error came from MDX or Markdown YAML frontmatter parsing. */
9
+ export function isFrontmatterSyntaxError(error) {
10
+ try {
11
+ if (!(error instanceof SyntaxError))
12
+ return false;
13
+ const descriptor = ReflectGetOwnPropertyDescriptor(error, FRONTMATTER_SYNTAX_ERROR);
14
+ return descriptor !== undefined &&
15
+ ReflectApply(ObjectPrototypeHasOwnProperty, descriptor, ["value"]) === true &&
16
+ descriptor.value === true;
17
+ }
18
+ catch {
19
+ return false;
20
+ }
21
+ }
22
+ function createFrontmatterSyntaxError(cause) {
23
+ const error = new SyntaxError(`Invalid YAML frontmatter: ${cause.message}`, { cause });
24
+ ObjectDefineProperty(error, FRONTMATTER_SYNTAX_ERROR, { value: true });
25
+ return error;
26
+ }
3
27
  function extractYamlFrontmatter(content) {
4
28
  if (!content.trim().startsWith("---"))
5
29
  return { body: content, frontmatter: {} };
6
- const extracted = extract(content);
30
+ let extracted;
31
+ try {
32
+ extracted = extract(content);
33
+ }
34
+ catch (error) {
35
+ if (error instanceof SyntaxError)
36
+ throw createFrontmatterSyntaxError(error);
37
+ throw error;
38
+ }
7
39
  return {
8
40
  body: extracted.body,
9
41
  frontmatter: extracted.attrs,
@@ -1,3 +1,3 @@
1
1
  /** Shared version value. */
2
- export declare const VERSION = "0.1.1237";
2
+ export declare const VERSION = "0.1.1239";
3
3
  //# sourceMappingURL=version-constant.d.ts.map
@@ -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.1237";
4
+ export const VERSION = "0.1.1239";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veryfront/ext-content-mdx",
3
- "version": "0.1.1237",
3
+ "version": "0.1.1239",
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.1237"
70
+ "veryfront": "^0.1.1239"
71
71
  },
72
72
  "type": "module",
73
73
  "types": "./esm/extensions/ext-content-mdx/src/index.d.ts",