@module-federation/dts-plugin
Advanced tools
Comparing version 0.0.0-next-20250110094517 to 0.0.0-next-20250113031136
@@ -6,3 +6,3 @@ import { | ||
rpc_exports | ||
} from "./chunk-KBJKFH62.js"; | ||
} from "./chunk-BMDOZI3V.js"; | ||
import { | ||
@@ -23,3 +23,3 @@ DTSManager, | ||
validateOptions | ||
} from "./chunk-65JH4ORM.js"; | ||
} from "./chunk-A25EH3S3.js"; | ||
import "./chunk-KCWHOFI6.js"; | ||
@@ -26,0 +26,0 @@ import "./chunk-4CSLH7II.js"; |
import { | ||
rpc_exports | ||
} from "./chunk-KBJKFH62.js"; | ||
} from "./chunk-BMDOZI3V.js"; | ||
import { | ||
@@ -12,3 +12,3 @@ ModuleFederationDevServer, | ||
retrieveTypesZipPath | ||
} from "./chunk-65JH4ORM.js"; | ||
} from "./chunk-A25EH3S3.js"; | ||
import { | ||
@@ -15,0 +15,0 @@ fileLog, |
@@ -5,3 +5,3 @@ import { | ||
generateTypes | ||
} from "./chunk-65JH4ORM.js"; | ||
} from "./chunk-A25EH3S3.js"; | ||
import "./chunk-KCWHOFI6.js"; | ||
@@ -8,0 +8,0 @@ import { |
@@ -5,3 +5,3 @@ import { | ||
rpc_exports | ||
} from "./chunk-KBJKFH62.js"; | ||
} from "./chunk-BMDOZI3V.js"; | ||
import { | ||
@@ -13,3 +13,3 @@ cloneDeepOptions, | ||
validateOptions | ||
} from "./chunk-65JH4ORM.js"; | ||
} from "./chunk-A25EH3S3.js"; | ||
import { | ||
@@ -369,58 +369,2 @@ getIPV4, | ||
let compiledOnce = false; | ||
const emitTypesFilesDev = /* @__PURE__ */ __name(() => __async(this, null, function* () { | ||
try { | ||
if (!isDev()) { | ||
return; | ||
} | ||
const { zipTypesPath, apiTypesPath, zipName, apiFileName } = retrieveTypesAssetsInfo(finalOptions.remote); | ||
yield generateTypesFn(finalOptions); | ||
const config = finalOptions.remote.moduleFederationConfig; | ||
let zipPrefix = ""; | ||
if (typeof config.manifest === "object" && config.manifest.filePath) { | ||
zipPrefix = config.manifest.filePath; | ||
} else if (typeof config.manifest === "object" && config.manifest.fileName) { | ||
zipPrefix = path5.dirname(config.manifest.fileName); | ||
} else if (config.filename) { | ||
zipPrefix = path5.dirname(config.filename); | ||
} | ||
if (zipTypesPath) { | ||
const zipContent = fs2.readFileSync(zipTypesPath); | ||
const zipOutputPath = path5.join(compiler.outputPath, zipPrefix, zipName); | ||
yield new Promise((resolve2, reject) => { | ||
compiler.outputFileSystem.mkdir(path5.dirname(zipOutputPath), (err) => { | ||
if (err && err.code !== "EEXIST") { | ||
reject(err); | ||
} else { | ||
compiler.outputFileSystem.writeFile(zipOutputPath, zipContent, (writeErr) => { | ||
if (writeErr) | ||
reject(writeErr); | ||
else | ||
resolve2(); | ||
}); | ||
} | ||
}); | ||
}); | ||
} | ||
if (apiTypesPath) { | ||
const apiContent = fs2.readFileSync(apiTypesPath); | ||
const apiOutputPath = path5.join(compiler.outputPath, zipPrefix, apiFileName); | ||
yield new Promise((resolve2, reject) => { | ||
compiler.outputFileSystem.mkdir(path5.dirname(apiOutputPath), (err) => { | ||
if (err && err.code !== "EEXIST") { | ||
reject(err); | ||
} else { | ||
compiler.outputFileSystem.writeFile(apiOutputPath, apiContent, (writeErr) => { | ||
if (writeErr) | ||
reject(writeErr); | ||
else | ||
resolve2(); | ||
}); | ||
} | ||
}); | ||
}); | ||
} | ||
} catch (err) { | ||
console.error(err); | ||
} | ||
}), "emitTypesFilesDev"); | ||
compiler.hooks.thisCompilation.tap("mf:generateTypes", (compilation) => { | ||
@@ -440,3 +384,2 @@ compilation.hooks.processAssets.tapPromise({ | ||
if (compiledOnce) { | ||
emitTypesFilesDev(); | ||
return; | ||
@@ -443,0 +386,0 @@ } |
{ | ||
"name": "@module-federation/dts-plugin", | ||
"version": "0.0.0-next-20250110094517", | ||
"version": "0.0.0-next-20250113031136", | ||
"author": "hanric <hanric.zhang@gmail.com>", | ||
@@ -63,6 +63,6 @@ "main": "./dist/index.js", | ||
"ws": "8.18.0", | ||
"@module-federation/sdk": "0.0.0-next-20250110094517", | ||
"@module-federation/managers": "0.0.0-next-20250110094517", | ||
"@module-federation/third-party-dts-extractor": "0.0.0-next-20250110094517", | ||
"@module-federation/error-codes": "0.0.0-next-20250110094517" | ||
"@module-federation/sdk": "0.0.0-next-20250113031136", | ||
"@module-federation/managers": "0.0.0-next-20250113031136", | ||
"@module-federation/third-party-dts-extractor": "0.0.0-next-20250113031136", | ||
"@module-federation/error-codes": "0.0.0-next-20250113031136" | ||
}, | ||
@@ -76,3 +76,3 @@ "devDependencies": { | ||
"vue-tsc": "^2.0.26", | ||
"@module-federation/runtime": "0.0.0-next-20250110094517" | ||
"@module-federation/runtime": "0.0.0-next-20250113031136" | ||
}, | ||
@@ -79,0 +79,0 @@ "peerDependencies": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
579908
14442
+ Added@module-federation/error-codes@0.0.0-next-20250113031136(transitive)
+ Added@module-federation/managers@0.0.0-next-20250113031136(transitive)
+ Added@module-federation/sdk@0.0.0-next-20250113031136(transitive)
+ Added@module-federation/third-party-dts-extractor@0.0.0-next-20250113031136(transitive)
- Removed@module-federation/error-codes@0.0.0-next-20250110094517(transitive)
- Removed@module-federation/managers@0.0.0-next-20250110094517(transitive)
- Removed@module-federation/sdk@0.0.0-next-20250110094517(transitive)
- Removed@module-federation/third-party-dts-extractor@0.0.0-next-20250110094517(transitive)
Updated@module-federation/error-codes@0.0.0-next-20250113031136
Updated@module-federation/managers@0.0.0-next-20250113031136
Updated@module-federation/third-party-dts-extractor@0.0.0-next-20250113031136