Skip to content

Commit

Permalink
Prosody 0.12 (#965)
Browse files Browse the repository at this point in the history
  • Loading branch information
sonnyp authored Jan 1, 2023
1 parent 2a80170 commit 8ad208e
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 736 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ jobs:

- name: Install prosody
run: |
echo deb http://packages.prosody.im/debian $(lsb_release -sc) main | sudo tee /etc/apt/sources.list.d/prosody.list
sudo wget https://prosody.im/files/prosody-debian-packages.key -O/etc/apt/trusted.gpg.d/prosody.gpg
sudo apt-get update
sudo apt-get -y install prosody lua-bitop lua-sec
sudo service prosody stop
- run: npm install -g npm
- run: make
- run: make test-ci
- run: make ci

- name: The job has failed
if: ${{ failure() }}
Expand Down
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
node_modules/
**/dist/*
server/localhost/
server/localhost.crt
server/localhost.key
server/certs/
server/prosody.err
server/prosody.log
server/prosody.pid
server/prosody-modules/

!.gitkeep
!.editorconfig
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
BRANCH="$(git rev-parse --abbrev-ref HEAD)"

if [[ "$BRANCH" == "main" ]]; then
make test-ci
make ci
else
make test
fi
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ See [ava CLI](https://github.com/avajs/ava/blob/main/docs/05-command-line.md).
## Submitting

When submitting a pull request, additional tests will be run on GitHub actions.
In most cases it shouldn't be necessary but if they fail, you can run them locally after installing prosody with
In most cases it shouldn't be necessary but if they fail, you can run them locally after installing prosody >= 0.12 with

```
make test-ci
make ci
```

Good luck and feel free to ask for help in https://github.com/xmppjs/xmpp.js/discussions
Expand Down
9 changes: 3 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: setup test clean bundle start stop restart size bundlesize
.PHONY: setup lint test ci clean start stop restart bundlesize bundle size cert ncu

setup:
node packages/xmpp.js/script.js
Expand All @@ -19,15 +19,15 @@ test:
make lint
make bundlesize

test-ci:
ci:
npm install
./node_modules/.bin/lerna bootstrap
./node_modules/.bin/ava
make lint
make restart
./node_modules/.bin/lerna run prepublish
node bundle.js
./node_modules/.bin/ava --config e2e.config.js
./node_modules/.bin/ava --tap --config e2e.config.js
make bundlesize

clean:
Expand Down Expand Up @@ -61,8 +61,5 @@ size:
make bundle
make bundlesize

cert:
cd server && openssl req -new -x509 -days 365 -nodes -out "localhost.crt" -newkey rsa:2048 -keyout "localhost.key" -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=localhost"

ncu:
ncu && npx lerna exec ncu
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

It aims to run everywhere JavaScript runs and make use of the best network transport available.

xmpp.js is known to be used in Node.js, browsers, React Native, GJS and Duktape.
xmpp.js is known to be used with Node.js, browsers, React Native, GJS and Duktape.

### reliable

Expand All @@ -45,8 +45,11 @@ Do you need help with working with xmpp.js? Please reach out to our community by

## Built with xmpp.js

- [WorkAdventure](https://workadventu.re/)
- [Simplo](https://simplo.app/?lang=en)
- [Crypho](https://www.crypho.com/)
- [MeshCentral](https://meshcentral.com/)
- [openHAB](https://www.openhab.org/)
- [HearMe.App](https://www.hearme.app/)
- [Wobbly](https://wobbly.app/)
- [Alcatel-Lucent Rainbow](https://www.openrainbow.com/)
Expand Down
Empty file added server/certs/.gitkeep
Empty file.
4 changes: 2 additions & 2 deletions server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ function makeCertificate() {
const attrs = [{ name: "commonName", value: "localhost" }];
const pems = selfsigned.generate(attrs, { days: 365, keySize: 2048 });

writeFileSync(path.join(__dirname, "localhost.crt"), pems.cert);
writeFileSync(path.join(__dirname, "localhost.key"), pems.private);
writeFileSync(path.join(__dirname, "certs/localhost.crt"), pems.cert);
writeFileSync(path.join(__dirname, "certs/localhost.key"), pems.private);
}

async function waitPortClose() {
Expand Down
Empty file added server/localhost/certs/.gitkeep
Empty file.
85 changes: 0 additions & 85 deletions server/prosody-modules/mod_smacks/README.markdown

This file was deleted.

Loading

0 comments on commit 8ad208e

Please sign in to comment.