@algorandfoundation/puya-ts 1.2.0-beta.4 → 1.2.0-beta.40

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.
Files changed (111) hide show
  1. package/README.md +7 -5
  2. package/{analyser-service-_vXhzOY0.js → analyser-service-D0IsFlp4.js} +409 -372
  3. package/analyser-service-D0IsFlp4.js.map +1 -0
  4. package/analyserService.mjs +7 -6
  5. package/analyserService.mjs.map +1 -1
  6. package/arc4-clientgen-BMCeFyNd.js +324 -0
  7. package/arc4-clientgen-BMCeFyNd.js.map +1 -0
  8. package/arc4-clientgen.d.ts +6 -0
  9. package/awst/intrinsic-factory.d.ts +4 -2
  10. package/awst/json-serialize-awst.d.ts +0 -1
  11. package/awst/node-factory.d.ts +1 -0
  12. package/awst/nodes.d.ts +26 -15
  13. package/awst/source-location.d.ts +0 -1
  14. package/awst/to-code-visitor.d.ts +3 -2
  15. package/awst/validation/arc4-approval-calls-router.d.ts +1 -1
  16. package/awst/validation/{awst-traverser.d.ts → function-traverser.d.ts} +4 -10
  17. package/awst/wtypes.d.ts +47 -45
  18. package/awst_build/arc4-util.d.ts +1 -38
  19. package/awst_build/ast-visitors/base-visitor.d.ts +0 -1
  20. package/awst_build/ast-visitors/class-definition-visitor.d.ts +721 -1
  21. package/awst_build/ast-visitors/contract-method-visitor.d.ts +3 -5
  22. package/awst_build/ast-visitors/function-visitor.d.ts +721 -1
  23. package/awst_build/ast-visitors/text-visitor.d.ts +721 -1
  24. package/awst_build/context/awst-build-context.d.ts +1 -1
  25. package/awst_build/eb/arc28/arc-28-emit-function-builder.d.ts +1 -2
  26. package/awst_build/eb/arc4/arrays.d.ts +2 -1
  27. package/awst_build/eb/arc4/c2c.d.ts +0 -17
  28. package/awst_build/eb/arc4/uintn.d.ts +1 -1
  29. package/awst_build/eb/arc4/util.d.ts +1 -0
  30. package/awst_build/eb/array-like/arrays.d.ts +3 -2
  31. package/awst_build/eb/array-like/util.d.ts +0 -1
  32. package/awst_build/eb/bytes-expression-builder.d.ts +0 -28
  33. package/awst_build/eb/contract-builder.d.ts +0 -11
  34. package/awst_build/eb/index.d.ts +0 -2
  35. package/awst_build/eb/literal/object-literal-expression-builder.d.ts +8 -4
  36. package/awst_build/eb/logged-error-builder.d.ts +11 -0
  37. package/awst_build/eb/objects/util.d.ts +0 -2
  38. package/awst_build/eb/op-module-builder.d.ts +0 -3
  39. package/awst_build/eb/storage/box/box.d.ts +1 -21
  40. package/awst_build/eb/storage/global-map.d.ts +21 -0
  41. package/awst_build/eb/storage/local-map.d.ts +21 -0
  42. package/awst_build/eb/string-expression-builder.d.ts +0 -6
  43. package/awst_build/eb/util/resolve-compat-builder.d.ts +0 -8
  44. package/awst_build/models/decorator-data.d.ts +1 -0
  45. package/awst_build/op-metadata.d.ts +4 -3
  46. package/awst_build/ptypes/arc4-types.d.ts +11 -7
  47. package/awst_build/ptypes/base.d.ts +5 -0
  48. package/awst_build/ptypes/for-export.d.ts +0 -1
  49. package/awst_build/ptypes/index.d.ts +103 -100
  50. package/awst_build/ptypes/util.d.ts +2 -2
  51. package/awst_build/ptypes/visitor.d.ts +3 -1
  52. package/awst_build/ptypes/visitors/default-visitor.d.ts +3 -1
  53. package/awst_build/ptypes/visitors/index-type-visitor.d.ts +0 -31
  54. package/awst_build/type-resolver.d.ts +1 -1
  55. package/bin/puyats-clientgen.d.ts +2 -0
  56. package/bin/puyats-clientgen.mjs +101 -0
  57. package/bin/puyats-clientgen.mjs.map +1 -0
  58. package/bin/puyats-ls.mjs +24 -49
  59. package/bin/puyats-ls.mjs.map +1 -1
  60. package/bin/run-cli.mjs +19 -13
  61. package/bin/run-cli.mjs.map +1 -1
  62. package/{check-node-version-CNvxI8_l.js → check-node-version-BP_a9Mv8.js} +3 -3
  63. package/{check-node-version-CNvxI8_l.js.map → check-node-version-BP_a9Mv8.js.map} +1 -1
  64. package/cli/build-command.d.ts +2 -0
  65. package/cli-ls.d.ts +1 -1
  66. package/cli.d.ts +1 -1
  67. package/cli.mjs +39 -79
  68. package/cli.mjs.map +1 -1
  69. package/clientgen.d.ts +1 -0
  70. package/code-fix/{invalid-non-null-assertion.d.ts → no-op-non-null-assertion.d.ts} +1 -1
  71. package/{compile-Bz8LVwK2.js → compile-BaYaEC1Y.js} +11 -4
  72. package/compile-BaYaEC1Y.js.map +1 -0
  73. package/compile.d.ts +1 -1
  74. package/constants.d.ts +7 -2
  75. package/contract-class-model-pgJctz5F.js +5456 -0
  76. package/contract-class-model-pgJctz5F.js.map +1 -0
  77. package/errors.d.ts +1 -6
  78. package/index.d.ts +1 -2
  79. package/index.mjs +36 -26
  80. package/index.mjs.map +1 -1
  81. package/language-server/analyser-service.d.ts +0 -1
  82. package/language-server/compile-trigger-queue.d.ts +2 -2
  83. package/language-server/puya-language-server.d.ts +0 -38
  84. package/logger/index.d.ts +0 -7
  85. package/{options-COFRHTFQ.js → options-8bOJR8qx.js} +2776 -8517
  86. package/options-8bOJR8qx.js.map +1 -0
  87. package/options.d.ts +8 -3
  88. package/package.json +20 -12
  89. package/puya/check-puya-version.d.ts +0 -13
  90. package/puya/index.d.ts +1 -1
  91. package/puya/log-deserializer.d.ts +0 -2
  92. package/puya/puya-service.d.ts +5 -1
  93. package/{resolve-puya-path-DtTAMi0Y.js → resolve-puya-path-EZBzWIlE.js} +9 -45
  94. package/resolve-puya-path-EZBzWIlE.js.map +1 -0
  95. package/semver-DpFo0aCr.js +45 -0
  96. package/semver-DpFo0aCr.js.map +1 -0
  97. package/util/base-85.d.ts +1 -4
  98. package/util/generate-temp-file.d.ts +0 -8
  99. package/util/index.d.ts +1 -3
  100. package/util/typed-message-port.d.ts +2 -2
  101. package/util-JPoBh0Op.js +63 -0
  102. package/util-JPoBh0Op.js.map +1 -0
  103. package/visitor/syntax-names.d.ts +194 -194
  104. package/visitor/visitor.d.ts +4 -4
  105. package/analyser-service-_vXhzOY0.js.map +0 -1
  106. package/compile-Bz8LVwK2.js.map +0 -1
  107. package/language-server/ls-logger.d.ts +0 -11
  108. package/options-COFRHTFQ.js.map +0 -1
  109. package/resolve-puya-path-DtTAMi0Y.js.map +0 -1
  110. package/util/arc4-signature-parser.d.ts +0 -14
  111. package/util/polyfills.d.ts +0 -1
package/errors.d.ts CHANGED
@@ -12,7 +12,7 @@ export declare class PuyaError extends Error {
12
12
  /**
13
13
  * Any error that is 'caused' by a user of Puya
14
14
  */
15
- export declare abstract class UserError extends PuyaError {
15
+ declare abstract class UserError extends PuyaError {
16
16
  }
17
17
  /**
18
18
  * Thrown when the user's code is invalid, or not supported
@@ -50,11 +50,6 @@ export declare class InternalError extends PuyaError {
50
50
  export declare class NotSupported extends CodeError {
51
51
  constructor(featureName: string, options?: PuyaErrorOptions);
52
52
  }
53
- /**
54
- * Thrown when the user's environment is not set up correctly
55
- */
56
- export declare class EnvironmentError extends UserError {
57
- }
58
53
  export declare const throwError: (error: Error) => never;
59
54
  export declare const wrapInCodeError: <T>(func: () => T, sourceLocation: SourceLocation) => T;
60
55
  export {};
package/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { base64ToUint8Array, hexToUint8Array, uint8ArrayToBase64, uint8ArrayToHex } from './util';
2
- import './util/polyfills';
3
2
  export { SourceLocation } from './awst/source-location';
4
3
  export * as ptypes from './awst_build/ptypes/for-export';
5
4
  export { registerPTypes } from './awst_build/ptypes/register';
@@ -7,7 +6,7 @@ export { typeRegistry } from './awst_build/type-registry';
7
6
  export { TypeResolver } from './awst_build/type-resolver';
8
7
  export { compile } from './compile';
9
8
  export { processInputPaths } from './input-paths/process-input-paths';
10
- export { LoggingContext } from './logger';
9
+ export { LoggingContext, LogLevel, LogSource, LogEvent } from './logger';
11
10
  export { CompileOptions } from './options';
12
11
  export { AbsolutePath } from './util/absolute-path';
13
12
  export declare const encodingUtil: {
package/index.mjs CHANGED
@@ -1,15 +1,18 @@
1
- import { A as ABICompatibleInstanceType, a as ALL_OP_ENUMS, b as ARC4ArrayType, c as ARC4BoolClass, d as ARC4EncodedType, e as ARC4InstanceType, f as ARC4StrClass, g as ARC4StructClass, h as ARC4StructType, i as ARC4TupleType, j as AccountFunction, k as AddressClass, l as AnyPType, m as ApplicationFunctionType, n as ApplicationTxnFunction, o as ApprovalProgram, p as Arc4TupleGeneric, q as ArrayGeneric, r as ArrayLiteralPType, s as ArrayPType, t as AssetConfigTxnFunction, u as AssetFreezeTxnFunction, v as AssetFunction, w as AssetTransferTxnFunction, B as BaseContractClassType, x as BigIntLiteralPType, y as BigIntPType, z as BigUintFunction, D as BooleanFunction, E as BoxGeneric, F as BoxMapGeneric, G as BoxMapPType, H as BoxPType, I as ByteClass, J as BytesFunction, K as BytesGeneric, L as BytesPType, M as ClassMethodDecoratorContext, N as ClearStateProgram, O as ClusteredContractClassType, P as ClusteredPrototype, Q as ContractClassPType, R as ContractProxyGeneric, S as ContractProxyType, T as DynamicArrayGeneric, U as DynamicArrayType, V as DynamicBytesConstructor, W as DynamicBytesType, X as FixedArrayGeneric, Y as FixedArrayPType, Z as FunctionPType, _ as GeneratorGeneric, $ as GeneratorType, a0 as GenericPType, a1 as GlobalStateGeneric, a2 as GlobalStateType, a3 as GroupTransactionPType, a4 as ImmutableObjectPType, a5 as InnerTransactionPType, a6 as InstanceType, a7 as InternalType, a8 as IntersectionPType, a9 as IntrinsicEnumType, aa as IntrinsicFunctionGroupType, ab as IntrinsicFunctionGroupTypeType, ac as IntrinsicFunctionType, ad as IntrinsicFunctionTypeType, ae as IterableIteratorGeneric, af as IterableIteratorType, ag as ItxnParamsPType, ah as KeyRegistrationTxnFunction, ai as LibClassType, aj as LibFunctionType, ak as LibObjType, al as LocalStateGeneric, am as LocalStateType, an as LogicSigPType, ao as MutableObjectPType, ap as MutableTuplePType, aq as NamespacePType, ar as NumberPType, as as NumericLiteralPType, at as ObjectLiteralPType, au as ObjectWithOptionalFieldsType, av as PType, aw as PaymentTxnFunction, ax as PolytypeClassMethodHelper, ay as PromiseGeneric, az as PromiseType, aA as ReadonlyArrayGeneric, aB as ReadonlyArrayPType, aC as ReadonlyGeneric, aD as ReadonlyTuplePType, aE as ReferenceArrayGeneric, aF as ReferenceArrayType, aG as StaticArrayGeneric, aH as StaticArrayType, aI as StaticBytesGeneric, aJ as StaticBytesType, aK as StringFunction, aL as SuperPrototypeSelector, aM as SuperPrototypeSelectorGeneric, aN as TemplateVarFunction, aO as TransactionFunction, aP as TransactionFunctionType, aQ as TransientType, aR as TypeParameterType, aS as TypedApplicationCallResponseGeneric, aT as TypedApplicationCallResponseType, aU as UFixedNxMGeneric, aV as UFixedNxMType, aW as Uint64EnumMemberLiteralType, aX as Uint64EnumMemberType, aY as Uint64EnumType, aZ as Uint64Function, a_ as UintN128Class, a$ as UintN16Class, b0 as UintN256Class, b1 as UintN32Class, b2 as UintN64Class, b3 as UintN8Class, b4 as UintNGeneric, b5 as UintNType, b6 as UnionPType, b7 as UnsupportedType, b8 as abiCallFunction, b9 as accountPType, ba as anyGtxnType, bb as anyItxnParamsType, bc as anyItxnType, bd as anyPType, be as applicationCallGtxnType, bf as applicationCallItxnFn, bg as applicationCallItxnParamsType, bh as applicationItxnType, bi as applicationPType, bj as arc28EmitFunction, bk as arc4AbiMethodDecorator, bl as arc4AddressAlias, bm as arc4BareMethodDecorator, bn as arc4BaseContractType, bo as arc4BooleanType, bp as arc4ByteAlias, bq as arc4StringType, br as arc4StructBaseType, bs as arc4Uint64, bt as assertFunction, bu as assertMatchFunction, bv as assetConfigGtxnType, bw as assetConfigItxnFn, bx as assetConfigItxnParamsType, by as assetConfigItxnType, bz as assetFreezeGtxnType, bA as assetFreezeItxnFn, bB as assetFreezeItxnParamsType, bC as assetFreezeItxnType, bD as assetPType, bE as assetTransferGtxnType, bF as assetTransferItxnFn, bG as assetTransferItxnParamsType, bH as assetTransferItxnType, bI as base64PType, bJ as baseContractType, bK as bigIntPType, bL as biguintPType, bM as boolPType, bN as bytesPType, bO as bzeroFunction, bP as cloneFunctionPType, bQ as compileArc4Function, bR as compileFunctionType, bS as compiledContractType, bT as compiledLogicSigType, bU as contractOptionsDecorator, bV as convertBytesFunction, bW as decodeArc4Function, bX as ecPType, bY as ecdsaPType, bZ as encodeArc4Function, b_ as ensureBudgetFunction, b$ as errFunction, c0 as esSymbol, c1 as inputOnlyObjects, c2 as isArrayType, c3 as isObjectType, c4 as isTupleLike, c5 as itoaMethod, c6 as itxnComposePType, c7 as keyRegistrationGtxnType, c8 as keyRegistrationItxnFn, c9 as keyRegistrationItxnParamsType, ca as keyRegistrationItxnType, cb as logFunction, cc as logicSigBaseType, cd as logicSigOptionsDecorator, ce as matchFunction, cf as methodSelectorFunction, cg as mimcConfigurationsPType, ch as neverPType, ci as nullPType, cj as numberPType, ck as onCompleteActionType, cl as opUpFeeSourceType, cm as paymentGtxnType, cn as paymentItxnFn, co as paymentItxnParamsType, cp as paymentItxnType, cq as ptypeToArc4EncodedType, cr as readonlyDecorator, cs as sizeOfFunction, ct as stringPType, cu as submitGroupItxnFunction, cv as transactionTypeType, cw as uint64PType, cx as undefinedPType, cy as unknownPType, cz as urangeFunction, cA as validateEncodingFunctionPType, cB as voidPType, cC as vrfVerifyPType, cD as uint8ArrayToBigInt, cE as uint8ArrayToBase64, cF as uint8ArrayToBase32, cG as uint8ArrayToHex, cH as uint8ArrayToUtf8, cI as base64ToUint8Array, cJ as base32ToUint8Array, cK as hexToUint8Array, cL as bigIntToUint8Array, cM as utf8ToUint8Array } from './options-COFRHTFQ.js';
2
- export { cU as AbsolutePath, cT as CompileOptions, cS as LoggingContext, cN as SourceLocation, cQ as TypeResolver, cR as processInputPaths, cO as registerPTypes, cP as typeRegistry } from './options-COFRHTFQ.js';
3
- export { c as compile } from './compile-Bz8LVwK2.js';
4
- import 'arcsecond';
1
+ import { o as ABICompatibleInstanceType, q as ALL_OP_ENUMS, r as AccountFunction, s as AnyPType, t as ApplicationCallTxnFunction, u as ApplicationFunction, w as ApprovalProgram, x as ArrayGeneric, y as ArrayLiteralPType, z as ArrayPType, B as AssetConfigTxnFunction, D as AssetFreezeTxnFunction, E as AssetFunction, F as AssetTransferTxnFunction, G as BaseContractClassType, H as BigIntLiteralPType, J as BigIntPType, K as BigUintFunction, M as BooleanFunction, N as BoxGeneric, Q as BoxMapGeneric, R as BoxMapPType, S as BoxPType, T as BytesFunction, U as BytesGeneric, V as BytesPType, W as ClassMethodDecoratorContext, X as ClearStateProgram, Y as ClusteredContractClassType, Z as ClusteredPrototype, _ as ContractClassPType, $ as FixedArrayGeneric, a0 as FixedArrayPType, a1 as FunctionPType, a2 as GeneratorGeneric, a3 as GeneratorType, a4 as GenericPType, a5 as GlobalMapGeneric, a6 as GlobalMapType, a7 as GlobalStateGeneric, a8 as GlobalStateType, a9 as GroupTransactionPType, aa as ImmutableObjectPType, ab as InnerTransactionPType, ac as InstanceType, ad as InternalType, ae as IntersectionPType, af as IntrinsicEnumType, ag as IntrinsicFunctionGroupType, ah as IntrinsicFunctionGroupTypeType, ai as IntrinsicFunctionType, aj as IntrinsicFunctionTypeType, ak as IterableIteratorGeneric, al as IterableIteratorType, am as ItxnParamsPType, an as KeyRegistrationTxnFunction, ao as LibClassType, ap as LibFunctionType, aq as LibObjType, ar as LocalMapGeneric, as as LocalMapType, at as LocalStateGeneric, au as LocalStateType, av as LogicSigPType, aw as MutableObjectPType, ax as MutableTuplePType, ay as NamespacePType, az as NumberPType, aA as NumericLiteralPType, aB as ObjectLiteralPType, aC as ObjectWithOptionalFieldsType, aD as PType, aE as PaymentTxnFunction, aF as PolytypeClassMethodHelper, aG as PromiseGeneric, aH as PromiseType, aI as ReadonlyArrayGeneric, aJ as ReadonlyArrayPType, aK as ReadonlyGeneric, aL as ReadonlyTuplePType, aM as ReferenceArrayGeneric, aN as ReferenceArrayType, aO as StringFunction, aP as SuperPrototypeSelector, aQ as SuperPrototypeSelectorGeneric, aR as TemplateVarFunction, aS as TransactionFunction, aT as TransactionFunctionType, aU as TransientType, aV as TypeParameterType, aW as Uint64EnumMemberLiteralType, aX as Uint64EnumMemberType, aY as Uint64EnumType, aZ as Uint64Function, a_ as UnionPType, a$ as UnsupportedType, e as accountPType, h as anyGtxnType, b0 as anyItxnParamsType, b1 as anyItxnType, b2 as anyPType, n as applicationCallGtxnType, b3 as applicationCallItxnFunction, b4 as applicationCallItxnParamsType, b5 as applicationCallItxnType, f as applicationPType, b6 as arc28EmitFunction, b7 as arc4AbiMethodDecorator, b8 as arc4BareMethodDecorator, b9 as arc4BaseContractType, ba as assertFunction, bb as assertMatchFunction, i as assetConfigGtxnType, bc as assetConfigItxnFunction, bd as assetConfigItxnParamsType, be as assetConfigItxnType, m as assetFreezeGtxnType, bf as assetFreezeItxnFunction, bg as assetFreezeItxnParamsType, bh as assetFreezeItxnType, g as assetPType, j as assetTransferGtxnType, bi as assetTransferItxnFunction, bj as assetTransferItxnParamsType, bk as assetTransferItxnType, bl as base64PType, bm as baseContractType, bn as bigIntPType, bo as biguintPType, bp as boolPType, bq as bytesPType, br as bzeroFunction, bs as cloneFunction, bt as compileFunction, bu as compiledContractType, bv as compiledLogicSigType, bw as contractOptionsDecorator, bx as ecPType, by as ecdsaPType, bz as ensureBudgetFunction, bA as errFunction, bB as esSymbol, bC as inputOnlyObjects, bD as isArrayType, bE as isObjectType, bF as isTupleLike, bG as itoaMethod, bH as itxnComposePType, k as keyRegistrationGtxnType, bI as keyRegistrationItxnFunction, bJ as keyRegistrationItxnParamsType, bK as keyRegistrationItxnType, bL as logFunction, bM as loggedAssertFunction, bN as loggedErrFunction, bO as logicSigBaseType, bP as logicSigOptionsDecorator, bQ as matchFunction, bR as mimcConfigurationsPType, bS as neverPType, bT as nullPType, bU as numberPType, bV as onCompleteActionType, bW as opUpFeeSourceType, p as paymentGtxnType, bX as paymentItxnFunction, bY as paymentItxnParamsType, bZ as paymentItxnType, b_ as readonlyDecorator, b$ as stringPType, c0 as submitGroupItxnFunction, c1 as transactionTypeType, c2 as uint64PType, c3 as undefinedPType, c4 as unknownPType, c5 as urangeFunction, c6 as validateEncodingFunction, v as voidPType, c7 as vrfVerifyPType, c8 as uint8ArrayToBigInt, c9 as uint8ArrayToBase64, ca as uint8ArrayToBase32, cb as uint8ArrayToUtf8, cc as base64ToUint8Array, cd as base32ToUint8Array, ce as bigIntToUint8Array, cf as utf8ToUint8Array } from './contract-class-model-pgJctz5F.js';
2
+ export { A as AbsolutePath, L as LogLevel, cg as LogSource, a as LoggingContext, ch as SourceLocation } from './contract-class-model-pgJctz5F.js';
3
+ import { A as ARC4ArrayType, a as ARC4BoolClass, b as ARC4EncodedType, c as ARC4InstanceType, d as ARC4StrClass, e as ARC4StructClass, f as ARC4StructType, g as ARC4TupleGeneric, h as ARC4TupleType, i as AddressClass, B as ByteClass, C as ContractProxyGeneric, j as ContractProxyType, D as DynamicArrayGeneric, k as DynamicArrayType, l as DynamicBytesClass, S as StaticArrayGeneric, m as StaticArrayType, n as StaticBytesGeneric, o as StaticBytesType, T as TypedApplicationCallResponseGeneric, p as TypedApplicationCallResponseType, U as UFixedNxMGeneric, q as UFixedNxMType, r as UintN128Class, s as UintN16Class, t as UintN256Class, u as UintN32Class, v as UintN64Class, w as UintN8Class, x as UintNGeneric, y as UintNType, z as abiCallFunction, E as arc4AddressAlias, F as arc4BooleanType, G as arc4ByteAlias, H as arc4StringType, I as arc4StructBaseType, J as compileArc4Function, K as convertBytesFunction, L as decodeArc4Function, M as dynamicBytesType, N as encodeArc4Function, O as methodSelectorFunction, P as sizeOfFunction, Q as uint8ArrayToHex, R as hexToUint8Array } from './options-8bOJR8qx.js';
4
+ export { V as CompileOptions, W as TypeResolver, X as processInputPaths, Y as registerPTypes, Z as typeRegistry } from './options-8bOJR8qx.js';
5
+ export { c as compile } from './compile-BaYaEC1Y.js';
6
+ import 'typescript';
5
7
  import 'node:fs';
6
8
  import 'node:util';
7
9
  import 'pathe';
8
- import 'tslib';
9
- import 'node:buffer';
10
- import 'typescript';
11
10
  import 'node:crypto';
11
+ import 'polytype';
12
12
  import 'node:async_hooks';
13
+ import 'arcsecond';
14
+ import 'tslib';
15
+ import 'node:buffer';
13
16
  import 'cross-spawn';
14
17
  import 'util';
15
18
  import 'path';
@@ -17,12 +20,15 @@ import 'os';
17
20
  import 'crypto';
18
21
  import 'net';
19
22
  import 'change-case';
20
- import 'polytype';
21
23
  import 'glob';
22
24
  import 'minimatch';
23
- import './resolve-puya-path-DtTAMi0Y.js';
25
+ import './arc4-clientgen-BMCeFyNd.js';
26
+ import '@algorandfoundation/algokit-utils/abi';
24
27
  import 'fs';
28
+ import 'fs/promises';
29
+ import './semver-DpFo0aCr.js';
25
30
  import 'node:url';
31
+ import './resolve-puya-path-EZBzWIlE.js';
26
32
  import 'signal-exit';
27
33
  import 'tar';
28
34
  import 'node:zlib';
@@ -40,14 +46,14 @@ var forExport = /*#__PURE__*/Object.freeze({
40
46
  ARC4StrClass: ARC4StrClass,
41
47
  ARC4StructClass: ARC4StructClass,
42
48
  ARC4StructType: ARC4StructType,
49
+ ARC4TupleGeneric: ARC4TupleGeneric,
43
50
  ARC4TupleType: ARC4TupleType,
44
51
  AccountFunction: AccountFunction,
45
52
  AddressClass: AddressClass,
46
53
  AnyPType: AnyPType,
47
- ApplicationFunctionType: ApplicationFunctionType,
48
- ApplicationTxnFunction: ApplicationTxnFunction,
54
+ ApplicationCallTxnFunction: ApplicationCallTxnFunction,
55
+ ApplicationFunction: ApplicationFunction,
49
56
  ApprovalProgram: ApprovalProgram,
50
- Arc4TupleGeneric: Arc4TupleGeneric,
51
57
  ArrayGeneric: ArrayGeneric,
52
58
  ArrayLiteralPType: ArrayLiteralPType,
53
59
  ArrayPType: ArrayPType,
@@ -77,14 +83,15 @@ var forExport = /*#__PURE__*/Object.freeze({
77
83
  ContractProxyType: ContractProxyType,
78
84
  DynamicArrayGeneric: DynamicArrayGeneric,
79
85
  DynamicArrayType: DynamicArrayType,
80
- DynamicBytesConstructor: DynamicBytesConstructor,
81
- DynamicBytesType: DynamicBytesType,
86
+ DynamicBytesClass: DynamicBytesClass,
82
87
  FixedArrayGeneric: FixedArrayGeneric,
83
88
  FixedArrayPType: FixedArrayPType,
84
89
  FunctionPType: FunctionPType,
85
90
  GeneratorGeneric: GeneratorGeneric,
86
91
  GeneratorType: GeneratorType,
87
92
  GenericPType: GenericPType,
93
+ GlobalMapGeneric: GlobalMapGeneric,
94
+ GlobalMapType: GlobalMapType,
88
95
  GlobalStateGeneric: GlobalStateGeneric,
89
96
  GlobalStateType: GlobalStateType,
90
97
  GroupTransactionPType: GroupTransactionPType,
@@ -105,6 +112,8 @@ var forExport = /*#__PURE__*/Object.freeze({
105
112
  LibClassType: LibClassType,
106
113
  LibFunctionType: LibFunctionType,
107
114
  LibObjType: LibObjType,
115
+ LocalMapGeneric: LocalMapGeneric,
116
+ LocalMapType: LocalMapType,
108
117
  LocalStateGeneric: LocalStateGeneric,
109
118
  LocalStateType: LocalStateType,
110
119
  LogicSigPType: LogicSigPType,
@@ -163,9 +172,9 @@ var forExport = /*#__PURE__*/Object.freeze({
163
172
  anyItxnType: anyItxnType,
164
173
  anyPType: anyPType,
165
174
  applicationCallGtxnType: applicationCallGtxnType,
166
- applicationCallItxnFn: applicationCallItxnFn,
175
+ applicationCallItxnFunction: applicationCallItxnFunction,
167
176
  applicationCallItxnParamsType: applicationCallItxnParamsType,
168
- applicationItxnType: applicationItxnType,
177
+ applicationCallItxnType: applicationCallItxnType,
169
178
  applicationPType: applicationPType,
170
179
  arc28EmitFunction: arc28EmitFunction,
171
180
  arc4AbiMethodDecorator: arc4AbiMethodDecorator,
@@ -176,20 +185,19 @@ var forExport = /*#__PURE__*/Object.freeze({
176
185
  arc4ByteAlias: arc4ByteAlias,
177
186
  arc4StringType: arc4StringType,
178
187
  arc4StructBaseType: arc4StructBaseType,
179
- arc4Uint64: arc4Uint64,
180
188
  assertFunction: assertFunction,
181
189
  assertMatchFunction: assertMatchFunction,
182
190
  assetConfigGtxnType: assetConfigGtxnType,
183
- assetConfigItxnFn: assetConfigItxnFn,
191
+ assetConfigItxnFunction: assetConfigItxnFunction,
184
192
  assetConfigItxnParamsType: assetConfigItxnParamsType,
185
193
  assetConfigItxnType: assetConfigItxnType,
186
194
  assetFreezeGtxnType: assetFreezeGtxnType,
187
- assetFreezeItxnFn: assetFreezeItxnFn,
195
+ assetFreezeItxnFunction: assetFreezeItxnFunction,
188
196
  assetFreezeItxnParamsType: assetFreezeItxnParamsType,
189
197
  assetFreezeItxnType: assetFreezeItxnType,
190
198
  assetPType: assetPType,
191
199
  assetTransferGtxnType: assetTransferGtxnType,
192
- assetTransferItxnFn: assetTransferItxnFn,
200
+ assetTransferItxnFunction: assetTransferItxnFunction,
193
201
  assetTransferItxnParamsType: assetTransferItxnParamsType,
194
202
  assetTransferItxnType: assetTransferItxnType,
195
203
  base64PType: base64PType,
@@ -199,14 +207,15 @@ var forExport = /*#__PURE__*/Object.freeze({
199
207
  boolPType: boolPType,
200
208
  bytesPType: bytesPType,
201
209
  bzeroFunction: bzeroFunction,
202
- cloneFunctionPType: cloneFunctionPType,
210
+ cloneFunction: cloneFunction,
203
211
  compileArc4Function: compileArc4Function,
204
- compileFunctionType: compileFunctionType,
212
+ compileFunction: compileFunction,
205
213
  compiledContractType: compiledContractType,
206
214
  compiledLogicSigType: compiledLogicSigType,
207
215
  contractOptionsDecorator: contractOptionsDecorator,
208
216
  convertBytesFunction: convertBytesFunction,
209
217
  decodeArc4Function: decodeArc4Function,
218
+ dynamicBytesType: dynamicBytesType,
210
219
  ecPType: ecPType,
211
220
  ecdsaPType: ecdsaPType,
212
221
  encodeArc4Function: encodeArc4Function,
@@ -220,10 +229,12 @@ var forExport = /*#__PURE__*/Object.freeze({
220
229
  itoaMethod: itoaMethod,
221
230
  itxnComposePType: itxnComposePType,
222
231
  keyRegistrationGtxnType: keyRegistrationGtxnType,
223
- keyRegistrationItxnFn: keyRegistrationItxnFn,
232
+ keyRegistrationItxnFunction: keyRegistrationItxnFunction,
224
233
  keyRegistrationItxnParamsType: keyRegistrationItxnParamsType,
225
234
  keyRegistrationItxnType: keyRegistrationItxnType,
226
235
  logFunction: logFunction,
236
+ loggedAssertFunction: loggedAssertFunction,
237
+ loggedErrFunction: loggedErrFunction,
227
238
  logicSigBaseType: logicSigBaseType,
228
239
  logicSigOptionsDecorator: logicSigOptionsDecorator,
229
240
  matchFunction: matchFunction,
@@ -235,10 +246,9 @@ var forExport = /*#__PURE__*/Object.freeze({
235
246
  onCompleteActionType: onCompleteActionType,
236
247
  opUpFeeSourceType: opUpFeeSourceType,
237
248
  paymentGtxnType: paymentGtxnType,
238
- paymentItxnFn: paymentItxnFn,
249
+ paymentItxnFunction: paymentItxnFunction,
239
250
  paymentItxnParamsType: paymentItxnParamsType,
240
251
  paymentItxnType: paymentItxnType,
241
- ptypeToArc4EncodedType: ptypeToArc4EncodedType,
242
252
  readonlyDecorator: readonlyDecorator,
243
253
  sizeOfFunction: sizeOfFunction,
244
254
  stringPType: stringPType,
@@ -248,7 +258,7 @@ var forExport = /*#__PURE__*/Object.freeze({
248
258
  undefinedPType: undefinedPType,
249
259
  unknownPType: unknownPType,
250
260
  urangeFunction: urangeFunction,
251
- validateEncodingFunctionPType: validateEncodingFunctionPType,
261
+ validateEncodingFunction: validateEncodingFunction,
252
262
  voidPType: voidPType,
253
263
  vrfVerifyPType: vrfVerifyPType
254
264
  });
package/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../src/awst_build/ptypes/for-export.ts","../src/index.ts"],"sourcesContent":["/* This file aggregates all ptypes into a single export for external consumption of the compiler api */\nexport { ptypeToArc4EncodedType } from '../arc4-util'\nexport * from './arc4-types'\nexport * from './index'\n","import {\n base32ToUint8Array,\n base64ToUint8Array,\n bigIntToUint8Array,\n hexToUint8Array,\n uint8ArrayToBase32,\n uint8ArrayToBase64,\n uint8ArrayToBigInt,\n uint8ArrayToHex,\n uint8ArrayToUtf8,\n utf8ToUint8Array,\n} from './util'\nimport './util/polyfills'\n\nexport { SourceLocation } from './awst/source-location'\nexport * as ptypes from './awst_build/ptypes/for-export'\nexport { registerPTypes } from './awst_build/ptypes/register'\nexport { typeRegistry } from './awst_build/type-registry'\nexport { TypeResolver } from './awst_build/type-resolver'\nexport { compile } from './compile'\nexport { processInputPaths } from './input-paths/process-input-paths'\nexport { LoggingContext } from './logger'\nexport { CompileOptions } from './options'\nexport { AbsolutePath } from './util/absolute-path'\n\nexport const encodingUtil = {\n utf8ToUint8Array,\n bigIntToUint8Array,\n hexToUint8Array,\n base32ToUint8Array,\n base64ToUint8Array,\n uint8ArrayToUtf8,\n uint8ArrayToHex,\n uint8ArrayToBase32,\n uint8ArrayToBase64,\n uint8ArrayToBigInt,\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACyBO,MAAM,YAAY,GAAG;IAC1B,gBAAgB;IAChB,kBAAkB;IAClB,eAAe;IACf,kBAAkB;IAClB,kBAAkB;IAClB,gBAAgB;IAChB,eAAe;IACf,kBAAkB;IAClB,kBAAkB;IAClB,kBAAkB;;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../src/awst_build/ptypes/for-export.ts","../src/index.ts"],"sourcesContent":["/* This file aggregates all ptypes into a single export for external consumption of the compiler api */\nexport * from './arc4-types'\nexport * from './index'\n","import {\n base32ToUint8Array,\n base64ToUint8Array,\n bigIntToUint8Array,\n hexToUint8Array,\n uint8ArrayToBase32,\n uint8ArrayToBase64,\n uint8ArrayToBigInt,\n uint8ArrayToHex,\n uint8ArrayToUtf8,\n utf8ToUint8Array,\n} from './util'\n\nexport { SourceLocation } from './awst/source-location'\nexport * as ptypes from './awst_build/ptypes/for-export'\nexport { registerPTypes } from './awst_build/ptypes/register'\nexport { typeRegistry } from './awst_build/type-registry'\nexport { TypeResolver } from './awst_build/type-resolver'\nexport { compile } from './compile'\nexport { processInputPaths } from './input-paths/process-input-paths'\nexport { LoggingContext, LogLevel, LogSource, LogEvent } from './logger'\nexport { CompileOptions } from './options'\nexport { AbsolutePath } from './util/absolute-path'\n\nexport const encodingUtil = {\n utf8ToUint8Array,\n bigIntToUint8Array,\n hexToUint8Array,\n base32ToUint8Array,\n base64ToUint8Array,\n uint8ArrayToUtf8,\n uint8ArrayToHex,\n uint8ArrayToBase32,\n uint8ArrayToBase64,\n uint8ArrayToBigInt,\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACwBO,MAAM,YAAY,GAAG;IAC1B,gBAAgB;IAChB,kBAAkB;IAClB,eAAe;IACf,kBAAkB;IAClB,kBAAkB;IAClB,gBAAgB;IAChB,eAAe;IACf,kBAAkB;IAClB,kBAAkB;IAClB,kBAAkB;;;;;"}
@@ -1,6 +1,5 @@
1
1
  import type * as lsp from 'vscode-languageserver';
2
2
  import type { FileWithDiagnostics } from './diagnostics-manager';
3
- import '../util/polyfills';
4
3
  type AnalyseServiceOptions = {
5
4
  puyaPath: string;
6
5
  };
@@ -1,9 +1,9 @@
1
1
  import type * as lsp from 'vscode-languageserver/node';
2
- export type WorkspaceCompileTrigger = {
2
+ type WorkspaceCompileTrigger = {
3
3
  type: 'workspace';
4
4
  uris: lsp.URI[];
5
5
  };
6
- export type FileCompileTrigger = {
6
+ type FileCompileTrigger = {
7
7
  type: 'file';
8
8
  uris: lsp.URI[];
9
9
  };
@@ -1,43 +1,5 @@
1
- import { TextDocument } from 'vscode-languageserver-textdocument';
2
- import * as lsp from 'vscode-languageserver/node';
3
- import { LanguageServerLogSink } from '../logger/sinks/language-server-log-sink';
4
- import type { AnalyserService } from './analyser-service';
5
- import { CompileTriggerQueue } from './compile-trigger-queue';
6
- import { CompileWorker } from './compile-worker';
7
- import type { FileWithDiagnostics } from './diagnostics-manager';
8
- import { DiagnosticsManager } from './diagnostics-manager';
9
1
  export type LanguageServerOptions = {
10
2
  port?: number;
11
3
  customPuyaPath?: string;
12
4
  };
13
- export declare class PuyaLanguageServer {
14
- readonly connection: lsp.Connection;
15
- private readonly loggingSink;
16
- readonly documents: lsp.TextDocuments<TextDocument>;
17
- readonly triggers: CompileTriggerQueue;
18
- readonly workspaceFolders: lsp.URI[];
19
- readonly diagnosticsMgr: DiagnosticsManager;
20
- readonly compileWorker: CompileWorker;
21
- readonly analyserService: AnalyserService;
22
- stopping: boolean;
23
- constructor(connection: lsp.Connection, loggingSink: LanguageServerLogSink, puyaPath: string);
24
- start(): void;
25
- shutdown(): Promise<void>;
26
- initialize(params: lsp.InitializeParams): lsp.InitializeResult;
27
- initialized(params: lsp.InitializedParams): void;
28
- fileDiagnosticsChanged(params: FileWithDiagnostics): Promise<void>;
29
- documentDidChangeContent(params: lsp.TextDocumentChangeEvent<TextDocument>): void;
30
- /**
31
- * Bound to connection.onCodeAction and called when a user hovers over a piece of code.
32
- *
33
- * Params includes the text range the user is hovering over and any diagnostics known to the
34
- * client at the time.
35
- *
36
- * Response should include actions the user can take and the command or text edits that should be
37
- * invoked/applied if selected
38
- * @param params
39
- */
40
- codeAction(params: lsp.CodeActionParams): lsp.CodeAction[];
41
- configurationChange(params: lsp.DidChangeConfigurationParams): void;
42
- }
43
5
  export declare function startLanguageServer(options: LanguageServerOptions): Promise<void>;
package/logger/index.d.ts CHANGED
@@ -9,13 +9,6 @@ export declare enum LogLevel {
9
9
  Debug = "debug",
10
10
  Critical = "critical"
11
11
  }
12
- export declare const logLevelToInt: {
13
- critical: number;
14
- error: number;
15
- info: number;
16
- warning: number;
17
- debug: number;
18
- };
19
12
  export declare enum LogSource {
20
13
  Unspecified = 0,
21
14
  TypeScript = 1,