@powerlines/core 0.0.8
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/LICENSE +201 -0
- package/README.md +1 -0
- package/dist/_virtual/rolldown_runtime.cjs +29 -0
- package/dist/index.cjs +65 -0
- package/dist/index.d.cts +23 -0
- package/dist/index.d.mts +25 -0
- package/dist/index.mjs +22 -0
- package/dist/lib/config.cjs +90 -0
- package/dist/lib/config.cjs.map +1 -0
- package/dist/lib/config.d.cts +40 -0
- package/dist/lib/config.d.cts.map +1 -0
- package/dist/lib/config.d.mts +40 -0
- package/dist/lib/config.d.mts.map +1 -0
- package/dist/lib/config.mjs +86 -0
- package/dist/lib/config.mjs.map +1 -0
- package/dist/lib/constants/environments.cjs +17 -0
- package/dist/lib/constants/environments.cjs.map +1 -0
- package/dist/lib/constants/environments.d.cts +10 -0
- package/dist/lib/constants/environments.d.cts.map +1 -0
- package/dist/lib/constants/environments.d.mts +10 -0
- package/dist/lib/constants/environments.d.mts.map +1 -0
- package/dist/lib/constants/environments.mjs +11 -0
- package/dist/lib/constants/environments.mjs.map +1 -0
- package/dist/lib/constants/index.cjs +11 -0
- package/dist/lib/constants/index.d.cts +3 -0
- package/dist/lib/constants/index.d.mts +3 -0
- package/dist/lib/constants/index.mjs +4 -0
- package/dist/lib/constants/meta.cjs +9 -0
- package/dist/lib/constants/meta.cjs.map +1 -0
- package/dist/lib/constants/meta.d.cts +6 -0
- package/dist/lib/constants/meta.d.cts.map +1 -0
- package/dist/lib/constants/meta.d.mts +6 -0
- package/dist/lib/constants/meta.d.mts.map +1 -0
- package/dist/lib/constants/meta.mjs +7 -0
- package/dist/lib/constants/meta.mjs.map +1 -0
- package/dist/lib/entry.cjs +127 -0
- package/dist/lib/entry.cjs.map +1 -0
- package/dist/lib/entry.d.cts +47 -0
- package/dist/lib/entry.d.cts.map +1 -0
- package/dist/lib/entry.d.mts +48 -0
- package/dist/lib/entry.d.mts.map +1 -0
- package/dist/lib/entry.mjs +120 -0
- package/dist/lib/entry.mjs.map +1 -0
- package/dist/lib/index.cjs +50 -0
- package/dist/lib/index.d.cts +14 -0
- package/dist/lib/index.d.mts +16 -0
- package/dist/lib/index.mjs +17 -0
- package/dist/lib/logger.cjs +59 -0
- package/dist/lib/logger.cjs.map +1 -0
- package/dist/lib/logger.d.cts +23 -0
- package/dist/lib/logger.d.cts.map +1 -0
- package/dist/lib/logger.d.mts +24 -0
- package/dist/lib/logger.d.mts.map +1 -0
- package/dist/lib/logger.mjs +56 -0
- package/dist/lib/logger.mjs.map +1 -0
- package/dist/lib/unplugin/helpers.cjs +30 -0
- package/dist/lib/unplugin/helpers.cjs.map +1 -0
- package/dist/lib/unplugin/helpers.d.cts +24 -0
- package/dist/lib/unplugin/helpers.d.cts.map +1 -0
- package/dist/lib/unplugin/helpers.d.mts +24 -0
- package/dist/lib/unplugin/helpers.d.mts.map +1 -0
- package/dist/lib/unplugin/helpers.mjs +28 -0
- package/dist/lib/unplugin/helpers.mjs.map +1 -0
- package/dist/lib/unplugin/index.cjs +9 -0
- package/dist/lib/unplugin/index.d.cts +4 -0
- package/dist/lib/unplugin/index.d.mts +4 -0
- package/dist/lib/unplugin/index.mjs +5 -0
- package/dist/lib/unplugin/module-resolution.cjs +67 -0
- package/dist/lib/unplugin/module-resolution.cjs.map +1 -0
- package/dist/lib/unplugin/module-resolution.d.cts +21 -0
- package/dist/lib/unplugin/module-resolution.d.cts.map +1 -0
- package/dist/lib/unplugin/module-resolution.d.mts +21 -0
- package/dist/lib/unplugin/module-resolution.d.mts.map +1 -0
- package/dist/lib/unplugin/module-resolution.mjs +66 -0
- package/dist/lib/unplugin/module-resolution.mjs.map +1 -0
- package/dist/lib/unplugin/plugin.cjs +105 -0
- package/dist/lib/unplugin/plugin.cjs.map +1 -0
- package/dist/lib/unplugin/plugin.d.cts +22 -0
- package/dist/lib/unplugin/plugin.d.cts.map +1 -0
- package/dist/lib/unplugin/plugin.d.mts +22 -0
- package/dist/lib/unplugin/plugin.d.mts.map +1 -0
- package/dist/lib/unplugin/plugin.mjs +103 -0
- package/dist/lib/unplugin/plugin.mjs.map +1 -0
- package/dist/lib/utilities/file-header.cjs +24 -0
- package/dist/lib/utilities/file-header.cjs.map +1 -0
- package/dist/lib/utilities/file-header.d.cts +13 -0
- package/dist/lib/utilities/file-header.d.cts.map +1 -0
- package/dist/lib/utilities/file-header.d.mts +13 -0
- package/dist/lib/utilities/file-header.d.mts.map +1 -0
- package/dist/lib/utilities/file-header.mjs +22 -0
- package/dist/lib/utilities/file-header.mjs.map +1 -0
- package/dist/lib/utilities/format.cjs +49 -0
- package/dist/lib/utilities/format.cjs.map +1 -0
- package/dist/lib/utilities/format.d.cts +25 -0
- package/dist/lib/utilities/format.d.cts.map +1 -0
- package/dist/lib/utilities/format.d.mts +25 -0
- package/dist/lib/utilities/format.d.mts.map +1 -0
- package/dist/lib/utilities/format.mjs +47 -0
- package/dist/lib/utilities/format.mjs.map +1 -0
- package/dist/lib/utilities/index.cjs +15 -0
- package/dist/lib/utilities/index.d.cts +6 -0
- package/dist/lib/utilities/index.d.mts +6 -0
- package/dist/lib/utilities/index.mjs +7 -0
- package/dist/lib/utilities/source-file.cjs +50 -0
- package/dist/lib/utilities/source-file.cjs.map +1 -0
- package/dist/lib/utilities/source-file.d.cts +31 -0
- package/dist/lib/utilities/source-file.d.cts.map +1 -0
- package/dist/lib/utilities/source-file.d.mts +31 -0
- package/dist/lib/utilities/source-file.d.mts.map +1 -0
- package/dist/lib/utilities/source-file.mjs +46 -0
- package/dist/lib/utilities/source-file.mjs.map +1 -0
- package/dist/lib/utilities/source-map.cjs +57 -0
- package/dist/lib/utilities/source-map.cjs.map +1 -0
- package/dist/lib/utilities/source-map.d.cts +17 -0
- package/dist/lib/utilities/source-map.d.cts.map +1 -0
- package/dist/lib/utilities/source-map.d.mts +17 -0
- package/dist/lib/utilities/source-map.d.mts.map +1 -0
- package/dist/lib/utilities/source-map.mjs +55 -0
- package/dist/lib/utilities/source-map.mjs.map +1 -0
- package/dist/lib/utilities/write-file.cjs +29 -0
- package/dist/lib/utilities/write-file.cjs.map +1 -0
- package/dist/lib/utilities/write-file.d.cts +16 -0
- package/dist/lib/utilities/write-file.d.cts.map +1 -0
- package/dist/lib/utilities/write-file.d.mts +16 -0
- package/dist/lib/utilities/write-file.d.mts.map +1 -0
- package/dist/lib/utilities/write-file.mjs +28 -0
- package/dist/lib/utilities/write-file.mjs.map +1 -0
- package/dist/plugin-base.cjs +73 -0
- package/dist/plugin-base.cjs.map +1 -0
- package/dist/plugin-base.d.cts +27 -0
- package/dist/plugin-base.d.cts.map +1 -0
- package/dist/plugin-base.d.mts +27 -0
- package/dist/plugin-base.d.mts.map +1 -0
- package/dist/plugin-base.mjs +70 -0
- package/dist/plugin-base.mjs.map +1 -0
- package/dist/plugin-utils/build-helpers.cjs +36 -0
- package/dist/plugin-utils/build-helpers.cjs.map +1 -0
- package/dist/plugin-utils/build-helpers.d.cts +19 -0
- package/dist/plugin-utils/build-helpers.d.cts.map +1 -0
- package/dist/plugin-utils/build-helpers.d.mts +19 -0
- package/dist/plugin-utils/build-helpers.d.mts.map +1 -0
- package/dist/plugin-utils/build-helpers.mjs +35 -0
- package/dist/plugin-utils/build-helpers.mjs.map +1 -0
- package/dist/plugin-utils/context-helpers.cjs +50 -0
- package/dist/plugin-utils/context-helpers.cjs.map +1 -0
- package/dist/plugin-utils/context-helpers.d.cts +21 -0
- package/dist/plugin-utils/context-helpers.d.cts.map +1 -0
- package/dist/plugin-utils/context-helpers.d.mts +21 -0
- package/dist/plugin-utils/context-helpers.d.mts.map +1 -0
- package/dist/plugin-utils/context-helpers.mjs +48 -0
- package/dist/plugin-utils/context-helpers.mjs.map +1 -0
- package/dist/plugin-utils/extend.cjs +25 -0
- package/dist/plugin-utils/extend.cjs.map +1 -0
- package/dist/plugin-utils/extend.d.cts +20 -0
- package/dist/plugin-utils/extend.d.cts.map +1 -0
- package/dist/plugin-utils/extend.d.mts +20 -0
- package/dist/plugin-utils/extend.d.mts.map +1 -0
- package/dist/plugin-utils/extend.mjs +24 -0
- package/dist/plugin-utils/extend.mjs.map +1 -0
- package/dist/plugin-utils/format-package-json.cjs +20 -0
- package/dist/plugin-utils/format-package-json.cjs.map +1 -0
- package/dist/plugin-utils/format-package-json.d.cts +13 -0
- package/dist/plugin-utils/format-package-json.d.cts.map +1 -0
- package/dist/plugin-utils/format-package-json.d.mts +13 -0
- package/dist/plugin-utils/format-package-json.d.mts.map +1 -0
- package/dist/plugin-utils/format-package-json.mjs +19 -0
- package/dist/plugin-utils/format-package-json.mjs.map +1 -0
- package/dist/plugin-utils/get-config-path.cjs +50 -0
- package/dist/plugin-utils/get-config-path.cjs.map +1 -0
- package/dist/plugin-utils/get-config-path.d.cts +15 -0
- package/dist/plugin-utils/get-config-path.d.cts.map +1 -0
- package/dist/plugin-utils/get-config-path.d.mts +15 -0
- package/dist/plugin-utils/get-config-path.d.mts.map +1 -0
- package/dist/plugin-utils/get-config-path.mjs +49 -0
- package/dist/plugin-utils/get-config-path.mjs.map +1 -0
- package/dist/plugin-utils/helpers.cjs +185 -0
- package/dist/plugin-utils/helpers.cjs.map +1 -0
- package/dist/plugin-utils/helpers.d.cts +144 -0
- package/dist/plugin-utils/helpers.d.cts.map +1 -0
- package/dist/plugin-utils/helpers.d.mts +144 -0
- package/dist/plugin-utils/helpers.d.mts.map +1 -0
- package/dist/plugin-utils/helpers.mjs +170 -0
- package/dist/plugin-utils/helpers.mjs.map +1 -0
- package/dist/plugin-utils/index.cjs +35 -0
- package/dist/plugin-utils/index.d.cts +10 -0
- package/dist/plugin-utils/index.d.mts +10 -0
- package/dist/plugin-utils/index.mjs +11 -0
- package/dist/plugin-utils/merge.cjs +60 -0
- package/dist/plugin-utils/merge.cjs.map +1 -0
- package/dist/plugin-utils/merge.d.cts +35 -0
- package/dist/plugin-utils/merge.d.cts.map +1 -0
- package/dist/plugin-utils/merge.d.mts +35 -0
- package/dist/plugin-utils/merge.d.mts.map +1 -0
- package/dist/plugin-utils/merge.mjs +57 -0
- package/dist/plugin-utils/merge.mjs.map +1 -0
- package/dist/plugin-utils/modules.cjs +17 -0
- package/dist/plugin-utils/modules.cjs.map +1 -0
- package/dist/plugin-utils/modules.d.cts +15 -0
- package/dist/plugin-utils/modules.d.cts.map +1 -0
- package/dist/plugin-utils/modules.d.mts +15 -0
- package/dist/plugin-utils/modules.d.mts.map +1 -0
- package/dist/plugin-utils/modules.mjs +16 -0
- package/dist/plugin-utils/modules.mjs.map +1 -0
- package/dist/plugin-utils/paths.cjs +38 -0
- package/dist/plugin-utils/paths.cjs.map +1 -0
- package/dist/plugin-utils/paths.d.cts +34 -0
- package/dist/plugin-utils/paths.d.cts.map +1 -0
- package/dist/plugin-utils/paths.d.mts +34 -0
- package/dist/plugin-utils/paths.d.mts.map +1 -0
- package/dist/plugin-utils/paths.mjs +37 -0
- package/dist/plugin-utils/paths.mjs.map +1 -0
- package/dist/types/_internal.cjs +0 -0
- package/dist/types/_internal.d.cts +107 -0
- package/dist/types/_internal.d.cts.map +1 -0
- package/dist/types/_internal.d.mts +107 -0
- package/dist/types/_internal.d.mts.map +1 -0
- package/dist/types/_internal.mjs +1 -0
- package/dist/types/api.cjs +0 -0
- package/dist/types/api.d.cts +104 -0
- package/dist/types/api.d.cts.map +1 -0
- package/dist/types/api.d.mts +104 -0
- package/dist/types/api.d.mts.map +1 -0
- package/dist/types/api.mjs +1 -0
- package/dist/types/commands.cjs +17 -0
- package/dist/types/commands.cjs.map +1 -0
- package/dist/types/commands.d.cts +13 -0
- package/dist/types/commands.d.cts.map +1 -0
- package/dist/types/commands.d.mts +13 -0
- package/dist/types/commands.d.mts.map +1 -0
- package/dist/types/commands.mjs +16 -0
- package/dist/types/commands.mjs.map +1 -0
- package/dist/types/config.cjs +0 -0
- package/dist/types/config.d.cts +617 -0
- package/dist/types/config.d.cts.map +1 -0
- package/dist/types/config.d.mts +617 -0
- package/dist/types/config.d.mts.map +1 -0
- package/dist/types/config.mjs +1 -0
- package/dist/types/context.cjs +0 -0
- package/dist/types/context.d.cts +564 -0
- package/dist/types/context.d.cts.map +1 -0
- package/dist/types/context.d.mts +564 -0
- package/dist/types/context.d.mts.map +1 -0
- package/dist/types/context.mjs +1 -0
- package/dist/types/fs.cjs +11 -0
- package/dist/types/fs.cjs.map +1 -0
- package/dist/types/fs.d.cts +502 -0
- package/dist/types/fs.d.cts.map +1 -0
- package/dist/types/fs.d.mts +502 -0
- package/dist/types/fs.d.mts.map +1 -0
- package/dist/types/fs.mjs +8 -0
- package/dist/types/fs.mjs.map +1 -0
- package/dist/types/hooks.cjs +13 -0
- package/dist/types/hooks.cjs.map +1 -0
- package/dist/types/hooks.d.cts +117 -0
- package/dist/types/hooks.d.cts.map +1 -0
- package/dist/types/hooks.d.mts +117 -0
- package/dist/types/hooks.d.mts.map +1 -0
- package/dist/types/hooks.mjs +12 -0
- package/dist/types/hooks.mjs.map +1 -0
- package/dist/types/index.cjs +16 -0
- package/dist/types/index.d.cts +10 -0
- package/dist/types/index.d.mts +10 -0
- package/dist/types/index.mjs +7 -0
- package/dist/types/plugin.cjs +35 -0
- package/dist/types/plugin.cjs.map +1 -0
- package/dist/types/plugin.d.cts +218 -0
- package/dist/types/plugin.d.cts.map +1 -0
- package/dist/types/plugin.d.mts +218 -0
- package/dist/types/plugin.d.mts.map +1 -0
- package/dist/types/plugin.mjs +33 -0
- package/dist/types/plugin.mjs.map +1 -0
- package/dist/types/tsconfig.cjs +0 -0
- package/dist/types/tsconfig.d.cts +77 -0
- package/dist/types/tsconfig.d.cts.map +1 -0
- package/dist/types/tsconfig.d.mts +77 -0
- package/dist/types/tsconfig.d.mts.map +1 -0
- package/dist/types/tsconfig.mjs +1 -0
- package/dist/types/unplugin.cjs +24 -0
- package/dist/types/unplugin.cjs.map +1 -0
- package/dist/types/unplugin.d.cts +41 -0
- package/dist/types/unplugin.d.cts.map +1 -0
- package/dist/types/unplugin.d.mts +41 -0
- package/dist/types/unplugin.d.mts.map +1 -0
- package/dist/types/unplugin.mjs +22 -0
- package/dist/types/unplugin.mjs.map +1 -0
- package/package.json +238 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { CompilerOptions, TsConfigJson } from "@stryke/types/tsconfig";
|
|
2
|
+
import ts from "typescript";
|
|
3
|
+
|
|
4
|
+
//#region 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
|
+
declare type __ΩReflectionMode = any[];
|
|
69
|
+
declare type __ΩRawReflectionMode = any[];
|
|
70
|
+
declare type __ΩReflectionLevel = any[];
|
|
71
|
+
declare type __ΩDeepkitOptions = any[];
|
|
72
|
+
declare type __ΩTSCompilerOptions = any[];
|
|
73
|
+
declare type __ΩTSConfig = any[];
|
|
74
|
+
declare type __ΩParsedTypeScriptConfig = any[];
|
|
75
|
+
//#endregion
|
|
76
|
+
export { DeepkitOptions, ParsedTypeScriptConfig, RawReflectionMode, ReflectionLevel, ReflectionMode, TSCompilerOptions, TSConfig, __ΩDeepkitOptions, __ΩParsedTypeScriptConfig, __ΩRawReflectionMode, __ΩReflectionLevel, __ΩReflectionMode, __ΩTSCompilerOptions, __ΩTSConfig };
|
|
77
|
+
//# sourceMappingURL=tsconfig.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tsconfig.d.mts","names":[],"sources":["../../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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
//#region 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
|
|
22
|
+
exports.BUILDER_VARIANTS = BUILDER_VARIANTS;
|
|
23
|
+
exports.UNPLUGIN_BUILDER_VARIANTS = UNPLUGIN_BUILDER_VARIANTS;
|
|
24
|
+
//# sourceMappingURL=unplugin.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unplugin.cjs","names":["UNPLUGIN_BUILDER_VARIANTS: UnpluginBuilderVariant[]","BUILDER_VARIANTS: BuilderVariant[]"],"sources":["../../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"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { API } from "./api.cjs";
|
|
2
|
+
import { PluginHook } from "./plugin.cjs";
|
|
3
|
+
import { Context } from "./context.cjs";
|
|
4
|
+
import { UserConfig } from "./config.cjs";
|
|
5
|
+
import { MaybePromise } from "@stryke/types/base";
|
|
6
|
+
import { HookFilter, UnpluginContextMeta, UnpluginOptions as UnpluginOptions$1 } from "unplugin";
|
|
7
|
+
|
|
8
|
+
//#region src/types/unplugin.d.ts
|
|
9
|
+
type UnpluginBuilderVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown" | "bun";
|
|
10
|
+
declare const UNPLUGIN_BUILDER_VARIANTS: UnpluginBuilderVariant[];
|
|
11
|
+
type BuilderVariant = UnpluginBuilderVariant | "tsup" | "tsdown" | "unbuild";
|
|
12
|
+
declare const BUILDER_VARIANTS: BuilderVariant[];
|
|
13
|
+
type InferUnpluginVariant<TBuildVariant extends BuilderVariant> = TBuildVariant extends "tsup" ? "esbuild" : TBuildVariant extends "tsdown" ? "rolldown" : TBuildVariant extends "unbuild" ? "rollup" : TBuildVariant;
|
|
14
|
+
interface UnpluginOptions<TContext extends Context = Context> extends UnpluginOptions$1 {
|
|
15
|
+
/**
|
|
16
|
+
* An API object that can be used for inter-plugin communication.
|
|
17
|
+
*
|
|
18
|
+
* @see https://rollupjs.org/plugin-development/#direct-plugin-communication
|
|
19
|
+
*/
|
|
20
|
+
api: API<TContext["config"]>;
|
|
21
|
+
}
|
|
22
|
+
type InferUnpluginOptions<TContext extends Context = Context, TBuilderVariant extends BuilderVariant = BuilderVariant, TUnpluginVariant extends InferUnpluginVariant<TBuilderVariant> = InferUnpluginVariant<TBuilderVariant>> = { [TKey in keyof Required<UnpluginOptions<TContext>>[TUnpluginVariant]]?: Required<UnpluginOptions<TContext>>[TUnpluginVariant][TKey] extends infer THandler | {
|
|
23
|
+
handler: infer THandler;
|
|
24
|
+
} ? THandler extends ((this: infer TOriginalContext, ...args: infer TArgs) => infer TReturn) ? PluginHook<(this: TOriginalContext & TContext, ...args: TArgs) => MaybePromise<TReturn>, keyof HookFilter> : Required<UnpluginOptions<TContext>>[TUnpluginVariant][TKey] : Required<UnpluginOptions<TContext>>[TUnpluginVariant][TKey] };
|
|
25
|
+
type UnpluginUserConfig = UserConfig & {
|
|
26
|
+
/**
|
|
27
|
+
* The meta information for the unplugin context
|
|
28
|
+
*/
|
|
29
|
+
unplugin: UnpluginContextMeta;
|
|
30
|
+
};
|
|
31
|
+
type UnpluginFactory<TContext extends Context = Context> = (options: Partial<TContext["config"]["userConfig"]>, meta: UnpluginContextMeta) => UnpluginOptions<TContext>;
|
|
32
|
+
declare type __ΩUnpluginBuilderVariant = any[];
|
|
33
|
+
declare type __ΩBuilderVariant = any[];
|
|
34
|
+
declare type __ΩInferUnpluginVariant = any[];
|
|
35
|
+
declare type __ΩUnpluginOptions = any[];
|
|
36
|
+
declare type __ΩInferUnpluginOptions = any[];
|
|
37
|
+
declare type __ΩUnpluginUserConfig = any[];
|
|
38
|
+
declare type __ΩUnpluginFactory = any[];
|
|
39
|
+
//#endregion
|
|
40
|
+
export { BUILDER_VARIANTS, BuilderVariant, InferUnpluginOptions, InferUnpluginVariant, UNPLUGIN_BUILDER_VARIANTS, UnpluginBuilderVariant, UnpluginFactory, UnpluginOptions, UnpluginUserConfig, __ΩBuilderVariant, __ΩInferUnpluginOptions, __ΩInferUnpluginVariant, __ΩUnpluginBuilderVariant, __ΩUnpluginFactory, __ΩUnpluginOptions, __ΩUnpluginUserConfig };
|
|
41
|
+
//# sourceMappingURL=unplugin.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unplugin.d.cts","names":[],"sources":["../../src/types/unplugin.ts"],"sourcesContent":[],"mappings":";;;;;;;;KA6BY,sBAAA;cAWC,2BAA2B;AAX5B,KAuBA,cAAA,GACR,sBAxB8B,GAAA,MAAA,GAAA,QAAA,GAAA,SAAA;AAWrB,cAkBA,gBARH,EAQqB,cAlBS,EAAA;AAY5B,KAaA,oBAbc,CAAA,sBAa6B,cAZ7B,CAAA,GAaxB,aAbwB,SAAA,MAAA,GAAA,SAAA,GAepB,aAfoB,SAAA,QAAA,GAAA,UAAA,GAiBlB,aAjBkB,SAAA,SAAA,GAAA,QAAA,GAmBhB,aAnBgB;AAKb,UAgBI,eAXP,CAAA,iBAYS,OAjB0B,GAiBhB,OAjBgB,CAAA,SAkBnC,iBAlBmC,CAAA;EAOjC;;;;;EAOF,GAAA,EAUH,GAVG,CAUC,QAVD,CAAA,QAAA,CAAA,CAAA;;AAEO,KAWL,oBAXoB,CAAA,iBAYb,OAZa,GAYH,OAZG,EAAA,wBAaN,cAbM,GAaW,cAbX,EAAA,yBAcL,oBAdK,CAcgB,eAdhB,CAAA,GAe5B,oBAf4B,CAeP,eAfO,CAAA,CAAA,GAAA,WACb,MAgBF,QAhBE,CAiBf,eAjBe,CAiBC,QAjBD,CAAA,CAAA,CAkBf,gBAlBe,CAAA,IAkBM,QAlBN,CAmBf,eAnBe,CAmBC,QAnBD,CAAA,CAAA,CAoBf,gBApBe,CAAA,CAoBG,IApBH,CAAA,SAAA,KAAA,SAAA,GAAA;EAAU,OAAA,EAAA,KAAA,SAAA;AAOlB,CAAA,GAAA,QAAA,UAAA,CAAA,IAAA,EAAA,KAAA,iBAAA,EAAA,GAAA,IAAA,EAAA,KAAA,MAAA,EAAA,GAAA,KAAA,QAAA,IAsBH,UAtBG,CAAA,CAAA,IAAA,EAwBO,gBAxBP,GAwB0B,QAxB1B,EAAA,GAAA,IAAA,EAyBU,KAzBV,EAAA,GA0BI,YA1BJ,CA0BiB,OA1BjB,CAAA,EAAA,MA2BK,UA3BL,CAAA,GA6BH,QA7BG,CA6BM,eA7BN,CA6BsB,QA7BtB,CAAA,CAAA,CA6BiC,gBA7BjC,CAAA,CA6BmD,IA7BnD,CAAA,GA8BL,QA9BK,CA8BI,eA9BJ,CA8BoB,QA9BpB,CAAA,CAAA,CA8B+B,gBA9B/B,CAAA,CA8BiD,IA9BjD,CAAA,EAAJ;AANG,KAuCE,kBAAA,GAAqB,UAvCvB,GAAA;EAAmB;AAS7B;;EAC6B,QAAA,EAiCjB,mBAjCiB;CACH;AAAiB,KAmC/B,eAnC+B,CAAA,iBAmCE,OAnCF,GAmCY,OAnCZ,CAAA,GAAA,CAAA,OAAA,EAoChC,OApCgC,CAoCxB,QApCwB,CAAA,QAAA,CAAA,CAAA,YAAA,CAAA,CAAA,EAAA,IAAA,EAqCnC,mBArCmC,EAAA,GAsCtC,eAtCsC,CAsCtB,QAtCsB,CAAA;AACK,yCAAA,GAAA,EAAA;AAArB,iCAAA,GAAA,EAAA;AACF,uCAAA,GAAA,EAAA;AAArB,kCAAA,GAAA,EAAA;AAGgB,uCAAA,GAAA,EAAA;AAAhB,qCAAA,GAAA,EAAA;AADa,kCAAA,GAAA,EAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { API } from "./api.mjs";
|
|
2
|
+
import { PluginHook } from "./plugin.mjs";
|
|
3
|
+
import { Context } from "./context.mjs";
|
|
4
|
+
import { UserConfig } from "./config.mjs";
|
|
5
|
+
import { HookFilter, UnpluginContextMeta, UnpluginOptions as UnpluginOptions$1 } from "unplugin";
|
|
6
|
+
import { MaybePromise } from "@stryke/types/base";
|
|
7
|
+
|
|
8
|
+
//#region src/types/unplugin.d.ts
|
|
9
|
+
type UnpluginBuilderVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown" | "bun";
|
|
10
|
+
declare const UNPLUGIN_BUILDER_VARIANTS: UnpluginBuilderVariant[];
|
|
11
|
+
type BuilderVariant = UnpluginBuilderVariant | "tsup" | "tsdown" | "unbuild";
|
|
12
|
+
declare const BUILDER_VARIANTS: BuilderVariant[];
|
|
13
|
+
type InferUnpluginVariant<TBuildVariant extends BuilderVariant> = TBuildVariant extends "tsup" ? "esbuild" : TBuildVariant extends "tsdown" ? "rolldown" : TBuildVariant extends "unbuild" ? "rollup" : TBuildVariant;
|
|
14
|
+
interface UnpluginOptions<TContext extends Context = Context> extends UnpluginOptions$1 {
|
|
15
|
+
/**
|
|
16
|
+
* An API object that can be used for inter-plugin communication.
|
|
17
|
+
*
|
|
18
|
+
* @see https://rollupjs.org/plugin-development/#direct-plugin-communication
|
|
19
|
+
*/
|
|
20
|
+
api: API<TContext["config"]>;
|
|
21
|
+
}
|
|
22
|
+
type InferUnpluginOptions<TContext extends Context = Context, TBuilderVariant extends BuilderVariant = BuilderVariant, TUnpluginVariant extends InferUnpluginVariant<TBuilderVariant> = InferUnpluginVariant<TBuilderVariant>> = { [TKey in keyof Required<UnpluginOptions<TContext>>[TUnpluginVariant]]?: Required<UnpluginOptions<TContext>>[TUnpluginVariant][TKey] extends infer THandler | {
|
|
23
|
+
handler: infer THandler;
|
|
24
|
+
} ? THandler extends ((this: infer TOriginalContext, ...args: infer TArgs) => infer TReturn) ? PluginHook<(this: TOriginalContext & TContext, ...args: TArgs) => MaybePromise<TReturn>, keyof HookFilter> : Required<UnpluginOptions<TContext>>[TUnpluginVariant][TKey] : Required<UnpluginOptions<TContext>>[TUnpluginVariant][TKey] };
|
|
25
|
+
type UnpluginUserConfig = UserConfig & {
|
|
26
|
+
/**
|
|
27
|
+
* The meta information for the unplugin context
|
|
28
|
+
*/
|
|
29
|
+
unplugin: UnpluginContextMeta;
|
|
30
|
+
};
|
|
31
|
+
type UnpluginFactory<TContext extends Context = Context> = (options: Partial<TContext["config"]["userConfig"]>, meta: UnpluginContextMeta) => UnpluginOptions<TContext>;
|
|
32
|
+
declare type __ΩUnpluginBuilderVariant = any[];
|
|
33
|
+
declare type __ΩBuilderVariant = any[];
|
|
34
|
+
declare type __ΩInferUnpluginVariant = any[];
|
|
35
|
+
declare type __ΩUnpluginOptions = any[];
|
|
36
|
+
declare type __ΩInferUnpluginOptions = any[];
|
|
37
|
+
declare type __ΩUnpluginUserConfig = any[];
|
|
38
|
+
declare type __ΩUnpluginFactory = any[];
|
|
39
|
+
//#endregion
|
|
40
|
+
export { BUILDER_VARIANTS, BuilderVariant, InferUnpluginOptions, InferUnpluginVariant, UNPLUGIN_BUILDER_VARIANTS, UnpluginBuilderVariant, UnpluginFactory, UnpluginOptions, UnpluginUserConfig, __ΩBuilderVariant, __ΩInferUnpluginOptions, __ΩInferUnpluginVariant, __ΩUnpluginBuilderVariant, __ΩUnpluginFactory, __ΩUnpluginOptions, __ΩUnpluginUserConfig };
|
|
41
|
+
//# sourceMappingURL=unplugin.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unplugin.d.mts","names":[],"sources":["../../src/types/unplugin.ts"],"sourcesContent":[],"mappings":";;;;;;;;KA6BY,sBAAA;cAWC,2BAA2B;AAX5B,KAuBA,cAAA,GACR,sBAxB8B,GAAA,MAAA,GAAA,QAAA,GAAA,SAAA;AAWrB,cAkBA,gBARH,EAQqB,cAlBS,EAAA;AAY5B,KAaA,oBAbc,CAAA,sBAa6B,cAZ7B,CAAA,GAaxB,aAbwB,SAAA,MAAA,GAAA,SAAA,GAepB,aAfoB,SAAA,QAAA,GAAA,UAAA,GAiBlB,aAjBkB,SAAA,SAAA,GAAA,QAAA,GAmBhB,aAnBgB;AAKb,UAgBI,eAXP,CAAA,iBAYS,OAjB0B,GAiBhB,OAjBgB,CAAA,SAkBnC,iBAlBmC,CAAA;EAOjC;;;;;EAOF,GAAA,EAUH,GAVG,CAUC,QAVD,CAAA,QAAA,CAAA,CAAA;;AAEO,KAWL,oBAXoB,CAAA,iBAYb,OAZa,GAYH,OAZG,EAAA,wBAaN,cAbM,GAaW,cAbX,EAAA,yBAcL,oBAdK,CAcgB,eAdhB,CAAA,GAe5B,oBAf4B,CAeP,eAfO,CAAA,CAAA,GAAA,WACb,MAgBF,QAhBE,CAiBf,eAjBe,CAiBC,QAjBD,CAAA,CAAA,CAkBf,gBAlBe,CAAA,IAkBM,QAlBN,CAmBf,eAnBe,CAmBC,QAnBD,CAAA,CAAA,CAoBf,gBApBe,CAAA,CAoBG,IApBH,CAAA,SAAA,KAAA,SAAA,GAAA;EAAU,OAAA,EAAA,KAAA,SAAA;AAOlB,CAAA,GAAA,QAAA,UAAA,CAAA,IAAA,EAAA,KAAA,iBAAA,EAAA,GAAA,IAAA,EAAA,KAAA,MAAA,EAAA,GAAA,KAAA,QAAA,IAsBH,UAtBG,CAAA,CAAA,IAAA,EAwBO,gBAxBP,GAwB0B,QAxB1B,EAAA,GAAA,IAAA,EAyBU,KAzBV,EAAA,GA0BI,YA1BJ,CA0BiB,OA1BjB,CAAA,EAAA,MA2BK,UA3BL,CAAA,GA6BH,QA7BG,CA6BM,eA7BN,CA6BsB,QA7BtB,CAAA,CAAA,CA6BiC,gBA7BjC,CAAA,CA6BmD,IA7BnD,CAAA,GA8BL,QA9BK,CA8BI,eA9BJ,CA8BoB,QA9BpB,CAAA,CAAA,CA8B+B,gBA9B/B,CAAA,CA8BiD,IA9BjD,CAAA,EAAJ;AANG,KAuCE,kBAAA,GAAqB,UAvCvB,GAAA;EAAmB;AAS7B;;EAC6B,QAAA,EAiCjB,mBAjCiB;CACH;AAAiB,KAmC/B,eAnC+B,CAAA,iBAmCE,OAnCF,GAmCY,OAnCZ,CAAA,GAAA,CAAA,OAAA,EAoChC,OApCgC,CAoCxB,QApCwB,CAAA,QAAA,CAAA,CAAA,YAAA,CAAA,CAAA,EAAA,IAAA,EAqCnC,mBArCmC,EAAA,GAsCtC,eAtCsC,CAsCtB,QAtCsB,CAAA;AACK,yCAAA,GAAA,EAAA;AAArB,iCAAA,GAAA,EAAA;AACF,uCAAA,GAAA,EAAA;AAArB,kCAAA,GAAA,EAAA;AAGgB,uCAAA,GAAA,EAAA;AAAhB,qCAAA,GAAA,EAAA;AADa,kCAAA,GAAA,EAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region 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 { BUILDER_VARIANTS, UNPLUGIN_BUILDER_VARIANTS };
|
|
22
|
+
//# sourceMappingURL=unplugin.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unplugin.mjs","names":["UNPLUGIN_BUILDER_VARIANTS: UnpluginBuilderVariant[]","BUILDER_VARIANTS: BuilderVariant[]"],"sources":["../../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"}
|
package/package.json
ADDED
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@powerlines/core",
|
|
3
|
+
"version": "0.0.8",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "An internal core package for Powerlines - please use the `powerlines` package for public usage.",
|
|
6
|
+
"homepage": "https://stormsoftware.com",
|
|
7
|
+
"bugs": {
|
|
8
|
+
"url": "https://stormsoftware.com/support",
|
|
9
|
+
"email": "support@stormsoftware.com"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "github",
|
|
13
|
+
"url": "https://github.com/storm-software/powerlines.git",
|
|
14
|
+
"directory": "packages/core"
|
|
15
|
+
},
|
|
16
|
+
"funding": {
|
|
17
|
+
"type": "github",
|
|
18
|
+
"url": "https://github.com/sponsors/storm-software"
|
|
19
|
+
},
|
|
20
|
+
"license": "Apache-2.0",
|
|
21
|
+
"author": {
|
|
22
|
+
"name": "Storm Software",
|
|
23
|
+
"email": "contact@stormsoftware.com",
|
|
24
|
+
"url": "https://stormsoftware.com"
|
|
25
|
+
},
|
|
26
|
+
"maintainers": [
|
|
27
|
+
{
|
|
28
|
+
"name": "Storm Software",
|
|
29
|
+
"email": "contact@stormsoftware.com",
|
|
30
|
+
"url": "https://stormsoftware.com"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"contributors": [
|
|
34
|
+
{
|
|
35
|
+
"name": "Storm Software",
|
|
36
|
+
"email": "contact@stormsoftware.com",
|
|
37
|
+
"url": "https://stormsoftware.com"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"type": "module",
|
|
41
|
+
"exports": {
|
|
42
|
+
".": { "require": "./dist/index.cjs", "import": "./dist/index.mjs" },
|
|
43
|
+
"./lib": {
|
|
44
|
+
"require": "./dist/lib/index.cjs",
|
|
45
|
+
"import": "./dist/lib/index.mjs"
|
|
46
|
+
},
|
|
47
|
+
"./lib/config": {
|
|
48
|
+
"require": "./dist/lib/config.cjs",
|
|
49
|
+
"import": "./dist/lib/config.mjs"
|
|
50
|
+
},
|
|
51
|
+
"./lib/constants": {
|
|
52
|
+
"require": "./dist/lib/constants/index.cjs",
|
|
53
|
+
"import": "./dist/lib/constants/index.mjs"
|
|
54
|
+
},
|
|
55
|
+
"./lib/constants/environments": {
|
|
56
|
+
"require": "./dist/lib/constants/environments.cjs",
|
|
57
|
+
"import": "./dist/lib/constants/environments.mjs"
|
|
58
|
+
},
|
|
59
|
+
"./lib/constants/meta": {
|
|
60
|
+
"require": "./dist/lib/constants/meta.cjs",
|
|
61
|
+
"import": "./dist/lib/constants/meta.mjs"
|
|
62
|
+
},
|
|
63
|
+
"./lib/entry": {
|
|
64
|
+
"require": "./dist/lib/entry.cjs",
|
|
65
|
+
"import": "./dist/lib/entry.mjs"
|
|
66
|
+
},
|
|
67
|
+
"./lib/logger": {
|
|
68
|
+
"require": "./dist/lib/logger.cjs",
|
|
69
|
+
"import": "./dist/lib/logger.mjs"
|
|
70
|
+
},
|
|
71
|
+
"./lib/unplugin": {
|
|
72
|
+
"require": "./dist/lib/unplugin/index.cjs",
|
|
73
|
+
"import": "./dist/lib/unplugin/index.mjs"
|
|
74
|
+
},
|
|
75
|
+
"./lib/unplugin/helpers": {
|
|
76
|
+
"require": "./dist/lib/unplugin/helpers.cjs",
|
|
77
|
+
"import": "./dist/lib/unplugin/helpers.mjs"
|
|
78
|
+
},
|
|
79
|
+
"./lib/unplugin/module-resolution": {
|
|
80
|
+
"require": "./dist/lib/unplugin/module-resolution.cjs",
|
|
81
|
+
"import": "./dist/lib/unplugin/module-resolution.mjs"
|
|
82
|
+
},
|
|
83
|
+
"./lib/unplugin/plugin": {
|
|
84
|
+
"require": "./dist/lib/unplugin/plugin.cjs",
|
|
85
|
+
"import": "./dist/lib/unplugin/plugin.mjs"
|
|
86
|
+
},
|
|
87
|
+
"./lib/utilities": {
|
|
88
|
+
"require": "./dist/lib/utilities/index.cjs",
|
|
89
|
+
"import": "./dist/lib/utilities/index.mjs"
|
|
90
|
+
},
|
|
91
|
+
"./lib/utilities/file-header": {
|
|
92
|
+
"require": "./dist/lib/utilities/file-header.cjs",
|
|
93
|
+
"import": "./dist/lib/utilities/file-header.mjs"
|
|
94
|
+
},
|
|
95
|
+
"./lib/utilities/format": {
|
|
96
|
+
"require": "./dist/lib/utilities/format.cjs",
|
|
97
|
+
"import": "./dist/lib/utilities/format.mjs"
|
|
98
|
+
},
|
|
99
|
+
"./lib/utilities/source-file": {
|
|
100
|
+
"require": "./dist/lib/utilities/source-file.cjs",
|
|
101
|
+
"import": "./dist/lib/utilities/source-file.mjs"
|
|
102
|
+
},
|
|
103
|
+
"./lib/utilities/source-map": {
|
|
104
|
+
"require": "./dist/lib/utilities/source-map.cjs",
|
|
105
|
+
"import": "./dist/lib/utilities/source-map.mjs"
|
|
106
|
+
},
|
|
107
|
+
"./lib/utilities/write-file": {
|
|
108
|
+
"require": "./dist/lib/utilities/write-file.cjs",
|
|
109
|
+
"import": "./dist/lib/utilities/write-file.mjs"
|
|
110
|
+
},
|
|
111
|
+
"./plugin-base": {
|
|
112
|
+
"require": "./dist/plugin-base.cjs",
|
|
113
|
+
"import": "./dist/plugin-base.mjs"
|
|
114
|
+
},
|
|
115
|
+
"./plugin-utils": {
|
|
116
|
+
"require": "./dist/plugin-utils/index.cjs",
|
|
117
|
+
"import": "./dist/plugin-utils/index.mjs"
|
|
118
|
+
},
|
|
119
|
+
"./plugin-utils/build-helpers": {
|
|
120
|
+
"require": "./dist/plugin-utils/build-helpers.cjs",
|
|
121
|
+
"import": "./dist/plugin-utils/build-helpers.mjs"
|
|
122
|
+
},
|
|
123
|
+
"./plugin-utils/context-helpers": {
|
|
124
|
+
"require": "./dist/plugin-utils/context-helpers.cjs",
|
|
125
|
+
"import": "./dist/plugin-utils/context-helpers.mjs"
|
|
126
|
+
},
|
|
127
|
+
"./plugin-utils/extend": {
|
|
128
|
+
"require": "./dist/plugin-utils/extend.cjs",
|
|
129
|
+
"import": "./dist/plugin-utils/extend.mjs"
|
|
130
|
+
},
|
|
131
|
+
"./plugin-utils/format-package-json": {
|
|
132
|
+
"require": "./dist/plugin-utils/format-package-json.cjs",
|
|
133
|
+
"import": "./dist/plugin-utils/format-package-json.mjs"
|
|
134
|
+
},
|
|
135
|
+
"./plugin-utils/get-config-path": {
|
|
136
|
+
"require": "./dist/plugin-utils/get-config-path.cjs",
|
|
137
|
+
"import": "./dist/plugin-utils/get-config-path.mjs"
|
|
138
|
+
},
|
|
139
|
+
"./plugin-utils/helpers": {
|
|
140
|
+
"require": "./dist/plugin-utils/helpers.cjs",
|
|
141
|
+
"import": "./dist/plugin-utils/helpers.mjs"
|
|
142
|
+
},
|
|
143
|
+
"./plugin-utils/merge": {
|
|
144
|
+
"require": "./dist/plugin-utils/merge.cjs",
|
|
145
|
+
"import": "./dist/plugin-utils/merge.mjs"
|
|
146
|
+
},
|
|
147
|
+
"./plugin-utils/modules": {
|
|
148
|
+
"require": "./dist/plugin-utils/modules.cjs",
|
|
149
|
+
"import": "./dist/plugin-utils/modules.mjs"
|
|
150
|
+
},
|
|
151
|
+
"./plugin-utils/paths": {
|
|
152
|
+
"require": "./dist/plugin-utils/paths.cjs",
|
|
153
|
+
"import": "./dist/plugin-utils/paths.mjs"
|
|
154
|
+
},
|
|
155
|
+
"./types": {
|
|
156
|
+
"require": "./dist/types/index.cjs",
|
|
157
|
+
"import": "./dist/types/index.mjs"
|
|
158
|
+
},
|
|
159
|
+
"./types/_internal": {
|
|
160
|
+
"require": "./dist/types/_internal.cjs",
|
|
161
|
+
"import": "./dist/types/_internal.mjs"
|
|
162
|
+
},
|
|
163
|
+
"./types/api": {
|
|
164
|
+
"require": "./dist/types/api.cjs",
|
|
165
|
+
"import": "./dist/types/api.mjs"
|
|
166
|
+
},
|
|
167
|
+
"./types/commands": {
|
|
168
|
+
"require": "./dist/types/commands.cjs",
|
|
169
|
+
"import": "./dist/types/commands.mjs"
|
|
170
|
+
},
|
|
171
|
+
"./types/config": {
|
|
172
|
+
"require": "./dist/types/config.cjs",
|
|
173
|
+
"import": "./dist/types/config.mjs"
|
|
174
|
+
},
|
|
175
|
+
"./types/context": {
|
|
176
|
+
"require": "./dist/types/context.cjs",
|
|
177
|
+
"import": "./dist/types/context.mjs"
|
|
178
|
+
},
|
|
179
|
+
"./types/fs": {
|
|
180
|
+
"require": "./dist/types/fs.cjs",
|
|
181
|
+
"import": "./dist/types/fs.mjs"
|
|
182
|
+
},
|
|
183
|
+
"./types/hooks": {
|
|
184
|
+
"require": "./dist/types/hooks.cjs",
|
|
185
|
+
"import": "./dist/types/hooks.mjs"
|
|
186
|
+
},
|
|
187
|
+
"./types/plugin": {
|
|
188
|
+
"require": "./dist/types/plugin.cjs",
|
|
189
|
+
"import": "./dist/types/plugin.mjs"
|
|
190
|
+
},
|
|
191
|
+
"./types/tsconfig": {
|
|
192
|
+
"require": "./dist/types/tsconfig.cjs",
|
|
193
|
+
"import": "./dist/types/tsconfig.mjs"
|
|
194
|
+
},
|
|
195
|
+
"./types/unplugin": {
|
|
196
|
+
"require": "./dist/types/unplugin.cjs",
|
|
197
|
+
"import": "./dist/types/unplugin.mjs"
|
|
198
|
+
},
|
|
199
|
+
"./*": "./*"
|
|
200
|
+
},
|
|
201
|
+
"main": "./dist/index.cjs",
|
|
202
|
+
"module": "./dist/index.mjs",
|
|
203
|
+
"types": "./dist/index.d.cts",
|
|
204
|
+
"files": ["dist/**/*", "files/**/*", "schemas/**/*"],
|
|
205
|
+
"dependencies": {
|
|
206
|
+
"@storm-software/config": "^1.135.11",
|
|
207
|
+
"@storm-software/config-tools": "^1.189.10",
|
|
208
|
+
"@stryke/convert": "^0.6.40",
|
|
209
|
+
"@stryke/fs": "^0.33.43",
|
|
210
|
+
"@stryke/hash": "^0.12.49",
|
|
211
|
+
"@stryke/helpers": "^0.9.42",
|
|
212
|
+
"@stryke/json": "^0.9.43",
|
|
213
|
+
"@stryke/path": "^0.26.6",
|
|
214
|
+
"@stryke/string-format": "^0.14.2",
|
|
215
|
+
"@stryke/type-checks": "^0.5.25",
|
|
216
|
+
"@stryke/unique-id": "^0.3.54",
|
|
217
|
+
"c12": "^3.3.3",
|
|
218
|
+
"chalk": "5.6.2",
|
|
219
|
+
"compatx": "^0.2.0",
|
|
220
|
+
"defu": "^6.1.4",
|
|
221
|
+
"diff-match-patch": "^1.0.5",
|
|
222
|
+
"jiti": "^2.6.1",
|
|
223
|
+
"magic-string": "^0.30.21",
|
|
224
|
+
"prettier": "^3.8.1",
|
|
225
|
+
"unplugin": "3.0.0-beta.3"
|
|
226
|
+
},
|
|
227
|
+
"devDependencies": {
|
|
228
|
+
"@storm-software/testing-tools": "^1.119.85",
|
|
229
|
+
"@stryke/types": "^0.10.39",
|
|
230
|
+
"@types/diff-match-patch": "^1.0.36",
|
|
231
|
+
"@types/node": "^25.3.3",
|
|
232
|
+
"@types/semver": "^7.7.1",
|
|
233
|
+
"tsdown": "0.17.0-beta.5",
|
|
234
|
+
"typescript": "^5.9.3"
|
|
235
|
+
},
|
|
236
|
+
"publishConfig": { "access": "public" },
|
|
237
|
+
"gitHead": "2c6fd0cd3aad8656cedb9912f2b5894730be7dd7"
|
|
238
|
+
}
|