@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
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
This is an internal package used by various other Powerlines packages. Please use the `powerlines` package instead.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
+
value: mod,
|
|
24
|
+
enumerable: true
|
|
25
|
+
}) : target, mod));
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
|
|
29
|
+
exports.__toESM = __toESM;
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
const require_lib_config = require('./lib/config.cjs');
|
|
2
|
+
const require_lib_constants_environments = require('./lib/constants/environments.cjs');
|
|
3
|
+
const require_lib_constants_meta = require('./lib/constants/meta.cjs');
|
|
4
|
+
const require_lib_entry = require('./lib/entry.cjs');
|
|
5
|
+
const require_lib_logger = require('./lib/logger.cjs');
|
|
6
|
+
const require_types_unplugin = require('./types/unplugin.cjs');
|
|
7
|
+
const require_lib_unplugin_helpers = require('./lib/unplugin/helpers.cjs');
|
|
8
|
+
const require_lib_unplugin_module_resolution = require('./lib/unplugin/module-resolution.cjs');
|
|
9
|
+
const require_lib_utilities_source_file = require('./lib/utilities/source-file.cjs');
|
|
10
|
+
const require_lib_unplugin_plugin = require('./lib/unplugin/plugin.cjs');
|
|
11
|
+
const require_lib_utilities_file_header = require('./lib/utilities/file-header.cjs');
|
|
12
|
+
const require_lib_utilities_format = require('./lib/utilities/format.cjs');
|
|
13
|
+
const require_lib_utilities_source_map = require('./lib/utilities/source-map.cjs');
|
|
14
|
+
const require_lib_utilities_write_file = require('./lib/utilities/write-file.cjs');
|
|
15
|
+
require('./lib/index.cjs');
|
|
16
|
+
const require_types_commands = require('./types/commands.cjs');
|
|
17
|
+
const require_types_fs = require('./types/fs.cjs');
|
|
18
|
+
const require_types_hooks = require('./types/hooks.cjs');
|
|
19
|
+
const require_types_plugin = require('./types/plugin.cjs');
|
|
20
|
+
require('./types/index.cjs');
|
|
21
|
+
|
|
22
|
+
exports.BUILDER_VARIANTS = require_types_unplugin.BUILDER_VARIANTS;
|
|
23
|
+
exports.CACHE_HASH_LENGTH = require_lib_constants_meta.CACHE_HASH_LENGTH;
|
|
24
|
+
exports.CLIENT_ENVIRONMENT = require_lib_constants_environments.CLIENT_ENVIRONMENT;
|
|
25
|
+
exports.DEFAULT_ENVIRONMENT = require_lib_constants_environments.DEFAULT_ENVIRONMENT;
|
|
26
|
+
exports.GLOBAL_ENVIRONMENT = require_lib_constants_environments.GLOBAL_ENVIRONMENT;
|
|
27
|
+
exports.HOOKS_LIST_ORDERS = require_types_hooks.HOOKS_LIST_ORDERS;
|
|
28
|
+
exports.KNOWN_PLUGIN_FIELDS = require_types_plugin.KNOWN_PLUGIN_FIELDS;
|
|
29
|
+
exports.PLUGIN_HOOKS_FIELDS = require_types_plugin.PLUGIN_HOOKS_FIELDS;
|
|
30
|
+
exports.PLUGIN_NON_HOOK_FIELDS = require_types_plugin.PLUGIN_NON_HOOK_FIELDS;
|
|
31
|
+
exports.ROOT_HASH_LENGTH = require_lib_constants_meta.ROOT_HASH_LENGTH;
|
|
32
|
+
exports.RSC_ENVIRONMENT = require_lib_constants_environments.RSC_ENVIRONMENT;
|
|
33
|
+
exports.SERVER_ENVIRONMENT = require_lib_constants_environments.SERVER_ENVIRONMENT;
|
|
34
|
+
exports.SSR_ENVIRONMENT = require_lib_constants_environments.SSR_ENVIRONMENT;
|
|
35
|
+
exports.STORAGE_PRESETS = require_types_fs.STORAGE_PRESETS;
|
|
36
|
+
exports.SUPPORTED_COMMANDS = require_types_commands.SUPPORTED_COMMANDS;
|
|
37
|
+
exports.UNPLUGIN_BUILDER_VARIANTS = require_types_unplugin.UNPLUGIN_BUILDER_VARIANTS;
|
|
38
|
+
exports.__VFS_PATCH__ = require_types_fs.__VFS_PATCH__;
|
|
39
|
+
exports.__VFS_REVERT__ = require_types_fs.__VFS_REVERT__;
|
|
40
|
+
exports.combineContexts = require_lib_unplugin_helpers.combineContexts;
|
|
41
|
+
exports.createLog = require_lib_logger.createLog;
|
|
42
|
+
exports.createUnplugin = require_lib_unplugin_plugin.createUnplugin;
|
|
43
|
+
exports.createUnpluginModuleResolutionFunctions = require_lib_unplugin_module_resolution.createUnpluginModuleResolutionFunctions;
|
|
44
|
+
exports.createUnpluginResolver = require_lib_unplugin_plugin.createUnpluginResolver;
|
|
45
|
+
exports.defineConfig = require_lib_config.defineConfig;
|
|
46
|
+
exports.extendLog = require_lib_logger.extendLog;
|
|
47
|
+
exports.format = require_lib_utilities_format.format;
|
|
48
|
+
exports.formatFolder = require_lib_utilities_format.formatFolder;
|
|
49
|
+
exports.generateSourceMap = require_lib_utilities_source_map.generateSourceMap;
|
|
50
|
+
exports.getBaseFileHeader = require_lib_utilities_file_header.getBaseFileHeader;
|
|
51
|
+
exports.getFileHeader = require_lib_utilities_file_header.getFileHeader;
|
|
52
|
+
exports.getMagicString = require_lib_utilities_source_file.getMagicString;
|
|
53
|
+
exports.getSourceFile = require_lib_utilities_source_file.getSourceFile;
|
|
54
|
+
exports.getString = require_lib_utilities_source_file.getString;
|
|
55
|
+
exports.getUniqueInputs = require_lib_entry.getUniqueInputs;
|
|
56
|
+
exports.isResolvedEntryTypeDefinition = require_lib_entry.isResolvedEntryTypeDefinition;
|
|
57
|
+
exports.isTypeDefinition = require_lib_entry.isTypeDefinition;
|
|
58
|
+
exports.isUnpluginBuilderVariant = require_lib_unplugin_helpers.isUnpluginBuilderVariant;
|
|
59
|
+
exports.loadUserConfigFile = require_lib_config.loadUserConfigFile;
|
|
60
|
+
exports.loadWorkspaceConfig = require_lib_config.loadWorkspaceConfig;
|
|
61
|
+
exports.resolveEntryOutput = require_lib_entry.resolveEntryOutput;
|
|
62
|
+
exports.resolveInput = require_lib_entry.resolveInput;
|
|
63
|
+
exports.resolveInputs = require_lib_entry.resolveInputs;
|
|
64
|
+
exports.resolveInputsSync = require_lib_entry.resolveInputsSync;
|
|
65
|
+
exports.writeFile = require_lib_utilities_write_file.writeFile;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ResolveOptions, STORAGE_PRESETS, StorageAdapter, StoragePort, StoragePreset, VirtualFile, VirtualFileData, VirtualFileExtension, VirtualFileMetadata, VirtualFileSystemInterface, WriteData, WriteOptions, __VFS_PATCH__, __VFS_REVERT__, __ΩResolveOptions, __ΩStorageAdapter, __ΩStoragePort, __ΩStoragePreset, __ΩVirtualFile, __ΩVirtualFileData, __ΩVirtualFileExtension, __ΩVirtualFileMetadata, __ΩVirtualFileSystemInterface, __ΩWriteData, __ΩWriteOptions } from "./types/fs.cjs";
|
|
2
|
+
import { CommandType, Commands, SUPPORTED_COMMANDS, __ΩCommandType, __ΩCommands } from "./types/commands.cjs";
|
|
3
|
+
import { API, __ΩAPI } from "./types/api.cjs";
|
|
4
|
+
import { BUILDER_VARIANTS, BuilderVariant, InferUnpluginOptions, InferUnpluginVariant, UNPLUGIN_BUILDER_VARIANTS, UnpluginBuilderVariant, UnpluginFactory, UnpluginOptions, UnpluginUserConfig, __ΩBuilderVariant, __ΩInferUnpluginOptions, __ΩInferUnpluginVariant, __ΩUnpluginBuilderVariant, __ΩUnpluginFactory, __ΩUnpluginOptions, __ΩUnpluginUserConfig } from "./types/unplugin.cjs";
|
|
5
|
+
import { KNOWN_PLUGIN_FIELDS, PLUGIN_HOOKS_FIELDS, PLUGIN_NON_HOOK_FIELDS, Plugin, PluginFields, PluginHook, PluginHookFields, PluginHookFunctions, PluginHookObject, PluginHooks, PluginNonHookFields, TypesResult, __ΩPlugin, __ΩPluginFields, __ΩPluginHook, __ΩPluginHookFields, __ΩPluginHookFunctions, __ΩPluginHookObject, __ΩPluginHooks, __ΩPluginNonHookFields, __ΩTypesResult } from "./types/plugin.cjs";
|
|
6
|
+
import { CallHookOptions, HOOKS_LIST_ORDERS, HookFields, HookListOrders, HooksList, InferHookFunction, InferHookParameters, InferHookReturnType, InferHookThisType, InferHooksListItem, PluginHooksList, PluginHooksListItem, UnpluginHookFunctions, UnpluginHookList, UnpluginHookVariant, UnpluginHookVariantField, UnpluginHooksListItem, __ΩCallHookOptions, __ΩHookFields, __ΩHookListOrders, __ΩHooksList, __ΩInferHookFunction, __ΩInferHookParameters, __ΩInferHookReturnType, __ΩInferHookThisType, __ΩInferHooksListItem, __ΩPluginHooksList, __ΩPluginHooksListItem, __ΩUnpluginHookFunctions, __ΩUnpluginHookList, __ΩUnpluginHookVariant, __ΩUnpluginHookVariantField, __ΩUnpluginHooksListItem } from "./types/hooks.cjs";
|
|
7
|
+
import { DeepkitOptions, ParsedTypeScriptConfig, RawReflectionMode, ReflectionLevel, ReflectionMode, TSCompilerOptions, TSConfig, __ΩDeepkitOptions, __ΩParsedTypeScriptConfig, __ΩRawReflectionMode, __ΩReflectionLevel, __ΩReflectionMode, __ΩTSCompilerOptions, __ΩTSConfig } from "./types/tsconfig.cjs";
|
|
8
|
+
import { APIContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions, EnvironmentContext, EnvironmentContextPlugin, FetchOptions, InitContextOptions, MetaInfo, ParseOptions, PluginContext, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, TransformResult, UnimportContext, UnresolvedContext, WithUnpluginBuildContext, WorkerProcess, __ΩAPIContext, __ΩBuildPluginContext, __ΩContext, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩEnvironmentContext, __ΩEnvironmentContextPlugin, __ΩFetchOptions, __ΩInitContextOptions, __ΩMetaInfo, __ΩParseOptions, __ΩPluginContext, __ΩResolver, __ΩSelectHookResult, __ΩSelectHookResultItem, __ΩSelectHooksOptions, __ΩSourceFile, __ΩTransformResult, __ΩUnimportContext, __ΩUnresolvedContext, __ΩWithUnpluginBuildContext, __ΩWorkerProcess } from "./types/context.cjs";
|
|
9
|
+
import { AnyUserConfig, BaseConfig, BuildInlineConfig, CleanInlineConfig, ConfigEnv, DeployInlineConfig, DocsInlineConfig, EnvironmentConfig, EnvironmentResolvedConfig, InitialUserConfig, InlineConfig, LintInlineConfig, LogFn, LogLevel, NewInlineConfig, OutputConfig, OutputResolvedConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PowerlinesCommand, PrepareInlineConfig, ProjectType, ResolveConfig, ResolveResolvedConfig, ResolvedAssetGlob, ResolvedConfig, ResolvedEntryTypeDefinition, UserConfig, WorkspaceConfig, __ΩAnyUserConfig, __ΩBaseConfig, __ΩBuildInlineConfig, __ΩCleanInlineConfig, __ΩConfigEnv, __ΩDeployInlineConfig, __ΩDocsInlineConfig, __ΩEnvironmentConfig, __ΩEnvironmentResolvedConfig, __ΩInitialUserConfig, __ΩInlineConfig, __ΩLintInlineConfig, __ΩLogFn, __ΩLogLevel, __ΩNewInlineConfig, __ΩOutputConfig, __ΩOutputResolvedConfig, __ΩParsedUserConfig, __ΩPartialPlugin, __ΩPartialPluginFactory, __ΩPluginConfig, __ΩPluginConfigObject, __ΩPluginConfigTuple, __ΩPluginFactory, __ΩPowerlinesCommand, __ΩPrepareInlineConfig, __ΩProjectType, __ΩResolveConfig, __ΩResolveResolvedConfig, __ΩResolvedAssetGlob, __ΩResolvedConfig, __ΩResolvedEntryTypeDefinition, __ΩUserConfig, __ΩWorkspaceConfig } from "./types/config.cjs";
|
|
10
|
+
import { PartiallyResolvedContext, __ΩPartiallyResolvedContext, defineConfig, loadUserConfigFile, loadWorkspaceConfig } from "./lib/config.cjs";
|
|
11
|
+
import { CLIENT_ENVIRONMENT, DEFAULT_ENVIRONMENT, GLOBAL_ENVIRONMENT, RSC_ENVIRONMENT, SERVER_ENVIRONMENT, SSR_ENVIRONMENT } from "./lib/constants/environments.cjs";
|
|
12
|
+
import { CACHE_HASH_LENGTH, ROOT_HASH_LENGTH } from "./lib/constants/meta.cjs";
|
|
13
|
+
import { getUniqueInputs, isResolvedEntryTypeDefinition, isTypeDefinition, resolveEntryOutput, resolveInput, resolveInputs, resolveInputsSync } from "./lib/entry.cjs";
|
|
14
|
+
import { CreateLogOptions, __ΩCreateLogOptions, createLog, extendLog } from "./lib/logger.cjs";
|
|
15
|
+
import { combineContexts, isUnpluginBuilderVariant } from "./lib/unplugin/helpers.cjs";
|
|
16
|
+
import { createUnpluginModuleResolutionFunctions } from "./lib/unplugin/module-resolution.cjs";
|
|
17
|
+
import { createUnplugin, createUnpluginResolver } from "./lib/unplugin/plugin.cjs";
|
|
18
|
+
import { FileHeaderOptions, __ΩFileHeaderOptions, getBaseFileHeader, getFileHeader } from "./lib/utilities/file-header.cjs";
|
|
19
|
+
import { format, formatFolder } from "./lib/utilities/format.cjs";
|
|
20
|
+
import { getMagicString, getSourceFile, getString } from "./lib/utilities/source-file.cjs";
|
|
21
|
+
import { generateSourceMap } from "./lib/utilities/source-map.cjs";
|
|
22
|
+
import { writeFile } from "./lib/utilities/write-file.cjs";
|
|
23
|
+
export { API, APIContext, AnyUserConfig, BUILDER_VARIANTS, BaseConfig, BuildInlineConfig, BuildPluginContext, BuilderVariant, CACHE_HASH_LENGTH, CLIENT_ENVIRONMENT, CallHookOptions, CleanInlineConfig, CommandType, Commands, ConfigEnv, Context, CreateLogOptions, DEFAULT_ENVIRONMENT, DeepkitOptions, DeployInlineConfig, DocsInlineConfig, EmitEntryOptions, EmitOptions, EnvironmentConfig, EnvironmentContext, EnvironmentContextPlugin, EnvironmentResolvedConfig, FetchOptions, FileHeaderOptions, GLOBAL_ENVIRONMENT, HOOKS_LIST_ORDERS, HookFields, HookListOrders, HooksList, InferHookFunction, InferHookParameters, InferHookReturnType, InferHookThisType, InferHooksListItem, InferUnpluginOptions, InferUnpluginVariant, InitContextOptions, InitialUserConfig, InlineConfig, KNOWN_PLUGIN_FIELDS, LintInlineConfig, LogFn, LogLevel, MetaInfo, NewInlineConfig, OutputConfig, OutputResolvedConfig, PLUGIN_HOOKS_FIELDS, PLUGIN_NON_HOOK_FIELDS, ParseOptions, ParsedTypeScriptConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PartiallyResolvedContext, Plugin, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginContext, PluginFactory, PluginFields, PluginHook, PluginHookFields, PluginHookFunctions, PluginHookObject, PluginHooks, PluginHooksList, PluginHooksListItem, PluginNonHookFields, PowerlinesCommand, PrepareInlineConfig, ProjectType, ROOT_HASH_LENGTH, RSC_ENVIRONMENT, RawReflectionMode, ReflectionLevel, ReflectionMode, ResolveConfig, ResolveOptions, ResolveResolvedConfig, ResolvedAssetGlob, ResolvedConfig, ResolvedEntryTypeDefinition, Resolver, SERVER_ENVIRONMENT, SSR_ENVIRONMENT, STORAGE_PRESETS, SUPPORTED_COMMANDS, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, StorageAdapter, StoragePort, StoragePreset, TSCompilerOptions, TSConfig, TransformResult, TypesResult, UNPLUGIN_BUILDER_VARIANTS, UnimportContext, UnpluginBuilderVariant, UnpluginFactory, UnpluginHookFunctions, UnpluginHookList, UnpluginHookVariant, UnpluginHookVariantField, UnpluginHooksListItem, UnpluginOptions, UnpluginUserConfig, UnresolvedContext, UserConfig, VirtualFile, VirtualFileData, VirtualFileExtension, VirtualFileMetadata, VirtualFileSystemInterface, WithUnpluginBuildContext, WorkerProcess, WorkspaceConfig, WriteData, WriteOptions, __VFS_PATCH__, __VFS_REVERT__, __ΩAPI, __ΩAPIContext, __ΩAnyUserConfig, __ΩBaseConfig, __ΩBuildInlineConfig, __ΩBuildPluginContext, __ΩBuilderVariant, __ΩCallHookOptions, __ΩCleanInlineConfig, __ΩCommandType, __ΩCommands, __ΩConfigEnv, __ΩContext, __ΩCreateLogOptions, __ΩDeepkitOptions, __ΩDeployInlineConfig, __ΩDocsInlineConfig, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩEnvironmentConfig, __ΩEnvironmentContext, __ΩEnvironmentContextPlugin, __ΩEnvironmentResolvedConfig, __ΩFetchOptions, __ΩFileHeaderOptions, __ΩHookFields, __ΩHookListOrders, __ΩHooksList, __ΩInferHookFunction, __ΩInferHookParameters, __ΩInferHookReturnType, __ΩInferHookThisType, __ΩInferHooksListItem, __ΩInferUnpluginOptions, __ΩInferUnpluginVariant, __ΩInitContextOptions, __ΩInitialUserConfig, __ΩInlineConfig, __ΩLintInlineConfig, __ΩLogFn, __ΩLogLevel, __ΩMetaInfo, __ΩNewInlineConfig, __ΩOutputConfig, __ΩOutputResolvedConfig, __ΩParseOptions, __ΩParsedTypeScriptConfig, __ΩParsedUserConfig, __ΩPartialPlugin, __ΩPartialPluginFactory, __ΩPartiallyResolvedContext, __ΩPlugin, __ΩPluginConfig, __ΩPluginConfigObject, __ΩPluginConfigTuple, __ΩPluginContext, __ΩPluginFactory, __ΩPluginFields, __ΩPluginHook, __ΩPluginHookFields, __ΩPluginHookFunctions, __ΩPluginHookObject, __ΩPluginHooks, __ΩPluginHooksList, __ΩPluginHooksListItem, __ΩPluginNonHookFields, __ΩPowerlinesCommand, __ΩPrepareInlineConfig, __ΩProjectType, __ΩRawReflectionMode, __ΩReflectionLevel, __ΩReflectionMode, __ΩResolveConfig, __ΩResolveOptions, __ΩResolveResolvedConfig, __ΩResolvedAssetGlob, __ΩResolvedConfig, __ΩResolvedEntryTypeDefinition, __ΩResolver, __ΩSelectHookResult, __ΩSelectHookResultItem, __ΩSelectHooksOptions, __ΩSourceFile, __ΩStorageAdapter, __ΩStoragePort, __ΩStoragePreset, __ΩTSCompilerOptions, __ΩTSConfig, __ΩTransformResult, __ΩTypesResult, __ΩUnimportContext, __ΩUnpluginBuilderVariant, __ΩUnpluginFactory, __ΩUnpluginHookFunctions, __ΩUnpluginHookList, __ΩUnpluginHookVariant, __ΩUnpluginHookVariantField, __ΩUnpluginHooksListItem, __ΩUnpluginOptions, __ΩUnpluginUserConfig, __ΩUnresolvedContext, __ΩUserConfig, __ΩVirtualFile, __ΩVirtualFileData, __ΩVirtualFileExtension, __ΩVirtualFileMetadata, __ΩVirtualFileSystemInterface, __ΩWithUnpluginBuildContext, __ΩWorkerProcess, __ΩWorkspaceConfig, __ΩWriteData, __ΩWriteOptions, combineContexts, createLog, createUnplugin, createUnpluginModuleResolutionFunctions, createUnpluginResolver, defineConfig, extendLog, format, formatFolder, generateSourceMap, getBaseFileHeader, getFileHeader, getMagicString, getSourceFile, getString, getUniqueInputs, isResolvedEntryTypeDefinition, isTypeDefinition, isUnpluginBuilderVariant, loadUserConfigFile, loadWorkspaceConfig, resolveEntryOutput, resolveInput, resolveInputs, resolveInputsSync, writeFile };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ResolveOptions, STORAGE_PRESETS, StorageAdapter, StoragePort, StoragePreset, VirtualFile, VirtualFileData, VirtualFileExtension, VirtualFileMetadata, VirtualFileSystemInterface, WriteData, WriteOptions, __VFS_PATCH__, __VFS_REVERT__, __ΩResolveOptions, __ΩStorageAdapter, __ΩStoragePort, __ΩStoragePreset, __ΩVirtualFile, __ΩVirtualFileData, __ΩVirtualFileExtension, __ΩVirtualFileMetadata, __ΩVirtualFileSystemInterface, __ΩWriteData, __ΩWriteOptions } from "./types/fs.mjs";
|
|
2
|
+
import { CommandType, Commands, SUPPORTED_COMMANDS, __ΩCommandType, __ΩCommands } from "./types/commands.mjs";
|
|
3
|
+
import { API, __ΩAPI } from "./types/api.mjs";
|
|
4
|
+
import { BUILDER_VARIANTS, BuilderVariant, InferUnpluginOptions, InferUnpluginVariant, UNPLUGIN_BUILDER_VARIANTS, UnpluginBuilderVariant, UnpluginFactory, UnpluginOptions, UnpluginUserConfig, __ΩBuilderVariant, __ΩInferUnpluginOptions, __ΩInferUnpluginVariant, __ΩUnpluginBuilderVariant, __ΩUnpluginFactory, __ΩUnpluginOptions, __ΩUnpluginUserConfig } from "./types/unplugin.mjs";
|
|
5
|
+
import { KNOWN_PLUGIN_FIELDS, PLUGIN_HOOKS_FIELDS, PLUGIN_NON_HOOK_FIELDS, Plugin, PluginFields, PluginHook, PluginHookFields, PluginHookFunctions, PluginHookObject, PluginHooks, PluginNonHookFields, TypesResult, __ΩPlugin, __ΩPluginFields, __ΩPluginHook, __ΩPluginHookFields, __ΩPluginHookFunctions, __ΩPluginHookObject, __ΩPluginHooks, __ΩPluginNonHookFields, __ΩTypesResult } from "./types/plugin.mjs";
|
|
6
|
+
import { CallHookOptions, HOOKS_LIST_ORDERS, HookFields, HookListOrders, HooksList, InferHookFunction, InferHookParameters, InferHookReturnType, InferHookThisType, InferHooksListItem, PluginHooksList, PluginHooksListItem, UnpluginHookFunctions, UnpluginHookList, UnpluginHookVariant, UnpluginHookVariantField, UnpluginHooksListItem, __ΩCallHookOptions, __ΩHookFields, __ΩHookListOrders, __ΩHooksList, __ΩInferHookFunction, __ΩInferHookParameters, __ΩInferHookReturnType, __ΩInferHookThisType, __ΩInferHooksListItem, __ΩPluginHooksList, __ΩPluginHooksListItem, __ΩUnpluginHookFunctions, __ΩUnpluginHookList, __ΩUnpluginHookVariant, __ΩUnpluginHookVariantField, __ΩUnpluginHooksListItem } from "./types/hooks.mjs";
|
|
7
|
+
import { DeepkitOptions, ParsedTypeScriptConfig, RawReflectionMode, ReflectionLevel, ReflectionMode, TSCompilerOptions, TSConfig, __ΩDeepkitOptions, __ΩParsedTypeScriptConfig, __ΩRawReflectionMode, __ΩReflectionLevel, __ΩReflectionMode, __ΩTSCompilerOptions, __ΩTSConfig } from "./types/tsconfig.mjs";
|
|
8
|
+
import { APIContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions, EnvironmentContext, EnvironmentContextPlugin, FetchOptions, InitContextOptions, MetaInfo, ParseOptions, PluginContext, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, TransformResult, UnimportContext, UnresolvedContext, WithUnpluginBuildContext, WorkerProcess, __ΩAPIContext, __ΩBuildPluginContext, __ΩContext, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩEnvironmentContext, __ΩEnvironmentContextPlugin, __ΩFetchOptions, __ΩInitContextOptions, __ΩMetaInfo, __ΩParseOptions, __ΩPluginContext, __ΩResolver, __ΩSelectHookResult, __ΩSelectHookResultItem, __ΩSelectHooksOptions, __ΩSourceFile, __ΩTransformResult, __ΩUnimportContext, __ΩUnresolvedContext, __ΩWithUnpluginBuildContext, __ΩWorkerProcess } from "./types/context.mjs";
|
|
9
|
+
import { AnyUserConfig, BaseConfig, BuildInlineConfig, CleanInlineConfig, ConfigEnv, DeployInlineConfig, DocsInlineConfig, EnvironmentConfig, EnvironmentResolvedConfig, InitialUserConfig, InlineConfig, LintInlineConfig, LogFn, LogLevel, NewInlineConfig, OutputConfig, OutputResolvedConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PowerlinesCommand, PrepareInlineConfig, ProjectType, ResolveConfig, ResolveResolvedConfig, ResolvedAssetGlob, ResolvedConfig, ResolvedEntryTypeDefinition, UserConfig, WorkspaceConfig, __ΩAnyUserConfig, __ΩBaseConfig, __ΩBuildInlineConfig, __ΩCleanInlineConfig, __ΩConfigEnv, __ΩDeployInlineConfig, __ΩDocsInlineConfig, __ΩEnvironmentConfig, __ΩEnvironmentResolvedConfig, __ΩInitialUserConfig, __ΩInlineConfig, __ΩLintInlineConfig, __ΩLogFn, __ΩLogLevel, __ΩNewInlineConfig, __ΩOutputConfig, __ΩOutputResolvedConfig, __ΩParsedUserConfig, __ΩPartialPlugin, __ΩPartialPluginFactory, __ΩPluginConfig, __ΩPluginConfigObject, __ΩPluginConfigTuple, __ΩPluginFactory, __ΩPowerlinesCommand, __ΩPrepareInlineConfig, __ΩProjectType, __ΩResolveConfig, __ΩResolveResolvedConfig, __ΩResolvedAssetGlob, __ΩResolvedConfig, __ΩResolvedEntryTypeDefinition, __ΩUserConfig, __ΩWorkspaceConfig } from "./types/config.mjs";
|
|
10
|
+
import { PartiallyResolvedContext, __ΩPartiallyResolvedContext, defineConfig, loadUserConfigFile, loadWorkspaceConfig } from "./lib/config.mjs";
|
|
11
|
+
import { CLIENT_ENVIRONMENT, DEFAULT_ENVIRONMENT, GLOBAL_ENVIRONMENT, RSC_ENVIRONMENT, SERVER_ENVIRONMENT, SSR_ENVIRONMENT } from "./lib/constants/environments.mjs";
|
|
12
|
+
import { CACHE_HASH_LENGTH, ROOT_HASH_LENGTH } from "./lib/constants/meta.mjs";
|
|
13
|
+
import "./types/index.mjs";
|
|
14
|
+
import { getUniqueInputs, isResolvedEntryTypeDefinition, isTypeDefinition, resolveEntryOutput, resolveInput, resolveInputs, resolveInputsSync } from "./lib/entry.mjs";
|
|
15
|
+
import { CreateLogOptions, __ΩCreateLogOptions, createLog, extendLog } from "./lib/logger.mjs";
|
|
16
|
+
import { combineContexts, isUnpluginBuilderVariant } from "./lib/unplugin/helpers.mjs";
|
|
17
|
+
import { createUnpluginModuleResolutionFunctions } from "./lib/unplugin/module-resolution.mjs";
|
|
18
|
+
import { createUnplugin, createUnpluginResolver } from "./lib/unplugin/plugin.mjs";
|
|
19
|
+
import { FileHeaderOptions, __ΩFileHeaderOptions, getBaseFileHeader, getFileHeader } from "./lib/utilities/file-header.mjs";
|
|
20
|
+
import { format, formatFolder } from "./lib/utilities/format.mjs";
|
|
21
|
+
import { getMagicString, getSourceFile, getString } from "./lib/utilities/source-file.mjs";
|
|
22
|
+
import { generateSourceMap } from "./lib/utilities/source-map.mjs";
|
|
23
|
+
import { writeFile } from "./lib/utilities/write-file.mjs";
|
|
24
|
+
import "./lib/index.mjs";
|
|
25
|
+
export { API, APIContext, AnyUserConfig, BUILDER_VARIANTS, BaseConfig, BuildInlineConfig, BuildPluginContext, BuilderVariant, CACHE_HASH_LENGTH, CLIENT_ENVIRONMENT, CallHookOptions, CleanInlineConfig, CommandType, Commands, ConfigEnv, Context, CreateLogOptions, DEFAULT_ENVIRONMENT, DeepkitOptions, DeployInlineConfig, DocsInlineConfig, EmitEntryOptions, EmitOptions, EnvironmentConfig, EnvironmentContext, EnvironmentContextPlugin, EnvironmentResolvedConfig, FetchOptions, FileHeaderOptions, GLOBAL_ENVIRONMENT, HOOKS_LIST_ORDERS, HookFields, HookListOrders, HooksList, InferHookFunction, InferHookParameters, InferHookReturnType, InferHookThisType, InferHooksListItem, InferUnpluginOptions, InferUnpluginVariant, InitContextOptions, InitialUserConfig, InlineConfig, KNOWN_PLUGIN_FIELDS, LintInlineConfig, LogFn, LogLevel, MetaInfo, NewInlineConfig, OutputConfig, OutputResolvedConfig, PLUGIN_HOOKS_FIELDS, PLUGIN_NON_HOOK_FIELDS, ParseOptions, ParsedTypeScriptConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PartiallyResolvedContext, Plugin, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginContext, PluginFactory, PluginFields, PluginHook, PluginHookFields, PluginHookFunctions, PluginHookObject, PluginHooks, PluginHooksList, PluginHooksListItem, PluginNonHookFields, PowerlinesCommand, PrepareInlineConfig, ProjectType, ROOT_HASH_LENGTH, RSC_ENVIRONMENT, RawReflectionMode, ReflectionLevel, ReflectionMode, ResolveConfig, ResolveOptions, ResolveResolvedConfig, ResolvedAssetGlob, ResolvedConfig, ResolvedEntryTypeDefinition, Resolver, SERVER_ENVIRONMENT, SSR_ENVIRONMENT, STORAGE_PRESETS, SUPPORTED_COMMANDS, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, StorageAdapter, StoragePort, StoragePreset, TSCompilerOptions, TSConfig, TransformResult, TypesResult, UNPLUGIN_BUILDER_VARIANTS, UnimportContext, UnpluginBuilderVariant, UnpluginFactory, UnpluginHookFunctions, UnpluginHookList, UnpluginHookVariant, UnpluginHookVariantField, UnpluginHooksListItem, UnpluginOptions, UnpluginUserConfig, UnresolvedContext, UserConfig, VirtualFile, VirtualFileData, VirtualFileExtension, VirtualFileMetadata, VirtualFileSystemInterface, WithUnpluginBuildContext, WorkerProcess, WorkspaceConfig, WriteData, WriteOptions, __VFS_PATCH__, __VFS_REVERT__, __ΩAPI, __ΩAPIContext, __ΩAnyUserConfig, __ΩBaseConfig, __ΩBuildInlineConfig, __ΩBuildPluginContext, __ΩBuilderVariant, __ΩCallHookOptions, __ΩCleanInlineConfig, __ΩCommandType, __ΩCommands, __ΩConfigEnv, __ΩContext, __ΩCreateLogOptions, __ΩDeepkitOptions, __ΩDeployInlineConfig, __ΩDocsInlineConfig, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩEnvironmentConfig, __ΩEnvironmentContext, __ΩEnvironmentContextPlugin, __ΩEnvironmentResolvedConfig, __ΩFetchOptions, __ΩFileHeaderOptions, __ΩHookFields, __ΩHookListOrders, __ΩHooksList, __ΩInferHookFunction, __ΩInferHookParameters, __ΩInferHookReturnType, __ΩInferHookThisType, __ΩInferHooksListItem, __ΩInferUnpluginOptions, __ΩInferUnpluginVariant, __ΩInitContextOptions, __ΩInitialUserConfig, __ΩInlineConfig, __ΩLintInlineConfig, __ΩLogFn, __ΩLogLevel, __ΩMetaInfo, __ΩNewInlineConfig, __ΩOutputConfig, __ΩOutputResolvedConfig, __ΩParseOptions, __ΩParsedTypeScriptConfig, __ΩParsedUserConfig, __ΩPartialPlugin, __ΩPartialPluginFactory, __ΩPartiallyResolvedContext, __ΩPlugin, __ΩPluginConfig, __ΩPluginConfigObject, __ΩPluginConfigTuple, __ΩPluginContext, __ΩPluginFactory, __ΩPluginFields, __ΩPluginHook, __ΩPluginHookFields, __ΩPluginHookFunctions, __ΩPluginHookObject, __ΩPluginHooks, __ΩPluginHooksList, __ΩPluginHooksListItem, __ΩPluginNonHookFields, __ΩPowerlinesCommand, __ΩPrepareInlineConfig, __ΩProjectType, __ΩRawReflectionMode, __ΩReflectionLevel, __ΩReflectionMode, __ΩResolveConfig, __ΩResolveOptions, __ΩResolveResolvedConfig, __ΩResolvedAssetGlob, __ΩResolvedConfig, __ΩResolvedEntryTypeDefinition, __ΩResolver, __ΩSelectHookResult, __ΩSelectHookResultItem, __ΩSelectHooksOptions, __ΩSourceFile, __ΩStorageAdapter, __ΩStoragePort, __ΩStoragePreset, __ΩTSCompilerOptions, __ΩTSConfig, __ΩTransformResult, __ΩTypesResult, __ΩUnimportContext, __ΩUnpluginBuilderVariant, __ΩUnpluginFactory, __ΩUnpluginHookFunctions, __ΩUnpluginHookList, __ΩUnpluginHookVariant, __ΩUnpluginHookVariantField, __ΩUnpluginHooksListItem, __ΩUnpluginOptions, __ΩUnpluginUserConfig, __ΩUnresolvedContext, __ΩUserConfig, __ΩVirtualFile, __ΩVirtualFileData, __ΩVirtualFileExtension, __ΩVirtualFileMetadata, __ΩVirtualFileSystemInterface, __ΩWithUnpluginBuildContext, __ΩWorkerProcess, __ΩWorkspaceConfig, __ΩWriteData, __ΩWriteOptions, combineContexts, createLog, createUnplugin, createUnpluginModuleResolutionFunctions, createUnpluginResolver, defineConfig, extendLog, format, formatFolder, generateSourceMap, getBaseFileHeader, getFileHeader, getMagicString, getSourceFile, getString, getUniqueInputs, isResolvedEntryTypeDefinition, isTypeDefinition, isUnpluginBuilderVariant, loadUserConfigFile, loadWorkspaceConfig, resolveEntryOutput, resolveInput, resolveInputs, resolveInputsSync, writeFile };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { defineConfig, loadUserConfigFile, loadWorkspaceConfig } from "./lib/config.mjs";
|
|
2
|
+
import { CLIENT_ENVIRONMENT, DEFAULT_ENVIRONMENT, GLOBAL_ENVIRONMENT, RSC_ENVIRONMENT, SERVER_ENVIRONMENT, SSR_ENVIRONMENT } from "./lib/constants/environments.mjs";
|
|
3
|
+
import { CACHE_HASH_LENGTH, ROOT_HASH_LENGTH } from "./lib/constants/meta.mjs";
|
|
4
|
+
import { getUniqueInputs, isResolvedEntryTypeDefinition, isTypeDefinition, resolveEntryOutput, resolveInput, resolveInputs, resolveInputsSync } from "./lib/entry.mjs";
|
|
5
|
+
import { createLog, extendLog } from "./lib/logger.mjs";
|
|
6
|
+
import { BUILDER_VARIANTS, UNPLUGIN_BUILDER_VARIANTS } from "./types/unplugin.mjs";
|
|
7
|
+
import { combineContexts, isUnpluginBuilderVariant } from "./lib/unplugin/helpers.mjs";
|
|
8
|
+
import { createUnpluginModuleResolutionFunctions } from "./lib/unplugin/module-resolution.mjs";
|
|
9
|
+
import { getMagicString, getSourceFile, getString } from "./lib/utilities/source-file.mjs";
|
|
10
|
+
import { createUnplugin, createUnpluginResolver } from "./lib/unplugin/plugin.mjs";
|
|
11
|
+
import { getBaseFileHeader, getFileHeader } from "./lib/utilities/file-header.mjs";
|
|
12
|
+
import { format, formatFolder } from "./lib/utilities/format.mjs";
|
|
13
|
+
import { generateSourceMap } from "./lib/utilities/source-map.mjs";
|
|
14
|
+
import { writeFile } from "./lib/utilities/write-file.mjs";
|
|
15
|
+
import "./lib/index.mjs";
|
|
16
|
+
import { SUPPORTED_COMMANDS } from "./types/commands.mjs";
|
|
17
|
+
import { STORAGE_PRESETS, __VFS_PATCH__, __VFS_REVERT__ } from "./types/fs.mjs";
|
|
18
|
+
import { HOOKS_LIST_ORDERS } from "./types/hooks.mjs";
|
|
19
|
+
import { KNOWN_PLUGIN_FIELDS, PLUGIN_HOOKS_FIELDS, PLUGIN_NON_HOOK_FIELDS } from "./types/plugin.mjs";
|
|
20
|
+
import "./types/index.mjs";
|
|
21
|
+
|
|
22
|
+
export { BUILDER_VARIANTS, CACHE_HASH_LENGTH, CLIENT_ENVIRONMENT, DEFAULT_ENVIRONMENT, GLOBAL_ENVIRONMENT, HOOKS_LIST_ORDERS, KNOWN_PLUGIN_FIELDS, PLUGIN_HOOKS_FIELDS, PLUGIN_NON_HOOK_FIELDS, ROOT_HASH_LENGTH, RSC_ENVIRONMENT, SERVER_ENVIRONMENT, SSR_ENVIRONMENT, STORAGE_PRESETS, SUPPORTED_COMMANDS, UNPLUGIN_BUILDER_VARIANTS, __VFS_PATCH__, __VFS_REVERT__, combineContexts, createLog, createUnplugin, createUnpluginModuleResolutionFunctions, createUnpluginResolver, defineConfig, extendLog, format, formatFolder, generateSourceMap, getBaseFileHeader, getFileHeader, getMagicString, getSourceFile, getString, getUniqueInputs, isResolvedEntryTypeDefinition, isTypeDefinition, isUnpluginBuilderVariant, loadUserConfigFile, loadWorkspaceConfig, resolveEntryOutput, resolveInput, resolveInputs, resolveInputsSync, writeFile };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
let __storm_software_config_tools_get_config = require("@storm-software/config-tools/get-config");
|
|
3
|
+
let __stryke_fs_exists = require("@stryke/fs/exists");
|
|
4
|
+
let __stryke_path_append = require("@stryke/path/append");
|
|
5
|
+
let __stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
6
|
+
let __stryke_path_replace = require("@stryke/path/replace");
|
|
7
|
+
let __stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
|
|
8
|
+
let __stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
9
|
+
let c12 = require("c12");
|
|
10
|
+
let defu = require("defu");
|
|
11
|
+
defu = require_rolldown_runtime.__toESM(defu);
|
|
12
|
+
|
|
13
|
+
//#region src/lib/config.ts
|
|
14
|
+
/**
|
|
15
|
+
* Loads the workspace configuration.
|
|
16
|
+
*
|
|
17
|
+
* @param workspaceRoot - The root directory of the workspace.
|
|
18
|
+
* @param cwd - The current working directory to start searching from.
|
|
19
|
+
* @returns A promise that resolves to the loaded workspace configuration.
|
|
20
|
+
*/
|
|
21
|
+
async function loadWorkspaceConfig(workspaceRoot, cwd) {
|
|
22
|
+
return (0, defu.default)({ workspaceRoot }, await (0, __storm_software_config_tools_get_config.getWorkspaceConfig)(true, {
|
|
23
|
+
cwd,
|
|
24
|
+
workspaceRoot,
|
|
25
|
+
useDefault: true
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Loads the user configuration file for the project.
|
|
30
|
+
*
|
|
31
|
+
* @param projectRoot - The root directory of the project.
|
|
32
|
+
* @param workspaceRoot - The root directory of the workspace.
|
|
33
|
+
* @param jiti - An instance of Jiti to resolve modules from
|
|
34
|
+
* @param command - The {@link PowerlinesCommand} string associated with the current running process
|
|
35
|
+
* @param mode - The mode in which the project is running (default is "production").
|
|
36
|
+
* @param configFile - An optional path to a specific configuration file.
|
|
37
|
+
* @param framework - The framework name to use for default configuration file names.
|
|
38
|
+
* @returns A promise that resolves to the resolved user configuration.
|
|
39
|
+
*/
|
|
40
|
+
async function loadUserConfigFile(projectRoot, workspaceRoot, jiti, command, mode = "production", configFile, framework = "powerlines") {
|
|
41
|
+
let resolvedUserConfig = {};
|
|
42
|
+
let resolvedUserConfigFile;
|
|
43
|
+
if (configFile) resolvedUserConfigFile = (0, __stryke_fs_exists.existsSync)((0, __stryke_path_replace.replacePath)(configFile, projectRoot)) ? (0, __stryke_path_replace.replacePath)(configFile, projectRoot) : (0, __stryke_fs_exists.existsSync)((0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), (0, __stryke_path_replace.replacePath)(configFile, projectRoot))) ? (0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), (0, __stryke_path_replace.replacePath)(configFile, projectRoot)) : (0, __stryke_fs_exists.existsSync)((0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), configFile)) ? (0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), configFile) : void 0;
|
|
44
|
+
if (!resolvedUserConfigFile) resolvedUserConfigFile = (0, __stryke_fs_exists.existsSync)((0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.${mode}.config.ts`)) ? (0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.${mode}.config.ts`) : (0, __stryke_fs_exists.existsSync)((0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.${mode}.config.js`)) ? (0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.${mode}.config.js`) : (0, __stryke_fs_exists.existsSync)((0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.${mode}.config.mts`)) ? (0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.${mode}.config.mts`) : (0, __stryke_fs_exists.existsSync)((0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.${mode}.config.mjs`)) ? (0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.${mode}.config.mjs`) : (0, __stryke_fs_exists.existsSync)((0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.config.ts`)) ? (0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.config.ts`) : (0, __stryke_fs_exists.existsSync)((0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.config.js`)) ? (0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.config.js`) : (0, __stryke_fs_exists.existsSync)((0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.config.mts`)) ? (0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.config.mts`) : (0, __stryke_fs_exists.existsSync)((0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.config.mjs`)) ? (0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.config.mjs`) : void 0;
|
|
45
|
+
if (resolvedUserConfigFile) {
|
|
46
|
+
const resolved = await jiti.import(jiti.esmResolve(resolvedUserConfigFile));
|
|
47
|
+
if (resolved) {
|
|
48
|
+
let config = {};
|
|
49
|
+
if ((0, __stryke_type_checks_is_function.isFunction)(resolved)) config = await Promise.resolve(resolved({
|
|
50
|
+
command,
|
|
51
|
+
mode,
|
|
52
|
+
isSsrBuild: false,
|
|
53
|
+
isPreview: false
|
|
54
|
+
}));
|
|
55
|
+
if ((0, __stryke_type_checks_is_set_object.isSetObject)(config)) resolvedUserConfig = {
|
|
56
|
+
...config,
|
|
57
|
+
config,
|
|
58
|
+
configFile: resolvedUserConfigFile
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
const result = await (0, c12.loadConfig)({
|
|
63
|
+
cwd: projectRoot,
|
|
64
|
+
name: framework,
|
|
65
|
+
envName: mode,
|
|
66
|
+
globalRc: true,
|
|
67
|
+
packageJson: true,
|
|
68
|
+
dotenv: true,
|
|
69
|
+
jiti
|
|
70
|
+
});
|
|
71
|
+
return (0, defu.default)(resolvedUserConfig, (0, __stryke_type_checks_is_set_object.isSetObject)(result?.config) ? {
|
|
72
|
+
...result.config,
|
|
73
|
+
...result
|
|
74
|
+
} : {});
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* A type helper to make it easier to use `powerlines.config.ts` files.
|
|
78
|
+
*
|
|
79
|
+
* @remarks
|
|
80
|
+
* The function accepts a direct {@link AnyUserConfig} object and returns it typed as a {@link UserConfig} object.
|
|
81
|
+
*/
|
|
82
|
+
function defineConfig(config) {
|
|
83
|
+
return config;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
//#endregion
|
|
87
|
+
exports.defineConfig = defineConfig;
|
|
88
|
+
exports.loadUserConfigFile = loadUserConfigFile;
|
|
89
|
+
exports.loadWorkspaceConfig = loadWorkspaceConfig;
|
|
90
|
+
//# sourceMappingURL=config.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.cjs","names":["resolvedUserConfig: Partial<ParsedUserConfig>","resolvedUserConfigFile: string | undefined"],"sources":["../../src/lib/config.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 { getWorkspaceConfig } from \"@storm-software/config-tools/get-config\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { loadConfig as loadConfigC12 } from \"c12\";\nimport defu from \"defu\";\nimport type { Jiti } from \"jiti\";\nimport type {\n ParsedUserConfig,\n PowerlinesCommand,\n UserConfig,\n WorkspaceConfig\n} from \"../types/config\";\nimport { AnyUserConfig } from \"../types/config\";\nimport { Context } from \"../types/context\";\n\nexport type PartiallyResolvedContext<TContext extends Context = Context> = Omit<\n TContext,\n \"config\" | \"tsconfig\" | \"entry\" | \"fs\" | \"compiler\" | \"unimport\"\n> &\n Partial<TContext> & {\n config: TContext[\"config\"];\n };\n\n/**\n * Loads the workspace configuration.\n *\n * @param workspaceRoot - The root directory of the workspace.\n * @param cwd - The current working directory to start searching from.\n * @returns A promise that resolves to the loaded workspace configuration.\n */\nexport async function loadWorkspaceConfig(\n workspaceRoot: string,\n cwd: string\n): Promise<WorkspaceConfig> {\n return defu(\n {\n workspaceRoot\n },\n await getWorkspaceConfig(true, {\n cwd,\n workspaceRoot,\n useDefault: true\n })\n );\n}\n\n/**\n * Loads the user configuration file for the project.\n *\n * @param projectRoot - The root directory of the project.\n * @param workspaceRoot - The root directory of the workspace.\n * @param jiti - An instance of Jiti to resolve modules from\n * @param command - The {@link PowerlinesCommand} string associated with the current running process\n * @param mode - The mode in which the project is running (default is \"production\").\n * @param configFile - An optional path to a specific configuration file.\n * @param framework - The framework name to use for default configuration file names.\n * @returns A promise that resolves to the resolved user configuration.\n */\nexport async function loadUserConfigFile(\n projectRoot: string,\n workspaceRoot: string,\n jiti: Jiti,\n command?: PowerlinesCommand,\n mode = \"production\",\n configFile?: string,\n framework = \"powerlines\"\n): Promise<ParsedUserConfig> {\n let resolvedUserConfig: Partial<ParsedUserConfig> = {};\n\n let resolvedUserConfigFile: string | undefined;\n if (configFile) {\n resolvedUserConfigFile = existsSync(replacePath(configFile, projectRoot))\n ? replacePath(configFile, projectRoot)\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n replacePath(configFile, projectRoot)\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n replacePath(configFile, projectRoot)\n )\n : existsSync(\n joinPaths(appendPath(projectRoot, workspaceRoot), configFile)\n )\n ? joinPaths(appendPath(projectRoot, workspaceRoot), configFile)\n : undefined;\n }\n\n if (!resolvedUserConfigFile) {\n resolvedUserConfigFile = existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.ts`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.ts`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.js`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.js`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.mts`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.mts`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.mjs`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.mjs`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.ts`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.ts`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.js`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.js`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.mts`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.mts`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.mjs`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.mjs`\n )\n : undefined;\n }\n\n if (resolvedUserConfigFile) {\n const resolved = await jiti.import(jiti.esmResolve(resolvedUserConfigFile));\n if (resolved) {\n let config = {};\n if (isFunction(resolved)) {\n config = await Promise.resolve(\n resolved({\n command,\n mode,\n isSsrBuild: false,\n isPreview: false\n })\n );\n }\n\n if (isSetObject(config)) {\n resolvedUserConfig = {\n ...config,\n config: config as UserConfig,\n configFile: resolvedUserConfigFile\n };\n }\n }\n }\n\n const result = await loadConfigC12({\n cwd: projectRoot,\n name: framework,\n envName: mode,\n globalRc: true,\n packageJson: true,\n dotenv: true,\n jiti\n });\n\n return defu(\n resolvedUserConfig,\n isSetObject(result?.config) ? { ...result.config, ...result } : {}\n ) as ParsedUserConfig;\n}\n\n/**\n * A type helper to make it easier to use `powerlines.config.ts` files.\n *\n * @remarks\n * The function accepts a direct {@link AnyUserConfig} object and returns it typed as a {@link UserConfig} object.\n */\nexport function defineConfig(config: AnyUserConfig): UserConfig {\n return config as any;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoDA,eAAsB,oBACpB,eACA,KAC0B;AAC1B,0BACE,EACE,eACD,EACD,uEAAyB,MAAM;EAC7B;EACA;EACA,YAAY;EACb,CAAC,CACH;;;;;;;;;;;;;;AAeH,eAAsB,mBACpB,aACA,eACA,MACA,SACA,OAAO,cACP,YACA,YAAY,cACe;CAC3B,IAAIA,qBAAgD,EAAE;CAEtD,IAAIC;AACJ,KAAI,WACF,oGAAgD,YAAY,YAAY,CAAC,0CACzD,YAAY,YAAY,mHAGnB,aAAa,cAAc,yCAC1B,YAAY,YAAY,CACrC,CACF,gFAEY,aAAa,cAAc,yCAC1B,YAAY,YAAY,CACrC,mHAEwB,aAAa,cAAc,EAAE,WAAW,CAC9D,gFACoB,aAAa,cAAc,EAAE,WAAW,GAC7D;AAGV,KAAI,CAAC,uBACH,0IAEe,aAAa,cAAc,EACtC,GAAG,UAAU,GAAG,KAAK,YACtB,CACF,gFAEgB,aAAa,cAAc,EACtC,GAAG,UAAU,GAAG,KAAK,YACtB,mHAGgB,aAAa,cAAc,EACtC,GAAG,UAAU,GAAG,KAAK,YACtB,CACF,gFAEY,aAAa,cAAc,EACtC,GAAG,UAAU,GAAG,KAAK,YACtB,mHAGgB,aAAa,cAAc,EACtC,GAAG,UAAU,GAAG,KAAK,aACtB,CACF,gFAEY,aAAa,cAAc,EACtC,GAAG,UAAU,GAAG,KAAK,aACtB,mHAGgB,aAAa,cAAc,EACtC,GAAG,UAAU,GAAG,KAAK,aACtB,CACF,gFAEY,aAAa,cAAc,EACtC,GAAG,UAAU,GAAG,KAAK,aACtB,mHAGgB,aAAa,cAAc,EACtC,GAAG,UAAU,YACd,CACF,gFAEY,aAAa,cAAc,EACtC,GAAG,UAAU,YACd,mHAGgB,aAAa,cAAc,EACtC,GAAG,UAAU,YACd,CACF,gFAEY,aAAa,cAAc,EACtC,GAAG,UAAU,YACd,mHAGgB,aAAa,cAAc,EACtC,GAAG,UAAU,aACd,CACF,gFAEY,aAAa,cAAc,EACtC,GAAG,UAAU,aACd,mHAGgB,aAAa,cAAc,EACtC,GAAG,UAAU,aACd,CACF,gFAEY,aAAa,cAAc,EACtC,GAAG,UAAU,aACd,GACD;AAGpB,KAAI,wBAAwB;EAC1B,MAAM,WAAW,MAAM,KAAK,OAAO,KAAK,WAAW,uBAAuB,CAAC;AAC3E,MAAI,UAAU;GACZ,IAAI,SAAS,EAAE;AACf,wDAAe,SAAS,CACtB,UAAS,MAAM,QAAQ,QACrB,SAAS;IACP;IACA;IACA,YAAY;IACZ,WAAW;IACZ,CAAC,CACH;AAGH,2DAAgB,OAAO,CACrB,sBAAqB;IACnB,GAAG;IACK;IACR,YAAY;IACb;;;CAKP,MAAM,SAAS,0BAAoB;EACjC,KAAK;EACL,MAAM;EACN,SAAS;EACT,UAAU;EACV,aAAa;EACb,QAAQ;EACR;EACD,CAAC;AAEF,0BACE,wEACY,QAAQ,OAAO,GAAG;EAAE,GAAG,OAAO;EAAQ,GAAG;EAAQ,GAAG,EAAE,CACnE;;;;;;;;AASH,SAAgB,aAAa,QAAmC;AAC9D,QAAO"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Context } from "../types/context.cjs";
|
|
2
|
+
import { AnyUserConfig, ParsedUserConfig, PowerlinesCommand, UserConfig, WorkspaceConfig } from "../types/config.cjs";
|
|
3
|
+
import { Jiti } from "jiti";
|
|
4
|
+
|
|
5
|
+
//#region src/lib/config.d.ts
|
|
6
|
+
type PartiallyResolvedContext<TContext extends Context = Context> = Omit<TContext, "config" | "tsconfig" | "entry" | "fs" | "compiler" | "unimport"> & Partial<TContext> & {
|
|
7
|
+
config: TContext["config"];
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Loads the workspace configuration.
|
|
11
|
+
*
|
|
12
|
+
* @param workspaceRoot - The root directory of the workspace.
|
|
13
|
+
* @param cwd - The current working directory to start searching from.
|
|
14
|
+
* @returns A promise that resolves to the loaded workspace configuration.
|
|
15
|
+
*/
|
|
16
|
+
declare function loadWorkspaceConfig(workspaceRoot: string, cwd: string): Promise<WorkspaceConfig>;
|
|
17
|
+
/**
|
|
18
|
+
* Loads the user configuration file for the project.
|
|
19
|
+
*
|
|
20
|
+
* @param projectRoot - The root directory of the project.
|
|
21
|
+
* @param workspaceRoot - The root directory of the workspace.
|
|
22
|
+
* @param jiti - An instance of Jiti to resolve modules from
|
|
23
|
+
* @param command - The {@link PowerlinesCommand} string associated with the current running process
|
|
24
|
+
* @param mode - The mode in which the project is running (default is "production").
|
|
25
|
+
* @param configFile - An optional path to a specific configuration file.
|
|
26
|
+
* @param framework - The framework name to use for default configuration file names.
|
|
27
|
+
* @returns A promise that resolves to the resolved user configuration.
|
|
28
|
+
*/
|
|
29
|
+
declare function loadUserConfigFile(projectRoot: string, workspaceRoot: string, jiti: Jiti, command?: PowerlinesCommand, mode?: string, configFile?: string, framework?: string): Promise<ParsedUserConfig>;
|
|
30
|
+
/**
|
|
31
|
+
* A type helper to make it easier to use `powerlines.config.ts` files.
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* The function accepts a direct {@link AnyUserConfig} object and returns it typed as a {@link UserConfig} object.
|
|
35
|
+
*/
|
|
36
|
+
declare function defineConfig(config: AnyUserConfig): UserConfig;
|
|
37
|
+
declare type __ΩPartiallyResolvedContext = any[];
|
|
38
|
+
//#endregion
|
|
39
|
+
export { PartiallyResolvedContext, __ΩPartiallyResolvedContext, defineConfig, loadUserConfigFile, loadWorkspaceConfig };
|
|
40
|
+
//# sourceMappingURL=config.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.cts","names":[],"sources":["../../src/lib/config.ts"],"sourcesContent":[],"mappings":";;;;;KAqCY,0CAA0C,UAAU,WAAW,KACzE,8EAGA,QAAQ;EAJE,MAAA,EAKA,QALA,CAAA,QAAA,CAAA;CAA0C;;;;;;;;AAehC,iBAAA,mBAAA,CAGX,aAAR,EAAA,MAAO,EAAA,GAAA,EAAA,MAAA,CAAA,EAAP,OAAO,CAAC,eAAD,CAAA;AAyBV;;;;;;AAmKA;;;;;;iBAnKsB,kBAAA,mDAGd,gBACI,4EAIT,QAAQ;;;;;;;iBA2JK,YAAA,SAAqB,gBAAgB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Context } from "../types/context.mjs";
|
|
2
|
+
import { AnyUserConfig, ParsedUserConfig, PowerlinesCommand, UserConfig, WorkspaceConfig } from "../types/config.mjs";
|
|
3
|
+
import { Jiti } from "jiti";
|
|
4
|
+
|
|
5
|
+
//#region src/lib/config.d.ts
|
|
6
|
+
type PartiallyResolvedContext<TContext extends Context = Context> = Omit<TContext, "config" | "tsconfig" | "entry" | "fs" | "compiler" | "unimport"> & Partial<TContext> & {
|
|
7
|
+
config: TContext["config"];
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Loads the workspace configuration.
|
|
11
|
+
*
|
|
12
|
+
* @param workspaceRoot - The root directory of the workspace.
|
|
13
|
+
* @param cwd - The current working directory to start searching from.
|
|
14
|
+
* @returns A promise that resolves to the loaded workspace configuration.
|
|
15
|
+
*/
|
|
16
|
+
declare function loadWorkspaceConfig(workspaceRoot: string, cwd: string): Promise<WorkspaceConfig>;
|
|
17
|
+
/**
|
|
18
|
+
* Loads the user configuration file for the project.
|
|
19
|
+
*
|
|
20
|
+
* @param projectRoot - The root directory of the project.
|
|
21
|
+
* @param workspaceRoot - The root directory of the workspace.
|
|
22
|
+
* @param jiti - An instance of Jiti to resolve modules from
|
|
23
|
+
* @param command - The {@link PowerlinesCommand} string associated with the current running process
|
|
24
|
+
* @param mode - The mode in which the project is running (default is "production").
|
|
25
|
+
* @param configFile - An optional path to a specific configuration file.
|
|
26
|
+
* @param framework - The framework name to use for default configuration file names.
|
|
27
|
+
* @returns A promise that resolves to the resolved user configuration.
|
|
28
|
+
*/
|
|
29
|
+
declare function loadUserConfigFile(projectRoot: string, workspaceRoot: string, jiti: Jiti, command?: PowerlinesCommand, mode?: string, configFile?: string, framework?: string): Promise<ParsedUserConfig>;
|
|
30
|
+
/**
|
|
31
|
+
* A type helper to make it easier to use `powerlines.config.ts` files.
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* The function accepts a direct {@link AnyUserConfig} object and returns it typed as a {@link UserConfig} object.
|
|
35
|
+
*/
|
|
36
|
+
declare function defineConfig(config: AnyUserConfig): UserConfig;
|
|
37
|
+
declare type __ΩPartiallyResolvedContext = any[];
|
|
38
|
+
//#endregion
|
|
39
|
+
export { PartiallyResolvedContext, __ΩPartiallyResolvedContext, defineConfig, loadUserConfigFile, loadWorkspaceConfig };
|
|
40
|
+
//# sourceMappingURL=config.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.mts","names":[],"sources":["../../src/lib/config.ts"],"sourcesContent":[],"mappings":";;;;;KAqCY,0CAA0C,UAAU,WAAW,KACzE,8EAGA,QAAQ;EAJE,MAAA,EAKA,QALA,CAAA,QAAA,CAAA;CAA0C;;;;;;;;AAehC,iBAAA,mBAAA,CAGX,aAAR,EAAA,MAAO,EAAA,GAAA,EAAA,MAAA,CAAA,EAAP,OAAO,CAAC,eAAD,CAAA;AAyBV;;;;;;AAmKA;;;;;;iBAnKsB,kBAAA,mDAGd,gBACI,4EAIT,QAAQ;;;;;;;iBA2JK,YAAA,SAAqB,gBAAgB"}
|