@jadujoel/web-audio-clip-node 0.1.2 → 0.1.3
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/dist/audio/processor-code.d.ts +1 -1
- package/dist/audio/processor-code.js +1 -1
- package/dist/audio/processor-kernel.js +20 -6
- package/dist/audio/version.d.ts +1 -1
- package/dist/audio/version.js +1 -1
- package/dist/lib.bundle.js +3 -3
- package/dist/lib.bundle.js.map +3 -3
- package/dist/processor.js +2 -2
- package/dist/processor.js.map +3 -3
- package/examples/cdn-vanilla/README.md +1 -1
- package/examples/cdn-vanilla/index.html +2 -14
- package/examples/esm-bundler/README.md +3 -4
- package/examples/esm-bundler/bun.lock +15 -0
- package/examples/esm-bundler/index.html +1 -1
- package/examples/esm-bundler/{src/main.ts → main.ts} +2 -4
- package/examples/esm-bundler/package.json +3 -6
- package/package.json +1 -1
- package/examples/esm-bundler/node_modules/.package-lock.json +0 -1168
- package/examples/esm-bundler/node_modules/@esbuild/darwin-arm64/README.md +0 -3
- package/examples/esm-bundler/node_modules/@esbuild/darwin-arm64/bin/esbuild +0 -0
- package/examples/esm-bundler/node_modules/@esbuild/darwin-arm64/package.json +0 -20
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/LICENSE +0 -21
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/README.md +0 -91
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/audio/ClipNode.d.ts +0 -86
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/audio/ClipNode.js +0 -312
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/audio/processor-code.d.ts +0 -1
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/audio/processor-code.js +0 -2
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/audio/processor-kernel.d.ts +0 -43
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/audio/processor-kernel.js +0 -861
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/audio/processor.d.ts +0 -1
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/audio/processor.js +0 -80
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/audio/types.d.ts +0 -192
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/audio/types.js +0 -9
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/audio/utils.d.ts +0 -22
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/audio/utils.js +0 -128
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/audio/version.d.ts +0 -1
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/audio/version.js +0 -2
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/audio/workletUrl.d.ts +0 -6
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/audio/workletUrl.js +0 -17
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/components/AudioControl.d.ts +0 -28
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/components/AudioControl.js +0 -99
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/components/ContextMenu.d.ts +0 -17
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/components/ContextMenu.js +0 -73
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/components/ControlSection.d.ts +0 -26
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/components/ControlSection.js +0 -74
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/components/DetuneControl.d.ts +0 -10
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/components/DetuneControl.js +0 -44
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/components/DisplayPanel.d.ts +0 -14
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/components/DisplayPanel.js +0 -6
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/components/FilterControl.d.ts +0 -12
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/components/FilterControl.js +0 -48
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/components/GainControl.d.ts +0 -10
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/components/GainControl.js +0 -44
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/components/PanControl.d.ts +0 -10
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/components/PanControl.js +0 -50
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/components/PlaybackRateControl.d.ts +0 -10
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/components/PlaybackRateControl.js +0 -44
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/components/PlayheadSlider.d.ts +0 -13
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/components/PlayheadSlider.js +0 -20
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/components/SnappableSlider.d.ts +0 -18
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/components/SnappableSlider.js +0 -174
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/components/TransportButtons.d.ts +0 -14
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/components/TransportButtons.js +0 -9
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/controls/controlDefs.d.ts +0 -31
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/controls/controlDefs.js +0 -211
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/controls/formatValueText.d.ts +0 -2
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/controls/formatValueText.js +0 -80
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/controls/linkedControlPairs.d.ts +0 -20
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/controls/linkedControlPairs.js +0 -51
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/data/cache.d.ts +0 -1
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/data/cache.js +0 -17
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/data/fileStore.d.ts +0 -6
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/data/fileStore.js +0 -39
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/hooks/useClipNode.d.ts +0 -31
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/hooks/useClipNode.js +0 -338
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/lib-react.d.ts +0 -15
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/lib-react.js +0 -17
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/lib.d.ts +0 -16
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/lib.js +0 -16
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/processor.js +0 -4
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/processor.js.map +0 -12
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/store/clipStore.d.ts +0 -63
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/store/clipStore.js +0 -71
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/dist/styles.css +0 -739
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/examples/README.md +0 -10
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/examples/cdn-vanilla/README.md +0 -13
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/examples/cdn-vanilla/index.html +0 -61
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/examples/esm-bundler/README.md +0 -8
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/examples/esm-bundler/index.html +0 -12
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/examples/esm-bundler/package.json +0 -15
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/examples/esm-bundler/src/main.ts +0 -43
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/examples/react/README.md +0 -10
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/examples/react/index.html +0 -12
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/examples/react/package.json +0 -21
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/examples/react/src/App.tsx +0 -20
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/examples/react/src/main.tsx +0 -9
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/examples/react/vite.config.ts +0 -6
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/examples/self-hosted/README.md +0 -11
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/examples/self-hosted/index.html +0 -12
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/examples/self-hosted/package.json +0 -16
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/examples/self-hosted/public/.gitkeep +0 -1
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/examples/self-hosted/src/main.ts +0 -46
- package/examples/esm-bundler/node_modules/@jadujoel/web-audio-clip-node/package.json +0 -88
- package/examples/esm-bundler/node_modules/@rollup/rollup-darwin-arm64/README.md +0 -3
- package/examples/esm-bundler/node_modules/@rollup/rollup-darwin-arm64/package.json +0 -22
- package/examples/esm-bundler/node_modules/@rollup/rollup-darwin-arm64/rollup.darwin-arm64.node +0 -0
- package/examples/esm-bundler/node_modules/@types/estree/LICENSE +0 -21
- package/examples/esm-bundler/node_modules/@types/estree/README.md +0 -15
- package/examples/esm-bundler/node_modules/@types/estree/flow.d.ts +0 -167
- package/examples/esm-bundler/node_modules/@types/estree/index.d.ts +0 -694
- package/examples/esm-bundler/node_modules/@types/estree/package.json +0 -27
- package/examples/esm-bundler/node_modules/esbuild/LICENSE.md +0 -21
- package/examples/esm-bundler/node_modules/esbuild/README.md +0 -3
- package/examples/esm-bundler/node_modules/esbuild/bin/esbuild +0 -0
- package/examples/esm-bundler/node_modules/esbuild/install.js +0 -289
- package/examples/esm-bundler/node_modules/esbuild/lib/main.d.ts +0 -716
- package/examples/esm-bundler/node_modules/esbuild/lib/main.js +0 -2242
- package/examples/esm-bundler/node_modules/esbuild/package.json +0 -49
- package/examples/esm-bundler/node_modules/fdir/LICENSE +0 -7
- package/examples/esm-bundler/node_modules/fdir/README.md +0 -91
- package/examples/esm-bundler/node_modules/fdir/dist/index.cjs +0 -588
- package/examples/esm-bundler/node_modules/fdir/dist/index.d.cts +0 -155
- package/examples/esm-bundler/node_modules/fdir/dist/index.d.mts +0 -155
- package/examples/esm-bundler/node_modules/fdir/dist/index.mjs +0 -570
- package/examples/esm-bundler/node_modules/fdir/package.json +0 -103
- package/examples/esm-bundler/node_modules/nanoid/LICENSE +0 -20
- package/examples/esm-bundler/node_modules/nanoid/README.md +0 -39
- package/examples/esm-bundler/node_modules/nanoid/async/index.browser.cjs +0 -69
- package/examples/esm-bundler/node_modules/nanoid/async/index.browser.js +0 -34
- package/examples/esm-bundler/node_modules/nanoid/async/index.cjs +0 -71
- package/examples/esm-bundler/node_modules/nanoid/async/index.d.ts +0 -56
- package/examples/esm-bundler/node_modules/nanoid/async/index.js +0 -35
- package/examples/esm-bundler/node_modules/nanoid/async/index.native.js +0 -26
- package/examples/esm-bundler/node_modules/nanoid/async/package.json +0 -12
- package/examples/esm-bundler/node_modules/nanoid/bin/nanoid.cjs +0 -55
- package/examples/esm-bundler/node_modules/nanoid/index.browser.cjs +0 -72
- package/examples/esm-bundler/node_modules/nanoid/index.browser.js +0 -34
- package/examples/esm-bundler/node_modules/nanoid/index.cjs +0 -85
- package/examples/esm-bundler/node_modules/nanoid/index.d.cts +0 -91
- package/examples/esm-bundler/node_modules/nanoid/index.d.ts +0 -91
- package/examples/esm-bundler/node_modules/nanoid/index.js +0 -45
- package/examples/esm-bundler/node_modules/nanoid/nanoid.js +0 -1
- package/examples/esm-bundler/node_modules/nanoid/non-secure/index.cjs +0 -34
- package/examples/esm-bundler/node_modules/nanoid/non-secure/index.d.ts +0 -33
- package/examples/esm-bundler/node_modules/nanoid/non-secure/index.js +0 -21
- package/examples/esm-bundler/node_modules/nanoid/non-secure/package.json +0 -6
- package/examples/esm-bundler/node_modules/nanoid/package.json +0 -89
- package/examples/esm-bundler/node_modules/nanoid/url-alphabet/index.cjs +0 -7
- package/examples/esm-bundler/node_modules/nanoid/url-alphabet/index.js +0 -3
- package/examples/esm-bundler/node_modules/nanoid/url-alphabet/package.json +0 -6
- package/examples/esm-bundler/node_modules/picocolors/LICENSE +0 -15
- package/examples/esm-bundler/node_modules/picocolors/README.md +0 -21
- package/examples/esm-bundler/node_modules/picocolors/package.json +0 -25
- package/examples/esm-bundler/node_modules/picocolors/picocolors.browser.js +0 -4
- package/examples/esm-bundler/node_modules/picocolors/picocolors.d.ts +0 -5
- package/examples/esm-bundler/node_modules/picocolors/picocolors.js +0 -75
- package/examples/esm-bundler/node_modules/picocolors/types.d.ts +0 -51
- package/examples/esm-bundler/node_modules/picomatch/LICENSE +0 -21
- package/examples/esm-bundler/node_modules/picomatch/README.md +0 -749
- package/examples/esm-bundler/node_modules/picomatch/index.js +0 -17
- package/examples/esm-bundler/node_modules/picomatch/lib/constants.js +0 -184
- package/examples/esm-bundler/node_modules/picomatch/lib/parse.js +0 -1386
- package/examples/esm-bundler/node_modules/picomatch/lib/picomatch.js +0 -349
- package/examples/esm-bundler/node_modules/picomatch/lib/scan.js +0 -391
- package/examples/esm-bundler/node_modules/picomatch/lib/utils.js +0 -72
- package/examples/esm-bundler/node_modules/picomatch/package.json +0 -82
- package/examples/esm-bundler/node_modules/picomatch/posix.js +0 -3
- package/examples/esm-bundler/node_modules/postcss/LICENSE +0 -20
- package/examples/esm-bundler/node_modules/postcss/README.md +0 -28
- package/examples/esm-bundler/node_modules/postcss/lib/at-rule.d.ts +0 -139
- package/examples/esm-bundler/node_modules/postcss/lib/at-rule.js +0 -25
- package/examples/esm-bundler/node_modules/postcss/lib/comment.d.ts +0 -67
- package/examples/esm-bundler/node_modules/postcss/lib/comment.js +0 -13
- package/examples/esm-bundler/node_modules/postcss/lib/container.d.ts +0 -478
- package/examples/esm-bundler/node_modules/postcss/lib/container.js +0 -447
- package/examples/esm-bundler/node_modules/postcss/lib/css-syntax-error.d.ts +0 -247
- package/examples/esm-bundler/node_modules/postcss/lib/css-syntax-error.js +0 -133
- package/examples/esm-bundler/node_modules/postcss/lib/declaration.d.ts +0 -150
- package/examples/esm-bundler/node_modules/postcss/lib/declaration.js +0 -24
- package/examples/esm-bundler/node_modules/postcss/lib/document.d.ts +0 -68
- package/examples/esm-bundler/node_modules/postcss/lib/document.js +0 -33
- package/examples/esm-bundler/node_modules/postcss/lib/fromJSON.d.ts +0 -9
- package/examples/esm-bundler/node_modules/postcss/lib/fromJSON.js +0 -54
- package/examples/esm-bundler/node_modules/postcss/lib/input.d.ts +0 -226
- package/examples/esm-bundler/node_modules/postcss/lib/input.js +0 -273
- package/examples/esm-bundler/node_modules/postcss/lib/lazy-result.d.ts +0 -189
- package/examples/esm-bundler/node_modules/postcss/lib/lazy-result.js +0 -550
- package/examples/esm-bundler/node_modules/postcss/lib/list.d.ts +0 -60
- package/examples/esm-bundler/node_modules/postcss/lib/list.js +0 -58
- package/examples/esm-bundler/node_modules/postcss/lib/map-generator.js +0 -376
- package/examples/esm-bundler/node_modules/postcss/lib/no-work-result.d.ts +0 -45
- package/examples/esm-bundler/node_modules/postcss/lib/no-work-result.js +0 -137
- package/examples/esm-bundler/node_modules/postcss/lib/node.d.ts +0 -555
- package/examples/esm-bundler/node_modules/postcss/lib/node.js +0 -449
- package/examples/esm-bundler/node_modules/postcss/lib/parse.d.ts +0 -9
- package/examples/esm-bundler/node_modules/postcss/lib/parse.js +0 -42
- package/examples/esm-bundler/node_modules/postcss/lib/parser.js +0 -611
- package/examples/esm-bundler/node_modules/postcss/lib/postcss.d.mts +0 -66
- package/examples/esm-bundler/node_modules/postcss/lib/postcss.d.ts +0 -456
- package/examples/esm-bundler/node_modules/postcss/lib/postcss.js +0 -101
- package/examples/esm-bundler/node_modules/postcss/lib/postcss.mjs +0 -30
- package/examples/esm-bundler/node_modules/postcss/lib/previous-map.d.ts +0 -80
- package/examples/esm-bundler/node_modules/postcss/lib/previous-map.js +0 -145
- package/examples/esm-bundler/node_modules/postcss/lib/processor.d.ts +0 -114
- package/examples/esm-bundler/node_modules/postcss/lib/processor.js +0 -67
- package/examples/esm-bundler/node_modules/postcss/lib/result.d.ts +0 -204
- package/examples/esm-bundler/node_modules/postcss/lib/result.js +0 -42
- package/examples/esm-bundler/node_modules/postcss/lib/root.d.ts +0 -86
- package/examples/esm-bundler/node_modules/postcss/lib/root.js +0 -61
- package/examples/esm-bundler/node_modules/postcss/lib/rule.d.ts +0 -126
- package/examples/esm-bundler/node_modules/postcss/lib/rule.js +0 -27
- package/examples/esm-bundler/node_modules/postcss/lib/stringifier.d.ts +0 -45
- package/examples/esm-bundler/node_modules/postcss/lib/stringifier.js +0 -353
- package/examples/esm-bundler/node_modules/postcss/lib/stringify.d.ts +0 -9
- package/examples/esm-bundler/node_modules/postcss/lib/stringify.js +0 -11
- package/examples/esm-bundler/node_modules/postcss/lib/symbols.js +0 -5
- package/examples/esm-bundler/node_modules/postcss/lib/terminal-highlight.js +0 -70
- package/examples/esm-bundler/node_modules/postcss/lib/tokenize.js +0 -266
- package/examples/esm-bundler/node_modules/postcss/lib/warn-once.js +0 -13
- package/examples/esm-bundler/node_modules/postcss/lib/warning.d.ts +0 -146
- package/examples/esm-bundler/node_modules/postcss/lib/warning.js +0 -37
- package/examples/esm-bundler/node_modules/postcss/package.json +0 -88
- package/examples/esm-bundler/node_modules/rollup/LICENSE.md +0 -679
- package/examples/esm-bundler/node_modules/rollup/README.md +0 -134
- package/examples/esm-bundler/node_modules/rollup/dist/bin/rollup +0 -1912
- package/examples/esm-bundler/node_modules/rollup/dist/es/getLogFilter.js +0 -64
- package/examples/esm-bundler/node_modules/rollup/dist/es/package.json +0 -1
- package/examples/esm-bundler/node_modules/rollup/dist/es/parseAst.js +0 -12
- package/examples/esm-bundler/node_modules/rollup/dist/es/rollup.js +0 -17
- package/examples/esm-bundler/node_modules/rollup/dist/es/shared/node-entry.js +0 -24463
- package/examples/esm-bundler/node_modules/rollup/dist/es/shared/parseAst.js +0 -2124
- package/examples/esm-bundler/node_modules/rollup/dist/es/shared/watch.js +0 -9909
- package/examples/esm-bundler/node_modules/rollup/dist/getLogFilter.d.ts +0 -5
- package/examples/esm-bundler/node_modules/rollup/dist/getLogFilter.js +0 -69
- package/examples/esm-bundler/node_modules/rollup/dist/loadConfigFile.d.ts +0 -20
- package/examples/esm-bundler/node_modules/rollup/dist/loadConfigFile.js +0 -29
- package/examples/esm-bundler/node_modules/rollup/dist/native.js +0 -161
- package/examples/esm-bundler/node_modules/rollup/dist/parseAst.d.ts +0 -4
- package/examples/esm-bundler/node_modules/rollup/dist/parseAst.js +0 -22
- package/examples/esm-bundler/node_modules/rollup/dist/rollup.d.ts +0 -1225
- package/examples/esm-bundler/node_modules/rollup/dist/rollup.js +0 -127
- package/examples/esm-bundler/node_modules/rollup/dist/shared/fsevents-importer.js +0 -37
- package/examples/esm-bundler/node_modules/rollup/dist/shared/index.js +0 -9615
- package/examples/esm-bundler/node_modules/rollup/dist/shared/loadConfigFile.js +0 -572
- package/examples/esm-bundler/node_modules/rollup/dist/shared/parseAst.js +0 -2361
- package/examples/esm-bundler/node_modules/rollup/dist/shared/rollup.js +0 -24385
- package/examples/esm-bundler/node_modules/rollup/dist/shared/watch-cli.js +0 -542
- package/examples/esm-bundler/node_modules/rollup/dist/shared/watch.js +0 -324
- package/examples/esm-bundler/node_modules/rollup/package.json +0 -289
- package/examples/esm-bundler/node_modules/source-map-js/LICENSE +0 -28
- package/examples/esm-bundler/node_modules/source-map-js/README.md +0 -765
- package/examples/esm-bundler/node_modules/source-map-js/lib/array-set.js +0 -121
- package/examples/esm-bundler/node_modules/source-map-js/lib/base64-vlq.js +0 -140
- package/examples/esm-bundler/node_modules/source-map-js/lib/base64.js +0 -67
- package/examples/esm-bundler/node_modules/source-map-js/lib/binary-search.js +0 -111
- package/examples/esm-bundler/node_modules/source-map-js/lib/mapping-list.js +0 -79
- package/examples/esm-bundler/node_modules/source-map-js/lib/quick-sort.js +0 -132
- package/examples/esm-bundler/node_modules/source-map-js/lib/source-map-consumer.d.ts +0 -1
- package/examples/esm-bundler/node_modules/source-map-js/lib/source-map-consumer.js +0 -1188
- package/examples/esm-bundler/node_modules/source-map-js/lib/source-map-generator.d.ts +0 -1
- package/examples/esm-bundler/node_modules/source-map-js/lib/source-map-generator.js +0 -444
- package/examples/esm-bundler/node_modules/source-map-js/lib/source-node.d.ts +0 -1
- package/examples/esm-bundler/node_modules/source-map-js/lib/source-node.js +0 -413
- package/examples/esm-bundler/node_modules/source-map-js/lib/util.js +0 -594
- package/examples/esm-bundler/node_modules/source-map-js/package.json +0 -71
- package/examples/esm-bundler/node_modules/source-map-js/source-map.d.ts +0 -104
- package/examples/esm-bundler/node_modules/source-map-js/source-map.js +0 -8
- package/examples/esm-bundler/node_modules/tinyglobby/LICENSE +0 -21
- package/examples/esm-bundler/node_modules/tinyglobby/README.md +0 -25
- package/examples/esm-bundler/node_modules/tinyglobby/dist/index.cjs +0 -334
- package/examples/esm-bundler/node_modules/tinyglobby/dist/index.d.cts +0 -148
- package/examples/esm-bundler/node_modules/tinyglobby/dist/index.d.mts +0 -148
- package/examples/esm-bundler/node_modules/tinyglobby/dist/index.mjs +0 -306
- package/examples/esm-bundler/node_modules/tinyglobby/package.json +0 -73
- package/examples/esm-bundler/node_modules/vite/LICENSE.md +0 -2406
- package/examples/esm-bundler/node_modules/vite/README.md +0 -20
- package/examples/esm-bundler/node_modules/vite/bin/openChrome.applescript +0 -95
- package/examples/esm-bundler/node_modules/vite/bin/vite.js +0 -79
- package/examples/esm-bundler/node_modules/vite/client.d.ts +0 -279
- package/examples/esm-bundler/node_modules/vite/dist/client/client.mjs +0 -1134
- package/examples/esm-bundler/node_modules/vite/dist/client/env.mjs +0 -24
- package/examples/esm-bundler/node_modules/vite/dist/node/chunks/dep-3RmXg9uo.js +0 -553
- package/examples/esm-bundler/node_modules/vite/dist/node/chunks/dep-4-IQbZQm.js +0 -822
- package/examples/esm-bundler/node_modules/vite/dist/node/chunks/dep-CvfTChi5.js +0 -8218
- package/examples/esm-bundler/node_modules/vite/dist/node/chunks/dep-Dq2t6Dq0.js +0 -49565
- package/examples/esm-bundler/node_modules/vite/dist/node/chunks/dep-lpEPC2f9.js +0 -7113
- package/examples/esm-bundler/node_modules/vite/dist/node/cli.js +0 -949
- package/examples/esm-bundler/node_modules/vite/dist/node/constants.js +0 -149
- package/examples/esm-bundler/node_modules/vite/dist/node/index.d.ts +0 -4227
- package/examples/esm-bundler/node_modules/vite/dist/node/index.js +0 -194
- package/examples/esm-bundler/node_modules/vite/dist/node/module-runner.d.ts +0 -290
- package/examples/esm-bundler/node_modules/vite/dist/node/module-runner.js +0 -1311
- package/examples/esm-bundler/node_modules/vite/dist/node/moduleRunnerTransport.d-DJ_mE5sf.d.ts +0 -87
- package/examples/esm-bundler/node_modules/vite/dist/node-cjs/publicUtils.cjs +0 -3987
- package/examples/esm-bundler/node_modules/vite/index.cjs +0 -96
- package/examples/esm-bundler/node_modules/vite/index.d.cts +0 -6
- package/examples/esm-bundler/node_modules/vite/misc/false.js +0 -1
- package/examples/esm-bundler/node_modules/vite/misc/true.js +0 -1
- package/examples/esm-bundler/node_modules/vite/package.json +0 -204
- package/examples/esm-bundler/node_modules/vite/types/customEvent.d.ts +0 -45
- package/examples/esm-bundler/node_modules/vite/types/hmrPayload.d.ts +0 -74
- package/examples/esm-bundler/node_modules/vite/types/hot.d.ts +0 -39
- package/examples/esm-bundler/node_modules/vite/types/import-meta.d.ts +0 -5
- package/examples/esm-bundler/node_modules/vite/types/importGlob.d.ts +0 -75
- package/examples/esm-bundler/node_modules/vite/types/importMeta.d.ts +0 -31
- package/examples/esm-bundler/node_modules/vite/types/internal/cssPreprocessorOptions.d.ts +0 -63
- package/examples/esm-bundler/node_modules/vite/types/internal/lightningcssOptions.d.ts +0 -18
- package/examples/esm-bundler/node_modules/vite/types/metadata.d.ts +0 -35
- package/examples/esm-bundler/node_modules/vite/types/package.json +0 -4
- package/examples/esm-bundler/package-lock.json +0 -1127
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { FSLike } from "fdir";
|
|
2
|
-
|
|
3
|
-
//#region src/types.d.ts
|
|
4
|
-
type FileSystemAdapter = Partial<FSLike>;
|
|
5
|
-
interface GlobOptions {
|
|
6
|
-
/**
|
|
7
|
-
* Whether to return absolute paths. Disable to have relative paths.
|
|
8
|
-
* @default false
|
|
9
|
-
*/
|
|
10
|
-
absolute?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Enables support for brace expansion syntax, like `{a,b}` or `{1..9}`.
|
|
13
|
-
* @default true
|
|
14
|
-
*/
|
|
15
|
-
braceExpansion?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Whether to match in case-sensitive mode.
|
|
18
|
-
* @default true
|
|
19
|
-
*/
|
|
20
|
-
caseSensitiveMatch?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* The working directory in which to search. Results will be returned relative to this directory, unless
|
|
23
|
-
* {@link absolute} is set.
|
|
24
|
-
*
|
|
25
|
-
* It is important to avoid globbing outside this directory when possible, even with absolute paths enabled,
|
|
26
|
-
* as doing so can harm performance due to having to recalculate relative paths.
|
|
27
|
-
* @default process.cwd()
|
|
28
|
-
*/
|
|
29
|
-
cwd?: string | URL;
|
|
30
|
-
/**
|
|
31
|
-
* Logs useful debug information. Meant for development purposes. Logs can change at any time.
|
|
32
|
-
* @default false
|
|
33
|
-
*/
|
|
34
|
-
debug?: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Maximum directory depth to crawl.
|
|
37
|
-
* @default Infinity
|
|
38
|
-
*/
|
|
39
|
-
deep?: number;
|
|
40
|
-
/**
|
|
41
|
-
* Whether to return entries that start with a dot, like `.gitignore` or `.prettierrc`.
|
|
42
|
-
* @default false
|
|
43
|
-
*/
|
|
44
|
-
dot?: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Whether to automatically expand directory patterns.
|
|
47
|
-
*
|
|
48
|
-
* Important to disable if migrating from [`fast-glob`](https://github.com/mrmlnc/fast-glob).
|
|
49
|
-
* @default true
|
|
50
|
-
*/
|
|
51
|
-
expandDirectories?: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* Enables support for extglobs, like `+(pattern)`.
|
|
54
|
-
* @default true
|
|
55
|
-
*/
|
|
56
|
-
extglob?: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Whether to traverse and include symbolic links. Can slightly affect performance.
|
|
59
|
-
* @default true
|
|
60
|
-
*/
|
|
61
|
-
followSymbolicLinks?: boolean;
|
|
62
|
-
/**
|
|
63
|
-
* An object that overrides `node:fs` functions.
|
|
64
|
-
* @default import('node:fs')
|
|
65
|
-
*/
|
|
66
|
-
fs?: FileSystemAdapter;
|
|
67
|
-
/**
|
|
68
|
-
* Enables support for matching nested directories with globstars (`**`).
|
|
69
|
-
* If `false`, `**` behaves exactly like `*`.
|
|
70
|
-
* @default true
|
|
71
|
-
*/
|
|
72
|
-
globstar?: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* Glob patterns to exclude from the results.
|
|
75
|
-
* @default []
|
|
76
|
-
*/
|
|
77
|
-
ignore?: string | readonly string[];
|
|
78
|
-
/**
|
|
79
|
-
* Enable to only return directories.
|
|
80
|
-
* If `true`, disables {@link onlyFiles}.
|
|
81
|
-
* @default false
|
|
82
|
-
*/
|
|
83
|
-
onlyDirectories?: boolean;
|
|
84
|
-
/**
|
|
85
|
-
* Enable to only return files.
|
|
86
|
-
* @default true
|
|
87
|
-
*/
|
|
88
|
-
onlyFiles?: boolean;
|
|
89
|
-
/**
|
|
90
|
-
* @deprecated Provide patterns as the first argument instead.
|
|
91
|
-
*/
|
|
92
|
-
patterns?: string | readonly string[];
|
|
93
|
-
/**
|
|
94
|
-
* An `AbortSignal` to abort crawling the file system.
|
|
95
|
-
* @default undefined
|
|
96
|
-
*/
|
|
97
|
-
signal?: AbortSignal;
|
|
98
|
-
}
|
|
99
|
-
//#endregion
|
|
100
|
-
//#region src/utils.d.ts
|
|
101
|
-
/**
|
|
102
|
-
* Converts a path to a pattern depending on the platform.
|
|
103
|
-
* Identical to {@link escapePath} on POSIX systems.
|
|
104
|
-
* @see {@link https://superchupu.dev/tinyglobby/documentation#convertPathToPattern}
|
|
105
|
-
*/
|
|
106
|
-
declare const convertPathToPattern: (path: string) => string;
|
|
107
|
-
/**
|
|
108
|
-
* Escapes a path's special characters depending on the platform.
|
|
109
|
-
* @see {@link https://superchupu.dev/tinyglobby/documentation#escapePath}
|
|
110
|
-
*/
|
|
111
|
-
declare const escapePath: (path: string) => string;
|
|
112
|
-
/**
|
|
113
|
-
* Checks if a pattern has dynamic parts.
|
|
114
|
-
*
|
|
115
|
-
* Has a few minor differences with [`fast-glob`](https://github.com/mrmlnc/fast-glob) for better accuracy:
|
|
116
|
-
*
|
|
117
|
-
* - Doesn't necessarily return `false` on patterns that include `\`.
|
|
118
|
-
* - Returns `true` if the pattern includes parentheses, regardless of them representing one single pattern or not.
|
|
119
|
-
* - Returns `true` for unfinished glob extensions i.e. `(h`, `+(h`.
|
|
120
|
-
* - Returns `true` for unfinished brace expansions as long as they include `,` or `..`.
|
|
121
|
-
*
|
|
122
|
-
* @see {@link https://superchupu.dev/tinyglobby/documentation#isDynamicPattern}
|
|
123
|
-
*/
|
|
124
|
-
declare function isDynamicPattern(pattern: string, options?: {
|
|
125
|
-
caseSensitiveMatch: boolean;
|
|
126
|
-
}): boolean;
|
|
127
|
-
//#endregion
|
|
128
|
-
//#region src/index.d.ts
|
|
129
|
-
/**
|
|
130
|
-
* Asynchronously match files following a glob pattern.
|
|
131
|
-
* @see {@link https://superchupu.dev/tinyglobby/documentation#glob}
|
|
132
|
-
*/
|
|
133
|
-
declare function glob(patterns: string | readonly string[], options?: Omit<GlobOptions, "patterns">): Promise<string[]>;
|
|
134
|
-
/**
|
|
135
|
-
* @deprecated Provide patterns as the first argument instead.
|
|
136
|
-
*/
|
|
137
|
-
declare function glob(options: GlobOptions): Promise<string[]>;
|
|
138
|
-
/**
|
|
139
|
-
* Synchronously match files following a glob pattern.
|
|
140
|
-
* @see {@link https://superchupu.dev/tinyglobby/documentation#globSync}
|
|
141
|
-
*/
|
|
142
|
-
declare function globSync(patterns: string | readonly string[], options?: Omit<GlobOptions, "patterns">): string[];
|
|
143
|
-
/**
|
|
144
|
-
* @deprecated Provide patterns as the first argument instead.
|
|
145
|
-
*/
|
|
146
|
-
declare function globSync(options: GlobOptions): string[];
|
|
147
|
-
//#endregion
|
|
148
|
-
export { type GlobOptions, convertPathToPattern, escapePath, glob, globSync, isDynamicPattern };
|
|
@@ -1,306 +0,0 @@
|
|
|
1
|
-
import { readdir, readdirSync, realpath, realpathSync, stat, statSync } from "fs";
|
|
2
|
-
import { isAbsolute, posix, resolve } from "path";
|
|
3
|
-
import { fileURLToPath } from "url";
|
|
4
|
-
import { fdir } from "fdir";
|
|
5
|
-
import picomatch from "picomatch";
|
|
6
|
-
//#region src/utils.ts
|
|
7
|
-
const isReadonlyArray = Array.isArray;
|
|
8
|
-
const BACKSLASHES = /\\/g;
|
|
9
|
-
const isWin = process.platform === "win32";
|
|
10
|
-
const ONLY_PARENT_DIRECTORIES = /^(\/?\.\.)+$/;
|
|
11
|
-
function getPartialMatcher(patterns, options = {}) {
|
|
12
|
-
const patternsCount = patterns.length;
|
|
13
|
-
const patternsParts = Array(patternsCount);
|
|
14
|
-
const matchers = Array(patternsCount);
|
|
15
|
-
let i, j;
|
|
16
|
-
for (i = 0; i < patternsCount; i++) {
|
|
17
|
-
const parts = splitPattern(patterns[i]);
|
|
18
|
-
patternsParts[i] = parts;
|
|
19
|
-
const partsCount = parts.length;
|
|
20
|
-
const partMatchers = Array(partsCount);
|
|
21
|
-
for (j = 0; j < partsCount; j++) partMatchers[j] = picomatch(parts[j], options);
|
|
22
|
-
matchers[i] = partMatchers;
|
|
23
|
-
}
|
|
24
|
-
return (input) => {
|
|
25
|
-
const inputParts = input.split("/");
|
|
26
|
-
if (inputParts[0] === ".." && ONLY_PARENT_DIRECTORIES.test(input)) return true;
|
|
27
|
-
for (i = 0; i < patternsCount; i++) {
|
|
28
|
-
const patternParts = patternsParts[i];
|
|
29
|
-
const matcher = matchers[i];
|
|
30
|
-
const inputPatternCount = inputParts.length;
|
|
31
|
-
const minParts = Math.min(inputPatternCount, patternParts.length);
|
|
32
|
-
j = 0;
|
|
33
|
-
while (j < minParts) {
|
|
34
|
-
const part = patternParts[j];
|
|
35
|
-
if (part.includes("/")) return true;
|
|
36
|
-
if (!matcher[j](inputParts[j])) break;
|
|
37
|
-
if (!options.noglobstar && part === "**") return true;
|
|
38
|
-
j++;
|
|
39
|
-
}
|
|
40
|
-
if (j === inputPatternCount) return true;
|
|
41
|
-
}
|
|
42
|
-
return false;
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
/* node:coverage ignore next 2 */
|
|
46
|
-
const WIN32_ROOT_DIR = /^[A-Z]:\/$/i;
|
|
47
|
-
const isRoot = isWin ? (p) => WIN32_ROOT_DIR.test(p) : (p) => p === "/";
|
|
48
|
-
function buildFormat(cwd, root, absolute) {
|
|
49
|
-
if (cwd === root || root.startsWith(`${cwd}/`)) {
|
|
50
|
-
if (absolute) {
|
|
51
|
-
const start = cwd.length + +!isRoot(cwd);
|
|
52
|
-
return (p, isDir) => p.slice(start, isDir ? -1 : void 0) || ".";
|
|
53
|
-
}
|
|
54
|
-
const prefix = root.slice(cwd.length + 1);
|
|
55
|
-
if (prefix) return (p, isDir) => {
|
|
56
|
-
if (p === ".") return prefix;
|
|
57
|
-
const result = `${prefix}/${p}`;
|
|
58
|
-
return isDir ? result.slice(0, -1) : result;
|
|
59
|
-
};
|
|
60
|
-
return (p, isDir) => isDir && p !== "." ? p.slice(0, -1) : p;
|
|
61
|
-
}
|
|
62
|
-
if (absolute) return (p) => posix.relative(cwd, p) || ".";
|
|
63
|
-
return (p) => posix.relative(cwd, `${root}/${p}`) || ".";
|
|
64
|
-
}
|
|
65
|
-
function buildRelative(cwd, root) {
|
|
66
|
-
if (root.startsWith(`${cwd}/`)) {
|
|
67
|
-
const prefix = root.slice(cwd.length + 1);
|
|
68
|
-
return (p) => `${prefix}/${p}`;
|
|
69
|
-
}
|
|
70
|
-
return (p) => {
|
|
71
|
-
const result = posix.relative(cwd, `${root}/${p}`);
|
|
72
|
-
return p[p.length - 1] === "/" && result !== "" ? `${result}/` : result || ".";
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
const splitPatternOptions = { parts: true };
|
|
76
|
-
function splitPattern(path) {
|
|
77
|
-
var _result$parts;
|
|
78
|
-
const result = picomatch.scan(path, splitPatternOptions);
|
|
79
|
-
return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path];
|
|
80
|
-
}
|
|
81
|
-
const ESCAPED_WIN32_BACKSLASHES = /\\(?![()[\]{}!+@])/g;
|
|
82
|
-
function convertPosixPathToPattern(path) {
|
|
83
|
-
return escapePosixPath(path);
|
|
84
|
-
}
|
|
85
|
-
function convertWin32PathToPattern(path) {
|
|
86
|
-
return escapeWin32Path(path).replace(ESCAPED_WIN32_BACKSLASHES, "/");
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Converts a path to a pattern depending on the platform.
|
|
90
|
-
* Identical to {@link escapePath} on POSIX systems.
|
|
91
|
-
* @see {@link https://superchupu.dev/tinyglobby/documentation#convertPathToPattern}
|
|
92
|
-
*/
|
|
93
|
-
/* node:coverage ignore next 3 */
|
|
94
|
-
const convertPathToPattern = isWin ? convertWin32PathToPattern : convertPosixPathToPattern;
|
|
95
|
-
const POSIX_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g;
|
|
96
|
-
const WIN32_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g;
|
|
97
|
-
const escapePosixPath = (path) => path.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&");
|
|
98
|
-
const escapeWin32Path = (path) => path.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&");
|
|
99
|
-
/**
|
|
100
|
-
* Escapes a path's special characters depending on the platform.
|
|
101
|
-
* @see {@link https://superchupu.dev/tinyglobby/documentation#escapePath}
|
|
102
|
-
*/
|
|
103
|
-
/* node:coverage ignore next */
|
|
104
|
-
const escapePath = isWin ? escapeWin32Path : escapePosixPath;
|
|
105
|
-
/**
|
|
106
|
-
* Checks if a pattern has dynamic parts.
|
|
107
|
-
*
|
|
108
|
-
* Has a few minor differences with [`fast-glob`](https://github.com/mrmlnc/fast-glob) for better accuracy:
|
|
109
|
-
*
|
|
110
|
-
* - Doesn't necessarily return `false` on patterns that include `\`.
|
|
111
|
-
* - Returns `true` if the pattern includes parentheses, regardless of them representing one single pattern or not.
|
|
112
|
-
* - Returns `true` for unfinished glob extensions i.e. `(h`, `+(h`.
|
|
113
|
-
* - Returns `true` for unfinished brace expansions as long as they include `,` or `..`.
|
|
114
|
-
*
|
|
115
|
-
* @see {@link https://superchupu.dev/tinyglobby/documentation#isDynamicPattern}
|
|
116
|
-
*/
|
|
117
|
-
function isDynamicPattern(pattern, options) {
|
|
118
|
-
if ((options === null || options === void 0 ? void 0 : options.caseSensitiveMatch) === false) return true;
|
|
119
|
-
const scan = picomatch.scan(pattern);
|
|
120
|
-
return scan.isGlob || scan.negated;
|
|
121
|
-
}
|
|
122
|
-
function log(...tasks) {
|
|
123
|
-
console.log(`[tinyglobby ${(/* @__PURE__ */ new Date()).toLocaleTimeString("es")}]`, ...tasks);
|
|
124
|
-
}
|
|
125
|
-
function ensureStringArray(value) {
|
|
126
|
-
return typeof value === "string" ? [value] : value !== null && value !== void 0 ? value : [];
|
|
127
|
-
}
|
|
128
|
-
//#endregion
|
|
129
|
-
//#region src/patterns.ts
|
|
130
|
-
const PARENT_DIRECTORY = /^(\/?\.\.)+/;
|
|
131
|
-
const ESCAPING_BACKSLASHES = /\\(?=[()[\]{}!*+?@|])/g;
|
|
132
|
-
function normalizePattern(pattern, opts, props, isIgnore) {
|
|
133
|
-
var _PARENT_DIRECTORY$exe;
|
|
134
|
-
const cwd = opts.cwd;
|
|
135
|
-
let result = pattern;
|
|
136
|
-
if (pattern[pattern.length - 1] === "/") result = pattern.slice(0, -1);
|
|
137
|
-
if (result[result.length - 1] !== "*" && opts.expandDirectories) result += "/**";
|
|
138
|
-
const escapedCwd = escapePath(cwd);
|
|
139
|
-
result = isAbsolute(result.replace(ESCAPING_BACKSLASHES, "")) ? posix.relative(escapedCwd, result) : posix.normalize(result);
|
|
140
|
-
const parentDir = (_PARENT_DIRECTORY$exe = PARENT_DIRECTORY.exec(result)) === null || _PARENT_DIRECTORY$exe === void 0 ? void 0 : _PARENT_DIRECTORY$exe[0];
|
|
141
|
-
const parts = splitPattern(result);
|
|
142
|
-
if (parentDir) {
|
|
143
|
-
const n = (parentDir.length + 1) / 3;
|
|
144
|
-
let i = 0;
|
|
145
|
-
const cwdParts = escapedCwd.split("/");
|
|
146
|
-
while (i < n && parts[i + n] === cwdParts[cwdParts.length + i - n]) {
|
|
147
|
-
result = result.slice(0, (n - i - 1) * 3) + result.slice((n - i) * 3 + parts[i + n].length + 1) || ".";
|
|
148
|
-
i++;
|
|
149
|
-
}
|
|
150
|
-
const potentialRoot = posix.join(cwd, parentDir.slice(i * 3));
|
|
151
|
-
if (potentialRoot[0] !== "." && props.root.length > potentialRoot.length) {
|
|
152
|
-
props.root = potentialRoot;
|
|
153
|
-
props.depthOffset = -n + i;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
if (!isIgnore && props.depthOffset >= 0) {
|
|
157
|
-
var _props$commonPath;
|
|
158
|
-
(_props$commonPath = props.commonPath) !== null && _props$commonPath !== void 0 || (props.commonPath = parts);
|
|
159
|
-
const newCommonPath = [];
|
|
160
|
-
const length = Math.min(props.commonPath.length, parts.length);
|
|
161
|
-
for (let i = 0; i < length; i++) {
|
|
162
|
-
const part = parts[i];
|
|
163
|
-
if (part === "**" && !parts[i + 1]) {
|
|
164
|
-
newCommonPath.pop();
|
|
165
|
-
break;
|
|
166
|
-
}
|
|
167
|
-
if (i === parts.length - 1 || part !== props.commonPath[i] || isDynamicPattern(part)) break;
|
|
168
|
-
newCommonPath.push(part);
|
|
169
|
-
}
|
|
170
|
-
props.depthOffset = newCommonPath.length;
|
|
171
|
-
props.commonPath = newCommonPath;
|
|
172
|
-
props.root = newCommonPath.length > 0 ? posix.join(cwd, ...newCommonPath) : cwd;
|
|
173
|
-
}
|
|
174
|
-
return result;
|
|
175
|
-
}
|
|
176
|
-
function processPatterns(options, patterns, props) {
|
|
177
|
-
const matchPatterns = [];
|
|
178
|
-
const ignorePatterns = [];
|
|
179
|
-
for (const pattern of options.ignore) {
|
|
180
|
-
if (!pattern) continue;
|
|
181
|
-
if (pattern[0] !== "!" || pattern[1] === "(") ignorePatterns.push(normalizePattern(pattern, options, props, true));
|
|
182
|
-
}
|
|
183
|
-
for (const pattern of patterns) {
|
|
184
|
-
if (!pattern) continue;
|
|
185
|
-
if (pattern[0] !== "!" || pattern[1] === "(") matchPatterns.push(normalizePattern(pattern, options, props, false));
|
|
186
|
-
else if (pattern[1] !== "!" || pattern[2] === "(") ignorePatterns.push(normalizePattern(pattern.slice(1), options, props, true));
|
|
187
|
-
}
|
|
188
|
-
return {
|
|
189
|
-
match: matchPatterns,
|
|
190
|
-
ignore: ignorePatterns
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
//#endregion
|
|
194
|
-
//#region src/crawler.ts
|
|
195
|
-
function buildCrawler(options, patterns) {
|
|
196
|
-
const cwd = options.cwd;
|
|
197
|
-
const props = {
|
|
198
|
-
root: cwd,
|
|
199
|
-
depthOffset: 0
|
|
200
|
-
};
|
|
201
|
-
const processed = processPatterns(options, patterns, props);
|
|
202
|
-
if (options.debug) log("internal processing patterns:", processed);
|
|
203
|
-
const { absolute, caseSensitiveMatch, debug, dot, followSymbolicLinks, onlyDirectories } = options;
|
|
204
|
-
const root = props.root.replace(BACKSLASHES, "");
|
|
205
|
-
const matchOptions = {
|
|
206
|
-
dot,
|
|
207
|
-
nobrace: options.braceExpansion === false,
|
|
208
|
-
nocase: !caseSensitiveMatch,
|
|
209
|
-
noextglob: options.extglob === false,
|
|
210
|
-
noglobstar: options.globstar === false,
|
|
211
|
-
posix: true
|
|
212
|
-
};
|
|
213
|
-
const matcher = picomatch(processed.match, matchOptions);
|
|
214
|
-
const ignore = picomatch(processed.ignore, matchOptions);
|
|
215
|
-
const partialMatcher = getPartialMatcher(processed.match, matchOptions);
|
|
216
|
-
const format = buildFormat(cwd, root, absolute);
|
|
217
|
-
const excludeFormatter = absolute ? format : buildFormat(cwd, root, true);
|
|
218
|
-
const excludePredicate = (_, p) => {
|
|
219
|
-
const relativePath = excludeFormatter(p, true);
|
|
220
|
-
return relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath);
|
|
221
|
-
};
|
|
222
|
-
let maxDepth;
|
|
223
|
-
if (options.deep !== void 0) maxDepth = Math.round(options.deep - props.depthOffset);
|
|
224
|
-
const crawler = new fdir({
|
|
225
|
-
filters: [debug ? (p, isDirectory) => {
|
|
226
|
-
const path = format(p, isDirectory);
|
|
227
|
-
const matches = matcher(path) && !ignore(path);
|
|
228
|
-
if (matches) log(`matched ${path}`);
|
|
229
|
-
return matches;
|
|
230
|
-
} : (p, isDirectory) => {
|
|
231
|
-
const path = format(p, isDirectory);
|
|
232
|
-
return matcher(path) && !ignore(path);
|
|
233
|
-
}],
|
|
234
|
-
exclude: debug ? (_, p) => {
|
|
235
|
-
const skipped = excludePredicate(_, p);
|
|
236
|
-
log(`${skipped ? "skipped" : "crawling"} ${p}`);
|
|
237
|
-
return skipped;
|
|
238
|
-
} : excludePredicate,
|
|
239
|
-
fs: options.fs,
|
|
240
|
-
pathSeparator: "/",
|
|
241
|
-
relativePaths: !absolute,
|
|
242
|
-
resolvePaths: absolute,
|
|
243
|
-
includeBasePath: absolute,
|
|
244
|
-
resolveSymlinks: followSymbolicLinks,
|
|
245
|
-
excludeSymlinks: !followSymbolicLinks,
|
|
246
|
-
excludeFiles: onlyDirectories,
|
|
247
|
-
includeDirs: onlyDirectories || !options.onlyFiles,
|
|
248
|
-
maxDepth,
|
|
249
|
-
signal: options.signal
|
|
250
|
-
}).crawl(root);
|
|
251
|
-
if (options.debug) log("internal properties:", {
|
|
252
|
-
...props,
|
|
253
|
-
root
|
|
254
|
-
});
|
|
255
|
-
return [crawler, cwd !== root && !absolute && buildRelative(cwd, root)];
|
|
256
|
-
}
|
|
257
|
-
//#endregion
|
|
258
|
-
//#region src/index.ts
|
|
259
|
-
function formatPaths(paths, mapper) {
|
|
260
|
-
if (mapper) for (let i = paths.length - 1; i >= 0; i--) paths[i] = mapper(paths[i]);
|
|
261
|
-
return paths;
|
|
262
|
-
}
|
|
263
|
-
const defaultOptions = {
|
|
264
|
-
caseSensitiveMatch: true,
|
|
265
|
-
cwd: process.cwd(),
|
|
266
|
-
debug: !!process.env.TINYGLOBBY_DEBUG,
|
|
267
|
-
expandDirectories: true,
|
|
268
|
-
followSymbolicLinks: true,
|
|
269
|
-
onlyFiles: true
|
|
270
|
-
};
|
|
271
|
-
function getOptions(options) {
|
|
272
|
-
const opts = {
|
|
273
|
-
...defaultOptions,
|
|
274
|
-
...options
|
|
275
|
-
};
|
|
276
|
-
opts.cwd = (opts.cwd instanceof URL ? fileURLToPath(opts.cwd) : resolve(opts.cwd)).replace(BACKSLASHES, "/");
|
|
277
|
-
opts.ignore = ensureStringArray(opts.ignore);
|
|
278
|
-
opts.fs && (opts.fs = {
|
|
279
|
-
readdir: opts.fs.readdir || readdir,
|
|
280
|
-
readdirSync: opts.fs.readdirSync || readdirSync,
|
|
281
|
-
realpath: opts.fs.realpath || realpath,
|
|
282
|
-
realpathSync: opts.fs.realpathSync || realpathSync,
|
|
283
|
-
stat: opts.fs.stat || stat,
|
|
284
|
-
statSync: opts.fs.statSync || statSync
|
|
285
|
-
});
|
|
286
|
-
if (opts.debug) log("globbing with options:", opts);
|
|
287
|
-
return opts;
|
|
288
|
-
}
|
|
289
|
-
function getCrawler(globInput, inputOptions = {}) {
|
|
290
|
-
var _ref;
|
|
291
|
-
if (globInput && (inputOptions === null || inputOptions === void 0 ? void 0 : inputOptions.patterns)) throw new Error("Cannot pass patterns as both an argument and an option");
|
|
292
|
-
const isModern = isReadonlyArray(globInput) || typeof globInput === "string";
|
|
293
|
-
const patterns = ensureStringArray((_ref = isModern ? globInput : globInput.patterns) !== null && _ref !== void 0 ? _ref : "**/*");
|
|
294
|
-
const options = getOptions(isModern ? inputOptions : globInput);
|
|
295
|
-
return patterns.length > 0 ? buildCrawler(options, patterns) : [];
|
|
296
|
-
}
|
|
297
|
-
async function glob(globInput, options) {
|
|
298
|
-
const [crawler, relative] = getCrawler(globInput, options);
|
|
299
|
-
return crawler ? formatPaths(await crawler.withPromise(), relative) : [];
|
|
300
|
-
}
|
|
301
|
-
function globSync(globInput, options) {
|
|
302
|
-
const [crawler, relative] = getCrawler(globInput, options);
|
|
303
|
-
return crawler ? formatPaths(crawler.sync(), relative) : [];
|
|
304
|
-
}
|
|
305
|
-
//#endregion
|
|
306
|
-
export { convertPathToPattern, escapePath, glob, globSync, isDynamicPattern };
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "tinyglobby",
|
|
3
|
-
"version": "0.2.16",
|
|
4
|
-
"description": "A fast and minimal alternative to globby and fast-glob",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/index.cjs",
|
|
7
|
-
"module": "./dist/index.mjs",
|
|
8
|
-
"types": "./dist/index.d.cts",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"import": "./dist/index.mjs",
|
|
12
|
-
"require": "./dist/index.cjs"
|
|
13
|
-
},
|
|
14
|
-
"./package.json": "./package.json"
|
|
15
|
-
},
|
|
16
|
-
"sideEffects": false,
|
|
17
|
-
"files": [
|
|
18
|
-
"dist"
|
|
19
|
-
],
|
|
20
|
-
"author": "Superchupu",
|
|
21
|
-
"license": "MIT",
|
|
22
|
-
"keywords": [
|
|
23
|
-
"glob",
|
|
24
|
-
"patterns",
|
|
25
|
-
"fast",
|
|
26
|
-
"implementation"
|
|
27
|
-
],
|
|
28
|
-
"repository": {
|
|
29
|
-
"type": "git",
|
|
30
|
-
"url": "git+https://github.com/SuperchupuDev/tinyglobby.git"
|
|
31
|
-
},
|
|
32
|
-
"bugs": {
|
|
33
|
-
"url": "https://github.com/SuperchupuDev/tinyglobby/issues"
|
|
34
|
-
},
|
|
35
|
-
"homepage": "https://superchupu.dev/tinyglobby",
|
|
36
|
-
"funding": {
|
|
37
|
-
"url": "https://github.com/sponsors/SuperchupuDev"
|
|
38
|
-
},
|
|
39
|
-
"dependencies": {
|
|
40
|
-
"fdir": "^6.5.0",
|
|
41
|
-
"picomatch": "^4.0.4"
|
|
42
|
-
},
|
|
43
|
-
"devDependencies": {
|
|
44
|
-
"@biomejs/biome": "^2.4.10",
|
|
45
|
-
"@types/node": "^25.5.2",
|
|
46
|
-
"@types/picomatch": "^4.0.3",
|
|
47
|
-
"fast-glob": "^3.3.3",
|
|
48
|
-
"fs-fixture": "^2.13.0",
|
|
49
|
-
"glob": "^13.0.6",
|
|
50
|
-
"tinybench": "^6.0.0",
|
|
51
|
-
"tsdown": "^0.21.7",
|
|
52
|
-
"typescript": "^6.0.2"
|
|
53
|
-
},
|
|
54
|
-
"engines": {
|
|
55
|
-
"node": ">=12.0.0"
|
|
56
|
-
},
|
|
57
|
-
"publishConfig": {
|
|
58
|
-
"provenance": true
|
|
59
|
-
},
|
|
60
|
-
"scripts": {
|
|
61
|
-
"bench": "node benchmark/bench.ts",
|
|
62
|
-
"bench:setup": "node benchmark/setup.ts",
|
|
63
|
-
"build": "tsdown",
|
|
64
|
-
"check": "biome check",
|
|
65
|
-
"check:fix": "biome check --write --unsafe",
|
|
66
|
-
"format": "biome format --write",
|
|
67
|
-
"lint": "biome lint",
|
|
68
|
-
"test": "node --test \"test/**/*.ts\"",
|
|
69
|
-
"test:coverage": "node --test --experimental-test-coverage \"test/**/*.ts\"",
|
|
70
|
-
"test:only": "node --test --test-only \"test/**/*.ts\"",
|
|
71
|
-
"typecheck": "tsc --noEmit"
|
|
72
|
-
}
|
|
73
|
-
}
|