@amabeth/repeating-wheel-picker 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -20
- package/README.md +57 -44
- package/example/index.ts +8 -0
- package/example/node_modules/@expo/cli/static/template/+html.tsx +28 -0
- package/example/node_modules/@expo/cli/static/template/+native-intent.ts +9 -0
- package/example/node_modules/@expo/cli/static/template/[...rsc]+api.ts +16 -0
- package/example/node_modules/ansi-styles/index.d.ts +345 -0
- package/example/node_modules/chalk/index.d.ts +415 -0
- package/example/node_modules/commander/typings/index.d.ts +627 -0
- package/example/node_modules/expo/Expo.podspec +108 -0
- package/example/node_modules/expo/build/Expo.d.ts +8 -0
- package/example/node_modules/expo/build/Expo.fx.d.ts +4 -0
- package/example/node_modules/expo/build/Expo.fx.web.d.ts +3 -0
- package/example/node_modules/expo/build/devtools/DevToolsPluginClient.d.ts +72 -0
- package/example/node_modules/expo/build/devtools/DevToolsPluginClientFactory.d.ts +16 -0
- package/example/node_modules/expo/build/devtools/DevToolsPluginClientImplApp.d.ts +15 -0
- package/example/node_modules/expo/build/devtools/DevToolsPluginClientImplBrowser.d.ts +14 -0
- package/example/node_modules/expo/build/devtools/MessageFramePacker.d.ts +50 -0
- package/example/node_modules/expo/build/devtools/ProtocolVersion.d.ts +7 -0
- package/example/node_modules/expo/build/devtools/WebSocketBackingStore.d.ts +10 -0
- package/example/node_modules/expo/build/devtools/WebSocketWithReconnect.d.ts +81 -0
- package/example/node_modules/expo/build/devtools/devtools.types.d.ts +42 -0
- package/example/node_modules/expo/build/devtools/getConnectionInfo.d.ts +6 -0
- package/example/node_modules/expo/build/devtools/getConnectionInfo.native.d.ts +6 -0
- package/example/node_modules/expo/build/devtools/index.d.ts +12 -0
- package/example/node_modules/expo/build/devtools/logger.d.ts +6 -0
- package/example/node_modules/expo/build/dom/base.d.ts +5 -0
- package/example/node_modules/expo/build/dom/dom-entry.d.ts +3 -0
- package/example/node_modules/expo/build/dom/dom-hooks.d.ts +8 -0
- package/example/node_modules/expo/build/dom/dom.d.ts +5 -0
- package/example/node_modules/expo/build/dom/dom.types.d.ts +34 -0
- package/example/node_modules/expo/build/dom/dom.web.d.ts +3 -0
- package/example/node_modules/expo/build/dom/global-events.d.ts +4 -0
- package/example/node_modules/expo/build/dom/injection.d.ts +9 -0
- package/example/node_modules/expo/build/dom/internal.d.ts +3 -0
- package/example/node_modules/expo/build/dom/internal.web.d.ts +2 -0
- package/example/node_modules/expo/build/dom/marshal.d.ts +4 -0
- package/example/node_modules/expo/build/dom/webview/ExpoDOMWebView.d.ts +6 -0
- package/example/node_modules/expo/build/dom/webview/RNWebView.d.ts +7 -0
- package/example/node_modules/expo/build/dom/webview/useDebugZeroHeight.d.ts +12 -0
- package/example/node_modules/expo/build/dom/webview-wrapper.d.ts +16 -0
- package/example/node_modules/expo/build/environment/DevLoadingView.d.ts +3 -0
- package/example/node_modules/expo/build/environment/DevLoadingView.web.d.ts +3 -0
- package/example/node_modules/expo/build/environment/DevLoadingViewNativeModule.d.ts +9 -0
- package/example/node_modules/expo/build/environment/DevLoadingViewNativeModule.native.d.ts +3 -0
- package/example/node_modules/expo/build/environment/ExpoGo.d.ts +31 -0
- package/example/node_modules/expo/build/environment/ExpoGo.web.d.ts +3 -0
- package/example/node_modules/expo/build/environment/getInitialSafeArea.d.ts +7 -0
- package/example/node_modules/expo/build/environment/getInitialSafeArea.native.d.ts +11 -0
- package/example/node_modules/expo/build/errors/AppEntryNotFound.d.ts +2 -0
- package/example/node_modules/expo/build/errors/ExpoErrorManager.d.ts +8 -0
- package/example/node_modules/expo/build/errors/ExpoErrorManager.native.d.ts +4 -0
- package/example/node_modules/expo/build/hooks/useEvent.d.ts +59 -0
- package/example/node_modules/expo/build/launch/registerRootComponent.d.ts +30 -0
- package/example/node_modules/expo/build/launch/withDevTools.d.ts +3 -0
- package/example/node_modules/expo/build/launch/withDevTools.ios.d.ts +7 -0
- package/example/node_modules/expo/build/launch/withDevTools.web.d.ts +3 -0
- package/example/node_modules/expo/build/timer/polyfillNextTick.d.ts +6 -0
- package/example/node_modules/expo/build/utils/blobUtils.d.ts +9 -0
- package/example/node_modules/expo/build/utils/getBundleUrl.d.ts +2 -0
- package/example/node_modules/expo/build/utils/getBundleUrl.native.d.ts +2 -0
- package/example/node_modules/expo/build/utils/getBundleUrl.web.d.ts +2 -0
- package/example/node_modules/expo/build/winter/FormData.d.ts +49 -0
- package/example/node_modules/expo/build/winter/ImportMetaRegistry.d.ts +9 -0
- package/example/node_modules/expo/build/winter/TextDecoder.d.ts +20 -0
- package/example/node_modules/expo/build/winter/fetch/ExpoFetchModule.d.ts +2 -0
- package/example/node_modules/expo/build/winter/fetch/ExpoFetchModule.web.d.ts +10 -0
- package/example/node_modules/expo/build/winter/fetch/FetchErrors.d.ts +8 -0
- package/example/node_modules/expo/build/winter/fetch/FetchResponse.d.ts +31 -0
- package/example/node_modules/expo/build/winter/fetch/NativeRequest.d.ts +30 -0
- package/example/node_modules/expo/build/winter/fetch/RequestUtils.d.ts +21 -0
- package/example/node_modules/expo/build/winter/fetch/convertFormData.d.ts +19 -0
- package/example/node_modules/expo/build/winter/fetch/fetch.d.ts +4 -0
- package/example/node_modules/expo/build/winter/fetch/fetch.types.d.ts +16 -0
- package/example/node_modules/expo/build/winter/fetch/fetch.web.d.ts +2 -0
- package/example/node_modules/expo/build/winter/fetch/index.d.ts +3 -0
- package/example/node_modules/expo/build/winter/index.d.ts +2 -0
- package/example/node_modules/expo/build/winter/runtime.d.ts +2 -0
- package/example/node_modules/expo/build/winter/runtime.native.d.ts +2 -0
- package/example/node_modules/expo/build/winter/url.d.ts +23 -0
- package/example/node_modules/expo/config-plugins.d.ts +1 -0
- package/example/node_modules/expo/config.d.ts +1 -0
- package/example/node_modules/expo/devtools.d.ts +1 -0
- package/example/node_modules/expo/dom/global.d.ts +1 -0
- package/example/node_modules/expo/dom/index.d.ts +1 -0
- package/example/node_modules/expo/dom/internal.d.ts +1 -0
- package/example/node_modules/expo/fetch.d.ts +1 -0
- package/example/node_modules/expo/fingerprint.d.ts +1 -0
- package/example/node_modules/expo/metro-config.d.ts +1 -0
- package/example/node_modules/expo/react-native.config.js +50 -0
- package/example/node_modules/expo/src/Expo.fx.tsx +53 -0
- package/example/node_modules/expo/src/Expo.fx.web.tsx +21 -0
- package/example/node_modules/expo/src/Expo.ts +30 -0
- package/example/node_modules/expo/src/devtools/DevToolsPluginClient.ts +240 -0
- package/example/node_modules/expo/src/devtools/DevToolsPluginClientFactory.ts +73 -0
- package/example/node_modules/expo/src/devtools/DevToolsPluginClientImplApp.ts +56 -0
- package/example/node_modules/expo/src/devtools/DevToolsPluginClientImplBrowser.ts +38 -0
- package/example/node_modules/expo/src/devtools/MessageFramePacker.ts +235 -0
- package/example/node_modules/expo/src/devtools/ProtocolVersion.ts +6 -0
- package/example/node_modules/expo/src/devtools/WebSocketBackingStore.ts +10 -0
- package/example/node_modules/expo/src/devtools/WebSocketWithReconnect.ts +318 -0
- package/example/node_modules/expo/src/devtools/devtools.types.ts +50 -0
- package/example/node_modules/expo/src/devtools/getConnectionInfo.native.ts +18 -0
- package/example/node_modules/expo/src/devtools/getConnectionInfo.ts +16 -0
- package/example/node_modules/expo/src/devtools/index.ts +53 -0
- package/example/node_modules/expo/src/devtools/logger.ts +29 -0
- package/example/node_modules/expo/src/dom/base.ts +62 -0
- package/example/node_modules/expo/src/dom/dom-entry.tsx +128 -0
- package/example/node_modules/expo/src/dom/dom-hooks.ts +46 -0
- package/example/node_modules/expo/src/dom/dom.ts +8 -0
- package/example/node_modules/expo/src/dom/dom.types.ts +39 -0
- package/example/node_modules/expo/src/dom/dom.web.ts +6 -0
- package/example/node_modules/expo/src/dom/global-events.ts +16 -0
- package/example/node_modules/expo/src/dom/injection.ts +42 -0
- package/example/node_modules/expo/src/dom/internal.ts +5 -0
- package/example/node_modules/expo/src/dom/internal.web.ts +1 -0
- package/example/node_modules/expo/src/dom/marshal.tsx +116 -0
- package/example/node_modules/expo/src/dom/webview/ExpoDOMWebView.ts +10 -0
- package/example/node_modules/expo/src/dom/webview/RNWebView.ts +12 -0
- package/example/node_modules/expo/src/dom/webview/useDebugZeroHeight.ts +62 -0
- package/example/node_modules/expo/src/dom/webview-wrapper.tsx +253 -0
- package/example/node_modules/expo/src/environment/DevLoadingView.tsx +123 -0
- package/example/node_modules/expo/src/environment/DevLoadingView.web.tsx +135 -0
- package/example/node_modules/expo/src/environment/DevLoadingViewNativeModule.native.ts +3 -0
- package/example/node_modules/expo/src/environment/DevLoadingViewNativeModule.ts +7 -0
- package/example/node_modules/expo/src/environment/ExpoGo.ts +53 -0
- package/example/node_modules/expo/src/environment/ExpoGo.web.ts +7 -0
- package/example/node_modules/expo/src/environment/getInitialSafeArea.native.ts +16 -0
- package/example/node_modules/expo/src/environment/getInitialSafeArea.ts +8 -0
- package/example/node_modules/expo/src/errors/AppEntryNotFound.tsx +35 -0
- package/example/node_modules/expo/src/errors/ExpoErrorManager.native.ts +51 -0
- package/example/node_modules/expo/src/errors/ExpoErrorManager.ts +11 -0
- package/example/node_modules/expo/src/hooks/useEvent.ts +112 -0
- package/example/node_modules/expo/src/launch/registerRootComponent.tsx +64 -0
- package/example/node_modules/expo/src/launch/withDevTools.ios.tsx +47 -0
- package/example/node_modules/expo/src/launch/withDevTools.tsx +30 -0
- package/example/node_modules/expo/src/launch/withDevTools.web.tsx +23 -0
- package/example/node_modules/expo/src/timer/polyfillNextTick.ts +10 -0
- package/example/node_modules/expo/src/ts-declarations/console.d.ts +47 -0
- package/example/node_modules/expo/src/ts-declarations/global.d.ts +12 -0
- package/example/node_modules/expo/src/ts-declarations/react-native.d.ts +34 -0
- package/example/node_modules/expo/src/ts-declarations/whatwg-url-without-unicode.d.ts +186 -0
- package/example/node_modules/expo/src/utils/blobUtils.ts +23 -0
- package/example/node_modules/expo/src/utils/getBundleUrl.native.ts +17 -0
- package/example/node_modules/expo/src/utils/getBundleUrl.ts +5 -0
- package/example/node_modules/expo/src/utils/getBundleUrl.web.ts +21 -0
- package/example/node_modules/expo/src/winter/FormData.ts +222 -0
- package/example/node_modules/expo/src/winter/ImportMetaRegistry.ts +14 -0
- package/example/node_modules/expo/src/winter/TextDecoder.ts +429 -0
- package/example/node_modules/expo/src/winter/fetch/ExpoFetchModule.ts +3 -0
- package/example/node_modules/expo/src/winter/fetch/ExpoFetchModule.web.ts +7 -0
- package/example/node_modules/expo/src/winter/fetch/FetchErrors.ts +11 -0
- package/example/node_modules/expo/src/winter/fetch/FetchResponse.ts +146 -0
- package/example/node_modules/expo/src/winter/fetch/NativeRequest.ts +38 -0
- package/example/node_modules/expo/src/winter/fetch/RequestUtils.ts +124 -0
- package/example/node_modules/expo/src/winter/fetch/convertFormData.ts +92 -0
- package/example/node_modules/expo/src/winter/fetch/fetch.ts +59 -0
- package/example/node_modules/expo/src/winter/fetch/fetch.types.ts +17 -0
- package/example/node_modules/expo/src/winter/fetch/fetch.web.ts +1 -0
- package/example/node_modules/expo/src/winter/fetch/index.ts +2 -0
- package/example/node_modules/expo/src/winter/index.ts +1 -0
- package/example/node_modules/expo/src/winter/runtime.native.ts +41 -0
- package/example/node_modules/expo/src/winter/runtime.ts +5 -0
- package/example/node_modules/expo/src/winter/url.ts +116 -0
- package/example/node_modules/expo/types/global.d.ts +38 -0
- package/example/node_modules/expo/types/index.d.ts +3 -0
- package/example/node_modules/expo/types/metro-require.d.ts +52 -0
- package/example/node_modules/expo/types/react-native-web.d.ts +291 -0
- package/example/node_modules/expo-modules-autolinking/build/ExpoModuleConfig.d.ts +85 -0
- package/example/node_modules/expo-modules-autolinking/build/autolinking/findModules.d.ts +5 -0
- package/example/node_modules/expo-modules-autolinking/build/autolinking/generatePackageList.d.ts +11 -0
- package/example/node_modules/expo-modules-autolinking/build/autolinking/getConfiguration.d.ts +2 -0
- package/example/node_modules/expo-modules-autolinking/build/autolinking/index.d.ts +17 -0
- package/example/node_modules/expo-modules-autolinking/build/autolinking/mergeLinkingOptions.d.ts +21 -0
- package/example/node_modules/expo-modules-autolinking/build/autolinking/resolveModules.d.ts +9 -0
- package/example/node_modules/expo-modules-autolinking/build/autolinking/utils.d.ts +6 -0
- package/example/node_modules/expo-modules-autolinking/build/autolinking/verifySearchResults.d.ts +5 -0
- package/example/node_modules/expo-modules-autolinking/build/fileUtils.d.ts +18 -0
- package/example/node_modules/expo-modules-autolinking/build/index.d.ts +1 -0
- package/example/node_modules/expo-modules-autolinking/build/platforms/android.d.ts +38 -0
- package/example/node_modules/expo-modules-autolinking/build/platforms/apple.d.ts +15 -0
- package/example/node_modules/expo-modules-autolinking/build/platforms/devtools.d.ts +3 -0
- package/example/node_modules/expo-modules-autolinking/build/reactNativeConfig/androidResolver.d.ts +20 -0
- package/example/node_modules/expo-modules-autolinking/build/reactNativeConfig/config.d.ts +5 -0
- package/example/node_modules/expo-modules-autolinking/build/reactNativeConfig/index.d.ts +2 -0
- package/example/node_modules/expo-modules-autolinking/build/reactNativeConfig/iosResolver.d.ts +2 -0
- package/example/node_modules/expo-modules-autolinking/build/reactNativeConfig/reactNativeConfig.d.ts +13 -0
- package/example/node_modules/expo-modules-autolinking/build/reactNativeConfig/reactNativeConfig.types.d.ts +95 -0
- package/example/node_modules/expo-modules-autolinking/build/types.d.ts +319 -0
- package/example/node_modules/expo-modules-autolinking/e2e/TestUtils.ts +53 -0
- package/example/node_modules/expo-modules-autolinking/exports.d.ts +1 -0
- package/example/node_modules/expo-modules-autolinking/src/ExpoModuleConfig.ts +181 -0
- package/example/node_modules/expo-modules-autolinking/src/autolinking/findModules.ts +259 -0
- package/example/node_modules/expo-modules-autolinking/src/autolinking/generatePackageList.ts +46 -0
- package/example/node_modules/expo-modules-autolinking/src/autolinking/getConfiguration.ts +7 -0
- package/example/node_modules/expo-modules-autolinking/src/autolinking/index.ts +45 -0
- package/example/node_modules/expo-modules-autolinking/src/autolinking/mergeLinkingOptions.ts +127 -0
- package/example/node_modules/expo-modules-autolinking/src/autolinking/resolveModules.ts +46 -0
- package/example/node_modules/expo-modules-autolinking/src/autolinking/utils.ts +37 -0
- package/example/node_modules/expo-modules-autolinking/src/autolinking/verifySearchResults.ts +33 -0
- package/example/node_modules/expo-modules-autolinking/src/fileUtils.ts +64 -0
- package/example/node_modules/expo-modules-autolinking/src/index.ts +262 -0
- package/example/node_modules/expo-modules-autolinking/src/platforms/android.ts +303 -0
- package/example/node_modules/expo-modules-autolinking/src/platforms/apple.ts +292 -0
- package/example/node_modules/expo-modules-autolinking/src/platforms/devtools.ts +25 -0
- package/example/node_modules/expo-modules-autolinking/src/reactNativeConfig/androidResolver.ts +264 -0
- package/example/node_modules/expo-modules-autolinking/src/reactNativeConfig/config.ts +67 -0
- package/example/node_modules/expo-modules-autolinking/src/reactNativeConfig/index.ts +2 -0
- package/example/node_modules/expo-modules-autolinking/src/reactNativeConfig/iosResolver.ts +37 -0
- package/example/node_modules/expo-modules-autolinking/src/reactNativeConfig/reactNativeConfig.ts +245 -0
- package/example/node_modules/expo-modules-autolinking/src/reactNativeConfig/reactNativeConfig.types.ts +107 -0
- package/example/node_modules/expo-modules-autolinking/src/types.ts +384 -0
- package/example/node_modules/find-up/index.d.ts +138 -0
- package/example/node_modules/glob/dist/commonjs/glob.d.ts +388 -0
- package/example/node_modules/glob/dist/commonjs/has-magic.d.ts +14 -0
- package/example/node_modules/glob/dist/commonjs/ignore.d.ts +24 -0
- package/example/node_modules/glob/dist/commonjs/index.d.ts +97 -0
- package/example/node_modules/glob/dist/commonjs/pattern.d.ts +76 -0
- package/example/node_modules/glob/dist/commonjs/processor.d.ts +59 -0
- package/example/node_modules/glob/dist/commonjs/walker.d.ts +97 -0
- package/example/node_modules/glob/dist/esm/glob.d.ts +388 -0
- package/example/node_modules/glob/dist/esm/has-magic.d.ts +14 -0
- package/example/node_modules/glob/dist/esm/ignore.d.ts +24 -0
- package/example/node_modules/glob/dist/esm/index.d.ts +97 -0
- package/example/node_modules/glob/dist/esm/pattern.d.ts +76 -0
- package/example/node_modules/glob/dist/esm/processor.d.ts +59 -0
- package/example/node_modules/glob/dist/esm/walker.d.ts +97 -0
- package/example/node_modules/locate-path/index.d.ts +83 -0
- package/example/node_modules/log-symbols/node_modules/chalk/types/index.d.ts +97 -0
- package/example/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts +2 -0
- package/example/node_modules/minimatch/dist/commonjs/ast.d.ts +20 -0
- package/example/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts +8 -0
- package/example/node_modules/minimatch/dist/commonjs/escape.d.ts +12 -0
- package/example/node_modules/minimatch/dist/commonjs/index.d.ts +94 -0
- package/example/node_modules/minimatch/dist/commonjs/unescape.d.ts +17 -0
- package/example/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts +2 -0
- package/example/node_modules/minimatch/dist/esm/ast.d.ts +20 -0
- package/example/node_modules/minimatch/dist/esm/brace-expressions.d.ts +8 -0
- package/example/node_modules/minimatch/dist/esm/escape.d.ts +12 -0
- package/example/node_modules/minimatch/dist/esm/index.d.ts +94 -0
- package/example/node_modules/minimatch/dist/esm/unescape.d.ts +17 -0
- package/example/node_modules/ora/index.d.ts +257 -0
- package/example/node_modules/ora/node_modules/chalk/types/index.d.ts +97 -0
- package/example/node_modules/ora/node_modules/strip-ansi/index.d.ts +15 -0
- package/example/node_modules/p-locate/index.d.ts +53 -0
- package/example/node_modules/path-exists/index.d.ts +28 -0
- package/example/package.json +29 -0
- package/example/src/constants/styles.ts +43 -0
- package/example/src/hooks/useComponentHeight.ts +13 -0
- package/example/src/scenes/app.tsx +33 -0
- package/example/src/scenes/booleanPicker.tsx +60 -0
- package/example/src/scenes/customTypePicker.tsx +83 -0
- package/example/src/scenes/numberPicker.tsx +75 -0
- package/example/src/scenes/stringPicker.tsx +64 -0
- package/lib/module/index.js +6 -6
- package/lib/module/index.js.map +1 -1
- package/package.json +168 -177
- package/src/index.tsx +0 -507
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { GLOBSTAR } from 'minimatch';
|
|
2
|
+
export type MMPattern = string | RegExp | typeof GLOBSTAR;
|
|
3
|
+
export type PatternList = [p: MMPattern, ...rest: MMPattern[]];
|
|
4
|
+
export type UNCPatternList = [
|
|
5
|
+
p0: '',
|
|
6
|
+
p1: '',
|
|
7
|
+
p2: string,
|
|
8
|
+
p3: string,
|
|
9
|
+
...rest: MMPattern[]
|
|
10
|
+
];
|
|
11
|
+
export type DrivePatternList = [p0: string, ...rest: MMPattern[]];
|
|
12
|
+
export type AbsolutePatternList = [p0: '', ...rest: MMPattern[]];
|
|
13
|
+
export type GlobList = [p: string, ...rest: string[]];
|
|
14
|
+
/**
|
|
15
|
+
* An immutable-ish view on an array of glob parts and their parsed
|
|
16
|
+
* results
|
|
17
|
+
*/
|
|
18
|
+
export declare class Pattern {
|
|
19
|
+
#private;
|
|
20
|
+
readonly length: number;
|
|
21
|
+
constructor(patternList: MMPattern[], globList: string[], index: number, platform: NodeJS.Platform);
|
|
22
|
+
/**
|
|
23
|
+
* The first entry in the parsed list of patterns
|
|
24
|
+
*/
|
|
25
|
+
pattern(): MMPattern;
|
|
26
|
+
/**
|
|
27
|
+
* true of if pattern() returns a string
|
|
28
|
+
*/
|
|
29
|
+
isString(): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* true of if pattern() returns GLOBSTAR
|
|
32
|
+
*/
|
|
33
|
+
isGlobstar(): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* true if pattern() returns a regexp
|
|
36
|
+
*/
|
|
37
|
+
isRegExp(): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* The /-joined set of glob parts that make up this pattern
|
|
40
|
+
*/
|
|
41
|
+
globString(): string;
|
|
42
|
+
/**
|
|
43
|
+
* true if there are more pattern parts after this one
|
|
44
|
+
*/
|
|
45
|
+
hasMore(): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* The rest of the pattern after this part, or null if this is the end
|
|
48
|
+
*/
|
|
49
|
+
rest(): Pattern | null;
|
|
50
|
+
/**
|
|
51
|
+
* true if the pattern represents a //unc/path/ on windows
|
|
52
|
+
*/
|
|
53
|
+
isUNC(): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* True if the pattern starts with a drive letter on Windows
|
|
56
|
+
*/
|
|
57
|
+
isDrive(): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* True if the pattern is rooted on an absolute path
|
|
60
|
+
*/
|
|
61
|
+
isAbsolute(): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* consume the root of the pattern, and return it
|
|
64
|
+
*/
|
|
65
|
+
root(): string;
|
|
66
|
+
/**
|
|
67
|
+
* Check to see if the current globstar pattern is allowed to follow
|
|
68
|
+
* a symbolic link.
|
|
69
|
+
*/
|
|
70
|
+
checkFollowGlobstar(): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Mark that the current globstar pattern is following a symbolic link
|
|
73
|
+
*/
|
|
74
|
+
markFollowGlobstar(): boolean;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=pattern.d.ts.map
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { MMRegExp } from 'minimatch';
|
|
2
|
+
import { Path } from 'path-scurry';
|
|
3
|
+
import { Pattern } from './pattern.js';
|
|
4
|
+
import { GlobWalkerOpts } from './walker.js';
|
|
5
|
+
/**
|
|
6
|
+
* A cache of which patterns have been processed for a given Path
|
|
7
|
+
*/
|
|
8
|
+
export declare class HasWalkedCache {
|
|
9
|
+
store: Map<string, Set<string>>;
|
|
10
|
+
constructor(store?: Map<string, Set<string>>);
|
|
11
|
+
copy(): HasWalkedCache;
|
|
12
|
+
hasWalked(target: Path, pattern: Pattern): boolean | undefined;
|
|
13
|
+
storeWalked(target: Path, pattern: Pattern): void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* A record of which paths have been matched in a given walk step,
|
|
17
|
+
* and whether they only are considered a match if they are a directory,
|
|
18
|
+
* and whether their absolute or relative path should be returned.
|
|
19
|
+
*/
|
|
20
|
+
export declare class MatchRecord {
|
|
21
|
+
store: Map<Path, number>;
|
|
22
|
+
add(target: Path, absolute: boolean, ifDir: boolean): void;
|
|
23
|
+
entries(): [Path, boolean, boolean][];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A collection of patterns that must be processed in a subsequent step
|
|
27
|
+
* for a given path.
|
|
28
|
+
*/
|
|
29
|
+
export declare class SubWalks {
|
|
30
|
+
store: Map<Path, Pattern[]>;
|
|
31
|
+
add(target: Path, pattern: Pattern): void;
|
|
32
|
+
get(target: Path): Pattern[];
|
|
33
|
+
entries(): [Path, Pattern[]][];
|
|
34
|
+
keys(): Path[];
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The class that processes patterns for a given path.
|
|
38
|
+
*
|
|
39
|
+
* Handles child entry filtering, and determining whether a path's
|
|
40
|
+
* directory contents must be read.
|
|
41
|
+
*/
|
|
42
|
+
export declare class Processor {
|
|
43
|
+
hasWalkedCache: HasWalkedCache;
|
|
44
|
+
matches: MatchRecord;
|
|
45
|
+
subwalks: SubWalks;
|
|
46
|
+
patterns?: Pattern[];
|
|
47
|
+
follow: boolean;
|
|
48
|
+
dot: boolean;
|
|
49
|
+
opts: GlobWalkerOpts;
|
|
50
|
+
constructor(opts: GlobWalkerOpts, hasWalkedCache?: HasWalkedCache);
|
|
51
|
+
processPatterns(target: Path, patterns: Pattern[]): this;
|
|
52
|
+
subwalkTargets(): Path[];
|
|
53
|
+
child(): Processor;
|
|
54
|
+
filterEntries(parent: Path, entries: Path[]): Processor;
|
|
55
|
+
testGlobstar(e: Path, pattern: Pattern, rest: Pattern | null, absolute: boolean): void;
|
|
56
|
+
testRegExp(e: Path, p: MMRegExp, rest: Pattern | null, absolute: boolean): void;
|
|
57
|
+
testString(e: Path, p: string, rest: Pattern | null, absolute: boolean): void;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=processor.d.ts.map
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single-use utility classes to provide functionality to the {@link Glob}
|
|
3
|
+
* methods.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import { Minipass } from 'minipass';
|
|
8
|
+
import { Path } from 'path-scurry';
|
|
9
|
+
import { IgnoreLike } from './ignore.js';
|
|
10
|
+
import { Pattern } from './pattern.js';
|
|
11
|
+
import { Processor } from './processor.js';
|
|
12
|
+
export interface GlobWalkerOpts {
|
|
13
|
+
absolute?: boolean;
|
|
14
|
+
allowWindowsEscape?: boolean;
|
|
15
|
+
cwd?: string | URL;
|
|
16
|
+
dot?: boolean;
|
|
17
|
+
dotRelative?: boolean;
|
|
18
|
+
follow?: boolean;
|
|
19
|
+
ignore?: string | string[] | IgnoreLike;
|
|
20
|
+
mark?: boolean;
|
|
21
|
+
matchBase?: boolean;
|
|
22
|
+
maxDepth?: number;
|
|
23
|
+
nobrace?: boolean;
|
|
24
|
+
nocase?: boolean;
|
|
25
|
+
nodir?: boolean;
|
|
26
|
+
noext?: boolean;
|
|
27
|
+
noglobstar?: boolean;
|
|
28
|
+
platform?: NodeJS.Platform;
|
|
29
|
+
posix?: boolean;
|
|
30
|
+
realpath?: boolean;
|
|
31
|
+
root?: string;
|
|
32
|
+
stat?: boolean;
|
|
33
|
+
signal?: AbortSignal;
|
|
34
|
+
windowsPathsNoEscape?: boolean;
|
|
35
|
+
withFileTypes?: boolean;
|
|
36
|
+
includeChildMatches?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export type GWOFileTypesTrue = GlobWalkerOpts & {
|
|
39
|
+
withFileTypes: true;
|
|
40
|
+
};
|
|
41
|
+
export type GWOFileTypesFalse = GlobWalkerOpts & {
|
|
42
|
+
withFileTypes: false;
|
|
43
|
+
};
|
|
44
|
+
export type GWOFileTypesUnset = GlobWalkerOpts & {
|
|
45
|
+
withFileTypes?: undefined;
|
|
46
|
+
};
|
|
47
|
+
export type Result<O extends GlobWalkerOpts> = O extends GWOFileTypesTrue ? Path : O extends GWOFileTypesFalse ? string : O extends GWOFileTypesUnset ? string : Path | string;
|
|
48
|
+
export type Matches<O extends GlobWalkerOpts> = O extends GWOFileTypesTrue ? Set<Path> : O extends GWOFileTypesFalse ? Set<string> : O extends GWOFileTypesUnset ? Set<string> : Set<Path | string>;
|
|
49
|
+
export type MatchStream<O extends GlobWalkerOpts> = Minipass<Result<O>, Result<O>>;
|
|
50
|
+
/**
|
|
51
|
+
* basic walking utilities that all the glob walker types use
|
|
52
|
+
*/
|
|
53
|
+
export declare abstract class GlobUtil<O extends GlobWalkerOpts = GlobWalkerOpts> {
|
|
54
|
+
#private;
|
|
55
|
+
path: Path;
|
|
56
|
+
patterns: Pattern[];
|
|
57
|
+
opts: O;
|
|
58
|
+
seen: Set<Path>;
|
|
59
|
+
paused: boolean;
|
|
60
|
+
aborted: boolean;
|
|
61
|
+
signal?: AbortSignal;
|
|
62
|
+
maxDepth: number;
|
|
63
|
+
includeChildMatches: boolean;
|
|
64
|
+
constructor(patterns: Pattern[], path: Path, opts: O);
|
|
65
|
+
pause(): void;
|
|
66
|
+
resume(): void;
|
|
67
|
+
onResume(fn: () => any): void;
|
|
68
|
+
matchCheck(e: Path, ifDir: boolean): Promise<Path | undefined>;
|
|
69
|
+
matchCheckTest(e: Path | undefined, ifDir: boolean): Path | undefined;
|
|
70
|
+
matchCheckSync(e: Path, ifDir: boolean): Path | undefined;
|
|
71
|
+
abstract matchEmit(p: Result<O>): void;
|
|
72
|
+
abstract matchEmit(p: string | Path): void;
|
|
73
|
+
matchFinish(e: Path, absolute: boolean): void;
|
|
74
|
+
match(e: Path, absolute: boolean, ifDir: boolean): Promise<void>;
|
|
75
|
+
matchSync(e: Path, absolute: boolean, ifDir: boolean): void;
|
|
76
|
+
walkCB(target: Path, patterns: Pattern[], cb: () => any): void;
|
|
77
|
+
walkCB2(target: Path, patterns: Pattern[], processor: Processor, cb: () => any): any;
|
|
78
|
+
walkCB3(target: Path, entries: Path[], processor: Processor, cb: () => any): void;
|
|
79
|
+
walkCBSync(target: Path, patterns: Pattern[], cb: () => any): void;
|
|
80
|
+
walkCB2Sync(target: Path, patterns: Pattern[], processor: Processor, cb: () => any): any;
|
|
81
|
+
walkCB3Sync(target: Path, entries: Path[], processor: Processor, cb: () => any): void;
|
|
82
|
+
}
|
|
83
|
+
export declare class GlobWalker<O extends GlobWalkerOpts = GlobWalkerOpts> extends GlobUtil<O> {
|
|
84
|
+
matches: Set<Result<O>>;
|
|
85
|
+
constructor(patterns: Pattern[], path: Path, opts: O);
|
|
86
|
+
matchEmit(e: Result<O>): void;
|
|
87
|
+
walk(): Promise<Set<Result<O>>>;
|
|
88
|
+
walkSync(): Set<Result<O>>;
|
|
89
|
+
}
|
|
90
|
+
export declare class GlobStream<O extends GlobWalkerOpts = GlobWalkerOpts> extends GlobUtil<O> {
|
|
91
|
+
results: Minipass<Result<O>, Result<O>>;
|
|
92
|
+
constructor(patterns: Pattern[], path: Path, opts: O);
|
|
93
|
+
matchEmit(e: Result<O>): void;
|
|
94
|
+
stream(): MatchStream<O>;
|
|
95
|
+
streamSync(): MatchStream<O>;
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=walker.d.ts.map
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
declare namespace locatePath {
|
|
2
|
+
interface Options {
|
|
3
|
+
/**
|
|
4
|
+
Current working directory.
|
|
5
|
+
|
|
6
|
+
@default process.cwd()
|
|
7
|
+
*/
|
|
8
|
+
readonly cwd?: string;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
Type of path to match.
|
|
12
|
+
|
|
13
|
+
@default 'file'
|
|
14
|
+
*/
|
|
15
|
+
readonly type?: 'file' | 'directory';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
Allow symbolic links to match if they point to the requested path type.
|
|
19
|
+
|
|
20
|
+
@default true
|
|
21
|
+
*/
|
|
22
|
+
readonly allowSymlinks?: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface AsyncOptions extends Options {
|
|
26
|
+
/**
|
|
27
|
+
Number of concurrently pending promises. Minimum: `1`.
|
|
28
|
+
|
|
29
|
+
@default Infinity
|
|
30
|
+
*/
|
|
31
|
+
readonly concurrency?: number;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
Preserve `paths` order when searching.
|
|
35
|
+
|
|
36
|
+
Disable this to improve performance if you don't care about the order.
|
|
37
|
+
|
|
38
|
+
@default true
|
|
39
|
+
*/
|
|
40
|
+
readonly preserveOrder?: boolean;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
declare const locatePath: {
|
|
45
|
+
/**
|
|
46
|
+
Synchronously get the first path that exists on disk of multiple paths.
|
|
47
|
+
|
|
48
|
+
@param paths - Paths to check.
|
|
49
|
+
@returns The first path that exists or `undefined` if none exists.
|
|
50
|
+
*/
|
|
51
|
+
sync: (
|
|
52
|
+
paths: Iterable<string>,
|
|
53
|
+
options?: locatePath.Options
|
|
54
|
+
) => string | undefined;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
Get the first path that exists on disk of multiple paths.
|
|
58
|
+
|
|
59
|
+
@param paths - Paths to check.
|
|
60
|
+
@returns The first path that exists or `undefined` if none exists.
|
|
61
|
+
|
|
62
|
+
@example
|
|
63
|
+
```
|
|
64
|
+
import locatePath = require('locate-path');
|
|
65
|
+
|
|
66
|
+
const files = [
|
|
67
|
+
'unicorn.png',
|
|
68
|
+
'rainbow.png', // Only this one actually exists on disk
|
|
69
|
+
'pony.png'
|
|
70
|
+
];
|
|
71
|
+
|
|
72
|
+
(async () => {
|
|
73
|
+
console(await locatePath(files));
|
|
74
|
+
//=> 'rainbow'
|
|
75
|
+
})();
|
|
76
|
+
```
|
|
77
|
+
*/
|
|
78
|
+
(paths: Iterable<string>, options?: locatePath.AsyncOptions): Promise<
|
|
79
|
+
string | undefined
|
|
80
|
+
>;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export = locatePath;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
// Type definitions for Chalk
|
|
2
|
+
// Definitions by: Thomas Sauer <https://github.com/t-sauer>
|
|
3
|
+
|
|
4
|
+
export const enum Level {
|
|
5
|
+
None = 0,
|
|
6
|
+
Basic = 1,
|
|
7
|
+
Ansi256 = 2,
|
|
8
|
+
TrueColor = 3
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface ChalkOptions {
|
|
12
|
+
enabled?: boolean;
|
|
13
|
+
level?: Level;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface ChalkConstructor {
|
|
17
|
+
new (options?: ChalkOptions): Chalk;
|
|
18
|
+
(options?: ChalkOptions): Chalk;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ColorSupport {
|
|
22
|
+
level: Level;
|
|
23
|
+
hasBasic: boolean;
|
|
24
|
+
has256: boolean;
|
|
25
|
+
has16m: boolean;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface Chalk {
|
|
29
|
+
(...text: string[]): string;
|
|
30
|
+
(text: TemplateStringsArray, ...placeholders: string[]): string;
|
|
31
|
+
constructor: ChalkConstructor;
|
|
32
|
+
enabled: boolean;
|
|
33
|
+
level: Level;
|
|
34
|
+
rgb(r: number, g: number, b: number): this;
|
|
35
|
+
hsl(h: number, s: number, l: number): this;
|
|
36
|
+
hsv(h: number, s: number, v: number): this;
|
|
37
|
+
hwb(h: number, w: number, b: number): this;
|
|
38
|
+
bgHex(color: string): this;
|
|
39
|
+
bgKeyword(color: string): this;
|
|
40
|
+
bgRgb(r: number, g: number, b: number): this;
|
|
41
|
+
bgHsl(h: number, s: number, l: number): this;
|
|
42
|
+
bgHsv(h: number, s: number, v: number): this;
|
|
43
|
+
bgHwb(h: number, w: number, b: number): this;
|
|
44
|
+
hex(color: string): this;
|
|
45
|
+
keyword(color: string): this;
|
|
46
|
+
|
|
47
|
+
readonly reset: this;
|
|
48
|
+
readonly bold: this;
|
|
49
|
+
readonly dim: this;
|
|
50
|
+
readonly italic: this;
|
|
51
|
+
readonly underline: this;
|
|
52
|
+
readonly inverse: this;
|
|
53
|
+
readonly hidden: this;
|
|
54
|
+
readonly strikethrough: this;
|
|
55
|
+
|
|
56
|
+
readonly visible: this;
|
|
57
|
+
|
|
58
|
+
readonly black: this;
|
|
59
|
+
readonly red: this;
|
|
60
|
+
readonly green: this;
|
|
61
|
+
readonly yellow: this;
|
|
62
|
+
readonly blue: this;
|
|
63
|
+
readonly magenta: this;
|
|
64
|
+
readonly cyan: this;
|
|
65
|
+
readonly white: this;
|
|
66
|
+
readonly gray: this;
|
|
67
|
+
readonly grey: this;
|
|
68
|
+
readonly blackBright: this;
|
|
69
|
+
readonly redBright: this;
|
|
70
|
+
readonly greenBright: this;
|
|
71
|
+
readonly yellowBright: this;
|
|
72
|
+
readonly blueBright: this;
|
|
73
|
+
readonly magentaBright: this;
|
|
74
|
+
readonly cyanBright: this;
|
|
75
|
+
readonly whiteBright: this;
|
|
76
|
+
|
|
77
|
+
readonly bgBlack: this;
|
|
78
|
+
readonly bgRed: this;
|
|
79
|
+
readonly bgGreen: this;
|
|
80
|
+
readonly bgYellow: this;
|
|
81
|
+
readonly bgBlue: this;
|
|
82
|
+
readonly bgMagenta: this;
|
|
83
|
+
readonly bgCyan: this;
|
|
84
|
+
readonly bgWhite: this;
|
|
85
|
+
readonly bgBlackBright: this;
|
|
86
|
+
readonly bgRedBright: this;
|
|
87
|
+
readonly bgGreenBright: this;
|
|
88
|
+
readonly bgYellowBright: this;
|
|
89
|
+
readonly bgBlueBright: this;
|
|
90
|
+
readonly bgMagentaBright: this;
|
|
91
|
+
readonly bgCyanBright: this;
|
|
92
|
+
readonly bgWhiteBright: this;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
declare const chalk: Chalk & { supportsColor: ColorSupport };
|
|
96
|
+
|
|
97
|
+
export default chalk
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { MinimatchOptions, MMRegExp } from './index.js';
|
|
2
|
+
export type ExtglobType = '!' | '?' | '+' | '*' | '@';
|
|
3
|
+
export declare class AST {
|
|
4
|
+
#private;
|
|
5
|
+
type: ExtglobType | null;
|
|
6
|
+
constructor(type: ExtglobType | null, parent?: AST, options?: MinimatchOptions);
|
|
7
|
+
get hasMagic(): boolean | undefined;
|
|
8
|
+
toString(): string;
|
|
9
|
+
push(...parts: (string | AST)[]): void;
|
|
10
|
+
toJSON(): any[];
|
|
11
|
+
isStart(): boolean;
|
|
12
|
+
isEnd(): boolean;
|
|
13
|
+
copyIn(part: AST | string): void;
|
|
14
|
+
clone(parent: AST): AST;
|
|
15
|
+
static fromGlob(pattern: string, options?: MinimatchOptions): AST;
|
|
16
|
+
toMMPattern(): MMRegExp | string;
|
|
17
|
+
get options(): MinimatchOptions;
|
|
18
|
+
toRegExpSource(allowDot?: boolean): [re: string, body: string, hasMagic: boolean, uflag: boolean];
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=ast.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MinimatchOptions } from './index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Escape all magic characters in a glob pattern.
|
|
4
|
+
*
|
|
5
|
+
* If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape}
|
|
6
|
+
* option is used, then characters are escaped by wrapping in `[]`, because
|
|
7
|
+
* a magic character wrapped in a character class can only be satisfied by
|
|
8
|
+
* that exact character. In this mode, `\` is _not_ escaped, because it is
|
|
9
|
+
* not interpreted as a magic character, but instead as a path separator.
|
|
10
|
+
*/
|
|
11
|
+
export declare const escape: (s: string, { windowsPathsNoEscape, }?: Pick<MinimatchOptions, 'windowsPathsNoEscape'>) => string;
|
|
12
|
+
//# sourceMappingURL=escape.d.ts.map
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { AST } from './ast.js';
|
|
2
|
+
type Platform = 'aix' | 'android' | 'darwin' | 'freebsd' | 'haiku' | 'linux' | 'openbsd' | 'sunos' | 'win32' | 'cygwin' | 'netbsd';
|
|
3
|
+
export interface MinimatchOptions {
|
|
4
|
+
nobrace?: boolean;
|
|
5
|
+
nocomment?: boolean;
|
|
6
|
+
nonegate?: boolean;
|
|
7
|
+
debug?: boolean;
|
|
8
|
+
noglobstar?: boolean;
|
|
9
|
+
noext?: boolean;
|
|
10
|
+
nonull?: boolean;
|
|
11
|
+
windowsPathsNoEscape?: boolean;
|
|
12
|
+
allowWindowsEscape?: boolean;
|
|
13
|
+
partial?: boolean;
|
|
14
|
+
dot?: boolean;
|
|
15
|
+
nocase?: boolean;
|
|
16
|
+
nocaseMagicOnly?: boolean;
|
|
17
|
+
magicalBraces?: boolean;
|
|
18
|
+
matchBase?: boolean;
|
|
19
|
+
flipNegate?: boolean;
|
|
20
|
+
preserveMultipleSlashes?: boolean;
|
|
21
|
+
optimizationLevel?: number;
|
|
22
|
+
platform?: Platform;
|
|
23
|
+
windowsNoMagicRoot?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare const minimatch: {
|
|
26
|
+
(p: string, pattern: string, options?: MinimatchOptions): boolean;
|
|
27
|
+
sep: Sep;
|
|
28
|
+
GLOBSTAR: typeof GLOBSTAR;
|
|
29
|
+
filter: (pattern: string, options?: MinimatchOptions) => (p: string) => boolean;
|
|
30
|
+
defaults: (def: MinimatchOptions) => typeof minimatch;
|
|
31
|
+
braceExpand: (pattern: string, options?: MinimatchOptions) => string[];
|
|
32
|
+
makeRe: (pattern: string, options?: MinimatchOptions) => false | MMRegExp;
|
|
33
|
+
match: (list: string[], pattern: string, options?: MinimatchOptions) => string[];
|
|
34
|
+
AST: typeof AST;
|
|
35
|
+
Minimatch: typeof Minimatch;
|
|
36
|
+
escape: (s: string, { windowsPathsNoEscape, }?: Pick<MinimatchOptions, "windowsPathsNoEscape">) => string;
|
|
37
|
+
unescape: (s: string, { windowsPathsNoEscape, }?: Pick<MinimatchOptions, "windowsPathsNoEscape">) => string;
|
|
38
|
+
};
|
|
39
|
+
type Sep = '\\' | '/';
|
|
40
|
+
export declare const sep: Sep;
|
|
41
|
+
export declare const GLOBSTAR: unique symbol;
|
|
42
|
+
export declare const filter: (pattern: string, options?: MinimatchOptions) => (p: string) => boolean;
|
|
43
|
+
export declare const defaults: (def: MinimatchOptions) => typeof minimatch;
|
|
44
|
+
export declare const braceExpand: (pattern: string, options?: MinimatchOptions) => string[];
|
|
45
|
+
export declare const makeRe: (pattern: string, options?: MinimatchOptions) => false | MMRegExp;
|
|
46
|
+
export declare const match: (list: string[], pattern: string, options?: MinimatchOptions) => string[];
|
|
47
|
+
export type MMRegExp = RegExp & {
|
|
48
|
+
_src?: string;
|
|
49
|
+
_glob?: string;
|
|
50
|
+
};
|
|
51
|
+
export type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR;
|
|
52
|
+
export type ParseReturn = ParseReturnFiltered | false;
|
|
53
|
+
export declare class Minimatch {
|
|
54
|
+
options: MinimatchOptions;
|
|
55
|
+
set: ParseReturnFiltered[][];
|
|
56
|
+
pattern: string;
|
|
57
|
+
windowsPathsNoEscape: boolean;
|
|
58
|
+
nonegate: boolean;
|
|
59
|
+
negate: boolean;
|
|
60
|
+
comment: boolean;
|
|
61
|
+
empty: boolean;
|
|
62
|
+
preserveMultipleSlashes: boolean;
|
|
63
|
+
partial: boolean;
|
|
64
|
+
globSet: string[];
|
|
65
|
+
globParts: string[][];
|
|
66
|
+
nocase: boolean;
|
|
67
|
+
isWindows: boolean;
|
|
68
|
+
platform: Platform;
|
|
69
|
+
windowsNoMagicRoot: boolean;
|
|
70
|
+
regexp: false | null | MMRegExp;
|
|
71
|
+
constructor(pattern: string, options?: MinimatchOptions);
|
|
72
|
+
hasMagic(): boolean;
|
|
73
|
+
debug(..._: any[]): void;
|
|
74
|
+
make(): void;
|
|
75
|
+
preprocess(globParts: string[][]): string[][];
|
|
76
|
+
adjascentGlobstarOptimize(globParts: string[][]): string[][];
|
|
77
|
+
levelOneOptimize(globParts: string[][]): string[][];
|
|
78
|
+
levelTwoFileOptimize(parts: string | string[]): string[];
|
|
79
|
+
firstPhasePreProcess(globParts: string[][]): string[][];
|
|
80
|
+
secondPhasePreProcess(globParts: string[][]): string[][];
|
|
81
|
+
partsMatch(a: string[], b: string[], emptyGSMatch?: boolean): false | string[];
|
|
82
|
+
parseNegate(): void;
|
|
83
|
+
matchOne(file: string[], pattern: ParseReturn[], partial?: boolean): boolean;
|
|
84
|
+
braceExpand(): string[];
|
|
85
|
+
parse(pattern: string): ParseReturn;
|
|
86
|
+
makeRe(): false | MMRegExp;
|
|
87
|
+
slashSplit(p: string): string[];
|
|
88
|
+
match(f: string, partial?: boolean): boolean;
|
|
89
|
+
static defaults(def: MinimatchOptions): typeof Minimatch;
|
|
90
|
+
}
|
|
91
|
+
export { AST } from './ast.js';
|
|
92
|
+
export { escape } from './escape.js';
|
|
93
|
+
export { unescape } from './unescape.js';
|
|
94
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { MinimatchOptions } from './index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Un-escape a string that has been escaped with {@link escape}.
|
|
4
|
+
*
|
|
5
|
+
* If the {@link windowsPathsNoEscape} option is used, then square-brace
|
|
6
|
+
* escapes are removed, but not backslash escapes. For example, it will turn
|
|
7
|
+
* the string `'[*]'` into `*`, but it will not turn `'\\*'` into `'*'`,
|
|
8
|
+
* becuase `\` is a path separator in `windowsPathsNoEscape` mode.
|
|
9
|
+
*
|
|
10
|
+
* When `windowsPathsNoEscape` is not set, then both brace escapes and
|
|
11
|
+
* backslash escapes are removed.
|
|
12
|
+
*
|
|
13
|
+
* Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
|
|
14
|
+
* or unescaped.
|
|
15
|
+
*/
|
|
16
|
+
export declare const unescape: (s: string, { windowsPathsNoEscape, }?: Pick<MinimatchOptions, 'windowsPathsNoEscape'>) => string;
|
|
17
|
+
//# sourceMappingURL=unescape.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { MinimatchOptions, MMRegExp } from './index.js';
|
|
2
|
+
export type ExtglobType = '!' | '?' | '+' | '*' | '@';
|
|
3
|
+
export declare class AST {
|
|
4
|
+
#private;
|
|
5
|
+
type: ExtglobType | null;
|
|
6
|
+
constructor(type: ExtglobType | null, parent?: AST, options?: MinimatchOptions);
|
|
7
|
+
get hasMagic(): boolean | undefined;
|
|
8
|
+
toString(): string;
|
|
9
|
+
push(...parts: (string | AST)[]): void;
|
|
10
|
+
toJSON(): any[];
|
|
11
|
+
isStart(): boolean;
|
|
12
|
+
isEnd(): boolean;
|
|
13
|
+
copyIn(part: AST | string): void;
|
|
14
|
+
clone(parent: AST): AST;
|
|
15
|
+
static fromGlob(pattern: string, options?: MinimatchOptions): AST;
|
|
16
|
+
toMMPattern(): MMRegExp | string;
|
|
17
|
+
get options(): MinimatchOptions;
|
|
18
|
+
toRegExpSource(allowDot?: boolean): [re: string, body: string, hasMagic: boolean, uflag: boolean];
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=ast.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MinimatchOptions } from './index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Escape all magic characters in a glob pattern.
|
|
4
|
+
*
|
|
5
|
+
* If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape}
|
|
6
|
+
* option is used, then characters are escaped by wrapping in `[]`, because
|
|
7
|
+
* a magic character wrapped in a character class can only be satisfied by
|
|
8
|
+
* that exact character. In this mode, `\` is _not_ escaped, because it is
|
|
9
|
+
* not interpreted as a magic character, but instead as a path separator.
|
|
10
|
+
*/
|
|
11
|
+
export declare const escape: (s: string, { windowsPathsNoEscape, }?: Pick<MinimatchOptions, 'windowsPathsNoEscape'>) => string;
|
|
12
|
+
//# sourceMappingURL=escape.d.ts.map
|