@veryfront/ext-content-mdx 0.1.1081 → 0.1.1083

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.
Files changed (180) hide show
  1. package/esm/_dnt.polyfills.d.ts +0 -6
  2. package/esm/_dnt.polyfills.d.ts.map +1 -1
  3. package/esm/_dnt.shims.d.ts +1 -1
  4. package/esm/deno.d.ts +3 -0
  5. package/esm/deno.js +8 -5
  6. package/esm/deps/jsr.io/@std/yaml/1.1.0/_loader_state.d.ts +2 -2
  7. package/esm/src/transforms/mdx/compiler/frontmatter-extractor.js +1 -1
  8. package/esm/src/utils/logger/logger.d.ts.map +1 -1
  9. package/esm/src/utils/logger/logger.js +16 -12
  10. package/esm/src/utils/version-constant.d.ts +1 -1
  11. package/esm/src/utils/version-constant.js +1 -1
  12. package/package.json +2 -2
  13. package/esm/src/config/defaults.d.ts +0 -39
  14. package/esm/src/config/defaults.d.ts.map +0 -1
  15. package/esm/src/config/defaults.js +0 -65
  16. package/esm/src/errors/error-registry/agent.d.ts +0 -18
  17. package/esm/src/errors/error-registry/agent.d.ts.map +0 -1
  18. package/esm/src/errors/error-registry/agent.js +0 -60
  19. package/esm/src/errors/error-registry/boundary.d.ts +0 -16
  20. package/esm/src/errors/error-registry/boundary.d.ts.map +0 -1
  21. package/esm/src/errors/error-registry/boundary.js +0 -52
  22. package/esm/src/errors/error-registry/build.d.ts +0 -20
  23. package/esm/src/errors/error-registry/build.d.ts.map +0 -1
  24. package/esm/src/errors/error-registry/build.js +0 -68
  25. package/esm/src/errors/error-registry/config.d.ts +0 -22
  26. package/esm/src/errors/error-registry/config.d.ts.map +0 -1
  27. package/esm/src/errors/error-registry/config.js +0 -70
  28. package/esm/src/errors/error-registry/deploy.d.ts +0 -12
  29. package/esm/src/errors/error-registry/deploy.d.ts.map +0 -1
  30. package/esm/src/errors/error-registry/deploy.js +0 -36
  31. package/esm/src/errors/error-registry/dev.d.ts +0 -14
  32. package/esm/src/errors/error-registry/dev.d.ts.map +0 -1
  33. package/esm/src/errors/error-registry/dev.js +0 -44
  34. package/esm/src/errors/error-registry/general.d.ts +0 -29
  35. package/esm/src/errors/error-registry/general.d.ts.map +0 -1
  36. package/esm/src/errors/error-registry/general.js +0 -92
  37. package/esm/src/errors/error-registry/module.d.ts +0 -16
  38. package/esm/src/errors/error-registry/module.d.ts.map +0 -1
  39. package/esm/src/errors/error-registry/module.js +0 -52
  40. package/esm/src/errors/error-registry/route.d.ts +0 -16
  41. package/esm/src/errors/error-registry/route.d.ts.map +0 -1
  42. package/esm/src/errors/error-registry/route.js +0 -52
  43. package/esm/src/errors/error-registry/runtime.d.ts +0 -18
  44. package/esm/src/errors/error-registry/runtime.d.ts.map +0 -1
  45. package/esm/src/errors/error-registry/runtime.js +0 -60
  46. package/esm/src/errors/error-registry/server.d.ts +0 -39
  47. package/esm/src/errors/error-registry/server.d.ts.map +0 -1
  48. package/esm/src/errors/error-registry/server.js +0 -129
  49. package/esm/src/errors/error-registry-helpers.d.ts +0 -6
  50. package/esm/src/errors/error-registry-helpers.d.ts.map +0 -1
  51. package/esm/src/errors/error-registry-helpers.js +0 -9
  52. package/esm/src/errors/error-registry.d.ts +0 -114
  53. package/esm/src/errors/error-registry.d.ts.map +0 -1
  54. package/esm/src/errors/error-registry.js +0 -60
  55. package/esm/src/errors/types.d.ts +0 -84
  56. package/esm/src/errors/types.d.ts.map +0 -1
  57. package/esm/src/errors/types.js +0 -69
  58. package/esm/src/errors/veryfront-error.d.ts +0 -149
  59. package/esm/src/errors/veryfront-error.d.ts.map +0 -1
  60. package/esm/src/errors/veryfront-error.js +0 -61
  61. package/esm/src/modules/react-loader/ssr-module-loader/concurrency/semaphore.d.ts +0 -13
  62. package/esm/src/modules/react-loader/ssr-module-loader/concurrency/semaphore.d.ts.map +0 -1
  63. package/esm/src/modules/react-loader/ssr-module-loader/concurrency/semaphore.js +0 -55
  64. package/esm/src/observability/tracing/api-shim.d.ts +0 -191
  65. package/esm/src/observability/tracing/api-shim.d.ts.map +0 -1
  66. package/esm/src/observability/tracing/api-shim.js +0 -281
  67. package/esm/src/observability/tracing/otlp-setup.d.ts +0 -63
  68. package/esm/src/observability/tracing/otlp-setup.d.ts.map +0 -1
  69. package/esm/src/observability/tracing/otlp-setup.js +0 -219
  70. package/esm/src/observability/tracing/telemetry-env.d.ts +0 -3
  71. package/esm/src/observability/tracing/telemetry-env.d.ts.map +0 -1
  72. package/esm/src/observability/tracing/telemetry-env.js +0 -10
  73. package/esm/src/platform/adapters/base.d.ts +0 -209
  74. package/esm/src/platform/adapters/base.d.ts.map +0 -1
  75. package/esm/src/platform/adapters/base.js +0 -15
  76. package/esm/src/platform/compat/constants.d.ts +0 -13
  77. package/esm/src/platform/compat/constants.d.ts.map +0 -1
  78. package/esm/src/platform/compat/constants.js +0 -12
  79. package/esm/src/platform/compat/fs.d.ts +0 -75
  80. package/esm/src/platform/compat/fs.d.ts.map +0 -1
  81. package/esm/src/platform/compat/fs.js +0 -315
  82. package/esm/src/transforms/import-rewriter/url-builder.d.ts +0 -70
  83. package/esm/src/transforms/import-rewriter/url-builder.d.ts.map +0 -1
  84. package/esm/src/transforms/import-rewriter/url-builder.js +0 -152
  85. package/esm/src/utils/base64url.d.ts +0 -6
  86. package/esm/src/utils/base64url.d.ts.map +0 -1
  87. package/esm/src/utils/base64url.js +0 -12
  88. package/esm/src/utils/bundle-manifest.d.ts +0 -63
  89. package/esm/src/utils/bundle-manifest.d.ts.map +0 -1
  90. package/esm/src/utils/bundle-manifest.js +0 -96
  91. package/esm/src/utils/constants/buffers.d.ts +0 -24
  92. package/esm/src/utils/constants/buffers.d.ts.map +0 -1
  93. package/esm/src/utils/constants/buffers.js +0 -23
  94. package/esm/src/utils/constants/build.d.ts +0 -8
  95. package/esm/src/utils/constants/build.d.ts.map +0 -1
  96. package/esm/src/utils/constants/build.js +0 -7
  97. package/esm/src/utils/constants/cache.d.ts +0 -74
  98. package/esm/src/utils/constants/cache.d.ts.map +0 -1
  99. package/esm/src/utils/constants/cache.js +0 -133
  100. package/esm/src/utils/constants/cdn.d.ts +0 -29
  101. package/esm/src/utils/constants/cdn.d.ts.map +0 -1
  102. package/esm/src/utils/constants/cdn.js +0 -58
  103. package/esm/src/utils/constants/crypto.d.ts +0 -10
  104. package/esm/src/utils/constants/crypto.d.ts.map +0 -1
  105. package/esm/src/utils/constants/crypto.js +0 -9
  106. package/esm/src/utils/constants/env.d.ts +0 -16
  107. package/esm/src/utils/constants/env.d.ts.map +0 -1
  108. package/esm/src/utils/constants/env.js +0 -20
  109. package/esm/src/utils/constants/hash.d.ts +0 -5
  110. package/esm/src/utils/constants/hash.d.ts.map +0 -1
  111. package/esm/src/utils/constants/hash.js +0 -4
  112. package/esm/src/utils/constants/hmr.d.ts +0 -24
  113. package/esm/src/utils/constants/hmr.d.ts.map +0 -1
  114. package/esm/src/utils/constants/hmr.js +0 -26
  115. package/esm/src/utils/constants/html.d.ts +0 -13
  116. package/esm/src/utils/constants/html.d.ts.map +0 -1
  117. package/esm/src/utils/constants/html.js +0 -12
  118. package/esm/src/utils/constants/http.d.ts +0 -77
  119. package/esm/src/utils/constants/http.d.ts.map +0 -1
  120. package/esm/src/utils/constants/http.js +0 -76
  121. package/esm/src/utils/constants/index.d.ts +0 -23
  122. package/esm/src/utils/constants/index.d.ts.map +0 -1
  123. package/esm/src/utils/constants/index.js +0 -22
  124. package/esm/src/utils/constants/limits.d.ts +0 -27
  125. package/esm/src/utils/constants/limits.d.ts.map +0 -1
  126. package/esm/src/utils/constants/limits.js +0 -26
  127. package/esm/src/utils/constants/metrics.d.ts +0 -10
  128. package/esm/src/utils/constants/metrics.d.ts.map +0 -1
  129. package/esm/src/utils/constants/metrics.js +0 -34
  130. package/esm/src/utils/constants/network.d.ts +0 -23
  131. package/esm/src/utils/constants/network.d.ts.map +0 -1
  132. package/esm/src/utils/constants/network.js +0 -27
  133. package/esm/src/utils/constants/priorities.d.ts +0 -31
  134. package/esm/src/utils/constants/priorities.d.ts.map +0 -1
  135. package/esm/src/utils/constants/priorities.js +0 -30
  136. package/esm/src/utils/constants/retry.d.ts +0 -14
  137. package/esm/src/utils/constants/retry.d.ts.map +0 -1
  138. package/esm/src/utils/constants/retry.js +0 -13
  139. package/esm/src/utils/constants/server.d.ts +0 -107
  140. package/esm/src/utils/constants/server.d.ts.map +0 -1
  141. package/esm/src/utils/constants/server.js +0 -120
  142. package/esm/src/utils/feature-flags.d.ts +0 -7
  143. package/esm/src/utils/feature-flags.d.ts.map +0 -1
  144. package/esm/src/utils/feature-flags.js +0 -8
  145. package/esm/src/utils/hash-utils.d.ts +0 -19
  146. package/esm/src/utils/hash-utils.d.ts.map +0 -1
  147. package/esm/src/utils/hash-utils.js +0 -42
  148. package/esm/src/utils/import-lockfile.d.ts +0 -52
  149. package/esm/src/utils/import-lockfile.d.ts.map +0 -1
  150. package/esm/src/utils/import-lockfile.js +0 -187
  151. package/esm/src/utils/index.d.ts +0 -27
  152. package/esm/src/utils/index.d.ts.map +0 -1
  153. package/esm/src/utils/index.js +0 -25
  154. package/esm/src/utils/logger/components.d.ts +0 -73
  155. package/esm/src/utils/logger/components.d.ts.map +0 -1
  156. package/esm/src/utils/logger/components.js +0 -81
  157. package/esm/src/utils/logger/index.d.ts +0 -10
  158. package/esm/src/utils/logger/index.d.ts.map +0 -1
  159. package/esm/src/utils/logger/index.js +0 -9
  160. package/esm/src/utils/logger/request-context.d.ts +0 -27
  161. package/esm/src/utils/logger/request-context.d.ts.map +0 -1
  162. package/esm/src/utils/logger/request-context.js +0 -28
  163. package/esm/src/utils/memoize.d.ts +0 -19
  164. package/esm/src/utils/memoize.d.ts.map +0 -1
  165. package/esm/src/utils/memoize.js +0 -72
  166. package/esm/src/utils/parallel.d.ts +0 -25
  167. package/esm/src/utils/parallel.d.ts.map +0 -1
  168. package/esm/src/utils/parallel.js +0 -91
  169. package/esm/src/utils/path-utils.d.ts +0 -34
  170. package/esm/src/utils/path-utils.d.ts.map +0 -1
  171. package/esm/src/utils/path-utils.js +0 -138
  172. package/esm/src/utils/perf-timer.d.ts +0 -11
  173. package/esm/src/utils/perf-timer.d.ts.map +0 -1
  174. package/esm/src/utils/perf-timer.js +0 -114
  175. package/esm/src/utils/platform.d.ts +0 -9
  176. package/esm/src/utils/platform.d.ts.map +0 -1
  177. package/esm/src/utils/platform.js +0 -11
  178. package/esm/src/utils/runtime-guards.d.ts +0 -29
  179. package/esm/src/utils/runtime-guards.d.ts.map +0 -1
  180. package/esm/src/utils/runtime-guards.js +0 -23
@@ -1,114 +0,0 @@
1
- import { getEnv } from "../platform/compat/process.js";
2
- import { serverLogger } from "./logger/logger.js";
3
- const logger = serverLogger.component("perf");
4
- let cachedEnabled;
5
- function getEnabled() {
6
- if (cachedEnabled !== undefined)
7
- return cachedEnabled;
8
- // Read env directly to avoid triggering getEnvironmentConfig() at module-load time.
9
- // This module is imported before .env is loaded, so going through the config
10
- // pipeline produces a noisy early-access warning.
11
- cachedEnabled = getEnv("VERYFRONT_PERF") === "1";
12
- return cachedEnabled;
13
- }
14
- const timings = new Map();
15
- let currentRequestId = null;
16
- function formatMs(value) {
17
- return Number(value?.toFixed(1));
18
- }
19
- function formatPct(duration, total) {
20
- return ((duration / total) * 100).toFixed(1);
21
- }
22
- /** Request payload for start. */
23
- export function startRequest(requestId) {
24
- if (!getEnabled())
25
- return;
26
- currentRequestId = requestId;
27
- timings.set(requestId, []);
28
- }
29
- /** Starts timer. */
30
- export function startTimer(label, parent) {
31
- if (!getEnabled() || !currentRequestId)
32
- return () => { };
33
- const entry = { label, startMs: performance.now(), parent };
34
- timings.get(currentRequestId)?.push(entry);
35
- return () => {
36
- entry.endMs = performance.now();
37
- entry.durationMs = entry.endMs - entry.startMs;
38
- };
39
- }
40
- /** Time async. */
41
- export async function timeAsync(label, fn, parent) {
42
- if (!getEnabled())
43
- return fn();
44
- const stop = startTimer(label, parent);
45
- try {
46
- return await fn();
47
- }
48
- finally {
49
- stop();
50
- }
51
- }
52
- /** Request payload for end. */
53
- export function endRequest(requestId) {
54
- if (!getEnabled())
55
- return;
56
- const entries = timings.get(requestId);
57
- if (!entries?.length) {
58
- currentRequestId = null;
59
- return;
60
- }
61
- const sorted = entries
62
- .filter((e) => e.durationMs !== undefined)
63
- .sort((a, b) => (b.durationMs ?? 0) - (a.durationMs ?? 0));
64
- const total = entries.find((e) => e.label === "total")?.durationMs ??
65
- sorted.reduce((sum, e) => sum + (e.durationMs ?? 0), 0);
66
- const roots = sorted.filter((e) => !e.parent);
67
- const children = new Map();
68
- for (const entry of sorted) {
69
- const parentLabel = entry.parent;
70
- if (!parentLabel)
71
- continue;
72
- const list = children.get(parentLabel);
73
- if (list) {
74
- list.push(entry);
75
- }
76
- else {
77
- children.set(parentLabel, [entry]);
78
- }
79
- }
80
- const breakdown = roots.map((entry) => {
81
- const duration = entry.durationMs ?? 0;
82
- const item = {
83
- label: entry.label,
84
- durationMs: formatMs(entry.durationMs),
85
- pct: formatPct(duration, total),
86
- };
87
- const childList = children.get(entry.label);
88
- if (!childList)
89
- return item;
90
- item.children = childList.slice(0, 5).map((child) => {
91
- const childDuration = child.durationMs ?? 0;
92
- return {
93
- label: child.label,
94
- durationMs: formatMs(child.durationMs),
95
- pct: formatPct(childDuration, total),
96
- };
97
- });
98
- if (childList.length > 5) {
99
- item.childrenOmitted = childList.length - 5;
100
- }
101
- return item;
102
- });
103
- logger.debug(`Request ${requestId}`, {
104
- requestId,
105
- totalMs: formatMs(total),
106
- breakdown,
107
- });
108
- timings.delete(requestId);
109
- currentRequestId = null;
110
- }
111
- /** Check whether request performance timing is enabled. */
112
- export function isEnabled() {
113
- return getEnabled();
114
- }
@@ -1,9 +0,0 @@
1
- /**
2
- * Platform detection utilities
3
- */
4
- /**
5
- * Detect if the code is running in a compiled Deno binary
6
- * @returns true if running in a compiled binary, false otherwise
7
- */
8
- export declare function isCompiledBinary(): boolean;
9
- //# sourceMappingURL=platform.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../../src/src/utils/platform.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C"}
@@ -1,11 +0,0 @@
1
- /**
2
- * Platform detection utilities
3
- */
4
- import { isDenoCompiled } from "../platform/compat/runtime.js";
5
- /**
6
- * Detect if the code is running in a compiled Deno binary
7
- * @returns true if running in a compiled binary, false otherwise
8
- */
9
- export function isCompiledBinary() {
10
- return isDenoCompiled;
11
- }
@@ -1,29 +0,0 @@
1
- /** Public API contract for global with Deno. */
2
- export interface GlobalWithDeno {
3
- Deno?: {
4
- env: {
5
- get(key: string): string | undefined;
6
- };
7
- };
8
- }
9
- /** Public API contract for global with process. */
10
- export interface GlobalWithProcess {
11
- process?: {
12
- env: Record<string, string | undefined>;
13
- version?: string;
14
- versions?: Record<string, string>;
15
- };
16
- }
17
- /** Public API contract for global with Bun. */
18
- export interface GlobalWithBun {
19
- Bun?: {
20
- version: string;
21
- };
22
- }
23
- /** Check whether Deno runtime is present. */
24
- export declare function hasDenoRuntime(global: unknown): global is GlobalWithDeno;
25
- /** Check whether node process is present. */
26
- export declare function hasNodeProcess(global: unknown): global is GlobalWithProcess;
27
- /** Check whether Bun runtime is present. */
28
- export declare function hasBunRuntime(global: unknown): global is GlobalWithBun;
29
- //# sourceMappingURL=runtime-guards.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime-guards.d.ts","sourceRoot":"","sources":["../../../src/src/utils/runtime-guards.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE;QACL,GAAG,EAAE;YACH,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;SACtC,CAAC;KACH,CAAC;CACH;AAED,mDAAmD;AACnD,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE;QACR,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;QACxC,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACnC,CAAC;CACH;AAED,+CAA+C;AAC/C,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE;QACJ,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAMD,6CAA6C;AAC7C,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,cAAc,CAIxE;AAED,6CAA6C;AAC7C,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,iBAAiB,CAI3E;AAED,4CAA4C;AAC5C,wBAAgB,aAAa,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,aAAa,CAGtE"}
@@ -1,23 +0,0 @@
1
- function isObject(value) {
2
- return typeof value === "object" && value !== null;
3
- }
4
- /** Check whether Deno runtime is present. */
5
- export function hasDenoRuntime(global) {
6
- if (!isObject(global) || !("Deno" in global))
7
- return false;
8
- const denoObj = global.Deno;
9
- return typeof denoObj?.env?.get === "function";
10
- }
11
- /** Check whether node process is present. */
12
- export function hasNodeProcess(global) {
13
- if (!isObject(global) || !("process" in global))
14
- return false;
15
- const processObj = global.process;
16
- return typeof processObj?.env === "object";
17
- }
18
- /** Check whether Bun runtime is present. */
19
- export function hasBunRuntime(global) {
20
- if (!isObject(global) || !("Bun" in global))
21
- return false;
22
- return global.Bun !== undefined;
23
- }