1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-06-11 03:00:21 +00:00

Compare commits

...

23 Commits

Author SHA1 Message Date
dependabot[bot] 42fa63f71e build(deps): bump axios and @sasjs/adapter in /sasjs-tests
Bumps [axios](https://github.com/axios/axios) to 1.13.5 and updates ancestor dependency [@sasjs/adapter](https://github.com/sasjs/adapter). These dependencies need to be updated together.


Updates `axios` from 1.12.2 to 1.13.5
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.12.2...v1.13.5)

Updates `@sasjs/adapter` from 4.14.0 to 4.16.3
- [Changelog](https://github.com/sasjs/adapter/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sasjs/adapter/compare/v4.14.0...v4.16.3)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.13.5
  dependency-type: indirect
- dependency-name: "@sasjs/adapter"
  dependency-version: 4.16.3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-11 20:49:09 +00:00
Allan Bowe 8e8efd22e9 Merge pull request #875 from sasjs/axiosbump
fix: bumping axios to 1.13.5
2026-02-09 20:11:49 +00:00
allan f80d0c87f9 fix: bumping axios to 1.13.5 2026-02-09 19:47:35 +00:00
Sead Mulahasanović 5bd641b843 Merge pull request #871 from sasjs/mihajlo/viyaWebContextName
fix: viya, web approach, contexname not added to the url if contains …
2026-02-06 12:37:55 +01:00
M 539fe5f4ed fix: viya, web approach, contexname not added to the url if contains spaces between the words 2026-02-06 12:05:02 +01:00
Allan Bowe 9252e7e384 Merge pull request #866 from sasjs/housekeeping_20251212
fix(build): pipeline node version upgrade and hardened security
2025-12-15 12:06:04 +00:00
mulahasanovic bbf0eed443 chore(cypress): update config 2025-12-15 11:49:53 +01:00
mulahasanovic 677c0a5046 chore(build): update search and replace command for cypress env 2025-12-15 11:29:55 +01:00
mulahasanovic ff927caf73 chore(deps): bump cypress 2025-12-15 11:20:22 +01:00
mulahasanovic e23aa4426c chore(build): update test server port 2025-12-12 17:54:00 +01:00
mulahasanovic 8064a843e8 fix(build): install cypress binary and cache only in relevant pipeline 2025-12-12 17:31:57 +01:00
M d45b528846 chore: ci fix, package-lock regen 2025-12-12 17:27:29 +01:00
mulahasanovic cd64ebc518 fix(build): add cypress binary to the cache 2025-12-12 17:11:58 +01:00
Trevor Moody 8246722ae8 fix(deps): take newly available @sasjs/utils 3.5.6 2025-12-12 14:18:04 +00:00
Trevor Moody 0f8a3f4b53 fix(build): node version unified across all pipelines 2025-12-12 13:59:06 +00:00
Trevor Moody ca9ffdbc17 fix(build): pipeline node version upgrade and hardened security 2025-12-12 13:16:32 +00:00
Allan Bowe 03b7592521 Merge pull request #865 from sasjs/viyaCreateFileAndPatch
Viya create file and patch
2025-11-25 09:02:48 +00:00
Trevor Moody ba64ed1f20 fix: defensively coded for potential empty 'name' properties in the viya types response 2025-11-25 07:39:00 +00:00
Trevor Moody 480510b980 build: (server-tests) use jq to safely modify json 2025-11-23 06:29:52 +00:00
Trevor Moody 8c7767a36d fix: (build) command syntax 2025-11-22 22:19:34 +00:00
Trevor Moody f335be344e build: adjusted search/replace regex/value to allow for json lines without trailing commas 2025-11-22 22:11:55 +00:00
Trevor Moody 680f5a4872 chore: (sasjs-tests) prevent redundant rendering of vertical scroll bar 2025-11-22 17:58:00 +00:00
Trevor Moody c42a20a8ee feat: (viya) apply properties to newly created files 2025-11-22 17:56:50 +00:00
17 changed files with 718 additions and 435 deletions
+1
View File
@@ -0,0 +1 @@
* text=auto eol=lf
+2 -2
View File
@@ -12,7 +12,7 @@ jobs:
strategy: strategy:
matrix: matrix:
node-version: [lts/hydrogen] node-version: [lts/iron]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@@ -21,7 +21,7 @@ jobs:
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
# 2. Restore npm cache manually # 2. Restore npm cache manually
- name: Restore npm cache - name: Restore npm cache
uses: actions/cache@v3 uses: actions/cache@v3
id: npm-cache id: npm-cache
+4 -4
View File
@@ -11,7 +11,7 @@ jobs:
strategy: strategy:
matrix: matrix:
node-version: [lts/hydrogen] node-version: [lts/iron]
steps: steps:
- name: Checkout - name: Checkout
@@ -20,9 +20,10 @@ jobs:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: ${{ matrix.node-version }} node-version:
${{ matrix.node-version }}
# 2. Restore npm cache manually # 2. Restore npm cache manually
- name: Restore npm cache - name: Restore npm cache
uses: actions/cache@v3 uses: actions/cache@v3
id: npm-cache id: npm-cache
@@ -50,4 +51,3 @@ jobs:
publish_branch: gh-pages publish_branch: gh-pages
publish_dir: ./docs publish_dir: ./docs
cname: adapter.sasjs.io cname: adapter.sasjs.io
+5 -2
View File
@@ -14,7 +14,7 @@ jobs:
strategy: strategy:
matrix: matrix:
node-version: [lts/hydrogen] node-version: [lts/iron]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@@ -23,7 +23,7 @@ jobs:
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
# 2. Restore npm cache manually # 2. Restore npm cache manually
- name: Restore npm cache - name: Restore npm cache
uses: actions/cache@v3 uses: actions/cache@v3
id: npm-cache id: npm-cache
@@ -42,6 +42,9 @@ jobs:
- name: Build Project - name: Build Project
run: npm run build run: npm run build
- name: Clean up ready for publishing
run: npm run publishInit
- name: Semantic Release - name: Semantic Release
uses: cycjimmy/semantic-release-action@v3 uses: cycjimmy/semantic-release-action@v3
env: env:
+120 -107
View File
@@ -1,107 +1,120 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: SASjs Build and Server Tests name: SASjs Build and Server Tests
on: on:
pull_request: pull_request:
jobs: jobs:
test: test:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
strategy: strategy:
matrix: matrix:
node-version: [lts/hydrogen] node-version: [lts/iron]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }} - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
# 2. Restore npm cache manually # 2. Restore npm cache manually
- name: Restore npm cache - name: Restore npm cache
uses: actions/cache@v3 uses: actions/cache@v3
id: npm-cache id: npm-cache
with: with:
path: ~/.npm path: |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} ~/.npm
restore-keys: | key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
${{ runner.os }}-node- restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: npm ci - name: Cache Cypress binary
uses: actions/cache@v3
- name: Install Rimraf with:
run: npm i rimraf path: ~/.cache/Cypress
key: cypress-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: Build Package restore-keys: |
run: npm run package:lib cypress-${{ runner.os }}-
env:
CI: true - name: Install Dependencies
run: npm ci
- name: Write VPN Files
run: | - name: Install Cypress binary
echo "$CA_CRT" > .github/vpn/ca.crt run: npx cypress install
echo "$USER_CRT" > .github/vpn/user.crt
echo "$USER_KEY" > .github/vpn/user.key - name: Install Rimraf
echo "$TLS_KEY" > .github/vpn/tls.key run: npm i rimraf
shell: bash
env: - name: Build Package
CA_CRT: ${{ secrets.CA_CRT}} run: npm run package:lib
USER_CRT: ${{ secrets.USER_CRT }} env:
USER_KEY: ${{ secrets.USER_KEY }} CI: true
TLS_KEY: ${{ secrets.TLS_KEY }}
- name: Write VPN Files
- name: Chmod VPN files run: |
run: | echo "$CA_CRT" > .github/vpn/ca.crt
chmod 600 .github/vpn/ca.crt .github/vpn/user.crt .github/vpn/user.key .github/vpn/tls.key echo "$USER_CRT" > .github/vpn/user.crt
echo "$USER_KEY" > .github/vpn/user.key
- name: Install Open VPN echo "$TLS_KEY" > .github/vpn/tls.key
run: | shell: bash
sudo apt install apt-transport-https env:
sudo wget https://swupdate.openvpn.net/repos/openvpn-repo-pkg-key.pub CA_CRT: ${{ secrets.CA_CRT}}
sudo apt-key add openvpn-repo-pkg-key.pub USER_CRT: ${{ secrets.USER_CRT }}
sudo wget -O /etc/apt/sources.list.d/openvpn3.list https://swupdate.openvpn.net/community/openvpn3/repos/openvpn3-jammy.list USER_KEY: ${{ secrets.USER_KEY }}
sudo apt update TLS_KEY: ${{ secrets.TLS_KEY }}
sudo apt install openvpn3=17~betaUb22042+jammy
- name: Chmod VPN files
- name: Start Open VPN 3 run: |
run: openvpn3 session-start --config .github/vpn/config.ovpn chmod 600 .github/vpn/ca.crt .github/vpn/user.crt .github/vpn/user.key .github/vpn/tls.key
- name: install pm2 - name: Install Open VPN
run: npm i -g pm2 run: |
sudo apt install apt-transport-https
- name: Fetch SASJS server sudo wget https://swupdate.openvpn.net/repos/openvpn-repo-pkg-key.pub
run: curl ${{ secrets.SASJS_SERVER_URL }}/SASjsApi/info sudo apt-key add openvpn-repo-pkg-key.pub
sudo wget -O /etc/apt/sources.list.d/openvpn3.list https://swupdate.openvpn.net/community/openvpn3/repos/openvpn3-jammy.list
- name: Deploy sasjs-tests sudo apt update
run: | sudo apt install openvpn3=17~betaUb22042+jammy
npm install -g replace-in-files-cli
cd sasjs-tests - name: Start Open VPN 3
replace-in-files --regex='"@sasjs/adapter".*' --replacement='"@sasjs/adapter":"latest",' ./package.json run: openvpn3 session-start --config .github/vpn/config.ovpn
npm i
replace-in-files --regex='"serverUrl".*' --replacement='"serverUrl":"${{ secrets.SASJS_SERVER_URL }}",' ./public/config.json - name: install pm2
replace-in-files --regex='"userName".*' --replacement='"userName":"${{ secrets.SASJS_USERNAME }}",' ./public/config.json run: npm i -g pm2
replace-in-files --regex='"serverType".*' --replacement='"serverType":"SASJS",' ./public/config.json
replace-in-files --regex='"password".*' --replacement='"password":"${{ secrets.SASJS_PASSWORD }}",' ./public/config.json - name: Fetch SASJS server
cat ./public/config.json run: curl ${{ secrets.SASJS_SERVER_URL }}/SASjsApi/info
npm run update:adapter - name: Deploy sasjs-tests
pm2 start --name sasjs-test npm -- start run: |
sudo apt install jq
- name: Sleep for 10 seconds cd sasjs-tests
run: sleep 10s jq '.dependencies."@sasjs/adapter" |= "latest"' ./package.json > ./package.temp && mv ./package.temp ./package.json
shell: bash npm i
jq '.sasJsConfig.serverUrl |= "${{ secrets.SASJS_SERVER_URL }}"' ./public/config.json > ./public/config.temp && mv ./public/config.temp ./public/config.json
- name: Run cypress on sasjs jq '.sasJsConfig.serverType |= "SASJS"' ./public/config.json > ./public/config.temp && mv ./public/config.temp ./public/config.json
run: | jq '.userName |= "${{ secrets.SASJS_USERNAME }}"' ./public/config.json > ./public/config.temp && mv ./public/config.temp ./public/config.json
replace-in-files --regex='"sasjsTestsUrl".*' --replacement='"sasjsTestsUrl":"http://localhost:3000",' ./cypress.json jq '.password |= "${{ secrets.SASJS_PASSWORD }}"' ./public/config.json > ./public/config.temp && mv ./public/config.temp ./public/config.json
replace-in-files --regex='"username".*' --replacement='"username":"${{ secrets.SASJS_USERNAME }}",' ./cypress.json
replace-in-files --regex='"password".*' --replacement='"password":"${{ secrets.SASJS_PASSWORD }}",' ./cypress.json cat ./public/config.json
cat ./cypress.json
echo "SASJS_USERNAME=${{ secrets.SASJS_USERNAME }}" npm run update:adapter
pm2 start --name sasjs-test npm -- start
sh ./sasjs-tests/sasjs-cypress-run.sh ${{ secrets.MATRIX_TOKEN }} https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
- name: Sleep for 10 seconds
run: sleep 10s
shell: bash
- name: Run cypress on sasjs
run: |
sed -i "s|sasjsTestsUrl: '.*'|sasjsTestsUrl: 'http://localhost:5173'|g" ./cypress.config.js
sed -i "s|username: '.*'|username: '${{ secrets.SASJS_USERNAME }}'|g" ./cypress.config.js
sed -i "s|password: '.*'|password: '${{ secrets.SASJS_PASSWORD }}'|g" ./cypress.config.js
cat ./cypress.config.js
echo "SASJS_USERNAME=${{ secrets.SASJS_USERNAME }}"
sh ./sasjs-tests/sasjs-cypress-run.sh ${{ secrets.MATRIX_TOKEN }} https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
-2
View File
@@ -1,2 +0,0 @@
tasks:
- init: npm install && npm run build
+1
View File
@@ -0,0 +1 @@
ignore-scripts=true
+18
View File
@@ -0,0 +1,18 @@
const { defineConfig } = require('cypress')
module.exports = defineConfig({
e2e: {
includeShadowDom: true,
chromeWebSecurity: false,
defaultCommandTimeout: 20000,
specPattern: 'cypress/integration/**/*.ts',
supportFile: 'cypress/support/index.js'
},
env: {
sasjsTestsUrl: 'http://localhost:5173',
username: '',
password: '',
screenshotOnRunFailure: false,
testingFinishTimeout: 600000
}
})
-11
View File
@@ -1,11 +0,0 @@
{
"chromeWebSecurity": false,
"defaultCommandTimeout": 20000,
"env": {
"sasjsTestsUrl": "",
"username": "",
"password": "",
"screenshotOnRunFailure": false,
"testingFinishTimeout": 600000
}
}
+329 -204
View File
File diff suppressed because it is too large Load Diff
+5 -8
View File
@@ -4,17 +4,14 @@
"homepage": "https://adapter.sasjs.io", "homepage": "https://adapter.sasjs.io",
"scripts": { "scripts": {
"nodeVersionMessage": "echo \u001b[33m make sure you are running node lts version \u001b[0m", "nodeVersionMessage": "echo \u001b[33m make sure you are running node lts version \u001b[0m",
"preinstall": "npm run nodeVersionMessage", "build": "npm run nodeVersionMessage && npx rimraf build && npx rimraf node && mkdir node && copyfiles -u 1 \"./src/**/*\" ./node && webpack && npx rimraf build/src && npx rimraf node",
"prebuild": "npm run nodeVersionMessage",
"build": "npx rimraf build && npx rimraf node && mkdir node && copyfiles -u 1 \"./src/**/*\" ./node && webpack && npx rimraf build/src && npx rimraf node",
"package:lib": "npm run build && copyfiles ./package.json build && cd build && npm version \"5.0.0\" && npm pack", "package:lib": "npm run build && copyfiles ./package.json build && cd build && npm version \"5.0.0\" && npm pack",
"publish:lib": "npm run build && cd build && npm publish", "publish:lib": "npm run build && cd build && npm publish",
"lint:fix": "npx prettier --loglevel silent --write \"src/**/*.{ts,tsx,js,jsx,html,css,sass,less,json,yml,md,graphql}\" && npx prettier --loglevel silent --write \"sasjs-tests/src/**/*.{ts,tsx,js,jsx,html,css,sass,less,json,yml,md,graphql}\" && npx prettier --loglevel silent --write \"cypress/**/*.{ts,tsx,js,jsx,html,css,sass,less,json,yml,md,graphql}\"", "lint:fix": "npx prettier --loglevel silent --write \"src/**/*.{ts,tsx,js,jsx,html,css,sass,less,json,yml,md,graphql}\" && npx prettier --loglevel silent --write \"sasjs-tests/src/**/*.{ts,tsx,js,jsx,html,css,sass,less,json,yml,md,graphql}\" && npx prettier --loglevel silent --write \"cypress/**/*.{ts,tsx,js,jsx,html,css,sass,less,json,yml,md,graphql}\"",
"lint": "npx prettier --check \"src/**/*.{ts,tsx,js,jsx,html,css,sass,less,json,yml,md,graphql}\" && npx prettier --check \"sasjs-tests/src/**/*.{ts,tsx,js,jsx,html,css,sass,less,json,yml,md,graphql}\" && npx prettier --check \"cypress/**/*.{ts,tsx,js,jsx,html,css,sass,less,json,yml,md,graphql}\"", "lint": "npx prettier --check \"src/**/*.{ts,tsx,js,jsx,html,css,sass,less,json,yml,md,graphql}\" && npx prettier --check \"sasjs-tests/src/**/*.{ts,tsx,js,jsx,html,css,sass,less,json,yml,md,graphql}\" && npx prettier --check \"cypress/**/*.{ts,tsx,js,jsx,html,css,sass,less,json,yml,md,graphql}\"",
"lint:silent": "npx prettier --loglevel silent --check \"src/**/*.{ts,tsx,js,jsx,html,css,sass,less,json,yml,md,graphql}\" && npx prettier --loglevel silent --check \"sasjs-tests/src/**/*.{ts,tsx,js,jsx,html,css,sass,less,json,yml,md,graphql}\" && npx prettier --loglevel silent --check \"cypress/**/*.{ts,tsx,js,jsx,html,css,sass,less,json,yml,md,graphql}\"", "lint:silent": "npx prettier --loglevel silent --check \"src/**/*.{ts,tsx,js,jsx,html,css,sass,less,json,yml,md,graphql}\" && npx prettier --loglevel silent --check \"sasjs-tests/src/**/*.{ts,tsx,js,jsx,html,css,sass,less,json,yml,md,graphql}\" && npx prettier --loglevel silent --check \"cypress/**/*.{ts,tsx,js,jsx,html,css,sass,less,json,yml,md,graphql}\"",
"test": "jest --silent --coverage", "test": "jest --silent --coverage",
"prepublishOnly": "cp -r ./build/* . && rm -rf ./build", "publishInit": "cp -r ./build/* . && rm -rf ./build",
"postpublish": "git clean -fd",
"semantic-release": "semantic-release", "semantic-release": "semantic-release",
"typedoc": "node createTSDocs", "typedoc": "node createTSDocs",
"prepare": "git rev-parse --git-dir && git config core.hooksPath ./.git-hooks && git config core.autocrlf false || true", "prepare": "git rev-parse --git-dir && git config core.hooksPath ./.git-hooks && git config core.autocrlf false || true",
@@ -54,7 +51,7 @@
"copyfiles": "2.4.1", "copyfiles": "2.4.1",
"cors": "^2.8.5", "cors": "^2.8.5",
"cp": "0.2.0", "cp": "0.2.0",
"cypress": "7.7.0", "cypress": "^15.7.1",
"dotenv": "16.0.0", "dotenv": "16.0.0",
"express": "4.17.3", "express": "4.17.3",
"jest": "29.7.0", "jest": "29.7.0",
@@ -79,8 +76,8 @@
}, },
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@sasjs/utils": "3.5.2", "@sasjs/utils": "3.5.6",
"axios": "1.12.2", "axios": "^1.13.5",
"axios-cookiejar-support": "5.0.5", "axios-cookiejar-support": "5.0.5",
"form-data": "4.0.4", "form-data": "4.0.4",
"https": "1.0.0", "https": "1.0.0",
+1 -5
View File
@@ -12,10 +12,6 @@ body {
background: #f5f5f5; background: #f5f5f5;
} }
#app {
min-height: 100vh;
}
.app__error { .app__error {
max-width: 800px; max-width: 800px;
margin: 50px auto; margin: 50px auto;
@@ -40,4 +36,4 @@ body {
border-radius: 4px; border-radius: 4px;
overflow-x: auto; overflow-x: auto;
} }
} }
+68 -72
View File
@@ -8,7 +8,7 @@
"name": "sasjs-tests-new", "name": "sasjs-tests-new",
"version": "0.0.0", "version": "0.0.0",
"dependencies": { "dependencies": {
"@sasjs/adapter": "^4.14.0" "@sasjs/adapter": "^4.16.3"
}, },
"devDependencies": { "devDependencies": {
"typescript": "~5.9.3", "typescript": "~5.9.3",
@@ -50,7 +50,6 @@
"version": "4.3.5", "version": "4.3.5",
"resolved": "https://registry.npmjs.org/@fast-csv/format/-/format-4.3.5.tgz", "resolved": "https://registry.npmjs.org/@fast-csv/format/-/format-4.3.5.tgz",
"integrity": "sha512-8iRn6QF3I8Ak78lNAa+Gdl5MJJBM5vRHivFtMRUWINdevNo00K7OXxS2PshawLKTejVwieIlPmK5YlLu6w4u8A==", "integrity": "sha512-8iRn6QF3I8Ak78lNAa+Gdl5MJJBM5vRHivFtMRUWINdevNo00K7OXxS2PshawLKTejVwieIlPmK5YlLu6w4u8A==",
"license": "MIT",
"dependencies": { "dependencies": {
"@types/node": "^14.0.1", "@types/node": "^14.0.1",
"lodash.escaperegexp": "^4.1.2", "lodash.escaperegexp": "^4.1.2",
@@ -63,8 +62,7 @@
"node_modules/@fast-csv/format/node_modules/@types/node": { "node_modules/@fast-csv/format/node_modules/@types/node": {
"version": "14.18.63", "version": "14.18.63",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.63.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.63.tgz",
"integrity": "sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ==", "integrity": "sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ=="
"license": "MIT"
}, },
"node_modules/@napi-rs/wasm-runtime": { "node_modules/@napi-rs/wasm-runtime": {
"version": "1.0.7", "version": "1.0.7",
@@ -327,14 +325,12 @@
"dev": true "dev": true
}, },
"node_modules/@sasjs/adapter": { "node_modules/@sasjs/adapter": {
"version": "4.14.0", "version": "4.16.3",
"resolved": "https://registry.npmjs.org/@sasjs/adapter/-/adapter-4.14.0.tgz", "resolved": "https://registry.npmjs.org/@sasjs/adapter/-/adapter-4.16.3.tgz",
"integrity": "sha512-kLjThuLayOr35A+MloXx4Z2tqjui48vHYmVXXmqiFe26Wal6i2jflzhVN5+srmYlGzJX+G0SN78kYTKfvr3lcA==", "integrity": "sha512-xcoZT9qZhF6pXvXx4bHxbmauLdEHng8pSlTK4F6asUkHNR5uzeSvY6znA1yJqK+8FFtsVILyvMQyGyhWw6WsOA==",
"hasInstallScript": true,
"license": "ISC",
"dependencies": { "dependencies": {
"@sasjs/utils": "3.5.2", "@sasjs/utils": "3.5.6",
"axios": "1.12.2", "axios": "^1.13.5",
"axios-cookiejar-support": "5.0.5", "axios-cookiejar-support": "5.0.5",
"form-data": "4.0.4", "form-data": "4.0.4",
"https": "1.0.0", "https": "1.0.0",
@@ -342,11 +338,9 @@
} }
}, },
"node_modules/@sasjs/utils": { "node_modules/@sasjs/utils": {
"version": "3.5.2", "version": "3.5.6",
"resolved": "https://registry.npmjs.org/@sasjs/utils/-/utils-3.5.2.tgz", "resolved": "https://registry.npmjs.org/@sasjs/utils/-/utils-3.5.6.tgz",
"integrity": "sha512-LBpBDx0T7G/eO15Gb+r3DR1LfBnoqagWT3HiHabojFziA4ej4ePORo8chrk0zHLIzrjI2ljAnDabyJEwC5KtIA==", "integrity": "sha512-jx8zWSOysDD66vTjA0BWiZ8bcFqmqh8F+56fUCgLmJhm89eDbKrGF3mDKMQx3UE7d2+gxp9xYhJCdaBWz0Dlxw==",
"hasInstallScript": true,
"license": "ISC",
"dependencies": { "dependencies": {
"@fast-csv/format": "4.3.5", "@fast-csv/format": "4.3.5",
"@types/fs-extra": "11.0.4", "@types/fs-extra": "11.0.4",
@@ -375,7 +369,6 @@
"version": "11.0.4", "version": "11.0.4",
"resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.4.tgz", "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.4.tgz",
"integrity": "sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==", "integrity": "sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==",
"license": "MIT",
"dependencies": { "dependencies": {
"@types/jsonfile": "*", "@types/jsonfile": "*",
"@types/node": "*" "@types/node": "*"
@@ -385,7 +378,6 @@
"version": "6.1.4", "version": "6.1.4",
"resolved": "https://registry.npmjs.org/@types/jsonfile/-/jsonfile-6.1.4.tgz", "resolved": "https://registry.npmjs.org/@types/jsonfile/-/jsonfile-6.1.4.tgz",
"integrity": "sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==", "integrity": "sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==",
"license": "MIT",
"dependencies": { "dependencies": {
"@types/node": "*" "@types/node": "*"
} }
@@ -403,7 +395,6 @@
"version": "2.0.13", "version": "2.0.13",
"resolved": "https://registry.npmjs.org/@types/prompts/-/prompts-2.0.13.tgz", "resolved": "https://registry.npmjs.org/@types/prompts/-/prompts-2.0.13.tgz",
"integrity": "sha512-jwMOIGy49VruR/gYehhJYgpVzB+EVpEE7t7j9m1oTo4HMpOe7KmsyqdBuoxAzA5B4caUgx0cKrWr7wUEqMXJ7Q==", "integrity": "sha512-jwMOIGy49VruR/gYehhJYgpVzB+EVpEE7t7j9m1oTo4HMpOe7KmsyqdBuoxAzA5B4caUgx0cKrWr7wUEqMXJ7Q==",
"license": "MIT",
"dependencies": { "dependencies": {
"@types/node": "*" "@types/node": "*"
} }
@@ -421,7 +412,6 @@
"version": "4.3.0", "version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"license": "MIT",
"dependencies": { "dependencies": {
"color-convert": "^2.0.1" "color-convert": "^2.0.1"
}, },
@@ -439,13 +429,12 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/axios": { "node_modules/axios": {
"version": "1.12.2", "version": "1.13.5",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.12.2.tgz", "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.5.tgz",
"integrity": "sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==", "integrity": "sha512-cz4ur7Vb0xS4/KUN0tPWe44eqxrIu31me+fbang3ijiNscE129POzipJJA6zniq2C/Z6sJCjMimjS8Lc/GAs8Q==",
"license": "MIT",
"dependencies": { "dependencies": {
"follow-redirects": "^1.15.6", "follow-redirects": "^1.15.11",
"form-data": "^4.0.4", "form-data": "^4.0.5",
"proxy-from-env": "^1.1.0" "proxy-from-env": "^1.1.0"
} }
}, },
@@ -468,6 +457,21 @@
"tough-cookie": ">=4.0.0" "tough-cookie": ">=4.0.0"
} }
}, },
"node_modules/axios/node_modules/form-data": {
"version": "4.0.5",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz",
"integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"es-set-tostringtag": "^2.1.0",
"hasown": "^2.0.2",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/call-bind-apply-helpers": { "node_modules/call-bind-apply-helpers": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
@@ -485,7 +489,6 @@
"version": "4.1.1", "version": "4.1.1",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
"integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"license": "MIT",
"dependencies": { "dependencies": {
"ansi-styles": "^4.1.0", "ansi-styles": "^4.1.0",
"supports-color": "^7.1.0" "supports-color": "^7.1.0"
@@ -512,7 +515,6 @@
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"license": "MIT",
"dependencies": { "dependencies": {
"color-name": "~1.1.4" "color-name": "~1.1.4"
}, },
@@ -523,14 +525,12 @@
"node_modules/color-name": { "node_modules/color-name": {
"version": "1.1.4", "version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
"license": "MIT"
}, },
"node_modules/colors": { "node_modules/colors": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz",
"integrity": "sha512-pFGrxThWcWQ2MsAz6RtgeWe4NK2kUE1WfsrvvlctdII745EW9I0yflqhe7++M5LEc7bV2c/9/5zc8sFcpL0Drw==", "integrity": "sha512-pFGrxThWcWQ2MsAz6RtgeWe4NK2kUE1WfsrvvlctdII745EW9I0yflqhe7++M5LEc7bV2c/9/5zc8sFcpL0Drw==",
"license": "MIT",
"engines": { "engines": {
"node": ">=0.1.90" "node": ">=0.1.90"
} }
@@ -550,8 +550,7 @@
"node_modules/consola": { "node_modules/consola": {
"version": "2.15.0", "version": "2.15.0",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.15.0.tgz", "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.0.tgz",
"integrity": "sha512-vlcSGgdYS26mPf7qNi+dCisbhiyDnrN1zaRbw3CSuc2wGOMEGGPsp46PdRG5gqXwgtJfjxDkxRNAgRPr1B77vQ==", "integrity": "sha512-vlcSGgdYS26mPf7qNi+dCisbhiyDnrN1zaRbw3CSuc2wGOMEGGPsp46PdRG5gqXwgtJfjxDkxRNAgRPr1B77vQ=="
"license": "MIT"
}, },
"node_modules/delayed-stream": { "node_modules/delayed-stream": {
"version": "1.0.0", "version": "1.0.0",
@@ -651,7 +650,6 @@
"version": "0.3.0", "version": "0.3.0",
"resolved": "https://registry.npmjs.org/find/-/find-0.3.0.tgz", "resolved": "https://registry.npmjs.org/find/-/find-0.3.0.tgz",
"integrity": "sha512-iSd+O4OEYV/I36Zl8MdYJO0xD82wH528SaCieTVHhclgiYNe9y+yPKSwK+A7/WsmHL1EZ+pYUJBXWTL5qofksw==", "integrity": "sha512-iSd+O4OEYV/I36Zl8MdYJO0xD82wH528SaCieTVHhclgiYNe9y+yPKSwK+A7/WsmHL1EZ+pYUJBXWTL5qofksw==",
"license": "MIT",
"dependencies": { "dependencies": {
"traverse-chain": "~0.1.0" "traverse-chain": "~0.1.0"
} }
@@ -696,7 +694,6 @@
"version": "11.3.0", "version": "11.3.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz",
"integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==", "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==",
"license": "MIT",
"dependencies": { "dependencies": {
"graceful-fs": "^4.2.0", "graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1", "jsonfile": "^6.0.1",
@@ -781,14 +778,12 @@
"node_modules/graceful-fs": { "node_modules/graceful-fs": {
"version": "4.2.11", "version": "4.2.11",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="
"license": "ISC"
}, },
"node_modules/has-flag": { "node_modules/has-flag": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"license": "MIT",
"engines": { "engines": {
"node": ">=8" "node": ">=8"
} }
@@ -866,7 +861,6 @@
"version": "6.2.0", "version": "6.2.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz",
"integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==",
"license": "MIT",
"dependencies": { "dependencies": {
"universalify": "^2.0.0" "universalify": "^2.0.0"
}, },
@@ -877,14 +871,12 @@
"node_modules/jwt-decode": { "node_modules/jwt-decode": {
"version": "3.1.2", "version": "3.1.2",
"resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-3.1.2.tgz", "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-3.1.2.tgz",
"integrity": "sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A==", "integrity": "sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A=="
"license": "MIT"
}, },
"node_modules/kleur": { "node_modules/kleur": {
"version": "3.0.3", "version": "3.0.3",
"resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",
"integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==",
"license": "MIT",
"engines": { "engines": {
"node": ">=6" "node": ">=6"
} }
@@ -1141,33 +1133,28 @@
"node_modules/lodash.escaperegexp": { "node_modules/lodash.escaperegexp": {
"version": "4.1.2", "version": "4.1.2",
"resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz",
"integrity": "sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw==", "integrity": "sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw=="
"license": "MIT"
}, },
"node_modules/lodash.isboolean": { "node_modules/lodash.isboolean": {
"version": "3.0.3", "version": "3.0.3",
"resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",
"integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==", "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg=="
"license": "MIT"
}, },
"node_modules/lodash.isequal": { "node_modules/lodash.isequal": {
"version": "4.5.0", "version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
"integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==",
"deprecated": "This package is deprecated. Use require('node:util').isDeepStrictEqual instead.", "deprecated": "This package is deprecated. Use require('node:util').isDeepStrictEqual instead."
"license": "MIT"
}, },
"node_modules/lodash.isfunction": { "node_modules/lodash.isfunction": {
"version": "3.0.9", "version": "3.0.9",
"resolved": "https://registry.npmjs.org/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz", "resolved": "https://registry.npmjs.org/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz",
"integrity": "sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==", "integrity": "sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw=="
"license": "MIT"
}, },
"node_modules/lodash.isnil": { "node_modules/lodash.isnil": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/lodash.isnil/-/lodash.isnil-4.0.0.tgz", "resolved": "https://registry.npmjs.org/lodash.isnil/-/lodash.isnil-4.0.0.tgz",
"integrity": "sha512-up2Mzq3545mwVnMhTDMdfoG1OurpA/s5t88JmQX809eH3C8491iu2sfKhTfhQtKY78oPNhiaHJUpT/dUDAAtng==", "integrity": "sha512-up2Mzq3545mwVnMhTDMdfoG1OurpA/s5t88JmQX809eH3C8491iu2sfKhTfhQtKY78oPNhiaHJUpT/dUDAAtng=="
"license": "MIT"
}, },
"node_modules/math-intrinsics": { "node_modules/math-intrinsics": {
"version": "1.1.0", "version": "1.1.0",
@@ -1267,7 +1254,6 @@
"version": "2.4.1", "version": "2.4.1",
"resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.1.tgz", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.1.tgz",
"integrity": "sha512-EQyfIuO2hPDsX1L/blblV+H7I0knhgAd82cVneCwcdND9B8AuCDuRcBH6yIcG4dFzlOUqbazQqwGjx5xmsNLuQ==", "integrity": "sha512-EQyfIuO2hPDsX1L/blblV+H7I0knhgAd82cVneCwcdND9B8AuCDuRcBH6yIcG4dFzlOUqbazQqwGjx5xmsNLuQ==",
"license": "MIT",
"dependencies": { "dependencies": {
"kleur": "^3.0.3", "kleur": "^3.0.3",
"sisteransi": "^1.0.5" "sisteransi": "^1.0.5"
@@ -1350,8 +1336,7 @@
"node_modules/sisteransi": { "node_modules/sisteransi": {
"version": "1.0.5", "version": "1.0.5",
"resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",
"integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg=="
"license": "MIT"
}, },
"node_modules/source-map-js": { "node_modules/source-map-js": {
"version": "1.2.1", "version": "1.2.1",
@@ -1366,7 +1351,6 @@
"version": "7.2.0", "version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"license": "MIT",
"dependencies": { "dependencies": {
"has-flag": "^4.0.0" "has-flag": "^4.0.0"
}, },
@@ -1417,8 +1401,7 @@
"node_modules/traverse-chain": { "node_modules/traverse-chain": {
"version": "0.1.0", "version": "0.1.0",
"resolved": "https://registry.npmjs.org/traverse-chain/-/traverse-chain-0.1.0.tgz", "resolved": "https://registry.npmjs.org/traverse-chain/-/traverse-chain-0.1.0.tgz",
"integrity": "sha512-up6Yvai4PYKhpNp5PkYtx50m3KbwQrqDwbuZP/ItyL64YEWHAvH6Md83LFLV/GRSk/BoUVwwgUzX6SOQSbsfAg==", "integrity": "sha512-up6Yvai4PYKhpNp5PkYtx50m3KbwQrqDwbuZP/ItyL64YEWHAvH6Md83LFLV/GRSk/BoUVwwgUzX6SOQSbsfAg=="
"license": "MIT"
}, },
"node_modules/tslib": { "node_modules/tslib": {
"version": "2.8.1", "version": "2.8.1",
@@ -1450,7 +1433,6 @@
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
"integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",
"license": "MIT",
"engines": { "engines": {
"node": ">= 10.0.0" "node": ">= 10.0.0"
} }
@@ -1731,12 +1713,12 @@
"dev": true "dev": true
}, },
"@sasjs/adapter": { "@sasjs/adapter": {
"version": "4.14.0", "version": "4.16.3",
"resolved": "https://registry.npmjs.org/@sasjs/adapter/-/adapter-4.14.0.tgz", "resolved": "https://registry.npmjs.org/@sasjs/adapter/-/adapter-4.16.3.tgz",
"integrity": "sha512-kLjThuLayOr35A+MloXx4Z2tqjui48vHYmVXXmqiFe26Wal6i2jflzhVN5+srmYlGzJX+G0SN78kYTKfvr3lcA==", "integrity": "sha512-xcoZT9qZhF6pXvXx4bHxbmauLdEHng8pSlTK4F6asUkHNR5uzeSvY6znA1yJqK+8FFtsVILyvMQyGyhWw6WsOA==",
"requires": { "requires": {
"@sasjs/utils": "3.5.2", "@sasjs/utils": "3.5.6",
"axios": "1.12.2", "axios": "^1.13.5",
"axios-cookiejar-support": "5.0.5", "axios-cookiejar-support": "5.0.5",
"form-data": "4.0.4", "form-data": "4.0.4",
"https": "1.0.0", "https": "1.0.0",
@@ -1744,9 +1726,9 @@
} }
}, },
"@sasjs/utils": { "@sasjs/utils": {
"version": "3.5.2", "version": "3.5.6",
"resolved": "https://registry.npmjs.org/@sasjs/utils/-/utils-3.5.2.tgz", "resolved": "https://registry.npmjs.org/@sasjs/utils/-/utils-3.5.6.tgz",
"integrity": "sha512-LBpBDx0T7G/eO15Gb+r3DR1LfBnoqagWT3HiHabojFziA4ej4ePORo8chrk0zHLIzrjI2ljAnDabyJEwC5KtIA==", "integrity": "sha512-jx8zWSOysDD66vTjA0BWiZ8bcFqmqh8F+56fUCgLmJhm89eDbKrGF3mDKMQx3UE7d2+gxp9xYhJCdaBWz0Dlxw==",
"requires": { "requires": {
"@fast-csv/format": "4.3.5", "@fast-csv/format": "4.3.5",
"@types/fs-extra": "11.0.4", "@types/fs-extra": "11.0.4",
@@ -1823,13 +1805,27 @@
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
}, },
"axios": { "axios": {
"version": "1.12.2", "version": "1.13.5",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.12.2.tgz", "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.5.tgz",
"integrity": "sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==", "integrity": "sha512-cz4ur7Vb0xS4/KUN0tPWe44eqxrIu31me+fbang3ijiNscE129POzipJJA6zniq2C/Z6sJCjMimjS8Lc/GAs8Q==",
"requires": { "requires": {
"follow-redirects": "^1.15.6", "follow-redirects": "^1.15.11",
"form-data": "^4.0.4", "form-data": "^4.0.5",
"proxy-from-env": "^1.1.0" "proxy-from-env": "^1.1.0"
},
"dependencies": {
"form-data": {
"version": "4.0.5",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz",
"integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"es-set-tostringtag": "^2.1.0",
"hasown": "^2.0.2",
"mime-types": "^2.1.12"
}
}
} }
}, },
"axios-cookiejar-support": { "axios-cookiejar-support": {
+1 -1
View File
@@ -20,6 +20,6 @@
"vite": "npm:rolldown-vite@7.2.2" "vite": "npm:rolldown-vite@7.2.2"
}, },
"dependencies": { "dependencies": {
"@sasjs/adapter": "^4.14.0" "@sasjs/adapter": "^4.16.3"
} }
} }
+153 -9
View File
@@ -35,6 +35,60 @@ interface JobExecutionResult {
log?: string log?: string
error?: object error?: object
} }
/* Viya /types/types?limit=999999 response structure */
interface IViyaTypesResponse {
accept: string
count: number
items: IViyaTypesItem[]
limit: number
links: IViyaTypesLink[]
name: string
start: number
version: number
}
/* Item element within the Viya types response */
interface IViyaTypesItem {
description?: string
extensions?: string[]
iconUri?: string
label: string
links: IViyaTypesLink[]
mappedTypes?: string[]
mediaType?: string
mediaTypes?: string[]
name?: string | undefined
pluralLabel?: string
properties?: IViyaTypesProperties
resourceUri?: string
serviceRootUri?: string
tags?: string[]
version: number
}
/**
* Generic structure for a link
* in the links array of a Viya
* types/types api response
*/
type IViyaTypesLink = Record<string, string>
/**
* Generic structure for a type's
* 'properties' object from the Viya
* types/types api response
*/
type IViyaTypesProperties = Record<string, string>
/**
* Arbitrary interface for storing
* sufficient additional detail to
* create and patch a new file.
*/
interface IViyaTypesExtensionInfo {
typeDefName: string | undefined
properties: IViyaTypesProperties | undefined
}
/** /**
* A client for interfacing with the SAS Viya REST API. * A client for interfacing with the SAS Viya REST API.
@@ -61,6 +115,9 @@ export class SASViyaApiClient {
this.requestClient this.requestClient
) )
private folderMap = new Map<string, Job[]>() private folderMap = new Map<string, Job[]>()
private fileExtensionMap = new Map<string, IViyaTypesExtensionInfo>()
private boolExtensionMap = false // required in case the map has zero entries
// after an attempt to populate it.
/** /**
* A helper method used to call appendRequest method of RequestClient * A helper method used to call appendRequest method of RequestClient
@@ -434,15 +491,102 @@ export class SASViyaApiClient {
const formData = new NodeFormData() const formData = new NodeFormData()
formData.append('file', contentBuffer, fileName) formData.append('file', contentBuffer, fileName)
return ( /** Query Viya for file metadata based on extension type. */
await this.requestClient.post<File>(
`/files/files?parentFolderUri=${parentFolderUri}&typeDefName=file#rawUpload`, // typeDefName - Viya accepts this property during the file creation
formData, let typeDefName: string | undefined = undefined
accessToken, // Additional properties are supplied by a patch.
'multipart/form-data; boundary=' + (formData as any)._boundary, let filePatch:
headers | {
) name: string
).result properties: IViyaTypesProperties | undefined
}
| undefined = undefined
// The patching process requires properties related to the file-extension
const fileExtension: string | undefined = fileName
.split('.')
.pop()
?.toLowerCase()
if (fileExtension) {
if (!this.boolExtensionMap) {
// Populate the file extension map
// 1. Get Viya's response to this api call
const typesQueryUrl = `/types/types?limit=999999`
const response = (
await this.requestClient.get(typesQueryUrl, accessToken)
).result as IViyaTypesResponse
// 2. Filter the returned items that have file extensions into a map
// using forEach as an item may relate to multiple file extensions.
response.items
.filter((e) => e.extensions)
.forEach((e) => {
e.extensions?.forEach((ext) => {
this.fileExtensionMap.set(ext, {
// `name` becomes the typeDefName value at file creation time.
// `name` is ignored here if it is not populated in the map, or
// has a blank/empty value.
typeDefName: e.name
? e.name.trim().length
? e.name.trim()
: undefined
: undefined,
properties: e.properties
})
})
})
// 3. Toggle the flag to avoid repeating this step
this.boolExtensionMap = true
}
// Query the map for the current file extension
const fileExtInfo = this.fileExtensionMap.get(fileExtension)
if (fileExtInfo) {
// If the extension was found in the map, record the typeDefName and
// create a patch if a properties object was returned.
typeDefName = fileExtInfo.typeDefName
if (fileExtInfo.properties)
filePatch = { name: fileName, properties: fileExtInfo.properties }
}
}
// Create the file
const createFileResponse = await this.requestClient.post<File>(
`/files/files?parentFolderUri=${parentFolderUri}&typeDefName=${
typeDefName ?? 'file'
}#rawUpload`,
formData,
accessToken,
'multipart/form-data; boundary=' + (formData as any)._boundary,
headers
)
// If a patch was created...
if (filePatch) {
try {
const patchHeaders = {
Accept: 'application/json',
'If-Match': '*'
}
// Get the URI of the newly created file
const fileUri = createFileResponse.result.links.filter(
(e) => e.method == 'PATCH' && e.rel == 'patch'
)[0].uri
// and apply the patch
return (
await this.requestClient.patch<File>(
`${fileUri}`,
filePatch,
accessToken,
patchHeaders
)
).result
} catch (e: any) {
throw new Error(`Error patching file ${fileName}.\n${e.message}`)
}
}
return createFileResponse.result
} }
/** /**
+4 -6
View File
@@ -97,12 +97,10 @@ export class WebJobExecutor extends BaseJobExecutor {
apiUrl = apiUrl.replace('_program=', '__program=') apiUrl = apiUrl.replace('_program=', '__program=')
} }
// if context name exists and is not blank string // Append context name to URL if provided and non-empty
// then add _contextname variable in apiUrl apiUrl += config.contextName?.trim()
apiUrl += ? `&_contextname=${encodeURIComponent(config.contextName)}`
config.contextName && !/\s/.test(config.contextName) : ''
? `&_contextname=${config.contextName}`
: ''
} }
let requestParams = { let requestParams = {
+6 -2
View File
@@ -273,9 +273,13 @@ export class RequestClient implements HttpClient {
public async patch<T>( public async patch<T>(
url: string, url: string,
data: any = {}, data: any = {},
accessToken?: string accessToken?: string,
overrideHeaders: { [key: string]: string | number } = {}
): Promise<{ result: T; etag: string }> { ): Promise<{ result: T; etag: string }> {
const headers = this.getHeaders(accessToken, 'application/json') const headers = {
...this.getHeaders(accessToken, 'application/json'),
...overrideHeaders
}
return this.httpClient return this.httpClient
.patch<T>(url, data, { headers, withXSRFToken: true }) .patch<T>(url, data, { headers, withXSRFToken: true })