mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-20 21:23:23 +00:00
fix: stabilize matrix and teams ci assertions
This commit is contained in:
@@ -57,7 +57,7 @@ const meta = {
|
||||
selectionLabel: "Microsoft Teams (Bot Framework)",
|
||||
docsPath: "/channels/msteams",
|
||||
docsLabel: "msteams",
|
||||
blurb: "Bot Framework; enterprise support.",
|
||||
blurb: "Teams SDK; enterprise support.",
|
||||
aliases: ["teams"],
|
||||
order: 60,
|
||||
} as const;
|
||||
|
||||
@@ -130,7 +130,7 @@ const createMSTeamsPlugin = (params: { outbound: ChannelOutboundAdapter }): Chan
|
||||
label: "Microsoft Teams",
|
||||
selectionLabel: "Microsoft Teams (Bot Framework)",
|
||||
docsPath: "/channels/msteams",
|
||||
blurb: "Bot Framework; enterprise support.",
|
||||
blurb: "Teams SDK; enterprise support.",
|
||||
},
|
||||
capabilities: { chatTypes: ["direct"] },
|
||||
config: {
|
||||
|
||||
@@ -118,7 +118,7 @@ describe("config doc baseline integration", () => {
|
||||
});
|
||||
expect(byPath.get("channels.msteams")).toMatchObject({
|
||||
label: "Microsoft Teams",
|
||||
help: "Bot Framework; enterprise support.",
|
||||
help: "Teams SDK; enterprise support.",
|
||||
});
|
||||
expect(byPath.get("channels.matrix")).toMatchObject({
|
||||
label: "Matrix",
|
||||
|
||||
@@ -48,7 +48,7 @@ const createMSTeamsPlugin = (params?: { aliases?: string[] }): ChannelPlugin =>
|
||||
label: "Microsoft Teams",
|
||||
selectionLabel: "Microsoft Teams (Bot Framework)",
|
||||
docsPath: "/channels/msteams",
|
||||
blurb: "Bot Framework; enterprise support.",
|
||||
blurb: "Teams SDK; enterprise support.",
|
||||
aliases: params?.aliases,
|
||||
},
|
||||
capabilities: { chatTypes: ["direct"] },
|
||||
|
||||
@@ -37,15 +37,32 @@ export async function writeTextAtomic(
|
||||
mkdirOptions.mode = options.ensureDirMode;
|
||||
}
|
||||
await fs.mkdir(path.dirname(filePath), mkdirOptions);
|
||||
const parentDir = path.dirname(filePath);
|
||||
const tmp = `${filePath}.${randomUUID()}.tmp`;
|
||||
try {
|
||||
await fs.writeFile(tmp, payload, { encoding: "utf8", mode });
|
||||
const tmpHandle = await fs.open(tmp, "w", mode);
|
||||
try {
|
||||
await tmpHandle.writeFile(payload, { encoding: "utf8" });
|
||||
await tmpHandle.sync();
|
||||
} finally {
|
||||
await tmpHandle.close().catch(() => undefined);
|
||||
}
|
||||
try {
|
||||
await fs.chmod(tmp, mode);
|
||||
} catch {
|
||||
// best-effort; ignore on platforms without chmod
|
||||
}
|
||||
await fs.rename(tmp, filePath);
|
||||
try {
|
||||
const dirHandle = await fs.open(parentDir, "r");
|
||||
try {
|
||||
await dirHandle.sync();
|
||||
} finally {
|
||||
await dirHandle.close().catch(() => undefined);
|
||||
}
|
||||
} catch {
|
||||
// best-effort; some platforms/filesystems do not support syncing directories.
|
||||
}
|
||||
try {
|
||||
await fs.chmod(filePath, mode);
|
||||
} catch {
|
||||
|
||||
@@ -77,7 +77,7 @@ export const createMSTeamsTestPluginBase = (): Pick<
|
||||
meta: {
|
||||
...base.meta,
|
||||
selectionLabel: "Microsoft Teams (Bot Framework)",
|
||||
blurb: "Bot Framework; enterprise support.",
|
||||
blurb: "Teams SDK; enterprise support.",
|
||||
aliases: ["teams"],
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user