mirror of
https://github.com/bitwarden/clients.git
synced 2026-07-21 21:17:06 +08:00
[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:
parent
c66167f574
commit
c5449e6432
4
.github/CODEOWNERS
vendored
4
.github/CODEOWNERS
vendored
@ -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
|
||||
|
||||
@ -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
5
libs/pam/README.md
Normal file
@ -0,0 +1,5 @@
|
||||
# pam
|
||||
|
||||
Owned by: pam
|
||||
|
||||
Privileged Access Management (PAM) feature library
|
||||
3
libs/pam/eslint.config.mjs
Normal file
3
libs/pam/eslint.config.mjs
Normal file
@ -0,0 +1,3 @@
|
||||
import baseConfig from "../../eslint.config.mjs";
|
||||
|
||||
export default [...baseConfig];
|
||||
10
libs/pam/jest.config.js
Normal file
10
libs/pam/jest.config.js
Normal 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
11
libs/pam/package.json
Normal 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
34
libs/pam/project.json
Normal 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
0
libs/pam/src/index.ts
Normal file
7
libs/pam/src/pam.spec.ts
Normal file
7
libs/pam/src/pam.spec.ts
Normal 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);
|
||||
});
|
||||
});
|
||||
6
libs/pam/tsconfig.eslint.json
Normal file
6
libs/pam/tsconfig.eslint.json
Normal 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
13
libs/pam/tsconfig.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.lib.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.spec.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
10
libs/pam/tsconfig.lib.json
Normal file
10
libs/pam/tsconfig.lib.json
Normal 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"]
|
||||
}
|
||||
10
libs/pam/tsconfig.spec.json
Normal file
10
libs/pam/tsconfig.spec.json
Normal 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
9
package-lock.json
generated
@ -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
|
||||
|
||||
@ -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": [
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user