@fjell/registry 4.4.17 → 4.4.20
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/build.js +4 -0
- package/dist/Coordinate.d.ts +2 -1
- package/dist/Coordinate.d.ts.map +1 -0
- package/dist/Instance.d.ts +3 -2
- package/dist/Instance.d.ts.map +1 -0
- package/dist/Registry.d.ts +1 -0
- package/dist/Registry.d.ts.map +1 -0
- package/dist/RegistryHub.d.ts +1 -0
- package/dist/RegistryHub.d.ts.map +1 -0
- package/dist/RegistryStats.d.ts +1 -0
- package/dist/RegistryStats.d.ts.map +1 -0
- package/dist/errors/CoordinateError.d.ts +1 -0
- package/dist/errors/CoordinateError.d.ts.map +1 -0
- package/dist/errors/InstanceError.d.ts +1 -0
- package/dist/errors/InstanceError.d.ts.map +1 -0
- package/dist/errors/RegistryError.d.ts +1 -0
- package/dist/errors/RegistryError.d.ts.map +1 -0
- package/dist/errors/RegistryHubError.d.ts +1 -0
- package/dist/errors/RegistryHubError.d.ts.map +1 -0
- package/dist/errors/index.d.ts +1 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +685 -10
- package/dist/index.js.map +7 -0
- package/dist/logger.d.ts +2 -1
- package/dist/logger.d.ts.map +1 -0
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -0
- package/docs/docs.config.ts +1 -32
- package/docs/package-lock.json +5129 -0
- package/docs/package.json +2 -2
- package/docs/src/types.d.ts +13 -5
- package/docs/timing-range.svg +40 -40
- package/package.json +21 -33
- package/tsconfig.docs.json +28 -0
- package/vitest.config.ts +17 -0
- package/MIGRATION_SUMMARY.md +0 -200
- package/dist/Coordinate.cjs +0 -32
- package/dist/Coordinate.js +0 -28
- package/dist/Instance.cjs +0 -24
- package/dist/Instance.js +0 -19
- package/dist/Registry.cjs +0 -182
- package/dist/Registry.js +0 -178
- package/dist/RegistryHub.cjs +0 -94
- package/dist/RegistryHub.js +0 -90
- package/dist/RegistryStats.cjs +0 -198
- package/dist/RegistryStats.js +0 -194
- package/dist/errors/CoordinateError.cjs +0 -70
- package/dist/errors/CoordinateError.js +0 -63
- package/dist/errors/InstanceError.cjs +0 -101
- package/dist/errors/InstanceError.js +0 -92
- package/dist/errors/RegistryError.cjs +0 -82
- package/dist/errors/RegistryError.js +0 -75
- package/dist/errors/RegistryHubError.cjs +0 -92
- package/dist/errors/RegistryHubError.js +0 -84
- package/dist/index.cjs +0 -821
- package/dist/index.cjs.map +0 -1
- package/dist/logger.cjs +0 -10
- package/dist/logger.js +0 -6
package/dist/RegistryStats.cjs
DELETED
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
function _define_property(obj, key, value) {
|
|
6
|
-
if (key in obj) {
|
|
7
|
-
Object.defineProperty(obj, key, {
|
|
8
|
-
value: value,
|
|
9
|
-
enumerable: true,
|
|
10
|
-
configurable: true,
|
|
11
|
-
writable: true
|
|
12
|
-
});
|
|
13
|
-
} else {
|
|
14
|
-
obj[key] = value;
|
|
15
|
-
}
|
|
16
|
-
return obj;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Internal class for tracking Registry statistics with complex coordinate combinations and client tracking
|
|
20
|
-
*/ class RegistryStats {
|
|
21
|
-
/**
|
|
22
|
-
* Records a get() call for the specified coordinate and client
|
|
23
|
-
*/ recordGetCall(kta, scopes, client) {
|
|
24
|
-
this.totalCalls++;
|
|
25
|
-
const ktaKey = kta.join('.');
|
|
26
|
-
const scopeKey = this.createScopeKey(scopes || []);
|
|
27
|
-
const clientKey = this.createClientKey(client);
|
|
28
|
-
if (!this.coordinateCalls.has(ktaKey)) {
|
|
29
|
-
this.coordinateCalls.set(ktaKey, new Map());
|
|
30
|
-
}
|
|
31
|
-
const scopeMap = this.coordinateCalls.get(ktaKey);
|
|
32
|
-
if (!scopeMap.has(scopeKey)) {
|
|
33
|
-
scopeMap.set(scopeKey, new Map());
|
|
34
|
-
}
|
|
35
|
-
const clientMap = scopeMap.get(scopeKey);
|
|
36
|
-
const currentCount = clientMap.get(clientKey) || 0;
|
|
37
|
-
clientMap.set(clientKey, currentCount + 1);
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Gets the current statistics snapshot
|
|
41
|
-
*/ getStatistics() {
|
|
42
|
-
const coordinateCallRecords = [];
|
|
43
|
-
let serviceCalls = 0;
|
|
44
|
-
let applicationCalls = 0;
|
|
45
|
-
let unidentifiedCalls = 0;
|
|
46
|
-
for (const [ktaKey, scopeMap] of this.coordinateCalls){
|
|
47
|
-
for (const [scopeKey, clientMap] of scopeMap){
|
|
48
|
-
const clientCalls = [];
|
|
49
|
-
let totalCount = 0;
|
|
50
|
-
for (const [clientKey, count] of clientMap){
|
|
51
|
-
const client = this.parseClientKey(clientKey);
|
|
52
|
-
if (client !== null) {
|
|
53
|
-
clientCalls.push({
|
|
54
|
-
client,
|
|
55
|
-
count
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
totalCount += count;
|
|
59
|
-
// Update client summary
|
|
60
|
-
if (clientKey === '__no_client__') {
|
|
61
|
-
unidentifiedCalls += count;
|
|
62
|
-
} else if (typeof client === 'string') {
|
|
63
|
-
applicationCalls += count;
|
|
64
|
-
} else if (client !== null) {
|
|
65
|
-
serviceCalls += count;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
coordinateCallRecords.push({
|
|
69
|
-
kta: ktaKey.split('.'),
|
|
70
|
-
scopes: this.parseScopeKey(scopeKey),
|
|
71
|
-
count: totalCount,
|
|
72
|
-
clientCalls: [
|
|
73
|
-
...clientCalls
|
|
74
|
-
] // Return a copy
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
return {
|
|
79
|
-
totalGetCalls: this.totalCalls,
|
|
80
|
-
coordinateCallRecords: [
|
|
81
|
-
...coordinateCallRecords
|
|
82
|
-
],
|
|
83
|
-
clientSummary: {
|
|
84
|
-
serviceCalls,
|
|
85
|
-
applicationCalls,
|
|
86
|
-
unidentifiedCalls
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Gets call count for a specific coordinate combination
|
|
92
|
-
*/ getCallCount(kta, scopes) {
|
|
93
|
-
const ktaKey = kta.join('.');
|
|
94
|
-
const scopeKey = this.createScopeKey(scopes || []);
|
|
95
|
-
const scopeMap = this.coordinateCalls.get(ktaKey);
|
|
96
|
-
if (!scopeMap) return 0;
|
|
97
|
-
const clientMap = scopeMap.get(scopeKey);
|
|
98
|
-
if (!clientMap) return 0;
|
|
99
|
-
let total = 0;
|
|
100
|
-
for (const count of clientMap.values()){
|
|
101
|
-
total += count;
|
|
102
|
-
}
|
|
103
|
-
return total;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Gets call count for a specific coordinate combination from a specific client
|
|
107
|
-
*/ getCallCountByClient(kta, scopes, client) {
|
|
108
|
-
const ktaKey = kta.join('.');
|
|
109
|
-
const scopeKey = this.createScopeKey(scopes || []);
|
|
110
|
-
const clientKey = this.createClientKey(client);
|
|
111
|
-
const scopeMap = this.coordinateCalls.get(ktaKey);
|
|
112
|
-
if (!scopeMap) return 0;
|
|
113
|
-
const clientMap = scopeMap.get(scopeKey);
|
|
114
|
-
if (!clientMap) return 0;
|
|
115
|
-
return clientMap.get(clientKey) || 0;
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Gets total calls for a specific kta (across all scopes)
|
|
119
|
-
*/ getTotalCallsForKta(kta) {
|
|
120
|
-
const ktaKey = kta.join('.');
|
|
121
|
-
const scopeMap = this.coordinateCalls.get(ktaKey);
|
|
122
|
-
if (!scopeMap) return 0;
|
|
123
|
-
let total = 0;
|
|
124
|
-
for (const clientMap of scopeMap.values()){
|
|
125
|
-
for (const count of clientMap.values()){
|
|
126
|
-
total += count;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
return total;
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Gets all unique kta paths that have been called
|
|
133
|
-
*/ getCalledKtaPaths() {
|
|
134
|
-
const ktaPaths = [];
|
|
135
|
-
for (const ktaKey of this.coordinateCalls.keys()){
|
|
136
|
-
ktaPaths.push(ktaKey.split('.'));
|
|
137
|
-
}
|
|
138
|
-
return ktaPaths;
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Creates a normalized scope key from scopes array
|
|
142
|
-
*/ createScopeKey(scopes) {
|
|
143
|
-
if (scopes.length === 0) return '__no_scopes__';
|
|
144
|
-
return [
|
|
145
|
-
...scopes
|
|
146
|
-
].sort().join(',');
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Parses a scope key back to scopes array
|
|
150
|
-
*/ parseScopeKey(scopeKey) {
|
|
151
|
-
if (scopeKey === '__no_scopes__') return [];
|
|
152
|
-
return scopeKey.split(',');
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Creates a normalized client key from client identifier
|
|
156
|
-
*/ createClientKey(client) {
|
|
157
|
-
if (!client) return '__no_client__';
|
|
158
|
-
if (typeof client === 'string') {
|
|
159
|
-
return `app:${client}`;
|
|
160
|
-
}
|
|
161
|
-
// Service client
|
|
162
|
-
const coordKey = `${client.coordinate.kta.join('.')};${this.createScopeKey(client.coordinate.scopes)}`;
|
|
163
|
-
return `service:${client.registryType}:${coordKey}`;
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Parses a client key back to client identifier
|
|
167
|
-
*/ parseClientKey(clientKey) {
|
|
168
|
-
if (clientKey === '__no_client__') return null;
|
|
169
|
-
if (clientKey.startsWith('app:')) {
|
|
170
|
-
return clientKey.substring(4);
|
|
171
|
-
}
|
|
172
|
-
if (clientKey.startsWith('service:')) {
|
|
173
|
-
const parts = clientKey.substring(8).split(':');
|
|
174
|
-
if (parts.length !== 2) return null;
|
|
175
|
-
const registryType = parts[0];
|
|
176
|
-
const coordParts = parts[1].split(';');
|
|
177
|
-
if (coordParts.length !== 2) return null;
|
|
178
|
-
const kta = coordParts[0].split('.');
|
|
179
|
-
const scopes = this.parseScopeKey(coordParts[1]);
|
|
180
|
-
return {
|
|
181
|
-
registryType,
|
|
182
|
-
coordinate: {
|
|
183
|
-
kta,
|
|
184
|
-
scopes
|
|
185
|
-
}
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
return null;
|
|
189
|
-
}
|
|
190
|
-
constructor(){
|
|
191
|
-
_define_property(this, "totalCalls", 0);
|
|
192
|
-
// Map structure: ktaKey -> scopeKey -> clientKey -> count
|
|
193
|
-
_define_property(this, "coordinateCalls", new Map());
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
exports.RegistryStats = RegistryStats;
|
|
198
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVnaXN0cnlTdGF0cy5janMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7In0=
|
package/dist/RegistryStats.js
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
function _define_property(obj, key, value) {
|
|
2
|
-
if (key in obj) {
|
|
3
|
-
Object.defineProperty(obj, key, {
|
|
4
|
-
value: value,
|
|
5
|
-
enumerable: true,
|
|
6
|
-
configurable: true,
|
|
7
|
-
writable: true
|
|
8
|
-
});
|
|
9
|
-
} else {
|
|
10
|
-
obj[key] = value;
|
|
11
|
-
}
|
|
12
|
-
return obj;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Internal class for tracking Registry statistics with complex coordinate combinations and client tracking
|
|
16
|
-
*/ class RegistryStats {
|
|
17
|
-
/**
|
|
18
|
-
* Records a get() call for the specified coordinate and client
|
|
19
|
-
*/ recordGetCall(kta, scopes, client) {
|
|
20
|
-
this.totalCalls++;
|
|
21
|
-
const ktaKey = kta.join('.');
|
|
22
|
-
const scopeKey = this.createScopeKey(scopes || []);
|
|
23
|
-
const clientKey = this.createClientKey(client);
|
|
24
|
-
if (!this.coordinateCalls.has(ktaKey)) {
|
|
25
|
-
this.coordinateCalls.set(ktaKey, new Map());
|
|
26
|
-
}
|
|
27
|
-
const scopeMap = this.coordinateCalls.get(ktaKey);
|
|
28
|
-
if (!scopeMap.has(scopeKey)) {
|
|
29
|
-
scopeMap.set(scopeKey, new Map());
|
|
30
|
-
}
|
|
31
|
-
const clientMap = scopeMap.get(scopeKey);
|
|
32
|
-
const currentCount = clientMap.get(clientKey) || 0;
|
|
33
|
-
clientMap.set(clientKey, currentCount + 1);
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Gets the current statistics snapshot
|
|
37
|
-
*/ getStatistics() {
|
|
38
|
-
const coordinateCallRecords = [];
|
|
39
|
-
let serviceCalls = 0;
|
|
40
|
-
let applicationCalls = 0;
|
|
41
|
-
let unidentifiedCalls = 0;
|
|
42
|
-
for (const [ktaKey, scopeMap] of this.coordinateCalls){
|
|
43
|
-
for (const [scopeKey, clientMap] of scopeMap){
|
|
44
|
-
const clientCalls = [];
|
|
45
|
-
let totalCount = 0;
|
|
46
|
-
for (const [clientKey, count] of clientMap){
|
|
47
|
-
const client = this.parseClientKey(clientKey);
|
|
48
|
-
if (client !== null) {
|
|
49
|
-
clientCalls.push({
|
|
50
|
-
client,
|
|
51
|
-
count
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
totalCount += count;
|
|
55
|
-
// Update client summary
|
|
56
|
-
if (clientKey === '__no_client__') {
|
|
57
|
-
unidentifiedCalls += count;
|
|
58
|
-
} else if (typeof client === 'string') {
|
|
59
|
-
applicationCalls += count;
|
|
60
|
-
} else if (client !== null) {
|
|
61
|
-
serviceCalls += count;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
coordinateCallRecords.push({
|
|
65
|
-
kta: ktaKey.split('.'),
|
|
66
|
-
scopes: this.parseScopeKey(scopeKey),
|
|
67
|
-
count: totalCount,
|
|
68
|
-
clientCalls: [
|
|
69
|
-
...clientCalls
|
|
70
|
-
] // Return a copy
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
return {
|
|
75
|
-
totalGetCalls: this.totalCalls,
|
|
76
|
-
coordinateCallRecords: [
|
|
77
|
-
...coordinateCallRecords
|
|
78
|
-
],
|
|
79
|
-
clientSummary: {
|
|
80
|
-
serviceCalls,
|
|
81
|
-
applicationCalls,
|
|
82
|
-
unidentifiedCalls
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Gets call count for a specific coordinate combination
|
|
88
|
-
*/ getCallCount(kta, scopes) {
|
|
89
|
-
const ktaKey = kta.join('.');
|
|
90
|
-
const scopeKey = this.createScopeKey(scopes || []);
|
|
91
|
-
const scopeMap = this.coordinateCalls.get(ktaKey);
|
|
92
|
-
if (!scopeMap) return 0;
|
|
93
|
-
const clientMap = scopeMap.get(scopeKey);
|
|
94
|
-
if (!clientMap) return 0;
|
|
95
|
-
let total = 0;
|
|
96
|
-
for (const count of clientMap.values()){
|
|
97
|
-
total += count;
|
|
98
|
-
}
|
|
99
|
-
return total;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Gets call count for a specific coordinate combination from a specific client
|
|
103
|
-
*/ getCallCountByClient(kta, scopes, client) {
|
|
104
|
-
const ktaKey = kta.join('.');
|
|
105
|
-
const scopeKey = this.createScopeKey(scopes || []);
|
|
106
|
-
const clientKey = this.createClientKey(client);
|
|
107
|
-
const scopeMap = this.coordinateCalls.get(ktaKey);
|
|
108
|
-
if (!scopeMap) return 0;
|
|
109
|
-
const clientMap = scopeMap.get(scopeKey);
|
|
110
|
-
if (!clientMap) return 0;
|
|
111
|
-
return clientMap.get(clientKey) || 0;
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Gets total calls for a specific kta (across all scopes)
|
|
115
|
-
*/ getTotalCallsForKta(kta) {
|
|
116
|
-
const ktaKey = kta.join('.');
|
|
117
|
-
const scopeMap = this.coordinateCalls.get(ktaKey);
|
|
118
|
-
if (!scopeMap) return 0;
|
|
119
|
-
let total = 0;
|
|
120
|
-
for (const clientMap of scopeMap.values()){
|
|
121
|
-
for (const count of clientMap.values()){
|
|
122
|
-
total += count;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
return total;
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Gets all unique kta paths that have been called
|
|
129
|
-
*/ getCalledKtaPaths() {
|
|
130
|
-
const ktaPaths = [];
|
|
131
|
-
for (const ktaKey of this.coordinateCalls.keys()){
|
|
132
|
-
ktaPaths.push(ktaKey.split('.'));
|
|
133
|
-
}
|
|
134
|
-
return ktaPaths;
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Creates a normalized scope key from scopes array
|
|
138
|
-
*/ createScopeKey(scopes) {
|
|
139
|
-
if (scopes.length === 0) return '__no_scopes__';
|
|
140
|
-
return [
|
|
141
|
-
...scopes
|
|
142
|
-
].sort().join(',');
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Parses a scope key back to scopes array
|
|
146
|
-
*/ parseScopeKey(scopeKey) {
|
|
147
|
-
if (scopeKey === '__no_scopes__') return [];
|
|
148
|
-
return scopeKey.split(',');
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* Creates a normalized client key from client identifier
|
|
152
|
-
*/ createClientKey(client) {
|
|
153
|
-
if (!client) return '__no_client__';
|
|
154
|
-
if (typeof client === 'string') {
|
|
155
|
-
return `app:${client}`;
|
|
156
|
-
}
|
|
157
|
-
// Service client
|
|
158
|
-
const coordKey = `${client.coordinate.kta.join('.')};${this.createScopeKey(client.coordinate.scopes)}`;
|
|
159
|
-
return `service:${client.registryType}:${coordKey}`;
|
|
160
|
-
}
|
|
161
|
-
/**
|
|
162
|
-
* Parses a client key back to client identifier
|
|
163
|
-
*/ parseClientKey(clientKey) {
|
|
164
|
-
if (clientKey === '__no_client__') return null;
|
|
165
|
-
if (clientKey.startsWith('app:')) {
|
|
166
|
-
return clientKey.substring(4);
|
|
167
|
-
}
|
|
168
|
-
if (clientKey.startsWith('service:')) {
|
|
169
|
-
const parts = clientKey.substring(8).split(':');
|
|
170
|
-
if (parts.length !== 2) return null;
|
|
171
|
-
const registryType = parts[0];
|
|
172
|
-
const coordParts = parts[1].split(';');
|
|
173
|
-
if (coordParts.length !== 2) return null;
|
|
174
|
-
const kta = coordParts[0].split('.');
|
|
175
|
-
const scopes = this.parseScopeKey(coordParts[1]);
|
|
176
|
-
return {
|
|
177
|
-
registryType,
|
|
178
|
-
coordinate: {
|
|
179
|
-
kta,
|
|
180
|
-
scopes
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
return null;
|
|
185
|
-
}
|
|
186
|
-
constructor(){
|
|
187
|
-
_define_property(this, "totalCalls", 0);
|
|
188
|
-
// Map structure: ktaKey -> scopeKey -> clientKey -> count
|
|
189
|
-
_define_property(this, "coordinateCalls", new Map());
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
export { RegistryStats };
|
|
194
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVnaXN0cnlTdGF0cy5qcyIsInNvdXJjZXMiOltdLCJzb3VyY2VzQ29udGVudCI6W10sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OyJ9
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const RegistryError = require('./RegistryError.cjs');
|
|
6
|
-
|
|
7
|
-
function _define_property(obj, key, value) {
|
|
8
|
-
if (key in obj) {
|
|
9
|
-
Object.defineProperty(obj, key, {
|
|
10
|
-
value: value,
|
|
11
|
-
enumerable: true,
|
|
12
|
-
configurable: true,
|
|
13
|
-
writable: true
|
|
14
|
-
});
|
|
15
|
-
} else {
|
|
16
|
-
obj[key] = value;
|
|
17
|
-
}
|
|
18
|
-
return obj;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Base class for coordinate-related errors
|
|
22
|
-
*/ class CoordinateError extends RegistryError.RegistryError {
|
|
23
|
-
constructor(message, kta, scopes, context){
|
|
24
|
-
super(message, '', {
|
|
25
|
-
...context,
|
|
26
|
-
kta,
|
|
27
|
-
scopes
|
|
28
|
-
}), _define_property(this, "kta", void 0), _define_property(this, "scopes", void 0);
|
|
29
|
-
this.kta = kta;
|
|
30
|
-
this.scopes = scopes;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Thrown when coordinate creation fails due to invalid parameters
|
|
35
|
-
*/ class InvalidCoordinateError extends CoordinateError {
|
|
36
|
-
constructor(kta, scopes, reason, context){
|
|
37
|
-
super(`Invalid coordinate parameters: ${reason}. ` + `KTA: ${JSON.stringify(kta)}, Scopes: [${scopes.join(', ')}]`, kta, scopes, {
|
|
38
|
-
...context,
|
|
39
|
-
reason
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Thrown when KTA (Key Type Array) is invalid
|
|
45
|
-
*/ class InvalidKTAError extends CoordinateError {
|
|
46
|
-
constructor(kta, reason, context){
|
|
47
|
-
super(`Invalid KTA (Key Type Array): ${reason}. ` + `Expected string or array of strings, got: ${JSON.stringify(kta)}`, kta, [], {
|
|
48
|
-
...context,
|
|
49
|
-
reason
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Thrown when scopes array contains invalid values
|
|
55
|
-
*/ class InvalidScopesError extends CoordinateError {
|
|
56
|
-
constructor(scopes, invalidScopes, reason, context){
|
|
57
|
-
super(`Invalid scopes: ${reason}. ` + `Invalid scope values: ${JSON.stringify(invalidScopes)}`, null, scopes.filter((s)=>typeof s === 'string'), {
|
|
58
|
-
...context,
|
|
59
|
-
reason,
|
|
60
|
-
invalidScopes
|
|
61
|
-
}), _define_property(this, "invalidScopes", void 0);
|
|
62
|
-
this.invalidScopes = invalidScopes;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
exports.CoordinateError = CoordinateError;
|
|
67
|
-
exports.InvalidCoordinateError = InvalidCoordinateError;
|
|
68
|
-
exports.InvalidKTAError = InvalidKTAError;
|
|
69
|
-
exports.InvalidScopesError = InvalidScopesError;
|
|
70
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29vcmRpbmF0ZUVycm9yLmNqcyIsInNvdXJjZXMiOltdLCJzb3VyY2VzQ29udGVudCI6W10sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7In0=
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { RegistryError } from './RegistryError.js';
|
|
2
|
-
|
|
3
|
-
function _define_property(obj, key, value) {
|
|
4
|
-
if (key in obj) {
|
|
5
|
-
Object.defineProperty(obj, key, {
|
|
6
|
-
value: value,
|
|
7
|
-
enumerable: true,
|
|
8
|
-
configurable: true,
|
|
9
|
-
writable: true
|
|
10
|
-
});
|
|
11
|
-
} else {
|
|
12
|
-
obj[key] = value;
|
|
13
|
-
}
|
|
14
|
-
return obj;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Base class for coordinate-related errors
|
|
18
|
-
*/ class CoordinateError extends RegistryError {
|
|
19
|
-
constructor(message, kta, scopes, context){
|
|
20
|
-
super(message, '', {
|
|
21
|
-
...context,
|
|
22
|
-
kta,
|
|
23
|
-
scopes
|
|
24
|
-
}), _define_property(this, "kta", void 0), _define_property(this, "scopes", void 0);
|
|
25
|
-
this.kta = kta;
|
|
26
|
-
this.scopes = scopes;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Thrown when coordinate creation fails due to invalid parameters
|
|
31
|
-
*/ class InvalidCoordinateError extends CoordinateError {
|
|
32
|
-
constructor(kta, scopes, reason, context){
|
|
33
|
-
super(`Invalid coordinate parameters: ${reason}. ` + `KTA: ${JSON.stringify(kta)}, Scopes: [${scopes.join(', ')}]`, kta, scopes, {
|
|
34
|
-
...context,
|
|
35
|
-
reason
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Thrown when KTA (Key Type Array) is invalid
|
|
41
|
-
*/ class InvalidKTAError extends CoordinateError {
|
|
42
|
-
constructor(kta, reason, context){
|
|
43
|
-
super(`Invalid KTA (Key Type Array): ${reason}. ` + `Expected string or array of strings, got: ${JSON.stringify(kta)}`, kta, [], {
|
|
44
|
-
...context,
|
|
45
|
-
reason
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Thrown when scopes array contains invalid values
|
|
51
|
-
*/ class InvalidScopesError extends CoordinateError {
|
|
52
|
-
constructor(scopes, invalidScopes, reason, context){
|
|
53
|
-
super(`Invalid scopes: ${reason}. ` + `Invalid scope values: ${JSON.stringify(invalidScopes)}`, null, scopes.filter((s)=>typeof s === 'string'), {
|
|
54
|
-
...context,
|
|
55
|
-
reason,
|
|
56
|
-
invalidScopes
|
|
57
|
-
}), _define_property(this, "invalidScopes", void 0);
|
|
58
|
-
this.invalidScopes = invalidScopes;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export { CoordinateError, InvalidCoordinateError, InvalidKTAError, InvalidScopesError };
|
|
63
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29vcmRpbmF0ZUVycm9yLmpzIiwic291cmNlcyI6W10sInNvdXJjZXNDb250ZW50IjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OyJ9
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const RegistryError = require('./RegistryError.cjs');
|
|
6
|
-
|
|
7
|
-
function _define_property(obj, key, value) {
|
|
8
|
-
if (key in obj) {
|
|
9
|
-
Object.defineProperty(obj, key, {
|
|
10
|
-
value: value,
|
|
11
|
-
enumerable: true,
|
|
12
|
-
configurable: true,
|
|
13
|
-
writable: true
|
|
14
|
-
});
|
|
15
|
-
} else {
|
|
16
|
-
obj[key] = value;
|
|
17
|
-
}
|
|
18
|
-
return obj;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Base class for instance-related errors
|
|
22
|
-
*/ class InstanceError extends RegistryError.RegistryError {
|
|
23
|
-
constructor(message, keyPath, registryType, context){
|
|
24
|
-
super(message, registryType, {
|
|
25
|
-
...context,
|
|
26
|
-
keyPath
|
|
27
|
-
}), _define_property(this, "keyPath", void 0);
|
|
28
|
-
this.keyPath = keyPath;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Thrown when an instance cannot be found for a given key path
|
|
33
|
-
*/ class InstanceNotFoundError extends InstanceError {
|
|
34
|
-
constructor(keyPath, missingKey, registryType, context){
|
|
35
|
-
const keyPathStr = keyPath.join('.');
|
|
36
|
-
let message = `Instance not found for key path: ${keyPathStr}`;
|
|
37
|
-
if (missingKey) {
|
|
38
|
-
message += `, Missing key: ${missingKey}`;
|
|
39
|
-
}
|
|
40
|
-
super(message, keyPath, registryType, {
|
|
41
|
-
...context,
|
|
42
|
-
missingKey
|
|
43
|
-
}), _define_property(this, "missingKey", void 0);
|
|
44
|
-
this.missingKey = missingKey;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Thrown when no instances are registered for a key path that exists in the tree
|
|
49
|
-
*/ class NoInstancesRegisteredError extends InstanceError {
|
|
50
|
-
constructor(keyPath, registryType, context){
|
|
51
|
-
const keyPathStr = keyPath.join('.');
|
|
52
|
-
super(`No instances registered for key path: ${keyPathStr}. ` + `The key path exists in the registry tree but contains no instances.`, keyPath, registryType, context);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Thrown when no instances are available (empty instances array)
|
|
57
|
-
*/ class NoInstancesAvailableError extends InstanceError {
|
|
58
|
-
constructor(keyPath, registryType, context){
|
|
59
|
-
const keyPathStr = keyPath.join('.');
|
|
60
|
-
super(`No instances available for key path: ${keyPathStr}. ` + `This typically indicates an internal registry state issue.`, keyPath, registryType, context);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Thrown when no instance matches the requested scopes
|
|
65
|
-
*/ class ScopeNotFoundError extends InstanceError {
|
|
66
|
-
constructor(keyPath, requestedScopes, availableScopes = [], registryType){
|
|
67
|
-
const keyPathStr = keyPath.join('.');
|
|
68
|
-
const scopesStr = requestedScopes.join(', ');
|
|
69
|
-
const availableScopesStr = availableScopes.map((scopes)=>`[${scopes.join(', ')}]`).join(', ');
|
|
70
|
-
let message = `No instance found matching scopes: ${scopesStr} for key path: ${keyPathStr}`;
|
|
71
|
-
if (availableScopes.length > 0) {
|
|
72
|
-
message += `. Available scopes: ${availableScopesStr}`;
|
|
73
|
-
}
|
|
74
|
-
super(message, keyPath, registryType, {
|
|
75
|
-
requestedScopes,
|
|
76
|
-
availableScopes
|
|
77
|
-
}), _define_property(this, "requestedScopes", void 0), _define_property(this, "availableScopes", void 0);
|
|
78
|
-
this.requestedScopes = requestedScopes;
|
|
79
|
-
this.availableScopes = availableScopes;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Thrown when a key path has no children but children are expected
|
|
84
|
-
*/ class NoChildrenAvailableError extends InstanceError {
|
|
85
|
-
constructor(keyPath, parentKey, registryType, context){
|
|
86
|
-
const keyPathStr = keyPath.join('.');
|
|
87
|
-
super(`Instance not found for key path: ${keyPathStr}, No children for: ${parentKey}. ` + `The path cannot be traversed further as '${parentKey}' has no child nodes.`, keyPath, registryType, {
|
|
88
|
-
...context,
|
|
89
|
-
parentKey
|
|
90
|
-
}), _define_property(this, "parentKey", void 0);
|
|
91
|
-
this.parentKey = parentKey;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
exports.InstanceError = InstanceError;
|
|
96
|
-
exports.InstanceNotFoundError = InstanceNotFoundError;
|
|
97
|
-
exports.NoChildrenAvailableError = NoChildrenAvailableError;
|
|
98
|
-
exports.NoInstancesAvailableError = NoInstancesAvailableError;
|
|
99
|
-
exports.NoInstancesRegisteredError = NoInstancesRegisteredError;
|
|
100
|
-
exports.ScopeNotFoundError = ScopeNotFoundError;
|
|
101
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSW5zdGFuY2VFcnJvci5janMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ==
|