@powerlines/plugin-tsdown 0.1.205 → 0.1.207

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 (87) hide show
  1. package/dist/_virtual/rolldown_runtime.cjs +29 -0
  2. package/dist/helpers/format-package-json.cjs +18 -2
  3. package/dist/helpers/format-package-json.d.cts +1 -1
  4. package/dist/helpers/format-package-json.d.mts +1 -1
  5. package/dist/helpers/format-package-json.mjs +18 -2
  6. package/dist/helpers/format-package-json.mjs.map +1 -0
  7. package/dist/helpers/index.cjs +2 -3
  8. package/dist/helpers/index.d.cts +1 -3
  9. package/dist/helpers/index.d.mts +1 -3
  10. package/dist/helpers/index.mjs +1 -2
  11. package/dist/helpers/unplugin.cjs +10 -2
  12. package/dist/helpers/unplugin.d.cts +8 -3
  13. package/dist/helpers/unplugin.d.cts.map +1 -0
  14. package/dist/helpers/unplugin.d.mts +8 -3
  15. package/dist/helpers/unplugin.d.mts.map +1 -0
  16. package/dist/helpers/unplugin.mjs +10 -2
  17. package/dist/helpers/unplugin.mjs.map +1 -0
  18. package/dist/index.cjs +8 -37
  19. package/dist/index.d.cts +4 -4
  20. package/dist/index.d.mts +4 -4
  21. package/dist/index.mjs +3 -5
  22. package/dist/index.mjs.map +1 -1
  23. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/is-type.cjs +28 -0
  24. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/is-type.mjs +29 -0
  25. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/is-type.mjs.map +1 -0
  26. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/join-paths.cjs +122 -0
  27. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/join-paths.mjs +123 -0
  28. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/join-paths.mjs.map +1 -0
  29. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/regex.cjs +12 -0
  30. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/regex.mjs +9 -0
  31. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/regex.mjs.map +1 -0
  32. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/slash.cjs +15 -0
  33. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/slash.mjs +15 -0
  34. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/slash.mjs.map +1 -0
  35. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.23/node_modules/@stryke/type-checks/dist/is-empty.cjs +20 -0
  36. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.23/node_modules/@stryke/type-checks/dist/is-empty.mjs +21 -0
  37. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.23/node_modules/@stryke/type-checks/dist/is-empty.mjs.map +1 -0
  38. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.23/node_modules/@stryke/type-checks/dist/is-null.cjs +12 -0
  39. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.23/node_modules/@stryke/type-checks/dist/is-null.mjs +12 -0
  40. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.23/node_modules/@stryke/type-checks/dist/is-null.mjs.map +1 -0
  41. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.23/node_modules/@stryke/type-checks/dist/is-set-string.cjs +20 -0
  42. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.23/node_modules/@stryke/type-checks/dist/is-set-string.mjs +21 -0
  43. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.23/node_modules/@stryke/type-checks/dist/is-set-string.mjs.map +1 -0
  44. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.23/node_modules/@stryke/type-checks/dist/is-set.cjs +19 -0
  45. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.23/node_modules/@stryke/type-checks/dist/is-set.mjs +20 -0
  46. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.23/node_modules/@stryke/type-checks/dist/is-set.mjs.map +1 -0
  47. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.23/node_modules/@stryke/type-checks/dist/is-string.cjs +12 -0
  48. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.23/node_modules/@stryke/type-checks/dist/is-string.mjs +12 -0
  49. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.23/node_modules/@stryke/type-checks/dist/is-string.mjs.map +1 -0
  50. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.23/node_modules/@stryke/type-checks/dist/is-undefined.cjs +8 -0
  51. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.23/node_modules/@stryke/type-checks/dist/is-undefined.mjs +8 -0
  52. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.23/node_modules/@stryke/type-checks/dist/is-undefined.mjs.map +1 -0
  53. package/dist/types/index.cjs +0 -2
  54. package/dist/types/index.d.cts +1 -2
  55. package/dist/types/index.d.mts +1 -2
  56. package/dist/types/index.mjs +0 -3
  57. package/dist/types/plugin.cjs +0 -1
  58. package/dist/types/plugin.d.cts +17 -2
  59. package/dist/types/plugin.d.cts.map +1 -0
  60. package/dist/types/plugin.d.mts +17 -2
  61. package/dist/types/plugin.d.mts.map +1 -0
  62. package/dist/types/plugin.mjs +0 -2
  63. package/package.json +4 -4
  64. package/dist/format-package-json-Cy0hXUxs.mjs +0 -237
  65. package/dist/format-package-json-Cy0hXUxs.mjs.map +0 -1
  66. package/dist/format-package-json-Dt4gyoUq.cjs +0 -242
  67. package/dist/helpers-y2jvHwgF.mjs +0 -1
  68. package/dist/helpers-yB1XkvQI.cjs +0 -0
  69. package/dist/index-BR1oNnaF.d.cts +0 -1
  70. package/dist/index-DEHBdV_z.d.mts +0 -1
  71. package/dist/index-DNLi60D-.d.mts +0 -1
  72. package/dist/index-_wQ5ClJU.d.cts +0 -1
  73. package/dist/plugin-B0q2kj8i.mjs +0 -1
  74. package/dist/plugin-CZEJ9SKF.d.mts +0 -17
  75. package/dist/plugin-CZEJ9SKF.d.mts.map +0 -1
  76. package/dist/plugin-C_NYHEM5.d.cts +0 -17
  77. package/dist/plugin-C_NYHEM5.d.cts.map +0 -1
  78. package/dist/plugin-Ckx8qAq8.cjs +0 -0
  79. package/dist/types--fVOUYBq.mjs +0 -1
  80. package/dist/types-a8gm_IaQ.cjs +0 -0
  81. package/dist/unplugin-0Zevy5n4.mjs +0 -11
  82. package/dist/unplugin-0Zevy5n4.mjs.map +0 -1
  83. package/dist/unplugin-DAxS5ZTK.d.cts +0 -8
  84. package/dist/unplugin-DAxS5ZTK.d.cts.map +0 -1
  85. package/dist/unplugin-DWU1VqQz.cjs +0 -16
  86. package/dist/unplugin-YSgWz6zp.d.mts +0 -8
  87. package/dist/unplugin-YSgWz6zp.d.mts.map +0 -1
@@ -1,237 +0,0 @@
1
- import { format } from "powerlines/lib/utilities/format";
2
-
3
- //#region ../../node_modules/.pnpm/@stryke+path@0.26.3/node_modules/@stryke/path/dist/regex.mjs
4
- const DRIVE_LETTER_START_REGEX = /^[A-Z]:\//i;
5
- const DRIVE_LETTER_REGEX = /^[A-Z]:$/i;
6
- const UNC_REGEX = /^[/\\]{2}/;
7
- const ABSOLUTE_PATH_REGEX = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^~[/\\]|^[A-Z]:[/\\]/i;
8
-
9
- //#endregion
10
- //#region ../../node_modules/.pnpm/@stryke+path@0.26.3/node_modules/@stryke/path/dist/slash.mjs
11
- /**
12
- * Replace backslash to slash
13
- *
14
- * @param path - The string to replace
15
- * @returns The string with replaced backslashes
16
- */
17
- function slash(path) {
18
- if (path.startsWith("\\\\?\\")) return path;
19
- return path.replace(/\\/g, "/");
20
- }
21
-
22
- //#endregion
23
- //#region ../../node_modules/.pnpm/@stryke+path@0.26.3/node_modules/@stryke/path/dist/is-type.mjs
24
- /**
25
- * Check if the path is an absolute path.
26
- *
27
- * @param path - The path to check
28
- * @returns An indicator specifying if the path is an absolute path
29
- */
30
- function isAbsolutePath(path) {
31
- return ABSOLUTE_PATH_REGEX.test(slash(path));
32
- }
33
- /**
34
- * Check if the path is an absolute path.
35
- *
36
- * @remarks
37
- * This is an alias for {@link isAbsolutePath}.
38
- *
39
- * @param path - The path to check
40
- * @returns An indicator specifying if the path is an absolute path
41
- */
42
- function isAbsolute(path) {
43
- return isAbsolutePath(path);
44
- }
45
-
46
- //#endregion
47
- //#region ../../node_modules/.pnpm/@stryke+path@0.26.3/node_modules/@stryke/path/dist/join-paths.mjs
48
- function normalizeWindowsPath(input = "") {
49
- if (!input) return input;
50
- return input.replace(/\\/g, "/").replace(DRIVE_LETTER_START_REGEX, (r) => r.toUpperCase());
51
- }
52
- function correctPaths(path) {
53
- if (!path || path.length === 0) return ".";
54
- path = normalizeWindowsPath(path);
55
- const isUNCPath = path.match(UNC_REGEX);
56
- const isPathAbsolute = isAbsolute(path);
57
- const trailingSeparator = path[path.length - 1] === "/";
58
- path = normalizeString(path, !isPathAbsolute);
59
- if (path.length === 0) {
60
- if (isPathAbsolute) return "/";
61
- return trailingSeparator ? "./" : ".";
62
- }
63
- if (trailingSeparator) path += "/";
64
- if (DRIVE_LETTER_REGEX.test(path)) path += "/";
65
- if (isUNCPath) {
66
- if (!isPathAbsolute) return `//./${path}`;
67
- return `//${path}`;
68
- }
69
- return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
70
- }
71
- /**
72
- * Joins all given path segments together using the platform-specific separator as a delimiter.
73
- * The resulting path is normalized to remove any redundant or unnecessary segments.
74
- *
75
- * @param segments - The path segments to join.
76
- * @returns The joined and normalized path string.
77
- */
78
- function joinPaths(...segments) {
79
- let path = "";
80
- for (const seg of segments) {
81
- if (!seg) continue;
82
- if (path.length > 0) {
83
- const pathTrailing = path[path.length - 1] === "/";
84
- const segLeading = seg[0] === "/";
85
- if (pathTrailing && segLeading) path += seg.slice(1);
86
- else path += pathTrailing || segLeading ? seg : `/${seg}`;
87
- } else path += seg;
88
- }
89
- return correctPaths(path);
90
- }
91
- /**
92
- * Resolves a string path, resolving '.' and '.' segments and allowing paths above the root.
93
- *
94
- * @param path - The path to normalize.
95
- * @param allowAboveRoot - Whether to allow the resulting path to be above the root directory.
96
- * @returns the normalized path string.
97
- */
98
- function normalizeString(path, allowAboveRoot) {
99
- let res = "";
100
- let lastSegmentLength = 0;
101
- let lastSlash = -1;
102
- let dots = 0;
103
- let char = null;
104
- for (let index = 0; index <= path.length; ++index) {
105
- if (index < path.length) char = path[index];
106
- else if (char === "/") break;
107
- else char = "/";
108
- if (char === "/") {
109
- if (lastSlash === index - 1 || dots === 1) {} else if (dots === 2) {
110
- if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
111
- if (res.length > 2) {
112
- const lastSlashIndex = res.lastIndexOf("/");
113
- if (lastSlashIndex === -1) {
114
- res = "";
115
- lastSegmentLength = 0;
116
- } else {
117
- res = res.slice(0, lastSlashIndex);
118
- lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
119
- }
120
- lastSlash = index;
121
- dots = 0;
122
- continue;
123
- } else if (res.length > 0) {
124
- res = "";
125
- lastSegmentLength = 0;
126
- lastSlash = index;
127
- dots = 0;
128
- continue;
129
- }
130
- }
131
- if (allowAboveRoot) {
132
- res += res.length > 0 ? "/.." : "..";
133
- lastSegmentLength = 2;
134
- }
135
- } else {
136
- if (res.length > 0) res += `/${path.slice(lastSlash + 1, index)}`;
137
- else res = path.slice(lastSlash + 1, index);
138
- lastSegmentLength = index - lastSlash - 1;
139
- }
140
- lastSlash = index;
141
- dots = 0;
142
- } else if (char === "." && dots !== -1) ++dots;
143
- else dots = -1;
144
- }
145
- return res;
146
- }
147
-
148
- //#endregion
149
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.22/node_modules/@stryke/type-checks/dist/is-string.mjs
150
- const isString = (value) => {
151
- try {
152
- return typeof value === "string";
153
- } catch {
154
- return false;
155
- }
156
- };
157
-
158
- //#endregion
159
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.22/node_modules/@stryke/type-checks/dist/is-null.mjs
160
- const isNull = (value) => {
161
- try {
162
- return value === null;
163
- } catch {
164
- return false;
165
- }
166
- };
167
-
168
- //#endregion
169
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.22/node_modules/@stryke/type-checks/dist/is-undefined.mjs
170
- const isUndefined = (value) => {
171
- return value === void 0;
172
- };
173
-
174
- //#endregion
175
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.22/node_modules/@stryke/type-checks/dist/is-empty.mjs
176
- /**
177
- * Check if the provided value's type is `null` or `undefined`
178
- *
179
- * @param value - The value to type check
180
- * @returns An indicator specifying if the value provided is of type `null` or `undefined`
181
- */
182
- const isEmpty = (value) => {
183
- try {
184
- return isUndefined(value) || isNull(value);
185
- } catch {
186
- return false;
187
- }
188
- };
189
-
190
- //#endregion
191
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.22/node_modules/@stryke/type-checks/dist/is-set.mjs
192
- /**
193
- * The inverse of the `isEmpty` function
194
- *
195
- * @param value - The value to type check
196
- * @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined`
197
- */
198
- const isSet = (value) => {
199
- try {
200
- return !isEmpty(value);
201
- } catch {
202
- return false;
203
- }
204
- };
205
-
206
- //#endregion
207
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.22/node_modules/@stryke/type-checks/dist/is-set-string.mjs
208
- /**
209
- * Determine if the type is string and is not empty (length greater than zero)
210
- *
211
- * @param value - The value to type check
212
- * @returns An indicator specifying if the value provided is of type `string` and length greater than zero
213
- */
214
- const isSetString = (value) => {
215
- try {
216
- return isSet(value) && isString(value) && value.length > 0;
217
- } catch {
218
- return false;
219
- }
220
- };
221
-
222
- //#endregion
223
- //#region src/helpers/format-package-json.ts
224
- /**
225
- * Formats the `package.json` file in the project root.
226
- *
227
- * @param context - The Tsdown plugin context.
228
- */
229
- async function formatPackageJson(context) {
230
- const packageJsonPath = joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, "package.json");
231
- const packageJsonFile = await context.fs.read(packageJsonPath);
232
- if (isSetString(packageJsonFile)) await context.fs.write(packageJsonPath, await format(context, packageJsonPath, packageJsonFile));
233
- }
234
-
235
- //#endregion
236
- export { formatPackageJson as t };
237
- //# sourceMappingURL=format-package-json-Cy0hXUxs.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"format-package-json-Cy0hXUxs.mjs","names":[],"sources":["../../../node_modules/.pnpm/@stryke+path@0.26.3/node_modules/@stryke/path/dist/regex.mjs","../../../node_modules/.pnpm/@stryke+path@0.26.3/node_modules/@stryke/path/dist/slash.mjs","../../../node_modules/.pnpm/@stryke+path@0.26.3/node_modules/@stryke/path/dist/is-type.mjs","../../../node_modules/.pnpm/@stryke+path@0.26.3/node_modules/@stryke/path/dist/join-paths.mjs","../../../node_modules/.pnpm/@stryke+type-checks@0.5.22/node_modules/@stryke/type-checks/dist/is-string.mjs","../../../node_modules/.pnpm/@stryke+type-checks@0.5.22/node_modules/@stryke/type-checks/dist/is-null.mjs","../../../node_modules/.pnpm/@stryke+type-checks@0.5.22/node_modules/@stryke/type-checks/dist/is-undefined.mjs","../../../node_modules/.pnpm/@stryke+type-checks@0.5.22/node_modules/@stryke/type-checks/dist/is-empty.mjs","../../../node_modules/.pnpm/@stryke+type-checks@0.5.22/node_modules/@stryke/type-checks/dist/is-set.mjs","../../../node_modules/.pnpm/@stryke+type-checks@0.5.22/node_modules/@stryke/type-checks/dist/is-set-string.mjs","../src/helpers/format-package-json.ts"],"sourcesContent":["//#region src/regex.ts\nconst DRIVE_LETTER_START_REGEX = /^[A-Z]:\\//i;\nconst DRIVE_LETTER_REGEX = /^[A-Z]:$/i;\nconst UNC_REGEX = /^[/\\\\]{2}/;\nconst ABSOLUTE_PATH_REGEX = /^[/\\\\](?![/\\\\])|^[/\\\\]{2}(?!\\.)|^~[/\\\\]|^[A-Z]:[/\\\\]/i;\nconst ROOT_FOLDER_REGEX = /^\\/([A-Z]:)?$/i;\nconst FILE_EXTENSION_REGEX = /\\.[0-9a-z]+$/i;\nconst FULL_FILE_EXTENSION_REGEX = /(\\.d)?\\.[0-9a-z]+(\\.map)?$/i;\nconst PACKAGE_PATH_REGEX = /^@\\w+\\/.*$/;\nconst NPM_SCOPED_PACKAGE_REGEX = /^(?:@[\\w-]+\\/)?[\\w-]+$/;\n\n//#endregion\nexport { ABSOLUTE_PATH_REGEX, DRIVE_LETTER_REGEX, DRIVE_LETTER_START_REGEX, FILE_EXTENSION_REGEX, FULL_FILE_EXTENSION_REGEX, NPM_SCOPED_PACKAGE_REGEX, PACKAGE_PATH_REGEX, ROOT_FOLDER_REGEX, UNC_REGEX };\n//# sourceMappingURL=regex.mjs.map","import { isAbsolutePath } from \"./is-type.mjs\";\n\n//#region src/slash.ts\n/**\n* Replace backslash to slash\n*\n* @param path - The string to replace\n* @returns The string with replaced backslashes\n*/\nfunction slash(path) {\n\tif (path.startsWith(\"\\\\\\\\?\\\\\")) return path;\n\treturn path.replace(/\\\\/g, \"/\");\n}\n/**\n* Replace backslash to slash and remove unneeded leading and trailing slashes\n*\n* @param path - The string to replace\n* @returns The string with replaced backslashes\n*/\nfunction formatSlash(path) {\n\tconst formatted = slash(path);\n\treturn isAbsolutePath(formatted) ? formatted.replace(/\\/+$/g, \"\") : formatted.replace(/^\\.\\//g, \"\").replace(/\\/+$/g, \"\");\n}\n\n//#endregion\nexport { formatSlash, slash };\n//# sourceMappingURL=slash.mjs.map","import { ABSOLUTE_PATH_REGEX, NPM_SCOPED_PACKAGE_REGEX } from \"./regex.mjs\";\nimport { slash } from \"./slash.mjs\";\n\n//#region src/is-type.ts\n/**\n* Check if the path is an absolute path.\n*\n* @param path - The path to check\n* @returns An indicator specifying if the path is an absolute path\n*/\nfunction isAbsolutePath(path) {\n\treturn ABSOLUTE_PATH_REGEX.test(slash(path));\n}\n/**\n* Check if the path is an absolute path.\n*\n* @remarks\n* This is an alias for {@link isAbsolutePath}.\n*\n* @param path - The path to check\n* @returns An indicator specifying if the path is an absolute path\n*/\nfunction isAbsolute(path) {\n\treturn isAbsolutePath(path);\n}\n/**\n* Check if the path is a relative path.\n*\n* @param path - The path to check\n* @returns An indicator specifying if the path is a relative path\n*/\nfunction isRelativePath(path) {\n\treturn !isAbsolutePath(path);\n}\n/**\n* Check if the path is a relative path.\n*\n* @remarks\n* This is an alias for {@link isRelativePath}.\n*\n* @param path - The path to check\n* @returns An indicator specifying if the path is a relative path\n*/\nfunction isRelative(path) {\n\treturn isRelativePath(path);\n}\n/**\n* Check if the path is a npm package path.\n*\n* @remarks\n* This only checks if the path matches the npm namespace scoped package naming convention such as `@scope/package-name`. This is an alias for {@link isNpmScopedPackage}.\n*\n* @example\n* ```ts\n* isNpmScopedPackage(\"@stryke/path\"); // returns true\n* isNpmScopedPackage(\"lodash\"); // returns false\n* isNpmNamespacePackage(\"./src/index.ts\"); // returns false\n* ```\n*\n* @param path - The path to check\n* @returns An indicator specifying if the path is a npm package path\n*/\nfunction isNpmScopedPackagePath(path) {\n\treturn NPM_SCOPED_PACKAGE_REGEX.test(slash(path));\n}\n/**\n* Check if the path is a npm package path.\n*\n* @remarks\n* This only checks if the path matches the npm namespace scoped package naming convention such as `@scope/package-name`. This is an alias for {@link isNpmScopedPackagePath}.\n*\n* @example\n* ```ts\n* isNpmScopedPackagePath(\"@stryke/path\"); // returns true\n* isNpmScopedPackagePath(\"lodash\"); // returns false\n* isNpmScopedPackagePath(\"./src/index.ts\"); // returns false\n* ```\n*\n* @param path - The path to check\n* @returns An indicator specifying if the path is a npm package path\n*/\nfunction isNpmScopedPackage(path) {\n\treturn isNpmScopedPackagePath(path);\n}\n\n//#endregion\nexport { isAbsolute, isAbsolutePath, isNpmScopedPackage, isNpmScopedPackagePath, isRelative, isRelativePath };\n//# sourceMappingURL=is-type.mjs.map","import { DRIVE_LETTER_REGEX, DRIVE_LETTER_START_REGEX, UNC_REGEX } from \"./regex.mjs\";\nimport { isAbsolute } from \"./is-type.mjs\";\n\n//#region src/join-paths.ts\nfunction normalizeWindowsPath(input = \"\") {\n\tif (!input) return input;\n\treturn input.replace(/\\\\/g, \"/\").replace(DRIVE_LETTER_START_REGEX, (r) => r.toUpperCase());\n}\nfunction correctPaths(path) {\n\tif (!path || path.length === 0) return \".\";\n\tpath = normalizeWindowsPath(path);\n\tconst isUNCPath = path.match(UNC_REGEX);\n\tconst isPathAbsolute = isAbsolute(path);\n\tconst trailingSeparator = path[path.length - 1] === \"/\";\n\tpath = normalizeString(path, !isPathAbsolute);\n\tif (path.length === 0) {\n\t\tif (isPathAbsolute) return \"/\";\n\t\treturn trailingSeparator ? \"./\" : \".\";\n\t}\n\tif (trailingSeparator) path += \"/\";\n\tif (DRIVE_LETTER_REGEX.test(path)) path += \"/\";\n\tif (isUNCPath) {\n\t\tif (!isPathAbsolute) return `//./${path}`;\n\t\treturn `//${path}`;\n\t}\n\treturn isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;\n}\n/**\n* Joins all given path segments together using the platform-specific separator as a delimiter.\n* The resulting path is normalized to remove any redundant or unnecessary segments.\n*\n* @param segments - The path segments to join.\n* @returns The joined and normalized path string.\n*/\nfunction joinPaths(...segments) {\n\tlet path = \"\";\n\tfor (const seg of segments) {\n\t\tif (!seg) continue;\n\t\tif (path.length > 0) {\n\t\t\tconst pathTrailing = path[path.length - 1] === \"/\";\n\t\t\tconst segLeading = seg[0] === \"/\";\n\t\t\tif (pathTrailing && segLeading) path += seg.slice(1);\n\t\t\telse path += pathTrailing || segLeading ? seg : `/${seg}`;\n\t\t} else path += seg;\n\t}\n\treturn correctPaths(path);\n}\nconst join = joinPaths;\n/**\n* Resolves a string path, resolving '.' and '.' segments and allowing paths above the root.\n*\n* @param path - The path to normalize.\n* @param allowAboveRoot - Whether to allow the resulting path to be above the root directory.\n* @returns the normalized path string.\n*/\nfunction normalizeString(path, allowAboveRoot) {\n\tlet res = \"\";\n\tlet lastSegmentLength = 0;\n\tlet lastSlash = -1;\n\tlet dots = 0;\n\tlet char = null;\n\tfor (let index = 0; index <= path.length; ++index) {\n\t\tif (index < path.length) char = path[index];\n\t\telse if (char === \"/\") break;\n\t\telse char = \"/\";\n\t\tif (char === \"/\") {\n\t\t\tif (lastSlash === index - 1 || dots === 1) {} else if (dots === 2) {\n\t\t\t\tif (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== \".\" || res[res.length - 2] !== \".\") {\n\t\t\t\t\tif (res.length > 2) {\n\t\t\t\t\t\tconst lastSlashIndex = res.lastIndexOf(\"/\");\n\t\t\t\t\t\tif (lastSlashIndex === -1) {\n\t\t\t\t\t\t\tres = \"\";\n\t\t\t\t\t\t\tlastSegmentLength = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tres = res.slice(0, lastSlashIndex);\n\t\t\t\t\t\t\tlastSegmentLength = res.length - 1 - res.lastIndexOf(\"/\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlastSlash = index;\n\t\t\t\t\t\tdots = 0;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if (res.length > 0) {\n\t\t\t\t\t\tres = \"\";\n\t\t\t\t\t\tlastSegmentLength = 0;\n\t\t\t\t\t\tlastSlash = index;\n\t\t\t\t\t\tdots = 0;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (allowAboveRoot) {\n\t\t\t\t\tres += res.length > 0 ? \"/..\" : \"..\";\n\t\t\t\t\tlastSegmentLength = 2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (res.length > 0) res += `/${path.slice(lastSlash + 1, index)}`;\n\t\t\t\telse res = path.slice(lastSlash + 1, index);\n\t\t\t\tlastSegmentLength = index - lastSlash - 1;\n\t\t\t}\n\t\t\tlastSlash = index;\n\t\t\tdots = 0;\n\t\t} else if (char === \".\" && dots !== -1) ++dots;\n\t\telse dots = -1;\n\t}\n\treturn res;\n}\n\n//#endregion\nexport { join, joinPaths };\n//# sourceMappingURL=join-paths.mjs.map","//#region src/is-string.ts\nconst isString = (value) => {\n\ttry {\n\t\treturn typeof value === \"string\";\n\t} catch {\n\t\treturn false;\n\t}\n};\n\n//#endregion\nexport { isString };\n//# sourceMappingURL=is-string.mjs.map","//#region src/is-null.ts\nconst isNull = (value) => {\n\ttry {\n\t\treturn value === null;\n\t} catch {\n\t\treturn false;\n\t}\n};\n\n//#endregion\nexport { isNull };\n//# sourceMappingURL=is-null.mjs.map","//#region src/is-undefined.ts\nconst isUndefined = (value) => {\n\treturn value === void 0;\n};\n\n//#endregion\nexport { isUndefined };\n//# sourceMappingURL=is-undefined.mjs.map","import { isDate } from \"./is-date.mjs\";\nimport { isFunction } from \"./is-function.mjs\";\nimport { isNull } from \"./is-null.mjs\";\nimport { isNumber } from \"./is-number.mjs\";\nimport { isSymbol } from \"./is-symbol.mjs\";\nimport { isUndefined } from \"./is-undefined.mjs\";\n\n//#region src/is-empty.ts\n/**\n* Check if the provided value's type is `null` or `undefined`\n*\n* @param value - The value to type check\n* @returns An indicator specifying if the value provided is of type `null` or `undefined`\n*/\nconst isEmpty = (value) => {\n\ttry {\n\t\treturn isUndefined(value) || isNull(value);\n\t} catch {\n\t\treturn false;\n\t}\n};\nconst isEmptyAnything = (value) => {\n\tif (value === true || value === false) return true;\n\tif (value === null || value === void 0) return true;\n\tif (isNumber(value)) return value === 0;\n\tif (isDate(value)) return Number.isNaN(value.getTime());\n\tif (isFunction(value)) return false;\n\tif (isSymbol(value)) return false;\n\tconst { length } = value;\n\tif (isNumber(length)) return length === 0;\n\tconst { size } = value;\n\tif (isNumber(size)) return size === 0;\n\treturn Object.keys(value).length === 0;\n};\n\n//#endregion\nexport { isEmpty, isEmptyAnything };\n//# sourceMappingURL=is-empty.mjs.map","import { isEmpty } from \"./is-empty.mjs\";\n\n//#region src/is-set.ts\n/**\n* The inverse of the `isEmpty` function\n*\n* @param value - The value to type check\n* @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined`\n*/\nconst isSet = (value) => {\n\ttry {\n\t\treturn !isEmpty(value);\n\t} catch {\n\t\treturn false;\n\t}\n};\n\n//#endregion\nexport { isSet };\n//# sourceMappingURL=is-set.mjs.map","import { isString } from \"./is-string.mjs\";\nimport { isSet } from \"./is-set.mjs\";\n\n//#region src/is-set-string.ts\n/**\n* Determine if the type is string and is not empty (length greater than zero)\n*\n* @param value - The value to type check\n* @returns An indicator specifying if the value provided is of type `string` and length greater than zero\n*/\nconst isSetString = (value) => {\n\ttry {\n\t\treturn isSet(value) && isString(value) && value.length > 0;\n\t} catch {\n\t\treturn false;\n\t}\n};\n\n//#endregion\nexport { isSetString };\n//# sourceMappingURL=is-set-string.mjs.map","/* -------------------------------------------------------------------\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 { joinPaths } from \"@stryke/path/join\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { format } from \"powerlines/lib/utilities/format\";\nimport { TsdownPluginContext } from \"../types/plugin\";\n\n/**\n * Formats the `package.json` file in the project root.\n *\n * @param context - The Tsdown plugin context.\n */\nexport async function formatPackageJson(context: TsdownPluginContext) {\n const packageJsonPath = joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n \"package.json\"\n );\n const packageJsonFile = await context.fs.read(packageJsonPath);\n if (isSetString(packageJsonFile)) {\n await context.fs.write(\n packageJsonPath,\n await format(context, packageJsonPath, packageJsonFile)\n );\n }\n}\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9],"mappings":"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"}
@@ -1,242 +0,0 @@
1
- const require_index = require('./index.cjs');
2
- let powerlines_lib_utilities_format = require("powerlines/lib/utilities/format");
3
-
4
- //#region ../../node_modules/.pnpm/@stryke+path@0.26.3/node_modules/@stryke/path/dist/regex.mjs
5
- const DRIVE_LETTER_START_REGEX = /^[A-Z]:\//i;
6
- const DRIVE_LETTER_REGEX = /^[A-Z]:$/i;
7
- const UNC_REGEX = /^[/\\]{2}/;
8
- const ABSOLUTE_PATH_REGEX = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^~[/\\]|^[A-Z]:[/\\]/i;
9
-
10
- //#endregion
11
- //#region ../../node_modules/.pnpm/@stryke+path@0.26.3/node_modules/@stryke/path/dist/slash.mjs
12
- /**
13
- * Replace backslash to slash
14
- *
15
- * @param path - The string to replace
16
- * @returns The string with replaced backslashes
17
- */
18
- function slash(path) {
19
- if (path.startsWith("\\\\?\\")) return path;
20
- return path.replace(/\\/g, "/");
21
- }
22
-
23
- //#endregion
24
- //#region ../../node_modules/.pnpm/@stryke+path@0.26.3/node_modules/@stryke/path/dist/is-type.mjs
25
- /**
26
- * Check if the path is an absolute path.
27
- *
28
- * @param path - The path to check
29
- * @returns An indicator specifying if the path is an absolute path
30
- */
31
- function isAbsolutePath(path) {
32
- return ABSOLUTE_PATH_REGEX.test(slash(path));
33
- }
34
- /**
35
- * Check if the path is an absolute path.
36
- *
37
- * @remarks
38
- * This is an alias for {@link isAbsolutePath}.
39
- *
40
- * @param path - The path to check
41
- * @returns An indicator specifying if the path is an absolute path
42
- */
43
- function isAbsolute(path) {
44
- return isAbsolutePath(path);
45
- }
46
-
47
- //#endregion
48
- //#region ../../node_modules/.pnpm/@stryke+path@0.26.3/node_modules/@stryke/path/dist/join-paths.mjs
49
- function normalizeWindowsPath(input = "") {
50
- if (!input) return input;
51
- return input.replace(/\\/g, "/").replace(DRIVE_LETTER_START_REGEX, (r) => r.toUpperCase());
52
- }
53
- function correctPaths(path) {
54
- if (!path || path.length === 0) return ".";
55
- path = normalizeWindowsPath(path);
56
- const isUNCPath = path.match(UNC_REGEX);
57
- const isPathAbsolute = isAbsolute(path);
58
- const trailingSeparator = path[path.length - 1] === "/";
59
- path = normalizeString(path, !isPathAbsolute);
60
- if (path.length === 0) {
61
- if (isPathAbsolute) return "/";
62
- return trailingSeparator ? "./" : ".";
63
- }
64
- if (trailingSeparator) path += "/";
65
- if (DRIVE_LETTER_REGEX.test(path)) path += "/";
66
- if (isUNCPath) {
67
- if (!isPathAbsolute) return `//./${path}`;
68
- return `//${path}`;
69
- }
70
- return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
71
- }
72
- /**
73
- * Joins all given path segments together using the platform-specific separator as a delimiter.
74
- * The resulting path is normalized to remove any redundant or unnecessary segments.
75
- *
76
- * @param segments - The path segments to join.
77
- * @returns The joined and normalized path string.
78
- */
79
- function joinPaths(...segments) {
80
- let path = "";
81
- for (const seg of segments) {
82
- if (!seg) continue;
83
- if (path.length > 0) {
84
- const pathTrailing = path[path.length - 1] === "/";
85
- const segLeading = seg[0] === "/";
86
- if (pathTrailing && segLeading) path += seg.slice(1);
87
- else path += pathTrailing || segLeading ? seg : `/${seg}`;
88
- } else path += seg;
89
- }
90
- return correctPaths(path);
91
- }
92
- /**
93
- * Resolves a string path, resolving '.' and '.' segments and allowing paths above the root.
94
- *
95
- * @param path - The path to normalize.
96
- * @param allowAboveRoot - Whether to allow the resulting path to be above the root directory.
97
- * @returns the normalized path string.
98
- */
99
- function normalizeString(path, allowAboveRoot) {
100
- let res = "";
101
- let lastSegmentLength = 0;
102
- let lastSlash = -1;
103
- let dots = 0;
104
- let char = null;
105
- for (let index = 0; index <= path.length; ++index) {
106
- if (index < path.length) char = path[index];
107
- else if (char === "/") break;
108
- else char = "/";
109
- if (char === "/") {
110
- if (lastSlash === index - 1 || dots === 1) {} else if (dots === 2) {
111
- if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
112
- if (res.length > 2) {
113
- const lastSlashIndex = res.lastIndexOf("/");
114
- if (lastSlashIndex === -1) {
115
- res = "";
116
- lastSegmentLength = 0;
117
- } else {
118
- res = res.slice(0, lastSlashIndex);
119
- lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
120
- }
121
- lastSlash = index;
122
- dots = 0;
123
- continue;
124
- } else if (res.length > 0) {
125
- res = "";
126
- lastSegmentLength = 0;
127
- lastSlash = index;
128
- dots = 0;
129
- continue;
130
- }
131
- }
132
- if (allowAboveRoot) {
133
- res += res.length > 0 ? "/.." : "..";
134
- lastSegmentLength = 2;
135
- }
136
- } else {
137
- if (res.length > 0) res += `/${path.slice(lastSlash + 1, index)}`;
138
- else res = path.slice(lastSlash + 1, index);
139
- lastSegmentLength = index - lastSlash - 1;
140
- }
141
- lastSlash = index;
142
- dots = 0;
143
- } else if (char === "." && dots !== -1) ++dots;
144
- else dots = -1;
145
- }
146
- return res;
147
- }
148
-
149
- //#endregion
150
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.22/node_modules/@stryke/type-checks/dist/is-string.mjs
151
- const isString = (value) => {
152
- try {
153
- return typeof value === "string";
154
- } catch {
155
- return false;
156
- }
157
- };
158
-
159
- //#endregion
160
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.22/node_modules/@stryke/type-checks/dist/is-null.mjs
161
- const isNull = (value) => {
162
- try {
163
- return value === null;
164
- } catch {
165
- return false;
166
- }
167
- };
168
-
169
- //#endregion
170
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.22/node_modules/@stryke/type-checks/dist/is-undefined.mjs
171
- const isUndefined = (value) => {
172
- return value === void 0;
173
- };
174
-
175
- //#endregion
176
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.22/node_modules/@stryke/type-checks/dist/is-empty.mjs
177
- /**
178
- * Check if the provided value's type is `null` or `undefined`
179
- *
180
- * @param value - The value to type check
181
- * @returns An indicator specifying if the value provided is of type `null` or `undefined`
182
- */
183
- const isEmpty = (value) => {
184
- try {
185
- return isUndefined(value) || isNull(value);
186
- } catch {
187
- return false;
188
- }
189
- };
190
-
191
- //#endregion
192
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.22/node_modules/@stryke/type-checks/dist/is-set.mjs
193
- /**
194
- * The inverse of the `isEmpty` function
195
- *
196
- * @param value - The value to type check
197
- * @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined`
198
- */
199
- const isSet = (value) => {
200
- try {
201
- return !isEmpty(value);
202
- } catch {
203
- return false;
204
- }
205
- };
206
-
207
- //#endregion
208
- //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.22/node_modules/@stryke/type-checks/dist/is-set-string.mjs
209
- /**
210
- * Determine if the type is string and is not empty (length greater than zero)
211
- *
212
- * @param value - The value to type check
213
- * @returns An indicator specifying if the value provided is of type `string` and length greater than zero
214
- */
215
- const isSetString = (value) => {
216
- try {
217
- return isSet(value) && isString(value) && value.length > 0;
218
- } catch {
219
- return false;
220
- }
221
- };
222
-
223
- //#endregion
224
- //#region src/helpers/format-package-json.ts
225
- /**
226
- * Formats the `package.json` file in the project root.
227
- *
228
- * @param context - The Tsdown plugin context.
229
- */
230
- async function formatPackageJson(context) {
231
- const packageJsonPath = joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, "package.json");
232
- const packageJsonFile = await context.fs.read(packageJsonPath);
233
- if (isSetString(packageJsonFile)) await context.fs.write(packageJsonPath, await (0, powerlines_lib_utilities_format.format)(context, packageJsonPath, packageJsonFile));
234
- }
235
-
236
- //#endregion
237
- Object.defineProperty(exports, 'formatPackageJson', {
238
- enumerable: true,
239
- get: function () {
240
- return formatPackageJson;
241
- }
242
- });
@@ -1 +0,0 @@
1
- export { };
File without changes
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- export { };
@@ -1,17 +0,0 @@
1
- import { TsdownBuildConfig } from "powerlines/types/build";
2
- import { TsdownUserConfig } from "powerlines/types/config";
3
- import { PluginContext } from "powerlines/types/context";
4
- import { TsdownResolvedConfig } from "powerlines/types/resolved";
5
-
6
- //#region src/types/plugin.d.ts
7
- type TsdownPluginOptions = Partial<TsdownBuildConfig>;
8
- type TsdownPluginUserConfig = TsdownUserConfig;
9
- type TsdownPluginResolvedConfig = TsdownResolvedConfig;
10
- type TsdownPluginContext<TResolvedConfig extends TsdownPluginResolvedConfig = TsdownPluginResolvedConfig> = PluginContext<TResolvedConfig>;
11
- declare type __ΩTsdownPluginOptions = any[];
12
- declare type __ΩTsdownPluginUserConfig = any[];
13
- declare type __ΩTsdownPluginResolvedConfig = any[];
14
- declare type __ΩTsdownPluginContext = any[];
15
- //#endregion
16
- export { __ΩTsdownPluginContext as a, __ΩTsdownPluginUserConfig as c, TsdownPluginUserConfig as i, TsdownPluginOptions as n, __ΩTsdownPluginOptions as o, TsdownPluginResolvedConfig as r, __ΩTsdownPluginResolvedConfig as s, TsdownPluginContext as t };
17
- //# sourceMappingURL=plugin-CZEJ9SKF.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin-CZEJ9SKF.d.mts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;KAuBY,mBAAA,GAAsB,QAAQ;KAE9B,sBAAA,GAAyB;AAFzB,KAIA,0BAAA,GAA6B,oBAJP;AAEtB,KAIA,mBAJsB,CAAA,wBAKR,0BAL2B,GAMjD,0BANiD,CAAA,GAOjD,aAPiD,CAOnC,eAPmC,CAAA;AAEzC,sCAA6B,GAAA,EAAA;AAE7B,yCAAmB,GAAA,EAAA;AACL,6CAAA,GAAA,EAAA;AACtB,sCAAA,GAAA,EAAA"}
@@ -1,17 +0,0 @@
1
- import { TsdownBuildConfig } from "powerlines/types/build";
2
- import { TsdownUserConfig } from "powerlines/types/config";
3
- import { PluginContext } from "powerlines/types/context";
4
- import { TsdownResolvedConfig } from "powerlines/types/resolved";
5
-
6
- //#region src/types/plugin.d.ts
7
- type TsdownPluginOptions = Partial<TsdownBuildConfig>;
8
- type TsdownPluginUserConfig = TsdownUserConfig;
9
- type TsdownPluginResolvedConfig = TsdownResolvedConfig;
10
- type TsdownPluginContext<TResolvedConfig extends TsdownPluginResolvedConfig = TsdownPluginResolvedConfig> = PluginContext<TResolvedConfig>;
11
- declare type __ΩTsdownPluginOptions = any[];
12
- declare type __ΩTsdownPluginUserConfig = any[];
13
- declare type __ΩTsdownPluginResolvedConfig = any[];
14
- declare type __ΩTsdownPluginContext = any[];
15
- //#endregion
16
- export { __ΩTsdownPluginContext as a, __ΩTsdownPluginUserConfig as c, TsdownPluginUserConfig as i, TsdownPluginOptions as n, __ΩTsdownPluginOptions as o, TsdownPluginResolvedConfig as r, __ΩTsdownPluginResolvedConfig as s, TsdownPluginContext as t };
17
- //# sourceMappingURL=plugin-C_NYHEM5.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin-C_NYHEM5.d.cts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;KAuBY,mBAAA,GAAsB,QAAQ;KAE9B,sBAAA,GAAyB;AAFzB,KAIA,0BAAA,GAA6B,oBAJP;AAEtB,KAIA,mBAJsB,CAAA,wBAKR,0BAL2B,GAMjD,0BANiD,CAAA,GAOjD,aAPiD,CAOnC,eAPmC,CAAA;AAEzC,sCAA6B,GAAA,EAAA;AAE7B,yCAAmB,GAAA,EAAA;AACL,6CAAA,GAAA,EAAA;AACtB,sCAAA,GAAA,EAAA"}
File without changes
@@ -1 +0,0 @@
1
- export { };
File without changes
@@ -1,11 +0,0 @@
1
- import { createUnplugin } from "powerlines/lib/unplugin";
2
- import { createRolldownPlugin } from "unplugin";
3
-
4
- //#region src/helpers/unplugin.ts
5
- function createTsdownPlugin(context) {
6
- return createRolldownPlugin(createUnplugin(context))({});
7
- }
8
-
9
- //#endregion
10
- export { createTsdownPlugin as t };
11
- //# sourceMappingURL=unplugin-0Zevy5n4.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"unplugin-0Zevy5n4.mjs","names":[],"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/lib/unplugin\";\nimport { createRolldownPlugin } from \"unplugin\";\nimport { TsdownPluginContext } from \"../types/plugin\";\n\nexport function createTsdownPlugin(context: TsdownPluginContext) {\n return createRolldownPlugin(createUnplugin(context))({});\n}\n"],"mappings":";;;;AAsBA,SAAgB,mBAAmB,SAA8B;AAC/D,QAAO,qBAAqB,eAAe,QAAQ,CAAC,CAAC,EAAE,CAAC"}
@@ -1,8 +0,0 @@
1
- import { t as TsdownPluginContext } from "./plugin-C_NYHEM5.cjs";
2
- import * as rolldown0 from "rolldown";
3
-
4
- //#region src/helpers/unplugin.d.ts
5
- declare function createTsdownPlugin(context: TsdownPluginContext): rolldown0.Plugin<any> | rolldown0.Plugin<any>[];
6
- //#endregion
7
- export { createTsdownPlugin as t };
8
- //# sourceMappingURL=unplugin-DAxS5ZTK.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"unplugin-DAxS5ZTK.d.cts","names":[],"sources":["../src/helpers/unplugin.ts"],"sourcesContent":[],"mappings":";;;;iBAsBgB,kBAAA,UAA4B,sBAAmB,SAAA,CAAA,cAAA,SAAA,CAAA"}
@@ -1,16 +0,0 @@
1
- const require_index = require('./index.cjs');
2
- let powerlines_lib_unplugin = require("powerlines/lib/unplugin");
3
- let unplugin = require("unplugin");
4
-
5
- //#region src/helpers/unplugin.ts
6
- function createTsdownPlugin(context) {
7
- return (0, unplugin.createRolldownPlugin)((0, powerlines_lib_unplugin.createUnplugin)(context))({});
8
- }
9
-
10
- //#endregion
11
- Object.defineProperty(exports, 'createTsdownPlugin', {
12
- enumerable: true,
13
- get: function () {
14
- return createTsdownPlugin;
15
- }
16
- });
@@ -1,8 +0,0 @@
1
- import { t as TsdownPluginContext } from "./plugin-CZEJ9SKF.mjs";
2
- import * as rolldown0 from "rolldown";
3
-
4
- //#region src/helpers/unplugin.d.ts
5
- declare function createTsdownPlugin(context: TsdownPluginContext): rolldown0.Plugin<any> | rolldown0.Plugin<any>[];
6
- //#endregion
7
- export { createTsdownPlugin as t };
8
- //# sourceMappingURL=unplugin-YSgWz6zp.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"unplugin-YSgWz6zp.d.mts","names":[],"sources":["../src/helpers/unplugin.ts"],"sourcesContent":[],"mappings":";;;;iBAsBgB,kBAAA,UAA4B,sBAAmB,SAAA,CAAA,cAAA,SAAA,CAAA"}