@orieljs/support 0.1.0-alpha.6 → 0.1.0-alpha.7

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 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/support
2
+
3
+ The helpers the rest of Oriel is built on: `Str`, `Arr`, service providers, facades and global helpers, as Laravel's `Illuminate\Support`. 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/support` is also published on its own.
4
+
5
+ ```bash
6
+ npm install @orieljs/framework
7
+ ```
8
+
9
+ ```ts title="app/Support/posts.ts"
10
+ import { Str, collect } from '@orieljs/framework'
11
+ import type { Post } from '../Models/Post'
12
+
13
+ export function card(post: Post) {
14
+ return {
15
+ title: Str.of(post.title).trim().title().toString(),
16
+ excerpt: Str.limit(post.body, 120),
17
+ url: `/posts/${Str.slug(post.title)}`,
18
+ }
19
+ }
20
+
21
+ export function authorIds(posts: Post[]): number[] {
22
+ return collect(posts).pluck('author_id').unique().all()
23
+ }
24
+ ```
25
+
26
+ `Str` has Laravel's string helpers (`slug()`, `limit()`, `plural()`, `uuid()`, …), and `Str.of()` chains them. `Arr` reads and writes nested values by dotted key (`get()`, `set()`, `has()`), flattens them with `dot()` and picks keys with `only()`. `ServiceProvider` and `facade()` are the base of every component, and the helpers are `app()`, `config()`, `collect()`, `now()`, the async `retry()`, `tap()`, `value()` and `__()`.
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/support",
3
- "version": "0.1.0-alpha.6",
3
+ "version": "0.1.0-alpha.7",
4
4
  "description": "Oriel support utilities: Str, Arr, service providers, facades and helpers.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -27,13 +27,14 @@
27
27
  "files": [
28
28
  "dist",
29
29
  "LICENSE",
30
- "NOTICE"
30
+ "NOTICE",
31
+ "TRADEMARKS.md"
31
32
  ],
32
33
  "dependencies": {
33
34
  "pluralize": "8.0.0",
34
- "@orieljs/collections": "0.1.0-alpha.6",
35
- "@orieljs/contracts": "0.1.0-alpha.6",
36
- "@orieljs/container": "0.1.0-alpha.6"
35
+ "@orieljs/collections": "0.1.0-alpha.7",
36
+ "@orieljs/container": "0.1.0-alpha.7",
37
+ "@orieljs/contracts": "0.1.0-alpha.7"
37
38
  },
38
39
  "devDependencies": {
39
40
  "@types/pluralize": "0.0.33"