diff --git a/.gitignore b/.gitignore index 30bc162..3ca5eb0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -/node_modules \ No newline at end of file +/node_modules +dist +/dist \ No newline at end of file diff --git a/examples/CRUD/package-lock.json b/examples/CRUD/package-lock.json index 1b92cef..edcad74 100644 --- a/examples/CRUD/package-lock.json +++ b/examples/CRUD/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "glands": "^1.0.1" + "glands": "^1.0.2" }, "devDependencies": { "@types/ejs": "^3.1.5", @@ -167,9 +167,9 @@ } }, "node_modules/glands": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/glands/-/glands-1.0.1.tgz", - "integrity": "sha512-IL0nhwbqzT6xBwaUFi8obEisI1LBrv0ZsRFcRD+BtlbE5yxIIt3no/FzF6a0QR9ksUvIiEI/CBQAwwwKnI0U1g==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/glands/-/glands-1.0.2.tgz", + "integrity": "sha512-gOZr3f3GpT2zmersNJYAyLSw0nbvFiCLLqDXr+G8drjMd4czjds/5dIazUYRrPeS2FdAF4vxmL/43JirS9cVaQ==", "license": "MIT", "dependencies": { "@types/node": "^22.0.0", diff --git a/examples/CRUD/package.json b/examples/CRUD/package.json index 23eee06..09f2639 100644 --- a/examples/CRUD/package.json +++ b/examples/CRUD/package.json @@ -12,6 +12,6 @@ "ejs": "^3.1.10" }, "dependencies": { - "glands": "^1.0.1" + "glands": "^1.0.2" } } diff --git a/lib/core/server.ts b/lib/core/server.ts index 94f976f..68a74ef 100644 --- a/lib/core/server.ts +++ b/lib/core/server.ts @@ -1,4 +1,4 @@ -import { IncomingMessage, Server, ServerResponse } from 'http'; +import { IncomingMessage, Server, ServerResponse, METHODS } from 'http'; import { Parser } from '../helper/parser'; import { Gland } from '../types/gland'; import { ServerUtils } from '../helper'; @@ -6,7 +6,6 @@ import { WebContext } from './context'; import { Router } from './router'; import { LoadModules } from '../helper/load'; import { Context } from '../types'; -import { METHODS } from 'http'; import { midManager } from './middleware'; export class WebServer extends Server implements Gland.Listener, Gland.APP { private middlewares: Gland.Middleware[] = []; diff --git a/index.ts b/lib/index.ts similarity index 56% rename from index.ts rename to lib/index.ts index 6c6cee1..47fd734 100644 --- a/index.ts +++ b/lib/index.ts @@ -1,10 +1,10 @@ -import { WebServer } from './lib/core/server'; -import { Qiu } from './lib/cli/Qiu'; -import { DbTypes, Context } from './lib/types'; -import { Logger } from './lib/helper/logger'; -import { exposed, Route } from './lib/core/decorators'; -import { Delete, Get, Head, Options, Patch, Post, Put } from './lib/core/router/index'; -import { NxtFunction } from './lib/types/index'; +import { WebServer } from './core/server'; +import { Qiu } from './cli/Qiu'; +import { DbTypes, Context } from './types'; +import { Logger } from './helper/logger'; +import { exposed, Route } from './core/decorators'; +import { Delete, Get, Head, Options, Patch, Post, Put } from './core/router/index'; +import { NxtFunction } from './types/index'; export { Context, NxtFunction }; export default class gland extends WebServer { constructor() { diff --git a/package.json b/package.json index b971c2b..dd27901 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,9 @@ { "name": "glands", - "version": "1.0.2", + "version": "1.0.3", "description": "Glands is a lightweight framework for Node.js designed for simplicity and high performance.", - "main": "index.ts", + "main": "lib/index.ts", "type": "module", - "types": "index.ts", "directories": { "doc": "docs", "lib": "lib", diff --git a/tsconfig.json b/tsconfig.json index 4993bd4..4ee86fd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,5 +14,6 @@ "resolveJsonModule": true, "typeRoots": ["node_modules/@types", "lib/types"] }, - "include": ["lib/**/*.ts", "/*.ts", "lib/types/gland.d.ts"] + "include": ["lib/**/*.ts", "lib/types/*.d.ts"], + "exclude": ["node_modules", "dist"] }