@joshski/dust 0.1.68 → 0.1.69
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/bucket/repository.d.ts +2 -2
- package/dist/dust.js +19 -37
- package/package.json +1 -1
|
@@ -14,8 +14,8 @@ export { runRepositoryLoop } from './repository-loop';
|
|
|
14
14
|
export interface Repository {
|
|
15
15
|
name: string;
|
|
16
16
|
gitUrl: string;
|
|
17
|
-
url
|
|
18
|
-
id
|
|
17
|
+
url: string;
|
|
18
|
+
id: number;
|
|
19
19
|
}
|
|
20
20
|
export interface RepositoryState {
|
|
21
21
|
repository: Repository;
|
package/dist/dust.js
CHANGED
|
@@ -275,7 +275,7 @@ async function loadSettings(cwd, fileSystem) {
|
|
|
275
275
|
}
|
|
276
276
|
|
|
277
277
|
// lib/version.ts
|
|
278
|
-
var DUST_VERSION = "0.1.
|
|
278
|
+
var DUST_VERSION = "0.1.69";
|
|
279
279
|
|
|
280
280
|
// lib/session.ts
|
|
281
281
|
var DUST_UNATTENDED = "DUST_UNATTENDED";
|
|
@@ -2811,7 +2811,7 @@ async function runRepositoryLoop(repoState, repoDeps, sendEvent, sessionId) {
|
|
|
2811
2811
|
result = await runOneIteration(commandDeps, loopDeps, onLoopEvent, onAgentEvent, {
|
|
2812
2812
|
hooksInstalled,
|
|
2813
2813
|
signal: abortController.signal,
|
|
2814
|
-
repositoryId: repoState.repository.id,
|
|
2814
|
+
repositoryId: repoState.repository.id.toString(),
|
|
2815
2815
|
onRawEvent: (rawEvent) => {
|
|
2816
2816
|
onAgentEvent(rawEventToAgentEvent(rawEvent));
|
|
2817
2817
|
}
|
|
@@ -2870,23 +2870,15 @@ function startRepositoryLoop(repoState, repoDeps, sendEvent, sessionId) {
|
|
|
2870
2870
|
});
|
|
2871
2871
|
}
|
|
2872
2872
|
function parseRepository(data) {
|
|
2873
|
-
if (typeof data === "string") {
|
|
2874
|
-
return { name: data, gitUrl: data };
|
|
2875
|
-
}
|
|
2876
2873
|
if (typeof data === "object" && data !== null && "name" in data && "gitUrl" in data) {
|
|
2877
2874
|
const repositoryData = data;
|
|
2878
|
-
if (typeof repositoryData.name === "string" && typeof repositoryData.gitUrl === "string") {
|
|
2879
|
-
|
|
2875
|
+
if (typeof repositoryData.name === "string" && typeof repositoryData.gitUrl === "string" && typeof repositoryData.url === "string" && typeof repositoryData.id === "number") {
|
|
2876
|
+
return {
|
|
2880
2877
|
name: repositoryData.name,
|
|
2881
|
-
gitUrl: repositoryData.gitUrl
|
|
2878
|
+
gitUrl: repositoryData.gitUrl,
|
|
2879
|
+
url: repositoryData.url,
|
|
2880
|
+
id: repositoryData.id
|
|
2882
2881
|
};
|
|
2883
|
-
if (typeof repositoryData.url === "string") {
|
|
2884
|
-
repo.url = repositoryData.url;
|
|
2885
|
-
}
|
|
2886
|
-
if (typeof repositoryData.id === "string") {
|
|
2887
|
-
repo.id = repositoryData.id;
|
|
2888
|
-
}
|
|
2889
|
-
return repo;
|
|
2890
2882
|
}
|
|
2891
2883
|
}
|
|
2892
2884
|
return null;
|
|
@@ -2991,20 +2983,16 @@ function parseServerMessage(data) {
|
|
|
2991
2983
|
if (typeof repo.name !== "string" || typeof repo.gitUrl !== "string") {
|
|
2992
2984
|
return null;
|
|
2993
2985
|
}
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
gitUrl: repo.gitUrl
|
|
2997
|
-
};
|
|
2998
|
-
if (typeof repo.url === "string") {
|
|
2999
|
-
item.url = repo.url;
|
|
3000
|
-
}
|
|
3001
|
-
if (typeof repo.id === "string") {
|
|
3002
|
-
item.id = repo.id;
|
|
3003
|
-
}
|
|
3004
|
-
if (typeof repo.hasTask === "boolean") {
|
|
3005
|
-
item.hasTask = repo.hasTask;
|
|
2986
|
+
if (typeof repo.id !== "number" || typeof repo.url !== "string" || typeof repo.hasTask !== "boolean") {
|
|
2987
|
+
return null;
|
|
3006
2988
|
}
|
|
3007
|
-
repositories.push(
|
|
2989
|
+
repositories.push({
|
|
2990
|
+
id: repo.id,
|
|
2991
|
+
name: repo.name,
|
|
2992
|
+
gitUrl: repo.gitUrl,
|
|
2993
|
+
url: repo.url,
|
|
2994
|
+
hasTask: repo.hasTask
|
|
2995
|
+
});
|
|
3008
2996
|
}
|
|
3009
2997
|
return { type: "repository-list", repositories };
|
|
3010
2998
|
}
|
|
@@ -3741,16 +3729,10 @@ function connectWebSocket(token, state, bucketDependencies, context, fileSystem,
|
|
|
3741
3729
|
for (const r of repos) {
|
|
3742
3730
|
const attrs = [];
|
|
3743
3731
|
attrs.push(`name=${r.name}`);
|
|
3744
|
-
|
|
3745
|
-
attrs.push(`id=${r.id}`);
|
|
3746
|
-
}
|
|
3732
|
+
attrs.push(`id=${r.id}`);
|
|
3747
3733
|
attrs.push(`gitUrl=${r.gitUrl}`);
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
}
|
|
3751
|
-
if (r.hasTask !== undefined) {
|
|
3752
|
-
attrs.push(`hasTask=${r.hasTask}`);
|
|
3753
|
-
}
|
|
3734
|
+
attrs.push(`url=${r.url}`);
|
|
3735
|
+
attrs.push(`hasTask=${r.hasTask}`);
|
|
3754
3736
|
logMessage(state, context, useTUI, ` - ${attrs.join(", ")}`);
|
|
3755
3737
|
}
|
|
3756
3738
|
}
|