@leverege/build-tools 2.8.3 → 2.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/server/overwhelm.js
CHANGED
|
@@ -177,10 +177,15 @@ const yams = glob.sync('values-*.yaml'); // A function to apply the replacements
|
|
|
177
177
|
// will error out if it runs into an unknown OVH<tag>.
|
|
178
178
|
|
|
179
179
|
const doReplacements = (yamls, replacements) => {
|
|
180
|
-
let replYaml = yamls;
|
|
180
|
+
let replYaml = yamls; // wrap special chars with quotes if needed, like "#---incident-alerts---"
|
|
181
|
+
|
|
182
|
+
const quoteSpecials = raw => {
|
|
183
|
+
return /[#$?*]/g.test(raw) ? `"${raw}"` : raw;
|
|
184
|
+
};
|
|
185
|
+
|
|
181
186
|
Object.keys(replacements).forEach(repl => {
|
|
182
187
|
const replaceThis = new RegExp(`OVH:<${repl}>`, 'g');
|
|
183
|
-
const withThat = `${replacements[repl]}
|
|
188
|
+
const withThat = quoteSpecials(`${replacements[repl]}`);
|
|
184
189
|
replYaml = replYaml.replace(replaceThis, withThat);
|
|
185
190
|
}); // Verify all replaceables have been handled, or error out.
|
|
186
191
|
|
|
Binary file
|
package/lib/web/overwhelm.js
CHANGED
|
@@ -177,10 +177,15 @@ const yams = glob.sync('values-*.yaml'); // A function to apply the replacements
|
|
|
177
177
|
// will error out if it runs into an unknown OVH<tag>.
|
|
178
178
|
|
|
179
179
|
const doReplacements = (yamls, replacements) => {
|
|
180
|
-
let replYaml = yamls;
|
|
180
|
+
let replYaml = yamls; // wrap special chars with quotes if needed, like "#---incident-alerts---"
|
|
181
|
+
|
|
182
|
+
const quoteSpecials = raw => {
|
|
183
|
+
return /[#$?*]/g.test(raw) ? `"${raw}"` : raw;
|
|
184
|
+
};
|
|
185
|
+
|
|
181
186
|
Object.keys(replacements).forEach(repl => {
|
|
182
187
|
const replaceThis = new RegExp(`OVH:<${repl}>`, 'g');
|
|
183
|
-
const withThat = `${replacements[repl]}
|
|
188
|
+
const withThat = quoteSpecials(`${replacements[repl]}`);
|
|
184
189
|
replYaml = replYaml.replace(replaceThis, withThat);
|
|
185
190
|
}); // Verify all replaceables have been handled, or error out.
|
|
186
191
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leverege/build-tools",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.5",
|
|
4
4
|
"description": "A collection of build / support tools for Leverege developers",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"inquirer": "^8.2.0",
|
|
65
65
|
"js-yaml": "^4.1.0",
|
|
66
66
|
"ncp": "^2.0.0",
|
|
67
|
-
"npm-check-updates": "^12.0.
|
|
67
|
+
"npm-check-updates": "^12.0.2",
|
|
68
68
|
"npm-registry-fetch": "^11.0.0",
|
|
69
69
|
"open": "^8.4.0",
|
|
70
70
|
"ora": "^5.4.1",
|
package/src/overwhelm.js
CHANGED
|
@@ -96,6 +96,7 @@ Object.keys( cfgs ).forEach( ( key ) => { over[key] = cfgs[key] || over[key] } )
|
|
|
96
96
|
// PROJECT_ID : prod-rt-data
|
|
97
97
|
//
|
|
98
98
|
const varErrors = []
|
|
99
|
+
|
|
99
100
|
Object.keys( over ).forEach( ( key ) => {
|
|
100
101
|
if ( !over[key] ) return // no value to work with - skip it
|
|
101
102
|
|
|
@@ -134,9 +135,14 @@ const yams = glob.sync( 'values-*.yaml' )
|
|
|
134
135
|
const doReplacements = ( yamls, replacements ) => {
|
|
135
136
|
let replYaml = yamls
|
|
136
137
|
|
|
138
|
+
// wrap special chars with quotes if needed, like "#---incident-alerts---"
|
|
139
|
+
const quoteSpecials = ( raw ) => {
|
|
140
|
+
return /[#$?*]/g.test( raw ) ? `"${raw}"` : raw
|
|
141
|
+
}
|
|
142
|
+
|
|
137
143
|
Object.keys( replacements ).forEach( ( repl ) => {
|
|
138
144
|
const replaceThis = new RegExp( `OVH:<${repl}>`, 'g' )
|
|
139
|
-
const withThat = `${replacements[repl]}`
|
|
145
|
+
const withThat = quoteSpecials( `${replacements[repl]}` )
|
|
140
146
|
replYaml = replYaml.replace( replaceThis, withThat )
|
|
141
147
|
} )
|
|
142
148
|
|