nuxt-remote-fn

Remote Functions. Instead of Event Handlers.

Stars
93
Committers
4

Bot releases are visible (Hide)

nuxt-remote-fn - v0.5.3 Latest Release

Published by wobsoriano 7 months ago

   🐞 Bug Fixes

  • Adopt forward-compatible approach to builder:watch  -  by @danielroe (63124)
    View changes on GitHub
nuxt-remote-fn - v0.5.2

Published by wobsoriano 8 months ago

What's Changed

    View changes on GitHub
nuxt-remote-fn - v0.5.1

Published by wobsoriano 10 months ago

📦 Build

  • deps: Bump @nuxt/kit to 3.9.0 (12c481b)
  • deps: Bump h3 to 1.9.0 (11d9916)
  • deps: Bump es-module-lexer to 1.4.1 (2c7915a)
  • deps: Bump @rollup/pluginutils to 5.1.0 (bc01225)
    View changes on GitHub
nuxt-remote-fn - v0.5.0

Published by github-actions[bot] about 1 year ago

   🚀 Features

  • deps:
    • Bump h3 to 1.8.1  -  by @wobsoriano (03151)
    • Bump nuxt to 3.7.1  -  by @wobsoriano (090d5)

   🐞 Bug Fixes

  • breaking: Rename useEvent to useH3Event  -  by @wobsoriano (c3d83)
    View changes on GitHub
nuxt-remote-fn - v0.4.1

Published by github-actions[bot] over 1 year ago

   🐞 Bug Fixes

  • Invalid module ids  -  by @kehwar (4a942)
    View changes on GitHub
nuxt-remote-fn - v0.4.0

Published by github-actions[bot] over 1 year ago

   🚀 Features

  • Manual client usage  -  by @wobsoriano (e8cce)
    View changes on GitHub
nuxt-remote-fn - v0.3.0

Published by github-actions[bot] over 1 year ago

  • bump h3 to 1.6.2
  • bump @nuxt/kit to 3.3.2
  • bump es-module-lexer to 1.2.0
nuxt-remote-fn - v0.2.1

Published by github-actions[bot] over 1 year ago

No significant changes

    View changes on GitHub
nuxt-remote-fn - v0.2.0

Published by github-actions[bot] over 1 year ago

   🐞 Bug Fixes

  • Windows file path issues  -  by @wobsoriano (7aefe)
    View changes on GitHub
nuxt-remote-fn - v0.1.26

Published by github-actions[bot] almost 2 years ago

No significant changes

    View changes on GitHub
nuxt-remote-fn - v0.1.25

Published by github-actions[bot] almost 2 years ago

   🚀 Features

  • Move remote client function to JS Proxy  -  by @wobsoriano (2c79f)
    View changes on GitHub
nuxt-remote-fn - v0.1.24

Published by github-actions[bot] almost 2 years ago

   🚀 Features

  • Use $fetch from globalThis  -  by @wobsoriano (c8cb0)
    View changes on GitHub
nuxt-remote-fn - v0.1.23

Published by github-actions[bot] almost 2 years ago

   🚀 Features

  • Use built-in AsyncLocalStorage from async_hooks for event context access  -  by @wobsoriano (60d4a)
  • Add useContext function  -  by @wobsoriano (2f1a6)

Usage

// todo.server.ts

export function createContext() {
  const event = useEvent()

  async function getUserFromHeader() {
    const authorization = getRequestHeader(event, 'authorization')
    if (authorization) {
      const user = await decodeAndVerifyJwtToken(authorization.split(' ')[1])
      return user
    }
    return null
  }

  event.context.user = await getUserFromHeader()
}

export async function addTodo(todo: Todo) {
  const event = useEvent()

  if (!event.context.user) {
    throw createError({ statusCode: 401 })
  }

  // addTodo logic
}
    View changes on GitHub
nuxt-remote-fn - v0.1.22

Published by github-actions[bot] almost 2 years ago

No significant changes

    View changes on GitHub
nuxt-remote-fn - v0.1.20

Published by github-actions[bot] almost 2 years ago

No significant changes

    View changes on GitHub
nuxt-remote-fn - v0.1.19

Published by github-actions[bot] almost 2 years ago

   🚀 Features

    View changes on GitHub
nuxt-remote-fn - v0.1.18

Published by github-actions[bot] almost 2 years ago

   🐞 Bug Fixes

  • Patterns  -  by @wobsoriano (e8c9f)
    View changes on GitHub
nuxt-remote-fn - v0.1.17

Published by github-actions[bot] almost 2 years ago

   🚀 Features

  • Simplify event handler  -  by @wobsoriano (70ba0)
  • Add ability to update extension  -  by @wobsoriano (7c12b)
    View changes on GitHub
nuxt-remote-fn - v0.1.16

Published by github-actions[bot] almost 2 years ago

No significant changes

    View changes on GitHub
nuxt-remote-fn - v0.1.14

Published by github-actions[bot] almost 2 years ago

No significant changes

    View changes on GitHub