From 8b774d2a5e4a4e09182bd2e4d7bf8aa0c78f890d Mon Sep 17 00:00:00 2001 From: Himanshu Bhatt Date: Thu, 3 Oct 2024 17:40:26 +0530 Subject: [PATCH] Fixed copyright headers, corrected NGINX constants in logging.js and reverted unnecessary changes in package.json and vue.config.js --- package.json | 4 +-- .../en/templates/domain_sections/https.js | 2 +- src/nginxconfig/i18n/ru/index.js | 2 +- .../ru/templates/domain_sections/logging.js | 2 +- src/nginxconfig/util/analytics.js | 2 +- .../util/angular_backwards_compatibility.js | 2 +- src/nginxconfig/util/browser_language.js | 2 +- .../util/computed_from_defaults.js | 2 +- src/nginxconfig/util/import_data.js | 2 +- src/nginxconfig/util/logging.js | 10 +++--- vue.config.js | 33 +++++++------------ 11 files changed, 26 insertions(+), 37 deletions(-) diff --git a/package.json b/package.json index 5bc7a4e..bd7e2e7 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "nginxconfig.io", + "name": "nginxconfig.io", "version": "1.0.0", "description": "NGINX config generator on steroids", "license": "MIT", @@ -105,4 +105,4 @@ "vue": "^3.0.0" } } -} \ No newline at end of file +} diff --git a/src/nginxconfig/i18n/en/templates/domain_sections/https.js b/src/nginxconfig/i18n/en/templates/domain_sections/https.js index 30c3291..1dbe8dc 100644 --- a/src/nginxconfig/i18n/en/templates/domain_sections/https.js +++ b/src/nginxconfig/i18n/en/templates/domain_sections/https.js @@ -1,5 +1,5 @@ /* -Copyright 2021 DigitalOcean +Copyright 2024 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at diff --git a/src/nginxconfig/i18n/ru/index.js b/src/nginxconfig/i18n/ru/index.js index fbcf1a0..c4a6fc6 100644 --- a/src/nginxconfig/i18n/ru/index.js +++ b/src/nginxconfig/i18n/ru/index.js @@ -1,5 +1,5 @@ /* -Copyright 2020 DigitalOcean +Copyright 2024 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at diff --git a/src/nginxconfig/i18n/ru/templates/domain_sections/logging.js b/src/nginxconfig/i18n/ru/templates/domain_sections/logging.js index 2ed9371..7fffb60 100644 --- a/src/nginxconfig/i18n/ru/templates/domain_sections/logging.js +++ b/src/nginxconfig/i18n/ru/templates/domain_sections/logging.js @@ -1,5 +1,5 @@ /* -Copyright 2022 DigitalOcean +Copyright 2024 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at diff --git a/src/nginxconfig/util/analytics.js b/src/nginxconfig/util/analytics.js index 22dcc80..ace746a 100644 --- a/src/nginxconfig/util/analytics.js +++ b/src/nginxconfig/util/analytics.js @@ -1,5 +1,5 @@ /* -Copyright 2022 DigitalOcean +Copyright 2024 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at diff --git a/src/nginxconfig/util/angular_backwards_compatibility.js b/src/nginxconfig/util/angular_backwards_compatibility.js index 5c44782..0e2e888 100644 --- a/src/nginxconfig/util/angular_backwards_compatibility.js +++ b/src/nginxconfig/util/angular_backwards_compatibility.js @@ -1,5 +1,5 @@ /* -Copyright 2021 DigitalOcean +Copyright 2024 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at diff --git a/src/nginxconfig/util/browser_language.js b/src/nginxconfig/util/browser_language.js index d7bf4b3..f27afc0 100644 --- a/src/nginxconfig/util/browser_language.js +++ b/src/nginxconfig/util/browser_language.js @@ -1,5 +1,5 @@ /* -Copyright 2022 DigitalOcean +Copyright 2024 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at diff --git a/src/nginxconfig/util/computed_from_defaults.js b/src/nginxconfig/util/computed_from_defaults.js index a816c8e..cec32f0 100644 --- a/src/nginxconfig/util/computed_from_defaults.js +++ b/src/nginxconfig/util/computed_from_defaults.js @@ -1,5 +1,5 @@ /* -Copyright 2020 DigitalOcean +Copyright 2024 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at diff --git a/src/nginxconfig/util/import_data.js b/src/nginxconfig/util/import_data.js index afdc688..c70db27 100644 --- a/src/nginxconfig/util/import_data.js +++ b/src/nginxconfig/util/import_data.js @@ -1,5 +1,5 @@ /* -Copyright 2022 DigitalOcean +Copyright 2024 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at diff --git a/src/nginxconfig/util/logging.js b/src/nginxconfig/util/logging.js index 48f82c5..3b099ac 100644 --- a/src/nginxconfig/util/logging.js +++ b/src/nginxconfig/util/logging.js @@ -24,12 +24,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -export const accessLogPathDefault = '/var/log/nginx/access.log.js'; -export const accessLogParamsDefault = 'buffer=512k flush=1m.js'; +export const accessLogPathDefault = '/var/log/nginx/access.log'; +export const accessLogParamsDefault = 'buffer=512k flush=1m'; -export const errorLogPathDefault = '/var/log/nginx/error.log.js'; -export const errorLogPathDisabled = '/dev/null.js'; -export const errorLogLevelDefault = 'warn.js'; +export const errorLogPathDefault = '/var/log/nginx/error.log'; +export const errorLogPathDisabled = '/dev/null'; +export const errorLogLevelDefault = 'warn'; export const errorLogLevelOptions = Object.freeze([ 'debug', 'info', diff --git a/vue.config.js b/vue.config.js index 3bb50a1..4bcb2f1 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,5 +1,5 @@ /* -Copyright 2024 DigitalOcean +Copyright 2022 DigitalOcean This code is licensed under the MIT License. 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 plugins: [ // Fix dynamic imports from CDN (inject as first entry point before any imports can happen) - { - apply: (compiler) => { - compiler.options.entry.app.import.unshift( - fileURLToPath( - new URL( - 'src/nginxconfig/build/webpack-dynamic-import.js', - import.meta.url, - ), - ), - ); - }, - }, - new WebpackRequireFrom({ - methodName: '__webpackDynamicImportURL', - suppressErrors: true, - }), + { apply: compiler => { + compiler.options.entry.app.import.unshift( + fileURLToPath(new URL('src/nginxconfig/build/webpack-dynamic-import.js', import.meta.url)), + ); + } }, + new WebpackRequireFrom({ methodName: '__webpackDynamicImportURL', suppressErrors: true }), // Pass the env in for logging new webpack.EnvironmentPlugin({ NODE_ENV: 'development' }), // Analyze the bundle @@ -65,11 +55,10 @@ export default { new DuplicatePackageCheckerPlugin(), ], }, - chainWebpack: (config) => { + chainWebpack: config => { // 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']) { - config.module - .rule('scss') + config.module.rule('scss') .oneOf(rule) .use('resolve-url-loader') .loader('resolve-url-loader') @@ -77,11 +66,11 @@ export default { .end() .use('sass-loader') .loader('sass-loader') - .tap((options) => ({ ...options, sourceMap: true })); + .tap(options => ({ ...options, sourceMap: true })); } // 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)); return options; });