@algorandfoundation/algokit-client-generator 2.6.0 → 3.0.0-beta.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.
- package/bin/cli.mjs +4 -0
- package/cli.d.ts +0 -1
- package/cli.js +47 -49
- package/cli.js.map +1 -1
- package/cli.mjs +56 -0
- package/cli.mjs.map +1 -0
- package/client/app-types.d.ts +0 -1
- package/client/app-types.js +92 -97
- package/client/app-types.js.map +1 -1
- package/client/app-types.mjs +135 -0
- package/client/app-types.mjs.map +1 -0
- package/client/call-client.d.ts +0 -1
- package/client/call-client.js +145 -143
- package/client/call-client.js.map +1 -1
- package/client/call-client.mjs +320 -0
- package/client/call-client.mjs.map +1 -0
- package/client/call-composer-types.d.ts +0 -1
- package/client/call-composer-types.js +60 -62
- package/client/call-composer-types.js.map +1 -1
- package/client/call-composer-types.mjs +122 -0
- package/client/call-composer-types.mjs.map +1 -0
- package/client/call-composer.d.ts +0 -1
- package/client/call-composer.js +76 -78
- package/client/call-composer.js.map +1 -1
- package/client/call-composer.mjs +128 -0
- package/client/call-composer.mjs.map +1 -0
- package/client/call-factory.d.ts +0 -1
- package/client/call-factory.js +62 -62
- package/client/call-factory.js.map +1 -1
- package/client/call-factory.mjs +121 -0
- package/client/call-factory.mjs.map +1 -0
- package/client/deploy-types.d.ts +1 -2
- package/client/deploy-types.js +42 -40
- package/client/deploy-types.js.map +1 -1
- package/client/deploy-types.mjs +94 -0
- package/client/deploy-types.mjs.map +1 -0
- package/client/generate.d.ts +2 -2
- package/client/generate.js +28 -27
- package/client/generate.js.map +1 -1
- package/client/generate.mjs +36 -0
- package/client/generate.mjs.map +1 -0
- package/client/generator-context.d.ts +7 -2
- package/client/generator-context.js +39 -38
- package/client/generator-context.js.map +1 -1
- package/client/generator-context.mjs +21 -0
- package/client/generator-context.mjs.map +1 -0
- package/client/helpers/get-call-config-summary.d.ts +1 -2
- package/client/helpers/get-call-config-summary.js +8 -25
- package/client/helpers/get-call-config-summary.js.map +1 -1
- package/client/helpers/get-call-config-summary.mjs +55 -0
- package/client/helpers/get-call-config-summary.mjs.map +1 -0
- package/client/helpers/get-equivalent-type.d.ts +0 -1
- package/client/helpers/get-equivalent-type.js +21 -20
- package/client/helpers/get-equivalent-type.js.map +1 -1
- package/client/helpers/get-equivalent-type.mjs +57 -0
- package/client/helpers/get-equivalent-type.mjs.map +1 -0
- package/client/imports.d.ts +0 -1
- package/client/imports.js +4 -4
- package/client/imports.js.map +1 -1
- package/client/imports.mjs +28 -0
- package/client/imports.mjs.map +1 -0
- package/client/utility-types.d.ts +0 -1
- package/client/utility-types.js +27 -25
- package/client/utility-types.js.map +1 -1
- package/client/utility-types.mjs +48 -0
- package/client/utility-types.mjs.map +1 -0
- package/dev.d.ts +0 -1
- package/index.d.ts +0 -1
- package/index.js +14 -12
- package/index.js.map +1 -1
- package/index.mjs +4 -0
- package/index.mjs.map +1 -0
- package/output/writer.d.ts +0 -1
- package/output/writer.js +45 -38
- package/output/writer.js.map +1 -1
- package/output/writer.mjs +140 -0
- package/output/writer.mjs.map +1 -0
- package/package.json +9 -4
- package/schema/application.schema.json.js +375 -0
- package/schema/application.schema.json.js.map +1 -0
- package/schema/application.schema.json.mjs +364 -0
- package/schema/application.schema.json.mjs.map +1 -0
- package/schema/contract.schema.json.js +160 -0
- package/schema/contract.schema.json.js.map +1 -0
- package/schema/contract.schema.json.mjs +149 -0
- package/schema/contract.schema.json.mjs.map +1 -0
- package/schema/load.d.ts +0 -1
- package/schema/load.js +16 -41
- package/schema/load.js.map +1 -1
- package/schema/load.mjs +23 -0
- package/schema/load.mjs.map +1 -0
- package/tests/approval-tests.spec.d.ts +0 -1
- package/tests/util.d.ts +1 -0
- package/util/boom.d.ts +0 -1
- package/util/boom.js +4 -4
- package/util/boom.js.map +1 -1
- package/util/boom.mjs +6 -0
- package/util/boom.mjs.map +1 -0
- package/util/color-console.d.ts +0 -1
- package/util/color-console.js +12 -13
- package/util/color-console.js.map +1 -1
- package/util/color-console.mjs +17 -0
- package/util/color-console.mjs.map +1 -0
- package/util/not-falsy.d.ts +0 -1
- package/util/sanitization.d.ts +12 -6
- package/util/sanitization.js +54 -15
- package/util/sanitization.js.map +1 -1
- package/util/sanitization.mjs +54 -0
- package/util/sanitization.mjs.map +1 -0
- package/bin/cli.js +0 -4
- package/cli.d.ts.map +0 -1
- package/client/app-types.d.ts.map +0 -1
- package/client/call-client.d.ts.map +0 -1
- package/client/call-composer-types.d.ts.map +0 -1
- package/client/call-composer.d.ts.map +0 -1
- package/client/call-factory.d.ts.map +0 -1
- package/client/deploy-types.d.ts.map +0 -1
- package/client/generate.d.ts.map +0 -1
- package/client/generator-context.d.ts.map +0 -1
- package/client/helpers/get-call-config-summary.d.ts.map +0 -1
- package/client/helpers/get-equivalent-type.d.ts.map +0 -1
- package/client/imports.d.ts.map +0 -1
- package/client/utility-types.d.ts.map +0 -1
- package/dev.d.ts.map +0 -1
- package/dev.js +0 -5
- package/dev.js.map +0 -1
- package/index.d.ts.map +0 -1
- package/output/writer.d.ts.map +0 -1
- package/schema/application.schema.json +0 -354
- package/schema/contract.schema.json +0 -139
- package/schema/load.d.ts.map +0 -1
- package/tests/approval-tests.spec.d.ts.map +0 -1
- package/tests/approval-tests.spec.js +0 -24
- package/tests/approval-tests.spec.js.map +0 -1
- package/util/boom.d.ts.map +0 -1
- package/util/color-console.d.ts.map +0 -1
- package/util/not-falsy.d.ts.map +0 -1
- package/util/not-falsy.js +0 -6
- package/util/not-falsy.js.map +0 -1
- package/util/sanitization.d.ts.map +0 -1
|
@@ -1,58 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var algosdk = require('algosdk');
|
|
4
|
+
|
|
5
5
|
function getEquivalentType(abiTypeStr, ioType) {
|
|
6
6
|
if (abiTypeStr == 'void') {
|
|
7
7
|
return 'void';
|
|
8
8
|
}
|
|
9
|
-
if (
|
|
9
|
+
if (algosdk.abiTypeIsTransaction(abiTypeStr)) {
|
|
10
10
|
return 'TransactionToSign | Transaction | Promise<SendTransactionResult>';
|
|
11
11
|
}
|
|
12
|
-
if (abiTypeStr ==
|
|
12
|
+
if (abiTypeStr == algosdk.ABIReferenceType.account) {
|
|
13
13
|
return 'string | Uint8Array';
|
|
14
14
|
}
|
|
15
|
-
if (abiTypeStr ==
|
|
15
|
+
if (abiTypeStr == algosdk.ABIReferenceType.application || abiTypeStr == algosdk.ABIReferenceType.asset) {
|
|
16
16
|
return 'number | bigint';
|
|
17
17
|
}
|
|
18
|
-
const abiType =
|
|
18
|
+
const abiType = algosdk.ABIType.from(abiTypeStr);
|
|
19
19
|
return abiTypeToTs(abiType, ioType);
|
|
20
20
|
function abiTypeToTs(abiType, ioType) {
|
|
21
|
-
if (abiType instanceof
|
|
21
|
+
if (abiType instanceof algosdk.ABIUintType) {
|
|
22
22
|
if (abiType.bitSize <= 51)
|
|
23
23
|
return 'number';
|
|
24
24
|
return ioType === 'input' ? 'bigint | number' : 'bigint';
|
|
25
25
|
}
|
|
26
|
-
if (abiType instanceof
|
|
27
|
-
if (abiType.childType instanceof
|
|
26
|
+
if (abiType instanceof algosdk.ABIArrayDynamicType) {
|
|
27
|
+
if (abiType.childType instanceof algosdk.ABIByteType)
|
|
28
28
|
return 'Uint8Array';
|
|
29
29
|
return `${abiTypeToTs(abiType.childType, ioType)}[]`;
|
|
30
30
|
}
|
|
31
|
-
if (abiType instanceof
|
|
32
|
-
if (abiType.childType instanceof
|
|
31
|
+
if (abiType instanceof algosdk.ABIArrayStaticType) {
|
|
32
|
+
if (abiType.childType instanceof algosdk.ABIByteType)
|
|
33
33
|
return 'Uint8Array';
|
|
34
34
|
return `[${new Array(abiType.staticLength).fill(abiTypeToTs(abiType.childType, ioType)).join(', ')}]`;
|
|
35
35
|
}
|
|
36
|
-
if (abiType instanceof
|
|
36
|
+
if (abiType instanceof algosdk.ABIAddressType) {
|
|
37
37
|
return 'string';
|
|
38
38
|
}
|
|
39
|
-
if (abiType instanceof
|
|
39
|
+
if (abiType instanceof algosdk.ABIBoolType) {
|
|
40
40
|
return 'boolean';
|
|
41
41
|
}
|
|
42
|
-
if (abiType instanceof
|
|
42
|
+
if (abiType instanceof algosdk.ABIUfixedType) {
|
|
43
43
|
return 'number';
|
|
44
44
|
}
|
|
45
|
-
if (abiType instanceof
|
|
45
|
+
if (abiType instanceof algosdk.ABITupleType) {
|
|
46
46
|
return `[${abiType.childTypes.map((c) => abiTypeToTs(c, ioType)).join(', ')}]`;
|
|
47
47
|
}
|
|
48
|
-
if (abiType instanceof
|
|
48
|
+
if (abiType instanceof algosdk.ABIByteType) {
|
|
49
49
|
return 'number';
|
|
50
50
|
}
|
|
51
|
-
if (abiType instanceof
|
|
51
|
+
if (abiType instanceof algosdk.ABIStringType) {
|
|
52
52
|
return 'string';
|
|
53
53
|
}
|
|
54
54
|
return 'unknown';
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
+
|
|
57
58
|
exports.getEquivalentType = getEquivalentType;
|
|
58
|
-
//# sourceMappingURL=get-equivalent-type.js.map
|
|
59
|
+
//# sourceMappingURL=get-equivalent-type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-equivalent-type.js","
|
|
1
|
+
{"version":3,"file":"get-equivalent-type.js","sources":["../../../src/client/helpers/get-equivalent-type.ts"],"sourcesContent":["import {\n ABIAddressType,\n ABIArrayDynamicType,\n ABIArrayStaticType,\n ABIBoolType,\n ABIByteType,\n ABIReferenceType,\n ABIStringType,\n ABITupleType,\n ABIType,\n ABIUfixedType,\n ABIUintType,\n abiTypeIsTransaction,\n} from 'algosdk'\n\nexport function getEquivalentType(abiTypeStr: string, ioType: 'input' | 'output'): string {\n if (abiTypeStr == 'void') {\n return 'void'\n }\n if (abiTypeIsTransaction(abiTypeStr)) {\n return 'TransactionToSign | Transaction | Promise<SendTransactionResult>'\n }\n if (abiTypeStr == ABIReferenceType.account) {\n return 'string | Uint8Array'\n }\n if (abiTypeStr == ABIReferenceType.application || abiTypeStr == ABIReferenceType.asset) {\n return 'number | bigint'\n }\n\n const abiType = ABIType.from(abiTypeStr)\n\n return abiTypeToTs(abiType, ioType)\n\n function abiTypeToTs(abiType: ABIType, ioType: 'input' | 'output'): string {\n if (abiType instanceof ABIUintType) {\n if (abiType.bitSize <= 51) return 'number'\n return ioType === 'input' ? 'bigint | number' : 'bigint'\n }\n if (abiType instanceof ABIArrayDynamicType) {\n if (abiType.childType instanceof ABIByteType) return 'Uint8Array'\n return `${abiTypeToTs(abiType.childType, ioType)}[]`\n }\n if (abiType instanceof ABIArrayStaticType) {\n if (abiType.childType instanceof ABIByteType) return 'Uint8Array'\n return `[${new Array(abiType.staticLength).fill(abiTypeToTs(abiType.childType, ioType)).join(', ')}]`\n }\n if (abiType instanceof ABIAddressType) {\n return 'string'\n }\n if (abiType instanceof ABIBoolType) {\n return 'boolean'\n }\n if (abiType instanceof ABIUfixedType) {\n return 'number'\n }\n if (abiType instanceof ABITupleType) {\n return `[${abiType.childTypes.map((c) => abiTypeToTs(c, ioType)).join(', ')}]`\n }\n if (abiType instanceof ABIByteType) {\n return 'number'\n }\n if (abiType instanceof ABIStringType) {\n return 'string'\n }\n return 'unknown'\n }\n}\n"],"names":["abiTypeIsTransaction","ABIReferenceType","ABIType","ABIUintType","ABIArrayDynamicType","ABIByteType","ABIArrayStaticType","ABIAddressType","ABIBoolType","ABIUfixedType","ABITupleType","ABIStringType"],"mappings":";;;;AAegB,SAAA,iBAAiB,CAAC,UAAkB,EAAE,MAA0B,EAAA;AAC9E,IAAA,IAAI,UAAU,IAAI,MAAM,EAAE;AACxB,QAAA,OAAO,MAAM,CAAA;KACd;AACD,IAAA,IAAIA,4BAAoB,CAAC,UAAU,CAAC,EAAE;AACpC,QAAA,OAAO,kEAAkE,CAAA;KAC1E;AACD,IAAA,IAAI,UAAU,IAAIC,wBAAgB,CAAC,OAAO,EAAE;AAC1C,QAAA,OAA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AAA,OAAO,SAAS,CAAA;SACjB;AACD,QAAA,IAAI,OAAO,YAAYC,qBAAa,EAAE;AACpC,YAAA,OAAO,QAAQ,CAAA;SAChB;AACD,QAAA,IAAI,OAAO,YAAYC,oBAAY,EAAE;YACnC,OAAO,CAAA,CAAA,EAAI,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA,CAAA,CAAG,CAAA;SAC/E;AACD,QAAA,IAAI,OAAO,YAAYL,mBAAW,EAAE;AAClC,YAAA,OAAO,QAAQ,CAAA;SAChB;AACD,QAAA,IAAI,OAAO,YAAYM,qBAAa,EAAE;AACpC,YAAA,OAAO,QAAQ,CAAA;SAChB;AACD,QAAA,OAAO,SAAS,CAAA;KACjB;AACH;;;;"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { abiTypeIsTransaction, ABIReferenceType, ABIType, ABIUintType, ABIArrayDynamicType, ABIByteType, ABIArrayStaticType, ABIAddressType, ABIBoolType, ABIUfixedType, ABITupleType, ABIStringType } from 'algosdk';
|
|
2
|
+
|
|
3
|
+
function getEquivalentType(abiTypeStr, ioType) {
|
|
4
|
+
if (abiTypeStr == 'void') {
|
|
5
|
+
return 'void';
|
|
6
|
+
}
|
|
7
|
+
if (abiTypeIsTransaction(abiTypeStr)) {
|
|
8
|
+
return 'TransactionToSign | Transaction | Promise<SendTransactionResult>';
|
|
9
|
+
}
|
|
10
|
+
if (abiTypeStr == ABIReferenceType.account) {
|
|
11
|
+
return 'string | Uint8Array';
|
|
12
|
+
}
|
|
13
|
+
if (abiTypeStr == ABIReferenceType.application || abiTypeStr == ABIReferenceType.asset) {
|
|
14
|
+
return 'number | bigint';
|
|
15
|
+
}
|
|
16
|
+
const abiType = ABIType.from(abiTypeStr);
|
|
17
|
+
return abiTypeToTs(abiType, ioType);
|
|
18
|
+
function abiTypeToTs(abiType, ioType) {
|
|
19
|
+
if (abiType instanceof ABIUintType) {
|
|
20
|
+
if (abiType.bitSize <= 51)
|
|
21
|
+
return 'number';
|
|
22
|
+
return ioType === 'input' ? 'bigint | number' : 'bigint';
|
|
23
|
+
}
|
|
24
|
+
if (abiType instanceof ABIArrayDynamicType) {
|
|
25
|
+
if (abiType.childType instanceof ABIByteType)
|
|
26
|
+
return 'Uint8Array';
|
|
27
|
+
return `${abiTypeToTs(abiType.childType, ioType)}[]`;
|
|
28
|
+
}
|
|
29
|
+
if (abiType instanceof ABIArrayStaticType) {
|
|
30
|
+
if (abiType.childType instanceof ABIByteType)
|
|
31
|
+
return 'Uint8Array';
|
|
32
|
+
return `[${new Array(abiType.staticLength).fill(abiTypeToTs(abiType.childType, ioType)).join(', ')}]`;
|
|
33
|
+
}
|
|
34
|
+
if (abiType instanceof ABIAddressType) {
|
|
35
|
+
return 'string';
|
|
36
|
+
}
|
|
37
|
+
if (abiType instanceof ABIBoolType) {
|
|
38
|
+
return 'boolean';
|
|
39
|
+
}
|
|
40
|
+
if (abiType instanceof ABIUfixedType) {
|
|
41
|
+
return 'number';
|
|
42
|
+
}
|
|
43
|
+
if (abiType instanceof ABITupleType) {
|
|
44
|
+
return `[${abiType.childTypes.map((c) => abiTypeToTs(c, ioType)).join(', ')}]`;
|
|
45
|
+
}
|
|
46
|
+
if (abiType instanceof ABIByteType) {
|
|
47
|
+
return 'number';
|
|
48
|
+
}
|
|
49
|
+
if (abiType instanceof ABIStringType) {
|
|
50
|
+
return 'string';
|
|
51
|
+
}
|
|
52
|
+
return 'unknown';
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export { getEquivalentType };
|
|
57
|
+
//# sourceMappingURL=get-equivalent-type.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-equivalent-type.mjs","sources":["../../../src/client/helpers/get-equivalent-type.ts"],"sourcesContent":["import {\n ABIAddressType,\n ABIArrayDynamicType,\n ABIArrayStaticType,\n ABIBoolType,\n ABIByteType,\n ABIReferenceType,\n ABIStringType,\n ABITupleType,\n ABIType,\n ABIUfixedType,\n ABIUintType,\n abiTypeIsTransaction,\n} from 'algosdk'\n\nexport function getEquivalentType(abiTypeStr: string, ioType: 'input' | 'output'): string {\n if (abiTypeStr == 'void') {\n return 'void'\n }\n if (abiTypeIsTransaction(abiTypeStr)) {\n return 'TransactionToSign | Transaction | Promise<SendTransactionResult>'\n }\n if (abiTypeStr == ABIReferenceType.account) {\n return 'string | Uint8Array'\n }\n if (abiTypeStr == ABIReferenceType.application || abiTypeStr == ABIReferenceType.asset) {\n return 'number | bigint'\n }\n\n const abiType = ABIType.from(abiTypeStr)\n\n return abiTypeToTs(abiType, ioType)\n\n function abiTypeToTs(abiType: ABIType, ioType: 'input' | 'output'): string {\n if (abiType instanceof ABIUintType) {\n if (abiType.bitSize <= 51) return 'number'\n return ioType === 'input' ? 'bigint | number' : 'bigint'\n }\n if (abiType instanceof ABIArrayDynamicType) {\n if (abiType.childType instanceof ABIByteType) return 'Uint8Array'\n return `${abiTypeToTs(abiType.childType, ioType)}[]`\n }\n if (abiType instanceof ABIArrayStaticType) {\n if (abiType.childType instanceof ABIByteType) return 'Uint8Array'\n return `[${new Array(abiType.staticLength).fill(abiTypeToTs(abiType.childType, ioType)).join(', ')}]`\n }\n if (abiType instanceof ABIAddressType) {\n return 'string'\n }\n if (abiType instanceof ABIBoolType) {\n return 'boolean'\n }\n if (abiType instanceof ABIUfixedType) {\n return 'number'\n }\n if (abiType instanceof ABITupleType) {\n return `[${abiType.childTypes.map((c) => abiTypeToTs(c, ioType)).join(', ')}]`\n }\n if (abiType instanceof ABIByteType) {\n return 'number'\n }\n if (abiType instanceof ABIStringType) {\n return 'string'\n }\n return 'unknown'\n }\n}\n"],"names":[],"mappings":";;AAegB,SAAA,iBAAiB,CAAC,UAAkB,EAAE,MAA0B,EAAA;AAC9E,IAAA,IAAI,UAAU,IAAI,MAAM,EAAE;AACxB,QA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,IAAI,CAAC,CAAA,CAAA,CAAG,CAAA;SACtG;AACD,QAAA,IAAI,OAAO,YAAY,cAAc,EAAE;AACrC,YAAA,OAAO,QAAQ,CAAA;SAChB;AACD,QAAA,IAAI,OAAO,YAAY,WAAW,EAAE;AAClC,YAAA,OAAO,SAAS,CAAA;SACjB;AACD,QAAA,IAAI,OAAO,YAAY,aAAa,EAAE;AACpC,YAAA,OAAO,QAAQ,CAAA;SAChB;AACD,QAAA,IAAI,OAAO,YAAY,YAAY,EAAE;YACnC,OAAO,CAAA,CAAA,EAAI,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA,CAAA,CAAG,CAAA;SAC/E;AACD,QAAA,IAAI,OAAO,YAAY,WAAW,EAAE;AAClC,YAAA,OAAO,QAAQ,CAAA;SAChB;AACD,QAAA,IAAI,OAAO,YAAY,aAAa,EAAE;AACpC,YAAA,OAAO,QAAQ,CAAA;SAChB;AACD,QAAA,OAAO,SAAS,CAAA;KACjB;AACH;;;;"}
|
package/client/imports.d.ts
CHANGED
package/client/imports.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.imports = void 0;
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
4
3
|
function* imports() {
|
|
5
4
|
yield `import * as algokit from '@algorandfoundation/algokit-utils'
|
|
6
5
|
import type {
|
|
@@ -26,5 +25,6 @@ import type { SendTransactionResult, TransactionToSign, SendTransactionFrom, Sen
|
|
|
26
25
|
import type { ABIResult, TransactionWithSigner } from 'algosdk'
|
|
27
26
|
import { Algodv2, OnApplicationComplete, Transaction, AtomicTransactionComposer, modelsv2 } from 'algosdk'`;
|
|
28
27
|
}
|
|
28
|
+
|
|
29
29
|
exports.imports = imports;
|
|
30
|
-
//# sourceMappingURL=imports.js.map
|
|
30
|
+
//# sourceMappingURL=imports.js.map
|
package/client/imports.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"imports.js","
|
|
1
|
+
{"version":3,"file":"imports.js","sources":["../../src/client/imports.ts"],"sourcesContent":["import { DocumentParts } from '../output/writer'\n\nexport function* imports(): DocumentParts {\n yield `import * as algokit from '@algorandfoundation/algokit-utils'\nimport type {\n ABIAppCallArg,\n AppCallTransactionResult,\n AppCallTransactionResultOfType,\n AppCompilationResult,\n AppReference,\n AppState,\n CoreAppCallArgs,\n RawAppCallArgs,\n TealTemplateParams,\n} from '@algorandfoundation/algokit-utils/types/app'\nimport type {\n AppClientCallCoreParams,\n AppClientCompilationParams,\n AppClientDeployCoreParams,\n AppDetails,\n ApplicationClient,\n} from '@algorandfoundation/algokit-utils/types/app-client'\nimport type { AppSpec } from '@algorandfoundation/algokit-utils/types/app-spec'\nimport type { SendTransactionResult, TransactionToSign, SendTransactionFrom, SendTransactionParams } from '@algorandfoundation/algokit-utils/types/transaction'\nimport type { ABIResult, TransactionWithSigner } from 'algosdk'\nimport { Algodv2, OnApplicationComplete, Transaction, AtomicTransactionComposer, modelsv2 } from 'algosdk'`\n}\n"],"names":[],"mappings":";;AAEM,UAAW,OAAO,GAAA;IACtB,MAAM,CAAA;;;;;;;;;;;;;;;;;;;;;;2GAsBmG,CAAA;AAC3G;;;;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
function* imports() {
|
|
2
|
+
yield `import * as algokit from '@algorandfoundation/algokit-utils'
|
|
3
|
+
import type {
|
|
4
|
+
ABIAppCallArg,
|
|
5
|
+
AppCallTransactionResult,
|
|
6
|
+
AppCallTransactionResultOfType,
|
|
7
|
+
AppCompilationResult,
|
|
8
|
+
AppReference,
|
|
9
|
+
AppState,
|
|
10
|
+
CoreAppCallArgs,
|
|
11
|
+
RawAppCallArgs,
|
|
12
|
+
TealTemplateParams,
|
|
13
|
+
} from '@algorandfoundation/algokit-utils/types/app'
|
|
14
|
+
import type {
|
|
15
|
+
AppClientCallCoreParams,
|
|
16
|
+
AppClientCompilationParams,
|
|
17
|
+
AppClientDeployCoreParams,
|
|
18
|
+
AppDetails,
|
|
19
|
+
ApplicationClient,
|
|
20
|
+
} from '@algorandfoundation/algokit-utils/types/app-client'
|
|
21
|
+
import type { AppSpec } from '@algorandfoundation/algokit-utils/types/app-spec'
|
|
22
|
+
import type { SendTransactionResult, TransactionToSign, SendTransactionFrom, SendTransactionParams } from '@algorandfoundation/algokit-utils/types/transaction'
|
|
23
|
+
import type { ABIResult, TransactionWithSigner } from 'algosdk'
|
|
24
|
+
import { Algodv2, OnApplicationComplete, Transaction, AtomicTransactionComposer, modelsv2 } from 'algosdk'`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { imports };
|
|
28
|
+
//# sourceMappingURL=imports.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imports.mjs","sources":["../../src/client/imports.ts"],"sourcesContent":["import { DocumentParts } from '../output/writer'\n\nexport function* imports(): DocumentParts {\n yield `import * as algokit from '@algorandfoundation/algokit-utils'\nimport type {\n ABIAppCallArg,\n AppCallTransactionResult,\n AppCallTransactionResultOfType,\n AppCompilationResult,\n AppReference,\n AppState,\n CoreAppCallArgs,\n RawAppCallArgs,\n TealTemplateParams,\n} from '@algorandfoundation/algokit-utils/types/app'\nimport type {\n AppClientCallCoreParams,\n AppClientCompilationParams,\n AppClientDeployCoreParams,\n AppDetails,\n ApplicationClient,\n} from '@algorandfoundation/algokit-utils/types/app-client'\nimport type { AppSpec } from '@algorandfoundation/algokit-utils/types/app-spec'\nimport type { SendTransactionResult, TransactionToSign, SendTransactionFrom, SendTransactionParams } from '@algorandfoundation/algokit-utils/types/transaction'\nimport type { ABIResult, TransactionWithSigner } from 'algosdk'\nimport { Algodv2, OnApplicationComplete, Transaction, AtomicTransactionComposer, modelsv2 } from 'algosdk'`\n}\n"],"names":[],"mappings":"AAEM,UAAW,OAAO,GAAA;IACtB,MAAM,CAAA;;;;;;;;;;;;;;;;;;;;;;2GAsBmG,CAAA;AAC3G;;;;"}
|
package/client/utility-types.js
CHANGED
|
@@ -1,49 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var writer = require('../output/writer.js');
|
|
4
|
+
|
|
5
5
|
function* utilityTypes() {
|
|
6
|
-
yield*
|
|
6
|
+
yield* writer.jsDoc(`Defines an onCompletionAction of 'no_op'`);
|
|
7
7
|
yield `export type OnCompleteNoOp = { onCompleteAction?: 'no_op' | OnApplicationComplete.NoOpOC }`;
|
|
8
|
-
yield*
|
|
8
|
+
yield* writer.jsDoc(`Defines an onCompletionAction of 'opt_in'`);
|
|
9
9
|
yield `export type OnCompleteOptIn = { onCompleteAction: 'opt_in' | OnApplicationComplete.OptInOC }`;
|
|
10
|
-
yield*
|
|
10
|
+
yield* writer.jsDoc(`Defines an onCompletionAction of 'close_out'`);
|
|
11
11
|
yield `export type OnCompleteCloseOut = { onCompleteAction: 'close_out' | OnApplicationComplete.CloseOutOC }`;
|
|
12
|
-
yield*
|
|
12
|
+
yield* writer.jsDoc(`Defines an onCompletionAction of 'delete_application'`);
|
|
13
13
|
yield `export type OnCompleteDelApp = { onCompleteAction: 'delete_application' | OnApplicationComplete.DeleteApplicationOC }`;
|
|
14
|
-
yield*
|
|
14
|
+
yield* writer.jsDoc(`Defines an onCompletionAction of 'update_application'`);
|
|
15
15
|
yield `export type OnCompleteUpdApp = { onCompleteAction: 'update_application' | OnApplicationComplete.UpdateApplicationOC }`;
|
|
16
|
-
yield*
|
|
16
|
+
yield* writer.jsDoc('A state record containing a single unsigned integer');
|
|
17
17
|
yield `export type IntegerState = {`;
|
|
18
|
-
yield
|
|
19
|
-
yield*
|
|
18
|
+
yield writer.IncIndent;
|
|
19
|
+
yield* writer.jsDoc('Gets the state value as a BigInt.');
|
|
20
20
|
yield `asBigInt(): bigint`;
|
|
21
|
-
yield*
|
|
21
|
+
yield* writer.jsDoc('Gets the state value as a number.');
|
|
22
22
|
yield `asNumber(): number`;
|
|
23
|
-
yield
|
|
24
|
-
yield*
|
|
23
|
+
yield writer.DecIndentAndCloseBlock;
|
|
24
|
+
yield* writer.jsDoc('A state record containing binary data');
|
|
25
25
|
yield `export type BinaryState = {`;
|
|
26
|
-
yield
|
|
27
|
-
yield*
|
|
26
|
+
yield writer.IncIndent;
|
|
27
|
+
yield* writer.jsDoc('Gets the state value as a Uint8Array');
|
|
28
28
|
yield `asByteArray(): Uint8Array`;
|
|
29
|
-
yield*
|
|
29
|
+
yield* writer.jsDoc('Gets the state value as a string');
|
|
30
30
|
yield `asString(): string`;
|
|
31
|
-
yield
|
|
32
|
-
yield
|
|
31
|
+
yield writer.DecIndentAndCloseBlock;
|
|
32
|
+
yield writer.NewLine;
|
|
33
33
|
yield `export type AppCreateCallTransactionResult = AppCallTransactionResult & Partial<AppCompilationResult> & AppReference`;
|
|
34
34
|
yield `export type AppUpdateCallTransactionResult = AppCallTransactionResult & Partial<AppCompilationResult>`;
|
|
35
|
-
yield
|
|
35
|
+
yield writer.NewLine;
|
|
36
36
|
yield `export type AppClientComposeCallCoreParams = Omit<AppClientCallCoreParams, 'sendParams'> & {`;
|
|
37
|
-
yield*
|
|
37
|
+
yield* writer.indent(`sendParams?: Omit<SendTransactionParams, 'skipSending' | 'atc' | 'skipWaiting' | 'maxRoundsToWaitForConfirmation' | 'populateAppCallResources'>`);
|
|
38
38
|
yield `}`;
|
|
39
39
|
yield `export type AppClientComposeExecuteParams = Pick<SendTransactionParams, 'skipWaiting' | 'maxRoundsToWaitForConfirmation' | 'populateAppCallResources' | 'suppressLog'>`;
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
exports.OnCompleteCodeMap = {
|
|
41
|
+
const OnCompleteCodeMap = {
|
|
43
42
|
no_op: 'OnCompleteNoOp',
|
|
44
43
|
opt_in: 'OnCompleteOptIn',
|
|
45
44
|
close_out: 'OnCompleteCloseOut',
|
|
46
45
|
delete_application: 'OnCompleteDelApp',
|
|
47
46
|
update_application: 'OnCompleteUpdApp',
|
|
48
47
|
};
|
|
49
|
-
|
|
48
|
+
|
|
49
|
+
exports.OnCompleteCodeMap = OnCompleteCodeMap;
|
|
50
|
+
exports.utilityTypes = utilityTypes;
|
|
51
|
+
//# sourceMappingURL=utility-types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utility-types.js","
|
|
1
|
+
{"version":3,"file":"utility-types.js","sources":["../../src/client/utility-types.ts"],"sourcesContent":["import { DecIndentAndCloseBlock, DocumentParts, IncIndent, indent, jsDoc, NewLine } from '../output/writer'\n\nexport function* utilityTypes(): DocumentParts {\n yield* jsDoc(`Defines an onCompletionAction of 'no_op'`)\n yield `export type OnCompleteNoOp = { onCompleteAction?: 'no_op' | OnApplicationComplete.NoOpOC }`\n yield* jsDoc(`Defines an onCompletionAction of 'opt_in'`)\n yield `export type OnCompleteOptIn = { onCompleteAction: 'opt_in' | OnApplicationComplete.OptInOC }`\n yield* jsDoc(`Defines an onCompletionAction of 'close_out'`)\n yield `export type OnCompleteCloseOut = { onCompleteAction: 'close_out' | OnApplicationComplete.CloseOutOC }`\n yield* jsDoc(`Defines an onCompletionAction of 'delete_application'`)\n yield `export type OnCompleteDelApp = { onCompleteAction: 'delete_application' | OnApplicationComplete.DeleteApplicationOC }`\n yield* jsDoc(`Defines an onCompletionAction of 'update_application'`)\n yield `export type OnCompleteUpdApp = { onCompleteAction: 'update_application' | OnApplicationComplete.UpdateApplicationOC }`\n\n yield* jsDoc('A state record containing a single unsigned integer')\n yield `export type IntegerState = {`\n yield IncIndent\n yield* jsDoc('Gets the state value as a BigInt.')\n yield `asBigInt(): bigint`\n yield* jsDoc('Gets the state value as a number.')\n yield `asNumber(): number`\n yield DecIndentAndCloseBlock\n yield* jsDoc('A state record containing binary data')\n yield `export type BinaryState = {`\n yield IncIndent\n yield* jsDoc('Gets the state value as a Uint8Array')\n yield `asByteArray(): Uint8Array`\n yield* jsDoc('Gets the state value as a string')\n yield `asString(): string`\n yield DecIndentAndCloseBlock\n\n yield NewLine\n yield `export type AppCreateCallTransactionResult = AppCallTransactionResult & Partial<AppCompilationResult> & AppReference`\n yield `export type AppUpdateCallTransactionResult = AppCallTransactionResult & Partial<AppCompilationResult>`\n\n yield NewLine\n yield `export type AppClientComposeCallCoreParams = Omit<AppClientCallCoreParams, 'sendParams'> & {`\n yield* indent(\n `sendParams?: Omit<SendTransactionParams, 'skipSending' | 'atc' | 'skipWaiting' | 'maxRoundsToWaitForConfirmation' | 'populateAppCallResources'>`,\n )\n yield `}`\n yield `export type AppClientComposeExecuteParams = Pick<SendTransactionParams, 'skipWaiting' | 'maxRoundsToWaitForConfirmation' | 'populateAppCallResources' | 'suppressLog'>`\n}\n\nexport const OnCompleteCodeMap = {\n no_op: 'OnCompleteNoOp',\n opt_in: 'OnCompleteOptIn',\n close_out: 'OnCompleteCloseOut',\n delete_application: 'OnCompleteDelApp',\n update_application: 'OnCompleteUpdApp',\n}\n"],"names":["jsDoc","IncIndent","DecIndentAndCloseBlock","NewLine","indent"],"mappings":";;;;AAEM,UAAW,YAAY,GAAA;AAC3B,IAAA,OAAOA,YAAK,CAAC,CAAA,wCAAA,CAA0C,CAAC,CAAA;AACxD,IAAA,MAAM,6FAA6F,CAAA;AACnG,IAAA,OAAOA,YAAK,CAAC,CAAA,yCAAA,CAA2C,CAAC,CAAA;AACzD,IAAA,MAAM,+FAA+F,CAAA;AACrG,IAAA,OAAOA,YAAK,CAAC,CAAA,4CAAA,CAA8C,CAAC,CAAA;AAC5D,IAAA,MAAM,wGAAwG,CAAA;AAC9G,IAAA,OAAOA,YAAK,CAAC,CAAA,qDAAA,CAAuD,CAAC,CAAA;AACrE,IAAA,MAAM,wHAAwH,CAAA;AAC9H,IAAA,OAAOA,YAAK,CAAC,CAAA,qDAAA,CAAuD,CAAC,CAAA;AACrE,IAAA,MAAM,wHAAwH,CAAA;AAE9H,IAA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|
2
|
+
|
|
3
|
+
function* utilityTypes() {
|
|
4
|
+
yield* jsDoc(`Defines an onCompletionAction of 'no_op'`);
|
|
5
|
+
yield `export type OnCompleteNoOp = { onCompleteAction?: 'no_op' | OnApplicationComplete.NoOpOC }`;
|
|
6
|
+
yield* jsDoc(`Defines an onCompletionAction of 'opt_in'`);
|
|
7
|
+
yield `export type OnCompleteOptIn = { onCompleteAction: 'opt_in' | OnApplicationComplete.OptInOC }`;
|
|
8
|
+
yield* jsDoc(`Defines an onCompletionAction of 'close_out'`);
|
|
9
|
+
yield `export type OnCompleteCloseOut = { onCompleteAction: 'close_out' | OnApplicationComplete.CloseOutOC }`;
|
|
10
|
+
yield* jsDoc(`Defines an onCompletionAction of 'delete_application'`);
|
|
11
|
+
yield `export type OnCompleteDelApp = { onCompleteAction: 'delete_application' | OnApplicationComplete.DeleteApplicationOC }`;
|
|
12
|
+
yield* jsDoc(`Defines an onCompletionAction of 'update_application'`);
|
|
13
|
+
yield `export type OnCompleteUpdApp = { onCompleteAction: 'update_application' | OnApplicationComplete.UpdateApplicationOC }`;
|
|
14
|
+
yield* jsDoc('A state record containing a single unsigned integer');
|
|
15
|
+
yield `export type IntegerState = {`;
|
|
16
|
+
yield IncIndent;
|
|
17
|
+
yield* jsDoc('Gets the state value as a BigInt.');
|
|
18
|
+
yield `asBigInt(): bigint`;
|
|
19
|
+
yield* jsDoc('Gets the state value as a number.');
|
|
20
|
+
yield `asNumber(): number`;
|
|
21
|
+
yield DecIndentAndCloseBlock;
|
|
22
|
+
yield* jsDoc('A state record containing binary data');
|
|
23
|
+
yield `export type BinaryState = {`;
|
|
24
|
+
yield IncIndent;
|
|
25
|
+
yield* jsDoc('Gets the state value as a Uint8Array');
|
|
26
|
+
yield `asByteArray(): Uint8Array`;
|
|
27
|
+
yield* jsDoc('Gets the state value as a string');
|
|
28
|
+
yield `asString(): string`;
|
|
29
|
+
yield DecIndentAndCloseBlock;
|
|
30
|
+
yield NewLine;
|
|
31
|
+
yield `export type AppCreateCallTransactionResult = AppCallTransactionResult & Partial<AppCompilationResult> & AppReference`;
|
|
32
|
+
yield `export type AppUpdateCallTransactionResult = AppCallTransactionResult & Partial<AppCompilationResult>`;
|
|
33
|
+
yield NewLine;
|
|
34
|
+
yield `export type AppClientComposeCallCoreParams = Omit<AppClientCallCoreParams, 'sendParams'> & {`;
|
|
35
|
+
yield* indent(`sendParams?: Omit<SendTransactionParams, 'skipSending' | 'atc' | 'skipWaiting' | 'maxRoundsToWaitForConfirmation' | 'populateAppCallResources'>`);
|
|
36
|
+
yield `}`;
|
|
37
|
+
yield `export type AppClientComposeExecuteParams = Pick<SendTransactionParams, 'skipWaiting' | 'maxRoundsToWaitForConfirmation' | 'populateAppCallResources' | 'suppressLog'>`;
|
|
38
|
+
}
|
|
39
|
+
const OnCompleteCodeMap = {
|
|
40
|
+
no_op: 'OnCompleteNoOp',
|
|
41
|
+
opt_in: 'OnCompleteOptIn',
|
|
42
|
+
close_out: 'OnCompleteCloseOut',
|
|
43
|
+
delete_application: 'OnCompleteDelApp',
|
|
44
|
+
update_application: 'OnCompleteUpdApp',
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export { OnCompleteCodeMap, utilityTypes };
|
|
48
|
+
//# sourceMappingURL=utility-types.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utility-types.mjs","sources":["../../src/client/utility-types.ts"],"sourcesContent":["import { DecIndentAndCloseBlock, DocumentParts, IncIndent, indent, jsDoc, NewLine } from '../output/writer'\n\nexport function* utilityTypes(): DocumentParts {\n yield* jsDoc(`Defines an onCompletionAction of 'no_op'`)\n yield `export type OnCompleteNoOp = { onCompleteAction?: 'no_op' | OnApplicationComplete.NoOpOC }`\n yield* jsDoc(`Defines an onCompletionAction of 'opt_in'`)\n yield `export type OnCompleteOptIn = { onCompleteAction: 'opt_in' | OnApplicationComplete.OptInOC }`\n yield* jsDoc(`Defines an onCompletionAction of 'close_out'`)\n yield `export type OnCompleteCloseOut = { onCompleteAction: 'close_out' | OnApplicationComplete.CloseOutOC }`\n yield* jsDoc(`Defines an onCompletionAction of 'delete_application'`)\n yield `export type OnCompleteDelApp = { onCompleteAction: 'delete_application' | OnApplicationComplete.DeleteApplicationOC }`\n yield* jsDoc(`Defines an onCompletionAction of 'update_application'`)\n yield `export type OnCompleteUpdApp = { onCompleteAction: 'update_application' | OnApplicationComplete.UpdateApplicationOC }`\n\n yield* jsDoc('A state record containing a single unsigned integer')\n yield `export type IntegerState = {`\n yield IncIndent\n yield* jsDoc('Gets the state value as a BigInt.')\n yield `asBigInt(): bigint`\n yield* jsDoc('Gets the state value as a number.')\n yield `asNumber(): number`\n yield DecIndentAndCloseBlock\n yield* jsDoc('A state record containing binary data')\n yield `export type BinaryState = {`\n yield IncIndent\n yield* jsDoc('Gets the state value as a Uint8Array')\n yield `asByteArray(): Uint8Array`\n yield* jsDoc('Gets the state value as a string')\n yield `asString(): string`\n yield DecIndentAndCloseBlock\n\n yield NewLine\n yield `export type AppCreateCallTransactionResult = AppCallTransactionResult & Partial<AppCompilationResult> & AppReference`\n yield `export type AppUpdateCallTransactionResult = AppCallTransactionResult & Partial<AppCompilationResult>`\n\n yield NewLine\n yield `export type AppClientComposeCallCoreParams = Omit<AppClientCallCoreParams, 'sendParams'> & {`\n yield* indent(\n `sendParams?: Omit<SendTransactionParams, 'skipSending' | 'atc' | 'skipWaiting' | 'maxRoundsToWaitForConfirmation' | 'populateAppCallResources'>`,\n )\n yield `}`\n yield `export type AppClientComposeExecuteParams = Pick<SendTransactionParams, 'skipWaiting' | 'maxRoundsToWaitForConfirmation' | 'populateAppCallResources' | 'suppressLog'>`\n}\n\nexport const OnCompleteCodeMap = {\n no_op: 'OnCompleteNoOp',\n opt_in: 'OnCompleteOptIn',\n close_out: 'OnCompleteCloseOut',\n delete_application: 'OnCompleteDelApp',\n update_application: 'OnCompleteUpdApp',\n}\n"],"names":[],"mappings":";;AAEM,UAAW,YAAY,GAAA;AAC3B,IAAA,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MAAM,8FAA8F,CAAA;AACpG,IAAA,OAAO,MAAM,CACX,CAAA,+IAAA,CAAiJ,CAClJ,CAAA;AACD,IAAA,MAAM,GAAG,CAAA;AACT,IAAA,MAAM,wKAAwK,CAAA;AAChL,CAAC;AAEY,MAAA,iBAAiB,GAAG;AAC/B,IAAA,KAAK,EAAE,gBAAgB;AACvB,IAAA,MAAM,EAAE,iBAAiB;AACzB,IAAA,SAAS,EAAE,oBAAoB;AAC/B,IAAA,kBAAkB,EAAE,kBAAkB;AACtC,IAAA,kBAAkB,EAAE,kBAAkB;;;;;"}
|
package/dev.d.ts
CHANGED
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var load = require('./schema/load.js');
|
|
4
|
+
var generate = require('./client/generate.js');
|
|
5
|
+
var writer = require('./output/writer.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
exports.loadApplicationJson = load.loadApplicationJson;
|
|
10
|
+
exports.validateApplicationJson = load.validateApplicationJson;
|
|
11
|
+
exports.generate = generate.generate;
|
|
12
|
+
exports.writeDocumentPartsToStream = writer.writeDocumentPartsToStream;
|
|
13
|
+
exports.writeDocumentPartsToString = writer.writeDocumentPartsToString;
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
package/index.mjs
ADDED
package/index.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/output/writer.d.ts
CHANGED