@veryfront/ext-content-mdx 0.1.985
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/LICENSE +202 -0
- package/NOTICE +2 -0
- package/README.md +42 -0
- package/esm/_dnt.polyfills.d.ts +18 -0
- package/esm/_dnt.polyfills.d.ts.map +1 -0
- package/esm/_dnt.polyfills.js +15 -0
- package/esm/_dnt.shims.d.ts +12 -0
- package/esm/_dnt.shims.d.ts.map +1 -0
- package/esm/_dnt.shims.js +68 -0
- package/esm/deno.d.ts +427 -0
- package/esm/deno.d.ts.map +1 -0
- package/esm/deno.js +512 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_chars.d.ts +33 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_chars.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_chars.js +48 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_loader_state.d.ts +64 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_loader_state.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_loader_state.js +1371 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_schema.d.ts +44 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_schema.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_schema.js +117 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/binary.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/binary.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/binary.js +103 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/bool.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/bool.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/bool.js +32 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/float.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/float.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/float.js +96 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/int.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/int.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/int.js +159 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/map.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/map.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/map.js +14 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/merge.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/merge.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/merge.js +10 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/nil.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/nil.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/nil.js +22 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/omap.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/omap.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/omap.js +29 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/pairs.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/pairs.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/pairs.js +19 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/regexp.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/regexp.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/regexp.js +30 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/seq.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/seq.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/seq.js +10 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/set.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/set.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/set.js +14 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/str.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/str.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/str.js +9 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/timestamp.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/timestamp.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/timestamp.js +81 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/undefined.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/undefined.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/undefined.js +20 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type.d.ts +32 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type.js +6 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_utils.d.ts +4 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_utils.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_utils.js +13 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/parse.d.ts +76 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/parse.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/parse.js +91 -0
- package/esm/extensions/ext-content-mdx/src/compiler/markdown-compile.d.ts +3 -0
- package/esm/extensions/ext-content-mdx/src/compiler/markdown-compile.d.ts.map +1 -0
- package/esm/extensions/ext-content-mdx/src/compiler/markdown-compile.js +99 -0
- package/esm/extensions/ext-content-mdx/src/compiler/mdx-compile.d.ts +3 -0
- package/esm/extensions/ext-content-mdx/src/compiler/mdx-compile.d.ts.map +1 -0
- package/esm/extensions/ext-content-mdx/src/compiler/mdx-compile.js +53 -0
- package/esm/extensions/ext-content-mdx/src/index.d.ts +31 -0
- package/esm/extensions/ext-content-mdx/src/index.d.ts.map +1 -0
- package/esm/extensions/ext-content-mdx/src/index.js +56 -0
- package/esm/extensions/ext-content-mdx/src/plugins/plugin-loader.d.ts +4 -0
- package/esm/extensions/ext-content-mdx/src/plugins/plugin-loader.d.ts.map +1 -0
- package/esm/extensions/ext-content-mdx/src/plugins/plugin-loader.js +18 -0
- package/esm/extensions/ext-content-mdx/src/plugins/rehype-node-positions.d.ts +20 -0
- package/esm/extensions/ext-content-mdx/src/plugins/rehype-node-positions.d.ts.map +1 -0
- package/esm/extensions/ext-content-mdx/src/plugins/rehype-node-positions.js +45 -0
- package/esm/extensions/ext-content-mdx/src/plugins/remark-headings.d.ts +4 -0
- package/esm/extensions/ext-content-mdx/src/plugins/remark-headings.d.ts.map +1 -0
- package/esm/extensions/ext-content-mdx/src/plugins/remark-headings.js +69 -0
- package/esm/extensions/ext-content-mdx/src/plugins/remark-mdx-utils.d.ts +14 -0
- package/esm/extensions/ext-content-mdx/src/plugins/remark-mdx-utils.d.ts.map +1 -0
- package/esm/extensions/ext-content-mdx/src/plugins/remark-mdx-utils.js +191 -0
- package/esm/package.json +3 -0
- package/esm/src/config/defaults.d.ts +39 -0
- package/esm/src/config/defaults.d.ts.map +1 -0
- package/esm/src/config/defaults.js +65 -0
- package/esm/src/errors/error-registry/agent.d.ts +18 -0
- package/esm/src/errors/error-registry/agent.d.ts.map +1 -0
- package/esm/src/errors/error-registry/agent.js +60 -0
- package/esm/src/errors/error-registry/boundary.d.ts +16 -0
- package/esm/src/errors/error-registry/boundary.d.ts.map +1 -0
- package/esm/src/errors/error-registry/boundary.js +52 -0
- package/esm/src/errors/error-registry/build.d.ts +20 -0
- package/esm/src/errors/error-registry/build.d.ts.map +1 -0
- package/esm/src/errors/error-registry/build.js +68 -0
- package/esm/src/errors/error-registry/config.d.ts +22 -0
- package/esm/src/errors/error-registry/config.d.ts.map +1 -0
- package/esm/src/errors/error-registry/config.js +70 -0
- package/esm/src/errors/error-registry/deploy.d.ts +12 -0
- package/esm/src/errors/error-registry/deploy.d.ts.map +1 -0
- package/esm/src/errors/error-registry/deploy.js +36 -0
- package/esm/src/errors/error-registry/dev.d.ts +14 -0
- package/esm/src/errors/error-registry/dev.d.ts.map +1 -0
- package/esm/src/errors/error-registry/dev.js +44 -0
- package/esm/src/errors/error-registry/general.d.ts +29 -0
- package/esm/src/errors/error-registry/general.d.ts.map +1 -0
- package/esm/src/errors/error-registry/general.js +92 -0
- package/esm/src/errors/error-registry/module.d.ts +16 -0
- package/esm/src/errors/error-registry/module.d.ts.map +1 -0
- package/esm/src/errors/error-registry/module.js +52 -0
- package/esm/src/errors/error-registry/route.d.ts +16 -0
- package/esm/src/errors/error-registry/route.d.ts.map +1 -0
- package/esm/src/errors/error-registry/route.js +52 -0
- package/esm/src/errors/error-registry/runtime.d.ts +18 -0
- package/esm/src/errors/error-registry/runtime.d.ts.map +1 -0
- package/esm/src/errors/error-registry/runtime.js +60 -0
- package/esm/src/errors/error-registry/server.d.ts +39 -0
- package/esm/src/errors/error-registry/server.d.ts.map +1 -0
- package/esm/src/errors/error-registry/server.js +129 -0
- package/esm/src/errors/error-registry-helpers.d.ts +6 -0
- package/esm/src/errors/error-registry-helpers.d.ts.map +1 -0
- package/esm/src/errors/error-registry-helpers.js +9 -0
- package/esm/src/errors/error-registry.d.ts +114 -0
- package/esm/src/errors/error-registry.d.ts.map +1 -0
- package/esm/src/errors/error-registry.js +60 -0
- package/esm/src/errors/types.d.ts +84 -0
- package/esm/src/errors/types.d.ts.map +1 -0
- package/esm/src/errors/types.js +69 -0
- package/esm/src/errors/veryfront-error.d.ts +149 -0
- package/esm/src/errors/veryfront-error.d.ts.map +1 -0
- package/esm/src/errors/veryfront-error.js +61 -0
- package/esm/src/modules/react-loader/ssr-module-loader/concurrency/semaphore.d.ts +13 -0
- package/esm/src/modules/react-loader/ssr-module-loader/concurrency/semaphore.d.ts.map +1 -0
- package/esm/src/modules/react-loader/ssr-module-loader/concurrency/semaphore.js +55 -0
- package/esm/src/observability/tracing/api-shim.d.ts +178 -0
- package/esm/src/observability/tracing/api-shim.d.ts.map +1 -0
- package/esm/src/observability/tracing/api-shim.js +241 -0
- package/esm/src/observability/tracing/otlp-setup.d.ts +56 -0
- package/esm/src/observability/tracing/otlp-setup.d.ts.map +1 -0
- package/esm/src/observability/tracing/otlp-setup.js +206 -0
- package/esm/src/observability/tracing/telemetry-env.d.ts +3 -0
- package/esm/src/observability/tracing/telemetry-env.d.ts.map +1 -0
- package/esm/src/observability/tracing/telemetry-env.js +10 -0
- package/esm/src/platform/adapters/base.d.ts +188 -0
- package/esm/src/platform/adapters/base.d.ts.map +1 -0
- package/esm/src/platform/adapters/base.js +15 -0
- package/esm/src/platform/compat/constants.d.ts +13 -0
- package/esm/src/platform/compat/constants.d.ts.map +1 -0
- package/esm/src/platform/compat/constants.js +12 -0
- package/esm/src/platform/compat/dynamic-import.d.ts +11 -0
- package/esm/src/platform/compat/dynamic-import.d.ts.map +1 -0
- package/esm/src/platform/compat/dynamic-import.js +10 -0
- package/esm/src/platform/compat/fs.d.ts +71 -0
- package/esm/src/platform/compat/fs.d.ts.map +1 -0
- package/esm/src/platform/compat/fs.js +277 -0
- package/esm/src/platform/compat/path/basic-operations.d.ts +9 -0
- package/esm/src/platform/compat/path/basic-operations.d.ts.map +1 -0
- package/esm/src/platform/compat/path/basic-operations.js +56 -0
- package/esm/src/platform/compat/path/index.d.ts +13 -0
- package/esm/src/platform/compat/path/index.d.ts.map +1 -0
- package/esm/src/platform/compat/path/index.js +11 -0
- package/esm/src/platform/compat/path/parse-format.d.ts +4 -0
- package/esm/src/platform/compat/path/parse-format.d.ts.map +1 -0
- package/esm/src/platform/compat/path/parse-format.js +26 -0
- package/esm/src/platform/compat/path/resolution.d.ts +6 -0
- package/esm/src/platform/compat/path/resolution.d.ts.map +1 -0
- package/esm/src/platform/compat/path/resolution.js +121 -0
- package/esm/src/platform/compat/path/runtime.d.ts +8 -0
- package/esm/src/platform/compat/path/runtime.d.ts.map +1 -0
- package/esm/src/platform/compat/path/runtime.js +20 -0
- package/esm/src/platform/compat/path/security.d.ts +2 -0
- package/esm/src/platform/compat/path/security.d.ts.map +1 -0
- package/esm/src/platform/compat/path/security.js +24 -0
- package/esm/src/platform/compat/path/types.d.ts +22 -0
- package/esm/src/platform/compat/path/types.d.ts.map +1 -0
- package/esm/src/platform/compat/path/types.js +1 -0
- package/esm/src/platform/compat/path/url-conversion.d.ts +3 -0
- package/esm/src/platform/compat/path/url-conversion.d.ts.map +1 -0
- package/esm/src/platform/compat/path/url-conversion.js +45 -0
- package/esm/src/platform/compat/process/command.d.ts +31 -0
- package/esm/src/platform/compat/process/command.d.ts.map +1 -0
- package/esm/src/platform/compat/process/command.js +194 -0
- package/esm/src/platform/compat/process/env.d.ts +35 -0
- package/esm/src/platform/compat/process/env.d.ts.map +1 -0
- package/esm/src/platform/compat/process/env.js +194 -0
- package/esm/src/platform/compat/process/lifecycle.d.ts +99 -0
- package/esm/src/platform/compat/process/lifecycle.d.ts.map +1 -0
- package/esm/src/platform/compat/process/lifecycle.js +327 -0
- package/esm/src/platform/compat/process/runtime-process.d.ts +10 -0
- package/esm/src/platform/compat/process/runtime-process.d.ts.map +1 -0
- package/esm/src/platform/compat/process/runtime-process.js +25 -0
- package/esm/src/platform/compat/process.d.ts +5 -0
- package/esm/src/platform/compat/process.d.ts.map +1 -0
- package/esm/src/platform/compat/process.js +4 -0
- package/esm/src/platform/compat/runtime.d.ts +51 -0
- package/esm/src/platform/compat/runtime.d.ts.map +1 -0
- package/esm/src/platform/compat/runtime.js +101 -0
- package/esm/src/platform/compat/std/front-matter-yaml.d.ts +13 -0
- package/esm/src/platform/compat/std/front-matter-yaml.d.ts.map +1 -0
- package/esm/src/platform/compat/std/front-matter-yaml.js +28 -0
- package/esm/src/transforms/import-rewriter/url-builder.d.ts +70 -0
- package/esm/src/transforms/import-rewriter/url-builder.d.ts.map +1 -0
- package/esm/src/transforms/import-rewriter/url-builder.js +152 -0
- package/esm/src/transforms/md/utils.d.ts +14 -0
- package/esm/src/transforms/md/utils.d.ts.map +1 -0
- package/esm/src/transforms/md/utils.js +17 -0
- package/esm/src/transforms/mdx/compiler/frontmatter-extractor.d.ts +6 -0
- package/esm/src/transforms/mdx/compiler/frontmatter-extractor.d.ts.map +1 -0
- package/esm/src/transforms/mdx/compiler/frontmatter-extractor.js +48 -0
- package/esm/src/transforms/mdx/compiler/import-rewriter.d.ts +10 -0
- package/esm/src/transforms/mdx/compiler/import-rewriter.d.ts.map +1 -0
- package/esm/src/transforms/mdx/compiler/import-rewriter.js +87 -0
- package/esm/src/utils/base64url.d.ts +6 -0
- package/esm/src/utils/base64url.d.ts.map +1 -0
- package/esm/src/utils/base64url.js +12 -0
- package/esm/src/utils/bundle-manifest.d.ts +63 -0
- package/esm/src/utils/bundle-manifest.d.ts.map +1 -0
- package/esm/src/utils/bundle-manifest.js +96 -0
- package/esm/src/utils/constants/buffers.d.ts +24 -0
- package/esm/src/utils/constants/buffers.d.ts.map +1 -0
- package/esm/src/utils/constants/buffers.js +23 -0
- package/esm/src/utils/constants/build.d.ts +8 -0
- package/esm/src/utils/constants/build.d.ts.map +1 -0
- package/esm/src/utils/constants/build.js +7 -0
- package/esm/src/utils/constants/cache.d.ts +74 -0
- package/esm/src/utils/constants/cache.d.ts.map +1 -0
- package/esm/src/utils/constants/cache.js +133 -0
- package/esm/src/utils/constants/cdn.d.ts +29 -0
- package/esm/src/utils/constants/cdn.d.ts.map +1 -0
- package/esm/src/utils/constants/cdn.js +58 -0
- package/esm/src/utils/constants/crypto.d.ts +10 -0
- package/esm/src/utils/constants/crypto.d.ts.map +1 -0
- package/esm/src/utils/constants/crypto.js +9 -0
- package/esm/src/utils/constants/env.d.ts +16 -0
- package/esm/src/utils/constants/env.d.ts.map +1 -0
- package/esm/src/utils/constants/env.js +20 -0
- package/esm/src/utils/constants/hash.d.ts +5 -0
- package/esm/src/utils/constants/hash.d.ts.map +1 -0
- package/esm/src/utils/constants/hash.js +4 -0
- package/esm/src/utils/constants/hmr.d.ts +24 -0
- package/esm/src/utils/constants/hmr.d.ts.map +1 -0
- package/esm/src/utils/constants/hmr.js +26 -0
- package/esm/src/utils/constants/html.d.ts +13 -0
- package/esm/src/utils/constants/html.d.ts.map +1 -0
- package/esm/src/utils/constants/html.js +12 -0
- package/esm/src/utils/constants/http.d.ts +77 -0
- package/esm/src/utils/constants/http.d.ts.map +1 -0
- package/esm/src/utils/constants/http.js +76 -0
- package/esm/src/utils/constants/index.d.ts +23 -0
- package/esm/src/utils/constants/index.d.ts.map +1 -0
- package/esm/src/utils/constants/index.js +22 -0
- package/esm/src/utils/constants/limits.d.ts +27 -0
- package/esm/src/utils/constants/limits.d.ts.map +1 -0
- package/esm/src/utils/constants/limits.js +26 -0
- package/esm/src/utils/constants/metrics.d.ts +10 -0
- package/esm/src/utils/constants/metrics.d.ts.map +1 -0
- package/esm/src/utils/constants/metrics.js +34 -0
- package/esm/src/utils/constants/network.d.ts +23 -0
- package/esm/src/utils/constants/network.d.ts.map +1 -0
- package/esm/src/utils/constants/network.js +27 -0
- package/esm/src/utils/constants/priorities.d.ts +31 -0
- package/esm/src/utils/constants/priorities.d.ts.map +1 -0
- package/esm/src/utils/constants/priorities.js +30 -0
- package/esm/src/utils/constants/retry.d.ts +14 -0
- package/esm/src/utils/constants/retry.d.ts.map +1 -0
- package/esm/src/utils/constants/retry.js +13 -0
- package/esm/src/utils/constants/security.d.ts +16 -0
- package/esm/src/utils/constants/security.d.ts.map +1 -0
- package/esm/src/utils/constants/security.js +15 -0
- package/esm/src/utils/constants/server.d.ts +107 -0
- package/esm/src/utils/constants/server.d.ts.map +1 -0
- package/esm/src/utils/constants/server.js +120 -0
- package/esm/src/utils/feature-flags.d.ts +7 -0
- package/esm/src/utils/feature-flags.d.ts.map +1 -0
- package/esm/src/utils/feature-flags.js +8 -0
- package/esm/src/utils/hash-utils.d.ts +19 -0
- package/esm/src/utils/hash-utils.d.ts.map +1 -0
- package/esm/src/utils/hash-utils.js +42 -0
- package/esm/src/utils/import-lockfile.d.ts +52 -0
- package/esm/src/utils/import-lockfile.d.ts.map +1 -0
- package/esm/src/utils/import-lockfile.js +187 -0
- package/esm/src/utils/index.d.ts +27 -0
- package/esm/src/utils/index.d.ts.map +1 -0
- package/esm/src/utils/index.js +25 -0
- package/esm/src/utils/logger/components.d.ts +73 -0
- package/esm/src/utils/logger/components.d.ts.map +1 -0
- package/esm/src/utils/logger/components.js +81 -0
- package/esm/src/utils/logger/core.d.ts +73 -0
- package/esm/src/utils/logger/core.d.ts.map +1 -0
- package/esm/src/utils/logger/core.js +143 -0
- package/esm/src/utils/logger/index.d.ts +10 -0
- package/esm/src/utils/logger/index.d.ts.map +1 -0
- package/esm/src/utils/logger/index.js +9 -0
- package/esm/src/utils/logger/logger.d.ts +166 -0
- package/esm/src/utils/logger/logger.d.ts.map +1 -0
- package/esm/src/utils/logger/logger.js +445 -0
- package/esm/src/utils/logger/redact.d.ts +74 -0
- package/esm/src/utils/logger/redact.d.ts.map +1 -0
- package/esm/src/utils/logger/redact.js +294 -0
- package/esm/src/utils/logger/request-context.d.ts +27 -0
- package/esm/src/utils/logger/request-context.d.ts.map +1 -0
- package/esm/src/utils/logger/request-context.js +28 -0
- package/esm/src/utils/memoize.d.ts +19 -0
- package/esm/src/utils/memoize.d.ts.map +1 -0
- package/esm/src/utils/memoize.js +72 -0
- package/esm/src/utils/parallel.d.ts +25 -0
- package/esm/src/utils/parallel.d.ts.map +1 -0
- package/esm/src/utils/parallel.js +91 -0
- package/esm/src/utils/path-utils.d.ts +34 -0
- package/esm/src/utils/path-utils.d.ts.map +1 -0
- package/esm/src/utils/path-utils.js +138 -0
- package/esm/src/utils/perf-timer.d.ts +11 -0
- package/esm/src/utils/perf-timer.d.ts.map +1 -0
- package/esm/src/utils/perf-timer.js +114 -0
- package/esm/src/utils/platform.d.ts +9 -0
- package/esm/src/utils/platform.d.ts.map +1 -0
- package/esm/src/utils/platform.js +20 -0
- package/esm/src/utils/runtime-guards.d.ts +29 -0
- package/esm/src/utils/runtime-guards.d.ts.map +1 -0
- package/esm/src/utils/runtime-guards.js +23 -0
- package/esm/src/utils/version-constant.d.ts +3 -0
- package/esm/src/utils/version-constant.d.ts.map +1 -0
- package/esm/src/utils/version-constant.js +4 -0
- package/esm/src/utils/version.d.ts +17 -0
- package/esm/src/utils/version.d.ts.map +1 -0
- package/esm/src/utils/version.js +36 -0
- package/package.json +80 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export const DEFAULT_DEV_SERVER_PORT = 3000;
|
|
2
|
+
export const DEFAULT_REDIS_PORT = 6379;
|
|
3
|
+
export const DEFAULT_API_SERVER_PORT = 8080;
|
|
4
|
+
export const DEFAULT_PREVIEW_SERVER_PORT = 5000;
|
|
5
|
+
export const DEFAULT_METRICS_PORT = 9000;
|
|
6
|
+
/** Shared bytes per kb value. */
|
|
7
|
+
export const BYTES_PER_KB = 1024;
|
|
8
|
+
export const BYTES_PER_MB = BYTES_PER_KB * BYTES_PER_KB;
|
|
9
|
+
export const DEFAULT_IMAGE_THUMBNAIL_SIZE = 256;
|
|
10
|
+
export const DEFAULT_IMAGE_SMALL_SIZE = 512;
|
|
11
|
+
export const DEFAULT_IMAGE_LARGE_SIZE = 2048;
|
|
12
|
+
export const RESPONSIVE_IMAGE_WIDTH_XS = 320;
|
|
13
|
+
export const RESPONSIVE_IMAGE_WIDTH_SM = 640;
|
|
14
|
+
export const RESPONSIVE_IMAGE_WIDTH_MD = 1024;
|
|
15
|
+
/** Shared responsive image width lg value. */
|
|
16
|
+
export const RESPONSIVE_IMAGE_WIDTH_LG = 1920;
|
|
17
|
+
/** Shared responsive image widths value. */
|
|
18
|
+
export const RESPONSIVE_IMAGE_WIDTHS = [
|
|
19
|
+
RESPONSIVE_IMAGE_WIDTH_XS,
|
|
20
|
+
RESPONSIVE_IMAGE_WIDTH_SM,
|
|
21
|
+
RESPONSIVE_IMAGE_WIDTH_MD,
|
|
22
|
+
RESPONSIVE_IMAGE_WIDTH_LG,
|
|
23
|
+
];
|
|
24
|
+
export const MAX_CHUNK_SIZE_KB = 4096;
|
|
25
|
+
export const MIN_PORT = 1;
|
|
26
|
+
export const MAX_PORT = 65535;
|
|
27
|
+
export const DEFAULT_SERVER_PORT = 8000;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Handler priority constants - lower numbers run first.
|
|
3
|
+
* CRITICAL(0) -> VERY_HIGH(50) -> HIGH(100-300) -> MEDIUM(400-700) -> LOW(1000) -> FALLBACK(10000)
|
|
4
|
+
*/
|
|
5
|
+
export declare const PRIORITY_CRITICAL = 0;
|
|
6
|
+
export declare const PRIORITY_VERY_HIGH = 50;
|
|
7
|
+
export declare const PRIORITY_HIGH = 100;
|
|
8
|
+
export declare const PRIORITY_HIGH_CLIENT_LOG = 200;
|
|
9
|
+
export declare const PRIORITY_HIGH_DEV = 300;
|
|
10
|
+
export declare const PRIORITY_MEDIUM_DEV_FILES = 400;
|
|
11
|
+
export declare const PRIORITY_MEDIUM_STATIC = 500;
|
|
12
|
+
export declare const PRIORITY_MEDIUM_LIB_MODULES = 550;
|
|
13
|
+
export declare const PRIORITY_MEDIUM = 600;
|
|
14
|
+
export declare const PRIORITY_MEDIUM_API = 700;
|
|
15
|
+
export declare const PRIORITY_LOW = 1000;
|
|
16
|
+
export declare const PRIORITY_FALLBACK = 10000;
|
|
17
|
+
export declare const HANDLER_PRIORITIES: {
|
|
18
|
+
readonly CRITICAL: 0;
|
|
19
|
+
readonly VERY_HIGH: 50;
|
|
20
|
+
readonly HIGH: 100;
|
|
21
|
+
readonly HIGH_CLIENT_LOG: 200;
|
|
22
|
+
readonly HIGH_DEV: 300;
|
|
23
|
+
readonly MEDIUM_DEV_FILES: 400;
|
|
24
|
+
readonly MEDIUM_STATIC: 500;
|
|
25
|
+
readonly MEDIUM_LIB_MODULES: 550;
|
|
26
|
+
readonly MEDIUM: 600;
|
|
27
|
+
readonly MEDIUM_API: 700;
|
|
28
|
+
readonly LOW: 1000;
|
|
29
|
+
readonly FALLBACK: 10000;
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=priorities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"priorities.d.ts","sourceRoot":"","sources":["../../../../src/src/utils/constants/priorities.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,aAAa,MAAM,CAAC;AACjC,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAC5C,eAAO,MAAM,iBAAiB,MAAM,CAAC;AACrC,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAC7C,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAC1C,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAC/C,eAAO,MAAM,eAAe,MAAM,CAAC;AACnC,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,eAAO,MAAM,YAAY,OAAO,CAAC;AACjC,eAAO,MAAM,iBAAiB,QAAQ,CAAC;AAEvC,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;CAarB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Handler priority constants - lower numbers run first.
|
|
3
|
+
* CRITICAL(0) -> VERY_HIGH(50) -> HIGH(100-300) -> MEDIUM(400-700) -> LOW(1000) -> FALLBACK(10000)
|
|
4
|
+
*/
|
|
5
|
+
export const PRIORITY_CRITICAL = 0;
|
|
6
|
+
export const PRIORITY_VERY_HIGH = 50;
|
|
7
|
+
export const PRIORITY_HIGH = 100;
|
|
8
|
+
export const PRIORITY_HIGH_CLIENT_LOG = 200;
|
|
9
|
+
export const PRIORITY_HIGH_DEV = 300;
|
|
10
|
+
export const PRIORITY_MEDIUM_DEV_FILES = 400;
|
|
11
|
+
export const PRIORITY_MEDIUM_STATIC = 500;
|
|
12
|
+
export const PRIORITY_MEDIUM_LIB_MODULES = 550;
|
|
13
|
+
export const PRIORITY_MEDIUM = 600;
|
|
14
|
+
export const PRIORITY_MEDIUM_API = 700;
|
|
15
|
+
export const PRIORITY_LOW = 1000;
|
|
16
|
+
export const PRIORITY_FALLBACK = 10000;
|
|
17
|
+
export const HANDLER_PRIORITIES = {
|
|
18
|
+
CRITICAL: PRIORITY_CRITICAL,
|
|
19
|
+
VERY_HIGH: PRIORITY_VERY_HIGH,
|
|
20
|
+
HIGH: PRIORITY_HIGH,
|
|
21
|
+
HIGH_CLIENT_LOG: PRIORITY_HIGH_CLIENT_LOG,
|
|
22
|
+
HIGH_DEV: PRIORITY_HIGH_DEV,
|
|
23
|
+
MEDIUM_DEV_FILES: PRIORITY_MEDIUM_DEV_FILES,
|
|
24
|
+
MEDIUM_STATIC: PRIORITY_MEDIUM_STATIC,
|
|
25
|
+
MEDIUM_LIB_MODULES: PRIORITY_MEDIUM_LIB_MODULES,
|
|
26
|
+
MEDIUM: PRIORITY_MEDIUM,
|
|
27
|
+
MEDIUM_API: PRIORITY_MEDIUM_API,
|
|
28
|
+
LOW: PRIORITY_LOW,
|
|
29
|
+
FALLBACK: PRIORITY_FALLBACK,
|
|
30
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const DEFAULT_RETRY_MAX_ATTEMPTS = 3;
|
|
2
|
+
export declare const DEFAULT_RETRY_INITIAL_DELAY_MS = 100;
|
|
3
|
+
export declare const DEFAULT_RETRY_MAX_DELAY_MS = 5000;
|
|
4
|
+
export declare const DEFAULT_RETRY_BACKOFF_MULTIPLIER = 2;
|
|
5
|
+
export declare const API_RETRY_MAX_ATTEMPTS = 3;
|
|
6
|
+
export declare const API_RETRY_INITIAL_DELAY_MS = 1000;
|
|
7
|
+
export declare const API_RETRY_MAX_DELAY_MS = 10000;
|
|
8
|
+
export declare const FS_RETRY_MAX_ATTEMPTS = 3;
|
|
9
|
+
export declare const FS_RETRY_INITIAL_DELAY_MS = 1000;
|
|
10
|
+
export declare const FS_RETRY_MAX_DELAY_MS = 10000;
|
|
11
|
+
export declare const WS_RECONNECT_MAX_ATTEMPTS = 5;
|
|
12
|
+
export declare const WS_RECONNECT_INITIAL_DELAY_MS = 1000;
|
|
13
|
+
export declare const WS_RECONNECT_MAX_DELAY_MS = 30000;
|
|
14
|
+
//# sourceMappingURL=retry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../../../../src/src/utils/constants/retry.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAC5C,eAAO,MAAM,8BAA8B,MAAM,CAAC;AAClD,eAAO,MAAM,0BAA0B,OAAO,CAAC;AAC/C,eAAO,MAAM,gCAAgC,IAAI,CAAC;AAElD,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,0BAA0B,OAAO,CAAC;AAC/C,eAAO,MAAM,sBAAsB,QAAQ,CAAC;AAE5C,eAAO,MAAM,qBAAqB,IAAI,CAAC;AACvC,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAC9C,eAAO,MAAM,qBAAqB,QAAQ,CAAC;AAE3C,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAC3C,eAAO,MAAM,6BAA6B,OAAO,CAAC;AAClD,eAAO,MAAM,yBAAyB,QAAQ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const DEFAULT_RETRY_MAX_ATTEMPTS = 3;
|
|
2
|
+
export const DEFAULT_RETRY_INITIAL_DELAY_MS = 100;
|
|
3
|
+
export const DEFAULT_RETRY_MAX_DELAY_MS = 5000;
|
|
4
|
+
export const DEFAULT_RETRY_BACKOFF_MULTIPLIER = 2;
|
|
5
|
+
export const API_RETRY_MAX_ATTEMPTS = 3;
|
|
6
|
+
export const API_RETRY_INITIAL_DELAY_MS = 1000;
|
|
7
|
+
export const API_RETRY_MAX_DELAY_MS = 10000;
|
|
8
|
+
export const FS_RETRY_MAX_ATTEMPTS = 3;
|
|
9
|
+
export const FS_RETRY_INITIAL_DELAY_MS = 1000;
|
|
10
|
+
export const FS_RETRY_MAX_DELAY_MS = 10000;
|
|
11
|
+
export const WS_RECONNECT_MAX_ATTEMPTS = 5;
|
|
12
|
+
export const WS_RECONNECT_INITIAL_DELAY_MS = 1000;
|
|
13
|
+
export const WS_RECONNECT_MAX_DELAY_MS = 30000;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Maximum value for path traversal depth. */
|
|
2
|
+
export declare const MAX_PATH_TRAVERSAL_DEPTH = 10;
|
|
3
|
+
/** Shared forbidden path patterns value. */
|
|
4
|
+
export declare const FORBIDDEN_PATH_PATTERNS: RegExp[];
|
|
5
|
+
/**
|
|
6
|
+
* Fast-match pattern for common vulnerability scanner probe paths.
|
|
7
|
+
* Keep this scoped to root-level probe paths so valid nested application
|
|
8
|
+
* routes are not accidentally blocked.
|
|
9
|
+
*/
|
|
10
|
+
export declare const SCANNER_PATH_PATTERN: RegExp;
|
|
11
|
+
export declare const DIRECTORY_TRAVERSAL_PATTERN: RegExp;
|
|
12
|
+
export declare const ABSOLUTE_PATH_PATTERN: RegExp;
|
|
13
|
+
/** Maximum value for path length. */
|
|
14
|
+
export declare const MAX_PATH_LENGTH = 4096;
|
|
15
|
+
export declare const DEFAULT_MAX_STRING_LENGTH = 1000;
|
|
16
|
+
//# sourceMappingURL=security.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../../../../src/src/utils/constants/security.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAC3C,4CAA4C;AAC5C,eAAO,MAAM,uBAAuB,UAAS,CAAC;AAE9C;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,QACkG,CAAC;AACpI,eAAO,MAAM,2BAA2B,QAAe,CAAC;AACxD,eAAO,MAAM,qBAAqB,QAAY,CAAC;AAC/C,qCAAqC;AACrC,eAAO,MAAM,eAAe,OAAO,CAAC;AACpC,eAAO,MAAM,yBAAyB,OAAO,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Maximum value for path traversal depth. */
|
|
2
|
+
export const MAX_PATH_TRAVERSAL_DEPTH = 10;
|
|
3
|
+
/** Shared forbidden path patterns value. */
|
|
4
|
+
export const FORBIDDEN_PATH_PATTERNS = [/\0/];
|
|
5
|
+
/**
|
|
6
|
+
* Fast-match pattern for common vulnerability scanner probe paths.
|
|
7
|
+
* Keep this scoped to root-level probe paths so valid nested application
|
|
8
|
+
* routes are not accidentally blocked.
|
|
9
|
+
*/
|
|
10
|
+
export const SCANNER_PATH_PATTERN = /^\/(?:wp-(?:admin|login\.php|includes|content|config\.php)(?:\/|$)|cgi-bin(?:\/|$)|xmlrpc\.php$|\.git(?:\/|$)|\.env(?:\..*)?$)/i;
|
|
11
|
+
export const DIRECTORY_TRAVERSAL_PATTERN = /\.\.[\/\\]/;
|
|
12
|
+
export const ABSOLUTE_PATH_PATTERN = /^[\/\\]/;
|
|
13
|
+
/** Maximum value for path length. */
|
|
14
|
+
export const MAX_PATH_LENGTH = 4096;
|
|
15
|
+
export const DEFAULT_MAX_STRING_LENGTH = 1000;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized server endpoints and paths registry
|
|
3
|
+
*
|
|
4
|
+
* All internal veryfront URLs should be defined here as the single source of truth.
|
|
5
|
+
* This prevents hardcoding URLs across the codebase and makes refactoring easier.
|
|
6
|
+
*/
|
|
7
|
+
export { DEFAULT_PORT } from "../../config/defaults.js";
|
|
8
|
+
/** Default port for development dashboard (matches veryfront.config.ts default) */
|
|
9
|
+
export declare const DEFAULT_DASHBOARD_PORT = 3001;
|
|
10
|
+
/** Internal URL prefix for all veryfront endpoints */
|
|
11
|
+
export declare const INTERNAL_PREFIX = "/_veryfront";
|
|
12
|
+
/**
|
|
13
|
+
* All internal veryfront URL path prefixes (directories)
|
|
14
|
+
*/
|
|
15
|
+
export declare const INTERNAL_PATH_PREFIXES: {
|
|
16
|
+
/** React Server Components endpoints */
|
|
17
|
+
readonly RSC: "/_veryfront/rsc/";
|
|
18
|
+
/** File system access endpoints (base64 encoded paths) */
|
|
19
|
+
readonly FS: "/_veryfront/fs/";
|
|
20
|
+
/** Virtual module system */
|
|
21
|
+
readonly MODULES: "/_veryfront/modules/";
|
|
22
|
+
/** Generated page modules */
|
|
23
|
+
readonly PAGES: "/_veryfront/pages/";
|
|
24
|
+
/** Data JSON endpoints */
|
|
25
|
+
readonly DATA: "/_veryfront/data/";
|
|
26
|
+
/** Library modules and large vendor surfaces */
|
|
27
|
+
readonly LIB: "/_veryfront/lib/";
|
|
28
|
+
/** Chunk assets */
|
|
29
|
+
readonly CHUNKS: "/_veryfront/chunks/";
|
|
30
|
+
/** Client component modules */
|
|
31
|
+
readonly CLIENT: "/_veryfront/client/";
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Specific internal endpoint URLs
|
|
35
|
+
*/
|
|
36
|
+
export declare const INTERNAL_ENDPOINTS: {
|
|
37
|
+
readonly HMR_RUNTIME: "/_veryfront/hmr-runtime.js";
|
|
38
|
+
readonly HMR: "/_veryfront/hmr.js";
|
|
39
|
+
readonly ERROR_OVERLAY: "/_veryfront/error-overlay.js";
|
|
40
|
+
readonly DEV_LOADER: "/_veryfront/dev-loader.js";
|
|
41
|
+
readonly CLIENT_LOG: "/_veryfront/log";
|
|
42
|
+
readonly CLIENT_JS: "/_veryfront/client.js";
|
|
43
|
+
readonly ROUTER_JS: "/_veryfront/router.js";
|
|
44
|
+
readonly PREFETCH_JS: "/_veryfront/prefetch.js";
|
|
45
|
+
readonly MANIFEST_JSON: "/_veryfront/manifest.json";
|
|
46
|
+
readonly APP_JS: "/_veryfront/app.js";
|
|
47
|
+
readonly RSC_CLIENT: "/_veryfront/rsc/client.js";
|
|
48
|
+
readonly RSC_MANIFEST: "/_veryfront/rsc/manifest";
|
|
49
|
+
readonly RSC_STREAM: "/_veryfront/rsc/stream";
|
|
50
|
+
readonly RSC_PAYLOAD: "/_veryfront/rsc/payload";
|
|
51
|
+
readonly RSC_RENDER: "/_veryfront/rsc/render";
|
|
52
|
+
readonly RSC_PAGE: "/_veryfront/rsc/page";
|
|
53
|
+
readonly RSC_MODULE: "/_veryfront/rsc/module";
|
|
54
|
+
readonly RSC_DOM: "/_veryfront/rsc/dom.js";
|
|
55
|
+
readonly LIB_CHAT_REACT: "/_veryfront/lib/chat/react.js";
|
|
56
|
+
readonly LIB_CHAT_COMPONENTS: "/_veryfront/lib/chat/components.js";
|
|
57
|
+
readonly LIB_CHAT_PRIMITIVES: "/_veryfront/lib/chat/primitives.js";
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Build output directory paths (relative)
|
|
61
|
+
*/
|
|
62
|
+
export declare const BUILD_DIRS: {
|
|
63
|
+
/** Main build output directory */
|
|
64
|
+
readonly ROOT: "_veryfront";
|
|
65
|
+
/** Chunks directory */
|
|
66
|
+
readonly CHUNKS: "_veryfront/chunks";
|
|
67
|
+
/** Data directory */
|
|
68
|
+
readonly DATA: "_veryfront/data";
|
|
69
|
+
/** Assets directory */
|
|
70
|
+
readonly ASSETS: "_veryfront/assets";
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Local project directory paths (relative to project root)
|
|
74
|
+
* These are .gitignore'd directories for caching and temporary files
|
|
75
|
+
*/
|
|
76
|
+
export declare const PROJECT_DIRS: {
|
|
77
|
+
/** Base veryfront internal directory */
|
|
78
|
+
readonly ROOT: ".veryfront";
|
|
79
|
+
/** Cache directory for build artifacts, transforms, etc. */
|
|
80
|
+
readonly CACHE: ".veryfront/cache";
|
|
81
|
+
/** KV store directory */
|
|
82
|
+
readonly KV: ".veryfront/kv";
|
|
83
|
+
/** Log files directory */
|
|
84
|
+
readonly LOGS: ".veryfront/logs";
|
|
85
|
+
/** Temporary files directory */
|
|
86
|
+
readonly TMP: ".veryfront/tmp";
|
|
87
|
+
};
|
|
88
|
+
/** Default cache directory path */
|
|
89
|
+
export declare const DEFAULT_CACHE_DIR: ".veryfront/cache";
|
|
90
|
+
/**
|
|
91
|
+
* Helper to check if a pathname is an internal veryfront endpoint
|
|
92
|
+
*/
|
|
93
|
+
export declare function isInternalEndpoint(pathname: string): boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Helper to check if a pathname is a static asset (has extension or is internal)
|
|
96
|
+
*/
|
|
97
|
+
export declare function isStaticAsset(pathname: string): boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Normalize a chunk path to include the base prefix
|
|
100
|
+
*/
|
|
101
|
+
export declare function normalizeChunkPath(filename: string, basePath?: string): string;
|
|
102
|
+
/** Shared dev server endpoints value. */
|
|
103
|
+
export declare const DEV_SERVER_ENDPOINTS: {
|
|
104
|
+
readonly HMR_RUNTIME: "/_veryfront/hmr-runtime.js";
|
|
105
|
+
readonly ERROR_OVERLAY: "/_veryfront/error-overlay.js";
|
|
106
|
+
};
|
|
107
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../src/src/utils/constants/server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,mFAAmF;AACnF,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAE3C,sDAAsD;AACtD,eAAO,MAAM,eAAe,gBAAgB,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,sBAAsB;IACjC,wCAAwC;;IAExC,0DAA0D;;IAE1D,4BAA4B;;IAE5B,6BAA6B;;IAE7B,0BAA0B;;IAE1B,gDAAgD;;IAEhD,mBAAmB;;IAEnB,+BAA+B;;CAEvB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;CA8BrB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,UAAU;IACrB,kCAAkC;;IAElC,uBAAuB;;IAEvB,qBAAqB;;IAErB,uBAAuB;;CAEf,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,YAAY;IACvB,wCAAwC;;IAExC,4DAA4D;;IAE5D,yBAAyB;;IAEzB,0BAA0B;;IAE1B,gCAAgC;;CAExB,CAAC;AAEX,mCAAmC;AACnC,eAAO,MAAM,iBAAiB,oBAAqB,CAAC;AAEpD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE5D;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,EAChB,QAAQ,GAAE,MAAsC,GAC/C,MAAM,CAIR;AAGD,yCAAyC;AACzC,eAAO,MAAM,oBAAoB;;;CAGvB,CAAC"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized server endpoints and paths registry
|
|
3
|
+
*
|
|
4
|
+
* All internal veryfront URLs should be defined here as the single source of truth.
|
|
5
|
+
* This prevents hardcoding URLs across the codebase and makes refactoring easier.
|
|
6
|
+
*/
|
|
7
|
+
export { DEFAULT_PORT } from "../../config/defaults.js";
|
|
8
|
+
/** Default port for development dashboard (matches veryfront.config.ts default) */
|
|
9
|
+
export const DEFAULT_DASHBOARD_PORT = 3001;
|
|
10
|
+
/** Internal URL prefix for all veryfront endpoints */
|
|
11
|
+
export const INTERNAL_PREFIX = "/_veryfront";
|
|
12
|
+
/**
|
|
13
|
+
* All internal veryfront URL path prefixes (directories)
|
|
14
|
+
*/
|
|
15
|
+
export const INTERNAL_PATH_PREFIXES = {
|
|
16
|
+
/** React Server Components endpoints */
|
|
17
|
+
RSC: `${INTERNAL_PREFIX}/rsc/`,
|
|
18
|
+
/** File system access endpoints (base64 encoded paths) */
|
|
19
|
+
FS: `${INTERNAL_PREFIX}/fs/`,
|
|
20
|
+
/** Virtual module system */
|
|
21
|
+
MODULES: `${INTERNAL_PREFIX}/modules/`,
|
|
22
|
+
/** Generated page modules */
|
|
23
|
+
PAGES: `${INTERNAL_PREFIX}/pages/`,
|
|
24
|
+
/** Data JSON endpoints */
|
|
25
|
+
DATA: `${INTERNAL_PREFIX}/data/`,
|
|
26
|
+
/** Library modules and large vendor surfaces */
|
|
27
|
+
LIB: `${INTERNAL_PREFIX}/lib/`,
|
|
28
|
+
/** Chunk assets */
|
|
29
|
+
CHUNKS: `${INTERNAL_PREFIX}/chunks/`,
|
|
30
|
+
/** Client component modules */
|
|
31
|
+
CLIENT: `${INTERNAL_PREFIX}/client/`,
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Specific internal endpoint URLs
|
|
35
|
+
*/
|
|
36
|
+
export const INTERNAL_ENDPOINTS = {
|
|
37
|
+
// Development endpoints
|
|
38
|
+
HMR_RUNTIME: `${INTERNAL_PREFIX}/hmr-runtime.js`,
|
|
39
|
+
HMR: `${INTERNAL_PREFIX}/hmr.js`,
|
|
40
|
+
ERROR_OVERLAY: `${INTERNAL_PREFIX}/error-overlay.js`,
|
|
41
|
+
// Legacy endpoint retained for backward compatibility (no active handler).
|
|
42
|
+
DEV_LOADER: `${INTERNAL_PREFIX}/dev-loader.js`,
|
|
43
|
+
CLIENT_LOG: `${INTERNAL_PREFIX}/log`,
|
|
44
|
+
// Production endpoints
|
|
45
|
+
CLIENT_JS: `${INTERNAL_PREFIX}/client.js`,
|
|
46
|
+
ROUTER_JS: `${INTERNAL_PREFIX}/router.js`,
|
|
47
|
+
PREFETCH_JS: `${INTERNAL_PREFIX}/prefetch.js`,
|
|
48
|
+
MANIFEST_JSON: `${INTERNAL_PREFIX}/manifest.json`,
|
|
49
|
+
APP_JS: `${INTERNAL_PREFIX}/app.js`,
|
|
50
|
+
// RSC endpoints
|
|
51
|
+
RSC_CLIENT: `${INTERNAL_PREFIX}/rsc/client.js`,
|
|
52
|
+
RSC_MANIFEST: `${INTERNAL_PREFIX}/rsc/manifest`,
|
|
53
|
+
RSC_STREAM: `${INTERNAL_PREFIX}/rsc/stream`,
|
|
54
|
+
RSC_PAYLOAD: `${INTERNAL_PREFIX}/rsc/payload`,
|
|
55
|
+
RSC_RENDER: `${INTERNAL_PREFIX}/rsc/render`,
|
|
56
|
+
RSC_PAGE: `${INTERNAL_PREFIX}/rsc/page`,
|
|
57
|
+
RSC_MODULE: `${INTERNAL_PREFIX}/rsc/module`,
|
|
58
|
+
RSC_DOM: `${INTERNAL_PREFIX}/rsc/dom.js`,
|
|
59
|
+
// Library module endpoints
|
|
60
|
+
LIB_CHAT_REACT: `${INTERNAL_PREFIX}/lib/chat/react.js`,
|
|
61
|
+
LIB_CHAT_COMPONENTS: `${INTERNAL_PREFIX}/lib/chat/components.js`,
|
|
62
|
+
LIB_CHAT_PRIMITIVES: `${INTERNAL_PREFIX}/lib/chat/primitives.js`,
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Build output directory paths (relative)
|
|
66
|
+
*/
|
|
67
|
+
export const BUILD_DIRS = {
|
|
68
|
+
/** Main build output directory */
|
|
69
|
+
ROOT: "_veryfront",
|
|
70
|
+
/** Chunks directory */
|
|
71
|
+
CHUNKS: "_veryfront/chunks",
|
|
72
|
+
/** Data directory */
|
|
73
|
+
DATA: "_veryfront/data",
|
|
74
|
+
/** Assets directory */
|
|
75
|
+
ASSETS: "_veryfront/assets",
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Local project directory paths (relative to project root)
|
|
79
|
+
* These are .gitignore'd directories for caching and temporary files
|
|
80
|
+
*/
|
|
81
|
+
export const PROJECT_DIRS = {
|
|
82
|
+
/** Base veryfront internal directory */
|
|
83
|
+
ROOT: ".veryfront",
|
|
84
|
+
/** Cache directory for build artifacts, transforms, etc. */
|
|
85
|
+
CACHE: ".veryfront/cache",
|
|
86
|
+
/** KV store directory */
|
|
87
|
+
KV: ".veryfront/kv",
|
|
88
|
+
/** Log files directory */
|
|
89
|
+
LOGS: ".veryfront/logs",
|
|
90
|
+
/** Temporary files directory */
|
|
91
|
+
TMP: ".veryfront/tmp",
|
|
92
|
+
};
|
|
93
|
+
/** Default cache directory path */
|
|
94
|
+
export const DEFAULT_CACHE_DIR = PROJECT_DIRS.CACHE;
|
|
95
|
+
/**
|
|
96
|
+
* Helper to check if a pathname is an internal veryfront endpoint
|
|
97
|
+
*/
|
|
98
|
+
export function isInternalEndpoint(pathname) {
|
|
99
|
+
return pathname.startsWith(`${INTERNAL_PREFIX}/`);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Helper to check if a pathname is a static asset (has extension or is internal)
|
|
103
|
+
*/
|
|
104
|
+
export function isStaticAsset(pathname) {
|
|
105
|
+
return pathname.includes(".") || isInternalEndpoint(pathname);
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Normalize a chunk path to include the base prefix
|
|
109
|
+
*/
|
|
110
|
+
export function normalizeChunkPath(filename, basePath = INTERNAL_PATH_PREFIXES.CHUNKS) {
|
|
111
|
+
if (filename.startsWith("/"))
|
|
112
|
+
return filename;
|
|
113
|
+
return `${basePath.replace(/\/$/, "")}/${filename}`;
|
|
114
|
+
}
|
|
115
|
+
// Re-export for backward compatibility
|
|
116
|
+
/** Shared dev server endpoints value. */
|
|
117
|
+
export const DEV_SERVER_ENDPOINTS = {
|
|
118
|
+
HMR_RUNTIME: INTERNAL_ENDPOINTS.HMR_RUNTIME,
|
|
119
|
+
ERROR_OVERLAY: INTERNAL_ENDPOINTS.ERROR_OVERLAY,
|
|
120
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-flags.d.ts","sourceRoot":"","sources":["../../../src/src/utils/feature-flags.ts"],"names":[],"mappings":"AAEA,oCAAoC;AACpC,wBAAgB,YAAY,CAC1B,MAAM,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,OAAO,CAAA;KAAE,CAAA;CAAE,GAC5C,OAAO,CAKT"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { getEnv } from "../platform/compat/process.js";
|
|
2
|
+
/** Check whether RSC is enabled. */
|
|
3
|
+
export function isRSCEnabled(config) {
|
|
4
|
+
const rsc = config?.experimental?.rsc;
|
|
5
|
+
if (rsc != null)
|
|
6
|
+
return rsc;
|
|
7
|
+
return getEnv("VERYFRONT_EXPERIMENTAL_RSC") === "1";
|
|
8
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Compute hash. */
|
|
2
|
+
export declare function computeHash(content: string): Promise<string>;
|
|
3
|
+
/** Source bundle content used for hash computation. */
|
|
4
|
+
export interface BundleCode {
|
|
5
|
+
code: string;
|
|
6
|
+
css?: string;
|
|
7
|
+
sourceMap?: string;
|
|
8
|
+
}
|
|
9
|
+
/** Compute code hash. */
|
|
10
|
+
export declare function computeCodeHash(code: BundleCode): Promise<string>;
|
|
11
|
+
/** Create simple hash. */
|
|
12
|
+
export declare function simpleHash(str: string): number;
|
|
13
|
+
/** Hash string to hex (base 16) - used for module filenames */
|
|
14
|
+
export declare function hashCodeHex(str: string): string;
|
|
15
|
+
/** Create short hash. */
|
|
16
|
+
export declare function shortHash(content: string): Promise<string>;
|
|
17
|
+
/** FNV-1a hash for strings - returns hex string */
|
|
18
|
+
export declare function fnv1aHash(input: string): string;
|
|
19
|
+
//# sourceMappingURL=hash-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hash-utils.d.ts","sourceRoot":"","sources":["../../../src/src/utils/hash-utils.ts"],"names":[],"mappings":"AAOA,oBAAoB;AACpB,wBAAsB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAKlE;AACD,uDAAuD;AACvD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,yBAAyB;AACzB,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAEjE;AAED,0BAA0B;AAC1B,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAS9C;AAED,+DAA+D;AAC/D,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED,yBAAyB;AACzB,wBAAsB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAGhE;AAED,mDAAmD;AACnD,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAS/C"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as dntShim from "../../_dnt.shims.js";
|
|
2
|
+
import { FNV1A_PRIME_32 } from "./constants/crypto.js";
|
|
3
|
+
import { HASH_SEED_FNV1A } from "./constants/hash.js";
|
|
4
|
+
/** Number of hex characters kept by shortHash (8 hex chars = 32 bits) */
|
|
5
|
+
const SHORT_HASH_LENGTH = 8;
|
|
6
|
+
/** Compute hash. */
|
|
7
|
+
export async function computeHash(content) {
|
|
8
|
+
const data = new TextEncoder().encode(content);
|
|
9
|
+
const hashBuffer = await dntShim.crypto.subtle.digest("SHA-256", data);
|
|
10
|
+
return Array.from(new Uint8Array(hashBuffer), (b) => b.toString(16).padStart(2, "0")).join("");
|
|
11
|
+
}
|
|
12
|
+
/** Compute code hash. */
|
|
13
|
+
export function computeCodeHash(code) {
|
|
14
|
+
return computeHash(`${code.code}${code.css ?? ""}${code.sourceMap ?? ""}`);
|
|
15
|
+
}
|
|
16
|
+
/** Create simple hash. */
|
|
17
|
+
export function simpleHash(str) {
|
|
18
|
+
let hash = 0;
|
|
19
|
+
for (let i = 0; i < str.length; i++) {
|
|
20
|
+
hash = (hash << 5) - hash + str.charCodeAt(i);
|
|
21
|
+
hash &= hash;
|
|
22
|
+
}
|
|
23
|
+
return Math.abs(hash);
|
|
24
|
+
}
|
|
25
|
+
/** Hash string to hex (base 16) - used for module filenames */
|
|
26
|
+
export function hashCodeHex(str) {
|
|
27
|
+
return simpleHash(str).toString(16);
|
|
28
|
+
}
|
|
29
|
+
/** Create short hash. */
|
|
30
|
+
export async function shortHash(content) {
|
|
31
|
+
const fullHash = await computeHash(content);
|
|
32
|
+
return fullHash.slice(0, SHORT_HASH_LENGTH);
|
|
33
|
+
}
|
|
34
|
+
/** FNV-1a hash for strings - returns hex string */
|
|
35
|
+
export function fnv1aHash(input) {
|
|
36
|
+
let hash = HASH_SEED_FNV1A >>> 0;
|
|
37
|
+
for (const char of input) {
|
|
38
|
+
hash ^= char.charCodeAt(0);
|
|
39
|
+
hash = Math.imul(hash, FNV1A_PRIME_32);
|
|
40
|
+
}
|
|
41
|
+
return (hash >>> 0).toString(16);
|
|
42
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export interface LockfileEntry {
|
|
2
|
+
resolved: string;
|
|
3
|
+
integrity: string;
|
|
4
|
+
dependencies?: string[];
|
|
5
|
+
fetchedAt?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface LockfileData {
|
|
8
|
+
version: 1;
|
|
9
|
+
imports: Record<string, LockfileEntry>;
|
|
10
|
+
}
|
|
11
|
+
export declare function createEmptyLockfile(): LockfileData;
|
|
12
|
+
/** Compute integrity. */
|
|
13
|
+
export declare function computeIntegrity(content: string): Promise<string>;
|
|
14
|
+
export declare function verifyIntegrity(content: string, integrity: string): Promise<boolean>;
|
|
15
|
+
/** Public API contract for lockfile manager. */
|
|
16
|
+
export interface LockfileManager {
|
|
17
|
+
read(): Promise<LockfileData | null>;
|
|
18
|
+
write(data: LockfileData): Promise<void>;
|
|
19
|
+
get(url: string): Promise<LockfileEntry | null>;
|
|
20
|
+
set(url: string, entry: LockfileEntry): Promise<void>;
|
|
21
|
+
has(url: string): Promise<boolean>;
|
|
22
|
+
clear(): Promise<void>;
|
|
23
|
+
flush(): Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
export type FSAdapter = {
|
|
26
|
+
readFile(path: string): Promise<string>;
|
|
27
|
+
writeFile(path: string, content: string): Promise<void>;
|
|
28
|
+
exists(path: string): Promise<boolean>;
|
|
29
|
+
remove?(path: string): Promise<void>;
|
|
30
|
+
};
|
|
31
|
+
/** Create lockfile manager. */
|
|
32
|
+
export declare function createLockfileManager(projectDir: string, fsAdapter?: FSAdapter): LockfileManager;
|
|
33
|
+
export interface FetchWithLockOptions {
|
|
34
|
+
lockfile: LockfileManager;
|
|
35
|
+
url: string;
|
|
36
|
+
fetchFn?: typeof fetch;
|
|
37
|
+
strict?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface FetchWithLockResult {
|
|
40
|
+
content: string;
|
|
41
|
+
resolvedUrl: string;
|
|
42
|
+
fromCache: boolean;
|
|
43
|
+
integrity: string;
|
|
44
|
+
}
|
|
45
|
+
export declare function fetchWithLock(options: FetchWithLockOptions): Promise<FetchWithLockResult>;
|
|
46
|
+
export interface ParsedImport {
|
|
47
|
+
specifier: string;
|
|
48
|
+
type: "static" | "dynamic";
|
|
49
|
+
}
|
|
50
|
+
export declare function extractImports(content: string): ParsedImport[];
|
|
51
|
+
export declare function resolveImportUrl(specifier: string, baseUrl: string): string | null;
|
|
52
|
+
//# sourceMappingURL=import-lockfile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-lockfile.d.ts","sourceRoot":"","sources":["../../../src/src/utils/import-lockfile.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,CAAC,CAAC;IACX,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;CACxC;AAKD,wBAAgB,mBAAmB,IAAI,YAAY,CAElD;AAED,yBAAyB;AACzB,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAGvE;AAED,wBAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAG1F;AAED,gDAAgD;AAChD,MAAM,WAAW,eAAe;IAC9B,IAAI,IAAI,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC;IACrC,KAAK,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IAChD,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtD,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACnC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACxC,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACvC,MAAM,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtC,CAAC;AAqBF,+BAA+B;AAC/B,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,SAAS,GAAG,eAAe,CAkFhG;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,eAAe,CAAC;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,OAAO,KAAK,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAID,wBAAsB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CA2D/F;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAC;CAC5B;AAMD,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,EAAE,CAmB9D;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAUlF"}
|