@balena/open-balena-api 30.0.11-build-v2-image-env-var-device-update-trigger-cf9c7768a66a7e15cc30984f396417a9395096eb-1 → 30.0.11-build-get-write-context-58bd1e8c84c931f5fa90ddbfc01b7e13c16680b8-1

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,28 +12,28 @@ const { api } = sbvrUtils;
12
12
  const supervisor = new Supervisor();
13
13
  const getWriteContext = (() => {
14
14
  const $getWriteContext = multiCacheMemoizee(async (uuid, req) => {
15
- return await sbvrUtils.db.readTransaction(async (tx) => {
16
- try {
17
- const result = await api.resin.request({
15
+ try {
16
+ const result = await sbvrUtils.db.readTransaction(async (tx) => {
17
+ return await api.resin.request({
18
18
  method: 'POST',
19
19
  // We use a parameter alias to signify to pinejs that it's a beneficial query to cache
20
20
  url: `device(uuid=@uuid)/canAccess?@uuid='${uuid}'`,
21
21
  passthrough: { req, tx },
22
22
  body: { action: 'write-log' },
23
23
  });
24
- const deviceId = result?.d?.[0]?.id;
25
- if (deviceId == null) {
26
- return false;
27
- }
28
- return addRetentionLimit({
29
- id: deviceId,
30
- uuid,
31
- });
32
- }
33
- catch {
24
+ });
25
+ const deviceId = result?.d?.[0]?.id;
26
+ if (deviceId == null) {
34
27
  return false;
35
28
  }
36
- });
29
+ return addRetentionLimit({
30
+ id: deviceId,
31
+ uuid,
32
+ });
33
+ }
34
+ catch {
35
+ return false;
36
+ }
37
37
  }, {
38
38
  cacheKey: 'getDeviceLogsWriteContext',
39
39
  promise: true,
@@ -1 +1 @@
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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AAE,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,EACjB,uBAAuB,EACvB,yBAAyB,GACzB,GAAG,MAAM,CAAC;AACX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gB,GAAG,IAAI,CAAC;IACzB,CAAC;AACF,CAAC"}
@@ -265,26 +265,24 @@ addEnvHooks('device_service_environment_variable', async (args) => {
265
265
  }),
266
266
  ];
267
267
  });
268
- // Normally we don't expect these to return any match, since our clients
269
- // * POST image env vars before the release & images gets marked as successful
270
- // * never PATCH them after that point
271
- // * DELETEs are expected to normally only happen if the release gets DELETED,
272
- // in which case the should_be_running__release will change and trigger an update of its own.
273
268
  addEnvHooks('image_environment_variable', async (args) => {
274
- // The filter paths here should match the expand path of the state GET.
275
269
  if (args.req.body.release_image != null) {
276
270
  return {
277
- should_be_running__release: {
271
+ image_install: {
278
272
  $any: {
279
- $alias: 'r',
273
+ $alias: 'ii',
280
274
  $expr: {
281
- status: 'success',
282
- release_image: {
275
+ installs__image: {
283
276
  $any: {
284
- $alias: 'ri',
277
+ $alias: 'i',
285
278
  $expr: {
286
- ri: {
287
- id: args.req.body.release_image,
279
+ i: {
280
+ release_image: {
281
+ $any: {
282
+ $alias: 'ri',
283
+ $expr: { ri: { id: args.req.body.release_image } },
284
+ },
285
+ },
288
286
  },
289
287
  },
290
288
  },
@@ -301,20 +299,28 @@ addEnvHooks('image_environment_variable', async (args) => {
301
299
  return [
302
300
  envVarIds,
303
301
  (envVarIdsChunk) => ({
304
- should_be_running__release: {
302
+ image_install: {
305
303
  $any: {
306
- $alias: 'r',
304
+ $alias: 'ii',
307
305
  $expr: {
308
- status: 'success',
309
- release_image: {
306
+ installs__image: {
310
307
  $any: {
311
- $alias: 'ri',
308
+ $alias: 'i',
312
309
  $expr: {
313
- ri: {
314
- image_environment_variable: {
310
+ i: {
311
+ release_image: {
315
312
  $any: {
316
- $alias: 'e',
317
- $expr: { e: { id: { $in: envVarIdsChunk } } },
313
+ $alias: 'ri',
314
+ $expr: {
315
+ ri: {
316
+ image_environment_variable: {
317
+ $any: {
318
+ $alias: 'e',
319
+ $expr: { e: { id: { $in: envVarIdsChunk } } },
320
+ },
321
+ },
322
+ },
323
+ },
318
324
  },
319
325
  },
320
326
  },
@@ -1 +1 @@
1
- {"version":3,"file":"vars-update-trigger.js","sourceRoot":"","sources":["../../../../src/features/vars-schema/hooks/vars-update-trigger.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,CAAC,MAAM,QAAQ,CAAC;AAGvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAE1E,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAOjE,4FAA4F;AAC5F,wFAAwF;AACxF,8BAA8B;AAC9B,uIAAuI;AACvI,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC;AAE7C,iBAAiB;AACjB,MAAM,WAAW,GAAG,CACnB,QAAW,EACX,WAWC,EACM,EAAE;IACT,MAAM,oBAAoB,GAAG,KAAK,EACjC,IAEC,EACA,EAAE;QACH,IAAI,CAAC;YACJ,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,CAAC;YACvC,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;gBACpB,OAAO;YACR,CAAC;YACD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;gBACpC,CAAC,CAAC,CAAC,GAAG,EAAE;oBACN,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC,GAAG,MAAM,CAAC;oBAC5C,4GAA4G;oBAC5G,OAAO,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAC3D,aAAa,CAAC,GAAG,CAAC,CAClB,CAAC;gBACH,CAAC,CAAC,EAAE;gBACL,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;YACZ,MAAM,SAAS,GAAG,CACjB,MAAM,OAAO,CAAC,GAAG,CAChB,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,EAA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yBACD;qBACD;iBACD;aACD;SACD,CAAC;KACF,CAAC;AACH,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"vars-update-trigger.js","sourceRoot":"","sources":["../../../../src/features/vars-schema/hooks/vars-update-trigger.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,CAAC,MAAM,QAAQ,CAAC;AAGvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAE1E,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAOjE,4FAA4F;AAC5F,wFAAwF;AACxF,8BAA8B;AAC9B,uIAAuI;AACvI,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC;AAE7C,iBAAiB;AACjB,MAAM,WAAW,GAAG,CACnB,QAAW,EACX,WAWC,EACM,EAAE;IACT,MAAM,oBAAoB,GAAG,KAAK,EACjC,IAEC,EACA,EAAE;QACH,IAAI,CAAC;YACJ,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,CAAC;YACvC,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;gBACpB,OAAO;YACR,CAAC;YACD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;gBACpC,CAAC,CAAC,CAAC,GAAG,EAAE;oBACN,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC,GAAG,MAAM,CAAC;oBAC5C,4GAA4G;oBAC5G,OAAO,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAC3D,aAAa,CAAC,GAAG,CAAC,CAClB,CAAC;gBACH,CAAC,CAAC,EAAE;gBACL,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;YACZ,MAAM,SAAS,GAAG,CACjB,MAAM,OAAO,CAAC,GAAG,CAChB,OAAO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EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,cAAc,EAAE,EAAE,EAAE;6DAC7C;yDACD;qDACD;iDACD;6CACD;yCACD;qCACD;iCACD;6BACD;yBACD;qBACD;iBACD;aACD;SACD,CAAC;KACF,CAAC;AACH,CAAC,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": "30.0.11-build-v2-image-env-var-device-update-trigger-cf9c7768a66a7e15cc30984f396417a9395096eb-1",
4
+ "version": "30.0.11-build-get-write-context-58bd1e8c84c931f5fa90ddbfc01b7e13c16680b8-1",
5
5
  "license": "AGPL-3.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -167,6 +167,6 @@
167
167
  "loader": "ts-node/esm/transpile-only"
168
168
  },
169
169
  "versionist": {
170
- "publishedAt": "2024-10-21T16:07:43.164Z"
170
+ "publishedAt": "2024-10-21T16:11:34.250Z"
171
171
  }
172
172
  }