@farm.js/cli 0.1.0-beta.5 → 0.1.0-beta.6
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/farm.js +20 -0
- package/package.json +2 -2
package/bin/farm.js
CHANGED
|
@@ -80,6 +80,26 @@ program
|
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
82
|
|
|
83
|
+
const authCommand = program.command("auth").description("Manage Farm-native authentication");
|
|
84
|
+
|
|
85
|
+
authCommand
|
|
86
|
+
.command("migrate")
|
|
87
|
+
.description("Create or update the Farm Auth database schema")
|
|
88
|
+
.option("-r, --root <root>", "Root directory", process.cwd())
|
|
89
|
+
.option("-c, --config <config>", "Path to farm config file")
|
|
90
|
+
.action(async (options) => {
|
|
91
|
+
try {
|
|
92
|
+
const { migrateFarmAuth } = require("../dist/index.js");
|
|
93
|
+
await migrateFarmAuth({
|
|
94
|
+
root: options.root,
|
|
95
|
+
configPath: options.config,
|
|
96
|
+
});
|
|
97
|
+
} catch (error) {
|
|
98
|
+
console.error("Failed to migrate Farm Auth:", error);
|
|
99
|
+
process.exit(1);
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
|
|
83
103
|
program
|
|
84
104
|
.command("upgrade")
|
|
85
105
|
.description("Upgrade installed Farm.js packages to a stable or beta release")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farm.js/cli",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.6",
|
|
4
4
|
"description": "CLI for Farm.js framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"@farm.js/cli",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"commander": "^11.1.0",
|
|
30
30
|
"croner": "9.1.0",
|
|
31
31
|
"picocolors": "^1.0.0",
|
|
32
|
-
"@farm.js/core": "0.1.0-beta.
|
|
32
|
+
"@farm.js/core": "0.1.0-beta.6"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/node": "^20.10.5",
|