@roastery/barista 0.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Roastery
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 ADDED
@@ -0,0 +1,72 @@
1
+ # @roastery/barista
2
+
3
+ Elysia HTTP server factory for the [Roastery CMS](https://github.com/roastery-cms) ecosystem.
4
+
5
+ [![Checked with Biome](https://img.shields.io/badge/Checked_with-Biome-60a5fa?style=flat&logo=biome)](https://biomejs.dev)
6
+
7
+ ## Overview
8
+
9
+ **barista** exposes a `Barista` factory function that wraps [Elysia](https://elysiajs.com), serving as the HTTP server entry point for Roastery CMS applications.
10
+
11
+ ## Installation
12
+
13
+ ```bash
14
+ bun add @roastery/barista
15
+ ```
16
+
17
+ **Peer dependencies** (install alongside):
18
+
19
+ ```bash
20
+ bun add elysia
21
+ ```
22
+
23
+ ---
24
+
25
+ ## Usage
26
+
27
+ ```typescript
28
+ import { Barista } from '@roastery/barista';
29
+
30
+ const app = Barista({ name: 'my-app' })
31
+ .get('/', () => 'Hello, world!')
32
+ .listen(3000);
33
+ ```
34
+
35
+ `Barista` accepts the same configuration as `new Elysia(config)` and returns an Elysia instance.
36
+
37
+ ---
38
+
39
+ ## Technologies
40
+
41
+ | Tool | Purpose |
42
+ |------|---------|
43
+ | [Elysia](https://elysiajs.com) | HTTP framework for Bun |
44
+ | [tsup](https://tsup.egoist.dev) | Bundling to ESM + CJS with `.d.ts` generation |
45
+ | [Bun](https://bun.sh) | Runtime, test runner, and package manager |
46
+ | [Knip](https://knip.dev) | Unused exports and dependency detection |
47
+ | [Husky](https://typicode.github.io/husky) + [commitlint](https://commitlint.js.org) | Git hooks and conventional commit enforcement |
48
+
49
+ ---
50
+
51
+ ## Development
52
+
53
+ ```bash
54
+ # Run tests
55
+ bun run test:unit
56
+
57
+ # Run tests with coverage
58
+ bun run test:coverage
59
+
60
+ # Build for distribution
61
+ bun run build
62
+
63
+ # Check for unused exports and dependencies
64
+ bun run knip
65
+
66
+ # Full setup (build + bun link)
67
+ bun run setup
68
+ ```
69
+
70
+ ## License
71
+
72
+ MIT
package/dist/index.cjs ADDED
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ Barista: () => Barista
34
+ });
35
+ module.exports = __toCommonJS(index_exports);
36
+ var import_elysia = __toESM(require("elysia"), 1);
37
+ function Barista(config) {
38
+ return new import_elysia.default(config);
39
+ }
40
+ // Annotate the CommonJS export names for ESM import in node:
41
+ 0 && (module.exports = {
42
+ Barista
43
+ });
@@ -0,0 +1,32 @@
1
+ import Elysia, { ElysiaConfig } from 'elysia';
2
+
3
+ declare function Barista<BasePath extends string = "">(config?: ElysiaConfig<BasePath>): Elysia<BasePath, {
4
+ decorator: {};
5
+ store: {};
6
+ derive: {};
7
+ resolve: {};
8
+ }, {
9
+ typebox: {};
10
+ error: {};
11
+ }, {
12
+ schema: {};
13
+ standaloneSchema: {};
14
+ macro: {};
15
+ macroFn: {};
16
+ parser: {};
17
+ response: {};
18
+ }, {}, {
19
+ derive: {};
20
+ resolve: {};
21
+ schema: {};
22
+ standaloneSchema: {};
23
+ response: {};
24
+ }, {
25
+ derive: {};
26
+ resolve: {};
27
+ schema: {};
28
+ standaloneSchema: {};
29
+ response: {};
30
+ }>;
31
+
32
+ export { Barista };
@@ -0,0 +1,32 @@
1
+ import Elysia, { ElysiaConfig } from 'elysia';
2
+
3
+ declare function Barista<BasePath extends string = "">(config?: ElysiaConfig<BasePath>): Elysia<BasePath, {
4
+ decorator: {};
5
+ store: {};
6
+ derive: {};
7
+ resolve: {};
8
+ }, {
9
+ typebox: {};
10
+ error: {};
11
+ }, {
12
+ schema: {};
13
+ standaloneSchema: {};
14
+ macro: {};
15
+ macroFn: {};
16
+ parser: {};
17
+ response: {};
18
+ }, {}, {
19
+ derive: {};
20
+ resolve: {};
21
+ schema: {};
22
+ standaloneSchema: {};
23
+ response: {};
24
+ }, {
25
+ derive: {};
26
+ resolve: {};
27
+ schema: {};
28
+ standaloneSchema: {};
29
+ response: {};
30
+ }>;
31
+
32
+ export { Barista };
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ // src/index.ts
2
+ import Elysia from "elysia";
3
+ function Barista(config) {
4
+ return new Elysia(config);
5
+ }
6
+ export {
7
+ Barista
8
+ };
package/package.json ADDED
@@ -0,0 +1,69 @@
1
+ {
2
+ "name": "@roastery/barista",
3
+ "description": "Elysia HTTP server factory for the Roastery CMS ecosystem",
4
+ "version": "0.0.1",
5
+ "type": "module",
6
+ "author": {
7
+ "name": "Alan Reis",
8
+ "email": "alanreisanjo@gmail.com",
9
+ "url": "https://github.com/Hoyasumii"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/roastery-cms/terroir"
14
+ },
15
+ "license": "MIT",
16
+ "main": "./dist/index.cjs",
17
+ "module": "./dist/index.js",
18
+ "types": "./dist/index.d.ts",
19
+ "keywords": [
20
+ "hoyasumii",
21
+ "roastery",
22
+ "@roastery",
23
+ "barista",
24
+ "@roastery/barista",
25
+ "roastery-barista"
26
+ ],
27
+ "typesVersions": {
28
+ "*": {
29
+ "*": [
30
+ "./dist/*/index.d.ts"
31
+ ]
32
+ }
33
+ },
34
+ "exports": {
35
+ ".": {
36
+ "types": "./dist/index.d.ts",
37
+ "import": "./dist/index.js",
38
+ "require": "./dist/index.cjs"
39
+ },
40
+ "./*": {
41
+ "types": "./dist/*/index.d.ts",
42
+ "import": "./dist/*/index.js",
43
+ "require": "./dist/*/index.cjs"
44
+ }
45
+ },
46
+ "files": [
47
+ "dist"
48
+ ],
49
+ "scripts": {
50
+ "build": "biome check --fix && tsup 'src/**/index.ts' --format cjs,esm --dts --tsconfig tsconfig.build.json --clean",
51
+ "test:unit": "bun test --env-file=.env.testing",
52
+ "test:coverage": "bun test --env-file=.env.testing --coverage",
53
+ "setup": "bun run build && bun link",
54
+ "prepare": "husky || true",
55
+ "knip": "knip"
56
+ },
57
+ "devDependencies": {
58
+ "@commitlint/cli": "^20.4.1",
59
+ "@commitlint/config-conventional": "^20.4.1",
60
+ "husky": "^9.1.7",
61
+ "knip": "^5.85.0"
62
+ },
63
+ "peerDependencies": {
64
+ "typescript": "^5",
65
+ "@types/bun": "latest",
66
+ "tsup": "^8.5.1",
67
+ "elysia": "^1.4.27"
68
+ }
69
+ }