@leyyo/proxy 1.0.1 → 1.0.3
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 +8 -1
- package/dist/index.const.js +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.foretell.js +1 -3
- package/dist/index.js +5 -5
- package/dist/index.loader.js +1 -1
- package/dist/index.types.d.ts +4 -4
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +3 -2
- package/dist/proxy.handler.js +2 -2
- package/package.json +17 -30
package/README.md
CHANGED
|
@@ -4,12 +4,19 @@ Proxy library for Leyyo framework
|
|
|
4
4
|
## Import
|
|
5
5
|
- `npm i @leyyo/proxy`
|
|
6
6
|
|
|
7
|
-
## Usage (Runtime)
|
|
8
7
|
|
|
9
8
|
## Test Cases
|
|
10
9
|
| Test Case | Error | Message | Method |
|
|
11
10
|
|-----------|----------------|-----------------------------------------------------------|--------------------------------------|
|
|
12
11
|
|
|
12
|
+
## Symbols
|
|
13
|
+
| Symbol | Public | Description |
|
|
14
|
+
|----------------------------|--------|--------------------------------------|
|
|
15
|
+
| `leyyo:proxy:link` | ✅ | proxy map for source |
|
|
16
|
+
| `leyyo:proxy:inherits` | ✅ | predecessor/ancestor of source (new) |
|
|
17
|
+
| `leyyo:proxy:inherited-by` | ✅ | successor/descendant of source (old) |
|
|
18
|
+
|
|
19
|
+
|
|
13
20
|
## Standards
|
|
14
21
|
- Language: `TS`
|
|
15
22
|
- Eslint: `Yes`
|
package/dist/index.const.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const KEY_PROXY_LINK = Symbol.for(
|
|
1
|
+
export const KEY_PROXY_LINK = Symbol.for("leyyo:proxy:link");
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
1
|
+
export * from "./index.const.js";
|
|
2
|
+
export * from "./index.types.js";
|
|
3
|
+
export * from "./proxy.handler.js";
|
|
4
|
+
export * from "./index.loader.js";
|
|
5
|
+
export * from "./index.foretell.js";
|
package/dist/index.foretell.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
1
|
+
export * from "./index.const.js";
|
|
2
|
+
export * from "./index.types.js";
|
|
3
|
+
export * from "./proxy.handler.js";
|
|
4
|
+
export * from "./index.loader.js";
|
|
5
|
+
export * from "./index.foretell.js";
|
package/dist/index.loader.js
CHANGED
|
@@ -4,4 +4,4 @@ import { loader_leyyoCommon } from "@leyyo/common";
|
|
|
4
4
|
// noinspection JSUnusedGlobalSymbols
|
|
5
5
|
export const loader_leyyoProxy = defineLoader(FQN, ...loader_leyyoCommon,
|
|
6
6
|
// instances
|
|
7
|
-
() => import(
|
|
7
|
+
() => import("./proxy.handler.js").then((m) => m.proxyHandler));
|
package/dist/index.types.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ export interface ProxyHandlerLike {
|
|
|
60
60
|
* */
|
|
61
61
|
getInheritedBy<S>(source: S): S;
|
|
62
62
|
/**
|
|
63
|
-
* has source `inherited by` or `successor`
|
|
63
|
+
* has source `inherited by` or `successor` or `descendant`
|
|
64
64
|
*
|
|
65
65
|
* Generics:
|
|
66
66
|
* - `S`: type of source
|
|
@@ -70,7 +70,7 @@ export interface ProxyHandlerLike {
|
|
|
70
70
|
* */
|
|
71
71
|
hasInheritedBy<S>(source: S): boolean;
|
|
72
72
|
/**
|
|
73
|
-
* Sets `inherited by` or `successor`
|
|
73
|
+
* Sets `inherited by` or `successor` or `descendant`
|
|
74
74
|
*
|
|
75
75
|
* Generics:
|
|
76
76
|
* - `S`: type of source
|
|
@@ -92,7 +92,7 @@ export interface ProxyHandlerLike {
|
|
|
92
92
|
* */
|
|
93
93
|
getInherits<S>(source: S): S;
|
|
94
94
|
/**
|
|
95
|
-
* has source `inherits` or `predecessor`
|
|
95
|
+
* has source `inherits` or `predecessor` or `ancestor`
|
|
96
96
|
* *
|
|
97
97
|
* Generics:
|
|
98
98
|
* - `S`: type of source
|
|
@@ -102,7 +102,7 @@ export interface ProxyHandlerLike {
|
|
|
102
102
|
* */
|
|
103
103
|
hasInherits<S>(source: S): boolean;
|
|
104
104
|
/**
|
|
105
|
-
* Sets `inherits` or `predecessor`
|
|
105
|
+
* Sets `inherits` or `predecessor` or `ancestor`
|
|
106
106
|
*
|
|
107
107
|
* Generics:
|
|
108
108
|
* - `S`: type of source
|
package/dist/internal.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const NME: string, FQN: string, VER: string
|
|
1
|
+
export declare const NME: string, FQN: string, VER: string;
|
package/dist/internal.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { packageJson } from "@leyyo/common";
|
|
2
|
+
// noinspection JSUnusedGlobalSymbols
|
|
3
|
+
export const { name: NME, fqn: FQN, version: VER } = packageJson(import.meta.url);
|
package/dist/proxy.handler.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FQN } from "./internal.js";
|
|
2
2
|
import { getProp, setFqn, setProp } from "@leyyo/common";
|
|
3
3
|
import { KEY_PROXY_LINK } from "./index.const.js";
|
|
4
|
-
const INHERITS = Symbol.for(
|
|
5
|
-
const INHERITED_BY = Symbol.for(
|
|
4
|
+
const INHERITS = Symbol.for("leyyo:proxy:inherits");
|
|
5
|
+
const INHERITED_BY = Symbol.for("leyyo:proxy:inherited-by");
|
|
6
6
|
class ProxyHandler {
|
|
7
7
|
// region general
|
|
8
8
|
/** @inheritDoc */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leyyo/proxy",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Leyyo proxy library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"proxy"
|
|
@@ -20,48 +20,35 @@
|
|
|
20
20
|
"scripts": {
|
|
21
21
|
"clear": "rimraf dist",
|
|
22
22
|
"lint": "eslint src/**/*.ts",
|
|
23
|
+
"lint:fix": "eslint src/**/*.ts --fix",
|
|
24
|
+
"format": "prettier --check \"{src,test}/**/*.{ts,tsx,js}\"",
|
|
25
|
+
"format:force": "prettier --write \"{src,test}/**/*.{ts,tsx,js}\"",
|
|
26
|
+
"test": "vitest run",
|
|
27
|
+
"test:watch": "vitest",
|
|
28
|
+
"test:coverage": "vitest run --coverage",
|
|
23
29
|
"asset": "node -r ts-node/register commands/assets.js",
|
|
24
30
|
"build": "npm run clear && tsc && npm run asset",
|
|
25
|
-
"
|
|
26
|
-
"test:watch": "jest --watch --config=jest.json",
|
|
27
|
-
"test:coverage": "jest --config=jest.json --coverage --coverageDirectory=coverage",
|
|
28
|
-
"~publish": "npm run build && npm publish -access=public"
|
|
31
|
+
"publish:public": "npm run lint && npm run format:force && npm run test && npm run build && npm publish --access=public"
|
|
29
32
|
},
|
|
30
33
|
"files": [
|
|
31
34
|
"dist/*"
|
|
32
35
|
],
|
|
33
36
|
"license": "ISC",
|
|
34
37
|
"devDependencies": {
|
|
35
|
-
"@
|
|
36
|
-
"@babel/preset-typescript": "^7.27.0",
|
|
37
|
-
"@eslint/js": "^9.33.0",
|
|
38
|
-
"@jest/globals": "^29.7.0",
|
|
39
|
-
"@types/jest": "^30.0.0",
|
|
38
|
+
"@eslint/js": "^9.0.0",
|
|
40
39
|
"@types/node": "^24.2.1",
|
|
41
|
-
"@
|
|
42
|
-
"
|
|
43
|
-
"eslint": "^9.33.0",
|
|
40
|
+
"@vitest/coverage-istanbul": "^4.0.18",
|
|
41
|
+
"eslint": "^9.0.0",
|
|
44
42
|
"eslint-config-prettier": "^10.1.8",
|
|
45
|
-
"eslint-
|
|
46
|
-
"
|
|
47
|
-
"eslint-plugin-jsdoc": "^54.0.0",
|
|
48
|
-
"eslint-plugin-node": "^11.1.0",
|
|
49
|
-
"husky": "^9.1.7",
|
|
50
|
-
"jest": "^29.7.0",
|
|
51
|
-
"prettier": "^3.6.2",
|
|
43
|
+
"eslint-plugin-n": "^17.24.0",
|
|
44
|
+
"prettier": "^3.8.1",
|
|
52
45
|
"rimraf": "^6.0.1",
|
|
53
|
-
"test": "^3.3.0",
|
|
54
|
-
"ts-jest": "^29.4.1",
|
|
55
46
|
"ts-node": "^10.9.2",
|
|
56
|
-
"typescript": "^5.9.
|
|
57
|
-
"typescript-eslint": "^8.
|
|
58
|
-
|
|
59
|
-
"overrides": {
|
|
60
|
-
"eslint-config-standard": {
|
|
61
|
-
"eslint": "^9.33.0"
|
|
62
|
-
}
|
|
47
|
+
"typescript": "^5.9.3",
|
|
48
|
+
"typescript-eslint": "^8.0.0",
|
|
49
|
+
"vitest": "^4.0.18"
|
|
63
50
|
},
|
|
64
51
|
"dependencies": {
|
|
65
|
-
"@leyyo/common": "^1.3.
|
|
52
|
+
"@leyyo/common": "^1.3.21"
|
|
66
53
|
}
|
|
67
54
|
}
|