homey-lib 2.44.1 → 2.44.3
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/assets/app/schema.json +10 -0
- package/lib/App/index.js +8 -2
- package/package.json +1 -1
- package/webpack/index.js +1 -1
package/assets/app/schema.json
CHANGED
|
@@ -1033,6 +1033,16 @@
|
|
|
1033
1033
|
"type": "string",
|
|
1034
1034
|
"enum": ["nodejs", "python"]
|
|
1035
1035
|
},
|
|
1036
|
+
"pythonVersion": {
|
|
1037
|
+
"type": "string",
|
|
1038
|
+
"enum": ["3.13"]
|
|
1039
|
+
},
|
|
1040
|
+
"pythonDependencies": {
|
|
1041
|
+
"type": "array",
|
|
1042
|
+
"items": {
|
|
1043
|
+
"type": "string"
|
|
1044
|
+
}
|
|
1045
|
+
},
|
|
1036
1046
|
"tags": {
|
|
1037
1047
|
"$ref": "#/definitions/i18nArray"
|
|
1038
1048
|
},
|
package/lib/App/index.js
CHANGED
|
@@ -214,8 +214,9 @@ class App {
|
|
|
214
214
|
// validate that Python apps target compatibility of at least >=13.0.0
|
|
215
215
|
if (appJson.runtime === 'python') {
|
|
216
216
|
const minVersion = semver.minVersion(appJson.compatibility);
|
|
217
|
-
|
|
218
|
-
|
|
217
|
+
// tmp set to 12.11.1
|
|
218
|
+
if (!semver.gte(minVersion, '12.11.1')) {
|
|
219
|
+
throw new Error(`Invalid compatibility (${appJson.compatibility}), Python apps must have a compatibility of at least >=12.11.1`);
|
|
219
220
|
}
|
|
220
221
|
}
|
|
221
222
|
|
|
@@ -224,6 +225,11 @@ class App {
|
|
|
224
225
|
throw new Error(`Invalid sdk (${appJson.sdk}), Python apps must use sdk version 3`);
|
|
225
226
|
}
|
|
226
227
|
|
|
228
|
+
// validate that Python apps specify a runtime version
|
|
229
|
+
if (appJson.runtime === 'python' && appJson.pythonVersion === undefined) {
|
|
230
|
+
throw new Error('The property `pythonVersion` is required in combination with runtime: `python`.');
|
|
231
|
+
}
|
|
232
|
+
|
|
227
233
|
// validate that there are no platform local required features defined when targetting cloud
|
|
228
234
|
if ((appJson.platforms || []).includes('cloud')
|
|
229
235
|
&& (appJson.platformLocalRequiredFeatures || []).length > 0) {
|