sprint-es 0.0.43 → 0.0.44

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/cjs/cli.cjs CHANGED
@@ -4,7 +4,6 @@ const child_process = require("child_process");
4
4
  const fs = require("fs");
5
5
  const crypto = require("crypto");
6
6
  const path = require("path");
7
- const dotenv = require("dotenv");
8
7
  function _interopNamespaceDefault(e) {
9
8
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
10
9
  if (e) {
@@ -56,21 +55,6 @@ function getProjectRoot() {
56
55
  }
57
56
  return process.cwd();
58
57
  }
59
- function loadEnv() {
60
- const projectRoot2 = getProjectRoot();
61
- const envFile = fs.existsSync(path.join(projectRoot2, ".env")) ? ".env" : fs.existsSync(path.join(projectRoot2, ".env.development")) ? ".env.development" : fs.existsSync(path.join(projectRoot2, ".env.production")) ? ".env.production" : null;
62
- if (envFile) dotenv.config({ path: path.join(projectRoot2, envFile), quiet: true });
63
- }
64
- function checkJwtKeys() {
65
- loadEnv();
66
- const publicKey = process.env.JWT_PUBLIC_KEY;
67
- const privateKey = process.env.JWT_PRIVATE_KEY;
68
- if (!publicKey || !privateKey) {
69
- console.error("\nāŒ Error: JWT keys not configured.");
70
- console.error("Run 'npm run generate:keys' to generate new keys.\n");
71
- process.exit(1);
72
- }
73
- }
74
58
  const projectRoot = getProjectRoot();
75
59
  function runCommand(cmd, envVars) {
76
60
  const child = child_process.spawn(cmd, args.slice(1), {
@@ -85,7 +69,6 @@ function runCommand(cmd, envVars) {
85
69
  }
86
70
  switch (command) {
87
71
  case "dev":
88
- checkJwtKeys();
89
72
  console.log("šŸš€ Starting development server with hot reload...");
90
73
  const srcFile = fs.existsSync(path.join(projectRoot, "src/app.ts")) ? "src/app.ts" : fs.existsSync(path.join(projectRoot, "src/app.js")) ? "src/app.js" : fs.existsSync(path.join(projectRoot, "src/index.ts")) ? "src/index.ts" : "src/index.js";
91
74
  runCommand(`tsx --watch ${srcFile}`, { NODE_ENV: "development" });
@@ -100,7 +83,6 @@ switch (command) {
100
83
  }
101
84
  break;
102
85
  case "start":
103
- checkJwtKeys();
104
86
  console.log("šŸš€ Starting production server...");
105
87
  runCommand("node dist/index.js", { NODE_ENV: "production" });
106
88
  break;
package/dist/esm/cli.js CHANGED
@@ -3,7 +3,6 @@ import { spawn } from "child_process";
3
3
  import { existsSync } from "fs";
4
4
  import * as crypto from "crypto";
5
5
  import { join, resolve } from "path";
6
- import dotenv from "dotenv";
7
6
  const args = process.argv.slice(2);
8
7
  const command = args[0];
9
8
  if (!command) {
@@ -38,21 +37,6 @@ function getProjectRoot() {
38
37
  }
39
38
  return process.cwd();
40
39
  }
41
- function loadEnv() {
42
- const projectRoot2 = getProjectRoot();
43
- const envFile = existsSync(join(projectRoot2, ".env")) ? ".env" : existsSync(join(projectRoot2, ".env.development")) ? ".env.development" : existsSync(join(projectRoot2, ".env.production")) ? ".env.production" : null;
44
- if (envFile) dotenv.config({ path: join(projectRoot2, envFile), quiet: true });
45
- }
46
- function checkJwtKeys() {
47
- loadEnv();
48
- const publicKey = process.env.JWT_PUBLIC_KEY;
49
- const privateKey = process.env.JWT_PRIVATE_KEY;
50
- if (!publicKey || !privateKey) {
51
- console.error("\nāŒ Error: JWT keys not configured.");
52
- console.error("Run 'npm run generate:keys' to generate new keys.\n");
53
- process.exit(1);
54
- }
55
- }
56
40
  const projectRoot = getProjectRoot();
57
41
  function runCommand(cmd, envVars) {
58
42
  const child = spawn(cmd, args.slice(1), {
@@ -67,7 +51,6 @@ function runCommand(cmd, envVars) {
67
51
  }
68
52
  switch (command) {
69
53
  case "dev":
70
- checkJwtKeys();
71
54
  console.log("šŸš€ Starting development server with hot reload...");
72
55
  const srcFile = existsSync(join(projectRoot, "src/app.ts")) ? "src/app.ts" : existsSync(join(projectRoot, "src/app.js")) ? "src/app.js" : existsSync(join(projectRoot, "src/index.ts")) ? "src/index.ts" : "src/index.js";
73
56
  runCommand(`tsx --watch ${srcFile}`, { NODE_ENV: "development" });
@@ -82,7 +65,6 @@ switch (command) {
82
65
  }
83
66
  break;
84
67
  case "start":
85
- checkJwtKeys();
86
68
  console.log("šŸš€ Starting production server...");
87
69
  runCommand("node dist/index.js", { NODE_ENV: "production" });
88
70
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprint-es",
3
- "version": "0.0.43",
3
+ "version": "0.0.44",
4
4
  "description": "Sprint - Quickly API",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",