@ecopages/core 0.2.0-alpha.23 → 0.2.0-alpha.24
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/package.json +93 -226
- package/src/adapters/abstract/application-adapter.test.ts +172 -0
- package/src/adapters/abstract/application-adapter.ts +379 -0
- package/src/adapters/abstract/router-adapter.ts +30 -0
- package/src/adapters/abstract/server-adapter.ts +79 -0
- package/src/adapters/bun/client-bridge.ts +62 -0
- package/src/adapters/bun/create-app.ts +180 -0
- package/src/adapters/bun/hmr-manager.test.ts +267 -0
- package/src/adapters/bun/hmr-manager.ts +406 -0
- package/src/adapters/bun/index.ts +2 -0
- package/src/adapters/bun/server-adapter.ts +500 -0
- package/src/adapters/bun/server-lifecycle.ts +124 -0
- package/src/adapters/create-app.test.ts +10 -0
- package/src/adapters/create-app.ts +91 -0
- package/src/adapters/index.ts +2 -0
- package/src/adapters/node/create-app.test.ts +53 -0
- package/src/adapters/node/create-app.ts +183 -0
- package/src/adapters/node/node-client-bridge.test.ts +198 -0
- package/src/adapters/node/node-client-bridge.ts +79 -0
- package/src/adapters/node/node-hmr-manager.test.ts +322 -0
- package/src/adapters/node/node-hmr-manager.ts +378 -0
- package/src/adapters/node/server-adapter.ts +502 -0
- package/src/adapters/node/static-content-server.test.ts +60 -0
- package/src/adapters/node/static-content-server.ts +239 -0
- package/src/adapters/shared/api-response.test.ts +97 -0
- package/src/adapters/shared/api-response.ts +104 -0
- package/src/adapters/shared/application-adapter.ts +199 -0
- package/src/adapters/shared/define-api-handler.ts +66 -0
- package/src/adapters/shared/explicit-static-route-matcher.test.ts +381 -0
- package/src/adapters/shared/explicit-static-route-matcher.ts +140 -0
- package/src/adapters/shared/file-route-middleware-pipeline.test.ts +90 -0
- package/src/adapters/shared/file-route-middleware-pipeline.ts +127 -0
- package/src/adapters/shared/fs-server-response-factory.test.ts +187 -0
- package/src/adapters/shared/fs-server-response-factory.ts +118 -0
- package/src/adapters/shared/fs-server-response-matcher.test.ts +285 -0
- package/src/adapters/shared/fs-server-response-matcher.ts +189 -0
- package/src/adapters/shared/hmr-entrypoint-registrar.ts +149 -0
- package/src/adapters/shared/hmr-html-response.ts +52 -0
- package/src/adapters/shared/hmr-manager.contract.test.ts +232 -0
- package/src/adapters/shared/hmr-manager.dispatch.test.ts +220 -0
- package/src/adapters/shared/render-context.test.ts +150 -0
- package/src/adapters/shared/render-context.ts +123 -0
- package/src/adapters/shared/runtime-bootstrap.ts +79 -0
- package/src/adapters/shared/server-adapter.test.ts +77 -0
- package/src/adapters/shared/server-adapter.ts +493 -0
- package/src/adapters/shared/server-route-handler.test.ts +110 -0
- package/src/adapters/shared/server-route-handler.ts +153 -0
- package/src/adapters/shared/server-static-builder.test.ts +338 -0
- package/src/adapters/shared/server-static-builder.ts +170 -0
- package/src/build/build-adapter-serialization.test.ts +281 -0
- package/src/build/build-adapter.test.ts +1240 -0
- package/src/build/build-adapter.ts +1012 -0
- package/src/build/build-manifest.ts +54 -0
- package/src/build/build-types.ts +83 -0
- package/src/build/dev-build-coordinator.ts +220 -0
- package/src/build/esbuild-build-adapter.ts +660 -0
- package/src/build/runtime-build-executor.test.ts +81 -0
- package/src/build/runtime-build-executor.ts +40 -0
- package/src/build/runtime-specifier-alias-plugin.test.ts +67 -0
- package/src/build/runtime-specifier-alias-plugin.ts +62 -0
- package/src/build/runtime-specifier-aliases.ts +135 -0
- package/src/config/config-builder.test.ts +443 -0
- package/src/config/config-builder.ts +742 -0
- package/src/config/config-builder.typecheck.test.ts +96 -0
- package/src/config/{constants.d.ts → constants.ts} +22 -13
- package/src/dev/sc-server.ts +143 -0
- package/src/eco/eco.browser.test.ts +43 -0
- package/src/eco/eco.browser.ts +118 -0
- package/src/eco/eco.test.ts +654 -0
- package/src/eco/eco.ts +205 -0
- package/src/eco/eco.types.ts +221 -0
- package/src/eco/eco.utils.test.ts +219 -0
- package/src/eco/eco.utils.ts +5 -0
- package/src/eco/global-injector-map.test.ts +42 -0
- package/src/eco/global-injector-map.ts +112 -0
- package/src/eco/lazy-injector-map.test.ts +66 -0
- package/src/eco/lazy-injector-map.ts +120 -0
- package/src/eco/module-dependencies.test.ts +30 -0
- package/src/eco/module-dependencies.ts +75 -0
- package/src/errors/http-error.test.ts +134 -0
- package/src/errors/http-error.ts +72 -0
- package/src/errors/{index.d.ts → index.ts} +2 -2
- package/src/errors/locals-access-error.ts +7 -0
- package/src/global/app-logger.ts +4 -0
- package/src/global/utils.test.ts +12 -0
- package/src/hmr/client/__screenshots__/hmr-runtime.test.browser.ts/HMR-Runtime-HMR-Server-Integration-should-have-HMR-script-injected-in-page-1.png +0 -0
- package/src/hmr/client/__screenshots__/hmr-runtime.test.browser.ts/HMR-Runtime-HMR-Server-Integration-should-load-fixture-app-page-1.png +0 -0
- package/src/hmr/client/__screenshots__/hmr-runtime.test.browser.ts/HMR-Runtime-WebSocket-Connection-should-connect-to-correct-HMR-endpoint-1.png +0 -0
- package/src/hmr/client/hmr-runtime.ts +160 -0
- package/src/hmr/hmr-strategy.test.ts +124 -0
- package/src/hmr/hmr-strategy.ts +177 -0
- package/src/hmr/hmr.postcss.test.e2e.ts +41 -0
- package/src/hmr/hmr.test.e2e.ts +66 -0
- package/src/hmr/strategies/default-hmr-strategy.ts +60 -0
- package/src/hmr/strategies/js-hmr-strategy.test.ts +335 -0
- package/src/hmr/strategies/js-hmr-strategy.ts +320 -0
- package/src/index.browser.ts +3 -0
- package/src/index.ts +15 -0
- package/src/integrations/ghtml/ghtml-renderer.test.ts +253 -0
- package/src/integrations/ghtml/ghtml-renderer.ts +97 -0
- package/src/integrations/ghtml/ghtml.constants.ts +1 -0
- package/src/integrations/ghtml/ghtml.plugin.ts +28 -0
- package/src/plugins/alias-resolver-plugin.test.ts +41 -0
- package/src/plugins/alias-resolver-plugin.ts +63 -0
- package/src/plugins/eco-component-meta-plugin.test.ts +406 -0
- package/src/plugins/eco-component-meta-plugin.ts +495 -0
- package/src/plugins/foreign-jsx-override-plugin.test.ts +65 -0
- package/src/plugins/foreign-jsx-override-plugin.ts +67 -0
- package/src/plugins/integration-plugin.test.ts +156 -0
- package/src/plugins/integration-plugin.ts +311 -0
- package/src/plugins/processor.test.ts +148 -0
- package/src/plugins/processor.ts +240 -0
- package/src/plugins/{runtime-capability.d.ts → runtime-capability.ts} +8 -3
- package/src/plugins/source-transform.test.ts +82 -0
- package/src/plugins/source-transform.ts +123 -0
- package/src/route-renderer/orchestration/boundary-planning.service.ts +146 -0
- package/src/route-renderer/orchestration/component-render-context.ts +318 -0
- package/src/route-renderer/orchestration/integration-renderer.test.ts +2088 -0
- package/src/route-renderer/orchestration/integration-renderer.ts +1285 -0
- package/src/route-renderer/orchestration/page-packaging.service.test.ts +76 -0
- package/src/route-renderer/orchestration/page-packaging.service.ts +85 -0
- package/src/route-renderer/orchestration/processed-asset-dedupe.ts +25 -0
- package/src/route-renderer/orchestration/queued-boundary-runtime.service.test.ts +319 -0
- package/src/route-renderer/orchestration/queued-boundary-runtime.service.ts +289 -0
- package/src/route-renderer/orchestration/render-execution.service.test.ts +196 -0
- package/src/route-renderer/orchestration/render-execution.service.ts +182 -0
- package/src/route-renderer/orchestration/render-output.utils.ts +302 -0
- package/src/route-renderer/orchestration/render-preparation.service.test.ts +569 -0
- package/src/route-renderer/orchestration/render-preparation.service.ts +508 -0
- package/src/route-renderer/orchestration/route-shell-composer.service.ts +162 -0
- package/src/route-renderer/orchestration/template-serialization.test.ts +110 -0
- package/src/route-renderer/orchestration/template-serialization.ts +117 -0
- package/src/route-renderer/page-loading/component-dependency-collection.ts +196 -0
- package/src/route-renderer/page-loading/declared-asset-collection.ts +156 -0
- package/src/route-renderer/page-loading/dependency-resolver.test.ts +665 -0
- package/src/route-renderer/page-loading/dependency-resolver.ts +150 -0
- package/src/route-renderer/page-loading/ecopages-virtual-imports.ts +75 -0
- package/src/route-renderer/page-loading/lazy-entry-collection.ts +167 -0
- package/src/route-renderer/page-loading/lazy-trigger-planning.ts +74 -0
- package/src/route-renderer/page-loading/module-declaration-aggregation.ts +60 -0
- package/src/route-renderer/page-loading/module-declaration-scripts.ts +16 -0
- package/src/route-renderer/page-loading/page-dependency-bundling.ts +205 -0
- package/src/route-renderer/page-loading/page-module-loader.test.ts +183 -0
- package/src/route-renderer/page-loading/page-module-loader.ts +184 -0
- package/src/route-renderer/route-renderer.ts +136 -0
- package/src/router/client/link-intent.test.browser.ts +51 -0
- package/src/router/client/link-intent.ts +92 -0
- package/src/router/client/navigation-coordinator.test.ts +237 -0
- package/src/router/client/navigation-coordinator.ts +453 -0
- package/src/router/server/fs-router-scanner.test.ts +83 -0
- package/src/router/server/fs-router-scanner.ts +224 -0
- package/src/router/server/fs-router.test.ts +214 -0
- package/src/router/server/fs-router.ts +122 -0
- package/src/services/assets/asset-processing-service/asset-dependency-keys.ts +66 -0
- package/src/services/assets/asset-processing-service/asset-processing.service.test.ts +476 -0
- package/src/services/assets/asset-processing-service/asset-processing.service.ts +345 -0
- package/src/services/assets/asset-processing-service/asset.factory.test.ts +63 -0
- package/src/services/assets/asset-processing-service/asset.factory.ts +105 -0
- package/src/services/assets/asset-processing-service/assets.types.ts +125 -0
- package/src/services/assets/asset-processing-service/browser-runtime-asset.factory.test.ts +74 -0
- package/src/services/assets/asset-processing-service/browser-runtime-asset.factory.ts +96 -0
- package/src/services/assets/asset-processing-service/browser-runtime-entry.factory.test.ts +67 -0
- package/src/services/assets/asset-processing-service/browser-runtime-entry.factory.ts +78 -0
- package/src/services/assets/asset-processing-service/grouped-content-bundles.ts +104 -0
- package/src/services/assets/asset-processing-service/index.ts +5 -0
- package/src/services/assets/asset-processing-service/{processor.interface.d.ts → processor.interface.ts} +10 -5
- package/src/services/assets/asset-processing-service/processor.registry.ts +18 -0
- package/src/services/assets/asset-processing-service/processors/base/base-processor.test.ts +59 -0
- package/src/services/assets/asset-processing-service/processors/base/base-processor.ts +83 -0
- package/src/services/assets/asset-processing-service/processors/base/base-script-processor.ts +174 -0
- package/src/services/assets/asset-processing-service/processors/index.ts +5 -0
- package/src/services/assets/asset-processing-service/processors/script/content-script.processor.test.ts +192 -0
- package/src/services/assets/asset-processing-service/processors/script/content-script.processor.ts +134 -0
- package/src/services/assets/asset-processing-service/processors/script/file-script.processor.test.ts +326 -0
- package/src/services/assets/asset-processing-service/processors/script/file-script.processor.ts +110 -0
- package/src/services/assets/asset-processing-service/processors/script/node-module-script.processor.test.ts +227 -0
- package/src/services/assets/asset-processing-service/processors/script/node-module-script.processor.ts +87 -0
- package/src/services/assets/asset-processing-service/processors/stylesheet/content-stylesheet.processor.test.ts +261 -0
- package/src/services/assets/asset-processing-service/processors/stylesheet/content-stylesheet.processor.ts +71 -0
- package/src/services/assets/asset-processing-service/processors/stylesheet/file-stylesheet.processor.ts +81 -0
- package/src/services/assets/asset-processing-service/ungrouped-dependency-processing.ts +65 -0
- package/src/services/assets/browser-bundle.service.test.ts +66 -0
- package/src/services/assets/browser-bundle.service.ts +109 -0
- package/src/services/cache/cache.types.ts +126 -0
- package/src/services/cache/index.ts +18 -0
- package/src/services/cache/memory-cache-store.test.ts +225 -0
- package/src/services/cache/memory-cache-store.ts +130 -0
- package/src/services/cache/page-cache-service.test.ts +175 -0
- package/src/services/cache/page-cache-service.ts +202 -0
- package/src/services/cache/page-request-cache-coordinator.service.test.ts +79 -0
- package/src/services/cache/page-request-cache-coordinator.service.ts +131 -0
- package/src/services/html/html-rewriter-provider.service.test.ts +183 -0
- package/src/services/html/html-rewriter-provider.service.ts +104 -0
- package/src/services/html/html-transformer.service.test.ts +479 -0
- package/src/services/html/html-transformer.service.ts +275 -0
- package/src/services/invalidation/development-invalidation.service.test.ts +87 -0
- package/src/services/invalidation/development-invalidation.service.ts +262 -0
- package/src/services/module-loading/app-module-loader.service.ts +9 -0
- package/src/services/module-loading/app-server-module-transpiler.service.test.ts +130 -0
- package/src/services/module-loading/app-server-module-transpiler.service.ts +143 -0
- package/src/services/module-loading/host-module-loader-registry.ts +15 -0
- package/src/services/module-loading/{module-loading-types.d.ts → module-loading-types.ts} +1 -0
- package/src/services/module-loading/node-bootstrap-plugin.test.ts +335 -0
- package/src/services/module-loading/node-bootstrap-plugin.ts +297 -0
- package/src/services/module-loading/page-module-import.service.test.ts +504 -0
- package/src/services/module-loading/page-module-import.service.ts +252 -0
- package/src/services/module-loading/server-module-transpiler.service.test.ts +243 -0
- package/src/services/module-loading/server-module-transpiler.service.ts +104 -0
- package/src/services/module-loading/source-module-support.ts +19 -0
- package/src/services/runtime-state/dev-graph.service.ts +217 -0
- package/src/services/runtime-state/entrypoint-dependency-graph.service.ts +136 -0
- package/src/services/runtime-state/runtime-specifier-registry.service.ts +96 -0
- package/src/services/runtime-state/server-invalidation-state.service.ts +68 -0
- package/src/services/validation/schema-validation-service.test.ts +223 -0
- package/src/services/validation/schema-validation-service.ts +204 -0
- package/src/services/validation/{standard-schema.types.d.ts → standard-schema.types.ts} +20 -17
- package/src/static-site-generator/static-site-generator.test.ts +316 -0
- package/src/static-site-generator/static-site-generator.ts +462 -0
- package/src/types/internal-types.ts +242 -0
- package/src/types/public-types.ts +1443 -0
- package/src/utils/deep-merge.test.ts +114 -0
- package/src/utils/deep-merge.ts +47 -0
- package/src/utils/hash.ts +5 -0
- package/src/utils/html-escaping.ts +9 -0
- package/src/utils/invariant.test.ts +22 -0
- package/src/utils/invariant.ts +15 -0
- package/src/utils/locals-utils.ts +37 -0
- package/src/utils/parse-cli-args.test.ts +69 -0
- package/src/utils/parse-cli-args.ts +105 -0
- package/src/utils/path-utils.module.ts +14 -0
- package/src/utils/path-utils.test.ts +15 -0
- package/src/utils/resolve-work-dir.ts +45 -0
- package/src/utils/runtime.ts +44 -0
- package/src/utils/server-utils.module.ts +67 -0
- package/src/utils/server-utils.test.ts +38 -0
- package/src/watchers/project-watcher.integration.test.ts +337 -0
- package/src/watchers/project-watcher.test-helpers.ts +41 -0
- package/src/watchers/project-watcher.test.ts +768 -0
- package/src/watchers/project-watcher.ts +357 -0
- package/CHANGELOG.md +0 -51
- package/src/adapters/abstract/application-adapter.d.ts +0 -194
- package/src/adapters/abstract/application-adapter.js +0 -121
- package/src/adapters/abstract/router-adapter.d.ts +0 -26
- package/src/adapters/abstract/router-adapter.js +0 -5
- package/src/adapters/abstract/server-adapter.d.ts +0 -69
- package/src/adapters/abstract/server-adapter.js +0 -15
- package/src/adapters/bun/client-bridge.d.ts +0 -34
- package/src/adapters/bun/client-bridge.js +0 -48
- package/src/adapters/bun/create-app.d.ts +0 -52
- package/src/adapters/bun/create-app.js +0 -116
- package/src/adapters/bun/hmr-manager.d.ts +0 -143
- package/src/adapters/bun/hmr-manager.js +0 -333
- package/src/adapters/bun/index.d.ts +0 -2
- package/src/adapters/bun/index.js +0 -8
- package/src/adapters/bun/server-adapter.d.ts +0 -155
- package/src/adapters/bun/server-adapter.js +0 -374
- package/src/adapters/bun/server-lifecycle.d.ts +0 -63
- package/src/adapters/bun/server-lifecycle.js +0 -92
- package/src/adapters/create-app.d.ts +0 -20
- package/src/adapters/create-app.js +0 -66
- package/src/adapters/index.d.ts +0 -2
- package/src/adapters/index.js +0 -8
- package/src/adapters/node/create-app.d.ts +0 -18
- package/src/adapters/node/create-app.js +0 -149
- package/src/adapters/node/node-client-bridge.d.ts +0 -26
- package/src/adapters/node/node-client-bridge.js +0 -66
- package/src/adapters/node/node-hmr-manager.d.ts +0 -133
- package/src/adapters/node/node-hmr-manager.js +0 -311
- package/src/adapters/node/server-adapter.d.ts +0 -161
- package/src/adapters/node/server-adapter.js +0 -359
- package/src/adapters/node/static-content-server.d.ts +0 -60
- package/src/adapters/node/static-content-server.js +0 -194
- package/src/adapters/shared/api-response.d.ts +0 -52
- package/src/adapters/shared/api-response.js +0 -96
- package/src/adapters/shared/application-adapter.d.ts +0 -18
- package/src/adapters/shared/application-adapter.js +0 -90
- package/src/adapters/shared/define-api-handler.d.ts +0 -25
- package/src/adapters/shared/define-api-handler.js +0 -15
- package/src/adapters/shared/explicit-static-route-matcher.d.ts +0 -38
- package/src/adapters/shared/explicit-static-route-matcher.js +0 -103
- package/src/adapters/shared/file-route-middleware-pipeline.d.ts +0 -65
- package/src/adapters/shared/file-route-middleware-pipeline.js +0 -99
- package/src/adapters/shared/fs-server-response-factory.d.ts +0 -19
- package/src/adapters/shared/fs-server-response-factory.js +0 -97
- package/src/adapters/shared/fs-server-response-matcher.d.ts +0 -67
- package/src/adapters/shared/fs-server-response-matcher.js +0 -147
- package/src/adapters/shared/hmr-entrypoint-registrar.d.ts +0 -55
- package/src/adapters/shared/hmr-entrypoint-registrar.js +0 -87
- package/src/adapters/shared/hmr-html-response.d.ts +0 -22
- package/src/adapters/shared/hmr-html-response.js +0 -32
- package/src/adapters/shared/render-context.d.ts +0 -15
- package/src/adapters/shared/render-context.js +0 -72
- package/src/adapters/shared/runtime-bootstrap.d.ts +0 -38
- package/src/adapters/shared/runtime-bootstrap.js +0 -43
- package/src/adapters/shared/server-adapter.d.ts +0 -97
- package/src/adapters/shared/server-adapter.js +0 -390
- package/src/adapters/shared/server-route-handler.d.ts +0 -89
- package/src/adapters/shared/server-route-handler.js +0 -111
- package/src/adapters/shared/server-static-builder.d.ts +0 -70
- package/src/adapters/shared/server-static-builder.js +0 -100
- package/src/build/build-adapter.d.ts +0 -239
- package/src/build/build-adapter.js +0 -642
- package/src/build/build-manifest.d.ts +0 -27
- package/src/build/build-manifest.js +0 -30
- package/src/build/build-types.d.ts +0 -57
- package/src/build/build-types.js +0 -0
- package/src/build/dev-build-coordinator.d.ts +0 -72
- package/src/build/dev-build-coordinator.js +0 -154
- package/src/build/esbuild-build-adapter.d.ts +0 -78
- package/src/build/esbuild-build-adapter.js +0 -505
- package/src/build/runtime-build-executor.d.ts +0 -14
- package/src/build/runtime-build-executor.js +0 -22
- package/src/build/runtime-specifier-alias-plugin.d.ts +0 -15
- package/src/build/runtime-specifier-alias-plugin.js +0 -35
- package/src/build/runtime-specifier-aliases.d.ts +0 -5
- package/src/build/runtime-specifier-aliases.js +0 -95
- package/src/config/config-builder.d.ts +0 -252
- package/src/config/config-builder.js +0 -603
- package/src/config/constants.js +0 -25
- package/src/dev/sc-server.d.ts +0 -30
- package/src/dev/sc-server.js +0 -111
- package/src/eco/eco.browser.d.ts +0 -2
- package/src/eco/eco.browser.js +0 -83
- package/src/eco/eco.d.ts +0 -9
- package/src/eco/eco.js +0 -85
- package/src/eco/eco.types.d.ts +0 -178
- package/src/eco/eco.types.js +0 -0
- package/src/eco/eco.utils.d.ts +0 -1
- package/src/eco/eco.utils.js +0 -10
- package/src/eco/global-injector-map.d.ts +0 -16
- package/src/eco/global-injector-map.js +0 -80
- package/src/eco/lazy-injector-map.d.ts +0 -8
- package/src/eco/lazy-injector-map.js +0 -70
- package/src/eco/module-dependencies.d.ts +0 -18
- package/src/eco/module-dependencies.js +0 -49
- package/src/errors/http-error.d.ts +0 -31
- package/src/errors/http-error.js +0 -50
- package/src/errors/index.js +0 -4
- package/src/errors/locals-access-error.d.ts +0 -4
- package/src/errors/locals-access-error.js +0 -9
- package/src/global/app-logger.d.ts +0 -2
- package/src/global/app-logger.js +0 -6
- package/src/hmr/client/hmr-runtime.d.ts +0 -5
- package/src/hmr/client/hmr-runtime.js +0 -109
- package/src/hmr/hmr-strategy.d.ts +0 -162
- package/src/hmr/hmr-strategy.js +0 -44
- package/src/hmr/hmr.postcss.test.e2e.d.ts +0 -1
- package/src/hmr/hmr.postcss.test.e2e.js +0 -31
- package/src/hmr/hmr.test.e2e.d.ts +0 -1
- package/src/hmr/hmr.test.e2e.js +0 -43
- package/src/hmr/strategies/default-hmr-strategy.d.ts +0 -43
- package/src/hmr/strategies/default-hmr-strategy.js +0 -34
- package/src/hmr/strategies/js-hmr-strategy.d.ts +0 -139
- package/src/hmr/strategies/js-hmr-strategy.js +0 -178
- package/src/index.browser.d.ts +0 -3
- package/src/index.browser.js +0 -4
- package/src/index.d.ts +0 -6
- package/src/index.js +0 -21
- package/src/integrations/ghtml/ghtml-renderer.d.ts +0 -20
- package/src/integrations/ghtml/ghtml-renderer.js +0 -63
- package/src/integrations/ghtml/ghtml.constants.d.ts +0 -1
- package/src/integrations/ghtml/ghtml.constants.js +0 -4
- package/src/integrations/ghtml/ghtml.plugin.d.ts +0 -16
- package/src/integrations/ghtml/ghtml.plugin.js +0 -20
- package/src/plugins/alias-resolver-plugin.d.ts +0 -2
- package/src/plugins/alias-resolver-plugin.js +0 -53
- package/src/plugins/eco-component-meta-plugin.d.ts +0 -108
- package/src/plugins/eco-component-meta-plugin.js +0 -163
- package/src/plugins/foreign-jsx-override-plugin.d.ts +0 -31
- package/src/plugins/foreign-jsx-override-plugin.js +0 -35
- package/src/plugins/integration-plugin.d.ts +0 -219
- package/src/plugins/integration-plugin.js +0 -196
- package/src/plugins/processor.d.ts +0 -95
- package/src/plugins/processor.js +0 -136
- package/src/plugins/runtime-capability.js +0 -0
- package/src/plugins/source-transform.d.ts +0 -46
- package/src/plugins/source-transform.js +0 -71
- package/src/route-renderer/orchestration/boundary-planning.service.d.ts +0 -25
- package/src/route-renderer/orchestration/boundary-planning.service.js +0 -97
- package/src/route-renderer/orchestration/component-render-context.d.ts +0 -83
- package/src/route-renderer/orchestration/component-render-context.js +0 -147
- package/src/route-renderer/orchestration/integration-renderer.d.ts +0 -554
- package/src/route-renderer/orchestration/integration-renderer.js +0 -957
- package/src/route-renderer/orchestration/queued-boundary-runtime.service.d.ts +0 -89
- package/src/route-renderer/orchestration/queued-boundary-runtime.service.js +0 -155
- package/src/route-renderer/orchestration/render-execution.service.d.ts +0 -43
- package/src/route-renderer/orchestration/render-execution.service.js +0 -106
- package/src/route-renderer/orchestration/render-output.utils.d.ts +0 -46
- package/src/route-renderer/orchestration/render-output.utils.js +0 -65
- package/src/route-renderer/orchestration/render-preparation.service.d.ts +0 -120
- package/src/route-renderer/orchestration/render-preparation.service.js +0 -341
- package/src/route-renderer/orchestration/route-shell-composer.service.d.ts +0 -50
- package/src/route-renderer/orchestration/route-shell-composer.service.js +0 -81
- package/src/route-renderer/orchestration/template-serialization.d.ts +0 -38
- package/src/route-renderer/orchestration/template-serialization.js +0 -45
- package/src/route-renderer/page-loading/dependency-resolver.d.ts +0 -35
- package/src/route-renderer/page-loading/dependency-resolver.js +0 -444
- package/src/route-renderer/page-loading/page-module-loader.d.ts +0 -90
- package/src/route-renderer/page-loading/page-module-loader.js +0 -127
- package/src/route-renderer/route-renderer.d.ts +0 -67
- package/src/route-renderer/route-renderer.js +0 -103
- package/src/router/client/link-intent.js +0 -34
- package/src/router/client/link-intent.test.browser.d.ts +0 -1
- package/src/router/client/link-intent.test.browser.js +0 -43
- package/src/router/client/navigation-coordinator.d.ts +0 -149
- package/src/router/client/navigation-coordinator.js +0 -215
- package/src/router/server/fs-router-scanner.d.ts +0 -41
- package/src/router/server/fs-router-scanner.js +0 -161
- package/src/router/server/fs-router.d.ts +0 -26
- package/src/router/server/fs-router.js +0 -100
- package/src/services/assets/asset-processing-service/asset-processing.service.d.ts +0 -120
- package/src/services/assets/asset-processing-service/asset-processing.service.js +0 -331
- package/src/services/assets/asset-processing-service/asset.factory.d.ts +0 -17
- package/src/services/assets/asset-processing-service/asset.factory.js +0 -82
- package/src/services/assets/asset-processing-service/assets.types.d.ts +0 -89
- package/src/services/assets/asset-processing-service/assets.types.js +0 -0
- package/src/services/assets/asset-processing-service/browser-runtime-asset.factory.d.ts +0 -55
- package/src/services/assets/asset-processing-service/browser-runtime-asset.factory.js +0 -48
- package/src/services/assets/asset-processing-service/browser-runtime-entry.factory.d.ts +0 -20
- package/src/services/assets/asset-processing-service/browser-runtime-entry.factory.js +0 -41
- package/src/services/assets/asset-processing-service/index.d.ts +0 -5
- package/src/services/assets/asset-processing-service/index.js +0 -5
- package/src/services/assets/asset-processing-service/processor.interface.js +0 -6
- package/src/services/assets/asset-processing-service/processor.registry.d.ts +0 -8
- package/src/services/assets/asset-processing-service/processor.registry.js +0 -15
- package/src/services/assets/asset-processing-service/processors/base/base-processor.d.ts +0 -24
- package/src/services/assets/asset-processing-service/processors/base/base-processor.js +0 -64
- package/src/services/assets/asset-processing-service/processors/base/base-script-processor.d.ts +0 -17
- package/src/services/assets/asset-processing-service/processors/base/base-script-processor.js +0 -72
- package/src/services/assets/asset-processing-service/processors/index.d.ts +0 -5
- package/src/services/assets/asset-processing-service/processors/index.js +0 -5
- package/src/services/assets/asset-processing-service/processors/script/content-script.processor.d.ts +0 -5
- package/src/services/assets/asset-processing-service/processors/script/content-script.processor.js +0 -57
- package/src/services/assets/asset-processing-service/processors/script/file-script.processor.d.ts +0 -9
- package/src/services/assets/asset-processing-service/processors/script/file-script.processor.js +0 -88
- package/src/services/assets/asset-processing-service/processors/script/node-module-script.processor.d.ts +0 -7
- package/src/services/assets/asset-processing-service/processors/script/node-module-script.processor.js +0 -75
- package/src/services/assets/asset-processing-service/processors/stylesheet/content-stylesheet.processor.d.ts +0 -5
- package/src/services/assets/asset-processing-service/processors/stylesheet/content-stylesheet.processor.js +0 -25
- package/src/services/assets/asset-processing-service/processors/stylesheet/file-stylesheet.processor.d.ts +0 -9
- package/src/services/assets/asset-processing-service/processors/stylesheet/file-stylesheet.processor.js +0 -66
- package/src/services/assets/browser-bundle.service.d.ts +0 -32
- package/src/services/assets/browser-bundle.service.js +0 -33
- package/src/services/cache/cache.types.d.ts +0 -107
- package/src/services/cache/cache.types.js +0 -0
- package/src/services/cache/index.d.ts +0 -7
- package/src/services/cache/index.js +0 -7
- package/src/services/cache/memory-cache-store.d.ts +0 -42
- package/src/services/cache/memory-cache-store.js +0 -98
- package/src/services/cache/page-cache-service.d.ts +0 -70
- package/src/services/cache/page-cache-service.js +0 -152
- package/src/services/cache/page-request-cache-coordinator.service.d.ts +0 -75
- package/src/services/cache/page-request-cache-coordinator.service.js +0 -109
- package/src/services/html/html-rewriter-provider.service.d.ts +0 -37
- package/src/services/html/html-rewriter-provider.service.js +0 -68
- package/src/services/html/html-transformer.service.d.ts +0 -77
- package/src/services/html/html-transformer.service.js +0 -215
- package/src/services/invalidation/development-invalidation.service.d.ts +0 -74
- package/src/services/invalidation/development-invalidation.service.js +0 -190
- package/src/services/module-loading/app-module-loader.service.d.ts +0 -28
- package/src/services/module-loading/app-module-loader.service.js +0 -35
- package/src/services/module-loading/app-server-module-transpiler.service.d.ts +0 -24
- package/src/services/module-loading/app-server-module-transpiler.service.js +0 -109
- package/src/services/module-loading/host-module-loader-registry.d.ts +0 -4
- package/src/services/module-loading/host-module-loader-registry.js +0 -15
- package/src/services/module-loading/module-loading-types.js +0 -0
- package/src/services/module-loading/node-bootstrap-plugin.d.ts +0 -42
- package/src/services/module-loading/node-bootstrap-plugin.js +0 -204
- package/src/services/module-loading/page-module-import.service.d.ts +0 -76
- package/src/services/module-loading/page-module-import.service.js +0 -173
- package/src/services/module-loading/server-module-transpiler.service.d.ts +0 -72
- package/src/services/module-loading/server-module-transpiler.service.js +0 -64
- package/src/services/runtime-state/dev-graph.service.d.ts +0 -118
- package/src/services/runtime-state/dev-graph.service.js +0 -162
- package/src/services/runtime-state/entrypoint-dependency-graph.service.d.ts +0 -41
- package/src/services/runtime-state/entrypoint-dependency-graph.service.js +0 -85
- package/src/services/runtime-state/runtime-specifier-registry.service.d.ts +0 -69
- package/src/services/runtime-state/runtime-specifier-registry.service.js +0 -37
- package/src/services/runtime-state/server-invalidation-state.service.d.ts +0 -26
- package/src/services/runtime-state/server-invalidation-state.service.js +0 -35
- package/src/services/validation/schema-validation-service.d.ts +0 -122
- package/src/services/validation/schema-validation-service.js +0 -101
- package/src/services/validation/standard-schema.types.js +0 -0
- package/src/static-site-generator/static-site-generator.d.ts +0 -104
- package/src/static-site-generator/static-site-generator.js +0 -338
- package/src/types/internal-types.d.ts +0 -231
- package/src/types/internal-types.js +0 -0
- package/src/types/public-types.d.ts +0 -1219
- package/src/types/public-types.js +0 -0
- package/src/utils/deep-merge.d.ts +0 -14
- package/src/utils/deep-merge.js +0 -32
- package/src/utils/hash.d.ts +0 -1
- package/src/utils/hash.js +0 -7
- package/src/utils/html-escaping.d.ts +0 -7
- package/src/utils/html-escaping.js +0 -6
- package/src/utils/html.js +0 -4
- package/src/utils/invariant.d.ts +0 -5
- package/src/utils/invariant.js +0 -11
- package/src/utils/locals-utils.d.ts +0 -15
- package/src/utils/locals-utils.js +0 -24
- package/src/utils/parse-cli-args.d.ts +0 -27
- package/src/utils/parse-cli-args.js +0 -62
- package/src/utils/path-utils.module.d.ts +0 -5
- package/src/utils/path-utils.module.js +0 -14
- package/src/utils/resolve-work-dir.d.ts +0 -11
- package/src/utils/resolve-work-dir.js +0 -31
- package/src/utils/runtime.d.ts +0 -11
- package/src/utils/runtime.js +0 -40
- package/src/utils/server-utils.module.d.ts +0 -19
- package/src/utils/server-utils.module.js +0 -56
- package/src/watchers/project-watcher.d.ts +0 -136
- package/src/watchers/project-watcher.js +0 -275
- package/src/watchers/project-watcher.test-helpers.d.ts +0 -4
- package/src/watchers/project-watcher.test-helpers.js +0 -52
- /package/src/utils/{html.d.ts → html.ts} +0 -0
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { AssetKind, AssetSource } from './assets.types.js';
|
|
2
|
-
import type { BaseProcessor } from './processors/base/base-processor.js';
|
|
3
|
-
export declare class ProcessorRegistry {
|
|
4
|
-
private processors;
|
|
5
|
-
register(kind: AssetKind, variant: AssetSource, processor: BaseProcessor<any>): void;
|
|
6
|
-
getProcessor(kind: AssetKind, variant: AssetSource): BaseProcessor<any> | undefined;
|
|
7
|
-
getAllProcessors(): Map<`${AssetKind}-${AssetSource}`, BaseProcessor<any>>;
|
|
8
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
class ProcessorRegistry {
|
|
2
|
-
processors = /* @__PURE__ */ new Map();
|
|
3
|
-
register(kind, variant, processor) {
|
|
4
|
-
this.processors.set(`${kind}-${variant}`, processor);
|
|
5
|
-
}
|
|
6
|
-
getProcessor(kind, variant) {
|
|
7
|
-
return this.processors.get(`${kind}-${variant}`);
|
|
8
|
-
}
|
|
9
|
-
getAllProcessors() {
|
|
10
|
-
return this.processors;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export {
|
|
14
|
-
ProcessorRegistry
|
|
15
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { EcoPagesAppConfig } from '../../../../../types/internal-types.js';
|
|
2
|
-
import type { BaseAsset, ProcessedAsset } from '../../assets.types.js';
|
|
3
|
-
export declare abstract class BaseProcessor<T extends BaseAsset> {
|
|
4
|
-
protected appConfig: EcoPagesAppConfig;
|
|
5
|
-
/**
|
|
6
|
-
* Cache for processed assets to avoid reprocessing the same asset multiple times.
|
|
7
|
-
* The cache key is a combination of the asset name and its hash.
|
|
8
|
-
* The cache value is the processed asset.
|
|
9
|
-
*/
|
|
10
|
-
protected cache: Map<string, ProcessedAsset>;
|
|
11
|
-
constructor({ appConfig }: {
|
|
12
|
-
appConfig: EcoPagesAppConfig;
|
|
13
|
-
});
|
|
14
|
-
get isDevelopment(): boolean;
|
|
15
|
-
get isProduction(): boolean;
|
|
16
|
-
abstract process(dep: T): Promise<ProcessedAsset>;
|
|
17
|
-
protected getAssetsDir(): string;
|
|
18
|
-
protected writeCacheFile(key: string, path: ProcessedAsset): void;
|
|
19
|
-
protected getCacheFile(key: string): ProcessedAsset | undefined;
|
|
20
|
-
protected hasCacheFile(key: string): boolean;
|
|
21
|
-
protected generateHash(content: string): string;
|
|
22
|
-
protected buildCacheKey(identifier: string, contentHash: string, dep: T): string;
|
|
23
|
-
protected getOrProcess(cacheKey: string, processFn: () => ProcessedAsset | Promise<ProcessedAsset>): Promise<ProcessedAsset>;
|
|
24
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import { RESOLVED_ASSETS_DIR } from "../../../../../config/constants.js";
|
|
3
|
-
import { rapidhash } from "../../../../../utils/hash.js";
|
|
4
|
-
import { isDevelopmentRuntime, isProductionRuntime } from "../../../../../utils/runtime.js";
|
|
5
|
-
import { fileSystem } from "@ecopages/file-system";
|
|
6
|
-
class BaseProcessor {
|
|
7
|
-
appConfig;
|
|
8
|
-
/**
|
|
9
|
-
* Cache for processed assets to avoid reprocessing the same asset multiple times.
|
|
10
|
-
* The cache key is a combination of the asset name and its hash.
|
|
11
|
-
* The cache value is the processed asset.
|
|
12
|
-
*/
|
|
13
|
-
cache = /* @__PURE__ */ new Map();
|
|
14
|
-
constructor({ appConfig }) {
|
|
15
|
-
this.appConfig = appConfig;
|
|
16
|
-
}
|
|
17
|
-
get isDevelopment() {
|
|
18
|
-
return isDevelopmentRuntime();
|
|
19
|
-
}
|
|
20
|
-
get isProduction() {
|
|
21
|
-
return isProductionRuntime();
|
|
22
|
-
}
|
|
23
|
-
getAssetsDir() {
|
|
24
|
-
return path.join(this.appConfig.absolutePaths.distDir, RESOLVED_ASSETS_DIR);
|
|
25
|
-
}
|
|
26
|
-
writeCacheFile(key, path2) {
|
|
27
|
-
this.cache.set(key, path2);
|
|
28
|
-
}
|
|
29
|
-
getCacheFile(key) {
|
|
30
|
-
return this.cache.get(key);
|
|
31
|
-
}
|
|
32
|
-
hasCacheFile(key) {
|
|
33
|
-
return this.cache.has(key);
|
|
34
|
-
}
|
|
35
|
-
generateHash(content) {
|
|
36
|
-
return rapidhash(content).toString();
|
|
37
|
-
}
|
|
38
|
-
buildCacheKey(identifier, contentHash, dep) {
|
|
39
|
-
const attrsHash = dep.attributes ? this.generateHash(JSON.stringify(dep.attributes)) : "";
|
|
40
|
-
const position = dep.position ?? "";
|
|
41
|
-
return `${identifier}:${contentHash}:${position}:${attrsHash}`;
|
|
42
|
-
}
|
|
43
|
-
getOrProcess(cacheKey, processFn) {
|
|
44
|
-
if (this.hasCacheFile(cacheKey)) {
|
|
45
|
-
const cached = this.getCacheFile(cacheKey);
|
|
46
|
-
if (!cached.filepath || fileSystem.exists(cached.filepath)) {
|
|
47
|
-
return Promise.resolve(cached);
|
|
48
|
-
}
|
|
49
|
-
this.cache.delete(cacheKey);
|
|
50
|
-
}
|
|
51
|
-
const result = processFn();
|
|
52
|
-
if (result instanceof Promise) {
|
|
53
|
-
return result.then((asset) => {
|
|
54
|
-
this.writeCacheFile(cacheKey, asset);
|
|
55
|
-
return asset;
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
this.writeCacheFile(cacheKey, result);
|
|
59
|
-
return Promise.resolve(result);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
export {
|
|
63
|
-
BaseProcessor
|
|
64
|
-
};
|
package/src/services/assets/asset-processing-service/processors/base/base-script-processor.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { EcoPagesAppConfig } from '../../../../../types/internal-types.js';
|
|
2
|
-
import type { EcoBuildPlugin } from '../../../../../build/build-types.js';
|
|
3
|
-
import type { ScriptAsset } from '../../assets.types.js';
|
|
4
|
-
import { BaseProcessor } from './base-processor.js';
|
|
5
|
-
export declare abstract class BaseScriptProcessor<T extends ScriptAsset> extends BaseProcessor<T> {
|
|
6
|
-
private readonly browserBundleService;
|
|
7
|
-
constructor({ appConfig }: {
|
|
8
|
-
appConfig: EcoPagesAppConfig;
|
|
9
|
-
});
|
|
10
|
-
protected shouldBundle(dep: T): boolean;
|
|
11
|
-
protected getBundlerOptions(dep: T): Record<string, any>;
|
|
12
|
-
protected collectBuildPlugins(): EcoBuildPlugin[];
|
|
13
|
-
protected bundleScript({ entrypoint, outdir, plugins: additionalPlugins, ...rest }: {
|
|
14
|
-
entrypoint: string;
|
|
15
|
-
outdir: string;
|
|
16
|
-
} & ScriptAsset['bundleOptions']): Promise<string>;
|
|
17
|
-
}
|
package/src/services/assets/asset-processing-service/processors/base/base-script-processor.js
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { appLogger } from "../../../../../global/app-logger.js";
|
|
2
|
-
import { getAppBrowserBuildPlugins } from "../../../../../build/build-adapter.js";
|
|
3
|
-
import { fileSystem } from "@ecopages/file-system";
|
|
4
|
-
import path from "node:path";
|
|
5
|
-
import { BaseProcessor } from "./base-processor.js";
|
|
6
|
-
import { BrowserBundleService } from "../../../browser-bundle.service.js";
|
|
7
|
-
class BaseScriptProcessor extends BaseProcessor {
|
|
8
|
-
browserBundleService;
|
|
9
|
-
constructor({ appConfig }) {
|
|
10
|
-
super({ appConfig });
|
|
11
|
-
this.browserBundleService = new BrowserBundleService(appConfig);
|
|
12
|
-
}
|
|
13
|
-
shouldBundle(dep) {
|
|
14
|
-
return dep.bundle !== false;
|
|
15
|
-
}
|
|
16
|
-
getBundlerOptions(dep) {
|
|
17
|
-
return dep.bundleOptions || {};
|
|
18
|
-
}
|
|
19
|
-
collectBuildPlugins() {
|
|
20
|
-
return getAppBrowserBuildPlugins(this.appConfig);
|
|
21
|
-
}
|
|
22
|
-
async bundleScript({
|
|
23
|
-
entrypoint,
|
|
24
|
-
outdir,
|
|
25
|
-
plugins: additionalPlugins,
|
|
26
|
-
...rest
|
|
27
|
-
}) {
|
|
28
|
-
const buildPlugins = this.collectBuildPlugins();
|
|
29
|
-
const allPlugins = additionalPlugins ? [...additionalPlugins, ...buildPlugins] : buildPlugins;
|
|
30
|
-
const buildResult = await this.browserBundleService.bundle({
|
|
31
|
-
profile: "browser-script",
|
|
32
|
-
entrypoints: [entrypoint],
|
|
33
|
-
outdir,
|
|
34
|
-
root: this.appConfig.rootDir,
|
|
35
|
-
splitting: true,
|
|
36
|
-
naming: "[name]-[hash].[ext]",
|
|
37
|
-
plugins: allPlugins,
|
|
38
|
-
...rest
|
|
39
|
-
});
|
|
40
|
-
if (!buildResult.success) {
|
|
41
|
-
for (const log of buildResult.logs) {
|
|
42
|
-
appLogger.debug(log.message, log);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
const entryBaseName = path.parse(entrypoint).name;
|
|
46
|
-
const entryOutput = buildResult.outputs.map((output) => output.path).find((outputPath) => path.basename(outputPath) === `${entryBaseName}.js`);
|
|
47
|
-
if (entryOutput) {
|
|
48
|
-
return entryOutput;
|
|
49
|
-
}
|
|
50
|
-
const nonVendorOutput = buildResult.outputs.map((output) => output.path).find((outputPath) => !path.basename(outputPath).startsWith("vendors"));
|
|
51
|
-
if (nonVendorOutput) {
|
|
52
|
-
return nonVendorOutput;
|
|
53
|
-
}
|
|
54
|
-
const primaryOutput = buildResult.outputs[0]?.path;
|
|
55
|
-
if (primaryOutput) {
|
|
56
|
-
return primaryOutput;
|
|
57
|
-
}
|
|
58
|
-
const namedFallbackOutput = path.join(outdir, `${entryBaseName}.js`);
|
|
59
|
-
if (fileSystem.exists(namedFallbackOutput)) {
|
|
60
|
-
return namedFallbackOutput;
|
|
61
|
-
}
|
|
62
|
-
const fallbackOutput = path.join(outdir, "entry_0.js");
|
|
63
|
-
if (fileSystem.exists(fallbackOutput)) {
|
|
64
|
-
return fallbackOutput;
|
|
65
|
-
}
|
|
66
|
-
const logMessage = buildResult.logs.map((log) => log.message).join(" | ");
|
|
67
|
-
throw new Error(`No build output generated for ${entrypoint}${logMessage ? `: ${logMessage}` : ""}`);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
export {
|
|
71
|
-
BaseScriptProcessor
|
|
72
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export * from './script/content-script.processor.js';
|
|
2
|
-
export * from './script/file-script.processor.js';
|
|
3
|
-
export * from './script/node-module-script.processor.js';
|
|
4
|
-
export * from './stylesheet/content-stylesheet.processor.js';
|
|
5
|
-
export * from './stylesheet/file-stylesheet.processor.js';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export * from "./script/content-script.processor.js";
|
|
2
|
-
export * from "./script/file-script.processor.js";
|
|
3
|
-
export * from "./script/node-module-script.processor.js";
|
|
4
|
-
export * from "./stylesheet/content-stylesheet.processor.js";
|
|
5
|
-
export * from "./stylesheet/file-stylesheet.processor.js";
|
package/src/services/assets/asset-processing-service/processors/script/content-script.processor.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { ContentScriptAsset, ProcessedAsset } from '../../assets.types.js';
|
|
2
|
-
import { BaseScriptProcessor } from '../base/base-script-processor.js';
|
|
3
|
-
export declare class ContentScriptProcessor extends BaseScriptProcessor<ContentScriptAsset> {
|
|
4
|
-
process(dep: ContentScriptAsset): Promise<ProcessedAsset>;
|
|
5
|
-
}
|
package/src/services/assets/asset-processing-service/processors/script/content-script.processor.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import { fileSystem } from "@ecopages/file-system";
|
|
3
|
-
import { BaseScriptProcessor } from "../base/base-script-processor.js";
|
|
4
|
-
class ContentScriptProcessor extends BaseScriptProcessor {
|
|
5
|
-
async process(dep) {
|
|
6
|
-
const hash = this.generateHash(dep.content);
|
|
7
|
-
const filename = dep.name ? `${dep.name}.js` : `script-${hash}.js`;
|
|
8
|
-
const shouldBundle = this.shouldBundle(dep);
|
|
9
|
-
const filepath = path.join(this.getAssetsDir(), "scripts", filename);
|
|
10
|
-
if (!shouldBundle) {
|
|
11
|
-
if (!dep.inline) fileSystem.write(filepath, dep.content);
|
|
12
|
-
const unbundledProcessedAsset = {
|
|
13
|
-
filepath,
|
|
14
|
-
content: dep.inline ? dep.content : void 0,
|
|
15
|
-
kind: "script",
|
|
16
|
-
position: dep.position,
|
|
17
|
-
attributes: dep.attributes,
|
|
18
|
-
inline: dep.inline,
|
|
19
|
-
excludeFromHtml: dep.excludeFromHtml
|
|
20
|
-
};
|
|
21
|
-
this.writeCacheFile(filename, unbundledProcessedAsset);
|
|
22
|
-
return unbundledProcessedAsset;
|
|
23
|
-
}
|
|
24
|
-
if (dep.content) {
|
|
25
|
-
const tempDir = this.appConfig.absolutePaths.distDir;
|
|
26
|
-
fileSystem.ensureDir(tempDir);
|
|
27
|
-
const tempFileName = path.join(
|
|
28
|
-
tempDir,
|
|
29
|
-
`${path.parse(filename).name}.${process.pid}.${Date.now()}.${Math.random().toString(36).slice(2)}.tmp.js`
|
|
30
|
-
);
|
|
31
|
-
fileSystem.write(tempFileName, dep.content);
|
|
32
|
-
const bundledFilePath = await this.bundleScript({
|
|
33
|
-
entrypoint: tempFileName,
|
|
34
|
-
outdir: this.getAssetsDir(),
|
|
35
|
-
minify: this.isProduction,
|
|
36
|
-
naming: `${path.parse(filename).name}-[hash].[ext]`,
|
|
37
|
-
...this.getBundlerOptions(dep)
|
|
38
|
-
});
|
|
39
|
-
const processedAsset = {
|
|
40
|
-
filepath: bundledFilePath,
|
|
41
|
-
content: dep.inline ? fileSystem.readFileSync(bundledFilePath).toString() : void 0,
|
|
42
|
-
kind: "script",
|
|
43
|
-
position: dep.position,
|
|
44
|
-
attributes: dep.attributes,
|
|
45
|
-
inline: dep.inline,
|
|
46
|
-
excludeFromHtml: dep.excludeFromHtml
|
|
47
|
-
};
|
|
48
|
-
fileSystem.remove(tempFileName);
|
|
49
|
-
this.writeCacheFile(filename, processedAsset);
|
|
50
|
-
return processedAsset;
|
|
51
|
-
}
|
|
52
|
-
throw new Error("No content found for script asset");
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
export {
|
|
56
|
-
ContentScriptProcessor
|
|
57
|
-
};
|
package/src/services/assets/asset-processing-service/processors/script/file-script.processor.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { IHmrManager } from '../../../../../types/internal-types.js';
|
|
2
|
-
import type { FileScriptAsset, ProcessedAsset } from '../../assets.types.js';
|
|
3
|
-
import { BaseScriptProcessor } from '../base/base-script-processor.js';
|
|
4
|
-
export declare class FileScriptProcessor extends BaseScriptProcessor<FileScriptAsset> {
|
|
5
|
-
private hmrManager?;
|
|
6
|
-
private resolveHmrOutputFilepath;
|
|
7
|
-
setHmrManager(hmrManager: IHmrManager): void;
|
|
8
|
-
process(dep: FileScriptAsset): Promise<ProcessedAsset>;
|
|
9
|
-
}
|
package/src/services/assets/asset-processing-service/processors/script/file-script.processor.js
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import { RESOLVED_ASSETS_DIR } from "../../../../../config/constants.js";
|
|
3
|
-
import { fileSystem } from "@ecopages/file-system";
|
|
4
|
-
import { BaseScriptProcessor } from "../base/base-script-processor.js";
|
|
5
|
-
class FileScriptProcessor extends BaseScriptProcessor {
|
|
6
|
-
hmrManager;
|
|
7
|
-
resolveHmrOutputFilepath(entrypointPath) {
|
|
8
|
-
if (!this.hmrManager || !("getDistDir" in this.hmrManager)) {
|
|
9
|
-
return void 0;
|
|
10
|
-
}
|
|
11
|
-
const getDistDir = this.hmrManager.getDistDir;
|
|
12
|
-
if (typeof getDistDir !== "function") {
|
|
13
|
-
return void 0;
|
|
14
|
-
}
|
|
15
|
-
const relativePathJs = path.relative(this.appConfig.absolutePaths.srcDir, entrypointPath).replace(/\.(tsx?|jsx?|mdx?)$/, ".js").replace(/\[([^\]]+)\]/g, "_$1_");
|
|
16
|
-
return path.join(getDistDir.call(this.hmrManager), relativePathJs);
|
|
17
|
-
}
|
|
18
|
-
setHmrManager(hmrManager) {
|
|
19
|
-
this.hmrManager = hmrManager;
|
|
20
|
-
}
|
|
21
|
-
async process(dep) {
|
|
22
|
-
if (this.hmrManager?.isEnabled() && !dep.inline) {
|
|
23
|
-
const outputUrl = await this.hmrManager.registerScriptEntrypoint(dep.filepath);
|
|
24
|
-
const outputFilepath = this.resolveHmrOutputFilepath(dep.filepath);
|
|
25
|
-
return {
|
|
26
|
-
filepath: outputFilepath ?? dep.filepath,
|
|
27
|
-
srcUrl: outputUrl,
|
|
28
|
-
kind: "script",
|
|
29
|
-
position: dep.position,
|
|
30
|
-
attributes: dep.attributes,
|
|
31
|
-
inline: false,
|
|
32
|
-
excludeFromHtml: dep.excludeFromHtml
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
const content = fileSystem.readFileSync(dep.filepath);
|
|
36
|
-
const shouldBundle = this.shouldBundle(dep);
|
|
37
|
-
const configHash = this.generateHash(
|
|
38
|
-
JSON.stringify({
|
|
39
|
-
bundle: shouldBundle,
|
|
40
|
-
minify: shouldBundle && this.isProduction,
|
|
41
|
-
opts: dep.bundleOptions
|
|
42
|
-
})
|
|
43
|
-
);
|
|
44
|
-
const cachekey = `${this.buildCacheKey(dep.filepath, this.generateHash(content), dep)}:${configHash}`;
|
|
45
|
-
return this.getOrProcess(cachekey, async () => {
|
|
46
|
-
if (!shouldBundle) {
|
|
47
|
-
const outFilepath = path.relative(this.appConfig.absolutePaths.srcDir, dep.filepath);
|
|
48
|
-
let filepath;
|
|
49
|
-
if (!dep.inline) {
|
|
50
|
-
filepath = path.join(this.getAssetsDir(), outFilepath);
|
|
51
|
-
fileSystem.copyFile(dep.filepath, filepath);
|
|
52
|
-
}
|
|
53
|
-
return {
|
|
54
|
-
filepath,
|
|
55
|
-
content,
|
|
56
|
-
kind: "script",
|
|
57
|
-
position: dep.position,
|
|
58
|
-
attributes: dep.attributes,
|
|
59
|
-
inline: dep.inline,
|
|
60
|
-
excludeFromHtml: dep.excludeFromHtml
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
const relativeFilepath = path.relative(this.appConfig.absolutePaths.srcDir, dep.filepath);
|
|
64
|
-
const outdirPath = path.join(this.appConfig.absolutePaths.distDir, RESOLVED_ASSETS_DIR, relativeFilepath);
|
|
65
|
-
const outdirDirname = path.dirname(outdirPath);
|
|
66
|
-
const bundlerOptions = this.getBundlerOptions(dep);
|
|
67
|
-
const bundledFilePath = await this.bundleScript({
|
|
68
|
-
entrypoint: dep.filepath,
|
|
69
|
-
outdir: outdirDirname,
|
|
70
|
-
minify: this.isProduction,
|
|
71
|
-
...bundlerOptions,
|
|
72
|
-
plugins: bundlerOptions.plugins
|
|
73
|
-
});
|
|
74
|
-
return {
|
|
75
|
-
filepath: bundledFilePath,
|
|
76
|
-
content: dep.inline ? fileSystem.readFileSync(bundledFilePath).toString() : void 0,
|
|
77
|
-
kind: "script",
|
|
78
|
-
position: dep.position,
|
|
79
|
-
attributes: dep.attributes,
|
|
80
|
-
inline: dep.inline,
|
|
81
|
-
excludeFromHtml: dep.excludeFromHtml
|
|
82
|
-
};
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
export {
|
|
87
|
-
FileScriptProcessor
|
|
88
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { NodeModuleScriptAsset } from '../../assets.types.js';
|
|
2
|
-
import { BaseScriptProcessor } from '../base/base-script-processor.js';
|
|
3
|
-
export declare class NodeModuleScriptProcessor extends BaseScriptProcessor<NodeModuleScriptAsset> {
|
|
4
|
-
process(dep: NodeModuleScriptAsset): Promise<import("../../assets.types.js").ProcessedAsset>;
|
|
5
|
-
private resolveModulePath;
|
|
6
|
-
private resolveModulePathFallback;
|
|
7
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import { fileSystem } from "@ecopages/file-system";
|
|
3
|
-
import { getAppBuildAdapter } from "../../../../../build/build-adapter.js";
|
|
4
|
-
import { BaseScriptProcessor } from "../base/base-script-processor.js";
|
|
5
|
-
class NodeModuleScriptProcessor extends BaseScriptProcessor {
|
|
6
|
-
async process(dep) {
|
|
7
|
-
const modulePath = this.resolveModulePath(dep.importPath, this.appConfig.rootDir);
|
|
8
|
-
const moduleName = path.basename(modulePath);
|
|
9
|
-
const filename = dep.name ?? `nm-${moduleName}`;
|
|
10
|
-
const configHash = this.generateHash(
|
|
11
|
-
JSON.stringify({ inline: dep.inline, minify: !dep.inline && this.isProduction, opts: dep.bundleOptions })
|
|
12
|
-
);
|
|
13
|
-
const cachekey = `${this.buildCacheKey(filename, this.generateHash(modulePath), dep)}:${configHash}`;
|
|
14
|
-
return this.getOrProcess(cachekey, async () => {
|
|
15
|
-
if (dep.inline) {
|
|
16
|
-
const content = fileSystem.readFileAsBuffer(modulePath).toString();
|
|
17
|
-
return {
|
|
18
|
-
content,
|
|
19
|
-
kind: dep.kind,
|
|
20
|
-
position: dep.position,
|
|
21
|
-
attributes: dep.attributes,
|
|
22
|
-
inline: true,
|
|
23
|
-
excludeFromHtml: dep.excludeFromHtml
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
const outdir = path.join(this.getAssetsDir(), "vendors");
|
|
27
|
-
const bundlerOptions = this.getBundlerOptions(dep);
|
|
28
|
-
const filePath = await this.bundleScript({
|
|
29
|
-
entrypoint: modulePath,
|
|
30
|
-
outdir,
|
|
31
|
-
minify: this.isProduction,
|
|
32
|
-
naming: bundlerOptions.naming ?? (dep.name ? `${dep.name}-[hash].[ext]` : "[name]-[hash].[ext]"),
|
|
33
|
-
...bundlerOptions
|
|
34
|
-
});
|
|
35
|
-
return {
|
|
36
|
-
filepath: filePath,
|
|
37
|
-
kind: dep.kind,
|
|
38
|
-
position: dep.position,
|
|
39
|
-
attributes: dep.attributes,
|
|
40
|
-
inline: dep.inline,
|
|
41
|
-
excludeFromHtml: dep.excludeFromHtml
|
|
42
|
-
};
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
resolveModulePath(importPath, rootDir) {
|
|
46
|
-
if (path.isAbsolute(importPath) && fileSystem.exists(importPath)) {
|
|
47
|
-
return importPath;
|
|
48
|
-
}
|
|
49
|
-
try {
|
|
50
|
-
return getAppBuildAdapter(this.appConfig).resolve(importPath, rootDir);
|
|
51
|
-
} catch {
|
|
52
|
-
return this.resolveModulePathFallback(importPath, rootDir);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
resolveModulePathFallback(importPath, rootDir, maxDepth = 5) {
|
|
56
|
-
let currentDir = rootDir;
|
|
57
|
-
let remainingDepth = maxDepth;
|
|
58
|
-
while (remainingDepth >= 0) {
|
|
59
|
-
const modulePath = path.join(currentDir, "node_modules", importPath);
|
|
60
|
-
if (fileSystem.exists(modulePath)) {
|
|
61
|
-
return modulePath;
|
|
62
|
-
}
|
|
63
|
-
const parentDir = path.dirname(currentDir);
|
|
64
|
-
if (parentDir === currentDir) {
|
|
65
|
-
break;
|
|
66
|
-
}
|
|
67
|
-
currentDir = parentDir;
|
|
68
|
-
remainingDepth -= 1;
|
|
69
|
-
}
|
|
70
|
-
throw new Error(`Could not resolve module '${importPath}' from '${rootDir}'`);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
export {
|
|
74
|
-
NodeModuleScriptProcessor
|
|
75
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { ContentStylesheetAsset, ProcessedAsset } from '../../assets.types.js';
|
|
2
|
-
import { BaseProcessor } from '../base/base-processor.js';
|
|
3
|
-
export declare class ContentStylesheetProcessor extends BaseProcessor<ContentStylesheetAsset> {
|
|
4
|
-
process(dep: ContentStylesheetAsset): Promise<ProcessedAsset>;
|
|
5
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import { fileSystem } from "@ecopages/file-system";
|
|
3
|
-
import { BaseProcessor } from "../base/base-processor.js";
|
|
4
|
-
class ContentStylesheetProcessor extends BaseProcessor {
|
|
5
|
-
async process(dep) {
|
|
6
|
-
const hash = this.generateHash(dep.content);
|
|
7
|
-
const filename = `style-${hash}.css`;
|
|
8
|
-
const cachekey = this.buildCacheKey(filename, hash, dep);
|
|
9
|
-
return this.getOrProcess(cachekey, () => {
|
|
10
|
-
const filepath = path.join(this.getAssetsDir(), "styles", filename);
|
|
11
|
-
if (!dep.inline) fileSystem.write(filepath, dep.content);
|
|
12
|
-
return {
|
|
13
|
-
filepath: dep.inline ? void 0 : filepath,
|
|
14
|
-
content: dep.inline ? dep.content : void 0,
|
|
15
|
-
kind: "stylesheet",
|
|
16
|
-
position: dep.position,
|
|
17
|
-
attributes: dep.attributes,
|
|
18
|
-
inline: dep.inline
|
|
19
|
-
};
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
export {
|
|
24
|
-
ContentStylesheetProcessor
|
|
25
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { FileStylesheetAsset, ProcessedAsset } from '../../assets.types.js';
|
|
2
|
-
import { BaseProcessor } from '../base/base-processor.js';
|
|
3
|
-
export declare class FileStylesheetProcessor extends BaseProcessor<FileStylesheetAsset> {
|
|
4
|
-
private static readonly PROCESSABLE_STYLESHEET_EXTENSIONS;
|
|
5
|
-
getStyleContent: (srcUrl: string) => Buffer;
|
|
6
|
-
private isProcessableStylesheet;
|
|
7
|
-
private applyStylesheetProcessors;
|
|
8
|
-
process(dep: FileStylesheetAsset): Promise<ProcessedAsset>;
|
|
9
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import { fileSystem } from "@ecopages/file-system";
|
|
3
|
-
import { BaseProcessor } from "../base/base-processor.js";
|
|
4
|
-
class FileStylesheetProcessor extends BaseProcessor {
|
|
5
|
-
static PROCESSABLE_STYLESHEET_EXTENSIONS = /* @__PURE__ */ new Set([".css", ".scss", ".sass", ".less"]);
|
|
6
|
-
getStyleContent = (srcUrl) => {
|
|
7
|
-
return fileSystem.readFileAsBuffer(srcUrl);
|
|
8
|
-
};
|
|
9
|
-
isProcessableStylesheet(filepath) {
|
|
10
|
-
return FileStylesheetProcessor.PROCESSABLE_STYLESHEET_EXTENSIONS.has(path.extname(filepath));
|
|
11
|
-
}
|
|
12
|
-
async applyStylesheetProcessors(content, filepath) {
|
|
13
|
-
if (!this.isProcessableStylesheet(filepath)) {
|
|
14
|
-
return content;
|
|
15
|
-
}
|
|
16
|
-
let transformedContent = content;
|
|
17
|
-
for (const processor of this.appConfig.processors.values()) {
|
|
18
|
-
const hasCapabilities = processor.getAssetCapabilities().length > 0;
|
|
19
|
-
const canProcessStylesheet = processor.canProcessAsset("stylesheet", filepath);
|
|
20
|
-
if (!canProcessStylesheet && (hasCapabilities || !processor.getName().includes("postcss"))) {
|
|
21
|
-
continue;
|
|
22
|
-
}
|
|
23
|
-
if (!processor.matchesFileFilter(filepath)) {
|
|
24
|
-
continue;
|
|
25
|
-
}
|
|
26
|
-
const result = await processor.process(transformedContent, filepath);
|
|
27
|
-
if (typeof result === "string") {
|
|
28
|
-
transformedContent = result;
|
|
29
|
-
continue;
|
|
30
|
-
}
|
|
31
|
-
if (result instanceof Buffer) {
|
|
32
|
-
transformedContent = result.toString();
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return transformedContent;
|
|
36
|
-
}
|
|
37
|
-
async process(dep) {
|
|
38
|
-
const buffer = this.getStyleContent(dep.filepath);
|
|
39
|
-
const rawContent = buffer.toString();
|
|
40
|
-
const processedContent = await this.applyStylesheetProcessors(rawContent, dep.filepath);
|
|
41
|
-
const hash = this.generateHash(processedContent);
|
|
42
|
-
const cachekey = this.buildCacheKey(dep.filepath, hash, dep);
|
|
43
|
-
return this.getOrProcess(cachekey, () => {
|
|
44
|
-
const filepath = path.join(
|
|
45
|
-
this.getAssetsDir(),
|
|
46
|
-
path.relative(this.appConfig.absolutePaths.srcDir, dep.filepath)
|
|
47
|
-
);
|
|
48
|
-
const outputBuffer = Buffer.from(processedContent);
|
|
49
|
-
if (!dep.inline) {
|
|
50
|
-
fileSystem.ensureDir(path.dirname(filepath));
|
|
51
|
-
fileSystem.write(filepath, outputBuffer);
|
|
52
|
-
}
|
|
53
|
-
return {
|
|
54
|
-
filepath,
|
|
55
|
-
content: dep.inline ? processedContent : void 0,
|
|
56
|
-
kind: "stylesheet",
|
|
57
|
-
position: dep.position,
|
|
58
|
-
attributes: dep.attributes,
|
|
59
|
-
inline: dep.inline
|
|
60
|
-
};
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
export {
|
|
65
|
-
FileStylesheetProcessor
|
|
66
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { BuildOptions, BuildResult, BuildTranspileProfile } from '../../build/build-adapter.js';
|
|
2
|
-
import type { EcoPagesAppConfig } from '../../types/internal-types.js';
|
|
3
|
-
export type BrowserBundleOptions = Omit<BuildOptions, 'target' | 'format' | 'sourcemap'> & {
|
|
4
|
-
profile: BuildTranspileProfile;
|
|
5
|
-
};
|
|
6
|
-
export interface BrowserBundleExecutor {
|
|
7
|
-
bundle(options: BrowserBundleOptions): Promise<BuildResult>;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* App-owned boundary for browser-oriented bundle work.
|
|
11
|
-
*
|
|
12
|
-
* @remarks
|
|
13
|
-
* This service owns the shared browser transpile defaults and ensures browser
|
|
14
|
-
* builds always run through the app-owned executor rather than direct backend
|
|
15
|
-
* calls scattered across HMR and asset processing paths.
|
|
16
|
-
*/
|
|
17
|
-
export declare class BrowserBundleService implements BrowserBundleExecutor {
|
|
18
|
-
private readonly appConfig;
|
|
19
|
-
/**
|
|
20
|
-
* Creates the browser bundle boundary for one finalized app instance.
|
|
21
|
-
*/
|
|
22
|
-
constructor(appConfig: EcoPagesAppConfig);
|
|
23
|
-
/**
|
|
24
|
-
* Runs one browser-targeted build through the app-owned executor.
|
|
25
|
-
*
|
|
26
|
-
* @remarks
|
|
27
|
-
* Browser defaults and app-owned browser build plugins are applied here so HMR
|
|
28
|
-
* and runtime asset generation do not have to recreate that policy at each call
|
|
29
|
-
* site.
|
|
30
|
-
*/
|
|
31
|
-
bundle(options: BrowserBundleOptions): Promise<BuildResult>;
|
|
32
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { getAppBrowserBuildPlugins, getAppBuildExecutor, getAppTranspileOptions } from "../../build/build-adapter.js";
|
|
2
|
-
import { mergeEcoBuildPlugins } from "../../build/build-manifest.js";
|
|
3
|
-
class BrowserBundleService {
|
|
4
|
-
appConfig;
|
|
5
|
-
/**
|
|
6
|
-
* Creates the browser bundle boundary for one finalized app instance.
|
|
7
|
-
*/
|
|
8
|
-
constructor(appConfig) {
|
|
9
|
-
this.appConfig = appConfig;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Runs one browser-targeted build through the app-owned executor.
|
|
13
|
-
*
|
|
14
|
-
* @remarks
|
|
15
|
-
* Browser defaults and app-owned browser build plugins are applied here so HMR
|
|
16
|
-
* and runtime asset generation do not have to recreate that policy at each call
|
|
17
|
-
* site.
|
|
18
|
-
*/
|
|
19
|
-
async bundle(options) {
|
|
20
|
-
const { profile, ...rawBuildOptions } = options;
|
|
21
|
-
const buildOptions = rawBuildOptions;
|
|
22
|
-
const plugins = buildOptions.plugins;
|
|
23
|
-
const request = {
|
|
24
|
-
...buildOptions,
|
|
25
|
-
...getAppTranspileOptions(this.appConfig, profile),
|
|
26
|
-
plugins: mergeEcoBuildPlugins(plugins, getAppBrowserBuildPlugins(this.appConfig))
|
|
27
|
-
};
|
|
28
|
-
return await getAppBuildExecutor(this.appConfig).build(request);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
export {
|
|
32
|
-
BrowserBundleService
|
|
33
|
-
};
|