@cyberskill/shared 1.46.0 → 1.48.0
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/README.md +12 -18
- package/dist/_tsup-dts-rollup.d.cts +413 -31
- package/dist/_tsup-dts-rollup.d.ts +413 -31
- package/dist/cli.cjs +2136 -1
- package/dist/cli.d.cts +2 -1
- package/dist/cli.d.ts +2 -1
- package/dist/cli.js +2056 -1
- package/dist/configs/commitlint/base.cjs +64 -1
- package/dist/configs/commitlint/base.js +7 -1
- package/dist/configs/eslint/base.cjs +121 -1
- package/dist/configs/eslint/base.js +52 -1
- package/dist/configs/eslint/nestjs.cjs +155 -1
- package/dist/configs/eslint/nestjs.js +85 -1
- package/dist/configs/eslint/nextjs.cjs +155 -1
- package/dist/configs/eslint/nextjs.js +85 -1
- package/dist/configs/eslint/nodejs.cjs +156 -1
- package/dist/configs/eslint/nodejs.js +86 -1
- package/dist/configs/eslint/vite-react.cjs +159 -1
- package/dist/configs/eslint/vite-react.js +89 -1
- package/dist/configs/graphql/graphql-codegen.cjs +125 -1
- package/dist/configs/graphql/graphql-codegen.js +64 -1
- package/dist/configs/graphql/index.cjs +126 -1
- package/dist/configs/graphql/index.js +64 -1
- package/dist/configs/i18n/react/i18next.cjs +80 -1
- package/dist/configs/i18n/react/i18next.js +7 -1
- package/dist/configs/i18n/react/index.cjs +81 -1
- package/dist/configs/i18n/react/index.js +7 -1
- package/dist/configs/index.cjs +232 -1
- package/dist/configs/index.js +166 -1
- package/dist/configs/lint-staged/base.cjs +64 -1
- package/dist/configs/lint-staged/base.js +7 -1
- package/dist/configs/vitest/react/e2e.cjs +128 -1
- package/dist/configs/vitest/react/e2e.js +59 -1
- package/dist/configs/vitest/react/unit.cjs +305 -1
- package/dist/configs/vitest/react/unit.js +228 -1
- package/dist/configs/vitest/react/unit.setup.cjs +60 -1
- package/dist/configs/vitest/react/unit.setup.js +8 -1
- package/dist/constants/index.cjs +678 -1
- package/dist/constants/index.d.cts +31 -1
- package/dist/constants/index.d.ts +31 -1
- package/dist/constants/index.js +469 -1
- package/dist/constants/path.cjs +423 -1
- package/dist/constants/path.d.cts +31 -1
- package/dist/constants/path.d.ts +31 -1
- package/dist/constants/path.js +218 -1
- package/dist/constants/response-status.cjs +313 -1
- package/dist/constants/response-status.js +252 -1
- package/dist/index.cjs +4546 -1
- package/dist/index.d.cts +51 -6
- package/dist/index.d.ts +51 -6
- package/dist/index.js +4133 -1
- package/dist/nodejs/index.cjs +2138 -1
- package/dist/nodejs/index.js +2054 -1
- package/dist/nodejs/mongo.cjs +2137 -1
- package/dist/nodejs/mongo.js +2054 -1
- package/dist/react/apollo-client.cjs +177 -1
- package/dist/react/apollo-client.js +116 -1
- package/dist/react/index.cjs +990 -1
- package/dist/react/index.js +876 -1
- package/dist/react/loading.cjs +301 -1
- package/dist/react/loading.js +216 -1
- package/dist/react/next-intl.cjs +744 -1
- package/dist/react/next-intl.js +655 -1
- package/dist/react/storage.cjs +631 -1
- package/dist/react/storage.js +558 -1
- package/dist/typescript/api-response.cjs +48 -1
- package/dist/typescript/apollo.cjs +48 -1
- package/dist/typescript/command.cjs +68 -1
- package/dist/typescript/command.d.cts +4 -0
- package/dist/typescript/command.d.ts +4 -0
- package/dist/typescript/command.js +7 -1
- package/dist/typescript/config.cjs +48 -1
- package/dist/typescript/fs.cjs +48 -0
- package/dist/typescript/fs.d.cts +1 -0
- package/dist/typescript/fs.d.ts +1 -0
- package/dist/typescript/fs.js +0 -0
- package/dist/typescript/graphql-codegen.cjs +48 -1
- package/dist/typescript/index.cjs +175 -1
- package/dist/typescript/index.d.cts +5 -0
- package/dist/typescript/index.d.ts +5 -0
- package/dist/typescript/index.js +151 -1
- package/dist/typescript/loading.cjs +48 -1
- package/dist/typescript/log.cjs +48 -1
- package/dist/typescript/mongo.cjs +164 -1
- package/dist/typescript/mongo.js +145 -1
- package/dist/typescript/next-intl.cjs +48 -1
- package/dist/typescript/react.cjs +48 -1
- package/dist/typescript/serializer.cjs +48 -1
- package/dist/typescript/string.cjs +48 -1
- package/dist/utils/command.cjs +1387 -1
- package/dist/utils/command.d.cts +2 -0
- package/dist/utils/command.d.ts +2 -0
- package/dist/utils/command.js +1287 -1
- package/dist/utils/common.cjs +300 -1
- package/dist/utils/common.js +219 -1
- package/dist/utils/config.cjs +146 -1
- package/dist/utils/config.js +89 -1
- package/dist/utils/fs.cjs +118 -1
- package/dist/utils/fs.d.cts +4 -1
- package/dist/utils/fs.d.ts +4 -1
- package/dist/utils/fs.js +37 -1
- package/dist/utils/index-nodejs.cjs +1738 -1
- package/dist/utils/index-nodejs.d.cts +15 -5
- package/dist/utils/index-nodejs.d.ts +15 -5
- package/dist/utils/index-nodejs.js +1571 -1
- package/dist/utils/index.cjs +727 -1
- package/dist/utils/index.js +625 -1
- package/dist/utils/log.cjs +330 -1
- package/dist/utils/log.js +269 -1
- package/dist/utils/package.cjs +941 -0
- package/dist/utils/package.d.cts +3 -0
- package/dist/utils/package.d.ts +3 -0
- package/dist/utils/package.js +857 -0
- package/dist/utils/path.cjs +291 -0
- package/dist/utils/path.d.cts +6 -0
- package/dist/utils/path.d.ts +6 -0
- package/dist/utils/path.js +191 -0
- package/dist/utils/serializer.cjs +91 -1
- package/dist/utils/serializer.js +30 -1
- package/dist/utils/storage-client.cjs +349 -1
- package/dist/utils/storage-client.js +276 -1
- package/dist/utils/storage-server.cjs +636 -1
- package/dist/utils/storage-server.d.cts +1 -1
- package/dist/utils/storage-server.d.ts +1 -1
- package/dist/utils/storage-server.js +550 -1
- package/dist/utils/string.cjs +152 -1
- package/dist/utils/string.js +75 -1
- package/dist/utils/validate.cjs +90 -1
- package/dist/utils/validate.js +33 -1
- package/package.json +19 -16
- package/dist/utils/npm-package.cjs +0 -1
- package/dist/utils/npm-package.d.cts +0 -4
- package/dist/utils/npm-package.d.ts +0 -4
- package/dist/utils/npm-package.js +0 -1
|
@@ -1 +1,252 @@
|
|
|
1
|
-
|
|
1
|
+
// src/constants/response-status.ts
|
|
2
|
+
var RESPONSE_STATUS = {
|
|
3
|
+
GRAPHQL_PARSE_FAILED: {
|
|
4
|
+
CODE: "GRAPHQL_PARSE_FAILED",
|
|
5
|
+
MESSAGE: "The GraphQL operation string contains a syntax error."
|
|
6
|
+
},
|
|
7
|
+
GRAPHQL_VALIDATION_FAILED: {
|
|
8
|
+
CODE: "GRAPHQL_VALIDATION_FAILED",
|
|
9
|
+
MESSAGE: "The GraphQL operation is not valid against the server's schema."
|
|
10
|
+
},
|
|
11
|
+
BAD_USER_INPUT: {
|
|
12
|
+
CODE: "BAD_USER_INPUT",
|
|
13
|
+
MESSAGE: "The GraphQL operation includes an invalid value for a field argument."
|
|
14
|
+
},
|
|
15
|
+
PERSISTED_QUERY_NOT_FOUND: {
|
|
16
|
+
CODE: "PERSISTED_QUERY_NOT_FOUND",
|
|
17
|
+
MESSAGE: "A client sent the hash of a query string to execute via automatic persisted queries, but the query was not in the APQ cache."
|
|
18
|
+
},
|
|
19
|
+
PERSISTED_QUERY_NOT_SUPPORTED: {
|
|
20
|
+
CODE: "PERSISTED_QUERY_NOT_SUPPORTED",
|
|
21
|
+
MESSAGE: "A client sent the hash of a query string to execute via automatic persisted queries, but the server has disabled APQ."
|
|
22
|
+
},
|
|
23
|
+
OPERATION_RESOLUTION_FAILURE: {
|
|
24
|
+
CODE: "OPERATION_RESOLUTION_FAILURE",
|
|
25
|
+
MESSAGE: "The request was parsed successfully and is valid against the server's schema, but the server couldn't resolve which operation to run. This occurs when a request containing multiple named operations doesn't specify which operation to run (i.e.,operationName), or if the named operation isn't included in the request."
|
|
26
|
+
},
|
|
27
|
+
CONTINUE: {
|
|
28
|
+
CODE: 100,
|
|
29
|
+
MESSAGE: "Continue"
|
|
30
|
+
},
|
|
31
|
+
SWITCHING_PROTOCOLS: {
|
|
32
|
+
CODE: 101,
|
|
33
|
+
MESSAGE: "Switching Protocols"
|
|
34
|
+
},
|
|
35
|
+
PROCESSING: {
|
|
36
|
+
CODE: 102,
|
|
37
|
+
MESSAGE: "Processing"
|
|
38
|
+
},
|
|
39
|
+
OK: {
|
|
40
|
+
CODE: 200,
|
|
41
|
+
MESSAGE: "OK"
|
|
42
|
+
},
|
|
43
|
+
CREATED: {
|
|
44
|
+
CODE: 201,
|
|
45
|
+
MESSAGE: "Created"
|
|
46
|
+
},
|
|
47
|
+
ACCEPTED: {
|
|
48
|
+
CODE: 202,
|
|
49
|
+
MESSAGE: "Accepted"
|
|
50
|
+
},
|
|
51
|
+
NON_AUTHORITATIVE_INFORMATION: {
|
|
52
|
+
CODE: 203,
|
|
53
|
+
MESSAGE: "Non Authoritative Information"
|
|
54
|
+
},
|
|
55
|
+
NO_CONTENT: {
|
|
56
|
+
CODE: 204,
|
|
57
|
+
MESSAGE: "No Content"
|
|
58
|
+
},
|
|
59
|
+
RESET_CONTENT: {
|
|
60
|
+
CODE: 205,
|
|
61
|
+
MESSAGE: "Reset Content"
|
|
62
|
+
},
|
|
63
|
+
PARTIAL_CONTENT: {
|
|
64
|
+
CODE: 206,
|
|
65
|
+
MESSAGE: "Partial Content"
|
|
66
|
+
},
|
|
67
|
+
MULTI_STATUS: {
|
|
68
|
+
CODE: 207,
|
|
69
|
+
MESSAGE: "Multi-Status"
|
|
70
|
+
},
|
|
71
|
+
MULTIPLE_CHOICES: {
|
|
72
|
+
CODE: 300,
|
|
73
|
+
MESSAGE: "Multiple Choices"
|
|
74
|
+
},
|
|
75
|
+
MOVED_PERMANENTLY: {
|
|
76
|
+
CODE: 301,
|
|
77
|
+
MESSAGE: "Moved Permanently"
|
|
78
|
+
},
|
|
79
|
+
MOVED_TEMPORARILY: {
|
|
80
|
+
CODE: 302,
|
|
81
|
+
MESSAGE: "Moved Temporarily"
|
|
82
|
+
},
|
|
83
|
+
SEE_OTHER: {
|
|
84
|
+
CODE: 303,
|
|
85
|
+
MESSAGE: "See Other"
|
|
86
|
+
},
|
|
87
|
+
NOT_MODIFIED: {
|
|
88
|
+
CODE: 304,
|
|
89
|
+
MESSAGE: "Not Modified"
|
|
90
|
+
},
|
|
91
|
+
USE_PROXY: {
|
|
92
|
+
CODE: 305,
|
|
93
|
+
MESSAGE: "Use Proxy"
|
|
94
|
+
},
|
|
95
|
+
TEMPORARY_REDIRECT: {
|
|
96
|
+
CODE: 307,
|
|
97
|
+
MESSAGE: "Temporary Redirect"
|
|
98
|
+
},
|
|
99
|
+
PERMANENT_REDIRECT: {
|
|
100
|
+
CODE: 308,
|
|
101
|
+
MESSAGE: "Permanent Redirect"
|
|
102
|
+
},
|
|
103
|
+
BAD_REQUEST: {
|
|
104
|
+
CODE: 400,
|
|
105
|
+
MESSAGE: "Bad Request"
|
|
106
|
+
},
|
|
107
|
+
UNAUTHORIZED: {
|
|
108
|
+
CODE: 401,
|
|
109
|
+
MESSAGE: "Unauthorized"
|
|
110
|
+
},
|
|
111
|
+
PAYMENT_REQUIRED: {
|
|
112
|
+
CODE: 402,
|
|
113
|
+
MESSAGE: "Payment Required"
|
|
114
|
+
},
|
|
115
|
+
FORBIDDEN: {
|
|
116
|
+
CODE: 403,
|
|
117
|
+
MESSAGE: "Forbidden"
|
|
118
|
+
},
|
|
119
|
+
NOT_FOUND: {
|
|
120
|
+
CODE: 404,
|
|
121
|
+
MESSAGE: "Not Found"
|
|
122
|
+
},
|
|
123
|
+
METHOD_NOT_ALLOWED: {
|
|
124
|
+
CODE: 405,
|
|
125
|
+
MESSAGE: "Method Not Allowed"
|
|
126
|
+
},
|
|
127
|
+
NOT_ACCEPTABLE: {
|
|
128
|
+
CODE: 406,
|
|
129
|
+
MESSAGE: "Not Acceptable"
|
|
130
|
+
},
|
|
131
|
+
PROXY_AUTHENTICATION_REQUIRED: {
|
|
132
|
+
CODE: 407,
|
|
133
|
+
MESSAGE: "Proxy Authentication Required"
|
|
134
|
+
},
|
|
135
|
+
REQUEST_TIMEOUT: {
|
|
136
|
+
CODE: 408,
|
|
137
|
+
MESSAGE: "Request Timeout"
|
|
138
|
+
},
|
|
139
|
+
CONFLICT: {
|
|
140
|
+
CODE: 409,
|
|
141
|
+
MESSAGE: "Conflict"
|
|
142
|
+
},
|
|
143
|
+
GONE: {
|
|
144
|
+
CODE: 410,
|
|
145
|
+
MESSAGE: "Gone"
|
|
146
|
+
},
|
|
147
|
+
LENGTH_REQUIRED: {
|
|
148
|
+
CODE: 411,
|
|
149
|
+
MESSAGE: "Length Required"
|
|
150
|
+
},
|
|
151
|
+
PRECONDITION_FAILED: {
|
|
152
|
+
CODE: 412,
|
|
153
|
+
MESSAGE: "Precondition Failed"
|
|
154
|
+
},
|
|
155
|
+
REQUEST_TOO_LONG: {
|
|
156
|
+
CODE: 413,
|
|
157
|
+
MESSAGE: "Request Entity Too Large"
|
|
158
|
+
},
|
|
159
|
+
REQUEST_URI_TOO_LONG: {
|
|
160
|
+
CODE: 414,
|
|
161
|
+
MESSAGE: "Request-URI Too Long"
|
|
162
|
+
},
|
|
163
|
+
UNSUPPORTED_MEDIA_TYPE: {
|
|
164
|
+
CODE: 415,
|
|
165
|
+
MESSAGE: "Unsupported Media Type"
|
|
166
|
+
},
|
|
167
|
+
REQUESTED_RANGE_NOT_SATISFIABLE: {
|
|
168
|
+
CODE: 416,
|
|
169
|
+
MESSAGE: "Requested Range Not Satisfiable"
|
|
170
|
+
},
|
|
171
|
+
EXPECTATION_FAILED: {
|
|
172
|
+
CODE: 417,
|
|
173
|
+
MESSAGE: "Expectation Failed"
|
|
174
|
+
},
|
|
175
|
+
IM_A_TEAPOT: {
|
|
176
|
+
CODE: 418,
|
|
177
|
+
MESSAGE: "I'm a teapot"
|
|
178
|
+
},
|
|
179
|
+
INSUFFICIENT_SPACE_ON_RESOURCE: {
|
|
180
|
+
CODE: 419,
|
|
181
|
+
MESSAGE: "Insufficient Space on Resource"
|
|
182
|
+
},
|
|
183
|
+
METHOD_FAILURE: {
|
|
184
|
+
CODE: 420,
|
|
185
|
+
MESSAGE: "Method Failure"
|
|
186
|
+
},
|
|
187
|
+
MISDIRECTED_REQUEST: {
|
|
188
|
+
CODE: 421,
|
|
189
|
+
MESSAGE: "Misdirected Request"
|
|
190
|
+
},
|
|
191
|
+
UNPROCESSABLE_ENTITY: {
|
|
192
|
+
CODE: 422,
|
|
193
|
+
MESSAGE: "Unprocessable Entity"
|
|
194
|
+
},
|
|
195
|
+
LOCKED: {
|
|
196
|
+
CODE: 423,
|
|
197
|
+
MESSAGE: "Locked"
|
|
198
|
+
},
|
|
199
|
+
FAILED_DEPENDENCY: {
|
|
200
|
+
CODE: 424,
|
|
201
|
+
MESSAGE: "Failed Dependency"
|
|
202
|
+
},
|
|
203
|
+
PRECONDITION_REQUIRED: {
|
|
204
|
+
CODE: 428,
|
|
205
|
+
MESSAGE: "Precondition Required"
|
|
206
|
+
},
|
|
207
|
+
TOO_MANY_REQUESTS: {
|
|
208
|
+
CODE: 429,
|
|
209
|
+
MESSAGE: "Too Many Requests"
|
|
210
|
+
},
|
|
211
|
+
REQUEST_HEADER_FIELDS_TOO_LARGE: {
|
|
212
|
+
CODE: 431,
|
|
213
|
+
MESSAGE: "Request Header Fields Too Large"
|
|
214
|
+
},
|
|
215
|
+
UNAVAILABLE_FOR_LEGAL_REASONS: {
|
|
216
|
+
CODE: 451,
|
|
217
|
+
MESSAGE: "Unavailable For Legal Reasons"
|
|
218
|
+
},
|
|
219
|
+
INTERNAL_SERVER_ERROR: {
|
|
220
|
+
CODE: 500,
|
|
221
|
+
MESSAGE: "Internal Server Error"
|
|
222
|
+
},
|
|
223
|
+
NOT_IMPLEMENTED: {
|
|
224
|
+
CODE: 501,
|
|
225
|
+
MESSAGE: "Not Implemented"
|
|
226
|
+
},
|
|
227
|
+
BAD_GATEWAY: {
|
|
228
|
+
CODE: 502,
|
|
229
|
+
MESSAGE: "Bad Gateway"
|
|
230
|
+
},
|
|
231
|
+
SERVICE_UNAVAILABLE: {
|
|
232
|
+
CODE: 503,
|
|
233
|
+
MESSAGE: "Service Unavailable"
|
|
234
|
+
},
|
|
235
|
+
GATEWAY_TIMEOUT: {
|
|
236
|
+
CODE: 504,
|
|
237
|
+
MESSAGE: "Gateway Timeout"
|
|
238
|
+
},
|
|
239
|
+
HTTP_VERSION_NOT_SUPPORTED: {
|
|
240
|
+
CODE: 505,
|
|
241
|
+
MESSAGE: "HTTP Version Not Supported"
|
|
242
|
+
},
|
|
243
|
+
INSUFFICIENT_STORAGE: {
|
|
244
|
+
CODE: 507,
|
|
245
|
+
MESSAGE: "Insufficient Storage"
|
|
246
|
+
},
|
|
247
|
+
NETWORK_AUTHENTICATION_REQUIRED: {
|
|
248
|
+
CODE: 511,
|
|
249
|
+
MESSAGE: "Network Authentication Required"
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
export { RESPONSE_STATUS };
|