mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Enable azure cloud console in ADS (#8546)
* initial changes * Enable cloud console * Delete unnecessary code * error handling * error handling * Deal with promises * Fix externals * Fix externals for ws * Cleanup name of terminal * Update yarn.lock * Fix yarn.lock * Fix externals * Cleanup parts of the code * Fix more issues * Fix cloud terminal * Go back to our client ID * Fix message * Respect preferred location * Fix govt cloud * Some more messaging * Enable items on right click * Some feedback * Change to status message
This commit is contained in:
@@ -8,13 +8,30 @@
|
||||
'use strict';
|
||||
|
||||
const withDefaults = require('../shared.webpack.config');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const externals = {
|
||||
'node-fetch': 'commonjs node-fetch',
|
||||
'bufferutil': 'commonjs bufferutil',
|
||||
'utf-8-validate': 'commonjs utf-8-validate',
|
||||
'keytar': 'commonjs keytar',
|
||||
};
|
||||
|
||||
// conditionally add ws if we are going to be running in a node environment
|
||||
const yarnrcPath = path.join(__dirname, '.yarnrc');
|
||||
if (fs.existsSync(yarnrcPath)) {
|
||||
const yarnrc = fs.readFileSync(yarnrcPath).toString();
|
||||
const properties = yarnrc.split(/\r?\n/).map(r => r.split(' '));
|
||||
if (properties.find(r => r[0] === 'runtime')[1] === '"node"') {
|
||||
externals['ws'] = 'commonjs ws';
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = withDefaults({
|
||||
context: __dirname,
|
||||
entry: {
|
||||
extension: './src/extension.ts'
|
||||
},
|
||||
externals: {
|
||||
'keytar': 'commonjs keytar'
|
||||
}
|
||||
externals: externals
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user