@h3ravel/core 1.7.3 → 1.8.0
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/README.md +13 -1
- package/dist/app.globals.d.ts +63 -0
- package/dist/index.cjs +577 -544
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +236 -167
- package/dist/index.d.ts +237 -167
- package/dist/index.js +531 -409
- package/dist/index.js.map +1 -1
- package/package.json +13 -10
package/README.md
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
<
|
|
1
|
+
<div align="center">
|
|
2
|
+
<a href="https://h3ravel.toneflix.net" target="_blank">
|
|
3
|
+
<img src="https://raw.githubusercontent.com/h3ravel/assets/refs/heads/main/logo-full.svg" width="200" alt="H3ravel Logo">
|
|
4
|
+
</a>
|
|
5
|
+
<h1 align="center"><a href="https://h3ravel.toneflix.net/arquebus">H3ravel Core</a></h1>
|
|
2
6
|
|
|
3
7
|
[![Framework][ix]][lx]
|
|
4
8
|
[![Core Package Version][i1]][l1]
|
|
5
9
|
[![Downloads][d1]][d1]
|
|
10
|
+
[![Tests][tei]][tel]
|
|
11
|
+
[![License][lini]][linl]
|
|
12
|
+
|
|
13
|
+
</div>
|
|
6
14
|
|
|
7
15
|
# About H3ravel/core
|
|
8
16
|
|
|
@@ -29,3 +37,7 @@ The H3ravel framework is open-sourced software licensed under the [MIT license](
|
|
|
29
37
|
[i1]: https://img.shields.io/npm/v/%40h3ravel%2Fcore?style=flat-square&label=@h3ravel/core&color=%230970ce
|
|
30
38
|
[l1]: https://www.npmjs.com/package/@h3ravel/core
|
|
31
39
|
[d1]: https://img.shields.io/npm/dt/%40h3ravel%2Fcore?style=flat-square&label=Downloads&link=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2F%40h3ravel%2Fcore
|
|
40
|
+
[linl]: https://github.com/h3ravel/framework/blob/main/LICENSE
|
|
41
|
+
[lini]: https://img.shields.io/github/license/h3ravel/framework
|
|
42
|
+
[tel]: https://github.com/h3ravel/framework/actions/workflows/test.yml
|
|
43
|
+
[tei]: https://github.com/h3ravel/framework/actions/workflows/test.yml/badge.svg
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export { }
|
|
2
|
+
|
|
3
|
+
declare global {
|
|
4
|
+
/**
|
|
5
|
+
* Dump something and kill the process for quick debugging. Based on Laravel's dd()
|
|
6
|
+
*
|
|
7
|
+
* @param args
|
|
8
|
+
*/
|
|
9
|
+
function dd (...args: any[]): never
|
|
10
|
+
/**
|
|
11
|
+
* Dump something but keep the process for quick debugging. Based on Laravel's dump()
|
|
12
|
+
*
|
|
13
|
+
* @param args
|
|
14
|
+
*/
|
|
15
|
+
function dump (...args: any[]): void
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Global env variable
|
|
19
|
+
*
|
|
20
|
+
* @param path
|
|
21
|
+
*/
|
|
22
|
+
function env (): NodeJS.ProcessEnv;
|
|
23
|
+
function env<T extends string> (key: T, def?: any): any;
|
|
24
|
+
|
|
25
|
+
function config<X extends Record<string, any>> (): X;
|
|
26
|
+
function config<X extends Record<string, any>, T extends Extract<keyof X, string>> (key: T, def?: any): X[T];
|
|
27
|
+
function config<T extends Record<string, any>> (key: T): void;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Get app path
|
|
31
|
+
*
|
|
32
|
+
* @param path
|
|
33
|
+
*/
|
|
34
|
+
function app_path (path?: string): string
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Get base path
|
|
38
|
+
*
|
|
39
|
+
* @param path
|
|
40
|
+
*/
|
|
41
|
+
function base_path (path?: string): string
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Get public path
|
|
45
|
+
*
|
|
46
|
+
* @param path
|
|
47
|
+
*/
|
|
48
|
+
function public_path (path?: string): string
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Get storage path
|
|
52
|
+
*
|
|
53
|
+
* @param path
|
|
54
|
+
*/
|
|
55
|
+
function storage_path (path?: string): string
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Get the database path
|
|
59
|
+
*
|
|
60
|
+
* @param path
|
|
61
|
+
*/
|
|
62
|
+
function database_path (path?: string): string
|
|
63
|
+
}
|