@wix/create-headless-site 0.0.29 → 0.0.31
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 +45 -19
- package/build/index.js.map +1 -1
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -89164,6 +89164,7 @@ var Platform;
|
|
|
89164
89164
|
Platform2["EditorSettings"] = "editor:settings";
|
|
89165
89165
|
Platform2["Mobile"] = "mobile";
|
|
89166
89166
|
Platform2["Standards"] = "standards";
|
|
89167
|
+
Platform2["DevPortal"] = "dev-portal";
|
|
89167
89168
|
})(Platform || (Platform = {}));
|
|
89168
89169
|
var ErrorSeverity;
|
|
89169
89170
|
(function(ErrorSeverity2) {
|
|
@@ -90353,7 +90354,7 @@ function wixCliCliError(params) {
|
|
|
90353
90354
|
var package_default = {
|
|
90354
90355
|
name: "@wix/create-headless-site",
|
|
90355
90356
|
description: "Headless site creation wizard",
|
|
90356
|
-
version: "0.0.
|
|
90357
|
+
version: "0.0.31",
|
|
90357
90358
|
bin: "bin/index.cjs",
|
|
90358
90359
|
devDependencies: {
|
|
90359
90360
|
"@commander-js/extra-typings": "^13.0.0",
|
|
@@ -92163,20 +92164,23 @@ async function gitCommit(cwd3) {
|
|
|
92163
92164
|
{ cwd: cwd3 }
|
|
92164
92165
|
);
|
|
92165
92166
|
}
|
|
92166
|
-
async function gitClone(url2, path8) {
|
|
92167
|
-
await runCommand(
|
|
92168
|
-
|
|
92169
|
-
|
|
92170
|
-
|
|
92171
|
-
|
|
92172
|
-
|
|
92173
|
-
|
|
92174
|
-
|
|
92175
|
-
|
|
92176
|
-
|
|
92177
|
-
|
|
92167
|
+
async function gitClone(url2, path8, branch) {
|
|
92168
|
+
await runCommand(
|
|
92169
|
+
`git clone --depth 1 ${branch ? `-b ${branch}` : ""} ${url2} ${path8}`,
|
|
92170
|
+
{
|
|
92171
|
+
env: {
|
|
92172
|
+
/*
|
|
92173
|
+
* This is to prevent git from prompting for credentials.
|
|
92174
|
+
* `git clone` uses a subprocess for the authentication, so we can't attach the main process to its stdio.
|
|
92175
|
+
* This leads to:
|
|
92176
|
+
* - the spinners "swallow" its output.
|
|
92177
|
+
* - after answering with the username and pressing "Enter", the first line of the output is being duplicated.
|
|
92178
|
+
* That's why we're disabling the prompt, so user should be pre-authenticated.
|
|
92179
|
+
*/
|
|
92180
|
+
GIT_TERMINAL_PROMPT: "0"
|
|
92181
|
+
}
|
|
92178
92182
|
}
|
|
92179
|
-
|
|
92183
|
+
);
|
|
92180
92184
|
}
|
|
92181
92185
|
|
|
92182
92186
|
// ../package-manager/src/repo-type.ts
|
|
@@ -95513,6 +95517,7 @@ var ComponentType;
|
|
|
95513
95517
|
ComponentType3["WIX_AI_GATEWAY_CALLBACK"] = "WIX_AI_GATEWAY_CALLBACK";
|
|
95514
95518
|
ComponentType3["URL_MAPPER_PROVIDER"] = "URL_MAPPER_PROVIDER";
|
|
95515
95519
|
ComponentType3["PROVIDER_SUPPRESSION_SERVICE_PLUGIN"] = "PROVIDER_SUPPRESSION_SERVICE_PLUGIN";
|
|
95520
|
+
ComponentType3["ECOM_FORMS"] = "ECOM_FORMS";
|
|
95516
95521
|
})(ComponentType || (ComponentType = {}));
|
|
95517
95522
|
var WidgetVertical;
|
|
95518
95523
|
(function(WidgetVertical3) {
|
|
@@ -96231,6 +96236,7 @@ var DecorationType;
|
|
|
96231
96236
|
DecorationType3["STRIKETHROUGH"] = "STRIKETHROUGH";
|
|
96232
96237
|
DecorationType3["SUPERSCRIPT"] = "SUPERSCRIPT";
|
|
96233
96238
|
DecorationType3["SUBSCRIPT"] = "SUBSCRIPT";
|
|
96239
|
+
DecorationType3["FONT_FAMILY"] = "FONT_FAMILY";
|
|
96234
96240
|
})(DecorationType || (DecorationType = {}));
|
|
96235
96241
|
var FontType;
|
|
96236
96242
|
(function(FontType3) {
|
|
@@ -96334,6 +96340,7 @@ var TestEnum;
|
|
|
96334
96340
|
(function(TestEnum3) {
|
|
96335
96341
|
TestEnum3["UNKNOWN_TEST_ENUM"] = "UNKNOWN_TEST_ENUM";
|
|
96336
96342
|
TestEnum3["FIRST_TEST"] = "FIRST_TEST";
|
|
96343
|
+
TestEnum3["SECOND_TEST"] = "SECOND_TEST";
|
|
96337
96344
|
})(TestEnum || (TestEnum = {}));
|
|
96338
96345
|
var CalendarType;
|
|
96339
96346
|
(function(CalendarType3) {
|
|
@@ -97806,9 +97813,12 @@ var TimeConstraintType;
|
|
|
97806
97813
|
TimeConstraintType3["LAST_DAYS"] = "LAST_DAYS";
|
|
97807
97814
|
TimeConstraintType3["NEXT_DAYS"] = "NEXT_DAYS";
|
|
97808
97815
|
TimeConstraintType3["BETWEEN"] = "BETWEEN";
|
|
97816
|
+
TimeConstraintType3["TODAY"] = "TODAY";
|
|
97809
97817
|
TimeConstraintType3["THIS_MONTH"] = "THIS_MONTH";
|
|
97810
97818
|
TimeConstraintType3["ON_OR_AFTER"] = "ON_OR_AFTER";
|
|
97811
97819
|
TimeConstraintType3["ON_OR_BEFORE"] = "ON_OR_BEFORE";
|
|
97820
|
+
TimeConstraintType3["LAST_MONTHS"] = "LAST_MONTHS";
|
|
97821
|
+
TimeConstraintType3["NEXT_MONTHS"] = "NEXT_MONTHS";
|
|
97812
97822
|
})(TimeConstraintType || (TimeConstraintType = {}));
|
|
97813
97823
|
var ValueConstraintType;
|
|
97814
97824
|
(function(ValueConstraintType3) {
|
|
@@ -97853,6 +97863,7 @@ var AssetType;
|
|
|
97853
97863
|
AssetType3["RICOS"] = "RICOS";
|
|
97854
97864
|
AssetType3["DOC"] = "DOC";
|
|
97855
97865
|
AssetType3["SLIDE"] = "SLIDE";
|
|
97866
|
+
AssetType3["WIDGET"] = "WIDGET";
|
|
97856
97867
|
})(AssetType || (AssetType = {}));
|
|
97857
97868
|
var SaleType;
|
|
97858
97869
|
(function(SaleType2) {
|
|
@@ -98297,6 +98308,7 @@ var ComponentType2;
|
|
|
98297
98308
|
ComponentType3["WIX_AI_GATEWAY_CALLBACK"] = "WIX_AI_GATEWAY_CALLBACK";
|
|
98298
98309
|
ComponentType3["URL_MAPPER_PROVIDER"] = "URL_MAPPER_PROVIDER";
|
|
98299
98310
|
ComponentType3["PROVIDER_SUPPRESSION_SERVICE_PLUGIN"] = "PROVIDER_SUPPRESSION_SERVICE_PLUGIN";
|
|
98311
|
+
ComponentType3["ECOM_FORMS"] = "ECOM_FORMS";
|
|
98300
98312
|
})(ComponentType2 || (ComponentType2 = {}));
|
|
98301
98313
|
var WidgetVertical2;
|
|
98302
98314
|
(function(WidgetVertical3) {
|
|
@@ -99015,6 +99027,7 @@ var DecorationType2;
|
|
|
99015
99027
|
DecorationType3["STRIKETHROUGH"] = "STRIKETHROUGH";
|
|
99016
99028
|
DecorationType3["SUPERSCRIPT"] = "SUPERSCRIPT";
|
|
99017
99029
|
DecorationType3["SUBSCRIPT"] = "SUBSCRIPT";
|
|
99030
|
+
DecorationType3["FONT_FAMILY"] = "FONT_FAMILY";
|
|
99018
99031
|
})(DecorationType2 || (DecorationType2 = {}));
|
|
99019
99032
|
var FontType2;
|
|
99020
99033
|
(function(FontType3) {
|
|
@@ -99118,6 +99131,7 @@ var TestEnum2;
|
|
|
99118
99131
|
(function(TestEnum3) {
|
|
99119
99132
|
TestEnum3["UNKNOWN_TEST_ENUM"] = "UNKNOWN_TEST_ENUM";
|
|
99120
99133
|
TestEnum3["FIRST_TEST"] = "FIRST_TEST";
|
|
99134
|
+
TestEnum3["SECOND_TEST"] = "SECOND_TEST";
|
|
99121
99135
|
})(TestEnum2 || (TestEnum2 = {}));
|
|
99122
99136
|
var CalendarType2;
|
|
99123
99137
|
(function(CalendarType3) {
|
|
@@ -100590,9 +100604,12 @@ var TimeConstraintType2;
|
|
|
100590
100604
|
TimeConstraintType3["LAST_DAYS"] = "LAST_DAYS";
|
|
100591
100605
|
TimeConstraintType3["NEXT_DAYS"] = "NEXT_DAYS";
|
|
100592
100606
|
TimeConstraintType3["BETWEEN"] = "BETWEEN";
|
|
100607
|
+
TimeConstraintType3["TODAY"] = "TODAY";
|
|
100593
100608
|
TimeConstraintType3["THIS_MONTH"] = "THIS_MONTH";
|
|
100594
100609
|
TimeConstraintType3["ON_OR_AFTER"] = "ON_OR_AFTER";
|
|
100595
100610
|
TimeConstraintType3["ON_OR_BEFORE"] = "ON_OR_BEFORE";
|
|
100611
|
+
TimeConstraintType3["LAST_MONTHS"] = "LAST_MONTHS";
|
|
100612
|
+
TimeConstraintType3["NEXT_MONTHS"] = "NEXT_MONTHS";
|
|
100596
100613
|
})(TimeConstraintType2 || (TimeConstraintType2 = {}));
|
|
100597
100614
|
var ValueConstraintType2;
|
|
100598
100615
|
(function(ValueConstraintType3) {
|
|
@@ -100637,6 +100654,7 @@ var AssetType2;
|
|
|
100637
100654
|
AssetType3["RICOS"] = "RICOS";
|
|
100638
100655
|
AssetType3["DOC"] = "DOC";
|
|
100639
100656
|
AssetType3["SLIDE"] = "SLIDE";
|
|
100657
|
+
AssetType3["WIDGET"] = "WIDGET";
|
|
100640
100658
|
})(AssetType2 || (AssetType2 = {}));
|
|
100641
100659
|
var OpenConsentIn2;
|
|
100642
100660
|
(function(OpenConsentIn3) {
|
|
@@ -111541,16 +111559,17 @@ init_esm_shims();
|
|
|
111541
111559
|
import { resolve as resolve4, join as join13 } from "node:path";
|
|
111542
111560
|
import { copyFile as copyFile2, mkdir as mkdir2 } from "node:fs/promises";
|
|
111543
111561
|
async function assetsGenerator(opts) {
|
|
111544
|
-
const { templateRoot, projectFolder, outputPath } = opts;
|
|
111562
|
+
const { templateRoot, projectFolder, outputPath, assetsPrefix } = opts;
|
|
111545
111563
|
const assets = join13(templateRoot, "assets");
|
|
111546
111564
|
if (await pathExists(assets)) {
|
|
111547
|
-
const publicDir = join13(projectFolder,
|
|
111565
|
+
const publicDir = join13(projectFolder, outputPath ?? "");
|
|
111548
111566
|
const publicFiles = await getFiles(assets);
|
|
111549
111567
|
await mkdir2(publicDir, { recursive: true });
|
|
111550
111568
|
await Promise.all(
|
|
111551
111569
|
publicFiles.map(async (file) => {
|
|
111570
|
+
const outputName = assetsPrefix ? `${assetsPrefix}-${file}` : file;
|
|
111552
111571
|
const from = resolve4(assets, file);
|
|
111553
|
-
const to = resolve4(publicDir,
|
|
111572
|
+
const to = resolve4(publicDir, outputName);
|
|
111554
111573
|
await copyFile2(from, to);
|
|
111555
111574
|
})
|
|
111556
111575
|
);
|
|
@@ -111559,7 +111578,13 @@ async function assetsGenerator(opts) {
|
|
|
111559
111578
|
|
|
111560
111579
|
// ../gena/src/component-generator.ts
|
|
111561
111580
|
async function componentGenerator(opts) {
|
|
111562
|
-
const {
|
|
111581
|
+
const {
|
|
111582
|
+
template,
|
|
111583
|
+
projectFolder,
|
|
111584
|
+
assetsOutputPath,
|
|
111585
|
+
assetsPrefix,
|
|
111586
|
+
...generatorOpts
|
|
111587
|
+
} = opts;
|
|
111563
111588
|
const newFiles = await generator({
|
|
111564
111589
|
...generatorOpts,
|
|
111565
111590
|
template: join14(template, "files")
|
|
@@ -111567,7 +111592,8 @@ async function componentGenerator(opts) {
|
|
|
111567
111592
|
await assetsGenerator({
|
|
111568
111593
|
templateRoot: template,
|
|
111569
111594
|
projectFolder,
|
|
111570
|
-
outputPath: assetsOutputPath
|
|
111595
|
+
outputPath: assetsOutputPath,
|
|
111596
|
+
assetsPrefix
|
|
111571
111597
|
});
|
|
111572
111598
|
const newDependencies = await dependenciesUpdater({
|
|
111573
111599
|
projectFolder,
|