@satorio/machinery 0.2.1
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/LICENSE +21 -0
- package/README.md +71 -0
- package/dictionary/all.json +4656 -0
- package/dictionary/all.toon +639 -0
- package/dictionary/core.json +221 -0
- package/dictionary/core.toon +33 -0
- package/dictionary/graphql.json +212 -0
- package/dictionary/graphql.toon +32 -0
- package/dictionary/http.json +113 -0
- package/dictionary/http.toon +21 -0
- package/dictionary/identifiers.json +266 -0
- package/dictionary/identifiers.toon +38 -0
- package/dictionary/index.json +96 -0
- package/dictionary/index.toon +18 -0
- package/dictionary/integration.json +131 -0
- package/dictionary/integration.toon +23 -0
- package/dictionary/money.json +383 -0
- package/dictionary/money.toon +51 -0
- package/dictionary/ports.json +392 -0
- package/dictionary/ports.toon +52 -0
- package/dictionary/postgres.json +473 -0
- package/dictionary/postgres.toon +61 -0
- package/dictionary/publishing.json +131 -0
- package/dictionary/publishing.toon +23 -0
- package/dictionary/queue.json +365 -0
- package/dictionary/queue.toon +49 -0
- package/dictionary/reference/api.mdx +843 -0
- package/dictionary/reference/uk/api.mdx +844 -0
- package/dictionary/storage.json +194 -0
- package/dictionary/storage.toon +30 -0
- package/dictionary/testing.json +707 -0
- package/dictionary/testing.toon +87 -0
- package/dictionary/time.json +311 -0
- package/dictionary/time.toon +43 -0
- package/dictionary/vitest.json +356 -0
- package/dictionary/vitest.toon +48 -0
- package/dictionary/workflow.json +185 -0
- package/dictionary/workflow.toon +29 -0
- package/dist/bin/command.d.ts +45 -0
- package/dist/bin/command.js +113 -0
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +11 -0
- package/dist/core/bigint-json.d.ts +6 -0
- package/dist/core/bigint-json.js +6 -0
- package/dist/core/closed-set.d.ts +14 -0
- package/dist/core/closed-set.js +8 -0
- package/dist/core/domain-error.d.ts +8 -0
- package/dist/core/domain-error.js +11 -0
- package/dist/core/environment.d.ts +124 -0
- package/dist/core/environment.js +115 -0
- package/dist/core/index.d.ts +13 -0
- package/dist/core/index.js +13 -0
- package/dist/core/ulid.d.ts +27 -0
- package/dist/core/ulid.js +27 -0
- package/dist/graphql/builder.d.ts +36 -0
- package/dist/graphql/builder.js +35 -0
- package/dist/graphql/context.d.ts +36 -0
- package/dist/graphql/context.js +69 -0
- package/dist/graphql/failure-classification.d.ts +11 -0
- package/dist/graphql/failure-classification.js +1 -0
- package/dist/graphql/failures.d.ts +62 -0
- package/dist/graphql/failures.js +30 -0
- package/dist/graphql/graphiql.d.ts +45 -0
- package/dist/graphql/graphiql.js +56 -0
- package/dist/graphql/index.d.ts +15 -0
- package/dist/graphql/index.js +14 -0
- package/dist/graphql/layer.d.ts +15 -0
- package/dist/graphql/layer.js +23 -0
- package/dist/graphql/request-handler.d.ts +26 -0
- package/dist/graphql/request-handler.js +33 -0
- package/dist/graphql/server.d.ts +19 -0
- package/dist/graphql/server.js +16 -0
- package/dist/graphql/settings.d.ts +55 -0
- package/dist/graphql/settings.js +82 -0
- package/dist/http/health.d.ts +70 -0
- package/dist/http/health.js +60 -0
- package/dist/http/index.d.ts +5 -0
- package/dist/http/index.js +5 -0
- package/dist/identifiers/client-code.d.ts +37 -0
- package/dist/identifiers/client-code.js +41 -0
- package/dist/identifiers/creditor-reference.d.ts +38 -0
- package/dist/identifiers/creditor-reference.js +32 -0
- package/dist/identifiers/damm.d.ts +22 -0
- package/dist/identifiers/damm.js +50 -0
- package/dist/identifiers/document-number.d.ts +68 -0
- package/dist/identifiers/document-number.js +73 -0
- package/dist/identifiers/document-numbers.d.ts +27 -0
- package/dist/identifiers/document-numbers.js +16 -0
- package/dist/identifiers/failures.d.ts +46 -0
- package/dist/identifiers/failures.js +48 -0
- package/dist/identifiers/index.d.ts +14 -0
- package/dist/identifiers/index.js +13 -0
- package/dist/identifiers/next-document-number.d.ts +26 -0
- package/dist/identifiers/next-document-number.js +31 -0
- package/dist/identifiers/ulid.d.ts +28 -0
- package/dist/identifiers/ulid.js +71 -0
- package/dist/integration/external-http-client.d.ts +22 -0
- package/dist/integration/external-http-client.js +74 -0
- package/dist/integration/index.d.ts +12 -0
- package/dist/integration/index.js +12 -0
- package/dist/integration/layer.d.ts +19 -0
- package/dist/integration/layer.js +30 -0
- package/dist/integration/retry.d.ts +65 -0
- package/dist/integration/retry.js +54 -0
- package/dist/integration/settings.d.ts +73 -0
- package/dist/integration/settings.js +92 -0
- package/dist/money/amount.d.ts +60 -0
- package/dist/money/amount.js +67 -0
- package/dist/money/arithmetic.d.ts +60 -0
- package/dist/money/arithmetic.js +73 -0
- package/dist/money/currency.d.ts +25 -0
- package/dist/money/currency.js +24 -0
- package/dist/money/decimal.d.ts +29 -0
- package/dist/money/decimal.js +39 -0
- package/dist/money/exchange-rate.d.ts +32 -0
- package/dist/money/exchange-rate.js +28 -0
- package/dist/money/failures.d.ts +86 -0
- package/dist/money/failures.js +97 -0
- package/dist/money/index.d.ts +15 -0
- package/dist/money/index.js +15 -0
- package/dist/money/percent.d.ts +35 -0
- package/dist/money/percent.js +50 -0
- package/dist/money/schema.d.ts +25 -0
- package/dist/money/schema.js +41 -0
- package/dist/ports/blob-store.d.ts +42 -0
- package/dist/ports/blob-store.js +13 -0
- package/dist/ports/document-number-counter.d.ts +36 -0
- package/dist/ports/document-number-counter.js +12 -0
- package/dist/ports/event-publisher.d.ts +29 -0
- package/dist/ports/event-publisher.js +13 -0
- package/dist/ports/external-http-client.d.ts +60 -0
- package/dist/ports/external-http-client.js +25 -0
- package/dist/ports/index.d.ts +17 -0
- package/dist/ports/index.js +17 -0
- package/dist/ports/integration-event-outbox.d.ts +44 -0
- package/dist/ports/integration-event-outbox.js +13 -0
- package/dist/ports/port-unavailable.d.ts +21 -0
- package/dist/ports/port-unavailable.js +30 -0
- package/dist/ports/processed-event-registry.d.ts +57 -0
- package/dist/ports/processed-event-registry.js +24 -0
- package/dist/ports/queue-message-producer.d.ts +26 -0
- package/dist/ports/queue-message-producer.js +12 -0
- package/dist/ports/queue-message-source.d.ts +39 -0
- package/dist/ports/queue-message-source.js +13 -0
- package/dist/ports/readiness-probe.d.ts +27 -0
- package/dist/ports/readiness-probe.js +13 -0
- package/dist/ports/transaction-boundary.d.ts +28 -0
- package/dist/ports/transaction-boundary.js +13 -0
- package/dist/postgres/client.d.ts +51 -0
- package/dist/postgres/client.js +81 -0
- package/dist/postgres/document-number-counter.d.ts +14 -0
- package/dist/postgres/document-number-counter.js +27 -0
- package/dist/postgres/failures.d.ts +28 -0
- package/dist/postgres/failures.js +18 -0
- package/dist/postgres/index.d.ts +18 -0
- package/dist/postgres/index.js +18 -0
- package/dist/postgres/integration-event-outbox.d.ts +15 -0
- package/dist/postgres/integration-event-outbox.js +60 -0
- package/dist/postgres/jsonb-value.d.ts +10 -0
- package/dist/postgres/jsonb-value.js +9 -0
- package/dist/postgres/layer.d.ts +57 -0
- package/dist/postgres/layer.js +72 -0
- package/dist/postgres/migrations/advisory-lock.d.ts +47 -0
- package/dist/postgres/migrations/advisory-lock.js +59 -0
- package/dist/postgres/migrations/runner.d.ts +56 -0
- package/dist/postgres/migrations/runner.js +69 -0
- package/dist/postgres/migrations/sql-file-loader.d.ts +59 -0
- package/dist/postgres/migrations/sql-file-loader.js +99 -0
- package/dist/postgres/processed-event-registry.d.ts +13 -0
- package/dist/postgres/processed-event-registry.js +44 -0
- package/dist/postgres/readiness-probe.d.ts +27 -0
- package/dist/postgres/readiness-probe.js +33 -0
- package/dist/postgres/settings.d.ts +134 -0
- package/dist/postgres/settings.js +210 -0
- package/dist/postgres/sql/0001_processed_event.sql +4 -0
- package/dist/postgres/sql/0002_integration_event_outbox.sql +13 -0
- package/dist/postgres/sql/0003_document_number_counter.sql +6 -0
- package/dist/postgres/sql-failure.d.ts +19 -0
- package/dist/postgres/sql-failure.js +22 -0
- package/dist/postgres/store-failure.d.ts +17 -0
- package/dist/postgres/store-failure.js +16 -0
- package/dist/postgres/transaction-boundary.d.ts +13 -0
- package/dist/postgres/transaction-boundary.js +21 -0
- package/dist/publishing/event-publisher.sns.d.ts +66 -0
- package/dist/publishing/event-publisher.sns.js +75 -0
- package/dist/publishing/event-publisher.stdout.d.ts +15 -0
- package/dist/publishing/event-publisher.stdout.js +24 -0
- package/dist/publishing/index.d.ts +10 -0
- package/dist/publishing/index.js +10 -0
- package/dist/publishing/layer.d.ts +25 -0
- package/dist/publishing/layer.js +39 -0
- package/dist/publishing/settings.d.ts +60 -0
- package/dist/publishing/settings.js +85 -0
- package/dist/queue/consumer.d.ts +91 -0
- package/dist/queue/consumer.js +92 -0
- package/dist/queue/envelope.d.ts +39 -0
- package/dist/queue/envelope.js +39 -0
- package/dist/queue/failures.d.ts +33 -0
- package/dist/queue/failures.js +15 -0
- package/dist/queue/index.d.ts +14 -0
- package/dist/queue/index.js +14 -0
- package/dist/queue/layer.d.ts +33 -0
- package/dist/queue/layer.js +58 -0
- package/dist/queue/message-codec.d.ts +43 -0
- package/dist/queue/message-codec.js +33 -0
- package/dist/queue/queue-message-producer.d.ts +61 -0
- package/dist/queue/queue-message-producer.js +52 -0
- package/dist/queue/queue-message-source.d.ts +93 -0
- package/dist/queue/queue-message-source.js +86 -0
- package/dist/queue/readiness.d.ts +78 -0
- package/dist/queue/readiness.js +86 -0
- package/dist/queue/settings.d.ts +106 -0
- package/dist/queue/settings.js +160 -0
- package/dist/storage/blob-store.d.ts +84 -0
- package/dist/storage/blob-store.js +109 -0
- package/dist/storage/index.d.ts +9 -0
- package/dist/storage/index.js +9 -0
- package/dist/storage/layer.d.ts +17 -0
- package/dist/storage/layer.js +30 -0
- package/dist/storage/settings.d.ts +48 -0
- package/dist/storage/settings.js +65 -0
- package/dist/testing/blob-store.d.ts +27 -0
- package/dist/testing/blob-store.js +45 -0
- package/dist/testing/clock.d.ts +29 -0
- package/dist/testing/clock.js +41 -0
- package/dist/testing/dna-perturbator/attention.d.ts +55 -0
- package/dist/testing/dna-perturbator/attention.js +49 -0
- package/dist/testing/dna-perturbator/chains.d.ts +31 -0
- package/dist/testing/dna-perturbator/chains.js +53 -0
- package/dist/testing/dna-perturbator/report.d.ts +12 -0
- package/dist/testing/dna-perturbator/report.js +22 -0
- package/dist/testing/dna-perturbator/verdict.d.ts +26 -0
- package/dist/testing/dna-perturbator/verdict.js +28 -0
- package/dist/testing/dna-perturbator.d.ts +48 -0
- package/dist/testing/dna-perturbator.js +145 -0
- package/dist/testing/document-number-counter.d.ts +29 -0
- package/dist/testing/document-number-counter.js +39 -0
- package/dist/testing/event-publisher.d.ts +28 -0
- package/dist/testing/event-publisher.js +33 -0
- package/dist/testing/external-http-client.d.ts +29 -0
- package/dist/testing/external-http-client.js +49 -0
- package/dist/testing/index.d.ts +24 -0
- package/dist/testing/index.js +24 -0
- package/dist/testing/integration-event-outbox.d.ts +37 -0
- package/dist/testing/integration-event-outbox.js +67 -0
- package/dist/testing/mutation-settings.d.ts +71 -0
- package/dist/testing/mutation-settings.js +57 -0
- package/dist/testing/postgres-rows.d.ts +12 -0
- package/dist/testing/postgres-rows.js +19 -0
- package/dist/testing/processed-event-registry.d.ts +25 -0
- package/dist/testing/processed-event-registry.js +39 -0
- package/dist/testing/queue-message-producer.d.ts +27 -0
- package/dist/testing/queue-message-producer.js +41 -0
- package/dist/testing/queue-message-source.d.ts +54 -0
- package/dist/testing/queue-message-source.js +71 -0
- package/dist/testing/quiet-reporter.d.ts +86 -0
- package/dist/testing/quiet-reporter.js +81 -0
- package/dist/testing/readiness-probe.d.ts +27 -0
- package/dist/testing/readiness-probe.js +33 -0
- package/dist/testing/scenario.d.ts +94 -0
- package/dist/testing/scenario.js +81 -0
- package/dist/testing/transaction-boundary.d.ts +30 -0
- package/dist/testing/transaction-boundary.js +36 -0
- package/dist/testing/typed-failure.d.ts +8 -0
- package/dist/testing/typed-failure.js +15 -0
- package/dist/time/calendar-day.d.ts +83 -0
- package/dist/time/calendar-day.js +112 -0
- package/dist/time/failures.d.ts +51 -0
- package/dist/time/failures.js +56 -0
- package/dist/time/index.d.ts +11 -0
- package/dist/time/index.js +11 -0
- package/dist/time/instant.d.ts +64 -0
- package/dist/time/instant.js +67 -0
- package/dist/time/period.d.ts +45 -0
- package/dist/time/period.js +55 -0
- package/dist/vitest/container-reuse.d.ts +14 -0
- package/dist/vitest/container-reuse.js +15 -0
- package/dist/vitest/dotenv.d.ts +16 -0
- package/dist/vitest/dotenv.js +48 -0
- package/dist/vitest/effect-single-instance.d.ts +36 -0
- package/dist/vitest/effect-single-instance.js +125 -0
- package/dist/vitest/fast-check-single-instance.d.ts +11 -0
- package/dist/vitest/fast-check-single-instance.js +26 -0
- package/dist/vitest/index.d.ts +31 -0
- package/dist/vitest/index.js +30 -0
- package/dist/vitest/localstack-container.d.ts +32 -0
- package/dist/vitest/localstack-container.js +55 -0
- package/dist/vitest/port-contract-tester.d.ts +8 -0
- package/dist/vitest/port-contract-tester.js +1 -0
- package/dist/vitest/port-contracts/blob-store.contract.d.ts +22 -0
- package/dist/vitest/port-contracts/blob-store.contract.js +108 -0
- package/dist/vitest/port-contracts/document-number-counter.contract.d.ts +18 -0
- package/dist/vitest/port-contracts/document-number-counter.contract.js +90 -0
- package/dist/vitest/port-contracts/event-publisher.contract.d.ts +35 -0
- package/dist/vitest/port-contracts/event-publisher.contract.js +67 -0
- package/dist/vitest/port-contracts/external-http-client.contract.d.ts +35 -0
- package/dist/vitest/port-contracts/external-http-client.contract.js +52 -0
- package/dist/vitest/port-contracts/integration-event-outbox.contract.d.ts +23 -0
- package/dist/vitest/port-contracts/integration-event-outbox.contract.js +75 -0
- package/dist/vitest/port-contracts/processed-event-registry.contract.d.ts +18 -0
- package/dist/vitest/port-contracts/processed-event-registry.contract.js +84 -0
- package/dist/vitest/port-contracts/queue-message-producer.contract.d.ts +26 -0
- package/dist/vitest/port-contracts/queue-message-producer.contract.js +48 -0
- package/dist/vitest/port-contracts/queue-message-source.contract.d.ts +29 -0
- package/dist/vitest/port-contracts/queue-message-source.contract.js +71 -0
- package/dist/vitest/port-contracts/readiness-probe.contract.d.ts +18 -0
- package/dist/vitest/port-contracts/readiness-probe.contract.js +41 -0
- package/dist/vitest/port-contracts/transaction-boundary.contract.d.ts +21 -0
- package/dist/vitest/port-contracts/transaction-boundary.contract.js +64 -0
- package/dist/vitest/postgres-container.d.ts +57 -0
- package/dist/vitest/postgres-container.js +118 -0
- package/dist/vitest/reader-port-contract.d.ts +41 -0
- package/dist/vitest/reader-port-contract.js +43 -0
- package/dist/vitest/repo-source-files.d.ts +37 -0
- package/dist/vitest/repo-source-files.js +61 -0
- package/dist/vitest/reset-tables.d.ts +18 -0
- package/dist/vitest/reset-tables.js +30 -0
- package/dist/vitest/settings-contract.d.ts +38 -0
- package/dist/vitest/settings-contract.js +77 -0
- package/dist/vitest/stub-server.d.ts +43 -0
- package/dist/vitest/stub-server.js +60 -0
- package/dist/vitest/term-registry.json +730 -0
- package/dist/vitest/testclock-fork-isolated-files.d.ts +13 -0
- package/dist/vitest/testclock-fork-isolated-files.js +18 -0
- package/dist/vitest/testclock-fork-isolation.d.ts +77 -0
- package/dist/vitest/testclock-fork-isolation.js +188 -0
- package/dist/workflow/claim-once.d.ts +16 -0
- package/dist/workflow/claim-once.js +9 -0
- package/dist/workflow/failures.d.ts +47 -0
- package/dist/workflow/failures.js +22 -0
- package/dist/workflow/index.d.ts +12 -0
- package/dist/workflow/index.js +12 -0
- package/dist/workflow/on-claim.d.ts +17 -0
- package/dist/workflow/on-claim.js +8 -0
- package/dist/workflow/publish-pending-events.d.ts +31 -0
- package/dist/workflow/publish-pending-events.js +31 -0
- package/dist/workflow/transactionally.d.ts +8 -0
- package/dist/workflow/transactionally.js +8 -0
- package/dist/workflow/versioned-payload.d.ts +35 -0
- package/dist/workflow/versioned-payload.js +43 -0
- package/package.json +309 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
package: @satorio/machinery
|
|
2
|
+
version: 0.2.1
|
|
3
|
+
mechanism:
|
|
4
|
+
mechanism: testing
|
|
5
|
+
import: @satorio/machinery/testing
|
|
6
|
+
kind: test kit
|
|
7
|
+
page: mechanisms/testing
|
|
8
|
+
what: "Public entry to the testing mechanism: a stand-in for every port, a clock a test drives, and the scenario player."
|
|
9
|
+
whatUk: "Публічний вхід до механізму testing: замінник кожного порту, годинник, яким керує тест (test), і програвач сценаріїв (playScenario)."
|
|
10
|
+
rows[77]{name,kind,signature,fallback,caption,captionUk,anchor}:
|
|
11
|
+
AnswersByPath,value,"Readonly<Record<string, unknown>>","","What an in-memory client answers with: one already-decoded body per path.","Чим відповідає клієнт у пам'яті: одне вже декодоване тіло на кожен шлях.",testing-AnswersByPath-value
|
|
12
|
+
BlobsByKey,value,"ReadonlyMap<string, StoredBlob>","","What an in-memory blob store holds: every blob it was given, by key.","Що тримає сховище об'єктів у пам'яті: кожен об'єкт, який йому дали, за ключем.",testing-BlobsByKey-value
|
|
13
|
+
DispatchedMessageIds,value,ReadonlySet<string>,"","What an in-memory outbox holds on the read side: the ids a relay has already marked as sent.","Що тримає буфер трансмітера в пам'яті з боку читання: ідентифікатори, які трансмітер уже позначив надісланими.",testing-DispatchedMessageIds-value
|
|
14
|
+
DocumentCountsByClientAndMonth,value,"ReadonlyMap<string, number>","","What an in-memory counter holds: how many documents each client has been sent in each reporting month, keyed by the two together.","Що тримає лічильник у пам'яті: скільки документів дістав кожен клієнт у кожен звітний місяць, за ключем із них двох.",testing-DocumentCountsByClientAndMonth-value
|
|
15
|
+
InMemoryBlobStoreLive,value,const,"","The in-memory blob store, mounted.",Змонтоване сховище об'єктів у пам'яті.,testing-InMemoryBlobStoreLive-value
|
|
16
|
+
InMemoryDocumentNumberCounterLive,value,const,"","The in-memory counter, mounted.",Змонтований лічильник у пам'яті.,testing-InMemoryDocumentNumberCounterLive-value
|
|
17
|
+
InMemoryEventPublisherLive,value,const,"","The in-memory publisher, mounted.",Змонтований публікатор у пам'яті.,testing-InMemoryEventPublisherLive-value
|
|
18
|
+
InMemoryIntegrationEventOutboxLive,value,const,"","The in-memory outbox, mounted.",Змонтований буфер трансмітера в пам'яті.,testing-InMemoryIntegrationEventOutboxLive-value
|
|
19
|
+
InMemoryProcessedEventRegistryLive,value,const,"","The in-memory registry, mounted.",Змонтований реєстр у пам'яті.,testing-InMemoryProcessedEventRegistryLive-value
|
|
20
|
+
InMemoryQueueMessageProducerLive,value,const,"","The in-memory producer, mounted.",Змонтований відправник у пам'яті.,testing-InMemoryQueueMessageProducerLive-value
|
|
21
|
+
InMemoryQueueMessageSourceLive,value,const,"","The in-memory message source, mounted.",Змонтоване джерело повідомлень у пам'яті.,testing-InMemoryQueueMessageSourceLive-value
|
|
22
|
+
makeInMemoryBlobStore,value,const,"","An in-memory blob store over a `Ref` of its own, empty at the start.","Сховище об'єктів у пам'яті над власним `Ref`, порожнє на початку.",testing-makeInMemoryBlobStore-value
|
|
23
|
+
makeInMemoryDocumentNumberCounter,value,const,"","An in-memory counter over a `Ref` of its own, with every month at zero.","Лічильник у пам'яті над власним `Ref`, де кожен місяць стоїть на нулі.",testing-makeInMemoryDocumentNumberCounter-value
|
|
24
|
+
makeInMemoryEventPublisher,value,const,"","An in-memory publisher over a `Ref` of its own, empty at the start.","Публікатор у пам'яті над власним `Ref`, порожній на початку.",testing-makeInMemoryEventPublisher-value
|
|
25
|
+
makeInMemoryIntegrationEventOutbox,value,const,"","An in-memory outbox over `Ref`s of its own, empty at the start.","Буфер трансмітера в пам'яті над власними `Ref`, порожній на початку.",testing-makeInMemoryIntegrationEventOutbox-value
|
|
26
|
+
makeInMemoryProcessedEventRegistry,value,const,"","An in-memory registry over a `Ref` of its own, empty at the start.","Реєстр у пам'яті над власним `Ref`, порожній на початку.",testing-makeInMemoryProcessedEventRegistry-value
|
|
27
|
+
makeInMemoryQueueMessageProducer,value,const,"","An in-memory producer over a `Ref` of its own, whose messages nobody receives.","Відправник у пам'яті над власним `Ref`, чиїх повідомлень ніхто не отримує.",testing-makeInMemoryQueueMessageProducer-value
|
|
28
|
+
makeInMemoryQueueMessageSource,value,const,"","An in-memory message source over a `Ref` of its own, empty at the start.","Джерело повідомлень у пам'яті над власним `Ref`, порожнє на початку.",testing-makeInMemoryQueueMessageSource-value
|
|
29
|
+
nowAsDateTime,value,Effect.Effect<DateTime.Utc>,"","The moment the clock reads now, as a moment on the world's clock.","Мить, яку годинник читає зараз, як мить на світовому годиннику.",testing-nowAsDateTime-value
|
|
30
|
+
nowAsIsoString,value,Effect.Effect<string>,"","The moment the clock reads now, written the way it travels the wire.","Мить, яку годинник читає зараз, написана так, як вона мандрує дротом.",testing-nowAsIsoString-value
|
|
31
|
+
PendingQueueMessages,value,"readonly RawQueueMessage[]","","What an in-memory queue holds: the messages waiting to be received, in the order they were put there.","Що тримає черга в пам'яті: повідомлення, які чекають на отримання, у тому порядку, в якому їх туди поклали.",testing-PendingQueueMessages-value
|
|
32
|
+
ProcessedEventsById,value,"ReadonlyMap<string, DateTime.Utc>","","What an in-memory registry holds: the moment each event id was first claimed.","Що тримає реєстр у пам'яті: мить, коли кожен ідентифікатор події зарезервували вперше.",testing-ProcessedEventsById-value
|
|
33
|
+
PublishedMessages,value,"readonly OutboxMessage[]","","What an in-memory publisher holds: every message it was handed, in the order the batches arrived.","Що тримає публікатор у пам'яті: кожне повідомлення, яке йому подали, у порядку, в якому приходили пачки.",testing-PublishedMessages-value
|
|
34
|
+
QueuedOutboxMessages,value,"readonly OutboxMessage[]","","What an in-memory outbox holds on the write side: every message enqueued, in the order it arrived.","Що тримає буфер трансмітера в пам'яті з боку запису: кожне поставлене в чергу повідомлення, у порядку, в якому воно прийшло.",testing-QueuedOutboxMessages-value
|
|
35
|
+
QuietReporter,value,class,"","A test-runner reporter that prints one summary line for a whole run: how many files, how many tests, how long it took.","Репортер виконавця тестів (test runner), який друкує один підсумковий рядок на цілий прогін: скільки файлів, скільки тестів, скільки це тривало.",testing-QuietReporter-value
|
|
36
|
+
Scenario,value,interface,"","A story told as data: the steps a world walks through, and the numbers that world ends on.","Історія, розказана даними: кроки, якими проходить світ, і числа, на яких той світ спиняється.",testing-Scenario-value
|
|
37
|
+
ScenarioPlayback,value,interface,"","What one run of a scenario leaves behind: the label of every step, and the snapshot the run ended on.","Що лишає по собі один прогін сценарію (scenario): мітка кожного кроку і знімок, на якому прогін скінчився.",testing-ScenarioPlayback-value
|
|
38
|
+
ScenarioService,value,interface,"","What a service gives the scenario player: how to run a step, and how to snapshot what followed.","Що сервіс дає програвачеві сценаріїв: як виконати крок і як зняти знімок того, що з нього вийшло.",testing-ScenarioService-value
|
|
39
|
+
ScenarioStep,value,interface,"",One step in a scenario.,Один крок у сценарії.,testing-ScenarioStep-value
|
|
40
|
+
SUITES_THAT_START_A_STAND,value,"readonly string[]","","The suites that start a live stand, by the file name A11 gives them.","Сьюти, які піднімають живий стенд (live stand), за іменем файлу, яке дає їм `A11`.",testing-SUITES-THAT-START-A-STAND-value
|
|
41
|
+
TransactionalState,value,interface,"","One participant in an in-memory transaction: it can capture its own state now and hand back the effect that puts it back.","Один учасник транзакції в пам'яті: він уміє захопити власний стан зараз і подати назад ефект, який його повертає.",testing-TransactionalState-value
|
|
42
|
+
advanceBy,procedure,"(duration: Duration.DurationInput) => Effect.Effect<void>","","Moves the controlled test clock on by the span handed in, so a test reaches a later moment without waiting for it.","Рухає керований тестовий годинник на подану тривалість, тож тест доходить до пізнішої миті, не чекаючи на неї.",testing-advanceBy-procedure
|
|
43
|
+
atTheMoment,procedure,"(isoTimestamp: string)","","Runs the given work \"at\" the given moment: every clock read inside it sees `isoTimestamp`.","Виконує подану роботу «в» подану мить: кожне читання годинника всередині бачить `isoTimestamp`.",testing-atTheMoment-procedure
|
|
44
|
+
clockPinnedAt,procedure,"(at: DateTime.Utc) => Clock.Clock","","Builds a Clock pinned to one moment: every time read inside returns that moment, while `sleep` still waits on the real clock.","Будує `Clock`, пришпилений до однієї миті: кожне читання часу всередині повертає ту мить, а `sleep` і далі чекає за справжнім годинником.",testing-clockPinnedAt-procedure
|
|
45
|
+
contextOf,procedure,"<Command, Snapshot, Context>(scenario: Scenario<Command, Snapshot, Context>) => Context","",Reads the cross-cutting data of a scenario that declares some.,"Читає наскрізні дані сценарію, який їх оголошує.",testing-contextOf-procedure
|
|
46
|
+
distinctMomentsIn,procedure,"(table: string, column: string) => Effect.Effect<readonly string[], never, SqlClient.SqlClient>","","Reads the distinct moments in one timestamp column, as sorted ISO strings in the same format `momentsOfSteps` returns for a scenario.","Читає різні миті з однієї колонки часових позначок як відсортовані рядки ISO в тому самому вигляді, який `momentsOfSteps` повертає для сценарію.",testing-distinctMomentsIn-procedure
|
|
47
|
+
emptiedTables,procedure,"(tables: readonly string[]) => Effect.Effect<void, never, SqlClient.SqlClient>","","Empties the given tables on the live stand so a scenario starts from zero, the way a freshly reset database does for the seeder.","Спорожнює подані таблиці на живому стенді, щоб сценарій починався з нуля так само, як щойно скинута база починається для сіяча (seeder).",testing-emptiedTables-procedure
|
|
48
|
+
ensureStepsAreInOrder,procedure,"<C, S, X>(scenario: Scenario<C, S, X>) => Effect.Effect<void>","","Fails loudly when a scenario's steps are not in strictly increasing time order — that is a broken scenario, not a run outcome.","Гучно валить, коли кроки сценарію стоять не в строго зростальному порядку часу: це зламаний сценарій, а не результат прогону.",testing-ensureStepsAreInOrder-procedure
|
|
49
|
+
firstPassLabelsOf,procedure,"<C, S, X>(scenario: Scenario<C, S, X>) => readonly string[]","","The labels a scenario expects the first time it runs, in order.","Мітки, яких сценарій чекає першого разу, по порядку.",testing-firstPassLabelsOf-procedure
|
|
50
|
+
labelOf,procedure,"<R>(program: Effect.Effect<string, unknown, R>) => Effect.Effect<string, never, R>","","Runs one step and labels it: what it returned, or the name of the failure it met.","Виконує один крок і ставить йому мітку: що він повернув або як зветься відмова, яку він зустрів.",testing-labelOf-procedure
|
|
51
|
+
labelOfFailure,procedure,"(cause: Cause.Cause<unknown>) => string","","Labels a failure, so a scenario reads the same on every run.","Ставить мітку відмові, тож сценарій читається однаково на кожному прогоні.",testing-labelOfFailure-procedure
|
|
52
|
+
makeInMemoryBlobStoreWith,procedure,"(blobs: Ref.Ref<BlobsByKey>) => BlobStoreShape","","An in-memory blob store over a `Ref` you keep, so a test can seed it before the run and read it after.","Сховище об'єктів у пам'яті над `Ref`, який ви тримаєте, тож тест засіває його перед прогоном і читає після.",testing-makeInMemoryBlobStoreWith-procedure
|
|
53
|
+
makeInMemoryDocumentNumberCounterWith,procedure,"(counts: Ref.Ref<DocumentCountsByClientAndMonth>) => DocumentNumberCounterShape","","An in-memory counter over a reference you keep, so a test can seed it and read it back.","Лічильник у пам'яті над посиланням, яке ви тримаєте, тож тест засіває його і читає назад.",testing-makeInMemoryDocumentNumberCounterWith-procedure
|
|
54
|
+
makeInMemoryEventPublisherWith,procedure,"(published: Ref.Ref<PublishedMessages>) => EventPublisherShape","","An in-memory publisher over a `Ref` you keep, so a test reads what was published after the run.","Публікатор у пам'яті над `Ref`, який ви тримаєте, тож тест читає опубліковане після прогону.",testing-makeInMemoryEventPublisherWith-procedure
|
|
55
|
+
makeInMemoryExternalHttpClient,procedure,"(answers: AnswersByPath) => Effect.Effect<ExternalHttpClientShape>","","An in-memory client over a `Ref` of its own, seeded with the answers you hand it.","Клієнт у пам'яті над власним `Ref`, засіяний відповідями, які ви йому подали.",testing-makeInMemoryExternalHttpClient-procedure
|
|
56
|
+
makeInMemoryExternalHttpClientWith,procedure,"(answers: Ref.Ref<AnswersByPath>) => ExternalHttpClientShape","","An in-memory client over a `Ref` you keep, so a test rewrites what the service answers between two calls of the same scenario.","Клієнт у пам'яті над `Ref`, який ви тримаєте, тож тест переписує відповідь сервісу між двома викликами одного сценарію.",testing-makeInMemoryExternalHttpClientWith-procedure
|
|
57
|
+
makeInMemoryIntegrationEventOutboxWith,procedure,"(queued: Ref.Ref<QueuedOutboxMessages>, dispatched: Ref.Ref<DispatchedMessageIds>) => IntegrationEventOutboxShape","","An in-memory outbox over two `Ref`s you keep, so a test can seed what is waiting and read back what the relay dispatched.","Буфер трансмітера в пам'яті над двома `Ref`, які ви тримаєте, тож тест засіває те, що чекає, і читає назад те, що трансмітер відправив.",testing-makeInMemoryIntegrationEventOutboxWith-procedure
|
|
58
|
+
makeInMemoryProcessedEventRegistryWith,procedure,"(processed: Ref.Ref<ProcessedEventsById>) => ProcessedEventRegistryShape","","An in-memory registry over a `Ref` you keep, so a test can seed what was already claimed and read back what the run added.","Реєстр у пам'яті над `Ref`, який ви тримаєте, тож тест засіває вже зарезервоване і читає назад додане прогоном.",testing-makeInMemoryProcessedEventRegistryWith-procedure
|
|
59
|
+
makeInMemoryQueueMessageProducerWith,procedure,"(pending: Ref.Ref<PendingQueueMessages>) => QueueMessageProducerShape","",An in-memory producer over the same reference an in-memory source reads.,"Відправник у пам'яті над тим самим посиланням, яке читає джерело в пам'яті.",testing-makeInMemoryQueueMessageProducerWith-procedure
|
|
60
|
+
makeInMemoryQueueMessageSourceWith,procedure,"(pending: Ref.Ref<PendingQueueMessages>) => QueueMessageSourceShape","","An in-memory message source over a `Ref` you keep, so a test seeds the queue before the run and reads what is left after it.","Джерело повідомлень у пам'яті над `Ref`, який ви тримаєте, тож тест засіває чергу перед прогоном і читає, що лишилось після.",testing-makeInMemoryQueueMessageSourceWith-procedure
|
|
61
|
+
makeInMemoryTransactionBoundary,procedure,"(participants: readonly TransactionalState[]) => TransactionBoundaryShape","","Builds an in-memory transaction boundary: it captures each participant's state on entry and restores it if the work fails.","Будує межу транзакції в пам'яті: вона захоплює стан кожного учасника на вході і повертає його, коли робота падає.",testing-makeInMemoryTransactionBoundary-procedure
|
|
62
|
+
makeScriptedMessageSource,procedure,"(script: readonly (readonly RawQueueMessage[])[]) => Effect.Effect<ScriptedQueue>","",Builds the scripted source and the reader for what it acknowledged.,"Будує джерело за сценарієм і читача того, що воно підтвердило.",testing-makeScriptedMessageSource-procedure
|
|
63
|
+
messageOf,procedure,"(messageId: string, body: string) => RawQueueMessage","","One raw message, built the way a queue hands it over: an id, the receipt an acknowledgement quotes, and the body.","Одне сире повідомлення, збудоване так, як його віддає черга: ідентифікатор, квитанція, яку цитує підтвердження, і тіло.",testing-messageOf-procedure
|
|
64
|
+
momentsOfSteps,procedure,"<C, S, X>(scenario: Scenario<C, S, X>, chosen: (step: ScenarioStep<C>) => boolean) => readonly string[]","","Returns the moments of the chosen steps as ISO strings, in the format a database round-trip returns them.","Повертає миті обраних кроків рядками ISO, у тому вигляді, в якому їх повертає похід у базу і назад.",testing-momentsOfSteps-procedure
|
|
65
|
+
mutationSettings,procedure,"(options: MutationSettingsOptions) => MutationSettings","","Everything a mutation run needs, with the waits bounded and the live stands kept out.","Усе, що потрібно мутаційному прогону, з обмеженим очікуванням і без живих стендів.",testing-mutationSettings-procedure
|
|
66
|
+
playScenario,procedure,"<C, S, R, X>(scenario: Scenario<C, S, X>, service: ScenarioService<C, S, R, X>) => Effect.Effect<ScenarioPlayback<S>, never, R>","","Plays a scenario: each step runs at its own moment, and the snapshot is taken at the last step's moment.","Програє сценарій: кожен крок біжить у власну мить, а знімок беруть у мить останнього кроку.",testing-playScenario-procedure
|
|
67
|
+
quietReporters,procedure,"(options: QuietReporterOptions & { readonly verbose?: boolean } = {}) => ('default' | QuietReporter)[]","",The `reporters` a test-runner configuration takes.,"Значення `reporters`, яке бере конфігурація виконавця тестів.",testing-quietReporters-procedure
|
|
68
|
+
replayLabelsOf,procedure,"<C, S, X>(scenario: Scenario<C, S, X>) => readonly string[]","","The labels a scenario expects when the same steps run a second time, in order.","Мітки, яких сценарій чекає, коли ті самі кроки біжать удруге, по порядку.",testing-replayLabelsOf-procedure
|
|
69
|
+
setNowTo,procedure,"(isoTimestamp: string) => Effect.Effect<void>","",Sets the controlled test clock to the given ISO moment.,Ставить керований тестовий годинник на подану мить ISO.,testing-setNowTo-procedure
|
|
70
|
+
stateOfRef,procedure,"<A>(ref: Ref.Ref<A>) => TransactionalState","","Makes a `Ref` a participant, so an in-memory boundary can put it back where it was when the work fails.","Робить `Ref` учасником, тож межа в пам'яті вміє повернути його туди, де він був, коли робота падає.",testing-stateOfRef-procedure
|
|
71
|
+
typedFailureOf,procedure,"<A, E>(effect: Effect.Effect<A, E>) => Effect.Effect<E>","","Extracts a use case's typed failure (Fail) through `Effect.exit` and `Cause`, rather than by matching an error message string.","Дістає типізовану відмову (Data.TaggedError) процедури через `Effect.exit` і `Cause`, а не звіркою тексту повідомлення про помилку.",testing-typedFailureOf-procedure
|
|
72
|
+
verboseOutputWanted,procedure,"(environment: Readonly<Record<string, string | undefined>> = process.env) => boolean","",Whether the runner should print everything.,Чи має виконавець друкувати все.,testing-verboseOutputWanted-procedure
|
|
73
|
+
BlobStoreUnavailableLive,adapter,Layer.Layer<BlobStore>,"","A blob store that answers nothing: every operation fails with `BlobStoreUnavailableError`.","Сховище об'єктів, яке ні на що не відповідає: кожна операція падає з `BlobStoreUnavailableError`.",testing-BlobStoreUnavailableLive-adapter
|
|
74
|
+
DocumentNumberCounterUnavailableLive,adapter,Layer.Layer<DocumentNumberCounter>,"","A counter that counts nothing: every request comes back as a refusal.","Лічильник, який нічого не рахує: кожен запит повертається відмовою.",testing-DocumentNumberCounterUnavailableLive-adapter
|
|
75
|
+
EventPublisherUnavailableLive,adapter,Layer.Layer<EventPublisher>,"","A publisher that takes nothing: every publish fails with `EventPublisherUnavailableError`.","Публікатор, який нічого не бере: кожна публікація падає з `EventPublisherUnavailableError`.",testing-EventPublisherUnavailableLive-adapter
|
|
76
|
+
ExternalHttpClientUnavailableLive,adapter,Layer.Layer<ExternalHttpClient>,"","A client that reaches nothing: every call fails with `ExternalServiceUnavailableError`.","Клієнт, який нікуди не дістає: кожен виклик падає з `ExternalServiceUnavailableError`.",testing-ExternalHttpClientUnavailableLive-adapter
|
|
77
|
+
inMemoryExternalHttpClientLive,adapter,"(answers: AnswersByPath) => Layer.Layer<ExternalHttpClient>","","The in-memory client, mounted, answering the paths you seeded it with.","Змонтований клієнт у пам'яті, який відповідає на шляхи, якими ви його засіяли.",testing-inMemoryExternalHttpClientLive-adapter
|
|
78
|
+
InMemoryReadinessProbeLive,adapter,Layer.Layer<ReadinessProbe>,"","The in-memory probe, mounted.",Змонтована проба готовності в пам'яті.,testing-InMemoryReadinessProbeLive-adapter
|
|
79
|
+
inMemoryTransactionBoundaryLive,adapter,"(participants: readonly TransactionalState[]) => Layer.Layer<TransactionBoundary>","","The in-memory transaction boundary, mounted over the participants you name.","Змонтована межа транзакції в пам'яті, над названими вами учасниками.",testing-inMemoryTransactionBoundaryLive-adapter
|
|
80
|
+
IntegrationEventOutboxUnavailableLive,adapter,Layer.Layer<IntegrationEventOutbox>,"","An outbox that accepts nothing: `enqueue` refuses, so a use case's write and its message go down together.","Буфер трансмітера, який нічого не приймає: `enqueue` відмовляє, тож запис процедури і її повідомлення падають разом.",testing-IntegrationEventOutboxUnavailableLive-adapter
|
|
81
|
+
IntegrationEventOutboxUnreadableLive,adapter,Layer.Layer<IntegrationEventOutbox>,"","An outbox that takes messages and then refuses to hand them back: `pending` fails while `enqueue` succeeds.","Буфер трансмітера, який бере повідомлення і потім відмовляється їх віддати: `pending` падає, а `enqueue` вдається.",testing-IntegrationEventOutboxUnreadableLive-adapter
|
|
82
|
+
ProcessedEventRegistryUnavailableLive,adapter,Layer.Layer<ProcessedEventRegistry>,"","A registry that claims nothing: every claim comes back as a refusal.","Реєстр, який нічого не резервує: кожна резервація повертається відмовою.",testing-ProcessedEventRegistryUnavailableLive-adapter
|
|
83
|
+
QueueMessageProducerUnavailableLive,adapter,Layer.Layer<QueueMessageProducer>,"","A producer that answers nothing: every send fails with `QueueMessageProducerUnavailableError`.","Відправник, який ні на що не відповідає: кожне надсилання падає з `QueueMessageProducerUnavailableError`.",testing-QueueMessageProducerUnavailableLive-adapter
|
|
84
|
+
QueueMessageSourceUnavailableLive,adapter,Layer.Layer<QueueMessageSource>,"","A message source that answers nothing: every operation fails with `QueueMessageSourceUnavailableError`.","Джерело повідомлень, яке ні на що не відповідає: кожна операція падає з `QueueMessageSourceUnavailableError`.",testing-QueueMessageSourceUnavailableLive-adapter
|
|
85
|
+
ReadinessProbeUnavailableLive,adapter,Layer.Layer<ReadinessProbe>,"",A probe whose database never answers.,"Проба, чия база ніколи не відповідає.",testing-ReadinessProbeUnavailableLive-adapter
|
|
86
|
+
scriptedQueueMessageSourceLive,adapter,"(script: readonly (readonly RawQueueMessage[])[]) => Layer.Layer<QueueMessageSource>","","The scripted source, mounted: each `receive` answers with the next batch of the script.","Змонтоване джерело за сценарієм: кожен `receive` відповідає наступною пачкою сценарію.",testing-scriptedQueueMessageSourceLive-adapter
|
|
87
|
+
TransactionBoundaryUnavailableLive,adapter,Layer.Layer<TransactionBoundary>,"","A transaction boundary that opens nothing: the work never runs and the caller reads the refusal.","Межа транзакції, яка нічого не відкриває: робота ніколи не біжить, і викликач читає відмову.",testing-TransactionBoundaryUnavailableLive-adapter
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
{
|
|
2
|
+
"package": "@satorio/machinery",
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"mechanism": {
|
|
5
|
+
"mechanism": "time",
|
|
6
|
+
"import": "@satorio/machinery/time",
|
|
7
|
+
"kind": "foundation",
|
|
8
|
+
"page": "mechanisms/time",
|
|
9
|
+
"what": "Public entry to the time mechanism: a day a person reads and writes, a period of days, and a moment on the clock.",
|
|
10
|
+
"whatUk": "Публічний вхід до механізму time: день, який людина читає і пише, період (period) днів і мить на годиннику.",
|
|
11
|
+
"rows": [
|
|
12
|
+
{
|
|
13
|
+
"name": "CalendarDay",
|
|
14
|
+
"kind": "value",
|
|
15
|
+
"signature": "type",
|
|
16
|
+
"fallback": "",
|
|
17
|
+
"caption": "One day of the calendar, with no time and no zone in it.",
|
|
18
|
+
"captionUk": "Один день календаря, без часу і без зони всередині.",
|
|
19
|
+
"anchor": "time-CalendarDay-value"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "CalendarDayFromHumanString",
|
|
23
|
+
"kind": "value",
|
|
24
|
+
"signature": "Schema.Schema<CalendarDay, string>",
|
|
25
|
+
"fallback": "",
|
|
26
|
+
"caption": "Reads a day off the wire from the form a person writes, and writes it back in that same form.",
|
|
27
|
+
"captionUk": "Читає день із дроту у формі, якою пише людина, і пише його назад тією самою формою.",
|
|
28
|
+
"anchor": "time-CalendarDayFromHumanString-value"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "CalendarDayOrder",
|
|
32
|
+
"kind": "value",
|
|
33
|
+
"signature": "Order.Order<CalendarDay>",
|
|
34
|
+
"fallback": "",
|
|
35
|
+
"caption": "Puts two days in calendar order, earliest first.",
|
|
36
|
+
"captionUk": "Ставить два дні в календарному порядку, раніший першим.",
|
|
37
|
+
"anchor": "time-CalendarDayOrder-value"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "CalendarDayRefusalReason",
|
|
41
|
+
"kind": "value",
|
|
42
|
+
"signature": "type",
|
|
43
|
+
"fallback": "",
|
|
44
|
+
"caption": "Why a written day is not a calendar day.",
|
|
45
|
+
"captionUk": "Чому написаний день не є календарним днем (calendar day).",
|
|
46
|
+
"anchor": "time-CalendarDayRefusalReason-value"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "Instant",
|
|
50
|
+
"kind": "value",
|
|
51
|
+
"signature": "interface",
|
|
52
|
+
"fallback": "",
|
|
53
|
+
"caption": "One moment on the world's clock, held as whole milliseconds since the start of 1970.",
|
|
54
|
+
"captionUk": "Одна мить на світовому годиннику, яку тримають цілими мілісекундами від початку 1970 року.",
|
|
55
|
+
"anchor": "time-Instant-value"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "Period",
|
|
59
|
+
"kind": "value",
|
|
60
|
+
"signature": "interface",
|
|
61
|
+
"fallback": "",
|
|
62
|
+
"caption": "A run of calendar days.",
|
|
63
|
+
"captionUk": "Пробіг календарних днів.",
|
|
64
|
+
"anchor": "time-Period-value"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "TimeZone",
|
|
68
|
+
"kind": "value",
|
|
69
|
+
"signature": "type",
|
|
70
|
+
"fallback": "",
|
|
71
|
+
"caption": "One named time zone, as the runtime's own zone table knows it.",
|
|
72
|
+
"captionUk": "Одна названа часова зона (time zone), така, якою її знає власна таблиця зон рантайму.",
|
|
73
|
+
"anchor": "time-TimeZone-value"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "addDays",
|
|
77
|
+
"kind": "procedure",
|
|
78
|
+
"signature": "(day: CalendarDay, days: number) => CalendarDay",
|
|
79
|
+
"fallback": "",
|
|
80
|
+
"caption": "Moves a day by whole days.",
|
|
81
|
+
"captionUk": "Рухає день на цілі дні.",
|
|
82
|
+
"anchor": "time-addDays-procedure"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "addMonths",
|
|
86
|
+
"kind": "procedure",
|
|
87
|
+
"signature": "(day: CalendarDay, months: number) => CalendarDay",
|
|
88
|
+
"fallback": "",
|
|
89
|
+
"caption": "Moves a day by whole months, landing on the last day of a month too short to hold it.",
|
|
90
|
+
"captionUk": "Рухає день на цілі місяці і сідає на останній день місяця, надто короткого, щоб його вмістити.",
|
|
91
|
+
"anchor": "time-addMonths-procedure"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "calendarDayFromHumanForm",
|
|
95
|
+
"kind": "procedure",
|
|
96
|
+
"signature": "(text: string) => Either.Either<CalendarDay, NotACalendarDayError>",
|
|
97
|
+
"fallback": "",
|
|
98
|
+
"caption": "Reads the form a person writes a day in: `19.03.2026`.",
|
|
99
|
+
"captionUk": "Читає форму, якою день пише людина: `19.03.2026`.",
|
|
100
|
+
"anchor": "time-calendarDayFromHumanForm-procedure"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "calendarDayFromIsoForm",
|
|
104
|
+
"kind": "procedure",
|
|
105
|
+
"signature": "(text: string) => Either.Either<CalendarDay, NotACalendarDayError>",
|
|
106
|
+
"fallback": "",
|
|
107
|
+
"caption": "Reads the form a machine writes a day in: `2026-03-19`.",
|
|
108
|
+
"captionUk": "Читає форму, якою день пише машина: `2026-03-19`.",
|
|
109
|
+
"anchor": "time-calendarDayFromIsoForm-procedure"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"name": "dateTimeOfInstant",
|
|
113
|
+
"kind": "procedure",
|
|
114
|
+
"signature": "(instant: Instant) => DateTime.Utc",
|
|
115
|
+
"fallback": "",
|
|
116
|
+
"caption": "Hands a moment back as Effect's own UTC value, for a row, an envelope, or any code that already speaks that type.",
|
|
117
|
+
"captionUk": "Подає мить назад власним значенням UTC від Effect — для рядка бази, конверта чи будь-якого коду, який уже говорить тим типом.",
|
|
118
|
+
"anchor": "time-dateTimeOfInstant-procedure"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": "dayInHumanForm",
|
|
122
|
+
"kind": "procedure",
|
|
123
|
+
"signature": "(day: CalendarDay) => string",
|
|
124
|
+
"fallback": "",
|
|
125
|
+
"caption": "Writes a day the way a person reads it: `19.03.2026`.",
|
|
126
|
+
"captionUk": "Пише день так, як його читає людина: `19.03.2026`.",
|
|
127
|
+
"anchor": "time-dayInHumanForm-procedure"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"name": "dayInIsoForm",
|
|
131
|
+
"kind": "procedure",
|
|
132
|
+
"signature": "(day: CalendarDay) => string",
|
|
133
|
+
"fallback": "",
|
|
134
|
+
"caption": "Writes a day the way a machine reads it: `2026-03-19`.",
|
|
135
|
+
"captionUk": "Пише день так, як його читає машина: `2026-03-19`.",
|
|
136
|
+
"anchor": "time-dayInIsoForm-procedure"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "dayOfInstant",
|
|
140
|
+
"kind": "procedure",
|
|
141
|
+
"signature": "(instant: Instant, zone: TimeZone) => CalendarDay",
|
|
142
|
+
"fallback": "",
|
|
143
|
+
"caption": "The calendar day a moment falls on for a person standing in that zone.",
|
|
144
|
+
"captionUk": "Календарний день, на який припадає мить для людини, що стоїть у тій зоні.",
|
|
145
|
+
"anchor": "time-dayOfInstant-procedure"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"name": "daysBetween",
|
|
149
|
+
"kind": "procedure",
|
|
150
|
+
"signature": "(earlier: CalendarDay, later: CalendarDay) => number",
|
|
151
|
+
"fallback": "",
|
|
152
|
+
"caption": "Counts whole days from the first day to the second.",
|
|
153
|
+
"captionUk": "Рахує цілі дні від першого дня до другого.",
|
|
154
|
+
"anchor": "time-daysBetween-procedure"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"name": "instantInHumanForm",
|
|
158
|
+
"kind": "procedure",
|
|
159
|
+
"signature": "(instant: Instant, zone: TimeZone) => string",
|
|
160
|
+
"fallback": "",
|
|
161
|
+
"caption": "Writes a moment the way a person in that zone reads it: `19.03.2026 14:05 +02:00`.",
|
|
162
|
+
"captionUk": "Пише мить так, як її читає людина в тій зоні: `19.03.2026 14:05 +02:00`.",
|
|
163
|
+
"anchor": "time-instantInHumanForm-procedure"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"name": "instantOfDateTime",
|
|
167
|
+
"kind": "procedure",
|
|
168
|
+
"signature": "(moment: DateTime.Utc) => Instant",
|
|
169
|
+
"fallback": "",
|
|
170
|
+
"caption": "Takes a moment the machinery already holds as Effect's own UTC value.",
|
|
171
|
+
"captionUk": "Бере мить, яку машинерія вже тримає власним значенням UTC від Effect.",
|
|
172
|
+
"anchor": "time-instantOfDateTime-procedure"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"name": "lastDayOfTheMonthOf",
|
|
176
|
+
"kind": "procedure",
|
|
177
|
+
"signature": "(day: CalendarDay) => CalendarDay",
|
|
178
|
+
"fallback": "",
|
|
179
|
+
"caption": "The last day of the month the given day falls in.",
|
|
180
|
+
"captionUk": "Останній день місяця, на який припадає поданий день.",
|
|
181
|
+
"anchor": "time-lastDayOfTheMonthOf-procedure"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "lengthInDays",
|
|
185
|
+
"kind": "procedure",
|
|
186
|
+
"signature": "(period: Period) => number",
|
|
187
|
+
"fallback": "",
|
|
188
|
+
"caption": "Counts the days a period holds, both bounds included.",
|
|
189
|
+
"captionUk": "Рахує дні, які тримає період, разом з обома краями.",
|
|
190
|
+
"anchor": "time-lengthInDays-procedure"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"name": "monthOf",
|
|
194
|
+
"kind": "procedure",
|
|
195
|
+
"signature": "(day: CalendarDay) => Period",
|
|
196
|
+
"fallback": "",
|
|
197
|
+
"caption": "The whole calendar month the given day falls in, as a period.",
|
|
198
|
+
"captionUk": "Цілий календарний місяць, на який припадає поданий день, як період.",
|
|
199
|
+
"anchor": "time-monthOf-procedure"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"name": "monthsOf",
|
|
203
|
+
"kind": "procedure",
|
|
204
|
+
"signature": "(period: Period) => readonly Period[]",
|
|
205
|
+
"fallback": "",
|
|
206
|
+
"caption": "Cuts a period into one part per calendar month it runs over, in order.",
|
|
207
|
+
"captionUk": "Ріже період на одну частину для кожного календарного місяця, через який він біжить, по порядку.",
|
|
208
|
+
"anchor": "time-monthsOf-procedure"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"name": "periodContains",
|
|
212
|
+
"kind": "procedure",
|
|
213
|
+
"signature": "(period: Period, day: CalendarDay) => boolean",
|
|
214
|
+
"fallback": "",
|
|
215
|
+
"caption": "Answers whether the day belongs to the period.",
|
|
216
|
+
"captionUk": "Відповідає, чи день належить періоду.",
|
|
217
|
+
"anchor": "time-periodContains-procedure"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"name": "periodOf",
|
|
221
|
+
"kind": "procedure",
|
|
222
|
+
"signature": "(from: CalendarDay, to: CalendarDay) => Either.Either<Period, PeriodEndsBeforeItStartsError>",
|
|
223
|
+
"fallback": "",
|
|
224
|
+
"caption": "Takes two days as a period, earliest first.",
|
|
225
|
+
"captionUk": "Бере два дні як період, раніший першим.",
|
|
226
|
+
"anchor": "time-periodOf-procedure"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"name": "periodsOverlap",
|
|
230
|
+
"kind": "procedure",
|
|
231
|
+
"signature": "(left: Period, right: Period) => boolean",
|
|
232
|
+
"fallback": "",
|
|
233
|
+
"caption": "Answers whether two periods share at least one day.",
|
|
234
|
+
"captionUk": "Відповідає, чи два періоди ділять хоч один день.",
|
|
235
|
+
"anchor": "time-periodsOverlap-procedure"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"name": "startOfDay",
|
|
239
|
+
"kind": "procedure",
|
|
240
|
+
"signature": "(day: CalendarDay, zone: TimeZone) => Instant",
|
|
241
|
+
"fallback": "",
|
|
242
|
+
"caption": "The moment a calendar day begins in that zone.",
|
|
243
|
+
"captionUk": "Мить, якою календарний день починається в тій зоні.",
|
|
244
|
+
"anchor": "time-startOfDay-procedure"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"name": "todayIn",
|
|
248
|
+
"kind": "procedure",
|
|
249
|
+
"signature": "(zone: TimeZone) => Effect.Effect<CalendarDay>",
|
|
250
|
+
"fallback": "",
|
|
251
|
+
"caption": "Today, as the calendar of that zone counts it, read from the clock the service already shares.",
|
|
252
|
+
"captionUk": "Сьогодні, як його рахує календар тієї зони, прочитане з годинника, який сервіс уже поділяє.",
|
|
253
|
+
"anchor": "time-todayIn-procedure"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"name": "zoneIdOf",
|
|
257
|
+
"kind": "procedure",
|
|
258
|
+
"signature": "(zone: TimeZone) => string",
|
|
259
|
+
"fallback": "",
|
|
260
|
+
"caption": "Reads the IANA name back out of a zone, for a log line or a row.",
|
|
261
|
+
"captionUk": "Читає назву IANA назад із зони — для рядка лога чи для рядка бази.",
|
|
262
|
+
"anchor": "time-zoneIdOf-procedure"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"name": "zoneNamed",
|
|
266
|
+
"kind": "procedure",
|
|
267
|
+
"signature": "(zoneId: string) => Either.Either<TimeZone, UnknownTimeZoneError>",
|
|
268
|
+
"fallback": "",
|
|
269
|
+
"caption": "Takes an IANA zone name, and refuses a name the runtime does not know.",
|
|
270
|
+
"captionUk": "Бере назву зони IANA і відмовляє назві, якої рантайм не знає.",
|
|
271
|
+
"anchor": "time-zoneNamed-procedure"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"name": "NotACalendarDayError",
|
|
275
|
+
"kind": "failure",
|
|
276
|
+
"signature": "Data.TaggedError<{ readonly text: string; readonly reason: CalendarDayRefusalReason }>",
|
|
277
|
+
"fallback": "",
|
|
278
|
+
"caption": "The text a reader was handed does not name a day any calendar holds.",
|
|
279
|
+
"captionUk": "Текст, поданий читачеві, не називає дня, який тримає бодай один календар.",
|
|
280
|
+
"anchor": "time-NotACalendarDayError-failure"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"name": "PeriodEndsBeforeItStartsError",
|
|
284
|
+
"kind": "failure",
|
|
285
|
+
"signature": "Data.TaggedError<{ readonly from: string; readonly to: string }>",
|
|
286
|
+
"fallback": "",
|
|
287
|
+
"caption": "The two days handed in run backwards.",
|
|
288
|
+
"captionUk": "Два подані дні біжать назад.",
|
|
289
|
+
"anchor": "time-PeriodEndsBeforeItStartsError-failure"
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"name": "TimeFailure",
|
|
293
|
+
"kind": "failure",
|
|
294
|
+
"signature": "type",
|
|
295
|
+
"fallback": "",
|
|
296
|
+
"caption": "Every way this mechanism refuses a value.",
|
|
297
|
+
"captionUk": "Кожен спосіб, яким цей механізм відмовляє значенню.",
|
|
298
|
+
"anchor": "time-TimeFailure-failure"
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"name": "UnknownTimeZoneError",
|
|
302
|
+
"kind": "failure",
|
|
303
|
+
"signature": "Data.TaggedError<{ readonly zoneId: string }>",
|
|
304
|
+
"fallback": "",
|
|
305
|
+
"caption": "The runtime has no zone under that name.",
|
|
306
|
+
"captionUk": "Рантайм не має зони під такою назвою.",
|
|
307
|
+
"anchor": "time-UnknownTimeZoneError-failure"
|
|
308
|
+
}
|
|
309
|
+
]
|
|
310
|
+
}
|
|
311
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
package: @satorio/machinery
|
|
2
|
+
version: 0.2.1
|
|
3
|
+
mechanism:
|
|
4
|
+
mechanism: time
|
|
5
|
+
import: @satorio/machinery/time
|
|
6
|
+
kind: foundation
|
|
7
|
+
page: mechanisms/time
|
|
8
|
+
what: "Public entry to the time mechanism: a day a person reads and writes, a period of days, and a moment on the clock."
|
|
9
|
+
whatUk: "Публічний вхід до механізму time: день, який людина читає і пише, період (period) днів і мить на годиннику."
|
|
10
|
+
rows[33]{name,kind,signature,fallback,caption,captionUk,anchor}:
|
|
11
|
+
CalendarDay,value,type,"","One day of the calendar, with no time and no zone in it.","Один день календаря, без часу і без зони всередині.",time-CalendarDay-value
|
|
12
|
+
CalendarDayFromHumanString,value,"Schema.Schema<CalendarDay, string>","","Reads a day off the wire from the form a person writes, and writes it back in that same form.","Читає день із дроту у формі, якою пише людина, і пише його назад тією самою формою.",time-CalendarDayFromHumanString-value
|
|
13
|
+
CalendarDayOrder,value,Order.Order<CalendarDay>,"","Puts two days in calendar order, earliest first.","Ставить два дні в календарному порядку, раніший першим.",time-CalendarDayOrder-value
|
|
14
|
+
CalendarDayRefusalReason,value,type,"",Why a written day is not a calendar day.,Чому написаний день не є календарним днем (calendar day).,time-CalendarDayRefusalReason-value
|
|
15
|
+
Instant,value,interface,"","One moment on the world's clock, held as whole milliseconds since the start of 1970.","Одна мить на світовому годиннику, яку тримають цілими мілісекундами від початку 1970 року.",time-Instant-value
|
|
16
|
+
Period,value,interface,"",A run of calendar days.,Пробіг календарних днів.,time-Period-value
|
|
17
|
+
TimeZone,value,type,"","One named time zone, as the runtime's own zone table knows it.","Одна названа часова зона (time zone), така, якою її знає власна таблиця зон рантайму.",time-TimeZone-value
|
|
18
|
+
addDays,procedure,"(day: CalendarDay, days: number) => CalendarDay","",Moves a day by whole days.,Рухає день на цілі дні.,time-addDays-procedure
|
|
19
|
+
addMonths,procedure,"(day: CalendarDay, months: number) => CalendarDay","","Moves a day by whole months, landing on the last day of a month too short to hold it.","Рухає день на цілі місяці і сідає на останній день місяця, надто короткого, щоб його вмістити.",time-addMonths-procedure
|
|
20
|
+
calendarDayFromHumanForm,procedure,"(text: string) => Either.Either<CalendarDay, NotACalendarDayError>","","Reads the form a person writes a day in: `19.03.2026`.","Читає форму, якою день пише людина: `19.03.2026`.",time-calendarDayFromHumanForm-procedure
|
|
21
|
+
calendarDayFromIsoForm,procedure,"(text: string) => Either.Either<CalendarDay, NotACalendarDayError>","","Reads the form a machine writes a day in: `2026-03-19`.","Читає форму, якою день пише машина: `2026-03-19`.",time-calendarDayFromIsoForm-procedure
|
|
22
|
+
dateTimeOfInstant,procedure,"(instant: Instant) => DateTime.Utc","","Hands a moment back as Effect's own UTC value, for a row, an envelope, or any code that already speaks that type.","Подає мить назад власним значенням UTC від Effect — для рядка бази, конверта чи будь-якого коду, який уже говорить тим типом.",time-dateTimeOfInstant-procedure
|
|
23
|
+
dayInHumanForm,procedure,"(day: CalendarDay) => string","","Writes a day the way a person reads it: `19.03.2026`.","Пише день так, як його читає людина: `19.03.2026`.",time-dayInHumanForm-procedure
|
|
24
|
+
dayInIsoForm,procedure,"(day: CalendarDay) => string","","Writes a day the way a machine reads it: `2026-03-19`.","Пише день так, як його читає машина: `2026-03-19`.",time-dayInIsoForm-procedure
|
|
25
|
+
dayOfInstant,procedure,"(instant: Instant, zone: TimeZone) => CalendarDay","",The calendar day a moment falls on for a person standing in that zone.,"Календарний день, на який припадає мить для людини, що стоїть у тій зоні.",time-dayOfInstant-procedure
|
|
26
|
+
daysBetween,procedure,"(earlier: CalendarDay, later: CalendarDay) => number","",Counts whole days from the first day to the second.,Рахує цілі дні від першого дня до другого.,time-daysBetween-procedure
|
|
27
|
+
instantInHumanForm,procedure,"(instant: Instant, zone: TimeZone) => string","","Writes a moment the way a person in that zone reads it: `19.03.2026 14:05 +02:00`.","Пише мить так, як її читає людина в тій зоні: `19.03.2026 14:05 +02:00`.",time-instantInHumanForm-procedure
|
|
28
|
+
instantOfDateTime,procedure,"(moment: DateTime.Utc) => Instant","",Takes a moment the machinery already holds as Effect's own UTC value.,"Бере мить, яку машинерія вже тримає власним значенням UTC від Effect.",time-instantOfDateTime-procedure
|
|
29
|
+
lastDayOfTheMonthOf,procedure,"(day: CalendarDay) => CalendarDay","",The last day of the month the given day falls in.,"Останній день місяця, на який припадає поданий день.",time-lastDayOfTheMonthOf-procedure
|
|
30
|
+
lengthInDays,procedure,"(period: Period) => number","","Counts the days a period holds, both bounds included.","Рахує дні, які тримає період, разом з обома краями.",time-lengthInDays-procedure
|
|
31
|
+
monthOf,procedure,"(day: CalendarDay) => Period","","The whole calendar month the given day falls in, as a period.","Цілий календарний місяць, на який припадає поданий день, як період.",time-monthOf-procedure
|
|
32
|
+
monthsOf,procedure,"(period: Period) => readonly Period[]","","Cuts a period into one part per calendar month it runs over, in order.","Ріже період на одну частину для кожного календарного місяця, через який він біжить, по порядку.",time-monthsOf-procedure
|
|
33
|
+
periodContains,procedure,"(period: Period, day: CalendarDay) => boolean","",Answers whether the day belongs to the period.,"Відповідає, чи день належить періоду.",time-periodContains-procedure
|
|
34
|
+
periodOf,procedure,"(from: CalendarDay, to: CalendarDay) => Either.Either<Period, PeriodEndsBeforeItStartsError>","","Takes two days as a period, earliest first.","Бере два дні як період, раніший першим.",time-periodOf-procedure
|
|
35
|
+
periodsOverlap,procedure,"(left: Period, right: Period) => boolean","",Answers whether two periods share at least one day.,"Відповідає, чи два періоди ділять хоч один день.",time-periodsOverlap-procedure
|
|
36
|
+
startOfDay,procedure,"(day: CalendarDay, zone: TimeZone) => Instant","",The moment a calendar day begins in that zone.,"Мить, якою календарний день починається в тій зоні.",time-startOfDay-procedure
|
|
37
|
+
todayIn,procedure,"(zone: TimeZone) => Effect.Effect<CalendarDay>","","Today, as the calendar of that zone counts it, read from the clock the service already shares.","Сьогодні, як його рахує календар тієї зони, прочитане з годинника, який сервіс уже поділяє.",time-todayIn-procedure
|
|
38
|
+
zoneIdOf,procedure,"(zone: TimeZone) => string","","Reads the IANA name back out of a zone, for a log line or a row.",Читає назву IANA назад із зони — для рядка лога чи для рядка бази.,time-zoneIdOf-procedure
|
|
39
|
+
zoneNamed,procedure,"(zoneId: string) => Either.Either<TimeZone, UnknownTimeZoneError>","","Takes an IANA zone name, and refuses a name the runtime does not know.","Бере назву зони IANA і відмовляє назві, якої рантайм не знає.",time-zoneNamed-procedure
|
|
40
|
+
NotACalendarDayError,failure,"Data.TaggedError<{ readonly text: string; readonly reason: CalendarDayRefusalReason }>","",The text a reader was handed does not name a day any calendar holds.,"Текст, поданий читачеві, не називає дня, який тримає бодай один календар.",time-NotACalendarDayError-failure
|
|
41
|
+
PeriodEndsBeforeItStartsError,failure,"Data.TaggedError<{ readonly from: string; readonly to: string }>","",The two days handed in run backwards.,Два подані дні біжать назад.,time-PeriodEndsBeforeItStartsError-failure
|
|
42
|
+
TimeFailure,failure,type,"",Every way this mechanism refuses a value.,"Кожен спосіб, яким цей механізм відмовляє значенню.",time-TimeFailure-failure
|
|
43
|
+
UnknownTimeZoneError,failure,"Data.TaggedError<{ readonly zoneId: string }>","",The runtime has no zone under that name.,Рантайм не має зони під такою назвою.,time-UnknownTimeZoneError-failure
|