@lowdefy/connection-google-sheets 4.0.0-alpha.8 → 4.0.0-rc.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.
Files changed (24) hide show
  1. package/dist/connections/GoogleSheet/GoogleSheet.js +1 -1
  2. package/dist/connections/GoogleSheet/GoogleSheetAppendMany/GoogleSheetAppendMany.js +1 -1
  3. package/dist/connections/GoogleSheet/GoogleSheetAppendMany/schema.js +1 -1
  4. package/dist/connections/GoogleSheet/GoogleSheetAppendOne/GoogleSheetAppendOne.js +1 -1
  5. package/dist/connections/GoogleSheet/GoogleSheetAppendOne/schema.js +1 -1
  6. package/dist/connections/GoogleSheet/GoogleSheetDeleteOne/GoogleSheetDeleteOne.js +1 -1
  7. package/dist/connections/GoogleSheet/GoogleSheetDeleteOne/schema.js +1 -1
  8. package/dist/connections/GoogleSheet/GoogleSheetGetMany/GoogleSheetGetMany.js +1 -1
  9. package/dist/connections/GoogleSheet/GoogleSheetGetMany/schema.js +1 -1
  10. package/dist/connections/GoogleSheet/GoogleSheetGetOne/GoogleSheetGetOne.js +1 -1
  11. package/dist/connections/GoogleSheet/GoogleSheetGetOne/schema.js +1 -1
  12. package/dist/connections/GoogleSheet/GoogleSheetUpdateMany/GoogleSheetUpdateMany.js +1 -1
  13. package/dist/connections/GoogleSheet/GoogleSheetUpdateMany/schema.js +1 -1
  14. package/dist/connections/GoogleSheet/GoogleSheetUpdateOne/GoogleSheetUpdateOne.js +1 -1
  15. package/dist/connections/GoogleSheet/GoogleSheetUpdateOne/schema.js +1 -1
  16. package/dist/connections/GoogleSheet/cleanRows.js +2 -3
  17. package/dist/connections/GoogleSheet/getSheet.js +1 -1
  18. package/dist/connections/GoogleSheet/mingoAggregation.js +1 -1
  19. package/dist/connections/GoogleSheet/mingoFilter.js +1 -1
  20. package/dist/connections/GoogleSheet/schema.js +1 -1
  21. package/dist/connections/GoogleSheet/transformTypes.js +9 -17
  22. package/dist/connections.js +1 -1
  23. package/dist/types.js +2 -3
  24. package/package.json +14 -15
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -25,8 +25,7 @@ function cleanRows(input) {
25
25
  return cleanRow(input);
26
26
  }
27
27
  if (type.isArray(input)) {
28
- return input.map((row)=>cleanRow(row)
29
- );
28
+ return input.map((row)=>cleanRow(row));
30
29
  }
31
30
  throw new Error(`cleanRows received invalid input type ${type.typeOf(input)}.`);
32
31
  }
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -15,15 +15,13 @@
15
15
  */ import { type } from '@lowdefy/helpers';
16
16
  import moment from 'moment';
17
17
  const readTransformers = {
18
- string: (value)=>value
19
- ,
18
+ string: (value)=>value,
20
19
  number: (value)=>{
21
20
  const number = Number(value);
22
21
  if (isNaN(number)) return null;
23
22
  return number;
24
23
  },
25
- boolean: (value)=>value === 'TRUE'
26
- ,
24
+ boolean: (value)=>value === 'TRUE',
27
25
  date: (value)=>{
28
26
  const date = moment.utc(value);
29
27
  if (!date.isValid()) return null;
@@ -38,17 +36,14 @@ const readTransformers = {
38
36
  }
39
37
  };
40
38
  const writeTransformers = {
41
- string: (value)=>value
42
- ,
43
- number: (value)=>type.isNumber(value) ? value.toString() : value
44
- ,
39
+ string: (value)=>value,
40
+ number: (value)=>type.isNumber(value) ? value.toString() : value,
45
41
  boolean: (value)=>{
46
42
  if (value === true) return 'TRUE';
47
43
  if (value === false) return 'FALSE';
48
44
  return value;
49
45
  },
50
- date: (value)=>type.isDate(value) ? value.toISOString() : value
51
- ,
46
+ date: (value)=>type.isDate(value) ? value.toISOString() : value,
52
47
  json: (value)=>{
53
48
  try {
54
49
  return JSON.stringify(value);
@@ -64,8 +59,7 @@ const transformObject = ({ transformers , types })=>(object)=>{
64
59
  }
65
60
  });
66
61
  return object;
67
- }
68
- ;
62
+ };
69
63
  function transformRead({ input , types ={} }) {
70
64
  if (type.isObject(input)) {
71
65
  return transformObject({
@@ -77,8 +71,7 @@ function transformRead({ input , types ={} }) {
77
71
  return input.map((obj)=>transformObject({
78
72
  transformers: readTransformers,
79
73
  types
80
- })(obj)
81
- );
74
+ })(obj));
82
75
  }
83
76
  throw new Error(`transformRead received invalid input type ${type.typeOf(input)}.`);
84
77
  }
@@ -93,8 +86,7 @@ function transformWrite({ input , types ={} }) {
93
86
  return input.map((obj)=>transformObject({
94
87
  transformers: writeTransformers,
95
88
  types
96
- })(obj)
97
- );
89
+ })(obj));
98
90
  }
99
91
  throw new Error(`transformWrite received invalid input type ${type.typeOf(input)}.`);
100
92
  }
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
package/dist/types.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable import/namespace */ /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -15,6 +15,5 @@
15
15
  */ import * as connections from './connections.js';
16
16
  export default {
17
17
  connections: Object.keys(connections),
18
- requests: Object.keys(connections).map((connection)=>Object.keys(connections[connection].requests)
19
- ).flat()
18
+ requests: Object.keys(connections).map((connection)=>Object.keys(connections[connection].requests)).flat()
20
19
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lowdefy/connection-google-sheets",
3
- "version": "4.0.0-alpha.8",
4
- "licence": "Apache-2.0",
3
+ "version": "4.0.0-rc.0",
4
+ "license": "Apache-2.0",
5
5
  "description": "",
6
6
  "homepage": "https://lowdefy.com",
7
7
  "keywords": [
@@ -35,27 +35,26 @@
35
35
  "dist/*"
36
36
  ],
37
37
  "scripts": {
38
- "build": "yarn swc",
38
+ "build": "swc src --out-dir dist --config-file ../../../../.swcrc --delete-dir-on-start --copy-files",
39
39
  "clean": "rm -rf dist",
40
- "prepare": "yarn build",
41
- "swc": "swc src --out-dir dist --config-file ../../../../.swcrc --delete-dir-on-start --copy-files",
40
+ "prepublishOnly": "pnpm build",
42
41
  "test": "jest --coverage"
43
42
  },
44
43
  "dependencies": {
45
- "@lowdefy/helpers": "4.0.0-alpha.8",
46
- "google-spreadsheet": "3.2.0",
47
- "mingo": "6.0.4",
48
- "moment": "2.29.1"
44
+ "@lowdefy/helpers": "4.0.0-rc.0",
45
+ "google-spreadsheet": "3.3.0",
46
+ "mingo": "6.0.6",
47
+ "moment": "2.29.4"
49
48
  },
50
49
  "devDependencies": {
51
- "@lowdefy/ajv": "4.0.0-alpha.8",
52
- "@swc/cli": "0.1.55",
53
- "@swc/core": "1.2.135",
54
- "@swc/jest": "0.2.17",
55
- "jest": "27.5.1"
50
+ "@lowdefy/ajv": "4.0.0-rc.0",
51
+ "@swc/cli": "0.1.57",
52
+ "@swc/core": "1.2.194",
53
+ "@swc/jest": "0.2.21",
54
+ "jest": "28.1.0"
56
55
  },
57
56
  "publishConfig": {
58
57
  "access": "public"
59
58
  },
60
- "gitHead": "9d56b83cf45e868afe3a1eeba750fe826eb74c8c"
59
+ "gitHead": "f6872d7ff6da421710096536fce7b2016ef8f35c"
61
60
  }