envlock-core 0.3.0 → 0.4.0
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/dist/cli/index.js +15 -1
- package/package.json +9 -11
- package/LICENSE +0 -21
package/dist/cli/index.js
CHANGED
|
@@ -157,7 +157,21 @@ async function run(argv, cwd = process.cwd()) {
|
|
|
157
157
|
const available = config?.commands ? Object.keys(config.commands).join(", ") : "none";
|
|
158
158
|
throw new Error(`[envlock] No command specified. Available commands: ${available}`);
|
|
159
159
|
}
|
|
160
|
-
if (
|
|
160
|
+
if (firstArg === "run") {
|
|
161
|
+
if (config?.commands?.["run"]) {
|
|
162
|
+
console.warn(
|
|
163
|
+
'[envlock] Warning: "run" is a reserved subcommand. The config command named "run" is ignored.\nRename it in envlock.config.js to use it as a named command.'
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
const runArgs = passthrough.slice(1);
|
|
167
|
+
if (runArgs.length === 0) {
|
|
168
|
+
throw new Error(
|
|
169
|
+
"[envlock] Usage: envlock run <command> [args...]\nExample: envlock run node server.js --port 4000"
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
command = runArgs[0];
|
|
173
|
+
args = runArgs.slice(1);
|
|
174
|
+
} else if (config?.commands && firstArg in config.commands) {
|
|
161
175
|
const cmdString = config.commands[firstArg];
|
|
162
176
|
if (!cmdString || cmdString.trim() === "") {
|
|
163
177
|
throw new Error(`[envlock] Command "${firstArg}" is empty in envlock.config.js.`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "envlock-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Core 1Password + dotenvx secret injection logic for envlock",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,19 +26,17 @@
|
|
|
26
26
|
"types": "./dist/index.d.ts"
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
|
-
"files": [
|
|
30
|
-
"dist"
|
|
31
|
-
],
|
|
32
|
-
"devDependencies": {
|
|
33
|
-
"@types/node": "^20.14.10",
|
|
34
|
-
"tsup": "^8.0.0",
|
|
35
|
-
"typescript": "^5.8.2",
|
|
36
|
-
"vitest": "^3.0.0"
|
|
37
|
-
},
|
|
29
|
+
"files": ["dist"],
|
|
38
30
|
"scripts": {
|
|
39
31
|
"build": "tsup",
|
|
40
32
|
"dev": "tsup --watch",
|
|
41
33
|
"test": "vitest run",
|
|
42
34
|
"test:watch": "vitest"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@types/node": "^20.14.10",
|
|
38
|
+
"tsup": "^8.0.0",
|
|
39
|
+
"typescript": "^5.8.2",
|
|
40
|
+
"vitest": "^3.0.0"
|
|
43
41
|
}
|
|
44
|
-
}
|
|
42
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Benjamin Davies
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|