@fougere/core 0.2.0-alpha.2 → 0.3.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/boot/AppLifecycle.d.ts +18 -0
- package/dist/boot/AppLifecycle.d.ts.map +1 -0
- package/dist/boot/AppLifecycle.js +42 -0
- package/dist/boot/AppLifecycle.js.map +1 -0
- package/dist/boot/Emissions.d.ts +126 -0
- package/dist/boot/Emissions.d.ts.map +1 -0
- package/dist/boot/Emissions.js +233 -0
- package/dist/boot/Emissions.js.map +1 -0
- package/dist/boot/HandlerFacade.d.ts +72 -0
- package/dist/boot/HandlerFacade.d.ts.map +1 -0
- package/dist/boot/HandlerFacade.js +174 -0
- package/dist/boot/HandlerFacade.js.map +1 -0
- package/dist/boot/Lifecycle.d.ts +4 -0
- package/dist/boot/Lifecycle.d.ts.map +1 -0
- package/dist/boot/Lifecycle.js +3 -0
- package/dist/boot/Lifecycle.js.map +1 -0
- package/dist/boot/ambient-port.d.ts +38 -0
- package/dist/boot/ambient-port.d.ts.map +1 -0
- package/dist/boot/ambient-port.js +2 -0
- package/dist/boot/ambient-port.js.map +1 -0
- package/dist/boot/ambient.als.d.ts +3 -0
- package/dist/boot/ambient.als.d.ts.map +1 -0
- package/dist/boot/ambient.als.js +34 -0
- package/dist/boot/ambient.als.js.map +1 -0
- package/dist/boot/ambient.queue.d.ts +10 -0
- package/dist/boot/ambient.queue.d.ts.map +1 -0
- package/dist/boot/ambient.queue.js +60 -0
- package/dist/boot/ambient.queue.js.map +1 -0
- package/dist/boot/apply.d.ts +22 -0
- package/dist/boot/apply.d.ts.map +1 -0
- package/dist/boot/apply.js +48 -0
- package/dist/boot/apply.js.map +1 -0
- package/dist/boot/auth.d.ts +53 -0
- package/dist/boot/auth.d.ts.map +1 -0
- package/dist/boot/auth.js +2 -0
- package/dist/boot/auth.js.map +1 -0
- package/dist/{binding.d.ts → boot/binding.d.ts} +14 -17
- package/dist/boot/binding.d.ts.map +1 -0
- package/dist/{binding.js → boot/binding.js} +19 -10
- package/dist/boot/binding.js.map +1 -0
- package/dist/{boot.d.ts → boot/boot.d.ts} +25 -5
- package/dist/boot/boot.d.ts.map +1 -0
- package/dist/boot/boot.js +70 -0
- package/dist/boot/boot.js.map +1 -0
- package/dist/boot/bootstrap.d.ts.map +1 -0
- package/dist/boot/bootstrap.js +721 -0
- package/dist/boot/bootstrap.js.map +1 -0
- package/dist/boot/egress.d.ts +8 -0
- package/dist/boot/egress.d.ts.map +1 -0
- package/dist/boot/egress.js +11 -0
- package/dist/boot/egress.js.map +1 -0
- package/dist/boot/frame.d.ts +44 -0
- package/dist/boot/frame.d.ts.map +1 -0
- package/dist/boot/frame.js +181 -0
- package/dist/boot/frame.js.map +1 -0
- package/dist/boot/ownership.d.ts +42 -0
- package/dist/boot/ownership.d.ts.map +1 -0
- package/dist/boot/ownership.js +127 -0
- package/dist/boot/ownership.js.map +1 -0
- package/dist/boot/ports.d.ts +17 -0
- package/dist/boot/ports.d.ts.map +1 -0
- package/dist/boot/ports.js +57 -0
- package/dist/boot/ports.js.map +1 -0
- package/dist/{remote.d.ts → boot/remote.d.ts} +11 -3
- package/dist/boot/remote.d.ts.map +1 -0
- package/dist/{remote.js → boot/remote.js} +24 -26
- package/dist/boot/remote.js.map +1 -0
- package/dist/{seed.d.ts → boot/seed.d.ts} +13 -1
- package/dist/boot/seed.d.ts.map +1 -0
- package/dist/{seed.js → boot/seed.js} +24 -3
- package/dist/boot/seed.js.map +1 -0
- package/dist/boot/together.d.ts +26 -0
- package/dist/boot/together.d.ts.map +1 -0
- package/dist/boot/together.js +163 -0
- package/dist/boot/together.js.map +1 -0
- package/dist/boot/types.d.ts +260 -0
- package/dist/boot/types.d.ts.map +1 -0
- package/dist/boot/types.js.map +1 -0
- package/dist/builtins/config.d.ts +9 -0
- package/dist/builtins/config.d.ts.map +1 -1
- package/dist/builtins/config.js +16 -1
- package/dist/builtins/config.js.map +1 -1
- package/dist/builtins/logger.d.ts +37 -4
- package/dist/builtins/logger.d.ts.map +1 -1
- package/dist/builtins/logger.js +66 -7
- package/dist/builtins/logger.js.map +1 -1
- package/dist/config-loader.d.ts +39 -35
- package/dist/config-loader.d.ts.map +1 -1
- package/dist/config-loader.js +15 -54
- package/dist/config-loader.js.map +1 -1
- package/dist/contract/Call.d.ts +10 -0
- package/dist/contract/Call.d.ts.map +1 -0
- package/dist/contract/Call.js +15 -0
- package/dist/contract/Call.js.map +1 -0
- package/dist/contract/Invocation.d.ts +27 -0
- package/dist/contract/Invocation.d.ts.map +1 -0
- package/dist/contract/Invocation.js +59 -0
- package/dist/contract/Invocation.js.map +1 -0
- package/dist/contract/RouteAddress.d.ts +17 -0
- package/dist/contract/RouteAddress.d.ts.map +1 -0
- package/dist/contract/RouteAddress.js +38 -0
- package/dist/contract/RouteAddress.js.map +1 -0
- package/dist/contract.d.ts +25 -19
- package/dist/contract.d.ts.map +1 -1
- package/dist/contract.js +25 -10
- package/dist/contract.js.map +1 -1
- package/dist/crypto/encoding.d.ts +25 -0
- package/dist/crypto/encoding.d.ts.map +1 -0
- package/dist/crypto/encoding.js +58 -0
- package/dist/crypto/encoding.js.map +1 -0
- package/dist/crypto/node.d.ts +4 -0
- package/dist/crypto/node.d.ts.map +1 -0
- package/dist/crypto/node.js +25 -0
- package/dist/crypto/node.js.map +1 -0
- package/dist/crypto/port.d.ts +42 -0
- package/dist/crypto/port.d.ts.map +1 -0
- package/dist/crypto/port.js +19 -0
- package/dist/crypto/port.js.map +1 -0
- package/dist/crypto/webcrypto.d.ts +4 -0
- package/dist/crypto/webcrypto.d.ts.map +1 -0
- package/dist/crypto/webcrypto.js +34 -0
- package/dist/crypto/webcrypto.js.map +1 -0
- package/dist/dispatch/ArgumentResolver.d.ts +10 -0
- package/dist/dispatch/ArgumentResolver.d.ts.map +1 -0
- package/dist/dispatch/ArgumentResolver.js +12 -0
- package/dist/dispatch/ArgumentResolver.js.map +1 -0
- package/dist/dispatch/ArrayResult.d.ts +3 -0
- package/dist/dispatch/ArrayResult.d.ts.map +1 -0
- package/dist/dispatch/ArrayResult.js +11 -0
- package/dist/dispatch/ArrayResult.js.map +1 -0
- package/dist/dispatch/DispatchEvent.d.ts +18 -0
- package/dist/dispatch/DispatchEvent.d.ts.map +1 -0
- package/dist/dispatch/DispatchEvent.js +30 -0
- package/dist/dispatch/DispatchEvent.js.map +1 -0
- package/dist/dispatch/DispatchLifecycle.d.ts +9 -0
- package/dist/dispatch/DispatchLifecycle.d.ts.map +1 -0
- package/dist/dispatch/DispatchLifecycle.js +25 -0
- package/dist/dispatch/DispatchLifecycle.js.map +1 -0
- package/dist/dispatch/DispatchPort.d.ts +6 -0
- package/dist/dispatch/DispatchPort.d.ts.map +1 -0
- package/dist/dispatch/DispatchPort.js +2 -0
- package/dist/dispatch/DispatchPort.js.map +1 -0
- package/dist/dispatch/Dispatcher.d.ts +16 -0
- package/dist/dispatch/Dispatcher.d.ts.map +1 -0
- package/dist/dispatch/Dispatcher.js +44 -0
- package/dist/dispatch/Dispatcher.js.map +1 -0
- package/dist/dispatch/InFlight.d.ts +12 -0
- package/dist/dispatch/InFlight.d.ts.map +1 -0
- package/dist/dispatch/InFlight.js +46 -0
- package/dist/dispatch/InFlight.js.map +1 -0
- package/dist/dispatch/InputValidator.d.ts +7 -0
- package/dist/dispatch/InputValidator.d.ts.map +1 -0
- package/dist/dispatch/InputValidator.js +21 -0
- package/dist/dispatch/InputValidator.js.map +1 -0
- package/dist/dispatch/LocalRoutePolicy.d.ts +11 -0
- package/dist/dispatch/LocalRoutePolicy.d.ts.map +1 -0
- package/dist/dispatch/LocalRoutePolicy.js +32 -0
- package/dist/dispatch/LocalRoutePolicy.js.map +1 -0
- package/dist/dispatch/OperationExecutor.d.ts +25 -0
- package/dist/dispatch/OperationExecutor.d.ts.map +1 -0
- package/dist/dispatch/OperationExecutor.js +32 -0
- package/dist/dispatch/OperationExecutor.js.map +1 -0
- package/dist/dispatch/OperationRoute.d.ts +13 -0
- package/dist/dispatch/OperationRoute.d.ts.map +1 -0
- package/dist/dispatch/OperationRoute.js +15 -0
- package/dist/dispatch/OperationRoute.js.map +1 -0
- package/dist/dispatch/OutputProjector.d.ts +12 -0
- package/dist/dispatch/OutputProjector.d.ts.map +1 -0
- package/dist/dispatch/OutputProjector.js +30 -0
- package/dist/dispatch/OutputProjector.js.map +1 -0
- package/dist/dispatch/OutputView.d.ts +8 -0
- package/dist/dispatch/OutputView.d.ts.map +1 -0
- package/dist/dispatch/OutputView.js +10 -0
- package/dist/dispatch/OutputView.js.map +1 -0
- package/dist/dispatch/PresenterArgumentResolver.d.ts +12 -0
- package/dist/dispatch/PresenterArgumentResolver.d.ts.map +1 -0
- package/dist/dispatch/PresenterArgumentResolver.js +20 -0
- package/dist/dispatch/PresenterArgumentResolver.js.map +1 -0
- package/dist/dispatch/PresenterExecutor.d.ts +11 -0
- package/dist/dispatch/PresenterExecutor.d.ts.map +1 -0
- package/dist/dispatch/PresenterExecutor.js +56 -0
- package/dist/dispatch/PresenterExecutor.js.map +1 -0
- package/dist/dispatch/RemoteRouteResolver.d.ts +13 -0
- package/dist/dispatch/RemoteRouteResolver.d.ts.map +1 -0
- package/dist/dispatch/RemoteRouteResolver.js +18 -0
- package/dist/dispatch/RemoteRouteResolver.js.map +1 -0
- package/dist/dispatch/Route.d.ts +10 -0
- package/dist/dispatch/Route.d.ts.map +1 -0
- package/dist/dispatch/Route.js +2 -0
- package/dist/dispatch/Route.js.map +1 -0
- package/dist/dispatch/RouteNotFoundError.d.ts +10 -0
- package/dist/dispatch/RouteNotFoundError.d.ts.map +1 -0
- package/dist/dispatch/RouteNotFoundError.js +24 -0
- package/dist/dispatch/RouteNotFoundError.js.map +1 -0
- package/dist/dispatch/RoutePolicy.d.ts +8 -0
- package/dist/dispatch/RoutePolicy.d.ts.map +1 -0
- package/dist/dispatch/RoutePolicy.js +2 -0
- package/dist/dispatch/RoutePolicy.js.map +1 -0
- package/dist/dispatch/RouteRegistry.d.ts +18 -0
- package/dist/dispatch/RouteRegistry.d.ts.map +1 -0
- package/dist/dispatch/RouteRegistry.js +62 -0
- package/dist/dispatch/RouteRegistry.js.map +1 -0
- package/dist/dispatch/RouteResolver.d.ts +7 -0
- package/dist/dispatch/RouteResolver.d.ts.map +1 -0
- package/dist/dispatch/RouteResolver.js +2 -0
- package/dist/dispatch/RouteResolver.js.map +1 -0
- package/dist/dispatch/StorageGuard.d.ts +15 -0
- package/dist/dispatch/StorageGuard.d.ts.map +1 -0
- package/dist/dispatch/StorageGuard.js +63 -0
- package/dist/dispatch/StorageGuard.js.map +1 -0
- package/dist/effective-operation.d.ts +90 -0
- package/dist/effective-operation.d.ts.map +1 -0
- package/dist/effective-operation.js +450 -0
- package/dist/effective-operation.js.map +1 -0
- package/dist/emit.js +2 -2
- package/dist/emit.js.map +1 -1
- package/dist/entry/DynamicFacade.d.ts +10 -0
- package/dist/entry/DynamicFacade.d.ts.map +1 -0
- package/dist/entry/DynamicFacade.js +27 -0
- package/dist/entry/DynamicFacade.js.map +1 -0
- package/dist/entry/FacadeEntry.d.ts +11 -0
- package/dist/entry/FacadeEntry.d.ts.map +1 -0
- package/dist/entry/FacadeEntry.js +26 -0
- package/dist/entry/FacadeEntry.js.map +1 -0
- package/dist/entry/TransportEntry.d.ts +13 -0
- package/dist/entry/TransportEntry.d.ts.map +1 -0
- package/dist/entry/TransportEntry.js +24 -0
- package/dist/entry/TransportEntry.js.map +1 -0
- package/dist/frond-config.d.ts +24 -7
- package/dist/frond-config.d.ts.map +1 -1
- package/dist/frond-config.js.map +1 -1
- package/dist/graph.d.ts +1 -1
- package/dist/graph.d.ts.map +1 -1
- package/dist/graph.js +3 -2
- package/dist/graph.js.map +1 -1
- package/dist/identity-keys.d.ts +14 -0
- package/dist/identity-keys.d.ts.map +1 -0
- package/dist/identity-keys.js +37 -0
- package/dist/identity-keys.js.map +1 -0
- package/dist/identity.d.ts +58 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +182 -0
- package/dist/identity.js.map +1 -0
- package/dist/imports.d.ts +1 -1
- package/dist/imports.d.ts.map +1 -1
- package/dist/imports.js +7 -3
- package/dist/imports.js.map +1 -1
- package/dist/index.d.ts +57 -38
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +38 -32
- package/dist/index.js.map +1 -1
- package/dist/loader.d.ts +16 -0
- package/dist/loader.d.ts.map +1 -0
- package/dist/loader.js +25 -0
- package/dist/loader.js.map +1 -0
- package/dist/node.d.ts +21 -0
- package/dist/node.d.ts.map +1 -0
- package/dist/node.js +24 -0
- package/dist/node.js.map +1 -0
- package/dist/orm.d.ts +69 -8
- package/dist/orm.d.ts.map +1 -1
- package/dist/orm.js +35 -2
- package/dist/orm.js.map +1 -1
- package/dist/prefab/collector.d.ts +29 -0
- package/dist/prefab/collector.d.ts.map +1 -0
- package/dist/prefab/collector.js +34 -0
- package/dist/prefab/collector.js.map +1 -0
- package/dist/{crud.d.ts → prefab/crud.d.ts} +7 -8
- package/dist/prefab/crud.d.ts.map +1 -0
- package/dist/{crud.js → prefab/crud.js} +39 -5
- package/dist/prefab/crud.js.map +1 -0
- package/dist/prefab/mirror.d.ts +52 -0
- package/dist/prefab/mirror.d.ts.map +1 -0
- package/dist/prefab/mirror.js +66 -0
- package/dist/prefab/mirror.js.map +1 -0
- package/dist/prefab/prefab.d.ts +15 -0
- package/dist/prefab/prefab.d.ts.map +1 -0
- package/dist/prefab/prefab.js +19 -0
- package/dist/prefab/prefab.js.map +1 -0
- package/dist/{presenter.d.ts → prefab/presenter.d.ts} +6 -17
- package/dist/prefab/presenter.d.ts.map +1 -0
- package/dist/{presenter.js → prefab/presenter.js} +5 -23
- package/dist/prefab/presenter.js.map +1 -0
- package/dist/prefab/repository.d.ts +104 -0
- package/dist/prefab/repository.d.ts.map +1 -0
- package/dist/prefab/repository.js +62 -0
- package/dist/prefab/repository.js.map +1 -0
- package/dist/scan/Fronds.d.ts +45 -0
- package/dist/scan/Fronds.d.ts.map +1 -0
- package/dist/scan/Fronds.js +66 -0
- package/dist/scan/Fronds.js.map +1 -0
- package/dist/scan/conventions.d.ts +74 -0
- package/dist/scan/conventions.d.ts.map +1 -0
- package/dist/scan/conventions.js +82 -0
- package/dist/scan/conventions.js.map +1 -0
- package/dist/scan/emit.d.ts +14 -0
- package/dist/scan/emit.d.ts.map +1 -0
- package/dist/scan/emit.js +211 -0
- package/dist/scan/emit.js.map +1 -0
- package/dist/scan/frond.d.ts +224 -0
- package/dist/scan/frond.d.ts.map +1 -0
- package/dist/scan/frond.js +2 -0
- package/dist/scan/frond.js.map +1 -0
- package/dist/{handler-parser.d.ts → scan/handler-parser.d.ts} +18 -9
- package/dist/scan/handler-parser.d.ts.map +1 -0
- package/dist/scan/handler-parser.js +625 -0
- package/dist/scan/handler-parser.js.map +1 -0
- package/dist/scan/scan-cache.d.ts +16 -0
- package/dist/scan/scan-cache.d.ts.map +1 -0
- package/dist/{scan-cache.js → scan/scan-cache.js} +27 -20
- package/dist/scan/scan-cache.js.map +1 -0
- package/dist/scan/scanner.d.ts +20 -0
- package/dist/scan/scanner.d.ts.map +1 -0
- package/dist/{scanner.js → scan/scanner.js} +185 -167
- package/dist/scan/scanner.js.map +1 -0
- package/dist/verify.d.ts +16 -3
- package/dist/verify.d.ts.map +1 -1
- package/dist/verify.js +21 -18
- package/dist/verify.js.map +1 -1
- package/dist/{call.d.ts → wire/call.d.ts} +70 -1
- package/dist/wire/call.d.ts.map +1 -0
- package/dist/{call.js → wire/call.js} +48 -75
- package/dist/wire/call.js.map +1 -0
- package/dist/{middleware.d.ts → wire/errors.d.ts} +18 -19
- package/dist/wire/errors.d.ts.map +1 -0
- package/dist/{middleware.js → wire/errors.js} +26 -14
- package/dist/wire/errors.js.map +1 -0
- package/dist/{errors.d.ts → wire/http-error.d.ts} +5 -6
- package/dist/wire/http-error.d.ts.map +1 -0
- package/dist/{errors.js → wire/http-error.js} +7 -6
- package/dist/wire/http-error.js.map +1 -0
- package/dist/wire/invocation.d.ts +4 -0
- package/dist/wire/invocation.d.ts.map +1 -0
- package/dist/wire/invocation.js +3 -0
- package/dist/wire/invocation.js.map +1 -0
- package/dist/{middleware/logger.d.ts → wire/loggerMiddleware.d.ts} +3 -3
- package/dist/wire/loggerMiddleware.d.ts.map +1 -0
- package/dist/{middleware/logger.js → wire/loggerMiddleware.js} +2 -2
- package/dist/wire/loggerMiddleware.js.map +1 -0
- package/dist/wire/middleware.d.ts +29 -0
- package/dist/wire/middleware.d.ts.map +1 -0
- package/dist/wire/middleware.js +20 -0
- package/dist/wire/middleware.js.map +1 -0
- package/dist/{operation.d.ts → wire/operation.d.ts} +39 -10
- package/dist/wire/operation.d.ts.map +1 -0
- package/dist/wire/operation.js +167 -0
- package/dist/wire/operation.js.map +1 -0
- package/package.json +24 -7
- package/dist/binding.d.ts.map +0 -1
- package/dist/binding.js.map +0 -1
- package/dist/boot.d.ts.map +0 -1
- package/dist/boot.js +0 -53
- package/dist/boot.js.map +0 -1
- package/dist/bootstrap.d.ts.map +0 -1
- package/dist/bootstrap.js +0 -879
- package/dist/bootstrap.js.map +0 -1
- package/dist/call.d.ts.map +0 -1
- package/dist/call.js.map +0 -1
- package/dist/collector.d.ts +0 -28
- package/dist/collector.d.ts.map +0 -1
- package/dist/collector.js +0 -32
- package/dist/collector.js.map +0 -1
- package/dist/crud.d.ts.map +0 -1
- package/dist/crud.js.map +0 -1
- package/dist/egress.d.ts +0 -52
- package/dist/egress.d.ts.map +0 -1
- package/dist/egress.js +0 -186
- package/dist/egress.js.map +0 -1
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js.map +0 -1
- package/dist/handler-parser.d.ts.map +0 -1
- package/dist/handler-parser.js +0 -505
- package/dist/handler-parser.js.map +0 -1
- package/dist/invocation.d.ts +0 -20
- package/dist/invocation.d.ts.map +0 -1
- package/dist/invocation.js +0 -15
- package/dist/invocation.js.map +0 -1
- package/dist/middleware/error-handler.d.ts +0 -15
- package/dist/middleware/error-handler.d.ts.map +0 -1
- package/dist/middleware/error-handler.js +0 -29
- package/dist/middleware/error-handler.js.map +0 -1
- package/dist/middleware/logger.d.ts.map +0 -1
- package/dist/middleware/logger.js.map +0 -1
- package/dist/middleware.d.ts.map +0 -1
- package/dist/middleware.js.map +0 -1
- package/dist/mirror.d.ts +0 -93
- package/dist/mirror.d.ts.map +0 -1
- package/dist/mirror.js +0 -96
- package/dist/mirror.js.map +0 -1
- package/dist/operation.d.ts.map +0 -1
- package/dist/operation.js +0 -95
- package/dist/operation.js.map +0 -1
- package/dist/presenter.d.ts.map +0 -1
- package/dist/presenter.js.map +0 -1
- package/dist/remote.d.ts.map +0 -1
- package/dist/remote.js.map +0 -1
- package/dist/repository.d.ts +0 -55
- package/dist/repository.d.ts.map +0 -1
- package/dist/repository.js +0 -26
- package/dist/repository.js.map +0 -1
- package/dist/scan-cache.d.ts +0 -10
- package/dist/scan-cache.d.ts.map +0 -1
- package/dist/scan-cache.js.map +0 -1
- package/dist/scanner.d.ts +0 -34
- package/dist/scanner.d.ts.map +0 -1
- package/dist/scanner.js.map +0 -1
- package/dist/seed.d.ts.map +0 -1
- package/dist/seed.js.map +0 -1
- package/dist/types.d.ts +0 -421
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
- /package/dist/{bootstrap.d.ts → boot/bootstrap.d.ts} +0 -0
- /package/dist/{types.js → boot/types.js} +0 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What this app hosts — the scan's answer, with the questions everyone was asking it
|
|
3
|
+
* by hand.
|
|
4
|
+
*
|
|
5
|
+
* The list was a bare array, so every reader re-walked it: "which frond owns this
|
|
6
|
+
* entity" was spelled four times, "every entity by name" three times as three literal
|
|
7
|
+
* copies of the same `Map`, and the two inside the boot even carried comments saying so.
|
|
8
|
+
* A concept nobody can question is a concept everyone rebuilds.
|
|
9
|
+
*
|
|
10
|
+
* It IS an array — the same reason `ListResult` is one: twenty call sites iterate,
|
|
11
|
+
* filter and spread it, and none of them is wrong to. `Symbol.species` is `Array` so a
|
|
12
|
+
* `.map()` over it answers a plain array rather than something that claims to be a
|
|
13
|
+
* hosting table and holds strings.
|
|
14
|
+
*/
|
|
15
|
+
export class Fronds extends Array {
|
|
16
|
+
static get [Symbol.species]() {
|
|
17
|
+
return Array;
|
|
18
|
+
}
|
|
19
|
+
/** What one scan run found. The only gate in — `Array.of` is taken, and named. */
|
|
20
|
+
static scanned(fronds) {
|
|
21
|
+
const held = new Fronds();
|
|
22
|
+
held.push(...fronds);
|
|
23
|
+
return held;
|
|
24
|
+
}
|
|
25
|
+
/** The frond that hosts an entity — `undefined` when no loaded frond does. */
|
|
26
|
+
owner(entity) {
|
|
27
|
+
return this.find((frond) => frond.entities.some((e) => e.name === entity));
|
|
28
|
+
}
|
|
29
|
+
/** The entity of that name, wherever it was scanned. */
|
|
30
|
+
entity(name) {
|
|
31
|
+
for (const frond of this) {
|
|
32
|
+
const found = frond.entities.find((e) => e.name === name);
|
|
33
|
+
if (found)
|
|
34
|
+
return found;
|
|
35
|
+
}
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Every scanned entity class, by name — across all fronds and never per-frond.
|
|
40
|
+
*
|
|
41
|
+
* A fact is announced in one frond and heard in another, so the subscriber's own
|
|
42
|
+
* frond does not hold the shape it must judge; a `reads:` clause names entities
|
|
43
|
+
* that belong to neighbours by definition.
|
|
44
|
+
*/
|
|
45
|
+
schemas() {
|
|
46
|
+
return new Map(this.flatMap((frond) => frond.entities.map((e) => [e.name, e.entityClass])));
|
|
47
|
+
}
|
|
48
|
+
/** Every scanned entity, sorted. What was FOUND, not what answers. */
|
|
49
|
+
entityNames() {
|
|
50
|
+
return this.flatMap((frond) => frond.entities.map((e) => e.name)).sort();
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The names a call may address, sorted — what a NOT_FOUND must print.
|
|
54
|
+
*
|
|
55
|
+
* Not `entityNames()`, which is what the scan found: an entity with no handler is
|
|
56
|
+
* scanned and serves nothing, so the refusal read *"Entity 'indexed' is not hosted
|
|
57
|
+
* here. Hosted here: indexed."* — naming the very thing it had just refused. A façade
|
|
58
|
+
* is keyed on a HANDLER's address, and that is what this lists.
|
|
59
|
+
*/
|
|
60
|
+
servedNames(surface) {
|
|
61
|
+
return this.flatMap((frond) => frond.handlers
|
|
62
|
+
.filter((handler) => (handler.surface ?? undefined) === surface)
|
|
63
|
+
.map((handler) => handler.address)).sort();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=Fronds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Fronds.js","sourceRoot":"","sources":["../../src/scan/Fronds.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,MAAO,SAAQ,KAAsB;IAChD,MAAM,KAAc,CAAC,MAAM,CAAC,OAAO,CAAC;QAClC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,kFAAkF;IAClF,MAAM,CAAC,OAAO,CAAC,MAAkC;QAC/C,MAAM,IAAI,GAAG,IAAI,MAAM,EAAE,CAAC;QAC1B,IAAI,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,8EAA8E;IAC9E,KAAK,CAAC,MAAc;QAClB,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC;IAC7E,CAAC;IAED,wDAAwD;IACxD,MAAM,CAAC,IAAY;QACjB,KAAK,MAAM,KAAK,IAAI,IAAI,EAAE,CAAC;YACzB,MAAM,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;YAC1D,IAAI,KAAK;gBAAE,OAAO,KAAK,CAAC;QAC1B,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;;;;;OAMG;IACH,OAAO;QACL,OAAO,IAAI,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,WAAW,CAAU,CAAC,CAAC,CAAC,CAAC;IACvG,CAAC;IAED,sEAAsE;IACtE,WAAW;QACT,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3E,CAAC;IAED;;;;;;;OAOG;IACH,WAAW,CAAC,OAAgB;QAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ;aAC1C,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,IAAI,SAAS,CAAC,KAAK,OAAO,CAAC;aAC/D,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC/C,CAAC;CACF"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export interface Conventions {
|
|
2
|
+
/**
|
|
3
|
+
* The scope a frond's package name carries — `@fronds/blog`.
|
|
4
|
+
*
|
|
5
|
+
* A real package name, not only an alias: the CLI writes it as `name` in a scaffolded
|
|
6
|
+
* frond and as a `workspace:*` dependency in the app that consumes it.
|
|
7
|
+
*/
|
|
8
|
+
scope: string;
|
|
9
|
+
/** The directory holding fronds, below the project root. */
|
|
10
|
+
fronds: string;
|
|
11
|
+
/** Directory per role. The role is the key; the name on disk is the value. */
|
|
12
|
+
dirs: {
|
|
13
|
+
entities: string;
|
|
14
|
+
handlers: string;
|
|
15
|
+
services: string;
|
|
16
|
+
repositories: string;
|
|
17
|
+
presenters: string;
|
|
18
|
+
collectors: string;
|
|
19
|
+
seeds: string;
|
|
20
|
+
/** What its shapes used to be — written by `fougere freeze`, replayed by `migrate`. */
|
|
21
|
+
versions: string;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* What a project means when it declares nothing — the convention itself.
|
|
26
|
+
*
|
|
27
|
+
* `@fronds` and not `@frond`: the npm org for the singular belongs to someone else, and a
|
|
28
|
+
* scope is a name that must be ownable.
|
|
29
|
+
*/
|
|
30
|
+
export declare const DEFAULT_CONVENTIONS: Conventions;
|
|
31
|
+
/** What a `fougere.config.ts` may state: only the names that differ. */
|
|
32
|
+
export type ConventionsInput = {
|
|
33
|
+
scope?: string;
|
|
34
|
+
fronds?: string;
|
|
35
|
+
dirs?: Partial<Conventions['dirs']>;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* The convention, with a project's exceptions folded in.
|
|
39
|
+
*
|
|
40
|
+
* Merged one level into `dirs` so renaming one directory does not require restating the
|
|
41
|
+
* other six — the same reading `sources:` and `ports:` get, where only the exception is
|
|
42
|
+
* declared.
|
|
43
|
+
*/
|
|
44
|
+
export declare function resolveConventions(input?: ConventionsInput): Conventions;
|
|
45
|
+
/** The package name a frond answers to. */
|
|
46
|
+
export declare function frondPackage(name: string, conventions: Conventions): string;
|
|
47
|
+
/**
|
|
48
|
+
* Directories whose classes register as providers — two spellings, one behaviour.
|
|
49
|
+
*
|
|
50
|
+
* A project may point both roles at one directory; the scan must then read it once, or
|
|
51
|
+
* every provider would be registered twice.
|
|
52
|
+
*/
|
|
53
|
+
export declare function providerDirsOf(conventions: Conventions): string[];
|
|
54
|
+
/**
|
|
55
|
+
* The frond vocabulary — every directory the scan reads.
|
|
56
|
+
*
|
|
57
|
+
* What a reader needs to bound a frond: the Nuxt module watches these for the root frond
|
|
58
|
+
* (watching the root itself would match every write), and a flat app's tsconfig lists
|
|
59
|
+
* them instead of `["."]`, which would swallow `app/` and `nuxt.config.ts`.
|
|
60
|
+
*/
|
|
61
|
+
export declare function frondDirsOf(conventions: Conventions): string[];
|
|
62
|
+
/**
|
|
63
|
+
* What changes when a frond's domain changes — the paths a dev loop watches.
|
|
64
|
+
*
|
|
65
|
+
* The root frond IS the scan root, so watching its path would match every write in the
|
|
66
|
+
* project: `.nuxt/`, `node_modules/`, the build output. Its convention directories are
|
|
67
|
+
* the frond, and they are what a scan re-reads.
|
|
68
|
+
*/
|
|
69
|
+
export declare function watchPathsOf(frond: {
|
|
70
|
+
source: {
|
|
71
|
+
path: string;
|
|
72
|
+
};
|
|
73
|
+
}, scanRoot: string, conventions: Conventions): string[];
|
|
74
|
+
//# sourceMappingURL=conventions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conventions.d.ts","sourceRoot":"","sources":["../../src/scan/conventions.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,WAAW;IAC1B;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,MAAM,EAAE,MAAM,CAAC;IACf,8EAA8E;IAC9E,IAAI,EAAE;QACJ,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,YAAY,EAAE,MAAM,CAAC;QACrB,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;QACnB,KAAK,EAAE,MAAM,CAAC;QACd,uFAAuF;QACvF,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AAED;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,WAajC,CAAC;AAEF,wEAAwE;AACxE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;CACrC,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,CAAC,EAAE,gBAAgB,GAAG,WAAW,CAMxE;AAED,2CAA2C;AAC3C,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,GAAG,MAAM,CAE3E;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,EAAE,CAEjE;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,EAAE,CAK9D;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE;IAAE,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,EACnC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,WAAW,GACvB,MAAM,EAAE,CAIV"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The names the scan READS instead of deriving them.
|
|
3
|
+
*
|
|
4
|
+
* Everything else a frond states, it states by its shape; these seven directories and the
|
|
5
|
+
* import prefix are the one place where a name is the declaration. They were spelled as
|
|
6
|
+
* literals in five packages, so a project could not move any of them and `frondsDir` was
|
|
7
|
+
* a declared key with no reader.
|
|
8
|
+
*/
|
|
9
|
+
import { join } from 'node:path';
|
|
10
|
+
/**
|
|
11
|
+
* What a project means when it declares nothing — the convention itself.
|
|
12
|
+
*
|
|
13
|
+
* `@fronds` and not `@frond`: the npm org for the singular belongs to someone else, and a
|
|
14
|
+
* scope is a name that must be ownable.
|
|
15
|
+
*/
|
|
16
|
+
export const DEFAULT_CONVENTIONS = {
|
|
17
|
+
scope: '@fronds',
|
|
18
|
+
fronds: 'fronds',
|
|
19
|
+
dirs: {
|
|
20
|
+
entities: 'entities',
|
|
21
|
+
handlers: 'handlers',
|
|
22
|
+
services: 'services',
|
|
23
|
+
repositories: 'repositories',
|
|
24
|
+
presenters: 'presenters',
|
|
25
|
+
collectors: 'collectors',
|
|
26
|
+
seeds: 'seeds',
|
|
27
|
+
versions: 'versions',
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* The convention, with a project's exceptions folded in.
|
|
32
|
+
*
|
|
33
|
+
* Merged one level into `dirs` so renaming one directory does not require restating the
|
|
34
|
+
* other six — the same reading `sources:` and `ports:` get, where only the exception is
|
|
35
|
+
* declared.
|
|
36
|
+
*/
|
|
37
|
+
export function resolveConventions(input) {
|
|
38
|
+
return {
|
|
39
|
+
scope: input?.scope ?? DEFAULT_CONVENTIONS.scope,
|
|
40
|
+
fronds: input?.fronds ?? DEFAULT_CONVENTIONS.fronds,
|
|
41
|
+
dirs: { ...DEFAULT_CONVENTIONS.dirs, ...input?.dirs },
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/** The package name a frond answers to. */
|
|
45
|
+
export function frondPackage(name, conventions) {
|
|
46
|
+
return `${conventions.scope}/${name}`;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Directories whose classes register as providers — two spellings, one behaviour.
|
|
50
|
+
*
|
|
51
|
+
* A project may point both roles at one directory; the scan must then read it once, or
|
|
52
|
+
* every provider would be registered twice.
|
|
53
|
+
*/
|
|
54
|
+
export function providerDirsOf(conventions) {
|
|
55
|
+
return [...new Set([conventions.dirs.services, conventions.dirs.repositories])];
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The frond vocabulary — every directory the scan reads.
|
|
59
|
+
*
|
|
60
|
+
* What a reader needs to bound a frond: the Nuxt module watches these for the root frond
|
|
61
|
+
* (watching the root itself would match every write), and a flat app's tsconfig lists
|
|
62
|
+
* them instead of `["."]`, which would swallow `app/` and `nuxt.config.ts`.
|
|
63
|
+
*/
|
|
64
|
+
export function frondDirsOf(conventions) {
|
|
65
|
+
const { entities, handlers, presenters, collectors, seeds, versions } = conventions.dirs;
|
|
66
|
+
return [...new Set([
|
|
67
|
+
entities, handlers, presenters, collectors, seeds, versions, ...providerDirsOf(conventions),
|
|
68
|
+
])];
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* What changes when a frond's domain changes — the paths a dev loop watches.
|
|
72
|
+
*
|
|
73
|
+
* The root frond IS the scan root, so watching its path would match every write in the
|
|
74
|
+
* project: `.nuxt/`, `node_modules/`, the build output. Its convention directories are
|
|
75
|
+
* the frond, and they are what a scan re-reads.
|
|
76
|
+
*/
|
|
77
|
+
export function watchPathsOf(frond, scanRoot, conventions) {
|
|
78
|
+
return frond.source.path === scanRoot
|
|
79
|
+
? frondDirsOf(conventions).map((dir) => join(scanRoot, dir))
|
|
80
|
+
: [frond.source.path];
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=conventions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conventions.js","sourceRoot":"","sources":["../../src/scan/conventions.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AA0BjC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAgB;IAC9C,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE;QACJ,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,UAAU;QACpB,YAAY,EAAE,cAAc;QAC5B,UAAU,EAAE,YAAY;QACxB,UAAU,EAAE,YAAY;QACxB,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,UAAU;KACrB;CACF,CAAC;AASF;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAwB;IACzD,OAAO;Q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C,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ScanResult } from './frond.js';
|
|
2
|
+
export interface EmitOptions {
|
|
3
|
+
/** Where the generated module will sit. Imports are written relative to it. */
|
|
4
|
+
outFile: string;
|
|
5
|
+
/** How `@fougere/core` is reached from there. Default: the package name. */
|
|
6
|
+
core?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Write a scan down. The result is a TypeScript module whose only imports are the classes
|
|
10
|
+
* the scan found — static, so a bundler traces them — and whose only value is the
|
|
11
|
+
* descriptor `createApp` asks for.
|
|
12
|
+
*/
|
|
13
|
+
export declare function emitScan(result: ScanResult, options: EmitOptions): string;
|
|
14
|
+
//# sourceMappingURL=emit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emit.d.ts","sourceRoot":"","sources":["../../src/scan/emit.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EACV,UAAU,EAEX,MAAM,YAAY,CAAC;AAGpB,MAAM,WAAW,WAAW;IAC1B,+EAA+E;IAC/E,OAAO,EAAE,MAAM,CAAC;IAChB,4EAA4E;IAC5E,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAwJD;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,GAAG,MAAM,CA2CzE"}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The scan, written down as a module — what `createApp` is handed where there is no disk.
|
|
3
|
+
*
|
|
4
|
+
* It RE-RESOLVES NOTHING. By the time this runs the scan has already decided what every
|
|
5
|
+
* slot holds, and `resolveSchema` put the entity's own class in `contract.output` — the
|
|
6
|
+
* very object `EntityEntry.entityClass` holds. So the emitter keeps a table from object
|
|
7
|
+
* to import alias and writes the alias. Identity is preserved because it is the same
|
|
8
|
+
* object that becomes the same import, which is what three call sites depend on
|
|
9
|
+
* (`adapter/graphql`'s `view === entity.entityClass` and its WeakMap, and `bootstrap`'s
|
|
10
|
+
* `outputSchema !== entity.entityClass`). An emitter that re-resolved instead would build
|
|
11
|
+
* a second class for `Post` and those three would silently take the other branch.
|
|
12
|
+
*
|
|
13
|
+
* Measured on three real projects: every live reference is either a class the descriptor
|
|
14
|
+
* already names by `filePath`, a named export of the file that declared the signature, or
|
|
15
|
+
* `Partial<X>` — the one derivation `resolveSchema` fabricates.
|
|
16
|
+
*/
|
|
17
|
+
import { dirname, relative } from 'node:path';
|
|
18
|
+
import { ANONYMOUS_SCHEMA_NAME, sourceNameOf } from '@fougere/schema';
|
|
19
|
+
/** Is a TypeScript compiler going to read this module? Its name is the only thing that says. */
|
|
20
|
+
const isTypeScript = (outFile) => /\.tsx?$/.test(outFile);
|
|
21
|
+
/**
|
|
22
|
+
* A source file becomes a specifier its reader can follow — and the two readers differ.
|
|
23
|
+
*
|
|
24
|
+
* A `.ts` destination is compiled by tsc under Node16 resolution, which spells a
|
|
25
|
+
* TypeScript source with `.js`. A `.mjs` destination is read by a bundler, which resolves
|
|
26
|
+
* the path AS IT IS ON DISK — measured, Nitro's rollup refused `Post.seed.js` because no
|
|
27
|
+
* such file exists. One rule, read off the destination, exactly like the type annotation.
|
|
28
|
+
*/
|
|
29
|
+
function specifierOf(filePath, outFile) {
|
|
30
|
+
const path = relative(dirname(outFile), filePath);
|
|
31
|
+
const rel = isTypeScript(outFile) ? path.replace(/\.tsx?$/, '.js') : path;
|
|
32
|
+
return rel.startsWith('.') ? rel : `./${rel}`;
|
|
33
|
+
}
|
|
34
|
+
const lit = (v) => JSON.stringify(v ?? null);
|
|
35
|
+
class Imports {
|
|
36
|
+
outFile;
|
|
37
|
+
byValue = new Map();
|
|
38
|
+
lines = [];
|
|
39
|
+
/** Entity classes by their class name — what a `Partial<X>` names as its source. */
|
|
40
|
+
byClassName = new Map();
|
|
41
|
+
constructor(outFile) {
|
|
42
|
+
this.outFile = outFile;
|
|
43
|
+
}
|
|
44
|
+
/** Register `value` as the default export of `filePath`, and answer its alias. */
|
|
45
|
+
default(value, filePath) {
|
|
46
|
+
const known = this.byValue.get(value);
|
|
47
|
+
if (known)
|
|
48
|
+
return known;
|
|
49
|
+
const alias = `_${this.lines.length}`;
|
|
50
|
+
this.lines.push(`import ${alias} from '${specifierOf(filePath, this.outFile)}';`);
|
|
51
|
+
this.byValue.set(value, alias);
|
|
52
|
+
return alias;
|
|
53
|
+
}
|
|
54
|
+
/** Register `value` as a NAMED export of `filePath` — its class name is the export. */
|
|
55
|
+
named(value, filePath, name) {
|
|
56
|
+
const known = this.byValue.get(value);
|
|
57
|
+
if (known)
|
|
58
|
+
return known;
|
|
59
|
+
const alias = `_${this.lines.length}`;
|
|
60
|
+
this.lines.push(`import { ${name} as ${alias} } from '${specifierOf(filePath, this.outFile)}';`);
|
|
61
|
+
this.byValue.set(value, alias);
|
|
62
|
+
return alias;
|
|
63
|
+
}
|
|
64
|
+
has(value) { return this.byValue.has(value); }
|
|
65
|
+
aliasOf(value) { return this.byValue.get(value); }
|
|
66
|
+
render() { return this.lines.join('\n'); }
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* What a schema slot becomes in the generated module.
|
|
70
|
+
*
|
|
71
|
+
* Three answers, and the third is the only rule: a class already imported is its alias; a
|
|
72
|
+
* named export of the file that declared the signature is imported by its own name — it
|
|
73
|
+
* IS exported there, because that is where `resolveSchema` found it; and an anonymous
|
|
74
|
+
* schema is `Partial<X>`, the one derivation `resolveSchema` builds, so it is written as
|
|
75
|
+
* the derivation rather than as a value.
|
|
76
|
+
*/
|
|
77
|
+
function schemaRef(schema, declaredIn, imports) {
|
|
78
|
+
if (!schema)
|
|
79
|
+
return undefined;
|
|
80
|
+
const known = imports.aliasOf(schema);
|
|
81
|
+
if (known)
|
|
82
|
+
return known;
|
|
83
|
+
const name = schema.name;
|
|
84
|
+
if (name && name !== ANONYMOUS_SCHEMA_NAME)
|
|
85
|
+
return imports.named(schema, declaredIn, name);
|
|
86
|
+
const source = sourceNameOf(schema);
|
|
87
|
+
const from = source ? imports.byClassName.get(source) : undefined;
|
|
88
|
+
if (from)
|
|
89
|
+
return `${imports.aliasOf(from)}.partial()`;
|
|
90
|
+
throw new Error(`A scan cannot be written down: an anonymous schema in ${declaredIn} names no source. `
|
|
91
|
+
+ 'Only `Partial<X>` is derivable here, and it says which X it came from.');
|
|
92
|
+
}
|
|
93
|
+
function contractOf(op, c, declaredIn, imports) {
|
|
94
|
+
const parts = [];
|
|
95
|
+
const input = schemaRef(c.input, declaredIn, imports);
|
|
96
|
+
const output = schemaRef(c.output, declaredIn, imports);
|
|
97
|
+
if (input)
|
|
98
|
+
parts.push(`input: ${input}`);
|
|
99
|
+
if (output)
|
|
100
|
+
parts.push(`output: ${output}`);
|
|
101
|
+
if (c.binding !== undefined)
|
|
102
|
+
parts.push(`binding: ${lit(c.binding)}`);
|
|
103
|
+
if (c.description !== undefined)
|
|
104
|
+
parts.push(`description: ${lit(c.description)}`);
|
|
105
|
+
if (c.cardinality !== undefined)
|
|
106
|
+
parts.push(`cardinality: ${lit(c.cardinality)}`);
|
|
107
|
+
if (c.signature !== undefined)
|
|
108
|
+
parts.push(`signature: ${lit(c.signature)}`);
|
|
109
|
+
return `[${lit(op)}, { ${parts.join(', ')} }]`;
|
|
110
|
+
}
|
|
111
|
+
function entityOf(e, imports) {
|
|
112
|
+
return `{ name: ${lit(e.name)}, entityClass: ${imports.aliasOf(e.entityClass)}, `
|
|
113
|
+
+ `filePath: ${lit(e.filePath)}, exposed: ${lit(e.exposed)} }`;
|
|
114
|
+
}
|
|
115
|
+
function handlerOf(h, imports) {
|
|
116
|
+
const ops = [...h.operations].map(([op, c]) => contractOf(op, c, h.filePath, imports));
|
|
117
|
+
const override = schemaRef(h.outputOverride, h.filePath, imports);
|
|
118
|
+
return `{ name: ${lit(h.name)}, address: ${lit(h.address)}, ctor: ${imports.aliasOf(h.ctor)}, `
|
|
119
|
+
+ `deps: ${lit(h.deps)}, filePath: ${lit(h.filePath)}, exposed: ${lit(h.exposed)}, `
|
|
120
|
+
+ (h.surface ? `surface: ${lit(h.surface)}, ` : '')
|
|
121
|
+
+ (override ? `outputOverride: ${override}, ` : '')
|
|
122
|
+
+ `operations: new Map([\n ${ops.join(',\n ')}\n ]) }`;
|
|
123
|
+
}
|
|
124
|
+
function presenterOf(p, imports) {
|
|
125
|
+
// `views` is not written: it is read back off the constructor (`__views`), so emitting
|
|
126
|
+
// it would be a second copy of a statement the imported class already carries.
|
|
127
|
+
return `{ entityName: ${lit(p.entityName)}, ctor: ${imports.aliasOf(p.ctor)}, `
|
|
128
|
+
+ `fields: ${lit(p.fields)}, fieldMeta: ${lit(p.fieldMeta)}, deps: ${lit(p.deps)}, `
|
|
129
|
+
+ `filePath: ${lit(p.filePath)} }`;
|
|
130
|
+
}
|
|
131
|
+
function collectorOf(c, imports) {
|
|
132
|
+
return `{ typeName: ${lit(c.typeName)}, ctor: ${imports.aliasOf(c.ctor)}, `
|
|
133
|
+
+ `deps: ${lit(c.deps)}, filePath: ${lit(c.filePath)} }`;
|
|
134
|
+
}
|
|
135
|
+
function providerOf(p, imports) {
|
|
136
|
+
return `{ ctor: ${imports.aliasOf(p.ctor)}, deps: ${lit(p.deps)}, filePath: ${lit(p.filePath)} }`;
|
|
137
|
+
}
|
|
138
|
+
function seedOf(s, imports) {
|
|
139
|
+
const data = typeof s.data === 'function' ? imports.aliasOf(s.data) : lit(s.data);
|
|
140
|
+
return `{ entityName: ${lit(s.entityName)}, data: ${data}, filePath: ${lit(s.filePath)} }`;
|
|
141
|
+
}
|
|
142
|
+
function frondOf(f, imports) {
|
|
143
|
+
const list = (label, items) => ` ${label}: [${items.length ? `\n ${items.join(',\n ')},\n ` : ''}],`;
|
|
144
|
+
return [
|
|
145
|
+
' {',
|
|
146
|
+
` name: ${lit(f.name)},`,
|
|
147
|
+
` source: ${lit(f.source)},`,
|
|
148
|
+
list('providers', f.providers.map((p) => providerOf(p, imports))),
|
|
149
|
+
list('entities', f.entities.map((e) => entityOf(e, imports))),
|
|
150
|
+
list('handlers', f.handlers.map((h) => handlerOf(h, imports))),
|
|
151
|
+
list('presenters', f.presenters.map((p) => presenterOf(p, imports))),
|
|
152
|
+
list('collectors', f.collectors.map((c) => collectorOf(c, imports))),
|
|
153
|
+
list('seeds', f.seeds.map((s) => seedOf(s, imports))),
|
|
154
|
+
f.surfaces ? ` surfaces: ${lit(f.surfaces)},` : '',
|
|
155
|
+
f.reads ? ` reads: ${lit(f.reads)},` : '',
|
|
156
|
+
' }',
|
|
157
|
+
].filter(Boolean).join('\n');
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Write a scan down. The result is a TypeScript module whose only imports are the classes
|
|
161
|
+
* the scan found — static, so a bundler traces them — and whose only value is the
|
|
162
|
+
* descriptor `createApp` asks for.
|
|
163
|
+
*/
|
|
164
|
+
export function emitScan(result, options) {
|
|
165
|
+
const imports = new Imports(options.outFile);
|
|
166
|
+
const core = options.core ?? '@fougere/core';
|
|
167
|
+
// Every class the descriptor names by a file comes first: a schema slot holding one of
|
|
168
|
+
// them then finds it in the table instead of being imported a second time.
|
|
169
|
+
for (const f of result.fronds) {
|
|
170
|
+
for (const e of f.entities) {
|
|
171
|
+
imports.default(e.entityClass, e.filePath);
|
|
172
|
+
const name = e.entityClass.name;
|
|
173
|
+
if (name)
|
|
174
|
+
imports.byClassName.set(name, e.entityClass);
|
|
175
|
+
}
|
|
176
|
+
for (const p of f.providers)
|
|
177
|
+
imports.default(p.ctor, p.filePath);
|
|
178
|
+
for (const h of f.handlers)
|
|
179
|
+
imports.default(h.ctor, h.filePath);
|
|
180
|
+
for (const p of f.presenters)
|
|
181
|
+
imports.default(p.ctor, p.filePath);
|
|
182
|
+
for (const c of f.collectors)
|
|
183
|
+
imports.default(c.ctor, c.filePath);
|
|
184
|
+
for (const s of f.seeds)
|
|
185
|
+
if (typeof s.data === 'function')
|
|
186
|
+
imports.default(s.data, s.filePath);
|
|
187
|
+
}
|
|
188
|
+
const fronds = result.fronds.map((f) => frondOf(f, imports)).join(',\n');
|
|
189
|
+
// `cause` is dropped: it is an Error, and the build that produced this already reported
|
|
190
|
+
// it. What a boot logs is the message, and that travels.
|
|
191
|
+
const diagnostics = result.diagnostics.map(({ cause: _cause, ...rest }) => lit(rest));
|
|
192
|
+
// The annotation is a convenience for a file a human's tsc will read; it is never what
|
|
193
|
+
// makes the value correct. A bundler parses a `.mjs` as JavaScript and `import type`
|
|
194
|
+
// stops it dead — measured, Nitro's rollup refused the Nuxt template at that line.
|
|
195
|
+
const typed = isTypeScript(options.outFile);
|
|
196
|
+
return `// Generated by \`fougere build\` — the scan, written down. Do not edit.
|
|
197
|
+
//
|
|
198
|
+
// \`createApp\` reads this instead of a disk. Everything here was decided by the scan that
|
|
199
|
+
// produced it; nothing is resolved a second time.
|
|
200
|
+
import { Fronds } from '${core}';
|
|
201
|
+
${typed ? `import type { ScanResult } from '${core}';\n` : ''}${imports.render()}
|
|
202
|
+
|
|
203
|
+
export const scan${typed ? ': ScanResult' : ''} = {
|
|
204
|
+
fronds: Fronds.scanned([
|
|
205
|
+
${fronds}
|
|
206
|
+
]),
|
|
207
|
+
diagnostics: [${diagnostics.join(', ')}],
|
|
208
|
+
};
|
|
209
|
+
`;
|
|
210
|
+
}
|
|
211
|
+
//# sourceMappingURL=emit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emit.js","sourceRoot":"","sources":["../../src/scan/emit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAmB,MAAM,iBAAiB,CAAC;AAgBvF,gGAAgG;AAChG,MAAM,YAAY,GAAG,CAAC,OAAe,EAAW,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;A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