Skip to content

Commit

Permalink
remove memproof field, bump @types/node
Browse files Browse the repository at this point in the history
  • Loading branch information
matthme committed Feb 19, 2025
1 parent 9b119e8 commit cd4df13
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 22 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
20 changes: 6 additions & 14 deletions src/main/holochainManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,15 +348,13 @@ export class HolochainManager {
appId,
distributionInfo,
networkSeed,
membrane_proofs,
icon,
agentPubKey,
}: {
happAndUiBytes: HappAndUiBytes;
appId: string;
distributionInfo: DistributionInfoV1;
networkSeed?: string;
membrane_proofs?: { [key: string]: MembraneProof };
icon?: Uint8Array;
agentPubKey?: AgentPubKeyB64;
}) {
Expand All @@ -372,7 +370,6 @@ export class HolochainManager {
appId,
distributionInfo,
networkSeed,
membrane_proofs,
});
}

Expand All @@ -381,7 +378,6 @@ export class HolochainManager {
appId,
distributionInfo,
networkSeed,
membrane_proofs,
agentPubKey,
}: {
happBytes: Array<number>;
Expand All @@ -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,
});
Expand Down Expand Up @@ -460,15 +454,13 @@ export class HolochainManager {
appId,
distributionInfo,
networkSeed,
membrane_proofs,
agentPubKey,
}: {
happSha256: string;
uiZipSha256: string;
appId: string;
distributionInfo: DistributionInfoV1;
networkSeed?: string;
membrane_proofs?: { [key: string]: MembraneProof };
agentPubKey?: AgentPubKeyB64;
}): Promise<void> {
if (!this.isUiAvailable(uiZipSha256)) {
Expand Down Expand Up @@ -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,
});
Expand Down Expand Up @@ -551,10 +541,12 @@ export class HolochainManager {

async installApp(payload: InstallAppRequest): Promise<AppInfo> {
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(
Expand Down
1 change: 0 additions & 1 deletion src/shared/types/launcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
17 changes: 11 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"

[email protected]:
version "1.2.0"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit cd4df13

Please sign in to comment.