Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

remote.it

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remote.it - npm Package Compare versions

Comparing version 0.2.1 to 0.3.0

coverage/lcov-report/remote.it.ts.html

4

coverage/coverage-final.json

@@ -1,3 +0,1 @@

{"/Users/dana/code/remote.it/remote.it.js/examples/example.ts": {"path":"/Users/dana/code/remote.it/remote.it.js/examples/example.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":-1}},"1":{"start":{"line":3,"column":11},"end":{"line":3,"column":0}},"2":{"start":{"line":4,"column":0},"end":{"line":null,"column":-1}}},"fnMap":{},"branchMap":{},"s":{"0":0,"1":0,"2":0},"f":{},"b":{}}
,"/Users/dana/code/remote.it/remote.it.js/src/remote.it.ts": {"path":"/Users/dana/code/remote.it/remote.it.js/src/remote.it.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":24}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":96}},"2":{"start":{"line":192,"column":17},"end":{"line":195,"column":1}},"3":{"start":{"line":197,"column":0},"end":{"line":446,"column":0}},"4":{"start":{"line":197,"column":30},"end":{"line":197,"column":50}},"5":{"start":{"line":198,"column":15},"end":{"line":198,"column":44}},"6":{"start":{"line":200,"column":10},"end":{"line":443,"column":3}},"7":{"start":{"line":206,"column":8},"end":{"line":224,"column":12}},"8":{"start":{"line":209,"column":39},"end":{"line":218,"column":14}},"9":{"start":{"line":221,"column":12},"end":{"line":221,"column":39}},"10":{"start":{"line":222,"column":12},"end":{"line":222,"column":33}},"11":{"start":{"line":223,"column":12},"end":{"line":223,"column":23}},"12":{"start":{"line":225,"column":35},"end":{"line":225,"column":63}},"13":{"start":{"line":227,"column":8},"end":{"line":238,"column":12}},"14":{"start":{"line":229,"column":24},"end":{"line":234,"column":12}},"15":{"start":{"line":236,"column":12},"end":{"line":236,"column":33}},"16":{"start":{"line":237,"column":12},"end":{"line":237,"column":23}},"17":{"start":{"line":244,"column":8},"end":{"line":246,"column":10}},"18":{"start":{"line":245,"column":10},"end":{"line":245,"column":30}},"19":{"start":{"line":251,"column":21},"end":{"line":251,"column":69}},"20":{"start":{"line":251,"column":51},"end":{"line":251,"column":68}},"21":{"start":{"line":254,"column":53},"end":{"line":254,"column":55}},"22":{"start":{"line":255,"column":8},"end":{"line":260,"column":10}},"23":{"start":{"line":256,"column":21},"end":{"line":256,"column":50}},"24":{"start":{"line":257,"column":10},"end":{"line":257,"column":38}},"25":{"start":{"line":257,"column":32},"end":{"line":257,"column":38}},"26":{"start":{"line":258,"column":10},"end":{"line":258,"column":44}},"27":{"start":{"line":259,"column":10},"end":{"line":259,"column":40}},"28":{"start":{"line":264,"column":36},"end":{"line":264,"column":81}},"29":{"start":{"line":267,"column":8},"end":{"line":306,"column":9}},"30":{"start":{"line":271,"column":21},"end":{"line":271,"column":27}},"31":{"start":{"line":271,"column":21},"end":{"line":271,"column":26}},"32":{"start":{"line":272,"column":14},"end":{"line":272,"column":33}},"33":{"start":{"line":272,"column":27},"end":{"line":272,"column":33}},"34":{"start":{"line":274,"column":14},"end":{"line":274,"column":42}},"35":{"start":{"line":276,"column":14},"end":{"line":303,"column":15}},"36":{"start":{"line":291,"column":36},"end":{"line":300,"column":20}},"37":{"start":{"line":309,"column":36},"end":{"line":312,"column":10}},"38":{"start":{"line":310,"column":45},"end":{"line":310,"column":52}},"39":{"start":{"line":310,"column":86},"end":{"line":310,"column":93}},"40":{"start":{"line":309,"column":14},"end":{"line":309,"column":32}},"41":{"start":{"line":313,"column":8},"end":{"line":313,"column":50}},"42":{"start":{"line":316,"column":8},"end":{"line":316,"column":73}},"43":{"start":{"line":316,"column":51},"end":{"line":316,"column":58}},"44":{"start":{"line":316,"column":65},"end":{"line":316,"column":72}},"45":{"start":{"line":317,"column":30},"end":{"line":317,"column":43}},"46":{"start":{"line":318,"column":8},"end":{"line":321,"column":10}},"47":{"start":{"line":323,"column":8},"end":{"line":326,"column":10}},"48":{"start":{"line":328,"column":8},"end":{"line":337,"column":10}},"49":{"start":{"line":333,"column":39},"end":{"line":333,"column":43}},"50":{"start":{"line":340,"column":18},"end":{"line":340,"column":73}},"51":{"start":{"line":340,"column":55},"end":{"line":340,"column":60}},"52":{"start":{"line":340,"column":67},"end":{"line":340,"column":72}},"53":{"start":{"line":346,"column":18},"end":{"line":346,"column":68}},"54":{"start":{"line":346,"column":52},"end":{"line":346,"column":56}},"55":{"start":{"line":346,"column":63},"end":{"line":346,"column":67}},"56":{"start":{"line":348,"column":34},"end":{"line":348,"column":73}},"57":{"start":{"line":349,"column":33},"end":{"line":349,"column":72}},"58":{"start":{"line":353,"column":8},"end":{"line":353,"column":102}},"59":{"start":{"line":353,"column":52},"end":{"line":353,"column":61}},"60":{"start":{"line":353,"column":68},"end":{"line":353,"column":101}},"61":{"start":{"line":355,"column":8},"end":{"line":363,"column":63}},"62":{"start":{"line":363,"column":19},"end":{"line":363,"column":27}},"63":{"start":{"line":363,"column":34},"end":{"line":363,"column":62}},"64":{"start":{"line":365,"column":8},"end":{"line":371,"column":63}},"65":{"start":{"line":371,"column":19},"end":{"line":371,"column":27}},"66":{"start":{"line":371,"column":34},"end":{"line":371,"column":62}},"67":{"start":{"line":373,"column":36},"end":{"line":373,"column":94}},"68":{"start":{"line":374,"column":44},"end":{"line":384,"column":8}},"69":{"start":{"line":401,"column":43},"end":{"line":401,"column":52}},"70":{"start":{"line":402,"column":6},"end":{"line":420,"column":46}},"71":{"start":{"line":421,"column":23},"end":{"line":421,"column":32}},"72":{"start":{"line":421,"column":37},"end":{"line":421,"column":65}},"73":{"start":{"line":422,"column":24},"end":{"line":422,"column":33}},"74":{"start":{"line":422,"column":38},"end":{"line":422,"column":67}},"75":{"start":{"line":423,"column":26},"end":{"line":423,"column":35}},"76":{"start":{"line":423,"column":40},"end":{"line":423,"column":71}},"77":{"start":{"line":424,"column":25},"end":{"line":424,"column":34}},"78":{"start":{"line":424,"column":39},"end":{"line":424,"column":69}},"79":{"start":{"line":431,"column":18},"end":{"line":431,"column":43}},"80":{"start":{"line":432,"column":6},"end":{"line":434,"column":7}},"81":{"start":{"line":433,"column":8},"end":{"line":433,"column":41}},"82":{"start":{"line":435,"column":6},"end":{"line":435,"column":22}},"83":{"start":{"line":438,"column":6},"end":{"line":440,"column":7}},"84":{"start":{"line":439,"column":8},"end":{"line":439,"column":50}},"85":{"start":{"line":441,"column":6},"end":{"line":441,"column":17}},"86":{"start":{"line":445,"column":2},"end":{"line":445,"column":11}},"87":{"start":{"line":197,"column":0},"end":{"line":446,"column":1}}},"fnMap":{"0":{"name":"setup","decl":{"start":{"line":197,"column":24},"end":{"line":197,"column":29}},"loc":{"start":{"line":197,"column":50},"end":{"line":446,"column":1}}},"1":{"name":"(anonymous_16)","decl":{"start":{"line":205,"column":13},"end":{"line":205,"column":13}},"loc":{"start":{"line":205,"column":48},"end":{"line":224,"column":12}}},"2":{"name":"(anonymous_17)","decl":{"start":{"line":209,"column":12},"end":{"line":209,"column":12}},"loc":{"start":{"line":209,"column":27},"end":{"line":218,"column":14}}},"3":{"name":"(anonymous_18)","decl":{"start":{"line":220,"column":16},"end":{"line":220,"column":15}},"loc":{"start":{"line":220,"column":20},"end":{"line":224,"column":11}}},"4":{"name":"(anonymous_19)","decl":{"start":{"line":225,"column":18},"end":{"line":225,"column":18}},"loc":{"start":{"line":225,"column":30},"end":{"line":225,"column":63}}},"5":{"name":"(anonymous_20)","decl":{"start":{"line":226,"column":21},"end":{"line":226,"column":21}},"loc":{"start":{"line":226,"column":56},"end":{"line":238,"column":12}}},"6":{"name":"(anonymous_21)","decl":{"start":{"line":229,"column":16},"end":{"line":229,"column":15}},"loc":{"start":{"line":229,"column":20},"end":{"line":234,"column":12}}},"7":{"name":"(anonymous_22)","decl":{"start":{"line":235,"column":16},"end":{"line":235,"column":15}},"loc":{"start":{"line":235,"column":20},"end":{"line":238,"column":11}}},"8":{"name":"(anonymous_23)","decl":{"start":{"line":243,"column":14},"end":{"line":243,"column":14}},"loc":{"start":{"line":243,"column":26},"end":{"line":246,"column":10}}},"9":{"name":"(anonymous_24)","decl":{"start":{"line":244,"column":46},"end":{"line":null,"column":-1}},"loc":{"start":{"line":244,"column":46},"end":{"line":246,"column":9}}},"10":{"name":"(anonymous_25)","decl":{"start":{"line":249,"column":13},"end":{"line":249,"column":13}},"loc":{"start":{"line":249,"column":80},"end":{"line":307,"column":7}}},"11":{"name":"(anonymous_26)","decl":{"start":{"line":251,"column":39},"end":{"line":251,"column":39}},"loc":{"start":{"line":251,"column":46},"end":{"line":251,"column":68}}},"12":{"name":"(anonymous_27)","decl":{"start":{"line":255,"column":24},"end":{"line":255,"column":23}},"loc":{"start":{"line":255,"column":25},"end":{"line":260,"column":9}}},"13":{"name":"(anonymous_28)","decl":{"start":{"line":270,"column":12},"end":{"line":270,"column":12}},"loc":{"start":{"line":270,"column":35},"end":{"line":304,"column":13}}},"14":{"name":"(anonymous_29)","decl":{"start":{"line":271,"column":21},"end":{"line":271,"column":26}},"loc":{"start":{"line":271,"column":21},"end":{"line":271,"column":26}}},"15":{"name":"(anonymous_30)","decl":{"start":{"line":291,"column":31},"end":{"line":291,"column":30}},"loc":{"start":{"line":291,"column":32},"end":{"line":300,"column":20}}},"16":{"name":"(anonymous_31)","decl":{"start":{"line":308,"column":11},"end":{"line":308,"column":20}},"loc":{"start":{"line":308,"column":11},"end":{"line":314,"column":7}}},"17":{"name":"(anonymous_34)","decl":{"start":{"line":310,"column":42},"end":{"line":310,"column":42}},"loc":{"start":{"line":310,"column":81},"end":{"line":310,"column":93}}},"18":{"name":"(anonymous_35)","decl":{"start":{"line":315,"column":16},"end":{"line":null,"column":-1}},"loc":{"start":{"line":315,"column":16},"end":{"line":316,"column":73}}},"19":{"name":"(anonymous_36)","decl":{"start":{"line":316,"column":48},"end":{"line":316,"column":48}},"loc":{"start":{"line":316,"column":60},"end":{"line":316,"column":72}}},"20":{"name":"(anonymous_37)","decl":{"start":{"line":317,"column":14},"end":{"line":317,"column":14}},"loc":{"start":{"line":317,"column":43},"end":{"line":321,"column":10}}},"21":{"name":"(anonymous_38)","decl":{"start":{"line":322,"column":14},"end":{"line":322,"column":14}},"loc":{"start":{"line":322,"column":44},"end":{"line":326,"column":10}}},"22":{"name":"(anonymous_39)","decl":{"start":{"line":327,"column":13},"end":{"line":327,"column":13}},"loc":{"start":{"line":327,"column":46},"end":{"line":337,"column":10}}},"23":{"name":"(anonymous_40)","decl":{"start":{"line":333,"column":34},"end":{"line":333,"column":33}},"loc":{"start":{"line":333,"column":35},"end":{"line":333,"column":43}}},"24":{"name":"(anonymous_41)","decl":{"start":{"line":340,"column":12},"end":{"line":340,"column":17}},"loc":{"start":{"line":340,"column":12},"end":{"line":340,"column":73}}},"25":{"name":"(anonymous_42)","decl":{"start":{"line":340,"column":52},"end":{"line":340,"column":52}},"loc":{"start":{"line":340,"column":62},"end":{"line":340,"column":72}}},"26":{"name":"(anonymous_43)","decl":{"start":{"line":346,"column":12},"end":{"line":346,"column":17}},"loc":{"start":{"line":346,"column":12},"end":{"line":346,"column":68}}},"27":{"name":"(anonymous_44)","decl":{"start":{"line":346,"column":49},"end":{"line":346,"column":49}},"loc":{"start":{"line":346,"column":58},"end":{"line":346,"column":67}}},"28":{"name":"(anonymous_45)","decl":{"start":{"line":348,"column":15},"end":{"line":348,"column":15}},"loc":{"start":{"line":348,"column":29},"end":{"line":348,"column":73}}},"29":{"name":"(anonymous_46)","decl":{"start":{"line":349,"column":14},"end":{"line":349,"column":14}},"loc":{"start":{"line":349,"column":28},"end":{"line":349,"column":72}}},"30":{"name":"(anonymous_47)","decl":{"start":{"line":352,"column":12},"end":{"line":null,"column":-1}},"loc":{"start":{"line":352,"column":12},"end":{"line":353,"column":102}}},"31":{"name":"(anonymous_48)","decl":{"start":{"line":353,"column":49},"end":{"line":353,"column":49}},"loc":{"start":{"line":353,"column":63},"end":{"line":353,"column":101}}},"32":{"name":"(anonymous_49)","decl":{"start":{"line":354,"column":14},"end":{"line":354,"column":14}},"loc":{"start":{"line":354,"column":32},"end":{"line":363,"column":63}}},"33":{"name":"(anonymous_50)","decl":{"start":{"line":363,"column":16},"end":{"line":363,"column":16}},"loc":{"start":{"line":363,"column":29},"end":{"line":363,"column":62}}},"34":{"name":"(anonymous_51)","decl":{"start":{"line":364,"column":14},"end":{"line":364,"column":14}},"loc":{"start":{"line":364,"column":35},"end":{"line":371,"column":63}}},"35":{"name":"(anonymous_52)","decl":{"start":{"line":371,"column":16},"end":{"line":371,"column":16}},"loc":{"start":{"line":371,"column":29},"end":{"line":371,"column":62}}},"36":{"name":"(anonymous_53)","decl":{"start":{"line":373,"column":15},"end":{"line":373,"column":15}},"loc":{"start":{"line":373,"column":31},"end":{"line":373,"column":94}}},"37":{"name":"(anonymous_54)","decl":{"start":{"line":374,"column":14},"end":{"line":374,"column":14}},"loc":{"start":{"line":374,"column":29},"end":{"line":384,"column":8}}},"38":{"name":"(anonymous_55)","decl":{"start":{"line":401,"column":13},"end":{"line":401,"column":13}},"loc":{"start":{"line":401,"column":52},"end":{"line":420,"column":46}}},"39":{"name":"(anonymous_56)","decl":{"start":{"line":421,"column":9},"end":{"line":421,"column":9}},"loc":{"start":{"line":421,"column":32},"end":{"line":421,"column":65}}},"40":{"name":"(anonymous_57)","decl":{"start":{"line":422,"column":10},"end":{"line":422,"column":10}},"loc":{"start":{"line":422,"column":33},"end":{"line":422,"column":67}}},"41":{"name":"(anonymous_58)","decl":{"start":{"line":423,"column":12},"end":{"line":423,"column":12}},"loc":{"start":{"line":423,"column":35},"end":{"line":423,"column":71}}},"42":{"name":"(anonymous_59)","decl":{"start":{"line":424,"column":11},"end":{"line":424,"column":11}},"loc":{"start":{"line":424,"column":34},"end":{"line":424,"column":69}}},"43":{"name":"(anonymous_60)","decl":{"start":{"line":431,"column":17},"end":{"line":431,"column":17}},"loc":{"start":{"line":431,"column":43},"end":{"line":436,"column":5}}},"44":{"name":"(anonymous_61)","decl":{"start":{"line":437,"column":18},"end":{"line":437,"column":18}},"loc":{"start":{"line":437,"column":62},"end":{"line":442,"column":5}}}},"branchMap":{"0":{"loc":{"start":{"line":197,"column":30},"end":{"line":197,"column":50}},"type":"if","locations":[{"start":{"line":197,"column":30},"end":{"line":197,"column":50}},{"start":{"line":197,"column":30},"end":{"line":197,"column":50}}]},"1":{"loc":{"start":{"line":216,"column":24},"end":{"line":216,"column":37}},"type":"binary-expr","locations":[{"start":{"line":216,"column":24},"end":{"line":216,"column":37}},{"start":{"line":216,"column":41},"end":{"line":216,"column":45}}]},"2":{"loc":{"start":{"line":257,"column":10},"end":{"line":257,"column":38}},"type":"if","locations":[{"start":{"line":257,"column":10},"end":{"line":257,"column":38}},{"start":{"line":257,"column":10},"end":{"line":257,"column":38}}]},"3":{"loc":{"start":{"line":257,"column":14},"end":{"line":257,"column":17}},"type":"binary-expr","locations":[{"start":{"line":257,"column":14},"end":{"line":257,"column":17}},{"start":{"line":257,"column":21},"end":{"line":257,"column":30}}]},"4":{"loc":{"start":{"line":272,"column":14},"end":{"line":272,"column":33}},"type":"if","locations":[{"start":{"line":272,"column":14},"end":{"line":272,"column":33}},{"start":{"line":272,"column":14},"end":{"line":272,"column":33}}]},"5":{"loc":{"start":{"line":317,"column":30},"end":{"line":317,"column":43}},"type":"if","locations":[{"start":{"line":317,"column":30},"end":{"line":317,"column":43}},{"start":{"line":317,"column":30},"end":{"line":317,"column":43}}]},"6":{"loc":{"start":{"line":376,"column":21},"end":{"line":376,"column":35}},"type":"binary-expr","locations":[{"start":{"line":376,"column":21},"end":{"line":376,"column":35}},{"start":{"line":376,"column":39},"end":{"line":376,"column":41}}]},"7":{"loc":{"start":{"line":381,"column":18},"end":{"line":381,"column":28}},"type":"binary-expr","locations":[{"start":{"line":381,"column":18},"end":{"line":381,"column":28}},{"start":{"line":381,"column":32},"end":{"line":381,"column":36}}]},"8":{"loc":{"start":{"line":401,"column":43},"end":{"line":401,"column":52}},"type":"if","locations":[{"start":{"line":401,"column":43},"end":{"line":401,"column":52}},{"start":{"line":401,"column":43},"end":{"line":401,"column":52}}]},"9":{"loc":{"start":{"line":421,"column":23},"end":{"line":421,"column":32}},"type":"if","locations":[{"start":{"line":421,"column":23},"end":{"line":421,"column":32}},{"start":{"line":421,"column":23},"end":{"line":421,"column":32}}]},"10":{"loc":{"start":{"line":422,"column":24},"end":{"line":422,"column":33}},"type":"if","locations":[{"start":{"line":422,"column":24},"end":{"line":422,"column":33}},{"start":{"line":422,"column":24},"end":{"line":422,"column":33}}]},"11":{"loc":{"start":{"line":423,"column":26},"end":{"line":423,"column":35}},"type":"if","locations":[{"start":{"line":423,"column":26},"end":{"line":423,"column":35}},{"start":{"line":423,"column":26},"end":{"line":423,"column":35}}]},"12":{"loc":{"start":{"line":424,"column":25},"end":{"line":424,"column":34}},"type":"if","locations":[{"start":{"line":424,"column":25},"end":{"line":424,"column":34}},{"start":{"line":424,"column":25},"end":{"line":424,"column":34}}]},"13":{"loc":{"start":{"line":431,"column":18},"end":{"line":431,"column":43}},"type":"if","locations":[{"start":{"line":431,"column":18},"end":{"line":431,"column":43}},{"start":{"line":431,"column":18},"end":{"line":431,"column":43}}]},"14":{"loc":{"start":{"line":432,"column":6},"end":{"line":434,"column":7}},"type":"if","locations":[{"start":{"line":432,"column":6},"end":{"line":434,"column":7}},{"start":{"line":432,"column":6},"end":{"line":434,"column":7}}]},"15":{"loc":{"start":{"line":432,"column":10},"end":{"line":432,"column":19}},"type":"binary-expr","locations":[{"start":{"line":432,"column":10},"end":{"line":432,"column":19}},{"start":{"line":432,"column":23},"end":{"line":432,"column":39}},{"start":{"line":432,"column":43},"end":{"line":432,"column":59}},{"start":{"line":432,"column":63},"end":{"line":432,"column":91}}]},"16":{"loc":{"start":{"line":438,"column":6},"end":{"line":440,"column":7}},"type":"if","locations":[{"start":{"line":438,"column":6},"end":{"line":440,"column":7}},{"start":{"line":438,"column":6},"end":{"line":440,"column":7}}]},"17":{"loc":{"start":{"line":438,"column":10},"end":{"line":438,"column":24}},"type":"binary-expr","locations":[{"start":{"line":438,"column":10},"end":{"line":438,"column":24}},{"start":{"line":438,"column":28},"end":{"line":438,"column":47}},{"start":{"line":438,"column":51},"end":{"line":438,"column":77}}]}},"s":{"0":1,"1":1,"2":1,"3":23,"4":41,"5":23,"6":23,"7":3,"8":3,"9":3,"10":3,"11":3,"12":1,"13":2,"14":2,"15":2,"16":2,"17":0,"18":0,"19":3,"20":15,"21":3,"22":3,"23":11,"24":11,"25":0,"26":11,"27":11,"28":3,"29":3,"30":5,"31":11,"32":5,"33":1,"34":4,"35":4,"36":6,"37":1,"38":1,"39":1,"40":1,"41":1,"42":1,"43":1,"44":1,"45":0,"46":0,"47":1,"48":1,"49":1,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":1,"59":1,"60":1,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":1,"69":16,"70":12,"71":6,"72":3,"73":5,"74":5,"75":0,"76":0,"77":0,"78":0,"79":13,"80":11,"81":1,"82":10,"83":4,"84":3,"85":4,"86":23,"87":1},"f":{"0":23,"1":3,"2":3,"3":3,"4":1,"5":2,"6":2,"7":2,"8":0,"9":0,"10":3,"11":15,"12":11,"13":5,"14":11,"15":6,"16":1,"17":1,"18":1,"19":1,"20":0,"21":1,"22":1,"23":1,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":1,"31":1,"32":0,"33":0,"34":0,"35":0,"36":0,"37":1,"38":12,"39":3,"40":5,"41":0,"42":0,"43":11,"44":4},"b":{"0":[18,5],"1":[3,0],"2":[0,11],"3":[11,11],"4":[1,4],"5":[0,0],"6":[1,0],"7":[1,0],"8":[4,8],"9":[3,0],"10":[0,5],"11":[0,0],"12":[0,0],"13":[2,9],"14":[1,10],"15":[11,9,6,1],"16":[3,1],"17":[4,3,3]}}
}
{}

@@ -0,1 +1,98 @@

export default function setup(config?: IConfig): {
user: {
login: (username: string, password: string) => Promise<IUser>;
checkToken: (tok: string) => Promise<any>;
authHashLogin: (username: string, authhash: string) => Promise<{
id: any;
email: any;
username: any;
token: any;
}>;
language: {
get: () => Promise<any>;
set: (language: string) => Promise<string>;
};
logout: (tok: string) => Promise<void>;
};
devices: {
group: (devices: IRawDevice[], metadata: {
[index: string]: IRawMetadata;
}) => IDevice[];
all: () => Promise<IDevice[]>;
metadata: () => Promise<{
[key: string]: IRawMetadata;
}>;
search: (query: string, state?: string) => Promise<any>;
rename: (address: string, name: string) => Promise<any>;
share: (devices: any[], emails: string[]) => Promise<any>;
};
scripts: {
list: () => Promise<any>;
};
jobs: {
list: () => Promise<any>;
destroy: (jobid: string) => Promise<any>;
cancel: (jobid: string) => Promise<any>;
};
contacts: {
list: () => Promise<IContact[]>;
create: (contact: IContact) => Promise<IContact>;
invite: (contact: IRawContact) => Promise<IContact>;
destroy: (contact: string) => Promise<any>;
format: (c: IRawContact) => IContact;
};
products: {
_process: (product: IRawProduct) => IProduct;
list: () => Promise<IProduct[]>;
platforms: () => Promise<IPlatform[]>;
create: (product: IProduct) => Promise<IProduct>;
};
request: (method: string, url: string, data?: {}) => Promise<any>;
get: (url: string, data?: {}) => Promise<any>;
post: (url: string, data?: {}) => Promise<any>;
delete: (url: string, data?: {}) => Promise<any>;
patch: (url: string, data?: {}) => Promise<any>;
processData: (resp?: {
data?: any;
}) => any;
processError: (error: {
response?: any;
message?: string | undefined;
}) => never;
accessKey?: string | undefined;
apiURL: string;
apiKey?: string | undefined;
authHash?: string | undefined;
developerKey?: string | undefined;
successURL: string;
token?: string | undefined;
};
export interface IRawPlatform {
code: string;
name: string;
}
export interface IPlatform {
code: string;
name: string;
}
export declare type ProductScope = 'Private' | 'Public' | 'Unlisted';
export declare type ProductStatus = 'New' | 'Locked';
export interface IRawProduct {
id: string;
name: string;
platform: string;
scope: ProductScope;
status: ProductStatus;
updated: string;
created: string;
}
export interface IProduct {
id?: string;
name: string;
platform: number;
scope: ProductScope;
status?: ProductStatus;
updatedAt?: Date;
createdAt?: Date;
}
export interface IRawUser {

@@ -136,60 +233,1 @@ R3_commercial_cost: number;

}
export default function setup(config?: IConfig): {
user: {
login: (username: string, password: string) => Promise<IUser>;
checkToken: (tok: string) => Promise<any>;
authHashLogin: (username: string, authhash: string) => Promise<{
id: any;
email: any;
username: any;
token: any;
}>;
logout: (tok: string) => Promise<void>;
};
devices: {
group: (devices: IRawDevice[], metadata: {
[index: string]: IRawMetadata;
}) => IDevice[];
all: () => Promise<IDevice[]>;
metadata: () => Promise<{
[key: string]: IRawMetadata;
}>;
search: (query: string, state?: string) => Promise<any>;
rename: (address: string, name: string) => Promise<any>;
share: (devices: any[], emails: string[]) => Promise<any>;
};
scripts: {
list: () => Promise<any>;
};
jobs: {
list: () => Promise<any>;
destroy: (jobid: string) => Promise<any>;
cancel: (jobid: string) => Promise<any>;
};
contacts: {
list: () => Promise<IContact[]>;
create: (contact: IContact) => Promise<IContact>;
invite: (contact: IRawContact) => Promise<IContact>;
destroy: (contact: string) => Promise<any>;
format: (c: IRawContact) => IContact;
};
request: (method: string, url: string, data?: {}) => Promise<any>;
get: (url: string, data?: {}) => Promise<any>;
post: (url: string, data?: {}) => Promise<any>;
delete: (url: string, data?: {}) => Promise<any>;
patch: (url: string, data?: {}) => Promise<any>;
processData: (resp?: {
data?: any;
}) => any;
processError: (error: {
response?: any;
message?: string | undefined;
}) => never;
accessKey?: string | undefined;
apiURL: string;
apiKey?: string | undefined;
authHash?: string | undefined;
developerKey?: string | undefined;
successURL: string;
token?: string | undefined;
};

@@ -54,43 +54,2 @@ "use strict";

var lodash_1 = require("lodash");
// interface IRawEntity {
// id: string
// name: string
// mine: number
// friends: number
// active: number
// registered: number
// preregistered: number
// updated: string
// children?: IRawEntity[]
// "children": [
// {
// "entity_id": "8C219AE5-3076-3F89-173B-5025B5325261",
// "parentid": "AF6B1EA4-E8CD-9932-54E6-329BF0E96DCF",
// "name": "Provider A",
// "type": "business",
// "users": [
// {
// "email": "mike@mycal.net",
// "role": "admin_registrant",
// "active": "10",
// "mine": "10",
// "friends": "19",
// "preregistered": "2",
// "registered": "1",
// "updated": "2018-09-20 16:14:46"
// }
// ]
// },
// }
// interface IEntity {
// id: string
// name: string
// mine: number
// friends: number
// active: number
// registered: number
// preregistered: number
// updated: Date
// children?: IEntity[]
// }
var defaults = {

@@ -139,6 +98,6 @@ apiURL: 'https://api.remot3.it/apv/v26',

},
// language: {
// get: true,
// set: true, // { language: 'en/ja' }
// },
language: {
get: function () { return r3.get('/user/language/').then(function (user) { return user.language; }); },
set: function (language) { return r3.post('/user/language/', { language: language }).then(function () { return language; }); },
},
logout: function (tok) {

@@ -304,2 +263,36 @@ return r3.post('/user/logout', { tok: tok }).then(function () {

}); },
}, products: {
_process: function (product) { return ({
id: product.id,
name: product.name,
platform: parseInt(product.platform),
scope: product.scope,
status: product.status,
updatedAt: new Date(product.updated),
createdAt: new Date(product.created),
}); },
list: function () {
return r3.get('/developer/product/list/mine/').then(function (_a) {
var products = _a.products;
return products.map(r3.products._process);
});
},
platforms: function () {
return r3.get('/project/supported/types/').then(function (_a) {
var types = _a.types;
return types;
});
},
create: function (product) {
return r3
.post('/developer/product/', {
name: product.name,
platform: String(product.platform),
scope: product.scope,
})
.then(function (_a) {
var product = _a.product;
return r3.products._process(product);
});
},
},

@@ -309,5 +302,2 @@ // files: {

// },
// products: {
// list: () => [],
// },
// registrations: {

@@ -370,2 +360,43 @@ // list: () => [],

exports.default = setup;
// interface IRawEntity {
// id: string
// name: string
// mine: number
// friends: number
// active: number
// registered: number
// preregistered: number
// updated: string
// children?: IRawEntity[]
// "children": [
// {
// "entity_id": "8C219AE5-3076-3F89-173B-5025B5325261",
// "parentid": "AF6B1EA4-E8CD-9932-54E6-329BF0E96DCF",
// "name": "Provider A",
// "type": "business",
// "users": [
// {
// "email": "mike@mycal.net",
// "role": "admin_registrant",
// "active": "10",
// "mine": "10",
// "friends": "19",
// "preregistered": "2",
// "registered": "1",
// "updated": "2018-09-20 16:14:46"
// }
// ]
// },
// }
// interface IEntity {
// id: string
// name: string
// mine: number
// friends: number
// active: number
// registered: number
// preregistered: number
// updated: Date
// children?: IEntity[]
// }
//# sourceMappingURL=remote.it.js.map

@@ -463,2 +463,44 @@ "use strict";

}); });
describe('.language', function () {
describe('.get', function () {
test('should return the language as a string', function () { return __awaiter(_this, void 0, void 0, function () {
var r3, user, resp;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
r3 = remote_it_1.default();
jest.spyOn(r3, 'get');
user = { status: 'true', language: 'en' };
axios.request.mockResolvedValueOnce({ data: user });
return [4 /*yield*/, r3.user.language.get()];
case 1:
resp = _a.sent();
expect(r3.get).toBeCalledWith("/user/language/");
expect(resp).toEqual('en');
return [2 /*return*/];
}
});
}); });
});
describe('.set', function () {
test('should set the language and return it as a string', function () { return __awaiter(_this, void 0, void 0, function () {
var r3, user, resp;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
r3 = remote_it_1.default();
jest.spyOn(r3, 'post');
user = { language: 'ja' };
axios.request.mockResolvedValueOnce({ data: 'ok' });
return [4 /*yield*/, r3.user.language.set('ja')];
case 1:
resp = _a.sent();
expect(r3.post).toBeCalledWith("/user/language/", user);
expect(resp).toEqual('ja');
return [2 /*return*/];
}
});
}); });
});
});
});

@@ -465,0 +507,0 @@ describe('r3.contacts', function () {

{
"name": "remote.it",
"version": "0.2.1",
"version": "0.3.0",
"description": "remote.it JavaScript/node client library",

@@ -5,0 +5,0 @@ "main": "dist/remote.it.js",

@@ -28,3 +28,3 @@ # remote.it client

// Log the user in and set their `token` and `authHash`
r3.user.login('username', 'password')
await r3.user.login('username', 'password')

@@ -31,0 +31,0 @@ // Get all devices for the given user

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc