@powerlines/plugin-tsdown 0.1.242 → 0.1.244

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 (117) hide show
  1. package/dist/core/src/lib/logger.mjs +40 -0
  2. package/dist/core/src/lib/logger.mjs.map +1 -0
  3. package/dist/core/src/lib/unplugin/helpers.mjs +19 -0
  4. package/dist/core/src/lib/unplugin/helpers.mjs.map +1 -0
  5. package/dist/core/src/lib/unplugin/index.mjs +5 -0
  6. package/dist/core/src/lib/unplugin/module-resolution.mjs +66 -0
  7. package/dist/core/src/lib/unplugin/module-resolution.mjs.map +1 -0
  8. package/dist/core/src/lib/unplugin/plugin.mjs +71 -0
  9. package/dist/core/src/lib/unplugin/plugin.mjs.map +1 -0
  10. package/dist/core/src/lib/utilities/format.mjs +29 -0
  11. package/dist/core/src/lib/utilities/format.mjs.map +1 -0
  12. package/dist/core/src/lib/utilities/source-file.mjs +21 -0
  13. package/dist/core/src/lib/utilities/source-file.mjs.map +1 -0
  14. package/dist/core/src/plugin-utils/build-helpers.mjs +35 -0
  15. package/dist/core/src/plugin-utils/build-helpers.mjs.map +1 -0
  16. package/dist/core/src/plugin-utils/context-helpers.mjs +4 -0
  17. package/dist/core/src/plugin-utils/extend.mjs +5 -0
  18. package/dist/core/src/plugin-utils/get-config-path.mjs +3 -0
  19. package/dist/core/src/plugin-utils/helpers.mjs +48 -0
  20. package/dist/core/src/plugin-utils/helpers.mjs.map +1 -0
  21. package/dist/core/src/plugin-utils/index.mjs +9 -0
  22. package/dist/core/src/plugin-utils/merge.mjs +47 -0
  23. package/dist/core/src/plugin-utils/merge.mjs.map +1 -0
  24. package/dist/core/src/plugin-utils/paths.mjs +4 -0
  25. package/dist/core/src/types/api.d.mts +103 -0
  26. package/dist/core/src/types/api.d.mts.map +1 -0
  27. package/dist/core/src/types/commands.d.mts +10 -0
  28. package/dist/core/src/types/commands.d.mts.map +1 -0
  29. package/dist/core/src/types/commands.mjs +16 -0
  30. package/dist/core/src/types/commands.mjs.map +1 -0
  31. package/dist/core/src/types/config.d.mts +551 -0
  32. package/dist/core/src/types/config.d.mts.map +1 -0
  33. package/dist/core/src/types/context.d.mts +511 -0
  34. package/dist/core/src/types/context.d.mts.map +1 -0
  35. package/dist/core/src/types/fs.d.mts +487 -0
  36. package/dist/core/src/types/fs.d.mts.map +1 -0
  37. package/dist/core/src/types/hooks.d.mts +99 -0
  38. package/dist/core/src/types/hooks.d.mts.map +1 -0
  39. package/dist/core/src/types/index.d.mts +9 -0
  40. package/dist/core/src/types/plugin.d.mts +204 -0
  41. package/dist/core/src/types/plugin.d.mts.map +1 -0
  42. package/dist/core/src/types/plugin.mjs +33 -0
  43. package/dist/core/src/types/plugin.mjs.map +1 -0
  44. package/dist/core/src/types/tsconfig.d.mts +70 -0
  45. package/dist/core/src/types/tsconfig.d.mts.map +1 -0
  46. package/dist/core/src/types/unplugin.d.mts +25 -0
  47. package/dist/core/src/types/unplugin.d.mts.map +1 -0
  48. package/dist/core/src/types/unplugin.mjs +22 -0
  49. package/dist/core/src/types/unplugin.mjs.map +1 -0
  50. package/dist/helpers/format-package-json.mjs +4 -4
  51. package/dist/helpers/format-package-json.mjs.map +1 -1
  52. package/dist/helpers/index.d.mts +3 -1
  53. package/dist/helpers/index.mjs +3 -1
  54. package/dist/helpers/resolve-options.d.mts +31 -0
  55. package/dist/helpers/resolve-options.d.mts.map +1 -0
  56. package/dist/helpers/resolve-options.mjs +124 -0
  57. package/dist/helpers/resolve-options.mjs.map +1 -0
  58. package/dist/helpers/unplugin.mjs +2 -1
  59. package/dist/helpers/unplugin.mjs.map +1 -1
  60. package/dist/index.d.mts +6 -2
  61. package/dist/index.d.mts.map +1 -1
  62. package/dist/index.mjs +6 -9
  63. package/dist/index.mjs.map +1 -1
  64. package/dist/types/build.d.mts +8 -0
  65. package/dist/types/build.d.mts.map +1 -0
  66. package/dist/types/build.mjs +1 -0
  67. package/dist/types/index.d.mts +2 -1
  68. package/dist/types/plugin.d.mts +11 -7
  69. package/dist/types/plugin.d.mts.map +1 -1
  70. package/package.json +28 -107
  71. package/dist/_virtual/rolldown_runtime.cjs +0 -29
  72. package/dist/helpers/format-package-json.cjs +0 -19
  73. package/dist/helpers/format-package-json.d.cts +0 -13
  74. package/dist/helpers/format-package-json.d.cts.map +0 -1
  75. package/dist/helpers/index.cjs +0 -3
  76. package/dist/helpers/index.d.cts +0 -2
  77. package/dist/helpers/unplugin.cjs +0 -11
  78. package/dist/helpers/unplugin.d.cts +0 -8
  79. package/dist/helpers/unplugin.d.cts.map +0 -1
  80. package/dist/index.cjs +0 -43
  81. package/dist/index.d.cts +0 -14
  82. package/dist/index.d.cts.map +0 -1
  83. package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/is-type.cjs +0 -28
  84. package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/is-type.mjs +0 -29
  85. package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/is-type.mjs.map +0 -1
  86. package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/join-paths.cjs +0 -122
  87. package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/join-paths.mjs +0 -123
  88. package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/join-paths.mjs.map +0 -1
  89. package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/regex.cjs +0 -12
  90. package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/regex.mjs +0 -9
  91. package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/regex.mjs.map +0 -1
  92. package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/slash.cjs +0 -15
  93. package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/slash.mjs +0 -15
  94. package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/slash.mjs.map +0 -1
  95. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-empty.cjs +0 -20
  96. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-empty.mjs +0 -21
  97. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-empty.mjs.map +0 -1
  98. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-null.cjs +0 -12
  99. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-null.mjs +0 -12
  100. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-null.mjs.map +0 -1
  101. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-set-string.cjs +0 -20
  102. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-set-string.mjs +0 -21
  103. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-set-string.mjs.map +0 -1
  104. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-set.cjs +0 -19
  105. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-set.mjs +0 -20
  106. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-set.mjs.map +0 -1
  107. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-string.cjs +0 -12
  108. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-string.mjs +0 -12
  109. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-string.mjs.map +0 -1
  110. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-undefined.cjs +0 -8
  111. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-undefined.mjs +0 -8
  112. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-undefined.mjs.map +0 -1
  113. package/dist/types/index.cjs +0 -0
  114. package/dist/types/index.d.cts +0 -2
  115. package/dist/types/plugin.cjs +0 -0
  116. package/dist/types/plugin.d.cts +0 -17
  117. package/dist/types/plugin.d.cts.map +0 -1
@@ -0,0 +1,103 @@
1
+ import { CallHookOptions, InferHookParameters, InferHookReturnType } from "./hooks.mjs";
2
+ import { APIContext, EnvironmentContext, PluginContext } from "./context.mjs";
3
+ import { BuildInlineConfig, CleanInlineConfig, DeployInlineConfig, DocsInlineConfig, LintInlineConfig, NewInlineConfig, PrepareInlineConfig, ResolvedConfig } from "./config.mjs";
4
+
5
+ //#region ../core/src/types/api.d.ts
6
+
7
+ /**
8
+ * Powerlines API Interface
9
+ */
10
+ interface API<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
11
+ /**
12
+ * The Powerlines shared API context
13
+ */
14
+ context: APIContext<TResolvedConfig>;
15
+ /**
16
+ * Prepare the Powerlines API
17
+ *
18
+ * @remarks
19
+ * This method will prepare the Powerlines API for use, initializing any necessary resources.
20
+ *
21
+ * @param inlineConfig - The inline configuration for the prepare command
22
+ */
23
+ prepare: (inlineConfig: PrepareInlineConfig | NewInlineConfig | CleanInlineConfig | BuildInlineConfig | LintInlineConfig | DocsInlineConfig | DeployInlineConfig) => Promise<void>;
24
+ /**
25
+ * Create a new Powerlines project
26
+ *
27
+ * @remarks
28
+ * This method will create a new Powerlines project in the current directory.
29
+ *
30
+ * @param inlineConfig - The inline configuration for the new command
31
+ * @returns A promise that resolves when the project has been created
32
+ */
33
+ new: (inlineConfig: NewInlineConfig) => Promise<void>;
34
+ /**
35
+ * Clean any previously prepared artifacts
36
+ *
37
+ * @remarks
38
+ * This method will remove the previous Powerlines artifacts from the project.
39
+ *
40
+ * @param inlineConfig - The inline configuration for the clean command
41
+ * @returns A promise that resolves when the clean command has completed
42
+ */
43
+ clean: (inlineConfig: CleanInlineConfig | PrepareInlineConfig) => Promise<void>;
44
+ /**
45
+ * Lint the project source code
46
+ *
47
+ * @param inlineConfig - The inline configuration for the lint command
48
+ * @returns A promise that resolves when the lint command has completed
49
+ */
50
+ lint: (inlineConfig: LintInlineConfig) => Promise<void>;
51
+ /**
52
+ * Build the project
53
+ *
54
+ * @remarks
55
+ * This method will build the Powerlines project, generating the necessary artifacts.
56
+ *
57
+ * @param inlineConfig - The inline configuration for the build command
58
+ * @returns A promise that resolves when the build command has completed
59
+ */
60
+ build: (inlineConfig: BuildInlineConfig) => Promise<void>;
61
+ /**
62
+ * Prepare the documentation for the project
63
+ *
64
+ * @param inlineConfig - The inline configuration for the docs command
65
+ * @returns A promise that resolves when the documentation generation has completed
66
+ */
67
+ docs: (inlineConfig: DocsInlineConfig) => Promise<void>;
68
+ /**
69
+ * Deploy the project source code
70
+ *
71
+ * @remarks
72
+ * This method will prepare and build the Powerlines project, generating the necessary artifacts for the deployment.
73
+ *
74
+ * @param inlineConfig - The inline configuration for the deploy command
75
+ */
76
+ deploy: (inlineConfig: DeployInlineConfig) => Promise<void>;
77
+ /**
78
+ * Finalization process
79
+ *
80
+ * @remarks
81
+ * This step includes any final processes or clean up required by Powerlines. It will be run after each Powerlines command.
82
+ *
83
+ * @returns A promise that resolves when the finalization process has completed
84
+ */
85
+ finalize: () => Promise<void>;
86
+ /**
87
+ * Invokes the configured plugin hooks
88
+ *
89
+ * @remarks
90
+ * By default, it will call the `"pre"`, `"normal"`, and `"post"` ordered hooks in sequence
91
+ *
92
+ * @param hook - The hook to call
93
+ * @param options - The options to provide to the hook
94
+ * @param args - The arguments to pass to the hook
95
+ * @returns The result of the hook call
96
+ */
97
+ callHook: <TKey extends string>(hook: TKey, options: CallHookOptions & {
98
+ environment?: string | EnvironmentContext<TResolvedConfig>;
99
+ }, ...args: InferHookParameters<PluginContext<TResolvedConfig>, TKey>) => Promise<InferHookReturnType<PluginContext<TResolvedConfig>, TKey> | undefined>;
100
+ }
101
+ //#endregion
102
+ export { API };
103
+ //# sourceMappingURL=api.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.mts","names":[],"sources":["../../../../../core/src/types/api.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAsCA;AAA6C,UAA5B,GAA4B,CAAA,wBAAA,cAAA,GAAiB,cAAjB,CAAA,CAAA;EAAiB;;;EAgBtD,OAAA,EAZG,UAYH,CAZc,eAYd,CAAA;EACA;;;;;;;;EAiBkC,OAAA,EAAA,CAAA,YAAA,EAlBlC,mBAkBkC,GAjBlC,eAiBkC,GAhBlC,iBAgBkC,GAflC,iBAekC,GAdlC,gBAckC,GAblC,gBAakC,GAZlC,kBAYkC,EAAA,GAXnC,OAWmC,CAAA,IAAA,CAAA;EAYxB;;;;;;;;;EAsCO,GAAA,EAAA,CAAA,YAAA,EAlDH,eAkDG,EAAA,GAlDiB,OAkDjB,CAAA,IAAA,CAAA;EAAuB;;;;;;;;;EA4BnC,KAAA,EAAA,CAAA,YAAA,EAlEK,iBAkEL,GAlEyB,mBAkEzB,EAAA,GAjEN,OAiEM,CAAA,IAAA,CAAA;EAEyB;;;;;;uBA3Df,qBAAqB;;;;;;;;;;wBAWpB,sBAAsB;;;;;;;uBAQvB,qBAAqB;;;;;;;;;yBAUnB,uBAAuB;;;;;;;;;kBAU9B;;;;;;;;;;;;wCAcR,eACG;2BACgB,mBAAmB;cAEnC,oBAAoB,cAAc,kBAAkB,UAC1D,QACH,oBAAoB,cAAc,kBAAkB"}
@@ -0,0 +1,10 @@
1
+ import "./context.mjs";
2
+ import { MaybePromise } from "@stryke/types/base";
3
+ import { ArrayValues } from "@stryke/types/array";
4
+
5
+ //#region ../core/src/types/commands.d.ts
6
+ declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
7
+ type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
8
+ //#endregion
9
+ export { CommandType, SUPPORTED_COMMANDS };
10
+ //# sourceMappingURL=commands.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.d.mts","names":[],"sources":["../../../../../core/src/types/commands.ts"],"sourcesContent":[],"mappings":";;;;;cAsBa;KAYD,WAAA,GAAc,mBAAmB"}
@@ -0,0 +1,16 @@
1
+ //#region ../core/src/types/commands.ts
2
+ const SUPPORTED_COMMANDS = [
3
+ "new",
4
+ "clean",
5
+ "prepare",
6
+ "lint",
7
+ "test",
8
+ "build",
9
+ "docs",
10
+ "deploy",
11
+ "finalize"
12
+ ];
13
+
14
+ //#endregion
15
+ export { SUPPORTED_COMMANDS };
16
+ //# sourceMappingURL=commands.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.mjs","names":[],"sources":["../../../../../core/src/types/commands.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 { ArrayValues } from \"@stryke/types/array\";\nimport type { MaybePromise } from \"@stryke/types/base\";\nimport type { Context } from \"./context\";\n\nexport const SUPPORTED_COMMANDS = [\n \"new\",\n \"clean\",\n \"prepare\",\n \"lint\",\n \"test\",\n \"build\",\n \"docs\",\n \"deploy\",\n \"finalize\"\n] as const;\n\nexport type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;\nexport type Commands<TContext extends Context = Context> = Record<\n CommandType,\n (this: TContext) => MaybePromise<void>\n>;\n"],"mappings":";AAsBA,MAAa,qBAAqB;CAChC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD"}