orchid-orm 1.5.4 → 1.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/index.js +22 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/codegen/tsUtils.ts +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# orchid-orm
|
|
2
2
|
|
|
3
|
+
## 1.5.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- pqb@0.9.6
|
|
9
|
+
|
|
10
|
+
## 1.5.6
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
- pqb@0.9.5
|
|
16
|
+
|
|
17
|
+
## 1.5.5
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- ESM support for orm
|
|
22
|
+
|
|
3
23
|
## 1.5.4
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -30,6 +30,7 @@ function _interopNamespace(e) {
|
|
|
30
30
|
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
|
|
31
31
|
var path__namespace = /*#__PURE__*/_interopNamespace(path);
|
|
32
32
|
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
|
|
33
|
+
var typescript__default = /*#__PURE__*/_interopDefaultLegacy(typescript);
|
|
33
34
|
|
|
34
35
|
const createBaseTable = (options) => {
|
|
35
36
|
return class BaseTable {
|
|
@@ -1446,6 +1447,7 @@ class FileChanges {
|
|
|
1446
1447
|
}
|
|
1447
1448
|
}
|
|
1448
1449
|
|
|
1450
|
+
const { createSourceFile, ScriptTarget, SyntaxKind } = typescript__default["default"];
|
|
1449
1451
|
const iterate = (kind) => {
|
|
1450
1452
|
return function* (statements) {
|
|
1451
1453
|
for (const node of statements) {
|
|
@@ -1462,47 +1464,47 @@ const isNode = (kind) => {
|
|
|
1462
1464
|
};
|
|
1463
1465
|
const ts = {
|
|
1464
1466
|
getStatements(content) {
|
|
1465
|
-
const { statements } =
|
|
1467
|
+
const { statements } = createSourceFile(
|
|
1466
1468
|
"file.ts",
|
|
1467
1469
|
content,
|
|
1468
|
-
|
|
1470
|
+
ScriptTarget.Latest,
|
|
1469
1471
|
true
|
|
1470
1472
|
);
|
|
1471
1473
|
return statements;
|
|
1472
1474
|
},
|
|
1473
1475
|
is: {
|
|
1474
|
-
call: isNode(
|
|
1476
|
+
call: isNode(SyntaxKind.CallExpression),
|
|
1475
1477
|
objectLiteral: isNode(
|
|
1476
|
-
|
|
1478
|
+
SyntaxKind.ObjectLiteralExpression
|
|
1477
1479
|
),
|
|
1478
1480
|
propertyAssignment: isNode(
|
|
1479
|
-
|
|
1481
|
+
SyntaxKind.PropertyAssignment
|
|
1480
1482
|
),
|
|
1481
1483
|
shorthandPropertyAssignment: isNode(
|
|
1482
|
-
|
|
1484
|
+
SyntaxKind.ShorthandPropertyAssignment
|
|
1483
1485
|
),
|
|
1484
|
-
identifier: isNode(
|
|
1485
|
-
stringLiteral: isNode(
|
|
1486
|
+
identifier: isNode(SyntaxKind.Identifier),
|
|
1487
|
+
stringLiteral: isNode(SyntaxKind.StringLiteral),
|
|
1486
1488
|
arrayLiteral: isNode(
|
|
1487
|
-
|
|
1489
|
+
SyntaxKind.ArrayLiteralExpression
|
|
1488
1490
|
),
|
|
1489
|
-
numericLiteral: isNode(
|
|
1491
|
+
numericLiteral: isNode(SyntaxKind.NumericLiteral),
|
|
1490
1492
|
computedPropertyName: isNode(
|
|
1491
|
-
|
|
1493
|
+
SyntaxKind.ComputedPropertyName
|
|
1492
1494
|
),
|
|
1493
|
-
privateIdentifier: isNode(
|
|
1494
|
-
this: isNode(
|
|
1495
|
+
privateIdentifier: isNode(SyntaxKind.PrivateIdentifier),
|
|
1496
|
+
this: isNode(SyntaxKind.ThisKeyword),
|
|
1495
1497
|
propertyAccess: isNode(
|
|
1496
|
-
|
|
1498
|
+
SyntaxKind.PropertyAccessExpression
|
|
1497
1499
|
),
|
|
1498
|
-
arrowFunction: isNode(
|
|
1500
|
+
arrowFunction: isNode(SyntaxKind.ArrowFunction),
|
|
1499
1501
|
parenthesizedExpression: isNode(
|
|
1500
|
-
|
|
1502
|
+
SyntaxKind.ParenthesizedExpression
|
|
1501
1503
|
),
|
|
1502
|
-
spreadAssignment: isNode(
|
|
1504
|
+
spreadAssignment: isNode(SyntaxKind.SpreadAssignment)
|
|
1503
1505
|
},
|
|
1504
1506
|
import: {
|
|
1505
|
-
iterate: iterate(
|
|
1507
|
+
iterate: iterate(SyntaxKind.ImportDeclaration),
|
|
1506
1508
|
*iterateWithSource(statements, path) {
|
|
1507
1509
|
for (const node of ts.import.iterate(statements)) {
|
|
1508
1510
|
if (ts.import.getSource(node) !== path)
|
|
@@ -1544,7 +1546,7 @@ const ts = {
|
|
|
1544
1546
|
}
|
|
1545
1547
|
},
|
|
1546
1548
|
variable: {
|
|
1547
|
-
iterate: iterate(
|
|
1549
|
+
iterate: iterate(SyntaxKind.VariableStatement),
|
|
1548
1550
|
*iterateDeclarations(statements) {
|
|
1549
1551
|
for (const node of ts.variable.iterate(statements)) {
|
|
1550
1552
|
for (const dec of node.declarationList.declarations) {
|
|
@@ -1554,7 +1556,7 @@ const ts = {
|
|
|
1554
1556
|
}
|
|
1555
1557
|
},
|
|
1556
1558
|
class: {
|
|
1557
|
-
iterate: iterate(
|
|
1559
|
+
iterate: iterate(SyntaxKind.ClassDeclaration)
|
|
1558
1560
|
},
|
|
1559
1561
|
prop: {
|
|
1560
1562
|
getName({ name }) {
|