@forge/cli-shared 9.8.0-next.4 → 9.8.0-next.6
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 +14 -0
- package/out/apps/get-app-owner.d.ts.map +1 -1
- package/out/graphql/gql/graphql.d.ts +19 -0
- package/out/graphql/gql/graphql.d.ts.map +1 -1
- package/out/tunnel/docker-compose-lifecycle.d.ts +1 -1
- package/out/tunnel/docker-compose-lifecycle.d.ts.map +1 -1
- package/out/tunnel/docker-compose-lifecycle.js +9 -8
- package/package.json +2 -2
|
@@ -4,7 +4,7 @@ import { Logger } from '../ui/logger';
|
|
|
4
4
|
import { Services } from '@forge/manifest';
|
|
5
5
|
import { ChildProcess } from 'child_process';
|
|
6
6
|
export declare const PROXY_SIDECAR_VOLUME_DIR = "/forge/container";
|
|
7
|
-
export declare const CONTAINER_SERVICE_ASSETS
|
|
7
|
+
export declare const CONTAINER_SERVICE_ASSETS: string;
|
|
8
8
|
export declare const K8S_AUTH_TOKEN_FILENAME = "local-account";
|
|
9
9
|
export declare const STARTUP_TIMER_MS: number;
|
|
10
10
|
export declare const STARTUP_TIMER_BUFFER_MS: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docker-compose-lifecycle.d.ts","sourceRoot":"","sources":["../../src/tunnel/docker-compose-lifecycle.ts"],"names":[],"mappings":"AAUA,OAAO,
|
|
1
|
+
{"version":3,"file":"docker-compose-lifecycle.d.ts","sourceRoot":"","sources":["../../src/tunnel/docker-compose-lifecycle.ts"],"names":[],"mappings":"AAUA,OAAO,EAAmB,SAAS,EAAE,MAAM,WAAW,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAO3C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CA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AAgCF,eAAO,MAAM,2BAA2B,GAAU,cAAc,YAAY,kBAW3E,CAAC"}
|
|
@@ -10,9 +10,11 @@ const docker_compose_1 = require("docker-compose");
|
|
|
10
10
|
const shared_1 = require("../shared");
|
|
11
11
|
const text_1 = require("../ui/text");
|
|
12
12
|
const tunnel_options_1 = require("./tunnel-options");
|
|
13
|
-
const
|
|
13
|
+
const SERVICES_DIR_NAME = 'services';
|
|
14
|
+
const HIDDEN_DIR = path.join(shared_1.FORGE_DIRECTORY, SERVICES_DIR_NAME);
|
|
14
15
|
exports.PROXY_SIDECAR_VOLUME_DIR = '/forge/container';
|
|
15
|
-
|
|
16
|
+
const CONTAINER_SERVICE_ASSETS_DIR_NAME = 'container-service-assets';
|
|
17
|
+
exports.CONTAINER_SERVICE_ASSETS = path.join(shared_1.FORGE_DIRECTORY, CONTAINER_SERVICE_ASSETS_DIR_NAME);
|
|
16
18
|
exports.K8S_AUTH_TOKEN_FILENAME = 'local-account';
|
|
17
19
|
const PROXY_SIDECAR_SERVICE_NAME = 'proxy-sidecar';
|
|
18
20
|
const PROXY_SIDECAR_IMAGE_PATH = 'forge-platform/proxy-sidecar:latest';
|
|
@@ -128,15 +130,14 @@ const generateContainersDockerComposeFile = async (services, appId, envId) => {
|
|
|
128
130
|
return filesGenerated;
|
|
129
131
|
};
|
|
130
132
|
exports.generateContainersDockerComposeFile = generateContainersDockerComposeFile;
|
|
133
|
+
const relativeComposePath = (from, to) => path.relative(from, to).split(path.sep).join('/');
|
|
131
134
|
const adjustFilePath = (filePath) => {
|
|
132
135
|
if (path.isAbsolute(filePath)) {
|
|
133
136
|
return filePath;
|
|
134
137
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}
|
|
139
|
-
return path.join('..', adjusted);
|
|
138
|
+
const composeFileDir = path.join(process.cwd(), HIDDEN_DIR);
|
|
139
|
+
const absoluteTarget = path.resolve(process.cwd(), filePath);
|
|
140
|
+
return relativeComposePath(composeFileDir, absoluteTarget);
|
|
140
141
|
};
|
|
141
142
|
const getProxySidecarConfig = async (serviceKey, containerKeys, port, appId, envId, serviceIndex, healthEndpointPath) => {
|
|
142
143
|
let fopBaseUrl = 'https://forge-outbound-proxy.services.atlassian.com';
|
|
@@ -164,7 +165,7 @@ const getProxySidecarConfig = async (serviceKey, containerKeys, port, appId, env
|
|
|
164
165
|
`K8S_AUTH_TOKEN_PATH=${exports.PROXY_SIDECAR_VOLUME_DIR}/${exports.K8S_AUTH_TOKEN_FILENAME}`,
|
|
165
166
|
`${containerKeys[0]}_CONTAINER_HEALTHCHECK=http://${containerKeys[0]}:8080${healthEndpointPath}`
|
|
166
167
|
],
|
|
167
|
-
volumes: [
|
|
168
|
+
volumes: [`${adjustFilePath(exports.CONTAINER_SERVICE_ASSETS)}:${exports.PROXY_SIDECAR_VOLUME_DIR}:ro`],
|
|
168
169
|
ports: [
|
|
169
170
|
`${port}:${tunnel_options_1.DEFAULT_PROXY_INGRESS_PORT}`,
|
|
170
171
|
`${tunnel_options_1.DEFAULT_PROXY_HEALTHCHECK_PORT_HOST_MACHINE + serviceIndex}:${tunnel_options_1.DEFAULT_PROXY_HEALTHCHECK_PORT}`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/cli-shared",
|
|
3
|
-
"version": "9.8.0-next.
|
|
3
|
+
"version": "9.8.0-next.6",
|
|
4
4
|
"description": "Common functionality for Forge CLI",
|
|
5
5
|
"author": "Atlassian",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"prebuild": "yarn generate-graphql-types"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@forge/manifest": "13.7.0-next.
|
|
16
|
+
"@forge/manifest": "13.7.0-next.3",
|
|
17
17
|
"@forge/util": "3.0.0",
|
|
18
18
|
"@forge/i18n": "1.0.0",
|
|
19
19
|
"@sentry/node": "7.106.0",
|