gambling-bot-shared 1.0.8 → 1.0.10

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.
Files changed (33) hide show
  1. package/dist/blackjack/index.d.ts +1 -0
  2. package/dist/blackjack/index.js +1 -0
  3. package/dist/casino/blackjackGame.mongoose.d.ts +9 -0
  4. package/dist/casino/blackjackGame.mongoose.js +2 -1
  5. package/dist/casino/constants/blackjackWorkers.d.ts +5 -0
  6. package/dist/casino/constants/blackjackWorkers.js +17 -0
  7. package/dist/casino/constants/index.d.ts +1 -0
  8. package/dist/casino/constants/index.js +1 -0
  9. package/dist/casino/types/blackjackGame.d.ts +1 -0
  10. package/dist/common/durations.d.ts +5 -0
  11. package/dist/common/durations.js +8 -0
  12. package/dist/common/index.d.ts +1 -0
  13. package/dist/common/index.js +1 -0
  14. package/dist/guild/guildConfiguration.mongoose.d.ts +9 -0
  15. package/dist/guild/guildConfiguration.mongoose.js +4 -0
  16. package/dist/guild/index.d.ts +1 -0
  17. package/dist/guild/index.js +1 -0
  18. package/dist/guild/schemas/guild.forms.d.ts +1 -0
  19. package/dist/guild/schemas/guild.forms.js +2 -1
  20. package/dist/guild/types/guildConfiguration.d.ts +1 -0
  21. package/dist/guild/utils/workerLogChannel.d.ts +2 -0
  22. package/dist/guild/utils/workerLogChannel.js +6 -0
  23. package/dist/predictions/services/prediction.db.d.ts +1 -8
  24. package/dist/predictions/services/prediction.db.js +0 -8
  25. package/dist/predictions/services/predictionLifecycle.service.d.ts +15 -1
  26. package/dist/predictions/services/predictionLifecycle.service.js +31 -2
  27. package/dist/predictions/services/types.d.ts +0 -4
  28. package/dist/transactions/constants/staffAudit.d.ts +2 -0
  29. package/dist/transactions/constants/staffAudit.js +2 -0
  30. package/dist/vip/types/vipRoom.d.ts +2 -0
  31. package/dist/vip/vipRoom.mongoose.d.ts +9 -0
  32. package/dist/vip/vipRoom.mongoose.js +5 -0
  33. package/package.json +1 -1
@@ -1,2 +1,3 @@
1
1
  export * from '../casino/constants/blackjack';
2
+ export * from '../casino/constants/blackjackWorkers';
2
3
  export * from '../casino/types/blackjackGame';
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("../casino/constants/blackjack"), exports);
18
+ __exportStar(require("../casino/constants/blackjackWorkers"), exports);
18
19
  __exportStar(require("../casino/types/blackjackGame"), exports);
@@ -108,6 +108,15 @@ export declare const BlackjackGameSchema: Schema<TBlackjackGame, import("mongoos
108
108
  }, "id"> & {
109
109
  id: string;
110
110
  }> | undefined;
111
+ idleNudgeSentAt?: import("mongoose").SchemaDefinitionProperty<Date | null | undefined, TBlackjackGame, import("mongoose").Document<unknown, {}, TBlackjackGame, {
112
+ id: string;
113
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TBlackjackGame & {
114
+ _id: import("mongoose").Types.ObjectId;
115
+ } & {
116
+ __v: number;
117
+ }, "id"> & {
118
+ id: string;
119
+ }> | undefined;
111
120
  createdAt?: import("mongoose").SchemaDefinitionProperty<Date, TBlackjackGame, import("mongoose").Document<unknown, {}, TBlackjackGame, {
112
121
  id: string;
113
122
  }, import("mongoose").DefaultSchemaOptions> & Omit<TBlackjackGame & {
@@ -29,6 +29,7 @@ exports.BlackjackGameSchema = new mongoose_1.Schema({
29
29
  default: 'PLAYER'
30
30
  },
31
31
  activeHandIndex: { type: Number, required: true, default: 0 },
32
- dealerCards: [cardSchema]
32
+ dealerCards: [cardSchema],
33
+ idleNudgeSentAt: { type: Date, default: null }
33
34
  }, { timestamps: true });
34
35
  exports.BlackjackGameSchema.index({ userId: 1, guildId: 1 }, { unique: true });
@@ -0,0 +1,5 @@
1
+ export declare const BLACKJACK_AUTOSTAND_IDLE_DAYS = 1;
2
+ export declare const BLACKJACK_IDLE_NUDGE_HOURS = 3;
3
+ export declare const blackjackIdleNudgeThresholdMs: () => number;
4
+ export declare const blackjackAutostandIdleMs: () => number;
5
+ export declare const hoursUntilBlackjackAutostand: (updatedAt: Date, nowMs?: number) => number;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.hoursUntilBlackjackAutostand = exports.blackjackAutostandIdleMs = exports.blackjackIdleNudgeThresholdMs = exports.BLACKJACK_IDLE_NUDGE_HOURS = exports.BLACKJACK_AUTOSTAND_IDLE_DAYS = void 0;
4
+ exports.BLACKJACK_AUTOSTAND_IDLE_DAYS = 1;
5
+ exports.BLACKJACK_IDLE_NUDGE_HOURS = 3;
6
+ const MS_PER_HOUR = 60 * 60 * 1000;
7
+ const MS_PER_DAY = 24 * MS_PER_HOUR;
8
+ const blackjackIdleNudgeThresholdMs = () => exports.BLACKJACK_IDLE_NUDGE_HOURS * MS_PER_HOUR;
9
+ exports.blackjackIdleNudgeThresholdMs = blackjackIdleNudgeThresholdMs;
10
+ const blackjackAutostandIdleMs = () => exports.BLACKJACK_AUTOSTAND_IDLE_DAYS * MS_PER_DAY;
11
+ exports.blackjackAutostandIdleMs = blackjackAutostandIdleMs;
12
+ const hoursUntilBlackjackAutostand = (updatedAt, nowMs = Date.now()) => {
13
+ const autostandAt = updatedAt.getTime() + (0, exports.blackjackAutostandIdleMs)();
14
+ const hoursLeft = (autostandAt - nowMs) / MS_PER_HOUR;
15
+ return Math.max(1, Math.ceil(hoursLeft));
16
+ };
17
+ exports.hoursUntilBlackjackAutostand = hoursUntilBlackjackAutostand;
@@ -1,4 +1,5 @@
1
1
  export * from './blackjack';
2
+ export * from './blackjackWorkers';
2
3
  export * from './casinoGames';
3
4
  export * from './defaultConfig';
4
5
  export * from './lotteryConfig';
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./blackjack"), exports);
18
+ __exportStar(require("./blackjackWorkers"), exports);
18
19
  __exportStar(require("./casinoGames"), exports);
19
20
  __exportStar(require("./defaultConfig"), exports);
20
21
  __exportStar(require("./lotteryConfig"), exports);
@@ -25,6 +25,7 @@ export type TBlackjackGame = {
25
25
  activeHandIndex: number;
26
26
  phase: GamePhase;
27
27
  dealerCards: Card[];
28
+ idleNudgeSentAt?: Date | null;
28
29
  createdAt: Date;
29
30
  updatedAt: Date;
30
31
  };
@@ -0,0 +1,5 @@
1
+ export declare const SECOND_MS = 1000;
2
+ export declare const MINUTE_MS: number;
3
+ export declare const HOUR_MS: number;
4
+ export declare const DAY_MS: number;
5
+ export declare const WEEK_MS: number;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WEEK_MS = exports.DAY_MS = exports.HOUR_MS = exports.MINUTE_MS = exports.SECOND_MS = void 0;
4
+ exports.SECOND_MS = 1000;
5
+ exports.MINUTE_MS = 60 * exports.SECOND_MS;
6
+ exports.HOUR_MS = 60 * exports.MINUTE_MS;
7
+ exports.DAY_MS = 24 * exports.HOUR_MS;
8
+ exports.WEEK_MS = 7 * exports.DAY_MS;
@@ -1,3 +1,4 @@
1
+ export * from './durations';
1
2
  export * from './formatters';
2
3
  export * from './generateId';
3
4
  export * from './parseTimeToSeconds';
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./durations"), exports);
17
18
  __exportStar(require("./formatters"), exports);
18
19
  __exportStar(require("./generateId"), exports);
19
20
  __exportStar(require("./parseTimeToSeconds"), exports);
@@ -72,6 +72,15 @@ export declare const GuildConfigurationSchema: Schema<TGuildConfiguration, impor
72
72
  }, "id"> & {
73
73
  id: string;
74
74
  }> | undefined;
75
+ workerLogChannelId?: import("mongoose").SchemaDefinitionProperty<string, TGuildConfiguration, import("mongoose").Document<unknown, {}, TGuildConfiguration, {
76
+ id: string;
77
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TGuildConfiguration & {
78
+ _id: import("mongoose").Types.ObjectId;
79
+ } & {
80
+ __v: number;
81
+ }, "id"> & {
82
+ id: string;
83
+ }> | undefined;
75
84
  managerRoleId?: import("mongoose").SchemaDefinitionProperty<string, TGuildConfiguration, import("mongoose").Document<unknown, {}, TGuildConfiguration, {
76
85
  id: string;
77
86
  }, import("mongoose").DefaultSchemaOptions> & Omit<TGuildConfiguration & {
@@ -49,6 +49,10 @@ exports.GuildConfigurationSchema = new mongoose_1.Schema({
49
49
  default: ''
50
50
  }
51
51
  },
52
+ workerLogChannelId: {
53
+ type: String,
54
+ default: ''
55
+ },
52
56
  managerRoleId: {
53
57
  type: String,
54
58
  default: ''
@@ -4,4 +4,5 @@ export * from './types/guildConfiguration';
4
4
  export * from './utils/globalSettings';
5
5
  export * from './utils/normalizeGlobalSettings';
6
6
  export * from './utils/guildTimezone';
7
+ export * from './utils/workerLogChannel';
7
8
  export * from './schemas/guild.forms';
@@ -20,4 +20,5 @@ __exportStar(require("./types/guildConfiguration"), exports);
20
20
  __exportStar(require("./utils/globalSettings"), exports);
21
21
  __exportStar(require("./utils/normalizeGlobalSettings"), exports);
22
22
  __exportStar(require("./utils/guildTimezone"), exports);
23
+ __exportStar(require("./utils/workerLogChannel"), exports);
23
24
  __exportStar(require("./schemas/guild.forms"), exports);
@@ -16,6 +16,7 @@ export declare const channelsFormSchema: z.ZodObject<{
16
16
  actions: z.ZodString;
17
17
  logs: z.ZodString;
18
18
  }, z.core.$strip>;
19
+ workerLogChannelId: z.ZodString;
19
20
  }, z.core.$strip>;
20
21
  export declare const managerRoleFormSchema: z.ZodObject<{
21
22
  managerRoleId: z.ZodString;
@@ -14,7 +14,8 @@ exports.channelsFormSchema = zod_1.default.object({
14
14
  atm: atm_forms_1.atmChannelsFormSchema,
15
15
  casino: casino_forms_1.casinoChannelsFormSchema,
16
16
  prediction: prediction_forms_1.predictionChannelsFormSchema,
17
- raffle: raffle_forms_1.raffleChannelsFormSchema
17
+ raffle: raffle_forms_1.raffleChannelsFormSchema,
18
+ workerLogChannelId: zod_1.default.string()
18
19
  });
19
20
  exports.managerRoleFormSchema = zod_1.default.object({
20
21
  managerRoleId: zod_1.default.string(),
@@ -18,6 +18,7 @@ export type TGuildConfiguration = {
18
18
  actions: string;
19
19
  logs: string;
20
20
  };
21
+ workerLogChannelId: string;
21
22
  managerRoleId: string;
22
23
  bannedRoleId: string;
23
24
  casinoSettings: typeof defaultCasinoSettings;
@@ -0,0 +1,2 @@
1
+ import type { TGuildConfiguration } from '../types/guildConfiguration';
2
+ export declare function isWorkerLogChannelConfigured(config: Pick<TGuildConfiguration, 'workerLogChannelId'> | null | undefined): boolean;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isWorkerLogChannelConfigured = isWorkerLogChannelConfigured;
4
+ function isWorkerLogChannelConfigured(config) {
5
+ return Boolean(config?.workerLogChannelId);
6
+ }
@@ -1,6 +1,6 @@
1
1
  import type { Model } from 'mongoose';
2
2
  import type { TPrediction } from '../types/prediction';
3
- import type { TAddPredictionBet, TCreatePrediction, TGetOldPredictions, TGetPrediction, TUpdatePredictionStatus } from './types';
3
+ import type { TAddPredictionBet, TCreatePrediction, TGetPrediction, TUpdatePredictionStatus } from './types';
4
4
  export declare function createPredictionDb(predictionModel: Model<TPrediction>): {
5
5
  getPredictionById: ({ predictionId, guildId }: TGetPrediction) => Promise<(import("mongoose").Document<unknown, {}, TPrediction, {}, import("mongoose").DefaultSchemaOptions> & TPrediction & {
6
6
  _id: import("mongoose").Types.ObjectId;
@@ -19,13 +19,6 @@ export declare function createPredictionDb(predictionModel: Model<TPrediction>):
19
19
  } & {
20
20
  id: string;
21
21
  })[]>;
22
- getOldPredictions: ({ statuses, olderThanDays }: TGetOldPredictions) => Promise<(import("mongoose").Document<unknown, {}, TPrediction, {}, import("mongoose").DefaultSchemaOptions> & TPrediction & {
23
- _id: import("mongoose").Types.ObjectId;
24
- } & {
25
- __v: number;
26
- } & {
27
- id: string;
28
- })[]>;
29
22
  createPrediction: ({ predictionId, guildId, channelId, creatorId, title, choices, autolock, status }: TCreatePrediction) => Promise<void>;
30
23
  updatePredictionStatus: ({ predictionId, guildId, fromStatus, toStatus }: TUpdatePredictionStatus) => Promise<(import("mongoose").Document<unknown, {}, TPrediction, {}, import("mongoose").DefaultSchemaOptions> & TPrediction & {
31
24
  _id: import("mongoose").Types.ObjectId;
@@ -12,13 +12,6 @@ function createPredictionDb(predictionModel) {
12
12
  ...(useAutolock ? { autolock: { $lte: now } } : {})
13
13
  });
14
14
  };
15
- const getOldPredictions = async ({ statuses, olderThanDays }) => {
16
- const cutoffDate = new Date(Date.now() - olderThanDays * 24 * 60 * 60 * 1000);
17
- return predictionModel.find({
18
- status: { $in: statuses },
19
- updatedAt: { $lte: cutoffDate }
20
- });
21
- };
22
15
  const createPrediction = async ({ predictionId, guildId, channelId, creatorId, title, choices, autolock, status }) => {
23
16
  await predictionModel.create({
24
17
  predictionId,
@@ -62,7 +55,6 @@ function createPredictionDb(predictionModel) {
62
55
  return {
63
56
  getPredictionById,
64
57
  getPredictionToLock,
65
- getOldPredictions,
66
58
  createPrediction,
67
59
  updatePredictionStatus,
68
60
  deletePrediction,
@@ -5,8 +5,12 @@ import type { PayPredictionResult } from './types';
5
5
  type PredictionLifecycleDeps = {
6
6
  predictionDb: PredictionDb;
7
7
  casinoBet: Pick<CasinoBetService, 'refundLockedBet' | 'settleCasinoWinnings'>;
8
+ hasSettlementTransactions?: (params: {
9
+ guildId: string;
10
+ referenceIds: string[];
11
+ }) => Promise<boolean>;
8
12
  };
9
- export declare function createPredictionLifecycleService({ predictionDb, casinoBet }: PredictionLifecycleDeps): {
13
+ export declare function createPredictionLifecycleService({ predictionDb, casinoBet, hasSettlementTransactions }: PredictionLifecycleDeps): {
10
14
  endPrediction: ({ predictionId, guildId }: {
11
15
  predictionId: string;
12
16
  guildId: string;
@@ -20,6 +24,16 @@ export declare function createPredictionLifecycleService({ predictionDb, casinoB
20
24
  guildId: string;
21
25
  winnerChoice: string;
22
26
  }) => Promise<PayPredictionResult>;
27
+ resetStuckPayout: ({ predictionId, guildId }: {
28
+ predictionId: string;
29
+ guildId: string;
30
+ }) => Promise<{
31
+ ok: true;
32
+ prediction: TPrediction;
33
+ } | {
34
+ ok: false;
35
+ code: "NOT_FOUND" | "INVALID_STATUS" | "PARTIAL_PAYOUT";
36
+ }>;
23
37
  };
24
38
  export type PredictionLifecycleService = ReturnType<typeof createPredictionLifecycleService>;
25
39
  export {};
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createPredictionLifecycleService = createPredictionLifecycleService;
4
4
  const predictionSummary_1 = require("./predictionSummary");
5
- function createPredictionLifecycleService({ predictionDb, casinoBet }) {
5
+ function createPredictionLifecycleService({ predictionDb, casinoBet, hasSettlementTransactions }) {
6
6
  const { getPredictionById, updatePredictionStatus } = predictionDb;
7
7
  const { refundLockedBet, settleCasinoWinnings } = casinoBet;
8
8
  const finalizePaid = async (predictionId, guildId) => {
@@ -24,6 +24,34 @@ function createPredictionLifecycleService({ predictionDb, casinoBet }) {
24
24
  toStatus: 'ended'
25
25
  });
26
26
  };
27
+ const resetStuckPayout = async ({ predictionId, guildId }) => {
28
+ const prediction = await getPredictionById({ predictionId, guildId });
29
+ if (!prediction)
30
+ return { ok: false, code: 'NOT_FOUND' };
31
+ if (prediction.status !== 'paying') {
32
+ return { ok: false, code: 'INVALID_STATUS' };
33
+ }
34
+ const betIds = prediction.choices
35
+ .flatMap((choice) => choice.bets)
36
+ .map((bet) => (0, predictionSummary_1.resolvePredictionBetId)(bet, predictionId));
37
+ if (betIds.length > 0 && hasSettlementTransactions) {
38
+ const hasSettlement = await hasSettlementTransactions({
39
+ guildId,
40
+ referenceIds: betIds
41
+ });
42
+ if (hasSettlement)
43
+ return { ok: false, code: 'PARTIAL_PAYOUT' };
44
+ }
45
+ const updated = await updatePredictionStatus({
46
+ predictionId,
47
+ guildId,
48
+ fromStatus: 'paying',
49
+ toStatus: 'ended'
50
+ });
51
+ if (!updated)
52
+ return { ok: false, code: 'INVALID_STATUS' };
53
+ return { ok: true, prediction: updated };
54
+ };
27
55
  const endPrediction = async ({ predictionId, guildId }) => {
28
56
  return updatePredictionStatus({
29
57
  predictionId,
@@ -128,6 +156,7 @@ function createPredictionLifecycleService({ predictionDb, casinoBet }) {
128
156
  return {
129
157
  endPrediction,
130
158
  cancelPrediction,
131
- payoutPrediction
159
+ payoutPrediction,
160
+ resetStuckPayout
132
161
  };
133
162
  }
@@ -1,10 +1,6 @@
1
1
  import type { TPrediction, TPredictionOption } from '../types/prediction';
2
2
  export type TCreatePrediction = Omit<TPrediction, 'createdAt' | 'updatedAt'>;
3
3
  export type TGetPrediction = Pick<TPrediction, 'predictionId' | 'guildId'>;
4
- export type TGetOldPredictions = {
5
- statuses: TPrediction['status'][];
6
- olderThanDays: number;
7
- };
8
4
  export type TUpdatePredictionStatus = Pick<TPrediction, 'predictionId' | 'guildId'> & {
9
5
  fromStatus: TPrediction['status'] | TPrediction['status'][];
10
6
  toStatus: TPrediction['status'];
@@ -7,6 +7,8 @@ export declare const STAFF_ADMIN_ACTIONS: {
7
7
  readonly PREDICTION_END: "prediction-end";
8
8
  readonly PREDICTION_PAYOUT: "prediction-payout";
9
9
  readonly PREDICTION_CANCEL: "prediction-cancel";
10
+ readonly PREDICTION_RESET_PAYOUT: "prediction-reset-payout";
11
+ readonly BLACKJACK_FORCE_CLOSE: "blackjack-force-close";
10
12
  readonly ATM_REJECT: "atm-reject";
11
13
  readonly USER_BAN: "user-ban";
12
14
  readonly USER_UNBAN: "user-unban";
@@ -10,6 +10,8 @@ exports.STAFF_ADMIN_ACTIONS = {
10
10
  PREDICTION_END: 'prediction-end',
11
11
  PREDICTION_PAYOUT: 'prediction-payout',
12
12
  PREDICTION_CANCEL: 'prediction-cancel',
13
+ PREDICTION_RESET_PAYOUT: 'prediction-reset-payout',
14
+ BLACKJACK_FORCE_CLOSE: 'blackjack-force-close',
13
15
  ATM_REJECT: 'atm-reject',
14
16
  USER_BAN: 'user-ban',
15
17
  USER_UNBAN: 'user-unban',
@@ -1,8 +1,10 @@
1
+ export type VipExpiryWarningTier = '24h' | '1h';
1
2
  export type TVipRoom = {
2
3
  ownerId: string;
3
4
  guildId: string;
4
5
  channelId: string;
5
6
  expiresAt: Date;
7
+ expiryWarningsSent?: VipExpiryWarningTier[];
6
8
  memberIds: string[];
7
9
  createdAt: Date;
8
10
  updatedAt: Date;
@@ -45,6 +45,15 @@ export declare const VipRoomSchema: Schema<TVipRoom, import("mongoose").Model<TV
45
45
  }, "id"> & {
46
46
  id: string;
47
47
  }> | undefined;
48
+ expiryWarningsSent?: import("mongoose").SchemaDefinitionProperty<import("./types/vipRoom").VipExpiryWarningTier[] | undefined, TVipRoom, import("mongoose").Document<unknown, {}, TVipRoom, {
49
+ id: string;
50
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TVipRoom & {
51
+ _id: import("mongoose").Types.ObjectId;
52
+ } & {
53
+ __v: number;
54
+ }, "id"> & {
55
+ id: string;
56
+ }> | undefined;
48
57
  memberIds?: import("mongoose").SchemaDefinitionProperty<string[], TVipRoom, import("mongoose").Document<unknown, {}, TVipRoom, {
49
58
  id: string;
50
59
  }, import("mongoose").DefaultSchemaOptions> & Omit<TVipRoom & {
@@ -10,6 +10,11 @@ exports.VipRoomSchema = new mongoose_1.Schema({
10
10
  type: [String],
11
11
  default: []
12
12
  },
13
+ expiryWarningsSent: {
14
+ type: [String],
15
+ enum: ['24h', '1h'],
16
+ default: []
17
+ },
13
18
  expiresAt: { type: Date, required: true }
14
19
  }, { timestamps: true });
15
20
  exports.VipRoomSchema.index({ expiresAt: 1 });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gambling-bot-shared",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "license": "MIT",
5
5
  "type": "commonjs",
6
6
  "repository": {