From bd8a1d380fbd9dc524ec4e659a6755651645ee10 Mon Sep 17 00:00:00 2001 From: Hernan Rajchert Date: Tue, 19 Dec 2023 10:30:00 -0300 Subject: [PATCH 1/7] Fix doc warnings --- packages/language/core/v1/src/index.ts | 2 +- .../runtime/client/rest/src/contract/index.ts | 19 +++++++++++++++---- .../runtime/client/rest/src/payout/index.ts | 2 ++ .../client/rest/src/withdrawal/index.ts | 2 ++ 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/packages/language/core/v1/src/index.ts b/packages/language/core/v1/src/index.ts index 21a40a28..146239c6 100644 --- a/packages/language/core/v1/src/index.ts +++ b/packages/language/core/v1/src/index.ts @@ -17,7 +17,7 @@ const tenADA: Value = { multiply: 10n, times: oneADA }; // Note that the explicit `: Value` type annotation is not strictly needed, the following line would - // also work both in TypeScript and JavaScript + // also work both in TypeScript and JavaScript // const tenADA = { multiply: 10n, times: oneADA}; // The only difference is when we make a mistake. When we add the explicit annotation we inmediatly diff --git a/packages/runtime/client/rest/src/contract/index.ts b/packages/runtime/client/rest/src/contract/index.ts index ddad9dec..1f3b4b72 100644 --- a/packages/runtime/client/rest/src/contract/index.ts +++ b/packages/runtime/client/rest/src/contract/index.ts @@ -2,9 +2,9 @@ * ```ts * import * as C from "@marlowe.io/runtime-rest-client/contract"; *``` - * This package contains all the implementation and details related to - * endpoints under the URI `/contracts/...` : - * - {@link index.RestClient#buildCreateContractTx | Build Create Contract Tx } + * This package contains all the implementation and details related to + * endpoints under the URI `/contracts/...` : + * - {@link index.RestClient#buildCreateContractTx | Build Create Contract Tx } * - {@link index.RestClient#getContracts | Get contracts } * - {@link index.RestClient#getContractById | Get Contract By Id } @@ -28,6 +28,7 @@ export { Recipient, TokenQuantity, RoleTokenConfiguration, + RoleTokenConfigurations, RolesConfiguration, } from "./rolesConfigurations.js"; export { @@ -45,8 +46,18 @@ export { TxHeader } from "./transaction/header.js"; export { TransactionsRange, GetTransactionsForContractResponse, + ApplyInputsToContractRequest, } from "./transaction/endpoints/collection.js"; +export { + CreateContractSourcesResponse, + GetContractSourceAdjacencyResponse, + GetContractSourceClosureResponse, + GetContractSourceAdjacencyRequest, + GetContractBySourceIdRequest, + GetContractSourceClosureRequest, +} from "./endpoints/sources.js"; export { TransactionDetails } from "./transaction/details.js"; - +export { TxStatus } from "./transaction/status.js"; +export {GetNextStepsForContractRequest} from "./next/endpoint.js" export { TransactionTextEnvelope } from "./transaction/endpoints/collection.js"; diff --git a/packages/runtime/client/rest/src/payout/index.ts b/packages/runtime/client/rest/src/payout/index.ts index f59d736e..2680ea17 100644 --- a/packages/runtime/client/rest/src/payout/index.ts +++ b/packages/runtime/client/rest/src/payout/index.ts @@ -1,3 +1,5 @@ export * from "./details.js"; export * from "./header.js"; export * from "./status.js"; +export * from "./endpoints/collection.js"; +export * from "./endpoints/singleton.js"; diff --git a/packages/runtime/client/rest/src/withdrawal/index.ts b/packages/runtime/client/rest/src/withdrawal/index.ts index d025b28f..a2678688 100644 --- a/packages/runtime/client/rest/src/withdrawal/index.ts +++ b/packages/runtime/client/rest/src/withdrawal/index.ts @@ -1,2 +1,4 @@ export * from "./header.js"; export * from "./details.js"; +export * from "./endpoints/collection.js"; +export * from "./endpoints/singleton.js"; From aa13347505ed72a44513959a95089ced7471ddfc Mon Sep 17 00:00:00 2001 From: Hernan Rajchert Date: Tue, 19 Dec 2023 10:39:49 -0300 Subject: [PATCH 2/7] Add CI check to enforce no doc warning --- .github/workflows/test-suite.yaml | 4 ++++ package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-suite.yaml b/.github/workflows/test-suite.yaml index ca852035..d979df91 100644 --- a/.github/workflows/test-suite.yaml +++ b/.github/workflows/test-suite.yaml @@ -32,3 +32,7 @@ jobs: - name: ๐Ÿงช Run tests run: | nix develop --show-trace --command bash -c "npm test" + + - name: ๐Ÿฅ Check docs generation + run: | + nix develop --show-trace --command bash -c "npm run docs" diff --git a/package.json b/package.json index f6e59a65..d99c6653 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "build": "tsc --version && tsc --build && shx mkdir -p dist && rollup --config rollup/config.mjs", "clean": "npm run clean --workspaces && shx rm -rf dist", "test": "NODE_OPTIONS='--experimental-vm-modules --no-warnings' jest", - "docs": "typedoc .", + "docs": "typedoc . --treatWarningsAsErrors", "serve": "ws --port 1337 --rewrite '/importmap -> https://cdn.jsdelivr.net/gh/input-output-hk/marlowe-ts-sdk@0.2.0-beta/jsdelivr-npm-importmap.js'", "serve-dev": "ws --port 1337 --rewrite '/importmap -> /dist/local-importmap.js'" }, From 25f37a22a3c5ac080205eba21627cf059c5e0ec3 Mon Sep 17 00:00:00 2001 From: Hernan Rajchert Date: Tue, 19 Dec 2023 10:45:17 -0300 Subject: [PATCH 3/7] Add scriv entry --- .../20231219_104332_hrajchert_PLT_9008_fix_doc_warnings.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelog.d/20231219_104332_hrajchert_PLT_9008_fix_doc_warnings.md diff --git a/changelog.d/20231219_104332_hrajchert_PLT_9008_fix_doc_warnings.md b/changelog.d/20231219_104332_hrajchert_PLT_9008_fix_doc_warnings.md new file mode 100644 index 00000000..2de216f6 --- /dev/null +++ b/changelog.d/20231219_104332_hrajchert_PLT_9008_fix_doc_warnings.md @@ -0,0 +1,3 @@ +### General + +- PLT-9008: Fix documentation warnings and add a CI check to avoid them in the future. (Implemented in [PR-139](https://github.com/input-output-hk/marlowe-ts-sdk/pull/139)) From 63a3c2cd968b8206afd8d08fdbefba79fbc266c6 Mon Sep 17 00:00:00 2001 From: Hernan Rajchert Date: Tue, 19 Dec 2023 11:06:37 -0300 Subject: [PATCH 4/7] Fix merge conflicts --- packages/language/examples/src/atomicSwap.ts | 2 +- packages/language/examples/src/playground-v1/escrow.ts | 2 +- packages/language/examples/typedoc.json | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/language/examples/src/atomicSwap.ts b/packages/language/examples/src/atomicSwap.ts index af4ea3a1..189a8f70 100644 --- a/packages/language/examples/src/atomicSwap.ts +++ b/packages/language/examples/src/atomicSwap.ts @@ -70,7 +70,7 @@ import { } from "@marlowe.io/language-core-v1"; import * as G from "@marlowe.io/language-core-v1/guards"; -type IReduce = void; +export type IReduce = void; const iReduce: void = undefined; /** diff --git a/packages/language/examples/src/playground-v1/escrow.ts b/packages/language/examples/src/playground-v1/escrow.ts index 94026c37..1f4e7472 100644 --- a/packages/language/examples/src/playground-v1/escrow.ts +++ b/packages/language/examples/src/playground-v1/escrow.ts @@ -63,7 +63,7 @@ import { Contract, } from "@marlowe.io/language-core-v1/playground-v1"; -interface EscrowParams { +export interface EscrowParams { price: number; depositTimeout: Timeout; disputeTimeout: Timeout; diff --git a/packages/language/examples/typedoc.json b/packages/language/examples/typedoc.json index c4e0b06c..69cd27c3 100644 --- a/packages/language/examples/typedoc.json +++ b/packages/language/examples/typedoc.json @@ -4,7 +4,9 @@ "./src/index.ts", "./src/vesting.ts", "./src/atomicSwap.ts", - "./src/survey.ts" + "./src/survey.ts", + "./src/playground-v1/escrow.ts", + "./src/playground-v1/escrow-with-collateral.ts", ], "tsconfig": "./src/tsconfig.json", "categorizeByGroup": false From 5c7b4b2cbfafa23b01752fb8a819e4fe7be26c83 Mon Sep 17 00:00:00 2001 From: Hernan Rajchert Date: Tue, 19 Dec 2023 11:10:57 -0300 Subject: [PATCH 5/7] Add CI check to enforce code formatting --- .github/workflows/test-suite.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test-suite.yaml b/.github/workflows/test-suite.yaml index d979df91..7a15bef4 100644 --- a/.github/workflows/test-suite.yaml +++ b/.github/workflows/test-suite.yaml @@ -36,3 +36,6 @@ jobs: - name: ๐Ÿฅ Check docs generation run: | nix develop --show-trace --command bash -c "npm run docs" + - name: ๐Ÿ“ Check formatting + run: | + nix develop --show-trace --command bash -c "treefmt --fail-on-change" From f6281227cb33a23acc12ab2c4defd5677ab6a404 Mon Sep 17 00:00:00 2001 From: Hernan Rajchert Date: Tue, 19 Dec 2023 11:15:34 -0300 Subject: [PATCH 6/7] Fixed formatting --- jsdelivr-npm-importmap.js | 117 ++++++++++++------ packages/language/examples/typedoc.json | 2 +- .../runtime/client/rest/src/contract/index.ts | 3 +- packages/runtime/lifecycle/src/index.ts | 7 +- 4 files changed, 83 insertions(+), 46 deletions(-) diff --git a/jsdelivr-npm-importmap.js b/jsdelivr-npm-importmap.js index 020b33c9..72c2f320 100644 --- a/jsdelivr-npm-importmap.js +++ b/jsdelivr-npm-importmap.js @@ -1,44 +1,79 @@ const importMap = { - "imports": { - "@marlowe.io/adapter": "https://cdn.jsdelivr.net/npm/@marlowe.io/adapter@0.3.0-beta-rc1/dist/bundled/esm/adapter.js", - "@marlowe.io/adapter/assoc-map": "https://cdn.jsdelivr.net/npm/@marlowe.io/adapter@0.3.0-beta-rc1/dist/bundled/esm/assoc-map.js", - "@marlowe.io/adapter/codec": "https://cdn.jsdelivr.net/npm/@marlowe.io/adapter@0.3.0-beta-rc1/dist/bundled/esm/codec.js", - "@marlowe.io/adapter/deep-equal": "https://cdn.jsdelivr.net/npm/@marlowe.io/adapter@0.3.0-beta-rc1/dist/bundled/esm/deep-equal.js", - "@marlowe.io/adapter/file": "https://cdn.jsdelivr.net/npm/@marlowe.io/adapter@0.3.0-beta-rc1/dist/bundled/esm/file.js", - "@marlowe.io/adapter/fp-ts": "https://cdn.jsdelivr.net/npm/@marlowe.io/adapter@0.3.0-beta-rc1/dist/bundled/esm/fp-ts.js", - "@marlowe.io/adapter/http": "https://cdn.jsdelivr.net/npm/@marlowe.io/adapter@0.3.0-beta-rc1/dist/bundled/esm/http.js", - "@marlowe.io/adapter/io-ts": "https://cdn.jsdelivr.net/npm/@marlowe.io/adapter@0.3.0-beta-rc1/dist/bundled/esm/io-ts.js", - "@marlowe.io/adapter/time": "https://cdn.jsdelivr.net/npm/@marlowe.io/adapter@0.3.0-beta-rc1/dist/bundled/esm/time.js", - "@marlowe.io/language-core-v1": "https://cdn.jsdelivr.net/npm/@marlowe.io/language-core-v1@0.3.0-beta-rc1/dist/bundled/esm/language-core-v1.js", - "@marlowe.io/language-core-v1/guards": "https://cdn.jsdelivr.net/npm/@marlowe.io/language-core-v1@0.3.0-beta-rc1/dist/bundled/esm/guards.js", - "@marlowe.io/language-core-v1/next": "https://cdn.jsdelivr.net/npm/@marlowe.io/language-core-v1@0.3.0-beta-rc1/dist/bundled/esm/next.js", - "@marlowe.io/language-core-v1/playground-v1": "https://cdn.jsdelivr.net/npm/@marlowe.io/language-core-v1@0.3.0-beta-rc1/dist/bundled/esm/playground-v1.js", - "@marlowe.io/language-core-v1/semantics": "https://cdn.jsdelivr.net/npm/@marlowe.io/language-core-v1@0.3.0-beta-rc1/dist/bundled/esm/semantics.js", - "@marlowe.io/language-core-v1/version": "https://cdn.jsdelivr.net/npm/@marlowe.io/language-core-v1@0.3.0-beta-rc1/dist/bundled/esm/version.js", - "@marlowe.io/language-examples": "https://cdn.jsdelivr.net/npm/@marlowe.io/language-examples@0.3.0-beta-rc1/dist/bundled/esm/language-examples.js", - "@marlowe.io/language-specification-client": "https://cdn.jsdelivr.net/npm/@marlowe.io/language-specification-client@0.3.0-beta-rc1/dist/bundled/esm/language-specification-client.js", - "@marlowe.io/token-metadata-client": "https://cdn.jsdelivr.net/npm/@marlowe.io/token-metadata-client@0.3.0-beta-rc1/dist/bundled/esm/token-metadata-client.js", - "@marlowe.io/wallet": "https://cdn.jsdelivr.net/npm/@marlowe.io/wallet@0.3.0-beta-rc1/dist/bundled/esm/wallet.js", - "@marlowe.io/wallet/api": "https://cdn.jsdelivr.net/npm/@marlowe.io/wallet@0.3.0-beta-rc1/dist/bundled/esm/api.js", - "@marlowe.io/wallet/browser": "https://cdn.jsdelivr.net/npm/@marlowe.io/wallet@0.3.0-beta-rc1/dist/bundled/esm/browser.js", - "@marlowe.io/wallet/lucid": "https://cdn.jsdelivr.net/npm/@marlowe.io/wallet@0.3.0-beta-rc1/dist/bundled/esm/lucid.js", - "@marlowe.io/wallet/nodejs": "https://cdn.jsdelivr.net/npm/@marlowe.io/wallet@0.3.0-beta-rc1/dist/bundled/esm/nodejs.js", - "@marlowe.io/runtime-rest-client": "https://cdn.jsdelivr.net/npm/@marlowe.io/runtime-rest-client@0.3.0-beta-rc1/dist/bundled/esm/runtime-rest-client.js", - "@marlowe.io/runtime-rest-client/contract": "https://cdn.jsdelivr.net/npm/@marlowe.io/runtime-rest-client@0.3.0-beta-rc1/dist/bundled/esm/contract.js", - "@marlowe.io/runtime-rest-client/payout": "https://cdn.jsdelivr.net/npm/@marlowe.io/runtime-rest-client@0.3.0-beta-rc1/dist/bundled/esm/payout.js", - "@marlowe.io/runtime-rest-client/transaction": "https://cdn.jsdelivr.net/npm/@marlowe.io/runtime-rest-client@0.3.0-beta-rc1/dist/bundled/esm/transaction.js", - "@marlowe.io/runtime-rest-client/withdrawal": "https://cdn.jsdelivr.net/npm/@marlowe.io/runtime-rest-client@0.3.0-beta-rc1/dist/bundled/esm/withdrawal.js", - "@marlowe.io/runtime-core": "https://cdn.jsdelivr.net/npm/@marlowe.io/runtime-core@0.3.0-beta-rc1/dist/bundled/esm/runtime-core.js", - "@marlowe.io/runtime-lifecycle": "https://cdn.jsdelivr.net/npm/@marlowe.io/runtime-lifecycle@0.3.0-beta-rc1/dist/bundled/esm/runtime-lifecycle.js", - "@marlowe.io/runtime-lifecycle/api": "https://cdn.jsdelivr.net/npm/@marlowe.io/runtime-lifecycle@0.3.0-beta-rc1/dist/bundled/esm/api.js", - "@marlowe.io/runtime-lifecycle/browser": "https://cdn.jsdelivr.net/npm/@marlowe.io/runtime-lifecycle@0.3.0-beta-rc1/dist/bundled/esm/browser.js", - "@marlowe.io/runtime-lifecycle/generic": "https://cdn.jsdelivr.net/npm/@marlowe.io/runtime-lifecycle@0.3.0-beta-rc1/dist/bundled/esm/generic.js", - "@marlowe.io/marlowe-object": "https://cdn.jsdelivr.net/npm/@marlowe.io/marlowe-object@0.3.0-beta-rc1/dist/bundled/esm/marlowe-object.js", - "@marlowe.io/marlowe-object/guards": "https://cdn.jsdelivr.net/npm/@marlowe.io/marlowe-object@0.3.0-beta-rc1/dist/bundled/esm/guards.js", - "lucid-cardano": "https://unpkg.com/lucid-cardano@0.10.7/web/mod.js" - } + imports: { + "@marlowe.io/adapter": + "https://cdn.jsdelivr.net/npm/@marlowe.io/adapter@0.3.0-beta-rc1/dist/bundled/esm/adapter.js", + "@marlowe.io/adapter/assoc-map": + "https://cdn.jsdelivr.net/npm/@marlowe.io/adapter@0.3.0-beta-rc1/dist/bundled/esm/assoc-map.js", + "@marlowe.io/adapter/codec": + "https://cdn.jsdelivr.net/npm/@marlowe.io/adapter@0.3.0-beta-rc1/dist/bundled/esm/codec.js", + "@marlowe.io/adapter/deep-equal": + "https://cdn.jsdelivr.net/npm/@marlowe.io/adapter@0.3.0-beta-rc1/dist/bundled/esm/deep-equal.js", + "@marlowe.io/adapter/file": + "https://cdn.jsdelivr.net/npm/@marlowe.io/adapter@0.3.0-beta-rc1/dist/bundled/esm/file.js", + "@marlowe.io/adapter/fp-ts": + "https://cdn.jsdelivr.net/npm/@marlowe.io/adapter@0.3.0-beta-rc1/dist/bundled/esm/fp-ts.js", + "@marlowe.io/adapter/http": + "https://cdn.jsdelivr.net/npm/@marlowe.io/adapter@0.3.0-beta-rc1/dist/bundled/esm/http.js", + "@marlowe.io/adapter/io-ts": + "https://cdn.jsdelivr.net/npm/@marlowe.io/adapter@0.3.0-beta-rc1/dist/bundled/esm/io-ts.js", + "@marlowe.io/adapter/time": + "https://cdn.jsdelivr.net/npm/@marlowe.io/adapter@0.3.0-beta-rc1/dist/bundled/esm/time.js", + "@marlowe.io/language-core-v1": + "https://cdn.jsdelivr.net/npm/@marlowe.io/language-core-v1@0.3.0-beta-rc1/dist/bundled/esm/language-core-v1.js", + "@marlowe.io/language-core-v1/guards": + "https://cdn.jsdelivr.net/npm/@marlowe.io/language-core-v1@0.3.0-beta-rc1/dist/bundled/esm/guards.js", + "@marlowe.io/language-core-v1/next": + "https://cdn.jsdelivr.net/npm/@marlowe.io/language-core-v1@0.3.0-beta-rc1/dist/bundled/esm/next.js", + "@marlowe.io/language-core-v1/playground-v1": + "https://cdn.jsdelivr.net/npm/@marlowe.io/language-core-v1@0.3.0-beta-rc1/dist/bundled/esm/playground-v1.js", + "@marlowe.io/language-core-v1/semantics": + "https://cdn.jsdelivr.net/npm/@marlowe.io/language-core-v1@0.3.0-beta-rc1/dist/bundled/esm/semantics.js", + "@marlowe.io/language-core-v1/version": + "https://cdn.jsdelivr.net/npm/@marlowe.io/language-core-v1@0.3.0-beta-rc1/dist/bundled/esm/version.js", + "@marlowe.io/language-examples": + "https://cdn.jsdelivr.net/npm/@marlowe.io/language-examples@0.3.0-beta-rc1/dist/bundled/esm/language-examples.js", + "@marlowe.io/language-specification-client": + "https://cdn.jsdelivr.net/npm/@marlowe.io/language-specification-client@0.3.0-beta-rc1/dist/bundled/esm/language-specification-client.js", + "@marlowe.io/token-metadata-client": + "https://cdn.jsdelivr.net/npm/@marlowe.io/token-metadata-client@0.3.0-beta-rc1/dist/bundled/esm/token-metadata-client.js", + "@marlowe.io/wallet": + "https://cdn.jsdelivr.net/npm/@marlowe.io/wallet@0.3.0-beta-rc1/dist/bundled/esm/wallet.js", + "@marlowe.io/wallet/api": + "https://cdn.jsdelivr.net/npm/@marlowe.io/wallet@0.3.0-beta-rc1/dist/bundled/esm/api.js", + "@marlowe.io/wallet/browser": + "https://cdn.jsdelivr.net/npm/@marlowe.io/wallet@0.3.0-beta-rc1/dist/bundled/esm/browser.js", + "@marlowe.io/wallet/lucid": + "https://cdn.jsdelivr.net/npm/@marlowe.io/wallet@0.3.0-beta-rc1/dist/bundled/esm/lucid.js", + "@marlowe.io/wallet/nodejs": + "https://cdn.jsdelivr.net/npm/@marlowe.io/wallet@0.3.0-beta-rc1/dist/bundled/esm/nodejs.js", + "@marlowe.io/runtime-rest-client": + "https://cdn.jsdelivr.net/npm/@marlowe.io/runtime-rest-client@0.3.0-beta-rc1/dist/bundled/esm/runtime-rest-client.js", + "@marlowe.io/runtime-rest-client/contract": + "https://cdn.jsdelivr.net/npm/@marlowe.io/runtime-rest-client@0.3.0-beta-rc1/dist/bundled/esm/contract.js", + "@marlowe.io/runtime-rest-client/payout": + "https://cdn.jsdelivr.net/npm/@marlowe.io/runtime-rest-client@0.3.0-beta-rc1/dist/bundled/esm/payout.js", + "@marlowe.io/runtime-rest-client/transaction": + "https://cdn.jsdelivr.net/npm/@marlowe.io/runtime-rest-client@0.3.0-beta-rc1/dist/bundled/esm/transaction.js", + "@marlowe.io/runtime-rest-client/withdrawal": + "https://cdn.jsdelivr.net/npm/@marlowe.io/runtime-rest-client@0.3.0-beta-rc1/dist/bundled/esm/withdrawal.js", + "@marlowe.io/runtime-core": + "https://cdn.jsdelivr.net/npm/@marlowe.io/runtime-core@0.3.0-beta-rc1/dist/bundled/esm/runtime-core.js", + "@marlowe.io/runtime-lifecycle": + "https://cdn.jsdelivr.net/npm/@marlowe.io/runtime-lifecycle@0.3.0-beta-rc1/dist/bundled/esm/runtime-lifecycle.js", + "@marlowe.io/runtime-lifecycle/api": + "https://cdn.jsdelivr.net/npm/@marlowe.io/runtime-lifecycle@0.3.0-beta-rc1/dist/bundled/esm/api.js", + "@marlowe.io/runtime-lifecycle/browser": + "https://cdn.jsdelivr.net/npm/@marlowe.io/runtime-lifecycle@0.3.0-beta-rc1/dist/bundled/esm/browser.js", + "@marlowe.io/runtime-lifecycle/generic": + "https://cdn.jsdelivr.net/npm/@marlowe.io/runtime-lifecycle@0.3.0-beta-rc1/dist/bundled/esm/generic.js", + "@marlowe.io/marlowe-object": + "https://cdn.jsdelivr.net/npm/@marlowe.io/marlowe-object@0.3.0-beta-rc1/dist/bundled/esm/marlowe-object.js", + "@marlowe.io/marlowe-object/guards": + "https://cdn.jsdelivr.net/npm/@marlowe.io/marlowe-object@0.3.0-beta-rc1/dist/bundled/esm/guards.js", + "lucid-cardano": "https://unpkg.com/lucid-cardano@0.10.7/web/mod.js", + }, }; -const im = document.createElement('script'); -im.type = 'importmap'; +const im = document.createElement("script"); +im.type = "importmap"; im.textContent = JSON.stringify(importMap); -document.currentScript.after(im); \ No newline at end of file +document.currentScript.after(im); diff --git a/packages/language/examples/typedoc.json b/packages/language/examples/typedoc.json index 69cd27c3..b512be7d 100644 --- a/packages/language/examples/typedoc.json +++ b/packages/language/examples/typedoc.json @@ -6,7 +6,7 @@ "./src/atomicSwap.ts", "./src/survey.ts", "./src/playground-v1/escrow.ts", - "./src/playground-v1/escrow-with-collateral.ts", + "./src/playground-v1/escrow-with-collateral.ts" ], "tsconfig": "./src/tsconfig.json", "categorizeByGroup": false diff --git a/packages/runtime/client/rest/src/contract/index.ts b/packages/runtime/client/rest/src/contract/index.ts index 1f3b4b72..50629b8c 100644 --- a/packages/runtime/client/rest/src/contract/index.ts +++ b/packages/runtime/client/rest/src/contract/index.ts @@ -55,9 +55,8 @@ export { GetContractSourceAdjacencyRequest, GetContractBySourceIdRequest, GetContractSourceClosureRequest, - } from "./endpoints/sources.js"; export { TransactionDetails } from "./transaction/details.js"; export { TxStatus } from "./transaction/status.js"; -export {GetNextStepsForContractRequest} from "./next/endpoint.js" +export { GetNextStepsForContractRequest } from "./next/endpoint.js"; export { TransactionTextEnvelope } from "./transaction/endpoints/collection.js"; diff --git a/packages/runtime/lifecycle/src/index.ts b/packages/runtime/lifecycle/src/index.ts index b96249cf..7ab08c6b 100644 --- a/packages/runtime/lifecycle/src/index.ts +++ b/packages/runtime/lifecycle/src/index.ts @@ -17,7 +17,10 @@ import { WalletAPI } from "@marlowe.io/wallet"; import * as Generic from "./generic/runtime.js"; -import { mkFPTSRestClient, mkRestClient } from "@marlowe.io/runtime-rest-client"; +import { + mkFPTSRestClient, + mkRestClient, +} from "@marlowe.io/runtime-rest-client"; export * as Browser from "./browser/index.js"; @@ -44,5 +47,5 @@ export function mkRuntimeLifecycle({ }: RuntimeLifecycleOptions) { const deprecatedRestAPI = mkFPTSRestClient(runtimeURL); const restClient = mkRestClient(runtimeURL); - return Generic.mkRuntimeLifecycle(deprecatedRestAPI,restClient, wallet); + return Generic.mkRuntimeLifecycle(deprecatedRestAPI, restClient, wallet); } From 8dbd99fb45d506d91e36686c7472c94e930c2bdc Mon Sep 17 00:00:00 2001 From: Hernan Rajchert Date: Tue, 19 Dec 2023 11:23:23 -0300 Subject: [PATCH 7/7] Fix CI check for formatting --- .github/workflows/test-suite.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-suite.yaml b/.github/workflows/test-suite.yaml index 7a15bef4..79612b7b 100644 --- a/.github/workflows/test-suite.yaml +++ b/.github/workflows/test-suite.yaml @@ -27,7 +27,7 @@ jobs: experimental-features = nix-command flakes - name: ๐Ÿ”จ Build project run: | - nix develop --show-trace --command bash -c "npm i && npm run build" + nix develop --show-trace --command bash -c "npm i && npm run build && treefmt jsdelivr-npm-importmap.js" - name: ๐Ÿงช Run tests run: |