Skip to content

Commit

Permalink
remove unnecessary fields, remove js-yaml from dependencies, convert …
Browse files Browse the repository at this point in the history
…pubkey to Uint8Array to have deepEqual work properly
  • Loading branch information
matthme committed Nov 26, 2024
1 parent f4e52c7 commit 50043a9
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 62 deletions.
2 changes: 1 addition & 1 deletion docs/client.yamlproperties.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Any value that is serializable to a Yaml value
**Signature:**

```typescript
export type YamlProperties = any;
export type YamlProperties = unknown;
```
56 changes: 13 additions & 43 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"isomorphic-ws": "^5.0.0",
"js-base64": "^3.7.5",
"js-sha512": "^0.9.0",
"js-yaml": "4.1.0",
"libsodium-wrappers": "^0.7.13",
"lodash-es": "^4.17.21",
"ws": "^8.14.2"
Expand All @@ -67,7 +66,7 @@
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-tsdoc": "^0.2.17",
"js-yaml": "^3.14.1",
"js-yaml": "^4.1.0",
"prettier": "^2.8.8",
"rimraf": "^3.0.2",
"tape": "^5.6.6",
Expand Down
3 changes: 1 addition & 2 deletions src/api/admin/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,7 @@ export type RoleSettings =
* @public
* Any value that is serializable to a Yaml value
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type YamlProperties = any;
export type YamlProperties = unknown;

/**
* @public
Expand Down
15 changes: 1 addition & 14 deletions test/e2e/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ test(
installed_app_id,
agent_key,
path: `${FIXTURE_PATH}/test.happ`,
roles_settings: {},
});
const status: InstalledAppInfoStatus = installedApp.status;
t.deepEqual(
Expand Down Expand Up @@ -220,7 +219,6 @@ test(
path,
agent_key,
installed_app_id,
roles_settings: {},
});
t.ok(installedApp);
t.deepEqual(installedApp.status, {
Expand Down Expand Up @@ -298,7 +296,6 @@ test(
installed_app_id,
agent_key,
path: `${FIXTURE_PATH}/test.happ`,
roles_settings: {},
});

const dnaDefinition = await admin.getDnaDefinition(hash);
Expand Down Expand Up @@ -581,7 +578,7 @@ test(
nanos: 0,
};

const progenitorKey = fakeAgentPubKey();
const progenitorKey = Uint8Array.from(fakeAgentPubKey());

await admin.installApp({
installed_app_id,
Expand Down Expand Up @@ -670,7 +667,6 @@ test(
},
resources: {},
},
roles_settings: {},
});

const { port: appPort } = await admin.attachAppInterface({
Expand Down Expand Up @@ -770,7 +766,6 @@ test(
},
resources: {},
},
roles_settings: {},
});
await admin.enableApp({ installed_app_id });
const { port: appPort } = await admin.attachAppInterface({
Expand Down Expand Up @@ -842,7 +837,6 @@ test(
dna_1: zippedDnaBundle,
},
},
roles_settings: {},
});
await admin.enableApp({ installed_app_id });
const { port: appPort } = await admin.attachAppInterface({
Expand Down Expand Up @@ -1036,7 +1030,6 @@ test("can inject agents", async (t) => {
let result = await admin1.installApp({
installed_app_id,
agent_key: agent_key_1,
roles_settings: {},
path: `${FIXTURE_PATH}/test.happ`,
});
t.ok(result);
Expand Down Expand Up @@ -1074,7 +1067,6 @@ test("can inject agents", async (t) => {
result = await admin2.installApp({
installed_app_id,
agent_key: agent_key_2,
roles_settings: {},
path: `${FIXTURE_PATH}/test.happ`,
});
t.ok(result);
Expand Down Expand Up @@ -1119,7 +1111,6 @@ test(

const tag = "test_tag";
const link: Link = await client.callZome({
cap_secret: undefined,
cell_id,
provenance: cell_id[1],
zome_name: TEST_ZOME_NAME,
Expand Down Expand Up @@ -1147,15 +1138,13 @@ test(
await admin.authorizeSigningCredentials(cell_id);

const linkHash: ActionHash = await client.callZome({
cap_secret: undefined,
cell_id,
provenance: cell_id[1],
zome_name: TEST_ZOME_NAME,
fn_name: "create_and_delete_link",
payload: null,
});
const activity: RegisterAgentActivity[] = await client.callZome({
cap_secret: undefined,
cell_id,
provenance: cell_id[1],
zome_name: TEST_ZOME_NAME,
Expand Down Expand Up @@ -1253,14 +1242,12 @@ test(
const installedApp1 = await admin.installApp({
agent_key,
installed_app_id: "test-app1",
roles_settings: {},
path: `${FIXTURE_PATH}/test.happ`,
network_seed: "1",
});
const installedApp2 = await admin.installApp({
agent_key,
installed_app_id: "test-app2",
roles_settings: {},
path: `${FIXTURE_PATH}/test.happ`,
network_seed: "2",
});
Expand Down

0 comments on commit 50043a9

Please sign in to comment.