@google-cloud/nodejs-common 1.6.1 → 1.7.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.
- package/bin/install_functions.sh +2 -2
- package/package.json +15 -15
- package/src/apis/google_ads.js +4 -5
package/bin/install_functions.sh
CHANGED
|
@@ -2003,11 +2003,11 @@ quit_if_failed() {
|
|
|
2003
2003
|
# Array of string.
|
|
2004
2004
|
#######################################
|
|
2005
2005
|
join_string_array() {
|
|
2006
|
-
local separator
|
|
2006
|
+
local separator=\\$1;
|
|
2007
2007
|
shift
|
|
2008
2008
|
local first=$1;
|
|
2009
2009
|
shift
|
|
2010
|
-
printf %s "$first" "${@/#/$separator}"
|
|
2010
|
+
printf %s "$first" "${@/#/$separator}" | sed -e "s/\\$separator/$separator/g"
|
|
2011
2011
|
}
|
|
2012
2012
|
|
|
2013
2013
|
# Import other bash files.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@google-cloud/nodejs-common",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "A NodeJs common library for solutions based on Cloud Functions",
|
|
5
5
|
"author": "Google Inc.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -16,21 +16,21 @@
|
|
|
16
16
|
},
|
|
17
17
|
"homepage": "https://github.com/GoogleCloudPlatform/cloud-for-marketing/blob/master/marketing-analytics/activation/common-libs/nodejs-common/README.md",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@google-cloud/aiplatform": "^2.
|
|
20
|
-
"@google-cloud/automl": "^3.1.
|
|
21
|
-
"@google-cloud/bigquery": "^6.
|
|
22
|
-
"@google-cloud/datastore": "^7.1
|
|
23
|
-
"@google-cloud/firestore": "^6.
|
|
19
|
+
"@google-cloud/aiplatform": "^2.13.0",
|
|
20
|
+
"@google-cloud/automl": "^3.1.3",
|
|
21
|
+
"@google-cloud/bigquery": "^6.2.0",
|
|
22
|
+
"@google-cloud/datastore": "^7.5.1",
|
|
23
|
+
"@google-cloud/firestore": "^6.5.0",
|
|
24
24
|
"@google-cloud/logging-winston": "^5.3.0",
|
|
25
|
-
"@google-cloud/pubsub": "^3.
|
|
26
|
-
"@google-cloud/storage": "^6.
|
|
27
|
-
"@google-cloud/scheduler": "^3.
|
|
28
|
-
"@google-cloud/secret-manager": "^4.2.
|
|
29
|
-
"gaxios": "^5.0
|
|
30
|
-
"google-ads-api": "^
|
|
31
|
-
"google-ads-node": "^
|
|
32
|
-
"google-auth-library": "^8.
|
|
33
|
-
"googleapis": "^
|
|
25
|
+
"@google-cloud/pubsub": "^3.6.0",
|
|
26
|
+
"@google-cloud/storage": "^6.10.1",
|
|
27
|
+
"@google-cloud/scheduler": "^3.3.1",
|
|
28
|
+
"@google-cloud/secret-manager": "^4.2.2",
|
|
29
|
+
"gaxios": "^5.1.0",
|
|
30
|
+
"google-ads-api": "^13.0.1",
|
|
31
|
+
"google-ads-node": "^11.0.0",
|
|
32
|
+
"google-auth-library": "^8.8.0",
|
|
33
|
+
"googleapis": "^118.0.0",
|
|
34
34
|
"winston": "^3.8.2",
|
|
35
35
|
"lodash": "^4.17.21"
|
|
36
36
|
},
|
package/src/apis/google_ads.js
CHANGED
|
@@ -438,7 +438,7 @@ class GoogleAds {
|
|
|
438
438
|
} catch (error) {
|
|
439
439
|
this.logger.error(
|
|
440
440
|
`Error in ${functionName} batch: ${batchId}`, error);
|
|
441
|
-
this.
|
|
441
|
+
this.updateBatchResultWithError(batchResult, error, lines, 0);
|
|
442
442
|
return batchResult;
|
|
443
443
|
}
|
|
444
444
|
}
|
|
@@ -493,9 +493,8 @@ class GoogleAds {
|
|
|
493
493
|
* @param {number} fieldPathIndex The index of 'FieldPathElement' in the array
|
|
494
494
|
* 'field_path_elements'. This is used to get the original line related to
|
|
495
495
|
* this GoogleAdsError.
|
|
496
|
-
* @private
|
|
497
496
|
*/
|
|
498
|
-
|
|
497
|
+
updateBatchResultWithError(batchResult, error, lines, fieldPathIndex) {
|
|
499
498
|
batchResult.result = false;
|
|
500
499
|
if (error.errors) { //GoogleAdsFailure
|
|
501
500
|
this.extraFailedLines_(batchResult, [error], lines, fieldPathIndex);
|
|
@@ -773,7 +772,7 @@ class GoogleAds {
|
|
|
773
772
|
} catch (error) {
|
|
774
773
|
this.logger.error(
|
|
775
774
|
`Error in Customer Match upload batch[${batchId}]`, error);
|
|
776
|
-
this.
|
|
775
|
+
this.updateBatchResultWithError(batchResult, error, lines, 2);
|
|
777
776
|
return batchResult;
|
|
778
777
|
}
|
|
779
778
|
}
|
|
@@ -1061,7 +1060,7 @@ class GoogleAds {
|
|
|
1061
1060
|
} catch (error) {
|
|
1062
1061
|
this.logger.error(
|
|
1063
1062
|
`Error in OfflineUserDataJob add operations batch[${batchId}]`, error);
|
|
1064
|
-
this.
|
|
1063
|
+
this.updateBatchResultWithError(batchResult, error, lines, 2);
|
|
1065
1064
|
return batchResult;
|
|
1066
1065
|
}
|
|
1067
1066
|
}
|