@ghfs/cli 0.2.0 → 0.2.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 +1 -1
- package/dist/cli.mjs +201 -36
- package/dist/ui/200.html +1 -1
- package/dist/ui/404.html +1 -1
- package/dist/ui/_nuxt/1bK2R2pL.js +1 -0
- package/dist/ui/_nuxt/{DWbelWgw.js → BKH9P1wN.js} +1 -1
- package/dist/ui/_nuxt/BNh5okZH.js +4 -0
- package/dist/ui/_nuxt/BNzF7F9w.js +1 -0
- package/dist/ui/_nuxt/{Dl1uYT3n.js → BWLewmBT.js} +5 -5
- package/dist/ui/_nuxt/BbwaKnwL.js +1 -0
- package/dist/ui/_nuxt/BqmRGtwl.js +1 -0
- package/dist/ui/_nuxt/C2jkTI5u.js +2 -0
- package/dist/ui/_nuxt/{ka8bt-K2.js → C8o6ovMK.js} +1 -1
- package/dist/ui/_nuxt/{BvOdM423.js → CBU7sHLx.js} +1 -1
- package/dist/ui/_nuxt/CQja-oog.js +1 -0
- package/dist/ui/_nuxt/D4R7-XZQ.js +1 -0
- package/dist/ui/_nuxt/D4yIuA0F.js +64 -0
- package/dist/ui/_nuxt/DHH7xZXJ.js +11 -0
- package/dist/ui/_nuxt/{DRcdqDVD.js → DK734mxh.js} +1 -1
- package/dist/ui/_nuxt/DVC3GhaL.js +1 -0
- package/dist/ui/_nuxt/DWBdeKmR.js +1 -0
- package/dist/ui/_nuxt/Da-Y9lY6.js +1 -0
- package/dist/ui/_nuxt/DeX2bcSG.js +1 -0
- package/dist/ui/_nuxt/builds/latest.json +1 -1
- package/dist/ui/_nuxt/builds/meta/f935488c-a544-4bf6-9a65-b421d02508c1.json +1 -0
- package/dist/ui/_nuxt/cards.DYf8w2uL.css +1 -0
- package/dist/ui/_nuxt/entry.COcGUqGv.css +1 -0
- package/dist/ui/{hub/queue → cards}/index.html +1 -1
- package/dist/ui/hub/index.html +1 -1
- package/dist/ui/hub/recent/index.html +1 -1
- package/dist/ui/index.html +1 -1
- package/dist/ui/recent/index.html +1 -1
- package/dist/ui/{queue → todo}/index.html +1 -1
- package/package.json +4 -5
- package/dist/ui/_nuxt/3t-6YNGz.js +0 -1
- package/dist/ui/_nuxt/BO53GVu8.js +0 -1
- package/dist/ui/_nuxt/CrQuFoFY.js +0 -1
- package/dist/ui/_nuxt/D0jeqgqx.js +0 -1
- package/dist/ui/_nuxt/DCJHYwE6.js +0 -67
- package/dist/ui/_nuxt/DS2KJUFh.js +0 -1
- package/dist/ui/_nuxt/Dc-i7Zfu.js +0 -1
- package/dist/ui/_nuxt/DiuiI0_S.js +0 -1
- package/dist/ui/_nuxt/builds/meta/283a6ae8-b1fa-4a56-aab5-927ed1779674.json +0 -1
- package/dist/ui/_nuxt/entry.DnCs62PI.css +0 -1
- package/dist/ui/_nuxt/ivQhLDHX.js +0 -11
- package/dist/ui/_nuxt/zinMudAE.js +0 -1
package/README.md
CHANGED
|
@@ -71,7 +71,7 @@ Features:
|
|
|
71
71
|
|
|
72
72
|
- Project cards with activity sparkline, open issue / PR counts, last updated and last synced badges.
|
|
73
73
|
- `/recent` — cross-project list of recently-updated issues and PRs.
|
|
74
|
-
-
|
|
74
|
+
- Queue drawer (`q`) — aggregated queue across all enabled projects with per-project execute; press `X` to execute everything.
|
|
75
75
|
- Settings dialog (`,`) for hub root and an optional auto-sync interval (1–60 minutes).
|
|
76
76
|
|
|
77
77
|
Flags mirror `ghfs ui` (`--port`, `--host`, `--cwd`, `--no-open`).
|
package/dist/cli.mjs
CHANGED
|
@@ -1016,7 +1016,7 @@ function isCommentLine(trimmed) {
|
|
|
1016
1016
|
}
|
|
1017
1017
|
//#endregion
|
|
1018
1018
|
//#region package.json
|
|
1019
|
-
var version = "0.2.
|
|
1019
|
+
var version = "0.2.1";
|
|
1020
1020
|
//#endregion
|
|
1021
1021
|
//#region src/meta.ts
|
|
1022
1022
|
const GHFS_NAME = "ghfs";
|
|
@@ -4298,9 +4298,37 @@ const UI_STATE_FILE = ".ui.json";
|
|
|
4298
4298
|
function createEmptyUiState() {
|
|
4299
4299
|
return { drafts: {} };
|
|
4300
4300
|
}
|
|
4301
|
+
function normalizeNumberArray(value) {
|
|
4302
|
+
if (!Array.isArray(value)) return void 0;
|
|
4303
|
+
const out = [];
|
|
4304
|
+
const seen = /* @__PURE__ */ new Set();
|
|
4305
|
+
for (const entry of value) {
|
|
4306
|
+
const n = typeof entry === "number" ? entry : Number(entry);
|
|
4307
|
+
if (!Number.isInteger(n) || n <= 0 || seen.has(n)) continue;
|
|
4308
|
+
seen.add(n);
|
|
4309
|
+
out.push(n);
|
|
4310
|
+
}
|
|
4311
|
+
return out.length > 0 ? out : void 0;
|
|
4312
|
+
}
|
|
4301
4313
|
function normalizePrTab(value) {
|
|
4302
4314
|
if (value === "conversation" || value === "commits" || value === "changes") return value;
|
|
4303
4315
|
}
|
|
4316
|
+
function normalizeSeenHistory(value) {
|
|
4317
|
+
if (!value || typeof value !== "object") return void 0;
|
|
4318
|
+
const out = {};
|
|
4319
|
+
for (const [key, raw] of Object.entries(value)) {
|
|
4320
|
+
if (typeof key !== "string" || key.length === 0) continue;
|
|
4321
|
+
if (!raw || typeof raw !== "object") continue;
|
|
4322
|
+
const entry = raw;
|
|
4323
|
+
const lastSeenAt = typeof entry.lastSeenAt === "string" && entry.lastSeenAt.length > 0 ? entry.lastSeenAt : null;
|
|
4324
|
+
if (!lastSeenAt) continue;
|
|
4325
|
+
out[key] = {
|
|
4326
|
+
lastCommentId: typeof entry.lastCommentId === "number" && Number.isFinite(entry.lastCommentId) ? entry.lastCommentId : null,
|
|
4327
|
+
lastSeenAt
|
|
4328
|
+
};
|
|
4329
|
+
}
|
|
4330
|
+
return Object.keys(out).length > 0 ? out : void 0;
|
|
4331
|
+
}
|
|
4304
4332
|
function normalizeUserOverride(value) {
|
|
4305
4333
|
if (!value || typeof value !== "object") return void 0;
|
|
4306
4334
|
const raw = value;
|
|
@@ -4323,7 +4351,10 @@ async function loadUiState(storageDirAbsolute) {
|
|
|
4323
4351
|
listPaneSize: typeof parsed.listPaneSize === "number" ? parsed.listPaneSize : void 0,
|
|
4324
4352
|
lastPrTab: normalizePrTab(parsed.lastPrTab),
|
|
4325
4353
|
userOverride: normalizeUserOverride(parsed.userOverride),
|
|
4326
|
-
autoSyncIntervalMs: normalizeAutoSyncInterval(parsed.autoSyncIntervalMs)
|
|
4354
|
+
autoSyncIntervalMs: normalizeAutoSyncInterval(parsed.autoSyncIntervalMs),
|
|
4355
|
+
todos: normalizeNumberArray(parsed.todos),
|
|
4356
|
+
ignored: normalizeNumberArray(parsed.ignored),
|
|
4357
|
+
seenHistory: normalizeSeenHistory(parsed.seenHistory)
|
|
4327
4358
|
};
|
|
4328
4359
|
} catch {
|
|
4329
4360
|
return createEmptyUiState();
|
|
@@ -4339,12 +4370,18 @@ async function saveUiState$1(storageDirAbsolute, state) {
|
|
|
4339
4370
|
const tab = normalizePrTab(state.lastPrTab);
|
|
4340
4371
|
const override = normalizeUserOverride(state.userOverride);
|
|
4341
4372
|
const interval = normalizeAutoSyncInterval(state.autoSyncIntervalMs);
|
|
4373
|
+
const todos = normalizeNumberArray(state.todos);
|
|
4374
|
+
const ignored = normalizeNumberArray(state.ignored);
|
|
4375
|
+
const seenHistory = normalizeSeenHistory(state.seenHistory);
|
|
4342
4376
|
const clean = {
|
|
4343
4377
|
drafts: { ...state.drafts },
|
|
4344
4378
|
...state.listPaneSize != null ? { listPaneSize: state.listPaneSize } : {},
|
|
4345
4379
|
...tab ? { lastPrTab: tab } : {},
|
|
4346
4380
|
...override ? { userOverride: override } : {},
|
|
4347
|
-
...interval != null ? { autoSyncIntervalMs: interval } : {}
|
|
4381
|
+
...interval != null ? { autoSyncIntervalMs: interval } : {},
|
|
4382
|
+
...todos ? { todos } : {},
|
|
4383
|
+
...ignored ? { ignored } : {},
|
|
4384
|
+
...seenHistory ? { seenHistory } : {}
|
|
4348
4385
|
};
|
|
4349
4386
|
await writeFile(join(storageDirAbsolute, UI_STATE_FILE), `${JSON.stringify(clean, null, 2)}\n`, "utf8");
|
|
4350
4387
|
}
|
|
@@ -4352,6 +4389,31 @@ async function saveUiState$1(storageDirAbsolute, state) {
|
|
|
4352
4389
|
//#region src/sync/activity.ts
|
|
4353
4390
|
const MS_PER_DAY = 1440 * 60 * 1e3;
|
|
4354
4391
|
/**
|
|
4392
|
+
* Feed every dated event on a single item into `tally`. Shared between the
|
|
4393
|
+
* project-level and per-item bucket computations so "what counts as an
|
|
4394
|
+
* activity beat" lives in exactly one place.
|
|
4395
|
+
*/
|
|
4396
|
+
function tallyItemEvents(data, tally) {
|
|
4397
|
+
tally(data.item.createdAt);
|
|
4398
|
+
tally(data.item.updatedAt);
|
|
4399
|
+
tally(data.item.closedAt);
|
|
4400
|
+
for (const c of data.comments ?? []) tally(c.createdAt);
|
|
4401
|
+
for (const t of data.timeline ?? []) tally(t.createdAt);
|
|
4402
|
+
for (const commit of data.commits ?? []) tally(commit.committerDate ?? commit.authorDate);
|
|
4403
|
+
if (data.pull?.mergedAt) tally(data.pull.mergedAt);
|
|
4404
|
+
}
|
|
4405
|
+
function makeBucketTally(buckets, days, startOfTodayMs, onTallied) {
|
|
4406
|
+
return (iso) => {
|
|
4407
|
+
if (!iso) return;
|
|
4408
|
+
const ts = Date.parse(iso);
|
|
4409
|
+
if (Number.isNaN(ts)) return;
|
|
4410
|
+
const daysAgo = Math.floor((startOfTodayMs - startOfUtcDay(ts)) / MS_PER_DAY);
|
|
4411
|
+
if (daysAgo < 0 || daysAgo >= days) return;
|
|
4412
|
+
buckets[days - 1 - daysAgo] += 1;
|
|
4413
|
+
onTallied();
|
|
4414
|
+
};
|
|
4415
|
+
}
|
|
4416
|
+
/**
|
|
4355
4417
|
* Build daily activity buckets over the trailing `days` window. Buckets are
|
|
4356
4418
|
* ordered oldest-first (index 0 is `days-1` days ago, last index is today).
|
|
4357
4419
|
*
|
|
@@ -4365,25 +4427,10 @@ function computeProjectActivityBuckets(state, days = 90, now = Date.now()) {
|
|
|
4365
4427
|
const buckets = Array.from({ length: days }).fill(0);
|
|
4366
4428
|
const startOfTodayMs = startOfUtcDay(now);
|
|
4367
4429
|
let total = 0;
|
|
4368
|
-
const tally = (
|
|
4369
|
-
if (!iso) return;
|
|
4370
|
-
const ts = Date.parse(iso);
|
|
4371
|
-
if (Number.isNaN(ts)) return;
|
|
4372
|
-
const daysAgo = Math.floor((startOfTodayMs - startOfUtcDay(ts)) / MS_PER_DAY);
|
|
4373
|
-
if (daysAgo < 0 || daysAgo >= days) return;
|
|
4374
|
-
buckets[days - 1 - daysAgo] += 1;
|
|
4430
|
+
const tally = makeBucketTally(buckets, days, startOfTodayMs, () => {
|
|
4375
4431
|
total += 1;
|
|
4376
|
-
};
|
|
4377
|
-
for (const entry of Object.values(state.items))
|
|
4378
|
-
const data = entry.data;
|
|
4379
|
-
tally(data.item.createdAt);
|
|
4380
|
-
tally(data.item.updatedAt);
|
|
4381
|
-
tally(data.item.closedAt);
|
|
4382
|
-
for (const c of data.comments ?? []) tally(c.createdAt);
|
|
4383
|
-
for (const t of data.timeline ?? []) tally(t.createdAt);
|
|
4384
|
-
for (const commit of data.commits ?? []) tally(commit.committerDate ?? commit.authorDate);
|
|
4385
|
-
if (data.pull?.mergedAt) tally(data.pull.mergedAt);
|
|
4386
|
-
}
|
|
4432
|
+
});
|
|
4433
|
+
for (const entry of Object.values(state.items)) tallyItemEvents(entry.data, tally);
|
|
4387
4434
|
return {
|
|
4388
4435
|
buckets,
|
|
4389
4436
|
total,
|
|
@@ -4486,7 +4533,11 @@ async function buildRepoMeta(ctx) {
|
|
|
4486
4533
|
};
|
|
4487
4534
|
}
|
|
4488
4535
|
async function summarizeProject(ctx) {
|
|
4489
|
-
const [repo, syncState] = await Promise.all([
|
|
4536
|
+
const [repo, syncState, snapshot] = await Promise.all([
|
|
4537
|
+
buildRepoMeta(ctx),
|
|
4538
|
+
loadSyncState(ctx.storageDirAbsolute),
|
|
4539
|
+
loadRepoSnapshot(ctx.storageDirAbsolute)
|
|
4540
|
+
]);
|
|
4490
4541
|
let openIssues = 0;
|
|
4491
4542
|
let openPulls = 0;
|
|
4492
4543
|
let newIssuesToday = 0;
|
|
@@ -4501,6 +4552,11 @@ async function summarizeProject(ctx) {
|
|
|
4501
4552
|
if (item.kind === "issue") openIssues += 1;
|
|
4502
4553
|
else openPulls += 1;
|
|
4503
4554
|
}
|
|
4555
|
+
const labels = (snapshot?.labels ?? []).map((label) => ({
|
|
4556
|
+
name: label.name,
|
|
4557
|
+
color: label.color,
|
|
4558
|
+
description: label.description
|
|
4559
|
+
}));
|
|
4504
4560
|
return {
|
|
4505
4561
|
id: ctx.id,
|
|
4506
4562
|
path: ctx.path,
|
|
@@ -4514,7 +4570,8 @@ async function summarizeProject(ctx) {
|
|
|
4514
4570
|
newIssuesToday,
|
|
4515
4571
|
newPullsToday,
|
|
4516
4572
|
lastSyncedAt: syncState.lastSyncedAt,
|
|
4517
|
-
lastActivityAt
|
|
4573
|
+
lastActivityAt,
|
|
4574
|
+
labels
|
|
4518
4575
|
};
|
|
4519
4576
|
}
|
|
4520
4577
|
async function buildInitialPayload(ctx) {
|
|
@@ -4660,7 +4717,7 @@ async function executeQueue$1(ctx, options) {
|
|
|
4660
4717
|
const token = await ctx.getToken();
|
|
4661
4718
|
const selectedIndexes = await resolveSelectedIndexes(ctx, options.entryIds);
|
|
4662
4719
|
ctx.broadcast.onExecuteStart({ planned: selectedIndexes?.length ?? -1 });
|
|
4663
|
-
|
|
4720
|
+
const result = await executePendingChanges({
|
|
4664
4721
|
config: ctx.config,
|
|
4665
4722
|
repo: ctx.repo,
|
|
4666
4723
|
token,
|
|
@@ -4691,6 +4748,15 @@ async function executeQueue$1(ctx, options) {
|
|
|
4691
4748
|
}
|
|
4692
4749
|
}
|
|
4693
4750
|
});
|
|
4751
|
+
try {
|
|
4752
|
+
await appendExecutionResult(ctx.storageDirAbsolute, result);
|
|
4753
|
+
const affectedNumbers = [...new Set(result.details.filter((detail) => detail.status === "applied").map((detail) => detail.number))];
|
|
4754
|
+
if (affectedNumbers.length > 0) await runSyncWithReporter(ctx, { numbers: affectedNumbers });
|
|
4755
|
+
} catch (syncError) {
|
|
4756
|
+
const message = syncError instanceof Error ? syncError.message : String(syncError);
|
|
4757
|
+
ctx.broadcast.onSyncError(message);
|
|
4758
|
+
}
|
|
4759
|
+
return result;
|
|
4694
4760
|
} finally {
|
|
4695
4761
|
executeRunning.delete(ctx.id);
|
|
4696
4762
|
}
|
|
@@ -5084,6 +5150,11 @@ const hubRecentItems = defineRpcFunction({
|
|
|
5084
5150
|
number: item.number,
|
|
5085
5151
|
title: item.data.item.title,
|
|
5086
5152
|
state: item.state,
|
|
5153
|
+
stateReason: item.data.item.stateReason ?? null,
|
|
5154
|
+
...item.kind === "pull" && item.data.pull ? {
|
|
5155
|
+
pullIsDraft: item.data.pull.isDraft,
|
|
5156
|
+
pullMerged: item.data.pull.merged
|
|
5157
|
+
} : {},
|
|
5087
5158
|
updatedAt: getEffectiveUpdatedAt(item, p.config.bots),
|
|
5088
5159
|
author: item.data.item.author,
|
|
5089
5160
|
...item.data.item.authorAvatarUrl ? { authorAvatarUrl: item.data.item.authorAvatarUrl } : {},
|
|
@@ -5166,6 +5237,21 @@ async function walk(dir, depth, maxDepth, out) {
|
|
|
5166
5237
|
}
|
|
5167
5238
|
//#endregion
|
|
5168
5239
|
//#region src/devframe/rpc/hub-scan.ts
|
|
5240
|
+
async function tryResolveRepo(cwd) {
|
|
5241
|
+
try {
|
|
5242
|
+
let configRepo;
|
|
5243
|
+
try {
|
|
5244
|
+
configRepo = (await resolveConfig({ cwd })).repo || void 0;
|
|
5245
|
+
} catch {}
|
|
5246
|
+
return (await resolveRepo({
|
|
5247
|
+
cwd,
|
|
5248
|
+
configRepo,
|
|
5249
|
+
interactive: false
|
|
5250
|
+
})).repo;
|
|
5251
|
+
} catch {
|
|
5252
|
+
return null;
|
|
5253
|
+
}
|
|
5254
|
+
}
|
|
5169
5255
|
const hubScan = defineRpcFunction({
|
|
5170
5256
|
name: "ghfs:hub-scan",
|
|
5171
5257
|
type: "query",
|
|
@@ -5174,7 +5260,8 @@ const hubScan = defineRpcFunction({
|
|
|
5174
5260
|
return { handler: async (rootPath) => {
|
|
5175
5261
|
const targets = rootPath ? [resolveHubRoot(rootPath)] : Array.from(hub.roots).sort();
|
|
5176
5262
|
const enabledPaths = new Set(Array.from(hub.projects.values()).map((p) => p.path));
|
|
5177
|
-
const
|
|
5263
|
+
const unique = [];
|
|
5264
|
+
const seen = /* @__PURE__ */ new Set();
|
|
5178
5265
|
for (const target of targets) {
|
|
5179
5266
|
let scanned;
|
|
5180
5267
|
try {
|
|
@@ -5183,18 +5270,56 @@ const hubScan = defineRpcFunction({
|
|
|
5183
5270
|
continue;
|
|
5184
5271
|
}
|
|
5185
5272
|
for (const repo of scanned) {
|
|
5186
|
-
if (
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
name: repo.name,
|
|
5190
|
-
enabled: enabledPaths.has(repo.path),
|
|
5191
|
-
iconDataUrl: await findProjectIcon(repo.path).catch(() => null)
|
|
5192
|
-
});
|
|
5273
|
+
if (seen.has(repo.path)) continue;
|
|
5274
|
+
seen.add(repo.path);
|
|
5275
|
+
unique.push(repo);
|
|
5193
5276
|
}
|
|
5194
5277
|
}
|
|
5195
|
-
const
|
|
5196
|
-
|
|
5197
|
-
|
|
5278
|
+
const resolved = await Promise.all(unique.map(async (repo) => {
|
|
5279
|
+
const [iconDataUrl, resolvedRepo] = await Promise.all([findProjectIcon(repo.path).catch(() => null), tryResolveRepo(repo.path)]);
|
|
5280
|
+
return {
|
|
5281
|
+
repo,
|
|
5282
|
+
resolvedRepo,
|
|
5283
|
+
iconDataUrl
|
|
5284
|
+
};
|
|
5285
|
+
}));
|
|
5286
|
+
const entries = [];
|
|
5287
|
+
for (const { repo, resolvedRepo, iconDataUrl } of resolved) {
|
|
5288
|
+
if (!resolvedRepo) continue;
|
|
5289
|
+
entries.push({
|
|
5290
|
+
path: repo.path,
|
|
5291
|
+
name: repo.name,
|
|
5292
|
+
repo: resolvedRepo,
|
|
5293
|
+
enabled: enabledPaths.has(repo.path),
|
|
5294
|
+
iconDataUrl
|
|
5295
|
+
});
|
|
5296
|
+
}
|
|
5297
|
+
entries.sort((a, b) => a.path.localeCompare(b.path));
|
|
5298
|
+
return entries;
|
|
5299
|
+
} };
|
|
5300
|
+
}
|
|
5301
|
+
});
|
|
5302
|
+
//#endregion
|
|
5303
|
+
//#region src/devframe/rpc/hub-seen-history.ts
|
|
5304
|
+
/**
|
|
5305
|
+
* Aggregate `seenHistory` from every enabled project's `ui.json` into one
|
|
5306
|
+
* map. Keys are already `${projectId}#${number}` so the union is
|
|
5307
|
+
* collision-free. Hub-mode UI calls this once on mount to populate a
|
|
5308
|
+
* cross-project lookup; per-project writes update the cache in-process.
|
|
5309
|
+
*/
|
|
5310
|
+
const hubSeenHistory = defineRpcFunction({
|
|
5311
|
+
name: "ghfs:hub-seen-history",
|
|
5312
|
+
type: "query",
|
|
5313
|
+
setup: (context) => {
|
|
5314
|
+
const registry = getProjectRegistry(context);
|
|
5315
|
+
return { handler: async () => {
|
|
5316
|
+
const merged = {};
|
|
5317
|
+
for (const project of registry.listProjects()) {
|
|
5318
|
+
const seen = (await loadUiState(project.storageDirAbsolute)).seenHistory;
|
|
5319
|
+
if (!seen) continue;
|
|
5320
|
+
for (const [key, entry] of Object.entries(seen)) merged[key] = entry;
|
|
5321
|
+
}
|
|
5322
|
+
return merged;
|
|
5198
5323
|
} };
|
|
5199
5324
|
}
|
|
5200
5325
|
});
|
|
@@ -5231,6 +5356,42 @@ const hubSettings = defineRpcFunction({
|
|
|
5231
5356
|
}
|
|
5232
5357
|
});
|
|
5233
5358
|
//#endregion
|
|
5359
|
+
//#region src/devframe/rpc/hub-todos.ts
|
|
5360
|
+
const hubTodos = defineRpcFunction({
|
|
5361
|
+
name: "ghfs:hub-todos",
|
|
5362
|
+
type: "query",
|
|
5363
|
+
setup: (context) => {
|
|
5364
|
+
const registry = getProjectRegistry(context);
|
|
5365
|
+
return { handler: async () => {
|
|
5366
|
+
const collected = [];
|
|
5367
|
+
for (const p of registry.listProjects()) {
|
|
5368
|
+
const todos = (await loadUiState(p.storageDirAbsolute)).todos ?? [];
|
|
5369
|
+
if (todos.length === 0) continue;
|
|
5370
|
+
const sync = await loadSyncState(p.storageDirAbsolute);
|
|
5371
|
+
for (const n of todos) {
|
|
5372
|
+
const entry = sync.items[String(n)];
|
|
5373
|
+
if (!entry) continue;
|
|
5374
|
+
const item = entry.data.item;
|
|
5375
|
+
collected.push({
|
|
5376
|
+
projectId: p.id,
|
|
5377
|
+
repo: p.repo,
|
|
5378
|
+
kind: item.kind,
|
|
5379
|
+
number: item.number,
|
|
5380
|
+
title: item.title,
|
|
5381
|
+
state: item.state,
|
|
5382
|
+
updatedAt: getEffectiveUpdatedAt(entry, p.config.bots),
|
|
5383
|
+
author: item.author,
|
|
5384
|
+
...item.authorAvatarUrl ? { authorAvatarUrl: item.authorAvatarUrl } : {},
|
|
5385
|
+
labels: item.labels ?? []
|
|
5386
|
+
});
|
|
5387
|
+
}
|
|
5388
|
+
}
|
|
5389
|
+
collected.sort((a, b) => b.updatedAt.localeCompare(a.updatedAt));
|
|
5390
|
+
return collected;
|
|
5391
|
+
} };
|
|
5392
|
+
}
|
|
5393
|
+
});
|
|
5394
|
+
//#endregion
|
|
5234
5395
|
//#region src/devframe/rpc/initial-payload.ts
|
|
5235
5396
|
const initialPayload = defineRpcFunction({
|
|
5236
5397
|
name: "ghfs:initial-payload",
|
|
@@ -5394,6 +5555,7 @@ const rpcFunctions = [
|
|
|
5394
5555
|
hubQueue,
|
|
5395
5556
|
hubExecuteQueue,
|
|
5396
5557
|
hubRecentItems,
|
|
5558
|
+
hubTodos,
|
|
5397
5559
|
hubInfo,
|
|
5398
5560
|
hubScan,
|
|
5399
5561
|
hubEnable,
|
|
@@ -5401,7 +5563,8 @@ const rpcFunctions = [
|
|
|
5401
5563
|
hubAddRoot,
|
|
5402
5564
|
hubRemoveRoot,
|
|
5403
5565
|
hubSettings,
|
|
5404
|
-
hubSetSettings
|
|
5566
|
+
hubSetSettings,
|
|
5567
|
+
hubSeenHistory
|
|
5405
5568
|
];
|
|
5406
5569
|
function registerGhfsRpc(ctx) {
|
|
5407
5570
|
for (const fn of rpcFunctions) ctx.rpc.register(fn);
|
|
@@ -5515,6 +5678,7 @@ async function setupHubMode(devframeCtx, options) {
|
|
|
5515
5678
|
autoSync
|
|
5516
5679
|
});
|
|
5517
5680
|
registerGhfsRpc(devframeCtx);
|
|
5681
|
+
await devframeCtx.rpc.sharedState.get("ghfs:cards-pile", { initialValue: { pile: null } });
|
|
5518
5682
|
return {
|
|
5519
5683
|
registry,
|
|
5520
5684
|
close: async () => {
|
|
@@ -5551,6 +5715,7 @@ async function setupUiMode(devframeCtx, options) {
|
|
|
5551
5715
|
autoSync.setInterval(next.autoSyncIntervalMs);
|
|
5552
5716
|
});
|
|
5553
5717
|
registerGhfsRpc(devframeCtx);
|
|
5718
|
+
await devframeCtx.rpc.sharedState.get("ghfs:cards-pile", { initialValue: { pile: null } });
|
|
5554
5719
|
return {
|
|
5555
5720
|
registry,
|
|
5556
5721
|
close: async () => {
|
package/dist/ui/200.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>ghfs</title><link rel="stylesheet" href="/_nuxt/entry.
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>ghfs</title><link rel="stylesheet" href="/_nuxt/entry.COcGUqGv.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/_nuxt/DHH7xZXJ.js"><script type="module" src="/_nuxt/DHH7xZXJ.js" crossorigin></script><link rel="icon" href="./favicon.svg" type="image/svg+xml"><script id="unhead:payload" type="application/json">{"title":"ghfs"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/",buildId:"f935488c-a544-4bf6-9a65-b421d02508c1",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1779522709848,false]</script></body></html>
|
package/dist/ui/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>ghfs</title><link rel="stylesheet" href="/_nuxt/entry.
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>ghfs</title><link rel="stylesheet" href="/_nuxt/entry.COcGUqGv.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/_nuxt/DHH7xZXJ.js"><script type="module" src="/_nuxt/DHH7xZXJ.js" crossorigin></script><link rel="icon" href="./favicon.svg" type="image/svg+xml"><script id="unhead:payload" type="application/json">{"title":"ghfs"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/",buildId:"f935488c-a544-4bf6-9a65-b421d02508c1",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1779522709849,false]</script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as v,Z as m,r as d}from"./BWLewmBT.js";import{b3 as b,g as y,l as c,o as g,c as x,z as k,s as N,r as a,j as S,B as Y}from"./DHH7xZXJ.js";import"./DeX2bcSG.js";import"./D4yIuA0F.js";import"./BqmRGtwl.js";import"./D4R7-XZQ.js";import"./DVC3GhaL.js";import"./BNh5okZH.js";var B=v({__name:"SparkTooltip",props:{svgRef:{type:Object},x:{type:Number,required:!0},y:{type:Number,required:!0},prevX:{type:Number,required:!0},prevY:{type:Number,required:!0},offsetY:{type:Number,default:0},background:{type:String},backgroundOpacity:{type:Number,default:100},borderRadius:{type:Number,default:2},borderWidth:{type:Number,default:0},borderColor:{type:String,default:"#FFFFFF"},color:{type:String},fontSize:{type:Number}},setup(f){let e=f,u=b(e.svgRef),r=a(null),l=a(0),p=a(0),s=a(!1),n=S(()=>m(e.background,e.backgroundOpacity)),i=async()=>{if(!u.value||!r.value)return;let t=d({svgElement:u.value,element:r.value,x:e.x,y:e.y,offsetY:e.offsetY}),o=d({svgElement:u.value,element:r.value,x:e.prevX,y:e.prevY,offsetY:e.offsetY});!t||!o||(s.value=!1,l.value=o.top,p.value=o.left,await Y(),setTimeout(()=>{s.value=!0,l.value=t.top,p.value=t.left},50))};return y(i),c(()=>[e.x,e.y,e.prevX,e.prevY],()=>i(),{immediate:!0}),(t,o)=>(g(),x("div",{ref_key:"tooltipRef",ref:r,class:"vue-data-ui-spark-tooltip",style:N({position:"fixed",top:`${l.value}px`,left:`${p.value}px`,pointerEvents:"none",background:n.value,color:e.color,fontSize:`${e.fontSize}px`,borderRadius:`${e.borderRadius}px`,border:`${e.borderWidth}px solid ${e.borderColor}`,transition:s.value?"top 0.3s ease-out, left 0.3s ease-out":"none"})},[k(t.$slots,"default",{},void 0,!0)],4))}},[["__scopeId","data-v-57d870b0"]]);export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as o}from"./DlAUqK2U.js";import{u as s,o as a,c as i,a as t,t as r}from"./
|
|
1
|
+
import{_ as o}from"./DlAUqK2U.js";import{u as s,o as a,c as i,a as t,t as r}from"./DHH7xZXJ.js";const u={class:"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"},l={class:"max-w-520px text-center"},c=["textContent"],d=["textContent"],p=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},status:{type:Number,default:500},statusText:{type:String,default:"Internal server error"},description:{type:String,default:"This page is temporarily unavailable."},refresh:{type:String,default:"Refresh this page"}},setup(e){const n=e;return s({title:`${n.status} - ${n.statusText} | ${n.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--un-default-border-color,#e5e7eb)}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}h1,h2{font-size:inherit;font-weight:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(h,m)=>(a(),i("div",u,[t("div",l,[t("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:r(e.status)},null,8,c),t("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:r(e.statusText)},null,8,d),t("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:r(e.description)},null,8,p)])]))}},x=o(f,[["__scopeId","data-v-a31f08b8"]]);export{x as default};
|