first commit
This commit is contained in:
41
packages/plugins/sandboxed-test/package.json
Normal file
41
packages/plugins/sandboxed-test/package.json
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"name": "@emdashcms/plugin-sandboxed-test",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"description": "Test plugin for sandboxed plugin system",
|
||||
"type": "module",
|
||||
"main": "dist/index.mjs",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.mts"
|
||||
},
|
||||
"./sandbox": "./dist/sandbox-entry.mjs"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsdown src/index.ts src/sandbox-entry.ts --format esm --dts --clean",
|
||||
"dev": "tsdown src/index.ts src/sandbox-entry.ts --format esm --dts --watch",
|
||||
"typecheck": "tsgo --noEmit"
|
||||
},
|
||||
"keywords": [
|
||||
"emdash",
|
||||
"cms",
|
||||
"plugin",
|
||||
"test",
|
||||
"sandbox"
|
||||
],
|
||||
"author": "Matt Kane",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"emdash": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"tsdown": "catalog:",
|
||||
"typescript": "catalog:"
|
||||
},
|
||||
"peerDependencies": {},
|
||||
"optionalDependencies": {}
|
||||
}
|
||||
29
packages/plugins/sandboxed-test/src/index.ts
Normal file
29
packages/plugins/sandboxed-test/src/index.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* Sandboxed Test Plugin for EmDash CMS
|
||||
*
|
||||
* Tests the sandboxed plugin system. Designed to run in an isolated
|
||||
* V8 isolate via Worker Loader. Admin UI uses Block Kit.
|
||||
*/
|
||||
|
||||
import type { PluginDescriptor } from "emdash";
|
||||
|
||||
/**
|
||||
* Plugin factory - returns a descriptor for the integration
|
||||
*/
|
||||
export function sandboxedTestPlugin(): PluginDescriptor {
|
||||
return {
|
||||
id: "sandboxed-test",
|
||||
version: "0.0.1",
|
||||
format: "standard",
|
||||
entrypoint: "@emdashcms/plugin-sandboxed-test/sandbox",
|
||||
|
||||
adminPages: [{ path: "/sandbox", label: "Sandbox Tests", icon: "shield" }],
|
||||
adminWidgets: [{ id: "sandbox-status", title: "Sandbox Status", size: "half" }],
|
||||
|
||||
capabilities: ["read:content", "network:fetch"],
|
||||
allowedHosts: ["httpbin.org"],
|
||||
storage: {
|
||||
events: { indexes: ["timestamp", "type"] },
|
||||
},
|
||||
};
|
||||
}
|
||||
1276
packages/plugins/sandboxed-test/src/sandbox-entry.ts
Normal file
1276
packages/plugins/sandboxed-test/src/sandbox-entry.ts
Normal file
File diff suppressed because it is too large
Load Diff
9
packages/plugins/sandboxed-test/tsconfig.json
Normal file
9
packages/plugins/sandboxed-test/tsconfig.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"extends": "../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"strict": false
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
Reference in New Issue
Block a user