@dedot/codegen 0.5.0 → 0.6.1-next.fbc1154b.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,7 +20,7 @@ class ConstructorQueryGen extends QueryGen_js_1.QueryGen {
20
20
  const typeOutRaw = this.typesGen.generateType(returnType.type, 0, true);
21
21
  // Unwrap langError result
22
22
  const typeOut = typeOutRaw.match(/^(\w+)<(.*), (.*)>$/).at(2);
23
- return `GenericConstructorQueryCall<ChainApi, (${paramsOut && `${paramsOut},`} ${optionsParamName}: ConstructorCallOptions) => Promise<GenericConstructorCallResult<${typeOut}, ContractInstantiateResult<ChainApi>>>>`;
23
+ return `GenericConstructorQueryCall<ChainApi, (${paramsOut && `${paramsOut},`} ${optionsParamName}?: ConstructorCallOptions) => Promise<GenericConstructorCallResult<${typeOut}, ContractInstantiateResult<ChainApi>>>>`;
24
24
  }
25
25
  }
26
26
  exports.ConstructorQueryGen = ConstructorQueryGen;
@@ -40,7 +40,7 @@ class QueryGen {
40
40
  const typeOutRaw = this.typesGen.generateType(returnType.type, 0, true);
41
41
  // Unwrap langError result
42
42
  const typeOut = typeOutRaw.match(/^(\w+)<(.*), (.*)>$/).at(2);
43
- return `GenericContractQueryCall<ChainApi, (${paramsOut && `${paramsOut},`} ${optionsParamName}: ContractCallOptions) => Promise<GenericContractCallResult<${typeOut}, ContractCallResult<ChainApi>>>>`;
43
+ return `GenericContractQueryCall<ChainApi, (${paramsOut && `${paramsOut},`} ${optionsParamName}?: ContractCallOptions) => Promise<GenericContractCallResult<${typeOut}, ContractCallResult<ChainApi>>>>`;
44
44
  }
45
45
  generateParamsOut(args) {
46
46
  return args
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dedot/codegen",
3
- "version": "0.5.0",
3
+ "version": "0.6.1-next.fbc1154b.1+fbc1154",
4
4
  "description": "Generate types",
5
5
  "author": "Thang X. Vu <thang@coongcrafts.io>",
6
6
  "homepage": "https://github.com/dedotdev/dedot/tree/main/packages/codegen",
@@ -18,14 +18,14 @@
18
18
  "copy": "cp -R ./src/chaintypes/templates ./dist/chaintypes && cp -R ./src/chaintypes/templates ./dist/cjs/chaintypes && cp -R ./src/typink/templates ./dist/typink && cp -R ./src/typink/templates ./dist/cjs/typink"
19
19
  },
20
20
  "dependencies": {
21
- "@dedot/api": "0.5.0",
22
- "@dedot/codecs": "0.5.0",
23
- "@dedot/contracts": "0.5.0",
24
- "@dedot/providers": "0.5.0",
25
- "@dedot/runtime-specs": "0.5.0",
26
- "@dedot/shape": "0.5.0",
27
- "@dedot/types": "0.5.0",
28
- "@dedot/utils": "0.5.0",
21
+ "@dedot/api": "0.6.1-next.fbc1154b.1+fbc1154",
22
+ "@dedot/codecs": "0.6.1-next.fbc1154b.1+fbc1154",
23
+ "@dedot/contracts": "0.6.1-next.fbc1154b.1+fbc1154",
24
+ "@dedot/providers": "0.6.1-next.fbc1154b.1+fbc1154",
25
+ "@dedot/runtime-specs": "0.6.1-next.fbc1154b.1+fbc1154",
26
+ "@dedot/shape": "0.6.1-next.fbc1154b.1+fbc1154",
27
+ "@dedot/types": "0.6.1-next.fbc1154b.1+fbc1154",
28
+ "@dedot/utils": "0.6.1-next.fbc1154b.1+fbc1154",
29
29
  "handlebars": "^4.7.8",
30
30
  "prettier": "^3.3.3"
31
31
  },
@@ -33,8 +33,11 @@
33
33
  "access": "public",
34
34
  "directory": "dist"
35
35
  },
36
+ "engines": {
37
+ "node": ">=18"
38
+ },
36
39
  "license": "Apache-2.0",
37
- "gitHead": "968148ade63e07644094fc033be719b320e18a18",
40
+ "gitHead": "fbc1154b740aa7585de9c3c9d0bd464e100a8879",
38
41
  "module": "./index.js",
39
42
  "types": "./index.d.ts",
40
43
  "exports": {
@@ -17,6 +17,6 @@ export class ConstructorQueryGen extends QueryGen {
17
17
  const typeOutRaw = this.typesGen.generateType(returnType.type, 0, true);
18
18
  // Unwrap langError result
19
19
  const typeOut = typeOutRaw.match(/^(\w+)<(.*), (.*)>$/).at(2);
20
- return `GenericConstructorQueryCall<ChainApi, (${paramsOut && `${paramsOut},`} ${optionsParamName}: ConstructorCallOptions) => Promise<GenericConstructorCallResult<${typeOut}, ContractInstantiateResult<ChainApi>>>>`;
20
+ return `GenericConstructorQueryCall<ChainApi, (${paramsOut && `${paramsOut},`} ${optionsParamName}?: ConstructorCallOptions) => Promise<GenericConstructorCallResult<${typeOut}, ContractInstantiateResult<ChainApi>>>>`;
21
21
  }
22
22
  }
@@ -37,7 +37,7 @@ export class QueryGen {
37
37
  const typeOutRaw = this.typesGen.generateType(returnType.type, 0, true);
38
38
  // Unwrap langError result
39
39
  const typeOut = typeOutRaw.match(/^(\w+)<(.*), (.*)>$/).at(2);
40
- return `GenericContractQueryCall<ChainApi, (${paramsOut && `${paramsOut},`} ${optionsParamName}: ContractCallOptions) => Promise<GenericContractCallResult<${typeOut}, ContractCallResult<ChainApi>>>>`;
40
+ return `GenericContractQueryCall<ChainApi, (${paramsOut && `${paramsOut},`} ${optionsParamName}?: ContractCallOptions) => Promise<GenericContractCallResult<${typeOut}, ContractCallResult<ChainApi>>>>`;
41
41
  }
42
42
  generateParamsOut(args) {
43
43
  return args