@hubspot/local-dev-lib 3.5.0-beta.0 → 3.5.1-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/api/projects.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /// <reference types="node" />
2
2
  /// <reference types="node" />
3
3
  import { HubSpotPromise, QueryParams } from '../types/Http';
4
- import { Project, FetchProjectResponse, UploadProjectResponse, ProjectSettings, FetchPlatformVersionResponse, WarnLogsResponse, UploadIRResponse, ListAppsResponse, BeginMigrationResponse, FinishMigrationResponse } from '../types/Project';
4
+ import { Project, FetchProjectResponse, UploadProjectResponse, ProjectSettings, FetchPlatformVersionResponse, WarnLogsResponse, UploadIRResponse } from '../types/Project';
5
5
  import { Build, FetchProjectBuildsResponse } from '../types/Build';
6
6
  import { ComponentStructureResponse, ProjectComponentsMetadata } from '../types/ComponentStructure';
7
7
  import { Deploy, ProjectDeployResponse } from '../types/Deploy';
@@ -28,11 +28,23 @@ export declare function deleteFileFromBuild(accountId: number, projectName: stri
28
28
  export declare function cancelStagedBuild(accountId: number, projectName: string): HubSpotPromise<void>;
29
29
  export declare function fetchBuildWarnLogs(accountId: number, projectName: string, buildId: number): HubSpotPromise<WarnLogsResponse>;
30
30
  export declare function fetchDeployWarnLogs(accountId: number, projectName: string, deployId: number): HubSpotPromise<WarnLogsResponse>;
31
- export declare function listAppsForMigration(accountId: number): HubSpotPromise<ListAppsResponse>;
32
- export declare function beginMigration(accountId: number, applicationId: number): HubSpotPromise<BeginMigrationResponse>;
33
- export declare function finishMigration(portalId: number, migrationId: number, componentUids: Record<string, string>, projectName: string, targetPlatformVersion: string): HubSpotPromise<FinishMigrationResponse>;
31
+ /**
32
+ * @deprecated
33
+ */
34
34
  export declare function migrateApp(accountId: number, appId: number, projectName: string): HubSpotPromise<MigrateAppResponse>;
35
- export declare function checkMigrationStatus(accountId: number, id: number, targetPlatformVersion?: string): HubSpotPromise<PollAppResponse>;
35
+ /**
36
+ * @deprecated
37
+ */
38
+ export declare function checkMigrationStatus(accountId: number, id: number): HubSpotPromise<PollAppResponse>;
39
+ /**
40
+ * @deprecated
41
+ */
36
42
  export declare function cloneApp(accountId: number, appId: number): HubSpotPromise<CloneAppResponse>;
43
+ /**
44
+ * @deprecated
45
+ */
37
46
  export declare function checkCloneStatus(accountId: number, exportId: number): HubSpotPromise<CloneAppResponse>;
47
+ /**
48
+ * @deprecated
49
+ */
38
50
  export declare function downloadClonedProject(accountId: number, exportId: number): HubSpotPromise<Buffer>;
package/api/projects.js CHANGED
@@ -3,10 +3,9 @@ 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.downloadClonedProject = exports.checkCloneStatus = exports.cloneApp = exports.checkMigrationStatus = exports.migrateApp = exports.finishMigration = exports.beginMigration = exports.listAppsForMigration = exports.fetchDeployWarnLogs = exports.fetchBuildWarnLogs = exports.cancelStagedBuild = exports.deleteFileFromBuild = exports.uploadFileToBuild = exports.queueBuild = exports.provisionBuild = exports.fetchProjectSettings = exports.getDeployStructure = exports.getDeployStatus = exports.deployProject = exports.getBuildStructure = exports.getBuildStatus = exports.fetchProjectBuilds = exports.fetchPlatformVersions = exports.deleteProject = exports.downloadProject = exports.fetchProjectComponentsMetadata = exports.fetchProject = exports.uploadProject = exports.createProject = exports.fetchProjects = void 0;
6
+ exports.downloadClonedProject = exports.checkCloneStatus = exports.cloneApp = exports.checkMigrationStatus = exports.migrateApp = exports.fetchDeployWarnLogs = exports.fetchBuildWarnLogs = exports.cancelStagedBuild = exports.deleteFileFromBuild = exports.uploadFileToBuild = exports.queueBuild = exports.provisionBuild = exports.fetchProjectSettings = exports.getDeployStructure = exports.getDeployStatus = exports.deployProject = exports.getBuildStructure = exports.getBuildStatus = exports.fetchProjectBuilds = exports.fetchPlatformVersions = exports.deleteProject = exports.downloadProject = exports.fetchProjectComponentsMetadata = exports.fetchProject = exports.uploadProject = exports.createProject = exports.fetchProjects = void 0;
7
7
  const http_1 = require("../http");
8
8
  const fs_1 = __importDefault(require("fs"));
9
- const projects_1 = require("../constants/projects");
10
9
  const PROJECTS_API_PATH = 'dfs/v1/projects';
11
10
  const DEVELOPER_FILE_SYSTEM_PATH = 'dfs/v1';
12
11
  const PROJECTS_DEPLOY_API_PATH = 'dfs/deploy/v1';
@@ -14,7 +13,6 @@ const PROJECTS_DEPLOY_API_PATH_V3 = 'dfs/deploy/v3';
14
13
  const PROJECTS_LOGS_API_PATH = 'dfs/logging/v1';
15
14
  const DEVELOPER_PROJECTS_API_PATH = 'developer/projects/v1';
16
15
  const MIGRATIONS_API_PATH_V1 = 'dfs/migrations/v1';
17
- const MIGRATIONS_API_PATH_V2 = 'dfs/migrations/v2';
18
16
  const PROJECTS_V3_API_PATH = 'project-components-external/v3';
19
17
  function fetchProjects(accountId) {
20
18
  return http_1.http.get(accountId, {
@@ -207,35 +205,9 @@ function fetchDeployWarnLogs(accountId, projectName, deployId) {
207
205
  });
208
206
  }
209
207
  exports.fetchDeployWarnLogs = fetchDeployWarnLogs;
210
- async function listAppsForMigration(accountId) {
211
- return http_1.http.get(accountId, {
212
- url: `${MIGRATIONS_API_PATH_V2}/list-apps`,
213
- });
214
- }
215
- exports.listAppsForMigration = listAppsForMigration;
216
- async function beginMigration(accountId, applicationId) {
217
- return http_1.http.post(accountId, {
218
- url: `${MIGRATIONS_API_PATH_V2}/migrations`,
219
- data: {
220
- applicationId,
221
- },
222
- });
223
- }
224
- exports.beginMigration = beginMigration;
225
- async function finishMigration(portalId, migrationId, componentUids, projectName, targetPlatformVersion) {
226
- const pathPlatformVersion = targetPlatformVersion === projects_1.PLATFORM_VERSIONS.unstable
227
- ? targetPlatformVersion
228
- : `v${targetPlatformVersion.replace('.', '')}`;
229
- return http_1.http.post(portalId, {
230
- url: `${MIGRATIONS_API_PATH_V2}/migrations/migrate/${pathPlatformVersion}`,
231
- data: {
232
- migrationId,
233
- projectName,
234
- componentUids,
235
- },
236
- });
237
- }
238
- exports.finishMigration = finishMigration;
208
+ /**
209
+ * @deprecated
210
+ */
239
211
  function migrateApp(accountId, appId, projectName) {
240
212
  return http_1.http.post(accountId, {
241
213
  url: `${MIGRATIONS_API_PATH_V1}/migrations`,
@@ -247,18 +219,18 @@ function migrateApp(accountId, appId, projectName) {
247
219
  });
248
220
  }
249
221
  exports.migrateApp = migrateApp;
250
- function checkMigrationStatus(accountId, id, targetPlatformVersion = projects_1.PLATFORM_VERSIONS.v2023_2) {
251
- if (targetPlatformVersion === projects_1.PLATFORM_VERSIONS.unstable ||
252
- targetPlatformVersion === projects_1.PLATFORM_VERSIONS.v2025_2) {
253
- return http_1.http.get(accountId, {
254
- url: `${MIGRATIONS_API_PATH_V2}/migrations/${id}/status`,
255
- });
256
- }
222
+ /**
223
+ * @deprecated
224
+ */
225
+ function checkMigrationStatus(accountId, id) {
257
226
  return http_1.http.get(accountId, {
258
227
  url: `${MIGRATIONS_API_PATH_V1}/migrations/${id}`,
259
228
  });
260
229
  }
261
230
  exports.checkMigrationStatus = checkMigrationStatus;
231
+ /**
232
+ * @deprecated
233
+ */
262
234
  function cloneApp(accountId, appId) {
263
235
  return http_1.http.post(accountId, {
264
236
  url: `${MIGRATIONS_API_PATH_V1}/exports`,
@@ -269,12 +241,18 @@ function cloneApp(accountId, appId) {
269
241
  });
270
242
  }
271
243
  exports.cloneApp = cloneApp;
244
+ /**
245
+ * @deprecated
246
+ */
272
247
  function checkCloneStatus(accountId, exportId) {
273
248
  return http_1.http.get(accountId, {
274
249
  url: `${MIGRATIONS_API_PATH_V1}/exports/${exportId}/status`,
275
250
  });
276
251
  }
277
252
  exports.checkCloneStatus = checkCloneStatus;
253
+ /**
254
+ * @deprecated
255
+ */
278
256
  function downloadClonedProject(accountId, exportId) {
279
257
  return http_1.http.get(accountId, {
280
258
  url: `${MIGRATIONS_API_PATH_V1}/exports/${exportId}/download-as-clone`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/local-dev-lib",
3
- "version": "3.5.0-beta.0",
3
+ "version": "3.5.1-beta.0",
4
4
  "description": "Provides library functionality for HubSpot local development tooling, including the HubSpot CLI",
5
5
  "repository": {
6
6
  "type": "git",
@@ -54,7 +54,10 @@
54
54
  "./config": "./config/index.js",
55
55
  "./constants/*": "./constants/*.js",
56
56
  "./models/*": "./models/*.js",
57
- "./types/*": "./types/*.d.ts"
57
+ "./types/*": {
58
+ "types": "./types/*.d.ts",
59
+ "default": "./types/*.js"
60
+ }
58
61
  },
59
62
  "dependencies": {
60
63
  "address": "2.0.2",
@@ -2,6 +2,7 @@ export type FireAlarm = {
2
2
  id: number;
3
3
  title: string;
4
4
  message: string;
5
+ urlRegexPattern: string | null;
5
6
  querySelector: string | null;
6
7
  severity: string;
7
8
  createdAt: number;
@@ -6,6 +6,8 @@ export declare const MIGRATION_STATUS: {
6
6
  readonly PREPARING: "PREPARING";
7
7
  readonly PENDING: "PENDING";
8
8
  readonly SUCCESS: "SUCCESS";
9
+ readonly IN_PROGRESS: "IN_PROGRESS";
10
+ readonly INPUT_REQUIRED: "INPUT_REQUIRED";
9
11
  };
10
12
  export type MigrateAppResponse = {
11
13
  id: number;
@@ -7,4 +7,6 @@ exports.MIGRATION_STATUS = {
7
7
  PREPARING: 'PREPARING',
8
8
  PENDING: 'PENDING',
9
9
  SUCCESS: 'SUCCESS',
10
+ IN_PROGRESS: 'IN_PROGRESS',
11
+ INPUT_REQUIRED: 'INPUT_REQUIRED',
10
12
  };
@@ -1,7 +1,6 @@
1
1
  import { Build } from './Build';
2
2
  import { GithubSourceData } from './Github';
3
3
  import { ProjectLog } from './ProjectLog';
4
- import { UNMIGRATABLE_REASONS } from '../constants/projects';
5
4
  export type Project = {
6
5
  createdAt: number;
7
6
  deletedAt: number;
@@ -67,38 +66,3 @@ export type ProjectStandardError = {
67
66
  export type WarnLogsResponse = {
68
67
  logs: Array<ProjectLog>;
69
68
  };
70
- interface BaseMigrationApp {
71
- appId: number;
72
- appName: string;
73
- isMigratable: boolean;
74
- migrationComponents: ListAppsMigrationComponent[];
75
- }
76
- export interface MigratableApp extends BaseMigrationApp {
77
- isMigratable: true;
78
- }
79
- export interface UnmigratableApp extends BaseMigrationApp {
80
- isMigratable: false;
81
- unmigratableReason: keyof typeof UNMIGRATABLE_REASONS;
82
- }
83
- export type MigrationApp = MigratableApp | UnmigratableApp;
84
- export interface ListAppsResponse {
85
- migratableApps: MigratableApp[];
86
- unmigratableApps: UnmigratableApp[];
87
- }
88
- export interface BeginMigrationResponse {
89
- migrationId: number;
90
- componentsRequiringUids: Record<string, {
91
- componentType: string;
92
- componentHint: string | null;
93
- }>;
94
- }
95
- export interface ListAppsMigrationComponent {
96
- id: string;
97
- componentType: string;
98
- isSupported: boolean;
99
- }
100
- export type FinishMigrationResponse = {
101
- projectName: string;
102
- buildId: number;
103
- };
104
- export {};