@craft-ts/core 0.7.0-beta.13 → 0.7.0-beta.16
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 +10 -2
- package/src/index.d.ts +156 -148
- package/src/index.js +153 -142
- package/src/lib/after-recomputation.d.ts +3 -4
- package/src/lib/after-recomputation.js +3 -4
- package/src/lib/app-checked-di.d.ts +3 -4
- package/src/lib/app-checked-di.js +0 -1
- package/src/lib/async-process.d.ts +18 -19
- package/src/lib/async-process.js +24 -25
- package/src/lib/branded-component/branded-component.d.ts +3 -4
- package/src/lib/branded-component/branded-component.js +0 -1
- package/src/lib/browser-boundaries.d.ts +6 -7
- package/src/lib/browser-boundaries.js +5 -6
- package/src/lib/client-di-requirement.d.ts +1 -2
- package/src/lib/client-di-requirement.js +0 -1
- package/src/lib/client-function-middleware.d.ts +8 -92
- package/src/lib/client-function-middleware.js +89 -90
- package/src/lib/component-monitoring.d.ts +1 -2
- package/src/lib/component-monitoring.js +2 -3
- package/src/lib/component-register.d.ts +1 -2
- package/src/lib/component-register.js +1 -2
- package/src/lib/computed-source.d.ts +3 -4
- package/src/lib/computed-source.js +2 -3
- package/src/lib/correlation-id-plugin.d.ts +1 -2
- package/src/lib/correlation-id-plugin.js +6 -7
- package/src/lib/correlation-id.d.ts +4 -5
- package/src/lib/correlation-id.js +3 -4
- package/src/lib/craft-a11y.d.ts +3 -4
- package/src/lib/craft-a11y.js +5 -6
- package/src/lib/craft-activated-route.d.ts +2 -3
- package/src/lib/craft-activated-route.js +2 -3
- package/src/lib/craft-app-config.d.ts +4 -5
- package/src/lib/craft-app-config.js +3 -4
- package/src/lib/craft-codec.d.ts +0 -1
- package/src/lib/craft-codec.js +0 -1
- package/src/lib/craft-computed.d.ts +6 -7
- package/src/lib/craft-computed.js +7 -8
- package/src/lib/craft-control-flow.d.ts +0 -1
- package/src/lib/craft-control-flow.js +2 -3
- package/src/lib/craft-effect.d.ts +2 -3
- package/src/lib/craft-effect.js +7 -8
- package/src/lib/craft-exception.d.ts +0 -1
- package/src/lib/craft-exception.js +0 -1
- package/src/lib/craft-gen.d.ts +1 -2
- package/src/lib/craft-gen.js +2 -3
- package/src/lib/craft-generator-runtime.d.ts +21 -5
- package/src/lib/craft-generator-runtime.js +28 -6
- package/src/lib/craft-guard-runtime.d.ts +4 -5
- package/src/lib/craft-guard-runtime.js +6 -7
- package/src/lib/craft-handshake.d.ts +1 -2
- package/src/lib/craft-handshake.js +0 -1
- package/src/lib/craft-http-client.d.ts +3 -4
- package/src/lib/craft-http-client.js +4 -5
- package/src/lib/craft-http-trace.d.ts +1 -2
- package/src/lib/craft-http-trace.js +5 -2
- package/src/lib/craft-hydration.d.ts +11 -0
- package/src/lib/craft-hydration.js +2 -0
- package/src/lib/craft-lazy.d.ts +3 -4
- package/src/lib/craft-lazy.js +5 -6
- package/src/lib/craft-load-retry.d.ts +2 -3
- package/src/lib/craft-load-retry.js +11 -4
- package/src/lib/craft-machine-history.d.ts +6 -7
- package/src/lib/craft-machine-history.js +6 -7
- package/src/lib/craft-match.d.ts +0 -1
- package/src/lib/craft-match.js +0 -1
- package/src/lib/craft-method.d.ts +3 -4
- package/src/lib/craft-method.js +5 -6
- package/src/lib/craft-node-directive.d.ts +3 -4
- package/src/lib/craft-node-directive.js +2 -3
- package/src/lib/craft-pending.d.ts +3 -4
- package/src/lib/craft-pending.js +2 -3
- package/src/lib/craft-pipe.d.ts +1 -2
- package/src/lib/craft-pipe.js +7 -8
- package/src/lib/craft-platform.d.ts +2 -3
- package/src/lib/craft-platform.js +2 -3
- package/src/lib/craft-primitive-gen.d.ts +7 -8
- package/src/lib/craft-primitive-gen.js +4 -5
- package/src/lib/craft-primitive-registry.d.ts +4 -2
- package/src/lib/craft-primitive-registry.js +5 -3
- package/src/lib/craft-program-operators.d.ts +3 -4
- package/src/lib/craft-program-operators.js +4 -5
- package/src/lib/craft-program-runtime.d.ts +3 -4
- package/src/lib/craft-program-runtime.js +7 -8
- package/src/lib/craft-register-for-runtime.d.ts +2 -3
- package/src/lib/craft-register-for-runtime.js +2 -3
- package/src/lib/craft-register-for.d.ts +3 -4
- package/src/lib/craft-register-for.js +6 -7
- package/src/lib/craft-render-identity.d.ts +0 -1
- package/src/lib/craft-render-identity.js +1 -2
- package/src/lib/craft-replay.d.ts +0 -1
- package/src/lib/craft-replay.js +0 -1
- package/src/lib/craft-request-context.d.ts +15 -0
- package/src/lib/craft-request-context.js +40 -0
- package/src/lib/craft-resolve.d.ts +2 -3
- package/src/lib/craft-resolve.js +0 -1
- package/src/lib/craft-resource.d.ts +2 -3
- package/src/lib/craft-resource.js +14 -6
- package/src/lib/craft-route-exceptions.d.ts +27 -28
- package/src/lib/craft-route-exceptions.js +3 -4
- package/src/lib/craft-route-load-error.d.ts +92 -93
- package/src/lib/craft-route-load-error.js +6 -7
- package/src/lib/craft-route-meta.d.ts +4 -5
- package/src/lib/craft-route-meta.js +0 -1
- package/src/lib/craft-route-target.d.ts +1 -2
- package/src/lib/craft-route-target.js +1 -2
- package/src/lib/craft-router-outlet.d.ts +7 -7
- package/src/lib/craft-router-outlet.js +24 -18
- package/src/lib/craft-router-tokens.d.ts +3 -4
- package/src/lib/craft-router-tokens.js +2 -3
- package/src/lib/craft-router-trace.d.ts +3 -4
- package/src/lib/craft-router-trace.js +9 -3
- package/src/lib/craft-router.d.ts +16 -17
- package/src/lib/craft-router.js +75 -74
- package/src/lib/craft-routes.d.ts +20 -15
- package/src/lib/craft-routes.js +13 -12
- package/src/lib/craft-runtime-mode.d.ts +13 -0
- package/src/lib/craft-runtime-mode.js +21 -0
- package/src/lib/craft-security.d.ts +87 -0
- package/src/lib/craft-security.js +117 -0
- package/src/lib/craft-service.d.ts +12 -13
- package/src/lib/craft-service.js +11 -12
- package/src/lib/craft-service.shared.d.ts +0 -1
- package/src/lib/craft-service.shared.js +0 -1
- package/src/lib/craft-settled.d.ts +23 -16
- package/src/lib/craft-settled.js +9 -10
- package/src/lib/craft-ssr.d.ts +2 -3
- package/src/lib/craft-ssr.js +4 -5
- package/src/lib/craft-state-machine-runtime.d.ts +2 -3
- package/src/lib/craft-state-machine-runtime.js +3 -4
- package/src/lib/craft-state-machine.d.ts +5 -6
- package/src/lib/craft-state-machine.js +9 -10
- package/src/lib/craft-target-runtime.d.ts +1 -2
- package/src/lib/craft-target-runtime.js +2 -3
- package/src/lib/craft-transfer-snapshot.d.ts +10 -5
- package/src/lib/craft-transfer-snapshot.js +139 -14
- package/src/lib/craft-unique.d.ts +0 -1
- package/src/lib/craft-unique.js +0 -1
- package/src/lib/craft-until-settled.d.ts +5 -6
- package/src/lib/craft-until-settled.js +4 -5
- package/src/lib/craft-use.d.ts +0 -1
- package/src/lib/craft-use.js +2 -3
- package/src/lib/craft-view-transition.d.ts +2 -3
- package/src/lib/craft-view-transition.js +2 -3
- package/src/lib/dev-tools.d.ts +7 -0
- package/src/lib/dev-tools.js +244 -0
- package/src/lib/dom-event-hook.d.ts +1 -2
- package/src/lib/dom-event-hook.js +1 -2
- package/src/lib/fn-wrapper.d.ts +2 -3
- package/src/lib/fn-wrapper.js +3 -4
- package/src/lib/form/craft-field.d.ts +2 -3
- package/src/lib/form/craft-field.directive.d.ts +6 -7
- package/src/lib/form/craft-field.directive.js +5 -6
- package/src/lib/form/craft-field.js +1 -2
- package/src/lib/form/field-exception.d.ts +4 -5
- package/src/lib/form/field-exception.js +1 -2
- package/src/lib/form/field-lens.d.ts +0 -1
- package/src/lib/form/field-lens.js +0 -1
- package/src/lib/form/insert-form-attributes.d.ts +6 -7
- package/src/lib/form/insert-form-attributes.js +5 -6
- package/src/lib/form/insert-form-internals.d.ts +11 -12
- package/src/lib/form/insert-form-internals.js +9 -10
- package/src/lib/form/insert-form-schema.d.ts +3 -4
- package/src/lib/form/insert-form-schema.js +4 -5
- package/src/lib/form/insert-form-submit.d.ts +7 -8
- package/src/lib/form/insert-form-submit.js +3 -4
- package/src/lib/form/insert-form.d.ts +6 -7
- package/src/lib/form/insert-form.js +8 -9
- package/src/lib/form/insert-select-form-tree.d.ts +2 -3
- package/src/lib/form/insert-select-form-tree.js +5 -6
- package/src/lib/form/insert-sub-form-field.d.ts +3 -4
- package/src/lib/form/insert-sub-form-field.js +6 -7
- package/src/lib/form/make-form-tree-insert.d.ts +1 -2
- package/src/lib/form/make-form-tree-insert.js +3 -4
- package/src/lib/form/target-form-field.d.ts +0 -1
- package/src/lib/form/target-form-field.js +0 -1
- package/src/lib/form/validator.d.ts +5 -6
- package/src/lib/form/validator.js +3 -4
- package/src/lib/from-event-to-source$.d.ts +2 -3
- package/src/lib/from-event-to-source$.js +3 -4
- package/src/lib/global-persister-handler.service.d.ts +1 -2
- package/src/lib/global-persister-handler.service.js +2 -3
- package/src/lib/host/craft-compat.d.ts +2 -3
- package/src/lib/host/craft-compat.js +2 -3
- package/src/lib/host/craft-dom.d.ts +0 -1
- package/src/lib/host/craft-dom.js +0 -1
- package/src/lib/host/craft-http.d.ts +0 -1
- package/src/lib/host/craft-http.js +0 -1
- package/src/lib/host/craft-injector-host.d.ts +2 -3
- package/src/lib/host/craft-injector-host.js +1 -2
- package/src/lib/host/craft-injector.d.ts +0 -1
- package/src/lib/host/craft-injector.js +0 -1
- package/src/lib/host/craft-linked-signal.d.ts +1 -2
- package/src/lib/host/craft-linked-signal.js +2 -3
- package/src/lib/host/craft-router-runtime.d.ts +0 -1
- package/src/lib/host/craft-router-runtime.js +0 -1
- package/src/lib/host/craft-router-types.d.ts +1 -2
- package/src/lib/host/craft-router-types.js +1 -2
- package/src/lib/host/craft-signal.d.ts +0 -1
- package/src/lib/host/craft-signal.js +1 -2
- package/src/lib/host/craft-test-bed.d.ts +2 -3
- package/src/lib/host/craft-test-bed.js +2 -3
- package/src/lib/host-tag.d.ts +1 -2
- package/src/lib/host-tag.js +1 -2
- package/src/lib/http-server.d.ts +156 -0
- package/src/lib/http-server.js +590 -0
- package/src/lib/insert-entities.d.ts +5 -6
- package/src/lib/insert-entities.js +1 -2
- package/src/lib/insert-noop-typing-anchor.d.ts +1 -2
- package/src/lib/insert-noop-typing-anchor.js +0 -1
- package/src/lib/insert-pagination-placeholder-data.d.ts +5 -6
- package/src/lib/insert-pagination-placeholder-data.js +5 -6
- package/src/lib/insert-react-on-mutation.d.ts +5 -6
- package/src/lib/insert-react-on-mutation.js +2 -3
- package/src/lib/insert-select-resource.d.ts +2 -3
- package/src/lib/insert-select-resource.js +1 -2
- package/src/lib/insert-select.d.ts +5 -6
- package/src/lib/insert-select.js +18 -19
- package/src/lib/insert-storage-persister.d.ts +4 -5
- package/src/lib/insert-storage-persister.js +2 -3
- package/src/lib/insert-typed-pipes.d.ts +3 -4
- package/src/lib/insert-typed-pipes.js +2 -3
- package/src/lib/lambda-adapter.d.ts +52 -0
- package/src/lib/lambda-adapter.js +101 -0
- package/src/lib/linked-source.d.ts +3 -4
- package/src/lib/linked-source.js +2 -3
- package/src/lib/local-storage-persister.d.ts +2 -3
- package/src/lib/local-storage-persister.js +3 -4
- package/src/lib/middleware-schema-shared.d.ts +9 -21
- package/src/lib/middleware-schema-shared.js +6 -1
- package/src/lib/mock-http-request-for-route.d.ts +3 -4
- package/src/lib/mock-http-request-for-route.js +0 -1
- package/src/lib/mutation.d.ts +18 -19
- package/src/lib/mutation.js +23 -24
- package/src/lib/on$.d.ts +6 -7
- package/src/lib/on$.js +4 -5
- package/src/lib/portable-server-function.d.ts +8 -9
- package/src/lib/portable-server-function.js +12 -5
- package/src/lib/preserved-resource.d.ts +2 -3
- package/src/lib/preserved-resource.js +4 -5
- package/src/lib/primitive-method-runtime-context.d.ts +1 -2
- package/src/lib/primitive-method-runtime-context.js +2 -3
- package/src/lib/primitive-resource-runtime-context.d.ts +1 -2
- package/src/lib/primitive-resource-runtime-context.js +2 -3
- package/src/lib/query-params.d.ts +12 -13
- package/src/lib/query-params.js +15 -16
- package/src/lib/query.core.d.ts +15 -14
- package/src/lib/query.core.js +1 -2
- package/src/lib/query.d.ts +19 -20
- package/src/lib/query.js +23 -24
- package/src/lib/reactive-read.d.ts +2 -3
- package/src/lib/reactive-read.js +2 -3
- package/src/lib/render/channels.d.ts +130 -0
- package/src/lib/render/channels.js +0 -0
- package/src/lib/resource-by-id.d.ts +4 -5
- package/src/lib/resource-by-id.js +4 -5
- package/src/lib/resource-exception.d.ts +2 -3
- package/src/lib/resource-exception.js +1 -2
- package/src/lib/route-checked-di.d.ts +4 -5
- package/src/lib/route-checked-di.js +0 -1
- package/src/lib/schema-validation.d.ts +4 -5
- package/src/lib/schema-validation.js +2 -3
- package/src/lib/send-context-to-ai.d.ts +3 -4
- package/src/lib/send-context-to-ai.js +1 -2
- package/src/lib/send-context-to-ai.tokens.d.ts +1 -2
- package/src/lib/send-context-to-ai.tokens.js +0 -1
- package/src/lib/server-function-client.d.ts +18 -7
- package/src/lib/server-function-client.js +31 -9
- package/src/lib/server-function-contract.d.ts +1 -2
- package/src/lib/server-function-contract.js +0 -1
- package/src/lib/server-function-middleware.d.ts +49 -132
- package/src/lib/server-function-middleware.js +83 -103
- package/src/lib/server-function.d.ts +58 -8
- package/src/lib/server-function.js +20 -6
- package/src/lib/server-layer.d.ts +3 -4
- package/src/lib/server-layer.js +1 -2
- package/src/lib/server.d.ts +39 -6
- package/src/lib/server.js +259 -27
- package/src/lib/setup-craft-service-test.d.ts +3 -4
- package/src/lib/setup-craft-service-test.js +6 -7
- package/src/lib/setup-craft-service-testing-by-register.d.ts +4 -5
- package/src/lib/setup-craft-service-testing-by-register.js +4 -5
- package/src/lib/signal-proxy.d.ts +2 -3
- package/src/lib/signal-proxy.js +1 -2
- package/src/lib/signal-source.d.ts +3 -4
- package/src/lib/signal-source.js +7 -8
- package/src/lib/source$.d.ts +3 -4
- package/src/lib/source$.js +7 -8
- package/src/lib/source-from-event.d.ts +2 -3
- package/src/lib/source-from-event.js +2 -3
- package/src/lib/stacked-source.d.ts +1 -2
- package/src/lib/stacked-source.js +1 -2
- package/src/lib/standard-schema.d.ts +0 -1
- package/src/lib/standard-schema.js +0 -1
- package/src/lib/state-method-runtime-context.d.ts +2 -3
- package/src/lib/state-method-runtime-context.js +1 -2
- package/src/lib/state.d.ts +13 -14
- package/src/lib/state.js +17 -18
- package/src/lib/storage-persister.service.d.ts +3 -4
- package/src/lib/storage-persister.service.js +3 -4
- package/src/lib/take-app-snapshot.d.ts +1 -2
- package/src/lib/take-app-snapshot.js +10 -4
- package/src/lib/template-trace.d.ts +1 -2
- package/src/lib/template-trace.js +5 -2
- package/src/lib/temporal-runtime.d.ts +1 -2
- package/src/lib/temporal-runtime.js +1 -2
- package/src/lib/to-source.d.ts +3 -4
- package/src/lib/to-source.js +2 -3
- package/src/lib/util/craft-resource-ref.d.ts +2 -3
- package/src/lib/util/craft-resource-ref.js +0 -1
- package/src/lib/util/craft-resource-status.d.ts +1 -2
- package/src/lib/util/craft-resource-status.js +0 -1
- package/src/lib/util/entities-util.d.ts +0 -1
- package/src/lib/util/entities-util.js +0 -1
- package/src/lib/util/explicit-effect.d.ts +1 -2
- package/src/lib/util/explicit-effect.js +1 -2
- package/src/lib/util/extract-signal-props-and-methods.d.ts +2 -3
- package/src/lib/util/extract-signal-props-and-methods.js +0 -1
- package/src/lib/util/method-trigger-nonce.d.ts +1 -2
- package/src/lib/util/method-trigger-nonce.js +0 -1
- package/src/lib/util/persister.type.d.ts +2 -3
- package/src/lib/util/persister.type.js +0 -1
- package/src/lib/util/persister.util.d.ts +0 -1
- package/src/lib/util/persister.util.js +0 -1
- package/src/lib/util/react-on-mutation-effect.d.ts +5 -6
- package/src/lib/util/react-on-mutation-effect.js +4 -5
- package/src/lib/util/resource-by-id-changes-tracker.util.d.ts +2 -3
- package/src/lib/util/resource-by-id-changes-tracker.util.js +2 -3
- package/src/lib/util/source.type.d.ts +2 -3
- package/src/lib/util/source.type.js +0 -1
- package/src/lib/util/types/access-type-object-property-by-dotted-path.type.d.ts +1 -2
- package/src/lib/util/types/access-type-object-property-by-dotted-path.type.js +0 -1
- package/src/lib/util/types/boolean-or-mapper-fn-by-path-by-id.type.d.ts +4 -5
- package/src/lib/util/types/boolean-or-mapper-fn-by-path-by-id.type.js +0 -1
- package/src/lib/util/types/boolean-or-mapper-fn-by-path.type.d.ts +3 -4
- package/src/lib/util/types/boolean-or-mapper-fn-by-path.type.js +0 -1
- package/src/lib/util/types/brand.d.ts +0 -1
- package/src/lib/util/types/brand.js +0 -1
- package/src/lib/util/types/object-deep-path-mapper.type.d.ts +1 -2
- package/src/lib/util/types/object-deep-path-mapper.type.js +0 -1
- package/src/lib/util/types/resource-by-id-config.type.d.ts +3 -4
- package/src/lib/util/types/resource-by-id-config.type.js +0 -1
- package/src/lib/util/types/resource-with-params-or-params-fn.type.d.ts +2 -3
- package/src/lib/util/types/resource-with-params-or-params-fn.type.js +0 -1
- package/src/lib/util/types/shared.type.d.ts +6 -7
- package/src/lib/util/types/shared.type.js +0 -1
- package/src/lib/util/types/util.d.ts +2 -3
- package/src/lib/util/types/util.js +3 -3
- package/src/lib/util/types/util.type.d.ts +3 -4
- package/src/lib/util/types/util.type.js +0 -1
- package/src/lib/util/update-state.util.d.ts +0 -1
- package/src/lib/util/update-state.util.js +0 -1
- package/src/lib/util/util.d.ts +2 -3
- package/src/lib/util/util.js +1 -2
- package/src/lib/util/util.type.d.ts +5 -6
- package/src/lib/util/util.type.js +0 -1
- package/src/lib/worker-adapter.d.ts +8 -0
- package/src/lib/worker-adapter.js +8 -0
- package/src/lib/yieldable.d.ts +4 -5
- package/src/lib/yieldable.js +4 -5
- package/src/index.d.ts.map +0 -1
- package/src/index.js.map +0 -1
- package/src/lib/after-recomputation.d.ts.map +0 -1
- package/src/lib/after-recomputation.js.map +0 -1
- package/src/lib/app-checked-di.d.ts.map +0 -1
- package/src/lib/app-checked-di.js.map +0 -1
- package/src/lib/async-process.d.ts.map +0 -1
- package/src/lib/async-process.js.map +0 -1
- package/src/lib/branded-component/branded-component.d.ts.map +0 -1
- package/src/lib/branded-component/branded-component.js.map +0 -1
- package/src/lib/browser-boundaries.d.ts.map +0 -1
- package/src/lib/browser-boundaries.js.map +0 -1
- package/src/lib/client-di-requirement.d.ts.map +0 -1
- package/src/lib/client-di-requirement.js.map +0 -1
- package/src/lib/client-function-middleware.d.ts.map +0 -1
- package/src/lib/client-function-middleware.js.map +0 -1
- package/src/lib/component-monitoring.d.ts.map +0 -1
- package/src/lib/component-monitoring.js.map +0 -1
- package/src/lib/component-register.d.ts.map +0 -1
- package/src/lib/component-register.js.map +0 -1
- package/src/lib/computed-source.d.ts.map +0 -1
- package/src/lib/computed-source.js.map +0 -1
- package/src/lib/correlation-id-plugin.d.ts.map +0 -1
- package/src/lib/correlation-id-plugin.js.map +0 -1
- package/src/lib/correlation-id.d.ts.map +0 -1
- package/src/lib/correlation-id.js.map +0 -1
- package/src/lib/craft-a11y.d.ts.map +0 -1
- package/src/lib/craft-a11y.js.map +0 -1
- package/src/lib/craft-activated-route.d.ts.map +0 -1
- package/src/lib/craft-activated-route.js.map +0 -1
- package/src/lib/craft-app-config.d.ts.map +0 -1
- package/src/lib/craft-app-config.js.map +0 -1
- package/src/lib/craft-codec.d.ts.map +0 -1
- package/src/lib/craft-codec.js.map +0 -1
- package/src/lib/craft-computed.d.ts.map +0 -1
- package/src/lib/craft-computed.js.map +0 -1
- package/src/lib/craft-control-flow.d.ts.map +0 -1
- package/src/lib/craft-control-flow.js.map +0 -1
- package/src/lib/craft-effect.d.ts.map +0 -1
- package/src/lib/craft-effect.js.map +0 -1
- package/src/lib/craft-exception.d.ts.map +0 -1
- package/src/lib/craft-exception.js.map +0 -1
- package/src/lib/craft-gen.d.ts.map +0 -1
- package/src/lib/craft-gen.js.map +0 -1
- package/src/lib/craft-generator-runtime.d.ts.map +0 -1
- package/src/lib/craft-generator-runtime.js.map +0 -1
- package/src/lib/craft-guard-runtime.d.ts.map +0 -1
- package/src/lib/craft-guard-runtime.js.map +0 -1
- package/src/lib/craft-handshake.d.ts.map +0 -1
- package/src/lib/craft-handshake.js.map +0 -1
- package/src/lib/craft-http-client.d.ts.map +0 -1
- package/src/lib/craft-http-client.js.map +0 -1
- package/src/lib/craft-http-trace.d.ts.map +0 -1
- package/src/lib/craft-http-trace.js.map +0 -1
- package/src/lib/craft-lazy.d.ts.map +0 -1
- package/src/lib/craft-lazy.js.map +0 -1
- package/src/lib/craft-load-retry.d.ts.map +0 -1
- package/src/lib/craft-load-retry.js.map +0 -1
- package/src/lib/craft-machine-history.d.ts.map +0 -1
- package/src/lib/craft-machine-history.js.map +0 -1
- package/src/lib/craft-match.d.ts.map +0 -1
- package/src/lib/craft-match.js.map +0 -1
- package/src/lib/craft-method.d.ts.map +0 -1
- package/src/lib/craft-method.js.map +0 -1
- package/src/lib/craft-node-directive.d.ts.map +0 -1
- package/src/lib/craft-node-directive.js.map +0 -1
- package/src/lib/craft-pending.d.ts.map +0 -1
- package/src/lib/craft-pending.js.map +0 -1
- package/src/lib/craft-pipe.d.ts.map +0 -1
- package/src/lib/craft-pipe.js.map +0 -1
- package/src/lib/craft-platform.d.ts.map +0 -1
- package/src/lib/craft-platform.js.map +0 -1
- package/src/lib/craft-primitive-gen.d.ts.map +0 -1
- package/src/lib/craft-primitive-gen.js.map +0 -1
- package/src/lib/craft-primitive-registry.d.ts.map +0 -1
- package/src/lib/craft-primitive-registry.js.map +0 -1
- package/src/lib/craft-program-operators.d.ts.map +0 -1
- package/src/lib/craft-program-operators.js.map +0 -1
- package/src/lib/craft-program-runtime.d.ts.map +0 -1
- package/src/lib/craft-program-runtime.js.map +0 -1
- package/src/lib/craft-register-for-runtime.d.ts.map +0 -1
- package/src/lib/craft-register-for-runtime.js.map +0 -1
- package/src/lib/craft-register-for.d.ts.map +0 -1
- package/src/lib/craft-register-for.js.map +0 -1
- package/src/lib/craft-render-identity.d.ts.map +0 -1
- package/src/lib/craft-render-identity.js.map +0 -1
- package/src/lib/craft-replay.d.ts.map +0 -1
- package/src/lib/craft-replay.js.map +0 -1
- package/src/lib/craft-resolve.d.ts.map +0 -1
- package/src/lib/craft-resolve.js.map +0 -1
- package/src/lib/craft-resource.d.ts.map +0 -1
- package/src/lib/craft-resource.js.map +0 -1
- package/src/lib/craft-route-exceptions.d.ts.map +0 -1
- package/src/lib/craft-route-exceptions.js.map +0 -1
- package/src/lib/craft-route-load-error.d.ts.map +0 -1
- package/src/lib/craft-route-load-error.js.map +0 -1
- package/src/lib/craft-route-meta.d.ts.map +0 -1
- package/src/lib/craft-route-meta.js.map +0 -1
- package/src/lib/craft-route-target.d.ts.map +0 -1
- package/src/lib/craft-route-target.js.map +0 -1
- package/src/lib/craft-router-outlet.d.ts.map +0 -1
- package/src/lib/craft-router-outlet.js.map +0 -1
- package/src/lib/craft-router-tokens.d.ts.map +0 -1
- package/src/lib/craft-router-tokens.js.map +0 -1
- package/src/lib/craft-router-trace.d.ts.map +0 -1
- package/src/lib/craft-router-trace.js.map +0 -1
- package/src/lib/craft-router.d.ts.map +0 -1
- package/src/lib/craft-router.js.map +0 -1
- package/src/lib/craft-routes.d.ts.map +0 -1
- package/src/lib/craft-routes.js.map +0 -1
- package/src/lib/craft-service.d.ts.map +0 -1
- package/src/lib/craft-service.js.map +0 -1
- package/src/lib/craft-service.shared.d.ts.map +0 -1
- package/src/lib/craft-service.shared.js.map +0 -1
- package/src/lib/craft-settled.d.ts.map +0 -1
- package/src/lib/craft-settled.js.map +0 -1
- package/src/lib/craft-ssr.d.ts.map +0 -1
- package/src/lib/craft-ssr.js.map +0 -1
- package/src/lib/craft-state-machine-runtime.d.ts.map +0 -1
- package/src/lib/craft-state-machine-runtime.js.map +0 -1
- package/src/lib/craft-state-machine.d.ts.map +0 -1
- package/src/lib/craft-state-machine.js.map +0 -1
- package/src/lib/craft-target-runtime.d.ts.map +0 -1
- package/src/lib/craft-target-runtime.js.map +0 -1
- package/src/lib/craft-transfer-snapshot.d.ts.map +0 -1
- package/src/lib/craft-transfer-snapshot.js.map +0 -1
- package/src/lib/craft-unique.d.ts.map +0 -1
- package/src/lib/craft-unique.js.map +0 -1
- package/src/lib/craft-until-settled.d.ts.map +0 -1
- package/src/lib/craft-until-settled.js.map +0 -1
- package/src/lib/craft-use.d.ts.map +0 -1
- package/src/lib/craft-use.js.map +0 -1
- package/src/lib/craft-view-transition.d.ts.map +0 -1
- package/src/lib/craft-view-transition.js.map +0 -1
- package/src/lib/dom-event-hook.d.ts.map +0 -1
- package/src/lib/dom-event-hook.js.map +0 -1
- package/src/lib/fn-wrapper.d.ts.map +0 -1
- package/src/lib/fn-wrapper.js.map +0 -1
- package/src/lib/form/craft-field.d.ts.map +0 -1
- package/src/lib/form/craft-field.directive.d.ts.map +0 -1
- package/src/lib/form/craft-field.directive.js.map +0 -1
- package/src/lib/form/craft-field.js.map +0 -1
- package/src/lib/form/field-exception.d.ts.map +0 -1
- package/src/lib/form/field-exception.js.map +0 -1
- package/src/lib/form/field-lens.d.ts.map +0 -1
- package/src/lib/form/field-lens.js.map +0 -1
- package/src/lib/form/insert-form-attributes.d.ts.map +0 -1
- package/src/lib/form/insert-form-attributes.js.map +0 -1
- package/src/lib/form/insert-form-internals.d.ts.map +0 -1
- package/src/lib/form/insert-form-internals.js.map +0 -1
- package/src/lib/form/insert-form-schema.d.ts.map +0 -1
- package/src/lib/form/insert-form-schema.js.map +0 -1
- package/src/lib/form/insert-form-submit.d.ts.map +0 -1
- package/src/lib/form/insert-form-submit.js.map +0 -1
- package/src/lib/form/insert-form.d.ts.map +0 -1
- package/src/lib/form/insert-form.js.map +0 -1
- package/src/lib/form/insert-select-form-tree.d.ts.map +0 -1
- package/src/lib/form/insert-select-form-tree.js.map +0 -1
- package/src/lib/form/insert-sub-form-field.d.ts.map +0 -1
- package/src/lib/form/insert-sub-form-field.js.map +0 -1
- package/src/lib/form/make-form-tree-insert.d.ts.map +0 -1
- package/src/lib/form/make-form-tree-insert.js.map +0 -1
- package/src/lib/form/target-form-field.d.ts.map +0 -1
- package/src/lib/form/target-form-field.js.map +0 -1
- package/src/lib/form/validator.d.ts.map +0 -1
- package/src/lib/form/validator.js.map +0 -1
- package/src/lib/from-event-to-source$.d.ts.map +0 -1
- package/src/lib/from-event-to-source$.js.map +0 -1
- package/src/lib/global-persister-handler.service.d.ts.map +0 -1
- package/src/lib/global-persister-handler.service.js.map +0 -1
- package/src/lib/host/craft-compat.d.ts.map +0 -1
- package/src/lib/host/craft-compat.js.map +0 -1
- package/src/lib/host/craft-dom.d.ts.map +0 -1
- package/src/lib/host/craft-dom.js.map +0 -1
- package/src/lib/host/craft-http.d.ts.map +0 -1
- package/src/lib/host/craft-http.js.map +0 -1
- package/src/lib/host/craft-injector-host.d.ts.map +0 -1
- package/src/lib/host/craft-injector-host.js.map +0 -1
- package/src/lib/host/craft-injector.d.ts.map +0 -1
- package/src/lib/host/craft-injector.js.map +0 -1
- package/src/lib/host/craft-linked-signal.d.ts.map +0 -1
- package/src/lib/host/craft-linked-signal.js.map +0 -1
- package/src/lib/host/craft-router-runtime.d.ts.map +0 -1
- package/src/lib/host/craft-router-runtime.js.map +0 -1
- package/src/lib/host/craft-router-types.d.ts.map +0 -1
- package/src/lib/host/craft-router-types.js.map +0 -1
- package/src/lib/host/craft-signal.d.ts.map +0 -1
- package/src/lib/host/craft-signal.js.map +0 -1
- package/src/lib/host/craft-test-bed.d.ts.map +0 -1
- package/src/lib/host/craft-test-bed.js.map +0 -1
- package/src/lib/host-tag.d.ts.map +0 -1
- package/src/lib/host-tag.js.map +0 -1
- package/src/lib/insert-entities.d.ts.map +0 -1
- package/src/lib/insert-entities.js.map +0 -1
- package/src/lib/insert-noop-typing-anchor.d.ts.map +0 -1
- package/src/lib/insert-noop-typing-anchor.js.map +0 -1
- package/src/lib/insert-pagination-placeholder-data.d.ts.map +0 -1
- package/src/lib/insert-pagination-placeholder-data.js.map +0 -1
- package/src/lib/insert-react-on-mutation.d.ts.map +0 -1
- package/src/lib/insert-react-on-mutation.js.map +0 -1
- package/src/lib/insert-select-resource.d.ts.map +0 -1
- package/src/lib/insert-select-resource.js.map +0 -1
- package/src/lib/insert-select.d.ts.map +0 -1
- package/src/lib/insert-select.js.map +0 -1
- package/src/lib/insert-storage-persister.d.ts.map +0 -1
- package/src/lib/insert-storage-persister.js.map +0 -1
- package/src/lib/insert-typed-pipes.d.ts.map +0 -1
- package/src/lib/insert-typed-pipes.js.map +0 -1
- package/src/lib/linked-source.d.ts.map +0 -1
- package/src/lib/linked-source.js.map +0 -1
- package/src/lib/local-storage-persister.d.ts.map +0 -1
- package/src/lib/local-storage-persister.js.map +0 -1
- package/src/lib/middleware-schema-shared.d.ts.map +0 -1
- package/src/lib/middleware-schema-shared.js.map +0 -1
- package/src/lib/mock-http-request-for-route.d.ts.map +0 -1
- package/src/lib/mock-http-request-for-route.js.map +0 -1
- package/src/lib/mutation.d.ts.map +0 -1
- package/src/lib/mutation.js.map +0 -1
- package/src/lib/on$.d.ts.map +0 -1
- package/src/lib/on$.js.map +0 -1
- package/src/lib/portable-server-function.d.ts.map +0 -1
- package/src/lib/portable-server-function.js.map +0 -1
- package/src/lib/preserved-resource.d.ts.map +0 -1
- package/src/lib/preserved-resource.js.map +0 -1
- package/src/lib/primitive-method-runtime-context.d.ts.map +0 -1
- package/src/lib/primitive-method-runtime-context.js.map +0 -1
- package/src/lib/primitive-resource-runtime-context.d.ts.map +0 -1
- package/src/lib/primitive-resource-runtime-context.js.map +0 -1
- package/src/lib/query-params.d.ts.map +0 -1
- package/src/lib/query-params.js.map +0 -1
- package/src/lib/query.core.d.ts.map +0 -1
- package/src/lib/query.core.js.map +0 -1
- package/src/lib/query.d.ts.map +0 -1
- package/src/lib/query.js.map +0 -1
- package/src/lib/reactive-read.d.ts.map +0 -1
- package/src/lib/reactive-read.js.map +0 -1
- package/src/lib/resource-by-id.d.ts.map +0 -1
- package/src/lib/resource-by-id.js.map +0 -1
- package/src/lib/resource-exception.d.ts.map +0 -1
- package/src/lib/resource-exception.js.map +0 -1
- package/src/lib/route-checked-di.d.ts.map +0 -1
- package/src/lib/route-checked-di.js.map +0 -1
- package/src/lib/schema-validation.d.ts.map +0 -1
- package/src/lib/schema-validation.js.map +0 -1
- package/src/lib/send-context-to-ai.d.ts.map +0 -1
- package/src/lib/send-context-to-ai.js.map +0 -1
- package/src/lib/send-context-to-ai.tokens.d.ts.map +0 -1
- package/src/lib/send-context-to-ai.tokens.js.map +0 -1
- package/src/lib/server-function-client.d.ts.map +0 -1
- package/src/lib/server-function-client.js.map +0 -1
- package/src/lib/server-function-contract.d.ts.map +0 -1
- package/src/lib/server-function-contract.js.map +0 -1
- package/src/lib/server-function-middleware.d.ts.map +0 -1
- package/src/lib/server-function-middleware.js.map +0 -1
- package/src/lib/server-function.d.ts.map +0 -1
- package/src/lib/server-function.js.map +0 -1
- package/src/lib/server-layer.d.ts.map +0 -1
- package/src/lib/server-layer.js.map +0 -1
- package/src/lib/server.d.ts.map +0 -1
- package/src/lib/server.js.map +0 -1
- package/src/lib/setup-craft-service-test.d.ts.map +0 -1
- package/src/lib/setup-craft-service-test.js.map +0 -1
- package/src/lib/setup-craft-service-testing-by-register.d.ts.map +0 -1
- package/src/lib/setup-craft-service-testing-by-register.js.map +0 -1
- package/src/lib/signal-proxy.d.ts.map +0 -1
- package/src/lib/signal-proxy.js.map +0 -1
- package/src/lib/signal-source.d.ts.map +0 -1
- package/src/lib/signal-source.js.map +0 -1
- package/src/lib/source$.d.ts.map +0 -1
- package/src/lib/source$.js.map +0 -1
- package/src/lib/source-from-event.d.ts.map +0 -1
- package/src/lib/source-from-event.js.map +0 -1
- package/src/lib/stacked-source.d.ts.map +0 -1
- package/src/lib/stacked-source.js.map +0 -1
- package/src/lib/standard-schema.d.ts.map +0 -1
- package/src/lib/standard-schema.js.map +0 -1
- package/src/lib/state-method-runtime-context.d.ts.map +0 -1
- package/src/lib/state-method-runtime-context.js.map +0 -1
- package/src/lib/state.d.ts.map +0 -1
- package/src/lib/state.js.map +0 -1
- package/src/lib/storage-persister.service.d.ts.map +0 -1
- package/src/lib/storage-persister.service.js.map +0 -1
- package/src/lib/take-app-snapshot.d.ts.map +0 -1
- package/src/lib/take-app-snapshot.js.map +0 -1
- package/src/lib/template-trace.d.ts.map +0 -1
- package/src/lib/template-trace.js.map +0 -1
- package/src/lib/temporal-runtime.d.ts.map +0 -1
- package/src/lib/temporal-runtime.js.map +0 -1
- package/src/lib/to-source.d.ts.map +0 -1
- package/src/lib/to-source.js.map +0 -1
- package/src/lib/util/craft-resource-ref.d.ts.map +0 -1
- package/src/lib/util/craft-resource-ref.js.map +0 -1
- package/src/lib/util/craft-resource-status.d.ts.map +0 -1
- package/src/lib/util/craft-resource-status.js.map +0 -1
- package/src/lib/util/entities-util.d.ts.map +0 -1
- package/src/lib/util/entities-util.js.map +0 -1
- package/src/lib/util/explicit-effect.d.ts.map +0 -1
- package/src/lib/util/explicit-effect.js.map +0 -1
- package/src/lib/util/extract-signal-props-and-methods.d.ts.map +0 -1
- package/src/lib/util/extract-signal-props-and-methods.js.map +0 -1
- package/src/lib/util/method-trigger-nonce.d.ts.map +0 -1
- package/src/lib/util/method-trigger-nonce.js.map +0 -1
- package/src/lib/util/persister.type.d.ts.map +0 -1
- package/src/lib/util/persister.type.js.map +0 -1
- package/src/lib/util/persister.util.d.ts.map +0 -1
- package/src/lib/util/persister.util.js.map +0 -1
- package/src/lib/util/react-on-mutation-effect.d.ts.map +0 -1
- package/src/lib/util/react-on-mutation-effect.js.map +0 -1
- package/src/lib/util/resource-by-id-changes-tracker.util.d.ts.map +0 -1
- package/src/lib/util/resource-by-id-changes-tracker.util.js.map +0 -1
- package/src/lib/util/source.type.d.ts.map +0 -1
- package/src/lib/util/source.type.js.map +0 -1
- package/src/lib/util/types/access-type-object-property-by-dotted-path.type.d.ts.map +0 -1
- package/src/lib/util/types/access-type-object-property-by-dotted-path.type.js.map +0 -1
- package/src/lib/util/types/boolean-or-mapper-fn-by-path-by-id.type.d.ts.map +0 -1
- package/src/lib/util/types/boolean-or-mapper-fn-by-path-by-id.type.js.map +0 -1
- package/src/lib/util/types/boolean-or-mapper-fn-by-path.type.d.ts.map +0 -1
- package/src/lib/util/types/boolean-or-mapper-fn-by-path.type.js.map +0 -1
- package/src/lib/util/types/brand.d.ts.map +0 -1
- package/src/lib/util/types/brand.js.map +0 -1
- package/src/lib/util/types/object-deep-path-mapper.type.d.ts.map +0 -1
- package/src/lib/util/types/object-deep-path-mapper.type.js.map +0 -1
- package/src/lib/util/types/resource-by-id-config.type.d.ts.map +0 -1
- package/src/lib/util/types/resource-by-id-config.type.js.map +0 -1
- package/src/lib/util/types/resource-with-params-or-params-fn.type.d.ts.map +0 -1
- package/src/lib/util/types/resource-with-params-or-params-fn.type.js.map +0 -1
- package/src/lib/util/types/shared.type.d.ts.map +0 -1
- package/src/lib/util/types/shared.type.js.map +0 -1
- package/src/lib/util/types/util.d.ts.map +0 -1
- package/src/lib/util/types/util.js.map +0 -1
- package/src/lib/util/types/util.type.d.ts.map +0 -1
- package/src/lib/util/types/util.type.js.map +0 -1
- package/src/lib/util/update-state.util.d.ts.map +0 -1
- package/src/lib/util/update-state.util.js.map +0 -1
- package/src/lib/util/util.d.ts.map +0 -1
- package/src/lib/util/util.js.map +0 -1
- package/src/lib/util/util.type.d.ts.map +0 -1
- package/src/lib/util/util.type.js.map +0 -1
- package/src/lib/yieldable.d.ts.map +0 -1
- package/src/lib/yieldable.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { WritableSignal } from './host/craft-compat';
|
|
2
|
-
import { InsertionParams, QueryDeclarativeEffect, ResourceExceptionConstraints } from './query.core';
|
|
3
|
-
import { ResourceByIdRef } from './resource-by-id';
|
|
4
|
-
import { InternalType } from './util/types/util.type';
|
|
5
|
-
import { type YieldableReactiveSignal, type YieldableReactiveValue } from './reactive-read';
|
|
1
|
+
import { WritableSignal } from './host/craft-compat.js';
|
|
2
|
+
import { InsertionParams, QueryDeclarativeEffect, ResourceExceptionConstraints } from './query.core.js';
|
|
3
|
+
import { ResourceByIdRef } from './resource-by-id.js';
|
|
4
|
+
import { InternalType } from './util/types/util.type.js';
|
|
5
|
+
import { type YieldableReactiveSignal, type YieldableReactiveValue } from './reactive-read.js';
|
|
6
6
|
type PublicMutation = {
|
|
7
7
|
readonly kind: 'mutation';
|
|
8
8
|
readonly resourceParamsSrc: YieldableReactiveValue<any>;
|
|
@@ -258,4 +258,3 @@ export declare function insertReactOnMutation<QueryResourceState extends object
|
|
|
258
258
|
insertions: keyof QueryInsertions extends string ? QueryInsertions : never;
|
|
259
259
|
}) => import("..").EffectRef;
|
|
260
260
|
export {};
|
|
261
|
-
//# sourceMappingURL=insert-react-on-mutation.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { reactOnMutationEffect } from './util/react-on-mutation-effect';
|
|
2
|
-
import { rawReactiveFacade, } from './reactive-read';
|
|
1
|
+
import { reactOnMutationEffect } from './util/react-on-mutation-effect.js';
|
|
2
|
+
import { rawReactiveFacade, } from './reactive-read.js';
|
|
3
3
|
/**
|
|
4
4
|
* Creates an insertion function that makes a query react to mutation state changes.
|
|
5
5
|
*
|
|
@@ -224,4 +224,3 @@ export function insertReactOnMutation(mutation, mutationEffectOptions) {
|
|
|
224
224
|
}, mutationEffectOptions);
|
|
225
225
|
};
|
|
226
226
|
}
|
|
227
|
-
//# sourceMappingURL=insert-react-on-mutation.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { InsertionStateFactoryContext, InsertionsStateFactory } from './query.core';
|
|
2
|
-
import { type InsertSelectOutput, type SelectedTarget } from './insert-select';
|
|
1
|
+
import type { InsertionStateFactoryContext, InsertionsStateFactory } from './query.core.js';
|
|
2
|
+
import { type InsertSelectOutput, type SelectedTarget } from './insert-select.js';
|
|
3
3
|
type ResourceSelectAutoCompleteName<StateType> = NoInfer<StateType> extends readonly object[] ? string : keyof NoInfer<StateType>;
|
|
4
4
|
type ResolveResourceState<StateType> = StateType extends readonly unknown[] ? StateType : StateType extends object ? {
|
|
5
5
|
[Key in keyof StateType]: StateType[Key];
|
|
@@ -28,4 +28,3 @@ export declare const insertMutationSelect: typeof insertSelectResource;
|
|
|
28
28
|
/** Alias semantically scoped to asyncProcess resources. */
|
|
29
29
|
export declare const insertAsyncProcessSelect: typeof insertSelectResource;
|
|
30
30
|
export {};
|
|
31
|
-
//# sourceMappingURL=insert-select-resource.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { insertSelect, } from './insert-select';
|
|
1
|
+
import { insertSelect, } from './insert-select.js';
|
|
2
2
|
export function insertSelectResource(name, insertion) {
|
|
3
3
|
return (context) => {
|
|
4
4
|
if (context.resourceById) {
|
|
@@ -24,4 +24,3 @@ export const insertQuerySelect = insertSelectResource;
|
|
|
24
24
|
export const insertMutationSelect = insertSelectResource;
|
|
25
25
|
/** Alias semantically scoped to asyncProcess resources. */
|
|
26
26
|
export const insertAsyncProcessSelect = insertSelectResource;
|
|
27
|
-
//# sourceMappingURL=insert-select-resource.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { InsertionsStateFactory } from './query.core';
|
|
2
|
-
import { Source$ as SourceDollarType } from './source
|
|
3
|
-
import { MergeObject } from './util/types/util.type';
|
|
4
|
-
import { FilterSource, IsEmptyObject } from './util/util.type';
|
|
5
|
-
import { type NonYieldableInsertionMethod, type YieldableInsertionMethods } from './yieldable';
|
|
1
|
+
import { InsertionsStateFactory } from './query.core.js';
|
|
2
|
+
import { Source$ as SourceDollarType } from './source$.js';
|
|
3
|
+
import { MergeObject } from './util/types/util.type.js';
|
|
4
|
+
import { FilterSource, IsEmptyObject } from './util/util.type.js';
|
|
5
|
+
import { type NonYieldableInsertionMethod, type YieldableInsertionMethods } from './yieldable.js';
|
|
6
6
|
export type SelectedTarget<StateType, Name extends string> = StateType extends readonly (infer Item)[] ? Extract<Item, object> : StateType extends Record<string, unknown> ? Name extends keyof StateType ? StateType[Name] : never : never;
|
|
7
7
|
type MergeInsertions<Insertions extends readonly unknown[], Acc = {}> = Insertions extends readonly [infer Head, ...infer Tail] ? MergeInsertions<Tail, Acc & Head> : Acc;
|
|
8
8
|
type Source$Method<SourceType> = [SourceType] extends [void] ? () => Generator<never, void, unknown> : (value: SourceType) => Generator<never, void, unknown>;
|
|
@@ -123,4 +123,3 @@ export declare function insertSelect<StateType, const Name extends AutoCompleteN
|
|
|
123
123
|
Insertions1
|
|
124
124
|
], PreviousInsertionsOutputs>;
|
|
125
125
|
export {};
|
|
126
|
-
//# sourceMappingURL=insert-select.d.ts.map
|
package/src/lib/insert-select.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { DestroyRef, Injector, inject, isSignal, runInInjectionContext, untracked, } from './host/craft-compat';
|
|
2
|
-
import { takeUntilDestroyed } from './host/craft-compat';
|
|
3
|
-
import { ɵcreateHostTaggedInjector } from './craft-service';
|
|
4
|
-
import { source$ } from './source
|
|
5
|
-
import { capitalize, isSource } from './util/util';
|
|
6
|
-
import { INSERTION_SNAPSHOT_REGISTRY, snapshotSelectProxy, } from './take-app-snapshot';
|
|
7
|
-
import { isGenerator, runCraftGenerator } from './craft-generator-runtime';
|
|
8
|
-
import { injectFnWrapper } from './fn-wrapper';
|
|
9
|
-
import { ɵprovidePrimitiveMethodRuntimeContext } from './primitive-method-runtime-context';
|
|
10
|
-
import { createYieldableInsertionMethod, isNonYieldableInsertionMethod, markNonYieldableInsertionMethod, yieldableInvocation, } from './yieldable';
|
|
11
|
-
import { createYieldableReactiveValue, isYieldableReactiveValue, rawReactiveValue, } from './reactive-read';
|
|
12
|
-
import { craftLinkedSignal } from './host/craft-linked-signal';
|
|
1
|
+
import { DestroyRef, Injector, inject, isSignal, runInInjectionContext, untracked, } from './host/craft-compat.js';
|
|
2
|
+
import { takeUntilDestroyed } from './host/craft-compat.js';
|
|
3
|
+
import { ɵcreateHostTaggedInjector } from './craft-service.js';
|
|
4
|
+
import { source$ } from './source$.js';
|
|
5
|
+
import { capitalize, isSource } from './util/util.js';
|
|
6
|
+
import { INSERTION_SNAPSHOT_REGISTRY, snapshotSelectProxy, } from './take-app-snapshot.js';
|
|
7
|
+
import { isGenerator, runCraftGenerator } from './craft-generator-runtime.js';
|
|
8
|
+
import { injectFnWrapper } from './fn-wrapper.js';
|
|
9
|
+
import { ɵprovidePrimitiveMethodRuntimeContext } from './primitive-method-runtime-context.js';
|
|
10
|
+
import { createYieldableInsertionMethod, isNonYieldableInsertionMethod, markNonYieldableInsertionMethod, yieldableInvocation, } from './yieldable.js';
|
|
11
|
+
import { createYieldableReactiveValue, isYieldableReactiveValue, rawReactiveValue, } from './reactive-read.js';
|
|
12
|
+
import { craftLinkedSignal } from './host/craft-linked-signal.js';
|
|
13
13
|
function readInsertionState(state) {
|
|
14
14
|
return isYieldableReactiveValue(state) ? rawReactiveValue(state)() : state();
|
|
15
15
|
}
|
|
@@ -158,9 +158,6 @@ function createInsertSelectItemRuntime(entityName,
|
|
|
158
158
|
}).value)
|
|
159
159
|
: insertionCallResult);
|
|
160
160
|
const nextExposedInsertions = Object.entries(nextRawInsertions).reduce((exposedAcc, [key, value]) => {
|
|
161
|
-
if (isSource(value)) {
|
|
162
|
-
return exposedAcc;
|
|
163
|
-
}
|
|
164
161
|
if (isSource$(value)) {
|
|
165
162
|
const localSource = value;
|
|
166
163
|
const sourceInjector = ɵcreateHostTaggedInjector(itemInjector, `source:${key}`);
|
|
@@ -173,6 +170,9 @@ function createInsertSelectItemRuntime(entityName,
|
|
|
173
170
|
});
|
|
174
171
|
return exposedAcc;
|
|
175
172
|
}
|
|
173
|
+
if (isSource(value)) {
|
|
174
|
+
return exposedAcc;
|
|
175
|
+
}
|
|
176
176
|
if (typeof value === 'function' &&
|
|
177
177
|
!isSignal(value) &&
|
|
178
178
|
!isYieldableReactiveValue(value) &&
|
|
@@ -371,9 +371,6 @@ function createInsertSelectPropertyRuntime(propertyKey,
|
|
|
371
371
|
}).value)
|
|
372
372
|
: insertionCallResult);
|
|
373
373
|
const nextExposedInsertions = Object.entries(nextRawInsertions).reduce((exposedAcc, [key, value]) => {
|
|
374
|
-
if (isSource(value)) {
|
|
375
|
-
return exposedAcc;
|
|
376
|
-
}
|
|
377
374
|
if (isSource$(value)) {
|
|
378
375
|
const localSource = value;
|
|
379
376
|
const crossLayerSource = getOrCreateCrossLayerSource(key);
|
|
@@ -406,6 +403,9 @@ function createInsertSelectPropertyRuntime(propertyKey,
|
|
|
406
403
|
});
|
|
407
404
|
return exposedAcc;
|
|
408
405
|
}
|
|
406
|
+
if (isSource(value)) {
|
|
407
|
+
return exposedAcc;
|
|
408
|
+
}
|
|
409
409
|
if (typeof value === 'function' &&
|
|
410
410
|
!isSignal(value) &&
|
|
411
411
|
!isYieldableReactiveValue(value) &&
|
|
@@ -532,4 +532,3 @@ export function insertSelect(name,
|
|
|
532
532
|
return createInsertSelectPropertyRuntime(name, ...insertions)(context);
|
|
533
533
|
};
|
|
534
534
|
}
|
|
535
|
-
//# sourceMappingURL=insert-select.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { CraftUnique } from './craft-unique';
|
|
2
|
-
import { StoragePersister } from './storage-persister.service';
|
|
3
|
-
import { ResourceExceptionConstraints } from './query.core';
|
|
4
|
-
import type { QueriesPersister } from './util/persister.type';
|
|
1
|
+
import type { CraftUnique } from './craft-unique.js';
|
|
2
|
+
import { StoragePersister } from './storage-persister.service.js';
|
|
3
|
+
import { ResourceExceptionConstraints } from './query.core.js';
|
|
4
|
+
import type { QueriesPersister } from './util/persister.type.js';
|
|
5
5
|
type StoragePersisterServiceYield = ReturnType<typeof StoragePersister> extends Generator<infer Yielded, any, any> ? Yielded : never;
|
|
6
6
|
export type StoragePersisterIdentity = {
|
|
7
7
|
storeName: string;
|
|
@@ -24,4 +24,3 @@ export declare function insertStoragePersister<GroupIdentifier extends string, R
|
|
|
24
24
|
persister: QueriesPersister;
|
|
25
25
|
}, unknown>;
|
|
26
26
|
export {};
|
|
27
|
-
//# sourceMappingURL=insert-storage-persister.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { StoragePersister } from './storage-persister.service';
|
|
2
|
-
import { rawReactiveFacade } from './reactive-read';
|
|
1
|
+
import { StoragePersister } from './storage-persister.service.js';
|
|
2
|
+
import { rawReactiveFacade } from './reactive-read.js';
|
|
3
3
|
/**
|
|
4
4
|
* Persists query, mutation, async-process, or state data through the
|
|
5
5
|
* StoragePersister selected by the current Angular/Craft injector.
|
|
@@ -62,4 +62,3 @@ export function insertStoragePersister(identity, options) {
|
|
|
62
62
|
return { persister };
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
//# sourceMappingURL=insert-storage-persister.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { InsertionsQueryParamsFactory, InsertionsResourcesFactory, InsertionsStateFactory, ResourceExceptionConstraints } from './query.core';
|
|
2
|
-
import type { CraftMachineInsertionContext } from './craft-state-machine';
|
|
3
|
-
import type { YieldableInsertionMethods } from './yieldable';
|
|
1
|
+
import type { InsertionsQueryParamsFactory, InsertionsResourcesFactory, InsertionsStateFactory, ResourceExceptionConstraints } from './query.core.js';
|
|
2
|
+
import type { CraftMachineInsertionContext } from './craft-state-machine.js';
|
|
3
|
+
import type { YieldableInsertionMethods } from './yieldable.js';
|
|
4
4
|
type QueryPipeFactory<GroupIdentifier, ResourceState extends object | undefined, ResourceParams, Exceptions extends ResourceExceptionConstraints, InsertionsOutputs, PreviousInsertionsOutputs = {}, Yielded = never> = InsertionsResourcesFactory<GroupIdentifier, ResourceState, ResourceParams, Exceptions, InsertionsOutputs, PreviousInsertionsOutputs, Yielded>;
|
|
5
5
|
/**
|
|
6
6
|
* Composes several state insertions without requiring an explicit context.
|
|
@@ -61,4 +61,3 @@ export declare const insertMutationPipe: typeof insertQueryPipe;
|
|
|
61
61
|
/** Composes several asyncProcess insertions without requiring an explicit context. */
|
|
62
62
|
export declare const insertAsyncProcessPipe: typeof insertQueryPipe;
|
|
63
63
|
export {};
|
|
64
|
-
//# sourceMappingURL=insert-typed-pipes.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-empty-object-type, @typescript-eslint/no-explicit-any */
|
|
2
|
-
import { craftPipe } from './craft-pipe';
|
|
3
|
-
import { DEEP_YIELDABLE_INSERTION } from './reactive-read';
|
|
2
|
+
import { craftPipe } from './craft-pipe.js';
|
|
3
|
+
import { DEEP_YIELDABLE_INSERTION } from './reactive-read.js';
|
|
4
4
|
function createTypedInsertionPipe(...members) {
|
|
5
5
|
const pipe = (context) => {
|
|
6
6
|
// The public overloads cap the member count at seven. The implementation
|
|
@@ -29,4 +29,3 @@ export function insertQueryParamsPipe(...members) {
|
|
|
29
29
|
export const insertMutationPipe = insertQueryPipe;
|
|
30
30
|
/** Composes several asyncProcess insertions without requiring an explicit context. */
|
|
31
31
|
export const insertAsyncProcessPipe = insertQueryPipe;
|
|
32
|
-
//# sourceMappingURL=insert-typed-pipes.js.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { HttpServer } from './http-server.js';
|
|
2
|
+
export type LambdaHttpEvent = Readonly<{
|
|
3
|
+
version?: string;
|
|
4
|
+
rawPath?: string;
|
|
5
|
+
rawQueryString?: string;
|
|
6
|
+
path?: string;
|
|
7
|
+
httpMethod?: string;
|
|
8
|
+
headers?: Readonly<Record<string, string | undefined>>;
|
|
9
|
+
cookies?: readonly string[];
|
|
10
|
+
body?: string | null;
|
|
11
|
+
isBase64Encoded?: boolean;
|
|
12
|
+
requestContext?: Readonly<{
|
|
13
|
+
http?: Readonly<{
|
|
14
|
+
method?: string;
|
|
15
|
+
path?: string;
|
|
16
|
+
}>;
|
|
17
|
+
}>;
|
|
18
|
+
}>;
|
|
19
|
+
export type LambdaHttpResponse = Readonly<{
|
|
20
|
+
statusCode: number;
|
|
21
|
+
headers: Readonly<Record<string, string>>;
|
|
22
|
+
/** `Set-Cookie` séparés, comme l'attend AWS Function URL. */
|
|
23
|
+
cookies?: readonly string[];
|
|
24
|
+
body: string;
|
|
25
|
+
isBase64Encoded: false;
|
|
26
|
+
}>;
|
|
27
|
+
export type CraftLambdaOptions = Readonly<{
|
|
28
|
+
/**
|
|
29
|
+
* Hôtes que cette fonction sert. L'URL de la requête — donc son origine, sur
|
|
30
|
+
* laquelle reposent les contrôles CSRF et CORS — est reconstruite depuis
|
|
31
|
+
* l'en-tête `Host`, que le client contrôle : sans allowlist, il suffit de
|
|
32
|
+
* l'usurper pour se déclarer same-origin.
|
|
33
|
+
*/
|
|
34
|
+
readonly trustedHosts?: readonly string[];
|
|
35
|
+
}>;
|
|
36
|
+
/**
|
|
37
|
+
* Adapts a Craft Web application to the AWS Lambda Function URL event shape.
|
|
38
|
+
* The application remains unaware of AWS and keeps the same Request/Response
|
|
39
|
+
* contract used by Node and Workers.
|
|
40
|
+
*/
|
|
41
|
+
export declare function createCraftLambdaFetch(application: Pick<HttpServer, 'handle'>, options?: CraftLambdaOptions): (event: LambdaHttpEvent) => Promise<LambdaHttpResponse>;
|
|
42
|
+
export declare class UntrustedHostError extends Error {
|
|
43
|
+
readonly code = "HTTP_HOST_NOT_ALLOWED";
|
|
44
|
+
constructor(host: string);
|
|
45
|
+
}
|
|
46
|
+
export declare function lambdaEventToRequest(event: LambdaHttpEvent, options?: CraftLambdaOptions): Request;
|
|
47
|
+
/**
|
|
48
|
+
* Sans allowlist configurée, l'hôte annoncé est ignoré au profit d'un nom
|
|
49
|
+
* neutre : une origine fabriquée par le client ne doit jamais devenir
|
|
50
|
+
* l'origine de référence de l'application.
|
|
51
|
+
*/
|
|
52
|
+
export declare function resolveTrustedHost(host: string | null, trustedHosts: readonly string[] | undefined): string;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adapts a Craft Web application to the AWS Lambda Function URL event shape.
|
|
3
|
+
* The application remains unaware of AWS and keeps the same Request/Response
|
|
4
|
+
* contract used by Node and Workers.
|
|
5
|
+
*/
|
|
6
|
+
export function createCraftLambdaFetch(application, options = {}) {
|
|
7
|
+
return async (event) => {
|
|
8
|
+
let request;
|
|
9
|
+
try {
|
|
10
|
+
request = lambdaEventToRequest(event, options);
|
|
11
|
+
}
|
|
12
|
+
catch (error) {
|
|
13
|
+
if (!(error instanceof UntrustedHostError))
|
|
14
|
+
throw error;
|
|
15
|
+
return {
|
|
16
|
+
statusCode: 400,
|
|
17
|
+
headers: { 'content-type': 'application/json' },
|
|
18
|
+
body: JSON.stringify({
|
|
19
|
+
error: { code: 'HTTP_HOST_NOT_ALLOWED', message: 'Host is not allowed.' },
|
|
20
|
+
}),
|
|
21
|
+
isBase64Encoded: false,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
const response = await application.handle(request);
|
|
25
|
+
return responseToLambda(response);
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export class UntrustedHostError extends Error {
|
|
29
|
+
code = 'HTTP_HOST_NOT_ALLOWED';
|
|
30
|
+
constructor(host) {
|
|
31
|
+
super(`Host "${host}" is not in the trusted hosts list.`);
|
|
32
|
+
this.name = 'UntrustedHostError';
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export function lambdaEventToRequest(event, options = {}) {
|
|
36
|
+
const headers = new Headers();
|
|
37
|
+
for (const [name, value] of Object.entries(event.headers ?? {})) {
|
|
38
|
+
if (value !== undefined)
|
|
39
|
+
headers.set(name, value);
|
|
40
|
+
}
|
|
41
|
+
if (event.cookies?.length && !headers.has('cookie')) {
|
|
42
|
+
headers.set('cookie', event.cookies.join('; '));
|
|
43
|
+
}
|
|
44
|
+
const method = (event.requestContext?.http?.method ??
|
|
45
|
+
event.httpMethod ??
|
|
46
|
+
'GET').toUpperCase();
|
|
47
|
+
const pathname = event.rawPath ?? event.requestContext?.http?.path ?? event.path ?? '/';
|
|
48
|
+
const query = event.rawQueryString ? `?${event.rawQueryString}` : '';
|
|
49
|
+
const body = decodeLambdaBody(event);
|
|
50
|
+
const host = resolveTrustedHost(headers.get('host'), options.trustedHosts);
|
|
51
|
+
return new Request(`https://${host}${pathname}${query}`, {
|
|
52
|
+
method,
|
|
53
|
+
headers,
|
|
54
|
+
...(body === undefined ? {} : { body: body }),
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Sans allowlist configurée, l'hôte annoncé est ignoré au profit d'un nom
|
|
59
|
+
* neutre : une origine fabriquée par le client ne doit jamais devenir
|
|
60
|
+
* l'origine de référence de l'application.
|
|
61
|
+
*/
|
|
62
|
+
export function resolveTrustedHost(host, trustedHosts) {
|
|
63
|
+
if (!trustedHosts || trustedHosts.length === 0)
|
|
64
|
+
return 'lambda.local';
|
|
65
|
+
if (host && trustedHosts.includes(host))
|
|
66
|
+
return host;
|
|
67
|
+
throw new UntrustedHostError(host ?? '');
|
|
68
|
+
}
|
|
69
|
+
async function responseToLambda(response) {
|
|
70
|
+
const body = response.body
|
|
71
|
+
? new TextDecoder().decode(new Uint8Array(await response.arrayBuffer()))
|
|
72
|
+
: '';
|
|
73
|
+
const headers = {};
|
|
74
|
+
const cookies = [];
|
|
75
|
+
for (const [name, value] of response.headers) {
|
|
76
|
+
// Fusionner les Set-Cookie dans un seul en-tête casserait les cookies :
|
|
77
|
+
// Function URL les attend dans son champ dédié.
|
|
78
|
+
if (name.toLowerCase() === 'set-cookie')
|
|
79
|
+
cookies.push(value);
|
|
80
|
+
else
|
|
81
|
+
headers[name] = value;
|
|
82
|
+
}
|
|
83
|
+
const setCookie = response.headers.getSetCookie?.();
|
|
84
|
+
return {
|
|
85
|
+
statusCode: response.status,
|
|
86
|
+
headers,
|
|
87
|
+
...(setCookie?.length || cookies.length
|
|
88
|
+
? { cookies: setCookie?.length ? setCookie : cookies }
|
|
89
|
+
: {}),
|
|
90
|
+
body,
|
|
91
|
+
isBase64Encoded: false,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
function decodeLambdaBody(event) {
|
|
95
|
+
if (event.body === undefined || event.body === null)
|
|
96
|
+
return undefined;
|
|
97
|
+
if (!event.isBase64Encoded)
|
|
98
|
+
return new TextEncoder().encode(event.body);
|
|
99
|
+
const binary = atob(event.body);
|
|
100
|
+
return Uint8Array.from(binary, (character) => character.charCodeAt(0));
|
|
101
|
+
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ValueEqualityFn } from './host/craft-compat';
|
|
2
|
-
import { ReadonlySource } from './util/source.type';
|
|
3
|
-
import { SignalSource } from './signal-source';
|
|
1
|
+
import { ValueEqualityFn } from './host/craft-compat.js';
|
|
2
|
+
import { ReadonlySource } from './util/source.type.js';
|
|
3
|
+
import { SignalSource } from './signal-source.js';
|
|
4
4
|
export declare function linkedSource<SourceState, ComputedValue>(signalOrigin: SignalSource<SourceState> | ReadonlySource<SourceState>, computedFn: (sourceValue: NoInfer<SourceState>) => ComputedValue, options?: {
|
|
5
5
|
equal?: ValueEqualityFn<NoInfer<ComputedValue> | undefined>;
|
|
6
6
|
debugName?: string;
|
|
7
7
|
}): SignalSource<ComputedValue>;
|
|
8
|
-
//# sourceMappingURL=linked-source.d.ts.map
|
package/src/lib/linked-source.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { linkedSignal } from './host/craft-compat';
|
|
2
|
-
import { SourceBranded } from './util/util';
|
|
1
|
+
import { linkedSignal } from './host/craft-compat.js';
|
|
2
|
+
import { SourceBranded } from './util/util.js';
|
|
3
3
|
export function linkedSource(signalOrigin, computedFn, options) {
|
|
4
4
|
const listener = (listenerOptions) => linkedSignal({
|
|
5
5
|
source: signalOrigin,
|
|
@@ -21,4 +21,3 @@ export function linkedSource(signalOrigin, computedFn, options) {
|
|
|
21
21
|
}),
|
|
22
22
|
}, SourceBranded);
|
|
23
23
|
}
|
|
24
|
-
//# sourceMappingURL=linked-source.js.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { StorageServiceApi } from './browser-boundaries';
|
|
2
|
-
import { QueriesPersister } from './util/persister.type';
|
|
1
|
+
import type { StorageServiceApi } from './browser-boundaries.js';
|
|
2
|
+
import { QueriesPersister } from './util/persister.type.js';
|
|
3
3
|
export declare function createStoragePersister(prefix: string, storage: StorageServiceApi): QueriesPersister;
|
|
4
|
-
//# sourceMappingURL=local-storage-persister.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { effect, inject, Injector, linkedSignal, signal, untracked, } from './host/craft-compat';
|
|
2
|
-
import { isEqual } from './util/persister.util';
|
|
3
|
-
import { nestedEffect, selfStoppingNestedEffect, } from './util/types/util';
|
|
1
|
+
import { effect, inject, Injector, linkedSignal, signal, untracked, } from './host/craft-compat.js';
|
|
2
|
+
import { isEqual } from './util/persister.util.js';
|
|
3
|
+
import { nestedEffect, selfStoppingNestedEffect, } from './util/types/util.js';
|
|
4
4
|
function diffNewKeys(currentKeys, previous) {
|
|
5
5
|
if (currentKeys.length === 0) {
|
|
6
6
|
return undefined;
|
|
@@ -339,4 +339,3 @@ function removeNotValidRecordsWithValidCacheTime(storageKey, storedValue, cacheT
|
|
|
339
339
|
queryByIdValue: validQueryByIdValue,
|
|
340
340
|
};
|
|
341
341
|
}
|
|
342
|
-
//# sourceMappingURL=local-storage-persister.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CraftSchema, SchemaInput, SchemaOutput } from './schema-validation';
|
|
1
|
+
import type { CraftSchema, SchemaInput, SchemaOutput } from './schema-validation.js';
|
|
2
2
|
/**
|
|
3
3
|
* Briques de typage partagées par les deux familles de middleware — serveur
|
|
4
4
|
* (`craftMiddleware(id).server(...)`) et client (`.client(...)`).
|
|
@@ -28,27 +28,17 @@ export type MergeSchemaInputs<Schemas extends readonly CraftSchema[]> = Schemas
|
|
|
28
28
|
*/
|
|
29
29
|
export type MergeOptionalSchemaOutputs<Schemas extends readonly CraftSchema[]> = Schemas extends readonly [] ? Record<never, never> : MergeSchemaOutputs<Schemas>;
|
|
30
30
|
export type MergeOptionalSchemaInputs<Schemas extends readonly CraftSchema[]> = Schemas extends readonly [] ? Record<never, never> : MergeSchemaInputs<Schemas>;
|
|
31
|
-
declare const MIDDLEWARE_RESULT: unique symbol;
|
|
32
|
-
declare const MIDDLEWARE_DOWNSTREAM_ERROR: unique symbol;
|
|
33
31
|
/**
|
|
34
|
-
*
|
|
32
|
+
* Valeur produite par un middleware serveur.
|
|
35
33
|
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* Conséquence utile : ce type n'est constructible que par `next()`. La chaîne
|
|
41
|
-
* serveur propose en parallèle une forme directe `{ context }` pour les
|
|
42
|
-
* enrichissements synchrones ou Promise, qui fait avancer la chaîne
|
|
43
|
-
* automatiquement.
|
|
34
|
+
* `value` est la valeur métier yieldée par `yield* middleware`. `context` est
|
|
35
|
+
* un fragment optionnel, fusionné uniquement lorsqu'un middleware est
|
|
36
|
+
* branché avec `.use(...)`.
|
|
44
37
|
*/
|
|
45
|
-
export
|
|
46
|
-
readonly
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
export interface MiddlewareDownstreamError {
|
|
50
|
-
readonly [MIDDLEWARE_DOWNSTREAM_ERROR]: true;
|
|
51
|
-
}
|
|
38
|
+
export type CraftMiddlewareResult<Value, ContextOut extends MiddlewareContext = Record<never, never>> = {
|
|
39
|
+
readonly value: Value;
|
|
40
|
+
readonly context?: ContextOut;
|
|
41
|
+
};
|
|
52
42
|
/** Le minimum commun aux deux familles pour être aplati et dédupliqué. */
|
|
53
43
|
export type MiddlewareNode = {
|
|
54
44
|
readonly id: string;
|
|
@@ -63,5 +53,3 @@ export type MiddlewareNode = {
|
|
|
63
53
|
*/
|
|
64
54
|
export declare function flattenMiddlewareGraph<Middleware extends MiddlewareNode>(middlewares: readonly Middleware[]): readonly Middleware[];
|
|
65
55
|
export declare function assertMiddlewareId(id: string): void;
|
|
66
|
-
export {};
|
|
67
|
-
//# sourceMappingURL=middleware-schema-shared.d.ts.map
|
|
@@ -7,8 +7,12 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export function flattenMiddlewareGraph(middlewares) {
|
|
9
9
|
const seen = new Map();
|
|
10
|
+
const visiting = new Set();
|
|
10
11
|
const ordered = [];
|
|
11
12
|
const visit = (middleware) => {
|
|
13
|
+
if (visiting.has(middleware.id)) {
|
|
14
|
+
throw new Error(`Cyclic middleware dependency involving "${middleware.id}".`);
|
|
15
|
+
}
|
|
12
16
|
const known = seen.get(middleware.id);
|
|
13
17
|
if (known) {
|
|
14
18
|
if (known !== middleware) {
|
|
@@ -16,10 +20,12 @@ export function flattenMiddlewareGraph(middlewares) {
|
|
|
16
20
|
}
|
|
17
21
|
return;
|
|
18
22
|
}
|
|
23
|
+
visiting.add(middleware.id);
|
|
19
24
|
seen.set(middleware.id, middleware);
|
|
20
25
|
for (const dependency of middleware.dependencies) {
|
|
21
26
|
visit(dependency);
|
|
22
27
|
}
|
|
28
|
+
visiting.delete(middleware.id);
|
|
23
29
|
ordered.push(middleware);
|
|
24
30
|
};
|
|
25
31
|
for (const middleware of middlewares)
|
|
@@ -31,4 +37,3 @@ export function assertMiddlewareId(id) {
|
|
|
31
37
|
throw new Error(`Invalid middleware id "${id}". Use a stable dotted identifier.`);
|
|
32
38
|
}
|
|
33
39
|
}
|
|
34
|
-
//# sourceMappingURL=middleware-schema-shared.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { CraftHttpRequest, ExtractCraftHttpClientExceptionBodyType, ExtractCraftHttpClientExceptionDependencies } from './craft-http-client';
|
|
2
|
-
import type { AnyCraftException } from './craft-exception';
|
|
3
|
-
import type { MergeObjectUnion, Simplify } from './craft-service.shared';
|
|
1
|
+
import type { CraftHttpRequest, ExtractCraftHttpClientExceptionBodyType, ExtractCraftHttpClientExceptionDependencies } from './craft-http-client.js';
|
|
2
|
+
import type { AnyCraftException } from './craft-exception.js';
|
|
3
|
+
import type { MergeObjectUnion, Simplify } from './craft-service.shared.js';
|
|
4
4
|
type AnyTrackedCraftHttpRequest = CraftHttpRequest<string, string, unknown, unknown, unknown, AnyCraftException>;
|
|
5
5
|
type HttpMockHeaders = Record<string, string | undefined>;
|
|
6
6
|
type RouteMetaDataHttpDeps<RouteMetaData> = RouteMetaData extends {
|
|
@@ -170,4 +170,3 @@ export declare function mockHttpRequestForRoute<const AppKey extends CraftRouteH
|
|
|
170
170
|
*/
|
|
171
171
|
export declare function matchMockHttpRequestForRoute<const RouteMock extends MatchMockHttpRequestForRouteSource>(mockedRoute: RouteMock, request: MatchMockHttpRequestForRouteRequest, options?: MatchMockHttpRequestForRouteOptions): MatchMockHttpRequestForRouteDecision<MatchMockHttpRequestForRouteResponse<RouteMock>>;
|
|
172
172
|
export {};
|
|
173
|
-
//# sourceMappingURL=mock-http-request-for-route.d.ts.map
|
package/src/lib/mutation.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { Provider, ResourceLoaderParams, ResourceOptions, ResourceRef, ResourceStreamingLoader, Signal, WritableSignal } from './host/craft-compat';
|
|
2
|
-
import { InsertionsResourcesFactory, ResourceExceptionConstraints } from './query.core';
|
|
3
|
-
import { GeneratorCompatibleFactory } from './craft-generator-runtime';
|
|
4
|
-
import { type CraftSettledSignal } from './craft-settled';
|
|
5
|
-
import type { ExtractCraftGenExceptions } from './craft-gen';
|
|
6
|
-
import { ResourceByIdRef } from './resource-by-id';
|
|
7
|
-
import { ReadonlySource } from './util/source.type';
|
|
8
|
-
import { CraftResourceStatus } from './util/craft-resource-status';
|
|
9
|
-
import { MergeObjects } from './util/util.type';
|
|
10
|
-
import { CraftResourceRef } from './util/craft-resource-ref';
|
|
11
|
-
import { AnyCraftException, ExtractCraftException, InsertMetaInCraftExceptionIfExists, StripCraftException } from './craft-exception';
|
|
12
|
-
import { type CraftSchema, type SchemaValidationPolicy, type SchemaParseExceptions, type SchemaInput, type SchemaOutput } from './schema-validation';
|
|
13
|
-
import { type NamedCraftPrimitiveGen } from './craft-primitive-gen';
|
|
14
|
-
import type { BrandedServiceProvider, SERVICE_HELPER_DEPENDENCIES, ServiceDependencyMapFromYieldedAndValues } from './craft-service';
|
|
15
|
-
import type { YieldableInvocation } from './yieldable';
|
|
16
|
-
import type { BrandReactiveProperties, YieldableInsertionMethods } from './yieldable';
|
|
17
|
-
import { type YieldableReactiveProperties, type DeepYieldableReactiveValue } from './reactive-read';
|
|
1
|
+
import { Provider, ResourceLoaderParams, ResourceOptions, ResourceRef, ResourceStreamingLoader, Signal, WritableSignal } from './host/craft-compat.js';
|
|
2
|
+
import { InsertionsResourcesFactory, ResourceExceptionConstraints } from './query.core.js';
|
|
3
|
+
import { GeneratorCompatibleFactory } from './craft-generator-runtime.js';
|
|
4
|
+
import { type CraftSettledSignal } from './craft-settled.js';
|
|
5
|
+
import type { ExtractCraftGenExceptions } from './craft-gen.js';
|
|
6
|
+
import { ResourceByIdRef } from './resource-by-id.js';
|
|
7
|
+
import { ReadonlySource } from './util/source.type.js';
|
|
8
|
+
import { CraftResourceStatus } from './util/craft-resource-status.js';
|
|
9
|
+
import { MergeObjects } from './util/util.type.js';
|
|
10
|
+
import { CraftResourceRef } from './util/craft-resource-ref.js';
|
|
11
|
+
import { AnyCraftException, ExtractCraftException, InsertMetaInCraftExceptionIfExists, StripCraftException } from './craft-exception.js';
|
|
12
|
+
import { type CraftSchema, type SchemaValidationPolicy, type SchemaParseExceptions, type SchemaInput, type SchemaOutput } from './schema-validation.js';
|
|
13
|
+
import { type NamedCraftPrimitiveGen } from './craft-primitive-gen.js';
|
|
14
|
+
import type { BrandedServiceProvider, SERVICE_HELPER_DEPENDENCIES, ServiceDependencyMapFromYieldedAndValues } from './craft-service.js';
|
|
15
|
+
import type { YieldableInvocation } from './yieldable.js';
|
|
16
|
+
import type { BrandReactiveProperties, YieldableInsertionMethods } from './yieldable.js';
|
|
17
|
+
import { type YieldableReactiveProperties, type DeepYieldableReactiveValue } from './reactive-read.js';
|
|
18
18
|
type MutationConfigProviderNames<Providers> = Providers extends readonly (infer P)[] ? P extends BrandedServiceProvider<infer Name, any, any> ? Name : never : never;
|
|
19
19
|
type SatisfyDependencies<Deps, SatisfiedNames extends string> = {
|
|
20
20
|
[K in keyof Deps as K extends SatisfiedNames ? never : K]: Deps[K];
|
|
@@ -211,7 +211,7 @@ export type ResourceLikeMutationRef<Value, Params, IsMethod, ArgParams, SourcePa
|
|
|
211
211
|
hasValue(): boolean;
|
|
212
212
|
/**
|
|
213
213
|
* The settled read: never `undefined`, never a value while an exception
|
|
214
|
-
* is carried — it suspends instead, to the nearest `
|
|
214
|
+
* is carried — it suspends instead, to the nearest `pendingNode`.
|
|
215
215
|
*/
|
|
216
216
|
readonly settledValue: CraftSettledSignal<Exclude<Value, undefined>, Name, ResourceLikeMutationExceptionUnion<MutationException>>;
|
|
217
217
|
},
|
|
@@ -329,4 +329,3 @@ export declare function mutation<Name extends string, MutationState extends obje
|
|
|
329
329
|
loader: ExtractCraftException<MutationState> | Extract<ExtractCraftGenExceptions<LoaderYielded>, AnyCraftException>;
|
|
330
330
|
}>(name: Name, mutationConfig: MutationConfig<MutationState, MutationParams, MutationArgsParams, SourceParams, GroupIdentifier, FromObjectGroupIdentifier, FromObjectState, FromObjectResourceParams, ParamsYielded, MethodYielded, LoaderYielded, StreamYielded> & Config, insertion1: InsertionsResourcesFactory<NoInfer<GroupIdentifier>, NoInfer<StripCraftException<MutationState>>, NoInfer<StripCraftException<MutationParams>>, NoInfer<Exceptions>, Insertion1, {}, Insertion1Yielded, Name>): NamedCraftPrimitiveGen<Name, MutationOutput<StripCraftException<MutationState>, StripCraftException<MutationParams>, MutationArgsParams, StripCraftException<MutationParams>, GroupIdentifier, Insertion1, Exceptions, MutationTrackedDependencies<ParamsYielded, MethodYielded, LoaderYielded, StreamYielded, Insertion1Yielded, Providers, Insertion1>, false, MethodYielded, MutationIsMethod<Config, MutationArgsParams>, Name>>;
|
|
331
331
|
export {};
|
|
332
|
-
//# sourceMappingURL=mutation.d.ts.map
|
package/src/lib/mutation.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { assertInInjectionContext, batch, computed, DestroyRef, inject, Injector, isSignal, runInInjectionContext, signal, untracked, } from './host/craft-compat';
|
|
2
|
-
import { takeUntilDestroyed } from './host/craft-compat';
|
|
3
|
-
import { executeGeneratorCompatibleFactory, isGeneratorFunction, } from './craft-generator-runtime';
|
|
4
|
-
import { executeGeneratorCompatibleFactoryAsync } from './craft-program-runtime';
|
|
5
|
-
import { attachCraftSettledValue, createYieldableSettledValue, CraftNotSettled, } from './craft-settled';
|
|
6
|
-
import { resourceById } from './resource-by-id';
|
|
7
|
-
import { toCraftStatus, } from './util/craft-resource-status';
|
|
8
|
-
import { methodParamsWrapperEqual, unwrapMethodParams, wrapMethodParams, } from './util/method-trigger-nonce';
|
|
9
|
-
import { craftResource } from './craft-resource';
|
|
10
|
-
import { preservedResource } from './preserved-resource';
|
|
11
|
-
import { isCraftException, } from './craft-exception';
|
|
12
|
-
import { createResourceExceptionsRuntime, enrichResourceException, } from './resource-exception';
|
|
13
|
-
import { createSchemaValidationRuntime, useSchemaValidationPolicy, } from './schema-validation';
|
|
14
|
-
import { CORRELATION_ID_SERVICE } from './correlation-id';
|
|
15
|
-
import { createNamedPrimitiveGen, } from './craft-primitive-gen';
|
|
16
|
-
import { APP_SNAPSHOT_REGISTRY, INSERTION_SNAPSHOT_REGISTRY, InsertionSnapshotRegistry, TAKE_APP_SNAPSHOT, triggerAndCollectInsertions, } from './take-app-snapshot';
|
|
17
|
-
import { ɵcreateHostTaggedInjector, ɵHOST_TAG_LIST } from './craft-service';
|
|
18
|
-
import { injectFnWrapper } from './fn-wrapper';
|
|
19
|
-
import { ɵprovidePrimitiveMethodRuntimeContext } from './primitive-method-runtime-context';
|
|
20
|
-
import { ɵcreatePrimitiveResourceByIdRuntimeContext, ɵcreatePrimitiveResourceRuntimeContext, ɵobservePrimitiveResourceRuntimeContext, } from './primitive-resource-runtime-context';
|
|
21
|
-
import { createYieldableInsertionMethod, isNonYieldableInsertionMethod, yieldableInvocation, } from './yieldable';
|
|
22
|
-
import { createYieldableReactiveFacade, deepYieldable, hasDeepYieldableInsertion, isYieldableReactiveValue, nameInsertedReactiveValue, } from './reactive-read';
|
|
23
|
-
import { craftUse } from './craft-use';
|
|
1
|
+
import { assertInInjectionContext, batch, computed, DestroyRef, inject, Injector, isSignal, runInInjectionContext, signal, untracked, } from './host/craft-compat.js';
|
|
2
|
+
import { takeUntilDestroyed } from './host/craft-compat.js';
|
|
3
|
+
import { executeGeneratorCompatibleFactory, isGeneratorFunction, } from './craft-generator-runtime.js';
|
|
4
|
+
import { executeGeneratorCompatibleFactoryAsync } from './craft-program-runtime.js';
|
|
5
|
+
import { attachCraftSettledValue, createYieldableSettledValue, CraftNotSettled, } from './craft-settled.js';
|
|
6
|
+
import { resourceById } from './resource-by-id.js';
|
|
7
|
+
import { toCraftStatus, } from './util/craft-resource-status.js';
|
|
8
|
+
import { methodParamsWrapperEqual, unwrapMethodParams, wrapMethodParams, } from './util/method-trigger-nonce.js';
|
|
9
|
+
import { craftResource } from './craft-resource.js';
|
|
10
|
+
import { preservedResource } from './preserved-resource.js';
|
|
11
|
+
import { isCraftException, } from './craft-exception.js';
|
|
12
|
+
import { createResourceExceptionsRuntime, enrichResourceException, } from './resource-exception.js';
|
|
13
|
+
import { createSchemaValidationRuntime, useSchemaValidationPolicy, } from './schema-validation.js';
|
|
14
|
+
import { CORRELATION_ID_SERVICE } from './correlation-id.js';
|
|
15
|
+
import { createNamedPrimitiveGen, } from './craft-primitive-gen.js';
|
|
16
|
+
import { APP_SNAPSHOT_REGISTRY, INSERTION_SNAPSHOT_REGISTRY, InsertionSnapshotRegistry, TAKE_APP_SNAPSHOT, triggerAndCollectInsertions, } from './take-app-snapshot.js';
|
|
17
|
+
import { ɵcreateHostTaggedInjector, ɵHOST_TAG_LIST } from './craft-service.js';
|
|
18
|
+
import { injectFnWrapper } from './fn-wrapper.js';
|
|
19
|
+
import { ɵprovidePrimitiveMethodRuntimeContext } from './primitive-method-runtime-context.js';
|
|
20
|
+
import { ɵcreatePrimitiveResourceByIdRuntimeContext, ɵcreatePrimitiveResourceRuntimeContext, ɵobservePrimitiveResourceRuntimeContext, } from './primitive-resource-runtime-context.js';
|
|
21
|
+
import { createYieldableInsertionMethod, isNonYieldableInsertionMethod, yieldableInvocation, } from './yieldable.js';
|
|
22
|
+
import { createYieldableReactiveFacade, deepYieldable, hasDeepYieldableInsertion, isYieldableReactiveValue, nameInsertedReactiveValue, } from './reactive-read.js';
|
|
23
|
+
import { craftUse } from './craft-use.js';
|
|
24
24
|
const MUTATION_INVALID_YIELD_ERROR_MESSAGE = 'mutation generators can only yield craftService dependencies or exposed dependency helpers.';
|
|
25
25
|
const MUTATION_APP_START_ERROR_MESSAGE = 'mutation generators do not support onAppStart(...).';
|
|
26
26
|
/**
|
|
@@ -920,4 +920,3 @@ function createMutationRef(name, mutationConfig, ...insertions) {
|
|
|
920
920
|
? deepYieldable(publicMutation)
|
|
921
921
|
: publicMutation);
|
|
922
922
|
}
|
|
923
|
-
//# sourceMappingURL=mutation.js.map
|