robodev 0.22.0 → 0.24.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.
Files changed (178) hide show
  1. package/package.json +1 -1
  2. package/src/emit-starter.test.ts +36 -0
  3. package/templates/auth-chat/package.json +1 -1
  4. package/templates/backend/api/_lib.ts +9 -2
  5. package/templates/backend/package.json +1 -1
  6. package/templates/catalog.json +5 -0
  7. package/templates/empty/package.json +1 -1
  8. package/templates/marketplace/.config/local.spa.template.yml +27 -0
  9. package/templates/marketplace/.oxlint-base.json +29 -0
  10. package/templates/marketplace/.oxlintrc.json +78 -0
  11. package/templates/marketplace/.rulesync/rules/frontend-api-boundary.md +36 -0
  12. package/templates/marketplace/.rulesync/rules/frontend-component-structure.md +38 -0
  13. package/templates/marketplace/.rulesync/rules/frontend-forms.md +32 -0
  14. package/templates/marketplace/.rulesync/rules/frontend-notifications.md +24 -0
  15. package/templates/marketplace/.rulesync/rules/frontend-povio-components.md +42 -0
  16. package/templates/marketplace/.rulesync/rules/frontend-povio-ui.md +45 -0
  17. package/templates/marketplace/.rulesync/rules/frontend-query-autocomplete.md +29 -0
  18. package/templates/marketplace/.rulesync/rules/frontend-tables-and-lists.md +34 -0
  19. package/templates/marketplace/.rulesync/rules/frontend-translations.md +26 -0
  20. package/templates/marketplace/.rulesync/rules/project-overview.md +32 -0
  21. package/templates/marketplace/.rulesync/rules/robodev-api.md +30 -0
  22. package/templates/marketplace/.rulesync/rules/robodev-auth.md +40 -0
  23. package/templates/marketplace/.rulesync/rules/robodev-database.md +22 -0
  24. package/templates/marketplace/.rulesync/rules/role-based-app-structure.md +36 -0
  25. package/templates/marketplace/.rulesync/skills/media-feature/SKILL.md +21 -0
  26. package/templates/marketplace/.rulesync/skills/povio-ui-styling/SKILL.md +208 -0
  27. package/templates/marketplace/.rulesync/skills/povio-ui-styling/agents/openai.yaml +4 -0
  28. package/templates/marketplace/.rulesync/skills/robodev-api-route/SKILL.md +13 -0
  29. package/templates/marketplace/.rulesync/skills/robodev-table/SKILL.md +12 -0
  30. package/templates/marketplace/README.md +40 -0
  31. package/templates/marketplace/api/_lib.ts +677 -0
  32. package/templates/marketplace/api/cart/[id].ts +51 -0
  33. package/templates/marketplace/api/cart.ts +70 -0
  34. package/templates/marketplace/api/categories.ts +11 -0
  35. package/templates/marketplace/api/checkout.ts +157 -0
  36. package/templates/marketplace/api/health.ts +7 -0
  37. package/templates/marketplace/api/listings/[id].ts +101 -0
  38. package/templates/marketplace/api/listings/paginate.ts +29 -0
  39. package/templates/marketplace/api/listings.ts +90 -0
  40. package/templates/marketplace/api/me.ts +14 -0
  41. package/templates/marketplace/api/orders/[id]/complete.ts +27 -0
  42. package/templates/marketplace/api/orders/[id]/ship.ts +24 -0
  43. package/templates/marketplace/api/orders/[id].ts +15 -0
  44. package/templates/marketplace/api/purchases.ts +19 -0
  45. package/templates/marketplace/api/reviews.ts +58 -0
  46. package/templates/marketplace/api/sales.ts +19 -0
  47. package/templates/marketplace/api/watches/[listingId].ts +18 -0
  48. package/templates/marketplace/api/watches.ts +51 -0
  49. package/templates/marketplace/apps/fe/index.html +24 -0
  50. package/templates/marketplace/apps/fe/openapi-codegen.config.ts +72 -0
  51. package/templates/marketplace/apps/fe/package.json +84 -0
  52. package/templates/marketplace/apps/fe/public/apple-touch-icon.png +0 -0
  53. package/templates/marketplace/apps/fe/public/favicon-96x96.png +0 -0
  54. package/templates/marketplace/apps/fe/public/favicon.ico +0 -0
  55. package/templates/marketplace/apps/fe/public/favicon.svg +3 -0
  56. package/templates/marketplace/apps/fe/public/site.webmanifest +21 -0
  57. package/templates/marketplace/apps/fe/public/web-app-manifest-192x192.png +0 -0
  58. package/templates/marketplace/apps/fe/public/web-app-manifest-512x512.png +0 -0
  59. package/templates/marketplace/apps/fe/src/assets/fonts/GeneralSans-Bold.otf +0 -0
  60. package/templates/marketplace/apps/fe/src/assets/fonts/GeneralSans-Medium.otf +0 -0
  61. package/templates/marketplace/apps/fe/src/assets/fonts/GeneralSans-Regular.otf +0 -0
  62. package/templates/marketplace/apps/fe/src/assets/fonts/GeneralSans-Semibold.otf +0 -0
  63. package/templates/marketplace/apps/fe/src/assets/locales/en/translation.json +335 -0
  64. package/templates/marketplace/apps/fe/src/assets/locales/sl/translation.json +335 -0
  65. package/templates/marketplace/apps/fe/src/clients/app-rest-client.ts +15 -0
  66. package/templates/marketplace/apps/fe/src/clients/auth-token-store.ts +101 -0
  67. package/templates/marketplace/apps/fe/src/clients/rest/app-error-handler.ts +31 -0
  68. package/templates/marketplace/apps/fe/src/clients/rest/interceptors/authorization-header.interceptor.ts +15 -0
  69. package/templates/marketplace/apps/fe/src/clients/rest/interceptors/refresh-token.interceptor.ts +37 -0
  70. package/templates/marketplace/apps/fe/src/clients/rest/interceptors/response.interceptor.ts +17 -0
  71. package/templates/marketplace/apps/fe/src/components/404.tsx +18 -0
  72. package/templates/marketplace/apps/fe/src/components/features/auth/AuthBrandPanel.tsx +60 -0
  73. package/templates/marketplace/apps/fe/src/components/features/auth/AuthLayout.tsx +23 -0
  74. package/templates/marketplace/apps/fe/src/components/features/auth/LoginPage.tsx +111 -0
  75. package/templates/marketplace/apps/fe/src/components/features/auth/RegisterPage.tsx +143 -0
  76. package/templates/marketplace/apps/fe/src/components/features/marketplace/BrowsePage.tsx +76 -0
  77. package/templates/marketplace/apps/fe/src/components/features/marketplace/CartPage.tsx +88 -0
  78. package/templates/marketplace/apps/fe/src/components/features/marketplace/CheckoutPage.tsx +193 -0
  79. package/templates/marketplace/apps/fe/src/components/features/marketplace/ListingCard.tsx +50 -0
  80. package/templates/marketplace/apps/fe/src/components/features/marketplace/ListingDetailsPage.tsx +152 -0
  81. package/templates/marketplace/apps/fe/src/components/features/marketplace/ListingFormPage.tsx +243 -0
  82. package/templates/marketplace/apps/fe/src/components/features/marketplace/MyListingsPage.tsx +84 -0
  83. package/templates/marketplace/apps/fe/src/components/features/marketplace/OrdersPage.tsx +224 -0
  84. package/templates/marketplace/apps/fe/src/components/features/marketplace/WatchlistPage.tsx +56 -0
  85. package/templates/marketplace/apps/fe/src/components/features/profile/ProfilePage.tsx +96 -0
  86. package/templates/marketplace/apps/fe/src/components/googleAnalytics/GoogleAnalytics.tsx +35 -0
  87. package/templates/marketplace/apps/fe/src/components/layout/AppLayout.tsx +19 -0
  88. package/templates/marketplace/apps/fe/src/components/layout/app-header/AppHeader.tsx +95 -0
  89. package/templates/marketplace/apps/fe/src/components/layout/app-header/MobileNavigation.tsx +55 -0
  90. package/templates/marketplace/apps/fe/src/components/layout/app-header/NavLink.tsx +29 -0
  91. package/templates/marketplace/apps/fe/src/components/shared/branding/BrandLogo.tsx +13 -0
  92. package/templates/marketplace/apps/fe/src/components/shared/error/ErrorFallback.tsx +43 -0
  93. package/templates/marketplace/apps/fe/src/components/shared/error/ErrorText.tsx +20 -0
  94. package/templates/marketplace/apps/fe/src/components/shared/error/NotFound.tsx +36 -0
  95. package/templates/marketplace/apps/fe/src/components/shared/forms/RequiredLabel.tsx +21 -0
  96. package/templates/marketplace/apps/fe/src/components/shared/forms/RowInputWrapper.tsx +50 -0
  97. package/templates/marketplace/apps/fe/src/components/shared/head/AppHead.tsx +32 -0
  98. package/templates/marketplace/apps/fe/src/components/shared/head/DefaultAppHead.tsx +34 -0
  99. package/templates/marketplace/apps/fe/src/components/shared/layout/LoadingState.tsx +9 -0
  100. package/templates/marketplace/apps/fe/src/components/shared/layout/ThinPageWrapper.tsx +5 -0
  101. package/templates/marketplace/apps/fe/src/components/shared/page/PageHeader.tsx +69 -0
  102. package/templates/marketplace/apps/fe/src/components/shared/ui/Card.tsx +60 -0
  103. package/templates/marketplace/apps/fe/src/components/shared/ui/GoogleLoginButton.tsx +19 -0
  104. package/templates/marketplace/apps/fe/src/components/shared/ui/RequiredLabel.tsx +22 -0
  105. package/templates/marketplace/apps/fe/src/components/shared/ui/TableActions.tsx +22 -0
  106. package/templates/marketplace/apps/fe/src/config/app.config.ts +35 -0
  107. package/templates/marketplace/apps/fe/src/config/i18n.ts +43 -0
  108. package/templates/marketplace/apps/fe/src/config/inits/a11y.ts +14 -0
  109. package/templates/marketplace/apps/fe/src/config/inits/logger.ts +7 -0
  110. package/templates/marketplace/apps/fe/src/config/inits/sentry.ts +21 -0
  111. package/templates/marketplace/apps/fe/src/config/jwt.config.ts +2 -0
  112. package/templates/marketplace/apps/fe/src/config/query.config.ts +20 -0
  113. package/templates/marketplace/apps/fe/src/hooks/useAuth.ts +5 -0
  114. package/templates/marketplace/apps/fe/src/main.tsx +52 -0
  115. package/templates/marketplace/apps/fe/src/pages/(guest)/login.tsx +23 -0
  116. package/templates/marketplace/apps/fe/src/pages/(guest)/register.tsx +23 -0
  117. package/templates/marketplace/apps/fe/src/pages/(guest)/route.tsx +18 -0
  118. package/templates/marketplace/apps/fe/src/pages/(private)/cart.tsx +22 -0
  119. package/templates/marketplace/apps/fe/src/pages/(private)/checkout.tsx +22 -0
  120. package/templates/marketplace/apps/fe/src/pages/(private)/index.tsx +22 -0
  121. package/templates/marketplace/apps/fe/src/pages/(private)/listings/$id/index.tsx +37 -0
  122. package/templates/marketplace/apps/fe/src/pages/(private)/my-listings.tsx +22 -0
  123. package/templates/marketplace/apps/fe/src/pages/(private)/orders/$id.tsx +40 -0
  124. package/templates/marketplace/apps/fe/src/pages/(private)/orders/index.tsx +22 -0
  125. package/templates/marketplace/apps/fe/src/pages/(private)/profile.tsx +23 -0
  126. package/templates/marketplace/apps/fe/src/pages/(private)/route.tsx +18 -0
  127. package/templates/marketplace/apps/fe/src/pages/(private)/sales.tsx +22 -0
  128. package/templates/marketplace/apps/fe/src/pages/(private)/sell/$id.tsx +44 -0
  129. package/templates/marketplace/apps/fe/src/pages/(private)/sell/index.tsx +19 -0
  130. package/templates/marketplace/apps/fe/src/pages/(private)/watchlist.tsx +22 -0
  131. package/templates/marketplace/apps/fe/src/pages/(public)/auth.tsx +37 -0
  132. package/templates/marketplace/apps/fe/src/pages/(public)/route.tsx +9 -0
  133. package/templates/marketplace/apps/fe/src/pages/__root.tsx +164 -0
  134. package/templates/marketplace/apps/fe/src/providers/AppErrorBoundary.tsx +10 -0
  135. package/templates/marketplace/apps/fe/src/providers/OpenApiRuntimeProvider.tsx +31 -0
  136. package/templates/marketplace/apps/fe/src/providers/index.tsx +44 -0
  137. package/templates/marketplace/apps/fe/src/providers/jwt.provider.tsx +95 -0
  138. package/templates/marketplace/apps/fe/src/routeTree.gen.ts +435 -0
  139. package/templates/marketplace/apps/fe/src/styles/base.css +103 -0
  140. package/templates/marketplace/apps/fe/src/styles/fonts/fonts.tsx +10 -0
  141. package/templates/marketplace/apps/fe/src/styles/fonts/general-sans.css +31 -0
  142. package/templates/marketplace/apps/fe/src/styles/globals.css +28 -0
  143. package/templates/marketplace/apps/fe/src/styles/overrides/defaults/button.override.ts +536 -0
  144. package/templates/marketplace/apps/fe/src/styles/overrides/defaults/checkbox.override.ts +71 -0
  145. package/templates/marketplace/apps/fe/src/styles/overrides/defaults/input.override.ts +252 -0
  146. package/templates/marketplace/apps/fe/src/styles/overrides/defaults/label.override.ts +91 -0
  147. package/templates/marketplace/apps/fe/src/styles/overrides/defaults/modal.override.ts +57 -0
  148. package/templates/marketplace/apps/fe/src/styles/overrides/defaults/radio.override.ts +46 -0
  149. package/templates/marketplace/apps/fe/src/styles/overrides/defaults/table.override.ts +104 -0
  150. package/templates/marketplace/apps/fe/src/styles/overrides/defaults/tag.override.ts +66 -0
  151. package/templates/marketplace/apps/fe/src/styles/overrides/defaults/typography.override.ts +115 -0
  152. package/templates/marketplace/apps/fe/src/styles/overrides/outline.clsx.ts +10 -0
  153. package/templates/marketplace/apps/fe/src/styles/overrides/uiOverrides.override.ts +60 -0
  154. package/templates/marketplace/apps/fe/src/styles/theme.css +2177 -0
  155. package/templates/marketplace/apps/fe/src/types/i18next.d.ts +12 -0
  156. package/templates/marketplace/apps/fe/src/types/table.d.ts +17 -0
  157. package/templates/marketplace/apps/fe/src/types/ui.d.ts +26 -0
  158. package/templates/marketplace/apps/fe/src/types/vite-env.d.ts +20 -0
  159. package/templates/marketplace/apps/fe/src/utils/date.utils.ts +17 -0
  160. package/templates/marketplace/apps/fe/src/utils/image-fallback.ts +9 -0
  161. package/templates/marketplace/apps/fe/src/utils/listing-form.test.ts +69 -0
  162. package/templates/marketplace/apps/fe/src/utils/listing-form.ts +77 -0
  163. package/templates/marketplace/apps/fe/src/utils/listing-submit.ts +29 -0
  164. package/templates/marketplace/apps/fe/src/utils/number.utils.ts +12 -0
  165. package/templates/marketplace/apps/fe/src/utils/string.utils.ts +5 -0
  166. package/templates/marketplace/apps/fe/src/vite-env.d.ts +1 -0
  167. package/templates/marketplace/apps/fe/tsconfig.app.json +32 -0
  168. package/templates/marketplace/apps/fe/tsconfig.json +9 -0
  169. package/templates/marketplace/apps/fe/tsconfig.node.json +31 -0
  170. package/templates/marketplace/apps/fe/vite.config.ts +125 -0
  171. package/templates/marketplace/database.ts +154 -0
  172. package/templates/marketplace/openapi.json +2303 -0
  173. package/templates/marketplace/oxfmt.config.js +23 -0
  174. package/templates/marketplace/package.json +18 -0
  175. package/templates/marketplace/rulesync.jsonc +18 -0
  176. package/templates/marketplace/tsconfig.json +11 -0
  177. package/templates/space/api/_lib.ts +9 -2
  178. package/templates/space/package.json +1 -1
@@ -0,0 +1,23 @@
1
+ export default {
2
+ useTabs: false,
3
+ tabWidth: 2,
4
+ printWidth: 120,
5
+ singleQuote: false,
6
+ jsxSingleQuote: false,
7
+ quoteProps: "as-needed",
8
+ trailingComma: "all",
9
+ semi: true,
10
+ arrowParens: "always",
11
+ bracketSameLine: false,
12
+ bracketSpacing: true,
13
+ singleAttributePerLine: true,
14
+ ignorePatterns: [
15
+ "node_modules",
16
+ "dist",
17
+ "out",
18
+ ".turbo",
19
+ ".next",
20
+ "routeTree.gen.ts",
21
+ "openapi.generated.json",
22
+ ],
23
+ };
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "{{PACKAGE_NAME}}",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "deploy": "robodev deploy",
8
+ "rules:gen": "rulesync generate"
9
+ },
10
+ "dependencies": {
11
+ "@robodev-ai/sdk": "^0.6.0"
12
+ },
13
+ "devDependencies": {
14
+ "robodev": "^0.24.0",
15
+ "rulesync": "^8.18.0",
16
+ "typescript": "^5.9.2"
17
+ }
18
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://github.com/dyoshikawa/rulesync/releases/latest/download/config-schema.json",
3
+ "targets": {
4
+ "cursor": ["rules", "skills"],
5
+ "claudecode": ["rules", "skills"],
6
+ "codexcli": ["rules", "skills"],
7
+ },
8
+ "outputRoots": ["."],
9
+ // Clean stale outputs when source rules are removed. All sources live under .rulesync/.
10
+ "delete": true,
11
+ "verbose": false,
12
+ "silent": false,
13
+ "global": false,
14
+ "simulateCommands": false,
15
+ "simulateSubagents": false,
16
+ "simulateSkills": false,
17
+ "gitignoreTargetsOnly": true,
18
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "strict": true,
7
+ "skipLibCheck": true,
8
+ "noEmit": true
9
+ },
10
+ "include": ["database.ts", "api/**/*.ts"]
11
+ }
@@ -342,6 +342,12 @@ export async function validateAlien(
342
342
  const ALLOWED_PLANET_IMAGE_TYPES = new Set(["image/jpeg", "image/png", "image/webp"]);
343
343
  const MAX_PLANET_IMAGE_BYTES = 2 * 1024 * 1024;
344
344
 
345
+ /** Matches dashboard sanitizeFilename / KEY_RE. */
346
+ function sanitizeFilename(name: string): string {
347
+ const base = name.split(/[/\\]/).pop() ?? "";
348
+ return base.replace(/[^A-Za-z0-9._-]+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "").slice(0, 80);
349
+ }
350
+
345
351
  export async function savePlanetImage(
346
352
  ctx: ApiHandlerContext<unknown, unknown>,
347
353
  file: UploadedFile,
@@ -354,8 +360,9 @@ export async function savePlanetImage(
354
360
  return fail(400, "Unsupported image type");
355
361
  }
356
362
 
357
- const fileName = (file.filename || "image").replaceAll("/", "-");
358
- const key = `planet-images/${ctx.user!.id}/${crypto.randomUUID()}-${fileName}`;
363
+ const fileName = file.filename || "image";
364
+ const safe = sanitizeFilename(fileName) || "image";
365
+ const key = `planet-images/${ctx.user!.id}/${crypto.randomUUID()}-${safe}`;
359
366
  const [row] = await ctx.db
360
367
  .insert(media)
361
368
  .values({
@@ -11,7 +11,7 @@
11
11
  "@robodev-ai/sdk": "^0.6.0"
12
12
  },
13
13
  "devDependencies": {
14
- "robodev": "^0.22.0",
14
+ "robodev": "^0.24.0",
15
15
  "rulesync": "^8.18.0",
16
16
  "typescript": "^5.9.2"
17
17
  }