Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #20

Merged
merged 33 commits into from
Aug 17, 2024
Merged

Development #20

merged 33 commits into from
Aug 17, 2024

Conversation

rustyy
Copy link
Owner

@rustyy rustyy commented Aug 17, 2024

No description provided.

Introduce a GitHub Actions workflow to automate testing for the Node.js project. This configuration sets up multiple Node.js versions (18.x, 20.x) and includes steps for dependency installation, building the source code, and running tests.
Updated @ecoflow-api/schemas dependency from a wildcard to version 0.0.12 in both package.json and package-lock.json.
Introduced a new module to handle Delta Pro serial number validation using Zod. This includes a schema that enforces serial numbers to start with "DCABZ" and type-checking utilities.
Created schemas for setting various DeltaPro configurations like X-Boost switch, car charger, charge level, discharge level, car input current, beep switch, screen brightness, and smart generator auto-on. Each schema includes detailed validation based on the corresponding command parameters.
Introduced schemas for various deltaPro set commands, including smart generator auto off, unit timeout, screen timeout, AC standby time, AC charging settings, PV charging type, and bypass AC auto start.
This commit introduces a new file, `getProperties.ts`, defining a comprehensive schema using zod for DeltaPro properties. It includes numerous fields related to system metrics, health status, and configurations, each with appropriate data type validation.
This commit introduces the export for the deltaPro schema in the index file. This ensures that deltaPro can be used throughout the application as part of the schemas package. Other exports remain unchanged.
Introduced Delta Pro class with validation for serial numbers. Updated DeviceFactory and respective tests to ensure proper creation and handling of Delta Pro instances.
…ptional.

Updated the 'mppt.reserved' and 'pd.brightnessLevel' fields to be optional in the deltaPro schema. Original data did not include these fields.
Introduced methods `enableXboost` and `enableCharger` to the DeltaPro class. Updated tests for the new methods and included additional validation for API response parsing.
Implemented `setMaxChargeLevel` method in DeltaPro to specify maximum charge level. Added corresponding test to ensure proper functionality and schema validation.
Implemented new methods for various device settings like AC charging power, beep, screen timeout, and smart generator thresholds. Updated corresponding tests to ensure these methods work correctly and included renaming `setMaxChargeLevel` to `setChargeLevel`.
Included detailed usage examples for the Delta Pro device in the TypeScript code and updated the README accordingly. These changes demonstrate how to enable features and set various configurations using the client library.
Deleted redundant changeset files and consolidated updates into a single changeset for the addition of delta pro support. This ensures cleaner version tracking and avoids duplicate entries.
Introduced two new GitHub Actions workflows: `preparePublish.yml` for bumping the version and regenerating docs, and `publish.yml` for publishing packages on main branch pushes. Also modified `test.yml` to only trigger on pull requests to the development branch.
Changed the npm publish command to use `npm run publish-packages` instead of `npm publish-packages`. This ensures the correct script is executed during the publishing phase. Additionally, environment variables like NPM_TOKEN remain properly utilized.
This change ensures that the version bump command is executed using npx, which resolves any issues related to the availability of the changeset command.
The 'npm install' command is now used instead of 'npm ci' to install dependencies. This change ensures compatibility with the current project setup and resolves issues encountered during the installation process in the build pipeline.
@rustyy rustyy merged commit 5f30d64 into main Aug 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant