@mimik/local 7.0.3 → 7.0.4
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.
- package/README.md +11 -11
- package/index.js +9 -9
- package/lib/helpers.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -119,7 +119,7 @@ The following is an example of start.json file for `mIT`:
|
|
|
119
119
|
}
|
|
120
120
|
```
|
|
121
121
|
While all the files use the `.json` extension it is still possible to add comments `//` in the file to make the file more explicit or to remove some parameters.
|
|
122
|
-
There are reserved
|
|
122
|
+
There are reserved environment variables used by the library for configuration:
|
|
123
123
|
- `oauthImplicitNeeded`: if the service handles user token the implicit configuration is needed
|
|
124
124
|
- `mIDNeeded`: if the service has mID as a target
|
|
125
125
|
- `locationNeeded`: if location translation is needed
|
|
@@ -131,7 +131,7 @@ For test in json file (`server-test.json`) is created in `.`.
|
|
|
131
131
|
This file contains informations needed to start the test:
|
|
132
132
|
``` javascript
|
|
133
133
|
{
|
|
134
|
-
"start": "information needed to setup the
|
|
134
|
+
"start": "information needed to setup the environment variables for the test",
|
|
135
135
|
"CUSTOMER_NAME": "name of the customer to setup customer config",
|
|
136
136
|
"CUSTOMER_CODE": "code of the customer to setup coustomer config, `not available for MST`",
|
|
137
137
|
"BASE_PATH": "base path of the API",
|
|
@@ -152,8 +152,8 @@ import { mSTTestSetup, mSTSetup, mITTestSetup, mITSetup, testSetup, setup, dotFi
|
|
|
152
152
|
* [local](#module_local)
|
|
153
153
|
* [~mSTTestSetup()](#module_local..mSTTestSetup) ⇒
|
|
154
154
|
* [~mSTSetup()](#module_local..mSTSetup) ⇒
|
|
155
|
-
* [~
|
|
156
|
-
* [~
|
|
155
|
+
* [~mITTestSetup()](#module_local..mITTestSetup) ⇒
|
|
156
|
+
* [~mITSetup()](#module_local..mITSetup) ⇒
|
|
157
157
|
* [~testSetup()](#module_local..testSetup) ⇒
|
|
158
158
|
* [~setup()](#module_local..setup) ⇒
|
|
159
159
|
|
|
@@ -181,7 +181,7 @@ The following files are needed to perform these actions:
|
|
|
181
181
|
| `../s3Log.json` | The S3 information
|
|
182
182
|
| `../mSTConfig.json` | The config for mST
|
|
183
183
|
| `../mITConfig.json` | The config for mIT
|
|
184
|
-
| `./local/testStart.json` | The local configuration. If it does not exist start.json will be used and if
|
|
184
|
+
| `./local/testStart.json` | The local configuration. If it does not exist start.json will be used and if start.json does not exist start-example.json will be used to create start.json
|
|
185
185
|
**Category**: sync
|
|
186
186
|
<a name="module_local..mSTSetup"></a>
|
|
187
187
|
|
|
@@ -209,9 +209,9 @@ The following files are needed to perform these actions:
|
|
|
209
209
|
| `../mITConfig.json` | The config for mIT
|
|
210
210
|
| `./local/start.json` | The local configuration. If it does not exist start-example.json will be used to create start.json
|
|
211
211
|
**Category**: sync
|
|
212
|
-
<a name="module_local..
|
|
212
|
+
<a name="module_local..mITTestSetup"></a>
|
|
213
213
|
|
|
214
|
-
### local~
|
|
214
|
+
### local~mITTestSetup() ⇒
|
|
215
215
|
Setup mIT for test.
|
|
216
216
|
|
|
217
217
|
**Kind**: inner method of [<code>local</code>](#module_local)
|
|
@@ -251,11 +251,11 @@ The following files are needed to perform these actions:
|
|
|
251
251
|
| `../s3Log.json` | The S3 information
|
|
252
252
|
| `../mSTConfig.json` | The config for mST
|
|
253
253
|
| `../mITConfig.json` | The config for mIT
|
|
254
|
-
| `./local/testStart.json` | The local configuration. If it does not exist start.json will be used and if
|
|
254
|
+
| `./local/testStart.json` | The local configuration. If it does not exist start.json will be used and if start.json does not exist start-example.json will be used to create start.json
|
|
255
255
|
**Category**: sync
|
|
256
|
-
<a name="module_local..
|
|
256
|
+
<a name="module_local..mITSetup"></a>
|
|
257
257
|
|
|
258
|
-
### local~
|
|
258
|
+
### local~mITSetup() ⇒
|
|
259
259
|
Setup mIT.
|
|
260
260
|
|
|
261
261
|
**Kind**: inner method of [<code>local</code>](#module_local)
|
|
@@ -339,7 +339,7 @@ The following files are needed to perform these actions:
|
|
|
339
339
|
| `../mITConfig.json` | The config for mIT
|
|
340
340
|
| `../mIDConfig.json` | The config for mID
|
|
341
341
|
| `../customerConfig.json` | The mST customer config
|
|
342
|
-
| `./local/testStart.json` | The local configuration. If it does not exist start.json will be used and if
|
|
342
|
+
| `./local/testStart.json` | The local configuration. If it does not exist start.json will be used and if start.json does not exist start-example.json will be used to create start.json
|
|
343
343
|
**Category**: sync
|
|
344
344
|
<a name="module_local..setup"></a>
|
|
345
345
|
|
package/index.js
CHANGED
|
@@ -177,7 +177,7 @@ const getBasePath = apiDef => apiDef.basePath || apiDef.servers[FIRST].url;
|
|
|
177
177
|
* }
|
|
178
178
|
* ```
|
|
179
179
|
* While all the files use the `.json` extension it is still possible to add comments `//` in the file to make the file more explicit or to remove some parameters.
|
|
180
|
-
* There are reserved
|
|
180
|
+
* There are reserved environment variables used by the library for configuration:
|
|
181
181
|
* - `oauthImplicitNeeded`: if the service handles user token the implicit configuration is needed
|
|
182
182
|
* - `mIDNeeded`: if the service has mID as a target
|
|
183
183
|
* - `locationNeeded`: if location translation is needed
|
|
@@ -189,7 +189,7 @@ const getBasePath = apiDef => apiDef.basePath || apiDef.servers[FIRST].url;
|
|
|
189
189
|
* This file contains informations needed to start the test:
|
|
190
190
|
* ``` javascript
|
|
191
191
|
* {
|
|
192
|
-
* "start": "information needed to setup the
|
|
192
|
+
* "start": "information needed to setup the environment variables for the test",
|
|
193
193
|
* "CUSTOMER_NAME": "name of the customer to setup customer config",
|
|
194
194
|
* "CUSTOMER_CODE": "code of the customer to setup coustomer config, `not available for MST`",
|
|
195
195
|
* "BASE_PATH": "base path of the API",
|
|
@@ -396,7 +396,7 @@ const serverInit = (confType) => {
|
|
|
396
396
|
* | `../s3Log.json` | The S3 information
|
|
397
397
|
* | `../mSTConfig.json` | The config for mST
|
|
398
398
|
* | `../mITConfig.json` | The config for mIT
|
|
399
|
-
* | `./local/testStart.json` | The local configuration. If it does not exist start.json will be used and if
|
|
399
|
+
* | `./local/testStart.json` | The local configuration. If it does not exist start.json will be used and if start.json does not exist start-example.json will be used to create start.json
|
|
400
400
|
*/
|
|
401
401
|
export const mSTTestSetup = () => mSTInit(TEST);
|
|
402
402
|
|
|
@@ -433,7 +433,7 @@ export const mSTSetup = () => mSTInit();
|
|
|
433
433
|
*
|
|
434
434
|
* Setup mIT for test.
|
|
435
435
|
*
|
|
436
|
-
* @function
|
|
436
|
+
* @function mITTestSetup
|
|
437
437
|
* @category sync
|
|
438
438
|
*
|
|
439
439
|
* @return `null`.
|
|
@@ -472,7 +472,7 @@ export const mSTSetup = () => mSTInit();
|
|
|
472
472
|
* | `../s3Log.json` | The S3 information
|
|
473
473
|
* | `../mSTConfig.json` | The config for mST
|
|
474
474
|
* | `../mITConfig.json` | The config for mIT
|
|
475
|
-
* | `./local/testStart.json` | The local configuration. If it does not exist start.json will be used and if
|
|
475
|
+
* | `./local/testStart.json` | The local configuration. If it does not exist start.json will be used and if start.json does not exist start-example.json will be used to create start.json
|
|
476
476
|
*/
|
|
477
477
|
export const mITTestSetup = () => mITInit(TEST);
|
|
478
478
|
|
|
@@ -480,7 +480,7 @@ export const mITTestSetup = () => mITInit(TEST);
|
|
|
480
480
|
*
|
|
481
481
|
* Setup mIT.
|
|
482
482
|
*
|
|
483
|
-
* @function
|
|
483
|
+
* @function mITSetup
|
|
484
484
|
* @category sync
|
|
485
485
|
*
|
|
486
486
|
* @return `null`.
|
|
@@ -518,7 +518,7 @@ export const mITTestSetup = () => mITInit(TEST);
|
|
|
518
518
|
* | `../mITConfig.json` | The config for mIT
|
|
519
519
|
* | `./local/start.json` | The local configuration. If it does not exist start-example.json will be used to create start.json
|
|
520
520
|
*/
|
|
521
|
-
const mITSetup = () => mITInit();
|
|
521
|
+
export const mITSetup = () => mITInit();
|
|
522
522
|
|
|
523
523
|
/**
|
|
524
524
|
*
|
|
@@ -566,7 +566,7 @@ const mITSetup = () => mITInit();
|
|
|
566
566
|
* | `../mITConfig.json` | The config for mIT
|
|
567
567
|
* | `../mIDConfig.json` | The config for mID
|
|
568
568
|
* | `../customerConfig.json` | The mST customer config
|
|
569
|
-
* | `./local/testStart.json` | The local configuration. If it does not exist start.json will be used and if
|
|
569
|
+
* | `./local/testStart.json` | The local configuration. If it does not exist start.json will be used and if start.json does not exist start-example.json will be used to create start.json
|
|
570
570
|
*/
|
|
571
571
|
export const testSetup = () => serverInit(TEST);
|
|
572
572
|
|
|
@@ -658,7 +658,7 @@ export const unScripts = () => {
|
|
|
658
658
|
write(packageFilename, packageFile, 'package.json', INSTALL, true);
|
|
659
659
|
};
|
|
660
660
|
|
|
661
|
-
export { testJsonFile };
|
|
661
|
+
export { commitCheckMsg, start2process, testJsonFile };
|
|
662
662
|
|
|
663
663
|
export default {
|
|
664
664
|
commitCheckMsg,
|
package/lib/helpers.js
CHANGED
|
@@ -138,7 +138,7 @@ const baseUrl = (serverType, regType, config, literal) => {
|
|
|
138
138
|
*````
|
|
139
139
|
* Will exit 1 if there is an error.
|
|
140
140
|
* sourceFilenameSupp is only used when sourceFilename exists.
|
|
141
|
-
* If an environment
|
|
141
|
+
* If an environment variable exists in sourceFilename and sourceFilenameSupp, the environment variable in sourceFilename will be commented out.
|
|
142
142
|
*
|
|
143
143
|
*/
|
|
144
144
|
const retrieve = (regType, filename, options) => {
|