@leverege/build-tools 2.8.2 → 2.8.4

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.
@@ -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
@@ -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.2",
3
+ "version": "2.8.4",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/dockreate CHANGED
@@ -76,7 +76,7 @@ ENV GRPC_VERBOSITY ERROR
76
76
  COPY ./.npmrc /usr/src/app/.npmrc
77
77
  RUN apk --no-cache add openssh-client && \
78
78
  apk --update add --no-cache --virtual build-dep g++ gcc libgcc \\
79
- libstdc++ linux-headers make python ${apkadds} && \
79
+ libstdc++ linux-headers make ${apkadds} && \
80
80
  npm install -g npm@7 && \
81
81
  npm ci --only-production --ignore-scripts ${npmlogging} && \
82
82
  rm -f /usr/src/app/.npmrc /root/.ssh/*
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