@hubspot/local-dev-lib 3.20.2 → 3.21.0-beta.0

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/lib/gitignore.js CHANGED
@@ -18,7 +18,7 @@ function checkAndAddConfigToGitignore(configPath) {
18
18
  return;
19
19
  let gitignoreFilePath = gitignoreFiles && gitignoreFiles.length ? gitignoreFiles[0] : null;
20
20
  if (!gitignoreFilePath) {
21
- gitignoreFilePath = path_1.default.resolve(configPath, GITIGNORE_FILE);
21
+ gitignoreFilePath = path_1.default.join(path_1.default.dirname(configPath), GITIGNORE_FILE);
22
22
  (0, fs_extra_1.writeFileSync)(gitignoreFilePath, '');
23
23
  }
24
24
  const gitignoreContents = (0, fs_extra_1.readFileSync)(gitignoreFilePath).toString();
@@ -7,5 +7,6 @@ export declare function stopPortManagerServer(): Promise<void>;
7
7
  export declare function requestPorts(portData: Array<RequestPortsData>): Promise<{
8
8
  [instanceId: string]: number;
9
9
  }>;
10
+ export declare function getServerPortByInstanceId(serverInstanceId: string): Promise<number>;
10
11
  export declare function deleteServerInstance(serverInstanceId: string): Promise<void>;
11
12
  export declare function portManagerHasActiveServers(): Promise<boolean>;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.portManagerHasActiveServers = exports.deleteServerInstance = exports.requestPorts = exports.stopPortManagerServer = exports.startPortManagerServer = exports.isPortManagerServerRunning = exports.isPortManagerPortAvailable = exports.BASE_URL = void 0;
6
+ exports.portManagerHasActiveServers = exports.deleteServerInstance = exports.getServerPortByInstanceId = exports.requestPorts = exports.stopPortManagerServer = exports.startPortManagerServer = exports.isPortManagerServerRunning = exports.isPortManagerPortAvailable = exports.BASE_URL = void 0;
7
7
  const axios_1 = __importDefault(require("axios"));
8
8
  const PortManagerServer_1 = require("../utils/PortManagerServer");
9
9
  const ports_1 = require("../constants/ports");
@@ -46,6 +46,11 @@ async function requestPorts(portData) {
46
46
  return data.ports;
47
47
  }
48
48
  exports.requestPorts = requestPorts;
49
+ async function getServerPortByInstanceId(serverInstanceId) {
50
+ const { data } = await axios_1.default.get(`${exports.BASE_URL}/servers/${serverInstanceId}`);
51
+ return data.port;
52
+ }
53
+ exports.getServerPortByInstanceId = getServerPortByInstanceId;
49
54
  async function deleteServerInstance(serverInstanceId) {
50
55
  await axios_1.default.delete(`${exports.BASE_URL}/servers/${serverInstanceId}`);
51
56
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/local-dev-lib",
3
- "version": "3.20.2",
3
+ "version": "3.21.0-beta.0",
4
4
  "description": "Provides library functionality for HubSpot local development tooling, including the HubSpot CLI",
5
5
  "repository": {
6
6
  "type": "git",