Skip to content

Commit 6a265ed

Browse files
committed
fix generetor for 3278942842034232 time
1 parent a65d86f commit 6a265ed

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

other/pluginTypesGenerator.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ globalThis.Underline = {
2222
console.info(`[BİLGİ] "${rltPath}" konumundaki plugin yükleniyor..`)
2323
/** @type {import("../types/Plugin")} */
2424
let plugin = require(pluginFile);
25-
console.info("Plugin:", plugin._type, plugin.namespace,plugin);
25+
console.info("Plugin:", plugin._type, plugin.namespace, plugin);
2626
// console.log(plugin)
2727

2828
if (plugin._type != "plugin")
@@ -32,10 +32,10 @@ globalThis.Underline = {
3232
return console.warn(`[UYARI] ${plugin.name} plugini zaten yüklenmiş. Atlanıyor..`);
3333

3434
loadedNamespaces.push(plugin.namespace);
35-
35+
3636
let parsedPluginPath = path.parse(pluginFile);
3737
// console.log(parsedPluginPath)
38-
38+
3939
let dtsPath = "";
4040

4141
switch (parsedPluginPath.dir.split(path.sep).pop()) {
@@ -50,7 +50,7 @@ globalThis.Underline = {
5050
}
5151
console.log(dtsPath);
5252
let isDTS = fs.existsSync(dtsPath);
53-
53+
5454
if (isDTS) {
5555
pluginTypes.push(`["${plugin.namespace}"]: import("${path.relative(process.cwd(), dtsPath).replace(".d.ts", "").replaceAll(path.sep, "/")}").Plugin`);
5656
} else {
@@ -75,12 +75,12 @@ globalThis.Underline = {
7575

7676
}
7777
}
78-
78+
7979
console.info(`[BİLGİ] "${plugin.name}" plugini tipi çıkartıldı.`);
8080
});
8181

8282
await makeSureFolderExists(path.resolve(__dirname, "../generated"));
83-
let result = `export class Types {\n${pluginTypes.map(i => ` ${i};`).join("\n")}\n};\n${`export type TEventNames = ${TEventNames.join(" | ").trim() || "any"};`}\n${`export type TEvents = ${TEvents.join(" | ").trim() || "any"};`}\n${TInterfaces.join("\n")}\n`.trim();
83+
let result = `export class Types {\n${pluginTypes.map(i => ` ${i};`).join("\n")}\n};\n${`export type TEventNames = ${TEventNames.join(" | ").trim() || '""'};`}\n${`export type TEvents = ${TEvents.join(" | ").trim() || "[]"};`}\n${TInterfaces.join("\n")}\n`.trim();
8484
console.info(result);
8585
await fs.promises.writeFile(path.resolve(__dirname, "../generated/pluginTypes.d.ts"), result);
8686

@@ -126,7 +126,7 @@ async function getPluginFilePaths() {
126126
let folderPath = path.resolve(pluginsPath, folderOrZip.name.replace(".up.zip", ".up"));
127127
let zipPath = path.resolve(pluginsPath, folderOrZip.name);
128128

129-
await fs.promises.rm(folderPath, {recursive: true}).catch(() => {});
129+
await fs.promises.rm(folderPath, { recursive: true }).catch(() => { });
130130
await makeSureFolderExists(folderPath);
131131
await extractZip(zipPath, { dir: folderPath });
132132
fs.promises.unlink(zipPath).catch(() => null);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"@types/recursive-readdir": "^2.2.0"
2121
},
2222
"name": "armagan-basit-altyapi",
23-
"version": "2.0.2",
23+
"version": "2.0.3",
2424
"description": "Kullanımı basit ancak bir yandanda içinde birçek özellik barındıran discord bot altyapısı.",
2525
"main": "index.js",
2626
"repository": {

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Basit Altyapı (Versiyon 2.0.2) (v13.x)
1+
# Basit Altyapı (Versiyon 2.0.3) (v13.x)
22

33
Kullanımı basit ancak bir yandanda içinde birçek özellik barındıran discord bot altyapısı. Sık sık güncelleme alıyor. (Slash Commands)
44

0 commit comments

Comments
 (0)