@algorandfoundation/puya-ts 1.0.0-alpha.4
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/README.md +11 -0
- package/awst/index.d.ts +4 -0
- package/awst/intrinsic-factory.d.ts +35 -0
- package/awst/json-serialize-awst.d.ts +17 -0
- package/awst/models.d.ts +85 -0
- package/awst/node-factory.d.ts +90 -0
- package/awst/nodes.d.ts +841 -0
- package/awst/source-location.d.ts +21 -0
- package/awst/to-code-visitor.d.ts +87 -0
- package/awst/txn-fields.d.ts +84 -0
- package/awst/util.d.ts +2 -0
- package/awst/wtypes.d.ts +131 -0
- package/awst_build/base-visitor.d.ts +87 -0
- package/awst_build/constructor-visitor.d.ts +18 -0
- package/awst_build/context/awst-build-context.d.ts +72 -0
- package/awst_build/context/evaluation-context.d.ts +11 -0
- package/awst_build/context/switch-loop-context.d.ts +31 -0
- package/awst_build/context/unique-name-resolver.d.ts +14 -0
- package/awst_build/contract-data.d.ts +24 -0
- package/awst_build/contract-method-visitor.d.ts +20 -0
- package/awst_build/contract-visitor.d.ts +33 -0
- package/awst_build/decorator-visitor.d.ts +34 -0
- package/awst_build/eb/arc4/arrays.d.ts +31 -0
- package/awst_build/eb/arc4/uint-n-constructor-builder.d.ts +14 -0
- package/awst_build/eb/arc4-bare-method-decorator-builder.d.ts +19 -0
- package/awst_build/eb/assert-function-builder.d.ts +10 -0
- package/awst_build/eb/assert-match-function-builder.d.ts +8 -0
- package/awst_build/eb/biguint-expression-builder.d.ts +21 -0
- package/awst_build/eb/boolean-expression-builder.d.ts +15 -0
- package/awst_build/eb/bytes-expression-builder.d.ts +44 -0
- package/awst_build/eb/contract-builder.d.ts +19 -0
- package/awst_build/eb/ensure-budget.d.ts +8 -0
- package/awst_build/eb/folding.d.ts +5 -0
- package/awst_build/eb/free-subroutine-expression-builder.d.ts +22 -0
- package/awst_build/eb/index.d.ts +90 -0
- package/awst_build/eb/intrinsic-enum-builder.d.ts +9 -0
- package/awst_build/eb/iterable-iterator-expression-builder.d.ts +10 -0
- package/awst_build/eb/literal/array-literal-expression-builder.d.ts +19 -0
- package/awst_build/eb/literal/big-int-literal-expression-builder.d.ts +19 -0
- package/awst_build/eb/literal/conditional-expression-builder.d.ts +22 -0
- package/awst_build/eb/literal/object-expression-builder.d.ts +13 -0
- package/awst_build/eb/literal/object-literal-expression-builder.d.ts +28 -0
- package/awst_build/eb/literal-expression-builder.d.ts +27 -0
- package/awst_build/eb/log-function-builder.d.ts +7 -0
- package/awst_build/eb/namespace-builder.d.ts +9 -0
- package/awst_build/eb/native-array-expression-builder.d.ts +8 -0
- package/awst_build/eb/omitted-expression-builder.d.ts +9 -0
- package/awst_build/eb/op-module-builder.d.ts +25 -0
- package/awst_build/eb/reference/account.d.ts +15 -0
- package/awst_build/eb/reference/application.d.ts +12 -0
- package/awst_build/eb/reference/asset.d.ts +13 -0
- package/awst_build/eb/reference/base.d.ts +37 -0
- package/awst_build/eb/storage/box.d.ts +50 -0
- package/awst_build/eb/storage/global-state.d.ts +29 -0
- package/awst_build/eb/storage/local-state.d.ts +32 -0
- package/awst_build/eb/storage/util.d.ts +5 -0
- package/awst_build/eb/storage/value-proxy.d.ts +22 -0
- package/awst_build/eb/string-expression-builder.d.ts +27 -0
- package/awst_build/eb/transactions/group-transactions.d.ts +15 -0
- package/awst_build/eb/transactions/inner-transaction-params.d.ts +19 -0
- package/awst_build/eb/transactions/inner-transactions.d.ts +10 -0
- package/awst_build/eb/transactions/txn-fields.d.ts +1317 -0
- package/awst_build/eb/transactions/util.d.ts +5 -0
- package/awst_build/eb/tuple-expression-builder.d.ts +12 -0
- package/awst_build/eb/uint64-enum-type-builder.d.ts +13 -0
- package/awst_build/eb/uint64-expression-builder.d.ts +21 -0
- package/awst_build/eb/urange-function.d.ts +7 -0
- package/awst_build/eb/util/arg-parsing.d.ts +106 -0
- package/awst_build/eb/util/compare-bytes.d.ts +5 -0
- package/awst_build/eb/util/compare-uint64.d.ts +5 -0
- package/awst_build/eb/util/index.d.ts +19 -0
- package/awst_build/eb/util/require-constant-value.d.ts +4 -0
- package/awst_build/eb/void-expression-builder.d.ts +7 -0
- package/awst_build/function-visitor.d.ts +45 -0
- package/awst_build/index.d.ts +5 -0
- package/awst_build/lib/index.d.ts +2 -0
- package/awst_build/op-metadata.d.ts +27 -0
- package/awst_build/ptypes/arc4-types.d.ts +56 -0
- package/awst_build/ptypes/base.d.ts +31 -0
- package/awst_build/ptypes/index.d.ts +455 -0
- package/awst_build/ptypes/intrinsic-enum-type.d.ts +14 -0
- package/awst_build/ptypes/op-ptypes.d.ts +6 -0
- package/awst_build/ptypes/register.d.ts +2 -0
- package/awst_build/source-file-visitor.d.ts +21 -0
- package/awst_build/subroutine-visitor.d.ts +10 -0
- package/awst_build/symbol-name.d.ts +10 -0
- package/awst_build/text-visitor.d.ts +20 -0
- package/awst_build/type-registry.d.ts +61 -0
- package/awst_build/type-resolver.d.ts +18 -0
- package/bin/run-cli.d.ts +2 -0
- package/bin/run-cli.mjs +20 -0
- package/bin/run-cli.mjs.map +1 -0
- package/cli.d.ts +1 -0
- package/cli.mjs +146 -0
- package/cli.mjs.map +1 -0
- package/compile-options.d.ts +17 -0
- package/constants.d.ts +20 -0
- package/errors.d.ts +46 -0
- package/index-D6W2FUFQ.js +16297 -0
- package/index-D6W2FUFQ.js.map +1 -0
- package/index.d.ts +19 -0
- package/index.mjs +15 -0
- package/index.mjs.map +1 -0
- package/logger.d.ts +39 -0
- package/node_modules/typescript/LICENSE.txt +55 -0
- package/node_modules/typescript/README.md +50 -0
- package/node_modules/typescript/SECURITY.md +41 -0
- package/node_modules/typescript/ThirdPartyNoticeText.txt +193 -0
- package/node_modules/typescript/bin/tsc +2 -0
- package/node_modules/typescript/bin/tsserver +2 -0
- package/node_modules/typescript/lib/cancellationToken.js +90 -0
- package/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +2087 -0
- package/node_modules/typescript/lib/de/diagnosticMessages.generated.json +2087 -0
- package/node_modules/typescript/lib/es/diagnosticMessages.generated.json +2087 -0
- package/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +2087 -0
- package/node_modules/typescript/lib/it/diagnosticMessages.generated.json +2087 -0
- package/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +2087 -0
- package/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +2087 -0
- package/node_modules/typescript/lib/lib.d.ts +22 -0
- package/node_modules/typescript/lib/lib.decorators.d.ts +386 -0
- package/node_modules/typescript/lib/lib.decorators.legacy.d.ts +22 -0
- package/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +41 -0
- package/node_modules/typescript/lib/lib.dom.d.ts +28087 -0
- package/node_modules/typescript/lib/lib.dom.iterable.d.ts +491 -0
- package/node_modules/typescript/lib/lib.es2015.collection.d.ts +147 -0
- package/node_modules/typescript/lib/lib.es2015.core.d.ts +597 -0
- package/node_modules/typescript/lib/lib.es2015.d.ts +28 -0
- package/node_modules/typescript/lib/lib.es2015.generator.d.ts +77 -0
- package/node_modules/typescript/lib/lib.es2015.iterable.d.ts +527 -0
- package/node_modules/typescript/lib/lib.es2015.promise.d.ts +81 -0
- package/node_modules/typescript/lib/lib.es2015.proxy.d.ts +128 -0
- package/node_modules/typescript/lib/lib.es2015.reflect.d.ts +144 -0
- package/node_modules/typescript/lib/lib.es2015.symbol.d.ts +46 -0
- package/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +326 -0
- package/node_modules/typescript/lib/lib.es2016.array.include.d.ts +116 -0
- package/node_modules/typescript/lib/lib.es2016.d.ts +21 -0
- package/node_modules/typescript/lib/lib.es2016.full.d.ts +23 -0
- package/node_modules/typescript/lib/lib.es2016.intl.d.ts +31 -0
- package/node_modules/typescript/lib/lib.es2017.d.ts +25 -0
- package/node_modules/typescript/lib/lib.es2017.date.d.ts +31 -0
- package/node_modules/typescript/lib/lib.es2017.full.d.ts +23 -0
- package/node_modules/typescript/lib/lib.es2017.intl.d.ts +44 -0
- package/node_modules/typescript/lib/lib.es2017.object.d.ts +49 -0
- package/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +135 -0
- package/node_modules/typescript/lib/lib.es2017.string.d.ts +45 -0
- package/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +53 -0
- package/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +77 -0
- package/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +53 -0
- package/node_modules/typescript/lib/lib.es2018.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2018.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2018.intl.d.ts +83 -0
- package/node_modules/typescript/lib/lib.es2018.promise.d.ts +30 -0
- package/node_modules/typescript/lib/lib.es2018.regexp.d.ts +37 -0
- package/node_modules/typescript/lib/lib.es2019.array.d.ts +79 -0
- package/node_modules/typescript/lib/lib.es2019.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2019.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2019.intl.d.ts +23 -0
- package/node_modules/typescript/lib/lib.es2019.object.d.ts +33 -0
- package/node_modules/typescript/lib/lib.es2019.string.d.ts +37 -0
- package/node_modules/typescript/lib/lib.es2019.symbol.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2020.bigint.d.ts +727 -0
- package/node_modules/typescript/lib/lib.es2020.d.ts +27 -0
- package/node_modules/typescript/lib/lib.es2020.date.d.ts +42 -0
- package/node_modules/typescript/lib/lib.es2020.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2020.intl.d.ts +474 -0
- package/node_modules/typescript/lib/lib.es2020.number.d.ts +28 -0
- package/node_modules/typescript/lib/lib.es2020.promise.d.ts +47 -0
- package/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +97 -0
- package/node_modules/typescript/lib/lib.es2020.string.d.ts +42 -0
- package/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +41 -0
- package/node_modules/typescript/lib/lib.es2021.d.ts +23 -0
- package/node_modules/typescript/lib/lib.es2021.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2021.intl.d.ts +166 -0
- package/node_modules/typescript/lib/lib.es2021.promise.d.ts +48 -0
- package/node_modules/typescript/lib/lib.es2021.string.d.ts +33 -0
- package/node_modules/typescript/lib/lib.es2021.weakref.d.ts +76 -0
- package/node_modules/typescript/lib/lib.es2022.array.d.ts +121 -0
- package/node_modules/typescript/lib/lib.es2022.d.ts +26 -0
- package/node_modules/typescript/lib/lib.es2022.error.d.ts +73 -0
- package/node_modules/typescript/lib/lib.es2022.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2022.intl.d.ts +121 -0
- package/node_modules/typescript/lib/lib.es2022.object.d.ts +26 -0
- package/node_modules/typescript/lib/lib.es2022.regexp.d.ts +39 -0
- package/node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts +39 -0
- package/node_modules/typescript/lib/lib.es2022.string.d.ts +25 -0
- package/node_modules/typescript/lib/lib.es2023.array.d.ts +924 -0
- package/node_modules/typescript/lib/lib.es2023.collection.d.ts +21 -0
- package/node_modules/typescript/lib/lib.es2023.d.ts +22 -0
- package/node_modules/typescript/lib/lib.es2023.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2023.intl.d.ts +56 -0
- package/node_modules/typescript/lib/lib.es5.d.ts +4585 -0
- package/node_modules/typescript/lib/lib.es6.d.ts +23 -0
- package/node_modules/typescript/lib/lib.esnext.array.d.ts +35 -0
- package/node_modules/typescript/lib/lib.esnext.collection.d.ts +106 -0
- package/node_modules/typescript/lib/lib.esnext.d.ts +29 -0
- package/node_modules/typescript/lib/lib.esnext.decorators.d.ts +28 -0
- package/node_modules/typescript/lib/lib.esnext.disposable.d.ts +193 -0
- package/node_modules/typescript/lib/lib.esnext.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.esnext.intl.d.ts +21 -0
- package/node_modules/typescript/lib/lib.esnext.iterator.d.ts +148 -0
- package/node_modules/typescript/lib/lib.esnext.object.d.ts +29 -0
- package/node_modules/typescript/lib/lib.esnext.promise.d.ts +35 -0
- package/node_modules/typescript/lib/lib.esnext.regexp.d.ts +25 -0
- package/node_modules/typescript/lib/lib.esnext.string.d.ts +29 -0
- package/node_modules/typescript/lib/lib.scripthost.d.ts +322 -0
- package/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +41 -0
- package/node_modules/typescript/lib/lib.webworker.d.ts +9410 -0
- package/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +23 -0
- package/node_modules/typescript/lib/lib.webworker.iterable.d.ts +288 -0
- package/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +2087 -0
- package/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +2087 -0
- package/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +2087 -0
- package/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +2087 -0
- package/node_modules/typescript/lib/tsc.js +130771 -0
- package/node_modules/typescript/lib/tsserver.js +623 -0
- package/node_modules/typescript/lib/tsserverlibrary.d.ts +17 -0
- package/node_modules/typescript/lib/tsserverlibrary.js +21 -0
- package/node_modules/typescript/lib/typesMap.json +497 -0
- package/node_modules/typescript/lib/typescript.d.ts +11329 -0
- package/node_modules/typescript/lib/typescript.js +196077 -0
- package/node_modules/typescript/lib/typingsInstaller.js +236 -0
- package/node_modules/typescript/lib/watchGuard.js +53 -0
- package/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +2087 -0
- package/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +2087 -0
- package/node_modules/typescript/package.json +121 -0
- package/package.json +42 -0
- package/parser/index.d.ts +13 -0
- package/parser/json-serialize-source-files.d.ts +2 -0
- package/parser/resolve-module-name-literals.d.ts +2 -0
- package/puya/build-compilation-set-mapping.d.ts +10 -0
- package/puya/index.d.ts +13 -0
- package/puya/options.d.ts +29 -0
- package/puya/run-child-proc.d.ts +5 -0
- package/util/base-32.d.ts +2 -0
- package/util/base-85.d.ts +10 -0
- package/util/default-map.d.ts +1 -0
- package/util/generate-temp-file.d.ts +9 -0
- package/util/index.d.ts +43 -0
- package/visitor/syntax-names.d.ts +441 -0
- package/visitor/visitor.d.ts +26 -0
- package/write-artifact.d.ts +12 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "typescript",
|
|
3
|
+
"author": "Microsoft Corp.",
|
|
4
|
+
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
+
"version": "5.6.2",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"TypeScript",
|
|
10
|
+
"Microsoft",
|
|
11
|
+
"compiler",
|
|
12
|
+
"language",
|
|
13
|
+
"javascript"
|
|
14
|
+
],
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/microsoft/TypeScript/issues"
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "https://github.com/microsoft/TypeScript.git"
|
|
21
|
+
},
|
|
22
|
+
"main": "./lib/typescript.js",
|
|
23
|
+
"typings": "./lib/typescript.d.ts",
|
|
24
|
+
"bin": {
|
|
25
|
+
"tsc": "./bin/tsc",
|
|
26
|
+
"tsserver": "./bin/tsserver"
|
|
27
|
+
},
|
|
28
|
+
"engines": {
|
|
29
|
+
"node": ">=14.17"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"bin",
|
|
33
|
+
"lib",
|
|
34
|
+
"!lib/enu",
|
|
35
|
+
"LICENSE.txt",
|
|
36
|
+
"README.md",
|
|
37
|
+
"SECURITY.md",
|
|
38
|
+
"ThirdPartyNoticeText.txt",
|
|
39
|
+
"!**/.gitattributes"
|
|
40
|
+
],
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@dprint/formatter": "^0.4.1",
|
|
43
|
+
"@dprint/typescript": "0.91.6",
|
|
44
|
+
"@esfx/canceltoken": "^1.0.0",
|
|
45
|
+
"@eslint/js": "^9.9.0",
|
|
46
|
+
"@octokit/rest": "^21.0.1",
|
|
47
|
+
"@types/chai": "^4.3.17",
|
|
48
|
+
"@types/diff": "^5.2.1",
|
|
49
|
+
"@types/minimist": "^1.2.5",
|
|
50
|
+
"@types/mocha": "^10.0.7",
|
|
51
|
+
"@types/ms": "^0.7.34",
|
|
52
|
+
"@types/node": "latest",
|
|
53
|
+
"@types/source-map-support": "^0.5.10",
|
|
54
|
+
"@types/which": "^3.0.4",
|
|
55
|
+
"@typescript-eslint/rule-tester": "^8.1.0",
|
|
56
|
+
"@typescript-eslint/type-utils": "^8.1.0",
|
|
57
|
+
"@typescript-eslint/utils": "^8.1.0",
|
|
58
|
+
"azure-devops-node-api": "^14.0.2",
|
|
59
|
+
"c8": "^10.1.2",
|
|
60
|
+
"chai": "^4.5.0",
|
|
61
|
+
"chalk": "^4.1.2",
|
|
62
|
+
"chokidar": "^3.6.0",
|
|
63
|
+
"diff": "^5.2.0",
|
|
64
|
+
"dprint": "^0.47.2",
|
|
65
|
+
"esbuild": "^0.23.0",
|
|
66
|
+
"eslint": "^9.9.0",
|
|
67
|
+
"eslint-formatter-autolinkable-stylish": "^1.4.0",
|
|
68
|
+
"eslint-plugin-regexp": "^2.6.0",
|
|
69
|
+
"fast-xml-parser": "^4.4.1",
|
|
70
|
+
"glob": "^10.4.5",
|
|
71
|
+
"globals": "^15.9.0",
|
|
72
|
+
"hereby": "^1.9.0",
|
|
73
|
+
"jsonc-parser": "^3.3.1",
|
|
74
|
+
"knip": "^5.27.2",
|
|
75
|
+
"minimist": "^1.2.8",
|
|
76
|
+
"mocha": "^10.7.3",
|
|
77
|
+
"mocha-fivemat-progress-reporter": "^0.1.0",
|
|
78
|
+
"monocart-coverage-reports": "^2.10.2",
|
|
79
|
+
"ms": "^2.1.3",
|
|
80
|
+
"node-fetch": "^3.3.2",
|
|
81
|
+
"playwright": "^1.46.0",
|
|
82
|
+
"source-map-support": "^0.5.21",
|
|
83
|
+
"tslib": "^2.6.3",
|
|
84
|
+
"typescript": "^5.5.4",
|
|
85
|
+
"typescript-eslint": "^8.1.0",
|
|
86
|
+
"which": "^3.0.1"
|
|
87
|
+
},
|
|
88
|
+
"overrides": {
|
|
89
|
+
"typescript@*": "$typescript"
|
|
90
|
+
},
|
|
91
|
+
"scripts": {
|
|
92
|
+
"test": "hereby runtests-parallel --light=false",
|
|
93
|
+
"test:eslint-rules": "hereby run-eslint-rules-tests",
|
|
94
|
+
"build": "npm run build:compiler && npm run build:tests",
|
|
95
|
+
"build:compiler": "hereby local",
|
|
96
|
+
"build:tests": "hereby tests",
|
|
97
|
+
"build:tests:notypecheck": "hereby tests --no-typecheck",
|
|
98
|
+
"clean": "hereby clean",
|
|
99
|
+
"gulp": "hereby",
|
|
100
|
+
"lint": "hereby lint",
|
|
101
|
+
"knip": "hereby knip",
|
|
102
|
+
"format": "dprint fmt",
|
|
103
|
+
"setup-hooks": "node scripts/link-hooks.mjs"
|
|
104
|
+
},
|
|
105
|
+
"browser": {
|
|
106
|
+
"fs": false,
|
|
107
|
+
"os": false,
|
|
108
|
+
"path": false,
|
|
109
|
+
"crypto": false,
|
|
110
|
+
"buffer": false,
|
|
111
|
+
"source-map-support": false,
|
|
112
|
+
"inspector": false,
|
|
113
|
+
"perf_hooks": false
|
|
114
|
+
},
|
|
115
|
+
"packageManager": "npm@8.19.4",
|
|
116
|
+
"volta": {
|
|
117
|
+
"node": "20.1.0",
|
|
118
|
+
"npm": "8.19.4"
|
|
119
|
+
},
|
|
120
|
+
"gitHead": "a7e3374f13327483fbe94e32806d65785b0b6cda"
|
|
121
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"scripts": {},
|
|
3
|
+
"files": [
|
|
4
|
+
"**"
|
|
5
|
+
],
|
|
6
|
+
"name": "@algorandfoundation/puya-ts",
|
|
7
|
+
"version": "1.0.0-alpha.4",
|
|
8
|
+
"description": "Compiles Algorand TypeScript into byte code which runs on the Algorand Virtual Machine (AVM)",
|
|
9
|
+
"private": false,
|
|
10
|
+
"author": "Algorand foundation",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"chalk": "^5.3.0",
|
|
14
|
+
"change-case": "^5.4.4",
|
|
15
|
+
"commander": "^12.1.0",
|
|
16
|
+
"cross-spawn": "^7.0.3",
|
|
17
|
+
"glob": "^11.0.0",
|
|
18
|
+
"polytype": "^0.17.0",
|
|
19
|
+
"typescript": "^5.6.2",
|
|
20
|
+
"zod": "^3.23.8"
|
|
21
|
+
},
|
|
22
|
+
"bundledDependencies": [
|
|
23
|
+
"typescript"
|
|
24
|
+
],
|
|
25
|
+
"module": "./index.mjs",
|
|
26
|
+
"types": "./index.d.ts",
|
|
27
|
+
"type": "module",
|
|
28
|
+
"bin": {
|
|
29
|
+
"puya-ts": "./bin/run-cli.mjs",
|
|
30
|
+
"puyats": "./bin/run-cli.mjs"
|
|
31
|
+
},
|
|
32
|
+
"exports": {
|
|
33
|
+
".": {
|
|
34
|
+
"types": "./index.d.ts",
|
|
35
|
+
"import": "./index.mjs"
|
|
36
|
+
},
|
|
37
|
+
"./cli": {
|
|
38
|
+
"types": "./cli.d.ts",
|
|
39
|
+
"import": "./cli.mjs"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import ts from 'typescript';
|
|
2
|
+
import type { CompileOptions } from '../compile-options';
|
|
3
|
+
export type SourceFileMapping = Record<string, ts.SourceFile>;
|
|
4
|
+
export type CreateProgramResult = {
|
|
5
|
+
sourceFiles: SourceFileMapping;
|
|
6
|
+
program: ts.Program;
|
|
7
|
+
};
|
|
8
|
+
export declare function createTsProgram(options: CompileOptions): {
|
|
9
|
+
sourceFiles: {
|
|
10
|
+
[k: string]: ts.SourceFile;
|
|
11
|
+
};
|
|
12
|
+
program: ts.Program;
|
|
13
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import ts from 'typescript';
|
|
2
|
+
export declare function resolveModuleNameLiterals(moduleLiterals: readonly ts.StringLiteralLike[], containingFile: string, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions): readonly ts.ResolvedModuleWithFailedLookupLocations[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CompilationSet } from '../awst/models';
|
|
2
|
+
import type { AWST } from '../awst/nodes';
|
|
3
|
+
import type { CompilationSetMapping } from './options';
|
|
4
|
+
export declare function buildCompilationSetMapping({ awst, inputPaths, programDirectory, compilationSet, outDir, }: {
|
|
5
|
+
awst: AWST[];
|
|
6
|
+
inputPaths: string[];
|
|
7
|
+
programDirectory: string;
|
|
8
|
+
outDir: string;
|
|
9
|
+
compilationSet: CompilationSet;
|
|
10
|
+
}): CompilationSetMapping;
|
package/puya/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CompilationSet } from '../awst/models';
|
|
2
|
+
import type { AWST } from '../awst/nodes';
|
|
3
|
+
import type { CompileOptions } from '../compile-options';
|
|
4
|
+
import type { SourceFileMapping } from '../parser';
|
|
5
|
+
import type { PuyaPassThroughOptions } from './options';
|
|
6
|
+
export declare function invokePuya({ moduleAwst, programDirectory, sourceFiles, compileOptions, compilationSet, passThroughOptions, }: {
|
|
7
|
+
moduleAwst: AWST[];
|
|
8
|
+
programDirectory: string;
|
|
9
|
+
sourceFiles: SourceFileMapping;
|
|
10
|
+
compileOptions: CompileOptions;
|
|
11
|
+
compilationSet: CompilationSet;
|
|
12
|
+
passThroughOptions: PuyaPassThroughOptions;
|
|
13
|
+
}): void;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare enum LocalsCoalescingStrategy {
|
|
2
|
+
root_operand = "root_operand",
|
|
3
|
+
root_operand_excluding_args = "root_operand_excluding_args",
|
|
4
|
+
aggressive = "aggressive"
|
|
5
|
+
}
|
|
6
|
+
export type CompilationSetMapping = Record<string, string>;
|
|
7
|
+
export declare const defaultPuyaOptions: PuyaPassThroughOptions;
|
|
8
|
+
export type PuyaPassThroughOptions = Omit<PuyaOptions, 'compilationSet'>;
|
|
9
|
+
export declare class PuyaOptions {
|
|
10
|
+
outputTeal: boolean;
|
|
11
|
+
outputArc32: boolean;
|
|
12
|
+
outputSsaIr: boolean;
|
|
13
|
+
outputOptimizationIr: boolean;
|
|
14
|
+
outputDestructuredIr: boolean;
|
|
15
|
+
outputMemoryIr: boolean;
|
|
16
|
+
outputBytecode: boolean;
|
|
17
|
+
matchAlgodBytecode: boolean;
|
|
18
|
+
debugLevel: number;
|
|
19
|
+
optimizationLevel: number;
|
|
20
|
+
targetAvmVersion: number;
|
|
21
|
+
cliTemplateDefinitions: string[];
|
|
22
|
+
templateVarsPrefix: string;
|
|
23
|
+
localsCoalescingStrategy: LocalsCoalescingStrategy;
|
|
24
|
+
compilationSet: CompilationSetMapping;
|
|
25
|
+
constructor({ passThroughOptions, compilationSet, }: {
|
|
26
|
+
passThroughOptions: PuyaPassThroughOptions;
|
|
27
|
+
compilationSet: CompilationSetMapping;
|
|
28
|
+
});
|
|
29
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This implementation of base85 encoding matches python's base64.b85encode(...) function which is based on the character set of rfc1924
|
|
3
|
+
* but supports arbitrary sized input.
|
|
4
|
+
*
|
|
5
|
+
* It IS NOT an ascii85 implementation
|
|
6
|
+
*/
|
|
7
|
+
export declare function buildBase85Encoder(): {
|
|
8
|
+
encode(b: Uint8Array): string;
|
|
9
|
+
encodeUtf8(s: string): string;
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function defaultRecord<TKey extends PropertyKey, TValue>(defaultInit: (key: TKey) => TValue): Record<TKey, TValue>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { WriteFileOptions } from 'node:fs';
|
|
2
|
+
export type TempFile = {
|
|
3
|
+
writeFileSync(data: NodeJS.ArrayBufferView, options?: WriteFileOptions): void;
|
|
4
|
+
writeFileSync(data: string, options?: WriteFileOptions): void;
|
|
5
|
+
readonly filePath: string;
|
|
6
|
+
} & Disposable;
|
|
7
|
+
export declare function generateTempFile(options?: {
|
|
8
|
+
ext?: string;
|
|
9
|
+
}): TempFile;
|
package/util/index.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { SourceLocation } from '../awst/source-location';
|
|
2
|
+
import type { DeliberateAny } from '../typescript-helpers';
|
|
3
|
+
export { base32ToUint8Array, uint8ArrayToBase32 } from './base-32';
|
|
4
|
+
export declare function invariant(condition: unknown, message: string): asserts condition;
|
|
5
|
+
export declare function codeInvariant(condition: unknown, message: string, sourceLocation?: SourceLocation): asserts condition;
|
|
6
|
+
export declare const convertEnum: <TEnumIn, TEnumOut, TKeys extends string>(value: TEnumIn, fromEnum: Record<TKeys, TEnumIn>, toEnum: Record<TKeys, TEnumOut>) => TEnumOut;
|
|
7
|
+
export declare const tryConvertEnum: <TEnumIn, TEnumOut, TKeys extends string>(value: TEnumIn, fromEnum: Record<TKeys, TEnumIn>, toEnum: Record<string, TEnumOut>) => TEnumOut | undefined;
|
|
8
|
+
export declare const expandMaybeArray: <T>(maybeArray: T | T[]) => T[];
|
|
9
|
+
export declare const hexToUint8Array: (value: string) => Uint8Array;
|
|
10
|
+
export declare const base64ToUint8Array: (value: string) => Uint8Array;
|
|
11
|
+
export declare const utf8ToUint8Array: (value: string) => Uint8Array;
|
|
12
|
+
export declare const uint8ArrayToUtf8: (value: Uint8Array) => string;
|
|
13
|
+
export declare const bigIntToUint8Array: (val: bigint, fixedSize?: number | "dynamic") => Uint8Array;
|
|
14
|
+
export declare const hasFlags: <T extends number>(value: T, flags: T) => boolean;
|
|
15
|
+
export declare const intersectsFlags: <T extends number>(value: T, flags: T) => boolean;
|
|
16
|
+
export declare function enumerate<T>(iterable: Iterable<T>): IterableIterator<readonly [number, T]>;
|
|
17
|
+
export declare function toSubScript(num: number): string;
|
|
18
|
+
export declare function instanceOfAny<T extends Array<{
|
|
19
|
+
new (...args: DeliberateAny[]): DeliberateAny;
|
|
20
|
+
}>>(x: unknown, ...types: T): x is InstanceType<T[number]>;
|
|
21
|
+
/**
|
|
22
|
+
* Normalise a file path to only include relevant segments.
|
|
23
|
+
*
|
|
24
|
+
* - Anything in /node_modules/ is truncated to <package-name>/path.ext
|
|
25
|
+
* - Anything in workingDirectory is truncated relative to the workingDirectory
|
|
26
|
+
* - Forward slashes are used to segment paths
|
|
27
|
+
* @param filePath
|
|
28
|
+
* @param workingDirectory
|
|
29
|
+
*/
|
|
30
|
+
export declare function normalisePath(filePath: string, workingDirectory: string): string;
|
|
31
|
+
type SortDir = 'asc' | 'desc';
|
|
32
|
+
export declare const sortBy: <T, TKey>(keySelector: (item: T) => TKey, dir?: SortDir) => (a: T, b: T) => number;
|
|
33
|
+
/**
|
|
34
|
+
* Can be used to filter a collection to a set of distinct items as determined by a specified key.
|
|
35
|
+
* @param keySelector A lambda which when given an item, returns the items unique identifier
|
|
36
|
+
*
|
|
37
|
+
* Usage:
|
|
38
|
+
*
|
|
39
|
+
* ```
|
|
40
|
+
* const distinctItems = nonDistinctItems.filter(distinct(x => x.uniqueId))
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare const distinct: <T>(keySelector?: (item: T) => unknown) => (item: T) => boolean;
|