@plexus-ms/cli 0.129.1 → 0.131.0

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 (56) hide show
  1. package/dist/plx.js +3263 -2264
  2. package/dist/templates/app-nextjs/files/.gitignore.jinja +6 -0
  3. package/dist/templates/app-nextjs/files/PLEXUS.md.jinja +5 -0
  4. package/dist/templates/app-nextjs/files/docker/Dockerfile +39 -0
  5. package/dist/templates/app-nextjs/files/docker/compose.ci.yaml.jinja +22 -0
  6. package/dist/templates/app-nextjs/files/docker/compose.yaml.jinja +50 -0
  7. package/dist/templates/app-nextjs/files/next.config.ts +16 -0
  8. package/dist/templates/app-nextjs/files/package.json.jinja +28 -0
  9. package/dist/templates/app-nextjs/files/postcss.config.mjs +7 -0
  10. package/dist/templates/app-nextjs/files/src/app/healthz/route.ts +7 -0
  11. package/dist/templates/app-nextjs/files/src/app/layout.tsx +7 -0
  12. package/dist/templates/app-nextjs/files/src/app/page.tsx.jinja +3 -0
  13. package/dist/templates/app-nextjs/files/tsconfig.json +10 -0
  14. package/dist/templates/app-nextjs/template.yml +31 -0
  15. package/dist/templates/repo-operations/files/.github/workflows/deploy.yml.jinja +37 -0
  16. package/dist/templates/repo-operations/files/.github/workflows/on_commit.yml.jinja +25 -0
  17. package/dist/templates/repo-operations/files/.github/workflows/on_pr.yml.jinja +24 -0
  18. package/dist/templates/repo-operations/files/.github/workflows/plx-update.yml.jinja +30 -0
  19. package/dist/templates/repo-operations/files/.github/workflows/{% if ci_strategy == 'hybrid' or ci_registry == 'own' %}housekeeping.yml{% endif %}.jinja +30 -0
  20. package/dist/templates/repo-operations/files/.gitignore.jinja +2 -0
  21. package/dist/templates/repo-operations/files/PLEXUS.md.jinja +3 -0
  22. package/dist/templates/repo-operations/files/ansible-playbookw +17 -0
  23. package/dist/templates/repo-operations/files/ansible.cfg +4 -0
  24. package/dist/templates/repo-operations/files/apps/.gitkeep +0 -0
  25. package/dist/templates/repo-operations/files/hk.pkl +21 -0
  26. package/dist/templates/repo-operations/files/inventory/group_vars/all.yml.jinja +6 -0
  27. package/dist/templates/repo-operations/files/inventory/group_vars/platform.yml.jinja +13 -0
  28. package/dist/templates/repo-operations/files/inventory/hosts.yml.jinja +21 -0
  29. package/dist/templates/repo-operations/files/mise.toml.jinja +103 -0
  30. package/dist/templates/repo-operations/files/platform.yml.jinja +6 -0
  31. package/dist/templates/repo-operations/files/renovate.json.jinja +5 -0
  32. package/dist/templates/repo-operations/files/requirements.yml +15 -0
  33. package/dist/templates/repo-operations/files/secrets.env.jinja +3 -0
  34. package/dist/templates/repo-operations/files/{% if ci_strategy != 'github' %}ci.yml{% endif %}.jinja +6 -0
  35. package/dist/templates/repo-operations/files/{% if infrastructure %}infrastructure.yml{% endif %}.jinja +6 -0
  36. package/dist/templates/repo-operations/template.yml +72 -0
  37. package/dist/templates/repo-turbo/files/.github/workflows/on_pr.yml.jinja +91 -0
  38. package/dist/templates/repo-turbo/files/.github/workflows/on_push.yml.jinja +109 -0
  39. package/dist/templates/repo-turbo/files/.github/workflows/plx-update.yml.jinja +30 -0
  40. package/dist/templates/repo-turbo/files/.github/workflows/{% if not publishes_packages %}on_commit.yml{% endif %}.jinja +28 -0
  41. package/dist/templates/repo-turbo/files/.github/workflows/{% if not publishes_packages and ci_registry == 'ghcr' %}housekeeping.yml{% endif %}.jinja +28 -0
  42. package/dist/templates/repo-turbo/files/.gitignore.jinja +7 -0
  43. package/dist/templates/repo-turbo/files/PLEXUS.md.jinja +11 -0
  44. package/dist/templates/repo-turbo/files/biome.json +4 -0
  45. package/dist/templates/repo-turbo/files/hk.pkl +22 -0
  46. package/dist/templates/repo-turbo/files/mise.toml.jinja +137 -0
  47. package/dist/templates/repo-turbo/files/package.json.jinja +11 -0
  48. package/dist/templates/repo-turbo/files/packages/.gitkeep +0 -0
  49. package/dist/templates/repo-turbo/files/pnpm-workspace.yaml.jinja +18 -0
  50. package/dist/templates/repo-turbo/files/renovate.json.jinja +14 -0
  51. package/dist/templates/repo-turbo/files/turbo.json.jinja +35 -0
  52. package/dist/templates/repo-turbo/files/{% if not publishes_packages %}.dockerignore{% endif %} +9 -0
  53. package/dist/templates/repo-turbo/files/{% if not publishes_packages %}apps{% endif %}/.gitkeep +0 -0
  54. package/dist/templates/repo-turbo/files/{% if publishes_packages %}.changeset{% endif %}/config.json.jinja +11 -0
  55. package/dist/templates/repo-turbo/template.yml +103 -0
  56. package/package.json +3 -2
@@ -0,0 +1,103 @@
1
+ # Until the version that cuts over from copier is out, this template and
2
+ # template-repo-turbo are one: a change to either is made in both.
3
+ name: repo-turbo
4
+
5
+ questions:
6
+ tenant:
7
+ type: str
8
+ help: "Tenant slug (URL-friendly)"
9
+
10
+ publishes_packages:
11
+ type: bool
12
+ help: "Does this repo publish npm packages from its trunk (changesets, § 5 PLX-Delivery) instead of deploying apps from environment branches?"
13
+ default: false
14
+
15
+ package_registry:
16
+ type: str
17
+ help: "Where the packages are published (§ 5 PLX-Delivery): npm, the public registry, through OIDC trusted publishing; github, the forge's package registry, private to the tenant, with the workflow's own token"
18
+ choices:
19
+ - npm
20
+ - github
21
+ default: npm
22
+ when: "{{ publishes_packages }}"
23
+
24
+ private_packages_scope:
25
+ type: str
26
+ help: "The npm scope of the tenant's private packages this repo installs from the forge's package registry (§ 5 PLX-Delivery), as in @acme-corp; empty when it installs none"
27
+ default: ""
28
+ # copier's regex_search is not in the engine: this is ^@[a-z0-9][a-z0-9._-]*$ as string tests.
29
+ validator: >-
30
+ {% if private_packages_scope %}{% set bad %}{% for c in private_packages_scope[1:] %}{% if c not in
31
+ 'abcdefghijklmnopqrstuvwxyz0123456789._-' %}x{% endif %}{% endfor %}{% endset %}{% if not
32
+ private_packages_scope.startswith('@') or private_packages_scope | length < 2 or
33
+ private_packages_scope[1] in '._-' or bad %}A scope, as in @acme-corp, or empty{% endif %}{% endif %}
34
+
35
+ ci_strategy:
36
+ type: str
37
+ help: "Where the CI jobs run (§ 8 PLX-Delivery): github, the forge's runners; on-prem, container slots on runner hosts of the tenant's own for every job; hybrid, slots for the small and medium jobs and a throwaway cloud instance for each build and test"
38
+ default: github
39
+ choices:
40
+ - github
41
+ - on-prem
42
+ - hybrid
43
+
44
+ ci_registry:
45
+ type: str
46
+ help: "Where the images a run builds and tests live before they are published (§ 8 PLX-Delivery): ghcr, the forge's registry; own, a registry on the tenant's object storage, which also holds Turbo's remote cache"
47
+ choices:
48
+ - ghcr
49
+ - own
50
+ default: "{{ 'ghcr' if ci_strategy == 'github' else 'own' }}"
51
+ when: "{{ not publishes_packages }}"
52
+
53
+ ci_overlay:
54
+ type: str
55
+ help: "How a deploy reaches the app hosts (§ 8 PLX-Delivery): none, as the inventory names them; netbird, over the tenant's overlay, which a job on the forge's runners joins for its length"
56
+ choices:
57
+ - none
58
+ - netbird
59
+ default: none
60
+ when: "{{ not publishes_packages }}"
61
+
62
+ alerts_email:
63
+ type: str
64
+ help: "Hybrid strategy: the address mailed when an instance misses its boot and is kept (empty: no mail); a fact, so an answer here and never a vault item"
65
+ default: ""
66
+ when: "{{ not publishes_packages and ci_strategy == 'hybrid' }}"
67
+
68
+ display_versions:
69
+ type: bool
70
+ help: "Do the apps show a display version (PLX-Releases)? A production release that changes an app then cuts a version tag, MAJOR.MINOR, with a GitHub Release, and every deploy hands the app its display version; the repo's PLEXUS.md states the major"
71
+ default: false
72
+ when: "{{ not publishes_packages }}"
73
+
74
+ major:
75
+ type: int
76
+ help: "The major of the display version the next production release cuts (PLX-Releases), MAJOR.MINOR; the minor counts up by itself, and a human raises the major in the pull request that warrants it"
77
+ default: 1
78
+ validator: "{% if major < 1 %}A major, 1 or higher{% endif %}"
79
+ when: "{{ display_versions and not publishes_packages }}"
80
+
81
+ pr_reviewers:
82
+ type: str
83
+ help: "GitHub logins asked to review the pull requests that wait for a human, the update bot's and plx update's alike, comma-separated (empty: none); a pull request the bot merges itself asks nobody unless its checks fail"
84
+ default: ""
85
+
86
+ update_max_age:
87
+ type: int
88
+ help: "How old, in days, the oldest Plexus version this repo has not taken must be before it takes a minor one (§ 3 PLX-Updates): a patch is taken at once, a major only when asked; 0 takes every version, and more than 30 is discouraged"
89
+ default: 7
90
+ validator: "{% if update_max_age < 0 %}A number of days, zero or more{% endif %}"
91
+
92
+ policies:
93
+ # The marker is born once: its body is the repo's own prose, which an update would conflict with, and
94
+ # its frontmatter is plx's.
95
+ PLEXUS.md.jinja: born-once
96
+
97
+ birth:
98
+ - [git, init]
99
+ - [mise, trust]
100
+ - [mise, install]
101
+ # The two pins the toolchain needs exact, written at birth only (§ 3 PLX-Updates).
102
+ - [mise, exec, --, npx, corepack, use, pnpm@12]
103
+ - [mise, exec, --, pnpm, add, --workspace-root, --save-dev, --save-exact, "@biomejs/biome"]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plexus-ms/cli",
3
- "version": "0.129.1",
3
+ "version": "0.131.0",
4
4
  "description": "plx, the Plexus command-line tool: a single-script adapter over @plexus-ms/lib",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "type": "module",
@@ -24,7 +24,8 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@inquirer/prompts": "^8.8.0",
27
- "@plexus-ms/lib": "0.129.1",
27
+ "@plexus-ms/cli-template": "0.131.0",
28
+ "@plexus-ms/lib": "0.131.0",
28
29
  "commander": "^15.1.0"
29
30
  },
30
31
  "devDependencies": {