vimcord 1.0.45 → 1.0.47
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/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ import { SlashCommandBuilder as SlashCommandBuilder$1, SlashCommandOptionsOnlyBu
|
|
|
3
3
|
import EventEmitter from 'node:events';
|
|
4
4
|
import { Loop } from 'qznt';
|
|
5
5
|
import * as mongoose from 'mongoose';
|
|
6
|
-
import mongoose__default, { ClientSessionOptions, Connection, QueryOptions, HydratedDocument, Require_id, Schema, Model, SchemaDefinition, mongo, ClientSession, RootFilterQuery, MongooseBaseQueryOptions, CreateOptions, Document, ProjectionType, UpdateQuery, MongooseUpdateQueryOptions, PipelineStage, AggregateOptions, AnyBulkWriteOperation, MongooseBulkWriteOptions } from 'mongoose';
|
|
6
|
+
import mongoose__default, { ClientSessionOptions, Connection, QueryOptions, HydratedDocument, Require_id, Schema, Model, SchemaDefinition, SchemaOptions, mongo, ClientSession, RootFilterQuery, MongooseBaseQueryOptions, CreateOptions, Document, ProjectionType, UpdateQuery, MongooseUpdateQueryOptions, PipelineStage, AggregateOptions, AnyBulkWriteOperation, MongooseBulkWriteOptions } from 'mongoose';
|
|
7
7
|
import { DotenvConfigOptions } from 'dotenv';
|
|
8
8
|
import { Interface } from 'node:readline';
|
|
9
9
|
|
|
@@ -2371,10 +2371,10 @@ declare class ErrorHandler {
|
|
|
2371
2371
|
type MongoPlugin<Definition extends object> = (builder: MongoSchemaBuilder<Definition>) => void;
|
|
2372
2372
|
type ExtractReturn<T> = T extends (this: any, ...args: any) => infer R ? Awaited<R> : never;
|
|
2373
2373
|
type LeanOrHydratedDocument<T, O extends QueryOptions<T>> = O["lean"] extends false ? HydratedDocument<T> : Require_id<T>;
|
|
2374
|
-
interface MongoSchemaOptions {
|
|
2374
|
+
interface MongoSchemaOptions<Definition extends object> extends SchemaOptions<Definition> {
|
|
2375
2375
|
instanceId?: number;
|
|
2376
2376
|
}
|
|
2377
|
-
declare function createMongoSchema<Definition extends object>(collection: string, definition: SchemaDefinition<Definition>, options?: MongoSchemaOptions): MongoSchemaBuilder<Definition>;
|
|
2377
|
+
declare function createMongoSchema<Definition extends object>(collection: string, definition: SchemaDefinition<Definition>, options?: MongoSchemaOptions<Definition>): MongoSchemaBuilder<Definition>;
|
|
2378
2378
|
/**
|
|
2379
2379
|
* Creates a plugin to be used with MongoSchemaBuilder.
|
|
2380
2380
|
*
|
|
@@ -2440,12 +2440,12 @@ declare class MongoSchemaBuilder<Definition extends object = any> {
|
|
|
2440
2440
|
db: MongoDatabase | null;
|
|
2441
2441
|
private logger;
|
|
2442
2442
|
private compilingModel;
|
|
2443
|
-
static create<Definition extends object = any>(collection: string, definition: SchemaDefinition<Definition>, options?: MongoSchemaOptions): MongoSchemaBuilder<Definition>;
|
|
2443
|
+
static create<Definition extends object = any>(collection: string, definition: SchemaDefinition<Definition>, options?: MongoSchemaOptions<Definition>): MongoSchemaBuilder<Definition>;
|
|
2444
2444
|
/**
|
|
2445
2445
|
* Registers a plugin globally to be used by all future schemas.
|
|
2446
2446
|
*/
|
|
2447
2447
|
static use(plugin: MongoPlugin<any>): void;
|
|
2448
|
-
constructor(collection: string, definition: SchemaDefinition<Definition>, options?: MongoSchemaOptions);
|
|
2448
|
+
constructor(collection: string, definition: SchemaDefinition<Definition>, options?: MongoSchemaOptions<Definition>);
|
|
2449
2449
|
private getModel;
|
|
2450
2450
|
extend<Extra extends Record<string, (...args: any) => any>>(extras: Extra & ThisType<MongoSchemaBuilder<Definition>>): MongoSchemaBuilder<Definition> & Extra;
|
|
2451
2451
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { SlashCommandBuilder as SlashCommandBuilder$1, SlashCommandOptionsOnlyBu
|
|
|
3
3
|
import EventEmitter from 'node:events';
|
|
4
4
|
import { Loop } from 'qznt';
|
|
5
5
|
import * as mongoose from 'mongoose';
|
|
6
|
-
import mongoose__default, { ClientSessionOptions, Connection, QueryOptions, HydratedDocument, Require_id, Schema, Model, SchemaDefinition, mongo, ClientSession, RootFilterQuery, MongooseBaseQueryOptions, CreateOptions, Document, ProjectionType, UpdateQuery, MongooseUpdateQueryOptions, PipelineStage, AggregateOptions, AnyBulkWriteOperation, MongooseBulkWriteOptions } from 'mongoose';
|
|
6
|
+
import mongoose__default, { ClientSessionOptions, Connection, QueryOptions, HydratedDocument, Require_id, Schema, Model, SchemaDefinition, SchemaOptions, mongo, ClientSession, RootFilterQuery, MongooseBaseQueryOptions, CreateOptions, Document, ProjectionType, UpdateQuery, MongooseUpdateQueryOptions, PipelineStage, AggregateOptions, AnyBulkWriteOperation, MongooseBulkWriteOptions } from 'mongoose';
|
|
7
7
|
import { DotenvConfigOptions } from 'dotenv';
|
|
8
8
|
import { Interface } from 'node:readline';
|
|
9
9
|
|
|
@@ -2371,10 +2371,10 @@ declare class ErrorHandler {
|
|
|
2371
2371
|
type MongoPlugin<Definition extends object> = (builder: MongoSchemaBuilder<Definition>) => void;
|
|
2372
2372
|
type ExtractReturn<T> = T extends (this: any, ...args: any) => infer R ? Awaited<R> : never;
|
|
2373
2373
|
type LeanOrHydratedDocument<T, O extends QueryOptions<T>> = O["lean"] extends false ? HydratedDocument<T> : Require_id<T>;
|
|
2374
|
-
interface MongoSchemaOptions {
|
|
2374
|
+
interface MongoSchemaOptions<Definition extends object> extends SchemaOptions<Definition> {
|
|
2375
2375
|
instanceId?: number;
|
|
2376
2376
|
}
|
|
2377
|
-
declare function createMongoSchema<Definition extends object>(collection: string, definition: SchemaDefinition<Definition>, options?: MongoSchemaOptions): MongoSchemaBuilder<Definition>;
|
|
2377
|
+
declare function createMongoSchema<Definition extends object>(collection: string, definition: SchemaDefinition<Definition>, options?: MongoSchemaOptions<Definition>): MongoSchemaBuilder<Definition>;
|
|
2378
2378
|
/**
|
|
2379
2379
|
* Creates a plugin to be used with MongoSchemaBuilder.
|
|
2380
2380
|
*
|
|
@@ -2440,12 +2440,12 @@ declare class MongoSchemaBuilder<Definition extends object = any> {
|
|
|
2440
2440
|
db: MongoDatabase | null;
|
|
2441
2441
|
private logger;
|
|
2442
2442
|
private compilingModel;
|
|
2443
|
-
static create<Definition extends object = any>(collection: string, definition: SchemaDefinition<Definition>, options?: MongoSchemaOptions): MongoSchemaBuilder<Definition>;
|
|
2443
|
+
static create<Definition extends object = any>(collection: string, definition: SchemaDefinition<Definition>, options?: MongoSchemaOptions<Definition>): MongoSchemaBuilder<Definition>;
|
|
2444
2444
|
/**
|
|
2445
2445
|
* Registers a plugin globally to be used by all future schemas.
|
|
2446
2446
|
*/
|
|
2447
2447
|
static use(plugin: MongoPlugin<any>): void;
|
|
2448
|
-
constructor(collection: string, definition: SchemaDefinition<Definition>, options?: MongoSchemaOptions);
|
|
2448
|
+
constructor(collection: string, definition: SchemaDefinition<Definition>, options?: MongoSchemaOptions<Definition>);
|
|
2449
2449
|
private getModel;
|
|
2450
2450
|
extend<Extra extends Record<string, (...args: any) => any>>(extras: Extra & ThisType<MongoSchemaBuilder<Definition>>): MongoSchemaBuilder<Definition> & Extra;
|
|
2451
2451
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1693,7 +1693,7 @@ var VimcordErrorHandler = class {
|
|
|
1693
1693
|
import chalk2 from "chalk";
|
|
1694
1694
|
|
|
1695
1695
|
// package.json
|
|
1696
|
-
var version = "1.0.
|
|
1696
|
+
var version = "1.0.47";
|
|
1697
1697
|
|
|
1698
1698
|
// src/client/vimcord.logger.ts
|
|
1699
1699
|
var clientLoggerFactory = (client) => new Logger({ prefixEmoji: "\u26A1", prefix: `vimcord (i${client.clientId})` }).extend({
|
|
@@ -2671,6 +2671,7 @@ var Vimcord = class _Vimcord extends Client2 {
|
|
|
2671
2671
|
importModules.contextCommands && this.importModules("contextCommands", importModules.contextCommands)
|
|
2672
2672
|
]);
|
|
2673
2673
|
}
|
|
2674
|
+
this.logger.clientBanner(this);
|
|
2674
2675
|
if (this.config.app.enableCLI) {
|
|
2675
2676
|
VimcordCLI.setMode("on");
|
|
2676
2677
|
}
|
|
@@ -2786,7 +2787,6 @@ var Vimcord = class _Vimcord extends Client2 {
|
|
|
2786
2787
|
);
|
|
2787
2788
|
}
|
|
2788
2789
|
await this.build();
|
|
2789
|
-
this.logger.clientBanner(this);
|
|
2790
2790
|
try {
|
|
2791
2791
|
const stopLoader = this.logger.loader("Connecting to Discord...");
|
|
2792
2792
|
const loginResult = await $4.async.retry(() => super.login(token), {
|
|
@@ -3012,10 +3012,10 @@ var MongoSchemaBuilder = class _MongoSchemaBuilder {
|
|
|
3012
3012
|
this.globalPlugins.push(plugin);
|
|
3013
3013
|
}
|
|
3014
3014
|
constructor(collection, definition, options = {}) {
|
|
3015
|
-
const { instanceId = 0 } = options;
|
|
3015
|
+
const { instanceId = 0, ...schemaOptions } = options;
|
|
3016
3016
|
this.instanceId = instanceId;
|
|
3017
3017
|
this.collection = collection;
|
|
3018
|
-
this.schema = new Schema(definition, { versionKey: false });
|
|
3018
|
+
this.schema = new Schema(definition, { versionKey: false, ...schemaOptions });
|
|
3019
3019
|
this.logger = new Logger({
|
|
3020
3020
|
prefixEmoji: "\u{1F96D}",
|
|
3021
3021
|
prefix: `MongoSchema (i${instanceId}) [${collection}]`,
|