@formatjs/cli 6.16.13 → 6.16.14
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/bin/formatjs +101 -63
- package/bin/formatjs.map +1 -1
- package/package.json +7 -7
package/bin/formatjs
CHANGED
|
@@ -1618,10 +1618,12 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1618
1618
|
this.setOptionValueWithSource(name, val, valueSource);
|
|
1619
1619
|
};
|
|
1620
1620
|
this.on("option:" + oname, (val) => {
|
|
1621
|
-
|
|
1621
|
+
const invalidValueMessage = `error: option '${option.flags}' argument '${val}' is invalid.`;
|
|
1622
|
+
handleOptionValue(val, invalidValueMessage, "cli");
|
|
1622
1623
|
});
|
|
1623
1624
|
if (option.envVar) this.on("optionEnv:" + oname, (val) => {
|
|
1624
|
-
|
|
1625
|
+
const invalidValueMessage = `error: option '${option.flags}' value '${val}' from env '${option.envVar}' is invalid.`;
|
|
1626
|
+
handleOptionValue(val, invalidValueMessage, "env");
|
|
1625
1627
|
});
|
|
1626
1628
|
return this;
|
|
1627
1629
|
}
|
|
@@ -5243,7 +5245,8 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5243
5245
|
};
|
|
5244
5246
|
const extglobClose = (token) => {
|
|
5245
5247
|
const literal = input.slice(token.startIndex, state.index + 1);
|
|
5246
|
-
const
|
|
5248
|
+
const body = input.slice(token.startIndex + 2, state.index);
|
|
5249
|
+
const analysis = analyzeRepeatedExtglob(body, opts);
|
|
5247
5250
|
if ((token.type === "plus" || token.type === "star") && analysis.risky) {
|
|
5248
5251
|
const safeOutput = analysis.safeOutput ? (token.output ? "" : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput) : void 0;
|
|
5249
5252
|
const open = tokens[token.tokensIndex];
|
|
@@ -5369,7 +5372,8 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5369
5372
|
if (inner.includes(":")) {
|
|
5370
5373
|
const idx = prev.value.lastIndexOf("[");
|
|
5371
5374
|
const pre = prev.value.slice(0, idx);
|
|
5372
|
-
const
|
|
5375
|
+
const rest = prev.value.slice(idx + 2);
|
|
5376
|
+
const posix = POSIX_REGEX_SOURCE[rest];
|
|
5373
5377
|
if (posix) {
|
|
5374
5378
|
prev.value = pre + posix;
|
|
5375
5379
|
state.backtrack = true;
|
|
@@ -7319,7 +7323,8 @@ var require_async$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7319
7323
|
callSuccessCallback(callback, entries);
|
|
7320
7324
|
return;
|
|
7321
7325
|
}
|
|
7322
|
-
|
|
7326
|
+
const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
|
|
7327
|
+
rpl(tasks, (rplError, rplEntries) => {
|
|
7323
7328
|
if (rplError !== null) {
|
|
7324
7329
|
callFailureCallback(callback, rplError);
|
|
7325
7330
|
return;
|
|
@@ -7355,7 +7360,7 @@ var require_async$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7355
7360
|
callFailureCallback(callback, readdirError);
|
|
7356
7361
|
return;
|
|
7357
7362
|
}
|
|
7358
|
-
|
|
7363
|
+
const tasks = names.map((name) => {
|
|
7359
7364
|
const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
|
|
7360
7365
|
return (done) => {
|
|
7361
7366
|
fsStat.stat(path, settings.fsStatSettings, (error, stats) => {
|
|
@@ -7372,7 +7377,8 @@ var require_async$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7372
7377
|
done(null, entry);
|
|
7373
7378
|
});
|
|
7374
7379
|
};
|
|
7375
|
-
})
|
|
7380
|
+
});
|
|
7381
|
+
rpl(tasks, (rplError, entries) => {
|
|
7376
7382
|
if (rplError !== null) {
|
|
7377
7383
|
callFailureCallback(callback, rplError);
|
|
7378
7384
|
return;
|
|
@@ -10799,7 +10805,8 @@ var require_output_json = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10799
10805
|
const { stringify } = require_utils();
|
|
10800
10806
|
const { outputFile } = require_output_file();
|
|
10801
10807
|
async function outputJson(file, data, options = {}) {
|
|
10802
|
-
|
|
10808
|
+
const str = stringify(data, options);
|
|
10809
|
+
await outputFile(file, str, options);
|
|
10803
10810
|
}
|
|
10804
10811
|
module.exports = outputJson;
|
|
10805
10812
|
}));
|
|
@@ -10809,7 +10816,8 @@ var require_output_json_sync = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
10809
10816
|
const { stringify } = require_utils();
|
|
10810
10817
|
const { outputFileSync } = require_output_file();
|
|
10811
10818
|
function outputJsonSync(file, data, options) {
|
|
10812
|
-
|
|
10819
|
+
const str = stringify(data, options);
|
|
10820
|
+
outputFileSync(file, str, options);
|
|
10813
10821
|
}
|
|
10814
10822
|
module.exports = outputJsonSync;
|
|
10815
10823
|
}));
|
|
@@ -12337,7 +12345,8 @@ function getInstalledNativePackageCandidates(candidates, canResolve = (candidate
|
|
|
12337
12345
|
return candidates.filter(canResolve);
|
|
12338
12346
|
}
|
|
12339
12347
|
function getNativePackageCandidates(platform = process.platform, arch = process.arch) {
|
|
12340
|
-
|
|
12348
|
+
const platformArch = `${platform}-${arch}`;
|
|
12349
|
+
return NATIVE_PACKAGES[platformArch] || [];
|
|
12341
12350
|
}
|
|
12342
12351
|
function loadNative() {
|
|
12343
12352
|
if (nativeBinding !== void 0) {
|
|
@@ -15309,23 +15318,23 @@ function printPluralElement(el) {
|
|
|
15309
15318
|
[el.offset ? `offset:${el.offset}` : "", ...keys.map((id) => `${id}{${doPrintAST(el.options[id].value, true)}}`)].filter(Boolean).join(" ")
|
|
15310
15319
|
].join(",")}}`;
|
|
15311
15320
|
}
|
|
15312
|
-
/*! *****************************************************************************
|
|
15313
|
-
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
15314
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
15315
|
-
this file except in compliance with the License. You may obtain a copy of the
|
|
15316
|
-
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
15317
|
-
|
|
15318
|
-
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15319
|
-
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
15320
|
-
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
15321
|
-
MERCHANTABILITY OR NON-INFRINGEMENT.
|
|
15322
|
-
|
|
15323
|
-
See the Apache Version 2.0 License for specific language governing permissions
|
|
15324
|
-
and limitations under the License.
|
|
15325
|
-
***************************************************************************** */
|
|
15326
15321
|
//#endregion
|
|
15327
|
-
//#region node_modules/.aspect_rules_js
|
|
15328
|
-
var
|
|
15322
|
+
//#region node_modules/.aspect_rules_js/typescript@6.0.3/node_modules/typescript/lib/typescript.js
|
|
15323
|
+
var require_typescript$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
15324
|
+
/*! *****************************************************************************
|
|
15325
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
15326
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
15327
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
15328
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
15329
|
+
|
|
15330
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15331
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
15332
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
15333
|
+
MERCHANTABILITY OR NON-INFRINGEMENT.
|
|
15334
|
+
|
|
15335
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
15336
|
+
and limitations under the License.
|
|
15337
|
+
***************************************************************************** */
|
|
15329
15338
|
var ts = {};
|
|
15330
15339
|
((module$1) => {
|
|
15331
15340
|
"use strict";
|
|
@@ -56775,7 +56784,8 @@ ${lanes.join("\n")}
|
|
|
56775
56784
|
directoryToModuleNameMap.update(options2);
|
|
56776
56785
|
}
|
|
56777
56786
|
function getOrCreateCacheForDirectory(directoryName, redirectedReference) {
|
|
56778
|
-
|
|
56787
|
+
const path = toPath(directoryName, currentDirectory, getCanonicalFileName);
|
|
56788
|
+
return getOrCreateCache(directoryToModuleNameMap, redirectedReference, path, () => createModeAwareCache());
|
|
56779
56789
|
}
|
|
56780
56790
|
function getFromDirectoryCache(name, mode, directoryName, redirectedReference) {
|
|
56781
56791
|
var _a, _b;
|
|
@@ -65366,10 +65376,11 @@ ${lanes.join("\n")}
|
|
|
65366
65376
|
if (!specifier) {
|
|
65367
65377
|
const isBundle2 = !!compilerOptions.outFile;
|
|
65368
65378
|
const { moduleResolverHost } = context.tracker;
|
|
65369
|
-
|
|
65379
|
+
const specifierCompilerOptions = isBundle2 ? {
|
|
65370
65380
|
...compilerOptions,
|
|
65371
65381
|
baseUrl: moduleResolverHost.getCommonSourceDirectory()
|
|
65372
|
-
} : compilerOptions
|
|
65382
|
+
} : compilerOptions;
|
|
65383
|
+
specifier = first(getModuleSpecifiers(symbol, checker, specifierCompilerOptions, contextFile, moduleResolverHost, {
|
|
65373
65384
|
importModuleSpecifierPreference: isBundle2 ? "non-relative" : "project-relative",
|
|
65374
65385
|
importModuleSpecifierEnding: isBundle2 ? "minimal" : resolutionMode === 99 ? "js" : void 0
|
|
65375
65386
|
}, { overrideImportMode }));
|
|
@@ -66052,7 +66063,8 @@ ${lanes.join("\n")}
|
|
|
66052
66063
|
if (some(symbol.declarations, isPartOfParameterDeclaration)) return;
|
|
66053
66064
|
Debug.assertIsDefined(deferredPrivatesStack[deferredPrivatesStack.length - 1]);
|
|
66054
66065
|
getUnusedName(unescapeLeadingUnderscores(symbol.escapedName), symbol);
|
|
66055
|
-
|
|
66066
|
+
const isExternalImportAlias = !!(symbol.flags & 2097152) && !some(symbol.declarations, (d) => !!findAncestor(d, isExportDeclaration) || isNamespaceExport(d) || isImportEqualsDeclaration(d) && !isExternalModuleReference(d.moduleReference));
|
|
66067
|
+
deferredPrivatesStack[isExternalImportAlias ? 0 : deferredPrivatesStack.length - 1].set(getSymbolId(symbol), symbol);
|
|
66056
66068
|
}
|
|
66057
66069
|
function isExportingScope(enclosingDeclaration2) {
|
|
66058
66070
|
return isSourceFile(enclosingDeclaration2) && (isExternalOrCommonJsModule(enclosingDeclaration2) || isJsonSourceFile(enclosingDeclaration2)) || isAmbientModule(enclosingDeclaration2) && !isGlobalScopeAugmentation(enclosingDeclaration2);
|
|
@@ -81901,7 +81913,8 @@ ${lanes.join("\n")}
|
|
|
81901
81913
|
const exprType = getRegularTypeOfObjectLiteral(getBaseTypeOfLiteralType(links.assertionExpressionType));
|
|
81902
81914
|
const targetType = getTypeFromTypeNode(type);
|
|
81903
81915
|
if (!isErrorType(targetType)) addLazyDiagnostic(() => {
|
|
81904
|
-
|
|
81916
|
+
const widenedType = getWidenedType(exprType);
|
|
81917
|
+
if (!isTypeComparableTo(targetType, widenedType)) checkTypeComparableTo(exprType, targetType, errNode, Diagnostics.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first);
|
|
81905
81918
|
});
|
|
81906
81919
|
}
|
|
81907
81920
|
function checkNonNullChain(node) {
|
|
@@ -93649,7 +93662,8 @@ ${lanes.join("\n")}
|
|
|
93649
93662
|
setOriginalNode(getter, node);
|
|
93650
93663
|
setCommentRange(getter, commentRange);
|
|
93651
93664
|
setSourceMapRange(getter, sourceMapRange);
|
|
93652
|
-
const
|
|
93665
|
+
const setterModifiers = factory2.createModifiersFromModifierFlags(modifiersToFlags(modifiers));
|
|
93666
|
+
const setter = createAccessorPropertySetRedirector(factory2, node, setterModifiers, setterName, receiver);
|
|
93653
93667
|
setOriginalNode(setter, node);
|
|
93654
93668
|
setEmitFlags(setter, 3072);
|
|
93655
93669
|
setSourceMapRange(setter, sourceMapRange);
|
|
@@ -98092,7 +98106,8 @@ ${lanes.join("\n")}
|
|
|
98092
98106
|
const tagName = getTagName(node);
|
|
98093
98107
|
const attrs = node.attributes.properties;
|
|
98094
98108
|
const objectProperties = length(attrs) ? transformJsxAttributesToObjectProps(attrs) : factory2.createNull();
|
|
98095
|
-
const
|
|
98109
|
+
const callee = currentFileState.importSpecifier === void 0 ? createJsxFactoryExpression(factory2, context.getEmitResolver().getJsxFactoryEntity(currentSourceFile), compilerOptions.reactNamespace, node) : getImplicitImportForName("createElement");
|
|
98110
|
+
const element = createExpressionForJsxElement(factory2, callee, tagName, objectProperties, mapDefined(children, transformJsxChildToExpression), location);
|
|
98096
98111
|
if (isChild) startOnNewLine(element);
|
|
98097
98112
|
return element;
|
|
98098
98113
|
}
|
|
@@ -114688,7 +114703,8 @@ ${lanes.join("\n")}
|
|
|
114688
114703
|
}
|
|
114689
114704
|
function scheduleInvalidateResolutionsOfFailedLookupLocations() {
|
|
114690
114705
|
if (!host.setTimeout || !host.clearTimeout) return resolutionCache.invalidateResolutionsOfFailedLookupLocations();
|
|
114691
|
-
|
|
114706
|
+
const pending = clearInvalidateResolutionsOfFailedLookupLocations();
|
|
114707
|
+
writeLog(`Scheduling invalidateFailedLookup${pending ? ", Cancelled earlier one" : ""}`);
|
|
114692
114708
|
timerToInvalidateFailedLookupResolutions = host.setTimeout(invalidateResolutionsOfFailedLookup, 250, "timerToInvalidateFailedLookupResolutions");
|
|
114693
114709
|
}
|
|
114694
114710
|
function invalidateResolutionsOfFailedLookup() {
|
|
@@ -130379,7 +130395,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
130379
130395
|
const { sourceFile } = context;
|
|
130380
130396
|
const fixedDeclarations = /* @__PURE__ */ new Set();
|
|
130381
130397
|
return codeFixAll(context, errorCodes2, (t, diagnostic) => {
|
|
130382
|
-
const
|
|
130398
|
+
const span = diagnostic.relatedInformation && find(diagnostic.relatedInformation, (r) => r.code === Diagnostics.Did_you_mean_to_mark_this_function_as_async.code);
|
|
130399
|
+
const decl = getFixableErrorSpanDeclaration(sourceFile, span);
|
|
130383
130400
|
if (!decl) return;
|
|
130384
130401
|
const trackChanges = (cb) => (cb(t), []);
|
|
130385
130402
|
return getFix(context, decl, trackChanges, fixedDeclarations);
|
|
@@ -132964,7 +132981,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
132964
132981
|
return createModuleSpecifierResolutionHost(isFromPackageJson ? host.getPackageJsonAutoImportProvider() : program, host);
|
|
132965
132982
|
});
|
|
132966
132983
|
function addSymbol(moduleSymbol, toFile, exportedSymbol, exportKind, program2, isFromPackageJson) {
|
|
132967
|
-
|
|
132984
|
+
const moduleSpecifierResolutionHost = getModuleSpecifierResolutionHost(isFromPackageJson);
|
|
132985
|
+
if (isImportable(program2, fromFile, toFile, moduleSymbol, preferences, packageJsonFilter, moduleSpecifierResolutionHost, moduleSpecifierCache)) {
|
|
132968
132986
|
const checker = program2.getTypeChecker();
|
|
132969
132987
|
originalSymbolToExportInfos.add(getUniqueSymbolId(exportedSymbol, checker).toString(), {
|
|
132970
132988
|
symbol: exportedSymbol,
|
|
@@ -133941,7 +133959,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
133941
133959
|
eachDiagnostic(context, errorCodes28, (diag2) => {
|
|
133942
133960
|
const info = getInfo10(diag2.file, diag2.start, diag2.code, checker, context.program);
|
|
133943
133961
|
if (info === void 0) return;
|
|
133944
|
-
|
|
133962
|
+
const nodeId = getNodeId(info.parentDeclaration) + "#" + (info.kind === 3 ? info.identifier || getNodeId(info.token) : info.token.text);
|
|
133963
|
+
if (!addToSeen(seen, nodeId)) return;
|
|
133945
133964
|
if (fixId56 === fixMissingFunctionDeclaration && (info.kind === 2 || info.kind === 5)) addFunctionDeclaration(changes, context, info);
|
|
133946
133965
|
else if (fixId56 === fixMissingProperties && info.kind === 3) addObjectLiteralProperties(changes, context, info);
|
|
133947
133966
|
else if (fixId56 === fixMissingAttributes && info.kind === 4) addJsxAttributes(changes, context, info);
|
|
@@ -135324,7 +135343,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
135324
135343
|
const info = getInfo15(err.file, err.start, checker);
|
|
135325
135344
|
if (!info) return;
|
|
135326
135345
|
const { typeNode, type } = info;
|
|
135327
|
-
|
|
135346
|
+
const fixedType = typeNode.kind === 315 && fixId56 === fixIdNullable ? checker.getNullableType(type, 4) : type;
|
|
135347
|
+
doChange29(changes, sourceFile, typeNode, fixedType, checker);
|
|
135328
135348
|
});
|
|
135329
135349
|
}
|
|
135330
135350
|
});
|
|
@@ -139724,15 +139744,18 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
139724
139744
|
symbol: firstAccessibleSymbol,
|
|
139725
139745
|
targetFlags: skipAlias(firstAccessibleSymbol, typeChecker).flags
|
|
139726
139746
|
}], position, isValidTypeOnlyAliasUseSite(location)) || {};
|
|
139727
|
-
if (moduleSpecifier)
|
|
139728
|
-
|
|
139729
|
-
|
|
139730
|
-
|
|
139731
|
-
|
|
139732
|
-
|
|
139733
|
-
|
|
139734
|
-
|
|
139735
|
-
|
|
139747
|
+
if (moduleSpecifier) {
|
|
139748
|
+
const origin = {
|
|
139749
|
+
kind: getNullableSymbolOriginInfoKind(34),
|
|
139750
|
+
moduleSymbol,
|
|
139751
|
+
isDefaultExport: false,
|
|
139752
|
+
symbolName: firstAccessibleSymbol.name,
|
|
139753
|
+
exportName: firstAccessibleSymbol.name,
|
|
139754
|
+
fileName,
|
|
139755
|
+
moduleSpecifier
|
|
139756
|
+
};
|
|
139757
|
+
symbolToOriginInfoMap[index] = origin;
|
|
139758
|
+
}
|
|
139736
139759
|
}
|
|
139737
139760
|
} else if (preferences.includeCompletionsWithInsertText) {
|
|
139738
139761
|
if (firstAccessibleSymbolId && seenPropertySymbols.has(firstAccessibleSymbolId)) return;
|
|
@@ -140253,10 +140276,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
140253
140276
|
symbols = concatenate(symbols, filterClassMembersList(baseSymbols, decl.members, classElementModifierFlags));
|
|
140254
140277
|
forEach(symbols, (symbol, index) => {
|
|
140255
140278
|
const declaration = symbol == null ? void 0 : symbol.valueDeclaration;
|
|
140256
|
-
if (declaration && isClassElement(declaration) && declaration.name && isComputedPropertyName(declaration.name))
|
|
140257
|
-
|
|
140258
|
-
|
|
140259
|
-
|
|
140279
|
+
if (declaration && isClassElement(declaration) && declaration.name && isComputedPropertyName(declaration.name)) {
|
|
140280
|
+
const origin = {
|
|
140281
|
+
kind: 512,
|
|
140282
|
+
symbolName: typeChecker.symbolToString(symbol)
|
|
140283
|
+
};
|
|
140284
|
+
symbolToOriginInfoMap[index] = origin;
|
|
140285
|
+
}
|
|
140260
140286
|
});
|
|
140261
140287
|
}
|
|
140262
140288
|
return 1;
|
|
@@ -147165,7 +147191,7 @@ ${content}
|
|
|
147165
147191
|
if (symbolWasExpanded) return true;
|
|
147166
147192
|
if (canExpandSymbol(symbol2, typeWriterOut)) {
|
|
147167
147193
|
const symbolMeaning = semanticToSymbolMeaning(meaning);
|
|
147168
|
-
|
|
147194
|
+
const expandedDisplayParts = mapToDisplayParts((writer) => {
|
|
147169
147195
|
const nodes = typeChecker.getEmitResolver().symbolToDeclarations(symbol2, symbolMeaning, 17408, maximumLength, verbosityLevel !== void 0 ? verbosityLevel - 1 : void 0, typeWriterOut);
|
|
147170
147196
|
const printer = getPrinter();
|
|
147171
147197
|
const sourceFile2 = symbol2.valueDeclaration && getSourceFileOfNode(symbol2.valueDeclaration);
|
|
@@ -147173,7 +147199,8 @@ ${content}
|
|
|
147173
147199
|
if (i > 0) writer.writeLine();
|
|
147174
147200
|
printer.writeNode(4, node, sourceFile2, writer);
|
|
147175
147201
|
});
|
|
147176
|
-
}, maximumLength)
|
|
147202
|
+
}, maximumLength);
|
|
147203
|
+
addRange(displayParts, expandedDisplayParts);
|
|
147177
147204
|
symbolWasExpanded = true;
|
|
147178
147205
|
return true;
|
|
147179
147206
|
}
|
|
@@ -147247,10 +147274,11 @@ ${content}
|
|
|
147247
147274
|
}
|
|
147248
147275
|
}
|
|
147249
147276
|
function writeTypeParametersOfSymbol(symbol2, enclosingDeclaration2) {
|
|
147250
|
-
|
|
147277
|
+
const typeParameterParts = mapToDisplayParts((writer) => {
|
|
147251
147278
|
const params = typeChecker.symbolToTypeParameterDeclarations(symbol2, enclosingDeclaration2, symbolDisplayNodeBuilderFlags);
|
|
147252
147279
|
getPrinter().writeList(53776, params, getSourceFileOfNode(getParseTreeNode(enclosingDeclaration2)), writer);
|
|
147253
|
-
})
|
|
147280
|
+
});
|
|
147281
|
+
addRange(displayParts, typeParameterParts);
|
|
147254
147282
|
}
|
|
147255
147283
|
}
|
|
147256
147284
|
function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, enclosingDeclaration, location, semanticMeaning = getMeaningFromLocation(location), alias, maximumLength, verbosityLevel) {
|
|
@@ -153282,12 +153310,13 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
153282
153310
|
if (this.installTypingHost.fileExists(combinePaths(directory, "package.json"))) return directory;
|
|
153283
153311
|
}) || projectRootPath;
|
|
153284
153312
|
if (cwd) this.installWorker(-1, [packageName], cwd, (success) => {
|
|
153313
|
+
const message = success ? `Package ${packageName} installed.` : `There was an error installing ${packageName}.`;
|
|
153285
153314
|
const response = {
|
|
153286
153315
|
kind: ActionPackageInstalled,
|
|
153287
153316
|
projectName,
|
|
153288
153317
|
id,
|
|
153289
153318
|
success,
|
|
153290
|
-
message
|
|
153319
|
+
message
|
|
153291
153320
|
};
|
|
153292
153321
|
this.sendResponse(response);
|
|
153293
153322
|
});
|
|
@@ -162921,7 +162950,8 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
|
162921
162950
|
if (typeof module !== "undefined" && module.exports) module.exports = v;
|
|
162922
162951
|
}
|
|
162923
162952
|
});
|
|
162924
|
-
}))
|
|
162953
|
+
}));
|
|
162954
|
+
require_typescript$1();
|
|
162925
162955
|
const LEVEL_COLORS = {
|
|
162926
162956
|
debug: "green",
|
|
162927
162957
|
warn: "yellow",
|
|
@@ -163513,7 +163543,15 @@ async function resolveBuiltinFormatter(format) {
|
|
|
163513
163543
|
}
|
|
163514
163544
|
}
|
|
163515
163545
|
//#endregion
|
|
163546
|
+
//#region node_modules/.aspect_rules_js/@typescript+typescript6@6.0.2/node_modules/@typescript/typescript6/lib/typescript.js
|
|
163547
|
+
var require_typescript = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
163548
|
+
module.exports = require_typescript$1();
|
|
163549
|
+
}));
|
|
163550
|
+
//#endregion
|
|
163516
163551
|
//#region packages/cli-lib/parse_script.ts
|
|
163552
|
+
var import_compat = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
163553
|
+
module.exports = require_typescript();
|
|
163554
|
+
})))());
|
|
163517
163555
|
/**
|
|
163518
163556
|
* Invoid TypeScript module transpilation with our TS transformer
|
|
163519
163557
|
* @param opts Formatjs TS Transformer opt
|
|
@@ -163524,16 +163562,16 @@ function parseScript(opts, fn) {
|
|
|
163524
163562
|
let output;
|
|
163525
163563
|
try {
|
|
163526
163564
|
debug$1("Using TS compiler to process file", fn);
|
|
163527
|
-
output =
|
|
163565
|
+
output = import_compat.transpileModule(source, {
|
|
163528
163566
|
compilerOptions: {
|
|
163529
163567
|
allowJs: true,
|
|
163530
|
-
target:
|
|
163568
|
+
target: import_compat.ScriptTarget.ESNext,
|
|
163531
163569
|
noEmit: true,
|
|
163532
163570
|
experimentalDecorators: true
|
|
163533
163571
|
},
|
|
163534
163572
|
reportDiagnostics: true,
|
|
163535
163573
|
fileName: fn,
|
|
163536
|
-
transformers: { before: [transformWithTs(
|
|
163574
|
+
transformers: { before: [transformWithTs(import_compat, opts)] }
|
|
163537
163575
|
});
|
|
163538
163576
|
} catch (e) {
|
|
163539
163577
|
if (e instanceof Error) e.message = `Error processing file ${fn}
|
|
@@ -163541,11 +163579,11 @@ ${e.message || ""}`;
|
|
|
163541
163579
|
throw e;
|
|
163542
163580
|
}
|
|
163543
163581
|
if (output.diagnostics) {
|
|
163544
|
-
const errs = output.diagnostics.filter((d) => d.category ===
|
|
163545
|
-
if (errs.length) throw new Error(
|
|
163582
|
+
const errs = output.diagnostics.filter((d) => d.category === import_compat.DiagnosticCategory.Error);
|
|
163583
|
+
if (errs.length) throw new Error(import_compat.formatDiagnosticsWithColorAndContext(errs, {
|
|
163546
163584
|
getCanonicalFileName: (fileName) => fileName,
|
|
163547
163585
|
getCurrentDirectory: () => process.cwd(),
|
|
163548
|
-
getNewLine: () =>
|
|
163586
|
+
getNewLine: () => import_compat.sys.newLine
|
|
163549
163587
|
}));
|
|
163550
163588
|
}
|
|
163551
163589
|
};
|