@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,34 @@
|
|
|
1
|
+
import { isAbsolute } from "../platform/compat/path/resolution.js";
|
|
2
|
+
/** Normalizes path. */
|
|
3
|
+
export declare function normalizePath(pathname: string): string;
|
|
4
|
+
export declare function joinPath(a: string, b: string): string;
|
|
5
|
+
export declare function isWithinDirectory(root: string, target: string): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Get file extension including the dot (e.g., ".ts", ".tsx").
|
|
8
|
+
* Returns empty string if no extension found.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getExtension(path: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Get file extension without the dot, lowercased (e.g., "ts", "tsx").
|
|
13
|
+
* Returns empty string if no extension found.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getExtensionName(path: string): string;
|
|
16
|
+
export declare function getDirectory(path: string): string;
|
|
17
|
+
export declare function hasHashedFilename(path: string): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Get esbuild loader type from file extension
|
|
20
|
+
*/
|
|
21
|
+
export declare function getEsbuildLoader(filePath: string): "tsx" | "jsx" | "ts" | "js";
|
|
22
|
+
export { isAbsolute as isAbsolutePath };
|
|
23
|
+
export declare function toBase64Url(input: string): string;
|
|
24
|
+
export declare function fromBase64Url(encoded: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* Check if a normalized path is a framework path that should not be fetched from API.
|
|
27
|
+
*
|
|
28
|
+
* Framework paths can appear in two forms:
|
|
29
|
+
* 1. "_veryfront/..." - original framework module path prefix
|
|
30
|
+
* 2. "src/react/...", "src/platform/...", etc. - framework source paths
|
|
31
|
+
* (after FSAdapter normalizes absolute paths like /Users/.../veryfront-server/src/...)
|
|
32
|
+
*/
|
|
33
|
+
export declare function isFrameworkSourcePath(normalizedPath: string): boolean;
|
|
34
|
+
//# sourceMappingURL=path-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-utils.d.ts","sourceRoot":"","sources":["../../../src/src/utils/path-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,uCAAuC,CAAC;AAS9E,uBAAuB;AACvB,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGtD;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAIrD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAMvE;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIjD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIrD;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKjD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEvD;AAQD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,CAG9E;AAED,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,CAAC;AAExC,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEjD;AAUD,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAerD;AAgCD;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAQrE"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { isAbsolute, normalize } from "../platform/compat/path/resolution.js";
|
|
2
|
+
import { base64urlEncode } from "./base64url.js";
|
|
3
|
+
import { logger } from "./logger/logger.js";
|
|
4
|
+
function stripTrailingSlash(pathname) {
|
|
5
|
+
if (pathname === "/")
|
|
6
|
+
return pathname;
|
|
7
|
+
return pathname.replace(/\/+$/, "");
|
|
8
|
+
}
|
|
9
|
+
/** Normalizes path. */
|
|
10
|
+
export function normalizePath(pathname) {
|
|
11
|
+
if (!pathname)
|
|
12
|
+
return pathname;
|
|
13
|
+
return stripTrailingSlash(normalize(pathname.replace(/\\+/g, "/")));
|
|
14
|
+
}
|
|
15
|
+
export function joinPath(a, b) {
|
|
16
|
+
const left = a.replace(/\/$/, "");
|
|
17
|
+
const right = b.replace(/^\//, "");
|
|
18
|
+
return `${left}/${right}`;
|
|
19
|
+
}
|
|
20
|
+
export function isWithinDirectory(root, target) {
|
|
21
|
+
const normalizedRoot = stripTrailingSlash(normalizePath(root));
|
|
22
|
+
const normalizedTarget = stripTrailingSlash(normalizePath(target));
|
|
23
|
+
if (normalizedRoot === "/")
|
|
24
|
+
return normalizedTarget.startsWith("/");
|
|
25
|
+
return normalizedTarget === normalizedRoot || normalizedTarget.startsWith(`${normalizedRoot}/`);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Get file extension including the dot (e.g., ".ts", ".tsx").
|
|
29
|
+
* Returns empty string if no extension found.
|
|
30
|
+
*/
|
|
31
|
+
export function getExtension(path) {
|
|
32
|
+
const lastDot = path.lastIndexOf(".");
|
|
33
|
+
if (lastDot === -1 || lastDot === path.length - 1)
|
|
34
|
+
return "";
|
|
35
|
+
return path.slice(lastDot);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Get file extension without the dot, lowercased (e.g., "ts", "tsx").
|
|
39
|
+
* Returns empty string if no extension found.
|
|
40
|
+
*/
|
|
41
|
+
export function getExtensionName(path) {
|
|
42
|
+
const lastDot = path.lastIndexOf(".");
|
|
43
|
+
if (lastDot === -1 || lastDot === path.length - 1)
|
|
44
|
+
return "";
|
|
45
|
+
return path.slice(lastDot + 1).toLowerCase();
|
|
46
|
+
}
|
|
47
|
+
export function getDirectory(path) {
|
|
48
|
+
const normalized = normalizePath(path);
|
|
49
|
+
const lastSlash = normalized.lastIndexOf("/");
|
|
50
|
+
if (lastSlash <= 0)
|
|
51
|
+
return "/";
|
|
52
|
+
return normalized.slice(0, lastSlash);
|
|
53
|
+
}
|
|
54
|
+
export function hasHashedFilename(path) {
|
|
55
|
+
return /\.[a-f0-9]{8,}\./.test(path);
|
|
56
|
+
}
|
|
57
|
+
const EXTENSION_TO_LOADER = {
|
|
58
|
+
".tsx": "tsx",
|
|
59
|
+
".jsx": "jsx",
|
|
60
|
+
".ts": "ts",
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Get esbuild loader type from file extension
|
|
64
|
+
*/
|
|
65
|
+
export function getEsbuildLoader(filePath) {
|
|
66
|
+
const ext = getExtension(filePath).toLowerCase();
|
|
67
|
+
return EXTENSION_TO_LOADER[ext] ?? "js";
|
|
68
|
+
}
|
|
69
|
+
export { isAbsolute as isAbsolutePath };
|
|
70
|
+
export function toBase64Url(input) {
|
|
71
|
+
return base64urlEncode(input);
|
|
72
|
+
}
|
|
73
|
+
function getRequiredBase64Padding(length) {
|
|
74
|
+
const remainder = length % 4;
|
|
75
|
+
if (remainder === 0)
|
|
76
|
+
return "";
|
|
77
|
+
if (remainder === 2)
|
|
78
|
+
return "==";
|
|
79
|
+
if (remainder === 3)
|
|
80
|
+
return "=";
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
83
|
+
export function fromBase64Url(encoded) {
|
|
84
|
+
const b64 = encoded.replaceAll("-", "+").replaceAll("_", "/");
|
|
85
|
+
const padding = getRequiredBase64Padding(b64.length);
|
|
86
|
+
if (padding === undefined) {
|
|
87
|
+
logger.debug(`Failed to decode base64url string "${encoded}": invalid length`);
|
|
88
|
+
return "";
|
|
89
|
+
}
|
|
90
|
+
try {
|
|
91
|
+
return atob(b64 + padding);
|
|
92
|
+
}
|
|
93
|
+
catch (error) {
|
|
94
|
+
logger.debug(`Failed to decode base64url string "${encoded}":`, error);
|
|
95
|
+
return "";
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Framework source directories that should never be fetched from the API.
|
|
100
|
+
* These are framework-internal modules that must be resolved from local filesystem.
|
|
101
|
+
*/
|
|
102
|
+
const FRAMEWORK_SOURCE_DIRS = [
|
|
103
|
+
"react",
|
|
104
|
+
"platform",
|
|
105
|
+
"client",
|
|
106
|
+
"lib",
|
|
107
|
+
"html",
|
|
108
|
+
"utils",
|
|
109
|
+
"transforms",
|
|
110
|
+
"modules",
|
|
111
|
+
"server",
|
|
112
|
+
"config",
|
|
113
|
+
"errors",
|
|
114
|
+
"observability",
|
|
115
|
+
"rendering",
|
|
116
|
+
"security",
|
|
117
|
+
"data",
|
|
118
|
+
"cache",
|
|
119
|
+
"build",
|
|
120
|
+
"repositories",
|
|
121
|
+
"cli",
|
|
122
|
+
];
|
|
123
|
+
const FRAMEWORK_SOURCE_PATH_RE = new RegExp(`^src/(${FRAMEWORK_SOURCE_DIRS.join("|")})/`);
|
|
124
|
+
/**
|
|
125
|
+
* Check if a normalized path is a framework path that should not be fetched from API.
|
|
126
|
+
*
|
|
127
|
+
* Framework paths can appear in two forms:
|
|
128
|
+
* 1. "_veryfront/..." - original framework module path prefix
|
|
129
|
+
* 2. "src/react/...", "src/platform/...", etc. - framework source paths
|
|
130
|
+
* (after FSAdapter normalizes absolute paths like /Users/.../veryfront-server/src/...)
|
|
131
|
+
*/
|
|
132
|
+
export function isFrameworkSourcePath(normalizedPath) {
|
|
133
|
+
// Check for _veryfront/ prefix (with or without embedded: prefix)
|
|
134
|
+
if (normalizedPath.startsWith("_veryfront/") || normalizedPath.startsWith("embedded:_veryfront/")) {
|
|
135
|
+
return true;
|
|
136
|
+
}
|
|
137
|
+
return FRAMEWORK_SOURCE_PATH_RE.test(normalizedPath);
|
|
138
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Request payload for start. */
|
|
2
|
+
export declare function startRequest(requestId: string): void;
|
|
3
|
+
/** Starts timer. */
|
|
4
|
+
export declare function startTimer(label: string, parent?: string): () => void;
|
|
5
|
+
/** Time async. */
|
|
6
|
+
export declare function timeAsync<T>(label: string, fn: () => Promise<T>, parent?: string): Promise<T>;
|
|
7
|
+
/** Request payload for end. */
|
|
8
|
+
export declare function endRequest(requestId: string): void;
|
|
9
|
+
/** Check whether request performance timing is enabled. */
|
|
10
|
+
export declare function isEnabled(): boolean;
|
|
11
|
+
//# sourceMappingURL=perf-timer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"perf-timer.d.ts","sourceRoot":"","sources":["../../../src/src/utils/perf-timer.ts"],"names":[],"mappings":"AAkCA,iCAAiC;AACjC,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAKpD;AAED,oBAAoB;AACpB,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,IAAI,CAUrE;AAED,kBAAkB;AAClB,wBAAsB,SAAS,CAAC,CAAC,EAC/B,KAAK,EAAE,MAAM,EACb,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,CAAC,CAAC,CASZ;AAED,+BAA+B;AAC/B,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAmElD;AAED,2DAA2D;AAC3D,wBAAgB,SAAS,IAAI,OAAO,CAEnC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../../src/src/utils/platform.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAS1C"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Platform detection utilities
|
|
3
|
+
*/
|
|
4
|
+
import { isDeno } from "../platform/compat/runtime.js";
|
|
5
|
+
import { execPath } from "../platform/compat/process.js";
|
|
6
|
+
/**
|
|
7
|
+
* Detect if the code is running in a compiled Deno binary
|
|
8
|
+
* @returns true if running in a compiled binary, false otherwise
|
|
9
|
+
*/
|
|
10
|
+
export function isCompiledBinary() {
|
|
11
|
+
if (!isDeno)
|
|
12
|
+
return false;
|
|
13
|
+
try {
|
|
14
|
+
return execPath().includes("veryfront");
|
|
15
|
+
}
|
|
16
|
+
catch (_) {
|
|
17
|
+
/* expected: execPath may not be available on all platforms */
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +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,YAAY,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { VERSION } from "./version-constant.js";
|
|
2
|
+
export declare function normalizeVeryfrontVersion(version: string | undefined): string | undefined;
|
|
3
|
+
export declare function resolveRuntimeVersion(options?: {
|
|
4
|
+
veryfrontVersion?: string;
|
|
5
|
+
releaseVersion?: string;
|
|
6
|
+
denoVersion?: string;
|
|
7
|
+
fallbackVersion?: string;
|
|
8
|
+
}): string;
|
|
9
|
+
export declare const RUNTIME_VERSION: string;
|
|
10
|
+
export declare const SERVER_START_TIME: number;
|
|
11
|
+
export interface BuildVersion {
|
|
12
|
+
framework: string;
|
|
13
|
+
serverStart: number;
|
|
14
|
+
projectUpdated?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function createBuildVersion(projectUpdated?: string): BuildVersion;
|
|
17
|
+
//# sourceMappingURL=version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/src/utils/version.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAGzF;AAUD,wBAAgB,qBAAqB,CAAC,OAAO,GAAE;IAC7C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,MAAM,CAKd;AAED,eAAO,MAAM,eAAe,QAI1B,CAAC;AAEH,eAAO,MAAM,iBAAiB,EAAE,MAAmB,CAAC;AAEpD,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,kBAAkB,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,YAAY,CAMxE"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import denoConfig from "../../deno.js";
|
|
2
|
+
import { getEnv } from "../platform/compat/process.js";
|
|
3
|
+
import { VERSION } from "./version-constant.js";
|
|
4
|
+
export { VERSION } from "./version-constant.js";
|
|
5
|
+
export function normalizeVeryfrontVersion(version) {
|
|
6
|
+
if (!version)
|
|
7
|
+
return undefined;
|
|
8
|
+
return version.replace(/^v(?=\d)/, "");
|
|
9
|
+
}
|
|
10
|
+
function getVersionEnv(name) {
|
|
11
|
+
try {
|
|
12
|
+
return getEnv(name);
|
|
13
|
+
}
|
|
14
|
+
catch {
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export function resolveRuntimeVersion(options = {}) {
|
|
19
|
+
return normalizeVeryfrontVersion(options.veryfrontVersion ?? options.releaseVersion) ??
|
|
20
|
+
normalizeVeryfrontVersion(options.denoVersion) ??
|
|
21
|
+
options.fallbackVersion ??
|
|
22
|
+
VERSION;
|
|
23
|
+
}
|
|
24
|
+
export const RUNTIME_VERSION = resolveRuntimeVersion({
|
|
25
|
+
veryfrontVersion: getVersionEnv("VERYFRONT_VERSION"),
|
|
26
|
+
releaseVersion: getVersionEnv("RELEASE_VERSION"),
|
|
27
|
+
denoVersion: typeof denoConfig.version === "string" ? denoConfig.version : undefined,
|
|
28
|
+
});
|
|
29
|
+
export const SERVER_START_TIME = Date.now();
|
|
30
|
+
export function createBuildVersion(projectUpdated) {
|
|
31
|
+
return {
|
|
32
|
+
framework: RUNTIME_VERSION,
|
|
33
|
+
serverStart: SERVER_START_TIME,
|
|
34
|
+
projectUpdated,
|
|
35
|
+
};
|
|
36
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@veryfront/ext-content-mdx",
|
|
3
|
+
"version": "0.1.985",
|
|
4
|
+
"description": "Veryfront first-party extension package for ext-content-mdx",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"veryfront",
|
|
7
|
+
"extension",
|
|
8
|
+
"ext-content-mdx"
|
|
9
|
+
],
|
|
10
|
+
"author": "Veryfront",
|
|
11
|
+
"homepage": "https://github.com/veryfront/veryfront-code/tree/main/extensions/ext-content-mdx",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/veryfront/veryfront-code.git",
|
|
15
|
+
"directory": "extensions/ext-content-mdx"
|
|
16
|
+
},
|
|
17
|
+
"license": "Apache-2.0",
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/veryfront/veryfront-code/issues"
|
|
20
|
+
},
|
|
21
|
+
"module": "./esm/extensions/ext-content-mdx/src/index.js",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"import": "./esm/extensions/ext-content-mdx/src/index.js",
|
|
25
|
+
"types": "./esm/extensions/ext-content-mdx/src/index.d.ts"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"scripts": {},
|
|
29
|
+
"engines": {
|
|
30
|
+
"node": ">=18.0.0"
|
|
31
|
+
},
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public"
|
|
34
|
+
},
|
|
35
|
+
"veryfront": {
|
|
36
|
+
"extension": true,
|
|
37
|
+
"contracts": {
|
|
38
|
+
"provides": [
|
|
39
|
+
"ContentProcessor"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"capabilities": []
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@deno/shim-deno": "~0.18.0",
|
|
46
|
+
"@deno/shim-crypto": "~0.3.1",
|
|
47
|
+
"@deno/shim-timers": "~0.1.0",
|
|
48
|
+
"@mdx-js/mdx": "3.1.1",
|
|
49
|
+
"@mdx-js/react": "3.1.1",
|
|
50
|
+
"@types/hast": "3.0.3",
|
|
51
|
+
"@types/mdast": "4.0.3",
|
|
52
|
+
"@types/unist": "3.0.2",
|
|
53
|
+
"github-slugger": "2.0.0",
|
|
54
|
+
"mdast-util-to-string": "4.0.0",
|
|
55
|
+
"rehype-highlight": "7.0.2",
|
|
56
|
+
"rehype-raw": "7.0.0",
|
|
57
|
+
"rehype-sanitize": "6.0.0",
|
|
58
|
+
"rehype-slug": "6.0.0",
|
|
59
|
+
"rehype-starry-night": "2.2.0",
|
|
60
|
+
"rehype-stringify": "10.0.1",
|
|
61
|
+
"remark-frontmatter": "5.0.0",
|
|
62
|
+
"remark-gfm": "4.0.1",
|
|
63
|
+
"remark-parse": "11.0.0",
|
|
64
|
+
"remark-rehype": "11.1.2",
|
|
65
|
+
"unified": "11.0.5",
|
|
66
|
+
"unist-util-visit": "5.1.0",
|
|
67
|
+
"vfile": "6.0.3"
|
|
68
|
+
},
|
|
69
|
+
"peerDependencies": {
|
|
70
|
+
"veryfront": "^0.1.985"
|
|
71
|
+
},
|
|
72
|
+
"type": "module",
|
|
73
|
+
"types": "./esm/extensions/ext-content-mdx/src/index.d.ts",
|
|
74
|
+
"files": [
|
|
75
|
+
"esm",
|
|
76
|
+
"LICENSE",
|
|
77
|
+
"NOTICE",
|
|
78
|
+
"README.md"
|
|
79
|
+
]
|
|
80
|
+
}
|