@arkstack/common 0.1.30 → 0.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.
package/dist/app.d.ts CHANGED
@@ -1,4 +1,8 @@
1
+ import { GlobalConfig, GlobalEnv } from './system'
2
+
1
3
  declare global {
4
+ var env: GlobalEnv
5
+ var config: GlobalConfig
2
6
  interface String {
3
7
  /**
4
8
  * Converts the string to title case.
package/dist/index.d.ts CHANGED
@@ -1,9 +1,11 @@
1
1
  /// <reference path="./app.d.ts" />
2
+ import { DotPath } from "@h3ravel/support";
3
+
2
4
  //#region src/lifecycle.d.ts
3
5
  declare const bindGracefulShutdown: (shutdown: () => Promise<void> | void) => void;
4
6
  //#endregion
5
7
  //#region src/network.d.ts
6
- declare const bootWithDetectedPort: (boot: (port: number) => Promise<void>, preferredPort?: number) => Promise<void>;
8
+ declare const bootWithDetectedPort: (boot: (port: number) => Promise<void>, preferredPort?: number, app?: any) => Promise<void>;
7
9
  declare const buildHtmlErrorResponse: ({
8
10
  message,
9
11
  stack,
@@ -19,5 +21,16 @@ declare const buildHtmlErrorResponse: ({
19
21
  //#region src/prototypes.d.ts
20
22
  declare const loadPrototypes: () => void;
21
23
  //#endregion
22
- export { bindGracefulShutdown, bootWithDetectedPort, buildHtmlErrorResponse, loadPrototypes };
24
+ //#region src/system.d.ts
25
+ interface GlobalEnv {
26
+ <X = string, Y = undefined>(env: string, defaultValue?: Y): Y extends undefined ? X : Y;
27
+ }
28
+ declare const env: GlobalEnv;
29
+ declare const appUrl: (link?: string) => string;
30
+ interface GlobalConfig {
31
+ <X extends Record<string, any>, P extends DotPath<X> | undefined = undefined>(key?: P, defaultValue?: any): P extends string ? any : X;
32
+ }
33
+ declare const config: GlobalConfig;
34
+ //#endregion
35
+ export { GlobalConfig, GlobalEnv, appUrl, bindGracefulShutdown, bootWithDetectedPort, buildHtmlErrorResponse, config, env, loadPrototypes };
23
36
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,3 +1,7 @@
1
+ import { Obj } from "@h3ravel/support";
2
+ import { createRequire } from "module";
3
+ import path from "node:path";
4
+ import { readdirSync } from "fs";
1
5
  import { detect } from "detect-port";
2
6
 
3
7
  //#region src/lifecycle.ts
@@ -13,9 +17,83 @@ const bindGracefulShutdown = (shutdown) => {
13
17
  });
14
18
  };
15
19
 
20
+ //#endregion
21
+ //#region src/system.ts
22
+ /**
23
+ * Read the .env file
24
+ *
25
+ * @param env
26
+ * @param def
27
+ * @returns
28
+ */
29
+ const env = (env, defaultValue) => {
30
+ let val = process.env[env] ?? "";
31
+ if ([
32
+ true,
33
+ "true",
34
+ "on",
35
+ false,
36
+ "false",
37
+ "off"
38
+ ].includes(val)) val = [
39
+ true,
40
+ "true",
41
+ "on"
42
+ ].includes(val);
43
+ if (!isNaN(Number(val)) && typeof val !== "boolean" && typeof val !== "undefined" && val !== "") val = Number(val);
44
+ if (val === "") val = void 0;
45
+ if (val === "null") val = null;
46
+ val ??= defaultValue;
47
+ return val;
48
+ };
49
+ /**
50
+ * Build the app url
51
+ *
52
+ * @param link
53
+ * @returns
54
+ */
55
+ const appUrl = (link) => {
56
+ const port = env("PORT") || "3000";
57
+ const defaultUrl = `http://localhost:${port}`;
58
+ const appUrl = env("APP_URL") ?? defaultUrl;
59
+ try {
60
+ const url = new URL(appUrl);
61
+ if (url.port || url.hostname === "localhost") url.port = port;
62
+ const baseUrl = url.toString().replace(/\/$/, "");
63
+ if (link) return `${baseUrl}${`/${link.replace(/^\/+/, "")}`}`;
64
+ return baseUrl;
65
+ } catch {
66
+ return link ? `${defaultUrl}/${link.replace(/^\/+/, "")}` : defaultUrl;
67
+ }
68
+ };
69
+ /**
70
+ * Gets the application configuration.
71
+ *
72
+ * @param key The configuration key to retrieve.
73
+ * @param defaultValue The default value to return if the key is not found.
74
+ * @returns The configuration value.
75
+ */
76
+ const config = (key, defaultValue) => {
77
+ const require = createRequire(import.meta.url);
78
+ const config = readdirSync(path.join(process.cwd(), "dist/config"), { withFileTypes: true }).filter((file) => {
79
+ if (file.name.includes("middleware") && globalThis.arkctx.runtime === "CLI") return false;
80
+ return file.isFile() && (file.name.endsWith(".js") || file.name.endsWith(".ts"));
81
+ }).reduce((configs, file) => {
82
+ const configName = path.basename(file.name, path.extname(file.name));
83
+ configs[configName] = require(path.join(file.parentPath, file.name)).default(globalThis.app());
84
+ return configs;
85
+ }, {});
86
+ if (key) return Obj.get(config, key, defaultValue);
87
+ return config;
88
+ };
89
+
16
90
  //#endregion
17
91
  //#region src/network.ts
18
- const bootWithDetectedPort = async (boot, preferredPort = 3e3) => {
92
+ const bootWithDetectedPort = async (boot, preferredPort = 3e3, app) => {
93
+ if (app && !globalThis.app) globalThis.app = () => app;
94
+ globalThis.env = env;
95
+ globalThis.config = config;
96
+ globalThis.arkctx = { runtime: "HTTP" };
19
97
  await boot(await detect(preferredPort));
20
98
  };
21
99
  const buildHtmlErrorResponse = ({ message = "An unexpected error occurred.", stack, title, code = 500 }) => {
@@ -96,5 +174,5 @@ const loadPrototypes = () => {
96
174
  };
97
175
 
98
176
  //#endregion
99
- export { bindGracefulShutdown, bootWithDetectedPort, buildHtmlErrorResponse, loadPrototypes };
177
+ export { appUrl, bindGracefulShutdown, bootWithDetectedPort, buildHtmlErrorResponse, config, env, loadPrototypes };
100
178
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/lifecycle.ts","../src/network.ts","../src/prototypes.ts"],"sourcesContent":["export const bindGracefulShutdown = (shutdown: () => Promise<void> | void) => {\n ['SIGINT', 'SIGTERM', 'SIGQUIT'].forEach((signal) => {\n process.on(signal, async () => {\n await shutdown()\n })\n })\n}\n","import { detect } from 'detect-port'\n\nexport const bootWithDetectedPort = async (\n boot: (port: number) => Promise<void>,\n preferredPort: number = 3000,\n) => {\n const port = await detect(preferredPort)\n await boot(port)\n}\n\n\nexport const buildHtmlErrorResponse = ({\n message = 'An unexpected error occurred.',\n stack,\n title,\n code = 500,\n}: {\n message?: string;\n stack?: string;\n code?: number;\n title?: string;\n}) => {\n const titleMap: Record<number, string> = {\n 400: 'Bad Request',\n 401: 'Unauthorized',\n 403: 'Forbidden',\n 404: 'Not Found',\n 500: 'Internal Server Error',\n 502: 'Bad Gateway',\n 503: 'Service Unavailable',\n 504: 'Gateway Timeout',\n }\n\n title = titleMap[code] || title || 'Error'\n\n return `\n <html>\n <head>\n <title>${code} | ${title}</title>\n <style>\n body {\n font-family: Arial, sans-serif;\n background-color: #f8f8f8;\n color: #333;\n padding: 20px;\n }\n h1 {\n color: #e74c3c;\n }\n h3 {\n color: #3498db;\n }\n p {\n color: #555;\n }\n pre {\n background-color: #eee;\n padding: 10px;\n border-radius: 5px;\n overflow-x: auto;\n }\n </style>\n </head>\n <body>\n <h1>${code}</h1>\n <h3>${title}</h3>\n <p>${message}</p>\n ${stack ? `<h2>Stack Trace:</h2><pre>${stack}</pre>` : ''}\n </body>\n </html>\n `\n}","export const loadPrototypes = () => {\n String.prototype.titleCase = function () {\n return this.toLowerCase()\n .replace(/_/g, ' ')\n .replace(/-/g, ' ')\n .replace(/(?:^|\\s)\\w/g, function (match) {\n return match.toUpperCase()\n })\n }\n\n String.prototype.camelCase = function () {\n return this.replace(/(?:^\\w|[A-Z]|\\b\\w|\\s+)/g, function (match, index) {\n if (+match === 0) return '' // or if (/\\s+/.test(match)) for white spaces\n\n return index === 0 ? match.toLowerCase() : match.toUpperCase()\n })\n }\n\n String.prototype.pascalCase = function () {\n return this.replace(/(?:^\\w|[A-Z]|\\b\\w|\\s+)/g, function (match) {\n return match.toUpperCase()\n })\n }\n\n String.prototype.truncate = function (len: number = 20, suffix: string = '...') {\n if (this.length <= len) {\n return this.toString()\n }\n\n const truncated = this.substring(0, len)\n const lastSpaceIndex = truncated.lastIndexOf(' ')\n if (lastSpaceIndex > 0) {\n return truncated.substring(0, lastSpaceIndex) + suffix\n }\n\n return truncated + suffix\n }\n} \n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AiB,UAAU,YAAY,IAAI;AACjD,MAAI,iBAAiB,EACjB,QAAO,UAAU,UAAU,GAAG,eAAe,GAAG;AAGpD,SAAO,YAAY"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/lifecycle.ts","../src/system.ts","../src/network.ts","../src/prototypes.ts"],"sourcesContent":["export const bindGracefulShutdown = (shutdown: () => Promise<void> | void) => {\n ['SIGINT', 'SIGTERM', 'SIGQUIT'].forEach((signal) => {\n process.on(signal, async () => {\n await shutdown()\n })\n })\n}\n","import { DotPath, Obj } from '@h3ravel/support'\n\nimport { createRequire } from 'module'\nimport path from 'node:path'\nimport { readdirSync } from 'fs'\n\nexport interface GlobalEnv {\n <X = string, Y = undefined> (\n env: string,\n defaultValue?: Y,\n ): Y extends undefined ? X : Y\n}\n\n/**\n * Read the .env file\n *\n * @param env\n * @param def\n * @returns\n */\nexport const env: GlobalEnv = <X = string, Y = undefined> (\n env: string,\n defaultValue?: Y,\n) => {\n let val: string | number | boolean | undefined | null = process.env[env] ?? ''\n\n if ([true, 'true', 'on', false, 'false', 'off'].includes(val)) {\n val = [true, 'true', 'on'].includes(val)\n }\n\n if (!isNaN(Number(val)) && typeof val !== 'boolean' && typeof val !== 'undefined' && val !== '') {\n val = Number(val)\n }\n\n if (val === '') {\n val = undefined\n }\n\n if (val === 'null') {\n val = null\n }\n\n val ??= defaultValue as typeof val\n\n return val as Y extends undefined ? X : Y\n}\n\n/**\n * Build the app url\n *\n * @param link\n * @returns\n */\nexport const appUrl = (link?: string): string => {\n const port = env('PORT') || '3000'\n const defaultUrl = `http://localhost:${port}`\n const appUrl = env('APP_URL') ?? defaultUrl\n\n try {\n const url = new URL(appUrl)\n // Append port only if APP_URL has a port or is localhost\n if (url.port || url.hostname === 'localhost') {\n url.port = port\n }\n // Remove trailing slash from base URL\n const baseUrl = url.toString().replace(/\\/$/, '')\n // Append link with proper path separator\n if (link) {\n // Ensure link starts with '/' and remove duplicate slashes\n const normalizedLink = `/${link.replace(/^\\/+/, '')}`\n\n return `${baseUrl}${normalizedLink}`\n }\n\n return baseUrl\n } catch {\n // Return default URL with link if provided\n return link ? `${defaultUrl}/${link.replace(/^\\/+/, '')}` : defaultUrl\n }\n}\n\nexport interface GlobalConfig {\n <X extends Record<string, any>, P extends DotPath<X> | undefined = undefined> (\n key?: P,\n defaultValue?: any\n ): P extends string ? any : X\n}\n\n/**\n * Gets the application configuration.\n * \n * @param key The configuration key to retrieve.\n * @param defaultValue The default value to return if the key is not found.\n * @returns The configuration value.\n */\nexport const config: GlobalConfig = <X extends Record<string, any>, P extends DotPath<X> | undefined = undefined> (\n key?: P,\n defaultValue?: any\n) => {\n const require = createRequire(import.meta.url)\n\n const files = readdirSync(path.join(process.cwd(), 'dist/config'), { withFileTypes: true })\n .filter(file => {\n if (file.name.includes('middleware') && globalThis.arkctx.runtime === 'CLI') return false\n\n return file.isFile() && (file.name.endsWith('.js') || file.name.endsWith('.ts'))\n })\n\n const config = files.reduce((configs, file) => {\n const configName = path.basename(file.name, path.extname(file.name))\n\n configs[configName] = require(path.join(file.parentPath, file.name))\n .default((globalThis as any).app())\n\n return configs\n }, {} as Record<string, any>) as X\n\n\n if (key) {\n return Obj.get(config, key, defaultValue)\n }\n\n return config\n}","import { config, env } from './system'\n\nimport { detect } from 'detect-port'\n\nexport const bootWithDetectedPort = async (\n boot: (port: number) => Promise<void>,\n preferredPort: number = 3000,\n app?: any\n) => {\n if (app && !globalThis.app)\n globalThis.app = () => app\n globalThis.env = env\n globalThis.config = config\n globalThis.arkctx = {\n runtime: 'HTTP',\n }\n const port = await detect(preferredPort)\n await boot(port)\n}\n\n\nexport const buildHtmlErrorResponse = ({\n message = 'An unexpected error occurred.',\n stack,\n title,\n code = 500,\n}: {\n message?: string;\n stack?: string;\n code?: number;\n title?: string;\n}) => {\n const titleMap: Record<number, string> = {\n 400: 'Bad Request',\n 401: 'Unauthorized',\n 403: 'Forbidden',\n 404: 'Not Found',\n 500: 'Internal Server Error',\n 502: 'Bad Gateway',\n 503: 'Service Unavailable',\n 504: 'Gateway Timeout',\n }\n\n title = titleMap[code] || title || 'Error'\n\n return `\n <html>\n <head>\n <title>${code} | ${title}</title>\n <style>\n body {\n font-family: Arial, sans-serif;\n background-color: #f8f8f8;\n color: #333;\n padding: 20px;\n }\n h1 {\n color: #e74c3c;\n }\n h3 {\n color: #3498db;\n }\n p {\n color: #555;\n }\n pre {\n background-color: #eee;\n padding: 10px;\n border-radius: 5px;\n overflow-x: auto;\n }\n </style>\n </head>\n <body>\n <h1>${code}</h1>\n <h3>${title}</h3>\n <p>${message}</p>\n ${stack ? `<h2>Stack Trace:</h2><pre>${stack}</pre>` : ''}\n </body>\n </html>\n `\n}","export const loadPrototypes = () => {\n String.prototype.titleCase = function () {\n return this.toLowerCase()\n .replace(/_/g, ' ')\n .replace(/-/g, ' ')\n .replace(/(?:^|\\s)\\w/g, function (match) {\n return match.toUpperCase()\n })\n }\n\n String.prototype.camelCase = function () {\n return this.replace(/(?:^\\w|[A-Z]|\\b\\w|\\s+)/g, function (match, index) {\n if (+match === 0) return '' // or if (/\\s+/.test(match)) for white spaces\n\n return index === 0 ? match.toLowerCase() : match.toUpperCase()\n })\n }\n\n String.prototype.pascalCase = function () {\n return this.replace(/(?:^\\w|[A-Z]|\\b\\w|\\s+)/g, function (match) {\n return match.toUpperCase()\n })\n }\n\n String.prototype.truncate = function (len: number = 20, suffix: string = '...') {\n if (this.length <= len) {\n return this.toString()\n }\n\n const truncated = this.substring(0, len)\n const lastSpaceIndex = truncated.lastIndexOf(' ')\n if (lastSpaceIndex > 0) {\n return truncated.substring(0, lastSpaceIndex) + suffix\n }\n\n return truncated + suffix\n }\n} \n"],"mappings":";;;;;;;AAAA,MAAa,wBAAwB,aAAyC;AAC5E;EAAC;EAAU;EAAW;EAAU,CAAC,SAAS,WAAW;AACnD,UAAQ,GAAG,QAAQ,YAAY;AAC7B,SAAM,UAAU;IAChB;GACF;;;;;;;;;;;;ACeJ,MAAa,OACT,KACA,iBACC;CACD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AAQ,2BAA2B,SAAU,OAAO;AAC5D,UAAO,MAAM,aAAa;IAC5B;;AAGN,QAAO,UAAU,WAAW,SAAU,MAAc,IAAI,SAAiB,OAAO;AAC5E,MAAI,KAAK,UAAU,IACf,QAAO,KAAK,UAAU;EAG1B,MAAM,YAAY,KAAK,UAAU,GAAG,IAAI;EACxC,MAAM,iBAAiB,UAAU,YAAY,IAAI;AACjD,MAAI,iBAAiB,EACjB,QAAO,UAAU,UAAU,GAAG,eAAe,GAAG;AAGpD,SAAO,YAAY"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkstack/common",
3
- "version": "0.1.30",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "description": "Common package for Arkstack providing common implementations of core Arkstack features such as routing, middleware, and database integration.",
6
6
  "homepage": "https://arkstack.toneflix.net",
@@ -32,6 +32,9 @@
32
32
  "dependencies": {
33
33
  "detect-port": "^2.1.0"
34
34
  },
35
+ "peerDependencies": {
36
+ "@h3ravel/support": "^0.15.11"
37
+ },
35
38
  "scripts": {
36
39
  "build": "tsdown --config-loader unconfig",
37
40
  "version:patch": "pnpm version patch"