package.json 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. {
  2. "name": "puppeteer",
  3. "version": "19.0.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.js",
  13. "types": "./lib/types.d.ts",
  14. "exports": {
  15. ".": {
  16. "types": "./lib/types.d.ts",
  17. "import": "./lib/esm/puppeteer/puppeteer.js",
  18. "require": "./lib/cjs/puppeteer/puppeteer.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"
  32. },
  33. "engines": {
  34. "node": ">=14.1.0"
  35. },
  36. "scripts": {
  37. "build:tsc": "wireit",
  38. "build:types": "wireit",
  39. "build": "wireit",
  40. "clean": "tsc -b --clean && rimraf lib",
  41. "format:types": "wireit",
  42. "generate:package-json": "wireit",
  43. "generate:sources": "wireit",
  44. "postinstall": "node install.js",
  45. "prepack": "wireit"
  46. },
  47. "wireit": {
  48. "prepack": {
  49. "command": "cp ../../README.md README.md",
  50. "files": [
  51. "../../README.md"
  52. ],
  53. "output": [
  54. "README.md"
  55. ]
  56. },
  57. "build": {
  58. "dependencies": [
  59. "format:types",
  60. "generate:package-json"
  61. ]
  62. },
  63. "generate:sources": {
  64. "command": "tsx tools/generate_sources.ts",
  65. "dependencies": [
  66. "../puppeteer-core:build"
  67. ],
  68. "files": [
  69. "tools/generate_sources.ts"
  70. ],
  71. "output": [
  72. "src/types.ts"
  73. ]
  74. },
  75. "generate:package-json": {
  76. "command": "echo '{\"type\": \"module\"}' > lib/esm/package.json",
  77. "clean": "if-file-deleted",
  78. "dependencies": [
  79. "build:tsc"
  80. ],
  81. "output": [
  82. "lib/esm/package.json"
  83. ]
  84. },
  85. "build:types": {
  86. "command": "api-extractor run --local",
  87. "dependencies": [
  88. "build:tsc"
  89. ],
  90. "files": [
  91. "tsconfig.json",
  92. "api-extractor.json",
  93. "lib/esm/puppeteer/types.d.ts"
  94. ],
  95. "output": [
  96. "lib/types.d.ts"
  97. ]
  98. },
  99. "format:types": {
  100. "command": "eslint --cache-location .eslintcache --cache --ext=ts --no-ignore --no-eslintrc -c=../../.eslintrc.types.cjs --fix lib/types.d.ts",
  101. "dependencies": [
  102. "build:types"
  103. ],
  104. "clean": false,
  105. "files": [
  106. "lib/types.d.ts",
  107. "../../.eslintrc.types.cjs"
  108. ],
  109. "output": [
  110. "lib/types.d.ts"
  111. ]
  112. },
  113. "build:tsc": {
  114. "command": "tsc -b",
  115. "clean": "if-file-deleted",
  116. "dependencies": [
  117. "../puppeteer-core:build",
  118. "generate:sources"
  119. ],
  120. "files": [
  121. "src/**",
  122. "compat/**",
  123. "**/tsconfig.*.json"
  124. ],
  125. "output": [
  126. "lib/**"
  127. ]
  128. }
  129. },
  130. "files": [
  131. "lib",
  132. "install.js",
  133. "!*.tsbuildinfo"
  134. ],
  135. "author": "The Chromium Authors",
  136. "license": "Apache-2.0",
  137. "dependencies": {
  138. "https-proxy-agent": "5.0.1",
  139. "progress": "2.0.3",
  140. "proxy-from-env": "1.1.0",
  141. "puppeteer-core": "19.0.0"
  142. }
  143. }