@bakers-build/addon-essentials 0.0.0-stage → 0.1.0-next.38

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 keytec GmbH
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,5 @@
1
- # Temporary Holding Version
1
+ # @bakers-build/addon-essentials
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ bakers.build aggregator plugin: auto-loads the dropsh essentials (markdown + authoritative JSON:API schema).
4
+
5
+ Part of the bakers.build CLI. Install the meta package `@bakers-build/bakers` to get the `bakers` CLI with all addons. Source: https://git.key-tec.de/bakers-build/bakers-build (bakers-cli/).
@@ -0,0 +1,18 @@
1
+ import type { DropSHPlugin } from 'dropsh/plugin';
2
+ /** Options essentials forwards to the children that take any. */
3
+ export interface EssentialsOptions {
4
+ /**
5
+ * BB-495: no longer read. The ambient-workspace filler moved to `bakers ui`,
6
+ * which attaches `@bakers-build/addon-workspace` itself; the dropsh request path
7
+ * carries authentication and nothing else, so the caller names the workspace
8
+ * on the call instead of a config value stamping it in.
9
+ */
10
+ workspace_id?: string;
11
+ }
12
+ /**
13
+ * The config-free essentials: markdown renderer, authoritative JSON:API schema
14
+ * and BB-403's name resolver, which lives in its own
15
+ * `@bakers-build/addon-name-refs` package. Exactly three plugins, regardless of
16
+ * `opts` (BB-495).
17
+ */
18
+ export declare function essentialChildren(_opts?: EssentialsOptions): DropSHPlugin[];
@@ -0,0 +1,19 @@
1
+ // The one place that says which plugins `@bakers-build/addon-essentials` pulls in.
2
+ //
3
+ // It exists because essentials is reachable through TWO config forms that must
4
+ // not drift: the legacy `plugins: [{ plugin: '@bakers-build/addon-essentials' }]`
5
+ // descriptor, which constructs this package's DEFAULT EXPORT, and the
6
+ // Storybook-style `addons: ['@bakers-build/addon-essentials']`, which runs its
7
+ // `./preset`. Both call this function, so a child added here appears on both.
8
+ import { nameRefsPlugin } from '@bakers-build/addon-name-refs';
9
+ import { jsonapiSchemaPlugin } from '@dropsh/plugin-jsonapi-schema';
10
+ import { markdownPlugin } from '@dropsh/plugin-markdown';
11
+ /**
12
+ * The config-free essentials: markdown renderer, authoritative JSON:API schema
13
+ * and BB-403's name resolver, which lives in its own
14
+ * `@bakers-build/addon-name-refs` package. Exactly three plugins, regardless of
15
+ * `opts` (BB-495).
16
+ */
17
+ export function essentialChildren(_opts = {}) {
18
+ return [markdownPlugin(), jsonapiSchemaPlugin(), nameRefsPlugin()];
19
+ }
@@ -0,0 +1,25 @@
1
+ import { type EssentialsOptions } from './children.js';
2
+ /**
3
+ * Aggregator: pull the essentials in through a single `plugins[]` entry.
4
+ * `composePlugins(...)` returns the flat child list; dropsh (>= 0.5.6) flattens
5
+ * a plugins[] entry that resolves to an array into separate plugin entries, and
6
+ * the conductor's own resolver does the same — so each child stays a distinct,
7
+ * genuine plugin, indistinguishable from listing them one by one. No hand-merged
8
+ * or presence-guarded composite hooks.
9
+ *
10
+ * `authProvider`-carrying plugins (oauth2, with per-profile credentials) are
11
+ * deliberately NOT here — they stay explicit in the config (AC-4).
12
+ *
13
+ * BB-351 made `@bakers-build/addon-workspace` a child too, so an ambient workspace
14
+ * was filled on every connection without any config naming it. BB-495 removed
15
+ * it: the dropsh request path carries authentication and nothing else, and the
16
+ * caller names the workspace on the call. `bakers ui` attaches that plugin to its
17
+ * own chain instead, because a focused workspace is what makes its lists
18
+ * readable. No child here reads an option any more.
19
+ *
20
+ * Add a new essential = add it in `children.ts` (+ a real dependency in
21
+ * package.json). Existing configs naming only this aggregator pick it up (AC-5).
22
+ */
23
+ declare const _default: (opts?: EssentialsOptions) => import("dropsh/plugin").DropSHPlugin[];
24
+ export default _default;
25
+ export { type EssentialsOptions, essentialChildren } from './children.js';
@@ -0,0 +1,25 @@
1
+ import { composePlugins } from 'dropsh/plugin';
2
+ import { essentialChildren } from './children.js';
3
+ /**
4
+ * Aggregator: pull the essentials in through a single `plugins[]` entry.
5
+ * `composePlugins(...)` returns the flat child list; dropsh (>= 0.5.6) flattens
6
+ * a plugins[] entry that resolves to an array into separate plugin entries, and
7
+ * the conductor's own resolver does the same — so each child stays a distinct,
8
+ * genuine plugin, indistinguishable from listing them one by one. No hand-merged
9
+ * or presence-guarded composite hooks.
10
+ *
11
+ * `authProvider`-carrying plugins (oauth2, with per-profile credentials) are
12
+ * deliberately NOT here — they stay explicit in the config (AC-4).
13
+ *
14
+ * BB-351 made `@bakers-build/addon-workspace` a child too, so an ambient workspace
15
+ * was filled on every connection without any config naming it. BB-495 removed
16
+ * it: the dropsh request path carries authentication and nothing else, and the
17
+ * caller names the workspace on the call. `bakers ui` attaches that plugin to its
18
+ * own chain instead, because a focused workspace is what makes its lists
19
+ * readable. No child here reads an option any more.
20
+ *
21
+ * Add a new essential = add it in `children.ts` (+ a real dependency in
22
+ * package.json). Existing configs naming only this aggregator pick it up (AC-5).
23
+ */
24
+ export default (opts = {}) => composePlugins(...essentialChildren(opts));
25
+ export { essentialChildren } from './children.js';
@@ -0,0 +1,3 @@
1
+ import type { BbPreset } from '@bakers-build/core';
2
+ import { type EssentialsOptions } from './children.js';
3
+ export declare const connectionPlugins: BbPreset<EssentialsOptions>['connectionPlugins'];
@@ -0,0 +1,17 @@
1
+ // BB-215: the essentials meta-addon self-declares its connection contributions
2
+ // via `./preset`. It pulls the essentials into the connection surface through a
3
+ // single entry — the children are returned flat, exactly as the default-export
4
+ // aggregator does, so each child stays a distinct plugin. The children are
5
+ // essentials' OWN deps (imported in `children.ts`, resolved from this package's
6
+ // node_modules), so no fragile transitive resolution from the config's bases.
7
+ //
8
+ // BB-351 made `@bakers-build/addon-workspace` one of those children, and it was the
9
+ // only one that read an option. BB-495 removed it, so no child reads an option
10
+ // any more: `opts` is still the GLOBAL options `loadBbConfig` hands every
11
+ // preset, but nothing here consumes them. `workspace_id` is optional in the
12
+ // connection config and reaches `bakers ui` alone.
13
+ import { essentialChildren } from './children.js';
14
+ export const connectionPlugins = (acc, opts) => [
15
+ ...acc,
16
+ ...essentialChildren((opts ?? {})),
17
+ ];
package/package.json CHANGED
@@ -1,6 +1,31 @@
1
1
  {
2
2
  "name": "@bakers-build/addon-essentials",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0-next.38",
4
+ "description": "bakers.build aggregator plugin: auto-loads the dropsh essentials (markdown + authoritative JSON:API schema).",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "exports": {
8
+ ".": "./dist/src/index.js",
9
+ "./preset": "./dist/src/preset.js"
10
+ },
11
+ "files": [
12
+ "dist/src"
13
+ ],
14
+ "publishConfig": {
15
+ "access": "public"
16
+ },
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://git.key-tec.de/bakers-build/bakers-build.git",
20
+ "directory": "bakers-cli/addons/essentials"
21
+ },
22
+ "dependencies": {
23
+ "@dropsh/plugin-markdown": "^0.7.1",
24
+ "@dropsh/plugin-jsonapi-schema": "^0.7.1",
25
+ "@bakers-build/addon-name-refs": "^0.1.0-next.38",
26
+ "dropsh": "^0.7.5"
27
+ },
28
+ "peerDependencies": {
29
+ "@bakers-build/core": "^0.1.0-next.38"
30
+ }
31
+ }