@venizia/ardor-kernel 0.5.0-6 → 0.5.0-7

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.
@@ -1,3 +1,4 @@
1
+ import { ConstClass } from '@venizia/ignis-helpers/common';
1
2
  /** Values of the running environment, read once when the module loads. */
2
3
  export declare class App {
3
4
  /** The IANA name of the timezone of the runtime. */
@@ -10,7 +11,7 @@ export declare class App {
10
11
  static readonly TOKEN_TYPE = "Bearer";
11
12
  }
12
13
  /** HTTP methods. */
13
- export declare class RequestMethods {
14
+ export declare class RequestMethods extends ConstClass {
14
15
  static readonly HEAD = "HEAD";
15
16
  static readonly OPTIONS = "OPTIONS";
16
17
  static readonly GET = "GET";
@@ -18,13 +19,9 @@ export declare class RequestMethods {
18
19
  static readonly PUT = "PUT";
19
20
  static readonly PATCH = "PATCH";
20
21
  static readonly DELETE = "DELETE";
21
- /** Every value of this class that `isValid` accepts. */
22
- static readonly SCHEME_SET: Set<string>;
23
- /** Whether `value` is in `SCHEME_SET`. */
24
- static isValid(value: string): boolean;
25
22
  }
26
23
  /** What a request is for, which decides how its response is read: `SEND`, and react-admin's data provider calls. */
27
- export declare class RequestTypes {
24
+ export declare class RequestTypes extends ConstClass {
28
25
  /** A request that is not a react-admin call. */
29
26
  static readonly SEND = "SEND";
30
27
  static readonly GET_LIST = "GET_LIST";
@@ -36,10 +33,6 @@ export declare class RequestTypes {
36
33
  static readonly UPDATE_MANY = "UPDATE_MANY";
37
34
  static readonly DELETE = "DELETE";
38
35
  static readonly DELETE_MANY = "DELETE_MANY";
39
- /** Every value of this class that `isValid` accepts. */
40
- static readonly SCHEME_SET: Set<string>;
41
- /** Whether `value` is in `SCHEME_SET`. */
42
- static isValid(value: string): boolean;
43
36
  }
44
37
  /** The Web Storage areas `BrowserStorage` reads and writes. */
45
38
  export declare class StorageAreas {
@@ -49,38 +42,26 @@ export declare class StorageAreas {
49
42
  static readonly SESSION = "session";
50
43
  }
51
44
  /** How a request body is encoded; see `RequestBodyEncoder`. */
52
- export declare class RequestBodyTypes {
45
+ export declare class RequestBodyTypes extends ConstClass {
53
46
  /** The body goes through as it is. */
54
47
  static readonly NONE = "none";
55
48
  static readonly FORM_DATA = "form-data";
56
49
  static readonly FORM_URL_ENCODED = "x-www-form-urlencoded";
57
50
  static readonly JSON = "json";
58
51
  static readonly BINARY = "binary";
59
- /** Every value of this class that `isValid` accepts. */
60
- static readonly SCHEME_SET: Set<string>;
61
- /** Whether `value` is in `SCHEME_SET`. */
62
- static isValid(value: string): boolean;
63
52
  }
64
53
  /** Names of the build environments. */
65
- export declare class Environments {
54
+ export declare class Environments extends ConstClass {
66
55
  static readonly DEVELOPMENT = "development";
67
56
  static readonly PRODUCTION = "production";
68
- /** Every value of this class that `isValid` accepts. */
69
- static readonly SCHEME_SET: Set<string>;
70
- /** Whether `value` is in `SCHEME_SET`. */
71
- static isValid(value: string): boolean;
72
57
  }
73
58
  /** The channels a request says it comes from, sent in `x-request-channel`. */
74
- export declare class RequestChannel {
59
+ export declare class RequestChannel extends ConstClass {
75
60
  /** A browser application; what a request says unless `requestTracingChannel` is set. */
76
61
  static readonly WEB = "100_WEB";
77
- /** Every value of this class that `isValid` accepts. */
78
- static readonly SCHEME_SET: Set<string>;
79
- /** Whether `value` is in `SCHEME_SET`. */
80
- static isValid(value: string): boolean;
81
62
  }
82
63
  /** Whether a response carries a count, sent in `x-request-count`. */
83
- export declare class RequestCountData {
64
+ export declare class RequestCountData extends ConstClass {
84
65
  /**
85
66
  * @description Only the data is returned in the response body
86
67
  */
@@ -89,9 +70,5 @@ export declare class RequestCountData {
89
70
  * @description Both data and count are returned in the response body
90
71
  */
91
72
  static readonly DATA_WITH_COUNT = "1";
92
- /** Every value of this class that `isValid` accepts. */
93
- static readonly SCHEME_SET: Set<string>;
94
- /** Whether `value` is in `SCHEME_SET`. */
95
- static isValid(value: string): boolean;
96
73
  }
97
74
  //# sourceMappingURL=constants.d.ts.map
@@ -1,3 +1,4 @@
1
+ import { ConstClass } from '@venizia/ignis-helpers/common';
1
2
  /** Values of the running environment, read once when the module loads. */
2
3
  export class App {
3
4
  /** The IANA name of the timezone of the runtime. */
@@ -10,7 +11,7 @@ export class App {
10
11
  static { this.TOKEN_TYPE = 'Bearer'; }
11
12
  }
12
13
  /** HTTP methods. */
13
- export class RequestMethods {
14
+ export class RequestMethods extends ConstClass {
14
15
  static { this.HEAD = 'HEAD'; }
15
16
  static { this.OPTIONS = 'OPTIONS'; }
16
17
  static { this.GET = 'GET'; }
@@ -18,23 +19,9 @@ export class RequestMethods {
18
19
  static { this.PUT = 'PUT'; }
19
20
  static { this.PATCH = 'PATCH'; }
20
21
  static { this.DELETE = 'DELETE'; }
21
- /** Every value of this class that `isValid` accepts. */
22
- static { this.SCHEME_SET = new Set([
23
- this.HEAD,
24
- this.OPTIONS,
25
- this.GET,
26
- this.POST,
27
- this.PUT,
28
- this.PATCH,
29
- this.DELETE,
30
- ]); }
31
- /** Whether `value` is in `SCHEME_SET`. */
32
- static isValid(value) {
33
- return this.SCHEME_SET.has(value);
34
- }
35
22
  }
36
23
  /** What a request is for, which decides how its response is read: `SEND`, and react-admin's data provider calls. */
37
- export class RequestTypes {
24
+ export class RequestTypes extends ConstClass {
38
25
  /** A request that is not a react-admin call. */
39
26
  static { this.SEND = 'SEND'; }
40
27
  // react-admin
@@ -47,23 +34,6 @@ export class RequestTypes {
47
34
  static { this.UPDATE_MANY = 'UPDATE_MANY'; }
48
35
  static { this.DELETE = 'DELETE'; }
49
36
  static { this.DELETE_MANY = 'DELETE_MANY'; }
50
- /** Every value of this class that `isValid` accepts. */
51
- static { this.SCHEME_SET = new Set([
52
- this.SEND,
53
- this.GET_ONE,
54
- this.GET_LIST,
55
- this.GET_MANY,
56
- this.GET_MANY_REFERENCE,
57
- this.CREATE,
58
- this.UPDATE,
59
- this.UPDATE_MANY,
60
- this.DELETE,
61
- this.DELETE_MANY,
62
- ]); }
63
- /** Whether `value` is in `SCHEME_SET`. */
64
- static isValid(value) {
65
- return this.SCHEME_SET.has(value);
66
- }
67
37
  }
68
38
  /** The Web Storage areas `BrowserStorage` reads and writes. */
69
39
  export class StorageAreas {
@@ -73,50 +43,26 @@ export class StorageAreas {
73
43
  static { this.SESSION = 'session'; }
74
44
  }
75
45
  /** How a request body is encoded; see `RequestBodyEncoder`. */
76
- export class RequestBodyTypes {
46
+ export class RequestBodyTypes extends ConstClass {
77
47
  /** The body goes through as it is. */
78
48
  static { this.NONE = 'none'; }
79
49
  static { this.FORM_DATA = 'form-data'; }
80
50
  static { this.FORM_URL_ENCODED = 'x-www-form-urlencoded'; }
81
51
  static { this.JSON = 'json'; }
82
52
  static { this.BINARY = 'binary'; }
83
- /** Every value of this class that `isValid` accepts. */
84
- static { this.SCHEME_SET = new Set([
85
- this.NONE,
86
- this.FORM_DATA,
87
- this.FORM_URL_ENCODED,
88
- this.JSON,
89
- this.BINARY,
90
- ]); }
91
- /** Whether `value` is in `SCHEME_SET`. */
92
- static isValid(value) {
93
- return this.SCHEME_SET.has(value);
94
- }
95
53
  }
96
54
  /** Names of the build environments. */
97
- export class Environments {
55
+ export class Environments extends ConstClass {
98
56
  static { this.DEVELOPMENT = 'development'; }
99
57
  static { this.PRODUCTION = 'production'; }
100
- /** Every value of this class that `isValid` accepts. */
101
- static { this.SCHEME_SET = new Set([this.DEVELOPMENT, this.PRODUCTION]); }
102
- /** Whether `value` is in `SCHEME_SET`. */
103
- static isValid(value) {
104
- return this.SCHEME_SET.has(value);
105
- }
106
58
  }
107
59
  /** The channels a request says it comes from, sent in `x-request-channel`. */
108
- export class RequestChannel {
60
+ export class RequestChannel extends ConstClass {
109
61
  /** A browser application; what a request says unless `requestTracingChannel` is set. */
110
62
  static { this.WEB = '100_WEB'; }
111
- /** Every value of this class that `isValid` accepts. */
112
- static { this.SCHEME_SET = new Set([this.WEB]); }
113
- /** Whether `value` is in `SCHEME_SET`. */
114
- static isValid(value) {
115
- return this.SCHEME_SET.has(value);
116
- }
117
63
  }
118
64
  /** Whether a response carries a count, sent in `x-request-count`. */
119
- export class RequestCountData {
65
+ export class RequestCountData extends ConstClass {
120
66
  /**
121
67
  * @description Only the data is returned in the response body
122
68
  */
@@ -125,11 +71,5 @@ export class RequestCountData {
125
71
  * @description Both data and count are returned in the response body
126
72
  */
127
73
  static { this.DATA_WITH_COUNT = '1'; }
128
- /** Every value of this class that `isValid` accepts. */
129
- static { this.SCHEME_SET = new Set([this.DATA_ONLY, this.DATA_WITH_COUNT]); }
130
- /** Whether `value` is in `SCHEME_SET`. */
131
- static isValid(value) {
132
- return this.SCHEME_SET.has(value);
133
- }
134
74
  }
135
75
  //# sourceMappingURL=constants.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@venizia/ardor-kernel",
3
- "version": "0.5.0-6",
3
+ "version": "0.5.0-7",
4
4
  "description": "ARDOR kernel - the isomorphic core of the ARDOR frontend framework: application base on IGNIS inversion, service and provider bases, request/auth constants, binding keys, the network request service, runtime config and the HTTP repository (from IGNIS). No React and no react-admin.",
5
5
  "keywords": [
6
6
  "ardor",
@@ -72,12 +72,12 @@
72
72
  "devDependencies": {
73
73
  "@size-limit/preset-small-lib": "^14.2.0",
74
74
  "@types/bun": "^1.4.5",
75
- "@venizia/dev-configs": "^0.5.0-5",
76
- "@venizia/ignis-connectors": "^0.5.0-4",
75
+ "@venizia/dev-configs": "^0.5.0-6",
76
+ "@venizia/ignis-connectors": "^0.5.0-5",
77
77
  "@venizia/ignis-filter": "^0.5.0-1",
78
- "@venizia/ignis-helpers": "^0.5.0-2",
78
+ "@venizia/ignis-helpers": "^0.5.0-3",
79
79
  "@venizia/ignis-inversion": "^0.5.0-1",
80
- "@venizia/ignis-kernel": "^0.5.0-3",
80
+ "@venizia/ignis-kernel": "^0.5.0-4",
81
81
  "eslint": "^10.13.0",
82
82
  "oxlint": "1.89.0",
83
83
  "oxlint-tsgolint": "7.0.2004",
@@ -87,11 +87,11 @@
87
87
  "typescript": "^6.0.3"
88
88
  },
89
89
  "peerDependencies": {
90
- "@venizia/ignis-connectors": "^0.5.0-4",
90
+ "@venizia/ignis-connectors": "^0.5.0-5",
91
91
  "@venizia/ignis-filter": "^0.5.0-1",
92
- "@venizia/ignis-helpers": "^0.5.0-2",
92
+ "@venizia/ignis-helpers": "^0.5.0-3",
93
93
  "@venizia/ignis-inversion": "^0.5.0-1",
94
- "@venizia/ignis-kernel": "^0.5.0-3",
94
+ "@venizia/ignis-kernel": "^0.5.0-4",
95
95
  "reflect-metadata": ">=0.2.2"
96
96
  },
97
97
  "peerDependenciesMeta": {