@runeya/runeya 2.0.20 → 2.0.21
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/agent/index.js +58 -4
- package/agent/index.js.map +1 -1
- package/package.json +1 -2
package/agent/index.js
CHANGED
|
@@ -74,8 +74,63 @@ import { join as join3, isAbsolute } from "path";
|
|
|
74
74
|
import { execa } from "execa";
|
|
75
75
|
import { execSync } from "child_process";
|
|
76
76
|
import { homedir } from "os";
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
|
|
78
|
+
// ../../node_modules/shellwords/dist/esm/index.js
|
|
79
|
+
var scan = (string, pattern, callback) => {
|
|
80
|
+
let result = "";
|
|
81
|
+
while (string.length > 0) {
|
|
82
|
+
const match = string.match(pattern);
|
|
83
|
+
if (match && match.index != null && match[0] != null) {
|
|
84
|
+
result += string.slice(0, match.index);
|
|
85
|
+
result += callback(match);
|
|
86
|
+
string = string.slice(match.index + match[0].length);
|
|
87
|
+
} else {
|
|
88
|
+
result += string;
|
|
89
|
+
string = "";
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return result;
|
|
93
|
+
};
|
|
94
|
+
var split = (line = "") => {
|
|
95
|
+
const words = [];
|
|
96
|
+
let field = "";
|
|
97
|
+
scan(
|
|
98
|
+
line,
|
|
99
|
+
/\s*(?:([^\s\\'"]+)|'((?:[^'\\]|\\.)*)'|"((?:[^"\\]|\\.)*)"|(\\.?)|(\S))(\s|$)?/,
|
|
100
|
+
(match) => {
|
|
101
|
+
const [_raw, word, sq, dq, escape2, garbage, separator] = match;
|
|
102
|
+
if (garbage != null) {
|
|
103
|
+
throw new Error(`Unmatched quote: ${line}`);
|
|
104
|
+
}
|
|
105
|
+
if (word) {
|
|
106
|
+
field += word;
|
|
107
|
+
} else {
|
|
108
|
+
let addition;
|
|
109
|
+
if (sq) {
|
|
110
|
+
addition = sq;
|
|
111
|
+
} else if (dq) {
|
|
112
|
+
addition = dq;
|
|
113
|
+
} else if (escape2) {
|
|
114
|
+
addition = escape2;
|
|
115
|
+
}
|
|
116
|
+
if (addition) {
|
|
117
|
+
field += addition.replace(/\\(?=.)/, "");
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
if (separator != null) {
|
|
121
|
+
words.push(field);
|
|
122
|
+
field = "";
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
if (field) {
|
|
127
|
+
words.push(field);
|
|
128
|
+
}
|
|
129
|
+
return words;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
// ../../packages/runner-native/src/native-runner.ts
|
|
133
|
+
var shellwordsSplit = split;
|
|
79
134
|
function expandEnvVars(str, serviceEnv) {
|
|
80
135
|
const withHome = str.replace(/^~(\/|$)/, `${homedir()}$1`);
|
|
81
136
|
return withHome.replace(/\$\{(\w+)\}|\$(\w+)/g, (_, braced, plain) => {
|
|
@@ -2645,7 +2700,6 @@ var MetricsCollector = class extends EventEmitter5 {
|
|
|
2645
2700
|
// src/services/health-checker.ts
|
|
2646
2701
|
import { EventEmitter as EventEmitter6 } from "events";
|
|
2647
2702
|
import { execa as execa3 } from "execa";
|
|
2648
|
-
import * as shellwordsModule2 from "shellwords";
|
|
2649
2703
|
|
|
2650
2704
|
// src/utils/env.ts
|
|
2651
2705
|
import { homedir as homedir4 } from "os";
|
|
@@ -3091,7 +3145,7 @@ function resolveCwd2(cwd, serviceEnv) {
|
|
|
3091
3145
|
}
|
|
3092
3146
|
|
|
3093
3147
|
// src/services/health-checker.ts
|
|
3094
|
-
var shellwordsSplit2 =
|
|
3148
|
+
var shellwordsSplit2 = split;
|
|
3095
3149
|
function buildHealthCheckEnv(serviceEnv = {}) {
|
|
3096
3150
|
const safeKeys = ["PATH", "HOME", "USER", "SHELL", "LANG", "TERM", "TMPDIR", "TZ"];
|
|
3097
3151
|
const env2 = {};
|