siesa-agents 2.1.84 → 2.1.85

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "siesa-agents",
3
- "version": "2.1.84",
3
+ "version": "2.1.85",
4
4
  "description": "Paquete para instalar y configurar agentes SIESA en tu proyecto",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -24,6 +24,8 @@
24
24
  "siesa-agents/**/*",
25
25
  "vscode/**/*",
26
26
  "github/**/*",
27
+ "!github/workflows/**",
28
+ "!github/CODEOWNERS",
27
29
  "claude/**/*",
28
30
  "gemini/**/*",
29
31
  "bin/**/*",
package/github/CODEOWNERS DELETED
@@ -1,7 +0,0 @@
1
- # CODEOWNERS file
2
- # Este archivo define quiénes son los propietarios del código y deben aprobar los cambios
3
- # Para más información: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
4
-
5
- # Propietarios globales del repositorio
6
- # Todos los archivos requieren aprobación de estos usuarios
7
- * @gdboneth @jtoledosiesa
@@ -1,150 +0,0 @@
1
- name: Publish NPM Package
2
-
3
- on:
4
- push:
5
- branches:
6
- - main # Producción - versiones estables
7
- - develop # Desarrollo - versiones dev
8
-
9
- jobs:
10
- publish-npm:
11
- runs-on: ubuntu-latest
12
-
13
- permissions:
14
- contents: write # Necesario para crear tags y push
15
-
16
- steps:
17
- - name: Checkout repository
18
- uses: actions/checkout@v4
19
- with:
20
- fetch-depth: 0 # Necesario para git operations
21
- token: ${{ secrets.GITHUB_TOKEN }}
22
-
23
- - name: Setup Node.js
24
- uses: actions/setup-node@v4
25
- with:
26
- node-version: '18'
27
- registry-url: 'https://registry.npmjs.org'
28
-
29
- - name: Install dependencies
30
- run: npm ci --ignore-scripts
31
-
32
- - name: Configure Git
33
- run: |
34
- git config --global user.email "github-actions@siesa.com"
35
- git config --global user.name "GitHub Actions"
36
-
37
- - name: Get current version
38
- id: current-version
39
- run: |
40
- CURRENT_VERSION=$(node -p "require('./package.json').version")
41
- echo "version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
42
- echo "Versión en package.json: $CURRENT_VERSION"
43
-
44
- - name: Publish stable release (main)
45
- if: github.ref == 'refs/heads/main'
46
- env:
47
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
48
- run: |
49
- echo "Publicando en npm como release estable (latest)..."
50
- CURRENT_VERSION=${{ steps.current-version.outputs.version }}
51
- PUBLISHED_VERSION=$(npm view siesa-agents version 2>/dev/null || echo "0.0.0")
52
- echo "Última versión publicada (latest): $PUBLISHED_VERSION"
53
-
54
- # Comparar versiones usando node para determinar si necesitamos incrementar
55
- NEEDS_BUMP=$(node -e "
56
- const current = '$CURRENT_VERSION'.split('.').map(Number);
57
- const published = '$PUBLISHED_VERSION'.split('.').map(Number);
58
- for (let i = 0; i < 3; i++) {
59
- if (current[i] < published[i]) { console.log('yes'); process.exit(0); }
60
- if (current[i] > published[i]) { console.log('no'); process.exit(0); }
61
- }
62
- console.log('yes'); // Si son iguales, también incrementamos
63
- ")
64
-
65
- if [ "$NEEDS_BUMP" = "yes" ]; then
66
- echo "La versión actual ($CURRENT_VERSION) es menor o igual que la publicada ($PUBLISHED_VERSION)"
67
- echo "Estableciendo versión base a la publicada: $PUBLISHED_VERSION"
68
- npm version $PUBLISHED_VERSION --no-git-tag-version --allow-same-version
69
- echo "Incrementando versión desde $PUBLISHED_VERSION..."
70
- npm version patch --no-git-tag-version
71
- NEW_VERSION=$(node -p "require('./package.json').version")
72
- echo "Nueva versión estable: $NEW_VERSION"
73
- git add package.json
74
- git commit -m "Bump version to $NEW_VERSION"
75
- git tag "v$NEW_VERSION"
76
- else
77
- echo "Usando versión estable $CURRENT_VERSION (mayor que la publicada)"
78
- NEW_VERSION=$CURRENT_VERSION
79
- fi
80
-
81
- npm run build || echo "No build script, continuing..."
82
- npm publish --access public --tag latest
83
-
84
- # Push tags y commits
85
- git push origin main --tags || echo "Push failed, continuing..."
86
-
87
- - name: Publish dev prerelease (develop)
88
- if: github.ref == 'refs/heads/develop'
89
- env:
90
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
91
- run: |
92
- echo "Publicando en npm como prerelease (dev)..."
93
-
94
- # Obtener la última versión estable para usar como base
95
- LATEST_STABLE=$(npm view siesa-agents version 2>/dev/null || echo "0.0.0")
96
- echo "Última versión estable: $LATEST_STABLE"
97
-
98
- # Obtener la última versión dev para verificar el incremento
99
- PUBLISHED_DEV_VERSION=$(npm view siesa-agents@dev version 2>/dev/null || echo "0.0.0-dev.0")
100
- echo "Última versión publicada (dev): $PUBLISHED_DEV_VERSION"
101
-
102
- # Extraer la base de la versión dev (sin -dev.X)
103
- DEV_BASE=$(echo "$PUBLISHED_DEV_VERSION" | sed 's/-dev\.[0-9]*$//')
104
- echo "Base de versión dev existente: $DEV_BASE"
105
-
106
- # Comparar si la versión estable es diferente (mayor) que la base dev
107
- if [ "$LATEST_STABLE" != "$DEV_BASE" ]; then
108
- echo "Nueva versión estable detectada ($LATEST_STABLE vs $DEV_BASE), iniciando nueva serie dev"
109
-
110
- # Intentar verificar si ya existe la versión .dev.0 para la nueva versión estable
111
- echo "Verificando si existe $LATEST_STABLE-dev.0..."
112
- EXISTING_CHECK=$(npm view siesa-agents@$LATEST_STABLE-dev.0 version 2>/dev/null || echo "")
113
-
114
- if [ -n "$EXISTING_CHECK" ]; then
115
- echo "Ya existe $LATEST_STABLE-dev.0, buscando la última versión dev de esta serie..."
116
- # Si existe .dev.0, usar la versión dev actual como base y incrementar
117
- npm version $PUBLISHED_DEV_VERSION --no-git-tag-version --allow-same-version
118
- echo "Incrementando prerelease de desarrollo..."
119
- npm version prerelease --preid=dev --no-git-tag-version
120
- else
121
- echo "No existe $LATEST_STABLE-dev.0, generando primera versión dev de la serie"
122
- npm version "$LATEST_STABLE-dev.0" --no-git-tag-version --allow-same-version
123
- fi
124
- else
125
- echo "Continuando serie dev existente desde: $PUBLISHED_DEV_VERSION"
126
- npm version $PUBLISHED_DEV_VERSION --no-git-tag-version --allow-same-version
127
- echo "Incrementando prerelease de desarrollo..."
128
- npm version prerelease --preid=dev --no-git-tag-version
129
- fi
130
-
131
- NEW_VERSION=$(node -p "require('./package.json').version")
132
- echo "Nueva versión dev: $NEW_VERSION"
133
- git add package.json
134
- git commit -m "Bump dev version to $NEW_VERSION"
135
- git tag "v$NEW_VERSION"
136
-
137
- npm run build || echo "No build script, continuing..."
138
- npm publish --access public --tag dev
139
-
140
- # Push tags y commits
141
- git push origin develop --tags || echo "Push failed, continuing..."
142
-
143
- - name: Upload logs
144
- if: always()
145
- uses: actions/upload-artifact@v4
146
- with:
147
- name: npm-logs
148
- path: '*.log'
149
- retention-days: 1
150
- if-no-files-found: ignore