diff --git a/package.json b/package.json index f971912..940c21b 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "@types/adm-zip": "0.5.5", "@types/elliptic": "6.4.18", "@types/mocha": "10.0.7", - "@types/node": "^20.14.8", + "@types/node": "^22.13.4", "@types/semver": "^7.5.8", "@types/split": "^1.0.5", "@typescript-eslint/parser": "^7.13.1", diff --git a/src/main/holochainManager.ts b/src/main/holochainManager.ts index a0f0545..294b2ef 100644 --- a/src/main/holochainManager.ts +++ b/src/main/holochainManager.ts @@ -348,7 +348,6 @@ export class HolochainManager { appId, distributionInfo, networkSeed, - membrane_proofs, icon, agentPubKey, }: { @@ -356,7 +355,6 @@ export class HolochainManager { appId: string; distributionInfo: DistributionInfoV1; networkSeed?: string; - membrane_proofs?: { [key: string]: MembraneProof }; icon?: Uint8Array; agentPubKey?: AgentPubKeyB64; }) { @@ -372,7 +370,6 @@ export class HolochainManager { appId, distributionInfo, networkSeed, - membrane_proofs, }); } @@ -381,7 +378,6 @@ export class HolochainManager { appId, distributionInfo, networkSeed, - membrane_proofs, agentPubKey, }: { happBytes: Array; @@ -408,8 +404,6 @@ export class HolochainManager { const appInfo = await this.installApp({ agent_key: pubKey, installed_app_id: appId, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - membrane_proofs: membrane_proofs ? membrane_proofs : (null as any), path: happFilePath, network_seed: networkSeed, }); @@ -460,7 +454,6 @@ export class HolochainManager { appId, distributionInfo, networkSeed, - membrane_proofs, agentPubKey, }: { happSha256: string; @@ -468,7 +461,6 @@ export class HolochainManager { appId: string; distributionInfo: DistributionInfoV1; networkSeed?: string; - membrane_proofs?: { [key: string]: MembraneProof }; agentPubKey?: AgentPubKeyB64; }): Promise { if (!this.isUiAvailable(uiZipSha256)) { @@ -497,8 +489,6 @@ export class HolochainManager { const appInfo = await this.installApp({ agent_key: pubKey, installed_app_id: appId, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - membrane_proofs: membrane_proofs ? membrane_proofs : (null as any), path: this.happFilePath(happSha256), network_seed: networkSeed, }); @@ -551,10 +541,12 @@ export class HolochainManager { async installApp(payload: InstallAppRequest): Promise { const installedApps = await this.adminWebsocket.listApps({}); - const duplicatePubkey = installedApps.find( - (appInfo) => - encodeHashToBase64(appInfo.agent_pub_key) === encodeHashToBase64(payload.agent_key), - ); + const duplicatePubkey = payload.agent_key + ? installedApps.find( + (appInfo) => + encodeHashToBase64(appInfo.agent_pub_key) === encodeHashToBase64(payload.agent_key!), + ) + : false; if (duplicatePubkey) throw new Error(DUPLICATE_PUBKEY_ERROR_MESSAGE); const duplicateAppId = installedApps.find( diff --git a/src/shared/types/launcher.ts b/src/shared/types/launcher.ts index 377479e..f5904c3 100644 --- a/src/shared/types/launcher.ts +++ b/src/shared/types/launcher.ts @@ -64,7 +64,6 @@ export const CommonAppSchema = z.object({ networkSeed: z.string(), icon: z.instanceof(Uint8Array).optional(), agentPubKey: z.string().optional(), - // TODO add membrane proofs here }); export const InstallDefaultAppSchema = CommonAppSchema.extend({ diff --git a/yarn.lock b/yarn.lock index 7e4545a..03ddd00 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1264,12 +1264,12 @@ dependencies: undici-types "~5.26.4" -"@types/node@^20.14.8": - version "20.14.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.8.tgz#45c26a2a5de26c3534a9504530ddb3b27ce031ac" - integrity sha512-DO+2/jZinXfROG7j7WKFn/3C6nFwxy2lLpgLjEXJz+0XKphZlTLJ14mo8Vfg8X5BWN6XjyESXq+LcYdT7tR3bA== +"@types/node@^22.13.4": + version "22.13.4" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.13.4.tgz#3fe454d77cd4a2d73c214008b3e331bfaaf5038a" + integrity sha512-ywP2X0DYtX3y08eFVx5fNIw7/uIv8hYUKgXoK8oayJlLnKcRfEYCxWMVE1XagUdVtCJlZT1AU4LXEABW+L1Peg== dependencies: - undici-types "~5.26.4" + undici-types "~6.20.0" "@types/plist@^3.0.1": version "3.0.5" @@ -3208,7 +3208,7 @@ hasown@^2.0.0: function-bind "^1.1.2" "hc-launcher-rust-utils@file:./rust-utils/dist": - version "0.300.0" + version "0.400.0" he@1.2.0: version "1.2.0" @@ -5299,6 +5299,11 @@ undici-types@~5.26.4: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== +undici-types@~6.20.0: + version "6.20.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433" + integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg== + universal-github-app-jwt@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/universal-github-app-jwt/-/universal-github-app-jwt-2.2.0.tgz#dc6c8929e76f1996a766ba2a08fb420f73365d77"