@workit-dev/pi 2.29.1 → 2.29.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.
Files changed (3) hide show
  1. package/dist/worker.js +24 -13
  2. package/dist/workit.js +532 -446
  3. package/package.json +1 -1
package/dist/worker.js CHANGED
@@ -6460,6 +6460,9 @@ var checkoutRemotes = (cwd) => {
6460
6460
  return out;
6461
6461
  };
6462
6462
 
6463
+ // packages/workit-core/src/core/grant-seal.ts
6464
+ var SEAL_COMMAND = "workit workspace seal";
6465
+
6463
6466
  // packages/workit-core/src/core/workspaces.ts
6464
6467
  var nonBlank = string2().check(refine((value) => value.trim().length > 0, "must not be blank"));
6465
6468
  var branchPreset = custom((value) => typeof value === "string" && Object.hasOwn(PRESETS, value), "unsupported branch preset");
@@ -6882,7 +6885,7 @@ var resolveWorkspaceFromEntries = (cwd, entries, workspaceName, remotes) => {
6882
6885
  var runtimeWorkspaceIndexSchema = looseObject({
6883
6886
  workspaces: optional(array(looseObject({ name: nonBlank, glob: nonBlank })))
6884
6887
  });
6885
- var matchRuntimeWorkspace = (cwd, dir = configDir2()) => {
6888
+ var matchRuntimeWorkspace = (cwd, dir = configDir2(), workspaceName = namedWorkspace()) => {
6886
6889
  const file = path6.join(dir, "workspaces.json");
6887
6890
  let raw;
6888
6891
  try {
@@ -6909,12 +6912,16 @@ var matchRuntimeWorkspace = (cwd, dir = configDir2()) => {
6909
6912
  if (!glob.ok)
6910
6913
  throw new WorkspaceConfigError(`${file} workspace ${entry.name}: ${glob.error}`);
6911
6914
  }
6912
- const workspaceName = process.env.WORKIT_WORKSPACE_NAME?.trim() || undefined;
6913
- const selected = resolveWorkspaceFromEntries(cwd, entries ?? [], workspaceName, true);
6915
+ const matched = matchAmong(cwd, entries ?? [], workspaceName);
6916
+ return matched ? { file, ...matched } : null;
6917
+ };
6918
+ var namedWorkspace = () => process.env.WORKIT_WORKSPACE_NAME?.trim() || null;
6919
+ var matchAmong = (cwd, entries, workspaceName = namedWorkspace()) => {
6920
+ const selected = resolveWorkspaceFromEntries(cwd, entries, workspaceName ?? undefined, true);
6914
6921
  if (!selected)
6915
6922
  return null;
6916
- const matches = matchingEntries(cwd, entries ?? []);
6917
- return { file, selected, matches: matches.length ? matches : [selected] };
6923
+ const matches = matchingEntries(cwd, entries);
6924
+ return { selected, matches: matches.length ? matches : [selected] };
6918
6925
  };
6919
6926
  var modelSources = (cwd, dir) => {
6920
6927
  const out = [];
@@ -7224,7 +7231,7 @@ var takeMoveLock = (target) => {
7224
7231
  pause(25);
7225
7232
  }
7226
7233
  };
7227
- var canonical3 = (dir) => {
7234
+ var canonical4 = (dir) => {
7228
7235
  try {
7229
7236
  return fs4.realpathSync.native(dir);
7230
7237
  } catch {
@@ -7235,13 +7242,13 @@ var below = (parent, child) => {
7235
7242
  const rel = path7.relative(parent, child);
7236
7243
  return rel !== "" && !rel.startsWith("..") && !path7.isAbsolute(rel);
7237
7244
  };
7238
- var insideTempDir = (dir, tempDir = os5.tmpdir()) => below(canonical3(tempDir), canonical3(dir));
7245
+ var insideTempDir = (dir, tempDir = os5.tmpdir()) => below(canonical4(tempDir), canonical4(dir));
7239
7246
  var TEST_RUN_REFUSALS = "folder-store-refusals.log";
7240
7247
  var testRunFolderRefusal = (folder, hasStray, env = process.env, tempDir = os5.tmpdir()) => {
7241
7248
  if (env.WORKIT_TEST_RUN === undefined || !hasStray)
7242
7249
  return null;
7243
- const real = canonical3(folder);
7244
- const tmp = canonical3(tempDir);
7250
+ const real = canonical4(folder);
7251
+ const tmp = canonical4(tempDir);
7245
7252
  if (insideTempDir(folder, tempDir))
7246
7253
  return null;
7247
7254
  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)`;
@@ -8426,9 +8433,6 @@ Skills: load the skill, never act from memory.
8426
8433
  - retro (user-invoked; offer it): workit-retro
8427
8434
  - architecture, deepen modules (user-invoked; offer it): workit-architecture
8428
8435
  `.trim();
8429
- // packages/workit-core/src/core/grant-seal.ts
8430
- var SEAL_COMMAND = "workit workspace seal";
8431
-
8432
8436
  // packages/workit-core/src/forge/redact.ts
8433
8437
  var NAME = "[A-Za-z0-9_.-]";
8434
8438
  var KEY = String.raw`(?<!${NAME})(?=${NAME}*?(?:token|secret|password|passwd|pwd|api[_-]?key|access[_-]?key|account[_-]?key|private[_-]?key|client[_-]?secret|credentials?|authorization|cookie|signature))${NAME}+`;
@@ -8456,7 +8460,14 @@ var SCOPE_FIELDS = new Set([
8456
8460
  "autoApprove",
8457
8461
  "defaultEndpoint",
8458
8462
  "verification",
8459
- "youtrack"
8463
+ "youtrack",
8464
+ "releaseNotes",
8465
+ "releaseTagPrefix",
8466
+ "branchPolicy",
8467
+ "profiles",
8468
+ "defaultProfile",
8469
+ "releaseTracks",
8470
+ "releasePackages"
8460
8471
  ]);
8461
8472
 
8462
8473
  // packages/workit-core/src/core/release-packages.ts