@camunda8/cli 4.6.0-alpha.7 → 4.6.1-alpha.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/README.md +4 -0
- package/dist/default-plugins/element-template/AGENTS.md +24 -27
- package/dist/default-plugins/element-template/README.md +19 -15
- package/dist/default-plugins/element-template/c8ctl-plugin.js +338 -461
- package/dist/default-plugins/element-template/docs/design.md +38 -75
- package/dist/default-plugins/element-template/package.json +1 -1
- package/dist/vendor/bpmn-element-templates.cjs +4713 -4599
- package/package.json +1 -1
|
@@ -24,61 +24,30 @@ shipped layout but during development we run directly from
|
|
|
24
24
|
|
|
25
25
|
## OOTB template integration
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
### Which releases
|
|
53
|
-
|
|
54
|
-
`sync` lists the releases (`api.github.com/repos/camunda/connectors/
|
|
55
|
-
releases?per_page=100`, overridable via
|
|
56
|
-
`C8CTL_CONNECTORS_RELEASES_URL`) and keeps **the newest release of each
|
|
57
|
-
minor line** — 8.8.x, 8.9.x, 8.10.x, ...:
|
|
58
|
-
|
|
59
|
-
- Bundles are cumulative within a line, so the newest patch of 8.8
|
|
60
|
-
already contains everything 8.8.17 shipped. Across lines they differ,
|
|
61
|
-
which is why one release per line is kept rather than just the newest
|
|
62
|
-
release overall.
|
|
63
|
-
- Alphas count (`8.10.0-alpha3` is the only source for a line that has
|
|
64
|
-
no stable release yet); release candidates do not — they are
|
|
65
|
-
superseded within days. Note that semver ranks `8.10.0-alpha5-rc3`
|
|
66
|
-
*above* `8.10.0-alpha5`, so RCs are filtered explicitly rather than
|
|
67
|
-
by ordering.
|
|
68
|
-
- Draft releases and releases without a bundle asset (a release that is
|
|
69
|
-
still being built) are skipped, so an in-flight release falls back to
|
|
70
|
-
the previous one on that line.
|
|
71
|
-
- Only the **4 newest minor lines** are kept (`MAX_MINOR_LINES` in
|
|
72
|
-
`releases.ts`), roughly Camunda's supported-version window. This keeps
|
|
73
|
-
the selection deterministic: the newest release of each selected line
|
|
74
|
-
is always within the first page of the listing, whereas an EOL line's
|
|
75
|
-
newest release drifts down the listing until it falls off the page and
|
|
76
|
-
would silently vanish from the selection.
|
|
77
|
-
|
|
78
|
-
Bundles contain a superset of the marketplace index: the `-hybrid`
|
|
79
|
-
variants and a few templates the marketplace does not list are cached
|
|
80
|
-
too, and templates without a numeric `version` (pre-versioned legacy
|
|
81
|
-
entries that version resolution cannot rank) are skipped.
|
|
27
|
+
`sync` reads `@camunda/connectors-element-templates` from npm. npm honours
|
|
28
|
+
the user's registry, scoped registry, proxy, CA and authentication settings.
|
|
29
|
+
The package is published from `camunda/connectors` and includes connector
|
|
30
|
+
templates and their metadata in one archive.
|
|
31
|
+
|
|
32
|
+
The installed package contains arrays of versions in
|
|
33
|
+
`src/element-templates/*.json`. Entries without a numeric `version`
|
|
34
|
+
are legacy duplicates that version resolution cannot rank and are skipped;
|
|
35
|
+
entries without `engines` remain eligible for version selection. Hybrid
|
|
36
|
+
templates are not in the package.
|
|
37
|
+
|
|
38
|
+
Each sync uses `npm install` in a temporary staging directory under the cache
|
|
39
|
+
lock. npm resolves and extracts a single package from
|
|
40
|
+
`C8CTL_ELEMENT_TEMPLATES_PACKAGE` (a package spec, tarball URL or local path)
|
|
41
|
+
or the default package. The package is the one directory in the staging
|
|
42
|
+
`node_modules` that has `src/element-templates`, so discovery does not depend
|
|
43
|
+
on npm's save settings; its name and version come from its installed package
|
|
44
|
+
manifest. npm handles package archive formats and local symlinks; the staging
|
|
45
|
+
directory is removed after reading its templates.
|
|
46
|
+
|
|
47
|
+
Sync ingests one template package: a package that depends on another template
|
|
48
|
+
package fails with an error naming both. Supporting several could ingest every
|
|
49
|
+
template-bearing package in the install tree, with a dependent winning over its
|
|
50
|
+
dependencies and a warning on conflicting `id@version` entries.
|
|
82
51
|
|
|
83
52
|
## Cache strategy
|
|
84
53
|
|
|
@@ -90,15 +59,13 @@ We mirror Desktop Modeler's approach
|
|
|
90
59
|
Modeler's `.camunda-connector-templates.json` shape).
|
|
91
60
|
- `fetched-at` — epoch ms of last sync.
|
|
92
61
|
- Each cached template gets
|
|
93
|
-
`metadata.upstreamRef =
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
cache. A partial sync also leaves `fetched-at` untouched, so the
|
|
101
|
-
staleness nudge keeps asking for a full refresh.
|
|
62
|
+
`metadata.upstreamRef = npm:<package>@<version>#src/element-templates/<file>` injected.
|
|
63
|
+
The single current package replaces matching `id@version` entries, while
|
|
64
|
+
older entries remain until explicitly pruned. It does not combine multiple
|
|
65
|
+
configured packages.
|
|
66
|
+
- An install failure or malformed template file retains the old cache and
|
|
67
|
+
timestamp, and disables pruning.
|
|
68
|
+
A cold sync fails instead of writing an empty cache.
|
|
102
69
|
|
|
103
70
|
### Lifecycle
|
|
104
71
|
|
|
@@ -118,18 +85,14 @@ We mirror Desktop Modeler's approach
|
|
|
118
85
|
`c8ctl element-template sync`. We don't auto-refresh — surprise
|
|
119
86
|
network activity inside `apply` is undesirable and a manual sync is
|
|
120
87
|
cheap.
|
|
121
|
-
- **`sync`**
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
may keep a legacy line intentionally). Pruning is skipped when any
|
|
125
|
-
bundle failed to download: a bundle URL changes with every patch, so
|
|
126
|
-
the previous patch's cached templates are always "stale", and dropping
|
|
127
|
-
them while their replacement failed would delete a whole minor line
|
|
128
|
-
over one transient HTTP error.
|
|
88
|
+
- **`sync`** stages a fresh npm install. **`sync --prune`** drops cached
|
|
89
|
+
entries absent from the current package; a failed install never prunes the
|
|
90
|
+
previous cache.
|
|
129
91
|
- **Atomicity**: `sync` writes `templates.json` and `fetched-at`
|
|
130
92
|
via a sibling temp file + `renameSync`, so a kill mid-sync leaves
|
|
131
93
|
the previous cache intact. `apply --in-place` uses the same recipe
|
|
132
|
-
for the user's BPMN file.
|
|
94
|
+
for the user's BPMN file. The temporary installation is created under
|
|
95
|
+
the cache lock and removed after its files have been read.
|
|
133
96
|
- **Concurrent syncs** are serialised by an advisory lock
|
|
134
97
|
(`<cacheDir>/.sync.lock`) holding `{pid, startedAt}`. A second
|
|
135
98
|
`sync` exits non-zero with a pointer to the lockfile; stale locks
|
|
@@ -142,8 +105,8 @@ We mirror Desktop Modeler's approach
|
|
|
142
105
|
|
|
143
106
|
Earlier draft considered fetching only the requested `(id, version)`
|
|
144
107
|
on demand. Rejected because **search needs the template names**, which
|
|
145
|
-
means every template has to be read anyway.
|
|
146
|
-
whole
|
|
108
|
+
means every template has to be read anyway. Installing the package makes this
|
|
109
|
+
moot: the whole package arrives together, so eager bulk fetch is both simpler
|
|
147
110
|
and faster than any lazy scheme.
|
|
148
111
|
|
|
149
112
|
## Version resolution
|