Initial Commit

This commit is contained in:
2026-05-27 23:29:53 +01:00
commit fbc70f96e6
10000 changed files with 1102152 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
node_modules/
dist/
coverage/
*.log
.DS_Store

View File

@@ -0,0 +1,16 @@
# demo-plugin
Suaveplan API plugin generated by `create-suaveplan-plugin`.
- **Isolation**: `isolated`
- **Database**: `sqlite`
- **Capabilities**: `rest`
## Getting started
```bash
bun install
bun test
```
Replace the stub handlers in `src/index.ts` with the real plugin implementation.

View File

@@ -0,0 +1,5 @@
-- 0001 — initial schema for demo-plugin
CREATE TABLE IF NOT EXISTS demo_plugin_state (
id TEXT PRIMARY KEY,
created_at TEXT NOT NULL DEFAULT (datetime('now'))
);

View File

@@ -0,0 +1,14 @@
{
"name": "demo-plugin",
"version": "0.0.0",
"type": "module",
"private": true,
"scripts": {
"test": "bun test",
"test:coverage": "bun test --coverage",
"lint": "bunx biome check src/",
"typecheck": "bunx tsc --noEmit",
"build": "echo 'configure your build pipeline here'",
"test:integration": "vitest run -c vitest.integration.config.ts"
}
}

View File

@@ -0,0 +1,9 @@
{
"name": "demo-plugin",
"version": "0.0.0",
"isolation": "isolated",
"database": "sqlite",
"capabilities": [
"rest"
]
}

View File

@@ -0,0 +1,16 @@
import { describe, expect, it } from "bun:test";
import { handlers, manifest } from "./index.ts";
describe("demo-plugin — scaffold smoke", () => {
it("manifest reports the configured isolation tier", () => {
expect(manifest.isolation).toBe("isolated");
});
it("manifest reports the configured database engine", () => {
expect(manifest.database).toBe("sqlite");
});
it("wires the rest capability", async () => {
const out = await handlers.rest();
expect(out.ok).toBe(true);
expect(out.capability).toBe("rest");
});
});

View File

@@ -0,0 +1,20 @@
// Generated by create-suaveplan-plugin.
// Replace the body below with the real plugin implementation.
export interface PluginManifest {
readonly name: string;
readonly isolation: "isolated";
readonly database: "sqlite";
readonly capabilities: readonly string[];
}
export const manifest: PluginManifest = Object.freeze({
name: "demo-plugin",
isolation: "isolated",
database: "sqlite",
capabilities: Object.freeze(["rest"]),
});
export const handlers = Object.freeze({
rest: async () => ({ ok: true as const, capability: "rest" }),
});

View File

@@ -0,0 +1,11 @@
import { describe, expect, it } from "vitest";
// Real-service fixture from @suaveplan/testing-integration-sqlite.
// import { createSqliteFixture } from "@suaveplan/testing-integration-sqlite";
const enabled = process.env["INTEGRATION"] === "1";
(enabled ? describe : describe.skip)("demo-plugin — integration", () => {
it("placeholder — replace with a real-service assertion", () => {
expect(true).toBe(true);
});
});

View File

@@ -0,0 +1,16 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"noUncheckedIndexedAccess": true,
"verbatimModuleSyntax": true,
"isolatedModules": true,
"esModuleInterop": true,
"skipLibCheck": true,
"types": ["bun-types"]
},
"include": ["src/**/*.ts", "tests/**/*.ts"]
}

View File

@@ -0,0 +1,3 @@
import { createTestConfig } from "@suaveplan/testing/config";
export default createTestConfig({});

View File

@@ -0,0 +1,6 @@
import { createTestConfig } from "@suaveplan/testing/config";
export default createTestConfig({
additionalIncludes: ["tests/integration/**/*.integration.test.ts"],
testTimeout: 60_000,
});

View File

@@ -0,0 +1,5 @@
node_modules/
dist/
coverage/
*.log
.DS_Store

View File

@@ -0,0 +1,16 @@
# demo-plugin
Suaveplan API plugin generated by `create-suaveplan-plugin`.
- **Isolation**: `sandboxed`
- **Database**: `none`
- **Capabilities**: `rest`
## Getting started
```bash
bun install
bun test
```
Replace the stub handlers in `src/index.ts` with the real plugin implementation.

View File

@@ -0,0 +1,13 @@
{
"name": "demo-plugin",
"version": "0.0.0",
"type": "module",
"private": true,
"scripts": {
"test": "bun test",
"test:coverage": "bun test --coverage",
"lint": "bunx biome check src/",
"typecheck": "bunx tsc --noEmit",
"build": "echo 'configure your build pipeline here'"
}
}

View File

@@ -0,0 +1,9 @@
{
"name": "demo-plugin",
"version": "0.0.0",
"isolation": "sandboxed",
"database": "none",
"capabilities": [
"rest"
]
}

View File

@@ -0,0 +1,16 @@
import { describe, expect, it } from "bun:test";
import { handlers, manifest } from "./index.ts";
describe("demo-plugin — scaffold smoke", () => {
it("manifest reports the configured isolation tier", () => {
expect(manifest.isolation).toBe("sandboxed");
});
it("manifest reports the configured database engine", () => {
expect(manifest.database).toBe("none");
});
it("wires the rest capability", async () => {
const out = await handlers.rest();
expect(out.ok).toBe(true);
expect(out.capability).toBe("rest");
});
});

View File

@@ -0,0 +1,20 @@
// Generated by create-suaveplan-plugin.
// Replace the body below with the real plugin implementation.
export interface PluginManifest {
readonly name: string;
readonly isolation: "sandboxed";
readonly database: "none";
readonly capabilities: readonly string[];
}
export const manifest: PluginManifest = Object.freeze({
name: "demo-plugin",
isolation: "sandboxed",
database: "none",
capabilities: Object.freeze(["rest"]),
});
export const handlers = Object.freeze({
rest: async () => ({ ok: true as const, capability: "rest" }),
});

View File

@@ -0,0 +1,16 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"noUncheckedIndexedAccess": true,
"verbatimModuleSyntax": true,
"isolatedModules": true,
"esModuleInterop": true,
"skipLibCheck": true,
"types": ["bun-types"]
},
"include": ["src/**/*.ts", "tests/**/*.ts"]
}

View File

@@ -0,0 +1,3 @@
import { createTestConfig } from "@suaveplan/testing/config";
export default createTestConfig({});

View File

@@ -0,0 +1,5 @@
node_modules/
dist/
coverage/
*.log
.DS_Store

View File

@@ -0,0 +1,16 @@
# demo-plugin
Suaveplan API plugin generated by `create-suaveplan-plugin`.
- **Isolation**: `trusted`
- **Database**: `postgres`
- **Capabilities**: `rest`, `graphql`, `ws`, `sse`, `sagas`, `twoPhaseCommit`, `perTenantJobs`
## Getting started
```bash
bun install
bun test
```
Replace the stub handlers in `src/index.ts` with the real plugin implementation.

View File

@@ -0,0 +1,5 @@
-- 0001 — initial schema for demo-plugin
CREATE TABLE IF NOT EXISTS demo_plugin_state (
id TEXT PRIMARY KEY,
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
);

View File

@@ -0,0 +1,14 @@
{
"name": "demo-plugin",
"version": "0.0.0",
"type": "module",
"private": true,
"scripts": {
"test": "bun test",
"test:coverage": "bun test --coverage",
"lint": "bunx biome check src/",
"typecheck": "bunx tsc --noEmit",
"build": "echo 'configure your build pipeline here'",
"test:integration": "vitest run -c vitest.integration.config.ts"
}
}

View File

@@ -0,0 +1,15 @@
{
"name": "demo-plugin",
"version": "0.0.0",
"isolation": "trusted",
"database": "postgres",
"capabilities": [
"rest",
"graphql",
"ws",
"sse",
"sagas",
"twoPhaseCommit",
"perTenantJobs"
]
}

View File

@@ -0,0 +1,46 @@
import { describe, expect, it } from "bun:test";
import { handlers, manifest } from "./index.ts";
describe("demo-plugin — scaffold smoke", () => {
it("manifest reports the configured isolation tier", () => {
expect(manifest.isolation).toBe("trusted");
});
it("manifest reports the configured database engine", () => {
expect(manifest.database).toBe("postgres");
});
it("wires the rest capability", async () => {
const out = await handlers.rest();
expect(out.ok).toBe(true);
expect(out.capability).toBe("rest");
});
it("wires the graphql capability", async () => {
const out = await handlers.graphql();
expect(out.ok).toBe(true);
expect(out.capability).toBe("graphql");
});
it("wires the ws capability", async () => {
const out = await handlers.ws();
expect(out.ok).toBe(true);
expect(out.capability).toBe("ws");
});
it("wires the sse capability", async () => {
const out = await handlers.sse();
expect(out.ok).toBe(true);
expect(out.capability).toBe("sse");
});
it("wires the sagas capability", async () => {
const out = await handlers.sagas();
expect(out.ok).toBe(true);
expect(out.capability).toBe("sagas");
});
it("wires the twoPhaseCommit capability", async () => {
const out = await handlers.twoPhaseCommit();
expect(out.ok).toBe(true);
expect(out.capability).toBe("twoPhaseCommit");
});
it("wires the perTenantJobs capability", async () => {
const out = await handlers.perTenantJobs();
expect(out.ok).toBe(true);
expect(out.capability).toBe("perTenantJobs");
});
});

View File

@@ -0,0 +1,26 @@
// Generated by create-suaveplan-plugin.
// Replace the body below with the real plugin implementation.
export interface PluginManifest {
readonly name: string;
readonly isolation: "trusted";
readonly database: "postgres";
readonly capabilities: readonly string[];
}
export const manifest: PluginManifest = Object.freeze({
name: "demo-plugin",
isolation: "trusted",
database: "postgres",
capabilities: Object.freeze(["rest", "graphql", "ws", "sse", "sagas", "twoPhaseCommit", "perTenantJobs"]),
});
export const handlers = Object.freeze({
rest: async () => ({ ok: true as const, capability: "rest" }),
graphql: async () => ({ ok: true as const, capability: "graphql" }),
ws: async () => ({ ok: true as const, capability: "ws" }),
sse: async () => ({ ok: true as const, capability: "sse" }),
sagas: async () => ({ ok: true as const, capability: "sagas" }),
twoPhaseCommit: async () => ({ ok: true as const, capability: "twoPhaseCommit" }),
perTenantJobs: async () => ({ ok: true as const, capability: "perTenantJobs" }),
});

View File

@@ -0,0 +1,11 @@
import { describe, expect, it } from "vitest";
// Real-service fixture from @suaveplan/testing-integration-postgres.
// import { createPostgresFixture } from "@suaveplan/testing-integration-postgres";
const enabled = process.env["INTEGRATION"] === "1";
(enabled ? describe : describe.skip)("demo-plugin — integration", () => {
it("placeholder — replace with a real-service assertion", () => {
expect(true).toBe(true);
});
});

View File

@@ -0,0 +1,16 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"noUncheckedIndexedAccess": true,
"verbatimModuleSyntax": true,
"isolatedModules": true,
"esModuleInterop": true,
"skipLibCheck": true,
"types": ["bun-types"]
},
"include": ["src/**/*.ts", "tests/**/*.ts"]
}

View File

@@ -0,0 +1,3 @@
import { createTestConfig } from "@suaveplan/testing/config";
export default createTestConfig({});

View File

@@ -0,0 +1,6 @@
import { createTestConfig } from "@suaveplan/testing/config";
export default createTestConfig({
additionalIncludes: ["tests/integration/**/*.integration.test.ts"],
testTimeout: 60_000,
});