@sprucelabs/spruce-cli 17.1.13 → 17.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/node_modules/@sprucelabs/data-stores/README.md +24 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/databaseNotConnected.schema.d.ts +3 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/databaseNotConnected.schema.js +23 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/duplicateKey.schema.d.ts +3 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/duplicateKey.schema.js +11 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/duplicateRecord.schema.d.ts +3 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/duplicateRecord.schema.js +40 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/failedToLoadStore.schema.d.ts +3 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/failedToLoadStore.schema.js +18 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/failedToLoadStores.schema.d.ts +3 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/failedToLoadStores.schema.js +19 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/indexExists.schema.d.ts +3 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/indexExists.schema.js +20 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/indexNotFound.schema.d.ts +3 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/indexNotFound.schema.js +20 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/invalidDatabaseName.schema.d.ts +3 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/invalidDatabaseName.schema.js +18 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/invalidDbConnectionString.schema.d.ts +3 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/invalidDbConnectionString.schema.js +11 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/invalidStore.schema copy.d.ts +3 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/invalidStore.schema copy.js +25 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/invalidStore.schema.d.ts +3 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/invalidStore.schema.js +11 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/invalidStoreName.schema.d.ts +3 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/invalidStoreName.schema.js +25 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/mongoIdMappingError.schema.d.ts +3 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/mongoIdMappingError.schema.js +11 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/record-not-found-query.schema.d.ts +3 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/record-not-found-query.schema.js +15 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/recordNotFound.schema.d.ts +3 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/recordNotFound.schema.js +30 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/scrambleNotConfigured.schema.d.ts +3 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/scrambleNotConfigured.schema.js +11 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/unableToConnectToDb.schema.d.ts +3 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/unableToConnectToDb.schema.js +11 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/unknownDatabaseError.schema.d.ts +3 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/unknownDatabaseError.schema.js +18 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/unknownError.schema.d.ts +3 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/unknownError.schema.js +11 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/unknownStoreError.schema.d.ts +3 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/dataStores/unknownStoreError.schema.js +27 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/errors.types.d.ts +383 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/errors.types.js +4 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/options.types.d.ts +58 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/errors/options.types.js +2 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/schemas/fields/fieldClassMap.d.ts +2 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/schemas/fields/fieldClassMap.js +4 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/schemas/fields/fields.types.d.ts +1 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/schemas/fields/fields.types.js +2 -0
- package/node_modules/@sprucelabs/data-stores/build/.spruce/settings.json +22 -0
- package/node_modules/@sprucelabs/data-stores/build/constants.d.ts +1 -0
- package/node_modules/@sprucelabs/data-stores/build/constants.js +4 -0
- package/node_modules/@sprucelabs/data-stores/build/cursors/CursorPager.d.ts +29 -0
- package/node_modules/@sprucelabs/data-stores/build/cursors/CursorPager.js +129 -0
- package/node_modules/@sprucelabs/data-stores/build/cursors/CursorPagerFaker.d.ts +6 -0
- package/node_modules/@sprucelabs/data-stores/build/cursors/CursorPagerFaker.js +25 -0
- package/node_modules/@sprucelabs/data-stores/build/databases/MongoDatabase.d.ts +44 -0
- package/node_modules/@sprucelabs/data-stores/build/databases/MongoDatabase.js +432 -0
- package/node_modules/@sprucelabs/data-stores/build/databases/NeDbDatabase.d.ts +41 -0
- package/node_modules/@sprucelabs/data-stores/build/databases/NeDbDatabase.js +447 -0
- package/node_modules/@sprucelabs/data-stores/build/databases/mongo.types.d.ts +3163 -0
- package/node_modules/@sprucelabs/data-stores/build/databases/mongo.types.js +50 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/SpruceError.d.ts +5 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/SpruceError.js +103 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/databaseNotConnected.builder.d.ts +15 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/databaseNotConnected.builder.js +17 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/duplicateKey.builder.d.ts +6 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/duplicateKey.builder.js +8 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/duplicateRecord.builder.d.ts +28 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/duplicateRecord.builder.js +30 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/failedToLoadStore.builder.d.ts +12 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/failedToLoadStore.builder.js +14 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/failedToLoadStores.builder.d.ts +16 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/failedToLoadStores.builder.js +21 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/indexExists.builder.d.ts +14 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/indexExists.builder.js +16 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/indexNotFound.builder.d.ts +14 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/indexNotFound.builder.js +16 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/invalidDatabaseName.builder.d.ts +12 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/invalidDatabaseName.builder.js +14 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/invalidDbConnectionString.builder.d.ts +7 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/invalidDbConnectionString.builder.js +9 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/invalidStore.builder.d.ts +6 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/invalidStore.builder.js +8 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/invalidStoreName.builder.d.ts +16 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/invalidStoreName.builder.js +18 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/mongoIdMappingError.builder.d.ts +7 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/mongoIdMappingError.builder.js +12 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/recordNotFound.builder.d.ts +31 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/recordNotFound.builder.js +33 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/scrambleNotConfigured.builder.d.ts +7 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/scrambleNotConfigured.builder.js +12 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/unableToConnectToDb.builder.d.ts +7 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/unableToConnectToDb.builder.js +9 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/unknownDatabaseError.builder.d.ts +12 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/unknownDatabaseError.builder.js +14 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/unknownError.builder.d.ts +6 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/unknownError.builder.js +8 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/unknownStoreError.builder.d.ts +19 -0
- package/node_modules/@sprucelabs/data-stores/build/errors/unknownStoreError.builder.js +21 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/.spruce/errors/errors.types.d.ts +383 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/.spruce/errors/errors.types.js +3 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/.spruce/errors/options.types.d.ts +58 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/.spruce/errors/options.types.js +1 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/constants.d.ts +1 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/constants.js +1 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/cursors/CursorPager.d.ts +29 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/cursors/CursorPager.js +134 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/cursors/CursorPagerFaker.d.ts +6 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/cursors/CursorPagerFaker.js +30 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/databases/MongoDatabase.d.ts +44 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/databases/MongoDatabase.js +476 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/databases/NeDbDatabase.d.ts +41 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/databases/NeDbDatabase.js +496 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/databases/mongo.types.d.ts +3163 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/databases/mongo.types.js +36 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/SpruceError.d.ts +5 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/SpruceError.js +97 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/databaseNotConnected.builder.d.ts +15 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/databaseNotConnected.builder.js +15 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/duplicateKey.builder.d.ts +6 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/duplicateKey.builder.js +6 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/duplicateRecord.builder.d.ts +28 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/duplicateRecord.builder.js +28 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/failedToLoadStore.builder.d.ts +12 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/failedToLoadStore.builder.js +12 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/failedToLoadStores.builder.d.ts +16 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/failedToLoadStores.builder.js +19 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/indexExists.builder.d.ts +14 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/indexExists.builder.js +14 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/indexNotFound.builder.d.ts +14 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/indexNotFound.builder.js +14 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/invalidDatabaseName.builder.d.ts +12 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/invalidDatabaseName.builder.js +12 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/invalidDbConnectionString.builder.d.ts +7 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/invalidDbConnectionString.builder.js +7 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/invalidStore.builder.d.ts +6 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/invalidStore.builder.js +6 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/invalidStoreName.builder.d.ts +16 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/invalidStoreName.builder.js +16 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/mongoIdMappingError.builder.d.ts +7 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/mongoIdMappingError.builder.js +10 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/recordNotFound.builder.d.ts +31 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/recordNotFound.builder.js +31 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/scrambleNotConfigured.builder.d.ts +7 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/scrambleNotConfigured.builder.js +10 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/unableToConnectToDb.builder.d.ts +7 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/unableToConnectToDb.builder.js +7 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/unknownDatabaseError.builder.d.ts +12 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/unknownDatabaseError.builder.js +12 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/unknownError.builder.d.ts +6 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/unknownError.builder.js +6 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/unknownStoreError.builder.d.ts +19 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/errors/unknownStoreError.builder.js +19 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/factories/DatabaseFactory.d.ts +10 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/factories/DatabaseFactory.js +32 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/factories/StoreFactory.d.ts +25 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/factories/StoreFactory.js +72 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/fixtures/DatabaseFixture.d.ts +22 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/fixtures/DatabaseFixture.js +99 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/fixtures/StoreFixture.d.ts +5 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/fixtures/StoreFixture.js +25 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/index.d.ts +21 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/index.js +21 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/loaders/StoreLoader.d.ts +25 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/loaders/StoreLoader.js +120 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/mutexers/AbstractMutexer.d.ts +6 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/mutexers/AbstractMutexer.js +56 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/stores/AbstractStore.d.ts +48 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/stores/AbstractStore.js +293 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/tests/AbstractDatabaseTest.d.ts +12 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/tests/AbstractDatabaseTest.js +54 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/types/database.types.d.ts +29 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/types/database.types.js +1 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/types/query.types.d.ts +29 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/types/query.types.js +2 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/types/stores.types.d.ts +24 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/types/stores.types.js +10 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/utilities/error.utility.d.ts +5 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/utilities/error.utility.js +23 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/utilities/generateId.d.ts +1 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/utilities/generateId.js +4 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/utilities/generateIdDeprecated.d.ts +6 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/utilities/generateIdDeprecated.js +6 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/utilities/mongo.utility.d.ts +12 -0
- package/node_modules/@sprucelabs/data-stores/build/esm/utilities/mongo.utility.js +104 -0
- package/node_modules/@sprucelabs/data-stores/build/factories/DatabaseFactory.d.ts +10 -0
- package/node_modules/@sprucelabs/data-stores/build/factories/DatabaseFactory.js +38 -0
- package/node_modules/@sprucelabs/data-stores/build/factories/StoreFactory.d.ts +25 -0
- package/node_modules/@sprucelabs/data-stores/build/factories/StoreFactory.js +65 -0
- package/node_modules/@sprucelabs/data-stores/build/fixtures/DatabaseFixture.d.ts +22 -0
- package/node_modules/@sprucelabs/data-stores/build/fixtures/DatabaseFixture.js +86 -0
- package/node_modules/@sprucelabs/data-stores/build/fixtures/StoreFixture.d.ts +5 -0
- package/node_modules/@sprucelabs/data-stores/build/fixtures/StoreFixture.js +20 -0
- package/node_modules/@sprucelabs/data-stores/build/index.d.ts +21 -0
- package/node_modules/@sprucelabs/data-stores/build/index.js +53 -0
- package/node_modules/@sprucelabs/data-stores/build/loaders/StoreLoader.d.ts +25 -0
- package/node_modules/@sprucelabs/data-stores/build/loaders/StoreLoader.js +107 -0
- package/node_modules/@sprucelabs/data-stores/build/mutexers/AbstractMutexer.d.ts +6 -0
- package/node_modules/@sprucelabs/data-stores/build/mutexers/AbstractMutexer.js +46 -0
- package/node_modules/@sprucelabs/data-stores/build/stores/AbstractStore.d.ts +48 -0
- package/node_modules/@sprucelabs/data-stores/build/stores/AbstractStore.js +285 -0
- package/node_modules/@sprucelabs/data-stores/build/tests/AbstractDatabaseTest.d.ts +12 -0
- package/node_modules/@sprucelabs/data-stores/build/tests/AbstractDatabaseTest.js +37 -0
- package/node_modules/@sprucelabs/data-stores/build/types/database.types.d.ts +29 -0
- package/node_modules/@sprucelabs/data-stores/build/types/database.types.js +2 -0
- package/node_modules/@sprucelabs/data-stores/build/types/query.types.d.ts +29 -0
- package/node_modules/@sprucelabs/data-stores/build/types/query.types.js +3 -0
- package/node_modules/@sprucelabs/data-stores/build/types/stores.types.d.ts +24 -0
- package/node_modules/@sprucelabs/data-stores/build/types/stores.types.js +13 -0
- package/node_modules/@sprucelabs/data-stores/build/utilities/error.utility.d.ts +5 -0
- package/node_modules/@sprucelabs/data-stores/build/utilities/error.utility.js +28 -0
- package/node_modules/@sprucelabs/data-stores/build/utilities/generateId.d.ts +1 -0
- package/node_modules/@sprucelabs/data-stores/build/utilities/generateId.js +7 -0
- package/node_modules/@sprucelabs/data-stores/build/utilities/generateIdDeprecated.d.ts +6 -0
- package/node_modules/@sprucelabs/data-stores/build/utilities/generateIdDeprecated.js +11 -0
- package/node_modules/@sprucelabs/data-stores/build/utilities/mongo.utility.d.ts +12 -0
- package/node_modules/@sprucelabs/data-stores/build/utilities/mongo.utility.js +109 -0
- package/node_modules/@sprucelabs/data-stores/node_modules/globby/gitignore.js +120 -0
- package/node_modules/@sprucelabs/data-stores/node_modules/globby/index.d.ts +186 -0
- package/node_modules/@sprucelabs/data-stores/node_modules/globby/index.js +181 -0
- package/node_modules/@sprucelabs/data-stores/node_modules/globby/license +9 -0
- package/node_modules/@sprucelabs/data-stores/node_modules/globby/package.json +82 -0
- package/node_modules/@sprucelabs/data-stores/node_modules/globby/readme.md +170 -0
- package/node_modules/@sprucelabs/data-stores/node_modules/globby/stream-utils.js +46 -0
- package/node_modules/@sprucelabs/data-stores/package.json +144 -0
- package/node_modules/@sprucelabs/data-stores/tsconfig.json +39 -0
- package/package.json +23 -23
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const {promisify} = require('util');
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const fastGlob = require('fast-glob');
|
|
6
|
+
const gitIgnore = require('ignore');
|
|
7
|
+
const slash = require('slash');
|
|
8
|
+
|
|
9
|
+
const DEFAULT_IGNORE = [
|
|
10
|
+
'**/node_modules/**',
|
|
11
|
+
'**/flow-typed/**',
|
|
12
|
+
'**/coverage/**',
|
|
13
|
+
'**/.git'
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
const readFileP = promisify(fs.readFile);
|
|
17
|
+
|
|
18
|
+
const mapGitIgnorePatternTo = base => ignore => {
|
|
19
|
+
if (ignore.startsWith('!')) {
|
|
20
|
+
return '!' + path.posix.join(base, ignore.slice(1));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return path.posix.join(base, ignore);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const parseGitIgnore = (content, options) => {
|
|
27
|
+
const base = slash(path.relative(options.cwd, path.dirname(options.fileName)));
|
|
28
|
+
|
|
29
|
+
return content
|
|
30
|
+
.split(/\r?\n/)
|
|
31
|
+
.filter(Boolean)
|
|
32
|
+
.filter(line => !line.startsWith('#'))
|
|
33
|
+
.map(mapGitIgnorePatternTo(base));
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const reduceIgnore = files => {
|
|
37
|
+
const ignores = gitIgnore();
|
|
38
|
+
for (const file of files) {
|
|
39
|
+
ignores.add(parseGitIgnore(file.content, {
|
|
40
|
+
cwd: file.cwd,
|
|
41
|
+
fileName: file.filePath
|
|
42
|
+
}));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return ignores;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const ensureAbsolutePathForCwd = (cwd, p) => {
|
|
49
|
+
cwd = slash(cwd);
|
|
50
|
+
if (path.isAbsolute(p)) {
|
|
51
|
+
if (slash(p).startsWith(cwd)) {
|
|
52
|
+
return p;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
throw new Error(`Path ${p} is not in cwd ${cwd}`);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return path.join(cwd, p);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const getIsIgnoredPredecate = (ignores, cwd) => {
|
|
62
|
+
return p => ignores.ignores(slash(path.relative(cwd, ensureAbsolutePathForCwd(cwd, p.path || p))));
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const getFile = async (file, cwd) => {
|
|
66
|
+
const filePath = path.join(cwd, file);
|
|
67
|
+
const content = await readFileP(filePath, 'utf8');
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
cwd,
|
|
71
|
+
filePath,
|
|
72
|
+
content
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const getFileSync = (file, cwd) => {
|
|
77
|
+
const filePath = path.join(cwd, file);
|
|
78
|
+
const content = fs.readFileSync(filePath, 'utf8');
|
|
79
|
+
|
|
80
|
+
return {
|
|
81
|
+
cwd,
|
|
82
|
+
filePath,
|
|
83
|
+
content
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
const normalizeOptions = ({
|
|
88
|
+
ignore = [],
|
|
89
|
+
cwd = slash(process.cwd())
|
|
90
|
+
} = {}) => {
|
|
91
|
+
return {ignore, cwd};
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
module.exports = async options => {
|
|
95
|
+
options = normalizeOptions(options);
|
|
96
|
+
|
|
97
|
+
const paths = await fastGlob('**/.gitignore', {
|
|
98
|
+
ignore: DEFAULT_IGNORE.concat(options.ignore),
|
|
99
|
+
cwd: options.cwd
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
const files = await Promise.all(paths.map(file => getFile(file, options.cwd)));
|
|
103
|
+
const ignores = reduceIgnore(files);
|
|
104
|
+
|
|
105
|
+
return getIsIgnoredPredecate(ignores, options.cwd);
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
module.exports.sync = options => {
|
|
109
|
+
options = normalizeOptions(options);
|
|
110
|
+
|
|
111
|
+
const paths = fastGlob.sync('**/.gitignore', {
|
|
112
|
+
ignore: DEFAULT_IGNORE.concat(options.ignore),
|
|
113
|
+
cwd: options.cwd
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
const files = paths.map(file => getFileSync(file, options.cwd));
|
|
117
|
+
const ignores = reduceIgnore(files);
|
|
118
|
+
|
|
119
|
+
return getIsIgnoredPredecate(ignores, options.cwd);
|
|
120
|
+
};
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import {Options as FastGlobOptions, Entry as FastGlobEntry} from 'fast-glob';
|
|
2
|
+
|
|
3
|
+
declare namespace globby {
|
|
4
|
+
type ExpandDirectoriesOption =
|
|
5
|
+
| boolean
|
|
6
|
+
| readonly string[]
|
|
7
|
+
| {files?: readonly string[]; extensions?: readonly string[]};
|
|
8
|
+
|
|
9
|
+
type Entry = FastGlobEntry;
|
|
10
|
+
|
|
11
|
+
interface GlobbyOptions extends FastGlobOptions {
|
|
12
|
+
/**
|
|
13
|
+
If set to `true`, `globby` will automatically glob directories for you. If you define an `Array` it will only glob files that matches the patterns inside the `Array`. You can also define an `Object` with `files` and `extensions` like in the example below.
|
|
14
|
+
|
|
15
|
+
Note that if you set this option to `false`, you won't get back matched directories unless you set `onlyFiles: false`.
|
|
16
|
+
|
|
17
|
+
@default true
|
|
18
|
+
|
|
19
|
+
@example
|
|
20
|
+
```
|
|
21
|
+
import globby = require('globby');
|
|
22
|
+
|
|
23
|
+
(async () => {
|
|
24
|
+
const paths = await globby('images', {
|
|
25
|
+
expandDirectories: {
|
|
26
|
+
files: ['cat', 'unicorn', '*.jpg'],
|
|
27
|
+
extensions: ['png']
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
console.log(paths);
|
|
32
|
+
//=> ['cat.png', 'unicorn.png', 'cow.jpg', 'rainbow.jpg']
|
|
33
|
+
})();
|
|
34
|
+
```
|
|
35
|
+
*/
|
|
36
|
+
readonly expandDirectories?: ExpandDirectoriesOption;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
Respect ignore patterns in `.gitignore` files that apply to the globbed files.
|
|
40
|
+
|
|
41
|
+
@default false
|
|
42
|
+
*/
|
|
43
|
+
readonly gitignore?: boolean;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
interface GlobTask {
|
|
47
|
+
readonly pattern: string;
|
|
48
|
+
readonly options: GlobbyOptions;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
interface GitignoreOptions {
|
|
52
|
+
readonly cwd?: string;
|
|
53
|
+
readonly ignore?: readonly string[];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
type FilterFunction = (path: string) => boolean;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
interface Gitignore {
|
|
60
|
+
/**
|
|
61
|
+
@returns A filter function indicating whether a given path is ignored via a `.gitignore` file.
|
|
62
|
+
*/
|
|
63
|
+
sync: (options?: globby.GitignoreOptions) => globby.FilterFunction;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
`.gitignore` files matched by the ignore config are not used for the resulting filter function.
|
|
67
|
+
|
|
68
|
+
@returns A filter function indicating whether a given path is ignored via a `.gitignore` file.
|
|
69
|
+
|
|
70
|
+
@example
|
|
71
|
+
```
|
|
72
|
+
import {gitignore} from 'globby';
|
|
73
|
+
|
|
74
|
+
(async () => {
|
|
75
|
+
const isIgnored = await gitignore();
|
|
76
|
+
console.log(isIgnored('some/file'));
|
|
77
|
+
})();
|
|
78
|
+
```
|
|
79
|
+
*/
|
|
80
|
+
(options?: globby.GitignoreOptions): Promise<globby.FilterFunction>;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
declare const globby: {
|
|
84
|
+
/**
|
|
85
|
+
Find files and directories using glob patterns.
|
|
86
|
+
|
|
87
|
+
Note that glob patterns can only contain forward-slashes, not backward-slashes, so if you want to construct a glob pattern from path components, you need to use `path.posix.join()` instead of `path.join()`.
|
|
88
|
+
|
|
89
|
+
@param patterns - See the supported [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns).
|
|
90
|
+
@param options - See the [`fast-glob` options](https://github.com/mrmlnc/fast-glob#options-3) in addition to the ones in this package.
|
|
91
|
+
@returns The matching paths.
|
|
92
|
+
*/
|
|
93
|
+
sync: ((
|
|
94
|
+
patterns: string | readonly string[],
|
|
95
|
+
options: globby.GlobbyOptions & {objectMode: true}
|
|
96
|
+
) => globby.Entry[]) & ((
|
|
97
|
+
patterns: string | readonly string[],
|
|
98
|
+
options?: globby.GlobbyOptions
|
|
99
|
+
) => string[]);
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
Find files and directories using glob patterns.
|
|
103
|
+
|
|
104
|
+
Note that glob patterns can only contain forward-slashes, not backward-slashes, so if you want to construct a glob pattern from path components, you need to use `path.posix.join()` instead of `path.join()`.
|
|
105
|
+
|
|
106
|
+
@param patterns - See the supported [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns).
|
|
107
|
+
@param options - See the [`fast-glob` options](https://github.com/mrmlnc/fast-glob#options-3) in addition to the ones in this package.
|
|
108
|
+
@returns The stream of matching paths.
|
|
109
|
+
|
|
110
|
+
@example
|
|
111
|
+
```
|
|
112
|
+
import globby = require('globby');
|
|
113
|
+
|
|
114
|
+
(async () => {
|
|
115
|
+
for await (const path of globby.stream('*.tmp')) {
|
|
116
|
+
console.log(path);
|
|
117
|
+
}
|
|
118
|
+
})();
|
|
119
|
+
```
|
|
120
|
+
*/
|
|
121
|
+
stream: (
|
|
122
|
+
patterns: string | readonly string[],
|
|
123
|
+
options?: globby.GlobbyOptions
|
|
124
|
+
) => NodeJS.ReadableStream;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
Note that you should avoid running the same tasks multiple times as they contain a file system cache. Instead, run this method each time to ensure file system changes are taken into consideration.
|
|
128
|
+
|
|
129
|
+
@param patterns - See the supported [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns).
|
|
130
|
+
@param options - See the [`fast-glob` options](https://github.com/mrmlnc/fast-glob#options-3) in addition to the ones in this package.
|
|
131
|
+
@returns An object in the format `{pattern: string, options: object}`, which can be passed as arguments to [`fast-glob`](https://github.com/mrmlnc/fast-glob). This is useful for other globbing-related packages.
|
|
132
|
+
*/
|
|
133
|
+
generateGlobTasks: (
|
|
134
|
+
patterns: string | readonly string[],
|
|
135
|
+
options?: globby.GlobbyOptions
|
|
136
|
+
) => globby.GlobTask[];
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
Note that the options affect the results.
|
|
140
|
+
|
|
141
|
+
This function is backed by [`fast-glob`](https://github.com/mrmlnc/fast-glob#isdynamicpatternpattern-options).
|
|
142
|
+
|
|
143
|
+
@param patterns - See the supported [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns).
|
|
144
|
+
@param options - See the [`fast-glob` options](https://github.com/mrmlnc/fast-glob#options-3).
|
|
145
|
+
@returns Whether there are any special glob characters in the `patterns`.
|
|
146
|
+
*/
|
|
147
|
+
hasMagic: (
|
|
148
|
+
patterns: string | readonly string[],
|
|
149
|
+
options?: FastGlobOptions
|
|
150
|
+
) => boolean;
|
|
151
|
+
|
|
152
|
+
readonly gitignore: Gitignore;
|
|
153
|
+
|
|
154
|
+
(
|
|
155
|
+
patterns: string | readonly string[],
|
|
156
|
+
options: globby.GlobbyOptions & {objectMode: true}
|
|
157
|
+
): Promise<globby.Entry[]>;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
Find files and directories using glob patterns.
|
|
161
|
+
|
|
162
|
+
Note that glob patterns can only contain forward-slashes, not backward-slashes, so if you want to construct a glob pattern from path components, you need to use `path.posix.join()` instead of `path.join()`.
|
|
163
|
+
|
|
164
|
+
@param patterns - See the supported [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns).
|
|
165
|
+
@param options - See the [`fast-glob` options](https://github.com/mrmlnc/fast-glob#options-3) in addition to the ones in this package.
|
|
166
|
+
@returns The matching paths.
|
|
167
|
+
|
|
168
|
+
@example
|
|
169
|
+
```
|
|
170
|
+
import globby = require('globby');
|
|
171
|
+
|
|
172
|
+
(async () => {
|
|
173
|
+
const paths = await globby(['*', '!cake']);
|
|
174
|
+
|
|
175
|
+
console.log(paths);
|
|
176
|
+
//=> ['unicorn', 'rainbow']
|
|
177
|
+
})();
|
|
178
|
+
```
|
|
179
|
+
*/
|
|
180
|
+
(
|
|
181
|
+
patterns: string | readonly string[],
|
|
182
|
+
options?: globby.GlobbyOptions
|
|
183
|
+
): Promise<string[]>;
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
export = globby;
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
const arrayUnion = require('array-union');
|
|
4
|
+
const merge2 = require('merge2');
|
|
5
|
+
const fastGlob = require('fast-glob');
|
|
6
|
+
const dirGlob = require('dir-glob');
|
|
7
|
+
const gitignore = require('./gitignore');
|
|
8
|
+
const {FilterStream, UniqueStream} = require('./stream-utils');
|
|
9
|
+
|
|
10
|
+
const DEFAULT_FILTER = () => false;
|
|
11
|
+
|
|
12
|
+
const isNegative = pattern => pattern[0] === '!';
|
|
13
|
+
|
|
14
|
+
const assertPatternsInput = patterns => {
|
|
15
|
+
if (!patterns.every(pattern => typeof pattern === 'string')) {
|
|
16
|
+
throw new TypeError('Patterns must be a string or an array of strings');
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const checkCwdOption = (options = {}) => {
|
|
21
|
+
if (!options.cwd) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
let stat;
|
|
26
|
+
try {
|
|
27
|
+
stat = fs.statSync(options.cwd);
|
|
28
|
+
} catch {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (!stat.isDirectory()) {
|
|
33
|
+
throw new Error('The `cwd` option must be a path to a directory');
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const getPathString = p => p.stats instanceof fs.Stats ? p.path : p;
|
|
38
|
+
|
|
39
|
+
const generateGlobTasks = (patterns, taskOptions) => {
|
|
40
|
+
patterns = arrayUnion([].concat(patterns));
|
|
41
|
+
assertPatternsInput(patterns);
|
|
42
|
+
checkCwdOption(taskOptions);
|
|
43
|
+
|
|
44
|
+
const globTasks = [];
|
|
45
|
+
|
|
46
|
+
taskOptions = {
|
|
47
|
+
ignore: [],
|
|
48
|
+
expandDirectories: true,
|
|
49
|
+
...taskOptions
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
for (const [index, pattern] of patterns.entries()) {
|
|
53
|
+
if (isNegative(pattern)) {
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const ignore = patterns
|
|
58
|
+
.slice(index)
|
|
59
|
+
.filter(pattern => isNegative(pattern))
|
|
60
|
+
.map(pattern => pattern.slice(1));
|
|
61
|
+
|
|
62
|
+
const options = {
|
|
63
|
+
...taskOptions,
|
|
64
|
+
ignore: taskOptions.ignore.concat(ignore)
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
globTasks.push({pattern, options});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return globTasks;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
const globDirs = (task, fn) => {
|
|
74
|
+
let options = {};
|
|
75
|
+
if (task.options.cwd) {
|
|
76
|
+
options.cwd = task.options.cwd;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (Array.isArray(task.options.expandDirectories)) {
|
|
80
|
+
options = {
|
|
81
|
+
...options,
|
|
82
|
+
files: task.options.expandDirectories
|
|
83
|
+
};
|
|
84
|
+
} else if (typeof task.options.expandDirectories === 'object') {
|
|
85
|
+
options = {
|
|
86
|
+
...options,
|
|
87
|
+
...task.options.expandDirectories
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return fn(task.pattern, options);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const getPattern = (task, fn) => task.options.expandDirectories ? globDirs(task, fn) : [task.pattern];
|
|
95
|
+
|
|
96
|
+
const getFilterSync = options => {
|
|
97
|
+
return options && options.gitignore ?
|
|
98
|
+
gitignore.sync({cwd: options.cwd, ignore: options.ignore}) :
|
|
99
|
+
DEFAULT_FILTER;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const globToTask = task => glob => {
|
|
103
|
+
const {options} = task;
|
|
104
|
+
if (options.ignore && Array.isArray(options.ignore) && options.expandDirectories) {
|
|
105
|
+
options.ignore = dirGlob.sync(options.ignore);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
return {
|
|
109
|
+
pattern: glob,
|
|
110
|
+
options
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
module.exports = async (patterns, options) => {
|
|
115
|
+
const globTasks = generateGlobTasks(patterns, options);
|
|
116
|
+
|
|
117
|
+
const getFilter = async () => {
|
|
118
|
+
return options && options.gitignore ?
|
|
119
|
+
gitignore({cwd: options.cwd, ignore: options.ignore}) :
|
|
120
|
+
DEFAULT_FILTER;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
const getTasks = async () => {
|
|
124
|
+
const tasks = await Promise.all(globTasks.map(async task => {
|
|
125
|
+
const globs = await getPattern(task, dirGlob);
|
|
126
|
+
return Promise.all(globs.map(globToTask(task)));
|
|
127
|
+
}));
|
|
128
|
+
|
|
129
|
+
return arrayUnion(...tasks);
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
const [filter, tasks] = await Promise.all([getFilter(), getTasks()]);
|
|
133
|
+
const paths = await Promise.all(tasks.map(task => fastGlob(task.pattern, task.options)));
|
|
134
|
+
|
|
135
|
+
return arrayUnion(...paths).filter(path_ => !filter(getPathString(path_)));
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
module.exports.sync = (patterns, options) => {
|
|
139
|
+
const globTasks = generateGlobTasks(patterns, options);
|
|
140
|
+
|
|
141
|
+
const tasks = [];
|
|
142
|
+
for (const task of globTasks) {
|
|
143
|
+
const newTask = getPattern(task, dirGlob.sync).map(globToTask(task));
|
|
144
|
+
tasks.push(...newTask);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
const filter = getFilterSync(options);
|
|
148
|
+
|
|
149
|
+
let matches = [];
|
|
150
|
+
for (const task of tasks) {
|
|
151
|
+
matches = arrayUnion(matches, fastGlob.sync(task.pattern, task.options));
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
return matches.filter(path_ => !filter(path_));
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
module.exports.stream = (patterns, options) => {
|
|
158
|
+
const globTasks = generateGlobTasks(patterns, options);
|
|
159
|
+
|
|
160
|
+
const tasks = [];
|
|
161
|
+
for (const task of globTasks) {
|
|
162
|
+
const newTask = getPattern(task, dirGlob.sync).map(globToTask(task));
|
|
163
|
+
tasks.push(...newTask);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
const filter = getFilterSync(options);
|
|
167
|
+
const filterStream = new FilterStream(p => !filter(p));
|
|
168
|
+
const uniqueStream = new UniqueStream();
|
|
169
|
+
|
|
170
|
+
return merge2(tasks.map(task => fastGlob.stream(task.pattern, task.options)))
|
|
171
|
+
.pipe(filterStream)
|
|
172
|
+
.pipe(uniqueStream);
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
module.exports.generateGlobTasks = generateGlobTasks;
|
|
176
|
+
|
|
177
|
+
module.exports.hasMagic = (patterns, options) => []
|
|
178
|
+
.concat(patterns)
|
|
179
|
+
.some(pattern => fastGlob.isDynamicPattern(pattern, options));
|
|
180
|
+
|
|
181
|
+
module.exports.gitignore = gitignore;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "globby",
|
|
3
|
+
"version": "11.1.0",
|
|
4
|
+
"description": "User-friendly glob matching",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": "sindresorhus/globby",
|
|
7
|
+
"funding": "https://github.com/sponsors/sindresorhus",
|
|
8
|
+
"author": {
|
|
9
|
+
"email": "sindresorhus@gmail.com",
|
|
10
|
+
"name": "Sindre Sorhus",
|
|
11
|
+
"url": "https://sindresorhus.com"
|
|
12
|
+
},
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=10"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"bench": "npm update glob-stream fast-glob && matcha bench.js",
|
|
18
|
+
"test": "xo && ava && tsd"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"index.js",
|
|
22
|
+
"index.d.ts",
|
|
23
|
+
"gitignore.js",
|
|
24
|
+
"stream-utils.js"
|
|
25
|
+
],
|
|
26
|
+
"keywords": [
|
|
27
|
+
"all",
|
|
28
|
+
"array",
|
|
29
|
+
"directories",
|
|
30
|
+
"expand",
|
|
31
|
+
"files",
|
|
32
|
+
"filesystem",
|
|
33
|
+
"filter",
|
|
34
|
+
"find",
|
|
35
|
+
"fnmatch",
|
|
36
|
+
"folders",
|
|
37
|
+
"fs",
|
|
38
|
+
"glob",
|
|
39
|
+
"globbing",
|
|
40
|
+
"globs",
|
|
41
|
+
"gulpfriendly",
|
|
42
|
+
"match",
|
|
43
|
+
"matcher",
|
|
44
|
+
"minimatch",
|
|
45
|
+
"multi",
|
|
46
|
+
"multiple",
|
|
47
|
+
"paths",
|
|
48
|
+
"pattern",
|
|
49
|
+
"patterns",
|
|
50
|
+
"traverse",
|
|
51
|
+
"util",
|
|
52
|
+
"utility",
|
|
53
|
+
"wildcard",
|
|
54
|
+
"wildcards",
|
|
55
|
+
"promise",
|
|
56
|
+
"gitignore",
|
|
57
|
+
"git"
|
|
58
|
+
],
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"array-union": "^2.1.0",
|
|
61
|
+
"dir-glob": "^3.0.1",
|
|
62
|
+
"fast-glob": "^3.2.9",
|
|
63
|
+
"ignore": "^5.2.0",
|
|
64
|
+
"merge2": "^1.4.1",
|
|
65
|
+
"slash": "^3.0.0"
|
|
66
|
+
},
|
|
67
|
+
"devDependencies": {
|
|
68
|
+
"ava": "^3.13.0",
|
|
69
|
+
"get-stream": "^6.0.0",
|
|
70
|
+
"glob-stream": "^6.1.0",
|
|
71
|
+
"globby": "sindresorhus/globby#main",
|
|
72
|
+
"matcha": "^0.7.0",
|
|
73
|
+
"rimraf": "^3.0.2",
|
|
74
|
+
"tsd": "^0.13.1",
|
|
75
|
+
"xo": "^0.33.1"
|
|
76
|
+
},
|
|
77
|
+
"xo": {
|
|
78
|
+
"ignores": [
|
|
79
|
+
"fixtures"
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
}
|