import { VersionInfo } from '@start9labs/start-sdk'

// HOTFIX — restore the web UI (every user was getting a blank screen) + close three
// server-side admin gaps. Code-only, no schema change (migrations are no-ops):
//   * Pin @babel/standalone to 7.29.7. The page loaded Babel from unpkg with no version
//     pin, so unpkg silently served Babel 8.0.0. Babel 8 defaults @babel/preset-react to
//     the automatic JSX runtime, which prepends `import {jsx} from "react/jsx-runtime"`
//     to the compiled output — an ESM import is illegal in this classic (non-module)
//     inline <script>, so the browser rejected the whole bundle and React never mounted.
//     The 7.x line defaults preset-react to the classic runtime (React.createElement),
//     which restores the prior, working behavior. (Follow-up: vendor + SRI-pin the CDN
//     libs so a third party can't swap our front-end deps in production again.)
//   * Enforce admin server-side on three GET endpoints that were UI-hidden but not
//     API-enforced: /api/users, /api/email/status, /api/email/accounts.
export const v_0_1_0_79 = VersionInfo.of({
  version: '0.1.0:79',
  releaseNotes: {
    en_US: [
      'Fixes a blank screen on load caused by an upstream Babel CDN upgrade; the web app',
      'now loads reliably. Also tightens admin-only access controls on a few internal',
      'endpoints. No data changes.',
    ].join(' '),
  },
  migrations: { up: async () => {}, down: async () => {} },
})
