@brainervirus/workit-cli 0.5.6 → 0.6.1
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/index.js +40 -11
- package/package.json +11 -11
package/dist/index.js
CHANGED
|
@@ -23128,13 +23128,25 @@ function writeWorkspaces(entries) {
|
|
|
23128
23128
|
}
|
|
23129
23129
|
const provider = entry.vcs?.provider;
|
|
23130
23130
|
if (provider && !VALID_PROVIDERS.includes(provider)) {
|
|
23131
|
-
return {
|
|
23131
|
+
return {
|
|
23132
|
+
ok: false,
|
|
23133
|
+
error: `workspace "${entry.name}" has unknown provider "${provider}"`,
|
|
23134
|
+
path: file
|
|
23135
|
+
};
|
|
23132
23136
|
}
|
|
23133
23137
|
if (entry.youtrack && provider !== "gitlab") {
|
|
23134
|
-
return {
|
|
23138
|
+
return {
|
|
23139
|
+
ok: false,
|
|
23140
|
+
error: `workspace "${entry.name}" links YouTrack issues but provider is "${provider ?? "unset"}" — youtrack linking requires the gitlab provider`,
|
|
23141
|
+
path: file
|
|
23142
|
+
};
|
|
23135
23143
|
}
|
|
23136
23144
|
if (entry.issues && provider !== "github") {
|
|
23137
|
-
return {
|
|
23145
|
+
return {
|
|
23146
|
+
ok: false,
|
|
23147
|
+
error: `workspace "${entry.name}" links GitHub issues but provider is "${provider ?? "unset"}" — github issues require the github provider`,
|
|
23148
|
+
path: file
|
|
23149
|
+
};
|
|
23138
23150
|
}
|
|
23139
23151
|
}
|
|
23140
23152
|
mkdirSync2(path7.dirname(file), { recursive: true });
|
|
@@ -23534,7 +23546,13 @@ function WorkspacesStep({ setResults, onDone }) {
|
|
|
23534
23546
|
const [loaded] = import_react65.useState(() => loadWorkspaces());
|
|
23535
23547
|
const [entries, setEntries] = import_react65.useState(loaded);
|
|
23536
23548
|
const [mode, setMode] = import_react65.useState("list");
|
|
23537
|
-
const [draft, setDraft] = import_react65.useState({
|
|
23549
|
+
const [draft, setDraft] = import_react65.useState({
|
|
23550
|
+
name: "",
|
|
23551
|
+
glob: "",
|
|
23552
|
+
provider: "gitlab",
|
|
23553
|
+
branch: "develop",
|
|
23554
|
+
linking: "none"
|
|
23555
|
+
});
|
|
23538
23556
|
const [fieldError, setFieldError] = import_react65.useState(null);
|
|
23539
23557
|
const [writeError, setWriteError] = import_react65.useState(null);
|
|
23540
23558
|
const resetDraft = () => setDraft({ name: "", glob: "", provider: "gitlab", branch: "develop", linking: "none" });
|
|
@@ -23758,7 +23776,10 @@ function WorkspacesStep({ setResults, onDone }) {
|
|
|
23758
23776
|
options: WS_LINKING[draft.provider],
|
|
23759
23777
|
onChange: (v) => {
|
|
23760
23778
|
const linking = v;
|
|
23761
|
-
const vcs = {
|
|
23779
|
+
const vcs = {
|
|
23780
|
+
provider: draft.provider,
|
|
23781
|
+
...draft.branch ? { defaultTargetBranch: draft.branch } : {}
|
|
23782
|
+
};
|
|
23762
23783
|
setEntries([
|
|
23763
23784
|
...entries,
|
|
23764
23785
|
{
|
|
@@ -23790,7 +23811,10 @@ function WorkspacesStep({ setResults, onDone }) {
|
|
|
23790
23811
|
children: "Select a workspace to remove:"
|
|
23791
23812
|
}, undefined, false, undefined, this),
|
|
23792
23813
|
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(Select, {
|
|
23793
|
-
options: entries.map((e) => ({
|
|
23814
|
+
options: entries.map((e) => ({
|
|
23815
|
+
label: `${e.name} — ${e.vcs?.provider ?? "?"}`,
|
|
23816
|
+
value: e.name
|
|
23817
|
+
})),
|
|
23794
23818
|
onChange: (v) => {
|
|
23795
23819
|
setEntries(entries.filter((e) => e.name !== v));
|
|
23796
23820
|
setWriteError(null);
|
|
@@ -23881,13 +23905,15 @@ function SummaryStep({ results, onExit }) {
|
|
|
23881
23905
|
}, undefined, true, undefined, this),
|
|
23882
23906
|
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(Text, {
|
|
23883
23907
|
children: [
|
|
23884
|
-
"
|
|
23908
|
+
" ",
|
|
23909
|
+
"token placeholder: ",
|
|
23885
23910
|
results.youtrack.tokenPath
|
|
23886
23911
|
]
|
|
23887
23912
|
}, undefined, true, undefined, this),
|
|
23888
23913
|
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(Text, {
|
|
23889
23914
|
children: [
|
|
23890
|
-
"
|
|
23915
|
+
" ",
|
|
23916
|
+
"create token: ",
|
|
23891
23917
|
results.youtrack.tokenCreateUrl
|
|
23892
23918
|
]
|
|
23893
23919
|
}, undefined, true, undefined, this)
|
|
@@ -23911,13 +23937,15 @@ function SummaryStep({ results, onExit }) {
|
|
|
23911
23937
|
}, undefined, true, undefined, this),
|
|
23912
23938
|
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(Text, {
|
|
23913
23939
|
children: [
|
|
23914
|
-
"
|
|
23940
|
+
" ",
|
|
23941
|
+
"token placeholder: ",
|
|
23915
23942
|
results.vcs.activeTokenPath
|
|
23916
23943
|
]
|
|
23917
23944
|
}, undefined, true, undefined, this),
|
|
23918
23945
|
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(Text, {
|
|
23919
23946
|
children: [
|
|
23920
|
-
"
|
|
23947
|
+
" ",
|
|
23948
|
+
"create token: ",
|
|
23921
23949
|
results.vcs.tokenCreateUrl
|
|
23922
23950
|
]
|
|
23923
23951
|
}, undefined, true, undefined, this)
|
|
@@ -23949,7 +23977,8 @@ function SummaryStep({ results, onExit }) {
|
|
|
23949
23977
|
}, undefined, false, undefined, this),
|
|
23950
23978
|
results.project.created.map((file) => /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Text, {
|
|
23951
23979
|
children: [
|
|
23952
|
-
"
|
|
23980
|
+
" ",
|
|
23981
|
+
"+ ",
|
|
23953
23982
|
file
|
|
23954
23983
|
]
|
|
23955
23984
|
}, file, true, undefined, this))
|
package/package.json
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brainervirus/workit-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Workit interactive setup wizard (Ink TUI)",
|
|
6
|
-
"license": "MIT",
|
|
7
6
|
"keywords": [
|
|
8
|
-
"opencode",
|
|
9
|
-
"cursor",
|
|
10
|
-
"workflow",
|
|
11
7
|
"cli",
|
|
12
|
-
"
|
|
8
|
+
"cursor",
|
|
9
|
+
"opencode",
|
|
10
|
+
"setup",
|
|
11
|
+
"workflow"
|
|
13
12
|
],
|
|
14
13
|
"bugs": {
|
|
15
14
|
"url": "https://github.com/BrainerVirus/workit/issues"
|
|
16
15
|
},
|
|
16
|
+
"license": "MIT",
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
19
|
"url": "https://github.com/BrainerVirus/workit.git"
|
|
20
20
|
},
|
|
21
|
+
"bin": {
|
|
22
|
+
"workit": "./dist/index.js"
|
|
23
|
+
},
|
|
21
24
|
"files": [
|
|
22
25
|
"dist/"
|
|
23
26
|
],
|
|
24
27
|
"type": "module",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
27
30
|
},
|
|
28
31
|
"scripts": {
|
|
29
32
|
"build": "bun build ./src/index.tsx --outdir dist --target node --format esm --banner \"#!/usr/bin/env node\" --external react-devtools-core --splitting",
|
|
30
33
|
"typecheck": "tsc --noEmit",
|
|
31
34
|
"prepublishOnly": "bun run build && bun run typecheck"
|
|
32
35
|
},
|
|
33
|
-
"publishConfig": {
|
|
34
|
-
"access": "public"
|
|
35
|
-
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@brainervirus/workit-core": "^0.4.0",
|
|
38
38
|
"@inkjs/ui": "2.0.0",
|