@algorandfoundation/puya-ts 1.2.0-beta.32 → 1.2.0-beta.34

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 (61) hide show
  1. package/{analyser-service-4cYQscWZ.js → analyser-service-DjrWRS0-.js} +3 -3
  2. package/{analyser-service-4cYQscWZ.js.map → analyser-service-DjrWRS0-.js.map} +1 -1
  3. package/analyserService.mjs +3 -3
  4. package/{arc4-clientgen-CkO21MdT.js → arc4-clientgen-CZtNN1eT.js} +3 -3
  5. package/arc4-clientgen-CZtNN1eT.js.map +1 -0
  6. package/awst_build/ast-visitors/class-definition-visitor.d.ts +721 -1
  7. package/awst_build/ast-visitors/function-visitor.d.ts +721 -1
  8. package/awst_build/ast-visitors/text-visitor.d.ts +721 -1
  9. package/awst_build/eb/arc4/arrays.d.ts +2 -1
  10. package/awst_build/eb/arc4/c2c.d.ts +0 -17
  11. package/awst_build/eb/array-like/arrays.d.ts +3 -2
  12. package/awst_build/eb/bytes-expression-builder.d.ts +0 -28
  13. package/awst_build/eb/contract-builder.d.ts +0 -11
  14. package/awst_build/eb/index.d.ts +0 -1
  15. package/awst_build/eb/literal/object-literal-expression-builder.d.ts +8 -4
  16. package/awst_build/eb/objects/util.d.ts +0 -2
  17. package/awst_build/eb/op-module-builder.d.ts +0 -3
  18. package/awst_build/eb/storage/box/box.d.ts +1 -21
  19. package/awst_build/eb/string-expression-builder.d.ts +0 -6
  20. package/awst_build/eb/util/resolve-compat-builder.d.ts +0 -8
  21. package/awst_build/op-metadata.d.ts +4 -3
  22. package/awst_build/ptypes/arc4-types.d.ts +0 -1
  23. package/awst_build/ptypes/index.d.ts +1 -1
  24. package/awst_build/ptypes/visitors/index-type-visitor.d.ts +0 -30
  25. package/bin/puyats-clientgen.mjs +5 -5
  26. package/bin/puyats-ls.mjs +6 -6
  27. package/bin/puyats-ls.mjs.map +1 -1
  28. package/bin/run-cli.mjs +8 -8
  29. package/{check-node-version-CJZN8bUo.js → check-node-version-BYGc-qxw.js} +3 -3
  30. package/{check-node-version-CJZN8bUo.js.map → check-node-version-BYGc-qxw.js.map} +1 -1
  31. package/cli.mjs +8 -8
  32. package/{compile-P13jbcuM.js → compile-BKk4hPli.js} +6 -6
  33. package/{compile-P13jbcuM.js.map → compile-BKk4hPli.js.map} +1 -1
  34. package/constants.d.ts +5 -0
  35. package/{contract-class-model-BUOeMEKh.js → contract-class-model-Dpn9A-pJ.js} +38 -33
  36. package/contract-class-model-Dpn9A-pJ.js.map +1 -0
  37. package/errors.d.ts +1 -6
  38. package/index.mjs +8 -9
  39. package/index.mjs.map +1 -1
  40. package/language-server/compile-trigger-queue.d.ts +2 -2
  41. package/language-server/puya-language-server.d.ts +0 -38
  42. package/logger/index.d.ts +0 -7
  43. package/{options-DgrJjFC_.js → options-BCW57sPn.js} +142 -132
  44. package/options-BCW57sPn.js.map +1 -0
  45. package/options.d.ts +4 -3
  46. package/package.json +2 -2
  47. package/puya/check-puya-version.d.ts +0 -13
  48. package/puya/log-deserializer.d.ts +0 -2
  49. package/{resolve-puya-path-n5rXecTR.js → resolve-puya-path-CdZID0Yd.js} +4 -4
  50. package/resolve-puya-path-CdZID0Yd.js.map +1 -0
  51. package/{semver-C4QVXBwz.js → semver-a7hIj_hk.js} +2 -2
  52. package/{semver-C4QVXBwz.js.map → semver-a7hIj_hk.js.map} +1 -1
  53. package/{util-J87OKSaa.js → util-nZLj7LWS.js} +2 -2
  54. package/{util-J87OKSaa.js.map → util-nZLj7LWS.js.map} +1 -1
  55. package/visitor/syntax-names.d.ts +4 -4
  56. package/visitor/visitor.d.ts +4 -4
  57. package/arc4-clientgen-CkO21MdT.js.map +0 -1
  58. package/contract-class-model-BUOeMEKh.js.map +0 -1
  59. package/language-server/ls-logger.d.ts +0 -11
  60. package/options-DgrJjFC_.js.map +0 -1
  61. package/resolve-puya-path-n5rXecTR.js.map +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.mjs CHANGED
@@ -1,8 +1,8 @@
1
- import { o as ABICompatibleInstanceType, q as ALL_OP_ENUMS, r as AccountFunction, s as AnyPType, t as ApplicationFunctionType, u as ApplicationTxnFunction, 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 applicationCallItxnFn, b4 as applicationCallItxnParamsType, b5 as applicationItxnType, 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 assetConfigItxnFn, bd as assetConfigItxnParamsType, be as assetConfigItxnType, m as assetFreezeGtxnType, bf as assetFreezeItxnFn, bg as assetFreezeItxnParamsType, bh as assetFreezeItxnType, g as assetPType, j as assetTransferGtxnType, bi as assetTransferItxnFn, 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 cloneFunctionPType, bt as compileFunctionType, 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 keyRegistrationItxnFn, 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 paymentItxnFn, 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 validateEncodingFunctionPType, 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-BUOeMEKh.js';
2
- export { A as AbsolutePath, L as LogLevel, cg as LogSource, a as LoggingContext, ch as SourceLocation } from './contract-class-model-BUOeMEKh.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 ARC4TupleType, h as AddressClass, i as Arc4TupleGeneric, B as ByteClass, C as ContractProxyGeneric, j as ContractProxyType, D as DynamicArrayGeneric, k as DynamicArrayType, l as DynamicBytesConstructor, m as DynamicBytesType, S as StaticArrayGeneric, n as StaticArrayType, o as StaticBytesGeneric, p as StaticBytesType, T as TypedApplicationCallResponseGeneric, q as TypedApplicationCallResponseType, U as UFixedNxMGeneric, r as UFixedNxMType, s as UintN128Class, t as UintN16Class, u as UintN256Class, v as UintN32Class, w as UintN64Class, x as UintN8Class, y as UintNGeneric, z as UintNType, E as abiCallFunction, F as arc4AddressAlias, G as arc4BooleanType, H as arc4ByteAlias, I as arc4StringType, J as arc4StructBaseType, K as arc4Uint64, L as compileArc4Function, M as convertBytesFunction, N as decodeArc4Function, O as encodeArc4Function, P as methodSelectorFunction, Q as sizeOfFunction, R as uint8ArrayToHex, V as hexToUint8Array } from './options-DgrJjFC_.js';
4
- export { W as CompileOptions, X as TypeResolver, Y as processInputPaths, Z as registerPTypes, _ as typeRegistry } from './options-DgrJjFC_.js';
5
- export { c as compile } from './compile-P13jbcuM.js';
1
+ import { o as ABICompatibleInstanceType, q as ALL_OP_ENUMS, r as AccountFunction, s as AnyPType, t as ApplicationFunctionType, u as ApplicationTxnFunction, 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 applicationCallItxnFn, b4 as applicationCallItxnParamsType, b5 as applicationItxnType, 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 assetConfigItxnFn, bd as assetConfigItxnParamsType, be as assetConfigItxnType, m as assetFreezeGtxnType, bf as assetFreezeItxnFn, bg as assetFreezeItxnParamsType, bh as assetFreezeItxnType, g as assetPType, j as assetTransferGtxnType, bi as assetTransferItxnFn, 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 cloneFunctionPType, bt as compileFunctionType, 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 keyRegistrationItxnFn, 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 paymentItxnFn, 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 validateEncodingFunctionPType, 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-Dpn9A-pJ.js';
2
+ export { A as AbsolutePath, L as LogLevel, cg as LogSource, a as LoggingContext, ch as SourceLocation } from './contract-class-model-Dpn9A-pJ.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 ARC4TupleType, h as AddressClass, i as Arc4TupleGeneric, B as ByteClass, C as ContractProxyGeneric, j as ContractProxyType, D as DynamicArrayGeneric, k as DynamicArrayType, l as DynamicBytesConstructor, m as DynamicBytesType, S as StaticArrayGeneric, n as StaticArrayType, o as StaticBytesGeneric, p as StaticBytesType, T as TypedApplicationCallResponseGeneric, q as TypedApplicationCallResponseType, U as UFixedNxMGeneric, r as UFixedNxMType, s as UintN128Class, t as UintN16Class, u as UintN256Class, v as UintN32Class, w as UintN64Class, x as UintN8Class, y as UintNGeneric, z as UintNType, E as abiCallFunction, F as arc4AddressAlias, G as arc4BooleanType, H as arc4ByteAlias, I as arc4StringType, J as arc4StructBaseType, K as compileArc4Function, L as convertBytesFunction, M as decodeArc4Function, N as encodeArc4Function, O as methodSelectorFunction, P as sizeOfFunction, Q as uint8ArrayToHex, R as hexToUint8Array } from './options-BCW57sPn.js';
4
+ export { V as CompileOptions, W as TypeResolver, X as processInputPaths, Y as registerPTypes, Z as typeRegistry } from './options-BCW57sPn.js';
5
+ export { c as compile } from './compile-BKk4hPli.js';
6
6
  import 'typescript';
7
7
  import 'node:fs';
8
8
  import 'node:util';
@@ -22,13 +22,13 @@ import 'net';
22
22
  import 'change-case';
23
23
  import 'glob';
24
24
  import 'minimatch';
25
- import './arc4-clientgen-CkO21MdT.js';
25
+ import './arc4-clientgen-CZtNN1eT.js';
26
26
  import '@algorandfoundation/algokit-utils/abi';
27
27
  import 'fs';
28
28
  import 'fs/promises';
29
- import './semver-C4QVXBwz.js';
29
+ import './semver-a7hIj_hk.js';
30
30
  import 'node:url';
31
- import './resolve-puya-path-n5rXecTR.js';
31
+ import './resolve-puya-path-CdZID0Yd.js';
32
32
  import 'signal-exit';
33
33
  import 'tar';
34
34
  import 'node:zlib';
@@ -186,7 +186,6 @@ var forExport = /*#__PURE__*/Object.freeze({
186
186
  arc4ByteAlias: arc4ByteAlias,
187
187
  arc4StringType: arc4StringType,
188
188
  arc4StructBaseType: arc4StructBaseType,
189
- arc4Uint64: arc4Uint64,
190
189
  assertFunction: assertFunction,
191
190
  assertMatchFunction: assertMatchFunction,
192
191
  assetConfigGtxnType: assetConfigGtxnType,
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 * 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, 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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'\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, 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,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,