@pracht/cli 1.1.5 → 1.2.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.
@@ -1,21 +0,0 @@
1
- import { parseFlags } from "../cli.js";
2
- import { runDoctor } from "../verification.js";
3
-
4
- export async function doctorCommand(args) {
5
- const options = parseFlags(args);
6
- const report = runDoctor(process.cwd());
7
-
8
- if (options.json) {
9
- console.log(JSON.stringify(report, null, 2));
10
- } else {
11
- console.log(`Pracht doctor (${report.mode} mode)`);
12
- for (const check of report.checks) {
13
- console.log(`${check.status.toUpperCase().padEnd(5)} ${check.message}`);
14
- }
15
- console.log(report.ok ? "\nNo blocking issues found." : "\nBlocking issues found.");
16
- }
17
-
18
- if (!report.ok) {
19
- process.exitCode = 1;
20
- }
21
- }
@@ -1,21 +0,0 @@
1
- import { parseFlags } from "../cli.js";
2
- import { runVerification } from "../verification.js";
3
-
4
- export async function verifyCommand(args) {
5
- const options = parseFlags(args);
6
- const report = runVerification(process.cwd(), { changed: Boolean(options.changed) });
7
-
8
- if (options.json) {
9
- console.log(JSON.stringify(report, null, 2));
10
- } else {
11
- console.log(`Pracht verify (${report.mode} mode, ${report.scope} scope)`);
12
- for (const check of report.checks) {
13
- console.log(`${check.status.toUpperCase().padEnd(7)} ${check.message}`);
14
- }
15
- console.log(report.ok ? "\nNo blocking issues found." : "\nBlocking issues found.");
16
- }
17
-
18
- if (!report.ok) {
19
- process.exitCode = 1;
20
- }
21
- }
package/lib/constants.js DELETED
@@ -1,22 +0,0 @@
1
- export const DEFAULT_SECURITY_HEADERS = {
2
- "permissions-policy":
3
- "accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=()",
4
- "referrer-policy": "strict-origin-when-cross-origin",
5
- "x-content-type-options": "nosniff",
6
- "x-frame-options": "SAMEORIGIN",
7
- };
8
-
9
- export const VERSION = "0.0.0";
10
-
11
- export const PROJECT_DEFAULTS = {
12
- apiDir: "/src/api",
13
- appFile: "/src/routes.ts",
14
- middlewareDir: "/src/middleware",
15
- pagesDefaultRender: "ssr",
16
- pagesDir: "",
17
- routesDir: "/src/routes",
18
- serverDir: "/src/server",
19
- shellsDir: "/src/shells",
20
- };
21
-
22
- export const HTTP_METHODS = new Set(["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]);