stack icon indicating copy to clipboard operation
stack copied to clipboard

Neon packages

Open davidgomes opened this issue 7 months ago • 5 comments


[!IMPORTANT] Add neon-js, neon-next, and neon-react packages and update templates and scripts to support these platforms.

  • New Packages:
    • Add neon-js, neon-next, and neon-react packages with package.json files.
  • Template Updates:
    • Update package-template.json to include neon-js, neon-next, and neon-react platforms.
    • Modify platform-specific logic in stack-handler.tsx, link.tsx, cookie.ts, client-app-impl.ts, common.ts, and stack-provider.tsx to support neon-* platforms.
  • Configuration:
    • Update tailwind.config.js to use RGB color values.
  • Script Updates:
    • Update generate-sdks.ts and utils.ts to include neon-* platforms in the generation process.

This description was created by Ellipsis for 02ac80137f3c3f4c2adee412d21092ae305062e5. You can customize this summary. It will automatically update as commits are pushed.

davidgomes avatar Apr 22 '25 14:04 davidgomes

@davidgomes is attempting to deploy a commit to the Stack Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Apr 22 '25 14:04 vercel[bot]

⚠️ Only 5 files will be analyzed due to processing limits.

recurseml[bot] avatar Apr 22 '25 14:04 recurseml[bot]

⚠️ Only 5 files will be analyzed due to processing limits.

recurseml[bot] avatar Apr 22 '25 14:04 recurseml[bot]

✨ No issues found! Your code is sparkling clean! ✨

🗒️ View all ignored comments in this repo
  • The constraint 'TokenStoreType extends string' is too restrictive. It should likely be 'TokenStoreType extends string | object' to match the condition check in line 113 where TokenStoreType is checked against {}
  • Return type mismatch - the interface declares useUsers() returning ServerUser[] but the Team interface that this extends declares useUsers() returning TeamUser[]
  • There is a syntax error in the super constructor call due to the ellipsis operator used incorrectly. Objects aren't being merged correctly. This syntax usage can lead to runtime errors when trying to pass the merged object to 'super()'. Verify that the intended alterations to the object occur before or outside of the super() call if needed.
  • Throwing an error when no active span is found is too aggressive. The log function should gracefully fallback to console.log or another logging mechanism when there's no active span, since not all execution contexts will have an active span. This makes the code less resilient and could break functionality in non-traced environments.

📚 Relevant Docs

  • Function sets backendContext with a new configuration but doesn't pass 'defaultProjectKeys'. Since defaultProjectKeys is required in the type definition and cannot be updated (throws error if tried to set), this will cause a type error.
  • The schema is using array syntax for pick() which is incorrect for Yup schemas. The pick() method in Yup expects individual arguments, not an array. Should be changed to: emailConfigSchema.pick('type', 'host', 'port', 'username', 'sender_name', 'sender_email')

📚 Relevant Docs

  • Creating a refresh token with current timestamp as expiration means it expires immediately. Should set a future date for token expiration.
  • The 'tools' object is initialized as an empty object, even though 'tools' is presumably expected to contain tool definitions. This could cause the server capabilities to lack necessary tool configurations, thus potentially impacting functionalities that depend on certain tool setups.

📚 Relevant Docs

  • 'STACK_SECRET_SERVER_KEY' is potentially being included in every request header without checking its existence again here. Although it's checked during initialization, this could lead to security issues as it's exposed in all communications where the header is logged or captured.

📚 Relevant Docs

  • When adding 'use client' directive at the beginning, it doesn't check if file.text already contains the 'use client' directive. This could lead to duplicate 'use client' directives if the file already has one.

📚 Relevant Docs

recurseml[bot] avatar Apr 22 '25 14:04 recurseml[bot]

Documentation Changes Required

  1. stack-handler.mdx

    • Update the Props section:
      • Mention that app can be either StackServerApp (for next-like platforms) or StackClientApp (for react-like platforms).
    • Update the routeProps description to indicate it's for next-like platforms, not just Next.js.
    • Add a note about the location prop needed for react-like platforms.
    • Consider adding a new tab or section to show both next-like and react-like usage patterns.
  2. stack-app-constructor-options-after-ssk.mdx

    • Add a new parameter field for the redirectMethod option:
      <ParamField path="redirectMethod" type="union">
        Specifies how redirects should be handled by the app. Defaults to "nextjs" in Next.js environments or "window" in browser environments.
      
        <Accordion title={<span className="accordion-show-possible-values" />}>
          <ParamField path={`"window"`}>
            Redirects using window.location.assign/replace methods.
          </ParamField>
          <ParamField path={`"nextjs"`}>
            Uses Next.js router for redirects. This is the default for Next.js applications.
          </ParamField>
          <ParamField path={`"none"`}>
            Disables automatic redirects.
          </ParamField>
          <ParamField path={`{ useNavigate: () => (to: string) => void, navigate?: (to: string) => void }`}>
            Uses the provided navigation functions for redirects. This option is useful for integrating with custom routers or other frameworks.
          </ParamField>
        </Accordion>
      </ParamField>
      

Please ensure these changes are reflected in the relevant documentation files to accurately represent the updated platform support and new redirect method options.

patched-codes[bot] avatar Apr 22 '25 14:04 patched-codes[bot]