![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
shelly-forge
Advanced tools
Shelly Forge is a TypeScript framework and CLI tool for developing, testing, and deploying scripts to Shelly smart home devices. It provides a modern development experience with type safety, live reloading, and real-time debugging capabilities.
Shelly Forge simplifies the development of Shelly Scripts by providing:
npx shelly-forge init my-project
cd my-project
npm install
npm run create my-script '${DEVICE_HOSTNAME}' solutionA
npm run dev
my-project/
├── build-cache/ # Build cache directory
├── dist/ # Compiled output
├── node_modules/ # Dependencies
├── src/ # Source code directory
├── .editorconfig # Editor configuration
├── .gitignore # Git ignore rules
├── .env # Environment variables
├── solutions.config.json # Solution configuration
├── package-lock.json # Lock file for dependencies
├── package.json # Project configuration
└── tsconfig.json # TypeScript configuration
Solutions are defined in a JSON configuration file that maps scripts to specific devices. Each solution can have multiple components, and each component specifies:
src
: Path to the script source filedevice
: Target device hostname/IP (can use environment variables)enableOnBoot
: Whether the script should run on device bootExample solutions.config.json
:
{
"boiler": {
"mqtt": {
"src": "src/boiler/mqtt.ts",
"device": "${BOILER_HOSTNAME}",
"enableOnBoot": true
},
"thermostat": {
"src": "src/boiler/thermostat.ts",
"device": "${BOILER_HOSTNAME}",
"enableOnBoot": true
}
}
}
Device hostnames/IPs can be provided through environment variables using the ${VARIABLE_NAME}
syntax. This allows you to keep device-specific configuration separate from your code and easily switch between different environments.
For example, you could set the boiler hostname in your .env
file:
BOILER_HOSTNAME=192.168.1.100
The script is wrapped into IIFE (Immediately Invoked Function Expression) and deployed to the device. For example, to subscribe to temperature updates, you can use the following code:
// Subscribe to temperature updates
Shelly.addEventHandler(async (event) => {
if (event.component === 'temperature') {
print('Temperature: ' + event.data.tC + '°C');
}
});
Scripts are bundled into a single file, which makes it possible to reuse code between scripts.
For example we can have a helloWorld.ts script, which uses a custom print function.
File src/solutionA/printer.ts
export function printMessage(message: string) {
print('Hello World from printer: ' + message);
}
File src/solutionA/helloWorld.ts
import { printMessage } from './printer';
printMessage('Hello World from test');
shelly-forge init [name]
- Create new projectshelly-forge deploy
- Deploy scripts to deviceshelly-forge debug <on|off>
- Toggle debug modeshelly-forge create <name> <hostname>
- Create a new scriptnpm run dev
- Start development servernpm run build
- Build for productionnpm run deploy
- Deploy to deviceShelly Forge provides TypeScript definitions for all device APIs. Please refer to the Shelly API documentation for more details.
// Component Control
Shelly.call('Switch.Set', { id: 0, on: true });
Contributions are welcome! Please see our Contributing Guide for details.
MIT License - see LICENSE for details.
FAQs
A framework for developing Shelly device scripts
The npm package shelly-forge receives a total of 19 weekly downloads. As such, shelly-forge popularity was classified as not popular.
We found that shelly-forge demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.