ushman-characterize 0.4.0
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/AGENTS.md +110 -0
- package/CHANGELOG.md +41 -0
- package/LICENSE.md +21 -0
- package/README.md +193 -0
- package/bin/ushman-characterize +19 -0
- package/dist/babel-config.d.ts +7 -0
- package/dist/babel-config.d.ts.map +1 -0
- package/dist/babel-config.js +17 -0
- package/dist/capture-server.d.ts +31 -0
- package/dist/capture-server.d.ts.map +1 -0
- package/dist/capture-server.js +199 -0
- package/dist/capture.d.ts +97 -0
- package/dist/capture.d.ts.map +1 -0
- package/dist/capture.js +620 -0
- package/dist/cli/logger.d.ts +7 -0
- package/dist/cli/logger.d.ts.map +1 -0
- package/dist/cli/logger.js +14 -0
- package/dist/cli/parse-flags.d.ts +8 -0
- package/dist/cli/parse-flags.d.ts.map +1 -0
- package/dist/cli/parse-flags.js +60 -0
- package/dist/cli.d.ts +39 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +439 -0
- package/dist/constants.d.ts +20 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +19 -0
- package/dist/dedupe-contract.d.ts +26 -0
- package/dist/dedupe-contract.d.ts.map +1 -0
- package/dist/dedupe-contract.js +12 -0
- package/dist/default-export.d.ts +6 -0
- package/dist/default-export.d.ts.map +1 -0
- package/dist/default-export.js +52 -0
- package/dist/format-contract.d.ts +25 -0
- package/dist/format-contract.d.ts.map +1 -0
- package/dist/format-contract.js +96 -0
- package/dist/function-utils.d.ts +6 -0
- package/dist/function-utils.d.ts.map +1 -0
- package/dist/function-utils.js +22 -0
- package/dist/generate-replay.d.ts +18 -0
- package/dist/generate-replay.d.ts.map +1 -0
- package/dist/generate-replay.js +158 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/instrument.d.ts +39 -0
- package/dist/instrument.d.ts.map +1 -0
- package/dist/instrument.js +605 -0
- package/dist/ledger.d.ts +19 -0
- package/dist/ledger.d.ts.map +1 -0
- package/dist/ledger.js +50 -0
- package/dist/puppeteer-harness.d.ts +74 -0
- package/dist/puppeteer-harness.d.ts.map +1 -0
- package/dist/puppeteer-harness.js +248 -0
- package/dist/purity-classifier.d.ts +28 -0
- package/dist/purity-classifier.d.ts.map +1 -0
- package/dist/purity-classifier.js +363 -0
- package/dist/rebind.d.ts +26 -0
- package/dist/rebind.d.ts.map +1 -0
- package/dist/rebind.js +356 -0
- package/dist/replay-report.d.ts +18 -0
- package/dist/replay-report.d.ts.map +1 -0
- package/dist/replay-report.js +12 -0
- package/dist/scene.d.ts +24 -0
- package/dist/scene.d.ts.map +1 -0
- package/dist/scene.js +235 -0
- package/dist/schema-types.d.ts +40 -0
- package/dist/schema-types.d.ts.map +1 -0
- package/dist/schema-types.js +32 -0
- package/dist/seed-scaffolds.d.ts +31 -0
- package/dist/seed-scaffolds.d.ts.map +1 -0
- package/dist/seed-scaffolds.js +96 -0
- package/dist/shared.d.ts +36 -0
- package/dist/shared.d.ts.map +1 -0
- package/dist/shared.js +390 -0
- package/dist/state-dag.d.ts +5 -0
- package/dist/state-dag.d.ts.map +1 -0
- package/dist/state-dag.js +27 -0
- package/dist/stub-pure.d.ts +57 -0
- package/dist/stub-pure.d.ts.map +1 -0
- package/dist/stub-pure.js +987 -0
- package/dist/time.d.ts +3 -0
- package/dist/time.d.ts.map +1 -0
- package/dist/time.js +10 -0
- package/dist/trace-format.d.ts +24 -0
- package/dist/trace-format.d.ts.map +1 -0
- package/dist/trace-format.js +213 -0
- package/dist/trace-serializer.d.ts +94 -0
- package/dist/trace-serializer.d.ts.map +1 -0
- package/dist/trace-serializer.js +607 -0
- package/dist/tracer-runtime.d.ts +25 -0
- package/dist/tracer-runtime.d.ts.map +1 -0
- package/dist/tracer-runtime.js +291 -0
- package/dist/types.d.ts +13 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +0 -0
- package/dist/workspace-paths.d.ts +64 -0
- package/dist/workspace-paths.d.ts.map +1 -0
- package/dist/workspace-paths.js +288 -0
- package/package.json +86 -0
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
import * as t from '@babel/types';
|
|
2
|
+
import { isTrivialGetterLike } from "./function-utils.js";
|
|
3
|
+
import { parseBundleAst } from "./shared.js";
|
|
4
|
+
const DENIED_IDENTIFIER_READS = new Set([
|
|
5
|
+
'Date',
|
|
6
|
+
'XMLHttpRequest',
|
|
7
|
+
'crypto',
|
|
8
|
+
'document',
|
|
9
|
+
'fetch',
|
|
10
|
+
'localStorage',
|
|
11
|
+
'performance',
|
|
12
|
+
'sessionStorage',
|
|
13
|
+
'window',
|
|
14
|
+
]);
|
|
15
|
+
const MUTATING_METHOD_NAMES = new Set([
|
|
16
|
+
'add',
|
|
17
|
+
'clear',
|
|
18
|
+
'copyWithin',
|
|
19
|
+
'delete',
|
|
20
|
+
'fill',
|
|
21
|
+
'pop',
|
|
22
|
+
'push',
|
|
23
|
+
'remove',
|
|
24
|
+
'reverse',
|
|
25
|
+
'set',
|
|
26
|
+
'shift',
|
|
27
|
+
'sort',
|
|
28
|
+
'splice',
|
|
29
|
+
'unshift',
|
|
30
|
+
]);
|
|
31
|
+
const ALLOWED_GLOBAL_CALLS = new Set([
|
|
32
|
+
'Array.from',
|
|
33
|
+
'Array.isArray',
|
|
34
|
+
'JSON.parse',
|
|
35
|
+
'JSON.stringify',
|
|
36
|
+
'Number.isFinite',
|
|
37
|
+
'Number.isInteger',
|
|
38
|
+
'Object.assign',
|
|
39
|
+
'Object.entries',
|
|
40
|
+
'Object.freeze',
|
|
41
|
+
'Object.fromEntries',
|
|
42
|
+
'Object.keys',
|
|
43
|
+
'Object.values',
|
|
44
|
+
'String.raw',
|
|
45
|
+
]);
|
|
46
|
+
const isLiteralish = (value) => {
|
|
47
|
+
if (!value) {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
if (t.isBooleanLiteral(value) ||
|
|
51
|
+
t.isNullLiteral(value) ||
|
|
52
|
+
t.isNumericLiteral(value) ||
|
|
53
|
+
t.isRegExpLiteral(value) ||
|
|
54
|
+
t.isStringLiteral(value)) {
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
if (t.isIdentifier(value, { name: 'undefined' })) {
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
if (t.isArrayExpression(value)) {
|
|
61
|
+
return value.elements.every((entry) => entry !== null && isLiteralish(entry));
|
|
62
|
+
}
|
|
63
|
+
if (t.isObjectExpression(value)) {
|
|
64
|
+
return value.properties.every((property) => t.isObjectProperty(property) && !property.computed && isLiteralish(property.value));
|
|
65
|
+
}
|
|
66
|
+
return false;
|
|
67
|
+
};
|
|
68
|
+
const isFunctionLikeBinding = (binding) => t.isFunctionDeclaration(binding.path.node) ||
|
|
69
|
+
(t.isVariableDeclarator(binding.path.node) &&
|
|
70
|
+
(t.isArrowFunctionExpression(binding.path.node.init) || t.isFunctionExpression(binding.path.node.init)));
|
|
71
|
+
const isAllowedOuterRead = (binding) => binding.kind === 'module' ||
|
|
72
|
+
isFunctionLikeBinding(binding) ||
|
|
73
|
+
(binding.kind === 'const' && t.isVariableDeclarator(binding.path.node) && isLiteralish(binding.path.node.init));
|
|
74
|
+
const getMemberPath = (value) => {
|
|
75
|
+
if (t.isIdentifier(value)) {
|
|
76
|
+
return value.name;
|
|
77
|
+
}
|
|
78
|
+
if (!t.isMemberExpression(value) || value.computed || !t.isIdentifier(value.property)) {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
const objectPath = getMemberPath(value.object);
|
|
82
|
+
return objectPath ? `${objectPath}.${value.property.name}` : null;
|
|
83
|
+
};
|
|
84
|
+
const getAssignmentRootIdentifier = (value) => {
|
|
85
|
+
if (t.isIdentifier(value)) {
|
|
86
|
+
return value;
|
|
87
|
+
}
|
|
88
|
+
if (t.isTSAsExpression(value) ||
|
|
89
|
+
t.isTSSatisfiesExpression(value) ||
|
|
90
|
+
t.isTSNonNullExpression(value) ||
|
|
91
|
+
t.isTypeCastExpression(value)) {
|
|
92
|
+
return getAssignmentRootIdentifier(value.expression);
|
|
93
|
+
}
|
|
94
|
+
if (t.isMemberExpression(value) || t.isOptionalMemberExpression(value)) {
|
|
95
|
+
return getAssignmentRootIdentifier(value.object);
|
|
96
|
+
}
|
|
97
|
+
return null;
|
|
98
|
+
};
|
|
99
|
+
const resolveBinding = ({ identifier, scope, }) => (identifier ? scope.getBinding(identifier.name) : null);
|
|
100
|
+
const bindingWritesOuterState = ({ binding, functionScope, }) => Boolean(binding && binding.scope !== functionScope);
|
|
101
|
+
const isAllowedGlobalCall = (calleePath) => calleePath !== 'Math.random' && (calleePath.startsWith('Math.') || ALLOWED_GLOBAL_CALLS.has(calleePath));
|
|
102
|
+
const isDeniedGlobalPath = (calleePath) => [...DENIED_IDENTIFIER_READS].some((prefix) => calleePath === prefix || calleePath.startsWith(`${prefix}.`));
|
|
103
|
+
const isDeniedBuiltinCall = (calleePath) => calleePath === 'Math.random' || calleePath === 'Date.now' || calleePath === 'performance.now';
|
|
104
|
+
const isMutatingMemberCall = (callPath, functionScope) => {
|
|
105
|
+
const callee = callPath.node.callee;
|
|
106
|
+
if ((!t.isMemberExpression(callee) && !t.isOptionalMemberExpression(callee)) || !t.isIdentifier(callee.property)) {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
if (!MUTATING_METHOD_NAMES.has(callee.property.name)) {
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
return bindingWritesOuterState({
|
|
113
|
+
binding: resolveBinding({
|
|
114
|
+
identifier: getAssignmentRootIdentifier(callee.object),
|
|
115
|
+
scope: callPath.scope,
|
|
116
|
+
}),
|
|
117
|
+
functionScope,
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
const classifyIdentifierCall = ({ callee, callPath, functionPath, mark, }) => {
|
|
121
|
+
const binding = callPath.scope.getBinding(callee.name);
|
|
122
|
+
if (!binding) {
|
|
123
|
+
if (DENIED_IDENTIFIER_READS.has(callee.name)) {
|
|
124
|
+
mark('calls-denied-global');
|
|
125
|
+
callPath.stop();
|
|
126
|
+
}
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
if (binding.scope === functionPath.scope && !isFunctionLikeBinding(binding)) {
|
|
130
|
+
mark('calls-denied-global');
|
|
131
|
+
callPath.stop();
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
if (binding.scope !== functionPath.scope && !isAllowedOuterRead(binding)) {
|
|
135
|
+
mark('calls-denied-global');
|
|
136
|
+
callPath.stop();
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
const classifyCallExpression = ({ callPath, functionPath, mark, }) => {
|
|
140
|
+
const callee = callPath.node.callee;
|
|
141
|
+
const calleePath = getMemberPath(callee);
|
|
142
|
+
if (calleePath) {
|
|
143
|
+
if (isDeniedBuiltinCall(calleePath)) {
|
|
144
|
+
mark('calls-denied-global');
|
|
145
|
+
callPath.stop();
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
if (isAllowedGlobalCall(calleePath)) {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
if (isDeniedGlobalPath(calleePath)) {
|
|
152
|
+
mark('calls-denied-global');
|
|
153
|
+
callPath.stop();
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
if (isMutatingMemberCall(callPath, functionPath.scope)) {
|
|
158
|
+
mark('writes-outer-binding');
|
|
159
|
+
callPath.stop();
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
if (!t.isIdentifier(callee)) {
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
classifyIdentifierCall({
|
|
166
|
+
callee,
|
|
167
|
+
callPath,
|
|
168
|
+
functionPath,
|
|
169
|
+
mark,
|
|
170
|
+
});
|
|
171
|
+
};
|
|
172
|
+
const classifyIdentifierRead = ({ identifierPath, functionPath, mark, }) => {
|
|
173
|
+
if (!identifierPath.isReferencedIdentifier()) {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
if (DENIED_IDENTIFIER_READS.has(identifierPath.node.name)) {
|
|
177
|
+
mark('reads-denied-global');
|
|
178
|
+
identifierPath.stop();
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
const binding = identifierPath.scope.getBinding(identifierPath.node.name);
|
|
182
|
+
if (!binding || binding.scope === functionPath.scope || isAllowedOuterRead(binding)) {
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
mark('reads-mutable-outer-binding');
|
|
186
|
+
identifierPath.stop();
|
|
187
|
+
};
|
|
188
|
+
const classifyWrite = ({ functionPath, mark, targetPath, }) => {
|
|
189
|
+
if (!bindingWritesOuterState({
|
|
190
|
+
binding: resolveBinding({
|
|
191
|
+
identifier: getAssignmentRootIdentifier(targetPath.node),
|
|
192
|
+
scope: targetPath.scope,
|
|
193
|
+
}),
|
|
194
|
+
functionScope: functionPath.scope,
|
|
195
|
+
})) {
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
mark('writes-outer-binding');
|
|
199
|
+
targetPath.stop();
|
|
200
|
+
};
|
|
201
|
+
const classifyPurity = ({ path }) => {
|
|
202
|
+
if (path.node.async || path.node.generator) {
|
|
203
|
+
return 'async-or-generator';
|
|
204
|
+
}
|
|
205
|
+
let reason = null;
|
|
206
|
+
const mark = (value) => {
|
|
207
|
+
if (!reason) {
|
|
208
|
+
reason = value;
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
path.traverse({
|
|
212
|
+
AssignmentExpression(inner) {
|
|
213
|
+
classifyWrite({
|
|
214
|
+
functionPath: path,
|
|
215
|
+
mark,
|
|
216
|
+
targetPath: inner.get('left'),
|
|
217
|
+
});
|
|
218
|
+
},
|
|
219
|
+
AwaitExpression(inner) {
|
|
220
|
+
mark('async-or-generator');
|
|
221
|
+
inner.stop();
|
|
222
|
+
},
|
|
223
|
+
CallExpression(inner) {
|
|
224
|
+
classifyCallExpression({
|
|
225
|
+
callPath: inner,
|
|
226
|
+
functionPath: path,
|
|
227
|
+
mark,
|
|
228
|
+
});
|
|
229
|
+
},
|
|
230
|
+
Identifier(inner) {
|
|
231
|
+
classifyIdentifierRead({
|
|
232
|
+
functionPath: path,
|
|
233
|
+
identifierPath: inner,
|
|
234
|
+
mark,
|
|
235
|
+
});
|
|
236
|
+
},
|
|
237
|
+
ThrowStatement(inner) {
|
|
238
|
+
const argument = inner.node.argument;
|
|
239
|
+
if (t.isNewExpression(argument) &&
|
|
240
|
+
t.isIdentifier(argument.callee) &&
|
|
241
|
+
/Error$/u.test(argument.callee.name)) {
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
mark('throws-non-error');
|
|
245
|
+
inner.stop();
|
|
246
|
+
},
|
|
247
|
+
UnaryExpression(inner) {
|
|
248
|
+
if (inner.node.operator !== 'delete') {
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
const target = inner.get('argument');
|
|
252
|
+
if (!target.isExpression()) {
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
classifyWrite({
|
|
256
|
+
functionPath: path,
|
|
257
|
+
mark,
|
|
258
|
+
targetPath: target,
|
|
259
|
+
});
|
|
260
|
+
},
|
|
261
|
+
UpdateExpression(inner) {
|
|
262
|
+
const target = inner.get('argument');
|
|
263
|
+
if (!target.isExpression()) {
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
classifyWrite({
|
|
267
|
+
functionPath: path,
|
|
268
|
+
mark,
|
|
269
|
+
targetPath: target,
|
|
270
|
+
});
|
|
271
|
+
},
|
|
272
|
+
});
|
|
273
|
+
return reason;
|
|
274
|
+
};
|
|
275
|
+
const visitClassMethods = ({ bundle, skippedForTracing, }) => {
|
|
276
|
+
let totalTopLevelFunctions = 0;
|
|
277
|
+
const collectClassMethod = ({ className, memberPath, }) => {
|
|
278
|
+
if (memberPath.node.kind !== 'method') {
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
const memberName = t.isIdentifier(memberPath.node.key) && !memberPath.node.computed ? memberPath.node.key.name : null;
|
|
282
|
+
if (!memberName) {
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
totalTopLevelFunctions += 1;
|
|
286
|
+
if (isTrivialGetterLike(memberPath.node)) {
|
|
287
|
+
skippedForTracing.add(`${className}.${memberName}`);
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
bundle.programPath.traverse({
|
|
291
|
+
ClassDeclaration(path) {
|
|
292
|
+
const className = path.node.id?.name;
|
|
293
|
+
if (!className) {
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
for (const memberPath of path.get('body.body')) {
|
|
297
|
+
if (!memberPath.isClassMethod()) {
|
|
298
|
+
continue;
|
|
299
|
+
}
|
|
300
|
+
collectClassMethod({
|
|
301
|
+
className,
|
|
302
|
+
memberPath,
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
});
|
|
307
|
+
return totalTopLevelFunctions;
|
|
308
|
+
};
|
|
309
|
+
export const classifyPureTopLevelFunctionsFromBundle = (bundle) => {
|
|
310
|
+
const pureFunctions = [];
|
|
311
|
+
const impureFunctions = [];
|
|
312
|
+
const skippedForTracing = new Set();
|
|
313
|
+
let totalTopLevelFunctions = visitClassMethods({
|
|
314
|
+
bundle,
|
|
315
|
+
skippedForTracing,
|
|
316
|
+
});
|
|
317
|
+
bundle.programPath.traverse({
|
|
318
|
+
FunctionDeclaration(path) {
|
|
319
|
+
const directParent = path.parentPath;
|
|
320
|
+
const isTopLevel = directParent === bundle.programPath ||
|
|
321
|
+
((directParent?.isExportNamedDeclaration() || directParent?.isExportDefaultDeclaration()) &&
|
|
322
|
+
directParent.parentPath === bundle.programPath);
|
|
323
|
+
const name = path.node.id?.name;
|
|
324
|
+
if (!name || !isTopLevel) {
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
totalTopLevelFunctions += 1;
|
|
328
|
+
if (isTrivialGetterLike(path.node)) {
|
|
329
|
+
skippedForTracing.add(name);
|
|
330
|
+
}
|
|
331
|
+
const reason = classifyPurity({
|
|
332
|
+
path,
|
|
333
|
+
});
|
|
334
|
+
if (reason) {
|
|
335
|
+
impureFunctions.push({
|
|
336
|
+
name,
|
|
337
|
+
reason,
|
|
338
|
+
});
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
pureFunctions.push({
|
|
342
|
+
arity: path.node.params.length,
|
|
343
|
+
bindingName: name,
|
|
344
|
+
kind: 'function',
|
|
345
|
+
name,
|
|
346
|
+
parameterNames: path.node.params.map((parameter, index) => t.isIdentifier(parameter) ? parameter.name : `arg${index}`),
|
|
347
|
+
});
|
|
348
|
+
},
|
|
349
|
+
});
|
|
350
|
+
return {
|
|
351
|
+
impureFunctions,
|
|
352
|
+
pureFunctions,
|
|
353
|
+
skippedForTracing: [...skippedForTracing].sort((left, right) => left.localeCompare(right)),
|
|
354
|
+
totalTopLevelFunctions,
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
/**
|
|
358
|
+
* Classify top-level function declarations into conservative pure/impure buckets.
|
|
359
|
+
*/
|
|
360
|
+
export const classifyPureTopLevelFunctions = ({ source, sourcePath, }) => classifyPureTopLevelFunctionsFromBundle(parseBundleAst({
|
|
361
|
+
source,
|
|
362
|
+
sourcePath,
|
|
363
|
+
}));
|
package/dist/rebind.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
type RebindPreview = {
|
|
2
|
+
readonly after: string;
|
|
3
|
+
readonly before: string;
|
|
4
|
+
readonly filePath: string;
|
|
5
|
+
};
|
|
6
|
+
type ParsedRebindMapping = {
|
|
7
|
+
readonly selector: string;
|
|
8
|
+
readonly symbol: string;
|
|
9
|
+
readonly target: string;
|
|
10
|
+
readonly workspaceModule: null | string;
|
|
11
|
+
};
|
|
12
|
+
export declare const parseRebindMapping: (pair: string) => ParsedRebindMapping;
|
|
13
|
+
/**
|
|
14
|
+
* Rewrite generated replay imports to point at extracted source modules.
|
|
15
|
+
*/
|
|
16
|
+
export declare const rewriteReplayImports: ({ dryRun, mappings, workspaceRoot, yes, }: {
|
|
17
|
+
readonly dryRun?: boolean;
|
|
18
|
+
readonly mappings: ReadonlyMap<string, string>;
|
|
19
|
+
readonly workspaceRoot: string;
|
|
20
|
+
readonly yes?: boolean;
|
|
21
|
+
}) => Promise<{
|
|
22
|
+
files: string[];
|
|
23
|
+
previews: RebindPreview[];
|
|
24
|
+
}>;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=rebind.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rebind.d.ts","sourceRoot":"","sources":["../src/rebind.ts"],"names":[],"mappings":"AAUA,KAAK,aAAa,GAAG;IACjB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,KAAK,mBAAmB,GAAG;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,eAAe,EAAE,IAAI,GAAG,MAAM,CAAC;CAC3C,CAAC;AAkFF,eAAO,MAAM,kBAAkB,GAAI,MAAM,MAAM,KAAG,mBAWjD,CAAC;AAkWF;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAU,2CAKxC;IACC,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/C,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC;CAC1B;;;EAqEA,CAAC"}
|