Skip to content

Commit

Permalink
Update client version and usage; also fix console errors in vue template
Browse files Browse the repository at this point in the history
  • Loading branch information
c12i committed Nov 25, 2024
1 parent 0eb4d3b commit 9d54ae7
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/versions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pub const TRYORAMA_VERSION: &str = "^0.18.0-dev.1";

/// npm: <https://www.npmjs.com/package/@holochain/client>
pub const HOLOCHAIN_CLIENT_VERSION: &str = "^0.19.0-dev.3";
pub const HOLOCHAIN_CLIENT_VERSION: &str = "^0.19.0-dev.5";

/// npm: <https://www.npmjs.com/package/@holochain/hc-spin>
pub const HC_SPIN_VERSION: &str = "^0.400.0-dev.3";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ test('create a {{pascal_case referenceable.name}} and get {{lower_case collectio
let collectionOutput: Link[] = await bob.cells[0].callZome({
zome_name: "{{coordinator_zome_manifest.name}}",
fn_name: "get_{{snake_case collection_name}}",
payload: {{#if (eq collection_type.type "Global")}}null{{else}}alice.agentPubKey{{/if}}
{{#if (eq collection_type.type "ByAuthor")}}payload: alice.agentPubKey{{/if}},
});
assert.equal(collectionOutput.length, 0);

Expand Down Expand Up @@ -74,4 +74,4 @@ test('create a {{pascal_case referenceable.name}} and get {{lower_case collectio
assert.equal(collectionOutput.length, 0);
{{/if}}
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class {{pascal_case collection_name}} extends LitElement {
role_name: '{{dna_role_name}}',
zome_name: '{{coordinator_zome_manifest.name}}',
fn_name: 'get_{{snake_case collection_name}}',
payload: {{#if (eq collection_type.type "ByAuthor")}}author{{else}}null{{/if}},
{{#if (eq collection_type.type "ByAuthor")}}payload: this.author{{/if}},
}) as Promise<Array<Link>>, () => [{{#if (eq collection_type.type "ByAuthor")}}this.author{{/if}}]);

firstUpdated() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const {{pascal_case collection_name}}: FC{{#if (eq collection_type.type "ByAutho
role_name: '{{dna_role_name}}',
zome_name: '{{snake_case coordinator_zome_manifest.name}}',
fn_name: 'get_{{snake_case collection_name}}',
payload: {{#if (eq collection_type.type "ByAuthor")}}author{{else}}null{{/if}},
{{#if (eq collection_type.type "ByAuthor")}}payload: author{{/if}},
});
if (links?.length) {
setHashes(links.map((l) => l.target));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ async function fetch{{pascal_case (plural referenceable.name)}}() {
role_name: '{{dna_role_name}}',
zome_name: '{{snake_case coordinator_zome_manifest.name}}',
fn_name: 'get_{{snake_case collection_name}}',
payload: {{#if (eq collection_type.type "ByAuthor")}}author{{else}}null{{/if}},
{{#if (eq collection_type.type "ByAuthor")}}payload: author{{/if}},
});
if (links.length) {
hashes = links.map(l => l.target);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ test('create a {{pascal_case referenceable.name}} and get {{lower_case collectio
let collectionOutput: Link[] = await bob.cells[0].callZome({
zome_name: "{{coordinator_zome_manifest.name}}",
fn_name: "get_{{snake_case collection_name}}",
payload: {{#if (eq collection_type.type "Global")}}null{{else}}alice.agentPubKey{{/if}}
{{#if (eq collection_type.type "ByAuthor")}}alice.agentPubKey{{/if}},
});
assert.equal(collectionOutput.length, 0);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default defineComponent({
{{/if}}
await this.fetch{{pascal_case referenceable.name}}();
toRaw(this.client).on('signal', signal => {
toRaw(this.client)?.on('signal', signal => {
if (!(SignalType.App in signal)) return;
if (signal.App.zome_name !== '{{coordinator_zome_manifest.name}}') return;
const payload = signal.App.payload as {{pascal_case coordinator_zome_manifest.name}}Signal;
Expand All @@ -69,7 +69,7 @@ export default defineComponent({
role_name: '{{dna_role_name}}',
zome_name: '{{snake_case coordinator_zome_manifest.name}}',
fn_name: 'get_{{snake_case collection_name}}',
payload: {{#if (eq collection_type.type "ByAuthor")}}this.author{{else}}null{{/if}},
{{#if (eq collection_type.type "ByAuthor")}}payload: this.author{{/if}},
});
this.hashes = links.map(l => l.target);
} catch (e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default defineComponent({
await this.fetch{{pascal_case (plural ../entry_type.name)}}();
toRaw(this.client).on('signal', async signal => {
toRaw(this.client)?.on('signal', async signal => {
if (!(SignalType.App in signal)) return;
if (signal.App.zome_name !== '{{../coordinator_zome_manifest.name}}') return;
const payload = signal.App.payload as {{pascal_case ../coordinator_zome_manifest.name}}Signal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default defineComponent({
this.loading = false;
}
toRaw(this.client).on('signal', signal => {
toRaw(this.client)?.on('signal', signal => {
if (!(SignalType.App in signal)) return;
if (signal.App.zome_name !== '{{coordinator_zome_manifest.name}}') return;
const payload = signal.App.payload as {{pascal_case coordinator_zome_manifest.name}}Signal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default defineComponent({
}
this.loading = false;
toRaw(this.client).on('signal', signal => {
toRaw(this.client)?.on('signal', signal => {
if (!(SignalType.App in signal)) return;
if (signal.App.zome_name !== '{{coordinator_zome_manifest.name}}') return;
const payload = signal.App.payload as {{pascal_case coordinator_zome_manifest.name}}Signal;
Expand Down

0 comments on commit 9d54ae7

Please sign in to comment.