spooder 2.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,5 @@
1
+ Copyright 2023 Kruithne (kruithne@gmail.com) and contributors.
2
+
3
+ Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
4
+
5
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,20 @@
1
+ <p align="center"><img src="docs/project-logo.png"/></p>
2
+
3
+ # Spooder &middot; ![typescript](https://img.shields.io/badge/language-typescript-blue) [![license badge](https://img.shields.io/github/license/Kruithne/spooder?color=yellow)](LICENSE) ![npm version](https://img.shields.io/npm/v/spooder?color=c53635) ![bun](https://img.shields.io/badge/runtime-bun-f9f1e1)
4
+
5
+ `spooder` is a purpose-built web server solution written in [TypeScript](https://www.typescriptlang.org/) for [Bun](https://bun.sh/). It is designed to be highly opinionated with minimal configuration.
6
+
7
+ > **Warning** - This project is built with specific use-cases in mind and is not intended to be a general-purpose web server. The authors of this project are not responsible for any damage caused by using this software.
8
+
9
+ > **Warning** - This project is developed for [Bun](https://bun.sh/), which at the time of writing is still experimental. It is not recommended to use this project in production environments unless you understand the risks.
10
+
11
+ ## Structure
12
+
13
+ `spooder` consists of two primary parts: the `instance` and the `watcher`.
14
+
15
+ The `instance` is an API that can be imported into a Bun process to scaffold a web server instance. It is intended as a common set of tools for building individiual domain instances.
16
+
17
+ The `watcher` is a daemon responsible for updating, starting and monitoring a collection of `instance` processes. It is intended to be run as a service on the host machine.
18
+
19
+ ## License
20
+ The code in this repository is licensed under the ISC license. See the [LICENSE](LICENSE) file for more information.
package/bun.lockb ADDED
Binary file
package/package.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "spooder",
3
+ "module": "index.ts",
4
+ "type": "module",
5
+ "version": "2.0.1",
6
+ "exports": {
7
+ "bun": "./src/api.ts"
8
+ },
9
+ "scripts": {
10
+ "watcher": "bun ./src/watcher.ts"
11
+ },
12
+ "devDependencies": {
13
+ "bun-types": "^0.5.0"
14
+ }
15
+ }
package/src/api.ts ADDED
@@ -0,0 +1,5 @@
1
+ function test_function() {
2
+ console.log("Hello World");
3
+ }
4
+
5
+ export { test_function };
package/src/watcher.ts ADDED
@@ -0,0 +1,5 @@
1
+ console.log('Begin test.');
2
+
3
+ setInterval(() => {
4
+ console.log('This is a test.');
5
+ }, 1000);
package/tsconfig.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "compilerOptions": {
3
+ "lib": [
4
+ "ESNext"
5
+ ],
6
+ "module": "esnext",
7
+ "target": "esnext",
8
+ "moduleResolution": "bundler",
9
+ "strict": true,
10
+ "downlevelIteration": true,
11
+ "skipLibCheck": true,
12
+ "jsx": "react-jsx",
13
+ "allowSyntheticDefaultImports": true,
14
+ "forceConsistentCasingInFileNames": true,
15
+ "allowJs": true,
16
+ "types": [
17
+ "bun-types" // add Bun global
18
+ ]
19
+ }
20
+ }