fix(sdk): restore native ESM imports and action exports
This commit is contained in:
33 files changed
+482
-81
No files matched your search
@@ -13,9 +13,9 @@ import type {
|
||||
ShareSegment,
|
||||
VideoSegment,
|
||||
XmlSegment,
|
||||
} from '../types/index';
|
||||
import { segmentsToCQString } from './cq-format';
|
||||
import { segments } from './segments';
|
||||
} from '../types/index.js';
|
||||
import { segmentsToCQString } from './cq-format.js';
|
||||
import { segments } from './segments.js';
|
||||
|
||||
export interface MessageChainSender {
|
||||
sendGroupMessage(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { AnyMessageSegment } from '../types/index';
|
||||
import type { AnyMessageSegment } from '../types/index.js';
|
||||
|
||||
export function escapeCqText(text: string): string {
|
||||
return text.replaceAll('&', '&').replaceAll('[', '[').replaceAll(']', ']');
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { normalizeMessage, chain } from './chain';
|
||||
import { escapeCqText, segmentsToCQString } from './cq-format';
|
||||
import { segments } from './segments';
|
||||
import type { AnyMessageSegment, FaceSegment, OutgoingMessage } from '../types/index';
|
||||
import { normalizeMessage, chain } from './chain.js';
|
||||
import { escapeCqText, segmentsToCQString } from './cq-format.js';
|
||||
import { segments } from './segments.js';
|
||||
import type { AnyMessageSegment, FaceSegment, OutgoingMessage } from '../types/index.js';
|
||||
|
||||
const CQ_REGEX = /\[CQ:([a-zA-Z0-9_.-]+)(?:,([^\]]*))?\]/g;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { segments } from './segments';
|
||||
import { segments } from './segments.js';
|
||||
|
||||
export { MessageChain } from './chain';
|
||||
export { MessageChain } from './chain.js';
|
||||
export {
|
||||
at,
|
||||
atAll,
|
||||
@@ -23,9 +23,9 @@ export {
|
||||
text,
|
||||
video,
|
||||
xml,
|
||||
} from './chain';
|
||||
export { escapeCqParam, escapeCqText } from './cq-format';
|
||||
export { fromCQString, parseSegments, toCQString } from './cq';
|
||||
} from './chain.js';
|
||||
export { escapeCqParam, escapeCqText } from './cq-format.js';
|
||||
export { fromCQString, parseSegments, toCQString } from './cq.js';
|
||||
export { segments };
|
||||
|
||||
export const message = {
|
||||
|
||||
@@ -19,7 +19,7 @@ import type {
|
||||
TextSegment,
|
||||
VideoSegment,
|
||||
XmlSegment,
|
||||
} from '../types/index';
|
||||
} from '../types/index.js';
|
||||
|
||||
function seg<TType extends string, TData extends Record<string, unknown>>(
|
||||
type: TType,
|
||||
|
||||
Reference in new issue
Block a user