bunki 0.9.1 → 0.11.0
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.
- package/dist/cli.js +225 -122
- package/dist/index.js +241 -138
- package/dist/site-generator.d.ts +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/utils/date-utils.d.ts +18 -0
- package/package.json +2 -1
package/dist/cli.js
CHANGED
|
@@ -17686,20 +17686,20 @@ var require_decode_codepoint = __commonJS((exports) => {
|
|
|
17686
17686
|
|
|
17687
17687
|
// node_modules/entities/lib/decode.js
|
|
17688
17688
|
var require_decode = __commonJS((exports) => {
|
|
17689
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o,
|
|
17689
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m3, k2, k22) {
|
|
17690
17690
|
if (k22 === undefined)
|
|
17691
17691
|
k22 = k2;
|
|
17692
|
-
var desc = Object.getOwnPropertyDescriptor(
|
|
17693
|
-
if (!desc || ("get" in desc ? !
|
|
17692
|
+
var desc = Object.getOwnPropertyDescriptor(m3, k2);
|
|
17693
|
+
if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) {
|
|
17694
17694
|
desc = { enumerable: true, get: function() {
|
|
17695
|
-
return
|
|
17695
|
+
return m3[k2];
|
|
17696
17696
|
} };
|
|
17697
17697
|
}
|
|
17698
17698
|
Object.defineProperty(o, k22, desc);
|
|
17699
|
-
} : function(o,
|
|
17699
|
+
} : function(o, m3, k2, k22) {
|
|
17700
17700
|
if (k22 === undefined)
|
|
17701
17701
|
k22 = k2;
|
|
17702
|
-
o[k22] =
|
|
17702
|
+
o[k22] = m3[k2];
|
|
17703
17703
|
});
|
|
17704
17704
|
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v2) {
|
|
17705
17705
|
Object.defineProperty(o, "default", { enumerable: true, value: v2 });
|
|
@@ -18793,20 +18793,20 @@ var require_Tokenizer = __commonJS((exports) => {
|
|
|
18793
18793
|
|
|
18794
18794
|
// node_modules/htmlparser2/lib/Parser.js
|
|
18795
18795
|
var require_Parser = __commonJS((exports) => {
|
|
18796
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o,
|
|
18796
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m3, k2, k22) {
|
|
18797
18797
|
if (k22 === undefined)
|
|
18798
18798
|
k22 = k2;
|
|
18799
|
-
var desc = Object.getOwnPropertyDescriptor(
|
|
18800
|
-
if (!desc || ("get" in desc ? !
|
|
18799
|
+
var desc = Object.getOwnPropertyDescriptor(m3, k2);
|
|
18800
|
+
if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) {
|
|
18801
18801
|
desc = { enumerable: true, get: function() {
|
|
18802
|
-
return
|
|
18802
|
+
return m3[k2];
|
|
18803
18803
|
} };
|
|
18804
18804
|
}
|
|
18805
18805
|
Object.defineProperty(o, k22, desc);
|
|
18806
|
-
} : function(o,
|
|
18806
|
+
} : function(o, m3, k2, k22) {
|
|
18807
18807
|
if (k22 === undefined)
|
|
18808
18808
|
k22 = k2;
|
|
18809
|
-
o[k22] =
|
|
18809
|
+
o[k22] = m3[k2];
|
|
18810
18810
|
});
|
|
18811
18811
|
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v2) {
|
|
18812
18812
|
Object.defineProperty(o, "default", { enumerable: true, value: v2 });
|
|
@@ -19256,24 +19256,24 @@ var require_lib2 = __commonJS((exports) => {
|
|
|
19256
19256
|
// node_modules/domhandler/lib/node.js
|
|
19257
19257
|
var require_node = __commonJS((exports) => {
|
|
19258
19258
|
var __extends = exports && exports.__extends || function() {
|
|
19259
|
-
var extendStatics = function(
|
|
19260
|
-
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(
|
|
19261
|
-
|
|
19262
|
-
} || function(
|
|
19259
|
+
var extendStatics = function(d3, b2) {
|
|
19260
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d4, b3) {
|
|
19261
|
+
d4.__proto__ = b3;
|
|
19262
|
+
} || function(d4, b3) {
|
|
19263
19263
|
for (var p in b3)
|
|
19264
19264
|
if (Object.prototype.hasOwnProperty.call(b3, p))
|
|
19265
|
-
|
|
19265
|
+
d4[p] = b3[p];
|
|
19266
19266
|
};
|
|
19267
|
-
return extendStatics(
|
|
19267
|
+
return extendStatics(d3, b2);
|
|
19268
19268
|
};
|
|
19269
|
-
return function(
|
|
19269
|
+
return function(d3, b2) {
|
|
19270
19270
|
if (typeof b2 !== "function" && b2 !== null)
|
|
19271
19271
|
throw new TypeError("Class extends value " + String(b2) + " is not a constructor or null");
|
|
19272
|
-
extendStatics(
|
|
19272
|
+
extendStatics(d3, b2);
|
|
19273
19273
|
function __() {
|
|
19274
|
-
this.constructor =
|
|
19274
|
+
this.constructor = d3;
|
|
19275
19275
|
}
|
|
19276
|
-
|
|
19276
|
+
d3.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __);
|
|
19277
19277
|
};
|
|
19278
19278
|
}();
|
|
19279
19279
|
var __assign = exports && exports.__assign || function() {
|
|
@@ -19633,25 +19633,25 @@ var require_node = __commonJS((exports) => {
|
|
|
19633
19633
|
|
|
19634
19634
|
// node_modules/domhandler/lib/index.js
|
|
19635
19635
|
var require_lib3 = __commonJS((exports) => {
|
|
19636
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o,
|
|
19636
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m3, k2, k22) {
|
|
19637
19637
|
if (k22 === undefined)
|
|
19638
19638
|
k22 = k2;
|
|
19639
|
-
var desc = Object.getOwnPropertyDescriptor(
|
|
19640
|
-
if (!desc || ("get" in desc ? !
|
|
19639
|
+
var desc = Object.getOwnPropertyDescriptor(m3, k2);
|
|
19640
|
+
if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) {
|
|
19641
19641
|
desc = { enumerable: true, get: function() {
|
|
19642
|
-
return
|
|
19642
|
+
return m3[k2];
|
|
19643
19643
|
} };
|
|
19644
19644
|
}
|
|
19645
19645
|
Object.defineProperty(o, k22, desc);
|
|
19646
|
-
} : function(o,
|
|
19646
|
+
} : function(o, m3, k2, k22) {
|
|
19647
19647
|
if (k22 === undefined)
|
|
19648
19648
|
k22 = k2;
|
|
19649
|
-
o[k22] =
|
|
19649
|
+
o[k22] = m3[k2];
|
|
19650
19650
|
});
|
|
19651
|
-
var __exportStar = exports && exports.__exportStar || function(
|
|
19652
|
-
for (var p in
|
|
19651
|
+
var __exportStar = exports && exports.__exportStar || function(m3, exports2) {
|
|
19652
|
+
for (var p in m3)
|
|
19653
19653
|
if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p))
|
|
19654
|
-
__createBinding(exports2,
|
|
19654
|
+
__createBinding(exports2, m3, p);
|
|
19655
19655
|
};
|
|
19656
19656
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19657
19657
|
exports.DomHandler = undefined;
|
|
@@ -20169,20 +20169,20 @@ var require_lib5 = __commonJS((exports) => {
|
|
|
20169
20169
|
};
|
|
20170
20170
|
return __assign.apply(this, arguments);
|
|
20171
20171
|
};
|
|
20172
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o,
|
|
20172
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m3, k2, k22) {
|
|
20173
20173
|
if (k22 === undefined)
|
|
20174
20174
|
k22 = k2;
|
|
20175
|
-
var desc = Object.getOwnPropertyDescriptor(
|
|
20176
|
-
if (!desc || ("get" in desc ? !
|
|
20175
|
+
var desc = Object.getOwnPropertyDescriptor(m3, k2);
|
|
20176
|
+
if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) {
|
|
20177
20177
|
desc = { enumerable: true, get: function() {
|
|
20178
|
-
return
|
|
20178
|
+
return m3[k2];
|
|
20179
20179
|
} };
|
|
20180
20180
|
}
|
|
20181
20181
|
Object.defineProperty(o, k22, desc);
|
|
20182
|
-
} : function(o,
|
|
20182
|
+
} : function(o, m3, k2, k22) {
|
|
20183
20183
|
if (k22 === undefined)
|
|
20184
20184
|
k22 = k2;
|
|
20185
|
-
o[k22] =
|
|
20185
|
+
o[k22] = m3[k2];
|
|
20186
20186
|
});
|
|
20187
20187
|
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v2) {
|
|
20188
20188
|
Object.defineProperty(o, "default", { enumerable: true, value: v2 });
|
|
@@ -21005,25 +21005,25 @@ var require_feeds = __commonJS((exports) => {
|
|
|
21005
21005
|
|
|
21006
21006
|
// node_modules/domutils/lib/index.js
|
|
21007
21007
|
var require_lib6 = __commonJS((exports) => {
|
|
21008
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o,
|
|
21008
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m3, k2, k22) {
|
|
21009
21009
|
if (k22 === undefined)
|
|
21010
21010
|
k22 = k2;
|
|
21011
|
-
var desc = Object.getOwnPropertyDescriptor(
|
|
21012
|
-
if (!desc || ("get" in desc ? !
|
|
21011
|
+
var desc = Object.getOwnPropertyDescriptor(m3, k2);
|
|
21012
|
+
if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) {
|
|
21013
21013
|
desc = { enumerable: true, get: function() {
|
|
21014
|
-
return
|
|
21014
|
+
return m3[k2];
|
|
21015
21015
|
} };
|
|
21016
21016
|
}
|
|
21017
21017
|
Object.defineProperty(o, k22, desc);
|
|
21018
|
-
} : function(o,
|
|
21018
|
+
} : function(o, m3, k2, k22) {
|
|
21019
21019
|
if (k22 === undefined)
|
|
21020
21020
|
k22 = k2;
|
|
21021
|
-
o[k22] =
|
|
21021
|
+
o[k22] = m3[k2];
|
|
21022
21022
|
});
|
|
21023
|
-
var __exportStar = exports && exports.__exportStar || function(
|
|
21024
|
-
for (var p in
|
|
21023
|
+
var __exportStar = exports && exports.__exportStar || function(m3, exports2) {
|
|
21024
|
+
for (var p in m3)
|
|
21025
21025
|
if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p))
|
|
21026
|
-
__createBinding(exports2,
|
|
21026
|
+
__createBinding(exports2, m3, p);
|
|
21027
21027
|
};
|
|
21028
21028
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21029
21029
|
exports.hasChildren = exports.isDocument = exports.isComment = exports.isText = exports.isCDATA = exports.isTag = undefined;
|
|
@@ -21057,20 +21057,20 @@ var require_lib6 = __commonJS((exports) => {
|
|
|
21057
21057
|
|
|
21058
21058
|
// node_modules/htmlparser2/lib/index.js
|
|
21059
21059
|
var require_lib7 = __commonJS((exports) => {
|
|
21060
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o,
|
|
21060
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m3, k2, k22) {
|
|
21061
21061
|
if (k22 === undefined)
|
|
21062
21062
|
k22 = k2;
|
|
21063
|
-
var desc = Object.getOwnPropertyDescriptor(
|
|
21064
|
-
if (!desc || ("get" in desc ? !
|
|
21063
|
+
var desc = Object.getOwnPropertyDescriptor(m3, k2);
|
|
21064
|
+
if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) {
|
|
21065
21065
|
desc = { enumerable: true, get: function() {
|
|
21066
|
-
return
|
|
21066
|
+
return m3[k2];
|
|
21067
21067
|
} };
|
|
21068
21068
|
}
|
|
21069
21069
|
Object.defineProperty(o, k22, desc);
|
|
21070
|
-
} : function(o,
|
|
21070
|
+
} : function(o, m3, k2, k22) {
|
|
21071
21071
|
if (k22 === undefined)
|
|
21072
21072
|
k22 = k2;
|
|
21073
|
-
o[k22] =
|
|
21073
|
+
o[k22] = m3[k2];
|
|
21074
21074
|
});
|
|
21075
21075
|
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v2) {
|
|
21076
21076
|
Object.defineProperty(o, "default", { enumerable: true, value: v2 });
|
|
@@ -21378,7 +21378,7 @@ var require_parse_srcset = __commonJS((exports, module) => {
|
|
|
21378
21378
|
}
|
|
21379
21379
|
}
|
|
21380
21380
|
function parseDescriptors() {
|
|
21381
|
-
var pError = false, w2,
|
|
21381
|
+
var pError = false, w2, d3, h, i, candidate = {}, desc, lastChar, value, intVal, floatVal;
|
|
21382
21382
|
for (i = 0;i < descriptors.length; i++) {
|
|
21383
21383
|
desc = descriptors[i];
|
|
21384
21384
|
lastChar = desc[desc.length - 1];
|
|
@@ -21386,7 +21386,7 @@ var require_parse_srcset = __commonJS((exports, module) => {
|
|
|
21386
21386
|
intVal = parseInt(value, 10);
|
|
21387
21387
|
floatVal = parseFloat(value);
|
|
21388
21388
|
if (regexNonNegativeInteger.test(value) && lastChar === "w") {
|
|
21389
|
-
if (w2 ||
|
|
21389
|
+
if (w2 || d3) {
|
|
21390
21390
|
pError = true;
|
|
21391
21391
|
}
|
|
21392
21392
|
if (intVal === 0) {
|
|
@@ -21395,16 +21395,16 @@ var require_parse_srcset = __commonJS((exports, module) => {
|
|
|
21395
21395
|
w2 = intVal;
|
|
21396
21396
|
}
|
|
21397
21397
|
} else if (regexFloatingPoint.test(value) && lastChar === "x") {
|
|
21398
|
-
if (w2 ||
|
|
21398
|
+
if (w2 || d3 || h) {
|
|
21399
21399
|
pError = true;
|
|
21400
21400
|
}
|
|
21401
21401
|
if (floatVal < 0) {
|
|
21402
21402
|
pError = true;
|
|
21403
21403
|
} else {
|
|
21404
|
-
|
|
21404
|
+
d3 = floatVal;
|
|
21405
21405
|
}
|
|
21406
21406
|
} else if (regexNonNegativeInteger.test(value) && lastChar === "h") {
|
|
21407
|
-
if (h ||
|
|
21407
|
+
if (h || d3) {
|
|
21408
21408
|
pError = true;
|
|
21409
21409
|
}
|
|
21410
21410
|
if (intVal === 0) {
|
|
@@ -21421,8 +21421,8 @@ var require_parse_srcset = __commonJS((exports, module) => {
|
|
|
21421
21421
|
if (w2) {
|
|
21422
21422
|
candidate.w = w2;
|
|
21423
21423
|
}
|
|
21424
|
-
if (
|
|
21425
|
-
candidate.d =
|
|
21424
|
+
if (d3) {
|
|
21425
|
+
candidate.d = d3;
|
|
21426
21426
|
}
|
|
21427
21427
|
if (h) {
|
|
21428
21428
|
candidate.h = h;
|
|
@@ -24007,9 +24007,9 @@ var require_binary_search = __commonJS((exports) => {
|
|
|
24007
24007
|
// node_modules/source-map-js/lib/quick-sort.js
|
|
24008
24008
|
var require_quick_sort = __commonJS((exports) => {
|
|
24009
24009
|
function SortTemplate(comparator) {
|
|
24010
|
-
function swap(ary,
|
|
24011
|
-
var temp = ary[
|
|
24012
|
-
ary[
|
|
24010
|
+
function swap(ary, x3, y2) {
|
|
24011
|
+
var temp = ary[x3];
|
|
24012
|
+
ary[x3] = ary[y2];
|
|
24013
24013
|
ary[y2] = temp;
|
|
24014
24014
|
}
|
|
24015
24015
|
function randomIntInRange(low, high) {
|
|
@@ -32676,6 +32676,91 @@ var Nt = d.parseInline;
|
|
|
32676
32676
|
var Ft = b.parse;
|
|
32677
32677
|
var jt = x.lex;
|
|
32678
32678
|
|
|
32679
|
+
// node_modules/marked-alert/dist/index.js
|
|
32680
|
+
var d2 = [
|
|
32681
|
+
{
|
|
32682
|
+
type: "note",
|
|
32683
|
+
icon: '<svg class="octicon octicon-info mr-2" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>'
|
|
32684
|
+
},
|
|
32685
|
+
{
|
|
32686
|
+
type: "tip",
|
|
32687
|
+
icon: '<svg class="octicon octicon-light-bulb mr-2" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path></svg>'
|
|
32688
|
+
},
|
|
32689
|
+
{
|
|
32690
|
+
type: "important",
|
|
32691
|
+
icon: '<svg class="octicon octicon-report mr-2" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>'
|
|
32692
|
+
},
|
|
32693
|
+
{
|
|
32694
|
+
type: "warning",
|
|
32695
|
+
icon: '<svg class="octicon octicon-alert mr-2" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>'
|
|
32696
|
+
},
|
|
32697
|
+
{
|
|
32698
|
+
type: "caution",
|
|
32699
|
+
icon: '<svg class="octicon octicon-stop mr-2" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>'
|
|
32700
|
+
}
|
|
32701
|
+
];
|
|
32702
|
+
function m2(a) {
|
|
32703
|
+
return a.length ? Object.values([...d2, ...a].reduce((i, s) => (i[s.type] = s, i), {})) : d2;
|
|
32704
|
+
}
|
|
32705
|
+
function u3(a) {
|
|
32706
|
+
return `^(?:\\[!${a.toUpperCase()}])\\s*?
|
|
32707
|
+
*`;
|
|
32708
|
+
}
|
|
32709
|
+
function x2(a) {
|
|
32710
|
+
return a.slice(0, 1).toUpperCase() + a.slice(1).toLowerCase();
|
|
32711
|
+
}
|
|
32712
|
+
function A(a = {}) {
|
|
32713
|
+
const { className: i = "markdown-alert", variants: s = [] } = a, g = m2(s);
|
|
32714
|
+
return {
|
|
32715
|
+
walkTokens(t) {
|
|
32716
|
+
var e, h, p, v2;
|
|
32717
|
+
if (t.type !== "blockquote")
|
|
32718
|
+
return;
|
|
32719
|
+
const c = g.find(({ type: n }) => new RegExp(u3(n)).test(t.text));
|
|
32720
|
+
if (c) {
|
|
32721
|
+
const {
|
|
32722
|
+
type: n,
|
|
32723
|
+
icon: w2,
|
|
32724
|
+
title: Z2 = x2(n),
|
|
32725
|
+
titleClassName: f = `${i}-title`
|
|
32726
|
+
} = c, o = new RegExp(u3(n));
|
|
32727
|
+
Object.assign(t, {
|
|
32728
|
+
type: "alert",
|
|
32729
|
+
meta: {
|
|
32730
|
+
className: i,
|
|
32731
|
+
variant: n,
|
|
32732
|
+
icon: w2,
|
|
32733
|
+
title: Z2,
|
|
32734
|
+
titleClassName: f
|
|
32735
|
+
}
|
|
32736
|
+
});
|
|
32737
|
+
const r = (e = t.tokens) == null ? undefined : e[0];
|
|
32738
|
+
if ((h = r.raw) == null ? undefined : h.replace(o, "").trim()) {
|
|
32739
|
+
const l = r.tokens[0];
|
|
32740
|
+
Object.assign(l, {
|
|
32741
|
+
raw: l.raw.replace(o, ""),
|
|
32742
|
+
text: l.text.replace(o, "")
|
|
32743
|
+
}), ((p = r.tokens[1]) == null ? undefined : p.type) === "br" && r.tokens.splice(1, 1);
|
|
32744
|
+
} else
|
|
32745
|
+
(v2 = t.tokens) == null || v2.shift();
|
|
32746
|
+
}
|
|
32747
|
+
},
|
|
32748
|
+
extensions: [
|
|
32749
|
+
{
|
|
32750
|
+
name: "alert",
|
|
32751
|
+
level: "block",
|
|
32752
|
+
renderer({ meta: t, tokens: c = [] }) {
|
|
32753
|
+
let e = `<div class="${t.className} ${t.className}-${t.variant}">
|
|
32754
|
+
`;
|
|
32755
|
+
return e += `<p class="${t.titleClassName}">`, e += t.icon, e += t.title, e += `</p>
|
|
32756
|
+
`, e += this.parser.parse(c), e += `</div>
|
|
32757
|
+
`, e;
|
|
32758
|
+
}
|
|
32759
|
+
}
|
|
32760
|
+
]
|
|
32761
|
+
};
|
|
32762
|
+
}
|
|
32763
|
+
|
|
32679
32764
|
// node_modules/marked-highlight/src/index.js
|
|
32680
32765
|
function markedHighlight(options2) {
|
|
32681
32766
|
if (typeof options2 === "function") {
|
|
@@ -32764,6 +32849,18 @@ function escape(html, encode) {
|
|
|
32764
32849
|
|
|
32765
32850
|
// src/utils/markdown-utils.ts
|
|
32766
32851
|
var import_sanitize_html = __toESM(require_sanitize_html(), 1);
|
|
32852
|
+
|
|
32853
|
+
// src/utils/date-utils.ts
|
|
32854
|
+
function toPacificTime(date) {
|
|
32855
|
+
return new Date(new Date(date).toLocaleString("en-US", {
|
|
32856
|
+
timeZone: "America/Los_Angeles"
|
|
32857
|
+
}));
|
|
32858
|
+
}
|
|
32859
|
+
function getPacificYear(date) {
|
|
32860
|
+
return toPacificTime(date).getFullYear();
|
|
32861
|
+
}
|
|
32862
|
+
|
|
32863
|
+
// src/utils/markdown-utils.ts
|
|
32767
32864
|
core_default.registerLanguage("javascript", javascript);
|
|
32768
32865
|
core_default.registerLanguage("typescript", typescript);
|
|
32769
32866
|
core_default.registerLanguage("markdown", markdown);
|
|
@@ -32786,6 +32883,7 @@ function createMarked() {
|
|
|
32786
32883
|
gfm: true,
|
|
32787
32884
|
breaks: true
|
|
32788
32885
|
});
|
|
32886
|
+
marked.use(A());
|
|
32789
32887
|
marked.use({
|
|
32790
32888
|
walkTokens(token) {
|
|
32791
32889
|
if (token.type === "link") {
|
|
@@ -32851,7 +32949,9 @@ function convertMarkdownToHtml(markdownContent) {
|
|
|
32851
32949
|
"iframe",
|
|
32852
32950
|
"div",
|
|
32853
32951
|
"video",
|
|
32854
|
-
"source"
|
|
32952
|
+
"source",
|
|
32953
|
+
"svg",
|
|
32954
|
+
"path"
|
|
32855
32955
|
]),
|
|
32856
32956
|
allowedAttributes: {
|
|
32857
32957
|
...import_sanitize_html.default.defaults.allowedAttributes,
|
|
@@ -32873,13 +32973,32 @@ function convertMarkdownToHtml(markdownContent) {
|
|
|
32873
32973
|
"preload",
|
|
32874
32974
|
"poster"
|
|
32875
32975
|
],
|
|
32876
|
-
source: ["src", "type"]
|
|
32976
|
+
source: ["src", "type"],
|
|
32977
|
+
svg: [
|
|
32978
|
+
"class",
|
|
32979
|
+
"viewBox",
|
|
32980
|
+
"width",
|
|
32981
|
+
"height",
|
|
32982
|
+
"aria-hidden",
|
|
32983
|
+
"fill",
|
|
32984
|
+
"xmlns"
|
|
32985
|
+
],
|
|
32986
|
+
path: ["d", "fill", "fill-rule", "stroke", "stroke-width"]
|
|
32877
32987
|
},
|
|
32878
32988
|
allowedClasses: {
|
|
32879
32989
|
code: ["*"],
|
|
32880
32990
|
pre: ["*"],
|
|
32881
32991
|
span: ["*"],
|
|
32882
|
-
div: [
|
|
32992
|
+
div: [
|
|
32993
|
+
"video-container",
|
|
32994
|
+
"markdown-alert",
|
|
32995
|
+
"markdown-alert-note",
|
|
32996
|
+
"markdown-alert-tip",
|
|
32997
|
+
"markdown-alert-important",
|
|
32998
|
+
"markdown-alert-warning",
|
|
32999
|
+
"markdown-alert-caution"
|
|
33000
|
+
],
|
|
33001
|
+
p: ["markdown-alert-title"]
|
|
32883
33002
|
},
|
|
32884
33003
|
nonTextTags: ["style", "script", "textarea", "option", "noscript"]
|
|
32885
33004
|
});
|
|
@@ -32918,10 +33037,8 @@ async function parseMarkdownFile(filePath) {
|
|
|
32918
33037
|
}
|
|
32919
33038
|
let slug = data.slug || getBaseFilename(filePath);
|
|
32920
33039
|
const sanitizedHtml = convertMarkdownToHtml(content);
|
|
32921
|
-
const pacificDate =
|
|
32922
|
-
|
|
32923
|
-
}));
|
|
32924
|
-
const postYear = pacificDate.getFullYear();
|
|
33040
|
+
const pacificDate = toPacificTime(data.date);
|
|
33041
|
+
const postYear = getPacificYear(data.date);
|
|
32925
33042
|
const post = {
|
|
32926
33043
|
title: data.title,
|
|
32927
33044
|
date: pacificDate.toISOString(),
|
|
@@ -33179,15 +33296,18 @@ class SiteGenerator {
|
|
|
33179
33296
|
options;
|
|
33180
33297
|
site;
|
|
33181
33298
|
formatRSSDate(date) {
|
|
33182
|
-
|
|
33183
|
-
timeZone: "America/Los_Angeles"
|
|
33184
|
-
}));
|
|
33185
|
-
return pacificDate.toUTCString();
|
|
33299
|
+
return toPacificTime(date).toUTCString();
|
|
33186
33300
|
}
|
|
33187
|
-
|
|
33188
|
-
|
|
33189
|
-
|
|
33190
|
-
|
|
33301
|
+
groupPostsByYear(posts) {
|
|
33302
|
+
const postsByYear = {};
|
|
33303
|
+
for (const post of posts) {
|
|
33304
|
+
const year = getPacificYear(post.date).toString();
|
|
33305
|
+
if (!postsByYear[year]) {
|
|
33306
|
+
postsByYear[year] = [];
|
|
33307
|
+
}
|
|
33308
|
+
postsByYear[year].push(post);
|
|
33309
|
+
}
|
|
33310
|
+
return postsByYear;
|
|
33191
33311
|
}
|
|
33192
33312
|
getSortedTags(limit) {
|
|
33193
33313
|
const sorted = Object.values(this.site.tags).sort((a, b2) => b2.count - a.count);
|
|
@@ -33213,17 +33333,15 @@ class SiteGenerator {
|
|
|
33213
33333
|
this.site = {
|
|
33214
33334
|
name: options2.config.domain,
|
|
33215
33335
|
posts: [],
|
|
33216
|
-
tags: {}
|
|
33336
|
+
tags: {},
|
|
33337
|
+
postsByYear: {}
|
|
33217
33338
|
};
|
|
33218
33339
|
const env = import_nunjucks.default.configure(this.options.templatesDir, {
|
|
33219
33340
|
autoescape: true,
|
|
33220
33341
|
watch: false
|
|
33221
33342
|
});
|
|
33222
33343
|
env.addFilter("date", function(date, format) {
|
|
33223
|
-
const
|
|
33224
|
-
timeZone: "America/Los_Angeles"
|
|
33225
|
-
});
|
|
33226
|
-
const d2 = new Date(pstDate);
|
|
33344
|
+
const d3 = toPacificTime(date);
|
|
33227
33345
|
const months = [
|
|
33228
33346
|
"January",
|
|
33229
33347
|
"February",
|
|
@@ -33239,15 +33357,15 @@ class SiteGenerator {
|
|
|
33239
33357
|
"December"
|
|
33240
33358
|
];
|
|
33241
33359
|
if (format === "YYYY") {
|
|
33242
|
-
return
|
|
33360
|
+
return d3.getFullYear();
|
|
33243
33361
|
} else if (format === "MMMM D, YYYY") {
|
|
33244
|
-
return `${months[
|
|
33362
|
+
return `${months[d3.getMonth()]} ${d3.getDate()}, ${d3.getFullYear()}`;
|
|
33245
33363
|
} else if (format === "MMMM D, YYYY h:mm A") {
|
|
33246
|
-
const hours =
|
|
33247
|
-
const ampm =
|
|
33248
|
-
return `${months[
|
|
33364
|
+
const hours = d3.getHours() % 12 || 12;
|
|
33365
|
+
const ampm = d3.getHours() >= 12 ? "PM" : "AM";
|
|
33366
|
+
return `${months[d3.getMonth()]} ${d3.getDate()}, ${d3.getFullYear()} @ ${hours} ${ampm}`;
|
|
33249
33367
|
} else {
|
|
33250
|
-
return
|
|
33368
|
+
return d3.toLocaleDateString("en-US", {
|
|
33251
33369
|
timeZone: "America/Los_Angeles"
|
|
33252
33370
|
});
|
|
33253
33371
|
}
|
|
@@ -33297,34 +33415,28 @@ class SiteGenerator {
|
|
|
33297
33415
|
this.site = {
|
|
33298
33416
|
name: this.options.config.domain,
|
|
33299
33417
|
posts,
|
|
33300
|
-
tags
|
|
33418
|
+
tags,
|
|
33419
|
+
postsByYear: this.groupPostsByYear(posts)
|
|
33301
33420
|
};
|
|
33302
33421
|
}
|
|
33303
33422
|
async generate() {
|
|
33304
33423
|
console.log("Generating static site...");
|
|
33305
33424
|
await ensureDir(this.options.outputDir);
|
|
33306
33425
|
await this.generateStylesheet();
|
|
33307
|
-
await
|
|
33308
|
-
|
|
33309
|
-
|
|
33310
|
-
|
|
33311
|
-
|
|
33312
|
-
|
|
33313
|
-
|
|
33314
|
-
|
|
33426
|
+
await Promise.all([
|
|
33427
|
+
this.generateIndexPage(),
|
|
33428
|
+
this.generatePostPages(),
|
|
33429
|
+
this.generateTagPages(),
|
|
33430
|
+
this.generateYearArchives(),
|
|
33431
|
+
this.generateRSSFeed(),
|
|
33432
|
+
this.generateSitemap(),
|
|
33433
|
+
this.generateRobotsTxt(),
|
|
33434
|
+
this.copyStaticAssets()
|
|
33435
|
+
]);
|
|
33315
33436
|
console.log("Site generation complete!");
|
|
33316
33437
|
}
|
|
33317
33438
|
async generateYearArchives() {
|
|
33318
|
-
const postsByYear
|
|
33319
|
-
for (const post of this.site.posts) {
|
|
33320
|
-
const postDate = new Date(post.date);
|
|
33321
|
-
const year = postDate.getFullYear().toString();
|
|
33322
|
-
if (!postsByYear[year]) {
|
|
33323
|
-
postsByYear[year] = [];
|
|
33324
|
-
}
|
|
33325
|
-
postsByYear[year].push(post);
|
|
33326
|
-
}
|
|
33327
|
-
for (const [year, yearPosts] of Object.entries(postsByYear)) {
|
|
33439
|
+
for (const [year, yearPosts] of Object.entries(this.site.postsByYear)) {
|
|
33328
33440
|
const yearDir = path5.join(this.options.outputDir, year);
|
|
33329
33441
|
await ensureDir(yearDir);
|
|
33330
33442
|
const pageSize = 10;
|
|
@@ -33545,7 +33657,7 @@ class SiteGenerator {
|
|
|
33545
33657
|
async generateRSSFeed() {
|
|
33546
33658
|
const posts = this.site.posts.slice(0, 15);
|
|
33547
33659
|
const config = this.options.config;
|
|
33548
|
-
const now =
|
|
33660
|
+
const now = toPacificTime(new Date);
|
|
33549
33661
|
const latestPostDate = posts.length > 0 ? posts[0].date : now.toISOString();
|
|
33550
33662
|
const lastBuildDate = this.formatRSSDate(latestPostDate);
|
|
33551
33663
|
const rssItems = posts.map((post) => {
|
|
@@ -33619,10 +33731,10 @@ ${rssItems}
|
|
|
33619
33731
|
await Bun.write(path5.join(this.options.outputDir, "feed.xml"), rssContent);
|
|
33620
33732
|
}
|
|
33621
33733
|
async generateSitemap() {
|
|
33622
|
-
const currentDate =
|
|
33734
|
+
const currentDate = toPacificTime(new Date).toISOString();
|
|
33623
33735
|
const pageSize = 10;
|
|
33624
33736
|
const config = this.options.config;
|
|
33625
|
-
const now =
|
|
33737
|
+
const now = toPacificTime(new Date).getTime();
|
|
33626
33738
|
const ONE_DAY = 24 * 60 * 60 * 1000;
|
|
33627
33739
|
const ONE_WEEK = 7 * ONE_DAY;
|
|
33628
33740
|
const ONE_MONTH = 30 * ONE_DAY;
|
|
@@ -33703,16 +33815,7 @@ ${rssItems}
|
|
|
33703
33815
|
}
|
|
33704
33816
|
}
|
|
33705
33817
|
}
|
|
33706
|
-
const postsByYear
|
|
33707
|
-
for (const post of this.site.posts) {
|
|
33708
|
-
const postDate = new Date(post.date);
|
|
33709
|
-
const year = postDate.getFullYear().toString();
|
|
33710
|
-
if (!postsByYear[year]) {
|
|
33711
|
-
postsByYear[year] = [];
|
|
33712
|
-
}
|
|
33713
|
-
postsByYear[year].push(post);
|
|
33714
|
-
}
|
|
33715
|
-
for (const [year, yearPosts] of Object.entries(postsByYear)) {
|
|
33818
|
+
for (const [year, yearPosts] of Object.entries(this.site.postsByYear)) {
|
|
33716
33819
|
const currentYear = new Date().getFullYear();
|
|
33717
33820
|
const isCurrentYear = parseInt(year) === currentYear;
|
|
33718
33821
|
const yearPriority = isCurrentYear ? 0.7 : 0.5;
|
|
@@ -33746,7 +33849,7 @@ ${rssItems}
|
|
|
33746
33849
|
}
|
|
33747
33850
|
}
|
|
33748
33851
|
async generateSitemapIndex() {
|
|
33749
|
-
const currentDate =
|
|
33852
|
+
const currentDate = toPacificTime(new Date).toISOString();
|
|
33750
33853
|
const config = this.options.config;
|
|
33751
33854
|
let sitemapIndexContent = `<?xml version="1.0" encoding="UTF-8"?>
|
|
33752
33855
|
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
@@ -34817,7 +34920,7 @@ registerServeCommand(program2);
|
|
|
34817
34920
|
registerCssCommand(program2);
|
|
34818
34921
|
registerImagesPushCommand(program2);
|
|
34819
34922
|
registerValidateCommand(program2);
|
|
34820
|
-
program2.name("bunki").description("An opinionated static site generator built with Bun").version("0.
|
|
34923
|
+
program2.name("bunki").description("An opinionated static site generator built with Bun").version("0.10.0");
|
|
34821
34924
|
var currentFile = import.meta.url.replace("file://", "");
|
|
34822
34925
|
var mainFile = Bun.main;
|
|
34823
34926
|
if (currentFile === mainFile || currentFile.endsWith(mainFile)) {
|