@staff0rd/assist 0.1111.0 → 0.1112.0

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.1111.0",
9
+ version: "0.1112.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -8768,6 +8768,13 @@ function parseAzureDevopsPrUrl(url) {
8768
8768
  return { org, project, repo, id, url: `${parsed.origin}${matched.path}` };
8769
8769
  }
8770
8770
 
8771
+ // src/shared/withoutHarnessArg.ts
8772
+ function withoutHarnessArg(mode, rest) {
8773
+ if (rest[0] !== "--harness") return rest;
8774
+ if (!mode.featureId) return void 0;
8775
+ return harnessKinds.includes(rest[1]) ? rest.slice(2) : void 0;
8776
+ }
8777
+
8771
8778
  // src/shared/harnessAdapters/editEnforcement.ts
8772
8779
  var editEnforcement = [
8773
8780
  "intercept.command",
@@ -8833,7 +8840,7 @@ var azureDevopsPrActions = prActions.filter(
8833
8840
  function isAllowedAzureDevopsPrArgs(args) {
8834
8841
  if (!Array.isArray(args)) return false;
8835
8842
  return azureDevopsPrActions.some(
8836
- (action) => action.args.length === args.length && action.args.every((arg, index3) => arg === args[index3])
8843
+ (action) => action.args.every((arg, index3) => arg === args[index3]) && withoutHarnessArg(action, args.slice(action.args.length))?.length === 0
8837
8844
  );
8838
8845
  }
8839
8846
 
@@ -9004,20 +9011,15 @@ function isOptionFlags(flags2) {
9004
9011
  );
9005
9012
  return sameArgs(flags2, reviewOptionArgs(options2));
9006
9013
  }
9007
- function withoutHarness(mode, rest) {
9008
- if (rest[0] !== "--harness") return rest;
9009
- if (!mode.featureId) return void 0;
9010
- return harnessKinds.includes(rest[1]) ? rest.slice(2) : void 0;
9011
- }
9012
9014
  function isAllowedPrArgs(args) {
9013
9015
  if (!Array.isArray(args)) return false;
9014
9016
  const isAction = prActions.some(
9015
- (action) => sameArgs(action.args, args.slice(0, action.args.length)) && withoutHarness(action, args.slice(action.args.length))?.length === 0
9017
+ (action) => sameArgs(action.args, args.slice(0, action.args.length)) && withoutHarnessArg(action, args.slice(action.args.length))?.length === 0
9016
9018
  );
9017
9019
  if (isAction) return true;
9018
9020
  return reviewButtonModes.some((mode) => {
9019
9021
  if (!sameArgs(mode.args, args.slice(0, mode.args.length))) return false;
9020
- const flags2 = withoutHarness(mode, args.slice(mode.args.length));
9022
+ const flags2 = withoutHarnessArg(mode, args.slice(mode.args.length));
9021
9023
  return flags2 !== void 0 && isOptionFlags(flags2);
9022
9024
  });
9023
9025
  }
@@ -12174,7 +12176,8 @@ function harnessFeatureResolutions(config) {
12174
12176
  }
12175
12177
 
12176
12178
  // src/commands/sessions/web/harnessCapabilities.ts
12177
- function harnessCapabilities(_req, res) {
12179
+ function harnessCapabilities(req, res) {
12180
+ allowExtensionOrigin(req, res);
12178
12181
  const config = loadConfig().harness;
12179
12182
  const { detected, features } = harnessFeatureResolutions(config);
12180
12183
  respondJson(res, 200, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.1111.0",
3
+ "version": "0.1112.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {