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 @@
{
"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"
}
}
}
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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',

View File

@ -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;
});