@el-j/google-sheet-translations 1.0.1 → 1.0.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 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/utils/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAG1C;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,GAAG,CAQtC;AAED,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/utils/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAG1C;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,GAAG,CAatC;AAED,eAAe,gBAAgB,CAAC"}
@@ -9,9 +9,13 @@ const validateEnv_1 = require("./validateEnv");
9
9
  */
10
10
  function createAuthClient() {
11
11
  const { GOOGLE_CLIENT_EMAIL, GOOGLE_PRIVATE_KEY } = (0, validateEnv_1.validateEnv)();
12
+ // GitHub Actions (and many CI systems) store secrets with literal `\n`
13
+ // instead of real newlines. The PEM key must have actual newlines for
14
+ // OpenSSL to parse it; replace any escaped sequences before use.
15
+ const normalizedKey = GOOGLE_PRIVATE_KEY.replace(/\\n/g, "\n");
12
16
  return new google_auth_library_1.JWT({
13
17
  email: GOOGLE_CLIENT_EMAIL,
14
- key: GOOGLE_PRIVATE_KEY,
18
+ key: normalizedKey,
15
19
  scopes: ["https://www.googleapis.com/auth/spreadsheets"],
16
20
  });
17
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/utils/auth.ts"],"names":[],"mappings":";;AAOA,4CAQC;AAfD,6DAA0C;AAC1C,+CAA4C;AAE5C;;;GAGG;AACH,SAAgB,gBAAgB;IAC/B,MAAM,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,GAAG,IAAA,yBAAW,GAAE,CAAC;IAElE,OAAO,IAAI,yBAAG,CAAC;QACd,KAAK,EAAE,mBAAmB;QAC1B,GAAG,EAAE,kBAAkB;QACvB,MAAM,EAAE,CAAC,8CAA8C,CAAC;KACxD,CAAC,CAAC;AACJ,CAAC;AAED,kBAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/utils/auth.ts"],"names":[],"mappings":";;AAOA,4CAaC;AApBD,6DAA0C;AAC1C,+CAA4C;AAE5C;;;GAGG;AACH,SAAgB,gBAAgB;IAC/B,MAAM,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,GAAG,IAAA,yBAAW,GAAE,CAAC;IAElE,uEAAuE;IACvE,sEAAsE;IACtE,iEAAiE;IACjE,MAAM,aAAa,GAAG,kBAAkB,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAE/D,OAAO,IAAI,yBAAG,CAAC;QACd,KAAK,EAAE,mBAAmB;QAC1B,GAAG,EAAE,aAAa;QAClB,MAAM,EAAE,CAAC,8CAA8C,CAAC;KACxD,CAAC,CAAC;AACJ,CAAC;AAED,kBAAe,gBAAgB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@el-j/google-sheet-translations",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "A package to manage translations stored in Google Spreadsheets",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",