npm package diff
Package: @forge/tunnel
Versions: 5.5.7-next.14 - 5.6.0-next.15
Modified:package/out/servers/dev-server.js
Index: package/out/servers/dev-server.js
===================================================================
--- package/out/servers/dev-server.js
+++ package/out/servers/dev-server.js
@@ -22,17 +22,19 @@
invocationService;
logger;
configFile;
fileSystemReader;
+ statsigService;
app;
httpServer;
permissions;
remotes;
- constructor(invocationService, logger, configFile, fileSystemReader) {
+ constructor(invocationService, logger, configFile, fileSystemReader, statsigService) {
this.invocationService = invocationService;
this.logger = logger;
this.configFile = configFile;
this.fileSystemReader = fileSystemReader;
+ this.statsigService = statsigService;
this.app = (0, express_1.default)();
this.app.use(express_1.default.json({ limit: '6mb' }));
this.app.post(`/:fnKey`, this.handleInvocation);
}
@@ -59,9 +61,9 @@
if (!entryPoints.length) {
return { outputDir };
}
const getConfig = isNodeJsRuntime
- ? (0, bundler_2.getNodeRuntimeBuildConfig)((0, bundler_1.getWrapperProvider)({ fileSystemReader: this.fileSystemReader }))
+ ? (0, bundler_2.getNodeRuntimeBuildConfig)((0, bundler_1.getWrapperProvider)({ fileSystemReader: this.fileSystemReader, statsigService: this.statsigService }))
: bundler_2.getSandboxedRuntimeBuildConfig;
const config = getConfig(entryPoints, {
isWatchMode: true,
isDebugMode: tunnelOptions.debug,
Modified:package/out/services/local-invocation-service.js
Index: package/out/services/local-invocation-service.js
===================================================================
--- package/out/services/local-invocation-service.js
+++ package/out/services/local-invocation-service.js
@@ -1,12 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LocalInvocationService = void 0;
+const tslib_1 = require("tslib");
const util_1 = require("../util");
const index_1 = require("../index");
const uuid_1 = require("uuid");
const runtime_1 = require("@forge/runtime");
const cli_shared_1 = require("@forge/cli-shared");
+const zlib = tslib_1.__importStar(require("node:zlib"));
const DEFAULT_INVOCATION_TIMEOUT = 25;
class LocalInvocationService {
configFile;
logger;
@@ -56,15 +58,18 @@
inspector: inspect ? this.inspector : undefined
});
clearTimeout(tunnelWarningTimeout);
const reportMetrics = xenInvocationRequest.isFeatureFlagEnabled(runtime_1.XEN_RUNTIME_SHOULD_REPORT_METRICS);
- LocalInvocationService.printMetrics(reportMetrics, metrics, this.logger);
+ LocalInvocationService.printMetrics(reportMetrics, metrics, metricsCompressed, this.logger);
return reportMetrics ? { body, metrics, success, error, metricsCompressed } : body;
}
static INTERNAL_METRICS = ['execute.setup-request-context', 'invoke.setup-isolate'];
- static printMetrics = (shouldReportMetrics, metrics, logger) => {
+ static printMetrics = (shouldReportMetrics, metrics, metricsCompressed, logger) => {
if (shouldReportMetrics && metrics?.length) {
- logger.debug(`Metrics: ${JSON.stringify(metrics.filter((m) => !LocalInvocationService.INTERNAL_METRICS.includes(m.name)), null, 2)}`);
+ if (metricsCompressed) {
+ metrics = JSON.parse(zlib.unzipSync(Buffer.from(metricsCompressed, 'base64')).toString());
+ }
+ logger.debug(`Metrics: ${JSON.stringify(metrics?.filter((m) => !LocalInvocationService.INTERNAL_METRICS.includes(m.name)), null, 2)}`);
}
};
}
exports.LocalInvocationService = LocalInvocationService;
Modified:package/out/sandbox/node-sandbox.js
Index: package/out/sandbox/node-sandbox.js
===================================================================
--- package/out/sandbox/node-sandbox.js
+++ package/out/sandbox/node-sandbox.js
@@ -18,9 +18,11 @@
this.callbacks = new Map();
this.process = (0, child_process_1.fork)(RUNNER, [fileName, handler], {
stdio: ['ignore', 'pipe', 2, 'ipc'],
env: {
- _HANDLER: this.name
+ _HANDLER: this.name,
+ FORGE_EFS_RUNTIME_PATH: appPath,
+ FORGE_CUSTOM_WRAPPER_FILE_NAME: '__forge_wrapper__.cjs'
},
execArgv: debugPort ? [`--inspect=0.0.0.0:${debugPort}`] : undefined
});
readline_1.default.createInterface(this.process.stdout).on('line', (line) => {
Modified:package/package.json
Index: package/package.json
===================================================================
--- package/package.json
+++ package/package.json
@@ -1,7 +1,7 @@
{
"name": "@forge/tunnel",
- "version": "5.5.7-next.14",
+ "version": "5.6.0-next.15",
"description": "Tunnel functionality for Forge CLI",
"author": "Atlassian",
"license": "UNLICENSED",
"main": "out/index.js",
@@ -10,10 +10,10 @@
"clean": "rm -rf ./out && rm -f tsconfig.tsbuildinfo",
"compile": "tsc -b -v"
},
"dependencies": {
- "@forge/bundler": "4.19.7-next.14",
- "@forge/cli-shared": "6.3.0-next.13",
+ "@forge/bundler": "4.20.0-next.15",
+ "@forge/cli-shared": "6.3.0-next.14",
"@forge/csp": "3.3.0",
"@forge/runtime": "5.10.3-next.0",
"chokidar": "^3.6.0",
"cloudflared": "^0.5.2",
@@ -28,9 +28,9 @@
"webpack-dev-server": "^4.15.1"
},
"devDependencies": {
"@atlassian/xen-test-util": "^4.2.0",
- "@forge/manifest": "8.0.0-next.10",
+ "@forge/manifest": "8.0.0-next.11",
"@types/express": "^4.17.21",
"@types/jest": "^29.5.12",
"@types/node": "14.18.63",
"@types/supertest": "^2.0.16",
Modified:package/out/servers/dev-server.d.ts.map
Index: package/out/servers/dev-server.d.ts.map
===================================================================
--- package/out/servers/dev-server.d.ts.map
+++ package/out/servers/dev-server.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"dev-server.d.ts","sourceRoot":"","sources":["../../src/servers/dev-server.ts"],"names":[],"mappings":";;AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,OAAO,OAAO,MAAM,SAAS,CAAC;AAG9B,OAAO,EACL,UAAU,EAEV,gBAAgB,EAEhB,MAAM,EAKN,aAAa,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAe,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EACL,aAAa,EAKd,MAAM,gBAAgB,CAAC;AAIxB,MAAM,WAAW,UAAU,CAAC,CAAC,GAAG,GAAG;IACjC,gBAAgB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAA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O,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAe5F,IAAI;IAIJ,eAAe,CAC1B,EAAE,gBAAgB,EAAE,eAAe,EAAE,EAAE,UAAU,CAAC,aAAa,CAAC,EAChE,aAAa,GAAE,aAA2C,GACzD,OAAO,CAAC,aAAa,CAAC;IAyDlB,MAAM,IAAI,OAAO,CAAC,WAAW;IAI7B,gBAAgB,EAAE,OAAO,CAAC,OAAO,CA2CtC;CACH"}
\ No newline at end of file
Modified:package/out/services/local-invocation-service.d.ts.map
Index: package/out/services/local-invocation-service.d.ts.map
===================================================================
--- package/out/services/local-invocation-service.d.ts.map
+++ package/out/services/local-invocation-service.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"local-invocation-service.d.ts","sourceRoot":"","sources":["../../src/services/local-invocation-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAI/C,OAAO,EACL,mBAAmB,EACnB,SAAS,EAKV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,EAAyB,MAAM,mBAAmB,CAAC;AAI9E,qBAAa,sBAAuB,YAAW,iBAAiB;IAE5D,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAFT,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS;IAG1B,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,GAAG,CAAC;IA4DhF,MAAM,CAAC,gBAAgB,WAA6D;IAEpF,MAAM,CAAC,YAAY,wBACI,OAAO;;6BAEpB,MAAM,KACb,IAAI,CAUL;CACH"}
\ No newline at end of file
+{"version":3,"file":"local-invocation-service.d.ts","sourceRoot":"","sources":["../../src/services/local-invocation-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAI/C,OAAO,EACL,mBAAmB,EACnB,SAAS,EAKV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,EAAyB,MAAM,mBAAmB,CAAC;AAK9E,qBAAa,sBAAuB,YAAW,iBAAiB;IAE5D,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAFT,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS;IAG1B,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,GAAG,CAAC;IA4DhF,MAAM,CAAC,gBAAgB,WAA6D;IAEpF,MAAM,CAAC,YAAY,wBACI,OAAO;;wCAET,MAAM,GAAG,SAAS,UAC7B,MAAM,KACb,IAAI,CAcL;CACH"}
\ No newline at end of file
Modified:package/out/sandbox/node-sandbox.d.ts.map
Index: package/out/sandbox/node-sandbox.d.ts.map
===================================================================
--- package/out/sandbox/node-sandbox.d.ts.map
+++ package/out/sandbox/node-sandbox.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"node-sandbox.d.ts","sourceRoot":"","sources":["../../src/sandbox/node-sandbox.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,gBAAgB,EAChB,OAAO,EACP,aAAa,EACb,SAAS,EAIV,MAAM,gBAAgB,CAAC;AAIxB,qBAAa,WAAY,YAAW,OAAO;IACzC,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAe;IACvC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAkD;gBAEhE,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,aAAa;IA2BnE,OAAO,CAAC,YAAY;IAOd,OAAO,CACX,oBAAoB,EAAE,oBAAoB,EAC1C,gBAAgB,EAAE,aAAa,EAC/B,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,GAChC,OAAO,CAAC,gBAAgB,CAAC;IAmB5B,IAAI,IAAI,IAAI;CAGb"}
\ No newline at end of file
+{"version":3,"file":"node-sandbox.d.ts","sourceRoot":"","sources":["../../src/sandbox/node-sandbox.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,gBAAgB,EAChB,OAAO,EACP,aAAa,EACb,SAAS,EAIV,MAAM,gBAAgB,CAAC;AAIxB,qBAAa,WAAY,YAAW,OAAO;IACzC,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAe;IACvC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAkD;gBAEhE,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,aAAa;IA6BnE,OAAO,CAAC,YAAY;IAOd,OAAO,CACX,oBAAoB,EAAE,oBAAoB,EAC1C,gBAAgB,EAAE,aAAa,EAC/B,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,GAChC,OAAO,CAAC,gBAAgB,CAAC;IAmB5B,IAAI,IAAI,IAAI;CAGb"}
\ No newline at end of file
Modified:package/CHANGELOG.md
too-big
Modified:package/out/servers/dev-server.d.ts
Index: package/out/servers/dev-server.d.ts
===================================================================
--- package/out/servers/dev-server.d.ts
+++ package/out/servers/dev-server.d.ts
@@ -2,9 +2,9 @@
/// <reference types="node" resolution-mode="require"/>
import http from 'http';
import { URL } from 'url';
import express from 'express';
-import { ConfigFile, FileSystemReader, Logger, TunnelOptions } from '@forge/cli-shared';
+import { ConfigFile, FileSystemReader, Logger, StatsigService, TunnelOptions } from '@forge/cli-shared';
import { ExternalRequestBody } from '@forge/runtime';
import { Permissions, Remotes } from '@forge/manifest';
import { BundlerOutput } from '@forge/bundler';
export interface WatchHooks<T = any> {
@@ -30,13 +30,14 @@
private readonly invocationService;
private readonly logger;
private readonly configFile;
private readonly fileSystemReader;
+ private readonly statsigService;
private app;
private httpServer;
private permissions;
private remotes;
- constructor(invocationService: InvocationService, logger: Logger, configFile: ConfigFile, fileSystemReader: FileSystemReader);
+ constructor(invocationService: InvocationService, logger: Logger, configFile: ConfigFile, fileSystemReader: FileSystemReader, statsigService: StatsigService);
start(port?: number, permissions?: Permissions, remotes?: Remotes): Promise<StartDevServerResult>;
stop(): Promise<void>;
compileAndWatch({ onBuildWillStart, onBuildFinished }: WatchHooks<BundlerOutput>, tunnelOptions?: TunnelOptions): Promise<BundlerOutput>;
getApp(): express.Application;
Modified:package/out/services/local-invocation-service.d.ts
Index: package/out/services/local-invocation-service.d.ts
===================================================================
--- package/out/services/local-invocation-service.d.ts
+++ package/out/services/local-invocation-service.d.ts
@@ -9,7 +9,7 @@
invoke(handler: string, request: ExternalRequestBody): Promise<any>;
static INTERNAL_METRICS: string[];
static printMetrics: (shouldReportMetrics: boolean, metrics: {
[key: string]: any;
- }[] | undefined, logger: Logger) => void;
+ }[] | undefined, metricsCompressed: string | undefined, logger: Logger) => void;
}
//# sourceMappingURL=local-invocation-service.d.ts.map
\ No newline at end of file