@brainervirus/workit-opencode 2.0.2 → 2.1.0

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 (2) hide show
  1. package/dist/plugin.js +10 -14
  2. package/package.json +2 -2
package/dist/plugin.js CHANGED
@@ -10514,13 +10514,6 @@ var workspaceConfigSchema = object({
10514
10514
  profiles: record(nonBlank, workspaceProfileSchema).optional(),
10515
10515
  releaseTracks: record(nonBlank, releaseTrackSchema).optional()
10516
10516
  }).passthrough().superRefine((workspace, context) => {
10517
- if (workspace.youtrack && workspace.vcs?.provider !== "gitlab") {
10518
- context.addIssue({
10519
- code: "custom",
10520
- path: ["youtrack"],
10521
- message: `YouTrack issue linking requires the gitlab provider, got ${workspace.vcs?.provider ?? "unset"}`
10522
- });
10523
- }
10524
10517
  if (workspace.issues && workspace.vcs?.provider !== "github") {
10525
10518
  context.addIssue({
10526
10519
  code: "custom",
@@ -10712,13 +10705,10 @@ var selectWorkspaceMatch = (matches, cwd, workspaceName) => {
10712
10705
  }
10713
10706
  return mostSpecific[0];
10714
10707
  };
10715
- var resolveWorkspaceFrom = (cwd, dir, workspaceName) => {
10716
- const result = readWorkspacesResult(dir);
10717
- if (result.status === "malformed" || result.status === "invalid")
10718
- throw new Error(result.error);
10708
+ var resolveWorkspaceFromEntries = (cwd, entries, workspaceName) => {
10719
10709
  const targets = [cwd, realpathOf(cwd)].map((p) => p.replaceAll("\\", "/"));
10720
10710
  const matches = [];
10721
- for (const ws of result.entries) {
10711
+ for (const ws of entries) {
10722
10712
  const glob = ws.glob.replaceAll("\\", "/");
10723
10713
  const canonical = canonicalGlob(glob);
10724
10714
  let matched = false;
@@ -10733,6 +10723,12 @@ var resolveWorkspaceFrom = (cwd, dir, workspaceName) => {
10733
10723
  }
10734
10724
  return selectWorkspaceMatch(matches, cwd, workspaceName) ?? null;
10735
10725
  };
10726
+ var resolveWorkspaceFrom = (cwd, dir, workspaceName) => {
10727
+ const result = readWorkspacesResult(dir);
10728
+ if (result.status === "malformed" || result.status === "invalid")
10729
+ throw new Error(result.error);
10730
+ return resolveWorkspaceFromEntries(cwd, result.entries, workspaceName);
10731
+ };
10736
10732
  var runtimeWorkspacePolicySchema = (kind) => {
10737
10733
  const key = kind === "branch" ? "branchPolicy" : kind === "commit" ? "commitPolicy" : "vcs";
10738
10734
  const policySchema = kind === "branch" ? workspaceBranchPolicySchema : kind === "commit" ? workspaceCommitPolicySchema : object({
@@ -11011,8 +11007,8 @@ function vcsConfig(mode, cwd) {
11011
11007
  const hasWorkspacePolicy = typeof wp.preset === "string" && Object.hasOwn(PRESETS, wp.preset);
11012
11008
  const policyDefault = resolveBranchPolicyFor(root).defaultTargetBranch;
11013
11009
  const defaultTarget = String(wsVcs.defaultTargetBranch ?? (hasWorkspacePolicy ? policyDefault : cfg.defaultTargetBranch ?? policyDefault) ?? "develop");
11014
- const linkIssues = provider === "gitlab" && typeof wsYt.link_issues === "boolean" ? wsYt.link_issues : null;
11015
- const youtrackBaseUrl = provider === "gitlab" && typeof wsYt.baseUrl === "string" ? wsYt.baseUrl : null;
11010
+ const linkIssues = typeof wsYt.link_issues === "boolean" ? wsYt.link_issues : null;
11011
+ const youtrackBaseUrl = typeof wsYt.baseUrl === "string" ? wsYt.baseUrl : null;
11016
11012
  let issuesProvider = null;
11017
11013
  let linkOnPr = null;
11018
11014
  if (provider === "github" && typeof wsIssues.provider === "string" && wsIssues.provider.toLowerCase() === "github") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-opencode",
3
- "version": "2.0.2",
3
+ "version": "2.1.0",
4
4
  "private": false,
5
5
  "description": "Workit OpenCode plugin — native tools, adaptive policy, and fourteen method skills",
6
6
  "keywords": [
@@ -39,7 +39,7 @@
39
39
  "typecheck": "tsc --noEmit"
40
40
  },
41
41
  "dependencies": {
42
- "@brainervirus/workit-core": "^2.0.2"
42
+ "@brainervirus/workit-core": "^2.1.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@opencode-ai/plugin": "1.18.30",