create-alepha 0.15.0 → 0.15.2

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 CHANGED
@@ -10,3 +10,17 @@ This package is part of the Alepha framework and can be installed via the all-in
10
10
  npm install alepha
11
11
  ```
12
12
 
13
+ ## Module
14
+
15
+ | type | quality | stability |
16
+ |------|---------|-----------|
17
+ | tooling | rare | stable |
18
+
19
+ Quick project setup tool.
20
+
21
+ **Features:**
22
+ - `npx create-alepha` to bootstrap projects
23
+ - Template selection
24
+ - Environment configuration
25
+ - Package manager detection
26
+
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { $inject, Alepha, run, t } from "alepha";
3
3
  import { $command, CliProvider } from "alepha/command";
4
- import { FileSystemProvider } from "alepha/file";
5
4
  import { $logger } from "alepha/logger";
5
+ import { FileSystemProvider } from "alepha/system";
6
6
  import { readFileSync } from "node:fs";
7
7
 
8
8
  //#region src/CreateAlephaCoreCommands.ts
@@ -17,13 +17,13 @@ var CreateAlephaCoreCommands = class {
17
17
  root: true,
18
18
  description: "Create a new Alepha project",
19
19
  args: t.text({ title: "name" }),
20
- handler: async ({ run: run$1, args }) => {
20
+ handler: async ({ run, args }) => {
21
21
  const name = args;
22
22
  await this.fs.mkdir(name);
23
- await run$1(`cd ${name} && npx alepha@latest init ${name}`, { alias: "creating project" });
24
- await run$1(`cd ${name} && npx alepha lint`, { alias: "alepha lint" });
25
- await run$1(`cd ${name} && npx alepha typecheck`, { alias: "alepha typecheck" });
26
- await run$1(`cd ${name} && npx alepha build`, { alias: "alepha build" });
23
+ await run(`cd ${name} && npx alepha@latest init ${name}`, { alias: "creating project" });
24
+ await run(`cd ${name} && npx alepha lint`, { alias: "alepha lint" });
25
+ await run(`cd ${name} && npx alepha typecheck`, { alias: "alepha typecheck" });
26
+ await run(`cd ${name} && npx alepha build`, { alias: "alepha build" });
27
27
  }
28
28
  });
29
29
  };
@@ -35,6 +35,21 @@ const version = packageJson.version;
35
35
 
36
36
  //#endregion
37
37
  //#region src/index.ts
38
+ /**
39
+ * | type | quality | stability |
40
+ * |------|---------|-----------|
41
+ * | tooling | rare | stable |
42
+ *
43
+ * Quick project setup tool.
44
+ *
45
+ * **Features:**
46
+ * - `npx create-alepha` to bootstrap projects
47
+ * - Template selection
48
+ * - Environment configuration
49
+ * - Package manager detection
50
+ *
51
+ * @module create-alepha
52
+ */
38
53
  const alepha = Alepha.create({ env: {
39
54
  LOG_LEVEL: "alepha.core:warn,info",
40
55
  LOG_FORMAT: "raw",
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["run"],"sources":["../src/CreateAlephaCoreCommands.ts","../src/version.ts","../src/index.ts"],"sourcesContent":["import { $inject, t } from \"alepha\";\nimport { $command, CliProvider } from \"alepha/command\";\nimport { FileSystemProvider } from \"alepha/file\";\nimport { $logger } from \"alepha/logger\";\n\nexport class CreateAlephaCoreCommands {\n protected readonly log = $logger();\n protected readonly cli = $inject(CliProvider);\n protected readonly fs = $inject(FileSystemProvider);\n\n /**\n * Called when no command is provided - delegates to alepha init\n */\n public readonly root = $command({\n root: true,\n description: \"Create a new Alepha project\",\n args: t.text({\n title: \"name\",\n }),\n handler: async ({ run, args }) => {\n const name = args;\n\n // create directory\n await this.fs.mkdir(name);\n\n // Delegate to alepha init command\n await run(`cd ${name} && npx alepha@latest init ${name}`, {\n alias: \"creating project\",\n });\n\n await run(`cd ${name} && npx alepha lint`, {\n alias: \"alepha lint\",\n });\n\n await run(`cd ${name} && npx alepha typecheck`, {\n alias: \"alepha typecheck\",\n });\n\n await run(`cd ${name} && npx alepha build`, {\n alias: \"alepha build\",\n });\n },\n });\n}\n","import { readFileSync } from \"node:fs\";\n\nconst packageJson = JSON.parse(\n readFileSync(new URL(\"../package.json\", import.meta.url), \"utf-8\"),\n);\n\nexport const version = packageJson.version;\n","#!/usr/bin/env node\nimport { Alepha, run } from \"alepha\";\nimport { CreateAlephaCoreCommands } from \"./CreateAlephaCoreCommands.ts\";\nimport { version } from \"./version.ts\";\n\nconst alepha = Alepha.create({\n env: {\n LOG_LEVEL: \"alepha.core:warn,info\",\n LOG_FORMAT: \"raw\",\n CLI_NAME: \"create-alepha\",\n CLI_DESCRIPTION: `Create Alepha v${version} - Create a new Alepha project.`,\n },\n});\n\nalepha.with(CreateAlephaCoreCommands);\n\nrun(alepha);\n"],"mappings":";;;;;;;;AAKA,IAAa,2BAAb,MAAsC;CACpC,AAAmB,MAAM,SAAS;CAClC,AAAmB,MAAM,QAAQ,YAAY;CAC7C,AAAmB,KAAK,QAAQ,mBAAmB;;;;CAKnD,AAAgB,OAAO,SAAS;EAC9B,MAAM;EACN,aAAa;EACb,MAAM,EAAE,KAAK,EACX,OAAO,QACR,CAAC;EACF,SAAS,OAAO,EAAE,YAAK,WAAW;GAChC,MAAM,OAAO;AAGb,SAAM,KAAK,GAAG,MAAM,KAAK;AAGzB,SAAMA,MAAI,MAAM,KAAK,6BAA6B,QAAQ,EACxD,OAAO,oBACR,CAAC;AAEF,SAAMA,MAAI,MAAM,KAAK,sBAAsB,EACzC,OAAO,eACR,CAAC;AAEF,SAAMA,MAAI,MAAM,KAAK,2BAA2B,EAC9C,OAAO,oBACR,CAAC;AAEF,SAAMA,MAAI,MAAM,KAAK,uBAAuB,EAC1C,OAAO,gBACR,CAAC;;EAEL,CAAC;;;;;ACxCJ,MAAM,cAAc,KAAK,MACvB,aAAa,IAAI,IAAI,mBAAmB,OAAO,KAAK,IAAI,EAAE,QAAQ,CACnE;AAED,MAAa,UAAU,YAAY;;;;ACDnC,MAAM,SAAS,OAAO,OAAO,EAC3B,KAAK;CACH,WAAW;CACX,YAAY;CACZ,UAAU;CACV,iBAAiB,kBAAkB,QAAQ;CAC5C,EACF,CAAC;AAEF,OAAO,KAAK,yBAAyB;AAErC,IAAI,OAAO"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/CreateAlephaCoreCommands.ts","../src/version.ts","../src/index.ts"],"sourcesContent":["import { $inject, t } from \"alepha\";\nimport { $command, CliProvider } from \"alepha/command\";\nimport { $logger } from \"alepha/logger\";\nimport { FileSystemProvider } from \"alepha/system\";\n\nexport class CreateAlephaCoreCommands {\n protected readonly log = $logger();\n protected readonly cli = $inject(CliProvider);\n protected readonly fs = $inject(FileSystemProvider);\n\n /**\n * Called when no command is provided - delegates to alepha init\n */\n public readonly root = $command({\n root: true,\n description: \"Create a new Alepha project\",\n args: t.text({\n title: \"name\",\n }),\n handler: async ({ run, args }) => {\n const name = args;\n\n // create directory\n await this.fs.mkdir(name);\n\n // Delegate to alepha init command\n await run(`cd ${name} && npx alepha@latest init ${name}`, {\n alias: \"creating project\",\n });\n\n await run(`cd ${name} && npx alepha lint`, {\n alias: \"alepha lint\",\n });\n\n await run(`cd ${name} && npx alepha typecheck`, {\n alias: \"alepha typecheck\",\n });\n\n await run(`cd ${name} && npx alepha build`, {\n alias: \"alepha build\",\n });\n },\n });\n}\n","import { readFileSync } from \"node:fs\";\n\nconst packageJson = JSON.parse(\n readFileSync(new URL(\"../package.json\", import.meta.url), \"utf-8\"),\n);\n\nexport const version = packageJson.version;\n","#!/usr/bin/env node\n/**\n * | type | quality | stability |\n * |------|---------|-----------|\n * | tooling | rare | stable |\n *\n * Quick project setup tool.\n *\n * **Features:**\n * - `npx create-alepha` to bootstrap projects\n * - Template selection\n * - Environment configuration\n * - Package manager detection\n *\n * @module create-alepha\n */\nimport { Alepha, run } from \"alepha\";\nimport { CreateAlephaCoreCommands } from \"./CreateAlephaCoreCommands.ts\";\nimport { version } from \"./version.ts\";\n\nconst alepha = Alepha.create({\n env: {\n LOG_LEVEL: \"alepha.core:warn,info\",\n LOG_FORMAT: \"raw\",\n CLI_NAME: \"create-alepha\",\n CLI_DESCRIPTION: `Create Alepha v${version} - Create a new Alepha project.`,\n },\n});\n\nalepha.with(CreateAlephaCoreCommands);\n\nrun(alepha);\n"],"mappings":";;;;;;;;AAKA,IAAa,2BAAb,MAAsC;CACpC,AAAmB,MAAM,SAAS;CAClC,AAAmB,MAAM,QAAQ,YAAY;CAC7C,AAAmB,KAAK,QAAQ,mBAAmB;;;;CAKnD,AAAgB,OAAO,SAAS;EAC9B,MAAM;EACN,aAAa;EACb,MAAM,EAAE,KAAK,EACX,OAAO,QACR,CAAC;EACF,SAAS,OAAO,EAAE,KAAK,WAAW;GAChC,MAAM,OAAO;AAGb,SAAM,KAAK,GAAG,MAAM,KAAK;AAGzB,SAAM,IAAI,MAAM,KAAK,6BAA6B,QAAQ,EACxD,OAAO,oBACR,CAAC;AAEF,SAAM,IAAI,MAAM,KAAK,sBAAsB,EACzC,OAAO,eACR,CAAC;AAEF,SAAM,IAAI,MAAM,KAAK,2BAA2B,EAC9C,OAAO,oBACR,CAAC;AAEF,SAAM,IAAI,MAAM,KAAK,uBAAuB,EAC1C,OAAO,gBACR,CAAC;;EAEL,CAAC;;;;;ACxCJ,MAAM,cAAc,KAAK,MACvB,aAAa,IAAI,IAAI,mBAAmB,OAAO,KAAK,IAAI,EAAE,QAAQ,CACnE;AAED,MAAa,UAAU,YAAY;;;;;;;;;;;;;;;;;;;ACcnC,MAAM,SAAS,OAAO,OAAO,EAC3B,KAAK;CACH,WAAW;CACX,YAAY;CACZ,UAAU;CACV,iBAAiB,kBAAkB,QAAQ;CAC5C,EACF,CAAC;AAEF,OAAO,KAAK,yBAAyB;AAErC,IAAI,OAAO"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "create-alepha",
3
3
  "description": "Create a new Alepha project with a single command.",
4
4
  "author": "Nicolas Foures",
5
- "version": "0.15.0",
5
+ "version": "0.15.2",
6
6
  "type": "module",
7
7
  "engines": {
8
8
  "node": ">=22.0.0"
@@ -14,11 +14,11 @@
14
14
  "src"
15
15
  ],
16
16
  "dependencies": {
17
- "alepha": "0.15.0"
17
+ "alepha": "0.15.2"
18
18
  },
19
19
  "devDependencies": {
20
- "tsdown": "^0.20.0-beta.3",
21
- "vitest": "^4.0.17"
20
+ "tsdown": "^0.20.1",
21
+ "vitest": "^4.0.18"
22
22
  },
23
23
  "scripts": {
24
24
  "lint": "biome check --fix",
@@ -1,7 +1,7 @@
1
1
  import { $inject, t } from "alepha";
2
2
  import { $command, CliProvider } from "alepha/command";
3
- import { FileSystemProvider } from "alepha/file";
4
3
  import { $logger } from "alepha/logger";
4
+ import { FileSystemProvider } from "alepha/system";
5
5
 
6
6
  export class CreateAlephaCoreCommands {
7
7
  protected readonly log = $logger();
package/src/index.ts CHANGED
@@ -1,4 +1,19 @@
1
1
  #!/usr/bin/env node
2
+ /**
3
+ * | type | quality | stability |
4
+ * |------|---------|-----------|
5
+ * | tooling | rare | stable |
6
+ *
7
+ * Quick project setup tool.
8
+ *
9
+ * **Features:**
10
+ * - `npx create-alepha` to bootstrap projects
11
+ * - Template selection
12
+ * - Environment configuration
13
+ * - Package manager detection
14
+ *
15
+ * @module create-alepha
16
+ */
2
17
  import { Alepha, run } from "alepha";
3
18
  import { CreateAlephaCoreCommands } from "./CreateAlephaCoreCommands.ts";
4
19
  import { version } from "./version.ts";