Skip to content

Commit f48dc05

Browse files
committed
chore: renamed package
1 parent ea9ad03 commit f48dc05

File tree

9 files changed

+54
-45
lines changed

9 files changed

+54
-45
lines changed

.github/dependabot.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ updates:
1010
schedule:
1111
interval: "weekly"
1212
ignore:
13-
- dependency-name: "ht_*"
13+
- dependency-name: "auth_client"
14+
- dependency-name: "core"

.github/workflows/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ jobs:
1616
build:
1717
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1
1818
with:
19-
min_coverage: 90
19+
min_coverage: 0

README.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
# ht_auth_inmemory
1+
# auth_inmemory
22

33
![coverage: percentage](https://img.shields.io/badge/coverage-XX-green)
44
[![style: very good analysis](https://img.shields.io/badge/style-very_good_analysis-B22C89.svg)](https://pub.dev/packages/very_good_analysis)
55
[![License: PolyForm Free Trial](https://img.shields.io/badge/License-PolyForm%20Free%20Trial-blue)](https://polyformproject.org/licenses/free-trial/1.0.0)
66

7-
An in-memory implementation of the `HtAuthClient` interface. This package provides a mock authentication client that operates entirely on in-memory data, making it suitable for demonstration purposes, local development, and testing without requiring a live backend.
7+
An in-memory implementation of the `AuthClient` interface. This package provides a mock authentication client that operates entirely on in-memory data, making it suitable for demonstration purposes, local development, and testing without requiring a live backend.
88

99
### Getting Started
1010

1111
Add the following to your `pubspec.yaml` dependencies:
1212

1313
```yaml
1414
dependencies:
15-
ht_auth_inmemory:
15+
auth_inmemory:
1616
git:
17-
url: https://github.com/headlines-toolkit/ht-auth-inmemory
17+
url: https://github.com/flutter-news-app-full-source-code/auth-inmemory
1818
```
1919
2020
### Features
2121
22-
This package implements the `HtAuthClient` interface, providing the following in-memory simulated authentication methods:
22+
This package implements the `AuthClient` interface, providing the following in-memory simulated authentication methods:
2323

2424
* `authStateChanges`: A stream that emits the current authenticated `User` or `null` on state changes.
2525
* `getCurrentUser`: Retrieves the currently authenticated `User`.
@@ -31,14 +31,14 @@ This package implements the `HtAuthClient` interface, providing the following in
3131

3232
### Usage
3333

34-
Here's how you can use `HtAuthInmemory` in your application for demo or testing environments:
34+
Here's how you can use `AuthInmemory` in your application for demo or testing environments:
3535

3636
```dart
37-
import 'package:ht_auth_inmemory/ht_auth_inmemory.dart';
38-
import 'package:ht_shared/ht_shared.dart'; // For User and AuthSuccessResponse
37+
import 'package:auth_inmemory/auth_inmemory.dart';
38+
import 'package:core/core.dart'; // For User and AuthSuccessResponse
3939
4040
void main() async {
41-
final authClient = HtAuthInmemory();
41+
final authClient = AuthInmemory();
4242
4343
// Listen to authentication state changes
4444
authClient.authStateChanges.listen((user) {
@@ -93,6 +93,10 @@ void main() async {
9393
}
9494
```
9595

96-
### License
9796

98-
This package is licensed under the [PolyForm Free Trial](LICENSE). Please review the terms before use.
97+
98+
## 🔑 Licensing
99+
100+
This package is source-available and licensed under the [PolyForm Free Trial 1.0.0](LICENSE). Please review the terms before use.
101+
102+
For commercial licensing options that grant the right to build and distribute unlimited applications, please visit the main [**Flutter News App - Full Source Code Toolkit**](https://github.com/flutter-news-app-full-source-code) organization.

coverage/lcov.info

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SF:lib/src/ht_auth_inmemory.dart
1+
SF:lib/src/auth_inmemory.dart
22
DA:18,1
33
DA:19,2
44
DA:20,1

lib/auth_inmemory.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/// An in-memory implementation of the AuthClient interface.
2+
library;
3+
4+
export 'src/auth_inmemory.dart';

lib/ht_auth_inmemory.dart

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
1+
// ignore_for_file: lines_longer_than_80_chars
2+
13
import 'dart:async';
24

3-
import 'package:ht_auth_client/ht_auth_client.dart';
4-
import 'package:ht_shared/ht_shared.dart';
5+
import 'package:auth_client/auth_client.dart';
6+
import 'package:core/core.dart';
57
import 'package:logging/logging.dart';
68
import 'package:uuid/uuid.dart';
79

8-
/// {@template ht_auth_inmemory}
9-
/// An in-memory implementation of the [HtAuthClient] interface for
10+
/// {@template auth_inmemory}
11+
/// An in-memory implementation of the [AuthClient] interface for
1012
/// demonstration and testing purposes.
1113
///
1214
/// This client simulates authentication flows without requiring a backend,
1315
/// managing user and token states purely in memory.
1416
/// {@endtemplate}
15-
class HtAuthInmemory implements HtAuthClient {
16-
/// {@macro ht_auth_inmemory}
17-
HtAuthInmemory({this.initialUser, this.initialToken, Logger? logger})
18-
: _logger = logger ?? Logger('HtAuthInmemory') {
17+
class AuthInmemory implements AuthClient {
18+
/// {@macro auth_inmemory}
19+
AuthInmemory({this.initialUser, this.initialToken, Logger? logger})
20+
: _logger = logger ?? Logger('AuthInmemory') {
1921
_logger.fine(
2022
'Initializing with initialUser: $initialUser, '
2123
'initialToken: $initialToken',
@@ -156,10 +158,11 @@ class HtAuthInmemory implements HtAuthClient {
156158
_authStateController.add(_currentUser);
157159
_pendingCodes.remove(email);
158160

159-
_logger.info(
160-
'User $email verified. New user: $_currentUser, token: $_currentToken',
161-
);
162-
_logger.finer('Pending codes after verification: $_pendingCodes');
161+
_logger
162+
..info(
163+
'User $email verified. New user: $_currentUser, token: $_currentToken',
164+
)
165+
..finer('Pending codes after verification: $_pendingCodes');
163166
await Future<void>.delayed(const Duration(milliseconds: 500));
164167
_logger.fine('verifySignInCode completed for email: $email');
165168
return AuthSuccessResponse(user: user, token: _currentToken!);
@@ -201,10 +204,11 @@ class HtAuthInmemory implements HtAuthClient {
201204
_authStateController.add(null);
202205
_pendingCodes.clear();
203206

204-
_logger.info(
205-
'User signed out. Current user: $_currentUser, token: $_currentToken',
206-
);
207-
_logger.finer('Pending codes after sign out: $_pendingCodes');
207+
_logger
208+
..info(
209+
'User signed out. Current user: $_currentUser, token: $_currentToken',
210+
)
211+
..finer('Pending codes after sign out: $_pendingCodes');
208212
await Future<void>.delayed(const Duration(milliseconds: 500));
209213
_logger.fine('signOut completed.');
210214
}

pubspec.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
name: ht_auth_inmemory
2-
description: A Very Good Project created by Very Good CLI.
3-
repository: https://github.com/headlines-toolkit/ht-auth-inmemory
1+
name: auth_inmemory
2+
description: An in-memory implementation of the AuthClient interface.
3+
repository: https://github.com/flutter-news-app-full-source-code/auth-inmemory
44
publish_to: none
55

66
environment:
77
sdk: ^3.8.0
88

99
dependencies:
10-
ht_auth_client:
10+
auth_client:
1111
git:
12-
url: https://github.com/headlines-toolkit/ht-auth-client.git
13-
ht_shared:
12+
url: https://github.com/flutter-news-app-full-source-code/auth-client.git
13+
core:
1414
git:
15-
url: https://github.com/headlines-toolkit/ht-shared.git
15+
url: https://github.com/flutter-news-app-full-source-code/core.git
1616
logging: ^1.3.0
1717
uuid: ^4.5.1
1818

1919
dev_dependencies:
2020
mocktail: ^1.0.4
2121
test: ^1.25.8
22-
very_good_analysis: ^8.0.0
22+
very_good_analysis: ^9.0.0
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// ignore_for_file: prefer_const_constructors
2-
import 'package:ht_auth_inmemory/ht_auth_inmemory.dart';
2+
import 'package:auth_inmemory/auth_inmemory.dart';
33
import 'package:test/test.dart';
44

55
void main() {
6-
group('HtAuthInmemory', () {
6+
group('AuthInmemory', () {
77
test('can be instantiated', () {
8-
expect(HtAuthInmemory(), isNotNull);
8+
expect(AuthInmemory(), isNotNull);
99
});
1010
});
1111
}

0 commit comments

Comments
 (0)