teamix-evo 0.14.3 → 0.15.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.
package/dist/index.js CHANGED
@@ -5059,8 +5059,7 @@ var DEFAULT_UI_ALIASES = {
5059
5059
  hooks: "src/hooks",
5060
5060
  utils: "src/lib/utils",
5061
5061
  lib: "src/lib",
5062
- business: "src/components/business",
5063
- blocks: "src/blocks"
5062
+ business: "src/components/business"
5064
5063
  };
5065
5064
  var DEFAULT_UI_ICON_LIBRARY = "lucide";
5066
5065
  async function runUiInit(options) {
@@ -5076,8 +5075,7 @@ async function runUiInit(options) {
5076
5075
  hooks: options.aliases?.hooks ?? DEFAULT_UI_ALIASES.hooks,
5077
5076
  utils: options.aliases?.utils ?? DEFAULT_UI_ALIASES.utils,
5078
5077
  lib: options.aliases?.lib ?? DEFAULT_UI_ALIASES.lib,
5079
- business: options.aliases?.business ?? DEFAULT_UI_ALIASES.business,
5080
- blocks: options.aliases?.blocks ?? DEFAULT_UI_ALIASES.blocks
5078
+ business: options.aliases?.business ?? DEFAULT_UI_ALIASES.business
5081
5079
  };
5082
5080
  const iconLibrary = options.iconLibrary ?? DEFAULT_UI_ICON_LIBRARY;
5083
5081
  const tsx = options.tsx ?? true;
@@ -5169,8 +5167,7 @@ async function resolveConfig(opts) {
5169
5167
  hooks: opts.hooks ?? DEFAULT_UI_ALIASES.hooks,
5170
5168
  utils: opts.utils ?? DEFAULT_UI_ALIASES.utils,
5171
5169
  lib: opts.lib ?? DEFAULT_UI_ALIASES.lib,
5172
- business: DEFAULT_UI_ALIASES.business,
5173
- blocks: DEFAULT_UI_ALIASES.blocks
5170
+ business: DEFAULT_UI_ALIASES.business
5174
5171
  },
5175
5172
  iconLibrary: opts.iconLibrary ?? "lucide",
5176
5173
  tsx: opts.tsx ?? true,
@@ -5218,8 +5215,7 @@ async function resolveConfig(opts) {
5218
5215
  hooks,
5219
5216
  utils,
5220
5217
  lib,
5221
- business: DEFAULT_UI_ALIASES.business,
5222
- blocks: DEFAULT_UI_ALIASES.blocks
5218
+ business: DEFAULT_UI_ALIASES.business
5223
5219
  },
5224
5220
  iconLibrary,
5225
5221
  tsx: tsxAns,
@@ -5274,8 +5270,7 @@ var SOURCE_ROOT_TO_ALIAS_KEY = {
5274
5270
  components: "components",
5275
5271
  hooks: "hooks",
5276
5272
  utils: "utils",
5277
- lib: "lib",
5278
- blocks: "blocks"
5273
+ lib: "lib"
5279
5274
  };
5280
5275
  function rewriteImports(source, aliases, opts) {
5281
5276
  const shouldFlatten = opts?.flatten !== false;
@@ -5284,7 +5279,7 @@ function rewriteImports(source, aliases, opts) {
5284
5279
  (full, quote, root, rest) => {
5285
5280
  const aliasKey = SOURCE_ROOT_TO_ALIAS_KEY[root];
5286
5281
  if (!aliasKey) return full;
5287
- const alias = aliases[aliasKey];
5282
+ const alias = aliases[aliasKey] ?? `src/${root}`;
5288
5283
  const normalized = aliasToImportPath(alias);
5289
5284
  const resolvedRest = shouldFlatten ? flattenRestPath(rest) : rest ?? "";
5290
5285
  return `${quote}${normalized}${resolvedRest}${quote}`;
@@ -6042,13 +6037,11 @@ import * as fs22 from "fs/promises";
6042
6037
  import * as path27 from "path";
6043
6038
  var PACKAGE_NAME = {
6044
6039
  ui: "@teamix-evo/ui",
6045
- "biz-ui": "@teamix-evo/biz-ui",
6046
- blocks: "@teamix-evo/blocks"
6040
+ "biz-ui": "@teamix-evo/biz-ui"
6047
6041
  };
6048
6042
  var ALIAS_KEY = {
6049
6043
  ui: "components",
6050
- "biz-ui": "business",
6051
- blocks: "blocks"
6044
+ "biz-ui": "business"
6052
6045
  };
6053
6046
  var COMPONENT_FILE_RE = /\.(tsx|ts)$/;
6054
6047
  var SKIP_FILENAMES = /* @__PURE__ */ new Set(["index.ts", "index.tsx"]);
@@ -6064,7 +6057,7 @@ async function detectComponentLineage(options) {
6064
6057
  );
6065
6058
  const installedPkg = findInstalledPackage(installed, PACKAGE_NAME[category]);
6066
6059
  const registeredIds = installedPkg ? extractIds(installedPkg).sort() : [];
6067
- const layout = category === "blocks" ? "directory" : "flat";
6060
+ const layout = "flat";
6068
6061
  const onDiskIds = installDirExists ? await listComponentIds(installDirAbs, layout) : [];
6069
6062
  const registeredSet = new Set(registeredIds);
6070
6063
  const unregisteredIds = onDiskIds.filter((id) => !registeredSet.has(id)).sort();
@@ -6089,7 +6082,7 @@ async function detectComponentLineage(options) {
6089
6082
  function resolveInstallDir(category, config) {
6090
6083
  const aliasMap = config?.packages?.ui?.aliases ?? config?.packages?.["biz-ui"]?.aliases ?? DEFAULT_UI_ALIASES;
6091
6084
  const key = ALIAS_KEY[category];
6092
- return aliasMap[key] ?? DEFAULT_UI_ALIASES[key];
6085
+ return aliasMap[key] ?? DEFAULT_UI_ALIASES[key] ?? "src/blocks";
6093
6086
  }
6094
6087
  function extractIds(pkg) {
6095
6088
  const ids = /* @__PURE__ */ new Set();
@@ -6143,8 +6136,7 @@ var TEAMIX_DIR4 = ".teamix-evo";
6143
6136
  var STAGING_DIR = ".upgrade-staging";
6144
6137
  var PACKAGE_NAME2 = {
6145
6138
  ui: "@teamix-evo/ui",
6146
- "biz-ui": "@teamix-evo/biz-ui",
6147
- blocks: "@teamix-evo/blocks"
6139
+ "biz-ui": "@teamix-evo/biz-ui"
6148
6140
  };
6149
6141
  function isoToFsSafe2(iso) {
6150
6142
  return iso.replace(/[:.]/g, "-");
@@ -6669,7 +6661,7 @@ async function runUiUpgrade(options) {
6669
6661
  const { projectRoot, category, ids = [], trigger } = options;
6670
6662
  const config = await readProjectConfig(projectRoot);
6671
6663
  if (!config) return { status: "not-initialized" };
6672
- const cfgKey = category === "blocks" ? "blocks" : category === "ui" ? "ui" : "biz-ui";
6664
+ const cfgKey = category === "ui" ? "ui" : "biz-ui";
6673
6665
  if (!config.packages?.[cfgKey]) {
6674
6666
  return { status: "not-installed", detail: `${category} not installed` };
6675
6667
  }
@@ -6733,21 +6725,6 @@ async function runUiUpgrade(options) {
6733
6725
  }
6734
6726
  async function buildStaging(args) {
6735
6727
  const { category, projectRoot, aliases, lineageReport, trigger, onlyIds } = args;
6736
- if (category === "blocks") {
6737
- const root = args.blocksPackageRoot ?? resolvePackageRoot4("@teamix-evo/blocks");
6738
- const manifest = await loadUiPackageManifest3(root);
6739
- manifest.version = await readPkgVersion(root);
6740
- return buildUiUpgradeStaging({
6741
- projectRoot,
6742
- category,
6743
- manifest,
6744
- packageRoot: root,
6745
- aliases,
6746
- lineageReport,
6747
- trigger,
6748
- onlyIds
6749
- });
6750
- }
6751
6728
  if (category === "ui") {
6752
6729
  const root = args.uiPackageRoot ?? resolvePackageRoot4("@teamix-evo/ui");
6753
6730
  const manifest = await loadUiPackageManifest3(root);
@@ -6822,12 +6799,6 @@ var META = {
6822
6799
  installDirHint: "src/components/business",
6823
6800
  notInstalledHint: "npx teamix-evo biz-ui add <id>",
6824
6801
  trigger: "biz-ui-upgrade"
6825
- },
6826
- blocks: {
6827
- category: "blocks",
6828
- installDirHint: "src/blocks",
6829
- notInstalledHint: "npx teamix-evo blocks add <id>",
6830
- trigger: "blocks-upgrade"
6831
6802
  }
6832
6803
  };
6833
6804
  function makeUpgradeCommand(category) {
@@ -8076,11 +8047,12 @@ async function runBlocksAdd(options) {
8076
8047
  ) ?? { schemaVersion: 1, installed: [] };
8077
8048
  const idx = installed.installed.findIndex((p2) => p2.package === packageName);
8078
8049
  const prior = idx >= 0 ? installed.installed[idx] : null;
8050
+ const aliases = { ...uiCfg.aliases, blocks: uiCfg.aliases.blocks ?? "src/blocks" };
8079
8051
  const result = await installUiEntries({
8080
8052
  projectRoot,
8081
8053
  manifest,
8082
8054
  packageRoot,
8083
- aliases: uiCfg.aliases,
8055
+ aliases,
8084
8056
  requested: ids,
8085
8057
  skipExisting: !overwrite,
8086
8058
  flatten: false,
@@ -8216,16 +8188,12 @@ var listCommand5 = new Command32("list").description("\u5217\u51FA @teamix-evo/b
8216
8188
  }
8217
8189
  );
8218
8190
 
8219
- // src/commands/blocks/update.ts
8220
- var updateCommand5 = makeUpgradeCommand("blocks");
8221
-
8222
8191
  // src/commands/blocks/index.ts
8223
8192
  var blocksCommand = new Command33("blocks").description(
8224
8193
  "\u7BA1\u7406 marketing blocks\uFF08\u6E90\u7801\u6CE8\u5165\u5F0F\u5B89\u88C5\uFF0Ctoken \u9A71\u52A8\u6362\u80A4\uFF09"
8225
8194
  );
8226
8195
  blocksCommand.addCommand(addCommand4);
8227
8196
  blocksCommand.addCommand(listCommand5);
8228
- blocksCommand.addCommand(updateCommand5);
8229
8197
 
8230
8198
  // src/commands/lint/index.ts
8231
8199
  import { Command as Command35 } from "commander";
@@ -9486,8 +9454,8 @@ function summarizeInstalled(manifest) {
9486
9454
  entries
9487
9455
  };
9488
9456
  }
9489
- var updateCommand6 = new Command37("update").description(
9490
- "Teamix Evo \u5957\u4EF6\u66F4\u65B0\uFF08tokens / skills / ui / biz-ui / blocks \u7248\u672C\u68C0\u6D4B + staging \u751F\u6210\uFF09"
9457
+ var updateCommand5 = new Command37("update").description(
9458
+ "Teamix Evo \u5957\u4EF6\u66F4\u65B0\uFF08tokens / skills / ui / biz-ui \u7248\u672C\u68C0\u6D4B + staging \u751F\u6210\uFF09"
9491
9459
  ).option("--cwd <dir>", "\u6307\u5B9A\u5DE5\u7A0B\u6839\u76EE\u5F55\uFF08\u9ED8\u8BA4\uFF1A\u5F53\u524D\u76EE\u5F55\uFF09").option("--json", "\u8F93\u51FA JSON \u683C\u5F0F\u7684\u66F4\u65B0\u62A5\u544A\uFF08\u4F9B AI skill \u6D88\u8D39\uFF09").action(async (opts) => {
9492
9460
  const cwd = path40.resolve(opts.cwd ?? process.cwd());
9493
9461
  try {
@@ -9509,7 +9477,7 @@ var updateCommand6 = new Command37("update").description(
9509
9477
  installed: summary,
9510
9478
  lint: lintVersions,
9511
9479
  agentsMd: agentsMdStatus,
9512
- hint: "\u4F7F\u7528 teamix-evo-manage skill \u5F15\u5BFC\u6267\u884C\u66F4\u65B0\u8BA1\u5212\uFF0C\u6216\u624B\u52A8\u8C03\u7528\u5B50\u547D\u4EE4\uFF1Atokens update / skills update / ui update / biz-ui update / blocks update"
9480
+ hint: "\u4F7F\u7528 teamix-evo-manage skill \u5F15\u5BFC\u6267\u884C\u66F4\u65B0\u8BA1\u5212\uFF0C\u6216\u624B\u52A8\u8C03\u7528\u5B50\u547D\u4EE4\uFF1Atokens update / skills update / ui update / biz-ui update"
9513
9481
  };
9514
9482
  if (opts.json) {
9515
9483
  console.log(JSON.stringify(report, null, 2));
@@ -9530,7 +9498,7 @@ var updateCommand6 = new Command37("update").description(
9530
9498
  "\u8BF7\u5728 AI IDE \u4E2D\u89E6\u53D1 teamix-evo-manage skill \u4EE5\u5F15\u5BFC\u66F4\u65B0\u8BA1\u5212\u3002"
9531
9499
  );
9532
9500
  logger.info(
9533
- "\u6216\u624B\u52A8\u8C03\u7528\u5B50\u547D\u4EE4\uFF1Atokens update / skills update / ui update / biz-ui update / blocks update"
9501
+ "\u6216\u624B\u52A8\u8C03\u7528\u5B50\u547D\u4EE4\uFF1Atokens update / skills update / ui update / biz-ui update"
9534
9502
  );
9535
9503
  }
9536
9504
  } catch (err) {
@@ -10298,7 +10266,7 @@ program.addCommand(bizUiCommand);
10298
10266
  program.addCommand(blocksCommand);
10299
10267
  program.addCommand(lintCommand);
10300
10268
  program.addCommand(initCommand5);
10301
- program.addCommand(updateCommand6);
10269
+ program.addCommand(updateCommand5);
10302
10270
  program.addCommand(migrateCommand);
10303
10271
  program.addCommand(restoreCommand);
10304
10272
  program.addCommand(switchCommand);