@temir.ra/create-test115 0.0.21 → 0.0.23

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/buildinfo.txt CHANGED
@@ -1 +1 @@
1
- 0.0.16+ac7caf3
1
+ 0.0.23+721f42d
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{cpSync as p,readFileSync as l,writeFileSync as m}from"fs";import{resolve as r,basename as f}from"path";import{fileURLToPath as u}from"url";var a=new URL(".",import.meta.url),d=new URL("../buildinfo.txt",a),i=new URL("../template",a);try{let e=process.argv[2];if(!e)throw Error("Destination path is required. Usage: `bun/npm create <template> <destination>`");let t=r(process.cwd(),e),o=f(t),c=r(u(i));p(c,t,{recursive:!0});let n=r(t,"package.json"),s=JSON.parse(l(n,"utf-8"));s.name=o,m(n,JSON.stringify(s,null,2)),console.log(`Template has been successfully instantiated at '${t}' with package name '${o}'.`)}catch(e){let t=e instanceof Error?e:Error(String(e));console.error("Error:",t.message),process.exit(1)}
2
+ import{cpSync as o,readFileSync as f,renameSync as d,writeFileSync as u}from"fs";import{resolve as t,basename as U}from"path";import{fileURLToPath as a}from"url";var n=new URL(".",import.meta.url),l=new URL("../CHANGELOG.md",n),p=new URL("../buildinfo.txt",n),m=new URL("../template",n);try{let r=process.argv[2];if(!r)throw Error("Destination path is required. Usage: `bun/npm create <template> <destination>`");let e=t(process.cwd(),r),i=U(e),g=t(a(m));o(g,e,{recursive:!0}),o(t(a(l)),t(e,"CHANGELOG-template.md")),o(t(a(p)),t(e,"buildinfo-template.txt"));let s=t(e,"package.json"),c=JSON.parse(f(s,"utf-8"));c.name=i,u(s,JSON.stringify(c,null,2)),d(t(e,"gitignore"),t(e,".gitignore")),console.log(`Template has been successfully instantiated at '${e}' with package name '${i}'.`)}catch(r){let e=r instanceof Error?r:Error(String(r));console.error("Error:",e.message),process.exit(1)}
3
3
 
4
- //# debugId=9C5A8315CD33C6E964756E2164756E21
4
+ //# debugId=BED85076F5B77B3B64756E2164756E21
@@ -2,10 +2,10 @@
2
2
  "version": 3,
3
3
  "sources": ["..\\src\\cli.ts", "..\\src\\urls.ts"],
4
4
  "sourcesContent": [
5
- "#!/usr/bin/env node\r\n\r\nimport { cpSync, readFileSync, writeFileSync } from 'fs';\r\nimport { resolve, basename } from 'path';\r\nimport { fileURLToPath } from 'url';\r\nimport { templateUrl } from './urls.js';\r\n\r\n\r\ntry {\r\n\r\n const dest = process.argv[2];\r\n if (!dest) throw new Error('Destination path is required. Usage: `bun/npm create <template> <destination>`');\r\n\r\n const destDir = resolve(process.cwd(), dest);\r\n const packageName = basename(destDir);\r\n\r\n const templateDir = resolve(fileURLToPath(templateUrl));\r\n\r\n cpSync(templateDir, destDir, { recursive: true });\r\n\r\n const packageManifestPath = resolve(destDir, 'package.json');\r\n const packageManifest = JSON.parse(readFileSync(packageManifestPath, 'utf-8'));\r\n\r\n packageManifest.name = packageName;\r\n\r\n writeFileSync(packageManifestPath, JSON.stringify(packageManifest, null, 2));\r\n\r\n console.log(`Template has been successfully instantiated at '${destDir}' with package name '${packageName}'.`);\r\n\r\n}\r\ncatch (error) {\r\n const err = error instanceof Error ? error : new Error(String(error));\r\n console.error('Error:', err.message);\r\n process.exit(1);\r\n}\r\n",
6
- "export const distUrl = new URL('.', import.meta.url);\r\nexport const buildinfoUrl = new URL('../buildinfo.txt', distUrl);\r\nexport const templateUrl = new URL('../template', distUrl);\r\n"
5
+ "#!/usr/bin/env node\r\n\r\nimport { cpSync, readFileSync, renameSync, writeFileSync } from 'fs';\r\nimport { resolve, basename } from 'path';\r\nimport { fileURLToPath } from 'url';\r\nimport { buildinfoUrl, changelogUrl, templateUrl } from './urls.js';\r\n\r\n\r\ntry {\r\n\r\n const dest = process.argv[2];\r\n if (!dest) throw new Error('Destination path is required. Usage: `bun/npm create <template> <destination>`');\r\n\r\n const destinationPath = resolve(process.cwd(), dest);\r\n const packageName = basename(destinationPath);\r\n\r\n const templatePath = resolve(fileURLToPath(templateUrl));\r\n\r\n cpSync(templatePath, destinationPath, { recursive: true });\r\n cpSync(resolve(fileURLToPath(changelogUrl)), resolve(destinationPath, 'CHANGELOG-template.md'));\r\n cpSync(resolve(fileURLToPath(buildinfoUrl)), resolve(destinationPath, 'buildinfo-template.txt'));\r\n\r\n const packageManifestPath = resolve(destinationPath, 'package.json');\r\n const packageManifest = JSON.parse(readFileSync(packageManifestPath, 'utf-8'));\r\n packageManifest.name = packageName;\r\n writeFileSync(packageManifestPath, JSON.stringify(packageManifest, null, 2));\r\n\r\n renameSync(resolve(destinationPath, 'gitignore'), resolve(destinationPath, '.gitignore'));\r\n\r\n console.log(`Template has been successfully instantiated at '${destinationPath}' with package name '${packageName}'.`);\r\n\r\n}\r\ncatch (error) {\r\n const err = error instanceof Error ? error : new Error(String(error));\r\n console.error('Error:', err.message);\r\n process.exit(1);\r\n}\r\n",
6
+ "export const distUrl = new URL('.', import.meta.url);\r\nexport const changelogUrl = new URL('../CHANGELOG.md', distUrl);\r\nexport const buildinfoUrl = new URL('../buildinfo.txt', distUrl);\r\nexport const templateUrl = new URL('../template', distUrl);\r\n"
7
7
  ],
8
- "mappings": ";AAEA,iBAAS,kBAAQ,mBAAc,WAC/B,kBAAS,cAAS,aAClB,wBAAS,YCJF,IAAM,EAAU,IAAI,IAAI,IAAK,YAAY,GAAG,EACtC,EAAe,IAAI,IAAI,mBAAoB,CAAO,EAClD,EAAc,IAAI,IAAI,cAAe,CAAO,EDMzD,GAAI,CAEA,IAAM,EAAO,QAAQ,KAAK,GAC1B,GAAI,CAAC,EAAM,MAAU,MAAM,gFAAgF,EAE3G,IAAM,EAAU,EAAQ,QAAQ,IAAI,EAAG,CAAI,EACrC,EAAc,EAAS,CAAO,EAE9B,EAAc,EAAQ,EAAc,CAAW,CAAC,EAEtD,EAAO,EAAa,EAAS,CAAE,UAAW,EAAK,CAAC,EAEhD,IAAM,EAAsB,EAAQ,EAAS,cAAc,EACrD,EAAkB,KAAK,MAAM,EAAa,EAAqB,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C,KAAe,EAGzH,MAAO,EAAO,CACV,IAAM,EAAM,aAAiB,MAAQ,EAAY,MAAM,OAAO,CAAK,CAAC,EACpE,QAAQ,MAAM,SAAU,EAAI,OAAO,EACnC,QAAQ,KAAK,CAAC",
9
+ "debugId": "BED85076F5B77B3B64756E2164756E21",
10
10
  "names": []
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@temir.ra/create-test115",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "",
@@ -0,0 +1 @@
1
+ 0.0.0+ac7caf3
@@ -0,0 +1,4 @@
1
+ dist
2
+ node_modules
3
+ buildinfo.txt
4
+ *.tsbuildinfo