@powerlines/plugin-babel 0.12.130 → 0.12.131
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/ast-utils-BcmWaIan.cjs +45 -0
- package/dist/ast-utils-Bs6DBkKg.d.mts +19 -0
- package/dist/ast-utils-DU1foCxH.mjs +32 -0
- package/dist/ast-utils-DeuXcuqs.d.cts +19 -0
- package/dist/babel-B9i2IAT_.d.cts +1805 -0
- package/dist/babel-DY_imD3U.d.mts +1805 -0
- package/dist/{_virtual/rolldown_runtime.cjs → chunk-CbDLau6x.cjs} +6 -1
- package/dist/create-plugin-BPSvsem_.mjs +73 -0
- package/dist/create-plugin-CNzMrex8.d.mts +14 -0
- package/dist/create-plugin-CQA6zFdt.d.cts +14 -0
- package/dist/create-plugin-Cs1zZrvI.cjs +80 -0
- package/dist/filters-93Z-7Nov.d.mts +44 -0
- package/dist/filters-C04cfcQR.mjs +55 -0
- package/dist/filters-D6Qe6UbO.d.cts +41 -0
- package/dist/filters-Dl2RKvrm.cjs +79 -0
- package/dist/helpers/ast-utils.cjs +3 -34
- package/dist/helpers/ast-utils.d.cts +2 -19
- package/dist/helpers/ast-utils.d.mts +2 -19
- package/dist/helpers/ast-utils.mjs +1 -30
- package/dist/helpers/create-plugin.cjs +2 -40
- package/dist/helpers/create-plugin.d.cts +2 -14
- package/dist/helpers/create-plugin.d.mts +2 -14
- package/dist/helpers/create-plugin.mjs +1 -37
- package/dist/helpers/filters.cjs +5 -58
- package/dist/helpers/filters.d.cts +2 -41
- package/dist/helpers/filters.d.mts +2 -42
- package/dist/helpers/filters.mjs +1 -53
- package/dist/helpers/index.cjs +22 -21
- package/dist/helpers/index.d.cts +7 -5
- package/dist/helpers/index.d.mts +7 -5
- package/dist/helpers/index.mjs +6 -5
- package/dist/helpers/module-helpers.cjs +9 -102
- package/dist/helpers/module-helpers.d.cts +2 -48
- package/dist/helpers/module-helpers.d.mts +2 -48
- package/dist/helpers/module-helpers.mjs +2 -93
- package/dist/helpers/options.cjs +4 -49
- package/dist/helpers/options.d.cts +2 -17
- package/dist/helpers/options.d.mts +2 -17
- package/dist/helpers/options.mjs +2 -45
- package/dist/helpers-BnW_4z5h.mjs +1 -0
- package/dist/helpers-Bx2yBrpn.cjs +0 -0
- package/dist/index-ClXLQ1fw.d.mts +1 -0
- package/dist/index-DeEmP3Jc.d.cts +1 -0
- package/dist/index-QbUkWSLh.d.mts +1 -0
- package/dist/index-zO0Ly4bS.d.cts +1 -0
- package/dist/index.cjs +29 -27
- package/dist/index.d.cts +9 -8
- package/dist/index.d.mts +9 -9
- package/dist/index.mjs +8 -6
- package/dist/module-helpers-Ckq8sc4l.mjs +95 -0
- package/dist/module-helpers-DRUocgcq.d.cts +49 -0
- package/dist/module-helpers-DiSYdstQ.d.mts +49 -0
- package/dist/module-helpers-Non-jHMu.cjs +138 -0
- package/dist/options-BQhc80ih.mjs +47 -0
- package/dist/options-CCMyIIWc.d.cts +17 -0
- package/dist/options-DgdPmsbF.d.mts +17 -0
- package/dist/options-u2MhTIFH.cjs +60 -0
- package/dist/plugin-BL8TLixo.mjs +1 -0
- package/dist/plugin-BSBH78mm.cjs +0 -0
- package/dist/plugin-Bc0EOyGF.d.mts +17 -0
- package/dist/plugin-DhjfPNQS.d.cts +17 -0
- package/dist/types/index.cjs +2 -0
- package/dist/types/index.d.cts +3 -1
- package/dist/types/index.d.mts +3 -1
- package/dist/types/index.mjs +3 -0
- package/dist/types/plugin.cjs +1 -0
- package/dist/types/plugin.d.cts +2 -18
- package/dist/types/plugin.d.mts +2 -18
- package/dist/types/plugin.mjs +2 -0
- package/dist/types-CKPddlfS.cjs +0 -0
- package/dist/types-CvhspRRt.mjs +1 -0
- package/package.json +3 -3
- package/dist/powerlines/src/internal/helpers/hooks.d.mts +0 -5
- package/dist/powerlines/src/lib/logger.cjs +0 -41
- package/dist/powerlines/src/lib/logger.mjs +0 -39
- package/dist/powerlines/src/types/api.d.mts +0 -5
- package/dist/powerlines/src/types/babel.d.cts +0 -50
- package/dist/powerlines/src/types/babel.d.mts +0 -50
- package/dist/powerlines/src/types/build.d.cts +0 -145
- package/dist/powerlines/src/types/build.d.mts +0 -145
- package/dist/powerlines/src/types/commands.d.cts +0 -8
- package/dist/powerlines/src/types/commands.d.mts +0 -9
- package/dist/powerlines/src/types/config.d.cts +0 -380
- package/dist/powerlines/src/types/config.d.mts +0 -380
- package/dist/powerlines/src/types/context.d.cts +0 -403
- package/dist/powerlines/src/types/context.d.mts +0 -405
- package/dist/powerlines/src/types/fs.d.cts +0 -486
- package/dist/powerlines/src/types/fs.d.mts +0 -486
- package/dist/powerlines/src/types/hooks.d.mts +0 -2
- package/dist/powerlines/src/types/index.d.mts +0 -12
- package/dist/powerlines/src/types/plugin.d.cts +0 -231
- package/dist/powerlines/src/types/plugin.d.mts +0 -231
- package/dist/powerlines/src/types/resolved.d.cts +0 -82
- package/dist/powerlines/src/types/resolved.d.mts +0 -82
- package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
- package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
- package/dist/powerlines/src/types/unplugin.d.mts +0 -6
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
const require_chunk = require('./chunk-CbDLau6x.cjs');
|
|
2
|
+
let __babel_generator = require("@babel/generator");
|
|
3
|
+
__babel_generator = require_chunk.__toESM(__babel_generator);
|
|
4
|
+
let __babel_parser = require("@babel/parser");
|
|
5
|
+
|
|
6
|
+
//#region src/helpers/ast-utils.ts
|
|
7
|
+
/**
|
|
8
|
+
* Parse the given code into an AST.
|
|
9
|
+
*
|
|
10
|
+
* @param code - The code to parse.
|
|
11
|
+
* @param opts - The options for parsing.
|
|
12
|
+
* @returns The parsed AST.
|
|
13
|
+
*/
|
|
14
|
+
function parseAst(code, opts = {}) {
|
|
15
|
+
return (0, __babel_parser.parse)(code, {
|
|
16
|
+
plugins: ["typescript"],
|
|
17
|
+
sourceType: "module",
|
|
18
|
+
allowImportExportEverywhere: true,
|
|
19
|
+
allowAwaitOutsideFunction: true,
|
|
20
|
+
...opts
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
let generate = __babel_generator.default;
|
|
24
|
+
if ("default" in generate) generate = generate.default;
|
|
25
|
+
function generateFromAst(ast, opts) {
|
|
26
|
+
return generate(ast, opts ? {
|
|
27
|
+
importAttributesKeyword: "with",
|
|
28
|
+
sourceMaps: true,
|
|
29
|
+
...opts
|
|
30
|
+
} : void 0);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
Object.defineProperty(exports, 'generateFromAst', {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
get: function () {
|
|
37
|
+
return generateFromAst;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(exports, 'parseAst', {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
get: function () {
|
|
43
|
+
return parseAst;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { GeneratorOptions, GeneratorResult, GeneratorResult as GeneratorResult$1 } from "@babel/generator";
|
|
2
|
+
import { ParseResult, ParserOptions } from "@babel/parser";
|
|
3
|
+
import * as t from "@babel/types";
|
|
4
|
+
|
|
5
|
+
//#region src/helpers/ast-utils.d.ts
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Parse the given code into an AST.
|
|
9
|
+
*
|
|
10
|
+
* @param code - The code to parse.
|
|
11
|
+
* @param opts - The options for parsing.
|
|
12
|
+
* @returns The parsed AST.
|
|
13
|
+
*/
|
|
14
|
+
declare function parseAst(code: string, opts?: ParserOptions): ParseResult<t.File>;
|
|
15
|
+
type GenerateFromAstOptions = GeneratorOptions & Required<Pick<GeneratorOptions, "sourceFileName" | "filename">>;
|
|
16
|
+
declare function generateFromAst(ast: t.Node, opts?: GenerateFromAstOptions): GeneratorResult;
|
|
17
|
+
declare type __ΩGenerateFromAstOptions = any[];
|
|
18
|
+
//#endregion
|
|
19
|
+
export { parseAst as a, generateFromAst as i, GeneratorResult$1 as n, __ΩGenerateFromAstOptions as r, GenerateFromAstOptions as t };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import _generate from "@babel/generator";
|
|
2
|
+
import { parse } from "@babel/parser";
|
|
3
|
+
|
|
4
|
+
//#region src/helpers/ast-utils.ts
|
|
5
|
+
/**
|
|
6
|
+
* Parse the given code into an AST.
|
|
7
|
+
*
|
|
8
|
+
* @param code - The code to parse.
|
|
9
|
+
* @param opts - The options for parsing.
|
|
10
|
+
* @returns The parsed AST.
|
|
11
|
+
*/
|
|
12
|
+
function parseAst(code, opts = {}) {
|
|
13
|
+
return parse(code, {
|
|
14
|
+
plugins: ["typescript"],
|
|
15
|
+
sourceType: "module",
|
|
16
|
+
allowImportExportEverywhere: true,
|
|
17
|
+
allowAwaitOutsideFunction: true,
|
|
18
|
+
...opts
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
let generate = _generate;
|
|
22
|
+
if ("default" in generate) generate = generate.default;
|
|
23
|
+
function generateFromAst(ast, opts) {
|
|
24
|
+
return generate(ast, opts ? {
|
|
25
|
+
importAttributesKeyword: "with",
|
|
26
|
+
sourceMaps: true,
|
|
27
|
+
...opts
|
|
28
|
+
} : void 0);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
export { parseAst as n, generateFromAst as t };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { GeneratorOptions, GeneratorResult, GeneratorResult as GeneratorResult$1 } from "@babel/generator";
|
|
2
|
+
import { ParseResult, ParserOptions } from "@babel/parser";
|
|
3
|
+
import * as t from "@babel/types";
|
|
4
|
+
|
|
5
|
+
//#region src/helpers/ast-utils.d.ts
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Parse the given code into an AST.
|
|
9
|
+
*
|
|
10
|
+
* @param code - The code to parse.
|
|
11
|
+
* @param opts - The options for parsing.
|
|
12
|
+
* @returns The parsed AST.
|
|
13
|
+
*/
|
|
14
|
+
declare function parseAst(code: string, opts?: ParserOptions): ParseResult<t.File>;
|
|
15
|
+
type GenerateFromAstOptions = GeneratorOptions & Required<Pick<GeneratorOptions, "sourceFileName" | "filename">>;
|
|
16
|
+
declare function generateFromAst(ast: t.Node, opts?: GenerateFromAstOptions): GeneratorResult;
|
|
17
|
+
declare type __ΩGenerateFromAstOptions = any[];
|
|
18
|
+
//#endregion
|
|
19
|
+
export { parseAst as a, generateFromAst as i, GeneratorResult$1 as n, __ΩGenerateFromAstOptions as r, GenerateFromAstOptions as t };
|