powerlines 0.23.3 → 0.23.4
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/dist/api--9pVSIbm.d.cts +168 -0
- package/dist/api-DxPACGY4.d.ts +168 -0
- package/dist/api.cjs +3 -3
- package/dist/api.d.cts +16 -7
- package/dist/api.d.ts +16 -7
- package/dist/api.js +2 -2
- package/dist/astro.cjs +8 -8
- package/dist/astro.d.cts +3 -5
- package/dist/astro.d.ts +3 -5
- package/dist/astro.js +5 -5
- package/dist/babel-types.d.ts +292 -0
- package/dist/{chunk-ZFO3FUM4.cjs → chunk-2FLICTDF.cjs} +2 -2
- package/dist/{chunk-JAJ4CI2F.cjs → chunk-3OQXZ5MM.cjs} +2 -2
- package/dist/{chunk-KFRKOIP3.js → chunk-5B6P2VUG.js} +1 -1
- package/dist/{chunk-GNNF5SG6.cjs → chunk-6ACGI52O.cjs} +2 -2
- package/dist/{chunk-JZAQW55G.cjs → chunk-AF5VNWZD.cjs} +2 -2
- package/dist/{chunk-J7MZRPLN.cjs → chunk-AIC2EHPW.cjs} +5 -4
- package/dist/{chunk-3WDMXRK6.cjs → chunk-AYKZK666.cjs} +1 -1
- package/dist/chunk-CHNKTBUA.cjs +32 -0
- package/dist/{chunk-M4QJ2474.cjs → chunk-CTSSNO5L.cjs} +4 -4
- package/dist/{chunk-5A7FM72H.cjs → chunk-GP6XGAJ4.cjs} +2 -2
- package/dist/{chunk-DUYZ3TCT.js → chunk-HLQGKQZY.js} +1 -1
- package/dist/{chunk-LKN52AAX.js → chunk-HNJC47JM.js} +1 -1
- package/dist/{chunk-IGWSCIES.js → chunk-ISLX4Z3L.js} +3 -2
- package/dist/{chunk-J5LKLH5Z.js → chunk-KFSVTJMR.js} +1 -1
- package/dist/{chunk-RWVNX2CP.js → chunk-MI3U2GAT.js} +1 -1
- package/dist/{chunk-4ODWTALP.js → chunk-N3F54RFW.js} +2 -2
- package/dist/{chunk-Q7HBETZW.js → chunk-O2WB6QZ6.js} +1 -1
- package/dist/{chunk-DWV5QAGZ.cjs → chunk-OEKSQ22R.cjs} +2997 -2710
- package/dist/{chunk-WSLPUUGZ.js → chunk-PTZB4LWS.js} +1 -1
- package/dist/{chunk-CPRXGMH2.js → chunk-QSNFMINQ.js} +1 -1
- package/dist/{chunk-YQ76DZYD.cjs → chunk-QUZ4T5AX.cjs} +2 -2
- package/dist/chunk-UTAJPBVT.js +29 -0
- package/dist/{chunk-WG55ZHJL.cjs → chunk-UW3MXOWV.cjs} +2 -2
- package/dist/{chunk-F6BDL4HD.js → chunk-VDBKZJV6.js} +1 -1
- package/dist/{chunk-J3LN5HOC.cjs → chunk-VFLCP3SA.cjs} +2 -2
- package/dist/{chunk-FM4ABZQ2.js → chunk-VT7NVLLU.js} +1 -1
- package/dist/{chunk-WDBPA4RQ.cjs → chunk-VXAKPZ3A.cjs} +2 -2
- package/dist/{chunk-WXU3KLBP.cjs → chunk-XOI5CY62.cjs} +2 -2
- package/dist/{chunk-NH7U3PTV.js → chunk-ZQ7PDXYO.js} +1 -1
- package/dist/{chunk-TNYZH6EG.js → chunk-ZYCPZLIG.js} +2982 -2700
- package/dist/config.d.cts +3 -5
- package/dist/config.d.ts +3 -5
- package/dist/esbuild.cjs +7 -7
- package/dist/esbuild.d.cts +3 -5
- package/dist/esbuild.d.ts +3 -5
- package/dist/esbuild.js +4 -4
- package/dist/farm.cjs +4 -4
- package/dist/farm.d.cts +3 -5
- package/dist/farm.d.ts +3 -5
- package/dist/farm.js +3 -3
- package/dist/index.cjs +54 -33
- package/dist/index.d.cts +188 -36
- package/dist/index.d.ts +188 -36
- package/dist/index.js +18 -17
- package/dist/lib/api-B6hfFxVS.d.ts +167 -0
- package/dist/lib/api-CD2QlMig.d.cts +167 -0
- package/dist/lib/build/esbuild.d.cts +2 -4
- package/dist/lib/build/esbuild.d.ts +2 -4
- package/dist/lib/build/index.d.cts +4 -5
- package/dist/lib/build/index.d.ts +4 -5
- package/dist/lib/build/rolldown.d.cts +2 -4
- package/dist/lib/build/rolldown.d.ts +2 -4
- package/dist/lib/build/rollup.d.cts +2 -4
- package/dist/lib/build/rollup.d.ts +2 -4
- package/dist/lib/build/rspack.d.cts +2 -4
- package/dist/lib/build/rspack.d.ts +2 -4
- package/dist/lib/build/tsup.d.cts +2 -4
- package/dist/lib/build/tsup.d.ts +2 -4
- package/dist/lib/build/unbuild.d.cts +4 -23
- package/dist/lib/build/unbuild.d.ts +4 -23
- package/dist/lib/build/vite.d.cts +2 -4
- package/dist/lib/build/vite.d.ts +2 -4
- package/dist/lib/build/webpack.d.cts +2 -4
- package/dist/lib/build/webpack.d.ts +2 -4
- package/dist/lib/chunk-32Q2PG5D.js +9 -0
- package/dist/lib/chunk-35FGUJFD.cjs +2 -0
- package/dist/lib/{chunk-LIN4KAV3.js → chunk-52VDUP5J.js} +5 -7
- package/dist/lib/chunk-B3EE3VHZ.cjs +127 -0
- package/dist/lib/{chunk-UWHGJ4JS.js → chunk-BLNW3ZQA.js} +483 -1776
- package/dist/lib/chunk-DX2VAXZB.cjs +11 -0
- package/dist/lib/{chunk-VGSV2BEL.cjs → chunk-EFYMNU53.cjs} +6 -12
- package/dist/lib/chunk-FBQIPNRV.cjs +146 -0
- package/dist/lib/chunk-FFT4PWRM.js +1 -0
- package/dist/lib/{chunk-L4NEN725.js → chunk-G7S5PIAC.js} +1 -1
- package/dist/lib/chunk-KFJCWNVG.js +120 -0
- package/dist/lib/chunk-M2U6XIQ2.js +144 -0
- package/dist/lib/chunk-MVIKYHBX.cjs +2 -0
- package/dist/lib/chunk-NYNHNTHT.js +1 -0
- package/dist/lib/{chunk-A5SB72VO.cjs → chunk-PYQADZVV.cjs} +493 -1779
- package/dist/lib/chunk-QP6WX3Q3.js +1190 -0
- package/dist/lib/chunk-S7LLEDQM.cjs +1218 -0
- package/dist/lib/chunk-UHGGYHSK.cjs +175 -0
- package/dist/lib/chunk-YNKFRPUY.js +168 -0
- package/dist/lib/{chunk-ULJVBW4L.cjs → chunk-ZBDVQVUK.cjs} +1 -1
- package/dist/lib/{config-BoGlIhnH.d.cts → config-DTSdCZsw.d.cts} +650 -633
- package/dist/lib/{config-CTej7RMP.d.ts → config-DeUaQYc_.d.ts} +650 -633
- package/dist/lib/config-file.d.cts +2 -4
- package/dist/lib/config-file.d.ts +2 -4
- package/dist/lib/contexts/api-context.cjs +18 -0
- package/dist/lib/contexts/api-context.d.cts +69 -0
- package/dist/lib/contexts/api-context.d.ts +69 -0
- package/dist/lib/contexts/api-context.js +9 -0
- package/dist/lib/contexts/context.cjs +15 -0
- package/dist/lib/contexts/context.d.cts +255 -0
- package/dist/lib/contexts/context.d.ts +255 -0
- package/dist/lib/contexts/context.js +6 -0
- package/dist/lib/contexts/environment-context.cjs +17 -0
- package/dist/lib/contexts/environment-context.d.cts +65 -0
- package/dist/lib/contexts/environment-context.d.ts +65 -0
- package/dist/lib/contexts/environment-context.js +8 -0
- package/dist/lib/contexts/index.cjs +31 -0
- package/dist/lib/contexts/index.d.cts +35 -0
- package/dist/lib/contexts/index.d.ts +35 -0
- package/dist/lib/contexts/index.js +10 -0
- package/dist/lib/contexts/plugin-context.cjs +11 -0
- package/dist/lib/contexts/plugin-context.d.cts +42 -0
- package/dist/lib/contexts/plugin-context.d.ts +42 -0
- package/dist/lib/contexts/plugin-context.js +2 -0
- package/dist/lib/entry.d.cts +2 -4
- package/dist/lib/entry.d.ts +2 -4
- package/dist/lib/index.cjs +96 -74
- package/dist/lib/index.d.cts +17 -14
- package/dist/lib/index.d.ts +17 -14
- package/dist/lib/index.js +18 -12
- package/dist/lib/internal-CpVMJCaU.d.ts +39 -0
- package/dist/lib/internal-ypnrUNZy.d.cts +39 -0
- package/dist/lib/logger.d.cts +2 -4
- package/dist/lib/logger.d.ts +2 -4
- package/dist/lib/typescript/compiler-host.cjs +1 -1
- package/dist/lib/typescript/compiler-host.d.cts +2 -4
- package/dist/lib/typescript/compiler-host.d.ts +2 -4
- package/dist/lib/typescript/compiler-host.js +1 -1
- package/dist/lib/typescript/import-transformer.d.cts +2 -4
- package/dist/lib/typescript/import-transformer.d.ts +2 -4
- package/dist/lib/typescript/index.cjs +29 -24
- package/dist/lib/typescript/index.d.cts +4 -4
- package/dist/lib/typescript/index.d.ts +4 -4
- package/dist/lib/typescript/index.js +3 -2
- package/dist/lib/typescript/program.d.cts +2 -4
- package/dist/lib/typescript/program.d.ts +2 -4
- package/dist/lib/typescript/ts-morph.cjs +11 -0
- package/dist/lib/{create-program.d.ts → typescript/ts-morph.d.cts} +3 -5
- package/dist/lib/{create-program.d.cts → typescript/ts-morph.d.ts} +3 -5
- package/dist/lib/typescript/ts-morph.js +2 -0
- package/dist/lib/unplugin/factory.cjs +8 -4
- package/dist/lib/unplugin/factory.d.cts +27 -10
- package/dist/lib/unplugin/factory.d.ts +27 -10
- package/dist/lib/unplugin/factory.js +7 -3
- package/dist/lib/unplugin/helpers.cjs +11 -0
- package/dist/lib/unplugin/helpers.d.cts +128 -0
- package/dist/lib/unplugin/helpers.d.ts +128 -0
- package/dist/lib/unplugin/helpers.js +2 -0
- package/dist/lib/unplugin/index.cjs +12 -7
- package/dist/lib/unplugin/index.d.cts +4 -6
- package/dist/lib/unplugin/index.d.ts +4 -6
- package/dist/lib/unplugin/index.js +9 -4
- package/dist/lib/unplugin/plugin.cjs +4 -3
- package/dist/lib/unplugin/plugin.d.cts +2 -4
- package/dist/lib/unplugin/plugin.d.ts +2 -4
- package/dist/lib/unplugin/plugin.js +3 -2
- package/dist/lib/unplugin/resolve-id.cjs +2 -2
- package/dist/lib/unplugin/resolve-id.d.cts +2 -4
- package/dist/lib/unplugin/resolve-id.d.ts +2 -4
- package/dist/lib/unplugin/resolve-id.js +1 -1
- package/dist/lib/utilities/bundle.d.cts +2 -4
- package/dist/lib/utilities/bundle.d.ts +2 -4
- package/dist/lib/utilities/cache.d.cts +2 -4
- package/dist/lib/utilities/cache.d.ts +2 -4
- package/dist/lib/utilities/file-header.d.cts +2 -4
- package/dist/lib/utilities/file-header.d.ts +2 -4
- package/dist/lib/utilities/index.cjs +18 -18
- package/dist/lib/utilities/index.d.cts +2 -4
- package/dist/lib/utilities/index.d.ts +2 -4
- package/dist/lib/utilities/index.js +4 -4
- package/dist/lib/utilities/meta.d.cts +2 -4
- package/dist/lib/utilities/meta.d.ts +2 -4
- package/dist/lib/utilities/resolve-path.d.cts +2 -4
- package/dist/lib/utilities/resolve-path.d.ts +2 -4
- package/dist/lib/utilities/resolve.d.cts +2 -4
- package/dist/lib/utilities/resolve.d.ts +2 -4
- package/dist/lib/utilities/source-file.d.cts +2 -4
- package/dist/lib/utilities/source-file.d.ts +2 -4
- package/dist/lib/utilities/source-map.d.cts +2 -4
- package/dist/lib/utilities/source-map.d.ts +2 -4
- package/dist/lib/utilities/worker.d.cts +2 -4
- package/dist/lib/utilities/worker.d.ts +2 -4
- package/dist/lib/utilities/write-file.d.cts +2 -4
- package/dist/lib/utilities/write-file.d.ts +2 -4
- package/dist/next.cjs +8 -8
- package/dist/next.js +5 -5
- package/dist/nuxt.cjs +9 -9
- package/dist/nuxt.js +6 -6
- package/dist/plugin-utils/{context-D1I2JQgs.d.cts → context-DRFZE3XI.d.cts} +535 -518
- package/dist/plugin-utils/{context-D1I2JQgs.d.ts → context-DRFZE3XI.d.ts} +535 -518
- package/dist/plugin-utils/context-helpers.d.cts +2 -4
- package/dist/plugin-utils/context-helpers.d.ts +2 -4
- package/dist/plugin-utils/enforce.d.cts +2 -4
- package/dist/plugin-utils/enforce.d.ts +2 -4
- package/dist/plugin-utils/extend.d.cts +2 -4
- package/dist/plugin-utils/extend.d.ts +2 -4
- package/dist/plugin-utils/get-config-path.d.cts +2 -4
- package/dist/plugin-utils/get-config-path.d.ts +2 -4
- package/dist/plugin-utils/helpers.d.cts +2 -4
- package/dist/plugin-utils/helpers.d.ts +2 -4
- package/dist/plugin-utils/index.d.cts +2 -4
- package/dist/plugin-utils/index.d.ts +2 -4
- package/dist/plugin-utils/merge.d.cts +2 -4
- package/dist/plugin-utils/merge.d.ts +2 -4
- package/dist/plugin-utils/paths.d.cts +2 -4
- package/dist/plugin-utils/paths.d.ts +2 -4
- package/dist/{resolved-Dem-rX6I.d.cts → resolved-C00CJgsk.d.cts} +9 -8
- package/dist/{resolved-BVakEeek.d.ts → resolved-DKFZ11S7.d.ts} +9 -8
- package/dist/rolldown.cjs +7 -7
- package/dist/rolldown.d.cts +3 -5
- package/dist/rolldown.d.ts +3 -5
- package/dist/rolldown.js +4 -4
- package/dist/rollup.cjs +7 -7
- package/dist/rollup.d.cts +3 -5
- package/dist/rollup.d.ts +3 -5
- package/dist/rollup.js +4 -4
- package/dist/rspack.cjs +7 -7
- package/dist/rspack.d.cts +3 -5
- package/dist/rspack.d.ts +3 -5
- package/dist/rspack.js +4 -4
- package/dist/tsup.cjs +8 -8
- package/dist/tsup.js +5 -5
- package/dist/types/api.cjs +4 -0
- package/dist/types/api.d.cts +36 -0
- package/dist/types/api.d.ts +36 -0
- package/dist/types/api.js +1 -0
- package/dist/types/babel.d.cts +3 -5
- package/dist/types/babel.d.ts +3 -5
- package/dist/types/commands.d.cts +3 -5
- package/dist/types/commands.d.ts +3 -5
- package/dist/types/config.d.cts +3 -5
- package/dist/types/config.d.ts +3 -5
- package/dist/types/context.d.cts +3 -5
- package/dist/types/context.d.ts +3 -5
- package/dist/types/{vfs.cjs → fs.cjs} +3 -3
- package/dist/types/{vfs.d.cts → fs.d.cts} +43 -38
- package/dist/types/{vfs.d.ts → fs.d.ts} +43 -38
- package/dist/types/fs.js +2 -0
- package/dist/types/hooks.d.cts +3 -5
- package/dist/types/hooks.d.ts +3 -5
- package/dist/types/index.cjs +9 -8
- package/dist/types/index.d.cts +5 -6
- package/dist/types/index.d.ts +5 -6
- package/dist/types/index.js +3 -2
- package/dist/types/internal.d.cts +44 -9
- package/dist/types/internal.d.ts +44 -9
- package/dist/types/plugin.d.cts +3 -5
- package/dist/types/plugin.d.ts +3 -5
- package/dist/types/resolved.d.cts +3 -5
- package/dist/types/resolved.d.ts +3 -5
- package/dist/types/unplugin.d.cts +20 -12
- package/dist/types/unplugin.d.ts +20 -12
- package/dist/unloader.cjs +7 -7
- package/dist/unloader.d.cts +12 -14
- package/dist/unloader.d.ts +12 -14
- package/dist/unloader.js +4 -4
- package/dist/unplugin.cjs +18 -18
- package/dist/unplugin.d.cts +6 -9
- package/dist/unplugin.d.ts +6 -9
- package/dist/unplugin.js +15 -15
- package/dist/vite.cjs +7 -7
- package/dist/vite.d.cts +3 -5
- package/dist/vite.d.ts +3 -5
- package/dist/vite.js +4 -4
- package/dist/webpack.cjs +7 -7
- package/dist/webpack.d.cts +3 -5
- package/dist/webpack.d.ts +3 -5
- package/dist/webpack.js +4 -4
- package/package.json +38 -10
- package/schemas/fs.capnp +73 -15
- package/dist/chunk-RODEAGIJ.cjs +0 -32
- package/dist/chunk-SKLSRHBU.js +0 -29
- package/dist/hooks-B3vzw6La.d.ts +0 -28
- package/dist/hooks-YACA4jMY.d.cts +0 -28
- package/dist/lib/create-program.cjs +0 -11
- package/dist/lib/create-program.js +0 -2
- package/dist/lib/hooks-CDLPWf7j.d.cts +0 -28
- package/dist/lib/hooks-Cn-IqwYp.d.ts +0 -28
- package/dist/types/vfs.js +0 -2
- /package/dist/{chunk-KIKTWMI3.cjs → chunk-2NCILNCH.cjs} +0 -0
- /package/dist/{chunk-XVLT2RQ2.js → chunk-BLNT5INX.js} +0 -0
- /package/dist/{lib/chunk-RJ4277VZ.cjs → chunk-GRU7B3QM.cjs} +0 -0
- /package/dist/{lib/chunk-ZBLDAREE.js → chunk-T2P533I5.js} +0 -0
- /package/dist/lib/{chunk-CGYAL3S2.cjs → chunk-4EIXDLFP.cjs} +0 -0
- /package/dist/lib/{chunk-CXRSMYEX.js → chunk-RD5AUWXN.js} +0 -0
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
/* -------------------------------------------------------------------
|
|
2
|
+
|
|
3
|
+
⚡ Storm Software - Powerlines
|
|
4
|
+
|
|
5
|
+
This code was released as part of the Powerlines project. Powerlines
|
|
6
|
+
is maintained by Storm Software under the Apache-2.0 license, and is
|
|
7
|
+
free for commercial and private use. For more information, please visit
|
|
8
|
+
our licensing page at https://stormsoftware.com/licenses/projects/powerlines.
|
|
9
|
+
|
|
10
|
+
Website: https://stormsoftware.com
|
|
11
|
+
Repository: https://github.com/storm-software/powerlines
|
|
12
|
+
Documentation: https://docs.stormsoftware.com/projects/powerlines
|
|
13
|
+
Contact: https://stormsoftware.com/contact
|
|
14
|
+
|
|
15
|
+
SPDX-License-Identifier: Apache-2.0
|
|
16
|
+
|
|
17
|
+
------------------------------------------------------------------- */
|
|
18
|
+
|
|
19
|
+
import type { ConfigAPI, NodePath, types as t } from "@babel/core";
|
|
20
|
+
import type { HubInterface } from "@babel/traverse";
|
|
21
|
+
|
|
22
|
+
declare module "@babel/helper-plugin-utils" {
|
|
23
|
+
const knownAssumptions: readonly [
|
|
24
|
+
"arrayLikeIsIterable",
|
|
25
|
+
"constantReexports",
|
|
26
|
+
"constantSuper",
|
|
27
|
+
"enumerableModuleMeta",
|
|
28
|
+
"ignoreFunctionLength",
|
|
29
|
+
"ignoreToPrimitiveHint",
|
|
30
|
+
"iterableIsArray",
|
|
31
|
+
"mutableTemplateObject",
|
|
32
|
+
"noClassCalls",
|
|
33
|
+
"noDocumentAll",
|
|
34
|
+
"noIncompleteNsImportDetection",
|
|
35
|
+
"noNewArrows",
|
|
36
|
+
"noUninitializedPrivateFieldAccess",
|
|
37
|
+
"objectRestNoSymbols",
|
|
38
|
+
"privateFieldsAsSymbols",
|
|
39
|
+
"privateFieldsAsProperties",
|
|
40
|
+
"pureGetters",
|
|
41
|
+
"setClassMethods",
|
|
42
|
+
"setComputedProperties",
|
|
43
|
+
"setPublicClassFields",
|
|
44
|
+
"setSpreadProperties",
|
|
45
|
+
"skipForOfIteratorClosing",
|
|
46
|
+
"superIsCallableConstructor"
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
export type AssumptionName = (typeof knownAssumptions)[number];
|
|
50
|
+
|
|
51
|
+
type AssumptionFunction = (name: AssumptionName) => boolean | undefined;
|
|
52
|
+
|
|
53
|
+
export type Target =
|
|
54
|
+
| "node"
|
|
55
|
+
| "deno"
|
|
56
|
+
| "chrome"
|
|
57
|
+
| "opera"
|
|
58
|
+
| "edge"
|
|
59
|
+
| "firefox"
|
|
60
|
+
| "safari"
|
|
61
|
+
| "ie"
|
|
62
|
+
| "ios"
|
|
63
|
+
| "android"
|
|
64
|
+
| "electron"
|
|
65
|
+
| "samsung"
|
|
66
|
+
| "opera_mobile";
|
|
67
|
+
|
|
68
|
+
export type Targets = {
|
|
69
|
+
[target in Target]?: string;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
type TargetsFunction = () => Targets;
|
|
73
|
+
|
|
74
|
+
export type PresetAPI = {
|
|
75
|
+
targets: TargetsFunction;
|
|
76
|
+
addExternalDependency: (ref: string) => void;
|
|
77
|
+
} & ConfigAPI;
|
|
78
|
+
|
|
79
|
+
export type PluginAPI = {
|
|
80
|
+
assumption: AssumptionFunction;
|
|
81
|
+
} & PresetAPI &
|
|
82
|
+
BabelAPI;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
declare module "@babel/core" {
|
|
86
|
+
export interface BabelFile
|
|
87
|
+
extends HubInterface,
|
|
88
|
+
Pick<PluginPass, "get" | "set"> {}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
declare module "@babel/helper-module-transforms" {
|
|
92
|
+
interface LocalExportMetadata {
|
|
93
|
+
/**
|
|
94
|
+
* names of exports
|
|
95
|
+
*/
|
|
96
|
+
names: string[];
|
|
97
|
+
kind: "import" | "hoisted" | "block" | "var";
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
type InteropType =
|
|
101
|
+
/**
|
|
102
|
+
* Babel interop for default-only imports
|
|
103
|
+
*/
|
|
104
|
+
| "default"
|
|
105
|
+
/**
|
|
106
|
+
* Babel interop for namespace or default+named imports
|
|
107
|
+
*/
|
|
108
|
+
| "namespace"
|
|
109
|
+
/**
|
|
110
|
+
* Node.js interop for default-only imports
|
|
111
|
+
*/
|
|
112
|
+
| "node-default"
|
|
113
|
+
/**
|
|
114
|
+
* Node.js interop for namespace or default+named imports
|
|
115
|
+
*/
|
|
116
|
+
| "node-namespace"
|
|
117
|
+
/**
|
|
118
|
+
* No interop, or named-only imports
|
|
119
|
+
*/
|
|
120
|
+
| "none";
|
|
121
|
+
|
|
122
|
+
interface SourceModuleMetadata {
|
|
123
|
+
/**
|
|
124
|
+
* A unique variable name to use for this namespace object.
|
|
125
|
+
* Centralized for simplicity.
|
|
126
|
+
*/
|
|
127
|
+
name: string;
|
|
128
|
+
loc: t.SourceLocation | undefined | null;
|
|
129
|
+
interop: InteropType;
|
|
130
|
+
/**
|
|
131
|
+
* Local binding to reference from this source namespace.
|
|
132
|
+
* Key: Local name, value: Import name
|
|
133
|
+
*/
|
|
134
|
+
imports: Map<string, string>;
|
|
135
|
+
/**
|
|
136
|
+
* Local names that reference namespace object.
|
|
137
|
+
*/
|
|
138
|
+
importsNamespace: Set<string>;
|
|
139
|
+
/**
|
|
140
|
+
* Reexports to create for namespace. Key: Export name, value: Import name
|
|
141
|
+
*/
|
|
142
|
+
reexports: Map<string, string>;
|
|
143
|
+
/**
|
|
144
|
+
* List of names to re-export namespace as.
|
|
145
|
+
*/
|
|
146
|
+
reexportNamespace: Set<string>;
|
|
147
|
+
/**
|
|
148
|
+
* Tracks if the source should be re-exported.
|
|
149
|
+
*/
|
|
150
|
+
reexportAll: null | {
|
|
151
|
+
loc: t.SourceLocation | undefined | null;
|
|
152
|
+
};
|
|
153
|
+
wrap?: unknown;
|
|
154
|
+
referenced: boolean;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
interface ModuleMetadata {
|
|
158
|
+
exportName: string;
|
|
159
|
+
/**
|
|
160
|
+
* The name of the variable that will reference an object
|
|
161
|
+
* containing export names.
|
|
162
|
+
*/
|
|
163
|
+
exportNameListName: null | string;
|
|
164
|
+
hasExports: boolean;
|
|
165
|
+
/**
|
|
166
|
+
* Lookup from local binding to export information.
|
|
167
|
+
*/
|
|
168
|
+
local: Map<string, LocalExportMetadata>;
|
|
169
|
+
/**
|
|
170
|
+
* Lookup of source file to source file metadata.
|
|
171
|
+
*/
|
|
172
|
+
source: Map<string, SourceModuleMetadata>;
|
|
173
|
+
/**
|
|
174
|
+
* List of names that should only be printed as string literals.
|
|
175
|
+
* i.e. `import { "any unicode" as foo } from "some-module"`
|
|
176
|
+
* `stringSpecifiers` is `Set(1) ["any unicode"]`
|
|
177
|
+
* In most cases `stringSpecifiers` is an empty Set
|
|
178
|
+
*/
|
|
179
|
+
stringSpecifiers: Set<string>;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
type ImportInterop =
|
|
183
|
+
| "none"
|
|
184
|
+
| "babel"
|
|
185
|
+
| "node"
|
|
186
|
+
| ((source: string, filename?: string) => "none" | "babel" | "node");
|
|
187
|
+
|
|
188
|
+
type Lazy = boolean | string[] | ((source: string) => boolean);
|
|
189
|
+
|
|
190
|
+
interface RootOptions {
|
|
191
|
+
filename?: string | null;
|
|
192
|
+
filenameRelative?: string | null;
|
|
193
|
+
sourceRoot?: string | null;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export interface PluginOptions {
|
|
197
|
+
moduleId?: string;
|
|
198
|
+
moduleIds?: boolean;
|
|
199
|
+
getModuleId?: (moduleName: string) => string | null | undefined;
|
|
200
|
+
moduleRoot?: string;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export function getModuleName(
|
|
204
|
+
rootOpts: RootOptions,
|
|
205
|
+
pluginOpts: PluginOptions
|
|
206
|
+
): string | null;
|
|
207
|
+
|
|
208
|
+
export interface RewriteModuleStatementsAndPrepareHeaderOptions {
|
|
209
|
+
exportName?: string;
|
|
210
|
+
strict?: boolean;
|
|
211
|
+
allowTopLevelThis?: boolean;
|
|
212
|
+
strictMode?: boolean;
|
|
213
|
+
loose?: boolean;
|
|
214
|
+
importInterop?: ImportInterop;
|
|
215
|
+
noInterop?: boolean;
|
|
216
|
+
lazy?: Lazy;
|
|
217
|
+
getWrapperPayload?: (
|
|
218
|
+
source: string,
|
|
219
|
+
metadata: SourceModuleMetadata,
|
|
220
|
+
importNodes: t.Node[]
|
|
221
|
+
) => unknown;
|
|
222
|
+
wrapReference?: (
|
|
223
|
+
ref: t.Expression,
|
|
224
|
+
payload: unknown
|
|
225
|
+
) => t.Expression | null | undefined;
|
|
226
|
+
esNamespaceOnly?: boolean;
|
|
227
|
+
filename: string | undefined | null;
|
|
228
|
+
constantReexports?: boolean | void;
|
|
229
|
+
enumerableModuleMeta?: boolean | void;
|
|
230
|
+
noIncompleteNsImportDetection?: boolean | void;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Perform all of the generic ES6 module rewriting needed to handle initial
|
|
235
|
+
* module processing. This function will rewrite the majority of the given
|
|
236
|
+
* program to reference the modules described by the returned metadata,
|
|
237
|
+
* and returns a list of statements for use when initializing the module.
|
|
238
|
+
*/
|
|
239
|
+
export function rewriteModuleStatementsAndPrepareHeader(
|
|
240
|
+
path: NodePath<t.Program>,
|
|
241
|
+
options: RewriteModuleStatementsAndPrepareHeaderOptions
|
|
242
|
+
): {
|
|
243
|
+
meta: ModuleMetadata;
|
|
244
|
+
headers: t.Statement[];
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Check if a given source is an anonymous import, e.g. `import 'foo';`
|
|
249
|
+
*/
|
|
250
|
+
export function isSideEffectImport(source: SourceModuleMetadata): boolean;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Create the runtime initialization statements for a given requested source.
|
|
254
|
+
* These will initialize all of the runtime import/export logic that
|
|
255
|
+
* can't be handled statically by the statements created by
|
|
256
|
+
* `buildExportInitializationStatements()`.
|
|
257
|
+
*/
|
|
258
|
+
export function buildNamespaceInitStatements(
|
|
259
|
+
metadata: ModuleMetadata,
|
|
260
|
+
sourceMetadata: SourceModuleMetadata,
|
|
261
|
+
constantReexports?: boolean | void,
|
|
262
|
+
wrapReference?: (
|
|
263
|
+
ref: t.Identifier,
|
|
264
|
+
payload: unknown
|
|
265
|
+
) => t.Expression | null | undefined
|
|
266
|
+
): t.Statement[];
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Flag a set of statements as hoisted above all else so that module init
|
|
270
|
+
* statements all run before user code.
|
|
271
|
+
*/
|
|
272
|
+
export function ensureStatementsHoisted(statements: t.Statement[]): void;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Given an expression for a standard import object, like `require('foo')`,
|
|
276
|
+
* wrap it in a call to the interop helpers based on the type.
|
|
277
|
+
*/
|
|
278
|
+
export function wrapInterop(
|
|
279
|
+
programPath: NodePath<t.Program>,
|
|
280
|
+
expr: t.Expression,
|
|
281
|
+
type: InteropType
|
|
282
|
+
): t.CallExpression;
|
|
283
|
+
|
|
284
|
+
export function buildDynamicImport(
|
|
285
|
+
node: t.CallExpression | t.ImportExpression,
|
|
286
|
+
deferToThen: boolean,
|
|
287
|
+
wrapWithPromise: boolean,
|
|
288
|
+
builder: (specifier: t.Expression) => t.Expression
|
|
289
|
+
): t.Expression;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkAF5VNWZD_cjs = require('./chunk-AF5VNWZD.cjs');
|
|
4
4
|
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
5
5
|
var omit = require('@stryke/helpers/omit');
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@ function tsup(options = {}) {
|
|
|
8
8
|
return {
|
|
9
9
|
...options,
|
|
10
10
|
esbuildPlugins: [
|
|
11
|
-
|
|
11
|
+
chunkAF5VNWZD_cjs.esbuild_default({
|
|
12
12
|
output: {
|
|
13
13
|
outputPath: options.outDir,
|
|
14
14
|
format: options.format
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkAIC2EHPW_cjs = require('./chunk-AIC2EHPW.cjs');
|
|
4
4
|
var unplugin = require('unplugin');
|
|
5
5
|
|
|
6
|
-
var webpack = unplugin.createWebpackPlugin(
|
|
6
|
+
var webpack = unplugin.createWebpackPlugin(chunkAIC2EHPW_cjs.createUnpluginFactory("webpack"));
|
|
7
7
|
var webpack_default = webpack;
|
|
8
8
|
|
|
9
9
|
exports.webpack = webpack;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkAIC2EHPW_cjs = require('./chunk-AIC2EHPW.cjs');
|
|
4
4
|
var unplugin = require('unplugin');
|
|
5
5
|
|
|
6
|
-
var rollup = unplugin.createRollupPlugin(
|
|
6
|
+
var rollup = unplugin.createRollupPlugin(chunkAIC2EHPW_cjs.createUnpluginFactory("rollup"));
|
|
7
7
|
var rollup_default = rollup;
|
|
8
8
|
|
|
9
9
|
exports.rollup = rollup;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunk5IBA5HC2_cjs = require('./chunk-5IBA5HC2.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkAIC2EHPW_cjs = require('./chunk-AIC2EHPW.cjs');
|
|
5
5
|
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
6
6
|
var isUndefined = require('@stryke/type-checks/is-undefined');
|
|
7
7
|
var unplugin = require('unplugin');
|
|
8
8
|
|
|
9
|
-
var esbuild = unplugin.createEsbuildPlugin(
|
|
9
|
+
var esbuild = unplugin.createEsbuildPlugin(chunkAIC2EHPW_cjs.createUnpluginFactory("esbuild", (api, plugin) => {
|
|
10
10
|
return {
|
|
11
11
|
...plugin,
|
|
12
12
|
esbuild: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkOEKSQ22R_cjs = require('./chunk-OEKSQ22R.cjs');
|
|
4
4
|
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
5
5
|
var types = require('@storm-software/config-tools/types');
|
|
6
6
|
var getWorkspaceRoot = require('@stryke/fs/get-workspace-root');
|
|
@@ -93,7 +93,7 @@ async function handleResolveId(context, args, options = {}) {
|
|
|
93
93
|
args.importer
|
|
94
94
|
] : []
|
|
95
95
|
});
|
|
96
|
-
if (bundleRequire.match(args.id, options.noExternal) || resolvedPath && context.fs.metadata[resolvedPath]?.
|
|
96
|
+
if (bundleRequire.match(args.id, options.noExternal) || resolvedPath && context.fs.metadata[resolvedPath]?.type === "builtin") {
|
|
97
97
|
return void 0;
|
|
98
98
|
}
|
|
99
99
|
if (bundleRequire.match(args.id, options.external) || args.id.startsWith("node:")) {
|
|
@@ -111,7 +111,7 @@ chunkUSNT2KNT_cjs.__name(handleResolveId, "handleResolveId");
|
|
|
111
111
|
// src/lib/unplugin/factory.ts
|
|
112
112
|
function createUnpluginFactory(variant, decorate) {
|
|
113
113
|
return (config, meta) => {
|
|
114
|
-
const log =
|
|
114
|
+
const log = chunkOEKSQ22R_cjs.createLog("unplugin", config);
|
|
115
115
|
log(types.LogLevelLabel.DEBUG, "Initializing Unplugin");
|
|
116
116
|
try {
|
|
117
117
|
const userConfig = {
|
|
@@ -124,7 +124,7 @@ function createUnpluginFactory(variant, decorate) {
|
|
|
124
124
|
async function buildStart() {
|
|
125
125
|
log(types.LogLevelLabel.DEBUG, "Powerlines build plugin starting...");
|
|
126
126
|
const workspaceRoot = getWorkspaceRoot.getWorkspaceRoot(process.cwd());
|
|
127
|
-
api = await
|
|
127
|
+
api = await chunkOEKSQ22R_cjs.PowerlinesAPI.from(workspaceRoot, userConfig);
|
|
128
128
|
if (api.context.config.build.skipNodeModulesBundle) {
|
|
129
129
|
resolvePatterns = bundleRequire.tsconfigPathsToRegExp(api.context.tsconfig.options.paths ?? []);
|
|
130
130
|
}
|
|
@@ -194,6 +194,7 @@ function createUnpluginFactory(variant, decorate) {
|
|
|
194
194
|
chunkUSNT2KNT_cjs.__name(writeBundle, "writeBundle");
|
|
195
195
|
const result = {
|
|
196
196
|
name: "powerlines",
|
|
197
|
+
api,
|
|
197
198
|
resolveId: {
|
|
198
199
|
filter: {
|
|
199
200
|
id: {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkXOI5CY62_cjs = require('./chunk-XOI5CY62.cjs');
|
|
4
|
+
var chunk6ACGI52O_cjs = require('./chunk-6ACGI52O.cjs');
|
|
5
|
+
var chunkQUZ4T5AX_cjs = require('./chunk-QUZ4T5AX.cjs');
|
|
6
|
+
var chunk2FLICTDF_cjs = require('./chunk-2FLICTDF.cjs');
|
|
7
|
+
var chunkGP6XGAJ4_cjs = require('./chunk-GP6XGAJ4.cjs');
|
|
8
|
+
var chunkVXAKPZ3A_cjs = require('./chunk-VXAKPZ3A.cjs');
|
|
9
|
+
var chunkAF5VNWZD_cjs = require('./chunk-AF5VNWZD.cjs');
|
|
10
|
+
var chunkVFLCP3SA_cjs = require('./chunk-VFLCP3SA.cjs');
|
|
11
|
+
var chunkCTSSNO5L_cjs = require('./chunk-CTSSNO5L.cjs');
|
|
12
|
+
var chunkUW3MXOWV_cjs = require('./chunk-UW3MXOWV.cjs');
|
|
13
|
+
var chunk3OQXZ5MM_cjs = require('./chunk-3OQXZ5MM.cjs');
|
|
14
|
+
|
|
15
|
+
// src/unplugin.ts
|
|
16
|
+
var plugins = {
|
|
17
|
+
astro: chunkVXAKPZ3A_cjs.astro_default,
|
|
18
|
+
esbuild: chunkAF5VNWZD_cjs.esbuild_default,
|
|
19
|
+
next: chunkVFLCP3SA_cjs.next_default,
|
|
20
|
+
nuxt: chunkCTSSNO5L_cjs.nuxt_default,
|
|
21
|
+
rolldown: chunkXOI5CY62_cjs.rolldown_default,
|
|
22
|
+
rollup: chunk6ACGI52O_cjs.rollup_default,
|
|
23
|
+
rspack: chunkQUZ4T5AX_cjs.rspack_default,
|
|
24
|
+
tsup: chunk2FLICTDF_cjs.tsup_default,
|
|
25
|
+
unloader: chunkGP6XGAJ4_cjs.unloader_default,
|
|
26
|
+
vite: chunkUW3MXOWV_cjs.vite_default,
|
|
27
|
+
webpack: chunk3OQXZ5MM_cjs.webpack_default
|
|
28
|
+
};
|
|
29
|
+
var unplugin_default = plugins;
|
|
30
|
+
|
|
31
|
+
exports.plugins = plugins;
|
|
32
|
+
exports.unplugin_default = unplugin_default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkUW3MXOWV_cjs = require('./chunk-UW3MXOWV.cjs');
|
|
4
|
+
var chunk3OQXZ5MM_cjs = require('./chunk-3OQXZ5MM.cjs');
|
|
5
5
|
var kit = require('@nuxt/kit');
|
|
6
6
|
require('@nuxt/schema');
|
|
7
7
|
|
|
@@ -12,8 +12,8 @@ var nuxt = kit.defineNuxtModule({
|
|
|
12
12
|
},
|
|
13
13
|
defaults: {},
|
|
14
14
|
setup(options, _nuxt) {
|
|
15
|
-
kit.addVitePlugin(() =>
|
|
16
|
-
kit.addWebpackPlugin(() =>
|
|
15
|
+
kit.addVitePlugin(() => chunkUW3MXOWV_cjs.vite_default(options));
|
|
16
|
+
kit.addWebpackPlugin(() => chunk3OQXZ5MM_cjs.webpack_default(options));
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
var nuxt_default = nuxt;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkAIC2EHPW_cjs = require('./chunk-AIC2EHPW.cjs');
|
|
4
4
|
var unplugin = require('unplugin');
|
|
5
5
|
|
|
6
|
-
var unloader = unplugin.createUnloaderPlugin(
|
|
6
|
+
var unloader = unplugin.createUnloaderPlugin(chunkAIC2EHPW_cjs.createUnpluginFactory("unloader"));
|
|
7
7
|
var unloader_default = unloader;
|
|
8
8
|
|
|
9
9
|
exports.unloader = unloader;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { extractESBuildConfig } from './chunk-VBR53KGY.js';
|
|
2
|
-
import { createUnpluginFactory } from './chunk-
|
|
2
|
+
import { createUnpluginFactory } from './chunk-ISLX4Z3L.js';
|
|
3
3
|
import { __name } from './chunk-SHUYVCID.js';
|
|
4
4
|
import { isDevelopmentMode, isTestMode } from '@stryke/env/environment-checks';
|
|
5
5
|
import defu from 'defu';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { extractESBuildConfig } from './chunk-VBR53KGY.js';
|
|
2
|
-
import { createUnpluginFactory } from './chunk-
|
|
2
|
+
import { createUnpluginFactory } from './chunk-ISLX4Z3L.js';
|
|
3
3
|
import { __name } from './chunk-SHUYVCID.js';
|
|
4
4
|
import { isUndefined } from '@stryke/type-checks/is-undefined';
|
|
5
5
|
import { createEsbuildPlugin } from 'unplugin';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createLog, PowerlinesAPI } from './chunk-
|
|
1
|
+
import { createLog, PowerlinesAPI } from './chunk-ZYCPZLIG.js';
|
|
2
2
|
import { __name } from './chunk-SHUYVCID.js';
|
|
3
3
|
import { LogLevelLabel } from '@storm-software/config-tools/types';
|
|
4
4
|
import { getWorkspaceRoot } from '@stryke/fs/get-workspace-root';
|
|
@@ -91,7 +91,7 @@ async function handleResolveId(context, args, options = {}) {
|
|
|
91
91
|
args.importer
|
|
92
92
|
] : []
|
|
93
93
|
});
|
|
94
|
-
if (match(args.id, options.noExternal) || resolvedPath && context.fs.metadata[resolvedPath]?.
|
|
94
|
+
if (match(args.id, options.noExternal) || resolvedPath && context.fs.metadata[resolvedPath]?.type === "builtin") {
|
|
95
95
|
return void 0;
|
|
96
96
|
}
|
|
97
97
|
if (match(args.id, options.external) || args.id.startsWith("node:")) {
|
|
@@ -192,6 +192,7 @@ function createUnpluginFactory(variant, decorate) {
|
|
|
192
192
|
__name(writeBundle, "writeBundle");
|
|
193
193
|
const result = {
|
|
194
194
|
name: "powerlines",
|
|
195
|
+
api,
|
|
195
196
|
resolveId: {
|
|
196
197
|
filter: {
|
|
197
198
|
id: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { vite_default } from './chunk-
|
|
2
|
-
import { webpack_default } from './chunk-
|
|
1
|
+
import { vite_default } from './chunk-HLQGKQZY.js';
|
|
2
|
+
import { webpack_default } from './chunk-O2WB6QZ6.js';
|
|
3
3
|
import { defineNuxtModule, addVitePlugin, addWebpackPlugin } from '@nuxt/kit';
|
|
4
4
|
import '@nuxt/schema';
|
|
5
5
|
|