@wix/create-new 0.0.87 → 0.0.89

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 CHANGED
@@ -63499,6 +63499,7 @@ function buildVerificationUris(verificationUri) {
63499
63499
  coloredUri.searchParams.set("studio", "true");
63500
63500
  const signupUri = new URL("https://users.wix.com/login/signup/password");
63501
63501
  signupUri.searchParams.set("redirectTo", coloredUri.href);
63502
+ signupUri.searchParams.set("referralInfo", "cli");
63502
63503
  return {
63503
63504
  coloredVerificationUri: coloredUri.toString(),
63504
63505
  signupUri: signupUri.toString()
@@ -70872,6 +70873,8 @@ function reportCommandStartEvent({
70872
70873
  flow,
70873
70874
  cliVersion,
70874
70875
  projectId,
70876
+ msid,
70877
+ appId,
70875
70878
  extensions,
70876
70879
  extraFields
70877
70880
  }) {
@@ -70895,16 +70898,22 @@ function reportCommandStartEvent({
70895
70898
  ...commandFields,
70896
70899
  ...projectId ? { projectId } : {},
70897
70900
  ...extraFields ? { extraFields: JSON.stringify(extraFields) } : {},
70901
+ ...msid ? { _msid: msid } : {},
70902
+ ...appId ? { _appId: appId } : {},
70898
70903
  isValid: true
70899
70904
  })
70900
70905
  );
70901
70906
  return {
70902
- succeed() {
70907
+ succeed(fields12) {
70908
+ const _msid = fields12?.msid ?? msid;
70909
+ const _appId = fields12?.appId ?? appId;
70903
70910
  void biLogger.report(
70904
70911
  wixCliCliCommandStatus({
70905
70912
  ...commandFields,
70906
70913
  ...extensions ? { extensions: JSON.stringify(extensions) } : {},
70907
70914
  duration: getDuration(),
70915
+ ..._msid ? { _msid } : {},
70916
+ ..._appId ? { _appId } : {},
70908
70917
  isSuccess: true,
70909
70918
  isValid: true
70910
70919
  })
@@ -94124,7 +94133,7 @@ var import_startCase = __toESM(require_startCase(), 1);
94124
94133
  init_esm_shims();
94125
94134
  var import_react157 = __toESM(require_react(), 1);
94126
94135
  var import_variant61 = __toESM(require_lib(), 1);
94127
- var WriteConfig = ({ businessId, projectData, targetParentFolder: targetParentFolder2 }) => {
94136
+ var WriteConfig = ({ businessId, projectData, targetParentFolder: targetParentFolder2, onDone }) => {
94128
94137
  const { status } = useAsync2(async () => {
94129
94138
  await writeJson(
94130
94139
  getWixConfigFilePath(targetParentFolder2),
@@ -94138,6 +94147,7 @@ var WriteConfig = ({ businessId, projectData, targetParentFolder: targetParentFo
94138
94147
  },
94139
94148
  { spaces: 2 }
94140
94149
  );
94150
+ onDone();
94141
94151
  }, []);
94142
94152
  return /* @__PURE__ */ import_react157.default.createElement(import_react157.default.Fragment, null, (0, import_variant61.match)(status, {
94143
94153
  Error: () => null,
@@ -94149,7 +94159,7 @@ var WriteConfig = ({ businessId, projectData, targetParentFolder: targetParentFo
94149
94159
 
94150
94160
  // ../create-new-packages/headless-command/src/components/InitHeadlessSiteCommand.tsx
94151
94161
  var BLANK_PROJECT_TEMPLATE_ID2 = "212b41cb-0da6-4401-9c72-7c579e6477a2";
94152
- var InitHeadlessSiteCommand = ({ targetParentFolder: targetParentFolder2 }) => {
94162
+ var InitHeadlessSiteCommand = ({ targetParentFolder: targetParentFolder2, onComplete }) => {
94153
94163
  const [businessId, setBusinessId] = (0, import_react158.useState)();
94154
94164
  const [projectData, setProjectData] = (0, import_react158.useState)();
94155
94165
  const { status } = useAsync2(async () => {
@@ -94208,7 +94218,11 @@ var InitHeadlessSiteCommand = ({ targetParentFolder: targetParentFolder2 }) => {
94208
94218
  {
94209
94219
  businessId,
94210
94220
  projectData,
94211
- targetParentFolder: targetParentFolder2
94221
+ targetParentFolder: targetParentFolder2,
94222
+ onDone: () => onComplete({
94223
+ msid: businessId,
94224
+ appId: projectData.projectId
94225
+ })
94212
94226
  }
94213
94227
  )
94214
94228
  )
@@ -94244,17 +94258,21 @@ var getHeadlessInitCommand = ({
94244
94258
  const commandStatus = reportCommandStartEvent2(command);
94245
94259
  const transaction = createCommandTransaction(panorama2, command);
94246
94260
  try {
94261
+ let createdProject;
94247
94262
  transaction.start();
94248
94263
  await render2(
94249
94264
  /* @__PURE__ */ import_react159.default.createElement(BiProvider, { value: biLogger }, /* @__PURE__ */ import_react159.default.createElement(ErrorReporterProvider, { value: errorReporter2 }, /* @__PURE__ */ import_react159.default.createElement(PanoramaProvider, { value: panorama2 }, /* @__PURE__ */ import_react159.default.createElement(LoginModeProvider, { value: loginMode2 }, /* @__PURE__ */ import_react159.default.createElement(
94250
94265
  InitHeadlessSiteCommand,
94251
94266
  {
94252
- targetParentFolder: targetParentFolder2
94267
+ targetParentFolder: targetParentFolder2,
94268
+ onComplete: (result) => {
94269
+ createdProject = result;
94270
+ }
94253
94271
  }
94254
94272
  )))))
94255
94273
  );
94256
94274
  transaction.finish();
94257
- commandStatus.succeed();
94275
+ commandStatus.succeed(createdProject);
94258
94276
  } catch (e2) {
94259
94277
  commandStatus.failed(e2);
94260
94278
  throw e2;
@@ -94419,7 +94437,7 @@ import { randomUUID as randomUUID3 } from "node:crypto";
94419
94437
  var package_default = {
94420
94438
  name: "@wix/create-new",
94421
94439
  description: "General entry point for creating Wix projects",
94422
- version: "0.0.87",
94440
+ version: "0.0.89",
94423
94441
  bin: "bin/index.cjs",
94424
94442
  devDependencies: {
94425
94443
  "@commander-js/extra-typings": "^13.0.0",