nest-puppeteer
Version:
Puppeteer (Headless Chrome) provider for Nest.js
21 lines • 1.04 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.InjectPage = exports.InjectContext = exports.InjectBrowser = void 0;
const common_1 = require("@nestjs/common");
const puppeteer_util_1 = require("./puppeteer.util");
/**
* Inject the Browser object associated with a connection
* @param instanceName The unique name associated with the browser
*/
exports.InjectBrowser = (instanceName) => common_1.Inject(puppeteer_util_1.getBrowserToken(instanceName));
/**
* Inject the Puppeteer BrowserContext object associated with a browser
* @param instanceName The unique name associated with the browser
*/
exports.InjectContext = (instanceName) => common_1.Inject(puppeteer_util_1.getContextToken(instanceName));
/**
* Inject the Puppeteer Page object associated with BrowserContext
* @param instanceName The unique name associated with the instance
*/
exports.InjectPage = (instanceName) => common_1.Inject(puppeteer_util_1.getPageToken(instanceName));
//# sourceMappingURL=puppeteer.decorators.js.map