@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/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 names4 = 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(names4.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 names4 = 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 = names4.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 names4 = Object.getOwnPropertyNames(obj);
|
|
10818
|
+
for (const name of names4) {
|
|
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(names4, newResolutions, getOldResolution, comparer) {
|
|
23451
|
+
Debug.assert(names4.length === newResolutions.length);
|
|
23452
|
+
for (let i = 0; i < names4.length; i++) {
|
|
23453
23453
|
const newResolution = newResolutions[i];
|
|
23454
|
-
const entry =
|
|
23454
|
+
const entry = names4[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 names4 = /* @__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
|
+
names4.set(prop.escapedName, prop);
|
|
81522
81522
|
}
|
|
81523
81523
|
}
|
|
81524
81524
|
}
|
|
81525
|
-
context.resolvedProperties = arrayFrom(
|
|
81525
|
+
context.resolvedProperties = arrayFrom(names4.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 names4 = [];
|
|
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
|
+
names4.push(arg.tupleNameSource);
|
|
89622
89622
|
} else {
|
|
89623
|
-
|
|
89623
|
+
names4.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), names4);
|
|
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 names4 = [];
|
|
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
|
+
names4.push(getNameableDeclarationAtPosition(source, i));
|
|
91942
91942
|
}
|
|
91943
|
-
return createTupleType(types, flags, readonly,
|
|
91943
|
+
return createTupleType(types, flags, readonly, names4);
|
|
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 names4 = 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(names4, name, memberName, 1 | privateStaticFlags);
|
|
95203
95203
|
break;
|
|
95204
95204
|
case 178:
|
|
95205
|
-
addName(
|
|
95205
|
+
addName(names4, name, memberName, 2 | privateStaticFlags);
|
|
95206
95206
|
break;
|
|
95207
95207
|
case 172:
|
|
95208
|
-
addName(
|
|
95208
|
+
addName(names4, name, memberName, 3 | privateStaticFlags);
|
|
95209
95209
|
break;
|
|
95210
95210
|
case 174:
|
|
95211
|
-
addName(
|
|
95211
|
+
addName(names4, name, memberName, 8 | privateStaticFlags);
|
|
95212
95212
|
break;
|
|
95213
95213
|
}
|
|
95214
95214
|
}
|
|
95215
95215
|
}
|
|
95216
95216
|
}
|
|
95217
|
-
function addName(
|
|
95218
|
-
const prev =
|
|
95217
|
+
function addName(names4, location, name, meaning) {
|
|
95218
|
+
const prev = names4.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
|
+
names4.set(name, prev | meaning);
|
|
95233
95233
|
}
|
|
95234
95234
|
}
|
|
95235
95235
|
} else {
|
|
95236
|
-
|
|
95236
|
+
names4.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 names4 = /* @__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 (names4.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
|
+
names4.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 names4 = [];
|
|
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 = names4.length;
|
|
106589
|
+
names4.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: names4,
|
|
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 }, names4) {
|
|
116022
116022
|
if (isIdentifier(name)) {
|
|
116023
|
-
|
|
116023
|
+
names4.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, names4);
|
|
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, names4) {
|
|
116463
116463
|
const hasBinding = (resolver.getNodeCheckFlags(node) & 256) !== 0;
|
|
116464
116464
|
const accessors = [];
|
|
116465
|
-
|
|
116465
|
+
names4.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 names4 = 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 names4 === "string" ? names4 : names4[0];
|
|
152940
|
+
const capitalizedSymbolName = typeof names4 === "string" ? void 0 : names4[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 names4 = [];
|
|
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
|
+
names4.push(name);
|
|
156644
156644
|
}
|
|
156645
|
-
|
|
156646
|
-
for (let i =
|
|
156647
|
-
const name =
|
|
156645
|
+
names4.push(entityName);
|
|
156646
|
+
for (let i = names4.length - 1; i > 0; i--) {
|
|
156647
|
+
const name = names4[i];
|
|
156648
156648
|
startNode(targetNode, name);
|
|
156649
156649
|
}
|
|
156650
|
-
return [
|
|
156650
|
+
return [names4.length - 1, names4[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 names4 = getNamesToExportInCommonJS(decl);
|
|
159169
|
+
if (names4.length !== 0)
|
|
159170
|
+
changes.insertNodesAfter(sourceFile, decl, names4.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 names4 = deduplicate([...functionNames, ...classNames], equateValues);
|
|
160254
160254
|
const checker = program.getTypeChecker();
|
|
160255
160255
|
const references = flatMap(
|
|
160256
|
-
|
|
160256
|
+
names4,
|
|
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(names4, 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, names4) {
|
|
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(names4, 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, names4) {
|
|
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
|
+
names4,
|
|
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(names4, allowTypeModifier) {
|
|
171823
|
+
return factory.createNodeArray(map(names4, (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 names4 = /* @__PURE__ */ new Set();
|
|
173890
173890
|
for (const tag of tags) {
|
|
173891
173891
|
if (isJSDocParameterTag(tag) && isIdentifier(tag.name)) {
|
|
173892
|
-
|
|
173892
|
+
names4.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) && !names4.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 names4 = 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
|
+
names4,
|
|
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, names4, 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 = (names4 == null ? void 0 : names4[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, names4) {
|
|
182289
182289
|
const span = getDirectoryFragmentTextSpan(text, textStart);
|
|
182290
182290
|
const wholeSpan = text.length === 0 ? void 0 : createTextSpan(textStart, text.length);
|
|
182291
|
-
return
|
|
182291
|
+
return names4.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 names4 = 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(names4.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 names4 = arrayFrom(this.filenameToScriptInfo.entries(), ([path2, scriptInfo]) => ({ path: path2, 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(names4)}`,
|
|
201774
201774
|
"Err"
|
|
201775
201775
|
/* Err */
|
|
201776
201776
|
);
|
|
@@ -222474,9 +222474,9 @@ var require_cjs = __commonJS({
|
|
|
222474
222474
|
}
|
|
222475
222475
|
});
|
|
222476
222476
|
|
|
222477
|
-
// node_modules/.pnpm/ignore@5.3.
|
|
222477
|
+
// node_modules/.pnpm/ignore@5.3.1/node_modules/ignore/index.js
|
|
222478
222478
|
var require_ignore = __commonJS({
|
|
222479
|
-
"node_modules/.pnpm/ignore@5.3.
|
|
222479
|
+
"node_modules/.pnpm/ignore@5.3.1/node_modules/ignore/index.js"(exports2, module2) {
|
|
222480
222480
|
function makeArray(subject) {
|
|
222481
222481
|
return Array.isArray(subject) ? subject : [subject];
|
|
222482
222482
|
}
|
|
@@ -222507,6 +222507,13 @@ var require_ignore = __commonJS({
|
|
|
222507
222507
|
return slashes.slice(0, length - length % 2);
|
|
222508
222508
|
};
|
|
222509
222509
|
var REPLACERS = [
|
|
222510
|
+
[
|
|
222511
|
+
// remove BOM
|
|
222512
|
+
// TODO:
|
|
222513
|
+
// Other similar zero-width characters?
|
|
222514
|
+
/^\uFEFF/,
|
|
222515
|
+
() => EMPTY
|
|
222516
|
+
],
|
|
222510
222517
|
// > Trailing spaces are ignored unless they are quoted with backslash ("\")
|
|
222511
222518
|
[
|
|
222512
222519
|
// (a\ ) -> (a )
|
|
@@ -226663,12 +226670,12 @@ var require_async2 = __commonJS({
|
|
|
226663
226670
|
};
|
|
226664
226671
|
}
|
|
226665
226672
|
function readdir(directory, settings, callback) {
|
|
226666
|
-
settings.fs.readdir(directory, (readdirError,
|
|
226673
|
+
settings.fs.readdir(directory, (readdirError, names4) => {
|
|
226667
226674
|
if (readdirError !== null) {
|
|
226668
226675
|
callFailureCallback(callback, readdirError);
|
|
226669
226676
|
return;
|
|
226670
226677
|
}
|
|
226671
|
-
const tasks =
|
|
226678
|
+
const tasks = names4.map((name) => {
|
|
226672
226679
|
const path2 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
|
|
226673
226680
|
return (done2) => {
|
|
226674
226681
|
fsStat.stat(path2, settings.fsStatSettings, (error, stats) => {
|
|
@@ -226747,8 +226754,8 @@ var require_sync2 = __commonJS({
|
|
|
226747
226754
|
}
|
|
226748
226755
|
exports2.readdirWithFileTypes = readdirWithFileTypes;
|
|
226749
226756
|
function readdir(directory, settings) {
|
|
226750
|
-
const
|
|
226751
|
-
return
|
|
226757
|
+
const names4 = settings.fs.readdirSync(directory);
|
|
226758
|
+
return names4.map((name) => {
|
|
226752
226759
|
const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
|
|
226753
226760
|
const stats = fsStat.statSync(entryPath, settings.fsStatSettings);
|
|
226754
226761
|
const entry = {
|
|
@@ -236838,12 +236845,12 @@ var require_Metadata = __commonJS({
|
|
|
236838
236845
|
});
|
|
236839
236846
|
}).sort();
|
|
236840
236847
|
var _loop_12 = function(tags2) {
|
|
236841
|
-
var
|
|
236848
|
+
var names4 = tags2.map(function(t) {
|
|
236842
236849
|
return t.name;
|
|
236843
236850
|
}).sort();
|
|
236844
236851
|
if (matrix.some(function(m) {
|
|
236845
|
-
return m.length ===
|
|
236846
|
-
return s ===
|
|
236852
|
+
return m.length === names4.length && m.every(function(s, i) {
|
|
236853
|
+
return s === names4[i];
|
|
236847
236854
|
});
|
|
236848
236855
|
}))
|
|
236849
236856
|
return "continue";
|
|
@@ -258264,9 +258271,9 @@ var require_package3 = __commonJS({
|
|
|
258264
258271
|
}
|
|
258265
258272
|
});
|
|
258266
258273
|
|
|
258267
|
-
// node_modules/.pnpm/lru-cache@10.0
|
|
258268
|
-
var
|
|
258269
|
-
"node_modules/.pnpm/lru-cache@10.0
|
|
258274
|
+
// node_modules/.pnpm/lru-cache@10.2.0/node_modules/lru-cache/dist/commonjs/index.js
|
|
258275
|
+
var require_commonjs = __commonJS({
|
|
258276
|
+
"node_modules/.pnpm/lru-cache@10.2.0/node_modules/lru-cache/dist/commonjs/index.js"(exports2) {
|
|
258270
258277
|
"use strict";
|
|
258271
258278
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
258272
258279
|
exports2.LRUCache = void 0;
|
|
@@ -258638,6 +258645,8 @@ var require_cjs2 = __commonJS({
|
|
|
258638
258645
|
if (ttls[index]) {
|
|
258639
258646
|
const ttl = ttls[index];
|
|
258640
258647
|
const start = starts[index];
|
|
258648
|
+
if (!ttl || !start)
|
|
258649
|
+
return;
|
|
258641
258650
|
status.ttl = ttl;
|
|
258642
258651
|
status.start = start;
|
|
258643
258652
|
status.now = cachedNow || getNow();
|
|
@@ -258664,14 +258673,16 @@ var require_cjs2 = __commonJS({
|
|
|
258664
258673
|
}
|
|
258665
258674
|
const ttl = ttls[index];
|
|
258666
258675
|
const start = starts[index];
|
|
258667
|
-
if (ttl
|
|
258676
|
+
if (!ttl || !start) {
|
|
258668
258677
|
return Infinity;
|
|
258669
258678
|
}
|
|
258670
258679
|
const age = (cachedNow || getNow()) - start;
|
|
258671
258680
|
return ttl - age;
|
|
258672
258681
|
};
|
|
258673
258682
|
this.#isStale = (index) => {
|
|
258674
|
-
|
|
258683
|
+
const s = starts[index];
|
|
258684
|
+
const t = ttls[index];
|
|
258685
|
+
return !!t && !!s && (cachedNow || getNow()) - s > t;
|
|
258675
258686
|
};
|
|
258676
258687
|
}
|
|
258677
258688
|
// conditionally set private methods related to TTL
|
|
@@ -258855,6 +258866,11 @@ var require_cjs2 = __commonJS({
|
|
|
258855
258866
|
[Symbol.iterator]() {
|
|
258856
258867
|
return this.entries();
|
|
258857
258868
|
}
|
|
258869
|
+
/**
|
|
258870
|
+
* A String value that is used in the creation of the default string description of an object.
|
|
258871
|
+
* Called by the built-in method Object.prototype.toString.
|
|
258872
|
+
*/
|
|
258873
|
+
[Symbol.toStringTag] = "LRUCache";
|
|
258858
258874
|
/**
|
|
258859
258875
|
* Find a value for which the supplied fn method returns a truthy value,
|
|
258860
258876
|
* similar to Array.find(). fn is called as fn(value, key, cache).
|
|
@@ -258912,6 +258928,35 @@ var require_cjs2 = __commonJS({
|
|
|
258912
258928
|
}
|
|
258913
258929
|
return deleted;
|
|
258914
258930
|
}
|
|
258931
|
+
/**
|
|
258932
|
+
* Get the extended info about a given entry, to get its value, size, and
|
|
258933
|
+
* TTL info simultaneously. Like {@link LRUCache#dump}, but just for a
|
|
258934
|
+
* single key. Always returns stale values, if their info is found in the
|
|
258935
|
+
* cache, so be sure to check for expired TTLs if relevant.
|
|
258936
|
+
*/
|
|
258937
|
+
info(key) {
|
|
258938
|
+
const i = this.#keyMap.get(key);
|
|
258939
|
+
if (i === void 0)
|
|
258940
|
+
return void 0;
|
|
258941
|
+
const v = this.#valList[i];
|
|
258942
|
+
const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
|
258943
|
+
if (value === void 0)
|
|
258944
|
+
return void 0;
|
|
258945
|
+
const entry = { value };
|
|
258946
|
+
if (this.#ttls && this.#starts) {
|
|
258947
|
+
const ttl = this.#ttls[i];
|
|
258948
|
+
const start = this.#starts[i];
|
|
258949
|
+
if (ttl && start) {
|
|
258950
|
+
const remain = ttl - (perf.now() - start);
|
|
258951
|
+
entry.ttl = remain;
|
|
258952
|
+
entry.start = Date.now();
|
|
258953
|
+
}
|
|
258954
|
+
}
|
|
258955
|
+
if (this.#sizes) {
|
|
258956
|
+
entry.size = this.#sizes[i];
|
|
258957
|
+
}
|
|
258958
|
+
return entry;
|
|
258959
|
+
}
|
|
258915
258960
|
/**
|
|
258916
258961
|
* Return an array of [key, {@link LRUCache.Entry}] tuples which can be
|
|
258917
258962
|
* passed to cache.load()
|
|
@@ -259144,10 +259189,11 @@ var require_cjs2 = __commonJS({
|
|
|
259144
259189
|
peek(k, peekOptions = {}) {
|
|
259145
259190
|
const { allowStale = this.allowStale } = peekOptions;
|
|
259146
259191
|
const index = this.#keyMap.get(k);
|
|
259147
|
-
if (index
|
|
259148
|
-
|
|
259149
|
-
return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
|
259192
|
+
if (index === void 0 || !allowStale && this.#isStale(index)) {
|
|
259193
|
+
return;
|
|
259150
259194
|
}
|
|
259195
|
+
const v = this.#valList[index];
|
|
259196
|
+
return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
|
259151
259197
|
}
|
|
259152
259198
|
#backgroundFetch(k, index, options, context) {
|
|
259153
259199
|
const v = index === void 0 ? void 0 : this.#valList[index];
|
|
@@ -259444,8 +259490,10 @@ var require_cjs2 = __commonJS({
|
|
|
259444
259490
|
} else if (index === this.#head) {
|
|
259445
259491
|
this.#head = this.#next[index];
|
|
259446
259492
|
} else {
|
|
259447
|
-
|
|
259448
|
-
this.#
|
|
259493
|
+
const pi = this.#prev[index];
|
|
259494
|
+
this.#next[pi] = this.#next[index];
|
|
259495
|
+
const ni = this.#next[index];
|
|
259496
|
+
this.#prev[ni] = this.#prev[index];
|
|
259449
259497
|
}
|
|
259450
259498
|
this.#size--;
|
|
259451
259499
|
this.#free.push(index);
|
|
@@ -259824,7 +259872,7 @@ var require_from_url = __commonJS({
|
|
|
259824
259872
|
var require_lib7 = __commonJS({
|
|
259825
259873
|
"node_modules/.pnpm/hosted-git-info@7.0.1/node_modules/hosted-git-info/lib/index.js"(exports2, module2) {
|
|
259826
259874
|
"use strict";
|
|
259827
|
-
var { LRUCache } =
|
|
259875
|
+
var { LRUCache } = require_commonjs();
|
|
259828
259876
|
var hosts = require_hosts();
|
|
259829
259877
|
var fromUrl = require_from_url();
|
|
259830
259878
|
var parseUrl = require_parse_url();
|
|
@@ -260614,6 +260662,7 @@ __export(workspace_tools_exports, {
|
|
|
260614
260662
|
cargoRunCommand: () => cargoRunCommand,
|
|
260615
260663
|
childProcess: () => childProcess,
|
|
260616
260664
|
configSchemaGeneratorFn: () => configSchemaGeneratorFn,
|
|
260665
|
+
createCliOptions: () => createCliOptions,
|
|
260617
260666
|
createProjectTsConfigJson: () => createProjectTsConfigJson,
|
|
260618
260667
|
eslintVersion: () => eslintVersion,
|
|
260619
260668
|
getLockFileDependencies: () => getLockFileDependencies,
|
|
@@ -262323,9 +262372,9 @@ var defineProperties = (
|
|
|
262323
262372
|
/* j-globals: null.defineProperties (internal) */
|
|
262324
262373
|
function defineProperties2(object, descriptorMap) {
|
|
262325
262374
|
var created = create$1(NULL);
|
|
262326
|
-
var
|
|
262327
|
-
for (var length =
|
|
262328
|
-
var name =
|
|
262375
|
+
var names4 = keys(descriptorMap);
|
|
262376
|
+
for (var length = names4.length, index = 0; index < length; ++index) {
|
|
262377
|
+
var name = names4[index];
|
|
262329
262378
|
created[name] = Descriptor(descriptorMap[name]);
|
|
262330
262379
|
}
|
|
262331
262380
|
if (getOwnPropertySymbols) {
|
|
@@ -264430,6 +264479,26 @@ function isPostInstallProcess() {
|
|
|
264430
264479
|
return process.env.npm_command === "install" && process.env.npm_lifecycle_event === "postinstall";
|
|
264431
264480
|
}
|
|
264432
264481
|
|
|
264482
|
+
// packages/workspace-tools/src/utils/create-cli-options.ts
|
|
264483
|
+
var import_devkit4 = require("@nx/devkit");
|
|
264484
|
+
function createCliOptions(obj) {
|
|
264485
|
+
const args = [];
|
|
264486
|
+
for (const key in obj) {
|
|
264487
|
+
const value = obj[key];
|
|
264488
|
+
if (value) {
|
|
264489
|
+
const arg = (0, import_devkit4.names)(key).fileName;
|
|
264490
|
+
if (Array.isArray(value)) {
|
|
264491
|
+
args.push(
|
|
264492
|
+
`--${arg.toLowerCase()}=${value.map((v) => v.trim()).join(",")}`
|
|
264493
|
+
);
|
|
264494
|
+
} else {
|
|
264495
|
+
args.push(`--${arg.toLowerCase()}=${value}`);
|
|
264496
|
+
}
|
|
264497
|
+
}
|
|
264498
|
+
}
|
|
264499
|
+
return args;
|
|
264500
|
+
}
|
|
264501
|
+
|
|
264433
264502
|
// packages/workspace-tools/src/executors/rolldown/executor.ts
|
|
264434
264503
|
async function rolldownExecutorFn(options, context, config) {
|
|
264435
264504
|
const { writeDebug: writeDebug2, writeInfo: writeInfo2, writeSuccess: writeSuccess2 } = await Promise.resolve().then(() => (init_src2(), src_exports));
|
|
@@ -264704,7 +264773,7 @@ var executor_default6 = withRunExecutor(
|
|
|
264704
264773
|
);
|
|
264705
264774
|
|
|
264706
264775
|
// packages/workspace-tools/src/executors/cargo-publish/executor.ts
|
|
264707
|
-
var
|
|
264776
|
+
var import_devkit5 = require("@nx/devkit");
|
|
264708
264777
|
var import_node_https = __toESM(require("node:https"));
|
|
264709
264778
|
var LARGE_BUFFER2 = 1024 * 1e6;
|
|
264710
264779
|
var getRegistryVersion = (name, version2) => {
|
|
@@ -264725,11 +264794,11 @@ var getRegistryVersion = (name, version2) => {
|
|
|
264725
264794
|
};
|
|
264726
264795
|
|
|
264727
264796
|
// packages/workspace-tools/src/executors/npm-publish/executor.ts
|
|
264728
|
-
var
|
|
264797
|
+
var import_devkit6 = require("@nx/devkit");
|
|
264729
264798
|
var LARGE_BUFFER3 = 1024 * 1e6;
|
|
264730
264799
|
|
|
264731
264800
|
// packages/workspace-tools/src/generators/config-schema/generator.ts
|
|
264732
|
-
var
|
|
264801
|
+
var import_devkit7 = require("@nx/devkit");
|
|
264733
264802
|
init_src();
|
|
264734
264803
|
var import_node_fs4 = require("node:fs");
|
|
264735
264804
|
var import_node_path7 = require("node:path");
|
|
@@ -265810,12 +265879,12 @@ async function configSchemaGeneratorFn(tree, options, config) {
|
|
|
265810
265879
|
const ModulesSchema = unionType([workspaceSchema, StormConfigSchema]).describe(
|
|
265811
265880
|
"The values set in the Storm config file. This file is expected to be named `storm.json`, `storm.config.ts`, or `storm.config.js` and be located in the root of the workspace"
|
|
265812
265881
|
);
|
|
265813
|
-
(0,
|
|
265882
|
+
(0, import_devkit7.writeJson)(
|
|
265814
265883
|
tree,
|
|
265815
265884
|
options.outputFile ? (0, import_node_path7.join)(workspaceRoot3, options.outputFile) : (0, import_node_path7.join)(workspaceRoot3, "storm.schema.json"),
|
|
265816
265885
|
zodToJsonSchema(ModulesSchema, "StormConfig")
|
|
265817
265886
|
);
|
|
265818
|
-
await (0,
|
|
265887
|
+
await (0, import_devkit7.formatFiles)(tree);
|
|
265819
265888
|
return {
|
|
265820
265889
|
success: true
|
|
265821
265890
|
};
|
|
@@ -265826,9 +265895,9 @@ var generator_default = withRunGenerator(
|
|
|
265826
265895
|
);
|
|
265827
265896
|
|
|
265828
265897
|
// packages/workspace-tools/src/generators/init/init.ts
|
|
265829
|
-
var
|
|
265898
|
+
var import_devkit8 = require("@nx/devkit");
|
|
265830
265899
|
async function stormInitGenerator(tree, schema) {
|
|
265831
|
-
const task = (0,
|
|
265900
|
+
const task = (0, import_devkit8.addDependenciesToPackageJson)(
|
|
265832
265901
|
tree,
|
|
265833
265902
|
{
|
|
265834
265903
|
nx: nxVersion,
|
|
@@ -265841,15 +265910,15 @@ async function stormInitGenerator(tree, schema) {
|
|
|
265841
265910
|
{}
|
|
265842
265911
|
);
|
|
265843
265912
|
if (!schema.skipFormat) {
|
|
265844
|
-
await (0,
|
|
265913
|
+
await (0, import_devkit8.formatFiles)(tree);
|
|
265845
265914
|
}
|
|
265846
265915
|
return task;
|
|
265847
265916
|
}
|
|
265848
265917
|
|
|
265849
265918
|
// packages/workspace-tools/src/generators/node-library/generator.ts
|
|
265850
|
-
var
|
|
265919
|
+
var import_devkit9 = require("@nx/devkit");
|
|
265851
265920
|
async function nodeLibraryGeneratorFn(tree, schema) {
|
|
265852
|
-
const filesDir = (0,
|
|
265921
|
+
const filesDir = (0, import_devkit9.joinPathFragments)(__dirname, "./files");
|
|
265853
265922
|
const tsLibraryGeneratorOptions = {
|
|
265854
265923
|
...schema,
|
|
265855
265924
|
platform: "node",
|
|
@@ -265859,8 +265928,8 @@ async function nodeLibraryGeneratorFn(tree, schema) {
|
|
|
265859
265928
|
buildExecutor: "@storm-software/workspace-tools:tsup-node"
|
|
265860
265929
|
};
|
|
265861
265930
|
const options = await normalizeOptions(tree, tsLibraryGeneratorOptions);
|
|
265862
|
-
const { className, name, propertyName } = (0,
|
|
265863
|
-
(0,
|
|
265931
|
+
const { className, name, propertyName } = (0, import_devkit9.names)(options.projectNames.projectFileName);
|
|
265932
|
+
(0, import_devkit9.generateFiles)(tree, filesDir, options.projectRoot, {
|
|
265864
265933
|
...schema,
|
|
265865
265934
|
dot: ".",
|
|
265866
265935
|
className,
|
|
@@ -265872,12 +265941,12 @@ async function nodeLibraryGeneratorFn(tree, schema) {
|
|
|
265872
265941
|
cliCommand: "nx",
|
|
265873
265942
|
strict: void 0,
|
|
265874
265943
|
tmpl: "",
|
|
265875
|
-
offsetFromRoot: (0,
|
|
265944
|
+
offsetFromRoot: (0, import_devkit9.offsetFromRoot)(options.projectRoot),
|
|
265876
265945
|
buildable: options.bundler && options.bundler !== "none",
|
|
265877
265946
|
hasUnitTestRunner: options.unitTestRunner !== "none"
|
|
265878
265947
|
});
|
|
265879
265948
|
await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions);
|
|
265880
|
-
await (0,
|
|
265949
|
+
await (0, import_devkit9.formatFiles)(tree);
|
|
265881
265950
|
return null;
|
|
265882
265951
|
}
|
|
265883
265952
|
var generator_default2 = withRunGenerator(
|
|
@@ -265887,12 +265956,12 @@ var generator_default2 = withRunGenerator(
|
|
|
265887
265956
|
|
|
265888
265957
|
// packages/workspace-tools/src/generators/preset/generator.ts
|
|
265889
265958
|
var path = __toESM(require("node:path"));
|
|
265890
|
-
var
|
|
265959
|
+
var import_devkit10 = require("@nx/devkit");
|
|
265891
265960
|
async function presetGeneratorFn(tree, options) {
|
|
265892
265961
|
const projectRoot = ".";
|
|
265893
265962
|
options.description ??= `\u26A1The ${options.namespace ? options.namespace : options.name} monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.`;
|
|
265894
265963
|
options.namespace ??= options.organization;
|
|
265895
|
-
(0,
|
|
265964
|
+
(0, import_devkit10.addProjectConfiguration)(tree, `@${options.namespace}/${options.name}`, {
|
|
265896
265965
|
root: projectRoot,
|
|
265897
265966
|
projectType: "application",
|
|
265898
265967
|
targets: {
|
|
@@ -265906,7 +265975,7 @@ async function presetGeneratorFn(tree, options) {
|
|
|
265906
265975
|
}
|
|
265907
265976
|
}
|
|
265908
265977
|
});
|
|
265909
|
-
(0,
|
|
265978
|
+
(0, import_devkit10.updateJson)(tree, "package.json", (json) => {
|
|
265910
265979
|
json.scripts = json.scripts || {};
|
|
265911
265980
|
json.version = "0.0.0";
|
|
265912
265981
|
json.triggerEmptyDevReleaseByIncrementingThisNumber = 0;
|
|
@@ -266030,12 +266099,12 @@ async function presetGeneratorFn(tree, options) {
|
|
|
266030
266099
|
};
|
|
266031
266100
|
return json;
|
|
266032
266101
|
});
|
|
266033
|
-
(0,
|
|
266102
|
+
(0, import_devkit10.generateFiles)(tree, path.join(__dirname, "files"), projectRoot, {
|
|
266034
266103
|
...options,
|
|
266035
266104
|
pnpmVersion,
|
|
266036
266105
|
nodeVersion
|
|
266037
266106
|
});
|
|
266038
|
-
await (0,
|
|
266107
|
+
await (0, import_devkit10.formatFiles)(tree);
|
|
266039
266108
|
let dependencies = {
|
|
266040
266109
|
"@nx/devkit": "^18.0.4",
|
|
266041
266110
|
"@nx/jest": "^18.0.4",
|
|
@@ -266092,11 +266161,11 @@ async function presetGeneratorFn(tree, options) {
|
|
|
266092
266161
|
};
|
|
266093
266162
|
}
|
|
266094
266163
|
await Promise.resolve(
|
|
266095
|
-
(0,
|
|
266164
|
+
(0, import_devkit10.addDependenciesToPackageJson)(
|
|
266096
266165
|
tree,
|
|
266097
266166
|
dependencies,
|
|
266098
266167
|
{},
|
|
266099
|
-
(0,
|
|
266168
|
+
(0, import_devkit10.joinPathFragments)(projectRoot, "package.json")
|
|
266100
266169
|
)
|
|
266101
266170
|
);
|
|
266102
266171
|
return null;
|
|
@@ -266107,7 +266176,7 @@ var generator_default3 = withRunGenerator(
|
|
|
266107
266176
|
);
|
|
266108
266177
|
|
|
266109
266178
|
// packages/workspace-tools/src/generators/release-version/generator.ts
|
|
266110
|
-
var
|
|
266179
|
+
var import_devkit11 = require("@nx/devkit");
|
|
266111
266180
|
var import_version = require("nx/src/command-line/release/version");
|
|
266112
266181
|
var import_utils = require("nx/src/tasks-runner/utils");
|
|
266113
266182
|
var import_semver = require("nx/src/command-line/release/utils/semver");
|
|
@@ -266164,11 +266233,11 @@ Valid values are: ${import_version.validReleaseVersionPrefixes.map((s) => `"${s}
|
|
|
266164
266233
|
for (const project of projects) {
|
|
266165
266234
|
const projectName = project.name;
|
|
266166
266235
|
const packageRoot = projectNameToPackageRootMap.get(projectName);
|
|
266167
|
-
const packageJsonPath = (0,
|
|
266236
|
+
const packageJsonPath = (0, import_devkit11.joinPathFragments)(
|
|
266168
266237
|
packageRoot ?? "./",
|
|
266169
266238
|
"package.json"
|
|
266170
266239
|
);
|
|
266171
|
-
const cargoTomlPath = (0,
|
|
266240
|
+
const cargoTomlPath = (0, import_devkit11.joinPathFragments)(packageRoot ?? "./", "Cargo.toml");
|
|
266172
266241
|
if (!tree.exists(packageJsonPath) && !tree.exists(cargoTomlPath)) {
|
|
266173
266242
|
throw new Error(
|
|
266174
266243
|
`The project "${projectName}" does not have a package.json available at ${packageJsonPath} or a Cargo.toml file available at ${cargoTomlPath}.
|
|
@@ -266187,7 +266256,7 @@ To fix this you will either need to add a package.json or Cargo.toml file at tha
|
|
|
266187
266256
|
let packageName;
|
|
266188
266257
|
let currentVersionFromDisk;
|
|
266189
266258
|
if (tree.exists(packageJsonPath)) {
|
|
266190
|
-
const projectPackageJson = (0,
|
|
266259
|
+
const projectPackageJson = (0, import_devkit11.readJson)(tree, packageJsonPath);
|
|
266191
266260
|
log(
|
|
266192
266261
|
`\u{1F50D} Reading data for package "${projectPackageJson.name}" from ${workspaceRelativePackagePath}`
|
|
266193
266262
|
);
|
|
@@ -266434,8 +266503,8 @@ To fix this you will either need to add a package.json or Cargo.toml file at tha
|
|
|
266434
266503
|
versionData[projectName].newVersion = newVersion;
|
|
266435
266504
|
}
|
|
266436
266505
|
if (tree.exists(packageJsonPath)) {
|
|
266437
|
-
const projectPackageJson = (0,
|
|
266438
|
-
(0,
|
|
266506
|
+
const projectPackageJson = (0, import_devkit11.readJson)(tree, packageJsonPath);
|
|
266507
|
+
(0, import_devkit11.writeJson)(tree, packageJsonPath, {
|
|
266439
266508
|
...projectPackageJson,
|
|
266440
266509
|
version: newVersion
|
|
266441
266510
|
});
|
|
@@ -266466,16 +266535,16 @@ To fix this you will either need to add a package.json or Cargo.toml file at tha
|
|
|
266466
266535
|
Projects with packageRoot configured: ${Array.from(projectNameToPackageRootMap.keys()).join(", ")}`
|
|
266467
266536
|
);
|
|
266468
266537
|
}
|
|
266469
|
-
const dependentPackageJsonPath = (0,
|
|
266538
|
+
const dependentPackageJsonPath = (0, import_devkit11.joinPathFragments)(
|
|
266470
266539
|
dependentPackageRoot,
|
|
266471
266540
|
"package.json"
|
|
266472
266541
|
);
|
|
266473
|
-
const dependentCargoTomlPath = (0,
|
|
266542
|
+
const dependentCargoTomlPath = (0, import_devkit11.joinPathFragments)(
|
|
266474
266543
|
dependentPackageRoot,
|
|
266475
266544
|
"Cargo.toml"
|
|
266476
266545
|
);
|
|
266477
266546
|
if (tree.exists(dependentPackageJsonPath)) {
|
|
266478
|
-
(0,
|
|
266547
|
+
(0, import_devkit11.updateJson)(tree, dependentPackageJsonPath, (json) => {
|
|
266479
266548
|
let versionPrefix = options.versionPrefix ?? "auto";
|
|
266480
266549
|
if (versionPrefix === "auto") {
|
|
266481
266550
|
versionPrefix = "";
|
|
@@ -266531,7 +266600,7 @@ Projects with packageRoot configured: ${Array.from(projectNameToPackageRootMap.k
|
|
|
266531
266600
|
};
|
|
266532
266601
|
break;
|
|
266533
266602
|
}
|
|
266534
|
-
const cargoTomlToUpdate = (0,
|
|
266603
|
+
const cargoTomlToUpdate = (0, import_devkit11.joinPathFragments)(
|
|
266535
266604
|
dependentPackageRoot,
|
|
266536
266605
|
"Cargo.toml"
|
|
266537
266606
|
);
|
|
@@ -266545,11 +266614,11 @@ Projects with packageRoot configured: ${Array.from(projectNameToPackageRootMap.k
|
|
|
266545
266614
|
}
|
|
266546
266615
|
}
|
|
266547
266616
|
}
|
|
266548
|
-
await (0,
|
|
266617
|
+
await (0, import_devkit11.formatFiles)(tree);
|
|
266549
266618
|
return {
|
|
266550
266619
|
data: versionData,
|
|
266551
266620
|
callback: async (tree2, opts) => {
|
|
266552
|
-
|
|
266621
|
+
import_devkit11.output.logSingleLine("Updating Cargo.lock file");
|
|
266553
266622
|
const cwd = tree2.root;
|
|
266554
266623
|
const updatedFiles = await (0, import_update_lock_file.updateLockFile)(cwd, opts);
|
|
266555
266624
|
const updatedCargoPackages = [];
|
|
@@ -266559,7 +266628,7 @@ Projects with packageRoot configured: ${Array.from(projectNameToPackageRootMap.k
|
|
|
266559
266628
|
const project = projects.find((proj) => proj.name === projectName);
|
|
266560
266629
|
if (projectVersionData.newVersion && project?.name && projectNameToPackageRootMap.get(project.name)) {
|
|
266561
266630
|
const projectRoot = projectNameToPackageRootMap.get(project.name);
|
|
266562
|
-
if (projectRoot && tree2.exists((0,
|
|
266631
|
+
if (projectRoot && tree2.exists((0, import_devkit11.joinPathFragments)(projectRoot, "Cargo.toml"))) {
|
|
266563
266632
|
updatedCargoPackages.push(projectName);
|
|
266564
266633
|
}
|
|
266565
266634
|
}
|
|
@@ -266638,7 +266707,7 @@ function resolveLocalPackageCargoDependencies(tree, projectGraph, filteredProjec
|
|
|
266638
266707
|
}
|
|
266639
266708
|
projectNameToPackageRootMap.set(projectNode.name, packageRoot);
|
|
266640
266709
|
}
|
|
266641
|
-
const cargoTomlPath = (0,
|
|
266710
|
+
const cargoTomlPath = (0, import_devkit11.joinPathFragments)(packageRoot ?? "./", "Cargo.toml");
|
|
266642
266711
|
if (!tree.exists(cargoTomlPath)) {
|
|
266643
266712
|
continue;
|
|
266644
266713
|
}
|
|
@@ -266793,6 +266862,7 @@ var DEFAULT_CONVENTIONAL_COMMITS_CONFIG = {
|
|
|
266793
266862
|
cargoRunCommand,
|
|
266794
266863
|
childProcess,
|
|
266795
266864
|
configSchemaGeneratorFn,
|
|
266865
|
+
createCliOptions,
|
|
266796
266866
|
createProjectTsConfigJson,
|
|
266797
266867
|
eslintVersion,
|
|
266798
266868
|
getLockFileDependencies,
|