@zjlab-fe/data-hub-ui 0.26.0 → 0.26.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,6 +1,6 @@
1
1
  {
2
2
  "name": "@zjlab-fe/data-hub-ui",
3
- "version": "0.26.0",
3
+ "version": "0.26.1",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -178,9 +178,4 @@ export default {
178
178
  stylePlugin(),
179
179
  typescript({ tsconfig: './tsconfig.rollup.json' }),
180
180
  ],
181
- // treeshake: {
182
- // moduleSideEffects(id) {
183
- // return /\.(css|scss)$/.test(id);
184
- // },
185
- // },
186
181
  };
@@ -1,249 +0,0 @@
1
- ---
2
- applyTo: '**'
3
- ---
4
- Provide project context and coding guidelines that AI should follow when generating code, answering questions, or reviewing changes.
5
-
6
- INITIALIZATION PHASE:
7
- When user provides initial project instruction:
8
- - STOP and analyze if the instruction is high-level or lacks detail
9
- - ASK clarifying questions about:
10
- * Specific features and functionality required
11
- * Technology stack preferences
12
- * UI/UX requirements and design preferences
13
- * Data models and business logic
14
- * Integration requirements (APIs, databases, third-party services)
15
- * User workflows and interactions
16
- * Performance requirements
17
- * Security and authentication needs
18
- - Continue asking questions until user explicitly says "enough" or "that's sufficient"
19
- - NEVER start coding during this phase
20
- - Focus ONLY on understanding requirements completely
21
-
22
- AFTER REQUIREMENTS GATHERING:
23
- Once user confirms requirements are sufficient:
24
- - Check if a bundler/package manager is detected (package.json, vite.config, etc.)
25
- - If bundler detected: Create ONLY feature_list.json
26
- - If NO bundler detected: Create init.sh AND feature_list.json
27
- - DO NOT write any code yet
28
- - STOP after creating these files
29
-
30
- FEATURE_LIST.JSON TEMPLATE:
31
- ``` json
32
- {
33
- "features": [
34
- {
35
- "id": 1,
36
- "category": "functional",
37
- "description": "Clear one-line description of what user can do",
38
- "steps": [
39
- "Concrete step 1 to test",
40
- "Concrete step 2 to test",
41
- "Concrete step 3 to verify expected outcome"
42
- ],
43
- "passes": false,
44
- "estimatedTime": "15-20 minutes",
45
- "dependencies": []
46
- }
47
- ]
48
- }
49
- ```
50
-
51
- Categories: "functional", "performance", "security", "ui/ux", "data", "integration"
52
-
53
- CLAUDE-PROGRESS.TXT TEMPLATE:
54
- ```
55
- === Session [Date/Time] ===
56
- Feature ID: [#]
57
- Feature: [Feature description from feature_list.json]
58
- Implementation Approach: [Brief description of how it was implemented]
59
- Files Created/Modified:
60
- - file1.js (85 lines) - [what was changed]
61
- - file2.html (45 lines) - [what was changed]
62
- - mock/testData.js (150 lines - mock data)
63
- Status: Completed / Partially Complete / Blocked
64
- Changes Made:
65
- - [Specific change 1]
66
- - [Specific change 2]
67
- Issues Encountered:
68
- - [Any problems or limitations]
69
- Solutions Applied:
70
- - [How issues were resolved]
71
- File Size Check: All files under 120 lines ✓ / Required refactoring ✗
72
- Tests Performed:
73
- - [What tests were run]
74
- Next Feature Suggested: [Feature ID and description]
75
- App State: Working / Needs Testing / Broken
76
- ---
77
- ```
78
-
79
- INIT.SH TEMPLATE (Only if no bundler detected):
80
- ```
81
- #!/bin/bash
82
- # Purpose: Start development environment
83
- # Should include:
84
- # - Dependency installation (if needed)
85
- # - Database startup (if applicable)
86
- # - Development server startup
87
- # - Any required environment variables
88
- # Must be runnable multiple times safely
89
- ```
90
-
91
- FEATURE SIZE REQUIREMENTS:
92
- - Each feature must be completable in ONE conversation session
93
- - Break down complex features into multiple small features
94
- - Each feature should take 15-30 minutes maximum
95
- - Features must be independently testable
96
- - Features must be focused on ONE specific capability
97
- - Example: Instead of "User authentication system", break into:
98
- * "User can register with email and password"
99
- * "User can login with credentials"
100
- * "User can logout"
101
- * "User can reset password via email"
102
-
103
- EVERY SESSION START (Working on ONE feature):
104
- - Run pwd to confirm working directory
105
- - Read claude-progress.txt to understand what was last completed
106
- - Read git log (last 5-10 commits) for recent changes
107
- - Look at feature_list.json to see current feature status
108
- - User will tell you which feature to work on OR work on next incomplete feature
109
- - If init.sh exists, run it to start development environment
110
- - If no init.sh (bundler detected), start dev server using package manager (npm run dev, yarn dev, etc.)
111
- - Run basic smoke test to verify app works
112
-
113
- IMPLEMENTATION PLANNING PHASE (BEFORE ANY CODING):
114
- After understanding the current feature, MUST do this:
115
- - Explain your implementation approach in detail:
116
- * Which files will be created/modified
117
- * What code structure you'll use
118
- * How you'll keep files under 120 lines
119
- * Where mock data will be stored (separate file)
120
- * What libraries or dependencies needed
121
- * How you'll implement the logic
122
- * How you'll test the feature
123
- * Any potential challenges or trade-offs
124
- - Present your plan clearly and wait for user feedback
125
- - DISCUSS with user - they may have preferences on:
126
- * Architecture decisions
127
- * Code organization
128
- * Technology choices
129
- * Implementation approach
130
- - Adjust plan based on user input
131
- - ONLY start coding after user explicitly approves (says "go ahead", "looks good", "start", etc.)
132
- - If user suggests changes, revise plan and confirm again
133
-
134
- IMPLEMENTATION PLAN FORMAT:
135
- ## Implementation Plan for: [Feature Name]
136
-
137
- **Files to Create/Modify:**
138
- - file1.js (~70 lines) - [what changes]
139
- - file2.html (~40 lines) - [what changes]
140
- - utils/helpers.js (~30 lines) - [extracted utilities]
141
- - mock/featureData.js (~80 lines) - [mock data for this feature]
142
-
143
- **File Organization Strategy:**
144
- [Explain how you'll keep files under 120 lines]
145
-
146
- **Mock Data Location:**
147
- [Specify which mock data file(s) and what data they contain]
148
-
149
- **Approach:**
150
- [Detailed explanation of implementation strategy]
151
-
152
- **Dependencies/Libraries:**
153
- [Any new packages or tools needed]
154
-
155
- **Testing Strategy:**
156
- [How you'll verify it works]
157
-
158
- **Trade-offs/Considerations:**
159
- [Any architectural decisions or potential issues]
160
-
161
- **Estimated Time:** [X minutes]
162
-
163
- Does this approach work for you? Any preferences or changes?
164
-
165
- FILE SIZE AND ORGANIZATION RULES:
166
- - EVERY file must be 120 lines or below (HARD LIMIT)
167
- - If a file approaches 120 lines, MUST split into multiple files
168
- - Use modular architecture to keep files small:
169
- * Separate concerns into different files
170
- * Extract utilities into separate files
171
- * Split large components into smaller sub-components
172
- * Create separate files for constants, types, interfaces
173
- - Mock data MUST ALWAYS be in separate files:
174
- * Create mock/ or data/ directory for all mock data
175
- * File naming: mockUsers.js, mockProducts.json, testData.js, etc.
176
- * NEVER inline large mock data arrays/objects in implementation files
177
- * Even small mock data (3+ items) should be in separate file
178
- - When a file reaches ~100 lines, proactively refactor before adding more
179
- - Prefer many small focused files over few large files
180
-
181
- DURING SESSION - SINGLE FEATURE FOCUS:
182
- - Work ONLY on the current feature being discussed
183
- - Do NOT look ahead to other features
184
- - Do NOT implement anything beyond the current feature scope
185
- - Stay laser-focused on completing this ONE feature
186
- - If you notice the feature is too large, STOP and suggest breaking it into smaller features
187
- - If you need to deviate from approved plan, STOP and discuss changes with user first
188
- - If any file exceeds 120 lines during implementation, STOP and refactor before continuing
189
-
190
- TESTING FOR CURRENT FEATURE:
191
- - Test ONLY the current feature end-to-end
192
- - Use browser automation for web features
193
- - Verify the specific acceptance criteria in feature_list.json
194
- - Do NOT test unrelated features unless they break
195
-
196
- SESSION END (After completing ONE feature):
197
- FOLLOW THIS EXACT ORDER:
198
- 1. Verify ALL files are under 120 lines (except mock data files)
199
- 2. Ensure code is in clean state
200
- 3. Update claude-progress.txt with complete session information
201
- 4. Update feature_list.json: change ONLY current feature's "passes" to true
202
- 5. WAIT for user to say "commit" or give commit instruction
203
- 6. When user says "commit": Write git commit with descriptive message
204
- 7. STOP - user will start new conversation for next feature
205
-
206
- COMMIT RULES:
207
- - NEVER commit automatically
208
- - ONLY commit when user explicitly says "commit", "git commit", "save this", or similar
209
- - Wait for user instruction before committing
210
- - Commit message should be descriptive of the feature completed
211
- - Commit includes: code changes + claude-progress.txt + feature_list.json
212
-
213
- SINGLE FEATURE CONVERSATION FLOW:
214
- 1. Read context (progress file, git log, feature list)
215
- 2. Confirm which feature to work on
216
- 3. Start dev environment (init.sh or bundler command)
217
- 4. Verify app still works (smoke test)
218
- 5. Present implementation plan and WAIT for approval
219
- 6. Discuss and adjust plan based on user feedback
220
- 7. Get explicit approval before coding
221
- 8. Implement ONLY that feature (following approved plan)
222
- 9. Monitor file sizes - refactor immediately if approaching 120 lines
223
- 10. Ensure mock data is in separate files
224
- 11. Test ONLY that feature
225
- 12. Verify all files under 120 lines
226
- 13. Update claude-progress.txt (document everything)
227
- 14. Update feature_list.json (mark feature as passes: true)
228
- 15. WAIT for user to say "commit"
229
- 16. When user says commit: Write git commit with descriptive message
230
- 17. STOP - end conversation
231
-
232
- BETWEEN CONVERSATIONS:
233
- - User starts fresh conversation for each new feature
234
- - Each conversation = ONE feature from feature_list.json
235
- - Context resets between features (this is intentional)
236
- - Progress tracking via git commits + claude-progress.txt + feature_list.json
237
-
238
- FORBIDDEN BEHAVIORS:
239
- - Never start coding during requirements gathering
240
- - Never create more than necessary files during initialization (only feature_list.json if bundler detected, or init.sh + feature_list.json if no bundler)
241
- - Never work on multiple features in one conversation
242
- - Never look ahead or prepare for future features
243
- - Never create large features that span multiple conversations
244
- - NEVER start coding before presenting and discussing implementation plan
245
- - NEVER start coding without explicit user approval
246
- - NEVER create files over 120 lines (except mock data files)
247
- - NEVER put mock data inline in implementation files
248
- - NEVER continue coding if a file exceeds 120 lines without refactoring first
249
- - NEVER commit without user explicitly instructing to commit
@@ -1,28 +0,0 @@
1
- @Library('common-pipeline-library') _
2
-
3
-
4
- def params = [
5
- GIT_URL: 'http://gitee.zhejianglab.com:80/enterprise/data-hub-ui.git',
6
- GIT_CREDENTIALS_ID: 'zhusw-fe',
7
- NODE_VERSION: '22.3.0',
8
- NPM_REGISTRY: '--registry https://registry.npmmirror.com',
9
- BRANCH_SPECIFIC_SETTINGS: [
10
- 'dev': [
11
- DOCKER_FILE_PATH: 'deploy/docker/Dockerfile',
12
- DOCKER_IMAGE: 'cr.registry.res.cloud.zhejianglab.com/datahub/data-hub-ui',
13
- DOCKER_REGISTRY_CREDENTIALS_ID: 'zjlab-ft-acr',
14
- DOCKER_REGISTRY: 'cr.registry.res.cloud.zhejianglab.com',
15
- KUBE_CONFIG_CREDENTIALS_ID: 'zjfe-ddeCloud-dev-cluster-config',
16
- KUBENETES_MANIFESTS_PATH: 'deploy/k8s/manifests-dev'
17
- ],
18
- 'master': [
19
- DOCKER_FILE_PATH: 'deploy/docker/Dockerfile',
20
- DOCKER_IMAGE: 'cr.registry.res.cloud.zhejianglab.com/datahub/data-hub-ui',
21
- DOCKER_REGISTRY_CREDENTIALS_ID: 'zjlab-ft-acr',
22
- DOCKER_REGISTRY: 'cr.registry.res.cloud.zhejianglab.com',
23
- KUBE_CONFIG_CREDENTIALS_ID: 'zjft-cluster-config',
24
- KUBENETES_MANIFESTS_PATH: 'deploy/k8s/manifests-prod'
25
- ]
26
- ]
27
- ]
28
- nodeNpmDockerK8sMultiBranchPipeline.call(params)
@@ -1,5 +0,0 @@
1
- FROM cr.registry.res.cloud.zhejianglab.com/datahub/nginx:1.27.2-alpine
2
- COPY ./build /usr/share/nginx/html
3
- COPY ./deploy/nginx/server.conf /etc/nginx/conf.d/default.conf
4
- EXPOSE 80
5
- CMD ["/bin/sh", "-c", "exec nginx -g 'daemon off;'"]
@@ -1,72 +0,0 @@
1
- apiVersion: apps/v1
2
- kind: Deployment
3
- metadata:
4
- labels:
5
- run: data-hub-ui
6
- name: data-hub-ui
7
- namespace: frontend
8
- spec:
9
- progressDeadlineSeconds: 600
10
- replicas: 1
11
- revisionHistoryLimit: 10
12
- selector:
13
- matchLabels:
14
- run: data-hub-ui
15
- strategy:
16
- rollingUpdate:
17
- maxSurge: 25%
18
- maxUnavailable: 25%
19
- type: RollingUpdate
20
- template:
21
- metadata:
22
- labels:
23
- run: data-hub-ui
24
- spec:
25
- containers:
26
- - image: ${IMAGE}
27
- imagePullPolicy: IfNotPresent
28
- name: data-hub-ui
29
- resources:
30
- requests:
31
- cpu: '100m'
32
- memory: 25Mi
33
- limits:
34
- cpu: '200m'
35
- memory: 50Mi
36
- terminationMessagePath: /dev/termination-log
37
- terminationMessagePolicy: File
38
- startupProbe:
39
- httpGet:
40
- path: /index.html
41
- port: 80
42
- failureThreshold: 50
43
- periodSeconds: 10
44
- dnsPolicy: ClusterFirst
45
- imagePullSecrets:
46
- - name: zj-acr
47
- restartPolicy: Always
48
- schedulerName: default-scheduler
49
- terminationGracePeriodSeconds: 30
50
- ---
51
- apiVersion: v1
52
- kind: Service
53
- metadata:
54
- labels:
55
- run: data-hub-ui
56
- name: data-hub-ui
57
- namespace: frontend
58
- spec:
59
- externalTrafficPolicy: Local
60
- internalTrafficPolicy: Cluster
61
- ipFamilies:
62
- - IPv4
63
- ipFamilyPolicy: SingleStack
64
- ports:
65
- - name: data-hub-ui
66
- port: 80
67
- protocol: TCP
68
- targetPort: 80
69
- selector:
70
- run: data-hub-ui
71
- sessionAffinity: None
72
- type: NodePort
@@ -1,71 +0,0 @@
1
- apiVersion: apps/v1
2
- kind: Deployment
3
- metadata:
4
- labels:
5
- run: data-hub-ui
6
- name: data-hub-ui
7
- namespace: frontend
8
- spec:
9
- progressDeadlineSeconds: 600
10
- replicas: 1
11
- revisionHistoryLimit: 10
12
- selector:
13
- matchLabels:
14
- run: data-hub-ui
15
- strategy:
16
- rollingUpdate:
17
- maxSurge: 25%
18
- maxUnavailable: 25%
19
- type: RollingUpdate
20
- template:
21
- metadata:
22
- labels:
23
- run: data-hub-ui
24
- spec:
25
- containers:
26
- - image: ${IMAGE}
27
- imagePullPolicy: IfNotPresent
28
- name: data-hub-ui
29
- resources:
30
- requests:
31
- cpu: '100m'
32
- memory: 25Mi
33
- limits:
34
- cpu: '200m'
35
- memory: 50Mi
36
- terminationMessagePath: /dev/termination-log
37
- terminationMessagePolicy: File
38
- startupProbe:
39
- httpGet:
40
- path: /index.html
41
- port: 80
42
- failureThreshold: 50
43
- periodSeconds: 10
44
- dnsPolicy: ClusterFirst
45
- imagePullSecrets:
46
- - name: zj-acr
47
- restartPolicy: Always
48
- schedulerName: default-scheduler
49
- terminationGracePeriodSeconds: 30
50
- ---
51
- apiVersion: v1
52
- kind: Service
53
- metadata:
54
- labels:
55
- run: data-hub-ui
56
- name: data-hub-ui
57
- namespace: frontend
58
- spec:
59
- internalTrafficPolicy: Cluster
60
- ipFamilies:
61
- - IPv4
62
- ipFamilyPolicy: SingleStack
63
- ports:
64
- - name: data-hub-ui
65
- port: 80
66
- protocol: TCP
67
- targetPort: 80
68
- selector:
69
- run: data-hub-ui
70
- sessionAffinity: None
71
- type: ClusterIP
@@ -1,24 +0,0 @@
1
- server {
2
- listen 80;
3
- server_name localhost;
4
- client_max_body_size 2048m;
5
-
6
- location / {
7
- root /usr/share/nginx/html;
8
- index index.html index.htm index.shtml;
9
- try_files $uri $uri/ /index.html;
10
- }
11
-
12
- location /data-hub-ui {
13
- alias /usr/share/nginx/html/;
14
- index index.html index.htm index.shtml;
15
- try_files $uri $uri/ /index.html;
16
- }
17
-
18
- error_page 405 =200 $uri;
19
-
20
- error_page 500 502 503 504 /50x.html;
21
- location = /50x.html {
22
- root /usr/share/nginx/html;
23
- }
24
- }