create-lupine 1.2.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -7
- package/index.js +236 -109
- package/package.json +1 -1
- package/templates/common/.agents/skills/lupine-framework/SKILL.md +3 -3
- package/templates/common/.agents/skills/lupine-framework/references/backend-api.md +16 -1
- package/templates/common/.agents/skills/lupine-framework/references/icon-handling.md +1 -1
- package/templates/common/.agents/skills/lupine-framework/references/mobile-interactions.md +17 -88
- package/templates/common/.agents/skills/lupine-framework/references/native-apps.md +47 -24
- package/templates/common/.agents/skills/lupine-framework/references/navigation-and-routing.md +1 -0
- package/templates/common/.agents/skills/lupine-framework/references/reactivity-and-state.md +2 -2
- package/templates/common/.agents/skills/lupine-framework/references/styling-and-themes.md +3 -1
- package/templates/common/.env.development +2 -0
- package/templates/common/.env.mobile +4 -3
- package/templates/common/_env +10 -5
- package/templates/common/apps/server/README.md +10 -0
- package/templates/common/dev/cp-folder.js +9 -4
- package/templates/lupine-template-cv-starter/README.md +33 -1
- package/templates/lupine-template-cv-starter/app/package.json +20 -0
- package/templates/lupine-template-cv-starter/app/src/app.tsx +6 -0
- package/templates/lupine-template-cv-starter/app/src/index.native.tsx +4 -0
- package/templates/lupine-template-cv-starter/app/src/index.test.tsx +71 -0
- package/templates/lupine-template-cv-starter/app/src/index.web.tsx +28 -0
- package/templates/lupine-template-cv-starter/app/tsconfig.json +17 -0
- package/templates/lupine-template-cv-starter/lupine.json +8 -7
- package/templates/lupine-template-cv-starter/web/src/index.html +9 -2
- package/templates/lupine-template-cv-starter/web/src/index.tsx +9 -14
- package/templates/lupine-template-cv-starter/web/src/lupine-template-cv-starter/index.html +9 -2
- package/templates/lupine-template-cv-starter/web/src/lupine-template-cv-starter/index.tsx +4 -20
- package/templates/lupine-template-doc-starter/README.md +33 -1
- package/templates/lupine-template-doc-starter/app/package.json +20 -0
- package/templates/lupine-template-doc-starter/app/src/app.tsx +6 -0
- package/templates/lupine-template-doc-starter/app/src/index.native.tsx +4 -0
- package/templates/lupine-template-doc-starter/app/src/index.test.tsx +78 -0
- package/templates/lupine-template-doc-starter/app/src/index.web.tsx +28 -0
- package/templates/lupine-template-doc-starter/app/tsconfig.json +17 -0
- package/templates/lupine-template-doc-starter/lupine.json +8 -7
- package/templates/lupine-template-doc-starter/web/src/index.html +9 -2
- package/templates/lupine-template-doc-starter/web/src/index.tsx +9 -14
- package/templates/lupine-template-doc-starter/web/src/lupine-template-doc-starter/index.html +9 -2
- package/templates/lupine-template-doc-starter/web/src/lupine-template-doc-starter/index.tsx +4 -20
- package/templates/lupine-template-fullstack-note/README.md +83 -0
- package/templates/{lupine-template-cv-starter → lupine-template-fullstack-note}/api/package.json +2 -2
- package/templates/lupine-template-fullstack-note/api/resources/install.mysql.sql +32 -0
- package/templates/lupine-template-fullstack-note/api/resources/install.sqlite.sql +27 -0
- package/templates/lupine-template-fullstack-note/api/src/service/answer.ts +39 -0
- package/templates/lupine-template-fullstack-note/api/src/service/api.ts +52 -0
- package/templates/lupine-template-fullstack-note/api/src/service/db.ts +78 -0
- package/templates/lupine-template-fullstack-note/api/src/service/notes-api.ts +86 -0
- package/templates/lupine-template-fullstack-note/api/src/service/root-api.ts +19 -0
- package/templates/lupine-template-fullstack-note/api/src/service/user-api.ts +182 -0
- package/templates/lupine-template-fullstack-note/app/package.json +19 -0
- package/templates/lupine-template-fullstack-note/app/src/app.tsx +75 -0
- package/templates/lupine-template-fullstack-note/app/src/index.native.tsx +4 -0
- package/templates/lupine-template-fullstack-note/app/src/index.test.tsx +373 -0
- package/templates/lupine-template-fullstack-note/app/src/index.web.tsx +20 -0
- package/templates/lupine-template-fullstack-note/app/src/pages/components.tsx +65 -0
- package/templates/lupine-template-fullstack-note/app/src/pages/details.tsx +38 -0
- package/templates/lupine-template-fullstack-note/app/src/pages/discover.tsx +25 -0
- package/templates/lupine-template-fullstack-note/app/src/pages/home.tsx +76 -0
- package/templates/lupine-template-fullstack-note/app/src/pages/inbox.tsx +49 -0
- package/templates/lupine-template-fullstack-note/app/src/pages/login.tsx +54 -0
- package/templates/lupine-template-fullstack-note/app/src/pages/me.tsx +32 -0
- package/templates/lupine-template-fullstack-note/app/src/pages/notes.tsx +128 -0
- package/templates/lupine-template-fullstack-note/app/src/pages/settings.tsx +45 -0
- package/templates/lupine-template-fullstack-note/app/src/shell/AppMenu.tsx +44 -0
- package/templates/lupine-template-fullstack-note/app/src/shell/api.ts +159 -0
- package/templates/lupine-template-fullstack-note/app/src/shell/data.ts +20 -0
- package/templates/lupine-template-fullstack-note/app/src/shell/locales/ja.ts +80 -0
- package/templates/lupine-template-fullstack-note/app/src/shell/locales/zh-CN.ts +80 -0
- package/templates/lupine-template-fullstack-note/app/src/shell/texts.ts +14 -0
- package/templates/lupine-template-fullstack-note/app/tsconfig.json +17 -0
- package/templates/lupine-template-fullstack-note/lupine.json +25 -0
- package/templates/lupine-template-fullstack-note/web/assets/favicon.ico +0 -0
- package/templates/{lupine-template-doc-starter/api → lupine-template-fullstack-note/web}/package.json +2 -2
- package/templates/lupine-template-fullstack-note/web/src/index.html +23 -0
- package/templates/lupine-template-fullstack-note/web/src/index.tsx +15 -0
- package/templates/lupine-template-fullstack-starter/README.md +64 -14
- package/templates/lupine-template-fullstack-starter/api/resources/install.mysql.sql +2 -2
- package/templates/lupine-template-fullstack-starter/api/resources/install.sqlite.sql +2 -2
- package/templates/lupine-template-fullstack-starter/api/src/service/contact-api.ts +2 -2
- package/templates/lupine-template-fullstack-starter/api/src/service/user-api.ts +72 -47
- package/templates/lupine-template-fullstack-starter/app/package.json +20 -0
- package/templates/lupine-template-fullstack-starter/app/src/app.tsx +76 -0
- package/templates/lupine-template-fullstack-starter/app/src/index.native.tsx +4 -0
- package/templates/lupine-template-fullstack-starter/app/src/index.test.tsx +276 -0
- package/templates/lupine-template-fullstack-starter/app/src/index.web.tsx +28 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/about.tsx +27 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/contact.tsx +41 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/favorite.tsx +27 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/home.tsx +63 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/login.tsx +63 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/mine.tsx +44 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/profile.tsx +58 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/register.tsx +48 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/reset-password.tsx +41 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/settings.tsx +33 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/story.tsx +46 -0
- package/templates/lupine-template-fullstack-starter/app/src/shell/api.ts +127 -0
- package/templates/lupine-template-fullstack-starter/app/src/shell/parts.tsx +100 -0
- package/templates/lupine-template-fullstack-starter/app/src/shell/stories.ts +65 -0
- package/templates/lupine-template-fullstack-starter/app/src/shell/texts.ts +79 -0
- package/templates/lupine-template-fullstack-starter/app/tsconfig.json +17 -0
- package/templates/lupine-template-fullstack-starter/lupine.json +6 -7
- package/templates/lupine-template-fullstack-starter/web/src/admin/admin-patch.tsx +34 -0
- package/templates/lupine-template-fullstack-starter/web/src/{components → admin/components}/home-search-component.tsx +18 -25
- package/templates/lupine-template-fullstack-starter/web/src/{components → admin/components}/story-card.tsx +17 -8
- package/templates/lupine-template-fullstack-starter/web/src/{components → admin/components}/story-list.tsx +1 -2
- package/templates/lupine-template-fullstack-starter/web/src/{admin_dev → admin}/index.html +1 -0
- package/templates/lupine-template-fullstack-starter/web/src/{admin_dev → admin}/index.tsx +13 -28
- package/templates/lupine-template-fullstack-starter/web/src/{pages → admin/pages}/admin-cfg.tsx +23 -19
- package/templates/lupine-template-fullstack-starter/web/src/{pages → admin/pages}/admin-item-edit.tsx +3 -4
- package/templates/lupine-template-fullstack-starter/web/src/{pages → admin/pages}/admin-item-list.tsx +2 -3
- package/templates/lupine-template-fullstack-starter/web/src/{pages → admin/pages}/admin-user.tsx +15 -20
- package/templates/lupine-template-fullstack-starter/web/src/index.html +8 -2
- package/templates/lupine-template-fullstack-starter/web/src/index.tsx +11 -150
- package/templates/lupine-template-fullstack-starter/web/src/services/fetch-data.ts +7 -25
- package/templates/lupine-template-fullstack-starter/web/src/styles/base-css.ts +0 -3
- package/templates/lupine-template-fullstack-starter/web/src/styles/theme.ts +1 -2
- package/templates/lupine-template-responsive-starter/README.md +46 -2
- package/templates/lupine-template-responsive-starter/app/package.json +19 -0
- package/templates/lupine-template-responsive-starter/app/src/app.tsx +80 -0
- package/templates/lupine-template-responsive-starter/app/src/index.native.tsx +4 -0
- package/templates/lupine-template-responsive-starter/app/src/index.test.tsx +283 -0
- package/templates/lupine-template-responsive-starter/app/src/index.web.tsx +31 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/about.tsx +23 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/finance.tsx +48 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/mine.tsx +60 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/not-found.tsx +9 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/note-detail.tsx +43 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/note-edit.tsx +45 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/note-search.tsx +62 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/notes.tsx +71 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/settings.tsx +55 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/tools.tsx +112 -0
- package/templates/lupine-template-responsive-starter/app/src/shell/icons.ts +7 -0
- package/templates/lupine-template-responsive-starter/app/src/shell/layout.ts +18 -0
- package/templates/lupine-template-responsive-starter/app/src/shell/locales/zh-CN.ts +89 -0
- package/templates/lupine-template-responsive-starter/app/src/shell/menu.tsx +81 -0
- package/templates/lupine-template-responsive-starter/app/src/shell/nav.ts +12 -0
- package/templates/lupine-template-responsive-starter/app/src/shell/store.ts +72 -0
- package/templates/lupine-template-responsive-starter/app/src/shell/texts.ts +11 -0
- package/templates/lupine-template-responsive-starter/app/tsconfig.json +17 -0
- package/templates/lupine-template-responsive-starter/lupine.json +7 -6
- package/templates/lupine-template-responsive-starter/web/src/index.html +9 -2
- package/templates/lupine-template-responsive-starter/web/src/index.tsx +9 -25
- package/templates/lupine-template-responsive-starter/web/src/lupine-template-responsive-starter/index.html +12 -6
- package/templates/lupine-template-responsive-starter/web/src/lupine-template-responsive-starter/index.tsx +12 -22
- package/templates/common/apps/server/src/app-loader.ts +0 -4
- package/templates/lupine-template-cv-starter/api/resources/config_default.json +0 -6
- package/templates/lupine-template-cv-starter/api/resources/install.sqlite.sql +0 -4
- package/templates/lupine-template-cv-starter/api/src/index.ts +0 -15
- package/templates/lupine-template-cv-starter/web/src/client-env-keys.ts +0 -5
- package/templates/lupine-template-cv-starter/web/src/styles/base-css.ts +0 -15
- package/templates/lupine-template-doc-starter/api/resources/config_default.json +0 -6
- package/templates/lupine-template-doc-starter/api/resources/install.sqlite.sql +0 -4
- package/templates/lupine-template-doc-starter/api/src/index.ts +0 -15
- package/templates/lupine-template-doc-starter/api/src/resources/config_default.json +0 -6
- package/templates/lupine-template-doc-starter/api/src/resources/install.sqlite.sql +0 -4
- package/templates/lupine-template-doc-starter/web/src/client-env-keys.ts +0 -5
- package/templates/lupine-template-doc-starter/web/src/styles/base-css.ts +0 -15
- package/templates/lupine-template-fullstack-starter/web/src/admin_dev/admin-about.tsx +0 -16
- package/templates/lupine-template-fullstack-starter/web/src/admin_dev/admin-patch.ts +0 -22
- package/templates/lupine-template-fullstack-starter/web/src/components/footer-menu.tsx +0 -52
- package/templates/lupine-template-fullstack-starter/web/src/components/footer.tsx +0 -15
- package/templates/lupine-template-fullstack-starter/web/src/components/header.tsx +0 -75
- package/templates/lupine-template-fullstack-starter/web/src/components/login-code-zh.tsx +0 -162
- package/templates/lupine-template-fullstack-starter/web/src/components/login-code.tsx +0 -165
- package/templates/lupine-template-fullstack-starter/web/src/components/login-zh.tsx +0 -118
- package/templates/lupine-template-fullstack-starter/web/src/components/login.tsx +0 -122
- package/templates/lupine-template-fullstack-starter/web/src/components/not-found-page.tsx +0 -12
- package/templates/lupine-template-fullstack-starter/web/src/components/register-zh.tsx +0 -161
- package/templates/lupine-template-fullstack-starter/web/src/components/register.tsx +0 -163
- package/templates/lupine-template-fullstack-starter/web/src/components/reset-password-zh.tsx +0 -166
- package/templates/lupine-template-fullstack-starter/web/src/components/reset-password.tsx +0 -177
- package/templates/lupine-template-fullstack-starter/web/src/components/user-info.tsx +0 -84
- package/templates/lupine-template-fullstack-starter/web/src/frames/admin-page-frame.tsx +0 -48
- package/templates/lupine-template-fullstack-starter/web/src/frames/frame1-page-frame.tsx +0 -61
- package/templates/lupine-template-fullstack-starter/web/src/frames/frame2-page-frame.tsx +0 -61
- package/templates/lupine-template-fullstack-starter/web/src/frames/top-frame.tsx +0 -23
- package/templates/lupine-template-fullstack-starter/web/src/frames/user-page-frame.tsx +0 -90
- package/templates/lupine-template-fullstack-starter/web/src/models/index.ts +0 -15
- package/templates/lupine-template-fullstack-starter/web/src/pages/contact.tsx +0 -105
- package/templates/lupine-template-fullstack-starter/web/src/pages/page1-page.tsx +0 -38
- package/templates/lupine-template-fullstack-starter/web/src/pages/page2-page.tsx +0 -38
- package/templates/lupine-template-fullstack-starter/web/src/pages/user-favorite-page.tsx +0 -58
- package/templates/lupine-template-fullstack-starter/web/src/pages/user-home-page.tsx +0 -27
- package/templates/lupine-template-fullstack-starter/web/src/pages/user-mine-page.tsx +0 -54
- package/templates/lupine-template-fullstack-starter/web/src/pages/user-profile-page-zh.tsx +0 -112
- package/templates/lupine-template-fullstack-starter/web/src/pages/user-profile-page.tsx +0 -112
- package/templates/lupine-template-fullstack-starter/web/src/pages/user1-page.tsx +0 -57
- package/templates/lupine-template-fullstack-starter/web/src/services/shared-data.ts +0 -19
- package/templates/lupine-template-fullstack-starter/web/src/styles/app.css +0 -0
- package/templates/lupine-template-responsive-starter/api/package.json +0 -6
- package/templates/lupine-template-responsive-starter/api/resources/config_default.json +0 -6
- package/templates/lupine-template-responsive-starter/api/resources/install.sqlite.sql +0 -4
- package/templates/lupine-template-responsive-starter/api/src/service/root-api.ts +0 -18
- package/templates/lupine-template-responsive-starter/web/src/app-icons.ts +0 -76
- package/templates/lupine-template-responsive-starter/web/src/components/input-history-component.tsx +0 -93
- package/templates/lupine-template-responsive-starter/web/src/components/mine-about-page.tsx +0 -87
- package/templates/lupine-template-responsive-starter/web/src/components/mine-premium-page.tsx +0 -81
- package/templates/lupine-template-responsive-starter/web/src/components/mine-settings-page.tsx +0 -211
- package/templates/lupine-template-responsive-starter/web/src/components/mobile-top-search-menu.tsx +0 -107
- package/templates/lupine-template-responsive-starter/web/src/components/note-detail.tsx +0 -110
- package/templates/lupine-template-responsive-starter/web/src/components/note-edit.tsx +0 -144
- package/templates/lupine-template-responsive-starter/web/src/components/note-search-page.tsx +0 -188
- package/templates/lupine-template-responsive-starter/web/src/components/search-input.tsx +0 -95
- package/templates/lupine-template-responsive-starter/web/src/components/side-menu-content.tsx +0 -169
- package/templates/lupine-template-responsive-starter/web/src/frames/app-responsive-frame.tsx +0 -53
- package/templates/lupine-template-responsive-starter/web/src/pages/about-page.tsx +0 -32
- package/templates/lupine-template-responsive-starter/web/src/pages/finance-page.tsx +0 -35
- package/templates/lupine-template-responsive-starter/web/src/pages/home-page.tsx +0 -444
- package/templates/lupine-template-responsive-starter/web/src/pages/mine-page.tsx +0 -318
- package/templates/lupine-template-responsive-starter/web/src/pages/tools-page.tsx +0 -35
- package/templates/lupine-template-responsive-starter/web/src/services/local-notes-service.ts +0 -87
- package/templates/lupine-template-responsive-starter/web/src/services/mine-service.ts +0 -45
- package/templates/lupine-template-responsive-starter/web/src/styles/app.css +0 -0
- package/templates/lupine-template-responsive-starter/web/src/styles/base-css.ts +0 -65
- package/templates/lupine-template-responsive-starter/web/src/styles/global.css +0 -2130
- package/templates/lupine-template-responsive-starter/web/src/styles/theme.ts +0 -17
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/en/01-experience/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/en/02-projects/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/en/03-skills/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/en/04-education/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/en/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/zh/01-experience/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/zh/02-projects/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/zh/03-skills/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/zh/04-education/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/zh/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/en/01-experience/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/en/02-projects/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/en/03-skills/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/en/04-education/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/en/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/markdown-config.ts +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/zh/01-experience/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/zh/02-projects/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/zh/03-skills/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/zh/04-education/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/zh/index.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/en/essentials/index.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/en/essentials/list.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/en/guide/install.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/en/guide/started.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/en/index.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/index.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/zh/essentials/index.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/zh/essentials/list.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/zh/guide/install.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/zh/guide/started.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/zh/index.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/en/essentials/index.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/en/essentials/list.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/en/guide/install.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/en/guide/started.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/en/index.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/index.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/markdown-config.ts +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/zh/essentials/index.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/zh/essentials/list.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/zh/guide/install.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/zh/guide/started.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/zh/index.html +0 -0
- /package/templates/{lupine-template-responsive-starter → lupine-template-fullstack-note}/api/src/index.ts +0 -0
- /package/templates/lupine-template-fullstack-starter/{web/assets/images → app/assets}/sample.png +0 -0
- /package/templates/lupine-template-fullstack-starter/web/src/{components → admin/components}/story-props.ts +0 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export const zhCN = {
|
|
2
|
+
app: { name: 'Lupine 笔记', tagline: '一套代码:iOS、Android、网页和桌面' },
|
|
3
|
+
nav: { home: '首页', components: '组件', discover: '创建', inbox: '消息', me: '我的', settings: '设置', about: '关于', menu: '菜单' },
|
|
4
|
+
home: {
|
|
5
|
+
welcome: '欢迎回来',
|
|
6
|
+
featured: '推荐',
|
|
7
|
+
shortcuts: '快捷入口',
|
|
8
|
+
recent: '最近项目',
|
|
9
|
+
openPanel: '打开滑动窗口',
|
|
10
|
+
panelText: '这个窗口从右侧滑入,覆盖当前页面——适合不需要独立网址的详情和表单。',
|
|
11
|
+
seeAll: '全部',
|
|
12
|
+
},
|
|
13
|
+
discover: { title: '新建', note: '新建笔记', photo: '拍照', task: '新建任务', created: '已创建:{what}' },
|
|
14
|
+
inbox: { empty: '没有新消息', markRead: '全部标为已读', unread: '{n} 条未读' },
|
|
15
|
+
me: { guest: '游客', signIn: '登录', profile: '个人资料', favourites: '我的收藏', history: '浏览历史', help: '帮助与反馈' },
|
|
16
|
+
settings: {
|
|
17
|
+
appearance: '外观',
|
|
18
|
+
theme: '主题',
|
|
19
|
+
language: '语言',
|
|
20
|
+
textSize: '字体大小',
|
|
21
|
+
notifications: '通知',
|
|
22
|
+
pushEnabled: '推送通知',
|
|
23
|
+
sound: '声音',
|
|
24
|
+
storage: '存储',
|
|
25
|
+
clearCache: '清除缓存',
|
|
26
|
+
cacheCleared: '缓存已清除',
|
|
27
|
+
app: '应用',
|
|
28
|
+
server: '服务器',
|
|
29
|
+
thisSite: '本网站',
|
|
30
|
+
version: '版本',
|
|
31
|
+
},
|
|
32
|
+
item: { title: '项目 {id}', body: '详情页是普通路由(/item/[id]):支持深度链接和浏览器后退,网页服务器也可以直接渲染它。' },
|
|
33
|
+
auth: {
|
|
34
|
+
signIn: '登录',
|
|
35
|
+
register: '注册账号',
|
|
36
|
+
username: '用户名',
|
|
37
|
+
usernameRule: '3 到 50 个字符:字母、数字、_ . @ -',
|
|
38
|
+
password: '密码',
|
|
39
|
+
password2: '再次输入密码',
|
|
40
|
+
passwordsDiffer: '两次输入的密码不一致',
|
|
41
|
+
haveAccount: '已有账号,去登录',
|
|
42
|
+
noAccount: '没有账号?注册',
|
|
43
|
+
signOut: '退出登录',
|
|
44
|
+
welcome: '已登录:{name}',
|
|
45
|
+
registered: '欢迎,{name}:账号已创建',
|
|
46
|
+
server: '服务器',
|
|
47
|
+
thisSite: '本网站',
|
|
48
|
+
},
|
|
49
|
+
notes: {
|
|
50
|
+
title: '我的笔记',
|
|
51
|
+
placeholder: '写点什么…',
|
|
52
|
+
add: '添加',
|
|
53
|
+
empty: '还没有笔记',
|
|
54
|
+
signInFirst: '登录后可以把笔记保存到服务器',
|
|
55
|
+
signInText: '笔记跟随账号保存,在每台设备和网页上都能看到。',
|
|
56
|
+
deleted: '已删除',
|
|
57
|
+
retry: '重试',
|
|
58
|
+
more: '更早的笔记',
|
|
59
|
+
},
|
|
60
|
+
// the texts of the codes of the API (shell/api.ts: messageOf)
|
|
61
|
+
api: {
|
|
62
|
+
offline: '无法连接服务器',
|
|
63
|
+
bad_answer: '服务器返回了意外的结果({status})',
|
|
64
|
+
bad_request: '服务器无法理解该请求',
|
|
65
|
+
bad_username: '用户名:3 到 50 个字符(字母、数字、_ . @ -)',
|
|
66
|
+
bad_password: '密码:6 到 256 个字符',
|
|
67
|
+
username_taken: '该用户名已被使用',
|
|
68
|
+
login_failed: '用户名或密码错误',
|
|
69
|
+
too_many_attempts: '登录失败次数过多,请 {minutes} 分钟后再试',
|
|
70
|
+
not_signed_in: '请重新登录',
|
|
71
|
+
bad_note: '笔记需要 1 到 2000 个字符',
|
|
72
|
+
too_many_notes: '最多 {max} 条笔记:请先删除一些',
|
|
73
|
+
note_not_found: '这条笔记已不存在',
|
|
74
|
+
no_crypto_key: '服务器的 .env 中没有设置 CRYPTO_KEY',
|
|
75
|
+
forbidden_origin: '服务器拒绝了来自此页面的请求',
|
|
76
|
+
server_error: '服务器出错了',
|
|
77
|
+
failed: '出错了',
|
|
78
|
+
},
|
|
79
|
+
about: { text: '基于 lupine.native。修改 src/pages 中的页面,src/shell 中的框架。' },
|
|
80
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { addLnTexts, addTexts, lnJa, lnZhHans, setLanguages } from 'lupine.native.components';
|
|
2
|
+
import { ja } from './locales/ja';
|
|
3
|
+
import { zhCN } from './locales/zh-CN';
|
|
4
|
+
|
|
5
|
+
// English is in the code: t('home.welcome', 'Welcome back'); here the other languages
|
|
6
|
+
addTexts('zh-CN', zhCN);
|
|
7
|
+
addTexts('ja', ja);
|
|
8
|
+
// and those of the controls
|
|
9
|
+
addLnTexts({ 'zh-Hans': lnZhHans, ja: lnJa });
|
|
10
|
+
setLanguages([
|
|
11
|
+
{ code: 'en', name: 'English' },
|
|
12
|
+
{ code: 'zh-CN', name: '简体中文' },
|
|
13
|
+
{ code: 'ja', name: '日本語' },
|
|
14
|
+
]);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es2020",
|
|
4
|
+
"lib": ["es2020"],
|
|
5
|
+
"types": [],
|
|
6
|
+
"jsx": "react-jsx",
|
|
7
|
+
"jsxImportSource": "lupine.native.core",
|
|
8
|
+
"module": "esnext",
|
|
9
|
+
"moduleResolution": "bundler",
|
|
10
|
+
"strict": true,
|
|
11
|
+
"noEmit": true,
|
|
12
|
+
"skipLibCheck": true
|
|
13
|
+
},
|
|
14
|
+
// the web entry is the only file that may use the DOM, so it isn't checked with these settings
|
|
15
|
+
"include": ["src"],
|
|
16
|
+
"exclude": ["src/index.web.tsx"]
|
|
17
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "lupine-template-fullstack-note",
|
|
3
|
+
"nativeOut": "dist/native",
|
|
4
|
+
"nativeApp": "app",
|
|
5
|
+
"webEntryPoints": [
|
|
6
|
+
{
|
|
7
|
+
"index": "web/src/index.tsx",
|
|
8
|
+
"html": "web/src/index.html",
|
|
9
|
+
"outdir": "/"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"apiEntryPoint": "api/src/index.ts",
|
|
13
|
+
"copyFiles": [
|
|
14
|
+
{
|
|
15
|
+
"env": "all",
|
|
16
|
+
"from": "web/assets",
|
|
17
|
+
"to": "web/assets"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"env": "all",
|
|
21
|
+
"from": "api/resources",
|
|
22
|
+
"to": "data/resources"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html data-theme="<!--META-THEME-->">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<title><!--META-TITLE--></title>
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
|
7
|
+
<!--META-ENV-START-->
|
|
8
|
+
<!--META-ENV-END-->
|
|
9
|
+
<link rel="shortcut icon" href="/assets/favicon.ico?t={hash}" type="image/x-icon" />
|
|
10
|
+
<style>
|
|
11
|
+
html,
|
|
12
|
+
body,
|
|
13
|
+
.lupine-root {
|
|
14
|
+
height: 100%;
|
|
15
|
+
margin: 0;
|
|
16
|
+
}
|
|
17
|
+
</style>
|
|
18
|
+
<script defer src="{SUBDIR}/index.js?t={hash}"></script>
|
|
19
|
+
</head>
|
|
20
|
+
<body>
|
|
21
|
+
<div class="lupine-root"></div>
|
|
22
|
+
</body>
|
|
23
|
+
</html>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { bindRouter, PageRouter, setDefaultPageTitle } from 'lupine.web';
|
|
2
|
+
import { AppPage } from '../../app/src/index.web';
|
|
3
|
+
// the primitives of the app in the page that the server renders
|
|
4
|
+
import 'lupine.native.core/web/server';
|
|
5
|
+
|
|
6
|
+
// The page of the site is the app (apps/lupine-template-fullstack-note/app), in the same bundle. Pages of the site itself
|
|
7
|
+
// go into pageRouter before it, such as pageRouter.use('/note/:id', NotePage). keep: the app is made once and stays; when
|
|
8
|
+
// the address changes (its own pages, the back button) it follows the address itself.
|
|
9
|
+
// The app calls the API of this site (/api, api/src/service) with the cookie of the session.
|
|
10
|
+
|
|
11
|
+
setDefaultPageTitle('Lupine Notes');
|
|
12
|
+
|
|
13
|
+
const pageRouter = new PageRouter();
|
|
14
|
+
pageRouter.use('*', AppPage, { keep: true });
|
|
15
|
+
bindRouter(pageRouter);
|
|
@@ -1,21 +1,71 @@
|
|
|
1
|
-
# Full-stack
|
|
1
|
+
# Full-stack Starter
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
One app for iOS, Android, macOS, Windows and the web (lupine.native), a web site that serves the web version of it with admin pages (lupine.web), and an API with a database (lupine.api).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
<!-- screenshots macos=1 windows=13 web=/ ios=1,11 android=11,13 -->
|
|
6
|
+
<table>
|
|
7
|
+
<tr><th>macOS</th><th>Windows</th><th>Web</th></tr>
|
|
8
|
+
<tr><td><a href="docs/macos-1-home.png"><img src="docs/macos-1-home.png" width="253" alt="macOS"></a></td><td><a href="docs/windows-13-signed-in.png"><img src="docs/windows-13-signed-in.png" width="253" alt="Windows"></a></td><td><a href="docs/web-1.png"><img src="docs/web-1.png" width="253" alt="Web"></a></td></tr>
|
|
9
|
+
</table>
|
|
10
|
+
<table>
|
|
11
|
+
<tr><th colspan="2">iOS</th><th colspan="2">Android</th></tr>
|
|
12
|
+
<tr><td><a href="docs/ios-1-home.png"><img src="docs/ios-1-home.png" width="183" alt="iOS"></a></td><td><a href="docs/ios-11-dark.png"><img src="docs/ios-11-dark.png" width="183" alt="iOS"></a></td><td><a href="docs/android-11-dark.png"><img src="docs/android-11-dark.png" width="183" alt="Android"></a></td><td><a href="docs/android-13-signed-in.png"><img src="docs/android-13-signed-in.png" width="183" alt="Android"></a></td></tr>
|
|
13
|
+
</table>
|
|
14
|
+
<!-- /screenshots -->
|
|
15
|
+
|
|
16
|
+
| Part | |
|
|
6
17
|
| --- | --- |
|
|
7
|
-
|
|
|
8
|
-
|
|
|
9
|
-
|
|
|
10
|
-
|
|
|
11
|
-
|
|
|
12
|
-
|
|
13
|
-
|
|
18
|
+
| `app/` | the app: stories (list, search, story page), sign-in with a password or a code by e-mail, registration, new password, the user's pages (mine, favorites, profile, contact), settings (theme, English / Chinese), about. Its settings: `lupineNative` in `app/package.json`; the Chinese texts: `app/src/shell/texts.ts` |
|
|
19
|
+
| `web/` | the site: every address is the web version of the app, rendered on the server (`web/src/index.tsx`) |
|
|
20
|
+
| `/admin` | the admin pages, an entry of their own in `lupine.json` (`web/src/admin`): an admin of the app sees Site (stories, users, the website); the developer (`DEV_ADMIN_USER` / `DEV_ADMIN_PASS`) sees the tools too (database, logs, settings) |
|
|
21
|
+
| `api/` | the API: routes in `api/src/service/api.ts`; sign-in, codes and profile in `user-api.ts`; `admin-api.ts`, `contact-api.ts` |
|
|
22
|
+
| `lupine.json` | what `npm run dev` builds; `"nativeApp": "app"` and `"nativeOut": "dist/native"` for `lupine-native` |
|
|
23
|
+
|
|
24
|
+
The stories are sample data (`app/src/shell/stories.ts`), and the favorites are kept on the device for each user; a real app gets both from its API.
|
|
14
25
|
|
|
15
26
|
## First start
|
|
16
27
|
|
|
17
|
-
1. In `.env`: `CRYPTO_KEY`, `ADMIN_USER` / `ADMIN_PASS`, `DEV_ADMIN_USER` / `DEV_ADMIN_PASS`
|
|
18
|
-
2. `npm run dev
|
|
19
|
-
3. The contact form sends to
|
|
28
|
+
1. In `.env`: `CRYPTO_KEY`, `ADMIN_USER` / `ADMIN_PASS`, `DEV_ADMIN_USER` / `DEV_ADMIN_PASS`, and for mail `SEND_EMAIL_USER` / `SEND_EMAIL_PASS`. The two passwords are hashes: create-lupine fills in hashes of random passwords that nobody knows, so make hashes of yours with the command in the comment above them.
|
|
29
|
+
2. `npm run dev` with `lupine-template-fullstack-starter` in `APPS` and a `DOMAINS:lupine-template-fullstack-starter=...` line, then open `/admin`, sign in as `DEV_ADMIN_USER` and create the tables from `api/resources/install.sqlite.sql` (or `install.mysql.sql`).
|
|
30
|
+
3. Sign in at `/login` as `ADMIN_USER`: Mine then shows "Admin pages" (`/admin`). The contact form sends to `siteEmail` of the settings (`/admin`, Site > Website).
|
|
31
|
+
|
|
32
|
+
## The apps
|
|
33
|
+
|
|
34
|
+
In a project of create-lupine (and in the repository of this template) the same is in the scripts: `npm run run-mac`, `run-ios`, `run-android`, `run-exe`; `build-android` (the apk for the store), `bump` (the next version), `icons` (the icons of the site from the icon of the app), `release` (a folder for the server).
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npm run native -- macos --app=apps/lupine-template-fullstack-starter --run
|
|
38
|
+
npm run native -- ios --app=apps/lupine-template-fullstack-starter --run
|
|
39
|
+
npm run native -- android --app=apps/lupine-template-fullstack-starter --run
|
|
40
|
+
npm run native -- windows --app=apps/lupine-template-fullstack-starter --run
|
|
41
|
+
npm run native -- web --app=apps/lupine-template-fullstack-starter --watch # the app alone, as a static page
|
|
42
|
+
npm run native -- test macos --app=apps/lupine-template-fullstack-starter # app/src/index.test.tsx
|
|
43
|
+
# the apps for the stores, which call your server (WEB.API_BASE_URL of .env.mobile)
|
|
44
|
+
npm run native -- android --app=apps/lupine-template-fullstack-starter --release --env=.env.mobile
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The builds are in `dist/native/lupine-template-fullstack-starter-app/<platform>`.
|
|
48
|
+
|
|
49
|
+
## The address of the API
|
|
50
|
+
|
|
51
|
+
The native apps call `WEB.API_BASE_URL` of the env file they are built with (`--env=`; `.env.development` by default, `.env.production` with `--release`), or `lupine-template-fullstack-starter.WEB.API_BASE_URL` for this app alone. Put the address of your server (`https://example.com/`) into `.env.mobile` and build the apps for the stores with `--release --env=.env.mobile`: it imports `.env`, and the site, built with `.env.production`, doesn't get the address. The key goes into the bundle, so it is public.
|
|
52
|
+
|
|
53
|
+
Without it the app calls `http://lupine-template-fullstack-starter.app.localhost:<WEB.API_PORT>`: the server of `npm run dev` on the same computer. The Android emulator uses `http://10.0.2.2:<WEB.API_PORT>` instead. The server finds the app by the host name, so add `lupine-template-fullstack-starter.app.localhost` and `10.0.2.2` to its `DOMAINS:` line, unless that line is empty (as in a new project: the app gets every host) or `*`. A phone needs an address of the computer in the network. Settings shows the address the app uses. Release builds for Android refuse plain `http://`.
|
|
54
|
+
|
|
55
|
+
In the browser the app always calls the site it comes from, and `WEB.API_BASE_URL` is not used.
|
|
56
|
+
|
|
57
|
+
## Sessions and security
|
|
58
|
+
|
|
59
|
+
- In the browser the API sets the httpOnly cookie `_token` when you sign in, so the scripts of the page never hold the token.
|
|
60
|
+
- A native app has no cookie store. It keeps the token from the sign-in answer in `storage` and sends it as `Cookie: _token=...`. The API puts the token in the answer only for requests without `Origin`, which browsers always send with a POST, so a script in a page can't get it from there either. Signing out removes it and calls `/api/logout`.
|
|
61
|
+
- The admin pages are web only. On a phone "Admin pages" opens the site in the browser, where you sign in again.
|
|
62
|
+
- A session lasts `ADMIN_SESSION_EXPIRE_DAYS` of `.env` (90 days without it): the token carries its sign-in time and the API checks it, so a copied token ends too. A new password ends all sessions of before.
|
|
63
|
+
- Writing routes are POST only and check the session. Uploads check the type and the size. A code by e-mail can be asked for once a minute and is good for 30 minutes (wrong tries don't make it last longer); the answers to asking for a code and to setting a new password don't tell whether the address has an account. The contact form takes five messages an hour from an address (per worker process, so limit it in front of the server too).
|
|
64
|
+
- Requests from native apps have no `Origin` header, so the CSRF check of the API lets them through. It still checks browsers.
|
|
65
|
+
|
|
66
|
+
## Dropped from the web-only version
|
|
20
67
|
|
|
21
|
-
|
|
68
|
+
- `/demo`: the demos of lupine.web.components are still at `/admin/demo`.
|
|
69
|
+
- The demo pages of nested frames (`/frame1`, `/frame2`, `/page1`, `/page2`, `/user1`).
|
|
70
|
+
- The lupine.web user pages (`/user/...`, `/login-code`, `/reset-pw`) and the copies in Chinese (`login-zh.tsx` and the others). The app has these pages now, with the Chinese texts in `app/src/shell/texts.ts`.
|
|
71
|
+
- The icon font in the site's own pages: they use `lupine.core/icons` (`<Icon name={icons.x} />`). The font (`web/icons-font.config.js`, `web/assets/icons-font`) stays for the pages of lupine.api in `/admin`.
|
|
@@ -46,7 +46,7 @@ CREATE TABLE IF NOT EXISTS $__s_user (
|
|
|
46
46
|
nickname VARCHAR(200) NOT NULL DEFAULT '',
|
|
47
47
|
username VARCHAR(150) NOT NULL DEFAULT '',
|
|
48
48
|
email VARCHAR(100) NOT NULL DEFAULT '',
|
|
49
|
-
password VARCHAR(
|
|
49
|
+
password VARCHAR(255) NOT NULL DEFAULT '',
|
|
50
50
|
usertype VARCHAR(25) NOT NULL DEFAULT '',
|
|
51
51
|
block CHAR(1) NOT NULL DEFAULT '0',
|
|
52
52
|
sendemail CHAR(1) DEFAULT '0',
|
|
@@ -57,7 +57,7 @@ CREATE TABLE IF NOT EXISTS $__s_user (
|
|
|
57
57
|
registerdate VARCHAR(20) NOT NULL DEFAULT '',
|
|
58
58
|
lastvisitdate VARCHAR(20) NOT NULL DEFAULT '',
|
|
59
59
|
activated CHAR(1) NOT NULL DEFAULT '0',
|
|
60
|
-
activation VARCHAR(
|
|
60
|
+
activation VARCHAR(40) NOT NULL DEFAULT '',
|
|
61
61
|
points INTEGER NOT NULL DEFAULT 0,
|
|
62
62
|
pwtips VARCHAR(100) DEFAULT '',
|
|
63
63
|
pwretry INTEGER NOT NULL DEFAULT 0,
|
|
@@ -32,7 +32,7 @@ CREATE TABLE $__s_user (
|
|
|
32
32
|
nickname VARCHAR(200) NOT NULL DEFAULT '',
|
|
33
33
|
username VARCHAR(150) NOT NULL DEFAULT '',
|
|
34
34
|
email VARCHAR(100) NOT NULL DEFAULT '',
|
|
35
|
-
password VARCHAR(
|
|
35
|
+
password VARCHAR(255) NOT NULL DEFAULT '',
|
|
36
36
|
usertype VARCHAR(25) NOT NULL DEFAULT '',
|
|
37
37
|
block CHAR(1) NOT NULL DEFAULT '0',
|
|
38
38
|
sendemail CHAR(1) DEFAULT '0',
|
|
@@ -43,7 +43,7 @@ CREATE TABLE $__s_user (
|
|
|
43
43
|
registerdate VARCHAR(20) NOT NULL DEFAULT '',
|
|
44
44
|
lastvisitdate VARCHAR(20) NOT NULL DEFAULT '',
|
|
45
45
|
activated CHAR(1) NOT NULL DEFAULT '0',
|
|
46
|
-
activation VARCHAR(
|
|
46
|
+
activation VARCHAR(40) NOT NULL DEFAULT '',
|
|
47
47
|
points INTEGER NOT NULL DEFAULT '0',
|
|
48
48
|
pwtips VARCHAR(100) DEFAULT '',
|
|
49
49
|
pwretry INTEGER NOT NULL DEFAULT '0',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ServerResponse } from 'http';
|
|
2
|
-
import { Logger, ServerRequest, ApiHelper } from 'lupine.api';
|
|
2
|
+
import { Logger, ServerRequest, ApiHelper, getClientIp } from 'lupine.api';
|
|
3
3
|
import { sendSiteEmail } from './send-email';
|
|
4
4
|
|
|
5
5
|
const logger = new Logger('qa');
|
|
@@ -11,7 +11,7 @@ const MAX_PER_HOUR = 5;
|
|
|
11
11
|
const oneLine = (s: unknown, max: number) => String(s).replace(/[\r\n]+/g, ' ').trim().slice(0, max);
|
|
12
12
|
|
|
13
13
|
export const addContact = async (req: ServerRequest, res: ServerResponse) => {
|
|
14
|
-
const ip =
|
|
14
|
+
const ip = getClientIp(req);
|
|
15
15
|
const now = Date.now();
|
|
16
16
|
const recent = (sent.get(ip) || []).filter((t) => now - t < 3600 * 1000);
|
|
17
17
|
if (recent.length >= MAX_PER_HOUR) {
|