Skip to content

Commit 8afaa6a

Browse files
author
myConsciousness
committed
feat: fixed for the issue (myConsciousness#249)
1 parent ce93390 commit 8afaa6a

27 files changed

+400
-40
lines changed

CODE_OF_CONDUCT.md

+88-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,88 @@
1-
../../CODE_OF_CONDUCT.md
1+
# 1. Contributor Covenant Code of Conduct
2+
3+
<!-- TOC -->
4+
5+
- [1. Contributor Covenant Code of Conduct](#1-contributor-covenant-code-of-conduct)
6+
- [1.1. Our Pledge](#11-our-pledge)
7+
- [1.2. Our Standards](#12-our-standards)
8+
- [1.3. Our Responsibilities](#13-our-responsibilities)
9+
- [1.4. Scope](#14-scope)
10+
- [1.5. Enforcement](#15-enforcement)
11+
- [1.6. Attribution](#16-attribution)
12+
13+
<!-- /TOC -->
14+
15+
## 1.1. Our Pledge
16+
17+
In the interest of fostering an open and welcoming environment, we as
18+
contributors and maintainers pledge to making participation in our project and
19+
our community a harassment-free experience for everyone, regardless of age, body
20+
size, disability, ethnicity, sex characteristics, gender identity and expression,
21+
level of experience, education, socio-economic status, nationality, personal
22+
appearance, race, religion, or sexual identity and orientation.
23+
24+
## 1.2. Our Standards
25+
26+
Examples of behavior that contributes to creating a positive environment
27+
include:
28+
29+
- Using welcoming and inclusive language
30+
- Being respectful of differing viewpoints and experiences
31+
- Gracefully accepting constructive criticism
32+
- Focusing on what is best for the community
33+
- Showing empathy towards other community members
34+
35+
Examples of unacceptable behavior by participants include:
36+
37+
- The use of sexualized language or imagery and unwelcome sexual attention or
38+
advances
39+
- Trolling, insulting/derogatory comments, and personal or political attacks
40+
- Public or private harassment
41+
- Publishing others' private information, such as a physical or electronic
42+
address, without explicit permission
43+
- Other conduct which could reasonably be considered inappropriate in a
44+
professional setting
45+
46+
## 1.3. Our Responsibilities
47+
48+
Project maintainers are responsible for clarifying the standards of acceptable
49+
behavior and are expected to take appropriate and fair corrective action in
50+
response to any instances of unacceptable behavior.
51+
52+
Project maintainers have the right and responsibility to remove, edit, or
53+
reject comments, commits, code, wiki edits, issues, and other contributions
54+
that are not aligned to this Code of Conduct, or to ban temporarily or
55+
permanently any contributor for other behaviors that they deem inappropriate,
56+
threatening, offensive, or harmful.
57+
58+
## 1.4. Scope
59+
60+
This Code of Conduct applies both within project spaces and in public spaces
61+
when an individual is representing the project or its community. Examples of
62+
representing a project or community include using an official project e-mail
63+
address, posting via an official social media account, or acting as an appointed
64+
representative at an online or offline event. Representation of a project may be
65+
further defined and clarified by project maintainers.
66+
67+
## 1.5. Enforcement
68+
69+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
70+
reported by contacting the project author at [email protected]. All
71+
complaints will be reviewed and investigated and will result in a response that
72+
is deemed necessary and appropriate to the circumstances. The project team is
73+
obligated to maintain confidentiality with regard to the reporter of an incident.
74+
Further details of specific enforcement policies may be posted separately.
75+
76+
Project maintainers who do not follow or enforce the Code of Conduct in good
77+
faith may face temporary or permanent repercussions as determined by other
78+
members of the project's leadership.
79+
80+
## 1.6. Attribution
81+
82+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
83+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
84+
85+
[homepage]: https://www.contributor-covenant.org
86+
87+
For answers to common questions about this code of conduct, see
88+
https://www.contributor-covenant.org/faq

STYLEGUIDE.md

+10-9
Original file line numberDiff line numberDiff line change
@@ -172,12 +172,13 @@ The only thing to note is the **method name**. The method name should be a name
172172

173173
So `atproto` uses the following standard prefixes depending on endpoint characteristics.
174174

175-
| Prefix | Description |
176-
| ----------- | --------------------------------------------------------------------- |
177-
| **find** | This prefix is attached to endpoints that reference post etc. |
178-
| **search** | This prefix is attached to endpoints that perform extensive searches. |
179-
| **connect** | This prefix is attached to endpoints with high-performance streaming. |
180-
| **create** | This prefix is attached to the endpoint performing the create state. |
181-
| **refresh** | This prefix is attached to the endpoint performing the refresh state. |
182-
| **delete** | This prefix is attached to the endpoint performing the delete state. |
183-
| **update** | This prefix is attached to the endpoint performing the update state. |
175+
| Prefix | Description |
176+
| ----------- | ----------------------------------------------------------------------- |
177+
| **find** | This prefix is attached to endpoints that reference post etc. |
178+
| **search** | This prefix is attached to endpoints that perform extensive searches. |
179+
| **connect** | This prefix is attached to endpoints with high-performance streaming. |
180+
| **create** | This prefix is attached to the endpoint performing the create state. |
181+
| **refresh** | This prefix is attached to the endpoint performing the refresh state. |
182+
| **delete** | This prefix is attached to the endpoint performing the delete state. |
183+
| **update** | This prefix is attached to the endpoint performing the update state. |
184+
| **upload** | This prefix is attached to the endpoint performing the upload contents. |

packages/atproto/README.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ Future<void> main() async {
180180
| ------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
181181
| [POST com.atproto.repo.createRecord](https://github.com/bluesky-social/atproto/blob/main/lexicons/com/atproto/repo/createRecord.json) | [createRecord](https://pub.dev/documentation/atproto/latest/atproto/RepositoriesService/createRecord.html) |
182182
| [POST com.atproto.repo.deleteRecord](https://github.com/bluesky-social/atproto/blob/main/lexicons/com/atproto/repo/deleteRecord.json) | [deleteRecord](https://pub.dev/documentation/atproto/latest/atproto/RepositoriesService/deleteRecord.html) |
183+
| [POST com.atproto.repo.uploadBlob](https://github.com/bluesky-social/atproto/blob/main/lexicons/com/atproto/repo/uploadBlob.json) | [uploadBlob](https://pub.dev/documentation/atproto/latest/atproto/RepositoriesService/uploadBlob.html) |
183184

184185
### 1.3.4. Moderation
185186

@@ -193,12 +194,13 @@ Future<void> main() async {
193194

194195
**atproto** uses the following standard prefixes depending on endpoint characteristics. So it's very easy to find the method corresponding to the endpoint you want to use!
195196

196-
| Prefix | Description |
197-
| ----------- | --------------------------------------------------------------------- |
198-
| **find** | This prefix is attached to endpoints that reference accounts, etc. |
199-
| **create** | This prefix is attached to the endpoint performing the create state. |
200-
| **delete** | This prefix is attached to the endpoint performing the delete state. |
201-
| **refresh** | This prefix is attached to the endpoint performing the refresh state. |
197+
| Prefix | Description |
198+
| ----------- | ----------------------------------------------------------------------- |
199+
| **find** | This prefix is attached to endpoints that reference accounts, etc. |
200+
| **create** | This prefix is attached to the endpoint performing the create state. |
201+
| **delete** | This prefix is attached to the endpoint performing the delete state. |
202+
| **refresh** | This prefix is attached to the endpoint performing the refresh state. |
203+
| **upload** | This prefix is attached to the endpoint performing the upload contents. |
202204

203205
### 1.4.2. Null Parameter at Request
204206

packages/atproto/lib/atproto.dart

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
export 'package:atproto/src/atproto.dart';
66
export 'package:atproto/src/atproto_service.dart';
7+
export 'package:atproto/src/entities/blob.dart';
8+
export 'package:atproto/src/entities/blob_data.dart';
9+
export 'package:atproto/src/entities/blob_ref.dart';
710
export 'package:atproto/src/entities/current_session.dart';
811
export 'package:atproto/src/entities/did.dart';
912
export 'package:atproto/src/entities/record.dart';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Copyright 2023 Shinya Kato. All rights reserved.
2+
// Redistribution and use in source and binary forms, with or without
3+
// modification, are permitted provided the conditions.
4+
5+
// ignore_for_file: invalid_annotation_target
6+
7+
// 📦 Package imports:
8+
import 'package:freezed_annotation/freezed_annotation.dart';
9+
10+
import 'blob.dart';
11+
12+
part 'blob_data.freezed.dart';
13+
part 'blob_data.g.dart';
14+
15+
@freezed
16+
class BlobData with _$BlobData {
17+
const factory BlobData({
18+
required Blob blob,
19+
}) = _BlobData;
20+
21+
factory BlobData.fromJson(Map<String, Object?> json) =>
22+
_$BlobDataFromJson(json);
23+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
// coverage:ignore-file
2+
// GENERATED CODE - DO NOT MODIFY BY HAND
3+
// ignore_for_file: type=lint
4+
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
5+
6+
part of 'blob_data.dart';
7+
8+
// **************************************************************************
9+
// FreezedGenerator
10+
// **************************************************************************
11+
12+
T _$identity<T>(T value) => value;
13+
14+
final _privateConstructorUsedError = UnsupportedError(
15+
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
16+
17+
BlobData _$BlobDataFromJson(Map<String, dynamic> json) {
18+
return _BlobData.fromJson(json);
19+
}
20+
21+
/// @nodoc
22+
mixin _$BlobData {
23+
Blob get blob => throw _privateConstructorUsedError;
24+
25+
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
26+
@JsonKey(ignore: true)
27+
$BlobDataCopyWith<BlobData> get copyWith =>
28+
throw _privateConstructorUsedError;
29+
}
30+
31+
/// @nodoc
32+
abstract class $BlobDataCopyWith<$Res> {
33+
factory $BlobDataCopyWith(BlobData value, $Res Function(BlobData) then) =
34+
_$BlobDataCopyWithImpl<$Res, BlobData>;
35+
@useResult
36+
$Res call({Blob blob});
37+
38+
$BlobCopyWith<$Res> get blob;
39+
}
40+
41+
/// @nodoc
42+
class _$BlobDataCopyWithImpl<$Res, $Val extends BlobData>
43+
implements $BlobDataCopyWith<$Res> {
44+
_$BlobDataCopyWithImpl(this._value, this._then);
45+
46+
// ignore: unused_field
47+
final $Val _value;
48+
// ignore: unused_field
49+
final $Res Function($Val) _then;
50+
51+
@pragma('vm:prefer-inline')
52+
@override
53+
$Res call({
54+
Object? blob = null,
55+
}) {
56+
return _then(_value.copyWith(
57+
blob: null == blob
58+
? _value.blob
59+
: blob // ignore: cast_nullable_to_non_nullable
60+
as Blob,
61+
) as $Val);
62+
}
63+
64+
@override
65+
@pragma('vm:prefer-inline')
66+
$BlobCopyWith<$Res> get blob {
67+
return $BlobCopyWith<$Res>(_value.blob, (value) {
68+
return _then(_value.copyWith(blob: value) as $Val);
69+
});
70+
}
71+
}
72+
73+
/// @nodoc
74+
abstract class _$$_BlobDataCopyWith<$Res> implements $BlobDataCopyWith<$Res> {
75+
factory _$$_BlobDataCopyWith(
76+
_$_BlobData value, $Res Function(_$_BlobData) then) =
77+
__$$_BlobDataCopyWithImpl<$Res>;
78+
@override
79+
@useResult
80+
$Res call({Blob blob});
81+
82+
@override
83+
$BlobCopyWith<$Res> get blob;
84+
}
85+
86+
/// @nodoc
87+
class __$$_BlobDataCopyWithImpl<$Res>
88+
extends _$BlobDataCopyWithImpl<$Res, _$_BlobData>
89+
implements _$$_BlobDataCopyWith<$Res> {
90+
__$$_BlobDataCopyWithImpl(
91+
_$_BlobData _value, $Res Function(_$_BlobData) _then)
92+
: super(_value, _then);
93+
94+
@pragma('vm:prefer-inline')
95+
@override
96+
$Res call({
97+
Object? blob = null,
98+
}) {
99+
return _then(_$_BlobData(
100+
blob: null == blob
101+
? _value.blob
102+
: blob // ignore: cast_nullable_to_non_nullable
103+
as Blob,
104+
));
105+
}
106+
}
107+
108+
/// @nodoc
109+
@JsonSerializable()
110+
class _$_BlobData implements _BlobData {
111+
const _$_BlobData({required this.blob});
112+
113+
factory _$_BlobData.fromJson(Map<String, dynamic> json) =>
114+
_$$_BlobDataFromJson(json);
115+
116+
@override
117+
final Blob blob;
118+
119+
@override
120+
String toString() {
121+
return 'BlobData(blob: $blob)';
122+
}
123+
124+
@override
125+
bool operator ==(dynamic other) {
126+
return identical(this, other) ||
127+
(other.runtimeType == runtimeType &&
128+
other is _$_BlobData &&
129+
(identical(other.blob, blob) || other.blob == blob));
130+
}
131+
132+
@JsonKey(ignore: true)
133+
@override
134+
int get hashCode => Object.hash(runtimeType, blob);
135+
136+
@JsonKey(ignore: true)
137+
@override
138+
@pragma('vm:prefer-inline')
139+
_$$_BlobDataCopyWith<_$_BlobData> get copyWith =>
140+
__$$_BlobDataCopyWithImpl<_$_BlobData>(this, _$identity);
141+
142+
@override
143+
Map<String, dynamic> toJson() {
144+
return _$$_BlobDataToJson(
145+
this,
146+
);
147+
}
148+
}
149+
150+
abstract class _BlobData implements BlobData {
151+
const factory _BlobData({required final Blob blob}) = _$_BlobData;
152+
153+
factory _BlobData.fromJson(Map<String, dynamic> json) = _$_BlobData.fromJson;
154+
155+
@override
156+
Blob get blob;
157+
@override
158+
@JsonKey(ignore: true)
159+
_$$_BlobDataCopyWith<_$_BlobData> get copyWith =>
160+
throw _privateConstructorUsedError;
161+
}

packages/atproto/lib/src/entities/blob_data.g.dart

+26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)