miqro 1.7.18 → 1.7.21

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/cli.js CHANGED
@@ -24,6 +24,7 @@ const db_createmodel_1 = require("./cmds/db-createmodel");
24
24
  const db_push_data_1 = require("./cmds/db-push-data");
25
25
  const db_dump_data_1 = require("./cmds/db-dump-data");
26
26
  const db_migrate_1 = require("./cmds/db-migrate");
27
+ console.log("asldkjdkla");
27
28
  // noinspection SpellCheckingInspection
28
29
  (0, utils_1.mainCMD)({
29
30
  ["new"]: { section: "quick start", cb: new_1.mainJS, tabs: 5, description: `create a new project. ${new_1.usageJS}` },
@@ -8,6 +8,7 @@ const tokenize_match_1 = require("@miqro/core/dist/common/tokenize-match");
8
8
  const fs_1 = require("fs");
9
9
  exports.usage = `usage: [NODE_ENV=development] npx miqro serve [directory=./] [path=/] [--index404 ./index.html] [--proxy-cert-ignore] [--port 8080] [--proxy /api=https://host/api]`;
10
10
  const main = () => {
11
+ console.log("asldkjdkla");
11
12
  const flags = (0, utils_1.extractFlags)(process.argv.slice(3), {
12
13
  flags: {
13
14
  "index404Status": {
@@ -46,6 +47,8 @@ const main = () => {
46
47
  }
47
48
  const app = new core_1.App();
48
49
  app.use((0, core_1.LoggerHandler)());
50
+ console.log("asldkjdkla");
51
+ console.dir(flags);
49
52
  const proxyList = flags.flags.proxy instanceof Array ? flags.flags.proxy : [flags.flags.proxy];
50
53
  for (const proxy of proxyList) {
51
54
  if (proxy) {
@@ -57,7 +60,7 @@ const main = () => {
57
60
  const proxyURL = new url_1.URL(proxySplit[1]);
58
61
  proxyURL.pathname = (0, tokenize_match_1.normalizePath)(proxyURL.pathname);
59
62
  const proxyRouter = (0, core_1.Proxy)({
60
- url: proxyURL.toString(), rejectUnauthorized: !flags.flags.hasOwnProperty("proxy-cert-ignore")
63
+ url: proxyURL.toString(), rejectUnauthorized: flags.flags["proxy-cert-ignore"] ? true : false
61
64
  });
62
65
  console.log("setting up proxy to %s on %s", proxyURL.toString(), proxyPath);
63
66
  proxyRouter.use((0, core_1.ReadBuffer)());
@@ -13,7 +13,7 @@ const routeCMDModule = async (cmdArg, cmds, logger, exit = true) => {
13
13
  throw new Error("no command");
14
14
  }
15
15
  else {
16
- if (!cmds[cmdArg]) {
16
+ if (!cmds.hasOwnProperty(cmdArg)) {
17
17
  throw new Error("command " + cmdArg + " not found!");
18
18
  }
19
19
  else {
@@ -32,7 +32,7 @@ const routeCMDModule = async (cmdArg, cmds, logger, exit = true) => {
32
32
  }
33
33
  };
34
34
  const extractFlags = (args, options) => {
35
- const flags = {};
35
+ const flags = Object.create(null);
36
36
  const files = [];
37
37
  for (let i = 0; i < args.length; i++) {
38
38
  const arg = args[i];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "miqro",
3
- "version": "1.7.18",
3
+ "version": "1.7.21",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -17,17 +17,17 @@
17
17
  "author": "claukers",
18
18
  "license": "ISC",
19
19
  "dependencies": {
20
- "@miqro/core": "^1.5.15",
21
- "@miqro/parser": "^0.1.2",
22
- "@miqro/runner": "^1.2.7",
23
- "@miqro/test": "^0.1.1",
20
+ "@miqro/core": "^1.5.19",
21
+ "@miqro/parser": "^0.1.3",
22
+ "@miqro/runner": "^1.2.8",
23
+ "@miqro/test": "^0.2.1",
24
24
  "deep-diff": "1.0.2"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/cookie": "0.4.1",
28
28
  "@types/deep-diff": "1.0.1",
29
29
  "@types/node": "17.0.23",
30
- "typescript": "4.6.3"
30
+ "typescript": "4.6.4"
31
31
  },
32
32
  "engines": {
33
33
  "node": ">=14.0.0",