kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
feat: re-add cjs support, fixed "Error [ERR_REQUIRE_ESM]: require() of ES Module not supported."
rodzic
de113365c7
commit
72aec6bae1
14
package.json
14
package.json
|
@ -5,13 +5,13 @@
|
||||||
"author": "Travis Fischer <travis@transitivebullsh.it>",
|
"author": "Travis Fischer <travis@transitivebullsh.it>",
|
||||||
"repository": "transitive-bullshit/chatgpt-api",
|
"repository": "transitive-bullshit/chatgpt-api",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
|
||||||
"source": "./src/index.ts",
|
"source": "./src/index.ts",
|
||||||
"types": "./build/index.d.ts",
|
"types": "./build/index.d.ts",
|
||||||
|
"main": "./build/index.js",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
"import": "./build/index.js",
|
"import": "./build/index.mjs",
|
||||||
"default": "./build/index.js",
|
"require": "./build/index.js",
|
||||||
"types": "./build/index.d.ts"
|
"types": "./build/index.d.ts"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -37,15 +37,15 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"eventsource-parser": "^0.0.5",
|
"eventsource-parser": "^0.0.5",
|
||||||
"expiry-map": "^2.0.0",
|
"expiry-map": "^2.0.0",
|
||||||
"node-fetch": "2",
|
"node-fetch": "^2.6.7",
|
||||||
"remark": "^14.0.2",
|
"remark": "^13.0.0",
|
||||||
"strip-markdown": "^5.0.0",
|
"strip-markdown": "^4.2.0",
|
||||||
"uuid": "^9.0.0"
|
"uuid": "^9.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@trivago/prettier-plugin-sort-imports": "^4.0.0",
|
"@trivago/prettier-plugin-sort-imports": "^4.0.0",
|
||||||
"@types/node": "^18.11.9",
|
"@types/node": "^18.11.9",
|
||||||
"@types/node-fetch": "2",
|
"@types/node-fetch": "^2.6.2",
|
||||||
"@types/uuid": "^9.0.0",
|
"@types/uuid": "^9.0.0",
|
||||||
"del-cli": "^5.0.0",
|
"del-cli": "^5.0.0",
|
||||||
"dotenv-safe": "^8.2.0",
|
"dotenv-safe": "^8.2.0",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { remark } from 'remark'
|
import remark from 'remark'
|
||||||
import stripMarkdown from 'strip-markdown'
|
import stripMarkdown from 'strip-markdown'
|
||||||
|
|
||||||
export function markdownToText(markdown?: string): string {
|
export function markdownToText(markdown?: string): string {
|
||||||
|
|
|
@ -5,7 +5,7 @@ export default defineConfig({
|
||||||
outDir: 'build',
|
outDir: 'build',
|
||||||
target: 'node14',
|
target: 'node14',
|
||||||
platform: 'node',
|
platform: 'node',
|
||||||
format: ['esm'],
|
format: ['esm', 'cjs'],
|
||||||
splitting: false,
|
splitting: false,
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
minify: true,
|
minify: true,
|
||||||
|
|
Ładowanie…
Reference in New Issue