Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
committed Jan 16, 2025
1 parent 5fe4f8f commit d399a77
Show file tree
Hide file tree
Showing 7 changed files with 158 additions and 295 deletions.
50 changes: 9 additions & 41 deletions package/server_universe/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -224,22 +224,14 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
freezed_annotation:
dependency: transitive
description:
name: freezed_annotation
sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2
url: "https://pub.dev"
source: hosted
version: "2.4.4"
general_lib:
dependency: transitive
description:
name: general_lib
sha256: "675da67d0d8e784a4522f9253d69280c2a057292a777b583b5bc6c0a2097afc7"
sha256: bff531490838182bc0abc1c47df25d32ab14279e5ac5513fcd149193fef2efbf
url: "https://pub.dev"
source: hosted
version: "0.0.58"
version: "0.0.60"
glob:
dependency: transitive
description:
Expand Down Expand Up @@ -276,10 +268,10 @@ packages:
dependency: transitive
description:
name: io
sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e"
sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b
url: "https://pub.dev"
source: hosted
version: "1.0.4"
version: "1.0.5"
io_universe:
dependency: transitive
description:
Expand All @@ -296,14 +288,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.7.1"
json_annotation:
dependency: transitive
description:
name: json_annotation
sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1"
url: "https://pub.dev"
source: hosted
version: "4.9.0"
leak_tracker:
dependency: transitive
description:
Expand Down Expand Up @@ -352,14 +336,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.1.3-main.0"
mason_logger:
dependency: transitive
description:
name: mason_logger
sha256: b6d6d159927a4165f197ffc5993ea680dd41c59daf35bff23bae28390c09a36e
url: "https://pub.dev"
source: hosted
version: "0.3.1"
matcher:
dependency: transitive
description:
Expand Down Expand Up @@ -478,7 +454,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.31"
version: "0.0.33"
sky_engine:
dependency: transitive
description: flutter
Expand Down Expand Up @@ -560,10 +536,10 @@ packages:
dependency: transitive
description:
name: typings_fork
sha256: "08900b86a65b4cf52d13b5c5494c9ef9805dd70d52975b16fe077e6bb14a35d0"
sha256: "50a34b8f276f98822d24eb16367a2c4e7b85b0aa1e822d07287908ca6c1d3c71"
url: "https://pub.dev"
source: hosted
version: "0.0.5"
version: "0.0.6"
vector_math:
dependency: transitive
description:
Expand Down Expand Up @@ -600,10 +576,10 @@ packages:
dependency: transitive
description:
name: win32
sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a"
sha256: "154360849a56b7b67331c21f09a386562d88903f90a1099c5987afc1912e1f29"
url: "https://pub.dev"
source: hosted
version: "5.5.4"
version: "5.10.0"
xml:
dependency: transitive
description:
Expand All @@ -620,14 +596,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.1.3"
yaml_writer:
dependency: transitive
description:
name: yaml_writer
sha256: "2ae2cd5f5a612a930ef2b1b40df540c819ab85e301f26dfaf0b6201b857db825"
url: "https://pub.dev"
source: hosted
version: "2.0.1"
zxing2:
dependency: transitive
description:
Expand Down
4 changes: 2 additions & 2 deletions package/server_universe/lib/api/server_universe_api_core.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ Bukan maksud kami menipu itu karena harga yang sudah di kalkulasi + bantuan tiba
import 'dart:async';
import 'dart:io';

import 'package:general_lib/fork/yaml_writer/core/yaml_writer.dart';
import 'package:general_lib/general_lib.dart';
import 'package:general_lib/watch/watch.dart';
import 'package:server_universe/scheme/scheme/scheme.dart';
import "package:path/path.dart" as path;
import "package:yaml/yaml.dart" as yaml;
import 'package:yaml_writer/yaml_writer.dart';

/// build type server
enum ServerUniverseBuildType {
Expand Down Expand Up @@ -262,7 +262,7 @@ class ServerUniverseApi {
value: "Start Save Pubspec: ${path.basename(file_pubspec.path)}");

String yaml_documents_new =
YamlWriter().write(pubspec_server_universe.toJson());
YamlWriterGeneralLib().write(pubspec_server_universe.toJson());

await file_pubspec.writeAsString(yaml_documents_new);
yield ServerUniverseApiStatus(
Expand Down
2 changes: 1 addition & 1 deletion package/server_universe/lib/cli/server_universe_cli.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ Bukan maksud kami menipu itu karena harga yang sudah di kalkulasi + bantuan tiba
import 'dart:io';

import 'package:general_lib/extension/extension.dart';
import 'package:general_lib/fork/mason_logger/mason_logger.dart';
import 'package:server_universe/api/server_universe_api_core.dart';
import 'package:general_lib/args/args.dart';
import 'package:mason_logger/mason_logger.dart';

/// ServerUniverseUncompleteDocumentation
Logger logger = Logger();
Expand Down
141 changes: 132 additions & 9 deletions package/server_universe/lib/edge/core/form_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,11 @@ Bukan maksud kami menipu itu karena harga yang sudah di kalkulasi + bantuan tiba
<!-- END LICENSE --> */
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:typings_fork/core.dart' as interop;

import 'package:server_universe/edge/core/file.dart';

part 'form_data.freezed.dart';
// part 'form_data.freezed.dart';

/// ServerUniverseUncompleteDocumentation
class FormData {
Expand Down Expand Up @@ -122,17 +121,141 @@ class FormData {
FormData formDataFromJsObject(interop.FormData delegate) {
return FormData._(delegate);
}

/// Represents a form data entry.
@Freezed(
equal: false,
copyWith: false,
map: FreezedMapOptions.none,
)
///
class FormDataEntryValue with _$FormDataEntryValue {
/// ServerUniverseUncompleteDocumentation
const factory FormDataEntryValue.file(File file) = FileValue;

/// Creates a [FormDataEntryValue] instance from a [String].
const factory FormDataEntryValue.string(String value) = StringValue;
}

///
// // ignore: unused_element
// T _$identity<T>(T value) => value;

final _privateConstructorUsedError = UnsupportedError(
'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');

/// @nodoc
mixin _$FormDataEntryValue {
TResult when<TResult extends Object?>({
required TResult Function(File file) file,
required TResult Function(String value) string,
}) =>
throw _privateConstructorUsedError;

TResult? whenOrNull<TResult extends Object?>({
TResult? Function(File file)? file,
TResult? Function(String value)? string,
}) =>
throw _privateConstructorUsedError;

TResult maybeWhen<TResult extends Object?>({
TResult Function(File file)? file,
TResult Function(String value)? string,

required TResult Function() orElse,
}) =>
throw _privateConstructorUsedError;
}

/// @nodoc
class _$FileValue implements FileValue {
const _$FileValue(this.file);

@override
final File file;

@override
String toString() {
return 'FormDataEntryValue.file(file: $file)';
}

@override
TResult when<TResult extends Object?>({
required TResult Function(File file) file,
required TResult Function(String value) string,
}) {
return file(this.file);
}

@override
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(File file)? file,
TResult? Function(String value)? string,
}) {
return file?.call(this.file);
}

@override
TResult maybeWhen<TResult extends Object?>({
TResult Function(File file)? file,
TResult Function(String value)? string,
///
required TResult Function() orElse,
}) {
if (file != null) {
return file(this.file);
}
return orElse();
}
}
///
abstract class FileValue implements FormDataEntryValue {
///
const factory FileValue(final File file) = _$FileValue;
///
File get file;
}

/// @nodoc
class _$StringValue implements StringValue {
const _$StringValue(this.value);

@override
final String value;

@override
String toString() {
return 'FormDataEntryValue.string(value: $value)';
}

@override
TResult when<TResult extends Object?>({
required TResult Function(File file) file,
required TResult Function(String value) string,
}) {
return string(value);
}

@override
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(File file)? file,
TResult? Function(String value)? string,
}) {
return string?.call(value);
}

@override
TResult maybeWhen<TResult extends Object?>({
TResult Function(File file)? file,
TResult Function(String value)? string,

required TResult Function() orElse,
}) {
if (string != null) {
return string(value);
}
return orElse();
}
}
///
abstract class StringValue implements FormDataEntryValue {
///
const factory StringValue(final String value) = _$StringValue;
///
String get value;
}
Loading

0 comments on commit d399a77

Please sign in to comment.