Socket
Socket
Sign inDemoInstall

@sapphire/plugin-hmr

Package Overview
Dependencies
Maintainers
3
Versions
606
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sapphire/plugin-hmr - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1-next.94efab7.0

19

dist/index.js

@@ -12,3 +12,3 @@ "use strict";

function start() {
framework_1.container.logger.info('HMR-Plugin: Enabled.');
framework_1.container.logger.info('[HMR-Plugin]: Enabled. Watching for piece changes.');
for (const store of framework_1.container.stores.values()) {

@@ -31,6 +31,6 @@ const deleteCb = handlePiecePathDelete.bind(null, store);

await pieceToDelete.unload();
framework_1.container.logger.info(`HMR-Plugin: Unloaded ${pieceToDelete.name}.`);
framework_1.container.logger.info(`[HMR-Plugin]: Unloaded piece ${pieceToDelete.name} from ${pieceToDelete.store.name} store.`);
});
if ((0, framework_1.isErr)(result)) {
framework_1.container.logger.error(`HMR-Plugin: Failed to unload ${pieceToDelete.name}.`, console_1.error);
framework_1.container.logger.error(`[HMR-Plugin]: Failed to unload piece ${pieceToDelete.name} from ${pieceToDelete.store.name} store.`, console_1.error);
}

@@ -45,3 +45,3 @@ }

await pieceToUpdate.reload();
framework_1.container.logger.info(`HMR-Plugin: reloaded ${pieceToUpdate.name}.`);
framework_1.container.logger.info(`[HMR-Plugin]: reloaded piece ${pieceToUpdate.name} from ${pieceToUpdate.store.name} store.`);
}

@@ -51,12 +51,13 @@ else {

if (!rootPath)
throw new Error(`HMR-Plugin: Could not find root path for ${path}.`);
const commandsLoaded = await store.load(rootPath, (0, path_1.relative)(rootPath, path));
const commandsLoadedNames = commandsLoaded.map((piece) => piece.name);
framework_1.container.logger.info(`HMR-Plugin: Loaded ${commandsLoadedNames.join(', ')}.`);
throw new Error(`[HMR-Plugin]: Could not find root path for ${path}.`);
const piecesLoaded = await store.load(rootPath, (0, path_1.relative)(rootPath, path));
const piecesLoadedNames = piecesLoaded.map((piece) => piece.name);
const piecesLoadedStoreNames = piecesLoaded.map((piece) => piece.store.name);
framework_1.container.logger.info(`[HMR-Plugin]: Loaded ${piecesLoadedNames.join(', ')} piece(s) from ${[...new Set(piecesLoadedStoreNames)].join(', ')} store(s).`);
}
});
if ((0, framework_1.isErr)(result)) {
framework_1.container.logger.error(`HMR-Plugin: Failed to load pieces from ${path}.`, result.error);
framework_1.container.logger.error(`[HMR-Plugin]: Failed to load pieces from ${path}.`, result.error);
}
}
//# sourceMappingURL=index.js.map
{
"name": "@sapphire/plugin-hmr",
"version": "1.0.0",
"version": "1.0.1-next.94efab7.0",
"description": "Plugin for @sapphire/framework for hot module reloading for pieces",

@@ -68,3 +68,3 @@ "author": "@sapphire",

},
"gitHead": "0c2958c49585dc0ba476831f1ea3005c5c03204c"
"gitHead": "94efab789b7b72672f8cd89b00c729ef4f6c795c"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc