@lark-apaas/fullstack-cli 1.1.73-alpha.20261202064920 → 1.1.73-beta.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/dist/index.js CHANGED
@@ -1616,389 +1616,6 @@ function extractSyncedTableMap(tableView) {
1616
1616
  // src/commands/db/gen-nest-resource/generator.ts
1617
1617
  import { pluralize } from "inflection";
1618
1618
 
1619
- // src/locales/index.ts
1620
- import { createI18nForDev } from "@lark-apaas/miaoda-common-settings/i18n";
1621
-
1622
- // src/locales/messages.json
1623
- var messages_default = {
1624
- "apiError.noResponse": {
1625
- "zh-CN": "{message}: \u672A\u62FF\u5230\u54CD\u5E94\u5BF9\u8C61",
1626
- "en-US": "{message}: No response object received",
1627
- "ja-JP": "{message}: \u30EC\u30B9\u30DD\u30F3\u30B9\u304C\u3042\u308A\u307E\u305B\u3093\u3002"
1628
- },
1629
- "build.apiClient.callbackStaticFailed": {
1630
- "zh-CN": "callbackStatic \u8BF7\u6C42\u5931\u8D25",
1631
- "en-US": "callbackStatic request failed",
1632
- "ja-JP": "callbackStatic \u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002"
1633
- },
1634
- "build.apiClient.genArtifactUploadCredentialFailed": {
1635
- "zh-CN": "gen_artifact_upload_credential \u8BF7\u6C42\u5931\u8D25",
1636
- "en-US": "gen_artifact_upload_credential request failed",
1637
- "ja-JP": "gen_artifact_upload_credential \u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002"
1638
- },
1639
- "build.apiClient.getOrCreateStaticBucketBadStatus": {
1640
- "zh-CN": "getOrCreateStaticBucket \u8FD4\u56DE\u5F02\u5E38, status_code: {statusCode}{logId}",
1641
- "en-US": "getOrCreateStaticBucket returned an error, status_code: {statusCode}{logId}",
1642
- "ja-JP": "getOrCreateStaticBucket \u304C\u30A8\u30E9\u30FC\u3092\u8FD4\u3057\u307E\u3057\u305F\u3002status_code: {statusCode}{logId}"
1643
- },
1644
- "build.apiClient.getOrCreateStaticBucketFailed": {
1645
- "zh-CN": "getOrCreateStaticBucket \u8BF7\u6C42\u5931\u8D25",
1646
- "en-US": "getOrCreateStaticBucket request failed",
1647
- "ja-JP": "getOrCreateStaticBucket \u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002"
1648
- },
1649
- "build.apiClient.preUploadStaticFailed": {
1650
- "zh-CN": "preUploadStatic \u8BF7\u6C42\u5931\u8D25",
1651
- "en-US": "preUploadStatic request failed",
1652
- "ja-JP": "preUploadStatic \u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002"
1653
- },
1654
- "build.apiClient.staticBucketNotFound": {
1655
- "zh-CN": "\u672A\u627E\u5230\u5E94\u7528 {appId} \u7684\u9759\u6001\u8D44\u6E90\u5B58\u50A8\u6876{logId}",
1656
- "en-US": "Static asset bucket not found for app {appId}{logId}",
1657
- "ja-JP": "\u30A2\u30D7\u30EA {appId} \u306E\u9759\u7684\u30EA\u30BD\u30FC\u30B9\u7528\u30D0\u30B1\u30C3\u30C8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F{logId}"
1658
- },
1659
- "build.preUploadStatic.badStatus": {
1660
- "zh-CN": "{prefix} preUploadStatic \u8FD4\u56DE\u5F02\u5E38, status_code: {statusCode}",
1661
- "en-US": "{prefix} preUploadStatic returned an error, status_code: {statusCode}",
1662
- "ja-JP": "{prefix} preUploadStatic \u304C\u30A8\u30E9\u30FC\u3092\u8FD4\u3057\u307E\u3057\u305F\u3002status_code: {statusCode}"
1663
- },
1664
- "build.preUploadStatic.calling": {
1665
- "zh-CN": "{prefix} \u8C03\u7528 preUploadStatic...",
1666
- "en-US": "{prefix} Calling preUploadStatic...",
1667
- "ja-JP": "{prefix} preUploadStatic \u3092\u547C\u3073\u51FA\u3057\u3066\u3044\u307E\u3059..."
1668
- },
1669
- "build.preUploadStatic.envExported": {
1670
- "zh-CN": "{prefix} \u73AF\u5883\u53D8\u91CF\u5DF2\u8F93\u51FA",
1671
- "en-US": "{prefix} Environment variables exported",
1672
- "ja-JP": "{prefix} \u74B0\u5883\u5909\u6570\u3092\u51FA\u529B\u3057\u307E\u3057\u305F\u3002"
1673
- },
1674
- "build.preUploadStatic.incompleteCredentials": {
1675
- "zh-CN": "{prefix} preUploadStatic \u8FD4\u56DE\u7684\u51ED\u8BC1\u5B57\u6BB5\u4E0D\u5B8C\u6574",
1676
- "en-US": "{prefix} preUploadStatic returned incomplete credential fields",
1677
- "ja-JP": "{prefix} preUploadStatic \u306E\u5FDC\u7B54\u306B\u5FC5\u8981\u306A\u8A8D\u8A3C\u60C5\u5831\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u304C\u3042\u308A\u307E\u305B\u3093\u3002"
1678
- },
1679
- "build.preUploadStatic.incompleteData": {
1680
- "zh-CN": "{prefix} preUploadStatic \u8FD4\u56DE\u6570\u636E\u4E0D\u5B8C\u6574",
1681
- "en-US": "{prefix} preUploadStatic returned incomplete data",
1682
- "ja-JP": "{prefix} preUploadStatic \u306E\u5FDC\u7B54\u306B\u5FC5\u8981\u306A\u30C7\u30FC\u30BF\u304C\u3042\u308A\u307E\u305B\u3093\u3002"
1683
- },
1684
- "build.preUploadStatic.response": {
1685
- "zh-CN": "{prefix} preUploadStatic \u54CD\u5E94: {response}",
1686
- "en-US": "{prefix} preUploadStatic response: {response}",
1687
- "ja-JP": "{prefix} preUploadStatic \u306E\u30EC\u30B9\u30DD\u30F3\u30B9: {response}"
1688
- },
1689
- "build.uploadStatic.callingCallbackStatic": {
1690
- "zh-CN": "{prefix} \u8C03\u7528 callbackStatic (uploadID: {uploadId})...",
1691
- "en-US": "{prefix} Calling callbackStatic (uploadID: {uploadId})...",
1692
- "ja-JP": "{prefix} callbackStatic \u3092\u547C\u3073\u51FA\u3057\u3066\u3044\u307E\u3059\uFF08uploadID: {uploadId}\uFF09..."
1693
- },
1694
- "build.uploadStatic.configuringTosutil": {
1695
- "zh-CN": "{prefix} \u914D\u7F6E tosutil...",
1696
- "en-US": "{prefix} Configuring tosutil...",
1697
- "ja-JP": "{prefix} tosutil \u3092\u8A2D\u5B9A\u3057\u3066\u3044\u307E\u3059..."
1698
- },
1699
- "build.uploadStatic.defaultBucket": {
1700
- "zh-CN": "{prefix} \u9ED8\u8BA4\u5B58\u50A8\u6876: {bucketId}",
1701
- "en-US": "{prefix} Default bucket: {bucketId}",
1702
- "ja-JP": "{prefix} \u65E2\u5B9A\u306E\u30D0\u30B1\u30C3\u30C8: {bucketId}"
1703
- },
1704
- "build.uploadStatic.dirEmpty": {
1705
- "zh-CN": "{prefix} \u76EE\u5F55\u4E3A\u7A7A: {staticDir}\uFF0C\u8DF3\u8FC7\u4E0A\u4F20",
1706
- "en-US": "{prefix} Directory is empty: {staticDir}, skipping upload",
1707
- "ja-JP": "{prefix} \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u7A7A\u306E\u305F\u3081\u3001\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u307E\u3059: {staticDir}"
1708
- },
1709
- "build.uploadStatic.dirNotFound": {
1710
- "zh-CN": "{prefix} \u76EE\u5F55\u4E0D\u5B58\u5728: {staticDir}\uFF0C\u8DF3\u8FC7\u4E0A\u4F20",
1711
- "en-US": "{prefix} Directory not found: {staticDir}, skipping upload",
1712
- "ja-JP": "{prefix} \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u898B\u3064\u304B\u3089\u306A\u3044\u305F\u3081\u3001\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u307E\u3059: {staticDir}"
1713
- },
1714
- "build.uploadStatic.done": {
1715
- "zh-CN": "{prefix} \u4E0A\u4F20\u5B8C\u6210\uFF0C\u5171 {count} \u4E2A\u6587\u4EF6",
1716
- "en-US": "{prefix} Upload complete. Files uploaded: {count}",
1717
- "ja-JP": "{prefix} \u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u304C\u5B8C\u4E86\u3057\u307E\u3057\u305F\u3002\u30D5\u30A1\u30A4\u30EB\u6570: {count}"
1718
- },
1719
- "build.uploadStatic.envMissingCallPreUpload": {
1720
- "zh-CN": "{prefix} \u73AF\u5883\u53D8\u91CF\u672A\u8BBE\u7F6E\uFF0C\u8C03\u7528 preUploadStatic...",
1721
- "en-US": "{prefix} Environment variables not set, calling preUploadStatic...",
1722
- "ja-JP": "{prefix} \u74B0\u5883\u5909\u6570\u304C\u672A\u8A2D\u5B9A\u306E\u305F\u3081\u3001preUploadStatic \u3092\u547C\u3073\u51FA\u3057\u307E\u3059..."
1723
- },
1724
- "build.uploadStatic.error.callbackStaticBadStatus": {
1725
- "zh-CN": "callbackStatic \u8FD4\u56DE\u5F02\u5E38, status_code: {statusCode}, response: {response}",
1726
- "en-US": "callbackStatic returned an error, status_code: {statusCode}, response: {response}",
1727
- "ja-JP": "callbackStatic \u304C\u7570\u5E38\u306A\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u8FD4\u3057\u307E\u3057\u305F\u3002status_code: {statusCode}\u3001response: {response}"
1728
- },
1729
- "build.uploadStatic.error.preUploadStaticBadStatus": {
1730
- "zh-CN": "preUploadStatic \u8FD4\u56DE\u5F02\u5E38, status_code: {statusCode}, response: {response}",
1731
- "en-US": "preUploadStatic returned an error, status_code: {statusCode}, response: {response}",
1732
- "ja-JP": "preUploadStatic \u304C\u30A8\u30E9\u30FC\u3092\u8FD4\u3057\u307E\u3057\u305F\u3002status_code: {statusCode}\u3001response: {response}"
1733
- },
1734
- "build.uploadStatic.error.preUploadStaticIncomplete": {
1735
- "zh-CN": "preUploadStatic \u8FD4\u56DE\u6570\u636E\u4E0D\u5B8C\u6574\uFF0C\u7F3A\u5C11 uploadPrefix \u6216 uploadID, response: {response}",
1736
- "en-US": "preUploadStatic returned incomplete data: uploadPrefix or uploadID is missing. Response: {response}",
1737
- "ja-JP": "preUploadStatic \u306E\u5FDC\u7B54\u306B uploadPrefix \u307E\u305F\u306F uploadID \u304C\u3042\u308A\u307E\u305B\u3093\u3002response: {response}"
1738
- },
1739
- "build.uploadStatic.error.preUploadStaticIncompleteCredentials": {
1740
- "zh-CN": "preUploadStatic \u8FD4\u56DE\u7684\u51ED\u8BC1\u5B57\u6BB5\u4E0D\u5B8C\u6574, response: {response}",
1741
- "en-US": "preUploadStatic returned incomplete credential fields, response: {response}",
1742
- "ja-JP": "preUploadStatic \u306E\u5FDC\u7B54\u306B\u5FC5\u8981\u306A\u8A8D\u8A3C\u60C5\u5831\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u304C\u3042\u308A\u307E\u305B\u3093\u3002response: {response}"
1743
- },
1744
- "build.uploadStatic.error.tosutilInstallHint": {
1745
- "zh-CN": "\u8BF7\u786E\u4FDD tosutil \u5DF2\u5B89\u88C5\u5728\u7CFB\u7EDF PATH \u4E2D\u6216\u901A\u8FC7 --tosutil-path \u6307\u5B9A\u8DEF\u5F84\u3002",
1746
- "en-US": "Make sure tosutil is installed in your PATH or specify its path with --tosutil-path.",
1747
- "ja-JP": "tosutil \u304C PATH \u306B\u542B\u307E\u308C\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3059\u308B\u304B\u3001--tosutil-path \u3067\u30D1\u30B9\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002"
1748
- },
1749
- "build.uploadStatic.error.tosutilNotFound": {
1750
- "zh-CN": "tosutil \u4E0D\u5B58\u5728: {path}\u3002",
1751
- "en-US": "tosutil not found: {path}. ",
1752
- "ja-JP": "tosutil \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {path}\u3002"
1753
- },
1754
- "build.uploadStatic.fetchingDefaultBucket": {
1755
- "zh-CN": "{prefix} \u83B7\u53D6\u9ED8\u8BA4\u5B58\u50A8\u6876...",
1756
- "en-US": "{prefix} Fetching default bucket...",
1757
- "ja-JP": "{prefix} \u65E2\u5B9A\u306E\u30D0\u30B1\u30C3\u30C8\u3092\u53D6\u5F97\u3057\u3066\u3044\u307E\u3059..."
1758
- },
1759
- "build.uploadStatic.target": {
1760
- "zh-CN": "{prefix} \u4E0A\u4F20\u76EE\u6807: {uploadPrefix}",
1761
- "en-US": "{prefix} Upload target: {uploadPrefix}",
1762
- "ja-JP": "{prefix} \u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u5148: {uploadPrefix}"
1763
- },
1764
- "build.uploadStatic.tosutilDone": {
1765
- "zh-CN": "{prefix} tosutil \u4E0A\u4F20\u5B8C\u6210",
1766
- "en-US": "{prefix} tosutil upload complete",
1767
- "ja-JP": "{prefix} tosutil \u306E\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u304C\u5B8C\u4E86\u3057\u307E\u3057\u305F\u3002"
1768
- },
1769
- "build.uploadStatic.uploading": {
1770
- "zh-CN": "{prefix} \u4E0A\u4F20 {staticDir} -> {uploadPrefix}",
1771
- "en-US": "{prefix} Uploading {staticDir} -> {uploadPrefix}",
1772
- "ja-JP": "{prefix} \u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u4E2D: {staticDir} \u2192 {uploadPrefix}"
1773
- },
1774
- "build.uploadStatic.useEnvCredentials": {
1775
- "zh-CN": "{prefix} \u4F7F\u7528\u73AF\u5883\u53D8\u91CF\u4E2D\u7684\u4E0A\u4F20\u51ED\u8BC1",
1776
- "en-US": "{prefix} Using upload credentials from environment variables",
1777
- "ja-JP": "{prefix} \u74B0\u5883\u5909\u6570\u306E\u8A8D\u8A3C\u60C5\u5831\u3092\u4F7F\u7528\u3057\u3066\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002"
1778
- },
1779
- "component.add.argument.component": {
1780
- "zh-CN": "\u7EC4\u4EF6 ID (\u4F8B\u5982 @miaoda/button)",
1781
- "en-US": "Component ID (e.g. @miaoda/button)",
1782
- "ja-JP": "\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8 ID\uFF08\u4F8B: @miaoda/button\uFF09"
1783
- },
1784
- "component.add.debug.actionPluginInitFailed": {
1785
- "zh-CN": "action-plugin init \u5931\u8D25: %s",
1786
- "en-US": "action-plugin init failed: %s",
1787
- "ja-JP": "action-plugin init \u306B\u5931\u6557\u3057\u307E\u3057\u305F: %s"
1788
- },
1789
- "component.add.debug.installStart": {
1790
- "zh-CN": "\u5F00\u59CB\u5B89\u88C5\u7EC4\u4EF6: %s",
1791
- "en-US": "Installing component: %s",
1792
- "ja-JP": "\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3092\u958B\u59CB\u3057\u307E\u3059: %s"
1793
- },
1794
- "component.add.debug.preparingRegistryItems": {
1795
- "zh-CN": "\u51C6\u5907 registry items...",
1796
- "en-US": "Preparing registry items...",
1797
- "ja-JP": "\u30EC\u30B8\u30B9\u30C8\u30EA\u30A2\u30A4\u30C6\u30E0\u3092\u6E96\u5099\u3057\u3066\u3044\u307E\u3059..."
1798
- },
1799
- "component.add.debug.registryItemFetched": {
1800
- "zh-CN": "\u83B7\u53D6\u5230 registry item: %o",
1801
- "en-US": "Fetched registry item: %o",
1802
- "ja-JP": "\u53D6\u5F97\u3057\u305F\u30EC\u30B8\u30B9\u30C8\u30EA\u30A2\u30A4\u30C6\u30E0: %o"
1803
- },
1804
- "component.add.debug.registryItemPath": {
1805
- "zh-CN": "registry item \u8DEF\u5F84: %s",
1806
- "en-US": "Registry item path: %s",
1807
- "ja-JP": "\u30EC\u30B8\u30B9\u30C8\u30EA\u30A2\u30A4\u30C6\u30E0\u306E\u30D1\u30B9: %s"
1808
- },
1809
- "component.add.debug.runningShadcn": {
1810
- "zh-CN": "\u6267\u884C shadcn add...",
1811
- "en-US": "Running shadcn add...",
1812
- "ja-JP": "shadcn add \u3092\u5B9F\u884C\u3057\u3066\u3044\u307E\u3059..."
1813
- },
1814
- "component.add.debug.shadcnResult": {
1815
- "zh-CN": "shadcn \u6267\u884C\u7ED3\u679C: %o",
1816
- "en-US": "shadcn result: %o",
1817
- "ja-JP": "shadcn \u306E\u5B9F\u884C\u7D50\u679C: %o"
1818
- },
1819
- "component.add.description": {
1820
- "zh-CN": "\u5B89\u88C5\u5999\u642D\u7EC4\u4EF6\u5E02\u573A\u4E2D\u7684\u7EC4\u4EF6",
1821
- "en-US": "Install a component from the Spark component marketplace",
1822
- "ja-JP": "Spark \u306E\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u30DE\u30FC\u30B1\u30C3\u30C8\u304B\u3089\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3057\u307E\u3059\u3002"
1823
- },
1824
- "component.add.error.unknown": {
1825
- "zh-CN": "\u5B89\u88C5\u5931\u8D25\uFF0C\u672A\u77E5\u539F\u56E0",
1826
- "en-US": "Installation failed for an unknown reason",
1827
- "ja-JP": "\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3001\u539F\u56E0\u4E0D\u660E"
1828
- },
1829
- "component.add.error.unknownReason": {
1830
- "zh-CN": "\u5B89\u88C5\u5931\u8D25\uFF0C\u539F\u56E0\u672A\u77E5",
1831
- "en-US": "Installation failed for an unknown reason",
1832
- "ja-JP": "\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u539F\u56E0\u306F\u4E0D\u660E\u3067\u3059"
1833
- },
1834
- "component.description": {
1835
- "zh-CN": "\u7EC4\u4EF6\u76F8\u5173\u547D\u4EE4",
1836
- "en-US": "Component commands",
1837
- "ja-JP": "\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u95A2\u9023\u306E\u30B3\u30DE\u30F3\u30C9"
1838
- },
1839
- "component.registry.debug.componentInfo": {
1840
- "zh-CN": "\u7EC4\u4EF6\u4FE1\u606F: %o",
1841
- "en-US": "Component info: %o",
1842
- "ja-JP": "\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u60C5\u5831: %o"
1843
- },
1844
- "component.registry.debug.dependencies": {
1845
- "zh-CN": "\u4F9D\u8D56\u5217\u8868: %o",
1846
- "en-US": "Dependencies: %o",
1847
- "ja-JP": "\u4F9D\u5B58\u95A2\u4FC2\u306E\u4E00\u89A7: %o"
1848
- },
1849
- "component.registry.debug.downloadingItem": {
1850
- "zh-CN": "\u4E0B\u8F7D registry item: %s",
1851
- "en-US": "Downloading registry item: %s",
1852
- "ja-JP": "\u30EC\u30B8\u30B9\u30C8\u30EA\u30A2\u30A4\u30C6\u30E0\u3092\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9:%s"
1853
- },
1854
- "component.registry.debug.fetchingDownloadInfo": {
1855
- "zh-CN": "\u83B7\u53D6\u7EC4\u4EF6\u4E0B\u8F7D\u4FE1\u606F...",
1856
- "en-US": "Fetching component download info...",
1857
- "ja-JP": "\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u60C5\u5831\u3092\u53D6\u5F97\u3057\u3066\u3044\u307E\u3059..."
1858
- },
1859
- "component.registry.debug.itemContent": {
1860
- "zh-CN": "registry item \u5185\u5BB9: %o",
1861
- "en-US": "Registry item content: %o",
1862
- "ja-JP": "\u30EC\u30B8\u30B9\u30C8\u30EA\u30A2\u30A4\u30C6\u30E0\u306E\u5185\u5BB9: %o"
1863
- },
1864
- "component.registry.debug.processing": {
1865
- "zh-CN": "\u5904\u7406\u7EC4\u4EF6: %s",
1866
- "en-US": "Processing component: %s",
1867
- "ja-JP": "\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u51E6\u7406\u3057\u3066\u3044\u307E\u3059: %s"
1868
- },
1869
- "component.registry.debug.savedTo": {
1870
- "zh-CN": "\u4FDD\u5B58\u5230: %s",
1871
- "en-US": "Saved to: %s",
1872
- "ja-JP": "\u4FDD\u5B58\u5148: %s"
1873
- },
1874
- "component.registry.debug.skipProcessed": {
1875
- "zh-CN": "\u8DF3\u8FC7\u5DF2\u5904\u7406\u7684\u7EC4\u4EF6: %s",
1876
- "en-US": "Skipping already processed component: %s",
1877
- "ja-JP": "\u51E6\u7406\u6E08\u307F\u306E\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u307E\u3059: %s"
1878
- },
1879
- "component.service.debug.apiError": {
1880
- "zh-CN": "\u63A5\u53E3\u8FD4\u56DE\u9519\u8BEF\uFF1A%o",
1881
- "en-US": "API returned an error: %o",
1882
- "ja-JP": "API \u304C\u30A8\u30E9\u30FC\u3092\u8FD4\u3057\u307E\u3057\u305F: %o"
1883
- },
1884
- "component.service.debug.callingBatchGet": {
1885
- "zh-CN": "\u8C03\u7528 /components/batch_get %o",
1886
- "en-US": "Calling /components/batch_get %o",
1887
- "ja-JP": "/components/batch_get \u3092\u547C\u3073\u51FA\u3057\u307E\u3059: %o"
1888
- },
1889
- "component.service.debug.downloadingRegistryItem": {
1890
- "zh-CN": "\u4E0B\u8F7D registry-item.json\uFF1A%s",
1891
- "en-US": "Downloading registry-item.json: %s",
1892
- "ja-JP": "registry-item.json \u3092\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u3057\u3066\u3044\u307E\u3059: %s"
1893
- },
1894
- "component.service.error.downloadRegistryItemFailed": {
1895
- "zh-CN": "\u4E0B\u8F7D registry-item.json \u5931\u8D25",
1896
- "en-US": "Failed to download registry-item.json",
1897
- "ja-JP": "registry-item.json \u306E\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002"
1898
- },
1899
- "component.service.error.fetchInfoFailed": {
1900
- "zh-CN": "\u83B7\u53D6\u7EC4\u4EF6\u4FE1\u606F\u5931\u8D25",
1901
- "en-US": "Failed to fetch component info",
1902
- "ja-JP": "\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u60C5\u5831\u306E\u53D6\u5F97\u306B\u5931\u6557\u3057\u307E\u3057\u305F"
1903
- },
1904
- "component.service.error.fetchInfoFailedWithMsg": {
1905
- "zh-CN": "\u83B7\u53D6\u7EC4\u4EF6\u4FE1\u606F\u5931\u8D25\uFF1A{errorMsg}{logId}",
1906
- "en-US": "Failed to fetch component information: {errorMsg}{logId}",
1907
- "ja-JP": "\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u60C5\u5831\u306E\u53D6\u5F97\u306B\u5931\u6557\u3057\u307E\u3057\u305F: {errorMsg}{logId}"
1908
- },
1909
- "component.service.error.reportInstallEventFailed": {
1910
- "zh-CN": "\u4E0A\u62A5\u7EC4\u4EF6\u5B89\u88C5\u4E8B\u4EF6\u5931\u8D25",
1911
- "en-US": "Failed to report component installation event",
1912
- "ja-JP": "\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u30A4\u30D9\u30F3\u30C8\u306E\u5831\u544A\u306B\u5931\u6557\u3057\u307E\u3057\u305F"
1913
- },
1914
- "component.shadcn.error.timeout": {
1915
- "zh-CN": "\u6267\u884C\u8D85\u65F6",
1916
- "en-US": "Execution timed out",
1917
- "ja-JP": "\u5B9F\u884C\u304C\u30BF\u30A4\u30E0\u30A2\u30A6\u30C8\u3057\u307E\u3057\u305F\u3002"
1918
- },
1919
- "genNestResource.api.create.success": {
1920
- "zh-CN": "\u6210\u529F\u521B\u5EFA\u4E00\u6761\u8BB0\u5F55",
1921
- "en-US": "Successfully created a record",
1922
- "ja-JP": "\u30EC\u30B3\u30FC\u30C9\u306E\u4F5C\u6210\u306B\u6210\u529F\u3057\u307E\u3057\u305F"
1923
- },
1924
- "genNestResource.api.create.summary": {
1925
- "zh-CN": "\u521B\u5EFA\u4E00\u6761\u8BB0\u5F55\uFF08\u6A21\u677F\u5185\u5BB9\uFF0C\u8BF7\u4FEE\u6539\u6211\uFF09",
1926
- "en-US": "Create a record (customize this template description)",
1927
- "ja-JP": "\u30EC\u30B3\u30FC\u30C9\u3092\u4F5C\u6210\u3059\u308B\uFF08\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306E\u8AAC\u660E\u6587\u3067\u3059\u3002\u7528\u9014\u306B\u5408\u308F\u305B\u3066\u7DE8\u96C6\u3057\u3066\u304F\u3060\u3055\u3044\uFF09"
1928
- },
1929
- "genNestResource.api.findOne.success": {
1930
- "zh-CN": "\u6210\u529F\u67E5\u8BE2\u4E00\u6761\u8BB0\u5F55",
1931
- "en-US": "Record retrieved successfully",
1932
- "ja-JP": "\u30EC\u30B3\u30FC\u30C9\u306E\u30AF\u30A8\u30EA\u306B\u6210\u529F\u3057\u307E\u3057\u305F"
1933
- },
1934
- "genNestResource.api.findOne.summary": {
1935
- "zh-CN": "\u6839\u636E\u4E3B\u952E\u67E5\u8BE2\u4E00\u6761\u8BB0\u5F55\uFF08\u6A21\u677F\u5185\u5BB9\uFF0C\u8BF7\u4FEE\u6539\u6211\uFF09",
1936
- "en-US": "Get a record by primary key (customize this template description)",
1937
- "ja-JP": "\u4E3B\u30AD\u30FC\u3067\u30EC\u30B3\u30FC\u30C9\u3092\u53D6\u5F97\u3059\u308B\uFF08\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306E\u8AAC\u660E\u6587\u3067\u3059\u3002\u7528\u9014\u306B\u5408\u308F\u305B\u3066\u7DE8\u96C6\u3057\u3066\u304F\u3060\u3055\u3044\uFF09"
1938
- },
1939
- "genNestResource.api.remove.success": {
1940
- "zh-CN": "\u6210\u529F\u5220\u9664\u4E00\u6761\u8BB0\u5F55",
1941
- "en-US": "Successfully deleted a record",
1942
- "ja-JP": "\u30EC\u30B3\u30FC\u30C9\u306E\u524A\u9664\u306B\u6210\u529F\u3057\u307E\u3057\u305F"
1943
- },
1944
- "genNestResource.api.remove.summary": {
1945
- "zh-CN": "\u6839\u636E\u4E3B\u952E\u5220\u9664\u4E00\u6761\u8BB0\u5F55\uFF08\u6A21\u677F\u5185\u5BB9\uFF0C\u8BF7\u4FEE\u6539\u6211\uFF09",
1946
- "en-US": "Delete a record by primary key (customize this template description)",
1947
- "ja-JP": "\u4E3B\u30AD\u30FC\u3067\u30EC\u30B3\u30FC\u30C9\u3092\u524A\u9664\u3059\u308B\uFF08\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306E\u8AAC\u660E\u6587\u3067\u3059\u3002\u7528\u9014\u306B\u5408\u308F\u305B\u3066\u7DE8\u96C6\u3057\u3066\u304F\u3060\u3055\u3044\uFF09"
1948
- },
1949
- "genNestResource.api.update.success": {
1950
- "zh-CN": "\u6210\u529F\u66F4\u65B0\u4E00\u6761\u8BB0\u5F55",
1951
- "en-US": "A record was successfully updated",
1952
- "ja-JP": "\u30EC\u30B3\u30FC\u30C9\u306E\u66F4\u65B0\u306B\u6210\u529F\u3057\u307E\u3057\u305F"
1953
- },
1954
- "genNestResource.api.update.summary": {
1955
- "zh-CN": "\u6839\u636E\u4E3B\u952E\u66F4\u65B0\u4E00\u6761\u8BB0\u5F55\uFF08\u6A21\u677F\u5185\u5BB9\uFF0C\u8BF7\u4FEE\u6539\u6211\uFF09",
1956
- "en-US": "Update a record by primary key (customize this template description)",
1957
- "ja-JP": "\u4E3B\u30AD\u30FC\u3067\u30EC\u30B3\u30FC\u30C9\u3092\u66F4\u65B0\u3059\u308B\uFF08\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306E\u8AAC\u660E\u6587\u3067\u3059\u3002\u7528\u9014\u306B\u5408\u308F\u305B\u3066\u7DE8\u96C6\u3057\u3066\u304F\u3060\u3055\u3044\uFF09"
1958
- },
1959
- "genNestResource.dto.decoratorHint": {
1960
- "zh-CN": "\u8BF7\u6309\u7528\u6237\u9700\u6C42\u4FEE\u6539\u4EE5\u4E0B\u88C5\u9970\u5668\u6CE8\u91CA",
1961
- "en-US": "Update the following decorator annotations to match your requirements.",
1962
- "ja-JP": "\u4EE5\u4E0B\u306E\u30C7\u30B3\u30EC\u30FC\u30BF\u30FC\u306E\u6CE8\u91C8\u3092\u8981\u4EF6\u306B\u5408\u308F\u305B\u3066\u7DE8\u96C6\u3057\u3066\u304F\u3060\u3055\u3044\u3002"
1963
- },
1964
- "genNestResource.dto.modifyHint": {
1965
- "zh-CN": "\u8BF7\u4FEE\u6539\u8BE5\u6587\u4EF6\u4EE3\u7801\u4EE5\u6EE1\u8DB3\u9700\u6C42",
1966
- "en-US": "Please modify the file code to meet the requirements",
1967
- "ja-JP": "\u3053\u306E\u30D5\u30A1\u30A4\u30EB\u306E\u30B3\u30FC\u30C9\u3092\u8981\u4EF6\u306B\u5408\u308F\u305B\u3066\u7DE8\u96C6\u3057\u3066\u304F\u3060\u3055\u3044\u3002"
1968
- },
1969
- "genNestResource.generateFailed": {
1970
- "zh-CN": "\u751F\u6210 Nest.js {path} \u6A21\u5757\u5931\u8D25: {message}",
1971
- "en-US": "Failed to generate Nest.js module {path}: {message}",
1972
- "ja-JP": "Nest.js \u30E2\u30B8\u30E5\u30FC\u30EB {path} \u306E\u751F\u6210\u306B\u5931\u6557\u3057\u307E\u3057\u305F: {message}"
1973
- },
1974
- "genNestResource.generatingModule": {
1975
- "zh-CN": "\u751F\u6210 Nest.js {name} \u6A21\u5757",
1976
- "en-US": "Generating Nest.js {name} module",
1977
- "ja-JP": "Nest.js \u30E2\u30B8\u30E5\u30FC\u30EB {name} \u3092\u751F\u6210\u3057\u3066\u3044\u307E\u3059"
1978
- },
1979
- "genNestResource.moduleExists": {
1980
- "zh-CN": "Nest.js \u6A21\u5757 {path} \u5DF2\u5B58\u5728\uFF0C\u8DF3\u8FC7\u751F\u6210\u4EE3\u7801",
1981
- "en-US": "Nest.js module {path} already exists, skipping code generation",
1982
- "ja-JP": "Nest.js \u30E2\u30B8\u30E5\u30FC\u30EB {path} \u306F\u3059\u3067\u306B\u5B58\u5728\u3059\u308B\u305F\u3081\u3001\u30B3\u30FC\u30C9\u751F\u6210\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u307E\u3059\u3002"
1983
- },
1984
- "genNestResource.noTables": {
1985
- "zh-CN": "\u672A\u89E3\u6790\u5230\u4EFB\u4F55\u6570\u636E\u5E93\u8868\uFF0C\u65E0\u9700\u751F\u6210 Nest.js \u6A21\u5757\u6A21\u677F",
1986
- "en-US": "No database tables found, skipping Nest.js module template generation",
1987
- "ja-JP": "\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u306E\u30C6\u30FC\u30D6\u30EB\u304C\u898B\u3064\u304B\u3089\u306A\u304B\u3063\u305F\u305F\u3081\u3001Nest.js \u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u751F\u6210\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u307E\u3059\u3002"
1988
- },
1989
- "telemetry.resourceEventsFailed": {
1990
- "zh-CN": "resource_events \u8BF7\u6C42\u5931\u8D25",
1991
- "en-US": "resource_events request failed",
1992
- "ja-JP": "resource_events \u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002"
1993
- }
1994
- };
1995
-
1996
- // src/locales/index.ts
1997
- var devI18n = createI18nForDev(messages_default);
1998
- function tDev(key, params) {
1999
- return devI18n.t(key, params);
2000
- }
2001
-
2002
1619
  // src/commands/db/gen-nest-resource/utils.ts
2003
1620
  function mapDrizzleTypeToTS(field) {
2004
1621
  const typeMap = {
@@ -2082,7 +1699,7 @@ function toSnakeCase(str) {
2082
1699
  // src/commands/db/gen-nest-resource/generator.ts
2083
1700
  function generateDTO(table) {
2084
1701
  const className = toPascalCase(table.variableName);
2085
- let dto = `// ${tDev("genNestResource.dto.modifyHint")}
1702
+ let dto = `// \u8BF7\u4FEE\u6539\u8BE5\u6587\u4EF6\u4EE3\u7801\u4EE5\u6EE1\u8DB3\u9700\u6C42
2086
1703
  import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
2087
1704
  import { IsDefined, IsNumber, IsOptional, IsString, MaxLength, IsInt, IsBoolean, IsUUID, IsDate, IsObject, IsArray } from 'class-validator';
2088
1705
  import { Type } from 'class-transformer';
@@ -2146,8 +1763,7 @@ function generateValidationDecorators(field, {
2146
1763
  isUpdate = false,
2147
1764
  isResponse = false
2148
1765
  } = {}) {
2149
- let decorators = ` // ${tDev("genNestResource.dto.decoratorHint")}
2150
- `;
1766
+ let decorators = " // \u8BF7\u6309\u7528\u6237\u9700\u6C42\u4FEE\u6539\u4EE5\u4E0B\u88C5\u9970\u5668\u6CE8\u91CA\n";
2151
1767
  if (field.nullable || !isResponse && field.hasDefault || isUpdate) {
2152
1768
  decorators += ` @ApiPropertyOptional({ description: '${field.comment || field.name}' })
2153
1769
  `;
@@ -2215,7 +1831,7 @@ function generateController(table) {
2215
1831
  const pkType = pkField ? mapDrizzleTypeToTS(pkField) : "string";
2216
1832
  const pkName = pkField ? pkField.name : "id";
2217
1833
  const controller = `
2218
- // ${tDev("genNestResource.dto.modifyHint")}
1834
+ // \u8BF7\u4FEE\u6539\u8BE5\u6587\u4EF6\u4EE3\u7801\u4EE5\u6EE1\u8DB3\u9700\u6C42
2219
1835
  import {
2220
1836
  Controller,
2221
1837
  Get,
@@ -2246,11 +1862,11 @@ export class ${className}Controller {
2246
1862
 
2247
1863
  @Post()
2248
1864
  @ApiOperation({
2249
- summary: '${tDev("genNestResource.api.create.summary")}',
2250
- description: '${tDev("genNestResource.api.create.summary")}',
1865
+ summary: '\u521B\u5EFA\u4E00\u6761\u8BB0\u5F55\uFF08\u6A21\u677F\u5185\u5BB9\uFF0C\u8BF7\u4FEE\u6539\u6211\uFF09',
1866
+ description: '\u521B\u5EFA\u4E00\u6761\u8BB0\u5F55\uFF08\u6A21\u677F\u5185\u5BB9\uFF0C\u8BF7\u4FEE\u6539\u6211\uFF09',
2251
1867
  })
2252
1868
  @ApiCreatedResponse({
2253
- description: '${tDev("genNestResource.api.create.success")}',
1869
+ description: '\u6210\u529F\u521B\u5EFA\u4E00\u6761\u8BB0\u5F55',
2254
1870
  type: ${className}ResponseDto,
2255
1871
  })
2256
1872
  async create(
@@ -2260,11 +1876,11 @@ export class ${className}Controller {
2260
1876
  }
2261
1877
 
2262
1878
  @ApiOperation({
2263
- summary: '${tDev("genNestResource.api.findOne.summary")}',
2264
- description: '${tDev("genNestResource.api.findOne.summary")}',
1879
+ summary: '\u6839\u636E\u4E3B\u952E\u67E5\u8BE2\u4E00\u6761\u8BB0\u5F55\uFF08\u6A21\u677F\u5185\u5BB9\uFF0C\u8BF7\u4FEE\u6539\u6211\uFF09',
1880
+ description: '\u6839\u636E\u4E3B\u952E\u67E5\u8BE2\u4E00\u6761\u8BB0\u5F55\uFF08\u6A21\u677F\u5185\u5BB9\uFF0C\u8BF7\u4FEE\u6539\u6211\uFF09',
2265
1881
  })
2266
1882
  @ApiOkResponse({
2267
- description: '${tDev("genNestResource.api.findOne.success")}',
1883
+ description: '\u6210\u529F\u67E5\u8BE2\u4E00\u6761\u8BB0\u5F55',
2268
1884
  type: ${className}ResponseDto,
2269
1885
  })
2270
1886
  @Get(':${pkName}')
@@ -2275,11 +1891,11 @@ export class ${className}Controller {
2275
1891
  }
2276
1892
 
2277
1893
  @ApiOperation({
2278
- summary: '${tDev("genNestResource.api.update.summary")}',
2279
- description: '${tDev("genNestResource.api.update.summary")}',
1894
+ summary: '\u6839\u636E\u4E3B\u952E\u66F4\u65B0\u4E00\u6761\u8BB0\u5F55\uFF08\u6A21\u677F\u5185\u5BB9\uFF0C\u8BF7\u4FEE\u6539\u6211\uFF09',
1895
+ description: '\u6839\u636E\u4E3B\u952E\u66F4\u65B0\u4E00\u6761\u8BB0\u5F55\uFF08\u6A21\u677F\u5185\u5BB9\uFF0C\u8BF7\u4FEE\u6539\u6211\uFF09',
2280
1896
  })
2281
1897
  @ApiOkResponse({
2282
- description: '${tDev("genNestResource.api.update.success")}',
1898
+ description: '\u6210\u529F\u66F4\u65B0\u4E00\u6761\u8BB0\u5F55',
2283
1899
  type: ${className}ResponseDto,
2284
1900
  })
2285
1901
  @Put(':${pkName}')
@@ -2291,11 +1907,11 @@ export class ${className}Controller {
2291
1907
  }
2292
1908
 
2293
1909
  @ApiOperation({
2294
- summary: '${tDev("genNestResource.api.remove.summary")}',
2295
- description: '${tDev("genNestResource.api.remove.summary")}',
1910
+ summary: '\u6839\u636E\u4E3B\u952E\u5220\u9664\u4E00\u6761\u8BB0\u5F55\uFF08\u6A21\u677F\u5185\u5BB9\uFF0C\u8BF7\u4FEE\u6539\u6211\uFF09',
1911
+ description: '\u6839\u636E\u4E3B\u952E\u5220\u9664\u4E00\u6761\u8BB0\u5F55\uFF08\u6A21\u677F\u5185\u5BB9\uFF0C\u8BF7\u4FEE\u6539\u6211\uFF09',
2296
1912
  })
2297
1913
  @ApiOkResponse({
2298
- description: '${tDev("genNestResource.api.remove.success")}',
1914
+ description: '\u6210\u529F\u5220\u9664\u4E00\u6761\u8BB0\u5F55',
2299
1915
  })
2300
1916
  @Delete(':${pkName}')
2301
1917
  async remove(
@@ -2314,7 +1930,7 @@ function generateService(table) {
2314
1930
  const pkType = pkField ? mapDrizzleTypeToTS(pkField) : "string";
2315
1931
  const pkName = pkField ? pkField.name : "id";
2316
1932
  const service = `
2317
- // ${tDev("genNestResource.dto.modifyHint")}
1933
+ // \u8BF7\u4FEE\u6539\u8BE5\u6587\u4EF6\u4EE3\u7801\u4EE5\u6EE1\u8DB3\u9700\u6C42
2318
1934
  import { Injectable, Inject, Logger, NotFoundException } from '@nestjs/common';
2319
1935
  import { eq } from 'drizzle-orm';
2320
1936
  import { DRIZZLE_DATABASE, type PostgresJsDatabase } from '@lark-apaas/fullstack-nestjs-core';
@@ -2634,16 +2250,16 @@ async function parseAndGenerateNestResourceTemplate(options) {
2634
2250
  });
2635
2251
  const tables = parser.parseSchemaFile(options.schemaFilePath);
2636
2252
  if (tables.length === 0) {
2637
- console.warn(tDev("genNestResource.noTables"));
2253
+ console.warn("\u672A\u89E3\u6790\u5230\u4EFB\u4F55\u6570\u636E\u5E93\u8868\uFF0C\u65E0\u9700\u751F\u6210 Nest.js \u6A21\u5757\u6A21\u677F");
2638
2254
  return;
2639
2255
  }
2640
2256
  tables.sort((a, b) => b.variableName.length - a.variableName.length);
2641
2257
  const table = tables[0];
2642
- console.info(tDev("genNestResource.generatingModule", { name: table.variableName }));
2258
+ console.info(`\u751F\u6210 Nest.js ${table.variableName} \u6A21\u5757`);
2643
2259
  const filePath = toSnakeCase(table.variableName);
2644
2260
  const moduleDir = join(options.moduleOutputDir, filePath);
2645
2261
  if (existsSync(moduleDir)) {
2646
- console.info(tDev("genNestResource.moduleExists", { path: filePath }));
2262
+ console.info(`Nest.js \u6A21\u5757 ${filePath} \u5DF2\u5B58\u5728\uFF0C\u8DF3\u8FC7\u751F\u6210\u4EE3\u7801`);
2647
2263
  return;
2648
2264
  }
2649
2265
  const dto = generateDTO(table);
@@ -2659,9 +2275,7 @@ async function parseAndGenerateNestResourceTemplate(options) {
2659
2275
  await writeFile(join(moduleDir, `${filePath}.service.ts`), service);
2660
2276
  await writeFile(moduleFilePath, module);
2661
2277
  } catch (err) {
2662
- console.error(
2663
- tDev("genNestResource.generateFailed", { path: filePath, message: err.message })
2664
- );
2278
+ console.error(`\u751F\u6210 Nest.js ${filePath} \u6A21\u5757\u5931\u8D25: ${err.message}`);
2665
2279
  await rm(moduleDir, { recursive: true });
2666
2280
  }
2667
2281
  }
@@ -3596,7 +3210,7 @@ async function requestWithLogId(send, message, options = {}) {
3596
3210
  throw await buildError(message, asHttpErrorResponse(error), error);
3597
3211
  }
3598
3212
  if (!response) {
3599
- throw new InnerApiError(tDev("apiError.noResponse", { message }));
3213
+ throw new InnerApiError(`${message}: \u672A\u62FF\u5230\u54CD\u5E94\u5BF9\u8C61`);
3600
3214
  }
3601
3215
  const isOk = options.expectStatus200 ? response.ok !== false && response.status === 200 : response.ok === true;
3602
3216
  if (!isOk) {
@@ -3614,7 +3228,7 @@ async function reportEvents(events) {
3614
3228
  const client = getHttpClient();
3615
3229
  const response = await requestWithLogId(
3616
3230
  () => client.post("/api/v1/studio/innerapi/resource_events", { events }),
3617
- tDev("telemetry.resourceEventsFailed")
3231
+ "resource_events \u8BF7\u6C42\u5931\u8D25"
3618
3232
  );
3619
3233
  const result = await response.json();
3620
3234
  if (result.status_code !== "0") {
@@ -4296,12 +3910,6 @@ function readGlobalInstalledVersion(pkg2) {
4296
3910
  }
4297
3911
  return "";
4298
3912
  }
4299
- var DEFAULT_NPM_REGISTRY = "https://registry.npmmirror.com/";
4300
- function resolveRegistry(explicit, env = process.env) {
4301
- if (explicit) return explicit;
4302
- if (env.MIAODA_NPM_REGISTRY) return env.MIAODA_NPM_REGISTRY;
4303
- return DEFAULT_NPM_REGISTRY;
4304
- }
4305
3913
  function buildGlobalUpgradePlan(managed, resolvedVersions, readVersion) {
4306
3914
  const plan = [];
4307
3915
  for (const pkg2 of managed) {
@@ -4345,9 +3953,8 @@ async function run5(options = {}) {
4345
3953
  }
4346
3954
  const targets = plan.map(({ pkg: pkg2, target }) => `${pkg2}@${target}`);
4347
3955
  const npmArgs = ["install", "-g", ...targets];
4348
- const registry = resolveRegistry(options.registry);
4349
- if (registry) {
4350
- npmArgs.push("--registry", registry);
3956
+ if (options.registry) {
3957
+ npmArgs.push("--registry", options.registry);
4351
3958
  }
4352
3959
  console.log(`[fullstack-cli] Running: npm ${npmArgs.join(" ")}`);
4353
3960
  const result = spawnSync5("npm", npmArgs, { stdio: "inherit" });
@@ -4367,7 +3974,8 @@ var globalDepsCommand = {
4367
3974
  register(parentCommand) {
4368
3975
  parentCommand.command(this.name).description(this.description).option("--grayscale-config <json>", "Grayscale config JSON (injected by sandbox_console)").option("--dry-run", "Show upgrade plan without executing").option(
4369
3976
  "--registry <url>",
4370
- "npm registry URL (default: $MIAODA_NPM_REGISTRY, otherwise the built-in default registry)"
3977
+ "npm registry URL (default: https://registry.npmmirror.com/)",
3978
+ "https://registry.npmmirror.com/"
4371
3979
  ).action(async (options) => {
4372
3980
  await run5(options);
4373
3981
  });
@@ -5208,9 +4816,6 @@ function logError(message) {
5208
4816
  console.error(`[capability] Error: ${message}`);
5209
4817
  }
5210
4818
 
5211
- // src/commands/action-plugin/form-action.handler.ts
5212
- import { readSettings } from "@lark-apaas/miaoda-common-settings";
5213
-
5214
4819
  // src/commands/action-plugin/form-context.ts
5215
4820
  import fs19 from "fs";
5216
4821
 
@@ -5620,9 +5225,7 @@ function pickLocalizedText(text) {
5620
5225
  if (typeof text === "string") {
5621
5226
  return text;
5622
5227
  }
5623
- const locale = readSettings("locale");
5624
- const fallbackLocale = locale === "en-US" ? "zh-CN" : "en-US";
5625
- return text[locale] ?? text[fallbackLocale] ?? Object.values(text).find((v) => typeof v === "string");
5228
+ return text["zh-CN"] ?? text["en-US"] ?? Object.values(text).find((v) => typeof v === "string");
5626
5229
  }
5627
5230
  function summarize(action) {
5628
5231
  const summary = {
@@ -6095,16 +5698,43 @@ var actionPluginCommandGroup = {
6095
5698
  };
6096
5699
 
6097
5700
  // src/commands/capability/list.handler.ts
5701
+ var LIST_FILTER_ENV = "MIAODA_CAPABILITY_LIST_FILTER";
5702
+ function resolveFilters(options) {
5703
+ if (options.ids !== void 0 || options.pluginKeys !== void 0 || !process.env[LIST_FILTER_ENV]) {
5704
+ return options;
5705
+ }
5706
+ const filters = JSON.parse(process.env[LIST_FILTER_ENV]);
5707
+ if (!filters || typeof filters !== "object" || Array.isArray(filters)) {
5708
+ throw new Error(`${LIST_FILTER_ENV} must be an object`);
5709
+ }
5710
+ const { ids, pluginKeys } = filters;
5711
+ for (const value of [ids, pluginKeys]) {
5712
+ if (value !== void 0 && (!Array.isArray(value) || !value.every((item) => typeof item === "string"))) {
5713
+ throw new Error(
5714
+ `${LIST_FILTER_ENV} ids and pluginKeys must be string arrays`
5715
+ );
5716
+ }
5717
+ }
5718
+ return {
5719
+ ids,
5720
+ pluginKeys
5721
+ };
5722
+ }
6098
5723
  async function list2(options) {
6099
5724
  try {
6100
5725
  if (!capabilitiesDirExists()) {
6101
- logError("capabilities directory not found (looked for shared/capabilities and server/capabilities)");
5726
+ logError(
5727
+ "capabilities directory not found (looked for shared/capabilities and server/capabilities)"
5728
+ );
6102
5729
  process.exit(1);
6103
5730
  }
6104
5731
  if (options.id) {
5732
+ if (options.ids !== void 0 || options.pluginKeys !== void 0) {
5733
+ throw new Error("--id cannot be combined with --ids or --plugin-keys");
5734
+ }
6105
5735
  await listSingle(options.id, options.summary);
6106
5736
  } else {
6107
- await listAll(options.summary);
5737
+ await listAll(options);
6108
5738
  }
6109
5739
  } catch (error) {
6110
5740
  const message = error instanceof Error ? error.message : String(error);
@@ -6121,13 +5751,16 @@ async function listSingle(id, summary) {
6121
5751
  printJson(hydrated);
6122
5752
  }
6123
5753
  }
6124
- async function listAll(summary) {
6125
- const capabilities = readAllCapabilities();
5754
+ async function listAll(options) {
5755
+ const { ids, pluginKeys } = resolveFilters(options);
5756
+ const capabilities = readAllCapabilities().filter(
5757
+ (cap) => (!ids?.length || ids.includes(cap.id)) && (!pluginKeys?.length || pluginKeys.includes(cap.pluginKey))
5758
+ );
6126
5759
  if (capabilities.length === 0) {
6127
5760
  printJson([]);
6128
5761
  return;
6129
5762
  }
6130
- if (summary) {
5763
+ if (options.summary) {
6131
5764
  printJson(capabilities);
6132
5765
  } else {
6133
5766
  const hydrated = [];
@@ -6694,7 +6327,13 @@ var listCommand2 = {
6694
6327
  description: "List capability configurations",
6695
6328
  aliases: ["ls"],
6696
6329
  register(program) {
6697
- program.command(this.name).alias("ls").description(this.description).option("--summary", "Return raw capability config (without hydration)").option("--id <id>", "Specify capability ID").action(async (options) => {
6330
+ program.command(this.name).alias("ls").description(this.description).option("--summary", "Return raw capability config (without hydration)").option("--id <id>", "Specify capability ID").option(
6331
+ "--ids <ids...>",
6332
+ "Filter capability IDs before schema hydration (returns an array)"
6333
+ ).option(
6334
+ "--plugin-keys <keys...>",
6335
+ "Filter plugin keys before schema hydration"
6336
+ ).action(async (options) => {
6698
6337
  await list2(options);
6699
6338
  });
6700
6339
  }
@@ -6849,32 +6488,27 @@ var debug = createDebug("component");
6849
6488
  // src/commands/component/service.ts
6850
6489
  async function getComponents(keys) {
6851
6490
  const client = getHttpClient();
6852
- debug(tDev("component.service.debug.callingBatchGet"), keys);
6491
+ debug("\u8C03\u7528 /components/batch_get %o", keys);
6853
6492
  const response = await requestWithLogId(
6854
6493
  () => client.post(
6855
6494
  `/api/v1/studio/innerapi/components/batch_get?keys=${keys.join(",")}`
6856
6495
  ),
6857
- tDev("component.service.error.fetchInfoFailed"),
6496
+ "\u83B7\u53D6\u7EC4\u4EF6\u4FE1\u606F\u5931\u8D25",
6858
6497
  { expectStatus200: true }
6859
6498
  );
6860
6499
  const result = await response.json();
6861
6500
  if (result.status_code !== "0") {
6862
- debug(tDev("component.service.debug.apiError"), result);
6863
- throw new Error(
6864
- tDev("component.service.error.fetchInfoFailedWithMsg", {
6865
- errorMsg: String(result.error_msg),
6866
- logId: formatLogId(response)
6867
- })
6868
- );
6501
+ debug("\u63A5\u53E3\u8FD4\u56DE\u9519\u8BEF\uFF1A%o", result);
6502
+ throw new Error(`\u83B7\u53D6\u7EC4\u4EF6\u4FE1\u606F\u5931\u8D25\uFF1A${result.error_msg}${formatLogId(response)}`);
6869
6503
  }
6870
6504
  return mapValues(result.data.components, ([component]) => component);
6871
6505
  }
6872
6506
  async function getRegistryItem(url) {
6873
6507
  const client = getHttpClient();
6874
- debug(tDev("component.service.debug.downloadingRegistryItem"), url);
6508
+ debug("\u4E0B\u8F7D registry-item.json\uFF1A%s", url);
6875
6509
  const response = await requestWithLogId(
6876
6510
  () => client.get(url),
6877
- tDev("component.service.error.downloadRegistryItemFailed")
6511
+ "\u4E0B\u8F7D registry-item.json \u5931\u8D25"
6878
6512
  );
6879
6513
  const item = await response.json();
6880
6514
  return item;
@@ -6893,7 +6527,7 @@ async function sendInstallEvent(key) {
6893
6527
  }
6894
6528
  ]
6895
6529
  }),
6896
- tDev("component.service.error.reportInstallEventFailed")
6530
+ "\u4E0A\u62A5\u7EC4\u4EF6\u5B89\u88C5\u4E8B\u4EF6\u5931\u8D25"
6897
6531
  );
6898
6532
  } catch (error) {
6899
6533
  console.warn(`[component] ${error instanceof Error ? error.message : error}`);
@@ -6922,26 +6556,26 @@ function ensureDir(dirPath) {
6922
6556
  }
6923
6557
  async function prepareRecursive(key, visited) {
6924
6558
  if (visited.has(key)) {
6925
- debug(tDev("component.registry.debug.skipProcessed"), key);
6559
+ debug("\u8DF3\u8FC7\u5DF2\u5904\u7406\u7684\u7EC4\u4EF6: %s", key);
6926
6560
  return;
6927
6561
  }
6928
6562
  visited.add(key);
6929
- debug(tDev("component.registry.debug.processing"), key);
6930
- debug(tDev("component.registry.debug.fetchingDownloadInfo"));
6563
+ debug("\u5904\u7406\u7EC4\u4EF6: %s", key);
6564
+ debug("\u83B7\u53D6\u7EC4\u4EF6\u4E0B\u8F7D\u4FE1\u606F...");
6931
6565
  const infoMap = await getComponents([key]);
6932
6566
  const info = infoMap[key];
6933
- debug(tDev("component.registry.debug.componentInfo"), info);
6567
+ debug("\u7EC4\u4EF6\u4FE1\u606F: %o", info);
6934
6568
  if (!info) {
6935
6569
  throw new Error(`Component not found: ${key}`);
6936
6570
  }
6937
6571
  if (info.status !== "active") {
6938
6572
  throw new Error(`Component is not active: ${key}`);
6939
6573
  }
6940
- debug(tDev("component.registry.debug.downloadingItem"), info.downloadURL);
6574
+ debug("\u4E0B\u8F7D registry item: %s", info.downloadURL);
6941
6575
  const registryItem = await getRegistryItem(info.downloadURL);
6942
- debug(tDev("component.registry.debug.itemContent"), registryItem);
6576
+ debug("registry item \u5185\u5BB9: %o", registryItem);
6943
6577
  const deps = registryItem.registryDependencies || [];
6944
- debug(tDev("component.registry.debug.dependencies"), deps);
6578
+ debug("\u4F9D\u8D56\u5217\u8868: %o", deps);
6945
6579
  for (const dep of deps) {
6946
6580
  await prepareRecursive(dep, visited);
6947
6581
  }
@@ -6952,7 +6586,7 @@ async function prepareRecursive(key, visited) {
6952
6586
  const localPath = getLocalRegistryPath(key);
6953
6587
  ensureDir(path16.dirname(localPath));
6954
6588
  fs21.writeFileSync(localPath, JSON.stringify(rewrittenItem, null, 2), "utf-8");
6955
- debug(tDev("component.registry.debug.savedTo"), localPath);
6589
+ debug("\u4FDD\u5B58\u5230: %s", localPath);
6956
6590
  }
6957
6591
  async function prepareComponentRegistryItems(id) {
6958
6592
  const visited = /* @__PURE__ */ new Set();
@@ -7054,7 +6688,7 @@ async function executeShadcnAdd(registryItemPath) {
7054
6688
  resolve2({
7055
6689
  success: false,
7056
6690
  files: [],
7057
- error: tDev("component.shadcn.error.timeout")
6691
+ error: "\u6267\u884C\u8D85\u65F6"
7058
6692
  });
7059
6693
  }, 3 * 60 * 1e3);
7060
6694
  ptyProcess.onExit(({ exitCode }) => {
@@ -7076,7 +6710,7 @@ function runActionPluginInit() {
7076
6710
  return new Promise((resolve2) => {
7077
6711
  execFile("fullstack-cli", ["action-plugin", "init"], { cwd: process.cwd(), stdio: "ignore" }, (error) => {
7078
6712
  if (error) {
7079
- debug(tDev("component.add.debug.actionPluginInitFailed"), error.message);
6713
+ debug("action-plugin init \u5931\u8D25: %s", error.message);
7080
6714
  }
7081
6715
  resolve2();
7082
6716
  });
@@ -7086,17 +6720,17 @@ function printResult(result) {
7086
6720
  console.log(JSON.stringify(result, null, 2));
7087
6721
  }
7088
6722
  async function addComponent(key) {
7089
- debug(tDev("component.add.debug.installStart"), key);
7090
- debug(tDev("component.add.debug.preparingRegistryItems"));
6723
+ debug("\u5F00\u59CB\u5B89\u88C5\u7EC4\u4EF6: %s", key);
6724
+ debug("\u51C6\u5907 registry items...");
7091
6725
  const registryItemPath = await prepareComponentRegistryItems(key);
7092
- debug(tDev("component.add.debug.registryItemPath"), registryItemPath);
6726
+ debug("registry item \u8DEF\u5F84: %s", registryItemPath);
7093
6727
  const registryItem = getDownloadedRegistryItem(key);
7094
- debug(tDev("component.add.debug.registryItemFetched"), registryItem);
7095
- debug(tDev("component.add.debug.runningShadcn"));
6728
+ debug("\u83B7\u53D6\u5230 registry item: %o", registryItem);
6729
+ debug("\u6267\u884C shadcn add...");
7096
6730
  const executeResult = await executeShadcnAdd(registryItemPath);
7097
- debug(tDev("component.add.debug.shadcnResult"), executeResult);
6731
+ debug("shadcn \u6267\u884C\u7ED3\u679C: %o", executeResult);
7098
6732
  if (!executeResult.success) {
7099
- throw new Error(executeResult.error || tDev("component.add.error.unknown"));
6733
+ throw new Error(executeResult.error || "\u5B89\u88C5\u5931\u8D25\uFF0C\u672A\u77E5\u539F\u56E0");
7100
6734
  }
7101
6735
  return {
7102
6736
  success: true,
@@ -7112,7 +6746,7 @@ async function add(key) {
7112
6746
  printResult(result);
7113
6747
  void sendInstallEvent(key);
7114
6748
  } catch (error) {
7115
- const errorMessage = error instanceof Error ? error.message : tDev("component.add.error.unknownReason");
6749
+ const errorMessage = error instanceof Error ? error.message : "\u5B89\u88C5\u5931\u8D25\uFF0C\u539F\u56E0\u672A\u77E5";
7116
6750
  printResult({
7117
6751
  success: false,
7118
6752
  errors: [{ message: errorMessage }]
@@ -7126,21 +6760,16 @@ async function add(key) {
7126
6760
  // src/commands/component/index.ts
7127
6761
  var addCommand = {
7128
6762
  name: "add",
7129
- // getter:注册命令时使用配置 locale 取文案
7130
- get description() {
7131
- return tDev("component.add.description");
7132
- },
6763
+ description: "\u5B89\u88C5\u5999\u642D\u7EC4\u4EF6\u5E02\u573A\u4E2D\u7684\u7EC4\u4EF6",
7133
6764
  register(program) {
7134
- program.command(this.name).description(this.description).argument("<component>", tDev("component.add.argument.component")).action(async (component) => {
6765
+ program.command(this.name).description(this.description).argument("<component>", "\u7EC4\u4EF6 ID (\u4F8B\u5982 @miaoda/button)").action(async (component) => {
7135
6766
  await add(component);
7136
6767
  });
7137
6768
  }
7138
6769
  };
7139
6770
  var componentCommandGroup = {
7140
6771
  name: "component",
7141
- get description() {
7142
- return tDev("component.description");
7143
- },
6772
+ description: "\u7EC4\u4EF6\u76F8\u5173\u547D\u4EE4",
7144
6773
  commands: [addCommand]
7145
6774
  };
7146
6775
 
@@ -10217,7 +9846,7 @@ async function genArtifactUploadCredential(appId, body) {
10217
9846
  const url = `/v1/app/${appId}/pipeline/gen_artifact_upload_credential`;
10218
9847
  const response = await requestWithLogId(
10219
9848
  () => client.post(url, body),
10220
- tDev("build.apiClient.genArtifactUploadCredentialFailed"),
9849
+ "gen_artifact_upload_credential \u8BF7\u6C42\u5931\u8D25",
10221
9850
  { expectStatus200: true }
10222
9851
  );
10223
9852
  return response.json();
@@ -10227,23 +9856,18 @@ async function getDefaultBucketId(appId) {
10227
9856
  const url = `/v1/app/${appId}/storage/inner/staticBucket`;
10228
9857
  const response = await requestWithLogId(
10229
9858
  () => client.post(url, {}),
10230
- tDev("build.apiClient.getOrCreateStaticBucketFailed"),
9859
+ "getOrCreateStaticBucket \u8BF7\u6C42\u5931\u8D25",
10231
9860
  { expectStatus200: true }
10232
9861
  );
10233
9862
  const data = await response.json();
10234
9863
  if (data.status_code !== "0") {
10235
9864
  throw new Error(
10236
- tDev("build.apiClient.getOrCreateStaticBucketBadStatus", {
10237
- statusCode: data.status_code,
10238
- logId: formatLogId(response)
10239
- })
9865
+ `getOrCreateStaticBucket \u8FD4\u56DE\u5F02\u5E38, status_code: ${data.status_code}${formatLogId(response)}`
10240
9866
  );
10241
9867
  }
10242
9868
  const bucketId = data?.data?.bucketID;
10243
9869
  if (!bucketId) {
10244
- throw new Error(
10245
- tDev("build.apiClient.staticBucketNotFound", { appId, logId: formatLogId(response) })
10246
- );
9870
+ throw new Error(`\u672A\u627E\u5230\u5E94\u7528 ${appId} \u7684\u9759\u6001\u8D44\u6E90\u5B58\u50A8\u6876${formatLogId(response)}`);
10247
9871
  }
10248
9872
  return bucketId;
10249
9873
  }
@@ -10252,7 +9876,7 @@ async function preUploadStaticAttachment(appId, bucketId) {
10252
9876
  const url = `/v1/app/${appId}/storage/bucket/${bucketId}/preUploadStatic`;
10253
9877
  const response = await requestWithLogId(
10254
9878
  () => client.post(url, {}),
10255
- tDev("build.apiClient.preUploadStaticFailed"),
9879
+ "preUploadStatic \u8BF7\u6C42\u5931\u8D25",
10256
9880
  { expectStatus200: true }
10257
9881
  );
10258
9882
  return response.json();
@@ -10262,7 +9886,7 @@ async function uploadStaticAttachmentCallback(appId, bucketId, body) {
10262
9886
  const url = `/v1/app/${appId}/storage/bucket/${bucketId}/object/callbackStatic`;
10263
9887
  const response = await requestWithLogId(
10264
9888
  () => client.post(url, body),
10265
- tDev("build.apiClient.callbackStaticFailed"),
9889
+ "callbackStatic \u8BF7\u6C42\u5931\u8D25",
10266
9890
  { expectStatus200: true }
10267
9891
  );
10268
9892
  return response.json();
@@ -10323,25 +9947,23 @@ async function uploadStatic(options) {
10323
9947
  const {
10324
9948
  appId,
10325
9949
  staticDir = UPLOAD_STATIC_DEFAULTS.staticDir,
10326
- tosutilPath = UPLOAD_STATIC_DEFAULTS.tosutilPath
9950
+ tosutilPath = UPLOAD_STATIC_DEFAULTS.tosutilPath,
9951
+ endpoint = UPLOAD_STATIC_DEFAULTS.endpoint,
9952
+ region = UPLOAD_STATIC_DEFAULTS.region
10327
9953
  } = options;
10328
9954
  const resolvedStaticDir = path26.resolve(staticDir);
10329
9955
  if (!fs33.existsSync(resolvedStaticDir)) {
10330
- console.error(
10331
- tDev("build.uploadStatic.dirNotFound", { prefix: LOG_PREFIX, staticDir: resolvedStaticDir })
10332
- );
9956
+ console.error(`${LOG_PREFIX} \u76EE\u5F55\u4E0D\u5B58\u5728: ${resolvedStaticDir}\uFF0C\u8DF3\u8FC7\u4E0A\u4F20`);
10333
9957
  return;
10334
9958
  }
10335
9959
  if (isDirEmpty(resolvedStaticDir)) {
10336
- console.error(
10337
- tDev("build.uploadStatic.dirEmpty", { prefix: LOG_PREFIX, staticDir: resolvedStaticDir })
10338
- );
9960
+ console.error(`${LOG_PREFIX} \u76EE\u5F55\u4E3A\u7A7A: ${resolvedStaticDir}\uFF0C\u8DF3\u8FC7\u4E0A\u4F20`);
10339
9961
  return;
10340
9962
  }
10341
9963
  const resolvedTosutil = resolveTosutilPath(tosutilPath);
10342
9964
  if (!resolvedTosutil) {
10343
9965
  throw new Error(
10344
- tDev("build.uploadStatic.error.tosutilNotFound", { path: tosutilPath }) + tDev("build.uploadStatic.error.tosutilInstallHint")
9966
+ `tosutil \u4E0D\u5B58\u5728: ${tosutilPath}\u3002\u8BF7\u786E\u4FDD tosutil \u5DF2\u5B89\u88C5\u5728\u7CFB\u7EDF PATH \u4E2D\u6216\u901A\u8FC7 --tosutil-path \u6307\u5B9A\u8DEF\u5F84\u3002`
10345
9967
  );
10346
9968
  }
10347
9969
  let uploadPrefix;
@@ -10350,41 +9972,31 @@ async function uploadStatic(options) {
10350
9972
  let accessKeyID;
10351
9973
  let secretAccessKey;
10352
9974
  let sessionToken;
10353
- let endpoint;
10354
- let region;
10355
9975
  const envCredentials = readCredentialsFromEnv();
10356
9976
  if (envCredentials) {
10357
- console.error(tDev("build.uploadStatic.useEnvCredentials", { prefix: LOG_PREFIX }));
9977
+ console.error(`${LOG_PREFIX} \u4F7F\u7528\u73AF\u5883\u53D8\u91CF\u4E2D\u7684\u4E0A\u4F20\u51ED\u8BC1`);
10358
9978
  ({ uploadPrefix, uploadID, bucketId, accessKeyID, secretAccessKey, sessionToken } = envCredentials);
10359
- endpoint = process.env.STATIC_UPLOAD_ENDPOINT;
10360
- region = process.env.STATIC_UPLOAD_REGION;
10361
9979
  } else {
10362
- console.error(tDev("build.uploadStatic.envMissingCallPreUpload", { prefix: LOG_PREFIX }));
9980
+ console.error(`${LOG_PREFIX} \u73AF\u5883\u53D8\u91CF\u672A\u8BBE\u7F6E\uFF0C\u8C03\u7528 preUploadStatic...`);
10363
9981
  bucketId = await resolveBucketId(appId);
10364
9982
  const preUploadResp = await fetchPreUpload(appId, bucketId);
10365
9983
  const { uploadCredential } = preUploadResp.data;
10366
- ({ uploadPrefix, uploadID, endpoint, region } = preUploadResp.data);
9984
+ ({ uploadPrefix, uploadID } = preUploadResp.data);
10367
9985
  ({ AccessKeyID: accessKeyID, SecretAccessKey: secretAccessKey, SessionToken: sessionToken } = uploadCredential);
10368
9986
  }
10369
- console.error(tDev("build.uploadStatic.target", { prefix: LOG_PREFIX, uploadPrefix }));
9987
+ console.error(`${LOG_PREFIX} \u4E0A\u4F20\u76EE\u6807: ${uploadPrefix}`);
10370
9988
  const confPath = path26.join(os2.tmpdir(), `.tosutilconfig-static-${process.pid}`);
10371
9989
  fs33.writeFileSync(confPath, "");
10372
9990
  try {
10373
- console.error(tDev("build.uploadStatic.configuringTosutil", { prefix: LOG_PREFIX }));
9991
+ console.error(`${LOG_PREFIX} \u914D\u7F6E tosutil...`);
10374
9992
  configureTosutil(resolvedTosutil, confPath, {
10375
- endpoint: options.endpoint ?? (endpoint || UPLOAD_STATIC_DEFAULTS.endpoint),
10376
- region: options.region ?? (region || UPLOAD_STATIC_DEFAULTS.region),
9993
+ endpoint,
9994
+ region,
10377
9995
  accessKeyID,
10378
9996
  secretAccessKey,
10379
9997
  sessionToken
10380
9998
  });
10381
- console.error(
10382
- tDev("build.uploadStatic.uploading", {
10383
- prefix: LOG_PREFIX,
10384
- staticDir: resolvedStaticDir,
10385
- uploadPrefix
10386
- })
10387
- );
9999
+ console.error(`${LOG_PREFIX} \u4E0A\u4F20 ${resolvedStaticDir} -> ${uploadPrefix}`);
10388
10000
  uploadToTos(resolvedTosutil, confPath, resolvedStaticDir, uploadPrefix);
10389
10001
  } finally {
10390
10002
  try {
@@ -10392,23 +10004,14 @@ async function uploadStatic(options) {
10392
10004
  } catch {
10393
10005
  }
10394
10006
  }
10395
- console.error(tDev("build.uploadStatic.tosutilDone", { prefix: LOG_PREFIX }));
10396
- console.error(
10397
- tDev("build.uploadStatic.callingCallbackStatic", { prefix: LOG_PREFIX, uploadId: uploadID })
10398
- );
10007
+ console.error(`${LOG_PREFIX} tosutil \u4E0A\u4F20\u5B8C\u6210`);
10008
+ console.error(`${LOG_PREFIX} \u8C03\u7528 callbackStatic (uploadID: ${uploadID})...`);
10399
10009
  const callbackResp = await uploadStaticAttachmentCallback(appId, bucketId, { uploadID });
10400
10010
  if (callbackResp.status_code !== "0") {
10401
- throw new Error(
10402
- tDev("build.uploadStatic.error.callbackStaticBadStatus", {
10403
- statusCode: callbackResp.status_code,
10404
- response: JSON.stringify(callbackResp)
10405
- })
10406
- );
10011
+ throw new Error(`callbackStatic \u8FD4\u56DE\u5F02\u5E38, status_code: ${callbackResp.status_code}, response: ${JSON.stringify(callbackResp)}`);
10407
10012
  }
10408
10013
  const attachments = callbackResp.data?.attachments || [];
10409
- console.error(
10410
- tDev("build.uploadStatic.done", { prefix: LOG_PREFIX, count: attachments.length })
10411
- );
10014
+ console.error(`${LOG_PREFIX} \u4E0A\u4F20\u5B8C\u6210\uFF0C\u5171 ${attachments.length} \u4E2A\u6587\u4EF6`);
10412
10015
  console.log(JSON.stringify(callbackResp));
10413
10016
  } catch (error) {
10414
10017
  const message = error instanceof Error ? error.message : String(error);
@@ -10430,25 +10033,14 @@ function resolveTosutilPath(tosutilPath) {
10430
10033
  async function fetchPreUpload(appId, bucketId) {
10431
10034
  const response = await preUploadStaticAttachment(appId, bucketId);
10432
10035
  if (response.status_code !== "0") {
10433
- throw new Error(
10434
- tDev("build.uploadStatic.error.preUploadStaticBadStatus", {
10435
- statusCode: response.status_code,
10436
- response: JSON.stringify(response)
10437
- })
10438
- );
10036
+ throw new Error(`preUploadStatic \u8FD4\u56DE\u5F02\u5E38, status_code: ${response.status_code}, response: ${JSON.stringify(response)}`);
10439
10037
  }
10440
10038
  const { uploadPrefix, uploadID, uploadCredential } = response.data || {};
10441
10039
  if (!uploadPrefix || !uploadID) {
10442
- throw new Error(
10443
- tDev("build.uploadStatic.error.preUploadStaticIncomplete", { response: JSON.stringify(response) })
10444
- );
10040
+ throw new Error(`preUploadStatic \u8FD4\u56DE\u6570\u636E\u4E0D\u5B8C\u6574\uFF0C\u7F3A\u5C11 uploadPrefix \u6216 uploadID, response: ${JSON.stringify(response)}`);
10445
10041
  }
10446
10042
  if (!uploadCredential?.AccessKeyID || !uploadCredential?.SecretAccessKey || !uploadCredential?.SessionToken) {
10447
- throw new Error(
10448
- tDev("build.uploadStatic.error.preUploadStaticIncompleteCredentials", {
10449
- response: JSON.stringify(response)
10450
- })
10451
- );
10043
+ throw new Error(`preUploadStatic \u8FD4\u56DE\u7684\u51ED\u8BC1\u5B57\u6BB5\u4E0D\u5B8C\u6574, response: ${JSON.stringify(response)}`);
10452
10044
  }
10453
10045
  return response;
10454
10046
  }
@@ -10468,9 +10060,9 @@ function uploadToTos(tosutilPath, confPath, sourceDir, destUrl) {
10468
10060
  );
10469
10061
  }
10470
10062
  async function resolveBucketId(appId) {
10471
- console.error(tDev("build.uploadStatic.fetchingDefaultBucket", { prefix: LOG_PREFIX }));
10063
+ console.error(`${LOG_PREFIX} \u83B7\u53D6\u9ED8\u8BA4\u5B58\u50A8\u6876...`);
10472
10064
  const bucketId = await getDefaultBucketId(appId);
10473
- console.error(tDev("build.uploadStatic.defaultBucket", { prefix: LOG_PREFIX, bucketId }));
10065
+ console.error(`${LOG_PREFIX} \u9ED8\u8BA4\u5B58\u50A8\u6876: ${bucketId}`);
10474
10066
  return bucketId;
10475
10067
  }
10476
10068
  function isDirEmpty(dirPath) {
@@ -10486,33 +10078,25 @@ function shellEscape(value) {
10486
10078
  async function preUploadStatic(options) {
10487
10079
  try {
10488
10080
  const { appId } = options;
10489
- console.error(tDev("build.uploadStatic.fetchingDefaultBucket", { prefix: LOG_PREFIX2 }));
10081
+ console.error(`${LOG_PREFIX2} \u83B7\u53D6\u9ED8\u8BA4\u5B58\u50A8\u6876...`);
10490
10082
  const bucketId = await getDefaultBucketId(appId);
10491
- console.error(tDev("build.uploadStatic.defaultBucket", { prefix: LOG_PREFIX2, bucketId }));
10492
- console.error(tDev("build.preUploadStatic.calling", { prefix: LOG_PREFIX2 }));
10083
+ console.error(`${LOG_PREFIX2} \u9ED8\u8BA4\u5B58\u50A8\u6876: ${bucketId}`);
10084
+ console.error(`${LOG_PREFIX2} \u8C03\u7528 preUploadStatic...`);
10493
10085
  const response = await preUploadStaticAttachment(appId, bucketId);
10494
10086
  if (response.status_code !== "0") {
10495
- console.error(
10496
- tDev("build.preUploadStatic.badStatus", { prefix: LOG_PREFIX2, statusCode: response.status_code })
10497
- );
10498
- console.error(
10499
- tDev("build.preUploadStatic.response", { prefix: LOG_PREFIX2, response: JSON.stringify(response) })
10500
- );
10087
+ console.error(`${LOG_PREFIX2} preUploadStatic \u8FD4\u56DE\u5F02\u5E38, status_code: ${response.status_code}`);
10088
+ console.error(`${LOG_PREFIX2} preUploadStatic \u54CD\u5E94: ${JSON.stringify(response)}`);
10501
10089
  return;
10502
10090
  }
10503
- const { downloadURLPrefix, uploadPrefix, uploadID, uploadCredential, endpoint, region } = response.data || {};
10091
+ const { downloadURLPrefix, uploadPrefix, uploadID, uploadCredential } = response.data || {};
10504
10092
  if (!downloadURLPrefix || !uploadPrefix || !uploadID) {
10505
- console.error(tDev("build.preUploadStatic.incompleteData", { prefix: LOG_PREFIX2 }));
10506
- console.error(
10507
- tDev("build.preUploadStatic.response", { prefix: LOG_PREFIX2, response: JSON.stringify(response) })
10508
- );
10093
+ console.error(`${LOG_PREFIX2} preUploadStatic \u8FD4\u56DE\u6570\u636E\u4E0D\u5B8C\u6574`);
10094
+ console.error(`${LOG_PREFIX2} preUploadStatic \u54CD\u5E94: ${JSON.stringify(response)}`);
10509
10095
  return;
10510
10096
  }
10511
10097
  if (!uploadCredential?.AccessKeyID || !uploadCredential?.SecretAccessKey || !uploadCredential?.SessionToken) {
10512
- console.error(tDev("build.preUploadStatic.incompleteCredentials", { prefix: LOG_PREFIX2 }));
10513
- console.error(
10514
- tDev("build.preUploadStatic.response", { prefix: LOG_PREFIX2, response: JSON.stringify(response) })
10515
- );
10098
+ console.error(`${LOG_PREFIX2} preUploadStatic \u8FD4\u56DE\u7684\u51ED\u8BC1\u5B57\u6BB5\u4E0D\u5B8C\u6574`);
10099
+ console.error(`${LOG_PREFIX2} preUploadStatic \u54CD\u5E94: ${JSON.stringify(response)}`);
10516
10100
  return;
10517
10101
  }
10518
10102
  console.log(`export STATIC_ASSETS_BASE_URL="${shellEscape(downloadURLPrefix)}"`);
@@ -10522,9 +10106,7 @@ async function preUploadStatic(options) {
10522
10106
  console.log(`export STATIC_UPLOAD_SK="${shellEscape(uploadCredential.SecretAccessKey)}"`);
10523
10107
  console.log(`export STATIC_UPLOAD_TOKEN="${shellEscape(uploadCredential.SessionToken)}"`);
10524
10108
  console.log(`export STATIC_UPLOAD_BUCKET_ID="${shellEscape(bucketId)}"`);
10525
- console.log(`export STATIC_UPLOAD_ENDPOINT="${shellEscape(endpoint ?? "")}"`);
10526
- console.log(`export STATIC_UPLOAD_REGION="${shellEscape(region ?? "")}"`);
10527
- console.error(tDev("build.preUploadStatic.envExported", { prefix: LOG_PREFIX2 }));
10109
+ console.error(`${LOG_PREFIX2} \u73AF\u5883\u53D8\u91CF\u5DF2\u8F93\u51FA`);
10528
10110
  } catch (error) {
10529
10111
  const message = error instanceof Error ? error.message : String(error);
10530
10112
  console.error(`${LOG_PREFIX2} Warning: ${message}`);
@@ -10545,7 +10127,7 @@ var uploadStaticCommand = {
10545
10127
  name: "upload-static",
10546
10128
  description: "Upload shared/static files to TOS",
10547
10129
  register(program) {
10548
- program.command(this.name).description(this.description).requiredOption("--app-id <id>", "Application ID").option("--static-dir <dir>", "Static files directory", UPLOAD_STATIC_DEFAULTS.staticDir).option("--tosutil-path <path>", "Path to tosutil binary", UPLOAD_STATIC_DEFAULTS.tosutilPath).option("--endpoint <endpoint>", `TOS endpoint (default: "${UPLOAD_STATIC_DEFAULTS.endpoint}")`).option("--region <region>", `TOS region (default: "${UPLOAD_STATIC_DEFAULTS.region}")`).action(async (options) => {
10130
+ program.command(this.name).description(this.description).requiredOption("--app-id <id>", "Application ID").option("--static-dir <dir>", "Static files directory", UPLOAD_STATIC_DEFAULTS.staticDir).option("--tosutil-path <path>", "Path to tosutil binary", UPLOAD_STATIC_DEFAULTS.tosutilPath).option("--endpoint <endpoint>", "TOS endpoint", UPLOAD_STATIC_DEFAULTS.endpoint).option("--region <region>", "TOS region", UPLOAD_STATIC_DEFAULTS.region).action(async (options) => {
10549
10131
  await uploadStatic(options);
10550
10132
  });
10551
10133
  }