doc2vec 1.0.4 → 1.0.5

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/Dockerfile CHANGED
@@ -4,6 +4,7 @@ WORKDIR /app
4
4
 
5
5
  # Install Python and build tools
6
6
  RUN apt-get update && apt-get install -y \
7
+ git \
7
8
  python3 \
8
9
  make \
9
10
  g++ \
package/dist/doc2vec.js CHANGED
@@ -1245,10 +1245,11 @@ class Doc2Vec {
1245
1245
  async processPage(url, sourceConfig) {
1246
1246
  const logger = this.logger.child('page-processor');
1247
1247
  logger.debug(`Processing page content from ${url}`);
1248
- const browser = await puppeteer_1.default.launch({
1249
- args: ['--no-sandbox', '--disable-setuid-sandbox'],
1250
- });
1248
+ let browser = null;
1251
1249
  try {
1250
+ browser = await puppeteer_1.default.launch({
1251
+ args: ['--no-sandbox', '--disable-setuid-sandbox'],
1252
+ });
1252
1253
  const page = await browser.newPage();
1253
1254
  logger.debug(`Navigating to ${url}`);
1254
1255
  await page.goto(url, { waitUntil: 'networkidle2', timeout: 60000 });
package/doc2vec.ts CHANGED
@@ -1467,10 +1467,12 @@ class Doc2Vec {
1467
1467
  const logger = this.logger.child('page-processor');
1468
1468
  logger.debug(`Processing page content from ${url}`);
1469
1469
 
1470
- const browser: Browser = await puppeteer.launch({
1471
- args: ['--no-sandbox', '--disable-setuid-sandbox'],
1472
- });
1470
+ let browser: Browser | null = null;
1473
1471
  try {
1472
+ browser = await puppeteer.launch({
1473
+ args: ['--no-sandbox', '--disable-setuid-sandbox'],
1474
+ });
1475
+
1474
1476
  const page: Page = await browser.newPage();
1475
1477
  logger.debug(`Navigating to ${url}`);
1476
1478
  await page.goto(url, { waitUntil: 'networkidle2', timeout: 60000 });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doc2vec",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "type": "commonjs",
5
5
  "description": "",
6
6
  "main": "doc2vec.ts",