@openfn/language-googlesheets 2.2.1 → 2.2.2

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.
@@ -1,20 +1,19 @@
1
1
  {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "properties": {
4
- "accessToken": {
5
- "title": "Access Token",
6
- "type": "string",
7
- "description": "Your Google Sheets access token",
8
- "writeOnly": true,
9
- "minLength": 1,
10
- "examples": [
11
- "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IjlGWERwYmZNRlQyU3ZRdVhoODQ2WVR3RUlCdyIsI"
12
- ]
13
- }
14
- },
15
- "type": "object",
16
- "additionalProperties": true,
17
- "required": [
18
- "accessToken"
19
- ]
20
- }
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$comment": "OAuth2",
4
+ "properties": {
5
+ "access_token": {
6
+ "title": "Access Token",
7
+ "type": "string",
8
+ "description": "Your Google Sheets access token",
9
+ "writeOnly": true,
10
+ "minLength": 1,
11
+ "examples": [
12
+ "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IjlGWERwYmZNRlQyU3ZRdVhoODQ2WVR3RUlCdyIsI"
13
+ ]
14
+ }
15
+ },
16
+ "type": "object",
17
+ "additionalProperties": true,
18
+ "required": ["access_token"]
19
+ }
package/dist/index.cjs CHANGED
@@ -56,6 +56,7 @@ __export(Adaptor_exports, {
56
56
  sourceValue: () => import_language_common2.sourceValue
57
57
  });
58
58
  var import_language_common = require("@openfn/language-common");
59
+ var import_util = require("@openfn/language-common/util");
59
60
  var import_googleapis = require("googleapis");
60
61
  var import_language_common2 = require("@openfn/language-common");
61
62
  function execute(...operations) {
@@ -64,7 +65,11 @@ function execute(...operations) {
64
65
  data: null
65
66
  };
66
67
  return (state) => {
67
- return (0, import_language_common.execute)(...operations)({ ...initialState, ...state });
68
+ return (0, import_language_common.execute)(...operations)({
69
+ ...initialState,
70
+ ...state,
71
+ configuration: (0, import_util.normalizeOauthConfig)(state.configuration)
72
+ });
68
73
  };
69
74
  }
70
75
  function appendValues(params) {
package/dist/index.js CHANGED
@@ -26,6 +26,7 @@ import {
26
26
  execute as commonExecute,
27
27
  expandReferences
28
28
  } from "@openfn/language-common";
29
+ import { normalizeOauthConfig } from "@openfn/language-common/util";
29
30
  import { google } from "googleapis";
30
31
  import {
31
32
  alterState,
@@ -47,7 +48,11 @@ function execute(...operations) {
47
48
  data: null
48
49
  };
49
50
  return (state) => {
50
- return commonExecute(...operations)({ ...initialState, ...state });
51
+ return commonExecute(...operations)({
52
+ ...initialState,
53
+ ...state,
54
+ configuration: normalizeOauthConfig(state.configuration)
55
+ });
51
56
  };
52
57
  }
53
58
  function appendValues(params) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfn/language-googlesheets",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "description": "A Google Sheets Language Pack for OpenFn",
5
5
  "homepage": "https://docs.openfn.org",
6
6
  "repository": {
@@ -23,7 +23,7 @@
23
23
  "configuration-schema.json"
24
24
  ],
25
25
  "dependencies": {
26
- "@openfn/language-common": "^1.8.1",
26
+ "@openfn/language-common": "^1.10.0",
27
27
  "googleapis": "100.0.0"
28
28
  },
29
29
  "devDependencies": {