From dcd64233fc3b1d4cd286913506474a0af80a46af Mon Sep 17 00:00:00 2001 From: Wouter Spaak Date: Wed, 16 Oct 2024 14:45:54 +0200 Subject: [PATCH] Fix TS emit --- .github/workflows/node_release.yml | 3 ++- .gitignore | 2 ++ typescript/package.json | 3 ++- typescript/src/index.ts | 2 ++ typescript/tsconfig.json | 4 +++- 5 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 typescript/src/index.ts diff --git a/.github/workflows/node_release.yml b/.github/workflows/node_release.yml index 7a07d2a..da97342 100644 --- a/.github/workflows/node_release.yml +++ b/.github/workflows/node_release.yml @@ -28,7 +28,8 @@ jobs: - name: Build and publish to NPM run: | npm ci - npm run build + npm run proto + npm run tsc npm --no-git-tag-version --force version from-git npm publish --provenance --access public env: diff --git a/.gitignore b/.gitignore index bba8bb7..83c06cc 100644 --- a/.gitignore +++ b/.gitignore @@ -230,3 +230,5 @@ typescript/src/job_pb.d.ts typescript/src/job_pb.js typescript/src/workflow_pb.d.ts typescript/src/workflow_pb.js +typescript/src/index.js +typescript/src/index.d.ts \ No newline at end of file diff --git a/typescript/package.json b/typescript/package.json index 7f5c6d5..de9610f 100644 --- a/typescript/package.json +++ b/typescript/package.json @@ -4,7 +4,8 @@ "main": "./src/index.js", "typings": "./src/index.d.ts", "scripts": { - "build": "./node_modules/.bin/ts-node ./proto.ts" + "proto": "./node_modules/.bin/ts-node ./proto.ts", + "tsc": "npx tsc -p ./tsconfig.json" }, "repository": { "type": "git", diff --git a/typescript/src/index.ts b/typescript/src/index.ts new file mode 100644 index 0000000..68eba94 --- /dev/null +++ b/typescript/src/index.ts @@ -0,0 +1,2 @@ +export * from './job_pb'; +export * from './workflow_pb'; diff --git a/typescript/tsconfig.json b/typescript/tsconfig.json index 2cfa5d7..cc25566 100644 --- a/typescript/tsconfig.json +++ b/typescript/tsconfig.json @@ -1,5 +1,7 @@ { + "include": ["src/**/*.ts"], "compilerOptions": { + "declaration": true, /* Visit https://aka.ms/tsconfig to read more about this file */ /* Projects */ @@ -106,5 +108,5 @@ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ "skipLibCheck": true /* Skip type checking all .d.ts files. */ }, - "exclude": ["node_modules", "./src"] /* ./src is autogenerated by protoc */ + "exclude": ["node_modules"] /* ./src is autogenerated by protoc */ }