@nubjs/nub-linux-x64 0.0.7 → 0.0.9
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/nub +0 -0
- package/package.json +1 -1
- package/runtime/addons/nub-native.node +0 -0
- package/runtime/node_modules/@js-temporal/polyfill/CHANGELOG.md +453 -0
- package/runtime/node_modules/@js-temporal/polyfill/LICENSE +13 -0
- package/runtime/node_modules/@js-temporal/polyfill/README.md +90 -0
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.cjs +2 -0
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.cjs.map +1 -0
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.esm.js +2 -0
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.esm.js.map +1 -0
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.umd.js +2 -0
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.umd.js.map +1 -0
- package/runtime/node_modules/@js-temporal/polyfill/index.d.cts +1215 -0
- package/runtime/node_modules/@js-temporal/polyfill/index.d.ts +1215 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/assert.ts +8 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/bigintmath.ts +39 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/calendar.ts +2424 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/debug.ts +7 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/duration.ts +438 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/durationformat.d.ts +93 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/ecmascript.ts +4973 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/index.ts +34 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/init.ts +43 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/instant.ts +138 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/internaltypes.d.ts +242 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/intl.ts +758 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/intrinsicclass.ts +162 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/legacydate.ts +17 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/math.ts +96 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/now.ts +48 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/plaindate.ts +212 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/plaindatetime.ts +274 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/plainmonthday.ts +110 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/plaintime.ts +154 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/plainyearmonth.ts +157 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/regex.ts +59 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/slots.ts +341 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/temporal.ts +10 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/timeduration.ts +149 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/zoneddatetime.ts +492 -0
- package/runtime/node_modules/@js-temporal/polyfill/package.json +143 -0
- package/runtime/node_modules/@oxc-project/runtime/CHANGELOG.md +88 -0
- package/runtime/node_modules/@oxc-project/runtime/LICENSE +22 -0
- package/runtime/node_modules/@oxc-project/runtime/README.md +5 -0
- package/runtime/node_modules/@oxc-project/runtime/package.json +1066 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/AwaitValue.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecoratedDescriptor.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs.js +236 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2203.js +184 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2203R.js +191 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2301.js +222 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2305.js +133 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2311.js +124 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/arrayLikeToArray.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/arrayWithHoles.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/arrayWithoutHoles.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/assertClassBrand.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/assertThisInitialized.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/asyncGeneratorDelegate.js +24 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js +45 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/asyncToGenerator.js +26 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/callSuper.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/checkInRHS.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/checkPrivateRedeclaration.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classApplyDescriptorDestructureSet.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classApplyDescriptorGet.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classApplyDescriptorSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classCallCheck.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classCheckPrivateStaticAccess.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classCheckPrivateStaticFieldDescriptor.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classExtractFieldDescriptor.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classNameTDZError.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldDestructureSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldGet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldGet2.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldInitSpec.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldLooseBase.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldLooseKey.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldSet2.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateGetter.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateMethodGet.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateMethodInitSpec.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateMethodSet.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateSetter.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateFieldDestructureSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateFieldSpecGet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateFieldSpecSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateMethodGet.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateMethodSet.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/construct.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/createClass.js +13 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/createForOfIteratorHelper.js +50 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/createForOfIteratorHelperLoose.js +19 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/createSuper.js +16 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/decorate.js +23 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/decorateMetadata.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/decorateParam.js +11 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/defaults.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/defineAccessor.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/defineEnumerableProperties.js +12 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/dispose.js +28 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/AwaitValue.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/OverloadYield.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecoratedDescriptor.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs.js +236 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2203.js +184 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2203R.js +191 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2301.js +222 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2305.js +133 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2311.js +124 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/arrayLikeToArray.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/arrayWithHoles.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/arrayWithoutHoles.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/assertClassBrand.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/assertThisInitialized.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/asyncGeneratorDelegate.js +24 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/asyncIterator.js +45 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/asyncToGenerator.js +26 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/awaitAsyncGenerator.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/callSuper.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/checkInRHS.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/checkPrivateRedeclaration.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classApplyDescriptorDestructureSet.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classApplyDescriptorGet.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classApplyDescriptorSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classCallCheck.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classCheckPrivateStaticAccess.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classExtractFieldDescriptor.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classNameTDZError.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldDestructureSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldGet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldGet2.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldInitSpec.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldLooseBase.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldLooseKey.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldSet2.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateGetter.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateMethodGet.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateMethodInitSpec.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateMethodSet.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateSetter.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateFieldDestructureSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateFieldSpecGet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateFieldSpecSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateMethodGet.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateMethodSet.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/construct.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createClass.js +13 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createForOfIteratorHelper.js +50 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createForOfIteratorHelperLoose.js +19 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createSuper.js +16 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/decorate.js +21 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/decorateMetadata.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/decorateParam.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defaults.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defineAccessor.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defineEnumerableProperties.js +12 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defineProperty.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/dispose.js +28 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/extends.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/get.js +11 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/getPrototypeOf.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/identity.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/importDeferProxy.js +27 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/inherits.js +14 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/inheritsLoose.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/initializerDefineProperty.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/initializerWarningHelper.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/instanceof.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/interopRequireDefault.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/interopRequireWildcard.js +27 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/isNativeFunction.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/isNativeReflectConstruct.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/iterableToArray.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/iterableToArrayLimit.js +28 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/jsx.js +22 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/maybeArrayLike.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/newArrowCheck.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/nonIterableRest.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/nonIterableSpread.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/nullishReceiverError.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectDestructuringEmpty.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectSpread.js +14 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectSpread2.js +23 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectWithoutProperties.js +13 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectWithoutPropertiesLoose.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/package.json +3 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/possibleConstructorReturn.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/readOnlyError.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/regeneratorRuntime.js +304 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/set.js +22 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/setFunctionName.js +12 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/setPrototypeOf.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/skipFirstGeneratorNext.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/slicedToArray.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/superPropBase.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/superPropGet.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/superPropSet.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/taggedTemplateLiteral.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/taggedTemplateLiteralLoose.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/tdz.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/temporalRef.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/temporalUndefined.js +2 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toArray.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toConsumableArray.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toPrimitive.js +12 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toPropertyKey.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toSetter.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/typeof.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/unsupportedIterableToArray.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/using.js +12 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/usingCtx.js +59 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/wrapAsyncGenerator.js +69 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/wrapNativeSuper.js +27 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/wrapRegExp.js +51 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/writeOnlyError.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/extends.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/get.js +11 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/getPrototypeOf.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/identity.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/importDeferProxy.js +27 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/inherits.js +14 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/inheritsLoose.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/initializerDefineProperty.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/initializerWarningHelper.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/instanceof.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/interopRequireDefault.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/interopRequireWildcard.js +27 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/isNativeFunction.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/isNativeReflectConstruct.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/iterableToArray.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/iterableToArrayLimit.js +28 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/jsx.js +22 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/maybeArrayLike.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/newArrowCheck.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/nonIterableRest.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/nonIterableSpread.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/nullishReceiverError.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectDestructuringEmpty.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectSpread.js +14 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js +23 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js +13 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/possibleConstructorReturn.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/readOnlyError.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/regeneratorRuntime.js +304 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/set.js +22 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/setFunctionName.js +12 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/setPrototypeOf.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/skipFirstGeneratorNext.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/slicedToArray.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/superPropBase.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/superPropGet.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/superPropSet.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/taggedTemplateLiteral.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/taggedTemplateLiteralLoose.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/tdz.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/temporalRef.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/temporalUndefined.js +2 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toArray.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toConsumableArray.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js +12 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toSetter.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/typeof.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/unsupportedIterableToArray.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/using.js +12 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js +59 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js +69 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/wrapNativeSuper.js +27 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/wrapRegExp.js +51 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/writeOnlyError.js +4 -0
- package/runtime/node_modules/@oxc-project/types/LICENSE +22 -0
- package/runtime/node_modules/@oxc-project/types/README.md +3 -0
- package/runtime/node_modules/@oxc-project/types/package.json +26 -0
- package/runtime/node_modules/@oxc-project/types/types.d.ts +1912 -0
- package/runtime/node_modules/@petamoriken/float16/LICENSE +21 -0
- package/runtime/node_modules/@petamoriken/float16/README.md +413 -0
- package/runtime/node_modules/@petamoriken/float16/browser/float16.js +1340 -0
- package/runtime/node_modules/@petamoriken/float16/browser/float16.mjs +1325 -0
- package/runtime/node_modules/@petamoriken/float16/index.d.ts +546 -0
- package/runtime/node_modules/@petamoriken/float16/index.v5.6.d.ts +546 -0
- package/runtime/node_modules/@petamoriken/float16/index.v5.7.d.ts +555 -0
- package/runtime/node_modules/@petamoriken/float16/inspect/node.cjs +25 -0
- package/runtime/node_modules/@petamoriken/float16/inspect/node.mjs +23 -0
- package/runtime/node_modules/@petamoriken/float16/lib/DataView.cjs +16 -0
- package/runtime/node_modules/@petamoriken/float16/lib/Float16Array.cjs +690 -0
- package/runtime/node_modules/@petamoriken/float16/lib/_util/arrayIterator.cjs +52 -0
- package/runtime/node_modules/@petamoriken/float16/lib/_util/brand.cjs +27 -0
- package/runtime/node_modules/@petamoriken/float16/lib/_util/converter.cjs +111 -0
- package/runtime/node_modules/@petamoriken/float16/lib/_util/is.cjs +78 -0
- package/runtime/node_modules/@petamoriken/float16/lib/_util/messages.cjs +18 -0
- package/runtime/node_modules/@petamoriken/float16/lib/_util/primordials.cjs +150 -0
- package/runtime/node_modules/@petamoriken/float16/lib/_util/spec.cjs +84 -0
- package/runtime/node_modules/@petamoriken/float16/lib/f16round.cjs +10 -0
- package/runtime/node_modules/@petamoriken/float16/lib/index.cjs +16 -0
- package/runtime/node_modules/@petamoriken/float16/lib/isTypedArray.cjs +11 -0
- package/runtime/node_modules/@petamoriken/float16/package.json +115 -0
- package/runtime/node_modules/@petamoriken/float16/src/DataView.mjs +35 -0
- package/runtime/node_modules/@petamoriken/float16/src/Float16Array.mjs +1194 -0
- package/runtime/node_modules/@petamoriken/float16/src/_util/arrayIterator.mjs +86 -0
- package/runtime/node_modules/@petamoriken/float16/src/_util/brand.mjs +31 -0
- package/runtime/node_modules/@petamoriken/float16/src/_util/converter.mjs +173 -0
- package/runtime/node_modules/@petamoriken/float16/src/_util/is.mjs +151 -0
- package/runtime/node_modules/@petamoriken/float16/src/_util/messages.mjs +22 -0
- package/runtime/node_modules/@petamoriken/float16/src/_util/primordials.mjs +254 -0
- package/runtime/node_modules/@petamoriken/float16/src/_util/spec.mjs +137 -0
- package/runtime/node_modules/@petamoriken/float16/src/f16round.mjs +10 -0
- package/runtime/node_modules/@petamoriken/float16/src/index.mjs +7 -0
- package/runtime/node_modules/@petamoriken/float16/src/isTypedArray.mjs +10 -0
- package/runtime/node_modules/get-tsconfig/LICENSE +21 -0
- package/runtime/node_modules/get-tsconfig/README.md +268 -0
- package/runtime/node_modules/get-tsconfig/dist/index.cjs +7 -0
- package/runtime/node_modules/get-tsconfig/dist/index.d.cts +2116 -0
- package/runtime/node_modules/get-tsconfig/dist/index.d.mts +2116 -0
- package/runtime/node_modules/get-tsconfig/dist/index.mjs +7 -0
- package/runtime/node_modules/get-tsconfig/package.json +46 -0
- package/runtime/node_modules/jsbi/LICENSE +176 -0
- package/runtime/node_modules/jsbi/README.md +173 -0
- package/runtime/node_modules/jsbi/dist/jsbi-cjs.js +2 -0
- package/runtime/node_modules/jsbi/dist/jsbi-cjs.js.map +1 -0
- package/runtime/node_modules/jsbi/dist/jsbi-umd.js +2 -0
- package/runtime/node_modules/jsbi/dist/jsbi-umd.js.map +1 -0
- package/runtime/node_modules/jsbi/dist/jsbi.mjs +2 -0
- package/runtime/node_modules/jsbi/dist/jsbi.mjs.map +1 -0
- package/runtime/node_modules/jsbi/jsbi.d.ts +43 -0
- package/runtime/node_modules/jsbi/package.json +35 -0
- package/runtime/node_modules/oxc-parser/LICENSE +22 -0
- package/runtime/node_modules/oxc-parser/README.md +167 -0
- package/runtime/node_modules/oxc-parser/package.json +153 -0
- package/runtime/node_modules/oxc-parser/src-js/bindings.js +601 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/constants.js +105 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/deserialize/js.js +5862 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/deserialize/js_range.js +6403 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/deserialize/ts.js +6154 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/deserialize/ts_range.js +6723 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/lazy/constructors.js +13875 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/lazy/type_ids.js +191 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/lazy/walk.js +5810 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/visit/keys.js +220 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/visit/type_ids.js +177 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/visit/visitor.d.ts +387 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/visit/walk.js +2455 -0
- package/runtime/node_modules/oxc-parser/src-js/index.d.ts +312 -0
- package/runtime/node_modules/oxc-parser/src-js/index.js +108 -0
- package/runtime/node_modules/oxc-parser/src-js/raw-transfer/common.js +301 -0
- package/runtime/node_modules/oxc-parser/src-js/raw-transfer/eager.js +255 -0
- package/runtime/node_modules/oxc-parser/src-js/raw-transfer/lazy-common.js +11 -0
- package/runtime/node_modules/oxc-parser/src-js/raw-transfer/lazy.js +162 -0
- package/runtime/node_modules/oxc-parser/src-js/raw-transfer/node-array.js +365 -0
- package/runtime/node_modules/oxc-parser/src-js/raw-transfer/supported.js +52 -0
- package/runtime/node_modules/oxc-parser/src-js/raw-transfer/visitor.js +127 -0
- package/runtime/node_modules/oxc-parser/src-js/visit/index.js +41 -0
- package/runtime/node_modules/oxc-parser/src-js/visit/visitor.js +405 -0
- package/runtime/node_modules/oxc-parser/src-js/wasm.js +13 -0
- package/runtime/node_modules/oxc-parser/src-js/webcontainer-fallback.cjs +21 -0
- package/runtime/node_modules/oxc-parser/src-js/wrap.js +57 -0
- package/runtime/node_modules/oxc-transform/LICENSE +22 -0
- package/runtime/node_modules/oxc-transform/README.md +84 -0
- package/runtime/node_modules/oxc-transform/browser.js +1 -0
- package/runtime/node_modules/oxc-transform/index.d.ts +658 -0
- package/runtime/node_modules/oxc-transform/index.js +598 -0
- package/runtime/node_modules/oxc-transform/package.json +114 -0
- package/runtime/node_modules/oxc-transform/webcontainer-fallback.cjs +21 -0
- package/runtime/node_modules/resolve-pkg-maps/LICENSE +21 -0
- package/runtime/node_modules/resolve-pkg-maps/README.md +216 -0
- package/runtime/node_modules/resolve-pkg-maps/dist/index.cjs +1 -0
- package/runtime/node_modules/resolve-pkg-maps/dist/index.d.cts +11 -0
- package/runtime/node_modules/resolve-pkg-maps/dist/index.d.mts +11 -0
- package/runtime/node_modules/resolve-pkg-maps/dist/index.mjs +1 -0
- package/runtime/node_modules/resolve-pkg-maps/package.json +42 -0
- package/runtime/node_modules/urlpattern-polyfill/LICENSE +19 -0
- package/runtime/node_modules/urlpattern-polyfill/README.md +242 -0
- package/runtime/node_modules/urlpattern-polyfill/dist/index.d.ts +9 -0
- package/runtime/node_modules/urlpattern-polyfill/dist/types.d.ts +49 -0
- package/runtime/node_modules/urlpattern-polyfill/dist/urlpattern.cjs +1 -0
- package/runtime/node_modules/urlpattern-polyfill/dist/urlpattern.js +1 -0
- package/runtime/node_modules/urlpattern-polyfill/index.cjs +7 -0
- package/runtime/node_modules/urlpattern-polyfill/index.js +7 -0
- package/runtime/node_modules/urlpattern-polyfill/package.json +149 -0
- package/runtime/version.mjs +1 -1
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img width="160" src=".github/logo.webp">
|
|
3
|
+
</p>
|
|
4
|
+
<h1 align="center">
|
|
5
|
+
<sup>get-tsconfig</sup>
|
|
6
|
+
<br>
|
|
7
|
+
<a href="https://npm.im/get-tsconfig"><img src="https://badgen.net/npm/v/get-tsconfig"></a> <a href="https://npm.im/get-tsconfig"><img src="https://badgen.net/npm/dm/get-tsconfig"></a>
|
|
8
|
+
</h1>
|
|
9
|
+
|
|
10
|
+
Find and parse `tsconfig.json` files.
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
- Zero dependency (not even TypeScript)
|
|
14
|
+
- Tested against TypeScript for correctness
|
|
15
|
+
- Supports comments & dangling commas in `tsconfig.json`
|
|
16
|
+
- Resolves [`extends`](https://www.typescriptlang.org/tsconfig/#extends)
|
|
17
|
+
- Fully typed `tsconfig.json`
|
|
18
|
+
- Validates and throws parsing errors
|
|
19
|
+
- Tiny! `7 kB` Minified + Gzipped
|
|
20
|
+
|
|
21
|
+
<br>
|
|
22
|
+
|
|
23
|
+
<p align="center">
|
|
24
|
+
<a href="https://github.com/sponsors/privatenumber/sponsorships?tier_id=398771"><img width="412" src="https://raw.githubusercontent.com/privatenumber/sponsors/master/banners/assets/donate.webp"></a>
|
|
25
|
+
<a href="https://github.com/sponsors/privatenumber/sponsorships?tier_id=397608"><img width="412" src="https://raw.githubusercontent.com/privatenumber/sponsors/master/banners/assets/sponsor.webp"></a>
|
|
26
|
+
</p>
|
|
27
|
+
<p align="center"><sup><i>Already a sponsor?</i> Join the discussion in the <a href="https://github.com/pvtnbr/get-tsconfig">Development repo</a>!</sup></p>
|
|
28
|
+
|
|
29
|
+
## Install
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install get-tsconfig
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Why?
|
|
36
|
+
For TypeScript related tooling to correctly parse `tsconfig.json` file without depending on TypeScript.
|
|
37
|
+
|
|
38
|
+
## API
|
|
39
|
+
|
|
40
|
+
### getTsconfig(searchPath?, configName?, cache?, includes?)
|
|
41
|
+
|
|
42
|
+
Searches for a tsconfig file (defaults to `tsconfig.json`) in the `searchPath` and parses it. (If you already know the tsconfig path, use [`parseTsconfig`](#parsetsconfigtsconfigpath-cache) instead). Returns `null` if a config file cannot be found, or an object containing the path and parsed TSConfig object if found.
|
|
43
|
+
|
|
44
|
+
Returns:
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
type TsconfigResult = {
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The path to the tsconfig.json file
|
|
51
|
+
*/
|
|
52
|
+
path: string
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The resolved tsconfig.json file
|
|
56
|
+
*/
|
|
57
|
+
config: TsConfigJsonResolved
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
#### searchPath
|
|
62
|
+
Type: `string`
|
|
63
|
+
|
|
64
|
+
Default: `process.cwd()`
|
|
65
|
+
|
|
66
|
+
Path to a source file or directory. The directory tree is searched up for a `tsconfig.json` file. Typically a TypeScript/JavaScript file path (e.g. `./src/index.ts`), but a directory path also works if you don't have a specific file.
|
|
67
|
+
|
|
68
|
+
#### configName
|
|
69
|
+
Type: `string`
|
|
70
|
+
|
|
71
|
+
Default: `tsconfig.json`
|
|
72
|
+
|
|
73
|
+
The file name of the TypeScript config file.
|
|
74
|
+
|
|
75
|
+
#### cache
|
|
76
|
+
Type: `Map<string, any>`
|
|
77
|
+
|
|
78
|
+
Default: `new Map()`
|
|
79
|
+
|
|
80
|
+
Optional cache for fs operations.
|
|
81
|
+
|
|
82
|
+
#### includes
|
|
83
|
+
Type: `boolean`
|
|
84
|
+
|
|
85
|
+
Default: `false`
|
|
86
|
+
|
|
87
|
+
When `true` and `searchPath` is a file path, validates that the found tsconfig applies to the file (via `files`, `include`, and `exclude`). If the file isn't matched, continues searching parent directories.
|
|
88
|
+
|
|
89
|
+
By default, `getTsconfig` returns the nearest tsconfig — matching `tsc` CLI behavior ([`findConfigFile()`](https://github.com/microsoft/TypeScript/blob/b19a9da2a3b8/src/compiler/program.ts#L328)). With `includes`, it checks the file is included by `include`/`files` and not excluded by `exclude` before accepting the tsconfig — matching VS Code's TypeScript Language Server behavior ([`isMatchedByConfig()`](https://github.com/microsoft/TypeScript/blob/b19a9da2a3b8/src/server/editorServices.ts#L4486)).
|
|
90
|
+
|
|
91
|
+
#### Example
|
|
92
|
+
|
|
93
|
+
```ts
|
|
94
|
+
import { getTsconfig } from 'get-tsconfig'
|
|
95
|
+
|
|
96
|
+
// Searches for tsconfig.json starting in the current directory
|
|
97
|
+
console.log(getTsconfig())
|
|
98
|
+
|
|
99
|
+
// Find tsconfig.json from a TypeScript file path
|
|
100
|
+
console.log(getTsconfig('./path/to/index.ts'))
|
|
101
|
+
|
|
102
|
+
// Find tsconfig.json from a directory file path
|
|
103
|
+
console.log(getTsconfig('./path/to/directory'))
|
|
104
|
+
|
|
105
|
+
// Explicitly pass in tsconfig.json path
|
|
106
|
+
console.log(getTsconfig('./path/to/tsconfig.json'))
|
|
107
|
+
|
|
108
|
+
// Search for jsconfig.json - https://code.visualstudio.com/docs/languages/jsconfig
|
|
109
|
+
console.log(getTsconfig('.', 'jsconfig.json'))
|
|
110
|
+
|
|
111
|
+
// Find the tsconfig that actually applies to a file (Language Server behavior)
|
|
112
|
+
// Skips tsconfig files where the file is excluded or not included
|
|
113
|
+
console.log(getTsconfig('./src/index.ts', 'tsconfig.json', new Map(), true))
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
### findTsconfig(searchPath?, configName?, cache?, includes?)
|
|
119
|
+
|
|
120
|
+
Searches for a tsconfig file by walking up the directory tree. Returns the path to the found tsconfig file, or `undefined` if not found.
|
|
121
|
+
|
|
122
|
+
Supports the same [`includes`](#includes) option as `getTsconfig` to validate that the tsconfig applies to the `searchPath` file.
|
|
123
|
+
|
|
124
|
+
#### Example
|
|
125
|
+
|
|
126
|
+
```ts
|
|
127
|
+
import { findTsconfig } from 'get-tsconfig'
|
|
128
|
+
|
|
129
|
+
// Find the tsconfig.json path
|
|
130
|
+
findTsconfig()
|
|
131
|
+
|
|
132
|
+
// Find the tsconfig that includes the file
|
|
133
|
+
findTsconfig('./src/index.ts', 'tsconfig.json', new Map(), true)
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
### parseTsconfig(tsconfigPath, cache?)
|
|
139
|
+
|
|
140
|
+
Parse the tsconfig file provided. Used internally by `getTsconfig`. Returns the parsed tsconfig as `TsConfigJsonResolved`.
|
|
141
|
+
|
|
142
|
+
#### tsconfigPath
|
|
143
|
+
Type: `string`
|
|
144
|
+
|
|
145
|
+
Required path to the tsconfig file.
|
|
146
|
+
|
|
147
|
+
#### cache
|
|
148
|
+
Type: `Map<string, any>`
|
|
149
|
+
|
|
150
|
+
Default: `new Map()`
|
|
151
|
+
|
|
152
|
+
Optional cache for fs operations.
|
|
153
|
+
|
|
154
|
+
#### Example
|
|
155
|
+
|
|
156
|
+
```ts
|
|
157
|
+
import { parseTsconfig } from 'get-tsconfig'
|
|
158
|
+
|
|
159
|
+
// Must pass in a path to an existing tsconfig.json file
|
|
160
|
+
console.log(parseTsconfig('./path/to/tsconfig.custom.json'))
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
### createFilesMatcher(tsconfig: TsconfigResult, caseSensitivePaths?: boolean)
|
|
166
|
+
|
|
167
|
+
Given a `tsconfig.json` file, it returns a file-matcher function that determines whether it should apply to a file path.
|
|
168
|
+
|
|
169
|
+
```ts
|
|
170
|
+
type FileMatcher = (filePath: string) => TsconfigResult['config'] | undefined
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
#### tsconfig
|
|
174
|
+
Type: `TsconfigResult`
|
|
175
|
+
|
|
176
|
+
Pass in the return value from `getTsconfig`, or a `TsconfigResult` object.
|
|
177
|
+
|
|
178
|
+
#### caseSensitivePaths
|
|
179
|
+
Type: `boolean`
|
|
180
|
+
|
|
181
|
+
By default, it uses [`is-fs-case-sensitive`](https://github.com/privatenumber/is-fs-case-sensitive) to detect whether the file-system is case-sensitive.
|
|
182
|
+
|
|
183
|
+
Pass in `true` to make it case-sensitive.
|
|
184
|
+
|
|
185
|
+
#### Example
|
|
186
|
+
|
|
187
|
+
For example, if it's called with a `tsconfig.json` file that has `include`/`exclude`/`files` defined, the file-matcher will return the config for files that match `include`/`files`, and return `undefined` for files that don't match or match `exclude`.
|
|
188
|
+
|
|
189
|
+
```ts
|
|
190
|
+
const tsconfig = getTsconfig()
|
|
191
|
+
const fileMatcher = tsconfig && createFilesMatcher(tsconfig)
|
|
192
|
+
|
|
193
|
+
/*
|
|
194
|
+
* Returns tsconfig.json if it matches the file,
|
|
195
|
+
* undefined if not
|
|
196
|
+
*/
|
|
197
|
+
const configForFile = fileMatcher?.('/path/to/file.ts')
|
|
198
|
+
const distCode = compileTypescript({
|
|
199
|
+
code: sourceCode,
|
|
200
|
+
tsconfig: configForFile
|
|
201
|
+
})
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
### createPathsMatcher(tsconfig: TsconfigResult)
|
|
207
|
+
|
|
208
|
+
Given a tsconfig with [`compilerOptions.paths`](https://www.typescriptlang.org/tsconfig#paths) defined, it returns a matcher function.
|
|
209
|
+
|
|
210
|
+
The matcher function accepts an [import specifier (the path to resolve)](https://nodejs.org/api/esm.html#terminology), checks it against `compilerOptions.paths`, and returns an array of possible paths to check:
|
|
211
|
+
```ts
|
|
212
|
+
function pathsMatcher(specifier: string): string[]
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
This function only returns possible paths and doesn't actually do any resolution. This helps increase compatibility wtih file/build systems which usually have their own resolvers.
|
|
216
|
+
|
|
217
|
+
#### Example
|
|
218
|
+
|
|
219
|
+
```ts
|
|
220
|
+
import { getTsconfig, createPathsMatcher } from 'get-tsconfig'
|
|
221
|
+
|
|
222
|
+
const tsconfig = getTsconfig()
|
|
223
|
+
const pathsMatcher = createPathsMatcher(tsconfig)
|
|
224
|
+
|
|
225
|
+
const exampleResolver = (request: string) => {
|
|
226
|
+
if (pathsMatcher) {
|
|
227
|
+
const tryPaths = pathsMatcher(request)
|
|
228
|
+
|
|
229
|
+
// Check if paths in `tryPaths` exist
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
## FAQ
|
|
235
|
+
|
|
236
|
+
### How can I use TypeScript to parse `tsconfig.json`?
|
|
237
|
+
This package is a re-implementation of TypeScript's `tsconfig.json` parser.
|
|
238
|
+
|
|
239
|
+
However, if you already have TypeScript as a dependency, you can simply use it's API:
|
|
240
|
+
|
|
241
|
+
```ts
|
|
242
|
+
import {
|
|
243
|
+
sys as tsSys,
|
|
244
|
+
findConfigFile,
|
|
245
|
+
readConfigFile,
|
|
246
|
+
parseJsonConfigFileContent
|
|
247
|
+
} from 'typescript'
|
|
248
|
+
|
|
249
|
+
// Find tsconfig.json file
|
|
250
|
+
const tsconfigPath = findConfigFile(process.cwd(), tsSys.fileExists, 'tsconfig.json')
|
|
251
|
+
|
|
252
|
+
// Read tsconfig.json file
|
|
253
|
+
const tsconfigFile = readConfigFile(tsconfigPath, tsSys.readFile)
|
|
254
|
+
|
|
255
|
+
// Resolve extends
|
|
256
|
+
const parsedTsconfig = parseJsonConfigFileContent(
|
|
257
|
+
tsconfigFile.config,
|
|
258
|
+
tsSys,
|
|
259
|
+
path.dirname(tsconfigPath)
|
|
260
|
+
)
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
## Sponsors
|
|
264
|
+
<p align="center">
|
|
265
|
+
<a href="https://github.com/sponsors/privatenumber">
|
|
266
|
+
<img src="https://cdn.jsdelivr.net/gh/privatenumber/sponsors/sponsorkit/sponsors.svg">
|
|
267
|
+
</a>
|
|
268
|
+
</p>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";var Be=Object.defineProperty;var r=(e,t)=>Be(e,"name",{value:t,configurable:!0});var d=require("node:path"),ce=require("node:fs"),xe=require("node:module"),Ie=require("resolve-pkg-maps"),$e=require("fs"),Ue=require("os"),Re=require("path");function h(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}r(h,"slash");const K=r(e=>{const t=ce[e];return(s,...n)=>{const i=`${e}:${n.join(":")}`;let l=s==null?void 0:s.get(i);return l===void 0&&(l=Reflect.apply(t,ce,n),s==null||s.set(i,l)),l}},"cacheFs"),B=K("existsSync"),Se=K("readFileSync"),q=K("statSync"),O=r((e,t,s)=>{for(;;){const n=d.posix.join(e,t);if(B(s,n))return n;const i=d.dirname(e);if(i===e)return;e=i}},"findUp"),C=/^\.{1,2}(\/.*)?$/,Q=r(e=>{const t=h(e);return C.test(t)?t:`./${t}`},"normalizeRelativePath");function Ne(e,t=!1){const s=e.length;let n=0,i="",l=0,o=16,f=0,u=0,g=0,m=0,w=0;function _(c,j){let y=0,T=0;for(;y<c;){let k=e.charCodeAt(n);if(k>=48&&k<=57)T=T*16+k-48;else if(k>=65&&k<=70)T=T*16+k-65+10;else if(k>=97&&k<=102)T=T*16+k-97+10;else break;n++,y++}return y<c&&(T=-1),T}r(_,"scanHexDigits");function b(c){n=c,i="",l=0,o=16,w=0}r(b,"setPosition");function p(){let c=n;if(e.charCodeAt(n)===48)n++;else for(n++;n<e.length&&R(e.charCodeAt(n));)n++;if(n<e.length&&e.charCodeAt(n)===46)if(n++,n<e.length&&R(e.charCodeAt(n)))for(n++;n<e.length&&R(e.charCodeAt(n));)n++;else return w=3,e.substring(c,n);let j=n;if(n<e.length&&(e.charCodeAt(n)===69||e.charCodeAt(n)===101))if(n++,(n<e.length&&e.charCodeAt(n)===43||e.charCodeAt(n)===45)&&n++,n<e.length&&R(e.charCodeAt(n))){for(n++;n<e.length&&R(e.charCodeAt(n));)n++;j=n}else w=3;return e.substring(c,j)}r(p,"scanNumber");function L(){let c="",j=n;for(;;){if(n>=s){c+=e.substring(j,n),w=2;break}const y=e.charCodeAt(n);if(y===34){c+=e.substring(j,n),n++;break}if(y===92){if(c+=e.substring(j,n),n++,n>=s){w=2;break}switch(e.charCodeAt(n++)){case 34:c+='"';break;case 92:c+="\\";break;case 47:c+="/";break;case 98:c+="\b";break;case 102:c+="\f";break;case 110:c+=`
|
|
2
|
+
`;break;case 114:c+="\r";break;case 116:c+=" ";break;case 117:const k=_(4);k>=0?c+=String.fromCharCode(k):w=4;break;default:w=5}j=n;continue}if(y>=0&&y<=31)if(M(y)){c+=e.substring(j,n),w=2;break}else w=6;n++}return c}r(L,"scanString");function A(){if(i="",w=0,l=n,u=f,m=g,n>=s)return l=s,o=17;let c=e.charCodeAt(n);if(ee(c)){do n++,i+=String.fromCharCode(c),c=e.charCodeAt(n);while(ee(c));return o=15}if(M(c))return n++,i+=String.fromCharCode(c),c===13&&e.charCodeAt(n)===10&&(n++,i+=`
|
|
3
|
+
`),f++,g=n,o=14;switch(c){case 123:return n++,o=1;case 125:return n++,o=2;case 91:return n++,o=3;case 93:return n++,o=4;case 58:return n++,o=6;case 44:return n++,o=5;case 34:return n++,i=L(),o=10;case 47:const j=n-1;if(e.charCodeAt(n+1)===47){for(n+=2;n<s&&!M(e.charCodeAt(n));)n++;return i=e.substring(j,n),o=12}if(e.charCodeAt(n+1)===42){n+=2;const y=s-1;let T=!1;for(;n<y;){const k=e.charCodeAt(n);if(k===42&&e.charCodeAt(n+1)===47){n+=2,T=!0;break}n++,M(k)&&(k===13&&e.charCodeAt(n)===10&&n++,f++,g=n)}return T||(n++,w=1),i=e.substring(j,n),o=13}return i+=String.fromCharCode(c),n++,o=16;case 45:if(i+=String.fromCharCode(c),n++,n===s||!R(e.charCodeAt(n)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=p(),o=11;default:for(;n<s&&D(c);)n++,c=e.charCodeAt(n);if(l!==n){switch(i=e.substring(l,n),i){case"true":return o=8;case"false":return o=9;case"null":return o=7}return o=16}return i+=String.fromCharCode(c),n++,o=16}}r(A,"scanNext");function D(c){if(ee(c)||M(c))return!1;switch(c){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}r(D,"isUnknownContentCharacter");function x(){let c;do c=A();while(c>=12&&c<=15);return c}return r(x,"scanNextNonTrivia"),{setPosition:b,getPosition:r(()=>n,"getPosition"),scan:t?x:A,getToken:r(()=>o,"getToken"),getTokenValue:r(()=>i,"getTokenValue"),getTokenOffset:r(()=>l,"getTokenOffset"),getTokenLength:r(()=>n-l,"getTokenLength"),getTokenStartLine:r(()=>u,"getTokenStartLine"),getTokenStartCharacter:r(()=>l-m,"getTokenStartCharacter"),getTokenError:r(()=>w,"getTokenError")}}r(Ne,"createScanner");function ee(e){return e===32||e===9}r(ee,"isWhiteSpace");function M(e){return e===10||e===13}r(M,"isLineBreak");function R(e){return e>=48&&e<=57}r(R,"isDigit");var ge;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(ge||(ge={})),new Array(20).fill(0).map((e,t)=>" ".repeat(t));const S=200;new Array(S).fill(0).map((e,t)=>`
|
|
4
|
+
`+" ".repeat(t)),new Array(S).fill(0).map((e,t)=>"\r"+" ".repeat(t)),new Array(S).fill(0).map((e,t)=>`\r
|
|
5
|
+
`+" ".repeat(t)),new Array(S).fill(0).map((e,t)=>`
|
|
6
|
+
`+" ".repeat(t)),new Array(S).fill(0).map((e,t)=>"\r"+" ".repeat(t)),new Array(S).fill(0).map((e,t)=>`\r
|
|
7
|
+
`+" ".repeat(t));var H;(function(e){e.DEFAULT={allowTrailingComma:!1}})(H||(H={}));function Pe(e,t=[],s=H.DEFAULT){let n=null,i=[];const l=[];function o(u){Array.isArray(i)?i.push(u):n!==null&&(i[n]=u)}return r(o,"onValue"),We(e,{onObjectBegin:r(()=>{const u={};o(u),l.push(i),i=u,n=null},"onObjectBegin"),onObjectProperty:r(u=>{n=u},"onObjectProperty"),onObjectEnd:r(()=>{i=l.pop()},"onObjectEnd"),onArrayBegin:r(()=>{const u=[];o(u),l.push(i),i=u,n=null},"onArrayBegin"),onArrayEnd:r(()=>{i=l.pop()},"onArrayEnd"),onLiteralValue:o,onError:r((u,g,m)=>{t.push({error:u,offset:g,length:m})},"onError")},s),i[0]}r(Pe,"parse$1");function We(e,t,s=H.DEFAULT){const n=Ne(e,!1),i=[];let l=0;function o(v){return v?()=>l===0&&v(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}r(o,"toNoArgVisit");function f(v){return v?F=>l===0&&v(F,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}r(f,"toOneArgVisit");function u(v){return v?F=>l===0&&v(F,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>i.slice()):()=>!0}r(u,"toOneArgVisitWithPath");function g(v){return v?()=>{l>0?l++:v(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>i.slice())===!1&&(l=1)}:()=>!0}r(g,"toBeginVisit");function m(v){return v?()=>{l>0&&l--,l===0&&v(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter())}:()=>!0}r(m,"toEndVisit");const w=g(t.onObjectBegin),_=u(t.onObjectProperty),b=m(t.onObjectEnd),p=g(t.onArrayBegin),L=m(t.onArrayEnd),A=u(t.onLiteralValue),D=f(t.onSeparator),x=o(t.onComment),c=f(t.onError),j=s&&s.disallowComments,y=s&&s.allowTrailingComma;function T(){for(;;){const v=n.scan();switch(n.getTokenError()){case 4:k(14);break;case 5:k(15);break;case 3:k(13);break;case 1:j||k(11);break;case 2:k(12);break;case 6:k(16);break}switch(v){case 12:case 13:j?k(10):x();break;case 16:k(1);break;case 15:case 14:break;default:return v}}}r(T,"scanNext");function k(v,F=[],W=[]){if(c(v),F.length+W.length>0){let $=n.getToken();for(;$!==17;){if(F.indexOf($)!==-1){T();break}else if(W.indexOf($)!==-1)break;$=T()}}}r(k,"handleError");function P(v){const F=n.getTokenValue();return v?A(F):(_(F),i.push(F)),T(),!0}r(P,"parseString");function J(){switch(n.getToken()){case 11:const v=n.getTokenValue();let F=Number(v);isNaN(F)&&(k(2),F=0),A(F);break;case 7:A(null);break;case 8:A(!0);break;case 9:A(!1);break;default:return!1}return T(),!0}r(J,"parseLiteral");function V(){return n.getToken()!==10?(k(3,[],[2,5]),!1):(P(!1),n.getToken()===6?(D(":"),T(),U()||k(4,[],[2,5])):k(5,[],[2,5]),i.pop(),!0)}r(V,"parseProperty");function z(){w(),T();let v=!1;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(v||k(4,[],[]),D(","),T(),n.getToken()===2&&y)break}else v&&k(6,[],[]);V()||k(4,[],[2,5]),v=!0}return b(),n.getToken()!==2?k(7,[2],[]):T(),!0}r(z,"parseObject");function G(){p(),T();let v=!0,F=!1;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(F||k(4,[],[]),D(","),T(),n.getToken()===4&&y)break}else F&&k(6,[],[]);v?(i.push(0),v=!1):i[i.length-1]++,U()||k(4,[],[4,5]),F=!0}return L(),v||i.pop(),n.getToken()!==4?k(8,[4],[]):T(),!0}r(G,"parseArray");function U(){switch(n.getToken()){case 3:return G();case 1:return z();case 10:return P(!0);default:return J()}}return r(U,"parseValue"),T(),n.getToken()===17?s.allowEmptyContent?!0:(k(4,[],[]),!1):U()?(n.getToken()!==17&&k(9,[],[]),!0):(k(4,[],[]),!1)}r(We,"visit");var ke;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(ke||(ke={}));var de;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(de||(de={}));const Me=Pe;var we;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(we||(we={}));const me=r((e,t)=>Me(Se(t,e,"utf8")),"readJsonc"),ne=Symbol("implicitBaseUrl"),E="${configDir}",Je=r(()=>{const{findPnpApi:e}=xe;return e&&e(process.cwd())},"getPnpApi"),te=r((e,t,s,n)=>{const i=`resolveFromPackageJsonPath:${e}:${t}:${s}`;if(n!=null&&n.has(i))return n.get(i);const l=me(e,n);if(!l)return;let o=t||"tsconfig.json";if(!s&&l.exports)try{const[f]=Ie.resolveExports(l.exports,t,["require","types"]);o=f}catch{return!1}else!t&&l.tsconfig&&(o=l.tsconfig);return o=d.join(e,"..",o),n==null||n.set(i,o),o},"resolveFromPackageJsonPath"),se="package.json",le="tsconfig.json",Ve=r((e,t,s)=>{let n=e;if(e===".."&&(n=d.join(n,le)),e[0]==="."&&(n=d.resolve(t,n)),d.isAbsolute(n)){if(B(s,n)){if(q(s,n).isFile())return n}else if(!n.endsWith(".json")){const b=`${n}.json`;if(B(s,b))return b}return}const[i,...l]=e.split("/"),o=i[0]==="@"?`${i}/${l.shift()}`:i,f=l.join("/"),u=Je();if(u){const{resolveRequest:b}=u;try{if(o===e){const p=b(d.join(o,se),t);if(p){const L=te(p,f,!1,s);if(L&&B(s,L))return L}}else{let p;try{p=b(e,t,{extensions:[".json"]})}catch{p=b(d.join(e,le),t)}if(p)return p}}catch{}}const g=O(d.resolve(t),d.join("node_modules",o),s);if(!g||!q(s,g).isDirectory())return;const m=d.join(g,se);if(B(s,m)){const b=te(m,f,!1,s);if(b===!1)return;if(b&&B(s,b)&&q(s,b).isFile())return b}const w=d.join(g,f),_=w.endsWith(".json");if(!_){const b=`${w}.json`;if(B(s,b))return b}if(B(s,w)){if(q(s,w).isDirectory()){const b=d.join(w,se);if(B(s,b)){const L=te(b,"",!0,s);if(L&&B(s,L))return L}const p=d.join(w,le);if(B(s,p))return p}else if(_)return w}},"resolveExtendsPath"),ie=r((e,t)=>Q(d.relative(e,t)),"pathRelative"),ve=["files","include","exclude"],N=r((e,t,s)=>{const n=d.join(t,s),i=d.relative(e,n);return h(i)||"./"},"resolveAndRelativize"),ze=r((e,t,s)=>{const n=d.relative(e,t);if(!n)return s;const i=s.startsWith("./")?s.slice(2):s;return h(`${n}/${i}`)},"prefixPattern"),Ge=r((e,t,s,n)=>{const i=Ve(e,t,n);if(!i)throw new Error(`File '${e}' not found.`);if(s.has(i))throw new Error(`Circularity detected while resolving configuration: ${i}`);s.add(i);const l=d.dirname(i),o=pe(i,n,s);delete o.references;const{compilerOptions:f}=o;if(f){const{baseUrl:u}=f;u&&!u.startsWith(E)&&(f.baseUrl=N(t,l,u));const{outDir:g}=f;g&&!g.startsWith(E)&&(f.outDir=N(t,l,g));const{declarationDir:m}=f;m&&!m.startsWith(E)&&(f.declarationDir=N(t,l,m));const{rootDir:w}=f;w&&!w.startsWith(E)&&(f.rootDir=N(t,l,w));const{rootDirs:_}=f;_&&(f.rootDirs=_.map(p=>p.startsWith(E)?p:N(t,l,p)));const{typeRoots:b}=f;b&&(f.typeRoots=b.map(p=>p.startsWith(E)?p:N(t,l,p)))}for(const u of ve){const g=o[u];g&&(o[u]=g.map(m=>m.startsWith(E)?m:ze(t,l,m)))}return o},"resolveExtends"),be=["outDir","declarationDir"],pe=r((e,t,s=new Set)=>{let n;try{n=me(e,t)||{}}catch{throw new Error(`Cannot resolve tsconfig at path: ${e}`)}if(typeof n!="object")throw new SyntaxError(`Failed to parse tsconfig at: ${e}`);const i=d.dirname(e);if(n.compilerOptions){const{compilerOptions:l}=n;l.paths&&!l.baseUrl&&(l[ne]=i)}if(n.extends){const l=Array.isArray(n.extends)?n.extends:[n.extends];delete n.extends;for(const o of l.reverse()){const f=Ge(o,i,new Set(s),t),u={...f,...n,compilerOptions:{...f.compilerOptions,...n.compilerOptions}};f.watchOptions&&(u.watchOptions={...f.watchOptions,...n.watchOptions}),n=u}}if(n.compilerOptions){const{compilerOptions:l}=n,o=["baseUrl","rootDir"];for(const f of o){const u=l[f];if(u&&!u.startsWith(E)){const g=d.resolve(i,u),m=ie(i,g);l[f]=m}}for(const f of be){let u=l[f];u&&(Array.isArray(n.exclude)||(n.exclude=be.map(g=>l[g]).filter(Boolean)),u.startsWith(E)||(u=Q(u)),l[f]=u)}}else n.compilerOptions={};if(n.include&&(n.include=n.include.map(h)),n.files&&(n.files=n.files.map(l=>l.startsWith(E)?l:Q(l))),n.watchOptions){const{watchOptions:l}=n;l.excludeDirectories&&(l.excludeDirectories=l.excludeDirectories.map(o=>h(d.resolve(i,o)))),l.excludeFiles&&(l.excludeFiles=l.excludeFiles.map(o=>h(d.resolve(i,o)))),l.watchFile&&(l.watchFile=l.watchFile.toLowerCase()),l.watchDirectory&&(l.watchDirectory=l.watchDirectory.toLowerCase()),l.fallbackPolling&&(l.fallbackPolling=l.fallbackPolling.toLowerCase())}return n},"_parseTsconfig"),X=r((e,t)=>{if(e.startsWith(E))return h(d.join(t,e.slice(E.length)))},"interpolateConfigDir"),qe=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],Qe=r(e=>{var t,s,n,i,l,o,f,u,g,m,w,_,b,p,L,A,D,x,c,j,y,T,k,P,J,V,z,G,U,v,F,W,$;if(e.strict){const a=["noImplicitAny","noImplicitThis","strictNullChecks","strictFunctionTypes","strictBindCallApply","strictPropertyInitialization","strictBuiltinIteratorReturn","alwaysStrict","useUnknownInCatchVariables"];for(const I of a)e[I]===void 0&&(e[I]=!0)}if(e.composite&&((t=e.declaration)!=null||(e.declaration=!0),(s=e.incremental)!=null||(e.incremental=!0)),e.target){let a=e.target.toLowerCase();a==="es2015"&&(a="es6"),e.target=a,a==="esnext"&&((n=e.module)!=null||(e.module="es6"),(i=e.useDefineForClassFields)!=null||(e.useDefineForClassFields=!0)),(a==="es6"||a==="es2016"||a==="es2017"||a==="es2018"||a==="es2019"||a==="es2020"||a==="es2021"||a==="es2022"||a==="es2023"||a==="es2024")&&((l=e.module)!=null||(e.module="es6")),(a==="es2022"||a==="es2023"||a==="es2024")&&((o=e.useDefineForClassFields)!=null||(e.useDefineForClassFields=!0))}if(e.module){let a=e.module.toLowerCase();if(a==="es2015"&&(a="es6"),e.module=a,(a==="es6"||a==="es2020"||a==="es2022"||a==="esnext"||a==="none"||a==="system"||a==="umd"||a==="amd")&&((f=e.moduleResolution)!=null||(e.moduleResolution="classic")),a==="system"&&((u=e.allowSyntheticDefaultImports)!=null||(e.allowSyntheticDefaultImports=!0)),(a==="node16"||a==="node18"||a==="node20"||a==="nodenext"||a==="preserve")&&((g=e.esModuleInterop)!=null||(e.esModuleInterop=!0),(m=e.allowSyntheticDefaultImports)!=null||(e.allowSyntheticDefaultImports=!0)),(a==="node16"||a==="node18"||a==="node20"||a==="nodenext")&&((w=e.moduleDetection)!=null||(e.moduleDetection="force")),a==="node16"&&((_=e.target)!=null||(e.target="es2022"),(b=e.moduleResolution)!=null||(e.moduleResolution="node16")),a==="node18"&&((p=e.target)!=null||(e.target="es2022"),(L=e.moduleResolution)!=null||(e.moduleResolution="node16")),a==="node20"&&((A=e.target)!=null||(e.target="es2023"),(D=e.moduleResolution)!=null||(e.moduleResolution="node16"),(x=e.resolveJsonModule)!=null||(e.resolveJsonModule=!0)),a==="nodenext"&&((c=e.target)!=null||(e.target="esnext"),(j=e.moduleResolution)!=null||(e.moduleResolution="nodenext"),(y=e.resolveJsonModule)!=null||(e.resolveJsonModule=!0)),a==="node16"||a==="node18"||a==="node20"||a==="nodenext"){const I=e.target;(I==="es3"||I==="es2022"||I==="es2023"||I==="es2024"||I==="esnext")&&((T=e.useDefineForClassFields)!=null||(e.useDefineForClassFields=!0))}a==="preserve"&&((k=e.moduleResolution)!=null||(e.moduleResolution="bundler"))}if(e.moduleResolution){let a=e.moduleResolution.toLowerCase();a==="node"&&(a="node10"),e.moduleResolution=a,(a==="node16"||a==="nodenext"||a==="bundler")&&((P=e.resolvePackageJsonExports)!=null||(e.resolvePackageJsonExports=!0),(J=e.resolvePackageJsonImports)!=null||(e.resolvePackageJsonImports=!0)),a==="bundler"&&((V=e.allowSyntheticDefaultImports)!=null||(e.allowSyntheticDefaultImports=!0),(z=e.resolveJsonModule)!=null||(e.resolveJsonModule=!0))}e.jsx&&(e.jsx=e.jsx.toLowerCase()),e.moduleDetection&&(e.moduleDetection=e.moduleDetection.toLowerCase()),e.importsNotUsedAsValues&&(e.importsNotUsedAsValues=e.importsNotUsedAsValues.toLowerCase()),e.newLine&&(e.newLine=e.newLine.toLowerCase()),e.esModuleInterop&&((G=e.allowSyntheticDefaultImports)!=null||(e.allowSyntheticDefaultImports=!0)),e.verbatimModuleSyntax&&((U=e.isolatedModules)!=null||(e.isolatedModules=!0),(v=e.preserveConstEnums)!=null||(e.preserveConstEnums=!0)),e.isolatedModules&&((F=e.preserveConstEnums)!=null||(e.preserveConstEnums=!0)),e.rewriteRelativeImportExtensions&&((W=e.allowImportingTsExtensions)!=null||(e.allowImportingTsExtensions=!0)),e.lib&&(e.lib=e.lib.map(a=>a.toLowerCase())),e.checkJs&&(($=e.allowJs)!=null||(e.allowJs=!0))},"normalizeCompilerOptions"),oe=r((e,t=new Map)=>{const s=d.resolve(e),n=pe(s,t),i=d.dirname(s),{compilerOptions:l}=n;if(l){for(const f of qe){const u=l[f];if(u){const g=X(u,i);l[f]=g?ie(i,g):u}}for(const f of["rootDirs","typeRoots"]){const u=l[f];u&&(l[f]=u.map(g=>{const m=X(g,i);return m?ie(i,m):Q(g)}))}const{paths:o}=l;if(o)for(const f of Object.keys(o))o[f]=o[f].map(u=>{var g;return(g=X(u,i))!=null?g:u});Qe(l)}for(const o of ve){const f=n[o];f&&(n[o]=f.map(u=>{var g;return(g=X(u,i))!=null?g:u}))}return n},"parseTsconfig");var He=Object.defineProperty,Y=r((e,t)=>He(e,"name",{value:t,configurable:!0}),"s");const Te=Y(e=>{let t="";for(let s=0;s<e.length;s+=1){const n=e[s],i=n.toUpperCase();t+=n===i?n.toLowerCase():i}return t},"invertCase"),re=new Map,Ae=Y((e,t)=>{const s=Re.join(e,`.is-fs-case-sensitive-test-${process.pid}`);try{return t.writeFileSync(s,""),!t.existsSync(Te(s))}finally{try{t.unlinkSync(s)}catch{}}},"checkDirectoryCaseWithWrite"),Xe=Y((e,t,s)=>{try{return Ae(e,s)}catch(n){if(t===void 0)return Ae(Ue.tmpdir(),s);throw n}},"checkDirectoryCaseWithFallback"),Ye=Y((e,t=$e,s=!0)=>{const n=e!=null?e:process.cwd();if(s&&re.has(n))return re.get(n);let i;const l=Te(n);return l!==n&&t.existsSync(n)?i=!t.existsSync(l):i=Xe(n,e,t),s&&re.set(n,i),i},"isFsCaseSensitive"),{join:_e}=d.posix,ue={ts:[".ts",".tsx",".d.ts"],cts:[".cts",".d.cts"],mts:[".mts",".d.mts"]},Ze=r(e=>{const t=[...ue.ts],s=[...ue.cts],n=[...ue.mts];return e!=null&&e.allowJs&&(t.push(".js",".jsx"),s.push(".cjs"),n.push(".mjs")),[...t,...s,...n]},"getSupportedExtensions"),Ke=r(e=>{const t=[];if(!e)return t;const{outDir:s,declarationDir:n}=e;return s&&t.push(s),n&&t.push(n),t},"getDefaultExcludeSpec"),ye=r(e=>e.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`),"escapeForRegexp"),Oe=["node_modules","bower_components","jspm_packages"],fe=`(?!(${Oe.join("|")})(/|$))`,Ce=/(?:^|\/)[^.*?]+$/,je="**/*",Z="[^/]",ae="[^./]",Fe=process.platform==="win32",De=r(({config:e,path:t},s=Ye())=>{if("extends"in e)throw new Error("tsconfig#extends must be resolved. Use getTsconfig or parseTsconfig to resolve it.");if(!d.isAbsolute(t))throw new Error("The tsconfig path must be absolute");Fe&&(t=h(t));const n=d.dirname(t),{files:i,include:l,exclude:o,compilerOptions:f}=e,u=r(A=>d.isAbsolute(A)?A:_e(n,A),"resolvePattern"),g=i==null?void 0:i.map(u),m=Ze(f),w=s?"":"i",b=(o||Ke(f)).map(A=>{const D=u(A),x=ye(D).replaceAll(String.raw`\*\*/`,"(.+/)?").replaceAll(String.raw`\*`,`${Z}*`).replaceAll(String.raw`\?`,Z);return new RegExp(`^${x}($|/)`,w)}),p=i||l?l:[je],L=p?p.map(A=>{let D=u(A);Ce.test(D)&&(D=_e(D,je));const x=ye(D).replaceAll(String.raw`/\*\*`,`(/${fe}${ae}${Z}*)*?`).replaceAll(/(\/)?\\\*/g,(c,j)=>{const y=`(${ae}|(\\.(?!min\\.js$))?)*`;return j?`/${fe}${ae}${y}`:y}).replaceAll(/(\/)?\\\?/g,(c,j)=>{const y=Z;return j?`/${fe}${y}`:y});return new RegExp(`^${x}$`,w)}):void 0;return A=>{if(!d.isAbsolute(A))throw new Error("filePath must be absolute");if(Fe&&(A=h(A)),g!=null&&g.includes(A))return e;if(!(!m.some(D=>A.endsWith(D))||b.some(D=>D.test(A)))&&L&&L.some(D=>D.test(A)))return e}},"createFilesMatcher"),Le=r((e,t,s)=>{const n=d.resolve(e);let i=h(e);for(;;){const l=O(i,t,s);if(!l)return;const o=d.resolve(l),f=oe(o,s),u={path:h(o),config:f};if(De(u)(n))return u;const m=d.dirname(l),w=d.dirname(m);if(w===m)return;i=w}},"findConfigApplicable"),he=r((e=process.cwd(),t="tsconfig.json",s=new Map,n=!1)=>{var i;return n?(i=Le(e,t,s))==null?void 0:i.path:O(h(e),t,s)},"findTsconfig"),en=r((e=process.cwd(),t="tsconfig.json",s=new Map,n=!1)=>{var i;if(!n){const l=he(e,t,s);if(!l)return null;const o=oe(l,s);return{path:l,config:o}}return(i=Le(e,t,s))!=null?i:null},"getTsconfig"),nn=/\*/g,Ee=r((e,t)=>{const s=e.match(nn);if(s&&s.length>1)throw new Error(t)},"assertStarCount"),tn=r(e=>{if(e.includes("*")){const[t,s]=e.split("*");return{prefix:t,suffix:s}}return e},"parsePattern"),sn=r(({prefix:e,suffix:t},s)=>s.startsWith(e)&&s.endsWith(t),"isPatternMatch"),ln=r((e,t,s)=>Object.entries(e).map(([n,i])=>(Ee(n,`Pattern '${n}' can have at most one '*' character.`),{pattern:tn(n),substitutions:i.map(l=>{if(Ee(l,`Substitution '${l}' in pattern '${n}' can have at most one '*' character.`),!t&&!C.test(l)&&!d.isAbsolute(l))throw new Error("Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?");return d.resolve(s,l)})})),"parsePaths"),on=r(e=>{const{compilerOptions:t}=e.config;if(!t)return null;const{baseUrl:s,paths:n}=t;if(!s&&!n)return null;const i=ne in t&&t[ne],l=d.resolve(d.dirname(e.path),s||i||"."),o=n?ln(n,s,l):[];return f=>{if(C.test(f))return[];const u=[];for(const _ of o){if(_.pattern===f)return _.substitutions.map(h);typeof _.pattern!="string"&&u.push(_)}let g,m=-1;for(const _ of u)sn(_.pattern,f)&&_.pattern.prefix.length>m&&(m=_.pattern.prefix.length,g=_);if(!g)return s?[h(d.join(l,f))]:[];const w=f.slice(g.pattern.prefix.length,f.length-g.pattern.suffix.length);return g.substitutions.map(_=>h(_.replace("*",w)))}},"createPathsMatcher");exports.createFilesMatcher=De,exports.createPathsMatcher=on,exports.findTsconfig=he,exports.getTsconfig=en,exports.parseTsconfig=oe;
|