@beyondwork/wb-cli 0.1.9 → 0.1.10-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/README.md +55 -0
- package/out/cli.js +168 -89
- package/out/lib/logger.js +1 -1
- package/out/lib/logger.js.map +1 -1
- package/out/lib/sync.js +211 -0
- package/out/lib/sync.js.map +1 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Beyond Work
|
|
2
|
+
|
|
3
|
+
Beyond Work is a tool for managing your work in a way that is easy to use and understand. This package provides both a VS Code extension and a command-line interface (CLI) for working with Beyond Work workblocks.
|
|
4
|
+
|
|
5
|
+
## VS Code Extension
|
|
6
|
+
|
|
7
|
+
The Beyond Work VS Code extension enables developers to write, test, and manage Workblocks directly within Visual Studio Code. Using a remote file system, it provides direct access to your Beyond Work Workblocks, making it the ideal tool for developers who want a full-featured editor for creating and updating Workblocks.
|
|
8
|
+
|
|
9
|
+
## CLI Tool
|
|
10
|
+
|
|
11
|
+
In addition to the VS Code extension, this package provides a command-line interface (CLI) for working with Beyond Work workblocks.
|
|
12
|
+
|
|
13
|
+
### Installation as a CLI tool
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install -g beyondwork
|
|
17
|
+
# or
|
|
18
|
+
yarn global add beyondwork
|
|
19
|
+
# or
|
|
20
|
+
pnpm add -g beyondwork
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### CLI Usage
|
|
24
|
+
|
|
25
|
+
#### Assemble a workblock from a directory
|
|
26
|
+
```bash
|
|
27
|
+
beyondwork assemble /path/to/workblock/dir [--output output.json]
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
This command takes a directory containing workblock files and assembles them into a complete workblock JSON object. The structure follows the Beyond Work format:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
Base dir/
|
|
34
|
+
work_block_1/
|
|
35
|
+
task_1/
|
|
36
|
+
assets/
|
|
37
|
+
asset1.txt
|
|
38
|
+
task_1.py
|
|
39
|
+
manifest.yaml
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Programmatic Usage
|
|
43
|
+
|
|
44
|
+
You can also use the library programmatically:
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
import { assembleWorkblock, storeWorkblockFiles } from 'beyondwork/lib/utils';
|
|
48
|
+
|
|
49
|
+
// Assemble a workblock from files
|
|
50
|
+
const workblock = await assembleWorkblock('/path/to/workblock');
|
|
51
|
+
|
|
52
|
+
// Store a workblock as files
|
|
53
|
+
await storeWorkblockFiles('/output/path', workblockObject);
|
|
54
|
+
```
|
|
55
|
+
|
package/out/cli.js
CHANGED
|
@@ -44,7 +44,7 @@ const logger = new lib_1.ConsoleLogger();
|
|
|
44
44
|
// Helper function for submitting workblocks
|
|
45
45
|
async function performSubmitWorkblock(workblockPathIdentifier, // Path used for logging, can be relative or absolute
|
|
46
46
|
publishUrl, basePathForResolution, // The path from which workblockPathIdentifier is resolved if relative
|
|
47
|
-
loggerToUse) {
|
|
47
|
+
loggerToUse, customHeaders = {}) {
|
|
48
48
|
const absoluteWorkblockPath = path.resolve(basePathForResolution, workblockPathIdentifier);
|
|
49
49
|
loggerToUse.log(`Attempting to assemble workblock from: ${absoluteWorkblockPath} (identifier: ${workblockPathIdentifier})`);
|
|
50
50
|
if (!fs.existsSync(absoluteWorkblockPath)) {
|
|
@@ -58,11 +58,13 @@ loggerToUse) {
|
|
|
58
58
|
}
|
|
59
59
|
const output = JSON.stringify(workblock, null, 2);
|
|
60
60
|
loggerToUse.log(`Submitting workblock from ${workblockPathIdentifier} to ${publishUrl}...`);
|
|
61
|
+
const headers = {
|
|
62
|
+
"Content-Type": "application/json",
|
|
63
|
+
...customHeaders,
|
|
64
|
+
};
|
|
61
65
|
const response = await fetch(publishUrl, {
|
|
62
|
-
method:
|
|
63
|
-
headers
|
|
64
|
-
'Content-Type': 'application/json',
|
|
65
|
-
},
|
|
66
|
+
method: "POST",
|
|
67
|
+
headers,
|
|
66
68
|
body: output,
|
|
67
69
|
});
|
|
68
70
|
if (response.ok) {
|
|
@@ -81,15 +83,76 @@ loggerToUse) {
|
|
|
81
83
|
throw new Error(`Failed to submit workblock from ${workblockPathIdentifier}. Status: ${response.status}`);
|
|
82
84
|
}
|
|
83
85
|
}
|
|
86
|
+
// Helper function for finding changed workblock directories
|
|
87
|
+
async function findChangedWorkblocks(workblockBaseDir, workspace, gitDiffBase, gitDiffHead, loggerToUse) {
|
|
88
|
+
const workspaceAbsPath = path.resolve(workspace);
|
|
89
|
+
loggerToUse.log("Determining changed workblock directories...");
|
|
90
|
+
loggerToUse.log(`Workspace: ${workspaceAbsPath}`);
|
|
91
|
+
loggerToUse.log(`Workblock Base Directory (relative to workspace): ${workblockBaseDir}`);
|
|
92
|
+
let diffOutput = "";
|
|
93
|
+
try {
|
|
94
|
+
const diffCommand = `git diff --name-only "${gitDiffBase}" "${gitDiffHead}"`;
|
|
95
|
+
loggerToUse.log(`Running git diff: ${diffCommand} in ${workspaceAbsPath}`);
|
|
96
|
+
diffOutput = (0, child_process_1.execSync)(diffCommand, {
|
|
97
|
+
cwd: workspaceAbsPath,
|
|
98
|
+
encoding: "utf8",
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
catch (e) {
|
|
102
|
+
const errorDetails = e instanceof Error ? e.message : String(e);
|
|
103
|
+
loggerToUse.error(`Failed to run git diff: ${errorDetails}`);
|
|
104
|
+
if (e && typeof e === "object" && "stderr" in e && e.stderr) {
|
|
105
|
+
loggerToUse.error(`Git stderr: ${String(e.stderr)}`);
|
|
106
|
+
}
|
|
107
|
+
throw new Error(`Failed to run git diff: ${errorDetails}`);
|
|
108
|
+
}
|
|
109
|
+
const allChangedFiles = diffOutput.split("\n").filter((f) => f.trim() !== "");
|
|
110
|
+
loggerToUse.log(`All changed files (${allChangedFiles.length}): ${allChangedFiles.join(", ") || "None"}`);
|
|
111
|
+
if (allChangedFiles.length === 0) {
|
|
112
|
+
loggerToUse.log("No files changed according to git diff.");
|
|
113
|
+
return [];
|
|
114
|
+
}
|
|
115
|
+
const manifestPattern = path.join(workblockBaseDir, "**/{manifest.yaml,*manifest.yaml}");
|
|
116
|
+
loggerToUse.log(`Searching for manifest files with pattern: ${manifestPattern} (relative to ${workspaceAbsPath})`);
|
|
117
|
+
// globSync expects patterns relative to its CWD option, or absolute paths.
|
|
118
|
+
const manifestFiles = (0, glob_1.sync)(manifestPattern, {
|
|
119
|
+
cwd: workspaceAbsPath,
|
|
120
|
+
nodir: true,
|
|
121
|
+
absolute: true,
|
|
122
|
+
});
|
|
123
|
+
loggerToUse.log(`Found manifest files (${manifestFiles.length}): ${manifestFiles.join(", ") || "None"}`);
|
|
124
|
+
if (manifestFiles.length === 0) {
|
|
125
|
+
loggerToUse.log("No manifest files found.");
|
|
126
|
+
return [];
|
|
127
|
+
}
|
|
128
|
+
const dirsToProcess = new Set();
|
|
129
|
+
for (const manifestFileAbs of manifestFiles) {
|
|
130
|
+
const workblockRootDirAbs = path.dirname(manifestFileAbs);
|
|
131
|
+
loggerToUse.log(`Potential workblock root (absolute): ${workblockRootDirAbs}`);
|
|
132
|
+
for (const changedFileRelative of allChangedFiles) {
|
|
133
|
+
const fullChangedFilePathAbs = path.resolve(workspaceAbsPath, changedFileRelative);
|
|
134
|
+
if (fullChangedFilePathAbs.startsWith(workblockRootDirAbs + path.sep) ||
|
|
135
|
+
fullChangedFilePathAbs === workblockRootDirAbs) {
|
|
136
|
+
const relativeWorkblockPath = path.relative(workspaceAbsPath, workblockRootDirAbs);
|
|
137
|
+
dirsToProcess.add(relativeWorkblockPath);
|
|
138
|
+
loggerToUse.log(`Found changed file '${changedFileRelative}' in workblock '${relativeWorkblockPath}'. Adding to process list.`);
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
const result = Array.from(dirsToProcess);
|
|
144
|
+
loggerToUse.log(`Found ${result.length} changed workblock directories: ${result.join(", ") || "None"}`);
|
|
145
|
+
return result;
|
|
146
|
+
}
|
|
84
147
|
// Define CLI
|
|
85
148
|
commander_1.program
|
|
86
|
-
.name(
|
|
87
|
-
.description(
|
|
88
|
-
.version(process.env.npm_package_version ||
|
|
149
|
+
.name("wb-cli") // Updated name
|
|
150
|
+
.description("CLI for working with Beyond Work workblocks")
|
|
151
|
+
.version(process.env.npm_package_version || "0.0.0");
|
|
89
152
|
commander_1.program
|
|
90
|
-
.command(
|
|
91
|
-
.description(
|
|
92
|
-
.option(
|
|
153
|
+
.command("assemble <directory>")
|
|
154
|
+
.description("Assemble a workblock from a directory")
|
|
155
|
+
.option("-o, --output <file>", "Output file (defaults to stdout)")
|
|
93
156
|
.action(async (directory, options) => {
|
|
94
157
|
try {
|
|
95
158
|
const dirPath = path.resolve(directory); // Resolves from CWD
|
|
@@ -99,7 +162,7 @@ commander_1.program
|
|
|
99
162
|
}
|
|
100
163
|
const workblock = await (0, lib_1.assembleWorkblock)(dirPath, logger);
|
|
101
164
|
if (!workblock) {
|
|
102
|
-
logger.error(
|
|
165
|
+
logger.error("Failed to assemble workblock");
|
|
103
166
|
process.exit(1);
|
|
104
167
|
}
|
|
105
168
|
const output = JSON.stringify(workblock, null, 2);
|
|
@@ -119,14 +182,35 @@ commander_1.program
|
|
|
119
182
|
}
|
|
120
183
|
});
|
|
121
184
|
commander_1.program
|
|
122
|
-
.command(
|
|
123
|
-
.description(
|
|
124
|
-
.option(
|
|
185
|
+
.command("submit <directory> <url>")
|
|
186
|
+
.description("Assemble a workblock and POST it to a URL")
|
|
187
|
+
.option("-w, --workspace <path>", "Workspace path, if directory is relative to it", ".")
|
|
188
|
+
.option("-H, --header <header>", "Add custom header in format 'Header-Name: value' (can be used multiple times)", (value, previous = []) => {
|
|
189
|
+
const headers = previous;
|
|
190
|
+
headers.push(value);
|
|
191
|
+
return headers;
|
|
192
|
+
}, [])
|
|
125
193
|
.action(async (directory, url, options) => {
|
|
126
194
|
try {
|
|
195
|
+
// Parse headers from array of strings into object
|
|
196
|
+
const customHeaders = {};
|
|
197
|
+
for (const headerString of options.header) {
|
|
198
|
+
const colonIndex = headerString.indexOf(":");
|
|
199
|
+
if (colonIndex === -1) {
|
|
200
|
+
logger.error(`Invalid header format: ${headerString}. Expected 'Header-Name: value'`);
|
|
201
|
+
process.exit(1);
|
|
202
|
+
}
|
|
203
|
+
const headerName = headerString.substring(0, colonIndex).trim();
|
|
204
|
+
const headerValue = headerString.substring(colonIndex + 1).trim();
|
|
205
|
+
if (!headerName) {
|
|
206
|
+
logger.error(`Invalid header format: ${headerString}. Header name cannot be empty`);
|
|
207
|
+
process.exit(1);
|
|
208
|
+
}
|
|
209
|
+
customHeaders[headerName] = headerValue;
|
|
210
|
+
}
|
|
127
211
|
// 'directory' is user input. 'options.workspace' is CWD by default.
|
|
128
212
|
// performSubmitWorkblock resolves 'directory' relative to 'options.workspace'.
|
|
129
|
-
await performSubmitWorkblock(directory, url, options.workspace, logger);
|
|
213
|
+
await performSubmitWorkblock(directory, url, options.workspace, logger, customHeaders);
|
|
130
214
|
}
|
|
131
215
|
catch (error) {
|
|
132
216
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
@@ -136,14 +220,14 @@ commander_1.program
|
|
|
136
220
|
});
|
|
137
221
|
// New command: publish-changed-workblocks
|
|
138
222
|
commander_1.program
|
|
139
|
-
.command(
|
|
140
|
-
.description(
|
|
141
|
-
.requiredOption(
|
|
142
|
-
.requiredOption(
|
|
143
|
-
.option(
|
|
144
|
-
.option(
|
|
145
|
-
.option(
|
|
146
|
-
.option(
|
|
223
|
+
.command("publish-changed-workblocks")
|
|
224
|
+
.description("Detects changed workblocks based on git diff and submits them. Optionally comments on a PR.")
|
|
225
|
+
.requiredOption("-u, --publish-url <url>", "URL to publish/submit the workblocks to")
|
|
226
|
+
.requiredOption("-b, --workblock-base-dir <dir>", "Base directory within the workspace where workblocks are located")
|
|
227
|
+
.option("-w, --workspace <path>", "Path to the git workspace root", ".")
|
|
228
|
+
.option("-t, --github-token <token>", "GitHub token for PR commenting and API interactions")
|
|
229
|
+
.option("--git-diff-base <ref>", "Base ref for git diff (e.g., HEAD^, origin/main)", "HEAD^")
|
|
230
|
+
.option("--git-diff-head <ref>", "Head ref for git diff", "HEAD")
|
|
147
231
|
.action(async (options) => {
|
|
148
232
|
const { publishUrl, workblockBaseDir, workspace, githubToken, gitDiffBase, gitDiffHead, } = options;
|
|
149
233
|
// Dynamically import Octokit
|
|
@@ -152,72 +236,35 @@ commander_1.program
|
|
|
152
236
|
if (githubToken) {
|
|
153
237
|
octokitInstance = new Octokit({ auth: githubToken });
|
|
154
238
|
}
|
|
155
|
-
const
|
|
156
|
-
logger.log('Determining changed workblock directories...');
|
|
157
|
-
logger.log(`Workspace: ${workspaceAbsPath}`);
|
|
158
|
-
logger.log(`Workblock Base Directory (relative to workspace): ${workblockBaseDir}`);
|
|
159
|
-
let diffOutput = '';
|
|
160
|
-
try {
|
|
161
|
-
const diffCommand = `git diff --name-only "${gitDiffBase}" "${gitDiffHead}"`;
|
|
162
|
-
logger.log(`Running git diff: ${diffCommand} in ${workspaceAbsPath}`);
|
|
163
|
-
diffOutput = (0, child_process_1.execSync)(diffCommand, { cwd: workspaceAbsPath, encoding: 'utf8' });
|
|
164
|
-
}
|
|
165
|
-
catch (e) {
|
|
166
|
-
const errorDetails = e instanceof Error ? e.message : String(e);
|
|
167
|
-
logger.error(`Failed to run git diff: ${errorDetails}`);
|
|
168
|
-
if (e && typeof e === 'object' && 'stderr' in e && e.stderr) {
|
|
169
|
-
logger.error(`Git stderr: ${String(e.stderr)}`);
|
|
170
|
-
}
|
|
171
|
-
process.exit(1);
|
|
172
|
-
}
|
|
173
|
-
const allChangedFiles = diffOutput.split('\n').filter(f => f.trim() !== '');
|
|
174
|
-
logger.log(`All changed files (${allChangedFiles.length}): ${allChangedFiles.join(', ') || 'None'}`);
|
|
175
|
-
if (allChangedFiles.length === 0) {
|
|
176
|
-
logger.log('No files changed according to git diff. Exiting.');
|
|
177
|
-
return;
|
|
178
|
-
}
|
|
179
|
-
const manifestPattern = path.join(workblockBaseDir, '**/{manifest.yaml,*manifest.yaml}');
|
|
180
|
-
logger.log(`Searching for manifest files with pattern: ${manifestPattern} (relative to ${workspaceAbsPath})`);
|
|
181
|
-
// globSync expects patterns relative to its CWD option, or absolute paths.
|
|
182
|
-
const manifestFiles = (0, glob_1.sync)(manifestPattern, { cwd: workspaceAbsPath, nodir: true, absolute: true });
|
|
183
|
-
logger.log(`Found manifest files (${manifestFiles.length}): ${manifestFiles.join(', ') || 'None'}`);
|
|
184
|
-
if (manifestFiles.length === 0) {
|
|
185
|
-
logger.log('No manifest files found. Exiting.');
|
|
186
|
-
return;
|
|
187
|
-
}
|
|
188
|
-
const dirsToProcess = new Set();
|
|
189
|
-
for (const manifestFileAbs of manifestFiles) {
|
|
190
|
-
const workblockRootDirAbs = path.dirname(manifestFileAbs);
|
|
191
|
-
logger.log(`Potential workblock root (absolute): ${workblockRootDirAbs}`);
|
|
192
|
-
for (const changedFileRelative of allChangedFiles) {
|
|
193
|
-
const fullChangedFilePathAbs = path.resolve(workspaceAbsPath, changedFileRelative);
|
|
194
|
-
if (fullChangedFilePathAbs.startsWith(workblockRootDirAbs + path.sep) || fullChangedFilePathAbs === workblockRootDirAbs) {
|
|
195
|
-
const relativeWorkblockPath = path.relative(workspaceAbsPath, workblockRootDirAbs);
|
|
196
|
-
dirsToProcess.add(relativeWorkblockPath);
|
|
197
|
-
logger.log(`Found changed file '${changedFileRelative}' in workblock '${relativeWorkblockPath}'. Adding to process list.`);
|
|
198
|
-
break;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
239
|
+
const changedWorkblocks = await findChangedWorkblocks(workblockBaseDir, workspace, gitDiffBase, gitDiffHead, logger);
|
|
202
240
|
// New: Determine PR info if githubToken is provided
|
|
203
241
|
let prNumberForComment;
|
|
204
242
|
let prRepoOwner;
|
|
205
243
|
let prRepoName;
|
|
206
|
-
if (octokitInstance) {
|
|
207
|
-
|
|
244
|
+
if (octokitInstance) {
|
|
245
|
+
// This implies githubToken is present
|
|
246
|
+
logger.log("Attempting to determine PR information from the current commit...");
|
|
208
247
|
try {
|
|
209
|
-
const commitSha = (0, child_process_1.execSync)(
|
|
248
|
+
const commitSha = (0, child_process_1.execSync)("git rev-parse HEAD", {
|
|
249
|
+
cwd: workspace,
|
|
250
|
+
encoding: "utf8",
|
|
251
|
+
}).trim();
|
|
210
252
|
logger.log(`Current commit SHA: ${commitSha}`);
|
|
211
|
-
const remoteUrl = (0, child_process_1.execSync)(
|
|
253
|
+
const remoteUrl = (0, child_process_1.execSync)("git remote get-url origin", {
|
|
254
|
+
cwd: workspace,
|
|
255
|
+
encoding: "utf8",
|
|
256
|
+
}).trim();
|
|
212
257
|
logger.log(`Git remote origin URL: ${remoteUrl}`);
|
|
213
258
|
// Regex to capture owner and repo from https or git@github.com URLs
|
|
214
|
-
const parts = remoteUrl.split(
|
|
259
|
+
const parts = remoteUrl.split("/");
|
|
215
260
|
if (parts.length < 2) {
|
|
216
261
|
logger.log(`Could not parse owner/repo from git remote URL: '${remoteUrl}'. Skipping PR interaction.`);
|
|
217
262
|
return;
|
|
218
263
|
}
|
|
219
264
|
const repoNameWithGit = parts[parts.length - 1];
|
|
220
|
-
prRepoName = repoNameWithGit.endsWith(
|
|
265
|
+
prRepoName = repoNameWithGit.endsWith(".git")
|
|
266
|
+
? repoNameWithGit.slice(0, -4)
|
|
267
|
+
: repoNameWithGit;
|
|
221
268
|
prRepoOwner = parts[parts.length - 2];
|
|
222
269
|
logger.log(`Inferred repository: ${prRepoOwner}/${prRepoName}`);
|
|
223
270
|
const { data: prsAssociatedWithCommit } = await octokitInstance.rest.repos.listPullRequestsAssociatedWithCommit({
|
|
@@ -226,7 +273,7 @@ commander_1.program
|
|
|
226
273
|
commit_sha: commitSha,
|
|
227
274
|
});
|
|
228
275
|
if (prsAssociatedWithCommit.length > 0) {
|
|
229
|
-
const openPr = prsAssociatedWithCommit.find(pr => pr.state ===
|
|
276
|
+
const openPr = prsAssociatedWithCommit.find((pr) => pr.state === "open");
|
|
230
277
|
const selectedPr = openPr || prsAssociatedWithCommit[0]; // Prefer open PR, fallback to the first one
|
|
231
278
|
prNumberForComment = selectedPr.number;
|
|
232
279
|
logger.log(`Found PR #${prNumberForComment} (state: ${selectedPr.state}) associated with commit ${commitSha} in ${prRepoOwner}/${prRepoName}.`);
|
|
@@ -240,16 +287,17 @@ commander_1.program
|
|
|
240
287
|
logger.error(`Error determining PR information: ${errorMsg}. Skipping PR interaction.`);
|
|
241
288
|
}
|
|
242
289
|
}
|
|
243
|
-
if (
|
|
244
|
-
logger.log(
|
|
290
|
+
if (changedWorkblocks.length === 0) {
|
|
291
|
+
logger.log("No changed workblock directories (containing a manifest and changes) found.");
|
|
245
292
|
return;
|
|
246
293
|
}
|
|
247
|
-
logger.log(`Found ${
|
|
294
|
+
logger.log(`Found ${changedWorkblocks.length} changed workblock directories to process: ${changedWorkblocks.join(", ")}`);
|
|
248
295
|
let anySubmissionFailed = false;
|
|
249
|
-
for (const dirRelToWorkspace of
|
|
296
|
+
for (const dirRelToWorkspace of changedWorkblocks) {
|
|
250
297
|
logger.log(`Processing directory: ${dirRelToWorkspace}`);
|
|
251
298
|
try {
|
|
252
|
-
await performSubmitWorkblock(dirRelToWorkspace, publishUrl,
|
|
299
|
+
await performSubmitWorkblock(dirRelToWorkspace, publishUrl, workspace, logger, {} // No custom headers for bulk publish
|
|
300
|
+
);
|
|
253
301
|
logger.log(`Successfully submitted workblock for directory: ${dirRelToWorkspace}`);
|
|
254
302
|
}
|
|
255
303
|
catch (error) {
|
|
@@ -258,14 +306,20 @@ commander_1.program
|
|
|
258
306
|
anySubmissionFailed = true;
|
|
259
307
|
}
|
|
260
308
|
}
|
|
261
|
-
if (prNumberForComment &&
|
|
309
|
+
if (prNumberForComment &&
|
|
310
|
+
prRepoOwner &&
|
|
311
|
+
prRepoName &&
|
|
312
|
+
octokitInstance &&
|
|
313
|
+
changedWorkblocks.length > 0) {
|
|
314
|
+
// New condition
|
|
262
315
|
logger.log(`Attempting to comment on PR #${prNumberForComment} in repo ${prRepoOwner}/${prRepoName}`);
|
|
263
|
-
let commentBody =
|
|
264
|
-
for (const dir of
|
|
316
|
+
let commentBody = "The following workblock directories were processed by `wb-cli publish-changed-workblocks`:\n";
|
|
317
|
+
for (const dir of changedWorkblocks) {
|
|
265
318
|
commentBody += `- \`\`\`${dir}\`\`\`\n`; // Using backticks for dirs
|
|
266
319
|
}
|
|
267
320
|
if (anySubmissionFailed) {
|
|
268
|
-
commentBody +=
|
|
321
|
+
commentBody +=
|
|
322
|
+
"\nNote: One or more submissions failed. Check logs for details.";
|
|
269
323
|
}
|
|
270
324
|
try {
|
|
271
325
|
await octokitInstance.rest.issues.createComment({
|
|
@@ -282,8 +336,9 @@ commander_1.program
|
|
|
282
336
|
anySubmissionFailed = true;
|
|
283
337
|
}
|
|
284
338
|
}
|
|
285
|
-
else if (
|
|
286
|
-
|
|
339
|
+
else if (changedWorkblocks.length > 0 && githubToken) {
|
|
340
|
+
// Modified condition to check githubToken directly
|
|
341
|
+
logger.log("Workblock directories were processed. PR commenting skipped: Could not automatically determine PR information, no relevant PR found for the current commit, or GitHub token was missing/invalid.");
|
|
287
342
|
}
|
|
288
343
|
if (anySubmissionFailed) {
|
|
289
344
|
logger.error("One or more operations failed during 'publish-changed-workblocks'.");
|
|
@@ -293,5 +348,29 @@ commander_1.program
|
|
|
293
348
|
logger.log("'publish-changed-workblocks' completed successfully.");
|
|
294
349
|
}
|
|
295
350
|
});
|
|
351
|
+
commander_1.program
|
|
352
|
+
.command("list-changed-workblocks")
|
|
353
|
+
.description("List workblock directories that have changes based on git diff")
|
|
354
|
+
.requiredOption("-b, --workblock-base-dir <dir>", "Base directory within the workspace where workblocks are located")
|
|
355
|
+
.option("-w, --workspace <path>", "Path to the git workspace root", ".")
|
|
356
|
+
.option("--git-diff-base <ref>", "Base ref for git diff (e.g., HEAD^, origin/main)", "HEAD^")
|
|
357
|
+
.option("--git-diff-head <ref>", "Head ref for git diff", "HEAD")
|
|
358
|
+
.action(async (options) => {
|
|
359
|
+
const { workblockBaseDir, workspace, gitDiffBase, gitDiffHead } = options;
|
|
360
|
+
try {
|
|
361
|
+
const changedWorkblocks = await findChangedWorkblocks(workblockBaseDir, workspace, gitDiffBase, gitDiffHead, logger);
|
|
362
|
+
if (changedWorkblocks.length === 0) {
|
|
363
|
+
logger.log("No changed workblock directories found.");
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
366
|
+
// Output the directories to stdout (one per line) for easy consumption by other commands
|
|
367
|
+
process.stdout.write(changedWorkblocks.join("\n") + "\n");
|
|
368
|
+
}
|
|
369
|
+
catch (error) {
|
|
370
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
371
|
+
logger.error(`Error: ${errorMessage}`);
|
|
372
|
+
process.exit(1);
|
|
373
|
+
}
|
|
374
|
+
});
|
|
296
375
|
commander_1.program.parse(process.argv);
|
|
297
376
|
//# sourceMappingURL=cli.js.map
|
package/out/lib/logger.js
CHANGED
package/out/lib/logger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/lib/logger.ts"],"names":[],"mappings":";;;AAQA,uCAAuC;AACvC,MAAa,aAAa;
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/lib/logger.ts"],"names":[],"mappings":";;;AAQA,uCAAuC;AACvC,MAAa,aAAa;IACxB,GAAG,CAAC,OAAe;QACjB,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,OAAe;QACnB,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACzB,CAAC;CACF;AARD,sCAQC;AAED,2CAA2C;AAC3C,MAAa,YAAY;IACH;IAApB,YAAoB,aAAmC;QAAnC,kBAAa,GAAb,aAAa,CAAsB;IAAG,CAAC;IAE3D,GAAG,CAAC,OAAe;QACjB,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACzC,CAAC;IAED,KAAK,CAAC,OAAe;QACnB,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,UAAU,OAAO,EAAE,CAAC,CAAC;IACrD,CAAC;CACF;AAVD,oCAUC"}
|
package/out/lib/sync.js
ADDED
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.SyncManager = void 0;
|
|
37
|
+
exports.createSyncManager = createSyncManager;
|
|
38
|
+
const fs = __importStar(require("fs"));
|
|
39
|
+
const path = __importStar(require("path"));
|
|
40
|
+
const yaml_1 = require("yaml");
|
|
41
|
+
const types_1 = require("../types");
|
|
42
|
+
const workblock_1 = require("./workblock");
|
|
43
|
+
class SyncManager {
|
|
44
|
+
client;
|
|
45
|
+
logger;
|
|
46
|
+
constructor(client, logger) {
|
|
47
|
+
this.client = client;
|
|
48
|
+
this.logger = logger;
|
|
49
|
+
}
|
|
50
|
+
async connect(host, token, context) {
|
|
51
|
+
await new Promise((resolve, reject) => {
|
|
52
|
+
this.client.connect(host, token, context || {});
|
|
53
|
+
// Add a one-time connection handler
|
|
54
|
+
this.client.addOnDisconnect(() => {
|
|
55
|
+
this.logger.error('WebSocket disconnected');
|
|
56
|
+
});
|
|
57
|
+
// Wait for connection to be established
|
|
58
|
+
setTimeout(() => {
|
|
59
|
+
resolve();
|
|
60
|
+
}, 1000);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
async setWorkblock(directory, streamId) {
|
|
64
|
+
this.logger.log(`Setting workblock from ${directory} to stream ${streamId}`);
|
|
65
|
+
const wb = await (0, workblock_1.assembleWorkblock)(directory, this.logger);
|
|
66
|
+
if (!wb) {
|
|
67
|
+
throw new Error('Failed to assemble workblock');
|
|
68
|
+
}
|
|
69
|
+
const validation = await this.client.setWorkblock(streamId, wb);
|
|
70
|
+
if (validation.length > 0) {
|
|
71
|
+
this.logger.error(`Validation errors: ${JSON.stringify(validation, null, 2)}`);
|
|
72
|
+
return validation;
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
this.logger.log(`Successfully set workblock for stream ${streamId}`);
|
|
76
|
+
return [];
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
async storeWorkblockFiles(directory, streamId) {
|
|
80
|
+
this.logger.log(`Storing workblock files from stream ${streamId} to ${directory}`);
|
|
81
|
+
const wb = await this.client.getWorkblock(streamId);
|
|
82
|
+
if (!wb) {
|
|
83
|
+
throw new Error(`No workblock found for stream ${streamId}`);
|
|
84
|
+
}
|
|
85
|
+
await this.storeWorkblock(directory, wb);
|
|
86
|
+
this.logger.log(`Successfully stored workblock files to ${directory}`);
|
|
87
|
+
}
|
|
88
|
+
async storeWorkblock(dir, wb) {
|
|
89
|
+
const mf = await (0, workblock_1.locateManifest)(dir);
|
|
90
|
+
const resolve = async (filepath, key) => {
|
|
91
|
+
const value = await this.client.getBlob(key);
|
|
92
|
+
const assetDir = path.dirname(filepath);
|
|
93
|
+
fs.mkdirSync(assetDir, { recursive: true });
|
|
94
|
+
fs.writeFileSync(filepath, value);
|
|
95
|
+
};
|
|
96
|
+
wb = JSON.parse(JSON.stringify(wb));
|
|
97
|
+
const promises = [];
|
|
98
|
+
for (const module of wb.modules ?? []) {
|
|
99
|
+
const moduleName = (0, workblock_1.normalizedFilename)(module.name);
|
|
100
|
+
fs.mkdirSync(path.join(dir, moduleName), { recursive: true });
|
|
101
|
+
const moduleDir = path.join(dir, moduleName);
|
|
102
|
+
for (const task of module.tasks ?? []) {
|
|
103
|
+
if (task.action.type !== types_1.ActionType.Code) {
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
if (!task.action.value) {
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
const name = (0, workblock_1.normalizedFilename)(task.name);
|
|
110
|
+
fs.mkdirSync(path.join(moduleDir, name), { recursive: true });
|
|
111
|
+
const taskDir = path.join(moduleDir, name);
|
|
112
|
+
const taskPath = await (0, workblock_1.locateFile)(taskDir, '.py', `${name}.py`);
|
|
113
|
+
promises.push(resolve(taskPath, task.action.value));
|
|
114
|
+
if (task.assets) {
|
|
115
|
+
fs.mkdirSync(path.join(moduleDir, name, "assets"), { recursive: true });
|
|
116
|
+
for (const [key, asset] of Object.entries(task.assets)) {
|
|
117
|
+
const assetPath = path.join(moduleDir, name, "assets", key);
|
|
118
|
+
if (asset.data) {
|
|
119
|
+
promises.push(resolve(assetPath, asset.data));
|
|
120
|
+
}
|
|
121
|
+
if (asset.text) {
|
|
122
|
+
promises.push(resolve(assetPath, asset.text));
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
delete task.created_at;
|
|
127
|
+
delete task.updated_at;
|
|
128
|
+
delete task.action.value;
|
|
129
|
+
delete task.assets;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
if (wb.library) {
|
|
133
|
+
const libPath = path.join(dir, 'library.py');
|
|
134
|
+
promises.push(resolve(libPath, wb.library));
|
|
135
|
+
}
|
|
136
|
+
if (wb.logo) {
|
|
137
|
+
const logoPath = path.join(dir, 'logo.svg');
|
|
138
|
+
promises.push(resolve(logoPath, wb.logo));
|
|
139
|
+
}
|
|
140
|
+
if (wb.react_components) {
|
|
141
|
+
for (const [key, asset] of Object.entries(wb.react_components)) {
|
|
142
|
+
const assetPath = path.join(dir, 'react_components', key);
|
|
143
|
+
if (asset.data) {
|
|
144
|
+
promises.push(resolve(assetPath, asset.data));
|
|
145
|
+
}
|
|
146
|
+
if (asset.text) {
|
|
147
|
+
promises.push(resolve(assetPath, asset.text));
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
await Promise.all(promises);
|
|
152
|
+
const out = JSON.parse(JSON.stringify(wb));
|
|
153
|
+
delete out.created_at;
|
|
154
|
+
delete out.updated_at;
|
|
155
|
+
delete out.state;
|
|
156
|
+
delete out.branch_user;
|
|
157
|
+
delete out.storing;
|
|
158
|
+
delete out.actor;
|
|
159
|
+
delete out.library;
|
|
160
|
+
delete out.logo;
|
|
161
|
+
delete out.react_components;
|
|
162
|
+
fs.writeFileSync(mf, (0, yaml_1.stringify)(out));
|
|
163
|
+
}
|
|
164
|
+
async watchForChanges(directory, streamId, onChangeCallback) {
|
|
165
|
+
this.logger.log(`Watching for changes in ${directory} for stream ${streamId}`);
|
|
166
|
+
// Add event handler for workblock changes from the server
|
|
167
|
+
this.client.addEventHandler(async (events) => {
|
|
168
|
+
for (const event of events) {
|
|
169
|
+
if (event.stream_id === streamId && event.work_block?.work_block) {
|
|
170
|
+
await this.handleWorkblockChange(directory, streamId, event.work_block.work_block);
|
|
171
|
+
if (onChangeCallback) {
|
|
172
|
+
onChangeCallback();
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
this.logger.log(`Started watching for changes on stream ${streamId}`);
|
|
178
|
+
}
|
|
179
|
+
async handleWorkblockChange(directory, streamId, workblock) {
|
|
180
|
+
this.logger.log(`Workblock change detected for stream ${streamId}`);
|
|
181
|
+
if (!workblock) {
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
const localWb = await (0, workblock_1.assembleWorkblock)(directory, this.logger);
|
|
185
|
+
if (!localWb) {
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
const uWb = (0, workblock_1.trimWorkblock)(workblock);
|
|
189
|
+
const uLocalWb = (0, workblock_1.trimWorkblock)(localWb);
|
|
190
|
+
const hasChanges = JSON.stringify(uWb) !== JSON.stringify(uLocalWb);
|
|
191
|
+
if (hasChanges) {
|
|
192
|
+
this.logger.log(`Detected changes between local and remote workblock for stream ${streamId}`);
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
this.logger.log(`No changes detected for stream ${streamId}`);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
disconnect() {
|
|
199
|
+
this.client.disconnect();
|
|
200
|
+
this.logger.log('Disconnected from Beyond Work');
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
exports.SyncManager = SyncManager;
|
|
204
|
+
async function createSyncManager(options, context) {
|
|
205
|
+
const { BeyondWorkClient } = await import('../client.js');
|
|
206
|
+
const client = new BeyondWorkClient();
|
|
207
|
+
const syncManager = new SyncManager(client, options.logger);
|
|
208
|
+
await syncManager.connect(options.host, options.token, context);
|
|
209
|
+
return syncManager;
|
|
210
|
+
}
|
|
211
|
+
//# sourceMappingURL=sync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync.js","sourceRoot":"","sources":["../../src/lib/sync.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoNA,8CAQC;AA5ND,uCAAyB;AACzB,2CAA6B;AAC7B,+BAAiC;AAGjC,oCAAsC;AACtC,2CAA+G;AAW/G,MAAa,WAAW;IACd,MAAM,CAAS;IACf,MAAM,CAAS;IAEvB,YAAY,MAAc,EAAE,MAAc;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,IAAY,EAAE,KAAa,EAAE,OAAa;QACtD,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC1C,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,IAAI,EAAS,CAAC,CAAC;YAEvD,oCAAoC;YACpC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE;gBAC/B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;YAC9C,CAAC,CAAC,CAAC;YAEH,wCAAwC;YACxC,UAAU,CAAC,GAAG,EAAE;gBACd,OAAO,EAAE,CAAC;YACZ,CAAC,EAAE,IAAI,CAAC,CAAC;QACX,CAAC,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,SAAiB,EAAE,QAAgB;QACpD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,0BAA0B,S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AO,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAEhE,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publisher": "beyondwork",
|
|
4
4
|
"displayName": "Beyond Work",
|
|
5
5
|
"description": "Beyond Work is a tool for managing your work in a way that is easy to use and understand.",
|
|
6
|
-
"version": "0.1.
|
|
6
|
+
"version": "0.1.10-1",
|
|
7
7
|
"engines": {
|
|
8
8
|
"vscode": "^1.94.0",
|
|
9
9
|
"node": ">=16.0.0"
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"explorer": [
|
|
79
79
|
{
|
|
80
80
|
"id": "beyondworkConnections",
|
|
81
|
-
"name": "
|
|
81
|
+
"name": "Beyond Work"
|
|
82
82
|
}
|
|
83
83
|
]
|
|
84
84
|
}
|