Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Communications Backbone System
backbone-adapter-javascript
Commits
46df2ad4
Unverified
Commit
46df2ad4
authored
2 years ago
by
Dan Jones
Browse files
Options
Download
Email Patches
Plain Diff
fix: assign validator in place of promise
parent
bd0feb64
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
15 deletions
+15
-15
dist/protocol.esm.js
dist/protocol.esm.js
+5
-5
dist/protocol.js
dist/protocol.js
+5
-5
src/protocol/index.js
src/protocol/index.js
+5
-5
No files found.
dist/protocol.esm.js
View file @
46df2ad4
...
...
@@ -27,7 +27,7 @@ class GenericProtocol {
constructor
(
schema
,
services
)
{
this
.
schema
=
schema
;
this
.
services
=
services
;
this
.
validator
=
this
.
createValidator
(
schema
);
this
.
createValidator
(
schema
);
}
/**
...
...
@@ -36,7 +36,7 @@ class GenericProtocol {
* @returns {Validator}
*/
createValidator
(
schema
)
{
return
new
Validator
(
schema
);
this
.
validator
=
new
Validator
(
schema
);
}
/**
...
...
@@ -116,12 +116,12 @@ class GenericSoarProtocol extends GenericProtocol {
*/
createValidator
(
schema
)
{
if
(
typeof
schema
===
'
string
'
&&
schema
.
match
(
/^
[\w\.]
+$/
))
{
return
this
.
loadSchema
(
schema
)
this
.
loadSchema
(
schema
)
.
then
((
schema
)
=>
{
return
new
Validator
(
schema
);
this
.
validator
=
new
Validator
(
schema
);
});
}
else
{
return
new
Validator
(
schema
);
this
.
validator
=
new
Validator
(
schema
);
}
}
...
...
This diff is collapsed.
Click to expand it.
dist/protocol.js
View file @
46df2ad4
...
...
@@ -29,7 +29,7 @@ class GenericProtocol {
constructor
(
schema
,
services
)
{
this
.
schema
=
schema
;
this
.
services
=
services
;
this
.
validator
=
this
.
createValidator
(
schema
);
this
.
createValidator
(
schema
);
}
/**
...
...
@@ -38,7 +38,7 @@ class GenericProtocol {
* @returns {Validator}
*/
createValidator
(
schema
)
{
return
new
Validator
(
schema
);
this
.
validator
=
new
Validator
(
schema
);
}
/**
...
...
@@ -118,12 +118,12 @@ class GenericSoarProtocol extends GenericProtocol {
*/
createValidator
(
schema
)
{
if
(
typeof
schema
===
'
string
'
&&
schema
.
match
(
/^
[\w\.]
+$/
))
{
return
this
.
loadSchema
(
schema
)
this
.
loadSchema
(
schema
)
.
then
((
schema
)
=>
{
return
new
Validator
(
schema
);
this
.
validator
=
new
Validator
(
schema
);
});
}
else
{
return
new
Validator
(
schema
);
this
.
validator
=
new
Validator
(
schema
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/protocol/index.js
View file @
46df2ad4
...
...
@@ -27,7 +27,7 @@ export class GenericProtocol {
constructor
(
schema
,
services
)
{
this
.
schema
=
schema
;
this
.
services
=
services
;
this
.
validator
=
this
.
createValidator
(
schema
);
this
.
createValidator
(
schema
);
}
/**
...
...
@@ -36,7 +36,7 @@ export class GenericProtocol {
* @returns {Validator}
*/
createValidator
(
schema
)
{
return
new
Validator
(
schema
);
this
.
validator
=
new
Validator
(
schema
);
}
/**
...
...
@@ -116,12 +116,12 @@ export class GenericSoarProtocol extends GenericProtocol {
*/
createValidator
(
schema
)
{
if
(
typeof
schema
===
'
string
'
&&
schema
.
match
(
/^
[\w\.]
+$/
))
{
return
this
.
loadSchema
(
schema
)
this
.
loadSchema
(
schema
)
.
then
((
schema
)
=>
{
return
new
Validator
(
schema
);
this
.
validator
=
new
Validator
(
schema
);
});
}
else
{
return
new
Validator
(
schema
);
this
.
validator
=
new
Validator
(
schema
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment