mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 20:13:30 +01:00
feat(core): http-only wrapper (#9281)
This commit is contained in:
@@ -17,9 +17,16 @@
|
|||||||
"module": "./dist/index.mjs",
|
"module": "./dist/index.mjs",
|
||||||
"typings": "./dist/index.d.ts",
|
"typings": "./dist/index.d.ts",
|
||||||
"exports": {
|
"exports": {
|
||||||
"import": "./dist/index.mjs",
|
".": {
|
||||||
"require": "./dist/index.js",
|
"import": "./dist/index.mjs",
|
||||||
"types": "./dist/index.d.ts"
|
"require": "./dist/index.js",
|
||||||
|
"types": "./dist/index.d.ts"
|
||||||
|
},
|
||||||
|
"./http-only": {
|
||||||
|
"import": "./dist/http-only.mjs",
|
||||||
|
"require": "./dist/http-only.js",
|
||||||
|
"types": "./dist/http-only.d.ts"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"directories": {
|
"directories": {
|
||||||
"lib": "src",
|
"lib": "src",
|
||||||
@@ -59,6 +66,7 @@
|
|||||||
"@types/node": "16.18.23",
|
"@types/node": "16.18.23",
|
||||||
"@vitest/coverage-c8": "^0.29.8",
|
"@vitest/coverage-c8": "^0.29.8",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
|
"esbuild-plugin-version-injector": "^1.1.0",
|
||||||
"eslint": "^8.37.0",
|
"eslint": "^8.37.0",
|
||||||
"eslint-config-neon": "^0.1.41",
|
"eslint-config-neon": "^0.1.41",
|
||||||
"eslint-formatter-pretty": "^5.0.0",
|
"eslint-formatter-pretty": "^5.0.0",
|
||||||
|
|||||||
11
packages/core/src/http-only/index.ts
Normal file
11
packages/core/src/http-only/index.ts
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
export * from '../api/index.js';
|
||||||
|
export * from '../util/index.js';
|
||||||
|
|
||||||
|
export * from 'discord-api-types/v10';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The {@link https://github.com/discordjs/discord.js/blob/main/packages/core/#readme | @discordjs/core} version
|
||||||
|
* that you are currently using.
|
||||||
|
*/
|
||||||
|
// This needs to explicitly be `string` so it is not typed as a "const string" that gets injected by esbuild
|
||||||
|
export const version = '[VI]{{inject}}[/VI]' as string;
|
||||||
@@ -3,3 +3,10 @@ export * from './client.js';
|
|||||||
export * from './util/index.js';
|
export * from './util/index.js';
|
||||||
|
|
||||||
export * from 'discord-api-types/v10';
|
export * from 'discord-api-types/v10';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The {@link https://github.com/discordjs/discord.js/blob/main/packages/core/#readme | @discordjs/core} version
|
||||||
|
* that you are currently using.
|
||||||
|
*/
|
||||||
|
// This needs to explicitly be `string` so it is not typed as a "const string" that gets injected by esbuild
|
||||||
|
export const version = '[VI]{{inject}}[/VI]' as string;
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
import { esbuildPluginVersionInjector } from 'esbuild-plugin-version-injector';
|
||||||
import { createTsupConfig } from '../../tsup.config.js';
|
import { createTsupConfig } from '../../tsup.config.js';
|
||||||
|
|
||||||
export default createTsupConfig({});
|
export default createTsupConfig({
|
||||||
|
entry: {
|
||||||
|
index: 'src/index.ts',
|
||||||
|
'http-only': 'src/http-only/index.ts',
|
||||||
|
},
|
||||||
|
esbuildPlugins: [esbuildPluginVersionInjector()],
|
||||||
|
});
|
||||||
|
|||||||
@@ -2007,6 +2007,7 @@ __metadata:
|
|||||||
"@vladfrangu/async_event_emitter": ^2.1.4
|
"@vladfrangu/async_event_emitter": ^2.1.4
|
||||||
cross-env: ^7.0.3
|
cross-env: ^7.0.3
|
||||||
discord-api-types: ^0.37.37
|
discord-api-types: ^0.37.37
|
||||||
|
esbuild-plugin-version-injector: ^1.1.0
|
||||||
eslint: ^8.37.0
|
eslint: ^8.37.0
|
||||||
eslint-config-neon: ^0.1.41
|
eslint-config-neon: ^0.1.41
|
||||||
eslint-formatter-pretty: ^5.0.0
|
eslint-formatter-pretty: ^5.0.0
|
||||||
|
|||||||
Reference in New Issue
Block a user