@jdeighan/env 8.0.26 → 8.0.30
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/package.json +3 -3
- package/src/EnvLoaderEx.coffee +3 -2
- package/src/EnvLoaderEx.js +3 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jdeighan/env",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "8.0.
|
|
4
|
+
"version": "8.0.30",
|
|
5
5
|
"description": "enhanced syntax for .env files",
|
|
6
6
|
"main": "./src/EnvLoaderEx.js",
|
|
7
7
|
"exports": {
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://github.com/johndeighan/env#readme",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@jdeighan/coffee-utils": "^4.1.
|
|
35
|
-
"@jdeighan/string-input": "^8.0.
|
|
34
|
+
"@jdeighan/coffee-utils": "^4.1.16",
|
|
35
|
+
"@jdeighan/string-input": "^8.0.42",
|
|
36
36
|
"coffeescript": "^2.6.1",
|
|
37
37
|
"cross-env": "^7.0.3"
|
|
38
38
|
}
|
package/src/EnvLoaderEx.coffee
CHANGED
|
@@ -104,7 +104,7 @@ export class EnvLoader extends PLLParser
|
|
|
104
104
|
|
|
105
105
|
mapNode: (str) ->
|
|
106
106
|
|
|
107
|
-
debug "enter mapNode('#{escapeStr(str)}')"
|
|
107
|
+
debug "enter EnvLoader.mapNode('#{escapeStr(str)}')"
|
|
108
108
|
if lMatches = str.match(///^
|
|
109
109
|
([A-Za-z_\.]+) # identifier
|
|
110
110
|
\s*
|
|
@@ -114,6 +114,7 @@ export class EnvLoader extends PLLParser
|
|
|
114
114
|
$///)
|
|
115
115
|
[_, key, value] = lMatches
|
|
116
116
|
if @prefix && (key.indexOf(@prefix) != 0)
|
|
117
|
+
debug "return from EnvLoader.mapNode()"
|
|
117
118
|
return undef
|
|
118
119
|
if @stripPrefix
|
|
119
120
|
key = key.substring(@prefix.length)
|
|
@@ -161,7 +162,7 @@ export class EnvLoader extends PLLParser
|
|
|
161
162
|
}
|
|
162
163
|
else
|
|
163
164
|
error "Invalid line: '#{str}'"
|
|
164
|
-
debug "return from mapNode():", result
|
|
165
|
+
debug "return from EnvLoader.mapNode():", result
|
|
165
166
|
return result
|
|
166
167
|
|
|
167
168
|
# ..........................................................
|
package/src/EnvLoaderEx.js
CHANGED
|
@@ -127,10 +127,11 @@ export var EnvLoader = class EnvLoader extends PLLParser {
|
|
|
127
127
|
// ..........................................................
|
|
128
128
|
mapNode(str) {
|
|
129
129
|
var _, key, lMatches, neg, op, result, value;
|
|
130
|
-
debug(`enter mapNode('${escapeStr(str)}')`);
|
|
130
|
+
debug(`enter EnvLoader.mapNode('${escapeStr(str)}')`);
|
|
131
131
|
if (lMatches = str.match(/^([A-Za-z_\.]+)\s*=\s*(.*)$/)) { // identifier
|
|
132
132
|
[_, key, value] = lMatches;
|
|
133
133
|
if (this.prefix && (key.indexOf(this.prefix) !== 0)) {
|
|
134
|
+
debug("return from EnvLoader.mapNode()");
|
|
134
135
|
return undef;
|
|
135
136
|
}
|
|
136
137
|
if (this.stripPrefix) {
|
|
@@ -166,7 +167,7 @@ export var EnvLoader = class EnvLoader extends PLLParser {
|
|
|
166
167
|
} else {
|
|
167
168
|
error(`Invalid line: '${str}'`);
|
|
168
169
|
}
|
|
169
|
-
debug("return from mapNode():", result);
|
|
170
|
+
debug("return from EnvLoader.mapNode():", result);
|
|
170
171
|
return result;
|
|
171
172
|
}
|
|
172
173
|
|