hexo-adsense 1.1.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. package/CHANGELOG.md +0 -0
  2. package/LICENSE +0 -0
  3. package/dist/index.cjs +12799 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.js +12782 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/index.mjs +12782 -0
  8. package/dist/index.mjs.map +1 -0
  9. package/dist/source/adblock.css +2 -0
  10. package/dist/source/adblock.js +1 -0
  11. package/{lib → dist}/source/article-ads.css +0 -0
  12. package/dist/source/article-ads.js +1 -0
  13. package/dist/source/article-ads.old.js +1 -0
  14. package/{lib → dist}/source/blogger-redirect.html +0 -0
  15. package/dist/source/https.js +1 -0
  16. package/{lib → dist}/source/in_article_ads_test.html +0 -0
  17. package/package.json +122 -38
  18. package/{README.md → readme.md} +27 -8
  19. package/gulpfile.ts +0 -100
  20. package/lib/index.d.ts +0 -1
  21. package/lib/index.js +0 -91
  22. package/lib/packages/hexo-cli-extras/lib/env.d.ts +0 -3
  23. package/lib/packages/hexo-cli-extras/lib/env.js +0 -49
  24. package/lib/packages/hexo-extend-injector2/index.d.ts +0 -2
  25. package/lib/packages/hexo-extend-injector2/index.js +0 -12
  26. package/lib/packages/hexo-extend-injector2/lib/bundle/css-bundle.d.ts +0 -2
  27. package/lib/packages/hexo-extend-injector2/lib/bundle/css-bundle.js +0 -64
  28. package/lib/packages/hexo-extend-injector2/lib/bundle/css-generator.d.ts +0 -2
  29. package/lib/packages/hexo-extend-injector2/lib/bundle/css-generator.js +0 -12
  30. package/lib/packages/hexo-extend-injector2/lib/bundle/handle-data-pre.d.ts +0 -2
  31. package/lib/packages/hexo-extend-injector2/lib/bundle/handle-data-pre.js +0 -28
  32. package/lib/packages/hexo-extend-injector2/lib/bundle/js-bundle.d.ts +0 -2
  33. package/lib/packages/hexo-extend-injector2/lib/bundle/js-bundle.js +0 -32
  34. package/lib/packages/hexo-extend-injector2/lib/bundle/js-generator.d.ts +0 -2
  35. package/lib/packages/hexo-extend-injector2/lib/bundle/js-generator.js +0 -8
  36. package/lib/packages/hexo-extend-injector2/lib/default-config.d.ts +0 -39
  37. package/lib/packages/hexo-extend-injector2/lib/default-config.js +0 -46
  38. package/lib/packages/hexo-extend-injector2/lib/filter.d.ts +0 -2
  39. package/lib/packages/hexo-extend-injector2/lib/filter.js +0 -22
  40. package/lib/packages/hexo-extend-injector2/lib/helper/injector.d.ts +0 -2
  41. package/lib/packages/hexo-extend-injector2/lib/helper/injector.js +0 -5
  42. package/lib/packages/hexo-extend-injector2/lib/helper/next-inject.d.ts +0 -2
  43. package/lib/packages/hexo-extend-injector2/lib/helper/next-inject.js +0 -12
  44. package/lib/packages/hexo-extend-injector2/lib/injector.d.ts +0 -29
  45. package/lib/packages/hexo-extend-injector2/lib/injector.js +0 -125
  46. package/lib/packages/hexo-extend-injector2/lib/load.d.ts +0 -3
  47. package/lib/packages/hexo-extend-injector2/lib/load.js +0 -37
  48. package/lib/packages/hexo-extend-injector2/lib/next-point.d.ts +0 -2
  49. package/lib/packages/hexo-extend-injector2/lib/next-point.js +0 -18
  50. package/lib/packages/hexo-extend-injector2/lib/next.d.ts +0 -2
  51. package/lib/packages/hexo-extend-injector2/lib/next.js +0 -99
  52. package/lib/packages/hexo-extend-injector2/lib/order.d.ts +0 -5
  53. package/lib/packages/hexo-extend-injector2/lib/order.js +0 -8
  54. package/lib/source/adblock.css +0 -2
  55. package/lib/source/adblock.js +0 -1
  56. package/lib/source/article-ads.js +0 -1
  57. package/lib/source/article-ads.old.js +0 -1
  58. package/lib/source/https.js +0 -1
  59. package/lib/src/article-ads.d.ts +0 -20
  60. package/lib/src/article-ads.js +0 -310
  61. package/lib/src/checkLocalHost.d.ts +0 -10
  62. package/lib/src/checkLocalHost.js +0 -37
  63. package/lib/src/config.d.ts +0 -14
  64. package/lib/src/config.js +0 -50
  65. package/lib/src/html-parser.d.ts +0 -8
  66. package/lib/src/html-parser.js +0 -26
  67. package/lib/src/log.d.ts +0 -1
  68. package/lib/src/log.js +0 -11
  69. package/lib/src/logger.d.ts +0 -3
  70. package/lib/src/logger.js +0 -25
  71. package/lib/src/md5.d.ts +0 -7
  72. package/lib/src/md5.js +0 -30
  73. package/lib/src/safestringify.d.ts +0 -2
  74. package/lib/src/safestringify.js +0 -125
  75. package/lib/src/utils.d.ts +0 -31
  76. package/lib/src/utils.js +0 -160
  77. package/lib/src/versionParser.d.ts +0 -27
  78. package/lib/src/versionParser.js +0 -40
  79. package/packages/@types/.gitmodules +0 -8
  80. package/packages/@types/LICENSE +0 -21
  81. package/packages/@types/README.md +0 -27
  82. package/packages/@types/hexo/HexoConfig.d.ts +0 -216
  83. package/packages/@types/hexo/LICENSE +0 -21
  84. package/packages/@types/hexo/README.md +0 -16
  85. package/packages/@types/hexo/index.d.ts +0 -849
  86. package/packages/@types/hexo/package.json +0 -34
  87. package/packages/@types/hexo-bunyan/LICENSE +0 -21
  88. package/packages/@types/hexo-bunyan/README.md +0 -16
  89. package/packages/@types/hexo-bunyan/index.d.ts +0 -9
  90. package/packages/@types/hexo-bunyan/package.json +0 -24
  91. package/packages/@types/hexo-log/LICENSE +0 -21
  92. package/packages/@types/hexo-log/README.md +0 -16
  93. package/packages/@types/hexo-log/index.d.ts +0 -159
  94. package/packages/@types/hexo-log/package.json +0 -28
  95. package/packages/@types/index.js +0 -2
  96. package/packages/@types/package.json +0 -30
  97. package/packages/@types/test/package.json +0 -15
  98. package/packages/@types/test/through2.ts +0 -6
  99. package/packages/@types/tsconfig.json +0 -14
  100. package/packages/@types/typings/index.d.ts +0 -7
  101. package/packages/@types/typings/kill-port.d.ts +0 -3
  102. package/packages/@types/typings/markdown-it-abbr.d.ts +0 -4
  103. package/packages/@types/typings/markdown-it-footnote.d.ts +0 -4
  104. package/packages/@types/typings/markdown-it-image-figures.d.ts +0 -4
  105. package/packages/@types/typings/markdown-it-mark.d.ts +0 -4
  106. package/packages/@types/typings/markdown-it-sub.d.ts +0 -7
  107. package/packages/@types/typings/markdown-it-sup.d.ts +0 -7
  108. package/packages/hexo-cli-extras/.eslintrc +0 -13
  109. package/packages/hexo-cli-extras/LICENSE.md +0 -20
  110. package/packages/hexo-cli-extras/README.md +0 -146
  111. package/packages/hexo-cli-extras/docs/basic.gif +0 -0
  112. package/packages/hexo-cli-extras/docs/gui.gif +0 -0
  113. package/packages/hexo-cli-extras/docs/remove.png +0 -0
  114. package/packages/hexo-cli-extras/docs/rename.png +0 -0
  115. package/packages/hexo-cli-extras/index.js +0 -48
  116. package/packages/hexo-cli-extras/lib/edit.js +0 -209
  117. package/packages/hexo-cli-extras/lib/env.js +0 -52
  118. package/packages/hexo-cli-extras/lib/extensions.js +0 -23
  119. package/packages/hexo-cli-extras/lib/integrate.js +0 -87
  120. package/packages/hexo-cli-extras/lib/isolate.js +0 -179
  121. package/packages/hexo-cli-extras/lib/remove.js +0 -145
  122. package/packages/hexo-cli-extras/lib/rename.js +0 -171
  123. package/packages/hexo-cli-extras/package.json +0 -34
  124. package/packages/hexo-extend-injector2/.eslintrc +0 -4
  125. package/packages/hexo-extend-injector2/.github/workflows/linter.yml +0 -27
  126. package/packages/hexo-extend-injector2/.github/workflows/tester.yml +0 -24
  127. package/packages/hexo-extend-injector2/.vscode/settings.json +0 -10
  128. package/packages/hexo-extend-injector2/LICENSE +0 -165
  129. package/packages/hexo-extend-injector2/README-ZH.md +0 -189
  130. package/packages/hexo-extend-injector2/README.md +0 -191
  131. package/packages/hexo-extend-injector2/USAGE.md +0 -38
  132. package/packages/hexo-extend-injector2/index.js +0 -14
  133. package/packages/hexo-extend-injector2/lib/bundle/css-bundle.js +0 -79
  134. package/packages/hexo-extend-injector2/lib/bundle/css-generator.js +0 -13
  135. package/packages/hexo-extend-injector2/lib/bundle/handle-data-pre.js +0 -29
  136. package/packages/hexo-extend-injector2/lib/bundle/js-bundle.js +0 -42
  137. package/packages/hexo-extend-injector2/lib/bundle/js-generator.js +0 -10
  138. package/packages/hexo-extend-injector2/lib/default-config.js +0 -52
  139. package/packages/hexo-extend-injector2/lib/filter.js +0 -24
  140. package/packages/hexo-extend-injector2/lib/helper/injector.js +0 -6
  141. package/packages/hexo-extend-injector2/lib/helper/next-inject.js +0 -14
  142. package/packages/hexo-extend-injector2/lib/injector.js +0 -128
  143. package/packages/hexo-extend-injector2/lib/load.js +0 -45
  144. package/packages/hexo-extend-injector2/lib/next-point.js +0 -19
  145. package/packages/hexo-extend-injector2/lib/next.js +0 -87
  146. package/packages/hexo-extend-injector2/lib/order.js +0 -9
  147. package/packages/hexo-extend-injector2/package.json +0 -49
  148. package/packages/hexo-extend-injector2/renovate.json +0 -6
  149. package/packages/hexo-extend-injector2/test/.eslintrc +0 -3
  150. package/packages/hexo-extend-injector2/test/index.js +0 -18
  151. package/packages/hexo-extend-injector2/test/lib/bundle/bundle-css.js +0 -86
  152. package/packages/hexo-extend-injector2/test/lib/bundle/bundle-js.js +0 -36
  153. package/packages/hexo-extend-injector2/test/lib/bundle/test.css +0 -3
  154. package/packages/hexo-extend-injector2/test/lib/bundle/test.js +0 -5
  155. package/packages/hexo-extend-injector2/test/lib/helper/injector.js +0 -45
  156. package/packages/hexo-extend-injector2/test/lib/helper/next-inject.js +0 -69
  157. package/packages/hexo-extend-injector2/test/lib/hexo-compatible.js +0 -250
  158. package/packages/hexo-extend-injector2/test/lib/hexo-injector.js +0 -37
  159. package/packages/hexo-extend-injector2/test/lib/injector.js +0 -93
  160. package/packages/memoize/CHANGELOG.md +0 -82
  161. package/packages/memoize/CHANGES +0 -124
  162. package/packages/memoize/LICENSE +0 -15
  163. package/packages/memoize/README.md +0 -503
  164. package/packages/memoize/ext/async.js +0 -154
  165. package/packages/memoize/ext/dispose.js +0 -33
  166. package/packages/memoize/ext/max-age.js +0 -90
  167. package/packages/memoize/ext/max.js +0 -27
  168. package/packages/memoize/ext/promise.js +0 -147
  169. package/packages/memoize/ext/ref-counter.js +0 -48
  170. package/packages/memoize/index.js +0 -34
  171. package/packages/memoize/lib/configure-map.js +0 -182
  172. package/packages/memoize/lib/methods.js +0 -32
  173. package/packages/memoize/lib/registered-extensions.js +0 -1
  174. package/packages/memoize/lib/resolve-length.js +0 -15
  175. package/packages/memoize/lib/resolve-normalize.js +0 -17
  176. package/packages/memoize/lib/resolve-resolve.js +0 -21
  177. package/packages/memoize/lib/weak.js +0 -134
  178. package/packages/memoize/methods-plain.js +0 -3
  179. package/packages/memoize/methods.js +0 -3
  180. package/packages/memoize/normalizers/get-1.js +0 -29
  181. package/packages/memoize/normalizers/get-fixed.js +0 -71
  182. package/packages/memoize/normalizers/get-primitive-fixed.js +0 -16
  183. package/packages/memoize/normalizers/get.js +0 -90
  184. package/packages/memoize/normalizers/primitive.js +0 -9
  185. package/packages/memoize/package.json +0 -60
  186. package/packages/memoize/plain.js +0 -37
  187. package/packages/memoize/profile.js +0 -107
  188. package/packages/memoize/repository.md +0 -1
  189. package/packages/memoize/weak-plain.js +0 -3
  190. package/packages/memoize/weak.js +0 -3
  191. package/tsconfig.json +0 -39
  192. package/unused.md +0 -11
@@ -1,34 +0,0 @@
1
- {
2
- "name": "@types/hexo",
3
- "version": "3.8.8",
4
- "description": "TypeScript definitions for hexo",
5
- "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hexo",
6
- "license": "MIT",
7
- "contributors": [
8
- {
9
- "name": "KentarouTakeda",
10
- "url": "https://github.com/kentarouTakeda",
11
- "githubUsername": "kentarouTakeda"
12
- }
13
- ],
14
- "main": "",
15
- "types": "index.d.ts",
16
- "repository": {
17
- "type": "git",
18
- "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
19
- "directory": "types/hexo"
20
- },
21
- "scripts": {},
22
- "dependencies": {
23
- "@types/bluebird": "*",
24
- "@types/bunyan": "*",
25
- "@types/connect": "*",
26
- "@types/hexo-util": "*",
27
- "@types/minimist": "*",
28
- "@types/underscore": "*",
29
- "minimist": "^1.2.5",
30
- "moment": "^2.19.4"
31
- },
32
- "typesPublisherContentHash": "c9475285227ee48f579221155907cdb70466e30eba6f1e3455d8fa3c4a7b6033",
33
- "typeScriptVersion": "3.6"
34
- }
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) Microsoft Corporation. All rights reserved.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE
@@ -1,16 +0,0 @@
1
- # Installation
2
- > `npm install --save @types/hexo-bunyan`
3
-
4
- # Summary
5
- This package contains type definitions for hexo-bunyan (https://github.com/trentm/node-bunyan#readme).
6
-
7
- # Details
8
- Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hexo-bunyan
9
-
10
- Additional Details
11
- * Last updated: Thu, 09 Nov 2017 08:43:07 GMT
12
- * Dependencies: bunyan
13
- * Global values: none
14
-
15
- # Credits
16
- These definitions were written by segayuu <https://github.com/segayuu>.
@@ -1,9 +0,0 @@
1
- // Type definitions for hexo-bunyan 1.0
2
- // Project: https://github.com/trentm/node-bunyan#readme
3
- // Definitions by: segayuu <https://github.com/segayuu>
4
- // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
- // TypeScript Version: 2.1
6
-
7
- import bunyan = require("bunyan");
8
-
9
- export = bunyan;
@@ -1,24 +0,0 @@
1
- {
2
- "name": "@types/hexo-bunyan",
3
- "version": "1.0.1",
4
- "description": "TypeScript definitions for hexo-bunyan",
5
- "license": "MIT",
6
- "contributors": [
7
- {
8
- "name": "segayuu",
9
- "url": "https://github.com/segayuu",
10
- "githubUsername": "segayuu"
11
- }
12
- ],
13
- "main": "",
14
- "repository": {
15
- "type": "git",
16
- "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
17
- },
18
- "scripts": {},
19
- "dependencies": {
20
- "@types/bunyan": "*"
21
- },
22
- "typesPublisherContentHash": "c060644f133d3d86089f67ceb6908bee5970a3430aa3c425ff948844ec30687b",
23
- "typeScriptVersion": "2.1"
24
- }
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) Microsoft Corporation.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE
@@ -1,16 +0,0 @@
1
- # Installation
2
- > `npm install --save @types/hexo-log`
3
-
4
- # Summary
5
- This package contains type definitions for hexo-log (http://hexo.io/).
6
-
7
- # Details
8
- Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hexo-log.
9
-
10
- ### Additional Details
11
- * Last updated: Thu, 08 Jul 2021 14:22:50 GMT
12
- * Dependencies: [@types/hexo-bunyan](https://npmjs.com/package/@types/hexo-bunyan)
13
- * Global values: none
14
-
15
- # Credits
16
- These definitions were written by [segayuu](https://github.com/segayuu).
@@ -1,159 +0,0 @@
1
- // Type definitions for hexo-log 0.2
2
- // Project: http://hexo.io/
3
- // Definitions by: segayuu <https://github.com/segayuu>
4
- // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
- // TypeScript Version: 3.0
6
-
7
- import bunyan = require('hexo-bunyan');
8
- import streams = require('stream');
9
-
10
- declare class HexoLogger extends bunyan {
11
- /**
12
- * Returns a boolean: is the `debug` level enabled?
13
- *
14
- * This is equivalent to `log.isDebugEnabled()` or `log.isEnabledFor(DEBUG)` in log4j.
15
- */
16
- d(): boolean;
17
-
18
- /**
19
- * Special case to log an `Error` instance to the record.
20
- * This adds an `err` field with exception details
21
- * (including the stack) and sets `msg` to the exception
22
- * message or you can specify the `msg`.
23
- */
24
- d(error: Error, ...params: any[]): void;
25
-
26
- /**
27
- * The first field can optionally be a "fields" object, which
28
- * is merged into the log record.
29
- *
30
- * To pass in an Error *and* other fields, use the `err`
31
- * field name for the Error instance.
32
- */
33
- d(obj: object, ...params: any[]): void;
34
-
35
- /**
36
- * Uses `util.format` for msg formatting.
37
- */
38
- d(format: any, ...params: any[]): void;
39
-
40
- /**
41
- * Returns a boolean: is the `info` level enabled?
42
- *
43
- * This is equivalent to `log.isInfoEnabled()` or `log.isEnabledFor(INFO)` in log4j.
44
- */
45
- i(): boolean;
46
-
47
- /**
48
- * Special case to log an `Error` instance to the record.
49
- * This adds an `err` field with exception details
50
- * (including the stack) and sets `msg` to the exception
51
- * message or you can specify the `msg`.
52
- */
53
- i(error: Error, ...params: any[]): void;
54
-
55
- /**
56
- * The first field can optionally be a "fields" object, which
57
- * is merged into the log record.
58
- *
59
- * To pass in an Error *and* other fields, use the `err`
60
- * field name for the Error instance.
61
- */
62
- i(obj: object, ...params: any[]): void;
63
-
64
- /**
65
- * Uses `util.format` for msg formatting.
66
- */
67
- i(format: any, ...params: any[]): void;
68
-
69
- /**
70
- * Returns a boolean: is the `warn` level enabled?
71
- *
72
- * This is equivalent to `log.isWarnEnabled()` or `log.isEnabledFor(WARN)` in log4j.
73
- */
74
- w(): boolean;
75
-
76
- /**
77
- * Special case to log an `Error` instance to the record.
78
- * This adds an `err` field with exception details
79
- * (including the stack) and sets `msg` to the exception
80
- * message or you can specify the `msg`.
81
- */
82
- w(error: Error, ...params: any[]): void;
83
-
84
- /**
85
- * The first field can optionally be a "fields" object, which
86
- * is merged into the log record.
87
- *
88
- * To pass in an Error *and* other fields, use the `err`
89
- * field name for the Error instance.
90
- */
91
- w(obj: object, ...params: any[]): void;
92
-
93
- /**
94
- * Uses `util.format` for msg formatting.
95
- */
96
- w(format: any, ...params: any[]): void;
97
-
98
- /**
99
- * Returns a boolean: is the `error` level enabled?
100
- *
101
- * This is equivalent to `log.isErrorEnabled()` or `log.isEnabledFor(ERROR)` in log4j.
102
- */
103
- e(): boolean;
104
-
105
- /**
106
- * Special case to log an `Error` instance to the record.
107
- * This adds an `err` field with exception details
108
- * (including the stack) and sets `msg` to the exception
109
- * message or you can specify the `msg`.
110
- */
111
- e(error: Error, ...params: any[]): void;
112
-
113
- /**
114
- * The first field can optionally be a "fields" object, which
115
- * is merged into the log record.
116
- *
117
- * To pass in an Error *and* other fields, use the `err`
118
- * field name for the Error instance.
119
- */
120
- e(obj: object, ...params: any[]): void;
121
-
122
- /**
123
- * Uses `util.format` for msg formatting.
124
- */
125
- e(format: any, ...params: any[]): void;
126
-
127
- /**
128
- * Returns a boolean: is the `info` level enabled?
129
- *
130
- * This is equivalent to `log.isInfoEnabled()` or `log.isEnabledFor(INFO)` in log4j.
131
- */
132
- log(): boolean;
133
-
134
- /**
135
- * Special case to log an `Error` instance to the record.
136
- * This adds an `err` field with exception details
137
- * (including the stack) and sets `msg` to the exception
138
- * message or you can specify the `msg`.
139
- */
140
- log(error: Error, ...params: any[]): void;
141
-
142
- /**
143
- * The first field can optionally be a "fields" object, which
144
- * is merged into the log record.
145
- *
146
- * To pass in an Error *and* other fields, use the `err`
147
- * field name for the Error instance.
148
- */
149
- log(obj: object, ...params: any[]): void;
150
-
151
- /**
152
- * Uses `util.format` for msg formatting.
153
- */
154
- log(format: any, ...params: any[]): void;
155
- }
156
-
157
- declare function createLogger(options?: { name?: string | undefined; silent?: boolean | undefined; debug?: boolean | undefined; }): HexoLogger;
158
-
159
- export = createLogger;
@@ -1,28 +0,0 @@
1
- {
2
- "name": "@types/hexo-log",
3
- "version": "0.2.3",
4
- "description": "TypeScript definitions for hexo-log",
5
- "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hexo-log",
6
- "license": "MIT",
7
- "contributors": [
8
- {
9
- "name": "segayuu",
10
- "url": "https://github.com/segayuu",
11
- "githubUsername": "segayuu"
12
- },
13
- {
14
- "name": "Dimas Lanjaka"
15
- }
16
- ],
17
- "main": "",
18
- "types": "index.d.ts",
19
- "repository": {
20
- "type": "git",
21
- "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
22
- "directory": "types/hexo-log"
23
- },
24
- "scripts": {},
25
- "dependencies": {
26
- "@types/hexo-bunyan": "file:../hexo-bunyan"
27
- }
28
- }
@@ -1,2 +0,0 @@
1
- /// <reference types="node" />
2
- /// <reference types="through2" />
@@ -1,30 +0,0 @@
1
- {
2
- "name": "nodejs-package-types",
3
- "version": "1.0.4",
4
- "description": "Customized Package Types",
5
- "main": "index.js",
6
- "types": "typings/index.d.ts",
7
- "files": [
8
- "typings",
9
- "index.js"
10
- ],
11
- "scripts": {
12
- "postinstall": "npm i -D https://github.com/dimaslanjaka/nodejs-package-types#through2",
13
- "uninstall": "npm un @types/through2"
14
- },
15
- "repository": {
16
- "type": "git",
17
- "url": "git+https://github.com/dimaslanjaka/nodejs-package-types.git"
18
- },
19
- "keywords": [],
20
- "author": "",
21
- "license": "ISC",
22
- "bugs": {
23
- "url": "https://github.com/dimaslanjaka/nodejs-package-types/issues"
24
- },
25
- "homepage": "https://github.com/dimaslanjaka/nodejs-package-types#readme",
26
- "devDependencies": {
27
- "@types/node": "^17.0.25",
28
- "@types/through2": "github:dimaslanjaka/nodejs-package-types#through2"
29
- }
30
- }
@@ -1,15 +0,0 @@
1
- {
2
- "name": "test",
3
- "version": "1.0.0",
4
- "description": "",
5
- "main": "index.js",
6
- "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
8
- },
9
- "keywords": [],
10
- "author": "",
11
- "license": "ISC",
12
- "devDependencies": {
13
- "nodejs-package-types": "github:dimaslanjaka/nodejs-package-types"
14
- }
15
- }
@@ -1,6 +0,0 @@
1
- import through2 from "through2";
2
-
3
- through2.obj((chunk) => {
4
- const content = typeof chunk.contents != 'undefined';
5
- console.log(content);
6
- });
@@ -1,14 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "resolveJsonModule": true,
4
- "allowSyntheticDefaultImports": true,
5
- "skipLibCheck": true,
6
- "skipDefaultLibCheck": true,
7
- "noImplicitAny": false,
8
- "noUnusedLocals": false,
9
- "allowUmdGlobalAccess": true,
10
- "allowUnreachableCode": true,
11
- "allowUnusedLabels": true,
12
- "noImplicitThis": false
13
- }
14
- }
@@ -1,7 +0,0 @@
1
- import "./kill-port";
2
- import "./markdown-it-abbr";
3
- import "./markdown-it-footnote";
4
- import "./markdown-it-image-figures";
5
- import "./markdown-it-mark";
6
- import "./markdown-it-sub";
7
- import "./markdown-it-sup";
@@ -1,3 +0,0 @@
1
- declare module 'kill-port' {
2
- export default function killPort(port: number, type: 'tcp' | 'udp'): Promise<any>;
3
- }
@@ -1,4 +0,0 @@
1
- declare module 'markdown-it-abbr' {
2
- import MarkdownIt from 'markdown-it';
3
- export default function sub_plugin(md: MarkdownIt): any;
4
- }
@@ -1,4 +0,0 @@
1
- declare module 'markdown-it-footnote' {
2
- import MarkdownIt from 'markdown-it';
3
- export default function footnote_plugin(md: MarkdownIt): any;
4
- }
@@ -1,4 +0,0 @@
1
- declare module 'markdown-it-image-figures' {
2
- import MarkdownIt from 'markdown-it';
3
- export default function figures_plugin(md: MarkdownIt): any;
4
- }
@@ -1,4 +0,0 @@
1
- declare module 'markdown-it-mark' {
2
- import MarkdownIt from 'markdown-it';
3
- export default function ins_plugin(md: MarkdownIt): any;
4
- }
@@ -1,7 +0,0 @@
1
- declare module 'markdown-it-sub' {
2
- import MarkdownIt from 'markdown-it';
3
- import Ruler from 'markdown-it/lib/ruler';
4
- var UNESCAPE_RE: RegExp;
5
- function subscript(state: Ruler.RuleOptions, silent: boolean): boolean;
6
- export default function sub_plugin(md: MarkdownIt): void;
7
- }
@@ -1,7 +0,0 @@
1
- declare module 'markdown-it-sup' {
2
- import MarkdownIt from 'markdown-it';
3
- import Ruler from 'markdown-it/lib/ruler';
4
- var UNESCAPE_RE: RegExp;
5
- function superscript(state: Ruler.RuleOptions, silent: boolean): boolean;
6
- export default function plugin_sup(md: MarkdownIt): void;
7
- }
@@ -1,13 +0,0 @@
1
- {
2
- "extends": "eslint:recommended",
3
- "rules": {
4
- "comma-dangle": 0,
5
- "no-console": 0
6
- },
7
- "env": {
8
- "node": true
9
- },
10
- "globals": {
11
- "hexo": true
12
- }
13
- }
@@ -1,20 +0,0 @@
1
- Copyright (c) 2015 Gregory Scheerlinck
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy
4
- of this software and associated documentation files (the "Software"), to deal
5
- in the Software without restriction, including without limitation the rights
6
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- copies of the Software, and to permit persons to whom the Software is
8
- furnished to do so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in
11
- all copies or substantial portions of the Software.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- THE SOFTWARE.
20
-
@@ -1,146 +0,0 @@
1
- # hexo-cli-extras
2
-
3
- This is a simple plugin for [Hexo](https://github.com/hexojs/hexo), a Node.js-based static site generator/blog framework.
4
-
5
- The plugin adds a handful of useful commands to the Hexo command-line interface: `edit`, `rename`, `remove`, `isolate` and `integrate`.
6
-
7
- Basic terminal editing:
8
-
9
- ![example](./docs/basic.gif)
10
-
11
- Basic GUI editing and selection on tag (sorry for the bad resolution):
12
-
13
- ![example](./docs/gui.gif)
14
-
15
- A more detailed explanation of the commands and their options is included below, but remember that you can run `hexo help` followed by any command in your terminal to get an overview (eg `hexo help edit`). You may also find the tips and notes at the very bottom of this README useful.
16
-
17
- ## Installation
18
-
19
- ```
20
- npm install --save hexo-cli-extras
21
- ```
22
-
23
- Note that the plugin *must* be installed locally. So if you have multiple blogs, you have to install it separately for each of them.
24
-
25
- ## edit command
26
-
27
- Select a post, page or draft using search terms and/or filters and open it in your favorite terminal $EDITOR or associated GUI text editor. If multiple items match your query, a menu will be displayed. By the way, if you're a vim-user with a distaste for arrow-keys, the menu supports vim-style keybindings (yay).
28
-
29
- ```
30
- hexo edit [title] [-a | --after MM-DD-YYYY] [-b | --before MM-DD-YYYY] [-c | --category | --categories CATEGORY] [-f | --folder SUBFOLDER] [-l | --layout] [-t | --tag | --tags TAG] [--draft | --drafts] [-g | --gui] [-p | --page | --pages]
31
- ```
32
-
33
- ### quick examples
34
-
35
- ```
36
- hexo edit
37
- ```
38
- --> gives you a menu with *all* your posts in descending chronological order, select one to edit using the arrow keys or `j`/`k`
39
-
40
- ```
41
- hexo edit search term
42
- ```
43
- --> uses the regular expressions `search` and `term` to filter the titles (or slugs) of your articles and displays a menu with all matches -- if only one article matches, it will open automatically in your editor
44
-
45
- ```
46
- hexo edit -a 11-11-2015 -g
47
- ```
48
- --> gives you a menu with all posts published after 11/11/2015 -- the selected article will open in gui mode
49
-
50
- ```
51
- hexo edit neovim -c vim
52
- ```
53
- --> looks in the database for articles in the "vim" category which match the regular expression "neovim" in their titles or slugs
54
-
55
- ### detailed information (get this info on the command line with `hexo help edit`)
56
-
57
- - `title` is a regular expression (case insensitive and spaces are allowed) for matching the title of a post
58
- - `-a` or `--after` (optional) filters out all posts that were made before the given date. A little parsing is done to help you, but use `MM-DD-YYYY` for best results
59
- - `-b` or `--before` (optional) filters out all posts that were made after the given date. A little parsing is done to help you, but use `MM-DD-YYYY` for best results
60
- - `-c` or `--category` (optional) filters posts on category
61
- - `-f` or `--folder` (optional) is (part of) the name of a subfolder in `hexo_dir/source` to narrow down your search in case you have multiple folders (for filtering on drafts, prefer to use `-d`)
62
- - `-l` or `--layout` (optional) filters posts/pages with a specific layout
63
- - `-t` or `--tag` (optional) filters posts on tag
64
- - `--draft` or `--drafts` (optional) excludes all published posts
65
- - `-g` or `--gui` (optional) causes selected files to open using an associated GUI editor, rather than a terminal editor set in the $EDITOR environment variable
66
- - `-p` or `--page` (optional) selects pages instead of posts
67
-
68
-
69
- *Note*: boolean options can be combined (for example `hexo edit -dp` to search for drafts that are pages)
70
-
71
- *Note*: Drafts only appear in searches without the `--drafts` option if you have `render_drafts` set to true in `_config.yml`. If set to false, you must use the `--draft` option to filter on drafts. Also, drafts are excluded automatically when you use any of the date filters, because dates make little sense with drafts.
72
-
73
- *Note*: Filter on title first and use boolean options last or you may get unexpected results. For example, `hexo edit -g my post` will filter just on "post" whereas `hexo edit my draft -g` will correctly filter on "my draft".
74
-
75
- *Note*: By default, files open in your current terminal window using your `$EDITOR` environment variable. Set it in your dotfiles (for example, in `.bashrc` or `.zshrc`).
76
-
77
- *Note*: The `gui` option (or the lack of an `$EDITOR` variable) will cause files to open with `xdg-open` (linux, osx) or `start` (windows). If you're on linux and nothing seems to happen, you can change the handler for plain text markdown files to a `*.desktop` file of your choice. For example, for Sublime Text: `xdg-mime default sublime-text.desktop text/plain`
78
-
79
- ## rename command
80
-
81
- Rename a post, page or draft. The title and the filename can be renamed independently or both at the same time.
82
-
83
- ![example](./docs/rename.png)
84
-
85
- ```
86
- hexo rename <old title/slug> <-n | --new "new title">
87
- ```
88
-
89
- `old title/slug` is one or more regular expressions to find a post or page. If more match your regex, a selection menu will be displayed.
90
-
91
- `new title` is the new title for your post. In case you just want to rename the file, it will be `slugize`d automatically (ie it will get converted to lower case, and all special characters and spaces will be made url-friendly).
92
-
93
- After selecting a file, you will be presented with another menu. From there you can choose whether to rename the filename, the title of the post, both, or cancel altogether.
94
-
95
- *Note*: if you have set `render_drafts` to false in `_config.yml`, you won't be able to rename drafts from the command line. It works only with that setting set to true or if you publish the post first.
96
-
97
- *Note*: wrap the new title in single or double quotes! If you forget, the presence of spaces or special characters may cause strange behavior.
98
-
99
-
100
- ## remove command
101
-
102
- Delete a post.
103
-
104
- ![example](./docs/remove.png)
105
-
106
- ```
107
- hexo remove <search terms>
108
- ```
109
-
110
- Search for a post and delete it after confirmation. This will cause the irreversible removal of the selected post *and* its associated asset folder (if it exists), along with all its contents.
111
-
112
- ## isolate command
113
-
114
- Isolate a post by temporarily removing all others from the build process.
115
-
116
- ```
117
- hexo isolate <search terms> [-a | --all]
118
- ```
119
-
120
- This command was inspired by Octopress. For testing purposes, you may want to isolate a post so you can work on it and test it in isolation from all others. This accomplishes that aim by moving all posts and asset directories (pages are not supported right now) to an `_exile` subfolder, where they will be ignored.
121
-
122
- The `-a` or `--all` option will cause *all* posts to be moved, and your search terms to be ignored.
123
-
124
- Run `hexo integrate` to restore the posts to their previous location.
125
-
126
- ## integrate command
127
-
128
- Restores all exiled posts.
129
-
130
- ```
131
- hexo integrate
132
- ```
133
-
134
- ## Info
135
-
136
- - It doesn't matter where in the hexo directory you are on the command line. As long as you are inside a hexo directory somewhere, the commands should work.
137
-
138
- - Installing this plugin will also cause any new post you create with `hexo new ...` to open automatically in your text editor.
139
-
140
- - The terminal menu may not work as expected in the default Windows command shell (`cmd.exe`), but it should work just fine in more powerful shells.
141
-
142
- - If you don't like the command-line centric workflow this plugin encourages, you may want to consider using an administration plugin instead - check out [hexo-admin](https://github.com/jaredly/hexo-admin) or [hexo-hey](https://github.com/nihgwu/hexo-hey).
143
-
144
- - Filter on title first and use boolean options last or you may get unexpected results. For example, `hexo edit -g my post` will filter just on "post" whereas `hexo edit my draft -g` will correctly filter on "my draft".
145
-
146
- - By default, files open in your current terminal window using your `EDITOR` environment variable. Set it somewhere in your dotfiles (`.bashrc` or `.zshrc` are good locations, and don't forget to source the file or reboot before testing). If `$EDITOR` doesn't exist, or if you use the `gui` option, files will open with [xdg-open](https://wiki.archlinux.org/index.php/default_applications#xdg-open_2) (linux, osx) or `start` (windows) instead.