@orieljs/pipeline 0.1.0-alpha.6 → 0.1.0-alpha.8
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/NOTICE +4 -0
- package/README.md +36 -0
- package/TRADEMARKS.md +33 -0
- package/package.json +5 -4
package/NOTICE
CHANGED
|
@@ -10,3 +10,7 @@ The Oriel name and logo are not covered by that license; see TRADEMARKS.md
|
|
|
10
10
|
|
|
11
11
|
@orieljs/support (and @orieljs/framework, which bundles it) includes transliteration data from
|
|
12
12
|
voku/portable-ascii (https://github.com/voku/portable-ascii), Copyright (C) 2019 Lars Moelleken, MIT License.
|
|
13
|
+
|
|
14
|
+
@orieljs/notifications (and @orieljs/framework, which bundles it) includes the HTML and CSS of
|
|
15
|
+
Laravel's default notification mail (laravel/framework, https://github.com/laravel/framework),
|
|
16
|
+
Copyright (c) Taylor Otwell, MIT License.
|
package/README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# @orieljs/pipeline
|
|
2
|
+
|
|
3
|
+
Pipelines for Oriel: send a value through a list of steps, each of which can change it or stop it, as Laravel's `Pipeline`. The HTTP kernel runs middleware this way. It is part of `@orieljs/framework`, which every Oriel app already installs, and is re-exported from it. In an app, import it from `@orieljs/framework`; `@orieljs/pipeline` is also published on its own.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install @orieljs/framework
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```ts title="app/Support/slug.ts"
|
|
10
|
+
import { app } from '@orieljs/framework'
|
|
11
|
+
import { PipelineFactory } from '@orieljs/framework/contracts'
|
|
12
|
+
|
|
13
|
+
export function slug(title: string): Promise<string> {
|
|
14
|
+
return app(PipelineFactory)
|
|
15
|
+
.make<string>()
|
|
16
|
+
.send(title)
|
|
17
|
+
.through([
|
|
18
|
+
(value, next) => next(value.trim()),
|
|
19
|
+
(value, next) => next(value.toLowerCase()),
|
|
20
|
+
(value, next) => next(value.replace(/\s+/g, '-')),
|
|
21
|
+
])
|
|
22
|
+
.thenReturn()
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
A pipeline takes its value with `send()` and its steps with `through()` or `pipe()`: closures, or classes built by the container, whose `handle(value, next)` is called (`via()` names another method). `then(destination)` runs it and passes the result to the destination, and `thenReturn()` returns the result; both return a promise.
|
|
27
|
+
|
|
28
|
+
Documentation: https://orieljs.vercel.app/docs/helpers
|
|
29
|
+
|
|
30
|
+
Status: early alpha. APIs will change.
|
|
31
|
+
|
|
32
|
+
## License
|
|
33
|
+
|
|
34
|
+
Oriel is open-source software licensed under the Apache License 2.0 (Apache-2.0; see `LICENSE` and `NOTICE`). The Oriel name and logo are trademarks; see `TRADEMARKS.md`.
|
|
35
|
+
|
|
36
|
+
Website: https://orieljs.vercel.app
|
package/TRADEMARKS.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Oriel trademark policy
|
|
2
|
+
|
|
3
|
+
The Oriel code is open source under the Apache License 2.0. The **Oriel name and logo** are not: the license covers
|
|
4
|
+
the code only (section 6 of the license says so), and the name and logo stay with the project. This page explains
|
|
5
|
+
what you can and can't do with them. The goal is simple: people should always be able to tell what is the real Oriel
|
|
6
|
+
and what isn't.
|
|
7
|
+
|
|
8
|
+
## You can, without asking
|
|
9
|
+
|
|
10
|
+
- Use, change, ship and sell the code, as the license allows.
|
|
11
|
+
- Say that your app or package is "built with Oriel", "for Oriel" or "compatible with Oriel".
|
|
12
|
+
- Name a package `oriel-<something>` or `<something>-for-oriel` when it works with Oriel, as long as it is clear that
|
|
13
|
+
it is not official (for example, don't publish it under the `@orieljs` npm scope).
|
|
14
|
+
- Use the name and logo to write about Oriel, teach it, or link to it, in articles, talks, videos and courses.
|
|
15
|
+
- Use the unmodified logo to point to the project, as it is (no recolouring, cropping or
|
|
16
|
+
distortion).
|
|
17
|
+
|
|
18
|
+
## You can't, without written permission
|
|
19
|
+
|
|
20
|
+
- Call a fork, a modified copy or a competing product "Oriel", or anything likely to be confused with it.
|
|
21
|
+
- Use the name or logo as the name, logo or domain of your own product, company or service.
|
|
22
|
+
- Suggest that the Oriel project made, endorses or supports your work when it doesn't.
|
|
23
|
+
- Sell merchandise with the name or logo.
|
|
24
|
+
|
|
25
|
+
## Forks
|
|
26
|
+
|
|
27
|
+
Forks are welcome. Please give yours a different name and logo, keep the `LICENSE` and `NOTICE` files, and say that
|
|
28
|
+
it is based on Oriel.
|
|
29
|
+
|
|
30
|
+
## Questions
|
|
31
|
+
|
|
32
|
+
Open an issue at https://github.com/orieljs/framework or email meeeet.dev@gmail.com. If you're unsure whether a use
|
|
33
|
+
is fine, ask; the answer is usually yes.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orieljs/pipeline",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.8",
|
|
4
4
|
"description": "The Oriel Pipeline component.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -27,11 +27,12 @@
|
|
|
27
27
|
"files": [
|
|
28
28
|
"dist",
|
|
29
29
|
"LICENSE",
|
|
30
|
-
"NOTICE"
|
|
30
|
+
"NOTICE",
|
|
31
|
+
"TRADEMARKS.md"
|
|
31
32
|
],
|
|
32
33
|
"dependencies": {
|
|
33
|
-
"@orieljs/contracts": "0.1.0-alpha.
|
|
34
|
-
"@orieljs/container": "0.1.0-alpha.
|
|
34
|
+
"@orieljs/contracts": "0.1.0-alpha.8",
|
|
35
|
+
"@orieljs/container": "0.1.0-alpha.8"
|
|
35
36
|
},
|
|
36
37
|
"scripts": {
|
|
37
38
|
"build": "tsup && node ../../../scripts/copy-license.mjs"
|