@ignisia/sql 0.2.1 → 0.2.2

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 (128) hide show
  1. package/dist/cjs/column/constants.js +101 -0
  2. package/dist/cjs/column/index.d.cts +42 -0
  3. package/dist/cjs/column/index.js +107 -0
  4. package/dist/cjs/column/types.d.cts +43 -0
  5. package/dist/cjs/column/types.js +4 -0
  6. package/dist/cjs/database/alter.d.cts +52 -0
  7. package/dist/cjs/database/alter.js +93 -0
  8. package/dist/cjs/database/column.d.cts +24 -0
  9. package/dist/cjs/database/column.js +37 -0
  10. package/dist/cjs/database/contract.d.cts +8 -0
  11. package/dist/cjs/database/contract.js +2 -0
  12. package/dist/cjs/database/index.d.cts +8 -0
  13. package/dist/cjs/database/index.js +94 -0
  14. package/dist/cjs/database/table.d.cts +21 -0
  15. package/dist/cjs/database/table.js +41 -0
  16. package/dist/cjs/database/types.d.cts +7 -0
  17. package/dist/cjs/database/types.js +2 -0
  18. package/dist/cjs/database/wrapper.d.cts +36 -0
  19. package/dist/cjs/database/wrapper.js +95 -0
  20. package/dist/cjs/index---zaMa69.d.cts +103 -0
  21. package/dist/cjs/index-CwiFQh0I.d.cts +358 -0
  22. package/dist/cjs/index.d.cts +10 -0
  23. package/dist/cjs/index.js +30 -0
  24. package/dist/cjs/migration/index.d.cts +30 -0
  25. package/dist/{migration → cjs/migration}/index.js +3 -1
  26. package/dist/cjs/migration/runner.js +58 -0
  27. package/dist/cjs/migration/type.d.cts +19 -0
  28. package/dist/cjs/migration/type.js +2 -0
  29. package/dist/cjs/package.json +3 -0
  30. package/dist/cjs/query/builder.d.cts +14 -0
  31. package/dist/cjs/query/builder.js +71 -0
  32. package/dist/cjs/query/condition.d.cts +7 -0
  33. package/dist/cjs/query/condition.js +106 -0
  34. package/dist/cjs/query/constants.js +64 -0
  35. package/dist/cjs/query/contract.d.cts +7 -0
  36. package/dist/cjs/query/contract.js +2 -0
  37. package/dist/cjs/query/helper.d.cts +7 -0
  38. package/dist/cjs/query/helper.js +36 -0
  39. package/dist/cjs/query/index.d.cts +7 -0
  40. package/dist/cjs/query/index.js +197 -0
  41. package/dist/cjs/query/join.d.cts +16 -0
  42. package/dist/cjs/query/join.js +18 -0
  43. package/dist/cjs/query/sql.d.cts +17 -0
  44. package/dist/cjs/query/sql.js +104 -0
  45. package/dist/cjs/query/types.d.cts +7 -0
  46. package/dist/cjs/query/types.js +2 -0
  47. package/dist/cjs/query/utilities.d.cts +34 -0
  48. package/dist/cjs/query/utilities.js +184 -0
  49. package/dist/cjs/table/constants.js +8 -0
  50. package/dist/cjs/table/index.d.cts +7 -0
  51. package/dist/cjs/table/index.js +54 -0
  52. package/dist/cjs/table/types.d.cts +7 -0
  53. package/dist/cjs/table/types.js +2 -0
  54. package/dist/cjs/table/utilities.d.cts +7 -0
  55. package/dist/cjs/table/utilities.js +55 -0
  56. package/dist/cjs/types.js +2 -0
  57. package/dist/cjs/utilities.js +21 -0
  58. package/dist/esm/column/constants.d.ts +97 -0
  59. package/dist/{column → esm/column}/constants.js +4 -3
  60. package/dist/{column → esm/column}/index.js +6 -5
  61. package/dist/esm/column/types.js +1 -0
  62. package/dist/{database → esm/database}/alter.js +2 -1
  63. package/dist/{database → esm/database}/column.js +2 -1
  64. package/dist/{database → esm/database}/index.js +10 -9
  65. package/dist/{database → esm/database}/table.js +2 -1
  66. package/dist/{database → esm/database}/wrapper.js +6 -5
  67. package/dist/esm/index.js +5 -0
  68. package/dist/esm/migration/index.js +49 -0
  69. package/dist/esm/migration/runner.d.ts +3 -0
  70. package/dist/{migration → esm/migration}/runner.js +6 -5
  71. package/dist/{query → esm/query}/builder.js +3 -2
  72. package/dist/{query → esm/query}/condition.js +4 -3
  73. package/dist/esm/query/constants.d.ts +63 -0
  74. package/dist/{query → esm/query}/constants.js +9 -8
  75. package/dist/{query → esm/query}/helper.js +3 -2
  76. package/dist/{query → esm/query}/index.js +10 -9
  77. package/dist/{query → esm/query}/join.js +1 -0
  78. package/dist/{query → esm/query}/sql.js +4 -3
  79. package/dist/{query → esm/query}/utilities.js +5 -4
  80. package/dist/esm/table/constants.d.ts +7 -0
  81. package/dist/{table → esm/table}/constants.js +2 -1
  82. package/dist/{table → esm/table}/index.js +6 -5
  83. package/dist/{table → esm/table}/utilities.js +5 -4
  84. package/dist/esm/types.d.ts +3 -0
  85. package/dist/esm/utilities.d.ts +4 -0
  86. package/dist/{utilities.js → esm/utilities.js} +1 -0
  87. package/package.json +42 -19
  88. package/dist/column/types.js +0 -1
  89. package/dist/index.js +0 -5
  90. /package/dist/{column/constants.d.ts → cjs/column/constants.d.cts} +0 -0
  91. /package/dist/{migration/runner.d.ts → cjs/migration/runner.d.cts} +0 -0
  92. /package/dist/{query/constants.d.ts → cjs/query/constants.d.cts} +0 -0
  93. /package/dist/{table/constants.d.ts → cjs/table/constants.d.cts} +0 -0
  94. /package/dist/{types.d.ts → cjs/types.d.cts} +0 -0
  95. /package/dist/{utilities.d.ts → cjs/utilities.d.cts} +0 -0
  96. /package/dist/{column → esm/column}/index.d.ts +0 -0
  97. /package/dist/{column → esm/column}/types.d.ts +0 -0
  98. /package/dist/{database → esm/database}/alter.d.ts +0 -0
  99. /package/dist/{database → esm/database}/column.d.ts +0 -0
  100. /package/dist/{database → esm/database}/contract.d.ts +0 -0
  101. /package/dist/{database → esm/database}/contract.js +0 -0
  102. /package/dist/{database → esm/database}/index.d.ts +0 -0
  103. /package/dist/{database → esm/database}/table.d.ts +0 -0
  104. /package/dist/{database → esm/database}/types.d.ts +0 -0
  105. /package/dist/{database → esm/database}/types.js +0 -0
  106. /package/dist/{database → esm/database}/wrapper.d.ts +0 -0
  107. /package/dist/{index-DFrpzXEn.d.ts → esm/index-DFrpzXEn.d.ts} +0 -0
  108. /package/dist/{index-FMT0YEO7.d.ts → esm/index-FMT0YEO7.d.ts} +0 -0
  109. /package/dist/{index.d.ts → esm/index.d.ts} +0 -0
  110. /package/dist/{migration → esm/migration}/index.d.ts +0 -0
  111. /package/dist/{migration → esm/migration}/type.d.ts +0 -0
  112. /package/dist/{migration → esm/migration}/type.js +0 -0
  113. /package/dist/{query → esm/query}/builder.d.ts +0 -0
  114. /package/dist/{query → esm/query}/condition.d.ts +0 -0
  115. /package/dist/{query → esm/query}/contract.d.ts +0 -0
  116. /package/dist/{query → esm/query}/contract.js +0 -0
  117. /package/dist/{query → esm/query}/helper.d.ts +0 -0
  118. /package/dist/{query → esm/query}/index.d.ts +0 -0
  119. /package/dist/{query → esm/query}/join.d.ts +0 -0
  120. /package/dist/{query → esm/query}/sql.d.ts +0 -0
  121. /package/dist/{query → esm/query}/types.d.ts +0 -0
  122. /package/dist/{query → esm/query}/types.js +0 -0
  123. /package/dist/{query → esm/query}/utilities.d.ts +0 -0
  124. /package/dist/{table → esm/table}/index.d.ts +0 -0
  125. /package/dist/{table → esm/table}/types.d.ts +0 -0
  126. /package/dist/{table → esm/table}/types.js +0 -0
  127. /package/dist/{table → esm/table}/utilities.d.ts +0 -0
  128. /package/dist/{types.js → esm/types.js} +0 -0
@@ -0,0 +1,49 @@
1
+ // src/migration/index.ts
2
+ var Migration = class _Migration {
3
+ db;
4
+ _up;
5
+ _down;
6
+ constructor(options) {
7
+ this.db = options.db;
8
+ this._up = options.up;
9
+ this._down = options.down;
10
+ }
11
+ get up() {
12
+ return this._up;
13
+ }
14
+ get down() {
15
+ return this._down;
16
+ }
17
+ static setUp(migrator, fn) {
18
+ migrator._up = () => fn(migrator.db);
19
+ return migrator;
20
+ }
21
+ static setDown(migrator, fn) {
22
+ migrator._down = () => fn(migrator.db);
23
+ return migrator;
24
+ }
25
+ static define(db, options) {
26
+ const migration = new _Migration({
27
+ db,
28
+ up: options?.up ? () => options.up(db) : null,
29
+ down: options?.down ? () => options.down(db) : null
30
+ });
31
+ return {
32
+ migration,
33
+ setUp(fn) {
34
+ return _Migration.setUp(
35
+ migration,
36
+ fn
37
+ );
38
+ },
39
+ setDown(fn) {
40
+ return _Migration.setDown(
41
+ migration,
42
+ fn
43
+ );
44
+ }
45
+ };
46
+ }
47
+ };
48
+
49
+ export { Migration };
@@ -0,0 +1,3 @@
1
+ declare function runMigration(filePath: string, direction: 'up' | 'down'): Promise<void>;
2
+
3
+ export { runMigration };
@@ -1,14 +1,15 @@
1
- import { Column } from '../column';
2
- import { Table } from '../table';
1
+ import { Column } from '../column/index.js';
2
+ import { Table } from '../table/index.js';
3
3
 
4
- const nameColumn = Column.define({
4
+ // src/migration/runner.ts
5
+ var nameColumn = Column.define({
5
6
  type: "TEXT",
6
7
  length: 255
7
8
  }).primaryKey().notNull();
8
- const runAtColumn = Column.define({
9
+ var runAtColumn = Column.define({
9
10
  type: "DATETIME"
10
11
  }).notNull();
11
- let migrationTable = null;
12
+ var migrationTable = null;
12
13
  async function runMigration(filePath, direction) {
13
14
  const migrationFile = await import(filePath);
14
15
  const fileName = filePath.split("/").pop();
@@ -1,6 +1,7 @@
1
- import { quoteIdentifier } from '../utilities';
2
- import { getTableSelectName } from './utilities';
1
+ import { quoteIdentifier } from '../utilities.js';
2
+ import { getTableSelectName } from './utilities.js';
3
3
 
4
+ // src/query/builder.ts
4
5
  function buildSelectQuery(q) {
5
6
  const from = getTableSelectName(q);
6
7
  const columns = [];
@@ -1,7 +1,8 @@
1
- import { LogicalOperator, ConditionClause, AcceptedOperator } from './constants';
2
- import { rawCol } from './helper';
3
- import { getCondition } from './utilities';
1
+ import { LogicalOperator, ConditionClause, AcceptedOperator } from './constants.js';
2
+ import { rawCol } from './helper.js';
3
+ import { getCondition } from './utilities.js';
4
4
 
5
+ // src/query/condition.ts
5
6
  function addRawCondition(query, clause, column, logical, params) {
6
7
  const validClause = clause.toLowerCase();
7
8
  if (!query.definition[validClause]) query.definition[validClause] = [];
@@ -0,0 +1,63 @@
1
+ declare const LogicalOperator: {
2
+ readonly AND: "AND";
3
+ readonly OR: "OR";
4
+ };
5
+ type LogicalOperator = (typeof LogicalOperator)[keyof typeof LogicalOperator];
6
+ declare const ConditionClause: {
7
+ readonly WHERE: "WHERE";
8
+ readonly HAVING: "HAVING";
9
+ };
10
+ type ConditionClause = (typeof ConditionClause)[keyof typeof ConditionClause];
11
+ declare const AcceptedOperator: {
12
+ readonly EQ: "eq";
13
+ readonly NE: "ne";
14
+ readonly GT: "gt";
15
+ readonly LT: "lt";
16
+ readonly GTE: "gte";
17
+ readonly LTE: "lte";
18
+ readonly IN: "in";
19
+ readonly NOT_IN: "notIn";
20
+ readonly LIKE: "like";
21
+ readonly NOT_LIKE: "notLike";
22
+ readonly ILIKE: "ilike";
23
+ readonly NOT_ILIKE: "notILike";
24
+ readonly IS_NULL: "isNull";
25
+ readonly IS_NOT_NULL: "isNotNull";
26
+ readonly BETWEEN: "between";
27
+ readonly NOT_BETWEEN: "notBetween";
28
+ };
29
+ type AcceptedOperator = (typeof AcceptedOperator)[keyof typeof AcceptedOperator];
30
+ declare const QueryType: {
31
+ readonly SELECT: "SELECT";
32
+ readonly INSERT: "INSERT";
33
+ readonly UPDATE: "UPDATE";
34
+ readonly DELETE: "DELETE";
35
+ };
36
+ type QueryType = (typeof QueryType)[keyof typeof QueryType];
37
+ declare const OrderBy: {
38
+ readonly ASC: "ASC";
39
+ readonly DESC: "DESC";
40
+ };
41
+ type OrderBy = (typeof OrderBy)[keyof typeof OrderBy];
42
+ declare const AggregationFunction: {
43
+ readonly COUNT: "COUNT";
44
+ readonly SUM: "SUM";
45
+ readonly MIN: "MIN";
46
+ readonly MAX: "MAX";
47
+ readonly AVG: "AVG";
48
+ };
49
+ type AggregationFunction = (typeof AggregationFunction)[keyof typeof AggregationFunction];
50
+ declare const AcceptedJoin: {
51
+ readonly INNER: "INNER";
52
+ readonly LEFT: "LEFT";
53
+ readonly RIGHT: "RIGHT";
54
+ readonly NATURAL: "NATURAL";
55
+ };
56
+ type AcceptedJoin = (typeof AcceptedJoin)[keyof typeof AcceptedJoin];
57
+ declare const QueryHooksType: {
58
+ readonly AFTER: "after";
59
+ readonly BEFORE: "before";
60
+ };
61
+ type QueryHooksType = (typeof QueryHooksType)[keyof typeof QueryHooksType];
62
+
63
+ export { AcceptedJoin, AcceptedOperator, AggregationFunction, ConditionClause, LogicalOperator, OrderBy, QueryHooksType, QueryType };
@@ -1,12 +1,13 @@
1
- const LogicalOperator = {
1
+ // src/query/constants.ts
2
+ var LogicalOperator = {
2
3
  AND: "AND",
3
4
  OR: "OR"
4
5
  };
5
- const ConditionClause = {
6
+ var ConditionClause = {
6
7
  WHERE: "WHERE",
7
8
  HAVING: "HAVING"
8
9
  };
9
- const AcceptedOperator = {
10
+ var AcceptedOperator = {
10
11
  EQ: "eq",
11
12
  NE: "ne",
12
13
  GT: "gt",
@@ -24,30 +25,30 @@ const AcceptedOperator = {
24
25
  BETWEEN: "between",
25
26
  NOT_BETWEEN: "notBetween"
26
27
  };
27
- const QueryType = {
28
+ var QueryType = {
28
29
  SELECT: "SELECT",
29
30
  INSERT: "INSERT",
30
31
  UPDATE: "UPDATE",
31
32
  DELETE: "DELETE"
32
33
  };
33
- const OrderBy = {
34
+ var OrderBy = {
34
35
  ASC: "ASC",
35
36
  DESC: "DESC"
36
37
  };
37
- const AggregationFunction = {
38
+ var AggregationFunction = {
38
39
  COUNT: "COUNT",
39
40
  SUM: "SUM",
40
41
  MIN: "MIN",
41
42
  MAX: "MAX",
42
43
  AVG: "AVG"
43
44
  };
44
- const AcceptedJoin = {
45
+ var AcceptedJoin = {
45
46
  INNER: "INNER",
46
47
  LEFT: "LEFT",
47
48
  RIGHT: "RIGHT",
48
49
  NATURAL: "NATURAL"
49
50
  };
50
- const QueryHooksType = {
51
+ var QueryHooksType = {
51
52
  AFTER: "after",
52
53
  BEFORE: "before"
53
54
  };
@@ -1,6 +1,7 @@
1
- import { QueryBuilder } from '.';
2
- import { deepClone } from '../utilities';
1
+ import { QueryBuilder } from './index.js';
2
+ import { deepClone } from '../utilities.js';
3
3
 
4
+ // src/query/helper.ts
4
5
  function alias(alias2) {
5
6
  this.definition.baseAlias = alias2;
6
7
  return this;
@@ -1,12 +1,13 @@
1
- import { quoteIdentifier } from '../utilities';
2
- import { rawWhere, rawHaving, rawOr, where, having, or } from './condition';
3
- import { AcceptedJoin, QueryType } from './constants';
4
- import { alias, clone, aggregateCol, col } from './helper';
5
- import { addJoin } from './join';
6
- import { toQuery, toString, exec } from './sql';
7
- import { getTimestamp, getParanoid } from './utilities';
1
+ import { quoteIdentifier } from '../utilities.js';
2
+ import { rawWhere, rawHaving, rawOr, where, having, or } from './condition.js';
3
+ import { AcceptedJoin, QueryType } from './constants.js';
4
+ import { alias, clone, aggregateCol, col } from './helper.js';
5
+ import { addJoin } from './join.js';
6
+ import { toQuery, toString, exec } from './sql.js';
7
+ import { getTimestamp, getParanoid } from './utilities.js';
8
8
 
9
- class QueryBuilder {
9
+ // src/query/index.ts
10
+ var QueryBuilder = class {
10
11
  hooks;
11
12
  table;
12
13
  definition;
@@ -190,6 +191,6 @@ class QueryBuilder {
190
191
  infer() {
191
192
  return null;
192
193
  }
193
- }
194
+ };
194
195
 
195
196
  export { QueryBuilder };
@@ -1,3 +1,4 @@
1
+ // src/query/join.ts
1
2
  function addJoin(query, joinType, alias, joinTable, baseColumn, joinColumn) {
2
3
  if (!query.definition.joins) query.definition.joins = [];
3
4
  query.definition.joins.push(
@@ -1,7 +1,8 @@
1
- import { buildDeleteQuery, buildUpdateQuery, buildInsertQuery, buildSelectQuery } from './builder';
2
- import { QueryType, QueryHooksType } from './constants';
3
- import { getWhereConditions, getGroupByConditions, parseAliasedRow } from './utilities';
1
+ import { buildDeleteQuery, buildUpdateQuery, buildInsertQuery, buildSelectQuery } from './builder.js';
2
+ import { QueryType, QueryHooksType } from './constants.js';
3
+ import { getWhereConditions, getGroupByConditions, parseAliasedRow } from './utilities.js';
4
4
 
5
+ // src/query/sql.ts
5
6
  function buildQuery(query) {
6
7
  let index = 0;
7
8
  return query.replace(/\?/g, () => {
@@ -1,8 +1,9 @@
1
- import '.';
2
- import { Dialect } from '../table/constants';
3
- import { quoteIdentifier } from '../utilities';
4
- import { AcceptedOperator, QueryType } from './constants';
1
+ import './index.js';
2
+ import { Dialect } from '../table/constants.js';
3
+ import { quoteIdentifier } from '../utilities.js';
4
+ import { AcceptedOperator, QueryType } from './constants.js';
5
5
 
6
+ // src/query/utilities.ts
6
7
  function getTableColumnNames(column, baseAlias, baseTable, joinedTables) {
7
8
  const [tableAlias] = column.split(".");
8
9
  const isOnBase = tableAlias === baseAlias;
@@ -0,0 +1,7 @@
1
+ declare const Dialect: {
2
+ readonly POSTGRES: "postgres";
3
+ readonly SQLITE: "sqlite";
4
+ };
5
+ type Dialect = (typeof Dialect)[keyof typeof Dialect];
6
+
7
+ export { Dialect };
@@ -1,4 +1,5 @@
1
- const Dialect = {
1
+ // src/table/constants.ts
2
+ var Dialect = {
2
3
  POSTGRES: "postgres",
3
4
  SQLITE: "sqlite"
4
5
  };
@@ -1,7 +1,8 @@
1
- import { QueryBuilder } from '../query';
2
- import { defineColumns } from './utilities';
1
+ import { QueryBuilder } from '../query/index.js';
2
+ import { defineColumns } from './utilities.js';
3
3
 
4
- class Table {
4
+ // src/table/index.ts
5
+ var Table = class _Table {
5
6
  client;
6
7
  dialect;
7
8
  name;
@@ -25,7 +26,7 @@ class Table {
25
26
  }
26
27
  static define(options) {
27
28
  const columns = defineColumns(options);
28
- return new Table({
29
+ return new _Table({
29
30
  ...options,
30
31
  columns
31
32
  });
@@ -47,6 +48,6 @@ class Table {
47
48
  query() {
48
49
  return new QueryBuilder(this);
49
50
  }
50
- }
51
+ };
51
52
 
52
53
  export { Table };
@@ -1,12 +1,13 @@
1
- import { Column } from '../column';
1
+ import { Column } from '../column/index.js';
2
2
 
3
- const createdAt = Column.define({
3
+ // src/table/utilities.ts
4
+ var createdAt = Column.define({
4
5
  type: "DATETIME"
5
6
  }).default("CURRENT_TIMESTAMP");
6
- const updatedAt = Column.define({
7
+ var updatedAt = Column.define({
7
8
  type: "DATETIME"
8
9
  });
9
- const deletedAt = Column.define({
10
+ var deletedAt = Column.define({
10
11
  type: "DATETIME"
11
12
  });
12
13
  function defineColumns(options) {
@@ -0,0 +1,3 @@
1
+ type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
2
+
3
+ export type { UnionToIntersection };
@@ -0,0 +1,4 @@
1
+ declare function deepClone<T>(obj: T): T;
2
+ declare function quoteIdentifier<T extends string, U extends `"${T}"`>(identifier: T): U;
3
+
4
+ export { deepClone, quoteIdentifier };
@@ -1,3 +1,4 @@
1
+ // src/utilities.ts
1
2
  function deepClone(obj) {
2
3
  if (Array.isArray(obj)) {
3
4
  return obj.map((item) => deepClone(item));
package/package.json CHANGED
@@ -1,42 +1,51 @@
1
1
  {
2
2
  "name": "@ignisia/sql",
3
- "module": "dist/index.js",
4
- "types": "./dist/index.d.ts",
5
- "version": "0.2.1",
3
+ "main": "dist/cjs/index.js",
4
+ "module": "dist/esm/index.js",
5
+ "types": "./dist/esm/index.d.ts",
6
+ "version": "0.2.2",
6
7
  "type": "module",
7
8
  "exports": {
8
9
  ".": {
9
- "import": "./dist/index.js",
10
- "types": "./dist/index.d.ts"
10
+ "types": "./dist/esm/index.d.ts",
11
+ "import": "./dist/esm/index.js",
12
+ "require": "./dist/cjs/index.js"
11
13
  },
12
14
  "./*": {
13
- "import": "./dist/*.js",
14
- "types": "./dist/*.d.ts"
15
+ "types": "./dist/esm/*.d.ts",
16
+ "import": "./dist/esm/*.js",
17
+ "require": "./dist/cjs/*.js"
15
18
  },
16
19
  "./**/*": {
17
- "import": "./dist/**/*.js",
18
- "types": "./dist/**/*.d.ts"
20
+ "types": "./dist/esm/**/*.d.ts",
21
+ "import": "./dist/esm/**/*.js",
22
+ "require": "./dist/cjs/**/*.js"
19
23
  },
20
24
  "./package.json": "./package.json",
21
25
  "./column": {
22
- "import": "./dist/column/index.js",
23
- "types": "./dist/column/index.d.ts"
26
+ "types": "./dist/esm/column/index.d.ts",
27
+ "import": "./dist/esm/column/index.js",
28
+ "require": "./dist/cjs/column/index.js"
24
29
  },
25
30
  "./database": {
26
- "import": "./dist/database/index.js",
27
- "types": "./dist/database/index.d.ts"
31
+ "types": "./dist/esm/database/index.d.ts",
32
+ "import": "./dist/esm/database/index.js",
33
+ "require": "./dist/cjs/database/index.js"
28
34
  },
29
35
  "./migration": {
30
- "import": "./dist/migration/index.js",
31
- "types": "./dist/migration/index.d.ts"
36
+ "types": "./dist/esm/migration/index.d.ts",
37
+ "import": "./dist/esm/migration/index.js",
38
+ "require": "./dist/cjs/migration/index.js"
32
39
  },
33
40
  "./query": {
34
- "import": "./dist/query/index.js",
35
- "types": "./dist/query/index.d.ts"
41
+ "types": "./dist/esm/query/index.d.ts",
42
+ "import": "./dist/esm/query/index.js",
43
+ "require": "./dist/cjs/query/index.js"
36
44
  },
37
45
  "./table": {
38
- "import": "./dist/table/index.js",
39
- "types": "./dist/table/index.d.ts"
46
+ "types": "./dist/esm/table/index.d.ts",
47
+ "import": "./dist/esm/table/index.js",
48
+ "require": "./dist/cjs/table/index.js"
40
49
  }
41
50
  },
42
51
  "scripts": {
@@ -51,5 +60,19 @@
51
60
  },
52
61
  "files": [
53
62
  "dist"
63
+ ],
64
+ "repository": {
65
+ "type": "git",
66
+ "url": "git+https://github.com/krsbx/aio-web.git"
67
+ },
68
+ "bugs": {
69
+ "url": "https://github.com/krsbx/aio-web/issues"
70
+ },
71
+ "keywords": [
72
+ "bun",
73
+ "sql",
74
+ "database",
75
+ "sqlite",
76
+ "postgres"
54
77
  ]
55
78
  }
@@ -1 +0,0 @@
1
- import './constants';
package/dist/index.js DELETED
@@ -1,5 +0,0 @@
1
- export { Column } from './column';
2
- export { Database } from './database';
3
- export { Migration } from './migration';
4
- export { QueryBuilder } from './query';
5
- export { Table } from './table';
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes