1.5.0 • Published 4 years ago

@autofleet/node-common v1.5.0

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
4 years ago

AutoFleet Node Common

This respostory is made in order have as much of common code as we can.

Each line of code used in wrriten in this repo will be used in the enetire AutoFleet system.

Make sure you have:

  • Tests
  • Docs

Consts

Currently we suppurt:

  {
    'OK'
    'ERROR'
    'FAIL'
  }

Network

Server 2 Servers communication.

Implemented:

The API is just like axios api but the creation of new instance must have either serviceName or serviceUrl in options.

In case serviceName used the constractor will look for an environment varible with the the name <SERVICE_NAME>_SERVICE_HOST.

For Example:

const { Network } = require('@autofleet/node-common');

n = new Network({ serviceName: 'TEST' });

n.get('/posts/1');

.env file:

RIDE_SERVICE_HOST=jsonplaceholder.typicode.com

To learn more click here.

Settings

Adding settings

For adding new setting you need to add it to the map.js file, please specify

  • name - descriptive name
  • description - few words about what it does + unit
  • type - supportable types: 'number', 'string', 'json'
  • defaultValue - default value
  • context - 'security' and 'operation' will not show in the simulator configuration

See example.

DeLorean

Use this model to mock time on server - more info TBD.

Publish package

bump the version number in package.json and run

npm publish
1.5.0

4 years ago

1.4.9

4 years ago

1.4.8

4 years ago

1.3.7

4 years ago

1.3.3

4 years ago

1.3.2

4 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.9

5 years ago

1.2.8

5 years ago

1.2.7

5 years ago

1.2.6

5 years ago

1.2.5

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.83

5 years ago

1.1.82

5 years ago

1.1.81

5 years ago

1.1.80

5 years ago

1.1.79

5 years ago

1.1.78

5 years ago

1.1.77

5 years ago

1.1.76

5 years ago

1.1.75

5 years ago

1.1.74

5 years ago

1.1.73

5 years ago

1.1.72

5 years ago

1.1.71

5 years ago

1.1.70

5 years ago

1.1.69

5 years ago

1.1.68

5 years ago

1.1.67

5 years ago

1.1.66

5 years ago

1.1.65

5 years ago

1.1.64

5 years ago

1.1.63

5 years ago

1.1.62

5 years ago

1.1.61

5 years ago

1.1.60

5 years ago

1.1.59

5 years ago

1.1.56

5 years ago

1.1.55

5 years ago

1.1.54

5 years ago

1.1.53

5 years ago

1.1.52

5 years ago

1.1.51

5 years ago

1.1.50

5 years ago

1.1.49

5 years ago

1.1.48

5 years ago

1.1.47

5 years ago

1.1.46

5 years ago

1.1.45

5 years ago

1.1.44

5 years ago

1.1.43

5 years ago

1.1.41

5 years ago

1.1.40

5 years ago

1.1.37

5 years ago

1.1.36

5 years ago

1.1.35

5 years ago

1.1.31

6 years ago

1.1.30

6 years ago

1.1.29

6 years ago

1.1.28

6 years ago

1.1.27

6 years ago

1.1.26

6 years ago

1.1.25

6 years ago

1.1.24

6 years ago

1.1.23

6 years ago

1.1.22

6 years ago

1.1.21

6 years ago

1.1.20

6 years ago

1.1.15

6 years ago

1.1.14

6 years ago

1.1.13

6 years ago

1.1.12

6 years ago

1.1.11

6 years ago

1.1.10

6 years ago

1.1.9

6 years ago

1.1.8

6 years ago

1.1.7

6 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago