├── .gitignore ├── .npmignore ├── test.js ├── .prettierrc.json ├── index.js ├── License ├── .github └── FUNDING.yml ├── package.json ├── lib ├── model.js ├── crc16.js ├── crc32.js └── logic.js ├── README.md └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | test/ 2 | tmp/ 3 | coverage/ 4 | *.log 5 | .travis.yml 6 | gulpfile.js 7 | .idea/ 8 | appveyor.yml -------------------------------------------------------------------------------- /test.js: -------------------------------------------------------------------------------- 1 | var crc = require('./lib/crc16'); 2 | 3 | var other = crc("123"); 4 | var crcRes=[]; 5 | crcRes.push(other); 6 | console.log(other); 7 | console.log(crcRes.indexOf(other)); -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "useTabs": false, 3 | "printWidth": 120, 4 | "semi": true, 5 | "tabWidth": 4, 6 | "singleQuote": true, 7 | "bracketSpacing": true, 8 | "endOfLine": "lf", 9 | "parser": "typescript" 10 | } 11 | 12 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var hexo = hexo || {}; 4 | 5 | let generator = require('./lib/logic') 6 | 7 | // ensure to be firstly executed 8 | hexo.extend.filter.register('post_permalink', generator.generateAbbrlink, 1); 9 | hexo.extend.filter.register('before_post_render', generator.writebackToFiles, 1); -------------------------------------------------------------------------------- /License: -------------------------------------------------------------------------------- 1 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 2 | Version 2, December 2004 3 | 4 | Copyright (C) 2004 Sam Hocevar 5 | 6 | Everyone is permitted to copy and distribute verbatim or modified 7 | copies of this license document, and changing it is allowed as long 8 | as the name is changed. 9 | 10 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 11 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 12 | 13 | 0. You just DO WHAT THE FUCK YOU WANT TO. 14 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: hexo-abbrlink # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: ['https://blog.zz173.com/sponsor'] 13 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hexo-abbrlink", 3 | "version": "2.2.2", 4 | "description": "create one and only link for every post for hexo", 5 | "main": "index.js", 6 | "scripts": { 7 | "postinstall": "echo \"如果你需要有序的id增长,可以尝试本插件的升级版hexo-abbrlink2。\"", 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/rozbo/hexo-abbrlink.git" 13 | }, 14 | "keywords": [ 15 | "hexo", 16 | "link", 17 | "permalink", 18 | "abbrlink" 19 | ], 20 | "author": "rozbo", 21 | "license": "MIT", 22 | "bugs": { 23 | "url": "https://github.com/Rozbo/hexo-abbrlink/issues" 24 | }, 25 | "homepage": "https://github.com/Rozbo/hexo-abbrlink#readme", 26 | "dependencies": { 27 | "hexo-front-matter": "^1.0.0", 28 | "hexo-fs": "^3.1.0" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/model.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // ensure that every Abbrlink is unique 4 | var crcCache = new Set(); 5 | let uniqueCrc = function(res) { 6 | while (crcCache.has(res)) { 7 | res++; 8 | } 9 | crcCache.add(res); 10 | return res; 11 | } 12 | let recordExistingCrc = function(crc) { 13 | crcCache.add(crc); 14 | } 15 | exports.recordExistingAbbrlink = recordExistingCrc; 16 | exports.uniqueAbbrlink = uniqueCrc; 17 | 18 | 19 | // post generated abbrlink cache 20 | var postAbbrlinkCache = new Map(); 21 | let cacheGeneratedAbbrlink = function(postPath, abbrlink) { 22 | postAbbrlinkCache.set(postPath, abbrlink); 23 | } 24 | let getGeneratedAbbrlink = function(postPath) { 25 | return postAbbrlinkCache.get(postPath); 26 | } 27 | exports.cacheGeneratedAbbrlink = cacheGeneratedAbbrlink; 28 | exports.getGeneratedAbbrlink = getGeneratedAbbrlink; 29 | 30 | 31 | // processed post record 32 | var processedPosts = new Set(); 33 | let isPostProcessed = function(postPath) { 34 | return processedPosts.has(postPath); 35 | } 36 | let setPostProcessed = function(postPath) { 37 | processedPosts.add(postPath); 38 | } 39 | exports.isPostProcessed = isPostProcessed; 40 | exports.setPostProcessed = setPostProcessed; -------------------------------------------------------------------------------- /lib/crc16.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | let deal = function(crc, b) { 4 | return (crc >> 8) ^ CrcTable[(crc & 0xFF) ^ b]; 5 | }; 6 | 7 | let preDeal=function(data, len) { 8 | var crc = 0; 9 | for (var i = 0; i < len; i++) { 10 | crc = deal(crc, data[i]); 11 | } 12 | return crc; 13 | }; 14 | let CrcTable = new Array( 15 | 0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241, 16 | 0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440, 17 | 0xCC01, 0x0CC0, 0x0D80, 0xCD41, 0x0F00, 0xCFC1, 0xCE81, 0x0E40, 18 | 0x0A00, 0xCAC1, 0xCB81, 0x0B40, 0xC901, 0x09C0, 0x0880, 0xC841, 19 | 0xD801, 0x18C0, 0x1980, 0xD941, 0x1B00, 0xDBC1, 0xDA81, 0x1A40, 20 | 0x1E00, 0xDEC1, 0xDF81, 0x1F40, 0xDD01, 0x1DC0, 0x1C80, 0xDC41, 21 | 0x1400, 0xD4C1, 0xD581, 0x1540, 0xD701, 0x17C0, 0x1680, 0xD641, 22 | 0xD201, 0x12C0, 0x1380, 0xD341, 0x1100, 0xD1C1, 0xD081, 0x1040, 23 | 0xF001, 0x30C0, 0x3180, 0xF141, 0x3300, 0xF3C1, 0xF281, 0x3240, 24 | 0x3600, 0xF6C1, 0xF781, 0x3740, 0xF501, 0x35C0, 0x3480, 0xF441, 25 | 0x3C00, 0xFCC1, 0xFD81, 0x3D40, 0xFF01, 0x3FC0, 0x3E80, 0xFE41, 26 | 0xFA01, 0x3AC0, 0x3B80, 0xFB41, 0x3900, 0xF9C1, 0xF881, 0x3840, 27 | 0x2800, 0xE8C1, 0xE981, 0x2940, 0xEB01, 0x2BC0, 0x2A80, 0xEA41, 28 | 0xEE01, 0x2EC0, 0x2F80, 0xEF41, 0x2D00, 0xEDC1, 0xEC81, 0x2C40, 29 | 0xE401, 0x24C0, 0x2580, 0xE541, 0x2700, 0xE7C1, 0xE681, 0x2640, 30 | 0x2200, 0xE2C1, 0xE381, 0x2340, 0xE101, 0x21C0, 0x2080, 0xE041, 31 | 0xA001, 0x60C0, 0x6180, 0xA141, 0x6300, 0xA3C1, 0xA281, 0x6240, 32 | 0x6600, 0xA6C1, 0xA781, 0x6740, 0xA501, 0x65C0, 0x6480, 0xA441, 33 | 0x6C00, 0xACC1, 0xAD81, 0x6D40, 0xAF01, 0x6FC0, 0x6E80, 0xAE41, 34 | 0xAA01, 0x6AC0, 0x6B80, 0xAB41, 0x6900, 0xA9C1, 0xA881, 0x6840, 35 | 0x7800, 0xB8C1, 0xB981, 0x7940, 0xBB01, 0x7BC0, 0x7A80, 0xBA41, 36 | 0xBE01, 0x7EC0, 0x7F80, 0xBF41, 0x7D00, 0xBDC1, 0xBC81, 0x7C40, 37 | 0xB401, 0x74C0, 0x7580, 0xB541, 0x7700, 0xB7C1, 0xB681, 0x7640, 38 | 0x7200, 0xB2C1, 0xB381, 0x7340, 0xB101, 0x71C0, 0x7080, 0xB041, 39 | 0x5000, 0x90C1, 0x9181, 0x5140, 0x9301, 0x53C0, 0x5280, 0x9241, 40 | 0x9601, 0x56C0, 0x5780, 0x9741, 0x5500, 0x95C1, 0x9481, 0x5440, 41 | 0x9C01, 0x5CC0, 0x5D80, 0x9D41, 0x5F00, 0x9FC1, 0x9E81, 0x5E40, 42 | 0x5A00, 0x9AC1, 0x9B81, 0x5B40, 0x9901, 0x59C0, 0x5880, 0x9841, 43 | 0x8801, 0x48C0, 0x4980, 0x8941, 0x4B00, 0x8BC1, 0x8A81, 0x4A40, 44 | 0x4E00, 0x8EC1, 0x8F81, 0x4F40, 0x8D01, 0x4DC0, 0x4C80, 0x8C41, 45 | 0x4400, 0x84C1, 0x8581, 0x4540, 0x8701, 0x47C0, 0x4680, 0x8641, 46 | 0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040); 47 | 48 | 49 | 50 | module.exports = function (str){ 51 | var buffer = new Buffer(str); 52 | return preDeal(buffer,buffer.length); 53 | } 54 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # hexo-abbrlink 2 | [![npm](https://img.shields.io/npm/dm/hexo-abbrlink.svg)](https://www.npmjs.com/package/hexo-abbrlink) 3 | [![npm](https://img.shields.io/npm/dy/hexo-abbrlink.svg)](https://www.npmjs.com/package/hexo-abbrlink) 4 | [![npm](https://img.shields.io/npm/dt/hexo-abbrlink.svg)](https://www.npmjs.com/package/hexo-abbrlink) 5 | 6 | A [Hexo plugin](https://hexo.io/plugins/) to generate static post link based on title and data in the post front. 7 | 8 | This plugin supports `.textbundle` -- a file format contents markdown and its assets. Actually, `.textbundle` file is a folder which shows like a file in Finder on macOS. 9 | 10 | ## Suggest 11 | [https://github.com/rozbo/hexo-abbrlink2](https://github.com/rozbo/hexo-abbrlink2), supports the orderly growth of ID is beta now. 12 | The working principle of `hexo-abbrlink2` is different from this plug-in, not as an upgraded version of this plugin, they are different individuals. 13 | But `hexo-abbrlink2` is compatible with the previous configuration of this plugin. 14 | As a supplement to this plugin, use it only when you really need an orderly growing id. 15 | ## How to install 16 | 17 | Add plugin to Hexo: 18 | 19 | ``` 20 | npm install hexo-abbrlink --save 21 | ``` 22 | 23 | Modify permalink in config.yml file: 24 | 25 | ``` 26 | permalink: posts/:abbrlink/ 27 | # or 28 | permalink: posts/:abbrlink.html 29 | ``` 30 | 31 | Configs in `_config.yml`: 32 | 33 | ``` 34 | # abbrlink config 35 | abbrlink: 36 | alg: crc32 # Algorithm used to calc abbrlink. Support crc16(default) and crc32 37 | rep: hex # Representation of abbrlink in URLs. Support dec(default) and hex 38 | drafts: false # Whether to generate abbrlink for drafts. (false in default) 39 | force: false # Enable force mode. In this mode, the plugin will ignore the cache, and calc the abbrlink for every post even it already had an abbrlink. (false in default) 40 | writeback: true # Whether to write changes to front-matters back to the actual markdown files. (true in default) 41 | ``` 42 | 43 | ## Sample 44 | 45 | The generated link will look like the following: 46 | 47 | ``` 48 | crc16 & hex 49 | https://post.zz173.com/posts/66c8.html 50 | 51 | crc16 & dec 52 | https://post.zz173.com/posts/65535.html 53 | ``` 54 | 55 | ``` 56 | crc32 & hex 57 | https://post.zz173.com/posts/8ddf18fb.html 58 | 59 | crc32 & dec 60 | https://post.zz173.com/posts/1690090958.html 61 | ``` 62 | 63 | ## More info 64 | 65 | see [this](https://post.zz173.com/detail/hexo-abbrlink.html)(Chinese) 66 | 67 | ## ThanksFor 68 | 69 | [NoahDragon](https://github.com/NoahDragon) 70 | 71 | 72 | ## Sponsor 73 | The project is develop by [JetBrains Ide](https://www.jetbrains.com/?from=puck) 74 | 75 | [![](https://www.jetbrains.com/company/brand/img/logo1.svg)](https://www.jetbrains.com/?from=puck) 76 | -------------------------------------------------------------------------------- /lib/crc32.js: -------------------------------------------------------------------------------- 1 | /* crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */ 2 | /* vim: set ts=2: */ 3 | /*exported CRC32 */ 4 | 'use strict'; 5 | var CRC32; 6 | (function (factory) { 7 | /*jshint ignore:start */ 8 | if(typeof DO_NOT_EXPORT_CRC === 'undefined') { 9 | if('object' === typeof exports) { 10 | factory(exports); 11 | } else if ('function' === typeof define && define.amd) { 12 | define(function () { 13 | var module = {}; 14 | factory(module); 15 | return module; 16 | }); 17 | } else { 18 | factory(CRC32 = {}); 19 | } 20 | } else { 21 | factory(CRC32 = {}); 22 | } 23 | /*jshint ignore:end */ 24 | }(function(CRC32) { 25 | CRC32.version = '0.4.1'; 26 | /* see perf/crc32table.js */ 27 | /*global Int32Array */ 28 | function signed_crc_table() { 29 | var c = 0, table = new Array(256); 30 | 31 | for(var n =0; n != 256; ++n){ 32 | c = n; 33 | c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1)); 34 | c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1)); 35 | c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1)); 36 | c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1)); 37 | c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1)); 38 | c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1)); 39 | c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1)); 40 | c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1)); 41 | table[n] = c; 42 | } 43 | 44 | return typeof Int32Array !== 'undefined' ? new Int32Array(table) : table; 45 | } 46 | 47 | var T = signed_crc_table(); 48 | /*global Buffer */ 49 | var use_buffer = typeof Buffer !== 'undefined'; 50 | function crc32_bstr(bstr) { 51 | if(bstr.length > 32768) if(use_buffer) return crc32_buf_8(new Buffer(bstr)); 52 | var C = -1, L = bstr.length - 1; 53 | for(var i = 0; i < L;) { 54 | C = (C>>>8) ^ T[(C^bstr.charCodeAt(i++))&0xFF]; 55 | C = (C>>>8) ^ T[(C^bstr.charCodeAt(i++))&0xFF]; 56 | } 57 | if(i === L) C = (C>>>8) ^ T[(C ^ bstr.charCodeAt(i))&0xFF]; 58 | return C ^ -1; 59 | } 60 | 61 | function crc32_buf(buf) { 62 | if(buf.length > 10000) return crc32_buf_8(buf); 63 | var C = -1, L = buf.length - 3; 64 | for(var i = 0; i < L;) { 65 | C = (C>>>8) ^ T[(C^buf[i++])&0xFF]; 66 | C = (C>>>8) ^ T[(C^buf[i++])&0xFF]; 67 | C = (C>>>8) ^ T[(C^buf[i++])&0xFF]; 68 | C = (C>>>8) ^ T[(C^buf[i++])&0xFF]; 69 | } 70 | while(i < L+3) C = (C>>>8) ^ T[(C^buf[i++])&0xFF]; 71 | return C ^ -1; 72 | } 73 | 74 | function crc32_buf_8(buf) { 75 | var C = -1, L = buf.length - 7; 76 | for(var i = 0; i < L;) { 77 | C = (C>>>8) ^ T[(C^buf[i++])&0xFF]; 78 | C = (C>>>8) ^ T[(C^buf[i++])&0xFF]; 79 | C = (C>>>8) ^ T[(C^buf[i++])&0xFF]; 80 | C = (C>>>8) ^ T[(C^buf[i++])&0xFF]; 81 | C = (C>>>8) ^ T[(C^buf[i++])&0xFF]; 82 | C = (C>>>8) ^ T[(C^buf[i++])&0xFF]; 83 | C = (C>>>8) ^ T[(C^buf[i++])&0xFF]; 84 | C = (C>>>8) ^ T[(C^buf[i++])&0xFF]; 85 | } 86 | while(i < L+7) C = (C>>>8) ^ T[(C^buf[i++])&0xFF]; 87 | return C ^ -1; 88 | } 89 | 90 | function crc32_str(str) { 91 | var C = -1; 92 | for(var i = 0, L=str.length, c, d; i < L;) { 93 | c = str.charCodeAt(i++); 94 | if(c < 0x80) { 95 | C = (C>>>8) ^ T[(C ^ c)&0xFF]; 96 | } else if(c < 0x800) { 97 | C = (C>>>8) ^ T[(C ^ (192|((c>>6)&31)))&0xFF]; 98 | C = (C>>>8) ^ T[(C ^ (128|(c&63)))&0xFF]; 99 | } else if(c >= 0xD800 && c < 0xE000) { 100 | c = (c&1023)+64; d = str.charCodeAt(i++)&1023; 101 | C = (C>>>8) ^ T[(C ^ (240|((c>>8)&7)))&0xFF]; 102 | C = (C>>>8) ^ T[(C ^ (128|((c>>2)&63)))&0xFF]; 103 | C = (C>>>8) ^ T[(C ^ (128|((d>>6)&15)|((c&3)<<4)))&0xFF]; 104 | C = (C>>>8) ^ T[(C ^ (128|(d&63)))&0xFF]; 105 | } else { 106 | C = (C>>>8) ^ T[(C ^ (224|((c>>12)&15)))&0xFF]; 107 | C = (C>>>8) ^ T[(C ^ (128|((c>>6)&63)))&0xFF]; 108 | C = (C>>>8) ^ T[(C ^ (128|(c&63)))&0xFF]; 109 | } 110 | } 111 | return C ^ -1; 112 | } 113 | CRC32.table = T; 114 | CRC32.bstr = crc32_bstr; 115 | CRC32.buf = crc32_buf; 116 | CRC32.str = crc32_str; 117 | })); -------------------------------------------------------------------------------- /lib/logic.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | let crc16 = require('./crc16'); 4 | let crc32 = require('./crc32'); 5 | let model = require('./model'); 6 | let front = require('hexo-front-matter'); 7 | let fs = require('hexo-fs'); 8 | 9 | function is_org_mode_file(filepath) { 10 | return /.*\.org/.test(filepath) 11 | } 12 | 13 | function org_get_abbrlink(data) { 14 | let r = data.content.match(/#\+ABBRLINK:.*\n/); 15 | if (r) { 16 | data.abbrlink = r[0].split(':')[1].trim(); 17 | } else { 18 | data.abbrlink = ''; 19 | } 20 | return data; 21 | } 22 | 23 | let collected = false; 24 | const DATA_DB = "db.json" 25 | function collectExistingAbbrlinks (hexo) { 26 | if (collected) // only collect existing abbrlinks once 27 | return; 28 | // iterate over all posts from DB 29 | collected = true; 30 | if (!fs.existsSync(DATA_DB)) 31 | return; 32 | let last_data = fs.readFileSync(DATA_DB, { encoding: 'utf8' }) 33 | last_data = JSON.parse(last_data) 34 | const posts = last_data['models']['Post'] 35 | posts.forEach(post => { 36 | model.recordExistingAbbrlink(post.abbrlink) // mark this abbrlink as used 37 | }); 38 | } 39 | 40 | let generateAbbrlink = function (data) { 41 | let log = this.log; 42 | const config = this.config.abbrlink || {}; 43 | 44 | // draft processing 45 | let opt_drafts = config && config.drafts ? config.drafts : false; 46 | if (opt_drafts == false && data.source.startsWith('_drafts/')) { 47 | return data; 48 | } 49 | 50 | // ensure that each post should only be processed once 51 | if (model.isPostProcessed(data.source)) { 52 | let abbrlink = model.getGeneratedAbbrlink(data.source); 53 | if (abbrlink) 54 | data.abbrlink = abbrlink; 55 | return data; 56 | } 57 | 58 | // collect existing abbrlink in front-matters, to avoid conflict in later generation process 59 | // if config.force == true, no need to do this because all abbrlinks will be re-calculated 60 | if (!config.force) 61 | collectExistingAbbrlinks(this) 62 | 63 | // generate abbrlink for posts 64 | if (data.layout == 'post') { 65 | let abbrlink; 66 | if (!is_org_mode_file(data.source)) { 67 | abbrlink = data.abbrlink; 68 | } else { 69 | abbrlink = org_get_abbrlink(data).abbrlink; 70 | } 71 | 72 | // re-parse front matter 73 | let front_matter = front.parse(data.raw); 74 | 75 | // calc abbrlinks 76 | if (!abbrlink || abbrlink == '0' || config.force) { 77 | let opt_alg = config && config.alg ? config.alg : 'crc16'; 78 | let opt_rep = config && config.rep ? config.rep : 'dec'; 79 | let abbrlink_value = opt_alg == 'crc32' ? crc32.str(front_matter.title + front_matter.date) >>> 0 : crc16(front_matter.title + front_matter.date) >>> 0; 80 | // if this abbrlink already exists, choose a different one 81 | abbrlink_value = model.uniqueAbbrlink(abbrlink_value); 82 | // generate actual abbrlink string 83 | abbrlink = opt_rep == 'hex' ? abbrlink_value.toString(16) : abbrlink_value; 84 | data.abbrlink = abbrlink; 85 | 86 | model.cacheGeneratedAbbrlink(data.source, abbrlink) 87 | log.i('Generated: link [%s] for post [ %s ]', data.abbrlink, data.full_source); 88 | } 89 | } 90 | model.setPostProcessed(data.source) 91 | return data; 92 | }; 93 | 94 | let writebackToFiles = function (data) { 95 | let opt_writeback = this.config.abbrlink && this.config.abbrlink.writeback != undefined ? this.config.abbrlink.writeback : true; 96 | if(!opt_writeback) 97 | return data; 98 | 99 | // avoid rewrite front-matter if the same abbrlink exists 100 | let abbrlink = model.getGeneratedAbbrlink(data.source) 101 | if(!abbrlink) 102 | return data; 103 | let front_matter = front.parse(data.raw); 104 | if (front_matter.abbrlink == abbrlink) 105 | return data; 106 | 107 | front_matter.abbrlink = abbrlink; 108 | if (!is_org_mode_file(data.source)) { 109 | // process post 110 | let postStr = front.stringify(front_matter); 111 | postStr = '---\n' + postStr; 112 | fs.writeFileSync(data.full_source, postStr, 'utf-8'); 113 | } else { 114 | let postStr = data.raw.split('\n'); 115 | postStr.splice(2, 0, '#+ABBRLINK: ' + abbrlink); 116 | fs.writeFileSync(data.full_source, postStr.join('\n'), 'utf-8'); 117 | } 118 | } 119 | 120 | module.exports = { 121 | generateAbbrlink, 122 | writebackToFiles 123 | }; 124 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | anymatch@~3.1.1: 6 | version "3.1.1" 7 | resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" 8 | integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== 9 | dependencies: 10 | normalize-path "^3.0.0" 11 | picomatch "^2.0.4" 12 | 13 | argparse@^1.0.7: 14 | version "1.0.10" 15 | resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" 16 | integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== 17 | dependencies: 18 | sprintf-js "~1.0.2" 19 | 20 | binary-extensions@^2.0.0: 21 | version "2.1.0" 22 | resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz#30fa40c9e7fe07dbc895678cd287024dea241dd9" 23 | integrity sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ== 24 | 25 | bluebird@^3.5.1, bluebird@^3.5.2: 26 | version "3.7.2" 27 | resolved "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" 28 | integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== 29 | 30 | braces@~3.0.2: 31 | version "3.0.2" 32 | resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" 33 | integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== 34 | dependencies: 35 | fill-range "^7.0.1" 36 | 37 | camel-case@^4.0.0: 38 | version "4.1.1" 39 | resolved "https://registry.npmjs.org/camel-case/-/camel-case-4.1.1.tgz#1fc41c854f00e2f7d0139dfeba1542d6896fe547" 40 | integrity sha512-7fa2WcG4fYFkclIvEmxBbTvmibwF2/agfEBc6q3lOpVu0A13ltLsA+Hr/8Hp6kp5f+G7hKi6t8lys6XxP+1K6Q== 41 | dependencies: 42 | pascal-case "^3.1.1" 43 | tslib "^1.10.0" 44 | 45 | chokidar@^3.0.0: 46 | version "3.4.0" 47 | resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.4.0.tgz#b30611423ce376357c765b9b8f904b9fba3c0be8" 48 | integrity sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ== 49 | dependencies: 50 | anymatch "~3.1.1" 51 | braces "~3.0.2" 52 | glob-parent "~5.1.0" 53 | is-binary-path "~2.1.0" 54 | is-glob "~4.0.1" 55 | normalize-path "~3.0.0" 56 | readdirp "~3.4.0" 57 | optionalDependencies: 58 | fsevents "~2.1.2" 59 | 60 | clipboard@^2.0.0: 61 | version "2.0.6" 62 | resolved "https://registry.npmjs.org/clipboard/-/clipboard-2.0.6.tgz#52921296eec0fdf77ead1749421b21c968647376" 63 | integrity sha512-g5zbiixBRk/wyKakSwCKd7vQXDjFnAMGHoEyBogG/bw9kTD9GvdAvaoRR1ALcEzt3pVKxZR0pViekPMIS0QyGg== 64 | dependencies: 65 | good-listener "^1.2.2" 66 | select "^1.1.2" 67 | tiny-emitter "^2.0.0" 68 | 69 | cross-spawn@^7.0.0: 70 | version "7.0.3" 71 | resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" 72 | integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== 73 | dependencies: 74 | path-key "^3.1.0" 75 | shebang-command "^2.0.0" 76 | which "^2.0.1" 77 | 78 | deepmerge@^4.2.2: 79 | version "4.2.2" 80 | resolved "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" 81 | integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== 82 | 83 | delegate@^3.1.2: 84 | version "3.2.0" 85 | resolved "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz#b66b71c3158522e8ab5744f720d8ca0c2af59166" 86 | integrity sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw== 87 | 88 | dom-serializer@^0.2.1: 89 | version "0.2.2" 90 | resolved "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51" 91 | integrity sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g== 92 | dependencies: 93 | domelementtype "^2.0.1" 94 | entities "^2.0.0" 95 | 96 | domelementtype@^2.0.1: 97 | version "2.0.1" 98 | resolved "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz#1f8bdfe91f5a78063274e803b4bdcedf6e94f94d" 99 | integrity sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ== 100 | 101 | domhandler@^3.0.0: 102 | version "3.0.0" 103 | resolved "https://registry.npmjs.org/domhandler/-/domhandler-3.0.0.tgz#51cd13efca31da95bbb0c5bee3a48300e333b3e9" 104 | integrity sha512-eKLdI5v9m67kbXQbJSNn1zjh0SDzvzWVWtX+qEI3eMjZw8daH9k8rlj1FZY9memPwjiskQFbe7vHVVJIAqoEhw== 105 | dependencies: 106 | domelementtype "^2.0.1" 107 | 108 | domutils@^2.0.0: 109 | version "2.1.0" 110 | resolved "https://registry.npmjs.org/domutils/-/domutils-2.1.0.tgz#7ade3201af43703fde154952e3a868eb4b635f16" 111 | integrity sha512-CD9M0Dm1iaHfQ1R/TI+z3/JWp/pgub0j4jIQKH89ARR4ATAV2nbaOQS5XxU9maJP5jHaPdDDQSEHuE2UmpUTKg== 112 | dependencies: 113 | dom-serializer "^0.2.1" 114 | domelementtype "^2.0.1" 115 | domhandler "^3.0.0" 116 | 117 | entities@^2.0.0: 118 | version "2.0.3" 119 | resolved "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz#5c487e5742ab93c15abb5da22759b8590ec03b7f" 120 | integrity sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ== 121 | 122 | esprima@^4.0.0: 123 | version "4.0.1" 124 | resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" 125 | integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== 126 | 127 | fill-range@^7.0.1: 128 | version "7.0.1" 129 | resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" 130 | integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== 131 | dependencies: 132 | to-regex-range "^5.0.1" 133 | 134 | fsevents@~2.1.2: 135 | version "2.1.3" 136 | resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" 137 | integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== 138 | 139 | glob-parent@~5.1.0: 140 | version "5.1.1" 141 | resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" 142 | integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== 143 | dependencies: 144 | is-glob "^4.0.1" 145 | 146 | good-listener@^1.2.2: 147 | version "1.2.2" 148 | resolved "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz#d53b30cdf9313dffb7dc9a0d477096aa6d145c50" 149 | integrity sha1-1TswzfkxPf+33JoNR3CWqm0UXFA= 150 | dependencies: 151 | delegate "^3.1.2" 152 | 153 | graceful-fs@^4.1.11: 154 | version "4.2.4" 155 | resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" 156 | integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== 157 | 158 | hexo-front-matter@^1.0.0: 159 | version "1.0.0" 160 | resolved "https://registry.npmjs.org/hexo-front-matter/-/hexo-front-matter-1.0.0.tgz#0b48b1c1ed143e8cb25b3b223a9037385d910655" 161 | integrity sha512-Hn8IIzgWWnxYTekrjnA0rxwWMoQHifyrxKMqVibmFaRKf4AQ2V6Xo13Jiso6CDwYfS+OdA41QS5DG1Y+QXA5gw== 162 | dependencies: 163 | js-yaml "^3.13.1" 164 | 165 | hexo-fs@^3.1.0: 166 | version "3.1.0" 167 | resolved "https://registry.npmjs.org/hexo-fs/-/hexo-fs-3.1.0.tgz#2052ff72c68cda2c577a87aa0ea7980ae503fa99" 168 | integrity sha512-SfoDH7zlU9Iop+bAfEONXezbNIkpVX1QqjNCBYpapilZR+xVOCfTEdlNixanrKBbLGPb2fXqrdDBFgrKuiVGQQ== 169 | dependencies: 170 | bluebird "^3.5.1" 171 | chokidar "^3.0.0" 172 | graceful-fs "^4.1.11" 173 | hexo-util "^2.0.0" 174 | 175 | hexo-util@^2.0.0: 176 | version "2.1.0" 177 | resolved "https://registry.npmjs.org/hexo-util/-/hexo-util-2.1.0.tgz#2c691a034a05d4ed254696c2e99d7cb686fdd350" 178 | integrity sha512-TXt6z7rj5BEDig7aZZjfHa7qFKGOtUlQoVHvQh0GS99fGp1JxWbllosI173kOcrzor/uubtGk+5nRzhELZyeZw== 179 | dependencies: 180 | bluebird "^3.5.2" 181 | camel-case "^4.0.0" 182 | cross-spawn "^7.0.0" 183 | deepmerge "^4.2.2" 184 | highlight.js "^10.0.0" 185 | htmlparser2 "^4.0.0" 186 | prismjs "^1.17.1" 187 | strip-indent "^3.0.0" 188 | striptags "^3.1.1" 189 | 190 | highlight.js@^10.0.0: 191 | version "10.1.1" 192 | resolved "https://registry.npmjs.org/highlight.js/-/highlight.js-10.1.1.tgz#691a2148a8d922bf12e52a294566a0d993b94c57" 193 | integrity sha512-b4L09127uVa+9vkMgPpdUQP78ickGbHEQTWeBrQFTJZ4/n2aihWOGS0ZoUqAwjVmfjhq/C76HRzkqwZhK4sBbg== 194 | 195 | htmlparser2@^4.0.0: 196 | version "4.1.0" 197 | resolved "https://registry.npmjs.org/htmlparser2/-/htmlparser2-4.1.0.tgz#9a4ef161f2e4625ebf7dfbe6c0a2f52d18a59e78" 198 | integrity sha512-4zDq1a1zhE4gQso/c5LP1OtrhYTncXNSpvJYtWJBtXAETPlMfi3IFNjGuQbYLuVY4ZR0QMqRVvo4Pdy9KLyP8Q== 199 | dependencies: 200 | domelementtype "^2.0.1" 201 | domhandler "^3.0.0" 202 | domutils "^2.0.0" 203 | entities "^2.0.0" 204 | 205 | is-binary-path@~2.1.0: 206 | version "2.1.0" 207 | resolved "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" 208 | integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== 209 | dependencies: 210 | binary-extensions "^2.0.0" 211 | 212 | is-extglob@^2.1.1: 213 | version "2.1.1" 214 | resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" 215 | integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= 216 | 217 | is-glob@^4.0.1, is-glob@~4.0.1: 218 | version "4.0.1" 219 | resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" 220 | integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== 221 | dependencies: 222 | is-extglob "^2.1.1" 223 | 224 | is-number@^7.0.0: 225 | version "7.0.0" 226 | resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" 227 | integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== 228 | 229 | isexe@^2.0.0: 230 | version "2.0.0" 231 | resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" 232 | integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= 233 | 234 | js-yaml@^3.13.1: 235 | version "3.14.0" 236 | resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" 237 | integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== 238 | dependencies: 239 | argparse "^1.0.7" 240 | esprima "^4.0.0" 241 | 242 | lower-case@^2.0.1: 243 | version "2.0.1" 244 | resolved "https://registry.npmjs.org/lower-case/-/lower-case-2.0.1.tgz#39eeb36e396115cc05e29422eaea9e692c9408c7" 245 | integrity sha512-LiWgfDLLb1dwbFQZsSglpRj+1ctGnayXz3Uv0/WO8n558JycT5fg6zkNcnW0G68Nn0aEldTFeEfmjCfmqry/rQ== 246 | dependencies: 247 | tslib "^1.10.0" 248 | 249 | min-indent@^1.0.0: 250 | version "1.0.1" 251 | resolved "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" 252 | integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== 253 | 254 | no-case@^3.0.3: 255 | version "3.0.3" 256 | resolved "https://registry.npmjs.org/no-case/-/no-case-3.0.3.tgz#c21b434c1ffe48b39087e86cfb4d2582e9df18f8" 257 | integrity sha512-ehY/mVQCf9BL0gKfsJBvFJen+1V//U+0HQMPrWct40ixE4jnv0bfvxDbWtAHL9EcaPEOJHVVYKoQn1TlZUB8Tw== 258 | dependencies: 259 | lower-case "^2.0.1" 260 | tslib "^1.10.0" 261 | 262 | normalize-path@^3.0.0, normalize-path@~3.0.0: 263 | version "3.0.0" 264 | resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" 265 | integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== 266 | 267 | pascal-case@^3.1.1: 268 | version "3.1.1" 269 | resolved "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.1.tgz#5ac1975133ed619281e88920973d2cd1f279de5f" 270 | integrity sha512-XIeHKqIrsquVTQL2crjq3NfJUxmdLasn3TYOU0VBM+UX2a6ztAWBlJQBePLGY7VHW8+2dRadeIPK5+KImwTxQA== 271 | dependencies: 272 | no-case "^3.0.3" 273 | tslib "^1.10.0" 274 | 275 | path-key@^3.1.0: 276 | version "3.1.1" 277 | resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" 278 | integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== 279 | 280 | picomatch@^2.0.4, picomatch@^2.2.1: 281 | version "2.2.2" 282 | resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" 283 | integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== 284 | 285 | prismjs@^1.17.1: 286 | version "1.20.0" 287 | resolved "https://registry.npmjs.org/prismjs/-/prismjs-1.20.0.tgz#9b685fc480a3514ee7198eac6a3bf5024319ff03" 288 | integrity sha512-AEDjSrVNkynnw6A+B1DsFkd6AVdTnp+/WoUixFRULlCLZVRZlVQMVWio/16jv7G1FscUxQxOQhWwApgbnxr6kQ== 289 | optionalDependencies: 290 | clipboard "^2.0.0" 291 | 292 | readdirp@~3.4.0: 293 | version "3.4.0" 294 | resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz#9fdccdf9e9155805449221ac645e8303ab5b9ada" 295 | integrity sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ== 296 | dependencies: 297 | picomatch "^2.2.1" 298 | 299 | select@^1.1.2: 300 | version "1.1.2" 301 | resolved "https://registry.npmjs.org/select/-/select-1.1.2.tgz#0e7350acdec80b1108528786ec1d4418d11b396d" 302 | integrity sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0= 303 | 304 | shebang-command@^2.0.0: 305 | version "2.0.0" 306 | resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" 307 | integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== 308 | dependencies: 309 | shebang-regex "^3.0.0" 310 | 311 | shebang-regex@^3.0.0: 312 | version "3.0.0" 313 | resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" 314 | integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== 315 | 316 | sprintf-js@~1.0.2: 317 | version "1.0.3" 318 | resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" 319 | integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= 320 | 321 | strip-indent@^3.0.0: 322 | version "3.0.0" 323 | resolved "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001" 324 | integrity sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ== 325 | dependencies: 326 | min-indent "^1.0.0" 327 | 328 | striptags@^3.1.1: 329 | version "3.1.1" 330 | resolved "https://registry.npmjs.org/striptags/-/striptags-3.1.1.tgz#c8c3e7fdd6fb4bb3a32a3b752e5b5e3e38093ebd" 331 | integrity sha1-yMPn/db7S7OjKjt1LltePjgJPr0= 332 | 333 | tiny-emitter@^2.0.0: 334 | version "2.1.0" 335 | resolved "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz#1d1a56edfc51c43e863cbb5382a72330e3555423" 336 | integrity sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q== 337 | 338 | to-regex-range@^5.0.1: 339 | version "5.0.1" 340 | resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" 341 | integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== 342 | dependencies: 343 | is-number "^7.0.0" 344 | 345 | tslib@^1.10.0: 346 | version "1.13.0" 347 | resolved "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" 348 | integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== 349 | 350 | which@^2.0.1: 351 | version "2.0.2" 352 | resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" 353 | integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== 354 | dependencies: 355 | isexe "^2.0.0" 356 | --------------------------------------------------------------------------------