bopodev-db 0.1.34 → 0.1.35
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/.turbo/turbo-build.log +1 -1
- package/dist/load-migrate-env.d.ts +5 -0
- package/dist/repositories/company-assistant-chat.d.ts +10 -0
- package/dist/repositories/legacy.d.ts +118 -10
- package/dist/schema.d.ts +532 -8
- package/package.json +2 -1
- package/src/load-migrate-env.ts +42 -0
- package/src/migrate.ts +17 -0
- package/src/migrations/0009_agent_issue_permissions.sql +2 -0
- package/src/migrations/0010_agent_lucide_icon.sql +1 -0
- package/src/migrations/0011_plugin_installs.sql +17 -0
- package/src/migrations/meta/_journal.json +21 -0
- package/src/repositories/company-assistant-chat.ts +51 -1
- package/src/repositories/legacy.ts +144 -5
- package/src/schema.ts +28 -5
package/dist/schema.d.ts
CHANGED
|
@@ -914,6 +914,40 @@ export declare const agents: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
914
914
|
identity: undefined;
|
|
915
915
|
generated: undefined;
|
|
916
916
|
}, {}, {}>;
|
|
917
|
+
canAssignAgents: import("drizzle-orm/pg-core").PgColumn<{
|
|
918
|
+
name: "can_assign_agents";
|
|
919
|
+
tableName: "agents";
|
|
920
|
+
dataType: "boolean";
|
|
921
|
+
columnType: "PgBoolean";
|
|
922
|
+
data: boolean;
|
|
923
|
+
driverParam: boolean;
|
|
924
|
+
notNull: true;
|
|
925
|
+
hasDefault: true;
|
|
926
|
+
isPrimaryKey: false;
|
|
927
|
+
isAutoincrement: false;
|
|
928
|
+
hasRuntimeDefault: false;
|
|
929
|
+
enumValues: undefined;
|
|
930
|
+
baseColumn: never;
|
|
931
|
+
identity: undefined;
|
|
932
|
+
generated: undefined;
|
|
933
|
+
}, {}, {}>;
|
|
934
|
+
canCreateIssues: import("drizzle-orm/pg-core").PgColumn<{
|
|
935
|
+
name: "can_create_issues";
|
|
936
|
+
tableName: "agents";
|
|
937
|
+
dataType: "boolean";
|
|
938
|
+
columnType: "PgBoolean";
|
|
939
|
+
data: boolean;
|
|
940
|
+
driverParam: boolean;
|
|
941
|
+
notNull: true;
|
|
942
|
+
hasDefault: true;
|
|
943
|
+
isPrimaryKey: false;
|
|
944
|
+
isAutoincrement: false;
|
|
945
|
+
hasRuntimeDefault: false;
|
|
946
|
+
enumValues: undefined;
|
|
947
|
+
baseColumn: never;
|
|
948
|
+
identity: undefined;
|
|
949
|
+
generated: undefined;
|
|
950
|
+
}, {}, {}>;
|
|
917
951
|
avatarSeed: import("drizzle-orm/pg-core").PgColumn<{
|
|
918
952
|
name: "avatar_seed";
|
|
919
953
|
tableName: "agents";
|
|
@@ -931,6 +965,23 @@ export declare const agents: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
931
965
|
identity: undefined;
|
|
932
966
|
generated: undefined;
|
|
933
967
|
}, {}, {}>;
|
|
968
|
+
lucideIconName: import("drizzle-orm/pg-core").PgColumn<{
|
|
969
|
+
name: "lucide_icon_name";
|
|
970
|
+
tableName: "agents";
|
|
971
|
+
dataType: "string";
|
|
972
|
+
columnType: "PgText";
|
|
973
|
+
data: string;
|
|
974
|
+
driverParam: string;
|
|
975
|
+
notNull: true;
|
|
976
|
+
hasDefault: true;
|
|
977
|
+
isPrimaryKey: false;
|
|
978
|
+
isAutoincrement: false;
|
|
979
|
+
hasRuntimeDefault: false;
|
|
980
|
+
enumValues: [string, ...string[]];
|
|
981
|
+
baseColumn: never;
|
|
982
|
+
identity: undefined;
|
|
983
|
+
generated: undefined;
|
|
984
|
+
}, {}, {}>;
|
|
934
985
|
runtimeCommand: import("drizzle-orm/pg-core").PgColumn<{
|
|
935
986
|
name: "runtime_command";
|
|
936
987
|
tableName: "agents";
|
|
@@ -1397,7 +1448,7 @@ export declare const issues: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
1397
1448
|
identity: undefined;
|
|
1398
1449
|
generated: undefined;
|
|
1399
1450
|
}, {}, {}>;
|
|
1400
|
-
|
|
1451
|
+
routineId: import("drizzle-orm/pg-core").PgColumn<{
|
|
1401
1452
|
name: "loop_id";
|
|
1402
1453
|
tableName: "issues";
|
|
1403
1454
|
dataType: "string";
|
|
@@ -1414,7 +1465,7 @@ export declare const issues: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
1414
1465
|
identity: undefined;
|
|
1415
1466
|
generated: undefined;
|
|
1416
1467
|
}, {}, {}>;
|
|
1417
|
-
|
|
1468
|
+
routineRunId: import("drizzle-orm/pg-core").PgColumn<{
|
|
1418
1469
|
name: "loop_run_id";
|
|
1419
1470
|
tableName: "issues";
|
|
1420
1471
|
dataType: "string";
|
|
@@ -1768,7 +1819,7 @@ export declare const workLoopTriggers: import("drizzle-orm/pg-core").PgTableWith
|
|
|
1768
1819
|
identity: undefined;
|
|
1769
1820
|
generated: undefined;
|
|
1770
1821
|
}, {}, {}>;
|
|
1771
|
-
|
|
1822
|
+
routineId: import("drizzle-orm/pg-core").PgColumn<{
|
|
1772
1823
|
name: "work_loop_id";
|
|
1773
1824
|
tableName: "work_loop_triggers";
|
|
1774
1825
|
dataType: "string";
|
|
@@ -1996,7 +2047,7 @@ export declare const workLoopRuns: import("drizzle-orm/pg-core").PgTableWithColu
|
|
|
1996
2047
|
identity: undefined;
|
|
1997
2048
|
generated: undefined;
|
|
1998
2049
|
}, {}, {}>;
|
|
1999
|
-
|
|
2050
|
+
routineId: import("drizzle-orm/pg-core").PgColumn<{
|
|
2000
2051
|
name: "work_loop_id";
|
|
2001
2052
|
tableName: "work_loop_runs";
|
|
2002
2053
|
dataType: "string";
|
|
@@ -5522,6 +5573,217 @@ export declare const pluginRuns: import("drizzle-orm/pg-core").PgTableWithColumn
|
|
|
5522
5573
|
};
|
|
5523
5574
|
dialect: "pg";
|
|
5524
5575
|
}>;
|
|
5576
|
+
export declare const pluginInstalls: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
5577
|
+
name: "plugin_installs";
|
|
5578
|
+
schema: undefined;
|
|
5579
|
+
columns: {
|
|
5580
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
5581
|
+
name: "id";
|
|
5582
|
+
tableName: "plugin_installs";
|
|
5583
|
+
dataType: "string";
|
|
5584
|
+
columnType: "PgText";
|
|
5585
|
+
data: string;
|
|
5586
|
+
driverParam: string;
|
|
5587
|
+
notNull: true;
|
|
5588
|
+
hasDefault: false;
|
|
5589
|
+
isPrimaryKey: true;
|
|
5590
|
+
isAutoincrement: false;
|
|
5591
|
+
hasRuntimeDefault: false;
|
|
5592
|
+
enumValues: [string, ...string[]];
|
|
5593
|
+
baseColumn: never;
|
|
5594
|
+
identity: undefined;
|
|
5595
|
+
generated: undefined;
|
|
5596
|
+
}, {}, {}>;
|
|
5597
|
+
companyId: import("drizzle-orm/pg-core").PgColumn<{
|
|
5598
|
+
name: "company_id";
|
|
5599
|
+
tableName: "plugin_installs";
|
|
5600
|
+
dataType: "string";
|
|
5601
|
+
columnType: "PgText";
|
|
5602
|
+
data: string;
|
|
5603
|
+
driverParam: string;
|
|
5604
|
+
notNull: true;
|
|
5605
|
+
hasDefault: false;
|
|
5606
|
+
isPrimaryKey: false;
|
|
5607
|
+
isAutoincrement: false;
|
|
5608
|
+
hasRuntimeDefault: false;
|
|
5609
|
+
enumValues: [string, ...string[]];
|
|
5610
|
+
baseColumn: never;
|
|
5611
|
+
identity: undefined;
|
|
5612
|
+
generated: undefined;
|
|
5613
|
+
}, {}, {}>;
|
|
5614
|
+
pluginId: import("drizzle-orm/pg-core").PgColumn<{
|
|
5615
|
+
name: "plugin_id";
|
|
5616
|
+
tableName: "plugin_installs";
|
|
5617
|
+
dataType: "string";
|
|
5618
|
+
columnType: "PgText";
|
|
5619
|
+
data: string;
|
|
5620
|
+
driverParam: string;
|
|
5621
|
+
notNull: true;
|
|
5622
|
+
hasDefault: false;
|
|
5623
|
+
isPrimaryKey: false;
|
|
5624
|
+
isAutoincrement: false;
|
|
5625
|
+
hasRuntimeDefault: false;
|
|
5626
|
+
enumValues: [string, ...string[]];
|
|
5627
|
+
baseColumn: never;
|
|
5628
|
+
identity: undefined;
|
|
5629
|
+
generated: undefined;
|
|
5630
|
+
}, {}, {}>;
|
|
5631
|
+
pluginVersion: import("drizzle-orm/pg-core").PgColumn<{
|
|
5632
|
+
name: "plugin_version";
|
|
5633
|
+
tableName: "plugin_installs";
|
|
5634
|
+
dataType: "string";
|
|
5635
|
+
columnType: "PgText";
|
|
5636
|
+
data: string;
|
|
5637
|
+
driverParam: string;
|
|
5638
|
+
notNull: true;
|
|
5639
|
+
hasDefault: false;
|
|
5640
|
+
isPrimaryKey: false;
|
|
5641
|
+
isAutoincrement: false;
|
|
5642
|
+
hasRuntimeDefault: false;
|
|
5643
|
+
enumValues: [string, ...string[]];
|
|
5644
|
+
baseColumn: never;
|
|
5645
|
+
identity: undefined;
|
|
5646
|
+
generated: undefined;
|
|
5647
|
+
}, {}, {}>;
|
|
5648
|
+
sourceType: import("drizzle-orm/pg-core").PgColumn<{
|
|
5649
|
+
name: "source_type";
|
|
5650
|
+
tableName: "plugin_installs";
|
|
5651
|
+
dataType: "string";
|
|
5652
|
+
columnType: "PgText";
|
|
5653
|
+
data: string;
|
|
5654
|
+
driverParam: string;
|
|
5655
|
+
notNull: true;
|
|
5656
|
+
hasDefault: true;
|
|
5657
|
+
isPrimaryKey: false;
|
|
5658
|
+
isAutoincrement: false;
|
|
5659
|
+
hasRuntimeDefault: false;
|
|
5660
|
+
enumValues: [string, ...string[]];
|
|
5661
|
+
baseColumn: never;
|
|
5662
|
+
identity: undefined;
|
|
5663
|
+
generated: undefined;
|
|
5664
|
+
}, {}, {}>;
|
|
5665
|
+
sourceRef: import("drizzle-orm/pg-core").PgColumn<{
|
|
5666
|
+
name: "source_ref";
|
|
5667
|
+
tableName: "plugin_installs";
|
|
5668
|
+
dataType: "string";
|
|
5669
|
+
columnType: "PgText";
|
|
5670
|
+
data: string;
|
|
5671
|
+
driverParam: string;
|
|
5672
|
+
notNull: false;
|
|
5673
|
+
hasDefault: false;
|
|
5674
|
+
isPrimaryKey: false;
|
|
5675
|
+
isAutoincrement: false;
|
|
5676
|
+
hasRuntimeDefault: false;
|
|
5677
|
+
enumValues: [string, ...string[]];
|
|
5678
|
+
baseColumn: never;
|
|
5679
|
+
identity: undefined;
|
|
5680
|
+
generated: undefined;
|
|
5681
|
+
}, {}, {}>;
|
|
5682
|
+
integrity: import("drizzle-orm/pg-core").PgColumn<{
|
|
5683
|
+
name: "integrity";
|
|
5684
|
+
tableName: "plugin_installs";
|
|
5685
|
+
dataType: "string";
|
|
5686
|
+
columnType: "PgText";
|
|
5687
|
+
data: string;
|
|
5688
|
+
driverParam: string;
|
|
5689
|
+
notNull: false;
|
|
5690
|
+
hasDefault: false;
|
|
5691
|
+
isPrimaryKey: false;
|
|
5692
|
+
isAutoincrement: false;
|
|
5693
|
+
hasRuntimeDefault: false;
|
|
5694
|
+
enumValues: [string, ...string[]];
|
|
5695
|
+
baseColumn: never;
|
|
5696
|
+
identity: undefined;
|
|
5697
|
+
generated: undefined;
|
|
5698
|
+
}, {}, {}>;
|
|
5699
|
+
buildHash: import("drizzle-orm/pg-core").PgColumn<{
|
|
5700
|
+
name: "build_hash";
|
|
5701
|
+
tableName: "plugin_installs";
|
|
5702
|
+
dataType: "string";
|
|
5703
|
+
columnType: "PgText";
|
|
5704
|
+
data: string;
|
|
5705
|
+
driverParam: string;
|
|
5706
|
+
notNull: false;
|
|
5707
|
+
hasDefault: false;
|
|
5708
|
+
isPrimaryKey: false;
|
|
5709
|
+
isAutoincrement: false;
|
|
5710
|
+
hasRuntimeDefault: false;
|
|
5711
|
+
enumValues: [string, ...string[]];
|
|
5712
|
+
baseColumn: never;
|
|
5713
|
+
identity: undefined;
|
|
5714
|
+
generated: undefined;
|
|
5715
|
+
}, {}, {}>;
|
|
5716
|
+
artifactPath: import("drizzle-orm/pg-core").PgColumn<{
|
|
5717
|
+
name: "artifact_path";
|
|
5718
|
+
tableName: "plugin_installs";
|
|
5719
|
+
dataType: "string";
|
|
5720
|
+
columnType: "PgText";
|
|
5721
|
+
data: string;
|
|
5722
|
+
driverParam: string;
|
|
5723
|
+
notNull: false;
|
|
5724
|
+
hasDefault: false;
|
|
5725
|
+
isPrimaryKey: false;
|
|
5726
|
+
isAutoincrement: false;
|
|
5727
|
+
hasRuntimeDefault: false;
|
|
5728
|
+
enumValues: [string, ...string[]];
|
|
5729
|
+
baseColumn: never;
|
|
5730
|
+
identity: undefined;
|
|
5731
|
+
generated: undefined;
|
|
5732
|
+
}, {}, {}>;
|
|
5733
|
+
manifestJson: import("drizzle-orm/pg-core").PgColumn<{
|
|
5734
|
+
name: "manifest_json";
|
|
5735
|
+
tableName: "plugin_installs";
|
|
5736
|
+
dataType: "string";
|
|
5737
|
+
columnType: "PgText";
|
|
5738
|
+
data: string;
|
|
5739
|
+
driverParam: string;
|
|
5740
|
+
notNull: true;
|
|
5741
|
+
hasDefault: true;
|
|
5742
|
+
isPrimaryKey: false;
|
|
5743
|
+
isAutoincrement: false;
|
|
5744
|
+
hasRuntimeDefault: false;
|
|
5745
|
+
enumValues: [string, ...string[]];
|
|
5746
|
+
baseColumn: never;
|
|
5747
|
+
identity: undefined;
|
|
5748
|
+
generated: undefined;
|
|
5749
|
+
}, {}, {}>;
|
|
5750
|
+
status: import("drizzle-orm/pg-core").PgColumn<{
|
|
5751
|
+
name: "status";
|
|
5752
|
+
tableName: "plugin_installs";
|
|
5753
|
+
dataType: "string";
|
|
5754
|
+
columnType: "PgText";
|
|
5755
|
+
data: string;
|
|
5756
|
+
driverParam: string;
|
|
5757
|
+
notNull: true;
|
|
5758
|
+
hasDefault: true;
|
|
5759
|
+
isPrimaryKey: false;
|
|
5760
|
+
isAutoincrement: false;
|
|
5761
|
+
hasRuntimeDefault: false;
|
|
5762
|
+
enumValues: [string, ...string[]];
|
|
5763
|
+
baseColumn: never;
|
|
5764
|
+
identity: undefined;
|
|
5765
|
+
generated: undefined;
|
|
5766
|
+
}, {}, {}>;
|
|
5767
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
5768
|
+
name: "created_at";
|
|
5769
|
+
tableName: "plugin_installs";
|
|
5770
|
+
dataType: "date";
|
|
5771
|
+
columnType: "PgTimestamp";
|
|
5772
|
+
data: Date;
|
|
5773
|
+
driverParam: string;
|
|
5774
|
+
notNull: true;
|
|
5775
|
+
hasDefault: true;
|
|
5776
|
+
isPrimaryKey: false;
|
|
5777
|
+
isAutoincrement: false;
|
|
5778
|
+
hasRuntimeDefault: false;
|
|
5779
|
+
enumValues: undefined;
|
|
5780
|
+
baseColumn: never;
|
|
5781
|
+
identity: undefined;
|
|
5782
|
+
generated: undefined;
|
|
5783
|
+
}, {}, {}>;
|
|
5784
|
+
};
|
|
5785
|
+
dialect: "pg";
|
|
5786
|
+
}>;
|
|
5525
5787
|
export declare const agentIssueLabels: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
5526
5788
|
name: "agent_issue_labels";
|
|
5527
5789
|
schema: undefined;
|
|
@@ -6320,6 +6582,40 @@ export declare const schema: {
|
|
|
6320
6582
|
identity: undefined;
|
|
6321
6583
|
generated: undefined;
|
|
6322
6584
|
}, {}, {}>;
|
|
6585
|
+
canAssignAgents: import("drizzle-orm/pg-core").PgColumn<{
|
|
6586
|
+
name: "can_assign_agents";
|
|
6587
|
+
tableName: "agents";
|
|
6588
|
+
dataType: "boolean";
|
|
6589
|
+
columnType: "PgBoolean";
|
|
6590
|
+
data: boolean;
|
|
6591
|
+
driverParam: boolean;
|
|
6592
|
+
notNull: true;
|
|
6593
|
+
hasDefault: true;
|
|
6594
|
+
isPrimaryKey: false;
|
|
6595
|
+
isAutoincrement: false;
|
|
6596
|
+
hasRuntimeDefault: false;
|
|
6597
|
+
enumValues: undefined;
|
|
6598
|
+
baseColumn: never;
|
|
6599
|
+
identity: undefined;
|
|
6600
|
+
generated: undefined;
|
|
6601
|
+
}, {}, {}>;
|
|
6602
|
+
canCreateIssues: import("drizzle-orm/pg-core").PgColumn<{
|
|
6603
|
+
name: "can_create_issues";
|
|
6604
|
+
tableName: "agents";
|
|
6605
|
+
dataType: "boolean";
|
|
6606
|
+
columnType: "PgBoolean";
|
|
6607
|
+
data: boolean;
|
|
6608
|
+
driverParam: boolean;
|
|
6609
|
+
notNull: true;
|
|
6610
|
+
hasDefault: true;
|
|
6611
|
+
isPrimaryKey: false;
|
|
6612
|
+
isAutoincrement: false;
|
|
6613
|
+
hasRuntimeDefault: false;
|
|
6614
|
+
enumValues: undefined;
|
|
6615
|
+
baseColumn: never;
|
|
6616
|
+
identity: undefined;
|
|
6617
|
+
generated: undefined;
|
|
6618
|
+
}, {}, {}>;
|
|
6323
6619
|
avatarSeed: import("drizzle-orm/pg-core").PgColumn<{
|
|
6324
6620
|
name: "avatar_seed";
|
|
6325
6621
|
tableName: "agents";
|
|
@@ -6337,6 +6633,23 @@ export declare const schema: {
|
|
|
6337
6633
|
identity: undefined;
|
|
6338
6634
|
generated: undefined;
|
|
6339
6635
|
}, {}, {}>;
|
|
6636
|
+
lucideIconName: import("drizzle-orm/pg-core").PgColumn<{
|
|
6637
|
+
name: "lucide_icon_name";
|
|
6638
|
+
tableName: "agents";
|
|
6639
|
+
dataType: "string";
|
|
6640
|
+
columnType: "PgText";
|
|
6641
|
+
data: string;
|
|
6642
|
+
driverParam: string;
|
|
6643
|
+
notNull: true;
|
|
6644
|
+
hasDefault: true;
|
|
6645
|
+
isPrimaryKey: false;
|
|
6646
|
+
isAutoincrement: false;
|
|
6647
|
+
hasRuntimeDefault: false;
|
|
6648
|
+
enumValues: [string, ...string[]];
|
|
6649
|
+
baseColumn: never;
|
|
6650
|
+
identity: undefined;
|
|
6651
|
+
generated: undefined;
|
|
6652
|
+
}, {}, {}>;
|
|
6340
6653
|
runtimeCommand: import("drizzle-orm/pg-core").PgColumn<{
|
|
6341
6654
|
name: "runtime_command";
|
|
6342
6655
|
tableName: "agents";
|
|
@@ -6803,7 +7116,7 @@ export declare const schema: {
|
|
|
6803
7116
|
identity: undefined;
|
|
6804
7117
|
generated: undefined;
|
|
6805
7118
|
}, {}, {}>;
|
|
6806
|
-
|
|
7119
|
+
routineId: import("drizzle-orm/pg-core").PgColumn<{
|
|
6807
7120
|
name: "loop_id";
|
|
6808
7121
|
tableName: "issues";
|
|
6809
7122
|
dataType: "string";
|
|
@@ -6820,7 +7133,7 @@ export declare const schema: {
|
|
|
6820
7133
|
identity: undefined;
|
|
6821
7134
|
generated: undefined;
|
|
6822
7135
|
}, {}, {}>;
|
|
6823
|
-
|
|
7136
|
+
routineRunId: import("drizzle-orm/pg-core").PgColumn<{
|
|
6824
7137
|
name: "loop_run_id";
|
|
6825
7138
|
tableName: "issues";
|
|
6826
7139
|
dataType: "string";
|
|
@@ -7174,7 +7487,7 @@ export declare const schema: {
|
|
|
7174
7487
|
identity: undefined;
|
|
7175
7488
|
generated: undefined;
|
|
7176
7489
|
}, {}, {}>;
|
|
7177
|
-
|
|
7490
|
+
routineId: import("drizzle-orm/pg-core").PgColumn<{
|
|
7178
7491
|
name: "work_loop_id";
|
|
7179
7492
|
tableName: "work_loop_triggers";
|
|
7180
7493
|
dataType: "string";
|
|
@@ -7402,7 +7715,7 @@ export declare const schema: {
|
|
|
7402
7715
|
identity: undefined;
|
|
7403
7716
|
generated: undefined;
|
|
7404
7717
|
}, {}, {}>;
|
|
7405
|
-
|
|
7718
|
+
routineId: import("drizzle-orm/pg-core").PgColumn<{
|
|
7406
7719
|
name: "work_loop_id";
|
|
7407
7720
|
tableName: "work_loop_runs";
|
|
7408
7721
|
dataType: "string";
|
|
@@ -10281,6 +10594,217 @@ export declare const schema: {
|
|
|
10281
10594
|
};
|
|
10282
10595
|
dialect: "pg";
|
|
10283
10596
|
}>;
|
|
10597
|
+
pluginInstalls: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
10598
|
+
name: "plugin_installs";
|
|
10599
|
+
schema: undefined;
|
|
10600
|
+
columns: {
|
|
10601
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
10602
|
+
name: "id";
|
|
10603
|
+
tableName: "plugin_installs";
|
|
10604
|
+
dataType: "string";
|
|
10605
|
+
columnType: "PgText";
|
|
10606
|
+
data: string;
|
|
10607
|
+
driverParam: string;
|
|
10608
|
+
notNull: true;
|
|
10609
|
+
hasDefault: false;
|
|
10610
|
+
isPrimaryKey: true;
|
|
10611
|
+
isAutoincrement: false;
|
|
10612
|
+
hasRuntimeDefault: false;
|
|
10613
|
+
enumValues: [string, ...string[]];
|
|
10614
|
+
baseColumn: never;
|
|
10615
|
+
identity: undefined;
|
|
10616
|
+
generated: undefined;
|
|
10617
|
+
}, {}, {}>;
|
|
10618
|
+
companyId: import("drizzle-orm/pg-core").PgColumn<{
|
|
10619
|
+
name: "company_id";
|
|
10620
|
+
tableName: "plugin_installs";
|
|
10621
|
+
dataType: "string";
|
|
10622
|
+
columnType: "PgText";
|
|
10623
|
+
data: string;
|
|
10624
|
+
driverParam: string;
|
|
10625
|
+
notNull: true;
|
|
10626
|
+
hasDefault: false;
|
|
10627
|
+
isPrimaryKey: false;
|
|
10628
|
+
isAutoincrement: false;
|
|
10629
|
+
hasRuntimeDefault: false;
|
|
10630
|
+
enumValues: [string, ...string[]];
|
|
10631
|
+
baseColumn: never;
|
|
10632
|
+
identity: undefined;
|
|
10633
|
+
generated: undefined;
|
|
10634
|
+
}, {}, {}>;
|
|
10635
|
+
pluginId: import("drizzle-orm/pg-core").PgColumn<{
|
|
10636
|
+
name: "plugin_id";
|
|
10637
|
+
tableName: "plugin_installs";
|
|
10638
|
+
dataType: "string";
|
|
10639
|
+
columnType: "PgText";
|
|
10640
|
+
data: string;
|
|
10641
|
+
driverParam: string;
|
|
10642
|
+
notNull: true;
|
|
10643
|
+
hasDefault: false;
|
|
10644
|
+
isPrimaryKey: false;
|
|
10645
|
+
isAutoincrement: false;
|
|
10646
|
+
hasRuntimeDefault: false;
|
|
10647
|
+
enumValues: [string, ...string[]];
|
|
10648
|
+
baseColumn: never;
|
|
10649
|
+
identity: undefined;
|
|
10650
|
+
generated: undefined;
|
|
10651
|
+
}, {}, {}>;
|
|
10652
|
+
pluginVersion: import("drizzle-orm/pg-core").PgColumn<{
|
|
10653
|
+
name: "plugin_version";
|
|
10654
|
+
tableName: "plugin_installs";
|
|
10655
|
+
dataType: "string";
|
|
10656
|
+
columnType: "PgText";
|
|
10657
|
+
data: string;
|
|
10658
|
+
driverParam: string;
|
|
10659
|
+
notNull: true;
|
|
10660
|
+
hasDefault: false;
|
|
10661
|
+
isPrimaryKey: false;
|
|
10662
|
+
isAutoincrement: false;
|
|
10663
|
+
hasRuntimeDefault: false;
|
|
10664
|
+
enumValues: [string, ...string[]];
|
|
10665
|
+
baseColumn: never;
|
|
10666
|
+
identity: undefined;
|
|
10667
|
+
generated: undefined;
|
|
10668
|
+
}, {}, {}>;
|
|
10669
|
+
sourceType: import("drizzle-orm/pg-core").PgColumn<{
|
|
10670
|
+
name: "source_type";
|
|
10671
|
+
tableName: "plugin_installs";
|
|
10672
|
+
dataType: "string";
|
|
10673
|
+
columnType: "PgText";
|
|
10674
|
+
data: string;
|
|
10675
|
+
driverParam: string;
|
|
10676
|
+
notNull: true;
|
|
10677
|
+
hasDefault: true;
|
|
10678
|
+
isPrimaryKey: false;
|
|
10679
|
+
isAutoincrement: false;
|
|
10680
|
+
hasRuntimeDefault: false;
|
|
10681
|
+
enumValues: [string, ...string[]];
|
|
10682
|
+
baseColumn: never;
|
|
10683
|
+
identity: undefined;
|
|
10684
|
+
generated: undefined;
|
|
10685
|
+
}, {}, {}>;
|
|
10686
|
+
sourceRef: import("drizzle-orm/pg-core").PgColumn<{
|
|
10687
|
+
name: "source_ref";
|
|
10688
|
+
tableName: "plugin_installs";
|
|
10689
|
+
dataType: "string";
|
|
10690
|
+
columnType: "PgText";
|
|
10691
|
+
data: string;
|
|
10692
|
+
driverParam: string;
|
|
10693
|
+
notNull: false;
|
|
10694
|
+
hasDefault: false;
|
|
10695
|
+
isPrimaryKey: false;
|
|
10696
|
+
isAutoincrement: false;
|
|
10697
|
+
hasRuntimeDefault: false;
|
|
10698
|
+
enumValues: [string, ...string[]];
|
|
10699
|
+
baseColumn: never;
|
|
10700
|
+
identity: undefined;
|
|
10701
|
+
generated: undefined;
|
|
10702
|
+
}, {}, {}>;
|
|
10703
|
+
integrity: import("drizzle-orm/pg-core").PgColumn<{
|
|
10704
|
+
name: "integrity";
|
|
10705
|
+
tableName: "plugin_installs";
|
|
10706
|
+
dataType: "string";
|
|
10707
|
+
columnType: "PgText";
|
|
10708
|
+
data: string;
|
|
10709
|
+
driverParam: string;
|
|
10710
|
+
notNull: false;
|
|
10711
|
+
hasDefault: false;
|
|
10712
|
+
isPrimaryKey: false;
|
|
10713
|
+
isAutoincrement: false;
|
|
10714
|
+
hasRuntimeDefault: false;
|
|
10715
|
+
enumValues: [string, ...string[]];
|
|
10716
|
+
baseColumn: never;
|
|
10717
|
+
identity: undefined;
|
|
10718
|
+
generated: undefined;
|
|
10719
|
+
}, {}, {}>;
|
|
10720
|
+
buildHash: import("drizzle-orm/pg-core").PgColumn<{
|
|
10721
|
+
name: "build_hash";
|
|
10722
|
+
tableName: "plugin_installs";
|
|
10723
|
+
dataType: "string";
|
|
10724
|
+
columnType: "PgText";
|
|
10725
|
+
data: string;
|
|
10726
|
+
driverParam: string;
|
|
10727
|
+
notNull: false;
|
|
10728
|
+
hasDefault: false;
|
|
10729
|
+
isPrimaryKey: false;
|
|
10730
|
+
isAutoincrement: false;
|
|
10731
|
+
hasRuntimeDefault: false;
|
|
10732
|
+
enumValues: [string, ...string[]];
|
|
10733
|
+
baseColumn: never;
|
|
10734
|
+
identity: undefined;
|
|
10735
|
+
generated: undefined;
|
|
10736
|
+
}, {}, {}>;
|
|
10737
|
+
artifactPath: import("drizzle-orm/pg-core").PgColumn<{
|
|
10738
|
+
name: "artifact_path";
|
|
10739
|
+
tableName: "plugin_installs";
|
|
10740
|
+
dataType: "string";
|
|
10741
|
+
columnType: "PgText";
|
|
10742
|
+
data: string;
|
|
10743
|
+
driverParam: string;
|
|
10744
|
+
notNull: false;
|
|
10745
|
+
hasDefault: false;
|
|
10746
|
+
isPrimaryKey: false;
|
|
10747
|
+
isAutoincrement: false;
|
|
10748
|
+
hasRuntimeDefault: false;
|
|
10749
|
+
enumValues: [string, ...string[]];
|
|
10750
|
+
baseColumn: never;
|
|
10751
|
+
identity: undefined;
|
|
10752
|
+
generated: undefined;
|
|
10753
|
+
}, {}, {}>;
|
|
10754
|
+
manifestJson: import("drizzle-orm/pg-core").PgColumn<{
|
|
10755
|
+
name: "manifest_json";
|
|
10756
|
+
tableName: "plugin_installs";
|
|
10757
|
+
dataType: "string";
|
|
10758
|
+
columnType: "PgText";
|
|
10759
|
+
data: string;
|
|
10760
|
+
driverParam: string;
|
|
10761
|
+
notNull: true;
|
|
10762
|
+
hasDefault: true;
|
|
10763
|
+
isPrimaryKey: false;
|
|
10764
|
+
isAutoincrement: false;
|
|
10765
|
+
hasRuntimeDefault: false;
|
|
10766
|
+
enumValues: [string, ...string[]];
|
|
10767
|
+
baseColumn: never;
|
|
10768
|
+
identity: undefined;
|
|
10769
|
+
generated: undefined;
|
|
10770
|
+
}, {}, {}>;
|
|
10771
|
+
status: import("drizzle-orm/pg-core").PgColumn<{
|
|
10772
|
+
name: "status";
|
|
10773
|
+
tableName: "plugin_installs";
|
|
10774
|
+
dataType: "string";
|
|
10775
|
+
columnType: "PgText";
|
|
10776
|
+
data: string;
|
|
10777
|
+
driverParam: string;
|
|
10778
|
+
notNull: true;
|
|
10779
|
+
hasDefault: true;
|
|
10780
|
+
isPrimaryKey: false;
|
|
10781
|
+
isAutoincrement: false;
|
|
10782
|
+
hasRuntimeDefault: false;
|
|
10783
|
+
enumValues: [string, ...string[]];
|
|
10784
|
+
baseColumn: never;
|
|
10785
|
+
identity: undefined;
|
|
10786
|
+
generated: undefined;
|
|
10787
|
+
}, {}, {}>;
|
|
10788
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
10789
|
+
name: "created_at";
|
|
10790
|
+
tableName: "plugin_installs";
|
|
10791
|
+
dataType: "date";
|
|
10792
|
+
columnType: "PgTimestamp";
|
|
10793
|
+
data: Date;
|
|
10794
|
+
driverParam: string;
|
|
10795
|
+
notNull: true;
|
|
10796
|
+
hasDefault: true;
|
|
10797
|
+
isPrimaryKey: false;
|
|
10798
|
+
isAutoincrement: false;
|
|
10799
|
+
hasRuntimeDefault: false;
|
|
10800
|
+
enumValues: undefined;
|
|
10801
|
+
baseColumn: never;
|
|
10802
|
+
identity: undefined;
|
|
10803
|
+
generated: undefined;
|
|
10804
|
+
}, {}, {}>;
|
|
10805
|
+
};
|
|
10806
|
+
dialect: "pg";
|
|
10807
|
+
}>;
|
|
10284
10808
|
templates: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
10285
10809
|
name: "templates";
|
|
10286
10810
|
schema: undefined;
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bopodev-db",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.35",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"types": "src/index.ts",
|
|
8
8
|
"dependencies": {
|
|
9
|
+
"dotenv": "^17.0.1",
|
|
9
10
|
"detect-port": "^2.1.0",
|
|
10
11
|
"drizzle-kit": "^0.31.10",
|
|
11
12
|
"drizzle-orm": "^0.44.5",
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import { dirname, join, resolve } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { config as loadDotenv } from "dotenv";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Load the same env files as `apps/api` (`loadApiEnv`), so `db:migrate` targets the DB
|
|
8
|
+
* the API uses when developers run migrations from the shell without exporting variables.
|
|
9
|
+
*/
|
|
10
|
+
export function loadMigrateEnv() {
|
|
11
|
+
const roots = resolveCandidateRepoRoots();
|
|
12
|
+
for (const root of roots) {
|
|
13
|
+
for (const name of [".env.local", ".env"] as const) {
|
|
14
|
+
loadDotenv({ path: join(root, name), override: false, quiet: true });
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function resolveCandidateRepoRoots(): string[] {
|
|
20
|
+
const fromPackage = resolve(dirname(fileURLToPath(import.meta.url)), "../../..");
|
|
21
|
+
const ordered: string[] = [fromPackage];
|
|
22
|
+
const fromCwd = findRepoRootWalkingFromCwd();
|
|
23
|
+
if (fromCwd && resolve(fromCwd) !== resolve(fromPackage)) {
|
|
24
|
+
ordered.push(fromCwd);
|
|
25
|
+
}
|
|
26
|
+
return ordered;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function findRepoRootWalkingFromCwd(): string | null {
|
|
30
|
+
let dir = resolve(process.cwd());
|
|
31
|
+
for (let i = 0; i < 12; i++) {
|
|
32
|
+
if (existsSync(join(dir, "pnpm-workspace.yaml"))) {
|
|
33
|
+
return dir;
|
|
34
|
+
}
|
|
35
|
+
const parent = dirname(dir);
|
|
36
|
+
if (parent === dir) {
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
dir = parent;
|
|
40
|
+
}
|
|
41
|
+
return null;
|
|
42
|
+
}
|