@staff0rd/assist 0.612.0 → 0.613.1

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.js CHANGED
@@ -6,7 +6,7 @@ import { Command } from "commander";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "@staff0rd/assist",
9
- version: "0.612.0",
9
+ version: "0.613.1",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -18042,6 +18042,19 @@ async function recordCommitActivity(message3) {
18042
18042
  await recordSessionRefs(collectCommitRefs(message3));
18043
18043
  }
18044
18044
 
18045
+ // src/commands/commit/validateCommitRefs.ts
18046
+ var URL_REGEX = /https?:\/\/\S/i;
18047
+ function validateCommitRefs(refs) {
18048
+ for (const ref of refs) {
18049
+ if (!URL_REGEX.test(ref)) {
18050
+ console.error(
18051
+ `Error: --ref must contain an http or https URL (got: "${ref}")`
18052
+ );
18053
+ process.exit(1);
18054
+ }
18055
+ }
18056
+ }
18057
+
18045
18058
  // src/commands/sessions/summarise/parseUserLine.ts
18046
18059
  function parseUserLine(line) {
18047
18060
  let entry;
@@ -18166,13 +18179,11 @@ async function commit(args, options2 = {}) {
18166
18179
  }
18167
18180
  const message3 = args[0];
18168
18181
  const files = args.slice(1);
18182
+ const refs = options2.ref ?? [];
18169
18183
  const config = loadConfig();
18170
18184
  validateMessage(message3, config);
18171
- await execCommit(
18172
- files,
18173
- buildCommitMessage(message3, options2.ref ?? []),
18174
- config
18175
- );
18185
+ validateCommitRefs(refs);
18186
+ await execCommit(files, buildCommitMessage(message3, refs), config);
18176
18187
  }
18177
18188
 
18178
18189
  // src/commands/registerCommit.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.612.0",
3
+ "version": "0.613.1",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {