diff --git a/commitlint.config.js b/commitlint.config.js index c98a9af9275..0d71fd78c1b 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -1,18 +1,21 @@ /* - * Copyright (c) 2025 Ping Identity Corporation. All rights reserved. + * Copyright (c) 2025 - 2026 Ping Identity Corporation. All rights reserved. * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. */ -const fs = require('fs'); -const path = require('path'); +import fs from 'fs'; +import path from 'path'; +import { fileURLToPath } from 'url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); const packages = fs.readdirSync(path.resolve(__dirname, 'packages')); const e2e = fs.readdirSync(path.resolve(__dirname, 'e2e')); /* commitlint.config.js | .commitlintrc.js @type {import('cz-git').UserConfig} */ -module.exports = { +export default { extends: ['@commitlint/config-conventional'], prompt: { alias: { fd: 'docs: fix typos' }, diff --git a/package.json b/package.json index 3d5ac1e0018..160bd96059c 100644 --- a/package.json +++ b/package.json @@ -1,4 +1,5 @@ { + "type": "module", "name": "ping-javascript-sdk", "version": "0.0.0", "private": true, @@ -22,9 +23,9 @@ "circular-dep-check": "madge --circular .", "clean": "shx rm -rf ./{coverage,dist,docs,node_modules,tmp}/ ./{packages,e2e}/*/{dist,node_modules}/ ./e2e/node_modules/ && git clean -fX -e \"!.env*,nx-cloud.env\"", "commit": "git cz", + "commitlint": "commitlint --edit", "copyright:check": "node tools/copyright/sync-header-years.mjs --check", "copyright:sync": "node tools/copyright/sync-header-years.mjs --fix", - "commitlint": "commitlint --edit", "create-package": "nx g @nx/js:library", "format": "pnpm nx format:write", "generate-docs": "typedoc", @@ -37,8 +38,8 @@ "nx": "nx", "prepare": "lefthook install", "serve": "nx serve", - "syncpack:lint": "syncpack lint --source 'package.json' --source 'packages/*/package.json' --source 'packages/sdk-effects/*/package.json' --source 'packages/utils/*/package.json' --source 'e2e/*/package.json' --source 'tools/*/package.json' --source 'scratchpad/package.json'", "syncpack:fix": "syncpack fix --source 'package.json' --source 'packages/*/package.json' --source 'packages/sdk-effects/*/package.json' --source 'packages/utils/*/package.json' --source 'e2e/*/package.json' --source 'tools/*/package.json' --source 'scratchpad/package.json'", + "syncpack:lint": "syncpack lint --source 'package.json' --source 'packages/*/package.json' --source 'packages/sdk-effects/*/package.json' --source 'packages/utils/*/package.json' --source 'e2e/*/package.json' --source 'tools/*/package.json' --source 'scratchpad/package.json'", "test": "CI=true nx affected:test", "test:e2e": "CI=true nx affected:e2e", "verdaccio": "nx local-registry", diff --git a/packages/davinci-client/api-report/davinci-client.fido.api.md b/packages/davinci-client/api-report/davinci-client.fido.api.md new file mode 100644 index 00000000000..ed3b8b1b5f9 --- /dev/null +++ b/packages/davinci-client/api-report/davinci-client.fido.api.md @@ -0,0 +1,94 @@ +## API Report File for "@forgerock/davinci-client" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import type { GenericError } from '@forgerock/sdk-types'; + +// @public (undocumented) +export interface AssertionValue extends Omit { + // (undocumented) + rawId: string; + // (undocumented) + response: { + clientDataJSON: string; + authenticatorData: string; + signature: string; + userHandle: string | null; + }; +} + +// @public (undocumented) +export interface AttestationValue extends Omit { + // (undocumented) + rawId: string; + // (undocumented) + response: { + clientDataJSON: string; + attestationObject: string; + }; +} + +// @public +export function fido(): FidoClient; + +// @public (undocumented) +export interface FidoAuthenticationInputValue { + // (undocumented) + assertionValue?: AssertionValue; +} + +// @public (undocumented) +export interface FidoAuthenticationOptions extends Omit { + // (undocumented) + allowCredentials?: { + id: number[]; + transports?: AuthenticatorTransport[]; + type: PublicKeyCredentialType; + }[]; + // (undocumented) + challenge: number[]; +} + +// @public (undocumented) +export interface FidoClient { + authenticate: (options: FidoAuthenticationOptions) => Promise; + register: (options: FidoRegistrationOptions) => Promise; +} + +// @public +export type FidoErrorCode = 'NotAllowedError' | 'AbortError' | 'InvalidStateError' | 'NotSupportedError' | 'SecurityError' | 'TimeoutError' | 'UnknownError'; + +// @public (undocumented) +export interface FidoRegistrationInputValue { + // (undocumented) + attestationValue?: AttestationValue; +} + +// @public (undocumented) +export interface FidoRegistrationOptions extends Omit { + // (undocumented) + challenge: number[]; + // (undocumented) + excludeCredentials?: { + id: number[]; + transports?: AuthenticatorTransport[]; + type: PublicKeyCredentialType; + }[]; + // (undocumented) + pubKeyCredParams: { + alg: string | number; + type: PublicKeyCredentialType; + }[]; + // (undocumented) + user: { + id: number[]; + name: string; + displayName: string; + }; +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/packages/davinci-client/package.json b/packages/davinci-client/package.json index 1d6e1bd1bbd..b6358ea4c63 100644 --- a/packages/davinci-client/package.json +++ b/packages/davinci-client/package.json @@ -13,6 +13,7 @@ "type": "module", "exports": { ".": "./dist/src/index.js", + "./fido": "./dist/src/lib/fido/index.js", "./types": "./dist/src/types.d.ts" }, "main": "./dist/src/index.js", diff --git a/packages/davinci-client/src/index.ts b/packages/davinci-client/src/index.ts index 9fee20f3835..256aca5299b 100644 --- a/packages/davinci-client/src/index.ts +++ b/packages/davinci-client/src/index.ts @@ -1,11 +1,11 @@ /* - * Copyright (c) 2025 Ping Identity Corporation. All rights reserved. + * Copyright (c) 2025 - 2026 Ping Identity Corporation. All rights reserved. * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. */ -import { fido } from './lib/fido/fido.js'; -// davinci is re-exported via types.ts -export { fido }; +export { davinci } from './lib/client.store.js'; +export { fido } from './lib/fido/fido.js'; + export * from './types.js'; diff --git a/packages/davinci-client/src/lib/fido/fido.types.ts b/packages/davinci-client/src/lib/fido/fido.types.ts index df882f0a942..931386779a1 100644 --- a/packages/davinci-client/src/lib/fido/fido.types.ts +++ b/packages/davinci-client/src/lib/fido/fido.types.ts @@ -46,3 +46,8 @@ export type FidoErrorCode = | 'SecurityError' | 'TimeoutError' | 'UnknownError'; + +// Re-export necessary FIDO types for package.json `./fido` entry point +export type { FidoRegistrationInputValue, FidoAuthenticationInputValue }; +export type { FidoRegistrationOptions, FidoAuthenticationOptions }; +export type { AttestationValue, AssertionValue } from '../collector.types.js'; diff --git a/packages/davinci-client/src/lib/fido/index.ts b/packages/davinci-client/src/lib/fido/index.ts new file mode 100644 index 00000000000..8046627cb8e --- /dev/null +++ b/packages/davinci-client/src/lib/fido/index.ts @@ -0,0 +1,10 @@ +/* + * Copyright (c) 2026 Ping Identity Corporation. All rights reserved. + * + * This software may be modified and distributed under the terms + * of the MIT license. See the LICENSE file for details. + */ + +// Re-export FIDO module and types for package.json `./fido` entry point +export { fido } from './fido.js'; +export * from './fido.types.js'; diff --git a/packages/device-client/src/index.ts b/packages/device-client/src/index.ts index e2a7dc35678..32438eaa5f0 100644 --- a/packages/device-client/src/index.ts +++ b/packages/device-client/src/index.ts @@ -1,8 +1,8 @@ /* - * Copyright (c) 2025 Ping Identity Corporation. All rights reserved. + * Copyright (c) 2025 - 2026 Ping Identity Corporation. All rights reserved. * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. */ -// deviceClient is re-exported via types.js +export { deviceClient } from './lib/device.store.js'; export * from './types.js'; diff --git a/packages/oidc-client/src/index.ts b/packages/oidc-client/src/index.ts index 97b15449147..a7694f3c850 100644 --- a/packages/oidc-client/src/index.ts +++ b/packages/oidc-client/src/index.ts @@ -1,8 +1,8 @@ /* - * Copyright (c) 2025 Ping Identity Corporation. All rights reserved. + * Copyright (c) 2025 - 2026 Ping Identity Corporation. All rights reserved. * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. */ -// oidc and createClientStore are re-exported via types.js +export { oidc } from './lib/client.store.js'; export * from './types.js';