lldap-cli 1.0.3 → 1.1.2

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.
Files changed (3) hide show
  1. package/README.md +16 -0
  2. package/dist/cli.js +4 -4
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -21,6 +21,22 @@ Built with [Bun](https://bun.sh/) for fast execution and modern TypeScript suppo
21
21
 
22
22
  ## Installation
23
23
 
24
+ ### From npm
25
+
26
+ ```bash
27
+ # Install globally with npm
28
+ npm install -g lldap-cli
29
+
30
+ # Install globally with bun
31
+ bun add -g lldap-cli
32
+
33
+ # Run without installing (npx)
34
+ npx lldap-cli --help
35
+
36
+ # Run without installing (bunx)
37
+ bunx lldap-cli --help
38
+ ```
39
+
24
40
  ### From Release
25
41
 
26
42
  Download the standalone binary for your platform from the [releases page](https://github.com/madeinoz67/lldap-cli/releases):
package/dist/cli.js CHANGED
@@ -2359,7 +2359,7 @@ class UserService {
2359
2359
  async getUsersByGroup(groupName) {
2360
2360
  const query = "{users{id creationDate uuid email displayName firstName lastName groups{displayName}}}";
2361
2361
  const data = await this.client.query(query);
2362
- return data.users.filter((u) => u.groups.some((g) => g.displayName.toLowerCase() === groupName.toLowerCase())).map(({ groups, ...user }) => user);
2362
+ return data.users.filter((u) => u.groups.some((g) => g.displayName.toLowerCase() === groupName.toLowerCase())).map(({ groups: _groups, ...user }) => user);
2363
2363
  }
2364
2364
  globToRegex(pattern) {
2365
2365
  const escaped = pattern.replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*").replace(/\?/g, ".");
@@ -2934,11 +2934,11 @@ var ExitCode2 = {
2934
2934
  // package.json
2935
2935
  var package_default = {
2936
2936
  name: "lldap-cli",
2937
- version: "1.0.3",
2937
+ version: "1.1.2",
2938
2938
  description: "CLI tool for managing LLDAP (Lightweight LDAP) users, groups, and schema",
2939
2939
  type: "module",
2940
2940
  bin: {
2941
- "lldap-cli": "./dist/cli.js"
2941
+ "lldap-cli": "dist/cli.js"
2942
2942
  },
2943
2943
  files: [
2944
2944
  "dist",
@@ -3108,7 +3108,7 @@ userCommand.command("list [field]").description("List users (field: uid, email,
3108
3108
  const config = buildConfig(globalOptions);
3109
3109
  const client = new LldapClient(config);
3110
3110
  const userService = new UserService(client);
3111
- let users = opts.group ? await userService.getUsersByGroup(opts.group) : await userService.getUsers();
3111
+ const users = opts.group ? await userService.getUsersByGroup(opts.group) : await userService.getUsers();
3112
3112
  let output;
3113
3113
  if (field === "uid") {
3114
3114
  output = formatList(users.map((u) => u.id));
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "lldap-cli",
3
- "version": "1.0.3",
3
+ "version": "1.1.2",
4
4
  "description": "CLI tool for managing LLDAP (Lightweight LDAP) users, groups, and schema",
5
5
  "type": "module",
6
6
  "bin": {
7
- "lldap-cli": "./dist/cli.js"
7
+ "lldap-cli": "dist/cli.js"
8
8
  },
9
9
  "files": [
10
10
  "dist",