@vixoniccom/kpi-chart 0.0.2-beta.0 → 0.0.2-dev.1

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.
@@ -0,0 +1,98 @@
1
+ name: Publish to NPM
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ - main
8
+
9
+ jobs:
10
+ publish:
11
+ # Solo ejecutar si es un push a main/master
12
+ if: github.event_name == 'push'
13
+ runs-on: ubuntu-latest
14
+
15
+ steps:
16
+ - name: Checkout code
17
+ uses: actions/checkout@v4
18
+ with:
19
+ fetch-depth: 0
20
+
21
+ - name: Setup Node.js 20
22
+ uses: actions/setup-node@v4
23
+ with:
24
+ node-version: '20'
25
+ registry-url: 'https://registry.npmjs.org'
26
+ scope: '@vixoniccom'
27
+
28
+ - name: Configure npm authentication
29
+ run: |
30
+ echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
31
+ echo "@vixoniccom:registry=https://registry.npmjs.org/" >> ~/.npmrc
32
+ echo "registry=https://registry.npmjs.org/" >> ~/.npmrc
33
+
34
+ - name: Cache node modules
35
+ uses: actions/cache@v4
36
+ with:
37
+ path: ~/.npm
38
+ key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
39
+ restore-keys: |
40
+ ${{ runner.os }}-node-
41
+
42
+ - name: Install dependencies
43
+ run: npm ci
44
+ env:
45
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
46
+
47
+ - name: Build package
48
+ run: npm run prepublish
49
+ env:
50
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
51
+
52
+ - name: Verify build.zip exists
53
+ run: |
54
+ if [ ! -f "build.zip" ]; then
55
+ echo "❌ Error: build.zip not found after build process"
56
+ exit 1
57
+ fi
58
+ echo "✅ build.zip found successfully"
59
+ ls -la build.zip
60
+
61
+ - name: Check if version already exists on npm
62
+ id: check-version
63
+ run: |
64
+ PACKAGE_NAME=$(node -p "require('./package.json').name")
65
+ PACKAGE_VERSION=$(node -p "require('./package.json').version")
66
+
67
+ echo "Checking if $PACKAGE_NAME@$PACKAGE_VERSION exists on npm..."
68
+
69
+ if npm view "$PACKAGE_NAME@$PACKAGE_VERSION" version 2>/dev/null; then
70
+ echo "version-exists=true" >> $GITHUB_OUTPUT
71
+ echo "⚠️ Version $PACKAGE_VERSION already exists on npm"
72
+ else
73
+ echo "version-exists=false" >> $GITHUB_OUTPUT
74
+ echo "✅ Version $PACKAGE_VERSION does not exist on npm - ready to publish"
75
+ fi
76
+
77
+ - name: Publish to npm
78
+ if: steps.check-version.outputs.version-exists == 'false'
79
+ run: |
80
+ echo "Publishing to npm..."
81
+ npm publish --access public
82
+ env:
83
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
84
+
85
+ - name: Publication success
86
+ if: steps.check-version.outputs.version-exists == 'false'
87
+ run: |
88
+ PACKAGE_NAME=$(node -p "require('./package.json').name")
89
+ PACKAGE_VERSION=$(node -p "require('./package.json').version")
90
+ echo "🎉 Successfully published $PACKAGE_NAME@$PACKAGE_VERSION to npm!"
91
+ echo "📦 Package includes build.zip with the compiled application"
92
+
93
+ - name: Skip publication
94
+ if: steps.check-version.outputs.version-exists == 'true'
95
+ run: |
96
+ PACKAGE_VERSION=$(node -p "require('./package.json').version")
97
+ echo "⏭️ Skipping publication - version $PACKAGE_VERSION already exists on npm"
98
+ echo "💡 To publish a new version, update the version in package.json or run 'npm run release'"
@@ -0,0 +1,30 @@
1
+ name: Sonarqube Analysis
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - development
7
+ pull_request:
8
+ types: [opened, synchronize, reopened]
9
+
10
+ jobs:
11
+ sonarqube:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ with:
16
+ # Disabling shallow clone is recommended for improving relevancy of reporting.
17
+ fetch-depth: 0
18
+
19
+ - name: SonarQube Scan
20
+ uses: sonarsource/sonarqube-scan-action@master
21
+ env:
22
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
23
+ SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
24
+
25
+ - name: SonarQube Quality Gate Check
26
+ uses: sonarsource/sonarqube-quality-gate-action@master
27
+ timeout-minutes: 5
28
+ env:
29
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
30
+ SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
package/CHANGELOG.md CHANGED
@@ -2,6 +2,21 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.0.2-dev.1](https://github.com/Vixonic/store-sheets-kpi/compare/v0.0.2-dev.0...v0.0.2-dev.1) (2025-09-11)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * sonarqube comments ([34c8d95](https://github.com/Vixonic/store-sheets-kpi/commit/34c8d959b40896decae97966e32f58568016495c))
11
+
12
+ ### [0.0.2-dev.0](https://github.com/Vixonic/store-sheets-kpi/compare/v0.0.2-beta.0...v0.0.2-dev.0) (2025-09-11)
13
+
14
+
15
+ ### Features
16
+
17
+ * service logic added on main ([4a808dc](https://github.com/Vixonic/store-sheets-kpi/commit/4a808dc062b46d16b8e5fc91b4687f87aa913d83))
18
+ * sonarqube config & CI/CD ([4d10ebc](https://github.com/Vixonic/store-sheets-kpi/commit/4d10ebc6ad00c7a44cd8cb3fa21820eeaa3f7083))
19
+
5
20
  ### [0.0.2-beta.0](https://github.com/Vixonic/store-sheets-kpi/compare/v0.0.1...v0.0.2-beta.0) (2025-09-11)
6
21
 
7
22
 
package/build.zip CHANGED
Binary file
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "author": {
9
9
  "name": "Lorenzo Alfaro Bravo"
10
10
  },
11
- "version": "0.0.2-beta.0",
11
+ "version": "0.0.2-dev.1",
12
12
  "scripts": {
13
13
  "prepublishOnly": "vixonic-module-packager --mode=build",
14
14
  "watch": "vixonic-module-packager --mode=watch",
@@ -29,7 +29,7 @@
29
29
  "@types/react": "^17.0.2",
30
30
  "@types/react-dom": "^17.0.11",
31
31
  "@vixoniccom/module-packager": "^2.13.0",
32
- "@vixoniccom/modules": "2.23.0-dev.6",
32
+ "@vixoniccom/modules": "^2.23.1",
33
33
  "standard-version": "^9.5.0"
34
34
  }
35
35
  }
@@ -0,0 +1 @@
1
+ sonar.projectKey=Vixonic_store-sheets-kpi_12e7b95b-fc91-4f7e-a0e7-1dd33cc0de3d
package/build/index.html DELETED
@@ -1 +0,0 @@
1
- <!doctype html><html style="position:absolute;height:100%;width:100%;overflow:hidden"><head><title>KPI Charts</title><meta charset="utf-8"/></head><body style="margin:0"><div id="root" style="position:absolute;top:0;right:0;bottom:0;left:0"></div><script src="./main.js"></script></body></html>