@things-factory/shell 4.0.9 → 4.0.13
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.
@@ -9,7 +9,11 @@ exports.ScalarDate = new graphql_1.GraphQLScalarType({
|
|
9
9
|
return new Date(value); // value from the client
|
10
10
|
},
|
11
11
|
serialize(value) {
|
12
|
-
|
12
|
+
/**
|
13
|
+
* Note: Allow value to be date only like "2021-01-31" to be serialize before passing data to clientside for TypeGraphql.
|
14
|
+
* Usage: When database column datatype is "date" and data do not contain any time component.
|
15
|
+
*/
|
16
|
+
return new Date(value).getTime(); // value sent to the client
|
13
17
|
},
|
14
18
|
parseLiteral(ast) {
|
15
19
|
if (ast.kind === graphql_1.Kind.INT) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"scalar-date.js","sourceRoot":"","sources":["../../../server/service/common-types/scalar-date.ts"],"names":[],"mappings":";;;AAAA,qCAAiD;AAEpC,QAAA,UAAU,GAAG,IAAI,2BAAiB,CAAC;IAC9C,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,yBAAyB;IACtC,UAAU,CAAC,KAAK;QACd,OAAO,IAAI,IAAI,CAAC,KAAwB,CAAC,CAAA,CAAC,wBAAwB;IACpE,CAAC;IACD,SAAS,CAAC,
|
1
|
+
{"version":3,"file":"scalar-date.js","sourceRoot":"","sources":["../../../server/service/common-types/scalar-date.ts"],"names":[],"mappings":";;;AAAA,qCAAiD;AAEpC,QAAA,UAAU,GAAG,IAAI,2BAAiB,CAAC;IAC9C,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,yBAAyB;IACtC,UAAU,CAAC,KAAK;QACd,OAAO,IAAI,IAAI,CAAC,KAAwB,CAAC,CAAA,CAAC,wBAAwB;IACpE,CAAC;IACD,SAAS,CAAC,KAAK;QACb;;;WAGG;QACH,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAA,CAAC,2BAA2B;IAC9D,CAAC;IACD,YAAY,CAAC,GAAG;QACd,IAAI,GAAG,CAAC,IAAI,KAAK,cAAI,CAAC,GAAG,EAAE;YACzB,OAAO,IAAI,IAAI,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA,CAAC,uCAAuC;SACpE;QACD,OAAO,IAAI,CAAA;IACb,CAAC;CACF,CAAC,CAAA"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@things-factory/shell",
|
3
|
-
"version": "4.0.
|
3
|
+
"version": "4.0.13",
|
4
4
|
"description": "Core module for framework",
|
5
5
|
"bin": {
|
6
6
|
"things-factory": "bin/things-factory",
|
@@ -35,7 +35,7 @@
|
|
35
35
|
"@graphql-tools/merge": "^7.0.0",
|
36
36
|
"@graphql-tools/schema": "^8.2.0",
|
37
37
|
"@graphql-tools/utils": "^8.3.0",
|
38
|
-
"@hatiolab/things-scene": "^2.7.
|
38
|
+
"@hatiolab/things-scene": "^2.7.26",
|
39
39
|
"@koa/cors": "^3.1.0",
|
40
40
|
"@material/mwc-button": "^0.25.3",
|
41
41
|
"@material/mwc-fab": "^0.25.3",
|
@@ -43,10 +43,10 @@
|
|
43
43
|
"@material/mwc-icon-button": "^0.25.3",
|
44
44
|
"@material/mwc-slider": "^0.25.3",
|
45
45
|
"@material/mwc-textfield": "^0.25.3",
|
46
|
-
"@things-factory/ejs-remote": "^4.0.
|
47
|
-
"@things-factory/env": "^4.0.
|
48
|
-
"@things-factory/styles": "^4.0.
|
49
|
-
"@things-factory/utils": "^4.0.
|
46
|
+
"@things-factory/ejs-remote": "^4.0.13",
|
47
|
+
"@things-factory/env": "^4.0.13",
|
48
|
+
"@things-factory/styles": "^4.0.13",
|
49
|
+
"@things-factory/utils": "^4.0.13",
|
50
50
|
"@webcomponents/webcomponentsjs": "^2.6.0",
|
51
51
|
"apollo-server-core": "^3.5.0",
|
52
52
|
"apollo-server-koa": "^3.5.0",
|
@@ -119,5 +119,5 @@
|
|
119
119
|
"resolutions": {
|
120
120
|
"core-js": "^3.16.0"
|
121
121
|
},
|
122
|
-
"gitHead": "
|
122
|
+
"gitHead": "a542fdd4e7c447c3b571fe91c92f5919561bdc2c"
|
123
123
|
}
|
@@ -6,8 +6,12 @@ export const ScalarDate = new GraphQLScalarType({
|
|
6
6
|
parseValue(value) {
|
7
7
|
return new Date(value as string | number) // value from the client
|
8
8
|
},
|
9
|
-
serialize(value
|
10
|
-
|
9
|
+
serialize(value) {
|
10
|
+
/**
|
11
|
+
* Note: Allow value to be date only like "2021-01-31" to be serialize before passing data to clientside for TypeGraphql.
|
12
|
+
* Usage: When database column datatype is "date" and data do not contain any time component.
|
13
|
+
*/
|
14
|
+
return new Date(value).getTime() // value sent to the client
|
11
15
|
},
|
12
16
|
parseLiteral(ast) {
|
13
17
|
if (ast.kind === Kind.INT) {
|