@icon-magic/icon-models
Advanced tools
Comparing version 2.5.0-beta.0 to 2.6.0-beta.0
@@ -75,4 +75,4 @@ "use strict"; | ||
} | ||
if (config.generateSourceHash) { | ||
this.generateSourceHash = config.generateSourceHash; | ||
if (this.generateSourceHash) { | ||
config.generateSourceHash = this.generateSourceHash; | ||
} | ||
@@ -100,2 +100,2 @@ if (this.imageset) { | ||
exports.Asset = Asset; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYXNzZXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsK0NBQTRDO0FBQzVDLDZCQUE2QjtBQUc3Qix5Q0FBZ0Q7QUFFaEQ7OztHQUdHO0FBQ0gsTUFBYSxLQUFLO0lBV2hCOzs7OztPQUtHO0lBQ0gsWUFBWSxRQUFnQixFQUFFLE1BQW1CO1FBQy9DLElBQUksQ0FBQyxNQUFNLEdBQUcsSUFBSSxlQUFNLENBQUMsOEJBQThCLENBQUMsQ0FBQztRQUV6RCw4Q0FBOEM7UUFDOUMsSUFBSSxDQUFDLElBQUksQ0FBQyxVQUFVLENBQUMsUUFBUSxDQUFDLEVBQUU7WUFDOUIsTUFBTSxJQUFJLEtBQUssQ0FDYix5REFBeUQsUUFBUSxFQUFFLENBQ3BFLENBQUM7U0FDSDtRQUNELElBQUksQ0FBQyxRQUFRLEdBQUcsUUFBUSxDQUFDO1FBRXpCLHlFQUF5RTtRQUN6RSxrQkFBa0I7UUFDbEIsSUFBSSxDQUFDLElBQUksR0FBRyxNQUFNLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsQ0FBQyxJQUFJLENBQUM7UUFFckUsZUFBZTtRQ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CBpc24ndCBhbHJlYWR5IHJldHJpZXZlZCwgcmVhZCB0aGUgZmlsZSBmcm9tIGRpc2tcbiAgICBpZiAoIXRoaXMuY29udGVudHMpIHtcbiAgICAgIHRoaXMuTE9HR0VSLmRlYnVnKFxuICAgICAgICBgUmVhZGluZyAke3RoaXMuZ2V0UGF0aCgpfSdzIGZpbGUgY29udGVudHMgZnJvbSB0aGUgZGlza2BcbiAgICAgICk7XG4gICAgICB0aGlzLmNvbnRlbnRzID0gYXdhaXQgZ2V0RmlsZUNvbnRlbnRzKHRoaXMuZ2V0UGF0aCgpKTtcbiAgICB9XG4gICAgcmV0dXJuIHRoaXMuY29udGVudHM7XG4gIH1cbn1cbiJdfQ== |
@@ -49,2 +49,18 @@ "use strict"; | ||
let flavorTypes; | ||
const config = { | ||
name: this.name, | ||
path: `./${path.relative(this.iconPath, this.getPath())}`, | ||
}; | ||
if (this.buildSourceHash) { | ||
config.buildSourceHash = this.buildSourceHash; | ||
} | ||
if (this.generateSourceHash) { | ||
config.generateSourceHash = this.generateSourceHash; | ||
} | ||
if (this.imageset) { | ||
config.imageset = this.imageset; | ||
} | ||
if (this.colorScheme) { | ||
config.colorScheme = this.colorScheme; | ||
} | ||
// return only flavor data | ||
@@ -56,15 +72,8 @@ if (this.types) { | ||
} | ||
config.types = flavorTypes; | ||
} | ||
return { | ||
name: this.name, | ||
path: `./${path.relative(this.iconPath, this.getPath())}`, | ||
buildSourceHash: this.buildSourceHash, | ||
generateSourceHash: this.generateSourceHash, | ||
imageset: this.imageset, | ||
colorScheme: this.colorScheme, | ||
types: flavorTypes | ||
}; | ||
return config; | ||
} | ||
} | ||
exports.Flavor = Flavor; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmxhdm9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2ZsYXZvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFB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maWdbXSA9IFtdO1xuICAgICAgZm9yIChjb25zdCBmbGF2b3Igb2YgdGhpcy5mbGF2b3JzLnZhbHVlcygpKSB7XG4gICAgICAgIGZsYXZvcnMucHVzaChmbGF2b3IuZ2V0Q29uZmlnKCkpO1xuICAgICAgfVxuICAgICAgY29uZmlnLmZsYXZvcnMgPSBmbGF2b3JzO1xuICAgIH1cblxuICAgIC8vY29weSBvdmVyIHRoZSByZXN0IG9mIHRoZSBwcm9wZXJ0aWVzIG9ubHkgaWYgdGhleSBleGlzdFxuICAgIGlmICh0aGlzLmxhYmVscykge1xuICAgICAgY29uZmlnLmxhYmVscyA9IHRoaXMubGFiZWxzO1xuICAgIH1cbiAgICBpZiAodGhpcy5jYXRlZ29yeSkge1xuICAgICAgY29uZmlnLmNhdGVnb3J5ID0gdGhpcy5jYXRlZ29yeTtcbiAgICB9XG4gICAgaWYgKHRoaXMubWV0YWRhdGEpIHtcbiAgICAgIGNvbmZpZy5tZXRhZGF0YSA9IHRoaXMubWV0YWRhdGE7XG4gICAgfVxuICAgIGlmICh0aGlzLmJ1aWxkKSB7XG4gICAgICBjb25maWcuYnVpbGQgPSB0aGlzLmJ1aWxkO1xuICAgIH1cbiAgICBpZiAodGhpcy5nZW5lcmF0ZSkge1xuICAgICAgY29uZmlnLmdlbmVyYXRlID0gdGhpcy5nZW5lcmF0ZTtcbiAgICB9XG4gICAgaWYgKHRoaXMuZGlzdHJpYnV0ZSkge1xuICAgICAgY29uZmlnLmRpc3RyaWJ1dGUgPSB0aGlzLmRpc3RyaWJ1dGU7XG4gICAgfVxuXG4gICAgLy8gcmV0dXJuIHRoZSBvYmplY3RcbiAgICByZXR1cm4gY29uZmlnO1xuICB9XG59XG4iXX0= |
@@ -5,5 +5,5 @@ export { Asset } from './asset'; | ||
export { IconSet } from './icon-set'; | ||
export { applyPluginsOnAsset } from './plugin-manager'; | ||
export { applyPluginsOnAsset, applyPluginOnAssets } from './plugin-manager'; | ||
export * from './interface'; | ||
export * from './utils/files'; | ||
export * from './utils/hash'; |
@@ -13,3 +13,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.applyPluginsOnAsset = exports.IconSet = exports.Icon = exports.Flavor = exports.Asset = void 0; | ||
exports.applyPluginOnAssets = exports.applyPluginsOnAsset = exports.IconSet = exports.Icon = exports.Flavor = exports.Asset = void 0; | ||
var asset_1 = require("./asset"); | ||
@@ -25,5 +25,6 @@ Object.defineProperty(exports, "Asset", { enumerable: true, get: function () { return asset_1.Asset; } }); | ||
Object.defineProperty(exports, "applyPluginsOnAsset", { enumerable: true, get: function () { return plugin_manager_1.applyPluginsOnAsset; } }); | ||
Object.defineProperty(exports, "applyPluginOnAssets", { enumerable: true, get: function () { return plugin_manager_1.applyPluginOnAssets; } }); | ||
__exportStar(require("./interface"), exports); | ||
__exportStar(require("./utils/files"), exports); | ||
__exportStar(require("./utils/hash"), exports); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7OztBQUFBLGlDQUFnQztBQUF2Qiw4RkFBQSxLQUFLLE9BQUE7QUFDZCxtQ0FBa0M7QUFBekIsZ0dBQUEsTUFBTSxPQUFBO0FBQ2YsK0JBQThCO0FBQXJCLDRGQUFBLElBQUksT0FBQTtBQUNiLHVDQUFxQztBQUE1QixtR0FBQSxPQUFPLE9BQUE7QUFFaEIsbURBQXVEO0FBQTlDLHFIQUFBLG1CQUFtQixPQUFBO0FBQzVCLDhDQUE0QjtBQUU1QixnREFBOEI7QUFDOUIsK0NBQTZCIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHsgQXNzZXQgfSBmcm9tICcuL2Fzc2V0JztcbmV4cG9ydCB7IEZsYXZvciB9IGZyb20gJy4vZmxhdm9y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Gx1Z2luT25Bc3NldHMgfSBmcm9tICcuL3BsdWdpbi1tYW5hZ2VyJztcbmV4cG9ydCAqIGZyb20gJy4vaW50ZXJmYWNlJztcblxuZXhwb3J0ICogZnJvbSAnLi91dGlscy9maWxlcyc7XG5leHBvcnQgKiBmcm9tICcuL3V0aWxzL2hhc2gnO1xuIl19 |
@@ -25,2 +25,6 @@ /// <reference types="node" /> | ||
variantsToFilter: string[]; | ||
outputAsHbs: { | ||
imageHrefHelper?: string; | ||
pathToTheImageAsset?: string; | ||
}; | ||
} | ||
@@ -84,3 +88,3 @@ interface WebpOptions { | ||
export interface DistributeConfig { | ||
variantsToFilter: string[]; | ||
variantsToFilter?: string[]; | ||
svg?: SVGOptions; | ||
@@ -87,0 +91,0 @@ webp?: WebpOptions; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJmYWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2ludGVyZmFjZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSWNvbiB9IGZyb20gJy4nO1xuaW1wb3J0IHsgQXNzZXQgfSBmcm9tICcuL2Fzc2V0JztcbmltcG9ydCB7IEZsYXZvciB9IGZyb20gJy4vZmxhdm9yJztcblxuaW50ZXJmYWNlIFdpZHRoSGVpZ2h0IHtcbiAgd2lkdGg6IG51bWJlcjtcbiAgaGVpZ2h0OiBudW1iZXI7XG59XG5cbmV4cG9ydCB0eXBlIEFzc2V0U2l6ZSA9IG51bWJlciB8IFdpZHRoSGVpZ2h0O1xuZXhwb3J0IHR5cGUgQXNzZXRSZXNvbHV0aW9uID0gbnVtYmVyO1xuZXhwb3J0IHR5cGUgQ29udGVudCA9IEJ1ZmZlciB8IHN0cmluZztcblxuZXhwb3J0IGludGVyZm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AgaWNvbk5hbWU/OiBzdHJpbmc7XG4gIGxhYmVscz86IHN0cmluZ1tdO1xuICBjYXRlZ29yeT86IHN0cmluZztcbiAgZmxhdm9ycz86IEZsYXZvckNvbmZpZ1tdO1xuICBvdXRwdXRQYXRoOiBzdHJpbmc7IC8vIHBhdGggd2hlcmUgdGhlIGdlbmVyYXRlZCBhc3NldHMgZ29cbiAgYnVpbGQ/OiBCdWlsZENvbmZpZztcbiAgZ2VuZXJhdGU/OiBHZW5lcmF0ZUNvbmZpZztcbiAgZGlzdHJpYnV0ZT86IERpc3RyaWJ1dGVDb25maWc7XG4gIG1ldGFkYXRhPzogTWV0YURhdGE7XG4gIHJ0bEZsaXA/OiBib29sZWFuO1xufTtcblxuLyoqXG4gKiBBIG1hcCBjb250YWluaW5nIGEgcGF0aCB0byB0aGUgaWNvbnMgYW5kIHRoZWlyIHJlc3BlY3RpdmUgY29uZmlnIEpTT05zXG4gKi9cbmV4cG9ydCB0eXBlIEljb25Db25maWdIYXNoID0gTWFwPHN0cmluZywgSWNvbkNvbmZpZz47XG5cbi8qKlxuICogQSBtYXAgY29udGFpbmluZyBhIHBhdGggdG8gdGhlIGljb25zIGFuZCB0aGVpciByZXNwZWN0aXZlIEljb24gY2xhc3NcbiAqIGluc3RhbmNlc1xuICovXG5leHBvcnQgdHlwZSBJY29uU2V0SGFzaCA9IE1hcDxzdHJpbmcsIEljb24+O1xuIl19 |
@@ -1,4 +0,2 @@ | ||
import { Asset } from './asset'; | ||
import { Flavor } from './flavor'; | ||
import { Icon } from './icon'; | ||
import { Asset, Flavor, Icon } from '.'; | ||
import { BuildPlugin, GeneratePlugin, Iterant } from './interface'; | ||
@@ -18,2 +16,3 @@ /** | ||
export declare function applyPluginsOnAsset(asset: Asset | Flavor, icon: Icon, plugins: BuildPlugin[] | GeneratePlugin[]): Promise<Flavor[]>; | ||
export declare function applyPluginOnAssets(icon: Icon, plugin: BuildPlugin | GeneratePlugin, type: RegExp, hashing: boolean): Promise<void>; | ||
/** | ||
@@ -20,0 +19,0 @@ * A util to go through the icon, locate the iterants |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getAllPropCombinations = exports.applyPluginsOnAsset = void 0; | ||
exports.getAllPropCombinations = exports.applyPluginOnAssets = exports.applyPluginsOnAsset = void 0; | ||
const logger_1 = require("@icon-magic/logger"); | ||
const path = require("path"); | ||
const _1 = require("."); | ||
const files_1 = require("./utils/files"); | ||
@@ -41,2 +42,32 @@ const prop_combinator_1 = require("./utils/prop-combinator"); | ||
exports.applyPluginsOnAsset = applyPluginsOnAsset; | ||
async function applyPluginOnAssets(icon, plugin, type, hashing) { | ||
// make a deep clone of the flavors so it doesn't change if the plugin alters | ||
//flavors on the icon | ||
const originalFlavors = [...icon.flavors.values()]; | ||
// iterate over all the plugins, applying them one at a time | ||
for (const iconFlavor of originalFlavors) { | ||
if (hashing) { | ||
// Check if generate has been run on this flavor already | ||
const flavorName = path.basename(iconFlavor.name); | ||
// Create the output directory | ||
const outputPath = icon.getIconOutputPath(); | ||
// Find the flavors in the config from the initial run that match the flavorName | ||
const savedFlavorConfigs = await _1.hasAssetBeenProcessed(icon, outputPath, flavorName, iconFlavor, type); | ||
if (savedFlavorConfigs && savedFlavorConfigs.length) { | ||
// Make flavors from the already written config | ||
savedFlavorConfigs.forEach(async (savedFlavorConfig) => { | ||
// Create new Flavor from the config we retrieved, so it's copied over | ||
// when the iconrc is written | ||
if (savedFlavorConfig.name) { | ||
icon.flavors.set(savedFlavorConfig.name, new _1.Flavor(outputPath, savedFlavorConfig)); | ||
} | ||
}); | ||
LOGGER.info(`${icon.iconName}'s ${flavorName} has been generated. Skipping that step. Turn hashing off if you don't want this.`); | ||
continue; | ||
} | ||
} | ||
await applySinglePluginOnAsset(iconFlavor, icon, plugin); | ||
} | ||
} | ||
exports.applyPluginOnAssets = applyPluginOnAssets; | ||
/** | ||
@@ -91,5 +122,10 @@ * This is the most basic plugin application function It applies one plugin on | ||
if (plugin.writeToOutput) { | ||
// This feature is incorrect when the plugin returns the same flavor with | ||
//appended as it needs to iterate over the types and print the content of | ||
//the type instead of the actual flavor. However, that won't be required if | ||
//we end up addressing this issue https://github.com/linkedin/icon-magic/issues/319 | ||
for (const outputFlavor of output) { | ||
if (outputFlavor.contents) { | ||
promises.push(files_1.saveContentToFile(path.join(icon.iconPath, 'tmp'), outputFlavor.name, outputFlavor.contents, 'svg')); | ||
const svgTypeFlavor = outputFlavor.types ? outputFlavor.types.get('svg') : null; | ||
if (svgTypeFlavor) { | ||
promises.push(files_1.saveContentToFile(path.join(icon.iconPath, 'tmp', plugin.name), svgTypeFlavor.name, await svgTypeFlavor.getContents(), 'svg')); | ||
} | ||
@@ -124,2 +160,2 @@ } | ||
exports.getAllPropCombinations = getAllPropCombinations; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGx1Z2luLW1hbmFnZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvcGx1Z2luLW1hbmFnZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsK0NBQTRDO0FBQzVDLDZCQUE2QjtBQU03Qix5Q0FBa0Q7QUFDbEQsNkRBQXlEO0FBQ3pELE1BQU0sTUFBTSxHQUFHLElBQUksZUFBTSxDQUFDLHVDQUF1QyxDQUFDLENBQUM7QUFFbkU7Ozs7Ozs7Ozs7O0dBV0c7QUFDSSxLQUFLLFVBQVUsbUJBQW1CLENBQ3ZDLEtBQXFCLEVBQ3JCLElBQVUsRUFDVixPQUF5QztJQUV6Qyx3RUFBd0U7SUFDeEUsTUFBTSxhQUFhLEdBQWUsRUFBRSxDQUFDO0lBRXJDLDREQUE0RDtJQUM1RCxLQUFLLE1BQU0sQ0FBQyxLQUFLLEVBQUUsTUFBTSxDQUFDLElBQUksT0FBTyxDQUFDLE9BQU8sRUFBRSxFQUFFO1FBQy9DLGFBQWEsQ0FBQyxLQUFLLENB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gICAgaWYgKCEoaXRlcmFudFZhbHVlcyBpbnN0YW5jZW9mIEFycmF5KSkge1xuICAgICAgaXRlcmFudFZhbHVlcyA9IG5ldyBBcnJheShpdGVyYW50VmFsdWVzKTtcbiAgICB9XG4gICAgcHJvcHNbaXRlcmFudF0gPSBpdGVyYW50VmFsdWVzO1xuICB9XG4gIHJldHVybiBwcm9wQ29tYmluYXRvcihwcm9wcyk7XG59XG4iXX0= |
/// <reference types="node" /> | ||
import { Flavor, FlavorConfig, Icon } from '..'; | ||
/** | ||
@@ -17,1 +18,11 @@ * Creates a hash from a string or Buffer | ||
export declare function compareAssetHashes(currentAssetHash: string | undefined, savedAssetHash: string | undefined): Promise<boolean>; | ||
/** | ||
* Checks the config to see if the asset has been generated before i.e if it is | ||
* saved in the config flavors. | ||
* @param outputPath the output path of the icon, where the output of generate would | ||
* be written to. | ||
* @param flavorName the name of the asset currently being processed in generate | ||
* @param flavor the asset currently being processed in generate | ||
* @returns the config of the saved asset, if present | ||
*/ | ||
export declare function hasAssetBeenProcessed(icon: Icon, outputPath: string, flavorName: string, flavor: Flavor, type: RegExp): Promise<FlavorConfig[] | null>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.compareAssetHashes = exports.createHash = void 0; | ||
exports.hasAssetBeenProcessed = exports.compareAssetHashes = exports.createHash = void 0; | ||
const config_reader_1 = require("@icon-magic/config-reader"); | ||
const crypto = require("crypto"); | ||
const fs_1 = require("fs"); | ||
const path = require("path"); | ||
/** | ||
@@ -29,2 +32,54 @@ * Creates a hash from a string or Buffer | ||
exports.compareAssetHashes = compareAssetHashes; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGFzaC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy91dGlscy9oYXNoLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLGlDQUFpQztBQU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lIHRha2VuIHRocm91Z2ggdGhlIGdlbmVyYXRpb24gcHJvY2Vzcy5cbiAqIEBwYXJhbSBjdXJyZW50QXNzZXRIYXNoIHRoZSBoYXNoIG9mIGFzc2V0IGJlaW5nIHByb2Nlc3NlZCBpbiB0aGUgZ2VuZXJhdGUgc3RlcFxuICogQHBhcmFtIHNhdmVkQXNzZXRIYXNoIHRoZSBoYXNoIG9mIHRoZSBzYXZlZCBhc3NldCB0aGF0J3Mgd3JpdHRlbiB0byB0aGUgb3V0cHV0IHBhdGhcbiAqIEByZXR1cm5zIEEgcHJvbWlzZSB0aGF0IHJlc29sdmVzIHRvIGEgQm9vbGVhbiB3aGljaCBzdGF0ZXMgd2hldGhlciB0aGUgc2F2ZWQgYXNzZXQgYW5kIHRoZSBjdXJyZW50XG4gKiBhc3NldCBhcmUgdGhlIHNhbWUuXG4gKi9cbmV4cG9ydCBhc3luYyBmdW5jdGlvbiBjb21wYXJlQXNzZXRIYXNoZXMoXG4gIGN1cnJlbnRBc3NldEhhc2g6IHN0cmluZyB8IHVuZGVmaW5lZCxcbiAgc2F2ZWRBc3NldEhhc2g6IHN0cmluZyB8IHVuZGVmaW5lZFxuKTogUHJvbWlzZTxib29sZWFuPiB7XG4gIHJldHVybiAhIXNhdmVkQXNzZXRIYXNoICYmIGN1cnJlbnRBc3NldEhhc2ggPT09IHNhdmVkQXNzZXRIYXNoO1xufVxuIl19 | ||
/** | ||
* Checks the config to see if the asset has been generated before i.e if it is | ||
* saved in the config flavors. | ||
* @param outputPath the output path of the icon, where the output of generate would | ||
* be written to. | ||
* @param flavorName the name of the asset currently being processed in generate | ||
* @param flavor the asset currently being processed in generate | ||
* @returns the config of the saved asset, if present | ||
*/ | ||
async function hasAssetBeenProcessed(icon, outputPath, flavorName, flavor, type) { | ||
try { | ||
// Try and open the config file in the output path | ||
const iconrc = await config_reader_1.loadConfigFile(path.join(outputPath, 'iconrc.json')); | ||
if (iconrc) { | ||
// Look for flavors in the config that matches the current flavor going through | ||
// the generation process | ||
const savedFlavorConfigs = iconrc['flavors'].filter((storedFlavor) => { | ||
// does the flavor name match | ||
const doesFlavorNameMatch = RegExp(`^${flavorName}\\b`).test(storedFlavor.name); | ||
const doFlavorTypesMatch = Object.keys(storedFlavor.types).every(flavType => { | ||
return flavType.match(type); | ||
}); | ||
return doesFlavorNameMatch && doFlavorTypesMatch; | ||
}); | ||
if (savedFlavorConfigs.length) { | ||
// Check if all the flavors in the config have hashes that match | ||
// the current flavor we are looking at | ||
let allFlavorsMatch = false; | ||
for (const config of savedFlavorConfigs) { | ||
// Check source (build output) | ||
const buildOutputPath = path.resolve(icon.getBuildOutputPath(), `${flavor.name}.svg`); | ||
const flavorContent = fs_1.readFileSync(buildOutputPath, 'utf8'); | ||
allFlavorsMatch = await compareAssetHashes(createHash(flavorContent), config.generateSourceHash); | ||
if (!allFlavorsMatch) { | ||
break; | ||
} | ||
} | ||
// Flavors (webp, png, minified svg) with the same source svg already exists, no need to run generate again | ||
if (allFlavorsMatch) { | ||
return savedFlavorConfigs; | ||
} | ||
} | ||
} | ||
} | ||
catch (e) { | ||
// If we get here then the icon has not been generated before, we don't have to | ||
// do anything, just let it generate | ||
return null; | ||
} | ||
return null; | ||
} | ||
exports.hasAssetBeenProcessed = hasAssetBeenProcessed; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGFzaC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy91dGlscy9oYXNoLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLDZEQUEyRDtBQUMzRCxpQ0FBaUM7QUFDakMsMkJBQWtDO0FBQ2xDLDZCQUE2QjtBQVE3Qjs7OztHQUlHO0FBQ0gsU0FBZ0IsVUFBVSxDQUFDLFFBQXlCO0lBQ2xELE9BQU8sTUFBTTtTQUNWLFVBQVUsQ0FBQyxLQUFLLENBQUM7U0FDakIsTUFBTSx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GxGbGF2b3JzTWF0Y2gpIHtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICAvLyBGbGF2b3JzICh3ZWJwLCBwbmcsIG1pbmlmaWVkIHN2Zykgd2l0aCB0aGUgc2FtZSBzb3VyY2Ugc3ZnIGFscmVhZHkgZXhpc3RzLCBubyBuZWVkIHRvIHJ1biBnZW5lcmF0ZSBhZ2FpblxuICAgICAgICBpZiAoYWxsRmxhdm9yc01hdGNoKSB7XG4gICAgICAgICAgcmV0dXJuIHNhdmVkRmxhdm9yQ29uZmlncztcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfSBjYXRjaCAoZSkge1xuICAgIC8vIElmIHdlIGdldCBoZXJlIHRoZW4gdGhlIGljb24gaGFzIG5vdCBiZWVuIGdlbmVyYXRlZCBiZWZvcmUsIHdlIGRvbid0IGhhdmUgdG9cbiAgICAvLyBkbyBhbnl0aGluZywganVzdCBsZXQgaXQgZ2VuZXJhdGVcbiAgICByZXR1cm4gbnVsbDtcbiAgfVxuICByZXR1cm4gbnVsbDtcbn1cbiJdfQ== |
@@ -87,6 +87,2 @@ "use strict"; | ||
name: 'filled-a', | ||
buildSourceHash: undefined, | ||
generateSourceHash: undefined, | ||
"colorScheme": undefined, | ||
"imageset": undefined, | ||
types: sampleExt | ||
@@ -97,4 +93,2 @@ }, | ||
name: 'filled-b', | ||
buildSourceHash: undefined, | ||
generateSourceHash: undefined, | ||
types: sampleExt | ||
@@ -105,4 +99,2 @@ }, | ||
name: 'someOtherName-a', | ||
buildSourceHash: undefined, | ||
generateSourceHash: undefined, | ||
types: sampleExt | ||
@@ -113,4 +105,2 @@ }, | ||
name: 'someOtherName-b', | ||
buildSourceHash: undefined, | ||
generateSourceHash: undefined, | ||
types: sampleExt | ||
@@ -131,2 +121,2 @@ } | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWRlYWwtaWN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3JDb25maWdbXSA9IFtcbiAge1xuICAgIHBhdGg6ICcuL2ZpbGxlZC1hLnN2ZycsXG4gICAgbmFtZTogJ2ZpbGxlZC1hJyxcbiAgICB0eXBlczogc2FtcGxlRXh0XG4gIH0sXG4gIHtcbiAgICBwYXRoOiAnLi9maWxsZWQtYi5zdmcnLFxuICAgIG5hbWU6ICdmaWxsZWQtYicsXG4gICAgdHlwZXM6IHNhbXBsZUV4dFxuICB9LFxuICB7XG4gICAgcGF0aDogJy4vc29tZU90aGVyTmFtZS1hLnN2ZycsXG4gICAgbmFtZTogJ3NvbWVPdGhlck5hbWUtYScsXG4gICAgdHlwZXM6IHNhbXBsZUV4dFxuICB9LFxuICB7XG4gICAgcGF0aDogJy4vc29tZU90aGVyTmFtZS1iLnN2ZycsXG4gICAgbmFtZTogJ3NvbWVPdGhlck5hbWUtYicsXG4gICAgdHlwZXM6IHNhbXBsZUV4dFxuICB9XG5dO1xuXG5leHBvcnQgY29uc3QgaWRlYWxJY29uOiBJY29uQ29uZmlnID0ge1xuICBpY29uUGF0aDogYCR7RklYVFVSRVN9L25hdi1pY29ucy9ob21lYCxcbiAgaWNvbk5hbWU6ICdob21lJyxcbiAgdmFyaWFudHM6IHZhcmlhbnRzLFxuICBmbGF2b3JzOiBmbGF2b3JzLFxuICBvdXRwdXRQYXRoOiAnLi9vdXQnLFxuICBidWlsZDogYnVpbGQsXG4gIGdlbmVyYXRlOiBnZW5lcmF0ZSxcbiAgc2l6ZXM6IFsxNiwgMjRdLFxuICByZXNvbHV0aW9uczogWzEsIDJdLFxuICBzb3VyY2VDb25maWdGaWxlOiBgJHtGSVhUVVJFU30vbmF2LWljb25zL2ljb25yYy5qc29uYFxufTtcbiJdfQ== |
{ | ||
"name": "@icon-magic/icon-models", | ||
"version": "2.5.0-beta.0", | ||
"version": "2.6.0-beta.0", | ||
"description": "Icon magic provides classes for the icon and iconSet", | ||
@@ -21,4 +21,5 @@ "main": "dist/src/index.js", | ||
"dependencies": { | ||
"@icon-magic/logger": "^2.3.0-beta.0" | ||
"@icon-magic/logger": "^2.3.0-beta.0", | ||
"@icon-magic/config-reader": "^2.3.0-beta.0" | ||
} | ||
} |
@@ -96,4 +96,4 @@ import { Logger } from '@icon-magic/logger'; | ||
} | ||
if (config.generateSourceHash) { | ||
this.generateSourceHash = config.generateSourceHash; | ||
if (this.generateSourceHash) { | ||
config.generateSourceHash = this.generateSourceHash; | ||
} | ||
@@ -100,0 +100,0 @@ if (this.imageset) { |
@@ -50,2 +50,19 @@ import * as path from 'path'; | ||
let flavorTypes; | ||
const config: FlavorConfig = { | ||
name: this.name, | ||
path: `./${path.relative(this.iconPath, this.getPath())}`, | ||
}; | ||
if (this.buildSourceHash) { | ||
config.buildSourceHash = this.buildSourceHash; | ||
} | ||
if (this.generateSourceHash) { | ||
config.generateSourceHash = this.generateSourceHash; | ||
} | ||
if (this.imageset) { | ||
config.imageset = this.imageset; | ||
} | ||
if (this.colorScheme) { | ||
config.colorScheme = this.colorScheme; | ||
} | ||
// return only flavor data | ||
@@ -57,13 +74,6 @@ if (this.types) { | ||
} | ||
config.types = flavorTypes; | ||
} | ||
return { | ||
name: this.name, | ||
path: `./${path.relative(this.iconPath, this.getPath())}`, | ||
buildSourceHash: this.buildSourceHash, | ||
generateSourceHash: this.generateSourceHash, | ||
imageset: this.imageset, | ||
colorScheme: this.colorScheme, | ||
types: flavorTypes | ||
}; | ||
return config; | ||
} | ||
} |
@@ -147,3 +147,3 @@ import { Logger } from '@icon-magic/logger'; | ||
iconPath: '.', // we assume that the config will be written to the icon directory itself | ||
variants: [], // by instantiaing variants to be an empty array | ||
variants: [], // by instantiating variants to be an empty array | ||
sourceConfigFile: path.relative(this.iconPath, this.sourceConfigFile), // again, we resolve this path w.r.t. the icon directory | ||
@@ -150,0 +150,0 @@ sizes: this.sizes, |
@@ -6,3 +6,3 @@ export { Asset } from './asset'; | ||
export { applyPluginsOnAsset } from './plugin-manager'; | ||
export { applyPluginsOnAsset, applyPluginOnAssets } from './plugin-manager'; | ||
export * from './interface'; | ||
@@ -9,0 +9,0 @@ |
@@ -28,2 +28,6 @@ import { Icon } from '.'; | ||
variantsToFilter: string[]; | ||
outputAsHbs: { | ||
imageHrefHelper?: string; | ||
pathToTheImageAsset?: string; | ||
}; | ||
} | ||
@@ -101,3 +105,3 @@ | ||
export interface DistributeConfig { | ||
variantsToFilter: string[]; | ||
variantsToFilter?: string[]; | ||
svg?: SVGOptions; | ||
@@ -104,0 +108,0 @@ webp?: WebpOptions; |
import { Logger } from '@icon-magic/logger'; | ||
import * as path from 'path'; | ||
import { Asset } from './asset'; | ||
import { Flavor } from './flavor'; | ||
import { Icon } from './icon'; | ||
import { Asset, Flavor, FlavorConfig, Icon, hasAssetBeenProcessed } from '.'; | ||
import { BuildPlugin, GeneratePlugin, Iterant } from './interface'; | ||
@@ -57,2 +55,54 @@ import { saveContentToFile } from './utils/files'; | ||
export async function applyPluginOnAssets(icon: Icon, plugin: BuildPlugin | GeneratePlugin, type: RegExp, hashing: boolean) { | ||
// make a deep clone of the flavors so it doesn't change if the plugin alters | ||
//flavors on the icon | ||
const originalFlavors = [...icon.flavors.values()]; | ||
// iterate over all the plugins, applying them one at a time | ||
for (const iconFlavor of originalFlavors) { | ||
if (hashing) { | ||
// Check if generate has been run on this flavor already | ||
const flavorName: string = path.basename(iconFlavor.name); | ||
// Create the output directory | ||
const outputPath = icon.getIconOutputPath(); | ||
// Find the flavors in the config from the initial run that match the flavorName | ||
const savedFlavorConfigs = await hasAssetBeenProcessed( | ||
icon, | ||
outputPath, | ||
flavorName, | ||
iconFlavor, | ||
type | ||
); | ||
if (savedFlavorConfigs && savedFlavorConfigs.length) { | ||
// Make flavors from the already written config | ||
savedFlavorConfigs.forEach( | ||
async (savedFlavorConfig: FlavorConfig) => { | ||
// Create new Flavor from the config we retrieved, so it's copied over | ||
// when the iconrc is written | ||
if (savedFlavorConfig.name) { | ||
icon.flavors.set(savedFlavorConfig.name, new Flavor( | ||
outputPath, | ||
savedFlavorConfig | ||
)); | ||
} | ||
} | ||
); | ||
LOGGER.info( | ||
`${icon.iconName}'s ${flavorName} has been generated. Skipping that step. Turn hashing off if you don't want this.` | ||
); | ||
continue; | ||
} | ||
} | ||
await applySinglePluginOnAsset( | ||
iconFlavor, | ||
icon, | ||
plugin | ||
); | ||
} | ||
} | ||
/** | ||
@@ -125,9 +175,14 @@ * This is the most basic plugin application function It applies one plugin on | ||
if (plugin.writeToOutput) { | ||
// This feature is incorrect when the plugin returns the same flavor with | ||
//appended as it needs to iterate over the types and print the content of | ||
//the type instead of the actual flavor. However, that won't be required if | ||
//we end up addressing this issue https://github.com/linkedin/icon-magic/issues/319 | ||
for (const outputFlavor of output) { | ||
if (outputFlavor.contents) { | ||
const svgTypeFlavor = outputFlavor.types ? outputFlavor.types.get('svg') : null; | ||
if (svgTypeFlavor) { | ||
promises.push( | ||
saveContentToFile( | ||
path.join(icon.iconPath, 'tmp'), | ||
outputFlavor.name, | ||
outputFlavor.contents, | ||
path.join(icon.iconPath, 'tmp', plugin.name), | ||
svgTypeFlavor.name, | ||
await svgTypeFlavor.getContents(), | ||
'svg' | ||
@@ -134,0 +189,0 @@ ) |
@@ -0,3 +1,12 @@ | ||
import { loadConfigFile } from '@icon-magic/config-reader'; | ||
import * as crypto from 'crypto'; | ||
import { readFileSync } from 'fs'; | ||
import * as path from 'path'; | ||
import { | ||
Flavor, | ||
FlavorConfig, | ||
Icon | ||
} from '..'; | ||
/** | ||
@@ -29,1 +38,67 @@ * Creates a hash from a string or Buffer | ||
} | ||
/** | ||
* Checks the config to see if the asset has been generated before i.e if it is | ||
* saved in the config flavors. | ||
* @param outputPath the output path of the icon, where the output of generate would | ||
* be written to. | ||
* @param flavorName the name of the asset currently being processed in generate | ||
* @param flavor the asset currently being processed in generate | ||
* @returns the config of the saved asset, if present | ||
*/ | ||
export async function hasAssetBeenProcessed( | ||
icon: Icon, | ||
outputPath: string, | ||
flavorName: string, | ||
flavor: Flavor, | ||
type: RegExp | ||
): Promise<FlavorConfig[] | null> { | ||
try { | ||
// Try and open the config file in the output path | ||
const iconrc = await loadConfigFile(path.join(outputPath, 'iconrc.json')); | ||
if (iconrc) { | ||
// Look for flavors in the config that matches the current flavor going through | ||
// the generation process | ||
const savedFlavorConfigs: FlavorConfig[] = iconrc['flavors'].filter( | ||
(storedFlavor: Flavor) => { | ||
// does the flavor name match | ||
const doesFlavorNameMatch = RegExp(`^${flavorName}\\b`).test( | ||
storedFlavor.name | ||
); | ||
const doFlavorTypesMatch = Object.keys(storedFlavor.types).every( | ||
flavType => { | ||
return flavType.match(type); | ||
} | ||
); | ||
return doesFlavorNameMatch && doFlavorTypesMatch; | ||
} | ||
); | ||
if (savedFlavorConfigs.length) { | ||
// Check if all the flavors in the config have hashes that match | ||
// the current flavor we are looking at | ||
let allFlavorsMatch = false; | ||
for (const config of savedFlavorConfigs) { | ||
// Check source (build output) | ||
const buildOutputPath = path.resolve(icon.getBuildOutputPath(), `${flavor.name}.svg`); | ||
const flavorContent = readFileSync(buildOutputPath, 'utf8'); | ||
allFlavorsMatch = await compareAssetHashes( | ||
createHash(flavorContent), | ||
config.generateSourceHash | ||
); | ||
if (!allFlavorsMatch) { | ||
break; | ||
} | ||
} | ||
// Flavors (webp, png, minified svg) with the same source svg already exists, no need to run generate again | ||
if (allFlavorsMatch) { | ||
return savedFlavorConfigs; | ||
} | ||
} | ||
} | ||
} catch (e) { | ||
// If we get here then the icon has not been generated before, we don't have to | ||
// do anything, just let it generate | ||
return null; | ||
} | ||
return null; | ||
} |
@@ -102,6 +102,2 @@ import * as path from 'path'; | ||
name: 'filled-a', | ||
buildSourceHash: undefined, | ||
generateSourceHash: undefined, | ||
"colorScheme": undefined, | ||
"imageset": undefined, | ||
types: sampleExt | ||
@@ -112,4 +108,2 @@ }, | ||
name: 'filled-b', | ||
buildSourceHash: undefined, | ||
generateSourceHash: undefined, | ||
types: sampleExt | ||
@@ -120,4 +114,2 @@ }, | ||
name: 'someOtherName-a', | ||
buildSourceHash: undefined, | ||
generateSourceHash: undefined, | ||
types: sampleExt | ||
@@ -128,4 +120,2 @@ }, | ||
name: 'someOtherName-b', | ||
buildSourceHash: undefined, | ||
generateSourceHash: undefined, | ||
types: sampleExt | ||
@@ -132,0 +122,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
2118291
2838
0
2
5
+ Added@icon-magic/config-reader@2.3.0-beta.0(transitive)
+ Added@icon-magic/icon-models@2.3.0-beta.0(transitive)
+ Added@types/glob@7.2.0(transitive)
+ Added@types/minimatch@5.1.2(transitive)
+ Added@types/node@22.10.10(transitive)
+ Addedajv@6.12.6(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedcallsites@3.1.0(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedimport-fresh@3.3.0(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedparent-module@1.0.1(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedresolve-from@4.0.0(transitive)
+ Addedundici-types@6.20.0(transitive)
+ Addeduri-js@4.4.1(transitive)
+ Addedwrappy@1.0.2(transitive)