@alwaysmeticulous/client 2.295.0 → 2.297.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/dist/api/project-deployments.api.d.ts +82 -6
- package/dist/api/project-deployments.api.js +23 -3
- package/dist/api/project-deployments.api.js.map +1 -1
- package/dist/api/session.api.d.ts +14 -0
- package/dist/api/session.api.js +21 -3
- package/dist/api/session.api.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/dist/utils/put-file-to-signed-url.js +5 -3
- package/dist/utils/put-file-to-signed-url.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AssetUploadMetadata, DeploymentArchiveType, type TestRun } from "@alwaysmeticulous/api";
|
|
1
|
+
import { AssetUploadMetadata, DeploymentArchiveType, DownloadDeploymentResponse, type TestRun } from "@alwaysmeticulous/api";
|
|
2
2
|
import { MeticulousClient } from "../types/client.types";
|
|
3
3
|
/**
|
|
4
4
|
* Identifies a project for OAuth callers, whose token does not by itself
|
|
@@ -57,10 +57,23 @@ export interface CompleteAssetUploadParams extends ProjectIdentifier {
|
|
|
57
57
|
createDeployment?: boolean;
|
|
58
58
|
multipartUploadInfo?: MultiPartUploadInfo;
|
|
59
59
|
}
|
|
60
|
+
export interface ChunkPathOverlap {
|
|
61
|
+
path: string;
|
|
62
|
+
lowerChunk: {
|
|
63
|
+
name: string;
|
|
64
|
+
versionId: string;
|
|
65
|
+
};
|
|
66
|
+
upperChunk: {
|
|
67
|
+
name: string;
|
|
68
|
+
versionId: string;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
60
71
|
export interface CompleteAssetUploadResponse {
|
|
61
72
|
testRun?: TestRun;
|
|
62
73
|
baseNotFound?: boolean;
|
|
63
74
|
message?: string;
|
|
75
|
+
overlaps?: ChunkPathOverlap[];
|
|
76
|
+
overlapsTruncated?: boolean;
|
|
64
77
|
}
|
|
65
78
|
export interface CompleteContainerUploadParams extends ProjectIdentifier {
|
|
66
79
|
uploadId: string;
|
|
@@ -92,11 +105,6 @@ export interface ContainerEnvVariable {
|
|
|
92
105
|
name: string;
|
|
93
106
|
value: string;
|
|
94
107
|
}
|
|
95
|
-
export interface DownloadDeploymentResponse {
|
|
96
|
-
assetsUrl: string;
|
|
97
|
-
metadataUrl: string;
|
|
98
|
-
archiveType: DeploymentArchiveType;
|
|
99
|
-
}
|
|
100
108
|
export declare const requestAssetUpload: ({ client, projectId, ...body }: RequestAssetUploadParams & {
|
|
101
109
|
client: MeticulousClient;
|
|
102
110
|
}) => Promise<RequestAssetUploadResponse>;
|
|
@@ -118,6 +126,74 @@ export declare const completeAssetUpload: ({ client, projectId, ...body }: Compl
|
|
|
118
126
|
export declare const completeContainerUpload: ({ client, projectId, ...body }: CompleteContainerUploadParams & {
|
|
119
127
|
client: MeticulousClient;
|
|
120
128
|
}) => Promise<CompleteContainerUploadResponse>;
|
|
129
|
+
export type AssetChunkUploadPreviousStatus = "pending_upload" | "uploaded" | "deleted" | "failed_uploading";
|
|
130
|
+
export interface RequestAssetChunkUploadParams extends ProjectIdentifier {
|
|
131
|
+
chunkName: string;
|
|
132
|
+
chunkVersionId: string;
|
|
133
|
+
tarballSize: number;
|
|
134
|
+
commitSha?: string | undefined;
|
|
135
|
+
force?: boolean;
|
|
136
|
+
}
|
|
137
|
+
export type RequestAssetChunkUploadResponse = {
|
|
138
|
+
alreadyUploaded: true;
|
|
139
|
+
} | {
|
|
140
|
+
alreadyUploaded: false;
|
|
141
|
+
tarballUploadUrl: string;
|
|
142
|
+
filesIndexUploadUrl: string;
|
|
143
|
+
previousStatus: AssetChunkUploadPreviousStatus | null;
|
|
144
|
+
};
|
|
145
|
+
export interface CompleteAssetChunkUploadParams extends ProjectIdentifier {
|
|
146
|
+
chunkName: string;
|
|
147
|
+
chunkVersionId: string;
|
|
148
|
+
commitSha?: string | undefined;
|
|
149
|
+
}
|
|
150
|
+
export interface CompleteAssetChunkUploadResponse {
|
|
151
|
+
message: string;
|
|
152
|
+
}
|
|
153
|
+
export interface ProjectAssetChunkReference {
|
|
154
|
+
name: string;
|
|
155
|
+
versionId: string;
|
|
156
|
+
}
|
|
157
|
+
export interface CreateRunWithUploadedAssetChunksParams extends ProjectIdentifier {
|
|
158
|
+
commitSha: string;
|
|
159
|
+
isUserVisible?: boolean;
|
|
160
|
+
createDeployment?: boolean;
|
|
161
|
+
assetReferencesManifest: ProjectAssetChunkReference[];
|
|
162
|
+
rewrites?: AssetUploadMetadata["rewrites"];
|
|
163
|
+
}
|
|
164
|
+
export interface CreateRunWithUploadedAssetChunksResponse {
|
|
165
|
+
/**
|
|
166
|
+
* The server-generated deployment id. Absent when `createDeployment` is false
|
|
167
|
+
* (dry-run that only computes chunk path overlaps and creates nothing). Used
|
|
168
|
+
* to key the git-diff S3 upload and passed back to
|
|
169
|
+
* `triggerRunWithUploadedAssetChunks`.
|
|
170
|
+
*/
|
|
171
|
+
sourceDeploymentId?: string;
|
|
172
|
+
overlaps?: ChunkPathOverlap[];
|
|
173
|
+
overlapsTruncated?: boolean;
|
|
174
|
+
}
|
|
175
|
+
export interface TriggerRunWithUploadedAssetChunksParams extends ProjectIdentifier {
|
|
176
|
+
sourceDeploymentId: string;
|
|
177
|
+
commitSha: string;
|
|
178
|
+
baseSha?: string | undefined;
|
|
179
|
+
hasGitDiff?: boolean | undefined;
|
|
180
|
+
withUncommittedChanges?: boolean | undefined;
|
|
181
|
+
mustHaveBase: boolean;
|
|
182
|
+
isUserVisible?: boolean;
|
|
183
|
+
skipPreprocessing?: boolean;
|
|
184
|
+
}
|
|
185
|
+
export declare const createRunWithUploadedAssetChunks: ({ client, projectId, ...body }: CreateRunWithUploadedAssetChunksParams & {
|
|
186
|
+
client: MeticulousClient;
|
|
187
|
+
}) => Promise<CreateRunWithUploadedAssetChunksResponse>;
|
|
188
|
+
export declare const triggerRunWithUploadedAssetChunks: ({ client, projectId, ...body }: TriggerRunWithUploadedAssetChunksParams & {
|
|
189
|
+
client: MeticulousClient;
|
|
190
|
+
}) => Promise<CompleteAssetUploadResponse>;
|
|
191
|
+
export declare const requestAssetChunkUpload: ({ client, projectId, ...body }: RequestAssetChunkUploadParams & {
|
|
192
|
+
client: MeticulousClient;
|
|
193
|
+
}) => Promise<RequestAssetChunkUploadResponse>;
|
|
194
|
+
export declare const completeAssetChunkUpload: ({ client, projectId, ...body }: CompleteAssetChunkUploadParams & {
|
|
195
|
+
client: MeticulousClient;
|
|
196
|
+
}) => Promise<CompleteAssetChunkUploadResponse>;
|
|
121
197
|
export declare const downloadProjectDeployment: ({ client, deploymentUploadId, }: {
|
|
122
198
|
client: MeticulousClient;
|
|
123
199
|
deploymentUploadId: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7bee6f07-bd8e-5041-ae5d-d587b9aed319")}catch(e){}}();
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.getContainerDeployment = exports.downloadProjectDeployment = exports.completeContainerUpload = exports.completeAssetUpload = exports.triggerRunOnDeployment = exports.requestGitDiffUpload = exports.requestUploadPart = exports.requestMultipartAssetUpload = exports.requestAssetUpload = void 0;
|
|
5
|
+
exports.getContainerDeployment = exports.downloadProjectDeployment = exports.completeAssetChunkUpload = exports.requestAssetChunkUpload = exports.triggerRunWithUploadedAssetChunks = exports.createRunWithUploadedAssetChunks = exports.completeContainerUpload = exports.completeAssetUpload = exports.triggerRunOnDeployment = exports.requestGitDiffUpload = exports.requestUploadPart = exports.requestMultipartAssetUpload = exports.requestAssetUpload = void 0;
|
|
6
6
|
/**
|
|
7
7
|
* Builds a `RequestConfig` that puts `projectId` (if present) into the query
|
|
8
8
|
* string. Every project-deployment endpoint reads `projectId` from
|
|
@@ -44,6 +44,26 @@ const completeContainerUpload = async ({ client, projectId, ...body }) => {
|
|
|
44
44
|
return data;
|
|
45
45
|
};
|
|
46
46
|
exports.completeContainerUpload = completeContainerUpload;
|
|
47
|
+
const createRunWithUploadedAssetChunks = async ({ client, projectId, ...body }) => {
|
|
48
|
+
const { data } = await client.post("project-deployments/create-run-with-uploaded-asset-chunks", body, projectIdQuery(projectId));
|
|
49
|
+
return data;
|
|
50
|
+
};
|
|
51
|
+
exports.createRunWithUploadedAssetChunks = createRunWithUploadedAssetChunks;
|
|
52
|
+
const triggerRunWithUploadedAssetChunks = async ({ client, projectId, ...body }) => {
|
|
53
|
+
const { data } = await client.post("project-deployments/trigger-run-with-uploaded-asset-chunks", body, projectIdQuery(projectId));
|
|
54
|
+
return data;
|
|
55
|
+
};
|
|
56
|
+
exports.triggerRunWithUploadedAssetChunks = triggerRunWithUploadedAssetChunks;
|
|
57
|
+
const requestAssetChunkUpload = async ({ client, projectId, ...body }) => {
|
|
58
|
+
const { data } = await client.post("project-deployments/request-asset-chunk-upload", body, projectIdQuery(projectId));
|
|
59
|
+
return data;
|
|
60
|
+
};
|
|
61
|
+
exports.requestAssetChunkUpload = requestAssetChunkUpload;
|
|
62
|
+
const completeAssetChunkUpload = async ({ client, projectId, ...body }) => {
|
|
63
|
+
const { data } = await client.post("project-deployments/complete-asset-chunk-upload", body, projectIdQuery(projectId));
|
|
64
|
+
return data;
|
|
65
|
+
};
|
|
66
|
+
exports.completeAssetChunkUpload = completeAssetChunkUpload;
|
|
47
67
|
const downloadProjectDeployment = async ({ client, deploymentUploadId, }) => {
|
|
48
68
|
const { data } = await client.get(`project-deployments/${deploymentUploadId}`);
|
|
49
69
|
return data;
|
|
@@ -55,4 +75,4 @@ const getContainerDeployment = async ({ client, deploymentUploadId, }) => {
|
|
|
55
75
|
};
|
|
56
76
|
exports.getContainerDeployment = getContainerDeployment;
|
|
57
77
|
//# sourceMappingURL=project-deployments.api.js.map
|
|
58
|
-
//# debugId=
|
|
78
|
+
//# debugId=7bee6f07-bd8e-5041-ae5d-d587b9aed319
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-deployments.api.js","sources":["../../src/api/project-deployments.api.ts"],"sourceRoot":"","names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"project-deployments.api.js","sources":["../../src/api/project-deployments.api.ts"],"sourceRoot":"","names":[],"mappings":";;;;;AA4HA;;;;GAIG;AACH,MAAM,cAAc,GAAG,CACrB,SAA6B,EACkB,EAAE,CACjD,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AAE7C,MAAM,kBAAkB,GAAG,KAAK,EAAE,EACvC,MAAM,EACN,SAAS,EACT,GAAG,IAAI,EAGR,EAAuC,EAAE;IACxC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,CAIhC,0CAA0C,EAC1C,IAAI,EACJ,cAAc,CAAC,SAAS,CAAC,CAC1B,CAAC;IACF,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAhBW,QAAA,kBAAkB,sBAgB7B;AAEK,MAAM,2BAA2B,GAAG,KAAK,EAAE,EAChD,MAAM,EACN,SAAS,EACT,GAAG,IAAI,EAGR,EAAgD,EAAE;IACjD,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,CAIhC,oDAAoD,EACpD,IAAI,EACJ,cAAc,CAAC,SAAS,CAAC,CAC1B,CAAC;IACF,OAAO,IAAI,CAAC;AACd,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AAwB,GAAG,KAAK,EAAE,EAC7C,MAAM,EACN,SAAS,EACT,GAAG,IAAI,EAGR,EAA6C,EAAE;IAC9C,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,CAIhC,iDAAiD,EACjD,IAAI,EACJ,cAAc,CAAC,SAAS,CAAC,CAC1B,CAAC;IACF,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAhBW,QAAA,wBAAwB,4BAgBnC;AAEK,MAAM,yBAAyB,GAAG,KAAK,EAAE,EAC9C,MAAM,EACN,kBAAkB,GAInB,EAAuC,EAAE;IACxC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,GAAG,CAG/B,uBAAuB,kBAAkB,EAAE,CAAC,CAAC;IAC/C,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAZW,QAAA,yBAAyB,6BAYpC;AAEK,MAAM,sBAAsB,GAAG,KAAK,EAAE,EAC3C,MAAM,EACN,kBAAkB,GAInB,EAA2C,EAAE;IAC5C,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,GAAG,CAG/B,iCAAiC,kBAAkB,EAAE,CAAC,CAAC;IACzD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAZW,QAAA,sBAAsB,0BAYjC","debugId":"7bee6f07-bd8e-5041-ae5d-d587b9aed319"}
|
|
@@ -2,5 +2,19 @@ import { SessionData } from "@alwaysmeticulous/api";
|
|
|
2
2
|
import { MeticulousClient } from "../types/client.types";
|
|
3
3
|
export declare const getRecordedSession: (client: MeticulousClient, sessionId: string) => Promise<any>;
|
|
4
4
|
export declare const getRecordedSessionData: (client: MeticulousClient, sessionId: string) => Promise<SessionData>;
|
|
5
|
+
export interface BackendReplayEnvVariable {
|
|
6
|
+
name: string;
|
|
7
|
+
value: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Fetches the env vars that put the backend recorder into replay mode and
|
|
11
|
+
* point it at the session's recorded data (presigned URLs). Returns an empty
|
|
12
|
+
* array for non-backend sessions. Used by `simulate` against an uploaded
|
|
13
|
+
* container to mock the backend's outbound calls.
|
|
14
|
+
*/
|
|
15
|
+
export declare const getBackendReplayEnv: ({ client, sessionId, }: {
|
|
16
|
+
client: MeticulousClient;
|
|
17
|
+
sessionId: string;
|
|
18
|
+
}) => Promise<BackendReplayEnvVariable[]>;
|
|
5
19
|
export declare const getRecordingCommandId: (client: MeticulousClient, projectId?: string) => Promise<string>;
|
|
6
20
|
export declare const postSessionIdNotification: (client: MeticulousClient, sessionId: string, recordingCommandId: string, projectId?: string) => Promise<void>;
|
package/dist/api/session.api.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b5494125-739b-5b0c-8873-fc83e43db665")}catch(e){}}();
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.postSessionIdNotification = exports.getRecordingCommandId = exports.getRecordedSessionData = exports.getRecordedSession = void 0;
|
|
5
|
+
exports.postSessionIdNotification = exports.getRecordingCommandId = exports.getBackendReplayEnv = exports.getRecordedSessionData = exports.getRecordedSession = void 0;
|
|
6
6
|
const errors_1 = require("../errors");
|
|
7
7
|
const getRecordedSession = async (client, sessionId) => {
|
|
8
8
|
const { data } = await client.get(`sessions/${sessionId}`).catch((error) => {
|
|
@@ -26,6 +26,24 @@ const getRecordedSessionData = async (client, sessionId) => {
|
|
|
26
26
|
return data;
|
|
27
27
|
};
|
|
28
28
|
exports.getRecordedSessionData = getRecordedSessionData;
|
|
29
|
+
/**
|
|
30
|
+
* Fetches the env vars that put the backend recorder into replay mode and
|
|
31
|
+
* point it at the session's recorded data (presigned URLs). Returns an empty
|
|
32
|
+
* array for non-backend sessions. Used by `simulate` against an uploaded
|
|
33
|
+
* container to mock the backend's outbound calls.
|
|
34
|
+
*/
|
|
35
|
+
const getBackendReplayEnv = async ({ client, sessionId, }) => {
|
|
36
|
+
const { data } = await client
|
|
37
|
+
.get(`sessions/${sessionId}/backend-replay-env`)
|
|
38
|
+
.catch((error) => {
|
|
39
|
+
if ((0, errors_1.isFetchError)(error) && error.response?.status === 404) {
|
|
40
|
+
return { data: [] };
|
|
41
|
+
}
|
|
42
|
+
throw (0, errors_1.maybeEnrichFetchError)(error);
|
|
43
|
+
});
|
|
44
|
+
return data;
|
|
45
|
+
};
|
|
46
|
+
exports.getBackendReplayEnv = getBackendReplayEnv;
|
|
29
47
|
const getRecordingCommandId = async (client, projectId) => {
|
|
30
48
|
const { data } = await client.post("sessions/start", undefined, projectId ? { params: { projectId } } : undefined);
|
|
31
49
|
const { recordingCommandId } = data;
|
|
@@ -37,4 +55,4 @@ const postSessionIdNotification = async (client, sessionId, recordingCommandId,
|
|
|
37
55
|
};
|
|
38
56
|
exports.postSessionIdNotification = postSessionIdNotification;
|
|
39
57
|
//# sourceMappingURL=session.api.js.map
|
|
40
|
-
//# debugId=
|
|
58
|
+
//# debugId=b5494125-739b-5b0c-8873-fc83e43db665
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.api.js","sources":["../../src/api/session.api.ts"],"sourceRoot":"","names":[],"mappings":";;;;;AACA,sCAAgE;AAGzD,MAAM,kBAAkB,GAAG,KAAK,EACrC,MAAwB,EACxB,SAAiB,EACH,EAAE;IAChB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,YAAY,SAAS,EAAE,CAAC,CAAC,KAAK,C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0B,EAC1B,SAAkB,EACH,EAAE;IACjB,MAAM,MAAM,CAAC,IAAI,CACf,YAAY,SAAS,SAAS,EAC9B,EAAE,kBAAkB,EAAE,EACtB,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAClD,CAAC;AACJ,CAAC,CAAC;AAXW,QAAA,yBAAyB,6BAWpC","debugId":"b5494125-739b-5b0c-8873-fc83e43db665"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,9 +3,9 @@ export * from "./api/github-cloud-replay.api";
|
|
|
3
3
|
export { WhoamiOrganization, WhoamiResponse, getWhoami, OAuthProject, OAuthProjectsResponse, getOAuthProjects, } from "./api/oauth.api";
|
|
4
4
|
export { GetRepoUrlOptions, RepoUrlResponse, getProject, getRepoUrl, GetSourceArchiveUrlOptions, SourceArchiveUrlResponse, getSourceArchiveUrl, RequestSourceCodeUploadUrlParams, RequestSourceCodeUploadUrlResponse, requestSourceCodeUploadUrl, } from "./api/project.api";
|
|
5
5
|
export { ReplayV3UploadLocations, getReplay, getReplayDownloadUrl, getReplayV3DownloadUrls, } from "./api/replay.api";
|
|
6
|
-
export { getRecordedSession, getRecordedSessionData, getRecordingCommandId, postSessionIdNotification, } from "./api/session.api";
|
|
6
|
+
export { getRecordedSession, getRecordedSessionData, getBackendReplayEnv, BackendReplayEnvVariable, getRecordingCommandId, postSessionIdNotification, } from "./api/session.api";
|
|
7
7
|
export { ReplayDiffResponse, getReplayDiff } from "./api/replay-diff.api";
|
|
8
|
-
export { getPrDescriptionForTestRun, getPrDiff, getPrDiffForTestRun
|
|
8
|
+
export { getPrDescriptionForTestRun, getPrDiff, getPrDiffForTestRun } from "./api/source-code.api";
|
|
9
9
|
export { ExecuteSecureTunnelTestRunOptions, executeSecureTunnelTestRun, getTestRun, getTestRunNetworkPatchingResult, markTestRunExpectsCustomChecks, getTestRunData, getTestRunReplayDiffs, GetLatestTestRunOptions, getLatestTestRunResults, TestRun, emitTelemetry, } from "./api/test-run.api";
|
|
10
10
|
export { GetIsLockedOptions, getIsLocked } from "./api/deployment-lock.api";
|
|
11
11
|
export { IN_PROGRESS_TEST_RUN_STATUS } from "./api/test-run.constants";
|
|
@@ -17,9 +17,9 @@ export { clearOAuthTokens, clearStoredProject, getStoredOAuthTokens, getStoredPr
|
|
|
17
17
|
export { getJwtClaims, isJwtExpired, isOAuthJwt } from "./oauth/oauth-utils";
|
|
18
18
|
export type { MeticulousClient } from "./types/client.types";
|
|
19
19
|
export { getProxyAgent } from "./utils/get-proxy-agent";
|
|
20
|
-
export { PutFileToSignedUrlOptions, putFileToSignedUrl
|
|
20
|
+
export { PutFileToSignedUrlOptions, putFileToSignedUrl } from "./utils/put-file-to-signed-url";
|
|
21
21
|
export { UploadError, isTransientUploadError, retryTransientUploadErrors, RetryTransientUploadErrorsOptions, } from "./utils/retry-transient-upload-errors";
|
|
22
|
-
export { ProjectIdentifier, RequestAssetUploadParams, RequestAssetUploadResponse, requestAssetUpload, requestMultipartAssetUpload, RequestMultipartAssetUploadResponse, RequestUploadPartParams, RequestUploadPartResponse, requestUploadPart, RequestGitDiffUploadParams, RequestGitDiffUploadResponse, requestGitDiffUpload, CompleteAssetUploadParams, CompleteAssetUploadResponse, completeAssetUpload, CompleteContainerUploadParams, CompleteContainerUploadResponse, completeContainerUpload, MultiPartUploadInfo,
|
|
22
|
+
export { ProjectIdentifier, RequestAssetUploadParams, RequestAssetUploadResponse, requestAssetUpload, requestMultipartAssetUpload, RequestMultipartAssetUploadResponse, RequestUploadPartParams, RequestUploadPartResponse, requestUploadPart, RequestGitDiffUploadParams, RequestGitDiffUploadResponse, requestGitDiffUpload, ChunkPathOverlap, CompleteAssetUploadParams, CompleteAssetUploadResponse, completeAssetUpload, CompleteContainerUploadParams, CompleteContainerUploadResponse, completeContainerUpload, MultiPartUploadInfo, ProjectAssetChunkReference, CreateRunWithUploadedAssetChunksParams, CreateRunWithUploadedAssetChunksResponse, createRunWithUploadedAssetChunks, TriggerRunWithUploadedAssetChunksParams, triggerRunWithUploadedAssetChunks, RequestAssetChunkUploadParams, RequestAssetChunkUploadResponse, requestAssetChunkUpload, CompleteAssetChunkUploadParams, CompleteAssetChunkUploadResponse, completeAssetChunkUpload, downloadProjectDeployment, GetContainerDeploymentResponse, getContainerDeployment, ContainerEnvVariable, } from "./api/project-deployments.api";
|
|
23
23
|
export { GetRegistryAuthResponse, getRegistryAuth } from "./api/registry.api";
|
|
24
24
|
export { isFetchError, maybeEnrichFetchError } from "./errors";
|
|
25
25
|
export { EditedFileWithLines, GetRelevantSessionsParams, GetRelevantSessionsResponse, RelevantSession, getRelevantSessions, } from "./api/local-changes.api";
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="81004e8b-2cfb-5f2a-8a3d-221e2558b3e8")}catch(e){}}();
|
|
3
3
|
|
|
4
4
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
5
|
if (k2 === undefined) k2 = k;
|
|
@@ -16,8 +16,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
17
17
|
};
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.
|
|
20
|
-
exports.getRelevantSessions = exports.maybeEnrichFetchError = exports.isFetchError = exports.getRegistryAuth = exports.getContainerDeployment = exports.downloadProjectDeployment = exports.completeContainerUpload = exports.completeAssetUpload = exports.requestGitDiffUpload = exports.requestUploadPart = exports.requestMultipartAssetUpload = exports.requestAssetUpload = exports.retryTransientUploadErrors = exports.isTransientUploadError = exports.UploadError = exports.putFileToSignedUrl = exports.getProxyAgent = exports.isOAuthJwt = exports.isJwtExpired = exports.getJwtClaims = exports.setStoredProject = exports.getStoredProjectId = void 0;
|
|
19
|
+
exports.getStoredOAuthTokens = exports.clearStoredProject = exports.clearOAuthTokens = exports.getValidAccessToken = exports.performOAuthLogin = exports.resolveApiTokenWithOAuth = exports.makeRequest = exports.isInteractiveContext = exports.createClientWithOAuth = exports.createClient = exports.getAuthToken = exports.getApiToken = exports.IN_PROGRESS_TEST_RUN_STATUS = exports.getIsLocked = exports.emitTelemetry = exports.getLatestTestRunResults = exports.getTestRunReplayDiffs = exports.getTestRunData = exports.markTestRunExpectsCustomChecks = exports.getTestRunNetworkPatchingResult = exports.getTestRun = exports.executeSecureTunnelTestRun = exports.getPrDiffForTestRun = exports.getPrDiff = exports.getPrDescriptionForTestRun = exports.getReplayDiff = exports.postSessionIdNotification = exports.getRecordingCommandId = exports.getBackendReplayEnv = exports.getRecordedSessionData = exports.getRecordedSession = exports.getReplayV3DownloadUrls = exports.getReplayDownloadUrl = exports.getReplay = exports.requestSourceCodeUploadUrl = exports.getSourceArchiveUrl = exports.getRepoUrl = exports.getProject = exports.getOAuthProjects = exports.getWhoami = exports.trackAgentFeatureUsage = exports.getTimelineDiff = exports.getScreenshotUrls = exports.getReplayDiffJsCoverage = exports.getReplayJsCoverage = exports.getTestRunJsCoverage = exports.getTestRunForCommit = exports.getScreenshotDomDiff = exports.getTestRunDiffsSummary = exports.getStructuredSessionData = void 0;
|
|
20
|
+
exports.getRelevantSessions = exports.maybeEnrichFetchError = exports.isFetchError = exports.getRegistryAuth = exports.getContainerDeployment = exports.downloadProjectDeployment = exports.completeAssetChunkUpload = exports.requestAssetChunkUpload = exports.triggerRunWithUploadedAssetChunks = exports.createRunWithUploadedAssetChunks = exports.completeContainerUpload = exports.completeAssetUpload = exports.requestGitDiffUpload = exports.requestUploadPart = exports.requestMultipartAssetUpload = exports.requestAssetUpload = exports.retryTransientUploadErrors = exports.isTransientUploadError = exports.UploadError = exports.putFileToSignedUrl = exports.getProxyAgent = exports.isOAuthJwt = exports.isJwtExpired = exports.getJwtClaims = exports.setStoredProject = exports.getStoredProjectId = exports.getStoredProject = void 0;
|
|
21
21
|
var agent_api_1 = require("./api/agent.api");
|
|
22
22
|
Object.defineProperty(exports, "getStructuredSessionData", { enumerable: true, get: function () { return agent_api_1.getStructuredSessionData; } });
|
|
23
23
|
Object.defineProperty(exports, "getTestRunDiffsSummary", { enumerable: true, get: function () { return agent_api_1.getTestRunDiffsSummary; } });
|
|
@@ -45,6 +45,7 @@ Object.defineProperty(exports, "getReplayV3DownloadUrls", { enumerable: true, ge
|
|
|
45
45
|
var session_api_1 = require("./api/session.api");
|
|
46
46
|
Object.defineProperty(exports, "getRecordedSession", { enumerable: true, get: function () { return session_api_1.getRecordedSession; } });
|
|
47
47
|
Object.defineProperty(exports, "getRecordedSessionData", { enumerable: true, get: function () { return session_api_1.getRecordedSessionData; } });
|
|
48
|
+
Object.defineProperty(exports, "getBackendReplayEnv", { enumerable: true, get: function () { return session_api_1.getBackendReplayEnv; } });
|
|
48
49
|
Object.defineProperty(exports, "getRecordingCommandId", { enumerable: true, get: function () { return session_api_1.getRecordingCommandId; } });
|
|
49
50
|
Object.defineProperty(exports, "postSessionIdNotification", { enumerable: true, get: function () { return session_api_1.postSessionIdNotification; } });
|
|
50
51
|
var replay_diff_api_1 = require("./api/replay-diff.api");
|
|
@@ -105,6 +106,10 @@ Object.defineProperty(exports, "requestUploadPart", { enumerable: true, get: fun
|
|
|
105
106
|
Object.defineProperty(exports, "requestGitDiffUpload", { enumerable: true, get: function () { return project_deployments_api_1.requestGitDiffUpload; } });
|
|
106
107
|
Object.defineProperty(exports, "completeAssetUpload", { enumerable: true, get: function () { return project_deployments_api_1.completeAssetUpload; } });
|
|
107
108
|
Object.defineProperty(exports, "completeContainerUpload", { enumerable: true, get: function () { return project_deployments_api_1.completeContainerUpload; } });
|
|
109
|
+
Object.defineProperty(exports, "createRunWithUploadedAssetChunks", { enumerable: true, get: function () { return project_deployments_api_1.createRunWithUploadedAssetChunks; } });
|
|
110
|
+
Object.defineProperty(exports, "triggerRunWithUploadedAssetChunks", { enumerable: true, get: function () { return project_deployments_api_1.triggerRunWithUploadedAssetChunks; } });
|
|
111
|
+
Object.defineProperty(exports, "requestAssetChunkUpload", { enumerable: true, get: function () { return project_deployments_api_1.requestAssetChunkUpload; } });
|
|
112
|
+
Object.defineProperty(exports, "completeAssetChunkUpload", { enumerable: true, get: function () { return project_deployments_api_1.completeAssetChunkUpload; } });
|
|
108
113
|
Object.defineProperty(exports, "downloadProjectDeployment", { enumerable: true, get: function () { return project_deployments_api_1.downloadProjectDeployment; } });
|
|
109
114
|
Object.defineProperty(exports, "getContainerDeployment", { enumerable: true, get: function () { return project_deployments_api_1.getContainerDeployment; } });
|
|
110
115
|
var registry_api_1 = require("./api/registry.api");
|
|
@@ -115,4 +120,4 @@ Object.defineProperty(exports, "maybeEnrichFetchError", { enumerable: true, get:
|
|
|
115
120
|
var local_changes_api_1 = require("./api/local-changes.api");
|
|
116
121
|
Object.defineProperty(exports, "getRelevantSessions", { enumerable: true, get: function () { return local_changes_api_1.getRelevantSessions; } });
|
|
117
122
|
//# sourceMappingURL=index.js.map
|
|
118
|
-
//# debugId=
|
|
123
|
+
//# debugId=81004e8b-2cfb-5f2a-8a3d-221e2558b3e8
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourceRoot":"","names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,6CA6ByB;AAVvB,qHAAA,wBAAwB,OAAA;AACxB,mHAAA,sBAA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D,4HAAA,kBAAkB,OAAA;AACtD,uFAK+C;AAJ7C,4HAAA,WAAW,OAAA;AACX,uIAAA,sBAAsB,OAAA;AACtB,2IAAA,0BAA0B,OAAA;AAG5B,yEAqCuC;AAjCrC,6HAAA,kBAAkB,OAAA;AAClB,sIAAA,2BAA2B,OAAA;AAI3B,4HAAA,iBAAiB,OAAA;AAGjB,+HAAA,oBAAoB,OAAA;AAIpB,8HAAA,mBAAmB,OAAA;AAGnB,kIAAA,uBAAuB,OAAA;AAKvB,2IAAA,gCAAgC,OAAA;AAEhC,4IAAA,iCAAiC,OAAA;AAGjC,kIAAA,uBAAuB,OAAA;AAGvB,mIAAA,wBAAwB,OAAA;AACxB,oIAAA,yBAAyB,OAAA;AAEzB,iIAAA,sBAAsB,OAAA;AAGxB,mDAA8E;AAA5C,+GAAA,eAAe,OAAA;AACjD,mCAA+D;AAAtD,sGAAA,YAAY,OAAA;AAAE,+GAAA,qBAAqB,OAAA;AAC5C,6DAMiC;AAD/B,wHAAA,mBAAmB,OAAA","debugId":"81004e8b-2cfb-5f2a-8a3d-221e2558b3e8"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="fed4cbd3-2511-5ca8-bc02-414a289ed4b8")}catch(e){}}();
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.putFileToSignedUrl = void 0;
|
|
6
6
|
const fs_1 = require("fs");
|
|
7
|
+
const http_1 = require("http");
|
|
7
8
|
const https_1 = require("https");
|
|
8
9
|
const get_proxy_agent_1 = require("./get-proxy-agent");
|
|
9
10
|
const retry_transient_upload_errors_1 = require("./retry-transient-upload-errors");
|
|
@@ -22,7 +23,8 @@ const putFileToSignedUrl = async ({ filePath, signedUrl, size, contentType, }) =
|
|
|
22
23
|
return new Promise((resolve, reject) => {
|
|
23
24
|
// A new read stream is required on every attempt — streams cannot be replayed.
|
|
24
25
|
const fileStream = (0, fs_1.createReadStream)(filePath);
|
|
25
|
-
const
|
|
26
|
+
const requestFn = signedUrl.startsWith("https:") ? https_1.request : http_1.request;
|
|
27
|
+
const req = requestFn(signedUrl, {
|
|
26
28
|
agent: (0, get_proxy_agent_1.getProxyAgent)(),
|
|
27
29
|
method: "PUT",
|
|
28
30
|
headers: {
|
|
@@ -55,4 +57,4 @@ const putFileToSignedUrl = async ({ filePath, signedUrl, size, contentType, }) =
|
|
|
55
57
|
};
|
|
56
58
|
exports.putFileToSignedUrl = putFileToSignedUrl;
|
|
57
59
|
//# sourceMappingURL=put-file-to-signed-url.js.map
|
|
58
|
-
//# debugId=
|
|
60
|
+
//# debugId=fed4cbd3-2511-5ca8-bc02-414a289ed4b8
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"put-file-to-signed-url.js","sources":["../../src/utils/put-file-to-signed-url.ts"],"sourceRoot":"","names":[],"mappings":";;;;;AAAA,2BAAsC;
|
|
1
|
+
{"version":3,"file":"put-file-to-signed-url.js","sources":["../../src/utils/put-file-to-signed-url.ts"],"sourceRoot":"","names":[],"mappings":";;;;;AAAA,2BAAsC;AACtC,+BAA+D;AAC/D,iCAAgD;AAChD,uDAAkD;AAClD,mFAA8D;AAS9D;;;;;;;;;;GAUG;AACI,MAAM,kBAAkB,GAAG,KAAK,EAAE,EACvC,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,WAAW,GACe,EAAiB,EAAE;IAC7C,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAA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CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAhDW,QAAA,kBAAkB,sBAgD7B","debugId":"fed4cbd3-2511-5ca8-bc02-414a289ed4b8"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "2.
|
|
1
|
+
export declare const VERSION = "2.297.0";
|
package/dist/version.js
CHANGED
|
@@ -5,6 +5,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.VERSION = void 0;
|
|
6
6
|
// AUTO-GENERATED by scripts/generate-version.mjs — do not edit by hand.
|
|
7
7
|
// Regenerated from package.json on every build.
|
|
8
|
-
exports.VERSION = "2.
|
|
8
|
+
exports.VERSION = "2.297.0";
|
|
9
9
|
//# sourceMappingURL=version.js.map
|
|
10
10
|
//# debugId=ac10f4cc-7a38-5615-8b9d-956b50ad79da
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwaysmeticulous/client",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.297.0",
|
|
4
4
|
"description": "Helper methods for using the Meticulous backend API",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"loglevel": "^1.8.0",
|
|
13
13
|
"proxy-agent": "^6.4.0",
|
|
14
14
|
"undici": "^6.24.1",
|
|
15
|
-
"@alwaysmeticulous/api": "2.
|
|
15
|
+
"@alwaysmeticulous/api": "2.297.0",
|
|
16
16
|
"@alwaysmeticulous/common": "2.293.0"
|
|
17
17
|
},
|
|
18
18
|
"author": {
|