@hubspot/local-dev-lib 5.2.0 → 5.2.1-beta.1
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 +9 -1
- package/api/projects.js +13 -0
- package/enums/build.d.ts +1 -0
- package/enums/build.js +1 -0
- package/package.json +5 -1
- package/types/Apps.d.ts +2 -0
- package/types/Deploy.d.ts +9 -0
package/api/projects.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { HubSpotPromise, QueryParams } from '../types/Http.js';
|
|
|
2
2
|
import { Project, FetchProjectResponse, UploadProjectResponse, ProjectSettings, FetchPlatformVersionResponse, WarnLogsResponse, UploadIRResponse } from '../types/Project.js';
|
|
3
3
|
import { Build, FetchProjectBuildsResponse } from '../types/Build.js';
|
|
4
4
|
import { ComponentStructureResponse, ProjectComponentsMetadata } from '../types/ComponentStructure.js';
|
|
5
|
-
import { Deploy, ProjectDeployResponse, ProjectDeployResponseV1 } from '../types/Deploy.js';
|
|
5
|
+
import { Deploy, ProjectDeployResponse, ProjectDeployResponseV1, ProjectDeletionResponse } from '../types/Deploy.js';
|
|
6
6
|
import { MigrateAppResponse, CloneAppResponse, PollAppResponse } from '../types/Migration.js';
|
|
7
7
|
export declare function fetchProjects(accountId: number): HubSpotPromise<FetchProjectResponse>;
|
|
8
8
|
export declare function createProject(accountId: number, name: string): HubSpotPromise<Project>;
|
|
@@ -11,6 +11,14 @@ export declare function fetchProject(accountId: number, projectName: string): Hu
|
|
|
11
11
|
export declare function fetchProjectComponentsMetadata(accountId: number, projectId: number): HubSpotPromise<ProjectComponentsMetadata>;
|
|
12
12
|
export declare function downloadProject(accountId: number, projectName: string, buildId: number): HubSpotPromise<Buffer>;
|
|
13
13
|
export declare function deleteProject(accountId: number, projectName: string): HubSpotPromise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* Stages the project for deletion. Returns a deployId that can be polled using getDeployStatus.
|
|
16
|
+
* This needs to be called first before `deleteProject` for unified projects
|
|
17
|
+
* @param accountId
|
|
18
|
+
* @param projectName - The name of the project to delete
|
|
19
|
+
* @param dryRun - Should this be a dry run of the deletion. If set to true, returns a list of the components that will be removed `componentsToRemove`
|
|
20
|
+
*/
|
|
21
|
+
export declare function stageProjectForDeletion(accountId: number, projectName: string, dryRun: boolean): HubSpotPromise<ProjectDeletionResponse>;
|
|
14
22
|
export declare function fetchPlatformVersions(accountId: number): HubSpotPromise<FetchPlatformVersionResponse>;
|
|
15
23
|
export declare function fetchProjectBuilds(accountId: number, projectName: string, params?: QueryParams): HubSpotPromise<FetchProjectBuildsResponse>;
|
|
16
24
|
export declare function getBuildStatus(accountId: number, projectName: string, buildId: number): HubSpotPromise<Build>;
|
package/api/projects.js
CHANGED
|
@@ -78,6 +78,19 @@ export function deleteProject(accountId, projectName) {
|
|
|
78
78
|
url: `${DEVELOPER_PROJECTS_API_PATH}/${encodeURIComponent(projectName)}`,
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* Stages the project for deletion. Returns a deployId that can be polled using getDeployStatus.
|
|
83
|
+
* This needs to be called first before `deleteProject` for unified projects
|
|
84
|
+
* @param accountId
|
|
85
|
+
* @param projectName - The name of the project to delete
|
|
86
|
+
* @param dryRun - Should this be a dry run of the deletion. If set to true, returns a list of the components that will be removed `componentsToRemove`
|
|
87
|
+
*/
|
|
88
|
+
export function stageProjectForDeletion(accountId, projectName, dryRun) {
|
|
89
|
+
return http.post(accountId, {
|
|
90
|
+
url: `${PROJECTS_DEPLOY_API_PATH_V3}/deploys/delete`,
|
|
91
|
+
data: { projectName, dryRun },
|
|
92
|
+
});
|
|
93
|
+
}
|
|
81
94
|
export function fetchPlatformVersions(accountId) {
|
|
82
95
|
return http.get(accountId, {
|
|
83
96
|
url: `${DEVELOPER_PROJECTS_API_PATH}/platformVersion`,
|
package/enums/build.d.ts
CHANGED
package/enums/build.js
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubspot/local-dev-lib",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.1-beta.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Provides library functionality for HubSpot local development tooling, including the HubSpot CLI",
|
|
6
|
+
"files": [
|
|
7
|
+
"**/*",
|
|
8
|
+
"!**/__tests__/**"
|
|
9
|
+
],
|
|
6
10
|
"repository": {
|
|
7
11
|
"type": "git",
|
|
8
12
|
"url": "https://github.com/HubSpot/hubspot-local-dev-lib"
|
package/types/Apps.d.ts
CHANGED
package/types/Deploy.d.ts
CHANGED
|
@@ -55,3 +55,12 @@ export type ProjectDeployResponseV1 = {
|
|
|
55
55
|
id: string;
|
|
56
56
|
links: DeployResponseLinks;
|
|
57
57
|
};
|
|
58
|
+
export type DeployedComponentInfo = {
|
|
59
|
+
componentType: string;
|
|
60
|
+
componentId: string;
|
|
61
|
+
};
|
|
62
|
+
export type ProjectDeletionResponse = {
|
|
63
|
+
deployId?: number;
|
|
64
|
+
componentsToRemove: DeployedComponentInfo[];
|
|
65
|
+
hasDeployedComponents: boolean;
|
|
66
|
+
};
|