primate 0.3.0 → 0.3.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
CHANGED
|
@@ -18,8 +18,8 @@ yarn add primate
|
|
|
18
18
|
* **Minimal** just one dependency ([ws][])
|
|
19
19
|
* **Simple** only native web technologies (JavaScript, HTML)
|
|
20
20
|
* **Full-stack** server and client, both in JavaScript
|
|
21
|
-
* **Layered** separation of data (domains), logic (actions) and
|
|
22
|
-
|
|
21
|
+
* **Layered** separation of data (domains), logic (actions) and presentation
|
|
22
|
+
(views)
|
|
23
23
|
* **Correct** data verification using field definitions in domains
|
|
24
24
|
* **Secure** serving hash-verified scripts on secure HTTP with a strong CSP
|
|
25
25
|
* **Roles** access control with contexts
|
|
@@ -31,7 +31,7 @@ ad-hoc getters
|
|
|
31
31
|
|
|
32
32
|
## Getting started
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
See the [getting started][getting-started] guide.
|
|
35
35
|
|
|
36
36
|
## Resources
|
|
37
37
|
|
|
@@ -48,3 +48,4 @@ will move over to semantic versioning.
|
|
|
48
48
|
BSD-3-Clause
|
|
49
49
|
|
|
50
50
|
[ws]: https://github.com/websockets/ws
|
|
51
|
+
[getting-started]: https://primatejs.com/getting-started
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "primate",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"author": "Primate core team <core@primatejs.com>",
|
|
5
5
|
"homepage": "https://primatejs.com",
|
|
6
6
|
"description": "Server-client framework",
|
|
@@ -11,11 +11,6 @@
|
|
|
11
11
|
"scripts": {
|
|
12
12
|
"test": "node --experimental-json-modules node_modules/stick stick.json"
|
|
13
13
|
},
|
|
14
|
-
"devDependencies": {
|
|
15
|
-
"eslint": "^8.6.0",
|
|
16
|
-
"eslint-plugin-json": "^3.1.0",
|
|
17
|
-
"stick": "../stick"
|
|
18
|
-
},
|
|
19
14
|
"type": "module",
|
|
20
15
|
"exports": "./source/server/exports.js",
|
|
21
16
|
"engines": {
|
package/source/server/types.js
CHANGED
|
@@ -4,4 +4,3 @@ export {default as DateType} from "./types/Date.js";
|
|
|
4
4
|
export {default as NumberType} from "./types/Number.js";
|
|
5
5
|
export {default as ObjectType} from "./types/Object.js";
|
|
6
6
|
export {default as StringType} from "./types/String.js";
|
|
7
|
-
export {default as FileType} from "./types/File.js";
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import Storeable from "./Storeable.js";
|
|
2
|
-
import File from "../File.js";
|
|
3
|
-
|
|
4
|
-
export default class extends Storeable {
|
|
5
|
-
static get instance() {
|
|
6
|
-
return File;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
static type_error() {
|
|
10
|
-
return "Must be a file";
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
static is(value) {
|
|
14
|
-
return value instanceof this.instance;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
static deserialize(value) {
|
|
18
|
-
return value instanceof this.instance ? value : new this.instance(value);
|
|
19
|
-
}
|
|
20
|
-
}
|