diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..2c07333 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.11 diff --git a/examples/duplicate_structs/client.ts b/examples/duplicate_structs/client.ts index 5a3978c..e3fce62 100644 --- a/examples/duplicate_structs/client.ts +++ b/examples/duplicate_structs/client.ts @@ -1,4 +1,5 @@ /* eslint-disable */ +// @ts-nocheck /** * This file was automatically generated by @algorandfoundation/algokit-client-generator. * DO NOT MODIFY IT BY HAND. diff --git a/examples/helloworld/client.ts b/examples/helloworld/client.ts index 8da877b..e3e1d25 100644 --- a/examples/helloworld/client.ts +++ b/examples/helloworld/client.ts @@ -1,4 +1,5 @@ /* eslint-disable */ +// @ts-nocheck /** * This file was automatically generated by @algorandfoundation/algokit-client-generator. * DO NOT MODIFY IT BY HAND. diff --git a/examples/lifecycle/client.ts b/examples/lifecycle/client.ts index 1893e25..1652935 100644 --- a/examples/lifecycle/client.ts +++ b/examples/lifecycle/client.ts @@ -1,4 +1,5 @@ /* eslint-disable */ +// @ts-nocheck /** * This file was automatically generated by @algorandfoundation/algokit-client-generator. * DO NOT MODIFY IT BY HAND. diff --git a/examples/minimal/client.ts b/examples/minimal/client.ts index 1b25335..a9dbc0e 100644 --- a/examples/minimal/client.ts +++ b/examples/minimal/client.ts @@ -1,4 +1,5 @@ /* eslint-disable */ +// @ts-nocheck /** * This file was automatically generated by @algorandfoundation/algokit-client-generator. * DO NOT MODIFY IT BY HAND. diff --git a/examples/state/client.ts b/examples/state/client.ts index a2878ed..adf94d3 100644 --- a/examples/state/client.ts +++ b/examples/state/client.ts @@ -1,4 +1,5 @@ /* eslint-disable */ +// @ts-nocheck /** * This file was automatically generated by @algorandfoundation/algokit-client-generator. * DO NOT MODIFY IT BY HAND. diff --git a/examples/voting/client.ts b/examples/voting/client.ts index a809afc..320c5b4 100644 --- a/examples/voting/client.ts +++ b/examples/voting/client.ts @@ -1,4 +1,5 @@ /* eslint-disable */ +// @ts-nocheck /** * This file was automatically generated by @algorandfoundation/algokit-client-generator. * DO NOT MODIFY IT BY HAND. diff --git a/scripts/update-approvals.ts b/scripts/update-approvals.ts index 2a95612..c51e3f9 100644 --- a/scripts/update-approvals.ts +++ b/scripts/update-approvals.ts @@ -3,7 +3,9 @@ import * as path from 'path' import { colorConsole } from '../src/util/color-console' function updateApprovals() { - const dirs = ['helloworld', 'lifecycle', 'minimal', 'state', 'voting'].map((app) => path.join(process.cwd(), 'examples', app)) + const dirs = ['helloworld', 'lifecycle', 'minimal', 'state', 'voting', 'duplicate_structs'].map((app) => + path.join(process.cwd(), 'examples', app), + ) for (const exampleDir of dirs) { const generatedPath = path.join(exampleDir, 'client.generated.ts') diff --git a/src/client/generate.ts b/src/client/generate.ts index 837ad3b..264bef0 100644 --- a/src/client/generate.ts +++ b/src/client/generate.ts @@ -12,6 +12,7 @@ import { callComposerType } from './call-composer-types' export function* generate(app: AlgoAppSpec, options: GeneratorOptions = { preserveNames: false }): DocumentParts { const ctx = createGeneratorContext(app, options) yield `/* eslint-disable */` + yield `// @ts-nocheck` yield `/**` yield ` * This file was automatically generated by @algorandfoundation/algokit-client-generator.` yield ` * DO NOT MODIFY IT BY HAND.` diff --git a/src/tests/approval-tests.spec.ts b/src/tests/approval-tests.spec.ts index 9882f74..a3adf42 100644 --- a/src/tests/approval-tests.spec.ts +++ b/src/tests/approval-tests.spec.ts @@ -18,7 +18,7 @@ describe('When generating a ts client for a the contract', () => { if (writeActual) fs.writeFileSync(path.join(dir, `client.generated.ts`), result) const approvedClient = fs.readFileSync(path.join(dir, `client.ts`), 'utf-8') - + console.log(path.join(dir, `client.ts`)) expect(result).toBe(approvedClient) }) })