arkos 1.1.46-test → 1.1.48-test
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/exports/prisma/index.js.map +1 -1
- package/dist/cjs/modules/auth/auth.controller.js +11 -23
- package/dist/cjs/modules/auth/auth.controller.js.map +1 -1
- package/dist/cjs/modules/auth/auth.router.js +7 -7
- package/dist/cjs/modules/auth/auth.router.js.map +1 -1
- package/dist/cjs/modules/base/base.controller.js +0 -1
- package/dist/cjs/modules/base/base.controller.js.map +1 -1
- package/dist/cjs/modules/base/base.middlewares.js +11 -6
- package/dist/cjs/modules/base/base.middlewares.js.map +1 -1
- package/dist/cjs/modules/base/base.service.js +0 -1
- package/dist/cjs/modules/base/base.service.js.map +1 -1
- package/dist/cjs/modules/base/utils/helpers/base.router.helpers.js +0 -1
- package/dist/cjs/modules/base/utils/helpers/base.router.helpers.js.map +1 -1
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/cjs/utils/cli/dev.js +2 -2
- package/dist/cjs/utils/cli/dev.js.map +1 -1
- package/dist/cjs/utils/cli/start.js +2 -2
- package/dist/cjs/utils/cli/start.js.map +1 -1
- package/dist/es2020/exports/prisma/index.js +1 -1
- package/dist/es2020/exports/prisma/index.js.map +1 -1
- package/dist/es2020/modules/auth/auth.controller.js +11 -23
- package/dist/es2020/modules/auth/auth.controller.js.map +1 -1
- package/dist/es2020/modules/auth/auth.router.js +8 -8
- package/dist/es2020/modules/auth/auth.router.js.map +1 -1
- package/dist/es2020/modules/base/base.controller.js +0 -1
- package/dist/es2020/modules/base/base.controller.js.map +1 -1
- package/dist/es2020/modules/base/base.middlewares.js +11 -6
- package/dist/es2020/modules/base/base.middlewares.js.map +1 -1
- package/dist/es2020/modules/base/base.service.js +0 -1
- package/dist/es2020/modules/base/base.service.js.map +1 -1
- package/dist/es2020/modules/base/utils/helpers/base.router.helpers.js +0 -1
- package/dist/es2020/modules/base/utils/helpers/base.router.helpers.js.map +1 -1
- package/dist/es2020/types/index.js.map +1 -1
- package/dist/es2020/utils/cli/dev.js +2 -2
- package/dist/es2020/utils/cli/dev.js.map +1 -1
- package/dist/es2020/utils/cli/start.js +2 -2
- package/dist/es2020/utils/cli/start.js.map +1 -1
- package/dist/types/exports/prisma/index.d.ts +2 -2
- package/dist/types/modules/base/base.middlewares.d.ts +3 -2
- package/dist/types/types/index.d.ts +8 -0
- package/package.json +2 -2
- package/dist/cjs/proxy.js +0 -1
- package/dist/cjs/proxy.js.map +0 -1
|
@@ -40,7 +40,7 @@ export async function startCommand(options = {}) {
|
|
|
40
40
|
if (config && config.available) {
|
|
41
41
|
console.info("\n");
|
|
42
42
|
console.info(` \x1b[1m\x1b[36m Arkos.js ${getVersion()}\x1b[0m`);
|
|
43
|
-
console.info(` - Local: http://${env.CLI_HOST || config.host || env.HOST}:${env.CLI_PORT || config.port || env.PORT}`);
|
|
43
|
+
console.info(` - Local: http://${env.CLI_HOST || config.host || env.HOST || "localhost"}:${env.CLI_PORT || config.port || env.PORT || "8000"}`);
|
|
44
44
|
console.info(` - Environments: ${envFiles
|
|
45
45
|
?.join(", ")
|
|
46
46
|
.replaceAll(`${process.cwd()}/`, "")}\n`);
|
|
@@ -66,7 +66,7 @@ export async function startCommand(options = {}) {
|
|
|
66
66
|
if (attempts >= maxAttempts) {
|
|
67
67
|
console.info("\n");
|
|
68
68
|
console.info(` \x1b[1m\x1b[36m Arkos.js ${getVersion()}\x1b[0m`);
|
|
69
|
-
console.info(` - Local: http://${env.CLI_HOST || env.HOST}:${env.CLI_PORT || env.PORT}`);
|
|
69
|
+
console.info(` - Local: http://${env.CLI_HOST || env.HOST || "localhost"}:${env.CLI_PORT || env.PORT || "8000"}`);
|
|
70
70
|
console.info(` - Environments: ${envFiles
|
|
71
71
|
?.join(", ")
|
|
72
72
|
.replaceAll(`${process.cwd()}/`, "")}\n`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start.js","sourceRoot":"","sources":["../../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AC;YACJ,CAAC;QACH,CAAC,CAAC;QAEF,aAAa,EAAE,CAAC;IAWlB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,sCAAsC,EAAE,KAAK,CAAC,CAAC;QAC7D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC","sourcesContent":["// src/utils/cli/start.ts\nimport path from \"path\";\nimport fs from \"fs\";\nimport { spawn } from \"child_process\";\nimport { getArkosConfig } from \"../../server\";\nimport { getVersion } from \".\";\nimport { loadEnvironmentVariables } from \"../dotenv.helpers\";\nimport { importModule } from \"../helpers/global.helpers\";\n\ninterface StartOptions {\n port?: string;\n host?: string;\n}\n\n/**\n * Production start command for the arkos CLI\n */\nexport async function startCommand(options: StartOptions = {}) {\n process.env.NODE_ENV = \"production\";\n const envFiles = loadEnvironmentVariables();\n\n try {\n const { port, host } = options;\n\n // Check for built app file\n const entryPoint = path.join(\".build\", \"src\", \"app.js\");\n\n if (!fs.existsSync(path.join(process.cwd(), entryPoint))) {\n console.error(\n `❌ Could not find built application entry point at ${entryPoint}`\n );\n process.exit(1);\n }\n\n // Set environment variables\n const env: { [x: string]: string } = {\n ...process.env,\n NODE_ENV: \"production\",\n ...(port && { CLI_PORT: port }),\n ...(host && { CLI_HOST: host }),\n ARKOS_BUILD: \"true\",\n };\n\n // Start the application\n const child = spawn(\"node\", [entryPoint], {\n stdio: \"inherit\",\n env,\n shell: true,\n });\n\n // Handle process exit\n process.on(\"SIGINT\", () => {\n if (child) {\n child.kill();\n }\n process.exit(0);\n });\n\n const checkConfig = async () => {\n try {\n const { getArkosConfig } = await importModule(\"../../server\");\n console.info(getArkosConfig);\n\n const config = getArkosConfig();\n\n if (config && config.available) {\n // Config is ready, display the info with actual values\n console.info(\"\\n\");\n console.info(` \\x1b[1m\\x1b[36m Arkos.js ${getVersion()}\\x1b[0m`);\n console.info(\n ` - Local: http://${\n env.CLI_HOST || config.host || env.HOST || \"localhost\"\n }:${env.CLI_PORT || config.port || env.PORT || \"8000\"}`\n );\n console.info(\n ` - Environments: ${envFiles\n ?.join(\", \")\n .replaceAll(`${process.cwd()}/`, \"\")}\\n`\n );\n return true;\n }\n return false;\n } catch (error) {\n console.info(error);\n return false;\n }\n };\n\n // Try to get config periodically\n const waitForConfig = async () => {\n let attempts = 0;\n const maxAttempts = 15;\n\n while (attempts < maxAttempts) {\n const ready = await checkConfig();\n if (ready) break;\n\n await new Promise((resolve) => setTimeout(resolve, 300));\n attempts++;\n }\n\n // Fall back to defaults if config never became available\n if (attempts >= maxAttempts) {\n console.info(\"\\n\");\n console.info(` \\x1b[1m\\x1b[36m Arkos.js ${getVersion()}\\x1b[0m`);\n console.info(\n ` - Local: http://${\n env.CLI_HOST || env.HOST || \"localhost\"\n }:${env.CLI_PORT || env.PORT || \"8000\"}`\n );\n console.info(\n ` - Environments: ${envFiles\n ?.join(\", \")\n .replaceAll(`${process.cwd()}/`, \"\")}\\n`\n );\n }\n };\n\n waitForConfig();\n\n // console.info(` \\x1b[1m\\x1b[36m Arkos.js ${getVersion()}\\x1b[0m`);\n // console.info(\n // ` - Local: http://${env.HOST || host}:${env.PORT || port}`\n // );\n // console.info(\n // ` - Environments: ${envFiles\n // ?.join(\", \")\n // .replaceAll(`${process.cwd()}/`, \"\")}\\n`\n // );\n } catch (error) {\n console.error(\"❌ Production server failed to start:\", error);\n process.exit(1);\n }\n}\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { PrismaQueryOptions } from "../../types";
|
|
1
|
+
import { PrismaQueryOptions, AuthPrismaQueryOptions } from "../../types";
|
|
2
2
|
import { getModels } from "../../utils/helpers/models.helpers";
|
|
3
|
-
export { PrismaQueryOptions, getModels as getPrismaModels };
|
|
3
|
+
export { PrismaQueryOptions, getModels as getPrismaModels, AuthPrismaQueryOptions, };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { NextFunction, Request, Response } from "express";
|
|
2
|
-
import { PrismaQueryOptions, ArkosRequest, ArkosRequestHandler, ArkosResponse } from "../../types";
|
|
2
|
+
import { PrismaQueryOptions, ArkosRequest, ArkosRequestHandler, ArkosResponse, AuthPrismaQueryOptions } from "../../types";
|
|
3
3
|
import { ZodSchema } from "zod";
|
|
4
4
|
import { ClassConstructor } from "class-transformer";
|
|
5
5
|
import { ValidatorOptions } from "class-validator";
|
|
6
6
|
export declare function callNext(req: Request, res: Response, next: NextFunction): void;
|
|
7
7
|
export declare function sendResponse(req: ArkosRequest, res: ArkosResponse, next: NextFunction): void;
|
|
8
8
|
export declare function addRouteMiddlwaresAndConfigs(): void;
|
|
9
|
-
export
|
|
9
|
+
export type ControllerActions = keyof PrismaQueryOptions<any> | keyof Omit<AuthPrismaQueryOptions<any>, keyof PrismaQueryOptions<any>>;
|
|
10
|
+
export declare function addPrismaQueryOptionsToRequest<T extends Record<string, any>>(prismaQueryOptions: PrismaQueryOptions<T> | AuthPrismaQueryOptions<T>, action: ControllerActions): (req: ArkosRequest, res: ArkosResponse, next: NextFunction) => void;
|
|
10
11
|
export declare function handleRequestLogs(req: Request, res: Response, next: NextFunction): void;
|
|
11
12
|
export declare function handleRequestBodyValidationAndTransformation<T extends object>(schemaOrDtoClass?: ClassConstructor<T>, classValidatorValidationOptions?: ValidatorOptions): ArkosRequestHandler;
|
|
12
13
|
export declare function handleRequestBodyValidationAndTransformation<T extends object>(schemaOrDtoClass?: ZodSchema<T>): ArkosRequestHandler;
|
|
@@ -11,6 +11,14 @@ export type PrismaQueryOptions<T extends Record<string, any>> = {
|
|
|
11
11
|
updateOne?: Partial<Parameters<T["update"]>[0]>;
|
|
12
12
|
deleteOne?: Partial<Parameters<T["delete"]>[0]>;
|
|
13
13
|
};
|
|
14
|
+
export type AuthPrismaQueryOptions<T extends Record<string, any>> = {
|
|
15
|
+
getMe?: Partial<Parameters<T["findUnique"]>[0]>;
|
|
16
|
+
updateMe?: Partial<Parameters<T["update"]>[0]>;
|
|
17
|
+
deleteMe?: Partial<Parameters<T["update"]>[0]>;
|
|
18
|
+
login?: Partial<Parameters<T["findFirst"]>[0]>;
|
|
19
|
+
signup?: Partial<Parameters<T["create"]>[0]>;
|
|
20
|
+
updatePassword?: Partial<Parameters<T["update"]>[0]>;
|
|
21
|
+
};
|
|
14
22
|
export type PrismaModelDelegate = Record<string, (args: Record<string, never>) => any>;
|
|
15
23
|
export interface UserRole {
|
|
16
24
|
id: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arkos",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.48-test",
|
|
4
4
|
"description": "The Express & Prisma Framework For RESTful API",
|
|
5
5
|
"main": "dist/cjs/exports/index.js",
|
|
6
6
|
"module": "dist/es2020/exports/index.js",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"build:types": "tsc -p tsconfig.types.json",
|
|
84
84
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
85
85
|
"postbuilda": "echo {\\\"type\":\"commonjs\\\"} > dist/cjs/package.json",
|
|
86
|
-
"build": "pnpm run build:cjs && pnpm run build:es2020 && pnpm run build:types && pnpm run minify",
|
|
86
|
+
"build": "pnpm test &&rimraf dist && pnpm run build:cjs && pnpm run build:es2020 && pnpm run build:types && pnpm run minify",
|
|
87
87
|
"minify": "esbuild dist/**/*.js --minify --outdir=dist --allow-overwrite --log-limit=0 --define:process.env.NODE_ENV=process.env.NODE_ENV",
|
|
88
88
|
"clean": "rm -r dist",
|
|
89
89
|
"dev": "ts-node --watch",
|
package/dist/cjs/proxy.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(r,e,o,t){t===void 0&&(t=o);var n=Object.getOwnPropertyDescriptor(e,o);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[o]}}),Object.defineProperty(r,t,n)}:function(r,e,o,t){t===void 0&&(t=o),r[t]=e[o]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),__importStar=this&&this.__importStar||function(){var r=function(e){return r=Object.getOwnPropertyNames||function(o){var t=[];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[t.length]=n);return t},r(e)};return function(e){if(e&&e.__esModule)return e;var o={};if(e!=null)for(var t=r(e),n=0;n<t.length;n++)t[n]!=="default"&&__createBinding(o,e,t[n]);return __setModuleDefault(o,e),o}}();Object.defineProperty(exports,"__esModule",{value:!0}),exports.arkosProxy=void 0,exports.getCapturedConfig=getCapturedConfig;let capturedConfig=null;exports.arkosProxy={init:r=>(capturedConfig=r,Promise.resolve().then(()=>__importStar(require("../path/to/real/arkos"))).then(e=>e.initApp(r)))};function getCapturedConfig(){return capturedConfig}
|
package/dist/cjs/proxy.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"proxy.js","sourceRoot":"","sources":["../../src/proxy.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,8CAEC;AAzBD,IAAI,cAAc,GAAuB,IAAI,CAAC;AASjC,QAAA,UAAU,GAAgB;IACrC,IAAI,EAAE,CAAC,MAAmB,EAAE,EAAE;QAE5B,cAAc,GAAG,MAAM,CAAC;QAIxB,OAAO,kDAAO,uBAAuB,IAAE,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE;YACxD,OAAO,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC;AAGF,SAAgB,iBAAiB;IAC/B,OAAO,cAAc,CAAC;AACxB,CAAC","sourcesContent":["// src/utils/arkosProxy.ts\nimport { ArkosConfig } from \"./types/arkos-config\";\nimport { Express } from \"express\";\n\nlet capturedConfig: ArkosConfig | null = null;\n\n// Create a type that matches the original arkos module\ntype ArkosModule = {\n init: (config: ArkosConfig) => Promise<Express>;\n // Include other properties if needed\n};\n\n// Create the proxy with proper TypeScript typing\nexport const arkosProxy: ArkosModule = {\n init: (config: ArkosConfig) => {\n // Capture the config object\n capturedConfig = config;\n\n // Import the actual module and forward the call\n // We need dynamic import since this is circular otherwise\n return import(\"../path/to/real/arkos\").then((realArkos) => {\n return realArkos.initApp(config);\n });\n },\n};\n\n// Function to get the captured config\nexport function getCapturedConfig(): ArkosConfig | null {\n return capturedConfig;\n}\n"]}
|