@seedcord/errors 0.0.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 +190 -0
- package/README.md +13 -0
- package/dist/SeedcordError-BOcbWC2t.mjs +353 -0
- package/dist/SeedcordError-BOcbWC2t.mjs.map +1 -0
- package/dist/SeedcordError-BonCdXzc.cjs +410 -0
- package/dist/SeedcordError-BonCdXzc.cjs.map +1 -0
- package/dist/SeedcordError-C4Can_Vo.d.mts +342 -0
- package/dist/index.cjs +12 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.mts +8 -0
- package/dist/index.mjs +9 -0
- package/dist/index.mjs.map +1 -0
- package/dist/internal.index.cjs +6 -0
- package/dist/internal.index.d.cts +1 -0
- package/dist/internal.index.d.mts +2 -0
- package/dist/internal.index.mjs +3 -0
- package/package.json +68 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
Copyright 2025 Dhruv Jain (materwelonDhruv)
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://cdn.seedcord.org/assets/banner.webp" alt="seedcord" width="100%" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
_This repository is a work in progress._
|
|
8
|
+
|
|
9
|
+
- There are no stable releases yet but changes are being made actively.
|
|
10
|
+
- Till a major v1.0.0 release for seedcord, expect breaking changes in minor versions.
|
|
11
|
+
- Documentation will come soon as well!
|
|
12
|
+
|
|
13
|
+
If you'd like to try it out, you can check out the code in `mock`
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
import chalk from "chalk";
|
|
2
|
+
|
|
3
|
+
//#region src/ErrorCodes.ts
|
|
4
|
+
/**
|
|
5
|
+
* All Seedcord error codes.
|
|
6
|
+
*/
|
|
7
|
+
let SeedcordErrorCode = /* @__PURE__ */ function(SeedcordErrorCode) {
|
|
8
|
+
/** DISCORD_BOT_TOKEN is not present in the environment. */
|
|
9
|
+
SeedcordErrorCode[SeedcordErrorCode["ConfigMissingDiscordToken"] = 1001] = "ConfigMissingDiscordToken";
|
|
10
|
+
/** DISCORD_BOT_TOKEN is present but fails validation. */
|
|
11
|
+
SeedcordErrorCode[SeedcordErrorCode["ConfigIncorrectDiscordToken"] = 1004] = "ConfigIncorrectDiscordToken";
|
|
12
|
+
/** UNKNOWN_EXCEPTION_WEBHOOK_URL is missing when configuring the reporter. */
|
|
13
|
+
SeedcordErrorCode[SeedcordErrorCode["ConfigUnknownExceptionWebhookMissing"] = 1002] = "ConfigUnknownExceptionWebhookMissing";
|
|
14
|
+
/** UNKNOWN_EXCEPTION_WEBHOOK_URL is present but fails URL validation. */
|
|
15
|
+
SeedcordErrorCode[SeedcordErrorCode["ConfigUnknownExceptionWebhookInvalid"] = 1003] = "ConfigUnknownExceptionWebhookInvalid";
|
|
16
|
+
/** HANDLED_EXCEPTION_WEBHOOK_URL is missing when configuring the reporter. */
|
|
17
|
+
SeedcordErrorCode[SeedcordErrorCode["ConfigHandledExceptionWebhookMissing"] = 1005] = "ConfigHandledExceptionWebhookMissing";
|
|
18
|
+
/** HANDLED_EXCEPTION_WEBHOOK_URL is present but fails URL validation. */
|
|
19
|
+
SeedcordErrorCode[SeedcordErrorCode["ConfigHandledExceptionWebhookInvalid"] = 1006] = "ConfigHandledExceptionWebhookInvalid";
|
|
20
|
+
/** Attempted to add lifecycle tasks after startup already completed. */
|
|
21
|
+
SeedcordErrorCode[SeedcordErrorCode["LifecycleAddAfterCompletion"] = 1101] = "LifecycleAddAfterCompletion";
|
|
22
|
+
/** Attempted to add lifecycle tasks while startup is still running. */
|
|
23
|
+
SeedcordErrorCode[SeedcordErrorCode["LifecycleAddDuringRun"] = 1102] = "LifecycleAddDuringRun";
|
|
24
|
+
/** Attempted to remove lifecycle tasks while startup is still running. */
|
|
25
|
+
SeedcordErrorCode[SeedcordErrorCode["LifecycleRemoveDuringRun"] = 1103] = "LifecycleRemoveDuringRun";
|
|
26
|
+
/** Provided lifecycle phase identifier is not recognized. */
|
|
27
|
+
SeedcordErrorCode[SeedcordErrorCode["LifecycleUnknownPhase"] = 1104] = "LifecycleUnknownPhase";
|
|
28
|
+
/** Startup phase completed with one or more task failures. */
|
|
29
|
+
SeedcordErrorCode[SeedcordErrorCode["LifecyclePhaseFailures"] = 1105] = "LifecyclePhaseFailures";
|
|
30
|
+
/** A lifecycle task exceeded its configured timeout. */
|
|
31
|
+
SeedcordErrorCode[SeedcordErrorCode["LifecycleTaskTimeout"] = 1106] = "LifecycleTaskTimeout";
|
|
32
|
+
/** Multiple Seedcord instances were created simultaneously. */
|
|
33
|
+
SeedcordErrorCode[SeedcordErrorCode["CoreSingletonViolation"] = 1201] = "CoreSingletonViolation";
|
|
34
|
+
/** Plugins cannot be mutated after the core has finished initializing. */
|
|
35
|
+
SeedcordErrorCode[SeedcordErrorCode["CorePluginAfterInit"] = 1202] = "CorePluginAfterInit";
|
|
36
|
+
/** A plugin tried to register with a key that already exists. */
|
|
37
|
+
SeedcordErrorCode[SeedcordErrorCode["CorePluginKeyExists"] = 1203] = "CorePluginKeyExists";
|
|
38
|
+
/** Bot role lookup failed within the provided guild. */
|
|
39
|
+
SeedcordErrorCode[SeedcordErrorCode["CoreBotRoleMissing"] = 1204] = "CoreBotRoleMissing";
|
|
40
|
+
/** A bot controller was constructed without its required handlers directory. */
|
|
41
|
+
SeedcordErrorCode[SeedcordErrorCode["CoreControllerPathMissing"] = 1205] = "CoreControllerPathMissing";
|
|
42
|
+
/** Interaction middleware decorated with disallowed event filters. */
|
|
43
|
+
SeedcordErrorCode[SeedcordErrorCode["DecoratorInteractionEventFilter"] = 1301] = "DecoratorInteractionEventFilter";
|
|
44
|
+
/** A decorator could not find the original method being decorated. */
|
|
45
|
+
SeedcordErrorCode[SeedcordErrorCode["DecoratorMethodNotFound"] = 1302] = "DecoratorMethodNotFound";
|
|
46
|
+
/** A command decorator attempted to re-register an existing command scope. */
|
|
47
|
+
SeedcordErrorCode[SeedcordErrorCode["DecoratorCommandAlreadyRegistered"] = 1303] = "DecoratorCommandAlreadyRegistered";
|
|
48
|
+
/** A global command decorator specified guild IDs, which is not allowed. */
|
|
49
|
+
SeedcordErrorCode[SeedcordErrorCode["DecoratorCommandGlobalWithGuilds"] = 1304] = "DecoratorCommandGlobalWithGuilds";
|
|
50
|
+
/** A guild command decorator omitted the required guild ID list. */
|
|
51
|
+
SeedcordErrorCode[SeedcordErrorCode["DecoratorCommandGuildWithoutGuilds"] = 1305] = "DecoratorCommandGuildWithoutGuilds";
|
|
52
|
+
/** Middleware priority provided by the decorator was not a finite number. */
|
|
53
|
+
SeedcordErrorCode[SeedcordErrorCode["DecoratorInvalidMiddlewarePriority"] = 1306] = "DecoratorInvalidMiddlewarePriority";
|
|
54
|
+
/** StrictEventEmitter.waitFor was aborted via its AbortSignal. */
|
|
55
|
+
SeedcordErrorCode[SeedcordErrorCode["EventEmitterWaitForAborted"] = 1501] = "EventEmitterWaitForAborted";
|
|
56
|
+
/** StrictEventEmitter.waitFor exceeded its configured timeout. */
|
|
57
|
+
SeedcordErrorCode[SeedcordErrorCode["EventEmitterWaitForTimeout"] = 1502] = "EventEmitterWaitForTimeout";
|
|
58
|
+
/** A customId definition prefix contains a reserved character (a colon or a control char). */
|
|
59
|
+
SeedcordErrorCode[SeedcordErrorCode["CustomIdInvalidPrefix"] = 1601] = "CustomIdInvalidPrefix";
|
|
60
|
+
/** A customId field name is integer-like, which JS would silently reorder. */
|
|
61
|
+
SeedcordErrorCode[SeedcordErrorCode["CustomIdReservedFieldName"] = 1602] = "CustomIdReservedFieldName";
|
|
62
|
+
/** A oneOf() field was declared with no choices. */
|
|
63
|
+
SeedcordErrorCode[SeedcordErrorCode["CustomIdEmptyChoices"] = 1603] = "CustomIdEmptyChoices";
|
|
64
|
+
/** An int() field was declared with min greater than max. */
|
|
65
|
+
SeedcordErrorCode[SeedcordErrorCode["CustomIdInvalidBounds"] = 1604] = "CustomIdInvalidBounds";
|
|
66
|
+
/** A value passed to encode() is outside its field's allowed range. */
|
|
67
|
+
SeedcordErrorCode[SeedcordErrorCode["CustomIdValueOutOfRange"] = 1605] = "CustomIdValueOutOfRange";
|
|
68
|
+
/** An encoded customId exceeds Discord's 100-character limit. */
|
|
69
|
+
SeedcordErrorCode[SeedcordErrorCode["CustomIdWireTooLong"] = 1606] = "CustomIdWireTooLong";
|
|
70
|
+
/** A field name is declared more than once in the same customId chain. */
|
|
71
|
+
SeedcordErrorCode[SeedcordErrorCode["CustomIdDuplicateFieldName"] = 1607] = "CustomIdDuplicateFieldName";
|
|
72
|
+
/** A component handler is missing its route decorator (\@ButtonRoute / \@ModalRoute / \@SelectMenuRoute). */
|
|
73
|
+
SeedcordErrorCode[SeedcordErrorCode["CustomIdHandlerRouteMissing"] = 1608] = "CustomIdHandlerRouteMissing";
|
|
74
|
+
/** match() received a decoded route with no matching arm. */
|
|
75
|
+
SeedcordErrorCode[SeedcordErrorCode["CustomIdMatchArmMissing"] = 1609] = "CustomIdMatchArmMissing";
|
|
76
|
+
/** A slash handler's match() has no arm for the command route that fired. */
|
|
77
|
+
SeedcordErrorCode[SeedcordErrorCode["SlashMatchArmMissing"] = 1610] = "SlashMatchArmMissing";
|
|
78
|
+
/** An autocomplete handler's match() has no arm for the focused field that fired. */
|
|
79
|
+
SeedcordErrorCode[SeedcordErrorCode["AutocompleteMatchArmMissing"] = 1611] = "AutocompleteMatchArmMissing";
|
|
80
|
+
/** An event handler's match() has no arm for the event name that fired. */
|
|
81
|
+
SeedcordErrorCode[SeedcordErrorCode["EventMatchArmMissing"] = 1612] = "EventMatchArmMissing";
|
|
82
|
+
/** Event middleware read `this.eventName` but was constructed without a fired event name. */
|
|
83
|
+
SeedcordErrorCode[SeedcordErrorCode["EventMiddlewareNameUnavailable"] = 1613] = "EventMiddlewareNameUnavailable";
|
|
84
|
+
/** A Cooldown gate was given a duration string that is not a well-formed positive duration. */
|
|
85
|
+
SeedcordErrorCode[SeedcordErrorCode["GateInvalidCooldownDuration"] = 1701] = "GateInvalidCooldownDuration";
|
|
86
|
+
/** Mongo service class is missing the `@RegisterMongoService` decorator. */
|
|
87
|
+
SeedcordErrorCode[SeedcordErrorCode["PluginMongoServiceDecoratorMissing"] = 2101] = "PluginMongoServiceDecoratorMissing";
|
|
88
|
+
/** Mongo model class is missing the `@RegisterMongoModel` decorator. */
|
|
89
|
+
SeedcordErrorCode[SeedcordErrorCode["PluginMongoModelDecoratorMissing"] = 2102] = "PluginMongoModelDecoratorMissing";
|
|
90
|
+
/** Mongo client failed to establish a connection. */
|
|
91
|
+
SeedcordErrorCode[SeedcordErrorCode["PluginMongoConnectionFailed"] = 2103] = "PluginMongoConnectionFailed";
|
|
92
|
+
/** Mongo client failed to disconnect cleanly during shutdown. */
|
|
93
|
+
SeedcordErrorCode[SeedcordErrorCode["PluginMongoDisconnectFailed"] = 2104] = "PluginMongoDisconnectFailed";
|
|
94
|
+
/** Mongo `services` was accessed before the plugin finished initializing. */
|
|
95
|
+
SeedcordErrorCode[SeedcordErrorCode["PluginMongoServicesNotReady"] = 2105] = "PluginMongoServicesNotReady";
|
|
96
|
+
/** KPG service class is missing the `@RegisterKpgService` decorator. */
|
|
97
|
+
SeedcordErrorCode[SeedcordErrorCode["PluginKpgServiceDecoratorMissing"] = 2201] = "PluginKpgServiceDecoratorMissing";
|
|
98
|
+
/** KPG service class is missing its table metadata. */
|
|
99
|
+
SeedcordErrorCode[SeedcordErrorCode["PluginKpgServiceTableMissing"] = 2202] = "PluginKpgServiceTableMissing";
|
|
100
|
+
/** Migration manager received an invalid step count. */
|
|
101
|
+
SeedcordErrorCode[SeedcordErrorCode["PluginKpgInvalidStepCount"] = 2203] = "PluginKpgInvalidStepCount";
|
|
102
|
+
/** Migration direction was not recognized. */
|
|
103
|
+
SeedcordErrorCode[SeedcordErrorCode["PluginKpgUnknownDirection"] = 2204] = "PluginKpgUnknownDirection";
|
|
104
|
+
/** Provided migrations path could not be resolved. */
|
|
105
|
+
SeedcordErrorCode[SeedcordErrorCode["PluginKpgUnresolvedMigrationsPath"] = 2205] = "PluginKpgUnresolvedMigrationsPath";
|
|
106
|
+
/** No migration files were found for execution. */
|
|
107
|
+
SeedcordErrorCode[SeedcordErrorCode["PluginKpgNoMigrationFiles"] = 2206] = "PluginKpgNoMigrationFiles";
|
|
108
|
+
/** A migration module failed to export the expected functions. */
|
|
109
|
+
SeedcordErrorCode[SeedcordErrorCode["PluginKpgInvalidMigrationModule"] = 2207] = "PluginKpgInvalidMigrationModule";
|
|
110
|
+
/** An arbitrary (non-Error) failure was reported by a migration. */
|
|
111
|
+
SeedcordErrorCode[SeedcordErrorCode["PluginKpgNonErrorFailure"] = 2208] = "PluginKpgNonErrorFailure";
|
|
112
|
+
/** Postgres pool failed to close cleanly during shutdown. */
|
|
113
|
+
SeedcordErrorCode[SeedcordErrorCode["PluginKpgDisconnectFailed"] = 2209] = "PluginKpgDisconnectFailed";
|
|
114
|
+
/** KPG `services` was accessed before the plugin finished initializing. */
|
|
115
|
+
SeedcordErrorCode[SeedcordErrorCode["PluginKpgServicesNotReady"] = 2210] = "PluginKpgServicesNotReady";
|
|
116
|
+
/** Config file default export was not an object. */
|
|
117
|
+
SeedcordErrorCode[SeedcordErrorCode["CliConfigInvalidExport"] = 3101] = "CliConfigInvalidExport";
|
|
118
|
+
/** Config is missing the required instance string. */
|
|
119
|
+
SeedcordErrorCode[SeedcordErrorCode["CliConfigMissingInstance"] = 3102] = "CliConfigMissingInstance";
|
|
120
|
+
/** Config root was provided but not a string. */
|
|
121
|
+
SeedcordErrorCode[SeedcordErrorCode["CliConfigInvalidRoot"] = 3103] = "CliConfigInvalidRoot";
|
|
122
|
+
/** Unable to locate a Seedcord config file. */
|
|
123
|
+
SeedcordErrorCode[SeedcordErrorCode["CliConfigNotFound"] = 3104] = "CliConfigNotFound";
|
|
124
|
+
/** CLI entry file does not exist. */
|
|
125
|
+
SeedcordErrorCode[SeedcordErrorCode["CliEntryNotFound"] = 3105] = "CliEntryNotFound";
|
|
126
|
+
/** tsx failed to import the provided entry file. */
|
|
127
|
+
SeedcordErrorCode[SeedcordErrorCode["CliTsxImportFailed"] = 3106] = "CliTsxImportFailed";
|
|
128
|
+
/** Native import and jiti fallback both failed. */
|
|
129
|
+
SeedcordErrorCode[SeedcordErrorCode["CliImportFailed"] = 3107] = "CliImportFailed";
|
|
130
|
+
/** Seedcord instance export is missing a start() method. */
|
|
131
|
+
SeedcordErrorCode[SeedcordErrorCode["CliInstanceInvalid"] = 3108] = "CliInstanceInvalid";
|
|
132
|
+
/** Seedcord instance threw during startup. */
|
|
133
|
+
SeedcordErrorCode[SeedcordErrorCode["CliStartFailed"] = 3109] = "CliStartFailed";
|
|
134
|
+
/** Config is missing the required entry string. */
|
|
135
|
+
SeedcordErrorCode[SeedcordErrorCode["CliConfigMissingEntry"] = 3110] = "CliConfigMissingEntry";
|
|
136
|
+
/** Config build options must be an object when provided. */
|
|
137
|
+
SeedcordErrorCode[SeedcordErrorCode["CliConfigInvalidBuild"] = 3111] = "CliConfigInvalidBuild";
|
|
138
|
+
/** Config build outDir must be a string when provided. */
|
|
139
|
+
SeedcordErrorCode[SeedcordErrorCode["CliConfigInvalidBuildOutDir"] = 3112] = "CliConfigInvalidBuildOutDir";
|
|
140
|
+
/** Config build tsconfig must be a string when provided. */
|
|
141
|
+
SeedcordErrorCode[SeedcordErrorCode["CliConfigInvalidBuildTsconfig"] = 3113] = "CliConfigInvalidBuildTsconfig";
|
|
142
|
+
/** Config build bootstrap must be a string when provided. */
|
|
143
|
+
SeedcordErrorCode[SeedcordErrorCode["CliConfigInvalidBuildBootstrap"] = 3114] = "CliConfigInvalidBuildBootstrap";
|
|
144
|
+
/** Entry file must be inside the configured root directory. */
|
|
145
|
+
SeedcordErrorCode[SeedcordErrorCode["CliConfigEntryOutsideRoot"] = 3115] = "CliConfigEntryOutsideRoot";
|
|
146
|
+
/** Unable to locate a TypeScript config file for builds. */
|
|
147
|
+
SeedcordErrorCode[SeedcordErrorCode["CliBuildTsconfigNotFound"] = 3116] = "CliBuildTsconfigNotFound";
|
|
148
|
+
/** TypeScript reported diagnostics during emit. */
|
|
149
|
+
SeedcordErrorCode[SeedcordErrorCode["CliBuildFailed"] = 3117] = "CliBuildFailed";
|
|
150
|
+
/** Unable to write the generated bootstrap file. */
|
|
151
|
+
SeedcordErrorCode[SeedcordErrorCode["CliBootstrapWriteFailed"] = 3118] = "CliBootstrapWriteFailed";
|
|
152
|
+
/** Config tsconfig must be a string when provided. */
|
|
153
|
+
SeedcordErrorCode[SeedcordErrorCode["CliConfigInvalidTsconfig"] = 3119] = "CliConfigInvalidTsconfig";
|
|
154
|
+
/** Config hmr options must be an object when provided. */
|
|
155
|
+
SeedcordErrorCode[SeedcordErrorCode["CliConfigInvalidHmr"] = 3120] = "CliConfigInvalidHmr";
|
|
156
|
+
/** Config hmr restart patterns must be an array of strings when provided. */
|
|
157
|
+
SeedcordErrorCode[SeedcordErrorCode["CliConfigInvalidHmrRestart"] = 3121] = "CliConfigInvalidHmrRestart";
|
|
158
|
+
/** Two commands resolve to the same slash route during codegen. */
|
|
159
|
+
SeedcordErrorCode[SeedcordErrorCode["CliCodegenDuplicateRoute"] = 3122] = "CliCodegenDuplicateRoute";
|
|
160
|
+
/** The commands directory could not be read during codegen. */
|
|
161
|
+
SeedcordErrorCode[SeedcordErrorCode["CliCodegenCommandsDirUnreadable"] = 3123] = "CliCodegenCommandsDirUnreadable";
|
|
162
|
+
/** Two context-menu commands of the same kind share a name during codegen. */
|
|
163
|
+
SeedcordErrorCode[SeedcordErrorCode["CliCodegenDuplicateContextMenu"] = 3124] = "CliCodegenDuplicateContextMenu";
|
|
164
|
+
return SeedcordErrorCode;
|
|
165
|
+
}({});
|
|
166
|
+
|
|
167
|
+
//#endregion
|
|
168
|
+
//#region src/ErrorMessages.ts
|
|
169
|
+
/** @internal */
|
|
170
|
+
const messages = {
|
|
171
|
+
[1001]: () => "Missing DISCORD_BOT_TOKEN environment variable.",
|
|
172
|
+
[1004]: () => "Invalid DISCORD_BOT_TOKEN value.",
|
|
173
|
+
[1002]: () => "Missing UNKNOWN_EXCEPTION_WEBHOOK_URL environment variable.",
|
|
174
|
+
[1003]: () => "Invalid UNKNOWN_EXCEPTION_WEBHOOK_URL value.",
|
|
175
|
+
[1005]: () => "Missing HANDLED_EXCEPTION_WEBHOOK_URL environment variable.",
|
|
176
|
+
[1006]: () => "Invalid HANDLED_EXCEPTION_WEBHOOK_URL value.",
|
|
177
|
+
[1101]: () => "Cannot add tasks after startup sequence has already completed.",
|
|
178
|
+
[1102]: () => "Cannot add tasks while startup sequence is in progress.",
|
|
179
|
+
[1103]: () => "Cannot remove tasks while startup sequence is in progress.",
|
|
180
|
+
[1104]: (phase) => `Unknown phase: ${String(phase)}.`,
|
|
181
|
+
[1105]: (phase, failures) => `Phase ${phase} completed with ${failures} failed task${failures === 1 ? "" : "s"}.`,
|
|
182
|
+
[1106]: (taskName, timeout) => `Task "${taskName}" timed out after ${timeout}ms.`,
|
|
183
|
+
[1201]: () => "Seedcord can only be instantiated once. Use the existing instance instead.",
|
|
184
|
+
[1202]: () => "Cannot attach a plugin after initialization.",
|
|
185
|
+
[1203]: (key) => `Plugin with key "${key}" already exists.`,
|
|
186
|
+
[1204]: (guildId) => guildId ? `Bot role not found in guild ${guildId}.` : "Bot role not found in guild.",
|
|
187
|
+
[1205]: (controllerName, pathKind) => `${controllerName} was instantiated without a ${pathKind} path.`,
|
|
188
|
+
[1301]: () => "Interaction middleware cannot specify event filters.",
|
|
189
|
+
[1302]: () => "Decorator could not locate the original method. Ensure the method exists before applying the decorator.",
|
|
190
|
+
[1303]: (commandName, existingScope, requestedScope) => `Command "${commandName}" is already registered as a "${existingScope}" command and cannot be re-registered as a "${requestedScope}" command.`,
|
|
191
|
+
[1304]: () => "RegisterCommand(\"global\") cannot have guilds specified.",
|
|
192
|
+
[1305]: () => "RegisterCommand(\"guild\") requires a non-empty guilds array.",
|
|
193
|
+
[1306]: () => "Middleware priority must be a finite number.",
|
|
194
|
+
[1501]: () => "waitFor was aborted via its AbortSignal.",
|
|
195
|
+
[1502]: (timeout) => `waitFor timed out after ${timeout}ms.`,
|
|
196
|
+
[1601]: (prefix) => `customId prefix ${JSON.stringify(prefix)} must be a non-empty string without a colon or control character.`,
|
|
197
|
+
[1602]: (field) => `customId field name ${JSON.stringify(field)} is integer-like, which JS reorders. Use a non-numeric name.`,
|
|
198
|
+
[1603]: (field) => `customId field ${JSON.stringify(field)} uses oneOf() with no choices.`,
|
|
199
|
+
[1604]: (field, min, max) => `customId field ${JSON.stringify(field)} has min ${min} greater than max ${max}.`,
|
|
200
|
+
[1605]: (field, value) => `customId field ${JSON.stringify(field)} got value ${value} outside its allowed range.`,
|
|
201
|
+
[1606]: (length) => `Encoded customId is ${length} characters, Discord allows at most 100.`,
|
|
202
|
+
[1607]: (field) => `customId field ${JSON.stringify(field)} is already defined in this chain.`,
|
|
203
|
+
[1608]: (className) => `${className} is missing its route decorator (@ButtonRoute, @ModalRoute, or @SelectMenuRoute).`,
|
|
204
|
+
[1609]: (prefix) => `match() has no arm for the decoded route ${JSON.stringify(prefix)}.`,
|
|
205
|
+
[1610]: (route) => `match() has no arm for the command route ${JSON.stringify(route)}.`,
|
|
206
|
+
[1611]: (field) => `match() has no arm for the focused field ${JSON.stringify(field)}.`,
|
|
207
|
+
[1612]: (event) => `match() has no arm for the event ${JSON.stringify(event)}.`,
|
|
208
|
+
[1613]: () => `this.eventName is only available on middleware the controller constructed with a fired event name.`,
|
|
209
|
+
[1701]: (input) => `Cooldown duration ${JSON.stringify(input)} is not valid. Pass a number of seconds or a duration string like '30m', '24h', or '500ms'.`,
|
|
210
|
+
[2101]: (className) => `Missing @RegisterMongoService on ${className}.`,
|
|
211
|
+
[2102]: (className) => `Missing @RegisterMongoModel on ${className}.`,
|
|
212
|
+
[2103]: (databaseName) => databaseName ? `Could not connect to MongoDB (${databaseName}).` : "Could not connect to MongoDB.",
|
|
213
|
+
[2104]: () => "Failed to disconnect from MongoDB cleanly during shutdown.",
|
|
214
|
+
[2105]: () => "Mongo services accessed before the plugin finished initializing.",
|
|
215
|
+
[2201]: (className) => `Missing @RegisterKpgService on ${className}.`,
|
|
216
|
+
[2202]: (className) => `Missing table metadata for ${className}. Provide a table via @RegisterKpgService().`,
|
|
217
|
+
[2203]: () => "Migration step count must be a non-negative integer.",
|
|
218
|
+
[2204]: (direction) => `Unknown migration direction: ${String(direction)}.`,
|
|
219
|
+
[2205]: (label) => `Unable to resolve migrations at path: ${label}.`,
|
|
220
|
+
[2206]: () => "No migration files provided.",
|
|
221
|
+
[2207]: (filePath) => `Migration file ${filePath} must export async functions up and down.`,
|
|
222
|
+
[2208]: (message) => `Migration failure: ${message}.`,
|
|
223
|
+
[2209]: () => "Failed to close the Postgres pool cleanly during shutdown.",
|
|
224
|
+
[2210]: () => "KPG services accessed before the plugin finished initializing.",
|
|
225
|
+
[3101]: () => "Config file must default export an object.",
|
|
226
|
+
[3102]: () => "Config must include an `instance` string that points to your Seedcord default export.",
|
|
227
|
+
[3103]: () => "Config `root` must be a string when provided.",
|
|
228
|
+
[3104]: (baseDir, candidates) => `Unable to locate a Seedcord config in ${baseDir}. Searched for ${candidates.join(", ")}.`,
|
|
229
|
+
[3110]: () => "Config must include an `entry` string that points to your startup script.",
|
|
230
|
+
[3111]: () => "Config `build` must be an object when provided.",
|
|
231
|
+
[3112]: () => "Config `build.outDir` must be a string when provided.",
|
|
232
|
+
[3113]: () => "Config `build.tsconfig` must be a string when provided.",
|
|
233
|
+
[3114]: () => "Config `build.bootstrap` must be a string when provided.",
|
|
234
|
+
[3115]: (entryPath, root) => `Entry file ${entryPath} must reside inside configured root ${root}.`,
|
|
235
|
+
[3105]: (entryPath) => `Cannot find entry file at ${entryPath}.`,
|
|
236
|
+
[3106]: (entryPath, reason) => `Failed to import ${entryPath} via tsx: ${reason}.`,
|
|
237
|
+
[3107]: (entryPath, nativeReason, fallbackReason) => `Failed to import ${entryPath}: ${nativeReason}. Fallback via jiti also failed: ${fallbackReason}.`,
|
|
238
|
+
[3108]: () => "Seedcord instance must default export an object with a start() method.",
|
|
239
|
+
[3109]: (instancePath, reason) => `Failed to start Seedcord from ${instancePath}: ${reason}.`,
|
|
240
|
+
[3116]: (hint) => `Unable to resolve a tsconfig for builds (${hint}). Provide build.tsconfig or add tsconfig.build.json / tsconfig.json.`,
|
|
241
|
+
[3117]: (diagnostics) => `TypeScript build failed:\n${diagnostics}`,
|
|
242
|
+
[3118]: (targetPath, reason) => `Failed to write bootstrap file at ${targetPath}: ${reason}.`,
|
|
243
|
+
[3119]: () => "Config `tsconfig` must be a string when provided.",
|
|
244
|
+
[3120]: () => "Config `hmr` must be an object when provided.",
|
|
245
|
+
[3121]: () => "Config `hmr.restart` must be an array of strings when provided.",
|
|
246
|
+
[3122]: (route, firstFile, secondFile) => `Two commands resolve to the same slash route \`${route}\`. Defined in ${firstFile} and ${secondFile}. Rename one.`,
|
|
247
|
+
[3123]: (dir, reason) => `Could not read the commands directory ${dir} during codegen. ${reason}.`,
|
|
248
|
+
[3124]: (kind, name, firstFile, secondFile) => `Two ${kind} context-menu commands share the name \`${name}\`. Defined in ${firstFile} and ${secondFile}. Rename one.`
|
|
249
|
+
};
|
|
250
|
+
/** @internal */
|
|
251
|
+
function formatSeedcordErrorMessage(code, args) {
|
|
252
|
+
const formatter = messages[code];
|
|
253
|
+
return formatter(...args ?? []);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
//#endregion
|
|
257
|
+
//#region src/SeedcordError.ts
|
|
258
|
+
function resolveIdentifier(code) {
|
|
259
|
+
return SeedcordErrorCode[code];
|
|
260
|
+
}
|
|
261
|
+
function resolveCtorInputs(rest) {
|
|
262
|
+
const [maybeArgsOrOptions, maybeOptions] = rest;
|
|
263
|
+
if (Array.isArray(maybeArgsOrOptions)) {
|
|
264
|
+
const result = { args: maybeArgsOrOptions };
|
|
265
|
+
if (maybeOptions !== void 0) result.options = maybeOptions;
|
|
266
|
+
return result;
|
|
267
|
+
}
|
|
268
|
+
const result = { args: void 0 };
|
|
269
|
+
if (maybeArgsOrOptions !== void 0) result.options = maybeArgsOrOptions;
|
|
270
|
+
return result;
|
|
271
|
+
}
|
|
272
|
+
function resolveMessage(code, args) {
|
|
273
|
+
return formatSeedcordErrorMessage(code, args);
|
|
274
|
+
}
|
|
275
|
+
function formatErrorName(name, _identifier, code) {
|
|
276
|
+
return `${chalk.bold.red(name)}[${chalk.gray(code)}]`;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Base class for Seedcord errors.
|
|
280
|
+
*/
|
|
281
|
+
var SeedcordError = class extends Error {
|
|
282
|
+
code;
|
|
283
|
+
identifier;
|
|
284
|
+
type = "SeedcordError";
|
|
285
|
+
constructor(code, ...rest) {
|
|
286
|
+
const { args, options } = resolveCtorInputs(rest);
|
|
287
|
+
const message = resolveMessage(code, args);
|
|
288
|
+
super(message, options);
|
|
289
|
+
this.code = code;
|
|
290
|
+
this.identifier = resolveIdentifier(code);
|
|
291
|
+
this.name = formatErrorName(new.target.name, this.identifier, this.code);
|
|
292
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
293
|
+
if (typeof Error.captureStackTrace === "function") Error.captureStackTrace(this, new.target);
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
/**
|
|
297
|
+
* TypeError class for Seedcord errors.
|
|
298
|
+
*/
|
|
299
|
+
var SeedcordTypeError = class extends TypeError {
|
|
300
|
+
code;
|
|
301
|
+
identifier;
|
|
302
|
+
type = "SeedcordTypeError";
|
|
303
|
+
constructor(code, ...rest) {
|
|
304
|
+
const { args, options } = resolveCtorInputs(rest);
|
|
305
|
+
const message = resolveMessage(code, args);
|
|
306
|
+
super(message, options);
|
|
307
|
+
this.code = code;
|
|
308
|
+
this.identifier = resolveIdentifier(code);
|
|
309
|
+
this.name = formatErrorName(new.target.name, this.identifier, this.code);
|
|
310
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
311
|
+
if (typeof Error.captureStackTrace === "function") Error.captureStackTrace(this, new.target);
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
/**
|
|
315
|
+
* RangeError class for Seedcord errors.
|
|
316
|
+
*/
|
|
317
|
+
var SeedcordRangeError = class extends RangeError {
|
|
318
|
+
code;
|
|
319
|
+
identifier;
|
|
320
|
+
type = "SeedcordRangeError";
|
|
321
|
+
constructor(code, ...rest) {
|
|
322
|
+
const { args, options } = resolveCtorInputs(rest);
|
|
323
|
+
const message = resolveMessage(code, args);
|
|
324
|
+
super(message, options);
|
|
325
|
+
this.code = code;
|
|
326
|
+
this.identifier = resolveIdentifier(code);
|
|
327
|
+
this.name = formatErrorName(new.target.name, this.identifier, this.code);
|
|
328
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
329
|
+
if (typeof Error.captureStackTrace === "function") Error.captureStackTrace(this, new.target);
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
/**
|
|
333
|
+
* Determines whether an unknown value is a Seedcord error, with optional narrowing by class and error code.
|
|
334
|
+
*
|
|
335
|
+
* @param error - The value to inspect.
|
|
336
|
+
* @param type - Optional error class discriminator (Error, TypeError, or RangeError).
|
|
337
|
+
* @param code - Optional {@link SeedcordErrorCode} discriminator to narrow by code.
|
|
338
|
+
* @typeParam Type - What kind of {@link SeedcordErrorTypeString} to filter by.
|
|
339
|
+
* @typeParam Code - The specific {@link SeedcordErrorCode} to filter by.
|
|
340
|
+
*/
|
|
341
|
+
function isSeedcordError(error, type, code) {
|
|
342
|
+
const isSeedcordErrorInstance = error instanceof SeedcordError && error.type === "SeedcordError";
|
|
343
|
+
const isSeedcordTypeErrorInstance = error instanceof SeedcordTypeError && error.type === "SeedcordTypeError";
|
|
344
|
+
const isSeedcordRangeErrorInstance = error instanceof SeedcordRangeError && error.type === "SeedcordRangeError";
|
|
345
|
+
if (!isSeedcordErrorInstance && !isSeedcordTypeErrorInstance && !isSeedcordRangeErrorInstance) return false;
|
|
346
|
+
if (!(type ? type === "SeedcordError" && isSeedcordErrorInstance || type === "SeedcordTypeError" && isSeedcordTypeErrorInstance || type === "SeedcordRangeError" && isSeedcordRangeErrorInstance : true)) return false;
|
|
347
|
+
if (code === void 0) return true;
|
|
348
|
+
return error.code === code;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
//#endregion
|
|
352
|
+
export { SeedcordErrorCode as a, isSeedcordError as i, SeedcordRangeError as n, SeedcordTypeError as r, SeedcordError as t };
|
|
353
|
+
//# sourceMappingURL=SeedcordError-BOcbWC2t.mjs.map
|