nestia 4.0.7 → 4.0.8
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/README.md
CHANGED
|
@@ -17,6 +17,16 @@ Nestia is a set of helper libraries for NestJS, supporting below features:
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
+
## Sponsors and Backers
|
|
21
|
+
Thanks for your support.
|
|
22
|
+
|
|
23
|
+
Your donation would encourage `nestia` development.
|
|
24
|
+
|
|
25
|
+
[](https://opencollective.com/nestia)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
20
30
|
## Setup
|
|
21
31
|
### Boilerplate Project
|
|
22
32
|
```bash
|
|
@@ -260,4 +270,4 @@ ReactDOM.render(
|
|
|
260
270
|
<App />,
|
|
261
271
|
document.body
|
|
262
272
|
);
|
|
263
|
-
```
|
|
273
|
+
```
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare namespace FileRetriever {
|
|
2
|
-
const directory: (name: string) => (
|
|
2
|
+
const directory: (name: string) => (dir: string, depth?: number) => string | null;
|
|
3
3
|
const file: (name: string) => (directory: string, depth?: number) => string | null;
|
|
4
4
|
const require: (name: string) => (directory: string, depth?: number) => Promise<any>;
|
|
5
5
|
}
|
|
@@ -40,13 +40,13 @@ const fs_1 = __importDefault(require("fs"));
|
|
|
40
40
|
const path_1 = __importDefault(require("path"));
|
|
41
41
|
var FileRetriever;
|
|
42
42
|
(function (FileRetriever) {
|
|
43
|
-
FileRetriever.directory = (name) => (
|
|
44
|
-
const location = path_1.default.join(
|
|
43
|
+
FileRetriever.directory = (name) => (dir, depth = 0) => {
|
|
44
|
+
const location = path_1.default.join(dir, name);
|
|
45
45
|
if (fs_1.default.existsSync(location))
|
|
46
|
-
return
|
|
46
|
+
return dir;
|
|
47
47
|
else if (depth > 2)
|
|
48
48
|
return null;
|
|
49
|
-
return FileRetriever.
|
|
49
|
+
return FileRetriever.directory(name)(path_1.default.join(dir, ".."), depth + 1);
|
|
50
50
|
};
|
|
51
51
|
FileRetriever.file = (name) => (directory, depth = 0) => {
|
|
52
52
|
const location = path_1.default.join(directory, name);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileRetriever.js","sourceRoot":"","sources":["../../src/internal/FileRetriever.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAoB;AACpB,gDAAwB;AAExB,IAAiB,aAAa,CA6B7B;AA7BD,WAAiB,aAAa;IACb,uBAAS,GAClB,CAAC,IAAY,EAAE,EAAE,CACjB,CAAC,
|
|
1
|
+
{"version":3,"file":"FileRetriever.js","sourceRoot":"","sources":["../../src/internal/FileRetriever.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAoB;AACpB,gDAAwB;AAExB,IAAiB,aAAa,CA6B7B;AA7BD,WAAiB,aAAa;IACb,uBAAS,GAClB,CAAC,IAAY,EAAE,EAAE,CACjB,CAAC,GAAW,EAAE,QAAgB,CAAC,EAAiB,EAAE;QAC9C,MAAM,QAAQ,GAAW,cAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAC9C,IAAI,YAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;YAAE,OAAO,GAAG,CAAC;aACnC,IAAI,KAAK,GAAG,CAAC;YAAE,OAAO,IAAI,CAAC;QAChC,OAAO,cAAA,SAAS,CAAC,IAAI,CAAC,CAAC,cAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;IAC5D,CAAC,CAAC;IAEO,kBAAI,GACb,CAAC,IAAY,EAAE,EAAE,CACjB,CAAC,SAAiB,EAAE,QAAgB,CAAC,EAAiB,EAAE;QACpD,MAAM,QAAQ,GAAW,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;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