lien 3.3.1 → 3.4.0
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/.travis.yml +0 -0
- package/CONTRIBUTING.md +0 -0
- package/DOCUMENTATION.md +0 -0
- package/LICENSE +1 -1
- package/README.md +10 -8
- package/example/index.js +0 -0
- package/example/login.js +0 -0
- package/example/public/index.html +0 -0
- package/example/public/login.html +0 -0
- package/example/public/logout.html +0 -0
- package/example/secure.js +0 -0
- package/example/ssl/.gitignore +0 -0
- package/lib/index.js +3 -4
- package/lib/to-buffer.js +0 -0
- package/package.json +4 -4
- package/test/index.js +2 -2
- package/test/public/foo/index.html +0 -0
- package/test/public/index.html +0 -0
- package/test/public/test.html +0 -0
- package/test/views/main.ajs +0 -0
package/.travis.yml
CHANGED
|
File without changes
|
package/CONTRIBUTING.md
CHANGED
|
File without changes
|
package/DOCUMENTATION.md
CHANGED
|
File without changes
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2014-
|
|
3
|
+
Copyright (c) 2014-23 Ionică Bizău <bizauionica@gmail.com> (https://ionicabizau.net/)
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -484,20 +484,22 @@ Thanks! :heart:
|
|
|
484
484
|
If you are using this library in one of your projects, add it in this list. :sparkles:
|
|
485
485
|
|
|
486
486
|
- `bloggify`
|
|
487
|
+
- `bloggify-cli`
|
|
487
488
|
- `gh-contributions`
|
|
488
489
|
- `web-term`
|
|
489
|
-
- `bloggify-prebuilt`
|
|
490
|
-
- `test-youtube-api`
|
|
491
|
-
- `learning-nodejs-file-upload`
|
|
492
|
-
- `wrabbit`
|
|
493
|
-
- `youtube-album-uploader`
|
|
494
490
|
- `bloggify-server-prebuilt`
|
|
495
|
-
- `
|
|
491
|
+
- `@dottjt/mediareade`
|
|
492
|
+
- `youtube-album-uploader`
|
|
496
493
|
- `youtube-album-uploader-multiple`
|
|
494
|
+
- `bnotify`
|
|
495
|
+
- `test-youtube-api`
|
|
496
|
+
- `bloggify-prebuilt`
|
|
497
|
+
- `learning-node-file-upload`
|
|
498
|
+
- `fb-token-updater`
|
|
497
499
|
- `chewb-youtube-uploader`
|
|
498
500
|
- `nodejs-youtube-uploader`
|
|
499
|
-
-
|
|
500
|
-
- `
|
|
501
|
+
- `wrabbit`
|
|
502
|
+
- `learning-nodejs-file-upload`
|
|
501
503
|
|
|
502
504
|
|
|
503
505
|
|
package/example/index.js
CHANGED
|
File without changes
|
package/example/login.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/example/secure.js
CHANGED
|
File without changes
|
package/example/ssl/.gitignore
CHANGED
|
File without changes
|
package/lib/index.js
CHANGED
|
@@ -23,11 +23,11 @@ var events = require("events"),
|
|
|
23
23
|
session = require("express-session"),
|
|
24
24
|
findValue = require("find-value"),
|
|
25
25
|
qs = require("querystring"),
|
|
26
|
-
parseUrl = require("parse-url"),
|
|
27
26
|
Transformer = require("transformer"),
|
|
28
27
|
setOrGet = require("set-or-get"),
|
|
29
28
|
httpMethods = require("methods"),
|
|
30
|
-
|
|
29
|
+
_require = require("path-to-regexp"),
|
|
30
|
+
pathToRegexp = _require.pathToRegexp,
|
|
31
31
|
iterateObject = require("iterate-object"),
|
|
32
32
|
noop = require("noop6"),
|
|
33
33
|
cookieParser = require("cookie-parser"),
|
|
@@ -56,7 +56,6 @@ var LienObj = function () {
|
|
|
56
56
|
this.req = req;
|
|
57
57
|
this.res = res;
|
|
58
58
|
|
|
59
|
-
this.url = parseUrl(req.originalUrl);
|
|
60
59
|
this.path = this.req.path;
|
|
61
60
|
|
|
62
61
|
if (this.path.charAt(this.path.length - 1) === "/") {
|
|
@@ -67,7 +66,7 @@ var LienObj = function () {
|
|
|
67
66
|
this.host = req.hostname;
|
|
68
67
|
this.params = req.params;
|
|
69
68
|
this.query = req.query;
|
|
70
|
-
this.pathname =
|
|
69
|
+
this.pathname = req.baseUrl + req.path;
|
|
71
70
|
this.method = req.method.toLowerCase();
|
|
72
71
|
this.cookies = req.cookies || {};
|
|
73
72
|
this.server = server;
|
package/lib/to-buffer.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"test": "node test/index.js"
|
|
4
4
|
},
|
|
5
5
|
"name": "lien",
|
|
6
|
-
"version": "3.
|
|
6
|
+
"version": "3.4.0",
|
|
7
7
|
"description": "An easy to use web framework for Node.js.",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"keywords": [
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"ajs": "^1.2.1",
|
|
24
|
-
"connect-mongo": "^
|
|
24
|
+
"connect-mongo": "^4.6.0",
|
|
25
25
|
"tester": "^1.3.4",
|
|
26
26
|
"tinyreq": "^3.1.2"
|
|
27
27
|
},
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"methods": "^1.1.2",
|
|
48
48
|
"noop6": "^1.0.2",
|
|
49
49
|
"parse-url": "^1.3.0",
|
|
50
|
-
"path-to-regexp": "^
|
|
50
|
+
"path-to-regexp": "^6.2.1",
|
|
51
51
|
"set-or-get": "^1.2.2",
|
|
52
52
|
"transformer": "^1.0.1",
|
|
53
53
|
"ul": "^5.2.1"
|
|
54
54
|
}
|
|
55
|
-
}
|
|
55
|
+
}
|
package/test/index.js
CHANGED
|
@@ -114,7 +114,7 @@ tester.describe("lien", function (t) {
|
|
|
114
114
|
});
|
|
115
115
|
|
|
116
116
|
t.should("add before hook", function () {
|
|
117
|
-
server.hook("before", "
|
|
117
|
+
server.hook("before", "(.*)", "get", function (lien) {
|
|
118
118
|
lien.anotherFromBeforeHook = true;
|
|
119
119
|
});
|
|
120
120
|
});
|
|
@@ -252,7 +252,7 @@ tester.describe("lien", function (t) {
|
|
|
252
252
|
});
|
|
253
253
|
|
|
254
254
|
t.it("load static HTML file", function (cb) {
|
|
255
|
-
server.hook("before", ":foo.*", function (lien, cb) {
|
|
255
|
+
server.hook("before", ":foo(.*)", function (lien, cb) {
|
|
256
256
|
if (!~lien.path.indexOf(".")) {
|
|
257
257
|
return cb();
|
|
258
258
|
}
|
|
File without changes
|
package/test/public/index.html
CHANGED
|
File without changes
|
package/test/public/test.html
CHANGED
|
File without changes
|
package/test/views/main.ajs
CHANGED
|
File without changes
|