@modern-js/utils 2.34.0 → 2.35.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/cli/alias.js +3 -3
- package/dist/cjs/cli/constants/chainId.js +3 -3
- package/dist/cjs/cli/is/config.js +9 -11
- package/dist/cjs/cli/logger.js +6 -1
- package/dist/cjs/cli/port.js +1 -1
- package/dist/cjs/cli/prettyInstructions.js +2 -5
- package/dist/cjs/cli/require.js +1 -2
- package/dist/cjs/universal/formatWebpack.js +3 -3
- package/dist/compiled/gradient-string/index.d.ts +1 -0
- package/dist/compiled/gradient-string/index.js +1 -0
- package/dist/compiled/gradient-string/license +21 -0
- package/dist/compiled/gradient-string/package.json +1 -0
- package/dist/esm/cli/alias.js +3 -3
- package/dist/esm/cli/constants/chainId.js +3 -3
- package/dist/esm/cli/is/config.js +9 -11
- package/dist/esm/cli/logger.js +6 -1
- package/dist/esm/cli/port.js +1 -1
- package/dist/esm/cli/prettyInstructions.js +2 -3
- package/dist/esm/cli/require.js +1 -2
- package/dist/esm/universal/formatWebpack.js +3 -3
- package/dist/esm-node/cli/alias.js +3 -3
- package/dist/esm-node/cli/constants/chainId.js +3 -3
- package/dist/esm-node/cli/is/config.js +9 -11
- package/dist/esm-node/cli/logger.js +6 -1
- package/dist/esm-node/cli/port.js +1 -1
- package/dist/esm-node/cli/prettyInstructions.js +2 -5
- package/dist/esm-node/cli/require.js +1 -2
- package/dist/esm-node/universal/formatWebpack.js +3 -3
- package/dist/types/cli/constants/chainId.d.ts +2 -2
- package/dist/types/cli/logger.d.ts +5 -0
- package/package.json +8 -75
- package/dist/cjs/runtime/nestedRoutes.js +0 -149
- package/dist/cjs/runtime/remixRouter.js +0 -6
- package/dist/cjs/runtime/router.js +0 -6
- package/dist/cjs/runtime-browser/index.js +0 -6
- package/dist/cjs/runtime-browser/parsed.js +0 -28
- package/dist/cjs/runtime-node/index.js +0 -28
- package/dist/cjs/runtime-node/loaderContext/createLoaderCtx.js +0 -34
- package/dist/cjs/runtime-node/loaderContext/createRequestCtx.js +0 -38
- package/dist/cjs/runtime-node/loaderContext/index.js +0 -22
- package/dist/cjs/runtime-node/nestedRoutes.js +0 -28
- package/dist/cjs/runtime-node/router.js +0 -6
- package/dist/cjs/runtime-node/serialize.js +0 -17
- package/dist/cjs/runtime-node/storage.js +0 -48
- package/dist/cjs/universal/time.js +0 -38
- package/dist/esm/runtime/nestedRoutes.js +0 -163
- package/dist/esm/runtime/remixRouter.js +0 -1
- package/dist/esm/runtime/router.js +0 -1
- package/dist/esm/runtime-browser/index.js +0 -1
- package/dist/esm/runtime-browser/parsed.js +0 -18
- package/dist/esm/runtime-node/index.js +0 -6
- package/dist/esm/runtime-node/loaderContext/createLoaderCtx.js +0 -20
- package/dist/esm/runtime-node/loaderContext/createRequestCtx.js +0 -24
- package/dist/esm/runtime-node/loaderContext/index.js +0 -3
- package/dist/esm/runtime-node/nestedRoutes.js +0 -20
- package/dist/esm/runtime-node/router.js +0 -1
- package/dist/esm/runtime-node/serialize.js +0 -6
- package/dist/esm/runtime-node/storage.js +0 -36
- package/dist/esm/universal/time.js +0 -29
- package/dist/esm-node/runtime/nestedRoutes.js +0 -129
- package/dist/esm-node/runtime/remixRouter.js +0 -1
- package/dist/esm-node/runtime/router.js +0 -1
- package/dist/esm-node/runtime-browser/index.js +0 -1
- package/dist/esm-node/runtime-browser/parsed.js +0 -18
- package/dist/esm-node/runtime-node/index.js +0 -6
- package/dist/esm-node/runtime-node/loaderContext/createLoaderCtx.js +0 -15
- package/dist/esm-node/runtime-node/loaderContext/createRequestCtx.js +0 -19
- package/dist/esm-node/runtime-node/loaderContext/index.js +0 -3
- package/dist/esm-node/runtime-node/nestedRoutes.js +0 -18
- package/dist/esm-node/runtime-node/router.js +0 -1
- package/dist/esm-node/runtime-node/serialize.js +0 -6
- package/dist/esm-node/runtime-node/storage.js +0 -38
- package/dist/esm-node/universal/time.js +0 -28
- package/dist/types/runtime/nestedRoutes.d.ts +0 -13
- package/dist/types/runtime/remixRouter.d.ts +0 -1
- package/dist/types/runtime/router.d.ts +0 -1
- package/dist/types/runtime-browser/index.d.ts +0 -1
- package/dist/types/runtime-browser/parsed.d.ts +0 -1
- package/dist/types/runtime-node/index.d.ts +0 -10
- package/dist/types/runtime-node/loaderContext/createLoaderCtx.d.ts +0 -7
- package/dist/types/runtime-node/loaderContext/createRequestCtx.d.ts +0 -7
- package/dist/types/runtime-node/loaderContext/index.d.ts +0 -4
- package/dist/types/runtime-node/nestedRoutes.d.ts +0 -3
- package/dist/types/runtime-node/router.d.ts +0 -1
- package/dist/types/runtime-node/serialize.d.ts +0 -1
- package/dist/types/runtime-node/storage.d.ts +0 -5
- package/dist/types/universal/time.d.ts +0 -1
@@ -1 +0,0 @@
|
|
1
|
-
export * from 'react-router-dom';
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './parsed';
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const parsedJSONFromElement: (id: string) => any;
|
@@ -1,10 +0,0 @@
|
|
1
|
-
/// <reference types="node" />
|
2
|
-
/**
|
3
|
-
* ssr helpers
|
4
|
-
*/
|
5
|
-
import type { IncomingHttpHeaders } from 'http';
|
6
|
-
declare const run: <O>(context: IncomingHttpHeaders, cb: () => O | Promise<O>) => Promise<O>, useHeaders: () => IncomingHttpHeaders;
|
7
|
-
export { run, useHeaders };
|
8
|
-
export { serializeJson } from './serialize';
|
9
|
-
export * from './nestedRoutes';
|
10
|
-
export * from './loaderContext';
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import { LoaderContext } from './createLoaderCtx';
|
2
|
-
export declare class RequestContext {
|
3
|
-
private store;
|
4
|
-
get<T>(loaderCtx: LoaderContext<T>): T;
|
5
|
-
set<T = unknown>(loaderCtx: LoaderContext, value: T): void;
|
6
|
-
}
|
7
|
-
export declare function createRequestContext(): RequestContext;
|
@@ -1,4 +0,0 @@
|
|
1
|
-
import type { Reporter } from '@modern-js/types';
|
2
|
-
export { createRequestContext, type RequestContext } from './createRequestCtx';
|
3
|
-
export type { LoaderContext } from './createLoaderCtx';
|
4
|
-
export declare const reporterCtx: import("./createLoaderCtx").LoaderContext<Reporter>;
|
@@ -1,3 +0,0 @@
|
|
1
|
-
import type { ModernServerContext, ServerRoute } from '@modern-js/types';
|
2
|
-
export type ServerContext = Pick<ModernServerContext, 'logger' | 'req' | 'reporter' | 'res' | 'params' | 'headers' | 'method' | 'url' | 'host' | 'protocol' | 'origin' | 'href' | 'path' | 'query'>;
|
3
|
-
export declare const matchEntry: (pathname: string, entries: ServerRoute[]) => ServerRoute | undefined;
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from 'react-router-dom/server';
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const serializeJson: (data: any) => string;
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const time: () => () => number;
|