sparkzen 1.1.0 → 1.1.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.
- package/dist/cli/index.js +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -143,7 +143,7 @@ var build = new Command3().name("build").description("Build the project").action
|
|
|
143
143
|
const projectPath = process.cwd();
|
|
144
144
|
console.log(`${bgGreenBright(bold3(" \u{1F4E6} BUILD "))} Building the project...
|
|
145
145
|
`);
|
|
146
|
-
execSync3(`npx
|
|
146
|
+
execSync3(`npx tsup`, {
|
|
147
147
|
cwd: projectPath,
|
|
148
148
|
stdio: "inherit",
|
|
149
149
|
shell: process.platform === "win32" ? "cmd.exe" : "/bin/sh"
|
|
@@ -163,7 +163,7 @@ function registerCommands(program2) {
|
|
|
163
163
|
|
|
164
164
|
// package.json
|
|
165
165
|
var name = "sparkzen";
|
|
166
|
-
var version = "1.1.
|
|
166
|
+
var version = "1.1.1";
|
|
167
167
|
|
|
168
168
|
// src/cli/index.ts
|
|
169
169
|
var program = new Command4();
|
package/dist/index.js
CHANGED
|
@@ -46,7 +46,6 @@ var registerRoute = (app, routeModule, method, finalPath) => {
|
|
|
46
46
|
// src/core/loadRoutes.ts
|
|
47
47
|
import { pathToFileURL } from "url";
|
|
48
48
|
import fs from "fs/promises";
|
|
49
|
-
import path2 from "path";
|
|
50
49
|
|
|
51
50
|
// src/core/routing/dynamicImport.ts
|
|
52
51
|
var dynamicImport = async (modulePath) => {
|
|
@@ -55,11 +54,12 @@ var dynamicImport = async (modulePath) => {
|
|
|
55
54
|
|
|
56
55
|
// src/core/loadRoutes.ts
|
|
57
56
|
import { bgRedBright, bold as bold2, dim as dim2, red } from "logfy-x";
|
|
57
|
+
import path2 from "path";
|
|
58
58
|
var loadRoutes = async (app, directory) => {
|
|
59
59
|
const production = process.env.NODE_ENV === "production";
|
|
60
60
|
const ext = production ? ".js" : ".ts";
|
|
61
61
|
const currentDir = process.cwd();
|
|
62
|
-
const routesPath = directory || (production ? path2.join(currentDir) : path2.join(currentDir, "src", "routes"));
|
|
62
|
+
const routesPath = directory || (production ? path2.join(currentDir, "dist", "routes") : path2.join(currentDir, "src", "routes"));
|
|
63
63
|
const items = await fs.readdir(routesPath, { withFileTypes: true });
|
|
64
64
|
for (const item of items) {
|
|
65
65
|
const itemPath = path2.join(routesPath, item.name);
|