@anansi/core 0.16.1 → 0.16.2
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/CHANGELOG.md +9 -0
- package/lib/floodSpouts.d.ts +7 -0
- package/lib/floodSpouts.d.ts.map +1 -0
- package/lib/index.d.ts +9 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/laySpouts.d.ts +10 -0
- package/lib/laySpouts.d.ts.map +1 -0
- package/lib/scripts/getProxyMiddlewares.d.ts +3 -0
- package/lib/scripts/getProxyMiddlewares.d.ts.map +1 -0
- package/lib/scripts/index.d.ts +3 -0
- package/lib/scripts/index.d.ts.map +1 -0
- package/lib/scripts/serve.d.ts +7 -0
- package/lib/scripts/serve.d.ts.map +1 -0
- package/lib/scripts/startDevserver.d.ts +4 -0
- package/lib/scripts/startDevserver.d.ts.map +1 -0
- package/lib/scripts/types.d.ts +7 -0
- package/lib/scripts/types.d.ts.map +1 -0
- package/lib/spouts/app.d.ts +6 -0
- package/lib/spouts/app.d.ts.map +1 -0
- package/lib/spouts/app.server.d.ts +7 -0
- package/lib/spouts/app.server.d.ts.map +1 -0
- package/lib/spouts/csp.d.ts +5 -0
- package/lib/spouts/csp.d.ts.map +1 -0
- package/lib/spouts/document.d.ts +7 -0
- package/lib/spouts/document.d.ts.map +1 -0
- package/lib/spouts/json.d.ts +7 -0
- package/lib/spouts/json.d.ts.map +1 -0
- package/lib/spouts/json.server.d.ts +11 -0
- package/lib/spouts/json.server.d.ts.map +1 -0
- package/lib/spouts/prefetch.server.d.ts +8 -0
- package/lib/spouts/prefetch.server.d.ts.map +1 -0
- package/lib/spouts/restHooks.d.ts +8 -0
- package/lib/spouts/restHooks.d.ts.map +1 -0
- package/lib/spouts/restHooks.server.d.ts +15 -0
- package/lib/spouts/restHooks.server.d.ts.map +1 -0
- package/lib/spouts/router.d.ts +14 -0
- package/lib/spouts/router.d.ts.map +1 -0
- package/lib/spouts/router.server.d.ts +12 -0
- package/lib/spouts/router.server.d.ts.map +1 -0
- package/lib/spouts/types.d.ts +20 -0
- package/lib/spouts/types.d.ts.map +1 -0
- package/package.json +15 -15
- package/lib/spouts/antd.js +0 -18
- package/lib/spouts/document copy.js +0 -11
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
### [0.16.2](https://github.com/ntucker/anansi/compare/@anansi/core@0.16.1...@anansi/core@0.16.2) (2023-01-29)
|
|
7
|
+
|
|
8
|
+
### 📦 Package
|
|
9
|
+
|
|
10
|
+
* Update `webpack-dev-server` to ^4.11.1 ([#1835](https://github.com/ntucker/anansi/issues/1835)) ([2e1dd03](https://github.com/ntucker/anansi/commit/2e1dd03f76316b7c5640e4951e3c52db2cf7a721))
|
|
11
|
+
* Update all non-major dependencies ([#1831](https://github.com/ntucker/anansi/issues/1831)) ([0abe80e](https://github.com/ntucker/anansi/commit/0abe80ef359ee1ca4dd6760e9e39174541208c61))
|
|
12
|
+
* Update all non-major dependencies ([#1833](https://github.com/ntucker/anansi/issues/1833)) ([4fb7484](https://github.com/ntucker/anansi/commit/4fb74845a9bc1179758413ca919806c45d1418c7))
|
|
13
|
+
* Update JS test packages ([#1827](https://github.com/ntucker/anansi/issues/1827)) ([b0eb13e](https://github.com/ntucker/anansi/commit/b0eb13efce78005fe179169d5e9e21d0e9d5bd57))
|
|
14
|
+
|
|
6
15
|
### [0.16.1](https://github.com/ntucker/anansi/compare/@anansi/core@0.16.0...@anansi/core@0.16.1) (2023-01-22)
|
|
7
16
|
|
|
8
17
|
**Note:** Version bump only for package @anansi/core
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"floodSpouts.d.ts","sourceRoot":"","sources":["../src/floodSpouts.tsx"],"names":[],"mappings":";AAEA,wBAA8B,WAAW,CACvC,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC;IAClD,GAAG,EAAE,GAAG,CAAC,OAAO,CAAC;CAClB,CAAC,EACF,EAAE,MAAsB,EAAE,GAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAO,iBAKrD"}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as floodSpouts } from './floodSpouts';
|
|
2
|
+
export { default as documentSpout } from './spouts/document';
|
|
3
|
+
export { default as restHooksSpout } from './spouts/restHooks';
|
|
4
|
+
export { default as routerSpout } from './spouts/router';
|
|
5
|
+
export { default as JSONSpout } from './spouts/json';
|
|
6
|
+
export { default as appSpout } from './spouts/app';
|
|
7
|
+
export type { ServerProps } from './spouts/types';
|
|
8
|
+
export type { ClientSpout as Spout } from './spouts/types';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,cAAc,CAAC;AACnD,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,YAAY,EAAE,WAAW,IAAI,KAAK,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Render } from './scripts/types';
|
|
3
|
+
import { ServerProps } from './spouts/types';
|
|
4
|
+
export default function laySpouts(spouts: (props: ServerProps) => Promise<{
|
|
5
|
+
app: JSX.Element;
|
|
6
|
+
}>, { timeoutMS, onError, }?: {
|
|
7
|
+
timeoutMS?: number;
|
|
8
|
+
onError?: (error: unknown) => void;
|
|
9
|
+
}): Render;
|
|
10
|
+
//# sourceMappingURL=laySpouts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"laySpouts.d.ts","sourceRoot":"","sources":["../src/laySpouts.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,MAAM,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,OAAO,CAAC;IACtC,GAAG,EAAE,GAAG,CAAC,OAAO,CAAC;CAClB,CAAC,EACF,EACE,SAAiB,EACjB,OAAO,GACR,GAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;CAAO,UA4CnE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getProxyMiddlewares.d.ts","sourceRoot":"","sources":["../../src/scripts/getProxyMiddlewares.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,EAKhB,oBAAoB,EACpB,cAAc,EACf,MAAM,oBAAoB,CAAC;AAG5B,MAAM,CAAC,OAAO,UAAU,mBAAmB,CACzC,WAAW,EAAE,oBAAoB,GAAG,cAAc,GAAG,gBAAgB,SAmHtE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scripts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../src/scripts/serve.ts"],"names":[],"mappings":";AAeA,OAAO,sBAAsB,CAAC;AAe9B,MAAM,CAAC,OAAO,UAAU,KAAK,CAC3B,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAAO,QAqK9D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"startDevserver.d.ts","sourceRoot":"","sources":["../../src/scripts/startDevserver.ts"],"names":[],"mappings":";AAoBA,OAAO,sBAAsB,CAAC;AAe9B,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,UAAU,EAAE,MAAM,EAClB,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,QAqOlC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Request, Response } from 'express';
|
|
3
|
+
import { ServerResponse, IncomingMessage } from 'http';
|
|
4
|
+
import { StatsCompilation } from 'webpack';
|
|
5
|
+
export type Render = (clientManifest: StatsCompilation, req: Request | IncomingMessage, res: Response | ServerResponse) => Promise<void>;
|
|
6
|
+
export type BoundRender = (req: Request | IncomingMessage, res: Response | ServerResponse) => Promise<void>;
|
|
7
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/scripts/types.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,MAAM,MAAM,GAAG,CACnB,cAAc,EAAE,gBAAgB,EAChC,GAAG,EAAE,OAAO,GAAG,eAAe,EAC9B,GAAG,EAAE,QAAQ,GAAG,cAAc,KAC3B,OAAO,CAAC,IAAI,CAAC,CAAC;AAEnB,MAAM,MAAM,WAAW,GAAG,CACxB,GAAG,EAAE,OAAO,GAAG,eAAe,EAC9B,GAAG,EAAE,QAAQ,GAAG,cAAc,KAC3B,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/spouts/app.tsx"],"names":[],"mappings":";AAAA,QAAA,MAAM,QAAQ,QACN,WAAW;;GAEmB,CAAC;AAEvC,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ServerProps } from './types';
|
|
3
|
+
declare const appSpout: (app: JSX.Element) => <P extends ServerProps>(props: P) => Promise<Awaited<P & {
|
|
4
|
+
app: JSX.Element;
|
|
5
|
+
}>>;
|
|
6
|
+
export default appSpout;
|
|
7
|
+
//# sourceMappingURL=app.server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.server.d.ts","sourceRoot":"","sources":["../../src/spouts/app.server.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,QAAA,MAAM,QAAQ,QACN,WAAW;;GAEmB,CAAC;AAEvC,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"csp.d.ts","sourceRoot":"","sources":["../../src/spouts/csp.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACrB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC;CACxC;AAGD,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,UAmB5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../src/spouts/document.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,OAAO,EAAE;IAC7C,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,WAAW,CAMd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../src/spouts/json.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,EAAkB,GACnB,GAAE;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,WAAW,CACnC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvB;IAAE,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;CAAE,CAClD,CAmBA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ServerSpout } from './types';
|
|
3
|
+
type NeededNext = {
|
|
4
|
+
initData?: Record<string, () => unknown>;
|
|
5
|
+
scripts?: React.ReactNode[];
|
|
6
|
+
};
|
|
7
|
+
export default function JSONSpout({ id, }?: {
|
|
8
|
+
id?: string;
|
|
9
|
+
}): ServerSpout<Record<string, unknown>, Record<string, unknown>, NeededNext>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=json.server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json.server.d.ts","sourceRoot":"","sources":["../../src/spouts/json.server.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,KAAK,UAAU,GAAG;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,CAAC;IACzC,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;CAC7B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,EAAkB,GACnB,GAAE;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,WAAW,CACnC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvB,UAAU,CACX,CAyCA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Route } from '@anansi/router';
|
|
2
|
+
import type { ResolveProps, ServerProps } from './types';
|
|
3
|
+
type NeededProps<RouteWith> = {
|
|
4
|
+
matchedRoutes: Route<RouteWith>[];
|
|
5
|
+
} & ResolveProps;
|
|
6
|
+
export default function prefetchSpout<F extends string>(field: F): <RouteWith, N extends NeededProps<RouteWith>, I extends ServerProps>(next: (props: I) => Promise<{ [K in F]: RouteWith; } & N>) => (props: I) => Promise<{ [K in F]: RouteWith; } & N>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=prefetch.server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prefetch.server.d.ts","sourceRoot":"","sources":["../../src/spouts/prefetch.server.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEzD,KAAK,WAAW,CAAC,SAAS,IAAI;IAC5B,aAAa,EAAE,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC;CACnC,GAAG,YAAY,CAAC;AAEjB,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,CAAC,SAAS,MAAM,EAAE,KAAK,EAAE,CAAC,0LA6B/D"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Manager } from '@rest-hooks/react';
|
|
2
|
+
import type { ClientSpout } from './types';
|
|
3
|
+
export default function restHooksSpout(options?: {
|
|
4
|
+
getManagers: () => Manager[];
|
|
5
|
+
}): ClientSpout<{
|
|
6
|
+
getInitialData: (key: string) => Promise<any>;
|
|
7
|
+
}>;
|
|
8
|
+
//# sourceMappingURL=restHooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restHooks.d.ts","sourceRoot":"","sources":["../../src/spouts/restHooks.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,OAAO,EAAkB,MAAM,mBAAmB,CAAC;AAE3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,OAAO,GAAE;IACP,WAAW,EAAE,MAAM,OAAO,EAAE,CAAC;CACkB,GAChD,WAAW,CAAC;IAAE,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;CAAE,CAAC,CAkBhE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type Controller, type Manager, type State } from '@rest-hooks/react';
|
|
3
|
+
import type { Store } from 'redux';
|
|
4
|
+
import type { ServerSpout } from './types';
|
|
5
|
+
export default function restHooksSpout(options?: {
|
|
6
|
+
getManagers: () => Manager[];
|
|
7
|
+
}): ServerSpout<Record<string, unknown>, {
|
|
8
|
+
controller: Controller;
|
|
9
|
+
} & {
|
|
10
|
+
store: Store<State<unknown>>;
|
|
11
|
+
}, {
|
|
12
|
+
initData?: Record<string, () => unknown>;
|
|
13
|
+
scripts?: React.ReactNode[];
|
|
14
|
+
}>;
|
|
15
|
+
//# sourceMappingURL=restHooks.server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restHooks.server.d.ts","sourceRoot":"","sources":["../../src/spouts/restHooks.server.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,OAAO,EAEZ,KAAK,KAAK,EACX,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,OAAO,GAAE;IACP,WAAW,EAAE,MAAM,OAAO,EAAE,CAAC;CACkB,GAChD,WAAW,CACZ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvB;IAAE,UAAU,EAAE,UAAU,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAA;CAAE,EAC7D;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,CAAA;CAAE,CAC1E,CAuBA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Route, RouteController } from '@anansi/router';
|
|
2
|
+
import type { Update } from 'history';
|
|
3
|
+
import type { CreateRouter, ClientSpout } from './types';
|
|
4
|
+
export default function routerSpout<ResolveWith>(options: {
|
|
5
|
+
resolveWith?: any;
|
|
6
|
+
useResolveWith: () => ResolveWith;
|
|
7
|
+
createRouter: CreateRouter<ResolveWith>;
|
|
8
|
+
onChange?: (update: Update, callback: () => void | undefined) => void;
|
|
9
|
+
}): ClientSpout<Record<string, unknown>, {
|
|
10
|
+
matchedRoutes: Route<ResolveWith, any>[];
|
|
11
|
+
} & {
|
|
12
|
+
router: RouteController<Route<ResolveWith, any>>;
|
|
13
|
+
}>;
|
|
14
|
+
//# sourceMappingURL=router.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../src/spouts/router.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAiB,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEvE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAGtC,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEzD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,WAAW,EAAE,OAAO,EAAE;IACxD,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,cAAc,EAAE,MAAM,WAAW,CAAC;IAClC,YAAY,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;IACxC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,SAAS,KAAK,IAAI,CAAC;CACvE,GAAG,WAAW,CACb,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvB;IACE,aAAa,EAAE,KAAK,CAAC,WAAW,EAAE,GAAG,CAAC,EAAE,CAAC;CAC1C,GAAG;IACF,MAAM,EAAE,eAAe,CAAC,KAAK,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,CAAC;CAClD,CACF,CAiCA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Route, RouteController } from '@anansi/router';
|
|
2
|
+
import type { CreateRouter, ServerSpout } from './types';
|
|
3
|
+
export default function routerSpout<ResolveWith>(options: {
|
|
4
|
+
resolveWith?: any;
|
|
5
|
+
useResolveWith: () => ResolveWith;
|
|
6
|
+
createRouter: CreateRouter<ResolveWith>;
|
|
7
|
+
}): ServerSpout<Record<string, unknown>, {
|
|
8
|
+
matchedRoutes: Route<ResolveWith>[];
|
|
9
|
+
} & {
|
|
10
|
+
router: RouteController<Route<ResolveWith, any>>;
|
|
11
|
+
}>;
|
|
12
|
+
//# sourceMappingURL=router.server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"router.server.d.ts","sourceRoot":"","sources":["../../src/spouts/router.server.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAiB,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAIvE,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEzD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,WAAW,EAAE,OAAO,EAAE;IACxD,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,cAAc,EAAE,MAAM,WAAW,CAAC;IAClC,YAAY,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;CACzC,GAAG,WAAW,CACb,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvB;IACE,aAAa,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC;CACrC,GAAG;IACF,MAAM,EAAE,eAAe,CAAC,KAAK,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,CAAC;CAClD,CACF,CAqCA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
import { Route, RouteController } from '@anansi/router';
|
|
4
|
+
import { Request, Response } from 'express';
|
|
5
|
+
import { History } from 'history';
|
|
6
|
+
import { IncomingMessage, ServerResponse } from 'http';
|
|
7
|
+
import type { StatsCompilation } from 'webpack';
|
|
8
|
+
export type ServerProps = {
|
|
9
|
+
req: Request | IncomingMessage;
|
|
10
|
+
res: Response | ServerResponse;
|
|
11
|
+
clientManifest: StatsCompilation;
|
|
12
|
+
nonce: string;
|
|
13
|
+
};
|
|
14
|
+
export type ResolveProps = {
|
|
15
|
+
app: JSX.Element;
|
|
16
|
+
};
|
|
17
|
+
export type CreateRouter<T> = (history: History) => RouteController<Route<T, any>>;
|
|
18
|
+
export type ServerSpout<NeededProps extends Record<string, unknown> = Record<string, unknown>, ProvidedProps extends Record<string, unknown> = Record<string, unknown>, NeededNext extends Record<string, unknown> = Record<string, unknown>> = <N extends NeededNext & ResolveProps, I extends ServerProps>(next: (props: I & ProvidedProps) => Promise<N>) => (props: NeededProps & I) => Promise<N & ProvidedProps>;
|
|
19
|
+
export type ClientSpout<NeededProps extends Record<string, unknown> = Record<string, unknown>, ProvidedProps extends Record<string, unknown> = Record<string, unknown>, NeededNext extends Record<string, unknown> = Record<string, unknown>> = <N extends NeededNext & ResolveProps, I>(next: (props: I & ProvidedProps) => Promise<N>) => (props: NeededProps & I) => Promise<N & ProvidedProps>;
|
|
20
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/spouts/types.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAGhD,MAAM,MAAM,WAAW,GAAG;IACxB,GAAG,EAAE,OAAO,GAAG,eAAe,CAAC;IAC/B,GAAG,EAAE,QAAQ,GAAG,cAAc,CAAC;IAC/B,cAAc,EAAE,gBAAgB,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAGF,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,EAAE,GAAG,CAAC,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAC5B,OAAO,EAAE,OAAO,KACb,eAAe,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;AAGpC,MAAM,MAAM,WAAW,CACrB,WAAW,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACrE,aAAa,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvE,UAAU,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAClE,CAAC,CAAC,SAAS,UAAU,GAAG,YAAY,EAAE,CAAC,SAAS,WAAW,EAC7D,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,aAAa,KAAK,OAAO,CAAC,CAAC,CAAC,KAC3C,CAAC,KAAK,EAAE,WAAW,GAAG,CAAC,KAAK,OAAO,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC;AAG5D,MAAM,MAAM,WAAW,CACrB,WAAW,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACrE,aAAa,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvE,UAAU,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAClE,CAAC,CAAC,SAAS,UAAU,GAAG,YAAY,EAAE,CAAC,EACzC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,aAAa,KAAK,OAAO,CAAC,CAAC,CAAC,KAC3C,CAAC,KAAK,EAAE,WAAW,GAAG,CAAC,KAAK,OAAO,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anansi/core",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.2",
|
|
4
4
|
"description": "React 18 Framework",
|
|
5
5
|
"homepage": "https://github.com/ntucker/anansi/tree/master/packages/core#readme",
|
|
6
6
|
"repository": {
|
|
@@ -65,43 +65,43 @@
|
|
|
65
65
|
"browser"
|
|
66
66
|
],
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@anansi/babel-preset": "3.4.
|
|
68
|
+
"@anansi/babel-preset": "3.4.1",
|
|
69
69
|
"@anansi/browserslist-config": "1.4.1",
|
|
70
|
-
"@anansi/webpack-config": "14.1.
|
|
70
|
+
"@anansi/webpack-config": "14.1.2",
|
|
71
71
|
"@babel/cli": "7.20.7",
|
|
72
72
|
"@babel/core": "7.20.12",
|
|
73
73
|
"@types/compression": "1.7.2",
|
|
74
74
|
"@types/source-map-support": "0.5.6",
|
|
75
75
|
"@types/tmp": "0.2.3",
|
|
76
76
|
"@types/webpack-hot-middleware": "2.25.6",
|
|
77
|
-
"jest": "29.
|
|
78
|
-
"rimraf": "4.1.
|
|
77
|
+
"jest": "29.4.1",
|
|
78
|
+
"rimraf": "4.1.2",
|
|
79
79
|
"webpack": "5.75.0",
|
|
80
80
|
"webpack-cli": "5.0.1"
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"@anansi/router": "^0.7.
|
|
83
|
+
"@anansi/router": "^0.7.11",
|
|
84
84
|
"@babel/runtime": "^7.17.0",
|
|
85
|
-
"@rest-hooks/ssr": "^0.7.
|
|
86
|
-
"chalk": "^4.
|
|
85
|
+
"@rest-hooks/ssr": "^0.7.7",
|
|
86
|
+
"chalk": "^4.1.2",
|
|
87
87
|
"compression": "^1.7.4",
|
|
88
88
|
"cross-fetch": "^3.1.5",
|
|
89
|
-
"fs-require": "^1.
|
|
89
|
+
"fs-require": "^1.6.0",
|
|
90
90
|
"history": "^5.3.0",
|
|
91
91
|
"http-proxy-middleware": "^2.0.6",
|
|
92
|
-
"memfs": "^3.4.
|
|
93
|
-
"ora": "^5.
|
|
94
|
-
"redux": "^4.1
|
|
92
|
+
"memfs": "^3.4.13",
|
|
93
|
+
"ora": "^5.4.1",
|
|
94
|
+
"redux": "^4.2.1",
|
|
95
95
|
"source-map-support": "^0.5.21",
|
|
96
96
|
"tmp": "^0.2.1",
|
|
97
97
|
"unionfs": "^4.4.0",
|
|
98
|
-
"webpack-dev-server": "^4.
|
|
98
|
+
"webpack-dev-server": "^4.11.1",
|
|
99
99
|
"whatwg-fetch": "^3.6.2"
|
|
100
100
|
},
|
|
101
101
|
"peerDependencies": {
|
|
102
102
|
"@ant-design/cssinjs": "^1.5.1",
|
|
103
|
-
"@rest-hooks/react": "^
|
|
104
|
-
"@rest-hooks/redux": "^
|
|
103
|
+
"@rest-hooks/react": "^6.0.0 || ^7.0.0",
|
|
104
|
+
"@rest-hooks/redux": "^6.3.0 || ^7.0.0",
|
|
105
105
|
"@types/react": "^17.0.40 || ^18.0.0-0",
|
|
106
106
|
"@types/react-dom": "^17.0.40 || ^18.0.0-0",
|
|
107
107
|
"react": "^18.0.0-0",
|
package/lib/spouts/antd.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
exports.__esModule = true;
|
|
5
|
-
exports.default = antdSpout;
|
|
6
|
-
var _jsx2 = _interopRequireDefault(require("@babel/runtime/helpers/jsx"));
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _cssinjs = require("@ant-design/cssinjs");
|
|
9
|
-
function antdSpout() {
|
|
10
|
-
return next => async props => {
|
|
11
|
-
const nextProps = await next(props);
|
|
12
|
-
return {
|
|
13
|
-
...nextProps,
|
|
14
|
-
app: /*#__PURE__*/(0, _jsx2.default)(_cssinjs.StyleProvider, {}, void 0, nextProps.app)
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJhbnRkU3BvdXQiLCJuZXh0IiwicHJvcHMiLCJuZXh0UHJvcHMiLCJhcHAiXSwic291cmNlcyI6WyIuLi8uLi9zcmMvc3BvdXRzL2FudGQudHN4Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFN0eWxlUHJvdmlkZXIgfSBmcm9tICdAYW50LWRlc2lnbi9jc3NpbmpzJztcblxuaW1wb3J0IHR5cGUgeyBDbGllbnRTcG91dCB9IGZyb20gJy4vdHlwZXMnO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBhbnRkU3BvdXQoKTogQ2xpZW50U3BvdXQge1xuICByZXR1cm4gbmV4dCA9PiBhc3luYyBwcm9wcyA9PiB7XG4gICAgY29uc3QgbmV4dFByb3BzID0gYXdhaXQgbmV4dChwcm9wcyk7XG5cbiAgICByZXR1cm4ge1xuICAgICAgLi4ubmV4dFByb3BzLFxuICAgICAgYXBwOiA8U3R5bGVQcm92aWRlcj57bmV4dFByb3BzLmFwcH08L1N0eWxlUHJvdmlkZXI+LFxuICAgIH07XG4gIH07XG59XG4iXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBQTtBQUllLFNBQVNBLFNBQVMsR0FBZ0I7RUFDL0MsT0FBT0MsSUFBSSxJQUFJLE1BQU1DLEtBQUssSUFBSTtJQUM1QixNQUFNQyxTQUFTLEdBQUcsTUFBTUYsSUFBSSxDQUFDQyxLQUFLLENBQUM7SUFFbkMsT0FBTztNQUNMLEdBQUdDLFNBQVM7TUFDWkMsR0FBRyxlQUFFLG1CQUFDLHNCQUFhLGNBQUVELFNBQVMsQ0FBQ0MsR0FBRztJQUNwQyxDQUFDO0VBQ0gsQ0FBQztBQUNIIn0=
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.default = documentSpout;
|
|
5
|
-
function documentSpout(options) {
|
|
6
|
-
return next => async props => {
|
|
7
|
-
const nextProps = await next(props);
|
|
8
|
-
return nextProps;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJkb2N1bWVudFNwb3V0Iiwib3B0aW9ucyIsIm5leHQiLCJwcm9wcyIsIm5leHRQcm9wcyJdLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zcG91dHMvZG9jdW1lbnQgY29weS50c3giXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBSb3V0ZSB9IGZyb20gJ0BhbmFuc2kvcm91dGVyJztcbmltcG9ydCBSZWFjdCBmcm9tICdyZWFjdCc7XG5cbmltcG9ydCB0eXBlIHsgQ2xpZW50U3BvdXQgfSBmcm9tICcuL3R5cGVzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gZG9jdW1lbnRTcG91dChvcHRpb25zOiB7XG4gIGhlYWQ/OiBSZWFjdC5SZWFjdE5vZGU7XG4gIHRpdGxlOiBzdHJpbmc7XG59KTogQ2xpZW50U3BvdXQge1xuICByZXR1cm4gbmV4dCA9PiBhc3luYyBwcm9wcyA9PiB7XG4gICAgY29uc3QgbmV4dFByb3BzID0gYXdhaXQgbmV4dChwcm9wcyk7XG5cbiAgICByZXR1cm4gbmV4dFByb3BzO1xuICB9O1xufVxuIl0sIm1hcHBpbmdzIjoiOzs7O0FBS2UsU0FBU0EsYUFBYSxDQUFDQyxPQUdyQyxFQUFlO0VBQ2QsT0FBT0MsSUFBSSxJQUFJLE1BQU1DLEtBQUssSUFBSTtJQUM1QixNQUFNQyxTQUFTLEdBQUcsTUFBTUYsSUFBSSxDQUFDQyxLQUFLLENBQUM7SUFFbkMsT0FBT0MsU0FBUztFQUNsQixDQUFDO0FBQ0gifQ==
|