@multiplatform.one/cli 9.17.0 → 10.0.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.
@@ -5,17 +5,18 @@ import { generateDoctypeTypes, typesDrift } from "../commands/doctypeTypes.mjs";
5
5
  import { runE2ESession } from "../commands/e2e.mjs";
6
6
  import { SINGLETON_APPS, init } from "../commands/init.mjs";
7
7
  import { pythonFiles, runPythonTools } from "../commands/pythonTools.mjs";
8
+ import { s as runThemeKeys, t as formatThemeKeysReport } from "../themeKeys-DUM-GCcW.mjs";
8
9
  import { updateApp } from "../commands/updateApp.mjs";
9
10
  import { availableServices, parseTestTiers, runBuild, runFrappeBench, runIntegrationTests, runRootFormat, runRootLint, runUnitTests, testTiers, waitFunctions } from "../commands/verbs.mjs";
10
11
  import fsSync from "node:fs";
11
12
  import path from "node:path";
12
13
  import { fileURLToPath } from "node:url";
13
- import spawn from "nano-spawn";
14
14
  import fs from "node:fs/promises";
15
- import yoctoSpinner from "yocto-spinner";
16
15
  import { formatServiceList, lookupProjectRoot, waitServices } from "@multiplatform.one/utils/dev";
17
16
  import { Command } from "commander";
18
17
  import dotenv from "dotenv";
18
+ import spawn from "nano-spawn";
19
+ import yoctoSpinner from "yocto-spinner";
19
20
 
20
21
  //#region src/bin/multiplatformOne.ts
21
22
  const projectRoot = lookupProjectRoot();
@@ -210,6 +211,20 @@ frappe.command("types").description("generate TypeScript types for doctypes from
210
211
  }
211
212
  await fs.writeFile(out, generated);
212
213
  });
214
+ program.command("migrate").description("source migrations that follow an MPO upgrade, each a dry run unless --write").command("theme-keys").argument("[paths...]", "files or directories to rename in (default: the whole project)").option("--write", "apply the renames; without it the run only prints per-file counts").option("--exclude <path>", "leave a file or directory alone (repeatable)", collect, []).option("--json <file>", "also write the full report, unclassified sites included, as JSON").description("rename Tamagui 2 camelCase theme keys to Tamagui 3 kebab-case ($color-12 to $color-12, theme.borderColorControl to theme[\"border-color-control\"]); run after mpo update and Tamagui's flat-values codemod").action(async (paths, options) => {
215
+ const fromCwd = (entry) => path.resolve(process.cwd(), entry);
216
+ const report = await runThemeKeys(projectRoot, {
217
+ paths: paths.map(fromCwd),
218
+ exclude: options.exclude.map((entry) => path.relative(projectRoot, fromCwd(entry))),
219
+ write: Boolean(options.write)
220
+ });
221
+ if (paths.length && !report.scanned && !report.skipped.length) {
222
+ console.error(`no source file under ${paths.join(", ")}`);
223
+ process.exit(2);
224
+ }
225
+ console.log(formatThemeKeysReport(report));
226
+ if (options.json) await fs.writeFile(fromCwd(options.json), `${JSON.stringify(report, null, 2)}\n`);
227
+ });
213
228
  program.command("build").argument("[args...]", `build to run: ${[...availableServices, "packages"].join(", ")} (default: all)`).description("run build command").action(async (args) => {
214
229
  await runBuild(args, projectRoot);
215
230
  });
@@ -1,9 +1,9 @@
1
1
  import path from "node:path";
2
- import os from "node:os";
3
- import spawn from "nano-spawn";
4
- import crypto from "node:crypto";
5
2
  import fs from "node:fs/promises";
3
+ import spawn from "nano-spawn";
6
4
  import yoctoSpinner from "yocto-spinner";
5
+ import os from "node:os";
6
+ import crypto from "node:crypto";
7
7
  import YAML from "yaml";
8
8
 
9
9
  //#region src/commands/e2e.ts
@@ -1,7 +1,7 @@
1
1
  import { existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
2
2
  import { basename, join } from "node:path";
3
- import { tmpdir } from "node:os";
4
3
  import spawn from "nano-spawn";
4
+ import { tmpdir } from "node:os";
5
5
 
6
6
  //#region src/commands/merge.ts
7
7
  /**
@@ -2,8 +2,8 @@ import { cliRoot, readProvenance } from "./provenance.mjs";
2
2
  import { checkSourceAccess } from "../source.mjs";
3
3
  import { mkdtempSync, rmSync } from "node:fs";
4
4
  import { join } from "node:path";
5
- import { tmpdir } from "node:os";
6
5
  import spawn from "nano-spawn";
6
+ import { tmpdir } from "node:os";
7
7
 
8
8
  //#region src/commands/scaffold.ts
9
9
  /** The scaffold itself: POSIX sh, runs standalone. The TS commands only call it. */
@@ -0,0 +1,3 @@
1
+ import { a as renameThemeKeysInCss, c as themeKeyForms, i as renameCssVars, l as themeKeysSkipMarker, n as isStyleValueProp, o as renameThemeKeysInSource, r as listThemeKeyFiles, s as runThemeKeys, t as formatThemeKeysReport } from "../themeKeys-DUM-GCcW.mjs";
2
+
3
+ export { formatThemeKeysReport, isStyleValueProp, listThemeKeyFiles, renameCssVars, renameThemeKeysInCss, renameThemeKeysInSource, runThemeKeys, themeKeyForms, themeKeysSkipMarker };
@@ -1,9 +1,9 @@
1
1
  import fsSync from "node:fs";
2
2
  import path from "node:path";
3
- import spawn from "nano-spawn";
4
3
  import fs from "node:fs/promises";
5
- import YAML from "yaml";
6
4
  import { waitForFrappe, waitForKeycloak, waitForMariaDB, waitForPostgres } from "@multiplatform.one/utils/dev";
5
+ import spawn from "nano-spawn";
6
+ import YAML from "yaml";
7
7
 
8
8
  //#region src/commands/verbs.ts
9
9
  const availableServices = [
package/lib/source.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "cliVersion": "9.17.0",
2
+ "cliVersion": "10.0.0",
3
3
  "url": "https://git.corp.bitspur.com/multiplatform.one/mpo.git",
4
- "sha": "41dee056a4eaa53669d7c617407f94d3478c9187"
4
+ "sha": "f668ffcc2b91273528dee962d82ac7ada952e1d8"
5
5
  }