@format.dev/compile 0.0.0 → 0.1.0
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/README.md +30 -20
- package/bin/format-compile +3 -0
- package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/defineProperty.mjs +14 -0
- package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/toPrimitive.mjs +16 -0
- package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/toPropertyKey.mjs +11 -0
- package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/typeof.mjs +12 -0
- package/dist/_virtual/rolldown_runtime.mjs +46 -0
- package/dist/node_modules/.pnpm/@babel_parser@7.29.8/node_modules/@babel/parser/lib/index.mjs +12606 -0
- package/dist/node_modules/.pnpm/@babel_parser@7.29.8/node_modules/@babel/parser/lib/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_compiler-core@3.5.41/node_modules/@vue/compiler-core/dist/compiler-core.cjs.mjs +4866 -0
- package/dist/node_modules/.pnpm/@vue_compiler-core@3.5.41/node_modules/@vue/compiler-core/dist/compiler-core.cjs.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_compiler-core@3.5.41/node_modules/@vue/compiler-core/index.mjs +13 -0
- package/dist/node_modules/.pnpm/@vue_compiler-core@3.5.41/node_modules/@vue/compiler-core/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_compiler-dom@3.5.41/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.mjs +663 -0
- package/dist/node_modules/.pnpm/@vue_compiler-dom@3.5.41/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_compiler-dom@3.5.41/node_modules/@vue/compiler-dom/index.mjs +13 -0
- package/dist/node_modules/.pnpm/@vue_compiler-dom@3.5.41/node_modules/@vue/compiler-dom/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_compiler-ssr@3.5.41/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.mjs +846 -0
- package/dist/node_modules/.pnpm/@vue_compiler-ssr@3.5.41/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_reactivity@3.5.41/node_modules/@vue/reactivity/dist/reactivity.cjs.mjs +1600 -0
- package/dist/node_modules/.pnpm/@vue_reactivity@3.5.41/node_modules/@vue/reactivity/dist/reactivity.cjs.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_reactivity@3.5.41/node_modules/@vue/reactivity/index.mjs +13 -0
- package/dist/node_modules/.pnpm/@vue_reactivity@3.5.41/node_modules/@vue/reactivity/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_runtime-core@3.5.41/node_modules/@vue/runtime-core/dist/runtime-core.cjs.mjs +5619 -0
- package/dist/node_modules/.pnpm/@vue_runtime-core@3.5.41/node_modules/@vue/runtime-core/dist/runtime-core.cjs.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_runtime-core@3.5.41/node_modules/@vue/runtime-core/index.mjs +13 -0
- package/dist/node_modules/.pnpm/@vue_runtime-core@3.5.41/node_modules/@vue/runtime-core/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_runtime-dom@3.5.41/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.mjs +1479 -0
- package/dist/node_modules/.pnpm/@vue_runtime-dom@3.5.41/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_runtime-dom@3.5.41/node_modules/@vue/runtime-dom/index.mjs +13 -0
- package/dist/node_modules/.pnpm/@vue_runtime-dom@3.5.41/node_modules/@vue/runtime-dom/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_server-renderer@3.5.41/node_modules/@vue/server-renderer/dist/server-renderer.cjs.mjs +510 -0
- package/dist/node_modules/.pnpm/@vue_server-renderer@3.5.41/node_modules/@vue/server-renderer/dist/server-renderer.cjs.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_server-renderer@3.5.41/node_modules/@vue/server-renderer/index.mjs +13 -0
- package/dist/node_modules/.pnpm/@vue_server-renderer@3.5.41/node_modules/@vue/server-renderer/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_shared@3.5.41/node_modules/@vue/shared/dist/shared.cjs.mjs +499 -0
- package/dist/node_modules/.pnpm/@vue_shared@3.5.41/node_modules/@vue/shared/dist/shared.cjs.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_shared@3.5.41/node_modules/@vue/shared/index.mjs +13 -0
- package/dist/node_modules/.pnpm/@vue_shared@3.5.41/node_modules/@vue/shared/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/decode-codepoint.mjs +79 -0
- package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/decode-codepoint.mjs.map +1 -0
- package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/decode.mjs +471 -0
- package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/decode.mjs.map +1 -0
- package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/generated/decode-data-html.mjs +16 -0
- package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/generated/decode-data-html.mjs.map +1 -0
- package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/generated/decode-data-xml.mjs +16 -0
- package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/generated/decode-data-xml.mjs.map +1 -0
- package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/internal/bin-trie-flags.mjs +30 -0
- package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/internal/bin-trie-flags.mjs.map +1 -0
- package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/internal/decode-shared.mjs +24 -0
- package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/internal/decode-shared.mjs.map +1 -0
- package/dist/node_modules/.pnpm/estree-walker@2.0.2/node_modules/estree-walker/dist/umd/estree-walker.mjs +253 -0
- package/dist/node_modules/.pnpm/estree-walker@2.0.2/node_modules/estree-walker/dist/umd/estree-walker.mjs.map +1 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.mjs +5246 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.mjs.map +1 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/cjs/react-dom-server.node.development.mjs +5616 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/cjs/react-dom-server.node.development.mjs.map +1 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/cjs/react-dom.development.mjs +183 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/cjs/react-dom.development.mjs.map +1 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/index.mjs +13 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/server.node.mjs +21 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/server.node.mjs.map +1 -0
- package/dist/node_modules/.pnpm/react@19.2.8/node_modules/react/cjs/react.development.mjs +766 -0
- package/dist/node_modules/.pnpm/react@19.2.8/node_modules/react/cjs/react.development.mjs.map +1 -0
- package/dist/node_modules/.pnpm/react@19.2.8/node_modules/react/index.mjs +13 -0
- package/dist/node_modules/.pnpm/react@19.2.8/node_modules/react/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/array-set.mjs +100 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/array-set.mjs.map +1 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/base64-vlq.mjs +73 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/base64-vlq.mjs.map +1 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/base64.mjs +41 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/base64.mjs.map +1 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/binary-search.mjs +68 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/binary-search.mjs.map +1 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/mapping-list.mjs +77 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/mapping-list.mjs.map +1 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/quick-sort.mjs +89 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/quick-sort.mjs.map +1 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-consumer.mjs +788 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-consumer.mjs.map +1 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-generator.mjs +295 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-generator.mjs.map +1 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-node.mjs +293 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-node.mjs.map +1 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/util.mjs +352 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/util.mjs.map +1 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/source-map.mjs +17 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/source-map.mjs.map +1 -0
- package/dist/node_modules/.pnpm/vue@3.5.41_typescript@5.9.3/node_modules/vue/dist/vue.cjs.mjs +67 -0
- package/dist/node_modules/.pnpm/vue@3.5.41_typescript@5.9.3/node_modules/vue/dist/vue.cjs.mjs.map +1 -0
- package/dist/node_modules/.pnpm/vue@3.5.41_typescript@5.9.3/node_modules/vue/index.mjs +13 -0
- package/dist/node_modules/.pnpm/vue@3.5.41_typescript@5.9.3/node_modules/vue/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/vue@3.5.41_typescript@5.9.3/node_modules/vue/index2.mjs +10 -0
- package/dist/node_modules/.pnpm/vue@3.5.41_typescript@5.9.3/node_modules/vue/index2.mjs.map +1 -0
- package/dist/node_modules/.pnpm/vue@3.5.41_typescript@5.9.3/node_modules/vue/server-renderer/index.mjs +10 -0
- package/dist/node_modules/.pnpm/vue@3.5.41_typescript@5.9.3/node_modules/vue/server-renderer/index.mjs.map +1 -0
- package/dist/server/cli/bin.d.mts +1 -0
- package/dist/server/cli/bin.mjs +8 -0
- package/dist/server/cli/bin.mjs.map +1 -0
- package/dist/server/cli/cli-spec.mjs +150 -0
- package/dist/server/cli/cli-spec.mjs.map +1 -0
- package/dist/server/cli/index.d.mts +16 -0
- package/dist/server/cli/index.d.mts.map +1 -0
- package/dist/server/cli/index.mjs +64 -0
- package/dist/server/cli/index.mjs.map +1 -0
- package/dist/server/compile/adaptors/html-partials.d.mts +24 -0
- package/dist/server/compile/adaptors/html-partials.d.mts.map +1 -0
- package/dist/server/compile/adaptors/html-partials.mjs +50 -0
- package/dist/server/compile/adaptors/html-partials.mjs.map +1 -0
- package/dist/server/compile/adaptors/html.d.mts +15 -0
- package/dist/server/compile/adaptors/html.d.mts.map +1 -0
- package/dist/server/compile/adaptors/html.mjs +39 -0
- package/dist/server/compile/adaptors/html.mjs.map +1 -0
- package/dist/server/compile/adaptors/node-require.d.mts +6 -0
- package/dist/server/compile/adaptors/node-require.d.mts.map +1 -0
- package/dist/server/compile/adaptors/node-require.mjs +35 -0
- package/dist/server/compile/adaptors/node-require.mjs.map +1 -0
- package/dist/server/compile/adaptors/react-browser.d.mts +20 -0
- package/dist/server/compile/adaptors/react-browser.d.mts.map +1 -0
- package/dist/server/compile/adaptors/react-browser.mjs +19 -0
- package/dist/server/compile/adaptors/react-browser.mjs.map +1 -0
- package/dist/server/compile/adaptors/react-node.d.mts +17 -0
- package/dist/server/compile/adaptors/react-node.d.mts.map +1 -0
- package/dist/server/compile/adaptors/react-node.mjs +50 -0
- package/dist/server/compile/adaptors/react-node.mjs.map +1 -0
- package/dist/server/compile/adaptors/types.d.mts +14 -0
- package/dist/server/compile/adaptors/types.d.mts.map +1 -0
- package/dist/server/compile/adaptors/types.mjs +1 -0
- package/dist/server/compile/adaptors/vue-browser.d.mts +16 -0
- package/dist/server/compile/adaptors/vue-browser.d.mts.map +1 -0
- package/dist/server/compile/adaptors/vue-browser.mjs +16 -0
- package/dist/server/compile/adaptors/vue-browser.mjs.map +1 -0
- package/dist/server/compile/adaptors/vue-node.d.mts +17 -0
- package/dist/server/compile/adaptors/vue-node.d.mts.map +1 -0
- package/dist/server/compile/adaptors/vue-node.mjs +50 -0
- package/dist/server/compile/adaptors/vue-node.mjs.map +1 -0
- package/dist/server/compile/build-entry-module.d.mts +20 -0
- package/dist/server/compile/build-entry-module.d.mts.map +1 -0
- package/dist/server/compile/build-entry-module.mjs +56 -0
- package/dist/server/compile/build-entry-module.mjs.map +1 -0
- package/dist/server/compile/bundle-name.d.mts +5 -0
- package/dist/server/compile/bundle-name.d.mts.map +1 -0
- package/dist/server/compile/bundle-name.mjs +13 -0
- package/dist/server/compile/bundle-name.mjs.map +1 -0
- package/dist/server/compile/compile-cache.d.mts +23 -0
- package/dist/server/compile/compile-cache.d.mts.map +1 -0
- package/dist/server/compile/compile-cache.mjs +102 -0
- package/dist/server/compile/compile-cache.mjs.map +1 -0
- package/dist/server/compile/compile.d.mts +100 -0
- package/dist/server/compile/compile.d.mts.map +1 -0
- package/dist/server/compile/compile.mjs +735 -0
- package/dist/server/compile/compile.mjs.map +1 -0
- package/dist/server/compile/constants.d.mts +11 -0
- package/dist/server/compile/constants.d.mts.map +1 -0
- package/dist/server/compile/constants.mjs +12 -0
- package/dist/server/compile/constants.mjs.map +1 -0
- package/dist/server/compile/create-renderer.d.mts +16 -0
- package/dist/server/compile/create-renderer.d.mts.map +1 -0
- package/dist/server/compile/create-renderer.mjs +59 -0
- package/dist/server/compile/create-renderer.mjs.map +1 -0
- package/dist/server/compile/decode-style-entities.d.mts +12 -0
- package/dist/server/compile/decode-style-entities.d.mts.map +1 -0
- package/dist/server/compile/decode-style-entities.mjs +32 -0
- package/dist/server/compile/decode-style-entities.mjs.map +1 -0
- package/dist/server/compile/defaults.d.mts +18 -0
- package/dist/server/compile/defaults.d.mts.map +1 -0
- package/dist/server/compile/defaults.mjs +128 -0
- package/dist/server/compile/defaults.mjs.map +1 -0
- package/dist/server/compile/dependency-closure.d.mts +10 -0
- package/dist/server/compile/dependency-closure.d.mts.map +1 -0
- package/dist/server/compile/dependency-closure.mjs +79 -0
- package/dist/server/compile/dependency-closure.mjs.map +1 -0
- package/dist/server/compile/document-assets.d.mts +103 -0
- package/dist/server/compile/document-assets.d.mts.map +1 -0
- package/dist/server/compile/document-assets.mjs +184 -0
- package/dist/server/compile/document-assets.mjs.map +1 -0
- package/dist/server/compile/finalize-document-html.d.mts +53 -0
- package/dist/server/compile/finalize-document-html.d.mts.map +1 -0
- package/dist/server/compile/finalize-document-html.mjs +132 -0
- package/dist/server/compile/finalize-document-html.mjs.map +1 -0
- package/dist/server/compile/generated/adaptorHtml.mjs +6 -0
- package/dist/server/compile/generated/adaptorHtml.mjs.map +1 -0
- package/dist/server/compile/generated/adaptorReactBrowser.mjs +6 -0
- package/dist/server/compile/generated/adaptorReactBrowser.mjs.map +1 -0
- package/dist/server/compile/generated/adaptorReactNode.mjs +6 -0
- package/dist/server/compile/generated/adaptorReactNode.mjs.map +1 -0
- package/dist/server/compile/generated/adaptorVueBrowser.mjs +6 -0
- package/dist/server/compile/generated/adaptorVueBrowser.mjs.map +1 -0
- package/dist/server/compile/generated/adaptorVueNode.mjs +6 -0
- package/dist/server/compile/generated/adaptorVueNode.mjs.map +1 -0
- package/dist/server/compile/generated/createRenderer.mjs +6 -0
- package/dist/server/compile/generated/createRenderer.mjs.map +1 -0
- package/dist/server/compile/generated/decodeStyleEntities.mjs +6 -0
- package/dist/server/compile/generated/decodeStyleEntities.mjs.map +1 -0
- package/dist/server/compile/generated/sanitizeHtml.mjs +6 -0
- package/dist/server/compile/generated/sanitizeHtml.mjs.map +1 -0
- package/dist/server/compile/generated/validate.mjs +6 -0
- package/dist/server/compile/generated/validate.mjs.map +1 -0
- package/dist/server/compile/generated/virtualStyles.mjs +6 -0
- package/dist/server/compile/generated/virtualStyles.mjs.map +1 -0
- package/dist/server/compile/get-renderer.d.mts +18 -0
- package/dist/server/compile/get-renderer.d.mts.map +1 -0
- package/dist/server/compile/get-renderer.mjs +31 -0
- package/dist/server/compile/get-renderer.mjs.map +1 -0
- package/dist/server/compile/index.d.mts +2 -0
- package/dist/server/compile/index.mjs +3 -0
- package/dist/server/compile/make-config.d.mts +39 -0
- package/dist/server/compile/make-config.d.mts.map +1 -0
- package/dist/server/compile/make-config.mjs +272 -0
- package/dist/server/compile/make-config.mjs.map +1 -0
- package/dist/server/compile/package-json.d.mts +5 -0
- package/dist/server/compile/package-json.d.mts.map +1 -0
- package/dist/server/compile/package-json.mjs +33 -0
- package/dist/server/compile/package-json.mjs.map +1 -0
- package/dist/server/compile/producer-agreement.d.mts +82 -0
- package/dist/server/compile/producer-agreement.d.mts.map +1 -0
- package/dist/server/compile/producer-agreement.mjs +143 -0
- package/dist/server/compile/producer-agreement.mjs.map +1 -0
- package/dist/server/compile/producer-release.d.mts +19 -0
- package/dist/server/compile/producer-release.d.mts.map +1 -0
- package/dist/server/compile/producer-release.mjs +27 -0
- package/dist/server/compile/producer-release.mjs.map +1 -0
- package/dist/server/compile/render-error.d.mts +37 -0
- package/dist/server/compile/render-error.d.mts.map +1 -0
- package/dist/server/compile/render-error.mjs +55 -0
- package/dist/server/compile/render-error.mjs.map +1 -0
- package/dist/server/compile/sanitize/shared.d.mts +19 -0
- package/dist/server/compile/sanitize/shared.d.mts.map +1 -0
- package/dist/server/compile/sanitize/shared.mjs +131 -0
- package/dist/server/compile/sanitize/shared.mjs.map +1 -0
- package/dist/server/compile/sanitize-html.d.mts +5 -0
- package/dist/server/compile/sanitize-html.d.mts.map +1 -0
- package/dist/server/compile/sanitize-html.mjs +65 -0
- package/dist/server/compile/sanitize-html.mjs.map +1 -0
- package/dist/server/compile/structured-log.d.mts +22 -0
- package/dist/server/compile/structured-log.d.mts.map +1 -0
- package/dist/server/compile/structured-log.mjs +31 -0
- package/dist/server/compile/structured-log.mjs.map +1 -0
- package/dist/server/compile/virtual-styles.d.mts +5 -0
- package/dist/server/compile/virtual-styles.d.mts.map +1 -0
- package/dist/server/compile/virtual-styles.mjs +19 -0
- package/dist/server/compile/virtual-styles.mjs.map +1 -0
- package/dist/server/compile/wrapper-source.d.mts +55 -0
- package/dist/server/compile/wrapper-source.d.mts.map +1 -0
- package/dist/server/compile/wrapper-source.mjs +187 -0
- package/dist/server/compile/wrapper-source.mjs.map +1 -0
- package/dist/server/constants.d.mts +17 -0
- package/dist/server/constants.d.mts.map +1 -0
- package/dist/server/constants.mjs +41 -0
- package/dist/server/constants.mjs.map +1 -0
- package/dist/server/errors.d.mts +21 -0
- package/dist/server/errors.d.mts.map +1 -0
- package/dist/server/errors.mjs +24 -0
- package/dist/server/errors.mjs.map +1 -0
- package/dist/server/index.d.mts +4 -0
- package/dist/server/index.mjs +4 -0
- package/dist/server/integrations/nextjs/generate-entry.d.mts +19 -0
- package/dist/server/integrations/nextjs/generate-entry.d.mts.map +1 -0
- package/dist/server/integrations/nextjs/generate-entry.mjs +246 -0
- package/dist/server/integrations/nextjs/generate-entry.mjs.map +1 -0
- package/dist/server/integrations/nextjs/index.d.mts +8 -0
- package/dist/server/integrations/nextjs/index.d.mts.map +1 -0
- package/dist/server/integrations/nextjs/index.mjs +90 -0
- package/dist/server/integrations/nextjs/index.mjs.map +1 -0
- package/dist/server/integrations/nextjs/watcher.d.mts +9 -0
- package/dist/server/integrations/nextjs/watcher.d.mts.map +1 -0
- package/dist/server/integrations/nextjs/watcher.mjs +45 -0
- package/dist/server/integrations/nextjs/watcher.mjs.map +1 -0
- package/dist/server/integrations/unplugin/esbuild.d.mts +2 -0
- package/dist/server/integrations/unplugin/esbuild.mjs +3 -0
- package/dist/server/integrations/unplugin/index.d.mts +69 -0
- package/dist/server/integrations/unplugin/index.d.mts.map +1 -0
- package/dist/server/integrations/unplugin/index.mjs +539 -0
- package/dist/server/integrations/unplugin/index.mjs.map +1 -0
- package/dist/server/integrations/unplugin/rollup.d.mts +2 -0
- package/dist/server/integrations/unplugin/rollup.mjs +3 -0
- package/dist/server/integrations/unplugin/utils.d.mts +12 -0
- package/dist/server/integrations/unplugin/utils.d.mts.map +1 -0
- package/dist/server/integrations/unplugin/utils.mjs +46 -0
- package/dist/server/integrations/unplugin/utils.mjs.map +1 -0
- package/dist/server/integrations/unplugin/vite.d.mts +2 -0
- package/dist/server/integrations/unplugin/vite.mjs +3 -0
- package/dist/server/integrations/unplugin/webpack.d.mts +2 -0
- package/dist/server/integrations/unplugin/webpack.mjs +3 -0
- package/dist/server/project/documents.d.mts +21 -0
- package/dist/server/project/documents.d.mts.map +1 -0
- package/dist/server/project/documents.mjs +114 -0
- package/dist/server/project/documents.mjs.map +1 -0
- package/dist/server/project/format-env-types.d.mts +19 -0
- package/dist/server/project/format-env-types.d.mts.map +1 -0
- package/dist/server/project/format-env-types.mjs +64 -0
- package/dist/server/project/format-env-types.mjs.map +1 -0
- package/dist/server/project/paths.d.mts +21 -0
- package/dist/server/project/paths.d.mts.map +1 -0
- package/dist/server/project/paths.mjs +31 -0
- package/dist/server/project/paths.mjs.map +1 -0
- package/dist/server/project/user-project-dir.d.mts +7 -0
- package/dist/server/project/user-project-dir.d.mts.map +1 -0
- package/dist/server/project/user-project-dir.mjs +16 -0
- package/dist/server/project/user-project-dir.mjs.map +1 -0
- package/dist/server/render-worker/client.d.mts +83 -0
- package/dist/server/render-worker/client.d.mts.map +1 -0
- package/dist/server/render-worker/client.mjs +359 -0
- package/dist/server/render-worker/client.mjs.map +1 -0
- package/dist/server/render-worker/document-css.d.mts +27 -0
- package/dist/server/render-worker/document-css.d.mts.map +1 -0
- package/dist/server/render-worker/document-css.mjs +37 -0
- package/dist/server/render-worker/document-css.mjs.map +1 -0
- package/dist/server/render-worker/env.d.mts +11 -0
- package/dist/server/render-worker/env.d.mts.map +1 -0
- package/dist/server/render-worker/env.mjs +26 -0
- package/dist/server/render-worker/env.mjs.map +1 -0
- package/dist/server/render-worker/error.d.mts +17 -0
- package/dist/server/render-worker/error.d.mts.map +1 -0
- package/dist/server/render-worker/error.mjs +40 -0
- package/dist/server/render-worker/error.mjs.map +1 -0
- package/dist/server/render-worker/host.d.mts +1 -0
- package/dist/server/render-worker/host.mjs +181 -0
- package/dist/server/render-worker/host.mjs.map +1 -0
- package/dist/server/render-worker/index.d.mts +4 -0
- package/dist/server/render-worker/index.mjs +4 -0
- package/dist/server/render-worker/sandbox.d.mts +25 -0
- package/dist/server/render-worker/sandbox.d.mts.map +1 -0
- package/dist/server/render-worker/sandbox.mjs +60 -0
- package/dist/server/render-worker/sandbox.mjs.map +1 -0
- package/dist/server/render-worker/types.d.mts +59 -0
- package/dist/server/render-worker/types.d.mts.map +1 -0
- package/dist/server/render-worker/types.mjs +1 -0
- package/dist/server/runtime-state.d.mts +12 -0
- package/dist/server/runtime-state.d.mts.map +1 -0
- package/dist/server/runtime-state.mjs +24 -0
- package/dist/server/runtime-state.mjs.map +1 -0
- package/dist/server/utils/check-dir.d.mts +12 -0
- package/dist/server/utils/check-dir.d.mts.map +1 -0
- package/dist/server/utils/check-dir.mjs +30 -0
- package/dist/server/utils/check-dir.mjs.map +1 -0
- package/dist/server/utils/dependencies.d.mts +11 -0
- package/dist/server/utils/dependencies.d.mts.map +1 -0
- package/dist/server/utils/dependencies.mjs +34 -0
- package/dist/server/utils/dependencies.mjs.map +1 -0
- package/dist/server/utils/env-var.d.mts +6 -0
- package/dist/server/utils/env-var.d.mts.map +1 -0
- package/dist/server/utils/env-var.mjs +28 -0
- package/dist/server/utils/env-var.mjs.map +1 -0
- package/dist/server/utils/format-for-log.d.mts +5 -0
- package/dist/server/utils/format-for-log.d.mts.map +1 -0
- package/dist/server/utils/format-for-log.mjs +17 -0
- package/dist/server/utils/format-for-log.mjs.map +1 -0
- package/dist/server/utils/index.d.mts +8 -0
- package/dist/server/utils/index.mjs +9 -0
- package/dist/server/utils/load-config.d.mts +13 -0
- package/dist/server/utils/load-config.d.mts.map +1 -0
- package/dist/server/utils/load-config.mjs +65 -0
- package/dist/server/utils/load-config.mjs.map +1 -0
- package/dist/server/utils/log.d.mts +36 -0
- package/dist/server/utils/log.d.mts.map +1 -0
- package/dist/server/utils/log.mjs +125 -0
- package/dist/server/utils/log.mjs.map +1 -0
- package/dist/server/utils/read-file.d.mts +5 -0
- package/dist/server/utils/read-file.d.mts.map +1 -0
- package/dist/server/utils/read-file.mjs +14 -0
- package/dist/server/utils/read-file.mjs.map +1 -0
- package/dist/server/utils/resolve-path-with-extensions.d.mts +21 -0
- package/dist/server/utils/resolve-path-with-extensions.d.mts.map +1 -0
- package/dist/server/utils/resolve-path-with-extensions.mjs +39 -0
- package/dist/server/utils/resolve-path-with-extensions.mjs.map +1 -0
- package/dist/server/utils/schema.d.mts +7 -0
- package/dist/server/utils/schema.d.mts.map +1 -0
- package/dist/server/utils/schema.mjs +21 -0
- package/dist/server/utils/schema.mjs.map +1 -0
- package/dist/server/utils/standard-schema-validate.d.mts +13 -0
- package/dist/server/utils/standard-schema-validate.d.mts.map +1 -0
- package/dist/server/utils/standard-schema-validate.mjs +21 -0
- package/dist/server/utils/standard-schema-validate.mjs.map +1 -0
- package/dist/server/utils/suggest-similar.d.mts +9 -0
- package/dist/server/utils/suggest-similar.d.mts.map +1 -0
- package/dist/server/utils/suggest-similar.mjs +39 -0
- package/dist/server/utils/suggest-similar.mjs.map +1 -0
- package/dist/server/utils/warn-lockstep.d.mts +13 -0
- package/dist/server/utils/warn-lockstep.d.mts.map +1 -0
- package/dist/server/utils/warn-lockstep.mjs +23 -0
- package/dist/server/utils/warn-lockstep.mjs.map +1 -0
- package/dist/server/vite/create-config.d.mts +35 -0
- package/dist/server/vite/create-config.d.mts.map +1 -0
- package/dist/server/vite/create-config.mjs +64 -0
- package/dist/server/vite/create-config.mjs.map +1 -0
- package/dist/server/vite/plugins/collect-css.d.mts +8 -0
- package/dist/server/vite/plugins/collect-css.d.mts.map +1 -0
- package/dist/server/vite/plugins/collect-css.mjs +21 -0
- package/dist/server/vite/plugins/collect-css.mjs.map +1 -0
- package/dist/server/vite/plugins/get-styles.d.mts +14 -0
- package/dist/server/vite/plugins/get-styles.d.mts.map +1 -0
- package/dist/server/vite/plugins/get-styles.mjs +88 -0
- package/dist/server/vite/plugins/get-styles.mjs.map +1 -0
- package/dist/server/vite/plugins/html-loader.d.mts +18 -0
- package/dist/server/vite/plugins/html-loader.d.mts.map +1 -0
- package/dist/server/vite/plugins/html-loader.mjs +88 -0
- package/dist/server/vite/plugins/html-loader.mjs.map +1 -0
- package/dist/server/vite/plugins/postcss/import-url.d.mts +14 -0
- package/dist/server/vite/plugins/postcss/import-url.d.mts.map +1 -0
- package/dist/server/vite/plugins/postcss/import-url.mjs +163 -0
- package/dist/server/vite/plugins/postcss/import-url.mjs.map +1 -0
- package/dist/server/vite/plugins/styles-pre-processor.d.mts +7 -0
- package/dist/server/vite/plugins/styles-pre-processor.d.mts.map +1 -0
- package/dist/server/vite/plugins/styles-pre-processor.mjs +64 -0
- package/dist/server/vite/plugins/styles-pre-processor.mjs.map +1 -0
- package/dist/server/vite/plugins/utils.d.mts +9 -0
- package/dist/server/vite/plugins/utils.d.mts.map +1 -0
- package/dist/server/vite/plugins/utils.mjs +14 -0
- package/dist/server/vite/plugins/utils.mjs.map +1 -0
- package/dist/shared/constants.d.mts +11 -0
- package/dist/shared/constants.d.mts.map +1 -0
- package/dist/shared/constants.mjs +12 -0
- package/dist/shared/constants.mjs.map +1 -0
- package/dist/shared/env.d.mts +6 -0
- package/dist/shared/env.d.mts.map +1 -0
- package/dist/shared/env.mjs +11 -0
- package/dist/shared/env.mjs.map +1 -0
- package/dist/shared/http.d.mts +15 -0
- package/dist/shared/http.d.mts.map +1 -0
- package/dist/shared/http.mjs +54 -0
- package/dist/shared/http.mjs.map +1 -0
- package/dist/shared/types/document.d.mts +17 -0
- package/dist/shared/types/document.d.mts.map +1 -0
- package/dist/shared/types/document.mjs +1 -0
- package/dist/shared/types/index.d.mts +7 -0
- package/dist/shared/types/index.mjs +4 -0
- package/dist/shared/types/log.d.mts +10 -0
- package/dist/shared/types/log.d.mts.map +1 -0
- package/dist/shared/types/log.mjs +12 -0
- package/dist/shared/types/log.mjs.map +1 -0
- package/dist/shared/types/public/cli.d.mts +33 -0
- package/dist/shared/types/public/cli.d.mts.map +1 -0
- package/dist/shared/types/public/cli.mjs +1 -0
- package/dist/shared/types/public/compile.d.mts +45 -0
- package/dist/shared/types/public/compile.d.mts.map +1 -0
- package/dist/shared/types/public/compile.mjs +29 -0
- package/dist/shared/types/public/compile.mjs.map +1 -0
- package/dist/shared/types/public/config.d.mts +94 -0
- package/dist/shared/types/public/config.d.mts.map +1 -0
- package/dist/shared/types/public/config.mjs +20 -0
- package/dist/shared/types/public/config.mjs.map +1 -0
- package/dist/shared/types/public/index.d.mts +6 -0
- package/dist/shared/types/public/index.mjs +4 -0
- package/dist/shared/types/public/nextjs.d.mts +111 -0
- package/dist/shared/types/public/nextjs.d.mts.map +1 -0
- package/dist/shared/types/public/nextjs.mjs +1 -0
- package/dist/shared/types/public/renderer.d.mts +2 -0
- package/dist/shared/types/public/renderer.mjs +1 -0
- package/dist/shared/types/public/unplugin.d.mts +65 -0
- package/dist/shared/types/public/unplugin.d.mts.map +1 -0
- package/dist/shared/types/public/unplugin.mjs +1 -0
- package/dist/shared/types/server.d.mts +5 -0
- package/dist/shared/types/server.d.mts.map +1 -0
- package/dist/shared/types/server.mjs +1 -0
- package/dist/shared/types/state.d.mts +15 -0
- package/dist/shared/types/state.d.mts.map +1 -0
- package/dist/shared/types/state.mjs +1 -0
- package/dist/shared/types/system.d.mts +18 -0
- package/dist/shared/types/system.d.mts.map +1 -0
- package/dist/shared/types/system.mjs +1 -0
- package/package.json +146 -34
- package/types/next.d.ts +6 -0
- package/index.d.ts +0 -2
- package/index.js +0 -3
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { isAbsolute, posix, relative, resolve } from "path";
|
|
2
|
+
|
|
3
|
+
//#region src/server/integrations/unplugin/utils.ts
|
|
4
|
+
function sanitiseSubdir(input) {
|
|
5
|
+
if (!input) return;
|
|
6
|
+
let rel = input.replace(/\\/g, "/").trim();
|
|
7
|
+
if (!rel) return;
|
|
8
|
+
if (rel.startsWith("/") || isAbsolute(rel)) return;
|
|
9
|
+
rel = rel.replace(/^\.\/+/, "");
|
|
10
|
+
rel = posix.normalize(rel);
|
|
11
|
+
rel = rel.split("/").filter((seg) => seg && seg !== "..").join("/");
|
|
12
|
+
return rel || void 0;
|
|
13
|
+
}
|
|
14
|
+
function safeRelPath(outRootAbs, subdir, file) {
|
|
15
|
+
const rel = subdir ? posix.join(subdir, file) : file;
|
|
16
|
+
const abs = resolve(outRootAbs, rel);
|
|
17
|
+
const back = relative(outRootAbs, abs).replace(/\\/g, "/");
|
|
18
|
+
if (back.startsWith("..") || back.startsWith("../")) return {
|
|
19
|
+
rel: file,
|
|
20
|
+
abs: resolve(outRootAbs, file)
|
|
21
|
+
};
|
|
22
|
+
return {
|
|
23
|
+
rel,
|
|
24
|
+
abs
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function cleanId(id) {
|
|
28
|
+
const noZero = id.startsWith("\0") ? id.slice(1) : id;
|
|
29
|
+
const q = noZero.indexOf("?");
|
|
30
|
+
const h = noZero.indexOf("#");
|
|
31
|
+
const cut = (x, y) => x === -1 ? y : y === -1 ? x : Math.min(x, y);
|
|
32
|
+
const end = cut(q, h);
|
|
33
|
+
return end === -1 ? noZero : noZero.slice(0, end);
|
|
34
|
+
}
|
|
35
|
+
function addZeroPrefix(id) {
|
|
36
|
+
return id.startsWith("\0") ? id : `\0${id}`;
|
|
37
|
+
}
|
|
38
|
+
function stripPrefix(id, prefix) {
|
|
39
|
+
const cid = cleanId(id);
|
|
40
|
+
if (cid.startsWith(prefix)) return cid.slice(prefix.length);
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
export { addZeroPrefix, cleanId, safeRelPath, sanitiseSubdir, stripPrefix };
|
|
46
|
+
//# sourceMappingURL=utils.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.mjs","names":[],"sources":["../../../../src/server/integrations/unplugin/utils.ts"],"sourcesContent":["import { isAbsolute, relative, resolve, posix } from 'path'\n\nexport function sanitiseSubdir(input?: string): string | undefined {\n\tif (!input) {\n\t\treturn undefined\n\t}\n\n\tlet rel = input.replace(/\\\\/g, '/').trim()\n\n\tif (!rel) {\n\t\treturn undefined\n\t}\n\n\tif (rel.startsWith('/') || isAbsolute(rel)) {\n\t\treturn undefined\n\t}\n\n\trel = rel.replace(/^\\.\\/+/, '')\n\n\trel = posix.normalize(rel)\n\n\trel = rel\n\t\t.split('/')\n\t\t.filter(seg => seg && seg !== '..')\n\t\t.join('/')\n\n\treturn rel || undefined\n}\n\nexport function safeRelPath(\n\toutRootAbs: string,\n\tsubdir: string | undefined,\n\tfile: string\n): { rel: string; abs: string } {\n\tconst rel = subdir ? posix.join(subdir, file) : file\n\tconst abs = resolve(outRootAbs, rel)\n\tconst back = relative(outRootAbs, abs).replace(/\\\\/g, '/')\n\n\tif (back.startsWith('..') || back.startsWith('../')) {\n\t\t// clamp to outRoot if traversal occurred\n\t\treturn { rel: file, abs: resolve(outRootAbs, file) }\n\t}\n\n\treturn { rel, abs }\n}\n\nexport function cleanId(id: string): string {\n\t// remove leading \\0 used by adapters and strip query/hash\n\tconst noZero = id.startsWith('\\0') ? id.slice(1) : id\n\tconst q = noZero.indexOf('?')\n\tconst h = noZero.indexOf('#')\n\tconst cut = (x: number, y: number) => (x === -1 ? y : y === -1 ? x : Math.min(x, y))\n\tconst end = cut(q, h)\n\treturn end === -1 ? noZero : noZero.slice(0, end)\n}\n\nexport function addZeroPrefix(id: string): string {\n\treturn id.startsWith('\\0') ? id : `\\0${id}`\n}\n\nexport function stripPrefix(id: string, prefix: string): string | null {\n\tconst cid = cleanId(id)\n\n\tif (cid.startsWith(prefix)) {\n\t\treturn cid.slice(prefix.length)\n\t}\n\n\treturn null\n}\n"],"mappings":";;;AAEA,SAAgB,eAAe,OAAoC;AAClE,KAAI,CAAC,MACJ;CAGD,IAAI,MAAM,MAAM,QAAQ,OAAO,IAAI,CAAC,MAAM;AAE1C,KAAI,CAAC,IACJ;AAGD,KAAI,IAAI,WAAW,IAAI,IAAI,WAAW,IAAI,CACzC;AAGD,OAAM,IAAI,QAAQ,UAAU,GAAG;AAE/B,OAAM,MAAM,UAAU,IAAI;AAE1B,OAAM,IACJ,MAAM,IAAI,CACV,QAAO,QAAO,OAAO,QAAQ,KAAK,CAClC,KAAK,IAAI;AAEX,QAAO,OAAO;;AAGf,SAAgB,YACf,YACA,QACA,MAC+B;CAC/B,MAAM,MAAM,SAAS,MAAM,KAAK,QAAQ,KAAK,GAAG;CAChD,MAAM,MAAM,QAAQ,YAAY,IAAI;CACpC,MAAM,OAAO,SAAS,YAAY,IAAI,CAAC,QAAQ,OAAO,IAAI;AAE1D,KAAI,KAAK,WAAW,KAAK,IAAI,KAAK,WAAW,MAAM,CAElD,QAAO;EAAE,KAAK;EAAM,KAAK,QAAQ,YAAY,KAAK;EAAE;AAGrD,QAAO;EAAE;EAAK;EAAK;;AAGpB,SAAgB,QAAQ,IAAoB;CAE3C,MAAM,SAAS,GAAG,WAAW,KAAK,GAAG,GAAG,MAAM,EAAE,GAAG;CACnD,MAAM,IAAI,OAAO,QAAQ,IAAI;CAC7B,MAAM,IAAI,OAAO,QAAQ,IAAI;CAC7B,MAAM,OAAO,GAAW,MAAe,MAAM,KAAK,IAAI,MAAM,KAAK,IAAI,KAAK,IAAI,GAAG,EAAE;CACnF,MAAM,MAAM,IAAI,GAAG,EAAE;AACrB,QAAO,QAAQ,KAAK,SAAS,OAAO,MAAM,GAAG,IAAI;;AAGlD,SAAgB,cAAc,IAAoB;AACjD,QAAO,GAAG,WAAW,KAAK,GAAG,KAAK,KAAK;;AAGxC,SAAgB,YAAY,IAAY,QAA+B;CACtE,MAAM,MAAM,QAAQ,GAAG;AAEvB,KAAI,IAAI,WAAW,OAAO,CACzB,QAAO,IAAI,MAAM,OAAO,OAAO;AAGhC,QAAO"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FormatConfig } from "../../shared/types/public/config.mjs";
|
|
2
|
+
import { Document } from "../../shared/types/document.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/server/project/documents.d.ts
|
|
5
|
+
interface GetUserDocumentIndexOptions {
|
|
6
|
+
documentName: string;
|
|
7
|
+
config: FormatConfig;
|
|
8
|
+
}
|
|
9
|
+
declare const getDocumentDataDir: (documentName: string, config: FormatConfig) => string;
|
|
10
|
+
declare const getDocumentDataVariantPath: (documentName: string, variant: string, config: FormatConfig) => string;
|
|
11
|
+
declare function getUserDocumentIndex(args: GetUserDocumentIndexOptions): Promise<string>;
|
|
12
|
+
declare function getDocumentLastModified(documentName: string, config: FormatConfig): Promise<number | null>;
|
|
13
|
+
declare function getDocuments(config: FormatConfig): Promise<Document[]>;
|
|
14
|
+
declare function getDataVariants(documentName: string, config: FormatConfig): Promise<string[]>;
|
|
15
|
+
/**
|
|
16
|
+
* Get the data for a specific document and variant.
|
|
17
|
+
*/
|
|
18
|
+
declare function getDocumentDataFile(documentName: string, variant: string, config: FormatConfig): Promise<any>;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { getDataVariants, getDocumentDataDir, getDocumentDataFile, getDocumentDataVariantPath, getDocumentLastModified, getDocuments, getUserDocumentIndex };
|
|
21
|
+
//# sourceMappingURL=documents.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documents.d.mts","names":[],"sources":["../../../src/server/project/documents.ts"],"sourcesContent":[],"mappings":";;;;UAcU,2BAAA;;EAAA,MAAA,EAED,YAFC;AAKV;AAKa,cALA,kBAOZ,EAAA,CAAA,YAFyF,EAAA,MAAY,EAAA,MAAA,EALrC,YAKqC,EAAA,GAAA,MAAA;AAIhF,cAJT,0BAIoC,EAAA,CAAA,YAAA,EAAA,MAA8B,EAAA,OAAO,EAAA,MAAA,EAAA,MAAA,EAJI,YAIJ,EAAA,GAAA,MAAA;AAgChE,iBAhCA,oBAAA,CAgCsD,IAAA,EAhC3B,2BAgCiD,CAAA,EAhCnB,OAgCmB,CAAA,MAAA,CAAA;AA8C5E,iBA9CA,uBAAA,CA8CY,YAAA,EAAA,MAAA,EAAA,MAAA,EA9C0C,YA8C1C,CAAA,EA9CyD,OA8CzD,CAAA,MAAA,GAAA,IAAA,CAAA;AAAS,iBAArB,YAAA,CAAqB,MAAA,EAAA,YAAA,CAAA,EAAe,OAAf,CAAuB,QAAvB,EAAA,CAAA;AAAuB,iBA6D5C,eAAA,CA7D4C,YAAA,EAAA,MAAA,EAAA,MAAA,EA6DE,YA7DF,CAAA,EA6DiB,OA7DjB,CAAA,MAAA,EAAA,CAAA;;;AA6DlE;AAwBsB,iBAAA,mBAAA,CAAmE,YAAe,EAAA,MAAO,EAAA,OAAA,EAAA,MAAA,EAAA,MAAA,EAAtB,YAAsB,CAAA,EAAP,OAAO,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { getDocumentsDir } from "./paths.mjs";
|
|
2
|
+
import { DATA_VARIANTS_DIR, PROJECT_EXTENSIONS } from "../constants.mjs";
|
|
3
|
+
import { CompileError } from "../errors.mjs";
|
|
4
|
+
import { RESERVED_DOCUMENT_NAMES } from "../compile/constants.mjs";
|
|
5
|
+
import { readFile as readFile$1 } from "../utils/read-file.mjs";
|
|
6
|
+
import { resolvePathWithExtensions } from "../utils/resolve-path-with-extensions.mjs";
|
|
7
|
+
import "../utils/index.mjs";
|
|
8
|
+
import { DEFAULT_VARIANT } from "../../shared/constants.mjs";
|
|
9
|
+
import { join, resolve } from "node:path";
|
|
10
|
+
import fs from "node:fs/promises";
|
|
11
|
+
|
|
12
|
+
//#region src/server/project/documents.ts
|
|
13
|
+
const getDocumentDataDir = (documentName, config) => {
|
|
14
|
+
return resolve(getDocumentsDir(config), documentName, DATA_VARIANTS_DIR);
|
|
15
|
+
};
|
|
16
|
+
const getDocumentDataVariantPath = (documentName, variant, config) => {
|
|
17
|
+
return resolve(getDocumentDataDir(documentName, config), `${variant}.json`);
|
|
18
|
+
};
|
|
19
|
+
async function getUserDocumentIndex(args) {
|
|
20
|
+
const { documentName, config } = args;
|
|
21
|
+
const path = join(getDocumentsDir(config), documentName);
|
|
22
|
+
const extensions = PROJECT_EXTENSIONS[config.framework];
|
|
23
|
+
try {
|
|
24
|
+
const indexPath = await resolvePathWithExtensions({
|
|
25
|
+
fileName: "index",
|
|
26
|
+
extensions,
|
|
27
|
+
path
|
|
28
|
+
});
|
|
29
|
+
if (!indexPath) throw new CompileError(`No index entry point found for "${documentName}" in "${path}". Expected one of: ${extensions.map((ext) => `index${ext}`).join(", ")}`);
|
|
30
|
+
return indexPath;
|
|
31
|
+
} catch (error) {
|
|
32
|
+
if (error instanceof Error) throw new CompileError(error.message);
|
|
33
|
+
throw error;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
async function getDocumentLastModified(documentName, config) {
|
|
37
|
+
const documentDir = join(getDocumentsDir(config), documentName);
|
|
38
|
+
const safeStatMtime = async (path) => {
|
|
39
|
+
try {
|
|
40
|
+
return (await fs.stat(path)).mtimeMs;
|
|
41
|
+
} catch {
|
|
42
|
+
return 0;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
try {
|
|
46
|
+
const targets = [documentDir, ...(await fs.readdir(documentDir, { withFileTypes: true })).filter((entry) => entry.isFile()).map((entry) => join(documentDir, entry.name))];
|
|
47
|
+
try {
|
|
48
|
+
const dataDir = join(documentDir, DATA_VARIANTS_DIR);
|
|
49
|
+
const dataEntries = await fs.readdir(dataDir, { withFileTypes: true });
|
|
50
|
+
targets.push(...dataEntries.filter((entry) => entry.isFile()).map((entry) => join(dataDir, entry.name)));
|
|
51
|
+
} catch {}
|
|
52
|
+
const mtimes = await Promise.all(targets.map(safeStatMtime));
|
|
53
|
+
const latest = Math.max(...mtimes);
|
|
54
|
+
return latest > 0 ? Math.round(latest) : null;
|
|
55
|
+
} catch {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
async function getDocumentsDirs(config) {
|
|
60
|
+
try {
|
|
61
|
+
const documentsDir = getDocumentsDir(config);
|
|
62
|
+
return await fs.readdir(documentsDir, { withFileTypes: true });
|
|
63
|
+
} catch {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
async function getDocuments(config) {
|
|
68
|
+
const supportedExtensions = PROJECT_EXTENSIONS[config.framework];
|
|
69
|
+
const documentDirs = await getDocumentsDirs(config);
|
|
70
|
+
if (!documentDirs) throw new CompileError("No documents folder found. Please create a documents folder, then add a folder for each document and an index entry point file.");
|
|
71
|
+
const reservedDir = documentDirs.find((dir) => (dir.isDirectory() || dir.isSymbolicLink()) && RESERVED_DOCUMENT_NAMES.includes(dir.name));
|
|
72
|
+
if (reservedDir) throw new CompileError(`"${reservedDir.name}" is a reserved name and can't be used for a document. Reserved names: ${RESERVED_DOCUMENT_NAMES.join(", ")}. Please rename the document folder.`);
|
|
73
|
+
return (await Promise.all(documentDirs.filter((dir) => dir.isDirectory() || dir.isSymbolicLink()).map(async (dir) => {
|
|
74
|
+
try {
|
|
75
|
+
const indexPath = await getUserDocumentIndex({
|
|
76
|
+
documentName: dir.name,
|
|
77
|
+
config
|
|
78
|
+
});
|
|
79
|
+
const extension = supportedExtensions.find((ext) => indexPath.endsWith(`index${ext}`));
|
|
80
|
+
if (!extension) return null;
|
|
81
|
+
const [variants, lastModified] = await Promise.all([getDataVariants(dir.name, config), getDocumentLastModified(dir.name, config)]);
|
|
82
|
+
return {
|
|
83
|
+
name: dir.name,
|
|
84
|
+
variants,
|
|
85
|
+
extension,
|
|
86
|
+
lastModified
|
|
87
|
+
};
|
|
88
|
+
} catch {
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
}))).filter(Boolean);
|
|
92
|
+
}
|
|
93
|
+
async function getDataVariants(documentName, config) {
|
|
94
|
+
const dataDir = getDocumentDataDir(documentName, config);
|
|
95
|
+
try {
|
|
96
|
+
return (await fs.readdir(dataDir, { withFileTypes: true })).filter((file) => file.isFile() && file.name.endsWith(".json")).map((file) => file.name.replace(".json", "")).sort((a, b) => {
|
|
97
|
+
if (a === DEFAULT_VARIANT) return -1;
|
|
98
|
+
if (b === DEFAULT_VARIANT) return 1;
|
|
99
|
+
return a.localeCompare(b);
|
|
100
|
+
});
|
|
101
|
+
} catch {
|
|
102
|
+
return [];
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Get the data for a specific document and variant.
|
|
107
|
+
*/
|
|
108
|
+
async function getDocumentDataFile(documentName, variant, config) {
|
|
109
|
+
return await readFile$1(getDocumentDataVariantPath(documentName, variant, config));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
//#endregion
|
|
113
|
+
export { getDataVariants, getDocumentDataDir, getDocumentDataFile, getDocumentDataVariantPath, getDocumentLastModified, getDocuments, getUserDocumentIndex };
|
|
114
|
+
//# sourceMappingURL=documents.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documents.mjs","names":["readFile"],"sources":["../../../src/server/project/documents.ts"],"sourcesContent":["import type { Dirent } from 'node:fs'\nimport type { FormatConfig } from '../../shared/types/public/config'\nimport type { Document } from '../../shared/types'\n\nimport fs from 'node:fs/promises'\nimport { join, resolve } from 'node:path'\n\nimport { DATA_VARIANTS_DIR, PROJECT_EXTENSIONS } from '../constants'\nimport { getDocumentsDir } from './paths'\nimport { readFile, resolvePathWithExtensions } from '../utils'\nimport { CompileError } from '../errors'\nimport { DEFAULT_VARIANT } from '../../shared/constants'\nimport { RESERVED_DOCUMENT_NAMES } from '../compile/constants'\n\ninterface GetUserDocumentIndexOptions {\n\tdocumentName: string\n\tconfig: FormatConfig\n}\n\nexport const getDocumentDataDir = (documentName: string, config: FormatConfig): string => {\n\tconst documentsDir = getDocumentsDir(config)\n\treturn resolve(documentsDir, documentName, DATA_VARIANTS_DIR)\n}\n\nexport const getDocumentDataVariantPath = (documentName: string, variant: string, config: FormatConfig): string => {\n\treturn resolve(getDocumentDataDir(documentName, config), `${variant}.json`)\n}\n\nexport async function getUserDocumentIndex(args: GetUserDocumentIndexOptions): Promise<string> {\n\tconst { documentName, config } = args\n\n\tconst documentsDir = getDocumentsDir(config)\n\tconst path = join(documentsDir, documentName)\n\tconst extensions = PROJECT_EXTENSIONS[config.framework] as string[]\n\n\ttry {\n\t\tconst indexPath = await resolvePathWithExtensions({\n\t\t\tfileName: 'index',\n\t\t\textensions,\n\t\t\tpath\n\t\t})\n\n\t\tif (!indexPath) {\n\t\t\tthrow new CompileError(\n\t\t\t\t`No index entry point found for \"${documentName}\" in \"${path}\". Expected one of: ${extensions.map(ext => `index${ext}`).join(', ')}`\n\t\t\t)\n\t\t}\n\n\t\treturn indexPath\n\t} catch (error) {\n\t\tif (error instanceof Error) {\n\t\t\tthrow new CompileError(error.message)\n\t\t}\n\t\tthrow error\n\t}\n}\n\n// Max mtime across the document's top-level files and its data variants — the\n// surfaces an author actually edits. One shallow pass; nested asset trees are\n// deliberately not walked (the dir mtime covers adds/removes at the top level).\nexport async function getDocumentLastModified(documentName: string, config: FormatConfig): Promise<number | null> {\n\tconst documentsDir = getDocumentsDir(config)\n\tconst documentDir = join(documentsDir, documentName)\n\n\tconst safeStatMtime = async (path: string): Promise<number> => {\n\t\ttry {\n\t\t\tconst stats = await fs.stat(path)\n\t\t\treturn stats.mtimeMs\n\t\t} catch {\n\t\t\treturn 0\n\t\t}\n\t}\n\n\ttry {\n\t\tconst entries = await fs.readdir(documentDir, { withFileTypes: true })\n\t\tconst targets = [\n\t\t\tdocumentDir,\n\t\t\t...entries.filter(entry => entry.isFile()).map(entry => join(documentDir, entry.name))\n\t\t]\n\n\t\ttry {\n\t\t\tconst dataDir = join(documentDir, DATA_VARIANTS_DIR)\n\t\t\tconst dataEntries = await fs.readdir(dataDir, { withFileTypes: true })\n\t\t\ttargets.push(...dataEntries.filter(entry => entry.isFile()).map(entry => join(dataDir, entry.name)))\n\t\t} catch {\n\t\t\t// No data dir yet.\n\t\t}\n\n\t\tconst mtimes = await Promise.all(targets.map(safeStatMtime))\n\t\tconst latest = Math.max(...mtimes)\n\n\t\treturn latest > 0 ? Math.round(latest) : null\n\t} catch {\n\t\treturn null\n\t}\n}\n\nasync function getDocumentsDirs(config: FormatConfig): Promise<Dirent[] | null> {\n\ttry {\n\t\tconst documentsDir = getDocumentsDir(config)\n\t\treturn await fs.readdir(documentsDir, { withFileTypes: true })\n\t} catch {\n\t\treturn null\n\t}\n}\n\nexport async function getDocuments(config: FormatConfig): Promise<Document[]> {\n\tconst supportedExtensions = PROJECT_EXTENSIONS[config.framework]\n\tconst documentDirs = await getDocumentsDirs(config)\n\n\tif (!documentDirs) {\n\t\tthrow new CompileError(\n\t\t\t'No documents folder found. Please create a documents folder, then add a folder for each document and an index entry point file.'\n\t\t)\n\t}\n\n\t// A document compiles to its own `<name>/` dir at the bundle root, so a name\n\t// matching a reserved output dir (e.g. `shared-assets`, `chunks`) would clash.\n\tconst reservedDir = documentDirs.find(\n\t\tdir => (dir.isDirectory() || dir.isSymbolicLink()) && RESERVED_DOCUMENT_NAMES.includes(dir.name)\n\t)\n\n\tif (reservedDir) {\n\t\tthrow new CompileError(\n\t\t\t`\"${reservedDir.name}\" is a reserved name and can't be used for a document. ` +\n\t\t\t\t`Reserved names: ${RESERVED_DOCUMENT_NAMES.join(', ')}. Please rename the document folder.`\n\t\t)\n\t}\n\n\tconst documents = await Promise.all(\n\t\tdocumentDirs\n\t\t\t.filter(dir => dir.isDirectory() || dir.isSymbolicLink())\n\t\t\t.map(async dir => {\n\t\t\t\ttry {\n\t\t\t\t\tconst indexPath = await getUserDocumentIndex({\n\t\t\t\t\t\tdocumentName: dir.name,\n\t\t\t\t\t\tconfig\n\t\t\t\t\t})\n\n\t\t\t\t\t// Extract extension from the full path\n\t\t\t\t\tconst extension = supportedExtensions.find(ext => indexPath.endsWith(`index${ext}`))\n\n\t\t\t\t\tif (!extension) {\n\t\t\t\t\t\treturn null\n\t\t\t\t\t}\n\n\t\t\t\t\tconst [variants, lastModified] = await Promise.all([\n\t\t\t\t\t\tgetDataVariants(dir.name, config),\n\t\t\t\t\t\tgetDocumentLastModified(dir.name, config)\n\t\t\t\t\t])\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\tname: dir.name,\n\t\t\t\t\t\tvariants,\n\t\t\t\t\t\textension,\n\t\t\t\t\t\tlastModified\n\t\t\t\t\t}\n\t\t\t\t} catch {\n\t\t\t\t\t// Document doesn't have a valid index file, skip it\n\t\t\t\t\treturn null\n\t\t\t\t}\n\t\t\t})\n\t)\n\n\treturn documents.filter(Boolean) as Document[]\n}\n\nexport async function getDataVariants(documentName: string, config: FormatConfig): Promise<string[]> {\n\tconst dataDir = getDocumentDataDir(documentName, config)\n\n\ttry {\n\t\tconst files = await fs.readdir(dataDir, { withFileTypes: true })\n\n\t\treturn files\n\t\t\t.filter(file => file.isFile() && file.name.endsWith('.json'))\n\t\t\t.map(file => file.name.replace('.json', ''))\n\t\t\t.sort((a, b) => {\n\t\t\t\t// Ensure default.json comes first\n\t\t\t\tif (a === DEFAULT_VARIANT) return -1\n\t\t\t\tif (b === DEFAULT_VARIANT) return 1\n\t\t\t\treturn a.localeCompare(b)\n\t\t\t})\n\t} catch {\n\t\t// If data directory doesn't exist, return empty array\n\t\treturn []\n\t}\n}\n\n/**\n * Get the data for a specific document and variant.\n */\nexport async function getDocumentDataFile(documentName: string, variant: string, config: FormatConfig): Promise<any> {\n\tconst dataPath = getDocumentDataVariantPath(documentName, variant, config)\n\tconst data = await readFile(dataPath)\n\treturn data\n}\n"],"mappings":";;;;;;;;;;;;AAmBA,MAAa,sBAAsB,cAAsB,WAAiC;AAEzF,QAAO,QADc,gBAAgB,OAAO,EACf,cAAc,kBAAkB;;AAG9D,MAAa,8BAA8B,cAAsB,SAAiB,WAAiC;AAClH,QAAO,QAAQ,mBAAmB,cAAc,OAAO,EAAE,GAAG,QAAQ,OAAO;;AAG5E,eAAsB,qBAAqB,MAAoD;CAC9F,MAAM,EAAE,cAAc,WAAW;CAGjC,MAAM,OAAO,KADQ,gBAAgB,OAAO,EACZ,aAAa;CAC7C,MAAM,aAAa,mBAAmB,OAAO;AAE7C,KAAI;EACH,MAAM,YAAY,MAAM,0BAA0B;GACjD,UAAU;GACV;GACA;GACA,CAAC;AAEF,MAAI,CAAC,UACJ,OAAM,IAAI,aACT,mCAAmC,aAAa,QAAQ,KAAK,sBAAsB,WAAW,KAAI,QAAO,QAAQ,MAAM,CAAC,KAAK,KAAK,GAClI;AAGF,SAAO;UACC,OAAO;AACf,MAAI,iBAAiB,MACpB,OAAM,IAAI,aAAa,MAAM,QAAQ;AAEtC,QAAM;;;AAOR,eAAsB,wBAAwB,cAAsB,QAA8C;CAEjH,MAAM,cAAc,KADC,gBAAgB,OAAO,EACL,aAAa;CAEpD,MAAM,gBAAgB,OAAO,SAAkC;AAC9D,MAAI;AAEH,WADc,MAAM,GAAG,KAAK,KAAK,EACpB;UACN;AACP,UAAO;;;AAIT,KAAI;EAEH,MAAM,UAAU,CACf,aACA,IAHe,MAAM,GAAG,QAAQ,aAAa,EAAE,eAAe,MAAM,CAAC,EAG1D,QAAO,UAAS,MAAM,QAAQ,CAAC,CAAC,KAAI,UAAS,KAAK,aAAa,MAAM,KAAK,CAAC,CACtF;AAED,MAAI;GACH,MAAM,UAAU,KAAK,aAAa,kBAAkB;GACpD,MAAM,cAAc,MAAM,GAAG,QAAQ,SAAS,EAAE,eAAe,MAAM,CAAC;AACtE,WAAQ,KAAK,GAAG,YAAY,QAAO,UAAS,MAAM,QAAQ,CAAC,CAAC,KAAI,UAAS,KAAK,SAAS,MAAM,KAAK,CAAC,CAAC;UAC7F;EAIR,MAAM,SAAS,MAAM,QAAQ,IAAI,QAAQ,IAAI,cAAc,CAAC;EAC5D,MAAM,SAAS,KAAK,IAAI,GAAG,OAAO;AAElC,SAAO,SAAS,IAAI,KAAK,MAAM,OAAO,GAAG;SAClC;AACP,SAAO;;;AAIT,eAAe,iBAAiB,QAAgD;AAC/E,KAAI;EACH,MAAM,eAAe,gBAAgB,OAAO;AAC5C,SAAO,MAAM,GAAG,QAAQ,cAAc,EAAE,eAAe,MAAM,CAAC;SACvD;AACP,SAAO;;;AAIT,eAAsB,aAAa,QAA2C;CAC7E,MAAM,sBAAsB,mBAAmB,OAAO;CACtD,MAAM,eAAe,MAAM,iBAAiB,OAAO;AAEnD,KAAI,CAAC,aACJ,OAAM,IAAI,aACT,kIACA;CAKF,MAAM,cAAc,aAAa,MAChC,SAAQ,IAAI,aAAa,IAAI,IAAI,gBAAgB,KAAK,wBAAwB,SAAS,IAAI,KAAK,CAChG;AAED,KAAI,YACH,OAAM,IAAI,aACT,IAAI,YAAY,KAAK,yEACD,wBAAwB,KAAK,KAAK,CAAC,sCACvD;AAsCF,SAnCkB,MAAM,QAAQ,IAC/B,aACE,QAAO,QAAO,IAAI,aAAa,IAAI,IAAI,gBAAgB,CAAC,CACxD,IAAI,OAAM,QAAO;AACjB,MAAI;GACH,MAAM,YAAY,MAAM,qBAAqB;IAC5C,cAAc,IAAI;IAClB;IACA,CAAC;GAGF,MAAM,YAAY,oBAAoB,MAAK,QAAO,UAAU,SAAS,QAAQ,MAAM,CAAC;AAEpF,OAAI,CAAC,UACJ,QAAO;GAGR,MAAM,CAAC,UAAU,gBAAgB,MAAM,QAAQ,IAAI,CAClD,gBAAgB,IAAI,MAAM,OAAO,EACjC,wBAAwB,IAAI,MAAM,OAAO,CACzC,CAAC;AAEF,UAAO;IACN,MAAM,IAAI;IACV;IACA;IACA;IACA;UACM;AAEP,UAAO;;GAEP,CACH,EAEgB,OAAO,QAAQ;;AAGjC,eAAsB,gBAAgB,cAAsB,QAAyC;CACpG,MAAM,UAAU,mBAAmB,cAAc,OAAO;AAExD,KAAI;AAGH,UAFc,MAAM,GAAG,QAAQ,SAAS,EAAE,eAAe,MAAM,CAAC,EAG9D,QAAO,SAAQ,KAAK,QAAQ,IAAI,KAAK,KAAK,SAAS,QAAQ,CAAC,CAC5D,KAAI,SAAQ,KAAK,KAAK,QAAQ,SAAS,GAAG,CAAC,CAC3C,MAAM,GAAG,MAAM;AAEf,OAAI,MAAM,gBAAiB,QAAO;AAClC,OAAI,MAAM,gBAAiB,QAAO;AAClC,UAAO,EAAE,cAAc,EAAE;IACxB;SACI;AAEP,SAAO,EAAE;;;;;;AAOX,eAAsB,oBAAoB,cAAsB,SAAiB,QAAoC;AAGpH,QADa,MAAMA,WADF,2BAA2B,cAAc,SAAS,OAAO,CACrC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//#region src/server/project/format-env-types.d.ts
|
|
2
|
+
declare const FORMAT_ENV_FILE_NAME = "format-env.d.ts";
|
|
3
|
+
interface TypedDocument {
|
|
4
|
+
exportName: string;
|
|
5
|
+
}
|
|
6
|
+
interface BuildFormatEnvSourceArgs {
|
|
7
|
+
aliases: string[];
|
|
8
|
+
documents: TypedDocument[];
|
|
9
|
+
}
|
|
10
|
+
declare function buildFormatEnvSource(args: BuildFormatEnvSourceArgs): string;
|
|
11
|
+
interface WriteFormatEnvTypesArgs {
|
|
12
|
+
projectRoot: string;
|
|
13
|
+
aliases: string[];
|
|
14
|
+
documents: TypedDocument[];
|
|
15
|
+
}
|
|
16
|
+
declare function writeFormatEnvTypes(args: WriteFormatEnvTypesArgs): Promise<void>;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { FORMAT_ENV_FILE_NAME, TypedDocument, buildFormatEnvSource, writeFormatEnvTypes };
|
|
19
|
+
//# sourceMappingURL=format-env-types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-env-types.d.mts","names":[],"sources":["../../../src/server/project/format-env-types.ts"],"sourcesContent":[],"mappings":";cAGa,oBAAA;AAAA,UAEI,aAAA,CAFgB;EAEhB,UAAA,EAAA,MAAa;AAE7B;AA6CD,UATU,wBAAA,CAS0B;EAc1B,OAAA,EAAA,MAAA,EAAA;EAQY,SAAA,EA7BV,aA6B6B,EAAA;;iBAtBzB,oBAAA,OAA2B;UAcjC,uBAAA;;;aAGE;;iBAKU,mBAAA,OAA0B,0BAA0B"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { readFile, writeFile } from "node:fs/promises";
|
|
3
|
+
|
|
4
|
+
//#region src/server/project/format-env-types.ts
|
|
5
|
+
const FORMAT_ENV_FILE_NAME = "format-env.d.ts";
|
|
6
|
+
function buildDocumentModuleTypes(alias, documents) {
|
|
7
|
+
const exportNames = documents.map((document) => document.exportName);
|
|
8
|
+
const namedExports = exportNames.map((name) => `\texport const ${name}: FormatRenderer`).join("\n");
|
|
9
|
+
const defaultShape = exportNames.map((name) => `${name}: FormatRenderer`).join("; ");
|
|
10
|
+
return [
|
|
11
|
+
`declare module '${alias}' {`,
|
|
12
|
+
" interface FormatAssetConfig {",
|
|
13
|
+
" getAssetsUrl(): string | undefined",
|
|
14
|
+
" setAssetsUrl(url: string): void",
|
|
15
|
+
" }",
|
|
16
|
+
"",
|
|
17
|
+
" interface FormatDocument {",
|
|
18
|
+
" html: string",
|
|
19
|
+
" getAssetsWebStream(): Promise<ReadableStream<Uint8Array> | undefined>",
|
|
20
|
+
" }",
|
|
21
|
+
"",
|
|
22
|
+
" interface FormatRenderer extends FormatAssetConfig {",
|
|
23
|
+
" render(data?: Record<string, unknown>): Promise<FormatDocument>",
|
|
24
|
+
" getAssetsWebStream(): Promise<ReadableStream<Uint8Array> | undefined>",
|
|
25
|
+
" }",
|
|
26
|
+
"",
|
|
27
|
+
namedExports,
|
|
28
|
+
"",
|
|
29
|
+
`\tconst renderers: { ${defaultShape}; [key: string]: FormatRenderer }`,
|
|
30
|
+
" export default renderers",
|
|
31
|
+
"}"
|
|
32
|
+
].join("\n");
|
|
33
|
+
}
|
|
34
|
+
function buildFormatEnvSource(args) {
|
|
35
|
+
const { aliases, documents } = args;
|
|
36
|
+
return `/// <reference types="@format.dev/cli/env" />
|
|
37
|
+
|
|
38
|
+
// This file is managed by Format and regenerated with your document types when
|
|
39
|
+
// you compile. Do not edit.
|
|
40
|
+
|
|
41
|
+
${aliases.map((alias) => buildDocumentModuleTypes(alias, documents)).join("\n\n")}
|
|
42
|
+
`;
|
|
43
|
+
}
|
|
44
|
+
async function writeFormatEnvTypes(args) {
|
|
45
|
+
const { projectRoot, aliases, documents } = args;
|
|
46
|
+
const target = join(projectRoot, FORMAT_ENV_FILE_NAME);
|
|
47
|
+
const source = buildFormatEnvSource({
|
|
48
|
+
aliases,
|
|
49
|
+
documents
|
|
50
|
+
});
|
|
51
|
+
if (await readExisting(target) === source) return;
|
|
52
|
+
await writeFile(target, source, "utf8");
|
|
53
|
+
}
|
|
54
|
+
async function readExisting(path) {
|
|
55
|
+
try {
|
|
56
|
+
return await readFile(path, "utf8");
|
|
57
|
+
} catch {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
//#endregion
|
|
63
|
+
export { FORMAT_ENV_FILE_NAME, buildFormatEnvSource, writeFormatEnvTypes };
|
|
64
|
+
//# sourceMappingURL=format-env-types.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-env-types.mjs","names":[],"sources":["../../../src/server/project/format-env-types.ts"],"sourcesContent":["import { readFile, writeFile } from 'node:fs/promises'\nimport { join } from 'node:path'\n\nexport const FORMAT_ENV_FILE_NAME = 'format-env.d.ts'\n\nexport interface TypedDocument {\n\texportName: string\n}\n\n// The strongly-typed declaration for one virtual module alias. The FormatRenderer\n// shape is inlined so the generated file is self-contained — it needs no imports.\nfunction buildDocumentModuleTypes(alias: string, documents: TypedDocument[]): string {\n\tconst exportNames = documents.map(document => document.exportName)\n\n\tconst namedExports = exportNames.map(name => `\\texport const ${name}: FormatRenderer`).join('\\n')\n\n\tconst defaultShape = exportNames.map(name => `${name}: FormatRenderer`).join('; ')\n\n\treturn [\n\t\t`declare module '${alias}' {`,\n\t\t'\\tinterface FormatAssetConfig {',\n\t\t'\\t\\tgetAssetsUrl(): string | undefined',\n\t\t'\\t\\tsetAssetsUrl(url: string): void',\n\t\t'\\t}',\n\t\t'',\n\t\t'\\tinterface FormatDocument {',\n\t\t'\\t\\thtml: string',\n\t\t'\\t\\tgetAssetsWebStream(): Promise<ReadableStream<Uint8Array> | undefined>',\n\t\t'\\t}',\n\t\t'',\n\t\t'\\tinterface FormatRenderer extends FormatAssetConfig {',\n\t\t'\\t\\trender(data?: Record<string, unknown>): Promise<FormatDocument>',\n\t\t'\\t\\tgetAssetsWebStream(): Promise<ReadableStream<Uint8Array> | undefined>',\n\t\t'\\t}',\n\t\t'',\n\t\tnamedExports,\n\t\t'',\n\t\t`\\tconst renderers: { ${defaultShape}; [key: string]: FormatRenderer }`,\n\t\t'\\texport default renderers',\n\t\t'}'\n\t].join('\\n')\n}\n\ninterface BuildFormatEnvSourceArgs {\n\taliases: string[]\n\tdocuments: TypedDocument[]\n}\n\n// The full contents of a project's format-env.d.ts: the base ambient reference\n// (which resolves `*.html`, `*.svg`, and the `@format:*` catch-all) plus a\n// strongly-typed module for each compiled alias. `format init` seeds the base\n// reference alone; compile regenerates the file with these typed modules.\nexport function buildFormatEnvSource(args: BuildFormatEnvSourceArgs): string {\n\tconst { aliases, documents } = args\n\n\tconst modules = aliases.map(alias => buildDocumentModuleTypes(alias, documents)).join('\\n\\n')\n\n\treturn `/// <reference types=\"@format.dev/cli/env\" />\n\n// This file is managed by Format and regenerated with your document types when\n// you compile. Do not edit.\n\n${modules}\n`\n}\n\ninterface WriteFormatEnvTypesArgs {\n\tprojectRoot: string\n\taliases: string[]\n\tdocuments: TypedDocument[]\n}\n\n// Write <projectRoot>/format-env.d.ts, skipping the write when nothing changed\n// so repeated compiles don't churn the file (or the watcher that sees it).\nexport async function writeFormatEnvTypes(args: WriteFormatEnvTypesArgs): Promise<void> {\n\tconst { projectRoot, aliases, documents } = args\n\n\tconst target = join(projectRoot, FORMAT_ENV_FILE_NAME)\n\tconst source = buildFormatEnvSource({ aliases, documents })\n\n\tconst existing = await readExisting(target)\n\n\tif (existing === source) {\n\t\treturn\n\t}\n\n\tawait writeFile(target, source, 'utf8')\n}\n\nasync function readExisting(path: string): Promise<string | null> {\n\ttry {\n\t\treturn await readFile(path, 'utf8')\n\t} catch {\n\t\treturn null\n\t}\n}\n"],"mappings":";;;;AAGA,MAAa,uBAAuB;AAQpC,SAAS,yBAAyB,OAAe,WAAoC;CACpF,MAAM,cAAc,UAAU,KAAI,aAAY,SAAS,WAAW;CAElE,MAAM,eAAe,YAAY,KAAI,SAAQ,kBAAkB,KAAK,kBAAkB,CAAC,KAAK,KAAK;CAEjG,MAAM,eAAe,YAAY,KAAI,SAAQ,GAAG,KAAK,kBAAkB,CAAC,KAAK,KAAK;AAElF,QAAO;EACN,mBAAmB,MAAM;EACzB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,wBAAwB,aAAa;EACrC;EACA;EACA,CAAC,KAAK,KAAK;;AAYb,SAAgB,qBAAqB,MAAwC;CAC5E,MAAM,EAAE,SAAS,cAAc;AAI/B,QAAO;;;;;EAFS,QAAQ,KAAI,UAAS,yBAAyB,OAAO,UAAU,CAAC,CAAC,KAAK,OAAO,CAOpF;;;AAYV,eAAsB,oBAAoB,MAA8C;CACvF,MAAM,EAAE,aAAa,SAAS,cAAc;CAE5C,MAAM,SAAS,KAAK,aAAa,qBAAqB;CACtD,MAAM,SAAS,qBAAqB;EAAE;EAAS;EAAW,CAAC;AAI3D,KAFiB,MAAM,aAAa,OAAO,KAE1B,OAChB;AAGD,OAAM,UAAU,QAAQ,QAAQ,OAAO;;AAGxC,eAAe,aAAa,MAAsC;AACjE,KAAI;AACH,SAAO,MAAM,SAAS,MAAM,OAAO;SAC5B;AACP,SAAO"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FormatConfig } from "../../shared/types/public/config.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/server/project/paths.d.ts
|
|
4
|
+
declare const DOT_TMP_DIR_NAME = ".tmp";
|
|
5
|
+
declare const DEFAULT_OUT_DIR_NAME = "_generated";
|
|
6
|
+
declare const DOT_FORMAT_DIR_NAME = ".format";
|
|
7
|
+
declare const _dirname: string;
|
|
8
|
+
declare const getRootDir: (config: FormatConfig) => string;
|
|
9
|
+
declare function getDocumentsDir(config: FormatConfig): string;
|
|
10
|
+
declare const SHARED_ASSETS_DIR_NAME = "assets";
|
|
11
|
+
/**
|
|
12
|
+
* The shared assets directory. Defaults to `assets/` under the root dir,
|
|
13
|
+
* mirroring each document's own `./assets/` folder. An explicit
|
|
14
|
+
* `sharedAssetsDir` resolves relative to the project directory, so it can sit
|
|
15
|
+
* outside `rootDir`. The directory is not required to exist — callers check.
|
|
16
|
+
*/
|
|
17
|
+
declare function getSharedAssetsDir(config: FormatConfig): string;
|
|
18
|
+
declare const DOCUMENTS_DIR_NAME = "documents";
|
|
19
|
+
//#endregion
|
|
20
|
+
export { DEFAULT_OUT_DIR_NAME, DOCUMENTS_DIR_NAME, DOT_FORMAT_DIR_NAME, DOT_TMP_DIR_NAME, SHARED_ASSETS_DIR_NAME, _dirname, getDocumentsDir, getRootDir, getSharedAssetsDir };
|
|
21
|
+
//# sourceMappingURL=paths.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.d.mts","names":[],"sources":["../../../src/server/project/paths.ts"],"sourcesContent":[],"mappings":";;;cAOa,gBAAA;cACA,oBAAA;AADA,cAEA,mBAAA,GAFgB,SAAA;AAChB,cAKA,QALoB,EAAA,MAAA;AACpB,cAOA,UAPmB,EAAA,CAAA,MAAA,EAOG,YAPH,EAAA,GAAA,MAAA;AAInB,iBAOG,eAAA,CAPiE,MAAA,EAOzC,YAPyC,CAAA,EAAA,MAAA;AAGpE,cAQA,sBAAA,GARkC,QAAA;AAI/C;AAIA;AAQA;AAQA;;;iBARgB,kBAAA,SAA2B;cAQ9B,kBAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { getUserProjectDir } from "./user-project-dir.mjs";
|
|
2
|
+
import { dirname, join, resolve } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
|
|
5
|
+
//#region src/server/project/paths.ts
|
|
6
|
+
const DOT_TMP_DIR_NAME = ".tmp";
|
|
7
|
+
const DEFAULT_OUT_DIR_NAME = "_generated";
|
|
8
|
+
const DOT_FORMAT_DIR_NAME = ".format";
|
|
9
|
+
const _dirname = join(dirname(fileURLToPath(import.meta.url)), "..", "..");
|
|
10
|
+
const getRootDir = (config) => {
|
|
11
|
+
return resolve(getUserProjectDir(), config.rootDir || "./");
|
|
12
|
+
};
|
|
13
|
+
function getDocumentsDir(config) {
|
|
14
|
+
return join(getRootDir(config), DOCUMENTS_DIR_NAME);
|
|
15
|
+
}
|
|
16
|
+
const SHARED_ASSETS_DIR_NAME = "assets";
|
|
17
|
+
/**
|
|
18
|
+
* The shared assets directory. Defaults to `assets/` under the root dir,
|
|
19
|
+
* mirroring each document's own `./assets/` folder. An explicit
|
|
20
|
+
* `sharedAssetsDir` resolves relative to the project directory, so it can sit
|
|
21
|
+
* outside `rootDir`. The directory is not required to exist — callers check.
|
|
22
|
+
*/
|
|
23
|
+
function getSharedAssetsDir(config) {
|
|
24
|
+
if (config.sharedAssetsDir) return join(getUserProjectDir(), config.sharedAssetsDir);
|
|
25
|
+
return join(getRootDir(config), SHARED_ASSETS_DIR_NAME);
|
|
26
|
+
}
|
|
27
|
+
const DOCUMENTS_DIR_NAME = "documents";
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
export { DEFAULT_OUT_DIR_NAME, DOCUMENTS_DIR_NAME, DOT_FORMAT_DIR_NAME, DOT_TMP_DIR_NAME, SHARED_ASSETS_DIR_NAME, _dirname, getDocumentsDir, getRootDir, getSharedAssetsDir };
|
|
31
|
+
//# sourceMappingURL=paths.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.mjs","names":[],"sources":["../../../src/server/project/paths.ts"],"sourcesContent":["import type { FormatConfig } from '../../shared/types/public/config'\n\nimport { dirname, join, resolve } from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nimport { getUserProjectDir } from './user-project-dir'\n\nexport const DOT_TMP_DIR_NAME = '.tmp'\nexport const DEFAULT_OUT_DIR_NAME = '_generated'\nexport const DOT_FORMAT_DIR_NAME = '.format'\n\n// The @format.dev/compile dist directory (when built). Two levels up because this\n// module sits at server/project/ — keep in step if this file ever moves.\nexport const _dirname = join(dirname(fileURLToPath(import.meta.url)), '..', '..')\n\n// Affected by the `rootDir` config option\nexport const getRootDir = (config: FormatConfig): string => {\n\treturn resolve(getUserProjectDir(), config.rootDir || './')\n}\n\nexport function getDocumentsDir(config: FormatConfig): string {\n\treturn join(getRootDir(config), DOCUMENTS_DIR_NAME)\n}\n\nexport const SHARED_ASSETS_DIR_NAME = 'assets'\n\n/**\n * The shared assets directory. Defaults to `assets/` under the root dir,\n * mirroring each document's own `./assets/` folder. An explicit\n * `sharedAssetsDir` resolves relative to the project directory, so it can sit\n * outside `rootDir`. The directory is not required to exist — callers check.\n */\nexport function getSharedAssetsDir(config: FormatConfig): string {\n\tif (config.sharedAssetsDir) {\n\t\treturn join(getUserProjectDir(), config.sharedAssetsDir)\n\t}\n\n\treturn join(getRootDir(config), SHARED_ASSETS_DIR_NAME)\n}\n\nexport const DOCUMENTS_DIR_NAME = 'documents'\n"],"mappings":";;;;;AAOA,MAAa,mBAAmB;AAChC,MAAa,uBAAuB;AACpC,MAAa,sBAAsB;AAInC,MAAa,WAAW,KAAK,QAAQ,cAAc,OAAO,KAAK,IAAI,CAAC,EAAE,MAAM,KAAK;AAGjF,MAAa,cAAc,WAAiC;AAC3D,QAAO,QAAQ,mBAAmB,EAAE,OAAO,WAAW,KAAK;;AAG5D,SAAgB,gBAAgB,QAA8B;AAC7D,QAAO,KAAK,WAAW,OAAO,EAAE,mBAAmB;;AAGpD,MAAa,yBAAyB;;;;;;;AAQtC,SAAgB,mBAAmB,QAA8B;AAChE,KAAI,OAAO,gBACV,QAAO,KAAK,mBAAmB,EAAE,OAAO,gBAAgB;AAGzD,QAAO,KAAK,WAAW,OAAO,EAAE,uBAAuB;;AAGxD,MAAa,qBAAqB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region src/server/project/user-project-dir.d.ts
|
|
2
|
+
declare const setUserProjectDir: (dir: string) => void;
|
|
3
|
+
declare const getUserProjectDir: () => string;
|
|
4
|
+
declare function createUserRequire(cwd?: string): NodeJS.Require;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { createUserRequire, getUserProjectDir, setUserProjectDir };
|
|
7
|
+
//# sourceMappingURL=user-project-dir.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-project-dir.d.mts","names":[],"sources":["../../../src/server/project/user-project-dir.ts"],"sourcesContent":[],"mappings":";cAKa;AAAA,cAIA,iBAFZ,EAAA,GAAA,GAAA,MAAA;AAEY,iBAEG,iBAAA,CAFuC,GAAA,CAAA,EAAA,MAAA,CAAA,EAET,MAAA,CAAA,OAFS"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
|
|
4
|
+
//#region src/server/project/user-project-dir.ts
|
|
5
|
+
let USER_PROJECT_DIR = process.cwd();
|
|
6
|
+
const setUserProjectDir = (dir) => {
|
|
7
|
+
USER_PROJECT_DIR = dir;
|
|
8
|
+
};
|
|
9
|
+
const getUserProjectDir = () => USER_PROJECT_DIR;
|
|
10
|
+
function createUserRequire(cwd) {
|
|
11
|
+
return createRequire(join(cwd || USER_PROJECT_DIR, "__not-a-real-file.js"));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { createUserRequire, getUserProjectDir, setUserProjectDir };
|
|
16
|
+
//# sourceMappingURL=user-project-dir.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-project-dir.mjs","names":[],"sources":["../../../src/server/project/user-project-dir.ts"],"sourcesContent":["import { createRequire } from 'node:module'\nimport { join } from 'node:path'\n\nlet USER_PROJECT_DIR = process.cwd()\n\nexport const setUserProjectDir = (dir: string) => {\n\tUSER_PROJECT_DIR = dir\n}\n\nexport const getUserProjectDir = () => USER_PROJECT_DIR\n\nexport function createUserRequire(cwd?: string) {\n\treturn createRequire(join(cwd || USER_PROJECT_DIR, '__not-a-real-file.js'))\n}\n"],"mappings":";;;;AAGA,IAAI,mBAAmB,QAAQ,KAAK;AAEpC,MAAa,qBAAqB,QAAgB;AACjD,oBAAmB;;AAGpB,MAAa,0BAA0B;AAEvC,SAAgB,kBAAkB,KAAc;AAC/C,QAAO,cAAc,KAAK,OAAO,kBAAkB,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { CompileRenderRequest, DevInitRequest, DevRenderRequest } from "./types.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/server/render-worker/client.d.ts
|
|
4
|
+
|
|
5
|
+
interface RenderWorkerOptions {
|
|
6
|
+
timeout?: number;
|
|
7
|
+
/** Custom log function — defaults to console.debug */
|
|
8
|
+
log?: (msg: string) => void;
|
|
9
|
+
/** Custom warn function — defaults to console.warn */
|
|
10
|
+
warn?: (msg: string) => void;
|
|
11
|
+
/**
|
|
12
|
+
* Extra filesystem paths the worker is allowed to read.
|
|
13
|
+
* The worker always has read access to its own dist directory and
|
|
14
|
+
* node_modules. Use this for additional paths like project source dirs.
|
|
15
|
+
*/
|
|
16
|
+
allowedReadPaths?: string[];
|
|
17
|
+
/**
|
|
18
|
+
* Sandbox mode for the worker subprocess.
|
|
19
|
+
*
|
|
20
|
+
* - 'strict': Node's --experimental-permission model with filesystem scoping.
|
|
21
|
+
* No native addons, worker threads, or child processes. Used by compile
|
|
22
|
+
* where the subprocess just does import() on a pre-built bundle.
|
|
23
|
+
*
|
|
24
|
+
* - 'standard': JS-level API patches that block network (fetch, http, net),
|
|
25
|
+
* child_process, and other exfiltration vectors. Used by the dev path
|
|
26
|
+
* where Vite's toolchain needs unrestricted filesystem access.
|
|
27
|
+
*
|
|
28
|
+
* - false: no sandbox. Worker still runs with a scrubbed environment.
|
|
29
|
+
*
|
|
30
|
+
* Both modes run with a scrubbed environment (env.ts allowlist).
|
|
31
|
+
*/
|
|
32
|
+
sandbox?: 'strict' | 'standard' | false;
|
|
33
|
+
}
|
|
34
|
+
declare class RenderWorker {
|
|
35
|
+
private worker;
|
|
36
|
+
private pending;
|
|
37
|
+
private readyPromise;
|
|
38
|
+
private timeout;
|
|
39
|
+
private log;
|
|
40
|
+
private _warn;
|
|
41
|
+
private allowedReadPaths?;
|
|
42
|
+
private sandbox;
|
|
43
|
+
private lastInitArgs;
|
|
44
|
+
private devInitialized;
|
|
45
|
+
private devInitPromise;
|
|
46
|
+
private restartPromise;
|
|
47
|
+
constructor(options?: RenderWorkerOptions);
|
|
48
|
+
private spawn;
|
|
49
|
+
private ensureWorker;
|
|
50
|
+
private send;
|
|
51
|
+
/**
|
|
52
|
+
* Initialize the subprocess's headless Vite dev server.
|
|
53
|
+
* Must be called once before any devRender() calls.
|
|
54
|
+
*/
|
|
55
|
+
initDev(args: Omit<DevInitRequest, 'id' | 'type'>): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Guarantee the current subprocess has been dev-init'd before a dev render
|
|
58
|
+
* is sent. Without this, a worker spawned in the gap after dispose() (or
|
|
59
|
+
* after a crash) starts with no headless Vite server, and every dev render
|
|
60
|
+
* against it fails until something replays the init.
|
|
61
|
+
*/
|
|
62
|
+
private ensureDevInit;
|
|
63
|
+
updateInitConfig(configJson: string): void;
|
|
64
|
+
/**
|
|
65
|
+
* Kill and respawn the subprocess, replaying the last dev-init call.
|
|
66
|
+
*
|
|
67
|
+
* The subprocess's headless Vite server is created once and reused for
|
|
68
|
+
* every render, with dependency discovery disabled (optimizeDeps.noDiscovery)
|
|
69
|
+
* for determinism. That means a package installed mid-session — e.g. by the
|
|
70
|
+
* "new document" flow's install-dependencies step — is invisible to its
|
|
71
|
+
* resolver until the process (and its Vite instance) starts fresh. Call this
|
|
72
|
+
* after any change to node_modules the next render depends on.
|
|
73
|
+
*/
|
|
74
|
+
restart(): Promise<void>;
|
|
75
|
+
devRender(args: Omit<DevRenderRequest, 'id' | 'type'>): Promise<{
|
|
76
|
+
html: string;
|
|
77
|
+
}>;
|
|
78
|
+
compileRender(args: Omit<CompileRenderRequest, 'id' | 'type'>): Promise<string>;
|
|
79
|
+
dispose(): Promise<void>;
|
|
80
|
+
}
|
|
81
|
+
//#endregion
|
|
82
|
+
export { RenderWorker, RenderWorkerOptions };
|
|
83
|
+
//# sourceMappingURL=client.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.mts","names":[],"sources":["../../../src/server/render-worker/client.ts"],"sourcesContent":[],"mappings":";;;;AAghB+D,UAvU9C,mBAAA,CAuU8C;EAe/B,OAAA,CAAA,EAAA,MAAA;EAAL;EAA4C,GAAA,CAAA,EAAA,CAAA,GAAA,EAAA,MAAA,EAAA,GAAA,IAAA;EAarD;EAAO,IAAA,CAAA,EAAA,CAAA,GAAA,EAAA,MAAA,EAAA,GAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;cArUZ,YAAA;;;;;;;;;;;;;wBAuBU;;;;;;;;gBAyLF,KAAK,iCAAiC;;;;;;;;;;;;;;;;;;;aAiEzC;kBAwBK,KAAK,mCAAmC;;;sBAepC,KAAK,uCAAuC;aAarD"}
|