npm package diff

Package: @forge/manifest

Versions: 9.5.0-next.2 - 9.5.0-next.3

File: package/out/validators/permissions-validator.js

Index: package/out/validators/permissions-validator.js
===================================================================
--- package/out/validators/permissions-validator.js
+++ package/out/validators/permissions-validator.js
@@ -159,8 +159,35 @@
                 perms: manifest.typedContent.permissions.external?.scripts?.map((key) => typeof key === 'object' ? key.address : key)
             }
         ];
         mapping.forEach((item) => this.validateExternalPermissionURLs(errors, item.element, item.perms, manifest));
+        const { fetch: originalFetch, ...restOfExternalPermissions } = manifest.typedContent.permissions.external || {};
+        Object.entries(originalFetch || {}).forEach(([key, values]) => {
+            if (values.some((value) => typeof value === 'string')) {
+                errors.push({
+                    message: text_1.errors.permissions.deprecatedEgressPermission(`fetch.${key}`),
+                    reference: text_1.References.Permissions,
+                    level: 'warning',
+                    metadata: {
+                        hasDeprecatedEgressPermissions: true
+                    },
+                    ...(0, utils_1.findPosition)(key, manifest.yamlContentByLine)
+                });
+            }
+        });
+        Object.entries(restOfExternalPermissions || {}).forEach(([key, values]) => {
+            if (values.some((value) => typeof value === 'string')) {
+                errors.push({
+                    message: text_1.errors.permissions.deprecatedEgressPermission(key),
+                    reference: text_1.References.Permissions,
+                    level: 'warning',
+                    metadata: {
+                        hasDeprecatedEgressPermissions: true
+                    },
+                    ...(0, utils_1.findPosition)(key, manifest.yamlContentByLine)
+                });
+            }
+        });
         const remoteMap = manifest.typedContent.remotes?.reduce((prev, item) => {
             const baseUrl = typeof item.baseUrl === 'string' ? item.baseUrl : item.baseUrl.default;
             return prev.set(item.key, baseUrl);
         }, new Map());