@insforge/cli 0.1.36 → 0.1.38
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 +34 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -97,13 +97,13 @@ var CLIError = class extends Error {
|
|
|
97
97
|
}
|
|
98
98
|
};
|
|
99
99
|
var AuthError = class extends CLIError {
|
|
100
|
-
constructor(message = "Not authenticated. Run `insforge login` first.") {
|
|
100
|
+
constructor(message = "Not authenticated. Run `npx @insforge/cli login` first.") {
|
|
101
101
|
super(message, 2, "AUTH_ERROR");
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
104
|
var ProjectNotLinkedError = class extends CLIError {
|
|
105
105
|
constructor() {
|
|
106
|
-
super("No project linked. Run `insforge link` first.", 3, "PROJECT_NOT_LINKED");
|
|
106
|
+
super("No project linked. Run `npx @insforge/cli link` first.", 3, "PROJECT_NOT_LINKED");
|
|
107
107
|
}
|
|
108
108
|
};
|
|
109
109
|
function getDeploymentError(metadata) {
|
|
@@ -345,7 +345,7 @@ async function requireAuth(apiUrl, allowOssBypass = true) {
|
|
|
345
345
|
clack2.log.error(`Login failed: ${msg}`);
|
|
346
346
|
const retry = await clack2.confirm({ message: "Would you like to try again?" });
|
|
347
347
|
if (clack2.isCancel(retry) || !retry) {
|
|
348
|
-
throw new AuthError("Authentication required. Run `insforge login` to authenticate.");
|
|
348
|
+
throw new AuthError("Authentication required. Run `npx @insforge/cli login` to authenticate.");
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
351
|
}
|
|
@@ -353,7 +353,7 @@ async function requireAuth(apiUrl, allowOssBypass = true) {
|
|
|
353
353
|
async function refreshAccessToken(apiUrl) {
|
|
354
354
|
const creds = getCredentials();
|
|
355
355
|
if (!creds?.refresh_token) {
|
|
356
|
-
throw new AuthError("Refresh token not found. Run `insforge login` again.");
|
|
356
|
+
throw new AuthError("Refresh token not found. Run `npx @insforge/cli login` again.");
|
|
357
357
|
}
|
|
358
358
|
const platformUrl = getPlatformApiUrl(apiUrl);
|
|
359
359
|
const config = getGlobalConfig();
|
|
@@ -378,7 +378,7 @@ async function refreshAccessToken(apiUrl) {
|
|
|
378
378
|
const newCreds = await performOAuthLogin(apiUrl);
|
|
379
379
|
return newCreds.access_token;
|
|
380
380
|
}
|
|
381
|
-
throw new AuthError("Failed to refresh token. Run `insforge login` again.");
|
|
381
|
+
throw new AuthError("Failed to refresh token. Run `npx @insforge/cli login` again.");
|
|
382
382
|
}
|
|
383
383
|
}
|
|
384
384
|
|
|
@@ -1901,7 +1901,7 @@ import * as fs2 from "fs/promises";
|
|
|
1901
1901
|
import * as clack9 from "@clack/prompts";
|
|
1902
1902
|
import archiver from "archiver";
|
|
1903
1903
|
var POLL_INTERVAL_MS = 5e3;
|
|
1904
|
-
var POLL_TIMEOUT_MS =
|
|
1904
|
+
var POLL_TIMEOUT_MS = 3e5;
|
|
1905
1905
|
var EXCLUDE_PATTERNS = [
|
|
1906
1906
|
"node_modules",
|
|
1907
1907
|
".git",
|
|
@@ -1911,7 +1911,23 @@ var EXCLUDE_PATTERNS = [
|
|
|
1911
1911
|
"dist",
|
|
1912
1912
|
"build",
|
|
1913
1913
|
".DS_Store",
|
|
1914
|
-
".insforge"
|
|
1914
|
+
".insforge",
|
|
1915
|
+
// IDE and AI agent configs
|
|
1916
|
+
".claude",
|
|
1917
|
+
".agents",
|
|
1918
|
+
".augment",
|
|
1919
|
+
".kilocode",
|
|
1920
|
+
".kiro",
|
|
1921
|
+
".qoder",
|
|
1922
|
+
".qwen",
|
|
1923
|
+
".roo",
|
|
1924
|
+
".trae",
|
|
1925
|
+
".windsurf",
|
|
1926
|
+
".vercel",
|
|
1927
|
+
".turbo",
|
|
1928
|
+
".cache",
|
|
1929
|
+
"skills",
|
|
1930
|
+
"coverage"
|
|
1915
1931
|
];
|
|
1916
1932
|
function shouldExclude(name) {
|
|
1917
1933
|
const normalized = name.replace(/\\/g, "/");
|
|
@@ -2041,8 +2057,8 @@ function registerDeploymentsDeployCommand(deploymentsCmd2) {
|
|
|
2041
2057
|
outputJson({ id: result.deploymentId, status: result.deployment?.status ?? "building", timedOut: true });
|
|
2042
2058
|
} else {
|
|
2043
2059
|
clack9.log.info(`Deployment ID: ${result.deploymentId}`);
|
|
2044
|
-
clack9.log.warn("Deployment did not finish within
|
|
2045
|
-
clack9.log.info(`Check status with: insforge deployments status ${result.deploymentId}`);
|
|
2060
|
+
clack9.log.warn("Deployment did not finish within 5 minutes.");
|
|
2061
|
+
clack9.log.info(`Check status with: npx @insforge/cli deployments status ${result.deploymentId}`);
|
|
2046
2062
|
}
|
|
2047
2063
|
}
|
|
2048
2064
|
await reportCliUsage("cli.deployments.deploy", true);
|
|
@@ -2202,7 +2218,7 @@ function registerCreateCommand(program2) {
|
|
|
2202
2218
|
const defaultName = getDefaultProjectName();
|
|
2203
2219
|
const name = await clack10.text({
|
|
2204
2220
|
message: "Project name:",
|
|
2205
|
-
...defaultName ? {
|
|
2221
|
+
...defaultName ? { initialValue: defaultName } : {},
|
|
2206
2222
|
validate: (v) => v.length >= 2 ? void 0 : "Name must be at least 2 characters"
|
|
2207
2223
|
});
|
|
2208
2224
|
if (clack10.isCancel(name)) process.exit(0);
|
|
@@ -2347,7 +2363,7 @@ function registerCreateCommand(program2) {
|
|
|
2347
2363
|
deploySpinner.stop("Deployment is still building");
|
|
2348
2364
|
clack10.log.info(`Deployment ID: ${result.deploymentId}`);
|
|
2349
2365
|
clack10.log.warn("Deployment did not finish within 2 minutes.");
|
|
2350
|
-
clack10.log.info(`Check status with: insforge deployments status ${result.deploymentId}`);
|
|
2366
|
+
clack10.log.info(`Check status with: npx @insforge/cli deployments status ${result.deploymentId}`);
|
|
2351
2367
|
}
|
|
2352
2368
|
} catch (err) {
|
|
2353
2369
|
clack10.log.warn(`Deploy failed: ${err.message}`);
|
|
@@ -2474,7 +2490,7 @@ async function downloadGitHubTemplate(templateName, projectConfig, json) {
|
|
|
2474
2490
|
dbSpinner?.stop("Database migration failed");
|
|
2475
2491
|
if (!json) {
|
|
2476
2492
|
clack10.log.warn(`Migration failed: ${err.message}`);
|
|
2477
|
-
clack10.log.info('You can run the migration manually: insforge db query --unrestricted "$(cat migrations/db_init.sql)"');
|
|
2493
|
+
clack10.log.info('You can run the migration manually: npx @insforge/cli db query --unrestricted "$(cat migrations/db_init.sql)"');
|
|
2478
2494
|
} else {
|
|
2479
2495
|
throw err;
|
|
2480
2496
|
}
|
|
@@ -2527,7 +2543,7 @@ function registerContextCommand(program2) {
|
|
|
2527
2543
|
console.log(` Region: ${projectConfig.region}`);
|
|
2528
2544
|
console.log(` OSS Host: ${projectConfig.oss_host}`);
|
|
2529
2545
|
} else {
|
|
2530
|
-
console.log("\n Project: (not linked \u2014 run `insforge link`)");
|
|
2546
|
+
console.log("\n Project: (not linked \u2014 run `npx @insforge/cli link`)");
|
|
2531
2547
|
}
|
|
2532
2548
|
console.log("");
|
|
2533
2549
|
} catch (err) {
|
|
@@ -2706,11 +2722,11 @@ Features: ${FEATURES.join(", ")}
|
|
|
2706
2722
|
Languages: ${LANGUAGES.join(", ")}
|
|
2707
2723
|
|
|
2708
2724
|
Examples:
|
|
2709
|
-
insforge docs List all available docs
|
|
2710
|
-
insforge docs instructions Show setup instructions
|
|
2711
|
-
insforge docs db typescript Show TypeScript database SDK docs
|
|
2712
|
-
insforge docs auth swift Show Swift auth SDK docs
|
|
2713
|
-
insforge docs storage rest-api Show REST API storage docs`).action(async (feature, language, _opts, cmd) => {
|
|
2725
|
+
npx @insforge/cli docs List all available docs
|
|
2726
|
+
npx @insforge/cli docs instructions Show setup instructions
|
|
2727
|
+
npx @insforge/cli docs db typescript Show TypeScript database SDK docs
|
|
2728
|
+
npx @insforge/cli docs auth swift Show Swift auth SDK docs
|
|
2729
|
+
npx @insforge/cli docs storage rest-api Show REST API storage docs`).action(async (feature, language, _opts, cmd) => {
|
|
2714
2730
|
const { json } = getRootOpts(cmd);
|
|
2715
2731
|
try {
|
|
2716
2732
|
await requireAuth();
|