@powerlines/plugin-babel 0.12.55 → 0.12.57

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.
Files changed (112) hide show
  1. package/dist/ast-utils-BXgehtOj.cjs +1 -0
  2. package/dist/{helpers/ast-utils.d.ts → ast-utils-Bs6DBkKg.d.mts} +8 -7
  3. package/dist/ast-utils-Bs6DBkKg.d.mts.map +1 -0
  4. package/dist/ast-utils-DeuXcuqs.d.cts +20 -0
  5. package/dist/ast-utils-DeuXcuqs.d.cts.map +1 -0
  6. package/dist/ast-utils-QwV5Hp9M.mjs +2 -0
  7. package/dist/ast-utils-QwV5Hp9M.mjs.map +1 -0
  8. package/dist/babel-DUp3iLgB.d.cts +1696 -0
  9. package/dist/babel-DUp3iLgB.d.cts.map +1 -0
  10. package/dist/babel-Ny1M4Lo1.d.mts +1696 -0
  11. package/dist/babel-Ny1M4Lo1.d.mts.map +1 -0
  12. package/dist/chunk-Bmb41Sf3.cjs +1 -0
  13. package/dist/create-plugin-BReiEjbd.d.mts +15 -0
  14. package/dist/create-plugin-BReiEjbd.d.mts.map +1 -0
  15. package/dist/create-plugin-BX_bUhNU.cjs +1 -0
  16. package/dist/create-plugin-D4xkNYdM.d.cts +15 -0
  17. package/dist/create-plugin-D4xkNYdM.d.cts.map +1 -0
  18. package/dist/create-plugin-pWE4rRW3.mjs +2 -0
  19. package/dist/create-plugin-pWE4rRW3.mjs.map +1 -0
  20. package/dist/{helpers/filters.d.ts → filters-Bn8Rw_y0.d.cts} +5 -23
  21. package/dist/filters-Bn8Rw_y0.d.cts.map +1 -0
  22. package/dist/filters-DJgM_YqO.cjs +1 -0
  23. package/dist/filters-DiGgT5l3.d.mts +45 -0
  24. package/dist/filters-DiGgT5l3.d.mts.map +1 -0
  25. package/dist/filters-H7GHqM8L.mjs +2 -0
  26. package/dist/filters-H7GHqM8L.mjs.map +1 -0
  27. package/dist/helpers/ast-utils.cjs +1 -7
  28. package/dist/helpers/ast-utils.d.cts +2 -19
  29. package/dist/helpers/ast-utils.d.mts +2 -0
  30. package/dist/helpers/ast-utils.mjs +1 -0
  31. package/dist/helpers/create-plugin.cjs +1 -7
  32. package/dist/helpers/create-plugin.d.cts +3 -32
  33. package/dist/helpers/create-plugin.d.mts +3 -0
  34. package/dist/helpers/create-plugin.mjs +1 -0
  35. package/dist/helpers/filters.cjs +1 -7
  36. package/dist/helpers/filters.d.cts +3 -60
  37. package/dist/helpers/filters.d.mts +3 -0
  38. package/dist/helpers/filters.mjs +1 -0
  39. package/dist/helpers/index.cjs +1 -1
  40. package/dist/helpers/index.d.cts +8 -29
  41. package/dist/helpers/index.d.mts +8 -0
  42. package/dist/helpers/index.mjs +1 -0
  43. package/dist/helpers/module-helpers.cjs +1 -7
  44. package/dist/helpers/module-helpers.d.cts +3 -66
  45. package/dist/helpers/module-helpers.d.mts +3 -0
  46. package/dist/helpers/module-helpers.mjs +1 -0
  47. package/dist/helpers/options.cjs +1 -7
  48. package/dist/helpers/options.d.cts +3 -35
  49. package/dist/helpers/options.d.mts +3 -0
  50. package/dist/helpers/options.mjs +1 -0
  51. package/dist/helpers-C23KLU23.mjs +1 -0
  52. package/dist/index-ClXLQ1fw.d.mts +1 -0
  53. package/dist/index-DeEmP3Jc.d.cts +1 -0
  54. package/dist/index-QbUkWSLh.d.mts +1 -0
  55. package/dist/index-zO0Ly4bS.d.cts +1 -0
  56. package/dist/index.cjs +1 -7
  57. package/dist/index.d.cts +13 -33
  58. package/dist/index.d.cts.map +1 -0
  59. package/dist/index.d.mts +21 -0
  60. package/dist/index.d.mts.map +1 -0
  61. package/dist/index.mjs +2 -0
  62. package/dist/index.mjs.map +1 -0
  63. package/dist/module-helpers-CBJeXQA-.cjs +1 -0
  64. package/dist/module-helpers-CFI-GsFM.mjs +2 -0
  65. package/dist/module-helpers-CFI-GsFM.mjs.map +1 -0
  66. package/dist/{helpers/module-helpers.d.ts → module-helpers-CliGsjDF.d.mts} +9 -25
  67. package/dist/module-helpers-CliGsjDF.d.mts.map +1 -0
  68. package/dist/module-helpers-vWFW7b4i.d.cts +50 -0
  69. package/dist/module-helpers-vWFW7b4i.d.cts.map +1 -0
  70. package/dist/options-B2GpXLT2.d.mts +18 -0
  71. package/dist/options-B2GpXLT2.d.mts.map +1 -0
  72. package/dist/options-D2AF5e39.d.cts +18 -0
  73. package/dist/options-D2AF5e39.d.cts.map +1 -0
  74. package/dist/options-WrgZrzO5.mjs +2 -0
  75. package/dist/options-WrgZrzO5.mjs.map +1 -0
  76. package/dist/options-d1d8EwPZ.cjs +1 -0
  77. package/dist/plugin-BSBH78mm.cjs +0 -0
  78. package/dist/plugin-BTZ_-wLO.d.mts +18 -0
  79. package/dist/plugin-BTZ_-wLO.d.mts.map +1 -0
  80. package/dist/plugin-CpyJWCZI.mjs +1 -0
  81. package/dist/plugin-DKSpgBMK.d.cts +18 -0
  82. package/dist/plugin-DKSpgBMK.d.cts.map +1 -0
  83. package/dist/types/index.cjs +1 -1
  84. package/dist/types/index.d.cts +4 -22
  85. package/dist/types/index.d.mts +4 -0
  86. package/dist/types/index.mjs +1 -0
  87. package/dist/types/plugin.cjs +1 -1
  88. package/dist/types/plugin.d.cts +3 -36
  89. package/dist/types/plugin.d.mts +3 -0
  90. package/dist/types/plugin.mjs +1 -0
  91. package/dist/types-CKPddlfS.cjs +0 -0
  92. package/dist/types-cM7ObqRe.mjs +1 -0
  93. package/package.json +52 -34
  94. package/dist/chunk-FBBMZ4NC.cjs +0 -7
  95. package/dist/chunk-UCUR73HG.js +0 -7
  96. package/dist/helpers/ast-utils.js +0 -7
  97. package/dist/helpers/create-plugin.d.ts +0 -32
  98. package/dist/helpers/create-plugin.js +0 -7
  99. package/dist/helpers/filters.js +0 -7
  100. package/dist/helpers/index.d.ts +0 -29
  101. package/dist/helpers/index.js +0 -1
  102. package/dist/helpers/module-helpers.js +0 -7
  103. package/dist/helpers/options.d.ts +0 -35
  104. package/dist/helpers/options.js +0 -7
  105. package/dist/index.d.ts +0 -41
  106. package/dist/index.js +0 -7
  107. package/dist/plugin-ZWwqzlgV.d.cts +0 -1545
  108. package/dist/plugin-ZWwqzlgV.d.ts +0 -1545
  109. package/dist/types/index.d.ts +0 -22
  110. package/dist/types/index.js +0 -1
  111. package/dist/types/plugin.d.ts +0 -36
  112. /package/dist/{types/plugin.js → helpers-Bx2yBrpn.cjs} +0 -0
@@ -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 '@babel/generator';
2
- export { GeneratorResult } from '@babel/generator';
3
- import { ParserOptions, ParseResult } from '@babel/parser';
4
- import * as t from '@babel/types';
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 { type GenerateFromAstOptions, type __ΩGenerateFromAstOptions, generateFromAst, parseAst };
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"}