From 0eb4d3b8ec0e164f6ca5397fdb0a53983992316c Mon Sep 17 00:00:00 2001 From: Collins Muriuki Date: Thu, 21 Nov 2024 18:02:58 +0300 Subject: [PATCH 1/3] Remove cap_secret param from callZome api call --- .../{{kebab_case collection_name}}.ts.hbs | 1 - .../create-{{kebab_case entry_type.name}}.ts.hbs | 1 - ... linked_from.name}}.ts{{\302\241if}}{{\302\241each}}.hbs" | 1 - ...edit-{{kebab_case entry_type.name}}.ts{{\302\241if}}.hbs" | 1 - .../{{kebab_case entry_type.name}}-detail.ts.hbs | 2 -- ...{kebab_case to_referenceable.name}}.ts{{\302\241if}}.hbs" | 1 - ...ebab_case from_referenceable.name}}.ts{{\302\241if}}.hbs" | 1 - .../{{pascal_case collection_name}}.tsx.hbs | 1 - .../Create{{pascal_case entry_type.name}}.tsx.hbs | 5 ++--- ...linked_from.name}}.tsx{{\302\241if}}{{\302\241each}}.hbs" | 1 - ...dit{{pascal_case entry_type.name}}.tsx{{\302\241if}}.hbs" | 3 +-- .../{{pascal_case entry_type.name}}Detail.tsx.hbs | 2 -- ...ascal_case to_referenceable.name}}.tsx{{\302\241if}}.hbs" | 1 - ...cal_case from_referenceable.name}}.tsx{{\302\241if}}.hbs" | 1 - .../{{pascal_case collection_name}}.svelte.hbs | 1 - .../Create{{pascal_case entry_type.name}}.svelte.hbs | 1 - ...ked_from.name}}.svelte{{\302\241if}}{{\302\241each}}.hbs" | 1 - ...{{pascal_case entry_type.name}}.svelte{{\302\241if}}.hbs" | 1 - .../{{pascal_case entry_type.name}}Detail.svelte.hbs | 2 -- ...al_case to_referenceable.name}}.svelte{{\302\241if}}.hbs" | 1 - ..._case from_referenceable.name}}.svelte{{\302\241if}}.hbs" | 1 - templates/ui-frameworks/vanilla/example/ui/index.html.hbs | 4 +--- .../{{pascal_case collection_name}}.vue.hbs | 1 - .../Create{{pascal_case entry_type.name}}.vue.hbs | 1 - ...linked_from.name}}.vue{{\302\241if}}{{\302\241each}}.hbs" | 1 - ...dit{{pascal_case entry_type.name}}.vue{{\302\241if}}.hbs" | 1 - .../{{pascal_case entry_type.name}}Detail.vue.hbs | 2 -- ...ascal_case to_referenceable.name}}.vue{{\302\241if}}.hbs" | 1 - ...cal_case from_referenceable.name}}.vue{{\302\241if}}.hbs" | 1 - 29 files changed, 4 insertions(+), 38 deletions(-) diff --git a/templates/ui-frameworks/lit/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{kebab_case collection_name}}.ts.hbs b/templates/ui-frameworks/lit/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{kebab_case collection_name}}.ts.hbs index 5c052c13a..7342237e6 100644 --- a/templates/ui-frameworks/lit/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{kebab_case collection_name}}.ts.hbs +++ b/templates/ui-frameworks/lit/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{kebab_case collection_name}}.ts.hbs @@ -26,7 +26,6 @@ export class {{pascal_case collection_name}} extends LitElement { signaledHashes: Array<{{referenceable.hash_type}}> = []; _fetch{{pascal_case (plural referenceable.name)}} = new Task(this, ([{{#if (eq collection_type.type "ByAuthor")}}author{{/if}}]: any) => this.client.callZome({ - cap_secret: null, role_name: '{{dna_role_name}}', zome_name: '{{coordinator_zome_manifest.name}}', fn_name: 'get_{{snake_case collection_name}}', diff --git a/templates/ui-frameworks/lit/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/create-{{kebab_case entry_type.name}}.ts.hbs b/templates/ui-frameworks/lit/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/create-{{kebab_case entry_type.name}}.ts.hbs index 7ef1c70b7..e67f5c112 100644 --- a/templates/ui-frameworks/lit/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/create-{{kebab_case entry_type.name}}.ts.hbs +++ b/templates/ui-frameworks/lit/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/create-{{kebab_case entry_type.name}}.ts.hbs @@ -81,7 +81,6 @@ export class Create{{pascal_case entry_type.name}} extends LitElement { try { const record: Record = await this.client.callZome({ - cap_secret: null, role_name: '{{dna_role_name}}', zome_name: '{{coordinator_zome_manifest.name}}', fn_name: 'create_{{snake_case entry_type.name}}', diff --git "a/templates/ui-frameworks/lit/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#each entry_type.fields}}{{#if (and linked_from (not (eq linked_from.hash_type 'AgentPubKey') ) )}}{{kebab_case (plural ..\302\241entry_type.name)}}-for-{{kebab_case linked_from.name}}.ts{{\302\241if}}{{\302\241each}}.hbs" "b/templates/ui-frameworks/lit/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#each entry_type.fields}}{{#if (and linked_from (not (eq linked_from.hash_type 'AgentPubKey') ) )}}{{kebab_case (plural ..\302\241entry_type.name)}}-for-{{kebab_case linked_from.name}}.ts{{\302\241if}}{{\302\241each}}.hbs" index e0413636d..4ad4b80cd 100644 --- "a/templates/ui-frameworks/lit/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#each entry_type.fields}}{{#if (and linked_from (not (eq linked_from.hash_type 'AgentPubKey') ) )}}{{kebab_case (plural ..\302\241entry_type.name)}}-for-{{kebab_case linked_from.name}}.ts{{\302\241if}}{{\302\241each}}.hbs" +++ "b/templates/ui-frameworks/lit/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#each entry_type.fields}}{{#if (and linked_from (not (eq linked_from.hash_type 'AgentPubKey') ) )}}{{kebab_case (plural ..\302\241entry_type.name)}}-for-{{kebab_case linked_from.name}}.ts{{\302\241if}}{{\302\241each}}.hbs" @@ -24,7 +24,6 @@ export class {{pascal_case (plural ../entry_type.name)}}For{{pascal_case linked_ hashes: Array = []; _fetch{{pascal_case (plural ../entry_type.name)}} = new Task(this, ([{{camel_case linked_from.singular_arg}}]: Array<{{linked_from.hash_type}}>) => this.client.callZome({ - cap_secret: null, role_name: '{{../dna_role_name}}', zome_name: '{{../coordinator_zome_manifest.name}}', fn_name: 'get_{{snake_case (plural ../entry_type.name)}}_for_{{snake_case linked_from.name}}', diff --git "a/templates/ui-frameworks/lit/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if crud.update}}edit-{{kebab_case entry_type.name}}.ts{{\302\241if}}.hbs" "b/templates/ui-frameworks/lit/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if crud.update}}edit-{{kebab_case entry_type.name}}.ts{{\302\241if}}.hbs" index e36cc741a..68abfda88 100644 --- "a/templates/ui-frameworks/lit/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if crud.update}}edit-{{kebab_case entry_type.name}}.ts{{\302\241if}}.hbs" +++ "b/templates/ui-frameworks/lit/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if crud.update}}edit-{{kebab_case entry_type.name}}.ts{{\302\241if}}.hbs" @@ -94,7 +94,6 @@ export class Edit{{pascal_case entry_type.name}} extends LitElement { try { const updateRecord: Record = await this.client.callZome({ - cap_secret: null, role_name: '{{dna_role_name}}', zome_name: '{{coordinator_zome_manifest.name}}', fn_name: 'update_{{snake_case entry_type.name}}', diff --git a/templates/ui-frameworks/lit/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{kebab_case entry_type.name}}-detail.ts.hbs b/templates/ui-frameworks/lit/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{kebab_case entry_type.name}}-detail.ts.hbs index 53ae8a7d0..a60e2a680 100644 --- a/templates/ui-frameworks/lit/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{kebab_case entry_type.name}}-detail.ts.hbs +++ b/templates/ui-frameworks/lit/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{kebab_case entry_type.name}}-detail.ts.hbs @@ -32,7 +32,6 @@ export class {{pascal_case entry_type.name}}Detail extends LitElement { {{camel_case entry_type.name}}Hash!: {{#if entry_type.reference_entry_hash}}EntryHash{{else}}ActionHash{{/if}}; _fetchRecord = new Task(this, ([{{camel_case entry_type.name}}Hash]: Array<{{#if entry_type.reference_entry_hash}}EntryHash{{else}}ActionHash{{/if}}>) => this.client.callZome({ - cap_secret: null, role_name: '{{dna_role_name}}', zome_name: '{{coordinator_zome_manifest.name}}', fn_name: '{{#if crud.update}}get_latest_{{snake_case entry_type.name}}{{else}}get_{{snake_case entry_type.name}}{{/if}}', @@ -53,7 +52,6 @@ export class {{pascal_case entry_type.name}}Detail extends LitElement { async delete{{pascal_case entry_type.name}}() { try { await this.client.callZome({ - cap_secret: null, role_name: '{{dna_role_name}}', zome_name: '{{coordinator_zome_manifest.name}}', fn_name: 'delete_{{snake_case entry_type.name}}', diff --git "a/templates/ui-frameworks/lit/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and bidireccional (and to_referenceable (ne from_referenceable.hash_type 'AgentPubKey')))}}{{kebab_case (plural from_referenceable.name)}}-for-{{kebab_case to_referenceable.name}}.ts{{\302\241if}}.hbs" "b/templates/ui-frameworks/lit/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and bidireccional (and to_referenceable (ne from_referenceable.hash_type 'AgentPubKey')))}}{{kebab_case (plural from_referenceable.name)}}-for-{{kebab_case to_referenceable.name}}.ts{{\302\241if}}.hbs" index 6196a6c49..042e0ff57 100644 --- "a/templates/ui-frameworks/lit/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and bidireccional (and to_referenceable (ne from_referenceable.hash_type 'AgentPubKey')))}}{{kebab_case (plural from_referenceable.name)}}-for-{{kebab_case to_referenceable.name}}.ts{{\302\241if}}.hbs" +++ "b/templates/ui-frameworks/lit/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and bidireccional (and to_referenceable (ne from_referenceable.hash_type 'AgentPubKey')))}}{{kebab_case (plural from_referenceable.name)}}-for-{{kebab_case to_referenceable.name}}.ts{{\302\241if}}.hbs" @@ -21,7 +21,6 @@ export class {{pascal_case (plural from_referenceable.name)}}For{{pascal_case to {{camel_case to_referenceable.singular_arg}}!: {{to_referenceable.hash_type}}; _fetch{{pascal_case (plural from_referenceable.name)}} = new Task(this, ([{{camel_case to_referenceable.singular_arg}}]: Array<{{to_referenceable.hash_type}}>) => this.client.callZome({ - cap_secret: null, role_name: '{{dna_role_name}}', zome_name: '{{coordinator_zome_manifest.name}}', fn_name: 'get_{{snake_case (plural from_referenceable.name)}}_for_{{snake_case to_referenceable.name}}', diff --git "a/templates/ui-frameworks/lit/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and to_referenceable (ne to_referenceable.hash_type 'AgentPubKey'))}}{{kebab_case (plural to_referenceable.name)}}-for-{{kebab_case from_referenceable.name}}.ts{{\302\241if}}.hbs" "b/templates/ui-frameworks/lit/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and to_referenceable (ne to_referenceable.hash_type 'AgentPubKey'))}}{{kebab_case (plural to_referenceable.name)}}-for-{{kebab_case from_referenceable.name}}.ts{{\302\241if}}.hbs" index e068a7944..35fa4bd5d 100644 --- "a/templates/ui-frameworks/lit/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and to_referenceable (ne to_referenceable.hash_type 'AgentPubKey'))}}{{kebab_case (plural to_referenceable.name)}}-for-{{kebab_case from_referenceable.name}}.ts{{\302\241if}}.hbs" +++ "b/templates/ui-frameworks/lit/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and to_referenceable (ne to_referenceable.hash_type 'AgentPubKey'))}}{{kebab_case (plural to_referenceable.name)}}-for-{{kebab_case from_referenceable.name}}.ts{{\302\241if}}.hbs" @@ -24,7 +24,6 @@ export class {{pascal_case (plural to_referenceable.name)}}For{{pascal_case from signaledHashes: Array<{{to_referenceable.hash_type}}> = []; _fetch{{pascal_case (plural to_referenceable.name)}} = new Task(this, ([{{camel_case from_referenceable.singular_arg}}]: Array<{{from_referenceable.hash_type}}>) => this.client.callZome({ - cap_secret: null, role_name: '{{dna_role_name}}', zome_name: '{{coordinator_zome_manifest.name}}', fn_name: 'get_{{snake_case (plural to_referenceable.name)}}_for_{{snake_case from_referenceable.name}}', diff --git a/templates/ui-frameworks/react/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case collection_name}}.tsx.hbs b/templates/ui-frameworks/react/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case collection_name}}.tsx.hbs index 933a4b10b..2a679e082 100644 --- a/templates/ui-frameworks/react/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case collection_name}}.tsx.hbs +++ b/templates/ui-frameworks/react/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case collection_name}}.tsx.hbs @@ -15,7 +15,6 @@ const {{pascal_case collection_name}}: FC{{#if (eq collection_type.type "ByAutho setLoading(true) try { const links: Link[] = await client?.callZome({ - cap_secret: null, role_name: '{{dna_role_name}}', zome_name: '{{snake_case coordinator_zome_manifest.name}}', fn_name: 'get_{{snake_case collection_name}}', diff --git a/templates/ui-frameworks/react/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/Create{{pascal_case entry_type.name}}.tsx.hbs b/templates/ui-frameworks/react/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/Create{{pascal_case entry_type.name}}.tsx.hbs index 3b5e80733..7f2a9a96f 100644 --- a/templates/ui-frameworks/react/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/Create{{pascal_case entry_type.name}}.tsx.hbs +++ b/templates/ui-frameworks/react/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/Create{{pascal_case entry_type.name}}.tsx.hbs @@ -26,14 +26,13 @@ const Create{{pascal_case entry_type.name}}: FC { - const {{camel_case entry_type.name}}Entry: {{pascal_case entry_type.name}} = { + const {{camel_case entry_type.name}}Entry: {{pascal_case entry_type.name}} = { {{#each entry_type.fields}} {{snake_case field_name}}: {{camel_case field_name}}{{#if (eq cardinality "single")}}!{{/if}}, {{/each}} }; try { const record = await client?.callZome({ - cap_secret: null, role_name: '{{dna_role_name}}', zome_name: '{{coordinator_zome_manifest.name}}', fn_name: 'create_{{snake_case entry_type.name}}', @@ -84,4 +83,4 @@ interface Create{{pascal_case entry_type.name}}Props { {{/each}} } -export default Create{{pascal_case entry_type.name}}; +export default Create{{pascal_case entry_type.name}}; \ No newline at end of file diff --git "a/templates/ui-frameworks/react/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#each entry_type.fields}}{{#if (and linked_from (not (eq linked_from.hash_type 'AgentPubKey') ) )}}{{pascal_case (plural ..\302\241entry_type.name)}}For{{pascal_case linked_from.name}}.tsx{{\302\241if}}{{\302\241each}}.hbs" "b/templates/ui-frameworks/react/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#each entry_type.fields}}{{#if (and linked_from (not (eq linked_from.hash_type 'AgentPubKey') ) )}}{{pascal_case (plural ..\302\241entry_type.name)}}For{{pascal_case linked_from.name}}.tsx{{\302\241if}}{{\302\241each}}.hbs" index 996018ea0..9b35cbe38 100644 --- "a/templates/ui-frameworks/react/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#each entry_type.fields}}{{#if (and linked_from (not (eq linked_from.hash_type 'AgentPubKey') ) )}}{{pascal_case (plural ..\302\241entry_type.name)}}For{{pascal_case linked_from.name}}.tsx{{\302\241if}}{{\302\241each}}.hbs" +++ "b/templates/ui-frameworks/react/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#each entry_type.fields}}{{#if (and linked_from (not (eq linked_from.hash_type 'AgentPubKey') ) )}}{{pascal_case (plural ..\302\241entry_type.name)}}For{{pascal_case linked_from.name}}.tsx{{\302\241if}}{{\302\241each}}.hbs" @@ -15,7 +15,6 @@ const {{pascal_case (plural ../entry_type.name)}}For{{pascal_case linked_from.na setLoading(true) try { const links: Link[] = await client?.callZome({ - cap_secret: null, role_name: '{{../dna_role_name}}', zome_name: '{{../coordinator_zome_manifest.name}}', fn_name: 'get_{{snake_case (plural ../entry_type.name)}}_for_{{snake_case linked_from.name}}', diff --git "a/templates/ui-frameworks/react/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if crud.update}}Edit{{pascal_case entry_type.name}}.tsx{{\302\241if}}.hbs" "b/templates/ui-frameworks/react/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if crud.update}}Edit{{pascal_case entry_type.name}}.tsx{{\302\241if}}.hbs" index 402526321..014c47a18 100644 --- "a/templates/ui-frameworks/react/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if crud.update}}Edit{{pascal_case entry_type.name}}.tsx{{\302\241if}}.hbs" +++ "b/templates/ui-frameworks/react/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if crud.update}}Edit{{pascal_case entry_type.name}}.tsx{{\302\241if}}.hbs" @@ -54,7 +54,6 @@ const Edit{{pascal_case entry_type.name}}: FC void, } -export default Edit{{pascal_case entry_type.name}}; +export default Edit{{pascal_case entry_type.name}}; \ No newline at end of file diff --git a/templates/ui-frameworks/react/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case entry_type.name}}Detail.tsx.hbs b/templates/ui-frameworks/react/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case entry_type.name}}Detail.tsx.hbs index 7ec543ae6..ad632cdde 100644 --- a/templates/ui-frameworks/react/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case entry_type.name}}Detail.tsx.hbs +++ b/templates/ui-frameworks/react/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case entry_type.name}}Detail.tsx.hbs @@ -30,7 +30,6 @@ const {{pascal_case entry_type.name}}Detail: FC<{{pascal_case entry_type.name}}D setRecord(undefined); try { const result = await client?.callZome({ - cap_secret: null, role_name: '{{dna_role_name}}', zome_name: '{{coordinator_zome_manifest.name}}', fn_name: '{{#if crud.update}}get_latest_{{snake_case entry_type.name}}{{else}}get_{{snake_case entry_type.name}}{{/if}}', @@ -50,7 +49,6 @@ const {{pascal_case entry_type.name}}Detail: FC<{{pascal_case entry_type.name}}D setLoading(true) try { await client?.callZome({ - cap_secret: null, role_name: '{{dna_role_name}}', zome_name: '{{coordinator_zome_manifest.name}}', fn_name: 'delete_{{snake_case entry_type.name}}', diff --git "a/templates/ui-frameworks/react/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and bidireccional (and to_referenceable (ne from_referenceable.hash_type 'AgentPubKey')))}}{{pascal_case (plural from_referenceable.name)}}For{{pascal_case to_referenceable.name}}.tsx{{\302\241if}}.hbs" "b/templates/ui-frameworks/react/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and bidireccional (and to_referenceable (ne from_referenceable.hash_type 'AgentPubKey')))}}{{pascal_case (plural from_referenceable.name)}}For{{pascal_case to_referenceable.name}}.tsx{{\302\241if}}.hbs" index a9f4c3a3b..67b304c20 100644 --- "a/templates/ui-frameworks/react/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and bidireccional (and to_referenceable (ne from_referenceable.hash_type 'AgentPubKey')))}}{{pascal_case (plural from_referenceable.name)}}For{{pascal_case to_referenceable.name}}.tsx{{\302\241if}}.hbs" +++ "b/templates/ui-frameworks/react/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and bidireccional (and to_referenceable (ne from_referenceable.hash_type 'AgentPubKey')))}}{{pascal_case (plural from_referenceable.name)}}For{{pascal_case to_referenceable.name}}.tsx{{\302\241if}}.hbs" @@ -15,7 +15,6 @@ const {{pascal_case (plural from_referenceable.name)}}For{{pascal_case to_refere setLoading(true) try { const links: Link[] = await client?.callZome({ - cap_secret: null, role_name: '{{dna_role_name}}', zome_name: '{{snake_case coordinator_zome_manifest.name}}', fn_name: 'get_{{snake_case (plural from_referenceable.name)}}_for_{{snake_case to_referenceable.name}}', diff --git "a/templates/ui-frameworks/react/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and to_referenceable (ne to_referenceable.hash_type 'AgentPubKey'))}}{{pascal_case (plural to_referenceable.name)}}For{{pascal_case from_referenceable.name}}.tsx{{\302\241if}}.hbs" "b/templates/ui-frameworks/react/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and to_referenceable (ne to_referenceable.hash_type 'AgentPubKey'))}}{{pascal_case (plural to_referenceable.name)}}For{{pascal_case from_referenceable.name}}.tsx{{\302\241if}}.hbs" index 8bdac84fc..44053df32 100644 --- "a/templates/ui-frameworks/react/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and to_referenceable (ne to_referenceable.hash_type 'AgentPubKey'))}}{{pascal_case (plural to_referenceable.name)}}For{{pascal_case from_referenceable.name}}.tsx{{\302\241if}}.hbs" +++ "b/templates/ui-frameworks/react/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and to_referenceable (ne to_referenceable.hash_type 'AgentPubKey'))}}{{pascal_case (plural to_referenceable.name)}}For{{pascal_case from_referenceable.name}}.tsx{{\302\241if}}.hbs" @@ -15,7 +15,6 @@ const {{pascal_case (plural to_referenceable.name)}}For{{pascal_case from_refere setLoading(true) try { const links: Link[] = await client?.callZome({ - cap_secret: null, role_name: '{{dna_role_name}}', zome_name: '{{coordinator_zome_manifest.name}}', fn_name: 'get_{{snake_case (plural to_referenceable.name)}}_for_{{snake_case from_referenceable.name}}', diff --git a/templates/ui-frameworks/svelte/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case collection_name}}.svelte.hbs b/templates/ui-frameworks/svelte/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case collection_name}}.svelte.hbs index 13407c803..14db899b8 100644 --- a/templates/ui-frameworks/svelte/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case collection_name}}.svelte.hbs +++ b/templates/ui-frameworks/svelte/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case collection_name}}.svelte.hbs @@ -50,7 +50,6 @@ async function fetch{{pascal_case (plural referenceable.name)}}() { loading = true; try { const links: Array = await client.callZome({ - cap_secret: null, role_name: '{{dna_role_name}}', zome_name: '{{snake_case coordinator_zome_manifest.name}}', fn_name: 'get_{{snake_case collection_name}}', diff --git a/templates/ui-frameworks/svelte/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/Create{{pascal_case entry_type.name}}.svelte.hbs b/templates/ui-frameworks/svelte/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/Create{{pascal_case entry_type.name}}.svelte.hbs index cd1c9eae6..65a4139e3 100644 --- a/templates/ui-frameworks/svelte/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/Create{{pascal_case entry_type.name}}.svelte.hbs +++ b/templates/ui-frameworks/svelte/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/Create{{pascal_case entry_type.name}}.svelte.hbs @@ -59,7 +59,6 @@ async function create{{pascal_case entry_type.name}}() { try { const record: Record = await client.callZome({ - cap_secret: null, role_name: '{{dna_role_name}}', zome_name: '{{coordinator_zome_manifest.name}}', fn_name: 'create_{{snake_case entry_type.name}}', diff --git "a/templates/ui-frameworks/svelte/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#each entry_type.fields}}{{#if (and linked_from (not (eq linked_from.hash_type 'AgentPubKey') ) )}}{{pascal_case (plural ..\302\241entry_type.name)}}For{{pascal_case linked_from.name}}.svelte{{\302\241if}}{{\302\241each}}.hbs" "b/templates/ui-frameworks/svelte/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#each entry_type.fields}}{{#if (and linked_from (not (eq linked_from.hash_type 'AgentPubKey') ) )}}{{pascal_case (plural ..\302\241entry_type.name)}}For{{pascal_case linked_from.name}}.svelte{{\302\241if}}{{\302\241each}}.hbs" index 8a7c3904f..0dad893ca 100644 --- "a/templates/ui-frameworks/svelte/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#each entry_type.fields}}{{#if (and linked_from (not (eq linked_from.hash_type 'AgentPubKey') ) )}}{{pascal_case (plural ..\302\241entry_type.name)}}For{{pascal_case linked_from.name}}.svelte{{\302\241if}}{{\302\241each}}.hbs" +++ "b/templates/ui-frameworks/svelte/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#each entry_type.fields}}{{#if (and linked_from (not (eq linked_from.hash_type 'AgentPubKey') ) )}}{{pascal_case (plural ..\302\241entry_type.name)}}For{{pascal_case linked_from.name}}.svelte{{\302\241if}}{{\302\241each}}.hbs" @@ -46,7 +46,6 @@ async function fetch{{pascal_case (plural ../entry_type.name)}}() { loading = true; try { const links: Array = await client.callZome({ - cap_secret: null, role_name: '{{../dna_role_name}}', zome_name: '{{../coordinator_zome_manifest.name}}', fn_name: 'get_{{snake_case (plural ../entry_type.name)}}_for_{{snake_case linked_from.name}}', diff --git "a/templates/ui-frameworks/svelte/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if crud.update}}Edit{{pascal_case entry_type.name}}.svelte{{\302\241if}}.hbs" "b/templates/ui-frameworks/svelte/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if crud.update}}Edit{{pascal_case entry_type.name}}.svelte{{\302\241if}}.hbs" index c45ce5ee3..3847f571a 100644 --- "a/templates/ui-frameworks/svelte/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if crud.update}}Edit{{pascal_case entry_type.name}}.svelte{{\302\241if}}.hbs" +++ "b/templates/ui-frameworks/svelte/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if crud.update}}Edit{{pascal_case entry_type.name}}.svelte{{\302\241if}}.hbs" @@ -66,7 +66,6 @@ async function update{{pascal_case entry_type.name}}() { try { const updateRecord: Record = await client.callZome({ - cap_secret: null, role_name: '{{dna_role_name}}', zome_name: '{{coordinator_zome_manifest.name}}', fn_name: 'update_{{snake_case entry_type.name}}', diff --git a/templates/ui-frameworks/svelte/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case entry_type.name}}Detail.svelte.hbs b/templates/ui-frameworks/svelte/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case entry_type.name}}Detail.svelte.hbs index 90ecc97f5..afb8443ea 100644 --- a/templates/ui-frameworks/svelte/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case entry_type.name}}Detail.svelte.hbs +++ b/templates/ui-frameworks/svelte/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case entry_type.name}}Detail.svelte.hbs @@ -42,7 +42,6 @@ async function fetch{{pascal_case entry_type.name}}() { loading = true; try { record = await client.callZome({ - cap_secret: null, role_name: '{{dna_role_name}}', zome_name: '{{coordinator_zome_manifest.name}}', fn_name: '{{#if crud.update}}get_latest_{{snake_case entry_type.name}}{{else}}get_{{snake_case entry_type.name}}{{/if}}', @@ -62,7 +61,6 @@ async function fetch{{pascal_case entry_type.name}}() { async function delete{{pascal_case entry_type.name}}() { try { await client.callZome({ - cap_secret: null, role_name: '{{dna_role_name}}', zome_name: '{{coordinator_zome_manifest.name}}', fn_name: 'delete_{{snake_case entry_type.name}}', diff --git "a/templates/ui-frameworks/svelte/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and bidireccional (and to_referenceable (ne from_referenceable.hash_type 'AgentPubKey')))}}{{pascal_case (plural from_referenceable.name)}}For{{pascal_case to_referenceable.name}}.svelte{{\302\241if}}.hbs" "b/templates/ui-frameworks/svelte/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and bidireccional (and to_referenceable (ne from_referenceable.hash_type 'AgentPubKey')))}}{{pascal_case (plural from_referenceable.name)}}For{{pascal_case to_referenceable.name}}.svelte{{\302\241if}}.hbs" index 91b48468b..9aa119cc3 100644 --- "a/templates/ui-frameworks/svelte/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and bidireccional (and to_referenceable (ne from_referenceable.hash_type 'AgentPubKey')))}}{{pascal_case (plural from_referenceable.name)}}For{{pascal_case to_referenceable.name}}.svelte{{\302\241if}}.hbs" +++ "b/templates/ui-frameworks/svelte/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and bidireccional (and to_referenceable (ne from_referenceable.hash_type 'AgentPubKey')))}}{{pascal_case (plural from_referenceable.name)}}For{{pascal_case to_referenceable.name}}.svelte{{\302\241if}}.hbs" @@ -33,7 +33,6 @@ onMount(async () => { try { loading = true; const links: Array = await client.callZome({ - cap_secret: null, role_name: '{{dna_role_name}}', zome_name: '{{snake_case coordinator_zome_manifest.name}}', fn_name: 'get_{{snake_case (plural from_referenceable.name)}}_for_{{snake_case to_referenceable.name}}', diff --git "a/templates/ui-frameworks/svelte/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and to_referenceable (ne to_referenceable.hash_type 'AgentPubKey'))}}{{pascal_case (plural to_referenceable.name)}}For{{pascal_case from_referenceable.name}}.svelte{{\302\241if}}.hbs" "b/templates/ui-frameworks/svelte/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and to_referenceable (ne to_referenceable.hash_type 'AgentPubKey'))}}{{pascal_case (plural to_referenceable.name)}}For{{pascal_case from_referenceable.name}}.svelte{{\302\241if}}.hbs" index 4d6603fff..f7ae2c163 100644 --- "a/templates/ui-frameworks/svelte/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and to_referenceable (ne to_referenceable.hash_type 'AgentPubKey'))}}{{pascal_case (plural to_referenceable.name)}}For{{pascal_case from_referenceable.name}}.svelte{{\302\241if}}.hbs" +++ "b/templates/ui-frameworks/svelte/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and to_referenceable (ne to_referenceable.hash_type 'AgentPubKey'))}}{{pascal_case (plural to_referenceable.name)}}For{{pascal_case from_referenceable.name}}.svelte{{\302\241if}}.hbs" @@ -33,7 +33,6 @@ onMount(async () => { try { loading = true; const links: Array = await client.callZome({ - cap_secret: null, role_name: '{{dna_role_name}}', zome_name: '{{coordinator_zome_manifest.name}}', fn_name: 'get_{{snake_case (plural to_referenceable.name)}}_for_{{snake_case from_referenceable.name}}', diff --git a/templates/ui-frameworks/vanilla/example/ui/index.html.hbs b/templates/ui-frameworks/vanilla/example/ui/index.html.hbs index 77a3b7299..b3b26d1ae 100644 --- a/templates/ui-frameworks/vanilla/example/ui/index.html.hbs +++ b/templates/ui-frameworks/vanilla/example/ui/index.html.hbs @@ -56,7 +56,6 @@ const hellos = ["hello world","hola mundo","bonjur monde","guten Tag Welt","salve mondo","你好世界","مرحبا بالعالم","こんにちは 世界","olá mundo","Привет, мир","Selam Dünya","Witaj świecie"]; const message = hellos[getRandomInt(hellos.length)]; const result = await client.callZome({ - cap_secret: null, role_name: 'hello_world', zome_name: 'hello_world', fn_name: 'hello_world', @@ -66,7 +65,6 @@ async function getHellos() { const result = await client.callZome({ - cap_secret: null, role_name: 'hello_world', zome_name: 'hello_world', fn_name: 'get_hellos', @@ -98,4 +96,4 @@ - + \ No newline at end of file diff --git a/templates/ui-frameworks/vue/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case collection_name}}.vue.hbs b/templates/ui-frameworks/vue/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case collection_name}}.vue.hbs index 98ee2ad69..b4fe6ca36 100644 --- a/templates/ui-frameworks/vue/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case collection_name}}.vue.hbs +++ b/templates/ui-frameworks/vue/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case collection_name}}.vue.hbs @@ -66,7 +66,6 @@ export default defineComponent({ try { this.loading = true; const links: Array = await this.client.callZome({ - cap_secret: null, role_name: '{{dna_role_name}}', zome_name: '{{snake_case coordinator_zome_manifest.name}}', fn_name: 'get_{{snake_case collection_name}}', diff --git a/templates/ui-frameworks/vue/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/Create{{pascal_case entry_type.name}}.vue.hbs b/templates/ui-frameworks/vue/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/Create{{pascal_case entry_type.name}}.vue.hbs index fd09891c3..fb55d6321 100644 --- a/templates/ui-frameworks/vue/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/Create{{pascal_case entry_type.name}}.vue.hbs +++ b/templates/ui-frameworks/vue/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/Create{{pascal_case entry_type.name}}.vue.hbs @@ -109,7 +109,6 @@ export default defineComponent({ try { const record: Record = await this.client.callZome({ - cap_secret: null, role_name: '{{dna_role_name}}', zome_name: '{{coordinator_zome_manifest.name}}', fn_name: 'create_{{snake_case entry_type.name}}', diff --git "a/templates/ui-frameworks/vue/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#each entry_type.fields}}{{#if (and linked_from (not (eq linked_from.hash_type 'AgentPubKey') ) )}}{{pascal_case (plural ..\302\241entry_type.name)}}For{{pascal_case linked_from.name}}.vue{{\302\241if}}{{\302\241each}}.hbs" "b/templates/ui-frameworks/vue/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#each entry_type.fields}}{{#if (and linked_from (not (eq linked_from.hash_type 'AgentPubKey') ) )}}{{pascal_case (plural ..\302\241entry_type.name)}}For{{pascal_case linked_from.name}}.vue{{\302\241if}}{{\302\241each}}.hbs" index 266242163..48383907f 100644 --- "a/templates/ui-frameworks/vue/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#each entry_type.fields}}{{#if (and linked_from (not (eq linked_from.hash_type 'AgentPubKey') ) )}}{{pascal_case (plural ..\302\241entry_type.name)}}For{{pascal_case linked_from.name}}.vue{{\302\241if}}{{\302\241each}}.hbs" +++ "b/templates/ui-frameworks/vue/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#each entry_type.fields}}{{#if (and linked_from (not (eq linked_from.hash_type 'AgentPubKey') ) )}}{{pascal_case (plural ..\302\241entry_type.name)}}For{{pascal_case linked_from.name}}.vue{{\302\241if}}{{\302\241each}}.hbs" @@ -57,7 +57,6 @@ export default defineComponent({ this.loading = true; try { const links: Array = await this.client.callZome({ - cap_secret: null, role_name: '{{../dna_role_name}}', zome_name: '{{../coordinator_zome_manifest.name}}', fn_name: 'get_{{snake_case (plural ../entry_type.name)}}_for_{{snake_case linked_from.name}}', diff --git "a/templates/ui-frameworks/vue/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if crud.update}}Edit{{pascal_case entry_type.name}}.vue{{\302\241if}}.hbs" "b/templates/ui-frameworks/vue/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if crud.update}}Edit{{pascal_case entry_type.name}}.vue{{\302\241if}}.hbs" index cca770035..fcef045ee 100644 --- "a/templates/ui-frameworks/vue/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if crud.update}}Edit{{pascal_case entry_type.name}}.vue{{\302\241if}}.hbs" +++ "b/templates/ui-frameworks/vue/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if crud.update}}Edit{{pascal_case entry_type.name}}.vue{{\302\241if}}.hbs" @@ -105,7 +105,6 @@ export default defineComponent({ try { const updateRecord: Record = await this.client.callZome({ - cap_secret: null, role_name: '{{dna_role_name}}', zome_name: '{{coordinator_zome_manifest.name}}', fn_name: 'update_{{snake_case entry_type.name}}', diff --git a/templates/ui-frameworks/vue/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case entry_type.name}}Detail.vue.hbs b/templates/ui-frameworks/vue/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case entry_type.name}}Detail.vue.hbs index 375337bd1..1e46190dc 100644 --- a/templates/ui-frameworks/vue/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case entry_type.name}}Detail.vue.hbs +++ b/templates/ui-frameworks/vue/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case entry_type.name}}Detail.vue.hbs @@ -104,7 +104,6 @@ export default defineComponent({ try { this.loading = true; this.record = await this.client.callZome({ - cap_secret: null, role_name: '{{dna_role_name}}', zome_name: '{{coordinator_zome_manifest.name}}', fn_name: '{{#if crud.update}}get_latest_{{snake_case entry_type.name}}{{else}}get_{{snake_case entry_type.name}}{{/if}}', @@ -121,7 +120,6 @@ export default defineComponent({ try { this.loading = true await this.client.callZome({ - cap_secret: null, role_name: '{{dna_role_name}}', zome_name: '{{coordinator_zome_manifest.name}}', fn_name: 'delete_{{snake_case entry_type.name}}', diff --git "a/templates/ui-frameworks/vue/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and bidireccional (and to_referenceable (ne from_referenceable.hash_type 'AgentPubKey')))}}{{pascal_case (plural from_referenceable.name)}}For{{pascal_case to_referenceable.name}}.vue{{\302\241if}}.hbs" "b/templates/ui-frameworks/vue/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and bidireccional (and to_referenceable (ne from_referenceable.hash_type 'AgentPubKey')))}}{{pascal_case (plural from_referenceable.name)}}For{{pascal_case to_referenceable.name}}.vue{{\302\241if}}.hbs" index 53600e07b..3bf4d92ec 100644 --- "a/templates/ui-frameworks/vue/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and bidireccional (and to_referenceable (ne from_referenceable.hash_type 'AgentPubKey')))}}{{pascal_case (plural from_referenceable.name)}}For{{pascal_case to_referenceable.name}}.vue{{\302\241if}}.hbs" +++ "b/templates/ui-frameworks/vue/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and bidireccional (and to_referenceable (ne from_referenceable.hash_type 'AgentPubKey')))}}{{pascal_case (plural from_referenceable.name)}}For{{pascal_case to_referenceable.name}}.vue{{\302\241if}}.hbs" @@ -46,7 +46,6 @@ export default defineComponent({ try { this.loading = true; const links: Array = await this.client.callZome({ - cap_secret: null, role_name: '{{dna_role_name}}', zome_name: '{{coordinator_zome_manifest.name}}', fn_name: 'get_{{snake_case (plural from_referenceable.name)}}_for_{{snake_case to_referenceable.name}}', diff --git "a/templates/ui-frameworks/vue/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and to_referenceable (ne to_referenceable.hash_type 'AgentPubKey'))}}{{pascal_case (plural to_referenceable.name)}}For{{pascal_case from_referenceable.name}}.vue{{\302\241if}}.hbs" "b/templates/ui-frameworks/vue/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and to_referenceable (ne to_referenceable.hash_type 'AgentPubKey'))}}{{pascal_case (plural to_referenceable.name)}}For{{pascal_case from_referenceable.name}}.vue{{\302\241if}}.hbs" index e92bd6b88..13e3c5b67 100644 --- "a/templates/ui-frameworks/vue/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and to_referenceable (ne to_referenceable.hash_type 'AgentPubKey'))}}{{pascal_case (plural to_referenceable.name)}}For{{pascal_case from_referenceable.name}}.vue{{\302\241if}}.hbs" +++ "b/templates/ui-frameworks/vue/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and to_referenceable (ne to_referenceable.hash_type 'AgentPubKey'))}}{{pascal_case (plural to_referenceable.name)}}For{{pascal_case from_referenceable.name}}.vue{{\302\241if}}.hbs" @@ -46,7 +46,6 @@ export default defineComponent({ try { this.loading = true; const links: Array = await this.client.callZome({ - cap_secret: null, role_name: '{{dna_role_name}}', zome_name: '{{coordinator_zome_manifest.name}}', fn_name: 'get_{{snake_case (plural to_referenceable.name)}}_for_{{snake_case from_referenceable.name}}', From f7a55592aae1bc838b9b2541b053dde3903351bf Mon Sep 17 00:00:00 2001 From: Collins Muriuki Date: Mon, 25 Nov 2024 17:00:04 +0300 Subject: [PATCH 2/3] Update client version and usage; also fix console errors in vue template --- src/versions.rs | 2 +- .../{{kebab_case collection_name}}.test.ts.hbs | 10 +++++----- .../{{kebab_case collection_name}}.ts.hbs | 2 +- .../{{pascal_case collection_name}}.tsx.hbs | 2 +- .../{{pascal_case collection_name}}.svelte.hbs | 2 +- .../{{kebab_case collection_name}}.test.ts.hbs | 2 +- .../{{pascal_case collection_name}}.vue.hbs | 4 ++-- ..._from.name}}.vue{{\302\241if}}{{\302\241each}}.hbs" | 2 +- ...case to_referenceable.name}}.vue{{\302\241if}}.hbs" | 2 +- ...se from_referenceable.name}}.vue{{\302\241if}}.hbs" | 2 +- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/versions.rs b/src/versions.rs index 45e94fb34..87d0aca42 100644 --- a/src/versions.rs +++ b/src/versions.rs @@ -2,7 +2,7 @@ pub const TRYORAMA_VERSION: &str = "^0.18.0-dev.1"; /// npm: -pub const HOLOCHAIN_CLIENT_VERSION: &str = "^0.19.0-dev.3"; +pub const HOLOCHAIN_CLIENT_VERSION: &str = "^0.19.0-dev.5"; /// npm: pub const HC_SPIN_VERSION: &str = "^0.400.0-dev.3"; diff --git a/templates/generic/collection/tests/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{kebab_case collection_name}}.test.ts.hbs b/templates/generic/collection/tests/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{kebab_case collection_name}}.test.ts.hbs index 7694dcbda..802c3a60c 100644 --- a/templates/generic/collection/tests/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{kebab_case collection_name}}.test.ts.hbs +++ b/templates/generic/collection/tests/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{kebab_case collection_name}}.test.ts.hbs @@ -21,7 +21,7 @@ test('create a {{pascal_case referenceable.name}} and get {{lower_case collectio // This assumes app bundle created by the `hc app pack` command. const testAppPath = process.cwd() + '/../workdir/{{app_name}}.happ'; - // Set up the app to be installed + // Set up the app to be installed const appSource = { appBundleSource: { path: testAppPath } }; // Add 2 players with the test app to the Scenario. The returned players @@ -36,16 +36,16 @@ 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); // Alice creates a {{pascal_case referenceable.name}} const createRecord: Record = await create{{pascal_case referenceable.name}}(alice.cells[0]); assert.ok(createRecord); - + await dhtSync([alice, bob], alice.cells[0].cell_id[0]); - + // Bob gets {{lower_case collection_name}} again collectionOutput = await bob.cells[0].callZome({ zome_name: "{{coordinator_zome_manifest.name}}", @@ -74,4 +74,4 @@ test('create a {{pascal_case referenceable.name}} and get {{lower_case collectio assert.equal(collectionOutput.length, 0); {{/if}} }); -}); +}); \ No newline at end of file diff --git a/templates/ui-frameworks/lit/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{kebab_case collection_name}}.ts.hbs b/templates/ui-frameworks/lit/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{kebab_case collection_name}}.ts.hbs index 7342237e6..3ddb98aea 100644 --- a/templates/ui-frameworks/lit/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{kebab_case collection_name}}.ts.hbs +++ b/templates/ui-frameworks/lit/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{kebab_case collection_name}}.ts.hbs @@ -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>, () => [{{#if (eq collection_type.type "ByAuthor")}}this.author{{/if}}]); firstUpdated() { diff --git a/templates/ui-frameworks/react/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case collection_name}}.tsx.hbs b/templates/ui-frameworks/react/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case collection_name}}.tsx.hbs index 2a679e082..d5d6dbd2e 100644 --- a/templates/ui-frameworks/react/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case collection_name}}.tsx.hbs +++ b/templates/ui-frameworks/react/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case collection_name}}.tsx.hbs @@ -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)); diff --git a/templates/ui-frameworks/svelte/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case collection_name}}.svelte.hbs b/templates/ui-frameworks/svelte/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case collection_name}}.svelte.hbs index 14db899b8..5069f8c28 100644 --- a/templates/ui-frameworks/svelte/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case collection_name}}.svelte.hbs +++ b/templates/ui-frameworks/svelte/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case collection_name}}.svelte.hbs @@ -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); diff --git a/templates/ui-frameworks/vanilla/collection/tests/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{kebab_case collection_name}}.test.ts.hbs b/templates/ui-frameworks/vanilla/collection/tests/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{kebab_case collection_name}}.test.ts.hbs index 3aa9d2511..505388d66 100644 --- a/templates/ui-frameworks/vanilla/collection/tests/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{kebab_case collection_name}}.test.ts.hbs +++ b/templates/ui-frameworks/vanilla/collection/tests/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{kebab_case collection_name}}.test.ts.hbs @@ -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); diff --git a/templates/ui-frameworks/vue/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case collection_name}}.vue.hbs b/templates/ui-frameworks/vue/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case collection_name}}.vue.hbs index b4fe6ca36..3464d86a7 100644 --- a/templates/ui-frameworks/vue/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case collection_name}}.vue.hbs +++ b/templates/ui-frameworks/vue/collection/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{pascal_case collection_name}}.vue.hbs @@ -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; @@ -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) { diff --git "a/templates/ui-frameworks/vue/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#each entry_type.fields}}{{#if (and linked_from (not (eq linked_from.hash_type 'AgentPubKey') ) )}}{{pascal_case (plural ..\302\241entry_type.name)}}For{{pascal_case linked_from.name}}.vue{{\302\241if}}{{\302\241each}}.hbs" "b/templates/ui-frameworks/vue/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#each entry_type.fields}}{{#if (and linked_from (not (eq linked_from.hash_type 'AgentPubKey') ) )}}{{pascal_case (plural ..\302\241entry_type.name)}}For{{pascal_case linked_from.name}}.vue{{\302\241if}}{{\302\241each}}.hbs" index 48383907f..a2ffd6804 100644 --- "a/templates/ui-frameworks/vue/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#each entry_type.fields}}{{#if (and linked_from (not (eq linked_from.hash_type 'AgentPubKey') ) )}}{{pascal_case (plural ..\302\241entry_type.name)}}For{{pascal_case linked_from.name}}.vue{{\302\241if}}{{\302\241each}}.hbs" +++ "b/templates/ui-frameworks/vue/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#each entry_type.fields}}{{#if (and linked_from (not (eq linked_from.hash_type 'AgentPubKey') ) )}}{{pascal_case (plural ..\302\241entry_type.name)}}For{{pascal_case linked_from.name}}.vue{{\302\241if}}{{\302\241each}}.hbs" @@ -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; diff --git "a/templates/ui-frameworks/vue/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and bidireccional (and to_referenceable (ne from_referenceable.hash_type 'AgentPubKey')))}}{{pascal_case (plural from_referenceable.name)}}For{{pascal_case to_referenceable.name}}.vue{{\302\241if}}.hbs" "b/templates/ui-frameworks/vue/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and bidireccional (and to_referenceable (ne from_referenceable.hash_type 'AgentPubKey')))}}{{pascal_case (plural from_referenceable.name)}}For{{pascal_case to_referenceable.name}}.vue{{\302\241if}}.hbs" index 3bf4d92ec..15df09d3f 100644 --- "a/templates/ui-frameworks/vue/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and bidireccional (and to_referenceable (ne from_referenceable.hash_type 'AgentPubKey')))}}{{pascal_case (plural from_referenceable.name)}}For{{pascal_case to_referenceable.name}}.vue{{\302\241if}}.hbs" +++ "b/templates/ui-frameworks/vue/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and bidireccional (and to_referenceable (ne from_referenceable.hash_type 'AgentPubKey')))}}{{pascal_case (plural from_referenceable.name)}}For{{pascal_case to_referenceable.name}}.vue{{\302\241if}}.hbs" @@ -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; diff --git "a/templates/ui-frameworks/vue/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and to_referenceable (ne to_referenceable.hash_type 'AgentPubKey'))}}{{pascal_case (plural to_referenceable.name)}}For{{pascal_case from_referenceable.name}}.vue{{\302\241if}}.hbs" "b/templates/ui-frameworks/vue/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and to_referenceable (ne to_referenceable.hash_type 'AgentPubKey'))}}{{pascal_case (plural to_referenceable.name)}}For{{pascal_case from_referenceable.name}}.vue{{\302\241if}}.hbs" index 13e3c5b67..a7071ac31 100644 --- "a/templates/ui-frameworks/vue/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and to_referenceable (ne to_referenceable.hash_type 'AgentPubKey'))}}{{pascal_case (plural to_referenceable.name)}}For{{pascal_case from_referenceable.name}}.vue{{\302\241if}}.hbs" +++ "b/templates/ui-frameworks/vue/link-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if (and to_referenceable (ne to_referenceable.hash_type 'AgentPubKey'))}}{{pascal_case (plural to_referenceable.name)}}For{{pascal_case from_referenceable.name}}.vue{{\302\241if}}.hbs" @@ -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; From 18e084c0685da7b86d2097027786f87522dcd271 Mon Sep 17 00:00:00 2001 From: Collins Muriuki Date: Mon, 25 Nov 2024 17:44:54 +0300 Subject: [PATCH 3/3] Pin typescript version in vue template to maintain compatibility with vue-tsc --- templates/ui-frameworks/vue/web-app/ui/package.json.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/ui-frameworks/vue/web-app/ui/package.json.hbs b/templates/ui-frameworks/vue/web-app/ui/package.json.hbs index 9fee5618a..4d575fcda 100644 --- a/templates/ui-frameworks/vue/web-app/ui/package.json.hbs +++ b/templates/ui-frameworks/vue/web-app/ui/package.json.hbs @@ -24,7 +24,7 @@ "@vitejs/plugin-vue": "^5.1.4", "bestzip": "^2.2.1", "rimraf": "^5.0.10", - "typescript": "^5.6.3", + "typescript": "5.6.3", "vite": "^5.4.10", "vue-tsc": "^2.1.8" },