@powerlines/plugin-automd 0.1.237 → 0.1.239
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/chunk-BrXtsOCC.cjs +41 -0
- package/dist/{_virtual/rolldown_runtime.cjs → chunk-CS8OKu3y.mjs} +5 -2
- package/dist/dist-8g8frrZv.cjs +246 -0
- package/dist/dist-BavrV299.cjs +682 -0
- package/dist/dist-DVv98dZY.cjs +87 -0
- package/dist/dist-Jfd0GR_C.mjs +223 -0
- package/dist/dist-Jfd0GR_C.mjs.map +1 -0
- package/dist/dist-PRh64A_O.mjs +70 -0
- package/dist/dist-PRh64A_O.mjs.map +1 -0
- package/dist/dist-PXnBmevt.mjs +681 -0
- package/dist/dist-PXnBmevt.mjs.map +1 -0
- package/dist/index-B8OHl-c_.d.mts +1 -0
- package/dist/index-CmCelmEL.d.cts +1 -0
- package/dist/index.cjs +9607 -15
- package/dist/index.d.cts +5 -4
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +5 -4
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +9600 -12
- package/dist/index.mjs.map +1 -0
- package/dist/loader-BRhKFmUn.mjs +58373 -0
- package/dist/loader-BRhKFmUn.mjs.map +1 -0
- package/dist/loader-DNEbMIIe.cjs +58372 -0
- package/dist/multipart-parser-C_EjwsED.cjs +178 -0
- package/dist/multipart-parser-CglOohoL.mjs +179 -0
- package/dist/multipart-parser-CglOohoL.mjs.map +1 -0
- package/dist/node-CsMhpAoX.cjs +269 -0
- package/dist/node-DapIDpAC.cjs +4024 -0
- package/dist/node-Du1vi9nA.mjs +3974 -0
- package/dist/node-Du1vi9nA.mjs.map +1 -0
- package/dist/node-d_BpkPSt.mjs +267 -0
- package/dist/node-d_BpkPSt.mjs.map +1 -0
- package/dist/plugin-BVD0UMjp.d.cts +52 -0
- package/dist/plugin-BVD0UMjp.d.cts.map +1 -0
- package/dist/plugin-C6jB5e_j.d.mts +52 -0
- package/dist/plugin-C6jB5e_j.d.mts.map +1 -0
- package/dist/plugin-Ckx8qAq8.cjs +0 -0
- package/dist/plugin-jZ9N9Mz-.mjs +1 -0
- package/dist/toc-BN2Ji9Yo.d.mts +35 -0
- package/dist/toc-BN2Ji9Yo.d.mts.map +1 -0
- package/dist/toc-BQgoCyR1.cjs +0 -0
- package/dist/toc-BrayIFG6.d.cts +35 -0
- package/dist/toc-BrayIFG6.d.cts.map +1 -0
- package/dist/toc-CBjybXug.mjs +1 -0
- package/dist/types/index.cjs +3 -0
- package/dist/types/index.d.cts +3 -2
- package/dist/types/index.d.mts +3 -2
- package/dist/types/index.mjs +4 -0
- package/dist/types/plugin.cjs +1 -0
- package/dist/types/plugin.d.cts +2 -50
- package/dist/types/plugin.d.mts +2 -50
- package/dist/types/plugin.mjs +2 -0
- package/dist/types/toc.cjs +1 -0
- package/dist/types/toc.d.cts +1 -33
- package/dist/types/toc.d.mts +1 -33
- package/dist/types/toc.mjs +2 -0
- package/dist/types--fVOUYBq.mjs +1 -0
- package/dist/types-D208vOSb.cjs +0 -0
- package/package.json +4 -4
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import { i as withQuery, r as withBase, t as destr } from "./dist-Jfd0GR_C.mjs";
|
|
2
|
+
import { a as le, c as ye, i as dt, n as Mn, o as qn, r as br, s as ut, t as Mi } from "./node-Du1vi9nA.mjs";
|
|
3
|
+
import "node:fs";
|
|
4
|
+
import "node:url";
|
|
5
|
+
import "node:path";
|
|
6
|
+
import "node:util";
|
|
7
|
+
import http from "node:http";
|
|
8
|
+
import https from "node:https";
|
|
9
|
+
import "node:zlib";
|
|
10
|
+
import "node:stream";
|
|
11
|
+
import "node:buffer";
|
|
12
|
+
import "node:net";
|
|
13
|
+
|
|
14
|
+
//#region ../../node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs
|
|
15
|
+
const o = !!globalThis.process?.env?.FORCE_NODE_FETCH, r = !o && globalThis.fetch || Mi, p = !o && globalThis.Blob || ut, F = !o && globalThis.File || qn, h = !o && globalThis.FormData || br, n = !o && globalThis.Headers || ye, c = !o && globalThis.Request || dt, R = !o && globalThis.Response || le, T = !o && globalThis.AbortController || Mn;
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region ../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs
|
|
19
|
+
var FetchError = class extends Error {
|
|
20
|
+
constructor(message, opts) {
|
|
21
|
+
super(message, opts);
|
|
22
|
+
this.name = "FetchError";
|
|
23
|
+
if (opts?.cause && !this.cause) this.cause = opts.cause;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
function createFetchError(ctx) {
|
|
27
|
+
const errorMessage = ctx.error?.message || ctx.error?.toString() || "";
|
|
28
|
+
const method = ctx.request?.method || ctx.options?.method || "GET";
|
|
29
|
+
const url = ctx.request?.url || String(ctx.request) || "/";
|
|
30
|
+
const fetchError = new FetchError(`${`[${method}] ${JSON.stringify(url)}`}: ${ctx.response ? `${ctx.response.status} ${ctx.response.statusText}` : "<no response>"}${errorMessage ? ` ${errorMessage}` : ""}`, ctx.error ? { cause: ctx.error } : void 0);
|
|
31
|
+
for (const key of [
|
|
32
|
+
"request",
|
|
33
|
+
"options",
|
|
34
|
+
"response"
|
|
35
|
+
]) Object.defineProperty(fetchError, key, { get() {
|
|
36
|
+
return ctx[key];
|
|
37
|
+
} });
|
|
38
|
+
for (const [key, refKey] of [
|
|
39
|
+
["data", "_data"],
|
|
40
|
+
["status", "status"],
|
|
41
|
+
["statusCode", "status"],
|
|
42
|
+
["statusText", "statusText"],
|
|
43
|
+
["statusMessage", "statusText"]
|
|
44
|
+
]) Object.defineProperty(fetchError, key, { get() {
|
|
45
|
+
return ctx.response && ctx.response[refKey];
|
|
46
|
+
} });
|
|
47
|
+
return fetchError;
|
|
48
|
+
}
|
|
49
|
+
const payloadMethods = new Set(Object.freeze([
|
|
50
|
+
"PATCH",
|
|
51
|
+
"POST",
|
|
52
|
+
"PUT",
|
|
53
|
+
"DELETE"
|
|
54
|
+
]));
|
|
55
|
+
function isPayloadMethod(method = "GET") {
|
|
56
|
+
return payloadMethods.has(method.toUpperCase());
|
|
57
|
+
}
|
|
58
|
+
function isJSONSerializable(value) {
|
|
59
|
+
if (value === void 0) return false;
|
|
60
|
+
const t = typeof value;
|
|
61
|
+
if (t === "string" || t === "number" || t === "boolean" || t === null) return true;
|
|
62
|
+
if (t !== "object") return false;
|
|
63
|
+
if (Array.isArray(value)) return true;
|
|
64
|
+
if (value.buffer) return false;
|
|
65
|
+
if (value instanceof FormData || value instanceof URLSearchParams) return false;
|
|
66
|
+
return value.constructor && value.constructor.name === "Object" || typeof value.toJSON === "function";
|
|
67
|
+
}
|
|
68
|
+
const textTypes = /* @__PURE__ */ new Set([
|
|
69
|
+
"image/svg",
|
|
70
|
+
"application/xml",
|
|
71
|
+
"application/xhtml",
|
|
72
|
+
"application/html"
|
|
73
|
+
]);
|
|
74
|
+
const JSON_RE = /^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;
|
|
75
|
+
function detectResponseType(_contentType = "") {
|
|
76
|
+
if (!_contentType) return "json";
|
|
77
|
+
const contentType = _contentType.split(";").shift() || "";
|
|
78
|
+
if (JSON_RE.test(contentType)) return "json";
|
|
79
|
+
if (contentType === "text/event-stream") return "stream";
|
|
80
|
+
if (textTypes.has(contentType) || contentType.startsWith("text/")) return "text";
|
|
81
|
+
return "blob";
|
|
82
|
+
}
|
|
83
|
+
function resolveFetchOptions(request, input, defaults, Headers$1) {
|
|
84
|
+
const headers = mergeHeaders(input?.headers ?? request?.headers, defaults?.headers, Headers$1);
|
|
85
|
+
let query;
|
|
86
|
+
if (defaults?.query || defaults?.params || input?.params || input?.query) query = {
|
|
87
|
+
...defaults?.params,
|
|
88
|
+
...defaults?.query,
|
|
89
|
+
...input?.params,
|
|
90
|
+
...input?.query
|
|
91
|
+
};
|
|
92
|
+
return {
|
|
93
|
+
...defaults,
|
|
94
|
+
...input,
|
|
95
|
+
query,
|
|
96
|
+
params: query,
|
|
97
|
+
headers
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
function mergeHeaders(input, defaults, Headers$1) {
|
|
101
|
+
if (!defaults) return new Headers$1(input);
|
|
102
|
+
const headers = new Headers$1(defaults);
|
|
103
|
+
if (input) for (const [key, value] of Symbol.iterator in input || Array.isArray(input) ? input : new Headers$1(input)) headers.set(key, value);
|
|
104
|
+
return headers;
|
|
105
|
+
}
|
|
106
|
+
async function callHooks(context, hooks) {
|
|
107
|
+
if (hooks) if (Array.isArray(hooks)) for (const hook of hooks) await hook(context);
|
|
108
|
+
else await hooks(context);
|
|
109
|
+
}
|
|
110
|
+
const retryStatusCodes = /* @__PURE__ */ new Set([
|
|
111
|
+
408,
|
|
112
|
+
409,
|
|
113
|
+
425,
|
|
114
|
+
429,
|
|
115
|
+
500,
|
|
116
|
+
502,
|
|
117
|
+
503,
|
|
118
|
+
504
|
|
119
|
+
]);
|
|
120
|
+
const nullBodyResponses = /* @__PURE__ */ new Set([
|
|
121
|
+
101,
|
|
122
|
+
204,
|
|
123
|
+
205,
|
|
124
|
+
304
|
|
125
|
+
]);
|
|
126
|
+
function createFetch(globalOptions = {}) {
|
|
127
|
+
const { fetch: fetch$1 = globalThis.fetch, Headers: Headers$1 = globalThis.Headers, AbortController: AbortController$1 = globalThis.AbortController } = globalOptions;
|
|
128
|
+
async function onError(context) {
|
|
129
|
+
const isAbort = context.error && context.error.name === "AbortError" && !context.options.timeout || false;
|
|
130
|
+
if (context.options.retry !== false && !isAbort) {
|
|
131
|
+
let retries;
|
|
132
|
+
if (typeof context.options.retry === "number") retries = context.options.retry;
|
|
133
|
+
else retries = isPayloadMethod(context.options.method) ? 0 : 1;
|
|
134
|
+
const responseCode = context.response && context.response.status || 500;
|
|
135
|
+
if (retries > 0 && (Array.isArray(context.options.retryStatusCodes) ? context.options.retryStatusCodes.includes(responseCode) : retryStatusCodes.has(responseCode))) {
|
|
136
|
+
const retryDelay = typeof context.options.retryDelay === "function" ? context.options.retryDelay(context) : context.options.retryDelay || 0;
|
|
137
|
+
if (retryDelay > 0) await new Promise((resolve) => setTimeout(resolve, retryDelay));
|
|
138
|
+
return $fetchRaw(context.request, {
|
|
139
|
+
...context.options,
|
|
140
|
+
retry: retries - 1
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
const error = createFetchError(context);
|
|
145
|
+
if (Error.captureStackTrace) Error.captureStackTrace(error, $fetchRaw);
|
|
146
|
+
throw error;
|
|
147
|
+
}
|
|
148
|
+
const $fetchRaw = async function $fetchRaw2(_request, _options = {}) {
|
|
149
|
+
const context = {
|
|
150
|
+
request: _request,
|
|
151
|
+
options: resolveFetchOptions(_request, _options, globalOptions.defaults, Headers$1),
|
|
152
|
+
response: void 0,
|
|
153
|
+
error: void 0
|
|
154
|
+
};
|
|
155
|
+
if (context.options.method) context.options.method = context.options.method.toUpperCase();
|
|
156
|
+
if (context.options.onRequest) {
|
|
157
|
+
await callHooks(context, context.options.onRequest);
|
|
158
|
+
if (!(context.options.headers instanceof Headers$1)) context.options.headers = new Headers$1(context.options.headers || {});
|
|
159
|
+
}
|
|
160
|
+
if (typeof context.request === "string") {
|
|
161
|
+
if (context.options.baseURL) context.request = withBase(context.request, context.options.baseURL);
|
|
162
|
+
if (context.options.query) {
|
|
163
|
+
context.request = withQuery(context.request, context.options.query);
|
|
164
|
+
delete context.options.query;
|
|
165
|
+
}
|
|
166
|
+
if ("query" in context.options) delete context.options.query;
|
|
167
|
+
if ("params" in context.options) delete context.options.params;
|
|
168
|
+
}
|
|
169
|
+
if (context.options.body && isPayloadMethod(context.options.method)) {
|
|
170
|
+
if (isJSONSerializable(context.options.body)) {
|
|
171
|
+
const contentType = context.options.headers.get("content-type");
|
|
172
|
+
if (typeof context.options.body !== "string") context.options.body = contentType === "application/x-www-form-urlencoded" ? new URLSearchParams(context.options.body).toString() : JSON.stringify(context.options.body);
|
|
173
|
+
if (!contentType) context.options.headers.set("content-type", "application/json");
|
|
174
|
+
if (!context.options.headers.has("accept")) context.options.headers.set("accept", "application/json");
|
|
175
|
+
} else if ("pipeTo" in context.options.body && typeof context.options.body.pipeTo === "function" || typeof context.options.body.pipe === "function") {
|
|
176
|
+
if (!("duplex" in context.options)) context.options.duplex = "half";
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
let abortTimeout;
|
|
180
|
+
if (!context.options.signal && context.options.timeout) {
|
|
181
|
+
const controller = new AbortController$1();
|
|
182
|
+
abortTimeout = setTimeout(() => {
|
|
183
|
+
const error = /* @__PURE__ */ new Error("[TimeoutError]: The operation was aborted due to timeout");
|
|
184
|
+
error.name = "TimeoutError";
|
|
185
|
+
error.code = 23;
|
|
186
|
+
controller.abort(error);
|
|
187
|
+
}, context.options.timeout);
|
|
188
|
+
context.options.signal = controller.signal;
|
|
189
|
+
}
|
|
190
|
+
try {
|
|
191
|
+
context.response = await fetch$1(context.request, context.options);
|
|
192
|
+
} catch (error) {
|
|
193
|
+
context.error = error;
|
|
194
|
+
if (context.options.onRequestError) await callHooks(context, context.options.onRequestError);
|
|
195
|
+
return await onError(context);
|
|
196
|
+
} finally {
|
|
197
|
+
if (abortTimeout) clearTimeout(abortTimeout);
|
|
198
|
+
}
|
|
199
|
+
if ((context.response.body || context.response._bodyInit) && !nullBodyResponses.has(context.response.status) && context.options.method !== "HEAD") {
|
|
200
|
+
const responseType = (context.options.parseResponse ? "json" : context.options.responseType) || detectResponseType(context.response.headers.get("content-type") || "");
|
|
201
|
+
switch (responseType) {
|
|
202
|
+
case "json": {
|
|
203
|
+
const data = await context.response.text();
|
|
204
|
+
const parseFunction = context.options.parseResponse || destr;
|
|
205
|
+
context.response._data = parseFunction(data);
|
|
206
|
+
break;
|
|
207
|
+
}
|
|
208
|
+
case "stream":
|
|
209
|
+
context.response._data = context.response.body || context.response._bodyInit;
|
|
210
|
+
break;
|
|
211
|
+
default: context.response._data = await context.response[responseType]();
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
if (context.options.onResponse) await callHooks(context, context.options.onResponse);
|
|
215
|
+
if (!context.options.ignoreResponseError && context.response.status >= 400 && context.response.status < 600) {
|
|
216
|
+
if (context.options.onResponseError) await callHooks(context, context.options.onResponseError);
|
|
217
|
+
return await onError(context);
|
|
218
|
+
}
|
|
219
|
+
return context.response;
|
|
220
|
+
};
|
|
221
|
+
const $fetch$1 = async function $fetch2(request, options) {
|
|
222
|
+
return (await $fetchRaw(request, options))._data;
|
|
223
|
+
};
|
|
224
|
+
$fetch$1.raw = $fetchRaw;
|
|
225
|
+
$fetch$1.native = (...args) => fetch$1(...args);
|
|
226
|
+
$fetch$1.create = (defaultOptions = {}, customGlobalOptions = {}) => createFetch({
|
|
227
|
+
...globalOptions,
|
|
228
|
+
...customGlobalOptions,
|
|
229
|
+
defaults: {
|
|
230
|
+
...globalOptions.defaults,
|
|
231
|
+
...customGlobalOptions.defaults,
|
|
232
|
+
...defaultOptions
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
return $fetch$1;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
//#endregion
|
|
239
|
+
//#region ../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.mjs
|
|
240
|
+
function createNodeFetch() {
|
|
241
|
+
if (!JSON.parse(process.env.FETCH_KEEP_ALIVE || "false")) return r;
|
|
242
|
+
const agentOptions = { keepAlive: true };
|
|
243
|
+
const httpAgent = new http.Agent(agentOptions);
|
|
244
|
+
const httpsAgent = new https.Agent(agentOptions);
|
|
245
|
+
const nodeFetchOptions = { agent(parsedURL) {
|
|
246
|
+
return parsedURL.protocol === "http:" ? httpAgent : httpsAgent;
|
|
247
|
+
} };
|
|
248
|
+
return function nodeFetchWithKeepAlive(input, init) {
|
|
249
|
+
return r(input, {
|
|
250
|
+
...nodeFetchOptions,
|
|
251
|
+
...init
|
|
252
|
+
});
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
const fetch = globalThis.fetch ? (...args) => globalThis.fetch(...args) : createNodeFetch();
|
|
256
|
+
const Headers = globalThis.Headers || n;
|
|
257
|
+
const AbortController = globalThis.AbortController || T;
|
|
258
|
+
const ofetch = createFetch({
|
|
259
|
+
fetch,
|
|
260
|
+
Headers,
|
|
261
|
+
AbortController
|
|
262
|
+
});
|
|
263
|
+
const $fetch = ofetch;
|
|
264
|
+
|
|
265
|
+
//#endregion
|
|
266
|
+
export { $fetch };
|
|
267
|
+
//# sourceMappingURL=node-d_BpkPSt.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-d_BpkPSt.mjs","names":["e","t","s","l","a","i","b","m","Headers","AbortController","fetch","$fetch","nodeFetch","Headers$1","AbortController$1"],"sources":["../../../node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs","../../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs","../../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.mjs"],"sourcesContent":["import{fetch as e,Blob as t,File as s,FormData as l,Headers as a,Request as i,Response as b,AbortController as m}from\"./node.mjs\";export{AbortError,FetchError,blobFrom,blobFromSync,fileFrom,fileFromSync,isRedirect}from\"./node.mjs\";import\"node:http\";import\"node:https\";import\"node:zlib\";import\"node:stream\";import\"node:buffer\";import\"node:util\";import\"./shared/node-fetch-native.DfbY2q-x.mjs\";import\"node:url\";import\"node:net\";import\"node:fs\";import\"node:path\";const o=!!globalThis.process?.env?.FORCE_NODE_FETCH,r=!o&&globalThis.fetch||e,p=!o&&globalThis.Blob||t,F=!o&&globalThis.File||s,h=!o&&globalThis.FormData||l,n=!o&&globalThis.Headers||a,c=!o&&globalThis.Request||i,R=!o&&globalThis.Response||b,T=!o&&globalThis.AbortController||m;export{T as AbortController,p as Blob,F as File,h as FormData,n as Headers,c as Request,R as Response,r as default,r as fetch};\n","import destr from 'destr';\nimport { withBase, withQuery } from 'ufo';\n\nclass FetchError extends Error {\n constructor(message, opts) {\n super(message, opts);\n this.name = \"FetchError\";\n if (opts?.cause && !this.cause) {\n this.cause = opts.cause;\n }\n }\n}\nfunction createFetchError(ctx) {\n const errorMessage = ctx.error?.message || ctx.error?.toString() || \"\";\n const method = ctx.request?.method || ctx.options?.method || \"GET\";\n const url = ctx.request?.url || String(ctx.request) || \"/\";\n const requestStr = `[${method}] ${JSON.stringify(url)}`;\n const statusStr = ctx.response ? `${ctx.response.status} ${ctx.response.statusText}` : \"<no response>\";\n const message = `${requestStr}: ${statusStr}${errorMessage ? ` ${errorMessage}` : \"\"}`;\n const fetchError = new FetchError(\n message,\n ctx.error ? { cause: ctx.error } : void 0\n );\n for (const key of [\"request\", \"options\", \"response\"]) {\n Object.defineProperty(fetchError, key, {\n get() {\n return ctx[key];\n }\n });\n }\n for (const [key, refKey] of [\n [\"data\", \"_data\"],\n [\"status\", \"status\"],\n [\"statusCode\", \"status\"],\n [\"statusText\", \"statusText\"],\n [\"statusMessage\", \"statusText\"]\n ]) {\n Object.defineProperty(fetchError, key, {\n get() {\n return ctx.response && ctx.response[refKey];\n }\n });\n }\n return fetchError;\n}\n\nconst payloadMethods = new Set(\n Object.freeze([\"PATCH\", \"POST\", \"PUT\", \"DELETE\"])\n);\nfunction isPayloadMethod(method = \"GET\") {\n return payloadMethods.has(method.toUpperCase());\n}\nfunction isJSONSerializable(value) {\n if (value === void 0) {\n return false;\n }\n const t = typeof value;\n if (t === \"string\" || t === \"number\" || t === \"boolean\" || t === null) {\n return true;\n }\n if (t !== \"object\") {\n return false;\n }\n if (Array.isArray(value)) {\n return true;\n }\n if (value.buffer) {\n return false;\n }\n if (value instanceof FormData || value instanceof URLSearchParams) {\n return false;\n }\n return value.constructor && value.constructor.name === \"Object\" || typeof value.toJSON === \"function\";\n}\nconst textTypes = /* @__PURE__ */ new Set([\n \"image/svg\",\n \"application/xml\",\n \"application/xhtml\",\n \"application/html\"\n]);\nconst JSON_RE = /^application\\/(?:[\\w!#$%&*.^`~-]*\\+)?json(;.+)?$/i;\nfunction detectResponseType(_contentType = \"\") {\n if (!_contentType) {\n return \"json\";\n }\n const contentType = _contentType.split(\";\").shift() || \"\";\n if (JSON_RE.test(contentType)) {\n return \"json\";\n }\n if (contentType === \"text/event-stream\") {\n return \"stream\";\n }\n if (textTypes.has(contentType) || contentType.startsWith(\"text/\")) {\n return \"text\";\n }\n return \"blob\";\n}\nfunction resolveFetchOptions(request, input, defaults, Headers) {\n const headers = mergeHeaders(\n input?.headers ?? request?.headers,\n defaults?.headers,\n Headers\n );\n let query;\n if (defaults?.query || defaults?.params || input?.params || input?.query) {\n query = {\n ...defaults?.params,\n ...defaults?.query,\n ...input?.params,\n ...input?.query\n };\n }\n return {\n ...defaults,\n ...input,\n query,\n params: query,\n headers\n };\n}\nfunction mergeHeaders(input, defaults, Headers) {\n if (!defaults) {\n return new Headers(input);\n }\n const headers = new Headers(defaults);\n if (input) {\n for (const [key, value] of Symbol.iterator in input || Array.isArray(input) ? input : new Headers(input)) {\n headers.set(key, value);\n }\n }\n return headers;\n}\nasync function callHooks(context, hooks) {\n if (hooks) {\n if (Array.isArray(hooks)) {\n for (const hook of hooks) {\n await hook(context);\n }\n } else {\n await hooks(context);\n }\n }\n}\n\nconst retryStatusCodes = /* @__PURE__ */ new Set([\n 408,\n // Request Timeout\n 409,\n // Conflict\n 425,\n // Too Early (Experimental)\n 429,\n // Too Many Requests\n 500,\n // Internal Server Error\n 502,\n // Bad Gateway\n 503,\n // Service Unavailable\n 504\n // Gateway Timeout\n]);\nconst nullBodyResponses = /* @__PURE__ */ new Set([101, 204, 205, 304]);\nfunction createFetch(globalOptions = {}) {\n const {\n fetch = globalThis.fetch,\n Headers = globalThis.Headers,\n AbortController = globalThis.AbortController\n } = globalOptions;\n async function onError(context) {\n const isAbort = context.error && context.error.name === \"AbortError\" && !context.options.timeout || false;\n if (context.options.retry !== false && !isAbort) {\n let retries;\n if (typeof context.options.retry === \"number\") {\n retries = context.options.retry;\n } else {\n retries = isPayloadMethod(context.options.method) ? 0 : 1;\n }\n const responseCode = context.response && context.response.status || 500;\n if (retries > 0 && (Array.isArray(context.options.retryStatusCodes) ? context.options.retryStatusCodes.includes(responseCode) : retryStatusCodes.has(responseCode))) {\n const retryDelay = typeof context.options.retryDelay === \"function\" ? context.options.retryDelay(context) : context.options.retryDelay || 0;\n if (retryDelay > 0) {\n await new Promise((resolve) => setTimeout(resolve, retryDelay));\n }\n return $fetchRaw(context.request, {\n ...context.options,\n retry: retries - 1\n });\n }\n }\n const error = createFetchError(context);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(error, $fetchRaw);\n }\n throw error;\n }\n const $fetchRaw = async function $fetchRaw2(_request, _options = {}) {\n const context = {\n request: _request,\n options: resolveFetchOptions(\n _request,\n _options,\n globalOptions.defaults,\n Headers\n ),\n response: void 0,\n error: void 0\n };\n if (context.options.method) {\n context.options.method = context.options.method.toUpperCase();\n }\n if (context.options.onRequest) {\n await callHooks(context, context.options.onRequest);\n if (!(context.options.headers instanceof Headers)) {\n context.options.headers = new Headers(\n context.options.headers || {}\n /* compat */\n );\n }\n }\n if (typeof context.request === \"string\") {\n if (context.options.baseURL) {\n context.request = withBase(context.request, context.options.baseURL);\n }\n if (context.options.query) {\n context.request = withQuery(context.request, context.options.query);\n delete context.options.query;\n }\n if (\"query\" in context.options) {\n delete context.options.query;\n }\n if (\"params\" in context.options) {\n delete context.options.params;\n }\n }\n if (context.options.body && isPayloadMethod(context.options.method)) {\n if (isJSONSerializable(context.options.body)) {\n const contentType = context.options.headers.get(\"content-type\");\n if (typeof context.options.body !== \"string\") {\n context.options.body = contentType === \"application/x-www-form-urlencoded\" ? new URLSearchParams(\n context.options.body\n ).toString() : JSON.stringify(context.options.body);\n }\n if (!contentType) {\n context.options.headers.set(\"content-type\", \"application/json\");\n }\n if (!context.options.headers.has(\"accept\")) {\n context.options.headers.set(\"accept\", \"application/json\");\n }\n } else if (\n // ReadableStream Body\n \"pipeTo\" in context.options.body && typeof context.options.body.pipeTo === \"function\" || // Node.js Stream Body\n typeof context.options.body.pipe === \"function\"\n ) {\n if (!(\"duplex\" in context.options)) {\n context.options.duplex = \"half\";\n }\n }\n }\n let abortTimeout;\n if (!context.options.signal && context.options.timeout) {\n const controller = new AbortController();\n abortTimeout = setTimeout(() => {\n const error = new Error(\n \"[TimeoutError]: The operation was aborted due to timeout\"\n );\n error.name = \"TimeoutError\";\n error.code = 23;\n controller.abort(error);\n }, context.options.timeout);\n context.options.signal = controller.signal;\n }\n try {\n context.response = await fetch(\n context.request,\n context.options\n );\n } catch (error) {\n context.error = error;\n if (context.options.onRequestError) {\n await callHooks(\n context,\n context.options.onRequestError\n );\n }\n return await onError(context);\n } finally {\n if (abortTimeout) {\n clearTimeout(abortTimeout);\n }\n }\n const hasBody = (context.response.body || // https://github.com/unjs/ofetch/issues/324\n // https://github.com/unjs/ofetch/issues/294\n // https://github.com/JakeChampion/fetch/issues/1454\n context.response._bodyInit) && !nullBodyResponses.has(context.response.status) && context.options.method !== \"HEAD\";\n if (hasBody) {\n const responseType = (context.options.parseResponse ? \"json\" : context.options.responseType) || detectResponseType(context.response.headers.get(\"content-type\") || \"\");\n switch (responseType) {\n case \"json\": {\n const data = await context.response.text();\n const parseFunction = context.options.parseResponse || destr;\n context.response._data = parseFunction(data);\n break;\n }\n case \"stream\": {\n context.response._data = context.response.body || context.response._bodyInit;\n break;\n }\n default: {\n context.response._data = await context.response[responseType]();\n }\n }\n }\n if (context.options.onResponse) {\n await callHooks(\n context,\n context.options.onResponse\n );\n }\n if (!context.options.ignoreResponseError && context.response.status >= 400 && context.response.status < 600) {\n if (context.options.onResponseError) {\n await callHooks(\n context,\n context.options.onResponseError\n );\n }\n return await onError(context);\n }\n return context.response;\n };\n const $fetch = async function $fetch2(request, options) {\n const r = await $fetchRaw(request, options);\n return r._data;\n };\n $fetch.raw = $fetchRaw;\n $fetch.native = (...args) => fetch(...args);\n $fetch.create = (defaultOptions = {}, customGlobalOptions = {}) => createFetch({\n ...globalOptions,\n ...customGlobalOptions,\n defaults: {\n ...globalOptions.defaults,\n ...customGlobalOptions.defaults,\n ...defaultOptions\n }\n });\n return $fetch;\n}\n\nexport { FetchError as F, createFetchError as a, createFetch as c };\n","import http from 'node:http';\nimport https from 'node:https';\nimport nodeFetch, { AbortController as AbortController$1, Headers as Headers$1 } from 'node-fetch-native';\nimport { c as createFetch } from './shared/ofetch.CWycOUEr.mjs';\nexport { F as FetchError, a as createFetchError } from './shared/ofetch.CWycOUEr.mjs';\nimport 'destr';\nimport 'ufo';\n\nfunction createNodeFetch() {\n const useKeepAlive = JSON.parse(process.env.FETCH_KEEP_ALIVE || \"false\");\n if (!useKeepAlive) {\n return nodeFetch;\n }\n const agentOptions = { keepAlive: true };\n const httpAgent = new http.Agent(agentOptions);\n const httpsAgent = new https.Agent(agentOptions);\n const nodeFetchOptions = {\n agent(parsedURL) {\n return parsedURL.protocol === \"http:\" ? httpAgent : httpsAgent;\n }\n };\n return function nodeFetchWithKeepAlive(input, init) {\n return nodeFetch(input, { ...nodeFetchOptions, ...init });\n };\n}\nconst fetch = globalThis.fetch ? (...args) => globalThis.fetch(...args) : createNodeFetch();\nconst Headers = globalThis.Headers || Headers$1;\nconst AbortController = globalThis.AbortController || AbortController$1;\nconst ofetch = createFetch({ fetch, Headers, AbortController });\nconst $fetch = ofetch;\n\nexport { $fetch, AbortController, Headers, createFetch, createNodeFetch, fetch, ofetch };\n"],"x_google_ignoreList":[0,1,2],"mappings":";;;;;;;;;;;;;;AAA4c,MAAM,IAAE,CAAC,CAAC,WAAW,SAAS,KAAK,kBAAiB,IAAE,CAAC,KAAG,WAAW,SAAOA,IAAE,IAAE,CAAC,KAAG,WAAW,QAAMC,IAAE,IAAE,CAAC,KAAG,WAAW,QAAMC,IAAE,IAAE,CAAC,KAAG,WAAW,YAAUC,IAAE,IAAE,CAAC,KAAG,WAAW,WAASC,IAAE,IAAE,CAAC,KAAG,WAAW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AkB,GAAG;GAAM,CAAC;;;AAG7D,MAAM,QAAQ,WAAW,SAAS,GAAG,SAAS,WAAW,MAAM,GAAG,KAAK,GAAG,iBAAiB;AAC3F,MAAM,UAAU,WAAW,WAAWC;AACtC,MAAM,kBAAkB,WAAW,mBAAmBC;AACtD,MAAM,SAAS,YAAY;CAAE;CAAO;CAAS;CAAiB,CAAC;AAC/D,MAAM,SAAS"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { t as TOCOptions } from "./toc-BrayIFG6.cjs";
|
|
2
|
+
import { Config } from "automd";
|
|
3
|
+
import { UserConfig } from "powerlines/types/config";
|
|
4
|
+
import { PluginContext } from "powerlines/types/context";
|
|
5
|
+
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
6
|
+
|
|
7
|
+
//#region src/types/plugin.d.ts
|
|
8
|
+
type AutoMDPluginOptions = Omit<Config, "dir" | "watch" | "onWatch" | "prefix"> & {
|
|
9
|
+
/**
|
|
10
|
+
* Path to the AutoMD configuration file.
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* If not provided, the plugin will use the default AutoMD configuration resolution mechanism.
|
|
14
|
+
*/
|
|
15
|
+
configFile?: string;
|
|
16
|
+
/**
|
|
17
|
+
* An indicator specifying whether or not issues found by AutoMD during the prepare task are considered fatal.
|
|
18
|
+
*
|
|
19
|
+
* @defaultValue true
|
|
20
|
+
*/
|
|
21
|
+
allowIssues?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Alternate prefix strings to use for finding generators
|
|
24
|
+
*
|
|
25
|
+
* @remarks
|
|
26
|
+
* By default, AutoMD looks for generators with the "automd" prefix, so that any `<!-- automd:generator [...args] --> ... <!-- /automd -->` comments will be picked up. If you want to use different prefixes (for example, to avoid conflicts with other tools), you would provide a value like "myPrefix" and AutoMD would also look for `<!-- myPrefix:generator [...args] --> ... <!-- /myPrefix -->` comments.
|
|
27
|
+
*
|
|
28
|
+
* @defaultValue ["automd", "powerlines", "\{framework\}"]
|
|
29
|
+
*/
|
|
30
|
+
prefix?: string | string[];
|
|
31
|
+
/**
|
|
32
|
+
* Table of Contents generator options
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
* If set to `false`, the built-in Table of Contents generator will be disabled.
|
|
36
|
+
*/
|
|
37
|
+
toc?: false | TOCOptions;
|
|
38
|
+
};
|
|
39
|
+
type AutoMDPluginUserConfig = UserConfig & {
|
|
40
|
+
automd?: Config & Pick<AutoMDPluginOptions, "configFile" | "allowIssues" | "toc">;
|
|
41
|
+
};
|
|
42
|
+
type AutoMDPluginResolvedConfig = ResolvedConfig & {
|
|
43
|
+
automd: Config & Pick<AutoMDPluginOptions, "configFile" | "allowIssues" | "toc">;
|
|
44
|
+
};
|
|
45
|
+
type AutoMDPluginContext<TResolvedConfig extends AutoMDPluginResolvedConfig = AutoMDPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
46
|
+
declare type __ΩAutoMDPluginOptions = any[];
|
|
47
|
+
declare type __ΩAutoMDPluginUserConfig = any[];
|
|
48
|
+
declare type __ΩAutoMDPluginResolvedConfig = any[];
|
|
49
|
+
declare type __ΩAutoMDPluginContext = any[];
|
|
50
|
+
//#endregion
|
|
51
|
+
export { __ΩAutoMDPluginContext as a, __ΩAutoMDPluginUserConfig as c, AutoMDPluginUserConfig as i, AutoMDPluginOptions as n, __ΩAutoMDPluginOptions as o, AutoMDPluginResolvedConfig as r, __ΩAutoMDPluginResolvedConfig as s, AutoMDPluginContext as t };
|
|
52
|
+
//# sourceMappingURL=plugin-BVD0UMjp.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-BVD0UMjp.d.cts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;KAwBY,mBAAA,GAAsB,KAChC;;AADF;;;;;EAsCY,UAAA,CAAA,EAAA,MAAA;EAAyB;;;;;EAKzB,WAAA,CAAA,EAAA,OAAA;EAA6B;;;;;AAKzC;;;EAGkB,MAAA,CAAA,EAAA,MAAA,GAAA,MAAA,EAAA;EAAd;;;;;;gBAhBY;;KAGJ,sBAAA,GAAyB;WAC1B,SACP,KAAK;;KAGG,0BAAA,GAA6B;UAC/B,SACN,KAAK;;KAGG,4CACc,6BACtB,8BACA,cAAc"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { t as TOCOptions } from "./toc-BN2Ji9Yo.mjs";
|
|
2
|
+
import { Config } from "automd";
|
|
3
|
+
import { UserConfig } from "powerlines/types/config";
|
|
4
|
+
import { PluginContext } from "powerlines/types/context";
|
|
5
|
+
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
6
|
+
|
|
7
|
+
//#region src/types/plugin.d.ts
|
|
8
|
+
type AutoMDPluginOptions = Omit<Config, "dir" | "watch" | "onWatch" | "prefix"> & {
|
|
9
|
+
/**
|
|
10
|
+
* Path to the AutoMD configuration file.
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* If not provided, the plugin will use the default AutoMD configuration resolution mechanism.
|
|
14
|
+
*/
|
|
15
|
+
configFile?: string;
|
|
16
|
+
/**
|
|
17
|
+
* An indicator specifying whether or not issues found by AutoMD during the prepare task are considered fatal.
|
|
18
|
+
*
|
|
19
|
+
* @defaultValue true
|
|
20
|
+
*/
|
|
21
|
+
allowIssues?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Alternate prefix strings to use for finding generators
|
|
24
|
+
*
|
|
25
|
+
* @remarks
|
|
26
|
+
* By default, AutoMD looks for generators with the "automd" prefix, so that any `<!-- automd:generator [...args] --> ... <!-- /automd -->` comments will be picked up. If you want to use different prefixes (for example, to avoid conflicts with other tools), you would provide a value like "myPrefix" and AutoMD would also look for `<!-- myPrefix:generator [...args] --> ... <!-- /myPrefix -->` comments.
|
|
27
|
+
*
|
|
28
|
+
* @defaultValue ["automd", "powerlines", "\{framework\}"]
|
|
29
|
+
*/
|
|
30
|
+
prefix?: string | string[];
|
|
31
|
+
/**
|
|
32
|
+
* Table of Contents generator options
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
* If set to `false`, the built-in Table of Contents generator will be disabled.
|
|
36
|
+
*/
|
|
37
|
+
toc?: false | TOCOptions;
|
|
38
|
+
};
|
|
39
|
+
type AutoMDPluginUserConfig = UserConfig & {
|
|
40
|
+
automd?: Config & Pick<AutoMDPluginOptions, "configFile" | "allowIssues" | "toc">;
|
|
41
|
+
};
|
|
42
|
+
type AutoMDPluginResolvedConfig = ResolvedConfig & {
|
|
43
|
+
automd: Config & Pick<AutoMDPluginOptions, "configFile" | "allowIssues" | "toc">;
|
|
44
|
+
};
|
|
45
|
+
type AutoMDPluginContext<TResolvedConfig extends AutoMDPluginResolvedConfig = AutoMDPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
46
|
+
declare type __ΩAutoMDPluginOptions = any[];
|
|
47
|
+
declare type __ΩAutoMDPluginUserConfig = any[];
|
|
48
|
+
declare type __ΩAutoMDPluginResolvedConfig = any[];
|
|
49
|
+
declare type __ΩAutoMDPluginContext = any[];
|
|
50
|
+
//#endregion
|
|
51
|
+
export { __ΩAutoMDPluginContext as a, __ΩAutoMDPluginUserConfig as c, AutoMDPluginUserConfig as i, AutoMDPluginOptions as n, __ΩAutoMDPluginOptions as o, AutoMDPluginResolvedConfig as r, __ΩAutoMDPluginResolvedConfig as s, AutoMDPluginContext as t };
|
|
52
|
+
//# sourceMappingURL=plugin-C6jB5e_j.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-C6jB5e_j.d.mts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;KAwBY,mBAAA,GAAsB,KAChC;;AADF;;;;;EAsCY,UAAA,CAAA,EAAA,MAAA;EAAyB;;;;;EAKzB,WAAA,CAAA,EAAA,OAAA;EAA6B;;;;;AAKzC;;;EAGkB,MAAA,CAAA,EAAA,MAAA,GAAA,MAAA,EAAA;EAAd;;;;;;gBAhBY;;KAGJ,sBAAA,GAAyB;WAC1B,SACP,KAAK;;KAGG,0BAAA,GAA6B;UAC/B,SACN,KAAK;;KAGG,4CACc,6BACtB,8BACA,cAAc"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
//#region src/types/toc.d.ts
|
|
2
|
+
interface TOCOptions {
|
|
3
|
+
/**
|
|
4
|
+
* A slugify function to generate slugs for the headings.
|
|
5
|
+
*/
|
|
6
|
+
slugify?: (str: string) => string;
|
|
7
|
+
/**
|
|
8
|
+
* The maximum depth of headings to include in the TOC.
|
|
9
|
+
*
|
|
10
|
+
* @defaultValue 6
|
|
11
|
+
*/
|
|
12
|
+
maxDepth?: number;
|
|
13
|
+
/**
|
|
14
|
+
* Whether to include the first H1 heading in the TOC.
|
|
15
|
+
*/
|
|
16
|
+
firstH1?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* The bullet character to use for list items in the TOC.
|
|
19
|
+
*
|
|
20
|
+
* @defaultValue "-"
|
|
21
|
+
*/
|
|
22
|
+
bullets?: string;
|
|
23
|
+
/**
|
|
24
|
+
* A prefix to add to each heading in the TOC.
|
|
25
|
+
*/
|
|
26
|
+
prefix?: string;
|
|
27
|
+
/**
|
|
28
|
+
* A filter function to determine which headings to include in the TOC.
|
|
29
|
+
*/
|
|
30
|
+
filter?: (str: string, level: number) => boolean;
|
|
31
|
+
}
|
|
32
|
+
declare type __ΩTOCOptions = any[];
|
|
33
|
+
//#endregion
|
|
34
|
+
export { __ΩTOCOptions as n, TOCOptions as t };
|
|
35
|
+
//# sourceMappingURL=toc-BN2Ji9Yo.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toc-BN2Ji9Yo.d.mts","names":[],"sources":["../src/types/toc.ts"],"sourcesContent":[],"mappings":";UAkBiB,UAAA;EAAA"}
|
|
File without changes
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
//#region src/types/toc.d.ts
|
|
2
|
+
interface TOCOptions {
|
|
3
|
+
/**
|
|
4
|
+
* A slugify function to generate slugs for the headings.
|
|
5
|
+
*/
|
|
6
|
+
slugify?: (str: string) => string;
|
|
7
|
+
/**
|
|
8
|
+
* The maximum depth of headings to include in the TOC.
|
|
9
|
+
*
|
|
10
|
+
* @defaultValue 6
|
|
11
|
+
*/
|
|
12
|
+
maxDepth?: number;
|
|
13
|
+
/**
|
|
14
|
+
* Whether to include the first H1 heading in the TOC.
|
|
15
|
+
*/
|
|
16
|
+
firstH1?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* The bullet character to use for list items in the TOC.
|
|
19
|
+
*
|
|
20
|
+
* @defaultValue "-"
|
|
21
|
+
*/
|
|
22
|
+
bullets?: string;
|
|
23
|
+
/**
|
|
24
|
+
* A prefix to add to each heading in the TOC.
|
|
25
|
+
*/
|
|
26
|
+
prefix?: string;
|
|
27
|
+
/**
|
|
28
|
+
* A filter function to determine which headings to include in the TOC.
|
|
29
|
+
*/
|
|
30
|
+
filter?: (str: string, level: number) => boolean;
|
|
31
|
+
}
|
|
32
|
+
declare type __ΩTOCOptions = any[];
|
|
33
|
+
//#endregion
|
|
34
|
+
export { __ΩTOCOptions as n, TOCOptions as t };
|
|
35
|
+
//# sourceMappingURL=toc-BrayIFG6.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toc-BrayIFG6.d.cts","names":[],"sources":["../src/types/toc.ts"],"sourcesContent":[],"mappings":";UAkBiB,UAAA;EAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/types/index.cjs
CHANGED
package/dist/types/index.d.cts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AutoMDPluginContext,
|
|
1
|
+
import { n as __ΩTOCOptions, t as TOCOptions } from "../toc-BrayIFG6.cjs";
|
|
2
|
+
import { a as __ΩAutoMDPluginContext, c as __ΩAutoMDPluginUserConfig, i as AutoMDPluginUserConfig, n as AutoMDPluginOptions, o as __ΩAutoMDPluginOptions, r as AutoMDPluginResolvedConfig, s as __ΩAutoMDPluginResolvedConfig, t as AutoMDPluginContext } from "../plugin-BVD0UMjp.cjs";
|
|
3
|
+
import "../index-CmCelmEL.cjs";
|
|
3
4
|
export { AutoMDPluginContext, AutoMDPluginOptions, AutoMDPluginResolvedConfig, AutoMDPluginUserConfig, TOCOptions, __ΩAutoMDPluginContext, __ΩAutoMDPluginOptions, __ΩAutoMDPluginResolvedConfig, __ΩAutoMDPluginUserConfig, __ΩTOCOptions };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AutoMDPluginContext,
|
|
1
|
+
import { n as __ΩTOCOptions, t as TOCOptions } from "../toc-BN2Ji9Yo.mjs";
|
|
2
|
+
import { a as __ΩAutoMDPluginContext, c as __ΩAutoMDPluginUserConfig, i as AutoMDPluginUserConfig, n as AutoMDPluginOptions, o as __ΩAutoMDPluginOptions, r as AutoMDPluginResolvedConfig, s as __ΩAutoMDPluginResolvedConfig, t as AutoMDPluginContext } from "../plugin-C6jB5e_j.mjs";
|
|
3
|
+
import "../index-B8OHl-c_.mjs";
|
|
3
4
|
export { AutoMDPluginContext, AutoMDPluginOptions, AutoMDPluginResolvedConfig, AutoMDPluginUserConfig, TOCOptions, __ΩAutoMDPluginContext, __ΩAutoMDPluginOptions, __ΩAutoMDPluginResolvedConfig, __ΩAutoMDPluginUserConfig, __ΩTOCOptions };
|
package/dist/types/index.mjs
CHANGED
package/dist/types/plugin.cjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require('../plugin-Ckx8qAq8.cjs');
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,51 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { UserConfig } from "powerlines/types/config";
|
|
4
|
-
import { PluginContext } from "powerlines/types/context";
|
|
5
|
-
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
6
|
-
|
|
7
|
-
//#region src/types/plugin.d.ts
|
|
8
|
-
type AutoMDPluginOptions = Omit<Config, "dir" | "watch" | "onWatch" | "prefix"> & {
|
|
9
|
-
/**
|
|
10
|
-
* Path to the AutoMD configuration file.
|
|
11
|
-
*
|
|
12
|
-
* @remarks
|
|
13
|
-
* If not provided, the plugin will use the default AutoMD configuration resolution mechanism.
|
|
14
|
-
*/
|
|
15
|
-
configFile?: string;
|
|
16
|
-
/**
|
|
17
|
-
* An indicator specifying whether or not issues found by AutoMD during the prepare task are considered fatal.
|
|
18
|
-
*
|
|
19
|
-
* @defaultValue true
|
|
20
|
-
*/
|
|
21
|
-
allowIssues?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Alternate prefix strings to use for finding generators
|
|
24
|
-
*
|
|
25
|
-
* @remarks
|
|
26
|
-
* By default, AutoMD looks for generators with the "automd" prefix, so that any `<!-- automd:generator [...args] --> ... <!-- /automd -->` comments will be picked up. If you want to use different prefixes (for example, to avoid conflicts with other tools), you would provide a value like "myPrefix" and AutoMD would also look for `<!-- myPrefix:generator [...args] --> ... <!-- /myPrefix -->` comments.
|
|
27
|
-
*
|
|
28
|
-
* @defaultValue ["automd", "powerlines", "\{framework\}"]
|
|
29
|
-
*/
|
|
30
|
-
prefix?: string | string[];
|
|
31
|
-
/**
|
|
32
|
-
* Table of Contents generator options
|
|
33
|
-
*
|
|
34
|
-
* @remarks
|
|
35
|
-
* If set to `false`, the built-in Table of Contents generator will be disabled.
|
|
36
|
-
*/
|
|
37
|
-
toc?: false | TOCOptions;
|
|
38
|
-
};
|
|
39
|
-
type AutoMDPluginUserConfig = UserConfig & {
|
|
40
|
-
automd?: Config & Pick<AutoMDPluginOptions, "configFile" | "allowIssues" | "toc">;
|
|
41
|
-
};
|
|
42
|
-
type AutoMDPluginResolvedConfig = ResolvedConfig & {
|
|
43
|
-
automd: Config & Pick<AutoMDPluginOptions, "configFile" | "allowIssues" | "toc">;
|
|
44
|
-
};
|
|
45
|
-
type AutoMDPluginContext<TResolvedConfig extends AutoMDPluginResolvedConfig = AutoMDPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
46
|
-
declare type __ΩAutoMDPluginOptions = any[];
|
|
47
|
-
declare type __ΩAutoMDPluginUserConfig = any[];
|
|
48
|
-
declare type __ΩAutoMDPluginResolvedConfig = any[];
|
|
49
|
-
declare type __ΩAutoMDPluginContext = any[];
|
|
50
|
-
//#endregion
|
|
1
|
+
import "../toc-BrayIFG6.cjs";
|
|
2
|
+
import { a as __ΩAutoMDPluginContext, c as __ΩAutoMDPluginUserConfig, i as AutoMDPluginUserConfig, n as AutoMDPluginOptions, o as __ΩAutoMDPluginOptions, r as AutoMDPluginResolvedConfig, s as __ΩAutoMDPluginResolvedConfig, t as AutoMDPluginContext } from "../plugin-BVD0UMjp.cjs";
|
|
51
3
|
export { AutoMDPluginContext, AutoMDPluginOptions, AutoMDPluginResolvedConfig, AutoMDPluginUserConfig, __ΩAutoMDPluginContext, __ΩAutoMDPluginOptions, __ΩAutoMDPluginResolvedConfig, __ΩAutoMDPluginUserConfig };
|