@balena/pinejs 18.2.10-build-renovate-major-7-grunt-webpack-5cac94224c310be5da582f92319ec3cd41473e2c-1 → 19.0.0-build-pinejs-client-8-6487fd23ec0301a370dc6ff892063b88d5f8e114-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/.pinejs-cache.json +1 -1
- package/.versionbot/CHANGELOG.yml +215 -19
- package/CHANGELOG.md +32 -7
- package/VERSION +1 -1
- package/out/http-transactions/transactions.js +12 -7
- package/out/http-transactions/transactions.js.map +1 -1
- package/out/sbvr-api/sbvr-utils.d.ts +2 -6
- package/out/sbvr-api/sbvr-utils.js.map +1 -1
- package/package.json +4 -4
- package/src/http-transactions/transactions.js +12 -7
- package/src/sbvr-api/sbvr-utils.ts +3 -12
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@balena/pinejs",
|
3
|
-
"version": "
|
3
|
+
"version": "19.0.0-build-pinejs-client-8-6487fd23ec0301a370dc6ff892063b88d5f8e114-1",
|
4
4
|
"main": "out/server-glue/module",
|
5
5
|
"type": "commonjs",
|
6
6
|
"repository": "git@github.com:balena-io/pinejs.git",
|
@@ -62,7 +62,7 @@
|
|
62
62
|
"express-session": "^1.18.0",
|
63
63
|
"lodash": "^4.17.21",
|
64
64
|
"memoizee": "^0.4.17",
|
65
|
-
"pinejs-client-core": "^
|
65
|
+
"pinejs-client-core": "^8.0.0",
|
66
66
|
"randomstring": "^1.3.0",
|
67
67
|
"typed-error": "^3.2.2"
|
68
68
|
},
|
@@ -89,7 +89,7 @@
|
|
89
89
|
"grunt-gitinfo": "^0.1.9",
|
90
90
|
"grunt-text-replace": "^0.4.0",
|
91
91
|
"grunt-ts": "^6.0.0-beta.22",
|
92
|
-
"grunt-webpack": "^
|
92
|
+
"grunt-webpack": "^6.0.0",
|
93
93
|
"husky": "^9.1.6",
|
94
94
|
"json-schema-to-ts": "^3.1.1",
|
95
95
|
"lint-staged": "^15.2.10",
|
@@ -147,6 +147,6 @@
|
|
147
147
|
"recursive": true
|
148
148
|
},
|
149
149
|
"versionist": {
|
150
|
-
"publishedAt": "2024-09-
|
150
|
+
"publishedAt": "2024-09-13T13:57:27.545Z"
|
151
151
|
}
|
152
152
|
}
|
@@ -213,7 +213,8 @@ WHERE "conditional resource"."transaction" = ?;\
|
|
213
213
|
clientModel.idField +
|
214
214
|
' eq ' +
|
215
215
|
lockedRow.resource_id;
|
216
|
-
await sbvrUtils.PinejsClient.prototype.
|
216
|
+
await sbvrUtils.PinejsClient.prototype.request({
|
217
|
+
method: 'DELETE',
|
217
218
|
url,
|
218
219
|
passthrough,
|
219
220
|
});
|
@@ -228,7 +229,8 @@ WHERE "conditional resource"."transaction" = ?;\
|
|
228
229
|
clientModel,
|
229
230
|
);
|
230
231
|
body[clientModel.idField] = lockedRow.resource_id;
|
231
|
-
await sbvrUtils.PinejsClient.prototype.
|
232
|
+
await sbvrUtils.PinejsClient.prototype.request({
|
233
|
+
method: 'PUT',
|
232
234
|
url,
|
233
235
|
body,
|
234
236
|
passthrough,
|
@@ -243,11 +245,14 @@ WHERE "conditional resource"."transaction" = ?;\
|
|
243
245
|
clientModel,
|
244
246
|
);
|
245
247
|
/** @type { {[key: string]: any} } */
|
246
|
-
const result = await sbvrUtils.PinejsClient.prototype.
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
248
|
+
const result = await sbvrUtils.PinejsClient.prototype.request(
|
249
|
+
{
|
250
|
+
method: 'POST',
|
251
|
+
url,
|
252
|
+
body,
|
253
|
+
passthrough,
|
254
|
+
},
|
255
|
+
);
|
251
256
|
placeholders[placeholder].resolve(
|
252
257
|
result[clientModel.idField],
|
253
258
|
);
|
@@ -36,7 +36,7 @@ import {
|
|
36
36
|
} from '@balena/odata-to-abstract-sql';
|
37
37
|
import sbvrTypes from '@balena/sbvr-types';
|
38
38
|
import deepFreeze = require('deep-freeze');
|
39
|
-
import type {
|
39
|
+
import type { Params } from 'pinejs-client-core';
|
40
40
|
import { PinejsClientCore, type PromiseResultTypes } from 'pinejs-client-core';
|
41
41
|
|
42
42
|
import { ExtendedSBVRParser } from '../extended-sbvr-parser/extended-sbvr-parser';
|
@@ -1015,7 +1015,7 @@ export class PinejsClient<
|
|
1015
1015
|
Write: AnyObject;
|
1016
1016
|
};
|
1017
1017
|
},
|
1018
|
-
> extends PinejsClientCore<
|
1018
|
+
> extends PinejsClientCore<M> {
|
1019
1019
|
public async _request({
|
1020
1020
|
method,
|
1021
1021
|
url,
|
@@ -1046,17 +1046,8 @@ export class PinejsClient<
|
|
1046
1046
|
options: Params<M[TResource]>['options'] & { returnResource: boolean };
|
1047
1047
|
} & Params<M[TResource]>,
|
1048
1048
|
): Promise<Pick<M[TResource]['Read'], 'id'>>; // TODO: This should use the primary key rather than hardcoding `id`
|
1049
|
-
/**
|
1050
|
-
* @deprecated POSTing via `url` is deprecated
|
1051
|
-
*/
|
1052
|
-
public post<T extends Resource = AnyResource>(
|
1053
|
-
params: {
|
1054
|
-
resource?: undefined;
|
1055
|
-
url: NonNullable<Params<T>['url']>;
|
1056
|
-
} & Params<T>,
|
1057
|
-
): Promise<AnyObject>;
|
1058
1049
|
public post(params: Params): Promise<AnyObject> {
|
1059
|
-
return super.post(params as Parameters<PinejsClient['post']>[0]);
|
1050
|
+
return super.post(params as Parameters<PinejsClient<M>['post']>[0]);
|
1060
1051
|
}
|
1061
1052
|
}
|
1062
1053
|
|