From 8e274a6100f2d3cc5f46d18569f5f9d0ffb00c3f Mon Sep 17 00:00:00 2001 From: xavierchanth Date: Tue, 10 Oct 2023 11:01:14 -0400 Subject: [PATCH] chore: noports_core dev.3 --- .github/composite/verify_cli_tags/action.yaml | 4 +- .../composite/verify_core_tags/action.yaml | 2 +- melos.yaml | 5 + .../lib/src/sshnpd/sshnpd_impl.dart | 6 +- packages/noports_core/lib/src/version.dart | 2 + packages/noports_core/lib/version.dart | 2 - packages/noports_core/pubspec.yaml | 9 +- packages/sshnoports/bin/sshnp.dart | 2 +- packages/sshnoports/bin/sshnpd.dart | 2 +- packages/sshnoports/bin/sshrvd.dart | 2 +- packages/sshnoports/lib/print_version.dart | 8 ++ packages/sshnoports/lib/src/version.dart | 2 + packages/sshnoports/lib/version.dart | 9 -- packages/sshnoports/pubspec.lock | 130 +++++++++++++++++- packages/sshnoports/pubspec.yaml | 6 +- packages/sshnp_gui/pubspec.lock | 42 +++--- 16 files changed, 187 insertions(+), 46 deletions(-) create mode 100644 packages/noports_core/lib/src/version.dart delete mode 100644 packages/noports_core/lib/version.dart create mode 100644 packages/sshnoports/lib/print_version.dart create mode 100644 packages/sshnoports/lib/src/version.dart delete mode 100644 packages/sshnoports/lib/version.dart diff --git a/.github/composite/verify_cli_tags/action.yaml b/.github/composite/verify_cli_tags/action.yaml index 8a49793a7..412b7bf90 100644 --- a/.github/composite/verify_cli_tags/action.yaml +++ b/.github/composite/verify_cli_tags/action.yaml @@ -9,7 +9,7 @@ runs: shell: bash working-directory: ./packages/sshnoports run: | - DART_TAG="v$(egrep -o '^const String version = "(.*)";' lib/version.dart | cut -d'"' -f2)" + DART_TAG="v$(egrep -o '^const String version = "(.*)";' lib/src/version.dart | cut -d'"' -f2)" PUBSPEC_TAG="v$(egrep -o '^version: (.*)$' pubspec.yaml | cut -d':' -f2 | tr -d '[:space:]')" if [ "$PUBSPEC_TAG" != "$DART_TAG" ]; then echo "Tag $PUBSPEC_TAG does not match version in version.dart: $DART_TAG" @@ -23,7 +23,7 @@ runs: # check version.dart REF=${{ github.ref }} TAG=${REF:10} - DART_TAG="v$(egrep -o '^const String version = "(.*)";' lib/version.dart | cut -d'"' -f2)" + DART_TAG="v$(egrep -o '^const String version = "(.*)";' lib/src/version.dart | cut -d'"' -f2)" if [ "$TAG" != "$DART_TAG" ]; then echo "Tag $TAG does not match version in version.dart: $DART_TAG" exit 1 diff --git a/.github/composite/verify_core_tags/action.yaml b/.github/composite/verify_core_tags/action.yaml index eaf2b5e5d..9d26ff98f 100644 --- a/.github/composite/verify_core_tags/action.yaml +++ b/.github/composite/verify_core_tags/action.yaml @@ -9,7 +9,7 @@ runs: shell: bash working-directory: ./packages/noports_core run: | - DART_TAG="v$(grep -Po '^const String version = "(.*)";' lib/version.dart | cut -d'"' -f2)" + DART_TAG="v$(grep -Po '^const String version = "(.*)";' lib/src/version.dart | cut -d'"' -f2)" PUBSPEC_TAG="v$(egrep -o '^version: (.*)$' pubspec.yaml | cut -d':' -f2 | tr -d '[:space:]')" if [ "$PUBSPEC_TAG" != "$DART_TAG" ]; then echo "Tag $PUBSPEC_TAG does not match version in version.dart: $DART_TAG" diff --git a/melos.yaml b/melos.yaml index f1453a5f0..723b3d0ea 100644 --- a/melos.yaml +++ b/melos.yaml @@ -4,3 +4,8 @@ packages: - packages/noports_core - packages/sshnoports - packages/sshnp_gui + +command: + bootstrap: + hooks: + post: dart run melos exec --scope="noports_core" --scope="sshnoports" -- "dart run build_runner build" diff --git a/packages/noports_core/lib/src/sshnpd/sshnpd_impl.dart b/packages/noports_core/lib/src/sshnpd/sshnpd_impl.dart index 95ab2ab53..467334198 100644 --- a/packages/noports_core/lib/src/sshnpd/sshnpd_impl.dart +++ b/packages/noports_core/lib/src/sshnpd/sshnpd_impl.dart @@ -10,7 +10,7 @@ import 'package:meta/meta.dart'; import 'package:noports_core/src/sshrv/sshrv.dart'; import 'package:noports_core/sshnpd.dart'; import 'package:noports_core/utils.dart'; -import 'package:noports_core/version.dart'; +import 'package:noports_core/src/version.dart'; import 'package:uuid/uuid.dart'; @protected @@ -303,7 +303,7 @@ class SSHNPDImpl implements SSHNPD { atKey: atKey, value: jsonEncode({ 'devicename': device, - 'version': version, + 'version': packageVersion, }), ), ); @@ -891,7 +891,7 @@ class SSHNPDImpl implements SSHNPD { atKey, jsonEncode({ 'devicename': device, - 'version': version, + 'version': packageVersion, }), putRequestOptions: PutRequestOptions()..useRemoteAtServer = true, ); diff --git a/packages/noports_core/lib/src/version.dart b/packages/noports_core/lib/src/version.dart new file mode 100644 index 000000000..c7edbf5e8 --- /dev/null +++ b/packages/noports_core/lib/src/version.dart @@ -0,0 +1,2 @@ +// Generated code. Do not modify. +const packageVersion = '4.0.0-dev.3'; diff --git a/packages/noports_core/lib/version.dart b/packages/noports_core/lib/version.dart deleted file mode 100644 index 4cbfe8270..000000000 --- a/packages/noports_core/lib/version.dart +++ /dev/null @@ -1,2 +0,0 @@ -// Note: if you update this version also update pubspec.yaml -const String version = "4.0.0"; diff --git a/packages/noports_core/pubspec.yaml b/packages/noports_core/pubspec.yaml index 343d3b9a4..9fb43c894 100644 --- a/packages/noports_core/pubspec.yaml +++ b/packages/noports_core/pubspec.yaml @@ -1,12 +1,9 @@ name: noports_core description: Core library code for sshnoports - -# NOTE: If you update the version number here, you -# must also update it in version.dart -version: 4.0.0 - homepage: https://docs.atsign.com/ +version: 4.0.0-dev.3 + environment: sdk: ">=3.0.0 <4.0.0" @@ -28,3 +25,5 @@ dev_dependencies: lints: ^2.1.1 mocktail: ^0.3.0 test: ^1.24.4 + build_runner: ^2.4.6 + build_version: ^2.1.1 diff --git a/packages/sshnoports/bin/sshnp.dart b/packages/sshnoports/bin/sshnp.dart index e835d04d0..c01db56ed 100644 --- a/packages/sshnoports/bin/sshnp.dart +++ b/packages/sshnoports/bin/sshnp.dart @@ -10,7 +10,7 @@ import 'package:noports_core/sshnp.dart'; import 'package:noports_core/sshnp_params.dart' show ParserType, SSHNPArg; import 'package:noports_core/utils.dart'; import 'package:sshnoports/create_at_client_cli.dart'; -import 'package:sshnoports/version.dart'; +import 'package:sshnoports/print_version.dart'; void main(List args) async { AtSignLogger.root_level = 'SHOUT'; diff --git a/packages/sshnoports/bin/sshnpd.dart b/packages/sshnoports/bin/sshnpd.dart index 83f1ad273..6ee59f3f6 100644 --- a/packages/sshnoports/bin/sshnpd.dart +++ b/packages/sshnoports/bin/sshnpd.dart @@ -3,7 +3,7 @@ import 'dart:io'; import 'package:at_utils/at_logger.dart'; import 'package:noports_core/sshnpd.dart'; import 'package:sshnoports/create_at_client_cli.dart'; -import 'package:sshnoports/version.dart'; +import 'package:sshnoports/print_version.dart'; void main(List args) async { AtSignLogger.root_level = 'SHOUT'; diff --git a/packages/sshnoports/bin/sshrvd.dart b/packages/sshnoports/bin/sshrvd.dart index 4d067d76c..880d54fdd 100644 --- a/packages/sshnoports/bin/sshrvd.dart +++ b/packages/sshnoports/bin/sshrvd.dart @@ -3,7 +3,7 @@ import 'dart:io'; import 'package:at_utils/at_logger.dart'; import 'package:noports_core/sshrvd.dart'; import 'package:sshnoports/create_at_client_cli.dart'; -import 'package:sshnoports/version.dart'; +import 'package:sshnoports/print_version.dart'; void main(List args) async { AtSignLogger.root_level = 'SHOUT'; diff --git a/packages/sshnoports/lib/print_version.dart b/packages/sshnoports/lib/print_version.dart new file mode 100644 index 000000000..28cdb254f --- /dev/null +++ b/packages/sshnoports/lib/print_version.dart @@ -0,0 +1,8 @@ +import 'dart:io'; + +import 'package:sshnoports/src/version.dart'; + +/// Print version number +void printVersion() { + stdout.writeln('Version : $packageVersion'); +} diff --git a/packages/sshnoports/lib/src/version.dart b/packages/sshnoports/lib/src/version.dart new file mode 100644 index 000000000..f8afc3c53 --- /dev/null +++ b/packages/sshnoports/lib/src/version.dart @@ -0,0 +1,2 @@ +// Generated code. Do not modify. +const packageVersion = '4.0.0-rc.7'; diff --git a/packages/sshnoports/lib/version.dart b/packages/sshnoports/lib/version.dart deleted file mode 100644 index 75dcb4575..000000000 --- a/packages/sshnoports/lib/version.dart +++ /dev/null @@ -1,9 +0,0 @@ -import 'dart:io'; - -// Note: if you update this version also update pubspec.yaml -const String version = "4.0.0-rc.7"; - -/// Print version number -void printVersion() { - stdout.writeln('Version : $version'); -} diff --git a/packages/sshnoports/pubspec.lock b/packages/sshnoports/pubspec.lock index e4e4637ad..c958e53f3 100644 --- a/packages/sshnoports/pubspec.lock +++ b/packages/sshnoports/pubspec.lock @@ -145,6 +145,78 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.1" + build: + dependency: transitive + description: + name: build + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + build_config: + dependency: transitive + description: + name: build_config + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" + source: hosted + version: "1.1.1" + build_daemon: + dependency: transitive + description: + name: build_daemon + sha256: "5f02d73eb2ba16483e693f80bee4f088563a820e47d1027d4cdfe62b5bb43e65" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + sha256: "64e12b0521812d1684b1917bc80945625391cb9bdd4312536b1d69dcb6133ed8" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + build_runner: + dependency: "direct dev" + description: + name: build_runner + sha256: "10c6bcdbf9d049a0b666702cf1cee4ddfdc38f02a19d35ae392863b47519848b" + url: "https://pub.dev" + source: hosted + version: "2.4.6" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + sha256: c9e32d21dd6626b5c163d48b037ce906bbe428bc23ab77bcd77bb21e593b6185 + url: "https://pub.dev" + source: hosted + version: "7.2.11" + build_version: + dependency: "direct dev" + description: + name: build_version + sha256: "4e8eafbf722eac3bd60c8d38f108c04bd69b80100f8792b32be3407725c7fa6a" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: a8de5955205b4d1dbbbc267daddf2178bd737e4bab8987c04a500478c9651e74 + url: "https://pub.dev" + source: hosted + version: "8.6.3" chalkdart: dependency: transitive description: @@ -161,6 +233,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.dev" + source: hosted + version: "2.0.3" clock: dependency: transitive description: @@ -169,6 +249,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.1" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: "1be9be30396d7e4c0db42c35ea6ccd7cc6a1e19916b5dc64d6ac216b5544d677" + url: "https://pub.dev" + source: hosted + version: "4.7.0" collection: dependency: transitive description: @@ -233,6 +321,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.9.5" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: abd7625e16f51f554ea244d090292945ec4d4be7bfbaf2ec8cccea568919d334 + url: "https://pub.dev" + source: hosted + version: "2.3.3" dartssh2: dependency: "direct overridden" description: @@ -305,6 +401,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.2" + graphs: + dependency: transitive + description: + name: graphs + sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + url: "https://pub.dev" + source: hosted + version: "2.3.1" hive: dependency: transitive description: @@ -455,7 +559,7 @@ packages: path: "../noports_core" relative: true source: path - version: "4.0.0" + version: "4.0.0-dev.3" openssh_ed25519: dependency: transitive description: @@ -544,6 +648,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + url: "https://pub.dev" + source: hosted + version: "1.2.3" quiver: dependency: transitive description: @@ -640,6 +752,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.2" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" + source: hosted + version: "2.1.0" string_scanner: dependency: transitive description: @@ -680,6 +800,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.5.7" + timing: + dependency: transitive + description: + name: timing + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + url: "https://pub.dev" + source: hosted + version: "1.0.1" tuple: dependency: transitive description: diff --git a/packages/sshnoports/pubspec.yaml b/packages/sshnoports/pubspec.yaml index 960378af9..4f654a53e 100644 --- a/packages/sshnoports/pubspec.yaml +++ b/packages/sshnoports/pubspec.yaml @@ -1,15 +1,13 @@ name: sshnoports publish_to: none -# NOTE: If you update the version number here, you -# must also update it in version.dart version: 4.0.0-rc.7 environment: sdk: ">=3.0.0 <4.0.0" dependencies: - noports_core: 4.0.0 + noports_core: 4.0.0-dev.3 at_onboarding_cli: 1.3.0 dependency_overrides: @@ -32,3 +30,5 @@ dev_dependencies: lints: ^2.1.1 test: ^1.24.7 mocktail: ^0.3.0 + build_runner: ^2.4.6 + build_version: ^2.1.1 diff --git a/packages/sshnp_gui/pubspec.lock b/packages/sshnp_gui/pubspec.lock index d12df9205..75f428c43 100644 --- a/packages/sshnp_gui/pubspec.lock +++ b/packages/sshnp_gui/pubspec.lock @@ -297,6 +297,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.3" + cryptography: + dependency: transitive + description: + name: cryptography + sha256: d146b76d33d94548cf035233fbc2f4338c1242fa119013bead807d033fc4ae05 + url: "https://pub.dev" + source: hosted + version: "2.7.0" crypton: dependency: transitive description: @@ -763,7 +771,15 @@ packages: path: "../noports_core" relative: true source: path - version: "4.0.0" + version: "4.0.0-dev.3" + openssh_ed25519: + dependency: transitive + description: + name: openssh_ed25519 + sha256: eb65bfb9158c05c294d653f639bb9b4b18aca6dfd010986e4f325e439a93655f + url: "https://pub.dev" + source: hosted + version: "1.1.0" package_config: dependency: transitive description: @@ -964,6 +980,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.1" + posix: + dependency: transitive + description: + name: posix + sha256: "3ad26924254fd2354b0e2b95fc8b45ac392ad87434f8e64807b3a1ac077f2256" + url: "https://pub.dev" + source: hosted + version: "5.0.0" process: dependency: transitive description: @@ -1154,14 +1178,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" - ssh_key: - dependency: transitive - description: - name: ssh_key - sha256: ded1af84f2c34748c000101940e7b9a63a077c9a136aaab85dbf54a6e9d19ec8 - url: "https://pub.dev" - source: hosted - version: "0.8.0" stack_trace: dependency: transitive description: @@ -1226,14 +1242,6 @@ packages: url: "https://pub.dev" source: hosted version: "0.5.3" - tuple: - dependency: transitive - description: - name: tuple - sha256: a97ce2013f240b2f3807bcbaf218765b6f301c3eff91092bcfa23a039e7dd151 - url: "https://pub.dev" - source: hosted - version: "2.0.2" tutorial_coach_mark: dependency: transitive description: