@wix/create-new 0.0.9 → 0.0.11
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 +66 -17
- 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;
|
|
@@ -86552,6 +86574,7 @@ var Platform;
|
|
|
86552
86574
|
Platform2["EditorSettings"] = "editor:settings";
|
|
86553
86575
|
Platform2["Mobile"] = "mobile";
|
|
86554
86576
|
Platform2["Standards"] = "standards";
|
|
86577
|
+
Platform2["DevPortal"] = "dev-portal";
|
|
86555
86578
|
})(Platform || (Platform = {}));
|
|
86556
86579
|
var ErrorSeverity;
|
|
86557
86580
|
(function(ErrorSeverity2) {
|
|
@@ -87601,7 +87624,7 @@ init_esm_shims();
|
|
|
87601
87624
|
init_esm_shims();
|
|
87602
87625
|
init_tslib_es6();
|
|
87603
87626
|
var import_wix_bi_logger_client = __toESM(require_dist());
|
|
87604
|
-
var
|
|
87627
|
+
var import_http_client6 = __toESM(require_index_node());
|
|
87605
87628
|
var defaultOptions2 = {
|
|
87606
87629
|
baseUrl: process.env.BI_BASE_URL || "https://frog.wix.com",
|
|
87607
87630
|
endpoint: "",
|
|
@@ -87631,7 +87654,7 @@ var StandaloneNodeLogger = (
|
|
|
87631
87654
|
endpoint = context2.endpoint || fullOptions.endpoint;
|
|
87632
87655
|
baseUrl = fullOptions.baseUrl, userAgent = fullOptions.userAgent, logError = fullOptions.logError;
|
|
87633
87656
|
headers = userAgent ? { headers: { "User-Agent": userAgent } } : {};
|
|
87634
|
-
return [4, new
|
|
87657
|
+
return [4, new import_http_client6.HttpClient({ baseURL: baseUrl }).get(endpoint, {
|
|
87635
87658
|
headers,
|
|
87636
87659
|
params: eventParams,
|
|
87637
87660
|
timeout: 30 * 1e3
|
|
@@ -90168,6 +90191,7 @@ var ComponentType;
|
|
|
90168
90191
|
ComponentType3["WIX_AI_GATEWAY_CALLBACK"] = "WIX_AI_GATEWAY_CALLBACK";
|
|
90169
90192
|
ComponentType3["URL_MAPPER_PROVIDER"] = "URL_MAPPER_PROVIDER";
|
|
90170
90193
|
ComponentType3["PROVIDER_SUPPRESSION_SERVICE_PLUGIN"] = "PROVIDER_SUPPRESSION_SERVICE_PLUGIN";
|
|
90194
|
+
ComponentType3["ECOM_FORMS"] = "ECOM_FORMS";
|
|
90171
90195
|
})(ComponentType || (ComponentType = {}));
|
|
90172
90196
|
var WidgetVertical;
|
|
90173
90197
|
(function(WidgetVertical3) {
|
|
@@ -90886,6 +90910,7 @@ var DecorationType;
|
|
|
90886
90910
|
DecorationType3["STRIKETHROUGH"] = "STRIKETHROUGH";
|
|
90887
90911
|
DecorationType3["SUPERSCRIPT"] = "SUPERSCRIPT";
|
|
90888
90912
|
DecorationType3["SUBSCRIPT"] = "SUBSCRIPT";
|
|
90913
|
+
DecorationType3["FONT_FAMILY"] = "FONT_FAMILY";
|
|
90889
90914
|
})(DecorationType || (DecorationType = {}));
|
|
90890
90915
|
var FontType;
|
|
90891
90916
|
(function(FontType3) {
|
|
@@ -90989,6 +91014,7 @@ var TestEnum;
|
|
|
90989
91014
|
(function(TestEnum3) {
|
|
90990
91015
|
TestEnum3["UNKNOWN_TEST_ENUM"] = "UNKNOWN_TEST_ENUM";
|
|
90991
91016
|
TestEnum3["FIRST_TEST"] = "FIRST_TEST";
|
|
91017
|
+
TestEnum3["SECOND_TEST"] = "SECOND_TEST";
|
|
90992
91018
|
})(TestEnum || (TestEnum = {}));
|
|
90993
91019
|
var CalendarType;
|
|
90994
91020
|
(function(CalendarType3) {
|
|
@@ -92461,9 +92487,12 @@ var TimeConstraintType;
|
|
|
92461
92487
|
TimeConstraintType3["LAST_DAYS"] = "LAST_DAYS";
|
|
92462
92488
|
TimeConstraintType3["NEXT_DAYS"] = "NEXT_DAYS";
|
|
92463
92489
|
TimeConstraintType3["BETWEEN"] = "BETWEEN";
|
|
92490
|
+
TimeConstraintType3["TODAY"] = "TODAY";
|
|
92464
92491
|
TimeConstraintType3["THIS_MONTH"] = "THIS_MONTH";
|
|
92465
92492
|
TimeConstraintType3["ON_OR_AFTER"] = "ON_OR_AFTER";
|
|
92466
92493
|
TimeConstraintType3["ON_OR_BEFORE"] = "ON_OR_BEFORE";
|
|
92494
|
+
TimeConstraintType3["LAST_MONTHS"] = "LAST_MONTHS";
|
|
92495
|
+
TimeConstraintType3["NEXT_MONTHS"] = "NEXT_MONTHS";
|
|
92467
92496
|
})(TimeConstraintType || (TimeConstraintType = {}));
|
|
92468
92497
|
var ValueConstraintType;
|
|
92469
92498
|
(function(ValueConstraintType3) {
|
|
@@ -92508,6 +92537,7 @@ var AssetType;
|
|
|
92508
92537
|
AssetType3["RICOS"] = "RICOS";
|
|
92509
92538
|
AssetType3["DOC"] = "DOC";
|
|
92510
92539
|
AssetType3["SLIDE"] = "SLIDE";
|
|
92540
|
+
AssetType3["WIDGET"] = "WIDGET";
|
|
92511
92541
|
})(AssetType || (AssetType = {}));
|
|
92512
92542
|
var SaleType;
|
|
92513
92543
|
(function(SaleType2) {
|
|
@@ -92952,6 +92982,7 @@ var ComponentType2;
|
|
|
92952
92982
|
ComponentType3["WIX_AI_GATEWAY_CALLBACK"] = "WIX_AI_GATEWAY_CALLBACK";
|
|
92953
92983
|
ComponentType3["URL_MAPPER_PROVIDER"] = "URL_MAPPER_PROVIDER";
|
|
92954
92984
|
ComponentType3["PROVIDER_SUPPRESSION_SERVICE_PLUGIN"] = "PROVIDER_SUPPRESSION_SERVICE_PLUGIN";
|
|
92985
|
+
ComponentType3["ECOM_FORMS"] = "ECOM_FORMS";
|
|
92955
92986
|
})(ComponentType2 || (ComponentType2 = {}));
|
|
92956
92987
|
var WidgetVertical2;
|
|
92957
92988
|
(function(WidgetVertical3) {
|
|
@@ -93670,6 +93701,7 @@ var DecorationType2;
|
|
|
93670
93701
|
DecorationType3["STRIKETHROUGH"] = "STRIKETHROUGH";
|
|
93671
93702
|
DecorationType3["SUPERSCRIPT"] = "SUPERSCRIPT";
|
|
93672
93703
|
DecorationType3["SUBSCRIPT"] = "SUBSCRIPT";
|
|
93704
|
+
DecorationType3["FONT_FAMILY"] = "FONT_FAMILY";
|
|
93673
93705
|
})(DecorationType2 || (DecorationType2 = {}));
|
|
93674
93706
|
var FontType2;
|
|
93675
93707
|
(function(FontType3) {
|
|
@@ -93773,6 +93805,7 @@ var TestEnum2;
|
|
|
93773
93805
|
(function(TestEnum3) {
|
|
93774
93806
|
TestEnum3["UNKNOWN_TEST_ENUM"] = "UNKNOWN_TEST_ENUM";
|
|
93775
93807
|
TestEnum3["FIRST_TEST"] = "FIRST_TEST";
|
|
93808
|
+
TestEnum3["SECOND_TEST"] = "SECOND_TEST";
|
|
93776
93809
|
})(TestEnum2 || (TestEnum2 = {}));
|
|
93777
93810
|
var CalendarType2;
|
|
93778
93811
|
(function(CalendarType3) {
|
|
@@ -95245,9 +95278,12 @@ var TimeConstraintType2;
|
|
|
95245
95278
|
TimeConstraintType3["LAST_DAYS"] = "LAST_DAYS";
|
|
95246
95279
|
TimeConstraintType3["NEXT_DAYS"] = "NEXT_DAYS";
|
|
95247
95280
|
TimeConstraintType3["BETWEEN"] = "BETWEEN";
|
|
95281
|
+
TimeConstraintType3["TODAY"] = "TODAY";
|
|
95248
95282
|
TimeConstraintType3["THIS_MONTH"] = "THIS_MONTH";
|
|
95249
95283
|
TimeConstraintType3["ON_OR_AFTER"] = "ON_OR_AFTER";
|
|
95250
95284
|
TimeConstraintType3["ON_OR_BEFORE"] = "ON_OR_BEFORE";
|
|
95285
|
+
TimeConstraintType3["LAST_MONTHS"] = "LAST_MONTHS";
|
|
95286
|
+
TimeConstraintType3["NEXT_MONTHS"] = "NEXT_MONTHS";
|
|
95251
95287
|
})(TimeConstraintType2 || (TimeConstraintType2 = {}));
|
|
95252
95288
|
var ValueConstraintType2;
|
|
95253
95289
|
(function(ValueConstraintType3) {
|
|
@@ -95292,6 +95328,7 @@ var AssetType2;
|
|
|
95292
95328
|
AssetType3["RICOS"] = "RICOS";
|
|
95293
95329
|
AssetType3["DOC"] = "DOC";
|
|
95294
95330
|
AssetType3["SLIDE"] = "SLIDE";
|
|
95331
|
+
AssetType3["WIDGET"] = "WIDGET";
|
|
95295
95332
|
})(AssetType2 || (AssetType2 = {}));
|
|
95296
95333
|
var OpenConsentIn2;
|
|
95297
95334
|
(function(OpenConsentIn3) {
|
|
@@ -97276,7 +97313,8 @@ var BackendAsAServiceClient = class {
|
|
|
97276
97313
|
body: formData
|
|
97277
97314
|
});
|
|
97278
97315
|
if (!response.ok) {
|
|
97279
|
-
|
|
97316
|
+
const error = await createHttpErrorFromFetch(response);
|
|
97317
|
+
throw error;
|
|
97280
97318
|
}
|
|
97281
97319
|
return response.json();
|
|
97282
97320
|
},
|
|
@@ -97286,7 +97324,8 @@ var BackendAsAServiceClient = class {
|
|
|
97286
97324
|
} catch (e2) {
|
|
97287
97325
|
throw new CliError({
|
|
97288
97326
|
code: CliErrorCode.FailedToUploadStaticFiles(),
|
|
97289
|
-
cause: e2
|
|
97327
|
+
cause: e2,
|
|
97328
|
+
info: { endpointUrl }
|
|
97290
97329
|
});
|
|
97291
97330
|
}
|
|
97292
97331
|
};
|
|
@@ -97302,7 +97341,8 @@ var BackendAsAServiceClient = class {
|
|
|
97302
97341
|
body: fileContent
|
|
97303
97342
|
});
|
|
97304
97343
|
if (!response.ok) {
|
|
97305
|
-
|
|
97344
|
+
const error = await createHttpErrorFromFetch(response);
|
|
97345
|
+
throw error;
|
|
97306
97346
|
}
|
|
97307
97347
|
},
|
|
97308
97348
|
{ retries: 3 }
|
|
@@ -97310,7 +97350,8 @@ var BackendAsAServiceClient = class {
|
|
|
97310
97350
|
} catch (e2) {
|
|
97311
97351
|
throw new CliError({
|
|
97312
97352
|
code: CliErrorCode.FailedToUploadStaticFiles(),
|
|
97313
|
-
cause: e2
|
|
97353
|
+
cause: e2,
|
|
97354
|
+
info: { endpointUrl }
|
|
97314
97355
|
});
|
|
97315
97356
|
}
|
|
97316
97357
|
};
|
|
@@ -100298,16 +100339,17 @@ init_esm_shims();
|
|
|
100298
100339
|
import { resolve as resolve5, join as join14 } from "node:path";
|
|
100299
100340
|
import { copyFile as copyFile2, mkdir as mkdir2 } from "node:fs/promises";
|
|
100300
100341
|
async function assetsGenerator(opts) {
|
|
100301
|
-
const { templateRoot, projectFolder, outputPath } = opts;
|
|
100342
|
+
const { templateRoot, projectFolder, outputPath, assetsPrefix } = opts;
|
|
100302
100343
|
const assets = join14(templateRoot, "assets");
|
|
100303
100344
|
if (await pathExists(assets)) {
|
|
100304
|
-
const publicDir = join14(projectFolder,
|
|
100345
|
+
const publicDir = join14(projectFolder, outputPath ?? "");
|
|
100305
100346
|
const publicFiles = await getFiles(assets);
|
|
100306
100347
|
await mkdir2(publicDir, { recursive: true });
|
|
100307
100348
|
await Promise.all(
|
|
100308
100349
|
publicFiles.map(async (file) => {
|
|
100350
|
+
const outputName = assetsPrefix ? `${assetsPrefix}-${file}` : file;
|
|
100309
100351
|
const from = resolve5(assets, file);
|
|
100310
|
-
const to = resolve5(publicDir,
|
|
100352
|
+
const to = resolve5(publicDir, outputName);
|
|
100311
100353
|
await copyFile2(from, to);
|
|
100312
100354
|
})
|
|
100313
100355
|
);
|
|
@@ -100316,7 +100358,13 @@ async function assetsGenerator(opts) {
|
|
|
100316
100358
|
|
|
100317
100359
|
// ../gena/src/component-generator.ts
|
|
100318
100360
|
async function componentGenerator(opts) {
|
|
100319
|
-
const {
|
|
100361
|
+
const {
|
|
100362
|
+
template,
|
|
100363
|
+
projectFolder,
|
|
100364
|
+
assetsOutputPath,
|
|
100365
|
+
assetsPrefix,
|
|
100366
|
+
...generatorOpts
|
|
100367
|
+
} = opts;
|
|
100320
100368
|
const newFiles = await generator({
|
|
100321
100369
|
...generatorOpts,
|
|
100322
100370
|
template: join15(template, "files")
|
|
@@ -100324,7 +100372,8 @@ async function componentGenerator(opts) {
|
|
|
100324
100372
|
await assetsGenerator({
|
|
100325
100373
|
templateRoot: template,
|
|
100326
100374
|
projectFolder,
|
|
100327
|
-
outputPath: assetsOutputPath
|
|
100375
|
+
outputPath: assetsOutputPath,
|
|
100376
|
+
assetsPrefix
|
|
100328
100377
|
});
|
|
100329
100378
|
const newDependencies = await dependenciesUpdater({
|
|
100330
100379
|
projectFolder,
|
|
@@ -111970,7 +112019,7 @@ var getHeadlessCommand = ({
|
|
|
111970
112019
|
var package_default = {
|
|
111971
112020
|
name: "@wix/create-new",
|
|
111972
112021
|
description: "General entry point for creating Wix projects",
|
|
111973
|
-
version: "0.0.
|
|
112022
|
+
version: "0.0.11",
|
|
111974
112023
|
bin: "bin/index.cjs",
|
|
111975
112024
|
devDependencies: {
|
|
111976
112025
|
"@commander-js/extra-typings": "^13.0.0",
|