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.5.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,233 additions and 6,942 deletions.
  1. +8 −0 .formatter.exs
  2. +5 −0 .gitattributes
  3. +18 −0 .github/workflows/elixir.yml
  4. +11 −7 .gitignore
  5. +11 −6 .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. +99 −296 README.md
  12. +0 −124 doc/actions.tex
  13. +0 −198 doc/api.tex
  14. +0 −215 doc/architecture.tex
  15. +0 −16 doc/book.tex
  16. +0 −262 doc/elements.tex
  17. BIN doc/images/connections.png
  18. BIN doc/images/n2o-book.png
  19. BIN doc/images/page-lifetime.png
  20. +0 −181 doc/index.tex
  21. +0 −125 doc/macros.tex
  22. +0 −186 doc/protocol.tex
  23. +0 −65 doc/setup.tex
  24. +0 −101 doc/synrc.tex
  25. +0 −17 doc/web/actions.tex
  26. +0 −16 doc/web/api.tex
  27. +0 −18 doc/web/architecture.tex
  28. +0 −17 doc/web/elements.tex
  29. +0 −16 doc/web/extending.tex
  30. +0 −18 doc/web/index.tex
  31. +0 −16 doc/web/macros.tex
  32. +0 −16 doc/web/protocol.tex
  33. +0 −19 doc/web/setup.tex
  34. +0 −14 doc/web/toc.tex
  35. BIN img/android-chrome-192x192.png
  36. BIN img/android-chrome-512x512.png
  37. BIN img/apple-touch-icon.png
  38. BIN img/favicon-16x16.png
  39. BIN img/favicon-32x32.png
  40. BIN img/favicon.ico
  41. +1 −0 img/site.webmanifest
  42. +0 −49 include/api.hrl
  43. +7 −0 include/ftp.hrl
  44. +8 −0 include/io.hrl
  45. +27 −0 include/mqtt.hrl
  46. +66 −0 include/n2o.hrl
  47. +15 −0 include/n2o_api.hrl
  48. +18 −0 include/n2o_core.hrl
  49. +8 −0 include/n2o_info.hrl
  50. +9 −0 include/n2o_pi.hrl
  51. +8 −0 include/n2o_proc.hrl
  52. +0 −118 include/wf.hrl
  53. +215 −0 index.html
  54. +30 −0 lib/N2O.ex
  55. +29 −0 lib/aes_gcm.ex
  56. +85 −0 lib/ftp.ex
  57. +134 −0 man/N2O.svg
  58. +482 −0 man/WebSocket + MQTT.svg
  59. +448 −0 man/bert.js.htm
  60. +72 −0 man/ftp.js.htm
  61. +99 −0 man/heart.js.htm
  62. +63 −0 man/ieee754.js.htm
  63. +55 −0 man/mq.js.htm
  64. +343 −0 man/n2o.htm
  65. +71 −0 man/n2o.js.htm
  66. +80 −0 man/n2o_auth.htm
  67. +53 −0 man/n2o_bert.htm
  68. +53 −0 man/n2o_cowboy.htm
  69. +72 −0 man/n2o_ftp.htm
  70. +53 −0 man/n2o_gproc.htm
  71. +73 −0 man/n2o_heart.htm
  72. +53 −0 man/n2o_json.htm
  73. +100 −0 man/n2o_mqtt.htm
  74. +227 −0 man/n2o_pi.htm
  75. +105 −0 man/n2o_proto.htm
  76. +54 −0 man/n2o_ring.htm
  77. +73 −0 man/n2o_secret.htm
  78. +161 −0 man/n2o_session.htm
  79. +51 −0 man/n2o_static.htm
  80. +53 −0 man/n2o_syn.htm
  81. +51 −0 man/n2o_ws.htm
  82. +66 −0 man/utf8.js.htm
  83. +52 −0 man/zlib.js.htm
  84. +27 −0 mix.exs
  85. +167 −161 priv/bert.js
  86. +0 −164 priv/bullet.js
  87. +99 −0 priv/ftp.js
  88. +36 −0 priv/heart.js
  89. +75 −0 priv/ieee754.js
  90. +103 −0 priv/mq.js
  91. +63 −92 priv/n2o.js
  92. +0 −11 priv/page-lifetime.uml
  93. +7 −0 priv/utf8.js
  94. +23 −0 priv/xhr.js
  95. +229 −0 priv/zlib.js
  96. +18 −7 rebar.config
  97. +0 −11 samples/Makefile
  98. +0 −64 samples/README.md
  99. +0 −4 samples/apps/n2o_sample/README.md
  100. +0 −13 samples/apps/n2o_sample/include/users.hrl
  101. 0 samples/apps/n2o_sample/priv/static/README.md
  102. +0 −56 samples/apps/n2o_sample/priv/static/react.htm
  103. +0 −18 samples/apps/n2o_sample/priv/static/spa/index.htm
  104. +0 −19 samples/apps/n2o_sample/priv/static/spa/spa.htm
  105. +0 −13 samples/apps/n2o_sample/priv/templates/hello.html
  106. +0 −15 samples/apps/n2o_sample/priv/templates/index.html
  107. +0 −13 samples/apps/n2o_sample/priv/templates/login.html
  108. +0 −12 samples/apps/n2o_sample/rebar.config
  109. +0 −65 samples/apps/n2o_sample/src/index.erl
  110. +0 −24 samples/apps/n2o_sample/src/login.erl
  111. +0 −9 samples/apps/n2o_sample/src/n2o_sample.app.src
  112. +0 −22 samples/apps/n2o_sample/src/routes.erl
  113. +0 −15 samples/apps/n2o_sample/src/users.erl
  114. +0 −15 samples/apps/n2o_sample/src/web_app.erl
  115. +0 −34 samples/apps/n2o_sample/src/web_sup.erl
  116. +0 −3 samples/apps/rebar.config
  117. BIN samples/mad
  118. +0 −20 samples/orderapps.erl
  119. +0 −51 samples/otp.mk
  120. +0 −9 samples/rebar.config
  121. +0 −34 samples/rels/web/files/erl
  122. +0 −44 samples/rels/web/files/install_upgrade.escript
  123. +0 −292 samples/rels/web/files/node
  124. +0 −96 samples/rels/web/files/node.cmd
  125. +0 −138 samples/rels/web/files/nodetool
  126. +0 −40 samples/rels/web/files/start_erl.cmd
  127. +0 −13 samples/rels/web/files/sys.config
  128. +0 −6 samples/rels/web/files/vm.args
  129. +0 −48 samples/rels/web/reltool.config
  130. +0 −5 samples/xen.config
  131. +0 −6 src/actions/action_alert.erl
  132. +0 −11 src/actions/action_api.erl
  133. +0 −22 src/actions/action_async.erl
  134. +0 −16 src/actions/action_confirm.erl
  135. +0 −16 src/actions/action_event.erl
  136. +0 −24 src/actions/action_jq.erl
  137. +0 −10 src/actions/action_wire.erl
  138. +0 −12 src/elements/element_blockquote.erl
  139. +0 −23 src/elements/element_button.erl
  140. +0 −25 src/elements/element_checkbox.erl
  141. +0 −29 src/elements/element_dropdown.erl
  142. +0 −14 src/elements/element_dtl.erl
  143. +0 −20 src/elements/element_hidden.erl
  144. +0 −19 src/elements/element_image.erl
  145. +0 −14 src/elements/element_label.erl
  146. +0 −25 src/elements/element_link.erl
  147. +0 −15 src/elements/element_list.erl
  148. +0 −7 src/elements/element_literal.erl
  149. +0 −14 src/elements/element_panel.erl
  150. +0 −20 src/elements/element_password.erl
  151. +0 −46 src/elements/element_radio.erl
  152. +0 −25 src/elements/element_radiogroup.erl
  153. +0 −21 src/elements/element_range.erl
  154. +0 −37 src/elements/element_select.erl
  155. +0 −25 src/elements/element_submit.erl
  156. +0 −27 src/elements/element_table.erl
  157. +0 −13 src/elements/element_td.erl
  158. +0 −19 src/elements/element_textarea.erl
  159. +0 −21 src/elements/element_textbox.erl
  160. +0 −13 src/elements/element_th.erl
  161. +0 −14 src/elements/element_tr.erl
  162. +0 −175 src/endpoints/cowboy/bullet_handler.erl
  163. +0 −145 src/endpoints/cowboy/n2o_bullet.erl
  164. +0 −31 src/endpoints/cowboy/n2o_cowboy.erl
  165. +0 −7 src/endpoints/yaws/README.md
  166. +0 −28 src/handlers/n2o_error.erl
  167. +0 −11 src/handlers/n2o_mq.erl
  168. +0 −8 src/handlers/n2o_pickle.erl
  169. +0 −11 src/handlers/n2o_query.erl
  170. +0 −20 src/handlers/n2o_route.erl
  171. +0 −23 src/handlers/n2o_secret.erl
  172. +0 −70 src/handlers/n2o_session.erl
  173. +79 −0 src/mqtt/n2o_mqtt.erl
  174. +6 −9 src/n2o.app.src
  175. +250 −0 src/n2o.erl
  176. +0 −6 src/n2o_app.erl
  177. +0 −33 src/n2o_auth.erl
  178. +0 −889 src/n2o_json.erl
  179. +0 −354 src/n2o_mochinum.erl
  180. +30 −0 src/n2o_multipart.erl
  181. +144 −0 src/n2o_pi.erl
  182. +135 −0 src/n2o_proto.erl
  183. +134 −0 src/n2o_ring.erl
  184. +0 −18 src/n2o_sup.erl
  185. +103 −0 src/protos/n2o_ftp.erl
  186. +13 −0 src/protos/n2o_heart.erl
  187. +9 −0 src/services/n2o_bert.erl
  188. +17 −0 src/services/n2o_json.erl
  189. +39 −0 src/services/n2o_secret.erl
  190. +113 −0 src/services/n2o_session.erl
  191. +18 −0 src/services/n2o_xml.erl
  192. +0 −7 src/static_file.erl
  193. +0 −205 src/wf.erl
  194. +0 −34 src/wf_context.erl
  195. +0 −263 src/wf_convert.erl
  196. +0 −39 src/wf_core.erl
  197. +0 −11 src/wf_event.erl
  198. +0 −13 src/wf_render_actions.erl
  199. +0 −27 src/wf_render_elements.erl
  200. +0 −28 src/wf_tags.erl
  201. +0 −61 src/wf_utils.erl
  202. +67 −0 src/ws/n2o_cowboy.erl
  203. +16 −0 src/ws/n2o_gproc.erl
  204. +30 −0 src/ws/n2o_static.erl
  205. +18 −0 src/ws/n2o_syn.erl
  206. +28 −0 src/ws/n2o_ws.erl
  207. +8 −0 sys.config
  208. +2 −0 test/bert.sh
  209. +50 −0 test/bert_gen.erl
  210. +24 −0 test/bert_test.js
  211. +19 −0 test/casper/casper.js
  212. +9 −6 test/elements.erl
  213. +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
17 changes: 11 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
language: erlang
otp_release:
- R16B
- 20.3.8
- 21.3
- 22.0
- 23.0
notifications:
email:
email:
- maxim@synrc.com
- doxtop@synrc.com
irc: "chat.freenode.net#n2o"
install: "rebar get-deps compile"
script: "rebar compile"
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 may only 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