miqro 1.7.16 → 1.7.17

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.
@@ -6,19 +6,9 @@ const fs_1 = require("fs");
6
6
  const path_1 = require("path");
7
7
  exports.usage = `usage: [NODE_ENV=development] npx miqro new:test <identifier ex: TEST_SOMEFILE>`;
8
8
  const testTemplates = {
9
- js: (category) => `const options = {
10
- category: "${category}",
11
- before: async () => {
9
+ js: (category) => `it("happy path", async () => {
12
10
 
13
- },
14
- after: async () => {
15
-
16
- }
17
- };
18
-
19
- it("happy path", async () => {
20
-
21
- }, options)
11
+ })
22
12
  `
23
13
  };
24
14
  const main = () => {
@@ -1,2 +1,2 @@
1
- export declare const usage = "npx miqro generate:template:cache <src> <out.js>";
1
+ export declare const usage = "npx miqro generate:template:cache <src> <out.json>";
2
2
  export declare const main: () => Promise<void>;
@@ -20,7 +20,7 @@ function recursiveSearch(path, found = []) {
20
20
  }
21
21
  return found;
22
22
  }
23
- exports.usage = "npx miqro generate:template:cache <src> <out.js>";
23
+ exports.usage = "npx miqro generate:template:cache <src> <out.json>";
24
24
  const main = async () => {
25
25
  if (process.argv.length !== 5 || process.argv[3].length < 1 || process.argv[4].length < 1) {
26
26
  throw new Error(exports.usage);
@@ -39,15 +39,9 @@ const main = async () => {
39
39
  for (const template of foundTemplates) {
40
40
  if (template) {
41
41
  const url = (0, path_1.relative)(path, template);
42
- const content = (0, fs_1.readFileSync)(template).toString("utf-8");
43
- cache[url] = {
44
- location: {
45
- url
46
- },
47
- content
48
- };
42
+ cache[url] = (0, fs_1.readFileSync)(template).toString("utf-8");
49
43
  }
50
44
  }
51
- (0, fs_1.writeFileSync)(outFilePath, `module.exports = ${JSON.stringify(cache, undefined, 0)};`);
45
+ (0, fs_1.writeFileSync)(outFilePath, `${JSON.stringify(cache, undefined, 0)}`);
52
46
  };
53
47
  exports.main = main;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "miqro",
3
- "version": "1.7.16",
3
+ "version": "1.7.17",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -17,13 +17,13 @@
17
17
  "author": "claukers",
18
18
  "license": "ISC",
19
19
  "dependencies": {
20
- "@miqro/core": "^1.5.13",
21
- "@miqro/parser": "^0.0.7",
22
- "@miqro/runner": "^1.2.6",
20
+ "@miqro/core": "^1.5.14",
21
+ "@miqro/parser": "^0.1.1",
22
+ "@miqro/runner": "^1.2.7",
23
23
  "deep-diff": "1.0.2"
24
24
  },
25
25
  "devDependencies": {
26
- "@miqro/test": "0.0.12",
26
+ "@miqro/test": "0.1.0",
27
27
  "@types/cookie": "0.4.1",
28
28
  "@types/deep-diff": "1.0.1",
29
29
  "@types/node": "17.0.23",