@adonisjs/session 7.0.0-0 → 7.0.0-1
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/README.md +25 -42
- package/build/src/session.js +0 -2
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,53 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
<img src="https://res.cloudinary.com/adonisjs/image/upload/q_100/v1558612869/adonis-readme_zscycu.jpg" width="600px">
|
|
3
|
-
</div>
|
|
1
|
+
# @adonisjs/session
|
|
4
2
|
|
|
5
3
|
<br />
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
<h3>Sessions</h3>
|
|
9
|
-
<p>This package adds support for sessions to AdonisJS</p>
|
|
10
|
-
</div>
|
|
5
|
+
[![gh-workflow-image]][gh-workflow-url] [![npm-image]][npm-url] ![][typescript-image] [![license-image]][license-url] [![snyk-image]][snyk-url]
|
|
11
6
|
|
|
12
|
-
|
|
7
|
+
## Introduction
|
|
8
|
+
Add sessions to your AdonisJS application. Cookie, Redis, and File drivers are included out of the box.
|
|
13
9
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
[![gh-workflow-image]][gh-workflow-url] [![typescript-image]][typescript-url] [![npm-image]][npm-url] [![license-image]][license-url] [![synk-image]][synk-url]
|
|
17
|
-
|
|
18
|
-
</div>
|
|
19
|
-
|
|
20
|
-
<div align="center">
|
|
21
|
-
<h3>
|
|
22
|
-
<a href="https://adonisjs.com">
|
|
23
|
-
Website
|
|
24
|
-
</a>
|
|
25
|
-
<span> | </span>
|
|
26
|
-
<a href="https://docs.adonisjs.com/guides/session">
|
|
27
|
-
Guides
|
|
28
|
-
</a>
|
|
29
|
-
<span> | </span>
|
|
30
|
-
<a href="CONTRIBUTING.md">
|
|
31
|
-
Contributing
|
|
32
|
-
</a>
|
|
33
|
-
</h3>
|
|
34
|
-
</div>
|
|
35
|
-
|
|
36
|
-
<div align="center">
|
|
37
|
-
<sub>Built with ❤︎ by <a href="https://twitter.com/AmanVirk1">Harminder Virk</a>
|
|
38
|
-
</div>
|
|
39
|
-
|
|
40
|
-
[gh-workflow-image]: https://img.shields.io/github/workflow/status/adonisjs/session/test?style=for-the-badge
|
|
41
|
-
[gh-workflow-url]: https://github.com/adonisjs/session/actions/workflows/test.yml "Github action"
|
|
10
|
+
## Official Documentation
|
|
11
|
+
The documentation is available on the [AdonisJS website](https://docs.adonisjs.com/guides/sessions)
|
|
42
12
|
|
|
43
|
-
|
|
44
|
-
|
|
13
|
+
## Contributing
|
|
14
|
+
One of the primary goals of AdonisJS is to have a vibrant community of users and contributors who believes in the principles of the framework.
|
|
15
|
+
|
|
16
|
+
We encourage you to read the [contribution guide](https://github.com/adonisjs/.github/blob/main/docs/CONTRIBUTING.md) before contributing to the framework.
|
|
17
|
+
|
|
18
|
+
## Code of Conduct
|
|
19
|
+
In order to ensure that the AdonisJS community is welcoming to all, please review and abide by the [Code of Conduct](https://github.com/adonisjs/.github/blob/main/docs/CODE_OF_CONDUCT.md).
|
|
20
|
+
|
|
21
|
+
## License
|
|
22
|
+
AdonisJS ally is open-sourced software licensed under the [MIT license](LICENSE.md).
|
|
23
|
+
|
|
24
|
+
[gh-workflow-image]: https://img.shields.io/github/actions/workflow/status/adonisjs/session/test.yml?style=for-the-badge
|
|
25
|
+
[gh-workflow-url]: https://github.com/adonisjs/session/actions/workflows/test.yml "Github action"
|
|
45
26
|
|
|
46
27
|
[npm-image]: https://img.shields.io/npm/v/@adonisjs/session/latest.svg?style=for-the-badge&logo=npm
|
|
47
28
|
[npm-url]: https://www.npmjs.com/package/@adonisjs/session/v/latest "npm"
|
|
48
29
|
|
|
49
|
-
[
|
|
50
|
-
|
|
30
|
+
[typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
|
|
31
|
+
|
|
32
|
+
[license-url]: LICENSE.md
|
|
33
|
+
[license-image]: https://img.shields.io/github/license/adonisjs/session?style=for-the-badge
|
|
51
34
|
|
|
52
|
-
[
|
|
53
|
-
[
|
|
35
|
+
[snyk-image]: https://img.shields.io/snyk/vulnerabilities/github/adonisjs/session?label=Snyk%20Vulnerabilities&style=for-the-badge
|
|
36
|
+
[snyk-url]: https://snyk.io/test/github/adonisjs/session?targetFile=package.json "snyk"
|
package/build/src/session.js
CHANGED
|
@@ -162,11 +162,9 @@ export class Session {
|
|
|
162
162
|
* (only when view property exists)
|
|
163
163
|
*/
|
|
164
164
|
#shareLocalsWithView() {
|
|
165
|
-
// @ts-ignore may need to expose ./types/extended from adonisjs/view
|
|
166
165
|
if (!this.#ctx['view'] || typeof this.#ctx['view'].share !== 'function') {
|
|
167
166
|
return;
|
|
168
167
|
}
|
|
169
|
-
// @ts-ignore may need to expose ./types/extended from adonisjs/view
|
|
170
168
|
this.#ctx['view'].share({
|
|
171
169
|
flashMessages: this.flashMessages,
|
|
172
170
|
session: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adonisjs/session",
|
|
3
3
|
"description": "Session provider for AdonisJS",
|
|
4
|
-
"version": "7.0.0-
|
|
4
|
+
"version": "7.0.0-1",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.16.0"
|
|
7
7
|
},
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@adonisjs/application": "7.1.2-8",
|
|
43
|
-
"@adonisjs/core": "6.1.5-
|
|
43
|
+
"@adonisjs/core": "6.1.5-10",
|
|
44
44
|
"@adonisjs/eslint-config": "^1.1.8",
|
|
45
45
|
"@adonisjs/prettier-config": "^1.1.8",
|
|
46
|
-
"@adonisjs/redis": "8.0.0-
|
|
46
|
+
"@adonisjs/redis": "8.0.0-3",
|
|
47
47
|
"@adonisjs/tsconfig": "^1.1.8",
|
|
48
48
|
"@adonisjs/view": "7.0.0-4",
|
|
49
49
|
"@japa/api-client": "2.0.0-0",
|
|
@@ -75,8 +75,8 @@
|
|
|
75
75
|
"fs-extra": "^11.1.1"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
|
-
"@adonisjs/core": "6.1.5-
|
|
79
|
-
"@adonisjs/redis": "8.0.0-
|
|
78
|
+
"@adonisjs/core": "6.1.5-10",
|
|
79
|
+
"@adonisjs/redis": "8.0.0-3"
|
|
80
80
|
},
|
|
81
81
|
"peerDependenciesMeta": {
|
|
82
82
|
"@adonisjs/redis": {
|