Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Rewrite cam.js in typescript in separate branch #221

Draft
wants to merge 134 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
077e4cb
Initial commit
agsh Jan 9, 2022
ed651f2
Slice of work
agsh Jan 11, 2022
494bdfe
utils.ts
agsh Jan 11, 2022
92a002e
Merge remote-tracking branch 'origin/master' into v1
agsh Jan 11, 2022
5ac71dc
Slice of work
agsh Jan 11, 2022
8f45593
Slice of work
agsh Jan 12, 2022
11335ab
Split the class into modules
agsh Jan 13, 2022
926e3e2
Split the class into modules, reworked
agsh Jan 14, 2022
241a500
getCapabilities interfaces
agsh Jan 14, 2022
a256f65
getCapabilities method
agsh Jan 14, 2022
7008ec2
Slice of interfaces work
agsh Jan 15, 2022
80b9f2f
Slice of interfaces work
agsh Jan 15, 2022
c0eaf68
`media.getProfiles` method
agsh Jan 15, 2022
34dfc03
`media.getVideoSources` interfaces
agsh Jan 15, 2022
c8abf39
`onvif.connect` method
agsh Jan 16, 2022
ccb5bdb
Reworked linerase function do add xml atrributes into object instead …
agsh Jan 16, 2022
5490edb
`onvif.getActiveSources` method
agsh Jan 16, 2022
52f6019
`onvif.getActiveSources` method
agsh Jan 16, 2022
9553f2f
Temporary file for tests
agsh Jan 16, 2022
5212863
Discovery class
agsh Jan 16, 2022
d6caec0
Discovery class
agsh Jan 16, 2022
e7355ce
Discovery singleton
agsh Jan 18, 2022
96894e2
`getDeviceInformation` method
agsh Jan 18, 2022
237c037
`getHostname` method
agsh Jan 21, 2022
e5e1fde
Slice of work
agsh Jan 22, 2022
3fcbcc4
Slice of work
agsh Jan 22, 2022
11c760f
Update libraries
agsh Oct 5, 2022
cb71e06
Merge pull request #244 from agsh/update_libs
agsh Oct 6, 2022
b79421d
Initial commit
agsh Jan 9, 2022
efd0a85
Slice of work
agsh Jan 11, 2022
c2b47a8
utils.ts
agsh Jan 11, 2022
2e01d10
Slice of work
agsh Jan 11, 2022
7cae478
Slice of work
agsh Jan 12, 2022
3db374a
Split the class into modules
agsh Jan 13, 2022
f98b336
Split the class into modules, reworked
agsh Jan 14, 2022
4d6e973
getCapabilities interfaces
agsh Jan 14, 2022
66c03bf
getCapabilities method
agsh Jan 14, 2022
58f9382
Slice of interfaces work
agsh Jan 15, 2022
86eff4d
Slice of interfaces work
agsh Jan 15, 2022
2b17bb7
`media.getProfiles` method
agsh Jan 15, 2022
3938114
`media.getVideoSources` interfaces
agsh Jan 15, 2022
0e8cdaf
`onvif.connect` method
agsh Jan 16, 2022
d8f89fc
Reworked linerase function do add xml atrributes into object instead …
agsh Jan 16, 2022
b6ccdf6
`onvif.getActiveSources` method
agsh Jan 16, 2022
5b8e0a2
`onvif.getActiveSources` method
agsh Jan 16, 2022
089fbbf
Temporary file for tests
agsh Jan 16, 2022
419b3cc
Discovery class
agsh Jan 16, 2022
82f5d97
Discovery class
agsh Jan 16, 2022
4c25235
Discovery singleton
agsh Jan 18, 2022
80f1c43
`getDeviceInformation` method
agsh Jan 18, 2022
8a65e41
`getHostname` method
agsh Jan 21, 2022
dd81951
Slice of work
agsh Jan 22, 2022
91724fb
Slice of work
agsh Jan 22, 2022
a973f4e
Update libraries
agsh Oct 5, 2022
fb2c27d
Merge remote-tracking branch 'origin/v1' into v1
agsh Oct 6, 2022
08162c9
fix missing `hostname` parameter in requests
agsh Oct 9, 2022
471decf
First steps to add class that represents old API from v.0.x
agsh Oct 9, 2022
a8cebba
Merge pull request #246 from agsh/legacy_module_and_tests
agsh Oct 9, 2022
ff5809b
add `setSystemDateAndTime` method, reworked tests
agsh Oct 9, 2022
3e73366
Merge pull request #247 from agsh/add_set_datetime_method
agsh Oct 9, 2022
13d66f2
add `scopes`, `setSystemDateAndTime`, `getServiceCapabilities` methods
agsh Oct 9, 2022
8575c81
Merge pull request #248 from agsh/add_methods
agsh Oct 9, 2022
bcb4670
Add `getActiveSources`, `getSnapshotUri`, `getStreamUri` methods and …
agsh Oct 11, 2022
b979c12
Merge pull request #252 from agsh/get_media_methods
agsh Oct 11, 2022
70e56f8
Add `getActiveSources`, `getSnapshotUri`, `getStreamUri` methods and …
agsh Oct 12, 2022
8c57115
Merge pull request #253 from agsh/ptz_getNodes_method
agsh Oct 12, 2022
20f4031
Add `getConfigurationOptions`, `getConfigurations`, `getNodes` `syste…
agsh Oct 12, 2022
82acab0
Merge pull request #254 from agsh/common_tests_compliant
agsh Oct 12, 2022
f6ebe0f
Add `getPresets`, method
agsh Oct 13, 2022
e91de7f
Merge pull request #255 from agsh/ptz_getPresets_method
agsh Oct 13, 2022
92c3536
Add `gotoPreset`, `setPreset` methods
agsh Oct 15, 2022
73d3b67
Merge pull request #256 from agsh/preset_methods
agsh Oct 15, 2022
d0b7462
Add `setHomePosition`, `removePreset`, `gotoHomePosition`, `getStatus…
agsh Oct 16, 2022
684b9ee
Merge pull request #257 from agsh/ptz_methods
agsh Oct 16, 2022
a43c19c
Add `absoluteMove` method
agsh Oct 17, 2022
2b1b7da
Add `relativeMove`, `continuousMove` methods
agsh Oct 18, 2022
caecb8d
Add `stop` method
agsh Oct 18, 2022
5ce91cb
Merge pull request #258 from agsh/ptz_move_methods
agsh Oct 18, 2022
b4c2f8e
Device tests and `getNTP`, `getDNS` methods
agsh Oct 22, 2022
cb1205e
Merge pull request #261 from agsh/Device_get_methods
agsh Oct 22, 2022
d0216d1
`getNetworkInterfaces` method
agsh Oct 22, 2022
d5f8838
Merge pull request #262 from agsh/Device_get_methods
agsh Oct 22, 2022
7e4c31d
Add docs
agsh Oct 24, 2022
942745f
Merge pull request #265 from silqa/v1
agsh Oct 24, 2022
7b1f3af
Update README.md
silqa Oct 24, 2022
be57584
Merge pull request #266 from silqa/patch-3
agsh Oct 24, 2022
ffd1ca0
Add some tests
agsh Dec 20, 2022
9a9bf09
Merge branch 'master' into v1
agsh Jan 28, 2023
d83d4f9
Merge branch 'master' into v1
agsh Jan 28, 2023
452bcfa
Merge remote-tracking branch 'origin/master' into v1
agsh Mar 3, 2024
02b8fdd
feat: onvif.device.setNTP method
agsh Mar 3, 2024
79e7a6d
feat: update libraries
agsh Mar 4, 2024
1a192fd
feat: first step to generate ts interfaces from WSDL
agsh Mar 8, 2024
fac59e4
feat: first step to generate ts interfaces from WSDL
agsh Mar 10, 2024
aed6276
feat: first step to generate ts interfaces from WSDL
agsh Mar 10, 2024
6df0294
feat: first step to generate ts interfaces from WSDL
agsh Mar 10, 2024
5c17944
feat(onvif-interface-generator): fix all errors in common.xsd, onvif.xsd
agsh Mar 10, 2024
26d4bee
feat(onvif-interface-generator): eslint suppress multiple interface e…
agsh Mar 12, 2024
a8c79e0
feat(onvif-interface-generator): Refactor, some fixes
agsh Mar 15, 2024
85b5b92
feat(onvif-interface-generator): No duplicates in types, classes
agsh Mar 15, 2024
e336660
feat(onvif-interface-generator): No duplicates in types, classes
agsh Mar 22, 2024
78e5101
feat(onvif-interface-generator): Method interface generation
agsh Mar 24, 2024
b8c00eb
feat(onvif-interface-generator): Part of XSD and WSDL interfaces work
agsh May 17, 2024
2d13a75
Merge remote-tracking branch 'refs/remotes/origin/master' into v1
agsh Jun 26, 2024
48d5f43
chore: update paths and packages
agsh Jun 28, 2024
dc44d51
feat: add interfaces
agsh Jun 28, 2024
9afb415
feat: setNTP
agsh Jun 29, 2024
eb6065e
chore: cleanup interface generation code moved to https://github.com/…
agsh Jun 29, 2024
770b733
chore: suspend annoying github actions
agsh Jun 29, 2024
a3f87a6
feat: getNTP, getDNS
agsh Jun 29, 2024
5112757
feat: add options to create implicit array to linerase function
agsh Jun 29, 2024
5f34166
feat: getOSDs
agsh Jun 29, 2024
acd8055
feat: getOSDOptions
agsh Jun 29, 2024
1a0dea7
feat: getServices
agsh Jun 29, 2024
7f261f3
chore: frash docs
agsh Jun 29, 2024
9082777
chore: update interfaces
agsh Jun 29, 2024
869c311
feat: getCapabilities
agsh Jun 29, 2024
7de2d41
chore: onvif type improvements
agsh Jun 29, 2024
c42c8b6
chore: generated documentation
agsh Jun 29, 2024
867b898
chore: improve types
agsh Jun 29, 2024
e883a5d
feat: getServiceCapabilities
agsh Jun 30, 2024
238a9a5
feat: getVideoSources
agsh Jun 30, 2024
177c3db
chore: specs update
agsh Jun 30, 2024
5beeb18
feat: getVideoSourceConfigurations
agsh Jun 30, 2024
1c1a67d
feat: getVideoSourceConfigurationOptions
agsh Jun 30, 2024
9185a7f
feat: getVideoEncoderConfigurations
agsh Jun 30, 2024
5f1db14
chorus: update checklist and docs
agsh Aug 9, 2024
e171827
chorus: update checklist
agsh Aug 9, 2024
e6004d2
SetNTP is not working with DNS due to a missing schema version URL
momoAmch Oct 3, 2024
77a51f1
Merge pull request #333 from momoAmch/patch-2
RogerHardiman Oct 3, 2024
8db51d5
fix: add namespaces to `setNTP`
agsh Oct 25, 2024
937b7cc
feat: setVideoSourceConfiguration
agsh Oct 26, 2024
10d932f
chore: npm audit fix
agsh Oct 30, 2024
64f8ba4
feat: Digest Auth
agsh Oct 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
const commonRules = {
'no-console' : 'warn',
'comma-dangle' : [ 'error', 'always-multiline' ],
'import/extensions' : 0,
'import/no-cycle' : 0,
'quote-props' : 0,
'import/prefer-default-export' : 0,
'no-await-in-loop' : 0,
'no-restricted-syntax' : 0,
'max-classes-per-file' : 0,
'no-underscore-dangle' : 0,
'no-param-reassign' : 0,
'no-unused-expressions' : 0,
'no-unused-vars' : 'warn',
'no-case-declarations' : 0,
'no-shadow' : 0,
'brace-style' : ["error", "1tbs", { "allowSingleLine" : true }],
'lines-between-class-members' : 0,
'max-len' : ['warn', 200],
'class-methods-use-this' : 0,
'no-nested-ternary' : 0,
'no-use-before-define' : 0,
'key-spacing' : ['error', {
afterColon : true,
beforeColon : true,
align : {
beforeColon : true,
afterColon : true,
on : 'colon',
},
}],
'@typescript-eslint/member-delimiter-style' : 1,
'import/no-extraneous-dependencies' : 0,
// 'import/export' : 0
'object-curly-newline' : ['error', {multiline : true, consistent : true}],
};

module.exports = {
plugins : ['@typescript-eslint'],
extends : [
'airbnb-base',
'prettier',
],
env : {
node : true,
jest : true,
mocha : true,
},
rules : commonRules,

overrides : [
{
files : ['*.ts'],
extends : [
'airbnb-base',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
rules : {
...commonRules,

'@typescript-eslint/interface-name-prefix' : 0,
'@typescript-eslint/no-non-null-assertion' : 0,
'@typescript-eslint/no-explicit-any' : 0, // TRY: Remove this
'@typescript-eslint/ban-ts-ignore' : 0, // TRY: Remove this
},

settings : {
'import/extensions' : ['.ts'],
'import/parsers' : {
'@typescript-eslint/parser' : ['.ts'],
},
'import/resolver' : {
node : {
extensions : ['.ts', '.d.ts', '.js'],
},
},
},
},
],
};
78 changes: 0 additions & 78 deletions .eslintrc.json

This file was deleted.

4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ test.js
cam_tests
experiments
docs
.nyc_output
.vscode
build
.nyc_output/
4 changes: 2 additions & 2 deletions .mocharc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
'spec': 'test/*.js',
'exclude': 'test/serverMockup.js'
'spec': 'compatibilityTest/*.js',
'exclude': 'compatibilityTest/serverMockup.js'
};
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"singleQuote": true,
"semi": true,
"trailingComma": "all",
"arrowParens": "always",
"endOfLine": "lf",
"printWidth": 120
}
119 changes: 119 additions & 0 deletions CHECKED.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
ONVIF Interfaces

- [x] connect
- [x] _request
- [x] _requestPart2
- [x] getSystemDateAndTime
- [x] setSystemDateAndTime accepts SetSystemDateAndTimeOptions
- [x] getCapabilities Capabilities -> GetCapabilitiesResponse
- [x] getServiceCapabilities DeviceServiceCapabilities -> GetServiceCapabilitiesResponse
- [ ] getActiveSources
- [x] getServices includeCapability wrapped into object
- [ ] getDeviceInformation
- [ ] getHostname
- [ ] getScopes
- [ ] setScopes
- [ ] systemReboot
- [ ] setSystemFactoryDefault
- [x] _passwordDigest
- [x] _envelopeHeader
- [x] _envelopeFooter
- [x] _parseUrl
- [x] getNTP cam.device.getNTP
- [x] setNTP cam.device.setNTP
- [ ] getNetworkInterfaces
- [ ] setNetworkInterfaces
- [ ] getNetworkDefaultGateway
- [ ] setNetworkDefaultGateway
- [x] getDNS cam.device.getDNS
- [ ] setDNS
- [ ] getNetworkProtocols
- [ ] getUsers
- [ ] createUsers
- [ ] setUsers
- [ ] deleteUsers
- [ ] sendAuxiliaryCommand
- [ ] getEventProperties
- [ ] getEventServiceCapabilities
- [ ] subscribe
- [ ] createPullPointSubscription
- [ ] renew
- [ ] pullMessages
- [ ] unsubscribe
- [ ] _eventRequest
- [ ] _eventPull
- [ ] _restartEventRequest
- [x] parseEventXML
- [x] getVideoSources
- [x] getVideoSourceConfigurations
- [x] getVideoSourceConfigurationOptions new
- [ ] getVideoEncoderConfiguration
- [ ] getVideoEncoderConfigurationOptions
- [x] getVideoEncoderConfigurations
- [ ] setVideoEncoderConfiguration
- [ ] getAudioSources
- [ ] getAudioEncoderConfigurations
- [ ] getAudioEncoderConfiguration
- [ ] getAudioEncoderConfigurationOptions
- [ ] setAudioEncoderConfiguration
- [ ] getAudioSourceConfigurations
- [ ] getAudioOutputs
- [ ] getAudioOutputConfigurations
- [ ] addAudioEncoderConfiguration
- [ ] addAudioSourceConfiguration
- [ ] addVideoEncoderConfiguration
- [ ] addVideoSourceConfiguration
- [ ] removeAudioEncoderConfiguration
- [ ] removeAudioSourceConfiguration
- [ ] getProfiles
- [ ] createProfile
- [ ] deleteProfile
- [ ] getStreamUri
- [ ] getSnapshotUri
- [ ] setSynchronizationPoint
- [x] getOSDs cam.media.getOSDs (schema strict)
- [x] getOSDOptions cam.media.getOSDOptions (videoSourceConfigurationToken -> configurationToken)
- [ ] createOSD
- [ ] setOSD
- [ ] deleteOSD
- [ ] getMediaServiceCapabilities
- [ ] getPresets
- [ ] gotoPreset
- [ ] setPreset
- [ ] removePreset
- [ ] gotoHomePosition
- [ ] setHomePosition
- [ ] getStatus
- [ ] getNodes
- [ ] getConfigurations
- [ ] getConfigurationOptions
- [ ] relativeMove
- [ ] absoluteMove
- [ ] continuousMove
- [ ] stop
- [ ] _panTiltZoomVectors
- [ ] ptzSendAuxiliaryCommand
- [ ] getImagingSettings
- [ ] setImagingSettings
- [ ] getImagingServiceCapabilities
- [ ] getCurrentImagingPreset
- [ ] setCurrentImagingPreset
- [ ] getVideoSourceOptions
- [ ] imagingGetMoveOptions
- [ ] imagingGetStatus
- [ ] imagingMove
- [ ] imagingStop
- [ ] getRecordings
- [ ] getRecordingJobs
- [ ] createRecordingJob
- [ ] deleteRecordingJob
- [ ] getRecordingSummary
- [ ] getRecordingInformation
- [ ] getRecordingConfiguration
- [ ] getRecordingJobState
- [ ] getRecordingOptions
- [ ] getRecordingServiceCapabilities
- [ ] getTrackConfiguration
- [ ] getRecordingJobConfiguration
- [ ] setRecordingJobMode
- [ ] getReplayUri
Loading