sequoia-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/dist/index.js +744 -649
- package/package.json +4 -1
package/dist/index.js
CHANGED
|
@@ -3673,141 +3673,13 @@ var require_cjs = __commonJS((exports) => {
|
|
|
3673
3673
|
} });
|
|
3674
3674
|
});
|
|
3675
3675
|
|
|
3676
|
-
// ../../node_modules/.bun/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
3677
|
-
var require_picocolors = __commonJS((exports, module) => {
|
|
3678
|
-
var p = process || {};
|
|
3679
|
-
var argv = p.argv || [];
|
|
3680
|
-
var env2 = p.env || {};
|
|
3681
|
-
var isColorSupported = !(!!env2.NO_COLOR || argv.includes("--no-color")) && (!!env2.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env2.TERM !== "dumb" || !!env2.CI);
|
|
3682
|
-
var formatter = (open, close, replace = open) => (input) => {
|
|
3683
|
-
let string = "" + input, index = string.indexOf(close, open.length);
|
|
3684
|
-
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
3685
|
-
};
|
|
3686
|
-
var replaceClose = (string, close, replace, index) => {
|
|
3687
|
-
let result = "", cursor = 0;
|
|
3688
|
-
do {
|
|
3689
|
-
result += string.substring(cursor, index) + replace;
|
|
3690
|
-
cursor = index + close.length;
|
|
3691
|
-
index = string.indexOf(close, cursor);
|
|
3692
|
-
} while (~index);
|
|
3693
|
-
return result + string.substring(cursor);
|
|
3694
|
-
};
|
|
3695
|
-
var createColors = (enabled = isColorSupported) => {
|
|
3696
|
-
let f = enabled ? formatter : () => String;
|
|
3697
|
-
return {
|
|
3698
|
-
isColorSupported: enabled,
|
|
3699
|
-
reset: f("\x1B[0m", "\x1B[0m"),
|
|
3700
|
-
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
3701
|
-
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
3702
|
-
italic: f("\x1B[3m", "\x1B[23m"),
|
|
3703
|
-
underline: f("\x1B[4m", "\x1B[24m"),
|
|
3704
|
-
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
3705
|
-
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
3706
|
-
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
3707
|
-
black: f("\x1B[30m", "\x1B[39m"),
|
|
3708
|
-
red: f("\x1B[31m", "\x1B[39m"),
|
|
3709
|
-
green: f("\x1B[32m", "\x1B[39m"),
|
|
3710
|
-
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
3711
|
-
blue: f("\x1B[34m", "\x1B[39m"),
|
|
3712
|
-
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
3713
|
-
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
3714
|
-
white: f("\x1B[37m", "\x1B[39m"),
|
|
3715
|
-
gray: f("\x1B[90m", "\x1B[39m"),
|
|
3716
|
-
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
3717
|
-
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
3718
|
-
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
3719
|
-
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
3720
|
-
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
3721
|
-
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
3722
|
-
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
3723
|
-
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
3724
|
-
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
3725
|
-
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
3726
|
-
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
3727
|
-
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
3728
|
-
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
3729
|
-
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
3730
|
-
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
3731
|
-
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
3732
|
-
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
3733
|
-
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
3734
|
-
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
3735
|
-
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
3736
|
-
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
3737
|
-
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
3738
|
-
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
3739
|
-
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
3740
|
-
};
|
|
3741
|
-
};
|
|
3742
|
-
module.exports = createColors();
|
|
3743
|
-
module.exports.createColors = createColors;
|
|
3744
|
-
});
|
|
3745
|
-
|
|
3746
|
-
// ../../node_modules/.bun/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
|
|
3747
|
-
var require_src2 = __commonJS((exports, module) => {
|
|
3748
|
-
var ESC = "\x1B";
|
|
3749
|
-
var CSI = `${ESC}[`;
|
|
3750
|
-
var beep = "\x07";
|
|
3751
|
-
var cursor = {
|
|
3752
|
-
to(x, y) {
|
|
3753
|
-
if (!y)
|
|
3754
|
-
return `${CSI}${x + 1}G`;
|
|
3755
|
-
return `${CSI}${y + 1};${x + 1}H`;
|
|
3756
|
-
},
|
|
3757
|
-
move(x, y) {
|
|
3758
|
-
let ret = "";
|
|
3759
|
-
if (x < 0)
|
|
3760
|
-
ret += `${CSI}${-x}D`;
|
|
3761
|
-
else if (x > 0)
|
|
3762
|
-
ret += `${CSI}${x}C`;
|
|
3763
|
-
if (y < 0)
|
|
3764
|
-
ret += `${CSI}${-y}A`;
|
|
3765
|
-
else if (y > 0)
|
|
3766
|
-
ret += `${CSI}${y}B`;
|
|
3767
|
-
return ret;
|
|
3768
|
-
},
|
|
3769
|
-
up: (count = 1) => `${CSI}${count}A`,
|
|
3770
|
-
down: (count = 1) => `${CSI}${count}B`,
|
|
3771
|
-
forward: (count = 1) => `${CSI}${count}C`,
|
|
3772
|
-
backward: (count = 1) => `${CSI}${count}D`,
|
|
3773
|
-
nextLine: (count = 1) => `${CSI}E`.repeat(count),
|
|
3774
|
-
prevLine: (count = 1) => `${CSI}F`.repeat(count),
|
|
3775
|
-
left: `${CSI}G`,
|
|
3776
|
-
hide: `${CSI}?25l`,
|
|
3777
|
-
show: `${CSI}?25h`,
|
|
3778
|
-
save: `${ESC}7`,
|
|
3779
|
-
restore: `${ESC}8`
|
|
3780
|
-
};
|
|
3781
|
-
var scroll = {
|
|
3782
|
-
up: (count = 1) => `${CSI}S`.repeat(count),
|
|
3783
|
-
down: (count = 1) => `${CSI}T`.repeat(count)
|
|
3784
|
-
};
|
|
3785
|
-
var erase = {
|
|
3786
|
-
screen: `${CSI}2J`,
|
|
3787
|
-
up: (count = 1) => `${CSI}1J`.repeat(count),
|
|
3788
|
-
down: (count = 1) => `${CSI}J`.repeat(count),
|
|
3789
|
-
line: `${CSI}2K`,
|
|
3790
|
-
lineEnd: `${CSI}K`,
|
|
3791
|
-
lineStart: `${CSI}1K`,
|
|
3792
|
-
lines(count) {
|
|
3793
|
-
let clear = "";
|
|
3794
|
-
for (let i = 0;i < count; i++)
|
|
3795
|
-
clear += this.line + (i < count - 1 ? cursor.up() : "");
|
|
3796
|
-
if (count)
|
|
3797
|
-
clear += cursor.left;
|
|
3798
|
-
return clear;
|
|
3799
|
-
}
|
|
3800
|
-
};
|
|
3801
|
-
module.exports = { cursor, scroll, erase, beep };
|
|
3802
|
-
});
|
|
3803
|
-
|
|
3804
3676
|
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/util.cjs
|
|
3805
3677
|
var require_util = __commonJS((exports) => {
|
|
3806
3678
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3807
3679
|
exports.getParsedType = exports.ZodParsedType = exports.objectUtil = exports.util = undefined;
|
|
3808
3680
|
var util;
|
|
3809
3681
|
(function(util2) {
|
|
3810
|
-
util2.assertEqual = (
|
|
3682
|
+
util2.assertEqual = (_) => {};
|
|
3811
3683
|
function assertIs(_arg) {}
|
|
3812
3684
|
util2.assertIs = assertIs;
|
|
3813
3685
|
function assertNever(_x) {
|
|
@@ -3822,10 +3694,10 @@ var require_util = __commonJS((exports) => {
|
|
|
3822
3694
|
return obj;
|
|
3823
3695
|
};
|
|
3824
3696
|
util2.getValidEnumValues = (obj) => {
|
|
3825
|
-
const validKeys = util2.objectKeys(obj).filter((
|
|
3697
|
+
const validKeys = util2.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== "number");
|
|
3826
3698
|
const filtered = {};
|
|
3827
|
-
for (const
|
|
3828
|
-
filtered[
|
|
3699
|
+
for (const k of validKeys) {
|
|
3700
|
+
filtered[k] = obj[k];
|
|
3829
3701
|
}
|
|
3830
3702
|
return util2.objectValues(filtered);
|
|
3831
3703
|
};
|
|
@@ -3855,7 +3727,7 @@ var require_util = __commonJS((exports) => {
|
|
|
3855
3727
|
return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
|
|
3856
3728
|
}
|
|
3857
3729
|
util2.joinValues = joinValues;
|
|
3858
|
-
util2.jsonStringifyReplacer = (
|
|
3730
|
+
util2.jsonStringifyReplacer = (_, value) => {
|
|
3859
3731
|
if (typeof value === "bigint") {
|
|
3860
3732
|
return value.toString();
|
|
3861
3733
|
}
|
|
@@ -3894,8 +3766,8 @@ var require_util = __commonJS((exports) => {
|
|
|
3894
3766
|
"set"
|
|
3895
3767
|
]);
|
|
3896
3768
|
var getParsedType = (data) => {
|
|
3897
|
-
const
|
|
3898
|
-
switch (
|
|
3769
|
+
const t = typeof data;
|
|
3770
|
+
switch (t) {
|
|
3899
3771
|
case "undefined":
|
|
3900
3772
|
return exports.ZodParsedType.undefined;
|
|
3901
3773
|
case "string":
|
|
@@ -4239,7 +4111,7 @@ var require_parseUtil = __commonJS((exports) => {
|
|
|
4239
4111
|
ctx.schemaErrorMap,
|
|
4240
4112
|
overrideMap,
|
|
4241
4113
|
overrideMap === en_js_1.default ? undefined : en_js_1.default
|
|
4242
|
-
].filter((
|
|
4114
|
+
].filter((x) => !!x)
|
|
4243
4115
|
});
|
|
4244
4116
|
ctx.common.issues.push(issue);
|
|
4245
4117
|
}
|
|
@@ -4306,13 +4178,13 @@ var require_parseUtil = __commonJS((exports) => {
|
|
|
4306
4178
|
exports.DIRTY = DIRTY;
|
|
4307
4179
|
var OK = (value) => ({ status: "valid", value });
|
|
4308
4180
|
exports.OK = OK;
|
|
4309
|
-
var isAborted = (
|
|
4181
|
+
var isAborted = (x) => x.status === "aborted";
|
|
4310
4182
|
exports.isAborted = isAborted;
|
|
4311
|
-
var isDirty = (
|
|
4183
|
+
var isDirty = (x) => x.status === "dirty";
|
|
4312
4184
|
exports.isDirty = isDirty;
|
|
4313
|
-
var isValid = (
|
|
4185
|
+
var isValid = (x) => x.status === "valid";
|
|
4314
4186
|
exports.isValid = isValid;
|
|
4315
|
-
var isAsync = (
|
|
4187
|
+
var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
|
|
4316
4188
|
exports.isAsync = isAsync;
|
|
4317
4189
|
});
|
|
4318
4190
|
|
|
@@ -6726,7 +6598,7 @@ var require_types2 = __commonJS((exports) => {
|
|
|
6726
6598
|
if (!schema)
|
|
6727
6599
|
return null;
|
|
6728
6600
|
return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));
|
|
6729
|
-
}).filter((
|
|
6601
|
+
}).filter((x) => !!x);
|
|
6730
6602
|
if (ctx.common.async) {
|
|
6731
6603
|
return Promise.all(items).then((results) => {
|
|
6732
6604
|
return parseUtil_js_1.ParseStatus.mergeArray(status, results);
|
|
@@ -6987,7 +6859,7 @@ var require_types2 = __commonJS((exports) => {
|
|
|
6987
6859
|
return (0, parseUtil_js_1.makeIssue)({
|
|
6988
6860
|
data: args,
|
|
6989
6861
|
path: ctx.path,
|
|
6990
|
-
errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, (0, errors_js_1.getErrorMap)(), errors_js_1.defaultErrorMap].filter((
|
|
6862
|
+
errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, (0, errors_js_1.getErrorMap)(), errors_js_1.defaultErrorMap].filter((x) => !!x),
|
|
6991
6863
|
issueData: {
|
|
6992
6864
|
code: ZodError_js_1.ZodIssueCode.invalid_arguments,
|
|
6993
6865
|
argumentsError: error
|
|
@@ -6998,7 +6870,7 @@ var require_types2 = __commonJS((exports) => {
|
|
|
6998
6870
|
return (0, parseUtil_js_1.makeIssue)({
|
|
6999
6871
|
data: returns,
|
|
7000
6872
|
path: ctx.path,
|
|
7001
|
-
errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, (0, errors_js_1.getErrorMap)(), errors_js_1.defaultErrorMap].filter((
|
|
6873
|
+
errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, (0, errors_js_1.getErrorMap)(), errors_js_1.defaultErrorMap].filter((x) => !!x),
|
|
7002
6874
|
issueData: {
|
|
7003
6875
|
code: ZodError_js_1.ZodIssueCode.invalid_return_type,
|
|
7004
6876
|
returnTypeError: error
|
|
@@ -7008,29 +6880,29 @@ var require_types2 = __commonJS((exports) => {
|
|
|
7008
6880
|
const params = { errorMap: ctx.common.contextualErrorMap };
|
|
7009
6881
|
const fn = ctx.data;
|
|
7010
6882
|
if (this._def.returns instanceof ZodPromise) {
|
|
7011
|
-
const
|
|
6883
|
+
const me = this;
|
|
7012
6884
|
return (0, parseUtil_js_1.OK)(async function(...args) {
|
|
7013
6885
|
const error = new ZodError_js_1.ZodError([]);
|
|
7014
|
-
const parsedArgs = await
|
|
6886
|
+
const parsedArgs = await me._def.args.parseAsync(args, params).catch((e) => {
|
|
7015
6887
|
error.addIssue(makeArgsIssue(args, e));
|
|
7016
6888
|
throw error;
|
|
7017
6889
|
});
|
|
7018
6890
|
const result = await Reflect.apply(fn, this, parsedArgs);
|
|
7019
|
-
const parsedReturns = await
|
|
6891
|
+
const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => {
|
|
7020
6892
|
error.addIssue(makeReturnsIssue(result, e));
|
|
7021
6893
|
throw error;
|
|
7022
6894
|
});
|
|
7023
6895
|
return parsedReturns;
|
|
7024
6896
|
});
|
|
7025
6897
|
} else {
|
|
7026
|
-
const
|
|
6898
|
+
const me = this;
|
|
7027
6899
|
return (0, parseUtil_js_1.OK)(function(...args) {
|
|
7028
|
-
const parsedArgs =
|
|
6900
|
+
const parsedArgs = me._def.args.safeParse(args, params);
|
|
7029
6901
|
if (!parsedArgs.success) {
|
|
7030
6902
|
throw new ZodError_js_1.ZodError([makeArgsIssue(args, parsedArgs.error)]);
|
|
7031
6903
|
}
|
|
7032
6904
|
const result = Reflect.apply(fn, this, parsedArgs.data);
|
|
7033
|
-
const parsedReturns =
|
|
6905
|
+
const parsedReturns = me._def.returns.safeParse(result, params);
|
|
7034
6906
|
if (!parsedReturns.success) {
|
|
7035
6907
|
throw new ZodError_js_1.ZodError([makeReturnsIssue(result, parsedReturns.error)]);
|
|
7036
6908
|
}
|
|
@@ -7815,20 +7687,20 @@ var require_types2 = __commonJS((exports) => {
|
|
|
7815
7687
|
|
|
7816
7688
|
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/external.cjs
|
|
7817
7689
|
var require_external = __commonJS((exports) => {
|
|
7818
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m,
|
|
7819
|
-
if (
|
|
7820
|
-
|
|
7821
|
-
var desc = Object.getOwnPropertyDescriptor(m,
|
|
7690
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
7691
|
+
if (k2 === undefined)
|
|
7692
|
+
k2 = k;
|
|
7693
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7822
7694
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7823
7695
|
desc = { enumerable: true, get: function() {
|
|
7824
|
-
return m[
|
|
7696
|
+
return m[k];
|
|
7825
7697
|
} };
|
|
7826
7698
|
}
|
|
7827
|
-
Object.defineProperty(o,
|
|
7828
|
-
} : function(o, m,
|
|
7829
|
-
if (
|
|
7830
|
-
|
|
7831
|
-
o[
|
|
7699
|
+
Object.defineProperty(o, k2, desc);
|
|
7700
|
+
} : function(o, m, k, k2) {
|
|
7701
|
+
if (k2 === undefined)
|
|
7702
|
+
k2 = k;
|
|
7703
|
+
o[k2] = m[k];
|
|
7832
7704
|
});
|
|
7833
7705
|
var __exportStar = exports && exports.__exportStar || function(m, exports2) {
|
|
7834
7706
|
for (var p in m)
|
|
@@ -7846,20 +7718,20 @@ var require_external = __commonJS((exports) => {
|
|
|
7846
7718
|
|
|
7847
7719
|
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/index.cjs
|
|
7848
7720
|
var require_zod = __commonJS((exports) => {
|
|
7849
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m,
|
|
7850
|
-
if (
|
|
7851
|
-
|
|
7852
|
-
var desc = Object.getOwnPropertyDescriptor(m,
|
|
7721
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
7722
|
+
if (k2 === undefined)
|
|
7723
|
+
k2 = k;
|
|
7724
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7853
7725
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7854
7726
|
desc = { enumerable: true, get: function() {
|
|
7855
|
-
return m[
|
|
7727
|
+
return m[k];
|
|
7856
7728
|
} };
|
|
7857
7729
|
}
|
|
7858
|
-
Object.defineProperty(o,
|
|
7859
|
-
} : function(o, m,
|
|
7860
|
-
if (
|
|
7861
|
-
|
|
7862
|
-
o[
|
|
7730
|
+
Object.defineProperty(o, k2, desc);
|
|
7731
|
+
} : function(o, m, k, k2) {
|
|
7732
|
+
if (k2 === undefined)
|
|
7733
|
+
k2 = k;
|
|
7734
|
+
o[k2] = m[k];
|
|
7863
7735
|
});
|
|
7864
7736
|
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
|
|
7865
7737
|
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
@@ -7871,9 +7743,9 @@ var require_zod = __commonJS((exports) => {
|
|
|
7871
7743
|
return mod;
|
|
7872
7744
|
var result = {};
|
|
7873
7745
|
if (mod != null) {
|
|
7874
|
-
for (var
|
|
7875
|
-
if (
|
|
7876
|
-
__createBinding(result, mod,
|
|
7746
|
+
for (var k in mod)
|
|
7747
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
7748
|
+
__createBinding(result, mod, k);
|
|
7877
7749
|
}
|
|
7878
7750
|
__setModuleDefault(result, mod);
|
|
7879
7751
|
return result;
|
|
@@ -7885,10 +7757,10 @@ var require_zod = __commonJS((exports) => {
|
|
|
7885
7757
|
};
|
|
7886
7758
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7887
7759
|
exports.z = undefined;
|
|
7888
|
-
var
|
|
7889
|
-
exports.z =
|
|
7760
|
+
var z = __importStar(require_external());
|
|
7761
|
+
exports.z = z;
|
|
7890
7762
|
__exportStar(require_external(), exports);
|
|
7891
|
-
exports.default =
|
|
7763
|
+
exports.default = z;
|
|
7892
7764
|
});
|
|
7893
7765
|
|
|
7894
7766
|
// ../../node_modules/.bun/@atproto+common-web@0.4.13/node_modules/@atproto/common-web/dist/check.js
|
|
@@ -7918,9 +7790,9 @@ var require_util2 = __commonJS((exports) => {
|
|
|
7918
7790
|
exports.aggregateErrors = aggregateErrors;
|
|
7919
7791
|
exports.omit = omit;
|
|
7920
7792
|
var noUndefinedVals = (obj) => {
|
|
7921
|
-
for (const
|
|
7922
|
-
if (obj[
|
|
7923
|
-
delete obj[
|
|
7793
|
+
for (const k of Object.keys(obj)) {
|
|
7794
|
+
if (obj[k] === undefined) {
|
|
7795
|
+
delete obj[k];
|
|
7924
7796
|
}
|
|
7925
7797
|
}
|
|
7926
7798
|
return obj;
|
|
@@ -8014,8 +7886,8 @@ var require_util2 = __commonJS((exports) => {
|
|
|
8014
7886
|
};
|
|
8015
7887
|
exports.s32decode = s32decode;
|
|
8016
7888
|
var asyncFilter = async (arr, fn) => {
|
|
8017
|
-
const results = await Promise.all(arr.map((
|
|
8018
|
-
return arr.filter((
|
|
7889
|
+
const results = await Promise.all(arr.map((t) => fn(t)));
|
|
7890
|
+
return arr.filter((_, i) => results[i]);
|
|
8019
7891
|
};
|
|
8020
7892
|
exports.asyncFilter = asyncFilter;
|
|
8021
7893
|
var isErrnoException = (err) => {
|
|
@@ -8444,26 +8316,26 @@ var require_tslib = __commonJS((exports, module) => {
|
|
|
8444
8316
|
}
|
|
8445
8317
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __);
|
|
8446
8318
|
};
|
|
8447
|
-
__assign = Object.assign || function(
|
|
8319
|
+
__assign = Object.assign || function(t) {
|
|
8448
8320
|
for (var s, i = 1, n = arguments.length;i < n; i++) {
|
|
8449
8321
|
s = arguments[i];
|
|
8450
8322
|
for (var p in s)
|
|
8451
8323
|
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
8452
|
-
|
|
8324
|
+
t[p] = s[p];
|
|
8453
8325
|
}
|
|
8454
|
-
return
|
|
8326
|
+
return t;
|
|
8455
8327
|
};
|
|
8456
8328
|
__rest = function(s, e) {
|
|
8457
|
-
var
|
|
8329
|
+
var t = {};
|
|
8458
8330
|
for (var p in s)
|
|
8459
8331
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
8460
|
-
|
|
8332
|
+
t[p] = s[p];
|
|
8461
8333
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
8462
8334
|
for (var i = 0, p = Object.getOwnPropertySymbols(s);i < p.length; i++) {
|
|
8463
8335
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8464
|
-
|
|
8336
|
+
t[p[i]] = s[p[i]];
|
|
8465
8337
|
}
|
|
8466
|
-
return
|
|
8338
|
+
return t;
|
|
8467
8339
|
};
|
|
8468
8340
|
__decorate = function(decorators, target, key, desc) {
|
|
8469
8341
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -8489,7 +8361,7 @@ var require_tslib = __commonJS((exports, module) => {
|
|
|
8489
8361
|
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
8490
8362
|
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
8491
8363
|
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
8492
|
-
var
|
|
8364
|
+
var _, done = false;
|
|
8493
8365
|
for (var i = decorators.length - 1;i >= 0; i--) {
|
|
8494
8366
|
var context = {};
|
|
8495
8367
|
for (var p in contextIn)
|
|
@@ -8507,17 +8379,17 @@ var require_tslib = __commonJS((exports, module) => {
|
|
|
8507
8379
|
continue;
|
|
8508
8380
|
if (result === null || typeof result !== "object")
|
|
8509
8381
|
throw new TypeError("Object expected");
|
|
8510
|
-
if (
|
|
8511
|
-
descriptor.get =
|
|
8512
|
-
if (
|
|
8513
|
-
descriptor.set =
|
|
8514
|
-
if (
|
|
8515
|
-
initializers.unshift(
|
|
8516
|
-
} else if (
|
|
8382
|
+
if (_ = accept(result.get))
|
|
8383
|
+
descriptor.get = _;
|
|
8384
|
+
if (_ = accept(result.set))
|
|
8385
|
+
descriptor.set = _;
|
|
8386
|
+
if (_ = accept(result.init))
|
|
8387
|
+
initializers.unshift(_);
|
|
8388
|
+
} else if (_ = accept(result)) {
|
|
8517
8389
|
if (kind === "field")
|
|
8518
|
-
initializers.unshift(
|
|
8390
|
+
initializers.unshift(_);
|
|
8519
8391
|
else
|
|
8520
|
-
descriptor[key] =
|
|
8392
|
+
descriptor[key] = _;
|
|
8521
8393
|
}
|
|
8522
8394
|
}
|
|
8523
8395
|
if (target)
|
|
@@ -8531,8 +8403,8 @@ var require_tslib = __commonJS((exports, module) => {
|
|
|
8531
8403
|
}
|
|
8532
8404
|
return useValue ? value : undefined;
|
|
8533
8405
|
};
|
|
8534
|
-
__propKey = function(
|
|
8535
|
-
return typeof
|
|
8406
|
+
__propKey = function(x) {
|
|
8407
|
+
return typeof x === "symbol" ? x : "".concat(x);
|
|
8536
8408
|
};
|
|
8537
8409
|
__setFunctionName = function(f, name, prefix) {
|
|
8538
8410
|
if (typeof name === "symbol")
|
|
@@ -8543,13 +8415,13 @@ var require_tslib = __commonJS((exports, module) => {
|
|
|
8543
8415
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
8544
8416
|
return Reflect.metadata(metadataKey, metadataValue);
|
|
8545
8417
|
};
|
|
8546
|
-
__awaiter = function(thisArg, _arguments,
|
|
8418
|
+
__awaiter = function(thisArg, _arguments, P, generator) {
|
|
8547
8419
|
function adopt(value) {
|
|
8548
|
-
return value instanceof
|
|
8420
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
8549
8421
|
resolve(value);
|
|
8550
8422
|
});
|
|
8551
8423
|
}
|
|
8552
|
-
return new (
|
|
8424
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
8553
8425
|
function fulfilled(value) {
|
|
8554
8426
|
try {
|
|
8555
8427
|
step(generator.next(value));
|
|
@@ -8571,11 +8443,11 @@ var require_tslib = __commonJS((exports, module) => {
|
|
|
8571
8443
|
});
|
|
8572
8444
|
};
|
|
8573
8445
|
__generator = function(thisArg, body) {
|
|
8574
|
-
var
|
|
8575
|
-
if (
|
|
8576
|
-
throw
|
|
8577
|
-
return
|
|
8578
|
-
}, trys: [], ops: [] }, f,
|
|
8446
|
+
var _ = { label: 0, sent: function() {
|
|
8447
|
+
if (t[0] & 1)
|
|
8448
|
+
throw t[1];
|
|
8449
|
+
return t[1];
|
|
8450
|
+
}, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
8579
8451
|
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
8580
8452
|
return this;
|
|
8581
8453
|
}), g;
|
|
@@ -8587,59 +8459,59 @@ var require_tslib = __commonJS((exports, module) => {
|
|
|
8587
8459
|
function step(op) {
|
|
8588
8460
|
if (f)
|
|
8589
8461
|
throw new TypeError("Generator is already executing.");
|
|
8590
|
-
while (g && (g = 0, op[0] && (
|
|
8462
|
+
while (g && (g = 0, op[0] && (_ = 0)), _)
|
|
8591
8463
|
try {
|
|
8592
|
-
if (f = 1,
|
|
8593
|
-
return
|
|
8594
|
-
if (
|
|
8595
|
-
op = [op[0] & 2,
|
|
8464
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
8465
|
+
return t;
|
|
8466
|
+
if (y = 0, t)
|
|
8467
|
+
op = [op[0] & 2, t.value];
|
|
8596
8468
|
switch (op[0]) {
|
|
8597
8469
|
case 0:
|
|
8598
8470
|
case 1:
|
|
8599
|
-
|
|
8471
|
+
t = op;
|
|
8600
8472
|
break;
|
|
8601
8473
|
case 4:
|
|
8602
|
-
|
|
8474
|
+
_.label++;
|
|
8603
8475
|
return { value: op[1], done: false };
|
|
8604
8476
|
case 5:
|
|
8605
|
-
|
|
8606
|
-
|
|
8477
|
+
_.label++;
|
|
8478
|
+
y = op[1];
|
|
8607
8479
|
op = [0];
|
|
8608
8480
|
continue;
|
|
8609
8481
|
case 7:
|
|
8610
|
-
op =
|
|
8611
|
-
|
|
8482
|
+
op = _.ops.pop();
|
|
8483
|
+
_.trys.pop();
|
|
8612
8484
|
continue;
|
|
8613
8485
|
default:
|
|
8614
|
-
if (!(
|
|
8615
|
-
|
|
8486
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
8487
|
+
_ = 0;
|
|
8616
8488
|
continue;
|
|
8617
8489
|
}
|
|
8618
|
-
if (op[0] === 3 && (!
|
|
8619
|
-
|
|
8490
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
8491
|
+
_.label = op[1];
|
|
8620
8492
|
break;
|
|
8621
8493
|
}
|
|
8622
|
-
if (op[0] === 6 &&
|
|
8623
|
-
|
|
8624
|
-
|
|
8494
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
8495
|
+
_.label = t[1];
|
|
8496
|
+
t = op;
|
|
8625
8497
|
break;
|
|
8626
8498
|
}
|
|
8627
|
-
if (
|
|
8628
|
-
|
|
8629
|
-
|
|
8499
|
+
if (t && _.label < t[2]) {
|
|
8500
|
+
_.label = t[2];
|
|
8501
|
+
_.ops.push(op);
|
|
8630
8502
|
break;
|
|
8631
8503
|
}
|
|
8632
|
-
if (
|
|
8633
|
-
|
|
8634
|
-
|
|
8504
|
+
if (t[2])
|
|
8505
|
+
_.ops.pop();
|
|
8506
|
+
_.trys.pop();
|
|
8635
8507
|
continue;
|
|
8636
8508
|
}
|
|
8637
|
-
op = body.call(thisArg,
|
|
8509
|
+
op = body.call(thisArg, _);
|
|
8638
8510
|
} catch (e) {
|
|
8639
8511
|
op = [6, e];
|
|
8640
|
-
|
|
8512
|
+
y = 0;
|
|
8641
8513
|
} finally {
|
|
8642
|
-
f =
|
|
8514
|
+
f = t = 0;
|
|
8643
8515
|
}
|
|
8644
8516
|
if (op[0] & 5)
|
|
8645
8517
|
throw op[1];
|
|
@@ -8651,20 +8523,20 @@ var require_tslib = __commonJS((exports, module) => {
|
|
|
8651
8523
|
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
8652
8524
|
__createBinding(o, m, p);
|
|
8653
8525
|
};
|
|
8654
|
-
__createBinding = Object.create ? function(o, m,
|
|
8655
|
-
if (
|
|
8656
|
-
|
|
8657
|
-
var desc = Object.getOwnPropertyDescriptor(m,
|
|
8526
|
+
__createBinding = Object.create ? function(o, m, k, k2) {
|
|
8527
|
+
if (k2 === undefined)
|
|
8528
|
+
k2 = k;
|
|
8529
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8658
8530
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8659
8531
|
desc = { enumerable: true, get: function() {
|
|
8660
|
-
return m[
|
|
8532
|
+
return m[k];
|
|
8661
8533
|
} };
|
|
8662
8534
|
}
|
|
8663
|
-
Object.defineProperty(o,
|
|
8664
|
-
} : function(o, m,
|
|
8665
|
-
if (
|
|
8666
|
-
|
|
8667
|
-
o[
|
|
8535
|
+
Object.defineProperty(o, k2, desc);
|
|
8536
|
+
} : function(o, m, k, k2) {
|
|
8537
|
+
if (k2 === undefined)
|
|
8538
|
+
k2 = k;
|
|
8539
|
+
o[k2] = m[k];
|
|
8668
8540
|
};
|
|
8669
8541
|
__values = function(o) {
|
|
8670
8542
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
@@ -8709,9 +8581,9 @@ var require_tslib = __commonJS((exports, module) => {
|
|
|
8709
8581
|
__spreadArrays = function() {
|
|
8710
8582
|
for (var s = 0, i = 0, il = arguments.length;i < il; i++)
|
|
8711
8583
|
s += arguments[i].length;
|
|
8712
|
-
for (var r = Array(s),
|
|
8713
|
-
for (var a = arguments[i],
|
|
8714
|
-
r[
|
|
8584
|
+
for (var r = Array(s), k = 0, i = 0;i < il; i++)
|
|
8585
|
+
for (var a = arguments[i], j = 0, jl = a.length;j < jl; j++, k++)
|
|
8586
|
+
r[k] = a[j];
|
|
8715
8587
|
return r;
|
|
8716
8588
|
};
|
|
8717
8589
|
__spreadArray = function(to, from, pack) {
|
|
@@ -8731,7 +8603,7 @@ var require_tslib = __commonJS((exports, module) => {
|
|
|
8731
8603
|
__asyncGenerator = function(thisArg, _arguments, generator) {
|
|
8732
8604
|
if (!Symbol.asyncIterator)
|
|
8733
8605
|
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
8734
|
-
var g = generator.apply(thisArg, _arguments || []), i,
|
|
8606
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
8735
8607
|
return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() {
|
|
8736
8608
|
return this;
|
|
8737
8609
|
}, i;
|
|
@@ -8744,7 +8616,7 @@ var require_tslib = __commonJS((exports, module) => {
|
|
|
8744
8616
|
if (g[n]) {
|
|
8745
8617
|
i[n] = function(v) {
|
|
8746
8618
|
return new Promise(function(a, b) {
|
|
8747
|
-
|
|
8619
|
+
q.push([n, v, a, b]) > 1 || resume(n, v);
|
|
8748
8620
|
});
|
|
8749
8621
|
};
|
|
8750
8622
|
if (f)
|
|
@@ -8755,11 +8627,11 @@ var require_tslib = __commonJS((exports, module) => {
|
|
|
8755
8627
|
try {
|
|
8756
8628
|
step(g[n](v));
|
|
8757
8629
|
} catch (e) {
|
|
8758
|
-
settle(
|
|
8630
|
+
settle(q[0][3], e);
|
|
8759
8631
|
}
|
|
8760
8632
|
}
|
|
8761
8633
|
function step(r) {
|
|
8762
|
-
r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(
|
|
8634
|
+
r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
|
|
8763
8635
|
}
|
|
8764
8636
|
function fulfill(value) {
|
|
8765
8637
|
resume("next", value);
|
|
@@ -8768,8 +8640,8 @@ var require_tslib = __commonJS((exports, module) => {
|
|
|
8768
8640
|
resume("throw", value);
|
|
8769
8641
|
}
|
|
8770
8642
|
function settle(f, v) {
|
|
8771
|
-
if (f(v),
|
|
8772
|
-
resume(
|
|
8643
|
+
if (f(v), q.shift(), q.length)
|
|
8644
|
+
resume(q[0][0], q[0][1]);
|
|
8773
8645
|
}
|
|
8774
8646
|
};
|
|
8775
8647
|
__asyncDelegator = function(o) {
|
|
@@ -8821,9 +8693,9 @@ var require_tslib = __commonJS((exports, module) => {
|
|
|
8821
8693
|
var ownKeys = function(o) {
|
|
8822
8694
|
ownKeys = Object.getOwnPropertyNames || function(o2) {
|
|
8823
8695
|
var ar = [];
|
|
8824
|
-
for (var
|
|
8825
|
-
if (Object.prototype.hasOwnProperty.call(o2,
|
|
8826
|
-
ar[ar.length] =
|
|
8696
|
+
for (var k in o2)
|
|
8697
|
+
if (Object.prototype.hasOwnProperty.call(o2, k))
|
|
8698
|
+
ar[ar.length] = k;
|
|
8827
8699
|
return ar;
|
|
8828
8700
|
};
|
|
8829
8701
|
return ownKeys(o);
|
|
@@ -8833,9 +8705,9 @@ var require_tslib = __commonJS((exports, module) => {
|
|
|
8833
8705
|
return mod;
|
|
8834
8706
|
var result = {};
|
|
8835
8707
|
if (mod != null) {
|
|
8836
|
-
for (var
|
|
8837
|
-
if (
|
|
8838
|
-
__createBinding(result, mod,
|
|
8708
|
+
for (var k = ownKeys(mod), i = 0;i < k.length; i++)
|
|
8709
|
+
if (k[i] !== "default")
|
|
8710
|
+
__createBinding(result, mod, k[i]);
|
|
8839
8711
|
}
|
|
8840
8712
|
__setModuleDefault(result, mod);
|
|
8841
8713
|
return result;
|
|
@@ -9016,7 +8888,7 @@ var require_varint = __commonJS((exports, module) => {
|
|
|
9016
8888
|
return res;
|
|
9017
8889
|
}
|
|
9018
8890
|
var N1 = Math.pow(2, 7);
|
|
9019
|
-
var
|
|
8891
|
+
var N2 = Math.pow(2, 14);
|
|
9020
8892
|
var N3 = Math.pow(2, 21);
|
|
9021
8893
|
var N4 = Math.pow(2, 28);
|
|
9022
8894
|
var N5 = Math.pow(2, 35);
|
|
@@ -9025,7 +8897,7 @@ var require_varint = __commonJS((exports, module) => {
|
|
|
9025
8897
|
var N8 = Math.pow(2, 56);
|
|
9026
8898
|
var N9 = Math.pow(2, 63);
|
|
9027
8899
|
var length = function(value) {
|
|
9028
|
-
return value < N1 ? 1 : value <
|
|
8900
|
+
return value < N1 ? 1 : value < N2 ? 2 : value < N3 ? 3 : value < N4 ? 4 : value < N5 ? 5 : value < N6 ? 6 : value < N7 ? 7 : value < N8 ? 8 : value < N9 ? 9 : 10;
|
|
9029
8901
|
};
|
|
9030
8902
|
var varint = {
|
|
9031
8903
|
encode: encode_1,
|
|
@@ -9159,14 +9031,14 @@ var require_base_x = __commonJS((exports, module) => {
|
|
|
9159
9031
|
throw new TypeError("Alphabet too long");
|
|
9160
9032
|
}
|
|
9161
9033
|
var BASE_MAP = new Uint8Array(256);
|
|
9162
|
-
for (var
|
|
9163
|
-
BASE_MAP[
|
|
9034
|
+
for (var j = 0;j < BASE_MAP.length; j++) {
|
|
9035
|
+
BASE_MAP[j] = 255;
|
|
9164
9036
|
}
|
|
9165
9037
|
for (var i = 0;i < ALPHABET.length; i++) {
|
|
9166
|
-
var
|
|
9167
|
-
var xc =
|
|
9038
|
+
var x = ALPHABET.charAt(i);
|
|
9039
|
+
var xc = x.charCodeAt(0);
|
|
9168
9040
|
if (BASE_MAP[xc] !== 255) {
|
|
9169
|
-
throw new TypeError(
|
|
9041
|
+
throw new TypeError(x + " is ambiguous");
|
|
9170
9042
|
}
|
|
9171
9043
|
BASE_MAP[xc] = i;
|
|
9172
9044
|
}
|
|
@@ -9266,9 +9138,9 @@ var require_base_x = __commonJS((exports, module) => {
|
|
|
9266
9138
|
it4++;
|
|
9267
9139
|
}
|
|
9268
9140
|
var vch = new Uint8Array(zeroes + (size - it4));
|
|
9269
|
-
var
|
|
9141
|
+
var j2 = zeroes;
|
|
9270
9142
|
while (it4 !== size) {
|
|
9271
|
-
vch[
|
|
9143
|
+
vch[j2++] = b256[it4++];
|
|
9272
9144
|
}
|
|
9273
9145
|
return vch;
|
|
9274
9146
|
}
|
|
@@ -10173,7 +10045,7 @@ var require_json = __commonJS((exports) => {
|
|
|
10173
10045
|
});
|
|
10174
10046
|
|
|
10175
10047
|
// ../../node_modules/.bun/multiformats@9.9.0/node_modules/multiformats/cjs/src/index.js
|
|
10176
|
-
var
|
|
10048
|
+
var require_src2 = __commonJS((exports) => {
|
|
10177
10049
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10178
10050
|
var cid = require_cid();
|
|
10179
10051
|
var varint = require_varint2();
|
|
@@ -10204,7 +10076,7 @@ var require_basics = __commonJS((exports) => {
|
|
|
10204
10076
|
var identity$1 = require_identity2();
|
|
10205
10077
|
var raw = require_raw();
|
|
10206
10078
|
var json = require_json();
|
|
10207
|
-
|
|
10079
|
+
require_src2();
|
|
10208
10080
|
var cid = require_cid();
|
|
10209
10081
|
var hasher = require_hasher();
|
|
10210
10082
|
var digest = require_digest();
|
|
@@ -11028,7 +10900,7 @@ var require_grapheme = __commonJS((exports) => {
|
|
|
11028
10900
|
}
|
|
11029
10901
|
function countGraphemes(text) {
|
|
11030
10902
|
let count = 0;
|
|
11031
|
-
for (let
|
|
10903
|
+
for (let _ of graphemeSegments(text))
|
|
11032
10904
|
count += 1;
|
|
11033
10905
|
return count;
|
|
11034
10906
|
}
|
|
@@ -11123,7 +10995,7 @@ var require_utf8_grapheme_len = __commonJS((exports) => {
|
|
|
11123
10995
|
var segmenter = "Segmenter" in Intl && typeof Intl.Segmenter === "function" ? /* @__PURE__ */ new Intl.Segmenter : null;
|
|
11124
10996
|
exports.graphemeLenNative = segmenter ? function graphemeLenNative(str) {
|
|
11125
10997
|
let length = 0;
|
|
11126
|
-
for (const
|
|
10998
|
+
for (const _ of segmenter.segment(str))
|
|
11127
10999
|
length++;
|
|
11128
11000
|
return length;
|
|
11129
11001
|
} : null;
|
|
@@ -12528,20 +12400,20 @@ var require_did_doc = __commonJS((exports) => {
|
|
|
12528
12400
|
|
|
12529
12401
|
// ../../node_modules/.bun/@atproto+common-web@0.4.13/node_modules/@atproto/common-web/dist/index.js
|
|
12530
12402
|
var require_dist4 = __commonJS((exports) => {
|
|
12531
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m,
|
|
12532
|
-
if (
|
|
12533
|
-
|
|
12534
|
-
var desc = Object.getOwnPropertyDescriptor(m,
|
|
12403
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
12404
|
+
if (k2 === undefined)
|
|
12405
|
+
k2 = k;
|
|
12406
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12535
12407
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12536
12408
|
desc = { enumerable: true, get: function() {
|
|
12537
|
-
return m[
|
|
12409
|
+
return m[k];
|
|
12538
12410
|
} };
|
|
12539
12411
|
}
|
|
12540
|
-
Object.defineProperty(o,
|
|
12541
|
-
} : function(o, m,
|
|
12542
|
-
if (
|
|
12543
|
-
|
|
12544
|
-
o[
|
|
12412
|
+
Object.defineProperty(o, k2, desc);
|
|
12413
|
+
} : function(o, m, k, k2) {
|
|
12414
|
+
if (k2 === undefined)
|
|
12415
|
+
k2 = k;
|
|
12416
|
+
o[k2] = m[k];
|
|
12545
12417
|
});
|
|
12546
12418
|
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
|
|
12547
12419
|
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
@@ -12552,9 +12424,9 @@ var require_dist4 = __commonJS((exports) => {
|
|
|
12552
12424
|
var ownKeys = function(o) {
|
|
12553
12425
|
ownKeys = Object.getOwnPropertyNames || function(o2) {
|
|
12554
12426
|
var ar = [];
|
|
12555
|
-
for (var
|
|
12556
|
-
if (Object.prototype.hasOwnProperty.call(o2,
|
|
12557
|
-
ar[ar.length] =
|
|
12427
|
+
for (var k in o2)
|
|
12428
|
+
if (Object.prototype.hasOwnProperty.call(o2, k))
|
|
12429
|
+
ar[ar.length] = k;
|
|
12558
12430
|
return ar;
|
|
12559
12431
|
};
|
|
12560
12432
|
return ownKeys(o);
|
|
@@ -12564,9 +12436,9 @@ var require_dist4 = __commonJS((exports) => {
|
|
|
12564
12436
|
return mod;
|
|
12565
12437
|
var result = {};
|
|
12566
12438
|
if (mod != null) {
|
|
12567
|
-
for (var
|
|
12568
|
-
if (
|
|
12569
|
-
__createBinding(result, mod,
|
|
12439
|
+
for (var k = ownKeys(mod), i = 0;i < k.length; i++)
|
|
12440
|
+
if (k[i] !== "default")
|
|
12441
|
+
__createBinding(result, mod, k[i]);
|
|
12570
12442
|
}
|
|
12571
12443
|
__setModuleDefault(result, mod);
|
|
12572
12444
|
return result;
|
|
@@ -13055,46 +12927,46 @@ var require_blob3 = __commonJS((exports) => {
|
|
|
13055
12927
|
// ../../node_modules/.bun/iso-datestring-validator@2.2.2/node_modules/iso-datestring-validator/dist/index.js
|
|
13056
12928
|
var require_dist5 = __commonJS((exports) => {
|
|
13057
12929
|
(() => {
|
|
13058
|
-
var e = { d: (
|
|
12930
|
+
var e = { d: (t2, r2) => {
|
|
13059
12931
|
for (var n2 in r2)
|
|
13060
|
-
e.o(r2, n2) && !e.o(
|
|
13061
|
-
}, o: (e2,
|
|
12932
|
+
e.o(r2, n2) && !e.o(t2, n2) && Object.defineProperty(t2, n2, { enumerable: true, get: r2[n2] });
|
|
12933
|
+
}, o: (e2, t2) => Object.prototype.hasOwnProperty.call(e2, t2), r: (e2) => {
|
|
13062
12934
|
typeof Symbol != "undefined" && Symbol.toStringTag && Object.defineProperty(e2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e2, "__esModule", { value: true });
|
|
13063
|
-
} },
|
|
13064
|
-
function r(e2,
|
|
13065
|
-
return
|
|
12935
|
+
} }, t = {};
|
|
12936
|
+
function r(e2, t2) {
|
|
12937
|
+
return t2 === undefined && (t2 = "-"), new RegExp("^(?!0{4}" + t2 + "0{2}" + t2 + "0{2})((?=[0-9]{4}" + t2 + "(((0[^2])|1[0-2])|02(?=" + t2 + "(([0-1][0-9])|2[0-8])))" + t2 + "[0-9]{2})|(?=((([13579][26])|([2468][048])|(0[48]))0{2})|([0-9]{2}((((0|[2468])[48])|[2468][048])|([13579][26])))" + t2 + "02" + t2 + "29))([0-9]{4})" + t2 + "(?!((0[469])|11)" + t2 + "31)((0[1,3-9]|1[0-2])|(02(?!" + t2 + "3)))" + t2 + "(0[1-9]|[1-2][0-9]|3[0-1])$").test(e2);
|
|
13066
12938
|
}
|
|
13067
12939
|
function n(e2) {
|
|
13068
|
-
var
|
|
13069
|
-
return
|
|
12940
|
+
var t2 = /\D/.exec(e2);
|
|
12941
|
+
return t2 ? t2[0] : "";
|
|
13070
12942
|
}
|
|
13071
|
-
function i(e2,
|
|
13072
|
-
|
|
13073
|
-
var i2 = new RegExp("^([0-1]|2(?=([0-3])|4" +
|
|
12943
|
+
function i(e2, t2, r2) {
|
|
12944
|
+
t2 === undefined && (t2 = ":"), r2 === undefined && (r2 = false);
|
|
12945
|
+
var i2 = new RegExp("^([0-1]|2(?=([0-3])|4" + t2 + "00))[0-9]" + t2 + "[0-5][0-9](" + t2 + "([0-5]|6(?=0))[0-9])?(.[0-9]{1,9})?$");
|
|
13074
12946
|
if (!r2 || !/[Z+\-]/.test(e2))
|
|
13075
12947
|
return i2.test(e2);
|
|
13076
12948
|
if (/Z$/.test(e2))
|
|
13077
12949
|
return i2.test(e2.replace("Z", ""));
|
|
13078
12950
|
var o2 = e2.includes("+"), a2 = e2.split(/[+-]/), u2 = a2[0], d2 = a2[1];
|
|
13079
|
-
return i2.test(u2) && function(e3,
|
|
13080
|
-
return r3 === undefined && (r3 = ":"), new RegExp(
|
|
12951
|
+
return i2.test(u2) && function(e3, t3, r3) {
|
|
12952
|
+
return r3 === undefined && (r3 = ":"), new RegExp(t3 ? "^(0(?!(2" + r3 + "4)|0" + r3 + "3)|1(?=([0-1]|2(?=" + r3 + "[04])|[34](?=" + r3 + "0))))([03469](?=" + r3 + "[03])|[17](?=" + r3 + "0)|2(?=" + r3 + "[04])|5(?=" + r3 + "[034])|8(?=" + r3 + "[04]))" + r3 + "([03](?=0)|4(?=5))[05]$" : "^(0(?=[^0])|1(?=[0-2]))([39](?=" + r3 + "[03])|[0-24-8](?=" + r3 + "00))" + r3 + "[03]0$").test(e3);
|
|
13081
12953
|
}(d2, o2, n(d2));
|
|
13082
12954
|
}
|
|
13083
12955
|
function o(e2) {
|
|
13084
|
-
var
|
|
12956
|
+
var t2 = e2.split("T"), o2 = t2[0], a2 = t2[1], u2 = r(o2, n(o2));
|
|
13085
12957
|
if (!a2)
|
|
13086
12958
|
return false;
|
|
13087
12959
|
var d2, s = (d2 = a2.match(/([^Z+\-\d])(?=\d+\1)/), Array.isArray(d2) ? d2[0] : "");
|
|
13088
12960
|
return u2 && i(a2, s, true);
|
|
13089
12961
|
}
|
|
13090
|
-
function a(e2,
|
|
13091
|
-
return
|
|
12962
|
+
function a(e2, t2) {
|
|
12963
|
+
return t2 === undefined && (t2 = "-"), new RegExp("^[0-9]{4}" + t2 + "(0(?=[^0])|1(?=[0-2]))[0-9]$").test(e2);
|
|
13092
12964
|
}
|
|
13093
|
-
e.r(
|
|
12965
|
+
e.r(t), e.d(t, { isValidDate: () => r, isValidISODateString: () => o, isValidTime: () => i, isValidYearMonth: () => a });
|
|
13094
12966
|
var u = exports;
|
|
13095
|
-
for (var d in
|
|
13096
|
-
u[d] =
|
|
13097
|
-
|
|
12967
|
+
for (var d in t)
|
|
12968
|
+
u[d] = t[d];
|
|
12969
|
+
t.__esModule && Object.defineProperty(u, "__esModule", { value: true });
|
|
13098
12970
|
})();
|
|
13099
12971
|
});
|
|
13100
12972
|
|
|
@@ -13244,20 +13116,20 @@ var require_formats = __commonJS((exports) => {
|
|
|
13244
13116
|
|
|
13245
13117
|
// ../../node_modules/.bun/@atproto+lexicon@0.6.1/node_modules/@atproto/lexicon/dist/validators/primitives.js
|
|
13246
13118
|
var require_primitives = __commonJS((exports) => {
|
|
13247
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m,
|
|
13248
|
-
if (
|
|
13249
|
-
|
|
13250
|
-
var desc = Object.getOwnPropertyDescriptor(m,
|
|
13119
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
13120
|
+
if (k2 === undefined)
|
|
13121
|
+
k2 = k;
|
|
13122
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
13251
13123
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13252
13124
|
desc = { enumerable: true, get: function() {
|
|
13253
|
-
return m[
|
|
13125
|
+
return m[k];
|
|
13254
13126
|
} };
|
|
13255
13127
|
}
|
|
13256
|
-
Object.defineProperty(o,
|
|
13257
|
-
} : function(o, m,
|
|
13258
|
-
if (
|
|
13259
|
-
|
|
13260
|
-
o[
|
|
13128
|
+
Object.defineProperty(o, k2, desc);
|
|
13129
|
+
} : function(o, m, k, k2) {
|
|
13130
|
+
if (k2 === undefined)
|
|
13131
|
+
k2 = k;
|
|
13132
|
+
o[k2] = m[k];
|
|
13261
13133
|
});
|
|
13262
13134
|
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
|
|
13263
13135
|
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
@@ -13268,9 +13140,9 @@ var require_primitives = __commonJS((exports) => {
|
|
|
13268
13140
|
var ownKeys = function(o) {
|
|
13269
13141
|
ownKeys = Object.getOwnPropertyNames || function(o2) {
|
|
13270
13142
|
var ar = [];
|
|
13271
|
-
for (var
|
|
13272
|
-
if (Object.prototype.hasOwnProperty.call(o2,
|
|
13273
|
-
ar[ar.length] =
|
|
13143
|
+
for (var k in o2)
|
|
13144
|
+
if (Object.prototype.hasOwnProperty.call(o2, k))
|
|
13145
|
+
ar[ar.length] = k;
|
|
13274
13146
|
return ar;
|
|
13275
13147
|
};
|
|
13276
13148
|
return ownKeys(o);
|
|
@@ -13280,9 +13152,9 @@ var require_primitives = __commonJS((exports) => {
|
|
|
13280
13152
|
return mod;
|
|
13281
13153
|
var result = {};
|
|
13282
13154
|
if (mod != null) {
|
|
13283
|
-
for (var
|
|
13284
|
-
if (
|
|
13285
|
-
__createBinding(result, mod,
|
|
13155
|
+
for (var k = ownKeys(mod), i = 0;i < k.length; i++)
|
|
13156
|
+
if (k[i] !== "default")
|
|
13157
|
+
__createBinding(result, mod, k[i]);
|
|
13286
13158
|
}
|
|
13287
13159
|
__setModuleDefault(result, mod);
|
|
13288
13160
|
return result;
|
|
@@ -13718,20 +13590,20 @@ var require_complex = __commonJS((exports) => {
|
|
|
13718
13590
|
|
|
13719
13591
|
// ../../node_modules/.bun/@atproto+lexicon@0.6.1/node_modules/@atproto/lexicon/dist/validators/xrpc.js
|
|
13720
13592
|
var require_xrpc = __commonJS((exports) => {
|
|
13721
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m,
|
|
13722
|
-
if (
|
|
13723
|
-
|
|
13724
|
-
var desc = Object.getOwnPropertyDescriptor(m,
|
|
13593
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
13594
|
+
if (k2 === undefined)
|
|
13595
|
+
k2 = k;
|
|
13596
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
13725
13597
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13726
13598
|
desc = { enumerable: true, get: function() {
|
|
13727
|
-
return m[
|
|
13599
|
+
return m[k];
|
|
13728
13600
|
} };
|
|
13729
13601
|
}
|
|
13730
|
-
Object.defineProperty(o,
|
|
13731
|
-
} : function(o, m,
|
|
13732
|
-
if (
|
|
13733
|
-
|
|
13734
|
-
o[
|
|
13602
|
+
Object.defineProperty(o, k2, desc);
|
|
13603
|
+
} : function(o, m, k, k2) {
|
|
13604
|
+
if (k2 === undefined)
|
|
13605
|
+
k2 = k;
|
|
13606
|
+
o[k2] = m[k];
|
|
13735
13607
|
});
|
|
13736
13608
|
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
|
|
13737
13609
|
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
@@ -13742,9 +13614,9 @@ var require_xrpc = __commonJS((exports) => {
|
|
|
13742
13614
|
var ownKeys = function(o) {
|
|
13743
13615
|
ownKeys = Object.getOwnPropertyNames || function(o2) {
|
|
13744
13616
|
var ar = [];
|
|
13745
|
-
for (var
|
|
13746
|
-
if (Object.prototype.hasOwnProperty.call(o2,
|
|
13747
|
-
ar[ar.length] =
|
|
13617
|
+
for (var k in o2)
|
|
13618
|
+
if (Object.prototype.hasOwnProperty.call(o2, k))
|
|
13619
|
+
ar[ar.length] = k;
|
|
13748
13620
|
return ar;
|
|
13749
13621
|
};
|
|
13750
13622
|
return ownKeys(o);
|
|
@@ -13754,9 +13626,9 @@ var require_xrpc = __commonJS((exports) => {
|
|
|
13754
13626
|
return mod;
|
|
13755
13627
|
var result = {};
|
|
13756
13628
|
if (mod != null) {
|
|
13757
|
-
for (var
|
|
13758
|
-
if (
|
|
13759
|
-
__createBinding(result, mod,
|
|
13629
|
+
for (var k = ownKeys(mod), i = 0;i < k.length; i++)
|
|
13630
|
+
if (k[i] !== "default")
|
|
13631
|
+
__createBinding(result, mod, k[i]);
|
|
13760
13632
|
}
|
|
13761
13633
|
__setModuleDefault(result, mod);
|
|
13762
13634
|
return result;
|
|
@@ -13987,13 +13859,13 @@ var require_lexicons = __commonJS((exports) => {
|
|
|
13987
13859
|
}
|
|
13988
13860
|
}
|
|
13989
13861
|
function resolveRefUris(obj, baseUri) {
|
|
13990
|
-
for (const
|
|
13862
|
+
for (const k in obj) {
|
|
13991
13863
|
if (obj.type === "ref") {
|
|
13992
13864
|
obj.ref = (0, util_1.toLexUri)(obj.ref, baseUri);
|
|
13993
13865
|
} else if (obj.type === "union") {
|
|
13994
13866
|
obj.refs = obj.refs.map((ref) => (0, util_1.toLexUri)(ref, baseUri));
|
|
13995
|
-
} else if (Array.isArray(obj[
|
|
13996
|
-
obj[
|
|
13867
|
+
} else if (Array.isArray(obj[k])) {
|
|
13868
|
+
obj[k] = obj[k].map((item) => {
|
|
13997
13869
|
if (typeof item === "string") {
|
|
13998
13870
|
return item.startsWith("#") ? (0, util_1.toLexUri)(item, baseUri) : item;
|
|
13999
13871
|
} else if (item && typeof item === "object") {
|
|
@@ -14001,8 +13873,8 @@ var require_lexicons = __commonJS((exports) => {
|
|
|
14001
13873
|
}
|
|
14002
13874
|
return item;
|
|
14003
13875
|
});
|
|
14004
|
-
} else if (obj[
|
|
14005
|
-
obj[
|
|
13876
|
+
} else if (obj[k] && typeof obj[k] === "object") {
|
|
13877
|
+
obj[k] = resolveRefUris(obj[k], baseUri);
|
|
14006
13878
|
}
|
|
14007
13879
|
}
|
|
14008
13880
|
return obj;
|
|
@@ -14076,20 +13948,20 @@ var require_serialize = __commonJS((exports) => {
|
|
|
14076
13948
|
|
|
14077
13949
|
// ../../node_modules/.bun/@atproto+lexicon@0.6.1/node_modules/@atproto/lexicon/dist/index.js
|
|
14078
13950
|
var require_dist6 = __commonJS((exports) => {
|
|
14079
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m,
|
|
14080
|
-
if (
|
|
14081
|
-
|
|
14082
|
-
var desc = Object.getOwnPropertyDescriptor(m,
|
|
13951
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
13952
|
+
if (k2 === undefined)
|
|
13953
|
+
k2 = k;
|
|
13954
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
14083
13955
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
14084
13956
|
desc = { enumerable: true, get: function() {
|
|
14085
|
-
return m[
|
|
13957
|
+
return m[k];
|
|
14086
13958
|
} };
|
|
14087
13959
|
}
|
|
14088
|
-
Object.defineProperty(o,
|
|
14089
|
-
} : function(o, m,
|
|
14090
|
-
if (
|
|
14091
|
-
|
|
14092
|
-
o[
|
|
13960
|
+
Object.defineProperty(o, k2, desc);
|
|
13961
|
+
} : function(o, m, k, k2) {
|
|
13962
|
+
if (k2 === undefined)
|
|
13963
|
+
k2 = k;
|
|
13964
|
+
o[k2] = m[k];
|
|
14093
13965
|
});
|
|
14094
13966
|
var __exportStar = exports && exports.__exportStar || function(m, exports2) {
|
|
14095
13967
|
for (var p in m)
|
|
@@ -34935,7 +34807,7 @@ var require_client = __commonJS((exports) => {
|
|
|
34935
34807
|
get fetch() {
|
|
34936
34808
|
throw new Error("Client.fetch is no longer supported. Use an XrpcClient instead.");
|
|
34937
34809
|
}
|
|
34938
|
-
set fetch(
|
|
34810
|
+
set fetch(_) {
|
|
34939
34811
|
throw new Error("Client.fetch is no longer supported. Use an XrpcClient instead.");
|
|
34940
34812
|
}
|
|
34941
34813
|
async call(serviceUri, methodNsid, params, data, opts) {
|
|
@@ -34984,20 +34856,20 @@ var require_client = __commonJS((exports) => {
|
|
|
34984
34856
|
|
|
34985
34857
|
// ../../node_modules/.bun/@atproto+xrpc@0.7.7/node_modules/@atproto/xrpc/dist/index.js
|
|
34986
34858
|
var require_dist7 = __commonJS((exports) => {
|
|
34987
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m,
|
|
34988
|
-
if (
|
|
34989
|
-
|
|
34990
|
-
var desc = Object.getOwnPropertyDescriptor(m,
|
|
34859
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
34860
|
+
if (k2 === undefined)
|
|
34861
|
+
k2 = k;
|
|
34862
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
34991
34863
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
34992
34864
|
desc = { enumerable: true, get: function() {
|
|
34993
|
-
return m[
|
|
34865
|
+
return m[k];
|
|
34994
34866
|
} };
|
|
34995
34867
|
}
|
|
34996
|
-
Object.defineProperty(o,
|
|
34997
|
-
} : function(o, m,
|
|
34998
|
-
if (
|
|
34999
|
-
|
|
35000
|
-
o[
|
|
34868
|
+
Object.defineProperty(o, k2, desc);
|
|
34869
|
+
} : function(o, m, k, k2) {
|
|
34870
|
+
if (k2 === undefined)
|
|
34871
|
+
k2 = k;
|
|
34872
|
+
o[k2] = m[k];
|
|
35001
34873
|
});
|
|
35002
34874
|
var __exportStar = exports && exports.__exportStar || function(m, exports2) {
|
|
35003
34875
|
for (var p in m)
|
|
@@ -43512,20 +43384,20 @@ var require_revokeVerifications = __commonJS((exports) => {
|
|
|
43512
43384
|
|
|
43513
43385
|
// ../../node_modules/.bun/@atproto+api@0.18.17/node_modules/@atproto/api/dist/client/index.js
|
|
43514
43386
|
var require_client2 = __commonJS((exports) => {
|
|
43515
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m,
|
|
43516
|
-
if (
|
|
43517
|
-
|
|
43518
|
-
var desc = Object.getOwnPropertyDescriptor(m,
|
|
43387
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
43388
|
+
if (k2 === undefined)
|
|
43389
|
+
k2 = k;
|
|
43390
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
43519
43391
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
43520
43392
|
desc = { enumerable: true, get: function() {
|
|
43521
|
-
return m[
|
|
43393
|
+
return m[k];
|
|
43522
43394
|
} };
|
|
43523
43395
|
}
|
|
43524
|
-
Object.defineProperty(o,
|
|
43525
|
-
} : function(o, m,
|
|
43526
|
-
if (
|
|
43527
|
-
|
|
43528
|
-
o[
|
|
43396
|
+
Object.defineProperty(o, k2, desc);
|
|
43397
|
+
} : function(o, m, k, k2) {
|
|
43398
|
+
if (k2 === undefined)
|
|
43399
|
+
k2 = k;
|
|
43400
|
+
o[k2] = m[k];
|
|
43529
43401
|
});
|
|
43530
43402
|
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
|
|
43531
43403
|
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
@@ -43536,9 +43408,9 @@ var require_client2 = __commonJS((exports) => {
|
|
|
43536
43408
|
var ownKeys = function(o) {
|
|
43537
43409
|
ownKeys = Object.getOwnPropertyNames || function(o2) {
|
|
43538
43410
|
var ar = [];
|
|
43539
|
-
for (var
|
|
43540
|
-
if (Object.prototype.hasOwnProperty.call(o2,
|
|
43541
|
-
ar[ar.length] =
|
|
43411
|
+
for (var k in o2)
|
|
43412
|
+
if (Object.prototype.hasOwnProperty.call(o2, k))
|
|
43413
|
+
ar[ar.length] = k;
|
|
43542
43414
|
return ar;
|
|
43543
43415
|
};
|
|
43544
43416
|
return ownKeys(o);
|
|
@@ -43548,9 +43420,9 @@ var require_client2 = __commonJS((exports) => {
|
|
|
43548
43420
|
return mod;
|
|
43549
43421
|
var result = {};
|
|
43550
43422
|
if (mod != null) {
|
|
43551
|
-
for (var
|
|
43552
|
-
if (
|
|
43553
|
-
__createBinding(result, mod,
|
|
43423
|
+
for (var k = ownKeys(mod), i = 0;i < k.length; i++)
|
|
43424
|
+
if (k[i] !== "default")
|
|
43425
|
+
__createBinding(result, mod, k[i]);
|
|
43554
43426
|
}
|
|
43555
43427
|
__setModuleDefault(result, mod);
|
|
43556
43428
|
return result;
|
|
@@ -48280,8 +48152,8 @@ var require_detection = __commonJS((exports) => {
|
|
|
48280
48152
|
let match;
|
|
48281
48153
|
const facets = [];
|
|
48282
48154
|
{
|
|
48283
|
-
const
|
|
48284
|
-
while (match =
|
|
48155
|
+
const re = util_1.MENTION_REGEX;
|
|
48156
|
+
while (match = re.exec(text.utf16)) {
|
|
48285
48157
|
if (!isValidDomain(match[3]) && !match[3].endsWith(".test")) {
|
|
48286
48158
|
continue;
|
|
48287
48159
|
}
|
|
@@ -48302,8 +48174,8 @@ var require_detection = __commonJS((exports) => {
|
|
|
48302
48174
|
}
|
|
48303
48175
|
}
|
|
48304
48176
|
{
|
|
48305
|
-
const
|
|
48306
|
-
while (match =
|
|
48177
|
+
const re = util_1.URL_REGEX;
|
|
48178
|
+
while (match = re.exec(text.utf16)) {
|
|
48307
48179
|
let uri = match[2];
|
|
48308
48180
|
if (!uri.startsWith("http")) {
|
|
48309
48181
|
const domain = match.groups?.domain;
|
|
@@ -48337,8 +48209,8 @@ var require_detection = __commonJS((exports) => {
|
|
|
48337
48209
|
}
|
|
48338
48210
|
}
|
|
48339
48211
|
{
|
|
48340
|
-
const
|
|
48341
|
-
while (match =
|
|
48212
|
+
const re = util_1.TAG_REGEX;
|
|
48213
|
+
while (match = re.exec(text.utf16)) {
|
|
48342
48214
|
const leading = match[1];
|
|
48343
48215
|
let tag = match[2];
|
|
48344
48216
|
if (!tag)
|
|
@@ -48362,8 +48234,8 @@ var require_detection = __commonJS((exports) => {
|
|
|
48362
48234
|
}
|
|
48363
48235
|
}
|
|
48364
48236
|
{
|
|
48365
|
-
const
|
|
48366
|
-
while (match =
|
|
48237
|
+
const re = util_1.CASHTAG_REGEX;
|
|
48238
|
+
while (match = re.exec(text.utf16)) {
|
|
48367
48239
|
const leading = match[1];
|
|
48368
48240
|
let ticker = match[2];
|
|
48369
48241
|
if (!ticker)
|
|
@@ -48652,7 +48524,7 @@ var require_rich_text = __commonJS((exports) => {
|
|
|
48652
48524
|
for (const facet of this.facets) {
|
|
48653
48525
|
for (const feature of facet.features) {
|
|
48654
48526
|
if (client_1.AppBskyRichtextFacet.isMention(feature)) {
|
|
48655
|
-
promises.push(agent.com.atproto.identity.resolveHandle({ handle: feature.did }).then((res) => res?.data.did).catch((
|
|
48527
|
+
promises.push(agent.com.atproto.identity.resolveHandle({ handle: feature.did }).then((res) => res?.data.did).catch((_) => {
|
|
48656
48528
|
return;
|
|
48657
48529
|
}).then((did) => {
|
|
48658
48530
|
feature.did = did || "";
|
|
@@ -49442,7 +49314,7 @@ var require_mutewords = __commonJS((exports) => {
|
|
|
49442
49314
|
];
|
|
49443
49315
|
function matchMuteWords({ mutedWords, text, facets, outlineTags, languages, actor }) {
|
|
49444
49316
|
const exception = LANGUAGE_EXCEPTIONS.includes(languages?.[0] || "");
|
|
49445
|
-
const tags = [].concat(outlineTags || []).concat((facets || []).flatMap((facet) => facet.features.filter(client_1.AppBskyRichtextFacet.isTag).map((tag) => tag.tag))).map((
|
|
49317
|
+
const tags = [].concat(outlineTags || []).concat((facets || []).flatMap((facet) => facet.features.filter(client_1.AppBskyRichtextFacet.isTag).map((tag) => tag.tag))).map((t) => t.toLowerCase());
|
|
49446
49318
|
const matches = [];
|
|
49447
49319
|
outer:
|
|
49448
49320
|
for (const muteWord of mutedWords) {
|
|
@@ -50183,7 +50055,7 @@ var require_AwaitLock = __commonJS((exports) => {
|
|
|
50183
50055
|
};
|
|
50184
50056
|
__classPrivateFieldGet(this, _AwaitLock_waitingResolvers, "f").add(resolver);
|
|
50185
50057
|
}),
|
|
50186
|
-
new Promise((
|
|
50058
|
+
new Promise((_, reject) => {
|
|
50187
50059
|
timer = setTimeout(() => {
|
|
50188
50060
|
__classPrivateFieldGet(this, _AwaitLock_waitingResolvers, "f").delete(resolver);
|
|
50189
50061
|
reject(new Error(`Timed out waiting for lock`));
|
|
@@ -50242,20 +50114,20 @@ var require_predicate = __commonJS((exports) => {
|
|
|
50242
50114
|
|
|
50243
50115
|
// ../../node_modules/.bun/@atproto+api@0.18.17/node_modules/@atproto/api/dist/agent.js
|
|
50244
50116
|
var require_agent = __commonJS((exports) => {
|
|
50245
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m,
|
|
50246
|
-
if (
|
|
50247
|
-
|
|
50248
|
-
var desc = Object.getOwnPropertyDescriptor(m,
|
|
50117
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
50118
|
+
if (k2 === undefined)
|
|
50119
|
+
k2 = k;
|
|
50120
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
50249
50121
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
50250
50122
|
desc = { enumerable: true, get: function() {
|
|
50251
|
-
return m[
|
|
50123
|
+
return m[k];
|
|
50252
50124
|
} };
|
|
50253
50125
|
}
|
|
50254
|
-
Object.defineProperty(o,
|
|
50255
|
-
} : function(o, m,
|
|
50256
|
-
if (
|
|
50257
|
-
|
|
50258
|
-
o[
|
|
50126
|
+
Object.defineProperty(o, k2, desc);
|
|
50127
|
+
} : function(o, m, k, k2) {
|
|
50128
|
+
if (k2 === undefined)
|
|
50129
|
+
k2 = k;
|
|
50130
|
+
o[k2] = m[k];
|
|
50259
50131
|
});
|
|
50260
50132
|
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
|
|
50261
50133
|
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
@@ -50266,9 +50138,9 @@ var require_agent = __commonJS((exports) => {
|
|
|
50266
50138
|
var ownKeys = function(o) {
|
|
50267
50139
|
ownKeys = Object.getOwnPropertyNames || function(o2) {
|
|
50268
50140
|
var ar = [];
|
|
50269
|
-
for (var
|
|
50270
|
-
if (Object.prototype.hasOwnProperty.call(o2,
|
|
50271
|
-
ar[ar.length] =
|
|
50141
|
+
for (var k in o2)
|
|
50142
|
+
if (Object.prototype.hasOwnProperty.call(o2, k))
|
|
50143
|
+
ar[ar.length] = k;
|
|
50272
50144
|
return ar;
|
|
50273
50145
|
};
|
|
50274
50146
|
return ownKeys(o);
|
|
@@ -50278,9 +50150,9 @@ var require_agent = __commonJS((exports) => {
|
|
|
50278
50150
|
return mod;
|
|
50279
50151
|
var result = {};
|
|
50280
50152
|
if (mod != null) {
|
|
50281
|
-
for (var
|
|
50282
|
-
if (
|
|
50283
|
-
__createBinding(result, mod,
|
|
50153
|
+
for (var k = ownKeys(mod), i = 0;i < k.length; i++)
|
|
50154
|
+
if (k[i] !== "default")
|
|
50155
|
+
__createBinding(result, mod, k[i]);
|
|
50284
50156
|
}
|
|
50285
50157
|
__setModuleDefault(result, mod);
|
|
50286
50158
|
return result;
|
|
@@ -50659,7 +50531,7 @@ var require_agent = __commonJS((exports) => {
|
|
|
50659
50531
|
const upsert = async () => {
|
|
50660
50532
|
const repo = this.assertDid;
|
|
50661
50533
|
const collection = "app.bsky.actor.profile";
|
|
50662
|
-
const existing = await this.com.atproto.repo.getRecord({ repo, collection, rkey: "self" }).catch((
|
|
50534
|
+
const existing = await this.com.atproto.repo.getRecord({ repo, collection, rkey: "self" }).catch((_) => {
|
|
50663
50535
|
return;
|
|
50664
50536
|
});
|
|
50665
50537
|
const existingRecord = existing && predicate.isValidProfile(existing.data.value) ? existing.data.value : undefined;
|
|
@@ -50787,16 +50659,16 @@ var require_agent = __commonJS((exports) => {
|
|
|
50787
50659
|
prefs.birthDate = new Date(pref.birthDate);
|
|
50788
50660
|
}
|
|
50789
50661
|
} else if (predicate.isValidDeclaredAgePref(pref)) {
|
|
50790
|
-
const { $type:
|
|
50662
|
+
const { $type: _, ...declaredAgePref } = pref;
|
|
50791
50663
|
prefs.declaredAge = declaredAgePref;
|
|
50792
50664
|
} else if (predicate.isValidFeedViewPref(pref)) {
|
|
50793
|
-
const { $type:
|
|
50665
|
+
const { $type: _, feed, ...v } = pref;
|
|
50794
50666
|
prefs.feedViewPrefs[feed] = { ...FEED_VIEW_PREF_DEFAULTS, ...v };
|
|
50795
50667
|
} else if (predicate.isValidThreadViewPref(pref)) {
|
|
50796
|
-
const { $type:
|
|
50668
|
+
const { $type: _, ...v } = pref;
|
|
50797
50669
|
prefs.threadViewPrefs = { ...prefs.threadViewPrefs, ...v };
|
|
50798
50670
|
} else if (predicate.isValidInterestsPref(pref)) {
|
|
50799
|
-
const { $type:
|
|
50671
|
+
const { $type: _, ...v } = pref;
|
|
50800
50672
|
prefs.interests = { ...prefs.interests, ...v };
|
|
50801
50673
|
} else if (predicate.isValidMutedWordsPref(pref)) {
|
|
50802
50674
|
prefs.moderationPrefs.mutedWords = pref.items;
|
|
@@ -51783,20 +51655,20 @@ var require_bsky_agent = __commonJS((exports) => {
|
|
|
51783
51655
|
|
|
51784
51656
|
// ../../node_modules/.bun/@atproto+api@0.18.17/node_modules/@atproto/api/dist/index.js
|
|
51785
51657
|
var require_dist8 = __commonJS((exports) => {
|
|
51786
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m,
|
|
51787
|
-
if (
|
|
51788
|
-
|
|
51789
|
-
var desc = Object.getOwnPropertyDescriptor(m,
|
|
51658
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
51659
|
+
if (k2 === undefined)
|
|
51660
|
+
k2 = k;
|
|
51661
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
51790
51662
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
51791
51663
|
desc = { enumerable: true, get: function() {
|
|
51792
|
-
return m[
|
|
51664
|
+
return m[k];
|
|
51793
51665
|
} };
|
|
51794
51666
|
}
|
|
51795
|
-
Object.defineProperty(o,
|
|
51796
|
-
} : function(o, m,
|
|
51797
|
-
if (
|
|
51798
|
-
|
|
51799
|
-
o[
|
|
51667
|
+
Object.defineProperty(o, k2, desc);
|
|
51668
|
+
} : function(o, m, k, k2) {
|
|
51669
|
+
if (k2 === undefined)
|
|
51670
|
+
k2 = k;
|
|
51671
|
+
o[k2] = m[k];
|
|
51800
51672
|
});
|
|
51801
51673
|
var __exportStar = exports && exports.__exportStar || function(m, exports2) {
|
|
51802
51674
|
for (var p in m)
|
|
@@ -51881,6 +51753,134 @@ var require_dist8 = __commonJS((exports) => {
|
|
|
51881
51753
|
exports.lexicons = new lexicon_1.Lexicons(lexicons_1.lexicons);
|
|
51882
51754
|
});
|
|
51883
51755
|
|
|
51756
|
+
// ../../node_modules/.bun/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
51757
|
+
var require_picocolors = __commonJS((exports, module) => {
|
|
51758
|
+
var p = process || {};
|
|
51759
|
+
var argv = p.argv || [];
|
|
51760
|
+
var env2 = p.env || {};
|
|
51761
|
+
var isColorSupported = !(!!env2.NO_COLOR || argv.includes("--no-color")) && (!!env2.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env2.TERM !== "dumb" || !!env2.CI);
|
|
51762
|
+
var formatter = (open, close, replace = open) => (input) => {
|
|
51763
|
+
let string = "" + input, index = string.indexOf(close, open.length);
|
|
51764
|
+
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
51765
|
+
};
|
|
51766
|
+
var replaceClose = (string, close, replace, index) => {
|
|
51767
|
+
let result = "", cursor = 0;
|
|
51768
|
+
do {
|
|
51769
|
+
result += string.substring(cursor, index) + replace;
|
|
51770
|
+
cursor = index + close.length;
|
|
51771
|
+
index = string.indexOf(close, cursor);
|
|
51772
|
+
} while (~index);
|
|
51773
|
+
return result + string.substring(cursor);
|
|
51774
|
+
};
|
|
51775
|
+
var createColors = (enabled = isColorSupported) => {
|
|
51776
|
+
let f = enabled ? formatter : () => String;
|
|
51777
|
+
return {
|
|
51778
|
+
isColorSupported: enabled,
|
|
51779
|
+
reset: f("\x1B[0m", "\x1B[0m"),
|
|
51780
|
+
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
51781
|
+
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
51782
|
+
italic: f("\x1B[3m", "\x1B[23m"),
|
|
51783
|
+
underline: f("\x1B[4m", "\x1B[24m"),
|
|
51784
|
+
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
51785
|
+
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
51786
|
+
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
51787
|
+
black: f("\x1B[30m", "\x1B[39m"),
|
|
51788
|
+
red: f("\x1B[31m", "\x1B[39m"),
|
|
51789
|
+
green: f("\x1B[32m", "\x1B[39m"),
|
|
51790
|
+
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
51791
|
+
blue: f("\x1B[34m", "\x1B[39m"),
|
|
51792
|
+
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
51793
|
+
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
51794
|
+
white: f("\x1B[37m", "\x1B[39m"),
|
|
51795
|
+
gray: f("\x1B[90m", "\x1B[39m"),
|
|
51796
|
+
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
51797
|
+
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
51798
|
+
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
51799
|
+
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
51800
|
+
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
51801
|
+
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
51802
|
+
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
51803
|
+
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
51804
|
+
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
51805
|
+
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
51806
|
+
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
51807
|
+
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
51808
|
+
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
51809
|
+
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
51810
|
+
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
51811
|
+
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
51812
|
+
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
51813
|
+
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
51814
|
+
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
51815
|
+
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
51816
|
+
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
51817
|
+
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
51818
|
+
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
51819
|
+
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
51820
|
+
};
|
|
51821
|
+
};
|
|
51822
|
+
module.exports = createColors();
|
|
51823
|
+
module.exports.createColors = createColors;
|
|
51824
|
+
});
|
|
51825
|
+
|
|
51826
|
+
// ../../node_modules/.bun/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
|
|
51827
|
+
var require_src3 = __commonJS((exports, module) => {
|
|
51828
|
+
var ESC = "\x1B";
|
|
51829
|
+
var CSI = `${ESC}[`;
|
|
51830
|
+
var beep = "\x07";
|
|
51831
|
+
var cursor = {
|
|
51832
|
+
to(x, y) {
|
|
51833
|
+
if (!y)
|
|
51834
|
+
return `${CSI}${x + 1}G`;
|
|
51835
|
+
return `${CSI}${y + 1};${x + 1}H`;
|
|
51836
|
+
},
|
|
51837
|
+
move(x, y) {
|
|
51838
|
+
let ret = "";
|
|
51839
|
+
if (x < 0)
|
|
51840
|
+
ret += `${CSI}${-x}D`;
|
|
51841
|
+
else if (x > 0)
|
|
51842
|
+
ret += `${CSI}${x}C`;
|
|
51843
|
+
if (y < 0)
|
|
51844
|
+
ret += `${CSI}${-y}A`;
|
|
51845
|
+
else if (y > 0)
|
|
51846
|
+
ret += `${CSI}${y}B`;
|
|
51847
|
+
return ret;
|
|
51848
|
+
},
|
|
51849
|
+
up: (count = 1) => `${CSI}${count}A`,
|
|
51850
|
+
down: (count = 1) => `${CSI}${count}B`,
|
|
51851
|
+
forward: (count = 1) => `${CSI}${count}C`,
|
|
51852
|
+
backward: (count = 1) => `${CSI}${count}D`,
|
|
51853
|
+
nextLine: (count = 1) => `${CSI}E`.repeat(count),
|
|
51854
|
+
prevLine: (count = 1) => `${CSI}F`.repeat(count),
|
|
51855
|
+
left: `${CSI}G`,
|
|
51856
|
+
hide: `${CSI}?25l`,
|
|
51857
|
+
show: `${CSI}?25h`,
|
|
51858
|
+
save: `${ESC}7`,
|
|
51859
|
+
restore: `${ESC}8`
|
|
51860
|
+
};
|
|
51861
|
+
var scroll = {
|
|
51862
|
+
up: (count = 1) => `${CSI}S`.repeat(count),
|
|
51863
|
+
down: (count = 1) => `${CSI}T`.repeat(count)
|
|
51864
|
+
};
|
|
51865
|
+
var erase = {
|
|
51866
|
+
screen: `${CSI}2J`,
|
|
51867
|
+
up: (count = 1) => `${CSI}1J`.repeat(count),
|
|
51868
|
+
down: (count = 1) => `${CSI}J`.repeat(count),
|
|
51869
|
+
line: `${CSI}2K`,
|
|
51870
|
+
lineEnd: `${CSI}K`,
|
|
51871
|
+
lineStart: `${CSI}1K`,
|
|
51872
|
+
lines(count) {
|
|
51873
|
+
let clear = "";
|
|
51874
|
+
for (let i = 0;i < count; i++)
|
|
51875
|
+
clear += this.line + (i < count - 1 ? cursor.up() : "");
|
|
51876
|
+
if (count)
|
|
51877
|
+
clear += cursor.left;
|
|
51878
|
+
return clear;
|
|
51879
|
+
}
|
|
51880
|
+
};
|
|
51881
|
+
module.exports = { cursor, scroll, erase, beep };
|
|
51882
|
+
});
|
|
51883
|
+
|
|
51884
51884
|
// ../../node_modules/.bun/mime-db@1.52.0/node_modules/mime-db/db.json
|
|
51885
51885
|
var require_db = __commonJS((exports, module) => {
|
|
51886
51886
|
module.exports = {
|
|
@@ -60419,11 +60419,11 @@ var require_mime_db = __commonJS((exports, module) => {
|
|
|
60419
60419
|
var import_cmd_ts6 = __toESM(require_cjs(), 1);
|
|
60420
60420
|
|
|
60421
60421
|
// src/commands/auth.ts
|
|
60422
|
-
var
|
|
60422
|
+
var import_api2 = __toESM(require_dist8(), 1);
|
|
60423
60423
|
|
|
60424
60424
|
// ../../node_modules/.bun/@clack+core@1.0.0/node_modules/@clack/core/dist/index.mjs
|
|
60425
60425
|
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
60426
|
-
var import_sisteransi = __toESM(
|
|
60426
|
+
var import_sisteransi = __toESM(require_src3(), 1);
|
|
60427
60427
|
import { stdout as R, stdin as q } from "node:process";
|
|
60428
60428
|
import * as k from "node:readline";
|
|
60429
60429
|
import ot from "node:readline";
|
|
@@ -61015,7 +61015,7 @@ class $t extends x {
|
|
|
61015
61015
|
// ../../node_modules/.bun/@clack+prompts@1.0.0/node_modules/@clack/prompts/dist/index.mjs
|
|
61016
61016
|
var import_picocolors2 = __toESM(require_picocolors(), 1);
|
|
61017
61017
|
import P2 from "node:process";
|
|
61018
|
-
var import_sisteransi2 = __toESM(
|
|
61018
|
+
var import_sisteransi2 = __toESM(require_src3(), 1);
|
|
61019
61019
|
function ht2() {
|
|
61020
61020
|
return P2.platform !== "win32" ? P2.env.TERM !== "linux" : !!P2.env.CI || !!P2.env.WT_SESSION || !!P2.env.TERMINUS_SUBLIME || P2.env.ConEmuTask === "{cmd::Cmder}" || P2.env.TERM_PROGRAM === "Terminus-Sublime" || P2.env.TERM_PROGRAM === "vscode" || P2.env.TERM === "xterm-256color" || P2.env.TERM === "alacritty" || P2.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
61021
61021
|
}
|
|
@@ -61546,113 +61546,10 @@ ${l}
|
|
|
61546
61546
|
} }).prompt();
|
|
61547
61547
|
|
|
61548
61548
|
// src/commands/auth.ts
|
|
61549
|
-
var
|
|
61550
|
-
|
|
61551
|
-
// src/lib/credentials.ts
|
|
61552
|
-
import * as fs from "fs/promises";
|
|
61553
|
-
import * as path from "path";
|
|
61554
|
-
import * as os2 from "os";
|
|
61555
|
-
var CONFIG_DIR = path.join(os2.homedir(), ".config", "sequoia");
|
|
61556
|
-
var CREDENTIALS_FILE = path.join(CONFIG_DIR, "credentials.json");
|
|
61557
|
-
async function fileExists(filePath) {
|
|
61558
|
-
try {
|
|
61559
|
-
await fs.access(filePath);
|
|
61560
|
-
return true;
|
|
61561
|
-
} catch {
|
|
61562
|
-
return false;
|
|
61563
|
-
}
|
|
61564
|
-
}
|
|
61565
|
-
async function loadCredentialsStore() {
|
|
61566
|
-
if (!await fileExists(CREDENTIALS_FILE)) {
|
|
61567
|
-
return {};
|
|
61568
|
-
}
|
|
61569
|
-
try {
|
|
61570
|
-
const content = await fs.readFile(CREDENTIALS_FILE, "utf-8");
|
|
61571
|
-
const parsed = JSON.parse(content);
|
|
61572
|
-
if (parsed.identifier && parsed.password) {
|
|
61573
|
-
const legacy = parsed;
|
|
61574
|
-
return { [legacy.identifier]: legacy };
|
|
61575
|
-
}
|
|
61576
|
-
return parsed;
|
|
61577
|
-
} catch {
|
|
61578
|
-
return {};
|
|
61579
|
-
}
|
|
61580
|
-
}
|
|
61581
|
-
async function saveCredentialsStore(store) {
|
|
61582
|
-
await fs.mkdir(CONFIG_DIR, { recursive: true });
|
|
61583
|
-
await fs.writeFile(CREDENTIALS_FILE, JSON.stringify(store, null, 2));
|
|
61584
|
-
await fs.chmod(CREDENTIALS_FILE, 384);
|
|
61585
|
-
}
|
|
61586
|
-
async function loadCredentials(projectIdentity) {
|
|
61587
|
-
const envIdentifier = process.env.ATP_IDENTIFIER;
|
|
61588
|
-
const envPassword = process.env.ATP_APP_PASSWORD;
|
|
61589
|
-
const envPdsUrl = process.env.PDS_URL;
|
|
61590
|
-
if (envIdentifier && envPassword) {
|
|
61591
|
-
return {
|
|
61592
|
-
identifier: envIdentifier,
|
|
61593
|
-
password: envPassword,
|
|
61594
|
-
pdsUrl: envPdsUrl || "https://bsky.social"
|
|
61595
|
-
};
|
|
61596
|
-
}
|
|
61597
|
-
const store = await loadCredentialsStore();
|
|
61598
|
-
const identifiers = Object.keys(store);
|
|
61599
|
-
if (identifiers.length === 0) {
|
|
61600
|
-
return null;
|
|
61601
|
-
}
|
|
61602
|
-
const profileEnv = process.env.SEQUOIA_PROFILE;
|
|
61603
|
-
if (profileEnv && store[profileEnv]) {
|
|
61604
|
-
return store[profileEnv];
|
|
61605
|
-
}
|
|
61606
|
-
if (projectIdentity && store[projectIdentity]) {
|
|
61607
|
-
return store[projectIdentity];
|
|
61608
|
-
}
|
|
61609
|
-
if (identifiers.length === 1 && identifiers[0]) {
|
|
61610
|
-
return store[identifiers[0]] ?? null;
|
|
61611
|
-
}
|
|
61612
|
-
return null;
|
|
61613
|
-
}
|
|
61614
|
-
async function getCredentials(identifier) {
|
|
61615
|
-
const store = await loadCredentialsStore();
|
|
61616
|
-
return store[identifier] || null;
|
|
61617
|
-
}
|
|
61618
|
-
async function listCredentials() {
|
|
61619
|
-
const store = await loadCredentialsStore();
|
|
61620
|
-
return Object.keys(store);
|
|
61621
|
-
}
|
|
61622
|
-
async function saveCredentials(credentials) {
|
|
61623
|
-
const store = await loadCredentialsStore();
|
|
61624
|
-
store[credentials.identifier] = credentials;
|
|
61625
|
-
await saveCredentialsStore(store);
|
|
61626
|
-
}
|
|
61627
|
-
async function deleteCredentials(identifier) {
|
|
61628
|
-
const store = await loadCredentialsStore();
|
|
61629
|
-
const identifiers = Object.keys(store);
|
|
61630
|
-
if (identifiers.length === 0) {
|
|
61631
|
-
return false;
|
|
61632
|
-
}
|
|
61633
|
-
if (identifier) {
|
|
61634
|
-
if (!store[identifier]) {
|
|
61635
|
-
return false;
|
|
61636
|
-
}
|
|
61637
|
-
delete store[identifier];
|
|
61638
|
-
await saveCredentialsStore(store);
|
|
61639
|
-
return true;
|
|
61640
|
-
}
|
|
61641
|
-
if (identifiers.length === 1 && identifiers[0]) {
|
|
61642
|
-
delete store[identifiers[0]];
|
|
61643
|
-
await saveCredentialsStore(store);
|
|
61644
|
-
return true;
|
|
61645
|
-
}
|
|
61646
|
-
return false;
|
|
61647
|
-
}
|
|
61648
|
-
function getCredentialsPath() {
|
|
61649
|
-
return CREDENTIALS_FILE;
|
|
61650
|
-
}
|
|
61549
|
+
var import_cmd_ts = __toESM(require_cjs(), 1);
|
|
61651
61550
|
|
|
61652
61551
|
// src/lib/atproto.ts
|
|
61653
61552
|
var import_api = __toESM(require_dist8(), 1);
|
|
61654
|
-
import * as fs3 from "fs/promises";
|
|
61655
|
-
import * as path4 from "path";
|
|
61656
61553
|
|
|
61657
61554
|
// ../../node_modules/.bun/mime-types@2.1.35/node_modules/mime-types/index.js
|
|
61658
61555
|
/*!
|
|
@@ -61667,11 +61564,11 @@ var $extensions = Object.create(null);
|
|
|
61667
61564
|
var $lookup = lookup;
|
|
61668
61565
|
var $types = Object.create(null);
|
|
61669
61566
|
populateMaps($extensions, $types);
|
|
61670
|
-
function lookup(
|
|
61671
|
-
if (!
|
|
61567
|
+
function lookup(path) {
|
|
61568
|
+
if (!path || typeof path !== "string") {
|
|
61672
61569
|
return false;
|
|
61673
61570
|
}
|
|
61674
|
-
var extension = extname("x." +
|
|
61571
|
+
var extension = extname("x." + path).toLowerCase().substr(1);
|
|
61675
61572
|
if (!extension) {
|
|
61676
61573
|
return false;
|
|
61677
61574
|
}
|
|
@@ -61700,9 +61597,13 @@ function populateMaps(extensions, types) {
|
|
|
61700
61597
|
});
|
|
61701
61598
|
}
|
|
61702
61599
|
|
|
61600
|
+
// src/lib/atproto.ts
|
|
61601
|
+
import * as fs2 from "node:fs/promises";
|
|
61602
|
+
import * as path3 from "node:path";
|
|
61603
|
+
|
|
61703
61604
|
// src/lib/markdown.ts
|
|
61704
|
-
import * as
|
|
61705
|
-
import * as
|
|
61605
|
+
import * as fs from "node:fs/promises";
|
|
61606
|
+
import * as path2 from "node:path";
|
|
61706
61607
|
|
|
61707
61608
|
// ../../node_modules/.bun/@isaacs+balanced-match@4.0.1/node_modules/@isaacs/balanced-match/dist/esm/index.js
|
|
61708
61609
|
var balanced = (a, b, str) => {
|
|
@@ -62505,11 +62406,11 @@ var qmarksTestNoExtDot = ([$0]) => {
|
|
|
62505
62406
|
return (f) => f.length === len && f !== "." && f !== "..";
|
|
62506
62407
|
};
|
|
62507
62408
|
var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
|
|
62508
|
-
var
|
|
62409
|
+
var path = {
|
|
62509
62410
|
win32: { sep: "\\" },
|
|
62510
62411
|
posix: { sep: "/" }
|
|
62511
62412
|
};
|
|
62512
|
-
var sep = defaultPlatform === "win32" ?
|
|
62413
|
+
var sep = defaultPlatform === "win32" ? path.win32.sep : path.posix.sep;
|
|
62513
62414
|
minimatch.sep = sep;
|
|
62514
62415
|
var GLOBSTAR = Symbol("globstar **");
|
|
62515
62416
|
minimatch.GLOBSTAR = GLOBSTAR;
|
|
@@ -65172,12 +65073,12 @@ class PathBase {
|
|
|
65172
65073
|
childrenCache() {
|
|
65173
65074
|
return this.#children;
|
|
65174
65075
|
}
|
|
65175
|
-
resolve(
|
|
65176
|
-
if (!
|
|
65076
|
+
resolve(path2) {
|
|
65077
|
+
if (!path2) {
|
|
65177
65078
|
return this;
|
|
65178
65079
|
}
|
|
65179
|
-
const rootPath = this.getRootString(
|
|
65180
|
-
const dir =
|
|
65080
|
+
const rootPath = this.getRootString(path2);
|
|
65081
|
+
const dir = path2.substring(rootPath.length);
|
|
65181
65082
|
const dirParts = dir.split(this.splitSep);
|
|
65182
65083
|
const result = rootPath ? this.getRoot(rootPath).#resolveParts(dirParts) : this.#resolveParts(dirParts);
|
|
65183
65084
|
return result;
|
|
@@ -65706,8 +65607,8 @@ class PathWin32 extends PathBase {
|
|
|
65706
65607
|
newChild(name, type = UNKNOWN, opts = {}) {
|
|
65707
65608
|
return new PathWin32(name, type, this.root, this.roots, this.nocase, this.childrenCache(), opts);
|
|
65708
65609
|
}
|
|
65709
|
-
getRootString(
|
|
65710
|
-
return win32.parse(
|
|
65610
|
+
getRootString(path2) {
|
|
65611
|
+
return win32.parse(path2).root;
|
|
65711
65612
|
}
|
|
65712
65613
|
getRoot(rootPath) {
|
|
65713
65614
|
rootPath = uncToDrive(rootPath.toUpperCase());
|
|
@@ -65733,8 +65634,8 @@ class PathPosix extends PathBase {
|
|
|
65733
65634
|
constructor(name, type = UNKNOWN, root, roots, nocase, children, opts) {
|
|
65734
65635
|
super(name, type, root, roots, nocase, children, opts);
|
|
65735
65636
|
}
|
|
65736
|
-
getRootString(
|
|
65737
|
-
return
|
|
65637
|
+
getRootString(path2) {
|
|
65638
|
+
return path2.startsWith("/") ? "/" : "";
|
|
65738
65639
|
}
|
|
65739
65640
|
getRoot(_rootPath) {
|
|
65740
65641
|
return this.root;
|
|
@@ -65754,8 +65655,8 @@ class PathScurryBase {
|
|
|
65754
65655
|
#children;
|
|
65755
65656
|
nocase;
|
|
65756
65657
|
#fs;
|
|
65757
|
-
constructor(cwd = process.cwd(), pathImpl, sep2, { nocase, childrenCacheSize = 16 * 1024, fs
|
|
65758
|
-
this.#fs = fsFromOption(
|
|
65658
|
+
constructor(cwd = process.cwd(), pathImpl, sep2, { nocase, childrenCacheSize = 16 * 1024, fs = defaultFS } = {}) {
|
|
65659
|
+
this.#fs = fsFromOption(fs);
|
|
65759
65660
|
if (cwd instanceof URL || cwd.startsWith("file://")) {
|
|
65760
65661
|
cwd = fileURLToPath(cwd);
|
|
65761
65662
|
}
|
|
@@ -65791,11 +65692,11 @@ class PathScurryBase {
|
|
|
65791
65692
|
}
|
|
65792
65693
|
this.cwd = prev;
|
|
65793
65694
|
}
|
|
65794
|
-
depth(
|
|
65795
|
-
if (typeof
|
|
65796
|
-
|
|
65695
|
+
depth(path2 = this.cwd) {
|
|
65696
|
+
if (typeof path2 === "string") {
|
|
65697
|
+
path2 = this.cwd.resolve(path2);
|
|
65797
65698
|
}
|
|
65798
|
-
return
|
|
65699
|
+
return path2.depth();
|
|
65799
65700
|
}
|
|
65800
65701
|
childrenCache() {
|
|
65801
65702
|
return this.#children;
|
|
@@ -66211,9 +66112,9 @@ class PathScurryBase {
|
|
|
66211
66112
|
process3();
|
|
66212
66113
|
return results;
|
|
66213
66114
|
}
|
|
66214
|
-
chdir(
|
|
66115
|
+
chdir(path2 = this.cwd) {
|
|
66215
66116
|
const oldCwd = this.cwd;
|
|
66216
|
-
this.cwd = typeof
|
|
66117
|
+
this.cwd = typeof path2 === "string" ? this.cwd.resolve(path2) : path2;
|
|
66217
66118
|
this.cwd[setAsCwd](oldCwd);
|
|
66218
66119
|
}
|
|
66219
66120
|
}
|
|
@@ -66231,8 +66132,8 @@ class PathScurryWin32 extends PathScurryBase {
|
|
|
66231
66132
|
parseRootPath(dir) {
|
|
66232
66133
|
return win32.parse(dir).root.toUpperCase();
|
|
66233
66134
|
}
|
|
66234
|
-
newRoot(
|
|
66235
|
-
return new PathWin32(this.rootPath, IFDIR, undefined, this.roots, this.nocase, this.childrenCache(), { fs
|
|
66135
|
+
newRoot(fs) {
|
|
66136
|
+
return new PathWin32(this.rootPath, IFDIR, undefined, this.roots, this.nocase, this.childrenCache(), { fs });
|
|
66236
66137
|
}
|
|
66237
66138
|
isAbsolute(p) {
|
|
66238
66139
|
return p.startsWith("/") || p.startsWith("\\") || /^[a-z]:(\/|\\)/i.test(p);
|
|
@@ -66249,8 +66150,8 @@ class PathScurryPosix extends PathScurryBase {
|
|
|
66249
66150
|
parseRootPath(_dir) {
|
|
66250
66151
|
return "/";
|
|
66251
66152
|
}
|
|
66252
|
-
newRoot(
|
|
66253
|
-
return new PathPosix(this.rootPath, IFDIR, undefined, this.roots, this.nocase, this.childrenCache(), { fs
|
|
66153
|
+
newRoot(fs) {
|
|
66154
|
+
return new PathPosix(this.rootPath, IFDIR, undefined, this.roots, this.nocase, this.childrenCache(), { fs });
|
|
66254
66155
|
}
|
|
66255
66156
|
isAbsolute(p) {
|
|
66256
66157
|
return p.startsWith("/");
|
|
@@ -66502,8 +66403,8 @@ class MatchRecord {
|
|
|
66502
66403
|
this.store.set(target, current === undefined ? n : n & current);
|
|
66503
66404
|
}
|
|
66504
66405
|
entries() {
|
|
66505
|
-
return [...this.store.entries()].map(([
|
|
66506
|
-
|
|
66406
|
+
return [...this.store.entries()].map(([path2, n]) => [
|
|
66407
|
+
path2,
|
|
66507
66408
|
!!(n & 2),
|
|
66508
66409
|
!!(n & 1)
|
|
66509
66410
|
]);
|
|
@@ -66706,9 +66607,9 @@ class GlobUtil {
|
|
|
66706
66607
|
signal;
|
|
66707
66608
|
maxDepth;
|
|
66708
66609
|
includeChildMatches;
|
|
66709
|
-
constructor(patterns,
|
|
66610
|
+
constructor(patterns, path2, opts) {
|
|
66710
66611
|
this.patterns = patterns;
|
|
66711
|
-
this.path =
|
|
66612
|
+
this.path = path2;
|
|
66712
66613
|
this.opts = opts;
|
|
66713
66614
|
this.#sep = !opts.posix && opts.platform === "win32" ? "\\" : "/";
|
|
66714
66615
|
this.includeChildMatches = opts.includeChildMatches !== false;
|
|
@@ -66727,11 +66628,11 @@ class GlobUtil {
|
|
|
66727
66628
|
});
|
|
66728
66629
|
}
|
|
66729
66630
|
}
|
|
66730
|
-
#ignored(
|
|
66731
|
-
return this.seen.has(
|
|
66631
|
+
#ignored(path2) {
|
|
66632
|
+
return this.seen.has(path2) || !!this.#ignore?.ignored?.(path2);
|
|
66732
66633
|
}
|
|
66733
|
-
#childrenIgnored(
|
|
66734
|
-
return !!this.#ignore?.childrenIgnored?.(
|
|
66634
|
+
#childrenIgnored(path2) {
|
|
66635
|
+
return !!this.#ignore?.childrenIgnored?.(path2);
|
|
66735
66636
|
}
|
|
66736
66637
|
pause() {
|
|
66737
66638
|
this.paused = true;
|
|
@@ -66944,8 +66845,8 @@ class GlobUtil {
|
|
|
66944
66845
|
|
|
66945
66846
|
class GlobWalker extends GlobUtil {
|
|
66946
66847
|
matches = new Set;
|
|
66947
|
-
constructor(patterns,
|
|
66948
|
-
super(patterns,
|
|
66848
|
+
constructor(patterns, path2, opts) {
|
|
66849
|
+
super(patterns, path2, opts);
|
|
66949
66850
|
}
|
|
66950
66851
|
matchEmit(e) {
|
|
66951
66852
|
this.matches.add(e);
|
|
@@ -66983,8 +66884,8 @@ class GlobWalker extends GlobUtil {
|
|
|
66983
66884
|
|
|
66984
66885
|
class GlobStream extends GlobUtil {
|
|
66985
66886
|
results;
|
|
66986
|
-
constructor(patterns,
|
|
66987
|
-
super(patterns,
|
|
66887
|
+
constructor(patterns, path2, opts) {
|
|
66888
|
+
super(patterns, path2, opts);
|
|
66988
66889
|
this.results = new Minipass({
|
|
66989
66890
|
signal: this.signal,
|
|
66990
66891
|
objectMode: true
|
|
@@ -67266,10 +67167,18 @@ function parseFrontmatter(content, mapping) {
|
|
|
67266
67167
|
const raw = {};
|
|
67267
67168
|
const lines = frontmatterStr.split(`
|
|
67268
67169
|
`);
|
|
67269
|
-
|
|
67170
|
+
let i = 0;
|
|
67171
|
+
while (i < lines.length) {
|
|
67172
|
+
const line = lines[i];
|
|
67173
|
+
if (line === undefined) {
|
|
67174
|
+
i++;
|
|
67175
|
+
continue;
|
|
67176
|
+
}
|
|
67270
67177
|
const sepIndex = line.indexOf(separator);
|
|
67271
|
-
if (sepIndex === -1)
|
|
67178
|
+
if (sepIndex === -1) {
|
|
67179
|
+
i++;
|
|
67272
67180
|
continue;
|
|
67181
|
+
}
|
|
67273
67182
|
const key = line.slice(0, sepIndex).trim();
|
|
67274
67183
|
let value = line.slice(sepIndex + 1).trim();
|
|
67275
67184
|
if (value.startsWith('"') && value.endsWith('"') || value.startsWith("'") && value.endsWith("'")) {
|
|
@@ -67278,6 +67187,36 @@ function parseFrontmatter(content, mapping) {
|
|
|
67278
67187
|
if (value.startsWith("[") && value.endsWith("]")) {
|
|
67279
67188
|
const arrayContent = value.slice(1, -1);
|
|
67280
67189
|
raw[key] = arrayContent.split(",").map((item) => item.trim().replace(/^["']|["']$/g, ""));
|
|
67190
|
+
} else if (value === "" && !isToml) {
|
|
67191
|
+
const arrayItems = [];
|
|
67192
|
+
let j2 = i + 1;
|
|
67193
|
+
while (j2 < lines.length) {
|
|
67194
|
+
const nextLine = lines[j2];
|
|
67195
|
+
if (nextLine === undefined) {
|
|
67196
|
+
j2++;
|
|
67197
|
+
continue;
|
|
67198
|
+
}
|
|
67199
|
+
const listMatch = nextLine.match(/^\s+-\s*(.*)$/);
|
|
67200
|
+
if (listMatch && listMatch[1] !== undefined) {
|
|
67201
|
+
let itemValue = listMatch[1].trim();
|
|
67202
|
+
if (itemValue.startsWith('"') && itemValue.endsWith('"') || itemValue.startsWith("'") && itemValue.endsWith("'")) {
|
|
67203
|
+
itemValue = itemValue.slice(1, -1);
|
|
67204
|
+
}
|
|
67205
|
+
arrayItems.push(itemValue);
|
|
67206
|
+
j2++;
|
|
67207
|
+
} else if (nextLine.trim() === "") {
|
|
67208
|
+
j2++;
|
|
67209
|
+
} else {
|
|
67210
|
+
break;
|
|
67211
|
+
}
|
|
67212
|
+
}
|
|
67213
|
+
if (arrayItems.length > 0) {
|
|
67214
|
+
raw[key] = arrayItems;
|
|
67215
|
+
i = j2;
|
|
67216
|
+
continue;
|
|
67217
|
+
} else {
|
|
67218
|
+
raw[key] = value;
|
|
67219
|
+
}
|
|
67281
67220
|
} else if (value === "true") {
|
|
67282
67221
|
raw[key] = true;
|
|
67283
67222
|
} else if (value === "false") {
|
|
@@ -67285,6 +67224,7 @@ function parseFrontmatter(content, mapping) {
|
|
|
67285
67224
|
} else {
|
|
67286
67225
|
raw[key] = value;
|
|
67287
67226
|
}
|
|
67227
|
+
i++;
|
|
67288
67228
|
}
|
|
67289
67229
|
const frontmatter = {};
|
|
67290
67230
|
const titleField = mapping?.title || "title";
|
|
@@ -67315,10 +67255,29 @@ function parseFrontmatter(content, mapping) {
|
|
|
67315
67255
|
frontmatter.draft = draftValue === true || draftValue === "true";
|
|
67316
67256
|
}
|
|
67317
67257
|
frontmatter.atUri = raw.atUri;
|
|
67318
|
-
return {
|
|
67258
|
+
return {
|
|
67259
|
+
frontmatter,
|
|
67260
|
+
body,
|
|
67261
|
+
rawFrontmatter: raw
|
|
67262
|
+
};
|
|
67319
67263
|
}
|
|
67320
|
-
function
|
|
67321
|
-
|
|
67264
|
+
function getSlugFromOptions(relativePath, rawFrontmatter, options = {}) {
|
|
67265
|
+
const { slugField, removeIndexFromSlug = false } = options;
|
|
67266
|
+
let slug;
|
|
67267
|
+
if (slugField) {
|
|
67268
|
+
const frontmatterValue = rawFrontmatter[slugField];
|
|
67269
|
+
if (frontmatterValue && typeof frontmatterValue === "string") {
|
|
67270
|
+
slug = frontmatterValue.replace(/^\//, "").toLowerCase().replace(/\s+/g, "-");
|
|
67271
|
+
} else {
|
|
67272
|
+
slug = relativePath.replace(/\.mdx?$/, "").toLowerCase().replace(/\s+/g, "-");
|
|
67273
|
+
}
|
|
67274
|
+
} else {
|
|
67275
|
+
slug = relativePath.replace(/\.mdx?$/, "").toLowerCase().replace(/\s+/g, "-");
|
|
67276
|
+
}
|
|
67277
|
+
if (removeIndexFromSlug) {
|
|
67278
|
+
slug = slug.replace(/\/_?index$/, "");
|
|
67279
|
+
}
|
|
67280
|
+
return slug;
|
|
67322
67281
|
}
|
|
67323
67282
|
async function getContentHash(content) {
|
|
67324
67283
|
const encoder = new TextEncoder;
|
|
@@ -67335,7 +67294,22 @@ function shouldIgnore(relativePath, ignorePatterns) {
|
|
|
67335
67294
|
}
|
|
67336
67295
|
return false;
|
|
67337
67296
|
}
|
|
67338
|
-
async function scanContentDirectory(contentDir,
|
|
67297
|
+
async function scanContentDirectory(contentDir, frontmatterMappingOrOptions, ignorePatterns = []) {
|
|
67298
|
+
let options;
|
|
67299
|
+
if (frontmatterMappingOrOptions && (("frontmatterMapping" in frontmatterMappingOrOptions) || ("ignorePatterns" in frontmatterMappingOrOptions) || ("slugField" in frontmatterMappingOrOptions))) {
|
|
67300
|
+
options = frontmatterMappingOrOptions;
|
|
67301
|
+
} else {
|
|
67302
|
+
options = {
|
|
67303
|
+
frontmatterMapping: frontmatterMappingOrOptions,
|
|
67304
|
+
ignorePatterns
|
|
67305
|
+
};
|
|
67306
|
+
}
|
|
67307
|
+
const {
|
|
67308
|
+
frontmatterMapping,
|
|
67309
|
+
ignorePatterns: ignore = [],
|
|
67310
|
+
slugField,
|
|
67311
|
+
removeIndexFromSlug
|
|
67312
|
+
} = options;
|
|
67339
67313
|
const patterns = ["**/*.md", "**/*.mdx"];
|
|
67340
67314
|
const posts = [];
|
|
67341
67315
|
for (const pattern of patterns) {
|
|
@@ -67344,21 +67318,24 @@ async function scanContentDirectory(contentDir, frontmatterMapping, ignorePatter
|
|
|
67344
67318
|
absolute: false
|
|
67345
67319
|
});
|
|
67346
67320
|
for (const relativePath of files) {
|
|
67347
|
-
if (shouldIgnore(relativePath,
|
|
67321
|
+
if (shouldIgnore(relativePath, ignore)) {
|
|
67348
67322
|
continue;
|
|
67349
67323
|
}
|
|
67350
|
-
const filePath =
|
|
67351
|
-
const rawContent = await
|
|
67324
|
+
const filePath = path2.join(contentDir, relativePath);
|
|
67325
|
+
const rawContent = await fs.readFile(filePath, "utf-8");
|
|
67352
67326
|
try {
|
|
67353
|
-
const { frontmatter, body } = parseFrontmatter(rawContent, frontmatterMapping);
|
|
67354
|
-
const
|
|
67355
|
-
|
|
67327
|
+
const { frontmatter, body, rawFrontmatter } = parseFrontmatter(rawContent, frontmatterMapping);
|
|
67328
|
+
const slug = getSlugFromOptions(relativePath, rawFrontmatter, {
|
|
67329
|
+
slugField,
|
|
67330
|
+
removeIndexFromSlug
|
|
67331
|
+
});
|
|
67356
67332
|
posts.push({
|
|
67357
67333
|
filePath,
|
|
67358
67334
|
slug,
|
|
67359
67335
|
frontmatter,
|
|
67360
67336
|
content: body,
|
|
67361
|
-
rawContent
|
|
67337
|
+
rawContent,
|
|
67338
|
+
rawFrontmatter
|
|
67362
67339
|
});
|
|
67363
67340
|
} catch (error) {
|
|
67364
67341
|
console.error(`Error parsing ${relativePath}:`, error);
|
|
@@ -67397,9 +67374,9 @@ function stripMarkdownForText(markdown) {
|
|
|
67397
67374
|
}
|
|
67398
67375
|
|
|
67399
67376
|
// src/lib/atproto.ts
|
|
67400
|
-
async function
|
|
67377
|
+
async function fileExists(filePath) {
|
|
67401
67378
|
try {
|
|
67402
|
-
await
|
|
67379
|
+
await fs2.access(filePath);
|
|
67403
67380
|
return true;
|
|
67404
67381
|
} catch {
|
|
67405
67382
|
return false;
|
|
@@ -67453,11 +67430,11 @@ async function createAgent(credentials) {
|
|
|
67453
67430
|
return agent;
|
|
67454
67431
|
}
|
|
67455
67432
|
async function uploadImage(agent, imagePath) {
|
|
67456
|
-
if (!await
|
|
67433
|
+
if (!await fileExists(imagePath)) {
|
|
67457
67434
|
return;
|
|
67458
67435
|
}
|
|
67459
67436
|
try {
|
|
67460
|
-
const imageBuffer = await
|
|
67437
|
+
const imageBuffer = await fs2.readFile(imagePath);
|
|
67461
67438
|
const mimeType = $lookup(imagePath) || "application/octet-stream";
|
|
67462
67439
|
const response = await agent.com.atproto.repo.uploadBlob(new Uint8Array(imageBuffer), {
|
|
67463
67440
|
encoding: mimeType
|
|
@@ -67476,22 +67453,22 @@ async function uploadImage(agent, imagePath) {
|
|
|
67476
67453
|
}
|
|
67477
67454
|
}
|
|
67478
67455
|
async function resolveImagePath(ogImage, imagesDir, contentDir) {
|
|
67479
|
-
const filename =
|
|
67456
|
+
const filename = path3.basename(ogImage);
|
|
67480
67457
|
if (imagesDir) {
|
|
67481
|
-
const imagePath =
|
|
67482
|
-
if (await
|
|
67483
|
-
const stat2 = await
|
|
67458
|
+
const imagePath = path3.join(imagesDir, filename);
|
|
67459
|
+
if (await fileExists(imagePath)) {
|
|
67460
|
+
const stat2 = await fs2.stat(imagePath);
|
|
67484
67461
|
if (stat2.size > 0) {
|
|
67485
67462
|
return imagePath;
|
|
67486
67463
|
}
|
|
67487
67464
|
}
|
|
67488
67465
|
}
|
|
67489
|
-
if (
|
|
67466
|
+
if (path3.isAbsolute(ogImage)) {
|
|
67490
67467
|
return ogImage;
|
|
67491
67468
|
}
|
|
67492
|
-
const contentRelative =
|
|
67493
|
-
if (await
|
|
67494
|
-
const stat2 = await
|
|
67469
|
+
const contentRelative = path3.join(contentDir, ogImage);
|
|
67470
|
+
if (await fileExists(contentRelative)) {
|
|
67471
|
+
const stat2 = await fs2.stat(contentRelative);
|
|
67495
67472
|
if (stat2.size > 0) {
|
|
67496
67473
|
return contentRelative;
|
|
67497
67474
|
}
|
|
@@ -67501,8 +67478,13 @@ async function resolveImagePath(ogImage, imagesDir, contentDir) {
|
|
|
67501
67478
|
async function createDocument(agent, post, config, coverImage) {
|
|
67502
67479
|
const pathPrefix = config.pathPrefix || "/posts";
|
|
67503
67480
|
const postPath = `${pathPrefix}/${post.slug}`;
|
|
67504
|
-
const textContent = stripMarkdownForText(post.content);
|
|
67505
67481
|
const publishDate = new Date(post.frontmatter.publishDate);
|
|
67482
|
+
let textContent;
|
|
67483
|
+
if (config.textContentField && post.rawFrontmatter?.[config.textContentField]) {
|
|
67484
|
+
textContent = String(post.rawFrontmatter[config.textContentField]);
|
|
67485
|
+
} else {
|
|
67486
|
+
textContent = stripMarkdownForText(post.content);
|
|
67487
|
+
}
|
|
67506
67488
|
const record = {
|
|
67507
67489
|
$type: "site.standard.document",
|
|
67508
67490
|
title: post.frontmatter.title,
|
|
@@ -67512,6 +67494,9 @@ async function createDocument(agent, post, config, coverImage) {
|
|
|
67512
67494
|
publishedAt: publishDate.toISOString(),
|
|
67513
67495
|
canonicalUrl: `${config.siteUrl}${postPath}`
|
|
67514
67496
|
};
|
|
67497
|
+
if (post.frontmatter.description) {
|
|
67498
|
+
record.description = post.frontmatter.description;
|
|
67499
|
+
}
|
|
67515
67500
|
if (coverImage) {
|
|
67516
67501
|
record.coverImage = coverImage;
|
|
67517
67502
|
}
|
|
@@ -67533,8 +67518,13 @@ async function updateDocument(agent, post, atUri, config, coverImage) {
|
|
|
67533
67518
|
const [, , collection, rkey] = uriMatch;
|
|
67534
67519
|
const pathPrefix = config.pathPrefix || "/posts";
|
|
67535
67520
|
const postPath = `${pathPrefix}/${post.slug}`;
|
|
67536
|
-
const textContent = stripMarkdownForText(post.content);
|
|
67537
67521
|
const publishDate = new Date(post.frontmatter.publishDate);
|
|
67522
|
+
let textContent;
|
|
67523
|
+
if (config.textContentField && post.rawFrontmatter?.[config.textContentField]) {
|
|
67524
|
+
textContent = String(post.rawFrontmatter[config.textContentField]);
|
|
67525
|
+
} else {
|
|
67526
|
+
textContent = stripMarkdownForText(post.content);
|
|
67527
|
+
}
|
|
67538
67528
|
const record = {
|
|
67539
67529
|
$type: "site.standard.document",
|
|
67540
67530
|
title: post.frontmatter.title,
|
|
@@ -67544,6 +67534,9 @@ async function updateDocument(agent, post, atUri, config, coverImage) {
|
|
|
67544
67534
|
publishedAt: publishDate.toISOString(),
|
|
67545
67535
|
canonicalUrl: `${config.siteUrl}${postPath}`
|
|
67546
67536
|
};
|
|
67537
|
+
if (post.frontmatter.description) {
|
|
67538
|
+
record.description = post.frontmatter.description;
|
|
67539
|
+
}
|
|
67547
67540
|
if (coverImage) {
|
|
67548
67541
|
record.coverImage = coverImage;
|
|
67549
67542
|
}
|
|
@@ -67634,12 +67627,12 @@ function truncateToGraphemes(str, maxGraphemes) {
|
|
|
67634
67627
|
const segments = [...segmenter.segment(str)];
|
|
67635
67628
|
if (segments.length <= maxGraphemes)
|
|
67636
67629
|
return str;
|
|
67637
|
-
return segments.slice(0, maxGraphemes - 3).map((s) => s.segment).join("")
|
|
67630
|
+
return `${segments.slice(0, maxGraphemes - 3).map((s) => s.segment).join("")}...`;
|
|
67638
67631
|
}
|
|
67639
67632
|
const chars = [...str];
|
|
67640
67633
|
if (chars.length <= maxGraphemes)
|
|
67641
67634
|
return str;
|
|
67642
|
-
return chars.slice(0, maxGraphemes - 3).join("")
|
|
67635
|
+
return `${chars.slice(0, maxGraphemes - 3).join("")}...`;
|
|
67643
67636
|
}
|
|
67644
67637
|
async function createBlueskyPost(agent, options) {
|
|
67645
67638
|
const { title, description, canonicalUrl, coverImage, publishedAt } = options;
|
|
@@ -67745,6 +67738,107 @@ async function addBskyPostRefToDocument(agent, documentAtUri, bskyPostRef) {
|
|
|
67745
67738
|
});
|
|
67746
67739
|
}
|
|
67747
67740
|
|
|
67741
|
+
// src/lib/credentials.ts
|
|
67742
|
+
import * as fs3 from "node:fs/promises";
|
|
67743
|
+
import * as os2 from "node:os";
|
|
67744
|
+
import * as path4 from "node:path";
|
|
67745
|
+
var CONFIG_DIR = path4.join(os2.homedir(), ".config", "sequoia");
|
|
67746
|
+
var CREDENTIALS_FILE = path4.join(CONFIG_DIR, "credentials.json");
|
|
67747
|
+
async function fileExists2(filePath) {
|
|
67748
|
+
try {
|
|
67749
|
+
await fs3.access(filePath);
|
|
67750
|
+
return true;
|
|
67751
|
+
} catch {
|
|
67752
|
+
return false;
|
|
67753
|
+
}
|
|
67754
|
+
}
|
|
67755
|
+
async function loadCredentialsStore() {
|
|
67756
|
+
if (!await fileExists2(CREDENTIALS_FILE)) {
|
|
67757
|
+
return {};
|
|
67758
|
+
}
|
|
67759
|
+
try {
|
|
67760
|
+
const content = await fs3.readFile(CREDENTIALS_FILE, "utf-8");
|
|
67761
|
+
const parsed = JSON.parse(content);
|
|
67762
|
+
if (parsed.identifier && parsed.password) {
|
|
67763
|
+
const legacy = parsed;
|
|
67764
|
+
return { [legacy.identifier]: legacy };
|
|
67765
|
+
}
|
|
67766
|
+
return parsed;
|
|
67767
|
+
} catch {
|
|
67768
|
+
return {};
|
|
67769
|
+
}
|
|
67770
|
+
}
|
|
67771
|
+
async function saveCredentialsStore(store) {
|
|
67772
|
+
await fs3.mkdir(CONFIG_DIR, { recursive: true });
|
|
67773
|
+
await fs3.writeFile(CREDENTIALS_FILE, JSON.stringify(store, null, 2));
|
|
67774
|
+
await fs3.chmod(CREDENTIALS_FILE, 384);
|
|
67775
|
+
}
|
|
67776
|
+
async function loadCredentials(projectIdentity) {
|
|
67777
|
+
const envIdentifier = process.env.ATP_IDENTIFIER;
|
|
67778
|
+
const envPassword = process.env.ATP_APP_PASSWORD;
|
|
67779
|
+
const envPdsUrl = process.env.PDS_URL;
|
|
67780
|
+
if (envIdentifier && envPassword) {
|
|
67781
|
+
return {
|
|
67782
|
+
identifier: envIdentifier,
|
|
67783
|
+
password: envPassword,
|
|
67784
|
+
pdsUrl: envPdsUrl || "https://bsky.social"
|
|
67785
|
+
};
|
|
67786
|
+
}
|
|
67787
|
+
const store = await loadCredentialsStore();
|
|
67788
|
+
const identifiers = Object.keys(store);
|
|
67789
|
+
if (identifiers.length === 0) {
|
|
67790
|
+
return null;
|
|
67791
|
+
}
|
|
67792
|
+
const profileEnv = process.env.SEQUOIA_PROFILE;
|
|
67793
|
+
if (profileEnv && store[profileEnv]) {
|
|
67794
|
+
return store[profileEnv];
|
|
67795
|
+
}
|
|
67796
|
+
if (projectIdentity && store[projectIdentity]) {
|
|
67797
|
+
return store[projectIdentity];
|
|
67798
|
+
}
|
|
67799
|
+
if (identifiers.length === 1 && identifiers[0]) {
|
|
67800
|
+
return store[identifiers[0]] ?? null;
|
|
67801
|
+
}
|
|
67802
|
+
return null;
|
|
67803
|
+
}
|
|
67804
|
+
async function getCredentials(identifier) {
|
|
67805
|
+
const store = await loadCredentialsStore();
|
|
67806
|
+
return store[identifier] || null;
|
|
67807
|
+
}
|
|
67808
|
+
async function listCredentials() {
|
|
67809
|
+
const store = await loadCredentialsStore();
|
|
67810
|
+
return Object.keys(store);
|
|
67811
|
+
}
|
|
67812
|
+
async function saveCredentials(credentials) {
|
|
67813
|
+
const store = await loadCredentialsStore();
|
|
67814
|
+
store[credentials.identifier] = credentials;
|
|
67815
|
+
await saveCredentialsStore(store);
|
|
67816
|
+
}
|
|
67817
|
+
async function deleteCredentials(identifier) {
|
|
67818
|
+
const store = await loadCredentialsStore();
|
|
67819
|
+
const identifiers = Object.keys(store);
|
|
67820
|
+
if (identifiers.length === 0) {
|
|
67821
|
+
return false;
|
|
67822
|
+
}
|
|
67823
|
+
if (identifier) {
|
|
67824
|
+
if (!store[identifier]) {
|
|
67825
|
+
return false;
|
|
67826
|
+
}
|
|
67827
|
+
delete store[identifier];
|
|
67828
|
+
await saveCredentialsStore(store);
|
|
67829
|
+
return true;
|
|
67830
|
+
}
|
|
67831
|
+
if (identifiers.length === 1 && identifiers[0]) {
|
|
67832
|
+
delete store[identifiers[0]];
|
|
67833
|
+
await saveCredentialsStore(store);
|
|
67834
|
+
return true;
|
|
67835
|
+
}
|
|
67836
|
+
return false;
|
|
67837
|
+
}
|
|
67838
|
+
function getCredentialsPath() {
|
|
67839
|
+
return CREDENTIALS_FILE;
|
|
67840
|
+
}
|
|
67841
|
+
|
|
67748
67842
|
// src/lib/prompts.ts
|
|
67749
67843
|
function exitOnCancel(value) {
|
|
67750
67844
|
if (Ct(value)) {
|
|
@@ -67877,12 +67971,12 @@ var authCommand = import_cmd_ts.command({
|
|
|
67877
67971
|
|
|
67878
67972
|
// src/commands/init.ts
|
|
67879
67973
|
var import_cmd_ts2 = __toESM(require_cjs(), 1);
|
|
67880
|
-
import * as fs5 from "fs/promises";
|
|
67881
|
-
import * as path6 from "path";
|
|
67974
|
+
import * as fs5 from "node:fs/promises";
|
|
67975
|
+
import * as path6 from "node:path";
|
|
67882
67976
|
|
|
67883
67977
|
// src/lib/config.ts
|
|
67884
|
-
import * as fs4 from "fs/promises";
|
|
67885
|
-
import * as path5 from "path";
|
|
67978
|
+
import * as fs4 from "node:fs/promises";
|
|
67979
|
+
import * as path5 from "node:path";
|
|
67886
67980
|
var CONFIG_FILENAME = "sequoia.json";
|
|
67887
67981
|
var STATE_FILENAME = ".sequoia-state.json";
|
|
67888
67982
|
async function fileExists3(filePath) {
|
|
@@ -67956,6 +68050,12 @@ function generateConfigTemplate(options) {
|
|
|
67956
68050
|
if (options.ignore && options.ignore.length > 0) {
|
|
67957
68051
|
config.ignore = options.ignore;
|
|
67958
68052
|
}
|
|
68053
|
+
if (options.removeIndexFromSlug) {
|
|
68054
|
+
config.removeIndexFromSlug = options.removeIndexFromSlug;
|
|
68055
|
+
}
|
|
68056
|
+
if (options.textContentField) {
|
|
68057
|
+
config.textContentField = options.textContentField;
|
|
68058
|
+
}
|
|
67959
68059
|
if (options.bluesky) {
|
|
67960
68060
|
config.bluesky = options.bluesky;
|
|
67961
68061
|
}
|
|
@@ -68118,7 +68218,7 @@ var initCommand = import_cmd_ts2.command({
|
|
|
68118
68218
|
try {
|
|
68119
68219
|
agent = await createAgent(credentials);
|
|
68120
68220
|
s.stop("Connected!");
|
|
68121
|
-
} catch (
|
|
68221
|
+
} catch (_error) {
|
|
68122
68222
|
s.stop("Failed to connect");
|
|
68123
68223
|
R2.error("Failed to connect. Check your credentials with 'sequoia auth'.");
|
|
68124
68224
|
process.exit(1);
|
|
@@ -68189,7 +68289,7 @@ var initCommand = import_cmd_ts2.command({
|
|
|
68189
68289
|
placeholder: "7",
|
|
68190
68290
|
validate: (value) => {
|
|
68191
68291
|
const num = parseInt(value, 10);
|
|
68192
|
-
if (isNaN(num) || num < 1) {
|
|
68292
|
+
if (Number.isNaN(num) || num < 1) {
|
|
68193
68293
|
return "Please enter a positive number";
|
|
68194
68294
|
}
|
|
68195
68295
|
}
|
|
@@ -68232,7 +68332,7 @@ var initCommand = import_cmd_ts2.command({
|
|
|
68232
68332
|
if (await fileExists4(gitignorePath)) {
|
|
68233
68333
|
const gitignoreContent = await fs5.readFile(gitignorePath, "utf-8");
|
|
68234
68334
|
if (!gitignoreContent.includes(stateFilename)) {
|
|
68235
|
-
await fs5.writeFile(gitignorePath, gitignoreContent
|
|
68335
|
+
await fs5.writeFile(gitignorePath, `${gitignoreContent}
|
|
68236
68336
|
${stateFilename}
|
|
68237
68337
|
`);
|
|
68238
68338
|
R2.info(`Added ${stateFilename} to .gitignore`);
|
|
@@ -68251,8 +68351,8 @@ ${stateFilename}
|
|
|
68251
68351
|
|
|
68252
68352
|
// src/commands/inject.ts
|
|
68253
68353
|
var import_cmd_ts3 = __toESM(require_cjs(), 1);
|
|
68254
|
-
import * as fs6 from "fs/promises";
|
|
68255
|
-
import * as path7 from "path";
|
|
68354
|
+
import * as fs6 from "node:fs/promises";
|
|
68355
|
+
import * as path7 from "node:path";
|
|
68256
68356
|
var injectCommand = import_cmd_ts3.command({
|
|
68257
68357
|
name: "inject",
|
|
68258
68358
|
description: "Inject site.standard.document link tags into built HTML files",
|
|
@@ -68281,38 +68381,24 @@ var injectCommand = import_cmd_ts3.command({
|
|
|
68281
68381
|
const resolvedOutputDir = path7.isAbsolute(outputDir) ? outputDir : path7.join(configDir, outputDir);
|
|
68282
68382
|
R2.info(`Scanning for HTML files in: ${resolvedOutputDir}`);
|
|
68283
68383
|
const state = await loadState(configDir);
|
|
68284
|
-
const
|
|
68285
|
-
"+page",
|
|
68286
|
-
"index",
|
|
68287
|
-
"_index",
|
|
68288
|
-
"page",
|
|
68289
|
-
"readme"
|
|
68290
|
-
]);
|
|
68291
|
-
const pathToAtUri = new Map;
|
|
68384
|
+
const slugToAtUri = new Map;
|
|
68292
68385
|
for (const [filePath, postState] of Object.entries(state.posts)) {
|
|
68293
|
-
if (postState.atUri) {
|
|
68294
|
-
|
|
68295
|
-
|
|
68296
|
-
|
|
68297
|
-
|
|
68298
|
-
const slug = pathParts[pathParts.length - 2];
|
|
68299
|
-
if (slug && slug !== "." && slug !== "content" && slug !== "routes" && slug !== "src") {
|
|
68300
|
-
basename4 = slug;
|
|
68301
|
-
}
|
|
68302
|
-
}
|
|
68303
|
-
}
|
|
68304
|
-
pathToAtUri.set(basename4, postState.atUri);
|
|
68305
|
-
const dirName = path7.basename(path7.dirname(filePath));
|
|
68306
|
-
if (dirName !== "." && dirName !== "content" && !(dirName.startsWith("(") && dirName.endsWith(")"))) {
|
|
68307
|
-
pathToAtUri.set(`${dirName}/${basename4}`, postState.atUri);
|
|
68386
|
+
if (postState.atUri && postState.slug) {
|
|
68387
|
+
slugToAtUri.set(postState.slug, postState.atUri);
|
|
68388
|
+
const lastSegment = postState.slug.split("/").pop();
|
|
68389
|
+
if (lastSegment && lastSegment !== postState.slug) {
|
|
68390
|
+
slugToAtUri.set(lastSegment, postState.atUri);
|
|
68308
68391
|
}
|
|
68392
|
+
} else if (postState.atUri) {
|
|
68393
|
+
const basename3 = path7.basename(filePath, path7.extname(filePath));
|
|
68394
|
+
slugToAtUri.set(basename3.toLowerCase(), postState.atUri);
|
|
68309
68395
|
}
|
|
68310
68396
|
}
|
|
68311
|
-
if (
|
|
68397
|
+
if (slugToAtUri.size === 0) {
|
|
68312
68398
|
R2.warn("No published posts found in state. Run 'sequoia publish' first.");
|
|
68313
68399
|
return;
|
|
68314
68400
|
}
|
|
68315
|
-
R2.info(`Found ${
|
|
68401
|
+
R2.info(`Found ${slugToAtUri.size} slug mappings from published posts`);
|
|
68316
68402
|
const htmlFiles = await glob("**/*.html", {
|
|
68317
68403
|
cwd: resolvedOutputDir,
|
|
68318
68404
|
absolute: false
|
|
@@ -68331,19 +68417,16 @@ var injectCommand = import_cmd_ts3.command({
|
|
|
68331
68417
|
const htmlDir = path7.dirname(relativePath);
|
|
68332
68418
|
const htmlBasename = path7.basename(relativePath, ".html");
|
|
68333
68419
|
let atUri;
|
|
68334
|
-
atUri =
|
|
68420
|
+
atUri = slugToAtUri.get(htmlBasename);
|
|
68335
68421
|
if (!atUri && htmlBasename === "index" && htmlDir !== ".") {
|
|
68336
|
-
|
|
68337
|
-
atUri = pathToAtUri.get(slug);
|
|
68422
|
+
atUri = slugToAtUri.get(htmlDir);
|
|
68338
68423
|
if (!atUri) {
|
|
68339
|
-
const
|
|
68340
|
-
|
|
68341
|
-
atUri = pathToAtUri.get(`${path7.basename(parentDir)}/${slug}`);
|
|
68342
|
-
}
|
|
68424
|
+
const lastDir = path7.basename(htmlDir);
|
|
68425
|
+
atUri = slugToAtUri.get(lastDir);
|
|
68343
68426
|
}
|
|
68344
68427
|
}
|
|
68345
68428
|
if (!atUri && htmlDir !== ".") {
|
|
68346
|
-
atUri =
|
|
68429
|
+
atUri = slugToAtUri.get(`${htmlDir}/${htmlBasename}`);
|
|
68347
68430
|
}
|
|
68348
68431
|
if (!atUri) {
|
|
68349
68432
|
skippedCount++;
|
|
@@ -68391,8 +68474,8 @@ Tip: Skipped files had no matching published post. This is normal for non-post p
|
|
|
68391
68474
|
|
|
68392
68475
|
// src/commands/publish.ts
|
|
68393
68476
|
var import_cmd_ts4 = __toESM(require_cjs(), 1);
|
|
68394
|
-
import * as fs7 from "fs/promises";
|
|
68395
|
-
import * as path8 from "path";
|
|
68477
|
+
import * as fs7 from "node:fs/promises";
|
|
68478
|
+
import * as path8 from "node:path";
|
|
68396
68479
|
var publishCommand = import_cmd_ts4.command({
|
|
68397
68480
|
name: "publish",
|
|
68398
68481
|
description: "Publish content to ATProto",
|
|
@@ -68443,7 +68526,12 @@ var publishCommand = import_cmd_ts4.command({
|
|
|
68443
68526
|
const state = await loadState(configDir);
|
|
68444
68527
|
const s = Ie();
|
|
68445
68528
|
s.start("Scanning for posts...");
|
|
68446
|
-
const posts = await scanContentDirectory(contentDir,
|
|
68529
|
+
const posts = await scanContentDirectory(contentDir, {
|
|
68530
|
+
frontmatterMapping: config.frontmatter,
|
|
68531
|
+
ignorePatterns: config.ignore,
|
|
68532
|
+
slugField: config.frontmatter?.slugField,
|
|
68533
|
+
removeIndexFromSlug: config.removeIndexFromSlug
|
|
68534
|
+
});
|
|
68447
68535
|
s.stop(`Found ${posts.length} posts`);
|
|
68448
68536
|
const postsToPublish = [];
|
|
68449
68537
|
const draftPosts = [];
|
|
@@ -68601,6 +68689,7 @@ Dry run complete. No changes made.`);
|
|
|
68601
68689
|
contentHash,
|
|
68602
68690
|
atUri,
|
|
68603
68691
|
lastPublished: new Date().toISOString(),
|
|
68692
|
+
slug: post.slug,
|
|
68604
68693
|
bskyPostRef
|
|
68605
68694
|
};
|
|
68606
68695
|
} catch (error) {
|
|
@@ -68626,8 +68715,8 @@ Dry run complete. No changes made.`);
|
|
|
68626
68715
|
|
|
68627
68716
|
// src/commands/sync.ts
|
|
68628
68717
|
var import_cmd_ts5 = __toESM(require_cjs(), 1);
|
|
68629
|
-
import * as fs8 from "fs/promises";
|
|
68630
|
-
import * as path9 from "path";
|
|
68718
|
+
import * as fs8 from "node:fs/promises";
|
|
68719
|
+
import * as path9 from "node:path";
|
|
68631
68720
|
var syncCommand = import_cmd_ts5.command({
|
|
68632
68721
|
name: "sync",
|
|
68633
68722
|
description: "Sync state from ATProto to restore .sequoia-state.json",
|
|
@@ -68691,18 +68780,24 @@ var syncCommand = import_cmd_ts5.command({
|
|
|
68691
68780
|
}
|
|
68692
68781
|
const contentDir = path9.isAbsolute(config.contentDir) ? config.contentDir : path9.join(configDir, config.contentDir);
|
|
68693
68782
|
s.start("Scanning local content...");
|
|
68694
|
-
const localPosts = await scanContentDirectory(contentDir,
|
|
68783
|
+
const localPosts = await scanContentDirectory(contentDir, {
|
|
68784
|
+
frontmatterMapping: config.frontmatter,
|
|
68785
|
+
ignorePatterns: config.ignore,
|
|
68786
|
+
slugField: config.frontmatter?.slugField,
|
|
68787
|
+
removeIndexFromSlug: config.removeIndexFromSlug
|
|
68788
|
+
});
|
|
68695
68789
|
s.stop(`Found ${localPosts.length} local posts`);
|
|
68790
|
+
const pathPrefix = config.pathPrefix || "/posts";
|
|
68696
68791
|
const postsByPath = new Map;
|
|
68697
68792
|
for (const post of localPosts) {
|
|
68698
|
-
const postPath =
|
|
68793
|
+
const postPath = `${pathPrefix}/${post.slug}`;
|
|
68699
68794
|
postsByPath.set(postPath, post);
|
|
68700
68795
|
}
|
|
68701
68796
|
const state = await loadState(configDir);
|
|
68702
68797
|
const originalPostCount = Object.keys(state.posts).length;
|
|
68703
68798
|
let matchedCount = 0;
|
|
68704
68799
|
let unmatchedCount = 0;
|
|
68705
|
-
|
|
68800
|
+
const frontmatterUpdates = [];
|
|
68706
68801
|
R2.message(`
|
|
68707
68802
|
Matching documents to local files:
|
|
68708
68803
|
`);
|