@balena/open-balena-api 27.2.4-build-deprecated-pinejs-client-a95baee7d396fb5fef98614cec0c92f5f2eb73ce-1 → 27.2.4-build-deprecated-pinejs-client-f5c0faedbefbddf39f451d303a1f478afeac092e-1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,3 @@
1
- import _ from 'lodash';
2
1
  import onFinished from 'on-finished';
3
2
  import { sbvrUtils, errors } from '@balena/pinejs';
4
3
  import { Supervisor } from './supervisor.js';
@@ -12,15 +11,16 @@ const { UnauthorizedError, ServiceUnavailableError, UnsupportedMediaTypeError, }
12
11
  const { api } = sbvrUtils;
13
12
  const supervisor = new Supervisor();
14
13
  const getWriteContext = (() => {
15
- const authQuery = _.once(() => api.resin.prepare({
16
- method: 'POST',
17
- url: `device(uuid=@uuid)/canAccess`,
18
- body: { action: 'write-log' },
19
- }));
20
14
  const $getWriteContext = multiCacheMemoizee(async (uuid, req) => {
21
15
  return await sbvrUtils.db.readTransaction(async (tx) => {
22
16
  try {
23
- const result = await authQuery()({ uuid }, undefined, { req, tx });
17
+ const result = await api.resin.request({
18
+ method: 'POST',
19
+ // We use a parameter alias to signify to pinejs that it's a beneficial query to cache
20
+ url: `device(uuid=@uuid)/canAccess?@uuid='${uuid}'`,
21
+ passthrough: { req, tx },
22
+ body: { action: 'write-log' },
23
+ });
24
24
  const deviceId = result?.d?.[0]?.id;
25
25
  if (deviceId == null) {
26
26
  return false;
@@ -1 +1 @@
1
- {"version":3,"file":"store.js","sourceRoot":"","sources":["../../../../src/features/device-logs/lib/store.ts"],"names":[],"mappings":"AAQA,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,UAAU,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,MAAM,MAAM,QAAQ,CAA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,wEAAwE;YACxE,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACvB,QAAQ,EAAE,CAAC;YACZ,CAAC;QACF,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACd,iBAAiB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;QAClC,CAAC;IACF,CAAC;IACD,SAAS,QAAQ;QAChB,IAAI,gBAAgB,KAAK,KAAK,EAAE,CAAC;YAChC,OAAO;QACR,CAAC;QACD,8DAA8D;QAC9D,MAAM,KAAK,GAAG,OAAO,CAAC,SAAS;YAC9B,CAAC,CAAC,0BAA0B;YAC5B,CAAC,CAAC,uCAAuC,CAAC;QAC3C,UAAU,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;QAC9B,gBAAgB,GAAG,IAAI,CAAC;IACzB,CAAC;AACF,CAAC"}
1
+ {"version":3,"file":"store.js","sourceRoot":"","sources":["../../../../src/features/device-logs/lib/store.ts"],"names":[],"mappings":"AAQA,OAAO,UAAU,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EACN,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,GACd,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACN,iBAAiB,EACjB,UAAU,EACV,cAAc,EACd,YAAY,EACZ,mBAAmB,GACnB,MAAM,aAAa,CAAC;AAErB,OAAO,EACN,oCAAoC,EACpC,uCAAuC,EACvC,0BAA0B,EAC1B,uBAAuB,EACvB,YAAY,GACZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,kBAAkB,EAClB,uBAAuB,GACvB,MAAM,+BAA+B,CAAC;AAEvC,MAAM,EACL,iBAAiB,EACj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AC,CAAC;QAC9B,gBAAgB,GAAG,IAAI,CAAC;IACzB,CAAC;AACF,CAAC"}
@@ -1,4 +1,3 @@
1
- import _ from 'lodash';
2
1
  import { sbvrUtils, errors } from '@balena/pinejs';
3
2
  import { captureException, handleHttpErrors, translateError, } from '../../infra/error-handling/index.js';
4
3
  import { multiCacheMemoizee, reqPermissionNormalizer, } from '../../infra/cache/index.js';
@@ -6,15 +5,16 @@ import { VPN_AUTH_CACHE_TIMEOUT } from '../../lib/config.js';
6
5
  import { checkDeviceExistsIsFrozen } from '../device-state/middleware.js';
7
6
  const { api } = sbvrUtils;
8
7
  const checkAuth = (() => {
9
- const authQuery = _.once(() => api.resin.prepare({
10
- method: 'POST',
11
- url: `device(uuid=@uuid)/canAccess`,
12
- body: { action: 'cloudlink' },
13
- }));
14
8
  return multiCacheMemoizee(async (uuid, req) => {
15
9
  try {
16
- await authQuery()({ uuid }, undefined, {
17
- req,
10
+ await api.resin.request({
11
+ method: 'POST',
12
+ // We use a parameter alias to signify to pinejs that it's a beneficial query to cache
13
+ url: `device(uuid=@uuid)/canAccess?@uuid='${uuid}'`,
14
+ passthrough: {
15
+ req,
16
+ },
17
+ body: { action: 'cloudlink' },
18
18
  });
19
19
  return 200;
20
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"services.js","sourceRoot":"","sources":["../../../src/features/vpn/services.ts"],"names":[],"mappings":"AAEA,OAAO,CAAC,MAAM,QAAQ,CAAC;AAEvB,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EACN,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,GACd,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACN,kBAAkB,EAClB,uBAAuB,GACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAE1E,MAAM,EAAE,GA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AAC;IAC3C,CAAC;AACF,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@balena/open-balena-api",
3
3
  "description": "Internet of things, Made Simple",
4
- "version": "27.2.4-build-deprecated-pinejs-client-a95baee7d396fb5fef98614cec0c92f5f2eb73ce-1",
4
+ "version": "27.2.4-build-deprecated-pinejs-client-f5c0faedbefbddf39f451d303a1f478afeac092e-1",
5
5
  "license": "AGPL-3.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -168,6 +168,6 @@
168
168
  "loader": "ts-node/esm/transpile-only"
169
169
  },
170
170
  "versionist": {
171
- "publishedAt": "2024-09-16T12:50:05.397Z"
171
+ "publishedAt": "2024-09-16T13:11:45.017Z"
172
172
  }
173
173
  }