Skip to content

Commit

Permalink
pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
pyramation committed Apr 17, 2024
1 parent f7230f9 commit 812ce3c
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 26 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ codegen({
messageBuilder: {
enabled: false
},
useContractsHooks: {
useContractHooks: {
enabled: false
}
}
Expand Down Expand Up @@ -195,7 +195,7 @@ Generate raw message jsons for use in your application with the `message-builder

| option | description |
| -------------------------------- | --------------------------------------- |
| `useContractsHooks.enabled` | enable the `useContracts` plugin |
| `useContractHooks.enabled` | enable the `useContracts` plugin |

#### Use Contracts Provider Usage

Expand Down
2 changes: 1 addition & 1 deletion packages/ast/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"url": "https://github.com/cosmwasm/ts-codegen/issues"
},
"dependencies": {
"@babel/types": "7.18.10",
"@babel/types": "7.24.0",
"@cosmology/ts-codegen-types": "^1.1.0",
"ast-stringify": "0.1.0",
"case": "1.6.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/ts-codegen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ codegen({
messageBuilder: {
enabled: false
},
useContractsHooks: {
useContractHooks: {
enabled: false
}
}
Expand Down Expand Up @@ -195,7 +195,7 @@ Generate raw message jsons for use in your application with the `message-builder

| option | description |
| -------------------------------- | --------------------------------------- |
| `useContractsHooks.enabled` | enable the `useContracts` plugin |
| `useContractHooks.enabled` | enable the `useContracts` plugin |

#### Use Contracts Provider Usage

Expand Down
4 changes: 2 additions & 2 deletions packages/ts-codegen/__tests__/builder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ it('builder default', async () => {
messageBuilder: {
enabled: true
},
useContractsHooks: {
useContractHooks: {
enabled: true,
}
}
Expand Down Expand Up @@ -206,7 +206,7 @@ it('builder set bundler path', async () => {
messageComposer: {
enabled: true
},
useContractsHooks: {
useContractHooks: {
enabled: true,
}
}
Expand Down
4 changes: 3 additions & 1 deletion packages/ts-codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
"ast-stringify": "0.1.0"
},
"dependencies": {
"@babel/types": "7.18.10",
"@babel/generator": "7.24.4",
"@babel/traverse": "7.24.1",
"@babel/types": "7.24.0",
"@cosmology/ts-codegen-types": "^1.1.0",
"@pyramation/json-schema-to-typescript": " 11.0.4",
"@types/rimraf": "3.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/ts-codegen/src/builder/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export type TSBuilderOptions = {
* Default: true
*/
useShorthandCtor?: boolean;
useContractsHooks?: UseContractsOptions;
useContractHooks?: UseContractsOptions;
} & RenderOptions;

export type BuilderFileType = 'type' | 'client' | 'recoil' | 'react-query' | 'message-composer' | 'message-builder' | 'plugin';
Expand Down
2 changes: 1 addition & 1 deletion packages/ts-codegen/src/generators/create-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const createHelpers = (
const files: BuilderFile[] = [];

if (
input.options?.useContractsHooks?.enabled &&
input.options?.useContractHooks?.enabled &&
Object.keys(builderContext.providers)?.length
) {
const useShorthandCtor = input.options?.useShorthandCtor;
Expand Down
2 changes: 1 addition & 1 deletion packages/ts-codegen/src/plugins/provider-bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class ContractsProviderBundlePlugin extends BuilderPluginBase<TSBuilderOp
body: any[];
}[]
> {
if (!this.option?.useContractsHooks?.enabled) {
if (!this.option?.useContractHooks?.enabled) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/ts-codegen/src/plugins/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class ContractsContextProviderPlugin extends BuilderPluginBase<TSBuilderO
body: any[];
}[]
> {
if (!this.option?.useContractsHooks?.enabled) {
if (!this.option?.useContractHooks?.enabled) {
return;
}

Expand Down
19 changes: 5 additions & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
json5 "^2.2.3"
semver "^6.3.1"

"@babel/generator@^7.24.1", "@babel/generator@^7.24.4", "@babel/generator@^7.7.2":
"@babel/generator@7.24.4", "@babel/generator@^7.24.1", "@babel/generator@^7.24.4", "@babel/generator@^7.7.2":
version "7.24.4"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.4.tgz#1fc55532b88adf952025d5d2d1e71f946cb1c498"
integrity sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw==
Expand Down Expand Up @@ -127,12 +127,12 @@
dependencies:
"@babel/types" "^7.22.5"

"@babel/helper-string-parser@^7.18.10", "@babel/helper-string-parser@^7.23.4":
"@babel/helper-string-parser@^7.23.4":
version "7.24.1"
resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz#f99c36d3593db9540705d0739a1f10b5e20c696e"
integrity sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==

"@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.22.20":
"@babel/helper-validator-identifier@^7.22.20":
version "7.22.20"
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0"
integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==
Expand Down Expand Up @@ -280,7 +280,7 @@
"@babel/parser" "^7.24.0"
"@babel/types" "^7.24.0"

"@babel/traverse@^7.24.1":
"@babel/traverse@7.24.1", "@babel/traverse@^7.24.1":
version "7.24.1"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.1.tgz#d65c36ac9dd17282175d1e4a3c49d5b7988f530c"
integrity sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==
Expand All @@ -296,16 +296,7 @@
debug "^4.3.1"
globals "^11.1.0"

"@babel/[email protected]":
version "7.18.10"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.10.tgz#4908e81b6b339ca7c6b7a555a5fc29446f26dde6"
integrity sha512-MJvnbEiiNkpjo+LknnmRrqbY1GPUUggjv+wQVjetM/AONoupqRALB7I6jGqNUAZsKcRIEu2J6FRFvsczljjsaQ==
dependencies:
"@babel/helper-string-parser" "^7.18.10"
"@babel/helper-validator-identifier" "^7.18.6"
to-fast-properties "^2.0.0"

"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.24.0", "@babel/types@^7.3.3":
"@babel/[email protected]", "@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.24.0", "@babel/types@^7.3.3":
version "7.24.0"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.0.tgz#3b951f435a92e7333eba05b7566fd297960ea1bf"
integrity sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==
Expand Down

0 comments on commit 812ce3c

Please sign in to comment.