Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: synrc/n2o
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.1.0
Choose a base ref
...
head repository: synrc/n2o
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 6,251 additions and 6,271 deletions.
  1. +8 −0 .formatter.exs
  2. +5 −0 .gitattributes
  3. +18 −0 .github/workflows/elixir.yml
  4. +11 −7 .gitignore
  5. +15 −0 .travis.yml
  6. +1 −0 CNAME
  7. +56 −0 COC.md
  8. +14 −0 CONTRIBUTORS.md
  9. +13 −0 HISTORY.md
  10. +28 −15 LICENSE
  11. +101 −302 README.md
  12. +0 −122 doc/actions.tex
  13. +0 −168 doc/api.tex
  14. +0 −213 doc/architecture.tex
  15. +0 −15 doc/book.tex
  16. +0 −222 doc/elements.tex
  17. +0 −4 doc/extending.tex
  18. BIN doc/images/connections.png
  19. BIN doc/images/page-lifetime.png
  20. +0 −181 doc/index.tex
  21. +0 −125 doc/macros.tex
  22. +0 −69 doc/setup.tex
  23. +0 −101 doc/synrc.tex
  24. BIN img/android-chrome-192x192.png
  25. BIN img/android-chrome-512x512.png
  26. BIN img/apple-touch-icon.png
  27. BIN img/favicon-16x16.png
  28. BIN img/favicon-32x32.png
  29. BIN img/favicon.ico
  30. +1 −0 img/site.webmanifest
  31. +7 −0 include/ftp.hrl
  32. +8 −0 include/io.hrl
  33. +27 −0 include/mqtt.hrl
  34. +66 −0 include/n2o.hrl
  35. +15 −0 include/n2o_api.hrl
  36. +18 −0 include/n2o_core.hrl
  37. +8 −0 include/n2o_info.hrl
  38. +9 −0 include/n2o_pi.hrl
  39. +8 −0 include/n2o_proc.hrl
  40. +0 −138 include/wf.hrl
  41. +215 −0 index.html
  42. +30 −0 lib/N2O.ex
  43. +29 −0 lib/aes_gcm.ex
  44. +85 −0 lib/ftp.ex
  45. +134 −0 man/N2O.svg
  46. +482 −0 man/WebSocket + MQTT.svg
  47. +448 −0 man/bert.js.htm
  48. +72 −0 man/ftp.js.htm
  49. +99 −0 man/heart.js.htm
  50. +63 −0 man/ieee754.js.htm
  51. +55 −0 man/mq.js.htm
  52. +343 −0 man/n2o.htm
  53. +71 −0 man/n2o.js.htm
  54. +80 −0 man/n2o_auth.htm
  55. +53 −0 man/n2o_bert.htm
  56. +53 −0 man/n2o_cowboy.htm
  57. +72 −0 man/n2o_ftp.htm
  58. +53 −0 man/n2o_gproc.htm
  59. +73 −0 man/n2o_heart.htm
  60. +53 −0 man/n2o_json.htm
  61. +100 −0 man/n2o_mqtt.htm
  62. +227 −0 man/n2o_pi.htm
  63. +105 −0 man/n2o_proto.htm
  64. +54 −0 man/n2o_ring.htm
  65. +73 −0 man/n2o_secret.htm
  66. +161 −0 man/n2o_session.htm
  67. +51 −0 man/n2o_static.htm
  68. +53 −0 man/n2o_syn.htm
  69. +51 −0 man/n2o_ws.htm
  70. +66 −0 man/utf8.js.htm
  71. +52 −0 man/zlib.js.htm
  72. +27 −0 mix.exs
  73. +172 −0 priv/bert.js
  74. +99 −0 priv/ftp.js
  75. +36 −0 priv/heart.js
  76. +75 −0 priv/ieee754.js
  77. +103 −0 priv/mq.js
  78. +70 −0 priv/n2o.js
  79. +0 −11 priv/page-lifetime.uml
  80. +7 −0 priv/utf8.js
  81. +23 −0 priv/xhr.js
  82. +229 −0 priv/zlib.js
  83. +18 −8 rebar.config
  84. +0 −62 samples/README.md
  85. +0 −3 samples/apps/rebar.config
  86. +0 −7 samples/attach.sh
  87. +0 −12 samples/nitrogen_static.sh
  88. +0 −44 samples/otp.mk
  89. +0 −25 samples/rebar.config
  90. +0 −22 samples/release.sh
  91. +0 −47 samples/release_sync.sh
  92. +0 −34 samples/rels/web/files/erl
  93. +0 −44 samples/rels/web/files/install_upgrade.escript
  94. +0 −292 samples/rels/web/files/node
  95. +0 −96 samples/rels/web/files/node.cmd
  96. +0 −138 samples/rels/web/files/nodetool
  97. +0 −40 samples/rels/web/files/start_erl.cmd
  98. +0 −13 samples/rels/web/files/sys.config
  99. +0 −6 samples/rels/web/files/vm.args
  100. +0 −46 samples/rels/web/reltool.config
  101. +0 −4 samples/start.sh
  102. +0 −4 samples/stop.sh
  103. +0 −5 samples/xen.config
  104. +0 −6 src/actions/action_alert.erl
  105. +0 −11 src/actions/action_api.erl
  106. +0 −22 src/actions/action_async.erl
  107. +0 −16 src/actions/action_confirm.erl
  108. +0 −10 src/actions/action_control.erl
  109. +0 −15 src/actions/action_event.erl
  110. +0 −22 src/actions/action_jq.erl
  111. +0 −11 src/actions/action_wire.erl
  112. +0 −38 src/elements/element_accordion.erl
  113. +0 −12 src/elements/element_blockquote.erl
  114. +0 −23 src/elements/element_button.erl
  115. +0 −5 src/elements/element_canvas.erl
  116. +0 −26 src/elements/element_carousel.erl
  117. +0 −25 src/elements/element_checkbox.erl
  118. +0 −31 src/elements/element_dropdown.erl
  119. +0 −14 src/elements/element_dtl.erl
  120. +0 −20 src/elements/element_hidden.erl
  121. +0 −115 src/elements/element_htmlbox.erl
  122. +0 −19 src/elements/element_image.erl
  123. +0 −14 src/elements/element_label.erl
  124. +0 −25 src/elements/element_link.erl
  125. +0 −15 src/elements/element_list.erl
  126. +0 −7 src/elements/element_literal.erl
  127. +0 −14 src/elements/element_panel.erl
  128. +0 −20 src/elements/element_password.erl
  129. +0 −46 src/elements/element_radio.erl
  130. +0 −25 src/elements/element_radiogroup.erl
  131. +0 −21 src/elements/element_range.erl
  132. +0 −40 src/elements/element_rtable.erl
  133. +0 −35 src/elements/element_select.erl
  134. +0 −22 src/elements/element_slider.erl
  135. +0 −25 src/elements/element_submit.erl
  136. +0 −26 src/elements/element_table.erl
  137. +0 −13 src/elements/element_td.erl
  138. +0 −19 src/elements/element_textarea.erl
  139. +0 −21 src/elements/element_textbox.erl
  140. +0 −31 src/elements/element_textboxlist.erl
  141. +0 −13 src/elements/element_th.erl
  142. +0 −14 src/elements/element_tr.erl
  143. +0 −108 src/elements/element_upload.erl
  144. +0 −167 src/endpoints/cowboy/bullet_handler.erl
  145. +0 −32 src/endpoints/cowboy/n2o_cowboy.erl
  146. +0 −101 src/endpoints/cowboy/n2o_cowboy_rest.erl
  147. +0 −7 src/endpoints/yaws/README.md
  148. +0 −11 src/handlers/n2o_mq.erl
  149. +0 −8 src/handlers/n2o_pickle.erl
  150. +0 −11 src/handlers/n2o_query.erl
  151. +0 −18 src/handlers/n2o_route.erl
  152. +0 −23 src/handlers/n2o_secret.erl
  153. +0 −64 src/handlers/n2o_session.erl
  154. +79 −0 src/mqtt/n2o_mqtt.erl
  155. +6 −9 src/n2o.app.src
  156. +250 −0 src/n2o.erl
  157. +0 −6 src/n2o_app.erl
  158. +0 −33 src/n2o_auth.erl
  159. +0 −101 src/n2o_bullet.erl
  160. +0 −889 src/n2o_json.erl
  161. +0 −354 src/n2o_mochinum.erl
  162. +30 −0 src/n2o_multipart.erl
  163. +144 −0 src/n2o_pi.erl
  164. +135 −0 src/n2o_proto.erl
  165. +0 −130 src/n2o_rest.erl
  166. +134 −0 src/n2o_ring.erl
  167. +0 −18 src/n2o_sup.erl
  168. +103 −0 src/protos/n2o_ftp.erl
  169. +13 −0 src/protos/n2o_heart.erl
  170. +9 −0 src/services/n2o_bert.erl
  171. +17 −0 src/services/n2o_json.erl
  172. +39 −0 src/services/n2o_secret.erl
  173. +113 −0 src/services/n2o_session.erl
  174. +18 −0 src/services/n2o_xml.erl
  175. +0 −7 src/static_file.erl
  176. +0 −152 src/wf.erl
  177. +0 −26 src/wf_context.erl
  178. +0 −263 src/wf_convert.erl
  179. +0 −34 src/wf_core.erl
  180. +0 −13 src/wf_event.erl
  181. +0 −13 src/wf_render_actions.erl
  182. +0 −27 src/wf_render_elements.erl
  183. +0 −27 src/wf_tags.erl
  184. +0 −61 src/wf_utils.erl
  185. +67 −0 src/ws/n2o_cowboy.erl
  186. +16 −0 src/ws/n2o_gproc.erl
  187. +30 −0 src/ws/n2o_static.erl
  188. +18 −0 src/ws/n2o_syn.erl
  189. +28 −0 src/ws/n2o_ws.erl
  190. +8 −0 sys.config
  191. +2 −0 test/bert.sh
  192. +50 −0 test/bert_gen.erl
  193. +24 −0 test/bert_test.js
  194. +19 −0 test/casper/casper.js
  195. +9 −6 test/elements.erl
  196. +38 −20 test/n2o_SUITE.erl
8 changes: 8 additions & 0 deletions .formatter.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Used by "mix format"
[
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"],
line_length: 80,
export: [
locals_without_parens: [some_dsl_call: 2, some_dsl_call: 3]
]
]
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.html linguist-detectable=false
*.htm linguist-detectable=false
*.js linguist-detectable=false
*.css linguist-detectable=false
*.sh linguist-detectable=false
18 changes: 18 additions & 0 deletions .github/workflows/elixir.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: mix
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-elixir@v1
with:
otp-version: 24.x
elixir-version: 1.13.x
- name: Dependencies
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
- name: Compilation
run: mix compile
18 changes: 11 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
ebin
.DS_Store
.eunit
logs
/ebin/*
*~
.#*
*.beam
/deps/*
.applist
Mnesia.nonode@nohost
_build
log
deps
*.toc
*.log
*.aux
*.pdf
*.lock
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: erlang
otp_release:
- 20.3.8
- 21.3
- 22.0
- 23.0
notifications:
email:
- maxim@synrc.com
script:
- "rebar get-deps clean compile"
- "curl -fsSL https://raw.github.com/synrc/mad/master/mad > mad"
- "chmod +x mad"
- "./mad dep com"
- "rebar3 dialyzer"
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ws.n2o.dev
56 changes: 56 additions & 0 deletions COC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# N2O User Agreement

## 1. Motivation

Maximal inclusion.
We do care your sex, race, nationality, split config,
be whoever you want to be and manifest
yourself in as many mindstreams as you wish.

## 2. Openness

We are open.

## 3. Expected Behavior

* Healthy contribution;
* Respect us and we will respect you;
* Positive first, negative next (if needed);
* Mindfulness;
* General socially accepted behavior.

## 4. Unacceptable Behavior

* Violence;
* Discriminatory jokes and language;
* Discrimination by programming language;
* Jokes about body;
* Familiarity nicknames;
* Doxing;
* Sexual misconduct;
* Annoing behavior;
* Criminal behavior.

## 6. Consequences of Unacceptable Behavior

Ban.

## 7. Reporting Guidelines

Talk to @5HT.

## 8. Addressing Grievances

N2O board committee is higher that @5HT.

## 9. Scope

Offline and Online.

## 10. License and attribution

This contract is distributed under the terms of ISC license.

## 11. Contact info

Namdak Tonpa @5HT
14 changes: 14 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Credits

* Maxim Sokhatsky — core, shen, windows
* Dmitry Bushmelev — yaws, cowboy
* Andrii Zadorozhnii — elements, actions
* Vladimir Kirillov — mac, bsd, xen, linux
* Andrey Martemyanov — bert
* Oleksandr Nikitin — security
* Anton Logvinenko — doc
* Roman Shestakov — elements, ct
* Jesse Gumm — nitrogen, help
* Yuri Maslovsky — mqtt
* Igor Kharin — k8s, ekka
* Rusty Klophaus — original author
13 changes: 13 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# History

* 4.5 — Basic Messaging with single topic and Echo
* 4.6 — Echo eliminated Basic Filter with req/rep topics
* 4.7 — DHT supervised node for server MQTT connections
* 4.9 — Subscribe offline clients
* 4.9.3 — Cleaned n2o_async, written manpage
* 5.10 — Cleanup
* 5.11 — Formatter API changes
* 5.11.1 — Unification of WebSocket and MQTT versions
* 6.3 — arraybuffer in JS client, n2o_pi, fixes, synrc/mqtt drop
* 6.4 — Error handling, minimalisation
* 6.5 — OTP 21.0, n2o.dev, WebSocket ring, /-endpoint for static/WS, Erlang logger
43 changes: 28 additions & 15 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
Copyright (c) 2013 Maxim Sokhatsky, Synrc Research Center
DHARMA License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Copyright (c) 2011—2022 Synrc Research

Software should be used for the great good and the true happiness of all sentient beings.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
YOU CANNOT USE THIS SOFTWARE IN ANY (PROVABLE BY MONEY TRACE)
PROCESS CHAIN OF EXTERMINATING UKRAINIANS BY ANY MEANS OF FASCIST
ACTIONS AGAINST OUR TERRITORIAL INTEGRITY, CULTURAL DIVERSITY BY
APPLYING MILITARY INVASIONS, ECONOMICAL WARS, HUMANITARIAN DISASTERS,
ARTFICIAL HOLODOMORS, GENOCIDE, RAPING, LOOTING, ROBBERIES, SPREADING
FAKE INFORMATION, AND OTHER CONTEMPORARY WEAPONS OF WAR AT SCALE
OR IN INVIDIVUAL MANNER.

YOU CANNOT USE THIS SOFTWARE BY ANY MEANS IN INTEREST OF LEGAL
ENTITIES OR INDIVIDUALS WHO IS SUPPORTING NOW OR WAS SUPPORTING
BACK THEN FASCISM, RUSCISM, COMMUNISM, CHAUVINISM, HUMILIATION,
AND OTHER SUPPRESSIVE IDEOLOGIES IN DIFFERENT EXPRESSIONS.

STOP KILLING UKRAINIANS,
THE COUNTER RENDERS TENS OF MILLIONS.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Loading