@mondaycom/apps-sdk
Advanced tools
Comparing version 3.0.9-beta1 to 3.0.10
@@ -52,7 +52,5 @@ "use strict"; | ||
var logger = new logger_1.Logger('SecureStorage', { mondayInternal: true }); | ||
var googleAuthClient = new google_auth_library_1.GoogleAuth({ authClient: new google_auth_library_1.Compute() }); | ||
googleAuthClient.defaultScopes = [gcp_1.GCP_SCOPES.CLOUD_PLATFORM]; | ||
var generateJwtSigningUrl = function (serviceAccountEmail) { return "https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/".concat(serviceAccountEmail, ":signJwt"); }; | ||
var generateGcpIdentityToken = function () { return __awaiter(void 0, void 0, void 0, function () { | ||
var secureStorageAddress, idTokenClient, identityToken; | ||
var secureStorageAddress, googleAuthClient, idTokenClient, identityToken; | ||
return __generator(this, function (_a) { | ||
@@ -62,2 +60,3 @@ switch (_a.label) { | ||
secureStorageAddress = (0, env_1.getMondayCodeContext)().secureStorageAddress; | ||
googleAuthClient = new google_auth_library_1.GoogleAuth(); | ||
return [4 /*yield*/, googleAuthClient.getIdTokenClient(secureStorageAddress)]; | ||
@@ -104,3 +103,3 @@ case 1: | ||
var getGcpConnectionData = function () { return __awaiter(void 0, void 0, void 0, function () { | ||
var projectId, serviceAccountEmail, accessToken, issueTimeInSeconds, expirationInSeconds, payload, jwtSigningUrl, response, responseJson, signedToken; | ||
var auth, projectId, serviceAccountEmail, accessToken, issueTimeInSeconds, expirationInSeconds, payload, jwtSigningUrl, response, responseJson, signedToken; | ||
return __generator(this, function (_a) { | ||
@@ -110,9 +109,11 @@ switch (_a.label) { | ||
(0, env_1.validateEnvironment)(); | ||
return [4 /*yield*/, googleAuthClient.getProjectId()]; | ||
auth = new google_auth_library_1.GoogleAuth(); | ||
auth.defaultScopes = [gcp_1.GCP_SCOPES.CLOUD_PLATFORM]; | ||
return [4 /*yield*/, auth.getProjectId()]; | ||
case 1: | ||
projectId = _a.sent(); | ||
return [4 /*yield*/, googleAuthClient.getCredentials()]; | ||
return [4 /*yield*/, auth.getCredentials()]; | ||
case 2: | ||
serviceAccountEmail = (_a.sent()).client_email; | ||
return [4 /*yield*/, googleAuthClient.getAccessToken()]; | ||
return [4 /*yield*/, auth.getAccessToken()]; | ||
case 3: | ||
@@ -119,0 +120,0 @@ accessToken = _a.sent(); |
"use strict"; | ||
exports.__esModule = true; | ||
exports["default"] = { name: '@mondaycom/apps-sdk', version: '3.0.9-beta1' }; | ||
exports["default"] = { name: '@mondaycom/apps-sdk', version: '3.0.10' }; | ||
//# sourceMappingURL=minimal-package.js.map |
{ | ||
"name": "@mondaycom/apps-sdk", | ||
"version": "3.0.9-beta1", | ||
"version": "3.0.10", | ||
"description": "monday apps SDK for NodeJS", | ||
@@ -51,3 +51,3 @@ "main": "./dist/cjs/index.js", | ||
"@types/app-root-path": "^1.2.4", | ||
"@types/jest": "^27.3.1", | ||
"@types/jest": "^29.5.0", | ||
"@types/jsonwebtoken": "^9.0.1", | ||
@@ -66,3 +66,3 @@ "@types/node-fetch": "^2.6.4", | ||
"prettier": "^2.8.4", | ||
"ts-jest": "^27.1.4", | ||
"ts-jest": "^27.0.5", | ||
"tsc-alias": "^1.8.4", | ||
@@ -73,5 +73,5 @@ "tsconfig-paths": "^4.1.2", | ||
"dependencies": { | ||
"@google-cloud/pubsub": "^4.4.0", | ||
"@google-cloud/pubsub": "^4.0.7", | ||
"app-root-path": "^3.1.0", | ||
"google-auth-library": "^9.10.0", | ||
"google-auth-library": "^8.7.0", | ||
"http-status-codes": "^2.2.0", | ||
@@ -78,0 +78,0 @@ "jsonwebtoken": "^9.0.0", |
@@ -41,3 +41,2 @@ "use strict"; | ||
var pubsub_1 = require("@google-cloud/pubsub"); | ||
var google_auth_library_1 = require("google-auth-library"); | ||
var apps_sdk_error_1 = require("../errors/apps-sdk-error.js"); | ||
@@ -48,5 +47,3 @@ var logger_1 = require("../utils/logger.js"); | ||
function QueueProd() { | ||
var computeClient = new google_auth_library_1.Compute(); | ||
var auth = new google_auth_library_1.GoogleAuth({ authClient: computeClient }); | ||
this.pubSubClient = new pubsub_1.PubSub({ auth: auth }); | ||
this.pubSubClient = new pubsub_1.PubSub(); | ||
} | ||
@@ -53,0 +50,0 @@ QueueProd.prototype.publishMessage = function (message, options) { |
@@ -37,3 +37,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
}; | ||
import { Compute, GoogleAuth } from 'google-auth-library'; | ||
import { GoogleAuth } from 'google-auth-library'; | ||
import jwt from 'jsonwebtoken'; | ||
@@ -47,7 +47,5 @@ import fetch from 'node-fetch'; | ||
var logger = new Logger('SecureStorage', { mondayInternal: true }); | ||
var googleAuthClient = new GoogleAuth({ authClient: new Compute() }); | ||
googleAuthClient.defaultScopes = [GCP_SCOPES.CLOUD_PLATFORM]; | ||
var generateJwtSigningUrl = function (serviceAccountEmail) { return "https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/".concat(serviceAccountEmail, ":signJwt"); }; | ||
var generateGcpIdentityToken = function () { return __awaiter(void 0, void 0, void 0, function () { | ||
var secureStorageAddress, idTokenClient, identityToken; | ||
var secureStorageAddress, googleAuthClient, idTokenClient, identityToken; | ||
return __generator(this, function (_a) { | ||
@@ -57,2 +55,3 @@ switch (_a.label) { | ||
secureStorageAddress = getMondayCodeContext().secureStorageAddress; | ||
googleAuthClient = new GoogleAuth(); | ||
return [4 /*yield*/, googleAuthClient.getIdTokenClient(secureStorageAddress)]; | ||
@@ -98,3 +97,3 @@ case 1: | ||
export var getGcpConnectionData = function () { return __awaiter(void 0, void 0, void 0, function () { | ||
var projectId, serviceAccountEmail, accessToken, issueTimeInSeconds, expirationInSeconds, payload, jwtSigningUrl, response, responseJson, signedToken; | ||
var auth, projectId, serviceAccountEmail, accessToken, issueTimeInSeconds, expirationInSeconds, payload, jwtSigningUrl, response, responseJson, signedToken; | ||
return __generator(this, function (_a) { | ||
@@ -104,9 +103,11 @@ switch (_a.label) { | ||
validateEnvironment(); | ||
return [4 /*yield*/, googleAuthClient.getProjectId()]; | ||
auth = new GoogleAuth(); | ||
auth.defaultScopes = [GCP_SCOPES.CLOUD_PLATFORM]; | ||
return [4 /*yield*/, auth.getProjectId()]; | ||
case 1: | ||
projectId = _a.sent(); | ||
return [4 /*yield*/, googleAuthClient.getCredentials()]; | ||
return [4 /*yield*/, auth.getCredentials()]; | ||
case 2: | ||
serviceAccountEmail = (_a.sent()).client_email; | ||
return [4 /*yield*/, googleAuthClient.getAccessToken()]; | ||
return [4 /*yield*/, auth.getAccessToken()]; | ||
case 3: | ||
@@ -113,0 +114,0 @@ accessToken = _a.sent(); |
@@ -1,2 +0,2 @@ | ||
export default { name: '@mondaycom/apps-sdk', version: '3.0.9-beta1' }; | ||
export default { name: '@mondaycom/apps-sdk', version: '3.0.10' }; | ||
//# sourceMappingURL=minimal-package.js.map |
{ | ||
"name": "@mondaycom/apps-sdk", | ||
"version": "3.0.9-beta1", | ||
"version": "3.0.10", | ||
"description": "monday apps SDK for NodeJS", | ||
@@ -51,3 +51,3 @@ "main": "./dist/cjs/index.js", | ||
"@types/app-root-path": "^1.2.4", | ||
"@types/jest": "^27.3.1", | ||
"@types/jest": "^29.5.0", | ||
"@types/jsonwebtoken": "^9.0.1", | ||
@@ -66,3 +66,3 @@ "@types/node-fetch": "^2.6.4", | ||
"prettier": "^2.8.4", | ||
"ts-jest": "^27.1.4", | ||
"ts-jest": "^27.0.5", | ||
"tsc-alias": "^1.8.4", | ||
@@ -73,5 +73,5 @@ "tsconfig-paths": "^4.1.2", | ||
"dependencies": { | ||
"@google-cloud/pubsub": "^4.4.0", | ||
"@google-cloud/pubsub": "^4.0.7", | ||
"app-root-path": "^3.1.0", | ||
"google-auth-library": "^9.10.0", | ||
"google-auth-library": "^8.7.0", | ||
"http-status-codes": "^2.2.0", | ||
@@ -78,0 +78,0 @@ "jsonwebtoken": "^9.0.0", |
@@ -38,3 +38,2 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
import { PubSub } from '@google-cloud/pubsub'; | ||
import { Compute, GoogleAuth } from 'google-auth-library'; | ||
import { BadRequestError, InternalServerError } from '../errors/apps-sdk-error.js'; | ||
@@ -45,5 +44,3 @@ import { Logger } from '../utils/logger.js'; | ||
function QueueProd() { | ||
var computeClient = new Compute(); | ||
var auth = new GoogleAuth({ authClient: computeClient }); | ||
this.pubSubClient = new PubSub({ auth: auth }); | ||
this.pubSubClient = new PubSub(); | ||
} | ||
@@ -50,0 +47,0 @@ QueueProd.prototype.publishMessage = function (message, options) { |
{ | ||
"name": "@mondaycom/apps-sdk", | ||
"version": "3.0.9-beta1", | ||
"version": "3.0.10", | ||
"description": "monday apps SDK for NodeJS", | ||
@@ -51,3 +51,3 @@ "main": "./dist/cjs/index.js", | ||
"@types/app-root-path": "^1.2.4", | ||
"@types/jest": "^27.3.1", | ||
"@types/jest": "^29.5.0", | ||
"@types/jsonwebtoken": "^9.0.1", | ||
@@ -66,3 +66,3 @@ "@types/node-fetch": "^2.6.4", | ||
"prettier": "^2.8.4", | ||
"ts-jest": "^27.1.4", | ||
"ts-jest": "^27.0.5", | ||
"tsc-alias": "^1.8.4", | ||
@@ -73,5 +73,5 @@ "tsconfig-paths": "^4.1.2", | ||
"dependencies": { | ||
"@google-cloud/pubsub": "^4.4.0", | ||
"@google-cloud/pubsub": "^4.0.7", | ||
"app-root-path": "^3.1.0", | ||
"google-auth-library": "^9.10.0", | ||
"google-auth-library": "^8.7.0", | ||
"http-status-codes": "^2.2.0", | ||
@@ -78,0 +78,0 @@ "jsonwebtoken": "^9.0.0", |
@@ -1,5 +0,1 @@ | ||
<h3 style="color:red"><b>Public access to this SDK is currently restricted but will become available in the next few months</b></h3> | ||
--- | ||
# apps-sdk | ||
@@ -6,0 +2,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
297230
4072
260
+ Addedfast-text-encoding@1.0.6(transitive)
+ Addedgaxios@5.1.3(transitive)
+ Addedgcp-metadata@5.3.0(transitive)
+ Addedgoogle-auth-library@8.9.0(transitive)
+ Addedgoogle-p12-pem@4.0.1(transitive)
+ Addedgtoken@6.1.2(transitive)
+ Addedlru-cache@6.0.0(transitive)
+ Addednode-forge@1.3.1(transitive)
+ Addedyallist@4.0.0(transitive)
Updated@google-cloud/pubsub@^4.0.7
Updatedgoogle-auth-library@^8.7.0