refactor: Removed the use of d.ts files to support SDK generation for public plugins
This commit is contained in:
parent
06b7e4074d
commit
2683d46b16
114 changed files with 408 additions and 257 deletions
4
scripts/sdk/package.json
Normal file
4
scripts/sdk/package.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"name": "gameflow-sdk",
|
||||
"types": "index.d.ts"
|
||||
}
|
||||
18
scripts/sdk/sdk.ts
Normal file
18
scripts/sdk/sdk.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { SettingsType } from '@/shared/constants';
|
||||
import Conf from 'conf';
|
||||
import { AppEventMap } from '../../src/bun/types/types';
|
||||
import EventEmitter from "node:events";
|
||||
import { TaskQueue } from '@/bun/api/task-queue';
|
||||
|
||||
export * from '../../src/bun/types/types.schema';
|
||||
export * from '../../src/bun/types/types';
|
||||
export * from '../../src/bun/api/hooks/app';
|
||||
export * from '../../src/shared/constants';
|
||||
export * from '../../src/shared/types';
|
||||
export * from '../../src/shared/utils';
|
||||
|
||||
export declare const config: Conf<SettingsType>;
|
||||
export declare let events: EventEmitter<AppEventMap>;
|
||||
export declare let taskQueue: TaskQueue;
|
||||
|
||||
export { };
|
||||
47
scripts/sdk/sdk.tsconfig.json
Normal file
47
scripts/sdk/sdk.tsconfig.json
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"useDefineForClassFields": true,
|
||||
"lib": [
|
||||
"ES2024"
|
||||
],
|
||||
"module": "ESNext",
|
||||
"skipLibCheck": true,
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"isolatedModules": true,
|
||||
"moduleDetection": "force",
|
||||
"emitDeclarationOnly": true,
|
||||
"declaration": true,
|
||||
"strict": true,
|
||||
"outDir": "../../dist-sdk/sdk",
|
||||
"types": [
|
||||
"node"
|
||||
],
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"../../src/*"
|
||||
],
|
||||
"~/*": [
|
||||
"../../*"
|
||||
],
|
||||
"@shared/*": [
|
||||
"../../src/shared/*"
|
||||
],
|
||||
"@clients/*": [
|
||||
"../../src/clients/*"
|
||||
],
|
||||
"@schema/*": [
|
||||
"../../src/bun/api/schema/*"
|
||||
],
|
||||
"@queries/*": [
|
||||
"../../src/mainview/scripts/queries/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"../../src/bun/api/hooks",
|
||||
"../../src/bun/types",
|
||||
"../../src/shared"
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue