@powerlines/plugin-babel 0.12.56 → 0.12.58
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 +8 -2
- package/dist/ast-utils-BXgehtOj.cjs +1 -0
- package/dist/{helpers/ast-utils.d.ts → ast-utils-Bs6DBkKg.d.mts} +8 -7
- package/dist/ast-utils-Bs6DBkKg.d.mts.map +1 -0
- package/dist/ast-utils-DeuXcuqs.d.cts +20 -0
- package/dist/ast-utils-DeuXcuqs.d.cts.map +1 -0
- package/dist/ast-utils-QwV5Hp9M.mjs +2 -0
- package/dist/ast-utils-QwV5Hp9M.mjs.map +1 -0
- package/dist/babel-B0EpFTZb.d.cts +1696 -0
- package/dist/babel-B0EpFTZb.d.cts.map +1 -0
- package/dist/babel-DioHQPr5.d.mts +1696 -0
- package/dist/babel-DioHQPr5.d.mts.map +1 -0
- package/dist/chunk-Bmb41Sf3.cjs +1 -0
- package/dist/create-plugin-BX_bUhNU.cjs +1 -0
- package/dist/create-plugin-C9XMtUiM.d.cts +15 -0
- package/dist/create-plugin-C9XMtUiM.d.cts.map +1 -0
- package/dist/create-plugin-o_LwpezO.d.mts +15 -0
- package/dist/create-plugin-o_LwpezO.d.mts.map +1 -0
- package/dist/create-plugin-pWE4rRW3.mjs +2 -0
- package/dist/create-plugin-pWE4rRW3.mjs.map +1 -0
- package/dist/{helpers/filters.d.ts → filters-C_9_knbA.d.cts} +5 -26
- package/dist/filters-C_9_knbA.d.cts.map +1 -0
- package/dist/filters-DJgM_YqO.cjs +1 -0
- package/dist/filters-H7GHqM8L.mjs +2 -0
- package/dist/filters-H7GHqM8L.mjs.map +1 -0
- package/dist/filters-pmcaYp4q.d.mts +45 -0
- package/dist/filters-pmcaYp4q.d.mts.map +1 -0
- package/dist/helpers/ast-utils.cjs +1 -7
- package/dist/helpers/ast-utils.d.cts +2 -19
- package/dist/helpers/ast-utils.d.mts +2 -0
- package/dist/helpers/ast-utils.mjs +1 -0
- package/dist/helpers/create-plugin.cjs +1 -7
- package/dist/helpers/create-plugin.d.cts +3 -35
- package/dist/helpers/create-plugin.d.mts +3 -0
- package/dist/helpers/create-plugin.mjs +1 -0
- package/dist/helpers/filters.cjs +1 -7
- package/dist/helpers/filters.d.cts +3 -63
- package/dist/helpers/filters.d.mts +3 -0
- package/dist/helpers/filters.mjs +1 -0
- package/dist/helpers/index.cjs +1 -1
- package/dist/helpers/index.d.cts +8 -32
- package/dist/helpers/index.d.mts +8 -0
- package/dist/helpers/index.mjs +1 -0
- package/dist/helpers/module-helpers.cjs +1 -7
- package/dist/helpers/module-helpers.d.cts +3 -69
- package/dist/helpers/module-helpers.d.mts +3 -0
- package/dist/helpers/module-helpers.mjs +1 -0
- package/dist/helpers/options.cjs +1 -7
- package/dist/helpers/options.d.cts +3 -38
- package/dist/helpers/options.d.mts +3 -0
- package/dist/helpers/options.mjs +1 -0
- package/dist/helpers-C23KLU23.mjs +1 -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 +1 -7
- package/dist/index.d.cts +13 -36
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +21 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -0
- package/dist/{helpers/module-helpers.d.ts → module-helpers-BzPwtKvm.d.cts} +9 -28
- package/dist/module-helpers-BzPwtKvm.d.cts.map +1 -0
- package/dist/module-helpers-CBJeXQA-.cjs +1 -0
- package/dist/module-helpers-CFI-GsFM.mjs +2 -0
- package/dist/module-helpers-CFI-GsFM.mjs.map +1 -0
- package/dist/module-helpers-c5XPX8yl.d.mts +50 -0
- package/dist/module-helpers-c5XPX8yl.d.mts.map +1 -0
- package/dist/options-BKuJqVQa.d.cts +18 -0
- package/dist/options-BKuJqVQa.d.cts.map +1 -0
- package/dist/options-DqYK3Sbw.d.mts +18 -0
- package/dist/options-DqYK3Sbw.d.mts.map +1 -0
- package/dist/options-WrgZrzO5.mjs +2 -0
- package/dist/options-WrgZrzO5.mjs.map +1 -0
- package/dist/options-d1d8EwPZ.cjs +1 -0
- package/dist/plugin-BSBH78mm.cjs +0 -0
- package/dist/plugin-CpyJWCZI.mjs +1 -0
- package/dist/plugin-DNeuXNS0.d.cts +18 -0
- package/dist/plugin-DNeuXNS0.d.cts.map +1 -0
- package/dist/plugin-sSlCWUMB.d.mts +18 -0
- package/dist/plugin-sSlCWUMB.d.mts.map +1 -0
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.d.cts +4 -25
- package/dist/types/index.d.mts +4 -0
- package/dist/types/index.mjs +1 -0
- package/dist/types/plugin.cjs +1 -1
- package/dist/types/plugin.d.cts +3 -39
- package/dist/types/plugin.d.mts +3 -0
- package/dist/types/plugin.mjs +1 -0
- package/dist/types-CKPddlfS.cjs +0 -0
- package/dist/types-cM7ObqRe.mjs +1 -0
- package/package.json +52 -34
- package/dist/chunk-FBBMZ4NC.cjs +0 -7
- package/dist/chunk-UCUR73HG.js +0 -7
- package/dist/helpers/ast-utils.js +0 -7
- package/dist/helpers/create-plugin.d.ts +0 -35
- package/dist/helpers/create-plugin.js +0 -7
- package/dist/helpers/filters.js +0 -7
- package/dist/helpers/index.d.ts +0 -32
- package/dist/helpers/index.js +0 -1
- package/dist/helpers/module-helpers.js +0 -7
- package/dist/helpers/options.d.ts +0 -38
- package/dist/helpers/options.js +0 -7
- package/dist/index.d.ts +0 -44
- package/dist/index.js +0 -7
- package/dist/plugin-C57J4nVr.d.cts +0 -1615
- package/dist/plugin-C57J4nVr.d.ts +0 -1615
- package/dist/types/index.d.ts +0 -25
- package/dist/types/index.js +0 -1
- package/dist/types/plugin.d.ts +0 -39
- /package/dist/{types/plugin.js → helpers-Bx2yBrpn.cjs} +0 -0
package/README.md
CHANGED
|
@@ -3,7 +3,13 @@
|
|
|
3
3
|
<!-- markdownlint-disable -->
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
<div align="center"
|
|
6
|
+
<div align="center">
|
|
7
|
+
<picture>
|
|
8
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/powerlines/banner-1280x640-dark-optimized.gif">
|
|
9
|
+
<source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/powerlines/banner-1280x640-light-optimized.gif">
|
|
10
|
+
<img src="https://public.storm-cdn.com/powerlines/banner-1280x640-dark-optimized.gif" width="100%" alt="Powerlines" />
|
|
11
|
+
</picture>
|
|
12
|
+
</div>
|
|
7
13
|
<br />
|
|
8
14
|
|
|
9
15
|
<div align="center">
|
|
@@ -16,7 +22,7 @@
|
|
|
16
22
|
</div>
|
|
17
23
|
|
|
18
24
|
<br />
|
|
19
|
-
This package is part of the
|
|
25
|
+
This package is part of the 🔌 <b>Powerlines</b> monorepo. Powerlines packages include CLI utility applications, tools, and various libraries used to create modern, scalable web applications.
|
|
20
26
|
<br />
|
|
21
27
|
|
|
22
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 />
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`@babel/generator`);t=e.t(t);let n=require(`@babel/parser`);function r(e,t={}){return(0,n.parse)(e,{plugins:[`typescript`],sourceType:`module`,allowImportExportEverywhere:!0,allowAwaitOutsideFunction:!0,...t})}let i=t.default;`default`in i&&(i=i.default);function a(e,t){return i(e,t?{importAttributesKeyword:`with`,sourceMaps:!0,...t}:void 0)}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { GeneratorOptions, GeneratorResult } from
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
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
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Parse the given code into an AST.
|
|
@@ -13,7 +14,7 @@ import * as t from '@babel/types';
|
|
|
13
14
|
declare function parseAst(code: string, opts?: ParserOptions): ParseResult<t.File>;
|
|
14
15
|
type GenerateFromAstOptions = GeneratorOptions & Required<Pick<GeneratorOptions, "sourceFileName" | "filename">>;
|
|
15
16
|
declare function generateFromAst(ast: t.Node, opts?: GenerateFromAstOptions): GeneratorResult;
|
|
16
|
-
|
|
17
17
|
declare type __ΩGenerateFromAstOptions = any[];
|
|
18
|
-
|
|
19
|
-
export {
|
|
18
|
+
//#endregion
|
|
19
|
+
export { parseAst as a, generateFromAst as i, GeneratorResult$1 as n, __ΩGenerateFromAstOptions as r, GenerateFromAstOptions as t };
|
|
20
|
+
//# sourceMappingURL=ast-utils-Bs6DBkKg.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ast-utils-Bs6DBkKg.d.mts","names":[],"sources":["../src/helpers/ast-utils.ts"],"sourcesContent":[],"mappings":";;;;;;;;AA+BA;;;;;AAkBY,iBAlBI,QAAA,CAkBkB,IAAA,EAAA,MAAA,EAAA,IAAA,CAAA,EAhB1B,aAgB0B,CAAA,EAf/B,WAe+B,CAfnB,CAAA,CAAE,IAeiB,CAAA;AAAG,KAAzB,sBAAA,GAAyB,gBAAA,GACnC,QADmC,CAC1B,IAD0B,CACrB,gBADqB,EAAA,gBAAA,GAAA,UAAA,CAAA,CAAA;AACrB,iBAEA,eAAA,CAFA,GAAA,EAGT,CAAA,CAAE,IAHO,EAAA,IAAA,CAAA,EAIP,sBAJO,CAAA,EAKb,eALa;AAAd,yCAAA,GAAA,EAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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 };
|
|
20
|
+
//# sourceMappingURL=ast-utils-DeuXcuqs.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ast-utils-DeuXcuqs.d.cts","names":[],"sources":["../src/helpers/ast-utils.ts"],"sourcesContent":[],"mappings":";;;;;;;;AA+BA;;;;;AAkBY,iBAlBI,QAAA,CAkBkB,IAAA,EAAA,MAAA,EAAA,IAAA,CAAA,EAhB1B,aAgB0B,CAAA,EAf/B,WAe+B,CAfnB,CAAA,CAAE,IAeiB,CAAA;AAAG,KAAzB,sBAAA,GAAyB,gBAAA,GACnC,QADmC,CAC1B,IAD0B,CACrB,gBADqB,EAAA,gBAAA,GAAA,UAAA,CAAA,CAAA;AACrB,iBAEA,eAAA,CAFA,GAAA,EAGT,CAAA,CAAE,IAHO,EAAA,IAAA,CAAA,EAIP,sBAJO,CAAA,EAKb,eALa;AAAd,yCAAA,GAAA,EAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import e from"@babel/generator";import{parse as t}from"@babel/parser";function n(e,n={}){return t(e,{plugins:[`typescript`],sourceType:`module`,allowImportExportEverywhere:!0,allowAwaitOutsideFunction:!0,...n})}let r=e;`default`in r&&(r=r.default);function i(e,t){return r(e,t?{importAttributesKeyword:`with`,sourceMaps:!0,...t}:void 0)}export{n,i as t};
|
|
2
|
+
//# sourceMappingURL=ast-utils-QwV5Hp9M.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ast-utils-QwV5Hp9M.mjs","names":[],"sources":["../src/helpers/ast-utils.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 type { GeneratorOptions, GeneratorResult } from \"@babel/generator\";\nimport _generate from \"@babel/generator\";\nimport type { ParseResult, ParserOptions } from \"@babel/parser\";\nimport { parse } from \"@babel/parser\";\nimport type * as t from \"@babel/types\";\n\n/**\n * Parse the given code into an AST.\n *\n * @param code - The code to parse.\n * @param opts - The options for parsing.\n * @returns The parsed AST.\n */\nexport function parseAst(\n code: string,\n opts: ParserOptions = {}\n): ParseResult<t.File> {\n return parse(code, {\n plugins: [\"typescript\"],\n sourceType: \"module\",\n allowImportExportEverywhere: true,\n allowAwaitOutsideFunction: true,\n ...opts\n });\n}\n\nlet generate = _generate;\nif (\"default\" in generate) {\n generate = generate.default as typeof generate;\n}\n\nexport type GenerateFromAstOptions = GeneratorOptions &\n Required<Pick<GeneratorOptions, \"sourceFileName\" | \"filename\">>;\n\nexport function generateFromAst(\n ast: t.Node,\n opts?: GenerateFromAstOptions\n): GeneratorResult {\n return generate(\n ast,\n opts\n ? { importAttributesKeyword: \"with\", sourceMaps: true, ...opts }\n : undefined\n );\n}\n\nexport type { GeneratorResult } from \"@babel/generator\";\n"],"mappings":"sEA+BA,SAAgB,EACd,EACA,EAAsB,EAAE,CACH,CACrB,OAAO,EAAM,EAAM,CACjB,QAAS,CAAC,aAAa,CACvB,WAAY,SACZ,4BAA6B,GAC7B,0BAA2B,GAC3B,GAAG,EACJ,CAAC,CAGJ,IAAI,EAAW,EACX,YAAa,IACf,EAAW,EAAS,SAMtB,SAAgB,EACd,EACA,EACiB,CACjB,OAAO,EACL,EACA,EACI,CAAE,wBAAyB,OAAQ,WAAY,GAAM,GAAG,EAAM,CAC9D,IAAA,GACL"}
|