Skip to content

Commit e3a7d22

Browse files
committed
Merge remote-tracking branch 'open-tiny-engine/develop' into feat/robot-330
2 parents f2e165f + 59e8548 commit e3a7d22

112 files changed

Lines changed: 6021 additions & 1969 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy-cdn.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@ on:
99
default: true
1010
type: boolean
1111

12-
env:
13-
HUAWEI_CLOUD_AK: ${{ secrets.HUAWEI_CLOUD_AK }}
14-
HUAWEI_CLOUD_SK: ${{ secrets.HUAWEI_CLOUD_SK }}
15-
HUAWEI_CLOUD_ENDPOINT: ${{ secrets.HUAWEI_CLOUD_ENDPOINT }}
16-
HUAWEI_CLOUD_BUCKET: ${{ secrets.HUAWEI_CLOUD_BUCKET }}
17-
1812
jobs:
1913
check-secrets:
2014
runs-on: ubuntu-latest
@@ -146,12 +140,12 @@ jobs:
146140
147141
- name: Configure and Upload to OBS
148142
run: |
149-
obsutil config -i=${{ env.HUAWEI_CLOUD_AK }} \
150-
-k=${{ env.HUAWEI_CLOUD_SK }} \
151-
-e=${{ env.HUAWEI_CLOUD_ENDPOINT }}
143+
obsutil config -i=${{ secrets.HUAWEI_CLOUD_AK }} \
144+
-k=${{ secrets.HUAWEI_CLOUD_SK }} \
145+
-e=${{ secrets.HUAWEI_CLOUD_ENDPOINT }}
152146
# Upload to versioned path
153147
obsutil cp ./designer-demo/dist \
154-
obs://${{ env.HUAWEI_CLOUD_BUCKET }}/${{ needs.build.outputs.obs-path }} \
148+
obs://${{ secrets.HUAWEI_CLOUD_BUCKET }}/${{ needs.build.outputs.obs-path }} \
155149
-r -f -flat
156150
157151
# If is_latest_release is true, also upload to latest path
@@ -160,9 +154,9 @@ jobs:
160154
find ./designer-demo/dist -type f \( -name "*.html" -o -name "*.js" -o -name "*.mjs" -o -name "*.css" \) \
161155
-exec sed -i "s|${{ needs.build.outputs.cdn-base }}|${{ needs.build.outputs.cdn-base-latest }}|g" {} +
162156
obsutil cp ./designer-demo/dist \
163-
obs://${{ env.HUAWEI_CLOUD_BUCKET }}/${{ needs.build.outputs.obs-path-latest }} \
157+
obs://${{ secrets.HUAWEI_CLOUD_BUCKET }}/${{ needs.build.outputs.obs-path-latest }} \
164158
-r -f -flat
165159
fi
166160
167-
echo "Uploaded to: obs://${{ env.HUAWEI_CLOUD_BUCKET }}/${{ needs.build.outputs.obs-path }}"
161+
echo "Uploaded to: obs://${{ secrets.HUAWEI_CLOUD_BUCKET }}/${{ needs.build.outputs.obs-path }}"
168162
echo "CDN URL: https://res-static.opentiny.design/${{ needs.build.outputs.obs-path }}"

AGENTS.md

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# TinyEngine — Repository Instructions for Coding Agents
2+
3+
## Purpose and Scope
4+
5+
This file is the canonical source of truth for repo-wide agent instructions.
6+
7+
- Applies to the whole repository unless a closer `AGENTS.md` overrides it for a subtree.
8+
- `CLAUDE.md` is a compatibility entrypoint that imports this file. Do not maintain a second independent copy of the same rules.
9+
- Keep this file limited to repo-wide guidance. Package-specific implementation details belong in package-level instruction files.
10+
11+
## Repository Snapshot
12+
13+
- Monorepo: pnpm workspaces + lerna (independent versioning)
14+
- Primary stack: Vue 3, Vite, JavaScript/TypeScript
15+
- Package manager: `pnpm` only for interactive work in this repo
16+
- Designer app: `designer-demo/`
17+
- Local mock backend: `mockServer/`
18+
19+
## Working Model
20+
21+
- Inspect the affected package, its `package.json`, and the nearest instruction file before editing.
22+
- Keep changes scoped. Do not normalize unrelated files or rename fixtures just for consistency.
23+
- Prefer targeted package-level validation over whole-repo commands when possible.
24+
- Treat `pnpm lint` and `pnpm format` as mutating commands, not read-only verification.
25+
- Do not invoke `npm` or `yarn` directly for normal repo work. Existing package scripts may still shell out internally; leave that alone unless the task is specifically about package scripts.
26+
27+
## Common Commands
28+
29+
### Read-mostly commands
30+
31+
```sh
32+
pnpm install
33+
pnpm dev
34+
pnpm build:plugin
35+
pnpm build:alpha
36+
pnpm --filter @opentiny/tiny-engine-dsl-vue test:unit
37+
```
38+
39+
### Mutating commands
40+
41+
```sh
42+
pnpm lint # ESLint with --fix
43+
pnpm format # Prettier --write
44+
```
45+
46+
Canonical script definitions live in:
47+
48+
- `package.json`
49+
- `packages/*/package.json`
50+
- `.github/workflows/push-check.yml`
51+
- `.github/workflows/Release.yml`
52+
53+
## Verification Matrix
54+
55+
Run the smallest sufficient verification for the change surface, then expand if the change is broad or risky.
56+
57+
1. Docs-only changes:
58+
No code verification required unless the docs change commands or workflow descriptions that should be checked against source files.
59+
2. `packages/vue-generator/**`:
60+
Run the affected testcase or `pnpm --filter @opentiny/tiny-engine-dsl-vue test:unit`.
61+
If generator behavior changes, run the full `test:unit` suite before handoff and inspect any changed `expected/*.vue` files.
62+
3. Published library packages under `packages/**`:
63+
Run the package-local `test` script if one exists.
64+
Run `pnpm build:plugin` when build output or published package behavior may be affected.
65+
4. `designer-demo/**` or shared packages consumed by the demo:
66+
Run `pnpm build:alpha`.
67+
5. Cross-package build or release-facing changes:
68+
Run `pnpm build:plugin` and `pnpm build:alpha`.
69+
6. Config, workspace, CI, or release script changes:
70+
Verify the directly affected command(s) after approval.
71+
72+
## Approval Boundaries
73+
74+
### Always OK
75+
76+
- Read any source file
77+
- Run targeted tests and builds
78+
- Edit implementation files inside existing packages
79+
- Add or update tests that match the scope of the change
80+
- Update docs that reflect current repo behavior
81+
82+
### Ask First
83+
84+
- Changing workspace, lerna, pnpm, ESLint, Prettier, or TypeScript configuration
85+
- Modifying CI workflows, release scripts, or publish flows
86+
- Upgrading major dependencies or changing pinned overrides
87+
- Reordering or adding/removing default vue-generator attribute hooks
88+
- Large-scale edits to generated mappings or vendored patches
89+
90+
When asking first, include:
91+
92+
- what you want to change
93+
- why the current rules or implementation are insufficient
94+
- what verification you would run after approval
95+
96+
### Never
97+
98+
- Use `npm` or `yarn` directly for routine repo commands
99+
- Skip hooks with `--no-verify`
100+
- Hardcode versions for workspace packages
101+
- Edit `patches/` without understanding the upstream issue and the patch purpose
102+
- Rewrite generated expectations or snapshots without validating the new output first
103+
104+
## Task-Specific Expectations
105+
106+
- Bug fix:
107+
Add or update a regression test when behavior changes.
108+
- Refactor:
109+
Preserve behavior and prove it with targeted verification.
110+
- Snapshot or generated output change:
111+
Explain why the output changed and list the affected fixture directories.
112+
- Commit or PR work:
113+
Only do it if asked. Use Conventional Commits and target `develop` unless the user specifies otherwise.
114+
115+
## Gotchas
116+
117+
- `pnpm install` is enforced by `preinstall`; npm and yarn are rejected for direct repo usage.
118+
- `pnpm lint` writes fixes. Use it deliberately.
119+
- CI relies on `build:plugin` and `build:alpha`, not only lint or unit tests.
120+
- Test directories such as `test/`, `expected/`, and `output/` are not always linted; do not treat lint success as fixture validation.

CLAUDE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# TinyEngine — Claude Code Entry
2+
3+
This file is intentionally thin. The canonical repo-wide instructions live in `AGENTS.md`.
4+
5+
@./AGENTS.md
6+
7+
When working inside a subtree that has its own `CLAUDE.md`, follow the closer file as an extension of these repo-wide rules.

designer-demo/engine.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@ export default {
55
scripts: [],
66
styles: [],
77
// 是否开启 TailWindCSS 特性
8-
enableTailwindCSS: true
8+
enableTailwindCSS: true,
9+
// 是否开启 使用结构化CSS 特性
10+
enableStructuredCss: false
911
}

0 commit comments

Comments
 (0)