bitbucketdc-cli 1.0.12 → 1.0.13

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 (2) hide show
  1. package/dist/index.js +6 -4
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -272,7 +272,7 @@ Examples:
272
272
 
273
273
  // src/commands/file/list.ts
274
274
  function list(parent) {
275
- parent.command("list").description("List directory contents in a repository").requiredOption("--project <key>", "Bitbucket project key").requiredOption("--repo <slug>", "Repository slug").option("--path <path>", "Directory path (defaults to root)").option("--at <ref>", "Branch, tag, or commit hash").option("--limit <n>", "Number of items to return (default: 500)", parseInt).option("--start <n>", "Start index for pagination (default: 0)", parseInt).addHelpText(
275
+ parent.command("list").description("List directory contents in a repository").requiredOption("--project <key>", "Bitbucket project key").requiredOption("--repo <slug>", "Repository slug").option("--path <path>", "Directory path (defaults to root)").option("--at <ref>", "Branch, tag, or commit hash").option("--branch <ref>", "Alias for --at").option("--limit <n>", "Number of items to return (default: 500)", parseInt).option("--start <n>", "Start index for pagination (default: 0)", parseInt).addHelpText(
276
276
  "after",
277
277
  `
278
278
  Examples:
@@ -282,11 +282,12 @@ Examples:
282
282
  ).action(
283
283
  async (opts) => {
284
284
  const client = getClient();
285
+ const ref = opts.at ?? opts.branch;
285
286
  const result = await client.repositories.browse({
286
287
  projectKey: opts.project,
287
288
  repositorySlug: opts.repo,
288
289
  path: opts.path,
289
- at: opts.at,
290
+ at: ref,
290
291
  limit: opts.limit,
291
292
  start: opts.start
292
293
  });
@@ -297,7 +298,7 @@ Examples:
297
298
 
298
299
  // src/commands/file/show.ts
299
300
  function show(parent) {
300
- parent.command("show").description("Show raw file content from a repository").requiredOption("--project <key>", "Bitbucket project key").requiredOption("--repo <slug>", "Repository slug").requiredOption("--path <path>", "File path").option("--at <ref>", "Branch, tag, or commit hash").addHelpText(
301
+ parent.command("show").description("Show raw file content from a repository").requiredOption("--project <key>", "Bitbucket project key").requiredOption("--repo <slug>", "Repository slug").requiredOption("--path <path>", "File path").option("--at <ref>", "Branch, tag, or commit hash").option("--branch <ref>", "Alias for --at").addHelpText(
301
302
  "after",
302
303
  `
303
304
  Examples:
@@ -305,11 +306,12 @@ Examples:
305
306
  bitbucketdc file show --project PROJ --repo my-app --path config/settings.yaml --at release/2.0`
306
307
  ).action(async (opts) => {
307
308
  const client = getClient();
309
+ const ref = opts.at ?? opts.branch;
308
310
  const result = await client.repositories.getRawContent({
309
311
  projectKey: opts.project,
310
312
  repositorySlug: opts.repo,
311
313
  path: opts.path,
312
- at: opts.at
314
+ at: ref
313
315
  });
314
316
  process.stdout.write(result);
315
317
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitbucketdc-cli",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "publish": true,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -22,8 +22,8 @@
22
22
  "tsx": "^4.19.2",
23
23
  "typescript": "^5.7.2",
24
24
  "vitest": "^4.0.16",
25
- "config-eslint": "0.0.0",
26
- "config-typescript": "0.0.0"
25
+ "config-typescript": "0.0.0",
26
+ "config-eslint": "0.0.0"
27
27
  },
28
28
  "engines": {
29
29
  "node": ">=22.0.0"