



























@@ -70,6 +70,25 @@ describe("bundled plugin public surface runtime", () => {
7070).toBe(sourceModulePath);
7171});
727273+it("falls back from an incomplete package dist-runtime override to packaged dist", () => {
74+const packageRoot = createTempDir();
75+const distModulePath = path.join(packageRoot, "dist", "extensions", "demo", "api.js");
76+fs.mkdirSync(path.dirname(distModulePath), { recursive: true });
77+fs.writeFileSync(distModulePath, "export const marker = 'dist';\n", "utf8");
78+79+const runtimeBundledPluginsDir = path.join(packageRoot, "dist-runtime", "extensions");
80+fs.mkdirSync(path.join(runtimeBundledPluginsDir, "demo"), { recursive: true });
81+82+expect(
83+resolveBundledPluginPublicSurfacePath({
84+rootDir: packageRoot,
85+bundledPluginsDir: runtimeBundledPluginsDir,
86+dirName: "demo",
87+artifactBasename: "api.js",
88+}),
89+).toBe(distModulePath);
90+});
91+7392it("allows plugin-local nested artifact paths", () => {
7493expect(normalizeBundledPluginArtifactSubpath("src/outbound-adapter.js")).toBe(
7594"src/outbound-adapter.js",
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。