@algorandfoundation/puya-ts 1.2.0-beta.36 → 1.2.0-beta.38
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-C1sYEdlC.js → analyser-service-WPf-QuDW.js} +3 -3
- package/{analyser-service-C1sYEdlC.js.map → analyser-service-WPf-QuDW.js.map} +1 -1
- package/analyserService.mjs +3 -3
- package/{arc4-clientgen-BBdFxRUs.js → arc4-clientgen-DgWfvOGz.js} +2 -2
- package/{arc4-clientgen-BBdFxRUs.js.map → arc4-clientgen-DgWfvOGz.js.map} +1 -1
- package/bin/puyats-clientgen.mjs +5 -5
- package/bin/puyats-clientgen.mjs.map +1 -1
- package/bin/puyats-ls.mjs +13 -13
- package/bin/puyats-ls.mjs.map +1 -1
- package/bin/run-cli.mjs +12 -12
- package/{check-node-version-jdAtH-rx.js → check-node-version-DsAd6dpa.js} +3 -3
- package/{check-node-version-jdAtH-rx.js.map → check-node-version-DsAd6dpa.js.map} +1 -1
- package/cli-ls.d.ts +1 -1
- package/cli.d.ts +1 -1
- package/cli.mjs +15 -15
- package/cli.mjs.map +1 -1
- package/clientgen.d.ts +1 -1
- package/{compile-DbGGbErI.js → compile-BJw_a0H1.js} +6 -6
- package/{compile-DbGGbErI.js.map → compile-BJw_a0H1.js.map} +1 -1
- package/constants.d.ts +1 -1
- package/{contract-class-model-CkfUf4wT.js → contract-class-model-CfKzhI4r.js} +17 -85
- package/contract-class-model-CfKzhI4r.js.map +1 -0
- package/index.d.ts +0 -1
- package/index.mjs +8 -8
- package/index.mjs.map +1 -1
- package/language-server/analyser-service.d.ts +0 -1
- package/{options-BMqysQHP.js → options-YRBC-TAk.js} +27 -27
- package/options-YRBC-TAk.js.map +1 -0
- package/package.json +6 -3
- package/{resolve-puya-path-C4sw8aVH.js → resolve-puya-path-DLsqg26A.js} +4 -4
- package/{resolve-puya-path-C4sw8aVH.js.map → resolve-puya-path-DLsqg26A.js.map} +1 -1
- package/{semver-BcvZGdLN.js → semver-B8UJAUju.js} +2 -2
- package/{semver-BcvZGdLN.js.map → semver-B8UJAUju.js.map} +1 -1
- package/{util-DgN3iON1.js → util-BRWKzM85.js} +2 -2
- package/{util-DgN3iON1.js.map → util-BRWKzM85.js.map} +1 -1
- package/contract-class-model-CkfUf4wT.js.map +0 -1
- package/options-BMqysQHP.js.map +0 -1
- package/util/polyfills.d.ts +0 -1
package/cli.mjs
CHANGED
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
import { l as logger, A as AbsolutePath, a as LoggingContext, L as LogLevel } from './contract-class-model-CkfUf4wT.js';
|
|
2
1
|
import { BooleanOptionalAction, ArgumentParser } from 'argparse';
|
|
3
|
-
import { a as appVersion } from './semver-
|
|
4
|
-
import { c as compile } from './compile-
|
|
5
|
-
import { _ as defaultPuyaOptions, X as processInputPaths, V as CompileOptions, $ as parseCliTemplateVar, a0 as LocalsCoalescingStrategy } from './options-
|
|
6
|
-
import {
|
|
7
|
-
import { c as
|
|
8
|
-
import '
|
|
9
|
-
import 'node:fs';
|
|
10
|
-
import 'node:util';
|
|
11
|
-
import 'pathe';
|
|
12
|
-
import 'node:crypto';
|
|
13
|
-
import 'polytype';
|
|
14
|
-
import 'node:async_hooks';
|
|
2
|
+
import { a as appVersion } from './semver-B8UJAUju.js';
|
|
3
|
+
import { c as compile } from './compile-BJw_a0H1.js';
|
|
4
|
+
import { _ as defaultPuyaOptions, X as processInputPaths, V as CompileOptions, $ as parseCliTemplateVar, a0 as LocalsCoalescingStrategy } from './options-YRBC-TAk.js';
|
|
5
|
+
import { l as logger, A as AbsolutePath, a as LoggingContext, L as LogLevel } from './contract-class-model-CfKzhI4r.js';
|
|
6
|
+
import { a as addEnumArg, C as ConsoleLogSink, c as convertInt } from './util-BRWKzM85.js';
|
|
7
|
+
import { c as checkNodeVersion } from './check-node-version-DsAd6dpa.js';
|
|
15
8
|
import 'fs';
|
|
16
9
|
import 'node:url';
|
|
17
|
-
import '
|
|
10
|
+
import 'pathe';
|
|
11
|
+
import './arc4-clientgen-DgWfvOGz.js';
|
|
18
12
|
import '@algorandfoundation/algokit-utils/abi';
|
|
19
13
|
import 'fs/promises';
|
|
20
|
-
import '
|
|
14
|
+
import 'typescript';
|
|
15
|
+
import './resolve-puya-path-DLsqg26A.js';
|
|
21
16
|
import 'tslib';
|
|
22
17
|
import 'signal-exit';
|
|
23
18
|
import 'cross-spawn';
|
|
@@ -25,14 +20,19 @@ import 'crypto';
|
|
|
25
20
|
import 'path';
|
|
26
21
|
import 'tar';
|
|
27
22
|
import 'glob';
|
|
23
|
+
import 'node:fs';
|
|
28
24
|
import 'node:zlib';
|
|
29
25
|
import 'os';
|
|
26
|
+
import 'node:util';
|
|
30
27
|
import 'arcsecond';
|
|
31
28
|
import 'node:buffer';
|
|
29
|
+
import 'node:async_hooks';
|
|
32
30
|
import 'util';
|
|
33
31
|
import 'net';
|
|
34
32
|
import 'change-case';
|
|
35
33
|
import 'minimatch';
|
|
34
|
+
import 'node:crypto';
|
|
35
|
+
import 'polytype';
|
|
36
36
|
import 'chalk';
|
|
37
37
|
|
|
38
38
|
function addBuildCommand(parser) {
|
package/cli.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.mjs","sources":["../src/cli/build-command.ts","../src/cli/parse.ts","../src/cli.ts"],"sourcesContent":["import type { ArgumentParser } from 'argparse'\nimport { BooleanOptionalAction } from 'argparse'\nimport { compile } from '../compile'\nimport { processInputPaths } from '../input-paths/process-input-paths'\nimport { logger, LoggingContext, LogLevel } from '../logger'\nimport { ConsoleLogSink } from '../logger/sinks/console-log-sink'\nimport { CompileOptions, defaultPuyaOptions, LocalsCoalescingStrategy } from '../options'\n\nimport { AbsolutePath } from '../util/absolute-path'\nimport { parseCliTemplateVar } from '../util/template-var-cli-parser'\nimport { addEnumArg, convertInt } from './util'\n\nexport interface BuildCommandArgs {\n command: 'build'\n log_level: LogLevel\n output_awst: boolean\n output_awst_json: boolean\n dry_run: boolean\n skip_version_check: boolean\n output_teal: boolean\n output_source_map: boolean\n output_arc32: boolean\n output_arc56: boolean\n output_client: boolean\n output_ssa_ir: boolean\n output_optimization_ir: boolean\n output_destructured_ir: boolean\n output_memory_ir: boolean\n output_bytecode: boolean\n output_assembly_report: boolean\n out_dir: string\n debug_level: string\n optimization_level: string\n treat_warnings_as_errors: boolean\n target_avm_version: string\n cli_template_definitions: string[]\n validate_abi_args: boolean\n validate_abi_return: boolean\n template_vars_prefix: string\n locals_coalescing_strategy: LocalsCoalescingStrategy\n paths: string[]\n puya_path: string\n}\n\nexport function addBuildCommand(parser: ArgumentParser) {\n addEnumArg(parser, {\n name: '--log-level',\n default: LogLevel.Info,\n enumType: LogLevel,\n help: 'The minimum log level to output',\n })\n\n parser.add_argument('--output-awst', {\n help: 'Output debugging awst file per parsed file',\n default: false,\n action: BooleanOptionalAction,\n })\n\n parser.add_argument('--output-awst-json', {\n action: BooleanOptionalAction,\n default: false,\n help: 'Output debugging awst json file per parsed file',\n })\n\n parser.add_argument('--dry-run', {\n action: BooleanOptionalAction,\n default: false,\n help: \"Just parse typescript files, don't invoke puya compiler\",\n })\n parser.add_argument('--skip-version-check', {\n action: BooleanOptionalAction,\n default: false,\n help: \"Don't verify installed puya compiler version matches targeted version\",\n })\n parser.add_argument('--output-teal', {\n action: BooleanOptionalAction,\n help: 'Output TEAL code',\n default: defaultPuyaOptions.outputTeal,\n })\n parser.add_argument('--output-source-map', {\n action: BooleanOptionalAction,\n help: 'Output debug source maps ',\n default: defaultPuyaOptions.outputSourceMap,\n })\n parser.add_argument('--output-arc32', {\n action: BooleanOptionalAction,\n help: 'Output {contract}.arc32.json ARC-32 app spec file. Only applicable to ARC4 contracts ',\n default: defaultPuyaOptions.outputArc32,\n })\n parser.add_argument('--output-arc56', {\n action: BooleanOptionalAction,\n help: 'Output {contract}.arc56.json ARC-56 app spec file. Only applicable to ARC4 contracts ',\n default: defaultPuyaOptions.outputArc56,\n })\n parser.add_argument('--output-client', {\n action: BooleanOptionalAction,\n help: 'Output {contract}.client.ts Algorand TypeScript contract client for typed ARC-4 ABI calls. Only applicable to ARC4 contracts ',\n default: defaultPuyaOptions.outputClient,\n })\n parser.add_argument('--output-ssa-ir', {\n action: BooleanOptionalAction,\n help: 'Output IR (in SSA form) before optimisations',\n default: defaultPuyaOptions.outputSsaIr,\n })\n parser.add_argument('--output-optimization-ir', {\n action: BooleanOptionalAction,\n help: 'Output IR after each optimization',\n default: defaultPuyaOptions.outputOptimizationIr,\n })\n parser.add_argument('--output-destructured-ir', {\n action: BooleanOptionalAction,\n help: 'Output IR after SSA destructuring and before MIR',\n default: defaultPuyaOptions.outputDestructuredIr,\n })\n parser.add_argument('--output-memory-ir', {\n action: BooleanOptionalAction,\n help: 'Output MIR before lowering to TealOps',\n default: defaultPuyaOptions.outputMemoryIr,\n })\n parser.add_argument('--output-bytecode', {\n action: BooleanOptionalAction,\n help: 'Output AVM bytecode',\n default: defaultPuyaOptions.outputBytecode,\n })\n parser.add_argument('--output-assembly-report', {\n action: BooleanOptionalAction,\n help: 'Output \"human-readable\" source map for advanced debugging purposes.',\n default: defaultPuyaOptions.outputAssemblyReport,\n })\n\n parser.add_argument('--out-dir', {\n action: 'store',\n help: 'Where to output builder artifacts. Can use [name] placeholder to include contract name in path',\n default: 'out',\n })\n\n parser.add_argument('--debug-level', {\n default: defaultPuyaOptions.debugLevel.toString(),\n choices: ['0', '1', '2'],\n help: 'Output debug information level, 0 = none, 1 = debug, 2 = reserved for future use',\n })\n parser.add_argument('--optimization-level', {\n default: defaultPuyaOptions.optimizationLevel.toString(),\n choices: ['0', '1', '2'],\n help: 'Set optimization level of output TEAL / AVM bytecode, 0 = none, 1 = normal, 2 = intensive',\n })\n parser.add_argument('--treat-warnings-as-errors', {\n action: BooleanOptionalAction,\n default: defaultPuyaOptions.treatWarningsAsErrors,\n help: 'Report and treat all warnings emitted by the compiler as errors',\n })\n parser.add_argument('--target-avm-version', {\n default: defaultPuyaOptions.targetAvmVersion.toString(),\n choices: ['10', '11', '12', '13'],\n help: 'Select the targeted AVM version for compilation output',\n })\n\n parser.add_argument('--cli-template-definitions', {\n metavar: 'VAR=VALUE',\n nargs: '+',\n help: 'Define template vars for use when assembling via --output-bytecode, should be specified without the prefix (see --template-vars-prefix)',\n })\n\n parser.add_argument('--validate-abi-args', {\n action: BooleanOptionalAction,\n default: defaultPuyaOptions.validateAbiArgs,\n help: 'Validates ABI transaction arguments by ensuring they are encoded correctly',\n })\n\n parser.add_argument('--validate-abi-return', {\n action: BooleanOptionalAction,\n default: defaultPuyaOptions.validateAbiReturn,\n help: \"Validates encoding of ABI return values when using convertBytes with 'log' `prefix` option, arc4.abiCall, and strongly typed contract to contract calls\",\n })\n\n parser.add_argument('--template-vars-prefix', {\n help: 'Define the prefix to use with --template-var',\n default: defaultPuyaOptions.templateVarsPrefix,\n })\n\n addEnumArg(parser, {\n name: '--locals-coalescing-strategy',\n enumType: LocalsCoalescingStrategy,\n help: 'Strategy choice for out-of-ssa local variable coalescing. The best choice for your app is best determined through experimentation',\n default: defaultPuyaOptions.localsCoalescingStrategy,\n })\n\n parser.add_argument('paths', {\n metavar: 'PATHS',\n nargs: '*',\n help: 'The path, or paths to search for compatible .algo.ts files',\n default: ['.'],\n })\n\n parser.add_argument('--puya-path', {\n help: 'The path to Puya. If not provided, puya-ts will automatically download the appropriate binary for your system',\n })\n}\n\nexport async function buildCommand(args: BuildCommandArgs) {\n const logCtx = LoggingContext.create()\n return logCtx.run(async () => {\n logger.configure([new ConsoleLogSink(args.log_level, AbsolutePath.resolve({ path: '' }))])\n try {\n const filePaths = processInputPaths({ paths: args.paths, outDir: args.out_dir })\n\n await compile(\n new CompileOptions({\n filePaths,\n outputAwst: args.output_awst,\n outputAwstJson: args.output_awst_json,\n\n skipVersionCheck: args.skip_version_check,\n dryRun: args.dry_run,\n logLevel: args.log_level,\n\n outputTeal: args.output_teal,\n outputArc32: args.output_arc32,\n outputArc56: args.output_arc56,\n outputClient: args.output_client,\n outputSsaIr: args.output_ssa_ir,\n outputOptimizationIr: args.output_optimization_ir,\n outputDestructuredIr: args.output_destructured_ir,\n outputMemoryIr: args.output_memory_ir,\n outputBytecode: args.output_bytecode,\n outputSourceMap: args.output_source_map,\n outputAssemblyReport: args.output_assembly_report,\n debugLevel: convertInt(args.debug_level),\n optimizationLevel: convertInt(args.optimization_level),\n treatWarningsAsErrors: args.treat_warnings_as_errors,\n targetAvmVersion: convertInt(args.target_avm_version),\n cliTemplateDefinitions: Object.fromEntries(args.cli_template_definitions?.map(parseCliTemplateVar) ?? []),\n templateVarsPrefix: args.template_vars_prefix,\n localsCoalescingStrategy: args.locals_coalescing_strategy,\n customPuyaPath: args.puya_path,\n validateAbiArgs: args.validate_abi_args,\n validateAbiReturn: args.validate_abi_return,\n }),\n )\n logCtx.exitIfErrors()\n } catch (e) {\n if (e instanceof Error) {\n logger.error(e)\n } else {\n throw e\n }\n }\n })\n}\n","import { ArgumentParser } from 'argparse'\nimport { appVersion } from './app-version'\nimport type { BuildCommandArgs } from './build-command'\nimport { addBuildCommand, buildCommand } from './build-command'\nimport { checkNodeVersion } from './check-node-version'\n\nexport async function parseCliArguments() {\n checkNodeVersion()\n const parser = new ArgumentParser({\n prog: 'puya-ts',\n })\n\n parser.add_argument('--version', {\n action: 'store_const',\n help: 'Show application version',\n const: 'version',\n dest: 'command',\n })\n parser.set_defaults({\n command: 'build',\n })\n addBuildCommand(parser)\n const result: PuyaTsCommand = parser.parse_args()\n switch (result.command) {\n case 'build':\n await buildCommand(result)\n break\n case 'version':\n /* eslint-disable-next-line no-console */\n console.log(appVersion())\n break\n default:\n parser.print_help()\n break\n }\n}\n\ntype PuyaTsCommand = NoCommandArgs | BuildCommandArgs | VersionCommand\ninterface NoCommandArgs {\n command: 'none'\n}\ninterface VersionCommand {\n command: 'version'\n}\n","import './util/polyfills'\nimport { parseCliArguments } from './cli/parse'\n\nvoid parseCliArguments()\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;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AAM,GAAkB,MAAM,CAAC,UAAU,EAAE;AACjD,IAAA,QAAQ,MAAM,CAAC,OAAO;AACpB,QAAA,KAAK,OAAO;AACV,YAAA,MAAM,YAAY,CAAC,MAAM,CAAC;YAC1B;AACF,QAAA,KAAK,SAAS;;AAEZ,YAAA,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC;YACzB;AACF,QAAA;YACE,MAAM,CAAC,UAAU,EAAE;YACnB;;AAEN;;AChCA,KAAK,iBAAiB,EAAE"}
|
|
1
|
+
{"version":3,"file":"cli.mjs","sources":["../src/cli/build-command.ts","../src/cli/parse.ts","../src/cli.ts"],"sourcesContent":["import type { ArgumentParser } from 'argparse'\nimport { BooleanOptionalAction } from 'argparse'\nimport { compile } from '../compile'\nimport { processInputPaths } from '../input-paths/process-input-paths'\nimport { logger, LoggingContext, LogLevel } from '../logger'\nimport { ConsoleLogSink } from '../logger/sinks/console-log-sink'\nimport { CompileOptions, defaultPuyaOptions, LocalsCoalescingStrategy } from '../options'\n\nimport { AbsolutePath } from '../util/absolute-path'\nimport { parseCliTemplateVar } from '../util/template-var-cli-parser'\nimport { addEnumArg, convertInt } from './util'\n\nexport interface BuildCommandArgs {\n command: 'build'\n log_level: LogLevel\n output_awst: boolean\n output_awst_json: boolean\n dry_run: boolean\n skip_version_check: boolean\n output_teal: boolean\n output_source_map: boolean\n output_arc32: boolean\n output_arc56: boolean\n output_client: boolean\n output_ssa_ir: boolean\n output_optimization_ir: boolean\n output_destructured_ir: boolean\n output_memory_ir: boolean\n output_bytecode: boolean\n output_assembly_report: boolean\n out_dir: string\n debug_level: string\n optimization_level: string\n treat_warnings_as_errors: boolean\n target_avm_version: string\n cli_template_definitions: string[]\n validate_abi_args: boolean\n validate_abi_return: boolean\n template_vars_prefix: string\n locals_coalescing_strategy: LocalsCoalescingStrategy\n paths: string[]\n puya_path: string\n}\n\nexport function addBuildCommand(parser: ArgumentParser) {\n addEnumArg(parser, {\n name: '--log-level',\n default: LogLevel.Info,\n enumType: LogLevel,\n help: 'The minimum log level to output',\n })\n\n parser.add_argument('--output-awst', {\n help: 'Output debugging awst file per parsed file',\n default: false,\n action: BooleanOptionalAction,\n })\n\n parser.add_argument('--output-awst-json', {\n action: BooleanOptionalAction,\n default: false,\n help: 'Output debugging awst json file per parsed file',\n })\n\n parser.add_argument('--dry-run', {\n action: BooleanOptionalAction,\n default: false,\n help: \"Just parse typescript files, don't invoke puya compiler\",\n })\n parser.add_argument('--skip-version-check', {\n action: BooleanOptionalAction,\n default: false,\n help: \"Don't verify installed puya compiler version matches targeted version\",\n })\n parser.add_argument('--output-teal', {\n action: BooleanOptionalAction,\n help: 'Output TEAL code',\n default: defaultPuyaOptions.outputTeal,\n })\n parser.add_argument('--output-source-map', {\n action: BooleanOptionalAction,\n help: 'Output debug source maps ',\n default: defaultPuyaOptions.outputSourceMap,\n })\n parser.add_argument('--output-arc32', {\n action: BooleanOptionalAction,\n help: 'Output {contract}.arc32.json ARC-32 app spec file. Only applicable to ARC4 contracts ',\n default: defaultPuyaOptions.outputArc32,\n })\n parser.add_argument('--output-arc56', {\n action: BooleanOptionalAction,\n help: 'Output {contract}.arc56.json ARC-56 app spec file. Only applicable to ARC4 contracts ',\n default: defaultPuyaOptions.outputArc56,\n })\n parser.add_argument('--output-client', {\n action: BooleanOptionalAction,\n help: 'Output {contract}.client.ts Algorand TypeScript contract client for typed ARC-4 ABI calls. Only applicable to ARC4 contracts ',\n default: defaultPuyaOptions.outputClient,\n })\n parser.add_argument('--output-ssa-ir', {\n action: BooleanOptionalAction,\n help: 'Output IR (in SSA form) before optimisations',\n default: defaultPuyaOptions.outputSsaIr,\n })\n parser.add_argument('--output-optimization-ir', {\n action: BooleanOptionalAction,\n help: 'Output IR after each optimization',\n default: defaultPuyaOptions.outputOptimizationIr,\n })\n parser.add_argument('--output-destructured-ir', {\n action: BooleanOptionalAction,\n help: 'Output IR after SSA destructuring and before MIR',\n default: defaultPuyaOptions.outputDestructuredIr,\n })\n parser.add_argument('--output-memory-ir', {\n action: BooleanOptionalAction,\n help: 'Output MIR before lowering to TealOps',\n default: defaultPuyaOptions.outputMemoryIr,\n })\n parser.add_argument('--output-bytecode', {\n action: BooleanOptionalAction,\n help: 'Output AVM bytecode',\n default: defaultPuyaOptions.outputBytecode,\n })\n parser.add_argument('--output-assembly-report', {\n action: BooleanOptionalAction,\n help: 'Output \"human-readable\" source map for advanced debugging purposes.',\n default: defaultPuyaOptions.outputAssemblyReport,\n })\n\n parser.add_argument('--out-dir', {\n action: 'store',\n help: 'Where to output builder artifacts. Can use [name] placeholder to include contract name in path',\n default: 'out',\n })\n\n parser.add_argument('--debug-level', {\n default: defaultPuyaOptions.debugLevel.toString(),\n choices: ['0', '1', '2'],\n help: 'Output debug information level, 0 = none, 1 = debug, 2 = reserved for future use',\n })\n parser.add_argument('--optimization-level', {\n default: defaultPuyaOptions.optimizationLevel.toString(),\n choices: ['0', '1', '2'],\n help: 'Set optimization level of output TEAL / AVM bytecode, 0 = none, 1 = normal, 2 = intensive',\n })\n parser.add_argument('--treat-warnings-as-errors', {\n action: BooleanOptionalAction,\n default: defaultPuyaOptions.treatWarningsAsErrors,\n help: 'Report and treat all warnings emitted by the compiler as errors',\n })\n parser.add_argument('--target-avm-version', {\n default: defaultPuyaOptions.targetAvmVersion.toString(),\n choices: ['10', '11', '12', '13'],\n help: 'Select the targeted AVM version for compilation output',\n })\n\n parser.add_argument('--cli-template-definitions', {\n metavar: 'VAR=VALUE',\n nargs: '+',\n help: 'Define template vars for use when assembling via --output-bytecode, should be specified without the prefix (see --template-vars-prefix)',\n })\n\n parser.add_argument('--validate-abi-args', {\n action: BooleanOptionalAction,\n default: defaultPuyaOptions.validateAbiArgs,\n help: 'Validates ABI transaction arguments by ensuring they are encoded correctly',\n })\n\n parser.add_argument('--validate-abi-return', {\n action: BooleanOptionalAction,\n default: defaultPuyaOptions.validateAbiReturn,\n help: \"Validates encoding of ABI return values when using convertBytes with 'log' `prefix` option, arc4.abiCall, and strongly typed contract to contract calls\",\n })\n\n parser.add_argument('--template-vars-prefix', {\n help: 'Define the prefix to use with --template-var',\n default: defaultPuyaOptions.templateVarsPrefix,\n })\n\n addEnumArg(parser, {\n name: '--locals-coalescing-strategy',\n enumType: LocalsCoalescingStrategy,\n help: 'Strategy choice for out-of-ssa local variable coalescing. The best choice for your app is best determined through experimentation',\n default: defaultPuyaOptions.localsCoalescingStrategy,\n })\n\n parser.add_argument('paths', {\n metavar: 'PATHS',\n nargs: '*',\n help: 'The path, or paths to search for compatible .algo.ts files',\n default: ['.'],\n })\n\n parser.add_argument('--puya-path', {\n help: 'The path to Puya. If not provided, puya-ts will automatically download the appropriate binary for your system',\n })\n}\n\nexport async function buildCommand(args: BuildCommandArgs) {\n const logCtx = LoggingContext.create()\n return logCtx.run(async () => {\n logger.configure([new ConsoleLogSink(args.log_level, AbsolutePath.resolve({ path: '' }))])\n try {\n const filePaths = processInputPaths({ paths: args.paths, outDir: args.out_dir })\n\n await compile(\n new CompileOptions({\n filePaths,\n outputAwst: args.output_awst,\n outputAwstJson: args.output_awst_json,\n\n skipVersionCheck: args.skip_version_check,\n dryRun: args.dry_run,\n logLevel: args.log_level,\n\n outputTeal: args.output_teal,\n outputArc32: args.output_arc32,\n outputArc56: args.output_arc56,\n outputClient: args.output_client,\n outputSsaIr: args.output_ssa_ir,\n outputOptimizationIr: args.output_optimization_ir,\n outputDestructuredIr: args.output_destructured_ir,\n outputMemoryIr: args.output_memory_ir,\n outputBytecode: args.output_bytecode,\n outputSourceMap: args.output_source_map,\n outputAssemblyReport: args.output_assembly_report,\n debugLevel: convertInt(args.debug_level),\n optimizationLevel: convertInt(args.optimization_level),\n treatWarningsAsErrors: args.treat_warnings_as_errors,\n targetAvmVersion: convertInt(args.target_avm_version),\n cliTemplateDefinitions: Object.fromEntries(args.cli_template_definitions?.map(parseCliTemplateVar) ?? []),\n templateVarsPrefix: args.template_vars_prefix,\n localsCoalescingStrategy: args.locals_coalescing_strategy,\n customPuyaPath: args.puya_path,\n validateAbiArgs: args.validate_abi_args,\n validateAbiReturn: args.validate_abi_return,\n }),\n )\n logCtx.exitIfErrors()\n } catch (e) {\n if (e instanceof Error) {\n logger.error(e)\n } else {\n throw e\n }\n }\n })\n}\n","import { ArgumentParser } from 'argparse'\nimport { appVersion } from './app-version'\nimport type { BuildCommandArgs } from './build-command'\nimport { addBuildCommand, buildCommand } from './build-command'\nimport { checkNodeVersion } from './check-node-version'\n\nexport async function parseCliArguments() {\n checkNodeVersion()\n const parser = new ArgumentParser({\n prog: 'puya-ts',\n })\n\n parser.add_argument('--version', {\n action: 'store_const',\n help: 'Show application version',\n const: 'version',\n dest: 'command',\n })\n parser.set_defaults({\n command: 'build',\n })\n addBuildCommand(parser)\n const result: PuyaTsCommand = parser.parse_args()\n switch (result.command) {\n case 'build':\n await buildCommand(result)\n break\n case 'version':\n /* eslint-disable-next-line no-console */\n console.log(appVersion())\n break\n default:\n parser.print_help()\n break\n }\n}\n\ntype PuyaTsCommand = NoCommandArgs | BuildCommandArgs | VersionCommand\ninterface NoCommandArgs {\n command: 'none'\n}\ninterface VersionCommand {\n command: 'version'\n}\n","import { parseCliArguments } from './cli/parse'\n\nvoid parseCliArguments()\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CM,SAAU,eAAe,CAAC,MAAsB,EAAA;IACpD,UAAU,CAAC,MAAM,EAAE;AACjB,QAAA,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE,QAAQ,CAAC,IAAI;AACtB,QAAA,QAAQ,EAAE,QAAQ;AAClB,QAAA,IAAI,EAAE,iCAAiC;AACxC,KAAA,CAAC;AAEF,IAAA,MAAM,CAAC,YAAY,CAAC,eAAe,EAAE;AACnC,QAAA,IAAI,EAAE,4CAA4C;AAClD,QAAA,OAAO,EAAE,KAAK;AACd,QAAA,MAAM,EAAE,qBAAqB;AAC9B,KAAA,CAAC;AAEF,IAAA,MAAM,CAAC,YAAY,CAAC,oBAAoB,EAAE;AACx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gen-
|
|
2
|
-
import { a1 as PuyaService, a2 as deserializeAndLog, Y as registerPTypes, a3 as createTsProgram, a4 as buildAwst, a5 as validateAwst, Z as typeRegistry } from './options-
|
|
3
|
-
import { a as appVersion } from './semver-
|
|
4
|
-
import { ck as mkDirIfNotExists, L as LogLevel, a as LoggingContext, l as logger } from './contract-class-model-
|
|
1
|
+
import { a as writeARC4Clients } from './arc4-clientgen-DgWfvOGz.js';
|
|
2
|
+
import { a1 as PuyaService, a2 as deserializeAndLog, Y as registerPTypes, a3 as createTsProgram, a4 as buildAwst, a5 as validateAwst, Z as typeRegistry } from './options-YRBC-TAk.js';
|
|
3
|
+
import { a as appVersion } from './semver-B8UJAUju.js';
|
|
4
|
+
import { ck as mkDirIfNotExists, L as LogLevel, a as LoggingContext, l as logger } from './contract-class-model-CfKzhI4r.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-DLsqg26A.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-BJw_a0H1.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile-
|
|
1
|
+
{"version":3,"file":"compile-BJw_a0H1.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,GAKf,EAAA;IACC,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,cAAc,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;IAE5E,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,KAAI;AAC9B,QAAA,IAAI,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE;AACjC,YAAA,MAAM,WAAW,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,cAAc,CAAC,IAAI,IAAI,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;YACnH,IAAI,WAAW,EAAE;gBACf,gBAAgB,CAAC,WAAW,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;AAC/C,gBAAA,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,WAAW,CAAC,MAAM,CAAC,QAAQ,EAAE;YACxD;QACF;AACA,QAAA,OAAO,GAAG;IACZ,CAAC,EAAE,EAA2B,CAAC;AACjC;;ACdO,eAAe,WAAW,CAAC,EAChC,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,OAA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AAO;YACL,gBAAgB,EAAE,aAAa,CAAC,gBAAgB;AAChD,YAAA,IAAI,EAAE,UAAU;YAChB,GAAG,EAAE,aAAa,CAAC,WAAW;YAC9B,cAAc;SACf;IACH;AACA,IAAA,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;AACnB,QAAA,MAAM,aAAa,GAAG,MAAM,WAAW,CAAC;YACtC,OAAO;YACP,UAAU;YACV,gBAAgB,EAAE,aAAa,CAAC,gBAAgB;YAChD,cAAc;YACd,WAAW,EAAE,aAAa,CAAC,WAAW;YACtC,WAAW;AACZ,SAAA,CAAC;AAEF,QAAA,IAAI,OAAO,CAAC,YAAY,EAAE;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/constants.d.ts
CHANGED
|
@@ -68,7 +68,7 @@ export declare const Constants: {
|
|
|
68
68
|
readonly supportedAvmVersions: readonly [10n, 11n, 12n, 13n];
|
|
69
69
|
readonly targetedPuyaVersion: "5.9.0-rc.1";
|
|
70
70
|
readonly puyaGithubRepo: "algorandfoundation/puya";
|
|
71
|
-
readonly minNodeVersion: "
|
|
71
|
+
readonly minNodeVersion: "22.11.0";
|
|
72
72
|
readonly languageServerSource: "puyats";
|
|
73
73
|
};
|
|
74
74
|
export type SupportedAvmVersion = (typeof Constants.supportedAvmVersions)[number];
|
|
@@ -78,7 +78,7 @@ const Constants = {
|
|
|
78
78
|
supportedAvmVersions: [10n, 11n, 12n, 13n],
|
|
79
79
|
targetedPuyaVersion: '5.9.0-rc.1',
|
|
80
80
|
puyaGithubRepo: 'algorandfoundation/puya',
|
|
81
|
-
minNodeVersion: '
|
|
81
|
+
minNodeVersion: '22.11.0',
|
|
82
82
|
languageServerSource: 'puyats',
|
|
83
83
|
};
|
|
84
84
|
|
|
@@ -476,74 +476,6 @@ function isIn(subject, items) {
|
|
|
476
476
|
return items.some((i) => i === subject);
|
|
477
477
|
}
|
|
478
478
|
|
|
479
|
-
/*
|
|
480
|
-
Polyfills for Set methods that are not available on older versions of Node
|
|
481
|
-
|
|
482
|
-
We only polyfill methods which are used in this codebase, polyfills should be removed as older
|
|
483
|
-
versions of node are retired from LTS according to https://nodejs.org/en/about/previous-releases
|
|
484
|
-
*/
|
|
485
|
-
// Node < 22.11
|
|
486
|
-
if (!Set.prototype.union) {
|
|
487
|
-
Set.prototype.union = function (other) {
|
|
488
|
-
// Convert ReadonlySetLike to iterable by checking if it's a Set or has values method
|
|
489
|
-
let otherIterable;
|
|
490
|
-
if (other instanceof Set) {
|
|
491
|
-
otherIterable = other;
|
|
492
|
-
}
|
|
493
|
-
else if ('values' in other && typeof other.values === 'function') {
|
|
494
|
-
otherIterable = other.values();
|
|
495
|
-
}
|
|
496
|
-
else {
|
|
497
|
-
throw new TypeError('Argument must be a ReadonlySetLike');
|
|
498
|
-
}
|
|
499
|
-
return new Set([...this, ...otherIterable]);
|
|
500
|
-
};
|
|
501
|
-
}
|
|
502
|
-
// Node < 22.11
|
|
503
|
-
if (!Set.prototype.intersection) {
|
|
504
|
-
Set.prototype.intersection = function (other) {
|
|
505
|
-
return new Set([...this].filter((e) => other.has(e)));
|
|
506
|
-
};
|
|
507
|
-
}
|
|
508
|
-
// Node < 22.11
|
|
509
|
-
if (!Set.prototype.difference) {
|
|
510
|
-
Set.prototype.difference = function (other) {
|
|
511
|
-
return new Set([...this].filter((e) => !other.has(e)));
|
|
512
|
-
};
|
|
513
|
-
}
|
|
514
|
-
// Node < 22
|
|
515
|
-
if (!Set.prototype.symmetricDifference) {
|
|
516
|
-
Set.prototype.symmetricDifference = function (other) {
|
|
517
|
-
const result = this.difference(other);
|
|
518
|
-
for (let it = other.keys(), { value, done } = it.next(); !done; { value, done } = it.next()) {
|
|
519
|
-
if (!this.has(value))
|
|
520
|
-
result.add(value);
|
|
521
|
-
}
|
|
522
|
-
return result;
|
|
523
|
-
};
|
|
524
|
-
}
|
|
525
|
-
// Node < 22.11
|
|
526
|
-
if (!Promise.withResolvers) {
|
|
527
|
-
Promise.withResolvers = function () {
|
|
528
|
-
let resolve = undefined, reject = undefined;
|
|
529
|
-
const promise = new Promise((res, rej) => {
|
|
530
|
-
resolve = res;
|
|
531
|
-
reject = rej;
|
|
532
|
-
});
|
|
533
|
-
return { promise, resolve, reject };
|
|
534
|
-
};
|
|
535
|
-
}
|
|
536
|
-
// Node < 22.11
|
|
537
|
-
const MapIteratorPrototype = Object.getPrototypeOf(new Map().entries());
|
|
538
|
-
if (!MapIteratorPrototype.map) {
|
|
539
|
-
MapIteratorPrototype.map = function* (callbackFn) {
|
|
540
|
-
let i = 0;
|
|
541
|
-
for (const item of this) {
|
|
542
|
-
yield callbackFn(item, i++);
|
|
543
|
-
}
|
|
544
|
-
};
|
|
545
|
-
}
|
|
546
|
-
|
|
547
479
|
class AbsolutePath {
|
|
548
480
|
value;
|
|
549
481
|
constructor(value) {
|
|
@@ -1510,7 +1442,7 @@ const GlobalStateGeneric = new GenericPType({
|
|
|
1510
1442
|
name: 'GlobalState',
|
|
1511
1443
|
module: Constants.moduleNames.algoTs.state,
|
|
1512
1444
|
parameterise(typeArgs) {
|
|
1513
|
-
codeInvariant(typeArgs.length === 1,
|
|
1445
|
+
codeInvariant(typeArgs.length === 1, `${this.name} type expects exactly one type parameter`);
|
|
1514
1446
|
return new GlobalStateType({
|
|
1515
1447
|
content: typeArgs[0],
|
|
1516
1448
|
});
|
|
@@ -1566,7 +1498,7 @@ const LocalStateGeneric = new GenericPType({
|
|
|
1566
1498
|
name: 'LocalState',
|
|
1567
1499
|
module: Constants.moduleNames.algoTs.state,
|
|
1568
1500
|
parameterise(typeArgs) {
|
|
1569
|
-
codeInvariant(typeArgs.length === 1,
|
|
1501
|
+
codeInvariant(typeArgs.length === 1, `${this.name} type expects exactly one type parameter`);
|
|
1570
1502
|
return new LocalStateType({
|
|
1571
1503
|
content: typeArgs[0],
|
|
1572
1504
|
});
|
|
@@ -1934,7 +1866,7 @@ const ArrayGeneric = new GenericPType({
|
|
|
1934
1866
|
name: 'Array',
|
|
1935
1867
|
module: Constants.moduleNames.typescript.es5,
|
|
1936
1868
|
parameterise(typeArgs) {
|
|
1937
|
-
codeInvariant(typeArgs.length === 1,
|
|
1869
|
+
codeInvariant(typeArgs.length === 1, `${this.name} expects exactly 1 type argument`);
|
|
1938
1870
|
return new ArrayPType({ elementType: typeArgs[0] });
|
|
1939
1871
|
},
|
|
1940
1872
|
});
|
|
@@ -1975,7 +1907,7 @@ const ReadonlyArrayGeneric = new GenericPType({
|
|
|
1975
1907
|
name: 'ReadonlyArray',
|
|
1976
1908
|
module: Constants.moduleNames.typescript.es5,
|
|
1977
1909
|
parameterise(typeArgs) {
|
|
1978
|
-
codeInvariant(typeArgs.length === 1,
|
|
1910
|
+
codeInvariant(typeArgs.length === 1, `${this.name} expects exactly 1 type argument`);
|
|
1979
1911
|
return new ReadonlyArrayPType({ elementType: typeArgs[0] });
|
|
1980
1912
|
},
|
|
1981
1913
|
});
|
|
@@ -1992,9 +1924,9 @@ const FixedArrayGeneric = new GenericPType({
|
|
|
1992
1924
|
name: 'FixedArray',
|
|
1993
1925
|
module: Constants.moduleNames.algoTs.arrays,
|
|
1994
1926
|
parameterise(typeArgs) {
|
|
1995
|
-
codeInvariant(typeArgs.length === 2,
|
|
1927
|
+
codeInvariant(typeArgs.length === 2, `${this.name} type expects exactly two type parameters`);
|
|
1996
1928
|
const [elementType, arraySize] = typeArgs;
|
|
1997
|
-
codeInvariant(arraySize instanceof NumericLiteralPType, `Array size generic type param for
|
|
1929
|
+
codeInvariant(arraySize instanceof NumericLiteralPType, `Array size generic type param for ${this.name} must be a literal number. Inferred type is ${arraySize.name}`);
|
|
1998
1930
|
if (elementType instanceof TransientType) {
|
|
1999
1931
|
throw new CodeError(elementType.typeMessage);
|
|
2000
1932
|
}
|
|
@@ -2033,7 +1965,7 @@ const ReadonlyGeneric = new GenericPType({
|
|
|
2033
1965
|
name: 'Readonly',
|
|
2034
1966
|
module: Constants.moduleNames.typescript.es5,
|
|
2035
1967
|
parameterise([obj, ...rest]) {
|
|
2036
|
-
codeInvariant(obj instanceof MutableObjectPType && !rest.length,
|
|
1968
|
+
codeInvariant(obj instanceof MutableObjectPType && !rest.length, `${this.name} expects exactly 1 generic type arg that is an object type`);
|
|
2037
1969
|
return obj.toImmutable();
|
|
2038
1970
|
},
|
|
2039
1971
|
});
|
|
@@ -2197,7 +2129,7 @@ const PromiseGeneric = new GenericPType({
|
|
|
2197
2129
|
name: 'Promise',
|
|
2198
2130
|
module: Constants.moduleNames.typescript.es5,
|
|
2199
2131
|
parameterise(ptypes) {
|
|
2200
|
-
codeInvariant(ptypes.length === 1,
|
|
2132
|
+
codeInvariant(ptypes.length === 1, `${this.name} expects exactly 1 generic parameter`);
|
|
2201
2133
|
return new PromiseType({ resolveType: ptypes[0] });
|
|
2202
2134
|
},
|
|
2203
2135
|
});
|
|
@@ -2657,7 +2589,7 @@ const IterableIteratorGeneric = new GenericPType({
|
|
|
2657
2589
|
name: 'IterableIterator',
|
|
2658
2590
|
module: Constants.moduleNames.typescript.iterable,
|
|
2659
2591
|
parameterise(typeArgs) {
|
|
2660
|
-
codeInvariant(typeArgs.length >= 1 && typeArgs.length <= 3,
|
|
2592
|
+
codeInvariant(typeArgs.length >= 1 && typeArgs.length <= 3, `${this.name} type expects 1-3 type parameters`);
|
|
2661
2593
|
// Currently ignoring return and next types
|
|
2662
2594
|
const [yieldType] = typeArgs;
|
|
2663
2595
|
return new IterableIteratorType({
|
|
@@ -2672,7 +2604,7 @@ class IterableIteratorType extends TransientType {
|
|
|
2672
2604
|
super({
|
|
2673
2605
|
name: `IterableIterator<${itemType.name}>`,
|
|
2674
2606
|
module: Constants.moduleNames.typescript.iterable,
|
|
2675
|
-
typeMessage: '`IterableIterator` is not valid as a variable, parameter, return, or property type
|
|
2607
|
+
typeMessage: '`IterableIterator` is not valid as a variable, parameter, return, or property type',
|
|
2676
2608
|
expressionMessage: 'IterableIterator expressions can only be used in for loops',
|
|
2677
2609
|
singleton: false,
|
|
2678
2610
|
});
|
|
@@ -2689,7 +2621,7 @@ const GeneratorGeneric = new GenericPType({
|
|
|
2689
2621
|
name: 'Generator',
|
|
2690
2622
|
module: Constants.moduleNames.typescript.generator,
|
|
2691
2623
|
parameterise(ptypes) {
|
|
2692
|
-
codeInvariant(ptypes.length === 3,
|
|
2624
|
+
codeInvariant(ptypes.length === 3, `${this.name} type expects exactly 3 type params`);
|
|
2693
2625
|
const [itemType, returnType, nextType] = ptypes;
|
|
2694
2626
|
return new GeneratorType({
|
|
2695
2627
|
itemType,
|
|
@@ -2879,7 +2811,7 @@ const compiledLogicSigType = new ImmutableObjectPType({
|
|
|
2879
2811
|
name: 'CompiledLogicSig',
|
|
2880
2812
|
module: Constants.moduleNames.algoTs.compiled,
|
|
2881
2813
|
}),
|
|
2882
|
-
description: 'Provides account for a Logic Signature. Created by calling `compile(LogicSigType)
|
|
2814
|
+
description: 'Provides account for a Logic Signature. Created by calling `compile(LogicSigType)`',
|
|
2883
2815
|
properties: [{ name: 'account', ptype: accountPType, description: null }],
|
|
2884
2816
|
});
|
|
2885
2817
|
const arc28EmitFunction = new LibFunctionType({
|
|
@@ -2919,8 +2851,8 @@ const PolytypeClassMethodHelper = new LibFunctionType({
|
|
|
2919
2851
|
const ReferenceArrayGeneric = new GenericPType({
|
|
2920
2852
|
name: 'ReferenceArray',
|
|
2921
2853
|
module: Constants.moduleNames.algoTs.referenceArray,
|
|
2922
|
-
parameterise
|
|
2923
|
-
codeInvariant(typeArgs.length === 1,
|
|
2854
|
+
parameterise(typeArgs) {
|
|
2855
|
+
codeInvariant(typeArgs.length === 1, `${this.name} type expects exactly one type parameter`);
|
|
2924
2856
|
const [elementType] = typeArgs;
|
|
2925
2857
|
return new ReferenceArrayType({ elementType: elementType });
|
|
2926
2858
|
},
|
|
@@ -5521,5 +5453,5 @@ class CompilationSet extends CustomKeyMap {
|
|
|
5521
5453
|
}
|
|
5522
5454
|
}
|
|
5523
5455
|
|
|
5524
|
-
export { FixedArrayGeneric as $, AbsolutePath as A, AssetConfigTxnFunction as B, ContractReference as C, AssetFreezeTxnFunction as D, AssetFunction as E, AssetTransferTxnFunction as F, BaseContractClassType as G, BigIntLiteralPType as H, InternalError as I, BigIntPType as J, BigUintFunction as K, LogLevel as L, BooleanFunction as M, BoxGeneric as N, OnCompletionAction as O, PuyaError as P, BoxMapGeneric as Q, BoxMapPType as R, BoxPType as S, BytesFunction as T, BytesGeneric as U, BytesPType as V, ClassMethodDecoratorContext as W, ClearStateProgram as X, ClusteredContractClassType as Y, ClusteredPrototype as Z, ContractClassPType as _, LoggingContext as a, UnsupportedType as a$, FixedArrayPType as a0, FunctionPType as a1, GeneratorGeneric as a2, GeneratorType as a3, GenericPType as a4, GlobalMapGeneric as a5, GlobalMapType as a6, GlobalStateGeneric as a7, GlobalStateType as a8, GroupTransactionPType as a9, NumericLiteralPType as aA, ObjectLiteralPType as aB, ObjectWithOptionalFieldsType as aC, PType as aD, PaymentTxnFunction as aE, PolytypeClassMethodHelper as aF, PromiseGeneric as aG, PromiseType as aH, ReadonlyArrayGeneric as aI, ReadonlyArrayPType as aJ, ReadonlyGeneric as aK, ReadonlyTuplePType as aL, ReferenceArrayGeneric as aM, ReferenceArrayType as aN, StringFunction as aO, SuperPrototypeSelector as aP, SuperPrototypeSelectorGeneric as aQ, TemplateVarFunction as aR, TransactionFunction as aS, TransactionFunctionType as aT, TransientType as aU, TypeParameterType as aV, Uint64EnumMemberLiteralType as aW, Uint64EnumMemberType as aX, Uint64EnumType as aY, Uint64Function as aZ, UnionPType as a_, ImmutableObjectPType as aa, InnerTransactionPType as ab, InstanceType as ac, InternalType as ad, IntersectionPType as ae, IntrinsicEnumType as af, IntrinsicFunctionGroupType as ag, IntrinsicFunctionGroupTypeType as ah, IntrinsicFunctionType as ai, IntrinsicFunctionTypeType as aj, IterableIteratorGeneric as ak, IterableIteratorType as al, ItxnParamsPType as am, KeyRegistrationTxnFunction as an, LibClassType as ao, LibFunctionType as ap, LibObjType as aq, LocalMapGeneric as ar, LocalMapType as as, LocalStateGeneric as at, LocalStateType as au, LogicSigPType as av, MutableObjectPType as aw, MutableTuplePType as ax, NamespacePType as ay, NumberPType as az, ContractClassModel as b, stringPType as b$, anyItxnParamsType as b0, anyItxnType as b1, anyPType as b2, applicationCallItxnFn as b3, applicationCallItxnParamsType as b4, applicationItxnType as b5, arc28EmitFunction as b6, arc4AbiMethodDecorator as b7, arc4BareMethodDecorator as b8, arc4BaseContractType as b9, errFunction as bA, esSymbol as bB, inputOnlyObjects as bC, isArrayType as bD, isObjectType as bE, isTupleLike as bF, itoaMethod as bG, itxnComposePType as bH, keyRegistrationItxnFn as bI, keyRegistrationItxnParamsType as bJ, keyRegistrationItxnType as bK, logFunction as bL, loggedAssertFunction as bM, loggedErrFunction as bN, logicSigBaseType as bO, logicSigOptionsDecorator as bP, matchFunction as bQ, mimcConfigurationsPType as bR, neverPType as bS, nullPType as bT, numberPType as bU, onCompleteActionType as bV, opUpFeeSourceType as bW, paymentItxnFn as bX, paymentItxnParamsType as bY, paymentItxnType as bZ, readonlyDecorator as b_, assertFunction as ba, assertMatchFunction as bb, assetConfigItxnFn as bc, assetConfigItxnParamsType as bd, assetConfigItxnType as be, assetFreezeItxnFn as bf, assetFreezeItxnParamsType as bg, assetFreezeItxnType as bh, assetTransferItxnFn as bi, assetTransferItxnParamsType as bj, assetTransferItxnType as bk, base64PType as bl, baseContractType as bm, bigIntPType as bn, biguintPType as bo, boolPType as bp, bytesPType as bq, bzeroFunction as br, cloneFunctionPType as bs, compileFunctionType as bt, compiledContractType as bu, compiledLogicSigType as bv, contractOptionsDecorator as bw, ecPType as bx, ecdsaPType as by, ensureBudgetFunction as bz, CodeError as c, UInt64BinaryOperator as c$, submitGroupItxnFunction as c0, transactionTypeType as c1, uint64PType as c2, undefinedPType as c3, unknownPType as c4, urangeFunction as c5, validateEncodingFunctionPType as c6, vrfVerifyPType as c7, uint8ArrayToBigInt as c8, uint8ArrayToBase64 as c9,
|
|
5525
|
-
//# sourceMappingURL=contract-class-model-
|
|
5456
|
+
export { FixedArrayGeneric as $, AbsolutePath as A, AssetConfigTxnFunction as B, ContractReference as C, AssetFreezeTxnFunction as D, AssetFunction as E, AssetTransferTxnFunction as F, BaseContractClassType as G, BigIntLiteralPType as H, InternalError as I, BigIntPType as J, BigUintFunction as K, LogLevel as L, BooleanFunction as M, BoxGeneric as N, OnCompletionAction as O, PuyaError as P, BoxMapGeneric as Q, BoxMapPType as R, BoxPType as S, BytesFunction as T, BytesGeneric as U, BytesPType as V, ClassMethodDecoratorContext as W, ClearStateProgram as X, ClusteredContractClassType as Y, ClusteredPrototype as Z, ContractClassPType as _, LoggingContext as a, UnsupportedType as a$, FixedArrayPType as a0, FunctionPType as a1, GeneratorGeneric as a2, GeneratorType as a3, GenericPType as a4, GlobalMapGeneric as a5, GlobalMapType as a6, GlobalStateGeneric as a7, GlobalStateType as a8, GroupTransactionPType as a9, NumericLiteralPType as aA, ObjectLiteralPType as aB, ObjectWithOptionalFieldsType as aC, PType as aD, PaymentTxnFunction as aE, PolytypeClassMethodHelper as aF, PromiseGeneric as aG, PromiseType as aH, ReadonlyArrayGeneric as aI, ReadonlyArrayPType as aJ, ReadonlyGeneric as aK, ReadonlyTuplePType as aL, ReferenceArrayGeneric as aM, ReferenceArrayType as aN, StringFunction as aO, SuperPrototypeSelector as aP, SuperPrototypeSelectorGeneric as aQ, TemplateVarFunction as aR, TransactionFunction as aS, TransactionFunctionType as aT, TransientType as aU, TypeParameterType as aV, Uint64EnumMemberLiteralType as aW, Uint64EnumMemberType as aX, Uint64EnumType as aY, Uint64Function as aZ, UnionPType as a_, ImmutableObjectPType as aa, InnerTransactionPType as ab, InstanceType as ac, InternalType as ad, IntersectionPType as ae, IntrinsicEnumType as af, IntrinsicFunctionGroupType as ag, IntrinsicFunctionGroupTypeType as ah, IntrinsicFunctionType as ai, IntrinsicFunctionTypeType as aj, IterableIteratorGeneric as ak, IterableIteratorType as al, ItxnParamsPType as am, KeyRegistrationTxnFunction as an, LibClassType as ao, LibFunctionType as ap, LibObjType as aq, LocalMapGeneric as ar, LocalMapType as as, LocalStateGeneric as at, LocalStateType as au, LogicSigPType as av, MutableObjectPType as aw, MutableTuplePType as ax, NamespacePType as ay, NumberPType as az, ContractClassModel as b, stringPType as b$, anyItxnParamsType as b0, anyItxnType as b1, anyPType as b2, applicationCallItxnFn as b3, applicationCallItxnParamsType as b4, applicationItxnType as b5, arc28EmitFunction as b6, arc4AbiMethodDecorator as b7, arc4BareMethodDecorator as b8, arc4BaseContractType as b9, errFunction as bA, esSymbol as bB, inputOnlyObjects as bC, isArrayType as bD, isObjectType as bE, isTupleLike as bF, itoaMethod as bG, itxnComposePType as bH, keyRegistrationItxnFn as bI, keyRegistrationItxnParamsType as bJ, keyRegistrationItxnType as bK, logFunction as bL, loggedAssertFunction as bM, loggedErrFunction as bN, logicSigBaseType as bO, logicSigOptionsDecorator as bP, matchFunction as bQ, mimcConfigurationsPType as bR, neverPType as bS, nullPType as bT, numberPType as bU, onCompleteActionType as bV, opUpFeeSourceType as bW, paymentItxnFn as bX, paymentItxnParamsType as bY, paymentItxnType as bZ, readonlyDecorator as b_, assertFunction as ba, assertMatchFunction as bb, assetConfigItxnFn as bc, assetConfigItxnParamsType as bd, assetConfigItxnType as be, assetFreezeItxnFn as bf, assetFreezeItxnParamsType as bg, assetFreezeItxnType as bh, assetTransferItxnFn as bi, assetTransferItxnParamsType as bj, assetTransferItxnType as bk, base64PType as bl, baseContractType as bm, bigIntPType as bn, biguintPType as bo, boolPType as bp, bytesPType as bq, bzeroFunction as br, cloneFunctionPType as bs, compileFunctionType as bt, compiledContractType as bu, compiledLogicSigType as bv, contractOptionsDecorator as bw, ecPType as bx, ecdsaPType as by, ensureBudgetFunction as bz, CodeError as c, UInt64BinaryOperator as c$, submitGroupItxnFunction as c0, transactionTypeType as c1, uint64PType as c2, undefinedPType as c3, unknownPType as c4, urangeFunction as c5, validateEncodingFunctionPType as c6, vrfVerifyPType as c7, uint8ArrayToBigInt as c8, uint8ArrayToBase64 as c9, SingleEvaluation as cA, VarExpression as cB, nodeFactory as cC, NotSupported as cD, TupleItemExpression as cE, FieldExpression as cF, IndexExpression as cG, TupleExpression as cH, AppStateExpression as cI, AppAccountStateExpression as cJ, BoxValueExpression as cK, StateGetEx as cL, StateGet as cM, hasFlags as cN, invariant as cO, BinaryBooleanOperator as cP, SymbolName as cQ, intersectsFlags as cR, extractModuleName as cS, toSubScript as cT, CompilationSet as cU, ARC4ABIMethodConfig as cV, EqualityComparison as cW, ARC4CreateOption as cX, NewArray as cY, BytesEncoding as cZ, FixableCodeError as c_, uint8ArrayToBase32 as ca, uint8ArrayToUtf8 as cb, base64ToUint8Array as cc, base32ToUint8Array as cd, bigIntToUint8Array as ce, utf8ToUint8Array as cf, LogSource as cg, SourceLocation as ch, isMinLevel as ci, enumFromValue as cj, mkDirIfNotExists as ck, distinct as cl, zipStrict as cm, isIn as cn, wtypes as co, codeInvariant as cp, throwError as cq, StringConstant as cr, BytesConstant as cs, IntegerConstant as ct, BoolConstant as cu, AddressConstant as cv, MethodConstant as cw, DecimalConstant as cx, TemplateVar as cy, instanceOfAny as cz, Constants as d, ReturnStatement as d$, tryConvertEnum as d0, NumericComparison as d1, UInt64UnaryOperator as d2, UInt64PostfixUnaryOperator as d3, wrapInCodeError as d4, TransactionKind as d5, LogicSigReference as d6, getInnerTransactionType as d7, getItxnParamsType as d8, CompiledContract as d9, StageInnerTransactions as dA, SubmitInnerTransaction as dB, AssignmentExpression as dC, CommaExpression as dD, NumericComparisonExpression as dE, BytesComparisonExpression as dF, PuyaLibCall as dG, UInt64UnaryOperation as dH, UInt64PostfixUnaryOperation as dI, BigUIntPostfixUnaryOperation as dJ, BytesUnaryOperation as dK, UInt64BinaryOperation as dL, BigUIntBinaryOperation as dM, BooleanBinaryOperation as dN, Not as dO, Emit as dP, Range as dQ, Enumeration as dR, Reversed as dS, StateExists as dT, ARC4Router as dU, MethodSignatureString as dV, SubroutineID as dW, ContractMethodTarget as dX, InstanceMethodTarget as dY, patchErrorLocation as dZ, Goto as d_, ARC4BareMethodConfig as da, MethodSignature as db, BigUIntBinaryOperator as dc, BigUIntPostfixUnaryOperator as dd, BytesBinaryOperator as de, IntrinsicCall as df, enumKeyFromValue as dg, BytesUnaryOperator as dh, PuyaLibFunction as di, Expression as dj, AppStorageKind as dk, transientTypeErrors as dl, getGroupTransactionType as dm, Contract as dn, InstanceSuperMethodTarget as dp, ExpressionStatement as dq, AssertExpression as dr, VoidConstant as ds, ArrayConcat as dt, ArrayPop as du, ArrayReplace as dv, ArrayLength as dw, SizeOf as dx, UpdateInnerTransaction as dy, CheckedMaybe as dz, accountPType as e, ContractMethod as e0, sameSets as e1, Subroutine as e2, LogicSigClassModel as e3, ptypeIn as e4, expandMaybeArray as e5, applicationPType as f, assetPType as g, anyGtxnType as h, assetConfigGtxnType as i, assetTransferGtxnType as j, keyRegistrationGtxnType as k, logger as l, assetFreezeGtxnType as m, applicationCallGtxnType as n, ABICompatibleInstanceType as o, paymentGtxnType as p, ALL_OP_ENUMS as q, AccountFunction as r, AnyPType as s, ApplicationFunctionType as t, ApplicationTxnFunction as u, voidPType as v, ApprovalProgram as w, ArrayGeneric as x, ArrayLiteralPType as y, ArrayPType as z };
|
|
5457
|
+
//# sourceMappingURL=contract-class-model-CfKzhI4r.js.map
|