wexample-wex-addon-dev-javascript 8.4.0__py3-none-any.whl → 8.6.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.
@@ -0,0 +1,32 @@
1
+ from __future__ import annotations
2
+
3
+ from wexample_filestate.item.file.json_file import JsonFile
4
+ from wexample_helpers.decorator.base_class import base_class
5
+
6
+
7
+ @base_class
8
+ class JavascriptPackageLockJsonFile(JsonFile):
9
+ """A published javascript package's package-lock.json.
10
+
11
+ npm records the package's own version in its lock, twice. The bump writes
12
+ it into package.json alone, so the lock kept the previous one, and the next
13
+ `npm install` — a test run, a lock refresh — wrote it back: a change in the
14
+ working tree, which made every package of the suite look modified again and
15
+ be published once more at the next run. Written here, from the same source
16
+ and at the same time as package.json's.
17
+ """
18
+
19
+ def dumps(self, content: dict | None = None) -> str:
20
+ content = content or self.read_parsed()
21
+
22
+ version = self.get_parent_item().get_setup_version()
23
+ if "version" in content:
24
+ content["version"] = version
25
+ root = (content.get("packages") or {}).get("")
26
+ if isinstance(root, dict) and "version" in root:
27
+ root["version"] = version
28
+
29
+ # With the newline npm ends the file with: without it, the next install
30
+ # would change the file back, and the loop this class closes reopens.
31
+ dumped = super().dumps(content)
32
+ return dumped if dumped.endswith("\n") else dumped + "\n"
@@ -0,0 +1,4 @@
1
+ include:
2
+ - remote: 'https://gitlab.wexample.com/wexample-public/ci-cd/-/raw/main/.gitlab-ci.type.node.package.yml'
3
+ variables:
4
+ MAIN_BRANCH_NAME: main
@@ -92,6 +92,23 @@ class JavascriptPackageWorkdir(JavascriptWorkdir):
92
92
  }
93
93
  )
94
94
 
95
+ # Every package is tested by GitLab at each push, the way a consumer
96
+ # installs it. The file is only an include: the job itself lives in
97
+ # the ci-cd repository, one place to change for every package. Created
98
+ # when absent, never rewritten: a package may add to it.
99
+ children.append(
100
+ {
101
+ "name": ".gitlab-ci.yml",
102
+ "type": DiskItemType.FILE,
103
+ "should_exist": True,
104
+ "default_content": lambda _: file_read(
105
+ module_get_path(wexample_wex_addon_dev_javascript)
106
+ / "resources"
107
+ / "package_gitlab_ci.yml"
108
+ ),
109
+ }
110
+ )
111
+
95
112
  return raw_value
96
113
 
97
114
  def release(self, **kwargs) -> None:
@@ -83,6 +83,9 @@ class JavascriptWorkdir(WithAiWorkdirMixin, CodeBaseWorkdir):
83
83
  from wexample_wex_addon_dev_javascript.file.javascript_package_json_file import (
84
84
  JavascriptPackageJsonFile,
85
85
  )
86
+ from wexample_wex_addon_dev_javascript.file.javascript_package_lock_json_file import (
87
+ JavascriptPackageLockJsonFile,
88
+ )
86
89
  from wexample_wex_addon_dev_javascript.file.javascript_tsconfig_json_file import (
87
90
  JavascriptTsconfigJsonFile,
88
91
  )
@@ -118,6 +121,12 @@ class JavascriptWorkdir(WithAiWorkdirMixin, CodeBaseWorkdir):
118
121
  "type": DiskItemType.FILE,
119
122
  "should_exist": True,
120
123
  },
124
+ # Not required: a package installed by yarn or pnpm has none.
125
+ {
126
+ "class": JavascriptPackageLockJsonFile,
127
+ "name": "package-lock.json",
128
+ "type": DiskItemType.FILE,
129
+ },
121
130
  {
122
131
  "class": JavascriptTsconfigJsonFile,
123
132
  "name": "tsconfig.json",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wexample-wex-addon-dev-javascript
3
- Version: 8.4.0
3
+ Version: 8.6.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
@@ -13,8 +13,8 @@ Requires-Dist: attrs>=23.1.0
13
13
  Requires-Dist: cattrs>=23.1.0
14
14
  Requires-Dist: wexample-api>=6.8.0
15
15
  Requires-Dist: wexample-filestate-javascript>=6.6.0
16
- Requires-Dist: wexample-wex-addon-ai>=18.3.0
17
- Requires-Dist: wexample-wex-addon-app>=33.4.0
16
+ Requires-Dist: wexample-wex-addon-ai>=19.0.0
17
+ Requires-Dist: wexample-wex-addon-app>=34.1.0
18
18
  Provides-Extra: dev
19
19
  Requires-Dist: pytest; extra == "dev"
20
20
  Requires-Dist: pytest-cov; extra == "dev"
@@ -22,7 +22,7 @@ Description-Content-Type: text/markdown
22
22
 
23
23
  # wex_addon_dev_javascript
24
24
 
25
- Version: 8.4.0
25
+ Version: 8.6.0
26
26
 
27
27
  `wex-addon-dev-javascript` extends wex for JavaScript and TypeScript developers: it enforces a standard project layout — requiring `package.json`, `tsconfig.json`, `.npmrc`, `src/`, `tests/`, and the corresponding `.gitignore` rules — and in local environments symlinks locally-developed npm packages directly into a running container's `node_modules/` so monorepo packages resolve without a registry publish cycle. It also contributes a `node` service and a `vite` service, each backed by Docker Compose, where the vite service patches `allowedHosts` in `vite.config.ts` for reverse-proxy use and the node service handles lockfile refresh, annotated-tag release, and registry polling for npm package suites managed through wex.
28
28
 
@@ -243,16 +243,14 @@ This package is part of the Wexample Suite — a collection of high-quality, mod
243
243
 
244
244
  The suite includes packages for configuration management, file handling, prompts, and more. Each package can be used independently or as part of the integrated suite.
245
245
 
246
- Visit the [Wexample Suite documentation](https://docs.wexample.com) for the complete package ecosystem.
247
-
248
246
  ## Dependencies
249
247
 
250
248
  - attrs: >=23.1.0
251
249
  - cattrs: >=23.1.0
252
250
  - wexample-api: >=6.8.0
253
251
  - wexample-filestate-javascript: >=6.6.0
254
- - wexample-wex-addon-ai: >=18.3.0
255
- - wexample-wex-addon-app: >=33.4.0
252
+ - wexample-wex-addon-ai: >=19.0.0
253
+ - wexample-wex-addon-app: >=34.1.0
256
254
 
257
255
  ## Versioning & Compatibility Policy
258
256
 
@@ -278,6 +276,8 @@ This packages suite embodies this spirit. Trusted by professionals and enthusias
278
276
 
279
277
  Wexample cultivates a culture of mastery. Each package, each contribution carries the mark of a community that values precision, ethics, and innovation — a community proud to shape the future of digital craftsmanship.
280
278
 
279
+ Built and maintained by [Romain Weeger](https://weeger.io).
280
+
281
281
  ## Known Limitations & Roadmap
282
282
 
283
283
  Current limitations and planned features are tracked in the GitHub issues.
@@ -297,7 +297,6 @@ See the [project roadmap](https://github.com/wexample/python-wex_addon_dev_javas
297
297
  ## Useful Links
298
298
 
299
299
  - **Homepage**: https://github.com/wexample/python-wex-addon-dev-javascript
300
- - **Documentation**: [docs.wexample.com](https://docs.wexample.com)
301
300
  - **Issue Tracker**: https://github.com/wexample/python-wex-addon-dev-javascript/issues
302
301
  - **Discussions**: https://github.com/wexample/python-wex-addon-dev-javascript/discussions
303
302
  - **PyPI**: [pypi.org/project/wexample-wex-addon-dev-javascript](https://pypi.org/project/wexample-wex-addon-dev-javascript/)
@@ -1,6 +1,6 @@
1
- wexample_wex_addon_dev_javascript-8.4.0.dist-info/METADATA,sha256=nyeWU3Ba1427acqCDTzE3dgqCfA-g9Rm66d1235plrc,18021
2
- wexample_wex_addon_dev_javascript-8.4.0.dist-info/WHEEL,sha256=IuIk3wbaEnFH1cx75iM2R1CmliRI3dFLXTbRakgvgFQ,90
3
- wexample_wex_addon_dev_javascript-8.4.0.dist-info/entry_points.txt,sha256=WwYdg3RL2Ey1fg4JNNkcQxZcQRgZSgPLLzSDi6lbYgI,143
1
+ wexample_wex_addon_dev_javascript-8.6.0.dist-info/METADATA,sha256=1UsYSGOC1ZtImcp3aJsvrnT8k1oRTR1uFzBdafC7R2c,17909
2
+ wexample_wex_addon_dev_javascript-8.6.0.dist-info/WHEEL,sha256=IuIk3wbaEnFH1cx75iM2R1CmliRI3dFLXTbRakgvgFQ,90
3
+ wexample_wex_addon_dev_javascript-8.6.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/__pycache__/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  wexample_wex_addon_dev_javascript/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -12,6 +12,7 @@ wexample_wex_addon_dev_javascript/const/registry.py,sha256=pkGypHvxhPeb6-Quyv8Vo
12
12
  wexample_wex_addon_dev_javascript/const/tags.py,sha256=qirMGuj7UqenempTZeQfJfMa_bC7mt-yLD_BkLnMnKE,307
13
13
  wexample_wex_addon_dev_javascript/file/__init__.py,sha256=U4S_2y3zgLZVfMenHRaJFBW8yqh2mUBuI291LGQVOJ8,35
14
14
  wexample_wex_addon_dev_javascript/file/javascript_package_json_file.py,sha256=yn1ltv3oBYNg1OvUytJ4PEzH8FSJS2KcIKK8y-cMrl4,2906
15
+ wexample_wex_addon_dev_javascript/file/javascript_package_lock_json_file.py,sha256=PPlIbKksyw0IPjJuaNbxcwty1nsH875owgRCgeJIij4,1388
15
16
  wexample_wex_addon_dev_javascript/file/javascript_tsconfig_json_file.py,sha256=a2vfYgB7gbiIiGljU_QA6extFJPyNM6rlhhAS3YoeCs,1395
16
17
  wexample_wex_addon_dev_javascript/file/node_package_json_file.py,sha256=MRfjm4fKe34m6ndANVj604PuSW8bjNR_-Ua42lGX06s,2668
17
18
  wexample_wex_addon_dev_javascript/formatter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -20,6 +21,7 @@ wexample_wex_addon_dev_javascript/javascript_addon_manager.py,sha256=zateyPGxtR4
20
21
  wexample_wex_addon_dev_javascript/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
22
  wexample_wex_addon_dev_javascript/resources/.wex.yml,sha256=JdIF6nGkFcfi76yZYGlXxeWfOK4eAUSV_gAn6i3hk2w,32
22
23
  wexample_wex_addon_dev_javascript/resources/design_rules/javascript_code.md,sha256=_X6_j1SS2yoMegK3n1R_dORtBT3__NYQCY1PD-Ssb2o,1159
24
+ wexample_wex_addon_dev_javascript/resources/package_gitlab_ci.yml,sha256=DisWdPN-q-pDUNg00KfJk6y4fRKTqhKS94c7aNfjnrc,153
23
25
  wexample_wex_addon_dev_javascript/resources/package_publish.yml,sha256=Omw0Ww4I7jsi2uLSNApRR-Ujt6M_56IsXDyDT7hVncc,421
24
26
  wexample_wex_addon_dev_javascript/resources/writing_rules/javascript_code.md,sha256=nzoIZ65UTiwSwst0NoulyE29AfnGCjbOakuPbmeaakI,1808
25
27
  wexample_wex_addon_dev_javascript/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -46,7 +48,7 @@ wexample_wex_addon_dev_javascript/services/vite/docker/.wex.yml,sha256=JdIF6nGkF
46
48
  wexample_wex_addon_dev_javascript/services/vite/docker/docker-compose.yml,sha256=M7ejIcht0GxuEAEEcK3urBIrXA66JwYrr5EPUA9nMMM,595
47
49
  wexample_wex_addon_dev_javascript/services/vite/service.yml,sha256=8mFPv49QbKA3klHFbNK73QOB7ryy38zFeLiQB3gfDys,184
48
50
  wexample_wex_addon_dev_javascript/workdir/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
49
- wexample_wex_addon_dev_javascript/workdir/javascript_package_workdir.py,sha256=mRTWei7NtmUzr5Ht1ZYVOdv_18tZ6BzruJMTuzy20s4,15612
51
+ wexample_wex_addon_dev_javascript/workdir/javascript_package_workdir.py,sha256=Sl17hL-zghb3Trog925SrHYoAmvoKL2ySBafT1P_cMw,16322
50
52
  wexample_wex_addon_dev_javascript/workdir/javascript_packages_suite_workdir.py,sha256=b0QoTWlNYOYfpqEb8vYzL4WRoY0WwBhYOFUoRc4oySI,928
51
- wexample_wex_addon_dev_javascript/workdir/javascript_workdir.py,sha256=Wff6pgdPzsaf2zDfkVKytVHHp8rAXaXesz0G8Svh5z4,9529
52
- wexample_wex_addon_dev_javascript-8.4.0.dist-info/RECORD,,
53
+ wexample_wex_addon_dev_javascript/workdir/javascript_workdir.py,sha256=EFY0-500y9PKeLtZIvI-q53n-EfNiHCpKnkmWm-q68w,9948
54
+ wexample_wex_addon_dev_javascript-8.6.0.dist-info/RECORD,,