@leji-org/leji 1.0.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/README.md +36 -0
- package/assets-manifest.json +25 -0
- package/cli.json +82 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +4 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/conformance.d.ts +24 -0
- package/dist/commands/conformance.js +111 -0
- package/dist/commands/conformance.js.map +1 -0
- package/dist/commands/docs.d.ts +32 -0
- package/dist/commands/docs.js +196 -0
- package/dist/commands/docs.js.map +1 -0
- package/dist/commands/freshness.d.ts +21 -0
- package/dist/commands/freshness.js +41 -0
- package/dist/commands/freshness.js.map +1 -0
- package/dist/commands/indexgen.d.ts +55 -0
- package/dist/commands/indexgen.js +256 -0
- package/dist/commands/indexgen.js.map +1 -0
- package/dist/commands/init.d.ts +28 -0
- package/dist/commands/init.js +378 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/validate.d.ts +25 -0
- package/dist/commands/validate.js +359 -0
- package/dist/commands/validate.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +324 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/findings.d.ts +17 -0
- package/dist/lib/findings.js +29 -0
- package/dist/lib/findings.js.map +1 -0
- package/dist/lib/frontmatter.d.ts +14 -0
- package/dist/lib/frontmatter.js +28 -0
- package/dist/lib/frontmatter.js.map +1 -0
- package/dist/lib/fsx.d.ts +21 -0
- package/dist/lib/fsx.js +100 -0
- package/dist/lib/fsx.js.map +1 -0
- package/dist/lib/git.d.ts +10 -0
- package/dist/lib/git.js +55 -0
- package/dist/lib/git.js.map +1 -0
- package/dist/lib/layer.d.ts +32 -0
- package/dist/lib/layer.js +138 -0
- package/dist/lib/layer.js.map +1 -0
- package/dist/lib/manifest.d.ts +62 -0
- package/dist/lib/manifest.js +54 -0
- package/dist/lib/manifest.js.map +1 -0
- package/dist/lib/schemas.d.ts +38 -0
- package/dist/lib/schemas.js +57 -0
- package/dist/lib/schemas.js.map +1 -0
- package/package.json +61 -0
- package/schemas/README.md +3 -0
- package/schemas/agent-profile.schema.json +129 -0
- package/schemas/context-changelog.schema.json +150 -0
- package/schemas/context-index.schema.json +137 -0
- package/schemas/context-manifest.schema.json +253 -0
- package/schemas/decision-record.schema.json +84 -0
- package/templates/README.md +5 -0
- package/templates/agent-profile.md +25 -0
- package/templates/agents/core.md +27 -0
- package/templates/boot-profile.md +39 -0
- package/templates/decision-record.md +28 -0
- package/templates/docs-viewer-assets/PROVENANCE.txt +18 -0
- package/templates/docs-viewer-assets/docsify-sidebar-collapse.min.css +24 -0
- package/templates/docs-viewer-assets/docsify-sidebar-collapse.min.js +149 -0
- package/templates/docs-viewer-assets/docsify.min.js +1 -0
- package/templates/docs-viewer-assets/search.min.js +314 -0
- package/templates/docs-viewer-assets/vue.css +1063 -0
- package/templates/docs-viewer.html +63 -0
- package/templates/leji.json +56 -0
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
!(function () {
|
|
2
|
+
function u(e) {
|
|
3
|
+
return e
|
|
4
|
+
.replace(/<!-- {docsify-ignore} -->/, "")
|
|
5
|
+
.replace(/{docsify-ignore}/, "")
|
|
6
|
+
.replace(/<!-- {docsify-ignore-all} -->/, "")
|
|
7
|
+
.replace(/{docsify-ignore-all}/, "")
|
|
8
|
+
.trim();
|
|
9
|
+
}
|
|
10
|
+
var f = {},
|
|
11
|
+
m = { EXPIRE_KEY: "docsify.search.expires", INDEX_KEY: "docsify.search.index" };
|
|
12
|
+
function g(e) {
|
|
13
|
+
var n = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" };
|
|
14
|
+
return String(e).replace(/[&<>"']/g, function (e) {
|
|
15
|
+
return n[e];
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function y(e) {
|
|
19
|
+
return (
|
|
20
|
+
e.text ||
|
|
21
|
+
"table" !== e.type ||
|
|
22
|
+
(e.cells.unshift(e.header),
|
|
23
|
+
(e.text = e.cells
|
|
24
|
+
.map(function (e) {
|
|
25
|
+
return e.join(" | ");
|
|
26
|
+
})
|
|
27
|
+
.join(" |\n "))),
|
|
28
|
+
e.text
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
function v(e) {
|
|
32
|
+
return (e.text || "list" !== e.type || (e.text = e.raw), e.text);
|
|
33
|
+
}
|
|
34
|
+
function b(o, e, s, c) {
|
|
35
|
+
void 0 === e && (e = "");
|
|
36
|
+
var d,
|
|
37
|
+
e = window.marked.lexer(e),
|
|
38
|
+
l = window.Docsify.slugify,
|
|
39
|
+
p = {},
|
|
40
|
+
h = "";
|
|
41
|
+
return (
|
|
42
|
+
e.forEach(function (e, n) {
|
|
43
|
+
var t, a, i, r;
|
|
44
|
+
"heading" === e.type && e.depth <= c
|
|
45
|
+
? ((t = (a =
|
|
46
|
+
((i = e.text),
|
|
47
|
+
(r = {}),
|
|
48
|
+
{
|
|
49
|
+
str: (i =
|
|
50
|
+
(i = void 0 === i ? "" : i) &&
|
|
51
|
+
i
|
|
52
|
+
.replace(/^('|")/, "")
|
|
53
|
+
.replace(/('|")$/, "")
|
|
54
|
+
.replace(/(?:^|\s):([\w-]+:?)=?([\w-%]+)?/g, function (e, n, t) {
|
|
55
|
+
return -1 === n.indexOf(":") ? ((r[n] = (t && t.replace(/"/g, "")) || !0), "") : e;
|
|
56
|
+
})
|
|
57
|
+
.trim()),
|
|
58
|
+
config: r,
|
|
59
|
+
})).str),
|
|
60
|
+
(i = a.config),
|
|
61
|
+
(a = u(e.text)),
|
|
62
|
+
(d = i.id ? s.toURL(o, { id: l(i.id) }) : s.toURL(o, { id: l(g(a)) })),
|
|
63
|
+
t && (h = u(t)),
|
|
64
|
+
(p[d] = { slug: d, title: h, body: "" }))
|
|
65
|
+
: (0 === n &&
|
|
66
|
+
((d = s.toURL(o)),
|
|
67
|
+
(p[d] = { slug: d, title: "/" !== o ? o.slice(1) : "Home Page", body: e.text || "" })),
|
|
68
|
+
d &&
|
|
69
|
+
(p[d]
|
|
70
|
+
? p[d].body
|
|
71
|
+
? ((e.text = y(e)), (e.text = v(e)), (p[d].body += "\n" + (e.text || "")))
|
|
72
|
+
: ((e.text = y(e)), (e.text = v(e)), (p[d].body = e.text || ""))
|
|
73
|
+
: (p[d] = { slug: d, title: "", body: "" })));
|
|
74
|
+
}),
|
|
75
|
+
l.clear(),
|
|
76
|
+
p
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
function p(e) {
|
|
80
|
+
return e && e.normalize ? e.normalize("NFD").replace(/[\u0300-\u036f]/g, "") : e;
|
|
81
|
+
}
|
|
82
|
+
function o(e) {
|
|
83
|
+
var n = [],
|
|
84
|
+
t = [];
|
|
85
|
+
Object.keys(f).forEach(function (n) {
|
|
86
|
+
t = t.concat(
|
|
87
|
+
Object.keys(f[n]).map(function (e) {
|
|
88
|
+
return f[n][e];
|
|
89
|
+
})
|
|
90
|
+
);
|
|
91
|
+
});
|
|
92
|
+
var a = (e = e.trim()).split(/[\s\-,\\/]+/);
|
|
93
|
+
1 !== a.length && (a = [].concat(e, a));
|
|
94
|
+
for (var i = 0; i < t.length; i++)
|
|
95
|
+
!(function (e) {
|
|
96
|
+
var e = t[e],
|
|
97
|
+
r = 0,
|
|
98
|
+
o = "",
|
|
99
|
+
s = "",
|
|
100
|
+
c = "",
|
|
101
|
+
d = e.title && e.title.trim(),
|
|
102
|
+
l = e.body && e.body.trim(),
|
|
103
|
+
e = e.slug || "";
|
|
104
|
+
d &&
|
|
105
|
+
(a.forEach(function (e) {
|
|
106
|
+
var n,
|
|
107
|
+
t,
|
|
108
|
+
a = new RegExp(g(p(e)).replace(/[|\\{}()[\]^$+*?.]/g, "\\$&"), "gi"),
|
|
109
|
+
i = -1;
|
|
110
|
+
((s = d && g(p(d))),
|
|
111
|
+
(c = l && g(p(l))),
|
|
112
|
+
(t = d ? s.search(a) : -1),
|
|
113
|
+
(i = l ? c.search(a) : -1),
|
|
114
|
+
(0 <= t || 0 <= i) &&
|
|
115
|
+
((r += 0 <= t ? 3 : 0 <= i ? 2 : 0),
|
|
116
|
+
(t = (t = n = 0) == (n = (i = i < 0 ? 0 : i) < 11 ? 0 : i - 10) ? 70 : i + e.length + 60),
|
|
117
|
+
l && t > l.length && (t = l.length),
|
|
118
|
+
(a =
|
|
119
|
+
c &&
|
|
120
|
+
"..." +
|
|
121
|
+
c.substring(n, t).replace(a, function (e) {
|
|
122
|
+
return '<em class="search-keyword">' + e + "</em>";
|
|
123
|
+
}) +
|
|
124
|
+
"..."),
|
|
125
|
+
(o += a)));
|
|
126
|
+
}),
|
|
127
|
+
0 < r && ((e = { title: s, content: l ? o : "", url: e, score: r }), n.push(e)));
|
|
128
|
+
})(i);
|
|
129
|
+
return n.sort(function (e, n) {
|
|
130
|
+
return n.score - e.score;
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
function r(a, i) {
|
|
134
|
+
var t,
|
|
135
|
+
r,
|
|
136
|
+
n,
|
|
137
|
+
e,
|
|
138
|
+
o = "auto" === a.paths,
|
|
139
|
+
s = o
|
|
140
|
+
? ((t = i.router),
|
|
141
|
+
(r = []),
|
|
142
|
+
Docsify.dom.findAll(".sidebar-nav a:not(.section-link):not([data-nosearch])").forEach(function (e) {
|
|
143
|
+
var n = e.href,
|
|
144
|
+
e = e.getAttribute("href"),
|
|
145
|
+
n = t.parse(n).path;
|
|
146
|
+
n && -1 === r.indexOf(n) && !Docsify.util.isAbsolutePath(e) && r.push(n);
|
|
147
|
+
}),
|
|
148
|
+
r)
|
|
149
|
+
: a.paths,
|
|
150
|
+
c = "";
|
|
151
|
+
s.length && o && a.pathNamespaces
|
|
152
|
+
? ((n = s[0]),
|
|
153
|
+
Array.isArray(a.pathNamespaces)
|
|
154
|
+
? (c =
|
|
155
|
+
a.pathNamespaces.filter(function (e) {
|
|
156
|
+
return n.slice(0, e.length) === e;
|
|
157
|
+
})[0] || c)
|
|
158
|
+
: a.pathNamespaces instanceof RegExp && (d = n.match(a.pathNamespaces)) && (c = d[0]),
|
|
159
|
+
(e = -1 === s.indexOf(c + "/")),
|
|
160
|
+
(d = -1 === s.indexOf(c + "/README")),
|
|
161
|
+
e && d && s.unshift(c + "/"))
|
|
162
|
+
: -1 === s.indexOf("/") && -1 === s.indexOf("/README") && s.unshift("/");
|
|
163
|
+
var d,
|
|
164
|
+
l = ((d = a.namespace) ? m.EXPIRE_KEY + "/" + d : m.EXPIRE_KEY) + c,
|
|
165
|
+
p = ((d = a.namespace) ? m.INDEX_KEY + "/" + d : m.INDEX_KEY) + c,
|
|
166
|
+
c = localStorage.getItem(l) < Date.now();
|
|
167
|
+
if (((f = JSON.parse(localStorage.getItem(p))), c)) f = {};
|
|
168
|
+
else if (!o) return;
|
|
169
|
+
var h = s.length,
|
|
170
|
+
u = 0;
|
|
171
|
+
s.forEach(function (t) {
|
|
172
|
+
return f[t]
|
|
173
|
+
? u++
|
|
174
|
+
: void Docsify.get(i.router.getFile(t), !1, i.config.requestHeaders).then(function (e) {
|
|
175
|
+
var n;
|
|
176
|
+
((f[t] = b(t, e, i.router, a.depth)),
|
|
177
|
+
h === ++u &&
|
|
178
|
+
((n = a.maxAge),
|
|
179
|
+
(e = p),
|
|
180
|
+
localStorage.setItem(l, Date.now() + n),
|
|
181
|
+
localStorage.setItem(e, JSON.stringify(f))));
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
var s,
|
|
186
|
+
c = "";
|
|
187
|
+
function d(e) {
|
|
188
|
+
var n = Docsify.dom.find("div.search"),
|
|
189
|
+
t = Docsify.dom.find(n, ".results-panel"),
|
|
190
|
+
a = Docsify.dom.find(n, ".clear-button"),
|
|
191
|
+
i = Docsify.dom.find(".sidebar-nav"),
|
|
192
|
+
n = Docsify.dom.find(".app-name");
|
|
193
|
+
if (!e)
|
|
194
|
+
return (
|
|
195
|
+
t.classList.remove("show"),
|
|
196
|
+
a.classList.remove("show"),
|
|
197
|
+
(t.innerHTML = ""),
|
|
198
|
+
void (s.hideOtherSidebarContent && (i && i.classList.remove("hide"), n && n.classList.remove("hide")))
|
|
199
|
+
);
|
|
200
|
+
var e = o(e),
|
|
201
|
+
r = "";
|
|
202
|
+
(e.forEach(function (e) {
|
|
203
|
+
r +=
|
|
204
|
+
'<div class="matching-post">\n<a href="' +
|
|
205
|
+
e.url +
|
|
206
|
+
'">\n<h2>' +
|
|
207
|
+
e.title +
|
|
208
|
+
"</h2>\n<p>" +
|
|
209
|
+
e.content +
|
|
210
|
+
"</p>\n</a>\n</div>";
|
|
211
|
+
}),
|
|
212
|
+
t.classList.add("show"),
|
|
213
|
+
a.classList.add("show"),
|
|
214
|
+
(t.innerHTML = r || '<p class="empty">' + c + "</p>"),
|
|
215
|
+
s.hideOtherSidebarContent && (i && i.classList.add("hide"), n && n.classList.add("hide")));
|
|
216
|
+
}
|
|
217
|
+
function l(e) {
|
|
218
|
+
s = e;
|
|
219
|
+
}
|
|
220
|
+
function h(e, n) {
|
|
221
|
+
var t,
|
|
222
|
+
a,
|
|
223
|
+
i = n.router.parse().query.s;
|
|
224
|
+
(l(e),
|
|
225
|
+
Docsify.dom.style(
|
|
226
|
+
"\n.sidebar {\n padding-top: 0;\n}\n\n.search {\n margin-bottom: 20px;\n padding: 6px;\n border-bottom: 1px solid #eee;\n}\n\n.search .input-wrap {\n display: flex;\n align-items: center;\n}\n\n.search .results-panel {\n display: none;\n}\n\n.search .results-panel.show {\n display: block;\n}\n\n.search input {\n outline: none;\n border: none;\n width: 100%;\n padding: 0.6em 7px;\n font-size: inherit;\n border: 1px solid transparent;\n}\n\n.search input:focus {\n box-shadow: 0 0 5px var(--theme-color, #42b983);\n border: 1px solid var(--theme-color, #42b983);\n}\n\n.search input::-webkit-search-decoration,\n.search input::-webkit-search-cancel-button,\n.search input {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n}\n\n.search input::-ms-clear {\n display: none;\n height: 0;\n width: 0;\n}\n\n.search .clear-button {\n cursor: pointer;\n width: 36px;\n text-align: right;\n display: none;\n}\n\n.search .clear-button.show {\n display: block;\n}\n\n.search .clear-button svg {\n transform: scale(.5);\n}\n\n.search h2 {\n font-size: 17px;\n margin: 10px 0;\n}\n\n.search a {\n text-decoration: none;\n color: inherit;\n}\n\n.search .matching-post {\n border-bottom: 1px solid #eee;\n}\n\n.search .matching-post:last-child {\n border-bottom: 0;\n}\n\n.search p {\n font-size: 14px;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n\n.search p.empty {\n text-align: center;\n}\n\n.app-name.hide, .sidebar-nav.hide {\n display: none;\n}"
|
|
227
|
+
),
|
|
228
|
+
(function (e) {
|
|
229
|
+
void 0 === e && (e = "");
|
|
230
|
+
var n = Docsify.dom.create(
|
|
231
|
+
"div",
|
|
232
|
+
'<div class="input-wrap">\n <input type="search" value="' +
|
|
233
|
+
e +
|
|
234
|
+
'" aria-label="Search text" />\n <div class="clear-button">\n <svg width="26" height="24">\n <circle cx="12" cy="12" r="11" fill="#ccc" />\n <path stroke="white" stroke-width="2" d="M8.25,8.25,15.75,15.75" />\n <path stroke="white" stroke-width="2"d="M8.25,15.75,15.75,8.25" />\n </svg>\n </div>\n </div>\n <div class="results-panel"></div>\n </div>'
|
|
235
|
+
),
|
|
236
|
+
e = Docsify.dom.find("aside");
|
|
237
|
+
(Docsify.dom.toggleClass(n, "search"), Docsify.dom.before(e, n));
|
|
238
|
+
})(i),
|
|
239
|
+
(n = Docsify.dom.find("div.search")),
|
|
240
|
+
(a = Docsify.dom.find(n, "input")),
|
|
241
|
+
(e = Docsify.dom.find(n, ".input-wrap")),
|
|
242
|
+
Docsify.dom.on(n, "click", function (e) {
|
|
243
|
+
return -1 === ["A", "H2", "P", "EM"].indexOf(e.target.tagName) && e.stopPropagation();
|
|
244
|
+
}),
|
|
245
|
+
Docsify.dom.on(a, "input", function (n) {
|
|
246
|
+
(clearTimeout(t),
|
|
247
|
+
(t = setTimeout(function (e) {
|
|
248
|
+
return d(n.target.value.trim());
|
|
249
|
+
}, 100)));
|
|
250
|
+
}),
|
|
251
|
+
Docsify.dom.on(e, "click", function (e) {
|
|
252
|
+
"INPUT" !== e.target.tagName && ((a.value = ""), d());
|
|
253
|
+
}),
|
|
254
|
+
i &&
|
|
255
|
+
setTimeout(function (e) {
|
|
256
|
+
return d(i);
|
|
257
|
+
}, 500));
|
|
258
|
+
}
|
|
259
|
+
function x(e, n) {
|
|
260
|
+
var t, a, i, r, o;
|
|
261
|
+
(l(e),
|
|
262
|
+
(t = e.placeholder),
|
|
263
|
+
(a = n.route.path),
|
|
264
|
+
(r = Docsify.dom.getNode('.search input[type="search"]')) &&
|
|
265
|
+
("string" == typeof t
|
|
266
|
+
? (r.placeholder = t)
|
|
267
|
+
: ((i = Object.keys(t).filter(function (e) {
|
|
268
|
+
return -1 < a.indexOf(e);
|
|
269
|
+
})[0]),
|
|
270
|
+
(r.placeholder = t[i]))),
|
|
271
|
+
(e = e.noData),
|
|
272
|
+
(o = n.route.path),
|
|
273
|
+
(c =
|
|
274
|
+
"string" == typeof e
|
|
275
|
+
? e
|
|
276
|
+
: e[
|
|
277
|
+
Object.keys(e).filter(function (e) {
|
|
278
|
+
return -1 < o.indexOf(e);
|
|
279
|
+
})[0]
|
|
280
|
+
]));
|
|
281
|
+
}
|
|
282
|
+
var w = {
|
|
283
|
+
placeholder: "Type to search",
|
|
284
|
+
noData: "No Results!",
|
|
285
|
+
paths: "auto",
|
|
286
|
+
depth: 2,
|
|
287
|
+
maxAge: 864e5,
|
|
288
|
+
hideOtherSidebarContent: !1,
|
|
289
|
+
namespace: void 0,
|
|
290
|
+
pathNamespaces: void 0,
|
|
291
|
+
};
|
|
292
|
+
$docsify.plugins = [].concat(function (e, n) {
|
|
293
|
+
var t = Docsify.util,
|
|
294
|
+
a = n.config.search || w;
|
|
295
|
+
Array.isArray(a)
|
|
296
|
+
? (w.paths = a)
|
|
297
|
+
: "object" == typeof a &&
|
|
298
|
+
((w.paths = Array.isArray(a.paths) ? a.paths : "auto"),
|
|
299
|
+
(w.maxAge = (t.isPrimitive(a.maxAge) ? a : w).maxAge),
|
|
300
|
+
(w.placeholder = a.placeholder || w.placeholder),
|
|
301
|
+
(w.noData = a.noData || w.noData),
|
|
302
|
+
(w.depth = a.depth || w.depth),
|
|
303
|
+
(w.hideOtherSidebarContent = a.hideOtherSidebarContent || w.hideOtherSidebarContent),
|
|
304
|
+
(w.namespace = a.namespace || w.namespace),
|
|
305
|
+
(w.pathNamespaces = a.pathNamespaces || w.pathNamespaces));
|
|
306
|
+
var i = "auto" === w.paths;
|
|
307
|
+
(e.mounted(function (e) {
|
|
308
|
+
(h(w, n), i || r(w, n));
|
|
309
|
+
}),
|
|
310
|
+
e.doneEach(function (e) {
|
|
311
|
+
(x(w, n), i && r(w, n));
|
|
312
|
+
}));
|
|
313
|
+
}, $docsify.plugins);
|
|
314
|
+
})();
|