napi-zig 0.1.0 → 0.1.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.
package/dist/index.js CHANGED
@@ -1,7 +1,544 @@
1
- // packages/cli/src/index.ts
2
- function greet(name) {
3
- return `Hello, ${name}! Welcome to the cli package.`;
1
+ #!/usr/bin/env node
2
+
3
+ // src/index.ts
4
+ import cac from "cac";
5
+ // package.json
6
+ var version = "0.1.1";
7
+
8
+ // src/build.ts
9
+ import { exec } from "node:child_process";
10
+ import { copyFile as copyFile2, rm, writeFile as writeFile2 } from "node:fs/promises";
11
+ import { promisify } from "node:util";
12
+ import { Listr, PRESET_TIMER } from "listr2";
13
+
14
+ // src/constants.ts
15
+ var NAPI_OUT_DIR = "zig-out/napi";
16
+
17
+ // src/npm.ts
18
+ import { copyFile, mkdir, readdir, writeFile } from "node:fs/promises";
19
+ import { join } from "node:path";
20
+ async function generatePackages(opts) {
21
+ await Promise.all([
22
+ ...opts.targets.map((t) => writePlatformPackage(opts, t)),
23
+ writeRootPackage(opts)
24
+ ]);
4
25
  }
5
- export {
6
- greet
26
+ function bindingName(opts, suffix) {
27
+ if (opts.scoped)
28
+ return `@${opts.packageName}/${suffix}`;
29
+ return `${opts.packageName}${opts.delimiter}${suffix}`;
30
+ }
31
+ function bindingDirName(opts, suffix) {
32
+ return `${opts.packageName}${opts.delimiter}${suffix}`;
33
+ }
34
+ async function writePlatformPackage(opts, target) {
35
+ const dir = join(opts.outputDir, bindingDirName(opts, target.npmSuffix));
36
+ const nodeFile = `${opts.addonName}.node`;
37
+ await mkdir(dir, { recursive: true });
38
+ const pkg = {
39
+ name: bindingName(opts, target.npmSuffix),
40
+ version: opts.version,
41
+ os: [target.platform],
42
+ cpu: [target.arch],
43
+ main: nodeFile,
44
+ files: [nodeFile]
45
+ };
46
+ if (target.libc) {
47
+ pkg.libc = [target.libc];
48
+ }
49
+ await Promise.all([
50
+ writeFile(join(dir, "package.json"), JSON.stringify(pkg, null, 2) + `
51
+ `),
52
+ copyFile(`${NAPI_OUT_DIR}/${target.zigTarget}/${nodeFile}`, join(dir, nodeFile))
53
+ ]);
54
+ }
55
+ async function writeRootPackage(opts) {
56
+ const dir = join(opts.outputDir, opts.packageName);
57
+ await mkdir(dir, { recursive: true });
58
+ const optDeps = {};
59
+ for (const t of opts.targets) {
60
+ optDeps[bindingName(opts, t.npmSuffix)] = opts.version;
61
+ }
62
+ const pkg = {
63
+ name: opts.packageName,
64
+ version: opts.version,
65
+ main: "index.js",
66
+ types: "index.d.ts",
67
+ files: ["index.js", "index.d.ts"],
68
+ optionalDependencies: optDeps
69
+ };
70
+ const firstTarget = opts.targets[0];
71
+ if (!firstTarget)
72
+ throw new Error("No targets defined");
73
+ await Promise.all([
74
+ writeFile(join(dir, "package.json"), JSON.stringify(pkg, null, 2) + `
75
+ `),
76
+ writeFile(join(dir, "index.js"), generateIndexJs(opts)),
77
+ copyFile(`${NAPI_OUT_DIR}/${firstTarget.zigTarget}/${opts.addonName}.d.ts`, join(dir, "index.d.ts"))
78
+ ]);
79
+ }
80
+ function generateIndexJs(opts) {
81
+ const platformMap = new Map;
82
+ for (const t of opts.targets) {
83
+ const key = `${t.platform}-${t.arch}`;
84
+ const arr = platformMap.get(key) ?? [];
85
+ arr.push(bindingName(opts, t.npmSuffix));
86
+ platformMap.set(key, arr);
87
+ }
88
+ const entries = Array.from(platformMap.entries()).map(([key, pkgs]) => ` "${key}": ${JSON.stringify(pkgs)}`).join(`,
89
+ `);
90
+ return `/* Auto-generated by napi-zig */
91
+ const { createRequire } = require("node:module");
92
+ const localRequire = createRequire(__filename);
93
+
94
+ const platforms = {
95
+ ${entries},
7
96
  };
97
+
98
+ const key = \`\${process.platform}-\${process.arch}\`;
99
+ const candidates = platforms[key];
100
+
101
+ if (!candidates) {
102
+ throw new Error(\`Unsupported platform: \${key}\`);
103
+ }
104
+
105
+ let binding;
106
+ for (const name of candidates) {
107
+ try {
108
+ binding = localRequire(name);
109
+ break;
110
+ } catch {}
111
+ }
112
+
113
+ if (!binding) {
114
+ throw new Error(
115
+ \`No native binding found for \${key}. Ensure the correct platform package is installed.\`,
116
+ );
117
+ }
118
+
119
+ module.exports = binding;
120
+ `;
121
+ }
122
+ async function discoverAddons(zigTarget) {
123
+ const dir = `${NAPI_OUT_DIR}/${zigTarget}`;
124
+ const files = await readdir(dir);
125
+ const addons = files.filter((f) => f.endsWith(".node")).map((f) => f.replace(/\.node$/, ""));
126
+ if (addons.length === 0) {
127
+ throw new Error(`No .node artifacts found in ${dir}`);
128
+ }
129
+ return addons;
130
+ }
131
+
132
+ // src/target.ts
133
+ import { execSync } from "node:child_process";
134
+ import { readFileSync } from "node:fs";
135
+ var TARGETS = [
136
+ { zigTarget: "x86_64-macos", platform: "darwin", arch: "x64", npmSuffix: "darwin-x64" },
137
+ { zigTarget: "aarch64-macos", platform: "darwin", arch: "arm64", npmSuffix: "darwin-arm64" },
138
+ {
139
+ zigTarget: "x86_64-linux-gnu",
140
+ platform: "linux",
141
+ arch: "x64",
142
+ abi: "gnu",
143
+ libc: "glibc",
144
+ npmSuffix: "linux-x64-gnu"
145
+ },
146
+ {
147
+ zigTarget: "x86_64-linux-musl",
148
+ platform: "linux",
149
+ arch: "x64",
150
+ abi: "musl",
151
+ libc: "musl",
152
+ npmSuffix: "linux-x64-musl"
153
+ },
154
+ {
155
+ zigTarget: "aarch64-linux-gnu",
156
+ platform: "linux",
157
+ arch: "arm64",
158
+ abi: "gnu",
159
+ libc: "glibc",
160
+ npmSuffix: "linux-arm64-gnu"
161
+ },
162
+ {
163
+ zigTarget: "aarch64-linux-musl",
164
+ platform: "linux",
165
+ arch: "arm64",
166
+ abi: "musl",
167
+ libc: "musl",
168
+ npmSuffix: "linux-arm64-musl"
169
+ },
170
+ { zigTarget: "x86_64-windows-gnu", platform: "win32", arch: "x64", npmSuffix: "win32-x64" },
171
+ { zigTarget: "aarch64-windows-gnu", platform: "win32", arch: "arm64", npmSuffix: "win32-arm64" }
172
+ ];
173
+ function getHostTarget() {
174
+ const { platform, arch } = process;
175
+ const candidates = TARGETS.filter((t) => t.platform === platform && t.arch === arch);
176
+ if (candidates.length === 0) {
177
+ throw new Error(`Unsupported platform: ${platform}-${arch}`);
178
+ }
179
+ if (candidates.length === 1) {
180
+ return candidates[0];
181
+ }
182
+ const match = isMusl() ? candidates.find((t) => t.libc === "musl") : candidates.find((t) => t.libc === "glibc");
183
+ if (!match) {
184
+ throw new Error(`No matching target for ${platform}-${arch}`);
185
+ }
186
+ return match;
187
+ }
188
+ function isMusl() {
189
+ try {
190
+ return readFileSync("/usr/bin/ldd", "utf-8").includes("musl");
191
+ } catch {}
192
+ try {
193
+ const report = process.report?.getReport();
194
+ if (report) {
195
+ const header = report.header;
196
+ if (header?.glibcVersionRuntime)
197
+ return false;
198
+ const sharedObjects = report.sharedObjects;
199
+ if (sharedObjects?.some((s) => s.includes("libc.musl-") || s.includes("ld-musl-"))) {
200
+ return true;
201
+ }
202
+ }
203
+ } catch {}
204
+ try {
205
+ return execSync("ldd --version 2>&1", { encoding: "utf-8" }).includes("musl");
206
+ } catch {}
207
+ return false;
208
+ }
209
+
210
+ // src/build.ts
211
+ var execAsync = promisify(exec);
212
+ var TIMER = { timer: PRESET_TIMER };
213
+ async function build(options) {
214
+ await rm(NAPI_OUT_DIR, { recursive: true, force: true });
215
+ if (options.release) {
216
+ await releaseBuild(options);
217
+ } else {
218
+ await devBuild();
219
+ }
220
+ }
221
+ async function devBuild() {
222
+ const target = getHostTarget();
223
+ let addons = [];
224
+ const tasks = new Listr([
225
+ {
226
+ title: `Compiling for ${target.zigTarget}`,
227
+ task: async () => {
228
+ await execAsync(zigBuildCmd(target.zigTarget));
229
+ }
230
+ },
231
+ {
232
+ title: "Writing entry files",
233
+ task: async (_, task) => {
234
+ addons = await discoverAddons(target.zigTarget);
235
+ const targetDir = `${NAPI_OUT_DIR}/${target.zigTarget}`;
236
+ for (const addon of addons) {
237
+ const suffix = addons.length > 1 ? `.${addon}` : "";
238
+ await Promise.all([
239
+ writeFile2(`index${suffix}.js`, `module.exports = require("./${targetDir}/${addon}.node");
240
+ `),
241
+ copyFile2(`${targetDir}/${addon}.d.ts`, `index${suffix}.d.ts`)
242
+ ]);
243
+ }
244
+ task.title = `Wrote ${addons.map((a) => `${a}.js`).join(", ")}`;
245
+ }
246
+ }
247
+ ], { rendererOptions: TIMER });
248
+ await tasks.run();
249
+ }
250
+ async function releaseBuild(options) {
251
+ let addons = [];
252
+ const tasks = new Listr([
253
+ {
254
+ title: `Cross-compiling ${TARGETS.length} targets (ReleaseFast)`,
255
+ task: (_, parent) => parent.newListr(TARGETS.map((t) => ({
256
+ title: t.zigTarget,
257
+ task: async () => {
258
+ await execAsync(zigBuildCmd(t.zigTarget, "ReleaseFast"));
259
+ }
260
+ })), { concurrent: true, rendererOptions: TIMER })
261
+ },
262
+ {
263
+ title: "Generating npm packages",
264
+ task: async (_, task) => {
265
+ const firstTarget = TARGETS[0];
266
+ if (!firstTarget)
267
+ throw new Error("No targets defined");
268
+ addons = await discoverAddons(firstTarget.zigTarget);
269
+ await rm(options.outputDir, { recursive: true, force: true });
270
+ for (const addon of addons) {
271
+ const opts = {
272
+ outputDir: options.outputDir,
273
+ packageName: addon,
274
+ addonName: addon,
275
+ version: "0.0.0",
276
+ scoped: options.scoped,
277
+ delimiter: options.delimiter,
278
+ targets: TARGETS
279
+ };
280
+ await generatePackages(opts);
281
+ }
282
+ const names = addons.join(", ");
283
+ task.title = `Generated ${names} in ${options.outputDir}/`;
284
+ }
285
+ }
286
+ ], { rendererOptions: TIMER });
287
+ await tasks.run();
288
+ }
289
+ function zigBuildCmd(zigTarget, optimize) {
290
+ const args = [`zig build -Dtarget=${zigTarget}`];
291
+ if (optimize)
292
+ args.push(`-Doptimize=${optimize}`);
293
+ return args.join(" ");
294
+ }
295
+
296
+ // src/version.ts
297
+ import { exec as exec2 } from "node:child_process";
298
+ import { readFile, readdir as readdir2, writeFile as writeFile3 } from "node:fs/promises";
299
+ import { join as join2 } from "node:path";
300
+ import { promisify as promisify2, styleText } from "node:util";
301
+ import prompts from "prompts";
302
+ var execAsync2 = promisify2(exec2);
303
+ function parse(version2) {
304
+ const [main, ...preParts] = version2.split("-");
305
+ const prerelease = preParts.length > 0 ? preParts.join("-") : undefined;
306
+ const parts = main.split(".").map(Number);
307
+ return { major: parts[0], minor: parts[1], patch: parts[2], prerelease };
308
+ }
309
+ function format(v) {
310
+ const base = `${v.major}.${v.minor}.${v.patch}`;
311
+ return v.prerelease ? `${base}-${v.prerelease}` : base;
312
+ }
313
+ function incMajor(v) {
314
+ return format({ major: v.major + 1, minor: 0, patch: 0 });
315
+ }
316
+ function incMinor(v) {
317
+ return format({ major: v.major, minor: v.minor + 1, patch: 0 });
318
+ }
319
+ function incPatch(v) {
320
+ if (v.prerelease) {
321
+ return format({ major: v.major, minor: v.minor, patch: v.patch });
322
+ }
323
+ return format({ major: v.major, minor: v.minor, patch: v.patch + 1 });
324
+ }
325
+ function incNext(v) {
326
+ if (v.prerelease) {
327
+ const match = v.prerelease.match(/^(.+?)\.(\d+)$/);
328
+ if (match) {
329
+ return format({ ...v, prerelease: `${match[1]}.${Number(match[2]) + 1}` });
330
+ }
331
+ return format({ major: v.major, minor: v.minor, patch: v.patch });
332
+ }
333
+ return incPatch(v);
334
+ }
335
+ function incPrePatch(v, preid) {
336
+ const patch = v.prerelease ? v.patch : v.patch + 1;
337
+ return format({ major: v.major, minor: v.minor, patch, prerelease: `${preid}.1` });
338
+ }
339
+ function incPreMinor(v, preid) {
340
+ const minor = v.prerelease ? v.minor : v.minor + 1;
341
+ return format({ major: v.major, minor, patch: 0, prerelease: `${preid}.1` });
342
+ }
343
+ function incPreMajor(v, preid) {
344
+ const major = v.prerelease ? v.major : v.major + 1;
345
+ return format({ major, minor: 0, patch: 0, prerelease: `${preid}.1` });
346
+ }
347
+ async function getConventionalBump(v) {
348
+ try {
349
+ const { stdout } = await execAsync2("git log --format=%s --no-merges -20");
350
+ const commits = stdout.trim().split(`
351
+ `);
352
+ let bump = "patch";
353
+ for (const msg of commits) {
354
+ if (msg.includes("BREAKING CHANGE") || /^[a-z]+(\(.+\))?!:/.test(msg)) {
355
+ bump = "major";
356
+ break;
357
+ }
358
+ if (/^feat(\(.+\))?:/.test(msg)) {
359
+ bump = "minor";
360
+ }
361
+ }
362
+ switch (bump) {
363
+ case "major":
364
+ return incMajor(v);
365
+ case "minor":
366
+ return incMinor(v);
367
+ case "patch":
368
+ return incPatch(v);
369
+ }
370
+ } catch {
371
+ return incPatch(v);
372
+ }
373
+ }
374
+ async function discoverPackages(outputDir) {
375
+ const packages = [];
376
+ let dirNames;
377
+ try {
378
+ dirNames = await readdir2(outputDir);
379
+ } catch {
380
+ return packages;
381
+ }
382
+ for (const name of dirNames) {
383
+ const pkgPath = join2(outputDir, name, "package.json");
384
+ try {
385
+ const raw = await readFile(pkgPath, "utf-8");
386
+ packages.push({ path: pkgPath, data: JSON.parse(raw) });
387
+ } catch {
388
+ let subNames;
389
+ try {
390
+ subNames = await readdir2(join2(outputDir, name));
391
+ } catch {
392
+ continue;
393
+ }
394
+ for (const sub of subNames) {
395
+ const subPkgPath = join2(outputDir, name, sub, "package.json");
396
+ try {
397
+ const raw = await readFile(subPkgPath, "utf-8");
398
+ packages.push({ path: subPkgPath, data: JSON.parse(raw) });
399
+ } catch {}
400
+ }
401
+ }
402
+ }
403
+ return packages;
404
+ }
405
+ function isRootPackage(pkg) {
406
+ return pkg.data.optionalDependencies != null;
407
+ }
408
+ function getPackageGroup(root, allPackages) {
409
+ const deps = root.data.optionalDependencies;
410
+ if (!deps)
411
+ return [root];
412
+ const depNames = new Set(Object.keys(deps));
413
+ return allPackages.filter((pkg) => pkg === root || depNames.has(pkg.data.name));
414
+ }
415
+ async function version2(options) {
416
+ const allPackages = await discoverPackages(options.outputDir);
417
+ if (allPackages.length === 0) {
418
+ console.error(`No packages found in ${options.outputDir}/. Run "napi build --release" first.`);
419
+ process.exit(1);
420
+ }
421
+ let roots = allPackages.filter(isRootPackage);
422
+ if (options.name) {
423
+ roots = roots.filter((pkg) => pkg.data.name === options.name);
424
+ if (roots.length === 0) {
425
+ console.error(`No package named "${options.name}" found.`);
426
+ process.exit(1);
427
+ }
428
+ }
429
+ if (roots.length === 0) {
430
+ console.error("No root package found.");
431
+ process.exit(1);
432
+ }
433
+ const packagesToUpdate = [];
434
+ const seen = new Set;
435
+ for (const root of roots) {
436
+ for (const pkg of getPackageGroup(root, allPackages)) {
437
+ if (!seen.has(pkg.path)) {
438
+ seen.add(pkg.path);
439
+ packagesToUpdate.push(pkg);
440
+ }
441
+ }
442
+ }
443
+ const currentVersion = roots[0].data.version || "0.0.0";
444
+ const v = parse(currentVersion);
445
+ const preid = v.prerelease?.match(/^([a-zA-Z]+)/)?.[1] ?? "beta";
446
+ const conventionalVersion = await getConventionalBump(v);
447
+ const next = {
448
+ major: incMajor(v),
449
+ minor: incMinor(v),
450
+ patch: incPatch(v),
451
+ next: incNext(v),
452
+ conventional: conventionalVersion,
453
+ prepatch: incPrePatch(v, preid),
454
+ preminor: incPreMinor(v, preid),
455
+ premajor: incPreMajor(v, preid)
456
+ };
457
+ const PADDING = 13;
458
+ const answers = await prompts([
459
+ {
460
+ type: "autocomplete",
461
+ name: "release",
462
+ message: `Current version ${styleText("green", currentVersion)}`,
463
+ initial: "next",
464
+ choices: [
465
+ {
466
+ value: "major",
467
+ title: `${"major".padStart(PADDING, " ")} ${styleText("bold", next.major)}`
468
+ },
469
+ {
470
+ value: "minor",
471
+ title: `${"minor".padStart(PADDING, " ")} ${styleText("bold", next.minor)}`
472
+ },
473
+ {
474
+ value: "patch",
475
+ title: `${"patch".padStart(PADDING, " ")} ${styleText("bold", next.patch)}`
476
+ },
477
+ {
478
+ value: "next",
479
+ title: `${"next".padStart(PADDING, " ")} ${styleText("bold", next.next)}`
480
+ },
481
+ {
482
+ value: "conventional",
483
+ title: `${"conventional".padStart(PADDING, " ")} ${styleText("bold", next.conventional)}`
484
+ },
485
+ {
486
+ value: "prepatch",
487
+ title: `${"pre-patch".padStart(PADDING, " ")} ${styleText("bold", next.prepatch)}`
488
+ },
489
+ {
490
+ value: "preminor",
491
+ title: `${"pre-minor".padStart(PADDING, " ")} ${styleText("bold", next.preminor)}`
492
+ },
493
+ {
494
+ value: "premajor",
495
+ title: `${"pre-major".padStart(PADDING, " ")} ${styleText("bold", next.premajor)}`
496
+ },
497
+ {
498
+ value: "none",
499
+ title: `${"as-is".padStart(PADDING, " ")} ${styleText("bold", currentVersion)}`
500
+ },
501
+ { value: "custom", title: "custom ...".padStart(PADDING + 4, " ") }
502
+ ]
503
+ },
504
+ {
505
+ type: (prev) => prev === "custom" ? "text" : null,
506
+ name: "custom",
507
+ message: "Enter the new version number:",
508
+ initial: currentVersion,
509
+ validate: (value) => /^\d+\.\d+\.\d+(-[a-zA-Z0-9.]+)?$/.test(value) || "Invalid semver version"
510
+ }
511
+ ]);
512
+ if (!answers.release)
513
+ process.exit(1);
514
+ const newVersion = answers.release === "none" ? currentVersion : answers.release === "custom" ? answers.custom : next[answers.release];
515
+ if (!newVersion)
516
+ process.exit(1);
517
+ for (const pkg of packagesToUpdate) {
518
+ pkg.data.version = newVersion;
519
+ if (pkg.data.optionalDependencies) {
520
+ const deps = pkg.data.optionalDependencies;
521
+ for (const key of Object.keys(deps)) {
522
+ deps[key] = newVersion;
523
+ }
524
+ }
525
+ await writeFile3(pkg.path, JSON.stringify(pkg.data, null, 2) + `
526
+ `);
527
+ }
528
+ console.log(`
529
+ ${styleText("green", "✔")} Updated ${packagesToUpdate.length} packages to ${styleText("bold", newVersion)}`);
530
+ }
531
+
532
+ // src/index.ts
533
+ var cli = cac("napi");
534
+ cli.command("build", "Compile Zig native addon and generate npm packages").option("-r, --release", "Cross-compile all targets and generate npm package tree").option("-o, --output-dir <dir>", "Directory for generated npm packages (release only)", {
535
+ default: "npm"
536
+ }).option("-s, --scoped", "Scope binding packages: @name/suffix instead of name-suffix").option("-d, --delimiter <char>", "Separator between package name and target suffix", {
537
+ default: "-"
538
+ }).action(build);
539
+ cli.command("version", "Interactively bump version for all generated npm packages").option("-o, --output-dir <dir>", "Directory containing generated npm packages", {
540
+ default: "npm"
541
+ }).option("-n, --name <name>", "Only update packages for a specific project name").action(version2);
542
+ cli.help();
543
+ cli.version(version);
544
+ cli.parse();
package/package.json CHANGED
@@ -1,37 +1,47 @@
1
1
  {
2
- "name": "napi-zig",
3
- "version": "0.1.0",
4
- "description": "CLI for napi-zig, publish Zig libraries to npm in minutes.",
5
- "homepage": "https://github.com/yuku-toolchain/napi-zig/tree/main/packages/cli#readme",
6
- "license": "MIT",
7
- "files": [
8
- "dist"
9
- ],
10
- "repository": {
11
- "type": "git",
12
- "url": "git+https://github.com/yuku-toolchain/napi-zig.git"
13
- },
14
- "scripts": {
15
- "type-check": "tsc --noEmit"
16
- },
17
- "peerDependencies": {
18
- "typescript": ">=4.5.0"
19
- },
20
- "peerDependenciesMeta": {
21
- "typescript": {
22
- "optional": true
23
- }
24
- },
25
- "type": "module",
26
- "exports": {
27
- ".": {
28
- "import": {
29
- "types": "./dist/index.d.ts",
30
- "default": "./dist/index.js"
31
- }
32
- },
33
- "./package.json": "./package.json"
34
- },
35
- "module": "./dist/index.js",
36
- "types": "./dist/index.d.ts"
2
+ "name": "napi-zig",
3
+ "version": "0.1.1",
4
+ "description": "CLI for napi-zig, publish Zig libraries to npm in minutes.",
5
+ "license": "MIT",
6
+ "bin": {
7
+ "napi": "dist/index.js"
8
+ },
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "type": "module",
13
+ "module": "./dist/index.js",
14
+ "types": "./dist/index.d.ts",
15
+ "exports": {
16
+ ".": {
17
+ "import": {
18
+ "types": "./dist/index.d.ts",
19
+ "default": "./dist/index.js"
20
+ }
21
+ },
22
+ "./package.json": "./package.json"
23
+ },
24
+ "scripts": {
25
+ "build": "bunup --dts.infer-types",
26
+ "dev": "bun run build --watch"
27
+ },
28
+ "dependencies": {
29
+ "cac": "^7.0.0",
30
+ "listr2": "^10.2.1",
31
+ "prompts": "^2.4.2"
32
+ },
33
+ "devDependencies": {
34
+ "@types/bun": "^1.3.11",
35
+ "@types/prompts": "^2.4.9",
36
+ "bunup": "^0.16.31",
37
+ "typescript": "^6.0.2"
38
+ },
39
+ "peerDependencies": {
40
+ "typescript": ">=4.5.0"
41
+ },
42
+ "peerDependenciesMeta": {
43
+ "typescript": {
44
+ "optional": true
45
+ }
46
+ }
37
47
  }
package/dist/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- declare function greet(name: string): string;
2
- export { greet };