Fixed copyright headers, corrected NGINX constants in logging.js and reverted unnecessary changes in package.json and vue.config.js

pull/486/head
Himanshu Bhatt 2024-10-03 17:40:26 +05:30
parent 5c59680fd9
commit 8b774d2a5e
11 changed files with 26 additions and 37 deletions

View File

@ -1,5 +1,5 @@
/* /*
Copyright 2021 DigitalOcean Copyright 2024 DigitalOcean
This code is licensed under the MIT License. This code is licensed under the MIT License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -1,5 +1,5 @@
/* /*
Copyright 2020 DigitalOcean Copyright 2024 DigitalOcean
This code is licensed under the MIT License. This code is licensed under the MIT License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -1,5 +1,5 @@
/* /*
Copyright 2022 DigitalOcean Copyright 2024 DigitalOcean
This code is licensed under the MIT License. This code is licensed under the MIT License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -1,5 +1,5 @@
/* /*
Copyright 2022 DigitalOcean Copyright 2024 DigitalOcean
This code is licensed under the MIT License. This code is licensed under the MIT License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -1,5 +1,5 @@
/* /*
Copyright 2021 DigitalOcean Copyright 2024 DigitalOcean
This code is licensed under the MIT License. This code is licensed under the MIT License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -1,5 +1,5 @@
/* /*
Copyright 2022 DigitalOcean Copyright 2024 DigitalOcean
This code is licensed under the MIT License. This code is licensed under the MIT License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -1,5 +1,5 @@
/* /*
Copyright 2020 DigitalOcean Copyright 2024 DigitalOcean
This code is licensed under the MIT License. This code is licensed under the MIT License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -1,5 +1,5 @@
/* /*
Copyright 2022 DigitalOcean Copyright 2024 DigitalOcean
This code is licensed under the MIT License. This code is licensed under the MIT License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -24,12 +24,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
*/ */
export const accessLogPathDefault = '/var/log/nginx/access.log.js'; export const accessLogPathDefault = '/var/log/nginx/access.log';
export const accessLogParamsDefault = 'buffer=512k flush=1m.js'; export const accessLogParamsDefault = 'buffer=512k flush=1m';
export const errorLogPathDefault = '/var/log/nginx/error.log.js'; export const errorLogPathDefault = '/var/log/nginx/error.log';
export const errorLogPathDisabled = '/dev/null.js'; export const errorLogPathDisabled = '/dev/null';
export const errorLogLevelDefault = 'warn.js'; export const errorLogLevelDefault = 'warn';
export const errorLogLevelOptions = Object.freeze([ export const errorLogLevelOptions = Object.freeze([
'debug', 'debug',
'info', 'info',

View File

@ -1,5 +1,5 @@
/* /*
Copyright 2024 DigitalOcean Copyright 2022 DigitalOcean
This code is licensed under the MIT License. This code is licensed under the MIT License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -42,22 +42,12 @@ export default {
node: false, // Disable Node.js polyfills (Buffer etc.) -- This will be default in Webpack 5 node: false, // Disable Node.js polyfills (Buffer etc.) -- This will be default in Webpack 5
plugins: [ plugins: [
// Fix dynamic imports from CDN (inject as first entry point before any imports can happen) // Fix dynamic imports from CDN (inject as first entry point before any imports can happen)
{ { apply: compiler => {
apply: (compiler) => {
compiler.options.entry.app.import.unshift( compiler.options.entry.app.import.unshift(
fileURLToPath( fileURLToPath(new URL('src/nginxconfig/build/webpack-dynamic-import.js', import.meta.url)),
new URL(
'src/nginxconfig/build/webpack-dynamic-import.js',
import.meta.url,
),
),
); );
}, } },
}, new WebpackRequireFrom({ methodName: '__webpackDynamicImportURL', suppressErrors: true }),
new WebpackRequireFrom({
methodName: '__webpackDynamicImportURL',
suppressErrors: true,
}),
// Pass the env in for logging // Pass the env in for logging
new webpack.EnvironmentPlugin({ NODE_ENV: 'development' }), new webpack.EnvironmentPlugin({ NODE_ENV: 'development' }),
// Analyze the bundle // Analyze the bundle
@ -65,11 +55,10 @@ export default {
new DuplicatePackageCheckerPlugin(), new DuplicatePackageCheckerPlugin(),
], ],
}, },
chainWebpack: (config) => { chainWebpack: config => {
// Inject resolve-url-loader into the SCSS loader rules (to allow relative fonts in do-bulma to work) // Inject resolve-url-loader into the SCSS loader rules (to allow relative fonts in do-bulma to work)
for (const rule of ['vue-modules', 'vue', 'normal-modules', 'normal']) { for (const rule of ['vue-modules', 'vue', 'normal-modules', 'normal']) {
config.module config.module.rule('scss')
.rule('scss')
.oneOf(rule) .oneOf(rule)
.use('resolve-url-loader') .use('resolve-url-loader')
.loader('resolve-url-loader') .loader('resolve-url-loader')
@ -77,11 +66,11 @@ export default {
.end() .end()
.use('sass-loader') .use('sass-loader')
.loader('sass-loader') .loader('sass-loader')
.tap((options) => ({ ...options, sourceMap: true })); .tap(options => ({ ...options, sourceMap: true }));
} }
// Use a custom HTML template // Use a custom HTML template
config.plugin('html').tap((options) => { config.plugin('html').tap(options => {
options[0].template = fileURLToPath(new URL('build/index.html', import.meta.url)); options[0].template = fileURLToPath(new URL('build/index.html', import.meta.url));
return options; return options;
}); });