From cb7f94e7af30bce3a4d91954428ae9b333f18d13 Mon Sep 17 00:00:00 2001 From: Chris Cassano Date: Thu, 22 Feb 2024 14:34:18 -0800 Subject: [PATCH 1/8] remove old v0 errors from js sdk. provide error details to the user --- packages/core/src/lib/lit-core.ts | 4 ++-- packages/types/src/lib/interfaces.ts | 12 +----------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/packages/core/src/lib/lit-core.ts b/packages/core/src/lib/lit-core.ts index 29169d7c2a..812270fb78 100644 --- a/packages/core/src/lib/lit-core.ts +++ b/packages/core/src/lib/lit-core.ts @@ -944,13 +944,13 @@ export class LitCore { throwError({ ...res.error, message: - res.error.message || + `Message: ${res.error.message}. Details: ${res.error.details}` || 'You are not authorized to access to this content', errorCode: res.error.errorCode!, } as NodeClientErrorV0 | NodeClientErrorV1); } else { throwError({ - message: `There was an error getting the signing shares from the nodes`, + message: `There was an error getting the signing shares from the nodes. Message: ${res.error.message}. Details: ${res.error.details}`, error: LIT_ERROR.UNKNOWN_ERROR, }); } diff --git a/packages/types/src/lib/interfaces.ts b/packages/types/src/lib/interfaces.ts index 703f0bad94..2e4ec12369 100644 --- a/packages/types/src/lib/interfaces.ts +++ b/packages/types/src/lib/interfaces.ts @@ -580,7 +580,7 @@ export interface SuccessNodePromises { export interface RejectedNodePromises { success: boolean; - error: NodeErrorV0 | NodeErrorV1; + error: NodeErrorV1; } export interface NodePromiseResponse { @@ -589,16 +589,6 @@ export interface NodePromiseResponse { reason?: any; } -/** - * The error object returned by the node. - * - * @deprecated - This is the old error object. It will be removed in the future. Use NodeErrorV1 instead. - */ -export interface NodeErrorV0 { - errorCode: string; - message: string; -} - export interface NodeErrorV1 { errorKind: string; status: number; From 89f227ae10aa38726a45ac6bf7cc6cafbc6bb975 Mon Sep 17 00:00:00 2001 From: Chris Cassano Date: Thu, 22 Feb 2024 16:56:46 -0800 Subject: [PATCH 2/8] building now seems to consistently work --- apps/html/index.html | 4 ++-- apps/react/src/app/app.tsx | 2 +- package.json | 2 +- packages/access-control-conditions/package.json | 2 +- packages/access-control-conditions/tsconfig.lib.json | 3 ++- packages/auth-browser/package.json | 2 +- packages/auth-helpers/package.json | 2 +- packages/bls-sdk/package.json | 2 +- packages/constants/package.json | 2 +- packages/constants/src/lib/constants/autogen_internal.ts | 2 +- packages/contracts-sdk/package.json | 2 +- packages/core/package.json | 2 +- packages/crypto/package.json | 2 +- packages/ecdsa-sdk/package.json | 2 +- packages/encryption/package.json | 2 +- packages/lit-auth-client/package.json | 2 +- packages/lit-node-client-nodejs/package.json | 2 +- packages/lit-node-client/package.json | 2 +- packages/logger/package.json | 2 +- packages/misc-browser/package.json | 2 +- packages/misc/package.json | 2 +- packages/misc/src/lib/misc.ts | 9 +-------- packages/nacl/package.json | 2 +- packages/pkp-base/package.json | 2 +- packages/pkp-client/package.json | 2 +- packages/pkp-cosmos/package.json | 2 +- packages/pkp-ethers/package.json | 2 +- packages/pkp-sui/package.json | 2 +- packages/pkp-walletconnect/package.json | 2 +- packages/sev-snp-utils-sdk/package.json | 2 +- packages/types/package.json | 2 +- packages/uint8arrays/package.json | 2 +- tools/scripts/tools.mjs | 2 +- typedoc.json | 2 +- yarn.lock | 7 +------ 35 files changed, 37 insertions(+), 48 deletions(-) diff --git a/apps/html/index.html b/apps/html/index.html index c31a40e70c..ed4219adf3 100644 --- a/apps/html/index.html +++ b/apps/html/index.html @@ -1,4 +1,4 @@ - + @@ -62,7 +62,7 @@ - (HTML) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-html.mjs Thu, 22 Feb 2024 05:05:54 GMT + (HTML) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-html.mjs Fri, 23 Feb 2024 00:56:11 GMT diff --git a/apps/react/src/app/app.tsx b/apps/react/src/app/app.tsx index 2a4f6cba69..715a8e2530 100644 --- a/apps/react/src/app/app.tsx +++ b/apps/react/src/app/app.tsx @@ -1805,7 +1805,7 @@ pre { `, }} /> - (REACT) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-react.mjs Thu, 22 Feb 2024 05:05:54 GMT + (REACT) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-react.mjs Fri, 23 Feb 2024 00:56:12 GMT
diff --git a/package.json b/package.json index 0ce8d24041..581b66f7c4 100644 --- a/package.json +++ b/package.json @@ -200,7 +200,7 @@ "ts-jest": "27.1.4", "ts-node": "10.9.1", "typedoc": "^0.23.10", - "typescript": "~4.7.2" + "typescript": "^4.7.2" }, "workspaces": [ "packages/*" diff --git a/packages/access-control-conditions/package.json b/packages/access-control-conditions/package.json index e9c7e7788e..67a0983f9b 100644 --- a/packages/access-control-conditions/package.json +++ b/packages/access-control-conditions/package.json @@ -24,4 +24,4 @@ "version": "3.2.1", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/access-control-conditions/tsconfig.lib.json b/packages/access-control-conditions/tsconfig.lib.json index e85ef50f65..7aba3ec40d 100644 --- a/packages/access-control-conditions/tsconfig.lib.json +++ b/packages/access-control-conditions/tsconfig.lib.json @@ -3,7 +3,8 @@ "compilerOptions": { "outDir": "../../dist/out-tsc", "declaration": true, - "types": [] + "types": [], + "explainFiles": true }, "include": ["**/*.ts"], "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"] diff --git a/packages/auth-browser/package.json b/packages/auth-browser/package.json index 9a0b5ed9a5..b55fe78d01 100644 --- a/packages/auth-browser/package.json +++ b/packages/auth-browser/package.json @@ -33,4 +33,4 @@ "version": "3.2.1", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/auth-helpers/package.json b/packages/auth-helpers/package.json index 0533c66027..aacfbda2c6 100644 --- a/packages/auth-helpers/package.json +++ b/packages/auth-helpers/package.json @@ -31,4 +31,4 @@ "version": "3.2.1", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/bls-sdk/package.json b/packages/bls-sdk/package.json index fba176d294..ae525638e1 100644 --- a/packages/bls-sdk/package.json +++ b/packages/bls-sdk/package.json @@ -30,4 +30,4 @@ "version": "3.2.1", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/constants/package.json b/packages/constants/package.json index c2affeb63f..5446ec80df 100644 --- a/packages/constants/package.json +++ b/packages/constants/package.json @@ -23,4 +23,4 @@ "version": "3.2.1", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/constants/src/lib/constants/autogen_internal.ts b/packages/constants/src/lib/constants/autogen_internal.ts index 93fc37338c..3f990f33fb 100644 --- a/packages/constants/src/lib/constants/autogen_internal.ts +++ b/packages/constants/src/lib/constants/autogen_internal.ts @@ -1,4 +1,4 @@ -// Last Modified: 2024-02-22 05:04:32 +// Last Modified: 2024-02-23 00:54:13 // This file is auto-generated by tools/scripts/gen-internal-dev.mjs export const INTERNAL_DEV = [ 'https://167.114.17.205:443', diff --git a/packages/contracts-sdk/package.json b/packages/contracts-sdk/package.json index a37186ac6a..095bfccfa9 100644 --- a/packages/contracts-sdk/package.json +++ b/packages/contracts-sdk/package.json @@ -35,4 +35,4 @@ "version": "3.2.1", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/core/package.json b/packages/core/package.json index 05fe19ea27..2bd044186f 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -27,4 +27,4 @@ ], "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/crypto/package.json b/packages/crypto/package.json index 7335d0568e..a7dadc684e 100644 --- a/packages/crypto/package.json +++ b/packages/crypto/package.json @@ -24,4 +24,4 @@ "version": "3.2.1", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/ecdsa-sdk/package.json b/packages/ecdsa-sdk/package.json index 5e88dbaedb..4e7d5e4bbc 100644 --- a/packages/ecdsa-sdk/package.json +++ b/packages/ecdsa-sdk/package.json @@ -27,4 +27,4 @@ "version": "3.2.1", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/encryption/package.json b/packages/encryption/package.json index 1e2e241f5e..afb3725560 100644 --- a/packages/encryption/package.json +++ b/packages/encryption/package.json @@ -28,4 +28,4 @@ "version": "3.2.1", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/lit-auth-client/package.json b/packages/lit-auth-client/package.json index 855629da24..599d446b28 100644 --- a/packages/lit-auth-client/package.json +++ b/packages/lit-auth-client/package.json @@ -32,4 +32,4 @@ }, "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/lit-node-client-nodejs/package.json b/packages/lit-node-client-nodejs/package.json index e276fd0d9b..931a432cdb 100644 --- a/packages/lit-node-client-nodejs/package.json +++ b/packages/lit-node-client-nodejs/package.json @@ -27,4 +27,4 @@ "version": "3.2.1", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/lit-node-client/package.json b/packages/lit-node-client/package.json index c5f8d0709a..cc157d28b3 100644 --- a/packages/lit-node-client/package.json +++ b/packages/lit-node-client/package.json @@ -28,4 +28,4 @@ "version": "3.2.1", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/logger/package.json b/packages/logger/package.json index b40aa349d6..68f2d41611 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -11,4 +11,4 @@ }, "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/misc-browser/package.json b/packages/misc-browser/package.json index 6ee6abae79..01d44c8f3d 100644 --- a/packages/misc-browser/package.json +++ b/packages/misc-browser/package.json @@ -24,4 +24,4 @@ "version": "3.2.1", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/misc/package.json b/packages/misc/package.json index 2d6b978105..b967547834 100644 --- a/packages/misc/package.json +++ b/packages/misc/package.json @@ -27,4 +27,4 @@ "version": "3.2.1", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/misc/src/lib/misc.ts b/packages/misc/src/lib/misc.ts index 2b341367c1..0e680ed3e9 100644 --- a/packages/misc/src/lib/misc.ts +++ b/packages/misc/src/lib/misc.ts @@ -16,7 +16,6 @@ import { KV, NodeClientErrorV0, NodeClientErrorV1, - NodeErrorV0, NodeErrorV1, NodeErrorV3, ClaimRequest, @@ -181,7 +180,7 @@ export const isNodeClientErrorV0 = ( }; export const isNodeErrorV1 = ( - nodeError: NodeErrorV0 | NodeErrorV1 + nodeError: NodeErrorV1 ): nodeError is NodeErrorV1 => { return ( nodeError.hasOwnProperty('errorCode') && @@ -189,12 +188,6 @@ export const isNodeErrorV1 = ( ); }; -export const isNodeErrorV0 = ( - nodeError: NodeErrorV0 | NodeErrorV1 -): nodeError is NodeErrorV0 => { - return nodeError.hasOwnProperty('errorCode'); -}; - declare global { var litConfig: any; var wasmExport: any; diff --git a/packages/nacl/package.json b/packages/nacl/package.json index 1dd0bc5ae0..9ea7e673c3 100644 --- a/packages/nacl/package.json +++ b/packages/nacl/package.json @@ -24,4 +24,4 @@ "version": "3.2.1", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/pkp-base/package.json b/packages/pkp-base/package.json index fa530c02a3..825b591579 100644 --- a/packages/pkp-base/package.json +++ b/packages/pkp-base/package.json @@ -27,4 +27,4 @@ ], "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/pkp-client/package.json b/packages/pkp-client/package.json index beb346d0f5..9ee5a651b3 100644 --- a/packages/pkp-client/package.json +++ b/packages/pkp-client/package.json @@ -27,4 +27,4 @@ ], "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/pkp-cosmos/package.json b/packages/pkp-cosmos/package.json index 8eafc943f5..9d6a306fbd 100644 --- a/packages/pkp-cosmos/package.json +++ b/packages/pkp-cosmos/package.json @@ -27,4 +27,4 @@ ], "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/pkp-ethers/package.json b/packages/pkp-ethers/package.json index dd253d9fc9..ad8d2f1c14 100644 --- a/packages/pkp-ethers/package.json +++ b/packages/pkp-ethers/package.json @@ -23,4 +23,4 @@ "version": "3.2.1", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/pkp-sui/package.json b/packages/pkp-sui/package.json index 58c2ba9296..54371e097d 100644 --- a/packages/pkp-sui/package.json +++ b/packages/pkp-sui/package.json @@ -27,4 +27,4 @@ ], "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/pkp-walletconnect/package.json b/packages/pkp-walletconnect/package.json index 5ca3f58cbc..1ed5b3bb34 100644 --- a/packages/pkp-walletconnect/package.json +++ b/packages/pkp-walletconnect/package.json @@ -34,4 +34,4 @@ ], "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/sev-snp-utils-sdk/package.json b/packages/sev-snp-utils-sdk/package.json index 2b5904e6ee..3cc6e360d2 100644 --- a/packages/sev-snp-utils-sdk/package.json +++ b/packages/sev-snp-utils-sdk/package.json @@ -30,4 +30,4 @@ "version": "3.2.1", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/types/package.json b/packages/types/package.json index 62697a8022..72869aa0d0 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -26,4 +26,4 @@ "version": "3.2.1", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/uint8arrays/package.json b/packages/uint8arrays/package.json index 17dbf23b45..4baf9b7d50 100644 --- a/packages/uint8arrays/package.json +++ b/packages/uint8arrays/package.json @@ -24,4 +24,4 @@ "version": "3.2.1", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/tools/scripts/tools.mjs b/tools/scripts/tools.mjs index 84e6755106..aee511c0ed 100644 --- a/tools/scripts/tools.mjs +++ b/tools/scripts/tools.mjs @@ -528,7 +528,7 @@ async function buildFunc() { .map((item) => item.replace('apps/', '')) .join(','); - const command = `yarn nx run-many --target=build --exclude=${ignoreList}`; + const command = `yarn nx run-many --target=build --exclude=${ignoreList} --parallel=false`; spawnListener(command, { onDone: () => { diff --git a/typedoc.json b/typedoc.json index ce882b3a4d..b85a015c08 100644 --- a/typedoc.json +++ b/typedoc.json @@ -30,4 +30,4 @@ ], "out": "doc", "skipErrorChecking": true -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index a7bd6af16d..ef573a37d9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -25746,16 +25746,11 @@ typeforce@^1.11.3: resolved "https://registry.yarnpkg.com/typeforce/-/typeforce-1.18.0.tgz#d7416a2c5845e085034d70fcc5b6cc4a90edbfdc" integrity sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g== -"typescript@^3 || ^4": +"typescript@^3 || ^4", typescript@^4.7.2: version "4.9.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== -typescript@~4.7.2: - version "4.7.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" - integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== - typical@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/typical/-/typical-4.0.0.tgz#cbeaff3b9d7ae1e2bbfaf5a4e6f11eccfde94fc4" From 71aebf669d9952ef77921f19924f929eb720c836 Mon Sep 17 00:00:00 2001 From: Chris Cassano Date: Fri, 23 Feb 2024 09:34:04 -0800 Subject: [PATCH 3/8] refactored error handling to make it cleaner --- apps/html/index.html | 4 ++-- apps/react/src/app/app.tsx | 2 +- .../src/lib/constants/autogen_internal.ts | 2 +- packages/core/src/lib/lit-core.ts | 19 ++++++++++--------- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/apps/html/index.html b/apps/html/index.html index ed4219adf3..5584ff3f89 100644 --- a/apps/html/index.html +++ b/apps/html/index.html @@ -1,4 +1,4 @@ - + @@ -62,7 +62,7 @@ - (HTML) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-html.mjs Fri, 23 Feb 2024 00:56:11 GMT + (HTML) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-html.mjs Fri, 23 Feb 2024 17:29:45 GMT diff --git a/apps/react/src/app/app.tsx b/apps/react/src/app/app.tsx index 715a8e2530..4df1584c40 100644 --- a/apps/react/src/app/app.tsx +++ b/apps/react/src/app/app.tsx @@ -1805,7 +1805,7 @@ pre { `, }} /> - (REACT) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-react.mjs Fri, 23 Feb 2024 00:56:12 GMT + (REACT) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-react.mjs Fri, 23 Feb 2024 17:29:46 GMT
diff --git a/packages/constants/src/lib/constants/autogen_internal.ts b/packages/constants/src/lib/constants/autogen_internal.ts index 3f990f33fb..748a3816b7 100644 --- a/packages/constants/src/lib/constants/autogen_internal.ts +++ b/packages/constants/src/lib/constants/autogen_internal.ts @@ -1,4 +1,4 @@ -// Last Modified: 2024-02-23 00:54:13 +// Last Modified: 2024-02-23 17:27:25 // This file is auto-generated by tools/scripts/gen-internal-dev.mjs export const INTERNAL_DEV = [ 'https://167.114.17.205:443', diff --git a/packages/core/src/lib/lit-core.ts b/packages/core/src/lib/lit-core.ts index 812270fb78..578a85287c 100644 --- a/packages/core/src/lib/lit-core.ts +++ b/packages/core/src/lib/lit-core.ts @@ -930,27 +930,28 @@ export class LitCore { * */ _throwNodeError = (res: RejectedNodePromises): void => { - if (res.error && res.error.errorCode) { + if (res.error) { if ( - (res.error.errorCode === LIT_ERROR_CODE.NODE_NOT_AUTHORIZED || + ((res.error.errorCode && + res.error.errorCode === LIT_ERROR_CODE.NODE_NOT_AUTHORIZED) || res.error.errorCode === 'not_authorized') && this.config.alertWhenUnauthorized ) { - log( - '[Alert originally] You are not authorized to access to this content' - ); + log('You are not authorized to access this content'); } throwError({ ...res.error, message: - `Message: ${res.error.message}. Details: ${res.error.details}` || - 'You are not authorized to access to this content', - errorCode: res.error.errorCode!, + res.error.message || + 'There was an error getting the signing shares from the nodes', + errorCode: res.error.errorCode || LIT_ERROR.UNKNOWN_ERROR.code, } as NodeClientErrorV0 | NodeClientErrorV1); } else { throwError({ - message: `There was an error getting the signing shares from the nodes. Message: ${res.error.message}. Details: ${res.error.details}`, + message: `There was an error getting the signing shares from the nodes. Response from the nodes: ${JSON.stringify( + res + )}`, error: LIT_ERROR.UNKNOWN_ERROR, }); } From 3d00e9535e8a734e6a63900399bab14277d775bf Mon Sep 17 00:00:00 2001 From: Chris Cassano Date: Fri, 23 Feb 2024 09:48:21 -0800 Subject: [PATCH 4/8] Remove unused function --- apps/html/index.html | 4 ++-- apps/react/src/app/app.tsx | 2 +- packages/constants/src/lib/constants/autogen_internal.ts | 2 +- packages/misc/src/lib/misc.ts | 9 --------- 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/apps/html/index.html b/apps/html/index.html index 5584ff3f89..eafdd2f838 100644 --- a/apps/html/index.html +++ b/apps/html/index.html @@ -1,4 +1,4 @@ - + @@ -62,7 +62,7 @@ - (HTML) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-html.mjs Fri, 23 Feb 2024 17:29:45 GMT + (HTML) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-html.mjs Fri, 23 Feb 2024 17:40:11 GMT diff --git a/apps/react/src/app/app.tsx b/apps/react/src/app/app.tsx index 4df1584c40..6e8547d518 100644 --- a/apps/react/src/app/app.tsx +++ b/apps/react/src/app/app.tsx @@ -1805,7 +1805,7 @@ pre { `, }} /> - (REACT) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-react.mjs Fri, 23 Feb 2024 17:29:46 GMT + (REACT) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-react.mjs Fri, 23 Feb 2024 17:40:11 GMT
diff --git a/packages/constants/src/lib/constants/autogen_internal.ts b/packages/constants/src/lib/constants/autogen_internal.ts index 748a3816b7..93658b086c 100644 --- a/packages/constants/src/lib/constants/autogen_internal.ts +++ b/packages/constants/src/lib/constants/autogen_internal.ts @@ -1,4 +1,4 @@ -// Last Modified: 2024-02-23 17:27:25 +// Last Modified: 2024-02-23 17:37:54 // This file is auto-generated by tools/scripts/gen-internal-dev.mjs export const INTERNAL_DEV = [ 'https://167.114.17.205:443', diff --git a/packages/misc/src/lib/misc.ts b/packages/misc/src/lib/misc.ts index 0e680ed3e9..42784aeb80 100644 --- a/packages/misc/src/lib/misc.ts +++ b/packages/misc/src/lib/misc.ts @@ -179,15 +179,6 @@ export const isNodeClientErrorV0 = ( return nodeError.hasOwnProperty('errorCode'); }; -export const isNodeErrorV1 = ( - nodeError: NodeErrorV1 -): nodeError is NodeErrorV1 => { - return ( - nodeError.hasOwnProperty('errorCode') && - nodeError.hasOwnProperty('errorKind') - ); -}; - declare global { var litConfig: any; var wasmExport: any; From 5944cc43dfb0e57c1653f4918f2989648950f175 Mon Sep 17 00:00:00 2001 From: Chris Cassano Date: Fri, 23 Feb 2024 20:23:00 -0800 Subject: [PATCH 5/8] okay also added requestId in a few places --- apps/html/index.html | 4 ++-- apps/react/src/app/app.tsx | 2 +- .../src/lib/constants/autogen_internal.ts | 2 +- packages/core/src/lib/lit-core.ts | 4 +++- .../src/lib/lit-node-client-nodejs.ts | 23 +++++++++---------- packages/misc/src/lib/misc.ts | 8 +++++-- packages/types/src/lib/ILitNodeClient.ts | 2 +- packages/types/src/lib/interfaces.ts | 1 + 8 files changed, 26 insertions(+), 20 deletions(-) diff --git a/apps/html/index.html b/apps/html/index.html index eafdd2f838..8e8a87ac60 100644 --- a/apps/html/index.html +++ b/apps/html/index.html @@ -1,4 +1,4 @@ - + @@ -62,7 +62,7 @@ - (HTML) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-html.mjs Fri, 23 Feb 2024 17:40:11 GMT + (HTML) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-html.mjs Sat, 24 Feb 2024 04:18:12 GMT diff --git a/apps/react/src/app/app.tsx b/apps/react/src/app/app.tsx index 6e8547d518..0fb1a65ff2 100644 --- a/apps/react/src/app/app.tsx +++ b/apps/react/src/app/app.tsx @@ -1805,7 +1805,7 @@ pre { `, }} /> - (REACT) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-react.mjs Fri, 23 Feb 2024 17:40:11 GMT + (REACT) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-react.mjs Sat, 24 Feb 2024 04:18:12 GMT
diff --git a/packages/constants/src/lib/constants/autogen_internal.ts b/packages/constants/src/lib/constants/autogen_internal.ts index 93658b086c..194fa4dde4 100644 --- a/packages/constants/src/lib/constants/autogen_internal.ts +++ b/packages/constants/src/lib/constants/autogen_internal.ts @@ -1,4 +1,4 @@ -// Last Modified: 2024-02-23 17:37:54 +// Last Modified: 2024-02-24 04:15:54 // This file is auto-generated by tools/scripts/gen-internal-dev.mjs export const INTERNAL_DEV = [ 'https://167.114.17.205:443', diff --git a/packages/core/src/lib/lit-core.ts b/packages/core/src/lib/lit-core.ts index 578a85287c..8ec6c39b30 100644 --- a/packages/core/src/lib/lit-core.ts +++ b/packages/core/src/lib/lit-core.ts @@ -929,7 +929,7 @@ export class LitCore { * @returns { void } * */ - _throwNodeError = (res: RejectedNodePromises): void => { + _throwNodeError = (res: RejectedNodePromises, requestId: string): void => { if (res.error) { if ( ((res.error.errorCode && @@ -946,6 +946,7 @@ export class LitCore { res.error.message || 'There was an error getting the signing shares from the nodes', errorCode: res.error.errorCode || LIT_ERROR.UNKNOWN_ERROR.code, + requestId, } as NodeClientErrorV0 | NodeClientErrorV1); } else { throwError({ @@ -953,6 +954,7 @@ export class LitCore { res )}`, error: LIT_ERROR.UNKNOWN_ERROR, + requestId, }); } }; diff --git a/packages/lit-node-client-nodejs/src/lib/lit-node-client-nodejs.ts b/packages/lit-node-client-nodejs/src/lib/lit-node-client-nodejs.ts index cce196235c..12fc1cb27b 100644 --- a/packages/lit-node-client-nodejs/src/lib/lit-node-client-nodejs.ts +++ b/packages/lit-node-client-nodejs/src/lib/lit-node-client-nodejs.ts @@ -1347,7 +1347,7 @@ export class LitNodeClientNodeJs getSignatures = (signedData: Array, requestId: string = ''): any => { const initialKeys = [...new Set(signedData.flatMap((i) => Object.keys(i)))]; - // processing signature shares for failed or invalid contents. + // processing signature shares for failed or invalid contents. mutates the signedData object. for (const signatureResponse of signedData) { for (const sigName of Object.keys(signatureResponse)) { const requiredFields = ['signatureShare']; @@ -1439,10 +1439,10 @@ export class LitNodeClientNodeJs ); throwError({ - message: - 'total number of valid signatures shares does not match threshold', + message: `The total number of valid signatures shares ${shares.length} does not meet the threshold of ${this.config.minNodeCount}`, errorKind: LIT_ERROR.NO_VALID_SHARES.kind, errorCode: LIT_ERROR.NO_VALID_SHARES.code, + requestId, }); } @@ -1601,7 +1601,7 @@ export class LitNodeClientNodeJs params = LitNodeClientNodeJs.normalizeParams(params); let res; - let requestId = this.getRequestId(); + let requestId = ''; // -- only run on a single node if (targetNodeRange) { res = await this.runOnTargetedNodes(params); @@ -1652,7 +1652,7 @@ export class LitNodeClientNodeJs } // -- case: promises rejected if (res.success === false) { - this._throwNodeError(res as RejectedNodePromises); + this._throwNodeError(res as RejectedNodePromises, requestId); } // -- case: promises success (TODO: check the keys of "values") @@ -1865,7 +1865,7 @@ export class LitNodeClientNodeJs // -- case: promises rejected if (!res.success) { - this._throwNodeError(res as RejectedNodePromises); + this._throwNodeError(res as RejectedNodePromises, requestId); } // -- case: promises success (TODO: check the keys of "values") @@ -1994,7 +1994,6 @@ export class LitNodeClientNodeJs } // ========== Get Node Promises ========== - let requestId; const wrapper = async ( id: string ): Promise | RejectedNodePromises> => { @@ -2039,10 +2038,11 @@ export class LitNodeClientNodeJs }, this.config.retryTolerance ); + const requestId = res.requestId; // -- case: promises rejected if (res.success === false) { - this._throwNodeError(res as RejectedNodePromises); + this._throwNodeError(res as RejectedNodePromises, requestId); } const signatureShares: Array = ( @@ -2236,7 +2236,6 @@ export class LitNodeClientNodeJs log('identityParam', identityParam); - let requestId; // ========== Get Network Signature ========== const wrapper = async ( id: string @@ -2280,11 +2279,11 @@ export class LitNodeClientNodeJs this.config.retryTolerance ); - requestId = res.requestId; + const requestId = res.requestId; // -- case: promises rejected if (res.success === false) { - this._throwNodeError(res as RejectedNodePromises); + this._throwNodeError(res as RejectedNodePromises, requestId); } const signatureShares: Array = ( @@ -2621,7 +2620,7 @@ export class LitNodeClientNodeJs // -- case: promises rejected if (!this.#isSuccessNodePromises(res)) { - this._throwNodeError(res as RejectedNodePromises); + this._throwNodeError(res as RejectedNodePromises, requestId); return {} as SignSessionKeyResponse; } diff --git a/packages/misc/src/lib/misc.ts b/packages/misc/src/lib/misc.ts index 42784aeb80..0489aec0b0 100644 --- a/packages/misc/src/lib/misc.ts +++ b/packages/misc/src/lib/misc.ts @@ -129,6 +129,7 @@ export const throwErrorV1 = ({ status, message, errorCode, + requestId, }: NodeClientErrorV1): never => { const errConstructorFunc = function ( this: any, @@ -136,13 +137,15 @@ export const throwErrorV1 = ({ status: number, details: string[], message?: string, - errorCode?: string + errorCode?: string, + requestId?: string ) { this.message = message; this.errorCode = errorCode; this.errorKind = errorKind; this.status = status; this.details = details; + this.requestId = requestId; }; throw new (errConstructorFunc as any)( @@ -150,7 +153,8 @@ export const throwErrorV1 = ({ status, details, message, - errorCode + errorCode, + requestId ); }; diff --git a/packages/types/src/lib/ILitNodeClient.ts b/packages/types/src/lib/ILitNodeClient.ts index 9351e7d94b..fa083fae52 100644 --- a/packages/types/src/lib/ILitNodeClient.ts +++ b/packages/types/src/lib/ILitNodeClient.ts @@ -148,7 +148,7 @@ export interface ILitNodeClient { * @returns { void } * */ - _throwNodeError(res: RejectedNodePromises): void; + _throwNodeError(res: RejectedNodePromises, requestId: string): void; // ========== Shares Resolvers ========== /** diff --git a/packages/types/src/lib/interfaces.ts b/packages/types/src/lib/interfaces.ts index 2e4ec12369..3d183c13d5 100644 --- a/packages/types/src/lib/interfaces.ts +++ b/packages/types/src/lib/interfaces.ts @@ -635,6 +635,7 @@ export interface NodeClientErrorV1 { errorCode: string; details?: string[]; status?: number; + requestId?: string; } export interface SigShare { From 670b558abbaa7ccdaecfc1d71331271b80897290 Mon Sep 17 00:00:00 2001 From: Chris Cassano Date: Fri, 23 Feb 2024 20:24:34 -0800 Subject: [PATCH 6/8] ran the linter --- README.md | 60 +++++++++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 13255b1371..67f1aa38af 100644 --- a/README.md +++ b/README.md @@ -55,40 +55,38 @@ yarn add @lit-protocol/lit-node-client -Package | Category | Version | Download ---- | --- | --- | --- -| [@lit-protocol/lit-node-client-nodejs](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/lit-node-client-nodejs) | ![lit-node-client-nodejs](https://img.shields.io/badge/-nodejs-2E8B57 "lit-node-client-nodejs") | 3.2.1 | npm -| [@lit-protocol/lit-node-client](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/lit-node-client) | ![lit-node-client](https://img.shields.io/badge/-universal-8A6496 "lit-node-client") | 3.2.1 | npm - +| Package | Category | Version | Download | +| -------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------- | +| [@lit-protocol/lit-node-client-nodejs](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/lit-node-client-nodejs) | ![lit-node-client-nodejs](https://img.shields.io/badge/-nodejs-2E8B57 'lit-node-client-nodejs') | 3.2.1 | npm | +| [@lit-protocol/lit-node-client](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/lit-node-client) | ![lit-node-client](https://img.shields.io/badge/-universal-8A6496 'lit-node-client') | 3.2.1 | npm | If you're a tech-savvy user and wish to utilize only specific submodules that our main module relies upon, you can find individual packages listed below. This way, you can import only the necessary packages that cater to your specific use case:: - -Package | Category | Version | Download ---- | --- | --- | --- -| [@lit-protocol/access-control-conditions](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/access-control-conditions) | ![access-control-conditions](https://img.shields.io/badge/-universal-8A6496 "access-control-conditions") | 3.2.1 | npm -| [@lit-protocol/auth-helpers](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/auth-helpers) | ![auth-helpers](https://img.shields.io/badge/-universal-8A6496 "auth-helpers") | 3.2.1 | npm -| [@lit-protocol/bls-sdk](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/bls-sdk) | ![bls-sdk](https://img.shields.io/badge/-universal-8A6496 "bls-sdk") | 3.2.1 | npm -| [@lit-protocol/constants](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/constants) | ![constants](https://img.shields.io/badge/-universal-8A6496 "constants") | 3.2.1 | npm -| [@lit-protocol/contracts-sdk](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/contracts-sdk) | ![contracts-sdk](https://img.shields.io/badge/-universal-8A6496 "contracts-sdk") | 3.2.1 | npm -| [@lit-protocol/core](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/core) | ![core](https://img.shields.io/badge/-universal-8A6496 "core") | 3.2.1 | npm -| [@lit-protocol/crypto](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/crypto) | ![crypto](https://img.shields.io/badge/-universal-8A6496 "crypto") | 3.2.1 | npm -| [@lit-protocol/ecdsa-sdk](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/ecdsa-sdk) | ![ecdsa-sdk](https://img.shields.io/badge/-universal-8A6496 "ecdsa-sdk") | 3.2.1 | npm -| [@lit-protocol/encryption](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/encryption) | ![encryption](https://img.shields.io/badge/-universal-8A6496 "encryption") | 3.2.1 | npm -| [@lit-protocol/logger](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/logger) | ![logger](https://img.shields.io/badge/-universal-8A6496 "logger") | 3.2.1 | npm -| [@lit-protocol/misc](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/misc) | ![misc](https://img.shields.io/badge/-universal-8A6496 "misc") | 3.2.1 | npm -| [@lit-protocol/nacl](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/nacl) | ![nacl](https://img.shields.io/badge/-universal-8A6496 "nacl") | 3.2.1 | npm -| [@lit-protocol/pkp-base](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/pkp-base) | ![pkp-base](https://img.shields.io/badge/-universal-8A6496 "pkp-base") | 3.2.1 | npm -| [@lit-protocol/pkp-client](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/pkp-client) | ![pkp-client](https://img.shields.io/badge/-universal-8A6496 "pkp-client") | 3.2.1 | npm -| [@lit-protocol/pkp-cosmos](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/pkp-cosmos) | ![pkp-cosmos](https://img.shields.io/badge/-universal-8A6496 "pkp-cosmos") | 3.2.1 | npm -| [@lit-protocol/pkp-ethers](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/pkp-ethers) | ![pkp-ethers](https://img.shields.io/badge/-universal-8A6496 "pkp-ethers") | 3.2.1 | npm -| [@lit-protocol/pkp-sui](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/pkp-sui) | ![pkp-sui](https://img.shields.io/badge/-universal-8A6496 "pkp-sui") | 3.2.1 | npm -| [@lit-protocol/pkp-walletconnect](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/pkp-walletconnect) | ![pkp-walletconnect](https://img.shields.io/badge/-universal-8A6496 "pkp-walletconnect") | 3.2.1 | npm -| [@lit-protocol/sev-snp-utils-sdk](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/sev-snp-utils-sdk) | ![sev-snp-utils-sdk](https://img.shields.io/badge/-universal-8A6496 "sev-snp-utils-sdk") | 3.2.1 | npm -| [@lit-protocol/types](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/types) | ![types](https://img.shields.io/badge/-universal-8A6496 "types") | 3.2.1 | npm -| [@lit-protocol/uint8arrays](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/uint8arrays) | ![uint8arrays](https://img.shields.io/badge/-universal-8A6496 "uint8arrays") | 3.2.1 | npm -| [@lit-protocol/auth-browser](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/auth-browser) | ![auth-browser](https://img.shields.io/badge/-browser-E98869 "auth-browser") | 3.2.1 | npm -| [@lit-protocol/misc-browser](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/misc-browser) | ![misc-browser](https://img.shields.io/badge/-browser-E98869 "misc-browser") | 3.2.1 | npm +| Package | Category | Version | Download | +| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------- | +| [@lit-protocol/access-control-conditions](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/access-control-conditions) | ![access-control-conditions](https://img.shields.io/badge/-universal-8A6496 'access-control-conditions') | 3.2.1 | npm | +| [@lit-protocol/auth-helpers](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/auth-helpers) | ![auth-helpers](https://img.shields.io/badge/-universal-8A6496 'auth-helpers') | 3.2.1 | npm | +| [@lit-protocol/bls-sdk](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/bls-sdk) | ![bls-sdk](https://img.shields.io/badge/-universal-8A6496 'bls-sdk') | 3.2.1 | npm | +| [@lit-protocol/constants](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/constants) | ![constants](https://img.shields.io/badge/-universal-8A6496 'constants') | 3.2.1 | npm | +| [@lit-protocol/contracts-sdk](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/contracts-sdk) | ![contracts-sdk](https://img.shields.io/badge/-universal-8A6496 'contracts-sdk') | 3.2.1 | npm | +| [@lit-protocol/core](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/core) | ![core](https://img.shields.io/badge/-universal-8A6496 'core') | 3.2.1 | npm | +| [@lit-protocol/crypto](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/crypto) | ![crypto](https://img.shields.io/badge/-universal-8A6496 'crypto') | 3.2.1 | npm | +| [@lit-protocol/ecdsa-sdk](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/ecdsa-sdk) | ![ecdsa-sdk](https://img.shields.io/badge/-universal-8A6496 'ecdsa-sdk') | 3.2.1 | npm | +| [@lit-protocol/encryption](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/encryption) | ![encryption](https://img.shields.io/badge/-universal-8A6496 'encryption') | 3.2.1 | npm | +| [@lit-protocol/logger](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/logger) | ![logger](https://img.shields.io/badge/-universal-8A6496 'logger') | 3.2.1 | npm | +| [@lit-protocol/misc](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/misc) | ![misc](https://img.shields.io/badge/-universal-8A6496 'misc') | 3.2.1 | npm | +| [@lit-protocol/nacl](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/nacl) | ![nacl](https://img.shields.io/badge/-universal-8A6496 'nacl') | 3.2.1 | npm | +| [@lit-protocol/pkp-base](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/pkp-base) | ![pkp-base](https://img.shields.io/badge/-universal-8A6496 'pkp-base') | 3.2.1 | npm | +| [@lit-protocol/pkp-client](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/pkp-client) | ![pkp-client](https://img.shields.io/badge/-universal-8A6496 'pkp-client') | 3.2.1 | npm | +| [@lit-protocol/pkp-cosmos](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/pkp-cosmos) | ![pkp-cosmos](https://img.shields.io/badge/-universal-8A6496 'pkp-cosmos') | 3.2.1 | npm | +| [@lit-protocol/pkp-ethers](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/pkp-ethers) | ![pkp-ethers](https://img.shields.io/badge/-universal-8A6496 'pkp-ethers') | 3.2.1 | npm | +| [@lit-protocol/pkp-sui](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/pkp-sui) | ![pkp-sui](https://img.shields.io/badge/-universal-8A6496 'pkp-sui') | 3.2.1 | npm | +| [@lit-protocol/pkp-walletconnect](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/pkp-walletconnect) | ![pkp-walletconnect](https://img.shields.io/badge/-universal-8A6496 'pkp-walletconnect') | 3.2.1 | npm | +| [@lit-protocol/sev-snp-utils-sdk](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/sev-snp-utils-sdk) | ![sev-snp-utils-sdk](https://img.shields.io/badge/-universal-8A6496 'sev-snp-utils-sdk') | 3.2.1 | npm | +| [@lit-protocol/types](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/types) | ![types](https://img.shields.io/badge/-universal-8A6496 'types') | 3.2.1 | npm | +| [@lit-protocol/uint8arrays](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/uint8arrays) | ![uint8arrays](https://img.shields.io/badge/-universal-8A6496 'uint8arrays') | 3.2.1 | npm | +| [@lit-protocol/auth-browser](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/auth-browser) | ![auth-browser](https://img.shields.io/badge/-browser-E98869 'auth-browser') | 3.2.1 | npm | +| [@lit-protocol/misc-browser](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/misc-browser) | ![misc-browser](https://img.shields.io/badge/-browser-E98869 'misc-browser') | 3.2.1 | npm | From cfabee4f45e0e87a521c32b48f85478e58872021 Mon Sep 17 00:00:00 2001 From: Ansonhkg Date: Mon, 26 Feb 2024 12:52:42 +0800 Subject: [PATCH 7/8] fix: replace nx executor --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 581b66f7c4..7e03edab3e 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "reset:dev": "yarn tools --remove-local-dev", "reset": "rm -rf ./dist/packages && yarn reset:dev", "build": "yarn build:packages", - "build:packages": "yarn gen:internal-dev && yarn update:contracts && yarn tools check --no-empty-directories=true && yarn tools fixTsConfig && yarn reset && yarn tools --build --packages && yarn tools --postBuild && yarn tools --setup-local-dev && yarn postBuild:mapDepsToDist && yarn prettier && yarn gen:readme && yarn build:verify", + "build:packages": "yarn tools --remove-local-dev && rm -rf ./dist && yarn gen:internal-dev && yarn update:contracts && yarn tools check --no-empty-directories=true && yarn tools fixTsConfig && yarn tools --build --packages && yarn tools --setup-local-dev && yarn gen:readme && yarn build:verify", "build:target": "yarn node tools/scripts/build.mjs", "build:setupLocalDev": "yarn tools --setup-local-dev", "build:verify": "yarn tools --verify", @@ -205,4 +205,4 @@ "workspaces": [ "packages/*" ] -} +} \ No newline at end of file From f7cda62da0edd843292c7246c376b8f72f5f5863 Mon Sep 17 00:00:00 2001 From: Ansonhkg Date: Mon, 26 Feb 2024 21:15:00 +0800 Subject: [PATCH 8/8] feat: add gitignore --- .eslintignore | 1 + .gitignore | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .eslintignore diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000000..3c3629e647 --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +node_modules diff --git a/.gitignore b/.gitignore index b3efe0135e..5985154ac4 100644 --- a/.gitignore +++ b/.gitignore @@ -63,4 +63,6 @@ apps/html/index.html apps/nodejs/main.ts apps/react/src/app/app.tsx -storage.test.db \ No newline at end of file +storage.test.db + +.nx \ No newline at end of file