regen.mde 0.2.2 → 0.7.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 (37) hide show
  1. package/README.md +409 -295
  2. package/bin/build-corpus-editor.js +5 -3
  3. package/bin/postinstall.js +259 -187
  4. package/bin/regen-mdeditor-install.js +1 -1
  5. package/bin/regen-mdeditor-uninstall.js +1 -1
  6. package/desktop/BuildCorpusEditor/BuildCorpusBridge.cs +493 -270
  7. package/desktop/BuildCorpusEditor/EditorForm.cs +853 -540
  8. package/desktop/BuildCorpusEditor/Program.cs +85 -81
  9. package/dist/release/regen-mde-0.3.0-win-x64-setup.exe +0 -0
  10. package/dist/release/{regen.mde-0.2.2-win-x64.zip → regen-mde-0.3.0-win-x64.zip} +0 -0
  11. package/dist/release/regen-mde-0.7.0-win-x64-setup.exe +0 -0
  12. package/dist/release/regen-mde-0.7.0-win-x64.zip +0 -0
  13. package/dist/windows-editor/BuildCorpusEditor.dll +0 -0
  14. package/dist/windows-editor/BuildCorpusEditor.exe +0 -0
  15. package/dist/windows-editor/BuildCorpusEditor.pdb +0 -0
  16. package/dist/windows-editor/wwwroot/assets/index-C_VxJk4k.js +375 -0
  17. package/dist/windows-editor/wwwroot/assets/index-Wt9zSjIw.css +1 -0
  18. package/dist/windows-editor/wwwroot/index.html +3 -3
  19. package/editor-web/index.html +1 -1
  20. package/editor-web/src/main.jsx +1044 -399
  21. package/editor-web/src/styles.css +846 -602
  22. package/installer/install-regen-mde.ps1 +49 -10
  23. package/installer/regen-mde.nsi +16 -16
  24. package/package.json +90 -86
  25. package/pyproject.toml +35 -33
  26. package/requirements.txt +6 -4
  27. package/scripts/package-windows-editor.ps1 +8 -8
  28. package/scripts/release-dual.mjs +105 -0
  29. package/scripts/run-editor-implementation-plane.ps1 +29 -6
  30. package/src/build_corpus/docx_exporter.py +1055 -798
  31. package/src/build_corpus/equations.py +80 -0
  32. package/src/build_corpus/exporter.py +1488 -1195
  33. package/src/build_corpus/frontmatter.py +302 -0
  34. package/src/build_corpus/ppt_exporter.py +543 -532
  35. package/dist/release/regen.mde-0.2.2-win-x64-setup.exe +0 -0
  36. package/dist/windows-editor/wwwroot/assets/index-DjJ6xmhy.js +0 -326
  37. package/dist/windows-editor/wwwroot/assets/index-_dwMNNsm.css +0 -1
@@ -39,16 +39,39 @@ function Invoke-Checked {
39
39
 
40
40
  function Invoke-HiddenNode {
41
41
  param([string[]]$Arguments)
42
- Write-Host "+ node $($Arguments -join ' ')" -ForegroundColor DarkGray
43
- Push-Location $Root
42
+ $effectiveArguments = @($Arguments)
43
+ if ($effectiveArguments.Count -gt 0 -and $effectiveArguments[0] -eq "bin\build-corpus-editor.js" -and -not ($effectiveArguments -contains "--background")) {
44
+ $effectiveArguments += "--background"
45
+ }
46
+
47
+ Write-Host "+ node $($effectiveArguments -join ' ')" -ForegroundColor DarkGray
48
+
49
+ $outFile = Join-Path ([System.IO.Path]::GetTempPath()) "regen-mde-hidden-node-out-$([System.Guid]::NewGuid().ToString('N')).log"
50
+ $errFile = Join-Path ([System.IO.Path]::GetTempPath()) "regen-mde-hidden-node-err-$([System.Guid]::NewGuid().ToString('N')).log"
44
51
  try {
45
- & node @Arguments
46
- $exitCode = if ($LASTEXITCODE -is [int]) { $LASTEXITCODE } else { 0 }
52
+ $result = Start-Process -FilePath "node" `
53
+ -ArgumentList $effectiveArguments `
54
+ -WorkingDirectory $Root `
55
+ -WindowStyle Hidden `
56
+ -Wait `
57
+ -PassThru `
58
+ -RedirectStandardOutput $outFile `
59
+ -RedirectStandardError $errFile
60
+
61
+ if (Test-Path -LiteralPath $outFile) {
62
+ $stdout = Get-Content -LiteralPath $outFile -Raw
63
+ if (-not [string]::IsNullOrWhiteSpace($stdout)) { Write-Host $stdout.TrimEnd() }
64
+ }
65
+ if (Test-Path -LiteralPath $errFile) {
66
+ $stderr = Get-Content -LiteralPath $errFile -Raw
67
+ if (-not [string]::IsNullOrWhiteSpace($stderr)) { Write-Host $stderr.TrimEnd() -ForegroundColor DarkGray }
68
+ }
69
+ $exitCode = $result.ExitCode
47
70
  } finally {
48
- Pop-Location
71
+ Remove-Item -LiteralPath $outFile, $errFile -Force -ErrorAction SilentlyContinue
49
72
  }
50
73
  if ($exitCode -ne 0) {
51
- throw "Command failed with exit code ${exitCode}: node $($Arguments -join ' ')"
74
+ throw "Command failed with exit code ${exitCode}: node $($effectiveArguments -join ' ')"
52
75
  }
53
76
  }
54
77