@forge/manifest 10.2.0 → 10.2.1-next.0-experimental-ab129b0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @forge/manifest
2
2
 
3
+ ## 10.2.1-next.0-experimental-ab129b0
4
+
5
+ ### Patch Changes
6
+
7
+ - 10c0bc6: Add egress support for custom URL schemes. Allow custom custom URL schemes as autoconvert patterns.
8
+ - 6447811: Update manifest definitions
9
+ - 2f446cf: Update manifest definitions
10
+
11
+ ## 10.2.1-next.0
12
+
13
+ ### Patch Changes
14
+
15
+ - 10c0bc6: Add egress support for custom URL schemes. Allow custom custom URL schemes as autoconvert patterns.
16
+
3
17
  ## 10.2.0
4
18
 
5
19
  ### Minor Changes
@@ -1311,7 +1311,8 @@
1311
1311
  },
1312
1312
  "name": {
1313
1313
  "description": "The name of the action",
1314
- "type": "string"
1314
+ "type": "string",
1315
+ "maxLength": 255
1315
1316
  },
1316
1317
  "icon": {
1317
1318
  "description": "The url for the icon image to be displayed in the UI",
@@ -1404,7 +1405,8 @@
1404
1405
  },
1405
1406
  "name": {
1406
1407
  "description": "The name of the action",
1407
- "type": "string"
1408
+ "type": "string",
1409
+ "maxLength": 255
1408
1410
  },
1409
1411
  "icon": {
1410
1412
  "description": "The url for the icon image to be displayed in the UI",
@@ -1516,7 +1518,8 @@
1516
1518
  },
1517
1519
  "name": {
1518
1520
  "description": "The name of the action",
1519
- "type": "string"
1521
+ "type": "string",
1522
+ "maxLength": 255
1520
1523
  },
1521
1524
  "icon": {
1522
1525
  "description": "The url for the icon image to be displayed in the UI",
@@ -1699,7 +1702,8 @@
1699
1702
  },
1700
1703
  "name": {
1701
1704
  "description": "The name of the action",
1702
- "type": "string"
1705
+ "type": "string",
1706
+ "maxLength": 255
1703
1707
  },
1704
1708
  "icon": {
1705
1709
  "description": "The url for the icon image to be displayed in the UI",
@@ -5752,6 +5756,19 @@
5752
5756
  "resource"
5753
5757
  ]
5754
5758
  },
5759
+ "projectTypes": {
5760
+ "default": [
5761
+ "company-managed"
5762
+ ],
5763
+ "type": "array",
5764
+ "items": {
5765
+ "type": "string",
5766
+ "enum": [
5767
+ "team-managed",
5768
+ "company-managed"
5769
+ ]
5770
+ }
5771
+ },
5755
5772
  "key": {
5756
5773
  "$ref": "#/definitions/ModuleKeySchema"
5757
5774
  }
@@ -9842,6 +9859,7 @@
9842
9859
  "required": [
9843
9860
  "description",
9844
9861
  "function",
9862
+ "thumbnail",
9845
9863
  "title",
9846
9864
  "key"
9847
9865
  ],
@@ -10028,6 +10046,7 @@
10028
10046
  "required": [
10029
10047
  "description",
10030
10048
  "resource",
10049
+ "thumbnail",
10031
10050
  "title",
10032
10051
  "key"
10033
10052
  ],
@@ -12165,6 +12184,19 @@
12165
12184
  "resource"
12166
12185
  ]
12167
12186
  },
12187
+ "projectTypes": {
12188
+ "default": [
12189
+ "company-managed"
12190
+ ],
12191
+ "type": "array",
12192
+ "items": {
12193
+ "type": "string",
12194
+ "enum": [
12195
+ "team-managed",
12196
+ "company-managed"
12197
+ ]
12198
+ }
12199
+ },
12168
12200
  "key": {
12169
12201
  "$ref": "#/definitions/ModuleKeySchema"
12170
12202
  }
@@ -12627,6 +12659,19 @@
12627
12659
  "resource"
12628
12660
  ]
12629
12661
  },
12662
+ "projectTypes": {
12663
+ "default": [
12664
+ "company-managed"
12665
+ ],
12666
+ "type": "array",
12667
+ "items": {
12668
+ "type": "string",
12669
+ "enum": [
12670
+ "team-managed",
12671
+ "company-managed"
12672
+ ]
12673
+ }
12674
+ },
12630
12675
  "key": {
12631
12676
  "$ref": "#/definitions/ModuleKeySchema"
12632
12677
  }
@@ -13839,6 +13839,7 @@ export interface Modules {
13839
13839
  render?: 'default' | 'native';
13840
13840
  [k: string]: unknown;
13841
13841
  };
13842
+ projectTypes?: ('team-managed' | 'company-managed')[];
13842
13843
  key: ModuleKeySchema;
13843
13844
  [k: string]: unknown;
13844
13845
  },
@@ -13889,6 +13890,7 @@ export interface Modules {
13889
13890
  render?: 'default' | 'native';
13890
13891
  [k: string]: unknown;
13891
13892
  };
13893
+ projectTypes?: ('team-managed' | 'company-managed')[];
13892
13894
  key: ModuleKeySchema;
13893
13895
  [k: string]: unknown;
13894
13896
  }[]
@@ -15818,7 +15820,7 @@ export interface Modules {
15818
15820
  i18n: string;
15819
15821
  };
15820
15822
  description__i18n?: string;
15821
- thumbnail?: string;
15823
+ thumbnail: string;
15822
15824
  refreshable?: boolean;
15823
15825
  connectKeys?: string[];
15824
15826
  displayConditions?: {
@@ -15859,7 +15861,7 @@ export interface Modules {
15859
15861
  i18n: string;
15860
15862
  };
15861
15863
  description__i18n?: string;
15862
- thumbnail?: string;
15864
+ thumbnail: string;
15863
15865
  refreshable?: boolean;
15864
15866
  connectKeys?: string[];
15865
15867
  displayConditions?: {
@@ -15893,7 +15895,7 @@ export interface Modules {
15893
15895
  i18n: string;
15894
15896
  };
15895
15897
  description__i18n?: string;
15896
- thumbnail?: string;
15898
+ thumbnail: string;
15897
15899
  refreshable?: boolean;
15898
15900
  connectKeys?: string[];
15899
15901
  displayConditions?: {
@@ -15934,7 +15936,7 @@ export interface Modules {
15934
15936
  i18n: string;
15935
15937
  };
15936
15938
  description__i18n?: string;
15937
- thumbnail?: string;
15939
+ thumbnail: string;
15938
15940
  refreshable?: boolean;
15939
15941
  connectKeys?: string[];
15940
15942
  displayConditions?: {
@@ -16838,6 +16840,7 @@ export interface Modules {
16838
16840
  render?: 'default' | 'native';
16839
16841
  [k: string]: unknown;
16840
16842
  };
16843
+ projectTypes?: ('team-managed' | 'company-managed')[];
16841
16844
  key: ModuleKeySchema;
16842
16845
  [k: string]: unknown;
16843
16846
  },
@@ -16877,6 +16880,7 @@ export interface Modules {
16877
16880
  render?: 'default' | 'native';
16878
16881
  [k: string]: unknown;
16879
16882
  };
16883
+ projectTypes?: ('team-managed' | 'company-managed')[];
16880
16884
  key: ModuleKeySchema;
16881
16885
  [k: string]: unknown;
16882
16886
  }[]
@@ -17030,6 +17034,7 @@ export interface Modules {
17030
17034
  render?: 'default' | 'native';
17031
17035
  [k: string]: unknown;
17032
17036
  };
17037
+ projectTypes?: ('team-managed' | 'company-managed')[];
17033
17038
  key: ModuleKeySchema;
17034
17039
  [k: string]: unknown;
17035
17040
  },
@@ -17069,6 +17074,7 @@ export interface Modules {
17069
17074
  render?: 'default' | 'native';
17070
17075
  [k: string]: unknown;
17071
17076
  };
17077
+ projectTypes?: ('team-managed' | 'company-managed')[];
17072
17078
  key: ModuleKeySchema;
17073
17079
  [k: string]: unknown;
17074
17080
  }[]
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.validateMacroAutoConvert = void 0;
4
4
  const text_1 = require("../../../text");
5
5
  const utils_1 = require("../../../utils");
6
- const VALID_MATCHER_PATTERN = new RegExp(/^(?=.{1,1024}$)https?:\/\/(?:[a-zA-Z0-9-\*]+\.)*[a-zA-Z0-9-\*]+(?:\.[a-zA-Z\*]{1,})?(?:\/.*)?$/);
6
+ const VALID_MATCHER_PATTERN = new RegExp(/^(?=.{1,1024}$)[a-zA-Z]+:(\/\/)?(\\\\)?(?:[a-zA-Z0-9-\*]+[\.:])*[a-zA-Z0-9-\*]+(?:\.:[a-zA-Z\*]{1,})?(?:\/.*)?$/);
7
7
  const errorMessages = text_1.errors.modules.confluence.autoConvert;
8
8
  const mapToAutoConvertError = (validationErrors, moduleKey) => validationErrors.map((message) => ({ moduleKey, message }));
9
9
  const validateEmpty = (matchers, moduleKey) => {
@@ -1,6 +1,7 @@
1
1
  import { ManifestObject, ManifestValidationResult } from '../types';
2
2
  import { ManifestSchema } from '../schema/manifest';
3
3
  import { ValidatorInterface } from './validator-interface';
4
+ export declare const PROTOCOL_BLOCKLIST: string[];
4
5
  export declare class PermissionsValidator implements ValidatorInterface<ManifestObject<ManifestSchema> | undefined, ManifestSchema> {
5
6
  private isValidURL;
6
7
  private isValidHash;
@@ -1 +1 @@
1
- {"version":3,"file":"permissions-validator.d.ts","sourceRoot":"","sources":["../../src/validators/permissions-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAmB,MAAM,UAAU,CAAC;AAGrF,OAAO,EAAE,cAAc,EAAU,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAO3D,qBAAa,oBACX,YAAW,kBAAkB,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,EAAE,cAAc,CAAC;IAEzF,OAAO,CAAC,UAAU;IA+BlB,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,mBAAmB;IAgB3B,OAAO,CAAC,8BAA8B;IA6ChC,QAAQ,CACZ,QAAQ,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,GACnD,OAAO,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC;CA+JrD"}
1
+ {"version":3,"file":"permissions-validator.d.ts","sourceRoot":"","sources":["../../src/validators/permissions-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAmB,MAAM,UAAU,CAAC;AAGrF,OAAO,EAAE,cAAc,EAAU,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAO3D,eAAO,MAAM,kBAAkB,UAa9B,CAAC;AAEF,qBAAa,oBACX,YAAW,kBAAkB,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,EAAE,cAAc,CAAC;IAEzF,OAAO,CAAC,UAAU;IAwClB,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,mBAAmB;IAgB3B,OAAO,CAAC,8BAA8B;IA6ChC,QAAQ,CACZ,QAAQ,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,GACnD,OAAO,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC;CA+JrD"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PermissionsValidator = void 0;
3
+ exports.PermissionsValidator = exports.PROTOCOL_BLOCKLIST = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const utils_1 = require("../utils");
6
6
  const text_1 = require("../text");
@@ -9,6 +9,20 @@ const url_1 = require("url");
9
9
  const shipyard_scopes_json_1 = tslib_1.__importDefault(require("../scopes/shipyard-scopes.json"));
10
10
  const deprecated_shipyard_scopes_json_1 = tslib_1.__importDefault(require("../scopes/deprecated-shipyard-scopes.json"));
11
11
  const scopes_1 = require("../utils/scopes");
12
+ exports.PROTOCOL_BLOCKLIST = [
13
+ 'javascript:',
14
+ 'data:',
15
+ 'vbscript:',
16
+ 'view-source:',
17
+ 'resource:',
18
+ 'about:',
19
+ 'chrome:',
20
+ 'livescript:',
21
+ 'mocha:',
22
+ 'file:',
23
+ 'mhtml:',
24
+ 'smb:'
25
+ ];
12
26
  class PermissionsValidator {
13
27
  isValidURL(inputURL) {
14
28
  const protocolRegex = /^(.*?:\/\/)/;
@@ -21,6 +35,12 @@ class PermissionsValidator {
21
35
  if (inputURL === '*') {
22
36
  return true;
23
37
  }
38
+ const customURLSchemeRegex = /^[a-zA-Z]+:(\\\\)?/;
39
+ if (customURLSchemeRegex.test(inputURL) &&
40
+ ![...exports.PROTOCOL_BLOCKLIST, 'http'].some((protocol) => inputURL.startsWith(protocol)) &&
41
+ !allowedProtocols.some((protocol) => inputURL.startsWith(protocol))) {
42
+ return true;
43
+ }
24
44
  if (!inputURL.includes('.') || inputURL.includes(' ')) {
25
45
  return false;
26
46
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/manifest",
3
- "version": "10.2.0",
3
+ "version": "10.2.1-next.0-experimental-ab129b0",
4
4
  "description": "Definitions and validations of the Forge manifest",
5
5
  "main": "out/index.js",
6
6
  "scripts": {