@lowdefy/connection-google-sheets 4.7.3 → 5.1.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.
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ import { type } from '@lowdefy/helpers';
|
|
16
|
-
import
|
|
16
|
+
import dayjs from 'dayjs';
|
|
17
|
+
import utc from 'dayjs/plugin/utc.js';
|
|
18
|
+
dayjs.extend(utc);
|
|
17
19
|
const readTransformers = {
|
|
18
20
|
string: (value)=>value,
|
|
19
21
|
number: (value)=>{
|
|
@@ -23,7 +25,10 @@ const readTransformers = {
|
|
|
23
25
|
},
|
|
24
26
|
boolean: (value)=>value === 'TRUE',
|
|
25
27
|
date: (value)=>{
|
|
26
|
-
|
|
28
|
+
// Reject short strings that aren't meaningful dates (e.g. "1", "01")
|
|
29
|
+
// but dayjs would parse timezone-dependently.
|
|
30
|
+
if (typeof value === 'string' && value.length < 4) return null;
|
|
31
|
+
const date = dayjs.utc(value);
|
|
27
32
|
if (!date.isValid()) return null;
|
|
28
33
|
return date.toDate();
|
|
29
34
|
},
|
package/dist/types.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/*
|
|
2
2
|
Copyright 2020-2026 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -12,8 +12,17 @@
|
|
|
12
12
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
*/ export default {
|
|
16
|
+
connections: [
|
|
17
|
+
'GoogleSheet'
|
|
18
|
+
],
|
|
19
|
+
requests: [
|
|
20
|
+
'GoogleSheetAppendMany',
|
|
21
|
+
'GoogleSheetAppendOne',
|
|
22
|
+
'GoogleSheetDeleteOne',
|
|
23
|
+
'GoogleSheetGetMany',
|
|
24
|
+
'GoogleSheetGetOne',
|
|
25
|
+
'GoogleSheetUpdateOne',
|
|
26
|
+
'GoogleSheetUpdateMany'
|
|
27
|
+
]
|
|
19
28
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/connection-google-sheets",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -35,24 +35,24 @@
|
|
|
35
35
|
"dist/*"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@lowdefy/helpers": "
|
|
38
|
+
"@lowdefy/helpers": "5.1.0",
|
|
39
39
|
"google-spreadsheet": "3.3.0",
|
|
40
40
|
"mingo": "6.4.9",
|
|
41
|
-
"
|
|
41
|
+
"dayjs": "1.11.19"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@jest/globals": "28.1.3",
|
|
45
|
-
"@lowdefy/ajv": "
|
|
46
|
-
"@swc/cli": "0.
|
|
47
|
-
"@swc/core": "1.
|
|
48
|
-
"@swc/jest": "0.2.
|
|
45
|
+
"@lowdefy/ajv": "5.1.0",
|
|
46
|
+
"@swc/cli": "0.8.0",
|
|
47
|
+
"@swc/core": "1.15.18",
|
|
48
|
+
"@swc/jest": "0.2.39",
|
|
49
49
|
"jest": "28.1.3"
|
|
50
50
|
},
|
|
51
51
|
"publishConfig": {
|
|
52
52
|
"access": "public"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
|
-
"build": "swc src --out-dir dist --config-file ../../../../.swcrc --
|
|
55
|
+
"build": "swc src --out-dir dist --config-file ../../../../.swcrc --cli-config-file ../../../../.swc-cli.json --copy-files",
|
|
56
56
|
"clean": "rm -rf dist",
|
|
57
57
|
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
|
|
58
58
|
}
|