From c118fc96271e87410e663b5fc13ae85745e584c6 Mon Sep 17 00:00:00 2001 From: Bobby Lat Date: Fri, 27 Sep 2024 11:25:12 +0800 Subject: [PATCH] export awst components as part of puya-ts instead ofa separate internal module --- .tstoolkitrc.ts | 1 - package.json | 2 +- rollup.config.ts | 1 - src/index.ts | 6 ++++++ src/internal.ts | 5 ----- 5 files changed, 7 insertions(+), 8 deletions(-) delete mode 100644 src/internal.ts diff --git a/.tstoolkitrc.ts b/.tstoolkitrc.ts index 370efb34..b12bbb35 100644 --- a/.tstoolkitrc.ts +++ b/.tstoolkitrc.ts @@ -9,7 +9,6 @@ const config: TsToolkitConfig = { exports: { '.': 'index.ts', './cli': 'cli.ts', - './internal': 'internal.ts', }, bin: { 'puya-ts': 'bin/run-cli.ts', diff --git a/package.json b/package.json index 770a94ca..5d560498 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@algorandfoundation/puya-ts", "version": "1.0.0", "description": "", - "types": "src/internal.ts", + "types": "src/index.ts", "scripts": { "postinstall": "npx patch-package", "dev:examples": "tsx src/cli.ts build examples --output-awst --output-awst-json", diff --git a/rollup.config.ts b/rollup.config.ts index c6827373..42cef73d 100644 --- a/rollup.config.ts +++ b/rollup.config.ts @@ -8,7 +8,6 @@ const config: RollupOptions = { input: { index: 'src/index.ts', cli: 'src/cli.ts', - internal: 'src/internal.ts', 'bin/run-cli': 'src/bin/run-cli.ts', }, output: [ diff --git a/src/index.ts b/src/index.ts index 1ed8c928..f80e8fc4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,6 +12,12 @@ import { createTsProgram } from './parser' import { invokePuya } from './puya' import type { PuyaPassThroughOptions } from './puya/options' +export { SourceLocation } from './awst/source-location' +export { anyPType, ContractClassPType, FunctionPType, PType } from './awst_build/ptypes' +export { registerPTypes } from './awst_build/ptypes/register' +export { typeRegistry } from './awst_build/type-registry' +export { TypeResolver } from './awst_build/type-resolver' + export type CompileResult = { logs: LogEvent[] programDirectory: string diff --git a/src/internal.ts b/src/internal.ts deleted file mode 100644 index c5ba314e..00000000 --- a/src/internal.ts +++ /dev/null @@ -1,5 +0,0 @@ -export { SourceLocation } from './awst/source-location' -export { ContractClassPType, FunctionPType, PType, anyPType } from './awst_build/ptypes' -export { registerPTypes } from './awst_build/ptypes/register' -export { typeRegistry } from './awst_build/type-registry' -export { TypeResolver } from './awst_build/type-resolver'