8 Commits

26 changed files with 2571 additions and 54 deletions

3
.gitignore vendored
View File

@@ -13,3 +13,6 @@ pubspec.lock
# Omit pubspec override files generated by melos # Omit pubspec override files generated by melos
**/pubspec_overrides.yaml **/pubspec_overrides.yaml
# Flake results
result

View File

@@ -7,6 +7,8 @@ moxxmpp is a XMPP library written purely in Dart for usage in Moxxy.
This package contains the actual XMPP code that is platform-independent. This package contains the actual XMPP code that is platform-independent.
Documentation is available [here](https://moxxy.org/developers/docs/moxxmpp/).
### [moxxmpp_socket_tcp](./packages/moxxmpp_socket_tcp) ### [moxxmpp_socket_tcp](./packages/moxxmpp_socket_tcp)
`moxxmpp_socket_tcp` contains the implementation of the `BaseSocketWrapper` class that `moxxmpp_socket_tcp` contains the implementation of the `BaseSocketWrapper` class that

View File

@@ -30,14 +30,29 @@
useGoogleTVAddOns = false; useGoogleTVAddOns = false;
}; };
pinnedJDK = pkgs.jdk; pinnedJDK = pkgs.jdk;
pythonEnv = pkgs.python3.withPackages (ps: with ps; [
pyyaml
requests
]);
moxxmppPubCache = import ./nix/pubcache.moxxmpp.nix {
inherit (pkgs) fetchzip runCommand;
};
in { in {
packages = {
moxxmppDartDocs = pkgs.callPackage ./nix/moxxmpp-docs.nix {
inherit (moxxmppPubCache) pubCache;
};
};
devShell = pkgs.mkShell { devShell = pkgs.mkShell {
buildInputs = with pkgs; [ buildInputs = with pkgs; [
flutter pinnedJDK android.platform-tools dart # Flutter/Android flutter pinnedJDK android.platform-tools dart # Dart
gitlint # Code hygiene gitlint # Code hygiene
ripgrep # General utilities ripgrep # General utilities
# Flutter dependencies for linux desktop # Flutter dependencies for Linux desktop
atk atk
cairo cairo
clang clang
@@ -53,6 +68,9 @@
pkg-config pkg-config
xorg.libX11 xorg.libX11
xorg.xorgproto xorg.xorgproto
# For the scripts in ./scripts/
pythonEnv
]; ];
CPATH = "${pkgs.xorg.libX11.dev}/include:${pkgs.xorg.xorgproto}/include"; CPATH = "${pkgs.xorg.libX11.dev}/include:${pkgs.xorg.xorgproto}/include";

35
nix/moxxmpp-docs.nix Normal file
View File

@@ -0,0 +1,35 @@
{
stdenv
, pubCache
, dart
, lib
}:
stdenv.mkDerivation {
pname = "moxxmpp-docs";
version = "0.2.0";
PUB_CACHE = "${pubCache}";
src = "${./..}/packages/moxxmpp";
buildPhase = ''
runHook preBuild
(
set -x
echo $PUB_CACHE
${dart}/bin/dart pub get --no-precompile --offline
)
runHook postBuild
'';
installPhase = ''
runHook preInstall
${dart}/bin/dart doc -o $out
runHook postInstall
'';
}

730
nix/moxxmpp.lock Normal file
View File

@@ -0,0 +1,730 @@
packages:
_fe_analyzer_shared:
archive_url: https://pub.dartlang.org/packages/_fe_analyzer_shared/versions/50.0.0.tar.gz
dependency: transitive
description:
name: _fe_analyzer_shared
url: https://pub.dartlang.org
sha256: 1hyd5pmjcfyvfwhsc0wq6k0229abmqq5zn95g31hh42bklb2gci5
source: hosted
version: 50.0.0
analyzer:
archive_url: https://pub.dartlang.org/packages/analyzer/versions/5.2.0.tar.gz
dependency: transitive
description:
name: analyzer
url: https://pub.dartlang.org
sha256: 0niy5b3w39aywpjpw5a84pxdilhh3zzv1c22x8ywml756pybmj4r
source: hosted
version: 5.2.0
args:
archive_url: https://pub.dartlang.org/packages/args/versions/2.3.1.tar.gz
dependency: transitive
description:
name: args
url: https://pub.dartlang.org
sha256: 0c78zkzg2d2kzw1qrpiyrj1qvm4pr0yhnzapbqk347m780ha408g
source: hosted
version: 2.3.1
async:
archive_url: https://pub.dartlang.org/packages/async/versions/2.10.0.tar.gz
dependency: transitive
description:
name: async
url: https://pub.dartlang.org
sha256: 00hhylamsjcqmcbxlsrfimri63gb384l31r9mqvacn6c6bvk4yfx
source: hosted
version: 2.10.0
boolean_selector:
archive_url: https://pub.dartlang.org/packages/boolean_selector/versions/2.1.1.tar.gz
dependency: transitive
description:
name: boolean_selector
url: https://pub.dartlang.org
sha256: 0hxq8072hb89q9s91xlz9fvrjxfy7hw6jkdwkph5dp77df841kmj
source: hosted
version: 2.1.1
build:
archive_url: https://pub.dartlang.org/packages/build/versions/2.3.1.tar.gz
dependency: transitive
description:
name: build
url: https://pub.dartlang.org
sha256: 1x6nkii6kqy6y7ck0151yfhc9lp2nvbhznnhdi2mxr8afk6jxigd
source: hosted
version: 2.3.1
build_config:
archive_url: https://pub.dartlang.org/packages/build_config/versions/1.1.1.tar.gz
dependency: transitive
description:
name: build_config
url: https://pub.dartlang.org
sha256: 092rrbhbdy9fk50jqb1fwj1sfk415fi43irvsd0hk5w90gn8vazj
source: hosted
version: 1.1.1
build_daemon:
archive_url: https://pub.dartlang.org/packages/build_daemon/versions/3.1.0.tar.gz
dependency: transitive
description:
name: build_daemon
url: https://pub.dartlang.org
sha256: 0b6hnwjc3gi5g7cnpy8xyiqigcrs0xp51c7y7v1pqn9v75g25w6j
source: hosted
version: 3.1.0
build_resolvers:
archive_url: https://pub.dartlang.org/packages/build_resolvers/versions/2.1.0.tar.gz
dependency: transitive
description:
name: build_resolvers
url: https://pub.dartlang.org
sha256: 0fnrisgq6rnvbqsf8v43hb11kr1qq6azrxbsvx3wwimd37nxx8m5
source: hosted
version: 2.1.0
build_runner:
archive_url: https://pub.dartlang.org/packages/build_runner/versions/2.3.2.tar.gz
dependency: direct dev
description:
name: build_runner
url: https://pub.dartlang.org
sha256: 0246bxl9rxgil55fhfzi7csd9a56blj9s1j1z79717hiyzsr60x6
source: hosted
version: 2.3.2
build_runner_core:
archive_url: https://pub.dartlang.org/packages/build_runner_core/versions/7.2.7.tar.gz
dependency: transitive
description:
name: build_runner_core
url: https://pub.dartlang.org
sha256: 0bpil0fw0dag3vbnin9p945ymi7xjgkiy7jrq9j52plljf7cnf5z
source: hosted
version: 7.2.7
built_collection:
archive_url: https://pub.dartlang.org/packages/built_collection/versions/5.1.1.tar.gz
dependency: transitive
description:
name: built_collection
url: https://pub.dartlang.org
sha256: 0bqjahxr42q84w91nhv3n4cr580l3s3ffx3vgzyyypgqnrck0hv3
source: hosted
version: 5.1.1
built_value:
archive_url: https://pub.dartlang.org/packages/built_value/versions/8.4.2.tar.gz
dependency: transitive
description:
name: built_value
url: https://pub.dartlang.org
sha256: 0sslr4258snvcj8qhbdk6wapka174als0viyxddwqlnhs7dlci8i
source: hosted
version: 8.4.2
checked_yaml:
archive_url: https://pub.dartlang.org/packages/checked_yaml/versions/2.0.1.tar.gz
dependency: transitive
description:
name: checked_yaml
url: https://pub.dartlang.org
sha256: 1gf7ankc5jb7mk17br87ajv05pfg6vb8nf35ay6c35w8jp70ra7k
source: hosted
version: 2.0.1
code_builder:
archive_url: https://pub.dartlang.org/packages/code_builder/versions/4.3.0.tar.gz
dependency: transitive
description:
name: code_builder
url: https://pub.dartlang.org
sha256: 1vl9dl23yd0zjw52ndrazijs6dw83fg1rvyb2gfdpd6n1lj9nbhg
source: hosted
version: 4.3.0
collection:
archive_url: https://pub.dartlang.org/packages/collection/versions/1.17.0.tar.gz
dependency: direct main
description:
name: collection
url: https://pub.dartlang.org
sha256: 1iyl3v3j7mj3sxjf63b1kc182fwrwd04mjp5x2i61hic8ihfw545
source: hosted
version: 1.17.0
convert:
archive_url: https://pub.dartlang.org/packages/convert/versions/3.1.1.tar.gz
dependency: transitive
description:
name: convert
url: https://pub.dartlang.org
sha256: 0adsigjk3l1c31i6k91p28dqyjlgwiqrs4lky5djrm2scf8k6cri
source: hosted
version: 3.1.1
coverage:
archive_url: https://pub.dartlang.org/packages/coverage/versions/1.6.1.tar.gz
dependency: transitive
description:
name: coverage
url: https://pub.dartlang.org
sha256: 0akbg1yp2h4vprc8r9xvrpgvp5d26h7m80h5sbzgr5dlis1bcw0d
source: hosted
version: 1.6.1
crypto:
archive_url: https://pub.dartlang.org/packages/crypto/versions/3.0.2.tar.gz
dependency: transitive
description:
name: crypto
url: https://pub.dartlang.org
sha256: 1kjfb8fvdxazmv9ps2iqdhb8kcr31115h0nwn6v4xmr71k8jb8ds
source: hosted
version: 3.0.2
cryptography:
archive_url: https://pub.dartlang.org/packages/cryptography/versions/2.0.5.tar.gz
dependency: direct main
description:
name: cryptography
url: https://pub.dartlang.org
sha256: 0jqph45d9lbhdakprnb84c3qhk4aq05hhb1pmn8w23yhl41ypijs
source: hosted
version: 2.0.5
dart_style:
archive_url: https://pub.dartlang.org/packages/dart_style/versions/2.2.4.tar.gz
dependency: transitive
description:
name: dart_style
url: https://pub.dartlang.org
sha256: 01wg15kalbjlh4i3xbawc9zk8yrk28qhak7xp7mlwn2syhdckn7v
source: hosted
version: 2.2.4
file:
archive_url: https://pub.dartlang.org/packages/file/versions/6.1.4.tar.gz
dependency: transitive
description:
name: file
url: https://pub.dartlang.org
sha256: 0ajcfblf8d4dicp1sgzkbrhd0b0v0d8wl70jsnf5drjck3p3ppk7
source: hosted
version: 6.1.4
fixnum:
archive_url: https://pub.dartlang.org/packages/fixnum/versions/1.0.1.tar.gz
dependency: transitive
description:
name: fixnum
url: https://pub.dartlang.org
sha256: 1m8cdfqp9d6w1cik3fwz9bai1wf9j11rjv2z0zlv7ich87q9kkjk
source: hosted
version: 1.0.1
freezed:
archive_url: https://pub.dartlang.org/packages/freezed/versions/2.1.1.tar.gz
dependency: direct main
description:
name: freezed
url: https://pub.dartlang.org
sha256: 1i9s4djf4vlz56zqn8brcck3n7sk07qay23wmaan991cqydd10iq
source: hosted
version: 2.1.1
freezed_annotation:
archive_url: https://pub.dartlang.org/packages/freezed_annotation/versions/2.1.0.tar.gz
dependency: direct main
description:
name: freezed_annotation
url: https://pub.dartlang.org
sha256: 0ym120dh1lpfnb68gxh1finm8p9l445q5x10aw8269y469b9k9z3
source: hosted
version: 2.1.0
frontend_server_client:
archive_url: https://pub.dartlang.org/packages/frontend_server_client/versions/3.1.0.tar.gz
dependency: transitive
description:
name: frontend_server_client
url: https://pub.dartlang.org
sha256: 0nv4avkv2if9hdcfzckz36f3mclv7vxchivrg8j3miaqhnjvv4bj
source: hosted
version: 3.1.0
glob:
archive_url: https://pub.dartlang.org/packages/glob/versions/2.1.0.tar.gz
dependency: transitive
description:
name: glob
url: https://pub.dartlang.org
sha256: 0a6gbwsbz6rkg35dkff0zv88rvcflqdmda90hdfpn7jp1z1w9rhs
source: hosted
version: 2.1.0
graphs:
archive_url: https://pub.dartlang.org/packages/graphs/versions/2.2.0.tar.gz
dependency: transitive
description:
name: graphs
url: https://pub.dartlang.org
sha256: 0cr6dgs1a7ln2ir5gd0kiwpn787lk4dwhqfjv8876hkkr1rv80m9
source: hosted
version: 2.2.0
hex:
archive_url: https://pub.dartlang.org/packages/hex/versions/0.2.0.tar.gz
dependency: direct main
description:
name: hex
url: https://pub.dartlang.org
sha256: 19w3f90mdiy06a6kf8hlwc4jn4cxixkj106kc3g3bis27ar7smkh
source: hosted
version: 0.2.0
http_multi_server:
archive_url: https://pub.dartlang.org/packages/http_multi_server/versions/3.2.1.tar.gz
dependency: transitive
description:
name: http_multi_server
url: https://pub.dartlang.org
sha256: 1zdcm04z85jahb2hs7qs85rh974kw49hffhy9cn1gfda3077dvql
source: hosted
version: 3.2.1
http_parser:
archive_url: https://pub.dartlang.org/packages/http_parser/versions/4.0.2.tar.gz
dependency: transitive
description:
name: http_parser
url: https://pub.dartlang.org
sha256: 027c4sjkhkkx3sk1aqs6s4djb87syi9h521qpm1bf21bq3gga5jd
source: hosted
version: 4.0.2
io:
archive_url: https://pub.dartlang.org/packages/io/versions/1.0.3.tar.gz
dependency: transitive
description:
name: io
url: https://pub.dartlang.org
sha256: 1bp5l8hkrp6fjj7zw9af51hxyp52sjspc5558lq0lmi453l0czni
source: hosted
version: 1.0.3
js:
archive_url: https://pub.dartlang.org/packages/js/versions/0.6.5.tar.gz
dependency: transitive
description:
name: js
url: https://pub.dartlang.org
sha256: 13fbxgyg1v6bmzvxamg6494vk3923fn3mgxj6f4y476aqwk99n50
source: hosted
version: 0.6.5
json_annotation:
archive_url: https://pub.dartlang.org/packages/json_annotation/versions/4.7.0.tar.gz
dependency: transitive
description:
name: json_annotation
url: https://pub.dartlang.org
sha256: 1p9nvn33psx2zbalhyqjw8gr4agd76jj5jq0fdz0i584c7l77bby
source: hosted
version: 4.7.0
json_serializable:
archive_url: https://pub.dartlang.org/packages/json_serializable/versions/6.5.4.tar.gz
dependency: direct main
description:
name: json_serializable
url: https://pub.dartlang.org
sha256: 04d7laaxrbiybcgbv3y223hy8d6n9f84h5lv9sv79zd9ffzkb2hg
source: hosted
version: 6.5.4
logging:
archive_url: https://pub.dartlang.org/packages/logging/versions/1.0.2.tar.gz
dependency: direct main
description:
name: logging
url: https://pub.dartlang.org
sha256: 0hl1mjh662c44ci7z60x92i0jsyqg1zm6k6fc89n9pdcxsqdpwfs
source: hosted
version: 1.0.2
matcher:
archive_url: https://pub.dartlang.org/packages/matcher/versions/0.12.13.tar.gz
dependency: transitive
description:
name: matcher
url: https://pub.dartlang.org
sha256: 0pjgc38clnjbv124n8bh724db1wcc4kk125j7dxl0icz7clvm0p0
source: hosted
version: 0.12.13
meta:
archive_url: https://pub.dartlang.org/packages/meta/versions/1.8.0.tar.gz
dependency: direct main
description:
name: meta
url: https://pub.dartlang.org
sha256: 01kqdd25nln5a219pr94s66p27m0kpqz0wpmwnm24kdy3ngif1v5
source: hosted
version: 1.8.0
mime:
archive_url: https://pub.dartlang.org/packages/mime/versions/1.0.2.tar.gz
dependency: transitive
description:
name: mime
url: https://pub.dartlang.org
sha256: 1dr3qikzvp10q1saka7azki5gk2kkf2v7k9wfqjsyxmza2zlv896
source: hosted
version: 1.0.2
moxlib:
archive_url: https://git.polynom.me/api/packages/moxxy/pub/api/packages/moxlib/files/0.1.5.tar.gz
dependency: direct main
description:
name: moxlib
url: https://git.polynom.me/api/packages/Moxxy/pub/
sha256: 1j52xglpwy8c7dbylc3f6vrh0p52xhhwqs4h0qcqk8c1rvjn5czq
source: hosted
version: 0.1.5
node_preamble:
archive_url: https://pub.dartlang.org/packages/node_preamble/versions/2.0.1.tar.gz
dependency: transitive
description:
name: node_preamble
url: https://pub.dartlang.org
sha256: 0i0gfc2yqa09182vc01lj47qpq98kfm9m8h4n8c5fby0mjd0lvyx
source: hosted
version: 2.0.1
omemo_dart:
archive_url: https://git.polynom.me/api/packages/PapaTutuWawa/pub/api/packages/omemo_dart/files/0.4.3.tar.gz
dependency: direct main
description:
name: omemo_dart
url: https://git.polynom.me/api/packages/PapaTutuWawa/pub/
sha256: 09x3jqa11hjdjp31nxnz91j6jssbc2f8a1lh44fmkc0d79hs8bbi
source: hosted
version: 0.4.3
package_config:
archive_url: https://pub.dartlang.org/packages/package_config/versions/2.1.0.tar.gz
dependency: transitive
description:
name: package_config
url: https://pub.dartlang.org
sha256: 1d4l0i4cby344zj45f5shrg2pkw1i1jn03kx0qqh0l7gh1ha7bpc
source: hosted
version: 2.1.0
path:
archive_url: https://pub.dartlang.org/packages/path/versions/1.8.2.tar.gz
dependency: transitive
description:
name: path
url: https://pub.dartlang.org
sha256: 16ggdh29ciy7h8sdshhwmxn6dd12sfbykf2j82c56iwhhlljq181
source: hosted
version: 1.8.2
pedantic:
archive_url: https://pub.dartlang.org/packages/pedantic/versions/1.11.1.tar.gz
dependency: transitive
description:
name: pedantic
url: https://pub.dartlang.org
sha256: 10ch0h3hi6cfwiz2ihfkh6m36m75c0m7fd0wwqaqggffsj2dn8ad
source: hosted
version: 1.11.1
petitparser:
archive_url: https://pub.dartlang.org/packages/petitparser/versions/5.1.0.tar.gz
dependency: transitive
description:
name: petitparser
url: https://pub.dartlang.org
sha256: 1pqqqqiy9ald24qsi24q9qrr0zphgpsrnrv9rlx4vwr6xak7d8c0
source: hosted
version: 5.1.0
pinenacl:
archive_url: https://pub.dartlang.org/packages/pinenacl/versions/0.5.1.tar.gz
dependency: transitive
description:
name: pinenacl
url: https://pub.dartlang.org
sha256: 0didjgva658z90hbcmhd0y8w1b8v86dp6gabfhylnw1aixl47cxg
source: hosted
version: 0.5.1
pool:
archive_url: https://pub.dartlang.org/packages/pool/versions/1.5.1.tar.gz
dependency: transitive
description:
name: pool
url: https://pub.dartlang.org
sha256: 0wmzs46hjszv3ayhr1p5l7xza7q9rkg2q9z4swmhdqmhlz3c50x4
source: hosted
version: 1.5.1
pub_semver:
archive_url: https://pub.dartlang.org/packages/pub_semver/versions/2.1.2.tar.gz
dependency: transitive
description:
name: pub_semver
url: https://pub.dartlang.org
sha256: 1vsj5c1f2dza4l5zmjix4zh65lp8gsg6pw01h57pijx2id0g4bwi
source: hosted
version: 2.1.2
pubspec_parse:
archive_url: https://pub.dartlang.org/packages/pubspec_parse/versions/1.2.1.tar.gz
dependency: transitive
description:
name: pubspec_parse
url: https://pub.dartlang.org
sha256: 19dmr9k4wsqjnhlzp1lbrw8dv7a1gnwmr8l5j9zlw407rmfg20d1
source: hosted
version: 1.2.1
random_string:
archive_url: https://pub.dartlang.org/packages/random_string/versions/2.3.1.tar.gz
dependency: direct main
description:
name: random_string
url: https://pub.dartlang.org
sha256: 11cjiv75sgldvk3x7w6j77lgi08r6737wm94m3ylabylsr6zdyff
source: hosted
version: 2.3.1
saslprep:
archive_url: https://pub.dartlang.org/packages/saslprep/versions/1.0.2.tar.gz
dependency: direct main
description:
name: saslprep
url: https://pub.dartlang.org
sha256: 04lss0xvm6p801p8306jdxg7k0b28kr6n65dz2f57dkca237kcw7
source: hosted
version: 1.0.2
shelf:
archive_url: https://pub.dartlang.org/packages/shelf/versions/1.4.0.tar.gz
dependency: transitive
description:
name: shelf
url: https://pub.dartlang.org
sha256: 0x2xl7glrnq0hdxpy2i94a4wxbdrd6dm46hvhzgjn8alsm8z0wz1
source: hosted
version: 1.4.0
shelf_packages_handler:
archive_url: https://pub.dartlang.org/packages/shelf_packages_handler/versions/3.0.1.tar.gz
dependency: transitive
description:
name: shelf_packages_handler
url: https://pub.dartlang.org
sha256: 199rbdbifj46lg3iynznnsbs8zr4dfcw0s7wan8v73nvpqvli82q
source: hosted
version: 3.0.1
shelf_static:
archive_url: https://pub.dartlang.org/packages/shelf_static/versions/1.1.1.tar.gz
dependency: transitive
description:
name: shelf_static
url: https://pub.dartlang.org
sha256: 1kqbaslz7bna9lldda3ibrjg0gczbzlwgm9cic8shg0bnl0v3s34
source: hosted
version: 1.1.1
shelf_web_socket:
archive_url: https://pub.dartlang.org/packages/shelf_web_socket/versions/1.0.3.tar.gz
dependency: transitive
description:
name: shelf_web_socket
url: https://pub.dartlang.org
sha256: 0rr87nx2wdf9alippxiidqlgi82fbprnsarr1jswg9qin0yy4jpn
source: hosted
version: 1.0.3
source_gen:
archive_url: https://pub.dartlang.org/packages/source_gen/versions/1.2.6.tar.gz
dependency: transitive
description:
name: source_gen
url: https://pub.dartlang.org
sha256: 1kxgx782lzpjhv736h0pz3lnxpcgiy05h0ysy0q77gix8q09i1hz
source: hosted
version: 1.2.6
source_helper:
archive_url: https://pub.dartlang.org/packages/source_helper/versions/1.3.3.tar.gz
dependency: transitive
description:
name: source_helper
url: https://pub.dartlang.org
sha256: 044kzmzlfpx93s4raz5avijahizmvai0zvl0lbm4wi93ynhdp1pd
source: hosted
version: 1.3.3
source_map_stack_trace:
archive_url: https://pub.dartlang.org/packages/source_map_stack_trace/versions/2.1.1.tar.gz
dependency: transitive
description:
name: source_map_stack_trace
url: https://pub.dartlang.org
sha256: 0b5d4c5n5qd3j8n10gp1khhr508wfl3819bhk6xnl34qxz8n032k
source: hosted
version: 2.1.1
source_maps:
archive_url: https://pub.dartlang.org/packages/source_maps/versions/0.10.11.tar.gz
dependency: transitive
description:
name: source_maps
url: https://pub.dartlang.org
sha256: 18ixrlz3l2alk3hp0884qj0mcgzhxmjpg6nq0n1200pfy62pc4z6
source: hosted
version: 0.10.11
source_span:
archive_url: https://pub.dartlang.org/packages/source_span/versions/1.9.1.tar.gz
dependency: transitive
description:
name: source_span
url: https://pub.dartlang.org
sha256: 1lq4sy7lw15qsv9cijf6l48p16qr19r7njzwr4pxn8vv1kh6rb86
source: hosted
version: 1.9.1
stack_trace:
archive_url: https://pub.dartlang.org/packages/stack_trace/versions/1.11.0.tar.gz
dependency: transitive
description:
name: stack_trace
url: https://pub.dartlang.org
sha256: 0bggqvvpkrfvqz24bnir4959k0c45azc3zivk4lyv3mvba6092na
source: hosted
version: 1.11.0
stream_channel:
archive_url: https://pub.dartlang.org/packages/stream_channel/versions/2.1.1.tar.gz
dependency: transitive
description:
name: stream_channel
url: https://pub.dartlang.org
sha256: 054by84c60yxphr3qgg6f82gg6d22a54aqjp265anlm8dwz1ji32
source: hosted
version: 2.1.1
stream_transform:
archive_url: https://pub.dartlang.org/packages/stream_transform/versions/2.1.0.tar.gz
dependency: transitive
description:
name: stream_transform
url: https://pub.dartlang.org
sha256: 0jq6767v9ds17i2nd6mdd9i0f7nvsgg3dz74d0v54x66axjgr0gp
source: hosted
version: 2.1.0
string_scanner:
archive_url: https://pub.dartlang.org/packages/string_scanner/versions/1.2.0.tar.gz
dependency: transitive
description:
name: string_scanner
url: https://pub.dartlang.org
sha256: 0p1r0v2923avwfg03rk0pmc6f21m0zxpcx6i57xygd25k6hdfi00
source: hosted
version: 1.2.0
synchronized:
archive_url: https://pub.dartlang.org/packages/synchronized/versions/3.0.0%2B2.tar.gz
dependency: direct main
description:
name: synchronized
url: https://pub.dartlang.org
sha256: 1j6108cq1hbcqpwhk9sah8q3gcidd7222bzhha2nk9syxhzqy82i
source: hosted
version: 3.0.0+2
term_glyph:
archive_url: https://pub.dartlang.org/packages/term_glyph/versions/1.2.1.tar.gz
dependency: transitive
description:
name: term_glyph
url: https://pub.dartlang.org
sha256: 1x8nspxaccls0sxjamp703yp55yxdvhj6wg21lzwd296i9rwlxh9
source: hosted
version: 1.2.1
test:
archive_url: https://pub.dartlang.org/packages/test/versions/1.22.0.tar.gz
dependency: direct dev
description:
name: test
url: https://pub.dartlang.org
sha256: 08kimbjvkdw3bkj7za36p3yqdr8dnlb5v30c250kvdncb7k09h4x
source: hosted
version: 1.22.0
test_api:
archive_url: https://pub.dartlang.org/packages/test_api/versions/0.4.16.tar.gz
dependency: transitive
description:
name: test_api
url: https://pub.dartlang.org
sha256: 0mfyjpqkkmaqdh7xygrydx12591wq9ll816f61n80dc6rmkdx7px
source: hosted
version: 0.4.16
test_core:
archive_url: https://pub.dartlang.org/packages/test_core/versions/0.4.20.tar.gz
dependency: transitive
description:
name: test_core
url: https://pub.dartlang.org
sha256: 1r8dnvkxxvh55z1c8lrsja1m0dkf5i4lgwwqixcx0mqvxx5w3005
source: hosted
version: 0.4.20
timing:
archive_url: https://pub.dartlang.org/packages/timing/versions/1.0.0.tar.gz
dependency: transitive
description:
name: timing
url: https://pub.dartlang.org
sha256: 0a02znvy0fbzr0n4ai67pp8in7w6m768aynkk1kp5lnmgy17ppsg
source: hosted
version: 1.0.0
typed_data:
archive_url: https://pub.dartlang.org/packages/typed_data/versions/1.3.1.tar.gz
dependency: transitive
description:
name: typed_data
url: https://pub.dartlang.org
sha256: 1x402bvyzdmdvmyqhyfamjxf54p9j8sa8ns2n5dwsdhnfqbw859g
source: hosted
version: 1.3.1
unorm_dart:
archive_url: https://pub.dartlang.org/packages/unorm_dart/versions/0.2.0.tar.gz
dependency: transitive
description:
name: unorm_dart
url: https://pub.dartlang.org
sha256: 05kyk2764yz14pzgx00i7h5b1lzh8kjqnxspfzyf8z920bcgbz0v
source: hosted
version: 0.2.0
uuid:
archive_url: https://pub.dartlang.org/packages/uuid/versions/3.0.5.tar.gz
dependency: direct main
description:
name: uuid
url: https://pub.dartlang.org
sha256: 12lsynr07lw9848jknmzxvzn3ia12xdj07iiva0vg0qjvpq7ladg
source: hosted
version: 3.0.5
very_good_analysis:
archive_url: https://pub.dartlang.org/packages/very_good_analysis/versions/3.1.0.tar.gz
dependency: direct dev
description:
name: very_good_analysis
url: https://pub.dartlang.org
sha256: 1p2dh8aahbqyyqfzbsxswafgxnmxgisjq2xfp008skyh7imk6sz4
source: hosted
version: 3.1.0
vm_service:
archive_url: https://pub.dartlang.org/packages/vm_service/versions/9.4.0.tar.gz
dependency: transitive
description:
name: vm_service
url: https://pub.dartlang.org
sha256: 05xaxaxzyfls6jklw1hzws2jmina1cjk10gbl7a63djh1ghnzjb5
source: hosted
version: 9.4.0
watcher:
archive_url: https://pub.dartlang.org/packages/watcher/versions/1.0.2.tar.gz
dependency: transitive
description:
name: watcher
url: https://pub.dartlang.org
sha256: 1sk7gvwa7s0h4l652qrgbh7l8wyqc6nr6lki8m4rj55720p0fnyg
source: hosted
version: 1.0.2
web_socket_channel:
archive_url: https://pub.dartlang.org/packages/web_socket_channel/versions/2.2.0.tar.gz
dependency: transitive
description:
name: web_socket_channel
url: https://pub.dartlang.org
sha256: 147amn05v1f1a1grxjr7yzgshrczjwijwiywggsv6dgic8kxyj5a
source: hosted
version: 2.2.0
webkit_inspection_protocol:
archive_url: https://pub.dartlang.org/packages/webkit_inspection_protocol/versions/1.2.0.tar.gz
dependency: transitive
description:
name: webkit_inspection_protocol
url: https://pub.dartlang.org
sha256: 0z400dzw7gf68a3wm95xi2mf461iigkyq6x69xgi7qs3fvpmn3hx
source: hosted
version: 1.2.0
xml:
archive_url: https://pub.dartlang.org/packages/xml/versions/6.2.0.tar.gz
dependency: direct main
description:
name: xml
url: https://pub.dartlang.org
sha256: 0jwknkfcnb5svg6r01xjsj0aiw06mlx54pgay1ymaaqm2mjhyz01
source: hosted
version: 6.2.0
yaml:
archive_url: https://pub.dartlang.org/packages/yaml/versions/3.1.1.tar.gz
dependency: transitive
description:
name: yaml
url: https://pub.dartlang.org
sha256: 0mqqmzn3c9rr38b5xm312fz1vyp6vb36lm477r9hak77bxzpp0iw
source: hosted
version: 3.1.1

814
nix/pubcache.moxxmpp.nix Normal file
View File

@@ -0,0 +1,814 @@
{fetchzip, runCommand} : rec {
_fe_analyzer_shared = fetchzip {
sha256 = "1hyd5pmjcfyvfwhsc0wq6k0229abmqq5zn95g31hh42bklb2gci5";
url = "https://pub.dartlang.org/packages/_fe_analyzer_shared/versions/50.0.0.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
analyzer = fetchzip {
sha256 = "0niy5b3w39aywpjpw5a84pxdilhh3zzv1c22x8ywml756pybmj4r";
url = "https://pub.dartlang.org/packages/analyzer/versions/5.2.0.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
args = fetchzip {
sha256 = "0c78zkzg2d2kzw1qrpiyrj1qvm4pr0yhnzapbqk347m780ha408g";
url = "https://pub.dartlang.org/packages/args/versions/2.3.1.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
async = fetchzip {
sha256 = "00hhylamsjcqmcbxlsrfimri63gb384l31r9mqvacn6c6bvk4yfx";
url = "https://pub.dartlang.org/packages/async/versions/2.10.0.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
boolean_selector = fetchzip {
sha256 = "0hxq8072hb89q9s91xlz9fvrjxfy7hw6jkdwkph5dp77df841kmj";
url = "https://pub.dartlang.org/packages/boolean_selector/versions/2.1.1.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
build = fetchzip {
sha256 = "1x6nkii6kqy6y7ck0151yfhc9lp2nvbhznnhdi2mxr8afk6jxigd";
url = "https://pub.dartlang.org/packages/build/versions/2.3.1.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
build_config = fetchzip {
sha256 = "092rrbhbdy9fk50jqb1fwj1sfk415fi43irvsd0hk5w90gn8vazj";
url = "https://pub.dartlang.org/packages/build_config/versions/1.1.1.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
build_daemon = fetchzip {
sha256 = "0b6hnwjc3gi5g7cnpy8xyiqigcrs0xp51c7y7v1pqn9v75g25w6j";
url = "https://pub.dartlang.org/packages/build_daemon/versions/3.1.0.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
build_resolvers = fetchzip {
sha256 = "0fnrisgq6rnvbqsf8v43hb11kr1qq6azrxbsvx3wwimd37nxx8m5";
url = "https://pub.dartlang.org/packages/build_resolvers/versions/2.1.0.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
build_runner = fetchzip {
sha256 = "0246bxl9rxgil55fhfzi7csd9a56blj9s1j1z79717hiyzsr60x6";
url = "https://pub.dartlang.org/packages/build_runner/versions/2.3.2.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
build_runner_core = fetchzip {
sha256 = "0bpil0fw0dag3vbnin9p945ymi7xjgkiy7jrq9j52plljf7cnf5z";
url = "https://pub.dartlang.org/packages/build_runner_core/versions/7.2.7.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
built_collection = fetchzip {
sha256 = "0bqjahxr42q84w91nhv3n4cr580l3s3ffx3vgzyyypgqnrck0hv3";
url = "https://pub.dartlang.org/packages/built_collection/versions/5.1.1.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
built_value = fetchzip {
sha256 = "0sslr4258snvcj8qhbdk6wapka174als0viyxddwqlnhs7dlci8i";
url = "https://pub.dartlang.org/packages/built_value/versions/8.4.2.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
checked_yaml = fetchzip {
sha256 = "1gf7ankc5jb7mk17br87ajv05pfg6vb8nf35ay6c35w8jp70ra7k";
url = "https://pub.dartlang.org/packages/checked_yaml/versions/2.0.1.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
code_builder = fetchzip {
sha256 = "1vl9dl23yd0zjw52ndrazijs6dw83fg1rvyb2gfdpd6n1lj9nbhg";
url = "https://pub.dartlang.org/packages/code_builder/versions/4.3.0.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
collection = fetchzip {
sha256 = "1iyl3v3j7mj3sxjf63b1kc182fwrwd04mjp5x2i61hic8ihfw545";
url = "https://pub.dartlang.org/packages/collection/versions/1.17.0.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
convert = fetchzip {
sha256 = "0adsigjk3l1c31i6k91p28dqyjlgwiqrs4lky5djrm2scf8k6cri";
url = "https://pub.dartlang.org/packages/convert/versions/3.1.1.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
coverage = fetchzip {
sha256 = "0akbg1yp2h4vprc8r9xvrpgvp5d26h7m80h5sbzgr5dlis1bcw0d";
url = "https://pub.dartlang.org/packages/coverage/versions/1.6.1.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
crypto = fetchzip {
sha256 = "1kjfb8fvdxazmv9ps2iqdhb8kcr31115h0nwn6v4xmr71k8jb8ds";
url = "https://pub.dartlang.org/packages/crypto/versions/3.0.2.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
cryptography = fetchzip {
sha256 = "0jqph45d9lbhdakprnb84c3qhk4aq05hhb1pmn8w23yhl41ypijs";
url = "https://pub.dartlang.org/packages/cryptography/versions/2.0.5.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
dart_style = fetchzip {
sha256 = "01wg15kalbjlh4i3xbawc9zk8yrk28qhak7xp7mlwn2syhdckn7v";
url = "https://pub.dartlang.org/packages/dart_style/versions/2.2.4.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
file = fetchzip {
sha256 = "0ajcfblf8d4dicp1sgzkbrhd0b0v0d8wl70jsnf5drjck3p3ppk7";
url = "https://pub.dartlang.org/packages/file/versions/6.1.4.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
fixnum = fetchzip {
sha256 = "1m8cdfqp9d6w1cik3fwz9bai1wf9j11rjv2z0zlv7ich87q9kkjk";
url = "https://pub.dartlang.org/packages/fixnum/versions/1.0.1.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
freezed = fetchzip {
sha256 = "1i9s4djf4vlz56zqn8brcck3n7sk07qay23wmaan991cqydd10iq";
url = "https://pub.dartlang.org/packages/freezed/versions/2.1.1.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
freezed_annotation = fetchzip {
sha256 = "0ym120dh1lpfnb68gxh1finm8p9l445q5x10aw8269y469b9k9z3";
url = "https://pub.dartlang.org/packages/freezed_annotation/versions/2.1.0.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
frontend_server_client = fetchzip {
sha256 = "0nv4avkv2if9hdcfzckz36f3mclv7vxchivrg8j3miaqhnjvv4bj";
url = "https://pub.dartlang.org/packages/frontend_server_client/versions/3.1.0.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
glob = fetchzip {
sha256 = "0a6gbwsbz6rkg35dkff0zv88rvcflqdmda90hdfpn7jp1z1w9rhs";
url = "https://pub.dartlang.org/packages/glob/versions/2.1.0.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
graphs = fetchzip {
sha256 = "0cr6dgs1a7ln2ir5gd0kiwpn787lk4dwhqfjv8876hkkr1rv80m9";
url = "https://pub.dartlang.org/packages/graphs/versions/2.2.0.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
hex = fetchzip {
sha256 = "19w3f90mdiy06a6kf8hlwc4jn4cxixkj106kc3g3bis27ar7smkh";
url = "https://pub.dartlang.org/packages/hex/versions/0.2.0.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
http_multi_server = fetchzip {
sha256 = "1zdcm04z85jahb2hs7qs85rh974kw49hffhy9cn1gfda3077dvql";
url = "https://pub.dartlang.org/packages/http_multi_server/versions/3.2.1.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
http_parser = fetchzip {
sha256 = "027c4sjkhkkx3sk1aqs6s4djb87syi9h521qpm1bf21bq3gga5jd";
url = "https://pub.dartlang.org/packages/http_parser/versions/4.0.2.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
io = fetchzip {
sha256 = "1bp5l8hkrp6fjj7zw9af51hxyp52sjspc5558lq0lmi453l0czni";
url = "https://pub.dartlang.org/packages/io/versions/1.0.3.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
js = fetchzip {
sha256 = "13fbxgyg1v6bmzvxamg6494vk3923fn3mgxj6f4y476aqwk99n50";
url = "https://pub.dartlang.org/packages/js/versions/0.6.5.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
json_annotation = fetchzip {
sha256 = "1p9nvn33psx2zbalhyqjw8gr4agd76jj5jq0fdz0i584c7l77bby";
url = "https://pub.dartlang.org/packages/json_annotation/versions/4.7.0.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
json_serializable = fetchzip {
sha256 = "04d7laaxrbiybcgbv3y223hy8d6n9f84h5lv9sv79zd9ffzkb2hg";
url = "https://pub.dartlang.org/packages/json_serializable/versions/6.5.4.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
logging = fetchzip {
sha256 = "0hl1mjh662c44ci7z60x92i0jsyqg1zm6k6fc89n9pdcxsqdpwfs";
url = "https://pub.dartlang.org/packages/logging/versions/1.0.2.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
matcher = fetchzip {
sha256 = "0pjgc38clnjbv124n8bh724db1wcc4kk125j7dxl0icz7clvm0p0";
url = "https://pub.dartlang.org/packages/matcher/versions/0.12.13.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
meta = fetchzip {
sha256 = "01kqdd25nln5a219pr94s66p27m0kpqz0wpmwnm24kdy3ngif1v5";
url = "https://pub.dartlang.org/packages/meta/versions/1.8.0.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
mime = fetchzip {
sha256 = "1dr3qikzvp10q1saka7azki5gk2kkf2v7k9wfqjsyxmza2zlv896";
url = "https://pub.dartlang.org/packages/mime/versions/1.0.2.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
moxlib = fetchzip {
sha256 = "1j52xglpwy8c7dbylc3f6vrh0p52xhhwqs4h0qcqk8c1rvjn5czq";
url = "https://git.polynom.me/api/packages/moxxy/pub/api/packages/moxlib/files/0.1.5.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
node_preamble = fetchzip {
sha256 = "0i0gfc2yqa09182vc01lj47qpq98kfm9m8h4n8c5fby0mjd0lvyx";
url = "https://pub.dartlang.org/packages/node_preamble/versions/2.0.1.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
omemo_dart = fetchzip {
sha256 = "09x3jqa11hjdjp31nxnz91j6jssbc2f8a1lh44fmkc0d79hs8bbi";
url = "https://git.polynom.me/api/packages/PapaTutuWawa/pub/api/packages/omemo_dart/files/0.4.3.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
package_config = fetchzip {
sha256 = "1d4l0i4cby344zj45f5shrg2pkw1i1jn03kx0qqh0l7gh1ha7bpc";
url = "https://pub.dartlang.org/packages/package_config/versions/2.1.0.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
path = fetchzip {
sha256 = "16ggdh29ciy7h8sdshhwmxn6dd12sfbykf2j82c56iwhhlljq181";
url = "https://pub.dartlang.org/packages/path/versions/1.8.2.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
pedantic = fetchzip {
sha256 = "10ch0h3hi6cfwiz2ihfkh6m36m75c0m7fd0wwqaqggffsj2dn8ad";
url = "https://pub.dartlang.org/packages/pedantic/versions/1.11.1.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
petitparser = fetchzip {
sha256 = "1pqqqqiy9ald24qsi24q9qrr0zphgpsrnrv9rlx4vwr6xak7d8c0";
url = "https://pub.dartlang.org/packages/petitparser/versions/5.1.0.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
pinenacl = fetchzip {
sha256 = "0didjgva658z90hbcmhd0y8w1b8v86dp6gabfhylnw1aixl47cxg";
url = "https://pub.dartlang.org/packages/pinenacl/versions/0.5.1.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
pool = fetchzip {
sha256 = "0wmzs46hjszv3ayhr1p5l7xza7q9rkg2q9z4swmhdqmhlz3c50x4";
url = "https://pub.dartlang.org/packages/pool/versions/1.5.1.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
pub_semver = fetchzip {
sha256 = "1vsj5c1f2dza4l5zmjix4zh65lp8gsg6pw01h57pijx2id0g4bwi";
url = "https://pub.dartlang.org/packages/pub_semver/versions/2.1.2.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
pubspec_parse = fetchzip {
sha256 = "19dmr9k4wsqjnhlzp1lbrw8dv7a1gnwmr8l5j9zlw407rmfg20d1";
url = "https://pub.dartlang.org/packages/pubspec_parse/versions/1.2.1.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
random_string = fetchzip {
sha256 = "11cjiv75sgldvk3x7w6j77lgi08r6737wm94m3ylabylsr6zdyff";
url = "https://pub.dartlang.org/packages/random_string/versions/2.3.1.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
saslprep = fetchzip {
sha256 = "04lss0xvm6p801p8306jdxg7k0b28kr6n65dz2f57dkca237kcw7";
url = "https://pub.dartlang.org/packages/saslprep/versions/1.0.2.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
shelf = fetchzip {
sha256 = "0x2xl7glrnq0hdxpy2i94a4wxbdrd6dm46hvhzgjn8alsm8z0wz1";
url = "https://pub.dartlang.org/packages/shelf/versions/1.4.0.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
shelf_packages_handler = fetchzip {
sha256 = "199rbdbifj46lg3iynznnsbs8zr4dfcw0s7wan8v73nvpqvli82q";
url = "https://pub.dartlang.org/packages/shelf_packages_handler/versions/3.0.1.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
shelf_static = fetchzip {
sha256 = "1kqbaslz7bna9lldda3ibrjg0gczbzlwgm9cic8shg0bnl0v3s34";
url = "https://pub.dartlang.org/packages/shelf_static/versions/1.1.1.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
shelf_web_socket = fetchzip {
sha256 = "0rr87nx2wdf9alippxiidqlgi82fbprnsarr1jswg9qin0yy4jpn";
url = "https://pub.dartlang.org/packages/shelf_web_socket/versions/1.0.3.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
source_gen = fetchzip {
sha256 = "1kxgx782lzpjhv736h0pz3lnxpcgiy05h0ysy0q77gix8q09i1hz";
url = "https://pub.dartlang.org/packages/source_gen/versions/1.2.6.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
source_helper = fetchzip {
sha256 = "044kzmzlfpx93s4raz5avijahizmvai0zvl0lbm4wi93ynhdp1pd";
url = "https://pub.dartlang.org/packages/source_helper/versions/1.3.3.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
source_map_stack_trace = fetchzip {
sha256 = "0b5d4c5n5qd3j8n10gp1khhr508wfl3819bhk6xnl34qxz8n032k";
url = "https://pub.dartlang.org/packages/source_map_stack_trace/versions/2.1.1.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
source_maps = fetchzip {
sha256 = "18ixrlz3l2alk3hp0884qj0mcgzhxmjpg6nq0n1200pfy62pc4z6";
url = "https://pub.dartlang.org/packages/source_maps/versions/0.10.11.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
source_span = fetchzip {
sha256 = "1lq4sy7lw15qsv9cijf6l48p16qr19r7njzwr4pxn8vv1kh6rb86";
url = "https://pub.dartlang.org/packages/source_span/versions/1.9.1.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
stack_trace = fetchzip {
sha256 = "0bggqvvpkrfvqz24bnir4959k0c45azc3zivk4lyv3mvba6092na";
url = "https://pub.dartlang.org/packages/stack_trace/versions/1.11.0.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
stream_channel = fetchzip {
sha256 = "054by84c60yxphr3qgg6f82gg6d22a54aqjp265anlm8dwz1ji32";
url = "https://pub.dartlang.org/packages/stream_channel/versions/2.1.1.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
stream_transform = fetchzip {
sha256 = "0jq6767v9ds17i2nd6mdd9i0f7nvsgg3dz74d0v54x66axjgr0gp";
url = "https://pub.dartlang.org/packages/stream_transform/versions/2.1.0.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
string_scanner = fetchzip {
sha256 = "0p1r0v2923avwfg03rk0pmc6f21m0zxpcx6i57xygd25k6hdfi00";
url = "https://pub.dartlang.org/packages/string_scanner/versions/1.2.0.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
synchronized = fetchzip {
sha256 = "1j6108cq1hbcqpwhk9sah8q3gcidd7222bzhha2nk9syxhzqy82i";
url = "https://pub.dartlang.org/packages/synchronized/versions/3.0.0%2B2.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
term_glyph = fetchzip {
sha256 = "1x8nspxaccls0sxjamp703yp55yxdvhj6wg21lzwd296i9rwlxh9";
url = "https://pub.dartlang.org/packages/term_glyph/versions/1.2.1.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
test = fetchzip {
sha256 = "08kimbjvkdw3bkj7za36p3yqdr8dnlb5v30c250kvdncb7k09h4x";
url = "https://pub.dartlang.org/packages/test/versions/1.22.0.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
test_api = fetchzip {
sha256 = "0mfyjpqkkmaqdh7xygrydx12591wq9ll816f61n80dc6rmkdx7px";
url = "https://pub.dartlang.org/packages/test_api/versions/0.4.16.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
test_core = fetchzip {
sha256 = "1r8dnvkxxvh55z1c8lrsja1m0dkf5i4lgwwqixcx0mqvxx5w3005";
url = "https://pub.dartlang.org/packages/test_core/versions/0.4.20.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
timing = fetchzip {
sha256 = "0a02znvy0fbzr0n4ai67pp8in7w6m768aynkk1kp5lnmgy17ppsg";
url = "https://pub.dartlang.org/packages/timing/versions/1.0.0.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
typed_data = fetchzip {
sha256 = "1x402bvyzdmdvmyqhyfamjxf54p9j8sa8ns2n5dwsdhnfqbw859g";
url = "https://pub.dartlang.org/packages/typed_data/versions/1.3.1.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
unorm_dart = fetchzip {
sha256 = "05kyk2764yz14pzgx00i7h5b1lzh8kjqnxspfzyf8z920bcgbz0v";
url = "https://pub.dartlang.org/packages/unorm_dart/versions/0.2.0.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
uuid = fetchzip {
sha256 = "12lsynr07lw9848jknmzxvzn3ia12xdj07iiva0vg0qjvpq7ladg";
url = "https://pub.dartlang.org/packages/uuid/versions/3.0.5.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
very_good_analysis = fetchzip {
sha256 = "1p2dh8aahbqyyqfzbsxswafgxnmxgisjq2xfp008skyh7imk6sz4";
url = "https://pub.dartlang.org/packages/very_good_analysis/versions/3.1.0.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
vm_service = fetchzip {
sha256 = "05xaxaxzyfls6jklw1hzws2jmina1cjk10gbl7a63djh1ghnzjb5";
url = "https://pub.dartlang.org/packages/vm_service/versions/9.4.0.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
watcher = fetchzip {
sha256 = "1sk7gvwa7s0h4l652qrgbh7l8wyqc6nr6lki8m4rj55720p0fnyg";
url = "https://pub.dartlang.org/packages/watcher/versions/1.0.2.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
web_socket_channel = fetchzip {
sha256 = "147amn05v1f1a1grxjr7yzgshrczjwijwiywggsv6dgic8kxyj5a";
url = "https://pub.dartlang.org/packages/web_socket_channel/versions/2.2.0.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
webkit_inspection_protocol = fetchzip {
sha256 = "0z400dzw7gf68a3wm95xi2mf461iigkyq6x69xgi7qs3fvpmn3hx";
url = "https://pub.dartlang.org/packages/webkit_inspection_protocol/versions/1.2.0.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
xml = fetchzip {
sha256 = "0jwknkfcnb5svg6r01xjsj0aiw06mlx54pgay1ymaaqm2mjhyz01";
url = "https://pub.dartlang.org/packages/xml/versions/6.2.0.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
yaml = fetchzip {
sha256 = "0mqqmzn3c9rr38b5xm312fz1vyp6vb36lm477r9hak77bxzpp0iw";
url = "https://pub.dartlang.org/packages/yaml/versions/3.1.1.tar.gz";
stripRoot = false;
extension = "tar.gz";
};
pubCache = runCommand "moxxmpp-pub-cache" {} ''
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${_fe_analyzer_shared} $out/hosted/pub.dartlang.org/_fe_analyzer_shared-50.0.0
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${analyzer} $out/hosted/pub.dartlang.org/analyzer-5.2.0
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${args} $out/hosted/pub.dartlang.org/args-2.3.1
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${async} $out/hosted/pub.dartlang.org/async-2.10.0
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${boolean_selector} $out/hosted/pub.dartlang.org/boolean_selector-2.1.1
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${build} $out/hosted/pub.dartlang.org/build-2.3.1
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${build_config} $out/hosted/pub.dartlang.org/build_config-1.1.1
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${build_daemon} $out/hosted/pub.dartlang.org/build_daemon-3.1.0
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${build_resolvers} $out/hosted/pub.dartlang.org/build_resolvers-2.1.0
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${build_runner} $out/hosted/pub.dartlang.org/build_runner-2.3.2
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${build_runner_core} $out/hosted/pub.dartlang.org/build_runner_core-7.2.7
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${built_collection} $out/hosted/pub.dartlang.org/built_collection-5.1.1
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${built_value} $out/hosted/pub.dartlang.org/built_value-8.4.2
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${checked_yaml} $out/hosted/pub.dartlang.org/checked_yaml-2.0.1
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${code_builder} $out/hosted/pub.dartlang.org/code_builder-4.3.0
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${collection} $out/hosted/pub.dartlang.org/collection-1.17.0
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${convert} $out/hosted/pub.dartlang.org/convert-3.1.1
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${coverage} $out/hosted/pub.dartlang.org/coverage-1.6.1
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${crypto} $out/hosted/pub.dartlang.org/crypto-3.0.2
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${cryptography} $out/hosted/pub.dartlang.org/cryptography-2.0.5
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${dart_style} $out/hosted/pub.dartlang.org/dart_style-2.2.4
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${file} $out/hosted/pub.dartlang.org/file-6.1.4
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${fixnum} $out/hosted/pub.dartlang.org/fixnum-1.0.1
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${freezed} $out/hosted/pub.dartlang.org/freezed-2.1.1
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${freezed_annotation} $out/hosted/pub.dartlang.org/freezed_annotation-2.1.0
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${frontend_server_client} $out/hosted/pub.dartlang.org/frontend_server_client-3.1.0
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${glob} $out/hosted/pub.dartlang.org/glob-2.1.0
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${graphs} $out/hosted/pub.dartlang.org/graphs-2.2.0
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${hex} $out/hosted/pub.dartlang.org/hex-0.2.0
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${http_multi_server} $out/hosted/pub.dartlang.org/http_multi_server-3.2.1
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${http_parser} $out/hosted/pub.dartlang.org/http_parser-4.0.2
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${io} $out/hosted/pub.dartlang.org/io-1.0.3
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${js} $out/hosted/pub.dartlang.org/js-0.6.5
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${json_annotation} $out/hosted/pub.dartlang.org/json_annotation-4.7.0
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${json_serializable} $out/hosted/pub.dartlang.org/json_serializable-6.5.4
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${logging} $out/hosted/pub.dartlang.org/logging-1.0.2
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${matcher} $out/hosted/pub.dartlang.org/matcher-0.12.13
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${meta} $out/hosted/pub.dartlang.org/meta-1.8.0
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${mime} $out/hosted/pub.dartlang.org/mime-1.0.2
mkdir -p $out/hosted/git.polynom.me%47api%47packages%47Moxxy%47pub%47
ln -s ${moxlib} $out/hosted/git.polynom.me%47api%47packages%47Moxxy%47pub%47/moxlib-0.1.5
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${node_preamble} $out/hosted/pub.dartlang.org/node_preamble-2.0.1
mkdir -p $out/hosted/git.polynom.me%47api%47packages%47PapaTutuWawa%47pub%47
ln -s ${omemo_dart} $out/hosted/git.polynom.me%47api%47packages%47PapaTutuWawa%47pub%47/omemo_dart-0.4.3
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${package_config} $out/hosted/pub.dartlang.org/package_config-2.1.0
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${path} $out/hosted/pub.dartlang.org/path-1.8.2
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${pedantic} $out/hosted/pub.dartlang.org/pedantic-1.11.1
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${petitparser} $out/hosted/pub.dartlang.org/petitparser-5.1.0
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${pinenacl} $out/hosted/pub.dartlang.org/pinenacl-0.5.1
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${pool} $out/hosted/pub.dartlang.org/pool-1.5.1
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${pub_semver} $out/hosted/pub.dartlang.org/pub_semver-2.1.2
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${pubspec_parse} $out/hosted/pub.dartlang.org/pubspec_parse-1.2.1
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${random_string} $out/hosted/pub.dartlang.org/random_string-2.3.1
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${saslprep} $out/hosted/pub.dartlang.org/saslprep-1.0.2
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${shelf} $out/hosted/pub.dartlang.org/shelf-1.4.0
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${shelf_packages_handler} $out/hosted/pub.dartlang.org/shelf_packages_handler-3.0.1
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${shelf_static} $out/hosted/pub.dartlang.org/shelf_static-1.1.1
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${shelf_web_socket} $out/hosted/pub.dartlang.org/shelf_web_socket-1.0.3
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${source_gen} $out/hosted/pub.dartlang.org/source_gen-1.2.6
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${source_helper} $out/hosted/pub.dartlang.org/source_helper-1.3.3
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${source_map_stack_trace} $out/hosted/pub.dartlang.org/source_map_stack_trace-2.1.1
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${source_maps} $out/hosted/pub.dartlang.org/source_maps-0.10.11
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${source_span} $out/hosted/pub.dartlang.org/source_span-1.9.1
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${stack_trace} $out/hosted/pub.dartlang.org/stack_trace-1.11.0
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${stream_channel} $out/hosted/pub.dartlang.org/stream_channel-2.1.1
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${stream_transform} $out/hosted/pub.dartlang.org/stream_transform-2.1.0
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${string_scanner} $out/hosted/pub.dartlang.org/string_scanner-1.2.0
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${synchronized} $out/hosted/pub.dartlang.org/synchronized-3.0.0+2
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${term_glyph} $out/hosted/pub.dartlang.org/term_glyph-1.2.1
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${test} $out/hosted/pub.dartlang.org/test-1.22.0
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${test_api} $out/hosted/pub.dartlang.org/test_api-0.4.16
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${test_core} $out/hosted/pub.dartlang.org/test_core-0.4.20
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${timing} $out/hosted/pub.dartlang.org/timing-1.0.0
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${typed_data} $out/hosted/pub.dartlang.org/typed_data-1.3.1
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${unorm_dart} $out/hosted/pub.dartlang.org/unorm_dart-0.2.0
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${uuid} $out/hosted/pub.dartlang.org/uuid-3.0.5
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${very_good_analysis} $out/hosted/pub.dartlang.org/very_good_analysis-3.1.0
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${vm_service} $out/hosted/pub.dartlang.org/vm_service-9.4.0
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${watcher} $out/hosted/pub.dartlang.org/watcher-1.0.2
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${web_socket_channel} $out/hosted/pub.dartlang.org/web_socket_channel-2.2.0
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${webkit_inspection_protocol} $out/hosted/pub.dartlang.org/webkit_inspection_protocol-1.2.0
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${xml} $out/hosted/pub.dartlang.org/xml-6.2.0
mkdir -p $out/hosted/pub.dartlang.org
ln -s ${yaml} $out/hosted/pub.dartlang.org/yaml-3.1.1
'';
}

View File

@@ -9,9 +9,11 @@ Include the following as a dependency in your pubspec file:
``` ```
moxxmpp: moxxmpp:
hosted: https://git.polynom.me/api/packages/Moxxy/pub hosted: https://git.polynom.me/api/packages/Moxxy/pub
version: 0.1.6+1 version: 0.2.0
``` ```
You can find the documentation [here](https://moxxy.org/developers/docs/moxxmpp/).
## License ## License
See `./LICENSE`. See `./LICENSE`.

View File

@@ -373,7 +373,7 @@ class XmppConnection {
/// Called when a stream ending error has occurred /// Called when a stream ending error has occurred
Future<void> handleError(XmppError error) async { Future<void> handleError(XmppError error) async {
_log.severe('handleError called with ${error.toString()}'); _log.severe('handleError called with ${error.toString()}');
// Whenever we encounter an error that would trigger a reconnection attempt while // Whenever we encounter an error that would trigger a reconnection attempt while
// the connection result is being awaited, don't attempt a reconnection but instead // the connection result is being awaited, don't attempt a reconnection but instead
// try to gracefully disconnect. // try to gracefully disconnect.
@@ -390,11 +390,18 @@ class XmppConnection {
return; return;
} }
if (await _connectivityManager.hasConnection()) { if (!error.isRecoverable()) {
// We cannot recover this error
_log.severe('Since a $error is not recoverable, not attempting a reconnection');
await _setConnectionState(XmppConnectionState.error); await _setConnectionState(XmppConnectionState.error);
} else { await _sendEvent(
await _setConnectionState(XmppConnectionState.notConnected); NonRecoverableErrorEvent(error),
);
return;
} }
// The error is recoverable
await _setConnectionState(XmppConnectionState.notConnected);
await _reconnectionPolicy.onFailure(); await _reconnectionPolicy.onFailure();
} }
@@ -783,6 +790,10 @@ class XmppConnection {
// Resolve the connection completion future // Resolve the connection completion future
_connectionCompleter?.complete(const XmppConnectionResult(true)); _connectionCompleter?.complete(const XmppConnectionResult(true));
_connectionCompleter = null; _connectionCompleter = null;
// Tell consumers of the event stream that we're done with stream feature
// negotiations
await _sendEvent(StreamNegotiationsDoneEvent());
// Send out initial presence // Send out initial presence
await getPresenceManager().sendInitialPresence(); await getPresenceManager().sendInitialPresence();

View File

@@ -1,20 +1,37 @@
import 'package:moxxmpp/src/socket.dart'; import 'package:moxxmpp/src/socket.dart';
/// An internal error class /// An internal error class
abstract class XmppError {} // ignore: one_member_abstracts
abstract class XmppError {
/// Return true if we can recover from the error by attempting a reconnection.
bool isRecoverable();
}
/// Returned if we could not establish a TCP connection /// Returned if we could not establish a TCP connection
/// to the server. /// to the server.
class NoConnectionError extends XmppError {} class NoConnectionError extends XmppError {
@override
bool isRecoverable() => true;
}
/// Returned if a socket error occured /// Returned if a socket error occured
class SocketError extends XmppError { class SocketError extends XmppError {
SocketError(this.event); SocketError(this.event);
final XmppSocketErrorEvent event; final XmppSocketErrorEvent event;
@override
bool isRecoverable() => true;
} }
/// Returned if we time out /// Returned if we time out
class TimeoutError extends XmppError {} class TimeoutError extends XmppError {
@override
bool isRecoverable() => true;
}
/// Returned if we received a stream error /// Returned if we received a stream error
class StreamError extends XmppError {} class StreamError extends XmppError {
// TODO(PapaTutuWawa): Be more precise
@override
bool isRecoverable() => true;
}

View File

@@ -1,4 +1,5 @@
import 'package:moxxmpp/src/connection.dart'; import 'package:moxxmpp/src/connection.dart';
import 'package:moxxmpp/src/errors.dart';
import 'package:moxxmpp/src/jid.dart'; import 'package:moxxmpp/src/jid.dart';
import 'package:moxxmpp/src/managers/data.dart'; import 'package:moxxmpp/src/managers/data.dart';
import 'package:moxxmpp/src/roster/roster.dart'; import 'package:moxxmpp/src/roster/roster.dart';
@@ -236,3 +237,15 @@ class OmemoDeviceListUpdatedEvent extends XmppEvent {
final JID jid; final JID jid;
final List<int> deviceList; final List<int> deviceList;
} }
/// Triggered when a reconnection is not performed due to a non-recoverable
/// error.
class NonRecoverableErrorEvent extends XmppEvent {
NonRecoverableErrorEvent(this.error);
/// The error in question.
final XmppError error;
}
/// Triggered when the stream negotiations are done.
class StreamNegotiationsDoneEvent extends XmppEvent {}

View File

@@ -8,6 +8,7 @@ import 'package:moxxmpp/src/managers/namespaces.dart';
import 'package:moxxmpp/src/stringxml.dart'; import 'package:moxxmpp/src/stringxml.dart';
import 'package:moxxmpp/src/xeps/xep_0030/types.dart'; import 'package:moxxmpp/src/xeps/xep_0030/types.dart';
import 'package:moxxmpp/src/xeps/xep_0030/xep_0030.dart'; import 'package:moxxmpp/src/xeps/xep_0030/xep_0030.dart';
import 'package:moxxmpp/src/xeps/xep_0198/xep_0198.dart';
abstract class XmppManagerBase { abstract class XmppManagerBase {
XmppManagerBase(this.id); XmppManagerBase(this.id);
@@ -111,6 +112,15 @@ abstract class XmppManagerBase {
return handled; return handled;
} }
/// Returns true, if the current stream negotiations resulted in a new stream. Useful
/// for plugins to reset their cache in case of a new stream.
/// The value only makes sense after receiving a StreamNegotiationsDoneEvent.
Future<bool> isNewStream() async {
final sm = getAttributes().getManagerById<StreamManagementManager>(smManager);
return sm?.streamResumed == false;
}
/// Sends a reply of the stanza in [data] with [type]. Replaces the original stanza's /// Sends a reply of the stanza in [data] with [type]. Replaces the original stanza's
/// children with [children]. /// children with [children].
/// ///

View File

@@ -8,12 +8,20 @@ import 'package:moxxmpp/src/types/result.dart';
import 'package:moxxmpp/src/xeps/xep_0198/xep_0198.dart'; import 'package:moxxmpp/src/xeps/xep_0198/xep_0198.dart';
import 'package:uuid/uuid.dart'; import 'package:uuid/uuid.dart';
class ResourceBindingFailedError extends NegotiatorError {} class ResourceBindingFailedError extends NegotiatorError {
@override
bool isRecoverable() => true;
}
/// A negotiator that implements resource binding against a random server-provided
/// resource.
class ResourceBindingNegotiator extends XmppFeatureNegotiatorBase { class ResourceBindingNegotiator extends XmppFeatureNegotiatorBase {
ResourceBindingNegotiator() : super(0, false, bindXmlns, resourceBindingNegotiator);
ResourceBindingNegotiator() : _requestSent = false, super(0, false, bindXmlns, resourceBindingNegotiator); /// Flag indicating the state of the negotiator:
bool _requestSent; /// - True: We sent a binding request
/// - False: We have not yet sent the binding request
bool _requestSent = false;
@override @override
bool matchesFeature(List<XMLNode> features) { bool matchesFeature(List<XMLNode> features) {

View File

@@ -1,3 +1,50 @@
import 'package:moxxmpp/src/negotiators/negotiator.dart'; import 'package:moxxmpp/src/negotiators/negotiator.dart';
import 'package:moxxmpp/src/stringxml.dart';
class SaslFailedError extends NegotiatorError {} abstract class SaslError extends NegotiatorError {
static SaslError fromFailure(XMLNode failure) {
XMLNode? error;
for (final child in failure.children) {
if (child.tag == 'text') continue;
error = child;
break;
}
switch (error?.tag) {
case 'credentials-expired': return SaslCredentialsExpiredError();
case 'not-authorized': return SaslNotAuthorizedError();
case 'account-disabled': return SaslAccountDisabledError();
}
return SaslUnspecifiedError();
}
}
/// Triggered when the server returned us a <not-authorized /> failure during SASL
/// (https://xmpp.org/rfcs/rfc6120.html#sasl-errors-not-authorized).
class SaslNotAuthorizedError extends SaslError {
@override
bool isRecoverable() => false;
}
/// Triggered when the server returned us a <credentials-expired /> failure during SASL
/// (https://xmpp.org/rfcs/rfc6120.html#sasl-errors-credentials-expired).
class SaslCredentialsExpiredError extends SaslError {
@override
bool isRecoverable() => false;
}
/// Triggered when the server returned us a <account-disabled /> failure during SASL
/// (https://xmpp.org/rfcs/rfc6120.html#sasl-errors-account-disabled).
class SaslAccountDisabledError extends SaslError {
@override
bool isRecoverable() => false;
}
/// An unspecified SASL error, i.e. everything not matched by any more precise erorr
/// class.
class SaslUnspecifiedError extends SaslError {
@override
bool isRecoverable() => true;
}

View File

@@ -59,7 +59,9 @@ class SaslPlainNegotiator extends SaslNegotiator {
// We assume it's a <failure/> // We assume it's a <failure/>
final error = nonza.children.first.tag; final error = nonza.children.first.tag;
await attributes.sendEvent(AuthenticationFailedEvent(error)); await attributes.sendEvent(AuthenticationFailedEvent(error));
return Result(SaslFailedError()); return Result(
SaslError.fromFailure(nonza),
);
} }
} }
} }

View File

@@ -218,7 +218,9 @@ class SaslScramNegotiator extends SaslNegotiator {
await attributes.sendEvent(AuthenticationFailedEvent(error)); await attributes.sendEvent(AuthenticationFailedEvent(error));
_scramState = ScramState.error; _scramState = ScramState.error;
return Result(SaslFailedError()); return Result(
SaslError.fromFailure(nonza),
);
} }
final challengeBase64 = nonza.innerText(); final challengeBase64 = nonza.innerText();
@@ -236,7 +238,9 @@ class SaslScramNegotiator extends SaslNegotiator {
final error = nonza.children.first.tag; final error = nonza.children.first.tag;
await attributes.sendEvent(AuthenticationFailedEvent(error)); await attributes.sendEvent(AuthenticationFailedEvent(error));
_scramState = ScramState.error; _scramState = ScramState.error;
return Result(SaslFailedError()); return Result(
SaslError.fromFailure(nonza),
);
} }
// NOTE: This assumes that the string is always "v=..." and contains no other parameters // NOTE: This assumes that the string is always "v=..." and contains no other parameters
@@ -246,13 +250,17 @@ class SaslScramNegotiator extends SaslNegotiator {
//final error = nonza.children.first.tag; //final error = nonza.children.first.tag;
//attributes.sendEvent(AuthenticationFailedEvent(error)); //attributes.sendEvent(AuthenticationFailedEvent(error));
_scramState = ScramState.error; _scramState = ScramState.error;
return Result(SaslFailedError()); return Result(
SaslError.fromFailure(nonza),
);
} }
await attributes.sendEvent(AuthenticationSuccessEvent()); await attributes.sendEvent(AuthenticationSuccessEvent());
return const Result(NegotiatorState.done); return const Result(NegotiatorState.done);
case ScramState.error: case ScramState.error:
return Result(SaslFailedError()); return Result(
SaslError.fromFailure(nonza),
);
} }
} }

View File

@@ -10,7 +10,10 @@ enum _StartTlsState {
requested requested
} }
class StartTLSFailedError extends NegotiatorError {} class StartTLSFailedError extends NegotiatorError {
@override
bool isRecoverable() => true;
}
class StartTLSNonza extends XMLNode { class StartTLSNonza extends XMLNode {
StartTLSNonza() : super.xmlns( StartTLSNonza() : super.xmlns(
@@ -19,15 +22,15 @@ class StartTLSNonza extends XMLNode {
); );
} }
/// A negotiator implementing StartTLS.
class StartTlsNegotiator extends XmppFeatureNegotiatorBase { class StartTlsNegotiator extends XmppFeatureNegotiatorBase {
StartTlsNegotiator() : super(10, true, startTlsXmlns, startTlsNegotiator);
StartTlsNegotiator()
: _state = _StartTlsState.ready,
_log = Logger('StartTlsNegotiator'),
super(10, true, startTlsXmlns, startTlsNegotiator);
_StartTlsState _state;
final Logger _log; /// The state of the negotiator.
_StartTlsState _state = _StartTlsState.ready;
/// Logger.
final Logger _log = Logger('StartTlsNegotiator');
@override @override
Future<Result<NegotiatorState, NegotiatorError>> negotiate(XMLNode nonza) async { Future<Result<NegotiatorState, NegotiatorError>> negotiate(XMLNode nonza) async {

View File

@@ -46,9 +46,12 @@ class BlockingManager extends XmppManagerBase {
@override @override
Future<void> onXmppEvent(XmppEvent event) async { Future<void> onXmppEvent(XmppEvent event) async {
if (event is StreamResumeFailedEvent) { if (event is StreamNegotiationsDoneEvent) {
_gotSupported = false; final newStream = await isNewStream();
_supported = false; if (newStream) {
_gotSupported = false;
_supported = false;
}
} }
} }

View File

@@ -59,19 +59,13 @@ class CarbonsManager extends XmppManagerBase {
@override @override
Future<void> onXmppEvent(XmppEvent event) async { Future<void> onXmppEvent(XmppEvent event) async {
if (event is ServerDiscoDoneEvent && !_isEnabled) { if (event is StreamNegotiationsDoneEvent) {
final attrs = getAttributes(); // Reset disco cache info on a new stream
final newStream = await isNewStream();
if (attrs.isFeatureSupported(carbonsXmlns)) { if (newStream) {
logger.finest('Message carbons supported. Enabling...'); _gotSupported = false;
await enableCarbons(); _supported = false;
logger.finest('Message carbons enabled');
} else {
logger.info('Message carbons not supported.');
} }
} else if (event is StreamResumeFailedEvent) {
_gotSupported = false;
_supported = false;
} }
} }

View File

@@ -77,11 +77,14 @@ class HttpFileUploadManager extends XmppManagerBase {
@override @override
Future<void> onXmppEvent(XmppEvent event) async { Future<void> onXmppEvent(XmppEvent event) async {
if (event is StreamResumeFailedEvent) { if (event is StreamNegotiationsDoneEvent) {
_gotSupported = false; final newStream = await isNewStream();
_supported = false; if (newStream) {
_entityJid = null; _gotSupported = false;
_maxUploadSize = null; _supported = false;
_entityJid = null;
_maxUploadSize = null;
}
} }
} }

View File

@@ -0,0 +1,653 @@
packages:
_fe_analyzer_shared:
dependency: transitive
description:
name: _fe_analyzer_shared
url: https://pub.dartlang.org
source: hosted
version: 50.0.0
sha256: 1hyd5pmjcfyvfwhsc0wq6k0229abmqq5zn95g31hh42bklb2gci5
analyzer:
dependency: transitive
description:
name: analyzer
url: https://pub.dartlang.org
source: hosted
version: 5.2.0
sha256: 0niy5b3w39aywpjpw5a84pxdilhh3zzv1c22x8ywml756pybmj4r
args:
dependency: transitive
description:
name: args
url: https://pub.dartlang.org
source: hosted
version: 2.3.1
sha256: 0c78zkzg2d2kzw1qrpiyrj1qvm4pr0yhnzapbqk347m780ha408g
async:
dependency: transitive
description:
name: async
url: https://pub.dartlang.org
source: hosted
version: 2.10.0
sha256: 00hhylamsjcqmcbxlsrfimri63gb384l31r9mqvacn6c6bvk4yfx
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: https://pub.dartlang.org
source: hosted
version: 2.1.1
sha256: 0hxq8072hb89q9s91xlz9fvrjxfy7hw6jkdwkph5dp77df841kmj
build:
dependency: transitive
description:
name: build
url: https://pub.dartlang.org
source: hosted
version: 2.3.1
sha256: 1x6nkii6kqy6y7ck0151yfhc9lp2nvbhznnhdi2mxr8afk6jxigd
build_config:
dependency: transitive
description:
name: build_config
url: https://pub.dartlang.org
source: hosted
version: 1.1.1
sha256: 092rrbhbdy9fk50jqb1fwj1sfk415fi43irvsd0hk5w90gn8vazj
build_daemon:
dependency: transitive
description:
name: build_daemon
url: https://pub.dartlang.org
source: hosted
version: 3.1.0
sha256: 0b6hnwjc3gi5g7cnpy8xyiqigcrs0xp51c7y7v1pqn9v75g25w6j
build_resolvers:
dependency: transitive
description:
name: build_resolvers
url: https://pub.dartlang.org
source: hosted
version: 2.1.0
sha256: 0fnrisgq6rnvbqsf8v43hb11kr1qq6azrxbsvx3wwimd37nxx8m5
build_runner:
dependency: direct dev
description:
name: build_runner
url: https://pub.dartlang.org
source: hosted
version: 2.3.2
sha256: 0246bxl9rxgil55fhfzi7csd9a56blj9s1j1z79717hiyzsr60x6
build_runner_core:
dependency: transitive
description:
name: build_runner_core
url: https://pub.dartlang.org
source: hosted
version: 7.2.7
sha256: 0bpil0fw0dag3vbnin9p945ymi7xjgkiy7jrq9j52plljf7cnf5z
built_collection:
dependency: transitive
description:
name: built_collection
url: https://pub.dartlang.org
source: hosted
version: 5.1.1
sha256: 0bqjahxr42q84w91nhv3n4cr580l3s3ffx3vgzyyypgqnrck0hv3
built_value:
dependency: transitive
description:
name: built_value
url: https://pub.dartlang.org
source: hosted
version: 8.4.2
sha256: 0sslr4258snvcj8qhbdk6wapka174als0viyxddwqlnhs7dlci8i
checked_yaml:
dependency: transitive
description:
name: checked_yaml
url: https://pub.dartlang.org
source: hosted
version: 2.0.1
sha256: 1gf7ankc5jb7mk17br87ajv05pfg6vb8nf35ay6c35w8jp70ra7k
code_builder:
dependency: transitive
description:
name: code_builder
url: https://pub.dartlang.org
source: hosted
version: 4.3.0
sha256: 1vl9dl23yd0zjw52ndrazijs6dw83fg1rvyb2gfdpd6n1lj9nbhg
collection:
dependency: direct main
description:
name: collection
url: https://pub.dartlang.org
source: hosted
version: 1.17.0
sha256: 1iyl3v3j7mj3sxjf63b1kc182fwrwd04mjp5x2i61hic8ihfw545
convert:
dependency: transitive
description:
name: convert
url: https://pub.dartlang.org
source: hosted
version: 3.1.1
sha256: 0adsigjk3l1c31i6k91p28dqyjlgwiqrs4lky5djrm2scf8k6cri
coverage:
dependency: transitive
description:
name: coverage
url: https://pub.dartlang.org
source: hosted
version: 1.6.1
sha256: 0akbg1yp2h4vprc8r9xvrpgvp5d26h7m80h5sbzgr5dlis1bcw0d
crypto:
dependency: transitive
description:
name: crypto
url: https://pub.dartlang.org
source: hosted
version: 3.0.2
sha256: 1kjfb8fvdxazmv9ps2iqdhb8kcr31115h0nwn6v4xmr71k8jb8ds
cryptography:
dependency: direct main
description:
name: cryptography
url: https://pub.dartlang.org
source: hosted
version: 2.0.5
sha256: 0jqph45d9lbhdakprnb84c3qhk4aq05hhb1pmn8w23yhl41ypijs
dart_style:
dependency: transitive
description:
name: dart_style
url: https://pub.dartlang.org
source: hosted
version: 2.2.4
sha256: 01wg15kalbjlh4i3xbawc9zk8yrk28qhak7xp7mlwn2syhdckn7v
file:
dependency: transitive
description:
name: file
url: https://pub.dartlang.org
source: hosted
version: 6.1.4
sha256: 0ajcfblf8d4dicp1sgzkbrhd0b0v0d8wl70jsnf5drjck3p3ppk7
fixnum:
dependency: transitive
description:
name: fixnum
url: https://pub.dartlang.org
source: hosted
version: 1.0.1
sha256: 1m8cdfqp9d6w1cik3fwz9bai1wf9j11rjv2z0zlv7ich87q9kkjk
freezed:
dependency: direct main
description:
name: freezed
url: https://pub.dartlang.org
source: hosted
version: 2.1.1
sha256: 1i9s4djf4vlz56zqn8brcck3n7sk07qay23wmaan991cqydd10iq
freezed_annotation:
dependency: direct main
description:
name: freezed_annotation
url: https://pub.dartlang.org
source: hosted
version: 2.1.0
sha256: 0ym120dh1lpfnb68gxh1finm8p9l445q5x10aw8269y469b9k9z3
frontend_server_client:
dependency: transitive
description:
name: frontend_server_client
url: https://pub.dartlang.org
source: hosted
version: 3.1.0
sha256: 0nv4avkv2if9hdcfzckz36f3mclv7vxchivrg8j3miaqhnjvv4bj
glob:
dependency: transitive
description:
name: glob
url: https://pub.dartlang.org
source: hosted
version: 2.1.0
sha256: 0a6gbwsbz6rkg35dkff0zv88rvcflqdmda90hdfpn7jp1z1w9rhs
graphs:
dependency: transitive
description:
name: graphs
url: https://pub.dartlang.org
source: hosted
version: 2.2.0
sha256: 0cr6dgs1a7ln2ir5gd0kiwpn787lk4dwhqfjv8876hkkr1rv80m9
hex:
dependency: direct main
description:
name: hex
url: https://pub.dartlang.org
source: hosted
version: 0.2.0
sha256: 19w3f90mdiy06a6kf8hlwc4jn4cxixkj106kc3g3bis27ar7smkh
http_multi_server:
dependency: transitive
description:
name: http_multi_server
url: https://pub.dartlang.org
source: hosted
version: 3.2.1
sha256: 1zdcm04z85jahb2hs7qs85rh974kw49hffhy9cn1gfda3077dvql
http_parser:
dependency: transitive
description:
name: http_parser
url: https://pub.dartlang.org
source: hosted
version: 4.0.2
sha256: 027c4sjkhkkx3sk1aqs6s4djb87syi9h521qpm1bf21bq3gga5jd
io:
dependency: transitive
description:
name: io
url: https://pub.dartlang.org
source: hosted
version: 1.0.3
sha256: 1bp5l8hkrp6fjj7zw9af51hxyp52sjspc5558lq0lmi453l0czni
js:
dependency: transitive
description:
name: js
url: https://pub.dartlang.org
source: hosted
version: 0.6.5
sha256: 13fbxgyg1v6bmzvxamg6494vk3923fn3mgxj6f4y476aqwk99n50
json_annotation:
dependency: transitive
description:
name: json_annotation
url: https://pub.dartlang.org
source: hosted
version: 4.7.0
sha256: 1p9nvn33psx2zbalhyqjw8gr4agd76jj5jq0fdz0i584c7l77bby
json_serializable:
dependency: direct main
description:
name: json_serializable
url: https://pub.dartlang.org
source: hosted
version: 6.5.4
sha256: 04d7laaxrbiybcgbv3y223hy8d6n9f84h5lv9sv79zd9ffzkb2hg
logging:
dependency: direct main
description:
name: logging
url: https://pub.dartlang.org
source: hosted
version: 1.0.2
sha256: 0hl1mjh662c44ci7z60x92i0jsyqg1zm6k6fc89n9pdcxsqdpwfs
matcher:
dependency: transitive
description:
name: matcher
url: https://pub.dartlang.org
source: hosted
version: 0.12.13
sha256: 0pjgc38clnjbv124n8bh724db1wcc4kk125j7dxl0icz7clvm0p0
meta:
dependency: direct main
description:
name: meta
url: https://pub.dartlang.org
source: hosted
version: 1.8.0
sha256: 01kqdd25nln5a219pr94s66p27m0kpqz0wpmwnm24kdy3ngif1v5
mime:
dependency: transitive
description:
name: mime
url: https://pub.dartlang.org
source: hosted
version: 1.0.2
sha256: 1dr3qikzvp10q1saka7azki5gk2kkf2v7k9wfqjsyxmza2zlv896
moxlib:
dependency: direct main
description:
name: moxlib
url: https://git.polynom.me/api/packages/Moxxy/pub/
archive_url: https://git.polynom.me/moxxy/-/packages/pub/moxlib/0.1.5/files/57
source: hosted
version: 0.1.5
sha256: 1j52xglpwy8c7dbylc3f6vrh0p52xhhwqs4h0qcqk8c1rvjn5czq
node_preamble:
dependency: transitive
description:
name: node_preamble
url: https://pub.dartlang.org
source: hosted
version: 2.0.1
sha256: 0i0gfc2yqa09182vc01lj47qpq98kfm9m8h4n8c5fby0mjd0lvyx
omemo_dart:
dependency: direct main
description:
name: omemo_dart
url: https://git.polynom.me/api/packages/PapaTutuWawa/pub/
archive_url: https://git.polynom.me/PapaTutuWawa/-/packages/pub/omemo_dart/0.4.3/files/92
source: hosted
version: 0.4.3
sha256: 09x3jqa11hjdjp31nxnz91j6jssbc2f8a1lh44fmkc0d79hs8bbi
package_config:
dependency: transitive
description:
name: package_config
url: https://pub.dartlang.org
source: hosted
version: 2.1.0
sha256: 1d4l0i4cby344zj45f5shrg2pkw1i1jn03kx0qqh0l7gh1ha7bpc
path:
dependency: transitive
description:
name: path
url: https://pub.dartlang.org
source: hosted
version: 1.8.2
sha256: 16ggdh29ciy7h8sdshhwmxn6dd12sfbykf2j82c56iwhhlljq181
pedantic:
dependency: transitive
description:
name: pedantic
url: https://pub.dartlang.org
source: hosted
version: 1.11.1
sha256: 10ch0h3hi6cfwiz2ihfkh6m36m75c0m7fd0wwqaqggffsj2dn8ad
petitparser:
dependency: transitive
description:
name: petitparser
url: https://pub.dartlang.org
source: hosted
version: 5.1.0
sha256: 1pqqqqiy9ald24qsi24q9qrr0zphgpsrnrv9rlx4vwr6xak7d8c0
pinenacl:
dependency: transitive
description:
name: pinenacl
url: https://pub.dartlang.org
source: hosted
version: 0.5.1
sha256: 0didjgva658z90hbcmhd0y8w1b8v86dp6gabfhylnw1aixl47cxg
pool:
dependency: transitive
description:
name: pool
url: https://pub.dartlang.org
source: hosted
version: 1.5.1
sha256: 0wmzs46hjszv3ayhr1p5l7xza7q9rkg2q9z4swmhdqmhlz3c50x4
pub_semver:
dependency: transitive
description:
name: pub_semver
url: https://pub.dartlang.org
source: hosted
version: 2.1.2
sha256: 1vsj5c1f2dza4l5zmjix4zh65lp8gsg6pw01h57pijx2id0g4bwi
pubspec_parse:
dependency: transitive
description:
name: pubspec_parse
url: https://pub.dartlang.org
source: hosted
version: 1.2.1
sha256: 19dmr9k4wsqjnhlzp1lbrw8dv7a1gnwmr8l5j9zlw407rmfg20d1
random_string:
dependency: direct main
description:
name: random_string
url: https://pub.dartlang.org
source: hosted
version: 2.3.1
sha256: 11cjiv75sgldvk3x7w6j77lgi08r6737wm94m3ylabylsr6zdyff
saslprep:
dependency: direct main
description:
name: saslprep
url: https://pub.dartlang.org
source: hosted
version: 1.0.2
sha256: 04lss0xvm6p801p8306jdxg7k0b28kr6n65dz2f57dkca237kcw7
shelf:
dependency: transitive
description:
name: shelf
url: https://pub.dartlang.org
source: hosted
version: 1.4.0
sha256: 0x2xl7glrnq0hdxpy2i94a4wxbdrd6dm46hvhzgjn8alsm8z0wz1
shelf_packages_handler:
dependency: transitive
description:
name: shelf_packages_handler
url: https://pub.dartlang.org
source: hosted
version: 3.0.1
sha256: 199rbdbifj46lg3iynznnsbs8zr4dfcw0s7wan8v73nvpqvli82q
shelf_static:
dependency: transitive
description:
name: shelf_static
url: https://pub.dartlang.org
source: hosted
version: 1.1.1
sha256: 1kqbaslz7bna9lldda3ibrjg0gczbzlwgm9cic8shg0bnl0v3s34
shelf_web_socket:
dependency: transitive
description:
name: shelf_web_socket
url: https://pub.dartlang.org
source: hosted
version: 1.0.3
sha256: 0rr87nx2wdf9alippxiidqlgi82fbprnsarr1jswg9qin0yy4jpn
source_gen:
dependency: transitive
description:
name: source_gen
url: https://pub.dartlang.org
source: hosted
version: 1.2.6
sha256: 1kxgx782lzpjhv736h0pz3lnxpcgiy05h0ysy0q77gix8q09i1hz
source_helper:
dependency: transitive
description:
name: source_helper
url: https://pub.dartlang.org
source: hosted
version: 1.3.3
sha256: 044kzmzlfpx93s4raz5avijahizmvai0zvl0lbm4wi93ynhdp1pd
source_map_stack_trace:
dependency: transitive
description:
name: source_map_stack_trace
url: https://pub.dartlang.org
source: hosted
version: 2.1.1
sha256: 0b5d4c5n5qd3j8n10gp1khhr508wfl3819bhk6xnl34qxz8n032k
source_maps:
dependency: transitive
description:
name: source_maps
url: https://pub.dartlang.org
source: hosted
version: 0.10.11
sha256: 18ixrlz3l2alk3hp0884qj0mcgzhxmjpg6nq0n1200pfy62pc4z6
source_span:
dependency: transitive
description:
name: source_span
url: https://pub.dartlang.org
source: hosted
version: 1.9.1
sha256: 1lq4sy7lw15qsv9cijf6l48p16qr19r7njzwr4pxn8vv1kh6rb86
stack_trace:
dependency: transitive
description:
name: stack_trace
url: https://pub.dartlang.org
source: hosted
version: 1.11.0
sha256: 0bggqvvpkrfvqz24bnir4959k0c45azc3zivk4lyv3mvba6092na
stream_channel:
dependency: transitive
description:
name: stream_channel
url: https://pub.dartlang.org
source: hosted
version: 2.1.1
sha256: 054by84c60yxphr3qgg6f82gg6d22a54aqjp265anlm8dwz1ji32
stream_transform:
dependency: transitive
description:
name: stream_transform
url: https://pub.dartlang.org
source: hosted
version: 2.1.0
sha256: 0jq6767v9ds17i2nd6mdd9i0f7nvsgg3dz74d0v54x66axjgr0gp
string_scanner:
dependency: transitive
description:
name: string_scanner
url: https://pub.dartlang.org
source: hosted
version: 1.2.0
sha256: 0p1r0v2923avwfg03rk0pmc6f21m0zxpcx6i57xygd25k6hdfi00
synchronized:
dependency: direct main
description:
name: synchronized
url: https://pub.dartlang.org
source: hosted
version: 3.0.0+2
sha256: 1j6108cq1hbcqpwhk9sah8q3gcidd7222bzhha2nk9syxhzqy82i
term_glyph:
dependency: transitive
description:
name: term_glyph
url: https://pub.dartlang.org
source: hosted
version: 1.2.1
sha256: 1x8nspxaccls0sxjamp703yp55yxdvhj6wg21lzwd296i9rwlxh9
test:
dependency: direct dev
description:
name: test
url: https://pub.dartlang.org
source: hosted
version: 1.22.0
sha256: 08kimbjvkdw3bkj7za36p3yqdr8dnlb5v30c250kvdncb7k09h4x
test_api:
dependency: transitive
description:
name: test_api
url: https://pub.dartlang.org
source: hosted
version: 0.4.16
sha256: 0mfyjpqkkmaqdh7xygrydx12591wq9ll816f61n80dc6rmkdx7px
test_core:
dependency: transitive
description:
name: test_core
url: https://pub.dartlang.org
source: hosted
version: 0.4.20
sha256: 1r8dnvkxxvh55z1c8lrsja1m0dkf5i4lgwwqixcx0mqvxx5w3005
timing:
dependency: transitive
description:
name: timing
url: https://pub.dartlang.org
source: hosted
version: 1.0.0
sha256: 0a02znvy0fbzr0n4ai67pp8in7w6m768aynkk1kp5lnmgy17ppsg
typed_data:
dependency: transitive
description:
name: typed_data
url: https://pub.dartlang.org
source: hosted
version: 1.3.1
sha256: 1x402bvyzdmdvmyqhyfamjxf54p9j8sa8ns2n5dwsdhnfqbw859g
unorm_dart:
dependency: transitive
description:
name: unorm_dart
url: https://pub.dartlang.org
source: hosted
version: 0.2.0
sha256: 05kyk2764yz14pzgx00i7h5b1lzh8kjqnxspfzyf8z920bcgbz0v
uuid:
dependency: direct main
description:
name: uuid
url: https://pub.dartlang.org
source: hosted
version: 3.0.5
sha256: 12lsynr07lw9848jknmzxvzn3ia12xdj07iiva0vg0qjvpq7ladg
very_good_analysis:
dependency: direct dev
description:
name: very_good_analysis
url: https://pub.dartlang.org
source: hosted
version: 3.1.0
sha256: 1p2dh8aahbqyyqfzbsxswafgxnmxgisjq2xfp008skyh7imk6sz4
vm_service:
dependency: transitive
description:
name: vm_service
url: https://pub.dartlang.org
source: hosted
version: 9.4.0
sha256: 05xaxaxzyfls6jklw1hzws2jmina1cjk10gbl7a63djh1ghnzjb5
watcher:
dependency: transitive
description:
name: watcher
url: https://pub.dartlang.org
source: hosted
version: 1.0.2
sha256: 1sk7gvwa7s0h4l652qrgbh7l8wyqc6nr6lki8m4rj55720p0fnyg
web_socket_channel:
dependency: transitive
description:
name: web_socket_channel
url: https://pub.dartlang.org
source: hosted
version: 2.2.0
sha256: 147amn05v1f1a1grxjr7yzgshrczjwijwiywggsv6dgic8kxyj5a
webkit_inspection_protocol:
dependency: transitive
description:
name: webkit_inspection_protocol
url: https://pub.dartlang.org
source: hosted
version: 1.2.0
sha256: 0z400dzw7gf68a3wm95xi2mf461iigkyq6x69xgi7qs3fvpmn3hx
xml:
dependency: direct main
description:
name: xml
url: https://pub.dartlang.org
source: hosted
version: 6.2.0
sha256: 0jwknkfcnb5svg6r01xjsj0aiw06mlx54pgay1ymaaqm2mjhyz01
yaml:
dependency: transitive
description:
name: yaml
url: https://pub.dartlang.org
source: hosted
version: 3.1.1
sha256: 0mqqmzn3c9rr38b5xm312fz1vyp6vb36lm477r9hak77bxzpp0iw
sdks:
dart: '>=2.18.0 <3.0.0'

View File

@@ -30,8 +30,5 @@ dependencies:
dev_dependencies: dev_dependencies:
build_runner: ^2.1.11 build_runner: ^2.1.11
moxxmpp_socket_tcp:
hosted: https://git.polynom.me/api/packages/Moxxy/pub
version: ^0.1.2+9
test: ^1.16.0 test: ^1.16.0
very_good_analysis: ^3.0.1 very_good_analysis: ^3.0.1

View File

@@ -1,6 +1,6 @@
name: moxxmpp_socket_tcp name: moxxmpp_socket_tcp
description: A socket for moxxmpp using TCP that implements the RFC6120 connection algorithm and XEP-0368 description: A socket for moxxmpp using TCP that implements the RFC6120 connection algorithm and XEP-0368
version: 0.1.2+9 version: 0.2.1
homepage: https://codeberg.org/moxxy/moxxmpp homepage: https://codeberg.org/moxxy/moxxmpp
publish_to: https://git.polynom.me/api/packages/Moxxy/pub publish_to: https://git.polynom.me/api/packages/Moxxy/pub
@@ -12,7 +12,7 @@ dependencies:
meta: ^1.6.0 meta: ^1.6.0
moxxmpp: moxxmpp:
hosted: https://git.polynom.me/api/packages/Moxxy/pub hosted: https://git.polynom.me/api/packages/Moxxy/pub
version: ^0.1.6+1 version: ^0.2.0
dev_dependencies: dev_dependencies:
lints: ^2.0.0 lints: ^2.0.0

74
scripts/lock2nix.py Normal file
View File

@@ -0,0 +1,74 @@
'''
This script generates a .nix file containing all dependencies specified in the
special lock file. The .nix file also contains the derivation "pubCache", which can
be used as the path in the PUB_CACHE environment variable.
'''
import sys
import yaml
import urllib.parse
def generate_derivation(package):
name = package['description']['name']
sha = package['sha256']
version = package['version']
url = ''
if 'archive_url' in package:
url = package['archive_url']
else:
base_url = package['description']['url']
url = f'{base_url}/packages/{name}/versions/{version}.tar.gz'
return f'''
{name} = fetchzip {{
sha256 = "{sha}";
url = "{url}";
stripRoot = false;
extension = "tar.gz";
}};
'''
def main():
if len(sys.argv) != 4:
print('Usage: lock2nix.py <input lock> <output nix> <package name>')
exit(1)
input_file = sys.argv[1]
output_file = sys.argv[2]
package_name = sys.argv[3]
with open(input_file, 'r') as f:
data = yaml.safe_load(f.read())
with open(output_file, 'w') as f:
f.write('# GENERATED BY LOCK2NIX.py\n')
f.write('# DO NOT EDIT BY HAND\n')
f.write('{fetchzip, runCommand} : rec {')
steps = ''
for package in data['packages']:
try:
f.write(generate_derivation(data['packages'][package]))
except ex:
print(f'Failed with {ex} for package {package}')
print(package)
source = data['packages'][package]['source']
prefix = urllib.parse.quote(
data['packages'][package]['description']['url'][8:],
safe='',
).replace('%2F', '%47')
name = data['packages'][package]['description']['name']
version = data['packages'][package]['version']
steps += f'''
mkdir -p $out/{source}/{prefix}
ln -s ${{{package}}} $out/{source}/{prefix}/{name}-{version}
'''
f.write(f'''
pubCache = runCommand "{package_name}-pub-cache" {{}} ''{steps}'';
''')
f.write('\n}')
if __name__ == '__main__':
main()

70
scripts/pubspec2lock.py Normal file
View File

@@ -0,0 +1,70 @@
'''
Takes a Dart pubspec.lock file as input and outputs a specialized lock file
that contains archive URLs and sha256 hashes for nix. Only useful in combination
with lock2nix.py.
'''
import sys
import subprocess
import urllib
import yaml
import requests
def main():
if len(sys.argv) != 3:
print('Usage: pubspec2lock.py <input> <output>')
exit(1)
input_file = sys.argv[1]
output_file = sys.argv[2]
with open(input_file, 'r') as f:
data = yaml.safe_load(f.read())
result = {
'packages': {}
}
for package_name in data['packages']:
print(package_name)
package = data['packages'][package_name]
cleaned_url = package["description"]["url"]
if cleaned_url[-1] == '/':
cleaned_url = cleaned_url[:-1]
latest = requests.get(
f'{cleaned_url}/api/packages/{package_name}',
headers={
'Accept': 'application/vnd.pub.v2+json',
},
)
latest_data = None
try:
latest_data = latest.json()
except:
print(latest.text)
exit(1)
for version_data in latest_data['versions']:
if version_data['version'] == package['version']:
package['archive_url'] = version_data['archive_url']
p = subprocess.run([
'nix-prefetch-url',
'--unpack',
urllib.parse.unquote(version_data['archive_url']),
], capture_output=True)
sha256 = p.stdout.decode('utf8')[:-1]
package['sha256'] = sha256
break
result['packages'][package_name] = package
with open(output_file, 'w') as f:
f.write('# CREATED BY pubspec2lock.py\n')
f.write('# DO NOT EDIT BY HAND\n')
f.write(yaml.dump(result))
if __name__ == '__main__':
main()