orange-orm 5.2.0-beta.0 → 5.2.1
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/README.md +20 -37
- package/SKILL.md +1377 -0
- package/context7.json +4 -0
- package/dist/index.mjs +35 -20
- package/docs/changelog.md +6 -0
- package/package.json +4 -4
- package/src/bunPg/encodeJSON.js +6 -0
- package/src/bunPg/newTransaction.js +1 -1
- package/docs/docs.md +0 -2374
- package/other.db +0 -0
package/context7.json
ADDED
package/dist/index.mjs
CHANGED
|
@@ -16958,28 +16958,19 @@ function requireFormatJSONIn () {
|
|
|
16958
16958
|
return formatJSONIn_1;
|
|
16959
16959
|
}
|
|
16960
16960
|
|
|
16961
|
-
var encodeJSON;
|
|
16962
|
-
var hasRequiredEncodeJSON;
|
|
16963
|
-
|
|
16964
|
-
function requireEncodeJSON () {
|
|
16965
|
-
if (hasRequiredEncodeJSON) return encodeJSON;
|
|
16966
|
-
hasRequiredEncodeJSON = 1;
|
|
16967
|
-
function encode(arg) {
|
|
16968
|
-
if (Array.isArray(arg))
|
|
16969
|
-
return new JsonBArrayParam(arg);
|
|
16970
|
-
else
|
|
16971
|
-
return arg;
|
|
16972
|
-
}
|
|
16961
|
+
var encodeJSON$1;
|
|
16962
|
+
var hasRequiredEncodeJSON$1;
|
|
16973
16963
|
|
|
16974
|
-
|
|
16975
|
-
|
|
16976
|
-
|
|
16977
|
-
|
|
16978
|
-
|
|
16964
|
+
function requireEncodeJSON$1 () {
|
|
16965
|
+
if (hasRequiredEncodeJSON$1) return encodeJSON$1;
|
|
16966
|
+
hasRequiredEncodeJSON$1 = 1;
|
|
16967
|
+
function encode(value) {
|
|
16968
|
+
// Bun SQL rejects proxied objects as PG params; normalize to plain JSON value.
|
|
16969
|
+
return JSON.parse(JSON.stringify(value));
|
|
16979
16970
|
}
|
|
16980
16971
|
|
|
16981
|
-
encodeJSON = encode;
|
|
16982
|
-
return encodeJSON;
|
|
16972
|
+
encodeJSON$1 = encode;
|
|
16973
|
+
return encodeJSON$1;
|
|
16983
16974
|
}
|
|
16984
16975
|
|
|
16985
16976
|
var newTransaction$9;
|
|
@@ -16998,7 +16989,7 @@ function requireNewTransaction$9 () {
|
|
|
16998
16989
|
var limitAndOffset = requireLimitAndOffset$4();
|
|
16999
16990
|
var formatDateOut = requireFormatDateOut$3();
|
|
17000
16991
|
var formatJSONIn = requireFormatJSONIn();
|
|
17001
|
-
var encodeJSON = requireEncodeJSON();
|
|
16992
|
+
var encodeJSON = requireEncodeJSON$1();
|
|
17002
16993
|
var insertSql = requireInsertSql$4();
|
|
17003
16994
|
var insert = requireInsert$4();
|
|
17004
16995
|
var quote = requireQuote$4();
|
|
@@ -17463,6 +17454,30 @@ function requireEncodeBoolean$4 () {
|
|
|
17463
17454
|
return encodeBoolean_1$4;
|
|
17464
17455
|
}
|
|
17465
17456
|
|
|
17457
|
+
var encodeJSON;
|
|
17458
|
+
var hasRequiredEncodeJSON;
|
|
17459
|
+
|
|
17460
|
+
function requireEncodeJSON () {
|
|
17461
|
+
if (hasRequiredEncodeJSON) return encodeJSON;
|
|
17462
|
+
hasRequiredEncodeJSON = 1;
|
|
17463
|
+
function encode(arg) {
|
|
17464
|
+
if (Array.isArray(arg))
|
|
17465
|
+
return new JsonBArrayParam(arg);
|
|
17466
|
+
else
|
|
17467
|
+
return arg;
|
|
17468
|
+
}
|
|
17469
|
+
|
|
17470
|
+
class JsonBArrayParam {
|
|
17471
|
+
constructor(actualArray) { this.actualArray = actualArray; }
|
|
17472
|
+
toPostgres() {
|
|
17473
|
+
return JSON.stringify(this.actualArray);
|
|
17474
|
+
}
|
|
17475
|
+
}
|
|
17476
|
+
|
|
17477
|
+
encodeJSON = encode;
|
|
17478
|
+
return encodeJSON;
|
|
17479
|
+
}
|
|
17480
|
+
|
|
17466
17481
|
var newTransaction$8;
|
|
17467
17482
|
var hasRequiredNewTransaction$8;
|
|
17468
17483
|
|
package/docs/changelog.md
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
## Changelog
|
|
2
|
+
__5.2.1__
|
|
3
|
+
Bugfix: Bun Postgres fails on proxied JSON params [#158](https://github.com/alfateam/orange-orm/issues/158)
|
|
4
|
+
__5.2.0__
|
|
5
|
+
Distinct aggregates via `distinct()` [#119](https://github.com/alfateam/orange-orm/issues/119)
|
|
6
|
+
Column-to-column filters (incl. `contains`, `startsWith`, `endsWith`) [#150](htps://github.com/alfateam/orange-orm/issues/150)
|
|
7
|
+
Relation count filters: `x.lines.count()` with optional predicate [#151](htps://github.com/alfateam/orange-orm/issues/151)
|
|
2
8
|
__5.1.0__
|
|
3
9
|
Support for Hono [#149](https://github.com/alfateam/orange-orm/issues/149)
|
|
4
10
|
Removed dependency `glob`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "orange-orm",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -128,13 +128,13 @@
|
|
|
128
128
|
"@rollup/plugin-commonjs": "^28.0.2",
|
|
129
129
|
"@rollup/plugin-json": "^6.1.0",
|
|
130
130
|
"@rollup/plugin-node-resolve": "^13.0.0",
|
|
131
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
132
|
-
"@typescript-eslint/parser": "^
|
|
131
|
+
"@typescript-eslint/eslint-plugin": "^8.56.1",
|
|
132
|
+
"@typescript-eslint/parser": "^8.56.1",
|
|
133
133
|
"@vitest/coverage-v8": "^3.2.4",
|
|
134
134
|
"better-sqlite3": "^12.6.2",
|
|
135
135
|
"cors": "^2.8.5",
|
|
136
136
|
"eslint": "^8.57.0",
|
|
137
|
-
"eslint-plugin-jest": "^
|
|
137
|
+
"eslint-plugin-jest": "^29.15.0",
|
|
138
138
|
"express": "^4.18.2",
|
|
139
139
|
"hono": "^4.8.2",
|
|
140
140
|
"msnodesqlv8": "^4.1.0",
|
|
@@ -8,7 +8,7 @@ var selectForUpdateSql = require('../pg/selectForUpdateSql');
|
|
|
8
8
|
var limitAndOffset = require('../pg/limitAndOffset');
|
|
9
9
|
var formatDateOut = require('../pg/formatDateOut');
|
|
10
10
|
var formatJSONIn = require('./formatJSONIn');
|
|
11
|
-
var encodeJSON = require('
|
|
11
|
+
var encodeJSON = require('./encodeJSON');
|
|
12
12
|
var insertSql = require('../pg/insertSql');
|
|
13
13
|
var insert = require('../pg/insert');
|
|
14
14
|
var quote = require('../pg/quote');
|