@hyperfrontend/project-scope 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -15
- package/README.md +3 -4
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/array/index.cjs.js +7 -0
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/array/index.esm.js +5 -0
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/console/index.cjs.js +13 -0
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/console/index.esm.js +8 -0
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/date/index.cjs.js +10 -0
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/date/index.esm.js +8 -0
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/error/index.cjs.js +6 -0
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/error/index.esm.js +5 -0
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/json/index.cjs.js +7 -0
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/json/index.esm.js +5 -0
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/map/index.cjs.js +6 -0
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/map/index.esm.js +5 -0
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/math/index.cjs.js +9 -0
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/math/index.esm.js +6 -0
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/number/index.cjs.js +7 -0
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/number/index.esm.js +7 -0
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/object/index.cjs.js +15 -0
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/object/index.esm.js +9 -0
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/set/index.cjs.js +6 -0
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/set/index.esm.js +5 -0
- package/_dependencies/@hyperfrontend/logging/index.cjs.js +191 -0
- package/_dependencies/@hyperfrontend/logging/index.d.ts +151 -0
- package/_dependencies/@hyperfrontend/logging/index.esm.js +186 -0
- package/_shared/core/cache/index.cjs.js +135 -0
- package/_shared/core/cache/index.esm.js +128 -0
- package/_shared/core/errors/structured-errors/index.cjs.js +28 -0
- package/_shared/core/errors/structured-errors/index.esm.js +23 -0
- package/_shared/core/fs/stat/index.cjs.js +46 -0
- package/_shared/core/fs/stat/index.esm.js +40 -0
- package/_shared/core/path/join/index.cjs.js +13 -0
- package/_shared/core/path/join/index.esm.js +10 -0
- package/_shared/core/path/normalize/index.cjs.js +37 -0
- package/_shared/core/path/normalize/index.esm.js +31 -0
- package/_shared/core/path/resolve/index.cjs.js +47 -0
- package/_shared/core/path/resolve/index.esm.js +41 -0
- package/_shared/core/path/segments/index.cjs.js +38 -0
- package/_shared/core/path/segments/index.esm.js +31 -0
- package/_shared/core/patterns/glob/index.cjs.js +145 -0
- package/_shared/core/patterns/glob/index.esm.js +136 -0
- package/_shared/core/platform/detect/index.cjs.js +103 -0
- package/_shared/core/platform/detect/index.esm.js +95 -0
- package/_shared/core/platform/line-endings/index.cjs.js +52 -0
- package/_shared/core/platform/line-endings/index.esm.js +44 -0
- package/_shared/project/config/patterns/index.cjs.js +172 -0
- package/_shared/project/config/patterns/index.esm.js +169 -0
- package/_shared/tech/monorepo/pnpm-workspaces/index.cjs.js +33 -0
- package/_shared/tech/monorepo/pnpm-workspaces/index.esm.js +31 -0
- package/_shared/tech/shared-utils/detector-helpers/index.cjs.js +48 -0
- package/_shared/tech/shared-utils/detector-helpers/index.esm.js +43 -0
- package/_shared/vfs/types/index.cjs.js +14 -0
- package/_shared/vfs/types/index.esm.js +12 -0
- package/cli/index.cjs.js +1699 -2040
- package/cli/index.d.ts +273 -7
- package/cli/index.d.ts.map +1 -1
- package/cli/index.esm.js +1603 -1944
- package/core/encoding/index.cjs.js +88 -424
- package/core/encoding/index.d.ts +186 -3
- package/core/encoding/index.d.ts.map +1 -1
- package/core/encoding/index.esm.js +80 -415
- package/core/fs/index.cjs.js +231 -595
- package/core/fs/index.d.ts +479 -6
- package/core/fs/index.d.ts.map +1 -1
- package/core/fs/index.esm.js +221 -585
- package/core/index.cjs.js +518 -1804
- package/core/index.d.ts +486 -9
- package/core/index.d.ts.map +1 -1
- package/core/index.esm.js +501 -1784
- package/core/path/index.cjs.js +6 -235
- package/core/path/index.d.ts +306 -5
- package/core/path/index.d.ts.map +1 -1
- package/core/path/index.esm.js +4 -233
- package/core/platform/index.cjs.js +5 -226
- package/core/platform/index.d.ts +185 -3
- package/core/platform/index.d.ts.map +1 -1
- package/core/platform/index.esm.js +3 -222
- package/heuristics/dependencies/index.cjs.js +95 -509
- package/heuristics/dependencies/index.d.ts +99 -2
- package/heuristics/dependencies/index.d.ts.map +1 -1
- package/heuristics/dependencies/index.esm.js +69 -483
- package/heuristics/entry-points/index.cjs.js +93 -825
- package/heuristics/entry-points/index.d.ts +123 -2
- package/heuristics/entry-points/index.d.ts.map +1 -1
- package/heuristics/entry-points/index.esm.js +74 -806
- package/heuristics/framework/index.cjs.js +1482 -1473
- package/heuristics/framework/index.d.ts +104 -2
- package/heuristics/framework/index.d.ts.map +1 -1
- package/heuristics/framework/index.esm.js +1418 -1409
- package/heuristics/index.cjs.js +3207 -3383
- package/heuristics/index.d.ts +4 -5
- package/heuristics/index.d.ts.map +1 -1
- package/heuristics/index.esm.js +3234 -3410
- package/heuristics/project-type/index.cjs.js +1488 -1500
- package/heuristics/project-type/index.d.ts +64 -2
- package/heuristics/project-type/index.d.ts.map +1 -1
- package/heuristics/project-type/index.esm.js +1417 -1429
- package/index.cjs.js +3064 -3765
- package/index.d.ts +44 -10
- package/index.d.ts.map +1 -1
- package/index.esm.js +2923 -3612
- package/models/index.cjs.js +0 -1
- package/models/index.d.ts +20 -14
- package/models/index.d.ts.map +1 -1
- package/models/index.esm.js +0 -1
- package/nx/index.cjs.js +163 -606
- package/nx/index.d.ts +279 -4
- package/nx/index.d.ts.map +1 -1
- package/nx/index.esm.js +145 -583
- package/package.json +13 -12
- package/project/config/index.cjs.js +122 -1104
- package/project/config/index.d.ts +202 -4
- package/project/config/index.d.ts.map +1 -1
- package/project/config/index.esm.js +105 -1085
- package/project/index.cjs.js +323 -1143
- package/project/index.d.ts +4 -5
- package/project/index.d.ts.map +1 -1
- package/project/index.esm.js +302 -1119
- package/project/package/index.cjs.js +191 -483
- package/project/package/index.d.ts +280 -3
- package/project/package/index.d.ts.map +1 -1
- package/project/package/index.esm.js +178 -469
- package/project/root/index.cjs.js +107 -427
- package/project/root/index.d.ts +83 -2
- package/project/root/index.d.ts.map +1 -1
- package/project/root/index.esm.js +96 -416
- package/project/traversal/index.cjs.js +94 -645
- package/project/traversal/index.d.ts +165 -3
- package/project/traversal/index.d.ts.map +1 -1
- package/project/traversal/index.esm.js +80 -631
- package/tech/backend/index.cjs.js +221 -524
- package/tech/backend/index.d.ts +205 -8
- package/tech/backend/index.d.ts.map +1 -1
- package/tech/backend/index.esm.js +200 -503
- package/tech/build/index.cjs.js +348 -647
- package/tech/build/index.d.ts +276 -10
- package/tech/build/index.d.ts.map +1 -1
- package/tech/build/index.esm.js +326 -625
- package/tech/frontend/index.cjs.js +505 -700
- package/tech/frontend/index.d.ts +379 -15
- package/tech/frontend/index.d.ts.map +1 -1
- package/tech/frontend/index.esm.js +481 -676
- package/tech/index.cjs.js +1580 -1482
- package/tech/index.d.ts +55 -32
- package/tech/index.d.ts.map +1 -1
- package/tech/index.esm.js +1513 -1415
- package/tech/legacy/index.cjs.js +97 -474
- package/tech/legacy/index.d.ts +125 -7
- package/tech/legacy/index.d.ts.map +1 -1
- package/tech/legacy/index.esm.js +79 -456
- package/tech/linting/index.cjs.js +136 -536
- package/tech/linting/index.d.ts +129 -7
- package/tech/linting/index.d.ts.map +1 -1
- package/tech/linting/index.esm.js +116 -516
- package/tech/monorepo/index.cjs.js +244 -584
- package/tech/monorepo/index.d.ts +241 -10
- package/tech/monorepo/index.d.ts.map +1 -1
- package/tech/monorepo/index.esm.js +224 -564
- package/tech/testing/index.cjs.js +214 -582
- package/tech/testing/index.d.ts +176 -8
- package/tech/testing/index.d.ts.map +1 -1
- package/tech/testing/index.esm.js +196 -564
- package/tech/types/index.cjs.js +121 -532
- package/tech/types/index.d.ts +120 -2
- package/tech/types/index.d.ts.map +1 -1
- package/tech/types/index.esm.js +99 -510
- package/vfs/index.cjs.js +647 -1187
- package/vfs/index.d.ts +360 -6
- package/vfs/index.d.ts.map +1 -1
- package/vfs/index.esm.js +672 -1212
- package/ARCHITECTURE.md +0 -370
- package/analyze.d.ts +0 -33
- package/analyze.d.ts.map +0 -1
- package/cli/commands/analyze.d.ts +0 -20
- package/cli/commands/analyze.d.ts.map +0 -1
- package/cli/commands/config.d.ts +0 -20
- package/cli/commands/config.d.ts.map +0 -1
- package/cli/commands/deps.d.ts +0 -18
- package/cli/commands/deps.d.ts.map +0 -1
- package/cli/commands/tree.d.ts +0 -24
- package/cli/commands/tree.d.ts.map +0 -1
- package/cli/index.cjs.js.map +0 -1
- package/cli/index.esm.js.map +0 -1
- package/cli/run.d.ts +0 -25
- package/cli/run.d.ts.map +0 -1
- package/cli/types.d.ts +0 -55
- package/cli/types.d.ts.map +0 -1
- package/core/cache.d.ts +0 -157
- package/core/cache.d.ts.map +0 -1
- package/core/encoding/convert.d.ts +0 -32
- package/core/encoding/convert.d.ts.map +0 -1
- package/core/encoding/detect.d.ts +0 -86
- package/core/encoding/detect.d.ts.map +0 -1
- package/core/encoding/index.cjs.js.map +0 -1
- package/core/encoding/index.esm.js.map +0 -1
- package/core/errors/structured-errors.d.ts +0 -64
- package/core/errors/structured-errors.d.ts.map +0 -1
- package/core/fs/directory.d.ts +0 -88
- package/core/fs/directory.d.ts.map +0 -1
- package/core/fs/index.cjs.js.map +0 -1
- package/core/fs/index.esm.js.map +0 -1
- package/core/fs/read.d.ts +0 -86
- package/core/fs/read.d.ts.map +0 -1
- package/core/fs/stat.d.ts +0 -58
- package/core/fs/stat.d.ts.map +0 -1
- package/core/fs/traversal.d.ts +0 -26
- package/core/fs/traversal.d.ts.map +0 -1
- package/core/fs/write.d.ts +0 -75
- package/core/fs/write.d.ts.map +0 -1
- package/core/index.cjs.js.map +0 -1
- package/core/index.esm.js.map +0 -1
- package/core/logger.d.ts +0 -111
- package/core/logger.d.ts.map +0 -1
- package/core/path/index.cjs.js.map +0 -1
- package/core/path/index.esm.js.map +0 -1
- package/core/path/join.d.ts +0 -17
- package/core/path/join.d.ts.map +0 -1
- package/core/path/normalize.d.ts +0 -37
- package/core/path/normalize.d.ts.map +0 -1
- package/core/path/resolve.d.ts +0 -52
- package/core/path/resolve.d.ts.map +0 -1
- package/core/path/segments.d.ts +0 -59
- package/core/path/segments.d.ts.map +0 -1
- package/core/patterns/glob.d.ts +0 -46
- package/core/patterns/glob.d.ts.map +0 -1
- package/core/platform/detect.d.ts +0 -66
- package/core/platform/detect.d.ts.map +0 -1
- package/core/platform/index.cjs.js.map +0 -1
- package/core/platform/index.esm.js.map +0 -1
- package/core/platform/line-endings.d.ts +0 -48
- package/core/platform/line-endings.d.ts.map +0 -1
- package/heuristics/dependencies/analyze.d.ts +0 -77
- package/heuristics/dependencies/analyze.d.ts.map +0 -1
- package/heuristics/dependencies/index.cjs.js.map +0 -1
- package/heuristics/dependencies/index.esm.js.map +0 -1
- package/heuristics/entry-points/discover.d.ts +0 -86
- package/heuristics/entry-points/discover.d.ts.map +0 -1
- package/heuristics/entry-points/index.cjs.js.map +0 -1
- package/heuristics/entry-points/index.esm.js.map +0 -1
- package/heuristics/framework/identify.d.ts +0 -84
- package/heuristics/framework/identify.d.ts.map +0 -1
- package/heuristics/framework/index.cjs.js.map +0 -1
- package/heuristics/framework/index.esm.js.map +0 -1
- package/heuristics/index.cjs.js.map +0 -1
- package/heuristics/index.esm.js.map +0 -1
- package/heuristics/project-type/detect.d.ts +0 -61
- package/heuristics/project-type/detect.d.ts.map +0 -1
- package/heuristics/project-type/index.cjs.js.map +0 -1
- package/heuristics/project-type/index.esm.js.map +0 -1
- package/index.cjs.js.map +0 -1
- package/index.esm.js.map +0 -1
- package/models/index.cjs.js.map +0 -1
- package/models/index.esm.js.map +0 -1
- package/nx/detect.d.ts +0 -105
- package/nx/detect.d.ts.map +0 -1
- package/nx/devkit-loader.d.ts +0 -62
- package/nx/devkit-loader.d.ts.map +0 -1
- package/nx/index.cjs.js.map +0 -1
- package/nx/index.esm.js.map +0 -1
- package/nx/project-config.d.ts +0 -109
- package/nx/project-config.d.ts.map +0 -1
- package/project/config/detect.d.ts +0 -77
- package/project/config/detect.d.ts.map +0 -1
- package/project/config/index.cjs.js.map +0 -1
- package/project/config/index.esm.js.map +0 -1
- package/project/config/parse.d.ts +0 -53
- package/project/config/parse.d.ts.map +0 -1
- package/project/config/patterns.d.ts +0 -31
- package/project/config/patterns.d.ts.map +0 -1
- package/project/index.cjs.js.map +0 -1
- package/project/index.esm.js.map +0 -1
- package/project/package/dependencies.d.ts +0 -101
- package/project/package/dependencies.d.ts.map +0 -1
- package/project/package/index.cjs.js.map +0 -1
- package/project/package/index.esm.js.map +0 -1
- package/project/package/read.d.ts +0 -66
- package/project/package/read.d.ts.map +0 -1
- package/project/root/detect.d.ts +0 -65
- package/project/root/detect.d.ts.map +0 -1
- package/project/root/index.cjs.js.map +0 -1
- package/project/root/index.esm.js.map +0 -1
- package/project/traversal/index.cjs.js.map +0 -1
- package/project/traversal/index.esm.js.map +0 -1
- package/project/traversal/search.d.ts +0 -59
- package/project/traversal/search.d.ts.map +0 -1
- package/project/traversal/walk.d.ts +0 -63
- package/project/traversal/walk.d.ts.map +0 -1
- package/tech/backend/detect-all.d.ts +0 -13
- package/tech/backend/detect-all.d.ts.map +0 -1
- package/tech/backend/express.d.ts +0 -11
- package/tech/backend/express.d.ts.map +0 -1
- package/tech/backend/fastify.d.ts +0 -11
- package/tech/backend/fastify.d.ts.map +0 -1
- package/tech/backend/hono.d.ts +0 -11
- package/tech/backend/hono.d.ts.map +0 -1
- package/tech/backend/index.cjs.js.map +0 -1
- package/tech/backend/index.esm.js.map +0 -1
- package/tech/backend/koa.d.ts +0 -11
- package/tech/backend/koa.d.ts.map +0 -1
- package/tech/backend/nestjs.d.ts +0 -11
- package/tech/backend/nestjs.d.ts.map +0 -1
- package/tech/backend/types.d.ts +0 -31
- package/tech/backend/types.d.ts.map +0 -1
- package/tech/build/babel.d.ts +0 -13
- package/tech/build/babel.d.ts.map +0 -1
- package/tech/build/detect-all.d.ts +0 -13
- package/tech/build/detect-all.d.ts.map +0 -1
- package/tech/build/esbuild.d.ts +0 -11
- package/tech/build/esbuild.d.ts.map +0 -1
- package/tech/build/index.cjs.js.map +0 -1
- package/tech/build/index.esm.js.map +0 -1
- package/tech/build/parcel.d.ts +0 -13
- package/tech/build/parcel.d.ts.map +0 -1
- package/tech/build/rollup.d.ts +0 -13
- package/tech/build/rollup.d.ts.map +0 -1
- package/tech/build/swc.d.ts +0 -13
- package/tech/build/swc.d.ts.map +0 -1
- package/tech/build/types.d.ts +0 -31
- package/tech/build/types.d.ts.map +0 -1
- package/tech/build/vite.d.ts +0 -13
- package/tech/build/vite.d.ts.map +0 -1
- package/tech/build/webpack.d.ts +0 -13
- package/tech/build/webpack.d.ts.map +0 -1
- package/tech/frontend/angular.d.ts +0 -11
- package/tech/frontend/angular.d.ts.map +0 -1
- package/tech/frontend/astro.d.ts +0 -11
- package/tech/frontend/astro.d.ts.map +0 -1
- package/tech/frontend/detect-all.d.ts +0 -13
- package/tech/frontend/detect-all.d.ts.map +0 -1
- package/tech/frontend/gatsby.d.ts +0 -11
- package/tech/frontend/gatsby.d.ts.map +0 -1
- package/tech/frontend/index.cjs.js.map +0 -1
- package/tech/frontend/index.esm.js.map +0 -1
- package/tech/frontend/nextjs.d.ts +0 -11
- package/tech/frontend/nextjs.d.ts.map +0 -1
- package/tech/frontend/nuxt.d.ts +0 -11
- package/tech/frontend/nuxt.d.ts.map +0 -1
- package/tech/frontend/qwik.d.ts +0 -11
- package/tech/frontend/qwik.d.ts.map +0 -1
- package/tech/frontend/react.d.ts +0 -11
- package/tech/frontend/react.d.ts.map +0 -1
- package/tech/frontend/remix.d.ts +0 -11
- package/tech/frontend/remix.d.ts.map +0 -1
- package/tech/frontend/solid.d.ts +0 -11
- package/tech/frontend/solid.d.ts.map +0 -1
- package/tech/frontend/svelte.d.ts +0 -11
- package/tech/frontend/svelte.d.ts.map +0 -1
- package/tech/frontend/sveltekit.d.ts +0 -11
- package/tech/frontend/sveltekit.d.ts.map +0 -1
- package/tech/frontend/types.d.ts +0 -35
- package/tech/frontend/types.d.ts.map +0 -1
- package/tech/frontend/vue.d.ts +0 -11
- package/tech/frontend/vue.d.ts.map +0 -1
- package/tech/index.cjs.js.map +0 -1
- package/tech/index.esm.js.map +0 -1
- package/tech/legacy/angularjs.d.ts +0 -12
- package/tech/legacy/angularjs.d.ts.map +0 -1
- package/tech/legacy/backbone.d.ts +0 -11
- package/tech/legacy/backbone.d.ts.map +0 -1
- package/tech/legacy/detect-all.d.ts +0 -13
- package/tech/legacy/detect-all.d.ts.map +0 -1
- package/tech/legacy/ember.d.ts +0 -11
- package/tech/legacy/ember.d.ts.map +0 -1
- package/tech/legacy/index.cjs.js.map +0 -1
- package/tech/legacy/index.esm.js.map +0 -1
- package/tech/legacy/jquery.d.ts +0 -11
- package/tech/legacy/jquery.d.ts.map +0 -1
- package/tech/legacy/types.d.ts +0 -33
- package/tech/legacy/types.d.ts.map +0 -1
- package/tech/linting/biome.d.ts +0 -11
- package/tech/linting/biome.d.ts.map +0 -1
- package/tech/linting/detect-all.d.ts +0 -13
- package/tech/linting/detect-all.d.ts.map +0 -1
- package/tech/linting/eslint.d.ts +0 -13
- package/tech/linting/eslint.d.ts.map +0 -1
- package/tech/linting/index.cjs.js.map +0 -1
- package/tech/linting/index.esm.js.map +0 -1
- package/tech/linting/prettier.d.ts +0 -13
- package/tech/linting/prettier.d.ts.map +0 -1
- package/tech/linting/stylelint.d.ts +0 -13
- package/tech/linting/stylelint.d.ts.map +0 -1
- package/tech/linting/types.d.ts +0 -31
- package/tech/linting/types.d.ts.map +0 -1
- package/tech/monorepo/detect-all.d.ts +0 -13
- package/tech/monorepo/detect-all.d.ts.map +0 -1
- package/tech/monorepo/index.cjs.js.map +0 -1
- package/tech/monorepo/index.esm.js.map +0 -1
- package/tech/monorepo/lerna.d.ts +0 -11
- package/tech/monorepo/lerna.d.ts.map +0 -1
- package/tech/monorepo/npm-workspaces.d.ts +0 -11
- package/tech/monorepo/npm-workspaces.d.ts.map +0 -1
- package/tech/monorepo/nx.d.ts +0 -11
- package/tech/monorepo/nx.d.ts.map +0 -1
- package/tech/monorepo/pnpm-workspaces.d.ts +0 -9
- package/tech/monorepo/pnpm-workspaces.d.ts.map +0 -1
- package/tech/monorepo/rush.d.ts +0 -11
- package/tech/monorepo/rush.d.ts.map +0 -1
- package/tech/monorepo/turborepo.d.ts +0 -11
- package/tech/monorepo/turborepo.d.ts.map +0 -1
- package/tech/monorepo/types.d.ts +0 -39
- package/tech/monorepo/types.d.ts.map +0 -1
- package/tech/monorepo/yarn-workspaces.d.ts +0 -11
- package/tech/monorepo/yarn-workspaces.d.ts.map +0 -1
- package/tech/shared-utils/detector-helpers.d.ts +0 -52
- package/tech/shared-utils/detector-helpers.d.ts.map +0 -1
- package/tech/shared-utils/types.d.ts +0 -41
- package/tech/shared-utils/types.d.ts.map +0 -1
- package/tech/testing/cypress.d.ts +0 -13
- package/tech/testing/cypress.d.ts.map +0 -1
- package/tech/testing/detect-all.d.ts +0 -13
- package/tech/testing/detect-all.d.ts.map +0 -1
- package/tech/testing/index.cjs.js.map +0 -1
- package/tech/testing/index.esm.js.map +0 -1
- package/tech/testing/jest.d.ts +0 -13
- package/tech/testing/jest.d.ts.map +0 -1
- package/tech/testing/mocha.d.ts +0 -13
- package/tech/testing/mocha.d.ts.map +0 -1
- package/tech/testing/playwright.d.ts +0 -13
- package/tech/testing/playwright.d.ts.map +0 -1
- package/tech/testing/types.d.ts +0 -35
- package/tech/testing/types.d.ts.map +0 -1
- package/tech/testing/vitest.d.ts +0 -13
- package/tech/testing/vitest.d.ts.map +0 -1
- package/tech/types/detectors.d.ts +0 -67
- package/tech/types/detectors.d.ts.map +0 -1
- package/tech/types/index.cjs.js.map +0 -1
- package/tech/types/index.esm.js.map +0 -1
- package/vfs/commit.d.ts +0 -32
- package/vfs/commit.d.ts.map +0 -1
- package/vfs/diff.d.ts +0 -73
- package/vfs/diff.d.ts.map +0 -1
- package/vfs/factory.d.ts +0 -37
- package/vfs/factory.d.ts.map +0 -1
- package/vfs/fs-tree.d.ts +0 -13
- package/vfs/fs-tree.d.ts.map +0 -1
- package/vfs/index.cjs.js.map +0 -1
- package/vfs/index.esm.js.map +0 -1
- package/vfs/types.d.ts +0 -178
- package/vfs/types.d.ts.map +0 -1
package/core/index.d.ts
CHANGED
|
@@ -1,9 +1,486 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
export { BINARY_SIGNATURES, EncodingInfo, UTF16_BE_BOM_BYTES, UTF16_LE_BOM_BYTES, UTF8_BOM, UTF8_BOM_BYTES, addBom, bufferToString, detectEncoding, detectEncodingInfo, hasBom, isTextFile, stripBom, toUtf8 } from './encoding';
|
|
2
|
+
export { DirectoryEntry, FileStats, FileSystemErrorCode, FileSystemErrorContext, ReadJsonFileOptions, RecursiveOptions, WriteFileOptions, WriteJsonOptions, createDirectory, createFileSystemError, ensureDir, exists, findUpwardWhere, getFileStat, isDirectory, isFile, isSymlink, locateByMarkers, readDirectory, readDirectoryRecursive, readFileBuffer, readFileContent, readFileIfExists, readJsonFile, readJsonFileIfExists, removeDirectory, traverseUpward, writeFileBuffer, writeFileContent, writeJsonFile } from './fs';
|
|
3
|
+
import { LogLevel } from '../_dependencies/@hyperfrontend/logging/index.js';
|
|
4
|
+
export { LogLevel } from '../_dependencies/@hyperfrontend/logging/index.js';
|
|
5
|
+
export { ParsedPath, ensureTrailingSlash, getBasename, getDirname, getExtension, getFileNameWithoutExtension, isAbsolute, join, joinPath, joinPosix, normalizePath, normalizeToForwardSlashes, normalizeToNative, offsetFromRoot, parsePath, pathSegments, relativePath, removeTrailingSlash, resolveFromWorkspace, resolvePath, resolveRealPath } from './path';
|
|
6
|
+
export { CRLF, DetectedLineEnding, LF, LineEndingStyle, PlatformInfo, detectCaseSensitivity, detectLineEnding, detectPlatform, getLineEnding, getPathSeparator, getPlatformInfo, isCaseSensitiveFs, isWindows, normalizeLineEndings, pathsEqual } from './platform';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Options for cache creation.
|
|
10
|
+
*/
|
|
11
|
+
interface CacheOptions {
|
|
12
|
+
/**
|
|
13
|
+
* Time to live in milliseconds.
|
|
14
|
+
* Entries older than this will be considered expired.
|
|
15
|
+
*/
|
|
16
|
+
ttl?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Maximum number of entries in cache.
|
|
19
|
+
* When exceeded, oldest entries are evicted (FIFO).
|
|
20
|
+
*/
|
|
21
|
+
maxSize?: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Cache interface for storing key-value pairs with optional TTL and size limits.
|
|
25
|
+
*/
|
|
26
|
+
interface Cache<K, V> {
|
|
27
|
+
/**
|
|
28
|
+
* Get a value from the cache.
|
|
29
|
+
*
|
|
30
|
+
* @param key - Cache key
|
|
31
|
+
* @returns Cached value or undefined if not found or expired
|
|
32
|
+
*/
|
|
33
|
+
get(key: K): V | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Set a value in the cache.
|
|
36
|
+
*
|
|
37
|
+
* @param key - Cache key
|
|
38
|
+
* @param value - Value to cache
|
|
39
|
+
*/
|
|
40
|
+
set(key: K, value: V): void;
|
|
41
|
+
/**
|
|
42
|
+
* Check if a key exists in the cache (and is not expired).
|
|
43
|
+
*
|
|
44
|
+
* @param key - Cache key
|
|
45
|
+
* @returns True if key exists and is not expired
|
|
46
|
+
*/
|
|
47
|
+
has(key: K): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Delete a key from the cache.
|
|
50
|
+
*
|
|
51
|
+
* @param key - Cache key
|
|
52
|
+
* @returns True if the key was deleted
|
|
53
|
+
*/
|
|
54
|
+
delete(key: K): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Clear all entries from the cache.
|
|
57
|
+
*/
|
|
58
|
+
clear(): void;
|
|
59
|
+
/**
|
|
60
|
+
* Get the current number of entries in the cache.
|
|
61
|
+
*
|
|
62
|
+
* @returns Number of entries
|
|
63
|
+
*/
|
|
64
|
+
size(): number;
|
|
65
|
+
/**
|
|
66
|
+
* Get all keys in the cache.
|
|
67
|
+
*
|
|
68
|
+
* @returns Array of keys
|
|
69
|
+
*/
|
|
70
|
+
keys(): K[];
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Create a cache with optional TTL and size limits.
|
|
74
|
+
*
|
|
75
|
+
* The cache provides a simple key-value store with:
|
|
76
|
+
* - Optional TTL (time-to-live) for automatic expiration
|
|
77
|
+
* - Optional maxSize for limiting cache size with FIFO eviction
|
|
78
|
+
* - Lazy expiration (entries are checked on access)
|
|
79
|
+
*
|
|
80
|
+
* @param options - Cache configuration options
|
|
81
|
+
* @returns Cache instance
|
|
82
|
+
*
|
|
83
|
+
* @example Creating caches with different options
|
|
84
|
+
* ```typescript
|
|
85
|
+
* // Basic cache
|
|
86
|
+
* const cache = createCache<string, number>()
|
|
87
|
+
* cache.set('answer', 42)
|
|
88
|
+
* cache.get('answer') // 42
|
|
89
|
+
*
|
|
90
|
+
* // Cache with TTL (expires after 60 seconds)
|
|
91
|
+
* const ttlCache = createCache<string, object>({ ttl: 60000 })
|
|
92
|
+
*
|
|
93
|
+
* // Cache with max size (evicts oldest when full)
|
|
94
|
+
* const lruCache = createCache<string, object>({ maxSize: 100 })
|
|
95
|
+
*
|
|
96
|
+
* // Combined options
|
|
97
|
+
* const configCache = createCache<string, object>({
|
|
98
|
+
* ttl: 30000,
|
|
99
|
+
* maxSize: 50
|
|
100
|
+
* })
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
declare function createCache<K, V>(options?: CacheOptions): Cache<K, V>;
|
|
104
|
+
/**
|
|
105
|
+
* Clear all registered caches.
|
|
106
|
+
*
|
|
107
|
+
* Useful for testing or when a global state reset is needed.
|
|
108
|
+
* This clears all caches created via `createCache()`.
|
|
109
|
+
*
|
|
110
|
+
* @example Clearing caches in tests
|
|
111
|
+
* ```typescript
|
|
112
|
+
* // In tests
|
|
113
|
+
* afterEach(() => {
|
|
114
|
+
* clearAllCaches()
|
|
115
|
+
* })
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
118
|
+
declare function clearAllCaches(): void;
|
|
119
|
+
/**
|
|
120
|
+
* Get the number of registered caches.
|
|
121
|
+
*
|
|
122
|
+
* Primarily used for testing.
|
|
123
|
+
*
|
|
124
|
+
* @returns Number of registered caches
|
|
125
|
+
*
|
|
126
|
+
* @example Getting the number of active caches
|
|
127
|
+
* ```typescript
|
|
128
|
+
* const count = getCacheCount()
|
|
129
|
+
* // => 3 (number of active caches)
|
|
130
|
+
* ```
|
|
131
|
+
*/
|
|
132
|
+
declare function getCacheCount(): number;
|
|
133
|
+
/**
|
|
134
|
+
* Unregister a cache from the global registry.
|
|
135
|
+
*
|
|
136
|
+
* Useful for cleanup in tests or when a cache is no longer needed.
|
|
137
|
+
*
|
|
138
|
+
* @param cache - Cache to unregister
|
|
139
|
+
* @returns True if cache was unregistered
|
|
140
|
+
*
|
|
141
|
+
* @example Unregistering a cache from the registry
|
|
142
|
+
* ```typescript
|
|
143
|
+
* const myCache = createCache<string, number>({ name: 'temp-cache' })
|
|
144
|
+
* const wasRemoved = unregisterCache(myCache)
|
|
145
|
+
* // => true
|
|
146
|
+
* ```
|
|
147
|
+
*/
|
|
148
|
+
declare function unregisterCache<K, V>(cache: Cache<K, V>): boolean;
|
|
149
|
+
/**
|
|
150
|
+
* Adds a `cache` accessor to a memoized function, exposing the underlying cache
|
|
151
|
+
* for direct inspection or invalidation.
|
|
152
|
+
*
|
|
153
|
+
* @template K - Cache key type
|
|
154
|
+
* @template V - Cached value type
|
|
155
|
+
*/
|
|
156
|
+
type WithCache<K, V> = {
|
|
157
|
+
/** Underlying cache instance for direct access and control */
|
|
158
|
+
cache: Cache<K, V>;
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Function returned by {@link memoize}: behaves like the original function but
|
|
162
|
+
* exposes a `cache` for direct manipulation.
|
|
163
|
+
*
|
|
164
|
+
* @template K - Cache key type
|
|
165
|
+
* @template V - Cached value type
|
|
166
|
+
*/
|
|
167
|
+
type MemoizedFunction<K, V> = ((key: K) => V) & WithCache<K, V>;
|
|
168
|
+
/**
|
|
169
|
+
* Create a memoized version of a function with caching.
|
|
170
|
+
*
|
|
171
|
+
* The memoized function caches results based on the first argument (key).
|
|
172
|
+
* If additional arguments are needed, use the options.keyFn parameter.
|
|
173
|
+
*
|
|
174
|
+
* @param fn - Function to memoize
|
|
175
|
+
* @param options - Cache options for the underlying cache
|
|
176
|
+
* @returns Memoized function with cache control methods
|
|
177
|
+
*
|
|
178
|
+
* @example Memoizing an expensive function
|
|
179
|
+
* ```typescript
|
|
180
|
+
* // Memoize a detection function
|
|
181
|
+
* const detectTechStackMemo = memoize(
|
|
182
|
+
* (path: string) => expensiveDetection(path),
|
|
183
|
+
* { ttl: 60000 }
|
|
184
|
+
* )
|
|
185
|
+
*
|
|
186
|
+
* const result1 = detectTechStackMemo('/path/to/project')
|
|
187
|
+
* const result2 = detectTechStackMemo('/path/to/project') // Returns cached
|
|
188
|
+
*
|
|
189
|
+
* // Clear the cache
|
|
190
|
+
* detectTechStackMemo.cache.clear()
|
|
191
|
+
* ```
|
|
192
|
+
*/
|
|
193
|
+
declare function memoize<K, V>(fn: (key: K) => V, options?: CacheOptions): MemoizedFunction<K, V>;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Structured error with code and context.
|
|
197
|
+
*/
|
|
198
|
+
interface StructuredError extends Error {
|
|
199
|
+
/** Machine-readable error code for programmatic handling */
|
|
200
|
+
code: string;
|
|
201
|
+
/** Additional contextual information about the error */
|
|
202
|
+
context?: Record<string, unknown>;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Create a structured error with code and optional context.
|
|
206
|
+
*
|
|
207
|
+
* @param message - The human-readable error message
|
|
208
|
+
* @param code - The machine-readable error code for programmatic handling
|
|
209
|
+
* @param context - Additional contextual information about the error
|
|
210
|
+
* @returns Structured error instance with code and context properties
|
|
211
|
+
*
|
|
212
|
+
* @example Creating a structured error with context
|
|
213
|
+
* ```typescript
|
|
214
|
+
* import { createStructuredError } from '@hyperfrontend/project-scope'
|
|
215
|
+
*
|
|
216
|
+
* throw createStructuredError(
|
|
217
|
+
* 'Configuration file not found',
|
|
218
|
+
* 'CONFIG_NOT_FOUND',
|
|
219
|
+
* { path: './config.json', searched: ['./config.json', './settings.json'] }
|
|
220
|
+
* )
|
|
221
|
+
* ```
|
|
222
|
+
*/
|
|
223
|
+
declare function createStructuredError(message: string, code: string, context?: Record<string, unknown>): StructuredError;
|
|
224
|
+
/**
|
|
225
|
+
* Create a configuration-related error.
|
|
226
|
+
*
|
|
227
|
+
* @param message - The human-readable error message
|
|
228
|
+
* @param code - The machine-readable error code for programmatic handling
|
|
229
|
+
* @param context - Additional contextual information (e.g., file path, config key)
|
|
230
|
+
* @returns Structured error instance tagged with type 'config'
|
|
231
|
+
*
|
|
232
|
+
* @example Creating a configuration error
|
|
233
|
+
* ```typescript
|
|
234
|
+
* throw createConfigError(
|
|
235
|
+
* 'Invalid port number',
|
|
236
|
+
* 'CONFIG_INVALID_PORT',
|
|
237
|
+
* { configFile: './app.config.json', value: -1 }
|
|
238
|
+
* )
|
|
239
|
+
* ```
|
|
240
|
+
*/
|
|
241
|
+
declare function createConfigError(message: string, code: string, context?: Record<string, unknown>): StructuredError;
|
|
242
|
+
/**
|
|
243
|
+
* Create a filesystem-related error.
|
|
244
|
+
*
|
|
245
|
+
* @param message - The human-readable error message
|
|
246
|
+
* @param code - The filesystem error code (e.g., ENOENT for not found, EACCES for access denied)
|
|
247
|
+
* @param context - Additional contextual information (e.g., file path, operation attempted)
|
|
248
|
+
* @returns Structured error instance tagged with type 'fs'
|
|
249
|
+
*
|
|
250
|
+
* @example Creating a filesystem error
|
|
251
|
+
* ```typescript
|
|
252
|
+
* throw createFsError(
|
|
253
|
+
* 'Configuration file not found',
|
|
254
|
+
* 'ENOENT',
|
|
255
|
+
* { path: './missing.json', operation: 'read' }
|
|
256
|
+
* )
|
|
257
|
+
* ```
|
|
258
|
+
*/
|
|
259
|
+
declare function createFsError(message: string, code: string, context?: Record<string, unknown>): StructuredError;
|
|
260
|
+
/**
|
|
261
|
+
* Create a parsing-related error.
|
|
262
|
+
*
|
|
263
|
+
* @param message - The human-readable error message
|
|
264
|
+
* @param code - The machine-readable error code for programmatic handling
|
|
265
|
+
* @param context - Additional contextual information (e.g., file path, line/column numbers, expected format)
|
|
266
|
+
* @returns Structured error instance tagged with type 'parse'
|
|
267
|
+
*
|
|
268
|
+
* @example Creating a parse error
|
|
269
|
+
* ```typescript
|
|
270
|
+
* throw createParseError(
|
|
271
|
+
* 'Invalid JSON syntax',
|
|
272
|
+
* 'JSON_PARSE_ERROR',
|
|
273
|
+
* { file: './config.json', line: 42, column: 15 }
|
|
274
|
+
* )
|
|
275
|
+
* ```
|
|
276
|
+
*/
|
|
277
|
+
declare function createParseError(message: string, code: string, context?: Record<string, unknown>): StructuredError;
|
|
278
|
+
/**
|
|
279
|
+
* Create a validation-related error.
|
|
280
|
+
*
|
|
281
|
+
* @param message - The human-readable error message
|
|
282
|
+
* @param code - The machine-readable error code for programmatic handling
|
|
283
|
+
* @param context - Additional contextual information (e.g., field name, actual vs expected values)
|
|
284
|
+
* @returns Structured error instance tagged with type 'validation'
|
|
285
|
+
*
|
|
286
|
+
* @example Creating a validation error
|
|
287
|
+
* ```typescript
|
|
288
|
+
* throw createValidationError(
|
|
289
|
+
* 'Email format is invalid',
|
|
290
|
+
* 'INVALID_EMAIL',
|
|
291
|
+
* { field: 'email', value: 'not-an-email' }
|
|
292
|
+
* )
|
|
293
|
+
* ```
|
|
294
|
+
*/
|
|
295
|
+
declare function createValidationError(message: string, code: string, context?: Record<string, unknown>): StructuredError;
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Set the log level for all registered scoped loggers.
|
|
299
|
+
* This is useful for enabling verbose logging across the entire library.
|
|
300
|
+
*
|
|
301
|
+
* @param level - The log level to set globally
|
|
302
|
+
*
|
|
303
|
+
* @example Enabling debug logging globally
|
|
304
|
+
* ```typescript
|
|
305
|
+
* import { setGlobalLogLevel } from '@hyperfrontend/project-scope/core'
|
|
306
|
+
*
|
|
307
|
+
* // Enable debug logging for all project-scope modules
|
|
308
|
+
* setGlobalLogLevel('debug')
|
|
309
|
+
* ```
|
|
310
|
+
*/
|
|
311
|
+
declare function setGlobalLogLevel(level: LogLevel): void;
|
|
312
|
+
/**
|
|
313
|
+
* Get the current global log level.
|
|
314
|
+
*
|
|
315
|
+
* @returns The global log level, or null if not set
|
|
316
|
+
*
|
|
317
|
+
* @example Getting current log level
|
|
318
|
+
* ```typescript
|
|
319
|
+
* setGlobalLogLevel('debug')
|
|
320
|
+
* const level = getGlobalLogLevel()
|
|
321
|
+
* // => 'debug'
|
|
322
|
+
* ```
|
|
323
|
+
*/
|
|
324
|
+
declare function getGlobalLogLevel(): LogLevel | null;
|
|
325
|
+
/**
|
|
326
|
+
* Reset the global log level override.
|
|
327
|
+
* Each logger will retain its current level but new loggers will use their default.
|
|
328
|
+
*
|
|
329
|
+
* @example Resetting the global log level
|
|
330
|
+
* ```typescript
|
|
331
|
+
* setGlobalLogLevel('debug')
|
|
332
|
+
* // ... perform debugging ...
|
|
333
|
+
* resetGlobalLogLevel()
|
|
334
|
+
* // Global override removed, loggers use individual levels
|
|
335
|
+
* ```
|
|
336
|
+
*/
|
|
337
|
+
declare function resetGlobalLogLevel(): void;
|
|
338
|
+
/**
|
|
339
|
+
* Sanitizes an object by replacing sensitive values with REDACTED.
|
|
340
|
+
* This function recursively processes nested objects and arrays.
|
|
341
|
+
*
|
|
342
|
+
* @param obj - Object to sanitize
|
|
343
|
+
* @returns New object with sensitive values redacted
|
|
344
|
+
*
|
|
345
|
+
* @example Sanitizing sensitive data
|
|
346
|
+
* ```typescript
|
|
347
|
+
* const config = { apiKey: 'secret123', endpoint: 'https://api.example.com' }
|
|
348
|
+
* const safe = sanitize(config)
|
|
349
|
+
* // => { apiKey: '[REDACTED]', endpoint: 'https://api.example.com' }
|
|
350
|
+
* ```
|
|
351
|
+
*/
|
|
352
|
+
declare function sanitize(obj: unknown): unknown;
|
|
353
|
+
/**
|
|
354
|
+
* Options for creating a scoped logger.
|
|
355
|
+
*/
|
|
356
|
+
interface ScopedLoggerOptions {
|
|
357
|
+
/**
|
|
358
|
+
* Initial log level.
|
|
359
|
+
* Messages below this level will not be logged.
|
|
360
|
+
*
|
|
361
|
+
* @default 'error'
|
|
362
|
+
*/
|
|
363
|
+
level?: LogLevel;
|
|
364
|
+
/**
|
|
365
|
+
* Whether to sanitize sensitive data in metadata.
|
|
366
|
+
*
|
|
367
|
+
* @default true
|
|
368
|
+
*/
|
|
369
|
+
sanitizeSecrets?: boolean;
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* A scoped logger instance with namespace prefix and secret sanitization.
|
|
373
|
+
*/
|
|
374
|
+
interface ScopedLogger {
|
|
375
|
+
/** Log at error level */
|
|
376
|
+
error: (message: string, meta?: object) => void;
|
|
377
|
+
/** Log at warn level */
|
|
378
|
+
warn: (message: string, meta?: object) => void;
|
|
379
|
+
/** Log at log level */
|
|
380
|
+
log: (message: string, meta?: object) => void;
|
|
381
|
+
/** Log at info level */
|
|
382
|
+
info: (message: string, meta?: object) => void;
|
|
383
|
+
/** Log at debug level */
|
|
384
|
+
debug: (message: string, meta?: object) => void;
|
|
385
|
+
/** Set the current log level */
|
|
386
|
+
setLogLevel: (level: LogLevel) => void;
|
|
387
|
+
/** Get the current log level */
|
|
388
|
+
getLogLevel: () => LogLevel;
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* Creates a scoped logger with namespace prefix and optional secret sanitization.
|
|
392
|
+
* All log messages will be prefixed with [namespace] and sensitive metadata
|
|
393
|
+
* values will be automatically redacted.
|
|
394
|
+
*
|
|
395
|
+
* @param namespace - Logger namespace (e.g., 'project-scope', 'analyze')
|
|
396
|
+
* @param options - Logger configuration options
|
|
397
|
+
* @returns A configured scoped logger instance
|
|
398
|
+
*
|
|
399
|
+
* @example Creating a scoped logger
|
|
400
|
+
* ```typescript
|
|
401
|
+
* const logger = createScopedLogger('project-scope')
|
|
402
|
+
* logger.setLogLevel('debug')
|
|
403
|
+
*
|
|
404
|
+
* // Basic logging
|
|
405
|
+
* logger.info('Starting analysis', { path: './project' })
|
|
406
|
+
*
|
|
407
|
+
* // Sensitive data is automatically redacted
|
|
408
|
+
* logger.debug('Config loaded', { apiKey: 'secret123' })
|
|
409
|
+
* // Output: [project-scope] Config loaded {"apiKey":"[REDACTED]"}
|
|
410
|
+
* ```
|
|
411
|
+
*/
|
|
412
|
+
declare function createScopedLogger(namespace: string, options?: ScopedLoggerOptions): ScopedLogger;
|
|
413
|
+
/**
|
|
414
|
+
* Default logger instance for the project-scope library.
|
|
415
|
+
* Use this for general logging within the library.
|
|
416
|
+
*
|
|
417
|
+
* @example Using the default logger
|
|
418
|
+
* ```typescript
|
|
419
|
+
* import { logger } from '@hyperfrontend/project-scope/core'
|
|
420
|
+
*
|
|
421
|
+
* logger.setLogLevel('debug')
|
|
422
|
+
* logger.debug('Analyzing project', { path: './src' })
|
|
423
|
+
* ```
|
|
424
|
+
*/
|
|
425
|
+
declare const logger: ScopedLogger;
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Match path against glob pattern using safe character iteration.
|
|
429
|
+
* Avoids regex to prevent ReDoS attacks.
|
|
430
|
+
*
|
|
431
|
+
* Supported patterns:
|
|
432
|
+
* - * matches any characters except /
|
|
433
|
+
* - ** matches any characters including /
|
|
434
|
+
* - ? matches exactly one character except /
|
|
435
|
+
* - {a,b,c} matches any of the alternatives
|
|
436
|
+
*
|
|
437
|
+
* @param path - The filesystem path to test against the pattern
|
|
438
|
+
* @param pattern - The glob pattern to match against
|
|
439
|
+
* @returns True if path matches pattern
|
|
440
|
+
*
|
|
441
|
+
* @example Matching paths against glob patterns
|
|
442
|
+
* ```typescript
|
|
443
|
+
* import { matchGlobPattern } from '@hyperfrontend/project-scope'
|
|
444
|
+
*
|
|
445
|
+
* matchGlobPattern('src/utils/helper.ts', '\*\*\/*.ts') // true
|
|
446
|
+
* matchGlobPattern('test.spec.ts', '\*.spec.ts') // true
|
|
447
|
+
* matchGlobPattern('config.json', '\*.{json,yaml}') // true
|
|
448
|
+
* matchGlobPattern('src/index.ts', 'src/\*.ts') // true
|
|
449
|
+
* ```
|
|
450
|
+
*/
|
|
451
|
+
declare function matchGlobPattern(path: string, pattern: string): boolean;
|
|
452
|
+
/**
|
|
453
|
+
* Test if path matches any of the patterns.
|
|
454
|
+
*
|
|
455
|
+
* @param path - Path to test
|
|
456
|
+
* @param patterns - Array of glob patterns
|
|
457
|
+
* @returns True if path matches any pattern
|
|
458
|
+
*
|
|
459
|
+
* @example Checking path against multiple patterns
|
|
460
|
+
* ```typescript
|
|
461
|
+
* const ignorePatterns = ['*.log', 'node_modules/**', '*.tmp']
|
|
462
|
+
* const shouldIgnore = matchesAnyPattern('debug.log', ignorePatterns)
|
|
463
|
+
* // => true
|
|
464
|
+
* ```
|
|
465
|
+
*/
|
|
466
|
+
declare function matchesAnyPattern(path: string, patterns: readonly string[]): boolean;
|
|
467
|
+
/**
|
|
468
|
+
* Test if path exactly matches the pattern (no glob).
|
|
469
|
+
*
|
|
470
|
+
* @param path - Path to test
|
|
471
|
+
* @param pattern - Exact pattern to match
|
|
472
|
+
* @returns True if path equals pattern
|
|
473
|
+
*
|
|
474
|
+
* @example Exact path matching
|
|
475
|
+
* ```typescript
|
|
476
|
+
* matchesExact('package.json', 'package.json')
|
|
477
|
+
* // => true
|
|
478
|
+
*
|
|
479
|
+
* matchesExact('src/package.json', 'package.json')
|
|
480
|
+
* // => false
|
|
481
|
+
* ```
|
|
482
|
+
*/
|
|
483
|
+
declare function matchesExact(path: string, pattern: string): boolean;
|
|
484
|
+
|
|
485
|
+
export { clearAllCaches, createCache, createConfigError, createFsError, createParseError, createScopedLogger, createStructuredError, createValidationError, getCacheCount, getGlobalLogLevel, logger, matchGlobPattern, matchesAnyPattern, matchesExact, memoize, resetGlobalLogLevel, sanitize, setGlobalLogLevel, unregisterCache };
|
|
486
|
+
export type { Cache, CacheOptions, ScopedLogger, ScopedLoggerOptions, StructuredError };
|
package/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../libs/project-scope/src/core/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../libs/project-scope/src/core/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAClD,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,YAAY,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AACjE,YAAY,EACV,cAAc,EACd,SAAS,EACT,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,MAAM,CAAA;AACb,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAC3E,YAAY,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AACxC,YAAY,EAAE,kBAAkB,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACnF,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAC9F,OAAO,EACL,MAAM,EACN,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,MAAM,EACN,UAAU,EACV,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,cAAc,EACd,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,SAAS,EACT,MAAM,EACN,eAAe,EACf,WAAW,EACX,WAAW,EACX,MAAM,EACN,SAAS,EACT,eAAe,EACf,aAAa,EACb,sBAAsB,EACtB,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,eAAe,EACf,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,aAAa,GACd,MAAM,MAAM,CAAA;AACb,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,EAAE,mBAAmB,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAC1H,OAAO,EACL,mBAAmB,EACnB,WAAW,EACX,UAAU,EACV,YAAY,EACZ,2BAA2B,EAC3B,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,aAAa,EACb,yBAAyB,EACzB,iBAAiB,EACjB,cAAc,EACd,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACnB,oBAAoB,EACpB,WAAW,EACX,eAAe,GAChB,MAAM,QAAQ,CAAA;AACf,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACnF,OAAO,EACL,IAAI,EACJ,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,SAAS,EACT,EAAE,EACF,oBAAoB,EACpB,UAAU,GACX,MAAM,YAAY,CAAA"}
|