@primate/core 0.8.5 → 0.8.6
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/lib/private/build/server/plugin/node-imports.js +3 -3
- package/lib/private/client/boot.d.ts +1 -1
- package/lib/private/db/migrate/bundle.d.ts +1 -1
- package/lib/private/db/test.d.ts +1 -1
- package/lib/private/i18n/storage.d.ts +1 -1
- package/lib/private/request/router.d.ts +1 -1
- package/lib/private/request/storage.d.ts +1 -1
- package/lib/private/response/redirect.d.ts +2 -2
- package/lib/private/response/respond.d.ts +1 -1
- package/lib/private/response/ws.d.ts +1 -1
- package/lib/private/response.d.ts +1 -1
- package/lib/private/route.client.d.ts +2 -3
- package/lib/private/route.d.ts +2 -3
- package/lib/private/serve/index.d.ts +1 -1
- package/lib/private/session/storage.d.ts +1 -1
- package/lib/private/store.client.d.ts +0 -2
- package/lib/private/store.d.ts +4 -18
- package/package.json +1 -1
|
@@ -7,11 +7,12 @@ export default function plugin_server_node_imports(_app) {
|
|
|
7
7
|
setup(build) {
|
|
8
8
|
build.onResolve({ filter: /^#/ }, async (args) => {
|
|
9
9
|
// only touch imports coming from @primate/core sources
|
|
10
|
-
if (!args.importer ||
|
|
10
|
+
if (!args.importer ||
|
|
11
|
+
!args.importer.startsWith(root + "/") ||
|
|
12
|
+
args.importer.startsWith(root + "/node_modules/")) {
|
|
11
13
|
return null;
|
|
12
14
|
}
|
|
13
15
|
try {
|
|
14
|
-
// anchor resolution at core_root we use our package.json "imports"
|
|
15
16
|
const module_path = requirer.resolve(args.path, {
|
|
16
17
|
paths: [root],
|
|
17
18
|
});
|
|
@@ -21,7 +22,6 @@ export default function plugin_server_node_imports(_app) {
|
|
|
21
22
|
};
|
|
22
23
|
}
|
|
23
24
|
catch { }
|
|
24
|
-
// next
|
|
25
25
|
return null;
|
|
26
26
|
});
|
|
27
27
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Updater } from "#client/root";
|
|
2
2
|
import type { Dict } from "@rcompat/type";
|
|
3
|
-
declare const _default: <T extends Dict>(u: Updater<T>) => void;
|
|
4
3
|
export default _default;
|
|
4
|
+
declare function _default<T extends Dict>(u: Updater<T>): void;
|
|
5
5
|
//# sourceMappingURL=boot.d.ts.map
|
package/lib/private/db/test.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FileRef } from "@rcompat/fs";
|
|
2
2
|
import FileRouter from "@rcompat/fs/FileRouter";
|
|
3
|
-
declare const _default: (directory: FileRef, extensions: string[]) => Promise<FileRouter>;
|
|
4
3
|
export default _default;
|
|
4
|
+
declare function _default(directory: FileRef, extensions: string[]): Promise<FileRouter>;
|
|
5
5
|
//# sourceMappingURL=router.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type RequestFacade from "#request/RequestFacade";
|
|
2
|
-
declare const _default: () => import("node:async_hooks").AsyncLocalStorage<RequestFacade>;
|
|
3
2
|
export default _default;
|
|
3
|
+
declare function _default(): import("node:async_hooks").AsyncLocalStorage<RequestFacade>;
|
|
4
4
|
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type ResponseFunction from "#response/ResponseFunction";
|
|
2
2
|
type Redirection = 300 | 301 | 302 | 303 | 304 | 307 | 308;
|
|
3
|
+
export default _default;
|
|
3
4
|
/**
|
|
4
5
|
* Redirect request
|
|
5
6
|
* @param location location to redirect to
|
|
6
7
|
* @param status redirection 3xx code
|
|
7
8
|
* @return Response rendering function
|
|
8
9
|
*/
|
|
9
|
-
declare
|
|
10
|
-
export default _default;
|
|
10
|
+
declare function _default(location: string, status?: Redirection): ResponseFunction;
|
|
11
11
|
//# sourceMappingURL=redirect.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type ResponseFunction from "#response/ResponseFunction";
|
|
2
2
|
import type ResponseLike from "#response/ResponseLike";
|
|
3
|
-
declare const _default: (result: ResponseLike) => ResponseFunction;
|
|
4
3
|
export default _default;
|
|
4
|
+
declare function _default(result: ResponseLike): ResponseFunction;
|
|
5
5
|
//# sourceMappingURL=respond.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type ResponseFunction from "#response/ResponseFunction";
|
|
2
2
|
import type { Actions } from "@rcompat/http";
|
|
3
|
-
declare const _default: (actions: Actions) => ResponseFunction;
|
|
4
3
|
export default _default;
|
|
4
|
+
declare function _default(actions: Actions): ResponseFunction;
|
|
5
5
|
//# sourceMappingURL=ws.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type ServeApp from "#serve/App";
|
|
2
2
|
import type { MaybePromise } from "@rcompat/type";
|
|
3
|
-
declare const _default: <T>(mime: string, mapper: (input: T) => BodyInit) => (body: T, init?: ResponseInit) => (app: ServeApp) => MaybePromise<Response>;
|
|
4
3
|
export default _default;
|
|
4
|
+
declare function _default<T>(mime: string, mapper: (input: T) => BodyInit): (body: T, init?: ResponseInit) => (app: ServeApp) => MaybePromise<Response>;
|
|
5
5
|
//# sourceMappingURL=response.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type ResponseLike from "#response/ResponseLike";
|
|
2
2
|
import type ContentTypeMap from "#route/ContentTypeMap";
|
|
3
3
|
import type RouteHandler from "#route/Handler";
|
|
4
|
+
import hook from "#route/hook";
|
|
4
5
|
import type RouteOptions from "#route/Options";
|
|
5
6
|
import type { Unpack } from "@rcompat/type";
|
|
6
7
|
import type { Parsed } from "pema";
|
|
@@ -47,9 +48,7 @@ declare function route<R extends RouteHandlers>(handlers: R): ClientRoute<R>;
|
|
|
47
48
|
declare namespace route {
|
|
48
49
|
var _a: <O extends RouteOptions, R extends ResponseLike>(options: O, handler: RouteHandler<O, R>) => WithResult<O, R>;
|
|
49
50
|
export { _a as with };
|
|
50
|
-
}
|
|
51
|
-
declare namespace route {
|
|
52
|
-
var hook: typeof import("#route/hook").default;
|
|
51
|
+
export { hook };
|
|
53
52
|
}
|
|
54
53
|
export default route;
|
|
55
54
|
//# sourceMappingURL=route.client.d.ts.map
|
package/lib/private/route.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type RouteHandler from "#route/Handler";
|
|
2
|
+
import hook from "#route/hook";
|
|
2
3
|
import type RouteOptions from "#route/Options";
|
|
3
4
|
import type { Method } from "@rcompat/http";
|
|
4
5
|
declare const BRAND: unique symbol;
|
|
@@ -20,9 +21,7 @@ declare function route(handlers: RouteHandlers): {
|
|
|
20
21
|
declare namespace route {
|
|
21
22
|
var _a: <O extends RouteOptions>(options: O, handler: RouteHandler<O>) => WithResult<O>;
|
|
22
23
|
export { _a as with };
|
|
23
|
-
}
|
|
24
|
-
declare namespace route {
|
|
25
|
-
var hook: typeof import("#route/hook").default;
|
|
24
|
+
export { hook };
|
|
26
25
|
}
|
|
27
26
|
export default route;
|
|
28
27
|
//# sourceMappingURL=route.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import ServeApp from "#serve/App";
|
|
2
2
|
import type ServeInit from "#serve/Init";
|
|
3
|
-
declare const _default: (root: string, options: ServeInit) => Promise<ServeApp | undefined>;
|
|
4
3
|
export default _default;
|
|
4
|
+
declare function _default(root: string, options: ServeInit): Promise<ServeApp | undefined>;
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type SessionHandle from "#session/SessionHandle";
|
|
2
|
-
declare const _default: <Data>() => import("node:async_hooks").AsyncLocalStorage<SessionHandle<Data>>;
|
|
3
2
|
export default _default;
|
|
3
|
+
declare function _default<Data>(): import("node:async_hooks").AsyncLocalStorage<SessionHandle<Data>>;
|
|
4
4
|
//# sourceMappingURL=storage.d.ts.map
|
package/lib/private/store.d.ts
CHANGED
|
@@ -1,26 +1,12 @@
|
|
|
1
1
|
import type Init from "#store/Init";
|
|
2
|
+
import key from "#store/key";
|
|
3
|
+
import relation from "#store/relation";
|
|
2
4
|
import Store from "#store/Store";
|
|
3
5
|
import type StoreInput from "#store/StoreInput";
|
|
4
6
|
declare function store<T extends StoreInput, const N extends string = string>(init: Init<T, N>): Store<T, N>;
|
|
5
7
|
declare namespace store {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
primary: typeof import("./store/PrimaryKey.js").default.new;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
declare namespace store {
|
|
12
|
-
var relation: {
|
|
13
|
-
one: <const N extends string, const FK extends string>(options: {
|
|
14
|
-
table: N;
|
|
15
|
-
by: FK;
|
|
16
|
-
reverse?: boolean;
|
|
17
|
-
}) => import("#store/relation").OneRelation<N, FK>;
|
|
18
|
-
many: <const N extends string, const FK extends string>(options: {
|
|
19
|
-
table: N;
|
|
20
|
-
by: FK;
|
|
21
|
-
}) => import("#store/relation").ManyRelation<N, FK>;
|
|
22
|
-
is: (x: unknown) => x is import("#store/relation").Relation;
|
|
23
|
-
};
|
|
8
|
+
export { key };
|
|
9
|
+
export { relation };
|
|
24
10
|
}
|
|
25
11
|
export default store;
|
|
26
12
|
//# sourceMappingURL=store.d.ts.map
|