@sqaitech/shared 0.30.12 → 0.30.13
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/es/logger.mjs +1 -1
- package/dist/es/utils.mjs +2 -2
- package/dist/lib/logger.js +1 -1
- package/dist/lib/utils.js +2 -2
- package/package.json +1 -1
- package/src/logger.ts +1 -1
- package/src/utils.ts +2 -2
package/dist/es/logger.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import node_util from "node:util";
|
|
|
4
4
|
import debug from "debug";
|
|
5
5
|
import { getMidsceneRunSubDir } from "./common.mjs";
|
|
6
6
|
import { ifInNode } from "./utils.mjs";
|
|
7
|
-
const topicPrefix = '
|
|
7
|
+
const topicPrefix = 'sqai';
|
|
8
8
|
const logStreams = new Map();
|
|
9
9
|
const debugInstances = new Map();
|
|
10
10
|
function getLogStream(topic) {
|
package/dist/es/utils.mjs
CHANGED
|
@@ -52,8 +52,8 @@ async function repeat(times, fn) {
|
|
|
52
52
|
}
|
|
53
53
|
const utils_REGEXP_LT = /</g;
|
|
54
54
|
const utils_REGEXP_GT = />/g;
|
|
55
|
-
const REGEXP_LT_ESCAPE = '
|
|
56
|
-
const REGEXP_GT_ESCAPE = '
|
|
55
|
+
const REGEXP_LT_ESCAPE = '__sqai_lt__';
|
|
56
|
+
const REGEXP_GT_ESCAPE = '__sqai_gt__';
|
|
57
57
|
const escapeScriptTag = (html)=>html.replace(utils_REGEXP_LT, REGEXP_LT_ESCAPE).replace(utils_REGEXP_GT, REGEXP_GT_ESCAPE);
|
|
58
58
|
const antiEscapeScriptTag = (html)=>{
|
|
59
59
|
const REGEXP_LT = new RegExp(REGEXP_LT_ESCAPE, 'g');
|
package/dist/lib/logger.js
CHANGED
|
@@ -47,7 +47,7 @@ const external_debug_namespaceObject = require("debug");
|
|
|
47
47
|
var external_debug_default = /*#__PURE__*/ __webpack_require__.n(external_debug_namespaceObject);
|
|
48
48
|
const external_common_js_namespaceObject = require("./common.js");
|
|
49
49
|
const external_utils_js_namespaceObject = require("./utils.js");
|
|
50
|
-
const topicPrefix = '
|
|
50
|
+
const topicPrefix = 'sqai';
|
|
51
51
|
const logStreams = new Map();
|
|
52
52
|
const debugInstances = new Map();
|
|
53
53
|
function getLogStream(topic) {
|
package/dist/lib/utils.js
CHANGED
|
@@ -92,8 +92,8 @@ async function repeat(times, fn) {
|
|
|
92
92
|
}
|
|
93
93
|
const utils_REGEXP_LT = /</g;
|
|
94
94
|
const utils_REGEXP_GT = />/g;
|
|
95
|
-
const REGEXP_LT_ESCAPE = '
|
|
96
|
-
const REGEXP_GT_ESCAPE = '
|
|
95
|
+
const REGEXP_LT_ESCAPE = '__sqai_lt__';
|
|
96
|
+
const REGEXP_GT_ESCAPE = '__sqai_gt__';
|
|
97
97
|
const escapeScriptTag = (html)=>html.replace(utils_REGEXP_LT, REGEXP_LT_ESCAPE).replace(utils_REGEXP_GT, REGEXP_GT_ESCAPE);
|
|
98
98
|
const antiEscapeScriptTag = (html)=>{
|
|
99
99
|
const REGEXP_LT = new RegExp(REGEXP_LT_ESCAPE, 'g');
|
package/package.json
CHANGED
package/src/logger.ts
CHANGED
|
@@ -5,7 +5,7 @@ import debug from 'debug';
|
|
|
5
5
|
import { getMidsceneRunSubDir } from './common';
|
|
6
6
|
import { ifInNode } from './utils';
|
|
7
7
|
|
|
8
|
-
const topicPrefix = '
|
|
8
|
+
const topicPrefix = 'sqai';
|
|
9
9
|
// Map to store file streams
|
|
10
10
|
const logStreams = new Map<string, fs.WriteStream>();
|
|
11
11
|
// Map to store debug instances
|
package/src/utils.ts
CHANGED
|
@@ -105,8 +105,8 @@ export async function repeat(
|
|
|
105
105
|
|
|
106
106
|
const REGEXP_LT = /</g;
|
|
107
107
|
const REGEXP_GT = />/g;
|
|
108
|
-
const REGEXP_LT_ESCAPE = '
|
|
109
|
-
const REGEXP_GT_ESCAPE = '
|
|
108
|
+
const REGEXP_LT_ESCAPE = '__sqai_lt__';
|
|
109
|
+
const REGEXP_GT_ESCAPE = '__sqai_gt__';
|
|
110
110
|
|
|
111
111
|
export const escapeScriptTag = (html: string) => {
|
|
112
112
|
return html
|