p-doom/crowd-code-dataset-0.2 huggingface dataset:
[content] src/recording.ts (typescript)

        try {
            const fileContent = await fs.promises.readFile(filePath, 'utf-8');

            if (fileContent) {
                const payload = {
                    fileName: `${fileName}.csv`,
                    content: fileContent
[tab] webpack.config.js (javascript)
const path = require('node:path')

//@ts-check
/** @typedef {import('webpack').Configuration} WebpackConfig **/

/** @type WebpackConfig */
const extensionConfig = {
	target: 'node', // VS Code extensions run in a Node.js-context 📖 -> https://webpack.js.org/configuration/node/
	mode: 'none', // this leaves the source code as close as possible to the original (when packaging we set this to 'production')

	entry: './src/extension.ts', // the entry point of this extension, 📖 -> https://webpack.js.org/configuration/entry-context/
	output: {
		// the bundle is stored in the 'out' folder (check package.json), 📖 -> https://webpack.js.org/configuration/output/
		path: path.resolve(__dirname, 'out'),
		filename: 'extension.js',
		libraryTarget: 'commonjs2',
	},
	externals: {
		vscode: 'commonjs vscode', // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, 📖 -> https://webpack.js.org/configuration/externals/
		// modules added here also need to be added in the .vscodeignore file
	},
	resolve: {
		// support reading TypeScript and JavaScript files, 📖 -> https://github.com/TypeStrong/ts-loader
		extensions: ['.ts', '.js'],
	},
	module: {
		rules: [
			{
				test: /\.ts$/,
				exclude: /node_modules/,
				use: [
					{
						loader: 'ts-loader',
					},
				],
			},
		],
	},
	devtool: 'nosources-source-map',
	infrastructureLogging: {
		level: 'log', // enables logging required for problem matchers
	},
}
module.exports = [extensionConfig]
[content] webpack.config.js (javascript)
plugins: [
        new webpack.DefinePlugin({
            // This replaces all instances of process.env.API_GATEWAY_URL in your code
            // with the actual value of the environment variable at build time.
            // JSON.stringify is crucial to ensure the value is injected as a string literal.
            'process.env.API_GATEWAY_URL': JSON.stringify(process.env.API_GATEWAY_URL)
        })
    ]
[content] src/recording.ts (typescript)
const API_GATEWAY_URL = process.env.API_GATEWAY_URL;

// You might want to add a fallback for local development or a check if it's undefined
if (!API_GATEWAY_URL) {
  console.error("API Gateway URL is not defined. Please check your build configuration.");
  // Potentially disable the upload feature if the URL is not set.
}