From 249ff235986cbbb67d97379f0e3cc5ef3d653c40 Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Fri, 1 Nov 2024 21:23:28 +0000 Subject: [PATCH] JS: NPM packages changes for CFW SDK --- .../js_app/packages/create-fz-app/README.md | 8 ++++++-- .../js_app/packages/create-fz-app/package.json | 5 ++++- .../system/js_app/packages/fz-sdk/README.md | 17 ++++++++++++++--- .../system/js_app/packages/fz-sdk/package.json | 5 ++++- 4 files changed, 28 insertions(+), 7 deletions(-) diff --git a/applications/system/js_app/packages/create-fz-app/README.md b/applications/system/js_app/packages/create-fz-app/README.md index fa0a6401a..bdc30d5a8 100644 --- a/applications/system/js_app/packages/create-fz-app/README.md +++ b/applications/system/js_app/packages/create-fz-app/README.md @@ -1,6 +1,10 @@ -# Flipper Zero JavaScript SDK Wizard +# Momentum FW JavaScript SDK Wizard This package contains an interactive wizard that lets you scaffold a JavaScript -application for Flipper Zero. +application for Flipper Zero using the Momentum Firmware JS SDK. + +This is a fork of the [Official Flipper Zero JS SDK Wizard](https://www.npmjs.com/package/@flipperdevices/create-fz-app), +configured to use the [Momentum JavaScript SDK]((https://www.npmjs.com/package/@next-flip/fz-sdk-mntm)) instead. +No other changes are included. ## Getting started Create your application using the interactive wizard: diff --git a/applications/system/js_app/packages/create-fz-app/package.json b/applications/system/js_app/packages/create-fz-app/package.json index e3b15cc05..8c547b49c 100644 --- a/applications/system/js_app/packages/create-fz-app/package.json +++ b/applications/system/js_app/packages/create-fz-app/package.json @@ -1,10 +1,13 @@ { "name": "@next-flip/create-fz-app-mntm", "version": "0.1.0", - "description": "Template package for JS apps Flipper Zero", + "description": "Template package for JS apps for Flipper Zero using Momentum Custom Firmware JS SDK", "bin": "index.js", "type": "module", "keywords": [ + "momentum", + "momentum firmware", + "next-flip", "flipper", "flipper zero" ], diff --git a/applications/system/js_app/packages/fz-sdk/README.md b/applications/system/js_app/packages/fz-sdk/README.md index 0cc362ca5..3ebadb335 100644 --- a/applications/system/js_app/packages/fz-sdk/README.md +++ b/applications/system/js_app/packages/fz-sdk/README.md @@ -1,6 +1,17 @@ -# Flipper Zero JavaScript SDK -This package contains official tooling and typings for developing Flipper Zero -applications in JavaScript. +# Momentum FW JavaScript SDK +This package contains tooling and typings for developing Flipper Zero +applications in JavaScript for Momentum Custom Firmware. + +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 Momentum JavaScript API. + +Scripts made for Official Flipper Zero JS SDK will work on Momentum Firmware too. +If you use extra features provided by Momentum, 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: diff --git a/applications/system/js_app/packages/fz-sdk/package.json b/applications/system/js_app/packages/fz-sdk/package.json index e02516e7f..33c45ff16 100644 --- a/applications/system/js_app/packages/fz-sdk/package.json +++ b/applications/system/js_app/packages/fz-sdk/package.json @@ -1,8 +1,11 @@ { "name": "@next-flip/fz-sdk-mntm", "version": "0.1.1", - "description": "Type declarations and documentation for native JS modules available on Flipper Zero", + "description": "Type declarations and documentation for native JS modules available on Momentum Custom Firmware for Flipper Zero", "keywords": [ + "momentum", + "momentum firmware", + "next-flip", "flipper", "flipper zero", "framework"