@forge/lint 3.3.2-next.2 → 3.4.0-next.3

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,11 @@
1
1
  # @forge/lint
2
2
 
3
+ ## 3.4.0-next.3
4
+
5
+ ### Minor Changes
6
+
7
+ - 4d17795: Allow data:image URIs for egress bypass of dynamic properties modules
8
+
3
9
  ## 3.3.2-next.2
4
10
 
5
11
  ### Patch Changes
@@ -4,6 +4,7 @@ import { TSESTree } from '@typescript-eslint/typescript-estree';
4
4
  export declare abstract class AbstractIconVisitor implements NodeVisitor<DynamicPropertiesIconUrl> {
5
5
  visit(node: TSESTree.Node, parent: TSESTree.Node | undefined, callback: (input: DynamicPropertiesIconUrl) => void): void;
6
6
  protected abstract getIconDefinitionNode(node: any): any;
7
+ private isBundledUri;
7
8
  private handleIconNode;
8
9
  private transformArgsToIconUrl;
9
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-icon-visitor.d.ts","sourceRoot":"","sources":["../../../../../src/lint/linters/dynamic-properties-linter/visitors/abstract-icon-visitor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAkB,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAEhF,8BAAsB,mBAAoB,YAAW,WAAW,CAAC,wBAAwB,CAAC;IACxF,KAAK,CACH,IAAI,EAAE,QAAQ,CAAC,IAAI,EACnB,MAAM,EAAE,QAAQ,CAAC,IAAI,GAAG,SAAS,EACjC,QAAQ,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,IAAI,GAClD,IAAI;IAkBP,SAAS,CAAC,QAAQ,CAAC,qBAAqB,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG;IAExD,OAAO,CAAC,cAAc,CAOpB;IAEF,OAAO,CAAC,sBAAsB,CAK3B;CACJ"}
1
+ {"version":3,"file":"abstract-icon-visitor.d.ts","sourceRoot":"","sources":["../../../../../src/lint/linters/dynamic-properties-linter/visitors/abstract-icon-visitor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAkB,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAEhF,8BAAsB,mBAAoB,YAAW,WAAW,CAAC,wBAAwB,CAAC;IACxF,KAAK,CACH,IAAI,EAAE,QAAQ,CAAC,IAAI,EACnB,MAAM,EAAE,QAAQ,CAAC,IAAI,GAAG,SAAS,EACjC,QAAQ,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,IAAI,GAClD,IAAI;IAkBP,SAAS,CAAC,QAAQ,CAAC,qBAAqB,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG;IAExD,OAAO,CAAC,YAAY,CACkD;IAEtE,OAAO,CAAC,cAAc,CAOpB;IAEF,OAAO,CAAC,sBAAsB,CAK3B;CACJ"}
@@ -4,9 +4,10 @@ exports.AbstractIconVisitor = void 0;
4
4
  const typescript_estree_1 = require("@typescript-eslint/typescript-estree");
5
5
  class AbstractIconVisitor {
6
6
  constructor() {
7
+ this.isBundledUri = (iconUri) => iconUri.startsWith('resource:') || iconUri.startsWith('data:image');
7
8
  this.handleIconNode = (iconNode, callback) => {
8
9
  if ((iconNode === null || iconNode === void 0 ? void 0 : iconNode.type) === typescript_estree_1.AST_NODE_TYPES.Literal && typeof (iconNode === null || iconNode === void 0 ? void 0 : iconNode.value) === 'string') {
9
- if (iconNode.value.trim() !== '' && !iconNode.value.trim().startsWith('resource:')) {
10
+ if (iconNode.value.trim() !== '' && !this.isBundledUri(iconNode.value.trim())) {
10
11
  const iconUrl = this.transformArgsToIconUrl(iconNode);
11
12
  callback(iconUrl);
12
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/lint",
3
- "version": "3.3.2-next.2",
3
+ "version": "3.4.0-next.3",
4
4
  "description": "Linting for forge apps",
5
5
  "main": "out/index.js",
6
6
  "license": "UNLICENSED",