1.0.5 • Published 5 years ago

auth0-json-templating v1.0.5

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

auth0-json-templating

Purpose: Replace strings and arrays within JSON files exports by Auth0 Cli.

I'd found array replacement was haphazzard, and caused issues during native replacement.

Recursively, for each json file found in templateDirectory

  • Replace all values, matching ##ENVIRONMENT_VARIABLE## as string in file
  • Replace all values, matching @@ENVIRONMENT_VARIABLE@@ as array for parent object
    • Performing CSV split, and appending each item appropriately.
  • If an expected replacement is found, and no matching Environment Variable, processing fails.
  • Store json in saveDirectory
  • Copy remaining .js and .html files into saveDirectory

For variable replacement of .js and .html, use native Auth0 Cli replacement. I found this to work well.

Usage: node app.js --templateDirectory --saveDirectory --envFile

You may omit --envFile, by executing as ENVKEY= --templateDirectory --saveDirectory --envFile

or, simply having ENVKEY exported into current shell, prior to executing node.

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago