@algorandfoundation/puya-ts 1.2.0-beta.43 → 1.2.0-beta.45
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/{analyser-service-TVLNcHF6.js → analyser-service-g6r-wiDR.js} +2 -2
- package/{analyser-service-TVLNcHF6.js.map → analyser-service-g6r-wiDR.js.map} +1 -1
- package/analyserService.mjs +2 -2
- package/bin/puyats-ls.mjs +3 -3
- package/bin/run-cli.mjs +3 -3
- package/cli.mjs +3 -3
- package/{compile-DFxa1JkD.js → compile-BFtdjrmj.js} +3 -3
- package/{compile-DFxa1JkD.js.map → compile-BFtdjrmj.js.map} +1 -1
- package/index.mjs +4 -4
- package/{options-FaNzehWy.js → options-YOTdChNT.js} +6 -1
- package/{options-FaNzehWy.js.map → options-YOTdChNT.js.map} +1 -1
- package/package.json +4 -3
- package/{resolve-puya-path-CVfwG4kN.js → resolve-puya-path-BisVPj7y.js} +2 -2
- package/{resolve-puya-path-CVfwG4kN.js.map → resolve-puya-path-BisVPj7y.js.map} +1 -1
package/analyserService.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import 'crypto';
|
|
2
2
|
import 'node:worker_threads';
|
|
3
|
-
export { c as createAnalyserService } from './analyser-service-
|
|
3
|
+
export { c as createAnalyserService } from './analyser-service-g6r-wiDR.js';
|
|
4
4
|
import './contract-class-model-0NzrC4s2.js';
|
|
5
|
-
import './options-
|
|
5
|
+
import './options-YOTdChNT.js';
|
|
6
6
|
import 'pathe';
|
|
7
7
|
import 'typescript';
|
|
8
8
|
import 'node:util';
|
package/bin/puyats-ls.mjs
CHANGED
|
@@ -3,11 +3,11 @@ import { ArgumentParser, BooleanOptionalAction } from 'argparse';
|
|
|
3
3
|
import { p as packageVersion, a as appVersion } from '../semver-BwxlEvtx.js';
|
|
4
4
|
import { c as checkNodeVersion } from '../check-node-version-CgpZ-rvZ.js';
|
|
5
5
|
import { __esDecorate, __runInitializers } from 'tslib';
|
|
6
|
-
import { r as requireMain, l as logCaughtExpression, L as LogExceptions, c as createAnalyserService, a as createNormalisedTextDocumentConnection, n as normalisedUri, i as isCodeFixData } from '../analyser-service-
|
|
6
|
+
import { r as requireMain, l as logCaughtExpression, L as LogExceptions, c as createAnalyserService, a as createNormalisedTextDocumentConnection, n as normalisedUri, i as isCodeFixData } from '../analyser-service-g6r-wiDR.js';
|
|
7
7
|
import { b0 as LogLevel, cY as distinct, dt as logger, e6 as zipStrict, aa as Constants } from '../contract-class-model-0NzrC4s2.js';
|
|
8
|
-
import { r as resolvePuyaPath } from '../resolve-puya-path-
|
|
8
|
+
import { r as resolvePuyaPath } from '../resolve-puya-path-BisVPj7y.js';
|
|
9
9
|
import EventEmitter from 'node:events';
|
|
10
|
-
import { D as DefaultMap } from '../options-
|
|
10
|
+
import { D as DefaultMap } from '../options-YOTdChNT.js';
|
|
11
11
|
import 'fs';
|
|
12
12
|
import 'node:url';
|
|
13
13
|
import 'pathe';
|
package/bin/run-cli.mjs
CHANGED
|
@@ -12,11 +12,11 @@ import 'node:util';
|
|
|
12
12
|
import 'node:crypto';
|
|
13
13
|
import 'polytype';
|
|
14
14
|
import 'node:async_hooks';
|
|
15
|
-
import '../compile-
|
|
15
|
+
import '../compile-BFtdjrmj.js';
|
|
16
16
|
import '../arc4-clientgen-DpKJCM6x.js';
|
|
17
17
|
import '@algorandfoundation/algokit-utils/abi';
|
|
18
18
|
import 'fs/promises';
|
|
19
|
-
import '../options-
|
|
19
|
+
import '../options-YOTdChNT.js';
|
|
20
20
|
import 'arcsecond';
|
|
21
21
|
import 'tslib';
|
|
22
22
|
import 'node:buffer';
|
|
@@ -29,7 +29,7 @@ import 'net';
|
|
|
29
29
|
import 'change-case';
|
|
30
30
|
import 'glob';
|
|
31
31
|
import 'minimatch';
|
|
32
|
-
import '../resolve-puya-path-
|
|
32
|
+
import '../resolve-puya-path-BisVPj7y.js';
|
|
33
33
|
import 'signal-exit';
|
|
34
34
|
import 'tar';
|
|
35
35
|
import 'node:zlib';
|
package/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BooleanOptionalAction, ArgumentParser } from 'argparse';
|
|
2
2
|
import { a as appVersion } from './semver-BwxlEvtx.js';
|
|
3
|
-
import { c as compile } from './compile-
|
|
4
|
-
import { W as defaultPuyaOptions, a1 as processInputPaths, C as CompileOptions, a0 as parseCliTemplateVar, L as LocalsCoalescingStrategy } from './options-
|
|
3
|
+
import { c as compile } from './compile-BFtdjrmj.js';
|
|
4
|
+
import { W as defaultPuyaOptions, a1 as processInputPaths, C as CompileOptions, a0 as parseCliTemplateVar, L as LocalsCoalescingStrategy } from './options-YOTdChNT.js';
|
|
5
5
|
import { dt as logger, f as AbsolutePath, b2 as LoggingContext, b0 as LogLevel } from './contract-class-model-0NzrC4s2.js';
|
|
6
6
|
import { a as addEnumArg, C as ConsoleLogSink, c as convertInt } from './util-DCBjwSzY.js';
|
|
7
7
|
import { c as checkNodeVersion } from './check-node-version-CgpZ-rvZ.js';
|
|
@@ -12,7 +12,7 @@ import './arc4-clientgen-DpKJCM6x.js';
|
|
|
12
12
|
import '@algorandfoundation/algokit-utils/abi';
|
|
13
13
|
import 'fs/promises';
|
|
14
14
|
import 'typescript';
|
|
15
|
-
import './resolve-puya-path-
|
|
15
|
+
import './resolve-puya-path-BisVPj7y.js';
|
|
16
16
|
import 'tslib';
|
|
17
17
|
import 'signal-exit';
|
|
18
18
|
import 'cross-spawn';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as writeARC4Clients } from './arc4-clientgen-DpKJCM6x.js';
|
|
2
|
-
import { P as PuyaService, X as deserializeAndLog, a2 as registerPTypes, R as createTsProgram, N as buildAwst, a8 as validateAwst, a6 as typeRegistry } from './options-
|
|
2
|
+
import { P as PuyaService, X as deserializeAndLog, a2 as registerPTypes, R as createTsProgram, N as buildAwst, a8 as validateAwst, a6 as typeRegistry } from './options-YOTdChNT.js';
|
|
3
3
|
import { a as appVersion } from './semver-BwxlEvtx.js';
|
|
4
4
|
import { dy as mkDirIfNotExists, b0 as LogLevel, b2 as LoggingContext, dt as logger } from './contract-class-model-0NzrC4s2.js';
|
|
5
5
|
import ts from 'typescript';
|
|
6
|
-
import { r as resolvePuyaPath } from './resolve-puya-path-
|
|
6
|
+
import { r as resolvePuyaPath } from './resolve-puya-path-BisVPj7y.js';
|
|
7
7
|
|
|
8
8
|
function buildCompilationSetMapping({ awst, inputPaths, compilationSet, }) {
|
|
9
9
|
const setIds = new Set(compilationSet.compilationOutputSet.map((s) => s.id));
|
|
@@ -110,4 +110,4 @@ async function compile(options, puyaService) {
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
export { compile as c };
|
|
113
|
-
//# sourceMappingURL=compile-
|
|
113
|
+
//# sourceMappingURL=compile-BFtdjrmj.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile-
|
|
1
|
+
{"version":3,"file":"compile-BFtdjrmj.js","sources":["../src/puya/build-compilation-set-mapping.ts","../src/puya/index.ts","../src/compile.ts"],"sourcesContent":["import type { AWST } from '../awst/nodes'\nimport type { CompilationSet } from '../awst_build/models/contract-class-model'\nimport type { AlgoFile, CompilationSetMapping } from '../options'\nimport { mkDirIfNotExists } from '../util'\n\nexport function buildCompilationSetMapping({\n awst,\n inputPaths,\n compilationSet,\n}: {\n awst: AWST[]\n inputPaths: AlgoFile[]\n compilationSet: CompilationSet\n}): CompilationSetMapping {\n const setIds = new Set(compilationSet.compilationOutputSet.map((s) => s.id))\n\n return awst.reduce((acc, cur) => {\n if (setIds.has(cur.id.toString())) {\n const matchedPath = inputPaths.find((p) => cur.sourceLocation.file && p.sourceFile.equals(cur.sourceLocation.file))\n if (matchedPath) {\n mkDirIfNotExists(matchedPath.outDir.toString())\n acc[cur.id.toString()] = matchedPath.outDir.toString()\n }\n }\n return acc\n }, {} as CompilationSetMapping)\n}\n","import ts from 'typescript'\nimport type { AWST } from '../awst/nodes'\nimport type { CompilationSet } from '../awst_build/models/contract-class-model'\nimport { LogLevel } from '../logger'\nimport type { CompileOptions } from '../options'\nimport type { SourceFileMapping } from '../parser'\nimport type { AbsolutePath } from '../util/absolute-path'\nimport { buildCompilationSetMapping } from './build-compilation-set-mapping'\nimport { deserializeAndLog } from './log-deserializer'\nimport { PuyaService } from './puya-service'\nimport { resolvePuyaPath } from './resolve-puya-path'\n\nexport async function puyaCompile({\n moduleAwst,\n programDirectory,\n sourceFiles,\n options,\n compilationSet,\n puyaService,\n}: {\n moduleAwst: AWST[]\n programDirectory: AbsolutePath\n sourceFiles: SourceFileMapping\n options: CompileOptions\n compilationSet: CompilationSet\n puyaService?: PuyaService\n}) {\n const puyaPath = await resolvePuyaPath(options)\n const localPuyaService = puyaService ?? new PuyaService({ puyaPath })\n const puyaOptions = options.buildPuyaOptions(\n buildCompilationSetMapping({\n awst: moduleAwst,\n inputPaths: options.filePaths,\n compilationSet,\n }),\n )\n\n const response = await localPuyaService.compile({\n awst: moduleAwst,\n options: puyaOptions,\n base_path: programDirectory.toString(),\n log_level: getPuyaLogLevel(options.logLevel),\n source_annotations: getSourceFileContents(sourceFiles),\n })\n // Shutdown service if we created it locally\n if (puyaService === undefined) await localPuyaService.shutdown()\n for (const log of response.logs) {\n deserializeAndLog(log)\n }\n\n return response\n}\n\nfunction getPuyaLogLevel(logLevel: LogLevel): string {\n switch (logLevel) {\n case LogLevel.Debug:\n return 'debug'\n case LogLevel.Info:\n return 'info'\n case LogLevel.Warning:\n return 'warning'\n case LogLevel.Error:\n return 'error'\n case LogLevel.Critical:\n return 'critical'\n }\n}\nfunction getSourceFileContents(sourceFiles: SourceFileMapping) {\n return Object.fromEntries(\n Object.entries(sourceFiles).map(([key, value]) => {\n const source = ts.isSourceFile(value) ? value.getFullText().replace(/\\r\\n/g, '\\n').split(/\\n/g) : value\n return [key, source] as const\n }),\n )\n}\n","import type ts from 'typescript'\nimport { writeARC4Clients } from './arc4-clientgen'\nimport type { AWST } from './awst/nodes'\nimport { validateAwst } from './awst/validation'\nimport { buildAwst } from './awst_build'\nimport { type CompilationSet } from './awst_build/models/contract-class-model'\nimport { registerPTypes } from './awst_build/ptypes/register'\nimport { typeRegistry } from './awst_build/type-registry'\nimport { appVersion } from './cli/app-version'\nimport { logger, LoggingContext } from './logger'\nimport type { CompileOptions } from './options'\nimport { createTsProgram } from './parser'\nimport { puyaCompile } from './puya'\nimport type { PuyaService } from './puya/puya-service'\nimport type { AbsolutePath } from './util/absolute-path'\n\nexport type CompileResult = {\n programDirectory: AbsolutePath\n awst?: AWST[]\n ast?: Record<string, ts.SourceFile>\n compilationSet?: CompilationSet\n}\n\nexport async function compile(options: CompileOptions, puyaService?: PuyaService): Promise<CompileResult> {\n const loggerCtx = LoggingContext.current\n if (options.treatWarningsAsErrors) loggerCtx.treatWarningsAsErrors = true\n\n registerPTypes(typeRegistry)\n logger.info(undefined, appVersion({ withAVMVersion: false }))\n const programResult = createTsProgram(options)\n if (loggerCtx.hasErrors()) {\n logger.info(undefined, 'Compilation halted due to parse errors')\n return {\n programDirectory: programResult.programDirectory,\n ast: programResult.sourceFiles,\n }\n }\n const { moduleAwst, compilationSet } = buildAwst(programResult, options)\n validateAwst(moduleAwst)\n\n if (loggerCtx.hasErrors()) {\n logger.info(undefined, 'Compilation halted due to errors')\n return {\n programDirectory: programResult.programDirectory,\n awst: moduleAwst,\n ast: programResult.sourceFiles,\n compilationSet,\n }\n }\n if (!options.dryRun) {\n const compileResult = await puyaCompile({\n options,\n moduleAwst,\n programDirectory: programResult.programDirectory,\n compilationSet,\n sourceFiles: programResult.sourceFiles,\n puyaService,\n })\n\n if (options.outputClient) {\n await writeARC4Clients(compilationSet, options.filePaths, compileResult.arc56)\n }\n }\n\n return {\n programDirectory: programResult.programDirectory,\n awst: moduleAwst,\n ast: programResult.sourceFiles,\n compilationSet,\n }\n}\n"],"names":[],"mappings":";;;;;;;AAKM,SAAU,0BAA0B,CAAC,EACzC,IAAI,EACJ,UAAU,EACV,cAAc,GAK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AE;AACxB,YAAA,MAAM,gBAAgB,CAAC,cAAc,EAAE,OAAO,CAAC,SAAS,EAAE,aAAa,CAAC,KAAK,CAAC;QAChF;IACF;IAEA,OAAO;QACL,gBAAgB,EAAE,aAAa,CAAC,gBAAgB;AAChD,QAAA,IAAI,EAAE,UAAU;QAChB,GAAG,EAAE,aAAa,CAAC,WAAW;QAC9B,cAAc;KACf;AACH;;;;"}
|
package/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { A as ABICompatibleInstanceType, a as ALL_OP_ENUMS, g as AccountFunction, i as AnyPType, m as ApplicationCallTxnFunction, n as ApplicationFunction, o as ApprovalProgram, q as ArrayGeneric, s as ArrayLiteralPType, t as ArrayPType, x as AssetConfigTxnFunction, y as AssetFreezeTxnFunction, z as AssetFunction, B as AssetTransferTxnFunction, D as BaseContractClassType, E as BigIntLiteralPType, F as BigIntPType, K as BigUintFunction, O as BooleanFunction, P as BoxGeneric, Q as BoxMapGeneric, R as BoxMapPType, S as BoxPType, Y as BytesFunction, Z as BytesGeneric, _ as BytesPType, a2 as ClassMethodDecoratorContext, a3 as ClearStateProgram, a4 as ClusteredContractClassType, a5 as ClusteredPrototype, ad as ContractClassPType, ap as FixedArrayGeneric, aq as FixedArrayPType, ar as FunctionPType, as as GeneratorGeneric, at as GeneratorType, au as GenericPType, av as GlobalMapGeneric, aw as GlobalMapType, ax as GlobalStateGeneric, ay as GlobalStateType, aA as GroupTransactionPType, aB as ImmutableObjectPType, aD as InnerTransactionPType, aG as InstanceType, aJ as InternalType, aK as IntersectionPType, aM as IntrinsicEnumType, aN as IntrinsicFunctionGroupType, aO as IntrinsicFunctionGroupTypeType, aP as IntrinsicFunctionType, aQ as IntrinsicFunctionTypeType, aR as IterableIteratorGeneric, aS as IterableIteratorType, aT as ItxnParamsPType, aU as KeyRegistrationTxnFunction, aV as LibClassType, aW as LibFunctionType, aX as LibObjType, aY as LocalMapGeneric, aZ as LocalMapType, a_ as LocalStateGeneric, a$ as LocalStateType, b4 as LogicSigPType, b9 as MutableObjectPType, ba as MutableTuplePType, bb as NamespacePType, bg as NumberPType, bj as NumericLiteralPType, bk as ObjectLiteralPType, bl as ObjectWithOptionalFieldsType, bn as PType, bo as PaymentTxnFunction, bp as PolytypeClassMethodHelper, bq as PromiseGeneric, br as PromiseType, bw as ReadonlyArrayGeneric, bx as ReadonlyArrayPType, by as ReadonlyGeneric, bz as ReadonlyTuplePType, bA as ReferenceArrayGeneric, bB as ReferenceArrayType, bM as StringFunction, bQ as SuperPrototypeSelector, bR as SuperPrototypeSelectorGeneric, bU as TemplateVarFunction, bV as TransactionFunction, bW as TransactionFunctionType, bY as TransientType, b$ as TypeParameterType, c6 as Uint64EnumMemberLiteralType, c7 as Uint64EnumMemberType, c8 as Uint64EnumType, c9 as Uint64Function, ca as UnionPType, cb as UnsupportedType, cf as accountPType, cg as anyGtxnType, ch as anyItxnParamsType, ci as anyItxnType, cj as anyPType, ck as applicationCallGtxnType, cl as applicationCallItxnFunction, cm as applicationCallItxnParamsType, cn as applicationCallItxnType, co as applicationPType, cp as arc28EmitFunction, cq as arc4AbiMethodDecorator, cr as arc4BareMethodDecorator, cs as arc4BaseContractType, ct as assertFunction, cu as assertMatchFunction, cv as assetConfigGtxnType, cw as assetConfigItxnFunction, cx as assetConfigItxnParamsType, cy as assetConfigItxnType, cz as assetFreezeGtxnType, cA as assetFreezeItxnFunction, cB as assetFreezeItxnParamsType, cC as assetFreezeItxnType, cD as assetPType, cE as assetTransferGtxnType, cF as assetTransferItxnFunction, cG as assetTransferItxnParamsType, cH as assetTransferItxnType, cJ as base64PType, cL as baseContractType, cM as bigIntPType, cO as biguintPType, cP as boolPType, cQ as bytesPType, cR as bzeroFunction, cS as cloneFunction, cU as compileFunction, cV as compiledContractType, cW as compiledLogicSigType, cX as contractOptionsDecorator, cZ as ecPType, c_ as ecdsaPType, c$ as ensureBudgetFunction, d2 as errFunction, d3 as esSymbol, da as inputOnlyObjects, de as isArrayType, dh as isObjectType, di as isTupleLike, dj as itoaMethod, dk as itxnComposePType, dl as keyRegistrationGtxnType, dm as keyRegistrationItxnFunction, dn as keyRegistrationItxnParamsType, dp as keyRegistrationItxnType, dq as logFunction, dr as loggedAssertFunction, ds as loggedErrFunction, du as logicSigBaseType, dv as logicSigOptionsDecorator, dw as matchFunction, dx as mimcConfigurationsPType, dz as neverPType, dB as nullPType, dC as numberPType, dD as onCompleteActionType, dE as opUpFeeSourceType, dG as paymentGtxnType, dH as paymentItxnFunction, dI as paymentItxnParamsType, dJ as paymentItxnType, dL as readonlyDecorator, dN as stringPType, dO as submitGroupItxnFunction, dR as transactionTypeType, dU as uint64PType, dZ as undefinedPType, d_ as unknownPType, d$ as urangeFunction, e1 as validateEncodingFunction, e2 as voidPType, e3 as vrfVerifyPType, dX as uint8ArrayToBigInt, dW as uint8ArrayToBase64, dV as uint8ArrayToBase32, dY as uint8ArrayToUtf8, cK as base64ToUint8Array, cI as base32ToUint8Array, cN as bigIntToUint8Array, e0 as utf8ToUint8Array } from './contract-class-model-0NzrC4s2.js';
|
|
2
2
|
export { f as AbsolutePath, b0 as LogLevel, b1 as LogSource, b2 as LoggingContext, bG as SourceLocation } from './contract-class-model-0NzrC4s2.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, j as ContractProxyGeneric, k as ContractProxyType, l as DynamicArrayGeneric, m as DynamicArrayType, n as DynamicBytesClass, S as StaticArrayGeneric, o as StaticArrayType, p as StaticBytesGeneric, q as StaticBytesType, r as TypedApplicationCallResponseGeneric, s as TypedApplicationCallResponseType, U as UFixedNxMGeneric, t as UFixedNxMType, u as UintN128Class, v as UintN16Class, w as UintN256Class, x as UintN32Class, y as UintN64Class, z as UintN8Class, E as UintNGeneric, F as UintNType, G as abiCallFunction, H as arc4AddressAlias, I as arc4BooleanType, J as arc4ByteAlias, K as arc4StringType, M as arc4StructBaseType, O as compileArc4Function, Q as convertBytesFunction, V as decodeArc4Function, Y as dynamicBytesType, Z as encodeArc4Function, $ as methodSelectorFunction, a4 as sizeOfFunction, a7 as uint8ArrayToHex, _ as hexToUint8Array } from './options-
|
|
4
|
-
export { C as CompileOptions, T as TypeResolver, a1 as processInputPaths, a2 as registerPTypes, a6 as typeRegistry } from './options-
|
|
5
|
-
export { c as compile } from './compile-
|
|
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, j as ContractProxyGeneric, k as ContractProxyType, l as DynamicArrayGeneric, m as DynamicArrayType, n as DynamicBytesClass, S as StaticArrayGeneric, o as StaticArrayType, p as StaticBytesGeneric, q as StaticBytesType, r as TypedApplicationCallResponseGeneric, s as TypedApplicationCallResponseType, U as UFixedNxMGeneric, t as UFixedNxMType, u as UintN128Class, v as UintN16Class, w as UintN256Class, x as UintN32Class, y as UintN64Class, z as UintN8Class, E as UintNGeneric, F as UintNType, G as abiCallFunction, H as arc4AddressAlias, I as arc4BooleanType, J as arc4ByteAlias, K as arc4StringType, M as arc4StructBaseType, O as compileArc4Function, Q as convertBytesFunction, V as decodeArc4Function, Y as dynamicBytesType, Z as encodeArc4Function, $ as methodSelectorFunction, a4 as sizeOfFunction, a7 as uint8ArrayToHex, _ as hexToUint8Array } from './options-YOTdChNT.js';
|
|
4
|
+
export { C as CompileOptions, T as TypeResolver, a1 as processInputPaths, a2 as registerPTypes, a6 as typeRegistry } from './options-YOTdChNT.js';
|
|
5
|
+
export { c as compile } from './compile-BFtdjrmj.js';
|
|
6
6
|
import 'typescript';
|
|
7
7
|
import 'node:fs';
|
|
8
8
|
import 'node:util';
|
|
@@ -28,7 +28,7 @@ import 'fs';
|
|
|
28
28
|
import 'fs/promises';
|
|
29
29
|
import './semver-BwxlEvtx.js';
|
|
30
30
|
import 'node:url';
|
|
31
|
-
import './resolve-puya-path-
|
|
31
|
+
import './resolve-puya-path-BisVPj7y.js';
|
|
32
32
|
import 'signal-exit';
|
|
33
33
|
import 'tar';
|
|
34
34
|
import 'node:zlib';
|
|
@@ -17478,6 +17478,11 @@ function narrowSourceType(targetType, sourceType, sourceLocation) {
|
|
|
17478
17478
|
return targetType;
|
|
17479
17479
|
}
|
|
17480
17480
|
if (sourceType instanceof ArrayLiteralPType) {
|
|
17481
|
+
if (sourceType.items.length === 0 && isArrayType(targetType)) {
|
|
17482
|
+
// An empty array literal has no items
|
|
17483
|
+
// adopt the target array type directly
|
|
17484
|
+
return targetType;
|
|
17485
|
+
}
|
|
17481
17486
|
return new ArrayLiteralPType({
|
|
17482
17487
|
items: sourceType.items.map((itemType, itemIndex) => narrowSourceType(getIndexType(targetType, BigInt(itemIndex), sourceLocation), itemType, sourceLocation)),
|
|
17483
17488
|
});
|
|
@@ -23514,4 +23519,4 @@ class PuyaOptions {
|
|
|
23514
23519
|
}
|
|
23515
23520
|
|
|
23516
23521
|
export { methodSelectorFunction as $, ARC4ArrayType as A, ByteClass as B, CompileOptions as C, DefaultMap as D, UintNGeneric as E, UintNType as F, abiCallFunction as G, arc4AddressAlias as H, arc4BooleanType as I, arc4ByteAlias as J, arc4StringType as K, LocalsCoalescingStrategy as L, arc4StructBaseType as M, buildAwst as N, compileArc4Function as O, PuyaService as P, convertBytesFunction as Q, createTsProgram as R, StaticArrayGeneric as S, TypeResolver as T, UFixedNxMGeneric as U, decodeArc4Function as V, defaultPuyaOptions as W, deserializeAndLog as X, dynamicBytesType as Y, encodeArc4Function as Z, hexToUint8Array as _, ARC4BoolClass as a, parseCliTemplateVar as a0, processInputPaths as a1, registerPTypes as a2, relinquishThread as a3, sizeOfFunction as a4, sleep as a5, typeRegistry as a6, uint8ArrayToHex as a7, validateAwst as a8, ARC4EncodedType as b, ARC4InstanceType as c, ARC4StrClass as d, ARC4StructClass as e, ARC4StructType as f, ARC4TupleGeneric as g, ARC4TupleType as h, AddressClass as i, ContractProxyGeneric as j, ContractProxyType as k, DynamicArrayGeneric as l, DynamicArrayType as m, DynamicBytesClass as n, StaticArrayType as o, StaticBytesGeneric as p, StaticBytesType as q, TypedApplicationCallResponseGeneric as r, TypedApplicationCallResponseType as s, UFixedNxMType as t, UintN128Class as u, UintN16Class as v, UintN256Class as w, UintN32Class as x, UintN64Class as y, UintN8Class as z };
|
|
23517
|
-
//# sourceMappingURL=options-
|
|
23522
|
+
//# sourceMappingURL=options-YOTdChNT.js.map
|