@cdklabs/cdk-construct-connect-datalake 0.0.12 → 0.0.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/.jsii +11 -11
- package/.jsii.tabl.json +1 -1
- package/lib/index.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/README.md +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/CloudFormation.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/CloudFormationClient.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/index.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/models/models_0.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/package.json +10 -10
- package/node_modules/@aws-sdk/client-connect/README.md +11 -6
- package/node_modules/@aws-sdk/client-connect/dist-cjs/schemas/schemas_0.js +74 -47
- package/node_modules/@aws-sdk/client-connect/dist-es/schemas/schemas_0.js +43 -16
- package/node_modules/@aws-sdk/client-connect/dist-types/Connect.d.ts +12 -7
- package/node_modules/@aws-sdk/client-connect/dist-types/ConnectClient.d.ts +12 -7
- package/node_modules/@aws-sdk/client-connect/dist-types/commands/CreateVocabularyCommand.d.ts +2 -1
- package/node_modules/@aws-sdk/client-connect/dist-types/commands/GetMetricDataV2Command.d.ts +2 -1
- package/node_modules/@aws-sdk/client-connect/dist-types/commands/SearchContactsCommand.d.ts +17 -0
- package/node_modules/@aws-sdk/client-connect/dist-types/commands/SearchPromptsCommand.d.ts +1 -2
- package/node_modules/@aws-sdk/client-connect/dist-types/commands/SearchQueuesCommand.d.ts +1 -2
- package/node_modules/@aws-sdk/client-connect/dist-types/index.d.ts +12 -7
- package/node_modules/@aws-sdk/client-connect/dist-types/models/models_0.d.ts +40 -37
- package/node_modules/@aws-sdk/client-connect/dist-types/models/models_1.d.ts +152 -59
- package/node_modules/@aws-sdk/client-connect/dist-types/models/models_2.d.ts +69 -63
- package/node_modules/@aws-sdk/client-connect/dist-types/models/models_3.d.ts +72 -16
- package/node_modules/@aws-sdk/client-connect/dist-types/schemas/schemas_0.d.ts +3 -0
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/commands/CreateVocabularyCommand.d.ts +2 -4
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/commands/GetMetricDataV2Command.d.ts +2 -4
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/commands/SearchPromptsCommand.d.ts +4 -2
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/commands/SearchQueuesCommand.d.ts +1 -2
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/models/models_0.d.ts +9 -10
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/models/models_1.d.ts +9 -10
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/models/models_2.d.ts +19 -15
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/models/models_3.d.ts +17 -1
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/schemas/schemas_0.d.ts +3 -0
- package/node_modules/@aws-sdk/client-connect/package.json +10 -10
- package/node_modules/@aws-sdk/client-glue/README.md +14 -0
- package/node_modules/@aws-sdk/client-glue/dist-cjs/index.js +44 -4
- package/node_modules/@aws-sdk/client-glue/dist-cjs/models/errors.js +16 -1
- package/node_modules/@aws-sdk/client-glue/dist-cjs/schemas/schemas_0.js +133 -51
- package/node_modules/@aws-sdk/client-glue/dist-es/Glue.js +4 -0
- package/node_modules/@aws-sdk/client-glue/dist-es/commands/GetDashboardUrlCommand.js +16 -0
- package/node_modules/@aws-sdk/client-glue/dist-es/commands/GetSessionEndpointCommand.js +16 -0
- package/node_modules/@aws-sdk/client-glue/dist-es/commands/index.js +2 -0
- package/node_modules/@aws-sdk/client-glue/dist-es/models/enums.js +14 -4
- package/node_modules/@aws-sdk/client-glue/dist-es/models/errors.js +14 -0
- package/node_modules/@aws-sdk/client-glue/dist-es/schemas/schemas_0.js +108 -26
- package/node_modules/@aws-sdk/client-glue/dist-types/Glue.d.ts +14 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/GlueClient.d.ts +4 -2
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/CreateSessionCommand.d.ts +5 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/GetDashboardUrlCommand.d.ts +93 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/GetMLTaskRunCommand.d.ts +1 -2
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/GetSessionCommand.d.ts +1 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/GetSessionEndpointCommand.d.ts +101 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/GetTableCommand.d.ts +121 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/GetTableVersionCommand.d.ts +118 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/GetTableVersionsCommand.d.ts +118 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/GetTablesCommand.d.ts +119 -1
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/GetUnfilteredTableMetadataCommand.d.ts +118 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/ListSessionsCommand.d.ts +1 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/RunStatementCommand.d.ts +6 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/SearchTablesCommand.d.ts +118 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/UpdateCrawlerScheduleCommand.d.ts +2 -1
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/UpdateDataQualityRulesetCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/UpdateDatabaseCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/index.d.ts +2 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/models/enums.d.ts +38 -12
- package/node_modules/@aws-sdk/client-glue/dist-types/models/errors.d.ts +17 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/models/models_1.d.ts +41 -28
- package/node_modules/@aws-sdk/client-glue/dist-types/models/models_2.d.ts +156 -102
- package/node_modules/@aws-sdk/client-glue/dist-types/models/models_3.d.ts +107 -2
- package/node_modules/@aws-sdk/client-glue/dist-types/schemas/schemas_0.d.ts +9 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/Glue.d.ts +34 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/GlueClient.d.ts +12 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/commands/GetDashboardUrlCommand.d.ts +52 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/commands/GetMLTaskRunCommand.d.ts +1 -2
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/commands/GetSessionEndpointCommand.d.ts +53 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/commands/UpdateCrawlerScheduleCommand.d.ts +2 -4
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/commands/UpdateDataQualityRulesetCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/commands/UpdateDatabaseCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/commands/index.d.ts +2 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/models/enums.d.ts +19 -6
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/models/errors.d.ts +8 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/models/models_1.d.ts +12 -7
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/models/models_2.d.ts +36 -23
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/models/models_3.d.ts +24 -1
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/schemas/schemas_0.d.ts +9 -0
- package/node_modules/@aws-sdk/client-glue/package.json +10 -10
- package/node_modules/@aws-sdk/client-lakeformation/package.json +10 -10
- package/node_modules/@aws-sdk/client-ram/package.json +10 -10
- package/node_modules/@aws-sdk/client-sts/package.json +12 -12
- package/node_modules/@aws-sdk/core/dist-cjs/index.js +47 -2291
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +12 -6
- package/node_modules/@aws-sdk/core/dist-es/index.js +3 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js +11 -6
- package/node_modules/@aws-sdk/core/dist-types/index.d.ts +5 -5
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/index.d.ts +5 -5
- package/node_modules/@aws-sdk/core/package.json +12 -12
- package/node_modules/@aws-sdk/credential-provider-env/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-http/package.json +11 -10
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +15 -15
- package/node_modules/@aws-sdk/credential-provider-login/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-node/package.json +13 -13
- package/node_modules/@aws-sdk/credential-provider-process/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +4 -1
- package/node_modules/@aws-sdk/credential-provider-sso/dist-es/resolveSSOCredentials.js +4 -1
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +12 -10
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +8 -8
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +99 -106
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +62 -120
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +55 -86
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +73 -104
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +102 -185
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/auth/httpAuthSchemeProvider.js +4 -5
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/endpoint/bdd.js +21 -57
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/runtimeConfig.browser.js +1 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/runtimeConfig.js +2 -4
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/schemas/schemas_0.js +73 -41
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/auth/httpAuthSchemeProvider.js +4 -5
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/bdd.js +20 -52
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.browser.js +1 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.js +2 -4
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/schemas/schemas_0.js +36 -59
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/auth/httpAuthSchemeProvider.js +4 -5
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/bdd.js +17 -45
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.browser.js +1 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.js +2 -4
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/schemas/schemas_0.js +32 -32
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthSchemeProvider.js +4 -5
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/bdd.js +17 -45
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.browser.js +1 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.js +2 -4
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/schemas/schemas_0.js +50 -50
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthSchemeProvider.js +4 -5
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultRoleAssumers.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/bdd.js +34 -96
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.browser.js +1 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js +3 -6
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/schemas/schemas_0.js +63 -80
- package/node_modules/@aws-sdk/nested-clients/package.json +11 -11
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +10 -9
- package/node_modules/@aws-sdk/token-providers/package.json +8 -8
- package/node_modules/@aws-sdk/types/package.json +4 -4
- package/node_modules/@aws-sdk/util-locate-window/package.json +3 -3
- package/node_modules/{strnum → @aws-sdk/xml-builder/node_modules/strnum}/CHANGELOG.md +8 -0
- package/node_modules/{strnum → @aws-sdk/xml-builder/node_modules/strnum}/README.md +9 -0
- package/node_modules/{strnum → @aws-sdk/xml-builder/node_modules/strnum}/package.json +4 -1
- package/node_modules/{strnum → @aws-sdk/xml-builder/node_modules/strnum}/strnum.js +9 -1
- package/node_modules/@aws-sdk/xml-builder/package.json +4 -4
- package/node_modules/@nodable/entities/package.json +4 -1
- package/node_modules/@nodable/entities/src/EntityDecoder.js +104 -3
- package/node_modules/@nodable/entities/src/index.d.ts +77 -0
- package/node_modules/@nodable/entities/src/index.js +1 -1
- package/node_modules/@smithy/core/dist-cjs/index.js +13 -15
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +29 -31
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.browser.js +2 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.js +7 -9
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.native.js +3 -5
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +22 -23
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.browser.js +10 -11
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +38 -39
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.native.js +10 -11
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +14 -17
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +20 -23
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +9 -11
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +11 -13
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +59 -60
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +26 -27
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +28 -29
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +5 -7
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +4 -6
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +23 -25
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +4 -6
- package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +2 -4
- package/node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +1 -1
- package/node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/httpSigningMiddleware.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/endpointMiddleware.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated/StandardRetryStrategy.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/DefaultRateLimiter.js +1 -1
- package/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +1 -1
- package/node_modules/@smithy/core/package.json +18 -17
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +23 -24
- package/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/httpRequest.js +2 -2
- package/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/node-http.js +2 -0
- package/node_modules/@smithy/credential-provider-imds/dist-types/remoteProvider/httpRequest.d.ts +1 -1
- package/node_modules/@smithy/credential-provider-imds/dist-types/remoteProvider/node-http.d.ts +2 -0
- package/node_modules/@smithy/credential-provider-imds/package.json +7 -7
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +6 -8
- package/node_modules/@smithy/fetch-http-handler/package.json +10 -10
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +15 -15
- package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +7 -6
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +2 -1
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2.js +2 -0
- package/node_modules/@smithy/node-http-handler/dist-es/node-https.js +2 -0
- package/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +2 -2
- package/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/node-http2.d.ts +2 -0
- package/node_modules/@smithy/node-http-handler/dist-types/node-https.d.ts +2 -0
- package/node_modules/@smithy/node-http-handler/package.json +8 -8
- package/node_modules/@smithy/signature-v4/dist-cjs/index.js +27 -29
- package/node_modules/@smithy/signature-v4/package.json +7 -7
- package/node_modules/@smithy/types/dist-cjs/index.js +23 -18
- package/node_modules/@smithy/types/package.json +10 -10
- package/node_modules/@types/aws-lambda/README.md +1 -1
- package/node_modules/@types/aws-lambda/package.json +3 -3
- package/node_modules/@types/aws-lambda/trigger/api-gateway-proxy.d.ts +2 -0
- package/node_modules/anynum/LICENSE +21 -0
- package/node_modules/anynum/README.md +142 -0
- package/node_modules/anynum/anynum.js +135 -0
- package/node_modules/anynum/digitTable.js +116 -0
- package/node_modules/anynum/package.json +42 -0
- package/node_modules/watchpack/README.md +9 -0
- package/node_modules/watchpack/lib/DirectoryWatcher.js +182 -25
- package/node_modules/watchpack/lib/index.js +55 -15
- package/node_modules/watchpack/lib/reducePlan.js +56 -35
- package/node_modules/watchpack/lib/util/globToRegExp.js +142 -0
- package/node_modules/watchpack/lib/watchEventSource.js +18 -10
- package/node_modules/watchpack/package.json +17 -23
- package/node_modules/watchpack/types/DirectoryWatcher.d.ts +2 -0
- package/node_modules/watchpack/types/index.d.ts +121 -113
- package/node_modules/watchpack/types/util/globToRegExp.d.ts +2 -0
- package/node_modules/watchpack/types/watchpack.d.ts +1 -1
- package/node_modules/which-typed-array/CHANGELOG.md +7 -0
- package/node_modules/which-typed-array/eslint.config.mjs +1 -0
- package/node_modules/which-typed-array/index.d.ts +22 -31
- package/node_modules/which-typed-array/index.js +36 -23
- package/node_modules/which-typed-array/package.json +4 -7
- package/package.json +14 -14
- package/node_modules/glob-to-regexp/.travis.yml +0 -4
- package/node_modules/glob-to-regexp/README.md +0 -75
- package/node_modules/glob-to-regexp/index.js +0 -130
- package/node_modules/glob-to-regexp/package.json +0 -23
- package/node_modules/glob-to-regexp/test.js +0 -235
- /package/node_modules/{strnum → @aws-sdk/xml-builder/node_modules/strnum}/LICENSE +0 -0
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
module.exports = function (glob, opts) {
|
|
2
|
-
if (typeof glob !== 'string') {
|
|
3
|
-
throw new TypeError('Expected a string');
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
var str = String(glob);
|
|
7
|
-
|
|
8
|
-
// The regexp we are building, as a string.
|
|
9
|
-
var reStr = "";
|
|
10
|
-
|
|
11
|
-
// Whether we are matching so called "extended" globs (like bash) and should
|
|
12
|
-
// support single character matching, matching ranges of characters, group
|
|
13
|
-
// matching, etc.
|
|
14
|
-
var extended = opts ? !!opts.extended : false;
|
|
15
|
-
|
|
16
|
-
// When globstar is _false_ (default), '/foo/*' is translated a regexp like
|
|
17
|
-
// '^\/foo\/.*$' which will match any string beginning with '/foo/'
|
|
18
|
-
// When globstar is _true_, '/foo/*' is translated to regexp like
|
|
19
|
-
// '^\/foo\/[^/]*$' which will match any string beginning with '/foo/' BUT
|
|
20
|
-
// which does not have a '/' to the right of it.
|
|
21
|
-
// E.g. with '/foo/*' these will match: '/foo/bar', '/foo/bar.txt' but
|
|
22
|
-
// these will not '/foo/bar/baz', '/foo/bar/baz.txt'
|
|
23
|
-
// Lastely, when globstar is _true_, '/foo/**' is equivelant to '/foo/*' when
|
|
24
|
-
// globstar is _false_
|
|
25
|
-
var globstar = opts ? !!opts.globstar : false;
|
|
26
|
-
|
|
27
|
-
// If we are doing extended matching, this boolean is true when we are inside
|
|
28
|
-
// a group (eg {*.html,*.js}), and false otherwise.
|
|
29
|
-
var inGroup = false;
|
|
30
|
-
|
|
31
|
-
// RegExp flags (eg "i" ) to pass in to RegExp constructor.
|
|
32
|
-
var flags = opts && typeof( opts.flags ) === "string" ? opts.flags : "";
|
|
33
|
-
|
|
34
|
-
var c;
|
|
35
|
-
for (var i = 0, len = str.length; i < len; i++) {
|
|
36
|
-
c = str[i];
|
|
37
|
-
|
|
38
|
-
switch (c) {
|
|
39
|
-
case "/":
|
|
40
|
-
case "$":
|
|
41
|
-
case "^":
|
|
42
|
-
case "+":
|
|
43
|
-
case ".":
|
|
44
|
-
case "(":
|
|
45
|
-
case ")":
|
|
46
|
-
case "=":
|
|
47
|
-
case "!":
|
|
48
|
-
case "|":
|
|
49
|
-
reStr += "\\" + c;
|
|
50
|
-
break;
|
|
51
|
-
|
|
52
|
-
case "?":
|
|
53
|
-
if (extended) {
|
|
54
|
-
reStr += ".";
|
|
55
|
-
break;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
case "[":
|
|
59
|
-
case "]":
|
|
60
|
-
if (extended) {
|
|
61
|
-
reStr += c;
|
|
62
|
-
break;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
case "{":
|
|
66
|
-
if (extended) {
|
|
67
|
-
inGroup = true;
|
|
68
|
-
reStr += "(";
|
|
69
|
-
break;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
case "}":
|
|
73
|
-
if (extended) {
|
|
74
|
-
inGroup = false;
|
|
75
|
-
reStr += ")";
|
|
76
|
-
break;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
case ",":
|
|
80
|
-
if (inGroup) {
|
|
81
|
-
reStr += "|";
|
|
82
|
-
break;
|
|
83
|
-
}
|
|
84
|
-
reStr += "\\" + c;
|
|
85
|
-
break;
|
|
86
|
-
|
|
87
|
-
case "*":
|
|
88
|
-
// Move over all consecutive "*"'s.
|
|
89
|
-
// Also store the previous and next characters
|
|
90
|
-
var prevChar = str[i - 1];
|
|
91
|
-
var starCount = 1;
|
|
92
|
-
while(str[i + 1] === "*") {
|
|
93
|
-
starCount++;
|
|
94
|
-
i++;
|
|
95
|
-
}
|
|
96
|
-
var nextChar = str[i + 1];
|
|
97
|
-
|
|
98
|
-
if (!globstar) {
|
|
99
|
-
// globstar is disabled, so treat any number of "*" as one
|
|
100
|
-
reStr += ".*";
|
|
101
|
-
} else {
|
|
102
|
-
// globstar is enabled, so determine if this is a globstar segment
|
|
103
|
-
var isGlobstar = starCount > 1 // multiple "*"'s
|
|
104
|
-
&& (prevChar === "/" || prevChar === undefined) // from the start of the segment
|
|
105
|
-
&& (nextChar === "/" || nextChar === undefined) // to the end of the segment
|
|
106
|
-
|
|
107
|
-
if (isGlobstar) {
|
|
108
|
-
// it's a globstar, so match zero or more path segments
|
|
109
|
-
reStr += "((?:[^/]*(?:\/|$))*)";
|
|
110
|
-
i++; // move over the "/"
|
|
111
|
-
} else {
|
|
112
|
-
// it's not a globstar, so only match one path segment
|
|
113
|
-
reStr += "([^/]*)";
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
break;
|
|
117
|
-
|
|
118
|
-
default:
|
|
119
|
-
reStr += c;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
// When regexp 'g' flag is specified don't
|
|
124
|
-
// constrain the regular expression with ^ & $
|
|
125
|
-
if (!flags || !~flags.indexOf('g')) {
|
|
126
|
-
reStr = "^" + reStr + "$";
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
return new RegExp(reStr, flags);
|
|
130
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "glob-to-regexp",
|
|
3
|
-
"version": "0.4.1",
|
|
4
|
-
"description": "Convert globs to regular expressions",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "node test.js"
|
|
8
|
-
},
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "https://github.com/fitzgen/glob-to-regexp.git"
|
|
12
|
-
},
|
|
13
|
-
"keywords": [
|
|
14
|
-
"regexp",
|
|
15
|
-
"glob",
|
|
16
|
-
"regexps",
|
|
17
|
-
"regular expressions",
|
|
18
|
-
"regular expression",
|
|
19
|
-
"wildcard"
|
|
20
|
-
],
|
|
21
|
-
"author": "Nick Fitzgerald <fitzgen@gmail.com>",
|
|
22
|
-
"license": "BSD-2-Clause"
|
|
23
|
-
}
|
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
var globToRegexp = require("./index.js");
|
|
2
|
-
var assert = require("assert");
|
|
3
|
-
|
|
4
|
-
function assertMatch(glob, str, opts) {
|
|
5
|
-
//console.log(glob, globToRegexp(glob, opts));
|
|
6
|
-
assert.ok(globToRegexp(glob, opts).test(str));
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
function assertNotMatch(glob, str, opts) {
|
|
10
|
-
//console.log(glob, globToRegexp(glob, opts));
|
|
11
|
-
assert.equal(false, globToRegexp(glob, opts).test(str));
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function test(globstar) {
|
|
15
|
-
// Match everything
|
|
16
|
-
assertMatch("*", "foo");
|
|
17
|
-
assertMatch("*", "foo", { flags: 'g' });
|
|
18
|
-
|
|
19
|
-
// Match the end
|
|
20
|
-
assertMatch("f*", "foo");
|
|
21
|
-
assertMatch("f*", "foo", { flags: 'g' });
|
|
22
|
-
|
|
23
|
-
// Match the start
|
|
24
|
-
assertMatch("*o", "foo");
|
|
25
|
-
assertMatch("*o", "foo", { flags: 'g' });
|
|
26
|
-
|
|
27
|
-
// Match the middle
|
|
28
|
-
assertMatch("f*uck", "firetruck");
|
|
29
|
-
assertMatch("f*uck", "firetruck", { flags: 'g' });
|
|
30
|
-
|
|
31
|
-
// Don't match without Regexp 'g'
|
|
32
|
-
assertNotMatch("uc", "firetruck");
|
|
33
|
-
// Match anywhere with RegExp 'g'
|
|
34
|
-
assertMatch("uc", "firetruck", { flags: 'g' });
|
|
35
|
-
|
|
36
|
-
// Match zero characters
|
|
37
|
-
assertMatch("f*uck", "fuck");
|
|
38
|
-
assertMatch("f*uck", "fuck", { flags: 'g' });
|
|
39
|
-
|
|
40
|
-
// More complex matches
|
|
41
|
-
assertMatch("*.min.js", "http://example.com/jquery.min.js", {globstar: false});
|
|
42
|
-
assertMatch("*.min.*", "http://example.com/jquery.min.js", {globstar: false});
|
|
43
|
-
assertMatch("*/js/*.js", "http://example.com/js/jquery.min.js", {globstar: false});
|
|
44
|
-
|
|
45
|
-
// More complex matches with RegExp 'g' flag (complex regression)
|
|
46
|
-
assertMatch("*.min.*", "http://example.com/jquery.min.js", { flags: 'g' });
|
|
47
|
-
assertMatch("*.min.js", "http://example.com/jquery.min.js", { flags: 'g' });
|
|
48
|
-
assertMatch("*/js/*.js", "http://example.com/js/jquery.min.js", { flags: 'g' });
|
|
49
|
-
|
|
50
|
-
// Test string "\\\\/$^+?.()=!|{},[].*" represents <glob>\\/$^+?.()=!|{},[].*</glob>
|
|
51
|
-
// The equivalent regex is: /^\\\/\$\^\+\?\.\(\)\=\!\|\{\}\,\[\]\..*$/
|
|
52
|
-
// Both glob and regex match: \/$^+?.()=!|{},[].*
|
|
53
|
-
var testStr = "\\\\/$^+?.()=!|{},[].*";
|
|
54
|
-
var targetStr = "\\/$^+?.()=!|{},[].*";
|
|
55
|
-
assertMatch(testStr, targetStr);
|
|
56
|
-
assertMatch(testStr, targetStr, { flags: 'g' });
|
|
57
|
-
|
|
58
|
-
// Equivalent matches without/with using RegExp 'g'
|
|
59
|
-
assertNotMatch(".min.", "http://example.com/jquery.min.js");
|
|
60
|
-
assertMatch("*.min.*", "http://example.com/jquery.min.js");
|
|
61
|
-
assertMatch(".min.", "http://example.com/jquery.min.js", { flags: 'g' });
|
|
62
|
-
|
|
63
|
-
assertNotMatch("http:", "http://example.com/jquery.min.js");
|
|
64
|
-
assertMatch("http:*", "http://example.com/jquery.min.js");
|
|
65
|
-
assertMatch("http:", "http://example.com/jquery.min.js", { flags: 'g' });
|
|
66
|
-
|
|
67
|
-
assertNotMatch("min.js", "http://example.com/jquery.min.js");
|
|
68
|
-
assertMatch("*.min.js", "http://example.com/jquery.min.js");
|
|
69
|
-
assertMatch("min.js", "http://example.com/jquery.min.js", { flags: 'g' });
|
|
70
|
-
|
|
71
|
-
// Match anywhere (globally) using RegExp 'g'
|
|
72
|
-
assertMatch("min", "http://example.com/jquery.min.js", { flags: 'g' });
|
|
73
|
-
assertMatch("/js/", "http://example.com/js/jquery.min.js", { flags: 'g' });
|
|
74
|
-
|
|
75
|
-
assertNotMatch("/js*jq*.js", "http://example.com/js/jquery.min.js");
|
|
76
|
-
assertMatch("/js*jq*.js", "http://example.com/js/jquery.min.js", { flags: 'g' });
|
|
77
|
-
|
|
78
|
-
// Extended mode
|
|
79
|
-
|
|
80
|
-
// ?: Match one character, no more and no less
|
|
81
|
-
assertMatch("f?o", "foo", { extended: true });
|
|
82
|
-
assertNotMatch("f?o", "fooo", { extended: true });
|
|
83
|
-
assertNotMatch("f?oo", "foo", { extended: true });
|
|
84
|
-
|
|
85
|
-
// ?: Match one character with RegExp 'g'
|
|
86
|
-
assertMatch("f?o", "foo", { extended: true, globstar: globstar, flags: 'g' });
|
|
87
|
-
assertMatch("f?o", "fooo", { extended: true, globstar: globstar, flags: 'g' });
|
|
88
|
-
assertMatch("f?o?", "fooo", { extended: true, globstar: globstar, flags: 'g' });
|
|
89
|
-
assertNotMatch("?fo", "fooo", { extended: true, globstar: globstar, flags: 'g' });
|
|
90
|
-
assertNotMatch("f?oo", "foo", { extended: true, globstar: globstar, flags: 'g' });
|
|
91
|
-
assertNotMatch("foo?", "foo", { extended: true, globstar: globstar, flags: 'g' });
|
|
92
|
-
|
|
93
|
-
// []: Match a character range
|
|
94
|
-
assertMatch("fo[oz]", "foo", { extended: true });
|
|
95
|
-
assertMatch("fo[oz]", "foz", { extended: true });
|
|
96
|
-
assertNotMatch("fo[oz]", "fog", { extended: true });
|
|
97
|
-
|
|
98
|
-
// []: Match a character range and RegExp 'g' (regresion)
|
|
99
|
-
assertMatch("fo[oz]", "foo", { extended: true, globstar: globstar, flags: 'g' });
|
|
100
|
-
assertMatch("fo[oz]", "foz", { extended: true, globstar: globstar, flags: 'g' });
|
|
101
|
-
assertNotMatch("fo[oz]", "fog", { extended: true, globstar: globstar, flags: 'g' });
|
|
102
|
-
|
|
103
|
-
// {}: Match a choice of different substrings
|
|
104
|
-
assertMatch("foo{bar,baaz}", "foobaaz", { extended: true });
|
|
105
|
-
assertMatch("foo{bar,baaz}", "foobar", { extended: true });
|
|
106
|
-
assertNotMatch("foo{bar,baaz}", "foobuzz", { extended: true });
|
|
107
|
-
assertMatch("foo{bar,b*z}", "foobuzz", { extended: true });
|
|
108
|
-
|
|
109
|
-
// {}: Match a choice of different substrings and RegExp 'g' (regression)
|
|
110
|
-
assertMatch("foo{bar,baaz}", "foobaaz", { extended: true, globstar: globstar, flags: 'g' });
|
|
111
|
-
assertMatch("foo{bar,baaz}", "foobar", { extended: true, globstar: globstar, flags: 'g' });
|
|
112
|
-
assertNotMatch("foo{bar,baaz}", "foobuzz", { extended: true, globstar: globstar, flags: 'g' });
|
|
113
|
-
assertMatch("foo{bar,b*z}", "foobuzz", { extended: true, globstar: globstar, flags: 'g' });
|
|
114
|
-
|
|
115
|
-
// More complex extended matches
|
|
116
|
-
assertMatch("http://?o[oz].b*z.com/{*.js,*.html}",
|
|
117
|
-
"http://foo.baaz.com/jquery.min.js",
|
|
118
|
-
{ extended: true });
|
|
119
|
-
assertMatch("http://?o[oz].b*z.com/{*.js,*.html}",
|
|
120
|
-
"http://moz.buzz.com/index.html",
|
|
121
|
-
{ extended: true });
|
|
122
|
-
assertNotMatch("http://?o[oz].b*z.com/{*.js,*.html}",
|
|
123
|
-
"http://moz.buzz.com/index.htm",
|
|
124
|
-
{ extended: true });
|
|
125
|
-
assertNotMatch("http://?o[oz].b*z.com/{*.js,*.html}",
|
|
126
|
-
"http://moz.bar.com/index.html",
|
|
127
|
-
{ extended: true });
|
|
128
|
-
assertNotMatch("http://?o[oz].b*z.com/{*.js,*.html}",
|
|
129
|
-
"http://flozz.buzz.com/index.html",
|
|
130
|
-
{ extended: true });
|
|
131
|
-
|
|
132
|
-
// More complex extended matches and RegExp 'g' (regresion)
|
|
133
|
-
assertMatch("http://?o[oz].b*z.com/{*.js,*.html}",
|
|
134
|
-
"http://foo.baaz.com/jquery.min.js",
|
|
135
|
-
{ extended: true, globstar: globstar, flags: 'g' });
|
|
136
|
-
assertMatch("http://?o[oz].b*z.com/{*.js,*.html}",
|
|
137
|
-
"http://moz.buzz.com/index.html",
|
|
138
|
-
{ extended: true, globstar: globstar, flags: 'g' });
|
|
139
|
-
assertNotMatch("http://?o[oz].b*z.com/{*.js,*.html}",
|
|
140
|
-
"http://moz.buzz.com/index.htm",
|
|
141
|
-
{ extended: true, globstar: globstar, flags: 'g' });
|
|
142
|
-
assertNotMatch("http://?o[oz].b*z.com/{*.js,*.html}",
|
|
143
|
-
"http://moz.bar.com/index.html",
|
|
144
|
-
{ extended: true, globstar: globstar, flags: 'g' });
|
|
145
|
-
assertNotMatch("http://?o[oz].b*z.com/{*.js,*.html}",
|
|
146
|
-
"http://flozz.buzz.com/index.html",
|
|
147
|
-
{ extended: true, globstar: globstar, flags: 'g' });
|
|
148
|
-
|
|
149
|
-
// globstar
|
|
150
|
-
assertMatch("http://foo.com/**/{*.js,*.html}",
|
|
151
|
-
"http://foo.com/bar/jquery.min.js",
|
|
152
|
-
{ extended: true, globstar: globstar, flags: 'g' });
|
|
153
|
-
assertMatch("http://foo.com/**/{*.js,*.html}",
|
|
154
|
-
"http://foo.com/bar/baz/jquery.min.js",
|
|
155
|
-
{ extended: true, globstar: globstar, flags: 'g' });
|
|
156
|
-
assertMatch("http://foo.com/**",
|
|
157
|
-
"http://foo.com/bar/baz/jquery.min.js",
|
|
158
|
-
{ extended: true, globstar: globstar, flags: 'g' });
|
|
159
|
-
|
|
160
|
-
// Remaining special chars should still match themselves
|
|
161
|
-
// Test string "\\\\/$^+.()=!|,.*" represents <glob>\\/$^+.()=!|,.*</glob>
|
|
162
|
-
// The equivalent regex is: /^\\\/\$\^\+\.\(\)\=\!\|\,\..*$/
|
|
163
|
-
// Both glob and regex match: \/$^+.()=!|,.*
|
|
164
|
-
var testExtStr = "\\\\/$^+.()=!|,.*";
|
|
165
|
-
var targetExtStr = "\\/$^+.()=!|,.*";
|
|
166
|
-
assertMatch(testExtStr, targetExtStr, { extended: true });
|
|
167
|
-
assertMatch(testExtStr, targetExtStr, { extended: true, globstar: globstar, flags: 'g' });
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
// regression
|
|
171
|
-
// globstar false
|
|
172
|
-
test(false)
|
|
173
|
-
// globstar true
|
|
174
|
-
test(true);
|
|
175
|
-
|
|
176
|
-
// globstar specific tests
|
|
177
|
-
assertMatch("/foo/*", "/foo/bar.txt", {globstar: true });
|
|
178
|
-
assertMatch("/foo/**", "/foo/baz.txt", {globstar: true });
|
|
179
|
-
assertMatch("/foo/**", "/foo/bar/baz.txt", {globstar: true });
|
|
180
|
-
assertMatch("/foo/*/*.txt", "/foo/bar/baz.txt", {globstar: true });
|
|
181
|
-
assertMatch("/foo/**/*.txt", "/foo/bar/baz.txt", {globstar: true });
|
|
182
|
-
assertMatch("/foo/**/*.txt", "/foo/bar/baz/qux.txt", {globstar: true });
|
|
183
|
-
assertMatch("/foo/**/bar.txt", "/foo/bar.txt", {globstar: true });
|
|
184
|
-
assertMatch("/foo/**/**/bar.txt", "/foo/bar.txt", {globstar: true });
|
|
185
|
-
assertMatch("/foo/**/*/baz.txt", "/foo/bar/baz.txt", {globstar: true });
|
|
186
|
-
assertMatch("/foo/**/*.txt", "/foo/bar.txt", {globstar: true });
|
|
187
|
-
assertMatch("/foo/**/**/*.txt", "/foo/bar.txt", {globstar: true });
|
|
188
|
-
assertMatch("/foo/**/*/*.txt", "/foo/bar/baz.txt", {globstar: true });
|
|
189
|
-
assertMatch("**/*.txt", "/foo/bar/baz/qux.txt", {globstar: true });
|
|
190
|
-
assertMatch("**/foo.txt", "foo.txt", {globstar: true });
|
|
191
|
-
assertMatch("**/*.txt", "foo.txt", {globstar: true });
|
|
192
|
-
|
|
193
|
-
assertNotMatch("/foo/*", "/foo/bar/baz.txt", {globstar: true });
|
|
194
|
-
assertNotMatch("/foo/*.txt", "/foo/bar/baz.txt", {globstar: true });
|
|
195
|
-
assertNotMatch("/foo/*/*.txt", "/foo/bar/baz/qux.txt", {globstar: true });
|
|
196
|
-
assertNotMatch("/foo/*/bar.txt", "/foo/bar.txt", {globstar: true });
|
|
197
|
-
assertNotMatch("/foo/*/*/baz.txt", "/foo/bar/baz.txt", {globstar: true });
|
|
198
|
-
assertNotMatch("/foo/**.txt", "/foo/bar/baz/qux.txt", {globstar: true });
|
|
199
|
-
assertNotMatch("/foo/bar**/*.txt", "/foo/bar/baz/qux.txt", {globstar: true });
|
|
200
|
-
assertNotMatch("/foo/bar**", "/foo/bar/baz.txt", {globstar: true });
|
|
201
|
-
assertNotMatch("**/.txt", "/foo/bar/baz/qux.txt", {globstar: true });
|
|
202
|
-
assertNotMatch("*/*.txt", "/foo/bar/baz/qux.txt", {globstar: true });
|
|
203
|
-
assertNotMatch("*/*.txt", "foo.txt", {globstar: true });
|
|
204
|
-
|
|
205
|
-
assertNotMatch("http://foo.com/*",
|
|
206
|
-
"http://foo.com/bar/baz/jquery.min.js",
|
|
207
|
-
{ extended: true, globstar: true });
|
|
208
|
-
assertNotMatch("http://foo.com/*",
|
|
209
|
-
"http://foo.com/bar/baz/jquery.min.js",
|
|
210
|
-
{ globstar: true });
|
|
211
|
-
|
|
212
|
-
assertMatch("http://foo.com/*",
|
|
213
|
-
"http://foo.com/bar/baz/jquery.min.js",
|
|
214
|
-
{ globstar: false });
|
|
215
|
-
assertMatch("http://foo.com/**",
|
|
216
|
-
"http://foo.com/bar/baz/jquery.min.js",
|
|
217
|
-
{ globstar: true });
|
|
218
|
-
|
|
219
|
-
assertMatch("http://foo.com/*/*/jquery.min.js",
|
|
220
|
-
"http://foo.com/bar/baz/jquery.min.js",
|
|
221
|
-
{ globstar: true });
|
|
222
|
-
assertMatch("http://foo.com/**/jquery.min.js",
|
|
223
|
-
"http://foo.com/bar/baz/jquery.min.js",
|
|
224
|
-
{ globstar: true });
|
|
225
|
-
assertMatch("http://foo.com/*/*/jquery.min.js",
|
|
226
|
-
"http://foo.com/bar/baz/jquery.min.js",
|
|
227
|
-
{ globstar: false });
|
|
228
|
-
assertMatch("http://foo.com/*/jquery.min.js",
|
|
229
|
-
"http://foo.com/bar/baz/jquery.min.js",
|
|
230
|
-
{ globstar: false });
|
|
231
|
-
assertNotMatch("http://foo.com/*/jquery.min.js",
|
|
232
|
-
"http://foo.com/bar/baz/jquery.min.js",
|
|
233
|
-
{ globstar: true });
|
|
234
|
-
|
|
235
|
-
console.log("Ok!");
|
|
File without changes
|