@hoardodile/create-plugin 0.1.1 → 0.1.2
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/dist/template/.github/ISSUE_TEMPLATE/bug_report.yml +57 -0
- package/dist/template/.github/ISSUE_TEMPLATE/feature_request.yml +28 -0
- package/dist/template/.github/dependabot.yml +10 -0
- package/dist/template/.github/workflows/ci.yml +47 -0
- package/dist/template/.github/workflows/release.yml +8 -5
- package/dist/template/.nvmrc +1 -0
- package/dist/template/CONTRIBUTING.md +55 -0
- package/dist/template/README.md +33 -0
- package/dist/template/SECURITY.md +26 -0
- package/dist/template/intro.en.md +18 -0
- package/dist/template/intro.zh.md +15 -0
- package/dist/template/manifest.json +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: File a bug report against this hoardodile plugin
|
|
3
|
+
title: "[Bug]: "
|
|
4
|
+
labels: ["bug"]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Thanks for taking the time to fill out this bug report.
|
|
10
|
+
Minimal reproduction steps first — the title can stay generic until the steps are clear.
|
|
11
|
+
- type: input
|
|
12
|
+
id: hoardodile-version
|
|
13
|
+
attributes:
|
|
14
|
+
label: hoardodile version
|
|
15
|
+
description: The version shown in Settings → About.
|
|
16
|
+
placeholder: 0.x.x
|
|
17
|
+
validations:
|
|
18
|
+
required: true
|
|
19
|
+
- type: input
|
|
20
|
+
id: plugin-version
|
|
21
|
+
attributes:
|
|
22
|
+
label: Plugin version
|
|
23
|
+
description: The version in Settings → Plugins (vX.Y.Z), or the marketplace's latest release if installing fresh.
|
|
24
|
+
placeholder: 0.0.1
|
|
25
|
+
validations:
|
|
26
|
+
required: true
|
|
27
|
+
- type: textarea
|
|
28
|
+
id: steps
|
|
29
|
+
attributes:
|
|
30
|
+
label: Steps to reproduce
|
|
31
|
+
description: Minimal, ordered steps — what did you do to get here?
|
|
32
|
+
placeholder: |
|
|
33
|
+
1. …
|
|
34
|
+
2. …
|
|
35
|
+
3. …
|
|
36
|
+
validations:
|
|
37
|
+
required: true
|
|
38
|
+
- type: textarea
|
|
39
|
+
id: expected
|
|
40
|
+
attributes:
|
|
41
|
+
label: Expected behavior
|
|
42
|
+
description: What did you expect to happen?
|
|
43
|
+
validations:
|
|
44
|
+
required: true
|
|
45
|
+
- type: textarea
|
|
46
|
+
id: actual
|
|
47
|
+
attributes:
|
|
48
|
+
label: Actual behavior
|
|
49
|
+
description: What actually happened instead?
|
|
50
|
+
validations:
|
|
51
|
+
required: true
|
|
52
|
+
- type: textarea
|
|
53
|
+
id: logs
|
|
54
|
+
attributes:
|
|
55
|
+
label: Logs / screenshots
|
|
56
|
+
description: Paste the relevant console or server logs, or attach screenshots.
|
|
57
|
+
render: shell
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: Feature request
|
|
2
|
+
description: Suggest an idea for this plugin
|
|
3
|
+
title: "[Feature]: "
|
|
4
|
+
labels: ["enhancement"]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Thanks for suggesting! Describe the problem you are solving, not just the feature.
|
|
10
|
+
- type: textarea
|
|
11
|
+
id: problem
|
|
12
|
+
attributes:
|
|
13
|
+
label: Problem
|
|
14
|
+
description: What problem does this feature solve? What is the current pain?
|
|
15
|
+
validations:
|
|
16
|
+
required: true
|
|
17
|
+
- type: textarea
|
|
18
|
+
id: solution
|
|
19
|
+
attributes:
|
|
20
|
+
label: Proposed solution
|
|
21
|
+
description: What would you expect to happen?
|
|
22
|
+
validations:
|
|
23
|
+
required: true
|
|
24
|
+
- type: textarea
|
|
25
|
+
id: alternatives
|
|
26
|
+
attributes:
|
|
27
|
+
label: Alternatives
|
|
28
|
+
description: Workarounds or other plugins that get partway there.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths-ignore:
|
|
7
|
+
- "**.md"
|
|
8
|
+
pull_request:
|
|
9
|
+
paths-ignore:
|
|
10
|
+
- "**.md"
|
|
11
|
+
|
|
12
|
+
# A superseded push cancels the stale run instead of queueing behind it.
|
|
13
|
+
concurrency:
|
|
14
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
|
|
17
|
+
permissions:
|
|
18
|
+
contents: read
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
# One leg is enough: lint, build and test against the SDK source.
|
|
22
|
+
checks:
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
timeout-minutes: 20
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v7
|
|
27
|
+
|
|
28
|
+
- uses: pnpm/action-setup@v6
|
|
29
|
+
with:
|
|
30
|
+
version: 11
|
|
31
|
+
|
|
32
|
+
- uses: actions/setup-node@v7
|
|
33
|
+
with:
|
|
34
|
+
node-version-file: .nvmrc
|
|
35
|
+
cache: pnpm
|
|
36
|
+
|
|
37
|
+
- name: Install dependencies
|
|
38
|
+
run: pnpm install
|
|
39
|
+
|
|
40
|
+
- name: Lint
|
|
41
|
+
run: pnpm lint
|
|
42
|
+
|
|
43
|
+
- name: Build
|
|
44
|
+
run: pnpm build
|
|
45
|
+
|
|
46
|
+
- name: Test
|
|
47
|
+
run: pnpm test
|
|
@@ -11,13 +11,13 @@ jobs:
|
|
|
11
11
|
release:
|
|
12
12
|
runs-on: ubuntu-latest
|
|
13
13
|
steps:
|
|
14
|
-
- uses: actions/checkout@
|
|
14
|
+
- uses: actions/checkout@v7
|
|
15
15
|
|
|
16
|
-
- uses: pnpm/action-setup@
|
|
16
|
+
- uses: pnpm/action-setup@v6
|
|
17
17
|
with:
|
|
18
18
|
version: 11
|
|
19
19
|
|
|
20
|
-
- uses: actions/setup-node@
|
|
20
|
+
- uses: actions/setup-node@v7
|
|
21
21
|
with:
|
|
22
22
|
node-version: 24
|
|
23
23
|
cache: pnpm
|
|
@@ -39,5 +39,8 @@ jobs:
|
|
|
39
39
|
env:
|
|
40
40
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
41
41
|
run: |
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
files=$(ls release/*)
|
|
43
|
+
if ls intro.*.md >/dev/null 2>&1; then
|
|
44
|
+
files="$files intro.*.md"
|
|
45
|
+
fi
|
|
46
|
+
gh release create "$GITHUB_REF_NAME" $files --generate-notes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
24
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Contributing to this plugin
|
|
2
|
+
|
|
3
|
+
Thanks for contributing! This is a hoardodile content plugin — sections below
|
|
4
|
+
cover the dev loop, quality gates, and how releases and the marketplace work.
|
|
5
|
+
|
|
6
|
+
## Development setup
|
|
7
|
+
|
|
8
|
+
- Node.js ≥ 24, pnpm 11.
|
|
9
|
+
- Clone the repository, then:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pnpm install
|
|
13
|
+
pnpm build # dist/ (client + server bundle + manifest)
|
|
14
|
+
pnpm dev # watch-build + workbench at http://127.0.0.1:5199
|
|
15
|
+
pnpm test # Vitest unit tests against the fixture API
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
`pnpm exec hoardodile plugin run detect testdata --plugin-dir dist` runs the
|
|
19
|
+
detect hook through the same sandboxed worker the server uses.
|
|
20
|
+
|
|
21
|
+
## Code style
|
|
22
|
+
|
|
23
|
+
- TypeScript strict (`pnpm lint` = `tsc --noEmit`); no `any` without a comment.
|
|
24
|
+
- Prefer type guards and `satisfies` over `as`.
|
|
25
|
+
- Keep the plugin's own logic in `src/`; `manifest.json` at the repo root is
|
|
26
|
+
the single source of truth for the plugin's identity, permissions and UI
|
|
27
|
+
preferences.
|
|
28
|
+
- Add tests next to the code they cover; keep the fixture API usage minimal.
|
|
29
|
+
|
|
30
|
+
## Releases
|
|
31
|
+
|
|
32
|
+
Bump `version` in `manifest.json` on user-visible changes, then:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
git tag v<version> && git push origin v<version>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The tag must match `v<manifest.version>` — `.github/workflows/release.yml`
|
|
39
|
+
builds, runs `hoardodile plugin package` (`release/<id>-<version>.zip` +
|
|
40
|
+
`.sha256`) and publishes the GitHub release. Your version is independent of
|
|
41
|
+
the hoardodile app version.
|
|
42
|
+
|
|
43
|
+
## Marketplace publishing
|
|
44
|
+
|
|
45
|
+
1. Add the repository address to your registry repo's `registry.json`.
|
|
46
|
+
2. Ship `intro.<locale>.md` files (see the README) so each release carries a
|
|
47
|
+
version-pinned introduction the app can show.
|
|
48
|
+
|
|
49
|
+
## Issues and pull requests
|
|
50
|
+
|
|
51
|
+
- Bug reports and feature requests go through the issue templates
|
|
52
|
+
(**New issue** → bug report / feature request).
|
|
53
|
+
- Pull requests should stay focused: one cohesive change, a matching test,
|
|
54
|
+
and a description of the user-visible behavior.
|
|
55
|
+
- Security issues are **not** filed as public issues — see `SECURITY.md`.
|
package/dist/template/README.md
CHANGED
|
@@ -45,6 +45,24 @@ pnpm run detect:smoke # sandboxed detect against testdata (needs a build first)
|
|
|
45
45
|
`hoardodile plugin run` runs hooks through the same worker sandbox the
|
|
46
46
|
server uses — the exact production execution path.
|
|
47
47
|
|
|
48
|
+
## Requirements
|
|
49
|
+
|
|
50
|
+
- hoardodile **≥ 0.1.1** — the built-in plugin marketplace
|
|
51
|
+
(**Settings → Marketplace**) and the batched asset-download API
|
|
52
|
+
(`download([…])`) when the manifest declares `"download": true`.
|
|
53
|
+
The marketplace's Intro and Release notes tabs and release intro
|
|
54
|
+
assets are read by newer builds; older builds still list and install
|
|
55
|
+
the plugin normally.
|
|
56
|
+
- `"minAppVersion"` in `manifest.json` declares the lowest hoardodile
|
|
57
|
+
release this plugin runs on. Hosts below it refuse to install or update
|
|
58
|
+
the plugin (the marketplace gates the install/update entries and zip
|
|
59
|
+
uploads are blocked with an explanation), so bump it only when the
|
|
60
|
+
plugin really needs a newer app. Omit it for plugins that support every
|
|
61
|
+
release.
|
|
62
|
+
- The plugin's version is independent of the hoardodile release
|
|
63
|
+
version; bump it on user-visible changes.
|
|
64
|
+
- Dev loop: Node ≥ 24, pnpm 11.
|
|
65
|
+
|
|
48
66
|
## Deploying
|
|
49
67
|
|
|
50
68
|
Publish to the marketplace with two steps:
|
|
@@ -70,3 +88,18 @@ up with a "no release" state.
|
|
|
70
88
|
|
|
71
89
|
Local installs (zip upload in **Settings → Plugins**) still work for
|
|
72
90
|
private packages.
|
|
91
|
+
|
|
92
|
+
## Publishing an introduction
|
|
93
|
+
|
|
94
|
+
The marketplace detail view shows a per-release **Intro** tab. Ship one
|
|
95
|
+
markdown file per supported language at the repository root, named
|
|
96
|
+
`intro.<locale>.md` (e.g. `intro.en.md`, `intro.zh.md`) — `release.yml`
|
|
97
|
+
uploads them alongside the zip, so **each release carries its own
|
|
98
|
+
introduction** and every version shows independent notes. Use the app's
|
|
99
|
+
supported language codes as file names (`en`, `zh`, `ja`, `de`, `es`) —
|
|
100
|
+
a region-coded name like `intro.zh-CN.md` only matches a UI language
|
|
101
|
+
resolved to that exact code, so `intro.zh.md` is what Chinese users see.
|
|
102
|
+
|
|
103
|
+
The app resolves the intro for the user's UI language (exact locale → base
|
|
104
|
+
language → `en` → the only shipped language); the release body always shows
|
|
105
|
+
in the **Release notes** tab.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Security policy
|
|
2
|
+
|
|
3
|
+
Hoardodile plugins run as **server-side code** inside the app's restricted
|
|
4
|
+
plugin sandbox — treat a plugin like any third-party dependency: only publish
|
|
5
|
+
or install from sources you trust. The manifest declares the capabilities the
|
|
6
|
+
sandbox grants; installs require explicit user consent.
|
|
7
|
+
|
|
8
|
+
## Reporting a vulnerability
|
|
9
|
+
|
|
10
|
+
Please report security issues **privately** — do **not** open a public issue,
|
|
11
|
+
pull request or discussion that reveals the details.
|
|
12
|
+
|
|
13
|
+
1. Open the repository's **Security** tab on GitHub.
|
|
14
|
+
2. Click **Report a vulnerability** to create a private advisory.
|
|
15
|
+
3. Include the affected hoardodile and plugin versions, a description of the
|
|
16
|
+
vulnerability, reproduction steps and any proof of concept.
|
|
17
|
+
|
|
18
|
+
Private advisories stay invisible to the public until you publish the fix; we
|
|
19
|
+
coordinate the disclosure timeline with you before anything goes public.
|
|
20
|
+
|
|
21
|
+
## What counts as a security issue
|
|
22
|
+
|
|
23
|
+
Anything that lets a crafted resource or plugin install break out of the
|
|
24
|
+
plugin sandbox, escape the plugin's vault, or read/delete data outside the
|
|
25
|
+
plugin's own scope. For usage questions and non-security bugs use the issue
|
|
26
|
+
templates instead.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# My plugin
|
|
2
|
+
|
|
3
|
+
_Replace this introduction with a real overview: what content the plugin
|
|
4
|
+
detects, how it renders it, and where users see it._
|
|
5
|
+
|
|
6
|
+
This introduction ships with **every GitHub release** — edit it per release so
|
|
7
|
+
each version presents its own notes in the marketplace.
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- Detects resources containing … and renders them inline.
|
|
12
|
+
- Declares the following permissions: _see `manifest.json`_.
|
|
13
|
+
|
|
14
|
+
## Requirements
|
|
15
|
+
|
|
16
|
+
- hoardodile ≥ 0.1.1 (see the repository README for details).
|
|
17
|
+
- Trust the repository before installing — plugin code runs server-side in a
|
|
18
|
+
restricted sandbox.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# 我的插件
|
|
2
|
+
|
|
3
|
+
_把这段介绍替换为真实内容:插件识别什么内容、如何渲染、用户在何处看到效果。_
|
|
4
|
+
|
|
5
|
+
本介绍随**每个 GitHub Release** 一同发布——请随版本更新,让每个版本在插件市场中呈现各自的介绍。
|
|
6
|
+
|
|
7
|
+
## 功能
|
|
8
|
+
|
|
9
|
+
- 识别包含……的资源并以内嵌方式渲染。
|
|
10
|
+
- 声明的权限:_参见 `manifest.json`_。
|
|
11
|
+
|
|
12
|
+
## 要求
|
|
13
|
+
|
|
14
|
+
- hoardodile ≥ 0.1.1(详见仓库 README)。
|
|
15
|
+
- 安装前请确认信任该仓库——插件代码在受限沙箱中作为服务端代码运行。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hoardodile/create-plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Scaffold a hoardodile content plugin.",
|
|
6
6
|
"keywords": [
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@clack/prompts": "^1.7.0",
|
|
39
39
|
"zod": "^4.4.3",
|
|
40
|
-
"@hoardodile/sdk-types": "0.1.
|
|
40
|
+
"@hoardodile/sdk-types": "0.1.2"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "^26.2.0",
|