Compare commits
59 Commits
dbeb003292
...
v6.2.5
Author | SHA1 | Date | |
---|---|---|---|
d7da2d7890 | |||
76f0fd4232 | |||
008b45ad17 | |||
4d49263816 | |||
6a2482e5c6 | |||
b5c3fb2af4 | |||
fa2c8eb839 | |||
f3e82b4ee2 | |||
ba67248155 | |||
a6d962bfaa | |||
95cddb52d4 | |||
5a5118d775 | |||
1b1cdd7a4b | |||
a9ddf7f7dd | |||
b54b3f1778 | |||
349a63c591 | |||
293d33912f | |||
357b9849e7 | |||
0c8a9eef32 | |||
112b1d0da4 | |||
a05007416a | |||
9f7dd55583 | |||
11b06f6416 | |||
adb7eb7755 | |||
b776b80728 | |||
73a149ea7b | |||
ef8784093b | |||
b30c788e3d | |||
23899bdff3 | |||
8bd0dd22c2 | |||
c55b00c74f | |||
c895f509b0 | |||
5968915331 | |||
44ffc082f6 | |||
b716ae5675 | |||
01a0b59494 | |||
8ebc3da0bb | |||
133577a4fa | |||
a19615db41 | |||
32b212a6bf | |||
00ec4529cd | |||
102d03888f | |||
9f8247320e | |||
ef871de30e | |||
b3a15ce26b | |||
270695aec2 | |||
ad7392a326 | |||
92a50a42e2 | |||
a3a8856d8c | |||
150c19b1b0 | |||
f04c51ee4e | |||
c4338bf957 | |||
5b06f4ede8 | |||
e7ab2cc956 | |||
5ebf8a66f7 | |||
3d4e886b9b | |||
a00d31caf3 | |||
40fe707287 | |||
8296be01ba |
@ -1,5 +1,5 @@
|
|||||||
name: Build
|
name: Build
|
||||||
run-name: Running Lint Check
|
run-name: Running Lint Check and Licence checker on Pull Request
|
||||||
on: [pull_request]
|
on: [pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -1,223 +0,0 @@
|
|||||||
name: Test
|
|
||||||
run-name: Building and testing development branch
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- development
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
Build-production-and-ng-test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 18
|
|
||||||
|
|
||||||
- name: Write .npmrc file
|
|
||||||
run: |
|
|
||||||
touch client/.npmrc
|
|
||||||
echo '${{ secrets.NPMRC}}' > client/.npmrc
|
|
||||||
|
|
||||||
- name: Install Chrome for Angular tests
|
|
||||||
run: apt-get update
|
|
||||||
run: wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
|
||||||
run: apt install -y ./google-chrome*.deb;
|
|
||||||
run: export CHROME_BIN=/usr/bin/google-chrome
|
|
||||||
|
|
||||||
- name: Write cypress credentials
|
|
||||||
run: echo "$CYPRESS_CREDS" > ./client/cypress.env.json
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
CYPRESS_CREDS: ${{ secrets.CYPRESS_CREDS }}
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Check audit
|
|
||||||
# Audit should fail and stop the CI if critical vulnerability found
|
|
||||||
run: |
|
|
||||||
npm audit --audit-level=critical
|
|
||||||
cd ./sas
|
|
||||||
npm audit --audit-level=critical
|
|
||||||
cd ./client
|
|
||||||
npm audit --audit-level=critical
|
|
||||||
|
|
||||||
- name: Angular Tests
|
|
||||||
run: |
|
|
||||||
npm test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
|
|
||||||
|
|
||||||
- name: Angular Production Build
|
|
||||||
run: |
|
|
||||||
npm run postinstall
|
|
||||||
npm run build
|
|
||||||
|
|
||||||
Build-and-test-development:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 18
|
|
||||||
|
|
||||||
- name: Write .npmrc file
|
|
||||||
run: |
|
|
||||||
touch client/.npmrc
|
|
||||||
echo '${{ secrets.NPMRC}}' > client/.npmrc
|
|
||||||
|
|
||||||
- run: apt-get update
|
|
||||||
- run: wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
|
||||||
- run: apt install -y ./google-chrome*.deb;
|
|
||||||
- run: export CHROME_BIN=/usr/bin/google-chrome
|
|
||||||
- run: apt-get update -y
|
|
||||||
- run: apt-get -y install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb
|
|
||||||
- run: apt -y install jq
|
|
||||||
|
|
||||||
- name: Write cypress credentials
|
|
||||||
run: echo "$CYPRESS_CREDS" > ./client/cypress.env.json
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
CYPRESS_CREDS: ${{ secrets.CYPRESS_CREDS }}
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
# Install pm2 and prepare SASJS server
|
|
||||||
- run: npm i -g pm2
|
|
||||||
- run: curl -L https://github.com/sasjs/server/releases/latest/download/linux.zip > linux.zip
|
|
||||||
- run: unzip linux.zip
|
|
||||||
- run: touch .env
|
|
||||||
- run: echo RUN_TIMES=js >> .env
|
|
||||||
- run: echo NODE_PATH=node >> .env
|
|
||||||
- run: echo CORS=enable >> .env
|
|
||||||
- run: echo WHITELIST=http://localhost:4200 >> .env
|
|
||||||
- run: cat .env
|
|
||||||
- run: pm2 start api-linux --wait-ready
|
|
||||||
|
|
||||||
- name: Deploy mocked services
|
|
||||||
run: |
|
|
||||||
cd ./sas/mocks/sasjs
|
|
||||||
npm install -g @sasjs/cli
|
|
||||||
npm install -g replace-in-files-cli
|
|
||||||
sasjs cbd -t server-ci
|
|
||||||
# sasjs request services/admin/makedata -t server-ci -d ./deploy/makeData4GL.json -c ./deploy/requestConfig.json -o ./output.json
|
|
||||||
|
|
||||||
- name: Install ZIP
|
|
||||||
run: |
|
|
||||||
apt-get update
|
|
||||||
apt-get install zip
|
|
||||||
|
|
||||||
- name: Prepare and run frontend and cypress
|
|
||||||
run: |
|
|
||||||
cd ./client
|
|
||||||
mv ./cypress.env.example.json ./cypress.env.json
|
|
||||||
replace-in-files --regex='"username".*' --replacement='"username":"'${{ secrets.CYPRESS_USERNAME_SASJS }}'",' ./cypress.env.json
|
|
||||||
replace-in-files --regex='"password".*' --replacement='"password":"'${{ secrets.CYPRESS_PWD_SASJS }}'" ' ./cypress.env.json
|
|
||||||
cat ./cypress.env.json
|
|
||||||
npm run postinstall
|
|
||||||
# Prepare index.html to SASJS local
|
|
||||||
replace-in-files --regex='serverUrl=".*?"' --replacement='serverUrl="http://localhost:5000"' ./src/index.html
|
|
||||||
replace-in-files --regex='appLoc=".*?"' --replacement='appLoc="/Public/app/devtest"' ./src/index.html
|
|
||||||
replace-in-files --regex='serverType=".*?"' --replacement='serverType="SASJS"' ./src/index.html
|
|
||||||
replace-in-files --regex='"hosturl".*' --replacement='hosturl:"http://localhost:4200",' ./cypress.config.ts
|
|
||||||
cat ./cypress.config.ts
|
|
||||||
# Start frontend and run cypress
|
|
||||||
npm start & npx wait-on http://localhost:4200 && npx cypress run --browser chrome --spec "cypress/e2e/liveness.cy.ts,cypress/e2e/editor.cy.ts,cypress/e2e/excel.cy.ts,cypress/e2e/filtering.cy.ts,cypress/e2e/licensing.cy.ts"
|
|
||||||
|
|
||||||
- name: Zip Cypress videos
|
|
||||||
if: always()
|
|
||||||
run: |
|
|
||||||
zip -r cypress-videos ./client/cypress/videos
|
|
||||||
|
|
||||||
- name: Cypress videos artifacts
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: cypress-videos.zip
|
|
||||||
path: cypress-videos.zip
|
|
||||||
|
|
||||||
Build-and-test-development-latest-adapter:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 18
|
|
||||||
|
|
||||||
- name: Write .npmrc file
|
|
||||||
run: echo "$NPMRC" > client/.npmrc
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
NPMRC: ${{ secrets.NPMRC}}
|
|
||||||
|
|
||||||
- run: apt-get update
|
|
||||||
- run: wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
|
||||||
- run: apt install -y ./google-chrome*.deb;
|
|
||||||
- run: export CHROME_BIN=/usr/bin/google-chrome
|
|
||||||
- run: apt-get update -y
|
|
||||||
- run: apt-get -y install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb
|
|
||||||
- run: apt -y install jq
|
|
||||||
|
|
||||||
- name: Write cypress credentials
|
|
||||||
run: echo "$CYPRESS_CREDS" > ./client/cypress.env.json
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
CYPRESS_CREDS: ${{ secrets.CYPRESS_CREDS }}
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
# Install pm2 and prepare SASJS server
|
|
||||||
- run: npm i -g pm2
|
|
||||||
- run: curl -L https://github.com/sasjs/server/releases/latest/download/linux.zip > linux.zip
|
|
||||||
- run: unzip linux.zip
|
|
||||||
- run: touch .env
|
|
||||||
- run: echo RUN_TIMES=js >> .env
|
|
||||||
- run: echo NODE_PATH=node >> .env
|
|
||||||
- run: echo CORS=enable >> .env
|
|
||||||
- run: echo WHITELIST=http://localhost:4200 >> .env
|
|
||||||
- run: cat .env
|
|
||||||
- run: pm2 start api-linux --wait-ready
|
|
||||||
|
|
||||||
- name: Deploy mocked services
|
|
||||||
run: |
|
|
||||||
cd ./sas/mocks/sasjs
|
|
||||||
npm install -g @sasjs/cli
|
|
||||||
npm install -g replace-in-files-cli
|
|
||||||
sasjs cbd -t server-ci
|
|
||||||
|
|
||||||
- name: Install ZIP
|
|
||||||
run: |
|
|
||||||
apt-get update
|
|
||||||
apt-get install zip
|
|
||||||
|
|
||||||
- name: Prepare and run frontend and cypress
|
|
||||||
run: |
|
|
||||||
cd ./client
|
|
||||||
mv ./cypress.env.example.json ./cypress.env.json
|
|
||||||
replace-in-files --regex='"username".*' --replacement='"username":"'${{ secrets.CYPRESS_USERNAME_SASJS }}'",' ./cypress.env.json
|
|
||||||
replace-in-files --regex='"password".*' --replacement='"password":"'${{ secrets.CYPRESS_PWD_SASJS }}'" ' ./cypress.env.json
|
|
||||||
cat ./cypress.env.json
|
|
||||||
npm run postinstall
|
|
||||||
npm install @sasjs/adapter@latest
|
|
||||||
# Prepare index.html to SASJS local
|
|
||||||
replace-in-files --regex='serverUrl=".*?"' --replacement='serverUrl="http://localhost:5000"' ./src/index.html
|
|
||||||
replace-in-files --regex='appLoc=".*?"' --replacement='appLoc="/Public/app/devtest"' ./src/index.html
|
|
||||||
replace-in-files --regex='serverType=".*?"' --replacement='serverType="SASJS"' ./src/index.html
|
|
||||||
replace-in-files --regex='"hosturl".*' --replacement='hosturl:"http://localhost:4200",' ./cypress.config.ts
|
|
||||||
cat ./cypress.config.ts
|
|
||||||
# Start frontend and run cypress
|
|
||||||
npm start & npx wait-on http://localhost:4200 && npx cypress run --browser chrome --spec "cypress/e2e/liveness.cy.ts,cypress/e2e/editor.cy.ts,cypress/e2e/excel.cy.ts,cypress/e2e/filtering.cy.ts,cypress/e2e/licensing.cy.ts"
|
|
||||||
|
|
||||||
- name: Zip Cypress videos
|
|
||||||
if: always()
|
|
||||||
run: |
|
|
||||||
zip -r cypress-videos ./client/cypress/videos
|
|
||||||
|
|
||||||
- name: Cypress videos artifacts
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: cypress-videos-latest-adapter.zip
|
|
||||||
path: cypress-videos.zip
|
|
@ -1,13 +1,151 @@
|
|||||||
name: Release
|
name: Release
|
||||||
run-name: Releasing DC
|
run-name: Testing and Releasing DC
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
Build-production-and-ng-test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
|
||||||
|
- name: Write .npmrc file
|
||||||
|
run: |
|
||||||
|
touch client/.npmrc
|
||||||
|
echo '${{ secrets.NPMRC}}' > client/.npmrc
|
||||||
|
|
||||||
|
- name: Install Chrome for Angular tests
|
||||||
|
run: |
|
||||||
|
apt-get update
|
||||||
|
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
||||||
|
apt install -y ./google-chrome*.deb;
|
||||||
|
export CHROME_BIN=/usr/bin/google-chrome
|
||||||
|
|
||||||
|
- name: Write cypress credentials
|
||||||
|
run: echo "$CYPRESS_CREDS" > ./client/cypress.env.json
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
CYPRESS_CREDS: ${{ secrets.CYPRESS_CREDS }}
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Check audit
|
||||||
|
# Audit should fail and stop the CI if critical vulnerability found
|
||||||
|
run: |
|
||||||
|
npm audit --audit-level=critical --omit=dev
|
||||||
|
cd ./sas
|
||||||
|
npm audit --audit-level=critical --omit=dev
|
||||||
|
cd ../client
|
||||||
|
npm audit --audit-level=critical --omit=dev
|
||||||
|
|
||||||
|
- name: Angular Tests
|
||||||
|
run: |
|
||||||
|
cd client
|
||||||
|
npm test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
|
||||||
|
|
||||||
|
- name: Angular Production Build
|
||||||
|
run: |
|
||||||
|
cd client
|
||||||
|
npm run postinstall
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
Build-and-test-development:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: Build-production-and-ng-test
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
|
||||||
|
- name: Write .npmrc file
|
||||||
|
run: |
|
||||||
|
touch client/.npmrc
|
||||||
|
echo '${{ secrets.NPMRC}}' > client/.npmrc
|
||||||
|
|
||||||
|
- run: apt-get update
|
||||||
|
- run: wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
||||||
|
- run: apt install -y ./google-chrome*.deb;
|
||||||
|
- run: export CHROME_BIN=/usr/bin/google-chrome
|
||||||
|
- run: apt-get update -y
|
||||||
|
- run: apt-get -y install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb
|
||||||
|
- run: apt -y install jq
|
||||||
|
|
||||||
|
- name: Write cypress credentials
|
||||||
|
run: echo "$CYPRESS_CREDS" > ./client/cypress.env.json
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
CYPRESS_CREDS: ${{ secrets.CYPRESS_CREDS }}
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
# Install pm2 and prepare SASJS server
|
||||||
|
- run: npm i -g pm2
|
||||||
|
- run: curl -L https://github.com/sasjs/server/releases/latest/download/linux.zip > linux.zip
|
||||||
|
- run: unzip linux.zip
|
||||||
|
- run: touch .env
|
||||||
|
- run: echo RUN_TIMES=js >> .env
|
||||||
|
- run: echo NODE_PATH=node >> .env
|
||||||
|
- run: echo CORS=enable >> .env
|
||||||
|
- run: echo WHITELIST=http://localhost:4200 >> .env
|
||||||
|
- run: cat .env
|
||||||
|
- run: pm2 start api-linux --wait-ready
|
||||||
|
|
||||||
|
- name: Deploy mocked services
|
||||||
|
run: |
|
||||||
|
cd ./sas/mocks/sasjs
|
||||||
|
npm install -g @sasjs/cli
|
||||||
|
npm install -g replace-in-files-cli
|
||||||
|
sasjs cbd -t server-ci
|
||||||
|
# sasjs request services/admin/makedata -t server-ci -d ./deploy/makeData4GL.json -c ./deploy/requestConfig.json -o ./output.json
|
||||||
|
|
||||||
|
- name: Install ZIP
|
||||||
|
run: |
|
||||||
|
apt-get update
|
||||||
|
apt-get install zip
|
||||||
|
|
||||||
|
- name: Prepare and run frontend and cypress
|
||||||
|
run: |
|
||||||
|
cd ./client
|
||||||
|
mv ./cypress.env.example.json ./cypress.env.json
|
||||||
|
replace-in-files --regex='"username".*' --replacement='"username":"'${{ secrets.CYPRESS_USERNAME_SASJS }}'",' ./cypress.env.json
|
||||||
|
replace-in-files --regex='"password".*' --replacement='"password":"'${{ secrets.CYPRESS_PWD_SASJS }}'" ' ./cypress.env.json
|
||||||
|
cat ./cypress.env.json
|
||||||
|
npm run postinstall
|
||||||
|
# Prepare index.html to SASJS local
|
||||||
|
replace-in-files --regex='serverUrl=".*?"' --replacement='serverUrl="http://localhost:5000"' ./src/index.html
|
||||||
|
replace-in-files --regex='appLoc=".*?"' --replacement='appLoc="/Public/app/devtest"' ./src/index.html
|
||||||
|
replace-in-files --regex='serverType=".*?"' --replacement='serverType="SASJS"' ./src/index.html
|
||||||
|
replace-in-files --regex='"hosturl".*' --replacement='hosturl:"http://localhost:4200",' ./cypress.config.ts
|
||||||
|
cat ./cypress.config.ts
|
||||||
|
# Start frontend and run cypress
|
||||||
|
npm start & npx wait-on http://localhost:4200 && npx cypress run --browser chrome --spec "cypress/e2e/liveness.cy.ts,cypress/e2e/editor.cy.ts,cypress/e2e/excel.cy.ts,cypress/e2e/filtering.cy.ts,cypress/e2e/licensing.cy.ts"
|
||||||
|
|
||||||
|
- name: Zip Cypress videos
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
zip -r cypress-videos ./client/cypress/videos
|
||||||
|
|
||||||
|
- name: Add cypress videos artifacts
|
||||||
|
if: always()
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: cypress-videos.zip
|
||||||
|
path: cypress-videos.zip
|
||||||
|
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: [Build-production-and-ng-test, Build-and-test-development]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
@ -35,6 +173,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
npm i
|
npm i
|
||||||
npm i -g semantic-release
|
npm i -g semantic-release
|
||||||
|
# We do a semantic-release DRY RUN to make the job fail if there are no changes to release
|
||||||
|
GITEA_TOKEN=${{ secrets.RELEASE_TOKEN }} GITEA_URL=https://git.datacontroller.io semantic-release --dry-run | grep -q "There are no relevant changes, so no new version is released." && exit 1
|
||||||
GITEA_TOKEN=${{ secrets.RELEASE_TOKEN }} GITEA_URL=https://git.datacontroller.io semantic-release
|
GITEA_TOKEN=${{ secrets.RELEASE_TOKEN }} GITEA_URL=https://git.datacontroller.io semantic-release
|
||||||
|
|
||||||
- name: Frontend Build
|
- name: Frontend Build
|
||||||
@ -48,7 +188,7 @@ jobs:
|
|||||||
description: Compile SAS 9 services, remove tests & create deployment program
|
description: Compile SAS 9 services, remove tests & create deployment program
|
||||||
run: |
|
run: |
|
||||||
cd sas
|
cd sas
|
||||||
npm ci
|
npm i
|
||||||
sasjs c -t sas9
|
sasjs c -t sas9
|
||||||
rm -rf sasjsbuild/tests
|
rm -rf sasjsbuild/tests
|
||||||
sasjs b -t sas9
|
sasjs b -t sas9
|
||||||
@ -105,7 +245,7 @@ jobs:
|
|||||||
RELEASE_ID=`curl -k 'https://git.datacontroller.io/api/v1/repos/dc/dc/releases/latest?access_token=${{ secrets.RELEASE_TOKEN }}' | jq -r '.id'`
|
RELEASE_ID=`curl -k 'https://git.datacontroller.io/api/v1/repos/dc/dc/releases/latest?access_token=${{ secrets.RELEASE_TOKEN }}' | jq -r '.id'`
|
||||||
RELEASE_BODY=`curl -k 'https://git.datacontroller.io/api/v1/repos/dc/dc/releases/latest?access_token=${{ secrets.RELEASE_TOKEN }}' | jq -r '.body'`
|
RELEASE_BODY=`curl -k 'https://git.datacontroller.io/api/v1/repos/dc/dc/releases/latest?access_token=${{ secrets.RELEASE_TOKEN }}' | jq -r '.body'`
|
||||||
# Update body
|
# Update body
|
||||||
curl --data '{"draft": true,"body":"'"$RELEASE_BODY\n\nFor installation instructions, please visit https://docs.datacontroller.io/"'"}' -X PATCH --header 'Content-Type: application/json' -k https://git.datacontroller.io/api/v1/repos/dc/dc/releases/$RELEASE_ID?access_token=${{ secrets.RELEASE_TOKEN }}
|
curl --data '{"draft": false,"body":"'"$RELEASE_BODY\n\nFor installation instructions, please visit https://docs.datacontroller.io/"'"}' -X PATCH --header 'Content-Type: application/json' -k https://git.datacontroller.io/api/v1/repos/dc/dc/releases/$RELEASE_ID?access_token=${{ secrets.RELEASE_TOKEN }}
|
||||||
# Upload assets
|
# Upload assets
|
||||||
URL="https://git.datacontroller.io/api/v1/repos/dc/dc/releases/$RELEASE_ID/assets?access_token=${{ secrets.RELEASE_TOKEN }}"
|
URL="https://git.datacontroller.io/api/v1/repos/dc/dc/releases/$RELEASE_ID/assets?access_token=${{ secrets.RELEASE_TOKEN }}"
|
||||||
curl -k $URL -F attachment=@frontend.zip
|
curl -k $URL -F attachment=@frontend.zip
|
||||||
|
@ -6,11 +6,13 @@
|
|||||||
"@semantic-release/commit-analyzer",
|
"@semantic-release/commit-analyzer",
|
||||||
"@semantic-release/release-notes-generator",
|
"@semantic-release/release-notes-generator",
|
||||||
"@semantic-release/changelog",
|
"@semantic-release/changelog",
|
||||||
|
"@semantic-release/npm",
|
||||||
[
|
[
|
||||||
"@semantic-release/git",
|
"@semantic-release/git",
|
||||||
{
|
{
|
||||||
"assets": [
|
"assets": [
|
||||||
"CHANGELOG.md"
|
"CHANGELOG.md",
|
||||||
|
"package.json"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
53
CHANGELOG.md
53
CHANGELOG.md
@ -1,23 +1,45 @@
|
|||||||
## [6.2.1](https://git.datacontroller.io/dc/dc/compare/v6.2.0...v6.2.1) (2023-09-25)
|
## [6.2.5](https://git.datacontroller.io/dc/dc/compare/v6.2.4...v6.2.5) (2023-10-17)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* enabling AUTHDOMAIN in MM_ASSIGNDIRECTLIB ([008b45a](https://git.datacontroller.io/dc/dc/commit/008b45ad175ec0e6026f5ef3bc210470226e328f))
|
||||||
|
|
||||||
|
## [6.2.4](https://git.datacontroller.io/dc/dc/compare/v6.2.3...v6.2.4) (2023-10-16)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Enable display of metadata-only tables. Closes [#56](https://git.datacontroller.io/dc/dc/issues/56) ([f3e82b4](https://git.datacontroller.io/dc/dc/commit/f3e82b4ee2a9c1c851f812ac60e9eaf05f91a0f9))
|
||||||
|
|
||||||
|
## [6.2.3](https://git.datacontroller.io/dc/dc/compare/v6.2.2...v6.2.3) (2023-10-12)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* bumping core library to avoid non-ascii char in mp_validatecols.sas. [#50](https://git.datacontroller.io/dc/dc/issues/50) ([11b06f6](https://git.datacontroller.io/dc/dc/commit/11b06f6416300b6d70b1570c415d5a5c004976db))
|
||||||
|
* removing copyright symbol from mpe_alerts macro. [#50](https://git.datacontroller.io/dc/dc/issues/50) ([adb7eb7](https://git.datacontroller.io/dc/dc/commit/adb7eb77550c68a2dab15a6ff358129820e9b612))
|
||||||
|
|
||||||
|
## [6.2.2](https://git.datacontroller.io/dc/dc/compare/v6.2.1...v6.2.2) (2023-10-09)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* updated SheetJS (crypto) to the latest ([8bd0dd2](https://git.datacontroller.io/dc/dc/commit/8bd0dd22c258911672303869e4df893a98e93575))
|
||||||
|
|
||||||
|
## [6.2.1](https://git.datacontroller.io/dc/dc/compare/v6.2.0...v6.2.1) (2023-10-09)
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
* approve, history and submit pages grouped in review module ([e056ece](https://git.datacontroller.io/dc/dc/commit/e056ece2234ef6aab050f6a5b1f8de633b163d91))
|
* approve, history and submit pages grouped in review module ([e056ece](https://git.datacontroller.io/dc/dc/commit/e056ece2234ef6aab050f6a5b1f8de633b163d91))
|
||||||
|
* closes [#39](https://git.datacontroller.io/dc/dc/issues/39) upcase issue in MPE_SECURITY ([a00d31c](https://git.datacontroller.io/dc/dc/commit/a00d31caf3c5634cd61a4700fb175e76856edbb6))
|
||||||
* handsontable v13 ([6f482ec](https://git.datacontroller.io/dc/dc/commit/6f482ec6d909907a304ef9975262889e2370035f))
|
* handsontable v13 ([6f482ec](https://git.datacontroller.io/dc/dc/commit/6f482ec6d909907a304ef9975262889e2370035f))
|
||||||
* latest adapter ([5e30dc0](https://git.datacontroller.io/dc/dc/commit/5e30dc0f892fab2af41f4ea56e30f27ec3b3912e))
|
* latest adapter ([5e30dc0](https://git.datacontroller.io/dc/dc/commit/5e30dc0f892fab2af41f4ea56e30f27ec3b3912e))
|
||||||
* sasjs/cli and sasjs/core updated to the latest ([8571e01](https://git.datacontroller.io/dc/dc/commit/8571e01e44a8cb6df9d150d271c34bb75bffdf31))
|
* sasjs/cli and sasjs/core updated to the latest ([8571e01](https://git.datacontroller.io/dc/dc/commit/8571e01e44a8cb6df9d150d271c34bb75bffdf31))
|
||||||
* updating editors/stagedata to address issues in particular viya configurations as described in issue [#33](https://git.datacontroller.io/dc/dc/issues/33) ([94ab949](https://git.datacontroller.io/dc/dc/commit/94ab949df8c75072525751a2156b7a32c2e641dc))
|
* updating editors/stagedata to address issues in particular viya configurations as described in issue [#33](https://git.datacontroller.io/dc/dc/issues/33) ([94ab949](https://git.datacontroller.io/dc/dc/commit/94ab949df8c75072525751a2156b7a32c2e641dc))
|
||||||
* updating logic for REPLACE loadtype ([1f2ce55](https://git.datacontroller.io/dc/dc/commit/1f2ce55f249f4af56f0cacdec47e69246cd47431))
|
* updating logic for REPLACE loadtype ([1f2ce55](https://git.datacontroller.io/dc/dc/commit/1f2ce55f249f4af56f0cacdec47e69246cd47431))
|
||||||
|
|
||||||
## [6.2.1](https://git.datacontroller.io/dc/dc/compare/v6.2.0...v6.2.1) (2023-08-25)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* approve, history and submit pages grouped in review module ([e056ece](https://git.datacontroller.io/dc/dc/commit/e056ece2234ef6aab050f6a5b1f8de633b163d91))
|
|
||||||
* updating logic for REPLACE loadtype ([1f2ce55](https://git.datacontroller.io/dc/dc/commit/1f2ce55f249f4af56f0cacdec47e69246cd47431))
|
|
||||||
|
|
||||||
# [6.2.0](https://git.datacontroller.io/dc/dc/compare/v6.1.0...v6.2.0) (2023-08-24)
|
# [6.2.0](https://git.datacontroller.io/dc/dc/compare/v6.1.0...v6.2.0) (2023-08-24)
|
||||||
|
|
||||||
|
|
||||||
@ -25,19 +47,6 @@
|
|||||||
|
|
||||||
* re-enabling full REPLACE uploads ([08e39c4](https://git.datacontroller.io/dc/dc/commit/08e39c4fca570406f9aad3d907cb04596421d074))
|
* re-enabling full REPLACE uploads ([08e39c4](https://git.datacontroller.io/dc/dc/commit/08e39c4fca570406f9aad3d907cb04596421d074))
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* support for European numeric formats ([e48e47b](https://git.datacontroller.io/dc/dc/commit/e48e47bc635452b59e107b235e597c26e748875e))
|
|
||||||
|
|
||||||
# [6.2.0](https://git.datacontroller.io/dc/dc/compare/v6.1.0...v6.2.0) (2023-08-24)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* re-enabling full REPLACE uploads ([08e39c4](https://git.datacontroller.io/dc/dc/commit/08e39c4fca570406f9aad3d907cb04596421d074))
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
* support for European numeric formats ([e48e47b](https://git.datacontroller.io/dc/dc/commit/e48e47bc635452b59e107b235e597c26e748875e))
|
* support for European numeric formats ([e48e47b](https://git.datacontroller.io/dc/dc/commit/e48e47bc635452b59e107b235e597c26e748875e))
|
||||||
|
@ -53,6 +53,17 @@ npm run lint:fix
|
|||||||
Typedoc is used for generating typescript documentation based on the code.
|
Typedoc is used for generating typescript documentation based on the code.
|
||||||
That part is automated and beign done as a part of CI job.
|
That part is automated and beign done as a part of CI job.
|
||||||
|
|
||||||
|
# Release
|
||||||
|
Release is automated as a part of CI job. Workflow file: `.gitea/workflows/release.yaml`.
|
||||||
|
It will run automatically when branch merged to the `main` branch.
|
||||||
|
IMPORTANT!
|
||||||
|
If release job fails, after it has been created empty release and a tag, we must not re-run the relase job until we removed the newly create GIT TAG and RELEASE.
|
||||||
|
To remove the git tag run:
|
||||||
|
```
|
||||||
|
git push -d origin vX.X.X
|
||||||
|
```
|
||||||
|
To remove the release, you need to do it with repo administration over at [https://git.datacontroller.io/dc/dc](https://git.datacontroller.io/dc/dc)
|
||||||
|
|
||||||
# Troubleshooting
|
# Troubleshooting
|
||||||
|
|
||||||
## Makedata service "could not create directory" error
|
## Makedata service "could not create directory" error
|
||||||
|
5619
package-lock.json
generated
5619
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
@ -1,11 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "dcfrontend",
|
"name": "dcfrontend",
|
||||||
"version": "6.0.0",
|
"version": "6.2.5",
|
||||||
"description": "Data Controller",
|
"description": "Data Controller",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@saithodev/semantic-release-gitea": "^2.1.0",
|
"@saithodev/semantic-release-gitea": "^2.1.0",
|
||||||
"@semantic-release/changelog": "^6.0.3",
|
"@semantic-release/changelog": "^6.0.3",
|
||||||
"@semantic-release/commit-analyzer": "^10.0.1",
|
"@semantic-release/commit-analyzer": "^10.0.1",
|
||||||
|
"@semantic-release/npm": "11.0.0",
|
||||||
"@semantic-release/git": "^10.0.1",
|
"@semantic-release/git": "^10.0.1",
|
||||||
"@semantic-release/release-notes-generator": "^11.0.4",
|
"@semantic-release/release-notes-generator": "^11.0.4",
|
||||||
"commit-and-tag-version": "^11.2.2",
|
"commit-and-tag-version": "^11.2.2",
|
||||||
@ -23,5 +24,10 @@
|
|||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.datacontroller.io/dc/dc.git"
|
"url": "https://git.datacontroller.io/dc/dc.git"
|
||||||
}
|
},
|
||||||
|
"private": true,
|
||||||
|
"//": [
|
||||||
|
"Readme",
|
||||||
|
"We must set private: true so that semantic-release/npm plugin will update the package.json version but not try to release it as NPM package"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
68
sas/package-lock.json
generated
68
sas/package-lock.json
generated
@ -6,8 +6,8 @@
|
|||||||
"": {
|
"": {
|
||||||
"name": "dc-sas",
|
"name": "dc-sas",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sasjs/cli": "^4.10.1",
|
"@sasjs/cli": "^4.11.1",
|
||||||
"@sasjs/core": "^4.46.6"
|
"@sasjs/core": "^4.48.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@coolaj86/urequest": {
|
"node_modules/@coolaj86/urequest": {
|
||||||
@ -29,9 +29,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@sasjs/adapter": {
|
"node_modules/@sasjs/adapter": {
|
||||||
"version": "4.9.2",
|
"version": "4.10.1",
|
||||||
"resolved": "https://registry.npmjs.org/@sasjs/adapter/-/adapter-4.9.2.tgz",
|
"resolved": "https://registry.npmjs.org/@sasjs/adapter/-/adapter-4.10.1.tgz",
|
||||||
"integrity": "sha512-WAWhJAbhsOwChbRB6N+dcgj9Tods2Hq/ygsCASALbjKvqxtYlUDVBoEhdedur0VdsWyUaTAqcwioCiCpWtcRZA==",
|
"integrity": "sha512-/z6eR+3nNaLPyycK8YmpF+GAWNy0zgdl8n4cv4r45hjVBulPHVop7oj57JM/0uIPVOTT2V9IwrMCT/sFPq++vw==",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sasjs/utils": "2.52.0",
|
"@sasjs/utils": "2.52.0",
|
||||||
@ -78,12 +78,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@sasjs/cli": {
|
"node_modules/@sasjs/cli": {
|
||||||
"version": "4.10.1",
|
"version": "4.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@sasjs/cli/-/cli-4.10.1.tgz",
|
"resolved": "https://registry.npmjs.org/@sasjs/cli/-/cli-4.11.1.tgz",
|
||||||
"integrity": "sha512-qnhTdwENC8j9NJwZKtVVXNmKfmdoIkMIYxgUnH4tw08630qCNPZaH/jGrwVFF5MSUyUswgOoLVyNjxSPAYaWMA==",
|
"integrity": "sha512-aI8V3YJGFXcY9OlNas0h8ZrajLIRPn4KmGkaOLHTDa8rZ2SOtj6W5by1RwyPB9iPIHcqW3JV3OgmtEB048zuYQ==",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sasjs/adapter": "4.9.2",
|
"@sasjs/adapter": "4.10.1",
|
||||||
"@sasjs/core": "4.46.3",
|
"@sasjs/core": "4.46.3",
|
||||||
"@sasjs/lint": "2.3.1",
|
"@sasjs/lint": "2.3.1",
|
||||||
"@sasjs/utils": "3.4.0",
|
"@sasjs/utils": "3.4.0",
|
||||||
@ -116,9 +116,9 @@
|
|||||||
"integrity": "sha512-Grwydm5GxBsYk238PZw41XPjXVVQ9vWcvfZ06L2P0bQbvK0sGn7l69JA7H5MGr3QcaLpiD4Kg70cAh7PgE+JOw=="
|
"integrity": "sha512-Grwydm5GxBsYk238PZw41XPjXVVQ9vWcvfZ06L2P0bQbvK0sGn7l69JA7H5MGr3QcaLpiD4Kg70cAh7PgE+JOw=="
|
||||||
},
|
},
|
||||||
"node_modules/@sasjs/core": {
|
"node_modules/@sasjs/core": {
|
||||||
"version": "4.46.6",
|
"version": "4.48.1",
|
||||||
"resolved": "https://registry.npmjs.org/@sasjs/core/-/core-4.46.6.tgz",
|
"resolved": "https://registry.npmjs.org/@sasjs/core/-/core-4.48.1.tgz",
|
||||||
"integrity": "sha512-aXftehSL6eCGlfWxllR1fzzmUNf6mk32hGrcP/LK+lClTXTaC6Vjm4b9NdMtqy/7TK3uwXmV2+ChhOuXEUNipg=="
|
"integrity": "sha512-oT0lfoVa0ZAEhWveQgHL+gepobgrUhDDAH6fjNreGXlUUf8FmhQvbdS0X5o/dFjq6WgwjzD0FAC5J/ceXCqQhQ=="
|
||||||
},
|
},
|
||||||
"node_modules/@sasjs/lint": {
|
"node_modules/@sasjs/lint": {
|
||||||
"version": "2.3.1",
|
"version": "2.3.1",
|
||||||
@ -230,9 +230,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/tough-cookie": {
|
"node_modules/@types/tough-cookie": {
|
||||||
"version": "4.0.2",
|
"version": "4.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.3.tgz",
|
||||||
"integrity": "sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw==",
|
"integrity": "sha512-THo502dA5PzG/sfQH+42Lw3fvmYkceefOspdCwpHRul8ik2Jv1K8I5OZz1AT3/rs46kwgMCe9bSBmDLYkkOMGg==",
|
||||||
"peer": true
|
"peer": true
|
||||||
},
|
},
|
||||||
"node_modules/abab": {
|
"node_modules/abab": {
|
||||||
@ -662,9 +662,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/follow-redirects": {
|
"node_modules/follow-redirects": {
|
||||||
"version": "1.15.2",
|
"version": "1.15.3",
|
||||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
|
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz",
|
||||||
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
|
"integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==",
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "individual",
|
"type": "individual",
|
||||||
@ -1755,9 +1755,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@sasjs/adapter": {
|
"@sasjs/adapter": {
|
||||||
"version": "4.9.2",
|
"version": "4.10.1",
|
||||||
"resolved": "https://registry.npmjs.org/@sasjs/adapter/-/adapter-4.9.2.tgz",
|
"resolved": "https://registry.npmjs.org/@sasjs/adapter/-/adapter-4.10.1.tgz",
|
||||||
"integrity": "sha512-WAWhJAbhsOwChbRB6N+dcgj9Tods2Hq/ygsCASALbjKvqxtYlUDVBoEhdedur0VdsWyUaTAqcwioCiCpWtcRZA==",
|
"integrity": "sha512-/z6eR+3nNaLPyycK8YmpF+GAWNy0zgdl8n4cv4r45hjVBulPHVop7oj57JM/0uIPVOTT2V9IwrMCT/sFPq++vw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@sasjs/utils": "2.52.0",
|
"@sasjs/utils": "2.52.0",
|
||||||
"axios": "0.27.2",
|
"axios": "0.27.2",
|
||||||
@ -1798,11 +1798,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@sasjs/cli": {
|
"@sasjs/cli": {
|
||||||
"version": "4.10.1",
|
"version": "4.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@sasjs/cli/-/cli-4.10.1.tgz",
|
"resolved": "https://registry.npmjs.org/@sasjs/cli/-/cli-4.11.1.tgz",
|
||||||
"integrity": "sha512-qnhTdwENC8j9NJwZKtVVXNmKfmdoIkMIYxgUnH4tw08630qCNPZaH/jGrwVFF5MSUyUswgOoLVyNjxSPAYaWMA==",
|
"integrity": "sha512-aI8V3YJGFXcY9OlNas0h8ZrajLIRPn4KmGkaOLHTDa8rZ2SOtj6W5by1RwyPB9iPIHcqW3JV3OgmtEB048zuYQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@sasjs/adapter": "4.9.2",
|
"@sasjs/adapter": "4.10.1",
|
||||||
"@sasjs/core": "4.46.3",
|
"@sasjs/core": "4.46.3",
|
||||||
"@sasjs/lint": "2.3.1",
|
"@sasjs/lint": "2.3.1",
|
||||||
"@sasjs/utils": "3.4.0",
|
"@sasjs/utils": "3.4.0",
|
||||||
@ -1834,9 +1834,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@sasjs/core": {
|
"@sasjs/core": {
|
||||||
"version": "4.46.6",
|
"version": "4.48.1",
|
||||||
"resolved": "https://registry.npmjs.org/@sasjs/core/-/core-4.46.6.tgz",
|
"resolved": "https://registry.npmjs.org/@sasjs/core/-/core-4.48.1.tgz",
|
||||||
"integrity": "sha512-aXftehSL6eCGlfWxllR1fzzmUNf6mk32hGrcP/LK+lClTXTaC6Vjm4b9NdMtqy/7TK3uwXmV2+ChhOuXEUNipg=="
|
"integrity": "sha512-oT0lfoVa0ZAEhWveQgHL+gepobgrUhDDAH6fjNreGXlUUf8FmhQvbdS0X5o/dFjq6WgwjzD0FAC5J/ceXCqQhQ=="
|
||||||
},
|
},
|
||||||
"@sasjs/lint": {
|
"@sasjs/lint": {
|
||||||
"version": "2.3.1",
|
"version": "2.3.1",
|
||||||
@ -1934,9 +1934,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/tough-cookie": {
|
"@types/tough-cookie": {
|
||||||
"version": "4.0.2",
|
"version": "4.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.3.tgz",
|
||||||
"integrity": "sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw==",
|
"integrity": "sha512-THo502dA5PzG/sfQH+42Lw3fvmYkceefOspdCwpHRul8ik2Jv1K8I5OZz1AT3/rs46kwgMCe9bSBmDLYkkOMGg==",
|
||||||
"peer": true
|
"peer": true
|
||||||
},
|
},
|
||||||
"abab": {
|
"abab": {
|
||||||
@ -2243,9 +2243,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"follow-redirects": {
|
"follow-redirects": {
|
||||||
"version": "1.15.2",
|
"version": "1.15.3",
|
||||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
|
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz",
|
||||||
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA=="
|
"integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q=="
|
||||||
},
|
},
|
||||||
"form-data": {
|
"form-data": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
|
@ -28,6 +28,6 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sasjs/cli": "^4.11.1",
|
"@sasjs/cli": "^4.11.1",
|
||||||
"@sasjs/core": "^4.47.0"
|
"@sasjs/core": "^4.48.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,21 +1,33 @@
|
|||||||
/**
|
/**
|
||||||
@file
|
@file
|
||||||
@brief Checks the level of access a user has to the MP Editor
|
@brief Checks group access level for a table or library
|
||||||
@details In order for a user to be able to EDIT or APPROVE a table they must
|
@details In order for a user to be able to EDIT or APPROVE a table they must
|
||||||
be in a metadata group that has been granted access to that table in the
|
be in a group that has been granted access to that table in the
|
||||||
&mpelib..mpe_security table. Alternatively, they may be in the
|
MPE_SECURITY table. Alternatively, they may be in the &mpeadmins
|
||||||
&mpeadmins group (has overall access).
|
group (which has full access to everything).
|
||||||
|
|
||||||
|
@param [in] base_table The base table to check for
|
||||||
|
@param [in] user= The user for which the access level should be returned. If
|
||||||
|
not provided, the mf_user() result is used instead.
|
||||||
|
@param [in] access_level= (APPROVE) access_level (per MPE_SECURITY) reqd.
|
||||||
|
Valid values:
|
||||||
|
@li EDIT
|
||||||
|
@li APPROVE
|
||||||
|
@li VIEW
|
||||||
|
@param [in] cntl_lib_var= (MPELIB) The name of a global macro variable that
|
||||||
|
contains the libref in which the MPE_SECURITY table is stored
|
||||||
|
@param [out] outds= (MED_ACCESSCHECK) Output WORK table containing all the
|
||||||
|
groups for which the user is granted the particular ACCESS_LEVEL.
|
||||||
|
|
||||||
<h4> SAS Macros </h4>
|
<h4> SAS Macros </h4>
|
||||||
@li mp_abort.sas
|
@li mp_abort.sas
|
||||||
|
@li mf_getuniquename.sas
|
||||||
|
@li mf_getuser.sas
|
||||||
@li mf_verifymacvars.sas
|
@li mf_verifymacvars.sas
|
||||||
@li mpe_getgroups.sas
|
@li mpe_getgroups.sas
|
||||||
@li mp_dropmembers.sas
|
|
||||||
|
|
||||||
@param [in] access_level= access_level (per &mpelib..mp_editor_security) reqd
|
<h4> Related Macros </h4>
|
||||||
|
@li mpe_accesscheck.test.sas
|
||||||
@returns outds A table containing all the groups that user is a member of,
|
|
||||||
which are granted the access_level requested.
|
|
||||||
|
|
||||||
@version 9.2
|
@version 9.2
|
||||||
@author 4GL Apps Ltd
|
@author 4GL Apps Ltd
|
||||||
@ -25,65 +37,64 @@
|
|||||||
**/
|
**/
|
||||||
|
|
||||||
%macro mpe_accesscheck(
|
%macro mpe_accesscheck(
|
||||||
base_table /* base table to check for */
|
base_table
|
||||||
,outds=med_accesscheck /* WORK table to contain access details */
|
,outds=med_accesscheck /* WORK table to contain access details */
|
||||||
,user= /* metadata user to check for */
|
,user= /* metadata user to check for */
|
||||||
,access_level=APPROVE
|
,access_level=APPROVE
|
||||||
|
,cntl_lib_var=MPELIB
|
||||||
);
|
);
|
||||||
|
|
||||||
%if &user= %then %let user=%mf_getuser();
|
%if &user= %then %let user=%mf_getuser();
|
||||||
|
|
||||||
%if %index(&outds,.) %then %do;
|
%mp_abort(
|
||||||
%local lib ds;
|
iftrue=(%index(&outds,.)>0 and %upcase(%scan(&outds,1,.)) ne WORK)
|
||||||
%let lib=%scan(&outds,1,.);
|
,mac=mpe_accesscheck
|
||||||
%let ds=%scan(&outds,2,.);
|
,msg=%str(outds should be a WORK table)
|
||||||
%if %upcase(&lib) ne WORK %then %do;
|
)
|
||||||
%mp_abort(msg=outds should be a WORK table
|
|
||||||
,mac=mpe_accesscheck);
|
|
||||||
%end;
|
|
||||||
%end;
|
|
||||||
%else %let ds=&outds;
|
|
||||||
|
|
||||||
%mp_abort(
|
%mp_abort(
|
||||||
iftrue=(%mf_verifymacvars(base_table user access_level)=0)
|
iftrue=(%mf_verifymacvars(base_table user access_level)=0)
|
||||||
,mac=bitemporal_dataloader
|
,mac=mpe_accesscheck
|
||||||
,msg=%str(Missing base_table/user access_level)
|
,msg=%str(Missing base_table/user access_level variables)
|
||||||
)
|
)
|
||||||
|
|
||||||
/* ensure any existing table is dropped */
|
/* make unique temp table vars */
|
||||||
%mp_dropmembers(&ds)
|
%local tempds1 tempds2;
|
||||||
|
%let tempds1=%mf_getuniquename(prefix=usergroups);
|
||||||
|
%let tempds2=%mf_getuniquename(prefix=tablegroups);
|
||||||
|
|
||||||
/* create a new table for temp use */
|
/* get list of user groups */
|
||||||
data; run;
|
%mpe_getgroups(user=&user,outds=&tempds1)
|
||||||
%local tempds; %let tempds=&syslast;
|
|
||||||
|
|
||||||
/* overwrite with the list of groups */
|
|
||||||
%mpe_getgroups(user=&user,outds=&tempds);
|
|
||||||
|
|
||||||
|
/* get list of groups with access for that table */
|
||||||
|
proc sql;
|
||||||
|
create table &tempds2 as
|
||||||
|
select distinct sas_group
|
||||||
|
from &&&cntl_lib_var...mpe_security
|
||||||
|
where &dc_dttmtfmt. lt tx_to
|
||||||
|
and access_level="&access_level"
|
||||||
|
and (
|
||||||
|
(libref="%scan(&base_table,1,.)" and upcase(dsn)="%scan(&base_table,2,.)")
|
||||||
|
or (libref="%scan(&base_table,1,.)" and dsn="*ALL*")
|
||||||
|
or (libref="*ALL*")
|
||||||
|
);
|
||||||
%if &_debug ge 131 %then %do;
|
%if &_debug ge 131 %then %do;
|
||||||
data _null_;
|
data _null_;
|
||||||
set &tempds;
|
set &tempds1;
|
||||||
|
putlog (_all_)(=);
|
||||||
|
run;
|
||||||
|
data _null_;
|
||||||
|
set &tempds2;
|
||||||
putlog (_all_)(=);
|
putlog (_all_)(=);
|
||||||
run;
|
run;
|
||||||
%end;
|
%end;
|
||||||
|
|
||||||
proc sql;
|
proc sql;
|
||||||
create table &outds as
|
create table &outds as
|
||||||
select * from &tempds
|
select * from &tempds1
|
||||||
where groupname="&mpeadmins"
|
where groupname="&mpeadmins"
|
||||||
or groupname in
|
or groupname in (select * from &tempds2);
|
||||||
(select sas_group from &mpelib..mpe_security
|
|
||||||
where &dc_dttmtfmt. lt tx_to
|
|
||||||
and access_level="&access_level"
|
|
||||||
& (
|
|
||||||
(libref="%scan(&base_table,1,.)" and dsn="%scan(&base_table,2,.)")
|
|
||||||
or (libref="%scan(&base_table,1,.)" and dsn="*ALL*")
|
|
||||||
or (libref="*ALL*")
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
%put base_table=&base_table;
|
%put &sysmacroname: base_table=&base_table;
|
||||||
%put libref=%scan(&base_table,1,.);
|
%put &sysmacroname: access_level=&access_level;
|
||||||
%put dsn=%scan(&base_table,2,.);
|
|
||||||
%put access_level=&access_level;
|
|
||||||
%mend mpe_accesscheck;
|
%mend mpe_accesscheck;
|
||||||
|
68
sas/sasjs/macros/mpe_accesscheck.test.sas
Normal file
68
sas/sasjs/macros/mpe_accesscheck.test.sas
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/**
|
||||||
|
@file
|
||||||
|
@brief Testing mpe_accesscheck macro
|
||||||
|
@details Checking functionality of mpe_accesscheck.sas macro
|
||||||
|
|
||||||
|
|
||||||
|
<h4> SAS Macros </h4>
|
||||||
|
@li mf_getuniquename.sas
|
||||||
|
@li mf_getuser.sas
|
||||||
|
@li mp_assertdsobs.sas
|
||||||
|
@li mpe_getgroups.sas
|
||||||
|
@li mpe_accesscheck.sas
|
||||||
|
|
||||||
|
|
||||||
|
@author 4GL Apps Ltd
|
||||||
|
@copyright 4GL Apps Ltd. This code may only be used within Data Controller
|
||||||
|
and may not be re-distributed or re-sold without the express permission of
|
||||||
|
4GL Apps Ltd.
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
|
/* get the groups this user is actually a member of */
|
||||||
|
%mpe_getgroups(user=%mf_getuser(),outds=work.groups)
|
||||||
|
|
||||||
|
data _null_;
|
||||||
|
set work.groups;
|
||||||
|
call symputx('groupname',groupname);
|
||||||
|
run;
|
||||||
|
|
||||||
|
/* create demo MPE_SECURITY table */
|
||||||
|
data work.mpe_security;
|
||||||
|
if 0 then set &dc_libref..mpe_security;
|
||||||
|
do access_level='EDIT','APPROVE','VIEW','SIGNOFF','AUDIT';
|
||||||
|
LIBREF='SOMELIB';
|
||||||
|
DSN='SOMEDS';
|
||||||
|
sas_group="&groupname";
|
||||||
|
tx_from=0;
|
||||||
|
tx_to='31dec4999:23:59:59'dt;
|
||||||
|
output;
|
||||||
|
end;
|
||||||
|
run;
|
||||||
|
|
||||||
|
%let WRK=WORK;
|
||||||
|
|
||||||
|
%mpe_accesscheck(
|
||||||
|
SOMELIB.SOMEDS
|
||||||
|
,outds=work.test1
|
||||||
|
,access_level=APPROVE
|
||||||
|
,cntl_lib_var=WRK
|
||||||
|
)
|
||||||
|
%mp_assertdsobs(work.test1,
|
||||||
|
desc=Test 1 - One record returned,
|
||||||
|
test=EQUALS 1,
|
||||||
|
outds=work.test_results
|
||||||
|
)
|
||||||
|
|
||||||
|
%mpe_accesscheck(
|
||||||
|
SOMELIB.INVALID
|
||||||
|
,outds=work.test2
|
||||||
|
,access_level=APPROVE
|
||||||
|
,cntl_lib_var=WRK
|
||||||
|
)
|
||||||
|
%mp_assertdsobs(work.test2,
|
||||||
|
desc=Test 12 - 0 records returned,
|
||||||
|
test=EQUALS 0,
|
||||||
|
outds=work.test_results
|
||||||
|
)
|
||||||
|
|
@ -131,7 +131,7 @@ filename __out email ("&emails")
|
|||||||
txt=symget('SUBMITTED_TXT');
|
txt=symget('SUBMITTED_TXT');
|
||||||
put "Reason provided: " txt;
|
put "Reason provided: " txt;
|
||||||
put " ";
|
put " ";
|
||||||
put "This is an automated email by Data Controller for SAS®. For "
|
put "This is an automated email by Data Controller for SAS. For "
|
||||||
"documentation, please visit https://docs.datacontroller.io";
|
"documentation, please visit https://docs.datacontroller.io";
|
||||||
run;
|
run;
|
||||||
%end;
|
%end;
|
||||||
@ -144,7 +144,7 @@ filename __out email ("&emails")
|
|||||||
put "Please be advised that a change to table &alert_lib..&alert_ds has "
|
put "Please be advised that a change to table &alert_lib..&alert_ds has "
|
||||||
"been approved by &from_user on the '&syshostname' SAS server.";
|
"been approved by &from_user on the '&syshostname' SAS server.";
|
||||||
put " ";
|
put " ";
|
||||||
put "This is an automated email by Data Controller for SAS®. For "
|
put "This is an automated email by Data Controller for SAS. For "
|
||||||
"documentation, please visit https://docs.datacontroller.io";
|
"documentation, please visit https://docs.datacontroller.io";
|
||||||
run;
|
run;
|
||||||
%end;
|
%end;
|
||||||
@ -165,7 +165,7 @@ filename __out email ("&emails")
|
|||||||
txt=symget('REVIEW_REASON_TXT');
|
txt=symget('REVIEW_REASON_TXT');
|
||||||
put "Reason provided: " txt;
|
put "Reason provided: " txt;
|
||||||
put " ";
|
put " ";
|
||||||
put "This is an automated email by Data Controller for SAS®. For "
|
put "This is an automated email by Data Controller for SAS. For "
|
||||||
"documentation, please visit https://docs.datacontroller.io";
|
"documentation, please visit https://docs.datacontroller.io";
|
||||||
run;
|
run;
|
||||||
%end;
|
%end;
|
||||||
|
@ -1014,7 +1014,8 @@ insert into &lib..mpe_selectbox set
|
|||||||
,buskey='LIBREF DSN ACCESS_LEVEL SAS_GROUP'
|
,buskey='LIBREF DSN ACCESS_LEVEL SAS_GROUP'
|
||||||
,var_txfrom='TX_FROM'
|
,var_txfrom='TX_FROM'
|
||||||
,var_txto='TX_TO'
|
,var_txto='TX_TO'
|
||||||
,notes='Shows which metadata groups can edit which tables'
|
,notes='Determines which groups can view/edit/approve which tables'
|
||||||
|
,post_edit_hook='services/hooks/mpe_security_postedit'
|
||||||
;
|
;
|
||||||
insert into &lib..mpe_tables
|
insert into &lib..mpe_tables
|
||||||
set tx_from=0
|
set tx_from=0
|
||||||
@ -1351,6 +1352,15 @@ insert into &lib..MPE_VALIDATIONS set
|
|||||||
,rule_value='UPCASE'
|
,rule_value='UPCASE'
|
||||||
,rule_active=1
|
,rule_active=1
|
||||||
,tx_to='31DEC5999:23:59:59'dt;
|
,tx_to='31DEC5999:23:59:59'dt;
|
||||||
|
insert into &lib..MPE_VALIDATIONS set
|
||||||
|
tx_from=0
|
||||||
|
,base_lib="&lib"
|
||||||
|
,base_ds="MPE_SECURITY"
|
||||||
|
,base_col="LIBREF"
|
||||||
|
,rule_type='CASE'
|
||||||
|
,rule_value="UPCASE"
|
||||||
|
,rule_active=1
|
||||||
|
,tx_to='31DEC5999:23:59:59'dt;
|
||||||
insert into &lib..MPE_VALIDATIONS set
|
insert into &lib..MPE_VALIDATIONS set
|
||||||
tx_from=0
|
tx_from=0
|
||||||
,base_lib="&lib"
|
,base_lib="&lib"
|
||||||
@ -1369,6 +1379,15 @@ insert into &lib..MPE_VALIDATIONS set
|
|||||||
,rule_value="&lib..MPE_TABLES.LIBREF"
|
,rule_value="&lib..MPE_TABLES.LIBREF"
|
||||||
,rule_active=1
|
,rule_active=1
|
||||||
,tx_to='31DEC5999:23:59:59'dt;
|
,tx_to='31DEC5999:23:59:59'dt;
|
||||||
|
insert into &lib..MPE_VALIDATIONS set
|
||||||
|
tx_from=0
|
||||||
|
,base_lib="&lib"
|
||||||
|
,base_ds="MPE_SECURITY"
|
||||||
|
,base_col="DSN"
|
||||||
|
,rule_type='CASE'
|
||||||
|
,rule_value="UPCASE"
|
||||||
|
,rule_active=1
|
||||||
|
,tx_to='31DEC5999:23:59:59'dt;
|
||||||
insert into &lib..MPE_VALIDATIONS set
|
insert into &lib..MPE_VALIDATIONS set
|
||||||
tx_from=0
|
tx_from=0
|
||||||
,base_lib="&lib"
|
,base_lib="&lib"
|
||||||
|
34
sas/sasjs/services/hooks/mpe_security_postedit.sas
Normal file
34
sas/sasjs/services/hooks/mpe_security_postedit.sas
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
/**
|
||||||
|
@file
|
||||||
|
@brief Post Edit Hook script for the MPE_SECURITY table
|
||||||
|
@details Post edit hooks provide additional backend validation against
|
||||||
|
user-sourced data. The incoming dataset is always `work.staging_ds` and this
|
||||||
|
file is included from the mpe_loader.sas macro.
|
||||||
|
|
||||||
|
Available (at runtime) macro variables:
|
||||||
|
@li DC_LIBREF - The DC control library for your site
|
||||||
|
@li LIBREF - The library of the dataset being edited (is assigned)
|
||||||
|
@li DS - The dataset being edited
|
||||||
|
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
|
/* ensure upcase and check access level values*/
|
||||||
|
%let errval=0;
|
||||||
|
%let errmsg=;
|
||||||
|
data work.staging_ds;
|
||||||
|
set work.staging_ds;
|
||||||
|
LIBREF=upcase(LIBREF);
|
||||||
|
DSN=upcase(DSN);
|
||||||
|
ACCESS_LEVEL=upcase(ACCESS_LEVEL);
|
||||||
|
if ACCESS_LEVEL not in ('EDIT','APPROVE','VIEW','SIGNOFF','AUDIT') then do;
|
||||||
|
putlog "ERR" +(-1) "OR: invalid ACCESS_LEVEL - " access_level;
|
||||||
|
call symputx('errval',1);
|
||||||
|
call symputx('errmsg',"Invalid ACCESS_LEVEL: "!!access_level);
|
||||||
|
end;
|
||||||
|
run;
|
||||||
|
|
||||||
|
%mp_abort(iftrue=(&errval=1)
|
||||||
|
,mac=mpe_security_postedit.sas
|
||||||
|
,msg=%str(&errmsg)
|
||||||
|
)
|
@ -290,6 +290,7 @@ run;
|
|||||||
run;
|
run;
|
||||||
data work.groups;
|
data work.groups;
|
||||||
length groupuri groupname $32 groupdesc $128 ;
|
length groupuri groupname $32 groupdesc $128 ;
|
||||||
|
call missing (of _all_);
|
||||||
output;
|
output;
|
||||||
stop;
|
stop;
|
||||||
run;
|
run;
|
||||||
|
Reference in New Issue
Block a user