@hubspot/local-dev-lib 0.7.4-experimental.5 → 0.7.5-experimental.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 +4 -1
- package/api/projects.js +17 -0
- package/package.json +1 -5
- package/types/Project.d.ts +21 -0
package/api/projects.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HubSpotPromise, QueryParams } from '../types/Http.js';
|
|
2
|
-
import { Project, FetchProjectResponse, UploadProjectResponse, ProjectSettings, FetchPlatformVersionResponse, WarnLogsResponse, UploadIRResponse } from '../types/Project.js';
|
|
2
|
+
import { Project, FetchProjectResponse, UploadProjectResponse, ProjectSettings, FetchPlatformVersionResponse, WarnLogsResponse, UploadIRResponse, Release, FetchListReleasesResponse } from '../types/Project.js';
|
|
3
3
|
import { Build, FetchProjectBuildsResponse } from '../types/Build.js';
|
|
4
4
|
import { ComponentStructureResponse, ProjectComponentsMetadata } from '../types/ComponentStructure.js';
|
|
5
5
|
import { Deploy, ProjectDeployResponse, ProjectDeployResponseV1 } from '../types/Deploy.js';
|
|
@@ -31,6 +31,9 @@ export declare function deleteFileFromBuild(accountId: number, projectName: stri
|
|
|
31
31
|
export declare function cancelStagedBuild(accountId: number, projectName: string): HubSpotPromise<void>;
|
|
32
32
|
export declare function fetchBuildWarnLogs(accountId: number, projectName: string, buildId: number): HubSpotPromise<WarnLogsResponse>;
|
|
33
33
|
export declare function fetchDeployWarnLogs(accountId: number, projectName: string, deployId: number): HubSpotPromise<WarnLogsResponse>;
|
|
34
|
+
export declare function createRelease(accountId: number, projectName: string, buildId: number): HubSpotPromise<Release>;
|
|
35
|
+
export declare function listReleases(accountId: number, projectName: string, params?: QueryParams): HubSpotPromise<FetchListReleasesResponse>;
|
|
36
|
+
export declare function getReleaseInfo(accountId: number, projectName: string, releaseTag: string): HubSpotPromise<Release>;
|
|
34
37
|
/**
|
|
35
38
|
* @deprecated
|
|
36
39
|
*/
|
package/api/projects.js
CHANGED
|
@@ -202,6 +202,23 @@ export function fetchDeployWarnLogs(accountId, projectName, deployId) {
|
|
|
202
202
|
url: `${PROJECTS_LOGS_API_PATH}/logs/projects/${encodeURIComponent(projectName)}/deploys/${deployId}/combined/warn`,
|
|
203
203
|
});
|
|
204
204
|
}
|
|
205
|
+
export function createRelease(accountId, projectName, buildId) {
|
|
206
|
+
return http.post(accountId, {
|
|
207
|
+
url: `${PROJECTS_API_PATH}/${encodeURIComponent(projectName)}/releases`,
|
|
208
|
+
data: { buildId },
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
export function listReleases(accountId, projectName, params = {}) {
|
|
212
|
+
return http.get(accountId, {
|
|
213
|
+
url: `${PROJECTS_API_PATH}/${encodeURIComponent(projectName)}/releases`,
|
|
214
|
+
params,
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
export function getReleaseInfo(accountId, projectName, releaseTag) {
|
|
218
|
+
return http.get(accountId, {
|
|
219
|
+
url: `${PROJECTS_API_PATH}/${encodeURIComponent(projectName)}/releases/${encodeURIComponent(releaseTag)}`,
|
|
220
|
+
});
|
|
221
|
+
}
|
|
205
222
|
/**
|
|
206
223
|
* @deprecated
|
|
207
224
|
*/
|
package/package.json
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubspot/local-dev-lib",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.5-experimental.0",
|
|
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
|
-
],
|
|
10
6
|
"repository": {
|
|
11
7
|
"type": "git",
|
|
12
8
|
"url": "https://github.com/HubSpot/hubspot-local-dev-lib"
|
package/types/Project.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { Build } from './Build.js';
|
|
2
2
|
import { GithubSourceData } from './Github.js';
|
|
3
3
|
import { ProjectLog } from './ProjectLog.js';
|
|
4
|
+
import { ValueOf } from './Utils.js';
|
|
5
|
+
import { SUBBUILD_TYPES } from '../enums/build.js';
|
|
4
6
|
export type Project = {
|
|
5
7
|
createdAt: number;
|
|
6
8
|
deletedAt: number;
|
|
@@ -48,3 +50,22 @@ export type FetchPlatformVersionResponse = {
|
|
|
48
50
|
export type WarnLogsResponse = {
|
|
49
51
|
logs: Array<ProjectLog>;
|
|
50
52
|
};
|
|
53
|
+
export type Release = {
|
|
54
|
+
releaseTag: string;
|
|
55
|
+
buildId: number;
|
|
56
|
+
createdAt: string;
|
|
57
|
+
components?: Array<{
|
|
58
|
+
buildType: ValueOf<typeof SUBBUILD_TYPES>;
|
|
59
|
+
buildName?: string;
|
|
60
|
+
rootPath?: string;
|
|
61
|
+
id?: string;
|
|
62
|
+
}>;
|
|
63
|
+
};
|
|
64
|
+
export type FetchListReleasesResponse = {
|
|
65
|
+
results: Array<Release>;
|
|
66
|
+
paging: {
|
|
67
|
+
next: {
|
|
68
|
+
after: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
};
|