fix: review import templates #33

Merged
blas merged 11 commits from feat/review-imports into main 2026-03-24 15:48:23 +00:00
2 changed files with 21 additions and 3 deletions
Showing only changes of commit 73dcb6f701 - Show all commits

View File

@@ -17,6 +17,23 @@ jobs:
with:
node-version: '20'
- name: Set version from tag
run: |
VERSION=${GITHUB_REF_NAME#v}
echo "Setting package version to $VERSION"
npm pkg set version="$VERSION"
SHA=$(curl -s -H "Authorization: token ${GITEA_TOKEN}" \
"https://git.blassanto.me/api/v1/repos/blas/openapi-clean-arch-gen/contents/package.json?ref=main" \
| node -e "let d='';process.stdin.on('data',c=>d+=c).on('end',()=>console.log(JSON.parse(d).sha))")
CONTENT=$(base64 -w 0 package.json)
curl -s -X PUT \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
"https://git.blassanto.me/api/v1/repos/blas/openapi-clean-arch-gen/contents/package.json" \
-d "{\"message\":\"chore: bump to version v${VERSION}\",\"content\":\"${CONTENT}\",\"sha\":\"${SHA}\",\"branch\":\"main\"}"
env:
GITEA_TOKEN: ${{ secrets.TOKEN }}
- name: Install dependencies
run: npm ci
@@ -30,9 +47,9 @@ jobs:
run: |
echo "//git.blassanto.me/api/packages/blas/npm/:_authToken=${NODE_AUTH_TOKEN}" >> ~/.npmrc
env:
NODE_AUTH_TOKEN: ${{ secrets.TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
- name: Publish to Gitea
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}

View File

@@ -1,6 +1,6 @@
{
"name": "@blas/openapi-clean-arch-generator",
"version": "1.0.0",
"version": "0.0.1-alpha",
"description": "Generador de código Angular con Clean Architecture desde OpenAPI/Swagger",
"main": "dist/main.js",
"bin": {
@@ -8,6 +8,7 @@
},
"scripts": {
"build": "tsc && cp -r templates dist/",
"postbuild": "node -e \"const fs=require('fs'); const f='dist/main.js'; const c=fs.readFileSync(f,'utf8'); if(!c.startsWith('#!/usr/bin/env node')) fs.writeFileSync(f,'#!/usr/bin/env node\\n'+c); fs.chmodSync(f, '755');\"",
"prepublishOnly": "npm run build",
"generate": "node dist/main.js",
"generate:dev": "ts-node main.ts",