node-automator 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +27 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,27 @@
1
+ # Tutorial
2
+ > Install the dependencies
3
+ ```sh
4
+ $ npm install
5
+ ```
6
+ > Run the examples
7
+ ```sh
8
+ $ node . ./examples/print_env.yml
9
+ ```
10
+
11
+ > You can pass encoded configuration content instead of a file path
12
+ ```js
13
+ function encode(input) {
14
+ return btoa(unescape(encodeURIComponent(input)))
15
+ }
16
+ var configuration = [{
17
+ type: "print",
18
+ data: {
19
+ content: "Hello, I am <<ENV.USERNAME>>"
20
+ }
21
+ }];
22
+ console.log(encode(JSON.stringify(configuration)));
23
+ // output: W3sidHlwZSI6InByaW50IiwiZGF0YSI6eyJjb250ZW50IjoiSGVsbG8sIEkgYW0gPDxFTlYuVVNFUk5BTUU+PiJ9fV0=
24
+ ```
25
+ ```sh
26
+ node . W3sidHlwZSI6InByaW50IiwiZGF0YSI6eyJjb250ZW50IjoiSGVsbG8sIEkgYW0gPDxFTlYuVVNFUk5BTUU+PiJ9fV0=$
27
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-automator",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Execute automation with yaml configuration(compatible with json)",
5
5
  "main": "index.js",
6
6
  "repository": {