reciple 7.0.2 → 7.0.3
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/bin/utils/modules.js +12 -8
- package/bin/utils/modules.js.map +1 -1
- package/package.json +2 -2
package/bin/utils/modules.js
CHANGED
|
@@ -1,24 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.getModules = void 0;
|
|
4
7
|
const fallout_utility_1 = require("fallout-utility");
|
|
5
8
|
const cli_1 = require("./cli");
|
|
6
9
|
const fs_1 = require("fs");
|
|
10
|
+
const micromatch_1 = __importDefault(require("micromatch"));
|
|
7
11
|
async function getModules(config, filter) {
|
|
8
12
|
const modules = [];
|
|
9
13
|
const { globby, isDynamicPattern } = await import('globby');
|
|
10
14
|
for (const folder of config.modulesFolders) {
|
|
11
15
|
const dir = fallout_utility_1.path.isAbsolute(folder) ? folder : fallout_utility_1.path.join(cli_1.cwd, folder);
|
|
12
16
|
if (isDynamicPattern(dir)) {
|
|
17
|
+
let modulesFolders = await globby(dir, {
|
|
18
|
+
cwd: cli_1.cwd,
|
|
19
|
+
onlyDirectories: true,
|
|
20
|
+
absolute: true
|
|
21
|
+
});
|
|
22
|
+
modulesFolders = modulesFolders.filter(f => !micromatch_1.default.isMatch(fallout_utility_1.path.basename(f), config.exclude));
|
|
13
23
|
modules.push(...await getModules({
|
|
14
24
|
...config,
|
|
15
|
-
modulesFolders
|
|
16
|
-
cwd: cli_1.cwd,
|
|
17
|
-
gitignore: true,
|
|
18
|
-
ignore: config.exclude.map(p => fallout_utility_1.path.isAbsolute(p) ? p : fallout_utility_1.path.join(cli_1.cwd, p)),
|
|
19
|
-
onlyDirectories: true,
|
|
20
|
-
absolute: true
|
|
21
|
-
})
|
|
25
|
+
modulesFolders
|
|
22
26
|
}));
|
|
23
27
|
continue;
|
|
24
28
|
}
|
|
@@ -26,7 +30,7 @@ async function getModules(config, filter) {
|
|
|
26
30
|
(0, fs_1.mkdirSync)(dir, { recursive: true });
|
|
27
31
|
if (!(0, fs_1.lstatSync)(dir).isDirectory())
|
|
28
32
|
continue;
|
|
29
|
-
const files = (0, fs_1.readdirSync)(dir).map(file => fallout_utility_1.path.join(dir, file));
|
|
33
|
+
const files = (0, fs_1.readdirSync)(dir).map(file => fallout_utility_1.path.join(dir, file)).filter(f => !micromatch_1.default.isMatch(fallout_utility_1.path.basename(f), config.exclude));
|
|
30
34
|
modules.push(...files.filter(file => (filter ? filter(file) : file.endsWith('.js'))));
|
|
31
35
|
}
|
|
32
36
|
return modules;
|
package/bin/utils/modules.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modules.js","sourceRoot":"","sources":["../../src/utils/modules.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"modules.js","sourceRoot":"","sources":["../../src/utils/modules.ts"],"names":[],"mappings":";;;;;;AAAA,qDAAkD;AAElD,+BAA4B;AAC5B,2BAAmE;AACnE,4DAAoC;AAE7B,KAAK,UAAU,UAAU,CAAC,MAA0B,EAAE,MAAiD;IAC1G,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,CAAC;IAE5D,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,cAAc,EAAE;QACxC,MAAM,GAAG,GAAG,sBAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,sBAAI,CAAC,IAAI,CAAC,SAAG,EAAE,MAAM,CAAC,CAAC;QAEtE,IAAI,gBAAgB,CAAC,GAAG,CAAC,EAAE;YACvB,IAAI,cAAc,GAAG,MAAM,MAAM,CAAC,G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 +3,7 @@
|
|
|
3
3
|
"description": "Reciple is a Discord.js handler",
|
|
4
4
|
"homepage": "https://reciple.js.org/docs/reciple",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
|
-
"version": "7.0.
|
|
6
|
+
"version": "7.0.3",
|
|
7
7
|
"main": "./bin/index.js",
|
|
8
8
|
"module": "./bin/esm.mjs",
|
|
9
9
|
"types": "./bin/index.d.ts",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"discord.js": "^14.7.1"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "7e2ab854f4e1d8ad000c56e00c952f60c8885646"
|
|
60
60
|
}
|