diff --git a/.templates/app/collection/ui/src/{{dna_role_name}}/{{kebab_case coordinator_zome_manifest.name}}/mocks.ts.hbs b/.templates/app/collection/ui/src/{{dna_role_name}}/{{kebab_case coordinator_zome_manifest.name}}/mocks.ts.hbs index f6d4397..9503e92 100644 --- a/.templates/app/collection/ui/src/{{dna_role_name}}/{{kebab_case coordinator_zome_manifest.name}}/mocks.ts.hbs +++ b/.templates/app/collection/ui/src/{{dna_role_name}}/{{kebab_case coordinator_zome_manifest.name}}/mocks.ts.hbs @@ -1,4 +1,4 @@ -{{#merge_scope previous_file_content (concat "export class " (pascal_case app_name) "ZomeMock extends ZomeMock implements AppAgentClient {" ) }} +{{#merge_scope previous_file_content (concat "export class " (pascal_case coordinator_zome_manifest.name) "ZomeMock extends ZomeMock implements AppAgentClient {" ) }} {{previous_scope_content}} {{#if (eq collection_type.type "ByAuthor")}} diff --git "a/.templates/app/coordinator-zome/ui/src/{{dna_role_name}}/{{kebab_case zome_manifest.name}}/{{#if (and (not (eq (pascal_case zome_manifest.name) \"Profiles\")) (not (eq (pascal_case zome_manifest.name) \"FileStorage\")))}}mocks.ts{{\302\241if}}.hbs" "b/.templates/app/coordinator-zome/ui/src/{{dna_role_name}}/{{kebab_case zome_manifest.name}}/{{#if (and (not (eq (pascal_case zome_manifest.name) \"Profiles\")) (not (eq (pascal_case zome_manifest.name) \"FileStorage\")))}}mocks.ts{{\302\241if}}.hbs" index 14c627d..faf4136 100644 --- "a/.templates/app/coordinator-zome/ui/src/{{dna_role_name}}/{{kebab_case zome_manifest.name}}/{{#if (and (not (eq (pascal_case zome_manifest.name) \"Profiles\")) (not (eq (pascal_case zome_manifest.name) \"FileStorage\")))}}mocks.ts{{\302\241if}}.hbs" +++ "b/.templates/app/coordinator-zome/ui/src/{{dna_role_name}}/{{kebab_case zome_manifest.name}}/{{#if (and (not (eq (pascal_case zome_manifest.name) \"Profiles\")) (not (eq (pascal_case zome_manifest.name) \"FileStorage\")))}}mocks.ts{{\302\241if}}.hbs" @@ -26,13 +26,13 @@ import { fakeEntryHash, Record, } from "@holochain/client"; -import { {{pascal_case app_name}}Client } from './{{kebab_case app_name}}-client.js' +import { {{pascal_case coordinator_zome_manifest.name}}Client } from './{{kebab_case coordinator_zome_manifest.name}}-client.js' -export class {{pascal_case app_name}}ZomeMock extends ZomeMock implements AppAgentClient { +export class {{pascal_case coordinator_zome_manifest.name}}ZomeMock extends ZomeMock implements AppAgentClient { constructor( myPubKey?: AgentPubKey ) { - super("{{snake_case app_name}}_test", "{{snake_case app_name}}", myPubKey); + super("{{snake_case coordinator_zome_manifest.name}}_test", "{{snake_case coordinator_zome_manifest.name}}", myPubKey); } } diff --git a/.templates/app/entry-type/tests/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/common.ts.hbs b/.templates/app/entry-type/tests/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/common.ts.hbs index c27ccd7..84177ce 100644 --- a/.templates/app/entry-type/tests/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/common.ts.hbs +++ b/.templates/app/entry-type/tests/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/common.ts.hbs @@ -2,7 +2,7 @@ import { {{pascal_case entry_type.name}} } from '../../../ui/src/{{dna_role_name {{previous_file_content}} -export async function sample{{pascal_case entry_type.name}}(client: {{pascal_case app_name}}Client, partial{{pascal_case entry_type.name}}: Partial<{{pascal_case entry_type.name}}> = {}): Promise<{{ pascal_case entry_type.name }}> { +export async function sample{{pascal_case entry_type.name}}(client: {{pascal_case coordinator_zome_manifest.name}}Client, partial{{pascal_case entry_type.name}}: Partial<{{pascal_case entry_type.name}}> = {}): Promise<{{ pascal_case entry_type.name }}> { return { ...{ {{#each entry_type.fields}} @@ -45,7 +45,7 @@ export async function sample{{pascal_case entry_type.name}}(client: {{pascal_cas }; } -export async function create{{pascal_case entry_type.name}}(client: {{pascal_case app_name}}Client, {{camel_case entry_type.name}}: {{pascal_case entry_type.name}} | undefined): Promise> { +export async function create{{pascal_case entry_type.name}}(client: {{pascal_case coordinator_zome_manifest.name}}Client, {{camel_case entry_type.name}}: {{pascal_case entry_type.name}} | undefined): Promise> { return client.create{{pascal_case entry_type.name}}({{camel_case entry_type.name}} || await sample{{pascal_case entry_type.name}}(client)); } diff --git a/.templates/app/entry-type/ui/src/{{dna_role_name}}/{{kebab_case coordinator_zome_manifest.name}}/mocks.ts.hbs b/.templates/app/entry-type/ui/src/{{dna_role_name}}/{{kebab_case coordinator_zome_manifest.name}}/mocks.ts.hbs index 5f1195f..5faef1e 100644 --- a/.templates/app/entry-type/ui/src/{{dna_role_name}}/{{kebab_case coordinator_zome_manifest.name}}/mocks.ts.hbs +++ b/.templates/app/entry-type/ui/src/{{dna_role_name}}/{{kebab_case coordinator_zome_manifest.name}}/mocks.ts.hbs @@ -1,6 +1,6 @@ import { {{pascal_case entry_type.name}} } from './types.js'; -{{#merge_scope previous_file_content (concat "export class " (pascal_case app_name) "ZomeMock extends ZomeMock implements AppAgentClient {" ) }} +{{#merge_scope previous_file_content (concat "export class " (pascal_case coordinator_zome_manifest.name) "ZomeMock extends ZomeMock implements AppAgentClient {" ) }} {{previous_scope_content}} /** {{title_case entry_type.name}} */ {{camel_case entry_type.name}} = new RecordBag<{{pascal_case entry_type.name}}>(); @@ -103,7 +103,7 @@ import { {{pascal_case entry_type.name}} } from './types.js'; {{/merge_scope}} -export async function sample{{pascal_case entry_type.name}}(client: {{pascal_case app_name}}Client, partial{{pascal_case entry_type.name}}: Partial<{{pascal_case entry_type.name}}> = {}): Promise<{{ pascal_case entry_type.name }}> { +export async function sample{{pascal_case entry_type.name}}(client: {{pascal_case coordinator_zome_manifest.name}}Client, partial{{pascal_case entry_type.name}}: Partial<{{pascal_case entry_type.name}}> = {}): Promise<{{ pascal_case entry_type.name }}> { return { ...{ {{#each entry_type.fields}} diff --git a/.templates/app/link-type/ui/src/{{dna_role_name}}/{{kebab_case coordinator_zome_manifest.name}}/mocks.ts.hbs b/.templates/app/link-type/ui/src/{{dna_role_name}}/{{kebab_case coordinator_zome_manifest.name}}/mocks.ts.hbs index b1508e8..7d9153e 100644 --- a/.templates/app/link-type/ui/src/{{dna_role_name}}/{{kebab_case coordinator_zome_manifest.name}}/mocks.ts.hbs +++ b/.templates/app/link-type/ui/src/{{dna_role_name}}/{{kebab_case coordinator_zome_manifest.name}}/mocks.ts.hbs @@ -1,4 +1,4 @@ -{{#merge_scope previous_file_content (concat "export class " (pascal_case app_name) "ZomeMock extends ZomeMock implements AppAgentClient {" ) }} +{{#merge_scope previous_file_content (concat "export class " (pascal_case coordinator_zome_manifest.name) "ZomeMock extends ZomeMock implements AppAgentClient {" ) }} {{previous_scope_content}} /** {{title_case (plural to_referenceable.name)}} for {{title_case from_referenceable.name}} */