bunbraco 0.3.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Kineco
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/NOTICE ADDED
@@ -0,0 +1,69 @@
1
+ bunbraco
2
+ Copyright (c) 2026 Kineco
3
+
4
+ This product includes third-party software. bunbraco is an independent project.
5
+ It is not affiliated with, endorsed by, or sponsored by Umbraco A/S, which owns
6
+ the Umbraco trademark.
7
+
8
+ There are three places third-party material is redistributed, rather than merely
9
+ depended on:
10
+
11
+ @bunbraco/backoffice-dist the built Umbraco backoffice and the browser
12
+ packages bundled into it, produced by
13
+ `bun run vendor:backoffice`
14
+ @bunbraco/backoffice-dist three CSS files copied unmodified from the Umbraco
15
+ client source tree
16
+ @bunbraco/contracts the Umbraco Management API OpenAPI document,
17
+ copied unmodified
18
+
19
+ No Umbraco trademark is redistributed. The Umbraco wordmark, the "U" roundel
20
+ favicon and the installer illustration are deliberately not carried in this
21
+ repository: MIT grants copyright permission and says nothing about trademarks, so
22
+ bunbraco's own marks are served at those paths instead. See `BRANDED_ASSETS` in
23
+ `@bunbraco/backoffice-host`.
24
+
25
+ The Umbraco backoffice
26
+ ----------------------
27
+ @umbraco-cms/backoffice 18.2.0 — MIT — https://github.com/umbraco/Umbraco-CMS
28
+ @umbraco-ui/uui 2.0.2 — MIT — https://github.com/umbraco/Umbraco.UI
29
+
30
+ Static files from the Umbraco client source tree
31
+ ------------------------------------------------
32
+ css/umb-css.css, css/rte-content.css, css/umbraco-blockgridlayout.css
33
+ — copied unmodified from Umbraco-CMS release-18.2.0 — MIT
34
+ — https://github.com/umbraco/Umbraco-CMS
35
+ Shipped in @bunbraco/backoffice-dist under `upstream-static/`.
36
+
37
+ `rte-content.css` itself carries Tiptap's default editor styles, copied from
38
+ tiptap v2.11.7 (MIT); the file records this in its own header.
39
+
40
+ The Umbraco Management API contract
41
+ -----------------------------------
42
+ OpenApi.json — copied unmodified from Umbraco-CMS release-18.2.0
43
+ (src/Umbraco.Cms.Api.Management/OpenApi.json) — MIT
44
+ — https://github.com/umbraco/Umbraco-CMS
45
+ Shipped in @bunbraco/contracts, which also ships the TypeScript types generated
46
+ from it.
47
+
48
+ Browser runtime dependencies bundled into the backoffice build
49
+ --------------------------------------------------------------
50
+ @heximal/expressions 0.1.5 — BSD-3-Clause
51
+ @microsoft/signalr 10.0.11 — MIT
52
+ @tiptap/* 3.31.3 — MIT
53
+ diff 9.0.0 — BSD-3-Clause
54
+ dompurify 3.4.16 — Apache-2.0, elected from "MPL-2.0 OR Apache-2.0"
55
+ element-internals-polyfill 3.0.2 — MIT
56
+ lit 3.3.3 — BSD-3-Clause
57
+ luxon 3.7.2 — MIT
58
+ marked 18.0.14 — MIT
59
+ monaco-editor 0.57.0 — MIT
60
+ rxjs 7.8.2 — Apache-2.0
61
+ uuid 14.0.2 — MIT
62
+
63
+ dompurify is offered under either licence; Apache-2.0 is elected here, so no
64
+ MPL-2.0 obligation attaches to the copy bundled into the backoffice build. Of the
65
+ Apache-2.0 packages above, none ships a NOTICE file of its own, so Apache-2.0
66
+ section 4(d) adds nothing to this file.
67
+
68
+ Each package's own licence text ships inside its npm distribution and applies
69
+ unchanged to the copies bundled here.
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env bun
2
+ /**
3
+ * The `bunbraco` binary a site gets from the umbrella package.
4
+ *
5
+ * The command line itself lives in `@bunbraco/cli`, which is installable on its
6
+ * own. Both packages declare the same bin name; because this file resolves to
7
+ * the same module the CLI package would have run, whichever one a package
8
+ * manager links is the same command.
9
+ */
10
+ import '@bunbraco/cli/bin'
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "bunbraco",
3
+ "version": "0.3.0",
4
+ "description": "A CMS on Bun with React-style TSX templates, edited through the Umbraco backoffice.",
5
+ "license": "MIT",
6
+ "author": "Kineco",
7
+ "homepage": "https://github.com/kineco-au/bunbraco-cms#readme",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/kineco-au/bunbraco-cms.git",
11
+ "directory": "packages/bunbraco"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/kineco-au/bunbraco-cms/issues"
15
+ },
16
+ "keywords": [
17
+ "cms",
18
+ "umbraco",
19
+ "bun",
20
+ "content-management",
21
+ "headless",
22
+ "tsx",
23
+ "sqlite",
24
+ "postgres"
25
+ ],
26
+ "engines": {
27
+ "bun": ">=1.3.0"
28
+ },
29
+ "type": "module",
30
+ "exports": {
31
+ ".": "./src/index.ts",
32
+ "./jsx-runtime": "./src/jsx-runtime.ts",
33
+ "./jsx-dev-runtime": "./src/jsx-runtime.ts"
34
+ },
35
+ "bin": {
36
+ "bunbraco": "./bin/bunbraco.ts"
37
+ },
38
+ "files": [
39
+ "src",
40
+ "bin",
41
+ "NOTICE"
42
+ ],
43
+ "dependencies": {
44
+ "@bunbraco/api-management": "0.3.0",
45
+ "@bunbraco/assistant": "0.3.0",
46
+ "@bunbraco/auth": "0.3.0",
47
+ "@bunbraco/backoffice-dist": "18.2.0",
48
+ "@bunbraco/backoffice-host": "0.3.0",
49
+ "@bunbraco/cli": "0.3.0",
50
+ "@bunbraco/contracts": "0.3.0",
51
+ "@bunbraco/core": "0.3.0",
52
+ "@bunbraco/data": "0.3.0",
53
+ "@bunbraco/render": "0.3.0",
54
+ "@bunbraco/server": "0.3.0",
55
+ "@bunbraco/schema": "0.3.0",
56
+ "@bunbraco/transfer": "0.3.0"
57
+ }
58
+ }
package/src/index.ts ADDED
@@ -0,0 +1,71 @@
1
+ /**
2
+ * The umbrella package a site installs.
3
+ *
4
+ * A site's `server.ts` is three lines:
5
+ *
6
+ * import { bunbraco } from 'bunbraco'
7
+ * import config from './bunbraco.config.ts'
8
+ * Bun.serve(await bunbraco(config))
9
+ */
10
+ import {
11
+ assertPortAvailable,
12
+ type BunbracoConfig,
13
+ createServer,
14
+ loadConfig,
15
+ type ServerHandle,
16
+ } from '@bunbraco/server'
17
+
18
+ export {
19
+ type AssistantProvider,
20
+ type BedrockOptions,
21
+ bedrock,
22
+ type ConverseInput,
23
+ type ConverseResult,
24
+ } from '@bunbraco/assistant'
25
+ export type {
26
+ BlockGridArea,
27
+ BlockGridItem,
28
+ BlockItem,
29
+ InnerHTML,
30
+ Link,
31
+ Navigation,
32
+ PageProps,
33
+ PublishedContent,
34
+ PublishedElement,
35
+ RedirectOptions,
36
+ RedirectRule,
37
+ RedirectTo,
38
+ RequestMember,
39
+ TypedElement,
40
+ } from '@bunbraco/render'
41
+ export { redirect } from '@bunbraco/render'
42
+ export type { Child } from '@bunbraco/render/jsx-runtime'
43
+ export {
44
+ type AzureMediaStoreOptions,
45
+ type AzureSchemaStoreOptions,
46
+ azureMediaStore,
47
+ azureSchemaStore,
48
+ type BunbracoConfig,
49
+ defineConfig,
50
+ fileSystemMediaStore,
51
+ loadConfig,
52
+ type MediaStore,
53
+ type S3MediaStoreOptions,
54
+ type S3SchemaStoreOptions,
55
+ type SchemaStore,
56
+ s3MediaStore,
57
+ s3SchemaStore,
58
+ } from '@bunbraco/server'
59
+
60
+ /** Boots a site and returns what `Bun.serve` needs, the live-update WebSocket included. */
61
+ export async function bunbraco(
62
+ overrides: Partial<BunbracoConfig> = {},
63
+ cwd = process.cwd(),
64
+ ): Promise<ServerHandle['serveOptions']> {
65
+ const config = loadConfig(overrides, cwd)
66
+ // The caller is about to serve these options, so fail here rather than after a
67
+ // migration and a seed.
68
+ await assertPortAvailable(config.port)
69
+ const server = await createServer(config)
70
+ return server.serveOptions
71
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * The JSX runtime a site's views compile against.
3
+ *
4
+ * A site depends only on `bunbraco`, so `jsxImportSource` must be `bunbraco` —
5
+ * pointing it at `@bunbraco/render` would fail to resolve from the site's own
6
+ * `node_modules`, which is exactly what the 5a exit test caught.
7
+ */
8
+ export * from '@bunbraco/render/jsx-runtime'