mirror of
https://github.com/bitwarden/browser
synced 2026-02-09 13:10:17 +00:00
* feat(nx): add basic-lib generator for streamlined library creation This adds a new nx-plugin library with a generator for creating "common" type Bitwarden libs. It is set up to accept a lib name, description, team, and directory. It then - Creates a folder in the directory (default to libs) - Sets up complete library scaffolding: - README with team ownership - Build, lint and test task configuration - Test infrastructure - Configures TypeScript path mapping - Updates CODEOWNERS with team ownership - Runs npm i This will make library creation more consistent and reduce manual boilerplate setup. The plugin design itself was generated by `npx nx g plugin`. This means we used a plugin to generate a plugin that exports generators. To create our generator generator, we first needed a generator. * fix(dirt/card): correct tsconfig path in jest configuration Fix the relative path to tsconfig.base in the dirt/card library's Jest config. The path was incorrectly using four parent directory traversals (../../../../) when only three (../../../) were needed to reach the project root. * chore(codeowners): clarify some nx ownership stuff
97 lines
2.3 KiB
JSON
97 lines
2.3 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/schema",
|
|
"$id": "BasicLib",
|
|
"title": "",
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Library name",
|
|
"$default": {
|
|
"$source": "argv",
|
|
"index": 0
|
|
},
|
|
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
|
|
"x-prompt": "What name would you like to use? (kebab-case, alphanumeric)",
|
|
"x-priority": "important"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"description": "Library description",
|
|
"x-prompt": "Please describe your library in one sentence (for package.json and README)",
|
|
"x-priority": "important"
|
|
},
|
|
"directory": {
|
|
"type": "string",
|
|
"description": "Directory where the library will be created",
|
|
"default": "libs",
|
|
"x-prompt": "What directory would you like your lib in?",
|
|
"x-priority": "important"
|
|
},
|
|
"team": {
|
|
"type": "string",
|
|
"description": "Maintaining team",
|
|
"x-priority": "important",
|
|
"x-prompt": {
|
|
"message": "What team maintains this library?",
|
|
"type": "list",
|
|
"items": [
|
|
{
|
|
"value": "admin-console",
|
|
"label": "Admin Console"
|
|
},
|
|
{
|
|
"value": "auth",
|
|
"label": "Auth"
|
|
},
|
|
{
|
|
"value": "autofill",
|
|
"label": "Autofill"
|
|
},
|
|
{
|
|
"value": "billing",
|
|
"label": "Billing"
|
|
},
|
|
{
|
|
"value": "data-insights-and-reporting",
|
|
"label": "Data Insights And Reporting"
|
|
},
|
|
{
|
|
"value": "key-management",
|
|
"label": "Key Management"
|
|
},
|
|
{
|
|
"value": "platform",
|
|
"label": "Platform"
|
|
},
|
|
{
|
|
"value": "tools",
|
|
"label": "Tools"
|
|
},
|
|
{
|
|
"value": "ui-foundation",
|
|
"label": "UI Foundation"
|
|
},
|
|
{
|
|
"value": "vault",
|
|
"label": "Vault"
|
|
}
|
|
]
|
|
},
|
|
"enum": [
|
|
"admin-console",
|
|
"auth",
|
|
"autofill",
|
|
"billing",
|
|
"data-insights-and-reporting",
|
|
"key-management",
|
|
"platform",
|
|
"tools",
|
|
"ui-foundation",
|
|
"vault"
|
|
]
|
|
}
|
|
},
|
|
"required": ["name", "description", "team"]
|
|
}
|