zabsalahid / serialport-gsm

SerialPort-GSM is a simplified plugin for communicating with gsm modems. (Primarily for sms) (Focused in PDU mode)
MIT License
88 stars 46 forks source link

TypeScript support, bug fixes, new documentation #127

Open KillerJulian opened 1 year ago

KillerJulian commented 1 year ago

Happy new year! 🥳🎉 As I have already announced now follows the rewrite of this wonderful library.

Improvements:

Limitations:

The rewrite took a lot of time, so I would be happy about a small mention. Let me know if you disagree with my work.

With kind regards - Julian 🇩🇪


¹ The SMS can be implemented again if desired, but I don't see it as necessary anymore and it would cause code duplications

Closes: #91 Closes: #86 Closes: #31 Closes: #128 Closes: #129

KillerJulian commented 1 year ago

Handling the new code

Editor 🖋️

  1. I recommend the editor Visual Studio Code
  2. I recommend to install the following addons:

Yarn 🛠️

I recommend using yarn as a package manager for a faster and cleaner working process. Quick and easy installation.

Building the documentaion 📚

Example from my repository

Use now yarn or alternatively npm.

  1. Install the latest packages
yarn
  1. Use the following command to generate the documentation
yarn build:docs

Later, Github will host the docs. But for the local view we need to install a small tool

yarn global add http-server
  1. Last step, before you can view your work. Start the HTTP server
http-server ./docs

Automation of the repository ⚙️

Automation will make it faster and easier for your to work with the project. It also represents a change in your workflow. Decide for yourself whether you want to take this step.

Following will change it:

You always have the choice to customise the workflow to your needs.

Setup 🛠️

  1. Set NPM token The token is needed to publish your package automatically

    1. Generate new token (Go to the npm website -> click on your profile picture -> Access Tokens -> Generate New Token)

      Name: serialport-gsm Type: Automation

      Copy your token.

    2. Set token at repository (Repository settings -> Secrets -> Action secrets -> New repository secret)

      Name: NPM_TOKEN Value: your token

  2. Merge this pull request

  3. Github Pages After the first commit to master (also when you merge this pull request), the docs should be built. After that you can set the Github page.

    1. Go to the Pages setting in the repository (Repository settings -> Pages)

    2. Set up as follows:

      Source: Github Actions

Merging this pull request 🔀

⚠️ Before merging these pull request, you should be aware of the changes. Please also read this comment thoroughly.

  1. Setup the automation
  2. Tag the merge commit with v5.0.0
  3. Push the tag
  4. Be happy when everything has worked

For questions and suggestions I am at your disposal. Thank you for your cooperation 🤝

Apollon77 commented 1 year ago

On which code-date this PR is based on? Were the latest changes incorporated? What about the one open PR for issue solving on error cases?

KillerJulian commented 1 year ago

New feature added 🚀

With the three upper commits the functions


Closes: #31

KillerJulian commented 1 year ago

On which code-date this PR is based on? Were the latest changes incorporated? What about the one open PR for issue solving on error cases?

All bugs should also be fixed in this version. Not included was incomingSMSIndicationTimeouts, as I could not find out why it was implemented. However, you should take a close look at my changes. It is likely that a number of functions or events have been renamed or removed.

Should this pull request be merged, an upgrade guide for the users would certainly not be bad

KillerJulian commented 1 year ago

New feature added 🚀

It is now possible to directly send an own PDU (Submit or Deliver)


Closes: #129