@rafikidota/cuba-ofertas-scraping 0.21.2 → 0.22.0
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/dist/common/env/scraper.env.config.d.ts +5 -0
- package/dist/common/env/scraper.env.config.js +45 -0
- package/dist/common/env/scraper.env.config.js.map +1 -0
- package/dist/common/env/scraper.env.validation.d.ts +2 -0
- package/dist/common/env/scraper.env.validation.js +43 -0
- package/dist/common/env/scraper.env.validation.js.map +1 -0
- package/dist/common/index.d.ts +2 -0
- package/dist/common/index.js +2 -0
- package/dist/common/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.ScraperEnvConfig = void 0;
|
|
37
|
+
const dotenv = __importStar(require("dotenv"));
|
|
38
|
+
dotenv.config();
|
|
39
|
+
const ScraperEnvConfig = () => ({
|
|
40
|
+
SCRAPE_ON_APP_BOOTSTRAP: JSON.parse(process.env.SCRAPE_ON_APP_BOOTSTRAP),
|
|
41
|
+
PLAYWRIGHT_BROWSERS_PATH: process.env.PLAYWRIGHT_BROWSERS_PATH,
|
|
42
|
+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: Number(process.env.PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD),
|
|
43
|
+
});
|
|
44
|
+
exports.ScraperEnvConfig = ScraperEnvConfig;
|
|
45
|
+
//# sourceMappingURL=scraper.env.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scraper.env.config.js","sourceRoot":"","sources":["../../../src/common/env/scraper.env.config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AACjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAET,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAAC,CAAC;IACrC,uBAAuB,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC;IACxE,wBAAwB,EAAE,OAAO,CAAC,GAAG,CAAC,wBAAwB;IAC9D,gCAAgC,EAAE,MAAM,CACtC,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAC7C;CACF,CAAC,CAAC;AANU,QAAA,gBAAgB,oBAM1B"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.ScraperConfigValidationSchema = void 0;
|
|
37
|
+
const joi = __importStar(require("joi"));
|
|
38
|
+
exports.ScraperConfigValidationSchema = joi.object({
|
|
39
|
+
SCRAPE_ON_APP_BOOTSTRAP: joi.boolean().default(false),
|
|
40
|
+
PLAYWRIGHT_BROWSERS_PATH: joi.string().optional(),
|
|
41
|
+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: joi.number().default(0),
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=scraper.env.validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scraper.env.validation.js","sourceRoot":"","sources":["../../../src/common/env/scraper.env.validation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAEd,QAAA,6BAA6B,GAAG,GAAG,CAAC,MAAM,CAAC;IACtD,uBAAuB,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IACrD,wBAAwB,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjD,gCAAgC,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;CAC1D,CAAC,CAAC"}
|
package/dist/common/index.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ export * from './enum/request.enum';
|
|
|
14
14
|
export * from './enum/scraping-label.enum';
|
|
15
15
|
export * from './enum/scraping-result-status.enum';
|
|
16
16
|
export * from './enum/scraping-type.enum';
|
|
17
|
+
export * from './env/scraper.env.config';
|
|
18
|
+
export * from './env/scraper.env.validation';
|
|
17
19
|
export * from './interface/category.interface';
|
|
18
20
|
export * from './interface/cookie.interface';
|
|
19
21
|
export * from './interface/municipality.interface';
|
package/dist/common/index.js
CHANGED
|
@@ -30,6 +30,8 @@ __exportStar(require("./enum/request.enum"), exports);
|
|
|
30
30
|
__exportStar(require("./enum/scraping-label.enum"), exports);
|
|
31
31
|
__exportStar(require("./enum/scraping-result-status.enum"), exports);
|
|
32
32
|
__exportStar(require("./enum/scraping-type.enum"), exports);
|
|
33
|
+
__exportStar(require("./env/scraper.env.config"), exports);
|
|
34
|
+
__exportStar(require("./env/scraper.env.validation"), exports);
|
|
33
35
|
__exportStar(require("./interface/category.interface"), exports);
|
|
34
36
|
__exportStar(require("./interface/cookie.interface"), exports);
|
|
35
37
|
__exportStar(require("./interface/municipality.interface"), exports);
|
package/dist/common/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,iDAA+B;AAC/B,uDAAqC;AACrC,kDAAgC;AAChC,mDAAiC;AACjC,mDAAiC;AACjC,0DAAwC;AAExC,4DAA0C;AAC1C,oDAAkC;AAClC,sDAAoC;AACpC,kDAAgC;AAEhC,oDAAkC;AAClC,sDAAoC;AACpC,6DAA2C;AAC3C,qEAAmD;AACnD,4DAA0C;AAE1C,iEAA+C;AAC/C,+DAA6C;AAC7C,qEAAmD;AACnD,gEAA8C;AAC9C,iEAA+C;AAC/C,iEAA+C;AAC/C,wEAAsD;AACtD,wEAAsD;AAEtD,kDAAgC;AAEhC,kDAAgC;AAChC,sDAAoC;AACpC,mDAAiC;AACjC,mDAAiC;AACjC,iDAA+B;AAC/B,2DAAyC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,iDAA+B;AAC/B,uDAAqC;AACrC,kDAAgC;AAChC,mDAAiC;AACjC,mDAAiC;AACjC,0DAAwC;AAExC,4DAA0C;AAC1C,oDAAkC;AAClC,sDAAoC;AACpC,kDAAgC;AAEhC,oDAAkC;AAClC,sDAAoC;AACpC,6DAA2C;AAC3C,qEAAmD;AACnD,4DAA0C;AAE1C,2DAAyC;AACzC,+DAA6C;AAE7C,iEAA+C;AAC/C,+DAA6C;AAC7C,qEAAmD;AACnD,gEAA8C;AAC9C,iEAA+C;AAC/C,iEAA+C;AAC/C,wEAAsD;AACtD,wEAAsD;AAEtD,kDAAgC;AAEhC,kDAAgC;AAChC,sDAAoC;AACpC,mDAAiC;AACjC,mDAAiC;AACjC,iDAA+B;AAC/B,2DAAyC"}
|