@nestia/migrate 0.1.5 → 0.1.7

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.
@@ -19,7 +19,7 @@ export namespace StringUtil {
19
19
  .map((str) => normalize(str.trim()))
20
20
  .filter((str) => !!str.length);
21
21
 
22
- export const reJoinWithoutParameters = (path: string) =>
22
+ export const reJoinWithDecimalParameters = (path: string) =>
23
23
  split(path)
24
24
  .map((str) =>
25
25
  str[0] === "{" && str[str.length - 1] === "}"
@@ -1 +0,0 @@
1
- export {};
package/lib/test/index.js DELETED
@@ -1,33 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const fs_1 = __importDefault(require("fs"));
7
- const module_1 = require("../module");
8
- const SetupWizard_1 = require("../utils/SetupWizard");
9
- const INPUT = __dirname + "/../../assets/input";
10
- const OUTPUT = __dirname + "/../../assets/output";
11
- const main = () => {
12
- if (fs_1.default.existsSync(OUTPUT))
13
- fs_1.default.rmSync(OUTPUT, { recursive: true });
14
- fs_1.default.mkdirSync(OUTPUT);
15
- const directory = fs_1.default.readdirSync(INPUT);
16
- for (const file of directory) {
17
- const location = `${INPUT}/${file}`;
18
- if (!location.endsWith(".json"))
19
- continue;
20
- const swagger = JSON.parse(fs_1.default.readFileSync(location, "utf8"));
21
- const app = new module_1.NestiaMigrateApplication(swagger);
22
- app.analyze();
23
- const project = `${OUTPUT}/${file.replace(".json", "")}`;
24
- fs_1.default.mkdirSync(project);
25
- app.generate({
26
- mkdir: fs_1.default.mkdirSync,
27
- writeFile: (path, content) => fs_1.default.promises.writeFile(path, content, "utf8"),
28
- })(project);
29
- SetupWizard_1.SetupWizard.setup(project);
30
- }
31
- };
32
- main();
33
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../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Z,yBAAW,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;KAC9B;AACL,CAAC,CAAC;AACF,IAAI,EAAE,CAAC"}
package/src/test/index.ts DELETED
@@ -1,32 +0,0 @@
1
- import fs from "fs";
2
-
3
- import { ISwagger, NestiaMigrateApplication } from "../module";
4
- import { SetupWizard } from "../utils/SetupWizard";
5
-
6
- const INPUT = __dirname + "/../../assets/input";
7
- const OUTPUT = __dirname + "/../../assets/output";
8
-
9
- const main = () => {
10
- if (fs.existsSync(OUTPUT)) fs.rmSync(OUTPUT, { recursive: true });
11
- fs.mkdirSync(OUTPUT);
12
-
13
- const directory: string[] = fs.readdirSync(INPUT);
14
- for (const file of directory) {
15
- const location: string = `${INPUT}/${file}`;
16
- if (!location.endsWith(".json")) continue;
17
-
18
- const swagger: ISwagger = JSON.parse(fs.readFileSync(location, "utf8"));
19
- const app = new NestiaMigrateApplication(swagger);
20
- app.analyze();
21
-
22
- const project: string = `${OUTPUT}/${file.replace(".json", "")}`;
23
- fs.mkdirSync(project);
24
- app.generate({
25
- mkdir: fs.mkdirSync,
26
- writeFile: (path, content) =>
27
- fs.promises.writeFile(path, content, "utf8"),
28
- })(project);
29
- SetupWizard.setup(project);
30
- }
31
- };
32
- main();