@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,221 @@
|
|
|
1
|
+
{
|
|
2
|
+
"package": "@satorio/machinery",
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"mechanism": {
|
|
5
|
+
"mechanism": "core",
|
|
6
|
+
"import": "@satorio/machinery/core",
|
|
7
|
+
"kind": "foundation",
|
|
8
|
+
"page": "mechanisms/core",
|
|
9
|
+
"what": "Public entry to the core mechanism: the few pieces every other mechanism leans on, and which lean on nothing themselves.",
|
|
10
|
+
"whatUk": "Публічний вхід до механізму core: кілька частин, на які спирається кожен інший механізм і які самі не спираються ні на що.",
|
|
11
|
+
"rows": [
|
|
12
|
+
{
|
|
13
|
+
"name": "ClosedSet",
|
|
14
|
+
"kind": "value",
|
|
15
|
+
"signature": "interface",
|
|
16
|
+
"fallback": "",
|
|
17
|
+
"caption": "Turns an array of string literals into a closed set: the values, a union type of their members, and an `is` guard, all from one source.",
|
|
18
|
+
"captionUk": "Чітко визначений перелік (closed set) із одного джерела: значення, тип-об'єднання його членів і перевірка `is`.",
|
|
19
|
+
"anchor": "core-ClosedSet-value"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "EnvironmentEntry",
|
|
23
|
+
"kind": "value",
|
|
24
|
+
"signature": "interface",
|
|
25
|
+
"fallback": "",
|
|
26
|
+
"caption": "One variable a mechanism reads, and the one state it stands in.",
|
|
27
|
+
"captionUk": "Одна змінна, яку читає механізм, і один стан, у якому вона стоїть.",
|
|
28
|
+
"anchor": "core-EnvironmentEntry-value"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "EnvironmentState",
|
|
32
|
+
"kind": "value",
|
|
33
|
+
"signature": "type",
|
|
34
|
+
"fallback": "",
|
|
35
|
+
"caption": "Which of three states a variable stands in.",
|
|
36
|
+
"captionUk": "Котрий із трьох станів має змінна.",
|
|
37
|
+
"anchor": "core-EnvironmentState-value"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "Refusal",
|
|
41
|
+
"kind": "value",
|
|
42
|
+
"signature": "interface",
|
|
43
|
+
"fallback": "",
|
|
44
|
+
"caption": "A refusal in the three parts a reader needs: what happened, why this mechanism cannot go on without it, and what to do next.",
|
|
45
|
+
"captionUk": "Відмова у трьох частинах, яких потребує читач: що сталось, чому механізм без цього не піде далі і що робити.",
|
|
46
|
+
"anchor": "core-Refusal-value"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "Ulid",
|
|
50
|
+
"kind": "value",
|
|
51
|
+
"signature": "string & { readonly [ulidBrand]: 'Ulid' }",
|
|
52
|
+
"fallback": "",
|
|
53
|
+
"caption": "A ULID: the identifier a machine mints for a record, sortable by the moment it was minted, and a plain string everywhere it travels.",
|
|
54
|
+
"captionUk": "ULID: ідентифікатор, який машина карбує для запису, сортовний за миттю карбування і звичайний рядок усюди, куди мандрує.",
|
|
55
|
+
"anchor": "core-Ulid-value"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "bigIntsAsDecimalStrings",
|
|
59
|
+
"kind": "procedure",
|
|
60
|
+
"signature": "(_key: string, value: unknown) => unknown",
|
|
61
|
+
"fallback": "",
|
|
62
|
+
"caption": "Use as the replacer argument to `JSON.stringify`.",
|
|
63
|
+
"captionUk": "Подавайте це аргументом-заміною до `JSON.stringify`.",
|
|
64
|
+
"anchor": "core-bigIntsAsDecimalStrings-procedure"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "closedSet",
|
|
68
|
+
"kind": "procedure",
|
|
69
|
+
"signature": "<const T extends readonly string[]>(values: T) => ClosedSet<T>",
|
|
70
|
+
"fallback": "",
|
|
71
|
+
"caption": "Builds a closed set from an array of string literals, so the guard and the list it guards come from one source.",
|
|
72
|
+
"captionUk": "Будує чітко визначений перелік зі списку рядкових літералів, тож перевірка і список, який вона стереже, приходять з одного джерела.",
|
|
73
|
+
"anchor": "core-closedSet-procedure"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "fallsBackTo",
|
|
77
|
+
"kind": "procedure",
|
|
78
|
+
"signature": "(value: string) => EnvironmentState",
|
|
79
|
+
"fallback": "",
|
|
80
|
+
"caption": "The variable is safe to omit, and this is what happens instead.",
|
|
81
|
+
"captionUk": "Змінну безпечно не ставити, і ось що стається натомість.",
|
|
82
|
+
"anchor": "core-fallsBackTo-procedure"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "handedOn",
|
|
86
|
+
"kind": "procedure",
|
|
87
|
+
"signature": "(consequence: string) => EnvironmentState",
|
|
88
|
+
"fallback": "",
|
|
89
|
+
"caption": "The variable is legitimately optional with no default, because somebody else decides it, and this is what follows from leaving it unset.",
|
|
90
|
+
"captionUk": "Змінна законно необов'язкова і не має значення за замовчуванням, бо її вирішує хтось інший; ось що випливає, якщо її не поставити.",
|
|
91
|
+
"anchor": "core-handedOn-procedure"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "isUlid",
|
|
95
|
+
"kind": "procedure",
|
|
96
|
+
"signature": "(value: string) => value is Ulid",
|
|
97
|
+
"fallback": "",
|
|
98
|
+
"caption": "Whether a string is a ULID, as a type guard, so a caller narrows the type without raising anything.",
|
|
99
|
+
"captionUk": "Чи є рядок ULID, як перевірка типу, тож викликач звужує тип і нічого не піднімає.",
|
|
100
|
+
"anchor": "core-isUlid-procedure"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "optionalSecret",
|
|
104
|
+
"kind": "procedure",
|
|
105
|
+
"signature": "(name: string) => Config.Config<Option.Option<Redacted.Redacted>>",
|
|
106
|
+
"fallback": "",
|
|
107
|
+
"caption": "Reads a secret that is legitimately optional, and hands back `Option.none` when it is unset or blank.",
|
|
108
|
+
"captionUk": "Читає секрет, який законно необов'язковий, і подає `Option.none`, коли той не поставлений або порожній.",
|
|
109
|
+
"anchor": "core-optionalSecret-procedure"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"name": "optionalText",
|
|
113
|
+
"kind": "procedure",
|
|
114
|
+
"signature": "(name: string) => Config.Config<Option.Option<string>>",
|
|
115
|
+
"fallback": "",
|
|
116
|
+
"caption": "Reads a variable that is legitimately optional with no default, because somebody outside this process decides it.",
|
|
117
|
+
"captionUk": "Читає змінну, яка законно необов'язкова і не має значення за замовчуванням, бо її вирішує хтось поза цим процесом.",
|
|
118
|
+
"anchor": "core-optionalText-procedure"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": "refusalFor",
|
|
122
|
+
"kind": "procedure",
|
|
123
|
+
"signature": "(name: string, refusal: Refusal) => ConfigError.ConfigError",
|
|
124
|
+
"fallback": "",
|
|
125
|
+
"caption": "The one failure a refusing variable raises, with its three parts sewn into a single line.",
|
|
126
|
+
"captionUk": "Одна відмова, яку піднімає змінна, що відмовляє, з трьома її частинами, зшитими в один рядок.",
|
|
127
|
+
"anchor": "core-refusalFor-procedure"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"name": "refusalText",
|
|
131
|
+
"kind": "procedure",
|
|
132
|
+
"signature": "(refusal: Refusal) => string",
|
|
133
|
+
"fallback": "",
|
|
134
|
+
"caption": "Sews a refusal into the one line an operator reads in a log or a startup failure.",
|
|
135
|
+
"captionUk": "Зшиває відмову в один рядок, який оператор читає в лозі або у відмові на старті.",
|
|
136
|
+
"anchor": "core-refusalText-procedure"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "refuses",
|
|
140
|
+
"kind": "procedure",
|
|
141
|
+
"signature": "(refusal: Refusal) => EnvironmentState",
|
|
142
|
+
"fallback": "",
|
|
143
|
+
"caption": "The mechanism cannot work without the variable, and this is the three-part text a reader meets when it is missing.",
|
|
144
|
+
"captionUk": "Механізм без цієї змінної не працює, і ось той текст із трьох частин, який читач зустріне, коли її немає.",
|
|
145
|
+
"anchor": "core-refuses-procedure"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"name": "requiredSecret",
|
|
149
|
+
"kind": "procedure",
|
|
150
|
+
"signature": "(name: string, refusal: Refusal) => Config.Config<Redacted.Redacted>",
|
|
151
|
+
"fallback": "",
|
|
152
|
+
"caption": "Reads a secret a mechanism cannot work without, and refuses in the same three parts when it is missing or blank.",
|
|
153
|
+
"captionUk": "Читає секрет, без якого механізм не працює, і відмовляє тими самими трьома частинами, коли той відсутній або порожній.",
|
|
154
|
+
"anchor": "core-requiredSecret-procedure"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"name": "requiredText",
|
|
158
|
+
"kind": "procedure",
|
|
159
|
+
"signature": "(name: string, refusal: Refusal) => Config.Config<string>",
|
|
160
|
+
"fallback": "",
|
|
161
|
+
"caption": "Reads a variable that a mechanism cannot work without, and refuses in three parts when it is missing or blank.",
|
|
162
|
+
"captionUk": "Читає змінну, без якої механізм не працює, і відмовляє трьома частинами, коли та відсутня або порожня.",
|
|
163
|
+
"anchor": "core-requiredText-procedure"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"name": "ulid",
|
|
167
|
+
"kind": "procedure",
|
|
168
|
+
"signature": "(raw: string) => Ulid",
|
|
169
|
+
"fallback": "",
|
|
170
|
+
"caption": "Reads a string as a ULID and throws `NotAUlidError` when it is not one, so a raw string comes through one door.",
|
|
171
|
+
"captionUk": "Читає рядок як ULID і кидає `NotAUlidError`, коли це не ULID, тож сирий рядок заходить одними дверима.",
|
|
172
|
+
"anchor": "core-ulid-procedure"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"name": "variableNameOf",
|
|
176
|
+
"kind": "procedure",
|
|
177
|
+
"signature": "(entry: EnvironmentEntry) => string",
|
|
178
|
+
"fallback": "",
|
|
179
|
+
"caption": "The name an operator sets, with `<PREFIX>` standing in front of a suffix the application chooses at mount time.",
|
|
180
|
+
"captionUk": "Назва, яку ставить оператор, де `<PREFIX>` стоїть перед суфіксом, що його застосунок обирає під час монтування.",
|
|
181
|
+
"anchor": "core-variableNameOf-procedure"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "wholeNumberFallingBackTo",
|
|
185
|
+
"kind": "procedure",
|
|
186
|
+
"signature": "(name: string, lowest: number, highest: number, fallback: number, refusal: Refusal) => Config.Config<number>",
|
|
187
|
+
"fallback": "",
|
|
188
|
+
"caption": "Reads a whole number a mechanism is happy to do without, and falls back to the value it names when nobody set the variable.",
|
|
189
|
+
"captionUk": "Читає ціле число, без якого механізм радо обійдеться, і падає на назване значення, коли змінну ніхто не поставив.",
|
|
190
|
+
"anchor": "core-wholeNumberFallingBackTo-procedure"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"name": "wholeNumberWithin",
|
|
194
|
+
"kind": "procedure",
|
|
195
|
+
"signature": "(name: string, lowest: number, highest: number, refusal: Refusal) => Config.Config<number>",
|
|
196
|
+
"fallback": "",
|
|
197
|
+
"caption": "Reads a whole number inside a range, and refuses in three parts when it is not one.",
|
|
198
|
+
"captionUk": "Читає ціле число всередині діапазону і відмовляє трьома частинами, коли це не воно.",
|
|
199
|
+
"anchor": "core-wholeNumberWithin-procedure"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"name": "DomainError",
|
|
203
|
+
"kind": "failure",
|
|
204
|
+
"signature": "Error",
|
|
205
|
+
"fallback": "",
|
|
206
|
+
"caption": "Base class for domain errors.",
|
|
207
|
+
"captionUk": "Базовий клас доменних помилок.",
|
|
208
|
+
"anchor": "core-DomainError-failure"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"name": "NotAUlidError",
|
|
212
|
+
"kind": "failure",
|
|
213
|
+
"signature": "DomainError",
|
|
214
|
+
"fallback": "",
|
|
215
|
+
"caption": "What a caller meets when a string that is not a ULID reaches `ulid`; the message quotes the exact value received.",
|
|
216
|
+
"captionUk": "Що зустрічає викликач, коли до `ulid` дійшов рядок, який не є ULID; повідомлення цитує точне отримане значення.",
|
|
217
|
+
"anchor": "core-NotAUlidError-failure"
|
|
218
|
+
}
|
|
219
|
+
]
|
|
220
|
+
}
|
|
221
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
package: @satorio/machinery
|
|
2
|
+
version: 0.2.1
|
|
3
|
+
mechanism:
|
|
4
|
+
mechanism: core
|
|
5
|
+
import: @satorio/machinery/core
|
|
6
|
+
kind: foundation
|
|
7
|
+
page: mechanisms/core
|
|
8
|
+
what: "Public entry to the core mechanism: the few pieces every other mechanism leans on, and which lean on nothing themselves."
|
|
9
|
+
whatUk: "Публічний вхід до механізму core: кілька частин, на які спирається кожен інший механізм і які самі не спираються ні на що."
|
|
10
|
+
rows[23]{name,kind,signature,fallback,caption,captionUk,anchor}:
|
|
11
|
+
ClosedSet,value,interface,"","Turns an array of string literals into a closed set: the values, a union type of their members, and an `is` guard, all from one source.","Чітко визначений перелік (closed set) із одного джерела: значення, тип-об'єднання його членів і перевірка `is`.",core-ClosedSet-value
|
|
12
|
+
EnvironmentEntry,value,interface,"","One variable a mechanism reads, and the one state it stands in.","Одна змінна, яку читає механізм, і один стан, у якому вона стоїть.",core-EnvironmentEntry-value
|
|
13
|
+
EnvironmentState,value,type,"",Which of three states a variable stands in.,Котрий із трьох станів має змінна.,core-EnvironmentState-value
|
|
14
|
+
Refusal,value,interface,"","A refusal in the three parts a reader needs: what happened, why this mechanism cannot go on without it, and what to do next.","Відмова у трьох частинах, яких потребує читач: що сталось, чому механізм без цього не піде далі і що робити.",core-Refusal-value
|
|
15
|
+
Ulid,value,"string & { readonly [ulidBrand]: 'Ulid' }","","A ULID: the identifier a machine mints for a record, sortable by the moment it was minted, and a plain string everywhere it travels.","ULID: ідентифікатор, який машина карбує для запису, сортовний за миттю карбування і звичайний рядок усюди, куди мандрує.",core-Ulid-value
|
|
16
|
+
bigIntsAsDecimalStrings,procedure,"(_key: string, value: unknown) => unknown","",Use as the replacer argument to `JSON.stringify`.,Подавайте це аргументом-заміною до `JSON.stringify`.,core-bigIntsAsDecimalStrings-procedure
|
|
17
|
+
closedSet,procedure,"<const T extends readonly string[]>(values: T) => ClosedSet<T>","","Builds a closed set from an array of string literals, so the guard and the list it guards come from one source.","Будує чітко визначений перелік зі списку рядкових літералів, тож перевірка і список, який вона стереже, приходять з одного джерела.",core-closedSet-procedure
|
|
18
|
+
fallsBackTo,procedure,"(value: string) => EnvironmentState","","The variable is safe to omit, and this is what happens instead.","Змінну безпечно не ставити, і ось що стається натомість.",core-fallsBackTo-procedure
|
|
19
|
+
handedOn,procedure,"(consequence: string) => EnvironmentState","","The variable is legitimately optional with no default, because somebody else decides it, and this is what follows from leaving it unset.","Змінна законно необов'язкова і не має значення за замовчуванням, бо її вирішує хтось інший; ось що випливає, якщо її не поставити.",core-handedOn-procedure
|
|
20
|
+
isUlid,procedure,"(value: string) => value is Ulid","","Whether a string is a ULID, as a type guard, so a caller narrows the type without raising anything.","Чи є рядок ULID, як перевірка типу, тож викликач звужує тип і нічого не піднімає.",core-isUlid-procedure
|
|
21
|
+
optionalSecret,procedure,"(name: string) => Config.Config<Option.Option<Redacted.Redacted>>","","Reads a secret that is legitimately optional, and hands back `Option.none` when it is unset or blank.","Читає секрет, який законно необов'язковий, і подає `Option.none`, коли той не поставлений або порожній.",core-optionalSecret-procedure
|
|
22
|
+
optionalText,procedure,"(name: string) => Config.Config<Option.Option<string>>","","Reads a variable that is legitimately optional with no default, because somebody outside this process decides it.","Читає змінну, яка законно необов'язкова і не має значення за замовчуванням, бо її вирішує хтось поза цим процесом.",core-optionalText-procedure
|
|
23
|
+
refusalFor,procedure,"(name: string, refusal: Refusal) => ConfigError.ConfigError","","The one failure a refusing variable raises, with its three parts sewn into a single line.","Одна відмова, яку піднімає змінна, що відмовляє, з трьома її частинами, зшитими в один рядок.",core-refusalFor-procedure
|
|
24
|
+
refusalText,procedure,"(refusal: Refusal) => string","",Sews a refusal into the one line an operator reads in a log or a startup failure.,"Зшиває відмову в один рядок, який оператор читає в лозі або у відмові на старті.",core-refusalText-procedure
|
|
25
|
+
refuses,procedure,"(refusal: Refusal) => EnvironmentState","","The mechanism cannot work without the variable, and this is the three-part text a reader meets when it is missing.","Механізм без цієї змінної не працює, і ось той текст із трьох частин, який читач зустріне, коли її немає.",core-refuses-procedure
|
|
26
|
+
requiredSecret,procedure,"(name: string, refusal: Refusal) => Config.Config<Redacted.Redacted>","","Reads a secret a mechanism cannot work without, and refuses in the same three parts when it is missing or blank.","Читає секрет, без якого механізм не працює, і відмовляє тими самими трьома частинами, коли той відсутній або порожній.",core-requiredSecret-procedure
|
|
27
|
+
requiredText,procedure,"(name: string, refusal: Refusal) => Config.Config<string>","","Reads a variable that a mechanism cannot work without, and refuses in three parts when it is missing or blank.","Читає змінну, без якої механізм не працює, і відмовляє трьома частинами, коли та відсутня або порожня.",core-requiredText-procedure
|
|
28
|
+
ulid,procedure,"(raw: string) => Ulid","","Reads a string as a ULID and throws `NotAUlidError` when it is not one, so a raw string comes through one door.","Читає рядок як ULID і кидає `NotAUlidError`, коли це не ULID, тож сирий рядок заходить одними дверима.",core-ulid-procedure
|
|
29
|
+
variableNameOf,procedure,"(entry: EnvironmentEntry) => string","","The name an operator sets, with `<PREFIX>` standing in front of a suffix the application chooses at mount time.","Назва, яку ставить оператор, де `<PREFIX>` стоїть перед суфіксом, що його застосунок обирає під час монтування.",core-variableNameOf-procedure
|
|
30
|
+
wholeNumberFallingBackTo,procedure,"(name: string, lowest: number, highest: number, fallback: number, refusal: Refusal) => Config.Config<number>","","Reads a whole number a mechanism is happy to do without, and falls back to the value it names when nobody set the variable.","Читає ціле число, без якого механізм радо обійдеться, і падає на назване значення, коли змінну ніхто не поставив.",core-wholeNumberFallingBackTo-procedure
|
|
31
|
+
wholeNumberWithin,procedure,"(name: string, lowest: number, highest: number, refusal: Refusal) => Config.Config<number>","","Reads a whole number inside a range, and refuses in three parts when it is not one.","Читає ціле число всередині діапазону і відмовляє трьома частинами, коли це не воно.",core-wholeNumberWithin-procedure
|
|
32
|
+
DomainError,failure,Error,"",Base class for domain errors.,Базовий клас доменних помилок.,core-DomainError-failure
|
|
33
|
+
NotAUlidError,failure,DomainError,"",What a caller meets when a string that is not a ULID reaches `ulid`; the message quotes the exact value received.,"Що зустрічає викликач, коли до `ulid` дійшов рядок, який не є ULID; повідомлення цитує точне отримане значення.",core-NotAUlidError-failure
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
{
|
|
2
|
+
"package": "@satorio/machinery",
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"mechanism": {
|
|
5
|
+
"mechanism": "graphql",
|
|
6
|
+
"import": "@satorio/machinery/graphql",
|
|
7
|
+
"kind": "adapter",
|
|
8
|
+
"page": "mechanisms/graphql",
|
|
9
|
+
"what": "Public entry to the graphql mechanism: one server that answers your operations and the readiness probes beside them.",
|
|
10
|
+
"whatUk": "Публічний вхід до механізму graphql: один сервер, який відповідає на ваші операції і на проби готовності поруч із ними.",
|
|
11
|
+
"rows": [
|
|
12
|
+
{
|
|
13
|
+
"name": "ENVIRONMENT",
|
|
14
|
+
"kind": "value",
|
|
15
|
+
"signature": "readonly EnvironmentEntry[]",
|
|
16
|
+
"fallback": "",
|
|
17
|
+
"caption": "Every variable this adapter reads, and the one state each of them stands in.",
|
|
18
|
+
"captionUk": "Кожна змінна, яку читає цей адаптер (adapter), і один стан, у якому стоїть кожна з них.",
|
|
19
|
+
"anchor": "graphql-ENVIRONMENT-value"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "EveryFailureIsClassified",
|
|
23
|
+
"kind": "value",
|
|
24
|
+
"signature": "type",
|
|
25
|
+
"fallback": "",
|
|
26
|
+
"caption": "The proof that every failure a service can raise is mapped at this boundary.",
|
|
27
|
+
"captionUk": "Доказ того, що кожну відмову, яку може підняти сервіс, замаплено на цій межі.",
|
|
28
|
+
"anchor": "graphql-EveryFailureIsClassified-value"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "graphiqlEnabledFromEnvironment",
|
|
32
|
+
"kind": "value",
|
|
33
|
+
"signature": "Config.Config<boolean>",
|
|
34
|
+
"fallback": "",
|
|
35
|
+
"caption": "Whether to serve the editor page.",
|
|
36
|
+
"captionUk": "Чи віддавати сторінку редактора.",
|
|
37
|
+
"anchor": "graphql-graphiqlEnabledFromEnvironment-value"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "GraphiqlPage",
|
|
41
|
+
"kind": "value",
|
|
42
|
+
"signature": "interface",
|
|
43
|
+
"fallback": "",
|
|
44
|
+
"caption": "A GraphiQL page: a title and a pre-filled document.",
|
|
45
|
+
"captionUk": "Сторінка GraphiQL: заголовок і наперед заповнений документ.",
|
|
46
|
+
"anchor": "graphql-GraphiqlPage-value"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "GRAPHQL_ENDPOINT",
|
|
50
|
+
"kind": "value",
|
|
51
|
+
"signature": "const",
|
|
52
|
+
"fallback": "",
|
|
53
|
+
"caption": "The one path the GraphQL endpoint answers on.",
|
|
54
|
+
"captionUk": "Єдиний шлях, на якому відповідає точка GraphQL.",
|
|
55
|
+
"anchor": "graphql-GRAPHQL-ENDPOINT-value"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "GraphQLContext",
|
|
59
|
+
"kind": "value",
|
|
60
|
+
"signature": "interface",
|
|
61
|
+
"fallback": "",
|
|
62
|
+
"caption": "What a resolver reads from its context: one call that runs a use case's program and answers with its value or a `GraphQLError`.",
|
|
63
|
+
"captionUk": "Що резолвер читає зі свого контексту: один виклик, який виконує програму процедури і відповідає її значенням або `GraphQLError`.",
|
|
64
|
+
"anchor": "graphql-GraphQLContext-value"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "graphqlPortFromEnvironment",
|
|
68
|
+
"kind": "value",
|
|
69
|
+
"signature": "Config.Config<number>",
|
|
70
|
+
"fallback": "",
|
|
71
|
+
"caption": "The port to listen on.",
|
|
72
|
+
"captionUk": "Порт, на якому слухати.",
|
|
73
|
+
"anchor": "graphql-graphqlPortFromEnvironment-value"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "RunOperationsExit",
|
|
77
|
+
"kind": "value",
|
|
78
|
+
"signature": "type",
|
|
79
|
+
"fallback": "",
|
|
80
|
+
"caption": "The minimal capability a resolver borrows from the runtime: run a program that needs `R` and return its `Exit`.",
|
|
81
|
+
"captionUk": "Найменша спроможність, яку резолвер позичає в рантайму: виконати програму, що потребує `R`, і повернути її `Exit`.",
|
|
82
|
+
"anchor": "graphql-RunOperationsExit-value"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "asGraphQLError",
|
|
86
|
+
"kind": "procedure",
|
|
87
|
+
"signature": "(failure: OperationFailure | ParseResult.ParseError) => GraphQLError",
|
|
88
|
+
"fallback": "",
|
|
89
|
+
"caption": "Maps a GraphQL failure to a `GraphQLError`: the same three-class operation failure channel, plus input decoder failures — no second catalog.",
|
|
90
|
+
"captionUk": "Мапить відмову GraphQL на `GraphQLError`: той самий канал відмов операції з трьох класів плюс відмови декодера входу — жодного другого каталогу.",
|
|
91
|
+
"anchor": "graphql-asGraphQLError-procedure"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "graphiqlExampleProblems",
|
|
95
|
+
"kind": "procedure",
|
|
96
|
+
"signature": "(schema: GraphQLSchema, page: GraphiqlPage) => readonly GraphiqlExampleProblem[]",
|
|
97
|
+
"fallback": "",
|
|
98
|
+
"caption": "Checks a GraphiQL page's default query against a schema.",
|
|
99
|
+
"captionUk": "Звіряє типовий запит сторінки GraphiQL зі схемою.",
|
|
100
|
+
"anchor": "graphql-graphiqlExampleProblems-procedure"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "graphqlContextFrom",
|
|
104
|
+
"kind": "procedure",
|
|
105
|
+
"signature": "<R>(runExit: RunOperationsExit<R>) => GraphQLContext<R>",
|
|
106
|
+
"fallback": "",
|
|
107
|
+
"caption": "Builds that context around the runtime's own `runPromiseExit`, so a resolver never touches the runtime directly.",
|
|
108
|
+
"captionUk": "Будує той контекст навколо власного `runPromiseExit` рантайму, тож резолвер ніколи не торкається рантайму напряму.",
|
|
109
|
+
"anchor": "graphql-graphqlContextFrom-procedure"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"name": "makeSubGraphSchemaBuilder",
|
|
113
|
+
"kind": "procedure",
|
|
114
|
+
"signature": "<Context extends object>()",
|
|
115
|
+
"fallback": "",
|
|
116
|
+
"caption": "Returns a builder factory carrying the resolver context type.",
|
|
117
|
+
"captionUk": "Повертає фабрику будівників, яка несе тип контексту резолвера.",
|
|
118
|
+
"anchor": "graphql-makeSubGraphSchemaBuilder-procedure"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": "makeYogaServer",
|
|
122
|
+
"kind": "procedure",
|
|
123
|
+
"signature": "<R>(options: GraphQLServerOptions<R>) => YogaServerInstance<Record<string, never>, GraphQLContext<R>>",
|
|
124
|
+
"fallback": "",
|
|
125
|
+
"caption": "Builds a Yoga GraphQL server for Bun.",
|
|
126
|
+
"captionUk": "Будує GraphQL-сервер Yoga для Bun.",
|
|
127
|
+
"anchor": "graphql-makeYogaServer-procedure"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"name": "serverCannotListen",
|
|
131
|
+
"kind": "procedure",
|
|
132
|
+
"signature": "(port: number, cause: unknown) => ServerCannotListenError",
|
|
133
|
+
"fallback": "",
|
|
134
|
+
"caption": "Turns whatever the runtime threw while opening the socket into the named failure a caller reads.",
|
|
135
|
+
"captionUk": "Перетворює те, що кинув рантайм, відкриваючи сокет, на названу відмову, яку читає викликач.",
|
|
136
|
+
"anchor": "graphql-serverCannotListen-procedure"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "graphqlServerLive",
|
|
140
|
+
"kind": "adapter",
|
|
141
|
+
"signature": "<R>(options: GraphQLRequestHandlerOptions<R>) => Layer.Layer<never, ConfigError.ConfigError | ServerCannotListenError, R>",
|
|
142
|
+
"fallback": "",
|
|
143
|
+
"caption": "The one layer this mechanism mounts: the server that answers your operations.",
|
|
144
|
+
"captionUk": "Єдиний шар, який монтує цей механізм: сервер, що відповідає на ваші операції.",
|
|
145
|
+
"anchor": "graphql-graphqlServerLive-adapter"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"name": "OperationFailure",
|
|
149
|
+
"kind": "failure",
|
|
150
|
+
"signature": "type",
|
|
151
|
+
"fallback": "",
|
|
152
|
+
"caption": "Everything a resolver may fail with, as one closed set: not found, rejected, or unavailable.",
|
|
153
|
+
"captionUk": "Усе, чим резолвер може відмовити, як один чітко визначений перелік: не знайдено, відхилено або недоступно.",
|
|
154
|
+
"anchor": "graphql-OperationFailure-failure"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"name": "OperationRejectedError",
|
|
158
|
+
"kind": "failure",
|
|
159
|
+
"signature": "Data.TaggedError<{ readonly rule: string; readonly reason: string; readonly detail: string }>",
|
|
160
|
+
"fallback": "",
|
|
161
|
+
"caption": "A resolver's rule rejected the operation, and `reason` names the cause it recognized.",
|
|
162
|
+
"captionUk": "Правило резолвера відхилило операцію, і `reason` називає причину, яку воно розпізнало.",
|
|
163
|
+
"anchor": "graphql-OperationRejectedError-failure"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"name": "OperationsUnavailableError",
|
|
167
|
+
"kind": "failure",
|
|
168
|
+
"signature": "Data.TaggedError<{ readonly operation: string; readonly cause: unknown }>",
|
|
169
|
+
"fallback": "",
|
|
170
|
+
"caption": "A resolver's own dependency did not answer; `cause` carries the port's own failure.",
|
|
171
|
+
"captionUk": "Власна залежність резолвера не відповіла; `cause` несе відмову самого порту.",
|
|
172
|
+
"anchor": "graphql-OperationsUnavailableError-failure"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"name": "ServerCannotListenError",
|
|
176
|
+
"kind": "failure",
|
|
177
|
+
"signature": "Data.TaggedError<{ readonly port: number; readonly refusal: Refusal; readonly cause: unknown }>",
|
|
178
|
+
"fallback": "",
|
|
179
|
+
"caption": "The socket never opened.",
|
|
180
|
+
"captionUk": "Сокет так і не відкрився.",
|
|
181
|
+
"anchor": "graphql-ServerCannotListenError-failure"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "SubjectNotFoundError",
|
|
185
|
+
"kind": "failure",
|
|
186
|
+
"signature": "Data.TaggedError<{ readonly subject: string; readonly id: string }>",
|
|
187
|
+
"fallback": "",
|
|
188
|
+
"caption": "One of exactly three operation failure classes below — the closed set a resolver maps to.",
|
|
189
|
+
"captionUk": "Один із рівно трьох класів відмови операції нижче — чітко визначений перелік, на який мапить резолвер.",
|
|
190
|
+
"anchor": "graphql-SubjectNotFoundError-failure"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"name": "GRAPHQL_PORT",
|
|
194
|
+
"kind": "environment variable",
|
|
195
|
+
"signature": "falls back",
|
|
196
|
+
"fallback": "4000",
|
|
197
|
+
"caption": "The port the GraphQL endpoint and the readiness probes listen on.",
|
|
198
|
+
"captionUk": "Порт, на якому слухають точка GraphQL і проби готовності.",
|
|
199
|
+
"anchor": "graphql-GRAPHQL-PORT-environment-variable"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"name": "GRAPHIQL_ENABLED",
|
|
203
|
+
"kind": "environment variable",
|
|
204
|
+
"signature": "falls back",
|
|
205
|
+
"fallback": "true",
|
|
206
|
+
"caption": "Whether the GraphiQL editor page is served on the same endpoint.",
|
|
207
|
+
"captionUk": "Чи віддається сторінка редактора GraphiQL на тій самій точці.",
|
|
208
|
+
"anchor": "graphql-GRAPHIQL-ENABLED-environment-variable"
|
|
209
|
+
}
|
|
210
|
+
]
|
|
211
|
+
}
|
|
212
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
package: @satorio/machinery
|
|
2
|
+
version: 0.2.1
|
|
3
|
+
mechanism:
|
|
4
|
+
mechanism: graphql
|
|
5
|
+
import: @satorio/machinery/graphql
|
|
6
|
+
kind: adapter
|
|
7
|
+
page: mechanisms/graphql
|
|
8
|
+
what: "Public entry to the graphql mechanism: one server that answers your operations and the readiness probes beside them."
|
|
9
|
+
whatUk: "Публічний вхід до механізму graphql: один сервер, який відповідає на ваші операції і на проби готовності поруч із ними."
|
|
10
|
+
rows[22]{name,kind,signature,fallback,caption,captionUk,anchor}:
|
|
11
|
+
ENVIRONMENT,value,"readonly EnvironmentEntry[]","","Every variable this adapter reads, and the one state each of them stands in.","Кожна змінна, яку читає цей адаптер (adapter), і один стан, у якому стоїть кожна з них.",graphql-ENVIRONMENT-value
|
|
12
|
+
EveryFailureIsClassified,value,type,"",The proof that every failure a service can raise is mapped at this boundary.,"Доказ того, що кожну відмову, яку може підняти сервіс, замаплено на цій межі.",graphql-EveryFailureIsClassified-value
|
|
13
|
+
graphiqlEnabledFromEnvironment,value,Config.Config<boolean>,"",Whether to serve the editor page.,Чи віддавати сторінку редактора.,graphql-graphiqlEnabledFromEnvironment-value
|
|
14
|
+
GraphiqlPage,value,interface,"","A GraphiQL page: a title and a pre-filled document.","Сторінка GraphiQL: заголовок і наперед заповнений документ.",graphql-GraphiqlPage-value
|
|
15
|
+
GRAPHQL_ENDPOINT,value,const,"",The one path the GraphQL endpoint answers on.,"Єдиний шлях, на якому відповідає точка GraphQL.",graphql-GRAPHQL-ENDPOINT-value
|
|
16
|
+
GraphQLContext,value,interface,"","What a resolver reads from its context: one call that runs a use case's program and answers with its value or a `GraphQLError`.","Що резолвер читає зі свого контексту: один виклик, який виконує програму процедури і відповідає її значенням або `GraphQLError`.",graphql-GraphQLContext-value
|
|
17
|
+
graphqlPortFromEnvironment,value,Config.Config<number>,"",The port to listen on.,"Порт, на якому слухати.",graphql-graphqlPortFromEnvironment-value
|
|
18
|
+
RunOperationsExit,value,type,"","The minimal capability a resolver borrows from the runtime: run a program that needs `R` and return its `Exit`.","Найменша спроможність, яку резолвер позичає в рантайму: виконати програму, що потребує `R`, і повернути її `Exit`.",graphql-RunOperationsExit-value
|
|
19
|
+
asGraphQLError,procedure,"(failure: OperationFailure | ParseResult.ParseError) => GraphQLError","","Maps a GraphQL failure to a `GraphQLError`: the same three-class operation failure channel, plus input decoder failures — no second catalog.","Мапить відмову GraphQL на `GraphQLError`: той самий канал відмов операції з трьох класів плюс відмови декодера входу — жодного другого каталогу.",graphql-asGraphQLError-procedure
|
|
20
|
+
graphiqlExampleProblems,procedure,"(schema: GraphQLSchema, page: GraphiqlPage) => readonly GraphiqlExampleProblem[]","",Checks a GraphiQL page's default query against a schema.,Звіряє типовий запит сторінки GraphiQL зі схемою.,graphql-graphiqlExampleProblems-procedure
|
|
21
|
+
graphqlContextFrom,procedure,"<R>(runExit: RunOperationsExit<R>) => GraphQLContext<R>","","Builds that context around the runtime's own `runPromiseExit`, so a resolver never touches the runtime directly.","Будує той контекст навколо власного `runPromiseExit` рантайму, тож резолвер ніколи не торкається рантайму напряму.",graphql-graphqlContextFrom-procedure
|
|
22
|
+
makeSubGraphSchemaBuilder,procedure,<Context extends object>(),"",Returns a builder factory carrying the resolver context type.,"Повертає фабрику будівників, яка несе тип контексту резолвера.",graphql-makeSubGraphSchemaBuilder-procedure
|
|
23
|
+
makeYogaServer,procedure,"<R>(options: GraphQLServerOptions<R>) => YogaServerInstance<Record<string, never>, GraphQLContext<R>>","",Builds a Yoga GraphQL server for Bun.,Будує GraphQL-сервер Yoga для Bun.,graphql-makeYogaServer-procedure
|
|
24
|
+
serverCannotListen,procedure,"(port: number, cause: unknown) => ServerCannotListenError","",Turns whatever the runtime threw while opening the socket into the named failure a caller reads.,"Перетворює те, що кинув рантайм, відкриваючи сокет, на названу відмову, яку читає викликач.",graphql-serverCannotListen-procedure
|
|
25
|
+
graphqlServerLive,adapter,"<R>(options: GraphQLRequestHandlerOptions<R>) => Layer.Layer<never, ConfigError.ConfigError | ServerCannotListenError, R>","","The one layer this mechanism mounts: the server that answers your operations.","Єдиний шар, який монтує цей механізм: сервер, що відповідає на ваші операції.",graphql-graphqlServerLive-adapter
|
|
26
|
+
OperationFailure,failure,type,"","Everything a resolver may fail with, as one closed set: not found, rejected, or unavailable.","Усе, чим резолвер може відмовити, як один чітко визначений перелік: не знайдено, відхилено або недоступно.",graphql-OperationFailure-failure
|
|
27
|
+
OperationRejectedError,failure,"Data.TaggedError<{ readonly rule: string; readonly reason: string; readonly detail: string }>","","A resolver's rule rejected the operation, and `reason` names the cause it recognized.","Правило резолвера відхилило операцію, і `reason` називає причину, яку воно розпізнало.",graphql-OperationRejectedError-failure
|
|
28
|
+
OperationsUnavailableError,failure,"Data.TaggedError<{ readonly operation: string; readonly cause: unknown }>","",A resolver's own dependency did not answer; `cause` carries the port's own failure.,Власна залежність резолвера не відповіла; `cause` несе відмову самого порту.,graphql-OperationsUnavailableError-failure
|
|
29
|
+
ServerCannotListenError,failure,"Data.TaggedError<{ readonly port: number; readonly refusal: Refusal; readonly cause: unknown }>","",The socket never opened.,Сокет так і не відкрився.,graphql-ServerCannotListenError-failure
|
|
30
|
+
SubjectNotFoundError,failure,"Data.TaggedError<{ readonly subject: string; readonly id: string }>","",One of exactly three operation failure classes below — the closed set a resolver maps to.,"Один із рівно трьох класів відмови операції нижче — чітко визначений перелік, на який мапить резолвер.",graphql-SubjectNotFoundError-failure
|
|
31
|
+
GRAPHQL_PORT,environment variable,falls back,"4000",The port the GraphQL endpoint and the readiness probes listen on.,"Порт, на якому слухають точка GraphQL і проби готовності.",graphql-GRAPHQL-PORT-environment-variable
|
|
32
|
+
GRAPHIQL_ENABLED,environment variable,falls back,"true",Whether the GraphiQL editor page is served on the same endpoint.,Чи віддається сторінка редактора GraphiQL на тій самій точці.,graphql-GRAPHIQL-ENABLED-environment-variable
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
{
|
|
2
|
+
"package": "@satorio/machinery",
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"mechanism": {
|
|
5
|
+
"mechanism": "http",
|
|
6
|
+
"import": "@satorio/machinery/http",
|
|
7
|
+
"kind": "foundation",
|
|
8
|
+
"page": "mechanisms/http",
|
|
9
|
+
"what": "Public entry to the http mechanism: readiness probes mounted on the same port as GraphQL.",
|
|
10
|
+
"whatUk": "Публічний вхід до механізму http: проби готовності (ReadinessProbe), змонтовані на тому самому порту (port), що й GraphQL.",
|
|
11
|
+
"rows": [
|
|
12
|
+
{
|
|
13
|
+
"name": "DEFAULT_HEALTH_CHECK_DEADLINE_MILLIS",
|
|
14
|
+
"kind": "value",
|
|
15
|
+
"signature": "const",
|
|
16
|
+
"fallback": "",
|
|
17
|
+
"caption": "How long one check gets before it counts as down.",
|
|
18
|
+
"captionUk": "Скільки часу дістає одна перевірка, перш ніж рахуватись як недоступна.",
|
|
19
|
+
"anchor": "http-DEFAULT-HEALTH-CHECK-DEADLINE-MILLIS-value"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "HealthCheckStatus",
|
|
23
|
+
"kind": "value",
|
|
24
|
+
"signature": "'ok' | 'down'",
|
|
25
|
+
"fallback": "",
|
|
26
|
+
"caption": "How one dependency came back: it answered, or it is down.",
|
|
27
|
+
"captionUk": "Як відповіла одна залежність: вона відповіла, або вона лежить.",
|
|
28
|
+
"anchor": "http-HealthCheckStatus-value"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "HealthRoutesOptions",
|
|
32
|
+
"kind": "value",
|
|
33
|
+
"signature": "interface",
|
|
34
|
+
"fallback": "",
|
|
35
|
+
"caption": "What the readiness routes need: the runtime that runs a check, the checks themselves, and the deadline one check gets.",
|
|
36
|
+
"captionUk": "Що потрібно маршрутам готовності: рантайм, який виконує перевірку, самі перевірки і строк, який дістає одна з них.",
|
|
37
|
+
"anchor": "http-HealthRoutesOptions-value"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "HEALTHZ_PATH",
|
|
41
|
+
"kind": "value",
|
|
42
|
+
"signature": "const",
|
|
43
|
+
"fallback": "",
|
|
44
|
+
"caption": "Same check as READYZ_PATH, under a second name.",
|
|
45
|
+
"captionUk": "Та сама перевірка, що й `READYZ_PATH`, під другою назвою.",
|
|
46
|
+
"anchor": "http-HEALTHZ-PATH-value"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "LIVEZ_PATH",
|
|
50
|
+
"kind": "value",
|
|
51
|
+
"signature": "const",
|
|
52
|
+
"fallback": "",
|
|
53
|
+
"caption": "The path that answers whether this process is alive at all, without checking a single dependency.",
|
|
54
|
+
"captionUk": "Шлях, який відповідає, чи цей процес узагалі живий, не питаючи жодної залежності.",
|
|
55
|
+
"anchor": "http-LIVEZ-PATH-value"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "NamedHealthCheck",
|
|
59
|
+
"kind": "value",
|
|
60
|
+
"signature": "interface",
|
|
61
|
+
"fallback": "",
|
|
62
|
+
"caption": "One dependency to check, under the name the answer reports it by.",
|
|
63
|
+
"captionUk": "Одна залежність до перевірки, під назвою, якою відповідь про неї звітує.",
|
|
64
|
+
"anchor": "http-NamedHealthCheck-value"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "ReadinessOutcome",
|
|
68
|
+
"kind": "value",
|
|
69
|
+
"signature": "interface",
|
|
70
|
+
"fallback": "",
|
|
71
|
+
"caption": "What the readiness endpoint answers: whether the service is ready, and how each dependency came back.",
|
|
72
|
+
"captionUk": "Що відповідає точка готовності: чи сервіс готовий і як відповіла кожна залежність.",
|
|
73
|
+
"anchor": "http-ReadinessOutcome-value"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "READYZ_PATH",
|
|
77
|
+
"kind": "value",
|
|
78
|
+
"signature": "const",
|
|
79
|
+
"fallback": "",
|
|
80
|
+
"caption": "The path that answers whether this service can take traffic, after every mounted dependency has been asked.",
|
|
81
|
+
"captionUk": "Шлях, який відповідає, чи цей сервіс може брати трафік, після того як опитано кожну змонтовану залежність.",
|
|
82
|
+
"anchor": "http-READYZ-PATH-value"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "RunHealthCheck",
|
|
86
|
+
"kind": "value",
|
|
87
|
+
"signature": "type",
|
|
88
|
+
"fallback": "",
|
|
89
|
+
"caption": "Runs a readiness check and returns its Exit.",
|
|
90
|
+
"captionUk": "Виконує перевірку готовності і повертає її `Exit`.",
|
|
91
|
+
"anchor": "http-RunHealthCheck-value"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "checkReadiness",
|
|
95
|
+
"kind": "procedure",
|
|
96
|
+
"signature": "<R>(options: HealthRoutesOptions<R>) => Effect.Effect<ReadinessOutcome>",
|
|
97
|
+
"fallback": "",
|
|
98
|
+
"caption": "Runs every check independently, in parallel, under its own deadline.",
|
|
99
|
+
"captionUk": "Виконує кожну перевірку незалежно, паралельно, під її власним строком.",
|
|
100
|
+
"anchor": "http-checkReadiness-procedure"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "healthRoutesFetch",
|
|
104
|
+
"kind": "procedure",
|
|
105
|
+
"signature": "<R>(options: HealthRoutesOptions<R>) => ((request: Request) => Promise<Response | null>)",
|
|
106
|
+
"fallback": "",
|
|
107
|
+
"caption": "Handles the three readiness endpoints.",
|
|
108
|
+
"captionUk": "Обробляє три точки готовності.",
|
|
109
|
+
"anchor": "http-healthRoutesFetch-procedure"
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
}
|