@mercury-fw/cli 0.31.1 → 0.32.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.
- package/CHANGELOG.md +14 -0
- package/dist/src/catalog.d.ts +1 -1
- package/package.json +6 -6
- package/src/catalog.ts +1 -1
- package/src/render.ts +3 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @mercury-fw/cli
|
|
2
2
|
|
|
3
|
+
## 0.32.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 1fa3a97: - Every tool plugin declared in `mercury.config.ts` loads: `MERCURY_CLIS` is no longer read. An app that used it to keep a declared plugin off now gets that plugin on; remove the plugin from the config instead.
|
|
8
|
+
- A new app's env example has no `MERCURY_CLIS`, and its config's comment says every declared plugin and channel is active.
|
|
9
|
+
- A plugin caught in a dependency cycle is always reported at startup.
|
|
10
|
+
- The plugins' READMEs no longer ask to list them in `MERCURY_CLIS`.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [1fa3a97]
|
|
15
|
+
- @mercury-fw/core@0.32.0
|
|
16
|
+
|
|
3
17
|
## 0.31.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/src/catalog.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export type EnvVar = {
|
|
|
12
12
|
value?: string;
|
|
13
13
|
};
|
|
14
14
|
/** A channel or tool plugin the app can include. `id` is the plugin's own
|
|
15
|
-
* `name` (what
|
|
15
|
+
* `name` (what the logs and `dependsOn` call it), `exportName` the value the
|
|
16
16
|
* app's config imports from `package`. */
|
|
17
17
|
export type CatalogEntry = {
|
|
18
18
|
id: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mercury-fw/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -41,16 +41,16 @@
|
|
|
41
41
|
"comment:shape": "The Mercury CLI (`mfw`). `mfw create <dir>` writes a new Mercury app from the template. The framework packages move in lockstep with it, so a new app gets them at the CLI's own version; plugins and channels at the registry's latest. The plugin and channel packages are devDependencies only for the catalog test. `main(argv)` is exported for create-mercury-agent.",
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@clack/prompts": "^1.8.1",
|
|
44
|
-
"@mercury-fw/core": "0.
|
|
44
|
+
"@mercury-fw/core": "0.32.0",
|
|
45
45
|
"commander": "^15.0.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@mercury-fw/channel-google-chat": "0.1.3",
|
|
49
49
|
"@mercury-fw/channel-http": "0.1.1",
|
|
50
|
-
"@mercury-fw/formatter": "0.
|
|
51
|
-
"@mercury-fw/plugin-atlassian-admin": "0.1.
|
|
52
|
-
"@mercury-fw/plugin-bitbucket": "0.1.
|
|
53
|
-
"@mercury-fw/plugin-jira": "0.4.
|
|
50
|
+
"@mercury-fw/formatter": "0.32.0",
|
|
51
|
+
"@mercury-fw/plugin-atlassian-admin": "0.1.1",
|
|
52
|
+
"@mercury-fw/plugin-bitbucket": "0.1.1",
|
|
53
|
+
"@mercury-fw/plugin-jira": "0.4.2",
|
|
54
54
|
"@mercury-fw/typescript-config": "*",
|
|
55
55
|
"@types/bun": "^1.4.2",
|
|
56
56
|
"typescript": "^6.0.3"
|
package/src/catalog.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
export type EnvVar = { name: string; comment: string; value?: string };
|
|
11
11
|
|
|
12
12
|
/** A channel or tool plugin the app can include. `id` is the plugin's own
|
|
13
|
-
* `name` (what
|
|
13
|
+
* `name` (what the logs and `dependsOn` call it), `exportName` the value the
|
|
14
14
|
* app's config imports from `package`. */
|
|
15
15
|
export type CatalogEntry = {
|
|
16
16
|
id: string;
|
package/src/render.ts
CHANGED
|
@@ -51,8 +51,7 @@ const CONFIG_HEADER = `/**
|
|
|
51
51
|
* its plugins hand over read, and the assistant's persona. The entrypoints
|
|
52
52
|
* (\`src/index.ts\`, \`src/repl.ts\`) hand this config to \`composeMercury\`.
|
|
53
53
|
*
|
|
54
|
-
*
|
|
55
|
-
* channel is active as soon as it's declared here.
|
|
54
|
+
* Every tool plugin and channel declared here is active.
|
|
56
55
|
*/`;
|
|
57
56
|
|
|
58
57
|
/** Builds every file of the new app. Throws on an invalid app name, an empty
|
|
@@ -286,22 +285,11 @@ function renderPackageJson(
|
|
|
286
285
|
return `${JSON.stringify(manifest, null, 2)}\n`;
|
|
287
286
|
}
|
|
288
287
|
|
|
289
|
-
/** The env example: the core's variables,
|
|
290
|
-
*
|
|
288
|
+
/** The env example: the core's variables, then a section per chosen entry
|
|
289
|
+
* that reads any variable. */
|
|
291
290
|
function renderEnv(channels: CatalogEntry[], tools: CatalogEntry[]): string {
|
|
292
291
|
const block = (vars: EnvVar[]) => vars.map((v) => `# ${v.comment}\n${v.name}=${v.value ?? ""}`).join("\n");
|
|
293
292
|
const sections = [block(CORE_ENV)];
|
|
294
|
-
if (tools.length > 0) {
|
|
295
|
-
sections.push(
|
|
296
|
-
block([
|
|
297
|
-
{
|
|
298
|
-
name: "MERCURY_CLIS",
|
|
299
|
-
comment: "Tool plugins this instance enables (their ids, comma-separated)",
|
|
300
|
-
value: tools.map((t) => t.id).join(","),
|
|
301
|
-
},
|
|
302
|
-
]),
|
|
303
|
-
);
|
|
304
|
-
}
|
|
305
293
|
for (const entry of [...channels, ...tools]) {
|
|
306
294
|
const vars = [...entry.env];
|
|
307
295
|
if (entry.credentials !== undefined) {
|