Skip to content

Commit

Permalink
feat(javascript-sdk): handle-device-name-in-response
Browse files Browse the repository at this point in the history
handle the device name of a security key by parsing the response and returning the name thats in the
html string
  • Loading branch information
ryanbas21 committed Jan 31, 2024
1 parent 4a7b7bc commit 0df306a
Show file tree
Hide file tree
Showing 12 changed files with 521 additions and 160 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ jobs:
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Setup custom host for sdkapp.example.com
run: sudo echo "127.0.0.1 sdkapp.example.com auth.example.com api.example.com user.example.com" | sudo tee -a /etc/hosts
run: |
sudo echo "127.0.0.1 localhost sdkapp.example.com auth.example.com api.example.com user.example.com" | sudo tee -a /etc/hosts
- name: npm install
# if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
Expand All @@ -41,12 +43,15 @@ jobs:
- run: npx nx affected --t lint --parallel --max-parallel=3
- run: npx nx affected --t test --parallel --max-parallel=3
- run: npx nx affected --t test --configuration=integration
- run: npx nx affected --t e2e --parallel 1 --exclude token-vault-suites
# It's important that we always run this step, otherwise in the case of any failures in preceding non-Nx steps, the agents will keep running and waste billable minutes
- name: Stop All Agents
if: ${{ always() }}
run: npx nx-cloud stop-all-agents

- name: e2e
run: npm run nx e2e autoscript-suites
env:
NX_CLOUD_DISTRIBUTED_EXECUTION: false
- name: 'Artifacts'
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -92,6 +97,7 @@ jobs:
- run: npm install @nrwl/nx-cloud
- name: Setup custom host for sdkapp.example.com
run: sudo echo "127.0.0.1 sdkapp.example.com auth.example.com api.example.com user.example.com" | sudo tee -a /etc/hosts
- run: sudo echo "::1 sdkapp.example.com auth.example.com api.example.com user.example.com" | sudo tee -a /etc/hosts
- run: npx playwright install chromium firefox webkit
- name: Start Nx Agent ${{ matrix.agent }}
run: npx nx-cloud start-agent
6 changes: 1 addition & 5 deletions .verdaccio/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,9 @@ uplinks:
maxage: 60m

packages:
'@forgerock/*':
access: $all
publish: $authenticated

'**':
access: $all
publish: $authenticated
publish: $all

# if package is not available locally, proxy requests to npm registry
proxy: npmjs
Expand Down
5 changes: 4 additions & 1 deletion e2e/autoscript-suites/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@
"bugs": {
"url": "https://github.com/ForgeRock/forgerock-javascript-sdk/issues"
},
"homepage": "https://github.com/ForgeRock/forgerock-javascript-sdk#readme"
"homepage": "https://github.com/ForgeRock/forgerock-javascript-sdk#readme",
"nx": {
"includedScripts": []
}
}
1 change: 1 addition & 0 deletions e2e/autoscript-suites/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"noImplicitAny": false
},
"include": [
"playwright.config.ts",
"utilities/*",
"suites/*",
"**/*.test.ts",
Expand Down
5 changes: 4 additions & 1 deletion e2e/mock-api/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/

import * as dns from 'dns';
import cors from 'cors';
import express from 'express';
import cookieParser from 'cookie-parser';
Expand All @@ -21,7 +21,10 @@ import { MOCK_PORT } from './app/env.config';
import authRoutes from './app/routes.auth';
import resourceRoutes from './app/routes.resource';

dns.setDefaultResultOrder('ipv4first');

const app = express();

app.use(express.json());
app.use('/am/XUI/images', express.static(path.join(__dirname, 'public')));
app.use(cookieParser());
Expand Down
Loading

0 comments on commit 0df306a

Please sign in to comment.