drizzle-kit 0.28.1-5514d51 → 0.28.1-661b6f2

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.
Files changed (4) hide show
  1. package/api.js +83 -137
  2. package/api.mjs +83 -137
  3. package/bin.cjs +37 -37
  4. package/package.json +1 -1
package/api.js CHANGED
@@ -23965,12 +23965,14 @@ var init_primary_keys = __esm({
23965
23965
  function getOrderByOperators() {
23966
23966
  return orderByOperators;
23967
23967
  }
23968
- function mapRelationalRow(row, buildQueryResultSelection, mapColumnValue = (value) => value) {
23968
+ function mapRelationalRow(row, buildQueryResultSelection, mapColumnValue = (value) => value, parseJson = false) {
23969
23969
  for (const selectionItem of buildQueryResultSelection) {
23970
23970
  const field = selectionItem.field;
23971
23971
  if (is(field, Table2)) {
23972
23972
  if (row[selectionItem.key] === null)
23973
23973
  continue;
23974
+ if (parseJson)
23975
+ row[selectionItem.key] = JSON.parse(row[selectionItem.key]);
23974
23976
  if (selectionItem.isArray) {
23975
23977
  for (const item of row[selectionItem.key]) {
23976
23978
  mapRelationalRow(item, selectionItem.selection, mapColumnValue);
@@ -24083,8 +24085,11 @@ function relationFilterToSQL(table4, filter2) {
24083
24085
  continue;
24084
24086
  switch (target) {
24085
24087
  case "$raw": {
24086
- if (value)
24087
- parts.push(value(operators));
24088
+ if (value) {
24089
+ parts.push(
24090
+ value(table4[Columns], operators)
24091
+ );
24092
+ }
24088
24093
  continue;
24089
24094
  }
24090
24095
  case "$or": {
@@ -24365,12 +24370,12 @@ Hint: you can specify "alias" on both sides of the relation with the same value`
24365
24370
  if (!this.query) {
24366
24371
  if (!this.table)
24367
24372
  throw new Error("Table must be set before building aggregate field");
24368
- this.query = sql`select count(*) as ${sql.identifier("count")} from ${this.table}`.mapWith(Number);
24373
+ this.query = sql`select count(*) as ${sql.identifier("r")} from ${this.table}`.mapWith(Number);
24369
24374
  }
24370
24375
  return this.query;
24371
24376
  }
24372
24377
  };
24373
- __publicField(Count, _a123, "Count");
24378
+ __publicField(Count, _a123, "AggregatedFieldCount");
24374
24379
  operators = {
24375
24380
  and,
24376
24381
  between,
@@ -25850,7 +25855,7 @@ var init_dialect = __esm({
25850
25855
  const extras = params?.extras ? relationExtrasToSQL(table4, params.extras) : void 0;
25851
25856
  if (extras)
25852
25857
  selection.push(...extras.selection);
25853
- const selectionArr = [columns, extras?.sql];
25858
+ const selectionArr = [columns];
25854
25859
  const joins = params ? (() => {
25855
25860
  const { with: joins2 } = params;
25856
25861
  if (!joins2)
@@ -25860,17 +25865,18 @@ var init_dialect = __esm({
25860
25865
  return;
25861
25866
  return sql.join(
25862
25867
  withEntries.map(([k, join]) => {
25863
- const relation = tableConfig.relations[k];
25864
- if (relation.$brand === "AggregatedField") {
25865
- relation.onTable(table4);
25866
- const query2 = relation.getSQL();
25868
+ if (is(tableConfig.relations[k], AggregatedField)) {
25869
+ const relation2 = tableConfig.relations[k];
25870
+ relation2.onTable(table4);
25871
+ const query2 = relation2.getSQL();
25867
25872
  selection.push({
25868
25873
  key: k,
25869
- field: relation
25874
+ field: relation2
25870
25875
  });
25871
25876
  selectionArr.push(sql`${sql.identifier(k)}.${sql.identifier("r")} as ${sql.identifier(k)}`);
25872
25877
  return sql`left join lateral(${query2}) as ${sql.identifier(k)} on true`;
25873
25878
  }
25879
+ const relation = tableConfig.relations[k];
25874
25880
  const isSingle2 = is(relation, One);
25875
25881
  const targetTable = relation.targetTable;
25876
25882
  const relationFilter = relationToSQL(relation);
@@ -25898,6 +25904,8 @@ var init_dialect = __esm({
25898
25904
  sql` `
25899
25905
  );
25900
25906
  })() : void 0;
25907
+ if (extras?.sql)
25908
+ selectionArr.push(extras.sql);
25901
25909
  const selectionSet = sql.join(selectionArr.filter((e) => e !== void 0), sql`, `);
25902
25910
  const query = sql`select ${selectionSet} from ${table4}${sql` ${joins}`.if(joins)}${sql` where ${where}`.if(where)}${sql` order by ${order}`.if(order)}${sql` limit ${limit}`.if(limit !== void 0)}${sql` offset ${offset}`.if(offset !== void 0)}`;
25903
25911
  return {
@@ -31350,72 +31358,20 @@ var init_dialect2 = __esm({
31350
31358
  }
31351
31359
  return selectedColumns;
31352
31360
  });
31353
- __publicField(this, "buildWithColumns", (tableConfig, withContainer, jsonColumns) => {
31354
- for (const [k, v] of Object.entries(
31355
- withContainer
31356
- )) {
31357
- if (!v)
31358
- continue;
31359
- const relation = tableConfig.relations[k];
31360
- if (relation.$brand === "AggregatedField")
31361
- continue;
31362
- const table4 = relation.targetTable;
31363
- const columns = this.getSelectedTableColumns(table4, typeof v === "boolean" ? void 0 : v.columns).map(
31364
- (c) => sql`${sql.raw(this.escapeString(c.tsName))}, ${sql.identifier(c.tsName)}`
31365
- );
31366
- if (typeof v !== "boolean") {
31367
- if (v.extras) {
31368
- if (typeof v.extras === "function") {
31369
- v.extras = v.extras(table4[Columns], { sql });
31370
- }
31371
- for (const [ek, ev] of Object.entries(v.extras)) {
31372
- if (!ev)
31373
- continue;
31374
- columns.push(
31375
- sql`${sql.raw(this.escapeString(ek))}, ${sql.identifier(ek)}`
31376
- );
31377
- }
31378
- }
31379
- if (v.with) {
31380
- const withEntries = Object.entries(v.with);
31381
- for (const [k2, w] of withEntries) {
31382
- if (!w)
31383
- continue;
31384
- columns.push(sql`${sql.raw(this.escapeString(k2))}, jsonb(${sql.identifier(k2)})`);
31385
- }
31386
- }
31387
- }
31388
- jsonColumns[k] = jsonColumns[k] ? sql`${jsonColumns[k]}, ${sql.join(columns, sql`, `)}` : sql.join(columns, sql`, `);
31389
- }
31390
- });
31391
- __publicField(this, "buildColumns", (table4, tableConfig, selection, params) => params?.columns ? (() => {
31392
- const jsonColumns = {};
31361
+ __publicField(this, "buildColumns", (table4, selection, params) => params?.columns ? (() => {
31393
31362
  const columnIdentifiers = [];
31394
31363
  const selectedColumns = this.getSelectedTableColumns(table4, params?.columns);
31395
31364
  for (const column4 of selectedColumns) {
31396
- columnIdentifiers.push(sql`${column4} as ${sql.identifier(column4.tsName)}`);
31365
+ columnIdentifiers.push(sql`${column4.column} as ${sql.identifier(column4.tsName)}`);
31397
31366
  selection.push({
31398
31367
  key: column4.tsName,
31399
31368
  field: column4.column
31400
31369
  });
31401
31370
  }
31402
- if (params?.with) {
31403
- this.buildWithColumns(tableConfig, params.with, jsonColumns);
31404
- }
31405
- return {
31406
- columns: columnIdentifiers.length ? sql.join(columnIdentifiers, sql`, `) : this.unwrapAllColumns(table4, selection),
31407
- jsonColumns
31408
- };
31371
+ return columnIdentifiers.length ? sql.join(columnIdentifiers, sql`, `) : this.unwrapAllColumns(table4, selection);
31409
31372
  })() : (() => {
31410
31373
  const columnIdentifiers = [this.unwrapAllColumns(table4, selection)];
31411
- const jsonColumns = {};
31412
- if (params?.with) {
31413
- this.buildWithColumns(tableConfig, params.with, jsonColumns);
31414
- }
31415
- return {
31416
- columns: sql.join(columnIdentifiers, sql`, `),
31417
- jsonColumns
31418
- };
31374
+ return sql.join(columnIdentifiers, sql`, `);
31419
31375
  })());
31420
31376
  this.casing = new CasingCache(config?.casing);
31421
31377
  }
@@ -31970,7 +31926,7 @@ var init_dialect2 = __esm({
31970
31926
  const params = config === true ? void 0 : config;
31971
31927
  const limit = isSingle ? 1 : params?.limit;
31972
31928
  const offset = params?.offset;
31973
- const { columns, jsonColumns } = this.buildColumns(table4, tableConfig, selection, params);
31929
+ const columns = this.buildColumns(table4, selection, params);
31974
31930
  const where = params?.where && relationWhere ? and(relationFilterToSQL(table4, params.where), relationWhere) : params?.where ? relationFilterToSQL(table4, params.where) : relationWhere;
31975
31931
  const order = params?.orderBy ? relationsOrderToSQL(table4, params.orderBy) : void 0;
31976
31932
  const extras = params?.extras ? relationExtrasToSQL(table4, params.extras) : void 0;
@@ -31985,16 +31941,17 @@ var init_dialect2 = __esm({
31985
31941
  return;
31986
31942
  return sql.join(
31987
31943
  withEntries.map(([k, join]) => {
31988
- const relation = tableConfig.relations[k];
31989
- if (relation.$brand === "AggregatedField") {
31990
- relation.onTable(table4);
31991
- const query2 = relation.getSQL();
31944
+ if (is(tableConfig.relations[k], AggregatedField)) {
31945
+ const relation2 = tableConfig.relations[k];
31946
+ relation2.onTable(table4);
31947
+ const query2 = relation2.getSQL();
31992
31948
  selection.push({
31993
31949
  key: k,
31994
- field: relation
31950
+ field: relation2
31995
31951
  });
31996
31952
  return sql`(${query2}) as ${sql.identifier(k)}`;
31997
31953
  }
31954
+ const relation = tableConfig.relations[k];
31998
31955
  const isSingle2 = is(relation, One);
31999
31956
  const targetTable = relation.targetTable;
32000
31957
  const relationFilter = relationToSQL(relation);
@@ -32015,7 +31972,13 @@ var init_dialect2 = __esm({
32015
31972
  selection: innerQuery.selection,
32016
31973
  isArray: !isSingle2
32017
31974
  });
32018
- return isNested ? isSingle2 ? sql`(select ${sql`jsonb_object(${jsonColumns[k]}) as ${sql.identifier("r")}`} from (${innerQuery}) as ${sql.identifier("t")}) as ${sql.identifier(k)}` : sql`coalesce((select ${sql`jsonb_group_array(json_object(${jsonColumns[k]})) as ${sql.identifier("r")}`} from (${innerQuery}) as ${sql.identifier("t")}), jsonb_array()) as ${sql.identifier(k)}` : isSingle2 ? sql`(select ${sql`json_object(${jsonColumns[k]}) as ${sql.identifier("r")}`} from (${innerQuery}) as ${sql.identifier("t")}) as ${sql.identifier(k)}` : sql`coalesce((select ${sql`json_group_array(json_object(${jsonColumns[k]})) as ${sql.identifier("r")}`} from (${innerQuery}) as ${sql.identifier("t")}), jsonb_array()) as ${sql.identifier(k)}`;
31975
+ const jsonColumns = sql.join(
31976
+ innerQuery.selection.map((s) => {
31977
+ return sql`${sql.raw(this.escapeString(s.key))}, ${s.selection ? sql`jsonb(${sql.identifier(s.key)})` : sql.identifier(s.key)}`;
31978
+ }),
31979
+ sql`, `
31980
+ );
31981
+ return isNested ? isSingle2 ? sql`(select jsonb_object(${jsonColumns}) as ${sql.identifier("r")} from (${innerQuery.sql}) as ${sql.identifier("t")}) as ${sql.identifier(k)}` : sql`coalesce((select jsonb_group_array(json_object(${jsonColumns})) as ${sql.identifier("r")} from (${innerQuery.sql}) as ${sql.identifier("t")}), jsonb_array()) as ${sql.identifier(k)}` : isSingle2 ? sql`(select json_object(${jsonColumns}) as ${sql.identifier("r")} from (${innerQuery.sql}) as ${sql.identifier("t")}) as ${sql.identifier(k)}` : sql`coalesce((select json_group_array(json_object(${jsonColumns})) as ${sql.identifier("r")} from (${innerQuery.sql}) as ${sql.identifier("t")}), jsonb_array()) as ${sql.identifier(k)}`;
32019
31982
  }),
32020
31983
  sql`, `
32021
31984
  );
@@ -33398,7 +33361,8 @@ var init_query4 = __esm({
33398
33361
  init_relations();
33399
33362
  _a224 = entityKind;
33400
33363
  RelationalQueryBuilder2 = class {
33401
- constructor(tables, schema4, tableNamesMap, table4, tableConfig, dialect4, session) {
33364
+ constructor(mode, tables, schema4, tableNamesMap, table4, tableConfig, dialect4, session) {
33365
+ this.mode = mode;
33402
33366
  this.tables = tables;
33403
33367
  this.schema = schema4;
33404
33368
  this.tableNamesMap = tableNamesMap;
@@ -33408,7 +33372,17 @@ var init_query4 = __esm({
33408
33372
  this.session = session;
33409
33373
  }
33410
33374
  findMany(config) {
33411
- return new SQLiteRelationalQuery2(
33375
+ return this.mode === "sync" ? new SQLiteSyncRelationalQuery2(
33376
+ this.tables,
33377
+ this.schema,
33378
+ this.tableNamesMap,
33379
+ this.table,
33380
+ this.tableConfig,
33381
+ this.dialect,
33382
+ this.session,
33383
+ config ?? true,
33384
+ "many"
33385
+ ) : new SQLiteRelationalQuery2(
33412
33386
  this.tables,
33413
33387
  this.schema,
33414
33388
  this.tableNamesMap,
@@ -33421,7 +33395,17 @@ var init_query4 = __esm({
33421
33395
  );
33422
33396
  }
33423
33397
  findFirst(config) {
33424
- return new SQLiteRelationalQuery2(
33398
+ return this.mode === "sync" ? new SQLiteSyncRelationalQuery2(
33399
+ this.tables,
33400
+ this.schema,
33401
+ this.tableNamesMap,
33402
+ this.table,
33403
+ this.tableConfig,
33404
+ this.dialect,
33405
+ this.session,
33406
+ config ?? true,
33407
+ "first"
33408
+ ) : new SQLiteRelationalQuery2(
33425
33409
  this.tables,
33426
33410
  this.schema,
33427
33411
  this.tableNamesMap,
@@ -33473,7 +33457,7 @@ var init_query4 = __esm({
33473
33457
  void 0,
33474
33458
  this.mode === "first" ? "get" : "all",
33475
33459
  (rawRows, mapColumnValue) => {
33476
- const rows = rawRows.map((row) => mapRelationalRow(row, query.selection, mapColumnValue));
33460
+ const rows = rawRows.map((row) => mapRelationalRow(row, query.selection, mapColumnValue, true));
33477
33461
  if (this.mode === "first") {
33478
33462
  return rows[0];
33479
33463
  }
@@ -33616,6 +33600,7 @@ var init_db2 = __esm({
33616
33600
  if (relations) {
33617
33601
  for (const [tableName, relation] of Object.entries(relations.tablesConfig)) {
33618
33602
  this.query[tableName] = new RelationalQueryBuilder2(
33603
+ resultKind,
33619
33604
  relations.tables,
33620
33605
  relations.tablesConfig,
33621
33606
  relations.tableNamesMap,
@@ -36850,42 +36835,7 @@ var init_dialect3 = __esm({
36850
36835
  }
36851
36836
  return selectedColumns;
36852
36837
  });
36853
- __publicField(this, "buildWithColumns", (tableConfig, withContainer, jsonColumns, columnIdentifiers) => {
36854
- for (const [k, v] of Object.entries(
36855
- withContainer
36856
- )) {
36857
- if (!v)
36858
- continue;
36859
- const relation = tableConfig.relations[k];
36860
- if (relation.$brand === "AggregatedField")
36861
- continue;
36862
- const table4 = relation.targetTable;
36863
- const columns = this.getSelectedTableColumns(table4, typeof v === "boolean" ? void 0 : v.columns).map(
36864
- (c) => sql`${sql.raw(this.escapeString(c.tsName))}, ${sql.identifier(c.tsName)}`
36865
- );
36866
- if (typeof v === "object" && v.extras) {
36867
- if (typeof v.extras === "function") {
36868
- v.extras = v.extras(table4[Columns], { sql });
36869
- }
36870
- for (const [ek, ev] of Object.entries(v.extras)) {
36871
- if (!ev)
36872
- continue;
36873
- columns.push(
36874
- sql`${sql.raw(this.escapeString(ek))}, ${sql.identifier(ek)}`
36875
- );
36876
- }
36877
- }
36878
- columnIdentifiers.push(
36879
- sql`${table4}.${sql.identifier("r")} as ${sql.identifier(k)}`
36880
- );
36881
- jsonColumns[k] = sql.join(
36882
- columns,
36883
- sql`, `
36884
- );
36885
- }
36886
- });
36887
- __publicField(this, "buildColumns", (table4, tableConfig, selection, params) => params?.columns ? (() => {
36888
- const jsonColumns = {};
36838
+ __publicField(this, "buildColumns", (table4, selection, params) => params?.columns ? (() => {
36889
36839
  const columnIdentifiers = [];
36890
36840
  const selectedColumns = this.getSelectedTableColumns(table4, params?.columns);
36891
36841
  for (const column4 of selectedColumns) {
@@ -36893,23 +36843,10 @@ var init_dialect3 = __esm({
36893
36843
  sql`${table4[column4.tsName]} as ${sql.identifier(column4.tsName)}`
36894
36844
  );
36895
36845
  }
36896
- if (params?.with) {
36897
- this.buildWithColumns(tableConfig, params.with, jsonColumns, columnIdentifiers);
36898
- }
36899
- return {
36900
- columns: columnIdentifiers.length ? sql.join(columnIdentifiers, sql`, `) : this.unwrapAllColumns(table4, selection),
36901
- jsonColumns
36902
- };
36846
+ return columnIdentifiers.length ? sql.join(columnIdentifiers, sql`, `) : this.unwrapAllColumns(table4, selection);
36903
36847
  })() : (() => {
36904
36848
  const columnIdentifiers = [this.unwrapAllColumns(table4, selection)];
36905
- const jsonColumns = {};
36906
- if (params?.with) {
36907
- this.buildWithColumns(tableConfig, params.with, jsonColumns, columnIdentifiers);
36908
- }
36909
- return {
36910
- columns: sql.join(columnIdentifiers, sql`, `),
36911
- jsonColumns
36912
- };
36849
+ return sql.join(columnIdentifiers, sql`, `);
36913
36850
  })());
36914
36851
  this.casing = new CasingCache(config?.casing);
36915
36852
  }
@@ -37719,13 +37656,13 @@ var init_dialect3 = __esm({
37719
37656
  const params = config === true ? void 0 : config;
37720
37657
  const limit = isSingle ? 1 : params?.limit;
37721
37658
  const offset = params?.offset;
37722
- const { columns, jsonColumns } = this.buildColumns(table4, tableConfig, selection, params);
37659
+ const columns = this.buildColumns(table4, selection, params);
37723
37660
  const where = params?.where && relationWhere ? and(relationFilterToSQL(table4, params.where), relationWhere) : params?.where ? relationFilterToSQL(table4, params.where) : relationWhere;
37724
37661
  const order = params?.orderBy ? relationsOrderToSQL(table4, params.orderBy) : void 0;
37725
37662
  const extras = params?.extras ? relationExtrasToSQL(table4, params.extras) : void 0;
37726
37663
  if (extras)
37727
37664
  selection.push(...extras.selection);
37728
- const selectionSet = sql.join([columns, extras].filter((e) => !!e), sql`, `);
37665
+ const selectionArr = [columns];
37729
37666
  const joins = params ? (() => {
37730
37667
  const { with: joins2 } = params;
37731
37668
  if (!joins2)
@@ -37735,16 +37672,18 @@ var init_dialect3 = __esm({
37735
37672
  return;
37736
37673
  return sql.join(
37737
37674
  withEntries.map(([k, join]) => {
37738
- const relation = tableConfig.relations[k];
37739
- if (relation.$brand === "AggregatedField") {
37740
- relation.onTable(table4);
37741
- const query2 = relation.getSQL();
37675
+ selectionArr.push(sql`${sql.identifier(k)}.${sql.identifier("r")} as ${sql.identifier(k)}`);
37676
+ if (is(tableConfig.relations[k], AggregatedField)) {
37677
+ const relation2 = tableConfig.relations[k];
37678
+ relation2.onTable(table4);
37679
+ const query2 = relation2.getSQL();
37742
37680
  selection.push({
37743
37681
  key: k,
37744
- field: relation
37682
+ field: relation2
37745
37683
  });
37746
37684
  return sql`, lateral(${query2}) as ${sql.identifier(k)}`;
37747
37685
  }
37686
+ const relation = tableConfig.relations[k];
37748
37687
  const isSingle2 = is(relation, One);
37749
37688
  const targetTable = relation.targetTable;
37750
37689
  const relationFilter = relationToSQL(relation);
@@ -37764,10 +37703,17 @@ var init_dialect3 = __esm({
37764
37703
  selection: innerQuery.selection,
37765
37704
  isArray: !isSingle2
37766
37705
  });
37767
- return sql`, lateral(select ${isSingle2 ? sql`json_object(${jsonColumns[k]}) as ${sql.identifier("r")}` : sql`coalesce(json_arrayagg(json_object(${jsonColumns[k]})), json_array()) as ${sql.identifier("r")}`} from (${innerQuery}) as ${sql.identifier("t")}) as ${schema4[k]}`;
37706
+ const jsonColumns = sql.join(
37707
+ innerQuery.selection.map((s) => sql`${sql.raw(this.escapeString(s.key))}, ${sql.identifier(s.key)}`),
37708
+ sql`, `
37709
+ );
37710
+ return sql`, lateral(select ${isSingle2 ? sql`json_object(${jsonColumns}) as ${sql.identifier("r")}` : sql`coalesce(json_arrayagg(json_object(${jsonColumns})), json_array()) as ${sql.identifier("r")}`} from (${innerQuery.sql}) as ${sql.identifier("t")}) as ${sql.identifier(k)}`;
37768
37711
  })
37769
37712
  );
37770
37713
  })() : void 0;
37714
+ if (extras?.sql)
37715
+ selectionArr.push(extras.sql);
37716
+ const selectionSet = sql.join(selectionArr, sql`, `);
37771
37717
  const query = sql`select ${selectionSet} from ${table4}${sql`${joins}`.if(joins)}${sql` where ${where}`.if(where)}${sql` order by ${order}`.if(order)}${sql` limit ${limit}`.if(limit !== void 0)}${sql` offset ${offset}`.if(offset !== void 0)}`;
37772
37718
  return {
37773
37719
  sql: query,
package/api.mjs CHANGED
@@ -23970,12 +23970,14 @@ var init_primary_keys = __esm({
23970
23970
  function getOrderByOperators() {
23971
23971
  return orderByOperators;
23972
23972
  }
23973
- function mapRelationalRow(row, buildQueryResultSelection, mapColumnValue = (value) => value) {
23973
+ function mapRelationalRow(row, buildQueryResultSelection, mapColumnValue = (value) => value, parseJson = false) {
23974
23974
  for (const selectionItem of buildQueryResultSelection) {
23975
23975
  const field = selectionItem.field;
23976
23976
  if (is(field, Table2)) {
23977
23977
  if (row[selectionItem.key] === null)
23978
23978
  continue;
23979
+ if (parseJson)
23980
+ row[selectionItem.key] = JSON.parse(row[selectionItem.key]);
23979
23981
  if (selectionItem.isArray) {
23980
23982
  for (const item of row[selectionItem.key]) {
23981
23983
  mapRelationalRow(item, selectionItem.selection, mapColumnValue);
@@ -24088,8 +24090,11 @@ function relationFilterToSQL(table4, filter2) {
24088
24090
  continue;
24089
24091
  switch (target) {
24090
24092
  case "$raw": {
24091
- if (value)
24092
- parts.push(value(operators));
24093
+ if (value) {
24094
+ parts.push(
24095
+ value(table4[Columns], operators)
24096
+ );
24097
+ }
24093
24098
  continue;
24094
24099
  }
24095
24100
  case "$or": {
@@ -24370,12 +24375,12 @@ Hint: you can specify "alias" on both sides of the relation with the same value`
24370
24375
  if (!this.query) {
24371
24376
  if (!this.table)
24372
24377
  throw new Error("Table must be set before building aggregate field");
24373
- this.query = sql`select count(*) as ${sql.identifier("count")} from ${this.table}`.mapWith(Number);
24378
+ this.query = sql`select count(*) as ${sql.identifier("r")} from ${this.table}`.mapWith(Number);
24374
24379
  }
24375
24380
  return this.query;
24376
24381
  }
24377
24382
  };
24378
- __publicField(Count, _a123, "Count");
24383
+ __publicField(Count, _a123, "AggregatedFieldCount");
24379
24384
  operators = {
24380
24385
  and,
24381
24386
  between,
@@ -25855,7 +25860,7 @@ var init_dialect = __esm({
25855
25860
  const extras = params?.extras ? relationExtrasToSQL(table4, params.extras) : void 0;
25856
25861
  if (extras)
25857
25862
  selection.push(...extras.selection);
25858
- const selectionArr = [columns, extras?.sql];
25863
+ const selectionArr = [columns];
25859
25864
  const joins = params ? (() => {
25860
25865
  const { with: joins2 } = params;
25861
25866
  if (!joins2)
@@ -25865,17 +25870,18 @@ var init_dialect = __esm({
25865
25870
  return;
25866
25871
  return sql.join(
25867
25872
  withEntries.map(([k, join]) => {
25868
- const relation = tableConfig.relations[k];
25869
- if (relation.$brand === "AggregatedField") {
25870
- relation.onTable(table4);
25871
- const query2 = relation.getSQL();
25873
+ if (is(tableConfig.relations[k], AggregatedField)) {
25874
+ const relation2 = tableConfig.relations[k];
25875
+ relation2.onTable(table4);
25876
+ const query2 = relation2.getSQL();
25872
25877
  selection.push({
25873
25878
  key: k,
25874
- field: relation
25879
+ field: relation2
25875
25880
  });
25876
25881
  selectionArr.push(sql`${sql.identifier(k)}.${sql.identifier("r")} as ${sql.identifier(k)}`);
25877
25882
  return sql`left join lateral(${query2}) as ${sql.identifier(k)} on true`;
25878
25883
  }
25884
+ const relation = tableConfig.relations[k];
25879
25885
  const isSingle2 = is(relation, One);
25880
25886
  const targetTable = relation.targetTable;
25881
25887
  const relationFilter = relationToSQL(relation);
@@ -25903,6 +25909,8 @@ var init_dialect = __esm({
25903
25909
  sql` `
25904
25910
  );
25905
25911
  })() : void 0;
25912
+ if (extras?.sql)
25913
+ selectionArr.push(extras.sql);
25906
25914
  const selectionSet = sql.join(selectionArr.filter((e) => e !== void 0), sql`, `);
25907
25915
  const query = sql`select ${selectionSet} from ${table4}${sql` ${joins}`.if(joins)}${sql` where ${where}`.if(where)}${sql` order by ${order}`.if(order)}${sql` limit ${limit}`.if(limit !== void 0)}${sql` offset ${offset}`.if(offset !== void 0)}`;
25908
25916
  return {
@@ -31355,72 +31363,20 @@ var init_dialect2 = __esm({
31355
31363
  }
31356
31364
  return selectedColumns;
31357
31365
  });
31358
- __publicField(this, "buildWithColumns", (tableConfig, withContainer, jsonColumns) => {
31359
- for (const [k, v] of Object.entries(
31360
- withContainer
31361
- )) {
31362
- if (!v)
31363
- continue;
31364
- const relation = tableConfig.relations[k];
31365
- if (relation.$brand === "AggregatedField")
31366
- continue;
31367
- const table4 = relation.targetTable;
31368
- const columns = this.getSelectedTableColumns(table4, typeof v === "boolean" ? void 0 : v.columns).map(
31369
- (c) => sql`${sql.raw(this.escapeString(c.tsName))}, ${sql.identifier(c.tsName)}`
31370
- );
31371
- if (typeof v !== "boolean") {
31372
- if (v.extras) {
31373
- if (typeof v.extras === "function") {
31374
- v.extras = v.extras(table4[Columns], { sql });
31375
- }
31376
- for (const [ek, ev] of Object.entries(v.extras)) {
31377
- if (!ev)
31378
- continue;
31379
- columns.push(
31380
- sql`${sql.raw(this.escapeString(ek))}, ${sql.identifier(ek)}`
31381
- );
31382
- }
31383
- }
31384
- if (v.with) {
31385
- const withEntries = Object.entries(v.with);
31386
- for (const [k2, w] of withEntries) {
31387
- if (!w)
31388
- continue;
31389
- columns.push(sql`${sql.raw(this.escapeString(k2))}, jsonb(${sql.identifier(k2)})`);
31390
- }
31391
- }
31392
- }
31393
- jsonColumns[k] = jsonColumns[k] ? sql`${jsonColumns[k]}, ${sql.join(columns, sql`, `)}` : sql.join(columns, sql`, `);
31394
- }
31395
- });
31396
- __publicField(this, "buildColumns", (table4, tableConfig, selection, params) => params?.columns ? (() => {
31397
- const jsonColumns = {};
31366
+ __publicField(this, "buildColumns", (table4, selection, params) => params?.columns ? (() => {
31398
31367
  const columnIdentifiers = [];
31399
31368
  const selectedColumns = this.getSelectedTableColumns(table4, params?.columns);
31400
31369
  for (const column4 of selectedColumns) {
31401
- columnIdentifiers.push(sql`${column4} as ${sql.identifier(column4.tsName)}`);
31370
+ columnIdentifiers.push(sql`${column4.column} as ${sql.identifier(column4.tsName)}`);
31402
31371
  selection.push({
31403
31372
  key: column4.tsName,
31404
31373
  field: column4.column
31405
31374
  });
31406
31375
  }
31407
- if (params?.with) {
31408
- this.buildWithColumns(tableConfig, params.with, jsonColumns);
31409
- }
31410
- return {
31411
- columns: columnIdentifiers.length ? sql.join(columnIdentifiers, sql`, `) : this.unwrapAllColumns(table4, selection),
31412
- jsonColumns
31413
- };
31376
+ return columnIdentifiers.length ? sql.join(columnIdentifiers, sql`, `) : this.unwrapAllColumns(table4, selection);
31414
31377
  })() : (() => {
31415
31378
  const columnIdentifiers = [this.unwrapAllColumns(table4, selection)];
31416
- const jsonColumns = {};
31417
- if (params?.with) {
31418
- this.buildWithColumns(tableConfig, params.with, jsonColumns);
31419
- }
31420
- return {
31421
- columns: sql.join(columnIdentifiers, sql`, `),
31422
- jsonColumns
31423
- };
31379
+ return sql.join(columnIdentifiers, sql`, `);
31424
31380
  })());
31425
31381
  this.casing = new CasingCache(config?.casing);
31426
31382
  }
@@ -31975,7 +31931,7 @@ var init_dialect2 = __esm({
31975
31931
  const params = config === true ? void 0 : config;
31976
31932
  const limit = isSingle ? 1 : params?.limit;
31977
31933
  const offset = params?.offset;
31978
- const { columns, jsonColumns } = this.buildColumns(table4, tableConfig, selection, params);
31934
+ const columns = this.buildColumns(table4, selection, params);
31979
31935
  const where = params?.where && relationWhere ? and(relationFilterToSQL(table4, params.where), relationWhere) : params?.where ? relationFilterToSQL(table4, params.where) : relationWhere;
31980
31936
  const order = params?.orderBy ? relationsOrderToSQL(table4, params.orderBy) : void 0;
31981
31937
  const extras = params?.extras ? relationExtrasToSQL(table4, params.extras) : void 0;
@@ -31990,16 +31946,17 @@ var init_dialect2 = __esm({
31990
31946
  return;
31991
31947
  return sql.join(
31992
31948
  withEntries.map(([k, join]) => {
31993
- const relation = tableConfig.relations[k];
31994
- if (relation.$brand === "AggregatedField") {
31995
- relation.onTable(table4);
31996
- const query2 = relation.getSQL();
31949
+ if (is(tableConfig.relations[k], AggregatedField)) {
31950
+ const relation2 = tableConfig.relations[k];
31951
+ relation2.onTable(table4);
31952
+ const query2 = relation2.getSQL();
31997
31953
  selection.push({
31998
31954
  key: k,
31999
- field: relation
31955
+ field: relation2
32000
31956
  });
32001
31957
  return sql`(${query2}) as ${sql.identifier(k)}`;
32002
31958
  }
31959
+ const relation = tableConfig.relations[k];
32003
31960
  const isSingle2 = is(relation, One);
32004
31961
  const targetTable = relation.targetTable;
32005
31962
  const relationFilter = relationToSQL(relation);
@@ -32020,7 +31977,13 @@ var init_dialect2 = __esm({
32020
31977
  selection: innerQuery.selection,
32021
31978
  isArray: !isSingle2
32022
31979
  });
32023
- return isNested ? isSingle2 ? sql`(select ${sql`jsonb_object(${jsonColumns[k]}) as ${sql.identifier("r")}`} from (${innerQuery}) as ${sql.identifier("t")}) as ${sql.identifier(k)}` : sql`coalesce((select ${sql`jsonb_group_array(json_object(${jsonColumns[k]})) as ${sql.identifier("r")}`} from (${innerQuery}) as ${sql.identifier("t")}), jsonb_array()) as ${sql.identifier(k)}` : isSingle2 ? sql`(select ${sql`json_object(${jsonColumns[k]}) as ${sql.identifier("r")}`} from (${innerQuery}) as ${sql.identifier("t")}) as ${sql.identifier(k)}` : sql`coalesce((select ${sql`json_group_array(json_object(${jsonColumns[k]})) as ${sql.identifier("r")}`} from (${innerQuery}) as ${sql.identifier("t")}), jsonb_array()) as ${sql.identifier(k)}`;
31980
+ const jsonColumns = sql.join(
31981
+ innerQuery.selection.map((s) => {
31982
+ return sql`${sql.raw(this.escapeString(s.key))}, ${s.selection ? sql`jsonb(${sql.identifier(s.key)})` : sql.identifier(s.key)}`;
31983
+ }),
31984
+ sql`, `
31985
+ );
31986
+ return isNested ? isSingle2 ? sql`(select jsonb_object(${jsonColumns}) as ${sql.identifier("r")} from (${innerQuery.sql}) as ${sql.identifier("t")}) as ${sql.identifier(k)}` : sql`coalesce((select jsonb_group_array(json_object(${jsonColumns})) as ${sql.identifier("r")} from (${innerQuery.sql}) as ${sql.identifier("t")}), jsonb_array()) as ${sql.identifier(k)}` : isSingle2 ? sql`(select json_object(${jsonColumns}) as ${sql.identifier("r")} from (${innerQuery.sql}) as ${sql.identifier("t")}) as ${sql.identifier(k)}` : sql`coalesce((select json_group_array(json_object(${jsonColumns})) as ${sql.identifier("r")} from (${innerQuery.sql}) as ${sql.identifier("t")}), jsonb_array()) as ${sql.identifier(k)}`;
32024
31987
  }),
32025
31988
  sql`, `
32026
31989
  );
@@ -33403,7 +33366,8 @@ var init_query4 = __esm({
33403
33366
  init_relations();
33404
33367
  _a224 = entityKind;
33405
33368
  RelationalQueryBuilder2 = class {
33406
- constructor(tables, schema4, tableNamesMap, table4, tableConfig, dialect4, session) {
33369
+ constructor(mode, tables, schema4, tableNamesMap, table4, tableConfig, dialect4, session) {
33370
+ this.mode = mode;
33407
33371
  this.tables = tables;
33408
33372
  this.schema = schema4;
33409
33373
  this.tableNamesMap = tableNamesMap;
@@ -33413,7 +33377,17 @@ var init_query4 = __esm({
33413
33377
  this.session = session;
33414
33378
  }
33415
33379
  findMany(config) {
33416
- return new SQLiteRelationalQuery2(
33380
+ return this.mode === "sync" ? new SQLiteSyncRelationalQuery2(
33381
+ this.tables,
33382
+ this.schema,
33383
+ this.tableNamesMap,
33384
+ this.table,
33385
+ this.tableConfig,
33386
+ this.dialect,
33387
+ this.session,
33388
+ config ?? true,
33389
+ "many"
33390
+ ) : new SQLiteRelationalQuery2(
33417
33391
  this.tables,
33418
33392
  this.schema,
33419
33393
  this.tableNamesMap,
@@ -33426,7 +33400,17 @@ var init_query4 = __esm({
33426
33400
  );
33427
33401
  }
33428
33402
  findFirst(config) {
33429
- return new SQLiteRelationalQuery2(
33403
+ return this.mode === "sync" ? new SQLiteSyncRelationalQuery2(
33404
+ this.tables,
33405
+ this.schema,
33406
+ this.tableNamesMap,
33407
+ this.table,
33408
+ this.tableConfig,
33409
+ this.dialect,
33410
+ this.session,
33411
+ config ?? true,
33412
+ "first"
33413
+ ) : new SQLiteRelationalQuery2(
33430
33414
  this.tables,
33431
33415
  this.schema,
33432
33416
  this.tableNamesMap,
@@ -33478,7 +33462,7 @@ var init_query4 = __esm({
33478
33462
  void 0,
33479
33463
  this.mode === "first" ? "get" : "all",
33480
33464
  (rawRows, mapColumnValue) => {
33481
- const rows = rawRows.map((row) => mapRelationalRow(row, query.selection, mapColumnValue));
33465
+ const rows = rawRows.map((row) => mapRelationalRow(row, query.selection, mapColumnValue, true));
33482
33466
  if (this.mode === "first") {
33483
33467
  return rows[0];
33484
33468
  }
@@ -33621,6 +33605,7 @@ var init_db2 = __esm({
33621
33605
  if (relations) {
33622
33606
  for (const [tableName, relation] of Object.entries(relations.tablesConfig)) {
33623
33607
  this.query[tableName] = new RelationalQueryBuilder2(
33608
+ resultKind,
33624
33609
  relations.tables,
33625
33610
  relations.tablesConfig,
33626
33611
  relations.tableNamesMap,
@@ -36855,42 +36840,7 @@ var init_dialect3 = __esm({
36855
36840
  }
36856
36841
  return selectedColumns;
36857
36842
  });
36858
- __publicField(this, "buildWithColumns", (tableConfig, withContainer, jsonColumns, columnIdentifiers) => {
36859
- for (const [k, v] of Object.entries(
36860
- withContainer
36861
- )) {
36862
- if (!v)
36863
- continue;
36864
- const relation = tableConfig.relations[k];
36865
- if (relation.$brand === "AggregatedField")
36866
- continue;
36867
- const table4 = relation.targetTable;
36868
- const columns = this.getSelectedTableColumns(table4, typeof v === "boolean" ? void 0 : v.columns).map(
36869
- (c) => sql`${sql.raw(this.escapeString(c.tsName))}, ${sql.identifier(c.tsName)}`
36870
- );
36871
- if (typeof v === "object" && v.extras) {
36872
- if (typeof v.extras === "function") {
36873
- v.extras = v.extras(table4[Columns], { sql });
36874
- }
36875
- for (const [ek, ev] of Object.entries(v.extras)) {
36876
- if (!ev)
36877
- continue;
36878
- columns.push(
36879
- sql`${sql.raw(this.escapeString(ek))}, ${sql.identifier(ek)}`
36880
- );
36881
- }
36882
- }
36883
- columnIdentifiers.push(
36884
- sql`${table4}.${sql.identifier("r")} as ${sql.identifier(k)}`
36885
- );
36886
- jsonColumns[k] = sql.join(
36887
- columns,
36888
- sql`, `
36889
- );
36890
- }
36891
- });
36892
- __publicField(this, "buildColumns", (table4, tableConfig, selection, params) => params?.columns ? (() => {
36893
- const jsonColumns = {};
36843
+ __publicField(this, "buildColumns", (table4, selection, params) => params?.columns ? (() => {
36894
36844
  const columnIdentifiers = [];
36895
36845
  const selectedColumns = this.getSelectedTableColumns(table4, params?.columns);
36896
36846
  for (const column4 of selectedColumns) {
@@ -36898,23 +36848,10 @@ var init_dialect3 = __esm({
36898
36848
  sql`${table4[column4.tsName]} as ${sql.identifier(column4.tsName)}`
36899
36849
  );
36900
36850
  }
36901
- if (params?.with) {
36902
- this.buildWithColumns(tableConfig, params.with, jsonColumns, columnIdentifiers);
36903
- }
36904
- return {
36905
- columns: columnIdentifiers.length ? sql.join(columnIdentifiers, sql`, `) : this.unwrapAllColumns(table4, selection),
36906
- jsonColumns
36907
- };
36851
+ return columnIdentifiers.length ? sql.join(columnIdentifiers, sql`, `) : this.unwrapAllColumns(table4, selection);
36908
36852
  })() : (() => {
36909
36853
  const columnIdentifiers = [this.unwrapAllColumns(table4, selection)];
36910
- const jsonColumns = {};
36911
- if (params?.with) {
36912
- this.buildWithColumns(tableConfig, params.with, jsonColumns, columnIdentifiers);
36913
- }
36914
- return {
36915
- columns: sql.join(columnIdentifiers, sql`, `),
36916
- jsonColumns
36917
- };
36854
+ return sql.join(columnIdentifiers, sql`, `);
36918
36855
  })());
36919
36856
  this.casing = new CasingCache(config?.casing);
36920
36857
  }
@@ -37724,13 +37661,13 @@ var init_dialect3 = __esm({
37724
37661
  const params = config === true ? void 0 : config;
37725
37662
  const limit = isSingle ? 1 : params?.limit;
37726
37663
  const offset = params?.offset;
37727
- const { columns, jsonColumns } = this.buildColumns(table4, tableConfig, selection, params);
37664
+ const columns = this.buildColumns(table4, selection, params);
37728
37665
  const where = params?.where && relationWhere ? and(relationFilterToSQL(table4, params.where), relationWhere) : params?.where ? relationFilterToSQL(table4, params.where) : relationWhere;
37729
37666
  const order = params?.orderBy ? relationsOrderToSQL(table4, params.orderBy) : void 0;
37730
37667
  const extras = params?.extras ? relationExtrasToSQL(table4, params.extras) : void 0;
37731
37668
  if (extras)
37732
37669
  selection.push(...extras.selection);
37733
- const selectionSet = sql.join([columns, extras].filter((e) => !!e), sql`, `);
37670
+ const selectionArr = [columns];
37734
37671
  const joins = params ? (() => {
37735
37672
  const { with: joins2 } = params;
37736
37673
  if (!joins2)
@@ -37740,16 +37677,18 @@ var init_dialect3 = __esm({
37740
37677
  return;
37741
37678
  return sql.join(
37742
37679
  withEntries.map(([k, join]) => {
37743
- const relation = tableConfig.relations[k];
37744
- if (relation.$brand === "AggregatedField") {
37745
- relation.onTable(table4);
37746
- const query2 = relation.getSQL();
37680
+ selectionArr.push(sql`${sql.identifier(k)}.${sql.identifier("r")} as ${sql.identifier(k)}`);
37681
+ if (is(tableConfig.relations[k], AggregatedField)) {
37682
+ const relation2 = tableConfig.relations[k];
37683
+ relation2.onTable(table4);
37684
+ const query2 = relation2.getSQL();
37747
37685
  selection.push({
37748
37686
  key: k,
37749
- field: relation
37687
+ field: relation2
37750
37688
  });
37751
37689
  return sql`, lateral(${query2}) as ${sql.identifier(k)}`;
37752
37690
  }
37691
+ const relation = tableConfig.relations[k];
37753
37692
  const isSingle2 = is(relation, One);
37754
37693
  const targetTable = relation.targetTable;
37755
37694
  const relationFilter = relationToSQL(relation);
@@ -37769,10 +37708,17 @@ var init_dialect3 = __esm({
37769
37708
  selection: innerQuery.selection,
37770
37709
  isArray: !isSingle2
37771
37710
  });
37772
- return sql`, lateral(select ${isSingle2 ? sql`json_object(${jsonColumns[k]}) as ${sql.identifier("r")}` : sql`coalesce(json_arrayagg(json_object(${jsonColumns[k]})), json_array()) as ${sql.identifier("r")}`} from (${innerQuery}) as ${sql.identifier("t")}) as ${schema4[k]}`;
37711
+ const jsonColumns = sql.join(
37712
+ innerQuery.selection.map((s) => sql`${sql.raw(this.escapeString(s.key))}, ${sql.identifier(s.key)}`),
37713
+ sql`, `
37714
+ );
37715
+ return sql`, lateral(select ${isSingle2 ? sql`json_object(${jsonColumns}) as ${sql.identifier("r")}` : sql`coalesce(json_arrayagg(json_object(${jsonColumns})), json_array()) as ${sql.identifier("r")}`} from (${innerQuery.sql}) as ${sql.identifier("t")}) as ${sql.identifier(k)}`;
37773
37716
  })
37774
37717
  );
37775
37718
  })() : void 0;
37719
+ if (extras?.sql)
37720
+ selectionArr.push(extras.sql);
37721
+ const selectionSet = sql.join(selectionArr, sql`, `);
37776
37722
  const query = sql`select ${selectionSet} from ${table4}${sql`${joins}`.if(joins)}${sql` where ${where}`.if(where)}${sql` order by ${order}`.if(order)}${sql` limit ${limit}`.if(limit !== void 0)}${sql` offset ${offset}`.if(offset !== void 0)}`;
37777
37723
  return {
37778
37724
  sql: query,
package/bin.cjs CHANGED
@@ -71324,9 +71324,9 @@ var require_dist_cjs46 = __commonJS({
71324
71324
  }
71325
71325
  });
71326
71326
 
71327
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/auth/httpAuthSchemeProvider.js
71327
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/auth/httpAuthSchemeProvider.js
71328
71328
  var require_httpAuthSchemeProvider3 = __commonJS({
71329
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/auth/httpAuthSchemeProvider.js"(exports2) {
71329
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/auth/httpAuthSchemeProvider.js"(exports2) {
71330
71330
  "use strict";
71331
71331
  Object.defineProperty(exports2, "__esModule", { value: true });
71332
71332
  exports2.resolveHttpAuthSchemeConfig = exports2.defaultSSOOIDCHttpAuthSchemeProvider = exports2.defaultSSOOIDCHttpAuthSchemeParametersProvider = void 0;
@@ -71393,9 +71393,9 @@ var require_httpAuthSchemeProvider3 = __commonJS({
71393
71393
  }
71394
71394
  });
71395
71395
 
71396
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/package.json
71396
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/package.json
71397
71397
  var require_package4 = __commonJS({
71398
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/package.json"(exports2, module2) {
71398
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/package.json"(exports2, module2) {
71399
71399
  module2.exports = {
71400
71400
  name: "@aws-sdk/client-sso-oidc",
71401
71401
  description: "AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",
@@ -71499,9 +71499,9 @@ var require_package4 = __commonJS({
71499
71499
  }
71500
71500
  });
71501
71501
 
71502
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js
71502
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js
71503
71503
  var require_ruleset2 = __commonJS({
71504
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js"(exports2) {
71504
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js"(exports2) {
71505
71505
  "use strict";
71506
71506
  Object.defineProperty(exports2, "__esModule", { value: true });
71507
71507
  exports2.ruleSet = void 0;
@@ -71534,9 +71534,9 @@ var require_ruleset2 = __commonJS({
71534
71534
  }
71535
71535
  });
71536
71536
 
71537
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js
71537
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js
71538
71538
  var require_endpointResolver2 = __commonJS({
71539
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js"(exports2) {
71539
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js"(exports2) {
71540
71540
  "use strict";
71541
71541
  Object.defineProperty(exports2, "__esModule", { value: true });
71542
71542
  exports2.defaultEndpointResolver = void 0;
@@ -71554,9 +71554,9 @@ var require_endpointResolver2 = __commonJS({
71554
71554
  }
71555
71555
  });
71556
71556
 
71557
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js
71557
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js
71558
71558
  var require_runtimeConfig_shared2 = __commonJS({
71559
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js"(exports2) {
71559
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js"(exports2) {
71560
71560
  "use strict";
71561
71561
  Object.defineProperty(exports2, "__esModule", { value: true });
71562
71562
  exports2.getRuntimeConfig = void 0;
@@ -71600,9 +71600,9 @@ var require_runtimeConfig_shared2 = __commonJS({
71600
71600
  }
71601
71601
  });
71602
71602
 
71603
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js
71603
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js
71604
71604
  var require_runtimeConfig2 = __commonJS({
71605
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js"(exports2) {
71605
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js"(exports2) {
71606
71606
  "use strict";
71607
71607
  Object.defineProperty(exports2, "__esModule", { value: true });
71608
71608
  exports2.getRuntimeConfig = void 0;
@@ -71653,9 +71653,9 @@ var require_runtimeConfig2 = __commonJS({
71653
71653
  }
71654
71654
  });
71655
71655
 
71656
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js
71656
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js
71657
71657
  var require_dist_cjs47 = __commonJS({
71658
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js"(exports2, module2) {
71658
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js"(exports2, module2) {
71659
71659
  "use strict";
71660
71660
  var __defProp3 = Object.defineProperty;
71661
71661
  var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
@@ -73001,9 +73001,9 @@ Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.ht
73001
73001
  }
73002
73002
  });
73003
73003
 
73004
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthSchemeProvider.js
73004
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthSchemeProvider.js
73005
73005
  var require_httpAuthSchemeProvider4 = __commonJS({
73006
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthSchemeProvider.js"(exports2) {
73006
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthSchemeProvider.js"(exports2) {
73007
73007
  "use strict";
73008
73008
  Object.defineProperty(exports2, "__esModule", { value: true });
73009
73009
  exports2.resolveHttpAuthSchemeConfig = exports2.resolveStsAuthConfig = exports2.defaultSTSHttpAuthSchemeProvider = exports2.defaultSTSHttpAuthSchemeParametersProvider = void 0;
@@ -73073,9 +73073,9 @@ var require_httpAuthSchemeProvider4 = __commonJS({
73073
73073
  }
73074
73074
  });
73075
73075
 
73076
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/EndpointParameters.js
73076
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/EndpointParameters.js
73077
73077
  var require_EndpointParameters = __commonJS({
73078
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/EndpointParameters.js"(exports2) {
73078
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/EndpointParameters.js"(exports2) {
73079
73079
  "use strict";
73080
73080
  Object.defineProperty(exports2, "__esModule", { value: true });
73081
73081
  exports2.commonParams = exports2.resolveClientEndpointParameters = void 0;
@@ -73099,9 +73099,9 @@ var require_EndpointParameters = __commonJS({
73099
73099
  }
73100
73100
  });
73101
73101
 
73102
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/package.json
73102
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/package.json
73103
73103
  var require_package5 = __commonJS({
73104
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/package.json"(exports2, module2) {
73104
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/package.json"(exports2, module2) {
73105
73105
  module2.exports = {
73106
73106
  name: "@aws-sdk/client-sts",
73107
73107
  description: "AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",
@@ -73207,9 +73207,9 @@ var require_package5 = __commonJS({
73207
73207
  }
73208
73208
  });
73209
73209
 
73210
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js
73210
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js
73211
73211
  var require_ruleset3 = __commonJS({
73212
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js"(exports2) {
73212
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js"(exports2) {
73213
73213
  "use strict";
73214
73214
  Object.defineProperty(exports2, "__esModule", { value: true });
73215
73215
  exports2.ruleSet = void 0;
@@ -73254,9 +73254,9 @@ var require_ruleset3 = __commonJS({
73254
73254
  }
73255
73255
  });
73256
73256
 
73257
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js
73257
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js
73258
73258
  var require_endpointResolver3 = __commonJS({
73259
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js"(exports2) {
73259
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js"(exports2) {
73260
73260
  "use strict";
73261
73261
  Object.defineProperty(exports2, "__esModule", { value: true });
73262
73262
  exports2.defaultEndpointResolver = void 0;
@@ -73274,9 +73274,9 @@ var require_endpointResolver3 = __commonJS({
73274
73274
  }
73275
73275
  });
73276
73276
 
73277
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js
73277
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js
73278
73278
  var require_runtimeConfig_shared3 = __commonJS({
73279
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js"(exports2) {
73279
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js"(exports2) {
73280
73280
  "use strict";
73281
73281
  Object.defineProperty(exports2, "__esModule", { value: true });
73282
73282
  exports2.getRuntimeConfig = void 0;
@@ -73320,9 +73320,9 @@ var require_runtimeConfig_shared3 = __commonJS({
73320
73320
  }
73321
73321
  });
73322
73322
 
73323
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js
73323
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js
73324
73324
  var require_runtimeConfig3 = __commonJS({
73325
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js"(exports2) {
73325
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js"(exports2) {
73326
73326
  "use strict";
73327
73327
  Object.defineProperty(exports2, "__esModule", { value: true });
73328
73328
  exports2.getRuntimeConfig = void 0;
@@ -73386,9 +73386,9 @@ var require_runtimeConfig3 = __commonJS({
73386
73386
  }
73387
73387
  });
73388
73388
 
73389
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthExtensionConfiguration.js
73389
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthExtensionConfiguration.js
73390
73390
  var require_httpAuthExtensionConfiguration = __commonJS({
73391
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthExtensionConfiguration.js"(exports2) {
73391
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthExtensionConfiguration.js"(exports2) {
73392
73392
  "use strict";
73393
73393
  Object.defineProperty(exports2, "__esModule", { value: true });
73394
73394
  exports2.resolveHttpAuthRuntimeConfig = exports2.getHttpAuthExtensionConfiguration = void 0;
@@ -73434,9 +73434,9 @@ var require_httpAuthExtensionConfiguration = __commonJS({
73434
73434
  }
73435
73435
  });
73436
73436
 
73437
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeExtensions.js
73437
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeExtensions.js
73438
73438
  var require_runtimeExtensions = __commonJS({
73439
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeExtensions.js"(exports2) {
73439
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeExtensions.js"(exports2) {
73440
73440
  "use strict";
73441
73441
  Object.defineProperty(exports2, "__esModule", { value: true });
73442
73442
  exports2.resolveRuntimeExtensions = void 0;
@@ -73465,9 +73465,9 @@ var require_runtimeExtensions = __commonJS({
73465
73465
  }
73466
73466
  });
73467
73467
 
73468
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js
73468
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js
73469
73469
  var require_STSClient = __commonJS({
73470
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js"(exports2) {
73470
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js"(exports2) {
73471
73471
  "use strict";
73472
73472
  Object.defineProperty(exports2, "__esModule", { value: true });
73473
73473
  exports2.STSClient = exports2.__Client = void 0;
@@ -73529,9 +73529,9 @@ var require_STSClient = __commonJS({
73529
73529
  }
73530
73530
  });
73531
73531
 
73532
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/index.js
73532
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/index.js
73533
73533
  var require_dist_cjs50 = __commonJS({
73534
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/index.js"(exports2, module2) {
73534
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/index.js"(exports2, module2) {
73535
73535
  "use strict";
73536
73536
  var __defProp3 = Object.defineProperty;
73537
73537
  var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
@@ -89646,7 +89646,7 @@ init_utils2();
89646
89646
  var version2 = async () => {
89647
89647
  const { npmVersion } = await ormCoreVersions();
89648
89648
  const ormVersion = npmVersion ? `drizzle-orm: v${npmVersion}` : "";
89649
- const envVersion = "0.28.1-5514d51";
89649
+ const envVersion = "0.28.1-661b6f2";
89650
89650
  const kitVersion = envVersion ? `v${envVersion}` : "--";
89651
89651
  const versions = `drizzle-kit: ${kitVersion}
89652
89652
  ${ormVersion}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drizzle-kit",
3
- "version": "0.28.1-5514d51",
3
+ "version": "0.28.1-661b6f2",
4
4
  "homepage": "https://orm.drizzle.team",
5
5
  "keywords": [
6
6
  "drizzle",