@powerlines/plugin-automd 0.1.253 → 0.1.255
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 → _virtual/rolldown_runtime.cjs} +2 -12
- package/dist/{chunk-CS8OKu3y.mjs → _virtual/rolldown_runtime.mjs} +1 -1
- package/dist/index.cjs +7 -9656
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +2 -9646
- package/dist/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.cjs +78 -0
- package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +78 -0
- package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +1 -0
- package/dist/node_modules/.pnpm/acorn@8.15.0/node_modules/acorn/dist/acorn.cjs +5032 -0
- package/dist/node_modules/.pnpm/acorn@8.15.0/node_modules/acorn/dist/acorn.mjs +5032 -0
- package/dist/node_modules/.pnpm/acorn@8.15.0/node_modules/acorn/dist/acorn.mjs.map +1 -0
- package/dist/node_modules/.pnpm/automd@0.4.3_patch_hash_0fe864a2d6fa1461e144747e5f0fbc0a5fb51435ec6b3217ffb18ff2d7058778_magicast@0.5.1/node_modules/automd/dist/index.cjs +650 -0
- package/dist/node_modules/.pnpm/automd@0.4.3_patch_hash_0fe864a2d6fa1461e144747e5f0fbc0a5fb51435ec6b3217ffb18ff2d7058778_magicast@0.5.1/node_modules/automd/dist/index.mjs +648 -0
- package/dist/node_modules/.pnpm/automd@0.4.3_patch_hash_0fe864a2d6fa1461e144747e5f0fbc0a5fb51435ec6b3217ffb18ff2d7058778_magicast@0.5.1/node_modules/automd/dist/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DA7CpUDY.cjs +23 -0
- package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DA7CpUDY.mjs +23 -0
- package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DA7CpUDY.mjs.map +1 -0
- package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DnMsyigM.cjs +405 -0
- package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DnMsyigM.mjs +405 -0
- package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DnMsyigM.mjs.map +1 -0
- package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.cjs +46 -0
- package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs +46 -0
- package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/didyoumean2@7.0.4/node_modules/didyoumean2/dist/index.cjs +204 -0
- package/dist/node_modules/.pnpm/didyoumean2@7.0.4/node_modules/didyoumean2/dist/index.mjs +203 -0
- package/dist/node_modules/.pnpm/didyoumean2@7.0.4/node_modules/didyoumean2/dist/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.cjs +1013 -0
- package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs +1008 -0
- package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/fastest-levenshtein@1.0.16/node_modules/fastest-levenshtein/mod.cjs +128 -0
- package/dist/node_modules/.pnpm/fastest-levenshtein@1.0.16/node_modules/fastest-levenshtein/mod.mjs +124 -0
- package/dist/node_modules/.pnpm/fastest-levenshtein@1.0.16/node_modules/fastest-levenshtein/mod.mjs.map +1 -0
- package/dist/{loader-DNEbMIIe.cjs → node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/dist/babel.cjs} +41337 -58245
- package/dist/{loader-BRhKFmUn.mjs → node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/dist/babel.mjs} +41334 -58245
- package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/dist/babel.mjs.map +1 -0
- package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/dist/jiti.cjs +4387 -0
- package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/dist/jiti.mjs +4385 -0
- package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/dist/jiti.mjs.map +1 -0
- package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/lib/jiti.cjs +26 -0
- package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/lib/jiti.mjs +27 -0
- package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/lib/jiti.mjs.map +1 -0
- package/dist/node_modules/.pnpm/lodash.deburr@4.1.0/node_modules/lodash.deburr/index.cjs +370 -0
- package/dist/node_modules/.pnpm/lodash.deburr@4.1.0/node_modules/lodash.deburr/index.mjs +368 -0
- package/dist/node_modules/.pnpm/lodash.deburr@4.1.0/node_modules/lodash.deburr/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.cjs +939 -0
- package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.mjs +940 -0
- package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mdbox@0.1.1/node_modules/mdbox/dist/index.cjs +67 -0
- package/dist/node_modules/.pnpm/mdbox@0.1.1/node_modules/mdbox/dist/index.mjs +65 -0
- package/dist/node_modules/.pnpm/mdbox@0.1.1/node_modules/mdbox/dist/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mlly@1.8.0/node_modules/mlly/dist/index.cjs +1292 -0
- package/dist/node_modules/.pnpm/mlly@1.8.0/node_modules/mlly/dist/index.mjs +1285 -0
- package/dist/node_modules/.pnpm/mlly@1.8.0/node_modules/mlly/dist/index.mjs.map +1 -0
- package/dist/{multipart-parser-C_EjwsED.cjs → node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.cjs} +2 -1
- package/dist/{multipart-parser-Dtmz_axo.mjs → node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs} +3 -2
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs.map +1 -0
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.cjs +20 -0
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs +17 -0
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs.map +1 -0
- package/dist/{node-DapIDpAC.cjs → node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.cjs} +808 -857
- package/dist/{node-FGT1CWpL.mjs → node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs} +794 -806
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs.map +1 -0
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DfbY2q-x.cjs +16 -0
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DfbY2q-x.mjs +15 -0
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DfbY2q-x.mjs.map +1 -0
- package/dist/node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.cjs +36 -0
- package/dist/node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.mjs +34 -0
- package/dist/node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.mjs.map +1 -0
- package/dist/{node-CsMhpAoX.cjs → node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.cjs} +24 -66
- package/dist/{node-D8lz5B3d.mjs → node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs} +20 -59
- package/dist/node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs.map +1 -0
- package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.cjs +139 -0
- package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs +134 -0
- package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs.map +1 -0
- package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.cjs +77 -0
- package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs +77 -0
- package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs.map +1 -0
- package/dist/{dist-PRh64A_O.mjs → node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.cjs} +4 -2
- package/dist/{dist-DVv98dZY.cjs → node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.mjs} +2 -19
- package/dist/node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.mjs.map +1 -0
- package/dist/{dist-Jfd0GR_C.mjs → node_modules/.pnpm/ufo@1.6.3/node_modules/ufo/dist/index.cjs} +4 -46
- package/dist/{dist-8g8frrZv.cjs → node_modules/.pnpm/ufo@1.6.3/node_modules/ufo/dist/index.mjs} +2 -69
- package/dist/node_modules/.pnpm/ufo@1.6.3/node_modules/ufo/dist/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/loader/babel.cjs +12337 -0
- package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/loader/babel.mjs +12338 -0
- package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/loader/babel.mjs.map +1 -0
- package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/loader/loader.cjs +19 -0
- package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/loader/loader.mjs +19 -0
- package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/loader/loader.mjs.map +1 -0
- package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.BTwOq8Jl.cjs +71 -0
- package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.BTwOq8Jl.mjs +72 -0
- package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.BTwOq8Jl.mjs.map +1 -0
- package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.Br_uXjZG.cjs +110 -0
- package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.Br_uXjZG.mjs +101 -0
- package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.Br_uXjZG.mjs.map +1 -0
- package/dist/types/index.cjs +0 -3
- package/dist/types/index.d.cts +2 -3
- package/dist/types/index.d.mts +2 -3
- package/dist/types/index.mjs +0 -4
- package/dist/types/plugin.cjs +0 -1
- package/dist/types/plugin.d.cts +52 -3
- package/dist/types/plugin.d.cts.map +1 -0
- package/dist/types/plugin.d.mts +52 -3
- package/dist/types/plugin.d.mts.map +1 -0
- package/dist/types/plugin.mjs +0 -2
- package/dist/types/toc.cjs +0 -1
- package/dist/types/toc.d.cts +35 -2
- package/dist/types/toc.d.cts.map +1 -0
- package/dist/types/toc.d.mts +35 -2
- package/dist/types/toc.d.mts.map +1 -0
- package/dist/types/toc.mjs +0 -2
- package/package.json +4 -4
- package/dist/dist-BavrV299.cjs +0 -682
- package/dist/dist-Jfd0GR_C.mjs.map +0 -1
- package/dist/dist-PRh64A_O.mjs.map +0 -1
- package/dist/dist-PXnBmevt.mjs +0 -681
- package/dist/dist-PXnBmevt.mjs.map +0 -1
- package/dist/index-B8OHl-c_.d.mts +0 -1
- package/dist/index-CmCelmEL.d.cts +0 -1
- package/dist/loader-BRhKFmUn.mjs.map +0 -1
- package/dist/multipart-parser-Dtmz_axo.mjs.map +0 -1
- package/dist/node-D8lz5B3d.mjs.map +0 -1
- package/dist/node-FGT1CWpL.mjs.map +0 -1
- package/dist/plugin-BVD0UMjp.d.cts +0 -52
- package/dist/plugin-BVD0UMjp.d.cts.map +0 -1
- package/dist/plugin-C6jB5e_j.d.mts +0 -52
- package/dist/plugin-C6jB5e_j.d.mts.map +0 -1
- package/dist/plugin-Ckx8qAq8.cjs +0 -0
- package/dist/plugin-jZ9N9Mz-.mjs +0 -1
- package/dist/toc-BN2Ji9Yo.d.mts +0 -35
- package/dist/toc-BN2Ji9Yo.d.mts.map +0 -1
- package/dist/toc-BQgoCyR1.cjs +0 -0
- package/dist/toc-BrayIFG6.d.cts +0 -35
- package/dist/toc-BrayIFG6.d.cts.map +0 -1
- package/dist/toc-CBjybXug.mjs +0 -1
- package/dist/types--fVOUYBq.mjs +0 -1
- package/dist/types-D208vOSb.cjs +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../../../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_jiti = require('../../../../../jiti@2.4.2/node_modules/jiti/lib/jiti.cjs');
|
|
3
|
+
const require_untyped_BTwOq8Jl = require('../shared/untyped.BTwOq8Jl.cjs');
|
|
4
|
+
const require_babel = require('./babel.cjs');
|
|
5
|
+
let defu = require("defu");
|
|
6
|
+
|
|
7
|
+
//#region ../../node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/loader/loader.mjs
|
|
8
|
+
async function loadSchema(entryPath, options = {}) {
|
|
9
|
+
let rawSchema = await require_jiti.createJiti(options.cwd || process.cwd(), (0, defu.defu)(options.jiti, {
|
|
10
|
+
interopDefault: true,
|
|
11
|
+
transformOptions: { babel: { plugins: [[require_babel.babelPluginUntyped, { experimentalFunctions: true }]] } }
|
|
12
|
+
})).import(entryPath);
|
|
13
|
+
const rawSchemaKeys = Object.keys(rawSchema);
|
|
14
|
+
if (rawSchemaKeys.length === 1 && rawSchemaKeys[0] === "default") rawSchema = rawSchema.default;
|
|
15
|
+
return await require_untyped_BTwOq8Jl.resolveSchema(rawSchema, options.defaults, { ignoreDefaults: options.ignoreDefaults });
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
exports.loadSchema = loadSchema;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createJiti } from "../../../../../jiti@2.4.2/node_modules/jiti/lib/jiti.mjs";
|
|
2
|
+
import { resolveSchema } from "../shared/untyped.BTwOq8Jl.mjs";
|
|
3
|
+
import { babelPluginUntyped } from "./babel.mjs";
|
|
4
|
+
import { defu as defu$1 } from "defu";
|
|
5
|
+
|
|
6
|
+
//#region ../../node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/loader/loader.mjs
|
|
7
|
+
async function loadSchema(entryPath, options = {}) {
|
|
8
|
+
let rawSchema = await createJiti(options.cwd || process.cwd(), defu$1(options.jiti, {
|
|
9
|
+
interopDefault: true,
|
|
10
|
+
transformOptions: { babel: { plugins: [[babelPluginUntyped, { experimentalFunctions: true }]] } }
|
|
11
|
+
})).import(entryPath);
|
|
12
|
+
const rawSchemaKeys = Object.keys(rawSchema);
|
|
13
|
+
if (rawSchemaKeys.length === 1 && rawSchemaKeys[0] === "default") rawSchema = rawSchema.default;
|
|
14
|
+
return await resolveSchema(rawSchema, options.defaults, { ignoreDefaults: options.ignoreDefaults });
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
export { loadSchema };
|
|
19
|
+
//# sourceMappingURL=loader.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.mjs","names":["defu"],"sources":["../../../../../../../../../../node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/loader/loader.mjs"],"sourcesContent":["import { defu } from 'defu';\nimport { createJiti } from 'jiti';\nimport { r as resolveSchema } from '../shared/untyped.BTwOq8Jl.mjs';\nimport babelPluginUntyped from './babel.mjs';\nimport '../shared/untyped.Br_uXjZG.mjs';\nimport 'scule';\n\nasync function loadSchema(entryPath, options = {}) {\n const jiti = createJiti(\n options.cwd || process.cwd(),\n defu(options.jiti, {\n interopDefault: true,\n transformOptions: {\n babel: {\n plugins: [[babelPluginUntyped, { experimentalFunctions: true }]]\n }\n }\n })\n );\n let rawSchema = await jiti.import(entryPath);\n const rawSchemaKeys = Object.keys(rawSchema);\n if (rawSchemaKeys.length === 1 && rawSchemaKeys[0] === \"default\") {\n rawSchema = rawSchema.default;\n }\n const schema = await resolveSchema(rawSchema, options.defaults, {\n ignoreDefaults: options.ignoreDefaults\n });\n return schema;\n}\n\nexport { loadSchema };\n"],"x_google_ignoreList":[0],"mappings":";;;;;;AAOA,eAAe,WAAW,WAAW,UAAU,EAAE,EAAE;CAYjD,IAAI,YAAY,MAXH,WACX,QAAQ,OAAO,QAAQ,KAAK,EAC5BA,OAAK,QAAQ,MAAM;EACjB,gBAAgB;EAChB,kBAAkB,EAChB,OAAO,EACL,SAAS,CAAC,CAAC,oBAAoB,EAAE,uBAAuB,MAAM,CAAC,CAAC,EACjE,EACF;EACF,CAAC,CACH,CAC0B,OAAO,UAAU;CAC5C,MAAM,gBAAgB,OAAO,KAAK,UAAU;AAC5C,KAAI,cAAc,WAAW,KAAK,cAAc,OAAO,UACrD,aAAY,UAAU;AAKxB,QAHe,MAAM,cAAc,WAAW,QAAQ,UAAU,EAC9D,gBAAgB,QAAQ,gBACzB,CAAC"}
|
package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.BTwOq8Jl.cjs
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
const require_untyped_Br_uXjZG = require('./untyped.Br_uXjZG.cjs');
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.BTwOq8Jl.mjs
|
|
4
|
+
async function resolveSchema(obj, defaults, options = {}) {
|
|
5
|
+
return await _resolveSchema(obj, "", {
|
|
6
|
+
root: obj,
|
|
7
|
+
defaults,
|
|
8
|
+
resolveCache: {},
|
|
9
|
+
ignoreDefaults: !!options.ignoreDefaults
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
async function _resolveSchema(input, id, ctx) {
|
|
13
|
+
if (id in ctx.resolveCache) return ctx.resolveCache[id];
|
|
14
|
+
const schemaId = "#" + id.replace(/\./g, "/");
|
|
15
|
+
if (!require_untyped_Br_uXjZG.isObject(input)) {
|
|
16
|
+
const safeInput = Array.isArray(input) ? [...input] : input;
|
|
17
|
+
const schema2 = {
|
|
18
|
+
type: require_untyped_Br_uXjZG.getType(input),
|
|
19
|
+
id: schemaId,
|
|
20
|
+
default: ctx.ignoreDefaults ? void 0 : safeInput
|
|
21
|
+
};
|
|
22
|
+
normalizeSchema(schema2, { ignoreDefaults: ctx.ignoreDefaults });
|
|
23
|
+
ctx.resolveCache[id] = schema2;
|
|
24
|
+
if (ctx.defaults && require_untyped_Br_uXjZG.getValue(ctx.defaults, id) === void 0) require_untyped_Br_uXjZG.setValue(ctx.defaults, id, schema2.default);
|
|
25
|
+
return schema2;
|
|
26
|
+
}
|
|
27
|
+
const node = { ...input };
|
|
28
|
+
const schema = ctx.resolveCache[id] = {
|
|
29
|
+
...node.$schema,
|
|
30
|
+
id: schemaId
|
|
31
|
+
};
|
|
32
|
+
for (const key in node) {
|
|
33
|
+
if (key === "$resolve" || key === "$schema" || key === "$default") continue;
|
|
34
|
+
schema.properties = schema.properties || {};
|
|
35
|
+
if (!schema.properties[key]) {
|
|
36
|
+
const child = schema.properties[key] = await _resolveSchema(node[key], require_untyped_Br_uXjZG.joinPath(id, key), ctx);
|
|
37
|
+
if (Array.isArray(child.tags) && child.tags.includes("@required")) {
|
|
38
|
+
schema.required = schema.required || [];
|
|
39
|
+
if (!schema.required.includes(key)) schema.required.push(key);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
if (!ctx.ignoreDefaults) {
|
|
44
|
+
if (ctx.defaults) schema.default = require_untyped_Br_uXjZG.getValue(ctx.defaults, id);
|
|
45
|
+
if (schema.default === void 0 && "$default" in node) schema.default = node.$default;
|
|
46
|
+
if (typeof node.$resolve === "function") schema.default = await node.$resolve(schema.default, async (key) => {
|
|
47
|
+
return (await _resolveSchema(require_untyped_Br_uXjZG.getValue(ctx.root, key), key, ctx)).default;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
if (ctx.defaults) require_untyped_Br_uXjZG.setValue(ctx.defaults, id, schema.default);
|
|
51
|
+
if (!schema.type) schema.type = require_untyped_Br_uXjZG.getType(schema.default) || (schema.properties ? "object" : "any");
|
|
52
|
+
normalizeSchema(schema, { ignoreDefaults: ctx.ignoreDefaults });
|
|
53
|
+
if (ctx.defaults && require_untyped_Br_uXjZG.getValue(ctx.defaults, id) === void 0) require_untyped_Br_uXjZG.setValue(ctx.defaults, id, schema.default);
|
|
54
|
+
return schema;
|
|
55
|
+
}
|
|
56
|
+
function normalizeSchema(schema, options) {
|
|
57
|
+
if (schema.type === "array" && !("items" in schema)) {
|
|
58
|
+
schema.items = { type: require_untyped_Br_uXjZG.nonEmpty(require_untyped_Br_uXjZG.unique(schema.default.map((i) => require_untyped_Br_uXjZG.getType(i)))) };
|
|
59
|
+
if (schema.items.type) {
|
|
60
|
+
if (schema.items.type.length === 0) schema.items.type = "any";
|
|
61
|
+
else if (schema.items.type.length === 1) schema.items.type = schema.items.type[0];
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
if (!options.ignoreDefaults && schema.default === void 0 && ("properties" in schema || schema.type === "object" || schema.type === "any")) {
|
|
65
|
+
const propsWithDefaults = Object.entries(schema.properties || {}).filter(([, prop]) => "default" in prop).map(([key, value]) => [key, value.default]);
|
|
66
|
+
schema.default = Object.fromEntries(propsWithDefaults);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
//#endregion
|
|
71
|
+
exports.resolveSchema = resolveSchema;
|
package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.BTwOq8Jl.mjs
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { getType, getValue, isObject, joinPath, nonEmpty, setValue, unique } from "./untyped.Br_uXjZG.mjs";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.BTwOq8Jl.mjs
|
|
4
|
+
async function resolveSchema(obj, defaults, options = {}) {
|
|
5
|
+
return await _resolveSchema(obj, "", {
|
|
6
|
+
root: obj,
|
|
7
|
+
defaults,
|
|
8
|
+
resolveCache: {},
|
|
9
|
+
ignoreDefaults: !!options.ignoreDefaults
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
async function _resolveSchema(input, id, ctx) {
|
|
13
|
+
if (id in ctx.resolveCache) return ctx.resolveCache[id];
|
|
14
|
+
const schemaId = "#" + id.replace(/\./g, "/");
|
|
15
|
+
if (!isObject(input)) {
|
|
16
|
+
const safeInput = Array.isArray(input) ? [...input] : input;
|
|
17
|
+
const schema2 = {
|
|
18
|
+
type: getType(input),
|
|
19
|
+
id: schemaId,
|
|
20
|
+
default: ctx.ignoreDefaults ? void 0 : safeInput
|
|
21
|
+
};
|
|
22
|
+
normalizeSchema(schema2, { ignoreDefaults: ctx.ignoreDefaults });
|
|
23
|
+
ctx.resolveCache[id] = schema2;
|
|
24
|
+
if (ctx.defaults && getValue(ctx.defaults, id) === void 0) setValue(ctx.defaults, id, schema2.default);
|
|
25
|
+
return schema2;
|
|
26
|
+
}
|
|
27
|
+
const node = { ...input };
|
|
28
|
+
const schema = ctx.resolveCache[id] = {
|
|
29
|
+
...node.$schema,
|
|
30
|
+
id: schemaId
|
|
31
|
+
};
|
|
32
|
+
for (const key in node) {
|
|
33
|
+
if (key === "$resolve" || key === "$schema" || key === "$default") continue;
|
|
34
|
+
schema.properties = schema.properties || {};
|
|
35
|
+
if (!schema.properties[key]) {
|
|
36
|
+
const child = schema.properties[key] = await _resolveSchema(node[key], joinPath(id, key), ctx);
|
|
37
|
+
if (Array.isArray(child.tags) && child.tags.includes("@required")) {
|
|
38
|
+
schema.required = schema.required || [];
|
|
39
|
+
if (!schema.required.includes(key)) schema.required.push(key);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
if (!ctx.ignoreDefaults) {
|
|
44
|
+
if (ctx.defaults) schema.default = getValue(ctx.defaults, id);
|
|
45
|
+
if (schema.default === void 0 && "$default" in node) schema.default = node.$default;
|
|
46
|
+
if (typeof node.$resolve === "function") schema.default = await node.$resolve(schema.default, async (key) => {
|
|
47
|
+
return (await _resolveSchema(getValue(ctx.root, key), key, ctx)).default;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
if (ctx.defaults) setValue(ctx.defaults, id, schema.default);
|
|
51
|
+
if (!schema.type) schema.type = getType(schema.default) || (schema.properties ? "object" : "any");
|
|
52
|
+
normalizeSchema(schema, { ignoreDefaults: ctx.ignoreDefaults });
|
|
53
|
+
if (ctx.defaults && getValue(ctx.defaults, id) === void 0) setValue(ctx.defaults, id, schema.default);
|
|
54
|
+
return schema;
|
|
55
|
+
}
|
|
56
|
+
function normalizeSchema(schema, options) {
|
|
57
|
+
if (schema.type === "array" && !("items" in schema)) {
|
|
58
|
+
schema.items = { type: nonEmpty(unique(schema.default.map((i) => getType(i)))) };
|
|
59
|
+
if (schema.items.type) {
|
|
60
|
+
if (schema.items.type.length === 0) schema.items.type = "any";
|
|
61
|
+
else if (schema.items.type.length === 1) schema.items.type = schema.items.type[0];
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
if (!options.ignoreDefaults && schema.default === void 0 && ("properties" in schema || schema.type === "object" || schema.type === "any")) {
|
|
65
|
+
const propsWithDefaults = Object.entries(schema.properties || {}).filter(([, prop]) => "default" in prop).map(([key, value]) => [key, value.default]);
|
|
66
|
+
schema.default = Object.fromEntries(propsWithDefaults);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
//#endregion
|
|
71
|
+
export { resolveSchema };
|
|
72
|
+
//# sourceMappingURL=untyped.BTwOq8Jl.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"untyped.BTwOq8Jl.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.BTwOq8Jl.mjs"],"sourcesContent":["import { i as isObject, g as getType, a as getValue, s as setValue, j as joinPath, b as nonEmpty, u as unique } from './untyped.Br_uXjZG.mjs';\n\nasync function resolveSchema(obj, defaults, options = {}) {\n const schema = await _resolveSchema(obj, \"\", {\n root: obj,\n defaults,\n resolveCache: {},\n ignoreDefaults: !!options.ignoreDefaults\n });\n return schema;\n}\nasync function _resolveSchema(input, id, ctx) {\n if (id in ctx.resolveCache) {\n return ctx.resolveCache[id];\n }\n const schemaId = \"#\" + id.replace(/\\./g, \"/\");\n if (!isObject(input)) {\n const safeInput = Array.isArray(input) ? [...input] : input;\n const schema2 = {\n type: getType(input),\n id: schemaId,\n default: ctx.ignoreDefaults ? void 0 : safeInput\n };\n normalizeSchema(schema2, { ignoreDefaults: ctx.ignoreDefaults });\n ctx.resolveCache[id] = schema2;\n if (ctx.defaults && getValue(ctx.defaults, id) === void 0) {\n setValue(ctx.defaults, id, schema2.default);\n }\n return schema2;\n }\n const node = { ...input };\n const schema = ctx.resolveCache[id] = {\n ...node.$schema,\n id: schemaId\n };\n for (const key in node) {\n if (key === \"$resolve\" || key === \"$schema\" || key === \"$default\") {\n continue;\n }\n schema.properties = schema.properties || {};\n if (!schema.properties[key]) {\n const child = schema.properties[key] = await _resolveSchema(\n node[key],\n joinPath(id, key),\n ctx\n );\n if (Array.isArray(child.tags) && child.tags.includes(\"@required\")) {\n schema.required = schema.required || [];\n if (!schema.required.includes(key)) {\n schema.required.push(key);\n }\n }\n }\n }\n if (!ctx.ignoreDefaults) {\n if (ctx.defaults) {\n schema.default = getValue(ctx.defaults, id);\n }\n if (schema.default === void 0 && \"$default\" in node) {\n schema.default = node.$default;\n }\n if (typeof node.$resolve === \"function\") {\n schema.default = await node.$resolve(schema.default, async (key) => {\n return (await _resolveSchema(getValue(ctx.root, key), key, ctx)).default;\n });\n }\n }\n if (ctx.defaults) {\n setValue(ctx.defaults, id, schema.default);\n }\n if (!schema.type) {\n schema.type = getType(schema.default) || (schema.properties ? \"object\" : \"any\");\n }\n normalizeSchema(schema, { ignoreDefaults: ctx.ignoreDefaults });\n if (ctx.defaults && getValue(ctx.defaults, id) === void 0) {\n setValue(ctx.defaults, id, schema.default);\n }\n return schema;\n}\nasync function applyDefaults(ref, input) {\n await resolveSchema(ref, input);\n return input;\n}\nfunction normalizeSchema(schema, options) {\n if (schema.type === \"array\" && !(\"items\" in schema)) {\n schema.items = {\n type: nonEmpty(unique(schema.default.map((i) => getType(i))))\n };\n if (schema.items.type) {\n if (schema.items.type.length === 0) {\n schema.items.type = \"any\";\n } else if (schema.items.type.length === 1) {\n schema.items.type = schema.items.type[0];\n }\n }\n }\n if (!options.ignoreDefaults && schema.default === void 0 && (\"properties\" in schema || schema.type === \"object\" || schema.type === \"any\")) {\n const propsWithDefaults = Object.entries(schema.properties || {}).filter(([, prop]) => \"default\" in prop).map(([key, value]) => [key, value.default]);\n schema.default = Object.fromEntries(propsWithDefaults);\n }\n}\n\nexport { applyDefaults as a, resolveSchema as r };\n"],"x_google_ignoreList":[0],"mappings":";;;AAEA,eAAe,cAAc,KAAK,UAAU,UAAU,EAAE,EAAE;AAOxD,QANe,MAAM,eAAe,KAAK,IAAI;EAC3C,MAAM;EACN;EACA,cAAc,EAAE;EAChB,gBAAgB,CAAC,CAAC,QAAQ;EAC3B,CAAC;;AAGJ,eAAe,eAAe,OAAO,IAAI,KAAK;AAC5C,KAAI,MAAM,IAAI,aACZ,QAAO,IAAI,aAAa;CAE1B,MAAM,WAAW,MAAM,GAAG,QAAQ,OAAO,IAAI;AAC7C,KAAI,CAAC,SAAS,MAAM,EAAE;EACpB,MAAM,YAAY,MAAM,QAAQ,MAAM,GAAG,CAAC,GAAG,MAAM,GAAG;EACtD,MAAM,UAAU;GACd,MAAM,QAAQ,MAAM;GACpB,IAAI;GACJ,SAAS,IAAI,iBAAiB,KAAK,IAAI;GACxC;AACD,kBAAgB,SAAS,EAAE,gBAAgB,IAAI,gBAAgB,CAAC;AAChE,MAAI,aAAa,MAAM;AACvB,MAAI,IAAI,YAAY,SAAS,IAAI,UAAU,GAAG,KAAK,KAAK,EACtD,UAAS,IAAI,UAAU,IAAI,QAAQ,QAAQ;AAE7C,SAAO;;CAET,MAAM,OAAO,EAAE,GAAG,OAAO;CACzB,MAAM,SAAS,IAAI,aAAa,MAAM;EACpC,GAAG,KAAK;EACR,IAAI;EACL;AACD,MAAK,MAAM,OAAO,MAAM;AACtB,MAAI,QAAQ,cAAc,QAAQ,aAAa,QAAQ,WACrD;AAEF,SAAO,aAAa,OAAO,cAAc,EAAE;AAC3C,MAAI,CAAC,OAAO,WAAW,MAAM;GAC3B,MAAM,QAAQ,OAAO,WAAW,OAAO,MAAM,eAC3C,KAAK,MACL,SAAS,IAAI,IAAI,EACjB,IACD;AACD,OAAI,MAAM,QAAQ,MAAM,KAAK,IAAI,MAAM,KAAK,SAAS,YAAY,EAAE;AACjE,WAAO,WAAW,OAAO,YAAY,EAAE;AACvC,QAAI,CAAC,OAAO,SAAS,SAAS,IAAI,CAChC,QAAO,SAAS,KAAK,IAAI;;;;AAKjC,KAAI,CAAC,IAAI,gBAAgB;AACvB,MAAI,IAAI,SACN,QAAO,UAAU,SAAS,IAAI,UAAU,GAAG;AAE7C,MAAI,OAAO,YAAY,KAAK,KAAK,cAAc,KAC7C,QAAO,UAAU,KAAK;AAExB,MAAI,OAAO,KAAK,aAAa,WAC3B,QAAO,UAAU,MAAM,KAAK,SAAS,OAAO,SAAS,OAAO,QAAQ;AAClE,WAAQ,MAAM,eAAe,SAAS,IAAI,MAAM,IAAI,EAAE,KAAK,IAAI,EAAE;IACjE;;AAGN,KAAI,IAAI,SACN,UAAS,IAAI,UAAU,IAAI,OAAO,QAAQ;AAE5C,KAAI,CAAC,OAAO,KACV,QAAO,OAAO,QAAQ,OAAO,QAAQ,KAAK,OAAO,aAAa,WAAW;AAE3E,iBAAgB,QAAQ,EAAE,gBAAgB,IAAI,gBAAgB,CAAC;AAC/D,KAAI,IAAI,YAAY,SAAS,IAAI,UAAU,GAAG,KAAK,KAAK,EACtD,UAAS,IAAI,UAAU,IAAI,OAAO,QAAQ;AAE5C,QAAO;;AAMT,SAAS,gBAAgB,QAAQ,SAAS;AACxC,KAAI,OAAO,SAAS,WAAW,EAAE,WAAW,SAAS;AACnD,SAAO,QAAQ,EACb,MAAM,SAAS,OAAO,OAAO,QAAQ,KAAK,MAAM,QAAQ,EAAE,CAAC,CAAC,CAAC,EAC9D;AACD,MAAI,OAAO,MAAM,MACf;OAAI,OAAO,MAAM,KAAK,WAAW,EAC/B,QAAO,MAAM,OAAO;YACX,OAAO,MAAM,KAAK,WAAW,EACtC,QAAO,MAAM,OAAO,OAAO,MAAM,KAAK;;;AAI5C,KAAI,CAAC,QAAQ,kBAAkB,OAAO,YAAY,KAAK,MAAM,gBAAgB,UAAU,OAAO,SAAS,YAAY,OAAO,SAAS,QAAQ;EACzI,MAAM,oBAAoB,OAAO,QAAQ,OAAO,cAAc,EAAE,CAAC,CAAC,QAAQ,GAAG,UAAU,aAAa,KAAK,CAAC,KAAK,CAAC,KAAK,WAAW,CAAC,KAAK,MAAM,QAAQ,CAAC;AACrJ,SAAO,UAAU,OAAO,YAAY,kBAAkB"}
|
package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.Br_uXjZG.cjs
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
const require_index = require('../../../../../scule@1.3.0/node_modules/scule/dist/index.cjs');
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.Br_uXjZG.mjs
|
|
4
|
+
function getType(val) {
|
|
5
|
+
const type = typeof val;
|
|
6
|
+
if (type === "undefined" || val === null) return;
|
|
7
|
+
if (Array.isArray(val)) return "array";
|
|
8
|
+
return type;
|
|
9
|
+
}
|
|
10
|
+
function isObject(val) {
|
|
11
|
+
return val !== null && !Array.isArray(val) && typeof val === "object";
|
|
12
|
+
}
|
|
13
|
+
function nonEmpty(arr) {
|
|
14
|
+
return arr.filter(Boolean);
|
|
15
|
+
}
|
|
16
|
+
function unique(arr) {
|
|
17
|
+
return [...new Set(arr)];
|
|
18
|
+
}
|
|
19
|
+
function joinPath(a, b = "", sep = ".") {
|
|
20
|
+
return a ? a + sep + b : b;
|
|
21
|
+
}
|
|
22
|
+
function setValue(obj, path, val) {
|
|
23
|
+
const keys = path.split(".");
|
|
24
|
+
const _key = keys.pop();
|
|
25
|
+
for (const key of keys) {
|
|
26
|
+
if (!obj || typeof obj !== "object") return;
|
|
27
|
+
if (!(key in obj)) obj[key] = {};
|
|
28
|
+
obj = obj[key];
|
|
29
|
+
}
|
|
30
|
+
if (_key) {
|
|
31
|
+
if (!obj || typeof obj !== "object") return;
|
|
32
|
+
obj[_key] = val;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function getValue(obj, path) {
|
|
36
|
+
for (const key of path.split(".")) {
|
|
37
|
+
if (!obj || typeof obj !== "object" || !(key in obj)) return;
|
|
38
|
+
obj = obj[key];
|
|
39
|
+
}
|
|
40
|
+
return obj;
|
|
41
|
+
}
|
|
42
|
+
function mergedTypes(...types) {
|
|
43
|
+
types = types.filter(Boolean);
|
|
44
|
+
if (types.length === 0) return {};
|
|
45
|
+
if (types.length === 1) return types[0];
|
|
46
|
+
const tsTypes = normalizeTypes(types.flatMap((t) => t.tsType).filter(Boolean));
|
|
47
|
+
return {
|
|
48
|
+
type: normalizeTypes(types.flatMap((t) => t.type).filter(Boolean)),
|
|
49
|
+
tsType: Array.isArray(tsTypes) ? tsTypes.join(" | ") : tsTypes,
|
|
50
|
+
items: mergedTypes(...types.flatMap((t) => t.items).filter(Boolean))
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function normalizeTypes(val) {
|
|
54
|
+
const arr = unique(val.filter(Boolean));
|
|
55
|
+
if (arr.length === 0 || arr.includes("any")) return;
|
|
56
|
+
return arr.length > 1 ? arr : arr[0];
|
|
57
|
+
}
|
|
58
|
+
function cachedFn(fn) {
|
|
59
|
+
let val;
|
|
60
|
+
let resolved = false;
|
|
61
|
+
const cachedFn2 = () => {
|
|
62
|
+
if (!resolved) {
|
|
63
|
+
val = fn();
|
|
64
|
+
resolved = true;
|
|
65
|
+
}
|
|
66
|
+
return val;
|
|
67
|
+
};
|
|
68
|
+
return cachedFn2;
|
|
69
|
+
}
|
|
70
|
+
const jsTypes = /* @__PURE__ */ new Set([
|
|
71
|
+
"string",
|
|
72
|
+
"number",
|
|
73
|
+
"bigint",
|
|
74
|
+
"boolean",
|
|
75
|
+
"symbol",
|
|
76
|
+
"function",
|
|
77
|
+
"object",
|
|
78
|
+
"any",
|
|
79
|
+
"array"
|
|
80
|
+
]);
|
|
81
|
+
function isJSType(val) {
|
|
82
|
+
return jsTypes.has(val);
|
|
83
|
+
}
|
|
84
|
+
const FRIENDLY_TYPE_RE = /(typeof )?import\(["'](?<importName>[^"']+)["']\)(\[["']|\.)(?<firstType>[^\s"']+)(["']])?/g;
|
|
85
|
+
function getTypeDescriptor(type) {
|
|
86
|
+
if (!type) return {};
|
|
87
|
+
let markdownType = type;
|
|
88
|
+
for (const match of type.matchAll(FRIENDLY_TYPE_RE) || []) {
|
|
89
|
+
const { importName, firstType } = match.groups || {};
|
|
90
|
+
if (importName && firstType) markdownType = markdownType.replace(match[0], require_index.pascalCase(importName) + require_index.pascalCase(firstType));
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
...isJSType(type) ? { type } : {},
|
|
94
|
+
tsType: type,
|
|
95
|
+
...markdownType === type ? {} : { markdownType }
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
//#endregion
|
|
100
|
+
exports.cachedFn = cachedFn;
|
|
101
|
+
exports.getType = getType;
|
|
102
|
+
exports.getTypeDescriptor = getTypeDescriptor;
|
|
103
|
+
exports.getValue = getValue;
|
|
104
|
+
exports.isObject = isObject;
|
|
105
|
+
exports.joinPath = joinPath;
|
|
106
|
+
exports.mergedTypes = mergedTypes;
|
|
107
|
+
exports.nonEmpty = nonEmpty;
|
|
108
|
+
exports.normalizeTypes = normalizeTypes;
|
|
109
|
+
exports.setValue = setValue;
|
|
110
|
+
exports.unique = unique;
|
package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.Br_uXjZG.mjs
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { pascalCase } from "../../../../../scule@1.3.0/node_modules/scule/dist/index.mjs";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.Br_uXjZG.mjs
|
|
4
|
+
function getType(val) {
|
|
5
|
+
const type = typeof val;
|
|
6
|
+
if (type === "undefined" || val === null) return;
|
|
7
|
+
if (Array.isArray(val)) return "array";
|
|
8
|
+
return type;
|
|
9
|
+
}
|
|
10
|
+
function isObject(val) {
|
|
11
|
+
return val !== null && !Array.isArray(val) && typeof val === "object";
|
|
12
|
+
}
|
|
13
|
+
function nonEmpty(arr) {
|
|
14
|
+
return arr.filter(Boolean);
|
|
15
|
+
}
|
|
16
|
+
function unique(arr) {
|
|
17
|
+
return [...new Set(arr)];
|
|
18
|
+
}
|
|
19
|
+
function joinPath(a, b = "", sep = ".") {
|
|
20
|
+
return a ? a + sep + b : b;
|
|
21
|
+
}
|
|
22
|
+
function setValue(obj, path, val) {
|
|
23
|
+
const keys = path.split(".");
|
|
24
|
+
const _key = keys.pop();
|
|
25
|
+
for (const key of keys) {
|
|
26
|
+
if (!obj || typeof obj !== "object") return;
|
|
27
|
+
if (!(key in obj)) obj[key] = {};
|
|
28
|
+
obj = obj[key];
|
|
29
|
+
}
|
|
30
|
+
if (_key) {
|
|
31
|
+
if (!obj || typeof obj !== "object") return;
|
|
32
|
+
obj[_key] = val;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function getValue(obj, path) {
|
|
36
|
+
for (const key of path.split(".")) {
|
|
37
|
+
if (!obj || typeof obj !== "object" || !(key in obj)) return;
|
|
38
|
+
obj = obj[key];
|
|
39
|
+
}
|
|
40
|
+
return obj;
|
|
41
|
+
}
|
|
42
|
+
function mergedTypes(...types) {
|
|
43
|
+
types = types.filter(Boolean);
|
|
44
|
+
if (types.length === 0) return {};
|
|
45
|
+
if (types.length === 1) return types[0];
|
|
46
|
+
const tsTypes = normalizeTypes(types.flatMap((t) => t.tsType).filter(Boolean));
|
|
47
|
+
return {
|
|
48
|
+
type: normalizeTypes(types.flatMap((t) => t.type).filter(Boolean)),
|
|
49
|
+
tsType: Array.isArray(tsTypes) ? tsTypes.join(" | ") : tsTypes,
|
|
50
|
+
items: mergedTypes(...types.flatMap((t) => t.items).filter(Boolean))
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function normalizeTypes(val) {
|
|
54
|
+
const arr = unique(val.filter(Boolean));
|
|
55
|
+
if (arr.length === 0 || arr.includes("any")) return;
|
|
56
|
+
return arr.length > 1 ? arr : arr[0];
|
|
57
|
+
}
|
|
58
|
+
function cachedFn(fn) {
|
|
59
|
+
let val;
|
|
60
|
+
let resolved = false;
|
|
61
|
+
const cachedFn2 = () => {
|
|
62
|
+
if (!resolved) {
|
|
63
|
+
val = fn();
|
|
64
|
+
resolved = true;
|
|
65
|
+
}
|
|
66
|
+
return val;
|
|
67
|
+
};
|
|
68
|
+
return cachedFn2;
|
|
69
|
+
}
|
|
70
|
+
const jsTypes = /* @__PURE__ */ new Set([
|
|
71
|
+
"string",
|
|
72
|
+
"number",
|
|
73
|
+
"bigint",
|
|
74
|
+
"boolean",
|
|
75
|
+
"symbol",
|
|
76
|
+
"function",
|
|
77
|
+
"object",
|
|
78
|
+
"any",
|
|
79
|
+
"array"
|
|
80
|
+
]);
|
|
81
|
+
function isJSType(val) {
|
|
82
|
+
return jsTypes.has(val);
|
|
83
|
+
}
|
|
84
|
+
const FRIENDLY_TYPE_RE = /(typeof )?import\(["'](?<importName>[^"']+)["']\)(\[["']|\.)(?<firstType>[^\s"']+)(["']])?/g;
|
|
85
|
+
function getTypeDescriptor(type) {
|
|
86
|
+
if (!type) return {};
|
|
87
|
+
let markdownType = type;
|
|
88
|
+
for (const match of type.matchAll(FRIENDLY_TYPE_RE) || []) {
|
|
89
|
+
const { importName, firstType } = match.groups || {};
|
|
90
|
+
if (importName && firstType) markdownType = markdownType.replace(match[0], pascalCase(importName) + pascalCase(firstType));
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
...isJSType(type) ? { type } : {},
|
|
94
|
+
tsType: type,
|
|
95
|
+
...markdownType === type ? {} : { markdownType }
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
//#endregion
|
|
100
|
+
export { cachedFn, getType, getTypeDescriptor, getValue, isObject, joinPath, mergedTypes, nonEmpty, normalizeTypes, setValue, unique };
|
|
101
|
+
//# sourceMappingURL=untyped.Br_uXjZG.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"untyped.Br_uXjZG.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.Br_uXjZG.mjs"],"sourcesContent":["import { pascalCase } from 'scule';\n\nfunction defineUntypedSchema(options) {\n return options;\n}\nfunction getType(val) {\n const type = typeof val;\n if (type === \"undefined\" || val === null) {\n return void 0;\n }\n if (Array.isArray(val)) {\n return \"array\";\n }\n return type;\n}\nfunction isObject(val) {\n return val !== null && !Array.isArray(val) && typeof val === \"object\";\n}\nfunction nonEmpty(arr) {\n return arr.filter(Boolean);\n}\nfunction unique(arr) {\n return [...new Set(arr)];\n}\nfunction joinPath(a, b = \"\", sep = \".\") {\n return a ? a + sep + b : b;\n}\nfunction setValue(obj, path, val) {\n const keys = path.split(\".\");\n const _key = keys.pop();\n for (const key of keys) {\n if (!obj || typeof obj !== \"object\") {\n return;\n }\n if (!(key in obj)) {\n obj[key] = {};\n }\n obj = obj[key];\n }\n if (_key) {\n if (!obj || typeof obj !== \"object\") {\n return;\n }\n obj[_key] = val;\n }\n}\nfunction getValue(obj, path) {\n for (const key of path.split(\".\")) {\n if (!obj || typeof obj !== \"object\" || !(key in obj)) {\n return;\n }\n obj = obj[key];\n }\n return obj;\n}\nfunction mergedTypes(...types) {\n types = types.filter(Boolean);\n if (types.length === 0) {\n return {};\n }\n if (types.length === 1) {\n return types[0];\n }\n const tsTypes = normalizeTypes(\n types.flatMap((t) => t.tsType).filter(Boolean)\n );\n return {\n type: normalizeTypes(\n types.flatMap((t) => t.type).filter(Boolean)\n ),\n tsType: Array.isArray(tsTypes) ? tsTypes.join(\" | \") : tsTypes,\n items: mergedTypes(\n ...types.flatMap((t) => t.items).filter(Boolean)\n )\n };\n}\nfunction normalizeTypes(val) {\n const arr = unique(val.filter(Boolean));\n if (arr.length === 0 || arr.includes(\"any\")) {\n return;\n }\n return arr.length > 1 ? arr : arr[0];\n}\nfunction cachedFn(fn) {\n let val;\n let resolved = false;\n const cachedFn2 = () => {\n if (!resolved) {\n val = fn();\n resolved = true;\n }\n return val;\n };\n return cachedFn2;\n}\nconst jsTypes = /* @__PURE__ */ new Set([\n \"string\",\n \"number\",\n \"bigint\",\n \"boolean\",\n \"symbol\",\n \"function\",\n \"object\",\n \"any\",\n \"array\"\n]);\nfunction isJSType(val) {\n return jsTypes.has(val);\n}\nconst FRIENDLY_TYPE_RE = /(typeof )?import\\([\"'](?<importName>[^\"']+)[\"']\\)(\\[[\"']|\\.)(?<firstType>[^\\s\"']+)([\"']])?/g;\nfunction getTypeDescriptor(type) {\n if (!type) {\n return {};\n }\n let markdownType = type;\n for (const match of type.matchAll(FRIENDLY_TYPE_RE) || []) {\n const { importName, firstType } = match.groups || {};\n if (importName && firstType) {\n markdownType = markdownType.replace(\n match[0],\n pascalCase(importName) + pascalCase(firstType)\n );\n }\n }\n return {\n ...isJSType(type) ? { type } : {},\n tsType: type,\n ...markdownType === type ? {} : { markdownType }\n };\n}\n\nexport { getValue as a, nonEmpty as b, getTypeDescriptor as c, defineUntypedSchema as d, cachedFn as e, getType as g, isObject as i, joinPath as j, mergedTypes as m, normalizeTypes as n, setValue as s, unique as u };\n"],"x_google_ignoreList":[0],"mappings":";;;AAKA,SAAS,QAAQ,KAAK;CACpB,MAAM,OAAO,OAAO;AACpB,KAAI,SAAS,eAAe,QAAQ,KAClC;AAEF,KAAI,MAAM,QAAQ,IAAI,CACpB,QAAO;AAET,QAAO;;AAET,SAAS,SAAS,KAAK;AACrB,QAAO,QAAQ,QAAQ,CAAC,MAAM,QAAQ,IAAI,IAAI,OAAO,QAAQ;;AAE/D,SAAS,SAAS,KAAK;AACrB,QAAO,IAAI,OAAO,QAAQ;;AAE5B,SAAS,OAAO,KAAK;AACnB,QAAO,CAAC,GAAG,IAAI,IAAI,IAAI,CAAC;;AAE1B,SAAS,SAAS,GAAG,IAAI,IAAI,MAAM,KAAK;AACtC,QAAO,IAAI,IAAI,MAAM,IAAI;;AAE3B,SAAS,SAAS,KAAK,MAAM,KAAK;CAChC,MAAM,OAAO,KAAK,MAAM,IAAI;CAC5B,MAAM,OAAO,KAAK,KAAK;AACvB,MAAK,MAAM,OAAO,MAAM;AACtB,MAAI,CAAC,OAAO,OAAO,QAAQ,SACzB;AAEF,MAAI,EAAE,OAAO,KACX,KAAI,OAAO,EAAE;AAEf,QAAM,IAAI;;AAEZ,KAAI,MAAM;AACR,MAAI,CAAC,OAAO,OAAO,QAAQ,SACzB;AAEF,MAAI,QAAQ;;;AAGhB,SAAS,SAAS,KAAK,MAAM;AAC3B,MAAK,MAAM,OAAO,KAAK,MAAM,IAAI,EAAE;AACjC,MAAI,CAAC,OAAO,OAAO,QAAQ,YAAY,EAAE,OAAO,KAC9C;AAEF,QAAM,IAAI;;AAEZ,QAAO;;AAET,SAAS,YAAY,GAAG,OAAO;AAC7B,SAAQ,MAAM,OAAO,QAAQ;AAC7B,KAAI,MAAM,WAAW,EACnB,QAAO,EAAE;AAEX,KAAI,MAAM,WAAW,EACnB,QAAO,MAAM;CAEf,MAAM,UAAU,eACd,MAAM,SAAS,MAAM,EAAE,OAAO,CAAC,OAAO,QAAQ,CAC/C;AACD,QAAO;EACL,MAAM,eACJ,MAAM,SAAS,MAAM,EAAE,KAAK,CAAC,OAAO,QAAQ,CAC7C;EACD,QAAQ,MAAM,QAAQ,QAAQ,GAAG,QAAQ,KAAK,MAAM,GAAG;EACvD,OAAO,YACL,GAAG,MAAM,SAAS,MAAM,EAAE,MAAM,CAAC,OAAO,QAAQ,CACjD;EACF;;AAEH,SAAS,eAAe,KAAK;CAC3B,MAAM,MAAM,OAAO,IAAI,OAAO,QAAQ,CAAC;AACvC,KAAI,IAAI,WAAW,KAAK,IAAI,SAAS,MAAM,CACzC;AAEF,QAAO,IAAI,SAAS,IAAI,MAAM,IAAI;;AAEpC,SAAS,SAAS,IAAI;CACpB,IAAI;CACJ,IAAI,WAAW;CACf,MAAM,kBAAkB;AACtB,MAAI,CAAC,UAAU;AACb,SAAM,IAAI;AACV,cAAW;;AAEb,SAAO;;AAET,QAAO;;AAET,MAAM,0BAA0B,IAAI,IAAI;CACtC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;AACF,SAAS,SAAS,KAAK;AACrB,QAAO,QAAQ,IAAI,IAAI;;AAEzB,MAAM,mBAAmB;AACzB,SAAS,kBAAkB,MAAM;AAC/B,KAAI,CAAC,KACH,QAAO,EAAE;CAEX,IAAI,eAAe;AACnB,MAAK,MAAM,SAAS,KAAK,SAAS,iBAAiB,IAAI,EAAE,EAAE;EACzD,MAAM,EAAE,YAAY,cAAc,MAAM,UAAU,EAAE;AACpD,MAAI,cAAc,UAChB,gBAAe,aAAa,QAC1B,MAAM,IACN,WAAW,WAAW,GAAG,WAAW,UAAU,CAC/C;;AAGL,QAAO;EACL,GAAG,SAAS,KAAK,GAAG,EAAE,MAAM,GAAG,EAAE;EACjC,QAAQ;EACR,GAAG,iBAAiB,OAAO,EAAE,GAAG,EAAE,cAAc;EACjD"}
|
package/dist/types/index.cjs
CHANGED
package/dist/types/index.d.cts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "../index-CmCelmEL.cjs";
|
|
1
|
+
import { TOCOptions, __ΩTOCOptions } from "./toc.cjs";
|
|
2
|
+
import { AutoMDPluginContext, AutoMDPluginOptions, AutoMDPluginResolvedConfig, AutoMDPluginUserConfig, __ΩAutoMDPluginContext, __ΩAutoMDPluginOptions, __ΩAutoMDPluginResolvedConfig, __ΩAutoMDPluginUserConfig } from "./plugin.cjs";
|
|
4
3
|
export { AutoMDPluginContext, AutoMDPluginOptions, AutoMDPluginResolvedConfig, AutoMDPluginUserConfig, TOCOptions, __ΩAutoMDPluginContext, __ΩAutoMDPluginOptions, __ΩAutoMDPluginResolvedConfig, __ΩAutoMDPluginUserConfig, __ΩTOCOptions };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "../index-B8OHl-c_.mjs";
|
|
1
|
+
import { TOCOptions, __ΩTOCOptions } from "./toc.mjs";
|
|
2
|
+
import { AutoMDPluginContext, AutoMDPluginOptions, AutoMDPluginResolvedConfig, AutoMDPluginUserConfig, __ΩAutoMDPluginContext, __ΩAutoMDPluginOptions, __ΩAutoMDPluginResolvedConfig, __ΩAutoMDPluginUserConfig } from "./plugin.mjs";
|
|
4
3
|
export { AutoMDPluginContext, AutoMDPluginOptions, AutoMDPluginResolvedConfig, AutoMDPluginUserConfig, TOCOptions, __ΩAutoMDPluginContext, __ΩAutoMDPluginOptions, __ΩAutoMDPluginResolvedConfig, __ΩAutoMDPluginUserConfig, __ΩTOCOptions };
|
package/dist/types/index.mjs
CHANGED
package/dist/types/plugin.cjs
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require('../plugin-Ckx8qAq8.cjs');
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,3 +1,52 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { TOCOptions } from "./toc.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, AutoMDPluginOptions, AutoMDPluginResolvedConfig, AutoMDPluginUserConfig, __ΩAutoMDPluginContext, __ΩAutoMDPluginOptions, __ΩAutoMDPluginResolvedConfig, __ΩAutoMDPluginUserConfig };
|
|
52
|
+
//# sourceMappingURL=plugin.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.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"}
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,3 +1,52 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { TOCOptions } from "./toc.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, AutoMDPluginOptions, AutoMDPluginResolvedConfig, AutoMDPluginUserConfig, __ΩAutoMDPluginContext, __ΩAutoMDPluginOptions, __ΩAutoMDPluginResolvedConfig, __ΩAutoMDPluginUserConfig };
|
|
52
|
+
//# sourceMappingURL=plugin.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.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"}
|
package/dist/types/plugin.mjs
CHANGED
package/dist/types/toc.cjs
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require('../toc-BQgoCyR1.cjs');
|
package/dist/types/toc.d.cts
CHANGED
|
@@ -1,2 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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, __ΩTOCOptions };
|
|
35
|
+
//# sourceMappingURL=toc.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toc.d.cts","names":[],"sources":["../../src/types/toc.ts"],"sourcesContent":[],"mappings":";UAkBiB,UAAA;EAAA"}
|