copit 1.2.0 → 1.2.1

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.
Files changed (2) hide show
  1. package/dist/index.js +7 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -40940,8 +40940,11 @@ var TemplateList = () => {
40940
40940
  const handleConfirmedCopy = async (template) => {
40941
40941
  setConfirmState({ type: "copying" });
40942
40942
  try {
40943
- const destPath = await copyTemplateToDir(template, process.cwd());
40944
- setConfirmState({ type: "done", message: `✅ Copied to: ${destPath}` });
40943
+ await copyTemplateToDir(template, process.cwd());
40944
+ setConfirmState({
40945
+ type: "done",
40946
+ message: `✅ Copied: ${template.relativePath}`
40947
+ });
40945
40948
  setTimeout(() => setConfirmState({ type: "idle" }), 2000);
40946
40949
  } catch (error) {
40947
40950
  const message = error instanceof Error ? error.message : "Unknown error";
@@ -40971,7 +40974,7 @@ var TemplateList = () => {
40971
40974
  const destPath = getDestPath(process.cwd(), template.relativePath);
40972
40975
  const exists = await checkFileExists(destPath);
40973
40976
  if (exists) {
40974
- setConfirmState({ type: "confirmingOverwrite", template, destPath });
40977
+ setConfirmState({ type: "confirmingOverwrite", template });
40975
40978
  } else {
40976
40979
  await handleConfirmedCopy(template);
40977
40980
  }
@@ -40990,7 +40993,7 @@ var TemplateList = () => {
40990
40993
  color: "yellow"
40991
40994
  }, "⚠️ File already exists"), /* @__PURE__ */ import_react24.default.createElement(Box_default, {
40992
40995
  marginTop: 1
40993
- }, /* @__PURE__ */ import_react24.default.createElement(Text, null, "Overwrite ", confirmState.destPath, "?")), /* @__PURE__ */ import_react24.default.createElement(Box_default, {
40996
+ }, /* @__PURE__ */ import_react24.default.createElement(Text, null, "Overwrite ", confirmState.template.relativePath, "?")), /* @__PURE__ */ import_react24.default.createElement(Box_default, {
40994
40997
  marginTop: 1
40995
40998
  }, /* @__PURE__ */ import_react24.default.createElement(Text, {
40996
40999
  dimColor: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "copit",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "TUI tool for managing local file templates - register and copy config files to new projects",
5
5
  "module": "src/index.tsx",
6
6
  "type": "module",