resting-squirrel-controller 2.5.0 → 2.6.1
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/LICENSE +21 -21
- package/README.md +224 -224
- package/dist/controller.d.ts +257 -255
- package/dist/controller.js +373 -373
- package/dist/controller.js.map +1 -1
- package/dist/decorators/controller-options.d.ts +17 -17
- package/dist/decorators/controller-options.js +15 -15
- package/dist/decorators/deprecated.d.ts +3 -3
- package/dist/decorators/deprecated.js +10 -10
- package/dist/decorators/methods.d.ts +6 -6
- package/dist/decorators/methods.js +107 -107
- package/dist/decorators/options.d.ts +25 -25
- package/dist/decorators/options.js +17 -17
- package/dist/decorators/resource.d.ts +3 -3
- package/dist/decorators/resource.js +7 -7
- package/dist/decorators/version.d.ts +3 -3
- package/dist/decorators/version.js +7 -7
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -4
- package/dist/utils.d.ts +194 -165
- package/dist/utils.js +31 -31
- package/package.json +66 -66
- package/index.js +0 -1
- package/tslint.json +0 -78
package/dist/utils.d.ts
CHANGED
|
@@ -1,165 +1,194 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}):
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}):
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
encoding?:
|
|
95
|
-
|
|
96
|
-
}):
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}): nfs.
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import * as nfs from 'fs';
|
|
4
|
+
export declare const fs: {
|
|
5
|
+
readdir(path: nfs.PathLike): Promise<Array<string>>;
|
|
6
|
+
stat(path: nfs.PathLike): Promise<nfs.Stats>;
|
|
7
|
+
rename: typeof nfs.rename;
|
|
8
|
+
renameSync(oldPath: nfs.PathLike, newPath: nfs.PathLike): void;
|
|
9
|
+
truncate: typeof nfs.truncate;
|
|
10
|
+
truncateSync(path: nfs.PathLike, len?: number): void;
|
|
11
|
+
ftruncate: typeof nfs.ftruncate;
|
|
12
|
+
ftruncateSync(fd: number, len?: number): void;
|
|
13
|
+
chown: typeof nfs.chown;
|
|
14
|
+
chownSync(path: nfs.PathLike, uid: number, gid: number): void;
|
|
15
|
+
fchown: typeof nfs.fchown;
|
|
16
|
+
fchownSync(fd: number, uid: number, gid: number): void;
|
|
17
|
+
lchown: typeof nfs.lchown;
|
|
18
|
+
lchownSync(path: nfs.PathLike, uid: number, gid: number): void;
|
|
19
|
+
lutimes: typeof nfs.lutimes;
|
|
20
|
+
lutimesSync(path: nfs.PathLike, atime: string | number | Date, mtime: string | number | Date): void;
|
|
21
|
+
chmod: typeof nfs.chmod;
|
|
22
|
+
chmodSync(path: nfs.PathLike, mode: string | number): void;
|
|
23
|
+
fchmod: typeof nfs.fchmod;
|
|
24
|
+
fchmodSync(fd: number, mode: string | number): void;
|
|
25
|
+
lchmod: typeof nfs.lchmod;
|
|
26
|
+
lchmodSync(path: nfs.PathLike, mode: string | number): void;
|
|
27
|
+
statSync(path: nfs.PathLike, options?: nfs.StatOptions & {
|
|
28
|
+
bigint?: false;
|
|
29
|
+
}): nfs.Stats;
|
|
30
|
+
statSync(path: nfs.PathLike, options: nfs.StatOptions & {
|
|
31
|
+
bigint: true;
|
|
32
|
+
}): nfs.BigIntStats;
|
|
33
|
+
statSync(path: nfs.PathLike, options?: nfs.StatOptions): nfs.Stats | nfs.BigIntStats;
|
|
34
|
+
fstatSync(fd: number, options?: nfs.StatOptions & {
|
|
35
|
+
bigint?: false;
|
|
36
|
+
}): nfs.Stats;
|
|
37
|
+
fstatSync(fd: number, options: nfs.StatOptions & {
|
|
38
|
+
bigint: true;
|
|
39
|
+
}): nfs.BigIntStats;
|
|
40
|
+
fstatSync(fd: number, options?: nfs.StatOptions): nfs.Stats | nfs.BigIntStats;
|
|
41
|
+
lstat: typeof nfs.lstat;
|
|
42
|
+
lstatSync(path: nfs.PathLike, options?: nfs.StatOptions & {
|
|
43
|
+
bigint?: false;
|
|
44
|
+
}): nfs.Stats;
|
|
45
|
+
lstatSync(path: nfs.PathLike, options: nfs.StatOptions & {
|
|
46
|
+
bigint: true;
|
|
47
|
+
}): nfs.BigIntStats;
|
|
48
|
+
lstatSync(path: nfs.PathLike, options?: nfs.StatOptions): nfs.Stats | nfs.BigIntStats;
|
|
49
|
+
link: typeof nfs.link;
|
|
50
|
+
linkSync(existingPath: nfs.PathLike, newPath: nfs.PathLike): void;
|
|
51
|
+
symlink: typeof nfs.symlink;
|
|
52
|
+
symlinkSync(target: nfs.PathLike, path: nfs.PathLike, type?: nfs.symlink.Type): void;
|
|
53
|
+
readlink: typeof nfs.readlink;
|
|
54
|
+
readlinkSync(path: nfs.PathLike, options?: BufferEncoding | {
|
|
55
|
+
encoding?: BufferEncoding;
|
|
56
|
+
}): string;
|
|
57
|
+
readlinkSync(path: nfs.PathLike, options: "buffer" | {
|
|
58
|
+
encoding: "buffer";
|
|
59
|
+
}): Buffer;
|
|
60
|
+
readlinkSync(path: nfs.PathLike, options?: string | {
|
|
61
|
+
encoding?: string;
|
|
62
|
+
}): string | Buffer;
|
|
63
|
+
realpath: typeof nfs.realpath;
|
|
64
|
+
realpathSync: typeof nfs.realpathSync;
|
|
65
|
+
unlink: typeof nfs.unlink;
|
|
66
|
+
unlinkSync(path: nfs.PathLike): void;
|
|
67
|
+
rmdir: typeof nfs.rmdir;
|
|
68
|
+
rmdirSync(path: nfs.PathLike, options?: nfs.RmDirOptions): void;
|
|
69
|
+
mkdir: typeof nfs.mkdir;
|
|
70
|
+
mkdirSync(path: nfs.PathLike, options?: string | number | nfs.MakeDirectoryOptions): void;
|
|
71
|
+
mkdtemp: typeof nfs.mkdtemp;
|
|
72
|
+
mkdtempSync(prefix: string, options?: BufferEncoding | {
|
|
73
|
+
encoding?: BufferEncoding;
|
|
74
|
+
}): string;
|
|
75
|
+
mkdtempSync(prefix: string, options: "buffer" | {
|
|
76
|
+
encoding: "buffer";
|
|
77
|
+
}): Buffer;
|
|
78
|
+
mkdtempSync(prefix: string, options?: string | {
|
|
79
|
+
encoding?: string;
|
|
80
|
+
}): string | Buffer;
|
|
81
|
+
readdirSync(path: nfs.PathLike, options?: BufferEncoding | {
|
|
82
|
+
encoding: BufferEncoding;
|
|
83
|
+
withFileTypes?: false;
|
|
84
|
+
}): string[];
|
|
85
|
+
readdirSync(path: nfs.PathLike, options: "buffer" | {
|
|
86
|
+
encoding: "buffer";
|
|
87
|
+
withFileTypes?: false;
|
|
88
|
+
}): Buffer[];
|
|
89
|
+
readdirSync(path: nfs.PathLike, options?: string | {
|
|
90
|
+
encoding?: string;
|
|
91
|
+
withFileTypes?: false;
|
|
92
|
+
}): string[] | Buffer[];
|
|
93
|
+
readdirSync(path: nfs.PathLike, options: {
|
|
94
|
+
encoding?: string;
|
|
95
|
+
withFileTypes: true;
|
|
96
|
+
}): nfs.Dirent[];
|
|
97
|
+
close: typeof nfs.close;
|
|
98
|
+
closeSync(fd: number): void;
|
|
99
|
+
open: typeof nfs.open;
|
|
100
|
+
openSync(path: nfs.PathLike, flags: string | number, mode?: string | number): number;
|
|
101
|
+
utimes: typeof nfs.utimes;
|
|
102
|
+
utimesSync(path: nfs.PathLike, atime: string | number | Date, mtime: string | number | Date): void;
|
|
103
|
+
futimes: typeof nfs.futimes;
|
|
104
|
+
futimesSync(fd: number, atime: string | number | Date, mtime: string | number | Date): void;
|
|
105
|
+
fsync: typeof nfs.fsync;
|
|
106
|
+
fsyncSync(fd: number): void;
|
|
107
|
+
write: typeof nfs.write;
|
|
108
|
+
writeSync(fd: number, buffer: NodeJS.ArrayBufferView, offset?: number, length?: number, position?: number): number;
|
|
109
|
+
writeSync(fd: number, string: any, position?: number, encoding?: string): number;
|
|
110
|
+
read: typeof nfs.read;
|
|
111
|
+
readSync(fd: number, buffer: NodeJS.ArrayBufferView, offset: number, length: number, position: number): number;
|
|
112
|
+
readFile: typeof nfs.readFile;
|
|
113
|
+
readFileSync(path: number | nfs.PathLike, options?: {
|
|
114
|
+
encoding?: null;
|
|
115
|
+
flag?: string;
|
|
116
|
+
}): Buffer;
|
|
117
|
+
readFileSync(path: number | nfs.PathLike, options: string | {
|
|
118
|
+
encoding: string;
|
|
119
|
+
flag?: string;
|
|
120
|
+
}): string;
|
|
121
|
+
readFileSync(path: number | nfs.PathLike, options?: string | {
|
|
122
|
+
encoding?: string;
|
|
123
|
+
flag?: string;
|
|
124
|
+
}): string | Buffer;
|
|
125
|
+
writeFile: typeof nfs.writeFile;
|
|
126
|
+
writeFileSync(path: number | nfs.PathLike, data: any, options?: nfs.WriteFileOptions): void;
|
|
127
|
+
appendFile: typeof nfs.appendFile;
|
|
128
|
+
appendFileSync(file: number | nfs.PathLike, data: any, options?: nfs.WriteFileOptions): void;
|
|
129
|
+
watchFile(filename: nfs.PathLike, options: {
|
|
130
|
+
persistent?: boolean;
|
|
131
|
+
interval?: number;
|
|
132
|
+
}, listener: (curr: nfs.Stats, prev: nfs.Stats) => void): void;
|
|
133
|
+
watchFile(filename: nfs.PathLike, listener: (curr: nfs.Stats, prev: nfs.Stats) => void): void;
|
|
134
|
+
unwatchFile(filename: nfs.PathLike, listener?: (curr: nfs.Stats, prev: nfs.Stats) => void): void;
|
|
135
|
+
watch(filename: nfs.PathLike, options: BufferEncoding | {
|
|
136
|
+
encoding?: BufferEncoding;
|
|
137
|
+
persistent?: boolean;
|
|
138
|
+
recursive?: boolean;
|
|
139
|
+
}, listener?: (event: string, filename: string) => void): nfs.FSWatcher;
|
|
140
|
+
watch(filename: nfs.PathLike, options: "buffer" | {
|
|
141
|
+
encoding: "buffer";
|
|
142
|
+
persistent?: boolean;
|
|
143
|
+
recursive?: boolean;
|
|
144
|
+
}, listener?: (event: string, filename: Buffer) => void): nfs.FSWatcher;
|
|
145
|
+
watch(filename: nfs.PathLike, options: string | {
|
|
146
|
+
encoding?: string;
|
|
147
|
+
persistent?: boolean;
|
|
148
|
+
recursive?: boolean;
|
|
149
|
+
}, listener?: (event: string, filename: string | Buffer) => void): nfs.FSWatcher;
|
|
150
|
+
watch(filename: nfs.PathLike, listener?: (event: string, filename: string) => any): nfs.FSWatcher;
|
|
151
|
+
exists: typeof nfs.exists;
|
|
152
|
+
existsSync(path: nfs.PathLike): boolean;
|
|
153
|
+
access: typeof nfs.access;
|
|
154
|
+
accessSync(path: nfs.PathLike, mode?: number): void;
|
|
155
|
+
createReadStream(path: nfs.PathLike, options?: string | {
|
|
156
|
+
flags?: string;
|
|
157
|
+
encoding?: string;
|
|
158
|
+
fd?: number;
|
|
159
|
+
mode?: number;
|
|
160
|
+
autoClose?: boolean;
|
|
161
|
+
emitClose?: boolean;
|
|
162
|
+
start?: number;
|
|
163
|
+
end?: number;
|
|
164
|
+
highWaterMark?: number;
|
|
165
|
+
}): nfs.ReadStream;
|
|
166
|
+
createWriteStream(path: nfs.PathLike, options?: string | {
|
|
167
|
+
flags?: string;
|
|
168
|
+
encoding?: string;
|
|
169
|
+
fd?: number;
|
|
170
|
+
mode?: number;
|
|
171
|
+
autoClose?: boolean;
|
|
172
|
+
emitClose?: boolean;
|
|
173
|
+
start?: number;
|
|
174
|
+
highWaterMark?: number;
|
|
175
|
+
}): nfs.WriteStream;
|
|
176
|
+
fdatasync: typeof nfs.fdatasync;
|
|
177
|
+
fdatasyncSync(fd: number): void;
|
|
178
|
+
copyFile: typeof nfs.copyFile;
|
|
179
|
+
copyFileSync(src: nfs.PathLike, dest: nfs.PathLike, flags?: number): void;
|
|
180
|
+
writev: typeof nfs.writev;
|
|
181
|
+
writevSync(fd: number, buffers: readonly NodeJS.ArrayBufferView[], position?: number): number;
|
|
182
|
+
opendirSync(path: nfs.PathLike, options?: nfs.OpenDirOptions): nfs.Dir;
|
|
183
|
+
opendir: typeof nfs.opendir;
|
|
184
|
+
Stats: typeof nfs.Stats;
|
|
185
|
+
Dirent: typeof nfs.Dirent;
|
|
186
|
+
Dir: typeof nfs.Dir;
|
|
187
|
+
ReadStream: typeof nfs.ReadStream;
|
|
188
|
+
WriteStream: typeof nfs.WriteStream;
|
|
189
|
+
fstat: typeof nfs.fstat;
|
|
190
|
+
constants: typeof nfs.constants;
|
|
191
|
+
promises: typeof nfs.promises;
|
|
192
|
+
BigIntStats: typeof nfs.BigIntStats;
|
|
193
|
+
};
|
|
194
|
+
export declare const requireModule: <T>(path: string) => T;
|
package/dist/utils.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.requireModule = exports.fs = void 0;
|
|
4
|
-
const nfs = require("fs");
|
|
5
|
-
exports.fs = Object.assign(Object.assign({}, nfs), { readdir(path) {
|
|
6
|
-
return new Promise((resolve, reject) => {
|
|
7
|
-
nfs.readdir(path, (err, files) => {
|
|
8
|
-
if (err) {
|
|
9
|
-
reject(err);
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
resolve(files);
|
|
13
|
-
});
|
|
14
|
-
});
|
|
15
|
-
},
|
|
16
|
-
stat(path) {
|
|
17
|
-
return new Promise((resolve, reject) => {
|
|
18
|
-
nfs.stat(path, (err, stats) => {
|
|
19
|
-
if (err) {
|
|
20
|
-
reject(err);
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
resolve(stats);
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
} });
|
|
27
|
-
const requireModule = (path) => {
|
|
28
|
-
const requiredModule = require(path);
|
|
29
|
-
return requiredModule.default || requiredModule;
|
|
30
|
-
};
|
|
31
|
-
exports.requireModule = requireModule;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.requireModule = exports.fs = void 0;
|
|
4
|
+
const nfs = require("fs");
|
|
5
|
+
exports.fs = Object.assign(Object.assign({}, nfs), { readdir(path) {
|
|
6
|
+
return new Promise((resolve, reject) => {
|
|
7
|
+
nfs.readdir(path, (err, files) => {
|
|
8
|
+
if (err) {
|
|
9
|
+
reject(err);
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
resolve(files);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
},
|
|
16
|
+
stat(path) {
|
|
17
|
+
return new Promise((resolve, reject) => {
|
|
18
|
+
nfs.stat(path, (err, stats) => {
|
|
19
|
+
if (err) {
|
|
20
|
+
reject(err);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
resolve(stats);
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
} });
|
|
27
|
+
const requireModule = (path) => {
|
|
28
|
+
const requiredModule = require(path);
|
|
29
|
+
return requiredModule.default || requiredModule;
|
|
30
|
+
};
|
|
31
|
+
exports.requireModule = requireModule;
|
|
32
32
|
//# sourceMappingURL=utils.js.map
|
package/package.json
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "resting-squirrel-controller",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "Controller for defining endpoints in resting-squirrel.",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"types": "./dist/index.d.ts",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"create_index": "run-script-os",
|
|
9
|
-
"create_index:win32": "echo module.exports = require('./dist'); > index.js",
|
|
10
|
-
"create_index:linux:darwin": "echo \"module.exports = require('./dist');\" > index.js",
|
|
11
|
-
"build_ts": "./node_modules/.bin/tsc && npm run create_index",
|
|
12
|
-
"clear": "run-script-os",
|
|
13
|
-
"clear:win32": "(if exist .\\dist rd /s /q .\\dist) && del /q .\\index.js 2>nul",
|
|
14
|
-
"clear:linux:darwin": "rm -rf ./dist && rm -f ./index.js",
|
|
15
|
-
"clear_docs": "run-script-os",
|
|
16
|
-
"clear_docs:win32": "if exist .\\docs rd /s /q .\\docs",
|
|
17
|
-
"clear_docs:linux:darwin": "rm -rf ./docs",
|
|
18
|
-
"create_nojekyll": "run-script-os",
|
|
19
|
-
"create_nojekyll:win32": "type nul > ./docs/.nojekyll",
|
|
20
|
-
"create_nojekyll:linux:darwin": "touch ./docs/.nojekyll",
|
|
21
|
-
"docs_generate": "./node_modules/.bin/typedoc --out docs ./src",
|
|
22
|
-
"docs": "npm run clear_docs && npm run docs_generate && npm run create_nojekyll",
|
|
23
|
-
"test": "./node_modules/.bin/mocha -r ts-node/register __tests__/index.ts",
|
|
24
|
-
"test:app": "./node_modules/.bin/mocha -r ts-node/register __tests__/app.ts",
|
|
25
|
-
"start": "npm run clear && npm run build_ts && node -r source-map-support/register index.js",
|
|
26
|
-
"prepublish": "npm run clear && npm run build_ts",
|
|
27
|
-
"postpublish": "npm run clear"
|
|
28
|
-
},
|
|
29
|
-
"author": "Lukas Macuda <lukas.macuda@gmail.com>",
|
|
30
|
-
"license": "MIT",
|
|
31
|
-
"engines": {
|
|
32
|
-
"node": ">=4"
|
|
33
|
-
},
|
|
34
|
-
"dependencies": {},
|
|
35
|
-
"devDependencies": {
|
|
36
|
-
"@types/chai": "^4.3.
|
|
37
|
-
"@types/core-js": "^2.5.5",
|
|
38
|
-
"@types/mocha": "^
|
|
39
|
-
"@types/node": "^
|
|
40
|
-
"@types/node-fetch": "^2.6.1",
|
|
41
|
-
"chai": "^4.3.6",
|
|
42
|
-
"mocha": "^
|
|
43
|
-
"node-fetch": "^2.6.7",
|
|
44
|
-
"resting-squirrel": "^2.27.1",
|
|
45
|
-
"resting-squirrel-connector": "^2.3.4",
|
|
46
|
-
"resting-squirrel-dto": "^2.0.2",
|
|
47
|
-
"run-script-os-fix": "^1.0.4",
|
|
48
|
-
"source-map-support": "^0.5.21",
|
|
49
|
-
"ts-node": "^10.5.0",
|
|
50
|
-
"tslint": "^6.1.3",
|
|
51
|
-
"typedoc": "^0.22.
|
|
52
|
-
"typescript": "^4.5.5"
|
|
53
|
-
},
|
|
54
|
-
"peerDependencies": {
|
|
55
|
-
"resting-squirrel": "^2.27.0",
|
|
56
|
-
"resting-squirrel-dto": "^2.0.2"
|
|
57
|
-
},
|
|
58
|
-
"repository": {
|
|
59
|
-
"type": "git",
|
|
60
|
-
"url": "git+https://github.com/zabkwak/resting-squirrel-controller.git"
|
|
61
|
-
},
|
|
62
|
-
"bugs": {
|
|
63
|
-
"url": "https://github.com/zabkwak/resting-squirrel-controller/issues"
|
|
64
|
-
},
|
|
65
|
-
"homepage": "https://github.com/zabkwak/resting-squirrel-controller#readme"
|
|
66
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "resting-squirrel-controller",
|
|
3
|
+
"version": "2.6.1",
|
|
4
|
+
"description": "Controller for defining endpoints in resting-squirrel.",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"create_index": "run-script-os",
|
|
9
|
+
"create_index:win32": "echo module.exports = require('./dist'); > index.js",
|
|
10
|
+
"create_index:linux:darwin": "echo \"module.exports = require('./dist');\" > index.js",
|
|
11
|
+
"build_ts": "./node_modules/.bin/tsc && npm run create_index",
|
|
12
|
+
"clear": "run-script-os",
|
|
13
|
+
"clear:win32": "(if exist .\\dist rd /s /q .\\dist) && del /q .\\index.js 2>nul",
|
|
14
|
+
"clear:linux:darwin": "rm -rf ./dist && rm -f ./index.js",
|
|
15
|
+
"clear_docs": "run-script-os",
|
|
16
|
+
"clear_docs:win32": "if exist .\\docs rd /s /q .\\docs",
|
|
17
|
+
"clear_docs:linux:darwin": "rm -rf ./docs",
|
|
18
|
+
"create_nojekyll": "run-script-os",
|
|
19
|
+
"create_nojekyll:win32": "type nul > ./docs/.nojekyll",
|
|
20
|
+
"create_nojekyll:linux:darwin": "touch ./docs/.nojekyll",
|
|
21
|
+
"docs_generate": "./node_modules/.bin/typedoc --out docs ./src",
|
|
22
|
+
"docs": "npm run clear_docs && npm run docs_generate && npm run create_nojekyll",
|
|
23
|
+
"test": "./node_modules/.bin/mocha -r ts-node/register __tests__/index.ts",
|
|
24
|
+
"test:app": "./node_modules/.bin/mocha -r ts-node/register __tests__/app.ts",
|
|
25
|
+
"start": "npm run clear && npm run build_ts && node -r source-map-support/register index.js",
|
|
26
|
+
"prepublish": "npm run clear && npm run build_ts",
|
|
27
|
+
"postpublish": "npm run clear"
|
|
28
|
+
},
|
|
29
|
+
"author": "Lukas Macuda <lukas.macuda@gmail.com>",
|
|
30
|
+
"license": "MIT",
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=4"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/chai": "^4.3.1",
|
|
37
|
+
"@types/core-js": "^2.5.5",
|
|
38
|
+
"@types/mocha": "^9.1.0",
|
|
39
|
+
"@types/node": "^12.20.48",
|
|
40
|
+
"@types/node-fetch": "^2.6.1",
|
|
41
|
+
"chai": "^4.3.6",
|
|
42
|
+
"mocha": "^9.2.2",
|
|
43
|
+
"node-fetch": "^2.6.7",
|
|
44
|
+
"resting-squirrel": "^2.27.1",
|
|
45
|
+
"resting-squirrel-connector": "^2.3.4",
|
|
46
|
+
"resting-squirrel-dto": "^2.0.2",
|
|
47
|
+
"run-script-os-fix": "^1.0.4",
|
|
48
|
+
"source-map-support": "^0.5.21",
|
|
49
|
+
"ts-node": "^10.5.0",
|
|
50
|
+
"tslint": "^6.1.3",
|
|
51
|
+
"typedoc": "^0.22.15",
|
|
52
|
+
"typescript": "^4.5.5"
|
|
53
|
+
},
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"resting-squirrel": "^2.27.0",
|
|
56
|
+
"resting-squirrel-dto": "^2.0.2"
|
|
57
|
+
},
|
|
58
|
+
"repository": {
|
|
59
|
+
"type": "git",
|
|
60
|
+
"url": "git+https://github.com/zabkwak/resting-squirrel-controller.git"
|
|
61
|
+
},
|
|
62
|
+
"bugs": {
|
|
63
|
+
"url": "https://github.com/zabkwak/resting-squirrel-controller/issues"
|
|
64
|
+
},
|
|
65
|
+
"homepage": "https://github.com/zabkwak/resting-squirrel-controller#readme"
|
|
66
|
+
}
|
package/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('./dist');
|
package/tslint.json
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "tslint:recommended",
|
|
3
|
-
"rulesDirectory": [
|
|
4
|
-
"src/"
|
|
5
|
-
],
|
|
6
|
-
"rules": {
|
|
7
|
-
"max-line-length": {
|
|
8
|
-
"options": [
|
|
9
|
-
120
|
|
10
|
-
]
|
|
11
|
-
},
|
|
12
|
-
"new-parens": true,
|
|
13
|
-
"no-arg": true,
|
|
14
|
-
"no-bitwise": true,
|
|
15
|
-
"no-conditional-assignment": true,
|
|
16
|
-
"no-consecutive-blank-lines": false,
|
|
17
|
-
"no-console": {
|
|
18
|
-
"severity": "warning",
|
|
19
|
-
"options": [
|
|
20
|
-
"debug",
|
|
21
|
-
"info",
|
|
22
|
-
"log",
|
|
23
|
-
"time",
|
|
24
|
-
"timeEnd",
|
|
25
|
-
"trace"
|
|
26
|
-
]
|
|
27
|
-
},
|
|
28
|
-
"quotemark": [
|
|
29
|
-
true,
|
|
30
|
-
"single",
|
|
31
|
-
"jsx-double"
|
|
32
|
-
],
|
|
33
|
-
"array-type": false,
|
|
34
|
-
"variable-name": {
|
|
35
|
-
"options": [
|
|
36
|
-
"ban-keywords",
|
|
37
|
-
"check-format",
|
|
38
|
-
"allow-leading-underscore",
|
|
39
|
-
"allow-pascal-case"
|
|
40
|
-
]
|
|
41
|
-
},
|
|
42
|
-
"indent": [
|
|
43
|
-
true,
|
|
44
|
-
"tabs",
|
|
45
|
-
4
|
|
46
|
-
],
|
|
47
|
-
"member-ordering": [
|
|
48
|
-
true,
|
|
49
|
-
{
|
|
50
|
-
"order": [
|
|
51
|
-
"public-static-field",
|
|
52
|
-
"protected-static-field",
|
|
53
|
-
"private-static-field",
|
|
54
|
-
"public-static-method",
|
|
55
|
-
"protected-static-method",
|
|
56
|
-
"private-static-method",
|
|
57
|
-
"public-instance-field",
|
|
58
|
-
"protected-instance-field",
|
|
59
|
-
"private-instance-field",
|
|
60
|
-
"public-constructor",
|
|
61
|
-
"private-constructor",
|
|
62
|
-
"public-instance-method",
|
|
63
|
-
"protected-instance-method",
|
|
64
|
-
"private-instance-method"
|
|
65
|
-
]
|
|
66
|
-
}
|
|
67
|
-
]
|
|
68
|
-
},
|
|
69
|
-
"jsRules": {
|
|
70
|
-
"no-empty": true,
|
|
71
|
-
"max-line-length": {
|
|
72
|
-
"options": [
|
|
73
|
-
120
|
|
74
|
-
]
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
"allowJs": true
|
|
78
|
-
}
|