sera-2 1.6.6__tar.gz → 1.7.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. {sera_2-1.6.6 → sera_2-1.7.0}/PKG-INFO +1 -1
  2. {sera_2-1.6.6 → sera_2-1.7.0}/pyproject.toml +1 -1
  3. {sera_2-1.6.6 → sera_2-1.7.0}/sera/make/make_typescript_model.py +3 -1
  4. {sera_2-1.6.6 → sera_2-1.7.0}/sera/models/_constraints.py +1 -1
  5. {sera_2-1.6.6 → sera_2-1.7.0}/README.md +0 -0
  6. {sera_2-1.6.6 → sera_2-1.7.0}/sera/__init__.py +0 -0
  7. {sera_2-1.6.6 → sera_2-1.7.0}/sera/constants.py +0 -0
  8. {sera_2-1.6.6 → sera_2-1.7.0}/sera/libs/__init__.py +0 -0
  9. {sera_2-1.6.6 → sera_2-1.7.0}/sera/libs/api_helper.py +0 -0
  10. {sera_2-1.6.6 → sera_2-1.7.0}/sera/libs/base_orm.py +0 -0
  11. {sera_2-1.6.6 → sera_2-1.7.0}/sera/libs/base_service.py +0 -0
  12. {sera_2-1.6.6 → sera_2-1.7.0}/sera/make/__init__.py +0 -0
  13. {sera_2-1.6.6 → sera_2-1.7.0}/sera/make/__main__.py +0 -0
  14. {sera_2-1.6.6 → sera_2-1.7.0}/sera/make/make_app.py +0 -0
  15. {sera_2-1.6.6 → sera_2-1.7.0}/sera/make/make_python_api.py +0 -0
  16. {sera_2-1.6.6 → sera_2-1.7.0}/sera/make/make_python_model.py +0 -0
  17. {sera_2-1.6.6 → sera_2-1.7.0}/sera/make/make_python_services.py +0 -0
  18. {sera_2-1.6.6 → sera_2-1.7.0}/sera/misc/__init__.py +0 -0
  19. {sera_2-1.6.6 → sera_2-1.7.0}/sera/misc/_formatter.py +0 -0
  20. {sera_2-1.6.6 → sera_2-1.7.0}/sera/misc/_utils.py +0 -0
  21. {sera_2-1.6.6 → sera_2-1.7.0}/sera/models/__init__.py +0 -0
  22. {sera_2-1.6.6 → sera_2-1.7.0}/sera/models/_class.py +0 -0
  23. {sera_2-1.6.6 → sera_2-1.7.0}/sera/models/_collection.py +0 -0
  24. {sera_2-1.6.6 → sera_2-1.7.0}/sera/models/_datatype.py +0 -0
  25. {sera_2-1.6.6 → sera_2-1.7.0}/sera/models/_default.py +0 -0
  26. {sera_2-1.6.6 → sera_2-1.7.0}/sera/models/_enum.py +0 -0
  27. {sera_2-1.6.6 → sera_2-1.7.0}/sera/models/_module.py +0 -0
  28. {sera_2-1.6.6 → sera_2-1.7.0}/sera/models/_multi_lingual_string.py +0 -0
  29. {sera_2-1.6.6 → sera_2-1.7.0}/sera/models/_parse.py +0 -0
  30. {sera_2-1.6.6 → sera_2-1.7.0}/sera/models/_property.py +0 -0
  31. {sera_2-1.6.6 → sera_2-1.7.0}/sera/models/_schema.py +0 -0
  32. {sera_2-1.6.6 → sera_2-1.7.0}/sera/typing.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: sera-2
3
- Version: 1.6.6
3
+ Version: 1.7.0
4
4
  Summary:
5
5
  Author: Binh Vu
6
6
  Author-email: bvu687@gmail.com
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "sera-2"
3
- version = "1.6.6"
3
+ version = "1.7.0"
4
4
  description = ""
5
5
  authors = ["Binh Vu <bvu687@gmail.com>"]
6
6
  readme = "README.md"
@@ -821,6 +821,8 @@ def make_typescript_data_model(schema: Schema, target_pkg: Package):
821
821
  PredefinedFn.dict(
822
822
  [
823
823
  (expr.ExprIdent("name"), expr.ExprConstant(prop.name)),
824
+ (expr.ExprIdent("tsName"), expr.ExprConstant(propname)),
825
+ (expr.ExprIdent("updateFuncName"), expr.ExprConstant(f"update{to_pascal_case(prop.name)}")),
824
826
  (
825
827
  expr.ExprIdent("label"),
826
828
  expr.ExprConstant(prop.label.to_dict()),
@@ -928,7 +930,7 @@ def make_typescript_data_model(schema: Schema, target_pkg: Package):
928
930
  ),
929
931
  stmt.LineBreak(),
930
932
  stmt.TypescriptStatement(
931
- f"export const {cls.name}Schema: Schema<{cls.name}SchemaType> = "
933
+ f"export const {cls.name}Schema: Schema<{cls.name}SchemaType['id'], {cls.name}SchemaType['cls'], {cls.name}SchemaType['draftCls'], {cls.name}SchemaType['publicProperties'], {cls.name}SchemaType['allProperties'], {cls.name}SchemaType> = "
932
934
  + PredefinedFn.dict(
933
935
  [
934
936
  (
@@ -24,7 +24,7 @@ class Constraint:
24
24
  "msgspec.Meta(min_length=3, max_length=32, pattern=r'^[a-zA-Z0-9_]+$')"
25
25
  )
26
26
  elif self.name == "password":
27
- return "msgspec.Meta(min_length=8, max_length=32)"
27
+ return "msgspec.Meta(min_length=8, max_length=40)"
28
28
 
29
29
  raise NotImplementedError()
30
30
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes