@storm-software/workspace-tools 1.68.10 → 1.69.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/CHANGELOG.md +24 -0
- package/index.js +203 -133
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/base/index.js +9 -2
- package/src/generators/browser-library/generator.js +9 -2
- package/src/generators/neutral-library/generator.js +9 -2
- package/src/generators/node-library/generator.js +9 -2
- package/src/generators/release-version/generator.js +52 -11
- package/src/utils/index.js +103 -81
package/src/utils/index.js
CHANGED
|
@@ -8732,7 +8732,7 @@ var require_source_map_consumer = __commonJS({
|
|
|
8732
8732
|
}
|
|
8733
8733
|
var version2 = util2.getArg(sourceMap, "version");
|
|
8734
8734
|
var sources = util2.getArg(sourceMap, "sources");
|
|
8735
|
-
var
|
|
8735
|
+
var names2 = util2.getArg(sourceMap, "names", []);
|
|
8736
8736
|
var sourceRoot = util2.getArg(sourceMap, "sourceRoot", null);
|
|
8737
8737
|
var sourcesContent = util2.getArg(sourceMap, "sourcesContent", null);
|
|
8738
8738
|
var mappings = util2.getArg(sourceMap, "mappings");
|
|
@@ -8746,7 +8746,7 @@ var require_source_map_consumer = __commonJS({
|
|
|
8746
8746
|
sources = sources.map(String).map(util2.normalize).map(function(source) {
|
|
8747
8747
|
return sourceRoot && util2.isAbsolute(sourceRoot) && util2.isAbsolute(source) ? util2.relative(sourceRoot, source) : source;
|
|
8748
8748
|
});
|
|
8749
|
-
this._names = ArraySet.fromArray(
|
|
8749
|
+
this._names = ArraySet.fromArray(names2.map(String), true);
|
|
8750
8750
|
this._sources = ArraySet.fromArray(sources, true);
|
|
8751
8751
|
this._absoluteSources = this._sources.toArray().map(function(s) {
|
|
8752
8752
|
return util2.computeSourceURL(sourceRoot, s, aSourceMapURL);
|
|
@@ -8777,7 +8777,7 @@ var require_source_map_consumer = __commonJS({
|
|
|
8777
8777
|
};
|
|
8778
8778
|
BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {
|
|
8779
8779
|
var smc = Object.create(BasicSourceMapConsumer.prototype);
|
|
8780
|
-
var
|
|
8780
|
+
var names2 = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
|
|
8781
8781
|
var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
|
|
8782
8782
|
smc.sourceRoot = aSourceMap._sourceRoot;
|
|
8783
8783
|
smc.sourcesContent = aSourceMap._generateSourcesContent(
|
|
@@ -8802,7 +8802,7 @@ var require_source_map_consumer = __commonJS({
|
|
|
8802
8802
|
destMapping.originalLine = srcMapping.originalLine;
|
|
8803
8803
|
destMapping.originalColumn = srcMapping.originalColumn;
|
|
8804
8804
|
if (srcMapping.name) {
|
|
8805
|
-
destMapping.name =
|
|
8805
|
+
destMapping.name = names2.indexOf(srcMapping.name);
|
|
8806
8806
|
}
|
|
8807
8807
|
destOriginalMappings.push(destMapping);
|
|
8808
8808
|
}
|
|
@@ -10814,8 +10814,8 @@ var require_typescript = __commonJS({
|
|
|
10814
10814
|
function getAllKeys(obj) {
|
|
10815
10815
|
const result = [];
|
|
10816
10816
|
do {
|
|
10817
|
-
const
|
|
10818
|
-
for (const name of
|
|
10817
|
+
const names2 = Object.getOwnPropertyNames(obj);
|
|
10818
|
+
for (const name of names2) {
|
|
10819
10819
|
pushIfUnique(result, name);
|
|
10820
10820
|
}
|
|
10821
10821
|
} while (obj = Object.getPrototypeOf(obj));
|
|
@@ -23447,11 +23447,11 @@ ${lanes.join("\n")}
|
|
|
23447
23447
|
function typeDirectiveIsEqualTo(oldResolution, newResolution) {
|
|
23448
23448
|
return oldResolution === newResolution || oldResolution.resolvedTypeReferenceDirective === newResolution.resolvedTypeReferenceDirective || !!oldResolution.resolvedTypeReferenceDirective && !!newResolution.resolvedTypeReferenceDirective && oldResolution.resolvedTypeReferenceDirective.resolvedFileName === newResolution.resolvedTypeReferenceDirective.resolvedFileName && !!oldResolution.resolvedTypeReferenceDirective.primary === !!newResolution.resolvedTypeReferenceDirective.primary && oldResolution.resolvedTypeReferenceDirective.originalPath === newResolution.resolvedTypeReferenceDirective.originalPath;
|
|
23449
23449
|
}
|
|
23450
|
-
function hasChangesInResolutions(
|
|
23451
|
-
Debug.assert(
|
|
23452
|
-
for (let i = 0; i <
|
|
23450
|
+
function hasChangesInResolutions(names2, newResolutions, getOldResolution, comparer) {
|
|
23451
|
+
Debug.assert(names2.length === newResolutions.length);
|
|
23452
|
+
for (let i = 0; i < names2.length; i++) {
|
|
23453
23453
|
const newResolution = newResolutions[i];
|
|
23454
|
-
const entry =
|
|
23454
|
+
const entry = names2[i];
|
|
23455
23455
|
const oldResolution = getOldResolution(entry);
|
|
23456
23456
|
const changed = oldResolution ? !newResolution || !comparer(oldResolution, newResolution) : newResolution;
|
|
23457
23457
|
if (changed) {
|
|
@@ -81514,15 +81514,15 @@ ${lanes.join("\n")}
|
|
|
81514
81514
|
}
|
|
81515
81515
|
function getPropertiesOfContext(context) {
|
|
81516
81516
|
if (!context.resolvedProperties) {
|
|
81517
|
-
const
|
|
81517
|
+
const names2 = /* @__PURE__ */ new Map();
|
|
81518
81518
|
for (const t of getSiblingsOfContext(context)) {
|
|
81519
81519
|
if (isObjectLiteralType2(t) && !(getObjectFlags(t) & 2097152)) {
|
|
81520
81520
|
for (const prop of getPropertiesOfType(t)) {
|
|
81521
|
-
|
|
81521
|
+
names2.set(prop.escapedName, prop);
|
|
81522
81522
|
}
|
|
81523
81523
|
}
|
|
81524
81524
|
}
|
|
81525
|
-
context.resolvedProperties = arrayFrom(
|
|
81525
|
+
context.resolvedProperties = arrayFrom(names2.values());
|
|
81526
81526
|
}
|
|
81527
81527
|
return context.resolvedProperties;
|
|
81528
81528
|
}
|
|
@@ -89580,7 +89580,7 @@ ${lanes.join("\n")}
|
|
|
89580
89580
|
}
|
|
89581
89581
|
const types = [];
|
|
89582
89582
|
const flags = [];
|
|
89583
|
-
const
|
|
89583
|
+
const names2 = [];
|
|
89584
89584
|
for (let i = index; i < argCount; i++) {
|
|
89585
89585
|
const arg = args[i];
|
|
89586
89586
|
if (isSpreadArgument(arg)) {
|
|
@@ -89618,12 +89618,12 @@ ${lanes.join("\n")}
|
|
|
89618
89618
|
);
|
|
89619
89619
|
}
|
|
89620
89620
|
if (arg.kind === 237 && arg.tupleNameSource) {
|
|
89621
|
-
|
|
89621
|
+
names2.push(arg.tupleNameSource);
|
|
89622
89622
|
} else {
|
|
89623
|
-
|
|
89623
|
+
names2.push(void 0);
|
|
89624
89624
|
}
|
|
89625
89625
|
}
|
|
89626
|
-
return createTupleType(types, flags, inConstContext && !someType(restType, isMutableArrayLikeType),
|
|
89626
|
+
return createTupleType(types, flags, inConstContext && !someType(restType, isMutableArrayLikeType), names2);
|
|
89627
89627
|
}
|
|
89628
89628
|
function checkTypeArguments(signature, typeArgumentNodes, reportErrors2, headMessage) {
|
|
89629
89629
|
const isJavascript = isInJSFile(signature.declaration);
|
|
@@ -91923,7 +91923,7 @@ ${lanes.join("\n")}
|
|
|
91923
91923
|
}
|
|
91924
91924
|
const types = [];
|
|
91925
91925
|
const flags = [];
|
|
91926
|
-
const
|
|
91926
|
+
const names2 = [];
|
|
91927
91927
|
for (let i = pos; i < parameterCount; i++) {
|
|
91928
91928
|
if (!restType || i < parameterCount - 1) {
|
|
91929
91929
|
types.push(getTypeAtPosition(source, i));
|
|
@@ -91938,9 +91938,9 @@ ${lanes.join("\n")}
|
|
|
91938
91938
|
/* Variadic */
|
|
91939
91939
|
);
|
|
91940
91940
|
}
|
|
91941
|
-
|
|
91941
|
+
names2.push(getNameableDeclarationAtPosition(source, i));
|
|
91942
91942
|
}
|
|
91943
|
-
return createTupleType(types, flags, readonly,
|
|
91943
|
+
return createTupleType(types, flags, readonly, names2);
|
|
91944
91944
|
}
|
|
91945
91945
|
function getRestOrAnyTypeAtPosition(source, pos) {
|
|
91946
91946
|
const restType = getRestTypeAtPosition(source, pos);
|
|
@@ -95194,28 +95194,28 @@ ${lanes.join("\n")}
|
|
|
95194
95194
|
}
|
|
95195
95195
|
const isPrivate = isPrivateIdentifier(name);
|
|
95196
95196
|
const privateStaticFlags = isPrivate && isStaticMember ? 16 : 0;
|
|
95197
|
-
const
|
|
95197
|
+
const names2 = isPrivate ? privateIdentifiers : isStaticMember ? staticNames : instanceNames;
|
|
95198
95198
|
const memberName = name && getEffectivePropertyNameForPropertyNameNode(name);
|
|
95199
95199
|
if (memberName) {
|
|
95200
95200
|
switch (member.kind) {
|
|
95201
95201
|
case 177:
|
|
95202
|
-
addName(
|
|
95202
|
+
addName(names2, name, memberName, 1 | privateStaticFlags);
|
|
95203
95203
|
break;
|
|
95204
95204
|
case 178:
|
|
95205
|
-
addName(
|
|
95205
|
+
addName(names2, name, memberName, 2 | privateStaticFlags);
|
|
95206
95206
|
break;
|
|
95207
95207
|
case 172:
|
|
95208
|
-
addName(
|
|
95208
|
+
addName(names2, name, memberName, 3 | privateStaticFlags);
|
|
95209
95209
|
break;
|
|
95210
95210
|
case 174:
|
|
95211
|
-
addName(
|
|
95211
|
+
addName(names2, name, memberName, 8 | privateStaticFlags);
|
|
95212
95212
|
break;
|
|
95213
95213
|
}
|
|
95214
95214
|
}
|
|
95215
95215
|
}
|
|
95216
95216
|
}
|
|
95217
|
-
function addName(
|
|
95218
|
-
const prev =
|
|
95217
|
+
function addName(names2, location, name, meaning) {
|
|
95218
|
+
const prev = names2.get(name);
|
|
95219
95219
|
if (prev) {
|
|
95220
95220
|
if ((prev & 16) !== (meaning & 16)) {
|
|
95221
95221
|
error2(location, Diagnostics.Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name, getTextOfNode(location));
|
|
@@ -95229,11 +95229,11 @@ ${lanes.join("\n")}
|
|
|
95229
95229
|
} else if (prev & meaning & ~16) {
|
|
95230
95230
|
error2(location, Diagnostics.Duplicate_identifier_0, getTextOfNode(location));
|
|
95231
95231
|
} else {
|
|
95232
|
-
|
|
95232
|
+
names2.set(name, prev | meaning);
|
|
95233
95233
|
}
|
|
95234
95234
|
}
|
|
95235
95235
|
} else {
|
|
95236
|
-
|
|
95236
|
+
names2.set(name, meaning);
|
|
95237
95237
|
}
|
|
95238
95238
|
}
|
|
95239
95239
|
}
|
|
@@ -95261,7 +95261,7 @@ ${lanes.join("\n")}
|
|
|
95261
95261
|
}
|
|
95262
95262
|
}
|
|
95263
95263
|
function checkObjectTypeForDuplicateDeclarations(node) {
|
|
95264
|
-
const
|
|
95264
|
+
const names2 = /* @__PURE__ */ new Map();
|
|
95265
95265
|
for (const member of node.members) {
|
|
95266
95266
|
if (member.kind === 171) {
|
|
95267
95267
|
let memberName;
|
|
@@ -95277,11 +95277,11 @@ ${lanes.join("\n")}
|
|
|
95277
95277
|
default:
|
|
95278
95278
|
continue;
|
|
95279
95279
|
}
|
|
95280
|
-
if (
|
|
95280
|
+
if (names2.get(memberName)) {
|
|
95281
95281
|
error2(getNameOfDeclaration(member.symbol.valueDeclaration), Diagnostics.Duplicate_identifier_0, memberName);
|
|
95282
95282
|
error2(member.name, Diagnostics.Duplicate_identifier_0, memberName);
|
|
95283
95283
|
} else {
|
|
95284
|
-
|
|
95284
|
+
names2.set(memberName, true);
|
|
95285
95285
|
}
|
|
95286
95286
|
}
|
|
95287
95287
|
}
|
|
@@ -106517,7 +106517,7 @@ ${lanes.join("\n")}
|
|
|
106517
106517
|
var sources = [];
|
|
106518
106518
|
var sourceToSourceIndexMap = /* @__PURE__ */ new Map();
|
|
106519
106519
|
var sourcesContent;
|
|
106520
|
-
var
|
|
106520
|
+
var names2 = [];
|
|
106521
106521
|
var nameToNameIndexMap;
|
|
106522
106522
|
var mappingCharCodes = [];
|
|
106523
106523
|
var mappings = "";
|
|
@@ -106585,8 +106585,8 @@ ${lanes.join("\n")}
|
|
|
106585
106585
|
nameToNameIndexMap = /* @__PURE__ */ new Map();
|
|
106586
106586
|
let nameIndex = nameToNameIndexMap.get(name);
|
|
106587
106587
|
if (nameIndex === void 0) {
|
|
106588
|
-
nameIndex =
|
|
106589
|
-
|
|
106588
|
+
nameIndex = names2.length;
|
|
106589
|
+
names2.push(name);
|
|
106590
106590
|
nameToNameIndexMap.set(name, nameIndex);
|
|
106591
106591
|
}
|
|
106592
106592
|
exit();
|
|
@@ -106736,7 +106736,7 @@ ${lanes.join("\n")}
|
|
|
106736
106736
|
file,
|
|
106737
106737
|
sourceRoot,
|
|
106738
106738
|
sources,
|
|
106739
|
-
names,
|
|
106739
|
+
names: names2,
|
|
106740
106740
|
mappings,
|
|
106741
106741
|
sourcesContent
|
|
106742
106742
|
};
|
|
@@ -116018,13 +116018,13 @@ ${lanes.join("\n")}
|
|
|
116018
116018
|
functionFlags & 2 ? transformAsyncFunctionBody(node, parameters) : visitFunctionBody(node.body, visitor, context)
|
|
116019
116019
|
);
|
|
116020
116020
|
}
|
|
116021
|
-
function recordDeclarationName({ name },
|
|
116021
|
+
function recordDeclarationName({ name }, names2) {
|
|
116022
116022
|
if (isIdentifier(name)) {
|
|
116023
|
-
|
|
116023
|
+
names2.add(name.escapedText);
|
|
116024
116024
|
} else {
|
|
116025
116025
|
for (const element of name.elements) {
|
|
116026
116026
|
if (!isOmittedExpression(element)) {
|
|
116027
|
-
recordDeclarationName(element,
|
|
116027
|
+
recordDeclarationName(element, names2);
|
|
116028
116028
|
}
|
|
116029
116029
|
}
|
|
116030
116030
|
}
|
|
@@ -116459,10 +116459,10 @@ ${lanes.join("\n")}
|
|
|
116459
116459
|
}
|
|
116460
116460
|
}
|
|
116461
116461
|
}
|
|
116462
|
-
function createSuperAccessVariableStatement(factory2, resolver, node,
|
|
116462
|
+
function createSuperAccessVariableStatement(factory2, resolver, node, names2) {
|
|
116463
116463
|
const hasBinding = (resolver.getNodeCheckFlags(node) & 256) !== 0;
|
|
116464
116464
|
const accessors = [];
|
|
116465
|
-
|
|
116465
|
+
names2.forEach((_, key) => {
|
|
116466
116466
|
const name = unescapeLeadingUnderscores(key);
|
|
116467
116467
|
const getterAndSetter = [];
|
|
116468
116468
|
getterAndSetter.push(factory2.createPropertyAssignment(
|
|
@@ -152931,13 +152931,13 @@ ${lanes.join("\n")}
|
|
|
152931
152931
|
}
|
|
152932
152932
|
const isDefault = exportKind === 1;
|
|
152933
152933
|
const namedSymbol = isDefault && getLocalSymbolForExportDefault(symbol) || symbol;
|
|
152934
|
-
const
|
|
152934
|
+
const names2 = exportKind === 0 || isExternalModuleSymbol(namedSymbol) ? unescapeLeadingUnderscores(symbolTableKey) : getNamesForExportedSymbol(
|
|
152935
152935
|
namedSymbol,
|
|
152936
152936
|
/*scriptTarget*/
|
|
152937
152937
|
void 0
|
|
152938
152938
|
);
|
|
152939
|
-
const symbolName2 = typeof
|
|
152940
|
-
const capitalizedSymbolName = typeof
|
|
152939
|
+
const symbolName2 = typeof names2 === "string" ? names2 : names2[0];
|
|
152940
|
+
const capitalizedSymbolName = typeof names2 === "string" ? void 0 : names2[1];
|
|
152941
152941
|
const moduleName = stripQuotes(moduleSymbol.name);
|
|
152942
152942
|
const id = exportInfoId++;
|
|
152943
152943
|
const target = skipAlias(symbol, checker);
|
|
@@ -156633,21 +156633,21 @@ ${lanes.join("\n")}
|
|
|
156633
156633
|
endNode();
|
|
156634
156634
|
}
|
|
156635
156635
|
function startNestedNodes(targetNode, entityName) {
|
|
156636
|
-
const
|
|
156636
|
+
const names2 = [];
|
|
156637
156637
|
while (!isPropertyNameLiteral(entityName)) {
|
|
156638
156638
|
const name = getNameOrArgument(entityName);
|
|
156639
156639
|
const nameText = getElementOrPropertyAccessName(entityName);
|
|
156640
156640
|
entityName = entityName.expression;
|
|
156641
156641
|
if (nameText === "prototype" || isPrivateIdentifier(name))
|
|
156642
156642
|
continue;
|
|
156643
|
-
|
|
156643
|
+
names2.push(name);
|
|
156644
156644
|
}
|
|
156645
|
-
|
|
156646
|
-
for (let i =
|
|
156647
|
-
const name =
|
|
156645
|
+
names2.push(entityName);
|
|
156646
|
+
for (let i = names2.length - 1; i > 0; i--) {
|
|
156647
|
+
const name = names2[i];
|
|
156648
156648
|
startNode(targetNode, name);
|
|
156649
156649
|
}
|
|
156650
|
-
return [
|
|
156650
|
+
return [names2.length - 1, names2[0]];
|
|
156651
156651
|
}
|
|
156652
156652
|
function startNode(node, name) {
|
|
156653
156653
|
const navNode = emptyNavigationBarNode(node, name);
|
|
@@ -159165,9 +159165,9 @@ ${lanes.join("\n")}
|
|
|
159165
159165
|
if (!isExpressionStatement(decl))
|
|
159166
159166
|
changes.insertExportModifier(sourceFile, decl);
|
|
159167
159167
|
} else {
|
|
159168
|
-
const
|
|
159169
|
-
if (
|
|
159170
|
-
changes.insertNodesAfter(sourceFile, decl,
|
|
159168
|
+
const names2 = getNamesToExportInCommonJS(decl);
|
|
159169
|
+
if (names2.length !== 0)
|
|
159170
|
+
changes.insertNodesAfter(sourceFile, decl, names2.map(createExportAssignment));
|
|
159171
159171
|
}
|
|
159172
159172
|
}
|
|
159173
159173
|
function createNewFileName(oldFile, program, host, toMove) {
|
|
@@ -160250,10 +160250,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
160250
160250
|
function getGroupedReferences(functionDeclaration, program, cancellationToken) {
|
|
160251
160251
|
const functionNames = getFunctionNames(functionDeclaration);
|
|
160252
160252
|
const classNames = isConstructorDeclaration(functionDeclaration) ? getClassNames(functionDeclaration) : [];
|
|
160253
|
-
const
|
|
160253
|
+
const names2 = deduplicate([...functionNames, ...classNames], equateValues);
|
|
160254
160254
|
const checker = program.getTypeChecker();
|
|
160255
160255
|
const references = flatMap(
|
|
160256
|
-
|
|
160256
|
+
names2,
|
|
160257
160257
|
/*mapfn*/
|
|
160258
160258
|
(name) => ts_FindAllReferences_exports.getReferenceEntriesForNode(-1, name, program, program.getSourceFiles(), cancellationToken)
|
|
160259
160259
|
);
|
|
@@ -160261,7 +160261,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
160261
160261
|
if (!every(
|
|
160262
160262
|
groupedReferences.declarations,
|
|
160263
160263
|
/*callback*/
|
|
160264
|
-
(decl) => contains(
|
|
160264
|
+
(decl) => contains(names2, decl)
|
|
160265
160265
|
)) {
|
|
160266
160266
|
groupedReferences.valid = false;
|
|
160267
160267
|
}
|
|
@@ -171780,7 +171780,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
171780
171780
|
const predicate = (node) => isExportDeclaration(node) && (isTypeOnly && node.isTypeOnly || !node.isTypeOnly);
|
|
171781
171781
|
return findLast(sourceFile.statements, predicate);
|
|
171782
171782
|
}
|
|
171783
|
-
function updateExport(changes, program, sourceFile, node,
|
|
171783
|
+
function updateExport(changes, program, sourceFile, node, names2) {
|
|
171784
171784
|
const namedExports = node.exportClause && isNamedExports(node.exportClause) ? node.exportClause.elements : factory.createNodeArray([]);
|
|
171785
171785
|
const allowTypeModifier = !node.isTypeOnly && !!(getIsolatedModules(program.getCompilerOptions()) || find(namedExports, (e) => e.isTypeOnly));
|
|
171786
171786
|
changes.replaceNode(
|
|
@@ -171792,7 +171792,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
171792
171792
|
node.isTypeOnly,
|
|
171793
171793
|
factory.createNamedExports(
|
|
171794
171794
|
factory.createNodeArray(
|
|
171795
|
-
[...namedExports, ...createExportSpecifiers(
|
|
171795
|
+
[...namedExports, ...createExportSpecifiers(names2, allowTypeModifier)],
|
|
171796
171796
|
/*hasTrailingComma*/
|
|
171797
171797
|
namedExports.hasTrailingComma
|
|
171798
171798
|
)
|
|
@@ -171802,14 +171802,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
171802
171802
|
)
|
|
171803
171803
|
);
|
|
171804
171804
|
}
|
|
171805
|
-
function createExport(changes, program, sourceFile,
|
|
171805
|
+
function createExport(changes, program, sourceFile, names2) {
|
|
171806
171806
|
changes.insertNodeAtEndOfScope(sourceFile, sourceFile, factory.createExportDeclaration(
|
|
171807
171807
|
/*modifiers*/
|
|
171808
171808
|
void 0,
|
|
171809
171809
|
/*isTypeOnly*/
|
|
171810
171810
|
false,
|
|
171811
171811
|
factory.createNamedExports(createExportSpecifiers(
|
|
171812
|
-
|
|
171812
|
+
names2,
|
|
171813
171813
|
/*allowTypeModifier*/
|
|
171814
171814
|
getIsolatedModules(program.getCompilerOptions())
|
|
171815
171815
|
)),
|
|
@@ -171819,8 +171819,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
171819
171819
|
void 0
|
|
171820
171820
|
));
|
|
171821
171821
|
}
|
|
171822
|
-
function createExportSpecifiers(
|
|
171823
|
-
return factory.createNodeArray(map(
|
|
171822
|
+
function createExportSpecifiers(names2, allowTypeModifier) {
|
|
171823
|
+
return factory.createNodeArray(map(names2, (n) => factory.createExportSpecifier(
|
|
171824
171824
|
allowTypeModifier && n.isTypeOnly,
|
|
171825
171825
|
/*propertyName*/
|
|
171826
171826
|
void 0,
|
|
@@ -173886,13 +173886,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
173886
173886
|
return void 0;
|
|
173887
173887
|
const sourceFile = context.sourceFile;
|
|
173888
173888
|
const tags = getJSDocTags(signature);
|
|
173889
|
-
const
|
|
173889
|
+
const names2 = /* @__PURE__ */ new Set();
|
|
173890
173890
|
for (const tag of tags) {
|
|
173891
173891
|
if (isJSDocParameterTag(tag) && isIdentifier(tag.name)) {
|
|
173892
|
-
|
|
173892
|
+
names2.add(tag.name.escapedText);
|
|
173893
173893
|
}
|
|
173894
173894
|
}
|
|
173895
|
-
const parameterName = firstDefined(signature.parameters, (p) => isIdentifier(p.name) && !
|
|
173895
|
+
const parameterName = firstDefined(signature.parameters, (p) => isIdentifier(p.name) && !names2.has(p.name.escapedText) ? p.name.getText(sourceFile) : void 0);
|
|
173896
173896
|
if (parameterName === void 0)
|
|
173897
173897
|
return void 0;
|
|
173898
173898
|
const newJSDocParameterTag = factory.updateJSDocParameterTag(
|
|
@@ -176245,7 +176245,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
176245
176245
|
const isJs = isInJSFile(contextNode);
|
|
176246
176246
|
const { typeArguments, arguments: args, parent: parent2 } = call;
|
|
176247
176247
|
const contextualType = isJs ? void 0 : checker.getContextualType(call);
|
|
176248
|
-
const
|
|
176248
|
+
const names2 = map(args, (arg) => isIdentifier(arg) ? arg.text : isPropertyAccessExpression(arg) && isIdentifier(arg.name) ? arg.name.text : void 0);
|
|
176249
176249
|
const instanceTypes = isJs ? [] : map(args, (arg) => checker.getTypeAtLocation(arg));
|
|
176250
176250
|
const { argumentTypeNodes, argumentTypeParameters } = getArgumentTypesAndTypeParameters(
|
|
176251
176251
|
checker,
|
|
@@ -176264,7 +176264,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
176264
176264
|
const typeParameters = isJs ? void 0 : createTypeParametersForArguments(checker, argumentTypeParameters, typeArguments);
|
|
176265
176265
|
const parameters = createDummyParameters(
|
|
176266
176266
|
args.length,
|
|
176267
|
-
|
|
176267
|
+
names2,
|
|
176268
176268
|
argumentTypeNodes,
|
|
176269
176269
|
/*minArgumentCount*/
|
|
176270
176270
|
void 0,
|
|
@@ -176404,11 +176404,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
176404
176404
|
}
|
|
176405
176405
|
return type.flags & 262144 ? (_a = type.getSymbol()) == null ? void 0 : _a.getName() : void 0;
|
|
176406
176406
|
}
|
|
176407
|
-
function createDummyParameters(argCount,
|
|
176407
|
+
function createDummyParameters(argCount, names2, types, minArgumentCount, inJs) {
|
|
176408
176408
|
const parameters = [];
|
|
176409
176409
|
const parameterNameCounts = /* @__PURE__ */ new Map();
|
|
176410
176410
|
for (let i = 0; i < argCount; i++) {
|
|
176411
|
-
const parameterName = (
|
|
176411
|
+
const parameterName = (names2 == null ? void 0 : names2[i]) || `arg${i}`;
|
|
176412
176412
|
const parameterNameCount = parameterNameCounts.get(parameterName);
|
|
176413
176413
|
parameterNameCounts.set(parameterName, (parameterNameCount || 0) + 1);
|
|
176414
176414
|
const newParameter = factory.createParameterDeclaration(
|
|
@@ -182285,10 +182285,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
182285
182285
|
void 0
|
|
182286
182286
|
);
|
|
182287
182287
|
}
|
|
182288
|
-
function addReplacementSpans(text, textStart,
|
|
182288
|
+
function addReplacementSpans(text, textStart, names2) {
|
|
182289
182289
|
const span = getDirectoryFragmentTextSpan(text, textStart);
|
|
182290
182290
|
const wholeSpan = text.length === 0 ? void 0 : createTextSpan(textStart, text.length);
|
|
182291
|
-
return
|
|
182291
|
+
return names2.map(({ name, kind, extension }) => name.includes(directorySeparator) || name.includes(altDirectorySeparator) ? { name, kind, extension, span: wholeSpan } : { name, kind, extension, span });
|
|
182292
182292
|
}
|
|
182293
182293
|
function getStringLiteralCompletionsFromModuleNames(sourceFile, node, program, host, preferences) {
|
|
182294
182294
|
return addReplacementSpans(node.text, node.getStart(sourceFile) + 1, getStringLiteralCompletionsFromModuleNamesWorker(sourceFile, node, program, host, preferences));
|
|
@@ -182766,7 +182766,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
182766
182766
|
}
|
|
182767
182767
|
const [, prefix, kind, toComplete] = match;
|
|
182768
182768
|
const scriptPath = getDirectoryPath(sourceFile.path);
|
|
182769
|
-
const
|
|
182769
|
+
const names2 = kind === "path" ? getCompletionEntriesForDirectoryFragment(
|
|
182770
182770
|
toComplete,
|
|
182771
182771
|
scriptPath,
|
|
182772
182772
|
getExtensionOptions(compilerOptions, 0, sourceFile),
|
|
@@ -182775,7 +182775,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
182775
182775
|
true,
|
|
182776
182776
|
sourceFile.path
|
|
182777
182777
|
) : kind === "types" ? getCompletionEntriesFromTypings(host, compilerOptions, scriptPath, getFragmentDirectory(toComplete), getExtensionOptions(compilerOptions, 1, sourceFile)) : Debug.fail();
|
|
182778
|
-
return addReplacementSpans(toComplete, range.pos + prefix.length, arrayFrom(
|
|
182778
|
+
return addReplacementSpans(toComplete, range.pos + prefix.length, arrayFrom(names2.values()));
|
|
182779
182779
|
}
|
|
182780
182780
|
function getCompletionEntriesFromTypings(host, options, scriptPath, fragmentDirectory, extensionOptions, result = createNameAndKindSet()) {
|
|
182781
182781
|
const seen = /* @__PURE__ */ new Map();
|
|
@@ -201767,10 +201767,10 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
201767
201767
|
}
|
|
201768
201768
|
/** @internal */
|
|
201769
201769
|
logErrorForScriptInfoNotFound(fileName) {
|
|
201770
|
-
const
|
|
201770
|
+
const names2 = arrayFrom(this.filenameToScriptInfo.entries(), ([path, scriptInfo]) => ({ path, fileName: scriptInfo.fileName }));
|
|
201771
201771
|
this.logger.msg(
|
|
201772
201772
|
`Could not find file ${JSON.stringify(fileName)}.
|
|
201773
|
-
All files are: ${JSON.stringify(
|
|
201773
|
+
All files are: ${JSON.stringify(names2)}`,
|
|
201774
201774
|
"Err"
|
|
201775
201775
|
/* Err */
|
|
201776
201776
|
);
|
|
@@ -222222,12 +222222,12 @@ var require_Metadata = __commonJS({
|
|
|
222222
222222
|
});
|
|
222223
222223
|
}).sort();
|
|
222224
222224
|
var _loop_12 = function(tags2) {
|
|
222225
|
-
var
|
|
222225
|
+
var names2 = tags2.map(function(t) {
|
|
222226
222226
|
return t.name;
|
|
222227
222227
|
}).sort();
|
|
222228
222228
|
if (matrix.some(function(m) {
|
|
222229
|
-
return m.length ===
|
|
222230
|
-
return s ===
|
|
222229
|
+
return m.length === names2.length && m.every(function(s, i) {
|
|
222230
|
+
return s === names2[i];
|
|
222231
222231
|
});
|
|
222232
222232
|
}))
|
|
222233
222233
|
return "continue";
|
|
@@ -243047,6 +243047,7 @@ __export(utils_exports, {
|
|
|
243047
243047
|
cargoMetadata: () => cargoMetadata,
|
|
243048
243048
|
cargoRunCommand: () => cargoRunCommand,
|
|
243049
243049
|
childProcess: () => childProcess,
|
|
243050
|
+
createCliOptions: () => createCliOptions,
|
|
243050
243051
|
eslintVersion: () => eslintVersion,
|
|
243051
243052
|
getLockFileDependencies: () => getLockFileDependencies,
|
|
243052
243053
|
getLockFileName: () => getLockFileName,
|
|
@@ -244178,9 +244179,9 @@ var defineProperties = (
|
|
|
244178
244179
|
/* j-globals: null.defineProperties (internal) */
|
|
244179
244180
|
function defineProperties2(object, descriptorMap) {
|
|
244180
244181
|
var created = create$1(NULL);
|
|
244181
|
-
var
|
|
244182
|
-
for (var length =
|
|
244183
|
-
var name =
|
|
244182
|
+
var names2 = keys(descriptorMap);
|
|
244183
|
+
for (var length = names2.length, index = 0; index < length; ++index) {
|
|
244184
|
+
var name = names2[index];
|
|
244184
244185
|
created[name] = Descriptor(descriptorMap[name]);
|
|
244185
244186
|
}
|
|
244186
244187
|
if (getOwnPropertySymbols) {
|
|
@@ -246284,6 +246285,26 @@ Original error: ${originalError.message}
|
|
|
246284
246285
|
function isPostInstallProcess() {
|
|
246285
246286
|
return process.env.npm_command === "install" && process.env.npm_lifecycle_event === "postinstall";
|
|
246286
246287
|
}
|
|
246288
|
+
|
|
246289
|
+
// packages/workspace-tools/src/utils/create-cli-options.ts
|
|
246290
|
+
var import_devkit3 = require("@nx/devkit");
|
|
246291
|
+
function createCliOptions(obj) {
|
|
246292
|
+
const args = [];
|
|
246293
|
+
for (const key in obj) {
|
|
246294
|
+
const value = obj[key];
|
|
246295
|
+
if (value) {
|
|
246296
|
+
const arg = (0, import_devkit3.names)(key).fileName;
|
|
246297
|
+
if (Array.isArray(value)) {
|
|
246298
|
+
args.push(
|
|
246299
|
+
`--${arg.toLowerCase()}=${value.map((v) => v.trim()).join(",")}`
|
|
246300
|
+
);
|
|
246301
|
+
} else {
|
|
246302
|
+
args.push(`--${arg.toLowerCase()}=${value}`);
|
|
246303
|
+
}
|
|
246304
|
+
}
|
|
246305
|
+
}
|
|
246306
|
+
return args;
|
|
246307
|
+
}
|
|
246287
246308
|
// Annotate the CommonJS export names for ESM import in node:
|
|
246288
246309
|
0 && (module.exports = {
|
|
246289
246310
|
LOCK_FILES,
|
|
@@ -246299,6 +246320,7 @@ function isPostInstallProcess() {
|
|
|
246299
246320
|
cargoMetadata,
|
|
246300
246321
|
cargoRunCommand,
|
|
246301
246322
|
childProcess,
|
|
246323
|
+
createCliOptions,
|
|
246302
246324
|
eslintVersion,
|
|
246303
246325
|
getLockFileDependencies,
|
|
246304
246326
|
getLockFileName,
|