@usesocial/cli 0.20.1 → 0.21.0
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/CHANGELOG.md +6 -0
- package/README.md +12 -12
- package/dist/index.mjs +138 -118
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -568,7 +568,7 @@ const withOneTrailingSlash = (value) => `${value.replace(/\/+$/, "")}/`;
|
|
|
568
568
|
/** Shared product name and description primitives. */
|
|
569
569
|
const productBrand = {
|
|
570
570
|
description: "A CLI for LinkedIn, Instagram, and X: outreach, posting, and audience insights from any shell.",
|
|
571
|
-
name: "
|
|
571
|
+
name: "@usesocial"
|
|
572
572
|
};
|
|
573
573
|
const brand = {
|
|
574
574
|
description: productBrand.description,
|
|
@@ -14326,7 +14326,7 @@ const linkedinMessageDestination = async (target, get, getInboxId = async () =>
|
|
|
14326
14326
|
};
|
|
14327
14327
|
};
|
|
14328
14328
|
const LinkedinConnectionNote = string().max(200);
|
|
14329
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
14329
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/entity.js
|
|
14330
14330
|
const entityKind = Symbol.for("drizzle:entityKind");
|
|
14331
14331
|
function is(value, type) {
|
|
14332
14332
|
if (!value || typeof value !== "object") return false;
|
|
@@ -14339,7 +14339,7 @@ function is(value, type) {
|
|
|
14339
14339
|
}
|
|
14340
14340
|
return false;
|
|
14341
14341
|
}
|
|
14342
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
14342
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/column.js
|
|
14343
14343
|
var Column = class {
|
|
14344
14344
|
constructor(table, config) {
|
|
14345
14345
|
this.table = table;
|
|
@@ -14388,7 +14388,7 @@ var Column = class {
|
|
|
14388
14388
|
return this.config.generated !== void 0 && this.config.generated.type !== "byDefault";
|
|
14389
14389
|
}
|
|
14390
14390
|
};
|
|
14391
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
14391
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/column-builder.js
|
|
14392
14392
|
var ColumnBuilder = class {
|
|
14393
14393
|
static [entityKind] = "ColumnBuilder";
|
|
14394
14394
|
config;
|
|
@@ -14490,9 +14490,9 @@ var ColumnBuilder = class {
|
|
|
14490
14490
|
this.config.name = name;
|
|
14491
14491
|
}
|
|
14492
14492
|
};
|
|
14493
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
14493
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/table.utils.js
|
|
14494
14494
|
const TableName = Symbol.for("drizzle:Name");
|
|
14495
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
14495
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/foreign-keys.js
|
|
14496
14496
|
var ForeignKeyBuilder = class {
|
|
14497
14497
|
static [entityKind] = "PgForeignKeyBuilder";
|
|
14498
14498
|
/** @internal */
|
|
@@ -14564,15 +14564,15 @@ function foreignKey(config) {
|
|
|
14564
14564
|
}
|
|
14565
14565
|
return new ForeignKeyBuilder(mappedConfig);
|
|
14566
14566
|
}
|
|
14567
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
14567
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/tracing-utils.js
|
|
14568
14568
|
function iife(fn, ...args) {
|
|
14569
14569
|
return fn(...args);
|
|
14570
14570
|
}
|
|
14571
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
14571
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/unique-constraint.js
|
|
14572
14572
|
function uniqueKeyName(table, columns) {
|
|
14573
14573
|
return `${table[TableName]}_${columns.join("_")}_unique`;
|
|
14574
14574
|
}
|
|
14575
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
14575
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/utils/array.js
|
|
14576
14576
|
function parsePgArrayValue(arrayString, startFrom, inQuotes) {
|
|
14577
14577
|
for (let i = startFrom; i < arrayString.length; i++) {
|
|
14578
14578
|
const char = arrayString[i];
|
|
@@ -14633,7 +14633,7 @@ function makePgArray(array) {
|
|
|
14633
14633
|
return `${item}`;
|
|
14634
14634
|
}).join(",")}}`;
|
|
14635
14635
|
}
|
|
14636
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
14636
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/common.js
|
|
14637
14637
|
var PgColumnBuilder = class extends ColumnBuilder {
|
|
14638
14638
|
foreignKeyConfigs = [];
|
|
14639
14639
|
static [entityKind] = "PgColumnBuilder";
|
|
@@ -14804,12 +14804,12 @@ var PgArray = class PgArray extends PgColumn {
|
|
|
14804
14804
|
return makePgArray(a);
|
|
14805
14805
|
}
|
|
14806
14806
|
};
|
|
14807
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
14807
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/enum.js
|
|
14808
14808
|
const isPgEnumSym = Symbol.for("drizzle:isPgEnum");
|
|
14809
14809
|
function isPgEnum(obj) {
|
|
14810
14810
|
return !!obj && typeof obj === "function" && isPgEnumSym in obj && obj[isPgEnumSym] === true;
|
|
14811
14811
|
}
|
|
14812
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
14812
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/subquery.js
|
|
14813
14813
|
var Subquery = class {
|
|
14814
14814
|
static [entityKind] = "Subquery";
|
|
14815
14815
|
constructor(sql, fields, alias, isWith = false, usedTables = []) {
|
|
@@ -14823,13 +14823,13 @@ var Subquery = class {
|
|
|
14823
14823
|
};
|
|
14824
14824
|
}
|
|
14825
14825
|
};
|
|
14826
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
14826
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/tracing.js
|
|
14827
14827
|
const tracer = { startActiveSpan(name, fn) {
|
|
14828
14828
|
return fn();
|
|
14829
14829
|
} };
|
|
14830
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
14830
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/view-common.js
|
|
14831
14831
|
const ViewBaseConfig = Symbol.for("drizzle:ViewBaseConfig");
|
|
14832
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
14832
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/table.js
|
|
14833
14833
|
const Schema = Symbol.for("drizzle:Schema");
|
|
14834
14834
|
const Columns = Symbol.for("drizzle:Columns");
|
|
14835
14835
|
const ExtraConfigColumns = Symbol.for("drizzle:ExtraConfigColumns");
|
|
@@ -14884,7 +14884,7 @@ var Table = class {
|
|
|
14884
14884
|
this[BaseName] = baseName;
|
|
14885
14885
|
}
|
|
14886
14886
|
};
|
|
14887
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
14887
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/sql/sql.js
|
|
14888
14888
|
function isSQLWrapper(value) {
|
|
14889
14889
|
return value !== null && value !== void 0 && typeof value.getSQL === "function";
|
|
14890
14890
|
}
|
|
@@ -15238,7 +15238,7 @@ Table.prototype.getSQL = function() {
|
|
|
15238
15238
|
Subquery.prototype.getSQL = function() {
|
|
15239
15239
|
return new SQL([this]);
|
|
15240
15240
|
};
|
|
15241
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
15241
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/utils.js
|
|
15242
15242
|
function getColumnNameAndConfig(a, b) {
|
|
15243
15243
|
return {
|
|
15244
15244
|
name: typeof a === "string" && a.length > 0 ? a : "",
|
|
@@ -15246,7 +15246,7 @@ function getColumnNameAndConfig(a, b) {
|
|
|
15246
15246
|
};
|
|
15247
15247
|
}
|
|
15248
15248
|
typeof TextDecoder === "undefined" || new TextDecoder();
|
|
15249
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
15249
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/int.common.js
|
|
15250
15250
|
var PgIntColumnBaseBuilder = class extends PgColumnBuilder {
|
|
15251
15251
|
static [entityKind] = "PgIntColumnBaseBuilder";
|
|
15252
15252
|
generatedAlwaysAsIdentity(sequence) {
|
|
@@ -15276,7 +15276,7 @@ var PgIntColumnBaseBuilder = class extends PgColumnBuilder {
|
|
|
15276
15276
|
return this;
|
|
15277
15277
|
}
|
|
15278
15278
|
};
|
|
15279
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
15279
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/bigint.js
|
|
15280
15280
|
var PgBigInt53Builder = class extends PgIntColumnBaseBuilder {
|
|
15281
15281
|
static [entityKind] = "PgBigInt53Builder";
|
|
15282
15282
|
constructor(name) {
|
|
@@ -15321,7 +15321,7 @@ function bigint(a, b) {
|
|
|
15321
15321
|
if (config.mode === "number") return new PgBigInt53Builder(name);
|
|
15322
15322
|
return new PgBigInt64Builder(name);
|
|
15323
15323
|
}
|
|
15324
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
15324
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/bigserial.js
|
|
15325
15325
|
var PgBigSerial53Builder = class extends PgColumnBuilder {
|
|
15326
15326
|
static [entityKind] = "PgBigSerial53Builder";
|
|
15327
15327
|
constructor(name) {
|
|
@@ -15369,7 +15369,7 @@ function bigserial(a, b) {
|
|
|
15369
15369
|
if (config.mode === "number") return new PgBigSerial53Builder(name);
|
|
15370
15370
|
return new PgBigSerial64Builder(name);
|
|
15371
15371
|
}
|
|
15372
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
15372
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/boolean.js
|
|
15373
15373
|
var PgBooleanBuilder = class extends PgColumnBuilder {
|
|
15374
15374
|
static [entityKind] = "PgBooleanBuilder";
|
|
15375
15375
|
constructor(name) {
|
|
@@ -15389,7 +15389,7 @@ var PgBoolean = class extends PgColumn {
|
|
|
15389
15389
|
function boolean(name) {
|
|
15390
15390
|
return new PgBooleanBuilder(name ?? "");
|
|
15391
15391
|
}
|
|
15392
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
15392
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/char.js
|
|
15393
15393
|
var PgCharBuilder = class extends PgColumnBuilder {
|
|
15394
15394
|
static [entityKind] = "PgCharBuilder";
|
|
15395
15395
|
constructor(name, config) {
|
|
@@ -15414,7 +15414,7 @@ function char(a, b = {}) {
|
|
|
15414
15414
|
const { name, config } = getColumnNameAndConfig(a, b);
|
|
15415
15415
|
return new PgCharBuilder(name, config);
|
|
15416
15416
|
}
|
|
15417
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
15417
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/cidr.js
|
|
15418
15418
|
var PgCidrBuilder = class extends PgColumnBuilder {
|
|
15419
15419
|
static [entityKind] = "PgCidrBuilder";
|
|
15420
15420
|
constructor(name) {
|
|
@@ -15434,7 +15434,7 @@ var PgCidr = class extends PgColumn {
|
|
|
15434
15434
|
function cidr(name) {
|
|
15435
15435
|
return new PgCidrBuilder(name ?? "");
|
|
15436
15436
|
}
|
|
15437
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
15437
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/custom.js
|
|
15438
15438
|
var PgCustomColumnBuilder = class extends PgColumnBuilder {
|
|
15439
15439
|
static [entityKind] = "PgCustomColumnBuilder";
|
|
15440
15440
|
constructor(name, fieldConfig, customTypeParams) {
|
|
@@ -15474,14 +15474,14 @@ function customType(customTypeParams) {
|
|
|
15474
15474
|
return new PgCustomColumnBuilder(name, config, customTypeParams);
|
|
15475
15475
|
};
|
|
15476
15476
|
}
|
|
15477
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
15477
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/date.common.js
|
|
15478
15478
|
var PgDateColumnBaseBuilder = class extends PgColumnBuilder {
|
|
15479
15479
|
static [entityKind] = "PgDateColumnBaseBuilder";
|
|
15480
15480
|
defaultNow() {
|
|
15481
15481
|
return this.default(sql`now()`);
|
|
15482
15482
|
}
|
|
15483
15483
|
};
|
|
15484
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
15484
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/date.js
|
|
15485
15485
|
var PgDateBuilder = class extends PgDateColumnBaseBuilder {
|
|
15486
15486
|
static [entityKind] = "PgDateBuilder";
|
|
15487
15487
|
constructor(name) {
|
|
@@ -15530,7 +15530,7 @@ function date(a, b) {
|
|
|
15530
15530
|
if (config?.mode === "date") return new PgDateBuilder(name);
|
|
15531
15531
|
return new PgDateStringBuilder(name);
|
|
15532
15532
|
}
|
|
15533
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
15533
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/double-precision.js
|
|
15534
15534
|
var PgDoublePrecisionBuilder = class extends PgColumnBuilder {
|
|
15535
15535
|
static [entityKind] = "PgDoublePrecisionBuilder";
|
|
15536
15536
|
constructor(name) {
|
|
@@ -15554,7 +15554,7 @@ var PgDoublePrecision = class extends PgColumn {
|
|
|
15554
15554
|
function doublePrecision(name) {
|
|
15555
15555
|
return new PgDoublePrecisionBuilder(name ?? "");
|
|
15556
15556
|
}
|
|
15557
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
15557
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/inet.js
|
|
15558
15558
|
var PgInetBuilder = class extends PgColumnBuilder {
|
|
15559
15559
|
static [entityKind] = "PgInetBuilder";
|
|
15560
15560
|
constructor(name) {
|
|
@@ -15574,7 +15574,7 @@ var PgInet = class extends PgColumn {
|
|
|
15574
15574
|
function inet(name) {
|
|
15575
15575
|
return new PgInetBuilder(name ?? "");
|
|
15576
15576
|
}
|
|
15577
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
15577
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/integer.js
|
|
15578
15578
|
var PgIntegerBuilder = class extends PgIntColumnBaseBuilder {
|
|
15579
15579
|
static [entityKind] = "PgIntegerBuilder";
|
|
15580
15580
|
constructor(name) {
|
|
@@ -15598,7 +15598,7 @@ var PgInteger = class extends PgColumn {
|
|
|
15598
15598
|
function integer(name) {
|
|
15599
15599
|
return new PgIntegerBuilder(name ?? "");
|
|
15600
15600
|
}
|
|
15601
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
15601
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/interval.js
|
|
15602
15602
|
var PgIntervalBuilder = class extends PgColumnBuilder {
|
|
15603
15603
|
static [entityKind] = "PgIntervalBuilder";
|
|
15604
15604
|
constructor(name, intervalConfig) {
|
|
@@ -15622,7 +15622,7 @@ function interval(a, b = {}) {
|
|
|
15622
15622
|
const { name, config } = getColumnNameAndConfig(a, b);
|
|
15623
15623
|
return new PgIntervalBuilder(name, config);
|
|
15624
15624
|
}
|
|
15625
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
15625
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/json.js
|
|
15626
15626
|
var PgJsonBuilder = class extends PgColumnBuilder {
|
|
15627
15627
|
static [entityKind] = "PgJsonBuilder";
|
|
15628
15628
|
constructor(name) {
|
|
@@ -15656,7 +15656,7 @@ var PgJson = class extends PgColumn {
|
|
|
15656
15656
|
function json(name) {
|
|
15657
15657
|
return new PgJsonBuilder(name ?? "");
|
|
15658
15658
|
}
|
|
15659
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
15659
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/jsonb.js
|
|
15660
15660
|
var PgJsonbBuilder = class extends PgColumnBuilder {
|
|
15661
15661
|
static [entityKind] = "PgJsonbBuilder";
|
|
15662
15662
|
constructor(name) {
|
|
@@ -15690,7 +15690,7 @@ var PgJsonb = class extends PgColumn {
|
|
|
15690
15690
|
function jsonb(name) {
|
|
15691
15691
|
return new PgJsonbBuilder(name ?? "");
|
|
15692
15692
|
}
|
|
15693
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
15693
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/line.js
|
|
15694
15694
|
var PgLineBuilder = class extends PgColumnBuilder {
|
|
15695
15695
|
static [entityKind] = "PgLineBuilder";
|
|
15696
15696
|
constructor(name) {
|
|
@@ -15750,7 +15750,7 @@ function line(a, b) {
|
|
|
15750
15750
|
if (!config?.mode || config.mode === "tuple") return new PgLineBuilder(name);
|
|
15751
15751
|
return new PgLineABCBuilder(name);
|
|
15752
15752
|
}
|
|
15753
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
15753
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/macaddr.js
|
|
15754
15754
|
var PgMacaddrBuilder = class extends PgColumnBuilder {
|
|
15755
15755
|
static [entityKind] = "PgMacaddrBuilder";
|
|
15756
15756
|
constructor(name) {
|
|
@@ -15770,7 +15770,7 @@ var PgMacaddr = class extends PgColumn {
|
|
|
15770
15770
|
function macaddr(name) {
|
|
15771
15771
|
return new PgMacaddrBuilder(name ?? "");
|
|
15772
15772
|
}
|
|
15773
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
15773
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/macaddr8.js
|
|
15774
15774
|
var PgMacaddr8Builder = class extends PgColumnBuilder {
|
|
15775
15775
|
static [entityKind] = "PgMacaddr8Builder";
|
|
15776
15776
|
constructor(name) {
|
|
@@ -15790,7 +15790,7 @@ var PgMacaddr8 = class extends PgColumn {
|
|
|
15790
15790
|
function macaddr8(name) {
|
|
15791
15791
|
return new PgMacaddr8Builder(name ?? "");
|
|
15792
15792
|
}
|
|
15793
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
15793
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/numeric.js
|
|
15794
15794
|
var PgNumericBuilder = class extends PgColumnBuilder {
|
|
15795
15795
|
static [entityKind] = "PgNumericBuilder";
|
|
15796
15796
|
constructor(name, precision, scale) {
|
|
@@ -15888,7 +15888,7 @@ function numeric(a, b) {
|
|
|
15888
15888
|
const mode = config?.mode;
|
|
15889
15889
|
return mode === "number" ? new PgNumericNumberBuilder(name, config?.precision, config?.scale) : mode === "bigint" ? new PgNumericBigIntBuilder(name, config?.precision, config?.scale) : new PgNumericBuilder(name, config?.precision, config?.scale);
|
|
15890
15890
|
}
|
|
15891
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
15891
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/point.js
|
|
15892
15892
|
var PgPointTupleBuilder = class extends PgColumnBuilder {
|
|
15893
15893
|
static [entityKind] = "PgPointTupleBuilder";
|
|
15894
15894
|
constructor(name) {
|
|
@@ -15949,7 +15949,7 @@ function point(a, b) {
|
|
|
15949
15949
|
if (!config?.mode || config.mode === "tuple") return new PgPointTupleBuilder(name);
|
|
15950
15950
|
return new PgPointObjectBuilder(name);
|
|
15951
15951
|
}
|
|
15952
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
15952
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/postgis_extension/utils.js
|
|
15953
15953
|
function hexToBytes(hex) {
|
|
15954
15954
|
const bytes = [];
|
|
15955
15955
|
for (let c = 0; c < hex.length; c += 2) bytes.push(Number.parseInt(hex.slice(c, c + 2), 16));
|
|
@@ -15981,7 +15981,7 @@ function parseEWKB(hex) {
|
|
|
15981
15981
|
}
|
|
15982
15982
|
throw new Error("Unsupported geometry type");
|
|
15983
15983
|
}
|
|
15984
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
15984
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/postgis_extension/geometry.js
|
|
15985
15985
|
var PgGeometryBuilder = class extends PgColumnBuilder {
|
|
15986
15986
|
static [entityKind] = "PgGeometryBuilder";
|
|
15987
15987
|
constructor(name) {
|
|
@@ -16035,7 +16035,7 @@ function geometry(a, b) {
|
|
|
16035
16035
|
if (!config?.mode || config.mode === "tuple") return new PgGeometryBuilder(name);
|
|
16036
16036
|
return new PgGeometryObjectBuilder(name);
|
|
16037
16037
|
}
|
|
16038
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
16038
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/real.js
|
|
16039
16039
|
var PgRealBuilder = class extends PgColumnBuilder {
|
|
16040
16040
|
static [entityKind] = "PgRealBuilder";
|
|
16041
16041
|
constructor(name, length) {
|
|
@@ -16063,7 +16063,7 @@ var PgReal = class extends PgColumn {
|
|
|
16063
16063
|
function real(name) {
|
|
16064
16064
|
return new PgRealBuilder(name ?? "");
|
|
16065
16065
|
}
|
|
16066
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
16066
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/serial.js
|
|
16067
16067
|
var PgSerialBuilder = class extends PgColumnBuilder {
|
|
16068
16068
|
static [entityKind] = "PgSerialBuilder";
|
|
16069
16069
|
constructor(name) {
|
|
@@ -16085,7 +16085,7 @@ var PgSerial = class extends PgColumn {
|
|
|
16085
16085
|
function serial(name) {
|
|
16086
16086
|
return new PgSerialBuilder(name ?? "");
|
|
16087
16087
|
}
|
|
16088
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
16088
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/smallint.js
|
|
16089
16089
|
var PgSmallIntBuilder = class extends PgIntColumnBaseBuilder {
|
|
16090
16090
|
static [entityKind] = "PgSmallIntBuilder";
|
|
16091
16091
|
constructor(name) {
|
|
@@ -16109,7 +16109,7 @@ var PgSmallInt = class extends PgColumn {
|
|
|
16109
16109
|
function smallint(name) {
|
|
16110
16110
|
return new PgSmallIntBuilder(name ?? "");
|
|
16111
16111
|
}
|
|
16112
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
16112
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/smallserial.js
|
|
16113
16113
|
var PgSmallSerialBuilder = class extends PgColumnBuilder {
|
|
16114
16114
|
static [entityKind] = "PgSmallSerialBuilder";
|
|
16115
16115
|
constructor(name) {
|
|
@@ -16131,7 +16131,7 @@ var PgSmallSerial = class extends PgColumn {
|
|
|
16131
16131
|
function smallserial(name) {
|
|
16132
16132
|
return new PgSmallSerialBuilder(name ?? "");
|
|
16133
16133
|
}
|
|
16134
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
16134
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/text.js
|
|
16135
16135
|
var PgTextBuilder = class extends PgColumnBuilder {
|
|
16136
16136
|
static [entityKind] = "PgTextBuilder";
|
|
16137
16137
|
constructor(name, config) {
|
|
@@ -16154,7 +16154,7 @@ function text$1(a, b = {}) {
|
|
|
16154
16154
|
const { name, config } = getColumnNameAndConfig(a, b);
|
|
16155
16155
|
return new PgTextBuilder(name, config);
|
|
16156
16156
|
}
|
|
16157
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
16157
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/time.js
|
|
16158
16158
|
var PgTimeBuilder = class extends PgDateColumnBaseBuilder {
|
|
16159
16159
|
constructor(name, withTimezone, precision) {
|
|
16160
16160
|
super(name, "string", "PgTime");
|
|
@@ -16186,7 +16186,7 @@ function time(a, b = {}) {
|
|
|
16186
16186
|
const { name, config } = getColumnNameAndConfig(a, b);
|
|
16187
16187
|
return new PgTimeBuilder(name, config.withTimezone ?? false, config.precision);
|
|
16188
16188
|
}
|
|
16189
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
16189
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/timestamp.js
|
|
16190
16190
|
var PgTimestampBuilder = class extends PgDateColumnBaseBuilder {
|
|
16191
16191
|
static [entityKind] = "PgTimestampBuilder";
|
|
16192
16192
|
constructor(name, withTimezone, precision) {
|
|
@@ -16258,7 +16258,7 @@ function timestamp(a, b = {}) {
|
|
|
16258
16258
|
if (config?.mode === "string") return new PgTimestampStringBuilder(name, config.withTimezone ?? false, config.precision);
|
|
16259
16259
|
return new PgTimestampBuilder(name, config?.withTimezone ?? false, config?.precision);
|
|
16260
16260
|
}
|
|
16261
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
16261
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/uuid.js
|
|
16262
16262
|
var PgUUIDBuilder = class extends PgColumnBuilder {
|
|
16263
16263
|
static [entityKind] = "PgUUIDBuilder";
|
|
16264
16264
|
constructor(name) {
|
|
@@ -16284,7 +16284,7 @@ var PgUUID = class extends PgColumn {
|
|
|
16284
16284
|
function uuid(name) {
|
|
16285
16285
|
return new PgUUIDBuilder(name ?? "");
|
|
16286
16286
|
}
|
|
16287
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
16287
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/varchar.js
|
|
16288
16288
|
var PgVarcharBuilder = class extends PgColumnBuilder {
|
|
16289
16289
|
static [entityKind] = "PgVarcharBuilder";
|
|
16290
16290
|
constructor(name, config) {
|
|
@@ -16309,7 +16309,7 @@ function varchar(a, b = {}) {
|
|
|
16309
16309
|
const { name, config } = getColumnNameAndConfig(a, b);
|
|
16310
16310
|
return new PgVarcharBuilder(name, config);
|
|
16311
16311
|
}
|
|
16312
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
16312
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/vector_extension/bit.js
|
|
16313
16313
|
var PgBinaryVectorBuilder = class extends PgColumnBuilder {
|
|
16314
16314
|
static [entityKind] = "PgBinaryVectorBuilder";
|
|
16315
16315
|
constructor(name, config) {
|
|
@@ -16332,7 +16332,7 @@ function bit(a, b) {
|
|
|
16332
16332
|
const { name, config } = getColumnNameAndConfig(a, b);
|
|
16333
16333
|
return new PgBinaryVectorBuilder(name, config);
|
|
16334
16334
|
}
|
|
16335
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
16335
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/vector_extension/halfvec.js
|
|
16336
16336
|
var PgHalfVectorBuilder = class extends PgColumnBuilder {
|
|
16337
16337
|
static [entityKind] = "PgHalfVectorBuilder";
|
|
16338
16338
|
constructor(name, config) {
|
|
@@ -16361,7 +16361,7 @@ function halfvec(a, b) {
|
|
|
16361
16361
|
const { name, config } = getColumnNameAndConfig(a, b);
|
|
16362
16362
|
return new PgHalfVectorBuilder(name, config);
|
|
16363
16363
|
}
|
|
16364
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
16364
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/vector_extension/sparsevec.js
|
|
16365
16365
|
var PgSparseVectorBuilder = class extends PgColumnBuilder {
|
|
16366
16366
|
static [entityKind] = "PgSparseVectorBuilder";
|
|
16367
16367
|
constructor(name, config) {
|
|
@@ -16384,7 +16384,7 @@ function sparsevec(a, b) {
|
|
|
16384
16384
|
const { name, config } = getColumnNameAndConfig(a, b);
|
|
16385
16385
|
return new PgSparseVectorBuilder(name, config);
|
|
16386
16386
|
}
|
|
16387
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
16387
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/vector_extension/vector.js
|
|
16388
16388
|
var PgVectorBuilder = class extends PgColumnBuilder {
|
|
16389
16389
|
static [entityKind] = "PgVectorBuilder";
|
|
16390
16390
|
constructor(name, config) {
|
|
@@ -16413,7 +16413,7 @@ function vector(a, b) {
|
|
|
16413
16413
|
const { name, config } = getColumnNameAndConfig(a, b);
|
|
16414
16414
|
return new PgVectorBuilder(name, config);
|
|
16415
16415
|
}
|
|
16416
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
16416
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/columns/all.js
|
|
16417
16417
|
function getPgColumnBuilders() {
|
|
16418
16418
|
return {
|
|
16419
16419
|
bigint,
|
|
@@ -16450,7 +16450,7 @@ function getPgColumnBuilders() {
|
|
|
16450
16450
|
vector
|
|
16451
16451
|
};
|
|
16452
16452
|
}
|
|
16453
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
16453
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/table.js
|
|
16454
16454
|
const InlineForeignKeys = Symbol.for("drizzle:PgInlineForeignKeys");
|
|
16455
16455
|
const EnableRLS = Symbol.for("drizzle:EnableRLS");
|
|
16456
16456
|
var PgTable = class extends Table {
|
|
@@ -16496,7 +16496,7 @@ function pgTableWithSchema(name, columns, extraConfig, schema, baseName = name)
|
|
|
16496
16496
|
const pgTable = (name, columns, extraConfig) => {
|
|
16497
16497
|
return pgTableWithSchema(name, columns, extraConfig, void 0);
|
|
16498
16498
|
};
|
|
16499
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
16499
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/primary-keys.js
|
|
16500
16500
|
function primaryKey(...config) {
|
|
16501
16501
|
if (config[0].columns) return new PrimaryKeyBuilder(config[0].columns, config[0].name);
|
|
16502
16502
|
return new PrimaryKeyBuilder(config);
|
|
@@ -16529,7 +16529,7 @@ var PrimaryKey = class {
|
|
|
16529
16529
|
return this.name ?? `${this.table[PgTable.Symbol.Name]}_${this.columns.map((column) => column.name).join("_")}_pk`;
|
|
16530
16530
|
}
|
|
16531
16531
|
};
|
|
16532
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
16532
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/checks.js
|
|
16533
16533
|
var CheckBuilder = class {
|
|
16534
16534
|
constructor(name, value) {
|
|
16535
16535
|
this.name = name;
|
|
@@ -16555,7 +16555,7 @@ var Check = class {
|
|
|
16555
16555
|
function check(name, value) {
|
|
16556
16556
|
return new CheckBuilder(name, value);
|
|
16557
16557
|
}
|
|
16558
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
16558
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+05bc982c96526791/node_modules/drizzle-orm/pg-core/indexes.js
|
|
16559
16559
|
var IndexBuilderOn = class {
|
|
16560
16560
|
constructor(unique, name) {
|
|
16561
16561
|
this.unique = unique;
|
|
@@ -16943,11 +16943,7 @@ pgTable("oauthClientResource", {
|
|
|
16943
16943
|
id: text$1("id").primaryKey(),
|
|
16944
16944
|
metadata: jsonb("metadata"),
|
|
16945
16945
|
resourceId: text$1("resourceId").notNull().references(() => oauthResource.identifier, { onDelete: "cascade" })
|
|
16946
|
-
}, (table) => [
|
|
16947
|
-
uniqueIndex("oauthClientResource_clientId_resourceId_key").on(table.clientId, table.resourceId),
|
|
16948
|
-
index("oauthClientResource_clientId_idx").on(table.clientId),
|
|
16949
|
-
index("oauthClientResource_resourceId_idx").on(table.resourceId)
|
|
16950
|
-
]);
|
|
16946
|
+
}, (table) => [uniqueIndex("oauthClientResource_clientId_resourceId_key").on(table.clientId, table.resourceId), index("oauthClientResource_resourceId_idx").on(table.resourceId)]);
|
|
16951
16947
|
pgTable("oauthClientAssertion", {
|
|
16952
16948
|
expiresAt: timestamp("expiresAt", { mode: "date" }).notNull(),
|
|
16953
16949
|
id: text$1("id").primaryKey()
|
|
@@ -17124,7 +17120,6 @@ const webhookSubscriptions = pgTable("webhook_subscriptions", {
|
|
|
17124
17120
|
uniqueIndex("webhook_subscriptions_connection_source_account_key").on(table.connectionId, table.source, table.sourceAccountId),
|
|
17125
17121
|
uniqueIndex("webhook_subscriptions_source_visible_uid_key").on(table.source, table.providerVisibleUID),
|
|
17126
17122
|
uniqueIndex("webhook_subscriptions_ingress_id_key").on(table.ingressId),
|
|
17127
|
-
index("webhook_subscriptions_connection_status_idx").on(table.connectionId, table.status, table.updatedAt),
|
|
17128
17123
|
check("webhook_subscriptions_generation_check", sql`${table.generation} > 0`),
|
|
17129
17124
|
check("webhook_subscriptions_status_check", sqlCheckIn(table.status, WEBHOOK_SUBSCRIPTION_STATUSES))
|
|
17130
17125
|
]);
|
|
@@ -17144,7 +17139,6 @@ pgTable("webhook_operations", {
|
|
|
17144
17139
|
updatedAt: timestamptz("updated_at").notNull().defaultNow().$onUpdate(() => /* @__PURE__ */ new Date())
|
|
17145
17140
|
}, (table) => [
|
|
17146
17141
|
uniqueIndex("webhook_operations_provider_kind_uid_key").on(table.provider, table.kind, table.providerVisibleUID),
|
|
17147
|
-
index("webhook_operations_connection_state_idx").on(table.connectionId, table.state, table.updatedAt),
|
|
17148
17142
|
index("webhook_operations_subscription_idx").on(table.subscriptionId),
|
|
17149
17143
|
check("webhook_operations_generation_check", sql`${table.generation} > 0`),
|
|
17150
17144
|
check("webhook_operations_attempt_count_check", sql`${table.attemptCount} >= 0`),
|
|
@@ -17206,10 +17200,23 @@ pgTable("proxy_call_logs", {
|
|
|
17206
17200
|
index("proxy_call_logs_user_platform_created_idx").on(table.userId, table.platform, table.createdAt.desc()),
|
|
17207
17201
|
index("proxy_call_logs_user_billing_period_idx").on(table.userId, table.createdAt).where(sql`${table.responseStatus} >= 200 and ${table.responseStatus} < 300`),
|
|
17208
17202
|
uniqueIndex("proxy_call_logs_metering_lock_id_key").on(table.meteringLockId).where(sql`${table.meteringLockId} is not null`),
|
|
17209
|
-
index("
|
|
17203
|
+
index("proxy_call_logs_created_at_brin").using("brin", table.createdAt),
|
|
17210
17204
|
check("proxy_call_logs_surface_check", sqlCheckIn(table.surface, PROXY_SURFACES)),
|
|
17211
17205
|
check("proxy_call_logs_cache_status_check", sqlCheckIn(table.cacheStatus, PROXY_CACHE_STATUSES))
|
|
17212
17206
|
]);
|
|
17207
|
+
pgTable("crackedbook_boost_charges", {
|
|
17208
|
+
balanceAfter: integer("balance_after"),
|
|
17209
|
+
consumedAt: timestamptz("consumed_at"),
|
|
17210
|
+
createdAt: timestamptz("created_at").notNull().defaultNow(),
|
|
17211
|
+
idempotencyKey: text$1("idempotency_key").primaryKey(),
|
|
17212
|
+
refundedAt: timestamptz("refunded_at"),
|
|
17213
|
+
resetsAt: timestamptz("resets_at"),
|
|
17214
|
+
userId: text$1("user_id").notNull().references(() => user.id, { onDelete: "cascade" })
|
|
17215
|
+
}, (table) => [
|
|
17216
|
+
index("crackedbook_boost_charges_user_idx").on(table.userId),
|
|
17217
|
+
check("crackedbook_boost_charges_refund_after_consume_check", sql`${table.refundedAt} is null or ${table.consumedAt} is not null`),
|
|
17218
|
+
check("crackedbook_boost_charges_key_length_check", sql`length(${table.idempotencyKey}) between 1 and 200`)
|
|
17219
|
+
]);
|
|
17213
17220
|
pgTable("billing_operation_leases", {
|
|
17214
17221
|
createdAt: timestamptz("created_at").notNull().defaultNow(),
|
|
17215
17222
|
expiresAt: timestamptz("expires_at").notNull(),
|
|
@@ -17232,11 +17239,7 @@ const profiles = pgTable("profiles", {
|
|
|
17232
17239
|
raw: jsonb("raw").$type().notNull().default(sql`'{}'::jsonb`),
|
|
17233
17240
|
updatedAt: timestamptz("updated_at").notNull().defaultNow(),
|
|
17234
17241
|
username: text$1("username")
|
|
17235
|
-
}, (table) => [
|
|
17236
|
-
uniqueIndex("profiles_platform_provider_id_pkey").on(table.platform, table.providerId),
|
|
17237
|
-
index("profiles_platform_username_idx").on(table.platform, table.username),
|
|
17238
|
-
check("profiles_platform_check", sqlCheckIn(table.platform, PLATFORMS))
|
|
17239
|
-
]);
|
|
17242
|
+
}, (table) => [uniqueIndex("profiles_platform_provider_id_pkey").on(table.platform, table.providerId), check("profiles_platform_check", sqlCheckIn(table.platform, PLATFORMS))]);
|
|
17240
17243
|
pgTable("feedback_submissions", {
|
|
17241
17244
|
createdAt: timestamptz("created_at").notNull().defaultNow(),
|
|
17242
17245
|
id: text$1("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
|
|
@@ -17251,7 +17254,7 @@ pgTable("cli_session_grants", {
|
|
|
17251
17254
|
scopeAlias: text$1("scope_alias", { enum: CLI_SCOPE_ALIASES$1 }).notNull(),
|
|
17252
17255
|
sessionId: text$1("session_id").primaryKey().references(() => session.id, { onDelete: "cascade" }),
|
|
17253
17256
|
userId: text$1("user_id").notNull().references(() => user.id, { onDelete: "cascade" })
|
|
17254
|
-
}, (table) => [
|
|
17257
|
+
}, (table) => [check("cli_session_grants_scope_alias_check", sqlCheckIn(table.scopeAlias, CLI_SCOPE_ALIASES$1))]);
|
|
17255
17258
|
pgTable("wrapped", {
|
|
17256
17259
|
billedCredits: integer("billed_credits").notNull().default(0),
|
|
17257
17260
|
createdAt: timestamptz("created_at").notNull().defaultNow(),
|
|
@@ -29526,7 +29529,7 @@ const surfaceURL$1 = (deps, url, options = {}) => {
|
|
|
29526
29529
|
if (options.log ?? true) log(`Open this URL: ${url}`);
|
|
29527
29530
|
};
|
|
29528
29531
|
const accountUsername = (account) => account.username.replace(/^@+/, "");
|
|
29529
|
-
const connectStepInput = (accountId) => {
|
|
29532
|
+
const connectStepInput$1 = (accountId) => {
|
|
29530
29533
|
const base = { platform: LINKEDIN_PLATFORM };
|
|
29531
29534
|
return accountId ? {
|
|
29532
29535
|
...base,
|
|
@@ -29578,7 +29581,7 @@ const connectLinkedinAccount = async (deps, accountId) => {
|
|
|
29578
29581
|
let currentAccountId = accountId;
|
|
29579
29582
|
const surfacedURLs = /* @__PURE__ */ new Set();
|
|
29580
29583
|
while (Date.now() - startedAt < CONNECT_POLL_TIMEOUT_MS$1) {
|
|
29581
|
-
const state = await deps.client.connectStep(connectStepInput(currentAccountId));
|
|
29584
|
+
const state = await deps.client.connectStep(connectStepInput$1(currentAccountId));
|
|
29582
29585
|
currentAccountId = state.accountId;
|
|
29583
29586
|
if (state.status === "connected") return {
|
|
29584
29587
|
account: state.account,
|
|
@@ -31316,7 +31319,7 @@ function createEnv(opts) {
|
|
|
31316
31319
|
} });
|
|
31317
31320
|
}
|
|
31318
31321
|
// package.json
|
|
31319
|
-
var version$1 = "0.
|
|
31322
|
+
var version$1 = "0.21.0";
|
|
31320
31323
|
// src/lib/env.ts
|
|
31321
31324
|
const URLWithTrailingSlash = url().transform(ensureTrailingSlash);
|
|
31322
31325
|
const env = createEnv({
|
|
@@ -42582,26 +42585,11 @@ const LoginUserOutput = object({
|
|
|
42582
42585
|
name: string().nullable(),
|
|
42583
42586
|
phoneNumber: string().nullable()
|
|
42584
42587
|
});
|
|
42585
|
-
const LoginSeatsOutput = object({
|
|
42586
|
-
available: number().int().nonnegative(),
|
|
42587
|
-
total: number().int().nonnegative(),
|
|
42588
|
-
used: number().int().nonnegative()
|
|
42589
|
-
});
|
|
42590
42588
|
const LoginOutput = discriminatedUnion("status", [
|
|
42591
42589
|
object({
|
|
42592
42590
|
capabilities: array(string()),
|
|
42593
|
-
checkoutURL: string(),
|
|
42594
42591
|
nextCommands: array(string()),
|
|
42595
42592
|
scope: ScopeAliasOutput,
|
|
42596
|
-
seats: LoginSeatsOutput,
|
|
42597
|
-
status: literal("pending_billing"),
|
|
42598
|
-
user: LoginUserOutput
|
|
42599
|
-
}),
|
|
42600
|
-
object({
|
|
42601
|
-
capabilities: array(string()),
|
|
42602
|
-
nextCommands: array(string()),
|
|
42603
|
-
scope: ScopeAliasOutput,
|
|
42604
|
-
seats: LoginSeatsOutput,
|
|
42605
42593
|
status: literal("ready"),
|
|
42606
42594
|
user: LoginUserOutput
|
|
42607
42595
|
}),
|
|
@@ -42648,7 +42636,7 @@ const nextCommands = [
|
|
|
42648
42636
|
];
|
|
42649
42637
|
const setupOutputFor = (setup) => ({
|
|
42650
42638
|
...setup,
|
|
42651
|
-
nextCommands
|
|
42639
|
+
nextCommands
|
|
42652
42640
|
});
|
|
42653
42641
|
const deviceExpiredMessage = "Sign-in expired before approval. Run `social account setup` again to restart.";
|
|
42654
42642
|
const scopeUpgradeRequiresReauthorization = "Existing CLI session is read-only. Run `social account logout`, then `social account setup` to approve a new write-capable session.";
|
|
@@ -42750,7 +42738,7 @@ const createLoginCommand = (deps = {}) => {
|
|
|
42750
42738
|
mutates: true,
|
|
42751
42739
|
outputSchema: LoginOutput
|
|
42752
42740
|
}),
|
|
42753
|
-
description: "
|
|
42741
|
+
description: "Sign in to Social before connecting accounts",
|
|
42754
42742
|
name: "setup"
|
|
42755
42743
|
}),
|
|
42756
42744
|
run: async ({ args }) => {
|
|
@@ -43284,6 +43272,7 @@ const AccountConnectStateOutput = discriminatedUnion("status", [
|
|
|
43284
43272
|
platform: _enum(SOCIAL_PLATFORMS),
|
|
43285
43273
|
requiredAction: object({
|
|
43286
43274
|
code: string(),
|
|
43275
|
+
quote: string().optional(),
|
|
43287
43276
|
reason: string()
|
|
43288
43277
|
}).nullable(),
|
|
43289
43278
|
seats: object({
|
|
@@ -43404,7 +43393,7 @@ const PLATFORM_ACCOUNT_LABELS = {
|
|
|
43404
43393
|
const lifecycleConnectContract = writeCLIContract({
|
|
43405
43394
|
hazards: [{
|
|
43406
43395
|
code: "account_connect_billing",
|
|
43407
|
-
message: "
|
|
43396
|
+
message: "A call that would buy a seat without a checkout charges nothing and returns pending_billing with requiredAction purchase_confirmation_required and the price. Get your human's approval, then retry with the returned --account-id and --confirm <requiredAction.quote>."
|
|
43408
43397
|
}],
|
|
43409
43398
|
idField: "accountId",
|
|
43410
43399
|
idempotency: {
|
|
@@ -43442,22 +43431,49 @@ const runConnectOutput = async (deps, connect) => {
|
|
|
43442
43431
|
const result = await connect(lifecycleDepsWithTextLogs(deps));
|
|
43443
43432
|
writeText(deps, `${usernameLabelFor(result.account)} connected!`);
|
|
43444
43433
|
};
|
|
43445
|
-
const isInteractiveConnect = (deps) => deps.isInteractiveTerminal?.() === true;
|
|
43434
|
+
const isInteractiveConnect = (deps, args) => !args.confirm && deps.isInteractiveTerminal?.() === true && deps.isStdinTTY?.() === true;
|
|
43435
|
+
const connectStepInput = (platform, { accountId, confirm }) => ({
|
|
43436
|
+
platform,
|
|
43437
|
+
...accountId && { accountId },
|
|
43438
|
+
...confirm && { confirm }
|
|
43439
|
+
});
|
|
43446
43440
|
/** One retry-safe connect step for a non-TTY caller; the JSON carries its account ID. */
|
|
43447
|
-
const runConnectStep = async (deps, platform,
|
|
43448
|
-
|
|
43449
|
-
|
|
43450
|
-
|
|
43451
|
-
|
|
43452
|
-
|
|
43453
|
-
|
|
43441
|
+
const runConnectStep = async (deps, platform, args) => {
|
|
43442
|
+
await writeOutput(deps, await deps.client.connectStep(connectStepInput(platform, args)));
|
|
43443
|
+
};
|
|
43444
|
+
/** An interactive connect shows each seat price and buys only once the human approves it. */
|
|
43445
|
+
const confirmingPurchase = (deps) => {
|
|
43446
|
+
const connectStep = async (input) => {
|
|
43447
|
+
const state = await deps.client.connectStep(input);
|
|
43448
|
+
const quote = state.status === "pending_billing" ? state.requiredAction : null;
|
|
43449
|
+
if (!quote?.quote) return state;
|
|
43450
|
+
if (!await deps.ui?.confirm({ message: `${quote.reason} Continue?` })) throw new CancelledError();
|
|
43451
|
+
return await connectStep({
|
|
43452
|
+
...input,
|
|
43453
|
+
accountId: state.accountId,
|
|
43454
|
+
confirm: quote.quote
|
|
43455
|
+
});
|
|
43456
|
+
};
|
|
43457
|
+
return {
|
|
43458
|
+
...deps,
|
|
43459
|
+
client: {
|
|
43460
|
+
...deps.client,
|
|
43461
|
+
connectStep
|
|
43462
|
+
}
|
|
43463
|
+
};
|
|
43454
43464
|
};
|
|
43455
43465
|
const AccountIdArgument = string({ error: "Expected a string account ID." });
|
|
43456
43466
|
const createConnectPlatformCommand = (platform, run) => defineCommand({
|
|
43457
|
-
args: {
|
|
43458
|
-
|
|
43459
|
-
|
|
43460
|
-
|
|
43467
|
+
args: {
|
|
43468
|
+
"account-id": {
|
|
43469
|
+
description: "Resume the exact connection returned by a previous call.",
|
|
43470
|
+
type: "string"
|
|
43471
|
+
},
|
|
43472
|
+
confirm: {
|
|
43473
|
+
description: "Approve a seat price: pass the requiredAction.quote a previous call returned.",
|
|
43474
|
+
type: "string"
|
|
43475
|
+
}
|
|
43476
|
+
},
|
|
43461
43477
|
meta: commandMeta({
|
|
43462
43478
|
capability: "write",
|
|
43463
43479
|
contract: lifecycleConnectContract,
|
|
@@ -43468,7 +43484,11 @@ const createConnectPlatformCommand = (platform, run) => defineCommand({
|
|
|
43468
43484
|
run: async ({ args, rawArgs }) => {
|
|
43469
43485
|
if (rawArgs?.includes("--attempt") || rawArgs?.some((arg) => arg.startsWith("--attempt="))) throw new UsageError("--attempt was removed; use --account-id.");
|
|
43470
43486
|
const accountId = AccountIdArgument.safeParse(args["account-id"]);
|
|
43471
|
-
|
|
43487
|
+
const confirm = AccountIdArgument.safeParse(args.confirm);
|
|
43488
|
+
await run({
|
|
43489
|
+
accountId: accountId.success ? accountId.data : void 0,
|
|
43490
|
+
confirm: confirm.success ? confirm.data : void 0
|
|
43491
|
+
});
|
|
43472
43492
|
}
|
|
43473
43493
|
});
|
|
43474
43494
|
const createAccountPlatformCommand = (platform, description, run, options = {}) => defineCommand({
|
|
@@ -43554,30 +43574,30 @@ const createAccountCommand = (deps, accountSetupCommand = setupCommand) => {
|
|
|
43554
43574
|
name: "connect"
|
|
43555
43575
|
},
|
|
43556
43576
|
subCommands: {
|
|
43557
|
-
instagram: createConnectPlatformCommand("instagram", async (
|
|
43558
|
-
if (isInteractiveConnect(deps)) {
|
|
43559
|
-
await runConnectOutput(deps, (connectDeps) => connectInstagramAccount(connectDeps, accountId));
|
|
43577
|
+
instagram: createConnectPlatformCommand("instagram", async (args) => {
|
|
43578
|
+
if (isInteractiveConnect(deps, args)) {
|
|
43579
|
+
await runConnectOutput(confirmingPurchase(deps), (connectDeps) => connectInstagramAccount(connectDeps, args.accountId));
|
|
43560
43580
|
return;
|
|
43561
43581
|
}
|
|
43562
|
-
await runConnectStep(deps, "instagram",
|
|
43582
|
+
await runConnectStep(deps, "instagram", args);
|
|
43563
43583
|
}),
|
|
43564
|
-
linkedin: createConnectPlatformCommand("linkedin", async (
|
|
43565
|
-
if (isInteractiveConnect(deps)) {
|
|
43566
|
-
await runConnectOutput(deps, (connectDeps) => connectLinkedinAccount(connectDeps, accountId));
|
|
43584
|
+
linkedin: createConnectPlatformCommand("linkedin", async (args) => {
|
|
43585
|
+
if (isInteractiveConnect(deps, args)) {
|
|
43586
|
+
await runConnectOutput(confirmingPurchase(deps), (connectDeps) => connectLinkedinAccount(connectDeps, args.accountId));
|
|
43567
43587
|
return;
|
|
43568
43588
|
}
|
|
43569
|
-
await runConnectStep(deps, "linkedin",
|
|
43589
|
+
await runConnectStep(deps, "linkedin", args);
|
|
43570
43590
|
}),
|
|
43571
|
-
x: createConnectPlatformCommand("x", async (
|
|
43572
|
-
if (isInteractiveConnect(deps)) {
|
|
43573
|
-
await runConnectOutput(deps, async (connectDeps) => {
|
|
43574
|
-
const result = await connectXAccount(connectDeps, accountId);
|
|
43591
|
+
x: createConnectPlatformCommand("x", async (args) => {
|
|
43592
|
+
if (isInteractiveConnect(deps, args)) {
|
|
43593
|
+
await runConnectOutput(confirmingPurchase(deps), async (connectDeps) => {
|
|
43594
|
+
const result = await connectXAccount(connectDeps, args.accountId);
|
|
43575
43595
|
if (ae.isError(result)) throwXLifecycleError(result.error);
|
|
43576
43596
|
return result.value;
|
|
43577
43597
|
});
|
|
43578
43598
|
return;
|
|
43579
43599
|
}
|
|
43580
|
-
await runConnectStep(deps, "x",
|
|
43600
|
+
await runConnectStep(deps, "x", args);
|
|
43581
43601
|
})
|
|
43582
43602
|
}
|
|
43583
43603
|
});
|