@workit-dev/pi 2.27.7 → 2.27.9
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/worker.js +6 -6
- package/dist/workit.js +1039 -278
- package/package.json +1 -1
package/dist/worker.js
CHANGED
|
@@ -6947,11 +6947,6 @@ var escapeRegExp = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
|
6947
6947
|
var resolveStateDir = () => stateDir(process.env);
|
|
6948
6948
|
var homePattern = new RegExp(`${escapeRegExp(os4.homedir())}(?=[/\\\\]|$)|\\$HOME(?=[/\\\\]|$)`, "g");
|
|
6949
6949
|
|
|
6950
|
-
// packages/workit-core/src/store/paths.ts
|
|
6951
|
-
import { spawnSync as spawnSync5 } from "node:child_process";
|
|
6952
|
-
import fs5 from "node:fs";
|
|
6953
|
-
import path8 from "node:path";
|
|
6954
|
-
|
|
6955
6950
|
// packages/workit-core/src/store/folder-store.ts
|
|
6956
6951
|
import fs4 from "node:fs";
|
|
6957
6952
|
import os5 from "node:os";
|
|
@@ -7168,13 +7163,14 @@ var below = (parent, child) => {
|
|
|
7168
7163
|
const rel = path7.relative(parent, child);
|
|
7169
7164
|
return rel !== "" && !rel.startsWith("..") && !path7.isAbsolute(rel);
|
|
7170
7165
|
};
|
|
7166
|
+
var insideTempDir = (dir, tempDir = os5.tmpdir()) => below(canonical3(tempDir), canonical3(dir));
|
|
7171
7167
|
var TEST_RUN_REFUSALS = "folder-store-refusals.log";
|
|
7172
7168
|
var testRunFolderRefusal = (folder, hasStray, env = process.env, tempDir = os5.tmpdir()) => {
|
|
7173
7169
|
if (env.WORKIT_TEST_RUN === undefined || !hasStray)
|
|
7174
7170
|
return null;
|
|
7175
7171
|
const real = canonical3(folder);
|
|
7176
7172
|
const tmp = canonical3(tempDir);
|
|
7177
|
-
if (
|
|
7173
|
+
if (insideTempDir(folder, tempDir))
|
|
7178
7174
|
return null;
|
|
7179
7175
|
return `workit test run (WORKIT_TEST_RUN): refusing to move ${path7.join(real, ".workit")} into the run's throwaway state dir; a test must work in a fresh dir inside ${tmp}, never the temp dir itself, a parent of it or a folder outside it (#892)`;
|
|
7180
7176
|
};
|
|
@@ -7260,6 +7256,9 @@ Merge them by hand (cp -Rn ${workit}/. ${target}/), then delete them here.
|
|
|
7260
7256
|
}
|
|
7261
7257
|
|
|
7262
7258
|
// packages/workit-core/src/store/paths.ts
|
|
7259
|
+
import { spawnSync as spawnSync5 } from "node:child_process";
|
|
7260
|
+
import fs5 from "node:fs";
|
|
7261
|
+
import path8 from "node:path";
|
|
7263
7262
|
var NOT_A_REPO = /not a git repository \(or any (of the parent directories|parent up to)/u;
|
|
7264
7263
|
var gitRun = (cwd, args) => {
|
|
7265
7264
|
const run = spawnSync5("git", args, {
|
|
@@ -7423,6 +7422,7 @@ var STAMPING_HOSTS = new Set([
|
|
|
7423
7422
|
"codex_cli",
|
|
7424
7423
|
"codex_desktop"
|
|
7425
7424
|
]);
|
|
7425
|
+
var pinFiles = new Map;
|
|
7426
7426
|
var OWN_CHILD_SHELL = new Set(["opencode", "pi"]);
|
|
7427
7427
|
var SESSION_UNSAFE = /[^A-Za-z0-9_.:@/+-]/g;
|
|
7428
7428
|
function childSessionId(lead, child) {
|