@rotorsoft/act-diagram 0.3.0 → 0.3.2

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/dist/index.js CHANGED
@@ -676,9 +676,9 @@ function resolve(imp, fromPath, byKey) {
676
676
  // src/client/lib/evaluate.ts
677
677
  var stripNonCode = (src, level = "full") => {
678
678
  const blank = (m) => m.replace(/[^\n]/g, " ");
679
- let result = src.replace(/\/\/[^\n]*/g, blank).replace(/\/\*[\s\S]*?\*\//g, blank).replace(/`(?:\\[\s\S]|[^`])*`/g, blank);
679
+ let result = src.replace(/\/\/[^\n]*/g, blank).replace(/\/\*[\s\S]*?\*\//g, blank).replace(/`(?:\\[\s\S]|[^`\\])*`/g, blank);
680
680
  if (level === "full") {
681
- result = result.replace(/"(?:\\[\s\S]|[^"])*"/g, blank).replace(/'(?:\\[\s\S]|[^'])*'/g, blank);
681
+ result = result.replace(/"(?:\\[\s\S]|[^"\\])*"/g, blank).replace(/'(?:\\[\s\S]|[^'\\])*'/g, blank);
682
682
  }
683
683
  return result;
684
684
  };
@@ -789,7 +789,7 @@ function execute(files) {
789
789
  "module",
790
790
  `
791
791
  "use strict";
792
- var __filename = "${file.path}";
792
+ var __filename = ${JSON.stringify(file.path)};
793
793
  var __dirname = ".";
794
794
  var process = { env: {}, cwd: function() { return "/"; }, exit: function() {}, on: function() {}, off: function() {} };
795
795
  var Buffer = { from: function() { return ""; } };