@hubspot/local-dev-lib 0.7.6-experimental.0 → 0.7.6-experimental.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/api/sandboxHubs.d.ts +3 -0
- package/api/sandboxHubs.js +4 -0
- package/api/sandboxSync.d.ts +6 -0
- package/api/sandboxSync.js +7 -0
- package/constants/projects.d.ts +1 -0
- package/constants/projects.js +1 -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/types/Sandbox.d.ts +6 -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/api/sandboxHubs.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { SandboxPersonalAccessKey, SandboxResponse, SandboxUsageLimitsResponse, V2Sandbox } from '../types/Sandbox.js';
|
|
2
2
|
import { HubSpotPromise } from '../types/Http.js';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Use createV2Sandbox instead
|
|
5
|
+
*/
|
|
3
6
|
export declare function createSandbox(accountId: number, name: string, type: 1 | 2): HubSpotPromise<SandboxResponse>;
|
|
4
7
|
export declare function deleteSandbox(parentAccountId: number, sandboxAccountId: number): HubSpotPromise<void>;
|
|
5
8
|
export declare function getSandboxUsageLimits(parentAccountId: number): HubSpotPromise<SandboxUsageLimitsResponse>;
|
package/api/sandboxHubs.js
CHANGED
|
@@ -2,6 +2,10 @@ import { http } from '../http/index.js';
|
|
|
2
2
|
import { SANDBOX_TIMEOUT } from '../constants/api.js';
|
|
3
3
|
const SANDBOX_API_PATH = 'sandbox-hubs/v1';
|
|
4
4
|
const SANDBOX_API_PATH_V2 = 'sandbox-hubs/v2';
|
|
5
|
+
/* TODO: Delete createSandbox in the next major release (as of 2/20/2026) */
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Use createV2Sandbox instead
|
|
8
|
+
*/
|
|
5
9
|
export function createSandbox(accountId, name, type) {
|
|
6
10
|
return http.post(accountId, {
|
|
7
11
|
data: { name, type, generatePersonalAccessKey: true }, // For CLI, generatePersonalAccessKey will always be true since we'll be saving the entry to the config
|
package/api/sandboxSync.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { InitiateSyncResponse, FetchTypesResponse, TaskRequestData } from '../types/Sandbox.js';
|
|
2
2
|
import { HubSpotPromise } from '../types/Http.js';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Sync functionality has been deprecated and will be removed in a future release.
|
|
5
|
+
*/
|
|
3
6
|
export declare function initiateSync(fromHubId: number, toHubId: number, tasks: Array<TaskRequestData>, sandboxHubId: number): HubSpotPromise<InitiateSyncResponse>;
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated
|
|
9
|
+
*/
|
|
4
10
|
export declare function fetchTypes(accountId: number, toHubId: number): HubSpotPromise<FetchTypesResponse>;
|
package/api/sandboxSync.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { http } from '../http/index.js';
|
|
2
2
|
import { SANDBOX_TIMEOUT } from '../constants/api.js';
|
|
3
3
|
const SANDBOXES_SYNC_API_PATH = 'sandboxes-sync/v1';
|
|
4
|
+
/* TODO: Delete this entire file in the next major release (as of 2/20/2026) */
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Sync functionality has been deprecated and will be removed in a future release.
|
|
7
|
+
*/
|
|
4
8
|
export async function initiateSync(fromHubId, toHubId, tasks, sandboxHubId) {
|
|
5
9
|
return http.post(fromHubId, {
|
|
6
10
|
data: {
|
|
@@ -14,6 +18,9 @@ export async function initiateSync(fromHubId, toHubId, tasks, sandboxHubId) {
|
|
|
14
18
|
url: `${SANDBOXES_SYNC_API_PATH}/tasks/initiate/async`,
|
|
15
19
|
});
|
|
16
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated
|
|
23
|
+
*/
|
|
17
24
|
export async function fetchTypes(accountId, toHubId) {
|
|
18
25
|
return http.get(accountId, {
|
|
19
26
|
url: `${SANDBOXES_SYNC_API_PATH}/types${toHubId ? `?toHubId=${toHubId}` : ''}`,
|
package/constants/projects.d.ts
CHANGED
package/constants/projects.js
CHANGED
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": "0.7.6-experimental.
|
|
3
|
+
"version": "0.7.6-experimental.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
|
+
};
|
package/types/Sandbox.d.ts
CHANGED
|
@@ -138,6 +138,9 @@ export type V2Sandbox = {
|
|
|
138
138
|
updatedAt?: string;
|
|
139
139
|
updatedByUser?: User | null;
|
|
140
140
|
};
|
|
141
|
+
/**
|
|
142
|
+
* @deprecated This type is deprecated and will be removed in the next major release.
|
|
143
|
+
*/
|
|
141
144
|
export type SandboxResponse = {
|
|
142
145
|
sandbox: Sandbox;
|
|
143
146
|
personalAccessKey: string;
|
|
@@ -176,6 +179,9 @@ export type SandboxType = {
|
|
|
176
179
|
groupType: string;
|
|
177
180
|
syncMandatory: boolean;
|
|
178
181
|
};
|
|
182
|
+
/**
|
|
183
|
+
* @deprecated This type is deprecated and will be removed in the next major release.
|
|
184
|
+
*/
|
|
179
185
|
export type FetchTypesResponse = {
|
|
180
186
|
results: Array<SandboxType>;
|
|
181
187
|
};
|