mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
[PM-25911] Add commercial sdk internal as dependency (#16883)
* feat: add commercial sdk as optional dependency * feat: add alias to CLI * feat: add alias to browser * feat: add alias to web * fix: revert optional - we cant omit optional dependencies or the builds break * feat: remove commercial package from browser build * feat: remove commercial package from cli build * feat: remove commercial package from web build * chore: add commercial sdk to renovate * fix: windows cli workflow * fix: accidental change * feat: add lint for version string * undo weird merge changes
This commit is contained in:
@@ -36,7 +36,8 @@ const DEFAULT_PARAMS = {
|
||||
* outputPath?: string;
|
||||
* mode?: string;
|
||||
* env?: string;
|
||||
* additionalEntries?: { [outputPath: string]: string }
|
||||
* additionalEntries?: { [outputPath: string]: string };
|
||||
* importAliases?: import("webpack").ResolveOptions["alias"];
|
||||
* }} params - The input parameters for building the config.
|
||||
*/
|
||||
module.exports.buildConfig = function buildConfig(params) {
|
||||
@@ -362,6 +363,7 @@ module.exports.buildConfig = function buildConfig(params) {
|
||||
path: require.resolve("path-browserify"),
|
||||
},
|
||||
cache: true,
|
||||
alias: params.importAliases,
|
||||
},
|
||||
output: {
|
||||
filename: "[name].js",
|
||||
@@ -482,6 +484,7 @@ module.exports.buildConfig = function buildConfig(params) {
|
||||
path: require.resolve("path-browserify"),
|
||||
},
|
||||
cache: true,
|
||||
alias: params.importAliases,
|
||||
},
|
||||
dependencies: ["main"],
|
||||
plugins: [...requiredPlugins, new AngularCheckPlugin()],
|
||||
|
||||
@@ -31,6 +31,7 @@ const DEFAULT_PARAMS = {
|
||||
* localesPath?: string;
|
||||
* externalsModulesDir?: string;
|
||||
* watch?: boolean;
|
||||
* importAliases?: import("webpack").ResolveOptions["alias"];
|
||||
* }} params
|
||||
*/
|
||||
module.exports.buildConfig = function buildConfig(params) {
|
||||
@@ -95,6 +96,7 @@ module.exports.buildConfig = function buildConfig(params) {
|
||||
symlinks: false,
|
||||
modules: params.modulesPath,
|
||||
plugins: [new TsconfigPathsPlugin({ configFile: params.tsConfig })],
|
||||
alias: params.importAliases,
|
||||
},
|
||||
output: {
|
||||
filename: "[name].js",
|
||||
|
||||
@@ -9,6 +9,12 @@ COPY package*.json ./
|
||||
COPY . .
|
||||
RUN npm ci
|
||||
|
||||
# Remove commercial packages if LICENSE_TYPE is not 'commercial'
|
||||
ARG LICENSE_TYPE=oss
|
||||
RUN if [ "${LICENSE_TYPE}" != "commercial" ] ; then \
|
||||
rm -rf node_modules/@bitwarden/commercial-sdk-internal ; \
|
||||
fi
|
||||
|
||||
WORKDIR /source/apps/web
|
||||
ARG NPM_COMMAND=dist:bit:selfhost
|
||||
RUN npm run ${NPM_COMMAND}
|
||||
|
||||
@@ -36,6 +36,7 @@ const DEFAULT_PARAMS = {
|
||||
* outputPath?: string;
|
||||
* mode?: string;
|
||||
* env?: string;
|
||||
* importAliases?: import("webpack").ResolveOptions["alias"];
|
||||
* }} params
|
||||
*/
|
||||
module.exports.buildConfig = function buildConfig(params) {
|
||||
@@ -460,6 +461,7 @@ module.exports.buildConfig = function buildConfig(params) {
|
||||
process: false,
|
||||
path: require.resolve("path-browserify"),
|
||||
},
|
||||
alias: params.importAliases,
|
||||
},
|
||||
output: {
|
||||
filename: "[name].[contenthash].js",
|
||||
|
||||
Reference in New Issue
Block a user