@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
package/src/lib/craft-pipe.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { inject, Injector, isSignal, runInInjectionContext, } from './host/craft-compat';
|
|
2
|
-
import { isGenerator } from './craft-generator-runtime';
|
|
3
|
-
import { injectFnWrapper } from './fn-wrapper';
|
|
4
|
-
import { ɵcreateHostTaggedInjector } from './craft-service';
|
|
5
|
-
import { isSource } from './util/util';
|
|
6
|
-
import { createYieldableInsertionMethod, isNonYieldableInsertionMethod, isYieldableMethod, } from './yieldable';
|
|
7
|
-
import { isYieldableReactiveValue, nameInsertedReactiveValue, } from './reactive-read';
|
|
1
|
+
import { inject, Injector, isSignal, runInInjectionContext, } from './host/craft-compat.js';
|
|
2
|
+
import { isGenerator } from './craft-generator-runtime.js';
|
|
3
|
+
import { injectFnWrapper } from './fn-wrapper.js';
|
|
4
|
+
import { ɵcreateHostTaggedInjector } from './craft-service.js';
|
|
5
|
+
import { isSource } from './util/util.js';
|
|
6
|
+
import { createYieldableInsertionMethod, isNonYieldableInsertionMethod, isYieldableMethod, } from './yieldable.js';
|
|
7
|
+
import { isYieldableReactiveValue, nameInsertedReactiveValue, } from './reactive-read.js';
|
|
8
8
|
export function* craftPipe(context, ...members) {
|
|
9
9
|
// This generator is driven by the primitive's craft-generator runtime,
|
|
10
10
|
// inside `runInInjectionContext(injector)`: inject() is available on the
|
|
@@ -54,4 +54,3 @@ export function* craftPipe(context, ...members) {
|
|
|
54
54
|
}
|
|
55
55
|
return acc;
|
|
56
56
|
}
|
|
57
|
-
//# sourceMappingURL=craft-pipe.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type CraftHistory } from './host/craft-router-runtime';
|
|
2
|
-
import type { SsrMode } from './craft-ssr';
|
|
1
|
+
import { type CraftHistory } from './host/craft-router-runtime.js';
|
|
2
|
+
import type { SsrMode } from './craft-ssr.js';
|
|
3
3
|
export type CraftPlatformKind = 'browser' | 'server';
|
|
4
4
|
export type CraftStorage = Pick<Storage, 'clear' | 'getItem' | 'key' | 'removeItem' | 'setItem'> & {
|
|
5
5
|
readonly length: number;
|
|
@@ -47,4 +47,3 @@ export declare function createServerPlatform(options?: Readonly<{
|
|
|
47
47
|
document?: Document;
|
|
48
48
|
signal?: AbortSignal;
|
|
49
49
|
}>): CraftPlatform;
|
|
50
|
-
//# sourceMappingURL=craft-platform.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { craftToken } from './host/craft-injector';
|
|
2
|
-
import { createBrowserHistory, createMemoryHistory, } from './host/craft-router-runtime';
|
|
1
|
+
import { craftToken } from './host/craft-injector.js';
|
|
2
|
+
import { createBrowserHistory, createMemoryHistory, } from './host/craft-router-runtime.js';
|
|
3
3
|
export const CRAFT_PLATFORM = craftToken('CraftPlatform');
|
|
4
4
|
export function createMemoryStorage() {
|
|
5
5
|
const values = new Map();
|
|
@@ -172,4 +172,3 @@ function createServerResourceController() {
|
|
|
172
172
|
},
|
|
173
173
|
};
|
|
174
174
|
}
|
|
175
|
-
//# sourceMappingURL=craft-platform.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type Injector, type Signal } from './host/craft-compat';
|
|
2
|
-
import { SERVICE_TRACKED_DEPS_REQUEST_MARKER } from './craft-generator-runtime';
|
|
3
|
-
import type { ConcreteServiceScope } from './craft-service.shared';
|
|
4
|
-
import type { SERVICE_HELPER_DEPENDENCIES } from './craft-service';
|
|
5
|
-
import type { CraftGenExceptionMarker } from './craft-gen';
|
|
6
|
-
import { YIELDABLE_VALUE } from './yieldable';
|
|
7
|
-
import { DEEP_YIELDABLE, type YieldableReactiveValue } from './reactive-read';
|
|
1
|
+
import { type Injector, type Signal } from './host/craft-compat.js';
|
|
2
|
+
import { SERVICE_TRACKED_DEPS_REQUEST_MARKER } from './craft-generator-runtime.js';
|
|
3
|
+
import type { ConcreteServiceScope } from './craft-service.shared.js';
|
|
4
|
+
import type { SERVICE_HELPER_DEPENDENCIES } from './craft-service.js';
|
|
5
|
+
import type { CraftGenExceptionMarker } from './craft-gen.js';
|
|
6
|
+
import { YIELDABLE_VALUE } from './yieldable.js';
|
|
7
|
+
import { DEEP_YIELDABLE, type YieldableReactiveValue } from './reactive-read.js';
|
|
8
8
|
/**
|
|
9
9
|
* Dependency map carried by a primitive (`mutation`, `query`, `asyncProcess`,
|
|
10
10
|
* `state`, `queryParams`, …) on its phantom
|
|
@@ -134,4 +134,3 @@ export declare function createPrimitiveGen<Ref>(ref: Ref): CraftPrimitiveGen<Ref
|
|
|
134
134
|
*/
|
|
135
135
|
export declare function isCraftPrimitiveGen(value: unknown): value is CraftPrimitiveGen<unknown>;
|
|
136
136
|
export {};
|
|
137
|
-
//# sourceMappingURL=craft-primitive-gen.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { isSignal } from './host/craft-compat';
|
|
2
|
-
import { isGenerator, SERVICE_TRACKED_DEPS_REQUEST_MARKER, } from './craft-generator-runtime';
|
|
3
|
-
import { markNamedReactiveProperties, markYieldableValue, YIELDABLE_VALUE, } from './yieldable';
|
|
4
|
-
import { DEEP_YIELDABLE, } from './reactive-read';
|
|
1
|
+
import { isSignal } from './host/craft-compat.js';
|
|
2
|
+
import { isGenerator, SERVICE_TRACKED_DEPS_REQUEST_MARKER, } from './craft-generator-runtime.js';
|
|
3
|
+
import { markNamedReactiveProperties, markYieldableValue, YIELDABLE_VALUE, } from './yieldable.js';
|
|
4
|
+
import { DEEP_YIELDABLE, } from './reactive-read.js';
|
|
5
5
|
/**
|
|
6
6
|
* Resolves a record of generator-compatible values while preserving its keys.
|
|
7
7
|
*
|
|
@@ -73,4 +73,3 @@ export function isCraftPrimitiveGen(value) {
|
|
|
73
73
|
value !== null &&
|
|
74
74
|
CRAFT_PRIMITIVE_GEN_MARKER in value);
|
|
75
75
|
}
|
|
76
|
-
//# sourceMappingURL=craft-primitive-gen.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InjectionToken, type Injector } from './host/craft-compat';
|
|
1
|
+
import { InjectionToken, type Injector } from './host/craft-compat.js';
|
|
2
2
|
/**
|
|
3
3
|
* Primitives that hold a value the registry can read back and write into.
|
|
4
4
|
* `source$` is deliberately absent: an event stream has no state to restore.
|
|
@@ -25,6 +25,8 @@ export type CraftPrimitiveEntry = Readonly<{
|
|
|
25
25
|
write(value: unknown): void;
|
|
26
26
|
status?(): string;
|
|
27
27
|
error?(): unknown;
|
|
28
|
+
/** Explicit opt-out from SSR transfer for secrets and private history. */
|
|
29
|
+
transfer?: boolean;
|
|
28
30
|
/**
|
|
29
31
|
* Re-runs the primitive's loader, when it has one. A resource the snapshot
|
|
30
32
|
* does not cover is reloaded rather than left showing data that belongs to
|
|
@@ -95,6 +97,7 @@ type RegisterOptions = Readonly<{
|
|
|
95
97
|
reload?(): boolean;
|
|
96
98
|
status?(): string;
|
|
97
99
|
error?(): unknown;
|
|
100
|
+
transfer?: boolean;
|
|
98
101
|
/** Resolved from the ambient injection context when omitted. */
|
|
99
102
|
injector?: Injector;
|
|
100
103
|
}>;
|
|
@@ -110,4 +113,3 @@ export type CraftPrimitiveRegistration = Readonly<{
|
|
|
110
113
|
*/
|
|
111
114
|
export declare function ɵregisterCraftPrimitive(options: RegisterOptions): CraftPrimitiveRegistration;
|
|
112
115
|
export {};
|
|
113
|
-
//# sourceMappingURL=craft-primitive-registry.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DestroyRef, inject, InjectionToken, } from './host/craft-compat';
|
|
2
|
-
import { ɵHOST_TAG_LIST } from './craft-service';
|
|
1
|
+
import { DestroyRef, inject, InjectionToken, } from './host/craft-compat.js';
|
|
2
|
+
import { ɵHOST_TAG_LIST } from './craft-service.js';
|
|
3
3
|
export class CraftPrimitiveRegistry {
|
|
4
4
|
entries = new Map();
|
|
5
5
|
occurrences = new Map();
|
|
@@ -143,6 +143,9 @@ export function ɵregisterCraftPrimitive(options) {
|
|
|
143
143
|
...(options.reload ? { reload: options.reload } : {}),
|
|
144
144
|
...(options.status ? { status: options.status } : {}),
|
|
145
145
|
...(options.error ? { error: options.error } : {}),
|
|
146
|
+
// Aucun défaut ici : le transfert d'une primitive est une décision de
|
|
147
|
+
// la politique de sécurité de l'application, pas du framework.
|
|
148
|
+
...(options.transfer === undefined ? {} : { transfer: options.transfer }),
|
|
146
149
|
});
|
|
147
150
|
let destroyRef = null;
|
|
148
151
|
try {
|
|
@@ -156,4 +159,3 @@ export function ɵregisterCraftPrimitive(options) {
|
|
|
156
159
|
destroyRef?.onDestroy(release);
|
|
157
160
|
return { link: (ref) => registry.link(ref, address) };
|
|
158
161
|
}
|
|
159
|
-
//# sourceMappingURL=craft-primitive-registry.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type AnyCraftException, type ExcludeByCode, type ExtractCraftException, type StripCraftException } from './craft-exception';
|
|
2
|
-
import { type CraftGenExceptionMarker, type ExtractCraftGenExceptions } from './craft-gen';
|
|
3
|
-
import { type CraftTemporalSchedule, type RuntimeTemporalAwaitRequest } from './temporal-runtime';
|
|
1
|
+
import { type AnyCraftException, type ExcludeByCode, type ExtractCraftException, type StripCraftException } from './craft-exception.js';
|
|
2
|
+
import { type CraftGenExceptionMarker, type ExtractCraftGenExceptions } from './craft-gen.js';
|
|
3
|
+
import { type CraftTemporalSchedule, type RuntimeTemporalAwaitRequest } from './temporal-runtime.js';
|
|
4
4
|
/**
|
|
5
5
|
* A program operator: takes the piped program and returns the derived one.
|
|
6
6
|
* `YIn`/`AIn` are the source program's yields (markers included) and success
|
|
@@ -98,4 +98,3 @@ export type CraftRetryPolicy = {
|
|
|
98
98
|
*/
|
|
99
99
|
export declare function retry(policy: CraftRetryPolicy): <YIn, AIn>(program: Generator<YIn, AIn, unknown>) => Generator<YIn | RuntimeTemporalAwaitRequest, AIn, unknown>;
|
|
100
100
|
export {};
|
|
101
|
-
//# sourceMappingURL=craft-program-operators.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { isCraftException, } from './craft-exception';
|
|
2
|
-
import { CraftGenShortCircuit, isCraftGenShortCircuit, ɵgetCraftProgramRecreate, } from './craft-gen';
|
|
3
|
-
import { createTemporalSleepRequest, exponentialTemporalSchedule, } from './temporal-runtime';
|
|
4
|
-
import { GUARD_AWAIT_REQUEST_MARKER, isGenerator, } from './craft-generator-runtime';
|
|
1
|
+
import { isCraftException, } from './craft-exception.js';
|
|
2
|
+
import { CraftGenShortCircuit, isCraftGenShortCircuit, ɵgetCraftProgramRecreate, } from './craft-gen.js';
|
|
3
|
+
import { createTemporalSleepRequest, exponentialTemporalSchedule, } from './temporal-runtime.js';
|
|
4
|
+
import { GUARD_AWAIT_REQUEST_MARKER, isGenerator, } from './craft-generator-runtime.js';
|
|
5
5
|
const RETRY_REQUIRES_PROGRAM_ERROR_MESSAGE = 'retry(...) needs a re-invocable craft program (a craftGen invocation or a .pipe stage); a bare generator cannot be replayed.';
|
|
6
6
|
function runHandlerOutput(output) {
|
|
7
7
|
if (isCraftException(output)) {
|
|
@@ -113,4 +113,3 @@ export function retry(policy) {
|
|
|
113
113
|
}
|
|
114
114
|
})();
|
|
115
115
|
}
|
|
116
|
-
//# sourceMappingURL=craft-program-operators.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Injector } from './host/craft-compat';
|
|
2
|
-
import type { AnyCraftException } from './craft-exception';
|
|
3
|
-
import { type RuntimeAwaitRequest } from './craft-generator-runtime';
|
|
1
|
+
import { Injector } from './host/craft-compat.js';
|
|
2
|
+
import type { AnyCraftException } from './craft-exception.js';
|
|
3
|
+
import { type RuntimeAwaitRequest } from './craft-generator-runtime.js';
|
|
4
4
|
/** What a foreign yield settled to, once its bridge resolved it. */
|
|
5
5
|
export type ForeignYieldOutcome = {
|
|
6
6
|
kind: 'value';
|
|
@@ -77,4 +77,3 @@ export declare function executeGeneratorCompatibleFactoryAsync<This, Args extend
|
|
|
77
77
|
appStartNotSupportedErrorMessage?: string;
|
|
78
78
|
abortSignal?: AbortSignal;
|
|
79
79
|
}): Promise<CraftProgramSettledStep>;
|
|
80
|
-
//# sourceMappingURL=craft-program-runtime.d.ts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { computed, DestroyRef, runInInjectionContext, } from './host/craft-compat';
|
|
2
|
-
import { toObservable } from './host/craft-compat';
|
|
1
|
+
import { computed, DestroyRef, runInInjectionContext, } from './host/craft-compat.js';
|
|
2
|
+
import { toObservable } from './host/craft-compat.js';
|
|
3
3
|
import { filter, take } from 'rxjs';
|
|
4
|
-
import { CraftGenShortCircuit, isCraftGenShortCircuit } from './craft-gen';
|
|
5
|
-
import { GUARD_AWAIT_REQUEST_MARKER, isGenerator, isGuardAwaitRequest, isServiceAppStartRequest, resolveCraftGeneratorYield, } from './craft-generator-runtime';
|
|
6
|
-
import { injectFnWrapper } from './fn-wrapper';
|
|
7
|
-
import { ɵcraftInjectorFromHost } from './host/craft-injector-host';
|
|
8
|
-
import { CRAFT_TEMPORAL_RUNTIME, isTemporalAwaitRequest, RealCraftTemporalRuntime, TemporalCancelledError, } from './temporal-runtime';
|
|
4
|
+
import { CraftGenShortCircuit, isCraftGenShortCircuit } from './craft-gen.js';
|
|
5
|
+
import { GUARD_AWAIT_REQUEST_MARKER, isGenerator, isGuardAwaitRequest, isServiceAppStartRequest, resolveCraftGeneratorYield, } from './craft-generator-runtime.js';
|
|
6
|
+
import { injectFnWrapper } from './fn-wrapper.js';
|
|
7
|
+
import { ɵcraftInjectorFromHost } from './host/craft-injector-host.js';
|
|
8
|
+
import { CRAFT_TEMPORAL_RUNTIME, isTemporalAwaitRequest, RealCraftTemporalRuntime, TemporalCancelledError, } from './temporal-runtime.js';
|
|
9
9
|
const FOREIGN_YIELD_OUTCOME = Symbol('foreign-yield-outcome');
|
|
10
10
|
function isTaggedForeignYieldOutcome(value) {
|
|
11
11
|
return (typeof value === 'object' && value !== null && FOREIGN_YIELD_OUTCOME in value);
|
|
@@ -163,4 +163,3 @@ export async function executeGeneratorCompatibleFactoryAsync({ factory, thisArg,
|
|
|
163
163
|
? { kind: 'done', value: await settled.value }
|
|
164
164
|
: settled;
|
|
165
165
|
}
|
|
166
|
-
//# sourceMappingURL=craft-program-runtime.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InjectionToken, type Injector, type Signal } from './host/craft-compat';
|
|
2
|
-
import type { ConcreteServiceScope } from './craft-service.shared';
|
|
1
|
+
import { InjectionToken, type Injector, type Signal } from './host/craft-compat.js';
|
|
2
|
+
import type { ConcreteServiceScope } from './craft-service.shared.js';
|
|
3
3
|
export declare const CRAFT_REGISTRATION_TARGET: unique symbol;
|
|
4
4
|
export type CraftRegistrationTargetMetadata = Readonly<{
|
|
5
5
|
kind: 'component' | 'directive';
|
|
@@ -36,4 +36,3 @@ export declare function createRegisterForRegistry(descriptors: readonly Register
|
|
|
36
36
|
}): RegisterForRegistry;
|
|
37
37
|
export declare function registerResolvedService(injector: Injector, name: string, ref: unknown, hostName: string, scope: ConcreteServiceScope): void;
|
|
38
38
|
export declare function ɵregisterCraftTarget(injector: Injector, target: unknown, ref: unknown, hostName: string, autoCleanup?: boolean): () => void;
|
|
39
|
-
//# sourceMappingURL=craft-register-for-runtime.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DestroyRef, InjectionToken, signal, } from './host/craft-compat';
|
|
2
|
-
import { ɵrunCraftTargetWrappers } from './craft-target-runtime';
|
|
1
|
+
import { DestroyRef, InjectionToken, signal, } from './host/craft-compat.js';
|
|
2
|
+
import { ɵrunCraftTargetWrappers } from './craft-target-runtime.js';
|
|
3
3
|
export const CRAFT_REGISTRATION_TARGET = Symbol.for('@craft-ts/core/craft-registration-target');
|
|
4
4
|
const EMPTY_CLEANUP = () => undefined;
|
|
5
5
|
export const REGISTER_FOR_REGISTRY = new InjectionToken('REGISTER_FOR_REGISTRY', {
|
|
@@ -93,4 +93,3 @@ function toPublicEntry(entry) {
|
|
|
93
93
|
ref: entry.ref,
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
|
-
//# sourceMappingURL=craft-register-for-runtime.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type GetServiceReferenceMeta, type GetServiceReferenceOutput, type ServiceReference } from './craft-service';
|
|
2
|
-
import { CRAFT_REGISTRATION_TARGET, REGISTER_FOR_REGISTRY, type CraftRegistrationTarget, type RegisterForEntry, type RegisterForRegistry, type RegisterForSignal } from './craft-register-for-runtime';
|
|
3
|
-
import { type Provider } from './host/craft-compat';
|
|
1
|
+
import { type GetServiceReferenceMeta, type GetServiceReferenceOutput, type ServiceReference } from './craft-service.js';
|
|
2
|
+
import { CRAFT_REGISTRATION_TARGET, REGISTER_FOR_REGISTRY, type CraftRegistrationTarget, type RegisterForEntry, type RegisterForRegistry, type RegisterForSignal } from './craft-register-for-runtime.js';
|
|
3
|
+
import { type Provider } from './host/craft-compat.js';
|
|
4
4
|
export { CRAFT_REGISTRATION_TARGET, REGISTER_FOR_REGISTRY, type CraftRegistrationTarget, type RegisterForEntry, type RegisterForRegistry, type RegisterForSignal, };
|
|
5
5
|
export type RegisterForOptions = Readonly<{
|
|
6
6
|
/** Track global services resolved below this register. Defaults to true. */
|
|
@@ -54,4 +54,3 @@ export declare function craftRegisterFor<const RegistryName extends string, cons
|
|
|
54
54
|
export declare function craftRegisterFor<const RegistryName extends string, const Target extends AnyRegisterTarget, const Derived extends object>(registryName: RegistryName, target: Target, derive: RegisterForDerivedSelector<readonly [Target], Derived>): CraftRegisterForApi<RegistryName, readonly [Target], Derived>;
|
|
55
55
|
export declare function craftRegisterFor<const RegistryName extends string, const Targets extends readonly AnyRegisterTarget[]>(registryName: RegistryName, targets: Targets, options?: RegisterForOptions): CraftRegisterForApi<RegistryName, Targets>;
|
|
56
56
|
export declare function craftRegisterFor<const RegistryName extends string, const Target extends AnyRegisterTarget>(registryName: RegistryName, target: Target, options?: RegisterForOptions): CraftRegisterForApi<RegistryName, readonly [Target]>;
|
|
57
|
-
//# sourceMappingURL=craft-register-for.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { HOST_TAG_LIST } from './host-tag';
|
|
2
|
-
import { getServiceMetaData, } from './craft-service';
|
|
3
|
-
import { CRAFT_REGISTRATION_TARGET, createRegisterForRegistry, REGISTER_FOR_REGISTRY, registerResolvedService, } from './craft-register-for-runtime';
|
|
4
|
-
import { isGenerator, provideServiceYieldWrapper, } from './craft-generator-runtime';
|
|
5
|
-
import { provideCraftTargetWrapper } from './craft-target-runtime';
|
|
6
|
-
import { assertInInjectionContext, inject, InjectionToken, Injector, } from './host/craft-compat';
|
|
1
|
+
import { HOST_TAG_LIST } from './host-tag.js';
|
|
2
|
+
import { getServiceMetaData, } from './craft-service.js';
|
|
3
|
+
import { CRAFT_REGISTRATION_TARGET, createRegisterForRegistry, REGISTER_FOR_REGISTRY, registerResolvedService, } from './craft-register-for-runtime.js';
|
|
4
|
+
import { isGenerator, provideServiceYieldWrapper, } from './craft-generator-runtime.js';
|
|
5
|
+
import { provideCraftTargetWrapper } from './craft-target-runtime.js';
|
|
6
|
+
import { assertInInjectionContext, inject, InjectionToken, Injector, } from './host/craft-compat.js';
|
|
7
7
|
export { CRAFT_REGISTRATION_TARGET, REGISTER_FOR_REGISTRY, };
|
|
8
8
|
export function craftRegisterFor(registryName, targetsOrTarget, optionsOrDerive = {}) {
|
|
9
9
|
const targets = Array.isArray(targetsOrTarget)
|
|
@@ -197,4 +197,3 @@ function throwIfNoInjectionContext() {
|
|
|
197
197
|
function currentInjector() {
|
|
198
198
|
return inject(Injector);
|
|
199
199
|
}
|
|
200
|
-
//# sourceMappingURL=craft-register-for.js.map
|
|
@@ -16,4 +16,3 @@ export declare const CRAFT_HYDRATION_ID: import("..").CraftToken<Readonly<{
|
|
|
16
16
|
}>>;
|
|
17
17
|
export declare function createCraftRenderIdentity(path: readonly (string | number)[]): CraftRenderIdentity;
|
|
18
18
|
export declare function childCraftRenderIdentity(parent: CraftRenderIdentity, ...segments: readonly (string | number)[]): CraftRenderIdentity;
|
|
19
|
-
//# sourceMappingURL=craft-render-identity.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { craftToken } from './host/craft-injector';
|
|
1
|
+
import { craftToken } from './host/craft-injector.js';
|
|
2
2
|
/**
|
|
3
3
|
* Identity of the component currently being created.
|
|
4
4
|
*
|
|
@@ -20,4 +20,3 @@ export function childCraftRenderIdentity(parent, ...segments) {
|
|
|
20
20
|
function encodeHydrationSegment(segment) {
|
|
21
21
|
return encodeURIComponent(segment).replaceAll('%2F', '%252F');
|
|
22
22
|
}
|
|
23
|
-
//# sourceMappingURL=craft-render-identity.js.map
|
package/src/lib/craft-replay.js
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as Context from 'effect/Context';
|
|
2
|
+
import * as Effect from 'effect/Effect';
|
|
3
|
+
import { type CraftHandshakeName, type CraftHandshakeSchema } from './craft-handshake.js';
|
|
4
|
+
import type { CraftSchema, SchemaOutput } from './schema-validation.js';
|
|
5
|
+
export declare const CRAFT_REQUEST_CONTEXT: unique symbol;
|
|
6
|
+
export type CraftRequestContext<Name extends string, Schema extends CraftSchema> = Context.Service<SchemaOutput<Schema>, SchemaOutput<Schema>> & {
|
|
7
|
+
readonly [CRAFT_REQUEST_CONTEXT]: true;
|
|
8
|
+
readonly handshake: Name;
|
|
9
|
+
readonly schema: Schema;
|
|
10
|
+
};
|
|
11
|
+
export declare function craftRequestContext<Name extends string, Schema extends CraftSchema>(handshake: CraftHandshakeSchema<Name, Schema>): CraftRequestContext<Name, Schema>;
|
|
12
|
+
export declare function craftRequestContext<Name extends string, Schema extends CraftSchema>(handshake: CraftHandshakeName<Name>, schema: Schema): CraftRequestContext<Name, Schema>;
|
|
13
|
+
export declare function isCraftRequestContext(value: unknown): value is CraftRequestContext<string, CraftSchema>;
|
|
14
|
+
export declare function requestContextForHandshake(value: unknown): CraftRequestContext<string, CraftSchema> | undefined;
|
|
15
|
+
export declare function provideCraftRequestContexts<Value>(program: Effect.Effect<Value, unknown, unknown>, schemas: readonly CraftSchema[], value: Record<string, unknown>): Effect.Effect<Value, unknown, unknown>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as Context from 'effect/Context';
|
|
2
|
+
import * as Effect from 'effect/Effect';
|
|
3
|
+
import { craftHandshakeName } from './craft-handshake.js';
|
|
4
|
+
export const CRAFT_REQUEST_CONTEXT = Symbol('craft-request-context');
|
|
5
|
+
const contextsByHandshake = new Map();
|
|
6
|
+
export function craftRequestContext(handshake, schema) {
|
|
7
|
+
const name = craftHandshakeName(handshake);
|
|
8
|
+
if (!name)
|
|
9
|
+
throw new Error('craftRequestContext expects a named craftHandshake.');
|
|
10
|
+
const shape = schema ?? handshake;
|
|
11
|
+
if (!shape['~standard']) {
|
|
12
|
+
throw new Error(`Request context "${name}" requires a schema.`);
|
|
13
|
+
}
|
|
14
|
+
const service = Context.Service(`craft/request-context/${name}`);
|
|
15
|
+
Object.assign(service, {
|
|
16
|
+
[CRAFT_REQUEST_CONTEXT]: true,
|
|
17
|
+
handshake: name,
|
|
18
|
+
schema: shape,
|
|
19
|
+
});
|
|
20
|
+
contextsByHandshake.set(name, service);
|
|
21
|
+
return service;
|
|
22
|
+
}
|
|
23
|
+
export function isCraftRequestContext(value) {
|
|
24
|
+
return typeof value === 'object' && value !== null &&
|
|
25
|
+
value[CRAFT_REQUEST_CONTEXT] === true;
|
|
26
|
+
}
|
|
27
|
+
export function requestContextForHandshake(value) {
|
|
28
|
+
const name = craftHandshakeName(value);
|
|
29
|
+
return name ? contextsByHandshake.get(name) : undefined;
|
|
30
|
+
}
|
|
31
|
+
export function provideCraftRequestContexts(program, schemas, value) {
|
|
32
|
+
let provided = program;
|
|
33
|
+
for (const schema of schemas) {
|
|
34
|
+
const context = requestContextForHandshake(schema);
|
|
35
|
+
if (context) {
|
|
36
|
+
provided = Effect.provideService(provided, context, value);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return provided;
|
|
40
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ActivatedRouteSnapshot, RouterStateSnapshot } from './host/craft-router-types';
|
|
2
|
-
import type { StripCraftException } from './craft-exception';
|
|
1
|
+
import type { ActivatedRouteSnapshot, RouterStateSnapshot } from './host/craft-router-types.js';
|
|
2
|
+
import type { StripCraftException } from './craft-exception.js';
|
|
3
3
|
/**
|
|
4
4
|
* The optional data step of a craft route. Mirrors a route's `canActivate` guard
|
|
5
5
|
* but yields a value rather than a guard decision: it `yield*`s craft services and
|
|
@@ -36,4 +36,3 @@ export type CraftResolveResultFn<Fn> = (route: ActivatedRouteSnapshot, state: Ro
|
|
|
36
36
|
*/
|
|
37
37
|
export declare function craftResolve<Fn extends CraftResolveFn>(resolveFn: Fn): CraftResolveResultFn<Fn>;
|
|
38
38
|
export {};
|
|
39
|
-
//# sourceMappingURL=craft-resolve.d.ts.map
|
package/src/lib/craft-resolve.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ResourceLoaderParams, type ResourceOptions } from './host/craft-compat';
|
|
2
|
-
import { CraftResourceRef } from './util/craft-resource-ref';
|
|
1
|
+
import { type ResourceLoaderParams, type ResourceOptions } from './host/craft-compat.js';
|
|
2
|
+
import { CraftResourceRef } from './util/craft-resource-ref.js';
|
|
3
3
|
type CraftResourceOptions<Value, Params> = Omit<ResourceOptions<Value, Params>, 'loader' | 'stream'> & {
|
|
4
4
|
loader?: (params: ResourceLoaderParams<Params>) => Value | PromiseLike<Value>;
|
|
5
5
|
stream?: ResourceOptions<Value, Params>['stream'];
|
|
@@ -8,4 +8,3 @@ type CraftResourceOptions<Value, Params> = Omit<ResourceOptions<Value, Params>,
|
|
|
8
8
|
};
|
|
9
9
|
export declare function craftResource<Value, Params>(options: CraftResourceOptions<Value, Params>): CraftResourceRef<Value, Params>;
|
|
10
10
|
export {};
|
|
11
|
-
//# sourceMappingURL=craft-resource.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { DestroyRef, effect, inject, Injector, } from './host/craft-compat';
|
|
2
|
-
import { craftBatch, craftComputed, craftSignal, craftWatch, untracked, } from './host/craft-signal';
|
|
3
|
-
import { isCraftReplaying } from './craft-replay';
|
|
4
|
-
import { ɵcraftInjectorFromHost } from './host/craft-injector-host';
|
|
5
|
-
import { CRAFT_PLATFORM } from './craft-platform';
|
|
1
|
+
import { DestroyRef, effect, inject, Injector, } from './host/craft-compat.js';
|
|
2
|
+
import { craftBatch, craftComputed, craftSignal, craftWatch, untracked, } from './host/craft-signal.js';
|
|
3
|
+
import { isCraftReplaying } from './craft-replay.js';
|
|
4
|
+
import { ɵcraftInjectorFromHost } from './host/craft-injector-host.js';
|
|
5
|
+
import { CRAFT_PLATFORM } from './craft-platform.js';
|
|
6
6
|
export function craftResource(options) {
|
|
7
7
|
const injector = ɵcraftInjectorFromHost(options.injector ?? inject(Injector));
|
|
8
8
|
const valueState = craftSignal(options.defaultValue, {
|
|
@@ -146,6 +146,14 @@ export function craftResource(options) {
|
|
|
146
146
|
: undefined;
|
|
147
147
|
let paramsWatch;
|
|
148
148
|
const platform = injector.get(CRAFT_PLATFORM, null);
|
|
149
|
+
const abortForRequest = () => abortController?.abort(platform?.requestSignal?.reason);
|
|
150
|
+
if (platform?.requestSignal) {
|
|
151
|
+
platform.requestSignal.addEventListener('abort', abortForRequest, {
|
|
152
|
+
once: true,
|
|
153
|
+
});
|
|
154
|
+
if (platform.requestSignal.aborted)
|
|
155
|
+
abortForRequest();
|
|
156
|
+
}
|
|
149
157
|
if (platform?.kind === 'server' &&
|
|
150
158
|
platform.serverResources &&
|
|
151
159
|
options.params &&
|
|
@@ -192,6 +200,7 @@ export function craftResource(options) {
|
|
|
192
200
|
statusState.set('idle');
|
|
193
201
|
});
|
|
194
202
|
paramsWatch?.destroy();
|
|
203
|
+
platform?.requestSignal?.removeEventListener('abort', abortForRequest);
|
|
195
204
|
};
|
|
196
205
|
const publish = (next, status) => {
|
|
197
206
|
abortController?.abort();
|
|
@@ -261,4 +270,3 @@ export function craftResource(options) {
|
|
|
261
270
|
injector.get(DestroyRef).onDestroy(destroy);
|
|
262
271
|
return resourceRef;
|
|
263
272
|
}
|
|
264
|
-
//# sourceMappingURL=craft-resource.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { InjectionToken, type Signal, type Type, type WritableSignal } from './host/craft-compat';
|
|
2
|
-
import { CraftRouter, type CraftRouterUrlTreeInput, type CraftRouterYieldRequest, type CraftUrlTree, type NavigableRoutePath } from './craft-router';
|
|
3
|
-
import type { AnyCraftException, CraftException } from './craft-exception';
|
|
4
|
-
import type { ExtractCraftGenExceptions } from './craft-gen';
|
|
5
|
-
import type { ComponentExceptionsOf } from './branded-component/branded-component';
|
|
6
|
-
import type { CraftRouteTarget, CraftRouteTargetInput } from './craft-route-target';
|
|
7
|
-
import { type SERVICE_DEPENDENCY_ACCESS_MARKER, type SERVICE_EXPOSURE_TOKEN_MARKER, type SERVICE_HELPER_DEPENDENCIES, type SERVICE_META_DATA_TYPE, type SERVICE_RUNTIME_META, type SERVICE_YIELD_METADATA, type SERVICE_YIELD_REQUEST_MARKER } from './craft-service';
|
|
1
|
+
import { InjectionToken, type Signal, type Type, type WritableSignal } from './host/craft-compat.js';
|
|
2
|
+
import { CraftRouter, type CraftRouterUrlTreeInput, type CraftRouterYieldRequest, type CraftUrlTree, type NavigableRoutePath } from './craft-router.js';
|
|
3
|
+
import type { AnyCraftException, CraftException } from './craft-exception.js';
|
|
4
|
+
import type { ExtractCraftGenExceptions } from './craft-gen.js';
|
|
5
|
+
import type { ComponentExceptionsOf } from './branded-component/branded-component.js';
|
|
6
|
+
import type { CraftRouteTarget, CraftRouteTargetInput } from './craft-route-target.js';
|
|
7
|
+
import { type SERVICE_DEPENDENCY_ACCESS_MARKER, type SERVICE_EXPOSURE_TOKEN_MARKER, type SERVICE_HELPER_DEPENDENCIES, type SERVICE_META_DATA_TYPE, type SERVICE_RUNTIME_META, type SERVICE_YIELD_METADATA, type SERVICE_YIELD_REQUEST_MARKER } from './craft-service.js';
|
|
8
8
|
/**
|
|
9
9
|
* Centralised, typed exception handling for craft routes.
|
|
10
10
|
*
|
|
@@ -287,16 +287,16 @@ export declare const CraftGlobalError: {
|
|
|
287
287
|
(): Generator<Readonly<{
|
|
288
288
|
name: string;
|
|
289
289
|
providedIn: "global";
|
|
290
|
-
resolve: (injector: import("..").ɵInjector, hostScope: import("./craft-service.shared").ConcreteServiceScope) => Signal<never>;
|
|
290
|
+
resolve: (injector: import("..").ɵInjector, hostScope: import("./craft-service.shared.js").ConcreteServiceScope) => Signal<never>;
|
|
291
291
|
[SERVICE_YIELD_REQUEST_MARKER]: true;
|
|
292
|
-
readonly [SERVICE_YIELD_METADATA]?: import("./craft-service").ServiceTrackingMetadata<"CraftGlobalError", "global", Signal<never>, never, undefined, never, false, false> | undefined;
|
|
292
|
+
readonly [SERVICE_YIELD_METADATA]?: import("./craft-service.js").ServiceTrackingMetadata<"CraftGlobalError", "global", Signal<never>, never, undefined, never, false, false> | undefined;
|
|
293
293
|
}>, Signal<never>, unknown>;
|
|
294
294
|
<Config extends Partial<{}>>(bindings: Exclude<keyof Config, never> extends never ? Config : never): Generator<Readonly<{
|
|
295
295
|
name: string;
|
|
296
296
|
providedIn: "global";
|
|
297
|
-
resolve: (injector: import("..").ɵInjector, hostScope: import("./craft-service.shared").ConcreteServiceScope) => Signal<never>;
|
|
297
|
+
resolve: (injector: import("..").ɵInjector, hostScope: import("./craft-service.shared.js").ConcreteServiceScope) => Signal<never>;
|
|
298
298
|
[SERVICE_YIELD_REQUEST_MARKER]: true;
|
|
299
|
-
readonly [SERVICE_YIELD_METADATA]?: import("./craft-service").ServiceTrackingMetadata<"CraftGlobalError", "global", Signal<never>, never, undefined, never, false, false> | undefined;
|
|
299
|
+
readonly [SERVICE_YIELD_METADATA]?: import("./craft-service.js").ServiceTrackingMetadata<"CraftGlobalError", "global", Signal<never>, never, undefined, never, false, false> | undefined;
|
|
300
300
|
}>, Signal<never>, unknown>;
|
|
301
301
|
<Exposed extends object, Yielded extends Readonly<{
|
|
302
302
|
key: "$self";
|
|
@@ -331,10 +331,10 @@ export declare const CraftGlobalError: {
|
|
|
331
331
|
}> | Readonly<{
|
|
332
332
|
name: string;
|
|
333
333
|
providedIn: "global";
|
|
334
|
-
resolve: (injector: import("..").ɵInjector, hostScope: import("./craft-service.shared").ConcreteServiceScope) => Signal<never>;
|
|
334
|
+
resolve: (injector: import("..").ɵInjector, hostScope: import("./craft-service.shared.js").ConcreteServiceScope) => Signal<never>;
|
|
335
335
|
[SERVICE_YIELD_REQUEST_MARKER]: true;
|
|
336
|
-
readonly [SERVICE_YIELD_METADATA]?: import("./craft-service").ServiceTrackingMetadata<"CraftGlobalError", "global", Signal<never>, never, {
|
|
337
|
-
derivedPropertiesUsed: import("./craft-service.shared").MergeObjectUnion<{ [Key_1 in keyof Exposed]-?: [Exposed[Key_1] extends infer T_1 ? T_1 extends Exposed[Key_1] ? T_1 extends {
|
|
336
|
+
readonly [SERVICE_YIELD_METADATA]?: import("./craft-service.js").ServiceTrackingMetadata<"CraftGlobalError", "global", Signal<never>, never, {
|
|
337
|
+
derivedPropertiesUsed: import("./craft-service.shared.js").MergeObjectUnion<{ [Key_1 in keyof Exposed]-?: [Exposed[Key_1] extends infer T_1 ? T_1 extends Exposed[Key_1] ? T_1 extends {
|
|
338
338
|
readonly [SERVICE_EXPOSURE_TOKEN_MARKER]: {
|
|
339
339
|
key: infer Key_3 extends string;
|
|
340
340
|
value: any;
|
|
@@ -354,12 +354,12 @@ export declare const CraftGlobalError: {
|
|
|
354
354
|
key: any;
|
|
355
355
|
value: infer Resolved;
|
|
356
356
|
};
|
|
357
|
-
} ? Resolved : never : never : never; }; }[keyof Exposed]> & import("./craft-service.shared").MergeObjectUnion<Yielded extends Readonly<{
|
|
357
|
+
} ? Resolved : never : never : never; }; }[keyof Exposed]> & import("./craft-service.shared.js").MergeObjectUnion<Yielded extends Readonly<{
|
|
358
358
|
key: infer Key_2 extends string;
|
|
359
359
|
resolve: () => infer Result;
|
|
360
360
|
[SERVICE_DEPENDENCY_ACCESS_MARKER]: true;
|
|
361
361
|
}> ? { [Property in Key_2]: Result; } : never> extends infer T ? { [Key in keyof T]: T[Key]; } : never;
|
|
362
|
-
derivedPropertiesExposed: import("./craft-service.shared").MergeObjectUnion<{ [Key_4 in keyof Exposed]-?: [Exposed[Key_4] extends infer T_2 ? T_2 extends Exposed[Key_4] ? T_2 extends {
|
|
362
|
+
derivedPropertiesExposed: import("./craft-service.shared.js").MergeObjectUnion<{ [Key_4 in keyof Exposed]-?: [Exposed[Key_4] extends infer T_2 ? T_2 extends Exposed[Key_4] ? T_2 extends {
|
|
363
363
|
readonly [SERVICE_EXPOSURE_TOKEN_MARKER]: {
|
|
364
364
|
key: infer Key_6 extends string;
|
|
365
365
|
value: any;
|
|
@@ -466,7 +466,7 @@ export declare const CraftGlobalError: {
|
|
|
466
466
|
key: any;
|
|
467
467
|
value: infer Resolved;
|
|
468
468
|
};
|
|
469
|
-
} ? Resolved : never : never : never) ? T_4 extends object ? import("./reactive-read").YieldableReactiveProperties<Omit<T_4, "$self">> : T_4 : never : never) : (([Extract<{ [Key_5 in keyof Exposed]-?: (Exposed[Key_5] extends infer T_6 ? T_6 extends Exposed[Key_5] ? T_6 extends {
|
|
469
|
+
} ? Resolved : never : never : never) ? T_4 extends object ? import("./reactive-read.js").YieldableReactiveProperties<Omit<T_4, "$self">> : T_4 : never : never) : (([Extract<{ [Key_5 in keyof Exposed]-?: (Exposed[Key_5] extends infer T_6 ? T_6 extends Exposed[Key_5] ? T_6 extends {
|
|
470
470
|
readonly [SERVICE_EXPOSURE_TOKEN_MARKER]: {
|
|
471
471
|
key: infer Key_10 extends string;
|
|
472
472
|
value: any;
|
|
@@ -526,7 +526,7 @@ export declare const CraftGlobalError: {
|
|
|
526
526
|
key: any;
|
|
527
527
|
value: infer Resolved;
|
|
528
528
|
};
|
|
529
|
-
} ? Resolved : never : never : never) ? T_7 extends object ? import("./reactive-read").YieldableReactiveProperties<Omit<T_7, "$self">> : T_7 : never : never, unknown>;
|
|
529
|
+
} ? Resolved : never : never : never) ? T_7 extends object ? import("./reactive-read.js").YieldableReactiveProperties<Omit<T_7, "$self">> : T_7 : never : never, unknown>;
|
|
530
530
|
<Config extends Partial<{}>, Exposed extends object, Yielded extends Readonly<{
|
|
531
531
|
key: "$self";
|
|
532
532
|
resolve: () => Signal<never>;
|
|
@@ -560,10 +560,10 @@ export declare const CraftGlobalError: {
|
|
|
560
560
|
}> | Readonly<{
|
|
561
561
|
name: string;
|
|
562
562
|
providedIn: "global";
|
|
563
|
-
resolve: (injector: import("..").ɵInjector, hostScope: import("./craft-service.shared").ConcreteServiceScope) => Signal<never>;
|
|
563
|
+
resolve: (injector: import("..").ɵInjector, hostScope: import("./craft-service.shared.js").ConcreteServiceScope) => Signal<never>;
|
|
564
564
|
[SERVICE_YIELD_REQUEST_MARKER]: true;
|
|
565
|
-
readonly [SERVICE_YIELD_METADATA]?: import("./craft-service").ServiceTrackingMetadata<"CraftGlobalError", "global", Signal<never>, never, {
|
|
566
|
-
derivedPropertiesUsed: import("./craft-service.shared").MergeObjectUnion<{ [Key_1 in keyof Exposed]-?: [Exposed[Key_1] extends infer T_1 ? T_1 extends Exposed[Key_1] ? T_1 extends {
|
|
565
|
+
readonly [SERVICE_YIELD_METADATA]?: import("./craft-service.js").ServiceTrackingMetadata<"CraftGlobalError", "global", Signal<never>, never, {
|
|
566
|
+
derivedPropertiesUsed: import("./craft-service.shared.js").MergeObjectUnion<{ [Key_1 in keyof Exposed]-?: [Exposed[Key_1] extends infer T_1 ? T_1 extends Exposed[Key_1] ? T_1 extends {
|
|
567
567
|
readonly [SERVICE_EXPOSURE_TOKEN_MARKER]: {
|
|
568
568
|
key: infer Key_3 extends string;
|
|
569
569
|
value: any;
|
|
@@ -583,12 +583,12 @@ export declare const CraftGlobalError: {
|
|
|
583
583
|
key: any;
|
|
584
584
|
value: infer Resolved;
|
|
585
585
|
};
|
|
586
|
-
} ? Resolved : never : never : never; }; }[keyof Exposed]> & import("./craft-service.shared").MergeObjectUnion<Yielded extends Readonly<{
|
|
586
|
+
} ? Resolved : never : never : never; }; }[keyof Exposed]> & import("./craft-service.shared.js").MergeObjectUnion<Yielded extends Readonly<{
|
|
587
587
|
key: infer Key_2 extends string;
|
|
588
588
|
resolve: () => infer Result;
|
|
589
589
|
[SERVICE_DEPENDENCY_ACCESS_MARKER]: true;
|
|
590
590
|
}> ? { [Property in Key_2]: Result; } : never> extends infer T ? { [Key in keyof T]: T[Key]; } : never;
|
|
591
|
-
derivedPropertiesExposed: import("./craft-service.shared").MergeObjectUnion<{ [Key_4 in keyof Exposed]-?: [Exposed[Key_4] extends infer T_2 ? T_2 extends Exposed[Key_4] ? T_2 extends {
|
|
591
|
+
derivedPropertiesExposed: import("./craft-service.shared.js").MergeObjectUnion<{ [Key_4 in keyof Exposed]-?: [Exposed[Key_4] extends infer T_2 ? T_2 extends Exposed[Key_4] ? T_2 extends {
|
|
592
592
|
readonly [SERVICE_EXPOSURE_TOKEN_MARKER]: {
|
|
593
593
|
key: infer Key_6 extends string;
|
|
594
594
|
value: any;
|
|
@@ -695,7 +695,7 @@ export declare const CraftGlobalError: {
|
|
|
695
695
|
key: any;
|
|
696
696
|
value: infer Resolved;
|
|
697
697
|
};
|
|
698
|
-
} ? Resolved : never : never : never) ? T_4 extends object ? import("./reactive-read").YieldableReactiveProperties<Omit<T_4, "$self">> : T_4 : never : never) : (([Extract<{ [Key_5 in keyof Exposed]-?: (Exposed[Key_5] extends infer T_6 ? T_6 extends Exposed[Key_5] ? T_6 extends {
|
|
698
|
+
} ? Resolved : never : never : never) ? T_4 extends object ? import("./reactive-read.js").YieldableReactiveProperties<Omit<T_4, "$self">> : T_4 : never : never) : (([Extract<{ [Key_5 in keyof Exposed]-?: (Exposed[Key_5] extends infer T_6 ? T_6 extends Exposed[Key_5] ? T_6 extends {
|
|
699
699
|
readonly [SERVICE_EXPOSURE_TOKEN_MARKER]: {
|
|
700
700
|
key: infer Key_10 extends string;
|
|
701
701
|
value: any;
|
|
@@ -755,7 +755,7 @@ export declare const CraftGlobalError: {
|
|
|
755
755
|
key: any;
|
|
756
756
|
value: infer Resolved;
|
|
757
757
|
};
|
|
758
|
-
} ? Resolved : never : never : never) ? T_7 extends object ? import("./reactive-read").YieldableReactiveProperties<Omit<T_7, "$self">> : T_7 : never : never, unknown>;
|
|
758
|
+
} ? Resolved : never : never : never) ? T_7 extends object ? import("./reactive-read.js").YieldableReactiveProperties<Omit<T_7, "$self">> : T_7 : never : never, unknown>;
|
|
759
759
|
} & {} & {
|
|
760
760
|
readonly [SERVICE_RUNTIME_META]?: {
|
|
761
761
|
readonly kind: "service-meta-data";
|
|
@@ -773,13 +773,12 @@ export declare const CraftGlobalError: {
|
|
|
773
773
|
browserBoundary: false;
|
|
774
774
|
appStart: false;
|
|
775
775
|
};
|
|
776
|
-
tracking: import("./craft-service").ServiceTrackingMetadata<"CraftGlobalError", "global", Signal<never>, never, undefined, never, false, false>;
|
|
776
|
+
tracking: import("./craft-service.js").ServiceTrackingMetadata<"CraftGlobalError", "global", Signal<never>, never, undefined, never, false, false>;
|
|
777
777
|
providedInput: never;
|
|
778
778
|
} | undefined;
|
|
779
779
|
readonly [SERVICE_RUNTIME_META]?: /*elided*/ any | undefined;
|
|
780
780
|
} | undefined;
|
|
781
781
|
} & {
|
|
782
|
-
readonly [SERVICE_HELPER_DEPENDENCIES]?: import("./craft-service").ServiceTrackingMetadata<"CraftGlobalError", "global", Signal<never>, never, undefined, never, false, false> | undefined;
|
|
782
|
+
readonly [SERVICE_HELPER_DEPENDENCIES]?: import("./craft-service.js").ServiceTrackingMetadata<"CraftGlobalError", "global", Signal<never>, never, undefined, never, false, false> | undefined;
|
|
783
783
|
};
|
|
784
784
|
export {};
|
|
785
|
-
//# sourceMappingURL=craft-route-exceptions.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { inject, InjectionToken, signal, } from './host/craft-compat';
|
|
2
|
-
import { CraftRouter, } from './craft-router';
|
|
3
|
-
import { ɵtoCraftService as toCraftService, } from './craft-service';
|
|
1
|
+
import { inject, InjectionToken, signal, } from './host/craft-compat.js';
|
|
2
|
+
import { CraftRouter, } from './craft-router.js';
|
|
3
|
+
import { ɵtoCraftService as toCraftService, } from './craft-service.js';
|
|
4
4
|
/** Brands a generator as a route exception handler while preserving its exact type. */
|
|
5
5
|
export function craftExceptionHandler(handler) {
|
|
6
6
|
return handler;
|
|
@@ -83,4 +83,3 @@ const craftGlobalErrorService = toCraftService({
|
|
|
83
83
|
* `CraftGlobalError` dependency, exactly like the property form.
|
|
84
84
|
*/
|
|
85
85
|
export const CraftGlobalError = craftGlobalErrorService.CraftGlobalError;
|
|
86
|
-
//# sourceMappingURL=craft-route-exceptions.js.map
|