@mimik/local 5.0.0 → 5.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.
- package/index.js +3 -0
- package/lib/helpers.js +6 -6
- package/package.json +2 -4
- package/scripts.json +2 -2
package/index.js
CHANGED
package/lib/helpers.js
CHANGED
|
@@ -175,7 +175,7 @@ const retrieve = (regType, filename, options) => {
|
|
|
175
175
|
};
|
|
176
176
|
|
|
177
177
|
try {
|
|
178
|
-
result = read(filename, regType);
|
|
178
|
+
result = parse(read(filename, regType), filename, regType);
|
|
179
179
|
console.log('- using ' + filename.info);
|
|
180
180
|
return result;
|
|
181
181
|
}
|
|
@@ -183,7 +183,7 @@ const retrieve = (regType, filename, options) => {
|
|
|
183
183
|
if (!options) exitError(regType, { statusCode: 404, message: `no options (${errFilename})` }, filename);
|
|
184
184
|
if (options.altFilename) {
|
|
185
185
|
try {
|
|
186
|
-
result = read(options.altFilename, regType);
|
|
186
|
+
result = parse(read(options.altFilename, regType), options.altFilename, regType);
|
|
187
187
|
console.log('- using ' + options.altFilename.info);
|
|
188
188
|
return result;
|
|
189
189
|
}
|
|
@@ -191,17 +191,17 @@ const retrieve = (regType, filename, options) => {
|
|
|
191
191
|
if (!options.sourceFileName) {
|
|
192
192
|
if (!options.default) exitError(regType, { statusCode: 404, message: `no files or default (${errAltFilename})` }, filename);
|
|
193
193
|
console.log('- using ' + 'default'.warn + ' for ' + filename.info);
|
|
194
|
-
return write(filename, options.default, regType);
|
|
194
|
+
return write(filename, options.default, regType, true);
|
|
195
195
|
}
|
|
196
|
-
return write(filename, readSourceDefault(options.sourceFilename, options.sourceFilenameSupp, options.default, filename), regType);
|
|
196
|
+
return write(filename, readSourceDefault(options.sourceFilename, options.sourceFilenameSupp, options.default, filename), regType, true);
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
if (!options.sourceFilename) {
|
|
200
200
|
if (!options.default) exitError(regType, { statusCode: 404, message: `no files or default (${errFilename.message})` }, filename);
|
|
201
201
|
console.log('- using ' + 'default'.warn + ' for ' + filename.info);
|
|
202
|
-
return write(filename, options.default, regType);
|
|
202
|
+
return write(filename, options.default, regType, true);
|
|
203
203
|
}
|
|
204
|
-
return write(filename, readSourceDefault(options.sourceFilename, options.sourceFilenameSupp, options.default, filename), regType);
|
|
204
|
+
return write(filename, readSourceDefault(options.sourceFilename, options.sourceFilenameSupp, options.default, filename), regType, true);
|
|
205
205
|
}
|
|
206
206
|
};
|
|
207
207
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mimik/local",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.3",
|
|
4
4
|
"description": "Local setup configuration for normal and test opreration",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -37,9 +37,7 @@
|
|
|
37
37
|
"debug": "4.3.4",
|
|
38
38
|
"ip": "1.1.8",
|
|
39
39
|
"lodash": "4.17.21",
|
|
40
|
-
"uuid": "8.3.2"
|
|
41
|
-
},
|
|
42
|
-
"devDependencies": {
|
|
40
|
+
"uuid": "8.3.2",
|
|
43
41
|
"@mimik/eslint-plugin-dependencies": "^2.4.3",
|
|
44
42
|
"@mimik/eslint-plugin-document-env": "^1.0.3",
|
|
45
43
|
"chai": "4.3.6",
|
package/scripts.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"scripts": {
|
|
3
3
|
"lint": "eslint --ignore-path .gitignore .",
|
|
4
|
-
"docs": "jsdoc2md
|
|
4
|
+
"docs": "jsdoc2md ./src/configuration/config.js > README.md",
|
|
5
5
|
"pretest": "node ./local/testSetup.js",
|
|
6
|
-
"test": "mocha --reporter mochawesome --bail --check-leaks test/",
|
|
6
|
+
"test": "mocha --reporter mochawesome --bail --check-leaks --exit test/",
|
|
7
7
|
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
|
|
8
8
|
"prestart": "node ./local/setup.js",
|
|
9
9
|
"start": "sh server-start.sh",
|