@supercheck/cli 0.1.0-beta.6 → 0.1.0-beta.7
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/bin/supercheck.js +36 -52
- package/dist/bin/supercheck.js.map +1 -1
- package/package.json +1 -1
package/dist/bin/supercheck.js
CHANGED
|
@@ -213,7 +213,7 @@ function requireTriggerKey() {
|
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
// src/version.ts
|
|
216
|
-
var CLI_VERSION = true ? "0.1.0-beta.
|
|
216
|
+
var CLI_VERSION = true ? "0.1.0-beta.7" : "0.0.0-dev";
|
|
217
217
|
|
|
218
218
|
// src/api/client.ts
|
|
219
219
|
import { ProxyAgent } from "undici";
|
|
@@ -1485,15 +1485,6 @@ Error: ${message}`,
|
|
|
1485
1485
|
{ successText: "Dependencies installed" }
|
|
1486
1486
|
);
|
|
1487
1487
|
}
|
|
1488
|
-
async function checkK6Binary() {
|
|
1489
|
-
const { execSync } = await import("child_process");
|
|
1490
|
-
try {
|
|
1491
|
-
execSync("k6 version", { stdio: "ignore" });
|
|
1492
|
-
return true;
|
|
1493
|
-
} catch {
|
|
1494
|
-
return false;
|
|
1495
|
-
}
|
|
1496
|
-
}
|
|
1497
1488
|
|
|
1498
1489
|
// src/commands/init.ts
|
|
1499
1490
|
var CONFIG_TEMPLATE = `import { defineConfig } from '@supercheck/cli'
|
|
@@ -3375,16 +3366,38 @@ function generateConfigContent(opts) {
|
|
|
3375
3366
|
parts.push(" * for your Supercheck project configuration.");
|
|
3376
3367
|
parts.push(" *");
|
|
3377
3368
|
parts.push(" * Getting Started:");
|
|
3378
|
-
parts.push(" * 1.
|
|
3379
|
-
parts.push(" *
|
|
3380
|
-
parts.push(" *
|
|
3381
|
-
parts.push(" *
|
|
3369
|
+
parts.push(" * 1. Install dependencies:");
|
|
3370
|
+
parts.push(" * npm install -D @supercheck/cli typescript @types/node");
|
|
3371
|
+
parts.push(" * # If using Playwright tests, also install:");
|
|
3372
|
+
parts.push(" * npm install -D @playwright/test");
|
|
3373
|
+
parts.push(" * # If using k6 tests, install k6: https://grafana.com/docs/k6/latest/set-up/install-k6/");
|
|
3374
|
+
parts.push(" *");
|
|
3375
|
+
parts.push(" * 2. Review the configuration below and make any changes you need.");
|
|
3376
|
+
parts.push(" * 3. Preview what will change: npx supercheck diff");
|
|
3377
|
+
parts.push(" * 4. Deploy your changes: npx supercheck deploy");
|
|
3378
|
+
parts.push(" * 5. Re-sync from cloud: npx supercheck pull");
|
|
3379
|
+
parts.push(" *");
|
|
3380
|
+
parts.push(" * CLI Commands:");
|
|
3381
|
+
parts.push(" * supercheck pull Pull remote config & test scripts to local");
|
|
3382
|
+
parts.push(" * supercheck diff Compare local config vs remote");
|
|
3383
|
+
parts.push(" * supercheck deploy Deploy local config to the cloud");
|
|
3384
|
+
parts.push(" * supercheck destroy Remove all managed resources from the cloud");
|
|
3382
3385
|
parts.push(" *");
|
|
3383
|
-
parts.push(" *
|
|
3384
|
-
parts.push(" * supercheck test validate
|
|
3385
|
-
parts.push(" * supercheck
|
|
3386
|
-
parts.push(" *
|
|
3387
|
-
parts.push(" * supercheck
|
|
3386
|
+
parts.push(" * supercheck test list List all tests");
|
|
3387
|
+
parts.push(" * supercheck test validate Validate a local test script");
|
|
3388
|
+
parts.push(" * supercheck test execute <id> Execute a test immediately");
|
|
3389
|
+
parts.push(" *");
|
|
3390
|
+
parts.push(" * supercheck monitor list List all monitors");
|
|
3391
|
+
parts.push(" * supercheck job list List all jobs");
|
|
3392
|
+
parts.push(" * supercheck job run --id <id> Run a job immediately");
|
|
3393
|
+
parts.push(" *");
|
|
3394
|
+
parts.push(" * supercheck config validate Validate this config file");
|
|
3395
|
+
parts.push(" * supercheck health Check API connectivity");
|
|
3396
|
+
parts.push(" * supercheck whoami Show current authentication info");
|
|
3397
|
+
parts.push(" *");
|
|
3398
|
+
parts.push(" * CI/CD Integration:");
|
|
3399
|
+
parts.push(" * Set the SUPERCHECK_TOKEN environment variable in your CI/CD pipeline");
|
|
3400
|
+
parts.push(" * and run `supercheck deploy` to push changes automatically.");
|
|
3388
3401
|
parts.push(" *");
|
|
3389
3402
|
parts.push(` * Documentation: https://supercheck.io/docs/app/welcome`);
|
|
3390
3403
|
parts.push(" */");
|
|
@@ -3686,41 +3699,12 @@ var pullCommand = new Command14("pull").description("Pull tests, monitors, jobs,
|
|
|
3686
3699
|
}
|
|
3687
3700
|
}
|
|
3688
3701
|
logger.newline();
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
const shouldInstall = await confirmPrompt2("Install dependencies?", { default: true });
|
|
3694
|
-
if (shouldInstall) {
|
|
3695
|
-
const pm = detectPackageManager(cwd);
|
|
3696
|
-
const hasPlaywrightTests = tests.some((t) => t.type !== "performance" && t.type !== "k6");
|
|
3697
|
-
const packages = ["@supercheck/cli", "typescript", "@types/node"];
|
|
3698
|
-
if (hasPlaywrightTests) {
|
|
3699
|
-
packages.push("@playwright/test");
|
|
3700
|
-
}
|
|
3701
|
-
await installDependencies(cwd, pm, {
|
|
3702
|
-
packages,
|
|
3703
|
-
skipInstall: false
|
|
3704
|
-
});
|
|
3705
|
-
}
|
|
3706
|
-
}
|
|
3707
|
-
const hasK6Tests = tests.some((t) => t.type === "performance" || t.type === "k6");
|
|
3708
|
-
if (hasK6Tests) {
|
|
3709
|
-
const hasK6 = await checkK6Binary();
|
|
3710
|
-
if (!hasK6) {
|
|
3711
|
-
logger.warn("k6 binary not found in PATH.");
|
|
3712
|
-
logger.info("Please install k6 to run performance tests: https://grafana.com/docs/k6/latest/set-up/install-k6/");
|
|
3713
|
-
}
|
|
3714
|
-
}
|
|
3715
|
-
if (totalErrors > 0) {
|
|
3716
|
-
throw new CLIError(
|
|
3717
|
-
`Pull completed with ${totalErrors} error(s)`,
|
|
3718
|
-
1 /* GeneralError */
|
|
3719
|
-
);
|
|
3720
|
-
}
|
|
3702
|
+
logger.info("Next steps:");
|
|
3703
|
+
logger.info(" 1. Install dependencies: npm install -D @supercheck/cli typescript");
|
|
3704
|
+
logger.info(" 2. Preview changes: npx supercheck diff");
|
|
3705
|
+
logger.info(" 3. Deploy changes: npx supercheck deploy");
|
|
3721
3706
|
logger.newline();
|
|
3722
3707
|
logger.info("Tip: Review the changes, then commit to version control.");
|
|
3723
|
-
logger.info(" Run `supercheck diff` to compare local vs remote.");
|
|
3724
3708
|
logger.newline();
|
|
3725
3709
|
});
|
|
3726
3710
|
|