@@ -36146,6 +36146,49 @@ async function postDeploySuccess({ apiKey, serviceBase }, { branch, commitUrl, d
36146
36146
36147
36147
/***/ }),
36148
36148
36149
+ /***/ 8048:
36150
+ /***/ ((__unused_webpack_module, exports) => {
36151
+
36152
+ "use strict";
36153
+
36154
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
36155
+ exports.callGenerateSignedUrlForTempTeamStorage = callGenerateSignedUrlForTempTeamStorage;
36156
+ async function callGenerateSignedUrlForTempTeamStorage({ apiKey, serviceBase }, { destinationFilePath }, { fetch: localFetch }) {
36157
+ try {
36158
+ const response = await localFetch(new URL(`${serviceBase}/api/v0/team-storage-signed-url?file=${destinationFilePath}`), {
36159
+ headers: {
36160
+ Authorization: `Bearer ${apiKey}`,
36161
+ "Content-Type": "application/json",
36162
+ },
36163
+ method: "GET",
36164
+ });
36165
+ if (response.status === 200) {
36166
+ const json = (await response.json());
36167
+ return {
36168
+ fileLocation: json.fileLocation,
36169
+ playgroundFileLocation: json.playgroundFileLocation,
36170
+ signedUrl: json.signedUrl,
36171
+ success: true,
36172
+ };
36173
+ }
36174
+ else {
36175
+ const error = await response.text();
36176
+ console.log(`ERROR: ${error}`);
36177
+ return {
36178
+ success: false,
36179
+ };
36180
+ }
36181
+ }
36182
+ catch (e) {
36183
+ return {
36184
+ success: false,
36185
+ };
36186
+ }
36187
+ }
36188
+ //# sourceMappingURL=generate-signed-url-for-team-storage.js.map
36189
+
36190
+ /***/ }),
36191
+
36149
36192
/***/ 406:
36150
36193
/***/ ((__unused_webpack_module, exports) => {
36151
36194
@@ -36469,6 +36512,37 @@ async function attemptNotifyDeploy(deps, apiConfig, config) {
36469
36512
36470
36513
/***/ }),
36471
36514
36515
+ /***/ 5592:
36516
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
36517
+
36518
+ "use strict";
36519
+
36520
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
36521
+ exports.generateSignedUrlForTempTeamStorage = generateSignedUrlForTempTeamStorage;
36522
+ const generate_signed_url_for_team_storage_1 = __nccwpck_require__(8048);
36523
+ async function generateSignedUrlForTempTeamStorage(deps, apiConfig, config) {
36524
+ const { log } = deps;
36525
+ if (!config.destinationFilePath) {
36526
+ log.error(`🚫 destinationFilePath is a required config parameter`);
36527
+ return { success: false };
36528
+ }
36529
+ const responseState = await (0, generate_signed_url_for_team_storage_1.callGenerateSignedUrlForTempTeamStorage)(apiConfig, config, deps);
36530
+ if (!responseState.success) {
36531
+ log.error(`🚫 Failed to generate signed URL for team storage. Please contact support.`);
36532
+ return { success: false };
36533
+ }
36534
+ log.info(`✅ Generated Signed Upload URL: ${responseState.signedUrl}.`);
36535
+ return {
36536
+ fileLocation: responseState.fileLocation,
36537
+ playgroundFileLocation: responseState.playgroundFileLocation,
36538
+ success: true,
36539
+ uploadUrl: responseState.signedUrl,
36540
+ };
36541
+ }
36542
+ //# sourceMappingURL=generate-signed-url-for-team-storage.js.map
36543
+
36544
+ /***/ }),
36545
+
36472
36546
/***/ 9894:
36473
36547
/***/ ((__unused_webpack_module, exports) => {
36474
36548
@@ -37715,6 +37789,7 @@ const fetch_1 = __nccwpck_require__(3704);
37715
37789
const log_1 = __nccwpck_require__(4734);
37716
37790
const serviceBase_1 = __nccwpck_require__(1919);
37717
37791
const attempt_deploy_1 = __nccwpck_require__(289);
37792
+ const generate_signed_url_for_team_storage_1 = __nccwpck_require__(5592);
37718
37793
const index_1 = __nccwpck_require__(4500);
37719
37794
const poll_ci_greenlight_1 = __nccwpck_require__(9218);
37720
37795
const vcsBranchTesting_1 = __nccwpck_require__(2799);
@@ -37740,6 +37815,7 @@ We recommend 'undici' package for that purpose. See the Requirement section of o
37740
37815
*/
37741
37816
experimental_testPreview: index_1.testPreview.bind(null, deps, apiConfig),
37742
37817
experimental_vcsBranchTesting: (0, vcsBranchTesting_1.makeVCSBranchTestingSDK)(apiConfig, deps),
37818
+ generateSignedUrlForTempTeamStorage: generate_signed_url_for_team_storage_1.generateSignedUrlForTempTeamStorage.bind(null, deps, apiConfig),
37743
37819
pollCiGreenlightStatus: poll_ci_greenlight_1.pollCiGreenlightStatus.bind(null, deps, apiConfig),
37744
37820
};
37745
37821
}
0 commit comments