@conceptcraft/mindframes 0.1.39 → 0.3.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.
@@ -19,42 +19,52 @@ const cliPath = join(__dirname, "cli.js");
19
19
  * e.g. "ccr" → "conceptcraft", "mf" → "mindframes"
20
20
  */
21
21
  function detectBrandId() {
22
- const COMMAND_TO_BRAND = { cc: "conceptcraft", ccr: "conceptcraft", conceptcraft: "conceptcraft", mf: "mindframes", mindframes: "mindframes" };
23
- try {
24
- const pkg = JSON.parse(readFileSync(join(__dirname, "..", "package.json"), "utf-8"));
25
- const firstBin = Object.keys(pkg.bin ?? {})[0] ?? "";
26
- return COMMAND_TO_BRAND[firstBin] ?? "conceptcraft";
27
- } catch {
28
- return "conceptcraft";
29
- }
22
+ const COMMAND_TO_BRAND = {
23
+ cc: "conceptcraft",
24
+ ccr: "conceptcraft",
25
+ conceptcraft: "conceptcraft",
26
+ mf: "mindframes",
27
+ mindframes: "mindframes",
28
+ };
29
+ try {
30
+ const pkg = JSON.parse(
31
+ readFileSync(join(__dirname, "..", "package.json"), "utf-8"),
32
+ );
33
+ const firstBin = Object.keys(pkg.bin ?? {})[0] ?? "";
34
+ return COMMAND_TO_BRAND[firstBin] ?? "conceptcraft";
35
+ } catch {
36
+ return "conceptcraft";
37
+ }
30
38
  }
31
39
 
32
40
  /**
33
41
  * External skills to install via npx skills add
34
42
  */
35
43
  const EXTERNAL_SKILLS = [
36
- // { repo: "https://github.com/remotion-dev/skills", skill: "remotion-best-practices" },
44
+ // { repo: "https://github.com/remotion-dev/skills", skill: "remotion-best-practices" },
37
45
  ];
38
46
 
39
47
  function silentRun(command, env) {
40
- try {
41
- execSync(command, { stdio: "pipe", env: { ...process.env, ...env } });
42
- return true;
43
- } catch {
44
- return false;
45
- }
48
+ try {
49
+ execSync(command, { stdio: "pipe", env: { ...process.env, ...env } });
50
+ return true;
51
+ } catch {
52
+ return false;
53
+ }
46
54
  }
47
55
 
48
56
  async function main() {
49
- const brandId = detectBrandId();
50
- silentRun(`node "${cliPath}" skill install --force`, { CC_BRAND_ID: brandId });
57
+ const brandId = detectBrandId();
58
+ silentRun(`node "${cliPath}" skill install --force`, {
59
+ CC_BRAND_ID: brandId,
60
+ });
51
61
 
52
- for (const { repo, skill } of EXTERNAL_SKILLS) {
53
- silentRun(`npx skills add ${repo} --skill ${skill} -y -g`);
54
- }
62
+ for (const { repo, skill } of EXTERNAL_SKILLS) {
63
+ silentRun(`npx skills add ${repo} --skill ${skill} -y -g`);
64
+ }
55
65
  }
56
66
 
57
67
  // Always exit successfully - postinstall failures should not block npm install
58
68
  main()
59
- .catch(() => {})
60
- .finally(() => process.exit(0));
69
+ .catch(() => {})
70
+ .finally(() => process.exit(0));