@insforge/cli 0.1.35 → 0.1.37
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 +16 -16
- 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
|
|
|
@@ -1872,7 +1872,7 @@ async function readEnvFile(cwd) {
|
|
|
1872
1872
|
|
|
1873
1873
|
// src/lib/analytics.ts
|
|
1874
1874
|
import { PostHog } from "posthog-node";
|
|
1875
|
-
var POSTHOG_API_KEY = "";
|
|
1875
|
+
var POSTHOG_API_KEY = "phc_ueV1ii62wdBTkH7E70ugyeqHIHu8dFDdjs0qq3TZhJz";
|
|
1876
1876
|
var POSTHOG_HOST = process.env.POSTHOG_HOST || "https://us.i.posthog.com";
|
|
1877
1877
|
var client = null;
|
|
1878
1878
|
function getClient() {
|
|
@@ -2042,7 +2042,7 @@ function registerDeploymentsDeployCommand(deploymentsCmd2) {
|
|
|
2042
2042
|
} else {
|
|
2043
2043
|
clack9.log.info(`Deployment ID: ${result.deploymentId}`);
|
|
2044
2044
|
clack9.log.warn("Deployment did not finish within 2 minutes.");
|
|
2045
|
-
clack9.log.info(`Check status with: insforge deployments status ${result.deploymentId}`);
|
|
2045
|
+
clack9.log.info(`Check status with: npx @insforge/cli deployments status ${result.deploymentId}`);
|
|
2046
2046
|
}
|
|
2047
2047
|
}
|
|
2048
2048
|
await reportCliUsage("cli.deployments.deploy", true);
|
|
@@ -2202,7 +2202,7 @@ function registerCreateCommand(program2) {
|
|
|
2202
2202
|
const defaultName = getDefaultProjectName();
|
|
2203
2203
|
const name = await clack10.text({
|
|
2204
2204
|
message: "Project name:",
|
|
2205
|
-
...defaultName ? {
|
|
2205
|
+
...defaultName ? { initialValue: defaultName } : {},
|
|
2206
2206
|
validate: (v) => v.length >= 2 ? void 0 : "Name must be at least 2 characters"
|
|
2207
2207
|
});
|
|
2208
2208
|
if (clack10.isCancel(name)) process.exit(0);
|
|
@@ -2347,7 +2347,7 @@ function registerCreateCommand(program2) {
|
|
|
2347
2347
|
deploySpinner.stop("Deployment is still building");
|
|
2348
2348
|
clack10.log.info(`Deployment ID: ${result.deploymentId}`);
|
|
2349
2349
|
clack10.log.warn("Deployment did not finish within 2 minutes.");
|
|
2350
|
-
clack10.log.info(`Check status with: insforge deployments status ${result.deploymentId}`);
|
|
2350
|
+
clack10.log.info(`Check status with: npx @insforge/cli deployments status ${result.deploymentId}`);
|
|
2351
2351
|
}
|
|
2352
2352
|
} catch (err) {
|
|
2353
2353
|
clack10.log.warn(`Deploy failed: ${err.message}`);
|
|
@@ -2474,7 +2474,7 @@ async function downloadGitHubTemplate(templateName, projectConfig, json) {
|
|
|
2474
2474
|
dbSpinner?.stop("Database migration failed");
|
|
2475
2475
|
if (!json) {
|
|
2476
2476
|
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)"');
|
|
2477
|
+
clack10.log.info('You can run the migration manually: npx @insforge/cli db query --unrestricted "$(cat migrations/db_init.sql)"');
|
|
2478
2478
|
} else {
|
|
2479
2479
|
throw err;
|
|
2480
2480
|
}
|
|
@@ -2527,7 +2527,7 @@ function registerContextCommand(program2) {
|
|
|
2527
2527
|
console.log(` Region: ${projectConfig.region}`);
|
|
2528
2528
|
console.log(` OSS Host: ${projectConfig.oss_host}`);
|
|
2529
2529
|
} else {
|
|
2530
|
-
console.log("\n Project: (not linked \u2014 run `insforge link`)");
|
|
2530
|
+
console.log("\n Project: (not linked \u2014 run `npx @insforge/cli link`)");
|
|
2531
2531
|
}
|
|
2532
2532
|
console.log("");
|
|
2533
2533
|
} catch (err) {
|
|
@@ -2706,11 +2706,11 @@ Features: ${FEATURES.join(", ")}
|
|
|
2706
2706
|
Languages: ${LANGUAGES.join(", ")}
|
|
2707
2707
|
|
|
2708
2708
|
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) => {
|
|
2709
|
+
npx @insforge/cli docs List all available docs
|
|
2710
|
+
npx @insforge/cli docs instructions Show setup instructions
|
|
2711
|
+
npx @insforge/cli docs db typescript Show TypeScript database SDK docs
|
|
2712
|
+
npx @insforge/cli docs auth swift Show Swift auth SDK docs
|
|
2713
|
+
npx @insforge/cli docs storage rest-api Show REST API storage docs`).action(async (feature, language, _opts, cmd) => {
|
|
2714
2714
|
const { json } = getRootOpts(cmd);
|
|
2715
2715
|
try {
|
|
2716
2716
|
await requireAuth();
|