npm package diff

Package: @forge/sandbox-runtime

Versions: 4.18.4-next.0-experimental-c7a7d36 - 4.18.0-experimental-204139e

Modified:package/out/sandbox-isolate/api/fetch/index.js

Index: package/out/sandbox-isolate/api/fetch/index.js
===================================================================
--- package/out/sandbox-isolate/api/fetch/index.js
+++ package/out/sandbox-isolate/api/fetch/index.js
@@ -190,9 +190,9 @@
         if (ctx.product !== undefined) {
             middleware.push((0, updateRestUrl_1.default)(ctx.product, this.request.getCloudId(), this.request.getWorkspaceId()));
         }
     };
-    getEnvironmentConfig = () => {
+    getEnvironment = () => {
         const baseUrl = process.env.ATLASSIAN_API_BASE_URL || '';
         if (baseUrl.includes('.dev.')) {
             return Environment.DEV;
         }
@@ -236,16 +236,16 @@
                 contextAri: this.request.getContextAri(),
                 appId: this.request.getAppId(),
                 environmentId: this.request.getEnvironmentId(),
                 appVersion: this.request.getAppVersion()
-            }));
+            }, this.request.isFeatureFlagEnabled(runtime_1.XEN_RUNTIME_USE_CONTEXT_ARI_IN_QUEUE_PATHS)));
         }
         middleware.push((0, redirectMiddleware_1.default)());
         if (!ctx.product && this.request.isFeatureFlagEnabled(runtime_1.XEN_RUNTIME_EGRESS_DISCLOSURE_ENABLED)) {
             const egressAllowList = this.request.getEgressAllowList() ?? [];
             middleware.push((0, egress_filter_1.egressFilterMiddleware)(egressAllowList, this.request.isFeatureFlagEnabled(runtime_1.XEN_RUNTIME_SHOULD_BLOCK_EXTERNAL_FETCH), this.logger));
         }
-        if (!proxyParams && this.getEnvironmentConfig() === Environment.PROD) {
+        if (!proxyParams && this.getEnvironment() === Environment.PROD) {
             middleware.push((0, blockPrivateIPMiddleware_1.default)());
         }
         if (ctx.product) {
             middleware.push((0, tracing_1.default)(this.request.getTracing()));

Modified:package/out/sandbox-isolate/api/fetch/middleware/updateRestUrl.js

Index: package/out/sandbox-isolate/api/fetch/middleware/updateRestUrl.js
===================================================================
--- package/out/sandbox-isolate/api/fetch/middleware/updateRestUrl.js
+++ package/out/sandbox-isolate/api/fetch/middleware/updateRestUrl.js
@@ -28,8 +28,9 @@
     new RegExp('^/webhook/queue/stats/{cloudId}/{environmentId}/{appId}/{appVersion}$'),
     new RegExp('^/webhook/queue/stats/{contextAri}/{environmentId}/{appId}/{appVersion}$'),
     new RegExp('^/webhook/queue/cancel/{cloudId}/{environmentId}/{appId}/{appVersion}$'),
     new RegExp('^/webhook/queue/cancel/{contextAri}/{environmentId}/{appId}/{appVersion}$'),
+    new RegExp('^/bitbucket/spike/container-tokens/2.0/repositories/{{workspaceId}}/.*$'),
     new RegExp('^/sentry/'),
     new RegExp('^/me$'),
     /^\/connected-data\/.*$/
 ];

Modified:package/out/sandbox-isolate/api/fetch/middleware/updateUrlVariablesMiddleware.js

Index: package/out/sandbox-isolate/api/fetch/middleware/updateUrlVariablesMiddleware.js
===================================================================
--- package/out/sandbox-isolate/api/fetch/middleware/updateUrlVariablesMiddleware.js
+++ package/out/sandbox-isolate/api/fetch/middleware/updateUrlVariablesMiddleware.js
@@ -11,12 +11,12 @@
 function isWebhookQueueEndpoint(path) {
     const webhookEndpointsPattern = new RegExp('/webhook/queue/(publish|stats|cancel)/{cloudId}/{environmentId}/{appId}/{appVersion}$');
     return webhookEndpointsPattern.test(path);
 }
-function updateProductURL(restPath, toReplaceVariables) {
+function updateProductURL(restPath, toReplaceVariables, useContexAriInQueuePaths) {
     let updatedRestPath = restPath;
     const variablesToUpdate = extractVariables(restPath);
-    const replaceCloudIdWithContextAri = isWebhookQueueEndpoint(restPath);
+    const replaceCloudIdWithContextAri = useContexAriInQueuePaths && isWebhookQueueEndpoint(restPath);
     variablesToUpdate.forEach((replaceProperty) => {
         if (replaceProperty in toReplaceVariables) {
             const regex = new RegExp('{' + replaceProperty + '}', 'g');
             const replacementValue = replaceCloudIdWithContextAri && replaceProperty === 'cloudId' && 'contextAri' in toReplaceVariables
@@ -27,15 +27,15 @@
     });
     return updatedRestPath;
 }
 exports.updateProductURL = updateProductURL;
-function updateUrlVariablesMiddleware(request) {
+function updateUrlVariablesMiddleware(request, useContexAriInQueuePaths) {
     return async (url, options, innerFetch) => {
         if (url instanceof node_fetch_1.Request) {
-            url.url = updateProductURL(url.url, request);
+            url.url = updateProductURL(url.url, request, useContexAriInQueuePaths);
         }
         else {
-            url = updateProductURL(url, request);
+            url = updateProductURL(url, request, useContexAriInQueuePaths);
         }
         return innerFetch(url, options);
     };
 }

Modified:package/package.json

Index: package/package.json
===================================================================
--- package/package.json
+++ package/package.json
@@ -1,7 +1,7 @@
 {
   "name": "@forge/sandbox-runtime",
-  "version": "4.18.4-next.0-experimental-c7a7d36",
+  "version": "4.18.0-experimental-204139e",
   "description": "A Node.js runtime for Atlassian app functions",
   "author": "Atlassian",
   "license": "UNLICENSED",
   "main": "out/index.js",
@@ -12,9 +12,9 @@
     "compile": "tsc -b -v",
     "test": "jest"
   },
   "devDependencies": {
-    "@forge/bundler": "4.18.1-next.8-experimental-c7a7d36",
+    "@forge/bundler": "4.17.4-next.0-experimental-204139e",
     "@types/jest": "^29.5.12",
     "@types/node": "14.18.63",
     "@types/node-fetch": "^2.6.11",
     "@types/ws": "^7.4.7",
@@ -27,12 +27,12 @@
     "typescript": "4.8.4",
     "uuid": "^9.0.1"
   },
   "dependencies": {
-    "@forge/api": "3.9.2-next.0-experimental-c7a7d36",
+    "@forge/api": "3.8.1-experimental-204139e",
     "@forge/egress": "^1.2.13",
     "@forge/isolated-vm": "4.1.2",
-    "@forge/runtime": "5.10.1",
+    "@forge/runtime": "5.9.0",
     "@forge/runtime-bootstrap": "1.11.0",
     "@forge/util": "1.4.4",
     "fetch-wrap": "^0.1.2",
     "ip": "^1.1.9",

Modified:package/out/sandbox-isolate/api/fetch/index.d.ts.map

Index: package/out/sandbox-isolate/api/fetch/index.d.ts.map
===================================================================
--- package/out/sandbox-isolate/api/fetch/index.d.ts.map
+++ package/out/sandbox-isolate/api/fetch/index.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sandbox-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ch/middleware/updateUrlVariablesMiddleware.d.ts.map
===================================================================
--- package/out/sandbox-isolate/api/fetch/middleware/updateUrlVariablesMiddleware.d.ts.map
+++ package/out/sandbox-isolate/api/fetch/middleware/updateUrlVariablesMiddleware.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"updateUrlVariablesMiddleware.d.ts","sourceRoot":"","sources":["../../../../../src/sandbox-isolate/api/fetch/middleware/updateUrlVariablesMiddleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,UAAU,EAAE,MAAM,YAAY,CAAC;AAGvD,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC;AAgBD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,kBAAkB,EAAE,iBAAiB,GAAG,MAAM,CAgBhG;AAED,MAAM,CAAC,OAAO,UAAU,4BAA4B,CAAC,OAAO,EAAE,iBAAiB,GAAG,UAAU,CAc3F"}
\ No newline at end of file
+{"version":3,"file":"updateUrlVariablesMiddleware.d.ts","sourceRoot":"","sources":["../../../../../src/sandbox-isolate/api/fetch/middleware/updateUrlVariablesMiddleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,UAAU,EAAE,MAAM,YAAY,CAAC;AAGvD,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC;AAgBD,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,kBAAkB,EAAE,iBAAiB,EACrC,wBAAwB,EAAE,OAAO,GAChC,MAAM,CAgBR;AAED,MAAM,CAAC,OAAO,UAAU,4BAA4B,CAClD,OAAO,EAAE,iBAAiB,EAC1B,wBAAwB,EAAE,OAAO,GAChC,UAAU,CAcZ"}
\ No newline at end of file

Modified:package/CHANGELOG.md

Index: package/CHANGELOG.md
===================================================================
--- package/CHANGELOG.md
+++ package/CHANGELOG.md
@@ -1,89 +1,13 @@
 # @forge/sandbox-runtime
 
-## 4.18.4-next.0-experimental-c7a7d36
+## 4.18.0-experimental-204139e
 
 ### Patch Changes
 
-- Updated dependencies [7e506ec]
-- Updated dependencies [7e506ec]
-  - @forge/[email protected]
+- Updated dependencies [1a47515]
+  - @forge/[email protected]
 
-## 4.18.4-next.0
-
-### Patch Changes
-
-- Updated dependencies [d3e9d37]
-  - @forge/[email protected]
-
-## 4.18.3
-
-### Patch Changes
-
-- Updated dependencies [6c9b381]
-  - @forge/[email protected]
-
-## 4.18.3-next.0
-
-### Patch Changes
-
-- Updated dependencies [6c9b381]
-  - @forge/[email protected]
-
-## 4.18.2
-
-### Patch Changes
-
-- a9d51e2: use contextAri in async event queue paths
-- 69aafa2: remove async event queue feature flag
-- c9077a2: Rename function getEnvironment to getEnvironmentConfig
-- Updated dependencies [69aafa2]
-  - @forge/[email protected]
-
-## 4.18.2-next.2
-
-### Patch Changes
-
-- c9077a2: Rename function getEnvironment to getEnvironmentConfig
-
-## 4.18.2-next.1
-
-### Patch Changes
-
-- 69aafa2: remove async event queue feature flag
-- Updated dependencies [69aafa2]
-  - @forge/[email protected]
-
-## 4.18.2-next.0
-
-### Patch Changes
-
-- a9d51e2: use contextAri in async event queue paths
-
-## 4.18.1
-
-### Patch Changes
-
-- Updated dependencies [1eaeb60]
-- Updated dependencies [59f7240]
-  - @forge/[email protected]
-  - @forge/[email protected]
-
-## 4.18.1-next.1
-
-### Patch Changes
-
-- Updated dependencies [59f7240]
-  - @forge/[email protected]
-
-## 4.18.1-next.0
-
-### Patch Changes
-
-- Updated dependencies [1eaeb60]
-  - @forge/[email protected]
-  - @forge/[email protected]
-
 ## 4.18.0
 
 ### Minor Changes

Modified:package/out/sandbox-isolate/api/fetch/index.d.ts

Index: package/out/sandbox-isolate/api/fetch/index.d.ts
===================================================================
--- package/out/sandbox-isolate/api/fetch/index.d.ts
+++ package/out/sandbox-isolate/api/fetch/index.d.ts
@@ -29,9 +29,9 @@
     private isProductSupportedByProxy;
     private getProxyParams;
     private setupProductAuthHeader;
     private buildProductUrl;
-    private getEnvironmentConfig;
+    private getEnvironment;
     wrappedFetch(ctx?: WrappedFetchContext): wrap.FetchFunction;
 }
 export declare class IsolateSafeFetchProvider<T extends RequestScoped> implements RequestScopedProvider<IsolateSafeFetchAPI> {
     create(request: InvocationRequest, logger: IsolateSafeLogger, metricsCollector: MetricsCollector): IsolateSafeFetchAPI;

Modified:package/out/sandbox-isolate/api/fetch/middleware/updateUrlVariablesMiddleware.d.ts

Index: package/out/sandbox-isolate/api/fetch/middleware/updateUrlVariablesMiddleware.d.ts
===================================================================
--- package/out/sandbox-isolate/api/fetch/middleware/updateUrlVariablesMiddleware.d.ts
+++ package/out/sandbox-isolate/api/fetch/middleware/updateUrlVariablesMiddleware.d.ts
@@ -6,7 +6,7 @@
     appVersion: string;
     workspaceId: string | undefined;
     contextAri: string | undefined;
 }
-export declare function updateProductURL(restPath: string, toReplaceVariables: VariablesToUpdate): string;
-export default function updateUrlVariablesMiddleware(request: VariablesToUpdate): Middleware;
+export declare function updateProductURL(restPath: string, toReplaceVariables: VariablesToUpdate, useContexAriInQueuePaths: boolean): string;
+export default function updateUrlVariablesMiddleware(request: VariablesToUpdate, useContexAriInQueuePaths: boolean): Middleware;
 //# sourceMappingURL=updateUrlVariablesMiddleware.d.ts.map
\ No newline at end of file