Add js sdk changes

With type declarations and various missing parts added by Willy-JL
This commit is contained in:
MX
2024-11-05 09:49:46 +03:00
parent 8a2cf4dc3d
commit 79caf7bf72
19 changed files with 378 additions and 26 deletions

View File

@@ -1,11 +1,22 @@
# Flipper Zero JavaScript SDK
This package contains official tooling and typings for developing Flipper Zero
applications in JavaScript.
# Flipper Unleashed FW JavaScript SDK
This package contains tooling and typings for developing Flipper Zero
applications in JavaScript for Unleashed Custom Firmware (based on official SDK).
This is a fork of the [Official Flipper Zero JS SDK](https://www.npmjs.com/package/@flipperdevices/fz-sdk),
with added types for the extra features provided by the Unleashed firmware JavaScript API.
Scripts made for Official Flipper Zero JS SDK will work on Unleashed Firmware too.
If you use extra features provided by Unleashed FW JS SDK, you are encouraged to use syntax like
`if (doesSdkSupport(["feature-name"])) { ... }` so that your JS app can work on Official
Firmware too, aswell as all other compliant Custom Firmwares. If some of those extra
features are essential to the functionality of your app, you can use `checkSdkFeatures(["feature1", "feature2"])`
near the beginning of your script, which will show a warning to the user that these features
are not available in their firmware distribution.
## Getting started
Create your application using the interactive wizard:
```shell
npx @flipperdevices/create-fz-app@latest
npx @darkflippers/create-fz-app-ul@latest
```
Then, enter the directory with your application and launch it: