[PM-39048] Feat: scaffold @bitwarden/pam library (#21259)

Add a new libs/pam feature library for Privileged Access Management,
generated via the basic-lib Nx generator.

- Register the "pam" team in the basic-lib generator (schema enum,
  interactive prompt, and the @bitwarden/team-pam-dev CODEOWNERS handle)
- Generate libs/pam with standard structure and a placeholder spec
- Wire up tsconfig.base.json path, CODEOWNERS, and root jest.config.js
This commit is contained in:
Oscar Hinton 2026-06-16 09:55:07 +02:00 committed by GitHub
parent c66167f574
commit c5449e6432
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
15 changed files with 125 additions and 1 deletions

4
.github/CODEOWNERS vendored
View File

@ -235,6 +235,10 @@ apps/desktop/src/services/native-messaging.service.ts @bitwarden/team-key-manage
apps/browser/src/background/nativeMessaging.background.ts @bitwarden/team-key-management-dev
apps/desktop/src/services/biometric-message-handler.service.ts @bitwarden/team-key-management-dev
## PAM
apps/web/src/app/pam @bitwarden/team-pam-dev
libs/pam @bitwarden/team-pam-dev
## Locales ##
apps/browser/src/_locales/en/messages.json
apps/browser/store/locales/en

View File

@ -66,6 +66,7 @@ module.exports = {
"<rootDir>/libs/user-crypto-management/jest.config.js",
"<rootDir>/libs/scheduling/jest.config.js",
"<rootDir>/libs/organization-invite-link/jest.config.js",
"<rootDir>/libs/pam/jest.config.js",
],
// Workaround for a memory leak that crashes tests in CI:

5
libs/pam/README.md Normal file
View File

@ -0,0 +1,5 @@
# pam
Owned by: pam
Privileged Access Management (PAM) feature library

View File

@ -0,0 +1,3 @@
import baseConfig from "../../eslint.config.mjs";
export default [...baseConfig];

10
libs/pam/jest.config.js Normal file
View File

@ -0,0 +1,10 @@
module.exports = {
displayName: "pam",
preset: "../../jest.preset.js",
testEnvironment: "node",
transform: {
"^.+\\.[tj]s$": ["ts-jest", { tsconfig: "<rootDir>/tsconfig.spec.json" }],
},
moduleFileExtensions: ["ts", "js", "html"],
coverageDirectory: "../../coverage/libs/pam",
};

11
libs/pam/package.json Normal file
View File

@ -0,0 +1,11 @@
{
"name": "@bitwarden/pam",
"version": "0.0.1",
"description": "Privileged Access Management (PAM) feature library",
"private": true,
"type": "commonjs",
"main": "index.js",
"types": "index.d.ts",
"license": "GPL-3.0",
"author": "pam"
}

34
libs/pam/project.json Normal file
View File

@ -0,0 +1,34 @@
{
"name": "pam",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/pam/src",
"projectType": "library",
"tags": [],
"targets": {
"build": {
"executor": "@nx/js:tsc",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/libs/pam",
"main": "libs/pam/src/index.ts",
"tsConfig": "libs/pam/tsconfig.lib.json",
"assets": ["libs/pam/*.md"],
"rootDir": "libs/pam/src"
}
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/pam/**/*.ts"]
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "libs/pam/jest.config.js"
}
}
}
}

0
libs/pam/src/index.ts Normal file
View File

7
libs/pam/src/pam.spec.ts Normal file
View File

@ -0,0 +1,7 @@
describe("pam", () => {
// Placeholder test until the library exports something. Replace with real
// coverage as the PAM library grows.
it("should work", () => {
expect(true).toBe(true);
});
});

View File

@ -0,0 +1,6 @@
{
"extends": "../../tsconfig.base.json",
"files": [],
"include": ["src/**/*.ts", "src/**/*.js"],
"exclude": ["**/build", "**/dist"]
}

13
libs/pam/tsconfig.json Normal file
View File

@ -0,0 +1,13 @@
{
"extends": "../../tsconfig.base.json",
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json"
},
{
"path": "./tsconfig.spec.json"
}
]
}

View File

@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"declaration": true,
"types": ["node"]
},
"include": ["src/**/*.ts"],
"exclude": ["jest.config.js", "src/**/*.spec.ts"]
}

View File

@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"moduleResolution": "node10",
"types": ["jest", "node"]
},
"include": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts"]
}

9
package-lock.json generated
View File

@ -363,6 +363,11 @@
"version": "0.0.1",
"license": "GPL-3.0"
},
"libs/pam": {
"name": "@bitwarden/pam",
"version": "0.0.1",
"license": "GPL-3.0"
},
"libs/platform": {
"name": "@bitwarden/platform",
"version": "0.0.0",
@ -4174,6 +4179,10 @@
"resolved": "libs/organization-invite-link",
"link": true
},
"node_modules/@bitwarden/pam": {
"resolved": "libs/pam",
"link": true
},
"node_modules/@bitwarden/platform": {
"resolved": "libs/platform",
"link": true

View File

@ -72,7 +72,8 @@
"@bitwarden/vault": ["./libs/vault/src"],
"@bitwarden/vault-export-core": ["./libs/tools/export-vault-core/src"],
"@bitwarden/vault-export-ui": ["./libs/tools/export-vault-ui/src"],
"@bitwarden/web-vault/*": ["./apps/web/src/*"]
"@bitwarden/web-vault/*": ["./apps/web/src/*"],
"@bitwarden/pam": ["./libs/pam/src/index.ts"]
},
"plugins": [
{