@azure-net/kit 6.0.0-next.2 → 6.0.0-next.4

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
@@ -202,7 +202,7 @@ script and serialization. No custom HTML parser is used by the kit.
202
202
 
203
203
  ## DI naming
204
204
 
205
- `createBoundaryProvider` is replaced by `CreateDiContainer` (no compatibility alias):
205
+ `createBoundaryProvider` is replaced by `CreateServiceContainer` (no compatibility alias):
206
206
 
207
207
  ```ts
208
208
  const ApplicationProvider = CreateDiContainer('ApplicationProvider', {
@@ -1,4 +1,5 @@
1
1
  export { createAsyncAction, createAsyncResource, type AsyncActionSettings, type AsyncHelperRetry, type AsyncResourceSettings, type AsyncActionResponse } from './injectable-dependencies/index.js';
2
2
  export { RegisterProvider, type ProviderLifecycle } from './presenter/RegisterProvider.js';
3
+ export { Bound } from './presenter/Bound.js';
3
4
  export { createSchemaFactory, schema, type Schema, type RequestErrors, type ISchemaError, type ValidationResult, type ValidationRuleResult, type ValidationParams, type ValidationMessage, type ValidationErrorsMap } from './schema/index.js';
4
5
  export { createRules, validationMessagesRu, validationMessagesI18n, validationMessagesEn, type ValidationRuleParams, type BaseValidationMessages } from './schema/rules/index.js';
@@ -1,4 +1,5 @@
1
1
  export { createAsyncAction, createAsyncResource } from './injectable-dependencies/index.js';
2
2
  export { RegisterProvider } from './presenter/RegisterProvider.js';
3
+ export { Bound } from './presenter/Bound.js';
3
4
  export { createSchemaFactory, schema } from './schema/index.js';
4
5
  export { createRules, validationMessagesRu, validationMessagesI18n, validationMessagesEn } from './schema/rules/index.js';
@@ -0,0 +1 @@
1
+ export declare function Bound<This, Args extends unknown[], Return>(method: (this: This, ...args: Args) => Return, context: ClassMethodDecoratorContext<This, (this: This, ...args: Args) => Return>): void;
@@ -0,0 +1,9 @@
1
+ export function Bound(method, context) {
2
+ context.addInitializer(function () {
3
+ Object.defineProperty(this, context.name, {
4
+ value: method.bind(this),
5
+ configurable: true,
6
+ writable: true
7
+ });
8
+ });
9
+ }
@@ -16,6 +16,6 @@ export interface ProviderSettings<T extends ServiceMap, D extends Record<string,
16
16
  boot?: (services: ResolvedServices<T>) => undefined;
17
17
  register: ProviderFactory<T, D>;
18
18
  }
19
- export declare const CreateDiContainer: <T extends ServiceMap, D extends Record<string, ProviderWithType<ServiceMap>>>(name: string, settings: ProviderSettings<T, D>) => ProviderWithType<T>;
19
+ export declare const CreateServiceContainer: <T extends ServiceMap, D extends Record<string, ProviderWithType<ServiceMap>>>(name: string, settings: ProviderSettings<T, D>) => ProviderWithType<T>;
20
20
  export declare function cleanupProvider(name: string): Promise<void>;
21
21
  export {};
@@ -84,7 +84,7 @@ const runWithCycleGuard = (key, callback) => {
84
84
  stack.splice(idx, 1);
85
85
  }
86
86
  };
87
- export const CreateDiContainer = (name, settings) => {
87
+ export const CreateServiceContainer = (name, settings) => {
88
88
  const { dependsOn = {}, boot, register } = settings;
89
89
  const providerFn = () => {
90
90
  const proxies = getProxyCache();
@@ -1,6 +1,6 @@
1
1
  export { UniversalCookie, UniversalCookieInstance, UniversalNamedCookieInstance, type CookieOptions } from './cookie/index.js';
2
2
  export { BackgroundTask } from './background-task/index.js';
3
3
  export { ClassMirror } from './class-mirror/index.js';
4
- export { CreateDiContainer, cleanupProvider, type ProviderSettings } from './boundary-provider/index.js';
4
+ export { CreateServiceContainer, cleanupProvider, type ProviderSettings } from './boundary-provider/index.js';
5
5
  export * from './app/index.js';
6
6
  export { useLogger, LoggerErrors, type ILoggerError, type ILoggerSettings } from './logger/index.js';
@@ -1,6 +1,6 @@
1
1
  export { UniversalCookie, UniversalCookieInstance, UniversalNamedCookieInstance } from './cookie/index.js';
2
2
  export { BackgroundTask } from './background-task/index.js';
3
3
  export { ClassMirror } from './class-mirror/index.js';
4
- export { CreateDiContainer, cleanupProvider } from './boundary-provider/index.js';
4
+ export { CreateServiceContainer, cleanupProvider } from './boundary-provider/index.js';
5
5
  export * from './app/index.js';
6
6
  export { useLogger, LoggerErrors } from './logger/index.js';
package/package.json CHANGED
@@ -1,152 +1,144 @@
1
1
  {
2
- "name": "@azure-net/kit",
3
- "version": "6.0.0-next.2",
4
- "license": "MIT",
5
- "author": "Pixel1917",
6
- "description": "Universal toolkit and library collection, developed as part of the Azure-net ecosystem",
7
- "homepage": "https://github.com/Pixel1917/azure-net-kit",
8
- "bugs": {
9
- "url": "https://github.com/Pixel1917/azure-net-kit/issues",
10
- "email": "sank195951@gmail.com"
11
- },
12
- "repository": {
13
- "type": "git",
14
- "url": "git+https://github.com/Pixel1917/azure-net-kit.git"
15
- },
16
- "publishConfig": {
17
- "access": "public",
18
- "registry": "https://registry.npmjs.org/"
19
- },
20
- "scripts": {
21
- "dev": "vite dev",
22
- "build": "vite build && npm run prepack",
23
- "preview": "vite preview",
24
- "prepare": "svelte-kit sync || echo ''",
25
- "prepack": "svelte-kit sync && svelte-package && publint",
26
- "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
27
- "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
28
- "format": "prettier --write .",
29
- "lint": "prettier --check . && eslint .",
30
- "test:unit": "vitest --config vitest.config.ts",
31
- "test:client": "vitest --config vitest.client.config.ts",
32
- "test:integration": "vitest --config vitest.integration.config.ts --run",
33
- "test": "pnpm test:unit -- --run && pnpm test:client -- --run && pnpm test:integration && pnpm test:e2e",
34
- "test:e2e": "playwright test",
35
- "commit": "pnpm format && git add .",
36
- "test:retention": "vitest --config vitest.retention.config.ts --run"
37
- },
38
- "files": [
39
- "dist",
40
- "!dist/**/*.test.*",
41
- "!dist/**/*.spec.*"
42
- ],
43
- "sideEffects": [
44
- "**/*.css"
45
- ],
46
- "svelte": "./dist/index.js",
47
- "types": "./dist/index.d.ts",
48
- "type": "module",
49
- "exports": {
50
- ".": {
51
- "types": "./dist/index.d.ts",
52
- "svelte": "./dist/index.js"
53
- },
54
- "./infra": {
55
- "types": "./dist/infra.d.ts",
56
- "svelte": "./dist/infra.js"
57
- },
58
- "./delivery": {
59
- "types": "./dist/delivery.d.ts",
60
- "svelte": "./dist/delivery.js"
61
- },
62
- "./errors": {
63
- "types": "./dist/errors.d.ts",
64
- "svelte": "./dist/errors.js"
65
- },
66
- "./plugin": {
67
- "types": "./dist/plugin/index.d.ts",
68
- "svelte": "./dist/plugin/index.js",
69
- "import": "./dist/plugin/index.js"
70
- },
71
- "./server-context": {
72
- "types": "./dist/server/Context/index.d.ts",
73
- "svelte": "./dist/server/Context/index.js",
74
- "import": "./dist/server/Context/index.js"
75
- },
76
- "./tools": {
77
- "types": "./dist/external/tools/index.d.ts",
78
- "svelte": "./dist/external/tools/index.js"
79
- },
80
- "./i18n": {
81
- "types": "./dist/i18n/index.d.ts",
82
- "svelte": "./dist/i18n/index.js",
83
- "import": "./dist/i18n/index.js"
84
- },
85
- "./internal/server": {
86
- "types": "./dist/server/Context/Runtime.d.ts",
87
- "import": "./dist/server/Context/Runtime.js"
88
- }
89
- },
90
- "peerDependencies": {
91
- "@sveltejs/kit": ">=3.0.0",
92
- "svelte": ">=5.55.4"
93
- },
94
- "devDependencies": {
95
- "@eslint/compat": "^2.0.5",
96
- "@eslint/js": "^10.0.1",
97
- "@playwright/test": "^1.59.1",
98
- "@sveltejs/adapter-auto": "^7.0.1",
99
- "@sveltejs/kit": "^3.0.0",
100
- "@sveltejs/load-config": "^0.2.2",
101
- "@sveltejs/package": "^2.5.7",
102
- "@sveltejs/vite-plugin-svelte": "^7.0.0",
103
- "@testing-library/jest-dom": "^6.9.1",
104
- "@testing-library/svelte": "^5.3.1",
105
- "@types/node": "^22",
106
- "env-cmd": "^11.0.0",
107
- "eslint": "^10.2.1",
108
- "eslint-config-prettier": "^10.1.8",
109
- "eslint-plugin-svelte": "^3.17.0",
110
- "globals": "^17.5.0",
111
- "jsdom": "^29.0.2",
112
- "prettier": "^3.8.3",
113
- "prettier-plugin-svelte": "^3.5.1",
114
- "publint": "^0.3.18",
115
- "svelte": "^5.57.1",
116
- "svelte-check": "^4.7.6",
117
- "typescript": "^6.0.2",
118
- "typescript-eslint": "^8.58.2",
119
- "vite": "^8.0.8",
120
- "vitest": "^4.1.4"
121
- },
122
- "keywords": [
123
- "sveltekit",
124
- "svelte",
125
- "toolkit",
126
- "library",
127
- "azure-net",
128
- "store",
129
- "i18n",
130
- "utils"
131
- ],
132
- "pnpm": {
133
- "onlyBuiltDependencies": [
134
- "esbuild"
135
- ]
136
- },
137
- "packageManager": "pnpm@10.33.0+sha512.10568bb4a6afb58c9eb3630da90cc9516417abebd3fabbe6739f0ae795728da1491e9db5a544c76ad8eb7570f5c4bb3d6c637b2cb41bfdcdb47fa823c8649319",
138
- "dependencies": {
139
- "@azure-net/tools": "^2.0.0"
140
- },
141
- "imports": {
142
- "#lib": "./src/lib/index.ts",
143
- "#lib/*": {
144
- "types": [
145
- "./src/lib/*.ts",
146
- "./src/lib/*/index.ts",
147
- "./src/lib/*"
148
- ],
149
- "default": "./src/lib/*"
150
- }
151
- }
152
- }
2
+ "name": "@azure-net/kit",
3
+ "version": "6.0.0-next.4",
4
+ "license": "MIT",
5
+ "author": "Pixel1917",
6
+ "description": "Universal toolkit and library collection, developed as part of the Azure-net ecosystem",
7
+ "homepage": "https://github.com/Pixel1917/azure-net-kit",
8
+ "bugs": {
9
+ "url": "https://github.com/Pixel1917/azure-net-kit/issues",
10
+ "email": "sank195951@gmail.com"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/Pixel1917/azure-net-kit.git"
15
+ },
16
+ "publishConfig": {
17
+ "access": "public",
18
+ "registry": "https://registry.npmjs.org/"
19
+ },
20
+ "files": [
21
+ "dist",
22
+ "!dist/**/*.test.*",
23
+ "!dist/**/*.spec.*"
24
+ ],
25
+ "sideEffects": [
26
+ "**/*.css"
27
+ ],
28
+ "svelte": "./dist/index.js",
29
+ "types": "./dist/index.d.ts",
30
+ "type": "module",
31
+ "exports": {
32
+ ".": {
33
+ "types": "./dist/index.d.ts",
34
+ "svelte": "./dist/index.js"
35
+ },
36
+ "./infra": {
37
+ "types": "./dist/infra.d.ts",
38
+ "svelte": "./dist/infra.js"
39
+ },
40
+ "./delivery": {
41
+ "types": "./dist/delivery.d.ts",
42
+ "svelte": "./dist/delivery.js"
43
+ },
44
+ "./errors": {
45
+ "types": "./dist/errors.d.ts",
46
+ "svelte": "./dist/errors.js"
47
+ },
48
+ "./plugin": {
49
+ "types": "./dist/plugin/index.d.ts",
50
+ "svelte": "./dist/plugin/index.js",
51
+ "import": "./dist/plugin/index.js"
52
+ },
53
+ "./server-context": {
54
+ "types": "./dist/server/Context/index.d.ts",
55
+ "svelte": "./dist/server/Context/index.js",
56
+ "import": "./dist/server/Context/index.js"
57
+ },
58
+ "./tools": {
59
+ "types": "./dist/external/tools/index.d.ts",
60
+ "svelte": "./dist/external/tools/index.js"
61
+ },
62
+ "./i18n": {
63
+ "types": "./dist/i18n/index.d.ts",
64
+ "svelte": "./dist/i18n/index.js",
65
+ "import": "./dist/i18n/index.js"
66
+ },
67
+ "./internal/server": {
68
+ "types": "./dist/server/Context/Runtime.d.ts",
69
+ "import": "./dist/server/Context/Runtime.js"
70
+ }
71
+ },
72
+ "peerDependencies": {
73
+ "@sveltejs/kit": ">=3.0.0",
74
+ "svelte": ">=5.55.4"
75
+ },
76
+ "devDependencies": {
77
+ "@eslint/compat": "^2.0.5",
78
+ "@eslint/js": "^10.0.1",
79
+ "@playwright/test": "^1.59.1",
80
+ "@sveltejs/adapter-auto": "^7.0.1",
81
+ "@sveltejs/kit": "^3.0.0",
82
+ "@sveltejs/load-config": "^0.2.2",
83
+ "@sveltejs/package": "^2.5.7",
84
+ "@sveltejs/vite-plugin-svelte": "^7.0.0",
85
+ "@testing-library/jest-dom": "^6.9.1",
86
+ "@testing-library/svelte": "^5.3.1",
87
+ "@types/node": "^22",
88
+ "env-cmd": "^11.0.0",
89
+ "eslint": "^10.2.1",
90
+ "eslint-config-prettier": "^10.1.8",
91
+ "eslint-plugin-svelte": "^3.17.0",
92
+ "globals": "^17.5.0",
93
+ "jsdom": "^29.0.2",
94
+ "prettier": "^3.8.3",
95
+ "prettier-plugin-svelte": "^3.5.1",
96
+ "publint": "^0.3.18",
97
+ "svelte": "^5.57.1",
98
+ "svelte-check": "^4.7.6",
99
+ "typescript": "^6.0.2",
100
+ "typescript-eslint": "^8.58.2",
101
+ "vite": "^8.0.8",
102
+ "vitest": "^4.1.4"
103
+ },
104
+ "keywords": [
105
+ "sveltekit",
106
+ "svelte",
107
+ "toolkit",
108
+ "library",
109
+ "azure-net",
110
+ "store",
111
+ "i18n",
112
+ "utils"
113
+ ],
114
+ "dependencies": {
115
+ "@azure-net/tools": "^2.0.0"
116
+ },
117
+ "imports": {
118
+ "#lib": "./src/lib/index.ts",
119
+ "#lib/*": {
120
+ "types": [
121
+ "./src/lib/*.ts",
122
+ "./src/lib/*/index.ts",
123
+ "./src/lib/*"
124
+ ],
125
+ "default": "./src/lib/*"
126
+ }
127
+ },
128
+ "scripts": {
129
+ "dev": "vite dev",
130
+ "build": "vite build && npm run prepack",
131
+ "preview": "vite preview",
132
+ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
133
+ "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
134
+ "format": "prettier --write .",
135
+ "lint": "prettier --check . && eslint .",
136
+ "test:unit": "vitest --config vitest.config.ts",
137
+ "test:client": "vitest --config vitest.client.config.ts",
138
+ "test:integration": "vitest --config vitest.integration.config.ts --run",
139
+ "test": "pnpm test:unit -- --run && pnpm test:client -- --run && pnpm test:integration && pnpm test:e2e",
140
+ "test:e2e": "playwright test",
141
+ "commit": "pnpm format && git add .",
142
+ "test:retention": "vitest --config vitest.retention.config.ts --run"
143
+ }
144
+ }