@open-wa/wa-automate 4.27.0 → 4.27.1

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.
@@ -3,6 +3,7 @@ import { Merge, JsonObject } from 'type-fest';
3
3
  import { ConfigObject } from '../api/model/config';
4
4
  import { Spin } from '../controllers/events';
5
5
  export declare const optionKeys: string[];
6
+ export declare const optionKeysWithDefalts: string[];
6
7
  export declare const PrimitiveConverter: {
7
8
  Number: number;
8
9
  Boolean: boolean;
package/dist/cli/setup.js CHANGED
@@ -31,7 +31,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
31
31
  return (mod && mod.__esModule) ? mod : { "default": mod };
32
32
  };
33
33
  Object.defineProperty(exports, "__esModule", { value: true });
34
- exports.cli = exports.configFile = exports.envArgs = exports.helptext = exports.meowFlags = exports.cliOptionNames = exports.PrimitiveConverter = exports.optionKeys = void 0;
34
+ exports.cli = exports.configFile = exports.envArgs = exports.helptext = exports.meowFlags = exports.cliOptionNames = exports.PrimitiveConverter = exports.optionKeysWithDefalts = exports.optionKeys = void 0;
35
35
  const tools_1 = require("./../utils/tools");
36
36
  const command_line_usage_1 = __importDefault(require("command-line-usage"));
37
37
  const meow_1 = __importDefault(require("meow"));
@@ -272,6 +272,7 @@ const optionList = [{
272
272
  }
273
273
  ];
274
274
  exports.optionKeys = optionList.map(({ name }) => tools_1.camelize(name));
275
+ exports.optionKeysWithDefalts = optionList.filter(o => o.hasOwnProperty('default')).map(({ name }) => tools_1.camelize(name));
275
276
  exports.PrimitiveConverter = {
276
277
  Number: 1,
277
278
  Boolean: true,
@@ -380,7 +381,9 @@ const cli = () => {
380
381
  * 2. Config file
381
382
  * 3. CLI flags
382
383
  */
383
- const cliConfig = Object.assign(Object.assign(Object.assign({ sessionId: "session" }, exports.envArgs()), (exports.configFile(_cli.flags.config) || {})), _cli.flags);
384
+ const nonCliConfigs = Object.assign(Object.assign({}, exports.envArgs()), (exports.configFile(_cli.flags.config) || {}));
385
+ optionList.filter(option => option.default);
386
+ const cliConfig = Object.assign(Object.assign(Object.assign({ sessionId: "session" }, nonCliConfigs), _cli.flags), exports.optionKeysWithDefalts.reduce((p, c) => nonCliConfigs.hasOwnProperty(c) ? Object.assign(Object.assign({}, p), { [c]: nonCliConfigs[c] }) : p, {}));
384
387
  const PORT = Number(cliConfig.port || process.env.PORT || 8080);
385
388
  const spinner = new events_1.Spin(cliConfig.sessionId, 'STARTUP', cliConfig === null || cliConfig === void 0 ? void 0 : cliConfig.disableSpins);
386
389
  const createConfig = Object.assign({}, cliConfig);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate",
3
- "version": "4.27.0",
3
+ "version": "4.27.1",
4
4
  "licenseCheckUrl": "https://openwa.dev/license-check",
5
5
  "brokenMethodReportUrl": "https://openwa.dev/report-bm",
6
6
  "patches": "https://cdn.openwa.dev/patches.json",
@@ -28,7 +28,7 @@
28
28
  "docwatch": "onchange 'src/**/*.ts' 'docs-source/**/*.md' -- typedoc",
29
29
  "build:config-for-bin": "cd build && ts-node build-config-json-for-bin.ts && cd ..",
30
30
  "postinstall": "patch-package",
31
- "install": "cross-env npm_config_yes=true npx ignore-check@latest -p '**.data.json' -p '**.node-persist**' --comment 'managed by open-wa'"
31
+ "install": "cross-env npm_config_yes=true npx ignore-check@latest -p '**.data.json' -p '**.node-persist**' -p '**_IGNORE_**' --comment 'managed by open-wa'"
32
32
  },
33
33
  "husky": {
34
34
  "hooks": {
@@ -138,11 +138,11 @@
138
138
  "pico-s3": "^1.0.1",
139
139
  "pino": "^6.11.1",
140
140
  "postman-2-swagger": "^0.5.0",
141
- "puppeteer": "10.4.0",
142
- "puppeteer-extra": "^3.1.9",
143
- "puppeteer-extra-plugin-block-resources": "^2.2.7",
141
+ "puppeteer": "^13.0.0",
142
+ "puppeteer-extra": "^3.2.3",
143
+ "puppeteer-extra-plugin-block-resources": "^2.3.0",
144
144
  "puppeteer-extra-plugin-devtools": "^2.3.3",
145
- "puppeteer-extra-plugin-stealth": "^2.4.9",
145
+ "puppeteer-extra-plugin-stealth": "^2.9.0",
146
146
  "puppeteer-page-proxy": "^1.2.8",
147
147
  "qrcode-terminal": "^0.12.0",
148
148
  "qs": "^6.10.1",