create-agentlink 0.2.0 → 0.3.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 +5 -1
- package/package.json +1 -1
- package/src/index.ts +6 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// src/index.ts
|
|
4
|
+
import fs3 from "fs";
|
|
4
5
|
import path3 from "path";
|
|
6
|
+
import { fileURLToPath } from "url";
|
|
5
7
|
import { Command } from "commander";
|
|
6
8
|
|
|
7
9
|
// src/theme.ts
|
|
@@ -378,9 +380,11 @@ async function wizard(initialName, initialPrompt) {
|
|
|
378
380
|
}
|
|
379
381
|
|
|
380
382
|
// src/index.ts
|
|
383
|
+
var __dirname = path3.dirname(fileURLToPath(import.meta.url));
|
|
384
|
+
var pkg = JSON.parse(fs3.readFileSync(path3.join(__dirname, "..", "package.json"), "utf-8"));
|
|
381
385
|
var LOG_FILE2 = "agentlink-debug.log";
|
|
382
386
|
var program = new Command();
|
|
383
|
-
program.name("agentlink").description("CLI for scaffolding Supabase apps with AI agents").version(
|
|
387
|
+
program.name("agentlink").description("CLI for scaffolding Supabase apps with AI agents").version(pkg.version).argument("[name]", "Project name").argument("[prompt]", "What do you want to build?").action(async (name, prompt) => {
|
|
384
388
|
initLog();
|
|
385
389
|
try {
|
|
386
390
|
await wizard(name, prompt);
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
1
2
|
import path from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
2
4
|
import { Command } from "commander";
|
|
3
5
|
import { dim, red } from "./theme.js";
|
|
4
6
|
import { initLog } from "./utils.js";
|
|
5
7
|
import { wizard } from "./wizard.js";
|
|
6
8
|
|
|
9
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
10
|
+
const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, "..", "package.json"), "utf-8"));
|
|
11
|
+
|
|
7
12
|
const LOG_FILE = "agentlink-debug.log";
|
|
8
13
|
|
|
9
14
|
const program = new Command();
|
|
@@ -11,7 +16,7 @@ const program = new Command();
|
|
|
11
16
|
program
|
|
12
17
|
.name("agentlink")
|
|
13
18
|
.description("CLI for scaffolding Supabase apps with AI agents")
|
|
14
|
-
.version(
|
|
19
|
+
.version(pkg.version)
|
|
15
20
|
.argument("[name]", "Project name")
|
|
16
21
|
.argument("[prompt]", "What do you want to build?")
|
|
17
22
|
.action(async (name?: string, prompt?: string) => {
|