Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NodeSharedCode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dojo Project (HES-SO)
Projects
Shared
NodeSharedCode
Compare revisions
bdcfaffc04421d131cc63636a7c2b84a20cfadc5 to c6e9f764ca4b12fa1e75b4a247fba5572597b1d7
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
dojo_project/projects/shared/nodesharedcode
Select target project
No results found
c6e9f764ca4b12fa1e75b4a247fba5572597b1d7
Select Git revision
Branches
jw_sonar
jw_sonar_backup
main
move-to-esm-only
open_tool_for_self_hosting
v5.0
Tags
v4.1
v4.2
8 results
Swap
Target
dojo_project/projects/shared/nodesharedcode
Select target project
dojo_project/projects/shared/nodesharedcode
1 result
bdcfaffc04421d131cc63636a7c2b84a20cfadc5
Select Git revision
Branches
jw_sonar
jw_sonar_backup
main
move-to-esm-only
open_tool_for_self_hosting
v5.0
Tags
v4.1
v4.2
8 results
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (3)
DojoResponse => Session token become optional
· 7d7227e7
michael.minelli
authored
2 years ago
7d7227e7
ExerciceHelper => Migrate from hjson to json5
· 4dc9da6a
michael.minelli
authored
2 years ago
4dc9da6a
README => Update dependencies
· c6e9f764
michael.minelli
authored
2 years ago
c6e9f764
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+1
-1
1 addition, 1 deletion
README.md
helpers/ExerciceHelper.ts
+2
-2
2 additions, 2 deletions
helpers/ExerciceHelper.ts
types/Dojo/DojoResponse.ts
+1
-1
1 addition, 1 deletion
types/Dojo/DojoResponse.ts
with
4 additions
and
4 deletions
README.md
View file @
c6e9f764
...
...
@@ -7,7 +7,7 @@ This repo contains some code that can be shared across node projects of Dojo.
These packages are needed :
-
`ajv`
-
`
h
json`
-
`json
5
`
-
`winston`
## How to use it
...
...
This diff is collapsed.
Click to expand it.
helpers/ExerciceHelper.ts
View file @
c6e9f764
import
Ajv
,
{
ErrorObject
,
JTDSchemaType
}
from
'
ajv/dist/jtd
'
;
import
fs
from
'
fs
'
;
import
ExerciceResultsFile
from
'
../types/Dojo/ExerciceResultsFile
'
;
import
hjson
from
'
h
json
'
;
import
JSON5
from
'
json
5
'
;
class
ExerciceHelper
{
...
...
@@ -34,7 +34,7 @@ class ExerciceHelper {
const
validator
=
ajv
.
compile
(
schema
);
const
results
=
hjson
.
parse
(
fs
.
readFileSync
(
resultsFilePath
,
'
utf8
'
));
const
results
=
JSON5
.
parse
(
fs
.
readFileSync
(
resultsFilePath
,
'
utf8
'
));
const
isValid
=
validator
(
results
);
return
{
...
...
This diff is collapsed.
Click to expand it.
types/Dojo/DojoResponse.ts
View file @
c6e9f764
...
...
@@ -2,7 +2,7 @@ interface DojoResponse<T> {
timestamp
:
string
;
code
:
number
;
description
:
string
;
sessionToken
:
string
;
sessionToken
:
string
|
null
;
data
:
T
;
}
...
...
This diff is collapsed.
Click to expand it.