@algolia/wizard 0.26.0 → 0.27.0

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.
Files changed (2) hide show
  1. package/dist/main.js +24 -3
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -5,6 +5,7 @@ import { render } from "ink";
5
5
 
6
6
  // src/ui/App.tsx
7
7
  import { Box as Box17, Text as Text17, useApp, useInput as useInput7, useWindowSize as useWindowSize8 } from "ink";
8
+ import Spinner2 from "ink-spinner";
8
9
 
9
10
  // src/core/store.ts
10
11
  import { create } from "zustand";
@@ -1779,7 +1780,7 @@ function track(event, payload) {
1779
1780
  // src/ui/App.tsx
1780
1781
  import { jsx as jsx15, jsxs as jsxs16 } from "react/jsx-runtime";
1781
1782
  function App() {
1782
- const { phase, error, homeScreen, currentStepIndex, steps, inputReq } = useWizard();
1783
+ const { phase, error, homeScreen, currentStepIndex, steps, inputReq, user } = useWizard();
1783
1784
  const { exit } = useApp();
1784
1785
  const { columns, rows } = useWindowSize8();
1785
1786
  const [showLogs, setShowLogs] = useState7(false);
@@ -1850,8 +1851,19 @@ function App() {
1850
1851
  width: showSidebar ? 70 : "100%",
1851
1852
  flexGrow: 1,
1852
1853
  children: [
1854
+ phase === "preflight" && !user && /* @__PURE__ */ jsx15(Box17, { flexDirection: "column", marginBottom: 1, children: /* @__PURE__ */ jsxs16(Text17, { color: COLORS.strong, bold: true, children: [
1855
+ /* @__PURE__ */ jsx15(Spinner2, { type: "dots" }),
1856
+ " Signing in to Algolia"
1857
+ ] }) }),
1858
+ phase === "preflight" && user && /* @__PURE__ */ jsx15(Box17, { flexDirection: "column", marginBottom: 1, children: /* @__PURE__ */ jsxs16(Text17, { color: COLORS.strong, bold: true, children: [
1859
+ /* @__PURE__ */ jsx15(Spinner2, { type: "dots" }),
1860
+ " Getting things ready"
1861
+ ] }) }),
1853
1862
  phase === "authenticating" && /* @__PURE__ */ jsxs16(Box17, { flexDirection: "column", marginBottom: 1, children: [
1854
- /* @__PURE__ */ jsx15(Text17, { color: COLORS.strong, bold: true, children: "Signing in to Algolia" }),
1863
+ /* @__PURE__ */ jsxs16(Text17, { color: COLORS.strong, bold: true, children: [
1864
+ /* @__PURE__ */ jsx15(Spinner2, { type: "dots" }),
1865
+ " Signing in to Algolia"
1866
+ ] }),
1855
1867
  /* @__PURE__ */ jsx15(Text17, { color: COLORS.muted, children: "A browser window will open \u2014 complete sign-in there." })
1856
1868
  ] }),
1857
1869
  /* @__PURE__ */ jsx15(CliOutput, {}),
@@ -3747,7 +3759,7 @@ async function runAnalysis(mode, extraInstructions = []) {
3747
3759
  // package.json
3748
3760
  var package_default = {
3749
3761
  name: "@algolia/wizard",
3750
- version: "0.26.0",
3762
+ version: "0.27.0",
3751
3763
  description: "Magically implement Algolia functionality in your codebase",
3752
3764
  type: "module",
3753
3765
  engines: {
@@ -5529,6 +5541,15 @@ async function run(workflow) {
5529
5541
  const store = useWizard.getState();
5530
5542
  const instance = render(/* @__PURE__ */ jsx16(App, {}), { incrementalRendering: true });
5531
5543
  await store.waitForStart();
5544
+ store.syncSteps(
5545
+ workflow.steps.map((s) => ({
5546
+ id: s.id,
5547
+ title: s.title,
5548
+ visible: s.visible,
5549
+ status: "pending"
5550
+ })),
5551
+ 0
5552
+ );
5532
5553
  let user = await getUser();
5533
5554
  if (!user) {
5534
5555
  store.beginAuth();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@algolia/wizard",
3
- "version": "0.26.0",
3
+ "version": "0.27.0",
4
4
  "description": "Magically implement Algolia functionality in your codebase",
5
5
  "type": "module",
6
6
  "engines": {