@insforge/cli 0.1.44 → 0.1.45
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 +8 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1215,7 +1215,7 @@ async function copyDir(src, dest) {
|
|
|
1215
1215
|
}
|
|
1216
1216
|
}
|
|
1217
1217
|
function registerCreateCommand(program2) {
|
|
1218
|
-
program2.command("create").description("Create a new InsForge project").option("--name <name>", "Project name").option("--org-id <id>", "Organization ID").option("--region <region>", "Deployment region (us-east, us-west, eu-central, ap-southeast)").option("--template <template>", "Template to use: react, nextjs, chatbot, crm, e-commerce, or empty").action(async (opts, cmd) => {
|
|
1218
|
+
program2.command("create").description("Create a new InsForge project").option("--name <name>", "Project name").option("--org-id <id>", "Organization ID").option("--region <region>", "Deployment region (us-east, us-west, eu-central, ap-southeast)").option("--template <template>", "Template to use: react, nextjs, chatbot, crm, e-commerce, todo, or empty").action(async (opts, cmd) => {
|
|
1219
1219
|
const { json, apiUrl } = getRootOpts(cmd);
|
|
1220
1220
|
try {
|
|
1221
1221
|
await requireAuth(apiUrl, false);
|
|
@@ -1266,7 +1266,7 @@ function registerCreateCommand(program2) {
|
|
|
1266
1266
|
if (projectName.length < 2 || projectName === "." || projectName === "..") {
|
|
1267
1267
|
throw new CLIError("Project name must be at least 2 safe characters (letters, numbers, hyphens).");
|
|
1268
1268
|
}
|
|
1269
|
-
const validTemplates = ["react", "nextjs", "chatbot", "crm", "e-commerce", "empty"];
|
|
1269
|
+
const validTemplates = ["react", "nextjs", "chatbot", "crm", "e-commerce", "todo", "empty"];
|
|
1270
1270
|
let template = opts.template;
|
|
1271
1271
|
if (template && !validTemplates.includes(template)) {
|
|
1272
1272
|
throw new CLIError(`Invalid template "${template}". Valid options: ${validTemplates.join(", ")}`);
|
|
@@ -1296,7 +1296,8 @@ function registerCreateCommand(program2) {
|
|
|
1296
1296
|
{ value: "nextjs", label: "Web app template with Next.js" },
|
|
1297
1297
|
{ value: "chatbot", label: "AI Chatbot with Next.js" },
|
|
1298
1298
|
{ value: "crm", label: "CRM with Next.js" },
|
|
1299
|
-
{ value: "e-commerce", label: "E-Commerce store with Next.js" }
|
|
1299
|
+
{ value: "e-commerce", label: "E-Commerce store with Next.js" },
|
|
1300
|
+
{ value: "todo", label: "Todo app with Next.js" }
|
|
1300
1301
|
]
|
|
1301
1302
|
});
|
|
1302
1303
|
if (clack7.isCancel(selected)) process.exit(0);
|
|
@@ -1359,7 +1360,7 @@ function registerCreateCommand(program2) {
|
|
|
1359
1360
|
saveProjectConfig(projectConfig);
|
|
1360
1361
|
projectLinked = true;
|
|
1361
1362
|
s?.stop(`Project "${project.name}" created and linked`);
|
|
1362
|
-
const githubTemplates = ["chatbot", "crm", "e-commerce", "nextjs", "react"];
|
|
1363
|
+
const githubTemplates = ["chatbot", "crm", "e-commerce", "nextjs", "react", "todo"];
|
|
1363
1364
|
if (githubTemplates.includes(template)) {
|
|
1364
1365
|
await downloadGitHubTemplate(template, projectConfig, json);
|
|
1365
1366
|
} else if (hasTemplate) {
|
|
@@ -1618,7 +1619,7 @@ function buildOssHost2(appkey, region) {
|
|
|
1618
1619
|
return `https://${appkey}.${region}.insforge.app`;
|
|
1619
1620
|
}
|
|
1620
1621
|
function registerProjectLinkCommand(program2) {
|
|
1621
|
-
program2.command("link").description("Link current directory to an InsForge project").option("--project-id <id>", "Project ID to link").option("--org-id <id>", "Organization ID").option("--template <template>", "Download a template after linking: react, nextjs, chatbot, crm, e-commerce").option("--api-base-url <url>", "API Base URL for direct linking (OSS/Self-hosted)").option("--api-key <key>", "API Key for direct linking (OSS/Self-hosted)").action(async (opts, cmd) => {
|
|
1622
|
+
program2.command("link").description("Link current directory to an InsForge project").option("--project-id <id>", "Project ID to link").option("--org-id <id>", "Organization ID").option("--template <template>", "Download a template after linking: react, nextjs, chatbot, crm, e-commerce, todo").option("--api-base-url <url>", "API Base URL for direct linking (OSS/Self-hosted)").option("--api-key <key>", "API Key for direct linking (OSS/Self-hosted)").action(async (opts, cmd) => {
|
|
1622
1623
|
const { json, apiUrl } = getRootOpts(cmd);
|
|
1623
1624
|
try {
|
|
1624
1625
|
if (opts.apiBaseUrl || opts.apiKey) {
|
|
@@ -1754,7 +1755,7 @@ function registerProjectLinkCommand(program2) {
|
|
|
1754
1755
|
}
|
|
1755
1756
|
const template = opts.template;
|
|
1756
1757
|
if (template) {
|
|
1757
|
-
const validTemplates = ["react", "nextjs", "chatbot", "crm", "e-commerce"];
|
|
1758
|
+
const validTemplates = ["react", "nextjs", "chatbot", "crm", "e-commerce", "todo"];
|
|
1758
1759
|
if (!validTemplates.includes(template)) {
|
|
1759
1760
|
throw new CLIError(`Invalid template "${template}". Valid options: ${validTemplates.join(", ")}`);
|
|
1760
1761
|
}
|
|
@@ -1785,7 +1786,7 @@ function registerProjectLinkCommand(program2) {
|
|
|
1785
1786
|
process.chdir(templateDir);
|
|
1786
1787
|
saveProjectConfig(projectConfig);
|
|
1787
1788
|
captureEvent(orgId ?? project.organization_id, "template_selected", { template, source: "link" });
|
|
1788
|
-
const githubTemplates = ["chatbot", "crm", "e-commerce", "nextjs", "react"];
|
|
1789
|
+
const githubTemplates = ["chatbot", "crm", "e-commerce", "nextjs", "react", "todo"];
|
|
1789
1790
|
if (githubTemplates.includes(template)) {
|
|
1790
1791
|
await downloadGitHubTemplate(template, projectConfig, json);
|
|
1791
1792
|
} else {
|