
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
zephyr-xpack-internal
Advanced tools
Zephyr Cloud | Zephyr Docs | Discord | Twitter | LinkedIn
Internal Package - Shared types, Module Federation capabilities, and utilities for bundlers built on top of Webpack or Rspack. This package provides common functionality for Webpack-compatible bundlers.
Note: This is an internal package used by Webpack and Rspack plugins. It is not intended for direct use by end users.
The Zephyr XPack Internal package provides shared functionality for Webpack-compatible bundlers:
federation-dashboard-legacy/
)hooks/
)lifecycle-events/
)xpack-extract/
)Advanced Module Federation analytics and insights:
interface FederationBuildStats {
modules: ModuleInfo[];
dependencies: DependencyInfo[];
remotes: RemoteInfo[];
exposes: ExposeInfo[];
shared: SharedInfo[];
buildTime: number;
bundleSize: number;
}
// Convert webpack stats to federation graph
const graph = convertToGraph(webpackStats, {
includeModules: true,
includeDependencies: true,
includeChunks: true,
});
// Extract license information from modules
const licenses = getLicenses(modules, {
includeDevDependencies: false,
groupByLicense: true,
});
// Extract federation configuration from webpack config
const federationConfig = extractFederationConfig(webpackConfig);
// Iterate through remote configurations
const remotes = iterateFederatedRemoteConfig(federationConfig);
// Process federation dependencies
const deps = extractFederatedDependencyPairs(config);
// Create Module Federation runtime code
const runtimeCode = createMfRuntimeCode({
remotes: federationConfig.remotes,
shared: federationConfig.shared,
exposes: federationConfig.exposes,
});
// Detect Module Federation plugin in webpack config
const isModuleFederation = isModuleFederationPlugin(plugin);
// Extract federation plugin options
const options = makeCopyOfModuleFederationOptions(plugin);
// Build comprehensive assets map
const assetsMap = buildWebpackAssetsMap(compilation, {
includeSourceMaps: true,
includeChunks: true,
includeModules: true,
});
// Upload agent for assets
const uploadAgent = new ZeXpackUploadAgent({
assets: assetsMap,
federation: federationConfig,
buildStats: stats,
});
await uploadAgent.upload();
Compute versioning strategy for federated modules:
// Compute version strategy for federation
const versionStrategy = computeVersionStrategy({
packageJson: packageInfo,
gitInfo: gitContext,
buildContext: buildInfo,
});
Merge multiple federation graphs:
// Merge federation graphs from multiple builds
const mergedGraph = mergeGraphs([hostGraph, remoteGraph1, remoteGraph2], {
deduplicateModules: true,
preserveMetadata: true,
});
// Webpack plugin integration
class ZephyrWebpackPlugin {
apply(compiler) {
// Use xpack utilities
const federationConfig = extractFederationConfig(compiler.options);
const assetsMap = buildWebpackAssetsMap(compilation);
}
}
// Rspack plugin integration
class ZephyrRspackPlugin {
apply(compiler) {
// Reuse webpack-compatible utilities
const federationConfig = extractFederationConfig(compiler.options);
const stats = convertToGraph(compilation.getStats());
}
}
// Advanced federation analytics
const dashboardPlugin = new FederationDashboardPlugin({
filename: 'federation-stats.json',
includeModules: true,
includeDependencies: true,
computeVersionStrategy: true,
});
// Add runtime requirements for federation
addRuntimeRequirementToPromiseExternal(compilation, 'federation-runtime');
// Validate federation parameters
const isValid = validateParams({
federationConfig,
webpackConfig,
buildContext,
});
Webpack and Rspack plugins use this package:
import { extractFederationConfig, buildWebpackAssetsMap, convertToGraph, FederationDashboardPlugin } from 'zephyr-xpack-internal';
// In webpack/rspack plugin
const federationConfig = extractFederationConfig(compiler.options);
const assetsMap = buildWebpackAssetsMap(compilation);
const graph = convertToGraph(stats);
For internal development:
# Build the package
npm run build
# Run tests
npm run test
# Test with mock data
npm run test:integration
This is an internal package. Contributions should be made through the main Zephyr plugins repository. Please read our contributing guidelines for more information.
Licensed under the Apache-2.0 License. See LICENSE for more information.
FAQs
Xpack internals for Zephyr
The npm package zephyr-xpack-internal receives a total of 2,879 weekly downloads. As such, zephyr-xpack-internal popularity was classified as popular.
We found that zephyr-xpack-internal demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.