gg-express 1.0.74 → 1.0.75
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/GGExpress.js +2 -0
- package/dist/helperFunction.d.ts +1 -0
- package/dist/helperFunction.js +6 -0
- package/package.json +1 -1
- package/src/GGExpress.ts +2 -0
- package/src/helperFunction.ts +3 -0
package/dist/GGExpress.js
CHANGED
|
@@ -15,6 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
const chalk_1 = __importDefault(require("chalk"));
|
|
16
16
|
const fs_1 = __importDefault(require("fs"));
|
|
17
17
|
const path_1 = __importDefault(require("path"));
|
|
18
|
+
const helperFunction_1 = require("./helperFunction");
|
|
18
19
|
const myExpressRouteList = [];
|
|
19
20
|
class GGExpress {
|
|
20
21
|
constructor(app, appName, outputPath) {
|
|
@@ -157,6 +158,7 @@ class GGExpress {
|
|
|
157
158
|
else {
|
|
158
159
|
tempURL = [row.url];
|
|
159
160
|
}
|
|
161
|
+
tempURL = (0, helperFunction_1.removeDuplicates)(tempURL);
|
|
160
162
|
return tempURL
|
|
161
163
|
.map((url) => {
|
|
162
164
|
return ` "${url}" : {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function removeDuplicates(arr: string[]): string[];
|
package/package.json
CHANGED
package/src/GGExpress.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { NextFunction, Request, Response } from "express"
|
|
|
3
3
|
import Express from "express-serve-static-core"
|
|
4
4
|
import fs from "fs"
|
|
5
5
|
import path from "path"
|
|
6
|
+
import { removeDuplicates } from "./helperFunction"
|
|
6
7
|
|
|
7
8
|
type Unarray<T> = T extends (infer U)[] ? U : T
|
|
8
9
|
type AsConstArray<T extends readonly any[]> = [...T]
|
|
@@ -395,6 +396,7 @@ export default class GGExpress<appName extends string> {
|
|
|
395
396
|
} else {
|
|
396
397
|
tempURL = [row.url]
|
|
397
398
|
}
|
|
399
|
+
tempURL = removeDuplicates(tempURL)
|
|
398
400
|
return tempURL
|
|
399
401
|
.map((url) => {
|
|
400
402
|
return ` "${url}" : {
|