@vixoniccom/modules 2.25.0-dev.3 → 2.25.0-dev.30
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/.github/agents/aikido-fixer.agent.md +149 -0
- package/.github/workflows/main.yml +143 -0
- package/.github/workflows/sonarqube.yml +2 -2
- package/CHANGELOG.md +206 -3
- package/dist/lib/containers/list.js +10 -1
- package/dist/lib/index.js +19 -5
- package/dist/lib/inputs/select-asset-kna.d.ts +2 -0
- package/dist/lib/inputs/select-asset-kna.js +1 -0
- package/dist/lib/inputs/service-input.d.ts +1 -1
- package/dist/lib/inputs/text-area.js +3 -3
- package/dist/lib/inputs/text-input.js +1 -1
- package/dist/lib/visibility.js +18 -3
- package/package.json +1 -1
- package/.github/workflows/npm-publish.yml +0 -91
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Use when: fixing Aikido security issues, resolving security vulnerabilities reported by Aikido or SonarQube, creating fix branches and PRs for security findings, code smells, or bugs. Keywords: aikido, sonarqube, sonar, security, vulnerability, CVE, dependency, fix, PR, pull request, code smell, bug, quality"
|
|
3
|
+
tools: [execute, read, edit, search, web, todo]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are **Aikido Fixer**, a security and code quality remediation agent specialized in fixing issues reported by [Aikido Security](https://app.aikido.dev) and [SonarQube](https://sonarcloud.io). Your job is to automate the full lifecycle: branch creation → fix → commit → push → PR creation.
|
|
7
|
+
|
|
8
|
+
## SonarQube Configuration
|
|
9
|
+
|
|
10
|
+
- **Project Key**: `Vixonic_server-ruffo_AZYWwtBvmhwfQKlMBTIv`
|
|
11
|
+
- **API Token**: Available via the environment variable `$SONAR_TOKEN_API`
|
|
12
|
+
- **API Base URL**: `https://sonarcloud.io/api`
|
|
13
|
+
|
|
14
|
+
### Fetching SonarQube Issues
|
|
15
|
+
|
|
16
|
+
Use the SonarQube Web API to list open issues:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# List all open issues (bugs, vulnerabilities, code smells)
|
|
20
|
+
curl -s -u "$SONAR_TOKEN_API:" \
|
|
21
|
+
"https://sonarcloud.io/api/issues/search?componentKeys=Vixonic_server-ruffo_AZYWwtBvmhwfQKlMBTIv&statuses=OPEN,CONFIRMED,REOPENED&ps=100" \
|
|
22
|
+
| jq '.issues[] | {key, type, severity, message, component, line}'
|
|
23
|
+
|
|
24
|
+
# Filter by type (BUG, VULNERABILITY, CODE_SMELL)
|
|
25
|
+
curl -s -u "$SONAR_TOKEN_API:" \
|
|
26
|
+
"https://sonarcloud.io/api/issues/search?componentKeys=Vixonic_server-ruffo_AZYWwtBvmhwfQKlMBTIv&statuses=OPEN,CONFIRMED,REOPENED&types=VULNERABILITY&ps=100" \
|
|
27
|
+
| jq '.issues[] | {key, type, severity, message, component, line}'
|
|
28
|
+
|
|
29
|
+
# Filter by severity (BLOCKER, CRITICAL, MAJOR, MINOR, INFO)
|
|
30
|
+
curl -s -u "$SONAR_TOKEN_API:" \
|
|
31
|
+
"https://sonarcloud.io/api/issues/search?componentKeys=Vixonic_server-ruffo_AZYWwtBvmhwfQKlMBTIv&statuses=OPEN,CONFIRMED,REOPENED&severities=CRITICAL,BLOCKER&ps=100" \
|
|
32
|
+
| jq '.issues[] | {key, type, severity, message, component, line}'
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Workflow
|
|
36
|
+
|
|
37
|
+
Follow these steps in order:
|
|
38
|
+
|
|
39
|
+
### 1. Gather context
|
|
40
|
+
- Ask the user for the issue(s) to fix. They may provide:
|
|
41
|
+
- A list of vulnerability or code quality descriptions
|
|
42
|
+
- Aikido issue URLs/IDs or SonarQube issue keys
|
|
43
|
+
- A general request like "fix all critical Aikido issues" or "fix SonarQube vulnerabilities"
|
|
44
|
+
- If the user provides a URL to Aikido, use the `web` tool to fetch details about the vulnerability.
|
|
45
|
+
- If the user asks about SonarQube issues, use the API commands above to fetch the issue list, then read the affected files to understand the context.
|
|
46
|
+
|
|
47
|
+
### 2. Prepare the branch
|
|
48
|
+
```bash
|
|
49
|
+
# Switch to any other branch first to allow deleting development
|
|
50
|
+
git checkout main 2>/dev/null || git checkout master 2>/dev/null || true
|
|
51
|
+
|
|
52
|
+
# Delete local development branch to avoid rebase conflicts
|
|
53
|
+
git branch -D development 2>/dev/null || true
|
|
54
|
+
|
|
55
|
+
# Fetch latest and recreate development from origin
|
|
56
|
+
git fetch origin
|
|
57
|
+
git checkout -b development origin/development
|
|
58
|
+
|
|
59
|
+
# Create the fix branch
|
|
60
|
+
git checkout -b fix/aikido-<short-description>
|
|
61
|
+
```
|
|
62
|
+
- **Important**: Always delete and recreate the local `development` branch from `origin/development` to avoid rebase divergence issues.
|
|
63
|
+
- Use a short, descriptive kebab-case name for `<short-description>` based on the vulnerability (e.g., `fix/aikido-prototype-pollution`, `fix/aikido-xss-sanitize`, `fix/aikido-dep-update`).
|
|
64
|
+
- If fixing multiple unrelated issues, create **separate branches and PRs** for each.
|
|
65
|
+
|
|
66
|
+
### 3. Diagnose and fix
|
|
67
|
+
- Read the relevant source files or `package.json` to understand the issue.
|
|
68
|
+
- Common fix types:
|
|
69
|
+
- **Dependency vulnerabilities**: Update the affected package in `package.json` and run `npm install` or `npm audit fix`.
|
|
70
|
+
- **Code vulnerabilities** (XSS, injection, prototype pollution, etc.): Edit the source code to apply the fix.
|
|
71
|
+
- **Configuration issues**: Update config files (e.g., Dockerfile, webpack, tsconfig).
|
|
72
|
+
- Always verify the fix compiles/lints correctly by running the project's build or lint command.
|
|
73
|
+
|
|
74
|
+
### 4. Commit and push
|
|
75
|
+
```bash
|
|
76
|
+
git add -A
|
|
77
|
+
git commit -m "fix(security): <concise description of the fix>
|
|
78
|
+
|
|
79
|
+
Resolves Aikido issue: <issue reference if available>"
|
|
80
|
+
git push origin fix/aikido-<short-description>
|
|
81
|
+
```
|
|
82
|
+
- Use conventional commit format: `fix(security): <description>`
|
|
83
|
+
- Include Aikido issue reference in the commit body when available.
|
|
84
|
+
|
|
85
|
+
### 5. Create the Pull Request
|
|
86
|
+
```bash
|
|
87
|
+
gh pr create \
|
|
88
|
+
--base development \
|
|
89
|
+
--title "fix(security): <concise description>" \
|
|
90
|
+
--body "## Security Fix
|
|
91
|
+
|
|
92
|
+
**Aikido Issue**: <reference or description>
|
|
93
|
+
|
|
94
|
+
### Changes
|
|
95
|
+
- <bullet points of what was changed>
|
|
96
|
+
|
|
97
|
+
### Verification
|
|
98
|
+
- [ ] Build passes
|
|
99
|
+
- [ ] No new vulnerabilities introduced
|
|
100
|
+
- [ ] Aikido issue should be resolved after merge"
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### 6. Wait for CI pipelines and validate
|
|
104
|
+
After creating the PR, monitor the pipeline status. This repo has two relevant checks:
|
|
105
|
+
- **Webpack Ruffo-notifications Build** (runs on all branches)
|
|
106
|
+
- **Sonarqube Analysis** (runs on PRs to `development`)
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
# Wait for checks to complete (timeout 10 minutes)
|
|
110
|
+
gh pr checks <PR_NUMBER> --watch --interval 30 --fail-fast
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
- If the checks **pass**: inform the user that the PR is ready for review.
|
|
114
|
+
- If the checks **fail**:
|
|
115
|
+
1. Fetch the failed check logs:
|
|
116
|
+
```bash
|
|
117
|
+
gh run list --branch fix/aikido-<short-description> --limit 5
|
|
118
|
+
gh run view <RUN_ID> --log-failed
|
|
119
|
+
```
|
|
120
|
+
2. Diagnose the failure and attempt to fix it.
|
|
121
|
+
3. Commit the fix, push, and re-monitor the checks.
|
|
122
|
+
4. If after 2 attempts the checks still fail, report the failure details to the user and ask for guidance.
|
|
123
|
+
|
|
124
|
+
### 7. Report back
|
|
125
|
+
Provide a summary to the user:
|
|
126
|
+
- Branch name
|
|
127
|
+
- What was fixed and how
|
|
128
|
+
- PR URL
|
|
129
|
+
- CI pipeline status (passed/failed with details)
|
|
130
|
+
- Any remaining issues that couldn't be auto-fixed
|
|
131
|
+
|
|
132
|
+
## Constraints
|
|
133
|
+
- DO NOT modify files unrelated to the security fix.
|
|
134
|
+
- DO NOT force push or use `--no-verify`.
|
|
135
|
+
- DO NOT merge the PR — only create it.
|
|
136
|
+
- DO NOT commit secrets, tokens, or credentials.
|
|
137
|
+
- ALWAYS create the branch from `development`, never from `main` or any other branch.
|
|
138
|
+
- ALWAYS verify the fix compiles before committing.
|
|
139
|
+
- If unsure about a fix, explain the options to the user and ask before proceeding.
|
|
140
|
+
|
|
141
|
+
## Output Format
|
|
142
|
+
After completing the workflow, return a structured summary:
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
✅ Branch: fix/aikido-<name>
|
|
146
|
+
✅ Fix: <what was done>
|
|
147
|
+
✅ PR: <URL>
|
|
148
|
+
⚠️ Notes: <any caveats or manual steps needed>
|
|
149
|
+
```
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
name: Deploy job
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches:
|
|
6
|
+
- master
|
|
7
|
+
types: [closed]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
inputs:
|
|
10
|
+
release_type:
|
|
11
|
+
description: 'Version bump to apply'
|
|
12
|
+
type: choice
|
|
13
|
+
required: true
|
|
14
|
+
default: 'release'
|
|
15
|
+
options:
|
|
16
|
+
- release
|
|
17
|
+
- prerelease-dev
|
|
18
|
+
- prerelease-rc
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
build:
|
|
22
|
+
name: Build and Publish Package
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
environment: production
|
|
25
|
+
if: github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true
|
|
26
|
+
|
|
27
|
+
outputs:
|
|
28
|
+
version: ${{ steps.extract_version.outputs.version }}
|
|
29
|
+
deployment-start: ${{ steps.deployment_start.outputs.deployment_start }}
|
|
30
|
+
|
|
31
|
+
steps:
|
|
32
|
+
- name: Log deployment start
|
|
33
|
+
id: deployment_start
|
|
34
|
+
run: |
|
|
35
|
+
echo "deployment_start=$(date +"%Y-%m-%dT%H:%M:%S%:z")" >> "$GITHUB_OUTPUT"
|
|
36
|
+
|
|
37
|
+
- name: Checkout repository
|
|
38
|
+
uses: actions/checkout@v4
|
|
39
|
+
with:
|
|
40
|
+
fetch-depth: 0
|
|
41
|
+
token: ${{ secrets.PRIVATE_TOKEN_GITHUB }}
|
|
42
|
+
|
|
43
|
+
- name: Setup Node.js 20
|
|
44
|
+
uses: actions/setup-node@v4
|
|
45
|
+
with:
|
|
46
|
+
node-version: '20'
|
|
47
|
+
registry-url: 'https://registry.npmjs.org'
|
|
48
|
+
scope: '@vixoniccom'
|
|
49
|
+
|
|
50
|
+
- name: Configure npm authentication
|
|
51
|
+
env:
|
|
52
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
53
|
+
run: |
|
|
54
|
+
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
|
|
55
|
+
echo "@vixoniccom:registry=https://registry.npmjs.org/" >> ~/.npmrc
|
|
56
|
+
echo "registry=https://registry.npmjs.org/" >> ~/.npmrc
|
|
57
|
+
|
|
58
|
+
- name: Cache node modules
|
|
59
|
+
uses: actions/cache@v4
|
|
60
|
+
with:
|
|
61
|
+
path: ~/.npm
|
|
62
|
+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
63
|
+
restore-keys: |
|
|
64
|
+
${{ runner.os }}-node-
|
|
65
|
+
|
|
66
|
+
- name: Install dependencies
|
|
67
|
+
run: npm ci --ignore-scripts
|
|
68
|
+
env:
|
|
69
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
70
|
+
|
|
71
|
+
- name: Bump version
|
|
72
|
+
run: |
|
|
73
|
+
git config user.name "github-actions[bot]"
|
|
74
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
75
|
+
npm run release -- --no-verify
|
|
76
|
+
git push --follow-tags origin main
|
|
77
|
+
env:
|
|
78
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
79
|
+
|
|
80
|
+
- name: Extract changelog for this release
|
|
81
|
+
id: changelog
|
|
82
|
+
run: |
|
|
83
|
+
BODY=$(awk '/^## \[/{if(p) exit; p=1} p' CHANGELOG.md)
|
|
84
|
+
echo "body<<EOF" >> $GITHUB_OUTPUT
|
|
85
|
+
echo "$BODY" >> $GITHUB_OUTPUT
|
|
86
|
+
echo "EOF" >> $GITHUB_OUTPUT
|
|
87
|
+
|
|
88
|
+
- name: Extract version from package.json
|
|
89
|
+
id: extract_version
|
|
90
|
+
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
|
|
91
|
+
|
|
92
|
+
- name: Build package
|
|
93
|
+
run: npm run prepublish
|
|
94
|
+
env:
|
|
95
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
96
|
+
|
|
97
|
+
- name: Verify build.zip exists
|
|
98
|
+
run: |
|
|
99
|
+
if [ ! -f "build.zip" ]; then
|
|
100
|
+
echo "❌ Error: build.zip not found after build process"
|
|
101
|
+
exit 1
|
|
102
|
+
fi
|
|
103
|
+
echo "✅ build.zip found successfully"
|
|
104
|
+
ls -la build.zip
|
|
105
|
+
|
|
106
|
+
- name: Publish to npm
|
|
107
|
+
run: npm publish --access public
|
|
108
|
+
env:
|
|
109
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
110
|
+
|
|
111
|
+
- name: Create GitHub Release
|
|
112
|
+
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2
|
|
113
|
+
with:
|
|
114
|
+
tag_name: v${{ steps.extract_version.outputs.version }}
|
|
115
|
+
name: v${{ steps.extract_version.outputs.version }}
|
|
116
|
+
body: ${{ steps.changelog.outputs.body }}
|
|
117
|
+
files: build.zip
|
|
118
|
+
env:
|
|
119
|
+
GITHUB_TOKEN: ${{ secrets.PRIVATE_TOKEN_GITHUB }}
|
|
120
|
+
|
|
121
|
+
report-ep:
|
|
122
|
+
name: Report EP Metrics
|
|
123
|
+
runs-on: ubuntu-latest
|
|
124
|
+
needs: [build]
|
|
125
|
+
if: always()
|
|
126
|
+
|
|
127
|
+
steps:
|
|
128
|
+
- uses: actions/checkout@v4
|
|
129
|
+
with:
|
|
130
|
+
fetch-depth: 0
|
|
131
|
+
token: ${{ secrets.PRIVATE_TOKEN_GITHUB }}
|
|
132
|
+
|
|
133
|
+
- uses: vismagroup/Jira-SDOP-Reporter@v1 # NOSONAR - internal Visma action
|
|
134
|
+
with:
|
|
135
|
+
token: ${{ github.token }}
|
|
136
|
+
deployment-start: ${{ needs.build.outputs.deployment-start }}
|
|
137
|
+
deployment-status: ${{ needs.build.result == 'success' && 'success' || 'failure' }}
|
|
138
|
+
jira-token: ${{ secrets.JIRA_TOKEN }}
|
|
139
|
+
jira-issue-summary: "store-modules release v${{ needs.build.outputs.version }}"
|
|
140
|
+
jira-issue-project: "SDOP"
|
|
141
|
+
jira-issue-components: |
|
|
142
|
+
${{ secrets.EP_JIRA_COMPONENT }}
|
|
143
|
+
jira-issue-build-info: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
|
@@ -17,13 +17,13 @@ jobs:
|
|
|
17
17
|
fetch-depth: 0
|
|
18
18
|
|
|
19
19
|
- name: SonarQube Scan
|
|
20
|
-
uses: sonarsource/sonarqube-scan-action@master
|
|
20
|
+
uses: sonarsource/sonarqube-scan-action@f099b441665cb71b0414100cfaf6d835492cee5f # master
|
|
21
21
|
env:
|
|
22
22
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
23
23
|
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
|
|
24
24
|
|
|
25
25
|
- name: SonarQube Quality Gate Check
|
|
26
|
-
uses: sonarsource/sonarqube-quality-gate-action@master
|
|
26
|
+
uses: sonarsource/sonarqube-quality-gate-action@cb3ed20f9fec62b4c3b8ad9e77656c6adaade913 # master
|
|
27
27
|
timeout-minutes: 5
|
|
28
28
|
env:
|
|
29
29
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,211 @@
|
|
|
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
|
-
## [2.25.0-dev.
|
|
5
|
+
## [2.25.0-dev.30](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.19...v2.25.0-dev.30) (2026-08-06)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add HoroscopeService to ServiceType union ([#36](https://github.com/Vixonic/store-modules/issues/36)) ([db749ac](https://github.com/Vixonic/store-modules/commit/db749ac721023c1669e64d7d8bdd3e3cef83bae5))
|
|
11
|
+
* add LocalCompanyDirectoryService to ServiceType union ([#37](https://github.com/Vixonic/store-modules/issues/37)) ([f5628f9](https://github.com/Vixonic/store-modules/commit/f5628f977495aee3caac0eaadc23a93060871675))
|
|
12
|
+
* **inputs:** add EphemerisService to ServiceType union ([#38](https://github.com/Vixonic/store-modules/issues/38)) ([54c1492](https://github.com/Vixonic/store-modules/commit/54c1492baf7ec1fae02360719037c125207369ae))
|
|
13
|
+
* **inputs:** add FootballService to ServiceType union ([#32](https://github.com/Vixonic/store-modules/issues/32)) ([04a7320](https://github.com/Vixonic/store-modules/commit/04a732039c5ac106281aeb1d35fb84373ab740e5))
|
|
14
|
+
* **inputs:** add GoogleCalendarService and OutlookCalendarService to ServiceType union ([#34](https://github.com/Vixonic/store-modules/issues/34)) ([3ef0c03](https://github.com/Vixonic/store-modules/commit/3ef0c039781bc4a1dd4968cef0ef3011338fe8db))
|
|
15
|
+
* **inputs:** add PowerBIService to ServiceType union ([#35](https://github.com/Vixonic/store-modules/issues/35)) ([df287cf](https://github.com/Vixonic/store-modules/commit/df287cf0ca5a6df49494c18c691349e4f5ab270e))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* durationFormula ([#31](https://github.com/Vixonic/store-modules/issues/31)) ([2ae0d30](https://github.com/Vixonic/store-modules/commit/2ae0d306dcc8d910390d8b7405c62826a1fe2df6))
|
|
21
|
+
|
|
22
|
+
## [2.25.0-dev.29](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.19...v2.25.0-dev.29) (2026-08-06)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* add HoroscopeService to ServiceType union ([#36](https://github.com/Vixonic/store-modules/issues/36)) ([db749ac](https://github.com/Vixonic/store-modules/commit/db749ac721023c1669e64d7d8bdd3e3cef83bae5))
|
|
28
|
+
* **inputs:** add EphemerisService to ServiceType union ([#38](https://github.com/Vixonic/store-modules/issues/38)) ([54c1492](https://github.com/Vixonic/store-modules/commit/54c1492baf7ec1fae02360719037c125207369ae))
|
|
29
|
+
* **inputs:** add FootballService to ServiceType union ([#32](https://github.com/Vixonic/store-modules/issues/32)) ([04a7320](https://github.com/Vixonic/store-modules/commit/04a732039c5ac106281aeb1d35fb84373ab740e5))
|
|
30
|
+
* **inputs:** add GoogleCalendarService and OutlookCalendarService to ServiceType union ([#34](https://github.com/Vixonic/store-modules/issues/34)) ([3ef0c03](https://github.com/Vixonic/store-modules/commit/3ef0c039781bc4a1dd4968cef0ef3011338fe8db))
|
|
31
|
+
* **inputs:** add LocalCompanyDirectoryService to ServiceType union ([3c2369a](https://github.com/Vixonic/store-modules/commit/3c2369a67045c4a264c95ceffd115e702e4ba51c))
|
|
32
|
+
* **inputs:** add PowerBIService to ServiceType union ([#35](https://github.com/Vixonic/store-modules/issues/35)) ([df287cf](https://github.com/Vixonic/store-modules/commit/df287cf0ca5a6df49494c18c691349e4f5ab270e))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Bug Fixes
|
|
36
|
+
|
|
37
|
+
* durationFormula ([#31](https://github.com/Vixonic/store-modules/issues/31)) ([2ae0d30](https://github.com/Vixonic/store-modules/commit/2ae0d306dcc8d910390d8b7405c62826a1fe2df6))
|
|
38
|
+
|
|
39
|
+
## [2.25.0-dev.28](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.19...v2.25.0-dev.28) (2026-08-04)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Features
|
|
43
|
+
|
|
44
|
+
* add HoroscopeService to ServiceType union ([#36](https://github.com/Vixonic/store-modules/issues/36)) ([db749ac](https://github.com/Vixonic/store-modules/commit/db749ac721023c1669e64d7d8bdd3e3cef83bae5))
|
|
45
|
+
* **inputs:** add FootballService to ServiceType union ([#32](https://github.com/Vixonic/store-modules/issues/32)) ([04a7320](https://github.com/Vixonic/store-modules/commit/04a732039c5ac106281aeb1d35fb84373ab740e5))
|
|
46
|
+
* **inputs:** add GoogleCalendarService and OutlookCalendarService to ServiceType union ([#34](https://github.com/Vixonic/store-modules/issues/34)) ([3ef0c03](https://github.com/Vixonic/store-modules/commit/3ef0c039781bc4a1dd4968cef0ef3011338fe8db))
|
|
47
|
+
* **inputs:** add PowerBIService to ServiceType union ([#35](https://github.com/Vixonic/store-modules/issues/35)) ([df287cf](https://github.com/Vixonic/store-modules/commit/df287cf0ca5a6df49494c18c691349e4f5ab270e))
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### Bug Fixes
|
|
51
|
+
|
|
52
|
+
* durationFormula ([#31](https://github.com/Vixonic/store-modules/issues/31)) ([2ae0d30](https://github.com/Vixonic/store-modules/commit/2ae0d306dcc8d910390d8b7405c62826a1fe2df6))
|
|
53
|
+
|
|
54
|
+
## [2.25.0-dev.27](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.19...v2.25.0-dev.27) (2026-08-04)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### Features
|
|
58
|
+
|
|
59
|
+
* add HoroscopeService to ServiceType union ([#36](https://github.com/Vixonic/store-modules/issues/36)) ([db749ac](https://github.com/Vixonic/store-modules/commit/db749ac721023c1669e64d7d8bdd3e3cef83bae5))
|
|
60
|
+
* **inputs:** add FootballService to ServiceType union ([#32](https://github.com/Vixonic/store-modules/issues/32)) ([04a7320](https://github.com/Vixonic/store-modules/commit/04a732039c5ac106281aeb1d35fb84373ab740e5))
|
|
61
|
+
* **inputs:** add GoogleCalendarService and OutlookCalendarService to ServiceType union ([#34](https://github.com/Vixonic/store-modules/issues/34)) ([3ef0c03](https://github.com/Vixonic/store-modules/commit/3ef0c039781bc4a1dd4968cef0ef3011338fe8db))
|
|
62
|
+
* **inputs:** add PowerBIService to ServiceType union ([#35](https://github.com/Vixonic/store-modules/issues/35)) ([df287cf](https://github.com/Vixonic/store-modules/commit/df287cf0ca5a6df49494c18c691349e4f5ab270e))
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### Bug Fixes
|
|
66
|
+
|
|
67
|
+
* durationFormula ([#31](https://github.com/Vixonic/store-modules/issues/31)) ([2ae0d30](https://github.com/Vixonic/store-modules/commit/2ae0d306dcc8d910390d8b7405c62826a1fe2df6))
|
|
68
|
+
|
|
69
|
+
## [2.25.0-dev.26](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.19...v2.25.0-dev.26) (2026-07-27)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
### Features
|
|
73
|
+
|
|
74
|
+
* **inputs:** add EphemerisService to ServiceType union ([4643cde](https://github.com/Vixonic/store-modules/commit/4643cde06f1b183854754f40bd52f204a852d907))
|
|
75
|
+
* **inputs:** add FootballService to ServiceType union ([#32](https://github.com/Vixonic/store-modules/issues/32)) ([04a7320](https://github.com/Vixonic/store-modules/commit/04a732039c5ac106281aeb1d35fb84373ab740e5))
|
|
76
|
+
* **inputs:** add GoogleCalendarService and OutlookCalendarService to ServiceType union ([#34](https://github.com/Vixonic/store-modules/issues/34)) ([3ef0c03](https://github.com/Vixonic/store-modules/commit/3ef0c039781bc4a1dd4968cef0ef3011338fe8db))
|
|
77
|
+
* **inputs:** add PowerBIService to ServiceType union ([#35](https://github.com/Vixonic/store-modules/issues/35)) ([df287cf](https://github.com/Vixonic/store-modules/commit/df287cf0ca5a6df49494c18c691349e4f5ab270e))
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
### Bug Fixes
|
|
81
|
+
|
|
82
|
+
* durationFormula ([#31](https://github.com/Vixonic/store-modules/issues/31)) ([2ae0d30](https://github.com/Vixonic/store-modules/commit/2ae0d306dcc8d910390d8b7405c62826a1fe2df6))
|
|
83
|
+
|
|
84
|
+
## [2.25.0-dev.26](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.19...v2.25.0-dev.26) (2026-07-30)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
### Features
|
|
88
|
+
|
|
89
|
+
* **inputs:** add FootballService to ServiceType union ([#32](https://github.com/Vixonic/store-modules/issues/32)) ([04a7320](https://github.com/Vixonic/store-modules/commit/04a732039c5ac106281aeb1d35fb84373ab740e5))
|
|
90
|
+
* **inputs:** add GoogleCalendarService and OutlookCalendarService to ServiceType union ([#34](https://github.com/Vixonic/store-modules/issues/34)) ([3ef0c03](https://github.com/Vixonic/store-modules/commit/3ef0c039781bc4a1dd4968cef0ef3011338fe8db))
|
|
91
|
+
* **inputs:** add PowerBIService to ServiceType union ([#35](https://github.com/Vixonic/store-modules/issues/35)) ([df287cf](https://github.com/Vixonic/store-modules/commit/df287cf0ca5a6df49494c18c691349e4f5ab270e))
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
### Bug Fixes
|
|
95
|
+
|
|
96
|
+
* durationFormula ([#31](https://github.com/Vixonic/store-modules/issues/31)) ([2ae0d30](https://github.com/Vixonic/store-modules/commit/2ae0d306dcc8d910390d8b7405c62826a1fe2df6))
|
|
97
|
+
|
|
98
|
+
## [2.25.0-dev.25](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.19...v2.25.0-dev.25) (2026-07-20)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
### Features
|
|
102
|
+
|
|
103
|
+
* **inputs:** add FootballService to ServiceType union ([#32](https://github.com/Vixonic/store-modules/issues/32)) ([04a7320](https://github.com/Vixonic/store-modules/commit/04a732039c5ac106281aeb1d35fb84373ab740e5))
|
|
104
|
+
* **inputs:** add GoogleCalendarService and OutlookCalendarService to ServiceType union ([#34](https://github.com/Vixonic/store-modules/issues/34)) ([3ef0c03](https://github.com/Vixonic/store-modules/commit/3ef0c039781bc4a1dd4968cef0ef3011338fe8db))
|
|
105
|
+
* **inputs:** add PowerBIService to ServiceType union ([89e802b](https://github.com/Vixonic/store-modules/commit/89e802bde7ebcbe6a60e935ed0df6f102d5f7753))
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
### Bug Fixes
|
|
109
|
+
|
|
110
|
+
* durationFormula ([#31](https://github.com/Vixonic/store-modules/issues/31)) ([2ae0d30](https://github.com/Vixonic/store-modules/commit/2ae0d306dcc8d910390d8b7405c62826a1fe2df6))
|
|
111
|
+
|
|
112
|
+
## [2.25.0-dev.24](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.19...v2.25.0-dev.24) (2026-07-01)
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
### Features
|
|
116
|
+
|
|
117
|
+
* **inputs:** add FootballService to ServiceType union ([#32](https://github.com/Vixonic/store-modules/issues/32)) ([04a7320](https://github.com/Vixonic/store-modules/commit/04a732039c5ac106281aeb1d35fb84373ab740e5))
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
### Bug Fixes
|
|
121
|
+
|
|
122
|
+
* durationFormula ([#31](https://github.com/Vixonic/store-modules/issues/31)) ([2ae0d30](https://github.com/Vixonic/store-modules/commit/2ae0d306dcc8d910390d8b7405c62826a1fe2df6))
|
|
123
|
+
|
|
124
|
+
## [2.25.0-dev.23](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.22...v2.25.0-dev.23) (2026-06-23)
|
|
125
|
+
|
|
126
|
+
## [2.25.0-dev.22](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.19...v2.25.0-dev.22) (2026-06-23)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
### Features
|
|
130
|
+
|
|
131
|
+
* **inputs:** add FootballService to ServiceType union ([#32](https://github.com/Vixonic/store-modules/issues/32)) ([04a7320](https://github.com/Vixonic/store-modules/commit/04a732039c5ac106281aeb1d35fb84373ab740e5))
|
|
132
|
+
* **inputs:** add MenuAppService to ServiceType union ([ffe284b](https://github.com/Vixonic/store-modules/commit/ffe284b457885a0bcb483cbb435aefe3dc7b4aab))
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
### Bug Fixes
|
|
136
|
+
|
|
137
|
+
* durationFormula ([#31](https://github.com/Vixonic/store-modules/issues/31)) ([2ae0d30](https://github.com/Vixonic/store-modules/commit/2ae0d306dcc8d910390d8b7405c62826a1fe2df6))
|
|
138
|
+
|
|
139
|
+
## [2.25.0-dev.20](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.19...v2.25.0-dev.20) (2026-05-20)
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
### Bug Fixes
|
|
143
|
+
|
|
144
|
+
* durationFormula ([4e677f9](https://github.com/Vixonic/store-modules/commit/4e677f9e81ee4d23cc5e09ba42b373c340b15a57))
|
|
145
|
+
|
|
146
|
+
## [2.25.0-dev.19](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.3...v2.25.0-dev.19) (2026-05-20)
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
### Features
|
|
150
|
+
|
|
151
|
+
* VXD-898 add new service ([d6bd32b](https://github.com/Vixonic/store-modules/commit/d6bd32b7b326bc02f5248778d1d97063d9e4c2c8))
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
### Bug Fixes
|
|
156
|
+
|
|
157
|
+
* Corrección contador de caracteres y lógica de validación campos requeridos. ([#30](https://github.com/Vixonic/store-modules/issues/30)) ([34df45d](https://github.com/Vixonic/store-modules/commit/34df45d9b1b00ab963c65d5c35ee55de45337d47))
|
|
158
|
+
|
|
159
|
+
## [2.25.0-dev.18](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.17...v2.25.0-dev.18) (2026-05-11)
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
### Bug Fixes
|
|
163
|
+
|
|
164
|
+
* improve input validation to handle visibility and whitespace in text inputs ([f9f2e26](https://github.com/Vixonic/store-modules/commit/f9f2e26ae23858ebc0fe7ba0c2d50c496396a683))
|
|
165
|
+
|
|
166
|
+
## [2.25.0-dev.17](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.16...v2.25.0-dev.17) (2026-05-11)
|
|
167
|
+
|
|
168
|
+
## [2.25.0-dev.16](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.15...v2.25.0-dev.16) (2026-05-08)
|
|
169
|
+
|
|
170
|
+
## [2.25.0-dev.15](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.3...v2.25.0-dev.15) (2026-05-08)
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
### Features
|
|
174
|
+
|
|
175
|
+
* VXD-898 add new service ([d6bd32b](https://github.com/Vixonic/store-modules/commit/d6bd32b7b326bc02f5248778d1d97063d9e4c2c8))
|
|
176
|
+
|
|
177
|
+
## [2.25.0-dev.14](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.3...v2.25.0-dev.14) (2026-05-08)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
### Features
|
|
181
|
+
|
|
182
|
+
* VXD-898 add new service ([d6bd32b](https://github.com/Vixonic/store-modules/commit/d6bd32b7b326bc02f5248778d1d97063d9e4c2c8))
|
|
183
|
+
|
|
184
|
+
## [2.25.0-dev.13](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.3...v2.25.0-dev.13) (2026-05-08)
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
### Features
|
|
188
|
+
|
|
189
|
+
* VXD-898 add new service ([d6bd32b](https://github.com/Vixonic/store-modules/commit/d6bd32b7b326bc02f5248778d1d97063d9e4c2c8))
|
|
190
|
+
|
|
191
|
+
## [2.25.0-dev.12](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.3...v2.25.0-dev.12) (2026-05-08)
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
### Features
|
|
195
|
+
|
|
196
|
+
* VXD-898 add new service ([d6bd32b](https://github.com/Vixonic/store-modules/commit/d6bd32b7b326bc02f5248778d1d97063d9e4c2c8))
|
|
197
|
+
|
|
198
|
+
## [2.25.0-dev.11](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.3...v2.25.0-dev.11) (2026-05-08)
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
### Features
|
|
202
|
+
|
|
203
|
+
* VXD-898 add new service ([d6bd32b](https://github.com/Vixonic/store-modules/commit/d6bd32b7b326bc02f5248778d1d97063d9e4c2c8))
|
|
204
|
+
|
|
205
|
+
## [2.25.0-dev.10](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.2...v2.25.0-dev.10) (2026-04-01)
|
|
206
|
+
|
|
207
|
+
## [2.25.0-dev.9](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.2...v2.25.0-dev.9) (2026-04-01)
|
|
208
|
+
|
|
209
|
+
## [2.25.0-dev.3](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.2...v2.25.0-dev.3) (2026-04-01)
|
|
6
210
|
|
|
7
211
|
## [2.25.0-dev.2](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.1...v2.25.0-dev.2) (2026-03-03)
|
|
8
212
|
|
|
@@ -160,9 +364,8 @@ All notable changes to this project will be documented in this file. See [standa
|
|
|
160
364
|
### Bug Fixes
|
|
161
365
|
|
|
162
366
|
* new script for dev version prerelease ([e4b0452](https://github.com/Vixonic/store-modules/commit/e4b0452a8ff5e29faf9b39066c4cec0388e523c7))
|
|
163
|
-
|
|
367
|
+
|
|
164
368
|
### [2.20.1-dev.0](https://github.com/Vixonic/store-modules/compare/v2.20.0...v2.20.1-dev.0) (2025-05-28)
|
|
165
|
-
>>>>>>> d82d9db (chore(release): 2.20.1-dev.0)
|
|
166
369
|
|
|
167
370
|
## [2.20.0](https://bitbucket.org/vixonic_dev/modules/compare/v2.20.0-dev.2...v2.20.0) (2025-02-17)
|
|
168
371
|
|
|
@@ -86,7 +86,16 @@ var List = /** @class */ (function (_super) {
|
|
|
86
86
|
var itemErrors_1 = {};
|
|
87
87
|
this.itemSchema.forEach(function (input) {
|
|
88
88
|
if ((0, inputs_1.isInput)(input)) {
|
|
89
|
-
|
|
89
|
+
var castedInput = input;
|
|
90
|
+
var isVisible = castedInput.shouldShow(ctx);
|
|
91
|
+
if (isVisible) {
|
|
92
|
+
// Visible input always wins: store its errors (may overwrite a hidden one)
|
|
93
|
+
itemErrors_1[input.id] = castedInput.validate(value[input.id], ctx);
|
|
94
|
+
}
|
|
95
|
+
else if (!(input.id in itemErrors_1)) {
|
|
96
|
+
// Hidden input only initialises the key if no other input claimed it yet
|
|
97
|
+
itemErrors_1[input.id] = [];
|
|
98
|
+
}
|
|
90
99
|
}
|
|
91
100
|
});
|
|
92
101
|
return itemErrors_1;
|
package/dist/lib/index.js
CHANGED
|
@@ -37,8 +37,16 @@ var Configuration = /** @class */ (function () {
|
|
|
37
37
|
// Validate each input in a group.
|
|
38
38
|
container.items.forEach(function (input) {
|
|
39
39
|
if ((0, inputs_1.isInput)(input)) {
|
|
40
|
-
var
|
|
41
|
-
|
|
40
|
+
var castedInput = input;
|
|
41
|
+
var isVisible = castedInput.shouldShow(state);
|
|
42
|
+
if (isVisible) {
|
|
43
|
+
// Visible input always wins: store its errors (may overwrite a hidden one)
|
|
44
|
+
groupErrors_1[input.id] = castedInput.validate(state[input.id], state);
|
|
45
|
+
}
|
|
46
|
+
else if (!(input.id in groupErrors_1)) {
|
|
47
|
+
// Hidden input only initialises the key if no other input claimed it yet
|
|
48
|
+
groupErrors_1[input.id] = [];
|
|
49
|
+
}
|
|
42
50
|
}
|
|
43
51
|
});
|
|
44
52
|
errors[container.id] = groupErrors_1;
|
|
@@ -79,9 +87,15 @@ var Configuration = /** @class */ (function () {
|
|
|
79
87
|
var jsEval = this.durationFormula;
|
|
80
88
|
try {
|
|
81
89
|
var regexp = new RegExp('{{(.*?)}}', 'ig');
|
|
82
|
-
jsEval = jsEval.replace(regexp,
|
|
83
|
-
|
|
84
|
-
|
|
90
|
+
jsEval = jsEval.replace(regexp, function (_match, field) {
|
|
91
|
+
var val = _values[field.trim()];
|
|
92
|
+
if (typeof val === 'number' && Number.isFinite(val))
|
|
93
|
+
return String(val);
|
|
94
|
+
if (val !== null && val !== undefined)
|
|
95
|
+
return JSON.stringify(val);
|
|
96
|
+
return 'undefined';
|
|
97
|
+
});
|
|
98
|
+
var time = new Function('_values', "return (".concat(jsEval, ");"))(_values); // NOSONAR
|
|
85
99
|
if (typeof time === 'number') {
|
|
86
100
|
// validate number
|
|
87
101
|
if (isNaN(time) || time < 4 || time >= 86400) {
|
|
@@ -5,6 +5,7 @@ export interface ISelectAssetKna extends IInput {
|
|
|
5
5
|
required?: boolean;
|
|
6
6
|
extensions?: string[];
|
|
7
7
|
multiple?: boolean;
|
|
8
|
+
imageSize?: number;
|
|
8
9
|
}
|
|
9
10
|
export declare namespace SelectAssetKna {
|
|
10
11
|
type Error = ValueError.Required | {
|
|
@@ -26,6 +27,7 @@ export declare class SelectAssetKna extends Input<SelectAssetKna.Value, SelectAs
|
|
|
26
27
|
readonly required?: boolean;
|
|
27
28
|
readonly extensions?: string[];
|
|
28
29
|
readonly multiple: boolean;
|
|
30
|
+
readonly imageSize?: number;
|
|
29
31
|
constructor(options: ISelectAssetKna);
|
|
30
32
|
validateInput(value: SelectAssetKna.Value): SelectAssetKna.Error[];
|
|
31
33
|
isValidValue(v: any): v is SelectAssetKna.Value;
|
|
@@ -30,6 +30,7 @@ var SelectAssetKna = /** @class */ (function (_super) {
|
|
|
30
30
|
_this.required = options.required;
|
|
31
31
|
_this.extensions = options.extensions;
|
|
32
32
|
_this.multiple = options.multiple === true;
|
|
33
|
+
_this.imageSize = options.imageSize;
|
|
33
34
|
return _this;
|
|
34
35
|
}
|
|
35
36
|
SelectAssetKna.prototype.validateInput = function (value) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Input, IInput } from '../base';
|
|
2
2
|
import { ValueError } from '../errors';
|
|
3
|
-
export type ServiceType = 'RSSService' | 'InstagramMediaService' | 'LinkedInCompanyMediaService' | 'FacebookPageService' | 'WeatherService' | 'VixonicStoriesService' | 'TwitterService' | 'TimezoneService' | 'NewTimezoneService' | 'ColabraService' | 'RexmasBirthdayService' | 'RexmasAnniversarieService' | 'RexmasNewEmployeesService' | 'TikTokService' | 'BukBirthdayService' | 'BukAnniversariesService' | 'BukNewEmployeesService' | 'AgendaAppService' | 'AnniversaryAppService' | 'BirthdayAppService' | 'NewEmployeesAppService' | 'CurrencyAppService' | 'SheetsReaderService' | 'TalanaAnniversariesService' | 'TalanaBirthdayService' | 'TalanaNewEmployeesService' | 'YoutubeService' | '
|
|
3
|
+
export type ServiceType = 'RSSService' | 'InstagramMediaService' | 'LinkedInCompanyMediaService' | 'FacebookPageService' | 'WeatherService' | 'VixonicStoriesService' | 'TwitterService' | 'TimezoneService' | 'NewTimezoneService' | 'ColabraService' | 'RexmasBirthdayService' | 'RexmasAnniversarieService' | 'RexmasNewEmployeesService' | 'TikTokService' | 'BukBirthdayService' | 'BukAnniversariesService' | 'BukNewEmployeesService' | 'AgendaAppService' | 'AnniversaryAppService' | 'BirthdayAppService' | 'NewEmployeesAppService' | 'CurrencyAppService' | 'SheetsReaderService' | 'TalanaAnniversariesService' | 'TalanaBirthdayService' | 'TalanaNewEmployeesService' | 'YoutubeService' | 'LocalAppSheetsService' | 'MetalAppService' | 'FootballService' | 'MenuAppService' | 'GoogleCalendarService' | 'OutlookCalendarService' | 'PowerBIService' | 'HoroscopeService' | 'EphemerisService' | 'LocalCompanyDirectoryService';
|
|
4
4
|
export interface IServiceInput extends IInput {
|
|
5
5
|
serviceType: ServiceType;
|
|
6
6
|
required?: boolean;
|
|
@@ -49,11 +49,11 @@ var TextArea = /** @class */ (function (_super) {
|
|
|
49
49
|
}
|
|
50
50
|
if (this.range) {
|
|
51
51
|
if (this.html) {
|
|
52
|
-
var auxValue = (value === null || value === void 0 ? void 0 : value.replace(/<[^>]
|
|
53
|
-
length =
|
|
52
|
+
var auxValue = ((value === null || value === void 0 ? void 0 : value.replace(/<[^>]{0,10000}>/g, '')) || '').replace(/ /g, '');
|
|
53
|
+
length = auxValue.length;
|
|
54
54
|
}
|
|
55
55
|
else {
|
|
56
|
-
length =
|
|
56
|
+
length = value ? value.replace(/ /g, '').length : 0;
|
|
57
57
|
}
|
|
58
58
|
errors = errors.concat(validation_1.Validator.min(length, this.range.min));
|
|
59
59
|
errors = errors.concat(validation_1.Validator.max(length, this.range.max));
|
|
@@ -52,7 +52,7 @@ var TextInput = /** @class */ (function (_super) {
|
|
|
52
52
|
errors = errors.concat({ type: 'pattern' });
|
|
53
53
|
}
|
|
54
54
|
if (this.range) {
|
|
55
|
-
var length = value
|
|
55
|
+
var length = value ? value.replace(/ /g, '').length : 0;
|
|
56
56
|
errors = errors.concat(validation_1.Validator.min(length, this.range.min));
|
|
57
57
|
errors = errors.concat(validation_1.Validator.max(length, this.range.max));
|
|
58
58
|
}
|
package/dist/lib/visibility.js
CHANGED
|
@@ -7,9 +7,24 @@ function shouldBeVisible(item, _values) {
|
|
|
7
7
|
var jsEval = item.show;
|
|
8
8
|
try {
|
|
9
9
|
var regexp = new RegExp('{{(.*?)}}', 'ig');
|
|
10
|
-
jsEval = jsEval.replace(regexp,
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
jsEval = jsEval.replace(regexp, function (_match, field) {
|
|
11
|
+
var val = _values[field.trim()];
|
|
12
|
+
if (val === null || val === undefined)
|
|
13
|
+
return 'null';
|
|
14
|
+
if (typeof val === 'number' || typeof val === 'boolean')
|
|
15
|
+
return String(val);
|
|
16
|
+
if (typeof val === 'string')
|
|
17
|
+
return JSON.stringify(val);
|
|
18
|
+
return JSON.stringify(val);
|
|
19
|
+
});
|
|
20
|
+
// Only allow safe characters: digits, strings (quotes), comparison/logical/arithmetic operators,
|
|
21
|
+
// spaces, parentheses, brackets, dots, commas and alphanumeric identifiers (true/false/null).
|
|
22
|
+
if (!/^[\w\s"'!<>=&|+\-*/%().,[\]?:]+$/.test(jsEval)) {
|
|
23
|
+
console.warn('Unable to parse expression (unsafe characters):', jsEval);
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
// Input is validated above against a strict character allowlist before reaching this call. // NOSONAR
|
|
27
|
+
var show = new Function("return (".concat(jsEval, ");"))(); // NOSONAR
|
|
13
28
|
return !!show;
|
|
14
29
|
}
|
|
15
30
|
catch (e) {
|
package/package.json
CHANGED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
name: Publish to NPM
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- master
|
|
7
|
-
- main
|
|
8
|
-
pull_request:
|
|
9
|
-
branches:
|
|
10
|
-
- master
|
|
11
|
-
- main
|
|
12
|
-
types: [closed]
|
|
13
|
-
|
|
14
|
-
jobs:
|
|
15
|
-
publish:
|
|
16
|
-
# Solo ejecutar si es un push a main/master o un merge a main/master
|
|
17
|
-
if: github.event_name == 'push' || (github.event.pull_request.merged == true && (github.event.pull_request.base.ref == 'master' || github.event.pull_request.base.ref == 'main'))
|
|
18
|
-
runs-on: ubuntu-latest
|
|
19
|
-
|
|
20
|
-
steps:
|
|
21
|
-
- name: Checkout code
|
|
22
|
-
uses: actions/checkout@v4
|
|
23
|
-
with:
|
|
24
|
-
fetch-depth: 0
|
|
25
|
-
|
|
26
|
-
- name: Setup Node.js 20
|
|
27
|
-
uses: actions/setup-node@v4
|
|
28
|
-
with:
|
|
29
|
-
node-version: '20'
|
|
30
|
-
registry-url: 'https://registry.npmjs.org'
|
|
31
|
-
scope: '@vixoniccom'
|
|
32
|
-
|
|
33
|
-
- name: Configure npm authentication
|
|
34
|
-
run: |
|
|
35
|
-
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
|
|
36
|
-
echo "@vixoniccom:registry=https://registry.npmjs.org/" >> ~/.npmrc
|
|
37
|
-
echo "registry=https://registry.npmjs.org/" >> ~/.npmrc
|
|
38
|
-
|
|
39
|
-
- name: Cache node modules
|
|
40
|
-
uses: actions/cache@v3
|
|
41
|
-
with:
|
|
42
|
-
path: ~/.npm
|
|
43
|
-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
44
|
-
restore-keys: |
|
|
45
|
-
${{ runner.os }}-node-
|
|
46
|
-
|
|
47
|
-
- name: Install dependencies
|
|
48
|
-
run: npm ci
|
|
49
|
-
env:
|
|
50
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
51
|
-
|
|
52
|
-
- name: Build package
|
|
53
|
-
run: npm run prepublish
|
|
54
|
-
|
|
55
|
-
- name: Check if version already exists on npm
|
|
56
|
-
id: check-version
|
|
57
|
-
run: |
|
|
58
|
-
PACKAGE_NAME=$(node -p "require('./package.json').name")
|
|
59
|
-
PACKAGE_VERSION=$(node -p "require('./package.json').version")
|
|
60
|
-
|
|
61
|
-
echo "Checking if $PACKAGE_NAME@$PACKAGE_VERSION exists on npm..."
|
|
62
|
-
|
|
63
|
-
if npm view "$PACKAGE_NAME@$PACKAGE_VERSION" version 2>/dev/null; then
|
|
64
|
-
echo "version-exists=true" >> $GITHUB_OUTPUT
|
|
65
|
-
echo "⚠️ Version $PACKAGE_VERSION already exists on npm"
|
|
66
|
-
else
|
|
67
|
-
echo "version-exists=false" >> $GITHUB_OUTPUT
|
|
68
|
-
echo "✅ Version $PACKAGE_VERSION does not exist on npm - ready to publish"
|
|
69
|
-
fi
|
|
70
|
-
|
|
71
|
-
- name: Publish to npm
|
|
72
|
-
if: steps.check-version.outputs.version-exists == 'false'
|
|
73
|
-
run: |
|
|
74
|
-
echo "Publishing to npm..."
|
|
75
|
-
npm publish --access public
|
|
76
|
-
env:
|
|
77
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
78
|
-
|
|
79
|
-
- name: Publication success
|
|
80
|
-
if: steps.check-version.outputs.version-exists == 'false'
|
|
81
|
-
run: |
|
|
82
|
-
PACKAGE_NAME=$(node -p "require('./package.json').name")
|
|
83
|
-
PACKAGE_VERSION=$(node -p "require('./package.json').version")
|
|
84
|
-
echo "🎉 Successfully published $PACKAGE_NAME@$PACKAGE_VERSION to npm!"
|
|
85
|
-
|
|
86
|
-
- name: Skip publication
|
|
87
|
-
if: steps.check-version.outputs.version-exists == 'true'
|
|
88
|
-
run: |
|
|
89
|
-
PACKAGE_VERSION=$(node -p "require('./package.json').version")
|
|
90
|
-
echo "⏭️ Skipping publication - version $PACKAGE_VERSION already exists on npm"
|
|
91
|
-
echo "💡 To publish a new version, update the version in package.json or run 'npm run release'"
|