@gobing-ai/knowledge-kit 0.1.27 → 0.1.28
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/.claude-plugin/marketplace.json +1 -1
- package/dist/board/collect/index.js +10 -0
- package/dist/board/daily-voice/index.js +1327 -2168
- package/dist/board/itc/index.js +10 -0
- package/dist/index.js +5980 -4651
- package/package.json +1 -1
- package/plugins/ingestions/aihot-ingest/dist/index.js +4 -1
- package/plugins/ingestions/aihot-ingest/src/rss.ts +22 -11
- package/plugins/kk/plugin.json +1 -1
- package/plugins/kk/scripts/daily-stages.ts +7 -7
- package/plugins/kk/workflows/kk-news-generate.yaml +1 -1
- package/plugins/publishings/bilibili-pub/dist/index.js +81 -80
- package/plugins/publishings/bilibili-pub/dist/profile-check.js +1 -1
- package/plugins/publishings/cnblogs-pub/dist/index.js +81 -80
- package/plugins/publishings/cnblogs-pub/dist/profile-check.js +1 -1
- package/plugins/publishings/csdn-pub/dist/index.js +81 -80
- package/plugins/publishings/csdn-pub/dist/profile-check.js +1 -1
- package/plugins/publishings/infoq-pub/dist/index.js +81 -80
- package/plugins/publishings/infoq-pub/dist/profile-check.js +1 -1
- package/plugins/publishings/jike-pub/dist/index.js +81 -80
- package/plugins/publishings/jike-pub/dist/profile-check.js +1 -1
- package/plugins/publishings/juejin-pub/dist/index.js +81 -80
- package/plugins/publishings/juejin-pub/dist/profile-check.js +1 -1
- package/plugins/publishings/linkedin-pub/dist/index.js +81 -80
- package/plugins/publishings/linkedin-pub/dist/profile-check.js +1 -1
- package/plugins/publishings/medium-pub/dist/index.js +81 -80
- package/plugins/publishings/medium-pub/dist/profile-check.js +1 -1
- package/plugins/publishings/shipinhao-pub/dist/index.js +272 -85
- package/plugins/publishings/shipinhao-pub/dist/profile-check.js +112 -3
- package/plugins/publishings/shipinhao-pub/src/cover-crop.ts +60 -0
- package/plugins/publishings/shipinhao-pub/src/flow.ts +15 -2
- package/plugins/publishings/shipinhao-pub/src/profile-check.ts +15 -12
- package/plugins/publishings/shipinhao-pub/src/selectors.ts +22 -1
- package/plugins/publishings/sspai-pub/dist/index.js +81 -80
- package/plugins/publishings/sspai-pub/dist/profile-check.js +1 -1
- package/plugins/publishings/substack-pub/dist/index.js +81 -80
- package/plugins/publishings/substack-pub/dist/profile-check.js +1 -1
- package/plugins/publishings/surfdash-pub/dist/index.js +43 -5
- package/plugins/publishings/threads-pub/dist/index.js +86 -81
- package/plugins/publishings/threads-pub/dist/profile-check.js +1 -1
- package/plugins/publishings/threads-pub/src/index.ts +10 -0
- package/plugins/publishings/wechatmp-pub/dist/index.js +84 -83
- package/plugins/publishings/wechatmp-pub/dist/profile-check.js +1 -1
- package/plugins/publishings/weibo-pub/dist/index.js +217 -83
- package/plugins/publishings/weibo-pub/dist/profile-check.js +123 -3
- package/plugins/publishings/weibo-pub/src/index.ts +60 -2
- package/plugins/publishings/weibo-pub/src/profile-check.ts +4 -2
- package/plugins/publishings/x-pub/dist/index.js +81 -80
- package/plugins/publishings/x-pub/dist/profile-check.js +1 -1
- package/plugins/publishings/xhs-pub/dist/index.js +81 -80
- package/plugins/publishings/xhs-pub/dist/profile-check.js +1 -1
- package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +81 -80
- package/plugins/publishings/xiaoyuzhou-pub/dist/profile-check.js +1 -1
package/package.json
CHANGED
|
@@ -12761,8 +12761,11 @@ function mapAihotItemsToDocs(items) {
|
|
|
12761
12761
|
// ../../plugins/ingestions/aihot-ingest/src/rss.ts
|
|
12762
12762
|
import { createHash as createHash2 } from "crypto";
|
|
12763
12763
|
var AIHOT_FEED_URL_DEFAULT = "https://arstechnica.com/ai/feed/";
|
|
12764
|
+
function codePoint(ref, value) {
|
|
12765
|
+
return value <= 1114111 ? String.fromCodePoint(value) : ref;
|
|
12766
|
+
}
|
|
12764
12767
|
function stripMarkup(raw) {
|
|
12765
|
-
return raw.replace(/<!\[CDATA\[([\s\S]*?)\]\]>/g, "$1").replace(/<[^>]+>/g, " ").replace(/ /g, " ").replace(/&
|
|
12768
|
+
return raw.replace(/<!\[CDATA\[([\s\S]*?)\]\]>/g, "$1").replace(/<[^>]+>/g, " ").replace(/ /g, " ").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'").replace(/&#(\d+);/g, (ref, dec) => codePoint(ref, Number(dec))).replace(/&#x([0-9a-f]+);/gi, (ref, hex) => codePoint(ref, Number.parseInt(hex, 16))).replace(/&/g, "&").replace(/\s+/g, " ").trim();
|
|
12766
12769
|
}
|
|
12767
12770
|
function toIsoDate(raw) {
|
|
12768
12771
|
if (!raw?.trim())
|
|
@@ -38,19 +38,30 @@ export interface RssEntry {
|
|
|
38
38
|
category: string | null;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
/** A numeric character reference, or the reference itself when it names no code point (feed text is untrusted). */
|
|
42
|
+
function codePoint(ref: string, value: number): string {
|
|
43
|
+
return value <= 0x10ffff ? String.fromCodePoint(value) : ref;
|
|
44
|
+
}
|
|
45
|
+
|
|
41
46
|
/** Strip XML/HTML tags and normalize common entities to plain text. */
|
|
42
47
|
function stripMarkup(raw: string): string {
|
|
43
|
-
return
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
return (
|
|
49
|
+
raw
|
|
50
|
+
.replace(/<!\[CDATA\[([\s\S]*?)\]\]>/g, '$1')
|
|
51
|
+
.replace(/<[^>]+>/g, ' ')
|
|
52
|
+
.replace(/ /g, ' ')
|
|
53
|
+
.replace(/</g, '<')
|
|
54
|
+
.replace(/>/g, '>')
|
|
55
|
+
.replace(/"/g, '"')
|
|
56
|
+
.replace(/'/g, "'")
|
|
57
|
+
// Ars sends `'` (zero-padded), which a literal `'` missed (2026-11-25 run report).
|
|
58
|
+
.replace(/&#(\d+);/g, (ref, dec: string) => codePoint(ref, Number(dec)))
|
|
59
|
+
.replace(/&#x([0-9a-f]+);/gi, (ref, hex: string) => codePoint(ref, Number.parseInt(hex, 16)))
|
|
60
|
+
// Last, so `&lt;` decodes once to `<` instead of twice to `<`.
|
|
61
|
+
.replace(/&/g, '&')
|
|
62
|
+
.replace(/\s+/g, ' ')
|
|
63
|
+
.trim()
|
|
64
|
+
);
|
|
54
65
|
}
|
|
55
66
|
|
|
56
67
|
/** RSS <pubDate> (RFC 822) or Atom <published>/<updated> (ISO-8601) → ISO-8601. */
|
package/plugins/kk/plugin.json
CHANGED
|
@@ -376,7 +376,7 @@ const SPEAK_CHAR_EXPANSION = 1.4;
|
|
|
376
376
|
/**
|
|
377
377
|
* The cold-start ratio the PRE-SPEND widen decision uses, and it is deliberately not 1.4.
|
|
378
378
|
*
|
|
379
|
-
* The consumers need opposite safe directions (the same argument `
|
|
379
|
+
* The consumers need opposite safe directions (the same argument `SCRIPT_FLOOR_CHAR_RATE` makes about
|
|
380
380
|
* the char rate): the reported arithmetic wants the typical ratio, while the pre-spend gates want
|
|
381
381
|
* the *worst measured* ratio, because a cheap error is a rung too many and the expensive one is an
|
|
382
382
|
* authoring pass the TTS gate then refuses.
|
|
@@ -1677,7 +1677,7 @@ export function dailyGenerate(args: string[]): void {
|
|
|
1677
1677
|
// Pre-spend script floor gate (2026-10-22). QC's candidate-text estimate does not predict the
|
|
1678
1678
|
// spoken length — 20261020 planned 3968 chars and rendered 8.4 min, 20261021 planned 4548 and
|
|
1679
1679
|
// rendered 17.9 — but the authored VoiceScript IS the spoken text, and 14 measured episodes
|
|
1680
|
-
// deliver it at 5.24-5.94 chars/s. The floor estimate uses `
|
|
1680
|
+
// deliver it at 5.24-5.94 chars/s. The floor estimate uses `SCRIPT_FLOOR_CHAR_RATE`, NOT
|
|
1681
1681
|
// `spokenCharRate`: the fit rate's slow calibration over-predicts minutes and passes a thin
|
|
1682
1682
|
// script into the full synthesis, which the measured gate then refuses (20261111).
|
|
1683
1683
|
const minMinutes = episodeMinMinutes === '' ? 0 : Number(episodeMinMinutes);
|
|
@@ -1695,7 +1695,7 @@ export function dailyGenerate(args: string[]): void {
|
|
|
1695
1695
|
(sum, segment) => sum + (typeof segment.text === 'string' ? segment.text.length : 0),
|
|
1696
1696
|
0,
|
|
1697
1697
|
);
|
|
1698
|
-
const charRate =
|
|
1698
|
+
const charRate = SCRIPT_FLOOR_CHAR_RATE;
|
|
1699
1699
|
const seconds = 8 + chars / charRate;
|
|
1700
1700
|
// Record what the writer delivered before judging it: a refused day still teaches the
|
|
1701
1701
|
// next run's ladder what this pool really yielded (0377 R2/R3).
|
|
@@ -5529,11 +5529,11 @@ function voicescriptToBlockYaml(script: Record<string, unknown>): string {
|
|
|
5529
5529
|
* 5.64 chars/s; band 5.33-5.88 across 20261004/07 + the 0237 live dry run). 5.6 — the band center
|
|
5530
5530
|
* and the voicebox default — refuses a17-class days before any spend; slow-mix days near the
|
|
5531
5531
|
* floor may be refused early, the cheaper error per the ceiling gate's own economics.
|
|
5532
|
+
* voxcpm joined the band 2026-11-25: 5.31-5.70 chars/s over 20261118-25 (median 5.6). At its 5.2 fit
|
|
5533
|
+
* rate, 20261124's 4,200-char script estimated 13.6 min, passed the 13 min floor, then rendered 12.6.
|
|
5534
|
+
* Every measured driver now sits in the same band, so the floor rate is driver-independent.
|
|
5532
5535
|
*/
|
|
5533
|
-
|
|
5534
|
-
if (vdriver === 'gemini') return 5.6;
|
|
5535
|
-
return spokenCharRate(vdriver);
|
|
5536
|
-
}
|
|
5536
|
+
const SCRIPT_FLOOR_CHAR_RATE = 5.6;
|
|
5537
5537
|
|
|
5538
5538
|
/** Measured driver rates from dailyGenerate. Unknown drivers reuse the voicebox rate. */
|
|
5539
5539
|
function spokenCharRate(vdriver: string): number {
|
|
@@ -258,7 +258,7 @@ nodes:
|
|
|
258
258
|
Content to evaluate: ${vars.work_dir}/24-script/${vars.run_date}_08_script-write_plan.json
|
|
259
259
|
Plan docs reference: ${vars.work_dir}/21-plan/${vars.run_date}_03_plan_plan.json
|
|
260
260
|
Rubric: news-balance
|
|
261
|
-
Load the rubric definition from
|
|
261
|
+
Load the rubric definition from ${vars.visual_skill_root}/content-judge/references/rubrics.md (section: news-balance) and the contract from ${vars.visual_skill_root}/content-judge/SKILL.md.
|
|
262
262
|
Evaluate the script plan against every criterion in news-balance (news-first, commentary-share, no-restatement, tech-depth, ordering).
|
|
263
263
|
Write the verdict JSON (with confidence HIGH | MEDIUM | LOW) to ${vars.work_dir}/24-script/${vars.run_date}_08_editorial-judge_verdict.json.
|
|
264
264
|
expectFile: ${vars.work_dir}/24-script/${vars.run_date}_08_editorial-judge_verdict.json
|
|
@@ -20171,6 +20171,86 @@ var ATTACHED_CLOSERS = new Set(["\u201D", "\u2019", "\u300D", "\u300F", "\uFF09"
|
|
|
20171
20171
|
import { homedir } from "os";
|
|
20172
20172
|
import { join, resolve } from "path";
|
|
20173
20173
|
|
|
20174
|
+
// ../../packages/publish-harness/src/bot-fs.ts
|
|
20175
|
+
import {
|
|
20176
|
+
chmodSync,
|
|
20177
|
+
closeSync,
|
|
20178
|
+
copyFileSync,
|
|
20179
|
+
lstatSync,
|
|
20180
|
+
mkdirSync as mkdirSync2,
|
|
20181
|
+
openSync,
|
|
20182
|
+
readdirSync as readdirSync2,
|
|
20183
|
+
readlinkSync,
|
|
20184
|
+
realpathSync as realpathSync2,
|
|
20185
|
+
renameSync as renameSync2,
|
|
20186
|
+
rmdirSync,
|
|
20187
|
+
unlinkSync
|
|
20188
|
+
} from "fs";
|
|
20189
|
+
function lstat(path) {
|
|
20190
|
+
try {
|
|
20191
|
+
return lstatSync(path);
|
|
20192
|
+
} catch (error) {
|
|
20193
|
+
if (error.code === "ENOENT")
|
|
20194
|
+
return null;
|
|
20195
|
+
throw error;
|
|
20196
|
+
}
|
|
20197
|
+
}
|
|
20198
|
+
function realpath(path) {
|
|
20199
|
+
return realpathSync2(path);
|
|
20200
|
+
}
|
|
20201
|
+
function mkdirExclusive(path, mode = 448) {
|
|
20202
|
+
try {
|
|
20203
|
+
mkdirSync2(path, { mode });
|
|
20204
|
+
return true;
|
|
20205
|
+
} catch (error) {
|
|
20206
|
+
if (error.code === "EEXIST")
|
|
20207
|
+
return false;
|
|
20208
|
+
throw error;
|
|
20209
|
+
}
|
|
20210
|
+
}
|
|
20211
|
+
function rmdir(path) {
|
|
20212
|
+
try {
|
|
20213
|
+
rmdirSync(path);
|
|
20214
|
+
return true;
|
|
20215
|
+
} catch (error) {
|
|
20216
|
+
const code = error.code;
|
|
20217
|
+
if (code === "ENOENT" || code === "ENOTEMPTY" || code === "EEXIST")
|
|
20218
|
+
return false;
|
|
20219
|
+
throw error;
|
|
20220
|
+
}
|
|
20221
|
+
}
|
|
20222
|
+
function readlink(path) {
|
|
20223
|
+
try {
|
|
20224
|
+
return readlinkSync(path);
|
|
20225
|
+
} catch {
|
|
20226
|
+
return null;
|
|
20227
|
+
}
|
|
20228
|
+
}
|
|
20229
|
+
function unlink(path) {
|
|
20230
|
+
try {
|
|
20231
|
+
unlinkSync(path);
|
|
20232
|
+
return true;
|
|
20233
|
+
} catch (error) {
|
|
20234
|
+
if (error.code === "ENOENT")
|
|
20235
|
+
return false;
|
|
20236
|
+
throw error;
|
|
20237
|
+
}
|
|
20238
|
+
}
|
|
20239
|
+
function rename(from, to) {
|
|
20240
|
+
try {
|
|
20241
|
+
renameSync2(from, to);
|
|
20242
|
+
return true;
|
|
20243
|
+
} catch (error) {
|
|
20244
|
+
if (error.code === "ENOENT")
|
|
20245
|
+
return false;
|
|
20246
|
+
throw error;
|
|
20247
|
+
}
|
|
20248
|
+
}
|
|
20249
|
+
function chmod(path, mode) {
|
|
20250
|
+
chmodSync(path, mode);
|
|
20251
|
+
}
|
|
20252
|
+
|
|
20253
|
+
// ../../packages/publish-harness/src/index.ts
|
|
20174
20254
|
class FakeTransportCore {
|
|
20175
20255
|
callLogs = [];
|
|
20176
20256
|
nextResult;
|
|
@@ -20437,85 +20517,6 @@ init_dist();
|
|
|
20437
20517
|
import { homedir as homedir4 } from "os";
|
|
20438
20518
|
import { isAbsolute, join as join4, relative, resolve as resolve4, sep } from "path";
|
|
20439
20519
|
|
|
20440
|
-
// ../../packages/publish-harness/src/bot-fs.ts
|
|
20441
|
-
import {
|
|
20442
|
-
chmodSync,
|
|
20443
|
-
closeSync,
|
|
20444
|
-
copyFileSync,
|
|
20445
|
-
lstatSync,
|
|
20446
|
-
mkdirSync as mkdirSync2,
|
|
20447
|
-
openSync,
|
|
20448
|
-
readdirSync as readdirSync2,
|
|
20449
|
-
readlinkSync,
|
|
20450
|
-
realpathSync as realpathSync2,
|
|
20451
|
-
renameSync as renameSync2,
|
|
20452
|
-
rmdirSync,
|
|
20453
|
-
unlinkSync
|
|
20454
|
-
} from "fs";
|
|
20455
|
-
function lstat(path) {
|
|
20456
|
-
try {
|
|
20457
|
-
return lstatSync(path);
|
|
20458
|
-
} catch (error) {
|
|
20459
|
-
if (error.code === "ENOENT")
|
|
20460
|
-
return null;
|
|
20461
|
-
throw error;
|
|
20462
|
-
}
|
|
20463
|
-
}
|
|
20464
|
-
function realpath(path) {
|
|
20465
|
-
return realpathSync2(path);
|
|
20466
|
-
}
|
|
20467
|
-
function mkdirExclusive(path, mode = 448) {
|
|
20468
|
-
try {
|
|
20469
|
-
mkdirSync2(path, { mode });
|
|
20470
|
-
return true;
|
|
20471
|
-
} catch (error) {
|
|
20472
|
-
if (error.code === "EEXIST")
|
|
20473
|
-
return false;
|
|
20474
|
-
throw error;
|
|
20475
|
-
}
|
|
20476
|
-
}
|
|
20477
|
-
function rmdir(path) {
|
|
20478
|
-
try {
|
|
20479
|
-
rmdirSync(path);
|
|
20480
|
-
return true;
|
|
20481
|
-
} catch (error) {
|
|
20482
|
-
const code = error.code;
|
|
20483
|
-
if (code === "ENOENT" || code === "ENOTEMPTY" || code === "EEXIST")
|
|
20484
|
-
return false;
|
|
20485
|
-
throw error;
|
|
20486
|
-
}
|
|
20487
|
-
}
|
|
20488
|
-
function readlink(path) {
|
|
20489
|
-
try {
|
|
20490
|
-
return readlinkSync(path);
|
|
20491
|
-
} catch {
|
|
20492
|
-
return null;
|
|
20493
|
-
}
|
|
20494
|
-
}
|
|
20495
|
-
function unlink(path) {
|
|
20496
|
-
try {
|
|
20497
|
-
unlinkSync(path);
|
|
20498
|
-
return true;
|
|
20499
|
-
} catch (error) {
|
|
20500
|
-
if (error.code === "ENOENT")
|
|
20501
|
-
return false;
|
|
20502
|
-
throw error;
|
|
20503
|
-
}
|
|
20504
|
-
}
|
|
20505
|
-
function rename(from, to) {
|
|
20506
|
-
try {
|
|
20507
|
-
renameSync2(from, to);
|
|
20508
|
-
return true;
|
|
20509
|
-
} catch (error) {
|
|
20510
|
-
if (error.code === "ENOENT")
|
|
20511
|
-
return false;
|
|
20512
|
-
throw error;
|
|
20513
|
-
}
|
|
20514
|
-
}
|
|
20515
|
-
function chmod(path, mode) {
|
|
20516
|
-
chmodSync(path, mode);
|
|
20517
|
-
}
|
|
20518
|
-
|
|
20519
20520
|
// ../../packages/publish-harness/src/bot-transaction.ts
|
|
20520
20521
|
import { homedir as homedir2 } from "os";
|
|
20521
20522
|
import { dirname as dirname2, join as join2, resolve as resolve2 } from "path";
|
|
@@ -20813,7 +20814,7 @@ function quarantineProfileSyncData(profileDir) {
|
|
|
20813
20814
|
const syncData = join5(profileDir, "Default", "Sync Data");
|
|
20814
20815
|
if (lstat(syncData) === null)
|
|
20815
20816
|
return false;
|
|
20816
|
-
return rename(syncData, `${syncData}.broken-${new Date().toISOString().replace(/[:.]/g, "").slice(0,
|
|
20817
|
+
return rename(syncData, `${syncData}.broken-${new Date().toISOString().replace(/[:.]/g, "").slice(0, 17)}`);
|
|
20817
20818
|
}
|
|
20818
20819
|
function createKkBrowserLauncher(loadPlaywright = () => import("playwright"), ownership, leaseOptions = {}) {
|
|
20819
20820
|
return {
|
|
@@ -20244,7 +20244,7 @@ function quarantineProfileSyncData(profileDir) {
|
|
|
20244
20244
|
const syncData = join5(profileDir, "Default", "Sync Data");
|
|
20245
20245
|
if (lstat(syncData) === null)
|
|
20246
20246
|
return false;
|
|
20247
|
-
return rename(syncData, `${syncData}.broken-${new Date().toISOString().replace(/[:.]/g, "").slice(0,
|
|
20247
|
+
return rename(syncData, `${syncData}.broken-${new Date().toISOString().replace(/[:.]/g, "").slice(0, 17)}`);
|
|
20248
20248
|
}
|
|
20249
20249
|
function createKkBrowserLauncher(loadPlaywright = () => import("playwright"), ownership, leaseOptions = {}) {
|
|
20250
20250
|
return {
|
|
@@ -20171,6 +20171,86 @@ var ATTACHED_CLOSERS = new Set(["\u201D", "\u2019", "\u300D", "\u300F", "\uFF09"
|
|
|
20171
20171
|
import { homedir } from "os";
|
|
20172
20172
|
import { join, resolve } from "path";
|
|
20173
20173
|
|
|
20174
|
+
// ../../packages/publish-harness/src/bot-fs.ts
|
|
20175
|
+
import {
|
|
20176
|
+
chmodSync,
|
|
20177
|
+
closeSync,
|
|
20178
|
+
copyFileSync,
|
|
20179
|
+
lstatSync,
|
|
20180
|
+
mkdirSync as mkdirSync2,
|
|
20181
|
+
openSync,
|
|
20182
|
+
readdirSync as readdirSync2,
|
|
20183
|
+
readlinkSync,
|
|
20184
|
+
realpathSync as realpathSync2,
|
|
20185
|
+
renameSync as renameSync2,
|
|
20186
|
+
rmdirSync,
|
|
20187
|
+
unlinkSync
|
|
20188
|
+
} from "fs";
|
|
20189
|
+
function lstat(path) {
|
|
20190
|
+
try {
|
|
20191
|
+
return lstatSync(path);
|
|
20192
|
+
} catch (error) {
|
|
20193
|
+
if (error.code === "ENOENT")
|
|
20194
|
+
return null;
|
|
20195
|
+
throw error;
|
|
20196
|
+
}
|
|
20197
|
+
}
|
|
20198
|
+
function realpath(path) {
|
|
20199
|
+
return realpathSync2(path);
|
|
20200
|
+
}
|
|
20201
|
+
function mkdirExclusive(path, mode = 448) {
|
|
20202
|
+
try {
|
|
20203
|
+
mkdirSync2(path, { mode });
|
|
20204
|
+
return true;
|
|
20205
|
+
} catch (error) {
|
|
20206
|
+
if (error.code === "EEXIST")
|
|
20207
|
+
return false;
|
|
20208
|
+
throw error;
|
|
20209
|
+
}
|
|
20210
|
+
}
|
|
20211
|
+
function rmdir(path) {
|
|
20212
|
+
try {
|
|
20213
|
+
rmdirSync(path);
|
|
20214
|
+
return true;
|
|
20215
|
+
} catch (error) {
|
|
20216
|
+
const code = error.code;
|
|
20217
|
+
if (code === "ENOENT" || code === "ENOTEMPTY" || code === "EEXIST")
|
|
20218
|
+
return false;
|
|
20219
|
+
throw error;
|
|
20220
|
+
}
|
|
20221
|
+
}
|
|
20222
|
+
function readlink(path) {
|
|
20223
|
+
try {
|
|
20224
|
+
return readlinkSync(path);
|
|
20225
|
+
} catch {
|
|
20226
|
+
return null;
|
|
20227
|
+
}
|
|
20228
|
+
}
|
|
20229
|
+
function unlink(path) {
|
|
20230
|
+
try {
|
|
20231
|
+
unlinkSync(path);
|
|
20232
|
+
return true;
|
|
20233
|
+
} catch (error) {
|
|
20234
|
+
if (error.code === "ENOENT")
|
|
20235
|
+
return false;
|
|
20236
|
+
throw error;
|
|
20237
|
+
}
|
|
20238
|
+
}
|
|
20239
|
+
function rename(from, to) {
|
|
20240
|
+
try {
|
|
20241
|
+
renameSync2(from, to);
|
|
20242
|
+
return true;
|
|
20243
|
+
} catch (error) {
|
|
20244
|
+
if (error.code === "ENOENT")
|
|
20245
|
+
return false;
|
|
20246
|
+
throw error;
|
|
20247
|
+
}
|
|
20248
|
+
}
|
|
20249
|
+
function chmod(path, mode) {
|
|
20250
|
+
chmodSync(path, mode);
|
|
20251
|
+
}
|
|
20252
|
+
|
|
20253
|
+
// ../../packages/publish-harness/src/index.ts
|
|
20174
20254
|
class FakeTransportCore {
|
|
20175
20255
|
callLogs = [];
|
|
20176
20256
|
nextResult;
|
|
@@ -20458,85 +20538,6 @@ init_dist();
|
|
|
20458
20538
|
import { homedir as homedir4 } from "os";
|
|
20459
20539
|
import { isAbsolute, join as join4, relative, resolve as resolve4, sep } from "path";
|
|
20460
20540
|
|
|
20461
|
-
// ../../packages/publish-harness/src/bot-fs.ts
|
|
20462
|
-
import {
|
|
20463
|
-
chmodSync,
|
|
20464
|
-
closeSync,
|
|
20465
|
-
copyFileSync,
|
|
20466
|
-
lstatSync,
|
|
20467
|
-
mkdirSync as mkdirSync2,
|
|
20468
|
-
openSync,
|
|
20469
|
-
readdirSync as readdirSync2,
|
|
20470
|
-
readlinkSync,
|
|
20471
|
-
realpathSync as realpathSync2,
|
|
20472
|
-
renameSync as renameSync2,
|
|
20473
|
-
rmdirSync,
|
|
20474
|
-
unlinkSync
|
|
20475
|
-
} from "fs";
|
|
20476
|
-
function lstat(path) {
|
|
20477
|
-
try {
|
|
20478
|
-
return lstatSync(path);
|
|
20479
|
-
} catch (error) {
|
|
20480
|
-
if (error.code === "ENOENT")
|
|
20481
|
-
return null;
|
|
20482
|
-
throw error;
|
|
20483
|
-
}
|
|
20484
|
-
}
|
|
20485
|
-
function realpath(path) {
|
|
20486
|
-
return realpathSync2(path);
|
|
20487
|
-
}
|
|
20488
|
-
function mkdirExclusive(path, mode = 448) {
|
|
20489
|
-
try {
|
|
20490
|
-
mkdirSync2(path, { mode });
|
|
20491
|
-
return true;
|
|
20492
|
-
} catch (error) {
|
|
20493
|
-
if (error.code === "EEXIST")
|
|
20494
|
-
return false;
|
|
20495
|
-
throw error;
|
|
20496
|
-
}
|
|
20497
|
-
}
|
|
20498
|
-
function rmdir(path) {
|
|
20499
|
-
try {
|
|
20500
|
-
rmdirSync(path);
|
|
20501
|
-
return true;
|
|
20502
|
-
} catch (error) {
|
|
20503
|
-
const code = error.code;
|
|
20504
|
-
if (code === "ENOENT" || code === "ENOTEMPTY" || code === "EEXIST")
|
|
20505
|
-
return false;
|
|
20506
|
-
throw error;
|
|
20507
|
-
}
|
|
20508
|
-
}
|
|
20509
|
-
function readlink(path) {
|
|
20510
|
-
try {
|
|
20511
|
-
return readlinkSync(path);
|
|
20512
|
-
} catch {
|
|
20513
|
-
return null;
|
|
20514
|
-
}
|
|
20515
|
-
}
|
|
20516
|
-
function unlink(path) {
|
|
20517
|
-
try {
|
|
20518
|
-
unlinkSync(path);
|
|
20519
|
-
return true;
|
|
20520
|
-
} catch (error) {
|
|
20521
|
-
if (error.code === "ENOENT")
|
|
20522
|
-
return false;
|
|
20523
|
-
throw error;
|
|
20524
|
-
}
|
|
20525
|
-
}
|
|
20526
|
-
function rename(from, to) {
|
|
20527
|
-
try {
|
|
20528
|
-
renameSync2(from, to);
|
|
20529
|
-
return true;
|
|
20530
|
-
} catch (error) {
|
|
20531
|
-
if (error.code === "ENOENT")
|
|
20532
|
-
return false;
|
|
20533
|
-
throw error;
|
|
20534
|
-
}
|
|
20535
|
-
}
|
|
20536
|
-
function chmod(path, mode) {
|
|
20537
|
-
chmodSync(path, mode);
|
|
20538
|
-
}
|
|
20539
|
-
|
|
20540
20541
|
// ../../packages/publish-harness/src/bot-transaction.ts
|
|
20541
20542
|
import { homedir as homedir2 } from "os";
|
|
20542
20543
|
import { dirname as dirname2, join as join2, resolve as resolve2 } from "path";
|
|
@@ -20836,7 +20837,7 @@ function quarantineProfileSyncData(profileDir) {
|
|
|
20836
20837
|
const syncData = join5(profileDir, "Default", "Sync Data");
|
|
20837
20838
|
if (lstat(syncData) === null)
|
|
20838
20839
|
return false;
|
|
20839
|
-
return rename(syncData, `${syncData}.broken-${new Date().toISOString().replace(/[:.]/g, "").slice(0,
|
|
20840
|
+
return rename(syncData, `${syncData}.broken-${new Date().toISOString().replace(/[:.]/g, "").slice(0, 17)}`);
|
|
20840
20841
|
}
|
|
20841
20842
|
function createKkBrowserLauncher(loadPlaywright = () => import("playwright"), ownership, leaseOptions = {}) {
|
|
20842
20843
|
return {
|
|
@@ -20265,7 +20265,7 @@ function quarantineProfileSyncData(profileDir) {
|
|
|
20265
20265
|
const syncData = join5(profileDir, "Default", "Sync Data");
|
|
20266
20266
|
if (lstat(syncData) === null)
|
|
20267
20267
|
return false;
|
|
20268
|
-
return rename(syncData, `${syncData}.broken-${new Date().toISOString().replace(/[:.]/g, "").slice(0,
|
|
20268
|
+
return rename(syncData, `${syncData}.broken-${new Date().toISOString().replace(/[:.]/g, "").slice(0, 17)}`);
|
|
20269
20269
|
}
|
|
20270
20270
|
function createKkBrowserLauncher(loadPlaywright = () => import("playwright"), ownership, leaseOptions = {}) {
|
|
20271
20271
|
return {
|
|
@@ -20171,6 +20171,86 @@ var ATTACHED_CLOSERS = new Set(["\u201D", "\u2019", "\u300D", "\u300F", "\uFF09"
|
|
|
20171
20171
|
import { homedir } from "os";
|
|
20172
20172
|
import { join, resolve } from "path";
|
|
20173
20173
|
|
|
20174
|
+
// ../../packages/publish-harness/src/bot-fs.ts
|
|
20175
|
+
import {
|
|
20176
|
+
chmodSync,
|
|
20177
|
+
closeSync,
|
|
20178
|
+
copyFileSync,
|
|
20179
|
+
lstatSync,
|
|
20180
|
+
mkdirSync as mkdirSync2,
|
|
20181
|
+
openSync,
|
|
20182
|
+
readdirSync as readdirSync2,
|
|
20183
|
+
readlinkSync,
|
|
20184
|
+
realpathSync as realpathSync2,
|
|
20185
|
+
renameSync as renameSync2,
|
|
20186
|
+
rmdirSync,
|
|
20187
|
+
unlinkSync
|
|
20188
|
+
} from "fs";
|
|
20189
|
+
function lstat(path) {
|
|
20190
|
+
try {
|
|
20191
|
+
return lstatSync(path);
|
|
20192
|
+
} catch (error) {
|
|
20193
|
+
if (error.code === "ENOENT")
|
|
20194
|
+
return null;
|
|
20195
|
+
throw error;
|
|
20196
|
+
}
|
|
20197
|
+
}
|
|
20198
|
+
function realpath(path) {
|
|
20199
|
+
return realpathSync2(path);
|
|
20200
|
+
}
|
|
20201
|
+
function mkdirExclusive(path, mode = 448) {
|
|
20202
|
+
try {
|
|
20203
|
+
mkdirSync2(path, { mode });
|
|
20204
|
+
return true;
|
|
20205
|
+
} catch (error) {
|
|
20206
|
+
if (error.code === "EEXIST")
|
|
20207
|
+
return false;
|
|
20208
|
+
throw error;
|
|
20209
|
+
}
|
|
20210
|
+
}
|
|
20211
|
+
function rmdir(path) {
|
|
20212
|
+
try {
|
|
20213
|
+
rmdirSync(path);
|
|
20214
|
+
return true;
|
|
20215
|
+
} catch (error) {
|
|
20216
|
+
const code = error.code;
|
|
20217
|
+
if (code === "ENOENT" || code === "ENOTEMPTY" || code === "EEXIST")
|
|
20218
|
+
return false;
|
|
20219
|
+
throw error;
|
|
20220
|
+
}
|
|
20221
|
+
}
|
|
20222
|
+
function readlink(path) {
|
|
20223
|
+
try {
|
|
20224
|
+
return readlinkSync(path);
|
|
20225
|
+
} catch {
|
|
20226
|
+
return null;
|
|
20227
|
+
}
|
|
20228
|
+
}
|
|
20229
|
+
function unlink(path) {
|
|
20230
|
+
try {
|
|
20231
|
+
unlinkSync(path);
|
|
20232
|
+
return true;
|
|
20233
|
+
} catch (error) {
|
|
20234
|
+
if (error.code === "ENOENT")
|
|
20235
|
+
return false;
|
|
20236
|
+
throw error;
|
|
20237
|
+
}
|
|
20238
|
+
}
|
|
20239
|
+
function rename(from, to) {
|
|
20240
|
+
try {
|
|
20241
|
+
renameSync2(from, to);
|
|
20242
|
+
return true;
|
|
20243
|
+
} catch (error) {
|
|
20244
|
+
if (error.code === "ENOENT")
|
|
20245
|
+
return false;
|
|
20246
|
+
throw error;
|
|
20247
|
+
}
|
|
20248
|
+
}
|
|
20249
|
+
function chmod(path, mode) {
|
|
20250
|
+
chmodSync(path, mode);
|
|
20251
|
+
}
|
|
20252
|
+
|
|
20253
|
+
// ../../packages/publish-harness/src/index.ts
|
|
20174
20254
|
class FakeTransportCore {
|
|
20175
20255
|
callLogs = [];
|
|
20176
20256
|
nextResult;
|
|
@@ -20455,85 +20535,6 @@ init_dist();
|
|
|
20455
20535
|
import { homedir as homedir4 } from "os";
|
|
20456
20536
|
import { isAbsolute, join as join4, relative, resolve as resolve4, sep } from "path";
|
|
20457
20537
|
|
|
20458
|
-
// ../../packages/publish-harness/src/bot-fs.ts
|
|
20459
|
-
import {
|
|
20460
|
-
chmodSync,
|
|
20461
|
-
closeSync,
|
|
20462
|
-
copyFileSync,
|
|
20463
|
-
lstatSync,
|
|
20464
|
-
mkdirSync as mkdirSync2,
|
|
20465
|
-
openSync,
|
|
20466
|
-
readdirSync as readdirSync2,
|
|
20467
|
-
readlinkSync,
|
|
20468
|
-
realpathSync as realpathSync2,
|
|
20469
|
-
renameSync as renameSync2,
|
|
20470
|
-
rmdirSync,
|
|
20471
|
-
unlinkSync
|
|
20472
|
-
} from "fs";
|
|
20473
|
-
function lstat(path) {
|
|
20474
|
-
try {
|
|
20475
|
-
return lstatSync(path);
|
|
20476
|
-
} catch (error) {
|
|
20477
|
-
if (error.code === "ENOENT")
|
|
20478
|
-
return null;
|
|
20479
|
-
throw error;
|
|
20480
|
-
}
|
|
20481
|
-
}
|
|
20482
|
-
function realpath(path) {
|
|
20483
|
-
return realpathSync2(path);
|
|
20484
|
-
}
|
|
20485
|
-
function mkdirExclusive(path, mode = 448) {
|
|
20486
|
-
try {
|
|
20487
|
-
mkdirSync2(path, { mode });
|
|
20488
|
-
return true;
|
|
20489
|
-
} catch (error) {
|
|
20490
|
-
if (error.code === "EEXIST")
|
|
20491
|
-
return false;
|
|
20492
|
-
throw error;
|
|
20493
|
-
}
|
|
20494
|
-
}
|
|
20495
|
-
function rmdir(path) {
|
|
20496
|
-
try {
|
|
20497
|
-
rmdirSync(path);
|
|
20498
|
-
return true;
|
|
20499
|
-
} catch (error) {
|
|
20500
|
-
const code = error.code;
|
|
20501
|
-
if (code === "ENOENT" || code === "ENOTEMPTY" || code === "EEXIST")
|
|
20502
|
-
return false;
|
|
20503
|
-
throw error;
|
|
20504
|
-
}
|
|
20505
|
-
}
|
|
20506
|
-
function readlink(path) {
|
|
20507
|
-
try {
|
|
20508
|
-
return readlinkSync(path);
|
|
20509
|
-
} catch {
|
|
20510
|
-
return null;
|
|
20511
|
-
}
|
|
20512
|
-
}
|
|
20513
|
-
function unlink(path) {
|
|
20514
|
-
try {
|
|
20515
|
-
unlinkSync(path);
|
|
20516
|
-
return true;
|
|
20517
|
-
} catch (error) {
|
|
20518
|
-
if (error.code === "ENOENT")
|
|
20519
|
-
return false;
|
|
20520
|
-
throw error;
|
|
20521
|
-
}
|
|
20522
|
-
}
|
|
20523
|
-
function rename(from, to) {
|
|
20524
|
-
try {
|
|
20525
|
-
renameSync2(from, to);
|
|
20526
|
-
return true;
|
|
20527
|
-
} catch (error) {
|
|
20528
|
-
if (error.code === "ENOENT")
|
|
20529
|
-
return false;
|
|
20530
|
-
throw error;
|
|
20531
|
-
}
|
|
20532
|
-
}
|
|
20533
|
-
function chmod(path, mode) {
|
|
20534
|
-
chmodSync(path, mode);
|
|
20535
|
-
}
|
|
20536
|
-
|
|
20537
20538
|
// ../../packages/publish-harness/src/bot-transaction.ts
|
|
20538
20539
|
import { homedir as homedir2 } from "os";
|
|
20539
20540
|
import { dirname as dirname2, join as join2, resolve as resolve2 } from "path";
|
|
@@ -20833,7 +20834,7 @@ function quarantineProfileSyncData(profileDir) {
|
|
|
20833
20834
|
const syncData = join5(profileDir, "Default", "Sync Data");
|
|
20834
20835
|
if (lstat(syncData) === null)
|
|
20835
20836
|
return false;
|
|
20836
|
-
return rename(syncData, `${syncData}.broken-${new Date().toISOString().replace(/[:.]/g, "").slice(0,
|
|
20837
|
+
return rename(syncData, `${syncData}.broken-${new Date().toISOString().replace(/[:.]/g, "").slice(0, 17)}`);
|
|
20837
20838
|
}
|
|
20838
20839
|
function createKkBrowserLauncher(loadPlaywright = () => import("playwright"), ownership, leaseOptions = {}) {
|
|
20839
20840
|
return {
|