@toa.io/operations 1.0.0-alpha.314 → 1.0.0-alpha.316
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,23 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.0.0-alpha.316](https://github.com/toa-io/toa/compare/v1.0.0-alpha.315...v1.0.0-alpha.316) (2026-09-23)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @toa.io/operations
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [1.0.0-alpha.315](https://github.com/toa-io/toa/compare/v1.0.0-alpha.314...v1.0.0-alpha.315) (2026-09-23)
|
|
15
|
+
|
|
16
|
+
* feat(map)!: leave out of a contract what the runtime gives every component ([b81837a](https://github.com/toa-io/toa/commit/b81837a3bc4771d7ee1c10fe613c9a1d7501bf1a))
|
|
17
|
+
|
|
18
|
+
### BREAKING CHANGES
|
|
19
|
+
|
|
20
|
+
* the deployed component map is `/etc/toa/.map.json.gz`.
|
|
21
|
+
|
|
22
|
+
|
|
6
23
|
# [1.0.0-alpha.314](https://github.com/toa-io/toa/compare/v1.0.0-alpha.313...v1.0.0-alpha.314) (2026-09-19)
|
|
7
24
|
|
|
8
25
|
### Features
|
package/image/runtime.Dockerfile
CHANGED
|
@@ -6,6 +6,12 @@ ARG VERSION
|
|
|
6
6
|
# on, and npm links a dependency's binaries only into a local `node_modules/.bin`
|
|
7
7
|
WORKDIR /toa
|
|
8
8
|
|
|
9
|
+
# what the install scripts of Toa's own dependencies may do, stated where npm reads it — the
|
|
10
|
+
# project Toa is installed into, which every later `npm i --prefix /toa` of an image built on
|
|
11
|
+
# this one installs into too. npm runs no script nobody allowed and warns about each, and the
|
|
12
|
+
# one there is, msgpackr-extract's, only looks for the binary its optional dependency provides
|
|
13
|
+
RUN echo '{ "private": true, "allowScripts": { "msgpackr-extract": false } }' > package.json
|
|
14
|
+
|
|
9
15
|
# mounted rather than written: npm's cache is a hundred megabytes, and a layer keeps whatever
|
|
10
16
|
# the command left behind
|
|
11
17
|
RUN --mount=type=cache,target=/root/.npm,sharing=locked \
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toa.io/operations",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.316",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Toa Deployment",
|
|
6
6
|
"homepage": "https://toa.io",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@toa.io/generic": "1.0.0-alpha.311",
|
|
32
32
|
"@toa.io/kubernetes": "1.0.0-alpha.301",
|
|
33
|
-
"@toa.io/norm": "1.0.0-alpha.
|
|
33
|
+
"@toa.io/norm": "1.0.0-alpha.316",
|
|
34
34
|
"oxc-parser": "0.150.0",
|
|
35
35
|
"paseto": "4.0.1"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "1a873a2f74dc27cc82cc523aa4557a38f23593c6"
|
|
38
38
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { gzipSync } from 'node:zlib'
|
|
1
2
|
import { map } from '@toa.io/norm'
|
|
2
3
|
import { MAP_DIRECTORY, MAP_FILE } from '@toa.io/definitions'
|
|
3
4
|
|
|
@@ -170,8 +171,14 @@ function unit(context, dependency) {
|
|
|
170
171
|
* The component map every workload mounts: which version of a component a process asks what that
|
|
171
172
|
* component provides. Named rather than found, because a ConfigMap mounts as a directory.
|
|
172
173
|
*
|
|
174
|
+
* Compressed here rather than in the chart, which renders no gzip, and carried as the bytes it is:
|
|
175
|
+
* a ConfigMap is capped at a megabyte, and this copy is read by a program. `gzipSync` writes a zero
|
|
176
|
+
* timestamp, so a deploy that changed nothing renders the same object.
|
|
177
|
+
*
|
|
173
178
|
* @param {toa.norm.Context} context
|
|
174
179
|
*/
|
|
175
180
|
function versions(context) {
|
|
176
|
-
|
|
181
|
+
const gzip = gzipSync(Buffer.from(JSON.stringify(map(context)))).toString('base64')
|
|
182
|
+
|
|
183
|
+
return { directory: MAP_DIRECTORY, file: MAP_FILE, gzip }
|
|
177
184
|
}
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
# What every component of the context provides, by the version this deployment runs of it.
|
|
3
3
|
# Mounted rather than rendered into a workload's environment: a variable would replace every pod
|
|
4
4
|
# of the context on every deployment, and a pod that came up between two of them could not be
|
|
5
|
-
# told.
|
|
6
|
-
#
|
|
5
|
+
# told. Carried gzipped, because what is read here is read by a program and a ConfigMap is capped
|
|
6
|
+
# at a megabyte: `kubectl exec <pod> -- zcat {{ .Values.map.directory }}/{{ .Values.map.file }}`.
|
|
7
7
|
apiVersion: v1
|
|
8
8
|
kind: ConfigMap
|
|
9
9
|
metadata:
|
|
10
10
|
name: components
|
|
11
|
-
|
|
12
|
-
{{ .Values.map.file }}: |
|
|
13
|
-
{{ .Values.map.components | toJson | indent 4 }}
|
|
11
|
+
binaryData:
|
|
12
|
+
{{ .Values.map.file }}: {{ .Values.map.gzip | quote }}
|
|
14
13
|
{{- end }}
|
|
@@ -213,7 +213,7 @@ describe('prepare', () => {
|
|
|
213
213
|
assert.deepStrictEqual(lines, [
|
|
214
214
|
`FROM ${image.dependencies.reference}`,
|
|
215
215
|
'COPY --link . /composition',
|
|
216
|
-
'CMD toa compose * --map /etc/toa/.map.json'
|
|
216
|
+
'CMD toa compose * --map /etc/toa/.map.json.gz'
|
|
217
217
|
])
|
|
218
218
|
|
|
219
219
|
const entries = (await readdir(context, { recursive: true })).sort()
|