querysub 0.276.0 → 0.277.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "querysub",
3
- "version": "0.276.0",
3
+ "version": "0.277.0",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "note1": "note on node-forge fork, see https://github.com/digitalbazaar/forge/issues/744 for details",
@@ -24,8 +24,14 @@ export async function commitAndPush(config: {
24
24
  gitDir: string;
25
25
  message: string;
26
26
  }) {
27
+ // Not for security, just so we can commit messages with special characters or newlines...
28
+ function escapeArg(message: string) {
29
+ return message.replaceAll("\\", "\\\\")
30
+ .replaceAll('"', '\\"')
31
+ .replaceAll("\n", "\\n");
32
+ }
27
33
  await runPromise(`git add --all`, { cwd: config.gitDir });
28
- await runPromise(`git commit -m "${config.message}"`, { cwd: config.gitDir });
34
+ await runPromise(`git commit -m "${escapeArg(config.message)}"`, { cwd: config.gitDir });
29
35
  await runPromise(`git push`, { cwd: config.gitDir });
30
36
  }
31
37
 
@@ -259,9 +259,6 @@ export class MachineServiceControllerBase {
259
259
  }
260
260
 
261
261
  public async commitPushService(commitMessage: string) {
262
-
263
- require("debugbreak")(2);
264
- debugger;
265
262
  if (commitMessage.toLowerCase().includes("querysub")) {
266
263
  let querysubFolder = path.resolve("../querysub");
267
264
  if (fs.existsSync(querysubFolder)) {