resuxjs 0.4.0-beta.6 → 0.4.0-beta.8
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 +55 -13
- package/dist/_virtual/_rolldown/runtime.js +4 -0
- package/dist/bin.d.ts +1 -1
- package/dist/bin.js +2 -4
- package/dist/bin.js.map +1 -1
- package/dist/build/index.d.ts +8 -12
- package/dist/build/index.js +3 -4
- package/dist/build/index.js.map +1 -1
- package/dist/cli.d.ts +8 -9
- package/dist/cli.js +292 -163
- package/dist/cli.js.map +1 -1
- package/dist/compiler/adapter.d.ts +6 -10
- package/dist/compiler/adapter.js +3 -5
- package/dist/compiler/adapter.js.map +1 -1
- package/dist/compiler/dev-warnings.d.ts +5 -9
- package/dist/compiler/dev-warnings.js +7 -9
- package/dist/compiler/dev-warnings.js.map +1 -1
- package/dist/compiler/directives.d.ts +3 -7
- package/dist/compiler/directives.js +2 -4
- package/dist/compiler/directives.js.map +1 -1
- package/dist/compiler/implementation.d.ts +25 -25
- package/dist/compiler/implementation.js +206 -157
- package/dist/compiler/index.d.ts +6 -10
- package/dist/compiler/index.js +3 -5
- package/dist/compiler/index.js.map +1 -1
- package/dist/core/config.d.ts +5 -10
- package/dist/core/config.js +2 -3
- package/dist/core/config.js.map +1 -1
- package/dist/core/hooks.d.ts +15 -10
- package/dist/core/hooks.js +2 -3
- package/dist/core/hooks.js.map +1 -1
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +1 -2
- package/dist/core/module-container.d.ts +21 -26
- package/dist/core/module-container.js +6 -6
- package/dist/core/module-container.js.map +1 -1
- package/dist/core/resux.d.ts +4 -9
- package/dist/core/resux.js +2 -4
- package/dist/core/resux.js.map +1 -1
- package/dist/create-bin.d.ts +1 -1
- package/dist/create-bin.js +2 -4
- package/dist/create-bin.js.map +1 -1
- package/dist/create.d.ts +2 -6
- package/dist/create.js +119 -43
- package/dist/create.js.map +1 -1
- package/dist/deploy/cloudflare.d.ts +1 -6
- package/dist/deploy/cloudflare.js +2 -4
- package/dist/deploy/cloudflare.js.map +1 -1
- package/dist/deploy/common.d.ts +12 -16
- package/dist/deploy/common.js +2 -4
- package/dist/deploy/common.js.map +1 -1
- package/dist/deploy/framework-runtime.d.ts +1 -5
- package/dist/deploy/framework-runtime.js +2 -4
- package/dist/deploy/framework-runtime.js.map +1 -1
- package/dist/deploy/index.d.ts +2 -7
- package/dist/deploy/index.js +7 -6
- package/dist/deploy/index.js.map +1 -1
- package/dist/deploy/netlify.d.ts +1 -6
- package/dist/deploy/netlify.js +3 -5
- package/dist/deploy/netlify.js.map +1 -1
- package/dist/deploy/node.d.ts +1 -6
- package/dist/deploy/node.js +4 -5
- package/dist/deploy/node.js.map +1 -1
- package/dist/deploy/production-report.d.ts +1 -5
- package/dist/deploy/production-report.js +2 -4
- package/dist/deploy/production-report.js.map +1 -1
- package/dist/deploy/runtime-dependencies.d.ts +4 -8
- package/dist/deploy/runtime-dependencies.js +4 -5
- package/dist/deploy/runtime-dependencies.js.map +1 -1
- package/dist/deploy/static.d.ts +1 -6
- package/dist/deploy/static.js +2 -4
- package/dist/deploy/static.js.map +1 -1
- package/dist/deploy/types.d.ts +8 -12
- package/dist/deploy/types.js +1 -1
- package/dist/deploy/vercel.d.ts +2 -7
- package/dist/deploy/vercel.js +6 -8
- package/dist/deploy/vercel.js.map +1 -1
- package/dist/fonts/index.d.ts +60 -12
- package/dist/fonts/index.js +422 -46
- package/dist/fonts/index.js.map +1 -1
- package/dist/globals.d.ts +2 -5
- package/dist/globals.js +1 -1
- package/dist/halal-core/ai/classifyProject.d.ts +3 -8
- package/dist/halal-core/ai/classifyProject.js +2 -4
- package/dist/halal-core/ai/classifyProject.js.map +1 -1
- package/dist/halal-core/ai/classifyRuntimeContent.d.ts +1 -6
- package/dist/halal-core/ai/classifyRuntimeContent.js +3 -5
- package/dist/halal-core/ai/classifyRuntimeContent.js.map +1 -1
- package/dist/halal-core/ai/createProjectSummary.d.ts +2 -6
- package/dist/halal-core/ai/createProjectSummary.js +2 -4
- package/dist/halal-core/ai/createProjectSummary.js.map +1 -1
- package/dist/halal-core/ai/halalClassifierPrompt.d.ts +1 -5
- package/dist/halal-core/ai/halalClassifierPrompt.js +2 -3
- package/dist/halal-core/ai/redactSensitiveData.d.ts +1 -5
- package/dist/halal-core/ai/redactSensitiveData.js +2 -3
- package/dist/halal-core/ai/redactSensitiveData.js.map +1 -1
- package/dist/halal-core/ai/validateAiResponse.d.ts +1 -6
- package/dist/halal-core/ai/validateAiResponse.js +4 -5
- package/dist/halal-core/ai/validateAiResponse.js.map +1 -1
- package/dist/halal-core/cli/check.d.ts +1 -5
- package/dist/halal-core/cli/check.js +5 -6
- package/dist/halal-core/cli/check.js.map +1 -1
- package/dist/halal-core/cli/explain.d.ts +1 -5
- package/dist/halal-core/cli/explain.js +5 -6
- package/dist/halal-core/cli/explain.js.map +1 -1
- package/dist/halal-core/cli/report.d.ts +1 -5
- package/dist/halal-core/cli/report.js +5 -6
- package/dist/halal-core/cli/report.js.map +1 -1
- package/dist/halal-core/cli/submitReview.d.ts +1 -5
- package/dist/halal-core/cli/submitReview.js +5 -6
- package/dist/halal-core/cli/submitReview.js.map +1 -1
- package/dist/halal-core/cli/verifyReview.d.ts +1 -5
- package/dist/halal-core/cli/verifyReview.js +7 -7
- package/dist/halal-core/cli/verifyReview.js.map +1 -1
- package/dist/halal-core/config.d.ts +10 -12
- package/dist/halal-core/config.js +46 -11
- package/dist/halal-core/config.js.map +1 -1
- package/dist/halal-core/crypto/integrity.d.ts +5 -9
- package/dist/halal-core/crypto/integrity.js +3 -5
- package/dist/halal-core/crypto/integrity.js.map +1 -1
- package/dist/halal-core/enforce.d.ts +7 -9
- package/dist/halal-core/enforce.js +47 -19
- package/dist/halal-core/enforce.js.map +1 -1
- package/dist/halal-core/index.d.ts +6 -6
- package/dist/halal-core/index.js +8 -9
- package/dist/halal-core/lifecycle.d.ts +1 -5
- package/dist/halal-core/lifecycle.js +2 -4
- package/dist/halal-core/lifecycle.js.map +1 -1
- package/dist/halal-core/policy.d.ts +1 -6
- package/dist/halal-core/policy.js +2 -4
- package/dist/halal-core/policy.js.map +1 -1
- package/dist/halal-core/report/formatBrowserOverlay.d.ts +1 -6
- package/dist/halal-core/report/formatBrowserOverlay.js +2 -3
- package/dist/halal-core/report/formatBrowserOverlay.js.map +1 -1
- package/dist/halal-core/report/formatTerminalReport.d.ts +1 -6
- package/dist/halal-core/report/formatTerminalReport.js +2 -3
- package/dist/halal-core/report/formatTerminalReport.js.map +1 -1
- package/dist/halal-core/report/generateHalalReport.d.ts +2 -7
- package/dist/halal-core/report/generateHalalReport.js +8 -7
- package/dist/halal-core/report/generateHalalReport.js.map +1 -1
- package/dist/halal-core/report/signReport.d.ts +2 -7
- package/dist/halal-core/report/signReport.js +2 -4
- package/dist/halal-core/report/signReport.js.map +1 -1
- package/dist/halal-core/report/verifyReport.d.ts +4 -9
- package/dist/halal-core/report/verifyReport.js +4 -6
- package/dist/halal-core/report/verifyReport.js.map +1 -1
- package/dist/halal-core/review/createReviewRequest.d.ts +1 -6
- package/dist/halal-core/review/createReviewRequest.js +4 -5
- package/dist/halal-core/review/createReviewRequest.js.map +1 -1
- package/dist/halal-core/review/reviewPolicy.d.ts +3 -7
- package/dist/halal-core/review/reviewPolicy.js +2 -3
- package/dist/halal-core/review/reviewPolicy.js.map +1 -1
- package/dist/halal-core/review/signedReviewFile.d.ts +4 -9
- package/dist/halal-core/review/signedReviewFile.js +2 -4
- package/dist/halal-core/review/signedReviewFile.js.map +1 -1
- package/dist/halal-core/review/verifyReviewApproval.d.ts +3 -7
- package/dist/halal-core/review/verifyReviewApproval.js +2 -4
- package/dist/halal-core/review/verifyReviewApproval.js.map +1 -1
- package/dist/halal-core/rules/adultContentRules.d.ts +2 -6
- package/dist/halal-core/rules/adultContentRules.js +2 -3
- package/dist/halal-core/rules/adultContentRules.js.map +1 -1
- package/dist/halal-core/rules/alcoholDrugVapeRules.d.ts +2 -6
- package/dist/halal-core/rules/alcoholDrugVapeRules.js +2 -3
- package/dist/halal-core/rules/alcoholDrugVapeRules.js.map +1 -1
- package/dist/halal-core/rules/childSafetyRules.d.ts +2 -6
- package/dist/halal-core/rules/childSafetyRules.js +2 -3
- package/dist/halal-core/rules/childSafetyRules.js.map +1 -1
- package/dist/halal-core/rules/coreCategories.d.ts +2 -6
- package/dist/halal-core/rules/coreCategories.js +2 -3
- package/dist/halal-core/rules/coreCategories.js.map +1 -1
- package/dist/halal-core/rules/cyberAbuseRules.d.ts +2 -6
- package/dist/halal-core/rules/cyberAbuseRules.js +2 -3
- package/dist/halal-core/rules/cyberAbuseRules.js.map +1 -1
- package/dist/halal-core/rules/defaultBlockedRules.d.ts +2 -7
- package/dist/halal-core/rules/defaultBlockedRules.js +12 -11
- package/dist/halal-core/rules/defaultBlockedRules.js.map +1 -1
- package/dist/halal-core/rules/dependencyRules.d.ts +3 -7
- package/dist/halal-core/rules/dependencyRules.js +2 -3
- package/dist/halal-core/rules/dependencyRules.js.map +1 -1
- package/dist/halal-core/rules/endpointRules.d.ts +3 -7
- package/dist/halal-core/rules/endpointRules.js +2 -3
- package/dist/halal-core/rules/endpointRules.js.map +1 -1
- package/dist/halal-core/rules/environmentalHarmRules.d.ts +2 -6
- package/dist/halal-core/rules/environmentalHarmRules.js +2 -3
- package/dist/halal-core/rules/environmentalHarmRules.js.map +1 -1
- package/dist/halal-core/rules/financeRibaRules.d.ts +2 -6
- package/dist/halal-core/rules/financeRibaRules.js +2 -3
- package/dist/halal-core/rules/financeRibaRules.js.map +1 -1
- package/dist/halal-core/rules/gamblingRules.d.ts +2 -6
- package/dist/halal-core/rules/gamblingRules.js +2 -3
- package/dist/halal-core/rules/gamblingRules.js.map +1 -1
- package/dist/halal-core/rules/generalHarmRules.d.ts +2 -6
- package/dist/halal-core/rules/generalHarmRules.js +2 -3
- package/dist/halal-core/rules/generalHarmRules.js.map +1 -1
- package/dist/halal-core/rules/healthHarmRules.d.ts +2 -6
- package/dist/halal-core/rules/healthHarmRules.js +2 -3
- package/dist/halal-core/rules/healthHarmRules.js.map +1 -1
- package/dist/halal-core/rules/keywordRules.d.ts +2 -6
- package/dist/halal-core/rules/keywordRules.js +2 -3
- package/dist/halal-core/rules/keywordRules.js.map +1 -1
- package/dist/halal-core/rules/privacyAbuseRules.d.ts +2 -6
- package/dist/halal-core/rules/privacyAbuseRules.js +2 -3
- package/dist/halal-core/rules/privacyAbuseRules.js.map +1 -1
- package/dist/halal-core/rules/scamFraudRules.d.ts +2 -6
- package/dist/halal-core/rules/scamFraudRules.js +2 -3
- package/dist/halal-core/rules/scamFraudRules.js.map +1 -1
- package/dist/halal-core/rules/selfHarmRules.d.ts +2 -6
- package/dist/halal-core/rules/selfHarmRules.js +2 -3
- package/dist/halal-core/rules/selfHarmRules.js.map +1 -1
- package/dist/halal-core/rules/violenceExtremismRules.d.ts +2 -6
- package/dist/halal-core/rules/violenceExtremismRules.js +2 -3
- package/dist/halal-core/rules/violenceExtremismRules.js.map +1 -1
- package/dist/halal-core/runtime/guard.d.ts +3 -8
- package/dist/halal-core/runtime/guard.js +5 -7
- package/dist/halal-core/runtime/guard.js.map +1 -1
- package/dist/halal-core/runtime/index.js +1 -2
- package/dist/halal-core/runtime/reviewedMemory.d.ts +4 -9
- package/dist/halal-core/runtime/reviewedMemory.js +3 -5
- package/dist/halal-core/runtime/reviewedMemory.js.map +1 -1
- package/dist/halal-core/runtime/serializeRuntimeContent.d.ts +5 -10
- package/dist/halal-core/runtime/serializeRuntimeContent.js +4 -6
- package/dist/halal-core/runtime/serializeRuntimeContent.js.map +1 -1
- package/dist/halal-core/runtime/types.d.ts +10 -15
- package/dist/halal-core/runtime/types.js +1 -1
- package/dist/halal-core/scanner/scanApiRoutes.d.ts +1 -5
- package/dist/halal-core/scanner/scanApiRoutes.js +2 -4
- package/dist/halal-core/scanner/scanApiRoutes.js.map +1 -1
- package/dist/halal-core/scanner/scanComponents.d.ts +1 -5
- package/dist/halal-core/scanner/scanComponents.js +2 -4
- package/dist/halal-core/scanner/scanComponents.js.map +1 -1
- package/dist/halal-core/scanner/scanContent.d.ts +2 -6
- package/dist/halal-core/scanner/scanContent.js +4 -6
- package/dist/halal-core/scanner/scanContent.js.map +1 -1
- package/dist/halal-core/scanner/scanDependencies.d.ts +1 -5
- package/dist/halal-core/scanner/scanDependencies.js +2 -4
- package/dist/halal-core/scanner/scanDependencies.js.map +1 -1
- package/dist/halal-core/scanner/scanDomains.d.ts +2 -6
- package/dist/halal-core/scanner/scanDomains.js +2 -3
- package/dist/halal-core/scanner/scanDomains.js.map +1 -1
- package/dist/halal-core/scanner/scanEnvNames.d.ts +1 -5
- package/dist/halal-core/scanner/scanEnvNames.js +2 -4
- package/dist/halal-core/scanner/scanEnvNames.js.map +1 -1
- package/dist/halal-core/scanner/scanMetadata.d.ts +2 -6
- package/dist/halal-core/scanner/scanMetadata.js +2 -4
- package/dist/halal-core/scanner/scanMetadata.js.map +1 -1
- package/dist/halal-core/scanner/scanPages.d.ts +1 -5
- package/dist/halal-core/scanner/scanPages.js +2 -4
- package/dist/halal-core/scanner/scanPages.js.map +1 -1
- package/dist/halal-core/scanner/scanProject.d.ts +3 -8
- package/dist/halal-core/scanner/scanProject.js +2 -4
- package/dist/halal-core/scanner/scanProject.js.map +1 -1
- package/dist/halal-core/scanner/scanRoutes.d.ts +1 -5
- package/dist/halal-core/scanner/scanRoutes.js +2 -4
- package/dist/halal-core/scanner/scanRoutes.js.map +1 -1
- package/dist/halal-core/scanner/scanTranslations.d.ts +1 -5
- package/dist/halal-core/scanner/scanTranslations.js +2 -4
- package/dist/halal-core/scanner/scanTranslations.js.map +1 -1
- package/dist/halal-core/status.d.ts +3 -7
- package/dist/halal-core/status.js +1 -1
- package/dist/halal-core/tamper/verifyCoreIntegrity.d.ts +1 -5
- package/dist/halal-core/tamper/verifyCoreIntegrity.js +2 -4
- package/dist/halal-core/tamper/verifyCoreIntegrity.js.map +1 -1
- package/dist/halal-core/tamper/verifyLifecycleHooks.d.ts +1 -5
- package/dist/halal-core/tamper/verifyLifecycleHooks.js +2 -3
- package/dist/halal-core/tamper/verifyLifecycleHooks.js.map +1 -1
- package/dist/halal-core/tamper/verifyReportSignature.d.ts +2 -7
- package/dist/halal-core/tamper/verifyReportSignature.js +4 -5
- package/dist/halal-core/tamper/verifyReportSignature.js.map +1 -1
- package/dist/halal.d.ts +2 -2
- package/dist/halal.js +2 -3
- package/dist/head/utils.d.ts +15 -0
- package/dist/head/utils.js +52 -0
- package/dist/head/utils.js.map +1 -0
- package/dist/i18n/index.d.ts +11 -15
- package/dist/i18n/index.js +9 -9
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/shared.d.ts +15 -19
- package/dist/i18n/shared.js +5 -6
- package/dist/i18n/shared.js.map +1 -1
- package/dist/icons/api-fetcher.d.ts +3 -0
- package/dist/icons/api-fetcher.js +77 -0
- package/dist/icons/api-fetcher.js.map +1 -0
- package/dist/icons/cache.d.ts +21 -0
- package/dist/icons/cache.js +74 -0
- package/dist/icons/cache.js.map +1 -0
- package/dist/icons/component.d.ts +156 -0
- package/dist/icons/component.js +139 -0
- package/dist/icons/component.js.map +1 -0
- package/dist/icons/constants.d.ts +13 -0
- package/dist/icons/constants.js +16 -0
- package/dist/icons/constants.js.map +1 -0
- package/dist/icons/css-mode.d.ts +6 -0
- package/dist/icons/css-mode.js +51 -0
- package/dist/icons/css-mode.js.map +1 -0
- package/dist/icons/index.d.ts +14 -153
- package/dist/icons/index.js +30 -286
- package/dist/icons/index.js.map +1 -1
- package/dist/icons/local-svg.d.ts +4 -0
- package/dist/icons/local-svg.js +53 -0
- package/dist/icons/local-svg.js.map +1 -0
- package/dist/icons/normalize.d.ts +4 -0
- package/dist/icons/normalize.js +63 -0
- package/dist/icons/normalize.js.map +1 -0
- package/dist/icons/offline-loader.d.ts +20 -0
- package/dist/icons/offline-loader.js +94 -0
- package/dist/icons/offline-loader.js.map +1 -0
- package/dist/icons/parser.d.ts +4 -0
- package/dist/icons/parser.js +89 -0
- package/dist/icons/parser.js.map +1 -0
- package/dist/icons/registry.d.ts +6 -22
- package/dist/icons/registry.js +82 -75
- package/dist/icons/registry.js.map +1 -1
- package/dist/icons/resolver.d.ts +3 -0
- package/dist/icons/resolver.js +45 -0
- package/dist/icons/resolver.js.map +1 -0
- package/dist/icons/svg-mode.d.ts +3 -0
- package/dist/icons/svg-mode.js +54 -0
- package/dist/icons/svg-mode.js.map +1 -0
- package/dist/icons/transform.d.ts +10 -0
- package/dist/icons/transform.js +68 -0
- package/dist/icons/transform.js.map +1 -0
- package/dist/icons/types.d.ts +48 -0
- package/dist/icons/types.js +1 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +3 -3
- package/dist/kit/index.d.ts +21 -26
- package/dist/kit/index.js +2 -4
- package/dist/kit/index.js.map +1 -1
- package/dist/nitro-server/index.d.ts +2 -6
- package/dist/nitro-server/index.js +2 -3
- package/dist/nitro-server/index.js.map +1 -1
- package/dist/node.d.ts +2 -7
- package/dist/node.js +7 -9
- package/dist/node.js.map +1 -1
- package/dist/reactivity/computed.d.ts +3 -8
- package/dist/reactivity/computed.js +4 -5
- package/dist/reactivity/computed.js.map +1 -1
- package/dist/reactivity/effect.d.ts +14 -18
- package/dist/reactivity/effect.js +18 -13
- package/dist/reactivity/effect.js.map +1 -1
- package/dist/reactivity/index.d.ts +1 -1
- package/dist/reactivity/index.js +3 -4
- package/dist/reactivity/reactive.d.ts +5 -9
- package/dist/reactivity/reactive.js +225 -17
- package/dist/reactivity/reactive.js.map +1 -1
- package/dist/reactivity/readonly.js +1 -3
- package/dist/reactivity/ref.d.ts +9 -13
- package/dist/reactivity/ref.js +6 -5
- package/dist/reactivity/ref.js.map +1 -1
- package/dist/reactivity/scheduler.d.ts +5 -8
- package/dist/reactivity/scheduler.js +4 -3
- package/dist/reactivity/scheduler.js.map +1 -1
- package/dist/reactivity/types.d.ts +12 -16
- package/dist/reactivity/types.js +1 -1
- package/dist/reactivity/utils.d.ts +9 -13
- package/dist/reactivity/utils.js +2 -3
- package/dist/reactivity/utils.js.map +1 -1
- package/dist/reactivity/watch.d.ts +3 -7
- package/dist/reactivity/watch.js +7 -7
- package/dist/reactivity/watch.js.map +1 -1
- package/dist/runtime/core.d.ts +4 -21
- package/dist/runtime/core.js +11 -24
- package/dist/runtime/core.js.map +1 -1
- package/dist/runtime/index.d.ts +180 -159
- package/dist/runtime/index.js +3205 -1080
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/reactivity.d.ts +4 -4
- package/dist/runtime/reactivity.js +2 -3
- package/dist/runtime/resume.d.ts +14 -52
- package/dist/runtime/resume.js +4 -34
- package/dist/runtime/resume.js.map +1 -1
- package/dist/runtime/router.d.ts +5 -18
- package/dist/runtime/router.js +7 -17
- package/dist/runtime/router.js.map +1 -1
- package/dist/runtime/streaming.d.ts +6 -14
- package/dist/runtime/streaming.js +4 -9
- package/dist/runtime/streaming.js.map +1 -1
- package/dist/runtime/view-transitions/detect.d.ts +10 -0
- package/dist/runtime/view-transitions/detect.js +16 -0
- package/dist/runtime/view-transitions/detect.js.map +1 -0
- package/dist/runtime/view-transitions/index.d.ts +4 -0
- package/dist/runtime/view-transitions/index.js +3 -0
- package/dist/runtime/view-transitions/transition.d.ts +3 -0
- package/dist/runtime/view-transitions/transition.js +41 -0
- package/dist/runtime/view-transitions/transition.js.map +1 -0
- package/dist/runtime/view-transitions/types.d.ts +7 -0
- package/dist/runtime/view-transitions/types.js +1 -0
- package/dist/security/media-fetch.d.ts +11 -15
- package/dist/security/media-fetch.js +5 -7
- package/dist/security/media-fetch.js.map +1 -1
- package/dist/security/path-boundary.d.ts +4 -8
- package/dist/security/path-boundary.js +12 -8
- package/dist/security/path-boundary.js.map +1 -1
- package/dist/ui/index.d.ts +378 -229
- package/dist/ui/index.js +199 -152
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/verification-code.d.ts +133 -0
- package/dist/ui/verification-code.js +472 -0
- package/dist/ui/verification-code.js.map +1 -0
- package/dist/vite-builder/index.d.ts +2 -6
- package/dist/vite-builder/index.js +2 -3
- package/dist/vite-builder/index.js.map +1 -1
- package/package.json +5 -2
- package/templates/default/.env.example +3 -0
- package/templates/default/nitro.config.ts +16 -4
package/dist/cli.js
CHANGED
|
@@ -1,37 +1,44 @@
|
|
|
1
|
+
import { __require } from "./_virtual/_rolldown/runtime.js";
|
|
1
2
|
import { RESUX_IMAGE_MAX_SOURCE_BYTES, RESUX_VIDEO_MAX_SOURCE_BYTES, ResuxMediaFetchError, fetchResuxMediaSource } from "./security/media-fetch.js";
|
|
2
3
|
import { isPathWithinBoundary, isRealPathWithinBoundary, prepareSafeFileWriteWithinBoundary, resolveRequestPathWithinBoundary } from "./security/path-boundary.js";
|
|
3
|
-
import { normalizeResuxGeneratedPath } from "./core/config.js";
|
|
4
4
|
import { createResux } from "./core/resux.js";
|
|
5
|
+
import { normalizeResuxGeneratedPath } from "./core/config.js";
|
|
5
6
|
import { runCreateResux } from "./create.js";
|
|
6
|
-
import { loadResuxDeployConfig, readJsonRecord } from "./deploy/common.js";
|
|
7
7
|
import { applyDeploymentPostBuild, resolveDeployment } from "./deploy/index.js";
|
|
8
|
+
import { loadResuxDeployConfig, readJsonRecord } from "./deploy/common.js";
|
|
8
9
|
import { isReactive, isReadonly, reactive, readonly } from "./reactivity/reactive.js";
|
|
9
10
|
import { isRef, ref, toRef, toRefs, unref } from "./reactivity/ref.js";
|
|
10
11
|
import { computed } from "./reactivity/computed.js";
|
|
11
12
|
import { nextTick } from "./reactivity/scheduler.js";
|
|
12
13
|
import { watch, watchEffect } from "./reactivity/watch.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
14
|
+
import { useViewTransition } from "./runtime/view-transitions/transition.js";
|
|
15
|
+
import { AsyncResuxRenderer, abortNavigation, clearError, createError, createServerSetupContext, defineClientEnhancement, defineClientOnlyPackage, defineComponent, defineEventHandler, defineLazyPackage, definePackageAdapter, defineResuxConfig, defineResuxModule, defineResuxPlugin, defineResuxRouteMiddleware, defineServerMiddleware, disposeClientEnhancements, evaluateExpression, eventHandler, getClientEnhancement, getClientRuntimeBootPlan, getClientRuntimeSource, getQuery, hasClientEnhancement, navigateTo, parseUserAgent, readBody, renderApp, renderAppAsync, renderClientPatches, renderDocument, renderDocumentAsync, renderTemplateNodesAsync, scanClientEnhancements, setHeader, shouldLoadClientRuntime, showError, useClientEnhancement, useClientPackage, useDevice, useError, useLazyPackage, usePackageReady, useResuxApp, useResuxImage, useRoute, useRouter, useRuntimeConfig } from "./runtime/index.js";
|
|
16
|
+
import { enforceBuildGuard, enforceDeploymentGuard, enforceDevGuard, enforcePreviewGuard, enforceProductionServerGuard } from "./halal-core/enforce.js";
|
|
17
|
+
import { loadProjectDotEnv, loadProjectPolicy } from "./halal-core/config.js";
|
|
15
18
|
import { scanProject } from "./halal-core/scanner/scanProject.js";
|
|
16
19
|
import { evaluateRules } from "./halal-core/rules/defaultBlockedRules.js";
|
|
17
|
-
import {
|
|
20
|
+
import { formatBrowserOverlayScript } from "./halal-core/report/formatBrowserOverlay.js";
|
|
18
21
|
import { runHalalCheck } from "./halal-core/cli/check.js";
|
|
19
22
|
import { runHalalReport } from "./halal-core/cli/report.js";
|
|
20
23
|
import { runHalalExplain } from "./halal-core/cli/explain.js";
|
|
21
24
|
import { runHalalSubmitReview } from "./halal-core/cli/submitReview.js";
|
|
22
25
|
import { runHalalVerifyReview } from "./halal-core/cli/verifyReview.js";
|
|
23
|
-
import { formatBrowserOverlayScript } from "./halal-core/report/formatBrowserOverlay.js";
|
|
24
26
|
import { createRequire } from "node:module";
|
|
25
27
|
import { spawn } from "node:child_process";
|
|
26
28
|
import { readdirSync, statSync, watch as watch$1 } from "node:fs";
|
|
27
29
|
import { createServer } from "node:http";
|
|
28
30
|
import { cp, mkdir, readFile, readdir, stat, writeFile } from "node:fs/promises";
|
|
29
31
|
import path from "node:path";
|
|
30
|
-
import {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const
|
|
32
|
+
import { pathToFileURL } from "node:url";
|
|
33
|
+
// src/cli.ts
|
|
34
|
+
function getResuxVersion() {
|
|
35
|
+
try {
|
|
36
|
+
const fileUrl = typeof import.meta.url === "string" && !import.meta.url.startsWith("file:///_") ? import.meta.url : void 0;
|
|
37
|
+
if (fileUrl) return createRequire(fileUrl)("../package.json").version ?? "0.4.0-beta.7";
|
|
38
|
+
} catch {}
|
|
39
|
+
return "0.4.0-beta.7";
|
|
40
|
+
}
|
|
41
|
+
const version = getResuxVersion();
|
|
35
42
|
let activeDevBuild = null;
|
|
36
43
|
let devBuildDirty = false;
|
|
37
44
|
let devBuildRevision = 0;
|
|
@@ -95,13 +102,14 @@ function createResuxNodeHandler(options = {}) {
|
|
|
95
102
|
const outDir = path.resolve(options.outDir ?? path.join(appRoot, ".resux"));
|
|
96
103
|
const buildOptions = {};
|
|
97
104
|
enforceProductionServerGuard(outDir);
|
|
98
|
-
return (request
|
|
99
|
-
handleRequest(request
|
|
105
|
+
return (request, response) => {
|
|
106
|
+
handleRequest(request, response, {
|
|
100
107
|
appRoot,
|
|
101
108
|
outDir,
|
|
102
109
|
dev: false,
|
|
103
110
|
buildOptions,
|
|
104
|
-
securityHeaders: options.securityHeaders ?? true
|
|
111
|
+
securityHeaders: options.securityHeaders ?? true,
|
|
112
|
+
hooks: options.hooks
|
|
105
113
|
});
|
|
106
114
|
};
|
|
107
115
|
}
|
|
@@ -122,28 +130,29 @@ async function runResuxCli(args) {
|
|
|
122
130
|
}
|
|
123
131
|
if (command === "halal") {
|
|
124
132
|
const subcommand = commandArgs[0];
|
|
125
|
-
const cliOptions
|
|
126
|
-
const appRoot
|
|
127
|
-
|
|
128
|
-
const
|
|
133
|
+
const cliOptions = readCliOptions(commandArgs.slice(1), subcommand);
|
|
134
|
+
const appRoot = path.resolve(cliOptions.appRoot);
|
|
135
|
+
loadProjectDotEnv(appRoot);
|
|
136
|
+
const resolvedBuildDir = normalizeResuxGeneratedPath(await resolveConfiguredBuildDir(appRoot));
|
|
137
|
+
const outDir = path.resolve(appRoot, resolvedBuildDir);
|
|
129
138
|
if (subcommand === "check") {
|
|
130
|
-
if (!await runHalalCheck(appRoot
|
|
139
|
+
if (!await runHalalCheck(appRoot, outDir)) process.exit(1);
|
|
131
140
|
return;
|
|
132
141
|
}
|
|
133
142
|
if (subcommand === "report") {
|
|
134
|
-
await runHalalReport(appRoot
|
|
143
|
+
await runHalalReport(appRoot, outDir);
|
|
135
144
|
return;
|
|
136
145
|
}
|
|
137
146
|
if (subcommand === "explain") {
|
|
138
|
-
await runHalalExplain(appRoot
|
|
147
|
+
await runHalalExplain(appRoot);
|
|
139
148
|
return;
|
|
140
149
|
}
|
|
141
150
|
if (subcommand === "submit-review") {
|
|
142
|
-
await runHalalSubmitReview(appRoot
|
|
151
|
+
await runHalalSubmitReview(appRoot, outDir);
|
|
143
152
|
return;
|
|
144
153
|
}
|
|
145
154
|
if (subcommand === "verify-review") {
|
|
146
|
-
if (!await runHalalVerifyReview(appRoot
|
|
155
|
+
if (!await runHalalVerifyReview(appRoot)) process.exit(1);
|
|
147
156
|
return;
|
|
148
157
|
}
|
|
149
158
|
console.error(`Unknown halal subcommand "${subcommand}". Allowed: check, report, explain, submit-review, verify-review`);
|
|
@@ -151,6 +160,7 @@ async function runResuxCli(args) {
|
|
|
151
160
|
}
|
|
152
161
|
const cliOptions = readCliOptions(commandArgs, command);
|
|
153
162
|
const appRoot = path.resolve(cliOptions.appRoot);
|
|
163
|
+
loadProjectDotEnv(appRoot);
|
|
154
164
|
const resolvedBuildDir = normalizeResuxGeneratedPath(await resolveConfiguredBuildDir(appRoot));
|
|
155
165
|
const outDir = path.resolve(appRoot, resolvedBuildDir);
|
|
156
166
|
const buildOptions = { traceBuild: cliOptions.traceBuild === true };
|
|
@@ -256,18 +266,19 @@ async function runResuxCli(args) {
|
|
|
256
266
|
} else if (command === "dev") {
|
|
257
267
|
await enforceDevGuard(appRoot, outDir);
|
|
258
268
|
const policy = await loadProjectPolicy(appRoot);
|
|
259
|
-
const
|
|
269
|
+
const scanned = scanProject(appRoot);
|
|
270
|
+
const report = evaluateRules(scanned, policy);
|
|
260
271
|
if (report.status !== "allowed") devHalalOverlayScript = formatBrowserOverlayScript(report);
|
|
261
272
|
await runTailwindBuild(appRoot, tailwind, false);
|
|
262
273
|
startTailwindWatch(appRoot, tailwind);
|
|
263
|
-
await runCompilerBuild(appRoot, outDir, {
|
|
274
|
+
const devBuildResult = await runCompilerBuild(appRoot, outDir, {
|
|
264
275
|
...buildOptions,
|
|
265
276
|
vite: "dev"
|
|
266
277
|
});
|
|
267
278
|
await ensureGeneratedDirectories(appRoot, outDir, { debug: cliOptions.debug === true });
|
|
268
279
|
await ensureGeneratedPlaceholders(appRoot, outDir);
|
|
269
280
|
await ensureNitroBuildFiles(appRoot);
|
|
270
|
-
const vite = await startViteDevServer(outDir, buildOptions, cliOptions);
|
|
281
|
+
const vite = await startViteDevServer(outDir, buildOptions, cliOptions, devBuildResult?.contributions);
|
|
271
282
|
startDevWatcher(vite, appRoot, outDir, buildOptions);
|
|
272
283
|
await startServer({
|
|
273
284
|
appRoot,
|
|
@@ -432,7 +443,7 @@ function readCliOptions(args, command) {
|
|
|
432
443
|
let deployPreset = "node";
|
|
433
444
|
let force = false;
|
|
434
445
|
let fix = false;
|
|
435
|
-
const inspectTargets = new Set([
|
|
446
|
+
const inspectTargets = /* @__PURE__ */ new Set([
|
|
436
447
|
"routes",
|
|
437
448
|
"plugins",
|
|
438
449
|
"enhancements",
|
|
@@ -467,10 +478,12 @@ function readCliOptions(args, command) {
|
|
|
467
478
|
else if (arg === "--trace-routes") traceRoutes = true;
|
|
468
479
|
else if (arg === "--trace-build") traceBuild = true;
|
|
469
480
|
else if (arg.startsWith("-")) throw new Error(`Unknown option "${arg}". Run resux --help for usage.`);
|
|
470
|
-
else if (!arg.startsWith("-"))
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
481
|
+
else if (!arg.startsWith("-")) {
|
|
482
|
+
if (command === "inspect" && inspectTargets.has(arg)) inspectTarget = arg;
|
|
483
|
+
else if (appRoot === process.cwd()) appRoot = arg;
|
|
484
|
+
else if (command === "inspect" && !inspectTarget) inspectTarget = arg;
|
|
485
|
+
else appRoot = arg;
|
|
486
|
+
}
|
|
474
487
|
}
|
|
475
488
|
return {
|
|
476
489
|
appRoot,
|
|
@@ -530,7 +543,7 @@ async function previewNeedsBuild(outDir, buildOptions) {
|
|
|
530
543
|
}
|
|
531
544
|
}
|
|
532
545
|
function collectRequiredPreviewAssets(manifest) {
|
|
533
|
-
const required = new Set(["client/runtime-client.mjs", "client/client-enhancements.mjs"]);
|
|
546
|
+
const required = /* @__PURE__ */ new Set(["client/runtime-client.mjs", "client/client-enhancements.mjs"]);
|
|
534
547
|
const componentEntries = Array.isArray(manifest.components) ? manifest.components : [];
|
|
535
548
|
const pluginEntries = Array.isArray(manifest.plugins) ? manifest.plugins : [];
|
|
536
549
|
const middlewareEntries = Array.isArray(manifest.middleware) ? manifest.middleware : [];
|
|
@@ -917,28 +930,34 @@ async function checkProject(appRoot, outDir, options = {}) {
|
|
|
917
930
|
path.join(appRoot, "resux.config.mjs"),
|
|
918
931
|
path.join(appRoot, "resux.config.js")
|
|
919
932
|
]);
|
|
920
|
-
if (!configFile)
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
933
|
+
if (!configFile) {
|
|
934
|
+
if (options.fix) {
|
|
935
|
+
const generatedConfig = path.join(appRoot, "resux.config.ts");
|
|
936
|
+
await writeFile(generatedConfig, `export default defineResuxConfig({\n runtimeConfig: {\n public: {\n appName: "Resux App"\n }\n }\n})\n`, "utf8");
|
|
937
|
+
details.configFile = path.relative(appRoot, generatedConfig);
|
|
938
|
+
warnings.push("Created minimal resux.config.ts.");
|
|
939
|
+
} else errors.push("Missing Resux config file (resux.config.ts/mjs/js).");
|
|
940
|
+
} else details.configFile = path.relative(appRoot, configFile);
|
|
927
941
|
const tsconfigFile = path.join(appRoot, "tsconfig.json");
|
|
928
|
-
if (!await exists(tsconfigFile))
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
+
if (!await exists(tsconfigFile)) {
|
|
943
|
+
if (options.fix) {
|
|
944
|
+
await writeFile(tsconfigFile, `{\n "compilerOptions": {\n "target": "ES2022",\n "module": "ESNext",\n "moduleResolution": "Bundler",\n "strict": true,\n "types": ["node", "resuxjs/globals"]\n },\n "include": ["**/*.ts", "**/*.tsx", "**/*.vue", "types/**/*.d.ts", "env.d.ts"]\n}\n`, "utf8");
|
|
945
|
+
details.tsconfigFile = path.relative(appRoot, tsconfigFile);
|
|
946
|
+
warnings.push("Created minimal tsconfig.json.");
|
|
947
|
+
} else warnings.push("Missing tsconfig.json. Run \"resux check --fix\" or scaffold it during project creation.");
|
|
948
|
+
} else details.tsconfigFile = path.relative(appRoot, tsconfigFile);
|
|
949
|
+
if (!await exists(path.join(appRoot, "nitro.config.ts"))) {
|
|
950
|
+
if (options.fix) {
|
|
951
|
+
await ensureNitroBuildFiles(appRoot);
|
|
952
|
+
warnings.push("Created missing nitro.config.ts.");
|
|
953
|
+
} else warnings.push("Missing nitro.config.ts. Run \"resux check --fix\" to scaffold it.");
|
|
954
|
+
}
|
|
955
|
+
if (!await exists(path.join(appRoot, ".resux-nitro", "handler.ts"))) {
|
|
956
|
+
if (options.fix) {
|
|
957
|
+
await ensureNitroBuildFiles(appRoot);
|
|
958
|
+
warnings.push("Created missing .resux-nitro/handler.ts.");
|
|
959
|
+
} else warnings.push("Missing .resux-nitro/handler.ts. Run \"resux check --fix\" to scaffold it.");
|
|
960
|
+
}
|
|
942
961
|
if (!await exists(path.join(appRoot, "app.vue"))) warnings.push("Missing app.vue (Resux will still run but starter conventions expect it).");
|
|
943
962
|
if (!await exists(path.join(appRoot, "pages"))) errors.push("Missing pages/ directory.");
|
|
944
963
|
if (!await exists(path.join(appRoot, "layouts"))) warnings.push("Missing layouts/ directory.");
|
|
@@ -1011,11 +1030,14 @@ async function ensureSafeProjectFiles(appRoot, options) {
|
|
|
1011
1030
|
if (await exists(gitignorePath)) {
|
|
1012
1031
|
const gitignoreSource = await readFile(gitignorePath, "utf8");
|
|
1013
1032
|
const entriesToAdd = missingGitignoreEntries(gitignoreSource);
|
|
1014
|
-
if (entriesToAdd.length > 0)
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1033
|
+
if (entriesToAdd.length > 0) {
|
|
1034
|
+
if (!options.fix) missing.push(`.gitignore entries: ${entriesToAdd.join(", ")}`);
|
|
1035
|
+
else {
|
|
1036
|
+
const newline = gitignoreSource.includes("\r\n") ? "\r\n" : "\n";
|
|
1037
|
+
const appendedSource = `${gitignoreSource}${gitignoreSource.endsWith("\n") || gitignoreSource.length === 0 ? "" : newline}${entriesToAdd.join(newline)}${newline}`;
|
|
1038
|
+
await writeFile(gitignorePath, appendedSource, "utf8");
|
|
1039
|
+
updated.push(".gitignore");
|
|
1040
|
+
}
|
|
1019
1041
|
}
|
|
1020
1042
|
}
|
|
1021
1043
|
const safeFiles = [
|
|
@@ -1120,7 +1142,8 @@ async function updateNitroConfigPrerenderRoutes(appRoot, outDir) {
|
|
|
1120
1142
|
if (!source) return;
|
|
1121
1143
|
let prerenderRoutes = [];
|
|
1122
1144
|
if (isStatic) {
|
|
1123
|
-
const
|
|
1145
|
+
const manifestPath = path.join(outDir, "manifest.json");
|
|
1146
|
+
const manifest = await readJsonRecord(manifestPath);
|
|
1124
1147
|
if (manifest && Array.isArray(manifest.routes)) {
|
|
1125
1148
|
for (const route of manifest.routes) if (!route.params || route.params.length === 0) {
|
|
1126
1149
|
const rpath = route.path;
|
|
@@ -1157,15 +1180,15 @@ async function upgradeNitroConfigForResux(configFile) {
|
|
|
1157
1180
|
if (!updated.includes("\"/__resux/image\"") && updated.includes("\"/api/**\":")) updated = updated.replace(/(\s+)\"\/api\/\*\*\":\s*\{/, ` "/__resux/image": {\n headers: {\n "cache-control": "public, max-age=31536000, immutable"\n }\n },\n$1"/api/**": {`);
|
|
1158
1181
|
const cloudflareNodeCompatPattern = /(\bcloudflare\s*:\s*\{[\s\S]*?\bnodeCompat\s*:\s*)(?:true|false)/;
|
|
1159
1182
|
if (cloudflareNodeCompatPattern.test(updated)) updated = updated.replace(cloudflareNodeCompatPattern, "$1true");
|
|
1160
|
-
else if (/\bcloudflare\s*:\s*\{/.test(updated)) updated = updated.replace(/\bcloudflare\s*:\s*\{/, (match
|
|
1161
|
-
else updated = updated.replace(/export\s+default\s+defineNitroConfig\s*\(\s*\{/, (match
|
|
1183
|
+
else if (/\bcloudflare\s*:\s*\{/.test(updated)) updated = updated.replace(/\bcloudflare\s*:\s*\{/, (match) => `${match}\n nodeCompat: true,`);
|
|
1184
|
+
else updated = updated.replace(/export\s+default\s+defineNitroConfig\s*\(\s*\{/, (match) => `${match}\n cloudflare: {\n nodeCompat: true\n },`);
|
|
1162
1185
|
if (updated === source) return;
|
|
1163
1186
|
await writeFile(configFile, updated, "utf8");
|
|
1164
1187
|
console.log("Updated nitro.config.ts with Resux compatibility defaults.");
|
|
1165
1188
|
}
|
|
1166
1189
|
async function runNitroBuild(appRoot, outDir, buildOptions) {
|
|
1167
1190
|
await buildOptions.hooks?.callHook("nitro:init", { appRoot });
|
|
1168
|
-
const nitroPackageJson =
|
|
1191
|
+
const nitroPackageJson = __require.resolve("nitropack/package.json");
|
|
1169
1192
|
const nitroCli = path.join(path.dirname(nitroPackageJson), "dist", "cli", "index.mjs");
|
|
1170
1193
|
const nitroEnv = { ...process.env };
|
|
1171
1194
|
const deployment = await resolveDeployment(appRoot, outDir, nitroEnv);
|
|
@@ -1290,25 +1313,35 @@ resux start . --no-security-headers
|
|
|
1290
1313
|
}
|
|
1291
1314
|
function createNitroConfig() {
|
|
1292
1315
|
return `import { defineNitroConfig } from "nitropack/config";
|
|
1316
|
+
import { existsSync, readdirSync } from "node:fs";
|
|
1317
|
+
import path from "node:path";
|
|
1318
|
+
|
|
1319
|
+
function getServerPlugins(): string[] {
|
|
1320
|
+
const dir = path.resolve("server/plugins");
|
|
1321
|
+
if (!existsSync(dir)) return [];
|
|
1322
|
+
return readdirSync(dir)
|
|
1323
|
+
.filter((f) => /\\.(ts|js|mjs)$/.test(f) && !f.endsWith(".d.ts"))
|
|
1324
|
+
.map((f) => path.join(dir, f));
|
|
1325
|
+
}
|
|
1293
1326
|
|
|
1294
1327
|
export default defineNitroConfig({
|
|
1295
|
-
srcDir: ".resux-nitro",
|
|
1296
1328
|
compatibilityDate: "2026-05-02",
|
|
1297
1329
|
cloudflare: {
|
|
1298
1330
|
nodeCompat: true
|
|
1299
1331
|
},
|
|
1300
1332
|
// Resux uses top-level /plugins, /modules, and /middleware for app features.
|
|
1301
|
-
// Nitro auto-scans these folders too, so exclude
|
|
1302
|
-
ignore: ["plugins/**", "modules/**", "middleware/**", "assets/**"],
|
|
1303
|
-
// Keep Nitro discovery scoped to the generated adapter directory.
|
|
1304
|
-
scanDirs: ["."],
|
|
1333
|
+
// Nitro auto-scans these folders too, so exclude only top-level Resux folders.
|
|
1334
|
+
ignore: ["./plugins/**", "./modules/**", "./middleware/**", "assets/**"],
|
|
1335
|
+
// Keep Nitro discovery scoped to the generated adapter directory and server directory.
|
|
1336
|
+
scanDirs: [".resux-nitro", "server"],
|
|
1337
|
+
plugins: getServerPlugins(),
|
|
1305
1338
|
publicAssets: [
|
|
1306
1339
|
{
|
|
1307
|
-
dir: "
|
|
1340
|
+
dir: "public",
|
|
1308
1341
|
baseURL: "/"
|
|
1309
1342
|
},
|
|
1310
1343
|
{
|
|
1311
|
-
dir: "
|
|
1344
|
+
dir: ".resux/client",
|
|
1312
1345
|
baseURL: "/__resux",
|
|
1313
1346
|
fallthrough: true
|
|
1314
1347
|
}
|
|
@@ -1316,7 +1349,7 @@ export default defineNitroConfig({
|
|
|
1316
1349
|
serverAssets: [
|
|
1317
1350
|
{
|
|
1318
1351
|
baseName: "resux",
|
|
1319
|
-
dir: "
|
|
1352
|
+
dir: ".resux/server"
|
|
1320
1353
|
}
|
|
1321
1354
|
],
|
|
1322
1355
|
handlers: [
|
|
@@ -1392,11 +1425,24 @@ export default defineNitroConfig({
|
|
|
1392
1425
|
function createNitroHandler() {
|
|
1393
1426
|
return `import { fromNodeMiddleware } from "h3";
|
|
1394
1427
|
import { createResuxNodeHandler } from "resuxjs/node";
|
|
1428
|
+
import { useNitroApp } from "nitropack/runtime";
|
|
1395
1429
|
|
|
1396
|
-
|
|
1430
|
+
let resuxHandler: any;
|
|
1431
|
+
function getResuxHandler() {
|
|
1432
|
+
if (!resuxHandler) {
|
|
1433
|
+
let hooks: any;
|
|
1434
|
+
try {
|
|
1435
|
+
const nitroApp = useNitroApp();
|
|
1436
|
+
hooks = nitroApp?.hooks;
|
|
1437
|
+
} catch {}
|
|
1438
|
+
resuxHandler = createResuxNodeHandler({ hooks });
|
|
1439
|
+
}
|
|
1440
|
+
return resuxHandler;
|
|
1441
|
+
}
|
|
1397
1442
|
|
|
1398
1443
|
export default fromNodeMiddleware((req, res, next) => {
|
|
1399
|
-
|
|
1444
|
+
const handler = getResuxHandler();
|
|
1445
|
+
handler(req, res);
|
|
1400
1446
|
|
|
1401
1447
|
if (res.writableEnded) {
|
|
1402
1448
|
return;
|
|
@@ -1441,7 +1487,7 @@ dist
|
|
|
1441
1487
|
.env.*
|
|
1442
1488
|
`;
|
|
1443
1489
|
}
|
|
1444
|
-
async function startViteDevServer(outDir, buildOptions, cliOptions) {
|
|
1490
|
+
async function startViteDevServer(outDir, buildOptions, cliOptions, contributions) {
|
|
1445
1491
|
const appRoot = path.dirname(outDir);
|
|
1446
1492
|
const [{ createServer: createViteServer }, { default: vuePlugin }] = await Promise.all([importRuntimeModule("vite"), importRuntimeModule("@vitejs/plugin-vue")]);
|
|
1447
1493
|
const hmrPort = 3e4 + Math.floor(Math.random() * 2e4);
|
|
@@ -1452,10 +1498,10 @@ async function startViteDevServer(outDir, buildOptions, cliOptions) {
|
|
|
1452
1498
|
appType: "custom",
|
|
1453
1499
|
clearScreen: false,
|
|
1454
1500
|
logLevel: "warn",
|
|
1455
|
-
plugins: [vuePlugin()],
|
|
1501
|
+
plugins: [vuePlugin(), ...contributions?.vitePlugins ?? []],
|
|
1456
1502
|
resolve: { alias: {
|
|
1457
1503
|
"/__resux/runtime-client.mjs": path.join(outDir, "vite-client", "runtime-client.mjs"),
|
|
1458
|
-
vue:
|
|
1504
|
+
vue: __require.resolve("vue"),
|
|
1459
1505
|
"@": normalizePath(appRoot),
|
|
1460
1506
|
"~": normalizePath(appRoot)
|
|
1461
1507
|
} },
|
|
@@ -1551,8 +1597,8 @@ function latestSourceMtime(root, outDir) {
|
|
|
1551
1597
|
return latest;
|
|
1552
1598
|
}
|
|
1553
1599
|
async function startServer(options) {
|
|
1554
|
-
const boundPort = await listenOnAvailablePort(createServer((request
|
|
1555
|
-
handleRequest(request
|
|
1600
|
+
const boundPort = await listenOnAvailablePort(createServer((request, response) => {
|
|
1601
|
+
handleRequest(request, response, options);
|
|
1556
1602
|
}), options.port, options.host);
|
|
1557
1603
|
if (boundPort !== options.port) console.log(`Port ${options.port} is busy, using ${boundPort} instead.`);
|
|
1558
1604
|
const url = `${options.https ? "https" : "http"}://${options.host ?? "localhost"}:${boundPort}`;
|
|
@@ -1567,7 +1613,7 @@ async function listenOnAvailablePort(server, requestedPort, host) {
|
|
|
1567
1613
|
await listen(server, portToTry, host);
|
|
1568
1614
|
return portToTry;
|
|
1569
1615
|
} catch (error) {
|
|
1570
|
-
if (!isAddressInUse(error) || offset ===
|
|
1616
|
+
if (!isAddressInUse(error) || offset === 19) throw error;
|
|
1571
1617
|
}
|
|
1572
1618
|
}
|
|
1573
1619
|
throw new Error(`No available port found from ${requestedPort} to ${requestedPort + maxAttempts - 1}.`);
|
|
@@ -1611,23 +1657,23 @@ function openInBrowser(url) {
|
|
|
1611
1657
|
detached: true
|
|
1612
1658
|
}).unref();
|
|
1613
1659
|
}
|
|
1614
|
-
function requestOriginFromHeaders(request
|
|
1615
|
-
const forwardedProto = firstHeaderValue(request
|
|
1616
|
-
const forwardedHost = firstHeaderValue(request
|
|
1617
|
-
const encrypted = Boolean(request
|
|
1618
|
-
return `${forwardedProto ?? (encrypted ? "https" : "http")}://${forwardedHost ?? firstHeaderValue(request
|
|
1660
|
+
function requestOriginFromHeaders(request) {
|
|
1661
|
+
const forwardedProto = firstHeaderValue(request.headers["x-forwarded-proto"]);
|
|
1662
|
+
const forwardedHost = firstHeaderValue(request.headers["x-forwarded-host"]);
|
|
1663
|
+
const encrypted = Boolean(request.socket.encrypted);
|
|
1664
|
+
return `${forwardedProto ?? (encrypted ? "https" : "http")}://${forwardedHost ?? firstHeaderValue(request.headers.host) ?? "localhost:3000"}`;
|
|
1619
1665
|
}
|
|
1620
1666
|
function firstHeaderValue(value) {
|
|
1621
1667
|
if (Array.isArray(value)) return value[0]?.split(",")[0]?.trim();
|
|
1622
1668
|
return value?.split(",")[0]?.trim();
|
|
1623
1669
|
}
|
|
1624
|
-
async function fetchMediaSourceOrRespond(request
|
|
1670
|
+
async function fetchMediaSourceOrRespond(request, response, sourceUrl, requestOrigin, kind) {
|
|
1625
1671
|
try {
|
|
1626
1672
|
return await fetchResuxMediaSource(sourceUrl, {
|
|
1627
1673
|
requestOrigin,
|
|
1628
|
-
accept: firstHeaderValue(request
|
|
1674
|
+
accept: firstHeaderValue(request.headers.accept),
|
|
1629
1675
|
maxBytes: kind === "image" ? RESUX_IMAGE_MAX_SOURCE_BYTES : RESUX_VIDEO_MAX_SOURCE_BYTES,
|
|
1630
|
-
trustedLoopbackPort: request
|
|
1676
|
+
trustedLoopbackPort: request.socket.localPort ?? void 0
|
|
1631
1677
|
});
|
|
1632
1678
|
} catch (error) {
|
|
1633
1679
|
const statusCode = error instanceof ResuxMediaFetchError ? error.statusCode : 502;
|
|
@@ -1647,8 +1693,8 @@ function respondMediaJsonError(response, statusCode, error) {
|
|
|
1647
1693
|
});
|
|
1648
1694
|
response.end(JSON.stringify({ error }));
|
|
1649
1695
|
}
|
|
1650
|
-
async function fetchAndTransformMediaSource(request
|
|
1651
|
-
const upstream = await fetchMediaSourceOrRespond(request
|
|
1696
|
+
async function fetchAndTransformMediaSource(request, response, sourceUrl, requestOrigin, kind, needsTransform, transform, transformFailureMessage, fallbackContentType) {
|
|
1697
|
+
const upstream = await fetchMediaSourceOrRespond(request, response, sourceUrl, requestOrigin, kind);
|
|
1652
1698
|
if (!upstream) return null;
|
|
1653
1699
|
if (!upstream.response.ok) {
|
|
1654
1700
|
respondMediaJsonError(response, upstream.response.status, `${kind === "image" ? "Image" : "Video"} source request failed with status ${upstream.response.status}.`);
|
|
@@ -1666,11 +1712,11 @@ async function fetchAndTransformMediaSource(request$1, response, sourceUrl, requ
|
|
|
1666
1712
|
contentType: transformed?.contentType ?? sourceContentType ?? fallbackContentType
|
|
1667
1713
|
};
|
|
1668
1714
|
}
|
|
1669
|
-
function fetchAndTransformImageSource(request
|
|
1670
|
-
return fetchAndTransformMediaSource(request
|
|
1715
|
+
function fetchAndTransformImageSource(request, response, sourceUrl, requestOrigin, options) {
|
|
1716
|
+
return fetchAndTransformMediaSource(request, response, sourceUrl, requestOrigin, "image", shouldTransformImage(options), (sourceBuffer, sourceContentType) => transformResuxImage(sourceBuffer, sourceContentType, options), sharpFactoryLoadError ?? "Image transform failed. Verify source format and requested modifiers.", "application/octet-stream");
|
|
1671
1717
|
}
|
|
1672
|
-
function fetchAndTransformVideoSource(request
|
|
1673
|
-
return fetchAndTransformMediaSource(request
|
|
1718
|
+
function fetchAndTransformVideoSource(request, response, sourceUrl, requestOrigin, options, sourceIdentity) {
|
|
1719
|
+
return fetchAndTransformMediaSource(request, response, sourceUrl, requestOrigin, "video", shouldTransformVideo(options), (sourceBuffer) => transformResuxVideo(sourceBuffer, sourceIdentity, options), ffmpegBinaryLoadError ?? ffmpegTransformLastError ?? "Video transform failed. Verify ffmpeg availability and requested options.", mimeTypeFromVideoFormat(options.format ?? inferVideoFormatFromSource(sourceIdentity) ?? "mp4"));
|
|
1674
1720
|
}
|
|
1675
1721
|
function readPort(value, fallback) {
|
|
1676
1722
|
if (!value) return fallback;
|
|
@@ -1725,9 +1771,19 @@ Options:
|
|
|
1725
1771
|
-h, --help Show this help message
|
|
1726
1772
|
`);
|
|
1727
1773
|
}
|
|
1728
|
-
async function handleRequest(request
|
|
1729
|
-
const
|
|
1730
|
-
|
|
1774
|
+
async function handleRequest(request, response, options) {
|
|
1775
|
+
const rawSetHeader = response.setHeader.bind(response);
|
|
1776
|
+
response.setHeader = function(name, value) {
|
|
1777
|
+
if (response.headersSent) return response;
|
|
1778
|
+
return rawSetHeader(name, value);
|
|
1779
|
+
};
|
|
1780
|
+
const rawWriteHead = response.writeHead.bind(response);
|
|
1781
|
+
response.writeHead = function(statusCode, ...args) {
|
|
1782
|
+
if (response.headersSent) return response;
|
|
1783
|
+
return rawWriteHead(statusCode, ...args);
|
|
1784
|
+
};
|
|
1785
|
+
const requestOrigin = requestOriginFromHeaders(request);
|
|
1786
|
+
const requestUrl = safeParseRequestUrl(request.url, requestOrigin);
|
|
1731
1787
|
try {
|
|
1732
1788
|
applyDefaultSecurityHeaders(response, options.securityHeaders);
|
|
1733
1789
|
if (!requestUrl) {
|
|
@@ -1738,12 +1794,12 @@ async function handleRequest(request$1, response, options) {
|
|
|
1738
1794
|
response.end("Not found");
|
|
1739
1795
|
return;
|
|
1740
1796
|
}
|
|
1741
|
-
if (options.dev && options.vite && isViteInternalRequest(requestUrl.pathname)) {
|
|
1742
|
-
await serveViteMiddleware(request
|
|
1743
|
-
return;
|
|
1797
|
+
if (options.dev && options.vite && (isViteInternalRequest(requestUrl.pathname) || requestUrl.pathname.endsWith(".css"))) {
|
|
1798
|
+
await serveViteMiddleware(request, response, options.vite);
|
|
1799
|
+
if (response.writableEnded) return;
|
|
1744
1800
|
}
|
|
1745
1801
|
if (options.dev && requestUrl.pathname === "/__resux/dev-events") {
|
|
1746
|
-
serveDevEvents(request
|
|
1802
|
+
serveDevEvents(request, response);
|
|
1747
1803
|
return;
|
|
1748
1804
|
}
|
|
1749
1805
|
if (requestUrl.pathname === "/__resux/resux-placeholder.svg") {
|
|
@@ -1763,23 +1819,23 @@ async function handleRequest(request$1, response, options) {
|
|
|
1763
1819
|
else routePath = "/" + sub.replace(/\.json$/, "");
|
|
1764
1820
|
}
|
|
1765
1821
|
requestUrl.searchParams.set("path", routePath);
|
|
1766
|
-
await serveRoutePayload(request
|
|
1822
|
+
await serveRoutePayload(request, response, requestUrl, options, requestOrigin);
|
|
1767
1823
|
return;
|
|
1768
1824
|
}
|
|
1769
1825
|
if (requestUrl.pathname === "/__resux/image") {
|
|
1770
|
-
await serveResuxImage(request
|
|
1826
|
+
await serveResuxImage(request, response, requestUrl, requestOrigin);
|
|
1771
1827
|
return;
|
|
1772
1828
|
}
|
|
1773
1829
|
if (requestUrl.pathname === "/__resux/video") {
|
|
1774
|
-
await serveResuxVideo(request
|
|
1830
|
+
await serveResuxVideo(request, response, requestUrl, requestOrigin);
|
|
1775
1831
|
return;
|
|
1776
1832
|
}
|
|
1777
1833
|
if (requestUrl.pathname.startsWith("/_resux/generated/images/")) {
|
|
1778
|
-
await serveGeneratedResuxImage(request
|
|
1834
|
+
await serveGeneratedResuxImage(request, response, requestUrl, requestOrigin, options.appRoot);
|
|
1779
1835
|
return;
|
|
1780
1836
|
}
|
|
1781
1837
|
if (requestUrl.pathname.startsWith("/_resux/generated/videos/")) {
|
|
1782
|
-
await serveGeneratedResuxVideo(request
|
|
1838
|
+
await serveGeneratedResuxVideo(request, response, requestUrl, requestOrigin, options.appRoot);
|
|
1783
1839
|
return;
|
|
1784
1840
|
}
|
|
1785
1841
|
if (requestUrl.pathname.startsWith("/__resux/")) {
|
|
@@ -1795,19 +1851,19 @@ async function handleRequest(request$1, response, options) {
|
|
|
1795
1851
|
const manifest = await importManifest(options.outDir, options.dev);
|
|
1796
1852
|
const routeRule = matchRouteRule(manifest.routeRules, requestUrl.pathname);
|
|
1797
1853
|
applyRouteRuleHeaders(response, routeRule);
|
|
1798
|
-
if (routeRule?.cors && request
|
|
1854
|
+
if (routeRule?.cors && request.method === "OPTIONS") {
|
|
1799
1855
|
response.writeHead(204);
|
|
1800
1856
|
response.end();
|
|
1801
1857
|
return;
|
|
1802
1858
|
}
|
|
1803
|
-
if (await runServerMiddleware(request$1, response, requestUrl, manifest)) return;
|
|
1804
1859
|
if (routeRule?.redirect) {
|
|
1805
1860
|
serveRouteRuleRedirect(response, routeRule.redirect);
|
|
1806
1861
|
return;
|
|
1807
1862
|
}
|
|
1808
|
-
if (await
|
|
1809
|
-
if (await
|
|
1810
|
-
|
|
1863
|
+
if (await servePublicFile(request, response, options.appRoot, requestUrl.pathname, options.dev)) return;
|
|
1864
|
+
if (await runServerMiddleware(request, response, requestUrl, manifest)) return;
|
|
1865
|
+
if (await serveServerHandler(request, response, requestUrl, manifest, routeRule)) return;
|
|
1866
|
+
const rendered = await renderRoute(requestUrl, options, manifest, requestOrigin, request.headers["user-agent"]);
|
|
1811
1867
|
if (!rendered) {
|
|
1812
1868
|
await serveErrorDocument(response, options, manifest, 404, "Page not found");
|
|
1813
1869
|
return;
|
|
@@ -1822,13 +1878,22 @@ async function handleRequest(request$1, response, options) {
|
|
|
1822
1878
|
response.end(rendered.message);
|
|
1823
1879
|
return;
|
|
1824
1880
|
}
|
|
1825
|
-
|
|
1881
|
+
const normalizedRendered = withPrioritizedHeadImagePreloads(rendered);
|
|
1882
|
+
let html = promoteDocumentImagePreloads(await renderDocumentAsync(normalizedRendered, "Resux App", {
|
|
1883
|
+
devReload: options.dev,
|
|
1884
|
+
hooks: options.hooks ?? options.buildOptions?.hooks
|
|
1885
|
+
}));
|
|
1826
1886
|
if (options.dev && devHalalOverlayScript) html = html.replace("</body>", `<script>${devHalalOverlayScript}<\/script></body>`);
|
|
1827
|
-
response.writeHead(routeRule?.statusCode ?? 200, { "content-type": "text/html; charset=utf-8" });
|
|
1887
|
+
if (!response.headersSent) response.writeHead(routeRule?.statusCode ?? 200, { "content-type": "text/html; charset=utf-8" });
|
|
1828
1888
|
response.end(html);
|
|
1829
1889
|
} catch (error) {
|
|
1830
1890
|
console.error("Request failed:", error);
|
|
1831
|
-
if (response.writableEnded)
|
|
1891
|
+
if (response.writableEnded || response.headersSent) {
|
|
1892
|
+
try {
|
|
1893
|
+
if (!response.writableEnded) response.end();
|
|
1894
|
+
} catch {}
|
|
1895
|
+
return;
|
|
1896
|
+
}
|
|
1832
1897
|
await serveErrorDocument(response, options, void 0, 500, error);
|
|
1833
1898
|
}
|
|
1834
1899
|
}
|
|
@@ -1850,6 +1915,12 @@ function serveResuxPlaceholderAsset(response) {
|
|
|
1850
1915
|
response.end(RESUX_PLACEHOLDER_SVG);
|
|
1851
1916
|
}
|
|
1852
1917
|
async function serveErrorDocument(response, options, loadedManifest, statusCode, error) {
|
|
1918
|
+
if (response.writableEnded || response.headersSent) {
|
|
1919
|
+
try {
|
|
1920
|
+
if (!response.writableEnded) response.end();
|
|
1921
|
+
} catch {}
|
|
1922
|
+
return;
|
|
1923
|
+
}
|
|
1853
1924
|
const statusMessage = statusCode === 404 ? "Not Found" : "Internal Server Error";
|
|
1854
1925
|
const errorPayload = createErrorPayload(error, statusCode, statusMessage, options.dev);
|
|
1855
1926
|
try {
|
|
@@ -1872,13 +1943,19 @@ async function serveErrorDocument(response, options, loadedManifest, statusCode,
|
|
|
1872
1943
|
appHead: manifest.appHead,
|
|
1873
1944
|
plugins: resolveManifestPlugins(manifest)
|
|
1874
1945
|
});
|
|
1875
|
-
response.writeHead(statusCode, {
|
|
1946
|
+
response.writeHead(statusCode, {
|
|
1947
|
+
"content-type": "text/html; charset=utf-8",
|
|
1948
|
+
"cache-control": "no-store, no-cache, must-revalidate"
|
|
1949
|
+
});
|
|
1876
1950
|
const normalizedRendered = withPrioritizedHeadImagePreloads(rendered);
|
|
1877
1951
|
response.end(promoteDocumentImagePreloads(renderDocument(normalizedRendered, statusMessage, { devReload: options.dev })));
|
|
1878
1952
|
return;
|
|
1879
1953
|
}
|
|
1880
1954
|
} catch {}
|
|
1881
|
-
response.writeHead(statusCode, {
|
|
1955
|
+
response.writeHead(statusCode, {
|
|
1956
|
+
"content-type": "text/plain; charset=utf-8",
|
|
1957
|
+
"cache-control": "no-store, no-cache, must-revalidate"
|
|
1958
|
+
});
|
|
1882
1959
|
response.end(createPlainErrorBody(errorPayload, options.dev));
|
|
1883
1960
|
}
|
|
1884
1961
|
async function serveHealthCheck(response, options) {
|
|
@@ -1931,7 +2008,7 @@ function createPlainErrorBody(error, dev) {
|
|
|
1931
2008
|
if (dev && error.stack) return error.stack;
|
|
1932
2009
|
return error.message;
|
|
1933
2010
|
}
|
|
1934
|
-
async function serveRoutePayload(request
|
|
2011
|
+
async function serveRoutePayload(request, response, requestUrl, options, requestOrigin) {
|
|
1935
2012
|
const targetPath = requestUrl.searchParams.get("path");
|
|
1936
2013
|
if (!targetPath || !targetPath.startsWith("/") || targetPath.startsWith("//")) {
|
|
1937
2014
|
response.writeHead(400, { "content-type": "application/json; charset=utf-8" });
|
|
@@ -1951,7 +2028,7 @@ async function serveRoutePayload(request$1, response, requestUrl, options, reque
|
|
|
1951
2028
|
}));
|
|
1952
2029
|
return;
|
|
1953
2030
|
}
|
|
1954
|
-
const rendered = await renderRoute(targetUrl, options, manifest, requestOrigin, request
|
|
2031
|
+
const rendered = await renderRoute(targetUrl, options, manifest, requestOrigin, request.headers["user-agent"]);
|
|
1955
2032
|
if (!rendered) {
|
|
1956
2033
|
response.writeHead(404, { "content-type": "application/json; charset=utf-8" });
|
|
1957
2034
|
response.end(JSON.stringify({ error: "Not found" }));
|
|
@@ -1975,9 +2052,13 @@ async function serveRoutePayload(request$1, response, requestUrl, options, reque
|
|
|
1975
2052
|
"content-type": "application/json; charset=utf-8",
|
|
1976
2053
|
"cache-control": "no-store"
|
|
1977
2054
|
});
|
|
1978
|
-
response.end(JSON.stringify(
|
|
2055
|
+
response.end(JSON.stringify({
|
|
2056
|
+
html: normalizedRendered.html,
|
|
2057
|
+
payload: normalizedRendered.payload,
|
|
2058
|
+
head: normalizedRendered.head
|
|
2059
|
+
}));
|
|
1979
2060
|
}
|
|
1980
|
-
const RESUX_IMAGE_SUPPORTED_FORMATS = new Set([
|
|
2061
|
+
const RESUX_IMAGE_SUPPORTED_FORMATS = /* @__PURE__ */ new Set([
|
|
1981
2062
|
"avif",
|
|
1982
2063
|
"gif",
|
|
1983
2064
|
"jpeg",
|
|
@@ -1987,7 +2068,7 @@ const RESUX_IMAGE_SUPPORTED_FORMATS = new Set([
|
|
|
1987
2068
|
]);
|
|
1988
2069
|
let sharpFactoryPromise = null;
|
|
1989
2070
|
let sharpFactoryLoadError = null;
|
|
1990
|
-
const RESUX_VIDEO_SUPPORTED_FORMATS = new Set(["mp4", "webm"]);
|
|
2071
|
+
const RESUX_VIDEO_SUPPORTED_FORMATS = /* @__PURE__ */ new Set(["mp4", "webm"]);
|
|
1991
2072
|
let ffmpegBinaryPromise = null;
|
|
1992
2073
|
let ffmpegBinaryLoadError = null;
|
|
1993
2074
|
let ffmpegTransformLastError = null;
|
|
@@ -2202,7 +2283,7 @@ function normalizeImageQuality(quality) {
|
|
|
2202
2283
|
if (!Number.isFinite(quality)) return;
|
|
2203
2284
|
return Math.min(100, Math.max(1, Math.round(quality)));
|
|
2204
2285
|
}
|
|
2205
|
-
const RESUX_IMAGE_RESERVED_QUERY_KEYS = new Set([
|
|
2286
|
+
const RESUX_IMAGE_RESERVED_QUERY_KEYS = /* @__PURE__ */ new Set([
|
|
2206
2287
|
"src",
|
|
2207
2288
|
"url",
|
|
2208
2289
|
"original",
|
|
@@ -2240,8 +2321,7 @@ function parseImageCacheMaxAgeSeconds(value) {
|
|
|
2240
2321
|
const amount = Number(durationMatch[1]);
|
|
2241
2322
|
if (!Number.isFinite(amount) || amount <= 0) return;
|
|
2242
2323
|
const unit = durationMatch[2];
|
|
2243
|
-
|
|
2244
|
-
return Math.max(1, Math.round(amount * multiplier));
|
|
2324
|
+
return Math.max(1, Math.round(amount * (unit === "s" ? 1 : unit === "m" ? 60 : unit === "h" ? 3600 : unit === "d" ? 86400 : 604800)));
|
|
2245
2325
|
}
|
|
2246
2326
|
function inferImageExtensionFromSource(value) {
|
|
2247
2327
|
if (!value) return;
|
|
@@ -2300,7 +2380,8 @@ function createGeneratedVideoRoutePath(source, format, quality) {
|
|
|
2300
2380
|
}
|
|
2301
2381
|
function resolveGeneratedMediaDiskPath(appRoot, pathname, mediaDirectory) {
|
|
2302
2382
|
const publicRoot = path.resolve(appRoot, "public");
|
|
2303
|
-
const
|
|
2383
|
+
const generatedRoot = path.resolve(publicRoot, "_resux", "generated", mediaDirectory);
|
|
2384
|
+
const resolved = resolveRequestPathWithinBoundary(publicRoot, generatedRoot, pathname);
|
|
2304
2385
|
return resolved ? {
|
|
2305
2386
|
filePath: resolved,
|
|
2306
2387
|
relativePath: decodeURIComponent(pathname)
|
|
@@ -2419,8 +2500,8 @@ async function resolveLocalSourceFileInfo(sourceUrl, requestOrigin, appRoot) {
|
|
|
2419
2500
|
size: sourceStats.size
|
|
2420
2501
|
};
|
|
2421
2502
|
}
|
|
2422
|
-
async function serveResuxImage(request
|
|
2423
|
-
const method = request
|
|
2503
|
+
async function serveResuxImage(request, response, requestUrl, requestOrigin) {
|
|
2504
|
+
const method = request.method ?? "GET";
|
|
2424
2505
|
if (method !== "GET" && method !== "HEAD") {
|
|
2425
2506
|
response.writeHead(405, {
|
|
2426
2507
|
"content-type": "text/plain; charset=utf-8",
|
|
@@ -2444,7 +2525,7 @@ async function serveResuxImage(request$1, response, requestUrl, requestOrigin) {
|
|
|
2444
2525
|
fit: normalizeImageFit(requestUrl.searchParams.get("fit")) ?? normalizeImageFit(requestUrl.searchParams.get("mode")),
|
|
2445
2526
|
extraModifiers: parseImageExtraModifiers(requestUrl.searchParams)
|
|
2446
2527
|
};
|
|
2447
|
-
const media = await fetchAndTransformImageSource(request
|
|
2528
|
+
const media = await fetchAndTransformImageSource(request, response, sourceUrl, requestOrigin, options);
|
|
2448
2529
|
if (!media) return;
|
|
2449
2530
|
const { body, contentType } = media;
|
|
2450
2531
|
const cacheControl = shouldTransformImage(options) ? "public, max-age=31536000, immutable" : "public, max-age=86400";
|
|
@@ -2459,8 +2540,8 @@ async function serveResuxImage(request$1, response, requestUrl, requestOrigin) {
|
|
|
2459
2540
|
}
|
|
2460
2541
|
response.end(body);
|
|
2461
2542
|
}
|
|
2462
|
-
async function serveGeneratedResuxImage(request
|
|
2463
|
-
const method = request
|
|
2543
|
+
async function serveGeneratedResuxImage(request, response, requestUrl, requestOrigin, appRoot) {
|
|
2544
|
+
const method = request.method ?? "GET";
|
|
2464
2545
|
if (method !== "GET" && method !== "HEAD") {
|
|
2465
2546
|
response.writeHead(405, {
|
|
2466
2547
|
"content-type": "text/plain; charset=utf-8",
|
|
@@ -2532,7 +2613,7 @@ async function serveGeneratedResuxImage(request$1, response, requestUrl, request
|
|
|
2532
2613
|
const sourceInfo = await resolveLocalSourceFileInfo(sourceUrl, requestOrigin, appRoot);
|
|
2533
2614
|
const cacheKey = hashImageSignature(createImageTransformSignature(sourceParam, originalSourceParam || void 0, options.format, options));
|
|
2534
2615
|
const now = Date.now();
|
|
2535
|
-
await serveGeneratedMediaCacheOrSource(response, method, appRoot, filePath, metadataPath, cacheMaxAgeSeconds, now, () => readGeneratedImageMetadata(metadataPath), (metadata) => generatedImageMetadataValid(metadata, cacheKey, now, sourceInfo), () => fetchAndTransformImageSource(request
|
|
2616
|
+
await serveGeneratedMediaCacheOrSource(response, method, appRoot, filePath, metadataPath, cacheMaxAgeSeconds, now, () => readGeneratedImageMetadata(metadataPath), (metadata) => generatedImageMetadataValid(metadata, cacheKey, now, sourceInfo), () => fetchAndTransformImageSource(request, response, sourceUrl, requestOrigin, options), (expiresAt) => ({
|
|
2536
2617
|
version: 1,
|
|
2537
2618
|
key: cacheKey,
|
|
2538
2619
|
createdAt: now,
|
|
@@ -2553,8 +2634,8 @@ async function serveGeneratedResuxImage(request$1, response, requestUrl, request
|
|
|
2553
2634
|
} : {}
|
|
2554
2635
|
}));
|
|
2555
2636
|
}
|
|
2556
|
-
async function serveResuxVideo(request
|
|
2557
|
-
const method = request
|
|
2637
|
+
async function serveResuxVideo(request, response, requestUrl, requestOrigin) {
|
|
2638
|
+
const method = request.method ?? "GET";
|
|
2558
2639
|
if (method !== "GET" && method !== "HEAD") {
|
|
2559
2640
|
response.writeHead(405, {
|
|
2560
2641
|
"content-type": "text/plain; charset=utf-8",
|
|
@@ -2574,7 +2655,7 @@ async function serveResuxVideo(request$1, response, requestUrl, requestOrigin) {
|
|
|
2574
2655
|
format: normalizeVideoFormat(requestUrl.searchParams.get("f")) ?? normalizeVideoFormat(requestUrl.searchParams.get("format")),
|
|
2575
2656
|
quality: normalizeVideoQuality(requestUrl.searchParams.get("q")) ?? normalizeVideoQuality(requestUrl.searchParams.get("quality"))
|
|
2576
2657
|
};
|
|
2577
|
-
const media = await fetchAndTransformVideoSource(request
|
|
2658
|
+
const media = await fetchAndTransformVideoSource(request, response, sourceUrl, requestOrigin, options, sourceParam || sourceUrl.pathname);
|
|
2578
2659
|
if (!media) return;
|
|
2579
2660
|
const { body, contentType } = media;
|
|
2580
2661
|
const cacheControl = shouldTransformVideo(options) ? "public, max-age=31536000, immutable" : "public, max-age=86400";
|
|
@@ -2589,8 +2670,8 @@ async function serveResuxVideo(request$1, response, requestUrl, requestOrigin) {
|
|
|
2589
2670
|
}
|
|
2590
2671
|
response.end(body);
|
|
2591
2672
|
}
|
|
2592
|
-
async function serveGeneratedResuxVideo(request
|
|
2593
|
-
const method = request
|
|
2673
|
+
async function serveGeneratedResuxVideo(request, response, requestUrl, requestOrigin, appRoot) {
|
|
2674
|
+
const method = request.method ?? "GET";
|
|
2594
2675
|
if (method !== "GET" && method !== "HEAD") {
|
|
2595
2676
|
response.writeHead(405, {
|
|
2596
2677
|
"content-type": "text/plain; charset=utf-8",
|
|
@@ -2657,7 +2738,7 @@ async function serveGeneratedResuxVideo(request$1, response, requestUrl, request
|
|
|
2657
2738
|
const sourceInfo = await resolveLocalSourceFileInfo(sourceUrl, requestOrigin, appRoot);
|
|
2658
2739
|
const cacheKey = hashImageSignature(createVideoTransformSignature(sourceParam, options.format, options.quality));
|
|
2659
2740
|
const now = Date.now();
|
|
2660
|
-
await serveGeneratedMediaCacheOrSource(response, method, appRoot, filePath, metadataPath, cacheMaxAgeSeconds, now, () => readGeneratedVideoMetadata(metadataPath), (metadata) => generatedVideoMetadataValid(metadata, cacheKey, now, sourceInfo), () => fetchAndTransformVideoSource(request
|
|
2741
|
+
await serveGeneratedMediaCacheOrSource(response, method, appRoot, filePath, metadataPath, cacheMaxAgeSeconds, now, () => readGeneratedVideoMetadata(metadataPath), (metadata) => generatedVideoMetadataValid(metadata, cacheKey, now, sourceInfo), () => fetchAndTransformVideoSource(request, response, sourceUrl, requestOrigin, options, sourceParam || sourceUrl.pathname), (expiresAt) => ({
|
|
2661
2742
|
version: 1,
|
|
2662
2743
|
key: cacheKey,
|
|
2663
2744
|
createdAt: now,
|
|
@@ -2738,9 +2819,9 @@ async function runRouteMiddleware(manifest, to, pageMeta) {
|
|
|
2738
2819
|
}
|
|
2739
2820
|
return null;
|
|
2740
2821
|
}
|
|
2741
|
-
async function runServerMiddleware(request
|
|
2822
|
+
async function runServerMiddleware(request, response, requestUrl, manifest) {
|
|
2742
2823
|
for (const entry of manifest.serverMiddleware ?? []) {
|
|
2743
|
-
const result = await entry.handler(createServerEvent(request
|
|
2824
|
+
const result = await entry.handler(createServerEvent(request, response, requestUrl, {}));
|
|
2744
2825
|
if (response.writableEnded) return true;
|
|
2745
2826
|
if (result === void 0 || result === null) continue;
|
|
2746
2827
|
await sendServerResult(response, result);
|
|
@@ -2828,7 +2909,18 @@ function promoteDocumentImagePreloads(html) {
|
|
|
2828
2909
|
if (!preloadTags.length) return html;
|
|
2829
2910
|
const headWithoutPreloads = headContent.replace(preloadPattern, "");
|
|
2830
2911
|
const titleMatch = headWithoutPreloads.match(/<title\b[^>]*>[\s\S]*?<\/title>/i);
|
|
2831
|
-
|
|
2912
|
+
let insertionPoint = 0;
|
|
2913
|
+
if (titleMatch) insertionPoint = headWithoutPreloads.indexOf(titleMatch[0]) + titleMatch[0].length;
|
|
2914
|
+
else {
|
|
2915
|
+
const metaMatches = [...headWithoutPreloads.matchAll(/<meta\b[^>]*>/gi)];
|
|
2916
|
+
for (const match of metaMatches) {
|
|
2917
|
+
const tag = match[0].toLowerCase();
|
|
2918
|
+
if (tag.includes("charset") || tag.includes("http-equiv") || tag.includes("name=\"viewport\"") || tag.includes("name='viewport'")) {
|
|
2919
|
+
const endPos = (match.index ?? 0) + match[0].length;
|
|
2920
|
+
if (endPos > insertionPoint) insertionPoint = endPos;
|
|
2921
|
+
}
|
|
2922
|
+
}
|
|
2923
|
+
}
|
|
2832
2924
|
const reorderedHeadContent = headWithoutPreloads.slice(0, insertionPoint) + preloadTags.join("") + headWithoutPreloads.slice(insertionPoint);
|
|
2833
2925
|
return html.slice(0, headOpenEnd) + reorderedHeadContent + html.slice(headEnd);
|
|
2834
2926
|
}
|
|
@@ -2898,22 +2990,22 @@ function normalizeRouteRuleRedirect(redirect) {
|
|
|
2898
2990
|
statusCode: redirect?.statusCode ?? 307
|
|
2899
2991
|
};
|
|
2900
2992
|
}
|
|
2901
|
-
async function serveServerHandler(request
|
|
2993
|
+
async function serveServerHandler(request, response, requestUrl, manifest, routeRule) {
|
|
2902
2994
|
const matched = manifest.matchServerHandler?.(requestUrl.pathname);
|
|
2903
2995
|
if (!matched) return false;
|
|
2904
|
-
const result = await matched.route.handler(createServerEvent(request
|
|
2996
|
+
const result = await matched.route.handler(createServerEvent(request, response, requestUrl, matched.params));
|
|
2905
2997
|
if (response.writableEnded) return true;
|
|
2906
2998
|
await sendServerResult(response, result, routeRule?.statusCode ?? 200);
|
|
2907
2999
|
return true;
|
|
2908
3000
|
}
|
|
2909
|
-
function createServerEvent(request
|
|
3001
|
+
function createServerEvent(request, response, requestUrl, params) {
|
|
2910
3002
|
return {
|
|
2911
3003
|
path: requestUrl.pathname,
|
|
2912
|
-
method: request
|
|
3004
|
+
method: request.method ?? "GET",
|
|
2913
3005
|
query: readQuery(requestUrl),
|
|
2914
3006
|
params,
|
|
2915
3007
|
node: {
|
|
2916
|
-
req: request
|
|
3008
|
+
req: request,
|
|
2917
3009
|
res: response
|
|
2918
3010
|
}
|
|
2919
3011
|
};
|
|
@@ -2957,7 +3049,7 @@ function isServerRedirectResult(value) {
|
|
|
2957
3049
|
function isServerAbortResult(value) {
|
|
2958
3050
|
return Boolean(value && typeof value === "object" && value.type === "abort");
|
|
2959
3051
|
}
|
|
2960
|
-
async function servePublicFile(response, appRoot, pathname) {
|
|
3052
|
+
async function servePublicFile(request, response, appRoot, pathname, isDev = false) {
|
|
2961
3053
|
const publicRoot = path.resolve(appRoot, "public");
|
|
2962
3054
|
const candidates = [{
|
|
2963
3055
|
base: publicRoot,
|
|
@@ -2970,19 +3062,32 @@ async function servePublicFile(response, appRoot, pathname) {
|
|
|
2970
3062
|
for (const { base, boundary } of candidates) {
|
|
2971
3063
|
const resolved = resolveRequestPathWithinBoundary(base, boundary, pathname);
|
|
2972
3064
|
if (!resolved || !await exists(resolved)) continue;
|
|
2973
|
-
|
|
3065
|
+
const fileStats = await stat(resolved);
|
|
3066
|
+
if (!fileStats.isFile()) continue;
|
|
2974
3067
|
if (!await isRealPathWithinBoundary(boundary, resolved)) continue;
|
|
2975
|
-
|
|
3068
|
+
const etag = `W/"${fileStats.size.toString(16)}-${fileStats.mtimeMs.toString(16)}"`;
|
|
3069
|
+
if (request.headers["if-none-match"] === etag) {
|
|
3070
|
+
response.writeHead(304, {
|
|
3071
|
+
etag,
|
|
3072
|
+
"x-content-type-options": "nosniff",
|
|
3073
|
+
"cache-control": isDev ? "no-cache" : response.getHeader("cache-control") ?? "public, max-age=86400"
|
|
3074
|
+
});
|
|
3075
|
+
response.end();
|
|
3076
|
+
return true;
|
|
3077
|
+
}
|
|
3078
|
+
const headers = {
|
|
2976
3079
|
"content-type": mimeType(resolved),
|
|
2977
|
-
|
|
2978
|
-
|
|
3080
|
+
"x-content-type-options": "nosniff",
|
|
3081
|
+
etag
|
|
3082
|
+
};
|
|
3083
|
+
if (!response.hasHeader("cache-control")) headers["cache-control"] = isDev ? "no-cache" : "public, max-age=86400";
|
|
3084
|
+
response.writeHead(200, headers);
|
|
2979
3085
|
response.end(await readFile(resolved));
|
|
2980
3086
|
return true;
|
|
2981
3087
|
}
|
|
2982
3088
|
return false;
|
|
2983
3089
|
}
|
|
2984
3090
|
function mimeType(file) {
|
|
2985
|
-
const ext = path.extname(file).toLowerCase();
|
|
2986
3091
|
return {
|
|
2987
3092
|
".css": "text/css; charset=utf-8",
|
|
2988
3093
|
".js": "text/javascript; charset=utf-8",
|
|
@@ -3000,8 +3105,16 @@ function mimeType(file) {
|
|
|
3000
3105
|
".mp4": "video/mp4",
|
|
3001
3106
|
".webm": "video/webm",
|
|
3002
3107
|
".mov": "video/quicktime",
|
|
3003
|
-
".ico": "image/x-icon"
|
|
3004
|
-
|
|
3108
|
+
".ico": "image/x-icon",
|
|
3109
|
+
".woff2": "font/woff2",
|
|
3110
|
+
".woff": "font/woff",
|
|
3111
|
+
".ttf": "font/ttf",
|
|
3112
|
+
".otf": "font/otf",
|
|
3113
|
+
".eot": "application/vnd.ms-fontobject",
|
|
3114
|
+
".wasm": "application/wasm",
|
|
3115
|
+
".xml": "application/xml; charset=utf-8",
|
|
3116
|
+
".map": "application/json; charset=utf-8"
|
|
3117
|
+
}[path.extname(file).toLowerCase()] ?? "application/octet-stream";
|
|
3005
3118
|
}
|
|
3006
3119
|
async function ensureDevBuild(appRoot, outDir, buildOptions, vite) {
|
|
3007
3120
|
const startedAtRevision = devBuildRevision;
|
|
@@ -3016,9 +3129,10 @@ async function ensureDevBuild(appRoot, outDir, buildOptions, vite) {
|
|
|
3016
3129
|
activeDevBuild = runCompilerBuild(appRoot, outDir, {
|
|
3017
3130
|
...buildOptions,
|
|
3018
3131
|
vite: "dev"
|
|
3019
|
-
}).then(() => {
|
|
3132
|
+
}).then(async (buildResult) => {
|
|
3020
3133
|
devBuildRevision++;
|
|
3021
3134
|
vite?.moduleGraph.invalidateAll();
|
|
3135
|
+
await syncDevContributedVitePlugins(vite, buildResult);
|
|
3022
3136
|
}).finally(() => {
|
|
3023
3137
|
activeDevBuild = null;
|
|
3024
3138
|
});
|
|
@@ -3027,7 +3141,27 @@ async function ensureDevBuild(appRoot, outDir, buildOptions, vite) {
|
|
|
3027
3141
|
}
|
|
3028
3142
|
return devBuildRevision !== startedAtRevision;
|
|
3029
3143
|
}
|
|
3030
|
-
function
|
|
3144
|
+
function mergeContributedVitePlugins(existingPlugins, contributedPlugins) {
|
|
3145
|
+
const updated = [...existingPlugins];
|
|
3146
|
+
for (const plugin of contributedPlugins) {
|
|
3147
|
+
const pluginName = plugin?.name;
|
|
3148
|
+
const existingIdx = pluginName ? updated.findIndex((p) => p?.name === pluginName) : updated.indexOf(plugin);
|
|
3149
|
+
if (existingIdx === -1) updated.push(plugin);
|
|
3150
|
+
else updated[existingIdx] = plugin;
|
|
3151
|
+
}
|
|
3152
|
+
return updated;
|
|
3153
|
+
}
|
|
3154
|
+
async function syncDevContributedVitePlugins(vite, buildResult) {
|
|
3155
|
+
const rawPlugins = buildResult?.contributions?.vitePlugins;
|
|
3156
|
+
if (!vite || !rawPlugins) return;
|
|
3157
|
+
const inlineConfig = vite.config?.inlineConfig;
|
|
3158
|
+
const currentPlugins = inlineConfig?.plugins ?? vite.config?.plugins ?? [];
|
|
3159
|
+
const contributedPlugins = rawPlugins.filter(Boolean);
|
|
3160
|
+
if (!contributedPlugins.some((p) => !currentPlugins.includes(p))) return;
|
|
3161
|
+
if (inlineConfig) inlineConfig.plugins = mergeContributedVitePlugins(Array.isArray(inlineConfig.plugins) ? inlineConfig.plugins : [], contributedPlugins);
|
|
3162
|
+
if (typeof vite.restart === "function") await vite.restart();
|
|
3163
|
+
}
|
|
3164
|
+
function serveDevEvents(request, response) {
|
|
3031
3165
|
response.writeHead(200, {
|
|
3032
3166
|
"content-type": "text/event-stream; charset=utf-8",
|
|
3033
3167
|
"cache-control": "no-store, no-transform",
|
|
@@ -3035,7 +3169,7 @@ function serveDevEvents(request$1, response) {
|
|
|
3035
3169
|
});
|
|
3036
3170
|
response.write("retry: 1000\n\n");
|
|
3037
3171
|
devReloadClients.add(response);
|
|
3038
|
-
request
|
|
3172
|
+
request.on("close", () => {
|
|
3039
3173
|
devReloadClients.delete(response);
|
|
3040
3174
|
});
|
|
3041
3175
|
}
|
|
@@ -3097,7 +3231,7 @@ async function serveViteResuxAsset(response, vite, pathname, outDir) {
|
|
|
3097
3231
|
});
|
|
3098
3232
|
response.end(transformed.code);
|
|
3099
3233
|
}
|
|
3100
|
-
async function serveViteMiddleware(request
|
|
3234
|
+
async function serveViteMiddleware(request, response, vite) {
|
|
3101
3235
|
await new Promise((resolve, reject) => {
|
|
3102
3236
|
let settled = false;
|
|
3103
3237
|
const finish = () => {
|
|
@@ -3107,7 +3241,7 @@ async function serveViteMiddleware(request$1, response, vite) {
|
|
|
3107
3241
|
}
|
|
3108
3242
|
};
|
|
3109
3243
|
response.once("finish", finish);
|
|
3110
|
-
vite.middlewares(request
|
|
3244
|
+
vite.middlewares(request, response, (error) => {
|
|
3111
3245
|
response.off("finish", finish);
|
|
3112
3246
|
if (settled) return;
|
|
3113
3247
|
settled = true;
|
|
@@ -3115,10 +3249,6 @@ async function serveViteMiddleware(request$1, response, vite) {
|
|
|
3115
3249
|
reject(error instanceof Error ? error : new Error(String(error)));
|
|
3116
3250
|
return;
|
|
3117
3251
|
}
|
|
3118
|
-
if (!response.writableEnded) {
|
|
3119
|
-
response.writeHead(404);
|
|
3120
|
-
response.end("Not found");
|
|
3121
|
-
}
|
|
3122
3252
|
resolve();
|
|
3123
3253
|
});
|
|
3124
3254
|
});
|
|
@@ -3178,7 +3308,7 @@ function resolveResuxViteAssetUrl(pathname) {
|
|
|
3178
3308
|
return null;
|
|
3179
3309
|
}
|
|
3180
3310
|
function isViteInternalRequest(pathname) {
|
|
3181
|
-
return pathname === "/runtime-client.mjs" || pathname.startsWith("/@") || pathname.startsWith("/node_modules/.vite/");
|
|
3311
|
+
return pathname === "/runtime-client.mjs" || pathname.startsWith("/@") || pathname.startsWith("/node_modules/.vite/") || pathname.startsWith("/assets/_fonts/") || pathname.includes("/_fonts/");
|
|
3182
3312
|
}
|
|
3183
3313
|
async function importManifest(outDir, dev = false) {
|
|
3184
3314
|
const file = !dev && await exists(path.join(outDir, "server-bundle", "index.mjs")) ? path.join(outDir, "server-bundle", "index.mjs") : path.join(outDir, "server", "manifest.mjs");
|
|
@@ -3203,7 +3333,6 @@ async function exists(file) {
|
|
|
3203
3333
|
return false;
|
|
3204
3334
|
}
|
|
3205
3335
|
}
|
|
3336
|
+
export { AsyncResuxRenderer, abortNavigation, clearError, computed, createError, createResuxNodeHandler, createServerSetupContext, defineClientEnhancement, defineClientOnlyPackage, defineComponent, defineEventHandler, defineLazyPackage, definePackageAdapter, defineResuxConfig, defineResuxModule, defineResuxPlugin, defineResuxRouteMiddleware, defineServerMiddleware, disposeClientEnhancements, evaluateExpression, eventHandler, getClientEnhancement, getClientRuntimeBootPlan, getClientRuntimeSource, getQuery, hasClientEnhancement, isReactive, isReadonly, isRef, navigateTo, nextTick, parseUserAgent, reactive, readBody, readonly, ref, renderApp, renderAppAsync, renderClientPatches, renderDocument, renderDocumentAsync, renderTemplateNodesAsync, runResuxCli, scanClientEnhancements, setHeader, shouldLoadClientRuntime, showError, toRef, toRefs, unref, useClientEnhancement, useClientPackage, useDevice, useError, useLazyPackage, usePackageReady, useResuxApp, useResuxImage, useRoute, useRouter, useRuntimeConfig, useViewTransition, watch, watchEffect };
|
|
3206
3337
|
|
|
3207
|
-
//#endregion
|
|
3208
|
-
export { AsyncResuxRenderer, abortNavigation, clearError, computed, createError, createResuxNodeHandler, createServerSetupContext, defineClientEnhancement, defineClientOnlyPackage, defineComponent, defineEventHandler, defineLazyPackage, definePackageAdapter, defineResuxConfig, defineResuxModule, defineResuxPlugin, defineResuxRouteMiddleware, defineServerMiddleware, disposeClientEnhancements, evaluateExpression, eventHandler, getClientEnhancement, getClientRuntimeBootPlan, getClientRuntimeSource, getQuery, hasClientEnhancement, isReactive, isReadonly, isRef, navigateTo, nextTick, parseUserAgent, reactive, readBody, readonly, ref, renderApp, renderAppAsync, renderClientPatches, renderDocument, renderTemplateNodesAsync, runResuxCli, scanClientEnhancements, setHeader, shouldLoadClientRuntime, showError, toRef, toRefs, unref, useClientEnhancement, useClientPackage, useDevice, useError, useLazyPackage, usePackageReady, useResuxApp, useResuxImage, useRoute, useRouter, useRuntimeConfig, watch, watchEffect };
|
|
3209
3338
|
//# sourceMappingURL=cli.js.map
|