@cnpx/cnpx 0.0.1 → 0.0.2-dev.20260403062651

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @cnpx/cnpx@0.0.1 build /home/runner/work/template/template/cnpx/core
2
+ > @cnpx/cnpx@0.0.2 build /home/runner/work/template/template/cnpx/core
3
3
  > tsup
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -10,11 +10,11 @@
10
10
  CLI Cleaning output folder
11
11
  CJS Build start
12
12
  ESM Build start
13
- ESM out/index.mjs 127.00 B
14
- ESM ⚡️ Build success in 9ms
15
- CJS out/index.js 1.12 KB
16
- CJS ⚡️ Build success in 9ms
13
+ ESM out/index.mjs 989.00 B
14
+ ESM ⚡️ Build success in 15ms
15
+ CJS out/index.js 2.13 KB
16
+ CJS ⚡️ Build success in 16ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 663ms
18
+ DTS ⚡️ Build success in 792ms
19
19
  DTS out/index.d.ts 64.00 B
20
20
  DTS out/index.d.mts 64.00 B
package/out/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- var version = "0.0.1";
2
+ var version = "0.0.2";
3
3
 
4
4
  export { version };
package/out/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- var version = "0.0.1";
2
+ var version = "0.0.2";
3
3
 
4
4
  export { version };
package/out/index.js CHANGED
@@ -26,10 +26,39 @@ __export(index_exports, {
26
26
  module.exports = __toCommonJS(index_exports);
27
27
 
28
28
  // package.json
29
- var version = "0.0.1";
29
+ var version = "0.0.2";
30
30
 
31
31
  // src/index.ts
32
- console.log("Hello World");
32
+ var import_prompts = require("@clack/prompts");
33
+ var import_colorette = require("colorette");
34
+ async function main() {
35
+ (0, import_prompts.intro)((0, import_colorette.blue)("Create a new project"));
36
+ const name = await (0, import_prompts.text)({ message: "Project Name", placeholder: "Cool" });
37
+ if ((0, import_prompts.isCancel)(name)) {
38
+ (0, import_prompts.cancel)("Operation cancelled");
39
+ return process.exit(0);
40
+ }
41
+ const projectType = await (0, import_prompts.select)({
42
+ message: "Pick a project type.",
43
+ options: [
44
+ { value: "ts", label: "TypeScript" },
45
+ { value: "js", label: "JavaScript" },
46
+ { value: "coffee", label: "CoffeeScript", hint: "oh no" }
47
+ ]
48
+ });
49
+ if ((0, import_prompts.isCancel)(projectType)) {
50
+ (0, import_prompts.cancel)("Operation cancelled");
51
+ return process.exit(0);
52
+ }
53
+ const s = (0, import_prompts.spinner)();
54
+ s.start("Installing via npm");
55
+ s.stop("Installed via npm");
56
+ (0, import_prompts.outro)("You're all set!");
57
+ }
58
+ main().catch((err) => {
59
+ console.error(err);
60
+ process.exit(1);
61
+ });
33
62
  // Annotate the CommonJS export names for ESM import in node:
34
63
  0 && (module.exports = {
35
64
  version
package/out/index.mjs CHANGED
@@ -1,10 +1,39 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // package.json
4
- var version = "0.0.1";
4
+ var version = "0.0.2";
5
5
 
6
6
  // src/index.ts
7
- console.log("Hello World");
7
+ import { intro, outro, select, spinner, isCancel, cancel, text } from "@clack/prompts";
8
+ import { blue } from "colorette";
9
+ async function main() {
10
+ intro(blue("Create a new project"));
11
+ const name = await text({ message: "Project Name", placeholder: "Cool" });
12
+ if (isCancel(name)) {
13
+ cancel("Operation cancelled");
14
+ return process.exit(0);
15
+ }
16
+ const projectType = await select({
17
+ message: "Pick a project type.",
18
+ options: [
19
+ { value: "ts", label: "TypeScript" },
20
+ { value: "js", label: "JavaScript" },
21
+ { value: "coffee", label: "CoffeeScript", hint: "oh no" }
22
+ ]
23
+ });
24
+ if (isCancel(projectType)) {
25
+ cancel("Operation cancelled");
26
+ return process.exit(0);
27
+ }
28
+ const s = spinner();
29
+ s.start("Installing via npm");
30
+ s.stop("Installed via npm");
31
+ outro("You're all set!");
32
+ }
33
+ main().catch((err) => {
34
+ console.error(err);
35
+ process.exit(1);
36
+ });
8
37
  export {
9
38
  version
10
39
  };
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@cnpx/cnpx",
3
- "version": "0.0.1",
3
+ "version": "0.0.2-dev.20260403062651",
4
4
  "description": "",
5
5
  "author": "xcfio",
6
- "homepage": "https://github.com/xcfio/template/cnpx/core#readme",
6
+ "homepage": "https://github.com/xcfio/template/tree/main/cnpx/core#readme",
7
7
  "type": "commonjs",
8
8
  "license": "MIT",
9
9
  "main": "./out/index.js",
@@ -37,7 +37,13 @@
37
37
  "access": "public",
38
38
  "tag": "latest"
39
39
  },
40
+ "dependencies": {
41
+ "@clack/prompts": "^1.2.0",
42
+ "colorette": "^2.0.20",
43
+ "degit": "^2.8.4"
44
+ },
40
45
  "devDependencies": {
46
+ "@types/degit": "^2.8.6",
41
47
  "@types/node": "^25.0.0",
42
48
  "@vitest/ui": "4.1.2",
43
49
  "tsup": "^8.5.1",