@fecommunity/reactpress-template-hello-world 1.0.0 → 3.0.0

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.
Files changed (59) hide show
  1. package/.next/build-manifest.json +35 -0
  2. package/.next/cache/.tsbuildinfo +1 -0
  3. package/.next/cache/webpack/client-development/0.pack +0 -0
  4. package/.next/cache/webpack/client-development/1.pack +0 -0
  5. package/.next/cache/webpack/client-development/index.pack +0 -0
  6. package/.next/cache/webpack/client-development/index.pack.old +0 -0
  7. package/.next/cache/webpack/client-development-fallback/0.pack +0 -0
  8. package/.next/cache/webpack/client-development-fallback/1.pack +0 -0
  9. package/.next/cache/webpack/client-development-fallback/index.pack +0 -0
  10. package/.next/cache/webpack/client-development-fallback/index.pack.old +0 -0
  11. package/.next/cache/webpack/client-production/0.pack +0 -0
  12. package/.next/cache/webpack/client-production/index.pack +0 -0
  13. package/.next/cache/webpack/server-development/0.pack +0 -0
  14. package/.next/cache/webpack/server-development/1.pack +0 -0
  15. package/.next/cache/webpack/server-development/2.pack +0 -0
  16. package/.next/cache/webpack/server-development/index.pack +0 -0
  17. package/.next/cache/webpack/server-development/index.pack.old +0 -0
  18. package/.next/cache/webpack/server-production/0.pack +0 -0
  19. package/.next/cache/webpack/server-production/1.pack +0 -0
  20. package/.next/cache/webpack/server-production/2.pack +0 -0
  21. package/.next/cache/webpack/server-production/index.pack +0 -0
  22. package/.next/cache/webpack/server-production/index.pack.old +0 -0
  23. package/.next/fallback-build-manifest.json +27 -0
  24. package/.next/package.json +1 -0
  25. package/.next/react-loadable-manifest.json +1 -0
  26. package/.next/server/_error.js +66 -0
  27. package/.next/server/middleware-manifest.json +6 -0
  28. package/.next/server/pages/404.js +629 -0
  29. package/.next/server/pages/_app.js +76 -0
  30. package/.next/server/pages/_document.js +126 -0
  31. package/.next/server/pages/_error.js +66 -0
  32. package/.next/server/pages/index.js +1697 -0
  33. package/.next/server/pages-manifest.json +7 -0
  34. package/.next/server/webpack-runtime.js +168 -0
  35. package/.next/static/chunks/amp.js +961 -0
  36. package/.next/static/chunks/fallback/amp.js +961 -0
  37. package/.next/static/chunks/fallback/main.js +1266 -0
  38. package/.next/static/chunks/fallback/pages/_app.js +28 -0
  39. package/.next/static/chunks/fallback/pages/_error.js +28 -0
  40. package/.next/static/chunks/fallback/react-refresh.js +62 -0
  41. package/.next/static/chunks/fallback/webpack.js +1208 -0
  42. package/.next/static/chunks/main.js +1266 -0
  43. package/.next/static/chunks/pages/404.js +178 -0
  44. package/.next/static/chunks/pages/_app.js +28 -0
  45. package/.next/static/chunks/pages/_error.js +28 -0
  46. package/.next/static/chunks/polyfills.js +1 -0
  47. package/.next/static/chunks/react-refresh.js +62 -0
  48. package/.next/static/chunks/webpack.js +1220 -0
  49. package/.next/static/development/_buildManifest.js +1 -0
  50. package/.next/static/development/_ssgManifest.js +1 -0
  51. package/.next/static/webpack/82e97587a3709bd9.webpack.hot-update.json +1 -0
  52. package/.next/static/webpack/webpack.82e97587a3709bd9.hot-update.js +43 -0
  53. package/.next/trace +12 -0
  54. package/README.md +6 -6
  55. package/next-env.d.ts +1 -1
  56. package/package.json +2 -2
  57. package/pages/about.tsx +2 -2
  58. package/pages/index.tsx +2 -2
  59. package/pages/toolkit-demo.tsx +4 -4
package/README.md CHANGED
@@ -62,10 +62,10 @@ This template demonstrates how to use all aspects of the ReactPress Toolkit:
62
62
  ### 1. API Client Usage
63
63
 
64
64
  ```typescript
65
- import { createApiInstance } from '@fecommunity/reactpress-toolkit';
65
+ import { http } from '@fecommunity/reactpress-toolkit';
66
66
 
67
67
  // Create a custom API instance
68
- const customApi = createApiInstance({
68
+ const customApi = http.createApiInstance({
69
69
  baseURL: 'https://api.gaoredu.com/'
70
70
  });
71
71
 
@@ -111,14 +111,14 @@ if (utils.ApiError.isInstance(error)) {
111
111
  The toolkit demo page shows a complete example of using all toolkit features:
112
112
 
113
113
  ```typescript
114
- import { createApiInstance } from '@fecommunity/reactpress-toolkit';
114
+ import { http } from '@fecommunity/reactpress-toolkit';
115
115
  import { types, utils } from '@fecommunity/reactpress-toolkit';
116
116
 
117
117
  // Type definitions
118
118
  type IArticle = types.IArticle;
119
119
 
120
120
  // API client with retry mechanism
121
- const customApi = createApiInstance({
121
+ const customApi = http.createApiInstance({
122
122
  baseURL: 'https://api.gaoredu.com/',
123
123
  retry: {
124
124
  retries: 3,
@@ -136,8 +136,8 @@ const formatDate = (dateString: string) => {
136
136
  const handleApiError = (error: any) => {
137
137
  if (utils.ApiError.isInstance(error)) {
138
138
  console.error(`API Error ${error.code}: ${error.message}`);
139
- // Log to monitoring service
140
- logErrorToService(error);
139
+ // Log error
140
+ logError(error);
141
141
  }
142
142
  };
143
143
  ```
package/next-env.d.ts CHANGED
@@ -2,4 +2,4 @@
2
2
  /// <reference types="next/image-types/global" />
3
3
 
4
4
  // NOTE: This file should not be edited
5
- // see https://nextjs.org/docs/basic-features/typescript for more information.
5
+ // see https://nextjs.org/docs/basic-features/typescript for more information.
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@fecommunity/reactpress-template-hello-world",
3
- "version": "1.0.0",
3
+ "version": "3.0.0",
4
4
  "description": "A minimal hello-world template for ReactPress using Next.js Pages Router",
5
5
  "main": "index.js",
6
6
  "bin": {
7
7
  "create-reactpress-hello-world": "./bin/create-hello-world.js"
8
8
  },
9
9
  "dependencies": {
10
- "@fecommunity/reactpress-toolkit": "1.0.0",
10
+ "@fecommunity/reactpress-toolkit": "3.0.0",
11
11
  "next": "^12.3.4",
12
12
  "react": "17.0.2",
13
13
  "react-dom": "17.0.2",
package/pages/about.tsx CHANGED
@@ -1,13 +1,13 @@
1
1
  import { GetStaticProps } from 'next';
2
2
  import Head from 'next/head';
3
3
  import Link from 'next/link';
4
- import { createApiInstance } from '@fecommunity/reactpress-toolkit';
4
+ import { http } from '@fecommunity/reactpress-toolkit';
5
5
  import { types, utils } from '@fecommunity/reactpress-toolkit';
6
6
  import Header from '../components/Header';
7
7
  import Footer from '../components/Footer';
8
8
 
9
9
  // Create a custom API instance with the desired baseURL
10
- const customApi = createApiInstance({
10
+ const customApi = http.createApiInstance({
11
11
  baseURL: 'https://api.gaoredu.com/'
12
12
  });
13
13
 
package/pages/index.tsx CHANGED
@@ -1,13 +1,13 @@
1
1
  import { GetStaticProps } from 'next';
2
2
  import Head from 'next/head';
3
3
  import Link from 'next/link';
4
- import { createApiInstance } from '@fecommunity/reactpress-toolkit';
4
+ import { http } from '@fecommunity/reactpress-toolkit';
5
5
  import { types, utils } from '@fecommunity/reactpress-toolkit';
6
6
  import Header from '../components/Header';
7
7
  import Footer from '../components/Footer';
8
8
 
9
9
  // Create a custom API instance with the desired baseURL
10
- const customApi = createApiInstance({
10
+ const customApi = http.createApiInstance({
11
11
  baseURL: 'https://api.gaoredu.com/'
12
12
  });
13
13
 
@@ -1,12 +1,12 @@
1
1
  import { GetStaticProps } from 'next';
2
2
  import Head from 'next/head';
3
3
  import Link from 'next/link';
4
- import { types, utils, createApiInstance } from '@fecommunity/reactpress-toolkit';
4
+ import { http, api, types, utils } from '@fecommunity/reactpress-toolkit';
5
5
  import Header from '../components/Header';
6
6
  import Footer from '../components/Footer';
7
7
 
8
8
  // Create a custom API instance with the desired baseURL
9
- const customApi = createApiInstance({
9
+ const customApi = http.createApiInstance({
10
10
  baseURL: 'https://api.gaoredu.com/',
11
11
  });
12
12
 
@@ -65,7 +65,7 @@ export default function ToolkitDemo({ articles, categories, tags, stats }: Toolk
65
65
  <div className="features-grid">
66
66
  <div className="feature-card">
67
67
  <h3 className="feature-title">API Client</h3>
68
- <p className="feature-description">Use createApiInstance() to create custom API clients</p>
68
+ <p className="feature-description">Use http.createApiInstance() to create custom API clients</p>
69
69
  </div>
70
70
  <div className="feature-card">
71
71
  <h3 className="feature-title">Types</h3>
@@ -487,4 +487,4 @@ export const getStaticProps: GetStaticProps<ToolkitDemoProps> = async () => {
487
487
  revalidate: 60,
488
488
  };
489
489
  }
490
- };
490
+ };