BREAKING CHANGE(OpenData): Require explicit directory paths for OpenData (nogit/download/germanBusinessData); remove automatic .nogit creation; update HandelsRegister, JsonlDataProcessor, tests and README.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import type { BusinessRecord } from './classes.businessrecord.js';
|
||||
import type { OpenData } from './classes.main.opendata.js';
|
||||
import * as plugins from './plugins.js';
|
||||
import * as paths from './paths.js';
|
||||
|
||||
/**
|
||||
* the HandlesRegister exposed as a class
|
||||
@@ -9,13 +8,16 @@ import * as paths from './paths.js';
|
||||
export class HandelsRegister {
|
||||
private openDataRef: OpenData;
|
||||
private asyncExecutionStack = new plugins.lik.AsyncExecutionStack();
|
||||
private uniqueDowloadFolder = plugins.path.join(paths.downloadDir, plugins.smartunique.uniSimple());
|
||||
private downloadDir: string;
|
||||
private uniqueDowloadFolder: string;
|
||||
|
||||
// Puppeteer wrapper instance
|
||||
public smartbrowserInstance = new plugins.smartbrowser.SmartBrowser();
|
||||
|
||||
constructor(openDataRef: OpenData) {
|
||||
constructor(openDataRef: OpenData, downloadDirArg: string) {
|
||||
this.openDataRef = openDataRef;
|
||||
this.downloadDir = downloadDirArg;
|
||||
this.uniqueDowloadFolder = plugins.path.join(this.downloadDir, plugins.smartunique.uniSimple());
|
||||
}
|
||||
|
||||
public async start() {
|
||||
@@ -76,7 +78,7 @@ export class HandelsRegister {
|
||||
timeout: 30000,
|
||||
})
|
||||
.catch(async (err) => {
|
||||
await pageArg.screenshot({ path: paths.downloadDir + '/error.png' });
|
||||
await pageArg.screenshot({ path: this.downloadDir + '/error.png' });
|
||||
throw err;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user