@m1cro/server-sdk 0.1.1-beta.8 → 1.0.0-beta.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/dist/globals.d.ts +2 -8
- package/dist/index.d.ts +167 -6
- package/dist/index.js +1 -1
- package/dist/{bridge-BD4H31JR.d.ts → log-DK4k_SQB.d.ts} +156 -104
- package/package.json +24 -6
package/dist/globals.d.ts
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
|
+
import { B as Bridge, L as LogLevel } from './log-DK4k_SQB.js';
|
|
1
2
|
import * as console from 'node:console';
|
|
2
|
-
import { B as Bridge } from './bridge-BD4H31JR.js';
|
|
3
3
|
import 'cookie';
|
|
4
4
|
|
|
5
|
-
declare const logLevels: readonly ["trace", "debug", "info", "warn", "error", "none"];
|
|
6
|
-
type LogLevel = (typeof logLevels)[number];
|
|
7
|
-
|
|
8
|
-
interface M1cro {
|
|
9
|
-
bridge: Bridge;
|
|
10
|
-
}
|
|
11
5
|
declare global {
|
|
12
|
-
var
|
|
6
|
+
var Bridge: Bridge;
|
|
13
7
|
interface Console extends console.Console {
|
|
14
8
|
logLevel: LogLevel;
|
|
15
9
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,38 @@
|
|
|
1
|
-
import { R as Router,
|
|
2
|
-
export {
|
|
3
|
-
import { JSONSchema4 } from 'json-schema';
|
|
1
|
+
import { E as EntitySchema, G as GeneratedFields, C as CompiledSchema, F as Filter, a as FindQuery, H as HydratedDocument, b as FindOneQuery, I as InsertDocument, c as InsertQuery, d as InsertOneQuery, U as UpdateQuery, e as InferInterface, f as UpdateOneQuery, R as RemoveQuery, g as RemoveOneQuery, h as Router, i as HookEventMap, A as AppRole, j as EventHandler } from './log-DK4k_SQB.js';
|
|
2
|
+
export { k as AppId, l as Artifacts, m as Auth, B as Bridge, n as Entity, o as InferSchema, L as LogLevel, M as Method, p as Middleware, N as Namespace, P as Provider, q as Providers, r as Request, s as RequestBuilder, t as RequestHandler, u as Response, v as ResponseBuilder, w as RouteOptions, S as Sorting, x as StatusCode, y as Subject, T as Tenant, V as Visibility, z as entitySchema } from './log-DK4k_SQB.js';
|
|
4
3
|
import 'cookie';
|
|
5
4
|
|
|
5
|
+
declare function entityModel<S extends EntitySchema<any>>(name: string, schemaDef: S, options?: EntityModelOptions<S>): EntityModel<S>;
|
|
6
|
+
interface EntityModelRegistration {
|
|
7
|
+
get name(): string;
|
|
8
|
+
get schema(): {
|
|
9
|
+
get shape(): unknown;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
declare class EntityModel<S extends EntitySchema<any>> implements EntityModelRegistration {
|
|
13
|
+
readonly name: string;
|
|
14
|
+
readonly schemaDef: S;
|
|
15
|
+
readonly options?: EntityModelOptions<S> | undefined;
|
|
16
|
+
schema: CompiledSchema;
|
|
17
|
+
constructor(name: string, schemaDef: S, options?: EntityModelOptions<S> | undefined);
|
|
18
|
+
private entity;
|
|
19
|
+
find(filter?: Filter): FindQuery<HydratedDocument<S>>;
|
|
20
|
+
findOne(filter?: Filter): FindOneQuery<HydratedDocument<S>>;
|
|
21
|
+
insert(docs: InsertDocument<S>[]): InsertQuery<InsertDocument<S>, 'insertedIds'>;
|
|
22
|
+
insertOne(doc: InsertDocument<S>): InsertOneQuery<InsertDocument<S>, 'insertedId'>;
|
|
23
|
+
update(filter: Filter, update: Record<string, unknown>): UpdateQuery<InferInterface<S>, 'affectedRows'>;
|
|
24
|
+
updateOne(filter: Filter, update: Record<string, unknown>): UpdateOneQuery<InferInterface<S>, 'success'>;
|
|
25
|
+
remove(filter: Filter): RemoveQuery<InferInterface<S>, 'affectedRows'>;
|
|
26
|
+
removeOne(filter: Filter): RemoveOneQuery<InferInterface<S>, 'success'>;
|
|
27
|
+
}
|
|
28
|
+
interface EntityModelOptions<S extends EntitySchema<any>> {
|
|
29
|
+
indexes?: EntityIndexManifest<S>[];
|
|
30
|
+
}
|
|
31
|
+
interface EntityIndexManifest<S extends EntitySchema<any>> {
|
|
32
|
+
fields: Array<keyof GeneratedFields | keyof S['definition']>;
|
|
33
|
+
unique?: boolean | undefined;
|
|
34
|
+
}
|
|
35
|
+
|
|
6
36
|
type EntryPoint = (app: App) => unknown;
|
|
7
37
|
interface App {
|
|
8
38
|
get router(): Router;
|
|
@@ -12,7 +42,7 @@ interface App {
|
|
|
12
42
|
capabilities(capabilities: {
|
|
13
43
|
[app: string]: string[];
|
|
14
44
|
}): App;
|
|
15
|
-
entity(
|
|
45
|
+
entity(model: EntityModelRegistration): App;
|
|
16
46
|
subscribe(pattern: string, handler: EventHandler): App;
|
|
17
47
|
}
|
|
18
48
|
|
|
@@ -21,6 +51,137 @@ declare const _default: {
|
|
|
21
51
|
decode<T>(data: Uint8Array): T;
|
|
22
52
|
};
|
|
23
53
|
|
|
24
|
-
|
|
54
|
+
interface ErrorPayload {
|
|
55
|
+
status: number;
|
|
56
|
+
code: string;
|
|
57
|
+
msg?: string | undefined;
|
|
58
|
+
}
|
|
59
|
+
declare class BaseError extends Error {
|
|
60
|
+
protected payload: ErrorPayload;
|
|
61
|
+
constructor(payload: ErrorPayload);
|
|
62
|
+
status(status: number): this;
|
|
63
|
+
code(code: string): this;
|
|
64
|
+
msg(msg: string): this;
|
|
65
|
+
}
|
|
66
|
+
declare class BadRequestError extends BaseError {
|
|
67
|
+
constructor(msg?: string);
|
|
68
|
+
}
|
|
69
|
+
declare class UnauthorizedError extends BaseError {
|
|
70
|
+
constructor(msg?: string);
|
|
71
|
+
}
|
|
72
|
+
declare class PaymentRequiredError extends BaseError {
|
|
73
|
+
constructor(msg?: string);
|
|
74
|
+
}
|
|
75
|
+
declare class ForbiddenError extends BaseError {
|
|
76
|
+
constructor(msg?: string);
|
|
77
|
+
}
|
|
78
|
+
declare class NotFoundError extends BaseError {
|
|
79
|
+
constructor(msg?: string);
|
|
80
|
+
}
|
|
81
|
+
declare class MethodNotAllowedError extends BaseError {
|
|
82
|
+
constructor(msg?: string);
|
|
83
|
+
}
|
|
84
|
+
declare class NotAcceptableError extends BaseError {
|
|
85
|
+
constructor(msg?: string);
|
|
86
|
+
}
|
|
87
|
+
declare class ProxyAuthenticationRequiredError extends BaseError {
|
|
88
|
+
constructor(msg?: string);
|
|
89
|
+
}
|
|
90
|
+
declare class RequestTimeoutError extends BaseError {
|
|
91
|
+
constructor(msg?: string);
|
|
92
|
+
}
|
|
93
|
+
declare class ConflictError extends BaseError {
|
|
94
|
+
constructor(msg?: string);
|
|
95
|
+
}
|
|
96
|
+
declare class GoneError extends BaseError {
|
|
97
|
+
constructor(msg?: string);
|
|
98
|
+
}
|
|
99
|
+
declare class LengthRequiredError extends BaseError {
|
|
100
|
+
constructor(msg?: string);
|
|
101
|
+
}
|
|
102
|
+
declare class PreconditionFailedError extends BaseError {
|
|
103
|
+
constructor(msg?: string);
|
|
104
|
+
}
|
|
105
|
+
declare class ContentTooLargeError extends BaseError {
|
|
106
|
+
constructor(msg?: string);
|
|
107
|
+
}
|
|
108
|
+
declare class URITooLongError extends BaseError {
|
|
109
|
+
constructor(msg?: string);
|
|
110
|
+
}
|
|
111
|
+
declare class UnsupportedMediaTypeError extends BaseError {
|
|
112
|
+
constructor(msg?: string);
|
|
113
|
+
}
|
|
114
|
+
declare class RangeNotSatisfiableError extends BaseError {
|
|
115
|
+
constructor(msg?: string);
|
|
116
|
+
}
|
|
117
|
+
declare class ExpectationFailedError extends BaseError {
|
|
118
|
+
constructor(msg?: string);
|
|
119
|
+
}
|
|
120
|
+
declare class ImATeapotError extends BaseError {
|
|
121
|
+
constructor(msg?: string);
|
|
122
|
+
}
|
|
123
|
+
declare class MisdirectedRequestError extends BaseError {
|
|
124
|
+
constructor(msg?: string);
|
|
125
|
+
}
|
|
126
|
+
declare class UnprocessableEntityError extends BaseError {
|
|
127
|
+
constructor(msg?: string);
|
|
128
|
+
}
|
|
129
|
+
declare class LockedError extends BaseError {
|
|
130
|
+
constructor(msg?: string);
|
|
131
|
+
}
|
|
132
|
+
declare class FailedDependencyError extends BaseError {
|
|
133
|
+
constructor(msg?: string);
|
|
134
|
+
}
|
|
135
|
+
declare class TooEarlyError extends BaseError {
|
|
136
|
+
constructor(msg?: string);
|
|
137
|
+
}
|
|
138
|
+
declare class UpgradeRequiredError extends BaseError {
|
|
139
|
+
constructor(msg?: string);
|
|
140
|
+
}
|
|
141
|
+
declare class PreconditionRequiredError extends BaseError {
|
|
142
|
+
constructor(msg?: string);
|
|
143
|
+
}
|
|
144
|
+
declare class TooManyRequestsError extends BaseError {
|
|
145
|
+
constructor(msg?: string);
|
|
146
|
+
}
|
|
147
|
+
declare class RequestHeaderFieldsTooLargeError extends BaseError {
|
|
148
|
+
constructor(msg?: string);
|
|
149
|
+
}
|
|
150
|
+
declare class UnavailableForLegalReasonsError extends BaseError {
|
|
151
|
+
constructor(msg?: string);
|
|
152
|
+
}
|
|
153
|
+
declare class InternalServerError extends BaseError {
|
|
154
|
+
constructor(msg?: string);
|
|
155
|
+
}
|
|
156
|
+
declare class NotImplementedError extends BaseError {
|
|
157
|
+
constructor(msg?: string);
|
|
158
|
+
}
|
|
159
|
+
declare class BadGatewayError extends BaseError {
|
|
160
|
+
constructor(msg?: string);
|
|
161
|
+
}
|
|
162
|
+
declare class ServiceUnavailableError extends BaseError {
|
|
163
|
+
constructor(msg?: string);
|
|
164
|
+
}
|
|
165
|
+
declare class GatewayTimeoutError extends BaseError {
|
|
166
|
+
constructor(msg?: string);
|
|
167
|
+
}
|
|
168
|
+
declare class HTTPVersionNotSupportedError extends BaseError {
|
|
169
|
+
constructor(msg?: string);
|
|
170
|
+
}
|
|
171
|
+
declare class VariantAlsoNegotiatesError extends BaseError {
|
|
172
|
+
constructor(msg?: string);
|
|
173
|
+
}
|
|
174
|
+
declare class InsufficientStorageError extends BaseError {
|
|
175
|
+
constructor(msg?: string);
|
|
176
|
+
}
|
|
177
|
+
declare class LoopDetectedError extends BaseError {
|
|
178
|
+
constructor(msg?: string);
|
|
179
|
+
}
|
|
180
|
+
declare class NotExtendedError extends BaseError {
|
|
181
|
+
constructor(msg?: string);
|
|
182
|
+
}
|
|
183
|
+
declare class NetworkAuthenticationRequiredError extends BaseError {
|
|
184
|
+
constructor(msg?: string);
|
|
185
|
+
}
|
|
25
186
|
|
|
26
|
-
export { type App, AppRole,
|
|
187
|
+
export { type App, AppRole, BadGatewayError, BadRequestError, BaseError, ConflictError, ContentTooLargeError, type EntityIndexManifest, EntityModel, type EntityModelOptions, EntitySchema, type EntryPoint, EventHandler, ExpectationFailedError, FailedDependencyError, Filter, ForbiddenError, GatewayTimeoutError, GoneError, HTTPVersionNotSupportedError, HydratedDocument, ImATeapotError, InferInterface, InsertDocument, InsufficientStorageError, InternalServerError, LengthRequiredError, LockedError, LoopDetectedError, MethodNotAllowedError, MisdirectedRequestError, NetworkAuthenticationRequiredError, NotAcceptableError, NotExtendedError, NotFoundError, NotImplementedError, PaymentRequiredError, PreconditionFailedError, PreconditionRequiredError, ProxyAuthenticationRequiredError, RangeNotSatisfiableError, RequestHeaderFieldsTooLargeError, RequestTimeoutError, Router, ServiceUnavailableError, TooEarlyError, TooManyRequestsError, URITooLongError, UnauthorizedError, UnavailableForLegalReasonsError, UnprocessableEntityError, UnsupportedMediaTypeError, UpgradeRequiredError, VariantAlsoNegotiatesError, _default as cbor, entityModel };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as s from'cbor2';var $={encode(r){return s.encode(r)},decode(r){return s.decode(r)}};function S(r){return new i(r)}var i=class{constructor(t){this.definition=t;}},p=class{constructor(t){}get shape(){return {}}};function C(r,t,o){return new a(r,t,o)}var a=class{constructor(t,o,re){this.name=t;this.schemaDef=o;this.options=re;this.schema=new p(o);}schema;entity(){return globalThis.Bridge.entity(this.name)}find(t){return this.entity().find(t)}findOne(t){return this.entity().findOne(t)}insert(t){return this.entity().insert(t)}insertOne(t){return this.entity().insertOne(t)}update(t,o){return this.entity().update(t,o)}updateOne(t,o){return this.entity().updateOne(t,o)}remove(t){return this.entity().remove(t)}removeOne(t){return this.entity().removeOne(t)}};var d=(e=>(e[e.Continue=100]="Continue",e[e.SwitchingProtocols=101]="SwitchingProtocols",e[e.Processing=102]="Processing",e[e.EarlyHints=103]="EarlyHints",e[e.OK=200]="OK",e[e.Created=201]="Created",e[e.Accepted=202]="Accepted",e[e.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",e[e.NoContent=204]="NoContent",e[e.ResetContent=205]="ResetContent",e[e.PartialContent=206]="PartialContent",e[e.MultiStatus=207]="MultiStatus",e[e.AlreadyReported=208]="AlreadyReported",e[e.IMUsed=226]="IMUsed",e[e.MultipleChoices=300]="MultipleChoices",e[e.MovedPermanently=301]="MovedPermanently",e[e.Found=302]="Found",e[e.SeeOther=303]="SeeOther",e[e.NotModified=304]="NotModified",e[e.UseProxy=305]="UseProxy",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect",e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.PaymentRequired=402]="PaymentRequired",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.MethodNotAllowed=405]="MethodNotAllowed",e[e.NotAcceptable=406]="NotAcceptable",e[e.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",e[e.RequestTimeout=408]="RequestTimeout",e[e.Conflict=409]="Conflict",e[e.Gone=410]="Gone",e[e.LengthRequired=411]="LengthRequired",e[e.PreconditionFailed=412]="PreconditionFailed",e[e.ContentTooLarge=413]="ContentTooLarge",e[e.URITooLong=414]="URITooLong",e[e.UnsupportedMediaType=415]="UnsupportedMediaType",e[e.RangeNotSatisfiable=416]="RangeNotSatisfiable",e[e.ExpectationFailed=417]="ExpectationFailed",e[e.ImATeapot=418]="ImATeapot",e[e.MisdirectedRequest=421]="MisdirectedRequest",e[e.UnprocessableEntity=422]="UnprocessableEntity",e[e.Locked=423]="Locked",e[e.FailedDependency=424]="FailedDependency",e[e.TooEarly=425]="TooEarly",e[e.UpgradeRequired=426]="UpgradeRequired",e[e.PreconditionRequired=428]="PreconditionRequired",e[e.TooManyRequests=429]="TooManyRequests",e[e.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",e[e.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",e[e.InternalServerError=500]="InternalServerError",e[e.NotImplemented=501]="NotImplemented",e[e.BadGateway=502]="BadGateway",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout",e[e.HTTPVersionNotSupported=505]="HTTPVersionNotSupported",e[e.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",e[e.InsufficientStorage=507]="InsufficientStorage",e[e.LoopDetected=508]="LoopDetected",e[e.NotExtended=510]="NotExtended",e[e.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired",e))(d||{});var n=class extends Error{constructor(o){super(o.msg);this.payload=o;}status(o){return this.payload.status=o,this}code(o){return this.payload.code=o,this}msg(o){return this.payload.msg=o,this}},l=class extends n{constructor(t){super({status:400,code:"bad_request",msg:t});}},u=class extends n{constructor(t){super({status:401,code:"unauthorized",msg:t});}},y=class extends n{constructor(t){super({status:402,code:"payment_required",msg:t});}},m=class extends n{constructor(t){super({status:403,code:"forbidden",msg:t});}},g=class extends n{constructor(t){super({status:404,code:"not_found",msg:t});}},x=class extends n{constructor(t){super({status:405,code:"method_not_allowed",msg:t});}},f=class extends n{constructor(t){super({status:406,code:"not_acceptable",msg:t});}},h=class extends n{constructor(t){super({status:407,code:"proxy_authentication_required",msg:t});}},R=class extends n{constructor(t){super({status:408,code:"request_timeout",msg:t});}},I=class extends n{constructor(t){super({status:409,code:"conflict",msg:t});}},b=class extends n{constructor(t){super({status:410,code:"gone",msg:t});}},v=class extends n{constructor(t){super({status:411,code:"length_required",msg:t});}},T=class extends n{constructor(t){super({status:412,code:"precondition_failed",msg:t});}},_=class extends n{constructor(t){super({status:413,code:"content_too_large",msg:t});}},P=class extends n{constructor(t){super({status:414,code:"uri_too_long",msg:t});}},q=class extends n{constructor(t){super({status:415,code:"unsupported_media_type",msg:t});}},A=class extends n{constructor(t){super({status:416,code:"range_not_satisfiable",msg:t});}},M=class extends n{constructor(t){super({status:417,code:"expectation_failed",msg:t});}},E=class extends n{constructor(t){super({status:418,code:"im_a_teapot",msg:t});}},O=class extends n{constructor(t){super({status:421,code:"misdirected_request",msg:t});}},w=class extends n{constructor(t){super({status:422,code:"unprocessable_entity",msg:t});}},k=class extends n{constructor(t){super({status:423,code:"locked",msg:t});}},F=class extends n{constructor(t){super({status:424,code:"failed_dependency",msg:t});}},D=class extends n{constructor(t){super({status:425,code:"too_early",msg:t});}},U=class extends n{constructor(t){super({status:426,code:"upgrade_required",msg:t});}},H=class extends n{constructor(t){super({status:428,code:"precondition_required",msg:t});}},N=class extends n{constructor(t){super({status:429,code:"too_many_requests",msg:t});}},Q=class extends n{constructor(t){super({status:431,code:"request_header_fields_too_large",msg:t});}},L=class extends n{constructor(t){super({status:451,code:"unavailable_for_legal_reasons",msg:t});}},B=class extends n{constructor(t){super({status:500,code:"internal_server_error",msg:t});}},j=class extends n{constructor(t){super({status:501,code:"not_implemented",msg:t});}},V=class extends n{constructor(t){super({status:502,code:"bad_gateway",msg:t});}},G=class extends n{constructor(t){super({status:503,code:"service_unavailable",msg:t});}},K=class extends n{constructor(t){super({status:504,code:"gateway_timeout",msg:t});}},z=class extends n{constructor(t){super({status:505,code:"http_version_not_supported",msg:t});}},J=class extends n{constructor(t){super({status:506,code:"variant_also_negotiates",msg:t});}},W=class extends n{constructor(t){super({status:507,code:"insufficient_storage",msg:t});}},X=class extends n{constructor(t){super({status:508,code:"loop_detected",msg:t});}},Y=class extends n{constructor(t){super({status:510,code:"not_extended",msg:t});}},Z=class extends n{constructor(t){super({status:511,code:"network_authentication_required",msg:t});}};var c={get instance(){return globalThis.__M1CRO__.internals}};var ee={fromId(r){return c.instance.providerFromId(r)}};var te={parse(r){return c.instance.parseAppId(r)}};export{te as AppId,V as BadGatewayError,l as BadRequestError,n as BaseError,I as ConflictError,_ as ContentTooLargeError,a as EntityModel,i as EntitySchema,M as ExpectationFailedError,F as FailedDependencyError,m as ForbiddenError,K as GatewayTimeoutError,b as GoneError,z as HTTPVersionNotSupportedError,E as ImATeapotError,W as InsufficientStorageError,B as InternalServerError,v as LengthRequiredError,k as LockedError,X as LoopDetectedError,x as MethodNotAllowedError,O as MisdirectedRequestError,Z as NetworkAuthenticationRequiredError,f as NotAcceptableError,Y as NotExtendedError,g as NotFoundError,j as NotImplementedError,y as PaymentRequiredError,T as PreconditionFailedError,H as PreconditionRequiredError,ee as Provider,h as ProxyAuthenticationRequiredError,A as RangeNotSatisfiableError,Q as RequestHeaderFieldsTooLargeError,R as RequestTimeoutError,G as ServiceUnavailableError,d as StatusCode,D as TooEarlyError,N as TooManyRequestsError,P as URITooLongError,u as UnauthorizedError,L as UnavailableForLegalReasonsError,w as UnprocessableEntityError,q as UnsupportedMediaTypeError,U as UpgradeRequiredError,J as VariantAlsoNegotiatesError,$ as cbor,C as entityModel,S as entitySchema};
|
|
@@ -1,91 +1,66 @@
|
|
|
1
1
|
import { SetCookie } from 'cookie';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
aesGcmDecrypt<T>(data: Uint8Array): T;
|
|
7
|
-
argon2Hash(algorithm: Argon2Algorithm, password: string, options?: Argon2Options): string;
|
|
8
|
-
argon2Verify(algorithm: Argon2Algorithm, password: string, hash: string, options?: Argon2Options): boolean;
|
|
9
|
-
}
|
|
10
|
-
type Argon2Algorithm = 'argon2d' | 'argon2i' | 'argon2id';
|
|
11
|
-
interface Argon2Options {
|
|
12
|
-
mCost?: number;
|
|
13
|
-
tCost?: number;
|
|
14
|
-
pCost?: number;
|
|
15
|
-
outputLen?: number;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
type Record$1<K extends string | number | symbol = string, V = any> = {
|
|
19
|
-
[key in K]: V;
|
|
20
|
-
};
|
|
21
|
-
type Variant<K extends PropertyKey, T extends object> = {
|
|
22
|
-
[P in keyof T]: {
|
|
23
|
-
[Q in K]: P;
|
|
24
|
-
} & T[P] extends infer U ? {
|
|
25
|
-
[Q in keyof U]: U[Q];
|
|
26
|
-
} : never;
|
|
27
|
-
}[keyof T];
|
|
28
|
-
type EventHandler = <T>(event: string, data: T) => void | Promise<void>;
|
|
29
|
-
type Visibility = 'private' | 'platform' | 'vendor' | 'public';
|
|
30
|
-
interface Tenant {
|
|
3
|
+
type Filter = Record<string, unknown>;
|
|
4
|
+
type Sorting$1 = Record<string, 'asc' | 'desc'>;
|
|
5
|
+
type GeneratedFields = {
|
|
31
6
|
id: string;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
interface AppId {
|
|
35
|
-
get name(): string;
|
|
36
|
-
get namespace(): Namespace;
|
|
37
|
-
toString(separator?: string): string;
|
|
38
|
-
}
|
|
39
|
-
declare const AppId: {
|
|
40
|
-
parse(input: string): AppId;
|
|
7
|
+
createdAt: number;
|
|
8
|
+
updatedAt: number;
|
|
41
9
|
};
|
|
42
|
-
type
|
|
43
|
-
|
|
10
|
+
type ReservedKeys = keyof GeneratedFields;
|
|
11
|
+
type HydratedDocument<S extends EntitySchema<any>> = Omit<InferInterface<S>, ReservedKeys> & GeneratedFields;
|
|
12
|
+
type InsertDocument<S extends EntitySchema<any>> = Omit<InferInterface<S>, ReservedKeys> & Partial<GeneratedFields>;
|
|
13
|
+
type ScalarConstructor = StringConstructor | NumberConstructor | BooleanConstructor | DateConstructor | ObjectConstructor;
|
|
14
|
+
type ArraySpec = readonly [FieldSpec];
|
|
15
|
+
type InnerSpec = ScalarConstructor | ArraySpec | SchemaDefinition;
|
|
16
|
+
type FieldSpec = InnerSpec | {
|
|
17
|
+
type: InnerSpec;
|
|
18
|
+
required?: boolean;
|
|
44
19
|
};
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
20
|
+
interface SchemaDefinition {
|
|
21
|
+
[key: string]: FieldSpec;
|
|
22
|
+
}
|
|
23
|
+
type ConstructorToType<T> = T extends StringConstructor ? string : T extends NumberConstructor ? number : T extends BooleanConstructor ? boolean : T extends DateConstructor ? number : T extends ObjectConstructor ? Record<string, unknown> : never;
|
|
24
|
+
type IsOptional<F> = F extends {
|
|
25
|
+
required: false;
|
|
26
|
+
} ? true : false;
|
|
27
|
+
type RequiredKeys<Def extends SchemaDefinition> = {
|
|
28
|
+
[K in keyof Def]-?: IsOptional<Def[K]> extends false ? K : never;
|
|
29
|
+
}[keyof Def];
|
|
30
|
+
type OptionalKeys<Def extends SchemaDefinition> = Exclude<keyof Def, RequiredKeys<Def>>;
|
|
31
|
+
type InferInterface<S extends EntitySchema<any>> = InferSchema<S['definition']>;
|
|
32
|
+
type AssertNoReservedKeys<Def extends SchemaDefinition> = Extract<keyof Def, ReservedKeys> extends never ? Def : never;
|
|
33
|
+
type Unwrap<F> = F extends {
|
|
34
|
+
type: infer I;
|
|
35
|
+
} ? I : F;
|
|
36
|
+
type InferInner<I> = I extends ScalarConstructor ? ConstructorToType<I> : I extends readonly [infer U] ? U extends FieldSpec ? Array<InferField<U>> : never : I extends SchemaDefinition ? InferSchema<I> : never;
|
|
37
|
+
type InferField<F extends FieldSpec> = InferInner<Unwrap<F>>;
|
|
38
|
+
type InferSchema<Def extends SchemaDefinition> = {
|
|
39
|
+
[K in OptionalKeys<Def>]?: InferField<Def[K]> | undefined;
|
|
40
|
+
} & {
|
|
41
|
+
[K in RequiredKeys<Def>]: InferField<Def[K]>;
|
|
51
42
|
};
|
|
52
|
-
interface Auth {
|
|
53
|
-
subject: Subject;
|
|
54
|
-
permissions: Permissions;
|
|
55
|
-
}
|
|
56
|
-
interface Subject {
|
|
57
|
-
id: string;
|
|
58
|
-
email: string;
|
|
59
|
-
roles: string[];
|
|
60
|
-
}
|
|
61
|
-
interface Permissions {
|
|
62
|
-
[key: string]: string[];
|
|
63
|
-
}
|
|
64
|
-
interface HookEventMap {
|
|
65
|
-
start: [];
|
|
66
|
-
install: [];
|
|
67
|
-
}
|
|
68
43
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
44
|
+
declare function entitySchema<const Def extends SchemaDefinition>(def: AssertNoReservedKeys<Def>): EntitySchema<Def>;
|
|
45
|
+
declare class EntitySchema<Def extends SchemaDefinition = SchemaDefinition> {
|
|
46
|
+
readonly definition: Def;
|
|
47
|
+
constructor(definition: Def);
|
|
73
48
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
49
|
+
declare class CompiledSchema {
|
|
50
|
+
constructor(schema: EntitySchema);
|
|
51
|
+
get shape(): unknown;
|
|
77
52
|
}
|
|
78
53
|
|
|
79
54
|
type InsertReturnMode = 'insertedIds' | 'documents';
|
|
80
|
-
type InsertReturnType<T extends Record
|
|
81
|
-
interface InsertQuery<T extends
|
|
55
|
+
type InsertReturnType<T extends object = Record<string, unknown>, R extends InsertReturnMode = 'insertedIds'> = R extends 'insertedIds' ? string[] : R extends 'documents' ? T[] : never;
|
|
56
|
+
interface InsertQuery<T extends object = Record<string, unknown>, R extends InsertReturnMode = 'insertedIds'> extends PromiseLike<InsertReturnType<T, R>> {
|
|
82
57
|
return(mode: 'insertedIds'): InsertQuery<T, 'insertedIds'>;
|
|
83
58
|
return(mode: 'documents'): InsertQuery<T, 'documents'>;
|
|
84
59
|
return(mode: InsertReturnMode): InsertQuery<T, typeof mode>;
|
|
85
60
|
}
|
|
86
61
|
type InsertOneReturnMode = 'insertedId' | 'document';
|
|
87
|
-
type InsertOneReturnType<T extends Record
|
|
88
|
-
interface InsertOneQuery<T extends
|
|
62
|
+
type InsertOneReturnType<T extends object = Record<string, unknown>, R extends InsertOneReturnMode = 'insertedId'> = R extends 'insertedId' ? string : R extends 'document' ? T : never;
|
|
63
|
+
interface InsertOneQuery<T extends object = Record<string, unknown>, R extends InsertOneReturnMode = 'insertedId'> extends PromiseLike<InsertOneReturnType<T, R>> {
|
|
89
64
|
return(mode: 'insertedId'): InsertOneQuery<T, 'insertedId'>;
|
|
90
65
|
return(mode: 'document'): InsertOneQuery<T, 'document'>;
|
|
91
66
|
return(mode: InsertOneReturnMode): InsertOneQuery<T, typeof mode>;
|
|
@@ -93,7 +68,7 @@ interface InsertOneQuery<T extends Record$1 = Record$1, R extends InsertOneRetur
|
|
|
93
68
|
|
|
94
69
|
type UpdateReturnMode = 'affectedRows' | 'oldDocuments' | 'newDocuments';
|
|
95
70
|
type UpdateReturnType<T, R extends UpdateReturnMode> = R extends 'affectedRows' ? bigint : R extends 'oldDocuments' | 'newDocuments' ? T[] : never;
|
|
96
|
-
interface UpdateQuery<T extends
|
|
71
|
+
interface UpdateQuery<T extends object = Record<string, unknown>, R extends UpdateReturnMode = 'affectedRows'> extends PromiseLike<UpdateReturnType<T, R>> {
|
|
97
72
|
limit(limit: number): this;
|
|
98
73
|
offset(offset: number): this;
|
|
99
74
|
sort(sort: Sorting): this;
|
|
@@ -104,7 +79,7 @@ interface UpdateQuery<T extends Record$1 = Record$1, R extends UpdateReturnMode
|
|
|
104
79
|
}
|
|
105
80
|
type UpdateOneReturnMode = 'success' | 'oldDocument' | 'newDocument';
|
|
106
81
|
type UpdateOneReturnType<T, R extends UpdateOneReturnMode> = R extends 'success' ? boolean : R extends 'oldDocument' | 'newDocument' ? T | undefined : never;
|
|
107
|
-
interface UpdateOneQuery<T extends
|
|
82
|
+
interface UpdateOneQuery<T extends object = Record<string, unknown>, R extends UpdateOneReturnMode = 'success'> extends PromiseLike<UpdateOneReturnType<T, R>> {
|
|
108
83
|
offset(offset: number): this;
|
|
109
84
|
sort(sort: Sorting): this;
|
|
110
85
|
upsert(upsert: boolean): this;
|
|
@@ -116,7 +91,7 @@ interface UpdateOneQuery<T extends Record$1 = Record$1, R extends UpdateOneRetur
|
|
|
116
91
|
|
|
117
92
|
type RemoveReturnMode = 'affectedRows' | 'documents';
|
|
118
93
|
type RemoveReturnType<T, R extends RemoveReturnMode> = R extends 'affectedRows' ? bigint : R extends 'documents' ? T[] : never;
|
|
119
|
-
interface RemoveQuery<T extends
|
|
94
|
+
interface RemoveQuery<T extends object = Record<string, unknown>, R extends RemoveReturnMode = 'affectedRows'> extends PromiseLike<RemoveReturnType<T, R>> {
|
|
120
95
|
limit(limit: number): this;
|
|
121
96
|
offset(offset: number): this;
|
|
122
97
|
sort(sort: Sorting): this;
|
|
@@ -126,7 +101,7 @@ interface RemoveQuery<T extends Record$1 = Record$1, R extends RemoveReturnMode
|
|
|
126
101
|
}
|
|
127
102
|
type RemoveOneReturnMode = 'success' | 'document';
|
|
128
103
|
type RemoveOneReturnType<T, R extends RemoveOneReturnMode> = R extends 'success' ? boolean : R extends 'document' ? T | undefined : never;
|
|
129
|
-
interface RemoveOneQuery<T extends
|
|
104
|
+
interface RemoveOneQuery<T extends object = Record<string, unknown>, R extends RemoveOneReturnMode = 'success'> extends PromiseLike<RemoveOneReturnType<T, R>> {
|
|
130
105
|
offset(offset: number): this;
|
|
131
106
|
sort(sort: Sorting): this;
|
|
132
107
|
return(mode: 'success'): RemoveOneQuery<T, 'success'>;
|
|
@@ -134,30 +109,77 @@ interface RemoveOneQuery<T extends Record$1 = Record$1, R extends RemoveOneRetur
|
|
|
134
109
|
return(mode: RemoveOneReturnMode): RemoveOneQuery<T, typeof mode>;
|
|
135
110
|
}
|
|
136
111
|
|
|
137
|
-
interface Entity<T extends object = Record
|
|
112
|
+
interface Entity<T extends object = Record<string, unknown>> {
|
|
138
113
|
get name(): string;
|
|
139
|
-
find(
|
|
140
|
-
findOne(
|
|
114
|
+
find(filter?: Filter): FindQuery<T>;
|
|
115
|
+
findOne(filter?: Filter): FindOneQuery<T>;
|
|
141
116
|
insert(docs: T[]): InsertQuery<T>;
|
|
142
117
|
insertOne(doc: T): InsertOneQuery<T>;
|
|
143
|
-
update(
|
|
144
|
-
updateOne(
|
|
145
|
-
remove(
|
|
146
|
-
removeOne(
|
|
118
|
+
update(filter: Filter, update: Record<string, unknown>): UpdateQuery<T>;
|
|
119
|
+
updateOne(filter: Filter, update: Record<string, unknown>): UpdateOneQuery<T>;
|
|
120
|
+
remove(filter: Filter): RemoveQuery<T>;
|
|
121
|
+
removeOne(filter: Filter): RemoveOneQuery<T>;
|
|
147
122
|
}
|
|
148
123
|
interface Sorting {
|
|
149
124
|
[field: string]: 'asc' | 'desc';
|
|
150
125
|
}
|
|
151
126
|
|
|
152
|
-
interface
|
|
153
|
-
|
|
154
|
-
|
|
127
|
+
interface FindQuery<T extends object = Record<string, unknown>> extends PromiseLike<T[]> {
|
|
128
|
+
limit(limit: number): this;
|
|
129
|
+
offset(offset: number): this;
|
|
130
|
+
sort(sort: Sorting): this;
|
|
155
131
|
}
|
|
156
|
-
interface
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
132
|
+
interface FindOneQuery<T extends object = Record<string, unknown>> extends PromiseLike<T | undefined> {
|
|
133
|
+
offset(offset: number): this;
|
|
134
|
+
sort(sort: Sorting): this;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
type Variant<K extends PropertyKey, T extends object> = {
|
|
138
|
+
[P in keyof T]: {
|
|
139
|
+
[Q in K]: P;
|
|
140
|
+
} & T[P] extends infer U ? {
|
|
141
|
+
[Q in keyof U]: U[Q];
|
|
142
|
+
} : never;
|
|
143
|
+
}[keyof T];
|
|
144
|
+
type EventHandler = <T>(event: string, data: T) => void | Promise<void>;
|
|
145
|
+
type Visibility = 'private' | 'platform' | 'vendor' | 'public';
|
|
146
|
+
interface Tenant {
|
|
147
|
+
id: string;
|
|
148
|
+
host: string;
|
|
149
|
+
}
|
|
150
|
+
interface AppId {
|
|
151
|
+
get name(): string;
|
|
152
|
+
get namespace(): Namespace;
|
|
153
|
+
toString(separator?: string): string;
|
|
154
|
+
}
|
|
155
|
+
declare const AppId: {
|
|
156
|
+
parse(input: string): AppId;
|
|
157
|
+
};
|
|
158
|
+
type Namespace = 'system' | 'platform' | {
|
|
159
|
+
vendor: string;
|
|
160
|
+
};
|
|
161
|
+
type AppRole = Variant<'type', AppRoleData>;
|
|
162
|
+
type AppRoleData = {
|
|
163
|
+
provider: {
|
|
164
|
+
group: string;
|
|
165
|
+
};
|
|
166
|
+
test: void;
|
|
167
|
+
};
|
|
168
|
+
interface Auth {
|
|
169
|
+
subject: Subject;
|
|
170
|
+
permissions: Permissions;
|
|
171
|
+
}
|
|
172
|
+
interface Subject {
|
|
173
|
+
id: string;
|
|
174
|
+
email: string;
|
|
175
|
+
roles: string[];
|
|
176
|
+
}
|
|
177
|
+
interface Permissions {
|
|
178
|
+
[key: string]: string[];
|
|
179
|
+
}
|
|
180
|
+
interface HookEventMap {
|
|
181
|
+
start: [];
|
|
182
|
+
install: [];
|
|
161
183
|
}
|
|
162
184
|
|
|
163
185
|
interface Artifacts {
|
|
@@ -254,6 +276,7 @@ interface MiddlewareOptions {
|
|
|
254
276
|
path?: string;
|
|
255
277
|
priority?: number;
|
|
256
278
|
}
|
|
279
|
+
type PayloadType = 'bytes' | 'json' | 'cbor' | 'text';
|
|
257
280
|
interface Request {
|
|
258
281
|
get artifacts(): Artifacts;
|
|
259
282
|
get method(): Method;
|
|
@@ -261,9 +284,11 @@ interface Request {
|
|
|
261
284
|
get params(): Record<string, string>;
|
|
262
285
|
get headers(): Headers;
|
|
263
286
|
cookie(name: string): string | undefined;
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
287
|
+
payload<T = any>(): Promise<T>;
|
|
288
|
+
payload<T = any>(type: 'json' | 'cbor'): Promise<T>;
|
|
289
|
+
payload(type: 'bytes'): Promise<Uint8Array>;
|
|
290
|
+
payload(type: 'text'): Promise<string>;
|
|
291
|
+
payload(type?: PayloadType): Promise<unknown>;
|
|
267
292
|
}
|
|
268
293
|
interface RequestBuilder {
|
|
269
294
|
method(method: Method): this;
|
|
@@ -271,26 +296,24 @@ interface RequestBuilder {
|
|
|
271
296
|
header(name: string, value: string): this;
|
|
272
297
|
headers(headers: HeadersInit): this;
|
|
273
298
|
cookie(name: string, value: string): this;
|
|
274
|
-
|
|
275
|
-
text(text: string): this;
|
|
276
|
-
json<T>(json: T): this;
|
|
299
|
+
payload<T = unknown>(payload: T, type?: PayloadType): this;
|
|
277
300
|
}
|
|
278
301
|
interface Response {
|
|
279
302
|
get status(): number;
|
|
280
303
|
get headers(): Headers;
|
|
281
304
|
cookie(name: string): SetCookie | undefined;
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
305
|
+
payload<T = any>(): Promise<T>;
|
|
306
|
+
payload<T = any>(type: 'json' | 'cbor'): Promise<T>;
|
|
307
|
+
payload(type: 'bytes'): Promise<Uint8Array>;
|
|
308
|
+
payload(type: 'text'): Promise<string>;
|
|
309
|
+
payload(type?: PayloadType): Promise<unknown>;
|
|
285
310
|
}
|
|
286
311
|
interface ResponseBuilder {
|
|
287
312
|
status(status: number): this;
|
|
288
313
|
header(name: string, value: string): this;
|
|
289
314
|
headers(headers: HeadersInit): this;
|
|
290
315
|
cookie(name: string, value?: string, options?: SetCookieOptions): this;
|
|
291
|
-
|
|
292
|
-
text(text: string): this;
|
|
293
|
-
json<T>(json: T): this;
|
|
316
|
+
payload<T = unknown>(payload: T, type?: PayloadType): this;
|
|
294
317
|
}
|
|
295
318
|
interface SetCookieOptions {
|
|
296
319
|
encode?: (s: string) => string;
|
|
@@ -305,6 +328,32 @@ interface SetCookieOptions {
|
|
|
305
328
|
sameSite?: boolean | 'lax' | 'strict' | 'none';
|
|
306
329
|
}
|
|
307
330
|
|
|
331
|
+
interface Crypto {
|
|
332
|
+
deriveKey(seed: string, length: number): Uint8Array;
|
|
333
|
+
aesGcmEncrypt<T>(data: T): Uint8Array;
|
|
334
|
+
aesGcmDecrypt<T>(data: Uint8Array): T;
|
|
335
|
+
argon2Hash(algorithm: Argon2Algorithm, password: string, options?: Argon2Options): string;
|
|
336
|
+
argon2Verify(algorithm: Argon2Algorithm, password: string, hash: string, options?: Argon2Options): boolean;
|
|
337
|
+
}
|
|
338
|
+
type Argon2Algorithm = 'argon2d' | 'argon2i' | 'argon2id';
|
|
339
|
+
interface Argon2Options {
|
|
340
|
+
mCost?: number;
|
|
341
|
+
tCost?: number;
|
|
342
|
+
pCost?: number;
|
|
343
|
+
outputLen?: number;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
interface SetOptions {
|
|
347
|
+
ttl?: number;
|
|
348
|
+
existenceCheck?: 'nx' | 'xx';
|
|
349
|
+
}
|
|
350
|
+
interface KeyValueStore {
|
|
351
|
+
get<T>(key: string): Promise<T>;
|
|
352
|
+
getDel<T>(key: string): Promise<T>;
|
|
353
|
+
set<T>(key: string, value: T, options?: SetOptions): Promise<void>;
|
|
354
|
+
delete(key: string): Promise<void>;
|
|
355
|
+
}
|
|
356
|
+
|
|
308
357
|
interface RPC {
|
|
309
358
|
call(url: string, method: Method): Call;
|
|
310
359
|
get(url: string): Call;
|
|
@@ -351,4 +400,7 @@ interface Bridge {
|
|
|
351
400
|
publish<T extends object>(event: string, payload: T, visibility?: Visibility[]): void;
|
|
352
401
|
}
|
|
353
402
|
|
|
354
|
-
|
|
403
|
+
declare const logLevels: readonly ["trace", "debug", "info", "warn", "error", "none"];
|
|
404
|
+
type LogLevel = (typeof logLevels)[number];
|
|
405
|
+
|
|
406
|
+
export { type AppRole as A, type Bridge as B, CompiledSchema as C, EntitySchema as E, type Filter as F, type GeneratedFields as G, type HydratedDocument as H, type InsertDocument as I, type LogLevel as L, type Method as M, type Namespace as N, Provider as P, type RemoveQuery as R, type Sorting$1 as S, type Tenant as T, type UpdateQuery as U, type Visibility as V, type FindQuery as a, type FindOneQuery as b, type InsertQuery as c, type InsertOneQuery as d, type InferInterface as e, type UpdateOneQuery as f, type RemoveOneQuery as g, type Router as h, type HookEventMap as i, type EventHandler as j, AppId as k, type Artifacts as l, type Auth as m, type Entity as n, type InferSchema as o, type Middleware as p, type Providers as q, type Request as r, type RequestBuilder as s, type RequestHandler as t, type Response as u, type ResponseBuilder as v, type RouteOptions as w, StatusCode as x, type Subject as y, entitySchema as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m1cro/server-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-beta.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -9,24 +9,42 @@
|
|
|
9
9
|
".": {
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
11
|
"import": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./globals": {
|
|
14
|
+
"types": "./dist/globals.d.ts"
|
|
12
15
|
}
|
|
13
16
|
},
|
|
14
17
|
"publishConfig": {
|
|
15
18
|
"access": "public"
|
|
16
19
|
},
|
|
17
20
|
"scripts": {
|
|
18
|
-
"build": "yarn && yarn typecheck && yarn bundle",
|
|
21
|
+
"build": "yarn && yarn run typecheck && yarn run bundle",
|
|
19
22
|
"typecheck": "tsc --noEmit",
|
|
20
23
|
"bundle": "tsup --minify --treeshake smallest",
|
|
21
|
-
"
|
|
22
|
-
"
|
|
24
|
+
"deploy": "yarn publish --non-interactive",
|
|
25
|
+
"lint": "eslint",
|
|
26
|
+
"lint:fix": "eslint --fix",
|
|
27
|
+
"prettier": "prettier --check \"src/**/*.ts\"",
|
|
28
|
+
"prettier:fix": "prettier --write \"src/**/*.ts\""
|
|
23
29
|
},
|
|
24
30
|
"dependencies": {
|
|
25
31
|
"@types/json-schema": "^7.0.15",
|
|
26
32
|
"cbor2": "^2.2.1",
|
|
33
|
+
"cookie": "^1.1.1",
|
|
27
34
|
"json-schema": "^0.4.0"
|
|
28
35
|
},
|
|
29
36
|
"devDependencies": {
|
|
30
|
-
"
|
|
37
|
+
"@eslint/js": "^9.39.2",
|
|
38
|
+
"@stylistic/eslint-plugin": "^5.7.1",
|
|
39
|
+
"@types/node": "^25.3.0",
|
|
40
|
+
"eslint": "^9.39.2",
|
|
41
|
+
"eslint-config-prettier": "^10.1.8",
|
|
42
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
43
|
+
"globals": "^17.3.0",
|
|
44
|
+
"jiti": "^2.6.1",
|
|
45
|
+
"prettier": "^3.8.1",
|
|
46
|
+
"tsup": "^8.5.1",
|
|
47
|
+
"typescript": "^5.9.3",
|
|
48
|
+
"typescript-eslint": "^8.54.0"
|
|
31
49
|
}
|
|
32
|
-
}
|
|
50
|
+
}
|