@azure-net/kit 1.3.2 → 1.3.5
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
CHANGED
|
@@ -1,58 +1,42 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Welcome to **@azure-net/kit**
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
#### [docs](https://svelte.kit.azure-net.ru)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**@azure-net/kit** is a universal toolkit and library collection, developed as part of the **Azure-net** ecosystem. It is designed to speed up modern application development, reduce boilerplate code, and maintain a unified project architecture.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## ✨ What is it?
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**@azure-net/kit** is much more than just a collection of utilities or components. It is a complete **architecture** (Azure-net Architecture) based on **DDD (Domain-Driven Design)** principles, helping you build scalable and maintainable projects with a clear structure.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
# create a new project in the current directory
|
|
13
|
-
npx sv create
|
|
11
|
+
## 🚀 What's included?
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
- **Built-in store** — flexible and SSR-friendly state management powered by [edges-svelte](https://github.com/Pixel1917/edge-s).
|
|
14
|
+
- **Localization and translation** — ready-to-use i18n solution ([edges-svelte-translations](https://github.com/Pixel1917/edges-svelte-translations)) for multilingual applications.
|
|
15
|
+
- **Extensive utilities** — for working with text, objects, dates, and common tasks.
|
|
16
|
+
- **Data validation** — handy rules and validators.
|
|
17
|
+
- **Reusable base abstractions** — `Repositories`, `Services`, `Providers`, and `Datasources` for quick setup and reuse.
|
|
18
|
+
- **Unified architecture approach** — the package provides a solid project structure and helps enforce consistent development standards.
|
|
18
19
|
|
|
19
|
-
##
|
|
20
|
+
## 🎯 Why use it?
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
By using **@azure-net/kit**, you get a ready-to-use project framework that:
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
- reduces boilerplate code,
|
|
25
|
+
- accelerates development,
|
|
26
|
+
- simplifies testing,
|
|
27
|
+
- supports a clear and predictable architecture.
|
|
25
28
|
|
|
26
|
-
|
|
27
|
-
npm run dev -- --open
|
|
28
|
-
```
|
|
29
|
+
This is especially useful for teamwork on medium to large-scale applications.
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
## 📚 Learn more
|
|
31
32
|
|
|
32
|
-
|
|
33
|
+
In this guide, you will find:
|
|
33
34
|
|
|
34
|
-
|
|
35
|
+
- Step-by-step instructions for setup and configuration.
|
|
36
|
+
- Detailed explanations of architectural patterns.
|
|
37
|
+
- Examples of using the built-in store and translation.
|
|
38
|
+
- Recommendations for organizing code with `Repositories`, `Services`, and `Datasources`.
|
|
35
39
|
|
|
36
|
-
|
|
37
|
-
npm run package
|
|
38
|
-
```
|
|
40
|
+
## 🚀 Get started
|
|
39
41
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
npm run build
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
You can preview the production build with `npm run preview`.
|
|
47
|
-
|
|
48
|
-
> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
|
|
49
|
-
|
|
50
|
-
## Publishing
|
|
51
|
-
|
|
52
|
-
Go into the `package.json` and give your package the desired name through the `"name"` option. Also consider adding a `"license"` field and point it to a `LICENSE` file which you can create from a template (one popular option is the [MIT license](https://opensource.org/license/mit/)).
|
|
53
|
-
|
|
54
|
-
To publish your library to [npm](https://www.npmjs.com):
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
npm publish
|
|
58
|
-
```
|
|
42
|
+
Ready to dive in? Check out the [docs](https://svelte.kit.azure-net.ru) and start building your app faster and more reliably with **Azure-net**.
|
|
@@ -37,15 +37,14 @@ export interface IHttpServiceInstanceResponse<T = unknown> extends Response {
|
|
|
37
37
|
text: () => Promise<string>;
|
|
38
38
|
}
|
|
39
39
|
export interface IHttpServiceInstance {
|
|
40
|
-
<T>(url: string | URL | Request, options?: IHttpServiceOptions)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
extend: (defaultOptions: IHttpServiceOptions | ((parentOptions: IHttpServiceOptions) => IHttpServiceOptions)) => IHttpServiceInstance;
|
|
40
|
+
get: <T>(url: string | URL | Request, options?: IHttpServiceOptions) => Promise<IHttpServiceInstanceResponse<T>>;
|
|
41
|
+
post: <T>(url: string | URL | Request, options?: IHttpServiceOptions) => Promise<IHttpServiceInstanceResponse<T>>;
|
|
42
|
+
put: <T>(url: string | URL | Request, options?: IHttpServiceOptions) => Promise<IHttpServiceInstanceResponse<T>>;
|
|
43
|
+
delete: <T>(url: string | URL | Request, options?: IHttpServiceOptions) => Promise<IHttpServiceInstanceResponse<T>>;
|
|
44
|
+
patch: <T>(url: string | URL | Request, options?: IHttpServiceOptions) => Promise<IHttpServiceInstanceResponse<T>>;
|
|
45
|
+
head?: (url: string | URL | Request, options?: IHttpServiceOptions) => Promise<IHttpServiceInstanceResponse>;
|
|
46
|
+
create: (defaultOptions?: IHttpServiceOptions) => IHttpServiceInstance;
|
|
47
|
+
extend?: (defaultOptions: IHttpServiceOptions | ((parentOptions: IHttpServiceOptions) => IHttpServiceOptions)) => IHttpServiceInstance;
|
|
49
48
|
readonly stop: typeof stop;
|
|
50
49
|
}
|
|
51
50
|
export declare class HttpService {
|