mirror of
https://github.com/bitwarden/browser
synced 2026-02-23 16:13:21 +00:00
fix: Add rootDir to all 15 library project.json configs and update package.json paths
- Add 'rootDir: libs/LIBRARY_NAME/src' to all @nx/js:tsc executor build options - Update package.json main/types from 'dist/index.js' to 'index.js' for all libraries - Fixes systematic bug where build output had nested src/ structure but package.json pointed to non-existent dist/ paths - Affects all Tier 1-3 libraries: storage-core, guid, serialization, user-core, logging, client-type, messaging, messaging-internal, state, state-internal, core-test-utils, storage-test-utils, state-test-utils, assets, nx-plugin - Resolves 'Cannot find module' TypeScript errors for library imports - Implements Phase 2 systematic fix from rootDir configuration specification
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
"description": "Assets used in Bitwarden clients",
|
||||
"private": true,
|
||||
"type": "commonjs",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"license": "GPL-3.0",
|
||||
"author": "ui-foundation",
|
||||
"scripts": {
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
"outputPath": "dist/libs/assets",
|
||||
"main": "libs/assets/src/index.ts",
|
||||
"tsConfig": "libs/assets/tsconfig.lib.json",
|
||||
"assets": ["libs/assets/*.md"]
|
||||
"assets": ["libs/assets/*.md"],
|
||||
"rootDir": "libs/assets/src"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
"description": "Exports the ClientType enum",
|
||||
"private": true,
|
||||
"type": "commonjs",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"license": "GPL-3.0",
|
||||
"author": "platform"
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
"outputPath": "dist/libs/client-type",
|
||||
"main": "libs/client-type/src/index.ts",
|
||||
"tsConfig": "libs/client-type/tsconfig.lib.json",
|
||||
"assets": ["libs/client-type/*.md"]
|
||||
"assets": ["libs/client-type/*.md"],
|
||||
"rootDir": "libs/client-type/src"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
"description": "Async test tools for state and clients",
|
||||
"private": true,
|
||||
"type": "commonjs",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"license": "GPL-3.0",
|
||||
"author": "platform"
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
"outputPath": "dist/libs/core-test-utils",
|
||||
"main": "libs/core-test-utils/src/index.ts",
|
||||
"tsConfig": "libs/core-test-utils/tsconfig.lib.json",
|
||||
"assets": ["libs/core-test-utils/*.md"]
|
||||
"assets": ["libs/core-test-utils/*.md"],
|
||||
"rootDir": "libs/core-test-utils/src"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
"description": "Guid utilities extracted from common",
|
||||
"private": true,
|
||||
"type": "commonjs",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"license": "GPL-3.0",
|
||||
"author": "platform"
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
"outputPath": "dist/libs/guid",
|
||||
"main": "libs/guid/src/index.ts",
|
||||
"tsConfig": "libs/guid/tsconfig.lib.json",
|
||||
"assets": ["libs/guid/*.md"]
|
||||
"assets": ["libs/guid/*.md"],
|
||||
"rootDir": "libs/guid/src"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
"description": "Logging primitives",
|
||||
"private": true,
|
||||
"type": "commonjs",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"license": "GPL-3.0",
|
||||
"author": "platform"
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
"outputPath": "dist/libs/logging",
|
||||
"main": "libs/logging/src/index.ts",
|
||||
"tsConfig": "libs/logging/tsconfig.lib.json",
|
||||
"assets": ["libs/logging/*.md"]
|
||||
"assets": ["libs/logging/*.md"],
|
||||
"rootDir": "libs/logging/src"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
"description": "Internal details to accompany @bitwarden/messaging this library should not be consumed in non-platform code.",
|
||||
"private": true,
|
||||
"type": "commonjs",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"license": "GPL-3.0",
|
||||
"author": "platform"
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
"outputPath": "dist/libs/messaging-internal",
|
||||
"main": "libs/messaging-internal/src/index.ts",
|
||||
"tsConfig": "libs/messaging-internal/tsconfig.lib.json",
|
||||
"assets": ["libs/messaging-internal/*.md"]
|
||||
"assets": ["libs/messaging-internal/*.md"],
|
||||
"rootDir": "libs/messaging-internal/src"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
"description": "Services for sending and recieving messages from different contexts of the same application.",
|
||||
"private": true,
|
||||
"type": "commonjs",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"license": "GPL-3.0",
|
||||
"author": "platform"
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
"outputPath": "dist/libs/messaging",
|
||||
"main": "libs/messaging/src/index.ts",
|
||||
"tsConfig": "libs/messaging/tsconfig.lib.json",
|
||||
"assets": ["libs/messaging/*.md"]
|
||||
"assets": ["libs/messaging/*.md"],
|
||||
"rootDir": "libs/messaging/src"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
"description": "Custom Nx tools like generators and executors for Bitwarden projects",
|
||||
"private": true,
|
||||
"type": "commonjs",
|
||||
"main": "./src/index.js",
|
||||
"types": "./src/index.d.ts",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"license": "GPL-3.0",
|
||||
"author": "Platform",
|
||||
"generators": "./generators.json"
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
"glob": "executors.json",
|
||||
"output": "."
|
||||
}
|
||||
]
|
||||
],
|
||||
"rootDir": "libs/nx-plugin/src"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
"description": "Core serialization utilities",
|
||||
"private": true,
|
||||
"type": "commonjs",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"license": "GPL-3.0",
|
||||
"author": "platform"
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
"outputPath": "dist/libs/serialization",
|
||||
"main": "libs/serialization/src/index.ts",
|
||||
"tsConfig": "libs/serialization/tsconfig.lib.json",
|
||||
"assets": ["libs/serialization/*.md"]
|
||||
"assets": ["libs/serialization/*.md"],
|
||||
"rootDir": "libs/serialization/src"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
"description": "The internal parts of @bitwarden/state that should not be used by other teams.",
|
||||
"private": true,
|
||||
"type": "commonjs",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"license": "GPL-3.0",
|
||||
"author": "platform"
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
"outputPath": "dist/libs/state-internal",
|
||||
"main": "libs/state-internal/src/index.ts",
|
||||
"tsConfig": "libs/state-internal/tsconfig.lib.json",
|
||||
"assets": ["libs/state-internal/*.md"]
|
||||
"assets": ["libs/state-internal/*.md"],
|
||||
"rootDir": "libs/state-internal/src"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
"description": "Test utilities and fakes for state management",
|
||||
"private": true,
|
||||
"type": "commonjs",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"license": "GPL-3.0",
|
||||
"author": "platform"
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
"outputPath": "dist/libs/state-test-utils",
|
||||
"main": "libs/state-test-utils/src/index.ts",
|
||||
"tsConfig": "libs/state-test-utils/tsconfig.lib.json",
|
||||
"assets": ["libs/state-test-utils/*.md"]
|
||||
"assets": ["libs/state-test-utils/*.md"],
|
||||
"rootDir": "libs/state-test-utils/src"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
"description": "Centralized application state management",
|
||||
"private": true,
|
||||
"type": "commonjs",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"license": "GPL-3.0",
|
||||
"author": "platform"
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
"outputPath": "dist/libs/state",
|
||||
"main": "libs/state/src/index.ts",
|
||||
"tsConfig": "libs/state/tsconfig.lib.json",
|
||||
"assets": ["libs/state/*.md"]
|
||||
"assets": ["libs/state/*.md"],
|
||||
"rootDir": "libs/state/src"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
"description": "Abstractions over storage APIs",
|
||||
"private": true,
|
||||
"type": "commonjs",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"license": "GPL-3.0",
|
||||
"author": "platform"
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
"outputPath": "dist/libs/storage-core",
|
||||
"main": "libs/storage-core/src/index.ts",
|
||||
"tsConfig": "libs/storage-core/tsconfig.lib.json",
|
||||
"assets": ["libs/storage-core/*.md"]
|
||||
"assets": ["libs/storage-core/*.md"],
|
||||
"rootDir": "libs/storage-core/src"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
"description": "Test tools for the storage library",
|
||||
"private": true,
|
||||
"type": "commonjs",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"license": "GPL-3.0",
|
||||
"author": "platform"
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
"outputPath": "dist/libs/storage-test-utils",
|
||||
"main": "libs/storage-test-utils/src/index.ts",
|
||||
"tsConfig": "libs/storage-test-utils/tsconfig.lib.json",
|
||||
"assets": ["libs/storage-test-utils/*.md"]
|
||||
"assets": ["libs/storage-test-utils/*.md"],
|
||||
"rootDir": "libs/storage-test-utils/src"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
"version": "0.0.0",
|
||||
"description": "The very basic concept that constitutes a user, this needs to be very low level to facilitate Platform keeping their own code low level.",
|
||||
"type": "commonjs",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"license": "GPL-3.0",
|
||||
"author": "auth"
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
"outputPath": "dist/libs/user-core",
|
||||
"main": "libs/user-core/src/index.ts",
|
||||
"tsConfig": "libs/user-core/tsconfig.lib.json",
|
||||
"assets": ["libs/user-core/*.md"]
|
||||
"assets": ["libs/user-core/*.md"],
|
||||
"rootDir": "libs/user-core/src"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
|
||||
Reference in New Issue
Block a user