@kanyun-ai-infra/band-cli 0.1.1 → 0.2.0
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/bundled/examples/aitutor-tool/band/views/release/package.json +1 -1
- package/bundled/examples/aitutor-tool/band/views/tool-preview/package.json +1 -1
- package/bundled/examples/analysis/band/views/intake/package.json +1 -1
- package/bundled/examples/compliance/band/views/compliance/package.json +1 -1
- package/bundled/examples/content-review/band/views/checklist/package.json +1 -1
- package/bundled/examples/rush-site/band/views/rush-db/package.json +1 -1
- package/bundled/examples/rush-site/band/views/rush-deploy/package.json +1 -1
- package/bundled/examples/video/band/views/timeline/package.json +1 -1
- package/bundled/kernel/fixture.js +1 -1
- package/bundled/kernel/index.js +1 -1
- package/bundled/official/activity/package.json +4 -4
- package/bundled/official/approval/package.json +4 -4
- package/bundled/official/artifacts/package.json +4 -4
- package/bundled/official/chat/package.json +4 -4
- package/bundled/official/chunks/{chunk-SB74RUTN.js → chunk-DIL5YSVK.js} +1 -1
- package/bundled/official/comment/dist/index.js +1 -1
- package/bundled/official/comment/package.json +4 -4
- package/bundled/official/header/package.json +4 -4
- package/bundled/official/home/package.json +4 -4
- package/bundled/official/layouts/package.json +4 -4
- package/bundled/official/library/dist/index.js +1 -1
- package/bundled/official/library/package.json +4 -4
- package/bundled/official/members/package.json +4 -4
- package/bundled/official/memory/package.json +4 -4
- package/bundled/official/native/package.json +2 -2
- package/bundled/official/params-form/package.json +4 -4
- package/bundled/official/plugins/package.json +4 -4
- package/bundled/official/project/dist/index.js +1 -1
- package/bundled/official/project/package.json +4 -4
- package/bundled/official/queue/package.json +4 -4
- package/bundled/official/settings/package.json +4 -4
- package/bundled/official/shell/dist/index.js +1 -1
- package/bundled/official/shell/package.json +4 -4
- package/bundled/official/stages/package.json +4 -4
- package/bundled/official/threads/package.json +4 -4
- package/bundled/official/turn-bar/package.json +4 -4
- package/bundled/official/turn-trace/package.json +4 -4
- package/bundled/official/version-switch/dist/index.js +1 -1
- package/bundled/official/version-switch/package.json +4 -4
- package/bundled/official/viewer-entity/package.json +2 -2
- package/bundled/official/viewer-external/package.json +2 -2
- package/bundled/official/viewer-image/package.json +2 -2
- package/bundled/official/viewer-media/package.json +2 -2
- package/bundled/official/viewer-storyboard/package.json +2 -2
- package/bundled/official/viewer-text/package.json +4 -4
- package/bundled/official/viewer-tool/package.json +2 -2
- package/bundled/official/viewer-web/package.json +2 -2
- package/bundled/official/viewer-web-app/package.json +2 -2
- package/bundled/official/workshops/dist/index.js +2 -2
- package/bundled/official/workshops/package.json +4 -4
- package/bundled/official/workshops/plugin.yaml +2 -2
- package/bundled/skills/band-plugin/references/code.md +2 -2
- package/bundled/skills/band-plugin/references/manifest.md +2 -2
- package/bundled/skills/band-plugin/references/rules.md +1 -0
- package/bundled/skills/band-plugin/references/testing-publish.md +1 -1
- package/bundled/skills/band-plugin/templates/panel/package.json +1 -1
- package/dev-host/app.tsx +9 -5
- package/dist/bin.js +3 -3
- package/dist/build-plugin.d.ts +1 -1
- package/dist/build-plugin.js +1 -1
- package/dist/{chunk-TQHHHXXU.js → chunk-LGYGWMSY.js} +18 -16
- package/dist/{chunk-VTAJX7NN.js → chunk-Q2XJXNVH.js} +16 -9
- package/dist/{chunk-JWZU3NOD.js → chunk-XPLYTHNX.js} +1 -1
- package/dist/{dev-server-SB5FMSVP.js → dev-server-Q7NTJ3QD.js} +19 -4
- package/dist/fixture.d.ts +11 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/vite.d.ts +1 -1
- package/dist/vite.js +2 -2
- package/dist/{workshop-repo-Uq6blxyt.d.ts → workshop-repo-DqoVdcGu.d.ts} +9 -9
- package/package.json +9 -7
- package/src/dev-managers.ts +16 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kanyun-ai-infra/band-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "band 命令行:新建、本地调试、校验与发布 Band 工坊和插件",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"./build": {
|
|
17
17
|
"types": "./dist/build-plugin.d.ts",
|
|
18
|
-
"import": "./dist/build-plugin.js"
|
|
18
|
+
"import": "./dist/build-plugin.js",
|
|
19
|
+
"default": "./dist/build-plugin.js"
|
|
19
20
|
},
|
|
20
21
|
"./catalog": {
|
|
21
22
|
"types": "./dist/plugin-entry.d.ts",
|
|
@@ -33,6 +34,7 @@
|
|
|
33
34
|
"files": [
|
|
34
35
|
"dist",
|
|
35
36
|
"dev-host",
|
|
37
|
+
"src/dev-managers.ts",
|
|
36
38
|
"src/inspector-plugins.ts",
|
|
37
39
|
"src/load-plugins.ts",
|
|
38
40
|
"bundled"
|
|
@@ -41,12 +43,12 @@
|
|
|
41
43
|
"node": ">=22.19"
|
|
42
44
|
},
|
|
43
45
|
"dependencies": {
|
|
44
|
-
"@kanyun-ai-infra/band-contracts": "^0.1.
|
|
45
|
-
"@kanyun-ai-infra/band-plugin-react": "^0.
|
|
46
|
-
"@kanyun-ai-infra/band-plugin-sdk": "^
|
|
46
|
+
"@kanyun-ai-infra/band-contracts": "^0.1.3",
|
|
47
|
+
"@kanyun-ai-infra/band-plugin-react": "^0.2.0",
|
|
48
|
+
"@kanyun-ai-infra/band-plugin-sdk": "^2.0.0",
|
|
47
49
|
"es-module-lexer": "^2.3.2",
|
|
48
|
-
"react": "^
|
|
49
|
-
"react-dom": "^
|
|
50
|
+
"react": "^19.3.1",
|
|
51
|
+
"react-dom": "^19.3.1",
|
|
50
52
|
"semver": "^7.8.5",
|
|
51
53
|
"vite": "^6.0.7",
|
|
52
54
|
"yaml": "^2.6.1",
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* band dev 的 dev-host 里谁算项目管理员(夹具 `FixtureData.managers`)。
|
|
3
|
+
*
|
|
4
|
+
* 与线上同构:只有 owner / maintainer 管项目。不带 `?role=`(或角色不在工坊里)是默认开发身份,按管理员看;
|
|
5
|
+
* 选了工坊里的业务角色(`?role=teacher` 这类)就是非管理员,预览得到非管理员视图。业务角色不是管理角色。
|
|
6
|
+
* 不从起始身份推创建人:dev-host 的身份恒为 `dev`,推出来会让任何角色都变成管理员。
|
|
7
|
+
*/
|
|
8
|
+
export function devManagers(
|
|
9
|
+
roleParam: string | null,
|
|
10
|
+
workshopRoles: readonly string[],
|
|
11
|
+
memberId: string,
|
|
12
|
+
): string[] {
|
|
13
|
+
const picked = roleParam !== null && workshopRoles.includes(roleParam);
|
|
14
|
+
const manages = !picked || roleParam === "owner" || roleParam === "maintainer";
|
|
15
|
+
return manages ? [memberId] : [];
|
|
16
|
+
}
|