buttplug 3.0.0 → 3.1.0

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.
Files changed (103) hide show
  1. package/.eslintrc.js +20 -20
  2. package/.github/workflows/docs.yaml +29 -0
  3. package/CHANGELOG.md +16 -0
  4. package/README.md +67 -1
  5. package/dist/main/src/client/ButtplugBrowserWebsocketClientConnector.d.ts +0 -3
  6. package/dist/main/src/client/ButtplugBrowserWebsocketClientConnector.js +4 -6
  7. package/dist/main/src/client/ButtplugBrowserWebsocketClientConnector.js.map +1 -1
  8. package/dist/main/src/client/ButtplugNodeWebsocketClientConnector.d.ts +19 -0
  9. package/dist/main/src/client/ButtplugNodeWebsocketClientConnector.js +22 -0
  10. package/dist/main/src/client/ButtplugNodeWebsocketClientConnector.js.map +1 -0
  11. package/dist/main/src/core/MessageUtils.js +15 -8
  12. package/dist/main/src/core/MessageUtils.js.map +1 -1
  13. package/dist/main/src/core/Messages.d.ts +24 -9
  14. package/dist/main/src/core/Messages.js +26 -10
  15. package/dist/main/src/core/Messages.js.map +1 -1
  16. package/dist/main/src/index.d.ts +1 -0
  17. package/dist/main/src/index.js +1 -0
  18. package/dist/main/src/index.js.map +1 -1
  19. package/dist/main/src/utils/ButtplugBrowserWebsocketConnector.d.ts +2 -0
  20. package/dist/main/src/utils/ButtplugBrowserWebsocketConnector.js +6 -2
  21. package/dist/main/src/utils/ButtplugBrowserWebsocketConnector.js.map +1 -1
  22. package/dist/web/buttplug.js +413 -27
  23. package/dist/web/buttplug.min.js +1 -1
  24. package/dist/web/buttplug.min.js.map +1 -1
  25. package/doc/.nojekyll +1 -0
  26. package/doc/assets/highlight.css +22 -0
  27. package/doc/assets/main.js +58 -0
  28. package/doc/assets/search.js +1 -0
  29. package/doc/assets/style.css +1280 -0
  30. package/doc/classes/ButtplugBrowserWebsocketClientConnector.html +234 -0
  31. package/doc/classes/ButtplugClient.html +331 -0
  32. package/doc/classes/ButtplugClientConnectorException.html +216 -0
  33. package/doc/classes/ButtplugClientDevice.html +489 -0
  34. package/doc/classes/ButtplugDeviceError.html +218 -0
  35. package/doc/classes/ButtplugDeviceMessage.html +165 -0
  36. package/doc/classes/ButtplugError.html +220 -0
  37. package/doc/classes/ButtplugInitError.html +218 -0
  38. package/doc/classes/ButtplugLogger.html +288 -0
  39. package/doc/classes/ButtplugMessage.html +147 -0
  40. package/doc/classes/ButtplugMessageError.html +218 -0
  41. package/doc/classes/ButtplugMessageSorter.html +128 -0
  42. package/doc/classes/ButtplugNodeWebsocketClientConnector.html +239 -0
  43. package/doc/classes/ButtplugPingError.html +218 -0
  44. package/doc/classes/ButtplugSystemMessage.html +150 -0
  45. package/doc/classes/ButtplugUnknownError.html +218 -0
  46. package/doc/classes/DeviceAdded.html +186 -0
  47. package/doc/classes/DeviceInfo.html +114 -0
  48. package/doc/classes/DeviceList.html +160 -0
  49. package/doc/classes/DeviceRemoved.html +158 -0
  50. package/doc/classes/Error.html +179 -0
  51. package/doc/classes/GenericDeviceMessageAttributes.html +107 -0
  52. package/doc/classes/GenericMessageSubcommand.html +90 -0
  53. package/doc/classes/LinearCmd.html +187 -0
  54. package/doc/classes/LogMessage.html +134 -0
  55. package/doc/classes/MessageAttributes.html +160 -0
  56. package/doc/classes/Ok.html +151 -0
  57. package/doc/classes/Ping.html +151 -0
  58. package/doc/classes/RawDeviceMessageAttributes.html +86 -0
  59. package/doc/classes/RawReadCmd.html +188 -0
  60. package/doc/classes/RawReading.html +179 -0
  61. package/doc/classes/RawSubscribeCmd.html +170 -0
  62. package/doc/classes/RawUnsubscribeCmd.html +170 -0
  63. package/doc/classes/RawWriteCmd.html +188 -0
  64. package/doc/classes/RequestDeviceList.html +151 -0
  65. package/doc/classes/RequestServerInfo.html +169 -0
  66. package/doc/classes/RotateCmd.html +187 -0
  67. package/doc/classes/RotateSubcommand.html +108 -0
  68. package/doc/classes/ScalarCmd.html +170 -0
  69. package/doc/classes/ScalarSubcommand.html +108 -0
  70. package/doc/classes/ScanningFinished.html +146 -0
  71. package/doc/classes/SensorDeviceMessageAttributes.html +107 -0
  72. package/doc/classes/SensorReadCmd.html +179 -0
  73. package/doc/classes/SensorReading.html +188 -0
  74. package/doc/classes/ServerInfo.html +178 -0
  75. package/doc/classes/StartScanning.html +151 -0
  76. package/doc/classes/StopAllDevices.html +151 -0
  77. package/doc/classes/StopDeviceCmd.html +161 -0
  78. package/doc/classes/StopScanning.html +151 -0
  79. package/doc/classes/VectorSubcommand.html +108 -0
  80. package/doc/enums/ActuatorType.html +104 -0
  81. package/doc/enums/ButtplugLogLevel.html +97 -0
  82. package/doc/enums/ErrorClass.html +90 -0
  83. package/doc/enums/SensorType.html +90 -0
  84. package/doc/functions/FromJSON.html +113 -0
  85. package/doc/index.html +184 -0
  86. package/doc/interfaces/IButtplugClientConnector.html +137 -0
  87. package/doc/modules.html +176 -0
  88. package/doc/variables/DEFAULT_MESSAGE_ID.html +104 -0
  89. package/doc/variables/MAX_ID.html +104 -0
  90. package/doc/variables/MESSAGE_SPEC_VERSION.html +104 -0
  91. package/doc/variables/SYSTEM_MESSAGE_ID.html +104 -0
  92. package/package.json +23 -21
  93. package/src/client/ButtplugBrowserWebsocketClientConnector.ts +1 -10
  94. package/src/client/ButtplugNodeWebsocketClientConnector.ts +19 -0
  95. package/src/core/MessageUtils.ts +21 -11
  96. package/src/core/Messages.ts +51 -10
  97. package/src/index.ts +1 -0
  98. package/src/utils/ButtplugBrowserWebsocketConnector.ts +4 -2
  99. package/typedocconfig.js +6 -0
  100. package/CODE_OF_CONDUCT.md +0 -166
  101. package/CONTRIBUTING.md +0 -169
  102. package/dist/web/index.html +0 -10
  103. package/typedoc.js +0 -9
@@ -1,166 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our
7
- project and our community a harassment-free experience for everyone,
8
- regardless of age (see addendum), body size, disability, ethnicity,
9
- gender identity and expression, level of experience, nationality,
10
- personal appearance, race, religion, or sexual identity and
11
- orientation.
12
-
13
- ## Our Standards
14
-
15
- Examples of behavior that contributes to creating a positive
16
- environment include:
17
-
18
- * Using welcoming and inclusive language
19
- * Being respectful of differing viewpoints and experiences
20
- * Gracefully accepting constructive criticism
21
- * Focusing on what is best for the community
22
- * Showing empathy towards other community members
23
-
24
- Examples of unacceptable behavior by participants include:
25
-
26
- * The use of unnecessary sexualized language or imagery and unwelcome
27
- sexual attention or advances
28
- * Trolling, insulting/derogatory comments, and personal or political
29
- attacks
30
- * Public or private harassment
31
- * Publishing others' private information, such as a physical or
32
- electronic address, without explicit permission
33
- * Other conduct which could reasonably be considered inappropriate in
34
- a professional setting
35
-
36
- ## Our Responsibilities
37
-
38
- Project maintainers are responsible for clarifying the standards of
39
- acceptable behavior and are expected to take appropriate and fair
40
- corrective action in response to any instances of unacceptable
41
- behavior.
42
-
43
- Project maintainers have the right and responsibility to remove, edit,
44
- or reject comments, commits, code, wiki edits, issues, and other
45
- contributions that are not aligned to this Code of Conduct, or to ban
46
- temporarily or permanently any contributor for other behaviors that
47
- they deem inappropriate, threatening, offensive, or harmful.
48
-
49
- ## Scope
50
-
51
- This Code of Conduct applies both within project spaces and in public
52
- spaces when an individual is representing the project or its
53
- community. Examples of representing a project or community include
54
- using an official project e-mail address, posting via an official
55
- social media account, or acting as an appointed representative at an
56
- online or offline event. Representation of a project may be further
57
- defined and clarified by project maintainers.
58
-
59
- ## Enforcement
60
-
61
- Instances of abusive, harassing, or otherwise unacceptable behavior
62
- May be reported by contacting the project team at
63
- admin@metafetish.com. All complaints will be reviewed and investigated
64
- and will result in a response that is deemed necessary and appropriate
65
- to the circumstances. The project team is obligated to maintain
66
- confidentiality with regard to the reporter of an incident. Further
67
- details of specific enforcement policies may be posted separately.
68
-
69
- Project maintainers who do not follow or enforce the Code of Conduct
70
- in good faith may face temporary or permanent repercussions as
71
- determined by other members of the project's leadership.
72
-
73
- ## Addendum for Metafetish Related Projects
74
-
75
- While the project team seeks to welcome all contributors and
76
- participants, due to the sexual nature of projects related to the
77
- Metafetish organization, all contributors and participants should be
78
- of provable legal age.
79
-
80
- Working on projects related to the Metafetish organization may at
81
- times require sexual situations to be discussed in project forums, be
82
- they message boards, social media, chat systems, or other means not
83
- listed here. These discussions should pertain only to usage of the
84
- projects they involve, and should only include required details to
85
- express some sort of issue or feature request. If the discussion
86
- includes material that others may find objectionable for some reason,
87
- the discussions should be prepended with content warnings.
88
-
89
- While usage stories about projects are appreciated, unless they
90
- express some issue with specific usage, we ask that they be kept to
91
- outside forums, where they would be appropriate. There are many
92
- sub-reddits, fetlife groups, and forum instances available for a
93
- multitude of interests where usage can be discussed. If a proper venue
94
- is not known, please contact project maintainers, as they may be able
95
- to point to one.
96
-
97
- If any contributor or project member feels that these considerations
98
- have not been met, they should contact the project maintainers at
99
- admin@metafetish.com.
100
-
101
- # Moderation
102
-
103
- These are the policies for upholding our community's standards of
104
- conduct. If you feel that a thread needs moderation, please contact
105
- the [Metafetish moderation team](mailto:admin@metafetish.com).
106
-
107
- 1. Remarks that violate the standard of conduct, including hateful,
108
- hurtful, oppressive, or exclusionary remarks, are not allowed.
109
- (Cursing is allowed, but never targeting another user, and never in
110
- a hateful manner.)
111
- 2. Remarks that moderators find inappropriate, whether listed in the
112
- code of conduct or not, are also not allowed.
113
- 3. Moderators will first respond to such remarks with a warning.
114
- 4. If the warning is unheeded, the user will be "kicked," i.e., kicked
115
- out of the communication channel to cool off.
116
- 5. If the user comes back and continues to make trouble, they will be
117
- banned, i.e., indefinitely excluded.
118
- 6. Moderators may choose at their discretion to un-ban the user if it
119
- was a first offense and they offer the offended party a genuine
120
- apology.
121
- 7. If a moderator bans someone and you think it was unjustified,
122
- please take it up with that moderator, or with a different
123
- moderator, **in private**. Complaints about bans in-channel are not
124
- allowed.
125
- 8. Moderators are held to a higher standard than other community
126
- members. If a moderator creates an inappropriate situation, they
127
- should expect less leeway than others.
128
-
129
- In this community we strive to go the extra step to look out for each
130
- other. Don't just aim to be technically unimpeachable, try to be your
131
- best self. In particular, avoid flirting with offensive or sensitive
132
- issues, particularly if they're off-topic; this all too often leads to
133
- unnecessary fights, hurt feelings, and damaged trust; worse, it can
134
- drive people away from the community entirely.
135
-
136
- And if someone takes issue with something you said or did, resist the
137
- urge to be defensive. Just stop doing what it was they complained
138
- about and apologize. Even if you feel you were misinterpreted or
139
- unfairly accused, chances are good there was something you could've
140
- communicated better — remember that it's your responsibility to make
141
- your fellow community members comfortable. Everyone wants to get along
142
- and we are all here first and foremost because we want to talk about
143
- cool technology. You will find that people will be eager to assume
144
- good intent and forgive as long as you earn their trust.
145
-
146
- The enforcement policies listed above apply to all official Metafetish
147
- venues; including all Slack channels and their related bridged IRC
148
- channels, repositories and their respective issue trackers/wikis/etc,
149
- message boards, and social media networks. For other projects adopting
150
- this Code of Conduct, please contact the maintainers of those projects
151
- for enforcement. If you wish to use this code of conduct for your own
152
- project, consider explicitly mentioning your moderation policy or
153
- making a copy with your own moderation policy so as to avoid
154
- confusion.
155
-
156
- # Attribution
157
-
158
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
159
- available at [http://contributor-covenant.org/version/1/4][version]
160
-
161
- [homepage]: http://contributor-covenant.org
162
- [version]: http://contributor-covenant.org/version/1/4/
163
-
164
- The Moderation portion of this Code of Conduct is adapted from
165
- the
166
- [Rust Language Code of Conduct](https://www.rust-lang.org/en-US/conduct.html).
package/CONTRIBUTING.md DELETED
@@ -1,169 +0,0 @@
1
- # Contributing
2
-
3
- Thanks for your interest in contributing to the Metafetish
4
- Organization repo! We're looking forward to working with you to make
5
- this project better.
6
-
7
- ## Code Of Conduct
8
-
9
- First off, you'll want to check out our [Code of Conduct](CODE_OF_CONDUCT.md), which
10
- should be alongside this document. It outlines the rules and
11
- expectations for interaction with our project.
12
-
13
- ## For All Community
14
-
15
- This section contains information for everyone involved with the
16
- projects, whether developing or simply interested in using and
17
- recommending improvements.
18
-
19
- ### Communication
20
-
21
- There are a couple of different ways in which you can interact with
22
- other members of Metafetish projects.
23
-
24
- - [We have a Slack instance](https://metafetish.slack.com). Note that an invitation is required
25
- to join the slack instance. Please email admin@metafetish.com for an
26
- invite, and include the email address you'd like to use to log in.
27
- - [We have message boards](http://metafetish.club). We have Discourse forums available that
28
- cover most of our projects. For anything that doesn't fit into one
29
- of the categories, there's the General forum.
30
-
31
- ### Anonymous Accounts
32
-
33
- Due to the sensitive nature of Metafetish projects, some community
34
- members prefer to use anonymous accounts, on message boards as well as
35
- for contributing to code repos. We understand the need for this, and
36
- try to be as accepting of that as possible without letting it
37
- interfere with project progress.
38
-
39
- Note that vetting by project leads will still need to occur before
40
- administration rights after given to any account on a project resource
41
- (forums, repos, etc), anonymous or otherwise.
42
-
43
- ### Filing feature requests
44
-
45
- If there are features you'd like in a project, you may request them by:
46
-
47
- - If you have a github account, filing a github issue on the project.
48
- - Otherwise, make a post on the message board in the appropriate
49
- category, or on the General category if a proper category does not
50
- exist.
51
-
52
- Please be specific in your feature request. We will ask followup
53
- questions for clarification, but the more information we have, the
54
- better.
55
-
56
- ### Filing bug reports
57
-
58
- If you find a problem in a project, please do not hesitate to tell us.
59
-
60
- - If you find a security bug, please email [admin@metafetish.com](mailto:admin@metafetish.com)
61
- immediately, and we will work with you to resolve it and get the
62
- information out to the community ASAP.
63
- - For all other bugs:
64
- - If you have a github account, filing a github issue on the project.
65
- - Otherwise, make a post on the message board in the appropriate
66
- category, or on the General category if a proper category does not
67
- exist.
68
-
69
- In the issue or post, you should let us know:
70
-
71
- - The software you are using that has the bug
72
- - The version of the software
73
- - The operating system version of the computer you using the software
74
- on.
75
- - The steps you took to get to the problem.
76
- - Whether the problem is repeatable.
77
-
78
- Someone should hopefully follow up on your problem soon.
79
-
80
- ## For Developer Community
81
-
82
- This section contains information mainly related to helping in
83
- development of Metafetish projects.
84
-
85
- ### Getting up and running on a project
86
-
87
- In many cases, if you are trying to start developing a new project,
88
- information about compiling and using the project will be in the
89
- README. If these instructions are missing or incomplete, you can ask
90
- in the [proper category on the message boards]( http://metafetish.club), or file an issue on
91
- the project if you have a github account. You can also contact us on
92
- Slack if you have an account there.
93
-
94
- Note that some of our projects are rather complicated, and span
95
- multiple repositories and/or technologies. We do our best to keep
96
- things up to date, but there may be times where we've missed updating
97
- documentation. If something seems wrong, or isn't working for you, ask
98
- us using one of the above methods.
99
-
100
- ### Continuous Integration
101
-
102
- In as many cases as possible, we have added continuous integration
103
- services to run build checks on our software projects. These will
104
- normally be [Travis](http://travis-ci.org) for macOS and linux builds (or platform
105
- independent builds, like Node with no native requirements),
106
- and [Appveyor](http://appveyor.com) for Windows builds. CI Badges are usually added to
107
- the README.
108
-
109
- ### Git/Github Workflow
110
-
111
- This section goes over our git workflow. We realize that git can be
112
- quite complicated and has a steep learning curve. We have done as much
113
- as we can to make sure Github makes this easy for contributors. If you
114
- are new to git, or if you do not understand some part of this section,
115
- please let us know when you make a pull request, and we'll help out.
116
- If you are not sure how to make a pull request on github,
117
- contact [admin@metafetish.com](mailto:admin@metafetish.com) and a project lead will help.
118
-
119
- As of this writing, Metafetish projects are maintained on
120
- the [Metafetish Organization on Github](http://github.com/metafetish). 'master' branches on
121
- Metafetish projects are kept as [Github protected branches](https://help.github.com/articles/about-protected-branches/), with
122
- the following settings.
123
-
124
- - All of the following rules apply to both users and administrators.
125
- - No direct pushes to 'master'. All changes must be via Pull Request
126
- (PR).
127
- - No force pushes to 'master'. All rewrites must be done on feature
128
- branches.
129
- - PRs must be off the end of the 'master' branch to merge to master.
130
- Github will enforce this in PRs.
131
- - PRs must pass CI to merge. Due to the hardware focus of many
132
- Metafetish projects, tests may be difficult to write in languages
133
- without proper mocking utilities. Therefore, Code Coverage increase
134
- is nice, but not required.
135
- - PRs should have a reviewer if possible, but this is not enforced.
136
-
137
- Metafetish organization projects maintain a 'rebase-only' workflow to
138
- master when possible, where all branches will be a fast-forward merge.
139
- Github PRs should manage this themselves, and will display an error if
140
- this is not possible. Project management will be happy to work with
141
- you to resolve the issue.
142
-
143
- In order to reduce workload of contributors, repo dependencies should
144
- be brought in by using the [git subtree method](https://developer.atlassian.com/blog/2015/05/the-power-of-git-subtree/) instead of git
145
- submodules. As this will require upkeep and documentation, please
146
- discuss possible repo inclusion with project leads before submitting
147
- pull requests with subtree merges.
148
-
149
- ### Project Management
150
-
151
- For project management, we usually use either [Trello](http://trello.com)
152
- or [ZenHub](http://zenhub.io), depending on the level of integration needed with the
153
- source code repo itself. More information about this is usually
154
- included in the README for the specific project.
155
-
156
- ### Documentation
157
-
158
- Non-code documentation for projects is usually done in one of two
159
- formats:
160
-
161
- - Markdown, for all README and contributor facing files.
162
- - org-mode, for large documentation sets and manuals.
163
-
164
- As there is currently only one project lead using org-mode (but they
165
- write most of the documentation), conversation from org-mode to
166
- markdown can happen on request. Similarly, markdown versions of
167
- org-mode documents may be checked in to documentation repos as needed.
168
-
169
- Large manuals are usually managed using the [gitbook](https://github.com/GitbookIO/gitbook) format.
@@ -1,10 +0,0 @@
1
- <html>
2
- <head>
3
- <script type="text/javascript" src="buttplug.min.js" defer></script>
4
- </head>
5
- <body>
6
- <script>
7
- </script>
8
- <h1 class="title">I'm a test page!</h1>
9
- </body>
10
- </html>
package/typedoc.js DELETED
@@ -1,9 +0,0 @@
1
- module.exports = {
2
- mode: "file",
3
- module: "umd",
4
- target: "ES6",
5
- exclude: "**/+(test|example|node_modules)/**/*.ts",
6
- excludeExternals: true,
7
- excludePrivate: true
8
- }
9
-