Skip to content

Commit ab2f0c4

Browse files
committed
feat(sdk-utilities): add sdk-utilities package
1 parent f60d4cd commit ab2f0c4

31 files changed

Lines changed: 772 additions & 48 deletions

.changeset/config.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
],
99
"commit": false,
1010
"fixed": [["@forgerock/*"]],
11-
"privatePackages": false,
1211
"linked": [],
1312
"access": "public",
1413
"baseBranch": "main",

.changeset/slick-cougars-smoke.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@forgerock/davinci-client': minor
3+
'@forgerock/sdk-utilities': minor
4+
---
5+
6+
created sdk-utilities package

eslint.config.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,16 @@ export default [
6969
},
7070
{
7171
sourceTag: 'scope:package',
72-
onlyDependOnLibsWithTags: [],
72+
onlyDependOnLibsWithTags: ['scope:utilities'],
7373
},
7474
{
7575
sourceTag: 'scope:types',
7676
onlyDependOnLibsWithTags: [],
7777
},
78+
{
79+
sourceTag: 'scope:utilities',
80+
onlyDependOnLibsWithTags: [],
81+
},
7882
],
7983
},
8084
],

package.json

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
11
{
22
"name": "ping-javascript-sdk",
3+
"version": "0.0.0",
34
"private": true,
45
"description": "Ping JavaScript SDK",
5-
"packageManager": "pnpm@9.15.9+sha512.68046141893c66fad01c079231128e9afb89ef87e2691d69e4d40eee228988295fd4682181bae55b58418c3a253bde65a505ec7c5f9403ece5cc3cd37dcf2531",
6-
"engines": {
7-
"node": "^20 || ^22",
8-
"pnpm": "9.15.9"
6+
"homepage": "https://github.com/ForgeRock/ping-javascript-sdk#readme",
7+
"bugs": {
8+
"url": "https://github.com/ForgeRock/ping-javascript-sdk/issues"
9+
},
10+
"repository": {
11+
"type": "git",
12+
"url": "https://github.com/ForgeRock/ping-javascript-sdk.git"
913
},
14+
"author": "ForgeRock",
1015
"scripts": {
1116
"build": "nx affected --target=build",
12-
"clean": "shx rm -rf ./{coverage,dist,docs,node_modules,tmp}/ ./{packages,e2e}/*/{dist,node_modules}/ && git clean -fX -e \"!.env*,nx-cloud.env\"",
17+
"changeset": "changeset",
1318
"ci:release": "pnpm publish -r --no-git-checks && changeset tag",
1419
"ci:version": "changeset version && pnpm install --no-frozen-lockfile",
15-
"changeset": "changeset",
20+
"clean": "shx rm -rf ./{coverage,dist,docs,node_modules,tmp}/ ./{packages,e2e}/*/{dist,node_modules}/ && git clean -fX -e \"!.env*,nx-cloud.env\"",
1621
"commit": "git cz",
22+
"commitlint": "commitlint --edit",
1723
"create-package": "nx g @nx/js:library",
1824
"docs": "nx affected --target=typedoc",
1925
"lint": "nx affected --target=lint",
@@ -23,9 +29,8 @@
2329
"serve": "nx serve",
2430
"test": "CI=true nx affected:test",
2531
"test:e2e": "CI=true nx affected:e2e",
26-
"watch": "nx watch-deps",
2732
"verdaccio": "nx local-registry",
28-
"commitlint": "commitlint --edit"
33+
"watch": "nx watch-deps"
2934
},
3035
"lint-staged": {
3136
"*": [
@@ -35,15 +40,11 @@
3540
"git add"
3641
]
3742
},
38-
"repository": {
39-
"type": "git",
40-
"url": "https://github.com/ForgeRock/ping-javascript-sdk.git"
41-
},
42-
"author": "ForgeRock",
43-
"bugs": {
44-
"url": "https://github.com/ForgeRock/ping-javascript-sdk/issues"
43+
"config": {
44+
"commitizen": {
45+
"path": "./node_modules/cz-conventional-changelog"
46+
}
4547
},
46-
"homepage": "https://github.com/ForgeRock/ping-javascript-sdk#readme",
4748
"devDependencies": {
4849
"@changesets/changelog-github": "^0.5.0",
4950
"@changesets/cli": "^2.27.9",
@@ -79,7 +80,7 @@
7980
"@types/node": "22.13.13",
8081
"@typescript-eslint/typescript-estree": "8.23.0",
8182
"@typescript-eslint/utils": "^8.13.0",
82-
"@vitest/coverage-v8": "3.0.4",
83+
"@vitest/coverage-v8": "^3.0.5",
8384
"@vitest/ui": "3.0.4",
8485
"conventional-changelog-conventionalcommits": "^8.0.0",
8586
"cz-conventional-changelog": "^3.3.0",
@@ -118,10 +119,10 @@
118119
"vitest": "3.0.5",
119120
"vitest-canvas-mock": "^0.3.3"
120121
},
121-
"config": {
122-
"commitizen": {
123-
"path": "./node_modules/cz-conventional-changelog"
124-
}
122+
"packageManager": "pnpm@9.15.9+sha512.68046141893c66fad01c079231128e9afb89ef87e2691d69e4d40eee228988295fd4682181bae55b58418c3a253bde65a505ec7c5f9403ece5cc3cd37dcf2531",
123+
"engines": {
124+
"node": "^20 || ^22",
125+
"pnpm": "9.15.9"
125126
},
126127
"nx": {
127128
"includedScripts": []

packages/davinci-client/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
},
2424
"dependencies": {
2525
"@forgerock/javascript-sdk": "4.7.0",
26+
"@forgerock/sdk-utilities": "workspace:*",
2627
"@reduxjs/toolkit": "catalog:",
2728
"immer": "catalog:"
2829
},

packages/davinci-client/src/lib/davinci.api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
/**
1515
* Import internal modules
1616
*/
17-
import { createAuthorizeUrl } from './authorize.utils.js';
17+
import { createAuthorizeUrl } from '@forgerock/sdk-utilities';
1818
import { handleResponse, transformActionRequest, transformSubmitRequest } from './davinci.utils.js';
1919

2020
/**

packages/davinci-client/tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
"resolveJsonModule": true
1111
},
1212
"references": [
13+
{
14+
"path": "../sdk-utilities"
15+
},
1316
{
1417
"path": "./tsconfig.lib.json"
1518
},

packages/davinci-client/tsconfig.lib.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,10 @@
2828
"src/**/*.types.test-d.ts",
2929
"src/**/*.utils.test-d.ts",
3030
"src/lib/mock-data/*"
31+
],
32+
"references": [
33+
{
34+
"path": "../sdk-utilities/tsconfig.lib.json"
35+
}
3136
]
3237
}

packages/device-client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"executor": "@nx/js:tsc",
3232
"outputs": ["{options.outputPath}"],
3333
"options": {
34-
"outputPath": "packages/davinci-client/dist",
34+
"outputPath": "packages/device-client/dist",
3535
"main": "packages/device-client/src/index.ts",
3636
"tsConfig": "packages/device-client/tsconfig.lib.json",
3737
"generatePackageJson": false,

packages/sdk-utilities/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# sdk-utilities
2+
3+
This library was generated with [Nx](https://nx.dev).
4+
5+
## Building
6+
7+
Run `nx build sdk-utilities` to build the library.
8+
9+
## Running unit tests
10+
11+
Run `nx test sdk-utilities` to execute the unit tests via [Vitest](https://vitest.dev/).

0 commit comments

Comments
 (0)