@h3ravel/shared 0.14.0 → 0.15.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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @h3ravel/shared
2
2
 
3
+ ## 0.15.1
4
+
5
+ ### Patch Changes
6
+
7
+ - chore: update readme accros all packages
8
+
9
+ ## 0.15.0
10
+
11
+ ### Minor Changes
12
+
13
+ - d07ff49: feat: reserve the `app.` namespace for generic service provider resolution.
14
+
3
15
  ## 0.14.0
4
16
 
5
17
  ### Minor Changes
package/README.md CHANGED
@@ -9,7 +9,7 @@ This package provides first reusable interfaces and contracts used across the [H
9
9
 
10
10
  ## Contributing
11
11
 
12
- Thank you for considering contributing to the H3ravel framework! The contribution guide can be found in the [H3ravel documentation](#!).
12
+ Thank you for considering contributing to the H3ravel framework! The [Contribution Guide](https://h3ravel.toneflix.net/contributing) can be found in the H3ravel documentation and will provide you with all the information you need to get started.
13
13
 
14
14
  ## Code of Conduct
15
15
 
package/dist/index.d.cts CHANGED
@@ -53,7 +53,7 @@ interface IContainer {
53
53
  * @param key - The key or constructor for the service.
54
54
  * @returns The resolved service instance.
55
55
  */
56
- make<T extends UseKey>(key: T | (new (...args: any[]) => Bindings[T])): Bindings[T];
56
+ make<T extends UseKey, X = undefined>(key: T | (new (..._args: any[]) => Bindings[T])): X extends undefined ? Bindings[T] : X;
57
57
  /**
58
58
  * Checks if a service is registered in the container.
59
59
  * @param key - The key to check.
@@ -357,6 +357,7 @@ type RemoveIndexSignature<T> = {
357
357
  };
358
358
  type Bindings = {
359
359
  [key: string]: any;
360
+ [key: `app.${string}`]: any;
360
361
  env(): NodeJS.ProcessEnv;
361
362
  env<T extends string>(key: T, def?: any): any;
362
363
  view(templatePath: string, state?: Record<string, any>): Promise<string>;
@@ -371,7 +372,7 @@ type Bindings = {
371
372
  };
372
373
  'http.app': H3;
373
374
  'path.base': string;
374
- 'app.paths': PathLoader;
375
+ 'load.paths': PathLoader;
375
376
  'http.serve': typeof serve;
376
377
  'http.request': IRequest;
377
378
  'http.response': IResponse;
package/dist/index.d.ts CHANGED
@@ -53,7 +53,7 @@ interface IContainer {
53
53
  * @param key - The key or constructor for the service.
54
54
  * @returns The resolved service instance.
55
55
  */
56
- make<T extends UseKey>(key: T | (new (...args: any[]) => Bindings[T])): Bindings[T];
56
+ make<T extends UseKey, X = undefined>(key: T | (new (..._args: any[]) => Bindings[T])): X extends undefined ? Bindings[T] : X;
57
57
  /**
58
58
  * Checks if a service is registered in the container.
59
59
  * @param key - The key to check.
@@ -357,6 +357,7 @@ type RemoveIndexSignature<T> = {
357
357
  };
358
358
  type Bindings = {
359
359
  [key: string]: any;
360
+ [key: `app.${string}`]: any;
360
361
  env(): NodeJS.ProcessEnv;
361
362
  env<T extends string>(key: T, def?: any): any;
362
363
  view(templatePath: string, state?: Record<string, any>): Promise<string>;
@@ -371,7 +372,7 @@ type Bindings = {
371
372
  };
372
373
  'http.app': H3;
373
374
  'path.base': string;
374
- 'app.paths': PathLoader;
375
+ 'load.paths': PathLoader;
375
376
  'http.serve': typeof serve;
376
377
  'http.request': IRequest;
377
378
  'http.response': IResponse;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@h3ravel/shared",
3
- "version": "0.14.0",
3
+ "version": "0.15.1",
4
4
  "description": "Shared Utilities.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -17,6 +17,7 @@ type RemoveIndexSignature<T> = {
17
17
 
18
18
  export type Bindings = {
19
19
  [key: string]: any;
20
+ [key: `app.${string}`]: any;
20
21
  env (): NodeJS.ProcessEnv
21
22
  env<T extends string> (key: T, def?: any): any
22
23
  view (templatePath: string, state?: Record<string, any>): Promise<string>
@@ -33,7 +34,7 @@ export type Bindings = {
33
34
  }
34
35
  'http.app': H3
35
36
  'path.base': string
36
- 'app.paths': PathLoader
37
+ 'load.paths': PathLoader
37
38
  'http.serve': typeof serve
38
39
  'http.request': IRequest
39
40
  'http.response': IResponse
@@ -27,7 +27,9 @@ export interface IContainer {
27
27
  * @param key - The key or constructor for the service.
28
28
  * @returns The resolved service instance.
29
29
  */
30
- make<T extends UseKey> (key: T | (new (...args: any[]) => Bindings[T])): Bindings[T];
30
+ make<T extends UseKey, X = undefined> (
31
+ key: T | (new (..._args: any[]) => Bindings[T])
32
+ ): X extends undefined ? Bindings[T] : X
31
33
 
32
34
  /**
33
35
  * Checks if a service is registered in the container.