package.json 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. {
  2. "name": "puppeteer-core",
  3. "version": "20.9.0",
  4. "description": "A high-level API to control headless Chrome over the DevTools Protocol",
  5. "keywords": [
  6. "puppeteer",
  7. "chrome",
  8. "headless",
  9. "automation"
  10. ],
  11. "type": "commonjs",
  12. "main": "./lib/cjs/puppeteer/puppeteer-core.js",
  13. "types": "./lib/types.d.ts",
  14. "exports": {
  15. ".": {
  16. "types": "./lib/types.d.ts",
  17. "import": "./lib/esm/puppeteer/puppeteer-core.js",
  18. "require": "./lib/cjs/puppeteer/puppeteer-core.js"
  19. },
  20. "./internal/*": {
  21. "import": "./lib/esm/puppeteer/*",
  22. "require": "./lib/cjs/puppeteer/*"
  23. },
  24. "./*": {
  25. "import": "./*",
  26. "require": "./*"
  27. }
  28. },
  29. "repository": {
  30. "type": "git",
  31. "url": "https://github.com/puppeteer/puppeteer/tree/main/packages/puppeteer-core"
  32. },
  33. "engines": {
  34. "node": ">=16.3.0"
  35. },
  36. "scripts": {
  37. "build:docs": "wireit",
  38. "build:tsc": "wireit",
  39. "build:types": "wireit",
  40. "build": "wireit",
  41. "check": "tsx tools/ensure-correct-devtools-protocol-package",
  42. "clean": "tsc -b --clean && rm -rf lib src/generated",
  43. "generate:package-json": "wireit",
  44. "generate:sources": "wireit",
  45. "prepack": "wireit",
  46. "unit": "wireit"
  47. },
  48. "wireit": {
  49. "prepack": {
  50. "command": "tsx ../../tools/cp.ts ../../README.md README.md",
  51. "files": [
  52. "../../README.md"
  53. ],
  54. "output": [
  55. "README.md"
  56. ]
  57. },
  58. "build": {
  59. "dependencies": [
  60. "build:tsc",
  61. "build:types"
  62. ]
  63. },
  64. "generate:sources": {
  65. "command": "tsx tools/generate_sources.ts",
  66. "clean": "if-file-deleted",
  67. "files": [
  68. "../../versions.js",
  69. "src/{injected,templates}/**",
  70. "tools/generate_sources.ts"
  71. ],
  72. "output": [
  73. "src/generated/*.ts"
  74. ]
  75. },
  76. "generate:package-json": {
  77. "command": "tsx ../../tools/generate_module_package_json.ts lib/esm/package.json",
  78. "files": [
  79. "../../tools/generate_module_package_json.ts"
  80. ],
  81. "output": [
  82. "lib/esm/package.json"
  83. ]
  84. },
  85. "build:docs": {
  86. "command": "api-extractor run --local --config \"./api-extractor.docs.json\"",
  87. "files": [
  88. "api-extractor.docs.json",
  89. "lib/esm/puppeteer/puppeteer-core.d.ts",
  90. "tsconfig.json"
  91. ],
  92. "dependencies": [
  93. "build:tsc"
  94. ]
  95. },
  96. "build:tsc": {
  97. "command": "tsc -b && rollup --config rollup.third_party.config.mjs",
  98. "clean": "if-file-deleted",
  99. "dependencies": [
  100. "generate:package-json",
  101. "generate:sources",
  102. "../browsers:build"
  103. ],
  104. "files": [
  105. "{compat,src,third_party}/**",
  106. "rollup.third_party.config.mjs"
  107. ],
  108. "output": [
  109. "lib/{cjs,esm}/**",
  110. "!lib/esm/package.json"
  111. ]
  112. },
  113. "build:types": {
  114. "command": "api-extractor run --local && eslint --cache-location .eslintcache --cache --ext=ts --no-ignore --no-eslintrc -c=../../.eslintrc.types.cjs --fix lib/types.d.ts",
  115. "files": [
  116. "../../.eslintrc.types.cjs",
  117. "api-extractor.json",
  118. "lib/esm/puppeteer/types.d.ts",
  119. "tsconfig.json"
  120. ],
  121. "output": [
  122. "lib/types.d.ts"
  123. ],
  124. "dependencies": [
  125. "build:tsc"
  126. ]
  127. },
  128. "unit": {
  129. "command": "node --test --test-reporter spec lib/cjs",
  130. "dependencies": [
  131. "build"
  132. ]
  133. }
  134. },
  135. "files": [
  136. "lib",
  137. "src",
  138. "!*.test.js",
  139. "!*.test.d.ts",
  140. "!*.test.js.map",
  141. "!*.test.d.ts.map",
  142. "!*.tsbuildinfo"
  143. ],
  144. "author": "The Chromium Authors",
  145. "license": "Apache-2.0",
  146. "dependencies": {
  147. "chromium-bidi": "0.4.16",
  148. "cross-fetch": "4.0.0",
  149. "debug": "4.3.4",
  150. "devtools-protocol": "0.0.1147663",
  151. "ws": "8.13.0",
  152. "@puppeteer/browsers": "1.4.6"
  153. },
  154. "peerDependencies": {
  155. "typescript": ">= 4.7.4"
  156. },
  157. "peerDependenciesMeta": {
  158. "typescript": {
  159. "optional": true
  160. }
  161. },
  162. "devDependencies": {
  163. "mitt": "3.0.0",
  164. "parsel-js": "1.1.0"
  165. }
  166. }