homey-lib 2.44.2 → 2.44.4
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/permissions.json +2 -2
- package/assets/app/schema.json +9 -4
- package/lib/App/index.js +24 -4
- package/package.json +1 -1
- package/webpack/index.js +1 -1
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"ru": "Отправка и получение сигналов на частоте 433 МГц",
|
|
99
99
|
"pl": "Wysyłaj i odbieraj sygnały o częstotliwości 433 MHz",
|
|
100
100
|
"ko": "433MHz 주파수 송수신",
|
|
101
|
-
"ar": "إرسال واستقبال على تردد 433
|
|
101
|
+
"ar": "إرسال واستقبال على تردد 433 MHz"
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
104
|
"homey:wireless:868": {
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"ru": "Отправка и получение сигналов на частоте 868 МГц",
|
|
116
116
|
"pl": "Wysyłaj i odbieraj sygnały o częstotliwości 868 MHz",
|
|
117
117
|
"ko": "868MHz 주파수 송수신",
|
|
118
|
-
"ar": "إرسال واستقبال على تردد 868
|
|
118
|
+
"ar": "إرسال واستقبال على تردد 868 MHz"
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
121
|
"homey:wireless:ir": {
|
package/assets/app/schema.json
CHANGED
|
@@ -1034,8 +1034,7 @@
|
|
|
1034
1034
|
"enum": ["nodejs", "python"]
|
|
1035
1035
|
},
|
|
1036
1036
|
"pythonVersion": {
|
|
1037
|
-
"type": "string"
|
|
1038
|
-
"enum": ["3.13"]
|
|
1037
|
+
"type": "string"
|
|
1039
1038
|
},
|
|
1040
1039
|
"pythonDependencies": {
|
|
1041
1040
|
"type": "array",
|
|
@@ -1143,10 +1142,16 @@
|
|
|
1143
1142
|
"paypal": {
|
|
1144
1143
|
"type": "object",
|
|
1145
1144
|
"additionalProperties": false,
|
|
1146
|
-
"
|
|
1147
|
-
"
|
|
1145
|
+
"properties": {
|
|
1146
|
+
"username": {
|
|
1148
1147
|
"type": "string"
|
|
1149
1148
|
},
|
|
1149
|
+
"email": {
|
|
1150
|
+
"type": "string"
|
|
1151
|
+
},
|
|
1152
|
+
"fundraiserCharityId": {
|
|
1153
|
+
"type": "number"
|
|
1154
|
+
},
|
|
1150
1155
|
"currency": {
|
|
1151
1156
|
"type": "string"
|
|
1152
1157
|
}
|
package/lib/App/index.js
CHANGED
|
@@ -73,6 +73,8 @@ const RESERVED_SETTING_PREFIXES = new Set([
|
|
|
73
73
|
])
|
|
74
74
|
|
|
75
75
|
class App {
|
|
76
|
+
static REQUIRED_PYTHON_PLATFORMS = ['arm64', 'amd64']
|
|
77
|
+
static SUPPORTED_PYTHON_VERSIONS = ['3.13', '3.14']
|
|
76
78
|
|
|
77
79
|
constructor(path) {
|
|
78
80
|
this._path = path;
|
|
@@ -216,7 +218,7 @@ class App {
|
|
|
216
218
|
const minVersion = semver.minVersion(appJson.compatibility);
|
|
217
219
|
// tmp set to 12.11.1
|
|
218
220
|
if (!semver.gte(minVersion, '12.11.1')) {
|
|
219
|
-
throw new Error(`Invalid compatibility (${appJson.compatibility}), Python apps must have a compatibility of at least >=
|
|
221
|
+
throw new Error(`Invalid compatibility (${appJson.compatibility}), Python apps must have a compatibility of at least >=12.11.1`);
|
|
220
222
|
}
|
|
221
223
|
}
|
|
222
224
|
|
|
@@ -225,9 +227,20 @@ class App {
|
|
|
225
227
|
throw new Error(`Invalid sdk (${appJson.sdk}), Python apps must use sdk version 3`);
|
|
226
228
|
}
|
|
227
229
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
230
|
+
App.validatePythonVersion(appJson);
|
|
231
|
+
|
|
232
|
+
// Validate that Python apps have cross-platform venvs
|
|
233
|
+
if (levelPublish && appJson.runtime === 'python' && appJson.pythonDependencies !== undefined && appJson.pythonDependencies.length > 0) {
|
|
234
|
+
const missingVenvs = [];
|
|
235
|
+
for (const platform of App.REQUIRED_PYTHON_PLATFORMS) {
|
|
236
|
+
const venvPath = join(this._path, 'venvs', platform);
|
|
237
|
+
await fs.promises.access(venvPath).catch(() => {
|
|
238
|
+
missingVenvs.push(platform);
|
|
239
|
+
})
|
|
240
|
+
}
|
|
241
|
+
if (missingVenvs.length > 0) {
|
|
242
|
+
throw new Error(`Cross-platform venvs are required for Python apps with dependencies. Missing ${missingVenvs.join(", ")}`)
|
|
243
|
+
}
|
|
231
244
|
}
|
|
232
245
|
|
|
233
246
|
// validate that there are no platform local required features defined when targetting cloud
|
|
@@ -721,6 +734,13 @@ class App {
|
|
|
721
734
|
this.debug('Validated successfully');
|
|
722
735
|
}
|
|
723
736
|
|
|
737
|
+
static validatePythonVersion(appJson) {
|
|
738
|
+
// validate that Python apps specify a runtime version
|
|
739
|
+
if (appJson.runtime === 'python' && !App.SUPPORTED_PYTHON_VERSIONS.includes(appJson.pythonVersion)) {
|
|
740
|
+
throw new Error(`The app.json property \`pythonVersion\` must be one of [${App.SUPPORTED_PYTHON_VERSIONS.join(", ")}] in combination with runtime: \`python\`.`);
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
|
|
724
744
|
_checkPrivateSettingPrefixUse(setting, driver) {
|
|
725
745
|
if (
|
|
726
746
|
setting.type &&
|