Browse Source
* add admin-console lib files * add billing lib files * add platform lib files * update lib references in config files * update package-lockps/move-org-switcher
34 changed files with 306 additions and 0 deletions
@ -0,0 +1,3 @@
@@ -0,0 +1,3 @@
|
||||
# Admin Console |
||||
|
||||
This lib represents the public API of the Admin Console team at Bitwarden. Modules are imported using `@bitwarden/admin-console`. |
||||
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
const { pathsToModuleNameMapper } = require("ts-jest"); |
||||
|
||||
const { compilerOptions } = require("../shared/tsconfig.libs"); |
||||
|
||||
const sharedConfig = require("../../libs/shared/jest.config.angular"); |
||||
|
||||
/** @type {import('jest').Config} */ |
||||
module.exports = { |
||||
...sharedConfig, |
||||
displayName: "libs/admin-console tests", |
||||
preset: "jest-preset-angular", |
||||
setupFilesAfterEnv: ["<rootDir>/test.setup.ts"], |
||||
moduleNameMapper: pathsToModuleNameMapper(compilerOptions?.paths || {}, { |
||||
prefix: "<rootDir>/", |
||||
}), |
||||
}; |
||||
@ -0,0 +1,20 @@
@@ -0,0 +1,20 @@
|
||||
{ |
||||
"name": "@bitwarden/admin-console", |
||||
"version": "0.0.0", |
||||
"description": "Common code used across Bitwarden JavaScript projects.", |
||||
"keywords": [ |
||||
"bitwarden" |
||||
], |
||||
"author": "Bitwarden Inc.", |
||||
"homepage": "https://bitwarden.com", |
||||
"repository": { |
||||
"type": "git", |
||||
"url": "https://github.com/bitwarden/clients" |
||||
}, |
||||
"license": "GPL-3.0", |
||||
"scripts": { |
||||
"clean": "rimraf dist", |
||||
"build": "npm run clean && tsc", |
||||
"build:watch": "npm run clean && tsc -watch" |
||||
} |
||||
} |
||||
@ -0,0 +1,28 @@
@@ -0,0 +1,28 @@
|
||||
import { webcrypto } from "crypto"; |
||||
import "jest-preset-angular/setup-jest"; |
||||
|
||||
Object.defineProperty(window, "CSS", { value: null }); |
||||
Object.defineProperty(window, "getComputedStyle", { |
||||
value: () => { |
||||
return { |
||||
display: "none", |
||||
appearance: ["-webkit-appearance"], |
||||
}; |
||||
}, |
||||
}); |
||||
|
||||
Object.defineProperty(document, "doctype", { |
||||
value: "<!DOCTYPE html>", |
||||
}); |
||||
Object.defineProperty(document.body.style, "transform", { |
||||
value: () => { |
||||
return { |
||||
enumerable: true, |
||||
configurable: true, |
||||
}; |
||||
}, |
||||
}); |
||||
|
||||
Object.defineProperty(window, "crypto", { |
||||
value: webcrypto, |
||||
}); |
||||
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
{ |
||||
"extends": "../shared/tsconfig.libs", |
||||
"include": ["src", "spec"], |
||||
"exclude": ["node_modules", "dist"] |
||||
} |
||||
@ -0,0 +1,4 @@
@@ -0,0 +1,4 @@
|
||||
{ |
||||
"extends": "./tsconfig.json", |
||||
"files": ["./test.setup.ts"] |
||||
} |
||||
@ -0,0 +1,3 @@
@@ -0,0 +1,3 @@
|
||||
# Billing |
||||
|
||||
This lib represents the public API of the Billing team at Bitwarden. Modules are imported using `@bitwarden/billing`. |
||||
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
const { pathsToModuleNameMapper } = require("ts-jest"); |
||||
|
||||
const { compilerOptions } = require("../shared/tsconfig.libs"); |
||||
|
||||
const sharedConfig = require("../../libs/shared/jest.config.angular"); |
||||
|
||||
/** @type {import('jest').Config} */ |
||||
module.exports = { |
||||
...sharedConfig, |
||||
displayName: "libs/billing tests", |
||||
preset: "jest-preset-angular", |
||||
setupFilesAfterEnv: ["<rootDir>/test.setup.ts"], |
||||
moduleNameMapper: pathsToModuleNameMapper(compilerOptions?.paths || {}, { |
||||
prefix: "<rootDir>/", |
||||
}), |
||||
}; |
||||
@ -0,0 +1,20 @@
@@ -0,0 +1,20 @@
|
||||
{ |
||||
"name": "@bitwarden/billing", |
||||
"version": "0.0.0", |
||||
"description": "Common code used across Bitwarden JavaScript projects.", |
||||
"keywords": [ |
||||
"bitwarden" |
||||
], |
||||
"author": "Bitwarden Inc.", |
||||
"homepage": "https://bitwarden.com", |
||||
"repository": { |
||||
"type": "git", |
||||
"url": "https://github.com/bitwarden/clients" |
||||
}, |
||||
"license": "GPL-3.0", |
||||
"scripts": { |
||||
"clean": "rimraf dist", |
||||
"build": "npm run clean && tsc", |
||||
"build:watch": "npm run clean && tsc -watch" |
||||
} |
||||
} |
||||
@ -0,0 +1,28 @@
@@ -0,0 +1,28 @@
|
||||
import { webcrypto } from "crypto"; |
||||
import "jest-preset-angular/setup-jest"; |
||||
|
||||
Object.defineProperty(window, "CSS", { value: null }); |
||||
Object.defineProperty(window, "getComputedStyle", { |
||||
value: () => { |
||||
return { |
||||
display: "none", |
||||
appearance: ["-webkit-appearance"], |
||||
}; |
||||
}, |
||||
}); |
||||
|
||||
Object.defineProperty(document, "doctype", { |
||||
value: "<!DOCTYPE html>", |
||||
}); |
||||
Object.defineProperty(document.body.style, "transform", { |
||||
value: () => { |
||||
return { |
||||
enumerable: true, |
||||
configurable: true, |
||||
}; |
||||
}, |
||||
}); |
||||
|
||||
Object.defineProperty(window, "crypto", { |
||||
value: webcrypto, |
||||
}); |
||||
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
{ |
||||
"extends": "../shared/tsconfig.libs", |
||||
"include": ["src", "spec"], |
||||
"exclude": ["node_modules", "dist"] |
||||
} |
||||
@ -0,0 +1,4 @@
@@ -0,0 +1,4 @@
|
||||
{ |
||||
"extends": "./tsconfig.json", |
||||
"files": ["./test.setup.ts"] |
||||
} |
||||
@ -0,0 +1,3 @@
@@ -0,0 +1,3 @@
|
||||
# Platform |
||||
|
||||
This lib represents the public API of the Platform team at Bitwarden. Modules are imported using `@bitwarden/platform`. |
||||
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
const { pathsToModuleNameMapper } = require("ts-jest"); |
||||
|
||||
const { compilerOptions } = require("../shared/tsconfig.libs"); |
||||
|
||||
const sharedConfig = require("../../libs/shared/jest.config.angular"); |
||||
|
||||
/** @type {import('jest').Config} */ |
||||
module.exports = { |
||||
...sharedConfig, |
||||
displayName: "libs/platform tests", |
||||
preset: "jest-preset-angular", |
||||
setupFilesAfterEnv: ["<rootDir>/test.setup.ts"], |
||||
moduleNameMapper: pathsToModuleNameMapper(compilerOptions?.paths || {}, { |
||||
prefix: "<rootDir>/", |
||||
}), |
||||
}; |
||||
@ -0,0 +1,20 @@
@@ -0,0 +1,20 @@
|
||||
{ |
||||
"name": "@bitwarden/platform", |
||||
"version": "0.0.0", |
||||
"description": "Common code used across Bitwarden JavaScript projects.", |
||||
"keywords": [ |
||||
"bitwarden" |
||||
], |
||||
"author": "Bitwarden Inc.", |
||||
"homepage": "https://bitwarden.com", |
||||
"repository": { |
||||
"type": "git", |
||||
"url": "https://github.com/bitwarden/clients" |
||||
}, |
||||
"license": "GPL-3.0", |
||||
"scripts": { |
||||
"clean": "rimraf dist", |
||||
"build": "npm run clean && tsc", |
||||
"build:watch": "npm run clean && tsc -watch" |
||||
} |
||||
} |
||||
@ -0,0 +1,28 @@
@@ -0,0 +1,28 @@
|
||||
import { webcrypto } from "crypto"; |
||||
import "jest-preset-angular/setup-jest"; |
||||
|
||||
Object.defineProperty(window, "CSS", { value: null }); |
||||
Object.defineProperty(window, "getComputedStyle", { |
||||
value: () => { |
||||
return { |
||||
display: "none", |
||||
appearance: ["-webkit-appearance"], |
||||
}; |
||||
}, |
||||
}); |
||||
|
||||
Object.defineProperty(document, "doctype", { |
||||
value: "<!DOCTYPE html>", |
||||
}); |
||||
Object.defineProperty(document.body.style, "transform", { |
||||
value: () => { |
||||
return { |
||||
enumerable: true, |
||||
configurable: true, |
||||
}; |
||||
}, |
||||
}); |
||||
|
||||
Object.defineProperty(window, "crypto", { |
||||
value: webcrypto, |
||||
}); |
||||
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
{ |
||||
"extends": "../shared/tsconfig.libs", |
||||
"include": ["src", "spec"], |
||||
"exclude": ["node_modules", "dist"] |
||||
} |
||||
@ -0,0 +1,4 @@
@@ -0,0 +1,4 @@
|
||||
{ |
||||
"extends": "./tsconfig.json", |
||||
"files": ["./test.setup.ts"] |
||||
} |
||||
Loading…
Reference in new issue