learn-auth-sdk 0.2.8 → 0.3.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.
@@ -1,2 +1 @@
1
-
2
- export { }
1
+ #!/usr/bin/env node
package/dist/cli/index.js CHANGED
@@ -1,3 +1,5 @@
1
+ #!/usr/bin/env node
2
+
1
3
  // src/cli/index.ts
2
4
  import { Command } from "commander";
3
5
 
@@ -305,9 +307,20 @@ async function deployCommand() {
305
307
 
306
308
  // src/cli/index.ts
307
309
  var program = new Command();
308
- program.name("learn-auth").description("CLI tool for managing Auth settings").version("0.2.0");
309
- program.command("login").description("Authenticate via browser").action(loginCommand);
310
- program.command("init").description("Initialize auth config").action(initCommand);
311
- program.command("config").description("Configure roles and protected pages").option("--roles <roles>", "Comma separated roles").option("--protect <page>", "Page URL to protect").option("--allowed-roles <roles>", "Roles allowed to view protected page").action(configCommand);
312
- program.command("deploy").description("Deploy auth config live").action(deployCommand);
310
+ program.name("learn-auth").description("CLI tool for managing Auth settings").version("0.3.0");
311
+ program.command("login").description("Authenticate with Learn Auth via browser").option("--base-url <url>", "Custom base URL for API").action(async (options) => {
312
+ await loginCommand(options);
313
+ });
314
+ program.command("init").description("Initialize auth configuration").action(async () => {
315
+ await initCommand();
316
+ });
317
+ program.command("config").description("Configure roles and protected pages").option("--roles <roles>", "Comma separated roles").option("--protect <page>", "Page URL to protect").option("--allowed-roles <roles>", "Roles allowed to view protected page").action(async (options) => {
318
+ await configCommand(options);
319
+ });
320
+ program.command("deploy").description("Deploy auth configuration").action(async () => {
321
+ await deployCommand();
322
+ });
313
323
  program.parse(process.argv);
324
+ if (!process.argv.slice(2).length) {
325
+ program.outputHelp();
326
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "learn-auth-sdk",
3
- "version": "0.2.8",
3
+ "version": "0.3.0",
4
4
  "description": "Open-source Auth SDK for decentralized tenant backends",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",