jitar 0.1.0 → 0.1.1
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/dist/core/SegmentBuilder.js +0 -1
- package/dist/runtime/ClientId.d.ts +4 -0
- package/dist/runtime/ClientId.js +11 -0
- package/dist/runtime/LocalRepository.d.ts +2 -2
- package/dist/runtime/LocalRepository.js +4 -5
- package/dist/runtime/caching/CacheBuilder.js +3 -3
- package/dist/runtime/serialization/ClassSerializer.js +16 -0
- package/dist/runtime/serialization/MapSerializer.d.ts +1 -0
- package/dist/runtime/serialization/MapSerializer.js +10 -0
- package/dist/runtime/serialization/SetSerializer.d.ts +1 -0
- package/dist/runtime/serialization/SetSerializer.js +7 -0
- package/dist/runtime/serialization/errors/InvalidPropertyType.d.ts +3 -0
- package/dist/runtime/serialization/errors/InvalidPropertyType.js +6 -0
- package/dist/server/controllers/ModulesController.js +6 -0
- package/package.json +23 -4
- package/src/core/SegmentBuilder.ts +1 -1
- package/src/runtime/ClientId.ts +18 -0
- package/src/runtime/LocalRepository.ts +5 -8
- package/src/runtime/caching/CacheBuilder.ts +3 -3
- package/src/runtime/serialization/ClassSerializer.ts +28 -0
- package/src/runtime/serialization/MapSerializer.ts +17 -1
- package/src/runtime/serialization/SetSerializer.ts +11 -0
- package/src/runtime/serialization/ValueSerializer.ts +1 -1
- package/src/runtime/serialization/errors/InvalidPropertyType.ts +12 -0
- package/src/server/controllers/ModulesController.ts +11 -0
- package/test/runtime/ClientId.spec.ts +43 -0
- package/test/runtime/LocalRepository.spec.ts +2 -2
- package/test/runtime/serialization/ValueSerializer.spec.ts +1 -1
- package/coverage/clover.xml +0 -2483
- package/coverage/coverage-final.json +0 -56
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -356
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov-report/src/core/ErrorManager.ts.html +0 -139
- package/coverage/lcov-report/src/core/Implementation.ts.html +0 -244
- package/coverage/lcov-report/src/core/ImplementationBuilder.ts.html +0 -148
- package/coverage/lcov-report/src/core/Procedure.ts.html +0 -379
- package/coverage/lcov-report/src/core/Segment.ts.html +0 -271
- package/coverage/lcov-report/src/core/SegmentBuilder.ts.html +0 -250
- package/coverage/lcov-report/src/core/Version.ts.html +0 -289
- package/coverage/lcov-report/src/core/definitions/AccessLevel.ts.html +0 -94
- package/coverage/lcov-report/src/core/definitions/index.html +0 -116
- package/coverage/lcov-report/src/core/errors/ErrorManager.ts.html +0 -139
- package/coverage/lcov-report/src/core/errors/ImplementationNotFound.ts.html +0 -121
- package/coverage/lcov-report/src/core/errors/InvalidVersionNumber.ts.html +0 -121
- package/coverage/lcov-report/src/core/errors/MissingParameterValue.ts.html +0 -121
- package/coverage/lcov-report/src/core/errors/ProcedureNotFound.ts.html +0 -121
- package/coverage/lcov-report/src/core/errors/index.html +0 -161
- package/coverage/lcov-report/src/core/index.html +0 -191
- package/coverage/lcov-report/src/core/reflection/ParameterParser.ts.html +0 -307
- package/coverage/lcov-report/src/core/reflection/ReflectionHelper.ts.html +0 -439
- package/coverage/lcov-report/src/core/reflection/index.html +0 -131
- package/coverage/lcov-report/src/core/reflection/models/ReflectionField.ts.html +0 -151
- package/coverage/lcov-report/src/core/reflection/models/ReflectionParameter.ts.html +0 -139
- package/coverage/lcov-report/src/core/reflection/models/index.html +0 -131
- package/coverage/lcov-report/src/core/utils/FqnBuilder.ts.html +0 -115
- package/coverage/lcov-report/src/core/utils/index.html +0 -116
- package/coverage/lcov-report/src/hooks.ts.html +0 -88
- package/coverage/lcov-report/src/index.html +0 -116
- package/coverage/lcov-report/src/runtime/Gateway.ts.html +0 -139
- package/coverage/lcov-report/src/runtime/LocalGateway.ts.html +0 -364
- package/coverage/lcov-report/src/runtime/LocalNode.ts.html +0 -475
- package/coverage/lcov-report/src/runtime/LocalRepository.ts.html +0 -556
- package/coverage/lcov-report/src/runtime/Node.ts.html +0 -130
- package/coverage/lcov-report/src/runtime/NodeBalancer.ts.html +0 -268
- package/coverage/lcov-report/src/runtime/NodeMonitor.ts.html +0 -274
- package/coverage/lcov-report/src/runtime/Remote.ts.html +0 -562
- package/coverage/lcov-report/src/runtime/RemoteNode.ts.html +0 -232
- package/coverage/lcov-report/src/runtime/Repository.ts.html +0 -145
- package/coverage/lcov-report/src/runtime/Runtime.ts.html +0 -226
- package/coverage/lcov-report/src/runtime/caching/ImportRewriter.ts.html +0 -313
- package/coverage/lcov-report/src/runtime/caching/ModuleAppender.ts.html +0 -208
- package/coverage/lcov-report/src/runtime/caching/RemoteBuilder.ts.html +0 -238
- package/coverage/lcov-report/src/runtime/caching/SourceAppender.ts.html +0 -256
- package/coverage/lcov-report/src/runtime/caching/definitions/Keywords.ts.html +0 -94
- package/coverage/lcov-report/src/runtime/caching/definitions/index.html +0 -116
- package/coverage/lcov-report/src/runtime/caching/index.html +0 -146
- package/coverage/lcov-report/src/runtime/caching/models/ApplicationModule.ts.html +0 -175
- package/coverage/lcov-report/src/runtime/caching/models/Implementation.ts.html +0 -208
- package/coverage/lcov-report/src/runtime/caching/models/SegmentModule.ts.html +0 -163
- package/coverage/lcov-report/src/runtime/caching/models/index.html +0 -146
- package/coverage/lcov-report/src/runtime/errors/ClientNotFound.ts.html +0 -121
- package/coverage/lcov-report/src/runtime/errors/InvalidClientId.ts.html +0 -121
- package/coverage/lcov-report/src/runtime/errors/InvalidSegmentFile.ts.html +0 -121
- package/coverage/lcov-report/src/runtime/errors/ModuleNotLoaded.ts.html +0 -121
- package/coverage/lcov-report/src/runtime/errors/NoNodeAvailable.ts.html +0 -121
- package/coverage/lcov-report/src/runtime/errors/RepositoryNotAvaiable.ts.html +0 -121
- package/coverage/lcov-report/src/runtime/errors/RuntimeNotAvailable.ts.html +0 -121
- package/coverage/lcov-report/src/runtime/errors/index.html +0 -206
- package/coverage/lcov-report/src/runtime/hooks/dependencies.ts.html +0 -142
- package/coverage/lcov-report/src/runtime/hooks/index.html +0 -131
- package/coverage/lcov-report/src/runtime/hooks/runtime.ts.html +0 -160
- package/coverage/lcov-report/src/runtime/index.html +0 -251
- package/coverage/lcov-report/src/runtime/models/File.ts.html +0 -151
- package/coverage/lcov-report/src/runtime/models/index.html +0 -116
- package/coverage/lcov-report/src/runtime/serialization/ArraySerializer.ts.html +0 -166
- package/coverage/lcov-report/src/runtime/serialization/ClassSerializer.ts.html +0 -400
- package/coverage/lcov-report/src/runtime/serialization/MapSerializer.ts.html +0 -217
- package/coverage/lcov-report/src/runtime/serialization/ObjectSerializer.ts.html +0 -211
- package/coverage/lcov-report/src/runtime/serialization/SetSerializer.ts.html +0 -178
- package/coverage/lcov-report/src/runtime/serialization/ValueSerializer.ts.html +0 -328
- package/coverage/lcov-report/src/runtime/serialization/errors/ClassNotFound.ts.html +0 -121
- package/coverage/lcov-report/src/runtime/serialization/errors/InvalidClass.ts.html +0 -121
- package/coverage/lcov-report/src/runtime/serialization/errors/index.html +0 -131
- package/coverage/lcov-report/src/runtime/serialization/index.html +0 -191
- package/coverage/lcov-report/src/runtime/utils/ModuleAnalyser.ts.html +0 -265
- package/coverage/lcov-report/src/runtime/utils/ModuleLoader.ts.html +0 -238
- package/coverage/lcov-report/src/runtime/utils/UrlRewriter.ts.html +0 -262
- package/coverage/lcov-report/src/runtime/utils/index.html +0 -146
- package/coverage/lcov-report/test/_fixtures/core/Implementation.fixture.ts.html +0 -184
- package/coverage/lcov-report/test/_fixtures/core/Procedure.fixture.ts.html +0 -172
- package/coverage/lcov-report/test/_fixtures/core/Segment.fixture.ts.html +0 -193
- package/coverage/lcov-report/test/_fixtures/core/SegmentBuilder.fixture.ts.html +0 -220
- package/coverage/lcov-report/test/_fixtures/core/Version.fixture.ts.html +0 -139
- package/coverage/lcov-report/test/_fixtures/core/index.html +0 -176
- package/coverage/lcov-report/test/_fixtures/core/procedures/allDefault.ts.html +0 -100
- package/coverage/lcov-report/test/_fixtures/core/procedures/hasParameters.ts.html +0 -100
- package/coverage/lcov-report/test/_fixtures/core/procedures/hasVersion_v1_0_0.ts.html +0 -115
- package/coverage/lcov-report/test/_fixtures/core/procedures/hasVersion_v1_0_5.ts.html +0 -115
- package/coverage/lcov-report/test/_fixtures/core/procedures/hasVersion_v1_1_0.ts.html +0 -115
- package/coverage/lcov-report/test/_fixtures/core/procedures/hasVersion_v1_2_3.ts.html +0 -115
- package/coverage/lcov-report/test/_fixtures/core/procedures/inModule.ts.html +0 -115
- package/coverage/lcov-report/test/_fixtures/core/procedures/index.html +0 -251
- package/coverage/lcov-report/test/_fixtures/core/procedures/isBroken.ts.html +0 -112
- package/coverage/lcov-report/test/_fixtures/core/procedures/isPrivate.ts.html +0 -112
- package/coverage/lcov-report/test/_fixtures/core/procedures/isPublic.ts.html +0 -112
- package/coverage/lcov-report/test/_fixtures/core/reflection/ReflectionHelper.fixture.ts.html +0 -241
- package/coverage/lcov-report/test/_fixtures/core/reflection/index.html +0 -116
- package/coverage/lcov-report/test/_fixtures/core/segments/default.segment.ts.html +0 -94
- package/coverage/lcov-report/test/_fixtures/core/segments/index.html +0 -116
- package/coverage/lcov-report/test/_fixtures/runtime/LocalGateway.fixture.ts.html +0 -157
- package/coverage/lcov-report/test/_fixtures/runtime/LocalNode.fixture.ts.html +0 -133
- package/coverage/lcov-report/test/_fixtures/runtime/LocalRepository.fixture.ts.html +0 -304
- package/coverage/lcov-report/test/_fixtures/runtime/NodeBalancer.fixture.ts.html +0 -142
- package/coverage/lcov-report/test/_fixtures/runtime/NodeMonitor.fixture.ts.html +0 -187
- package/coverage/lcov-report/test/_fixtures/runtime/RemoteNode.fixture.ts.html +0 -109
- package/coverage/lcov-report/test/_fixtures/runtime/caching/ImportRewriter.fixture.ts.html +0 -304
- package/coverage/lcov-report/test/_fixtures/runtime/caching/ModuleAppender.fixture.ts.html +0 -181
- package/coverage/lcov-report/test/_fixtures/runtime/caching/RemoteBuilder.fixture.ts.html +0 -217
- package/coverage/lcov-report/test/_fixtures/runtime/caching/SourceAppender.fixture.ts.html +0 -178
- package/coverage/lcov-report/test/_fixtures/runtime/caching/index.html +0 -146
- package/coverage/lcov-report/test/_fixtures/runtime/index.html +0 -206
- package/coverage/lcov-report/test/_fixtures/runtime/procedures/firstPrivateTask.ts.html +0 -109
- package/coverage/lcov-report/test/_fixtures/runtime/procedures/firstPublicTask.ts.html +0 -118
- package/coverage/lcov-report/test/_fixtures/runtime/procedures/fourthPublicTask.ts.html +0 -109
- package/coverage/lcov-report/test/_fixtures/runtime/procedures/index.html +0 -191
- package/coverage/lcov-report/test/_fixtures/runtime/procedures/secondPrivateTask.ts.html +0 -109
- package/coverage/lcov-report/test/_fixtures/runtime/procedures/secondPublicTask.ts.html +0 -118
- package/coverage/lcov-report/test/_fixtures/runtime/procedures/thirdPublicTask.ts.html +0 -118
- package/coverage/lcov-report/test/_fixtures/runtime/segments/first.segment.files.ts.html +0 -85
- package/coverage/lcov-report/test/_fixtures/runtime/segments/first.segment.ts.html +0 -91
- package/coverage/lcov-report/test/_fixtures/runtime/segments/index.html +0 -161
- package/coverage/lcov-report/test/_fixtures/runtime/segments/second.segment.files.ts.html +0 -85
- package/coverage/lcov-report/test/_fixtures/runtime/segments/second.segment.ts.html +0 -91
- package/coverage/lcov-report/test/_fixtures/runtime/segments.ts.html +0 -319
- package/coverage/lcov-report/test/_fixtures/runtime/serialization/ValueSerializer.fixture.ts.html +0 -394
- package/coverage/lcov-report/test/_fixtures/runtime/serialization/index.html +0 -116
- package/coverage/lcov-report/test/_fixtures/runtime/utils/ModuleAnaliser.fixture.ts.html +0 -163
- package/coverage/lcov-report/test/_fixtures/runtime/utils/index.html +0 -116
- package/coverage/lcov.info +0 -3565
- package/dist/core/AccessLevel.d.ts +0 -5
- package/dist/core/AccessLevel.js +0 -6
- package/dist/core/ImplementationBuilder.d.ts +0 -4
- package/dist/core/ImplementationBuilder.js +0 -14
- package/dist/core/errors/ErrorManager.d.ts +0 -3
- package/dist/core/errors/ErrorManager.js +0 -11
- package/dist/runtime/RemoteNodeBuilder.d.ts +0 -4
- package/dist/runtime/RemoteNodeBuilder.js +0 -10
- package/dist/runtime/caching/CachBuilder.d.ts +0 -6
- package/dist/runtime/caching/CachBuilder.js +0 -150
- package/dist/runtime/caching/ModuleAppender.d.ts +0 -5
- package/dist/runtime/caching/ModuleAppender.js +0 -22
- package/dist/runtime/caching/errors/FunctionFilenameNotFound.d.ts +0 -3
- package/dist/runtime/caching/errors/FunctionFilenameNotFound.js +0 -5
- package/dist/runtime/caching/types/models/ApplicationModule.d.ts +0 -9
- package/dist/runtime/caching/types/models/ApplicationModule.js +0 -19
- package/dist/runtime/caching/types/models/Implementation.d.ts +0 -12
- package/dist/runtime/caching/types/models/Implementation.js +0 -27
- package/dist/runtime/caching/types/models/Procedure.d.ts +0 -9
- package/dist/runtime/caching/types/models/Procedure.js +0 -15
- package/dist/runtime/caching/types/models/Segment.d.ts +0 -10
- package/dist/runtime/caching/types/models/Segment.js +0 -16
- package/dist/runtime/caching/types/models/SegmentModule.d.ts +0 -10
- package/dist/runtime/caching/types/models/SegmentModule.js +0 -14
- package/dist/server/definitions/RuntimeMode.d.ts +0 -8
- package/dist/server/definitions/RuntimeMode.js +0 -9
- package/dist/server/models/RuntimeConfiguration.d.ts +0 -12
- package/dist/server/models/RuntimeConfiguration.js +0 -68
- package/dist/server/models/ServerOptions.d.ts +0 -4
- package/dist/server/models/ServerOptions.js +0 -25
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
<!doctype html>
|
|
3
|
-
<html lang="en">
|
|
4
|
-
|
|
5
|
-
<head>
|
|
6
|
-
<title>Code coverage report for src/runtime/Node.ts</title>
|
|
7
|
-
<meta charset="utf-8" />
|
|
8
|
-
<link rel="stylesheet" href="../../prettify.css" />
|
|
9
|
-
<link rel="stylesheet" href="../../base.css" />
|
|
10
|
-
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
|
|
11
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
-
<style type='text/css'>
|
|
13
|
-
.coverage-summary .sorter {
|
|
14
|
-
background-image: url(../../sort-arrow-sprite.png);
|
|
15
|
-
}
|
|
16
|
-
</style>
|
|
17
|
-
</head>
|
|
18
|
-
|
|
19
|
-
<body>
|
|
20
|
-
<div class='wrapper'>
|
|
21
|
-
<div class='pad1'>
|
|
22
|
-
<h1><a href="../../index.html">All files</a> / <a href="index.html">src/runtime</a> Node.ts</h1>
|
|
23
|
-
<div class='clearfix'>
|
|
24
|
-
|
|
25
|
-
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">100% </span>
|
|
27
|
-
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>15/15</span>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">100% </span>
|
|
34
|
-
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>0/0</span>
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">100% </span>
|
|
41
|
-
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>0/0</span>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">100% </span>
|
|
48
|
-
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>15/15</span>
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
</div>
|
|
54
|
-
<p class="quiet">
|
|
55
|
-
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
-
</p>
|
|
57
|
-
<template id="filterTemplate">
|
|
58
|
-
<div class="quiet">
|
|
59
|
-
Filter:
|
|
60
|
-
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
-
</div>
|
|
62
|
-
</template>
|
|
63
|
-
</div>
|
|
64
|
-
<div class='status-line high'></div>
|
|
65
|
-
<pre><table class="coverage">
|
|
66
|
-
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
|
-
<a name='L2'></a><a href='#L2'>2</a>
|
|
68
|
-
<a name='L3'></a><a href='#L3'>3</a>
|
|
69
|
-
<a name='L4'></a><a href='#L4'>4</a>
|
|
70
|
-
<a name='L5'></a><a href='#L5'>5</a>
|
|
71
|
-
<a name='L6'></a><a href='#L6'>6</a>
|
|
72
|
-
<a name='L7'></a><a href='#L7'>7</a>
|
|
73
|
-
<a name='L8'></a><a href='#L8'>8</a>
|
|
74
|
-
<a name='L9'></a><a href='#L9'>9</a>
|
|
75
|
-
<a name='L10'></a><a href='#L10'>10</a>
|
|
76
|
-
<a name='L11'></a><a href='#L11'>11</a>
|
|
77
|
-
<a name='L12'></a><a href='#L12'>12</a>
|
|
78
|
-
<a name='L13'></a><a href='#L13'>13</a>
|
|
79
|
-
<a name='L14'></a><a href='#L14'>14</a>
|
|
80
|
-
<a name='L15'></a><a href='#L15'>15</a>
|
|
81
|
-
<a name='L16'></a><a href='#L16'>16</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
|
|
82
|
-
<span class="cline-any cline-yes">1x</span>
|
|
83
|
-
<span class="cline-any cline-yes">1x</span>
|
|
84
|
-
<span class="cline-any cline-yes">1x</span>
|
|
85
|
-
<span class="cline-any cline-yes">1x</span>
|
|
86
|
-
<span class="cline-any cline-yes">1x</span>
|
|
87
|
-
<span class="cline-any cline-yes">1x</span>
|
|
88
|
-
<span class="cline-any cline-yes">1x</span>
|
|
89
|
-
<span class="cline-any cline-yes">1x</span>
|
|
90
|
-
<span class="cline-any cline-yes">1x</span>
|
|
91
|
-
<span class="cline-any cline-yes">1x</span>
|
|
92
|
-
<span class="cline-any cline-yes">1x</span>
|
|
93
|
-
<span class="cline-any cline-yes">1x</span>
|
|
94
|
-
<span class="cline-any cline-yes">1x</span>
|
|
95
|
-
<span class="cline-any cline-yes">1x</span>
|
|
96
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">
|
|
97
|
-
import Version from '../core/Version.js';
|
|
98
|
-
|
|
99
|
-
import ProcedureContainer from './interfaces/ProcedureContainer.js';
|
|
100
|
-
|
|
101
|
-
import Runtime from './Runtime.js';
|
|
102
|
-
|
|
103
|
-
export default abstract class Node extends Runtime implements ProcedureContainer
|
|
104
|
-
{
|
|
105
|
-
abstract getProcedureNames(): string[];
|
|
106
|
-
|
|
107
|
-
abstract hasProcedure(name: string): boolean;
|
|
108
|
-
|
|
109
|
-
abstract run(name: string, version: Version, args: Map<string, unknown>): Promise<unknown>;
|
|
110
|
-
}
|
|
111
|
-
</pre></td></tr></table></pre>
|
|
112
|
-
|
|
113
|
-
<div class='push'></div><!-- for sticky footer -->
|
|
114
|
-
</div><!-- /wrapper -->
|
|
115
|
-
<div class='footer quiet pad2 space-top1 center small'>
|
|
116
|
-
Code coverage generated by
|
|
117
|
-
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
118
|
-
at 2022-10-21T18:41:25.688Z
|
|
119
|
-
</div>
|
|
120
|
-
<script src="../../prettify.js"></script>
|
|
121
|
-
<script>
|
|
122
|
-
window.onload = function () {
|
|
123
|
-
prettyPrint();
|
|
124
|
-
};
|
|
125
|
-
</script>
|
|
126
|
-
<script src="../../sorter.js"></script>
|
|
127
|
-
<script src="../../block-navigation.js"></script>
|
|
128
|
-
</body>
|
|
129
|
-
</html>
|
|
130
|
-
|
|
@@ -1,268 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
<!doctype html>
|
|
3
|
-
<html lang="en">
|
|
4
|
-
|
|
5
|
-
<head>
|
|
6
|
-
<title>Code coverage report for src/runtime/NodeBalancer.ts</title>
|
|
7
|
-
<meta charset="utf-8" />
|
|
8
|
-
<link rel="stylesheet" href="../../prettify.css" />
|
|
9
|
-
<link rel="stylesheet" href="../../base.css" />
|
|
10
|
-
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
|
|
11
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
-
<style type='text/css'>
|
|
13
|
-
.coverage-summary .sorter {
|
|
14
|
-
background-image: url(../../sort-arrow-sprite.png);
|
|
15
|
-
}
|
|
16
|
-
</style>
|
|
17
|
-
</head>
|
|
18
|
-
|
|
19
|
-
<body>
|
|
20
|
-
<div class='wrapper'>
|
|
21
|
-
<div class='pad1'>
|
|
22
|
-
<h1><a href="../../index.html">All files</a> / <a href="index.html">src/runtime</a> NodeBalancer.ts</h1>
|
|
23
|
-
<div class='clearfix'>
|
|
24
|
-
|
|
25
|
-
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">80.32% </span>
|
|
27
|
-
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>49/61</span>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">90.9% </span>
|
|
34
|
-
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>10/11</span>
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">80% </span>
|
|
41
|
-
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>4/5</span>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">80.32% </span>
|
|
48
|
-
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>49/61</span>
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
</div>
|
|
54
|
-
<p class="quiet">
|
|
55
|
-
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
-
</p>
|
|
57
|
-
<template id="filterTemplate">
|
|
58
|
-
<div class="quiet">
|
|
59
|
-
Filter:
|
|
60
|
-
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
-
</div>
|
|
62
|
-
</template>
|
|
63
|
-
</div>
|
|
64
|
-
<div class='status-line high'></div>
|
|
65
|
-
<pre><table class="coverage">
|
|
66
|
-
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
|
-
<a name='L2'></a><a href='#L2'>2</a>
|
|
68
|
-
<a name='L3'></a><a href='#L3'>3</a>
|
|
69
|
-
<a name='L4'></a><a href='#L4'>4</a>
|
|
70
|
-
<a name='L5'></a><a href='#L5'>5</a>
|
|
71
|
-
<a name='L6'></a><a href='#L6'>6</a>
|
|
72
|
-
<a name='L7'></a><a href='#L7'>7</a>
|
|
73
|
-
<a name='L8'></a><a href='#L8'>8</a>
|
|
74
|
-
<a name='L9'></a><a href='#L9'>9</a>
|
|
75
|
-
<a name='L10'></a><a href='#L10'>10</a>
|
|
76
|
-
<a name='L11'></a><a href='#L11'>11</a>
|
|
77
|
-
<a name='L12'></a><a href='#L12'>12</a>
|
|
78
|
-
<a name='L13'></a><a href='#L13'>13</a>
|
|
79
|
-
<a name='L14'></a><a href='#L14'>14</a>
|
|
80
|
-
<a name='L15'></a><a href='#L15'>15</a>
|
|
81
|
-
<a name='L16'></a><a href='#L16'>16</a>
|
|
82
|
-
<a name='L17'></a><a href='#L17'>17</a>
|
|
83
|
-
<a name='L18'></a><a href='#L18'>18</a>
|
|
84
|
-
<a name='L19'></a><a href='#L19'>19</a>
|
|
85
|
-
<a name='L20'></a><a href='#L20'>20</a>
|
|
86
|
-
<a name='L21'></a><a href='#L21'>21</a>
|
|
87
|
-
<a name='L22'></a><a href='#L22'>22</a>
|
|
88
|
-
<a name='L23'></a><a href='#L23'>23</a>
|
|
89
|
-
<a name='L24'></a><a href='#L24'>24</a>
|
|
90
|
-
<a name='L25'></a><a href='#L25'>25</a>
|
|
91
|
-
<a name='L26'></a><a href='#L26'>26</a>
|
|
92
|
-
<a name='L27'></a><a href='#L27'>27</a>
|
|
93
|
-
<a name='L28'></a><a href='#L28'>28</a>
|
|
94
|
-
<a name='L29'></a><a href='#L29'>29</a>
|
|
95
|
-
<a name='L30'></a><a href='#L30'>30</a>
|
|
96
|
-
<a name='L31'></a><a href='#L31'>31</a>
|
|
97
|
-
<a name='L32'></a><a href='#L32'>32</a>
|
|
98
|
-
<a name='L33'></a><a href='#L33'>33</a>
|
|
99
|
-
<a name='L34'></a><a href='#L34'>34</a>
|
|
100
|
-
<a name='L35'></a><a href='#L35'>35</a>
|
|
101
|
-
<a name='L36'></a><a href='#L36'>36</a>
|
|
102
|
-
<a name='L37'></a><a href='#L37'>37</a>
|
|
103
|
-
<a name='L38'></a><a href='#L38'>38</a>
|
|
104
|
-
<a name='L39'></a><a href='#L39'>39</a>
|
|
105
|
-
<a name='L40'></a><a href='#L40'>40</a>
|
|
106
|
-
<a name='L41'></a><a href='#L41'>41</a>
|
|
107
|
-
<a name='L42'></a><a href='#L42'>42</a>
|
|
108
|
-
<a name='L43'></a><a href='#L43'>43</a>
|
|
109
|
-
<a name='L44'></a><a href='#L44'>44</a>
|
|
110
|
-
<a name='L45'></a><a href='#L45'>45</a>
|
|
111
|
-
<a name='L46'></a><a href='#L46'>46</a>
|
|
112
|
-
<a name='L47'></a><a href='#L47'>47</a>
|
|
113
|
-
<a name='L48'></a><a href='#L48'>48</a>
|
|
114
|
-
<a name='L49'></a><a href='#L49'>49</a>
|
|
115
|
-
<a name='L50'></a><a href='#L50'>50</a>
|
|
116
|
-
<a name='L51'></a><a href='#L51'>51</a>
|
|
117
|
-
<a name='L52'></a><a href='#L52'>52</a>
|
|
118
|
-
<a name='L53'></a><a href='#L53'>53</a>
|
|
119
|
-
<a name='L54'></a><a href='#L54'>54</a>
|
|
120
|
-
<a name='L55'></a><a href='#L55'>55</a>
|
|
121
|
-
<a name='L56'></a><a href='#L56'>56</a>
|
|
122
|
-
<a name='L57'></a><a href='#L57'>57</a>
|
|
123
|
-
<a name='L58'></a><a href='#L58'>58</a>
|
|
124
|
-
<a name='L59'></a><a href='#L59'>59</a>
|
|
125
|
-
<a name='L60'></a><a href='#L60'>60</a>
|
|
126
|
-
<a name='L61'></a><a href='#L61'>61</a>
|
|
127
|
-
<a name='L62'></a><a href='#L62'>62</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
|
|
128
|
-
<span class="cline-any cline-yes">1x</span>
|
|
129
|
-
<span class="cline-any cline-yes">1x</span>
|
|
130
|
-
<span class="cline-any cline-yes">1x</span>
|
|
131
|
-
<span class="cline-any cline-yes">1x</span>
|
|
132
|
-
<span class="cline-any cline-yes">1x</span>
|
|
133
|
-
<span class="cline-any cline-yes">1x</span>
|
|
134
|
-
<span class="cline-any cline-yes">6x</span>
|
|
135
|
-
<span class="cline-any cline-yes">6x</span>
|
|
136
|
-
<span class="cline-any cline-yes">6x</span>
|
|
137
|
-
<span class="cline-any cline-yes">6x</span>
|
|
138
|
-
<span class="cline-any cline-yes">6x</span>
|
|
139
|
-
<span class="cline-any cline-yes">6x</span>
|
|
140
|
-
<span class="cline-any cline-yes">6x</span>
|
|
141
|
-
<span class="cline-any cline-yes">6x</span>
|
|
142
|
-
<span class="cline-any cline-yes">6x</span>
|
|
143
|
-
<span class="cline-any cline-no"> </span>
|
|
144
|
-
<span class="cline-any cline-no"> </span>
|
|
145
|
-
<span class="cline-any cline-yes">6x</span>
|
|
146
|
-
<span class="cline-any cline-yes">6x</span>
|
|
147
|
-
<span class="cline-any cline-yes">6x</span>
|
|
148
|
-
<span class="cline-any cline-yes">6x</span>
|
|
149
|
-
<span class="cline-any cline-yes">6x</span>
|
|
150
|
-
<span class="cline-any cline-no"> </span>
|
|
151
|
-
<span class="cline-any cline-no"> </span>
|
|
152
|
-
<span class="cline-any cline-no"> </span>
|
|
153
|
-
<span class="cline-any cline-no"> </span>
|
|
154
|
-
<span class="cline-any cline-no"> </span>
|
|
155
|
-
<span class="cline-any cline-no"> </span>
|
|
156
|
-
<span class="cline-any cline-no"> </span>
|
|
157
|
-
<span class="cline-any cline-no"> </span>
|
|
158
|
-
<span class="cline-any cline-no"> </span>
|
|
159
|
-
<span class="cline-any cline-no"> </span>
|
|
160
|
-
<span class="cline-any cline-yes">6x</span>
|
|
161
|
-
<span class="cline-any cline-yes">6x</span>
|
|
162
|
-
<span class="cline-any cline-yes">8x</span>
|
|
163
|
-
<span class="cline-any cline-yes">8x</span>
|
|
164
|
-
<span class="cline-any cline-yes">8x</span>
|
|
165
|
-
<span class="cline-any cline-yes">1x</span>
|
|
166
|
-
<span class="cline-any cline-yes">1x</span>
|
|
167
|
-
<span class="cline-any cline-yes">7x</span>
|
|
168
|
-
<span class="cline-any cline-yes">7x</span>
|
|
169
|
-
<span class="cline-any cline-yes">8x</span>
|
|
170
|
-
<span class="cline-any cline-yes">1x</span>
|
|
171
|
-
<span class="cline-any cline-yes">1x</span>
|
|
172
|
-
<span class="cline-any cline-yes">7x</span>
|
|
173
|
-
<span class="cline-any cline-yes">7x</span>
|
|
174
|
-
<span class="cline-any cline-yes">7x</span>
|
|
175
|
-
<span class="cline-any cline-yes">6x</span>
|
|
176
|
-
<span class="cline-any cline-yes">6x</span>
|
|
177
|
-
<span class="cline-any cline-yes">4x</span>
|
|
178
|
-
<span class="cline-any cline-yes">4x</span>
|
|
179
|
-
<span class="cline-any cline-yes">4x</span>
|
|
180
|
-
<span class="cline-any cline-yes">4x</span>
|
|
181
|
-
<span class="cline-any cline-yes">4x</span>
|
|
182
|
-
<span class="cline-any cline-yes">1x</span>
|
|
183
|
-
<span class="cline-any cline-yes">1x</span>
|
|
184
|
-
<span class="cline-any cline-yes">3x</span>
|
|
185
|
-
<span class="cline-any cline-yes">3x</span>
|
|
186
|
-
<span class="cline-any cline-yes">3x</span>
|
|
187
|
-
<span class="cline-any cline-yes">6x</span>
|
|
188
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">
|
|
189
|
-
import Runner from '../core/interfaces/Runner.js';
|
|
190
|
-
import Version from '../core/Version.js';
|
|
191
|
-
|
|
192
|
-
import NoNodeAvailable from './errors/NoNodeAvailable.js';
|
|
193
|
-
import Node from './Node.js';
|
|
194
|
-
|
|
195
|
-
export default class NodeBalancer implements Runner
|
|
196
|
-
{
|
|
197
|
-
#nodes: Node[] = [];
|
|
198
|
-
#currentIndex = 0;
|
|
199
|
-
|
|
200
|
-
addNode(node: Node): void
|
|
201
|
-
{
|
|
202
|
-
if (this.#nodes.includes(node))
|
|
203
|
-
<span class="branch-0 cbranch-no" title="branch not covered" > {</span>
|
|
204
|
-
<span class="cstat-no" title="statement not covered" > return;</span>
|
|
205
|
-
<span class="cstat-no" title="statement not covered" > }</span>
|
|
206
|
-
|
|
207
|
-
this.#nodes.push(node);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
<span class="fstat-no" title="function not covered" > removeNode(node: Node): void</span>
|
|
211
|
-
<span class="cstat-no" title="statement not covered" > {</span>
|
|
212
|
-
<span class="cstat-no" title="statement not covered" > const index = this.#nodes.indexOf(node);</span>
|
|
213
|
-
<span class="cstat-no" title="statement not covered" ></span>
|
|
214
|
-
<span class="cstat-no" title="statement not covered" > if (index === -1)</span>
|
|
215
|
-
<span class="cstat-no" title="statement not covered" > {</span>
|
|
216
|
-
<span class="cstat-no" title="statement not covered" > return;</span>
|
|
217
|
-
<span class="cstat-no" title="statement not covered" > }</span>
|
|
218
|
-
<span class="cstat-no" title="statement not covered" ></span>
|
|
219
|
-
<span class="cstat-no" title="statement not covered" > this.#nodes.splice(index, 1);</span>
|
|
220
|
-
<span class="cstat-no" title="statement not covered" > }</span>
|
|
221
|
-
|
|
222
|
-
getNextNode(): Node | undefined
|
|
223
|
-
{
|
|
224
|
-
if (this.#nodes.length === 0)
|
|
225
|
-
{
|
|
226
|
-
return;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
if (this.#currentIndex >= this.#nodes.length)
|
|
230
|
-
{
|
|
231
|
-
this.#currentIndex = 0;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
return this.#nodes[this.#currentIndex++];
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
async run(fqn: string, version: Version, args: Map<string, unknown>): Promise<unknown>
|
|
238
|
-
{
|
|
239
|
-
const node = this.getNextNode();
|
|
240
|
-
|
|
241
|
-
if (node === undefined)
|
|
242
|
-
{
|
|
243
|
-
throw new NoNodeAvailable(fqn);
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
return node.run(fqn, version, args);
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
</pre></td></tr></table></pre>
|
|
250
|
-
|
|
251
|
-
<div class='push'></div><!-- for sticky footer -->
|
|
252
|
-
</div><!-- /wrapper -->
|
|
253
|
-
<div class='footer quiet pad2 space-top1 center small'>
|
|
254
|
-
Code coverage generated by
|
|
255
|
-
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
256
|
-
at 2022-10-21T18:41:25.688Z
|
|
257
|
-
</div>
|
|
258
|
-
<script src="../../prettify.js"></script>
|
|
259
|
-
<script>
|
|
260
|
-
window.onload = function () {
|
|
261
|
-
prettyPrint();
|
|
262
|
-
};
|
|
263
|
-
</script>
|
|
264
|
-
<script src="../../sorter.js"></script>
|
|
265
|
-
<script src="../../block-navigation.js"></script>
|
|
266
|
-
</body>
|
|
267
|
-
</html>
|
|
268
|
-
|