-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from htdangkhoa/develop
- Loading branch information
Showing
44 changed files
with
1,399 additions
and
2,423 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,8 +105,6 @@ dist | |
|
||
sa.json | ||
|
||
build | ||
|
||
.DS_Store | ||
|
||
generated | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,46 +14,65 @@ | |
"contributors": [ | ||
"[email protected]" | ||
], | ||
"keywords": [ | ||
"google", | ||
"ads", | ||
"api", | ||
"node", | ||
"google ads api", | ||
"google ads", | ||
"google ads nodejs", | ||
"google ads js", | ||
"ads node", | ||
"grpc", | ||
"proto", | ||
"sdk" | ||
], | ||
"license": "MIT", | ||
"main": "build/lib/index.js", | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"import": "./dist/esm/index.js", | ||
"require": "./dist/cjs/index.js", | ||
"default": "./dist/esm/index.js", | ||
"types": "./dist/types/index.d.ts" | ||
} | ||
}, | ||
"main": "./dist/cjs/index.js", | ||
"module": "./dist/esm/index.js", | ||
"types": "./dist/types/index.d.ts", | ||
"files": [ | ||
"build/lib", | ||
"build/generated" | ||
"dist" | ||
], | ||
"scripts": { | ||
"test": "jest --runInBand --no-cache", | ||
"test:cov": "npm run test && coveralls < coverage/lcov.info", | ||
"prebuild": "rimraf build", | ||
"build": "tsc", | ||
"test": "vitest", | ||
"test:cov": "vitest --coverage && coveralls < coverage/lcov.info", | ||
"prebuild": "rm -rf dist", | ||
"build": "npm run build:esm && npm run build:cjs && npm run build:types", | ||
"build:esm": "node scripts/build/esm.mjs", | ||
"build:cjs": "node scripts/build/cjs.mjs", | ||
"build:types": "node scripts/build/types.mjs", | ||
"generate": "./scripts/generate.sh" | ||
}, | ||
"dependencies": { | ||
"@grpc/grpc-js": "^1.10.9", | ||
"@bufbuild/protobuf": "^2.1.0", | ||
"@grpc/grpc-js": "^1.12.0", | ||
"deepmerge": "^4.3.1", | ||
"log4js": "^6.9.1", | ||
"protobufjs": "^7.3.2" | ||
"log4js": "^6.9.1" | ||
}, | ||
"devDependencies": { | ||
"@types/glob": "^8.1.0", | ||
"@types/jest": "^29.5.12", | ||
"@types/node": "^20.11.30", | ||
"@types/node": "^22.7.4", | ||
"@vitest/coverage-v8": "^2.1.2", | ||
"coveralls-next": "^4.2.0", | ||
"glob": "^10.3.10", | ||
"googleapis": "^134.0.0", | ||
"jest": "^29.7.0", | ||
"jest-junit": "^16.0.0", | ||
"rimraf": "^5.0.5", | ||
"string-width": "^4.2.0", | ||
"ts-jest": "^29.1.2", | ||
"fast-glob": "^3.3.2", | ||
"googleapis": "^144.0.0", | ||
"ts-node": "^10.9.2", | ||
"ts-proto": "^1.170.0", | ||
"typescript": "5.4.3" | ||
"ts-proto": "^2.2.2", | ||
"typescript": "5.6.2", | ||
"vitest": "^2.1.2" | ||
}, | ||
"publishConfig": { | ||
"access": "public", | ||
"registry": "https://registry.npmjs.org" | ||
}, | ||
"resolutions": { | ||
"string-width": "^4.2.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { execSync } from 'child_process'; | ||
|
||
async function build() { | ||
try { | ||
execSync('tsc --project tsconfig.cjs.json', { stdio: 'inherit' }); | ||
execSync(`echo '{"type": "commonjs"}' > dist/cjs/package.json`, { | ||
stdio: 'inherit', | ||
}); | ||
} catch (error) { | ||
throw error; | ||
} | ||
} | ||
|
||
build(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import * as path from 'path'; | ||
import * as fs from 'fs'; | ||
import { execSync } from 'child_process'; | ||
|
||
async function build() { | ||
// const indexFile = path.resolve(process.cwd(), 'src', 'lib', 'index.ts'); | ||
|
||
// const indexContent = fs.readFileSync(indexFile, 'utf-8'); | ||
|
||
// const requirePolyfill = ` | ||
// import { createRequire } from 'module'; | ||
// const require = createRequire(import.meta.url); | ||
// global.require = require; | ||
// `; | ||
|
||
// const esmIndexContent = requirePolyfill + indexContent; | ||
|
||
// fs.writeFileSync(indexFile, esmIndexContent); | ||
|
||
try { | ||
execSync('tsc --project tsconfig.esm.json', { stdio: 'inherit' }); | ||
execSync(`echo '{"type": "module"}' > dist/esm/package.json`, { | ||
stdio: 'inherit', | ||
}); | ||
} catch (error) { | ||
throw error; | ||
} finally { | ||
// fs.writeFileSync(indexFile, indexContent); | ||
} | ||
} | ||
|
||
build(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { execSync } from 'child_process'; | ||
|
||
async function build() { | ||
try { | ||
execSync('tsc --project tsconfig.types.json', { stdio: 'inherit' }); | ||
// execSync(`echo '{"type": "commonjs"}' > dist/cjs/package.json`, { | ||
// stdio: 'inherit', | ||
// }); | ||
} catch (error) { | ||
throw error; | ||
} | ||
} | ||
|
||
build(); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.