create-rstack 1.7.0 → 1.7.2

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
@@ -1355,6 +1355,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
1355
1355
  if ('truecolor' === env.COLORTERM) return 3;
1356
1356
  if ('xterm-kitty' === env.TERM) return 3;
1357
1357
  if ('xterm-ghostty' === env.TERM) return 3;
1358
+ if ('wezterm' === env.TERM) return 3;
1358
1359
  if ('TERM_PROGRAM' in env) {
1359
1360
  const version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
1360
1361
  switch(env.TERM_PROGRAM){
@@ -1489,6 +1490,14 @@ let LOG_TYPES = {
1489
1490
  color: magenta
1490
1491
  }
1491
1492
  };
1493
+ const normalizeErrorMessage = (err)=>{
1494
+ if (err.stack) {
1495
+ let [name, ...rest] = err.stack.split('\n');
1496
+ if (name.startsWith('Error: ')) name = name.slice(7);
1497
+ return `${name}\n${gray(rest.join('\n'))}`;
1498
+ }
1499
+ return err.message;
1500
+ };
1492
1501
  let createLogger = (options = {})=>{
1493
1502
  let maxLevel = options.level || 'info';
1494
1503
  let log = (type, message, ...args)=>{
@@ -1501,12 +1510,14 @@ let createLogger = (options = {})=>{
1501
1510
  label = (logType.label || '').padEnd(7);
1502
1511
  label = bold(logType.color ? logType.color(label) : label);
1503
1512
  }
1504
- if (message instanceof Error) if (message.stack) {
1505
- let [name, ...rest] = message.stack.split('\n');
1506
- if (name.startsWith('Error: ')) name = name.slice(7);
1507
- text = `${name}\n${gray(rest.join('\n'))}`;
1508
- } else text = message.message;
1509
- else if ('error' === logType.level && 'string' == typeof message) {
1513
+ if (message instanceof Error) {
1514
+ text += normalizeErrorMessage(message);
1515
+ const { cause } = message;
1516
+ if (cause) {
1517
+ text += yellow('\n [cause]: ');
1518
+ text += cause instanceof Error ? normalizeErrorMessage(cause) : String(cause);
1519
+ }
1520
+ } else if ('error' === logType.level && 'string' == typeof message) {
1510
1521
  let lines = message.split('\n');
1511
1522
  text = lines.map((line)=>isErrorStackMessage(line) ? gray(line) : line).join('\n');
1512
1523
  } else text = `${message}`;
@@ -1617,7 +1628,7 @@ async function create({ name, root, templates, skipFiles, getTemplateName, mapES
1617
1628
  }
1618
1629
  });
1619
1630
  console.log('');
1620
- src_logger.greet(`\u{25C6} Create ${upperFirst(name)} Project`);
1631
+ src_logger.greet(`◆ Create ${upperFirst(name)} Project`);
1621
1632
  if (argv.help) return void logHelpMessage(name, templates);
1622
1633
  const cwd = process.cwd();
1623
1634
  const pkgInfo = pkgFromUserAgent(process.env.npm_config_user_agent);
@@ -1798,21 +1809,25 @@ function parseAgentsContent(content) {
1798
1809
  const lines = content.split('\n');
1799
1810
  let currentKey = '';
1800
1811
  let currentTitle = '';
1812
+ let currentLevel = 0;
1801
1813
  let currentContent = [];
1802
1814
  for (const line of lines){
1803
- const sectionMatch = line.match(/^##\s+(.+)$/);
1815
+ const sectionMatch = line.match(/^(#{1,2})\s+(.+)$/);
1804
1816
  if (sectionMatch) {
1805
1817
  if (currentKey) sections[currentKey] = {
1806
1818
  title: currentTitle,
1819
+ level: currentLevel,
1807
1820
  content: currentContent.join('\n').trim()
1808
1821
  };
1809
- currentTitle = sectionMatch[1];
1810
- currentKey = sectionMatch[1].toLowerCase();
1822
+ currentLevel = sectionMatch[1].length;
1823
+ currentTitle = sectionMatch[2].trim();
1824
+ currentKey = `${currentLevel}-${currentTitle.toLowerCase()}`;
1811
1825
  currentContent = [];
1812
1826
  } else if (currentKey) currentContent.push(line);
1813
1827
  }
1814
1828
  if (currentKey) sections[currentKey] = {
1815
1829
  title: currentTitle,
1830
+ level: currentLevel,
1816
1831
  content: currentContent.join('\n').trim()
1817
1832
  };
1818
1833
  return sections;
@@ -1825,6 +1840,7 @@ function mergeAgentsFiles(agentsFiles) {
1825
1840
  for (const [key, section] of Object.entries(sections)){
1826
1841
  if (!allSections[key]) allSections[key] = {
1827
1842
  title: section.title,
1843
+ level: section.level,
1828
1844
  contents: []
1829
1845
  };
1830
1846
  if (section.content && !allSections[key].contents.includes(section.content)) allSections[key].contents.push(section.content);
@@ -1832,7 +1848,7 @@ function mergeAgentsFiles(agentsFiles) {
1832
1848
  }
1833
1849
  const result = [];
1834
1850
  for (const [, section] of Object.entries(allSections)){
1835
- result.push(`## ${section.title}`);
1851
+ result.push(`${'#'.repeat(section.level)} ${section.title}`);
1836
1852
  result.push('');
1837
1853
  for (const content of section.contents){
1838
1854
  result.push(content);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rstack",
3
- "version": "1.7.0",
3
+ "version": "1.7.2",
4
4
  "description": "Create a new Rstack project",
5
5
  "repository": {
6
6
  "type": "git",
@@ -40,21 +40,21 @@
40
40
  ]
41
41
  },
42
42
  "devDependencies": {
43
- "@biomejs/biome": "2.2.3",
43
+ "@biomejs/biome": "2.3.2",
44
44
  "@clack/prompts": "^0.11.0",
45
- "@microsoft/api-extractor": "^7.52.11",
46
- "@rslib/core": "0.13.0",
47
- "@rstest/core": "0.3.2",
45
+ "@microsoft/api-extractor": "^7.53.3",
46
+ "@rslib/core": "0.17.0",
47
+ "@rstest/core": "0.6.1",
48
48
  "@types/minimist": "^1.2.5",
49
- "@types/node": "22.18.1",
49
+ "@types/node": "24.9.2",
50
50
  "deepmerge": "^4.3.1",
51
51
  "minimist": "^1.2.8",
52
52
  "picocolors": "^1.1.1",
53
- "rslog": "^1.2.11",
53
+ "rslog": "^1.3.0",
54
54
  "simple-git-hooks": "^2.13.1",
55
- "typescript": "^5.9.2"
55
+ "typescript": "^5.9.3"
56
56
  },
57
- "packageManager": "pnpm@10.15.1",
57
+ "packageManager": "pnpm@10.20.0",
58
58
  "publishConfig": {
59
59
  "access": "public",
60
60
  "registry": "https://registry.npmjs.org/"
@@ -7,6 +7,6 @@
7
7
  "format": "biome format --write"
8
8
  },
9
9
  "devDependencies": {
10
- "@biomejs/biome": "2.2.3"
10
+ "@biomejs/biome": "2.3.2"
11
11
  }
12
12
  }
@@ -10,7 +10,7 @@ export default defineConfig([
10
10
  files: ['**/*.{js,jsx}'],
11
11
  extends: [
12
12
  js.configs.recommended,
13
- reactHooks.configs['recommended-latest'],
13
+ reactHooks.configs.flat['recommended-latest'],
14
14
  reactRefresh.configs.recommended,
15
15
  ],
16
16
  languageOptions: {
@@ -6,10 +6,10 @@
6
6
  "lint": "eslint ."
7
7
  },
8
8
  "devDependencies": {
9
- "@eslint/js": "^9.35.0",
10
- "eslint": "^9.35.0",
11
- "eslint-plugin-react-hooks": "^7.0.0",
12
- "eslint-plugin-react-refresh": "^0.4.20",
13
- "globals": "^16.3.0"
9
+ "@eslint/js": "^9.39.0",
10
+ "eslint": "^9.39.0",
11
+ "eslint-plugin-react-hooks": "^7.0.1",
12
+ "eslint-plugin-react-refresh": "^0.4.24",
13
+ "globals": "^16.4.0"
14
14
  }
15
15
  }
@@ -12,7 +12,7 @@ export default defineConfig([
12
12
  extends: [
13
13
  js.configs.recommended,
14
14
  tseslint.configs.recommended,
15
- reactHooks.configs['recommended-latest'],
15
+ reactHooks.configs.flat['recommended-latest'],
16
16
  reactRefresh.configs.recommended,
17
17
  ],
18
18
  languageOptions: {
@@ -6,11 +6,11 @@
6
6
  "lint": "eslint ."
7
7
  },
8
8
  "devDependencies": {
9
- "@eslint/js": "^9.35.0",
10
- "eslint": "^9.35.0",
11
- "eslint-plugin-react-hooks": "^7.0.0",
12
- "eslint-plugin-react-refresh": "^0.4.20",
13
- "globals": "^16.3.0",
14
- "typescript-eslint": "^8.43.0"
9
+ "@eslint/js": "^9.39.0",
10
+ "eslint": "^9.39.0",
11
+ "eslint-plugin-react-hooks": "^7.0.1",
12
+ "eslint-plugin-react-refresh": "^0.4.24",
13
+ "globals": "^16.4.0",
14
+ "typescript-eslint": "^8.46.2"
15
15
  }
16
16
  }
@@ -6,9 +6,9 @@
6
6
  "lint": "eslint ."
7
7
  },
8
8
  "devDependencies": {
9
- "@eslint/js": "^9.35.0",
10
- "eslint": "^9.35.0",
11
- "eslint-plugin-svelte": "^3.12.2",
12
- "globals": "^16.3.0"
9
+ "@eslint/js": "^9.39.0",
10
+ "eslint": "^9.39.0",
11
+ "eslint-plugin-svelte": "^3.13.0",
12
+ "globals": "^16.4.0"
13
13
  }
14
14
  }
@@ -6,11 +6,11 @@
6
6
  "lint": "eslint ."
7
7
  },
8
8
  "devDependencies": {
9
- "@eslint/js": "^9.35.0",
10
- "eslint": "^9.35.0",
11
- "eslint-plugin-svelte": "^3.12.2",
12
- "globals": "^16.3.0",
13
- "typescript-eslint": "^8.43.0"
9
+ "@eslint/js": "^9.39.0",
10
+ "eslint": "^9.39.0",
11
+ "eslint-plugin-svelte": "^3.13.0",
12
+ "globals": "^16.4.0",
13
+ "typescript-eslint": "^8.46.2"
14
14
  },
15
15
  "type": "module"
16
16
  }
@@ -6,8 +6,8 @@
6
6
  "lint": "eslint ."
7
7
  },
8
8
  "devDependencies": {
9
- "@eslint/js": "^9.35.0",
10
- "eslint": "^9.35.0",
11
- "globals": "^16.3.0"
9
+ "@eslint/js": "^9.39.0",
10
+ "eslint": "^9.39.0",
11
+ "globals": "^16.4.0"
12
12
  }
13
13
  }
@@ -6,9 +6,9 @@
6
6
  "lint": "eslint ."
7
7
  },
8
8
  "devDependencies": {
9
- "@eslint/js": "^9.35.0",
10
- "eslint": "^9.35.0",
11
- "globals": "^16.3.0",
12
- "typescript-eslint": "^8.43.0"
9
+ "@eslint/js": "^9.39.0",
10
+ "eslint": "^9.39.0",
11
+ "globals": "^16.4.0",
12
+ "typescript-eslint": "^8.46.2"
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "lint": "eslint ."
7
7
  },
8
8
  "devDependencies": {
9
- "@eslint/js": "^9.35.0",
10
- "eslint": "^9.35.0",
11
- "eslint-plugin-vue": "^10.4.0",
12
- "globals": "^16.3.0"
9
+ "@eslint/js": "^9.39.0",
10
+ "eslint": "^9.39.0",
11
+ "eslint-plugin-vue": "^10.5.1",
12
+ "globals": "^16.4.0"
13
13
  }
14
14
  }
@@ -7,9 +7,9 @@
7
7
  },
8
8
  "devDependencies": {
9
9
  "@vue/eslint-config-typescript": "^14.6.0",
10
- "eslint": "^9.35.0",
11
- "eslint-plugin-vue": "^10.4.0",
12
- "globals": "^16.3.0",
13
- "typescript-eslint": "^8.43.0"
10
+ "eslint": "^9.39.0",
11
+ "eslint-plugin-vue": "^10.5.1",
12
+ "globals": "^16.4.0",
13
+ "typescript-eslint": "^8.46.2"
14
14
  }
15
15
  }