@wix/create-new 0.0.10 → 0.0.12
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/build/index.js +44 -13
- package/build/index.js.map +1 -1
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -6414,10 +6414,10 @@ var require_error2 = __commonJS({
|
|
|
6414
6414
|
}
|
|
6415
6415
|
};
|
|
6416
6416
|
exports.HttpError = HttpError;
|
|
6417
|
-
function
|
|
6417
|
+
function createHttpError2(...args) {
|
|
6418
6418
|
return new HttpError(...args);
|
|
6419
6419
|
}
|
|
6420
|
-
exports.createHttpError =
|
|
6420
|
+
exports.createHttpError = createHttpError2;
|
|
6421
6421
|
}
|
|
6422
6422
|
});
|
|
6423
6423
|
|
|
@@ -66732,6 +66732,28 @@ function getHttpErrorInfo(httpError) {
|
|
|
66732
66732
|
};
|
|
66733
66733
|
}
|
|
66734
66734
|
|
|
66735
|
+
// ../cli-http-client/src/fetch-error.ts
|
|
66736
|
+
init_esm_shims();
|
|
66737
|
+
var import_http_client4 = __toESM(require_index_node(), 1);
|
|
66738
|
+
async function createHttpErrorFromFetch(originalResponse) {
|
|
66739
|
+
const res = originalResponse.clone();
|
|
66740
|
+
return (0, import_http_client4.createHttpError)({
|
|
66741
|
+
name: "Error",
|
|
66742
|
+
message: `Request failed with status code ${res.status}`,
|
|
66743
|
+
response: {
|
|
66744
|
+
config: {},
|
|
66745
|
+
data: await res.text(),
|
|
66746
|
+
status: res.status,
|
|
66747
|
+
statusText: res.statusText,
|
|
66748
|
+
headers: Object.fromEntries(res.headers)
|
|
66749
|
+
},
|
|
66750
|
+
code: res.statusText,
|
|
66751
|
+
config: {},
|
|
66752
|
+
toJSON: () => res,
|
|
66753
|
+
__CANCEL__: false
|
|
66754
|
+
});
|
|
66755
|
+
}
|
|
66756
|
+
|
|
66735
66757
|
// ../cli-auth/src/client.ts
|
|
66736
66758
|
var import_variant4 = __toESM(require_lib(), 1);
|
|
66737
66759
|
|
|
@@ -81356,14 +81378,14 @@ var open_default = open;
|
|
|
81356
81378
|
|
|
81357
81379
|
// ../user-browser/src/open-testkit.ts
|
|
81358
81380
|
init_esm_shims();
|
|
81359
|
-
var
|
|
81381
|
+
var import_http_client5 = __toESM(require_index_node(), 1);
|
|
81360
81382
|
async function open2(testEndpoint, url2) {
|
|
81361
|
-
await (0,
|
|
81383
|
+
await (0, import_http_client5.createHttpClient)().post(testEndpoint, void 0, {
|
|
81362
81384
|
params: {
|
|
81363
81385
|
url: url2
|
|
81364
81386
|
}
|
|
81365
81387
|
}).catch((error) => {
|
|
81366
|
-
if (
|
|
81388
|
+
if (import_http_client5.HttpClient.isHttpError(error) && error.response?.data?.message) {
|
|
81367
81389
|
throw new Error(error.response.data.message);
|
|
81368
81390
|
}
|
|
81369
81391
|
throw error;
|
|
@@ -87602,7 +87624,7 @@ init_esm_shims();
|
|
|
87602
87624
|
init_esm_shims();
|
|
87603
87625
|
init_tslib_es6();
|
|
87604
87626
|
var import_wix_bi_logger_client = __toESM(require_dist());
|
|
87605
|
-
var
|
|
87627
|
+
var import_http_client6 = __toESM(require_index_node());
|
|
87606
87628
|
var defaultOptions2 = {
|
|
87607
87629
|
baseUrl: process.env.BI_BASE_URL || "https://frog.wix.com",
|
|
87608
87630
|
endpoint: "",
|
|
@@ -87632,7 +87654,7 @@ var StandaloneNodeLogger = (
|
|
|
87632
87654
|
endpoint = context2.endpoint || fullOptions.endpoint;
|
|
87633
87655
|
baseUrl = fullOptions.baseUrl, userAgent = fullOptions.userAgent, logError = fullOptions.logError;
|
|
87634
87656
|
headers = userAgent ? { headers: { "User-Agent": userAgent } } : {};
|
|
87635
|
-
return [4, new
|
|
87657
|
+
return [4, new import_http_client6.HttpClient({ baseURL: baseUrl }).get(endpoint, {
|
|
87636
87658
|
headers,
|
|
87637
87659
|
params: eventParams,
|
|
87638
87660
|
timeout: 30 * 1e3
|
|
@@ -97178,7 +97200,12 @@ var CreateAppProjectSchema = external_exports.object({
|
|
|
97178
97200
|
var CreateAppDeploymentSchema = external_exports.object({
|
|
97179
97201
|
staticFilesUploadUrls: external_exports.array(StaticFileUploadUrlSchema).optional(),
|
|
97180
97202
|
uploadAuthToken: external_exports.string().optional(),
|
|
97181
|
-
appDeployment: AppDeploymentSchema.optional()
|
|
97203
|
+
appDeployment: AppDeploymentSchema.optional(),
|
|
97204
|
+
uploadBuckets: external_exports.array(
|
|
97205
|
+
external_exports.object({
|
|
97206
|
+
hashes: external_exports.array(external_exports.string()).optional()
|
|
97207
|
+
})
|
|
97208
|
+
).optional()
|
|
97182
97209
|
});
|
|
97183
97210
|
var StaticFileUploadSchema = external_exports.object({
|
|
97184
97211
|
result: external_exports.object({
|
|
@@ -97291,7 +97318,8 @@ var BackendAsAServiceClient = class {
|
|
|
97291
97318
|
body: formData
|
|
97292
97319
|
});
|
|
97293
97320
|
if (!response.ok) {
|
|
97294
|
-
|
|
97321
|
+
const error = await createHttpErrorFromFetch(response);
|
|
97322
|
+
throw error;
|
|
97295
97323
|
}
|
|
97296
97324
|
return response.json();
|
|
97297
97325
|
},
|
|
@@ -97301,7 +97329,8 @@ var BackendAsAServiceClient = class {
|
|
|
97301
97329
|
} catch (e2) {
|
|
97302
97330
|
throw new CliError({
|
|
97303
97331
|
code: CliErrorCode.FailedToUploadStaticFiles(),
|
|
97304
|
-
cause: e2
|
|
97332
|
+
cause: e2,
|
|
97333
|
+
info: { endpointUrl }
|
|
97305
97334
|
});
|
|
97306
97335
|
}
|
|
97307
97336
|
};
|
|
@@ -97317,7 +97346,8 @@ var BackendAsAServiceClient = class {
|
|
|
97317
97346
|
body: fileContent
|
|
97318
97347
|
});
|
|
97319
97348
|
if (!response.ok) {
|
|
97320
|
-
|
|
97349
|
+
const error = await createHttpErrorFromFetch(response);
|
|
97350
|
+
throw error;
|
|
97321
97351
|
}
|
|
97322
97352
|
},
|
|
97323
97353
|
{ retries: 3 }
|
|
@@ -97325,7 +97355,8 @@ var BackendAsAServiceClient = class {
|
|
|
97325
97355
|
} catch (e2) {
|
|
97326
97356
|
throw new CliError({
|
|
97327
97357
|
code: CliErrorCode.FailedToUploadStaticFiles(),
|
|
97328
|
-
cause: e2
|
|
97358
|
+
cause: e2,
|
|
97359
|
+
info: { endpointUrl }
|
|
97329
97360
|
});
|
|
97330
97361
|
}
|
|
97331
97362
|
};
|
|
@@ -111993,7 +112024,7 @@ var getHeadlessCommand = ({
|
|
|
111993
112024
|
var package_default = {
|
|
111994
112025
|
name: "@wix/create-new",
|
|
111995
112026
|
description: "General entry point for creating Wix projects",
|
|
111996
|
-
version: "0.0.
|
|
112027
|
+
version: "0.0.12",
|
|
111997
112028
|
bin: "bin/index.cjs",
|
|
111998
112029
|
devDependencies: {
|
|
111999
112030
|
"@commander-js/extra-typings": "^13.0.0",
|