Skip to content

Commit

Permalink
Fixed app_name
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed Oct 12, 2023
1 parent ece482d commit 5ee1099
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -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")}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down Expand Up @@ -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<EntryRecord<{{pascal_case entry_type.name}}>> {
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<EntryRecord<{{pascal_case entry_type.name}}>> {
return client.create{{pascal_case entry_type.name}}({{camel_case entry_type.name}} || await sample{{pascal_case entry_type.name}}(client));
}

Original file line number Diff line number Diff line change
@@ -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}}>();
Expand Down Expand Up @@ -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}}
Expand Down
Original file line number Diff line number Diff line change
@@ -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}} */
Expand Down

0 comments on commit 5ee1099

Please sign in to comment.