@forge/tunnel 5.10.1-next.11 → 5.10.1-next.13
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,22 @@
|
|
|
1
1
|
# @forge/tunnel
|
|
2
2
|
|
|
3
|
+
## 5.10.1-next.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [7243788]
|
|
8
|
+
- @forge/cli-shared@6.8.0-next.12
|
|
9
|
+
- @forge/bundler@4.21.1-next.13
|
|
10
|
+
|
|
11
|
+
## 5.10.1-next.12
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 336f74f: Support serving i18n resources while using `forge tunnel`
|
|
16
|
+
- Updated dependencies [336f74f]
|
|
17
|
+
- @forge/bundler@4.21.1-next.12
|
|
18
|
+
- @forge/cli-shared@6.8.0-next.11
|
|
19
|
+
|
|
3
20
|
## 5.10.1-next.11
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -4,7 +4,7 @@ import http from 'http';
|
|
|
4
4
|
import { URL } from 'url';
|
|
5
5
|
import express from 'express';
|
|
6
6
|
import { BundlerWatch, BundlerOutput } from '@forge/bundler';
|
|
7
|
-
import { ConfigFile, FileSystemReader, Logger, StatsigService, TunnelOptions } from '@forge/cli-shared';
|
|
7
|
+
import { ConfigFile, FileSystemReader, I18nResourceBundlingService, Logger, StatsigService, TunnelOptions } from '@forge/cli-shared';
|
|
8
8
|
import { ExternalRequestBody } from '@forge/runtime';
|
|
9
9
|
import { Permissions, Remotes } from '@forge/manifest';
|
|
10
10
|
export interface DevelopmentServer {
|
|
@@ -28,11 +28,12 @@ export declare class LocalDevelopmentServer implements DevelopmentServer {
|
|
|
28
28
|
private readonly configFile;
|
|
29
29
|
private readonly fileSystemReader;
|
|
30
30
|
private readonly statsigService;
|
|
31
|
+
private readonly i18nResourceBundlingService;
|
|
31
32
|
private app;
|
|
32
33
|
private httpServer;
|
|
33
34
|
private permissions;
|
|
34
35
|
private remotes;
|
|
35
|
-
constructor(invocationService: InvocationService, logger: Logger, configFile: ConfigFile, fileSystemReader: FileSystemReader, statsigService: StatsigService);
|
|
36
|
+
constructor(invocationService: InvocationService, logger: Logger, configFile: ConfigFile, fileSystemReader: FileSystemReader, statsigService: StatsigService, i18nResourceBundlingService: I18nResourceBundlingService);
|
|
36
37
|
start(port?: number, permissions?: Permissions, remotes?: Remotes): Promise<StartDevServerResult>;
|
|
37
38
|
stop(): Promise<void>;
|
|
38
39
|
compileAndWatch(watch: BundlerWatch, tunnelOptions?: TunnelOptions): Promise<BundlerOutput>;
|
|
@@ -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;AAExB,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,OAAO,EAKL,YAAY,EACZ,aAAa,EAEd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,UAAU,EAEV,gBAAgB,EAChB,MAAM,EAEN,cAAc,EAEd,aAAa,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAe,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAIvD,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAClG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACtB,eAAe,CAAC,KAAK,EAAE,YAAY,EAAE,aAAa,CAAC,EAAE,aAAa,G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AQ9D,KAAK,CAAC,IAAI,SAAI,EAAE,WAAW,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAe5F,IAAI;IAIJ,eAAe,CAC1B,KAAK,EAAE,YAAY,EACnB,aAAa,GAAE,aAA2C,GACzD,OAAO,CAAC,aAAa,CAAC;IAkClB,MAAM,IAAI,OAAO,CAAC,WAAW;IAI7B,gBAAgB,EAAE,OAAO,CAAC,OAAO,CA2CtC;CACH"}
|
|
@@ -22,16 +22,18 @@ class LocalDevelopmentServer {
|
|
|
22
22
|
configFile;
|
|
23
23
|
fileSystemReader;
|
|
24
24
|
statsigService;
|
|
25
|
+
i18nResourceBundlingService;
|
|
25
26
|
app;
|
|
26
27
|
httpServer;
|
|
27
28
|
permissions;
|
|
28
29
|
remotes;
|
|
29
|
-
constructor(invocationService, logger, configFile, fileSystemReader, statsigService) {
|
|
30
|
+
constructor(invocationService, logger, configFile, fileSystemReader, statsigService, i18nResourceBundlingService) {
|
|
30
31
|
this.invocationService = invocationService;
|
|
31
32
|
this.logger = logger;
|
|
32
33
|
this.configFile = configFile;
|
|
33
34
|
this.fileSystemReader = fileSystemReader;
|
|
34
35
|
this.statsigService = statsigService;
|
|
36
|
+
this.i18nResourceBundlingService = i18nResourceBundlingService;
|
|
35
37
|
this.app = (0, express_1.default)();
|
|
36
38
|
this.app.use(express_1.default.json({ limit: '6mb' }));
|
|
37
39
|
this.app.post(`/:fnKey`, this.handleInvocation);
|
|
@@ -62,11 +64,14 @@ class LocalDevelopmentServer {
|
|
|
62
64
|
const bundler = isNodeJsRuntime
|
|
63
65
|
? (0, bundler_1.getNodeBundler)(this.logger, (0, bundler_1.getWrapperProvider)({ fileSystemReader: this.fileSystemReader, statsigService: this.statsigService }), this.configFile, this.statsigService)
|
|
64
66
|
: new bundler_1.SandboxBundler(this.logger);
|
|
67
|
+
const { translations, modules } = await this.configFile.readConfig();
|
|
68
|
+
const i18nResourceBundle = await this.i18nResourceBundlingService.bundle(modules, translations);
|
|
65
69
|
const { result } = await bundler.watch({
|
|
66
70
|
appDirectory: process.cwd(),
|
|
67
71
|
entryPoints,
|
|
68
72
|
watchMode,
|
|
69
|
-
successMessage: cli_shared_1.Text.tunnel.functionsBundlingSucceeded
|
|
73
|
+
successMessage: cli_shared_1.Text.tunnel.functionsBundlingSucceeded,
|
|
74
|
+
i18nResourceBundle
|
|
70
75
|
}, watch);
|
|
71
76
|
return result;
|
|
72
77
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/tunnel",
|
|
3
|
-
"version": "5.10.1-next.
|
|
3
|
+
"version": "5.10.1-next.13",
|
|
4
4
|
"description": "Tunnel functionality for Forge CLI",
|
|
5
5
|
"author": "Atlassian",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"compile": "tsc -b -v"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@forge/bundler": "4.21.1-next.
|
|
15
|
-
"@forge/cli-shared": "6.8.0-next.
|
|
14
|
+
"@forge/bundler": "4.21.1-next.13",
|
|
15
|
+
"@forge/cli-shared": "6.8.0-next.12",
|
|
16
16
|
"@forge/csp": "3.7.0-next.0",
|
|
17
17
|
"@forge/runtime": "5.10.7",
|
|
18
18
|
"cloudflared": "^0.7.0",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@atlassian/xen-test-util": "^4.2.0",
|
|
33
|
-
"@forge/manifest": "8.9.0-next.
|
|
33
|
+
"@forge/manifest": "8.9.0-next.7",
|
|
34
34
|
"@types/express": "^4.17.21",
|
|
35
35
|
"@types/jest": "^29.5.12",
|
|
36
36
|
"@types/node": "14.18.63",
|