@powerlines/plugin-automd 0.1.340 → 0.1.342
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -16
- package/dist/_virtual/{rolldown_runtime.cjs → _rolldown/runtime.cjs} +1 -3
- package/dist/_virtual/_rolldown/runtime.mjs +3 -0
- package/dist/index.cjs +26 -27
- package/dist/index.d.cts +0 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +0 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +5 -6
- package/dist/index.mjs.map +1 -1
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +1 -1
- package/dist/types/plugin.d.mts.map +1 -1
- package/dist/types/toc.d.cts.map +1 -1
- package/dist/types/toc.d.mts.map +1 -1
- package/package.json +20 -18
- package/dist/_virtual/rolldown_runtime.mjs +0 -32
- package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.cjs +0 -78
- package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +0 -78
- package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +0 -1
- package/dist/node_modules/.pnpm/acorn@8.16.0/node_modules/acorn/dist/acorn.cjs +0 -5089
- package/dist/node_modules/.pnpm/acorn@8.16.0/node_modules/acorn/dist/acorn.mjs +0 -5089
- package/dist/node_modules/.pnpm/acorn@8.16.0/node_modules/acorn/dist/acorn.mjs.map +0 -1
- package/dist/node_modules/.pnpm/automd@0.4.3_patch_hash_5b5d5334735dce5e1ae79d8924a5aa49e4139453056613d618786b961793a42b_magicast@0.5.2/node_modules/automd/dist/index.cjs +0 -654
- package/dist/node_modules/.pnpm/automd@0.4.3_patch_hash_5b5d5334735dce5e1ae79d8924a5aa49e4139453056613d618786b961793a42b_magicast@0.5.2/node_modules/automd/dist/index.mjs +0 -652
- package/dist/node_modules/.pnpm/automd@0.4.3_patch_hash_5b5d5334735dce5e1ae79d8924a5aa49e4139453056613d618786b961793a42b_magicast@0.5.2/node_modules/automd/dist/index.mjs.map +0 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.cjs +0 -23
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.mjs +0 -23
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.mjs.map +0 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.cjs +0 -10
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs +0 -11
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs.map +0 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.cjs +0 -388
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.mjs +0 -388
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.mjs.map +0 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.cjs +0 -11
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.mjs +0 -12
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.mjs.map +0 -1
- package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.cjs +0 -46
- package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs +0 -46
- package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs.map +0 -1
- package/dist/node_modules/.pnpm/didyoumean2@7.0.4/node_modules/didyoumean2/dist/index.cjs +0 -204
- package/dist/node_modules/.pnpm/didyoumean2@7.0.4/node_modules/didyoumean2/dist/index.mjs +0 -203
- package/dist/node_modules/.pnpm/didyoumean2@7.0.4/node_modules/didyoumean2/dist/index.mjs.map +0 -1
- package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.cjs +0 -1013
- package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs +0 -1008
- package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs.map +0 -1
- package/dist/node_modules/.pnpm/fastest-levenshtein@1.0.16/node_modules/fastest-levenshtein/mod.cjs +0 -128
- package/dist/node_modules/.pnpm/fastest-levenshtein@1.0.16/node_modules/fastest-levenshtein/mod.mjs +0 -124
- package/dist/node_modules/.pnpm/fastest-levenshtein@1.0.16/node_modules/fastest-levenshtein/mod.mjs.map +0 -1
- package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/dist/babel.cjs +0 -41464
- package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/dist/babel.mjs +0 -41462
- package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/dist/babel.mjs.map +0 -1
- package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/dist/jiti.cjs +0 -4387
- package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/dist/jiti.mjs +0 -4385
- package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/dist/jiti.mjs.map +0 -1
- package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/lib/jiti.cjs +0 -26
- package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/lib/jiti.mjs +0 -27
- package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/lib/jiti.mjs.map +0 -1
- package/dist/node_modules/.pnpm/lodash.deburr@4.1.0/node_modules/lodash.deburr/index.cjs +0 -370
- package/dist/node_modules/.pnpm/lodash.deburr@4.1.0/node_modules/lodash.deburr/index.mjs +0 -368
- package/dist/node_modules/.pnpm/lodash.deburr@4.1.0/node_modules/lodash.deburr/index.mjs.map +0 -1
- package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.cjs +0 -939
- package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.mjs +0 -940
- package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mdbox@0.1.1/node_modules/mdbox/dist/index.cjs +0 -67
- package/dist/node_modules/.pnpm/mdbox@0.1.1/node_modules/mdbox/dist/index.mjs +0 -65
- package/dist/node_modules/.pnpm/mdbox@0.1.1/node_modules/mdbox/dist/index.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mlly@1.8.1/node_modules/mlly/dist/index.cjs +0 -1350
- package/dist/node_modules/.pnpm/mlly@1.8.1/node_modules/mlly/dist/index.mjs +0 -1343
- package/dist/node_modules/.pnpm/mlly@1.8.1/node_modules/mlly/dist/index.mjs.map +0 -1
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.cjs +0 -179
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs +0 -178
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs.map +0 -1
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.cjs +0 -20
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs +0 -17
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs.map +0 -1
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.cjs +0 -3975
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs +0 -3962
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs.map +0 -1
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DfbY2q-x.cjs +0 -16
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DfbY2q-x.mjs +0 -15
- 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 +0 -1
- package/dist/node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.cjs +0 -36
- package/dist/node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.mjs +0 -34
- package/dist/node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.mjs.map +0 -1
- package/dist/node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.cjs +0 -227
- package/dist/node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs +0 -226
- package/dist/node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs.map +0 -1
- package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.cjs +0 -139
- package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs +0 -134
- package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs.map +0 -1
- package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.cjs +0 -78
- package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs +0 -78
- package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs.map +0 -1
- package/dist/node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.cjs +0 -72
- package/dist/node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.mjs +0 -70
- package/dist/node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.mjs.map +0 -1
- package/dist/node_modules/.pnpm/ufo@1.6.3/node_modules/ufo/dist/index.cjs +0 -181
- package/dist/node_modules/.pnpm/ufo@1.6.3/node_modules/ufo/dist/index.mjs +0 -179
- package/dist/node_modules/.pnpm/ufo@1.6.3/node_modules/ufo/dist/index.mjs.map +0 -1
- package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/loader/babel.cjs +0 -12337
- package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/loader/babel.mjs +0 -12338
- package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/loader/babel.mjs.map +0 -1
- package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/loader/loader.cjs +0 -19
- package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/loader/loader.mjs +0 -19
- package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/loader/loader.mjs.map +0 -1
- package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.BTwOq8Jl.cjs +0 -71
- package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.BTwOq8Jl.mjs +0 -72
- package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.BTwOq8Jl.mjs.map +0 -1
- package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.Br_uXjZG.cjs +0 -110
- package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.Br_uXjZG.mjs +0 -101
- package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.Br_uXjZG.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ This package is part of the <b>🔌 Powerlines</b> monorepo. Powerlines is the "
|
|
|
27
27
|
|
|
28
28
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
29
29
|
|
|
30
|
-
[](https://stormsoftware.com/projects/powerlines) [](http://commitizen.github.io/cz-cli/)  
|
|
31
31
|
|
|
32
32
|
<!-- prettier-ignore-start -->
|
|
33
33
|
<!-- markdownlint-disable -->
|
|
@@ -58,21 +58,19 @@ A Powerlines plugin to generate project code with [AutoMD](https://automd.unjs.i
|
|
|
58
58
|
|
|
59
59
|
## Table of Contents
|
|
60
60
|
|
|
61
|
-
- [
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
- [
|
|
65
|
-
- [
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
- [Contributing](#contributing)
|
|
75
|
-
- [Contributors](#contributors)
|
|
61
|
+
- [Installing](#installing)
|
|
62
|
+
- [Reduced Package Size](#reduced-package-size)
|
|
63
|
+
- [Development](#development)
|
|
64
|
+
- [Building](#building)
|
|
65
|
+
- [Running unit tests](#running-unit-tests)
|
|
66
|
+
- [Linting](#linting)
|
|
67
|
+
- [Storm Workspaces](#storm-workspaces)
|
|
68
|
+
- [Roadmap](#roadmap)
|
|
69
|
+
- [Support](#support)
|
|
70
|
+
- [License](#license)
|
|
71
|
+
- [Changelog](#changelog)
|
|
72
|
+
- [Contributing](#contributing)
|
|
73
|
+
- [Contributors](#contributors)
|
|
76
74
|
|
|
77
75
|
<!-- END doctoc -->
|
|
78
76
|
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
//#region
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
9
8
|
var __copyProps = (to, from, except, desc) => {
|
|
10
9
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
10
|
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
@@ -27,5 +26,4 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
26
|
|
|
28
27
|
//#endregion
|
|
29
28
|
|
|
30
|
-
exports.__commonJSMin = __commonJSMin;
|
|
31
29
|
exports.__toESM = __toESM;
|
package/dist/index.cjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
Object.
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
let
|
|
5
|
-
let
|
|
6
|
-
let
|
|
7
|
-
let
|
|
8
|
-
let
|
|
9
|
-
let
|
|
10
|
-
let
|
|
11
|
-
let defu = require("defu");
|
|
12
|
-
defu = require_rolldown_runtime.__toESM(defu);
|
|
1
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
let _stryke_convert_to_array = require("@stryke/convert/to-array");
|
|
4
|
+
let _stryke_fs_is_file = require("@stryke/fs/is-file");
|
|
5
|
+
let _stryke_fs_list_files = require("@stryke/fs/list-files");
|
|
6
|
+
let _stryke_path_append = require("@stryke/path/append");
|
|
7
|
+
let _stryke_path_is_type = require("@stryke/path/is-type");
|
|
8
|
+
let _stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
9
|
+
let _stryke_path_replace = require("@stryke/path/replace");
|
|
10
|
+
let automd = require("automd");
|
|
13
11
|
let c12 = require("c12");
|
|
12
|
+
let defu = require("defu");
|
|
13
|
+
defu = require_runtime.__toESM(defu);
|
|
14
14
|
let markdown_toc = require("markdown-toc");
|
|
15
|
-
markdown_toc =
|
|
15
|
+
markdown_toc = require_runtime.__toESM(markdown_toc);
|
|
16
16
|
|
|
17
17
|
//#region src/index.ts
|
|
18
18
|
/**
|
|
@@ -30,8 +30,8 @@ const plugin = (options = {}) => {
|
|
|
30
30
|
return {
|
|
31
31
|
name: "automd",
|
|
32
32
|
async config() {
|
|
33
|
-
const config = await
|
|
34
|
-
if (!config.prefix || !Array.isArray(config.prefix)) config.prefix = (0,
|
|
33
|
+
const config = await (0, automd.loadConfig)((0, _stryke_path_join_paths.joinPaths)(this.workspaceConfig.workspaceRoot, this.config.root), options);
|
|
34
|
+
if (!config.prefix || !Array.isArray(config.prefix)) config.prefix = (0, _stryke_convert_to_array.toArray)(config.prefix ?? []);
|
|
35
35
|
if (!config.prefix.includes("automd")) config.prefix.push("automd");
|
|
36
36
|
if (!config.prefix.includes("powerlines")) config.prefix.push("powerlines");
|
|
37
37
|
return { automd: (0, defu.default)(config ?? {}, {
|
|
@@ -47,7 +47,7 @@ const plugin = (options = {}) => {
|
|
|
47
47
|
}) };
|
|
48
48
|
},
|
|
49
49
|
async configResolved() {
|
|
50
|
-
if (this.config.framework && !(0,
|
|
50
|
+
if (this.config.framework && !(0, _stryke_convert_to_array.toArray)(this.config.automd.prefix).includes(this.config.framework)) this.config.automd.prefix = (0, _stryke_convert_to_array.toArray)(this.config.automd.prefix).concat(this.config.framework);
|
|
51
51
|
if (this.config.automd.configFile) {
|
|
52
52
|
const { config } = await (0, c12.loadConfig)({
|
|
53
53
|
cwd: this.config.automd.dir,
|
|
@@ -61,16 +61,16 @@ const plugin = (options = {}) => {
|
|
|
61
61
|
dir: this.config.automd.dir
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
|
-
this.config.automd =
|
|
64
|
+
this.config.automd = (0, automd.resolveConfig)((0, defu.default)(this.config.automd, {
|
|
65
65
|
...config,
|
|
66
|
-
prefix: (0,
|
|
66
|
+
prefix: (0, _stryke_convert_to_array.toArray)(config.prefix ?? [])
|
|
67
67
|
}));
|
|
68
68
|
}
|
|
69
|
-
this.config.automd.input = (await Promise.all((0,
|
|
70
|
-
if (input.includes("*")) return (0,
|
|
71
|
-
return (0,
|
|
69
|
+
this.config.automd.input = (await Promise.all((0, _stryke_convert_to_array.toArray)(this.config.automd.input).map(async (input) => {
|
|
70
|
+
if (input.includes("*")) return (0, _stryke_fs_list_files.listFiles)((0, _stryke_path_is_type.isAbsolutePath)(input) ? input : (0, _stryke_path_append.appendPath)(input, this.config.root), { ignore: this.config.automd.ignore });
|
|
71
|
+
return (0, _stryke_path_is_type.isAbsolutePath)(input) ? input : (0, _stryke_path_append.appendPath)(input, this.config.root);
|
|
72
72
|
}))).flat();
|
|
73
|
-
if (this.config.automd.output && !(0,
|
|
73
|
+
if (this.config.automd.output && !(0, _stryke_path_is_type.isAbsolutePath)(this.config.automd.output)) this.config.automd.output = (0, _stryke_path_append.appendPath)(this.config.automd.output, this.config.root);
|
|
74
74
|
this.config.automd.generators ??= {};
|
|
75
75
|
if (this.config.automd.toc !== false) this.config.automd.generators.toc ??= {
|
|
76
76
|
name: "toc",
|
|
@@ -85,19 +85,18 @@ const plugin = (options = {}) => {
|
|
|
85
85
|
};
|
|
86
86
|
},
|
|
87
87
|
async docs() {
|
|
88
|
-
await Promise.all((0,
|
|
88
|
+
await Promise.all((0, _stryke_convert_to_array.toArray)(this.config.automd.input).map(async (input) => {
|
|
89
89
|
const contents = await this.fs.read(input);
|
|
90
90
|
if (contents) {
|
|
91
|
-
const result = await
|
|
91
|
+
const result = await (0, automd.transform)(contents, this.config.automd);
|
|
92
92
|
if (result.hasIssues && this.config.automd.allowIssues === false) throw new Error(`AutoMD found issues in file "${input}". Please resolve the issues or set \`allowIssues\` to true in the plugin configuration to ignore them.`);
|
|
93
|
-
if (result.hasChanged) await this.fs.write((0,
|
|
93
|
+
if (result.hasChanged) await this.fs.write((0, _stryke_path_append.appendPath)(this.config.automd.output ? (0, _stryke_fs_is_file.isDirectory)(this.config.automd.output) ? (0, _stryke_path_replace.replacePath)(input, this.config.automd.output) : this.config.automd.output : input, this.config.root), result.contents);
|
|
94
94
|
}
|
|
95
95
|
}));
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
98
|
};
|
|
99
|
-
var src_default = plugin;
|
|
100
99
|
|
|
101
100
|
//#endregion
|
|
102
|
-
exports.default =
|
|
101
|
+
exports.default = plugin;
|
|
103
102
|
exports.plugin = plugin;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { TOCOptions, __ΩTOCOptions } from "./types/toc.cjs";
|
|
2
2
|
import { AutoMDPluginContext, AutoMDPluginOptions, AutoMDPluginResolvedConfig, AutoMDPluginUserConfig, __ΩAutoMDPluginContext, __ΩAutoMDPluginOptions, __ΩAutoMDPluginResolvedConfig, __ΩAutoMDPluginUserConfig } from "./types/plugin.cjs";
|
|
3
|
-
import "./types/index.cjs";
|
|
4
3
|
import { Plugin } from "powerlines";
|
|
5
4
|
|
|
6
5
|
//#region src/index.d.ts
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;YA+CY,MAAA;IACR,MAAA,GAAS,mBAAA;EAAA;AAAA;;;;;;;;;AAeb;;;cAAa,MAAA,oBACM,mBAAA,GAAsB,mBAAA,EAEvC,OAAA,GAAS,mBAAA,KACR,MAAA,CAAO,QAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { TOCOptions, __ΩTOCOptions } from "./types/toc.mjs";
|
|
2
2
|
import { AutoMDPluginContext, AutoMDPluginOptions, AutoMDPluginResolvedConfig, AutoMDPluginUserConfig, __ΩAutoMDPluginContext, __ΩAutoMDPluginOptions, __ΩAutoMDPluginResolvedConfig, __ΩAutoMDPluginUserConfig } from "./types/plugin.mjs";
|
|
3
|
-
import "./types/index.mjs";
|
|
4
3
|
import { Plugin } from "powerlines";
|
|
5
4
|
|
|
6
5
|
//#region src/index.d.ts
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;YA+CY,MAAA;IACR,MAAA,GAAS,mBAAA;EAAA;AAAA;;;;;;;;;AAeb;;;cAAa,MAAA,oBACM,mBAAA,GAAsB,mBAAA,EAEvC,OAAA,GAAS,mBAAA,KACR,MAAA,CAAO,QAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { loadConfig as loadConfig$1, resolveConfig, transform } from "./node_modules/.pnpm/automd@0.4.3_patch_hash_5b5d5334735dce5e1ae79d8924a5aa49e4139453056613d618786b961793a42b_magicast@0.5.2/node_modules/automd/dist/index.mjs";
|
|
2
1
|
import { toArray } from "@stryke/convert/to-array";
|
|
3
2
|
import { isDirectory } from "@stryke/fs/is-file";
|
|
4
3
|
import { listFiles } from "@stryke/fs/list-files";
|
|
@@ -6,8 +5,9 @@ import { appendPath } from "@stryke/path/append";
|
|
|
6
5
|
import { isAbsolutePath } from "@stryke/path/is-type";
|
|
7
6
|
import { joinPaths } from "@stryke/path/join-paths";
|
|
8
7
|
import { replacePath } from "@stryke/path/replace";
|
|
8
|
+
import { loadConfig, resolveConfig, transform } from "automd";
|
|
9
|
+
import { loadConfig as loadConfig$1 } from "c12";
|
|
9
10
|
import defu from "defu";
|
|
10
|
-
import { loadConfig } from "c12";
|
|
11
11
|
import toc from "markdown-toc";
|
|
12
12
|
|
|
13
13
|
//#region src/index.ts
|
|
@@ -26,7 +26,7 @@ const plugin = (options = {}) => {
|
|
|
26
26
|
return {
|
|
27
27
|
name: "automd",
|
|
28
28
|
async config() {
|
|
29
|
-
const config = await loadConfig
|
|
29
|
+
const config = await loadConfig(joinPaths(this.workspaceConfig.workspaceRoot, this.config.root), options);
|
|
30
30
|
if (!config.prefix || !Array.isArray(config.prefix)) config.prefix = toArray(config.prefix ?? []);
|
|
31
31
|
if (!config.prefix.includes("automd")) config.prefix.push("automd");
|
|
32
32
|
if (!config.prefix.includes("powerlines")) config.prefix.push("powerlines");
|
|
@@ -45,7 +45,7 @@ const plugin = (options = {}) => {
|
|
|
45
45
|
async configResolved() {
|
|
46
46
|
if (this.config.framework && !toArray(this.config.automd.prefix).includes(this.config.framework)) this.config.automd.prefix = toArray(this.config.automd.prefix).concat(this.config.framework);
|
|
47
47
|
if (this.config.automd.configFile) {
|
|
48
|
-
const { config } = await loadConfig({
|
|
48
|
+
const { config } = await loadConfig$1({
|
|
49
49
|
cwd: this.config.automd.dir,
|
|
50
50
|
configFile: this.config.automd.configFile,
|
|
51
51
|
defaults: {
|
|
@@ -92,8 +92,7 @@ const plugin = (options = {}) => {
|
|
|
92
92
|
}
|
|
93
93
|
};
|
|
94
94
|
};
|
|
95
|
-
var src_default = plugin;
|
|
96
95
|
|
|
97
96
|
//#endregion
|
|
98
|
-
export {
|
|
97
|
+
export { plugin as default, plugin };
|
|
99
98
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["loadConfigFile"],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { isDirectory } from \"@stryke/fs/is-file\";\nimport { listFiles } from \"@stryke/fs/list-files\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { isAbsolutePath } from \"@stryke/path/is-type\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport {\n Config,\n GenerateContext,\n GenerateResult,\n loadConfig,\n resolveConfig,\n transform\n} from \"automd\";\nimport { loadConfig as loadConfigFile } from \"c12\";\nimport defu from \"defu\";\nimport toc from \"markdown-toc\";\nimport type { Plugin } from \"powerlines\";\nimport {\n AutoMDPluginContext,\n AutoMDPluginOptions,\n AutoMDPluginUserConfig\n} from \"./types/plugin\";\nimport { TOCOptions } from \"./types/toc\";\n\nexport * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n automd?: AutoMDPluginOptions;\n }\n}\n\n/**\n * AutoMD Plugin\n *\n * @remarks\n * A Powerlines plugin to use the AutoMD markdown transformer during the prepare task.\n *\n * @see https://automd.unjs.io/\n *\n * @param options - The plugin options.\n * @returns A Powerlines plugin instance.\n */\nexport const plugin = <\n TContext extends AutoMDPluginContext = AutoMDPluginContext\n>(\n options: AutoMDPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"automd\",\n async config() {\n const config = await loadConfig(\n joinPaths(this.workspaceConfig.workspaceRoot, this.config.root),\n options\n );\n\n if (!config.prefix || !Array.isArray(config.prefix)) {\n config.prefix = toArray(config.prefix ?? []);\n }\n\n if (!config.prefix.includes(\"automd\")) {\n config.prefix.push(\"automd\");\n }\n if (!config.prefix.includes(\"powerlines\")) {\n config.prefix.push(\"powerlines\");\n }\n\n return {\n automd: defu(config ?? {}, {\n configFile: options.configFile,\n allowIssues: true,\n dir: this.config.root,\n watch: false,\n input: \"README.md\",\n toc: {\n maxDepth: 6,\n bullets: \"-\"\n }\n })\n } as Partial<AutoMDPluginUserConfig>;\n },\n async configResolved() {\n if (\n this.config.framework &&\n !toArray(this.config.automd.prefix).includes(this.config.framework)\n ) {\n this.config.automd.prefix = toArray(this.config.automd.prefix).concat(\n this.config.framework\n );\n }\n\n if (this.config.automd.configFile) {\n const { config } = await loadConfigFile<Config>({\n cwd: this.config.automd.dir,\n configFile: this.config.automd.configFile,\n defaults: {\n ignore: [\"**/node_modules\", \"**/dist\", \"**/.*\"],\n dir: this.config.automd.dir\n }\n });\n\n this.config.automd = resolveConfig(\n defu(this.config.automd, {\n ...config,\n prefix: toArray(config.prefix ?? [])\n }) as Config\n );\n }\n\n this.config.automd.input = (\n await Promise.all(\n toArray(this.config.automd.input).map(async input => {\n if (input.includes(\"*\")) {\n return listFiles(\n isAbsolutePath(input)\n ? input\n : appendPath(input, this.config.root),\n {\n ignore: this.config.automd.ignore\n }\n );\n }\n\n return isAbsolutePath(input)\n ? input\n : appendPath(input, this.config.root);\n })\n )\n ).flat();\n\n if (\n this.config.automd.output &&\n !isAbsolutePath(this.config.automd.output)\n ) {\n this.config.automd.output = appendPath(\n this.config.automd.output,\n this.config.root\n );\n }\n\n this.config.automd.generators ??= {};\n\n if (this.config.automd.toc !== false) {\n this.config.automd.generators.toc ??= {\n name: \"toc\",\n generate: (ctx: GenerateContext): GenerateResult => {\n const opts = (this.config.automd.toc ?? {}) as TOCOptions;\n\n return {\n contents: toc(ctx.block.contents, {\n ...opts,\n maxdepth: opts.maxDepth,\n first1: opts.firstH1\n }).content\n };\n }\n };\n }\n },\n async docs() {\n await Promise.all(\n toArray(this.config.automd.input).map(async input => {\n const contents = await this.fs.read(input);\n if (contents) {\n const result = await transform(contents, this.config.automd);\n if (result.hasIssues && this.config.automd.allowIssues === false) {\n throw new Error(\n `AutoMD found issues in file \"${\n input\n }\". Please resolve the issues or set \\`allowIssues\\` to true in the plugin configuration to ignore them.`\n );\n }\n\n if (result.hasChanged) {\n await this.fs.write(\n appendPath(\n this.config.automd.output\n ? isDirectory(this.config.automd.output)\n ? replacePath(input, this.config.automd.output)\n : this.config.automd.output\n : input,\n this.config.root\n ),\n result.contents\n );\n }\n }\n })\n );\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA+DA,MAAa,UAGX,UAA+B,EAAE,KACZ;AACrB,QAAO;EACL,MAAM;EACN,MAAM,SAAS;GACb,MAAM,SAAS,MAAM,WACnB,UAAU,KAAK,gBAAgB,eAAe,KAAK,OAAO,KAAK,EAC/D,QACD;AAED,OAAI,CAAC,OAAO,UAAU,CAAC,MAAM,QAAQ,OAAO,OAAO,CACjD,QAAO,SAAS,QAAQ,OAAO,UAAU,EAAE,CAAC;AAG9C,OAAI,CAAC,OAAO,OAAO,SAAS,SAAS,CACnC,QAAO,OAAO,KAAK,SAAS;AAE9B,OAAI,CAAC,OAAO,OAAO,SAAS,aAAa,CACvC,QAAO,OAAO,KAAK,aAAa;AAGlC,UAAO,EACL,QAAQ,KAAK,UAAU,EAAE,EAAE;IACzB,YAAY,QAAQ;IACpB,aAAa;IACb,KAAK,KAAK,OAAO;IACjB,OAAO;IACP,OAAO;IACP,KAAK;KACH,UAAU;KACV,SAAS;KACV;IACF,CAAC,EACH;;EAEH,MAAM,iBAAiB;AACrB,OACE,KAAK,OAAO,aACZ,CAAC,QAAQ,KAAK,OAAO,OAAO,OAAO,CAAC,SAAS,KAAK,OAAO,UAAU,CAEnE,MAAK,OAAO,OAAO,SAAS,QAAQ,KAAK,OAAO,OAAO,OAAO,CAAC,OAC7D,KAAK,OAAO,UACb;AAGH,OAAI,KAAK,OAAO,OAAO,YAAY;IACjC,MAAM,EAAE,WAAW,MAAMA,aAAuB;KAC9C,KAAK,KAAK,OAAO,OAAO;KACxB,YAAY,KAAK,OAAO,OAAO;KAC/B,UAAU;MACR,QAAQ;OAAC;OAAmB;OAAW;OAAQ;MAC/C,KAAK,KAAK,OAAO,OAAO;MACzB;KACF,CAAC;AAEF,SAAK,OAAO,SAAS,cACnB,KAAK,KAAK,OAAO,QAAQ;KACvB,GAAG;KACH,QAAQ,QAAQ,OAAO,UAAU,EAAE,CAAC;KACrC,CAAC,CACH;;AAGH,QAAK,OAAO,OAAO,SACjB,MAAM,QAAQ,IACZ,QAAQ,KAAK,OAAO,OAAO,MAAM,CAAC,IAAI,OAAM,UAAS;AACnD,QAAI,MAAM,SAAS,IAAI,CACrB,QAAO,UACL,eAAe,MAAM,GACjB,QACA,WAAW,OAAO,KAAK,OAAO,KAAK,EACvC,EACE,QAAQ,KAAK,OAAO,OAAO,QAC5B,CACF;AAGH,WAAO,eAAe,MAAM,GACxB,QACA,WAAW,OAAO,KAAK,OAAO,KAAK;KACvC,CACH,EACD,MAAM;AAER,OACE,KAAK,OAAO,OAAO,UACnB,CAAC,eAAe,KAAK,OAAO,OAAO,OAAO,CAE1C,MAAK,OAAO,OAAO,SAAS,WAC1B,KAAK,OAAO,OAAO,QACnB,KAAK,OAAO,KACb;AAGH,QAAK,OAAO,OAAO,eAAe,EAAE;AAEpC,OAAI,KAAK,OAAO,OAAO,QAAQ,MAC7B,MAAK,OAAO,OAAO,WAAW,QAAQ;IACpC,MAAM;IACN,WAAW,QAAyC;KAClD,MAAM,OAAQ,KAAK,OAAO,OAAO,OAAO,EAAE;AAE1C,YAAO,EACL,UAAU,IAAI,IAAI,MAAM,UAAU;MAChC,GAAG;MACH,UAAU,KAAK;MACf,QAAQ,KAAK;MACd,CAAC,CAAC,SACJ;;IAEJ;;EAGL,MAAM,OAAO;AACX,SAAM,QAAQ,IACZ,QAAQ,KAAK,OAAO,OAAO,MAAM,CAAC,IAAI,OAAM,UAAS;IACnD,MAAM,WAAW,MAAM,KAAK,GAAG,KAAK,MAAM;AAC1C,QAAI,UAAU;KACZ,MAAM,SAAS,MAAM,UAAU,UAAU,KAAK,OAAO,OAAO;AAC5D,SAAI,OAAO,aAAa,KAAK,OAAO,OAAO,gBAAgB,MACzD,OAAM,IAAI,MACR,gCACE,MACD,yGACF;AAGH,SAAI,OAAO,WACT,OAAM,KAAK,GAAG,MACZ,WACE,KAAK,OAAO,OAAO,SACf,YAAY,KAAK,OAAO,OAAO,OAAO,GACpC,YAAY,OAAO,KAAK,OAAO,OAAO,OAAO,GAC7C,KAAK,OAAO,OAAO,SACrB,OACJ,KAAK,OAAO,KACb,EACD,OAAO,SACR;;KAGL,CACH;;EAEJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;KAsBY,mBAAA,GAAsB,IAAA,CAChC,MAAA;;AADF;;;;;EAUE,UAAA;EAyBwB;;;;;EAlBxB,WAAA;EAUA;;;;;AAWF;;;EAXE,MAAA;EAYS;;;;;;EAJT,GAAA,WAAc,UAAA;AAAA;AAAA,KAGJ,sBAAA,GAAyB,UAAA;EACnC,MAAA,GAAS,MAAA,GACP,IAAA,CAAK,mBAAA;AAAA;AAAA,KAGG,0BAAA,GAA6B,cAAA;EACvC,MAAA,EAAQ,MAAA,GACN,IAAA,CAAK,mBAAA;AAAA;AAAA,KAGG,mBAAA,yBACc,0BAAA,GACtB,0BAAA,IACA,aAAA,CAAc,eAAA;AAAA"}
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TOCOptions } from "./toc.mjs";
|
|
2
|
-
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
3
2
|
import { Config } from "automd";
|
|
3
|
+
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
4
4
|
|
|
5
5
|
//#region src/types/plugin.d.ts
|
|
6
6
|
type AutoMDPluginOptions = Omit<Config, "dir" | "watch" | "onWatch" | "prefix"> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;KAsBY,mBAAA,GAAsB,IAAA,CAChC,MAAA;;AADF;;;;;EAUE,UAAA;EAyBwB;;;;;EAlBxB,WAAA;EAUA;;;;;AAWF;;;EAXE,MAAA;EAYS;;;;;;EAJT,GAAA,WAAc,UAAA;AAAA;AAAA,KAGJ,sBAAA,GAAyB,UAAA;EACnC,MAAA,GAAS,MAAA,GACP,IAAA,CAAK,mBAAA;AAAA;AAAA,KAGG,0BAAA,GAA6B,cAAA;EACvC,MAAA,EAAQ,MAAA,GACN,IAAA,CAAK,mBAAA;AAAA;AAAA,KAGG,mBAAA,yBACc,0BAAA,GACtB,0BAAA,IACA,aAAA,CAAc,eAAA;AAAA"}
|
package/dist/types/toc.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toc.d.cts","names":[],"sources":["../../src/types/toc.ts"],"
|
|
1
|
+
{"version":3,"file":"toc.d.cts","names":[],"sources":["../../src/types/toc.ts"],"mappings":";UAkBiB,UAAA;EAAA;;;EAIf,OAAA,IAAW,GAAA;EAAX;;;;;EAOA,QAAA;EAsBA;;;EAjBA,OAAA;EAiBoC;;;;;EAVpC,OAAA;;;;EAKA,MAAA;;;;EAKA,MAAA,IAAU,GAAA,UAAa,KAAA;AAAA;AAAA"}
|
package/dist/types/toc.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toc.d.mts","names":[],"sources":["../../src/types/toc.ts"],"
|
|
1
|
+
{"version":3,"file":"toc.d.mts","names":[],"sources":["../../src/types/toc.ts"],"mappings":";UAkBiB,UAAA;EAAA;;;EAIf,OAAA,IAAW,GAAA;EAAX;;;;;EAOA,QAAA;EAsBA;;;EAjBA,OAAA;EAiBoC;;;;;EAVpC,OAAA;;;;EAKA,MAAA;;;;EAKA,MAAA,IAAU,GAAA,UAAa,KAAA;AAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-automd",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"
|
|
3
|
+
"version": "0.1.342",
|
|
4
|
+
"private": false,
|
|
5
5
|
"description": "A Powerlines plugin to maintain a project's markdown files using AutoMD generators.",
|
|
6
|
+
"keywords": ["automd", "powerlines", "storm-software", "powerlines-plugin"],
|
|
7
|
+
"homepage": "https://stormsoftware.com",
|
|
8
|
+
"bugs": {
|
|
9
|
+
"url": "https://stormsoftware.com/support",
|
|
10
|
+
"email": "support@stormsoftware.com"
|
|
11
|
+
},
|
|
6
12
|
"repository": {
|
|
7
13
|
"type": "github",
|
|
8
14
|
"url": "https://github.com/storm-software/powerlines.git",
|
|
9
15
|
"directory": "packages/plugin-automd"
|
|
10
16
|
},
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
"url": "https://
|
|
14
|
-
"email": "support@stormsoftware.com"
|
|
17
|
+
"funding": {
|
|
18
|
+
"type": "github",
|
|
19
|
+
"url": "https://github.com/sponsors/storm-software"
|
|
15
20
|
},
|
|
21
|
+
"license": "Apache-2.0",
|
|
16
22
|
"author": {
|
|
17
23
|
"name": "Storm Software",
|
|
18
24
|
"email": "contact@stormsoftware.com",
|
|
@@ -32,14 +38,7 @@
|
|
|
32
38
|
"url": "https://stormsoftware.com"
|
|
33
39
|
}
|
|
34
40
|
],
|
|
35
|
-
"
|
|
36
|
-
"type": "github",
|
|
37
|
-
"url": "https://github.com/sponsors/storm-software"
|
|
38
|
-
},
|
|
39
|
-
"license": "Apache-2.0",
|
|
40
|
-
"private": false,
|
|
41
|
-
"main": "./dist/index.cjs",
|
|
42
|
-
"module": "./dist/index.mjs",
|
|
41
|
+
"type": "module",
|
|
43
42
|
"exports": {
|
|
44
43
|
".": {
|
|
45
44
|
"require": {
|
|
@@ -55,7 +54,7 @@
|
|
|
55
54
|
"default": "./dist/index.mjs"
|
|
56
55
|
}
|
|
57
56
|
},
|
|
58
|
-
"
|
|
57
|
+
"./package.json": "./package.json",
|
|
59
58
|
"./types": {
|
|
60
59
|
"require": {
|
|
61
60
|
"types": "./dist/types/index.d.cts",
|
|
@@ -99,10 +98,11 @@
|
|
|
99
98
|
}
|
|
100
99
|
}
|
|
101
100
|
},
|
|
101
|
+
"main": "./dist/index.cjs",
|
|
102
|
+
"module": "./dist/index.mjs",
|
|
102
103
|
"types": "./dist/index.d.cts",
|
|
103
104
|
"typings": "dist/index.d.mts",
|
|
104
105
|
"files": ["dist/**/*"],
|
|
105
|
-
"keywords": ["automd", "powerlines", "storm-software", "powerlines-plugin"],
|
|
106
106
|
"dependencies": {
|
|
107
107
|
"@stryke/convert": "^0.6.53",
|
|
108
108
|
"@stryke/fs": "^0.33.57",
|
|
@@ -114,10 +114,12 @@
|
|
|
114
114
|
"markdown-toc": "^1.2.0"
|
|
115
115
|
},
|
|
116
116
|
"devDependencies": {
|
|
117
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
117
|
+
"@powerlines/plugin-plugin": "^0.12.293",
|
|
118
118
|
"@types/node": "^25.4.0",
|
|
119
119
|
"automd": "^0.4.3"
|
|
120
120
|
},
|
|
121
|
+
"peerDependencies": { "automd": ">=0.4.3" },
|
|
122
|
+
"peerDependenciesMeta": { "automd": { "optional": false } },
|
|
121
123
|
"publishConfig": { "access": "public" },
|
|
122
|
-
"gitHead": "
|
|
124
|
+
"gitHead": "2fb48143904805988bac9bdbc04cdc4a35ff398b"
|
|
123
125
|
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module";
|
|
2
|
-
|
|
3
|
-
//#region rolldown:runtime
|
|
4
|
-
var __create = Object.create;
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
14
|
-
key = keys[i];
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
16
|
-
__defProp(to, key, {
|
|
17
|
-
get: ((k) => from[k]).bind(null, key),
|
|
18
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return to;
|
|
24
|
-
};
|
|
25
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
26
|
-
value: mod,
|
|
27
|
-
enumerable: true
|
|
28
|
-
}) : target, mod));
|
|
29
|
-
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
30
|
-
|
|
31
|
-
//#endregion
|
|
32
|
-
export { __commonJSMin, __require, __toESM };
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region ../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
|
|
3
|
-
var comma = ",".charCodeAt(0);
|
|
4
|
-
var semicolon = ";".charCodeAt(0);
|
|
5
|
-
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
6
|
-
var intToChar = new Uint8Array(64);
|
|
7
|
-
var charToInt = new Uint8Array(128);
|
|
8
|
-
for (let i = 0; i < chars.length; i++) {
|
|
9
|
-
const c = chars.charCodeAt(i);
|
|
10
|
-
intToChar[i] = c;
|
|
11
|
-
charToInt[c] = i;
|
|
12
|
-
}
|
|
13
|
-
function encodeInteger(builder, num, relative) {
|
|
14
|
-
let delta = num - relative;
|
|
15
|
-
delta = delta < 0 ? -delta << 1 | 1 : delta << 1;
|
|
16
|
-
do {
|
|
17
|
-
let clamped = delta & 31;
|
|
18
|
-
delta >>>= 5;
|
|
19
|
-
if (delta > 0) clamped |= 32;
|
|
20
|
-
builder.write(intToChar[clamped]);
|
|
21
|
-
} while (delta > 0);
|
|
22
|
-
return num;
|
|
23
|
-
}
|
|
24
|
-
var bufLength = 1024 * 16;
|
|
25
|
-
var td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? { decode(buf) {
|
|
26
|
-
return Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength).toString();
|
|
27
|
-
} } : { decode(buf) {
|
|
28
|
-
let out = "";
|
|
29
|
-
for (let i = 0; i < buf.length; i++) out += String.fromCharCode(buf[i]);
|
|
30
|
-
return out;
|
|
31
|
-
} };
|
|
32
|
-
var StringWriter = class {
|
|
33
|
-
constructor() {
|
|
34
|
-
this.pos = 0;
|
|
35
|
-
this.out = "";
|
|
36
|
-
this.buffer = new Uint8Array(bufLength);
|
|
37
|
-
}
|
|
38
|
-
write(v) {
|
|
39
|
-
const { buffer } = this;
|
|
40
|
-
buffer[this.pos++] = v;
|
|
41
|
-
if (this.pos === bufLength) {
|
|
42
|
-
this.out += td.decode(buffer);
|
|
43
|
-
this.pos = 0;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
flush() {
|
|
47
|
-
const { buffer, out, pos } = this;
|
|
48
|
-
return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
function encode(decoded) {
|
|
52
|
-
const writer = new StringWriter();
|
|
53
|
-
let sourcesIndex = 0;
|
|
54
|
-
let sourceLine = 0;
|
|
55
|
-
let sourceColumn = 0;
|
|
56
|
-
let namesIndex = 0;
|
|
57
|
-
for (let i = 0; i < decoded.length; i++) {
|
|
58
|
-
const line = decoded[i];
|
|
59
|
-
if (i > 0) writer.write(semicolon);
|
|
60
|
-
if (line.length === 0) continue;
|
|
61
|
-
let genColumn = 0;
|
|
62
|
-
for (let j = 0; j < line.length; j++) {
|
|
63
|
-
const segment = line[j];
|
|
64
|
-
if (j > 0) writer.write(comma);
|
|
65
|
-
genColumn = encodeInteger(writer, segment[0], genColumn);
|
|
66
|
-
if (segment.length === 1) continue;
|
|
67
|
-
sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);
|
|
68
|
-
sourceLine = encodeInteger(writer, segment[2], sourceLine);
|
|
69
|
-
sourceColumn = encodeInteger(writer, segment[3], sourceColumn);
|
|
70
|
-
if (segment.length === 4) continue;
|
|
71
|
-
namesIndex = encodeInteger(writer, segment[4], namesIndex);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
return writer.flush();
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
//#endregion
|
|
78
|
-
exports.encode = encode;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
|
|
2
|
-
var comma = ",".charCodeAt(0);
|
|
3
|
-
var semicolon = ";".charCodeAt(0);
|
|
4
|
-
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
5
|
-
var intToChar = new Uint8Array(64);
|
|
6
|
-
var charToInt = new Uint8Array(128);
|
|
7
|
-
for (let i = 0; i < chars.length; i++) {
|
|
8
|
-
const c = chars.charCodeAt(i);
|
|
9
|
-
intToChar[i] = c;
|
|
10
|
-
charToInt[c] = i;
|
|
11
|
-
}
|
|
12
|
-
function encodeInteger(builder, num, relative) {
|
|
13
|
-
let delta = num - relative;
|
|
14
|
-
delta = delta < 0 ? -delta << 1 | 1 : delta << 1;
|
|
15
|
-
do {
|
|
16
|
-
let clamped = delta & 31;
|
|
17
|
-
delta >>>= 5;
|
|
18
|
-
if (delta > 0) clamped |= 32;
|
|
19
|
-
builder.write(intToChar[clamped]);
|
|
20
|
-
} while (delta > 0);
|
|
21
|
-
return num;
|
|
22
|
-
}
|
|
23
|
-
var bufLength = 1024 * 16;
|
|
24
|
-
var td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? { decode(buf) {
|
|
25
|
-
return Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength).toString();
|
|
26
|
-
} } : { decode(buf) {
|
|
27
|
-
let out = "";
|
|
28
|
-
for (let i = 0; i < buf.length; i++) out += String.fromCharCode(buf[i]);
|
|
29
|
-
return out;
|
|
30
|
-
} };
|
|
31
|
-
var StringWriter = class {
|
|
32
|
-
constructor() {
|
|
33
|
-
this.pos = 0;
|
|
34
|
-
this.out = "";
|
|
35
|
-
this.buffer = new Uint8Array(bufLength);
|
|
36
|
-
}
|
|
37
|
-
write(v) {
|
|
38
|
-
const { buffer } = this;
|
|
39
|
-
buffer[this.pos++] = v;
|
|
40
|
-
if (this.pos === bufLength) {
|
|
41
|
-
this.out += td.decode(buffer);
|
|
42
|
-
this.pos = 0;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
flush() {
|
|
46
|
-
const { buffer, out, pos } = this;
|
|
47
|
-
return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
function encode(decoded) {
|
|
51
|
-
const writer = new StringWriter();
|
|
52
|
-
let sourcesIndex = 0;
|
|
53
|
-
let sourceLine = 0;
|
|
54
|
-
let sourceColumn = 0;
|
|
55
|
-
let namesIndex = 0;
|
|
56
|
-
for (let i = 0; i < decoded.length; i++) {
|
|
57
|
-
const line = decoded[i];
|
|
58
|
-
if (i > 0) writer.write(semicolon);
|
|
59
|
-
if (line.length === 0) continue;
|
|
60
|
-
let genColumn = 0;
|
|
61
|
-
for (let j = 0; j < line.length; j++) {
|
|
62
|
-
const segment = line[j];
|
|
63
|
-
if (j > 0) writer.write(comma);
|
|
64
|
-
genColumn = encodeInteger(writer, segment[0], genColumn);
|
|
65
|
-
if (segment.length === 1) continue;
|
|
66
|
-
sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);
|
|
67
|
-
sourceLine = encodeInteger(writer, segment[2], sourceLine);
|
|
68
|
-
sourceColumn = encodeInteger(writer, segment[3], sourceColumn);
|
|
69
|
-
if (segment.length === 4) continue;
|
|
70
|
-
namesIndex = encodeInteger(writer, segment[4], namesIndex);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
return writer.flush();
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
//#endregion
|
|
77
|
-
export { encode };
|
|
78
|
-
//# sourceMappingURL=sourcemap-codec.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sourcemap-codec.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs"],"sourcesContent":["// src/vlq.ts\nvar comma = \",\".charCodeAt(0);\nvar semicolon = \";\".charCodeAt(0);\nvar chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\nvar intToChar = new Uint8Array(64);\nvar charToInt = new Uint8Array(128);\nfor (let i = 0; i < chars.length; i++) {\n const c = chars.charCodeAt(i);\n intToChar[i] = c;\n charToInt[c] = i;\n}\nfunction decodeInteger(reader, relative) {\n let value = 0;\n let shift = 0;\n let integer = 0;\n do {\n const c = reader.next();\n integer = charToInt[c];\n value |= (integer & 31) << shift;\n shift += 5;\n } while (integer & 32);\n const shouldNegate = value & 1;\n value >>>= 1;\n if (shouldNegate) {\n value = -2147483648 | -value;\n }\n return relative + value;\n}\nfunction encodeInteger(builder, num, relative) {\n let delta = num - relative;\n delta = delta < 0 ? -delta << 1 | 1 : delta << 1;\n do {\n let clamped = delta & 31;\n delta >>>= 5;\n if (delta > 0) clamped |= 32;\n builder.write(intToChar[clamped]);\n } while (delta > 0);\n return num;\n}\nfunction hasMoreVlq(reader, max) {\n if (reader.pos >= max) return false;\n return reader.peek() !== comma;\n}\n\n// src/strings.ts\nvar bufLength = 1024 * 16;\nvar td = typeof TextDecoder !== \"undefined\" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== \"undefined\" ? {\n decode(buf) {\n const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);\n return out.toString();\n }\n} : {\n decode(buf) {\n let out = \"\";\n for (let i = 0; i < buf.length; i++) {\n out += String.fromCharCode(buf[i]);\n }\n return out;\n }\n};\nvar StringWriter = class {\n constructor() {\n this.pos = 0;\n this.out = \"\";\n this.buffer = new Uint8Array(bufLength);\n }\n write(v) {\n const { buffer } = this;\n buffer[this.pos++] = v;\n if (this.pos === bufLength) {\n this.out += td.decode(buffer);\n this.pos = 0;\n }\n }\n flush() {\n const { buffer, out, pos } = this;\n return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;\n }\n};\nvar StringReader = class {\n constructor(buffer) {\n this.pos = 0;\n this.buffer = buffer;\n }\n next() {\n return this.buffer.charCodeAt(this.pos++);\n }\n peek() {\n return this.buffer.charCodeAt(this.pos);\n }\n indexOf(char) {\n const { buffer, pos } = this;\n const idx = buffer.indexOf(char, pos);\n return idx === -1 ? buffer.length : idx;\n }\n};\n\n// src/scopes.ts\nvar EMPTY = [];\nfunction decodeOriginalScopes(input) {\n const { length } = input;\n const reader = new StringReader(input);\n const scopes = [];\n const stack = [];\n let line = 0;\n for (; reader.pos < length; reader.pos++) {\n line = decodeInteger(reader, line);\n const column = decodeInteger(reader, 0);\n if (!hasMoreVlq(reader, length)) {\n const last = stack.pop();\n last[2] = line;\n last[3] = column;\n continue;\n }\n const kind = decodeInteger(reader, 0);\n const fields = decodeInteger(reader, 0);\n const hasName = fields & 1;\n const scope = hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind];\n let vars = EMPTY;\n if (hasMoreVlq(reader, length)) {\n vars = [];\n do {\n const varsIndex = decodeInteger(reader, 0);\n vars.push(varsIndex);\n } while (hasMoreVlq(reader, length));\n }\n scope.vars = vars;\n scopes.push(scope);\n stack.push(scope);\n }\n return scopes;\n}\nfunction encodeOriginalScopes(scopes) {\n const writer = new StringWriter();\n for (let i = 0; i < scopes.length; ) {\n i = _encodeOriginalScopes(scopes, i, writer, [0]);\n }\n return writer.flush();\n}\nfunction _encodeOriginalScopes(scopes, index, writer, state) {\n const scope = scopes[index];\n const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;\n if (index > 0) writer.write(comma);\n state[0] = encodeInteger(writer, startLine, state[0]);\n encodeInteger(writer, startColumn, 0);\n encodeInteger(writer, kind, 0);\n const fields = scope.length === 6 ? 1 : 0;\n encodeInteger(writer, fields, 0);\n if (scope.length === 6) encodeInteger(writer, scope[5], 0);\n for (const v of vars) {\n encodeInteger(writer, v, 0);\n }\n for (index++; index < scopes.length; ) {\n const next = scopes[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || l === endLine && c >= endColumn) {\n break;\n }\n index = _encodeOriginalScopes(scopes, index, writer, state);\n }\n writer.write(comma);\n state[0] = encodeInteger(writer, endLine, state[0]);\n encodeInteger(writer, endColumn, 0);\n return index;\n}\nfunction decodeGeneratedRanges(input) {\n const { length } = input;\n const reader = new StringReader(input);\n const ranges = [];\n const stack = [];\n let genLine = 0;\n let definitionSourcesIndex = 0;\n let definitionScopeIndex = 0;\n let callsiteSourcesIndex = 0;\n let callsiteLine = 0;\n let callsiteColumn = 0;\n let bindingLine = 0;\n let bindingColumn = 0;\n do {\n const semi = reader.indexOf(\";\");\n let genColumn = 0;\n for (; reader.pos < semi; reader.pos++) {\n genColumn = decodeInteger(reader, genColumn);\n if (!hasMoreVlq(reader, semi)) {\n const last = stack.pop();\n last[2] = genLine;\n last[3] = genColumn;\n continue;\n }\n const fields = decodeInteger(reader, 0);\n const hasDefinition = fields & 1;\n const hasCallsite = fields & 2;\n const hasScope = fields & 4;\n let callsite = null;\n let bindings = EMPTY;\n let range;\n if (hasDefinition) {\n const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);\n definitionScopeIndex = decodeInteger(\n reader,\n definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0\n );\n definitionSourcesIndex = defSourcesIndex;\n range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex];\n } else {\n range = [genLine, genColumn, 0, 0];\n }\n range.isScope = !!hasScope;\n if (hasCallsite) {\n const prevCsi = callsiteSourcesIndex;\n const prevLine = callsiteLine;\n callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex);\n const sameSource = prevCsi === callsiteSourcesIndex;\n callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0);\n callsiteColumn = decodeInteger(\n reader,\n sameSource && prevLine === callsiteLine ? callsiteColumn : 0\n );\n callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];\n }\n range.callsite = callsite;\n if (hasMoreVlq(reader, semi)) {\n bindings = [];\n do {\n bindingLine = genLine;\n bindingColumn = genColumn;\n const expressionsCount = decodeInteger(reader, 0);\n let expressionRanges;\n if (expressionsCount < -1) {\n expressionRanges = [[decodeInteger(reader, 0)]];\n for (let i = -1; i > expressionsCount; i--) {\n const prevBl = bindingLine;\n bindingLine = decodeInteger(reader, bindingLine);\n bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0);\n const expression = decodeInteger(reader, 0);\n expressionRanges.push([expression, bindingLine, bindingColumn]);\n }\n } else {\n expressionRanges = [[expressionsCount]];\n }\n bindings.push(expressionRanges);\n } while (hasMoreVlq(reader, semi));\n }\n range.bindings = bindings;\n ranges.push(range);\n stack.push(range);\n }\n genLine++;\n reader.pos = semi + 1;\n } while (reader.pos < length);\n return ranges;\n}\nfunction encodeGeneratedRanges(ranges) {\n if (ranges.length === 0) return \"\";\n const writer = new StringWriter();\n for (let i = 0; i < ranges.length; ) {\n i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);\n }\n return writer.flush();\n}\nfunction _encodeGeneratedRanges(ranges, index, writer, state) {\n const range = ranges[index];\n const {\n 0: startLine,\n 1: startColumn,\n 2: endLine,\n 3: endColumn,\n isScope,\n callsite,\n bindings\n } = range;\n if (state[0] < startLine) {\n catchupLine(writer, state[0], startLine);\n state[0] = startLine;\n state[1] = 0;\n } else if (index > 0) {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, range[1], state[1]);\n const fields = (range.length === 6 ? 1 : 0) | (callsite ? 2 : 0) | (isScope ? 4 : 0);\n encodeInteger(writer, fields, 0);\n if (range.length === 6) {\n const { 4: sourcesIndex, 5: scopesIndex } = range;\n if (sourcesIndex !== state[2]) {\n state[3] = 0;\n }\n state[2] = encodeInteger(writer, sourcesIndex, state[2]);\n state[3] = encodeInteger(writer, scopesIndex, state[3]);\n }\n if (callsite) {\n const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite;\n if (sourcesIndex !== state[4]) {\n state[5] = 0;\n state[6] = 0;\n } else if (callLine !== state[5]) {\n state[6] = 0;\n }\n state[4] = encodeInteger(writer, sourcesIndex, state[4]);\n state[5] = encodeInteger(writer, callLine, state[5]);\n state[6] = encodeInteger(writer, callColumn, state[6]);\n }\n if (bindings) {\n for (const binding of bindings) {\n if (binding.length > 1) encodeInteger(writer, -binding.length, 0);\n const expression = binding[0][0];\n encodeInteger(writer, expression, 0);\n let bindingStartLine = startLine;\n let bindingStartColumn = startColumn;\n for (let i = 1; i < binding.length; i++) {\n const expRange = binding[i];\n bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine);\n bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn);\n encodeInteger(writer, expRange[0], 0);\n }\n }\n }\n for (index++; index < ranges.length; ) {\n const next = ranges[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || l === endLine && c >= endColumn) {\n break;\n }\n index = _encodeGeneratedRanges(ranges, index, writer, state);\n }\n if (state[0] < endLine) {\n catchupLine(writer, state[0], endLine);\n state[0] = endLine;\n state[1] = 0;\n } else {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, endColumn, state[1]);\n return index;\n}\nfunction catchupLine(writer, lastLine, line) {\n do {\n writer.write(semicolon);\n } while (++lastLine < line);\n}\n\n// src/sourcemap-codec.ts\nfunction decode(mappings) {\n const { length } = mappings;\n const reader = new StringReader(mappings);\n const decoded = [];\n let genColumn = 0;\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n do {\n const semi = reader.indexOf(\";\");\n const line = [];\n let sorted = true;\n let lastCol = 0;\n genColumn = 0;\n while (reader.pos < semi) {\n let seg;\n genColumn = decodeInteger(reader, genColumn);\n if (genColumn < lastCol) sorted = false;\n lastCol = genColumn;\n if (hasMoreVlq(reader, semi)) {\n sourcesIndex = decodeInteger(reader, sourcesIndex);\n sourceLine = decodeInteger(reader, sourceLine);\n sourceColumn = decodeInteger(reader, sourceColumn);\n if (hasMoreVlq(reader, semi)) {\n namesIndex = decodeInteger(reader, namesIndex);\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];\n } else {\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];\n }\n } else {\n seg = [genColumn];\n }\n line.push(seg);\n reader.pos++;\n }\n if (!sorted) sort(line);\n decoded.push(line);\n reader.pos = semi + 1;\n } while (reader.pos <= length);\n return decoded;\n}\nfunction sort(line) {\n line.sort(sortComparator);\n}\nfunction sortComparator(a, b) {\n return a[0] - b[0];\n}\nfunction encode(decoded) {\n const writer = new StringWriter();\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n if (i > 0) writer.write(semicolon);\n if (line.length === 0) continue;\n let genColumn = 0;\n for (let j = 0; j < line.length; j++) {\n const segment = line[j];\n if (j > 0) writer.write(comma);\n genColumn = encodeInteger(writer, segment[0], genColumn);\n if (segment.length === 1) continue;\n sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);\n sourceLine = encodeInteger(writer, segment[2], sourceLine);\n sourceColumn = encodeInteger(writer, segment[3], sourceColumn);\n if (segment.length === 4) continue;\n namesIndex = encodeInteger(writer, segment[4], namesIndex);\n }\n }\n return writer.flush();\n}\nexport {\n decode,\n decodeGeneratedRanges,\n decodeOriginalScopes,\n encode,\n encodeGeneratedRanges,\n encodeOriginalScopes\n};\n//# sourceMappingURL=sourcemap-codec.mjs.map\n"],"x_google_ignoreList":[0],"mappings":";AACA,IAAI,QAAQ,IAAI,WAAW,EAAE;AAC7B,IAAI,YAAY,IAAI,WAAW,EAAE;AACjC,IAAI,QAAQ;AACZ,IAAI,YAAY,IAAI,WAAW,GAAG;AAClC,IAAI,YAAY,IAAI,WAAW,IAAI;AACnC,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;CACrC,MAAM,IAAI,MAAM,WAAW,EAAE;AAC7B,WAAU,KAAK;AACf,WAAU,KAAK;;AAmBjB,SAAS,cAAc,SAAS,KAAK,UAAU;CAC7C,IAAI,QAAQ,MAAM;AAClB,SAAQ,QAAQ,IAAI,CAAC,SAAS,IAAI,IAAI,SAAS;AAC/C,IAAG;EACD,IAAI,UAAU,QAAQ;AACtB,aAAW;AACX,MAAI,QAAQ,EAAG,YAAW;AAC1B,UAAQ,MAAM,UAAU,SAAS;UAC1B,QAAQ;AACjB,QAAO;;AAQT,IAAI,YAAY,OAAO;AACvB,IAAI,KAAK,OAAO,gBAAgB,8BAA8B,IAAI,aAAa,GAAG,OAAO,WAAW,cAAc,EAChH,OAAO,KAAK;AAEV,QADY,OAAO,KAAK,IAAI,QAAQ,IAAI,YAAY,IAAI,WAAW,CACxD,UAAU;GAExB,GAAG,EACF,OAAO,KAAK;CACV,IAAI,MAAM;AACV,MAAK,IAAI,IAAI,GAAG,IAAI,IAAI,QAAQ,IAC9B,QAAO,OAAO,aAAa,IAAI,GAAG;AAEpC,QAAO;GAEV;AACD,IAAI,eAAe,MAAM;CACvB,cAAc;AACZ,OAAK,MAAM;AACX,OAAK,MAAM;AACX,OAAK,SAAS,IAAI,WAAW,UAAU;;CAEzC,MAAM,GAAG;EACP,MAAM,EAAE,WAAW;AACnB,SAAO,KAAK,SAAS;AACrB,MAAI,KAAK,QAAQ,WAAW;AAC1B,QAAK,OAAO,GAAG,OAAO,OAAO;AAC7B,QAAK,MAAM;;;CAGf,QAAQ;EACN,MAAM,EAAE,QAAQ,KAAK,QAAQ;AAC7B,SAAO,MAAM,IAAI,MAAM,GAAG,OAAO,OAAO,SAAS,GAAG,IAAI,CAAC,GAAG;;;AAyThE,SAAS,OAAO,SAAS;CACvB,MAAM,SAAS,IAAI,cAAc;CACjC,IAAI,eAAe;CACnB,IAAI,aAAa;CACjB,IAAI,eAAe;CACnB,IAAI,aAAa;AACjB,MAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;EACvC,MAAM,OAAO,QAAQ;AACrB,MAAI,IAAI,EAAG,QAAO,MAAM,UAAU;AAClC,MAAI,KAAK,WAAW,EAAG;EACvB,IAAI,YAAY;AAChB,OAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;GACpC,MAAM,UAAU,KAAK;AACrB,OAAI,IAAI,EAAG,QAAO,MAAM,MAAM;AAC9B,eAAY,cAAc,QAAQ,QAAQ,IAAI,UAAU;AACxD,OAAI,QAAQ,WAAW,EAAG;AAC1B,kBAAe,cAAc,QAAQ,QAAQ,IAAI,aAAa;AAC9D,gBAAa,cAAc,QAAQ,QAAQ,IAAI,WAAW;AAC1D,kBAAe,cAAc,QAAQ,QAAQ,IAAI,aAAa;AAC9D,OAAI,QAAQ,WAAW,EAAG;AAC1B,gBAAa,cAAc,QAAQ,QAAQ,IAAI,WAAW;;;AAG9D,QAAO,OAAO,OAAO"}
|