@powerlines/plugin-rspack 0.5.307 → 0.5.309

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 (134) hide show
  1. package/dist/build-BFd9LRNQ.d.cts +8 -0
  2. package/dist/build-BFd9LRNQ.d.cts.map +1 -0
  3. package/dist/build-DA0tRXwM.d.mts +8 -0
  4. package/dist/build-DA0tRXwM.d.mts.map +1 -0
  5. package/dist/build-DJTI0ZMx.cjs +0 -0
  6. package/dist/build-XTM4L3VY.mjs +1 -0
  7. package/dist/helpers/index.cjs +5 -4
  8. package/dist/helpers/index.d.cts +5 -2
  9. package/dist/helpers/index.d.mts +5 -2
  10. package/dist/helpers/index.mjs +3 -2
  11. package/dist/helpers/resolve-options.cjs +2 -37
  12. package/dist/helpers/resolve-options.d.cts +2 -15
  13. package/dist/helpers/resolve-options.d.mts +2 -16
  14. package/dist/helpers/resolve-options.mjs +2 -36
  15. package/dist/helpers/unplugin.cjs +2 -11
  16. package/dist/helpers/unplugin.d.cts +4 -8
  17. package/dist/helpers/unplugin.d.mts +4 -8
  18. package/dist/helpers/unplugin.mjs +2 -11
  19. package/dist/helpers-C9XSjwSZ.mjs +1 -0
  20. package/dist/helpers-yB1XkvQI.cjs +0 -0
  21. package/dist/index-B_e8BwCm.d.cts +1 -0
  22. package/dist/index-CW2WHUXP.d.mts +1 -0
  23. package/dist/index-Cc7fCJU9.d.mts +1 -0
  24. package/dist/index-CiBIKhMu.d.cts +1 -0
  25. package/dist/index.cjs +10 -8
  26. package/dist/index.d.cts +7 -5
  27. package/dist/index.d.cts.map +1 -1
  28. package/dist/index.d.mts +7 -8
  29. package/dist/index.d.mts.map +1 -1
  30. package/dist/index.mjs +6 -3
  31. package/dist/index.mjs.map +1 -1
  32. package/dist/plugin-D3B5E_Hg.mjs +1 -0
  33. package/dist/plugin-D5qyQPqC.cjs +0 -0
  34. package/dist/plugin-DK1UuZUT.d.cts +19 -0
  35. package/dist/plugin-DK1UuZUT.d.cts.map +1 -0
  36. package/dist/plugin-aE8qvTYa.d.mts +19 -0
  37. package/dist/plugin-aE8qvTYa.d.mts.map +1 -0
  38. package/dist/resolve-options-BJGgrWuy.d.cts +15 -0
  39. package/dist/resolve-options-BJGgrWuy.d.cts.map +1 -0
  40. package/dist/resolve-options-C1La6URI.d.mts +15 -0
  41. package/dist/resolve-options-C1La6URI.d.mts.map +1 -0
  42. package/dist/resolve-options-Dd1m9RDc.cjs +75 -0
  43. package/dist/resolve-options-vZLZ1_cF.mjs +37 -0
  44. package/dist/resolve-options-vZLZ1_cF.mjs.map +1 -0
  45. package/dist/types/build.cjs +1 -0
  46. package/dist/types/build.d.cts +2 -8
  47. package/dist/types/build.d.mts +2 -8
  48. package/dist/types/build.mjs +2 -0
  49. package/dist/types/index.cjs +3 -0
  50. package/dist/types/index.d.cts +3 -2
  51. package/dist/types/index.d.mts +3 -2
  52. package/dist/types/index.mjs +4 -0
  53. package/dist/types/plugin.cjs +1 -0
  54. package/dist/types/plugin.d.cts +3 -20
  55. package/dist/types/plugin.d.mts +3 -21
  56. package/dist/types/plugin.mjs +2 -0
  57. package/dist/types-D208vOSb.cjs +0 -0
  58. package/dist/types-Dv2cgIDx.mjs +1 -0
  59. package/dist/unplugin-B_f-YOTD.cjs +16 -0
  60. package/dist/unplugin-DeBr-5Sy.mjs +11 -0
  61. package/dist/unplugin-DeBr-5Sy.mjs.map +1 -0
  62. package/dist/unplugin-DlH_QSxJ.d.mts +8 -0
  63. package/dist/unplugin-DlH_QSxJ.d.mts.map +1 -0
  64. package/dist/unplugin-zy8DBcVf.d.cts +8 -0
  65. package/dist/unplugin-zy8DBcVf.d.cts.map +1 -0
  66. package/package.json +3 -3
  67. package/dist/_virtual/rolldown_runtime.cjs +0 -29
  68. package/dist/core/src/lib/logger.cjs +0 -41
  69. package/dist/core/src/lib/logger.mjs +0 -40
  70. package/dist/core/src/lib/logger.mjs.map +0 -1
  71. package/dist/core/src/lib/unplugin/helpers.cjs +0 -19
  72. package/dist/core/src/lib/unplugin/helpers.mjs +0 -19
  73. package/dist/core/src/lib/unplugin/helpers.mjs.map +0 -1
  74. package/dist/core/src/lib/unplugin/index.cjs +0 -3
  75. package/dist/core/src/lib/unplugin/index.mjs +0 -5
  76. package/dist/core/src/lib/unplugin/module-resolution.cjs +0 -66
  77. package/dist/core/src/lib/unplugin/module-resolution.mjs +0 -66
  78. package/dist/core/src/lib/unplugin/module-resolution.mjs.map +0 -1
  79. package/dist/core/src/lib/unplugin/plugin.cjs +0 -71
  80. package/dist/core/src/lib/unplugin/plugin.mjs +0 -71
  81. package/dist/core/src/lib/unplugin/plugin.mjs.map +0 -1
  82. package/dist/core/src/lib/utilities/source-file.cjs +0 -22
  83. package/dist/core/src/lib/utilities/source-file.mjs +0 -22
  84. package/dist/core/src/lib/utilities/source-file.mjs.map +0 -1
  85. package/dist/core/src/types/api.d.cts +0 -103
  86. package/dist/core/src/types/api.d.cts.map +0 -1
  87. package/dist/core/src/types/api.d.mts +0 -103
  88. package/dist/core/src/types/api.d.mts.map +0 -1
  89. package/dist/core/src/types/commands.d.cts +0 -9
  90. package/dist/core/src/types/commands.d.cts.map +0 -1
  91. package/dist/core/src/types/commands.d.mts +0 -10
  92. package/dist/core/src/types/commands.d.mts.map +0 -1
  93. package/dist/core/src/types/config.d.cts +0 -551
  94. package/dist/core/src/types/config.d.cts.map +0 -1
  95. package/dist/core/src/types/config.d.mts +0 -551
  96. package/dist/core/src/types/config.d.mts.map +0 -1
  97. package/dist/core/src/types/context.d.cts +0 -511
  98. package/dist/core/src/types/context.d.cts.map +0 -1
  99. package/dist/core/src/types/context.d.mts +0 -511
  100. package/dist/core/src/types/context.d.mts.map +0 -1
  101. package/dist/core/src/types/fs.d.cts +0 -487
  102. package/dist/core/src/types/fs.d.cts.map +0 -1
  103. package/dist/core/src/types/fs.d.mts +0 -487
  104. package/dist/core/src/types/fs.d.mts.map +0 -1
  105. package/dist/core/src/types/hooks.d.cts +0 -99
  106. package/dist/core/src/types/hooks.d.cts.map +0 -1
  107. package/dist/core/src/types/hooks.d.mts +0 -99
  108. package/dist/core/src/types/hooks.d.mts.map +0 -1
  109. package/dist/core/src/types/index.d.mts +0 -9
  110. package/dist/core/src/types/plugin.d.cts +0 -204
  111. package/dist/core/src/types/plugin.d.cts.map +0 -1
  112. package/dist/core/src/types/plugin.d.mts +0 -204
  113. package/dist/core/src/types/plugin.d.mts.map +0 -1
  114. package/dist/core/src/types/tsconfig.d.cts +0 -70
  115. package/dist/core/src/types/tsconfig.d.cts.map +0 -1
  116. package/dist/core/src/types/tsconfig.d.mts +0 -70
  117. package/dist/core/src/types/tsconfig.d.mts.map +0 -1
  118. package/dist/core/src/types/unplugin.cjs +0 -21
  119. package/dist/core/src/types/unplugin.d.cts +0 -24
  120. package/dist/core/src/types/unplugin.d.cts.map +0 -1
  121. package/dist/core/src/types/unplugin.d.mts +0 -25
  122. package/dist/core/src/types/unplugin.d.mts.map +0 -1
  123. package/dist/core/src/types/unplugin.mjs +0 -22
  124. package/dist/core/src/types/unplugin.mjs.map +0 -1
  125. package/dist/helpers/resolve-options.d.cts.map +0 -1
  126. package/dist/helpers/resolve-options.d.mts.map +0 -1
  127. package/dist/helpers/resolve-options.mjs.map +0 -1
  128. package/dist/helpers/unplugin.d.cts.map +0 -1
  129. package/dist/helpers/unplugin.d.mts.map +0 -1
  130. package/dist/helpers/unplugin.mjs.map +0 -1
  131. package/dist/types/build.d.cts.map +0 -1
  132. package/dist/types/build.d.mts.map +0 -1
  133. package/dist/types/plugin.d.cts.map +0 -1
  134. package/dist/types/plugin.d.mts.map +0 -1
@@ -1,70 +0,0 @@
1
- import { CompilerOptions, TsConfigJson } from "@stryke/types/tsconfig";
2
- import ts from "typescript";
3
-
4
- //#region ../core/src/types/tsconfig.d.ts
5
- type ReflectionMode = "default" | "explicit" | "never";
6
- type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
7
- /**
8
- * Defines the level of reflection to be used during the transpilation process.
9
- *
10
- * @remarks
11
- * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
12
- * - `minimal` - Only the essential type information is captured.
13
- * - `normal` - Additional type information is captured, including some contextual data.
14
- * - `verbose` - All available type information is captured, including detailed contextual data.
15
- */
16
- type ReflectionLevel = "minimal" | "normal" | "verbose";
17
- interface DeepkitOptions {
18
- /**
19
- * Either true to activate reflection for all files compiled using this tsconfig,
20
- * or a list of globs/file paths relative to this tsconfig.json.
21
- * Globs/file paths can be prefixed with a ! to exclude them.
22
- */
23
- reflection?: RawReflectionMode;
24
- /**
25
- * Defines the level of reflection to be used during the transpilation process.
26
- *
27
- * @remarks
28
- * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
29
- * - `minimal` - Only the essential type information is captured.
30
- * - `normal` - Additional type information is captured, including some contextual data.
31
- * - `verbose` - All available type information is captured, including detailed contextual data.
32
- */
33
- reflectionLevel?: ReflectionLevel;
34
- }
35
- type TSCompilerOptions = CompilerOptions & DeepkitOptions;
36
- /**
37
- * The TypeScript compiler configuration.
38
- *
39
- * @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
40
- */
41
- interface TSConfig extends Omit<TsConfigJson, "reflection"> {
42
- /**
43
- * Either true to activate reflection for all files compiled using this tsconfig,
44
- * or a list of globs/file paths relative to this tsconfig.json.
45
- * Globs/file paths can be prefixed with a ! to exclude them.
46
- */
47
- reflection?: RawReflectionMode;
48
- /**
49
- * Defines the level of reflection to be used during the transpilation process.
50
- *
51
- * @remarks
52
- * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
53
- * - `minimal` - Only the essential type information is captured.
54
- * - `normal` - Additional type information is captured, including some contextual data.
55
- * - `verbose` - All available type information is captured, including detailed contextual data.
56
- */
57
- reflectionLevel?: ReflectionLevel;
58
- /**
59
- * Instructs the TypeScript compiler how to compile `.ts` files.
60
- */
61
- compilerOptions?: TSCompilerOptions;
62
- }
63
- type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
64
- originalTsconfigJson: TsConfigJson;
65
- tsconfigJson: TSConfig;
66
- tsconfigFilePath: string;
67
- };
68
- //#endregion
69
- export { DeepkitOptions, ParsedTypeScriptConfig, RawReflectionMode, ReflectionLevel, ReflectionMode, TSCompilerOptions, TSConfig };
70
- //# sourceMappingURL=tsconfig.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tsconfig.d.mts","names":[],"sources":["../../../../../core/src/types/tsconfig.ts"],"sourcesContent":[],"mappings":";;;;KAqBY,cAAA;KACA,iBAAA,GACR;AAFJ;AACA;AAiBA;AAEA;AAoBA;AAOA;;;;AAsBoB,KAnDR,eAAA,GAmDQ,SAAA,GAAA,QAAA,GAAA,SAAA;AAtBc,UA3BjB,cAAA,CA2BiB;EAAI;AAyBtC;;;;EAEwB,UAAA,CAAA,EAhDT,iBAgDS;;;;;;;;;;oBArCJ;;KAGR,iBAAA,GAAoB,kBAAkB;;;;;;UAOjC,QAAA,SAAiB,KAAK;;;;;;eAMxB;;;;;;;;;;oBAWK;;;;oBAKA;;KAGR,sBAAA,GAAyB,EAAA,CAAG;wBAChB;gBACR"}
@@ -1,21 +0,0 @@
1
-
2
- //#region ../core/src/types/unplugin.ts
3
- const UNPLUGIN_BUILDER_VARIANTS = [
4
- "rollup",
5
- "webpack",
6
- "rspack",
7
- "vite",
8
- "esbuild",
9
- "farm",
10
- "unloader",
11
- "rolldown",
12
- "bun"
13
- ];
14
- const BUILDER_VARIANTS = [
15
- ...UNPLUGIN_BUILDER_VARIANTS,
16
- "tsup",
17
- "tsdown",
18
- "unbuild"
19
- ];
20
-
21
- //#endregion
@@ -1,24 +0,0 @@
1
- import { PluginHook } from "./plugin.cjs";
2
- import { Context } from "./context.cjs";
3
- import { API } from "./api.cjs";
4
- import { MaybePromise } from "@stryke/types/base";
5
- import { HookFilter, UnpluginOptions } from "unplugin";
6
-
7
- //#region ../core/src/types/unplugin.d.ts
8
- type UnpluginBuilderVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown" | "bun";
9
- type BuilderVariant = UnpluginBuilderVariant | "tsup" | "tsdown" | "unbuild";
10
- type InferUnpluginVariant<TBuildVariant extends BuilderVariant> = TBuildVariant extends "tsup" ? "esbuild" : TBuildVariant extends "tsdown" ? "rolldown" : TBuildVariant extends "unbuild" ? "rollup" : TBuildVariant;
11
- interface UnpluginOptions$1<TContext extends Context = Context> extends UnpluginOptions {
12
- /**
13
- * An API object that can be used for inter-plugin communication.
14
- *
15
- * @see https://rollupjs.org/plugin-development/#direct-plugin-communication
16
- */
17
- api: API<TContext["config"]>;
18
- }
19
- type InferUnpluginOptions<TContext extends Context = Context, TBuilderVariant extends BuilderVariant = BuilderVariant, TUnpluginVariant extends InferUnpluginVariant<TBuilderVariant> = InferUnpluginVariant<TBuilderVariant>> = { [TKey in keyof Required<UnpluginOptions$1<TContext>>[TUnpluginVariant]]?: Required<UnpluginOptions$1<TContext>>[TUnpluginVariant][TKey] extends infer THandler | {
20
- handler: infer THandler;
21
- } ? THandler extends ((this: infer TOriginalContext, ...args: infer TArgs) => infer TReturn) ? PluginHook<(this: TOriginalContext & TContext, ...args: TArgs) => MaybePromise<TReturn>, keyof HookFilter> : Required<UnpluginOptions$1<TContext>>[TUnpluginVariant][TKey] : Required<UnpluginOptions$1<TContext>>[TUnpluginVariant][TKey] };
22
- //#endregion
23
- export { BuilderVariant, InferUnpluginOptions, UnpluginBuilderVariant };
24
- //# sourceMappingURL=unplugin.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"unplugin.d.cts","names":[],"sources":["../../../../../core/src/types/unplugin.ts"],"sourcesContent":[],"mappings":";;;;;;;KA6BY,sBAAA;AAuBA,KAAA,cAAA,GACR,sBAAA,GAAA,MAAsB,GAAA,QAAA,GAAA,SAAA;AAY6B,KAA3C,oBAA2C,CAAA,sBAAA,cAAA,CAAA,GACrD,aADqD,SAAA,MAAA,GAAA,SAAA,GAGjD,aAHiD,SAAA,QAAA,GAAA,UAAA,GAK/C,aAL+C,SAAA,SAAA,GAAA,QAAA,GAO7C,aAP6C;AACrD,UAQe,iBARf,CAAA,iBASiB,OATjB,GAS2B,OAT3B,CAAA,SAUQ,eAVR,CAAA;EAEI;;;;AAMN;EACmB,GAAA,EAOZ,GAPY,CAOR,QAPQ,CAAA,QAAA,CAAA,CAAA;;AAOR,KAGC,oBAHD,CAAA,iBAIQ,OAJR,GAIkB,OAJlB,EAAA,wBAKe,cALf,GAKgC,cALhC,EAAA,yBAMgB,oBANhB,CAMqC,eANrC,CAAA,GAOP,oBAPO,CAOc,eAPd,CAAA,CAAA,GAAA,WAAJ,MASU,QATV,CAUH,iBAVG,CAUa,QAVb,CAAA,CAAA,CAWH,gBAXG,CAAA,IAWkB,QAXlB,CAYH,iBAZG,CAYa,QAZb,CAAA,CAAA,CAaH,gBAbG,CAAA,CAae,IAbf,CAAA,SAAA,KAAA,SAAA,GAAA;EANG,OAAA,EAAA,KAAA,SAAA;AAAmB,CAAA,GAAA,QAAA,UAAA,CAAA,IAAA,EAAA,KAAA,iBAAA,EAAA,GAAA,IAAA,EAAA,KAAA,MAAA,EAAA,GAAA,KAAA,QAAA,IA4BrB,UA5BqB,CAAA,CAAA,IAAA,EA8BX,gBA9BW,GA8BQ,QA9BR,EAAA,GAAA,IAAA,EA+BR,KA/BQ,EAAA,GAgCd,YAhCc,CAgCD,OAhCC,CAAA,EAAA,MAiCb,UAjCa,CAAA,GAmCrB,QAnCqB,CAmCZ,iBAnCY,CAmCI,QAnCJ,CAAA,CAAA,CAmCe,gBAnCf,CAAA,CAmCiC,IAnCjC,CAAA,GAoCvB,QApCuB,CAoCd,iBApCc,CAoCE,QApCF,CAAA,CAAA,CAoCa,gBApCb,CAAA,CAoC+B,IApC/B,CAAA,EAS7B"}
@@ -1,25 +0,0 @@
1
- import { PluginHook } from "./plugin.mjs";
2
- import { Context } from "./context.mjs";
3
- import "./config.mjs";
4
- import { API } from "./api.mjs";
5
- import { HookFilter, UnpluginOptions } from "unplugin";
6
- import { MaybePromise } from "@stryke/types/base";
7
-
8
- //#region ../core/src/types/unplugin.d.ts
9
- type UnpluginBuilderVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown" | "bun";
10
- type BuilderVariant = UnpluginBuilderVariant | "tsup" | "tsdown" | "unbuild";
11
- type InferUnpluginVariant<TBuildVariant extends BuilderVariant> = TBuildVariant extends "tsup" ? "esbuild" : TBuildVariant extends "tsdown" ? "rolldown" : TBuildVariant extends "unbuild" ? "rollup" : TBuildVariant;
12
- interface UnpluginOptions$1<TContext extends Context = Context> extends UnpluginOptions {
13
- /**
14
- * An API object that can be used for inter-plugin communication.
15
- *
16
- * @see https://rollupjs.org/plugin-development/#direct-plugin-communication
17
- */
18
- api: API<TContext["config"]>;
19
- }
20
- type InferUnpluginOptions<TContext extends Context = Context, TBuilderVariant extends BuilderVariant = BuilderVariant, TUnpluginVariant extends InferUnpluginVariant<TBuilderVariant> = InferUnpluginVariant<TBuilderVariant>> = { [TKey in keyof Required<UnpluginOptions$1<TContext>>[TUnpluginVariant]]?: Required<UnpluginOptions$1<TContext>>[TUnpluginVariant][TKey] extends infer THandler | {
21
- handler: infer THandler;
22
- } ? THandler extends ((this: infer TOriginalContext, ...args: infer TArgs) => infer TReturn) ? PluginHook<(this: TOriginalContext & TContext, ...args: TArgs) => MaybePromise<TReturn>, keyof HookFilter> : Required<UnpluginOptions$1<TContext>>[TUnpluginVariant][TKey] : Required<UnpluginOptions$1<TContext>>[TUnpluginVariant][TKey] };
23
- //#endregion
24
- export { BuilderVariant, InferUnpluginOptions, InferUnpluginVariant, UnpluginBuilderVariant, UnpluginOptions$1 as UnpluginOptions };
25
- //# sourceMappingURL=unplugin.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"unplugin.d.mts","names":[],"sources":["../../../../../core/src/types/unplugin.ts"],"sourcesContent":[],"mappings":";;;;;;;;KA6BY,sBAAA;AAAA,KAuBA,cAAA,GACR,sBAxB8B,GAAA,MAAA,GAAA,QAAA,GAAA,SAAA;AAoCtB,KAAA,oBAAoB,CAAA,sBAAuB,cAAvB,CAAA,GAC9B,aAD8B,SAAA,MAAA,GAAA,SAAA,GAG1B,aAH0B,SAAA,QAAA,GAAA,UAAA,GAKxB,aALwB,SAAA,SAAA,GAAA,QAAA,GAOtB,aAPsB;AAAuB,UAStC,iBATsC,CAAA,iBAUpC,OAVoC,GAU1B,OAV0B,CAAA,SAW7C,eAX6C,CAAA;EACrD;;;;;EAQe,GAAA,EAQV,GARU,CAQN,QARM,CAAA,QAAe,CAAA,CAAA;;AACH,KAUjB,oBAViB,CAAA,iBAWV,OAXU,GAWA,OAXA,EAAA,wBAYH,cAZG,GAYc,cAZd,EAAA,yBAaF,oBAbE,CAamB,eAbnB,CAAA,GAczB,oBAdyB,CAcJ,eAdI,CAAA,CAAA,GAAA,WAOlB,MASM,QATN,CAUP,iBAVO,CAUS,QAVT,CAAA,CAAA,CAWP,gBAXO,CAAA,IAWc,QAXd,CAYP,iBAZO,CAYS,QAZT,CAAA,CAAA,CAaP,gBAbO,CAAA,CAaW,IAbX,CAAA,SAAA,KAAA,SAAA,GAAA;EAAJ,OAAA,EAAA,KAAA,SAAA;AANG,CAAA,GAAA,QAAA,UAAA,CAAA,IAAA,EAAA,KAAA,iBAAA,EAAA,GAAA,IAAA,EAAA,KAAA,MAAA,EAAA,GAAA,KAAA,QAAA,IA4BF,UA5BE,CAAA,CAAA,IAAA,EA8BQ,gBA9BR,GA8B2B,QA9B3B,EAAA,GAAA,IAAA,EA+BW,KA/BX,EAAA,GAgCK,YAhCL,CAgCkB,OAhClB,CAAA,EAAA,MAiCM,UAjCN,CAAA,GAmCF,QAnCE,CAmCO,iBAnCP,CAmCuB,QAnCvB,CAAA,CAAA,CAmCkC,gBAnClC,CAAA,CAmCoD,IAnCpD,CAAA,GAoCJ,QApCI,CAoCK,iBApCL,CAoCqB,QApCrB,CAAA,CAAA,CAoCgC,gBApChC,CAAA,CAoCkD,IApClD,CAAA,EAAmB"}
@@ -1,22 +0,0 @@
1
- //#region ../core/src/types/unplugin.ts
2
- const UNPLUGIN_BUILDER_VARIANTS = [
3
- "rollup",
4
- "webpack",
5
- "rspack",
6
- "vite",
7
- "esbuild",
8
- "farm",
9
- "unloader",
10
- "rolldown",
11
- "bun"
12
- ];
13
- const BUILDER_VARIANTS = [
14
- ...UNPLUGIN_BUILDER_VARIANTS,
15
- "tsup",
16
- "tsdown",
17
- "unbuild"
18
- ];
19
-
20
- //#endregion
21
- export { };
22
- //# sourceMappingURL=unplugin.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"unplugin.mjs","names":["UNPLUGIN_BUILDER_VARIANTS: UnpluginBuilderVariant[]","BUILDER_VARIANTS: BuilderVariant[]"],"sources":["../../../../../core/src/types/unplugin.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 { MaybePromise } from \"@stryke/types/base\";\nimport type {\n UnpluginOptions as BaseUnpluginOptions,\n HookFilter,\n UnpluginContextMeta\n} from \"unplugin\";\nimport type { API } from \"./api\";\nimport type { UserConfig } from \"./config\";\nimport type { Context } from \"./context\";\nimport type { PluginHook } from \"./plugin\";\n\nexport type UnpluginBuilderVariant =\n | \"rollup\"\n | \"webpack\"\n | \"rspack\"\n | \"vite\"\n | \"esbuild\"\n | \"farm\"\n | \"unloader\"\n | \"rolldown\"\n | \"bun\";\n\nexport const UNPLUGIN_BUILDER_VARIANTS: UnpluginBuilderVariant[] = [\n \"rollup\",\n \"webpack\",\n \"rspack\",\n \"vite\",\n \"esbuild\",\n \"farm\",\n \"unloader\",\n \"rolldown\",\n \"bun\"\n] as const;\n\nexport type BuilderVariant =\n | UnpluginBuilderVariant\n | \"tsup\"\n | \"tsdown\"\n | \"unbuild\";\n\nexport const BUILDER_VARIANTS: BuilderVariant[] = [\n ...UNPLUGIN_BUILDER_VARIANTS,\n \"tsup\",\n \"tsdown\",\n \"unbuild\"\n] as const;\n\nexport type InferUnpluginVariant<TBuildVariant extends BuilderVariant> =\n TBuildVariant extends \"tsup\"\n ? \"esbuild\"\n : TBuildVariant extends \"tsdown\"\n ? \"rolldown\"\n : TBuildVariant extends \"unbuild\"\n ? \"rollup\"\n : TBuildVariant;\n\nexport interface UnpluginOptions<\n TContext extends Context = Context\n> extends BaseUnpluginOptions {\n /**\n * An API object that can be used for inter-plugin communication.\n *\n * @see https://rollupjs.org/plugin-development/#direct-plugin-communication\n */\n api: API<TContext[\"config\"]>;\n}\n\nexport type InferUnpluginOptions<\n TContext extends Context = Context,\n TBuilderVariant extends BuilderVariant = BuilderVariant,\n TUnpluginVariant extends InferUnpluginVariant<TBuilderVariant> =\n InferUnpluginVariant<TBuilderVariant>\n> = {\n [TKey in keyof Required<\n UnpluginOptions<TContext>\n >[TUnpluginVariant]]?: Required<\n UnpluginOptions<TContext>\n >[TUnpluginVariant][TKey] extends\n | infer THandler\n | {\n handler: infer THandler;\n }\n ? THandler extends (\n this: infer TOriginalContext,\n ...args: infer TArgs\n ) => infer TReturn\n ? PluginHook<\n (\n this: TOriginalContext & TContext,\n ...args: TArgs\n ) => MaybePromise<TReturn>,\n keyof HookFilter\n >\n : Required<UnpluginOptions<TContext>>[TUnpluginVariant][TKey]\n : Required<UnpluginOptions<TContext>>[TUnpluginVariant][TKey];\n};\n\nexport type UnpluginUserConfig = UserConfig & {\n /**\n * The meta information for the unplugin context\n */\n unplugin: UnpluginContextMeta;\n};\n\nexport type UnpluginFactory<TContext extends Context = Context> = (\n options: Partial<TContext[\"config\"][\"userConfig\"]>,\n meta: UnpluginContextMeta\n) => UnpluginOptions<TContext>;\n"],"mappings":";AAwCA,MAAaA,4BAAsD;CACjE;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAQD,MAAaC,mBAAqC;CAChD,GAAG;CACH;CACA;CACA;CACD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolve-options.d.cts","names":[],"sources":["../../src/helpers/resolve-options.ts"],"sourcesContent":[],"mappings":";;;;;;;AAiCA;;;;iBAAgB,cAAA,UAAwB,UAAU"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolve-options.d.mts","names":[],"sources":["../../src/helpers/resolve-options.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAiCA;;;iBAAgB,cAAA,UAAwB,UAAU"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolve-options.mjs","names":[],"sources":["../../src/helpers/resolve-options.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 { Context } from \"@powerlines/core/types\";\nimport type {\n DevTool,\n Configuration as ExternalRspackOptions\n} from \"@rspack/core\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport defu from \"defu\";\nimport { RspackPluginResolvedConfig } from \"../types\";\n\n/**\n * Resolves the options for [rspack](https://rspack.rs/).\n *\n * @param context - The build context.\n * @returns The resolved options.\n */\nexport function resolveOptions(context: Context): ExternalRspackOptions {\n return defu(\n {\n resolve: {\n alias: context.alias\n }\n },\n (context.config as RspackPluginResolvedConfig).rspack\n ? (context.config as RspackPluginResolvedConfig).rspack\n : {},\n {\n external: context.config.resolve.external,\n noExternal: context.config.resolve.noExternal,\n skipNodeModulesBundle: context.config.resolve.skipNodeModulesBundle\n },\n {\n output: {\n path: joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.output.buildPath\n )\n },\n name: context.config.name,\n node:\n context.config.platform === \"node\"\n ? ({\n __dirname: true,\n __filename: true,\n global: true\n } as ExternalRspackOptions[\"node\"])\n : false,\n mode:\n context.config.mode === \"development\"\n ? (\"development\" as const)\n : (\"production\" as const),\n recordsInputPath: joinPaths(\n context.cachePath,\n \"rspack\",\n \".rspack-records.json\"\n ),\n recordsOutputPath: joinPaths(\n context.cachePath,\n \"rspack\",\n \".rspack-records.json\"\n ),\n context: joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.root\n ),\n noExternal: context.builtins,\n cache: context.config.mode === \"development\",\n devtool: (context.config.mode !== \"development\"\n ? false\n : \"source-map\") as DevTool | false,\n optimization: {\n minimize: context.config.mode !== \"development\"\n }\n }\n );\n}\n"],"mappings":";;;;;;;;;;AAiCA,SAAgB,eAAe,SAAyC;AACtE,QAAO,KACL,EACE,SAAS,EACP,OAAO,QAAQ,OAChB,EACF,EACA,QAAQ,OAAsC,SAC1C,QAAQ,OAAsC,SAC/C,EAAE,EACN;EACE,UAAU,QAAQ,OAAO,QAAQ;EACjC,YAAY,QAAQ,OAAO,QAAQ;EACnC,uBAAuB,QAAQ,OAAO,QAAQ;EAC/C,EACD;EACE,QAAQ,EACN,MAAM,UACJ,QAAQ,gBAAgB,eACxB,QAAQ,OAAO,OAAO,UACvB,EACF;EACD,MAAM,QAAQ,OAAO;EACrB,MACE,QAAQ,OAAO,aAAa,SACvB;GACC,WAAW;GACX,YAAY;GACZ,QAAQ;GACT,GACD;EACN,MACE,QAAQ,OAAO,SAAS,gBACnB,gBACA;EACP,kBAAkB,UAChB,QAAQ,WACR,UACA,uBACD;EACD,mBAAmB,UACjB,QAAQ,WACR,UACA,uBACD;EACD,SAAS,UACP,QAAQ,gBAAgB,eACxB,QAAQ,OAAO,KAChB;EACD,YAAY,QAAQ;EACpB,OAAO,QAAQ,OAAO,SAAS;EAC/B,SAAU,QAAQ,OAAO,SAAS,gBAC9B,QACA;EACJ,cAAc,EACZ,UAAU,QAAQ,OAAO,SAAS,eACnC;EACF,CACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"unplugin.d.cts","names":[],"sources":["../../src/helpers/unplugin.ts"],"sourcesContent":[],"mappings":";;;;iBAsBgB,kBAAA,UAA4B,sBAAmB,SAAA,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"unplugin.d.mts","names":[],"sources":["../../src/helpers/unplugin.ts"],"sourcesContent":[],"mappings":";;;;iBAsBgB,kBAAA,UAA4B,sBAAmB,SAAA,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"unplugin.mjs","names":["createRspackUnplugin"],"sources":["../../src/helpers/unplugin.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 { createUnplugin } from \"@powerlines/core/lib/unplugin\";\nimport { createRspackPlugin as createRspackUnplugin } from \"unplugin\";\nimport { RspackPluginContext } from \"../types/plugin\";\n\nexport function createRspackPlugin(context: RspackPluginContext) {\n return createRspackUnplugin(createUnplugin(context))({});\n}\n"],"mappings":";;;;;AAsBA,SAAgB,mBAAmB,SAA8B;AAC/D,QAAOA,qBAAqB,eAAe,QAAQ,CAAC,CAAC,EAAE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"build.d.cts","names":[],"sources":["../../src/types/build.ts"],"sourcesContent":[],"mappings":";;;KAoBY,aAAA,GAAgB,KAC1B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"build.d.mts","names":[],"sources":["../../src/types/build.ts"],"sourcesContent":[],"mappings":";;;KAoBY,aAAA,GAAgB,KAC1B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;KAyBY,mBAAA,GAAsB,QAAQ;UAEzB,sBAAA,SAA+B;WACrC;AAHX;AAEiB,UAIA,0BAAA,SAAmC,cAJJ,CAAA;EAI/B,MAAA,EACP,aADO;AAIjB;AAC0B,KADd,mBACc,CAAA,wBAAA,0BAAA,GACtB,0BADsB,CAAA,GAEtB,aAFsB,CAER,eAFQ,CAAA;AACtB,sCAAA,GAAA,EAAA;AACc,yCAAA,GAAA,EAAA;AAAd,6CAAA,GAAA,EAAA;AAAa,sCAAA,GAAA,EAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;KAyBY,mBAAA,GAAsB,QAAQ;UAEzB,sBAAA,SAA+B;WACrC;;AAHC,UAMK,0BAAA,SAAmC,cANX,CAAA;EAExB,MAAA,EAKP,aALO;AAIjB;AAIY,KAAA,mBAAmB,CAAA,wBACL,0BADK,GAE3B,0BAF2B,CAAA,GAG3B,aAH2B,CAGb,eAHa,CAAA;AACL,sCAAA,GAAA,EAAA;AACtB,yCAAA,GAAA,EAAA;AACc,6CAAA,GAAA,EAAA;AAAd,sCAAA,GAAA,EAAA"}