@engenty/wizards-runtime 0.7.9 → 0.7.10
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/README.md +2 -1
- package/apps/runtime/dist/app.js +2 -2
- package/apps/runtime/dist/cli/autostart.js +90 -7
- package/apps/runtime/dist/cli/autoupdate.js +18 -5
- package/apps/runtime/dist/cli/clients.js +25 -6
- package/apps/runtime/dist/cli/connect.js +7 -2
- package/apps/runtime/dist/cli/environment.js +33 -2
- package/apps/runtime/dist/cli/exec.js +38 -1
- package/apps/runtime/dist/cli/home.js +15 -0
- package/apps/runtime/dist/cli/machine.js +18 -8
- package/apps/runtime/dist/cli/processes.js +23 -3
- package/apps/runtime/dist/cli/setup.js +11 -1
- package/apps/runtime/dist/cli/start.js +33 -7
- package/apps/runtime/dist/cli/uninstall.js +100 -6
- package/apps/runtime/dist/cli/update.js +28 -12
- package/apps/runtime/dist/cli/versions.js +16 -4
- package/apps/runtime/dist/docs/user/install.md +18 -8
- package/apps/runtime/dist/harness/env.js +41 -8
- package/apps/runtime/dist/harness/index.js +10 -1
- package/apps/runtime/dist/harness/model.js +1 -1
- package/apps/runtime/dist/render/browser-path.js +43 -11
- package/apps/runtime/dist/update.js +4 -0
- package/apps/web/dist/assets/{AboutDialog-CShc0mRo.js → AboutDialog-B2LuZ_mC.js} +1 -1
- package/apps/web/dist/assets/{ChangelogDialog-C4dVSwtN.js → ChangelogDialog-B0lS0BdL.js} +1 -1
- package/apps/web/dist/assets/{ChatView-KkOboyOo.js → ChatView-BcPDcU2d.js} +1 -1
- package/apps/web/dist/assets/{EditorPage-lQ3YgsFT.js → EditorPage-erduYKNM.js} +1 -1
- package/apps/web/dist/assets/{Harness-D6mgLWTb.js → Harness-Dv9ln5xB.js} +1 -1
- package/apps/web/dist/assets/{NewWizardChannels-CPlh_37J.js → NewWizardChannels-JveYyh-U.js} +1 -1
- package/apps/web/dist/assets/{NewWizardPage-D0FVJtXK.js → NewWizardPage-Dfk-WOhX.js} +1 -1
- package/apps/web/dist/assets/{OnboardingPage-BXPOMrQR.js → OnboardingPage-CT9dL4ke.js} +1 -1
- package/apps/web/dist/assets/{ProjectPage-DroTprqs.js → ProjectPage-5_Wsk9Hv.js} +1 -1
- package/apps/web/dist/assets/{PublicRunner-j3qoKjQQ.js → PublicRunner-Cw1WzTze.js} +1 -1
- package/apps/web/dist/assets/{ReadOnly-CKgSQ2z1.js → ReadOnly-S9vGVQHr.js} +1 -1
- package/apps/web/dist/assets/{RunDrawer-CJZ_ISAd.js → RunDrawer-O4rEFCL8.js} +1 -1
- package/apps/web/dist/assets/{SettingsPage-BHZ0Z-og.js → SettingsPage-DmhN7OTy.js} +1 -1
- package/apps/web/dist/assets/{SetupPage-CDkYkjJX.js → SetupPage-BlWd7Uln.js} +1 -1
- package/apps/web/dist/assets/{SharePage-BlVjVjHG.js → SharePage-ktqm-jWI.js} +1 -1
- package/apps/web/dist/assets/changelog-FJJS0Tpt.js +1 -0
- package/apps/web/dist/assets/{index-C61HAltK.js → index-xH9uN8Nh.js} +3 -3
- package/apps/web/dist/assets/{oss-credits-qGhcbqiM.js → oss-credits-Bc05Qv5H.js} +1 -1
- package/apps/web/dist/index.html +1 -1
- package/apps/web/dist/install.ps1 +307 -0
- package/bin/wizards.mjs +59 -35
- package/package.json +2 -5
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/apps/web/dist/assets/changelog-Be0i5Jjw.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={shared:[{name:`@engenty/wizards`,version:``,license:`Unknown`},{name:`@modelcontextprotocol/client`,version:`2.2.0`,license:`MIT`,homepage:`https://modelcontextprotocol.io`},{name:`@modelcontextprotocol/ext-apps`,version:`2.0.3`,license:`MIT`,homepage:`https://github.com/modelcontextprotocol/ext-apps`},{name:`dompurify`,version:`3.4.16`,license:`(MPL-2.0 OR Apache-2.0)`,homepage:`https://github.com/cure53/DOMPurify`},{name:`fflate`,version:`0.8.3`,license:`MIT`,homepage:`https://101arrowz.github.io/fflate`},{name:`lucide-react`,version:`1.49.0`,license:`ISC`,homepage:`https://lucide.dev`},{name:`marked`,version:`18.0.14`,license:`MIT`,homepage:`https://marked.js.org`},{name:`pdfmake`,version:`0.3.11`,license:`MIT`,homepage:`http://pdfmake.org`},{name:`qr-scanner`,version:`1.4.2`,license:`MIT`,homepage:`https://github.com/nimiq/qr-scanner#readme`},{name:`zod`,version:`4.6.5`,license:`MIT`,homepage:`https://zod.dev`}],groups:[{id:`apps/runtime`,kind:`app`,label:`runtime`,packages:[{name:`@ai-sdk/anthropic`,version:`4.0.54`,license:`Apache-2.0`,homepage:`https://ai-sdk.dev/docs`},{name:`@ai-sdk/elevenlabs`,version:`3.0.42`,license:`Apache-2.0`,homepage:`https://ai-sdk.dev/docs`},{name:`@ai-sdk/fal`,version:`3.0.42`,license:`Apache-2.0`,homepage:`https://ai-sdk.dev/docs`},{name:`@ai-sdk/gateway`,version:`4.0.82`,license:`Apache-2.0`,homepage:`https://ai-sdk.dev/docs`},{name:`@ai-sdk/google`,version:`4.0.72`,license:`Apache-2.0`,homepage:`https://ai-sdk.dev/docs`},{name:`@ai-sdk/openai`,version:`4.0.67`,license:`Apache-2.0`,homepage:`https://ai-sdk.dev/docs`},{name:`@ai-sdk/replicate`,version:`3.0.42`,license:`Apache-2.0`,homepage:`https://ai-sdk.dev/docs`},{name:`@clack/prompts`,version:`1.8.1`,license:`MIT`,homepage:`https://github.com/bombshell-dev/clack/tree/main/packages/prompts#readme`},{name:`@executor-js/plugin-openapi`,version:`1.6.10`,license:`MIT`,homepage:`https://github.com/UsefulSoftwareCo/executor/tree/main/packages/plugins/openapi`},{name:`@hono/node-server`,version:`2.1.3`,license:`MIT`,homepage:`https://github.com/honojs/node-server`},{name:`@libsql/client`,version:`0.18.0`,license:`MIT`,homepage:`https://github.com/tursodatabase/libsql-client-ts#readme`},{name:`@mastra/core`,version:`1.77.0`,license:`Apache-2.0`,homepage:`https://mastra.ai`},{name:`@mastra/docker`,version:`0.8.0`,license:`Apache-2.0`,homepage:`https://mastra.ai`},{name:`@mastra/mcp`,version:`2.4.0`,license:`Apache-2.0`,homepage:`https://mastra.ai`},{name:`@mastra/quickjs`,version:`0.1.3`,license:`Apache-2.0`,homepage:`https://mastra.ai`},{name:`@modelcontextprotocol/server`,version:`2.2.0`,license:`MIT`,homepage:`https://modelcontextprotocol.io`},{name:`@napi-rs/canvas`,version:`0.1.80`,license:`MIT`,homepage:`https://github.com/Brooooooklyn/canvas#readme`},{name:`@turbodocx/html-to-docx`,version:`1.23.1`,license:`MIT`,homepage:`https://github.com/TurboDocx/html-to-docx#readme`},{name:`ai`,version:`7.0.102`,license:`Apache-2.0`,homepage:`https://ai-sdk.dev/docs`},{name:`aws4fetch`,version:`1.0.20`,license:`MIT`,homepage:`https://github.com/mhart/aws4fetch#readme`},{name:`drizzle-orm`,version:`0.45.3`,license:`Apache-2.0`,homepage:`https://orm.drizzle.team`},{name:`effect`,version:`4.0.0-beta.59`,license:`MIT`,homepage:`https://effect.website`},{name:`exceljs`,version:`4.4.0`,license:`MIT`,homepage:`https://github.com/exceljs/exceljs#readme`},{name:`fast-xml-parser`,version:`5.11.2`,license:`MIT`,homepage:`https://github.com/NaturalIntelligence/fast-xml-parser#readme`},{name:`hono`,version:`4.13.12`,license:`MIT`,homepage:`https://hono.dev`},{name:`imapflow`,version:`2.2.1`,license:`MIT`,homepage:`https://imapflow.com/`},{name:`jiti`,version:`2.7.0`,license:`MIT`,homepage:`https://github.com/unjs/jiti#readme`},{name:`jose`,version:`6.2.12`,license:`MIT`,homepage:`https://github.com/panva/jose`},{name:`mammoth`,version:`1.13.0`,license:`BSD-2-Clause`,homepage:`https://github.com/mwilliamson/mammoth.js#readme`},{name:`nanoid`,version:`5.1.16`,license:`MIT`,homepage:`https://github.com/ai/nanoid#readme`},{name:`node-pty`,version:`1.1.0`,license:`MIT`,homepage:`https://github.com/microsoft/node-pty`},{name:`pdf-parse`,version:`2.4.5`,license:`Apache-2.0`,homepage:`https://mehmet-kozan.github.io/pdf-parse/`},{name:`playwright-core`,version:`1.63.0`,license:`Apache-2.0`,homepage:`https://playwright.dev`},{name:`postal-mime`,version:`4.0.2`,license:`MIT-0`,homepage:`https://postal-mime.postalsys.com`},{name:`rfc6902`,version:`5.3.0`,license:`MIT`,homepage:`https://github.com/chbrown/rfc6902`},{name:`turndown`,version:`7.2.4`,license:`MIT`,homepage:`https://github.com/mixmark-io/turndown#readme`},{name:`undici`,version:`8.12.2`,license:`MIT`,homepage:`https://undici.nodejs.org`}]},{id:`apps/web`,kind:`app`,label:`web`,packages:[{name:`@dagrejs/dagre`,version:`3.1.1`,license:`MIT`,homepage:`https://github.com/dagrejs/dagre#readme`},{name:`@tanstack/react-query`,version:`5.104.0`,license:`MIT`,homepage:`https://tanstack.com/query`},{name:`@xterm/addon-fit`,version:`0.11.0`,license:`MIT`,homepage:`https://github.com/xtermjs/xterm.js/tree/master#readme`},{name:`@xterm/addon-web-links`,version:`0.12.0`,license:`MIT`,homepage:`https://github.com/xtermjs/xterm.js/tree/master#readme`},{name:`@xterm/xterm`,version:`6.0.0`,license:`MIT`,homepage:`https://github.com/xtermjs/xterm.js#readme`},{name:`@xyflow/react`,version:`12.12.0`,license:`MIT`,homepage:`https://reactflow.dev`},{name:`react`,version:`19.3.0`,license:`MIT`,homepage:`https://react.dev/`},{name:`react-dom`,version:`19.3.0`,license:`MIT`,homepage:`https://react.dev/`},{name:`react-router`,version:`7.18.4`,license:`MIT`,homepage:`https://github.com/remix-run/react-router#readme`},{name:`uqr`,version:`0.1.3`,license:`MIT`,homepage:`https://github.com/unjs/uqr#readme`}]}]};export{e as default};
|
|
1
|
+
var e={shared:[{name:`@engenty/wizards`,version:``,license:`Unknown`},{name:`@modelcontextprotocol/client`,version:`2.2.0`,license:`MIT`,homepage:`https://modelcontextprotocol.io`},{name:`@modelcontextprotocol/ext-apps`,version:`2.0.3`,license:`MIT`,homepage:`https://github.com/modelcontextprotocol/ext-apps`},{name:`dompurify`,version:`3.4.16`,license:`(MPL-2.0 OR Apache-2.0)`,homepage:`https://github.com/cure53/DOMPurify`},{name:`fflate`,version:`0.8.3`,license:`MIT`,homepage:`https://101arrowz.github.io/fflate`},{name:`lucide-react`,version:`1.49.0`,license:`ISC`,homepage:`https://lucide.dev`},{name:`marked`,version:`18.0.14`,license:`MIT`,homepage:`https://marked.js.org`},{name:`pdfmake`,version:`0.3.11`,license:`MIT`,homepage:`http://pdfmake.org`},{name:`qr-scanner`,version:`1.4.2`,license:`MIT`,homepage:`https://github.com/nimiq/qr-scanner#readme`},{name:`zod`,version:`4.6.5`,license:`MIT`,homepage:`https://zod.dev`}],groups:[{id:`apps/runtime`,kind:`app`,label:`runtime`,packages:[{name:`@ai-sdk/anthropic`,version:`4.0.54`,license:`Apache-2.0`,homepage:`https://ai-sdk.dev/docs`},{name:`@ai-sdk/elevenlabs`,version:`3.0.42`,license:`Apache-2.0`,homepage:`https://ai-sdk.dev/docs`},{name:`@ai-sdk/fal`,version:`3.0.42`,license:`Apache-2.0`,homepage:`https://ai-sdk.dev/docs`},{name:`@ai-sdk/gateway`,version:`4.0.82`,license:`Apache-2.0`,homepage:`https://ai-sdk.dev/docs`},{name:`@ai-sdk/google`,version:`4.0.72`,license:`Apache-2.0`,homepage:`https://ai-sdk.dev/docs`},{name:`@ai-sdk/openai`,version:`4.0.67`,license:`Apache-2.0`,homepage:`https://ai-sdk.dev/docs`},{name:`@ai-sdk/replicate`,version:`3.0.42`,license:`Apache-2.0`,homepage:`https://ai-sdk.dev/docs`},{name:`@clack/prompts`,version:`1.8.1`,license:`MIT`,homepage:`https://github.com/bombshell-dev/clack/tree/main/packages/prompts#readme`},{name:`@executor-js/plugin-openapi`,version:`1.6.10`,license:`MIT`,homepage:`https://github.com/UsefulSoftwareCo/executor/tree/main/packages/plugins/openapi`},{name:`@hono/node-server`,version:`2.1.3`,license:`MIT`,homepage:`https://github.com/honojs/node-server`},{name:`@libsql/client`,version:`0.18.0`,license:`MIT`,homepage:`https://github.com/tursodatabase/libsql-client-ts#readme`},{name:`@mastra/core`,version:`1.77.0`,license:`Apache-2.0`,homepage:`https://mastra.ai`},{name:`@mastra/docker`,version:`0.8.0`,license:`Apache-2.0`,homepage:`https://mastra.ai`},{name:`@mastra/mcp`,version:`2.4.0`,license:`Apache-2.0`,homepage:`https://mastra.ai`},{name:`@mastra/quickjs`,version:`0.1.3`,license:`Apache-2.0`,homepage:`https://mastra.ai`},{name:`@modelcontextprotocol/server`,version:`2.2.0`,license:`MIT`,homepage:`https://modelcontextprotocol.io`},{name:`@napi-rs/canvas`,version:`0.1.80`,license:`MIT`,homepage:`https://github.com/Brooooooklyn/canvas#readme`},{name:`@turbodocx/html-to-docx`,version:`1.23.1`,license:`MIT`,homepage:`https://github.com/TurboDocx/html-to-docx#readme`},{name:`ai`,version:`7.0.102`,license:`Apache-2.0`,homepage:`https://ai-sdk.dev/docs`},{name:`aws4fetch`,version:`1.0.20`,license:`MIT`,homepage:`https://github.com/mhart/aws4fetch#readme`},{name:`cross-spawn`,version:`7.0.6`,license:`MIT`,homepage:`https://github.com/moxystudio/node-cross-spawn`},{name:`drizzle-orm`,version:`0.45.3`,license:`Apache-2.0`,homepage:`https://orm.drizzle.team`},{name:`effect`,version:`4.0.0-beta.59`,license:`MIT`,homepage:`https://effect.website`},{name:`exceljs`,version:`4.4.0`,license:`MIT`,homepage:`https://github.com/exceljs/exceljs#readme`},{name:`fast-xml-parser`,version:`5.11.2`,license:`MIT`,homepage:`https://github.com/NaturalIntelligence/fast-xml-parser#readme`},{name:`hono`,version:`4.13.12`,license:`MIT`,homepage:`https://hono.dev`},{name:`imapflow`,version:`2.2.1`,license:`MIT`,homepage:`https://imapflow.com/`},{name:`jiti`,version:`2.7.0`,license:`MIT`,homepage:`https://github.com/unjs/jiti#readme`},{name:`jose`,version:`6.2.12`,license:`MIT`,homepage:`https://github.com/panva/jose`},{name:`mammoth`,version:`1.13.0`,license:`BSD-2-Clause`,homepage:`https://github.com/mwilliamson/mammoth.js#readme`},{name:`nanoid`,version:`5.1.16`,license:`MIT`,homepage:`https://github.com/ai/nanoid#readme`},{name:`node-pty`,version:`1.1.0`,license:`MIT`,homepage:`https://github.com/microsoft/node-pty`},{name:`pdf-parse`,version:`2.4.5`,license:`Apache-2.0`,homepage:`https://mehmet-kozan.github.io/pdf-parse/`},{name:`playwright-core`,version:`1.63.0`,license:`Apache-2.0`,homepage:`https://playwright.dev`},{name:`postal-mime`,version:`4.0.2`,license:`MIT-0`,homepage:`https://postal-mime.postalsys.com`},{name:`rfc6902`,version:`5.3.0`,license:`MIT`,homepage:`https://github.com/chbrown/rfc6902`},{name:`turndown`,version:`7.2.4`,license:`MIT`,homepage:`https://github.com/mixmark-io/turndown#readme`},{name:`undici`,version:`8.12.2`,license:`MIT`,homepage:`https://undici.nodejs.org`}]},{id:`apps/web`,kind:`app`,label:`web`,packages:[{name:`@dagrejs/dagre`,version:`3.1.1`,license:`MIT`,homepage:`https://github.com/dagrejs/dagre#readme`},{name:`@tanstack/react-query`,version:`5.104.0`,license:`MIT`,homepage:`https://tanstack.com/query`},{name:`@xterm/addon-fit`,version:`0.11.0`,license:`MIT`,homepage:`https://github.com/xtermjs/xterm.js/tree/master#readme`},{name:`@xterm/addon-web-links`,version:`0.12.0`,license:`MIT`,homepage:`https://github.com/xtermjs/xterm.js/tree/master#readme`},{name:`@xterm/xterm`,version:`6.0.0`,license:`MIT`,homepage:`https://github.com/xtermjs/xterm.js#readme`},{name:`@xyflow/react`,version:`12.12.0`,license:`MIT`,homepage:`https://reactflow.dev`},{name:`react`,version:`19.3.0`,license:`MIT`,homepage:`https://react.dev/`},{name:`react-dom`,version:`19.3.0`,license:`MIT`,homepage:`https://react.dev/`},{name:`react-router`,version:`7.18.4`,license:`MIT`,homepage:`https://github.com/remix-run/react-router#readme`},{name:`uqr`,version:`0.1.3`,license:`MIT`,homepage:`https://github.com/unjs/uqr#readme`}]}]};export{e as default};
|
package/apps/web/dist/index.html
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
dispatchEvent(new Event("wizard-install"));
|
|
35
35
|
});
|
|
36
36
|
</script>
|
|
37
|
-
<script type="module" crossorigin src="/studio/assets/index-
|
|
37
|
+
<script type="module" crossorigin src="/studio/assets/index-xH9uN8Nh.js"></script>
|
|
38
38
|
<link rel="modulepreload" crossorigin href="/studio/assets/rolldown-runtime-hePW80VL.js">
|
|
39
39
|
<link rel="modulepreload" crossorigin href="/studio/assets/jsx-runtime-BNakU3Ej.js">
|
|
40
40
|
<link rel="modulepreload" crossorigin href="/studio/assets/preload-helper-CNEI7N0N.js">
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
# engenty wizards - installer for Windows.
|
|
2
|
+
#
|
|
3
|
+
# irm https://engenty.ai/install.ps1 | iex
|
|
4
|
+
#
|
|
5
|
+
# It needs Windows 10 or 11. It asks for an administrator only once, and only where Windows lacks
|
|
6
|
+
# Microsoft's Visual C++ runtime, which the runtime's database needs. Everything else goes into
|
|
7
|
+
# %USERPROFILE%\.engenty\wizards (ENGENTY_HOME moves it), as install.sh does on macOS and Linux:
|
|
8
|
+
#
|
|
9
|
+
# tools\node-v<version>\ its own Node; a Node you already have is left alone
|
|
10
|
+
# runtime\<version>\ the runtime, from the GitHub release; runtime\current is the one
|
|
11
|
+
# the command starts (a junction, which needs no administrator)
|
|
12
|
+
# bin\wizards.cmd the command, its folder on your PATH
|
|
13
|
+
# data\ your wizards and results (made at the first start)
|
|
14
|
+
#
|
|
15
|
+
# Then the guided setup runs (`wizards setup`). Running the installer again updates an install;
|
|
16
|
+
# your data is kept.
|
|
17
|
+
#
|
|
18
|
+
# Its Node is the x64 one on every Windows: a database library the runtime uses has no build for
|
|
19
|
+
# Windows on Arm, and Windows 11 on Arm runs x64 programs.
|
|
20
|
+
#
|
|
21
|
+
# Run as a file it takes options (`update` and `npx wizards` do that):
|
|
22
|
+
#
|
|
23
|
+
# -Yes ask nothing and install nothing optional
|
|
24
|
+
# -NoSetup only Node, the runtime and the command (what `update` runs)
|
|
25
|
+
# -Version <v> this version instead of the newest
|
|
26
|
+
# -Local no account: nothing leaves this computer
|
|
27
|
+
#
|
|
28
|
+
# For tests: ENGENTY_WIZARDS_PACKAGE (an npm spec or a tarball instead of the release's package),
|
|
29
|
+
# ENGENTY_WIZARDS_NODE_VERSION.
|
|
30
|
+
#
|
|
31
|
+
# Written for the Windows PowerShell 5.1 that Windows ships, in ASCII only: `irm | iex` reads it
|
|
32
|
+
# as text.
|
|
33
|
+
param(
|
|
34
|
+
[switch]$Yes,
|
|
35
|
+
[switch]$NoSetup,
|
|
36
|
+
[string]$Version = "",
|
|
37
|
+
[switch]$Local
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
$ErrorActionPreference = "Stop"
|
|
41
|
+
$ProgressPreference = "SilentlyContinue"
|
|
42
|
+
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
|
|
43
|
+
|
|
44
|
+
$NodeVersion = if ($env:ENGENTY_WIZARDS_NODE_VERSION) { $env:ENGENTY_WIZARDS_NODE_VERSION } else { "24.14.0" }
|
|
45
|
+
$Package = "@engenty/wizards-runtime"
|
|
46
|
+
$PackageFile = "engenty-wizards-runtime"
|
|
47
|
+
$Releases = "https://github.com/engenty/wizards/releases"
|
|
48
|
+
$Base = if ($env:ENGENTY_HOME) { $env:ENGENTY_HOME } else { Join-Path $HOME ".engenty" }
|
|
49
|
+
$HomeDir = Join-Path $Base "wizards"
|
|
50
|
+
$Tools = Join-Path $HomeDir "tools"
|
|
51
|
+
$NodeDir = Join-Path $Tools "node-v$NodeVersion"
|
|
52
|
+
$BinDir = Join-Path $HomeDir "bin"
|
|
53
|
+
$Wrapper = Join-Path $BinDir "wizards.cmd"
|
|
54
|
+
$Log = Join-Path $HomeDir "logs\install.log"
|
|
55
|
+
$script:Step = "The installer"
|
|
56
|
+
|
|
57
|
+
function Say($text, $detail = "") {
|
|
58
|
+
Write-Host " + " -ForegroundColor Green -NoNewline
|
|
59
|
+
Write-Host $text -NoNewline
|
|
60
|
+
if ($detail) { Write-Host " $detail" -ForegroundColor DarkGray } else { Write-Host "" }
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
# A failure ends the installer, not the window: under `irm | iex`, `exit` would close the
|
|
64
|
+
# PowerShell the person typed into, and the message with it.
|
|
65
|
+
function Fail($text) { throw [InstallFailed]::new($text) }
|
|
66
|
+
class InstallFailed : Exception { InstallFailed([string]$m) : base($m) {} }
|
|
67
|
+
|
|
68
|
+
function Show-Failure($text) {
|
|
69
|
+
Write-Host " x $text" -ForegroundColor Red
|
|
70
|
+
if (Test-Path $Log) {
|
|
71
|
+
Get-Content $Log -Tail 12 | ForEach-Object { Write-Host " $_" -ForegroundColor DarkGray }
|
|
72
|
+
Write-Host " The whole log: $Log" -ForegroundColor DarkGray
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
# The exit code for a caller that ran this file (update, npx wizards); nothing under `irm | iex`.
|
|
77
|
+
function Done($code) { if ($PSCommandPath) { exit $code } }
|
|
78
|
+
|
|
79
|
+
function Tilde($path) {
|
|
80
|
+
if ($path.StartsWith($HOME)) { return "~" + $path.Substring($HOME.Length) }
|
|
81
|
+
return $path
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
# --- the steps -------------------------------------------------------------------------------
|
|
85
|
+
|
|
86
|
+
function Check-Platform {
|
|
87
|
+
$script:Step = "Looking at this machine"
|
|
88
|
+
if (-not [Environment]::Is64BitOperatingSystem) { Fail "32-bit Windows is not supported." }
|
|
89
|
+
# The machine's, not this process's: run from an emulated x64 program, Windows on Arm says AMD64.
|
|
90
|
+
$arch = $env:PROCESSOR_ARCHITECTURE
|
|
91
|
+
try { $arch = [Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString() } catch {}
|
|
92
|
+
if ($arch -eq "X64") { $arch = "AMD64" }
|
|
93
|
+
$os = [Environment]::OSVersion.Version
|
|
94
|
+
if ($os.Major -lt 10) { Fail "Windows 10 or 11 is needed." }
|
|
95
|
+
$note = if ($arch -eq "ARM64") { "the x64 Node, which Windows on Arm runs" } else { "" }
|
|
96
|
+
Say "Windows $($os.Major).$($os.Build) on $($arch.ToLower())" $note
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function Install-Node {
|
|
100
|
+
$script:Step = "Installing Node $NodeVersion"
|
|
101
|
+
$node = Join-Path $NodeDir "node.exe"
|
|
102
|
+
if ((Test-Path $node) -and ((& $node --version) -eq "v$NodeVersion")) {
|
|
103
|
+
Link-Node
|
|
104
|
+
Say "Node $NodeVersion" "already here"
|
|
105
|
+
return
|
|
106
|
+
}
|
|
107
|
+
$name = "node-v$NodeVersion-win-x64"
|
|
108
|
+
$dist = "https://nodejs.org/dist/v$NodeVersion"
|
|
109
|
+
$tmp = Join-Path $Tools (".node." + [Guid]::NewGuid().ToString("N").Substring(0, 8))
|
|
110
|
+
New-Item -ItemType Directory -Force $tmp | Out-Null
|
|
111
|
+
try {
|
|
112
|
+
Write-Host " ... Downloading Node $NodeVersion" -ForegroundColor DarkGray
|
|
113
|
+
Invoke-WebRequest -UseBasicParsing "$dist/$name.zip" -OutFile "$tmp\node.zip"
|
|
114
|
+
# The file must be the one nodejs.org lists.
|
|
115
|
+
$sums = (Invoke-WebRequest -UseBasicParsing "$dist/SHASUMS256.txt").Content
|
|
116
|
+
$expected = ($sums -split "`n" | Where-Object { $_ -match "\s$name\.zip$" } | ForEach-Object { ($_ -split "\s+")[0] })
|
|
117
|
+
$actual = (Get-FileHash "$tmp\node.zip" -Algorithm SHA256).Hash.ToLower()
|
|
118
|
+
if (-not $expected -or $expected -ne $actual) { Fail "The Node download does not match its checksum from nodejs.org." }
|
|
119
|
+
Write-Host " ... Unpacking Node $NodeVersion" -ForegroundColor DarkGray
|
|
120
|
+
# Windows' own tar reads a zip many times faster than Expand-Archive.
|
|
121
|
+
$tar = Join-Path $env:SystemRoot "System32\tar.exe"
|
|
122
|
+
if (Test-Path $tar) {
|
|
123
|
+
& $tar -xf "$tmp\node.zip" -C $tmp
|
|
124
|
+
if ($LASTEXITCODE -ne 0) { Fail "Node could not be unpacked." }
|
|
125
|
+
} else {
|
|
126
|
+
Expand-Archive "$tmp\node.zip" -DestinationPath $tmp -Force
|
|
127
|
+
}
|
|
128
|
+
if (Test-Path $NodeDir) { Remove-Item -Recurse -Force $NodeDir }
|
|
129
|
+
Move-Item (Join-Path $tmp $name) $NodeDir
|
|
130
|
+
} finally {
|
|
131
|
+
Remove-Item -Recurse -Force $tmp -ErrorAction SilentlyContinue
|
|
132
|
+
}
|
|
133
|
+
Link-Node
|
|
134
|
+
# An older Node of ours is not needed any more.
|
|
135
|
+
Get-ChildItem $Tools -Directory -Filter "node-v*" | Where-Object { $_.FullName -ne $NodeDir } |
|
|
136
|
+
ForEach-Object { Remove-Item -Recurse -Force $_.FullName -ErrorAction SilentlyContinue }
|
|
137
|
+
Say "Node $NodeVersion" "$(Tilde (Join-Path $Tools 'node')), checksum from nodejs.org matches"
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
# tools\node points at the Node of this version: a junction, which needs no administrator.
|
|
141
|
+
function Link-Node {
|
|
142
|
+
$link = Join-Path $Tools "node"
|
|
143
|
+
if (Test-Path $link) { (Get-Item $link).Delete() }
|
|
144
|
+
New-Item -ItemType Junction -Path $link -Target $NodeDir | Out-Null
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
# The database library is built with Microsoft's compiler and needs its runtime, which many
|
|
148
|
+
# programs bring along but a new Windows lacks. Microsoft's installer for it needs an administrator:
|
|
149
|
+
# Windows asks once.
|
|
150
|
+
function Install-VCRuntime {
|
|
151
|
+
$script:Step = "Installing Microsoft's Visual C++ runtime"
|
|
152
|
+
$keys = @(
|
|
153
|
+
"HKLM:\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64",
|
|
154
|
+
"HKLM:\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\x64"
|
|
155
|
+
)
|
|
156
|
+
foreach ($key in $keys) {
|
|
157
|
+
if ((Get-ItemProperty $key -ErrorAction SilentlyContinue).Installed -eq 1) {
|
|
158
|
+
Say "Microsoft Visual C++ runtime" "already here"
|
|
159
|
+
return
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
$url = "https://aka.ms/vs/17/release/vc_redist.x64.exe"
|
|
163
|
+
$exe = Join-Path $env:TEMP ("vc_redist." + [Guid]::NewGuid().ToString("N").Substring(0, 8) + ".exe")
|
|
164
|
+
Write-Host " ... Downloading Microsoft's Visual C++ runtime, which the database needs" -ForegroundColor DarkGray
|
|
165
|
+
Invoke-WebRequest -UseBasicParsing $url -OutFile $exe
|
|
166
|
+
try {
|
|
167
|
+
$signature = Get-AuthenticodeSignature $exe
|
|
168
|
+
if ($signature.Status -ne "Valid" -or $signature.SignerCertificate.Subject -notmatch "O=Microsoft Corporation") {
|
|
169
|
+
Fail "The Visual C++ runtime download is not signed by Microsoft."
|
|
170
|
+
}
|
|
171
|
+
Write-Host " ... Windows asks whether Microsoft's installer may make changes: say yes" -ForegroundColor DarkGray
|
|
172
|
+
try {
|
|
173
|
+
$process = Start-Process $exe -ArgumentList "/install", "/quiet", "/norestart" -Verb RunAs -Wait -PassThru
|
|
174
|
+
} catch {
|
|
175
|
+
Fail "The Visual C++ runtime was not installed. engenty wizards needs it: $url"
|
|
176
|
+
}
|
|
177
|
+
# 3010: installed, Windows wants a restart; 1638: a newer one is there.
|
|
178
|
+
if (@(0, 3010, 1638) -notcontains $process.ExitCode) {
|
|
179
|
+
Fail "Microsoft's Visual C++ installer ended with $($process.ExitCode). Install it yourself: $url"
|
|
180
|
+
}
|
|
181
|
+
} finally {
|
|
182
|
+
Remove-Item -Force $exe -ErrorAction SilentlyContinue
|
|
183
|
+
}
|
|
184
|
+
Say "Microsoft Visual C++ runtime" "installed"
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
# What gets installed, decided before anything is downloaded: the tarball of the GitHub release,
|
|
188
|
+
# which npm installs like one from its registry; what it depends on comes from the registry.
|
|
189
|
+
function Find-Package {
|
|
190
|
+
$script:Step = "Looking for the newest release"
|
|
191
|
+
if ($env:ENGENTY_WIZARDS_PACKAGE) { return $env:ENGENTY_WIZARDS_PACKAGE }
|
|
192
|
+
$v = $Version
|
|
193
|
+
if (-not $v) {
|
|
194
|
+
$latest = Invoke-RestMethod -UseBasicParsing "https://api.github.com/repos/engenty/wizards/releases/latest"
|
|
195
|
+
$v = $latest.tag_name -replace "^v", ""
|
|
196
|
+
}
|
|
197
|
+
if (-not $v) { Fail "No release of engenty wizards was found at $Releases." }
|
|
198
|
+
return "$Releases/download/v$v/$PackageFile-$v.tgz"
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
# Each version has its folder (runtime\<version>\, an npm prefix) and `current` names the one the
|
|
202
|
+
# command starts, as install.sh does it: a version that runs keeps its files.
|
|
203
|
+
function Install-Runtime($spec) {
|
|
204
|
+
$script:Step = "Installing engenty wizards"
|
|
205
|
+
$runtime = Join-Path $HomeDir "runtime"
|
|
206
|
+
New-Item -ItemType Directory -Force $runtime | Out-Null
|
|
207
|
+
$stage = Join-Path $runtime (".staging-" + [Guid]::NewGuid().ToString("N").Substring(0, 8))
|
|
208
|
+
Write-Host " ... Installing engenty wizards (about 650 MB on disk, a few minutes)" -ForegroundColor DarkGray
|
|
209
|
+
$node = Join-Path $NodeDir "node.exe"
|
|
210
|
+
$npm = Join-Path $NodeDir "node_modules\npm\bin\npm-cli.js"
|
|
211
|
+
# Our Node first on the PATH, for npm and whatever it starts. No install scripts run; the
|
|
212
|
+
# runtime works without them. --legacy-peer-deps: the dependencies as the package names them.
|
|
213
|
+
$env:Path = "$NodeDir;$env:Path"
|
|
214
|
+
# npm warns on stderr, which Windows PowerShell turns into errors that stop the script.
|
|
215
|
+
$ErrorActionPreference = "Continue"
|
|
216
|
+
& $node $npm install --prefix $stage --omit=dev --ignore-scripts --legacy-peer-deps `
|
|
217
|
+
--no-audit --no-fund --loglevel=error $spec *>> $Log
|
|
218
|
+
$code = $LASTEXITCODE
|
|
219
|
+
$ErrorActionPreference = "Stop"
|
|
220
|
+
$manifest = Join-Path $stage "node_modules\$Package\package.json"
|
|
221
|
+
if ($code -ne 0 -or -not (Test-Path $manifest)) {
|
|
222
|
+
Remove-Item -Recurse -Force $stage -ErrorAction SilentlyContinue
|
|
223
|
+
Fail "$script:Step failed."
|
|
224
|
+
}
|
|
225
|
+
$script:Installed = (Get-Content $manifest -Raw | ConvertFrom-Json).version
|
|
226
|
+
$current = Join-Path $runtime "current"
|
|
227
|
+
$previous = if (Test-Path $current) { Split-Path -Leaf ((Get-Item $current).Target | Select-Object -First 1) } else { "" }
|
|
228
|
+
$into = Join-Path $runtime $script:Installed
|
|
229
|
+
if (Test-Path $into) { Remove-Item -Recurse -Force $into }
|
|
230
|
+
Move-Item $stage $into
|
|
231
|
+
if (Test-Path $current) { (Get-Item $current).Delete() }
|
|
232
|
+
New-Item -ItemType Junction -Path $current -Target $into | Out-Null
|
|
233
|
+
# This version and the one before stay; older ones go (one that still runs keeps its files).
|
|
234
|
+
Get-ChildItem $runtime -Directory | Where-Object { $_.Name -match "^\d+\.\d+\.\d+$" -and $_.Name -ne $script:Installed -and $_.Name -ne $previous } |
|
|
235
|
+
ForEach-Object { Remove-Item -Recurse -Force $_.FullName -ErrorAction SilentlyContinue }
|
|
236
|
+
Say "engenty wizards $script:Installed" (Tilde $into)
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
function Write-Command {
|
|
240
|
+
$script:Step = "Writing the command"
|
|
241
|
+
New-Item -ItemType Directory -Force $BinDir | Out-Null
|
|
242
|
+
$lines = @(
|
|
243
|
+
"@echo off",
|
|
244
|
+
"rem engenty wizards - written by install.ps1; running the installer again rewrites it."
|
|
245
|
+
)
|
|
246
|
+
# An install outside ~\.engenty finds its folder again through the command.
|
|
247
|
+
if ($Base -ne (Join-Path $HOME ".engenty")) {
|
|
248
|
+
$lines += "if not defined ENGENTY_HOME set ""ENGENTY_HOME=$Base"""
|
|
249
|
+
}
|
|
250
|
+
# `(goto) 2>nul &` leaves the batch file before Node starts: cmd.exe would read on in it after
|
|
251
|
+
# Node ends, and `wizards uninstall` deletes it meanwhile. Node's exit code stays cmd's.
|
|
252
|
+
$lines += "(goto) 2>nul & ""$(Join-Path $Tools 'node\node.exe')"" ""$(Join-Path $HomeDir "runtime\current\node_modules\$Package\bin\wizards.mjs")"" %*"
|
|
253
|
+
Set-Content -Path $Wrapper -Value $lines -Encoding Ascii
|
|
254
|
+
# The command's folder on the user's PATH; a terminal opened before sees it after a restart.
|
|
255
|
+
$userPath = [Environment]::GetEnvironmentVariable("Path", "User")
|
|
256
|
+
$entries = if ($userPath) { $userPath -split ";" } else { @() }
|
|
257
|
+
if ($entries -notcontains $BinDir) {
|
|
258
|
+
[Environment]::SetEnvironmentVariable("Path", (($entries + $BinDir) | Where-Object { $_ }) -join ";", "User")
|
|
259
|
+
Say "Command" "$(Tilde $Wrapper), its folder added to your PATH"
|
|
260
|
+
} else {
|
|
261
|
+
Say "Command" (Tilde $Wrapper)
|
|
262
|
+
}
|
|
263
|
+
if (($env:Path -split ";") -notcontains $BinDir) { $env:Path = "$BinDir;$env:Path" }
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
# --- main ------------------------------------------------------------------------------------
|
|
267
|
+
|
|
268
|
+
New-Item -ItemType Directory -Force (Join-Path $HomeDir "logs"), $Tools, $BinDir | Out-Null
|
|
269
|
+
# An uninstall whose clean-up waits for the next login would delete this install then.
|
|
270
|
+
Remove-ItemProperty "HKCU:\Software\Microsoft\Windows\CurrentVersion\RunOnce" -Name "engenty-wizards-uninstall" -ErrorAction SilentlyContinue
|
|
271
|
+
Add-Content $Log "`n--- $((Get-Date).ToUniversalTime().ToString('s'))Z install.ps1"
|
|
272
|
+
Write-Host ""
|
|
273
|
+
Write-Host " engenty wizards" -ForegroundColor Magenta -NoNewline
|
|
274
|
+
Write-Host " Make a wish. Get your wizard." -ForegroundColor DarkGray
|
|
275
|
+
Write-Host ""
|
|
276
|
+
Write-Host " Installing into $(Tilde $HomeDir)"
|
|
277
|
+
$failed = $false
|
|
278
|
+
try {
|
|
279
|
+
Check-Platform
|
|
280
|
+
$spec = Find-Package
|
|
281
|
+
Install-Node
|
|
282
|
+
Install-VCRuntime
|
|
283
|
+
Install-Runtime $spec
|
|
284
|
+
Write-Command
|
|
285
|
+
} catch [InstallFailed] {
|
|
286
|
+
Show-Failure $_.Exception.Message
|
|
287
|
+
$failed = $true
|
|
288
|
+
} catch {
|
|
289
|
+
Add-Content $Log $_.ToString()
|
|
290
|
+
Show-Failure "$script:Step failed: $($_.Exception.Message)"
|
|
291
|
+
$failed = $true
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
if ($failed) {
|
|
295
|
+
Done 1
|
|
296
|
+
} elseif ($NoSetup) {
|
|
297
|
+
Write-Host " Installed engenty wizards $script:Installed."
|
|
298
|
+
Done 0
|
|
299
|
+
} else {
|
|
300
|
+
Write-Host " Installed. The setup follows."
|
|
301
|
+
Write-Host ""
|
|
302
|
+
$setupArgs = @("setup")
|
|
303
|
+
if ($Yes) { $setupArgs += "--yes" }
|
|
304
|
+
if ($Local) { $setupArgs += "--local" }
|
|
305
|
+
& $Wrapper @setupArgs
|
|
306
|
+
Done $LASTEXITCODE
|
|
307
|
+
}
|
package/bin/wizards.mjs
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
//
|
|
5
5
|
// The same file is two things. In the npm package `wizards` (`npx wizards`, `npm install -g
|
|
6
6
|
// wizards`) it is the launcher, with nothing beside it but the installer (install.sh) and no
|
|
7
|
-
// dependencies:
|
|
8
|
-
//
|
|
7
|
+
// dependencies: it installs engenty wizards into ~/.engenty/wizards with that installer (on Windows
|
|
8
|
+
// install.ps1: its own Node, the runtime @engenty/wizards-runtime, the `wizards` command), brings an
|
|
9
9
|
// older install there up to its own version, and hands the command to it. In the runtime, which
|
|
10
10
|
// the installer puts there, it is the command itself.
|
|
11
11
|
//
|
|
@@ -27,17 +27,24 @@ const home = join(
|
|
|
27
27
|
"wizards",
|
|
28
28
|
);
|
|
29
29
|
const runtime = join(home, "runtime");
|
|
30
|
-
const
|
|
30
|
+
const windows = process.platform === "win32";
|
|
31
|
+
const wrapper = join(home, "bin", windows ? "wizards.cmd" : "wizards");
|
|
31
32
|
/** The runtime's npm package. Up to 0.7.4 it was `wizards` itself; that name is the launcher now. */
|
|
32
33
|
const RUNTIME = "@engenty/wizards-runtime";
|
|
33
34
|
/** Whether this copy is the runtime, or the launcher without it. */
|
|
34
35
|
const hasRuntime = existsSync(join(root, "apps", "runtime", "dist", "cli", "main.js"));
|
|
35
36
|
/** The installer: beside the launcher, or in the runtime's built SPA. */
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
)
|
|
37
|
+
const installerName = windows ? "install.ps1" : "install.sh";
|
|
38
|
+
const installer = [
|
|
39
|
+
join(root, installerName),
|
|
40
|
+
join(root, "apps", "web", "dist", installerName),
|
|
41
|
+
].find((file) => existsSync(file));
|
|
39
42
|
// uninstall: never installs or hands over first; the install it takes away may no longer run.
|
|
40
43
|
const RUN_HERE = ["help", "validate", "mcp", "uninstall"];
|
|
44
|
+
/** The installer's line, as a person types it here. */
|
|
45
|
+
const installLine = windows
|
|
46
|
+
? " irm https://engenty.ai/install.ps1 | iex\n"
|
|
47
|
+
: " curl -fsSL https://engenty.ai/install.sh | bash\n";
|
|
41
48
|
const tilde = (path) =>
|
|
42
49
|
path.startsWith(homedir() + sep) ? `~${path.slice(homedir().length)}` : path;
|
|
43
50
|
|
|
@@ -112,7 +119,12 @@ function isInstall() {
|
|
|
112
119
|
function terminalEnv() {
|
|
113
120
|
const env = {};
|
|
114
121
|
for (const [key, value] of Object.entries(process.env)) {
|
|
115
|
-
|
|
122
|
+
// PATH comes after, once: Windows calls it Path, and two of them would leave one to chance.
|
|
123
|
+
if (
|
|
124
|
+
!key.startsWith("npm_") &&
|
|
125
|
+
!["INIT_CWD", "NODE", "COLOR"].includes(key) &&
|
|
126
|
+
key.toUpperCase() !== "PATH"
|
|
127
|
+
) {
|
|
116
128
|
env[key] = value;
|
|
117
129
|
}
|
|
118
130
|
}
|
|
@@ -128,7 +140,10 @@ function install(version, quiet) {
|
|
|
128
140
|
if (!installer) {
|
|
129
141
|
return false;
|
|
130
142
|
}
|
|
131
|
-
const
|
|
143
|
+
const [shell, ...shellArgs] = windows
|
|
144
|
+
? ["powershell.exe", "-NoProfile", "-ExecutionPolicy", "Bypass", "-File", installer, "-NoSetup"]
|
|
145
|
+
: ["bash", installer, "--no-setup"];
|
|
146
|
+
const result = spawnSync(shell, shellArgs, {
|
|
132
147
|
// A command whose output is read (validate --json, mcp) keeps its stdout to itself.
|
|
133
148
|
stdio: ["ignore", quiet ? 2 : "inherit", "inherit"],
|
|
134
149
|
env: {
|
|
@@ -161,10 +176,29 @@ function runs() {
|
|
|
161
176
|
}
|
|
162
177
|
}
|
|
163
178
|
|
|
179
|
+
/**
|
|
180
|
+
* The installed command with these arguments. On Windows its Node and script, which is what
|
|
181
|
+
* wizards.cmd runs: a .cmd file starts only through cmd.exe, which would read the arguments again.
|
|
182
|
+
*/
|
|
183
|
+
function installedCommand(argv) {
|
|
184
|
+
if (!windows) {
|
|
185
|
+
return [wrapper, argv];
|
|
186
|
+
}
|
|
187
|
+
const script = join(runtime, "current", "node_modules", RUNTIME, "bin", "wizards.mjs");
|
|
188
|
+
return [join(home, "tools", "node", "node.exe"), [script, ...argv]];
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/** Runs the installed command with these arguments, waiting for it. */
|
|
192
|
+
function installedRun(argv, quiet) {
|
|
193
|
+
const [file, all] = installedCommand(argv);
|
|
194
|
+
spawnSync(file, all, { stdio: ["ignore", quiet ? 2 : "inherit", "inherit"], env: terminalEnv() });
|
|
195
|
+
}
|
|
196
|
+
|
|
164
197
|
/** Runs the installed command with these arguments; its exit code. */
|
|
165
198
|
function handOver() {
|
|
166
199
|
return new Promise((done) => {
|
|
167
|
-
const
|
|
200
|
+
const [file, argv] = installedCommand(args);
|
|
201
|
+
const child = spawn(file, argv, { stdio: "inherit", env: terminalEnv() });
|
|
168
202
|
// Ctrl-C reaches the installed command as well (same terminal); this one waits for it.
|
|
169
203
|
process.on("SIGINT", () => undefined);
|
|
170
204
|
process.on("SIGTERM", () => child.kill("SIGTERM"));
|
|
@@ -184,19 +218,6 @@ if (command === "version") {
|
|
|
184
218
|
const own = versionOf(root) || "0.0.0";
|
|
185
219
|
const quiet = RUN_HERE.includes(command);
|
|
186
220
|
const checkout = existsSync(join(root, "pnpm-workspace.yaml"));
|
|
187
|
-
// Windows has no installer yet, and the setup, the service and the AI clients are written for
|
|
188
|
-
// macOS and Linux: it says so instead of half working. What needs no install still runs.
|
|
189
|
-
if (process.platform === "win32" && !checkout && !(hasRuntime && RUN_HERE.includes(command))) {
|
|
190
|
-
console.error(
|
|
191
|
-
"engenty wizards for Windows is coming soon.\n\n" +
|
|
192
|
-
"Until then it runs in WSL (Windows Subsystem for Linux). In PowerShell:\n\n" +
|
|
193
|
-
" wsl --install\n\n" +
|
|
194
|
-
"then, in the Ubuntu terminal that opens:\n\n" +
|
|
195
|
-
" curl -fsSL https://engenty.ai/install.sh | bash\n\n" +
|
|
196
|
-
"https://engenty.ai/docs/user/install\n",
|
|
197
|
-
);
|
|
198
|
-
process.exit(1);
|
|
199
|
-
}
|
|
200
221
|
if (isInstall() && !hasRuntime) {
|
|
201
222
|
// The launcher in the install's place: an update of 0.7.4 or older fetched `wizards`, the
|
|
202
223
|
// runtime's name then, and its next start switched to it. The installer it carries brings the
|
|
@@ -217,7 +238,7 @@ if (isInstall() && !hasRuntime) {
|
|
|
217
238
|
}
|
|
218
239
|
process.exit(await handOver());
|
|
219
240
|
}
|
|
220
|
-
const fromNpm =
|
|
241
|
+
const fromNpm = !checkout && !isInstall();
|
|
221
242
|
if (fromNpm && command === "uninstall" && !hasRuntime) {
|
|
222
243
|
// The install's own uninstall takes it away; it never updates first. An install the update
|
|
223
244
|
// left without its runtime gets it back (above, in the installed command) and then uninstalls.
|
|
@@ -235,15 +256,18 @@ if (
|
|
|
235
256
|
const installed = installedVersion();
|
|
236
257
|
if (!installed || older(installed, own)) {
|
|
237
258
|
const running = installed && runs();
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
} else if (
|
|
259
|
+
// Windows keeps the files of a running program locked: the runtime stops for the update.
|
|
260
|
+
if (running && windows) {
|
|
261
|
+
installedRun(["stop"], quiet);
|
|
262
|
+
}
|
|
263
|
+
const done = install(own, quiet);
|
|
264
|
+
// What ran is still the old version: it starts again as the new one.
|
|
265
|
+
if (running && windows) {
|
|
266
|
+
installedRun(["start", "--background", "--no-open"], quiet);
|
|
267
|
+
} else if (running && done) {
|
|
268
|
+
installedRun(["restart"], quiet);
|
|
269
|
+
}
|
|
270
|
+
if (!done && hasRuntime && currentNode && !installed) {
|
|
247
271
|
console.error(
|
|
248
272
|
`The install into ${tilde(home)} failed; this time engenty wizards runs from npm.\n`,
|
|
249
273
|
);
|
|
@@ -259,14 +283,14 @@ if (
|
|
|
259
283
|
if (!hasRuntime) {
|
|
260
284
|
console.error(
|
|
261
285
|
`engenty wizards couldn’t be installed into ${tilde(home)}. The installer on its own:\n\n` +
|
|
262
|
-
|
|
286
|
+
installLine,
|
|
263
287
|
);
|
|
264
288
|
process.exit(1);
|
|
265
289
|
}
|
|
266
290
|
}
|
|
267
291
|
if (!currentNode && command === "uninstall") {
|
|
268
292
|
// The install's own Node, if it is still there, runs this copy's uninstall.
|
|
269
|
-
const node = join(home, "tools", "node", "
|
|
293
|
+
const node = join(home, "tools", "node", windows ? "node.exe" : "bin/node");
|
|
270
294
|
const result = existsSync(node)
|
|
271
295
|
? spawnSync(node, [fileURLToPath(import.meta.url), ...args], { stdio: "inherit" })
|
|
272
296
|
: null;
|
|
@@ -276,7 +300,7 @@ if (!currentNode) {
|
|
|
276
300
|
console.error(
|
|
277
301
|
`engenty wizards needs Node.js 24.11 or newer. This is ${process.version}.\n` +
|
|
278
302
|
"The installer brings its own and leaves yours alone:\n\n" +
|
|
279
|
-
|
|
303
|
+
installLine,
|
|
280
304
|
);
|
|
281
305
|
process.exit(1);
|
|
282
306
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@engenty/wizards-runtime",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.10",
|
|
4
4
|
"description": "Make a wish. Get your wizard. It guides you step by step. Let AI do the work. Runs on your machine, on the AI subscription you already have. The runtime, which `npx wizards` installs.",
|
|
5
5
|
"license": "FSL-1.1-MIT",
|
|
6
6
|
"homepage": "https://engenty.ai",
|
|
@@ -15,10 +15,6 @@
|
|
|
15
15
|
"engines": {
|
|
16
16
|
"node": ">=24.11"
|
|
17
17
|
},
|
|
18
|
-
"os": [
|
|
19
|
-
"darwin",
|
|
20
|
-
"linux"
|
|
21
|
-
],
|
|
22
18
|
"files": [
|
|
23
19
|
"apps",
|
|
24
20
|
"bin",
|
|
@@ -50,6 +46,7 @@
|
|
|
50
46
|
"@turbodocx/html-to-docx": "1.23.1",
|
|
51
47
|
"ai": "7.0.102",
|
|
52
48
|
"aws4fetch": "1.0.20",
|
|
49
|
+
"cross-spawn": "7.0.6",
|
|
53
50
|
"drizzle-orm": "0.45.3",
|
|
54
51
|
"effect": "4.0.0-beta.59",
|
|
55
52
|
"exceljs": "4.4.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wizards",
|
|
3
3
|
"displayName": "engenty wizards",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.10",
|
|
5
5
|
"description": "Build page-by-page AI wizards that people open on a shared link — designed, tested and published from Claude Code — run your published ones in the chat, and keep them in a pane beside it.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "engenty"
|