@picloom/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/README.md CHANGED
@@ -1,32 +1,21 @@
1
1
  # @picloom/create-plugin
2
2
 
3
- Create a standalone Picloom plugin project with Bun 1.4.3+. No main repository
4
- checkout, Node.js or npm CLI is required.
5
-
6
- Create a project:
3
+ Create a standalone Picloom date-path plugin with Bun 1.4.3+.
7
4
 
8
5
  ```sh
9
- bun create @picloom/plugin@0.1.1 ./my-plugin
6
+ bun create @picloom/plugin@0.1.2 ./my-plugin
7
+ cd my-plugin
8
+ bun install
9
+ bun run typecheck
10
+ bun run build
10
11
  ```
11
12
 
12
- The destination must not exist; its parent must exist. `--help` prints usage.
13
- The tool copies a date path plugin template and prints next steps. It does not
14
- install dependencies, start a service, or publish anything. Follow the generated
15
- README to edit, build and install the plugin.
13
+ The target directory must not exist and its parent must exist. Follow the generated README to edit and install the ZIP. The starter generates paths using UTC dates. Type checking and building are separate commands.
16
14
 
17
- See [quick start](https://llleixx.github.io/picloom/development/plugin-tooling.html)
18
- for the full workflow and optional local tarball usage. Package
19
- maintainers use [tool maintenance](https://github.com/llleixx/picloom/blob/main/docs/development/plugin-tooling-maintenance.md).
15
+ [Plugin tutorial](https://llleixx.github.io/picloom/development/plugin-tooling.html)
20
16
 
21
17
  ## 中文
22
18
 
23
- 使用 Bun 1.4.3+ 创建独立插件项目,无需主仓库、Node.js 或 npm CLI。
24
- 使用上方命令创建项目,完整流程与可选本地压缩包用法见
25
- [快速开始](https://llleixx.github.io/picloom/development/plugin-tooling.html#本地压缩包)。
26
-
27
- 目标目录必须不存在,父目录必须存在。工具只复制日期路径插件模板并提示下一步,
28
- 不安装依赖、不启动服务、不发布代码。生成后按项目内 README 修改、构建和安装插件。
29
-
30
- Generated projects use `@picloom/plugin-sdk` for contracts and runtime helpers, and `@picloom/plugin-tools` for ZIP builds. No build script is copied. Use creator 0.1.1, tools 0.1.0 and plugin SDK 0.1.0.
19
+ 使用 Bun 1.4.3+ 创建独立日期路径插件。按上方命令创建工程、安装依赖、检查类型并构建。目标目录必须不存在,父目录必须存在。
31
20
 
32
- 生成项目依赖 SDK 与开发工具包,不复制构建实现;使用脚手架 0.1.1、工具 0.1.0 和插件 SDK 0.1.0 的 npm 精确版本。
21
+ 初始插件按 UTC 日期生成路径。类型检查与构建分别执行;修改文件和安装 ZIP 的步骤见生成项目中的 README。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picloom/create-plugin",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Create a standalone Picloom plugin project",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,8 +1,6 @@
1
1
  # My Picloom plugin
2
2
 
3
- A standalone plugin project using Bun 1.4.3+ and Picloom plugin API 1. Use a
4
- separate Picloom 0.1.0 development test instance for installation and uploads.
5
- Node.js and npm CLI are not required.
3
+ A date-path plugin project for Bun 1.4.3+.
6
4
 
7
5
  ## Develop
8
6
 
@@ -12,60 +10,30 @@ bun run typecheck
12
10
  bun run build
13
11
  ```
14
12
 
15
- Commit the generated `bun.lock`. To check types without building, run
16
- `bun run typecheck`. Type checking and ZIP building are separate commands under Bun. Builds call `@picloom/plugin-tools`; no build implementation is copied into the project.
13
+ - `plugin.json`: set your plugin ID and version.
14
+ - `src/index.ts`: edit localized names, configuration and path generation. The starter uses UTC dates and accepts empty configuration `{}`.
15
+ - `package.json`: dependencies and commands. Type checking runs separately from builds.
16
+ - `dist/<plugin-id>-<version>.zip`: the built plugin, containing the manifest and bundled entry.
17
17
 
18
- - `plugin.json`: plugin ID, version, kind and API version. Replace the
19
- generated `example.*` ID with your own stable ID before sharing.
20
- - `src/index.ts`: localized display text (`defaultLocale` and `messages`), configuration and implementation. It reads identity fields from
21
- the manifest and initially generates UTC date paths. It omits `configSchema`
22
- because it has no custom configuration; the host accepts only `{}`.
23
- - `package.json`: development dependencies and commands; its version is not the
24
- plugin version. The project is private to prevent accidental npm publication.
25
- - `dist/<plugin-id>-<version>.zip`: build output, containing `plugin.json` and
26
- bundled `index.js` at the ZIP root. No system `zip` command is required.
18
+ Builds load the entry, so keep module-level code free of external side effects. Use `services.images.sharp` for runtime image processing; the Sharp dependency supplies development types.
27
19
 
28
- Build loads your entry to check its identity, so keep module top-level code free
29
- of external side effects. Sharp is a development dependency for SDK types;
30
- use `services.images.sharp` at runtime. The template bundles JavaScript only;
31
- extra assets and native modules require explicit packaging.
20
+ ## Install
32
21
 
33
- ## Install and update
22
+ As Owner, upload the ZIP in Picloom plugin management. Select the plugin in an upload profile with an available storage group, then upload an image and open its link.
34
23
 
35
- 1. Sign in to the test instance as Owner and upload the ZIP in plugin management.
36
- 2. Review the identity, confirm trust, and check that the plugin loaded.
37
- 3. Select your path plugin in a test upload profile with an available storage group.
38
- 4. Upload a PNG and open its returned link. The starter path contains the UTC date
39
- and file ID, plus the profile's public prefix.
40
- 5. After code changes, increment `plugin.json`'s version, rebuild and install.
41
- In the profile choose the new version, preview and apply the upgrade.
24
+ After changes, increment `plugin.json.version`, rebuild and install. Select the new version in the upload profile and apply the migration preview; existing configurations do not switch automatically.
42
25
 
43
- Installation does not activate a plugin automatically. Same-version replacement
44
- and source hot reload are not supported. See [packaging and upgrades](https://llleixx.github.io/picloom/development/plugin-release.html)
45
- for configuration migrations and dependency restrictions.
46
-
47
- For other plugin types and adapting the examples, follow
48
- [quick start](https://llleixx.github.io/picloom/development/plugin-tooling.html#使用教程示例).
49
- See [host services](https://llleixx.github.io/picloom/development/plugin-services.html)
50
- for configuration, secrets and state, and [errors and concurrency](https://llleixx.github.io/picloom/development/plugin-errors.html)
51
- for retries, cancellation and instance lifecycle.
26
+ [Plugin tutorial](https://llleixx.github.io/picloom/development/plugin-tooling.html) · [Packaging and upgrades](https://llleixx.github.io/picloom/development/plugin-release.html)
52
27
 
53
28
  ## 中文
54
29
 
55
- 本项目只需 Bun 1.4.3+。修改 `plugin.json` 的身份信息和 `src/index.ts` 的实现,
56
- 执行 `bun install`、`bun run build`,将生成的 `bun.lock` 提交到自己的插件仓库。
57
- 类型检查单独运行 `bun run typecheck`;构建调用 `@picloom/plugin-tools` 输出 `dist/<插件ID>-<版本>.zip`,无需系统 `zip` 命令。
58
-
59
- 用 Owner 账号在独立测试实例中安装 ZIP,确认加载成功后,在上传配置中选择插件并
60
- 关联可用存储组。上传 PNG,确认日期路径和公开链接。改代码后增加清单版本,重新
61
- 构建安装,再选择新版本、预览并应用升级;安装新版不会自动切换已有配置。
30
+ 使用 Bun 1.4.3+,依次运行上方安装、类型检查和构建命令。
62
31
 
63
- 模板没有自定义配置项,因此省略 `configSchema`,宿主只接受空配置 `{}`;添加配置项时再声明对象 Schema。
32
+ - `plugin.json`:修改插件 ID 与版本。
33
+ - `src/index.ts`:修改多语言名称、配置与路径生成。初始实现使用 UTC 日期,接受空配置 `{}`。
34
+ - `package.json`:依赖与命令,类型检查和构建分别执行。
35
+ - `dist/<插件ID>-<版本>.zip`:包含清单与打包入口的安装包。
64
36
 
65
- 名称和简介通过 `nameKey/descriptionKey` 引用入口的 `messages` 字典,`defaultLocale` 指定内容默认语言。
66
- 入口从清单读取身份字段;`package.json` 的版本不是插件版本。构建会加载入口,
67
- 不要在模块顶层执行远端操作。Sharp 的开发依赖提供类型,运行时使用宿主实例。
68
- 其他类型和完整接口见上方文档链接。
37
+ 构建会加载入口,避免在模块顶层执行远端操作。图片处理使用宿主的 `services.images.sharp`;Sharp 开发依赖用于类型检查。
69
38
 
70
- The current creator/tool versions are not yet published; use their local tarballs for validation.
71
- 当前脚手架和工具版本尚未发布,请使用本地压缩包验证。
39
+ 以 Owner 在插件管理中安装 ZIP,在上传配置中选择插件并关联可用存储组,上传图片后打开返回链接。更新时增加清单版本、重新构建安装,再在上传配置中选择新版并应用迁移预览;已有配置不会自动切换。
@@ -8,11 +8,11 @@
8
8
  "build": "bun --bun picloom-plugin build"
9
9
  },
10
10
  "devDependencies": {
11
- "@picloom/plugin-sdk": "0.1.0",
11
+ "@picloom/plugin-sdk": "0.1.1",
12
12
  "@types/bun": "1.3.10",
13
13
  "sharp": "0.34.5",
14
14
  "typescript": "5.9.3",
15
- "@picloom/plugin-tools": "0.1.0"
15
+ "@picloom/plugin-tools": "0.1.1"
16
16
  },
17
17
  "engines": {
18
18
  "bun": ">=1.4.3"