From 7a9a7fef3fd9fa8dd878329f47488dd2507e1553 Mon Sep 17 00:00:00 2001 From: Piotr Roslaniec Date: Thu, 19 Oct 2023 11:32:38 +0200 Subject: [PATCH 1/4] chore(readme): update demo & example readmes --- CONTRIBUTING.md | 2 +- README.md | 10 +++++----- demos/README.md | 3 --- demos/taco-demo/README.md | 2 ++ demos/taco-nft-demo/README.md | 4 +++- examples/README.md | 4 ++-- 6 files changed, 13 insertions(+), 12 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e60f769ae..a585b7e27 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,4 +30,4 @@ pnpm doc:publish ## Publishing -TODO: Update after implementing publishing. +TODO: Update after implementing automated publishing. diff --git a/README.md b/README.md index 03d97e424..dfda52ef8 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Full documentation can be found [here](https://docs.threshold.network/app-develo > > `nucypher-ts` is under [active development](https://github.com/nucypher/nucypher-ts/pulls): > -> - SDK does not support policy revocation. +> - SDK does not support access revocation. > - We expect breaking changes. ## Installation @@ -25,12 +25,12 @@ To learn more, follow the tutorial at Threshold Network's [docs](https://docs.th See [`nucypher-ts/examples`](https://github.com/nucypher/nucypher-ts/tree/main/examples) to find out how to integrate `nucypher-ts` into your favorite web framework. -We also provide two code samples of TAC applications: +We also provide demos of TACo applications: -- [nucypher/tdec-sandbox](https://github.com/nucypher/tdec-sandbox) -- [nucypher/tdec-nft-example](https://github.com/nucypher/tdec-nft-example) +- [taco-demo](https://github.com/nucypher/nucypher-ts/tree/main/demos/taco-demo) +- [taco-nft-demo](https://github.com/nucypher/nucypher-ts/tree/main/demos/taco-nft-demo) -These examples showcase integration with React-based web application and an end-to-end flow of creating conditioned encryption, and encrypting & decrypting data. +These examples showcase integration with web applications and an end-to-end flow of creating conditioned encryption, and encrypting & decrypting data. # Contributing diff --git a/demos/README.md b/demos/README.md index 685ccb7a1..9962db168 100644 --- a/demos/README.md +++ b/demos/README.md @@ -2,6 +2,3 @@ - [`taco-demo`](./taco-demo) - A demo of the `@nucypher/taco` library. - [`taco-nft-demo`](./taco-nft-demo) - A demo an NFT-based condition using the `@nucypher/taco` library. -- [`nucypher-ts-demo`](https://github.com/nucypher/nucypher-ts-demo) - A demo of PRE in the `nucypher-ts` library. -- [`tdec-sandbox`](https://github.com/nucypher/tdec-sandbox) - A demo of tDec in the `nucypher-ts` library. -- [`tdec-nft-example`](https://github.com/nucypher/tdec-nft-example) - A demo of tDec in the `nucypher-ts` library. diff --git a/demos/taco-demo/README.md b/demos/taco-demo/README.md index 00173b0c0..c7955756d 100644 --- a/demos/taco-demo/README.md +++ b/demos/taco-demo/README.md @@ -1,5 +1,7 @@ # taco-demo +See this demo in action at https://taco-demo.netlify.app/ + ## Installation ```bash diff --git a/demos/taco-nft-demo/README.md b/demos/taco-nft-demo/README.md index 0089830cd..35c636e89 100644 --- a/demos/taco-nft-demo/README.md +++ b/demos/taco-nft-demo/README.md @@ -1,4 +1,6 @@ -# taco-nft-example +# taco-nft-demo + +See this demo in action at https://taco-nft-demo.netlify.app/ ## Installation diff --git a/examples/README.md b/examples/README.md index 328785eda..6af9111b1 100644 --- a/examples/README.md +++ b/examples/README.md @@ -3,5 +3,5 @@ This directory contains a set of examples showing how to integrate `@nucypher/*` into your application. -Refer to `./taco` for examples of how to use the `@nucypher/taco` package. Refer -to `./pre` for examples of how to use the `@nucypher/pre` package. +- Refer to `./taco` for examples of how to use the `@nucypher/taco` package. +- Refer to `./pre` for examples of how to use the `@nucypher/pre` package. From 56871ed93e3500267de853ca8d2d4d73d9468953 Mon Sep 17 00:00:00 2001 From: Piotr Roslaniec Date: Thu, 19 Oct 2023 11:55:13 +0200 Subject: [PATCH 2/4] chore(demos): use peers deps to resolve monorepo version --- demos/taco-demo/package.json | 5 ++++- demos/taco-nft-demo/package.json | 5 ++++- pnpm-lock.yaml | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/demos/taco-demo/package.json b/demos/taco-demo/package.json index 1c0efad42..36b7b5d56 100644 --- a/demos/taco-demo/package.json +++ b/demos/taco-demo/package.json @@ -12,7 +12,7 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@nucypher/taco": "workspace:*", + "@nucypher/taco": "0.1.0-rc.3", "@usedapp/core": "^1.2.13", "buffer": "^6.0.3", "ethers": "^5.7.1", @@ -22,6 +22,9 @@ "react-dom": "^18.2.0", "react-spinners": "^0.13.6" }, + "peerDependencies": { + "@nucypher/taco": "workspace:*" + }, "devDependencies": { "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7", "@types/react": "^18.0.20", diff --git a/demos/taco-nft-demo/package.json b/demos/taco-nft-demo/package.json index 7f47fee2f..5cf92ba69 100644 --- a/demos/taco-nft-demo/package.json +++ b/demos/taco-nft-demo/package.json @@ -12,7 +12,7 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@nucypher/taco": "workspace:*", + "@nucypher/taco": "0.1.0-rc.3", "@usedapp/core": "^1.2.13", "buffer": "^6.0.3", "ethers": "^5.7.1", @@ -22,6 +22,9 @@ "react-dom": "^18.2.0", "react-spinners": "^0.13.6" }, + "peerDependencies": { + "@nucypher/taco": "workspace:*" + }, "devDependencies": { "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7", "@types/react": "^18.0.20", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 32c614964..76505d1b9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -103,7 +103,7 @@ importers: demos/taco-demo: dependencies: '@nucypher/taco': - specifier: workspace:* + specifier: 0.1.0-rc.3 version: link:../../packages/taco '@usedapp/core': specifier: ^1.2.13 @@ -176,7 +176,7 @@ importers: demos/taco-nft-demo: dependencies: '@nucypher/taco': - specifier: workspace:* + specifier: 0.1.0-rc.3 version: link:../../packages/taco '@usedapp/core': specifier: ^1.2.13 From 47d53465bdb481ac4963d18d62eb6e5921ad149b Mon Sep 17 00:00:00 2001 From: Piotr Roslaniec Date: Thu, 19 Oct 2023 12:06:36 +0200 Subject: [PATCH 3/4] chore: fix build failing on postinstall --- package.json | 2 +- tsconfig.prod.json | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 2d43ef7cb..e7565593e 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "license": "GPL-3.0-only", "author": "Piotr Roslaniec ", "scripts": { - "postinstall": "pnpm build || true && echo 'Ignoring build errors on setup until we publish the first version'", + "postinstall": "pnpm build", "typedoc": "typedoc", "typedoc:all": "pnpm run --parallel --aggregate-output --reporter append-only typedoc", "typedoc:publish": "gh-pages -m \"[ci skip] Update typedoc docs\" -d docs", diff --git a/tsconfig.prod.json b/tsconfig.prod.json index c54331bde..ee8a4270a 100644 --- a/tsconfig.prod.json +++ b/tsconfig.prod.json @@ -1,7 +1,9 @@ { "compilerOptions": { "declaration": true, - "lib": ["ES2018"], + "lib": [ + "ES2018" + ], "module": "CommonJS", "moduleResolution": "node", "strict": true, @@ -13,17 +15,18 @@ }, "files": [], "references": [ + // Order matters { - "path": "./packages/pre/tsconfig.es.json" + "path": "./packages/shared/tsconfig.es.json" }, { - "path": "./packages/pre/tsconfig.cjs.json" + "path": "./packages/shared/tsconfig.cjs.json" }, { - "path": "./packages/shared/tsconfig.es.json" + "path": "./packages/pre/tsconfig.es.json" }, { - "path": "./packages/shared/tsconfig.cjs.json" + "path": "./packages/pre/tsconfig.cjs.json" }, { "path": "./packages/taco/tsconfig.es.json" From 7e8c62e15d424976f9af1794991b2d84b6946937 Mon Sep 17 00:00:00 2001 From: Piotr Roslaniec Date: Thu, 19 Oct 2023 13:41:31 +0200 Subject: [PATCH 4/4] apply pr suggestions --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index dfda52ef8..7d23aac7e 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,6 @@ Full documentation can be found [here](https://docs.threshold.network/app-develo > > `nucypher-ts` is under [active development](https://github.com/nucypher/nucypher-ts/pulls): > -> - SDK does not support access revocation. > - We expect breaking changes. ## Installation