@optique/git 1.0.0-dev.1572 → 1.0.0-dev.1574

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/index.cjs CHANGED
@@ -179,7 +179,7 @@ function gitBranch(options) {
179
179
  };
180
180
  return {
181
181
  success: false,
182
- error: __optique_core_message.message`Branch ${(0, __optique_core_message.value)(input)} does not exist. Available branches: ${(0, __optique_core_message.valueSet)(branches)}`
182
+ error: __optique_core_message.message`Branch ${(0, __optique_core_message.value)(input)} does not exist.${branches.length > 0 ? __optique_core_message.message` Available branches: ${(0, __optique_core_message.valueSet)(branches, "")}` : __optique_core_message.message``}`
183
183
  };
184
184
  } catch (error) {
185
185
  const fallback = __optique_core_message.message`Failed to list branches. Ensure ${(0, __optique_core_message.value)(dir)} is a valid git repository.`;
@@ -262,7 +262,7 @@ function gitRemoteBranch(remote, options) {
262
262
  };
263
263
  return {
264
264
  success: false,
265
- error: __optique_core_message.message`Remote ${(0, __optique_core_message.value)(remote)} does not exist. Available remotes: ${(0, __optique_core_message.valueSet)(names)}`
265
+ error: __optique_core_message.message`Remote ${(0, __optique_core_message.value)(remote)} does not exist.${names.length > 0 ? __optique_core_message.message` Available remotes: ${(0, __optique_core_message.valueSet)(names, "")}` : __optique_core_message.message``}`
266
266
  };
267
267
  }
268
268
  }
@@ -272,7 +272,7 @@ function gitRemoteBranch(remote, options) {
272
272
  };
273
273
  return {
274
274
  success: false,
275
- error: __optique_core_message.message`Remote branch ${(0, __optique_core_message.value)(input)} does not exist on remote ${(0, __optique_core_message.value)(remote)}. Available branches: ${(0, __optique_core_message.valueSet)(branches)}`
275
+ error: __optique_core_message.message`Remote branch ${(0, __optique_core_message.value)(input)} does not exist on remote ${(0, __optique_core_message.value)(remote)}.${branches.length > 0 ? __optique_core_message.message` Available branches: ${(0, __optique_core_message.valueSet)(branches, "")}` : __optique_core_message.message``}`
276
276
  };
277
277
  } catch (error) {
278
278
  const fallback = __optique_core_message.message`Failed to list remote branches. Ensure remote ${(0, __optique_core_message.value)(remote)} exists.`;
@@ -328,7 +328,7 @@ function gitTag(options) {
328
328
  };
329
329
  return {
330
330
  success: false,
331
- error: __optique_core_message.message`Tag ${(0, __optique_core_message.value)(input)} does not exist. Available tags: ${(0, __optique_core_message.valueSet)(tags)}`
331
+ error: __optique_core_message.message`Tag ${(0, __optique_core_message.value)(input)} does not exist.${tags.length > 0 ? __optique_core_message.message` Available tags: ${(0, __optique_core_message.valueSet)(tags, "")}` : __optique_core_message.message``}`
332
332
  };
333
333
  } catch (error) {
334
334
  const fallback = __optique_core_message.message`Failed to list tags. Ensure ${(0, __optique_core_message.value)(dir)} is a valid git repository.`;
@@ -383,7 +383,7 @@ function gitRemote(options) {
383
383
  };
384
384
  return {
385
385
  success: false,
386
- error: __optique_core_message.message`Remote ${(0, __optique_core_message.value)(input)} does not exist. Available remotes: ${(0, __optique_core_message.valueSet)(names)}`
386
+ error: __optique_core_message.message`Remote ${(0, __optique_core_message.value)(input)} does not exist.${names.length > 0 ? __optique_core_message.message` Available remotes: ${(0, __optique_core_message.valueSet)(names, "")}` : __optique_core_message.message``}`
387
387
  };
388
388
  } catch (error) {
389
389
  const fallback = __optique_core_message.message`Failed to list remotes. Ensure ${(0, __optique_core_message.value)(dir)} is a valid git repository.`;
package/dist/index.js CHANGED
@@ -157,7 +157,7 @@ function gitBranch(options) {
157
157
  };
158
158
  return {
159
159
  success: false,
160
- error: message`Branch ${value(input)} does not exist. Available branches: ${valueSet(branches)}`
160
+ error: message`Branch ${value(input)} does not exist.${branches.length > 0 ? message` Available branches: ${valueSet(branches, "")}` : message``}`
161
161
  };
162
162
  } catch (error) {
163
163
  const fallback = message`Failed to list branches. Ensure ${value(dir)} is a valid git repository.`;
@@ -240,7 +240,7 @@ function gitRemoteBranch(remote, options) {
240
240
  };
241
241
  return {
242
242
  success: false,
243
- error: message`Remote ${value(remote)} does not exist. Available remotes: ${valueSet(names)}`
243
+ error: message`Remote ${value(remote)} does not exist.${names.length > 0 ? message` Available remotes: ${valueSet(names, "")}` : message``}`
244
244
  };
245
245
  }
246
246
  }
@@ -250,7 +250,7 @@ function gitRemoteBranch(remote, options) {
250
250
  };
251
251
  return {
252
252
  success: false,
253
- error: message`Remote branch ${value(input)} does not exist on remote ${value(remote)}. Available branches: ${valueSet(branches)}`
253
+ error: message`Remote branch ${value(input)} does not exist on remote ${value(remote)}.${branches.length > 0 ? message` Available branches: ${valueSet(branches, "")}` : message``}`
254
254
  };
255
255
  } catch (error) {
256
256
  const fallback = message`Failed to list remote branches. Ensure remote ${value(remote)} exists.`;
@@ -306,7 +306,7 @@ function gitTag(options) {
306
306
  };
307
307
  return {
308
308
  success: false,
309
- error: message`Tag ${value(input)} does not exist. Available tags: ${valueSet(tags)}`
309
+ error: message`Tag ${value(input)} does not exist.${tags.length > 0 ? message` Available tags: ${valueSet(tags, "")}` : message``}`
310
310
  };
311
311
  } catch (error) {
312
312
  const fallback = message`Failed to list tags. Ensure ${value(dir)} is a valid git repository.`;
@@ -361,7 +361,7 @@ function gitRemote(options) {
361
361
  };
362
362
  return {
363
363
  success: false,
364
- error: message`Remote ${value(input)} does not exist. Available remotes: ${valueSet(names)}`
364
+ error: message`Remote ${value(input)} does not exist.${names.length > 0 ? message` Available remotes: ${valueSet(names, "")}` : message``}`
365
365
  };
366
366
  } catch (error) {
367
367
  const fallback = message`Failed to list remotes. Ensure ${value(dir)} is a valid git repository.`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optique/git",
3
- "version": "1.0.0-dev.1572+6945a5ef",
3
+ "version": "1.0.0-dev.1574+d9b3596d",
4
4
  "description": "Git value parsers for Optique",
5
5
  "keywords": [
6
6
  "CLI",
@@ -59,7 +59,7 @@
59
59
  "dependencies": {
60
60
  "@logtape/logtape": "^2.0.4",
61
61
  "isomorphic-git": "^1.36.1",
62
- "@optique/core": "1.0.0-dev.1572+6945a5ef"
62
+ "@optique/core": "1.0.0-dev.1574+d9b3596d"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@types/node": "^20.19.9",