@xemahq/repo-build-tooling 0.33.1 → 0.34.1
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.
- package/LICENSE +175 -176
- package/README.md +6 -4
- package/package.json +28 -12
- package/src/arm64-supplement-needed.mjs +6 -6
- package/src/boot-graph-edges.mjs +253 -0
- package/src/boot-graph-edges.test.mjs +75 -0
- package/src/bootstrap-closure.mjs +236 -0
- package/src/bootstrap-closure.test.mjs +115 -0
- package/src/bundle-affected-cli.mjs +45 -0
- package/src/bundle-affected.mjs +33 -0
- package/src/bundle-affected.test.mjs +56 -0
- package/src/bundle-host-abi.mjs +59 -0
- package/src/bundle-notify-cli.mjs +41 -0
- package/src/bundle-notify.mjs +47 -0
- package/src/bundle-notify.test.mjs +53 -0
- package/src/bundle-publish-cli.mjs +35 -0
- package/src/bundle-publish.mjs +151 -0
- package/src/bundle-publish.test.mjs +130 -0
- package/src/canonical-hidden-hoist.mjs +14 -14
- package/src/canonical-hidden-hoist.test.mjs +5 -5
- package/src/check-no-vendored-deps.mjs +87 -13
- package/src/check-no-vendored-deps.test.mjs +27 -1
- package/src/check-workspace-range-matches-local.mjs +29 -12
- package/src/check-workspace-range-matches-local.test.mjs +23 -1
- package/src/command-exec.mjs +16 -0
- package/src/component-facts.mjs +13 -3
- package/src/component-operations.mjs +188 -0
- package/src/component-operations.test.mjs +226 -0
- package/src/composed-image-class.mjs +3 -3
- package/src/composed-image-class.test.mjs +4 -4
- package/src/composed-image-coordinate.mjs +10 -10
- package/src/composed-image-dockerfile.mjs +28 -18
- package/src/composed-image-dockerfile.test.mjs +25 -6
- package/src/composed-image-fixture.test.mjs +6 -2
- package/src/composed-image-in-image-closure.test.mjs +6 -6
- package/src/composed-image-in-image.mjs +45 -32
- package/src/composed-image-install.mjs +11 -3
- package/src/composed-image-install.test.mjs +33 -3
- package/src/composed-image-members.mjs +50 -20
- package/src/composed-image-package-files.mjs +10 -7
- package/src/composed-image-pnpm-context.mjs +4 -4
- package/src/composed-image-pnpm-context.test.mjs +4 -4
- package/src/composed-image-prebuilt-dockerfile.mjs +15 -14
- package/src/composed-image-prebuilt-dockerfile.test.mjs +6 -5
- package/src/composed-image-prisma-check.mjs +8 -8
- package/src/composed-image-prisma-check.test.mjs +1 -1
- package/src/composed-image-prisma-engine.mjs +2 -2
- package/src/composed-image-prisma-engine.test.mjs +2 -2
- package/src/composed-image-proof.mjs +10 -10
- package/src/composed-image-proof.test.mjs +1 -1
- package/src/composed-image-rebuild.mjs +4 -4
- package/src/composed-image-stage-deploy.test.mjs +62 -0
- package/src/composed-image-stage-tree.mjs +27 -54
- package/src/composed-image-stage-tree.test.mjs +11 -11
- package/src/composed-image-stage.mjs +57 -24
- package/src/composed-image-stage.test.mjs +28 -6
- package/src/composed-image-sync-injected.mjs +8 -8
- package/src/composed-image-sync-injected.test.mjs +1 -1
- package/src/composed-image.mjs +50 -49
- package/src/composed-image.test.mjs +31 -12
- package/src/composed-migrate.mjs +15 -15
- package/src/composed-migrate.test.mjs +2 -2
- package/src/declaration-refusal.mjs +18 -16
- package/src/declaration-refusal.test.mjs +6 -8
- package/src/derive-member-facts.mjs +6 -6
- package/src/effective-input-deployed-files.mjs +56 -341
- package/src/effective-input-deployed-files.test.mjs +91 -110
- package/src/effective-input-release-normalise.mjs +43 -0
- package/src/effective-input.mjs +53 -87
- package/src/effective-input.test.mjs +64 -5
- package/src/image-cpu-arch.test.mjs +3 -2
- package/src/invoked-directly.mjs +1 -1
- package/src/load-image.mjs +4 -4
- package/src/load-members-in-image.mjs +2 -2
- package/src/pack-bundle-cli.mjs +52 -0
- package/src/pack-bundle.mjs +227 -0
- package/src/pack-bundle.test.mjs +278 -0
- package/src/pnpm-lock-sections.mjs +47 -0
- package/src/promote-image-registry.mjs +5 -31
- package/src/promote-image.mjs +41 -191
- package/src/promote-image.test.mjs +51 -644
- package/src/prune-foreign-libc.mjs +15 -15
- package/src/readiness.mjs +26 -26
- package/src/refuse-in-image.mjs +38 -0
- package/src/service-bootstrap-component-facts.test.mjs +34 -0
- package/src/service-bootstrap-protocols.mjs +4 -4
- package/src/service-bootstrap.mjs +43 -16
- package/src/service-image-in-image.mjs +11 -11
- package/src/service-image-platform-twin.test.mjs +27 -0
- package/src/service-image-platform.mjs +11 -11
- package/src/service-image-stage.mjs +49 -42
- package/src/service-image.mjs +15 -15
- package/src/service-image.test.mjs +38 -31
- package/src/smoke-refusal.mjs +16 -16
- package/src/smoke-refusal.test.mjs +8 -6
- package/src/stage-tool-digest.mjs +31 -0
- package/src/staged-image-proof.mjs +7 -7
- package/src/staged-image-proof.test.mjs +1 -1
- package/src/turbo-config-projection.mjs +6 -6
- package/src/turbo-config-projection.test.mjs +1 -1
- package/src/canonical-json.mjs +0 -9
- package/src/promote-image-predicate.mjs +0 -27
- package/src/promote-image-provenance.mjs +0 -304
- package/src/scrub-swagger-plugin-paths.mjs +0 -1020
package/LICENSE
CHANGED
|
@@ -1,176 +1,175 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
the Work
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
the
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
and
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
Work
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|
|
1
|
+
Xema Business Source License 1.1
|
|
2
|
+
|
|
3
|
+
License text copyright (c) 2020 MariaDB Corporation Ab, All Rights Reserved.
|
|
4
|
+
"Business Source License" is a trademark of MariaDB Corporation Ab.
|
|
5
|
+
|
|
6
|
+
-----------------------------------------------------------------------------
|
|
7
|
+
|
|
8
|
+
Parameters
|
|
9
|
+
|
|
10
|
+
Licensor: Neuralchowder Inc.
|
|
11
|
+
|
|
12
|
+
Licensed Work: Xema. The Licensed Work is (c) 2026 Neuralchowder Inc.
|
|
13
|
+
|
|
14
|
+
The Licensed Work includes, without limitation, Xema Core, Xema Runtime,
|
|
15
|
+
Xema Kernel, Xema control plane, Xema application runtime, Xema biome
|
|
16
|
+
runtime, Xema biome registry, Xema store services, Xema orchestration
|
|
17
|
+
services, Xema agents, Xema skills, Xema memory services, Xema APIs, Xema
|
|
18
|
+
user interfaces, Xema command-line tools, Xema deployment artifacts, Xema
|
|
19
|
+
templates, Xema specifications, Xema schemas, Xema manifests, Xema
|
|
20
|
+
documentation, Xema examples, and all source code, object code, binaries,
|
|
21
|
+
packages, modules, configuration files, manifests, schemas, examples,
|
|
22
|
+
templates, documentation, and derivative works included in or distributed
|
|
23
|
+
as part of the Xema software project.
|
|
24
|
+
|
|
25
|
+
The Licensed Work does not include any third-party software, libraries,
|
|
26
|
+
dependencies, packages, assets, or components that are distributed with the
|
|
27
|
+
Licensed Work but are governed by their own separate license terms. Such
|
|
28
|
+
third-party materials remain subject to their respective licenses.
|
|
29
|
+
|
|
30
|
+
A specific file, package, component, or directory may state that it is
|
|
31
|
+
governed by a different license. In that case, that specific file, package,
|
|
32
|
+
component, or directory is governed by the license expressly stated therein.
|
|
33
|
+
|
|
34
|
+
Additional Use Grant:
|
|
35
|
+
|
|
36
|
+
You may make production use of the Licensed Work, provided that your use
|
|
37
|
+
does not include offering, providing, making available, distributing,
|
|
38
|
+
hosting, managing, embedding, reselling, white-labeling, sublicensing,
|
|
39
|
+
commercializing, or otherwise making the Licensed Work, or any modified
|
|
40
|
+
version or derivative work of the Licensed Work, available to Third Parties
|
|
41
|
+
as part of a Competitive Offering.
|
|
42
|
+
|
|
43
|
+
The following definitions and clarifications form part of, and govern
|
|
44
|
+
the interpretation of, the Additional Use Grant set out above.
|
|
45
|
+
|
|
46
|
+
1. "Production Use" means any use of the Licensed Work other than for
|
|
47
|
+
development, testing, evaluation, demonstration, experimentation,
|
|
48
|
+
benchmarking, or other non-production purposes.
|
|
49
|
+
|
|
50
|
+
2. "Affiliate" means any entity that, directly or indirectly,
|
|
51
|
+
controls, is controlled by, or is under common control with you,
|
|
52
|
+
where "control" means ownership of more than fifty percent (50%) of
|
|
53
|
+
the voting interests of the entity, or the power to direct its
|
|
54
|
+
management.
|
|
55
|
+
|
|
56
|
+
3. "Third Party" means any natural person or legal entity other than
|
|
57
|
+
you and your Affiliates.
|
|
58
|
+
|
|
59
|
+
4. "Competitive Offering" means any product or service, made available
|
|
60
|
+
to one or more Third Parties for a fee or other consideration
|
|
61
|
+
(including without limitation on a paid, subscription,
|
|
62
|
+
advertising-supported, hosted, or managed-service basis), that is
|
|
63
|
+
offered or marketed as, or that competes with, a software platform,
|
|
64
|
+
runtime, orchestration system, agent or automation system,
|
|
65
|
+
extension or distribution marketplace, or other software system
|
|
66
|
+
that provides, in substantial part, the same or substantially
|
|
67
|
+
similar capabilities as those provided by the Licensed Work. A
|
|
68
|
+
product or service is a Competitive Offering whether the Licensed
|
|
69
|
+
Work is provided in whole or in part, alone or bundled with other
|
|
70
|
+
software, and whether modified or unmodified.
|
|
71
|
+
|
|
72
|
+
5. Providing, hosting, or managing the Licensed Work for a Third Party,
|
|
73
|
+
or otherwise making the Licensed Work available to a Third Party as
|
|
74
|
+
a hosted or managed service such that the Third Party obtains the
|
|
75
|
+
principal value or functionality of the Licensed Work, is a
|
|
76
|
+
Competitive Offering and is not permitted by the Additional Use
|
|
77
|
+
Grant.
|
|
78
|
+
|
|
79
|
+
6. Subject to the foregoing, the Additional Use Grant permits you to
|
|
80
|
+
make Production Use of the Licensed Work for your own internal
|
|
81
|
+
business purposes and to build, operate, and provide your own
|
|
82
|
+
products and services to Third Parties, provided that the Licensed
|
|
83
|
+
Work itself (whether modified or unmodified) is not the product or
|
|
84
|
+
service, and is not a Competitive Offering, made available to those
|
|
85
|
+
Third Parties.
|
|
86
|
+
|
|
87
|
+
7. You may modify the Licensed Work and create derivative works for
|
|
88
|
+
any purpose permitted by this License. Any Production Use of such
|
|
89
|
+
modified or derivative works remains subject to the same
|
|
90
|
+
restrictions as the Licensed Work, including the prohibition on
|
|
91
|
+
Competitive Offerings.
|
|
92
|
+
|
|
93
|
+
8. Use of the Licensed Work by your own employees, contractors, and
|
|
94
|
+
agents, acting on your behalf and for your benefit, is not by
|
|
95
|
+
itself making the Licensed Work available to a Third Party.
|
|
96
|
+
|
|
97
|
+
9. Embedding or distributing the Licensed Work as a component of your
|
|
98
|
+
own product or service is permitted only where the Licensed Work
|
|
99
|
+
does not constitute the principal value of that product or service
|
|
100
|
+
and the product or service is not a Competitive Offering.
|
|
101
|
+
|
|
102
|
+
10. Nothing in this Additional Use Grant grants any right to use any
|
|
103
|
+
name, trademark, service mark, or logo of the Licensor or its
|
|
104
|
+
Affiliates, except as reasonably required for customary
|
|
105
|
+
attribution.
|
|
106
|
+
|
|
107
|
+
11. The rights stated in this Additional Use Grant are the maximum
|
|
108
|
+
rights granted for Production Use prior to the Change Date. Any
|
|
109
|
+
Production Use not expressly permitted requires a separate
|
|
110
|
+
commercial license from the Licensor.
|
|
111
|
+
|
|
112
|
+
12. If any provision of this Additional Use Grant is held invalid or
|
|
113
|
+
unenforceable, that provision shall be limited or eliminated to
|
|
114
|
+
the minimum extent necessary so that the remainder of this
|
|
115
|
+
Additional Use Grant, and of this License, remains in full force
|
|
116
|
+
and effect. The Licensor reserves all rights not expressly granted
|
|
117
|
+
by this License.
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
Change Date: Four years from the date the specific version of the Licensed
|
|
121
|
+
Work is first publicly released by Licensor.
|
|
122
|
+
|
|
123
|
+
Change License: Mozilla Public License, Version 2.0
|
|
124
|
+
|
|
125
|
+
For information about alternative licensing arrangements, commercial
|
|
126
|
+
licensing, enterprise licensing, OEM licensing, appliance licensing, managed
|
|
127
|
+
service licensing, cloud provider licensing, or other commercial use of the
|
|
128
|
+
Licensed Work, please contact: licensing@neuralchowder.com
|
|
129
|
+
|
|
130
|
+
-----------------------------------------------------------------------------
|
|
131
|
+
|
|
132
|
+
Notice
|
|
133
|
+
|
|
134
|
+
Business Source License 1.1
|
|
135
|
+
|
|
136
|
+
Terms
|
|
137
|
+
|
|
138
|
+
The Licensor hereby grants you the right to copy, modify, create derivative
|
|
139
|
+
works, redistribute, and make non-production use of the Licensed Work. The
|
|
140
|
+
Licensor may make an Additional Use Grant, above, permitting limited
|
|
141
|
+
production use.
|
|
142
|
+
|
|
143
|
+
Effective on the Change Date, or the fourth anniversary of the first publicly
|
|
144
|
+
available distribution of a specific version of the Licensed Work under this
|
|
145
|
+
License, whichever comes first, the Licensor hereby grants you rights under
|
|
146
|
+
the terms of the Change License, and the rights granted in the paragraph above
|
|
147
|
+
terminate.
|
|
148
|
+
|
|
149
|
+
If your use of the Licensed Work does not comply with the requirements
|
|
150
|
+
currently in effect as described in this License, you must purchase a
|
|
151
|
+
commercial license from the Licensor, its affiliated entities, or authorized
|
|
152
|
+
resellers, or you must refrain from using the Licensed Work.
|
|
153
|
+
|
|
154
|
+
All copies of the original and modified Licensed Work, and derivative works of
|
|
155
|
+
the Licensed Work, are subject to this License. This License applies separately
|
|
156
|
+
for each version of the Licensed Work and the Change Date may vary for each
|
|
157
|
+
version of the Licensed Work released by Licensor.
|
|
158
|
+
|
|
159
|
+
You must conspicuously display this License on each original or modified copy
|
|
160
|
+
of the Licensed Work. If you receive the Licensed Work in original or modified
|
|
161
|
+
form from a third party, the terms and conditions set forth in this License
|
|
162
|
+
apply to your use of that work.
|
|
163
|
+
|
|
164
|
+
Any use of the Licensed Work in violation of this License will automatically
|
|
165
|
+
terminate your rights under this License for the current and all other
|
|
166
|
+
versions of the Licensed Work.
|
|
167
|
+
|
|
168
|
+
This License does not grant you any right in any trademark or logo of Licensor
|
|
169
|
+
or its affiliates, provided that you may use a trademark or logo of Licensor
|
|
170
|
+
as expressly required by this License.
|
|
171
|
+
|
|
172
|
+
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON AN
|
|
173
|
+
"AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS
|
|
174
|
+
OR IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
175
|
+
FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND TITLE.
|
package/README.md
CHANGED
|
@@ -21,18 +21,20 @@ pnpm add -D @xemahq/repo-build-tooling
|
|
|
21
21
|
```bash
|
|
22
22
|
pnpm exec xema-readiness
|
|
23
23
|
pnpm exec xema-service-bootstrap --check
|
|
24
|
-
pnpm exec xema-scrub-swagger-paths dist
|
|
25
24
|
```
|
|
26
25
|
|
|
27
26
|
| Bin | What it does |
|
|
28
27
|
| --- | --- |
|
|
29
28
|
| `xema-readiness` | Runs the ordered checks between a source change and a push |
|
|
30
29
|
| `xema-service-bootstrap [--check] [--filter <key>] [--root <dir>]` | Generates `src/generated/*.generated.ts` service and worker descriptors from the repository's `xema-biome.json` manifests; `--check` fails on drift. Also derives each component's boot-required environment and edition delivery from its entry source (`oci-default` gives `src/main.ts`, `node-module` `dist/<x>` gives `src/<x>.ts`) with `@xemahq/peer-analysis`, writes `src/generated/<component>.component-facts.generated.json`, and inlines the same `bootEnv` (and `editionDelivery`, when reached) in the descriptor |
|
|
31
|
-
| `xema-scrub-swagger-paths <dist-dir>...` | Rewrites `@nestjs/swagger` plugin output that names a private install path, then fails the build if any leak remains (`--self-test` available) |
|
|
32
30
|
| `xema-composed-image <command>` | Build-time half of a composed-process image: `members`, `filters`, `dirs`, `pins`, `index`, `load`, `stage`, `stage-tree`, `pnpm-context`, `sync-injected`, `prisma-check`, `migrate`, `coordinate`, `load-image`, `smoke-refusal`, `dockerfile` |
|
|
33
|
-
| `xema-service-image stage --service <pkg> --path <dir> --platform linux/<amd64\|arm64> [--stage-dir <dir>]` | Runner half of a per-service image: `pnpm deploy --prod --offline --ignore-scripts` of a service already built on the runner, selected for the TARGET platform (`--os=linux --cpu=<arch> --libc=glibc`), into `<stage>/service/app`, with its Prisma client and the target's schema engine. Refuses a package whose native code holds no ELF for the target (a multi-platform package that also ships the target's binary is accepted) and production dependencies whose build script would have to run, uncommitted changes to tracked files, an untracked root build input, and running as any tool but the
|
|
31
|
+
| `xema-service-image stage --service <pkg> --path <dir> --platform linux/<amd64\|arm64> [--stage-dir <dir>]` | Runner half of a per-service image: `pnpm deploy --prod --offline --ignore-scripts` of a service already built on the runner, selected for the TARGET platform (`--os=linux --cpu=<arch> --libc=glibc`), into `<stage>/service/app`, with its Prisma client and the target's schema engine. Refuses a package whose native code holds no ELF for the target (a multi-platform package that also ships the target's binary is accepted) and production dependencies whose build script would have to run, uncommitted changes to tracked files, an untracked root build input, and running as any tool but one the lockfile pins for an importer of the repository. Fetches the schema engine from Prisma for every stage, checks it against both published checksums, and caches nothing. Writes `<stage>/service/xema-service-image.json` (commit, sha256 of each root build input: lockfile, root `package.json`, `pnpm-workspace.yaml`, `.npmrc`, `.pnpmfile.cjs`, `turbo.json`, `tsconfig*.json`; tool version; natives per package; engine sha256) and `<stage>/tool`. The Dockerfile COPYs those root inputs into `/proof/context/`, which puts them in the content tag, and its proof stage runs `src/service-image-in-image.mjs prove <app> <proof dir> --service <svc> --commit <BUILD_SHA>` on the target, offline: it checks the commit, the root inputs, the tool version, the platform and Node ABI, that each package's addons `dlopen`, and the engine's sha256 and version. The stage reaches the build as the named context `xema-service` (`--build-context xema-service=.xema-stage`); the authoritative name is `STAGED_SERVICE_CONTEXT` in `@xemahq/distribution-source-hash`, whose image hash frames such a service from its tracked tree, closure, turbo globalDependencies and tsconfig chain, so the stage must be built from no other repository input. The final stage only COPYs |
|
|
34
32
|
| `xema-arm64-supplement-needed` | Decides whether an arm64 supplement is still owed at `REGISTRY/IMAGE:CONTENT_TAG` (env: `REGISTRY`, `IMAGE`, `CONTENT_TAG`, `REGISTRY_USER`, `REGISTRY_TOKEN`). `needed=false` only when the coordinate serves an index whose linux/arm64 child is proven by its own image config; any other resolvable state is `needed=true`; a 401/403/5xx or an unresolvable child is an error. Writes `needed=true\|false` to `$GITHUB_OUTPUT`. Replaces the generated `arm64-supplement-needed.mjs` copy. |
|
|
35
|
-
| `xema-promote-image --service <name> --dev-ref <repo> --release-ref <repo> --tag <tag
|
|
33
|
+
| `xema-promote-image --service <name> --dev-ref <repo> --release-ref <repo> --tag <tag>` | Publishes the develop image's digest under the release tag instead of rebuilding, and proves no provenance: `reused` (`<release-ref>:<tag>` exists; `digest` is the release digest, `source` empty), `copied` (`<dev-ref>:<tag>` exists; it is copied by digest, re-probed, and the tool fails if the release digest differs; `source` is `<dev-ref>@<digest>`) or `miss` (neither exists; the caller builds). Writes `result`, `digest`, `source` to `$GITHUB_OUTPUT` and needs only `docker`. |
|
|
34
|
+
| `xema-affected-biomes --class <class> --affected-base <sha or ''> [--root <dir>] [--image-dir <dir>]` | Prints the biome ids a change affects, one per line and sorted, to stdout (logs go to stderr; empty output means none). A biome is affected when turbo (`turbo ls --affected` between the base and `HEAD`) reports one of its composed-process members' packages. An empty `--affected-base` selects every biome with members in the class. |
|
|
35
|
+
| `xema-pack-bundle <out> --class <class> --platform linux/<amd64\|arm64> [--biome <id>]… [--root <dir>] [--image-dir <dir>] [--build-source <repository>@<commit>]` | Packs each named biome (default: every biome with members in the class) as ONE content-addressed bundle of all its members, after the build: their `dist`, Prisma clients, schema and migrations, the biome manifest, its index and `contributions/*.contribution.json`, and their production dependencies WITHOUT the packages the host provides. The bundle is proven outside the repository (Prisma clients run, every member loads) before it is archived. Writes `<out>/<hex>/`, `<out>/<hex>.tgz` (`<hex>` is the archive's sha256, its address) and `<out>/bundles.json`. The bundle's `xema-bundle.json` is graded by the contracts' bundle manifest schema and records the build source: in GitHub Actions the workflow's repository and sha, locally the checkout's `origin` (a GitHub remote as `owner/repo`) and `HEAD`. Outside a git checkout, with a dirty tree or without an origin the pack is refused unless `--build-source <repository>@<commit>` is given. |
|
|
36
|
+
| `xema-publish-bundles <out> --registry <host/project> --channel <tag> --commit <40-hex> --source <owner/repo>` | Pushes the bundles in `<out>/bundles.json` with `oras` to `<registry>/bundles/<biome>:sha256-<hex>`, reads the pushed manifest back, and only then moves the `--channel` tag. A channel that already holds the digest is left alone (`unchanged`); a digest already pushed is only re-tagged (`retagged`). Writes `<out>/published.json`. Credentials come from the job's docker login. |
|
|
37
|
+
| `xema-notify-biome-host <out> --biome-host <https url> --channel <tag> --token-file <path>` | Tells Biome Host where each biome's channel now points, for every entry of `<out>/published.json` (unchanged ones too, so a run that failed after an earlier biome moved still converges): one POST with the bearer token read from `--token-file`. The URL must be https. |
|
|
36
38
|
| `xema-check-no-vendored-deps` | Fails on a `workspace:` range for a package the repository does not own |
|
|
37
39
|
| `xema-check-workspace-ranges` | Fails on a `workspace:` range the local package does not satisfy |
|
|
38
40
|
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xemahq/repo-build-tooling",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.1",
|
|
4
4
|
"description": "Dev-time build tooling shared by every Xema repository. Ships as plain ESM, depending only on @xemahq/release-policy for registry access, so the published artifact is the reviewed source.",
|
|
5
|
-
"license": "
|
|
5
|
+
"license": "LicenseRef-Xema-BSL-1.1",
|
|
6
6
|
"author": "Neuralchowder Inc. <developer@xema.dev> (https://xema.dev)",
|
|
7
7
|
"homepage": "https://xema.dev",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/xema-dev/xema-
|
|
11
|
-
"directory": "
|
|
10
|
+
"url": "git+https://github.com/xema-dev/xema-base.git",
|
|
11
|
+
"directory": "kernel/runtime/sdks/repo-build-tooling"
|
|
12
12
|
},
|
|
13
|
-
"bugs": "https://github.com/xema-dev/xema-
|
|
13
|
+
"bugs": "https://github.com/xema-dev/xema-base/issues",
|
|
14
14
|
"publishConfig": {
|
|
15
15
|
"registry": "https://registry.npmjs.org/",
|
|
16
16
|
"access": "public"
|
|
@@ -21,39 +21,55 @@
|
|
|
21
21
|
"src"
|
|
22
22
|
],
|
|
23
23
|
"bin": {
|
|
24
|
+
"xema-affected-biomes": "src/bundle-affected-cli.mjs",
|
|
24
25
|
"xema-arm64-supplement-needed": "src/arm64-supplement-needed.mjs",
|
|
25
26
|
"xema-check-no-vendored-deps": "src/check-no-vendored-deps.mjs",
|
|
26
27
|
"xema-check-workspace-ranges": "src/check-workspace-range-matches-local.mjs",
|
|
27
28
|
"xema-composed-image": "src/composed-image.mjs",
|
|
28
29
|
"xema-effective-input": "src/effective-input.mjs",
|
|
30
|
+
"xema-notify-biome-host": "src/bundle-notify-cli.mjs",
|
|
31
|
+
"xema-pack-bundle": "src/pack-bundle-cli.mjs",
|
|
29
32
|
"xema-promote-image": "src/promote-image.mjs",
|
|
33
|
+
"xema-publish-bundles": "src/bundle-publish-cli.mjs",
|
|
30
34
|
"xema-readiness": "src/readiness.mjs",
|
|
31
|
-
"xema-scrub-swagger-paths": "src/scrub-swagger-plugin-paths.mjs",
|
|
32
35
|
"xema-service-bootstrap": "src/service-bootstrap.mjs",
|
|
33
36
|
"xema-service-image": "src/service-image.mjs"
|
|
34
37
|
},
|
|
35
38
|
"exports": {
|
|
36
39
|
"./arm64-supplement-needed": "./src/arm64-supplement-needed.mjs",
|
|
40
|
+
"./boot-graph-edges": "./src/boot-graph-edges.mjs",
|
|
41
|
+
"./bootstrap-closure": "./src/bootstrap-closure.mjs",
|
|
42
|
+
"./bundle-notify": "./src/bundle-notify.mjs",
|
|
43
|
+
"./bundle-publish": "./src/bundle-publish.mjs",
|
|
37
44
|
"./check-no-vendored-deps": "./src/check-no-vendored-deps.mjs",
|
|
38
45
|
"./check-workspace-range-matches-local": "./src/check-workspace-range-matches-local.mjs",
|
|
46
|
+
"./component-operations": "./src/component-operations.mjs",
|
|
39
47
|
"./composed-image": "./src/composed-image.mjs",
|
|
40
48
|
"./effective-input": "./src/effective-input.mjs",
|
|
49
|
+
"./pack-bundle": "./src/pack-bundle.mjs",
|
|
41
50
|
"./package.json": "./package.json",
|
|
42
51
|
"./promote-image": "./src/promote-image.mjs",
|
|
43
52
|
"./readiness": "./src/readiness.mjs",
|
|
44
|
-
"./scrub-swagger-plugin-paths": "./src/scrub-swagger-plugin-paths.mjs",
|
|
45
53
|
"./service-bootstrap": "./src/service-bootstrap.mjs",
|
|
46
54
|
"./service-image": "./src/service-image.mjs"
|
|
47
55
|
},
|
|
48
56
|
"dependencies": {
|
|
49
|
-
"@xemahq/
|
|
50
|
-
"@xemahq/
|
|
51
|
-
"@xemahq/
|
|
57
|
+
"@xemahq/biome-bundle-pack": "^0.2.1",
|
|
58
|
+
"@xemahq/peer-analysis": "^0.4.0",
|
|
59
|
+
"@xemahq/contracts": "^0.120.1",
|
|
60
|
+
"@xemahq/release-policy": "^20.0.0",
|
|
61
|
+
"@xemahq/host-abi-node": "^0.2.0"
|
|
62
|
+
},
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"eslint": "^9.39.4",
|
|
65
|
+
"@xemahq/eslint-config": "^0.14.3"
|
|
52
66
|
},
|
|
53
67
|
"scripts": {
|
|
54
|
-
"
|
|
68
|
+
"lint": "eslint .",
|
|
69
|
+
"test": "node --test src/check-workspace-range-matches-local.test.mjs && node --test src/check-no-vendored-deps.test.mjs && node --test src/readiness.test.mjs && node --test src/composed-image.test.mjs && node --test src/composed-image-class.test.mjs && node --test src/composed-image-coordinate-cli.test.mjs && node --test src/declaration-refusal.test.mjs && node --test src/smoke-refusal.test.mjs && node --test src/load-image.test.mjs && node --test src/composed-image-coordinate.test.mjs && node --test src/composed-image-dockerfile.test.mjs && node --test src/service-bootstrap.test.mjs && node --test src/service-bootstrap-component-facts.test.mjs && node --test src/service-bootstrap-protocols.test.mjs && node --test src/composed-image-prebuilt-dockerfile.test.mjs && node --test src/composed-image-in-image-closure.test.mjs && node --test src/composed-image-stage.test.mjs && node --test src/composed-image-stage-deploy.test.mjs && node --test src/composed-image-stage-tree.test.mjs && node --test src/composed-image-install.test.mjs && node --test src/canonical-hidden-hoist.test.mjs && node --test src/composed-image-proof.test.mjs && node --test src/composed-image-pnpm-context.test.mjs && node --test src/composed-image-sync-injected.test.mjs && node --test src/composed-image-prisma-check.test.mjs && node --test src/composed-image-prisma-engine.test.mjs && node --test src/composed-migrate.test.mjs && node --test src/promote-image.test.mjs && node --test src/arm64-supplement-needed.test.mjs && node --test src/service-image.test.mjs && node --test src/image-cpu-arch.test.mjs && node --test src/staged-image-proof.test.mjs && node --test src/turbo-config-projection.test.mjs && node --test src/effective-input.test.mjs && node --test src/effective-input-deployed-files.test.mjs && node --test src/service-image-platform-twin.test.mjs && node --test src/pack-bundle.test.mjs && node --test src/bundle-publish.test.mjs && node --test src/bundle-notify.test.mjs && node --test src/bundle-affected.test.mjs && node --test src/boot-graph-edges.test.mjs && node --test src/bootstrap-closure.test.mjs && node --test src/component-operations.test.mjs"
|
|
55
70
|
},
|
|
56
71
|
"xemaRelease": {
|
|
57
|
-
"sourceDigest": "sha256:
|
|
72
|
+
"sourceDigest": "sha256:61ab673dbc2295bc71318bc83e3e150672f1b3a3ee1599763c60d8ceae14c45d",
|
|
73
|
+
"sha": "9a88d6fde912be61affb481b069f009abfdfde21"
|
|
58
74
|
}
|
|
59
75
|
}
|
|
@@ -92,7 +92,7 @@ async function getJson({
|
|
|
92
92
|
},
|
|
93
93
|
{ sleep },
|
|
94
94
|
);
|
|
95
|
-
if (response.status === 404) return { status: 404, document: undefined };
|
|
95
|
+
if (response.status === 404) {return { status: 404, document: undefined };}
|
|
96
96
|
if (response.status !== 200) {
|
|
97
97
|
throw new Error(
|
|
98
98
|
`${registry}: manifest lookup for ${repository}:${reference} returned HTTP ${response.status}`,
|
|
@@ -122,7 +122,7 @@ async function getJson({
|
|
|
122
122
|
*/
|
|
123
123
|
export function declaredArm64Children(document) {
|
|
124
124
|
const manifests = document?.manifests;
|
|
125
|
-
if (!Array.isArray(manifests)) return [];
|
|
125
|
+
if (!Array.isArray(manifests)) {return [];}
|
|
126
126
|
return manifests
|
|
127
127
|
.filter(
|
|
128
128
|
(child) =>
|
|
@@ -279,8 +279,8 @@ async function main(env) {
|
|
|
279
279
|
const registry = env.REGISTRY;
|
|
280
280
|
const image = env.IMAGE;
|
|
281
281
|
const contentHash = env.CONTENT_TAG;
|
|
282
|
-
if (!registry) throw new Error('REGISTRY is required.');
|
|
283
|
-
if (!image) throw new Error('IMAGE is required.');
|
|
282
|
+
if (!registry) {throw new Error('REGISTRY is required.');}
|
|
283
|
+
if (!image) {throw new Error('IMAGE is required.');}
|
|
284
284
|
const prefix = `${registry}/`;
|
|
285
285
|
if (!image.startsWith(prefix)) {
|
|
286
286
|
throw new Error(`IMAGE '${image}' is not hosted on '${registry}'`);
|
|
@@ -311,7 +311,7 @@ async function main(env) {
|
|
|
311
311
|
}
|
|
312
312
|
|
|
313
313
|
const out = env.GITHUB_OUTPUT;
|
|
314
|
-
if (out) appendFileSync(out, `needed=${needed ? 'true' : 'false'}\n`);
|
|
314
|
+
if (out) {appendFileSync(out, `needed=${needed ? 'true' : 'false'}\n`);}
|
|
315
315
|
}
|
|
316
316
|
|
|
317
317
|
if (invokedDirectly(process.argv[1], import.meta.url)) {
|
|
@@ -319,7 +319,7 @@ if (invokedDirectly(process.argv[1], import.meta.url)) {
|
|
|
319
319
|
console.error(
|
|
320
320
|
`::error title=arm64 supplement probe failed::${error.message}`,
|
|
321
321
|
);
|
|
322
|
-
for (const line of describeErrorChain(error)) console.error(` ${line}`);
|
|
322
|
+
for (const line of describeErrorChain(error)) {console.error(` ${line}`);}
|
|
323
323
|
process.exit(1);
|
|
324
324
|
});
|
|
325
325
|
}
|