diff --git a/package.json b/package.json index 234afd65361..29fd001a783 100644 --- a/package.json +++ b/package.json @@ -77,6 +77,32 @@ "styles": [ "index" ] + }, + "compass-readonly": { + "name": "mongodb-compass-readonly", + "productName": "MongoDB Compass Readonly", + "bundleId": "com.mongodb.compass.readonly", + "plugins-directory": ".mongodb/compass-readonly/plugins", + "readonly": true, + "plugins": [ + "node_modules/@mongodb-js/compass-crud", + "node_modules/@mongodb-js/compass-collection-stats", + "node_modules/@mongodb-js/compass-connect", + "node_modules/@mongodb-js/compass-auth-kerberos", + "node_modules/@mongodb-js/compass-auth-ldap", + "node_modules/@mongodb-js/compass-auth-x509", + "node_modules/@mongodb-js/compass-document-validation", + "node_modules/@mongodb-js/compass-deployment-awareness", + "node_modules/@mongodb-js/compass-query-history", + "node_modules/@mongodb-js/compass-security", + "node_modules/@mongodb-js/compass-serverstats", + "node_modules/@mongodb-js/compass-server-version", + "node_modules/@mongodb-js/compass-ssh-tunnel-status", + "node_modules/@mongodb-js/compass-status" + ], + "styles": [ + "index" + ] } }, "build": { diff --git a/src/setup-hadron-distribution.js b/src/setup-hadron-distribution.js index 9de3df3741b..d39b85aaf1f 100644 --- a/src/setup-hadron-distribution.js +++ b/src/setup-hadron-distribution.js @@ -9,8 +9,11 @@ if (!process.env.HADRON_DISTRIBUTION) { process.env.HADRON_DISTRIBUTION = distribution; } -const name = pkg.config.hadron.distributions[process.env.HADRON_DISTRIBUTION].name; +const config = pkg.config.hadron.distributions[process.env.HADRON_DISTRIBUTION]; +const name = config.name; +const readonly = config.readonly; process.env.HADRON_PRODUCT = name || 'mongodb-compass'; +process.env.HADRON_READONLY = readonly || false; if (pkg.distribution) { process.env.NODE_ENV = 'production';