create-rstack 1.7.15 → 1.7.17

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.d.ts CHANGED
@@ -75,7 +75,11 @@ declare type ExtraTool = {
75
75
  /**
76
76
  * The action to perform when the tool is selected.
77
77
  */
78
- action?: () => unknown;
78
+ action?: (context: {
79
+ templateName: string;
80
+ distFolder: string;
81
+ addAgentsMdSearchDirs: (dir: string) => void;
82
+ }) => unknown;
79
83
  /**
80
84
  * The custom command to run when the tool is selected.
81
85
  */
package/dist/index.js CHANGED
@@ -2195,7 +2195,7 @@ async function create({ name, root, templates, skipFiles, getTemplateName, mapES
2195
2195
  const { isAgent } = await (0, dist.determineAgent)();
2196
2196
  if (isAgent) {
2197
2197
  console.log('');
2198
- src_logger.info('To create a project non-interactively, run: npx -y create-rsbuild <DIR> --template <TEMPLATE>');
2198
+ src_logger.info(`To create a project non-interactively, run: npx -y create-${name} <DIR> --template <TEMPLATE>`);
2199
2199
  }
2200
2200
  const argv = parseArgv(processArgv);
2201
2201
  if (argv.help) return void logHelpMessage(name, templates, extraTools);
@@ -2263,7 +2263,11 @@ async function create({ name, root, templates, skipFiles, getTemplateName, mapES
2263
2263
  if (extraTools) {
2264
2264
  const matchedTool = extraTools.find((extraTool)=>extraTool.value === tool);
2265
2265
  if (matchedTool) {
2266
- if (matchedTool.action) await matchedTool.action();
2266
+ if (matchedTool.action) await matchedTool.action({
2267
+ templateName,
2268
+ distFolder,
2269
+ addAgentsMdSearchDirs: (dir)=>agentsMdSearchDirs.push(dir)
2270
+ });
2267
2271
  if (matchedTool.command) runCommand(matchedTool.command, distFolder);
2268
2272
  continue;
2269
2273
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rstack",
3
- "version": "1.7.15",
3
+ "version": "1.7.17",
4
4
  "description": "Create a new Rstack project",
5
5
  "repository": {
6
6
  "type": "git",