create-velora-plugin 0.9.0 → 0.9.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/package.json CHANGED
@@ -1,7 +1,14 @@
1
1
  {
2
2
  "name": "create-velora-plugin",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "license": "Apache-2.0",
5
+ "description": "Scaffolds a new Velora CMS plugin project from a type-aware template.",
6
+ "engines": {
7
+ "node": ">=22.12"
8
+ },
9
+ "bugs": {
10
+ "url": "https://github.com/velora-cms/velora/issues"
11
+ },
5
12
  "type": "module",
6
13
  "bin": {
7
14
  "create-velora-plugin": "dist/index.js"
@@ -28,7 +35,7 @@
28
35
  "@types/react": "19.2.17",
29
36
  "react": "19.2.7",
30
37
  "react-dom": "19.2.7",
31
- "@velora-cms/plugin-sdk": "0.9.0"
38
+ "@velora-cms/plugin-sdk": "0.9.1"
32
39
  },
33
40
  "scripts": {
34
41
  "build": "tsc -p .",
@@ -9,10 +9,16 @@ A Velora __PLUGIN_TYPE__ plugin (`__PLUGIN_ID__`), scaffolded with
9
9
  target)
10
10
  - `npm run build` — typecheck, then produce `dist/remoteEntry.js`
11
11
  - `npm run preview` — serve the built remote for sideload testing
12
+ - `npm test` — runs `src/plugin.test.ts`, which checks your manifest
13
+ against the SDK's own `validatePluginManifest` — the same check the
14
+ Velora registry runs at install time. Extend this file as you add
15
+ contributions; don't delete it.
12
16
 
13
17
  ## Where to go from here
14
18
 
15
19
  - `src/plugin.tsx` is your plugin's manifest — the default export a
16
20
  Velora host installs. Edit the example contribution to make it yours.
21
+ - `src/plugin.test.ts` is your starter test. Keep it green, and add cases
22
+ for any contribution logic you write (hooks, serializers, etc.).
17
23
  - Keep `react`, `react-dom` and `@velora-cms/plugin-sdk` in vite.config.ts's
18
24
  `shared` block: your views run against the HOST's copies at runtime.
@@ -10,7 +10,7 @@
10
10
  "test": "vitest run"
11
11
  },
12
12
  "dependencies": {
13
- "@velora-cms/plugin-sdk": "^0.1.0"
13
+ "@velora-cms/plugin-sdk": "^0.9.1"
14
14
  },
15
15
  "peerDependencies": {
16
16
  "react": "^19.0.0",
@@ -24,8 +24,8 @@
24
24
  "react": "19.2.7",
25
25
  "react-dom": "19.2.7",
26
26
  "typescript": "6.0.3",
27
- "velora-dev": "^0.1.0",
28
- "velora-plugin": "^0.1.0",
27
+ "velora-dev": "^0.9.1",
28
+ "velora-plugin": "^0.9.1",
29
29
  "vite": "6.4.3",
30
30
  "vitest": "3.2.6"
31
31
  }
@@ -0,0 +1,19 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import { validatePluginManifest } from "@velora-cms/plugin-sdk";
3
+ import plugin from "./plugin";
4
+
5
+ // The same check the Velora registry runs at install time (and
6
+ // `velora-plugin validate` runs before publish) — keep this test as you
7
+ // build out contributions, so a broken manifest fails here instead of at
8
+ // install.
9
+ describe("__PLUGIN_NAME__ manifest", () => {
10
+ it("passes the SDK's manifest validation", () => {
11
+ const result = validatePluginManifest(plugin);
12
+ expect(result.ok).toBe(true);
13
+ });
14
+
15
+ it("keeps the id and type set at scaffold time", () => {
16
+ expect(plugin.id).toBe("__PLUGIN_ID__");
17
+ expect(plugin.type).toBe("__PLUGIN_TYPE__");
18
+ });
19
+ });
@@ -8,7 +8,7 @@ const plugin: BundlePluginManifest = {
8
8
  description: '__DESCRIPTION__',
9
9
  author: '__AUTHOR__',
10
10
  license: 'MIT',
11
- cmsVersion: '^0.1.0',
11
+ cmsVersion: '^0.9.0',
12
12
  databaseCompatibility: {
13
13
  storageType: 'simple',
14
14
  supported: ['postgresql', 'mysql', 'sqlite'],
@@ -42,7 +42,7 @@ const plugin: DataTypePluginManifest = {
42
42
  description: '__DESCRIPTION__',
43
43
  author: '__AUTHOR__',
44
44
  license: 'MIT',
45
- cmsVersion: '^0.1.0',
45
+ cmsVersion: '^0.9.0',
46
46
  databaseCompatibility: {
47
47
  // 'simple' JSON key-value storage suits most datatype plugins and
48
48
  // works on every database. 'structured' requires marketplace review.
@@ -8,7 +8,7 @@ const plugin: IntegrationPluginManifest = {
8
8
  description: '__DESCRIPTION__',
9
9
  author: '__AUTHOR__',
10
10
  license: 'MIT',
11
- cmsVersion: '^0.1.0',
11
+ cmsVersion: '^0.9.0',
12
12
  databaseCompatibility: {
13
13
  storageType: 'simple',
14
14
  supported: ['postgresql', 'mysql', 'sqlite'],
@@ -9,7 +9,7 @@ const plugin: SectionPluginManifest = {
9
9
  description: '__DESCRIPTION__',
10
10
  author: '__AUTHOR__',
11
11
  license: 'MIT',
12
- cmsVersion: '^0.1.0',
12
+ cmsVersion: '^0.9.0',
13
13
  databaseCompatibility: {
14
14
  storageType: 'simple',
15
15
  supported: ['postgresql', 'mysql', 'sqlite'],
@@ -8,7 +8,7 @@ const plugin: TemplatePluginManifest = {
8
8
  description: '__DESCRIPTION__',
9
9
  author: '__AUTHOR__',
10
10
  license: 'MIT',
11
- cmsVersion: '^0.1.0',
11
+ cmsVersion: '^0.9.0',
12
12
  databaseCompatibility: {
13
13
  storageType: 'simple',
14
14
  supported: ['postgresql', 'mysql', 'sqlite'],
@@ -8,7 +8,7 @@ const plugin: ThemePluginManifest = {
8
8
  description: '__DESCRIPTION__',
9
9
  author: '__AUTHOR__',
10
10
  license: 'MIT',
11
- cmsVersion: '^0.1.0',
11
+ cmsVersion: '^0.9.0',
12
12
  databaseCompatibility: {
13
13
  storageType: 'simple',
14
14
  supported: ['postgresql', 'mysql', 'sqlite'],
@@ -9,7 +9,7 @@ const plugin: UtilityPluginManifest = {
9
9
  description: '__DESCRIPTION__',
10
10
  author: '__AUTHOR__',
11
11
  license: 'MIT',
12
- cmsVersion: '^0.1.0',
12
+ cmsVersion: '^0.9.0',
13
13
  databaseCompatibility: {
14
14
  storageType: 'simple',
15
15
  supported: ['postgresql', 'mysql', 'sqlite'],