Skip to content

Commit

Permalink
chore: V5 final (#3070)
Browse files Browse the repository at this point in the history
  • Loading branch information
daffl authored Feb 24, 2023
1 parent 4fbbfff commit e41f39a
Show file tree
Hide file tree
Showing 36 changed files with 414 additions and 372 deletions.
8 changes: 6 additions & 2 deletions docs/.vitepress/config.sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ export default {
text: 'Creating an app',
link: '/guides/basics/generator.md'
},
{
text: 'Authentication',
link: '/guides/basics/authentication.md'
},
{
text: 'Services',
link: '/guides/basics/services.md'
Expand All @@ -53,8 +57,8 @@ export default {
link: '/guides/basics/schemas.md'
},
{
text: 'Authentication',
link: '/guides/basics/authentication.md'
text: 'Logging in',
link: '/guides/basics/login.md'
}
// {
// text: 'Writing Tests',
Expand Down
10 changes: 0 additions & 10 deletions docs/.vitepress/theme/FeathersLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,6 @@ const { Layout } = DefaultTheme

<template>
<Layout>
<template #doc-before>
<BlockQuote label="Pre-release" class="mb-8">
You are looking at the website for the fully functional Feathers v5 (Dove) pre-release. Check out
<a href="/guides/whats-new.html">what's new</a>, and please
<a href="/help/">let us know about any issues or questions</a>
. The current v4 documentation can be found at
<a href="https://crow.docs.feathersjs.com/">crow.docs.feathersjs.com</a>.
</BlockQuote>
</template>

<template #sidebar-nav-before>
<LanguageSelect />
<DatabaseSelect />
Expand Down
2 changes: 1 addition & 1 deletion docs/api/application.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ outline: deep
</Badges>

```
npm install @feathersjs/feathers@pre --save
npm install @feathersjs/feathers --save
```

The core `@feathersjs/feathers` module provides the ability to initialize a new Feathers application instance. It works in Node, React Native and the browser (see the [client](./client.md) chapter for more information). Each instance allows for registration and retrieval of [services](./services.md), [hooks](./hooks.md), plugin configuration, and getting and setting configuration options. An initialized Feathers application is referred to as the **app object**.
Expand Down
2 changes: 1 addition & 1 deletion docs/api/authentication/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ outline: deep
</Badges>

```
npm install @feathersjs/authentication-client@pre --save
npm install @feathersjs/authentication-client --save
```

The `@feathersjs/authentication-client` module allows you to easily authenticate a Feathers client against a Feathers server. It is not required, but makes it easier to implement authentication in your client by automatically storing and sending the access token and handling re-authenticating when a websocket disconnects.
Expand Down
2 changes: 1 addition & 1 deletion docs/api/authentication/jwt.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ outline: deep
</Badges>

```
npm install @feathersjs/authentication@pre --save
npm install @feathersjs/authentication --save
```

The `JWTStrategy` is an [authentication strategy](./strategy.md) included in `@feathersjs/authentication` for authenticating [JSON web tokens (JWT)](https://jwt.io/):
Expand Down
2 changes: 1 addition & 1 deletion docs/api/authentication/local.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ outline: deep
</Badges>

```
npm install @feathersjs/authentication-local@pre --save
npm install @feathersjs/authentication-local --save
```

`@feathersjs/authentication-local` provides a `LocalStrategy` for authenticating with a username/email and password combination, e.g.
Expand Down
2 changes: 1 addition & 1 deletion docs/api/authentication/oauth.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ outline: deep
</Badges>

```
npm install @feathersjs/authentication-oauth@pre --save
npm install @feathersjs/authentication-oauth --save
```

`@feathersjs/authentication-oauth` allows to authenticate with over 180 OAuth providers (Google, Facebook, GitHub etc.) using [grant](https://github.com/simov/grant), an OAuth middleware module for NodeJS.
Expand Down
2 changes: 1 addition & 1 deletion docs/api/authentication/service.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ outline: deep
</Badges>

```
npm install @feathersjs/authentication@pre --save
npm install @feathersjs/authentication --save
```

The `AuthenticationService` is a [Feathers service](../services.md) that allows to register different [authentication strategies](./strategy.md) and manage access tokens (using [JSON web tokens (JWT)](https://jwt.io/) by default). This section describes
Expand Down
6 changes: 3 additions & 3 deletions docs/api/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ A Feathers application generated with Feathers v5 or later now exports a client
To connect to a Feathers server in NodeJS, install the desired client connection library (here, `socket.io-client`), alongside the Feathers core library, and the connection-specific library:

```
npm install @feathersjs/feathers@pre @feathersjs/socketio-client@pre socket.io-client --save
npm install @feathersjs/feathers @feathersjs/socketio-client socket.io-client --save
```

Then initialize like this:
Expand Down Expand Up @@ -62,7 +62,7 @@ messageService.create({
React Native usage is the same as for the [Node client](#node). Install the required packages into your [React Native](https://facebook.github.io/react-native/) project.

```bash
npm install @feathersjs/feathers@pre @feathersjs/socketio-client@pre socket.io-client
npm install @feathersjs/feathers @feathersjs/socketio-client socket.io-client
```

Then in the main application file:
Expand Down Expand Up @@ -138,7 +138,7 @@ For non-CommonJS formats (like AMD) version of Feathers and its client modules t
</Badges>

```
npm install @feathersjs/client@pre --save
npm install @feathersjs/client --save
```

`@feathersjs/client` is a module that bundles the separate Feathers client-side modules into one file which can be loaded directly in the browser through a `<script>` tag and in most other JavaScript runtimes.
Expand Down
2 changes: 1 addition & 1 deletion docs/api/client/rest.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The following chapter describes the use of
</Badges>

```
npm install @feathersjs/rest-client@pre --save
npm install @feathersjs/rest-client --save
```

`@feathersjs/rest-client` allows to connect to a service exposed through a REST HTTP transport (e.g. with [Koa](../koa.md#rest) or [Express](../express.md#rest)) using [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API), [Superagent](http://visionmedia.github.io/superagent/) or [Axios](https://github.com/mzabriskie/axios).
Expand Down
2 changes: 1 addition & 1 deletion docs/api/client/socketio.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ outline: deep
</Badges>

```
npm install @feathersjs/socketio-client@pre --save
npm install @feathersjs/socketio-client --save
```

The `@feathersjs/socketio-client` module allows to connect to services exposed through the [Socket.io transport](../socketio.md) via a Socket.io socket. We recommend using Feathers and the `@feathersjs/socketio-client` module on the client if possible since it can also handle reconnection and reauthentication. If however, you want to use a direct Socket.io connection without using Feathers on the client, see the [Direct connection](#direct-connection) section.
Expand Down
2 changes: 1 addition & 1 deletion docs/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ outline: deep
</Badges>

```
npm install @feathersjs/errors@pre --save
npm install @feathersjs/errors --save
```

The `@feathersjs/errors` module contains a set of standard error classes used by all other Feathers modules.
Expand Down
2 changes: 1 addition & 1 deletion docs/api/express.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ outline: deep
</Badges>

```
npm install @feathersjs/express@pre --save
npm install @feathersjs/express --save
```

The `@feathersjs/express` module contains [Express](http://expressjs.com/) framework integrations for Feathers:
Expand Down
10 changes: 10 additions & 0 deletions docs/api/hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@ The `context` object is the same throughout a service method call so it is possi

</BlockQuote>

<BlockQuote type="warning" label="Important">

If you want to inspect the hook context, e.g. via `console.log`, the object returned by [context.toJSON()](#contexttojson) should be used, otherwise you won't see all properties that are available.

</BlockQuote>

### `context.app`

`context.app` is a _read only_ property that contains the [Feathers application object](./application.md). This can be used to retrieve other services (via `context.app.service('name')`) or configuration values.
Expand Down Expand Up @@ -244,6 +250,10 @@ Setting `context.http` properties will have no effect when using a websocket rea

`context.event` is a **writeable, optional** property that allows service events to be skipped by setting it to `null`

### `context.toJSON()`

`context.toJSON()` returns a full object representation of the hook context and all its properties.

## Registering hooks

Hook functions are registered on a service through the `app.service(<servicename>).hooks(hooks)` method. The most commonly used registration format is
Expand Down
2 changes: 1 addition & 1 deletion docs/api/koa.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ outline: deep
</Badges>

```
npm install @feathersjs/koa@pre --save
npm install @feathersjs/koa --save
```

The `@feathersjs/koa` module contains the [KoaJS](https://koajs.com/) framework integrations for Feathers. It will turn the Feathers app into a fully compatible KoaJS application.
Expand Down
2 changes: 1 addition & 1 deletion docs/api/schema/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ const userQuery: UserQuery = {
}
```

Additional properties like `$ilike` can be added to the query syntax like this:
Additional special query properties [that are not already included in the query syntax](../databases/querying.md) like `$ilike` can be added like this:

```ts
import { querySyntax } from '@feathersjs/schema'
Expand Down
2 changes: 1 addition & 1 deletion docs/api/schema/typebox.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const messageQuerySchema = querySyntax(messageQueryProperties)
type MessageQuery = Static<typeof messageQuerySchema>
```
To allow additional query parameters like `$ilike`, `$regex` etc. for properties you can pass an object with the property names and additional types:
Additional special query properties [that are not already included in the query syntax](../databases/querying.md) like `$ilike` can be added like this:
```ts
import { querySyntax } from '@feathersjs/typebox'
Expand Down
2 changes: 1 addition & 1 deletion docs/api/socketio.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ outline: deep
</Badges>

```
npm install @feathersjs/socketio@pre --save
npm install @feathersjs/socketio --save
```

The [@feathersjs/socketio](https://github.com/feathersjs/socketio) module allows to call [service methods](./services.md) and receive [real-time events](./events.md) via [Socket.io](http://socket.io/), a NodeJS library which enables real-time bi-directional, event-based communication.
Expand Down
2 changes: 1 addition & 1 deletion docs/components/HomeCreateFirstApp.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="py-16 xl:py-24 bg-secondary text-center lg:text-lg">
<h2 class="md:text-xl lg:text-2xl font-bold">Create your first real-time app in minutes</h2>
<h2 class="md:text-xl lg:text-2xl font-bold">Create your first Feathers API in minutes</h2>
<div class="py-8">
<img src="/img/coding-bird.svg" alt="" class="w-3/4 max-w-4xl mx-auto" />
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/components/HomeFeature2Content.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ import CTAButton from './CTAButton.vue'
<p>Build prototypes in minutes and production-ready apps in days.</p>
<p>Seriously.</p>
</div>
<CTAButton class="mt-6" primary>Learn more</CTAButton>
<CTAButton href="/guides/basics/generator.html" class="mt-6" primary>Build a chat app</CTAButton>
</div>
</template>
2 changes: 1 addition & 1 deletion docs/components/HomeHero.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ onBeforeUnmount(toggleHomeClass)
For TypeScript and JavaScript in Node.js, React Native and the browser
</p>
<div class="scale-80">
<CTAButton primary class="mt-3 mb-6 md:mb-10">Get Started</CTAButton>
<CTAButton href="/guides/basics/starting.html" primary class="mt-3 mb-6 md:mb-10">Quick Start</CTAButton>
</div>
</div>
</div>
Expand Down
Binary file modified docs/guides/basics/assets/generate-app-mongodb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/guides/basics/assets/generate-app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/guides/basics/assets/generate-hook.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/guides/basics/assets/generate-service.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e41f39a

Please sign in to comment.