@forge/lint

5.16.3-next.75.17.0-next.8
~

Modified (7 files)

Index: package/out/lint/lint.js
===================================================================
--- package/out/lint/lint.js
+++ package/out/lint/lint.js
@@ -19,8 +19,9 @@
 const frame_component_linter_1 = require("./linters/frame-component-linter/frame-component-linter");
 const deprecated_egress_permissions_manifest_linter_1 = require("./linters/manifest-linter/deprecated-egress-permissions-manifest-linter");
 const llm_module_linter_1 = require("./linters/llm-module-linter/llm-module-linter");
 const deprecated_api_module_linter_1 = require("./linters/deprecated-api-module-linter/deprecated-api-module-linter");
+const function_timeout_linter_1 = require("./linters/function-timeout-linter/function-timeout-linter");
 const reportLintResults = (logger, lintResults, showSummary = true) => {
     let numErrors = 0, numWarnings = 0;
     let noProblemsFound = true;
     if (lintResults.length) {
@@ -92,9 +93,10 @@
     new storage_module_linter_1.StorageModulesLinter(environment, manifest, logger),
     new frame_component_linter_1.FrameComponentLinter(environment, manifest, logger),
     new llm_module_linter_1.LlmModuleLinter(environment, manifest, logger),
     new deprecated_api_module_linter_1.DeprecatedApiModuleLinter(environment, manifest, logger),
-    new deprecated_egress_permissions_manifest_linter_1.DeprecatedEgressPermissionsManifestLinter(logger, statsigService)
+    new deprecated_egress_permissions_manifest_linter_1.DeprecatedEgressPermissionsManifestLinter(logger, statsigService),
+    new function_timeout_linter_1.FunctionTimeoutLinter(manifest, logger)
 ]) => {
     const { include, exclude } = await (0, cli_shared_1.listTSConfigIncludeExclude)(new cli_shared_1.FileSystemReader());
     const tsInclude = new Set(include);
     const tsExclude = new Set(exclude);
Index: package/out/lint/text/messages.js
===================================================================
--- package/out/lint/text/messages.js
+++ package/out/lint/text/messages.js
@@ -1,7 +1,8 @@
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.messages = void 0;
+const function_timeout_linter_1 = require("../linters/function-timeout-linter/function-timeout-linter");
 exports.messages = {
     verifiers: {
         externalFetch: {
             message: (url) => `The domain ${url} is not included in the "permissions.external.fetch" section of your app's manifest.yml file`,
@@ -72,7 +73,17 @@
         },
         deprecatedApiStorage: {
             message: () => `The \"storage\" export from \"@forge/api\" is deprecated. Use the \"@forge/kvs\" package instead.`,
             reference: 'deprecated-api-storage'
+        },
+        functionTimeout: {
+            shared: {
+                message: (functionKey, conflictingModuleKey, conflictingModuleType) => `Function "${functionKey}" is used by a consumer and ${conflictingModuleType} "${conflictingModuleKey}". Consumer functions must not be shared with other modules. Use a separate function for each module type.`,
+                reference: 'https://developer.atlassian.com/platform/forge/use-a-long-running-function/'
+            },
+            exceeded: {
+                message: (functionKey, timeoutSeconds, moduleKey, moduleType) => `Function "${functionKey}" defines timeoutSeconds (${timeoutSeconds}s) but is used by ${moduleType} "${moduleKey}". Only ${[...function_timeout_linter_1.LONG_RUNNING_MODULE_TYPES].join(' and ')} functions support custom timeouts.`,
+                reference: 'https://developer.atlassian.com/platform/forge/limits-invocation/'
+            }
         }
     }
 };
Index: package/package.json
===================================================================
--- package/package.json
+++ package/package.json
@@ -1,7 +1,7 @@
 {
   "name": "@forge/lint",
-  "version": "5.16.3-next.7",
+  "version": "5.17.0-next.8",
   "description": "Linting for forge apps",
   "main": "out/index.js",
   "license": "SEE LICENSE IN LICENSE.txt",
   "scripts": {
@@ -18,12 +18,12 @@
     "@types/node-fetch": "^2.6.12",
     "eslint-plugin-import": "^2.29.1"
   },
   "dependencies": {
-    "@forge/cli-shared": "8.19.0-next.7",
+    "@forge/cli-shared": "8.19.0-next.8",
     "@forge/csp": "5.6.1",
     "@forge/egress": "2.3.2",
-    "@forge/manifest": "12.5.0-next.5",
+    "@forge/manifest": "12.5.0-next.6",
     "@typescript-eslint/typescript-estree": "^5.62.0",
     "array.prototype.flatmap": "^1.3.3",
     "@atlassian/atlassian-openapi": "^1.0.6",
     "cross-spawn": "^7.0.6",
Index: package/out/lint/lint.d.ts.map
===================================================================
--- package/out/lint/lint.d.ts.map
+++ package/out/lint/lint.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../src/lint/l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AIpB,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAkB,MAAM,oBAAoB,CAAC;AAgBxG,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,iBAAiB,WAAY,UAAU,eAAe,UAAU,EAAE,4BAAuB,IA+CrG,CAAC;AAEF,eAAO,MAAM,YAAY,gBAAiB,UAAU,EAAE,KAAG,YAQxD,CAAC;AAEF,eAAO,MAAM,eAAe,aAChB,MAAM,UACR,eAAe,oBACN,OAAO,GAAG,QAAQ,CAAC,aAAa,KAChD,QAAQ,SAAS,CAOnB,CAAC;AAEF,eAAO,MAAM,IAAI,gBACF,MAAM,EAAE,YACX,QAAQ,eACL,MAAM,UACX,UAAU,kBACF,cAAc,6BAjBpB,MAAM,UACR,eAAe,oBACN,OAAO,GAAG,QAAQ,CAAC,aAAa,KAChD,QAAQ,SAAS,CAAC,YAgBV,eAAe,EAAE,KAezB,QAAQ,UAAU,EAAE,CAyCtB,CAAC;AAwBF,eAAO,MAAM,QAAQ,WACX,UAAU,kBACF,cAAc,WACtB,eAAe,KACtB,QAAQ,UAAU,EAAE,CAGtB,CAAC"}
\ No newline at end of file
Index: package/out/lint/text/messages.d.ts.map
===================================================================
--- package/out/lint/text/messages.d.ts.map
+++ package/out/lint/text/messages.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/lint/text/messages.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;;2BAGA,MAAM;2BAEN,MAAM,KAAG,MAAM;;;;2BAKf,MAAM;2BAER,MAAM;;;;2BAKJ,MAAM;2BAEN,MAAM,KAAG,MAAM;;;;iCAKT,MAAM;;;;iCAKN,MAAM;;;;8BAKT,MAAM,OAAO,MAAM;;;;+BAKlB,MAAM,UAAU,MAAM,QAAQ,MAAM,GAAG,SAAS,SAAS,MAAM;;;;6BAKjE,MAAM;;;;+BAIJ,MAAM,QAAQ,MAAM,SAAS,MAAM;;;;8BAKpC,MAAM;;;;8BAIN,MAAM;;;;8BAIN,MAAM;;;;;;;;;oCASF,MAAM;;;;;6BAOX,MAAM,WAAW,MAAM;;;;;;;;CAU7C,CAAC"}
\ No newline at end of file
+{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/lint/text/messages.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ;;;2BAGA,MAAM;2BAEN,MAAM,KAAG,MAAM;;;;2BAKf,MAAM;2BAER,MAAM;;;;2BAKJ,MAAM;2BAEN,MAAM,KAAG,MAAM;;;;iCAKT,MAAM;;;;iCAKN,MAAM;;;;8BAKT,MAAM,OAAO,MAAM;;;;+BAKlB,MAAM,UAAU,MAAM,QAAQ,MAAM,GAAG,SAAS,SAAS,MAAM;;;;6BAKjE,MAAM;;;;+BAIJ,MAAM,QAAQ,MAAM,SAAS,MAAM;;;;8BAKpC,MAAM;;;;8BAIN,MAAM;;;;8BAIN,MAAM;;;;;;;;;oCASF,MAAM;;;;;6BAOX,MAAM,WAAW,MAAM;;;;;;;;;uCAWf,MAAM,wBAAwB,MAAM,yBAAyB,MAAM;;;;uCAKnE,MAAM,kBAAkB,MAAM,aAAa,MAAM,cAAc,MAAM;;;;;CAMnG,CAAC"}
\ No newline at end of file
File too large for inline diff
Index: package/out/lint/text/messages.d.ts
===================================================================
--- package/out/lint/text/messages.d.ts
+++ package/out/lint/text/messages.d.ts
@@ -68,7 +68,17 @@
         deprecatedApiStorage: {
             message: () => string;
             reference: string;
         };
+        functionTimeout: {
+            shared: {
+                message: (functionKey: string, conflictingModuleKey: string, conflictingModuleType: string) => string;
+                reference: string;
+            };
+            exceeded: {
+                message: (functionKey: string, timeoutSeconds: number, moduleKey: string, moduleType: string) => string;
+                reference: string;
+            };
+        };
     };
 };
 //# sourceMappingURL=messages.d.ts.map
\ No newline at end of file