@balena/open-balena-api 40.0.6 → 41.0.0-build-Limit-size-of-json-fields-925ddde389745872731aa00e9777b406ab978e4f-2

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/dist/balena.sbvr CHANGED
@@ -677,6 +677,8 @@ Fact type: device type has logo
677
677
 
678
678
  Fact type: device type has contract
679
679
  Necessity: each device type has at most one contract
680
+ -- 5MB
681
+ Necessity: each device type that has a contract, has a contract that is represented by a Text (Type) that has a Length (Type) that is less than or equal to 5000000.
680
682
 
681
683
  Fact type: device type belongs to device family
682
684
  Synonymous form: device family has device type
@@ -729,6 +731,8 @@ Fact type: release has commit
729
731
  Necessity: each release has a commit that has a Length (Type) that is less than or equal to 40.
730
732
  Fact type: release has composition
731
733
  Necessity: each release has exactly one composition.
734
+ -- 1MB
735
+ Necessity: each release has a composition that is represented by a Text (Type) that has a Length (Type) that is less than or equal to 1000000.
732
736
  Fact type: release has status
733
737
  Necessity: each release has exactly one status.
734
738
  -- "interrupted" is a legacy pre-multicontainer status
@@ -753,6 +757,8 @@ Fact type: release has release version
753
757
  Note: Deprecated.
754
758
  Fact type: release has contract
755
759
  Necessity: each release has at most one contract
760
+ -- 1MB
761
+ Necessity: each release that has a contract, has a contract that is represented by a Text (Type) that has a Length (Type) that is less than or equal to 1000000.
756
762
  Fact type: release is passing tests
757
763
  Fact type: release is finalized at date
758
764
  Necessity: each release is finalized at at most one date.
@@ -848,6 +854,8 @@ Fact type: image has content hash
848
854
  Necessity: each image that has a content hash, has a content hash that has a Length (Type) that is less than or equal to 71.
849
855
  Fact type: image has contract
850
856
  Necessity: each image has at most one contract
857
+ -- 1MB
858
+ Necessity: each image that has a contract, has a contract that is represented by a Text (Type) that has a Length (Type) that is less than or equal to 1000000.
851
859
 
852
860
 
853
861
  -- image label
@@ -0,0 +1,76 @@
1
+ DO $$
2
+ BEGIN
3
+ IF NOT EXISTS (
4
+ SELECT 1
5
+ FROM information_schema.table_constraints tc
6
+ WHERE tc.CONSTRAINT_TYPE = 'CHECK'
7
+ AND tc.table_schema = CURRENT_SCHEMA()
8
+ AND tc.table_name = 'device type'
9
+ AND tc.constraint_name = 'device type$shKCrzikfjtnX070rB6v8LwC9rQCHtxUlRYxC/wLh1s='
10
+ ) THEN
11
+ ALTER TABLE "device type" ADD CONSTRAINT "device type$shKCrzikfjtnX070rB6v8LwC9rQCHtxUlRYxC/wLh1s=" CHECK (NOT (
12
+ "contract" IS NOT NULL
13
+ AND NOT (
14
+ LENGTH(CAST("contract" AS TEXT)) <= 5000000
15
+ AND LENGTH(CAST("contract" AS TEXT)) IS NOT NULL
16
+ AND CAST("contract" AS TEXT) IS NOT NULL
17
+ AND "contract" IS NOT NULL
18
+ )
19
+ ));
20
+ END IF;
21
+
22
+ IF NOT EXISTS (
23
+ SELECT 1
24
+ FROM information_schema.table_constraints tc
25
+ WHERE tc.CONSTRAINT_TYPE = 'CHECK'
26
+ AND tc.table_schema = CURRENT_SCHEMA()
27
+ AND tc.table_name = 'image'
28
+ AND tc.constraint_name = 'image$nybC4iKkfDyMHL1XdO+jBh14yg2kL8EntCruE9ik01Q='
29
+ ) THEN
30
+ ALTER TABLE "image" ADD CONSTRAINT "image$nybC4iKkfDyMHL1XdO+jBh14yg2kL8EntCruE9ik01Q=" CHECK (NOT (
31
+ "contract" IS NOT NULL
32
+ AND NOT (
33
+ LENGTH(CAST("contract" AS TEXT)) <= 1000000
34
+ AND LENGTH(CAST("contract" AS TEXT)) IS NOT NULL
35
+ AND CAST("contract" AS TEXT) IS NOT NULL
36
+ AND "contract" IS NOT NULL
37
+ )
38
+ ));
39
+ END IF;
40
+
41
+ IF NOT EXISTS (
42
+ SELECT 1
43
+ FROM information_schema.table_constraints tc
44
+ WHERE tc.CONSTRAINT_TYPE = 'CHECK'
45
+ AND tc.table_schema = CURRENT_SCHEMA()
46
+ AND tc.table_name = 'release'
47
+ AND tc.constraint_name = 'release$0BXXZu4RV1bypE5N8QmpCg0JyLsXLG2LAg4kPji2cHc='
48
+ ) THEN
49
+ ALTER TABLE "release" ADD CONSTRAINT "release$0BXXZu4RV1bypE5N8QmpCg0JyLsXLG2LAg4kPji2cHc=" CHECK (
50
+ LENGTH(CAST("composition" AS TEXT)) <= 1000000
51
+ AND LENGTH(CAST("composition" AS TEXT)) IS NOT NULL
52
+ AND CAST("composition" AS TEXT) IS NOT NULL
53
+ AND "composition" IS NOT NULL
54
+ );
55
+ END IF;
56
+
57
+ IF NOT EXISTS (
58
+ SELECT 1
59
+ FROM information_schema.table_constraints tc
60
+ WHERE tc.CONSTRAINT_TYPE = 'CHECK'
61
+ AND tc.table_schema = CURRENT_SCHEMA()
62
+ AND tc.table_name = 'release'
63
+ AND tc.constraint_name = 'release$MF7FkJuw+bWB+/NwDTBjBHYgtxiCO8wHS/2Nsx8wE3M='
64
+ ) THEN
65
+ ALTER TABLE "release" ADD CONSTRAINT "release$MF7FkJuw+bWB+/NwDTBjBHYgtxiCO8wHS/2Nsx8wE3M=" CHECK (NOT (
66
+ "contract" IS NOT NULL
67
+ AND NOT (
68
+ LENGTH(CAST("contract" AS TEXT)) <= 1000000
69
+ AND LENGTH(CAST("contract" AS TEXT)) IS NOT NULL
70
+ AND CAST("contract" AS TEXT) IS NOT NULL
71
+ AND "contract" IS NOT NULL
72
+ )
73
+ ));
74
+ END IF;
75
+ END;
76
+ $$;
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": "40.0.6",
4
+ "version": "41.0.0-build-Limit-size-of-json-fields-925ddde389745872731aa00e9777b406ab978e4f-2",
5
5
  "license": "AGPL-3.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -140,6 +140,10 @@
140
140
  "validator": "^13.15.15",
141
141
  "ws": "^8.18.3"
142
142
  },
143
+ "overrides": {
144
+ "@balena/lf-to-abstract-sql": "5.1.0-build-json-is-represented-by-text-3e434323a8b630d39d265f84cc76025d5f0b68bb-3",
145
+ "@balena/sbvr-types": "11.1.0-build-json-is-represented-by-text-4de0b318d04d63ef8c0ba5fa75e8a6282e9a09ec-1"
146
+ },
143
147
  "devDependencies": {
144
148
  "@balena/lint": "^9.3.2",
145
149
  "@types/chai": "^5.2.2",
@@ -174,6 +178,6 @@
174
178
  "import": "@swc-node/register/esm-register"
175
179
  },
176
180
  "versionist": {
177
- "publishedAt": "2025-07-28T04:16:40.497Z"
181
+ "publishedAt": "2025-07-29T16:37:37.325Z"
178
182
  }
179
183
  }