mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-23 11:56:00 +01:00
[PM-7289] Create generator libraries (#9432)
* Create and register @bitwarden/generator-core - Create libs/tools/generator/core - Register new library within tsconfigs - Register new library within eslint.configs * Create and register @bitwarden/generator-extensions - Create libs/tools/generator/extensions - Register new library within tsconfigs - Register new library within eslint.configs * Create and register @bitwarden/generator-components - Create libs/tools/generator/components - Register new library within tsconfigs - Register new library within eslint.configs * Update libs/tools/generator/components/package.json Co-authored-by: ✨ Audrey ✨ <ajensen@bitwarden.com> * Update libs/tools/generator/extensions/package.json Co-authored-by: ✨ Audrey ✨ <ajensen@bitwarden.com> * Add empty barrel files for new libs * Fix extension of test.environment --------- Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com> Co-authored-by: ✨ Audrey ✨ <ajensen@bitwarden.com>
This commit is contained in:
parent
90e7e16df6
commit
de92720d7e
@ -97,6 +97,11 @@
|
||||
// Node
|
||||
"./libs/node/**/*",
|
||||
|
||||
//Generator
|
||||
"./libs/tools/generator/components/**/*",
|
||||
"./libs/tools/generator/core/**/*",
|
||||
"./libs/tools/generator/extensions/**/*",
|
||||
|
||||
// Import/export
|
||||
"./libs/importer/**/*",
|
||||
"./libs/tools/export/vault-export/vault-export-core/**/*"
|
||||
@ -182,6 +187,33 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["libs/tools/generator/components/src/**/*.ts"],
|
||||
"rules": {
|
||||
"no-restricted-imports": [
|
||||
"error",
|
||||
{ "patterns": ["@bitwarden/generator-components/*", "src/**/*"] }
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["libs/tools/generator/core/src/**/*.ts"],
|
||||
"rules": {
|
||||
"no-restricted-imports": [
|
||||
"error",
|
||||
{ "patterns": ["@bitwarden/generator-core/*", "src/**/*"] }
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["libs/tools/generator/extensions/src/**/*.ts"],
|
||||
"rules": {
|
||||
"no-restricted-imports": [
|
||||
"error",
|
||||
{ "patterns": ["@bitwarden/generator-extensions/*", "src/**/*"] }
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["libs/tools/export/vault-export/vault-export-core/src/**/*.ts"],
|
||||
"rules": {
|
||||
|
@ -19,6 +19,9 @@
|
||||
"@bitwarden/billing": ["../../libs/billing/src"],
|
||||
"@bitwarden/common/*": ["../../libs/common/src/*"],
|
||||
"@bitwarden/components": ["../../libs/components/src"],
|
||||
"@bitwarden/generator-components": ["../../libs/tools/generator/components/src"],
|
||||
"@bitwarden/generator-core": ["../../libs/tools/generator/core/src"],
|
||||
"@bitwarden/generator-extensions": ["../../libs/tools/generator/extensions/src"],
|
||||
"@bitwarden/vault-export-core": [
|
||||
"../../libs/tools/export/vault-export/vault-export-core/src"
|
||||
],
|
||||
|
@ -17,6 +17,9 @@
|
||||
"@bitwarden/billing": ["../../libs/billing/src"],
|
||||
"@bitwarden/common/*": ["../../libs/common/src/*"],
|
||||
"@bitwarden/components": ["../../libs/components/src"],
|
||||
"@bitwarden/generator-components": ["../../libs/tools/generator/components/src"],
|
||||
"@bitwarden/generator-core": ["../../libs/tools/generator/core/src"],
|
||||
"@bitwarden/generator-extensions": ["../../libs/tools/generator/extensions/src"],
|
||||
"@bitwarden/vault-export-core": [
|
||||
"../../libs/tools/export/vault-export/vault-export-core/src"
|
||||
],
|
||||
|
@ -12,6 +12,9 @@
|
||||
"@bitwarden/billing": ["../../libs/billing/src"],
|
||||
"@bitwarden/common/*": ["../../libs/common/src/*"],
|
||||
"@bitwarden/components": ["../../libs/components/src"],
|
||||
"@bitwarden/generator-components": ["../../libs/tools/generator/components/src"],
|
||||
"@bitwarden/generator-core": ["../../libs/tools/generator/core/src"],
|
||||
"@bitwarden/generator-extensions": ["../../libs/tools/generator/extensions/src"],
|
||||
"@bitwarden/vault-export-core": [
|
||||
"../../libs/tools/export/vault-export/vault-export-core/src"
|
||||
],
|
||||
|
@ -11,6 +11,9 @@
|
||||
"@bitwarden/billing": ["../../libs/billing/src"],
|
||||
"@bitwarden/common/*": ["../../libs/common/src/*"],
|
||||
"@bitwarden/components": ["../../libs/components/src"],
|
||||
"@bitwarden/generator-components": ["../../libs/tools/generator/components/src"],
|
||||
"@bitwarden/generator-core": ["../../libs/tools/generator/core/src"],
|
||||
"@bitwarden/generator-extensions": ["../../libs/tools/generator/extensions/src"],
|
||||
"@bitwarden/vault-export-core": [
|
||||
"../../libs/tools/export/vault-export/vault-export-core/src"
|
||||
],
|
||||
|
@ -12,6 +12,9 @@
|
||||
"@bitwarden/billing": ["../../libs/billing/src"],
|
||||
"@bitwarden/common/*": ["../../libs/common/src/*"],
|
||||
"@bitwarden/components": ["../../libs/components/src"],
|
||||
"@bitwarden/generator-components": ["../../libs/tools/generator/components/src"],
|
||||
"@bitwarden/generator-core": ["../../libs/tools/generator/core/src"],
|
||||
"@bitwarden/generator-extensions": ["../../libs/tools/generator/extensions/src"],
|
||||
"@bitwarden/vault-export-core": [
|
||||
"../../libs/tools/export/vault-export/vault-export-core/src"
|
||||
],
|
||||
|
@ -31,6 +31,7 @@ module.exports = {
|
||||
"<rootDir>/libs/common/jest.config.js",
|
||||
"<rootDir>/libs/components/jest.config.js",
|
||||
"<rootDir>/libs/tools/export/vault-export/vault-export-core/jest.config.js",
|
||||
"<rootDir>/libs/tools/generator/core/jest.config.js",
|
||||
"<rootDir>/libs/importer/jest.config.js",
|
||||
"<rootDir>/libs/platform/jest.config.js",
|
||||
"<rootDir>/libs/node/jest.config.js",
|
||||
|
@ -10,6 +10,9 @@
|
||||
"@bitwarden/billing": ["../billing/src"],
|
||||
"@bitwarden/common/*": ["../common/src/*"],
|
||||
"@bitwarden/components": ["../components/src"],
|
||||
"@bitwarden/generator-components": ["../tools/generator/components/src"],
|
||||
"@bitwarden/generator-core": ["../tools/generator/core/src"],
|
||||
"@bitwarden/generator-extensions": ["../tools/generator/extensions/src"],
|
||||
"@bitwarden/vault-export-core": ["../tools/export/vault-export/vault-export-core/src"],
|
||||
"@bitwarden/vault-export-ui": ["../tools/export/vault-export/vault-export-ui/src"],
|
||||
"@bitwarden/importer/core": ["../importer/src"],
|
||||
|
13
libs/tools/generator/components/jest.config.js
Normal file
13
libs/tools/generator/components/jest.config.js
Normal file
@ -0,0 +1,13 @@
|
||||
const { pathsToModuleNameMapper } = require("ts-jest");
|
||||
|
||||
const { compilerOptions } = require("../../../shared/tsconfig.libs.json");
|
||||
|
||||
/** @type {import('jest').Config} */
|
||||
module.exports = {
|
||||
testMatch: ["**/+(*.)+(spec).+(ts)"],
|
||||
preset: "ts-jest",
|
||||
testEnvironment: "../../../shared/test.environment.ts",
|
||||
moduleNameMapper: pathsToModuleNameMapper(compilerOptions?.paths || {}, {
|
||||
prefix: "<rootDir>/../../../",
|
||||
}),
|
||||
};
|
24
libs/tools/generator/components/package.json
Normal file
24
libs/tools/generator/components/package.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "@bitwarden/generator-components",
|
||||
"version": "0.0.0",
|
||||
"description": "Angular components for the Bitwarden generators",
|
||||
"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"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bitwarden/common": "file:../../../common",
|
||||
"@bitwarden/generator-core": "file:../core"
|
||||
}
|
||||
}
|
0
libs/tools/generator/components/src/index.ts
Normal file
0
libs/tools/generator/components/src/index.ts
Normal file
5
libs/tools/generator/components/tsconfig.json
Normal file
5
libs/tools/generator/components/tsconfig.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"extends": "../../../shared/tsconfig.libs",
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
3
libs/tools/generator/components/tsconfig.spec.json
Normal file
3
libs/tools/generator/components/tsconfig.spec.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "./tsconfig.json"
|
||||
}
|
13
libs/tools/generator/core/jest.config.js
Normal file
13
libs/tools/generator/core/jest.config.js
Normal file
@ -0,0 +1,13 @@
|
||||
const { pathsToModuleNameMapper } = require("ts-jest");
|
||||
|
||||
const { compilerOptions } = require("../../../shared/tsconfig.libs");
|
||||
|
||||
/** @type {import('jest').Config} */
|
||||
module.exports = {
|
||||
testMatch: ["**/+(*.)+(spec).+(ts)"],
|
||||
preset: "ts-jest",
|
||||
testEnvironment: "../../../shared/test.environment.ts",
|
||||
moduleNameMapper: pathsToModuleNameMapper(compilerOptions?.paths || {}, {
|
||||
prefix: "<rootDir>/../../../",
|
||||
}),
|
||||
};
|
23
libs/tools/generator/core/package.json
Normal file
23
libs/tools/generator/core/package.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "@bitwarden/generator-core",
|
||||
"version": "0.0.0",
|
||||
"description": "TODO",
|
||||
"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"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bitwarden/common": "file:../../../common"
|
||||
}
|
||||
}
|
0
libs/tools/generator/core/src/index.ts
Normal file
0
libs/tools/generator/core/src/index.ts
Normal file
5
libs/tools/generator/core/tsconfig.json
Normal file
5
libs/tools/generator/core/tsconfig.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"extends": "../../../shared/tsconfig.libs",
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
3
libs/tools/generator/core/tsconfig.spec.json
Normal file
3
libs/tools/generator/core/tsconfig.spec.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "./tsconfig.json"
|
||||
}
|
13
libs/tools/generator/extensions/jest.config.js
Normal file
13
libs/tools/generator/extensions/jest.config.js
Normal file
@ -0,0 +1,13 @@
|
||||
const { pathsToModuleNameMapper } = require("ts-jest");
|
||||
|
||||
const { compilerOptions } = require("../../../shared/tsconfig.libs");
|
||||
|
||||
/** @type {import('jest').Config} */
|
||||
module.exports = {
|
||||
testMatch: ["**/+(*.)+(spec).+(ts)"],
|
||||
preset: "ts-jest",
|
||||
testEnvironment: "../../../shared/test.environment.ts",
|
||||
moduleNameMapper: pathsToModuleNameMapper(compilerOptions?.paths || {}, {
|
||||
prefix: "<rootDir>/../../../",
|
||||
}),
|
||||
};
|
24
libs/tools/generator/extensions/package.json
Normal file
24
libs/tools/generator/extensions/package.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "@bitwarden/generator-extensions",
|
||||
"version": "0.0.0",
|
||||
"description": "TODO",
|
||||
"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"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bitwarden/common": "file:../../../common",
|
||||
"@bitwarden/generator-core": "file:../core"
|
||||
}
|
||||
}
|
0
libs/tools/generator/extensions/src/index.ts
Normal file
0
libs/tools/generator/extensions/src/index.ts
Normal file
5
libs/tools/generator/extensions/tsconfig.json
Normal file
5
libs/tools/generator/extensions/tsconfig.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"extends": "../../../shared/tsconfig.libs",
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
3
libs/tools/generator/extensions/tsconfig.spec.json
Normal file
3
libs/tools/generator/extensions/tsconfig.spec.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "./tsconfig.json"
|
||||
}
|
@ -21,6 +21,9 @@
|
||||
"@bitwarden/billing": ["./libs/billing/src"],
|
||||
"@bitwarden/common/*": ["./libs/common/src/*"],
|
||||
"@bitwarden/components": ["./libs/components/src"],
|
||||
"@bitwarden/generator-components": ["./libs/tools/generator/components/src"],
|
||||
"@bitwarden/generator-core": ["./libs/tools/generator/core/src"],
|
||||
"@bitwarden/generator-extensions": ["./libs/tools/generator/extensions/src"],
|
||||
"@bitwarden/vault-export-core": [".libs/tools/export/vault-export/vault-export-core/src"],
|
||||
"@bitwarden/vault-export-ui": [".libs/tools/export/vault-export/vault-export-ui/src"],
|
||||
"@bitwarden/importer/core": ["./libs/importer/src"],
|
||||
|
@ -22,6 +22,9 @@
|
||||
"@bitwarden/billing": ["./libs/billing/src"],
|
||||
"@bitwarden/common/*": ["./libs/common/src/*"],
|
||||
"@bitwarden/components": ["./libs/components/src"],
|
||||
"@bitwarden/generator-components": ["./libs/tools/generator/components/src"],
|
||||
"@bitwarden/generator-core": ["./libs/tools/generator/core/src"],
|
||||
"@bitwarden/generator-extensions": ["./libs/tools/generator/extensions/src"],
|
||||
"@bitwarden/vault-export-core": ["./libs/tools/export/vault-export/vault-export-core/src"],
|
||||
"@bitwarden/vault-export-ui": ["./libs/tools/export/vault-export/vault-export-ui/src"],
|
||||
"@bitwarden/importer/core": ["./libs/importer/src"],
|
||||
|
Loading…
Reference in New Issue
Block a user