@lark-apaas/coding-template-vite-react 0.1.11 → 0.1.13

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": "@lark-apaas/coding-template-vite-react",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "Vite + React client template for miaoda coding",
5
5
  "type": "module",
6
6
  "files": ["template", "hooks"],
@@ -0,0 +1,9 @@
1
+ #!/bin/sh
2
+ # miaoda vite-react: pre-commit — 通用入口,具体门禁内容由 package.json 的 precommit 脚本决定
3
+ # 注册(core.hooksPath=.githooks)由 package.json 的 prepare 脚本在 npm install 时完成,
4
+ # fullstack upgrade 的 activateGitHooks 作为兜底(覆盖 install 早于 git init 的时序)。
5
+ [ "$SKIP_GIT_HOOKS" = "1" ] && exit 0
6
+ if ! npm run precommit; then
7
+ echo "✗ pre-commit: 校验未通过,已阻断提交(绕过:git commit --no-verify 或 SKIP_GIT_HOOKS=1)" >&2
8
+ exit 1
9
+ fi
@@ -48,7 +48,7 @@
48
48
  "framer-motion": "^12.38.0",
49
49
  "gsap": "^3.15.0",
50
50
  "input-otp": "^1.4.2",
51
- "lucide-react": "^1.7.0",
51
+ "lucide-react": "0.577.0",
52
52
  "next-themes": "^0.4.6",
53
53
  "react": "^19.2.4",
54
54
  "react-day-picker": "^9.14.0",
@@ -67,7 +67,7 @@
67
67
  },
68
68
  "devDependencies": {
69
69
  "@eslint/js": "^9",
70
- "@lark-apaas/coding-preset-vite-react": "^0.1.3",
70
+ "@lark-apaas/coding-preset-vite-react": "^1.0.1",
71
71
  "@lark-apaas/coding-presets": "1.0.3-alpha.0",
72
72
  "@types/node": "^24",
73
73
  "@types/react": "^19",
@@ -1010,9 +1010,9 @@
1010
1010
  }
1011
1011
  },
1012
1012
  "node_modules/@lark-apaas/coding-preset-vite-react": {
1013
- "version": "0.1.3",
1014
- "resolved": "https://registry.npmmirror.com/@lark-apaas/coding-preset-vite-react/-/coding-preset-vite-react-0.1.3.tgz",
1015
- "integrity": "sha512-G836SADJ/lgX+/2FKcX8Ckz9VK2BZOh2qoQ+fMSDhZ2XmAyhgjmPCMcfducS6ErbprUpCAHO3AcdriqZ3TzVew==",
1013
+ "version": "1.0.1",
1014
+ "resolved": "https://registry.npmmirror.com/@lark-apaas/coding-preset-vite-react/-/coding-preset-vite-react-1.0.1.tgz",
1015
+ "integrity": "sha512-kCxLe/wH4WYmkPbimSbNAX3lGvi97z0a6NtvQkg8xVR4Dd/ULaAvKVJG2AgFJ/6OYItm8iR9ek1bpuTb6FEd1g==",
1016
1016
  "dev": true,
1017
1017
  "license": "MIT",
1018
1018
  "dependencies": {
@@ -8265,9 +8265,9 @@
8265
8265
  }
8266
8266
  },
8267
8267
  "node_modules/lucide-react": {
8268
- "version": "1.17.0",
8269
- "resolved": "https://registry.npmmirror.com/lucide-react/-/lucide-react-1.17.0.tgz",
8270
- "integrity": "sha512-9FA9evdox/JQL5PT57fdA1x/yg8T7knJ98+zjTL3UfKza6pflQUUh3XtaQIHKvnsJw1lmsEyHVlt5jchYxOQ5w==",
8268
+ "version": "0.577.0",
8269
+ "resolved": "https://registry.npmmirror.com/lucide-react/-/lucide-react-0.577.0.tgz",
8270
+ "integrity": "sha512-4LjoFv2eEPwYDPg/CUdBJQSDfPyzXCRrVW1X7jrx/trgxnxkHFjnVZINbzvzxjN70dxychOfg+FTYwBiS3pQ5A==",
8271
8271
  "license": "ISC",
8272
8272
  "peerDependencies": {
8273
8273
  "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0"
@@ -8,7 +8,9 @@
8
8
  "build": "bash scripts/build.sh",
9
9
  "typecheck": "tsc -p tsconfig.app.json",
10
10
  "lint": "concurrently npm:typecheck npm:lint:eslint",
11
- "lint:eslint": "eslint src"
11
+ "lint:eslint": "eslint src",
12
+ "precommit": "npm run lint",
13
+ "prepare": "node scripts/setup-git-hooks.mjs"
12
14
  },
13
15
  "dependencies": {
14
16
  "@hookform/resolvers": "^5.2.2",
@@ -51,7 +53,7 @@
51
53
  "echarts-for-react": "~3.0.2",
52
54
  "embla-carousel-react": "^8.6.0",
53
55
  "input-otp": "^1.4.2",
54
- "lucide-react": "^1.7.0",
56
+ "lucide-react": "0.577.0",
55
57
  "next-themes": "^0.4.6",
56
58
  "react": "^19.2.4",
57
59
  "react-day-picker": "^9.14.0",
@@ -74,7 +76,7 @@
74
76
  "@types/react": "^19",
75
77
  "@types/react-dom": "^19",
76
78
  "@lark-apaas/coding-presets": "1.0.3-alpha.0",
77
- "@lark-apaas/coding-preset-vite-react": "^0.1.3",
79
+ "@lark-apaas/coding-preset-vite-react": "^1.0.1",
78
80
  "concurrently": "^9",
79
81
  "eslint": "^9",
80
82
  "eslint-plugin-react-hooks": "^7",
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * 注册项目内置 git pre-commit 钩子:core.hooksPath -> .githooks。
4
+ * 由 package.json 的 prepare 脚本在 npm install 时调用(此时 git 通常已就绪)。
5
+ * 走原生 git config,无第三方依赖;非 git 环境(CI 构建 / smoke 临时目录)静默跳过,绝不阻断 install。
6
+ */
7
+ import { existsSync, chmodSync } from 'node:fs';
8
+ import { execFileSync } from 'node:child_process';
9
+
10
+ // 仅当当前目录就是 git 仓库根时才注册,避免污染外层仓库
11
+ if (!existsSync('.git') || !existsSync('.githooks/pre-commit')) {
12
+ process.exit(0);
13
+ }
14
+
15
+ try {
16
+ chmodSync('.githooks/pre-commit', 0o755); // 兜底任何丢 +x 的分发链路
17
+ execFileSync('git', ['config', 'core.hooksPath', '.githooks'], { stdio: 'ignore' });
18
+ } catch {
19
+ // git 未安装或任何异常:忽略,不阻断 npm install
20
+ }
@@ -1,69 +0,0 @@
1
- <!doctype html><html lang="en"><head><script>(function(){
2
- var needsPolyfill=(function(){
3
- try{
4
- if(typeof crypto==="undefined"||typeof crypto.randomUUID!=="function")return true;
5
- if(typeof Object.hasOwn!=="function")return true;
6
- if(typeof[].at!=="function")return true;
7
- if(typeof[].findLast!=="function")return true;
8
- return false;
9
- }catch(e){return true}
10
- })();
11
- if(needsPolyfill){
12
- document.write('<script src="https://lf3-static.bytednsdoc.com/obj/cdn/app_demo/v0.1/assets/polyfills.js"><\/script>');
13
- }
14
- })();</script><script>window.appId = (function () {
15
- var p = location.pathname.match(/\/app\/(app_[a-z0-9]+)/i);
16
- if (p) return p[1];
17
- var h = location.hostname.match(/app_[a-z0-9]+/i);
18
- return h ? h[0] : '';
19
- })();
20
- window.userId = '';
21
- window.tenantId = '';
22
- window.userName = '';
23
- window.csrfToken = (function () {
24
- var m = document.cookie.match(/(?:^|;\s*)suda-csrf-token=([^;]+)/);
25
- return m ? decodeURIComponent(m[1]) : '';
26
- })();
27
- window.ENVIRONMENT = (function () {
28
- var h = location.hostname;
29
- if (h.indexOf('boe') !== -1) return 'staging';
30
- if (h.indexOf('feishu-pre') !== -1 || h.indexOf('-pre.') !== -1) return 'gray';
31
- return 'online';
32
- })();</script><script>const slardarScript = document.createElement('script');
33
- slardarScript.src = 'https://lf3-short.ibytedapm.com/slardar/fe/sdk-web/browser.cn.js?bid=apaas_miaoda&globalName=KSlardarWeb';
34
- slardarScript.crossOrigin = 'anonymous';
35
- slardarScript.onload = function() {
36
- if (window.KSlardarWeb) {
37
- window.KSlardarWeb('context.merge', {
38
- tenantId: window.tenantId ?? '',
39
- appId: window.appId ?? '',
40
- });
41
- window.KSlardarWeb('init', {
42
- bid: 'apaas_miaoda',
43
- env: window.ENVIRONMENT || 'online',
44
- userId: window.userId ?? '',
45
- });
46
- window.KSlardarWeb('start');
47
- }
48
- };
49
- slardarScript.onerror = function() {
50
- console.warn('Failed to load Slardar script');
51
- };
52
- document.head.appendChild(slardarScript);</script><script src="https://sf3-scmcdn-cn.feishucdn.com/obj/unpkg/byted/performance/0.1.2/dist/performance.iife.js" crossorigin="anonymous" defer="defer"></script><script>(function (win, export_obj) {
53
- win['LogAnalyticsObject'] = export_obj;
54
- if (!win[export_obj]) {
55
- function _collect() { _collect.q.push(arguments); }
56
- _collect.q = _collect.q || [];
57
- win[export_obj] = _collect;
58
- }
59
- win[export_obj].l = +new Date();
60
- })(window, 'collectEvent');
61
-
62
- const teaScript = document.createElement('script');
63
- teaScript.src = 'https://lf3-cdn-tos.bytescm.com/obj/static/log-sdk/collect/5.1/collect.js';
64
- teaScript.crossOrigin = 'anonymous';
65
- teaScript.async = true;
66
- teaScript.onerror = function() {
67
- console.warn('Failed to load Tea script');
68
- };
69
- document.head.appendChild(teaScript);</script><meta charset="UTF-8"><link rel="icon" type="image/svg+xml" href="{{appAvatar}}"><meta name="viewport" content="width=device-width,initial-scale=1"><title>{{appName}}</title><link href="https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/feisuda.svg" rel="shortcut icon"><script type="module" crossorigin src="https://lf3-static.bytednsdoc.com/obj/cdn/app_demo/v0.1/assets/index-kNdDV1l7.js"></script><link rel="modulepreload" crossorigin href="https://lf3-static.bytednsdoc.com/obj/cdn/app_demo/v0.1/assets/rolldown-runtime-Cyuzqnbw.js"><link rel="modulepreload" crossorigin href="https://lf3-static.bytednsdoc.com/obj/cdn/app_demo/v0.1/assets/radix-CJb0azbR.js"><link rel="modulepreload" crossorigin href="https://lf3-static.bytednsdoc.com/obj/cdn/app_demo/v0.1/assets/toolkit-TzhP7hZD.js"><link rel="stylesheet" crossorigin href="https://lf3-static.bytednsdoc.com/obj/cdn/app_demo/v0.1/assets/index-BfPcZpFn.css"><meta property="og:title" content="{{appName}}"><meta property="og:description" content="{{appDescription}}"><meta property="og:image" content="{{appAvatar}}"><meta name="description" content="{{appDescription}}"></head><body><div id="root"></div></body></html>
@@ -1,5 +0,0 @@
1
- [
2
- {
3
- "path": "/app/demo/"
4
- }
5
- ]
@@ -1,5 +0,0 @@
1
- # shared/capabilities/
2
-
3
- Capabilities 声明目录。此处文件描述应用对外暴露的能力,由平台运行时消费。
4
-
5
- 具体 schema 与编写规范见 steering(`.agent/steering/`)。占位目录,按需添加。