@temir.ra/create-test115 0.0.17 → 0.0.19
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/README.md +5 -5
- package/dist/cli.bundle.js +4 -0
- package/dist/{index.bundle.js.map → cli.bundle.js.map} +4 -4
- package/package.json +4 -3
- package/dist/index.bundle.js +0 -4
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -25
- package/dist/urls.d.ts +0 -4
- package/dist/urls.d.ts.map +0 -1
- package/dist/urls.js +0 -3
- package/template/bun.lock +0 -23
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ This package serves as a template for creating Bun libraries. It includes a basi
|
|
|
23
23
|
# placeholder:
|
|
24
24
|
# <PACKAGE: <PACKAGE>
|
|
25
25
|
|
|
26
|
-
bun create
|
|
26
|
+
bun create --no-install --no-git "@temir.ra/test115" <PACKAGE>
|
|
27
27
|
cd <PACKAGE>
|
|
28
28
|
|
|
29
29
|
bun install
|
|
@@ -205,7 +205,7 @@ When building the library for distribution, the `tsconfig.build.json` configurat
|
|
|
205
205
|
},
|
|
206
206
|
|
|
207
207
|
// specifies the entry point for the CLI executable exposed when the package is installed globally or as a dependency
|
|
208
|
-
"bin": "./dist/cli.js",
|
|
208
|
+
"bin": "./dist/cli.bundle.js",
|
|
209
209
|
|
|
210
210
|
// files to include in the published package
|
|
211
211
|
"files": [
|
|
@@ -234,7 +234,7 @@ When building the library for distribution, the `tsconfig.build.json` configurat
|
|
|
234
234
|
"build:lib-bundle": "bun run scripts/build-lib-bundle.ts",
|
|
235
235
|
|
|
236
236
|
// builds the CLI (set by "bin" field) for distribution
|
|
237
|
-
"build:cli-bundle": "bun build src/cli.ts --outdir dist --target node --format esm --minify --sourcemap=external",
|
|
237
|
+
"build:cli-bundle": "bun build src/cli.ts --entry-naming \"[dir]/[name].bundle.[ext]\" --outdir dist --target node --format esm --minify --sourcemap=external",
|
|
238
238
|
|
|
239
239
|
// type checks the TypeScript source files without emitting any output
|
|
240
240
|
"typecheck": "tsc --noEmit",
|
|
@@ -286,13 +286,13 @@ If the package is intended to be used as a CLI tool, the `"bin"` field should po
|
|
|
286
286
|
```json
|
|
287
287
|
{
|
|
288
288
|
"exports": ...,
|
|
289
|
-
"bin": "./dist/cli.js",
|
|
289
|
+
"bin": "./dist/cli.bundle.js",
|
|
290
290
|
"files": ...,
|
|
291
291
|
"scripts": {
|
|
292
292
|
...,
|
|
293
293
|
"build": "... && bun run build:cli-bundle",
|
|
294
294
|
...,
|
|
295
|
-
"build:cli-bundle": "bun build src/cli.ts --outdir dist --target node --format esm --minify --sourcemap=external",
|
|
295
|
+
"build:cli-bundle": "bun build src/cli.ts --entry-naming \"[dir]/[name].bundle.[ext]\" --outdir dist --target node --format esm --minify --sourcemap=external",
|
|
296
296
|
...,
|
|
297
297
|
}
|
|
298
298
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
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)}
|
|
3
|
+
|
|
4
|
+
//# debugId=9C5A8315CD33C6E964756E2164756E21
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["..\\src\\
|
|
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
|
|
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
6
|
"export const distUrl = new URL('.', import.meta.url);\r\nexport const buildinfoUrl = new URL('../buildinfo.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AAc,EAAqB,KAAK,UAAU,EAAiB,KAAM,CAAC,CAAC,EAE3E,QAAQ,IAAI,mDAAmD,yBAA+B,KAAe,EAGjH,MAAO,EAAO,CACV,IAAM,EAAM,aAAiB,MAAQ,EAAY,MAAM,OAAO,CAAK,CAAC,EACpE,QAAQ,MAAM,SAAU,EAAI,OAAO,EACnC,QAAQ,KAAK,CAAC",
|
|
9
|
+
"debugId": "9C5A8315CD33C6E964756E2164756E21",
|
|
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.
|
|
3
|
+
"version": "0.0.19",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"types": "./dist/index.d.ts"
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
|
-
"bin": "./dist/
|
|
23
|
+
"bin": "./dist/cli.bundle.js",
|
|
24
24
|
"files": [
|
|
25
25
|
"dist",
|
|
26
26
|
"CHANGELOG.md",
|
|
@@ -31,9 +31,10 @@
|
|
|
31
31
|
"clean": "rm -rf dist/",
|
|
32
32
|
"prebuild": "bun run scripts/buildinfo.ts",
|
|
33
33
|
"test": "bun test",
|
|
34
|
-
"build": "bun run build:lib && bun run build:lib-bundle",
|
|
34
|
+
"build": "bun run build:lib && bun run build:lib-bundle && bun run build:cli-bundle",
|
|
35
35
|
"build:lib": "tsc --project tsconfig.build.json",
|
|
36
36
|
"build:lib-bundle": "bun run scripts/build-lib-bundle.ts",
|
|
37
|
+
"build:cli-bundle": "bun build src/cli.ts --entry-naming \"[dir]/[name].bundle.[ext]\" --outdir dist --target node --format esm --minify --sourcemap=external",
|
|
37
38
|
"typecheck": "tsc --noEmit",
|
|
38
39
|
"dev": "bun run --watch src/dev.ts"
|
|
39
40
|
},
|
package/dist/index.bundle.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{cpSync as p,readFileSync as l,writeFileSync as m}from"fs";import{resolve as o,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=o(process.cwd(),e),n=f(t),c=o(u(i));p(c,t,{recursive:!0});let s=o(t,"package.json"),r=JSON.parse(l(s,"utf-8"));r.name=n,r.version="0.0.0",m(s,JSON.stringify(r,null,2)),console.log(`Template has been successfully instantiated at '${t}' with package name '${n}'.`)}catch(e){let t=e instanceof Error?e:Error(String(e));console.error("Error:",t.message),process.exit(1)}
|
|
3
|
-
|
|
4
|
-
//# debugId=8906CC2F738BD0F464756E2164756E21
|
package/dist/index.d.ts
DELETED
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { cpSync, readFileSync, writeFileSync } from 'fs';
|
|
3
|
-
import { resolve, basename } from 'path';
|
|
4
|
-
import { fileURLToPath } from 'url';
|
|
5
|
-
import { templateUrl } from './urls.js';
|
|
6
|
-
try {
|
|
7
|
-
const dest = process.argv[2];
|
|
8
|
-
if (!dest)
|
|
9
|
-
throw new Error('Destination path is required. Usage: `bun/npm create <template> <destination>`');
|
|
10
|
-
const destDir = resolve(process.cwd(), dest);
|
|
11
|
-
const packageName = basename(destDir);
|
|
12
|
-
const templateDir = resolve(fileURLToPath(templateUrl));
|
|
13
|
-
cpSync(templateDir, destDir, { recursive: true });
|
|
14
|
-
const packageManifestPath = resolve(destDir, 'package.json');
|
|
15
|
-
const packageManifest = JSON.parse(readFileSync(packageManifestPath, 'utf-8'));
|
|
16
|
-
packageManifest.name = packageName;
|
|
17
|
-
packageManifest.version = '0.0.0';
|
|
18
|
-
writeFileSync(packageManifestPath, JSON.stringify(packageManifest, null, 2));
|
|
19
|
-
console.log(`Template has been successfully instantiated at '${destDir}' with package name '${packageName}'.`);
|
|
20
|
-
}
|
|
21
|
-
catch (error) {
|
|
22
|
-
const err = error instanceof Error ? error : new Error(String(error));
|
|
23
|
-
console.error('Error:', err.message);
|
|
24
|
-
process.exit(1);
|
|
25
|
-
}
|
package/dist/urls.d.ts
DELETED
package/dist/urls.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"urls.d.ts","sourceRoot":"","sources":["../src/urls.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,KAAgC,CAAC;AACrD,eAAO,MAAM,YAAY,KAAuC,CAAC;AACjE,eAAO,MAAM,WAAW,KAAkC,CAAC"}
|
package/dist/urls.js
DELETED
package/template/bun.lock
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"lockfileVersion": 1,
|
|
3
|
-
"configVersion": 1,
|
|
4
|
-
"workspaces": {
|
|
5
|
-
"": {
|
|
6
|
-
"devDependencies": {
|
|
7
|
-
"@types/bun": "latest",
|
|
8
|
-
"typescript": "^5.9.3",
|
|
9
|
-
},
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
"packages": {
|
|
13
|
-
"@types/bun": ["@types/bun@1.3.9", "", { "dependencies": { "bun-types": "1.3.9" } }, "sha512-KQ571yULOdWJiMH+RIWIOZ7B2RXQGpL1YQrBtLIV3FqDcCu6FsbFUBwhdKUlCKUpS3PJDsHlJ1QKlpxoVR+xtw=="],
|
|
14
|
-
|
|
15
|
-
"@types/node": ["@types/node@25.3.0", "", { "dependencies": { "undici-types": "~7.18.0" } }, "sha512-4K3bqJpXpqfg2XKGK9bpDTc6xO/xoUP/RBWS7AtRMug6zZFaRekiLzjVtAoZMquxoAbzBvy5nxQ7veS5eYzf8A=="],
|
|
16
|
-
|
|
17
|
-
"bun-types": ["bun-types@1.3.9", "", { "dependencies": { "@types/node": "*" } }, "sha512-+UBWWOakIP4Tswh0Bt0QD0alpTY8cb5hvgiYeWCMet9YukHbzuruIEeXC2D7nMJPB12kbh8C7XJykSexEqGKJg=="],
|
|
18
|
-
|
|
19
|
-
"typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
|
|
20
|
-
|
|
21
|
-
"undici-types": ["undici-types@7.18.2", "", {}, "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w=="],
|
|
22
|
-
}
|
|
23
|
-
}
|