powerlines 0.30.3 → 0.30.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/babel-types.d.ts +292 -0
- package/dist/nuxt.cjs +1 -1
- package/dist/nuxt.js +1 -1
- package/package.json +2 -2
|
@@ -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 {};
|
package/dist/nuxt.cjs
CHANGED
package/dist/nuxt.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "powerlines",
|
|
3
|
-
"version": "0.30.
|
|
3
|
+
"version": "0.30.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The \"any framework\" framework that simplifies modern dev tool usage, generates virtual (or actual) code modules, and improves DX across the board.",
|
|
6
6
|
"repository": {
|
|
@@ -631,5 +631,5 @@
|
|
|
631
631
|
"undici-types": "^7.16.0"
|
|
632
632
|
},
|
|
633
633
|
"publishConfig": { "access": "public" },
|
|
634
|
-
"gitHead": "
|
|
634
|
+
"gitHead": "06488a5f1026e506b1e45e3cf15cca029908f02a"
|
|
635
635
|
}
|