Update tsc command
Some checks failed
Generate and Release Protos / release (push) Failing after 20s
Some checks failed
Generate and Release Protos / release (push) Failing after 20s
This commit is contained in:
@@ -49,16 +49,21 @@ jobs:
|
|||||||
working-directory: gen/ts
|
working-directory: gen/ts
|
||||||
run: |
|
run: |
|
||||||
npm init -y
|
npm init -y
|
||||||
# Add a build script to the generated package.json
|
|
||||||
|
# 1. Update package.json to be a proper ESM module
|
||||||
|
# We point "main" and "types" to the expected generated location
|
||||||
jq '.name = "@owlboard/backend-data-contracts" |
|
jq '.name = "@owlboard/backend-data-contracts" |
|
||||||
.version = "${{ steps.get_version.outputs.VERSION }}" |
|
.version = "${{ steps.get_version.outputs.VERSION }}" |
|
||||||
.main = "./dist/index.js" |
|
.type = "module" |
|
||||||
.types = "./dist/index.d.ts" |
|
.main = "./dist/rail_backend/v1/pis_mapping.js" |
|
||||||
.scripts.build = "tsc *.ts --declaration --esm --outDir dist/" |
|
.types = "./dist/rail_backend/v1/pis_mapping.d.ts" |
|
||||||
.devDependencies.typescript = "^5.0.0"' \
|
.publishConfig = { "registry": "https://git.fjla.uk/api/packages/owlboard/npm" }' \
|
||||||
package.json > temp.json && mv temp.json package.json
|
package.json > temp.json && mv temp.json package.json
|
||||||
|
|
||||||
npx tsc *.ts --declaration --module esnext --target es2022 --moduleResolution node --outDir dist/
|
# 2. Compile all TS files found in any subdirectories
|
||||||
|
# Using '**/*.ts' allows tsc to find the nested files
|
||||||
|
npx tsc **/*.ts --declaration --module esnext --target es2022 --moduleResolution node --outDir dist/
|
||||||
|
|
||||||
npm publish
|
npm publish
|
||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_PUSH }}
|
NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_PUSH }}
|
||||||
|
|||||||
Reference in New Issue
Block a user