@peam-ai/next 0.1.3 → 0.1.5
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/index.d.mts +19 -27
- package/dist/index.d.ts +19 -27
- package/dist/index.js +2666 -189
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2645 -186
- package/dist/index.mjs.map +1 -1
- package/dist/peam.adapter.js +19 -29
- package/dist/peam.adapter.js.map +1 -1
- package/dist/route.d.mts +0 -8
- package/dist/route.d.ts +0 -8
- package/dist/route.js +2582 -1
- package/dist/route.js.map +1 -1
- package/dist/route.mjs +2560 -1
- package/dist/route.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import { NextConfig
|
|
1
|
+
import { NextConfig } from 'next';
|
|
2
|
+
import { SearchExporterConfig } from '@peam-ai/search';
|
|
2
3
|
|
|
3
|
-
interface
|
|
4
|
+
interface PeamConfig {
|
|
4
5
|
/**
|
|
5
|
-
*
|
|
6
|
-
* @default '.peam'
|
|
6
|
+
* Search exporter configuration
|
|
7
|
+
* @default { type: 'fileBased', config: { indexPath: '.peam/index.json' } }
|
|
7
8
|
*/
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Filename for the search index
|
|
11
|
-
* @default 'index.json'
|
|
12
|
-
*/
|
|
13
|
-
indexFilename?: string;
|
|
9
|
+
searchExporter?: SearchExporterConfig;
|
|
14
10
|
/**
|
|
15
11
|
* Whether to respect robots.txt rules when indexing pages
|
|
16
12
|
* @default true
|
|
@@ -31,20 +27,6 @@ interface PeamAdapterConfig {
|
|
|
31
27
|
*/
|
|
32
28
|
exclude?: string[];
|
|
33
29
|
}
|
|
34
|
-
type ResolvedPeamAdapterConfig = Required<Omit<PeamAdapterConfig, 'robotsTxtPath'>> & {
|
|
35
|
-
robotsTxtPath?: string;
|
|
36
|
-
};
|
|
37
|
-
declare const defaultConfig: {
|
|
38
|
-
outputDir: string;
|
|
39
|
-
indexFilename: string;
|
|
40
|
-
respectRobotsTxt: true;
|
|
41
|
-
robotsTxtPath: undefined;
|
|
42
|
-
exclude: never[];
|
|
43
|
-
};
|
|
44
|
-
declare const getConfig: () => ResolvedPeamAdapterConfig;
|
|
45
|
-
declare function setNextConfig(nextConfig: NextConfig, peamConfig: PeamAdapterConfig): void;
|
|
46
|
-
|
|
47
|
-
declare function createPeamAdapter(config: ResolvedPeamAdapterConfig): NextAdapter;
|
|
48
30
|
|
|
49
31
|
/**
|
|
50
32
|
* Wraps Next.js config to enable Peam content extraction during build.
|
|
@@ -52,13 +34,23 @@ declare function createPeamAdapter(config: ResolvedPeamAdapterConfig): NextAdapt
|
|
|
52
34
|
* @example
|
|
53
35
|
* ```typescript
|
|
54
36
|
* // next.config.ts
|
|
55
|
-
* import
|
|
37
|
+
* import withPeam from '@peam-ai/next';
|
|
56
38
|
*
|
|
57
39
|
* export default withPeam()({
|
|
58
40
|
* // your Next.js config
|
|
59
41
|
* });
|
|
60
42
|
* ```
|
|
43
|
+
*
|
|
44
|
+
* Or with `require()`:
|
|
45
|
+
* ```javascript
|
|
46
|
+
* // next.config.js
|
|
47
|
+
* const withPeam = require('@peam-ai/next');
|
|
48
|
+
*
|
|
49
|
+
* module.exports = withPeam()({
|
|
50
|
+
* // your Next.js config
|
|
51
|
+
* });
|
|
52
|
+
* ```
|
|
61
53
|
*/
|
|
62
|
-
declare function withPeam(peamConfig?:
|
|
54
|
+
declare function withPeam(peamConfig?: PeamConfig): (nextConfig?: NextConfig) => NextConfig;
|
|
63
55
|
|
|
64
|
-
export {
|
|
56
|
+
export { withPeam as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import { NextConfig
|
|
1
|
+
import { NextConfig } from 'next';
|
|
2
|
+
import { SearchExporterConfig } from '@peam-ai/search';
|
|
2
3
|
|
|
3
|
-
interface
|
|
4
|
+
interface PeamConfig {
|
|
4
5
|
/**
|
|
5
|
-
*
|
|
6
|
-
* @default '.peam'
|
|
6
|
+
* Search exporter configuration
|
|
7
|
+
* @default { type: 'fileBased', config: { indexPath: '.peam/index.json' } }
|
|
7
8
|
*/
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Filename for the search index
|
|
11
|
-
* @default 'index.json'
|
|
12
|
-
*/
|
|
13
|
-
indexFilename?: string;
|
|
9
|
+
searchExporter?: SearchExporterConfig;
|
|
14
10
|
/**
|
|
15
11
|
* Whether to respect robots.txt rules when indexing pages
|
|
16
12
|
* @default true
|
|
@@ -31,20 +27,6 @@ interface PeamAdapterConfig {
|
|
|
31
27
|
*/
|
|
32
28
|
exclude?: string[];
|
|
33
29
|
}
|
|
34
|
-
type ResolvedPeamAdapterConfig = Required<Omit<PeamAdapterConfig, 'robotsTxtPath'>> & {
|
|
35
|
-
robotsTxtPath?: string;
|
|
36
|
-
};
|
|
37
|
-
declare const defaultConfig: {
|
|
38
|
-
outputDir: string;
|
|
39
|
-
indexFilename: string;
|
|
40
|
-
respectRobotsTxt: true;
|
|
41
|
-
robotsTxtPath: undefined;
|
|
42
|
-
exclude: never[];
|
|
43
|
-
};
|
|
44
|
-
declare const getConfig: () => ResolvedPeamAdapterConfig;
|
|
45
|
-
declare function setNextConfig(nextConfig: NextConfig, peamConfig: PeamAdapterConfig): void;
|
|
46
|
-
|
|
47
|
-
declare function createPeamAdapter(config: ResolvedPeamAdapterConfig): NextAdapter;
|
|
48
30
|
|
|
49
31
|
/**
|
|
50
32
|
* Wraps Next.js config to enable Peam content extraction during build.
|
|
@@ -52,13 +34,23 @@ declare function createPeamAdapter(config: ResolvedPeamAdapterConfig): NextAdapt
|
|
|
52
34
|
* @example
|
|
53
35
|
* ```typescript
|
|
54
36
|
* // next.config.ts
|
|
55
|
-
* import
|
|
37
|
+
* import withPeam from '@peam-ai/next';
|
|
56
38
|
*
|
|
57
39
|
* export default withPeam()({
|
|
58
40
|
* // your Next.js config
|
|
59
41
|
* });
|
|
60
42
|
* ```
|
|
43
|
+
*
|
|
44
|
+
* Or with `require()`:
|
|
45
|
+
* ```javascript
|
|
46
|
+
* // next.config.js
|
|
47
|
+
* const withPeam = require('@peam-ai/next');
|
|
48
|
+
*
|
|
49
|
+
* module.exports = withPeam()({
|
|
50
|
+
* // your Next.js config
|
|
51
|
+
* });
|
|
52
|
+
* ```
|
|
61
53
|
*/
|
|
62
|
-
declare function withPeam(peamConfig?:
|
|
54
|
+
declare function withPeam(peamConfig?: PeamConfig): (nextConfig?: NextConfig) => NextConfig;
|
|
63
55
|
|
|
64
|
-
export {
|
|
56
|
+
export { withPeam as default };
|