wexample-wex-addon-dev-javascript 8.11.1__py3-none-any.whl → 8.12.0__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.
@@ -128,16 +128,21 @@ class NodePackageJsonFile(AppDependenciesConfigFileMixin, JsonFile):
128
128
  return versions
129
129
 
130
130
  def _forge_headers(self, url: str) -> dict[str, str]:
131
- """The app's GitLab token, for a registry of its own forge (git.gitlab_url):
132
- a private group answers nobody else, and another forge would refuse a
133
- token that is not its own."""
131
+ """The app's GitLab token, for a registry on the forge its repository
132
+ lives on (its origin's host): a private group answers nobody else, and
133
+ another forge would refuse a token that is not its own."""
134
+ import re
135
+ from urllib.parse import urlparse
136
+
137
+ from wexample_helpers_git.helper.git import git_get_remote_url
138
+
134
139
  try:
135
- forge = (
136
- self.get_parent_item().get_config().search("git.gitlab_url").get_str_or_none()
137
- )
138
- token = self.get_env_parameter("GITLAB_API_TOKEN", default=None)
140
+ workdir = self.get_parent_item()
141
+ remote = git_get_remote_url(cwd=workdir.get_path())
142
+ token = workdir.get_env_parameter("GITLAB_API_TOKEN", default=None)
139
143
  except Exception:
140
144
  return {}
141
- if forge and token and url.startswith(forge.rstrip("/") + "/"):
145
+ match = re.match(r"^(?:[a-z+]+://)?(?:[^@/]+@)?([^:/]+)", remote or "")
146
+ if token and match and urlparse(url).hostname == match.group(1):
142
147
  return {"Authorization": f"Bearer {token}"}
143
148
  return {}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wexample-wex-addon-dev-javascript
3
- Version: 8.11.1
3
+ Version: 8.12.0
4
4
  Summary: Extends wex with JavaScript support: enforces JS/TS project layout and symlinks local npm packages into node_modules
5
5
  Author-Email: weeger <contact@wexample.com>
6
6
  License: MIT
@@ -22,7 +22,7 @@ Description-Content-Type: text/markdown
22
22
 
23
23
  # wex_addon_dev_javascript
24
24
 
25
- Version: 8.11.1
25
+ Version: 8.12.0
26
26
 
27
27
  Extends wex with JavaScript support: enforces JS/TS project layout and symlinks local npm packages into node_modules
28
28
 
@@ -1,6 +1,6 @@
1
- wexample_wex_addon_dev_javascript-8.11.1.dist-info/METADATA,sha256=Q6o73CW1OBJ0zNvCRHuTUs6ITM6vBcSv3wAkly29hAs,3403
2
- wexample_wex_addon_dev_javascript-8.11.1.dist-info/WHEEL,sha256=IuIk3wbaEnFH1cx75iM2R1CmliRI3dFLXTbRakgvgFQ,90
3
- wexample_wex_addon_dev_javascript-8.11.1.dist-info/entry_points.txt,sha256=WwYdg3RL2Ey1fg4JNNkcQxZcQRgZSgPLLzSDi6lbYgI,143
1
+ wexample_wex_addon_dev_javascript-8.12.0.dist-info/METADATA,sha256=UL6hT1FdXXinAn95WAJkbNm4NmyoY6KKbSE9lw-2Ixk,3403
2
+ wexample_wex_addon_dev_javascript-8.12.0.dist-info/WHEEL,sha256=IuIk3wbaEnFH1cx75iM2R1CmliRI3dFLXTbRakgvgFQ,90
3
+ wexample_wex_addon_dev_javascript-8.12.0.dist-info/entry_points.txt,sha256=WwYdg3RL2Ey1fg4JNNkcQxZcQRgZSgPLLzSDi6lbYgI,143
4
4
  wexample_wex_addon_dev_javascript/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  wexample_wex_addon_dev_javascript/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  wexample_wex_addon_dev_javascript/common/npm_registry_gateway.py,sha256=jcAIOZN1eiPeRSjradY095VI93ne86ijbVAZcXzCKpQ,2742
@@ -13,7 +13,7 @@ wexample_wex_addon_dev_javascript/file/__init__.py,sha256=U4S_2y3zgLZVfMenHRaJFB
13
13
  wexample_wex_addon_dev_javascript/file/javascript_package_json_file.py,sha256=yn1ltv3oBYNg1OvUytJ4PEzH8FSJS2KcIKK8y-cMrl4,2906
14
14
  wexample_wex_addon_dev_javascript/file/javascript_package_lock_json_file.py,sha256=PPlIbKksyw0IPjJuaNbxcwty1nsH875owgRCgeJIij4,1388
15
15
  wexample_wex_addon_dev_javascript/file/javascript_tsconfig_json_file.py,sha256=a2vfYgB7gbiIiGljU_QA6extFJPyNM6rlhhAS3YoeCs,1395
16
- wexample_wex_addon_dev_javascript/file/node_package_json_file.py,sha256=RTj9CExKr04YSHkUmsSD78W-sx4ciRUqyH0LSHUjkNM,5186
16
+ wexample_wex_addon_dev_javascript/file/node_package_json_file.py,sha256=QN9GfD8G7vncQx8BLcOXqkQ7gfk41cxO0swL4huo6IA,5404
17
17
  wexample_wex_addon_dev_javascript/formatter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
18
  wexample_wex_addon_dev_javascript/formatter/javascript_code_formatter.py,sha256=6TLrynxXH-P0kHiW6FmgROA8fG2Ik03Pn4JV9dctDuE,1618
19
19
  wexample_wex_addon_dev_javascript/javascript_addon_manager.py,sha256=zateyPGxtR4eOdjstfLI6MfTagEOWAAeb2CZqF_qMVo,1387
@@ -50,4 +50,4 @@ wexample_wex_addon_dev_javascript/workdir/__init__.py,sha256=47DEQpj8HBSa-_TImW-
50
50
  wexample_wex_addon_dev_javascript/workdir/javascript_package_workdir.py,sha256=U0gf0Zgj0k34yfoARFLmbcm9f7hXxbo7RPSHNgSSUa8,25009
51
51
  wexample_wex_addon_dev_javascript/workdir/javascript_packages_suite_workdir.py,sha256=b0QoTWlNYOYfpqEb8vYzL4WRoY0WwBhYOFUoRc4oySI,928
52
52
  wexample_wex_addon_dev_javascript/workdir/javascript_workdir.py,sha256=EFY0-500y9PKeLtZIvI-q53n-EfNiHCpKnkmWm-q68w,9948
53
- wexample_wex_addon_dev_javascript-8.11.1.dist-info/RECORD,,
53
+ wexample_wex_addon_dev_javascript-8.12.0.dist-info/RECORD,,