Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
1. Update google-ads-node in package.json
1.1 Update badge version in readme.md + container.jsx
2. yarn && yarn build
3. update scripts/schema.json (https://googleads.googleapis.com/$discovery/rest?version=v2)
4. update compiled_resources.json by running `pbjs -t json googleapis/google/rpc/*.proto googleapis/google/longrunning/*.proto googleapis//google/ads/googleads/v2/common/*.proto googleapis//google/ads/googleads/v2/errors/*.proto googleapis//google/ads/googleads/v2/enums/*.proto googleapis//google/ads/googleads/v2/resources/*.proto googleapis//google/ads/googleads/v2/services/*.proto > compiled_resources.json`
5. clear the .cache folder in the root of this project to make sure you get new examples from our test account
*/
const fs = require('fs-extra')
const { template, camelCase, snakeCase, endsWith, get, maxBy } = require('lodash')
const Promise = require('bluebird')
var TurndownService = require('turndown')
TurndownService.prototype.escape = t => t
var turndownService = new TurndownService()
const showdown = require('showdown')
showdown.setOption('literalMidWordUnderscores', true)
const converter = new showdown.Converter()
const sanitiseHtml = gg => {
gg = turndownService.turndown(gg)
const result = converter.makeHtml(gg)
// remove <p> tags
return result.substring(3, result.length - 4)
}
require('dotenv').config()
const { GoogleAdsApi } = require('../build')</p>
/**
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.
*/
import TurndownService from 'turndown';
import { gfm } from 'turndown-plugin-gfm';
// Overrides the escape() method, enlarging it.
{
const originalEscape = TurndownService.prototype.escape;
TurndownService.prototype.escape = function( string ) {
string = originalEscape( string );
// Escape "<".
string = string.replace( /
/**
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.
*/
import TurndownService from 'turndown';
import { gfm } from 'turndown-plugin-gfm';
// Overrides the escape() method, enlarging it.
{
const originalEscape = TurndownService.prototype.escape;
TurndownService.prototype.escape = function( string ) {
string = originalEscape( string );
// Escape "<".
string = string.replace( /