Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/clever-garlics-listen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@forgerock/oidc-client': patch
---

adds token-store module to newly created oidc-client for generic oidc interactions.
41 changes: 41 additions & 0 deletions .github/instructions/nx.instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
applyTo: '**'
---

// This file is automatically generated by Nx Console

You are in an nx workspace using Nx 21.0.3 and pnpm as the package manager.

You have access to the Nx MCP server and the tools it provides. Use them. Follow these guidelines in order to best help the user:

# General Guidelines

- When answering questions, use the nx_workspace tool first to gain an understanding of the workspace architecture
- For questions around nx configuration, best practices or if you're unsure, use the nx_docs tool to get relevant, up-to-date docs!! Always use this instead of assuming things about nx configuration
- If the user needs help with an Nx configuration or project graph error, use the 'nx_workspace' tool to get any errors
- To help answer questions about the workspace structure or simply help with demonstrating how tasks depend on each other, use the 'nx_visualize_graph' tool

# Generation Guidelines

If the user wants to generate something, use the following flow:

- learn about the nx workspace and any specifics the user needs by using the 'nx_workspace' tool and the 'nx_project_details' tool if applicable
- get the available generators using the 'nx_generators' tool
- decide which generator to use. If no generators seem relevant, check the 'nx_available_plugins' tool to see if the user could install a plugin to help them
- get generator details using the 'nx_generator_schema' tool
- you may use the 'nx_docs' tool to learn more about a specific generator or technology if you're unsure
- decide which options to provide in order to best complete the user's request. Don't make any assumptions and keep the options minimalistic
- open the generator UI using the 'nx_open_generate_ui' tool
- wait for the user to finish the generator
- read the generator log file using the 'nx_read_generator_log' tool
- use the information provided in the log file to answer the user's question or continue with what they were doing
undefined

# CI Error Guidelines

If the user wants help with fixing an error in their CI pipeline, use the following flow:

- Retrieve the list of current CI Pipeline Executions (CIPEs) using the 'nx_cloud_cipe_details' tool
- If there are any errors, use the 'nx_cloud_fix_cipe_failure' tool to retrieve the logs for a specific task
- Use the task logs to see what's wrong and help the user fix their problem. Use the appropriate tools if necessary
- Make sure that the problem is fixed by running the task that you passed into the 'nx_cloud_fix_cipe_failure' tool
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,5 @@ packages/davinci-client/src/lib/mock-data/*.d.ts
packages/davinci-client/src/lib/mock-data/*.d.ts.map
**/**/tsconfig.tsbuildinfo
**/**/tsconfig.spec.vitest-temp.json

test-output
3 changes: 3 additions & 0 deletions e2e/oidc-app/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@nx/js/babel"]
}
8 changes: 8 additions & 0 deletions e2e/oidc-app/.swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"jsc": {
"parser": {
"syntax": "typescript"
},
"target": "es2016"
}
}
24 changes: 24 additions & 0 deletions e2e/oidc-app/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import baseConfig from '../../eslint.config.mjs';

export default [
{
ignores: [
'node_modules',
'*.md',
'LICENSE',
'.swcrc',
'.babelrc',
'.env*',
'.bin',
'dist',
'.eslintignore',
'*.html',
'*.svg',
'*.css',
'public',
'*.json',
'*.d.ts',
],
},
...baseConfig,
];
16 changes: 16 additions & 0 deletions e2e/oidc-app/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>OidcApp</title>
<base href="/" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<link rel="stylesheet" href="/src/styles.css" />
</head>
<body>
<h1>Welcome</h1>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
17 changes: 17 additions & 0 deletions e2e/oidc-app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "@forgeorck/oidc-app",
"version": "0.0.1",
"private": true,
"scripts": {
"build": "pnpm nx nxBuild",
"lint": "pnpm nx nxLint",
"preview": "pnpm nx nxPreview",
"serve": "pnpm nx nxServe"
},
"dependencies": {
"@forgerock/oidc-client": "workspace:*"
},
"nx": {
"tags": ["scope:app"]
}
}
Binary file added e2e/oidc-app/public/favicon.ico
Binary file not shown.
Empty file.
1 change: 1 addition & 0 deletions e2e/oidc-app/src/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log('Starting OIDC App...');
1 change: 1 addition & 0 deletions e2e/oidc-app/src/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* You can add global styles to this file, and also import other style files */
26 changes: 26 additions & 0 deletions e2e/oidc-app/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "dist",
"types": ["node"],
"rootDir": "src",
"module": "esnext",
"moduleResolution": "bundler",
"tsBuildInfoFile": "dist/tsconfig.app.tsbuildinfo"
},
"exclude": [
"out-tsc",
"dist",
"src/**/*.spec.ts",
"src/**/*.test.ts",
"eslint.config.js",
"eslint.config.cjs",
"eslint.config.mjs"
],
"include": ["src/**/*.ts"],
"references": [
{
"path": "../../packages/oidc-client/tsconfig.lib.json"
}
]
}
13 changes: 13 additions & 0 deletions e2e/oidc-app/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "../../tsconfig.base.json",
"files": [],
"include": [],
"references": [
{
"path": "../../packages/oidc-client"
},
{
"path": "./tsconfig.app.json"
}
]
}
28 changes: 28 additions & 0 deletions e2e/oidc-app/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/// <reference types='vitest' />
import { defineConfig } from 'vite';

export default defineConfig(() => ({
root: __dirname,
cacheDir: '../../node_modules/.vite/e2e/oidc-app',
server: {
port: 8443,
host: 'localhost',
},
preview: {
port: 8443,
host: 'localhost',
},
plugins: [],
// Uncomment this if you are using workers.
// worker: {
// plugins: [ nxViteTsPaths() ],
// },
build: {
outDir: './dist',
emptyOutDir: true,
reportCompressedSize: true,
commonjsOptions: {
transformMixedEsModules: true,
},
},
}));
12 changes: 12 additions & 0 deletions e2e/oidc-suites/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import playwright from 'eslint-plugin-playwright';
import baseConfig from '../../eslint.config.mjs';

export default [
playwright.configs['flat/recommended'],
...baseConfig,
{
files: ['**/*.ts', '**/*.js'],
// Override or add rules here
rules: {},
},
];
8 changes: 8 additions & 0 deletions e2e/oidc-suites/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "@forgerock/oidc-suites",
"version": "0.0.1",
"private": true,
"nx": {
"implicitDependencies": ["oidc-suites"]
}
}
68 changes: 68 additions & 0 deletions e2e/oidc-suites/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import { defineConfig, devices } from '@playwright/test';
import { nxE2EPreset } from '@nx/playwright/preset';
import { workspaceRoot } from '@nx/devkit';

// For CI, you may want to set BASE_URL to the deployed application.
const baseURL = process.env['BASE_URL'] || 'http://localhost:8443';

/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
// require('dotenv').config();

/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
...nxE2EPreset(__filename, { testDir: './src' }),
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
baseURL,
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
},
/* Run your local dev server before starting the tests */
webServer: {
command: 'pnpm exec nx run oidc-app:serve',
url: 'http://localhost:8443',
reuseExistingServer: true,
cwd: workspaceRoot,
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},

{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},

{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
},

// Uncomment for mobile browsers support
/* {
name: 'Mobile Chrome',
use: { ...devices['Pixel 5'] },
},
{
name: 'Mobile Safari',
use: { ...devices['iPhone 12'] },
}, */

// Uncomment for branded browsers
/* {
name: 'Microsoft Edge',
use: { ...devices['Desktop Edge'], channel: 'msedge' },
},
{
name: 'Google Chrome',
use: { ...devices['Desktop Chrome'], channel: 'chrome' },
} */
],
});
8 changes: 8 additions & 0 deletions e2e/oidc-suites/src/example.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { test, expect } from '@playwright/test';

test('has title', async ({ page }) => {
await page.goto('/');

// Expect h1 to contain a substring.
expect(await page.locator('h1').innerText()).toContain('Welcome');
});
25 changes: 25 additions & 0 deletions e2e/oidc-suites/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"allowJs": true,
"outDir": "out-tsc/playwright",
"sourceMap": false
},
"include": [
"**/*.ts",
"**/*.js",
"playwright.config.ts",
"src/**/*.spec.ts",
"src/**/*.spec.js",
"src/**/*.test.ts",
"src/**/*.test.js",
"src/**/*.d.ts"
],
"exclude": [
"out-tsc",
"test-output",
"eslint.config.js",
"eslint.config.mjs",
"eslint.config.cjs"
]
}
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default [
'**/vite.config.*.timestamp*',
'**/vitest.config.*.timestamp*',
'**/out-tsc',
'**/test-output',
],
},
...compat.extends('plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'),
Expand Down
47 changes: 47 additions & 0 deletions migrations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"migrations": [
{
"version": "21.0.0-beta.8",
"description": "Removes the legacy cache configuration from nx.json",
"implementation": "./src/migrations/update-21-0-0/remove-legacy-cache",
"package": "nx",
"name": "remove-legacy-cache"
},
{
"version": "21.0.0-beta.8",
"description": "Removes the legacy cache configuration from nx.json",
"implementation": "./src/migrations/update-21-0-0/remove-custom-tasks-runner",
"package": "nx",
"name": "remove-custom-tasks-runner"
},
{
"version": "21.0.0-beta.11",
"description": "Updates release version config based on the breaking changes in Nx v21",
"implementation": "./src/migrations/update-21-0-0/release-version-config-changes",
"package": "nx",
"name": "release-version-config-changes"
},
{
"version": "21.0.0-beta.11",
"description": "Updates release changelog config based on the breaking changes in Nx v21",
"implementation": "./src/migrations/update-21-0-0/release-changelog-config-changes",
"package": "nx",
"name": "release-changelog-config-changes"
},
{
"cli": "nx",
"version": "21.0.0-beta.9",
"description": "Replace usage of `getJestProjects` with `getJestProjectsAsync`.",
"implementation": "./src/migrations/update-21-0-0/replace-getJestProjects-with-getJestProjectsAsync",
"package": "@nx/jest",
"name": "replace-getJestProjects-with-getJestProjectsAsync-v21"
},
{
"version": "21.0.0-beta.10",
"description": "Remove the previously deprecated and unused `tsConfig` option from the `@nx/jest:jest` executor.",
"implementation": "./src/migrations/update-21-0-0/remove-tsconfig-option-from-jest-executor",
"package": "@nx/jest",
"name": "remove-tsconfig-option-from-jest-executor"
}
]
}
Loading
Loading