kschema-fs-read-config 1.4.6 → 1.4.7

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/bin/v4/index.js CHANGED
@@ -39,4 +39,23 @@ const getPort = (rootPath) => {
39
39
  return process.env.PORT;
40
40
  };
41
41
 
42
- export { getAllFilesContent, getTableNames, getPort };
42
+ const schemasPath = (rootPath) => {
43
+ dotenv.config({
44
+ path: path.join(rootPath, ".env")
45
+ });
46
+
47
+ return process.env.SchemaPath;
48
+ };
49
+
50
+ const dataPath = (rootPath) => {
51
+ dotenv.config({
52
+ path: path.join(rootPath, ".env")
53
+ });
54
+
55
+ return process.env.DataPath;
56
+ };
57
+
58
+ export {
59
+ getAllFilesContent, getTableNames, getPort,
60
+ schemasPath, dataPath
61
+ };
package/index.js CHANGED
@@ -45,6 +45,6 @@ if (!match || match[0] !== expectedExportLine) {
45
45
 
46
46
  export { latestModule };
47
47
 
48
- export const { getAllFilesContent, getPort, getTableNames } = latestModule;
48
+ export const { dataPath, getAllFilesContent, getPort, getTableNames, schemasPath } = latestModule;
49
49
 
50
50
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kschema-fs-read-config",
3
- "version": "1.4.6",
3
+ "version": "1.4.7",
4
4
  "description": "read the env file to arrive the location of schemas in config",
5
5
  "keywords": [
6
6
  "cli",