1.3.6 • Published 2 months ago

vymo-config-stub-js v1.3.6

Weekly downloads
-
License
ISC
Repository
-
Last release
2 months ago

Methods exposed

There are two major functions exposed for initializing configuration fetch and polling. Apart from them there were other functions like getClientsIncludingDisabled , getClient, getClientGlobalConfig which are self explanatory.

Fetch first time configurations

context = {
   URL: "Config service url to be used for polling"
}
.init(context)

Fetching specific client configurations

context = {
   URL: "Config service url to be used for polling",
   client: [] //"Array of clients which should be loaded"
}
.init(context)

Poll incremental configurations

context = {
   URL: "Config service url to be used for polling",
   TIMEOUT_IN_SECONDS: "Interval of polling"
   client: [] //"Array of clients which should be loaded"
}
.poll(context)

Incase of standalone tasks, only first time fetch will be required, in such cases poll can be disabled. By default poll is set to true.

context = {
   URL: "Config service url to be used for polling",
   TIMEOUT_IN_SECONDS: "Interval of polling"
   client: ["client"],
   poll: false
}
.poll(context)

Also, JS client provides ability to listen to any configuration updates inmemory.

  • CLIENT_UPDATED - Gets called whenever any client update happens

  • GLOBAL_UPDATED - Gets called whenever any global update happens

Building the package

  1. nvm use 12
  2. npm publish
  3. npm pack if error comes (npm ERR! 404 Not Found - PUT https://registry.npmjs.org/vymo-config-stub-js - Not found) do npm login and create login cred for Example: $ npm login

    Username: prudhvitejapotnuru

    Password: Email: (this IS public) prudhvi@getvymo.com npm notice Please check your email for a one-time password (OTP) Enter one-time password from your authenticator app: Logged in as prudhvitejapotnuru on https://registry.npmjs.org/.

  4. Make sure that the version is changed every time of retry.

  5. then do npm publish and npm pack
  6. a file will be present in same path vymo-config-stub-js-{version}.tgz
  7. Copy this tgz inside the resources/ of {userService}(ex lms) directory
  8. Increment the version in the {userService}(ex lms) package.json
  9. Go to lms and update the version in the npm-shrinkwrap.json
  10. Commit the npm-shrinkwrap.json file else npm will not install the newer version even though you update version in the package.json
1.3.6

2 months ago

1.3.5

2 months ago

1.3.4

2 months ago

1.3.3

3 months ago

1.3.2

3 months ago

1.3.1

3 months ago

1.3.0

3 months ago

1.2.1

1 year ago

1.2.0

1 year ago