mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
feat(core): http-only wrapper (#9281)
This commit is contained in:
@@ -17,10 +17,17 @@
|
||||
"module": "./dist/index.mjs",
|
||||
"typings": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/index.mjs",
|
||||
"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": {
|
||||
"lib": "src",
|
||||
"test": "__tests__"
|
||||
@@ -59,6 +66,7 @@
|
||||
"@types/node": "16.18.23",
|
||||
"@vitest/coverage-c8": "^0.29.8",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.1.0",
|
||||
"eslint": "^8.37.0",
|
||||
"eslint-config-neon": "^0.1.41",
|
||||
"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 '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';
|
||||
|
||||
export default createTsupConfig({});
|
||||
export default createTsupConfig({
|
||||
entry: {
|
||||
index: 'src/index.ts',
|
||||
'http-only': 'src/http-only/index.ts',
|
||||
},
|
||||
esbuildPlugins: [esbuildPluginVersionInjector()],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user