@dayofweek/dcli 1.1.1 → 1.1.3

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/bin/dcli.js CHANGED
@@ -6,10 +6,13 @@ import { readFileSync, existsSync, mkdirSync, writeFileSync } from "node:fs";
6
6
  import { join, dirname } from "node:path";
7
7
  import { homedir } from "node:os";
8
8
  import { createInterface } from "node:readline/promises";
9
+ import { fileURLToPath } from "node:url";
10
+ const __dirname = dirname(fileURLToPath(import.meta.url));
11
+ const pkg = JSON.parse(readFileSync(join(__dirname, "../../package.json"), "utf-8"));
9
12
  const program = new Command()
10
13
  .name("dcli")
11
14
  .description("CLI for the Day of Week AgTech platform")
12
- .version("1.0.0")
15
+ .version(pkg.version)
13
16
  .option("--token <token>", "Auth token (overrides DCLI_AUTH_TOKEN)")
14
17
  .option("--api-url <url>", "API base URL (overrides DCLI_API_URL)")
15
18
  .option("--json", "Output JSON (default for non-interactive use)");
@@ -138,10 +141,11 @@ read
138
141
  });
139
142
  read
140
143
  .command("catalog")
141
- .description("Search or browse the produce catalog")
144
+ .description("Search or browse the produce catalog (selectable items only by default)")
142
145
  .option("--search <query>", "Search by name")
143
146
  .option("--parent <conceptId>", "List children of a category")
144
147
  .option("--type <nodeType>", "Filter by type (category, produce, variety)")
148
+ .option("--include-categories", "Include non-selectable categories in results")
145
149
  .option("--limit <count>", "Max results", parseInt)
146
150
  .action(async (opts) => {
147
151
  const client = getClient();
package/dist/client.d.ts CHANGED
@@ -46,6 +46,7 @@ export declare class DayOfWeekClient {
46
46
  search?: string;
47
47
  parent?: string;
48
48
  type?: string;
49
+ includeCategories?: boolean;
49
50
  limit?: number;
50
51
  }): Promise<any[]>;
51
52
  listProposals(opts?: {
package/dist/client.js CHANGED
@@ -75,6 +75,8 @@ export class DayOfWeekClient {
75
75
  params.set("parent", opts.parent);
76
76
  if (opts?.type)
77
77
  params.set("type", opts.type);
78
+ if (opts?.includeCategories)
79
+ params.set("includeCategories", "true");
78
80
  if (opts?.limit)
79
81
  params.set("limit", String(opts.limit));
80
82
  const qs = params.toString();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dayofweek/dcli",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "CLI for the Day of Week AgTech platform — read data and submit proposals for review",
5
5
  "license": "MIT",
6
6
  "type": "module",