wexample-wex-addon-dev-javascript 0.0.56__py3-none-any.whl → 0.0.57__py3-none-any.whl

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.
@@ -1,43 +1,28 @@
1
1
  from __future__ import annotations
2
2
 
3
- from typing import TYPE_CHECKING
4
-
5
3
  from wexample_filestate.item.file.json_file import JsonFile
6
4
  from wexample_helpers.decorator.base_class import base_class
7
5
 
8
- if TYPE_CHECKING:
9
- from wexample_wex_addon_app.workdir.code_base_workdir import CodeBaseWorkdir
10
-
11
6
 
12
7
  @base_class
13
8
  class JavascriptPackageJsonFile(JsonFile):
14
- def get_dependencies_versions(
15
- self, optional: bool = False, group: str = "dev"
16
- ) -> dict[str, str]:
17
- return (
18
- self.read_config()
19
- .search(path="dependencies")
20
- .get_dict_or_default(default={})
21
- )
22
-
23
9
  def dumps(self, content: dict | None = None) -> str:
24
- import json
25
-
26
10
  content = content or self.read_parsed()
27
11
 
28
- package = self.find_package_workdir()
29
- if package:
30
- if not content.get("name"):
31
- content["name"] = package.get_package_import_name()
32
-
33
- content["version"] = package.get_project_version()
12
+ workdir = self.get_parent_item()
13
+ content["name"] = workdir.get_package_import_name()
14
+ content["version"] = workdir.get_project_version()
34
15
 
35
16
  if not content.get("type"):
36
17
  content["type"] = "module"
37
18
 
38
- return json.dumps(content or {}, ensure_ascii=False, indent=2)
39
-
40
- def find_package_workdir(self) -> CodeBaseWorkdir | None:
41
- from wexample_wex_addon_app.workdir.code_base_workdir import CodeBaseWorkdir
19
+ return super().dumps(content or {})
42
20
 
43
- return self.find_closest(CodeBaseWorkdir)
21
+ def get_dependencies_versions(
22
+ self, optional: bool = False, group: str = "dev"
23
+ ) -> dict[str, str]:
24
+ return (
25
+ self.read_config()
26
+ .search(path="dependencies")
27
+ .get_dict_or_default(default={})
28
+ )
@@ -5,6 +5,7 @@ import subprocess
5
5
  from typing import TYPE_CHECKING
6
6
 
7
7
  from wexample_helpers.helpers.string import string_to_kebab_case
8
+
8
9
  from wexample_wex_addon_dev_javascript.workdir.javascript_workdir import (
9
10
  JavascriptWorkdir,
10
11
  )
@@ -19,6 +20,12 @@ if TYPE_CHECKING:
19
20
 
20
21
 
21
22
  class JavascriptPackageWorkdir(JavascriptWorkdir):
23
+ def get_package_import_name(self) -> str:
24
+ """Get the full package import name with vendor prefix."""
25
+ return (
26
+ f"@{self.get_vendor_name()}/{string_to_kebab_case(self.get_project_name())}"
27
+ )
28
+
22
29
  def _get_readme_content(self) -> ReadmeContentConfigValue | None:
23
30
  from wexample_wex_addon_dev_javascript.config_value.javascript_package_readme_config_value import (
24
31
  JavascriptPackageReadmeContentConfigValue,
@@ -33,12 +40,6 @@ class JavascriptPackageWorkdir(JavascriptWorkdir):
33
40
 
34
41
  return JavascriptPackagesSuiteWorkdir
35
42
 
36
- def get_package_import_name(self) -> str:
37
- """Get the full package import name with vendor prefix."""
38
- return (
39
- f"@{self.get_vendor_name()}/{string_to_kebab_case(self.get_project_name())}"
40
- )
41
-
42
43
  def _publish(self, force: bool = False) -> None:
43
44
  """Publish the package to npm, skipping if the version already exists."""
44
45
  from wexample_helpers.helpers.shell import shell_run
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wexample-wex-addon-dev-javascript
3
- Version: 0.0.56
3
+ Version: 0.0.57
4
4
  Summary: Python dev addon for wex
5
5
  Author-Email: weeger <contact@wexample.com>
6
6
  License: MIT
@@ -11,9 +11,9 @@ Project-URL: homepage, https://github.com/wexample/python-wex-dev-python
11
11
  Requires-Python: >=3.10
12
12
  Requires-Dist: attrs>=23.1.0
13
13
  Requires-Dist: cattrs>=23.1.0
14
- Requires-Dist: wexample-filestate-javascript==0.0.13
15
- Requires-Dist: wexample-wex-addon-app==0.0.54
16
- Requires-Dist: wexample-wex-core==6.0.66
14
+ Requires-Dist: wexample-filestate-javascript==0.0.14
15
+ Requires-Dist: wexample-wex-addon-app==0.0.55
16
+ Requires-Dist: wexample-wex-core==6.0.67
17
17
  Provides-Extra: dev
18
18
  Requires-Dist: pytest; extra == "dev"
19
19
  Requires-Dist: pytest-cov; extra == "dev"
@@ -21,7 +21,7 @@ Description-Content-Type: text/markdown
21
21
 
22
22
  # wexample-wex-addon-dev-javascript
23
23
 
24
- Version: 0.0.56
24
+ Version: 0.0.57
25
25
 
26
26
  Python dev addon for wex
27
27
 
@@ -211,7 +211,7 @@ Free to use in both personal and commercial projects.
211
211
 
212
212
  ## Integration in the Suite
213
213
 
214
- This package is part of the **Wexample Suite** — a collection of high-quality Python packages designed to work seamlessly together.
214
+ This package is part of the Wexample Suite — a collection of high-quality, modular tools designed to work seamlessly together across multiple languages and environments.
215
215
 
216
216
  ### Related Packages
217
217
 
@@ -229,9 +229,9 @@ Refer to each package's documentation for specific version compatibility require
229
229
 
230
230
  - attrs: >=23.1.0
231
231
  - cattrs: >=23.1.0
232
- - wexample-filestate-javascript: ==0.0.13
233
- - wexample-wex-addon-app: ==0.0.54
234
- - wexample-wex-core: ==6.0.66
232
+ - wexample-filestate-javascript: ==0.0.14
233
+ - wexample-wex-addon-app: ==0.0.55
234
+ - wexample-wex-core: ==6.0.67
235
235
 
236
236
 
237
237
  # About us
@@ -1,16 +1,16 @@
1
- wexample_wex_addon_dev_javascript-0.0.56.dist-info/METADATA,sha256=q1F38VMtEzBBxvZ2mICg-mirdaIYB9EWXwYof_zoZik,8021
2
- wexample_wex_addon_dev_javascript-0.0.56.dist-info/WHEEL,sha256=tsUv_t7BDeJeRHaSrczbGeuK-TtDpGsWi_JfpzD255I,90
3
- wexample_wex_addon_dev_javascript-0.0.56.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
1
+ wexample_wex_addon_dev_javascript-0.0.57.dist-info/METADATA,sha256=Prc1V8Dm30LKNlJWmLAswnTBY7ZvLFlxkg55f2Cynbk,8059
2
+ wexample_wex_addon_dev_javascript-0.0.57.dist-info/WHEEL,sha256=tsUv_t7BDeJeRHaSrczbGeuK-TtDpGsWi_JfpzD255I,90
3
+ wexample_wex_addon_dev_javascript-0.0.57.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
4
4
  wexample_wex_addon_dev_javascript/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  wexample_wex_addon_dev_javascript/__pycache__/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  wexample_wex_addon_dev_javascript/config_value/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  wexample_wex_addon_dev_javascript/config_value/javascript_package_readme_config_value.py,sha256=6r-4ZhTm39LvJxMhoq3-_RRKRv2KNKSqkCv8xbh8T7c,449
8
8
  wexample_wex_addon_dev_javascript/file/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- wexample_wex_addon_dev_javascript/file/javascript_package_json_file.py,sha256=y1rh2bQaGAAjTRtC3n5gZKgwjVQu3AIwbzudBKfPRqI,1322
9
+ wexample_wex_addon_dev_javascript/file/javascript_package_json_file.py,sha256=XbxNBXLCT74ANH3vsqskuTCGJOdVcZmoIEql8S-ZvHs,863
10
10
  wexample_wex_addon_dev_javascript/javascript_addon_manager.py,sha256=Sjr0CEtNtF3211j1lMtg-pw56zd6unCGNIY7nScddpI,180
11
11
  wexample_wex_addon_dev_javascript/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  wexample_wex_addon_dev_javascript/workdir/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- wexample_wex_addon_dev_javascript/workdir/javascript_package_workdir.py,sha256=adXwFijslEGlA_cWgm-G-TC6aC5c5S20SjdmthT2HZQ,3130
13
+ wexample_wex_addon_dev_javascript/workdir/javascript_package_workdir.py,sha256=QdTFfsi3wfxy7bSQMfPuFrRl_rueJC1triZWby1-kmA,3131
14
14
  wexample_wex_addon_dev_javascript/workdir/javascript_packages_suite_workdir.py,sha256=l9zHC5-1v8yPBdZGS7Ibxp3iklI-czXkRuPxALbz4Gk,855
15
15
  wexample_wex_addon_dev_javascript/workdir/javascript_workdir.py,sha256=lYCCd2fu6jfdf2ahMKuOWoZKRod2urCo3k6ZZOWvcVc,4292
16
- wexample_wex_addon_dev_javascript-0.0.56.dist-info/RECORD,,
16
+ wexample_wex_addon_dev_javascript-0.0.57.dist-info/RECORD,,