@mikrojs/native 0.18.2 → 0.19.0-pr-352.20260829215534
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/CMakeLists.txt +25 -2
- package/include/mikrojs/mem.h +4 -0
- package/include/mikrojs/ota_client.h +3 -3
- package/include/mikrojs/platform.h +8 -0
- package/include/mikrojs/private.h +28 -0
- package/package.json +4 -5
- package/prebuilds/darwin-arm64/mikrojs.napi.node +0 -0
- package/prebuilds/linux-arm64/mikrojs.napi.node +0 -0
- package/prebuilds/linux-x64/mikrojs.napi.node +0 -0
- package/runtime/http/helpers.ts +5 -0
- package/runtime/internal.d.ts +41 -2
- package/runtime/ota/client.ts +4 -0
- package/runtime/ota/ota.ts +4 -0
- package/runtime/ota/types.ts +75 -0
- package/runtime/schema/schema.ts +25 -3
- package/runtime/schema/types.ts +193 -15
- package/runtime/sys/types.ts +11 -1
- package/runtime/test/test.ts +6 -2
- package/runtime/wifi/types.ts +3 -0
- package/scripts/gen-schema-fixtures.js +317 -0
- package/src/mem.cpp +83 -37
- package/src/mik_app_config.cpp +9 -1
- package/src/mik_http_client.cpp +1357 -0
- package/src/mik_ota_client.cpp +3 -3
- package/src/mik_repl.cpp +44 -5
- package/src/mik_schema.cpp +892 -0
- package/src/mik_sys.cpp +9 -1
- package/src/mik_wifi_client.cpp +742 -0
- package/src/mikrojs.cpp +34 -8
- package/src/modules.cpp +66 -0
- package/dist/runtime/schema/core.d.ts +0 -115
- package/dist/runtime/schema/core.d.ts.map +0 -1
- package/dist/runtime/schema/core.js +0 -259
- package/dist/runtime/schema/core.js.map +0 -1
- package/dist/runtime/schema/shared.d.ts +0 -54
- package/dist/runtime/schema/shared.d.ts.map +0 -1
- package/dist/runtime/schema/shared.js +0 -489
- package/dist/runtime/schema/shared.js.map +0 -1
- package/runtime/http/native.ts +0 -160
- package/runtime/http/request.ts +0 -25
- package/runtime/schema/core.ts +0 -539
- package/runtime/schema/shared.ts +0 -494
- package/runtime/wifi/wifi.ts +0 -191
package/src/mik_sys.cpp
CHANGED
|
@@ -187,15 +187,23 @@ static JSValue mik__sys_board(JSContext* ctx) {
|
|
|
187
187
|
JS_SetPropertyStr(ctx, obj, "cores", JS_NewInt32(ctx, chip_info.cores));
|
|
188
188
|
JS_SetPropertyStr(ctx, obj, "revision", JS_NewInt32(ctx, chip_info.revision));
|
|
189
189
|
|
|
190
|
-
/* Features as string array
|
|
190
|
+
/* Features as string array. Callers use this to decide whether an
|
|
191
|
+
* optional module will work, so a radio only counts when the silicon
|
|
192
|
+
* has it AND the stack behind it was compiled in. */
|
|
191
193
|
JSValue features = JS_NewArray(ctx);
|
|
192
194
|
uint32_t fi = 0;
|
|
195
|
+
#ifdef CONFIG_ESP_WIFI_ENABLED
|
|
193
196
|
if (chip_info.features & CHIP_FEATURE_WIFI_BGN)
|
|
194
197
|
JS_SetPropertyUint32(ctx, features, fi++, JS_NewString(ctx, "wifi"));
|
|
198
|
+
#endif
|
|
199
|
+
#ifdef CONFIG_BT_ENABLED
|
|
195
200
|
if (chip_info.features & CHIP_FEATURE_BLE)
|
|
196
201
|
JS_SetPropertyUint32(ctx, features, fi++, JS_NewString(ctx, "ble"));
|
|
197
202
|
if (chip_info.features & CHIP_FEATURE_BT)
|
|
198
203
|
JS_SetPropertyUint32(ctx, features, fi++, JS_NewString(ctx, "bt"));
|
|
204
|
+
#endif
|
|
205
|
+
/* No stack to gate on: mikrojs has no 802.15.4 API, so this stays a
|
|
206
|
+
* plain silicon report. */
|
|
199
207
|
if (chip_info.features & CHIP_FEATURE_IEEE802154)
|
|
200
208
|
JS_SetPropertyUint32(ctx, features, fi++, JS_NewString(ctx, "ieee802154"));
|
|
201
209
|
JS_SetPropertyStr(ctx, obj, "features", features);
|