@lark-apaas/coding-template-nestjs-react-fullstack 0.1.72-alpha.20261119161335 → 0.1.72-alpha.20261120120953

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-nestjs-react-fullstack",
3
- "version": "0.1.72-alpha.20261119161335",
3
+ "version": "0.1.72-alpha.20261120120953",
4
4
  "description": "NestJS + React fullstack template for miaoda coding",
5
5
  "type": "module",
6
6
  "files": [
@@ -8,8 +8,7 @@
8
8
  "name": "fullstack-nestjs-template",
9
9
  "version": "2.3.0",
10
10
  "dependencies": {
11
- "@lark-apaas/fullstack-nestjs-core": "^1.1.79",
12
- "@larksuiteoapi/node-sdk": "^1.76.0",
11
+ "@lark-apaas/fullstack-nestjs-core": "1.2.0-alpha.20261120083426",
13
12
  "@nestjs/axios": "^4.0.1",
14
13
  "@nestjs/cache-manager": "^3.1.3",
15
14
  "@nestjs/common": "^10.4.20",
@@ -33,8 +32,9 @@
33
32
  },
34
33
  "devDependencies": {
35
34
  "@hookform/resolvers": "^5.2.2",
36
- "@lark-apaas/client-toolkit": "^1.2.85",
35
+ "@lark-apaas/client-toolkit": "1.2.86-alpha.20261120083445",
37
36
  "@lark-apaas/coding-preset-vite-react": "^1.0.33",
37
+ "@lark-apaas/db-schema-sync": "0.1.24-alpha.20261120083447",
38
38
  "@lark-apaas/fullstack-presets": "^1.1.26",
39
39
  "@nestjs/cli": "^10.4.9",
40
40
  "@radix-ui/react-accordion": "^1.2.12",
@@ -1521,9 +1521,9 @@
1521
1521
  }
1522
1522
  },
1523
1523
  "node_modules/@lark-apaas/client-toolkit": {
1524
- "version": "1.2.85",
1525
- "resolved": "https://registry.npmmirror.com/@lark-apaas/client-toolkit/-/client-toolkit-1.2.85.tgz",
1526
- "integrity": "sha512-PQcfmaDOviZJ4dd6r82r7/BZ0i3Ky5dR94l6QUgjOk7bejocjkws6MqGlL/SSRQYjqWbcNKwojfG5HHKI8LhLQ==",
1524
+ "version": "1.2.86-alpha.20261120083445",
1525
+ "resolved": "https://registry.npmmirror.com/@lark-apaas/client-toolkit/-/client-toolkit-1.2.86-alpha.20261120083445.tgz",
1526
+ "integrity": "sha512-PYJTb57tMl+2NDggi+1m4EnjjDa8D858rrquY844pkpqcU5J/T1yhTKR5GF7AbE6eWzTcgRNW8oggfUoS2FDaQ==",
1527
1527
  "dev": true,
1528
1528
  "dependencies": {
1529
1529
  "@ant-design/colors": "^7.2.1",
@@ -1531,7 +1531,7 @@
1531
1531
  "@lark-apaas/aily-web-sdk": "^0.0.12",
1532
1532
  "@lark-apaas/auth-sdk": "^0.1.8",
1533
1533
  "@lark-apaas/client-capability": "^0.1.8",
1534
- "@lark-apaas/dataloom": "^0.1.6",
1534
+ "@lark-apaas/dataloom": "0.1.7-alpha.20261120083428",
1535
1535
  "@lark-apaas/internal-slardar": "^0.0.3",
1536
1536
  "@lark-apaas/miaoda-inspector": "^1.0.25",
1537
1537
  "@lark-apaas/observable-web": "^1.0.11",
@@ -1629,14 +1629,33 @@
1629
1629
  "license": "MIT"
1630
1630
  },
1631
1631
  "node_modules/@lark-apaas/dataloom": {
1632
- "version": "0.1.6",
1633
- "resolved": "https://registry.npmmirror.com/@lark-apaas/dataloom/-/dataloom-0.1.6.tgz",
1634
- "integrity": "sha512-NaMLYODTYlp4ziH1memTuEnARQhlbwMBm+MaWYT2Ue/3nf729i13hjkvxdmMTJq2qyWAnAhgEZvJ4Sccy+rmEQ==",
1632
+ "version": "0.1.7-alpha.20261120083428",
1633
+ "resolved": "https://registry.npmmirror.com/@lark-apaas/dataloom/-/dataloom-0.1.7-alpha.20261120083428.tgz",
1634
+ "integrity": "sha512-gE5GLdACEG41SbXe9S/u2TKi5HihE27KNtNI0klADDSXd4YCYuA4QTLq0iBgCN048Pl46JU2K1AAqHW2JuztvQ==",
1635
1635
  "dev": true,
1636
1636
  "dependencies": {
1637
1637
  "@lark-apaas/internal-slardar": "^0.0.3"
1638
1638
  }
1639
1639
  },
1640
+ "node_modules/@lark-apaas/db-schema-sync": {
1641
+ "version": "0.1.24-alpha.20261120083447",
1642
+ "resolved": "https://registry.npmmirror.com/@lark-apaas/db-schema-sync/-/db-schema-sync-0.1.24-alpha.20261120083447.tgz",
1643
+ "integrity": "sha512-Kok2bvUNP/oiliDp8zjwIm8/aXkhQnWiUE9WPML3lM9/CCHguIf8jwdkTihzbedGi/pBmC1StYUdHgp8s4r0UA==",
1644
+ "dev": true,
1645
+ "dependencies": {
1646
+ "@lark-apaas/http-client": "^0.1.9",
1647
+ "dotenv": "^17.3.1",
1648
+ "proper-lockfile": "^4.1.2",
1649
+ "tiny-pinyin": "^1.3.2"
1650
+ },
1651
+ "bin": {
1652
+ "db-schema-check": "dist/check-bin.js",
1653
+ "db-schema-sync": "dist/bin.js"
1654
+ },
1655
+ "engines": {
1656
+ "node": ">=18.0.0"
1657
+ }
1658
+ },
1640
1659
  "node_modules/@lark-apaas/file-service": {
1641
1660
  "version": "0.1.2",
1642
1661
  "resolved": "https://registry.npmmirror.com/@lark-apaas/file-service/-/file-service-0.1.2.tgz",
@@ -1647,9 +1666,9 @@
1647
1666
  }
1648
1667
  },
1649
1668
  "node_modules/@lark-apaas/fullstack-nestjs-core": {
1650
- "version": "1.1.79",
1651
- "resolved": "https://registry.npmmirror.com/@lark-apaas/fullstack-nestjs-core/-/fullstack-nestjs-core-1.1.79.tgz",
1652
- "integrity": "sha512-uivHPh3T19EVIRPXWgh7a4+Av+LinnwbH1S0PobmL/FQBOwYfm8qc4UtCwDKWqrAy9a17UCVYvEjc73/D2M5Bw==",
1669
+ "version": "1.2.0-alpha.20261120083426",
1670
+ "resolved": "https://registry.npmmirror.com/@lark-apaas/fullstack-nestjs-core/-/fullstack-nestjs-core-1.2.0-alpha.20261120083426.tgz",
1671
+ "integrity": "sha512-lv2pE3rfRSwanmu1WwfmlP191FDeemQf8su6b2QSOs//HfE18XjHv6D2MH8la+ixUNceIT6JreNSDr6DIrznHg==",
1653
1672
  "license": "MIT",
1654
1673
  "dependencies": {
1655
1674
  "@lark-apaas/cache-service": "^0.1.9",
@@ -1659,7 +1678,7 @@
1659
1678
  "@lark-apaas/nestjs-authzpaas": "^0.1.18",
1660
1679
  "@lark-apaas/nestjs-capability": "^0.1.17",
1661
1680
  "@lark-apaas/nestjs-common": "^0.1.11",
1662
- "@lark-apaas/nestjs-datapaas": "^1.0.30",
1681
+ "@lark-apaas/nestjs-datapaas": "1.0.31-alpha.20261120083443",
1663
1682
  "@lark-apaas/nestjs-http-forwarder": "^0.1.7",
1664
1683
  "@lark-apaas/nestjs-logger": "^1.0.25",
1665
1684
  "@lark-apaas/nestjs-mcp": "^0.1.4",
@@ -1837,9 +1856,9 @@
1837
1856
  }
1838
1857
  },
1839
1858
  "node_modules/@lark-apaas/nestjs-datapaas": {
1840
- "version": "1.0.30",
1841
- "resolved": "https://registry.npmmirror.com/@lark-apaas/nestjs-datapaas/-/nestjs-datapaas-1.0.30.tgz",
1842
- "integrity": "sha512-EpnzymJWG5djjunlj6UbP2j+rMjE5GfLkeiB8TD9IOiaZ09yIvxH8lcBO1FdMIx3XlhIUqXCV9AMY4QTSi6Swg==",
1859
+ "version": "1.0.31-alpha.20261120083443",
1860
+ "resolved": "https://registry.npmmirror.com/@lark-apaas/nestjs-datapaas/-/nestjs-datapaas-1.0.31-alpha.20261120083443.tgz",
1861
+ "integrity": "sha512-q/5yymNnFeNHgq6tzfGBT9ayIzVldIh+zkv1Mlee9lQaDpIITEVQlqHm6Wf4aGqMFQt6OF9gTqP2IGJjLgQohw==",
1843
1862
  "license": "MIT",
1844
1863
  "dependencies": {
1845
1864
  "@types/pg": "^8.10.9",
@@ -2014,21 +2033,6 @@
2014
2033
  "vite": "^6.0.0 || ^7.0.0 || ^8.0.0"
2015
2034
  }
2016
2035
  },
2017
- "node_modules/@larksuiteoapi/node-sdk": {
2018
- "version": "1.76.0",
2019
- "resolved": "https://registry.npmmirror.com/@larksuiteoapi/node-sdk/-/node-sdk-1.76.0.tgz",
2020
- "integrity": "sha512-v/bxQNCugwAmMPbZtBGJtSu8hdQLiB1/29Jr+GBIG18DyQ4LYyp7gxQ74pkhXVSuoUeH4v+/ZHAw/SW+KMrj2g==",
2021
- "license": "MIT",
2022
- "dependencies": {
2023
- "axios": "^1.16.0",
2024
- "lodash.identity": "^3.0.0",
2025
- "lodash.merge": "^4.6.2",
2026
- "lodash.pickby": "^4.6.0",
2027
- "protobufjs": "^7.2.6",
2028
- "qs": "^6.14.2",
2029
- "ws": "^8.19.0"
2030
- }
2031
- },
2032
2036
  "node_modules/@ljharb/through": {
2033
2037
  "version": "2.3.14",
2034
2038
  "resolved": "https://registry.npmmirror.com/@ljharb/through/-/through-2.3.14.tgz",
@@ -4028,63 +4032,6 @@
4028
4032
  "node": ">=14"
4029
4033
  }
4030
4034
  },
4031
- "node_modules/@protobufjs/aspromise": {
4032
- "version": "1.1.2",
4033
- "resolved": "https://registry.npmmirror.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
4034
- "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==",
4035
- "license": "BSD-3-Clause"
4036
- },
4037
- "node_modules/@protobufjs/base64": {
4038
- "version": "1.1.2",
4039
- "resolved": "https://registry.npmmirror.com/@protobufjs/base64/-/base64-1.1.2.tgz",
4040
- "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==",
4041
- "license": "BSD-3-Clause"
4042
- },
4043
- "node_modules/@protobufjs/codegen": {
4044
- "version": "2.0.5",
4045
- "resolved": "https://registry.npmmirror.com/@protobufjs/codegen/-/codegen-2.0.5.tgz",
4046
- "integrity": "sha512-zgXFLzW3Ap33e6d0Wlj4MGIm6Ce8O89n/apUaGNB/jx+hw+ruWEp7EwGUshdLKVRCxZW12fp9r40E1mQrf/34g==",
4047
- "license": "BSD-3-Clause"
4048
- },
4049
- "node_modules/@protobufjs/eventemitter": {
4050
- "version": "1.1.1",
4051
- "resolved": "https://registry.npmmirror.com/@protobufjs/eventemitter/-/eventemitter-1.1.1.tgz",
4052
- "integrity": "sha512-vW1GmwMZNnL+gMRaovlh9yZX74kc+TTU3FObkkurpMaRtBfLP3ldjS9KQWlwZgraRE0+dheEEoAxdzcJQ8eXZg==",
4053
- "license": "BSD-3-Clause"
4054
- },
4055
- "node_modules/@protobufjs/fetch": {
4056
- "version": "1.1.1",
4057
- "resolved": "https://registry.npmmirror.com/@protobufjs/fetch/-/fetch-1.1.1.tgz",
4058
- "integrity": "sha512-GpptLrs57adMSuHi3VNj0mAF8dwh36LMaYF6XyJ6JMWlVsc+t42tm1HSEDmOs3A8fC9yyeisgLhsTVQokOZ0zw==",
4059
- "license": "BSD-3-Clause",
4060
- "dependencies": {
4061
- "@protobufjs/aspromise": "^1.1.1"
4062
- }
4063
- },
4064
- "node_modules/@protobufjs/float": {
4065
- "version": "1.0.2",
4066
- "resolved": "https://registry.npmmirror.com/@protobufjs/float/-/float-1.0.2.tgz",
4067
- "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==",
4068
- "license": "BSD-3-Clause"
4069
- },
4070
- "node_modules/@protobufjs/path": {
4071
- "version": "1.1.2",
4072
- "resolved": "https://registry.npmmirror.com/@protobufjs/path/-/path-1.1.2.tgz",
4073
- "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==",
4074
- "license": "BSD-3-Clause"
4075
- },
4076
- "node_modules/@protobufjs/pool": {
4077
- "version": "1.1.0",
4078
- "resolved": "https://registry.npmmirror.com/@protobufjs/pool/-/pool-1.1.0.tgz",
4079
- "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==",
4080
- "license": "BSD-3-Clause"
4081
- },
4082
- "node_modules/@protobufjs/utf8": {
4083
- "version": "1.1.2",
4084
- "resolved": "https://registry.npmmirror.com/@protobufjs/utf8/-/utf8-1.1.2.tgz",
4085
- "integrity": "sha512-b1UQwcEZ4yCnMCD8DAL1VlbvBJE9/IX4FTIp7BG1xYpf29SLazLSrqUkj4w7Y5y7cCVP6E5tcqqcI0xemPkHug==",
4086
- "license": "BSD-3-Clause"
4087
- },
4088
4035
  "node_modules/@radix-ui/number": {
4089
4036
  "version": "1.1.3",
4090
4037
  "resolved": "https://registry.npmmirror.com/@radix-ui/number/-/number-1.1.3.tgz",
@@ -15427,12 +15374,6 @@
15427
15374
  "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==",
15428
15375
  "license": "MIT"
15429
15376
  },
15430
- "node_modules/lodash.identity": {
15431
- "version": "3.0.0",
15432
- "resolved": "https://registry.npmmirror.com/lodash.identity/-/lodash.identity-3.0.0.tgz",
15433
- "integrity": "sha512-AupTIzdLQxJS5wIYUQlgGyk2XRTfGXA+MCghDHqZk0pzUNYvd3EESS6dkChNauNYVIutcb0dfHw1ri9Q1yPV8Q==",
15434
- "license": "MIT"
15435
- },
15436
15377
  "node_modules/lodash.includes": {
15437
15378
  "version": "4.3.0",
15438
15379
  "resolved": "https://registry.npmmirror.com/lodash.includes/-/lodash.includes-4.3.0.tgz",
@@ -15473,6 +15414,7 @@
15473
15414
  "version": "4.6.2",
15474
15415
  "resolved": "https://registry.npmmirror.com/lodash.merge/-/lodash.merge-4.6.2.tgz",
15475
15416
  "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
15417
+ "dev": true,
15476
15418
  "license": "MIT"
15477
15419
  },
15478
15420
  "node_modules/lodash.once": {
@@ -15481,12 +15423,6 @@
15481
15423
  "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==",
15482
15424
  "license": "MIT"
15483
15425
  },
15484
- "node_modules/lodash.pickby": {
15485
- "version": "4.6.0",
15486
- "resolved": "https://registry.npmmirror.com/lodash.pickby/-/lodash.pickby-4.6.0.tgz",
15487
- "integrity": "sha512-AZV+GsS/6ckvPOVQPXSiFFacKvKB4kOQu6ynt9wz0F3LO4R9Ij4K1ddYsIytDpSgLz88JHd9P+oaLeej5/Sl7Q==",
15488
- "license": "MIT"
15489
- },
15490
15426
  "node_modules/lodash.truncate": {
15491
15427
  "version": "4.4.2",
15492
15428
  "resolved": "https://registry.npmmirror.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz",
@@ -15511,12 +15447,6 @@
15511
15447
  "url": "https://github.com/sponsors/sindresorhus"
15512
15448
  }
15513
15449
  },
15514
- "node_modules/long": {
15515
- "version": "5.3.2",
15516
- "resolved": "https://registry.npmmirror.com/long/-/long-5.3.2.tgz",
15517
- "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==",
15518
- "license": "Apache-2.0"
15519
- },
15520
15450
  "node_modules/longest-streak": {
15521
15451
  "version": "3.1.0",
15522
15452
  "resolved": "https://registry.npmmirror.com/longest-streak/-/longest-streak-3.1.0.tgz",
@@ -18193,6 +18123,18 @@
18193
18123
  "dev": true,
18194
18124
  "license": "MIT"
18195
18125
  },
18126
+ "node_modules/proper-lockfile": {
18127
+ "version": "4.1.2",
18128
+ "resolved": "https://registry.npmmirror.com/proper-lockfile/-/proper-lockfile-4.1.2.tgz",
18129
+ "integrity": "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==",
18130
+ "dev": true,
18131
+ "license": "MIT",
18132
+ "dependencies": {
18133
+ "graceful-fs": "^4.2.4",
18134
+ "retry": "^0.12.0",
18135
+ "signal-exit": "^3.0.2"
18136
+ }
18137
+ },
18196
18138
  "node_modules/property-information": {
18197
18139
  "version": "7.2.0",
18198
18140
  "resolved": "https://registry.npmmirror.com/property-information/-/property-information-7.2.0.tgz",
@@ -18204,29 +18146,6 @@
18204
18146
  "url": "https://github.com/sponsors/wooorm"
18205
18147
  }
18206
18148
  },
18207
- "node_modules/protobufjs": {
18208
- "version": "7.6.6",
18209
- "resolved": "https://registry.npmmirror.com/protobufjs/-/protobufjs-7.6.6.tgz",
18210
- "integrity": "sha512-dYDWdjSl5RNb7SgPxGQcRU+GtvP7s2fpkrY0r432PcOIaZ0/rBcxEZnQN67iJhFuQiVw754JDoPruPCNdGsbjg==",
18211
- "hasInstallScript": true,
18212
- "license": "BSD-3-Clause",
18213
- "dependencies": {
18214
- "@protobufjs/aspromise": "^1.1.2",
18215
- "@protobufjs/base64": "^1.1.2",
18216
- "@protobufjs/codegen": "^2.0.5",
18217
- "@protobufjs/eventemitter": "^1.1.1",
18218
- "@protobufjs/fetch": "^1.1.1",
18219
- "@protobufjs/float": "^1.0.2",
18220
- "@protobufjs/path": "^1.1.2",
18221
- "@protobufjs/pool": "^1.1.0",
18222
- "@protobufjs/utf8": "^1.1.1",
18223
- "@types/node": ">=13.7.0",
18224
- "long": "^5.3.2"
18225
- },
18226
- "engines": {
18227
- "node": ">=12.0.0"
18228
- }
18229
- },
18230
18149
  "node_modules/proxy-addr": {
18231
18150
  "version": "2.0.8",
18232
18151
  "resolved": "https://registry.npmmirror.com/proxy-addr/-/proxy-addr-2.0.8.tgz",
@@ -19441,6 +19360,16 @@
19441
19360
  "node": ">=8"
19442
19361
  }
19443
19362
  },
19363
+ "node_modules/retry": {
19364
+ "version": "0.12.0",
19365
+ "resolved": "https://registry.npmmirror.com/retry/-/retry-0.12.0.tgz",
19366
+ "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==",
19367
+ "dev": true,
19368
+ "license": "MIT",
19369
+ "engines": {
19370
+ "node": ">= 4"
19371
+ }
19372
+ },
19444
19373
  "node_modules/reusify": {
19445
19374
  "version": "1.1.0",
19446
19375
  "resolved": "https://registry.npmmirror.com/reusify/-/reusify-1.1.0.tgz",
@@ -21223,6 +21152,13 @@
21223
21152
  "dev": true,
21224
21153
  "license": "MIT"
21225
21154
  },
21155
+ "node_modules/tiny-pinyin": {
21156
+ "version": "1.3.2",
21157
+ "resolved": "https://registry.npmmirror.com/tiny-pinyin/-/tiny-pinyin-1.3.2.tgz",
21158
+ "integrity": "sha512-uHNGu4evFt/8eNLldazeAM1M8JrMc1jshhJJfVRARTN3yT8HEEibofeQ7QETWQ5ISBjd6fKtTVBCC/+mGS6FpA==",
21159
+ "dev": true,
21160
+ "license": "MIT"
21161
+ },
21226
21162
  "node_modules/tinyexec": {
21227
21163
  "version": "1.3.0",
21228
21164
  "resolved": "https://registry.npmmirror.com/tinyexec/-/tinyexec-1.3.0.tgz",
@@ -22688,27 +22624,6 @@
22688
22624
  "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
22689
22625
  "license": "ISC"
22690
22626
  },
22691
- "node_modules/ws": {
22692
- "version": "8.23.0",
22693
- "resolved": "https://registry.npmmirror.com/ws/-/ws-8.23.0.tgz",
22694
- "integrity": "sha512-wCkmX8QMOrKjgO8HW2WyDbTSGeqkocxgDzS9iR79rEAexty6/2qzilx3Ag8Tqf9ykop3irLKle0MtVn5qjVnoQ==",
22695
- "license": "MIT",
22696
- "engines": {
22697
- "node": ">=10.0.0"
22698
- },
22699
- "peerDependencies": {
22700
- "bufferutil": "^4.0.1",
22701
- "utf-8-validate": ">=5.0.2"
22702
- },
22703
- "peerDependenciesMeta": {
22704
- "bufferutil": {
22705
- "optional": true
22706
- },
22707
- "utf-8-validate": {
22708
- "optional": true
22709
- }
22710
- }
22711
- },
22712
22627
  "node_modules/wsl-utils": {
22713
22628
  "version": "0.1.0",
22714
22629
  "resolved": "https://registry.npmmirror.com/wsl-utils/-/wsl-utils-0.1.0.tgz",
@@ -11,7 +11,7 @@
11
11
  "dev": "./scripts/dev.sh",
12
12
  "dev:server": "NODE_ENV=development nest start --watch",
13
13
  "dev:client": "NODE_ENV=development vite --config vite.config.ts",
14
- "gen:db-schema": "npx -y @lark-apaas/db-schema-sync@latest --output server/database/schema.ts --export-custom-types",
14
+ "gen:db-schema": "FORCE_FRAMEWORK_CLI_CANARY_ENV=boe_miaoda_base npx -y @lark-apaas/db-schema-sync@0.1.24-alpha.20261120083447 --output server/database/schema.ts --export-custom-types",
15
15
  "gen:openapi": "echo 'UNSUPPORTED, SKIP'",
16
16
  "build": "./scripts/build.sh",
17
17
  "build:prod": "npm run build:server && npm run build:client",
@@ -28,8 +28,7 @@
28
28
  "upgrade": "npx -y @lark-apaas/fullstack-cli sync --disable-gen-openapi"
29
29
  },
30
30
  "dependencies": {
31
- "@lark-apaas/fullstack-nestjs-core": "^1.1.79",
32
- "@larksuiteoapi/node-sdk": "^1.76.0",
31
+ "@lark-apaas/fullstack-nestjs-core": "1.2.0-alpha.20261120083426",
33
32
  "@nestjs/axios": "^4.0.1",
34
33
  "@nestjs/cache-manager": "^3.1.3",
35
34
  "@nestjs/common": "^10.4.20",
@@ -52,8 +51,9 @@
52
51
  "tslib": "^2.8.1"
53
52
  },
54
53
  "devDependencies": {
54
+ "@lark-apaas/db-schema-sync": "0.1.24-alpha.20261120083447",
55
55
  "@hookform/resolvers": "^5.2.2",
56
- "@lark-apaas/client-toolkit": "^1.2.85",
56
+ "@lark-apaas/client-toolkit": "1.2.86-alpha.20261120083445",
57
57
  "@lark-apaas/coding-preset-vite-react": "^1.0.33",
58
58
  "@lark-apaas/fullstack-presets": "^1.1.26",
59
59
  "@nestjs/cli": "^10.4.9",
@@ -1,452 +0,0 @@
1
- import { HttpStatus, Logger } from '@nestjs/common';
2
- import * as lark from '@larksuiteoapi/node-sdk';
3
- import { Buffer } from 'node:buffer';
4
- import { createWriteStream } from 'node:fs';
5
- import { Readable } from 'node:stream';
6
- import { pipeline } from 'node:stream/promises';
7
- import { ResponseCode } from './constants/api_response_code';
8
- import { BusinessException } from './interfaces/exception.interface';
9
-
10
- export interface LarkCallContext {
11
- /** Use the actual SDK operation, e.g. minutes.v1.minuteTranscript.get. */
12
- operation: string;
13
- /** Original document/Wiki/Minutes URL, not a temporary download URL. */
14
- resourceUrl?: string;
15
- /** Necessary scopes for this operation, when already known. */
16
- requiredScopes?: readonly string[];
17
- }
18
-
19
- export interface LarkJsonResult {
20
- code?: number;
21
- msg?: string;
22
- request_id?: string;
23
- error?: { log_id?: string; permission_violations?: unknown };
24
- }
25
-
26
- export interface LarkFileResult {
27
- headers: unknown;
28
- writeFile(filePath: string): Promise<unknown>;
29
- getReadableStream(): Readable;
30
- }
31
-
32
- export type LarkFailureKind =
33
- | 'scope_missing'
34
- | 'resource_permission'
35
- | 'not_found'
36
- | 'deleted'
37
- | 'not_ready'
38
- | 'rate_limited'
39
- | 'configuration'
40
- | 'invalid_request'
41
- | 'upstream'
42
- | 'file_processing';
43
-
44
- interface FailureDetails {
45
- provider: 'lark_openapi';
46
- operation: string;
47
- kind: LarkFailureKind;
48
- larkCode?: number;
49
- larkHttpStatus?: number;
50
- requestId?: string;
51
- }
52
-
53
- /** Preserves the template's error.code / error.message / error.details contract. */
54
- export class LarkOpenApiException extends BusinessException {
55
- public readonly kind: LarkFailureKind;
56
- public readonly larkCode?: number;
57
- public readonly requestId?: string;
58
-
59
- constructor(
60
- code: ResponseCode,
61
- message: string,
62
- httpStatus: HttpStatus,
63
- details: FailureDetails,
64
- ) {
65
- super(code, message, httpStatus, JSON.stringify(details));
66
- this.name = 'LarkOpenApiException';
67
- this.kind = details.kind;
68
- this.larkCode = details.larkCode;
69
- this.requestId = details.requestId;
70
- }
71
- }
72
-
73
- let cachedClient:
74
- | {
75
- appId: string;
76
- appSecret: string;
77
- domain: lark.Domain | string;
78
- client: lark.Client;
79
- }
80
- | undefined;
81
-
82
- const logger = new Logger('LarkOpenAPI');
83
-
84
- function record(value: unknown): Record<string, unknown> | undefined {
85
- return typeof value === 'object' && value !== null
86
- ? (value as Record<string, unknown>)
87
- : undefined;
88
- }
89
-
90
- function configurationError(message: string): LarkOpenApiException {
91
- return new LarkOpenApiException(
92
- ResponseCode.SERVICE_UNAVAILABLE,
93
- message,
94
- HttpStatus.SERVICE_UNAVAILABLE,
95
- {
96
- provider: 'lark_openapi',
97
- operation: 'client.initialize',
98
- kind: 'configuration',
99
- },
100
- );
101
- }
102
-
103
- export function getLarkSdkDomain(): lark.Domain | string {
104
- const environment =
105
- process.env.FORCE_FRAMEWORK_ENVIRONMENT?.trim().toLowerCase();
106
- if (environment === 'boe') return 'https://open.feishu-boe.cn';
107
- if (environment === 'pre' || environment === 'online')
108
- return lark.Domain.Feishu;
109
- throw configurationError(
110
- '飞书集成部署环境尚未就绪,请应用开发者核对平台环境配置。',
111
- );
112
- }
113
-
114
- /** Call inside a business method. Importing this file never initializes credentials. */
115
- export function getLarkClient(): lark.Client {
116
- const domain = getLarkSdkDomain();
117
- const appId = process.env.LARK_APP_ID;
118
- const appSecret = process.env.LARK_APP_SECRET;
119
- if (!appId || !appSecret) {
120
- throw configurationError(
121
- '飞书集成配置尚未就绪,请核对应用绑定与环境同步。',
122
- );
123
- }
124
- if (
125
- cachedClient?.appId === appId &&
126
- cachedClient.appSecret === appSecret &&
127
- cachedClient.domain === domain
128
- ) {
129
- return cachedClient.client;
130
- }
131
- const client = new lark.Client({
132
- appId,
133
- appSecret,
134
- appType: lark.AppType.SelfBuild,
135
- domain,
136
- // SDK error formatting can include request configuration. Emit safe diagnostics below.
137
- logger: { trace() {}, debug() {}, info() {}, warn() {}, error() {} },
138
- });
139
- cachedClient = { appId, appSecret, domain, client };
140
- return client;
141
- }
142
-
143
- function header(headers: unknown, key: string): string | undefined {
144
- const value = record(headers)?.[key];
145
- return typeof value === 'string' && value.length <= 200 ? value : undefined;
146
- }
147
-
148
- function nativeCode(body: unknown): number | undefined {
149
- const value = record(body)?.code;
150
- if (typeof value === 'number' && Number.isSafeInteger(value)) return value;
151
- if (typeof value === 'string' && /^\d{1,10}$/.test(value))
152
- return Number(value);
153
- return undefined;
154
- }
155
-
156
- function parseJson(text: string): unknown {
157
- try {
158
- return JSON.parse(text);
159
- } catch {
160
- return undefined;
161
- }
162
- }
163
-
164
- /** Limits apply only to error bodies; successful transcript streams are not truncated. */
165
- async function errorBody(value: unknown): Promise<unknown> {
166
- const limit = 64 * 1024;
167
- if (typeof value === 'string') {
168
- return Buffer.byteLength(value) <= limit ? parseJson(value) : undefined;
169
- }
170
- if (Buffer.isBuffer(value)) {
171
- return value.length <= limit
172
- ? parseJson(value.toString('utf8'))
173
- : undefined;
174
- }
175
- if (!(value instanceof Readable)) return record(value);
176
- return new Promise((resolve) => {
177
- const chunks: Buffer[] = [];
178
- let bytes = 0;
179
- let finished = false;
180
- const finish = (body: unknown, destroy = false): void => {
181
- if (finished) return;
182
- finished = true;
183
- clearTimeout(timer);
184
- value.removeListener('data', onData);
185
- value.removeListener('end', onEnd);
186
- value.removeListener('error', onError);
187
- value.removeListener('close', onClose);
188
- if (destroy) value.destroy();
189
- resolve(body);
190
- };
191
- const onData = (chunk: unknown): void => {
192
- if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string')
193
- return finish(undefined, true);
194
- const buffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
195
- bytes += buffer.length;
196
- if (bytes > limit) return finish(undefined, true);
197
- chunks.push(buffer);
198
- };
199
- const onEnd = (): void =>
200
- finish(parseJson(Buffer.concat(chunks).toString('utf8')));
201
- const onError = (): void => finish(undefined, true);
202
- const onClose = (): void => finish(undefined);
203
- const timer = setTimeout(() => finish(undefined, true), 5000);
204
- value.on('data', onData);
205
- value.once('end', onEnd);
206
- value.once('error', onError);
207
- value.once('close', onClose);
208
- });
209
- }
210
-
211
- function resourceLink(context: LarkCallContext): string {
212
- if (!context.resourceUrl) return '';
213
- try {
214
- const url = new URL(context.resourceUrl);
215
- if (
216
- !['https:', 'http:'].includes(url.protocol) ||
217
- url.username ||
218
- url.password
219
- )
220
- return '';
221
- const href = url.href.replace(/[()<>]/g, (character: string) =>
222
- encodeURIComponent(character),
223
- );
224
- const label = context.operation.startsWith('minutes.')
225
- ? '打开妙记'
226
- : context.operation.startsWith('wiki.')
227
- ? '打开知识库节点'
228
- : '打开文档';
229
- return ` [${label}](${href})`;
230
- } catch {
231
- return '';
232
- }
233
- }
234
-
235
- function scopeLink(body: unknown, context: LarkCallContext): string {
236
- const violations = record(record(body)?.error)?.permission_violations;
237
- if (!Array.isArray(violations)) return '';
238
- const scopes = [
239
- ...new Set(
240
- violations.flatMap((item: unknown): string[] => {
241
- const violation = record(item);
242
- return violation?.type === 'action_scope_required' &&
243
- typeof violation.subject === 'string' &&
244
- /^[a-zA-Z0-9_:.-]+$/.test(violation.subject)
245
- ? [violation.subject]
246
- : [];
247
- }),
248
- ),
249
- ];
250
- if (!scopes.length) return '';
251
- const message = record(body)?.msg;
252
- const anyOf = typeof message === 'string' && /one of|任一/i.test(message);
253
- const known = context.requiredScopes?.filter((scope: string) =>
254
- scopes.includes(scope),
255
- );
256
- const preferred =
257
- context.operation === 'minutes.v1.minuteTranscript.get'
258
- ? 'minutes:minutes.transcript:export'
259
- : context.operation === 'minutes.v1.minute.get'
260
- ? 'minutes:minutes.basic:read'
261
- : context.operation.startsWith('docx.')
262
- ? 'docx:document:readonly'
263
- : context.operation === 'wiki.v2.space.getNode'
264
- ? 'wiki:wiki:readonly'
265
- : undefined;
266
- const selected = anyOf
267
- ? [
268
- (preferred && scopes.includes(preferred) ? preferred : undefined) ??
269
- known?.[0] ??
270
- scopes.find((scope: string) =>
271
- /:readonly$|\.basic:read$/.test(scope),
272
- ) ??
273
- scopes[0],
274
- ]
275
- : scopes;
276
- const appId = process.env.LARK_APP_ID;
277
- if (!appId || !/^cli_[a-zA-Z0-9]+$/.test(appId)) return '';
278
- const domain = getLarkSdkDomain();
279
- const base = typeof domain === 'string' ? domain : 'https://open.feishu.cn';
280
- return ` 请[申请飞书应用权限](${base}/app/${appId}/auth?q=${encodeURIComponent(selected.join(','))}&op_from=openapi),权限审批及发布生效后重试。`;
281
- }
282
-
283
- function failure(
284
- context: LarkCallContext,
285
- body?: unknown,
286
- httpStatus?: number,
287
- headers?: unknown,
288
- kindOverride?: LarkFailureKind,
289
- ): LarkOpenApiException {
290
- const code = nativeCode(body);
291
- const error = record(record(body)?.error);
292
- const id =
293
- record(body)?.request_id ?? error?.log_id ?? header(headers, 'x-tt-logid');
294
- const requestId = typeof id === 'string' && id.length <= 200 ? id : undefined;
295
- let kind: LarkFailureKind = kindOverride ?? 'upstream';
296
- let responseCode = ResponseCode.BAD_GATEWAY;
297
- let status = HttpStatus.BAD_GATEWAY;
298
- let message = '飞书调用失败,请应用开发者根据诊断信息排查。';
299
- if (kindOverride === 'file_processing') {
300
- responseCode = ResponseCode.INTERNAL_ERROR;
301
- status = HttpStatus.INTERNAL_SERVER_ERROR;
302
- message = '飞书文件读取或保存失败,请应用开发者排查文件处理过程。';
303
- } else if (code === 99991672) {
304
- kind = 'scope_missing';
305
- responseCode = ResponseCode.FORBIDDEN;
306
- status = HttpStatus.FORBIDDEN;
307
- message =
308
- '当前绑定飞书应用缺少本次调用所需的 API 权限。请该应用管理员处理权限配置。' +
309
- scopeLink(body, context);
310
- } else if (code === 1770032 || code === 131006 || code === 2091005) {
311
- kind = 'resource_permission';
312
- responseCode = ResponseCode.FORBIDDEN;
313
- status = HttpStatus.FORBIDDEN;
314
- if (code === 1770032) {
315
- message =
316
- '当前绑定飞书应用没有这份文档的阅读权限。请文档拥有者或管理者通过右上角“…”→“…更多”→“添加文档应用”为该应用授权。';
317
- } else if (code === 131006) {
318
- message =
319
- '当前绑定飞书应用没有该知识库节点或空间的访问权限。请知识库管理员或节点管理者为该应用授权所需节点范围。';
320
- } else if (context.operation === 'minutes.v1.minuteTranscript.get') {
321
- message =
322
- '当前绑定飞书应用无法导出这篇妙记的文字记录。请妙记拥有者或管理者确认资源访问范围与导出权限。';
323
- } else if (context.operation === 'minutes.v1.minute.get') {
324
- message =
325
- '当前绑定飞书应用无法读取这篇妙记的基本信息。请妙记拥有者或管理者确认资源阅读权限。';
326
- } else {
327
- message =
328
- '当前绑定飞书应用无权执行本次妙记操作。请妙记拥有者或管理者确认资源与操作权限。';
329
- }
330
- message += resourceLink(context);
331
- } else if ([1770002, 131005, 2091002].includes(code ?? -1)) {
332
- kind = 'not_found';
333
- responseCode = ResponseCode.NOT_FOUND;
334
- status = HttpStatus.NOT_FOUND;
335
- message =
336
- '无法找到指定飞书资源,请检查原始链接、资源标识及实际访问范围。' +
337
- resourceLink(context);
338
- } else if (code === 1770003 || code === 2091004) {
339
- kind = 'deleted';
340
- responseCode = ResponseCode.NOT_FOUND;
341
- status = HttpStatus.NOT_FOUND;
342
- message = '指定飞书资源已被删除,请确认原始资源。' + resourceLink(context);
343
- } else if (code === 2091003) {
344
- kind = 'not_ready';
345
- responseCode = ResponseCode.CONFLICT;
346
- status = HttpStatus.CONFLICT;
347
- message =
348
- '妙记文字记录尚未就绪,请等待转写完成后重试。' + resourceLink(context);
349
- } else if (code === 99991400 || httpStatus === 429) {
350
- kind = 'rate_limited';
351
- responseCode = ResponseCode.TOO_MANY_REQUESTS;
352
- status = HttpStatus.TOO_MANY_REQUESTS;
353
- message = '飞书请求达到频率限制,请稍后重试。';
354
- } else if (code === 10014 || code === 99991671) {
355
- kind = 'configuration';
356
- responseCode = ResponseCode.SERVICE_UNAVAILABLE;
357
- status = HttpStatus.SERVICE_UNAVAILABLE;
358
- message = '飞书调用身份配置未生效,请应用开发者核对绑定与平台环境。';
359
- } else if (code === 2091001 || httpStatus === 400) {
360
- kind = 'invalid_request';
361
- responseCode = ResponseCode.BAD_REQUEST;
362
- status = HttpStatus.BAD_REQUEST;
363
- message = '飞书请求参数有误,请应用开发者核对资源标识与本次操作的参数。';
364
- }
365
- const details: FailureDetails = {
366
- provider: 'lark_openapi',
367
- operation: context.operation,
368
- kind,
369
- larkCode: code,
370
- larkHttpStatus: httpStatus,
371
- requestId,
372
- };
373
- // Never serialize the original SDK error, credentials, request config or transcript.
374
- logger.warn(details);
375
- return new LarkOpenApiException(responseCode, message, status, details);
376
- }
377
-
378
- async function requestFailure(
379
- error: unknown,
380
- context: LarkCallContext,
381
- ): Promise<LarkOpenApiException> {
382
- const response = record(record(error)?.response);
383
- const body = await errorBody(response?.data ?? error);
384
- const status =
385
- typeof response?.status === 'number' ? response.status : undefined;
386
- return failure(context, body, status, response?.headers);
387
- }
388
-
389
- /** Checks the JSON business code as well as rejected HTTP requests; never retries writes. */
390
- export async function callLarkJson<T extends LarkJsonResult>(
391
- context: LarkCallContext,
392
- request: (client: lark.Client) => Promise<T>,
393
- ): Promise<T> {
394
- try {
395
- const result = await request(getLarkClient());
396
- if (result?.code !== 0) throw failure(context, result);
397
- return result;
398
- } catch (error: unknown) {
399
- if (error instanceof BusinessException) throw error;
400
- throw await requestFailure(error, context);
401
- }
402
- }
403
-
404
- /** Consume the successful download once; local consumption errors are not resource permissions. */
405
- export async function callLarkFile<T>(
406
- context: LarkCallContext,
407
- request: (client: lark.Client) => Promise<LarkFileResult>,
408
- consume: (file: LarkFileResult) => Promise<T>,
409
- ): Promise<T> {
410
- let file: LarkFileResult;
411
- try {
412
- file = await request(getLarkClient());
413
- if (
414
- typeof file?.getReadableStream !== 'function' ||
415
- typeof file.writeFile !== 'function'
416
- ) {
417
- throw failure(context, file);
418
- }
419
- if (header(file.headers, 'content-type')?.includes('application/json')) {
420
- throw failure(
421
- context,
422
- await errorBody(file.getReadableStream()),
423
- 200,
424
- file.headers,
425
- );
426
- }
427
- } catch (error: unknown) {
428
- if (error instanceof BusinessException) throw error;
429
- throw await requestFailure(error, context);
430
- }
431
- // Application validation/database errors belong to the caller and retain their contract.
432
- return consume({
433
- headers: file.headers,
434
- getReadableStream: () => file.getReadableStream(),
435
- // Only this file I/O boundary converts source-stream and destination-file failures.
436
- writeFile: async (filePath: string) => {
437
- try {
438
- await pipeline(file.getReadableStream(), createWriteStream(filePath));
439
- return filePath;
440
- } catch (error: unknown) {
441
- if (error instanceof BusinessException) throw error;
442
- throw failure(
443
- context,
444
- undefined,
445
- undefined,
446
- file.headers,
447
- 'file_processing',
448
- );
449
- }
450
- },
451
- });
452
- }