npm package diff

Package: @forge/cli-shared

Versions: 8.8.2-next.4-experimental-4cf7fd3 - 8.8.2-next.5

Modified: package/out/tunnel/docker-compose-lifecycle.js

Index: package/out/tunnel/docker-compose-lifecycle.js
===================================================================
--- package/out/tunnel/docker-compose-lifecycle.js
+++ package/out/tunnel/docker-compose-lifecycle.js
@@ -1,7 +1,7 @@
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
-exports.stopDockerComposeStack = exports.startDockerComposeStack = exports.deleteDockerComposeFile = exports.generateContainersDockerComposeFile = exports.DockerUnableToStartError = exports.DockerUnableToPullProxySidecarImage = exports.InvalidContainerServicePort = void 0;
+exports.stopDockerComposeStack = exports.startDockerComposeStack = exports.deleteDockerComposeFile = exports.generateContainersDockerComposeFile = exports.DockerUnableToStartError = exports.DockerUnableToPullProxySidecarImage = exports.InvalidContainerServicePort = exports.K8S_AUTH_TOKEN_FILENAME = exports.CONTAINER_SERVICE_ASSETS = exports.PROXY_SIDECAR_VOLUME_DIR = void 0;
 const tslib_1 = require("tslib");
 const fs = tslib_1.__importStar(require("fs"));
 const path = tslib_1.__importStar(require("path"));
 const yaml = tslib_1.__importStar(require("yaml"));
@@ -9,8 +9,11 @@
 const shared_1 = require("../shared");
 const text_1 = require("../ui/text");
 const tunnel_options_1 = require("./tunnel-options");
 const HIDDEN_DIR = '.services';
+exports.PROXY_SIDECAR_VOLUME_DIR = '/forge/container';
+exports.CONTAINER_SERVICE_ASSETS = '.container-service-assets';
+exports.K8S_AUTH_TOKEN_FILENAME = 'local-account';
 class InvalidContainerServicePort extends shared_1.UserError {
     constructor(serviceKey) {
         super(text_1.Text.error.invalidServicePort(serviceKey));
     }
@@ -86,10 +89,12 @@
                 `FOP_BASE_URL=${fopBaseUrl}`,
                 `APP_ID=ari:cloud:ecosystem::app/${appIdShort}`,
                 `ENV_ID=ari:cloud:ecosystem::environment/${appIdShort}/${envId}`,
                 `JWKS_URL=${jwksUrl}`,
-                `IS_LOCAL_DEV=true`
+                `IS_LOCAL_DEV=true`,
+                `K8S_AUTH_TOKEN_PATH=${exports.PROXY_SIDECAR_VOLUME_DIR}/${exports.K8S_AUTH_TOKEN_FILENAME}`
             ],
+            volumes: [`../${exports.CONTAINER_SERVICE_ASSETS}:${exports.PROXY_SIDECAR_VOLUME_DIR}:ro`],
             ports: [`${port}:${tunnel_options_1.DEFAULT_PROXY_INGRESS_PORT}`],
             depends_on: containerKeys
         }
     };
@@ -155,6 +160,20 @@
         catch (err) {
             throw new Error(text_1.Text.tunnel.unableToStopDockerComposeStack(serviceKey, err.message ?? 'Unknown Error Occurred.'));
         }
     }));
+    deleteContainerServiceAssetsDir();
 };
 exports.stopDockerComposeStack = stopDockerComposeStack;
+const deleteContainerServiceAssetsDir = () => {
+    const dirPath = path.join(process.cwd(), exports.CONTAINER_SERVICE_ASSETS);
+    if (fs.existsSync(dirPath)) {
+        const tokenFilePath = path.join(dirPath, exports.K8S_AUTH_TOKEN_FILENAME);
+        if (fs.existsSync(tokenFilePath)) {
+            fs.unlinkSync(tokenFilePath);
+        }
+        const files = fs.readdirSync(dirPath);
+        if (files.length === 0) {
+            fs.rmdirSync(dirPath);
+        }
+    }
+};

Modified: package/out/graphql/graphql-types.js

Large diffs are not rendered by default.

Modified: package/package.json

Index: package/package.json
===================================================================
--- package/package.json
+++ package/package.json
@@ -1,7 +1,7 @@
 {
   "name": "@forge/cli-shared",
-  "version": "8.8.2-next.4-experimental-4cf7fd3",
+  "version": "8.8.2-next.5",
   "description": "Common functionality for Forge CLI",
   "author": "Atlassian",
   "license": "SEE LICENSE IN LICENSE.txt",
   "main": "out/index.js",
@@ -11,9 +11,9 @@
     "compile": "tsc -b -v",
     "generate-graphql-types": "graphql-codegen --config src/graphql/codegen.yml"
   },
   "dependencies": {
-    "@forge/manifest": "11.0.0-next.3-experimental-4cf7fd3",
+    "@forge/manifest": "11.0.0-next.3",
     "@forge/util": "2.0.1",
     "@forge/i18n": "0.0.7",
     "@sentry/node": "7.106.0",
     "adm-zip": "^0.5.10",

Modified: package/out/tunnel/docker-compose-lifecycle.d.ts.map

Index: package/out/tunnel/docker-compose-lifecycle.d.ts.map
===================================================================
--- package/out/tunnel/docker-compose-lifecycle.d.ts.map
+++ package/out/tunnel/docker-compose-lifecycle.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"docker-compose-lifecycle.d.ts","sourceRoot":"","sources":["../../src/tunnel/docker-compose-lifecycle.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAK3C,qBAAa,2BAA4B,SAAQ,SAAS;gBAC5C,UAAU,EAAE,MAAM;CAG/B;AAED,qBAAa,mCAAoC,SAAQ,SAAS;gBACpD,GAAG,CAAC,EAAE,KAAK;CAGxB;AAED,qBAAa,wBAAyB,SAAQ,SAAS;gBACzC,GAAG,CAAC,EAAE,KAAK;CAGxB;AAMD,eAAO,MAAM,mCAAmC,8BAAqC,MAAM,SAAS,MAAM,oCA6CzG,CAAC;AA0DF,eAAO,MAAM,uBAAuB,gBAAuB,MAAM,kBAYhE,CAAC;AAOF,eAAO,MAAM,uBAAuB,0BAAiC,MAAM,cAAc,MAAM,kBAuB9F,CAAC;AAMF,eAAO,MAAM,sBAAsB,eAAsB,UAAU,iBAAiB,OAAO,MAAM,EAAE,MAAM,CAAC,kBAyBzG,CAAC"}
\ No newline at end of file
+{"version":3,"file":"docker-compose-lifecycle.d.ts","sourceRoot":"","sources":["../../src/tunnel/docker-compose-lifecycle.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAI3C,eAAO,MAAM,wBAAwB,qBAAqB,CAAC;AAC3D,eAAO,MAAM,wBAAwB,8BAA8B,CAAC;AACpE,eAAO,MAAM,uBAAuB,kBAAkB,CAAC;AAEvD,qBAAa,2BAA4B,SAAQ,SAAS;gBAC5C,UAAU,EAAE,MAAM;CAG/B;AAED,qBAAa,mCAAoC,SAAQ,SAAS;gBACpD,GAAG,CAAC,EAAE,KAAK;CAGxB;AAED,qBAAa,wBAAyB,SAAQ,SAAS;gBACzC,GAAG,CAAC,EAAE,KAAK;CAGxB;AAMD,eAAO,MAAM,mCAAmC,8BAAqC,MAAM,SAAS,MAAM,oCA6CzG,CAAC;AA4DF,eAAO,MAAM,uBAAuB,gBAAuB,MAAM,kBAYhE,CAAC;AAOF,eAAO,MAAM,uBAAuB,0BAAiC,MAAM,cAAc,MAAM,kBAuB9F,CAAC;AAMF,eAAO,MAAM,sBAAsB,eAAsB,UAAU,iBAAiB,OAAO,MAAM,EAAE,MAAM,CAAC,kBA4BzG,CAAC"}
\ No newline at end of file

Modified: package/out/graphql/graphql-types.d.ts.map

Large diffs are not rendered by default.

Modified: package/CHANGELOG.md

Large diffs are not rendered by default.

Modified: package/out/tunnel/docker-compose-lifecycle.d.ts

Index: package/out/tunnel/docker-compose-lifecycle.d.ts
===================================================================
--- package/out/tunnel/docker-compose-lifecycle.d.ts
+++ package/out/tunnel/docker-compose-lifecycle.d.ts
@@ -1,7 +1,10 @@
 import { UserError } from '../shared';
 import { ConfigFile } from '../config/config-file';
 import { Services } from '@forge/manifest';
+export declare const PROXY_SIDECAR_VOLUME_DIR = "/forge/container";
+export declare const CONTAINER_SERVICE_ASSETS = ".container-service-assets";
+export declare const K8S_AUTH_TOKEN_FILENAME = "local-account";
 export declare class InvalidContainerServicePort extends UserError {
     constructor(serviceKey: string);
 }
 export declare class DockerUnableToPullProxySidecarImage extends UserError {

Modified: package/out/graphql/graphql-types.d.ts

Large diffs are not rendered by default.