@gradientedge/cdk-utils 4.4.3 → 4.4.7

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.
Files changed (205) hide show
  1. package/app/api-destined-function/node_modules/.yarn-integrity +2 -89
  2. package/app/api-destined-function/package.json +1 -5
  3. package/lerna.json +6 -0
  4. package/package.json +9 -9
  5. package/api-docs/AcmManager.html +0 -622
  6. package/api-docs/AcmProps.html +0 -238
  7. package/api-docs/AlarmProps.html +0 -238
  8. package/api-docs/AlarmStatusWidgetProps.html +0 -238
  9. package/api-docs/ApiDestinationEvent.html +0 -297
  10. package/api-docs/ApiDestinationEventType.html +0 -238
  11. package/api-docs/ApiDestinedLambda.html +0 -297
  12. package/api-docs/ApiDestinedLambdaEnvironment.html +0 -238
  13. package/api-docs/ApiDestinedLambdaType.html +0 -238
  14. package/api-docs/ApiDestinedRestApi.html +0 -297
  15. package/api-docs/ApiDestinedRestApiType.html +0 -238
  16. package/api-docs/ApiManager.html +0 -766
  17. package/api-docs/ApiToEventBridgeTarget.html +0 -1877
  18. package/api-docs/ApiToEventBridgeTarget.jpg +0 -0
  19. package/api-docs/ApiToEventBridgeTargetEventProps.html +0 -238
  20. package/api-docs/ApiToEventBridgeTargetLambdaProps.html +0 -238
  21. package/api-docs/ApiToEventBridgeTargetProps.html +0 -238
  22. package/api-docs/ApiToEventBridgeTargetRestApiProps.html +0 -238
  23. package/api-docs/AppConfigManager.html +0 -1203
  24. package/api-docs/AppConfigProps.html +0 -238
  25. package/api-docs/CloudFrontManager.html +0 -2402
  26. package/api-docs/CloudFrontProps.html +0 -238
  27. package/api-docs/CloudTrailManager.html +0 -637
  28. package/api-docs/CloudTrailProps.html +0 -238
  29. package/api-docs/CloudWatchManager.html +0 -2986
  30. package/api-docs/CloudfrontFunctionProps.html +0 -238
  31. package/api-docs/CodeBuildManager.html +0 -736
  32. package/api-docs/CommonConstruct.html +0 -1299
  33. package/api-docs/CommonStack.html +0 -813
  34. package/api-docs/CommonStackProps.html +0 -238
  35. package/api-docs/DashboardProps.html +0 -238
  36. package/api-docs/DistributionProps.html +0 -238
  37. package/api-docs/DynamodbManager.html +0 -530
  38. package/api-docs/EcrManager.html +0 -530
  39. package/api-docs/EcsClusterProps.html +0 -238
  40. package/api-docs/EcsManager.html +0 -880
  41. package/api-docs/EcsTaskProps.html +0 -238
  42. package/api-docs/EksClusterProps.html +0 -238
  43. package/api-docs/EksManager.html +0 -580
  44. package/api-docs/EventBusProps.html +0 -238
  45. package/api-docs/EventManager.html +0 -1454
  46. package/api-docs/EventRuleProps.html +0 -238
  47. package/api-docs/GraphQLApiLambda.html +0 -1671
  48. package/api-docs/GraphQLApiLambda.jpg +0 -0
  49. package/api-docs/GraphQlApiLambdaEnvironment.html +0 -238
  50. package/api-docs/GraphQlApiLambdaProps.html +0 -238
  51. package/api-docs/GraphWidgetProps.html +0 -238
  52. package/api-docs/HealthCheck.html +0 -238
  53. package/api-docs/IamManager.html +0 -3821
  54. package/api-docs/LambdaEdgeProps.html +0 -238
  55. package/api-docs/LambdaEnvironment.html +0 -238
  56. package/api-docs/LambdaManager.html +0 -2378
  57. package/api-docs/LambdaProps.html +0 -238
  58. package/api-docs/LifecycleRule.html +0 -238
  59. package/api-docs/LogManager.html +0 -955
  60. package/api-docs/LogProps.html +0 -238
  61. package/api-docs/LogQueryWidgetProps.html +0 -238
  62. package/api-docs/MetricFilterProps.html +0 -238
  63. package/api-docs/MetricProps.html +0 -238
  64. package/api-docs/NumericWidgetProps.html +0 -238
  65. package/api-docs/Route53Manager.html +0 -1460
  66. package/api-docs/Route53Props.html +0 -238
  67. package/api-docs/RuleProps.html +0 -238
  68. package/api-docs/S3BucketProps.html +0 -238
  69. package/api-docs/S3Manager.html +0 -1546
  70. package/api-docs/SSMParameterReader.html +0 -431
  71. package/api-docs/SSMParameterReaderProps.html +0 -238
  72. package/api-docs/SecretsManager.html +0 -1140
  73. package/api-docs/SiteWithEcsBackend.html +0 -2391
  74. package/api-docs/SiteWithEcsBackendProps.html +0 -238
  75. package/api-docs/SnsManager.html +0 -780
  76. package/api-docs/SsmManager.html +0 -955
  77. package/api-docs/StaticSite.html +0 -1358
  78. package/api-docs/StaticSiteProps.html +0 -238
  79. package/api-docs/SubscriptionProps.html +0 -238
  80. package/api-docs/TableProps.html +0 -238
  81. package/api-docs/TextWidgetProps.html +0 -238
  82. package/api-docs/VpcManager.html +0 -986
  83. package/api-docs/WafIPSetProps.html +0 -238
  84. package/api-docs/WafManager.html +0 -730
  85. package/api-docs/WafWebACLProps.html +0 -238
  86. package/api-docs/common_construct.ts.html +0 -279
  87. package/api-docs/common_stack.ts.html +0 -303
  88. package/api-docs/construct_api-to-eventbridge-target_api-destination-event.ts.html +0 -175
  89. package/api-docs/construct_api-to-eventbridge-target_api-destined-lambda.ts.html +0 -178
  90. package/api-docs/construct_api-to-eventbridge-target_api-destined-rest-api.ts.html +0 -190
  91. package/api-docs/construct_api-to-eventbridge-target_main.ts.html +0 -751
  92. package/api-docs/construct_graphql-api-lambda_main.ts.html +0 -408
  93. package/api-docs/construct_site-with-ecs-backend_main.ts.html +0 -544
  94. package/api-docs/construct_static-site_main.ts.html +0 -374
  95. package/api-docs/global.html +0 -1530
  96. package/api-docs/index.html +0 -208
  97. package/api-docs/logo.png +0 -0
  98. package/api-docs/manager_aws_acm-manager.ts.html +0 -236
  99. package/api-docs/manager_aws_api-manager.ts.html +0 -260
  100. package/api-docs/manager_aws_app-config-manager.ts.html +0 -310
  101. package/api-docs/manager_aws_cloudfront-manager.ts.html +0 -491
  102. package/api-docs/manager_aws_cloudtrail-manager.ts.html +0 -251
  103. package/api-docs/manager_aws_cloudwatch-manager.ts.html +0 -553
  104. package/api-docs/manager_aws_codebuild-manager.ts.html +0 -240
  105. package/api-docs/manager_aws_dynamodb-manager.ts.html +0 -219
  106. package/api-docs/manager_aws_ecr-manager.ts.html +0 -199
  107. package/api-docs/manager_aws_ecs-manager.ts.html +0 -259
  108. package/api-docs/manager_aws_eks-manager.ts.html +0 -260
  109. package/api-docs/manager_aws_event-manager.ts.html +0 -336
  110. package/api-docs/manager_aws_iam-manager.ts.html +0 -573
  111. package/api-docs/manager_aws_lambda-manager.ts.html +0 -400
  112. package/api-docs/manager_aws_log-manager.ts.html +0 -259
  113. package/api-docs/manager_aws_route53-manager.ts.html +0 -333
  114. package/api-docs/manager_aws_s3-manager.ts.html +0 -361
  115. package/api-docs/manager_aws_secrets-manager.ts.html +0 -274
  116. package/api-docs/manager_aws_sns-manager.ts.html +0 -246
  117. package/api-docs/manager_aws_ssm-manager.ts.html +0 -273
  118. package/api-docs/manager_aws_vpc-manager.ts.html +0 -244
  119. package/api-docs/manager_aws_waf-manager.ts.html +0 -232
  120. package/api-docs/scripts/app.min.js +0 -1
  121. package/api-docs/scripts/linenumber.js +0 -26
  122. package/api-docs/scripts/search.js +0 -39
  123. package/api-docs/styles/app.min.css +0 -1
  124. package/api-docs/styles/iframe.css +0 -13
  125. package/api-docs/styles/prettify-jsdoc.css +0 -111
  126. package/api-docs/styles/prettify-tomorrow.css +0 -132
  127. package/api-docs/styles/reset.css +0 -44
  128. package/api-docs/styles.css +0 -113
  129. package/api-docs/tutorial-Architecture.html +0 -151
  130. package/api-docs/tutorial-Build.html +0 -150
  131. package/api-docs/tutorial-CI-CD.html +0 -154
  132. package/api-docs/tutorial-Development.html +0 -227
  133. package/api-docs/types_aws_index.ts.html +0 -665
  134. package/api-docs/utils_aws_index.ts.html +0 -192
  135. package/api-docs/utils_index.ts.html +0 -227
  136. package/app/api-destined-function/node_modules/balanced-match/LICENSE.md +0 -21
  137. package/app/api-destined-function/node_modules/balanced-match/README.md +0 -97
  138. package/app/api-destined-function/node_modules/balanced-match/index.js +0 -62
  139. package/app/api-destined-function/node_modules/balanced-match/package.json +0 -48
  140. package/app/api-destined-function/node_modules/brace-expansion/LICENSE +0 -21
  141. package/app/api-destined-function/node_modules/brace-expansion/README.md +0 -129
  142. package/app/api-destined-function/node_modules/brace-expansion/index.js +0 -201
  143. package/app/api-destined-function/node_modules/brace-expansion/package.json +0 -47
  144. package/app/api-destined-function/node_modules/concat-map/.travis.yml +0 -4
  145. package/app/api-destined-function/node_modules/concat-map/LICENSE +0 -18
  146. package/app/api-destined-function/node_modules/concat-map/README.markdown +0 -62
  147. package/app/api-destined-function/node_modules/concat-map/example/map.js +0 -6
  148. package/app/api-destined-function/node_modules/concat-map/index.js +0 -13
  149. package/app/api-destined-function/node_modules/concat-map/package.json +0 -43
  150. package/app/api-destined-function/node_modules/fs.realpath/LICENSE +0 -43
  151. package/app/api-destined-function/node_modules/fs.realpath/README.md +0 -33
  152. package/app/api-destined-function/node_modules/fs.realpath/index.js +0 -66
  153. package/app/api-destined-function/node_modules/fs.realpath/old.js +0 -303
  154. package/app/api-destined-function/node_modules/fs.realpath/package.json +0 -26
  155. package/app/api-destined-function/node_modules/glob/LICENSE +0 -21
  156. package/app/api-destined-function/node_modules/glob/README.md +0 -378
  157. package/app/api-destined-function/node_modules/glob/common.js +0 -236
  158. package/app/api-destined-function/node_modules/glob/glob.js +0 -787
  159. package/app/api-destined-function/node_modules/glob/package.json +0 -52
  160. package/app/api-destined-function/node_modules/glob/sync.js +0 -483
  161. package/app/api-destined-function/node_modules/inflight/LICENSE +0 -15
  162. package/app/api-destined-function/node_modules/inflight/README.md +0 -37
  163. package/app/api-destined-function/node_modules/inflight/inflight.js +0 -54
  164. package/app/api-destined-function/node_modules/inflight/package.json +0 -29
  165. package/app/api-destined-function/node_modules/inherits/LICENSE +0 -16
  166. package/app/api-destined-function/node_modules/inherits/README.md +0 -42
  167. package/app/api-destined-function/node_modules/inherits/inherits.js +0 -9
  168. package/app/api-destined-function/node_modules/inherits/inherits_browser.js +0 -27
  169. package/app/api-destined-function/node_modules/inherits/package.json +0 -29
  170. package/app/api-destined-function/node_modules/minimatch/LICENSE +0 -15
  171. package/app/api-destined-function/node_modules/minimatch/README.md +0 -209
  172. package/app/api-destined-function/node_modules/minimatch/minimatch.js +0 -923
  173. package/app/api-destined-function/node_modules/minimatch/package.json +0 -30
  174. package/app/api-destined-function/node_modules/mkdirp/LICENSE +0 -21
  175. package/app/api-destined-function/node_modules/mkdirp/bin/cmd.js +0 -68
  176. package/app/api-destined-function/node_modules/mkdirp/index.js +0 -31
  177. package/app/api-destined-function/node_modules/mkdirp/lib/find-made.js +0 -29
  178. package/app/api-destined-function/node_modules/mkdirp/lib/mkdirp-manual.js +0 -64
  179. package/app/api-destined-function/node_modules/mkdirp/lib/mkdirp-native.js +0 -39
  180. package/app/api-destined-function/node_modules/mkdirp/lib/opts-arg.js +0 -23
  181. package/app/api-destined-function/node_modules/mkdirp/lib/path-arg.js +0 -29
  182. package/app/api-destined-function/node_modules/mkdirp/lib/use-native.js +0 -10
  183. package/app/api-destined-function/node_modules/mkdirp/package.json +0 -44
  184. package/app/api-destined-function/node_modules/mkdirp/readme.markdown +0 -266
  185. package/app/api-destined-function/node_modules/once/LICENSE +0 -15
  186. package/app/api-destined-function/node_modules/once/README.md +0 -79
  187. package/app/api-destined-function/node_modules/once/once.js +0 -42
  188. package/app/api-destined-function/node_modules/once/package.json +0 -33
  189. package/app/api-destined-function/node_modules/path-is-absolute/index.js +0 -20
  190. package/app/api-destined-function/node_modules/path-is-absolute/license +0 -21
  191. package/app/api-destined-function/node_modules/path-is-absolute/package.json +0 -43
  192. package/app/api-destined-function/node_modules/path-is-absolute/readme.md +0 -59
  193. package/app/api-destined-function/node_modules/rimraf/LICENSE +0 -15
  194. package/app/api-destined-function/node_modules/rimraf/README.md +0 -101
  195. package/app/api-destined-function/node_modules/rimraf/bin.js +0 -68
  196. package/app/api-destined-function/node_modules/rimraf/package.json +0 -32
  197. package/app/api-destined-function/node_modules/rimraf/rimraf.js +0 -360
  198. package/app/api-destined-function/node_modules/wrappy/LICENSE +0 -15
  199. package/app/api-destined-function/node_modules/wrappy/README.md +0 -36
  200. package/app/api-destined-function/node_modules/wrappy/package.json +0 -29
  201. package/app/api-destined-function/node_modules/wrappy/wrappy.js +0 -33
  202. package/img/ApiToEventBridgeTarget.jpg +0 -0
  203. package/img/GraphQLApiLambda.jpg +0 -0
  204. package/img/logo.png +0 -0
  205. package/theme/styles.css +0 -113
@@ -1,52 +0,0 @@
1
- {
2
- "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
3
- "name": "glob",
4
- "description": "a little globber",
5
- "version": "7.2.0",
6
- "repository": {
7
- "type": "git",
8
- "url": "git://github.com/isaacs/node-glob.git"
9
- },
10
- "main": "glob.js",
11
- "files": [
12
- "glob.js",
13
- "sync.js",
14
- "common.js"
15
- ],
16
- "engines": {
17
- "node": "*"
18
- },
19
- "dependencies": {
20
- "fs.realpath": "^1.0.0",
21
- "inflight": "^1.0.4",
22
- "inherits": "2",
23
- "minimatch": "^3.0.4",
24
- "once": "^1.3.0",
25
- "path-is-absolute": "^1.0.0"
26
- },
27
- "devDependencies": {
28
- "memfs": "^3.2.0",
29
- "mkdirp": "0",
30
- "rimraf": "^2.2.8",
31
- "tap": "^15.0.6",
32
- "tick": "0.0.6"
33
- },
34
- "tap": {
35
- "before": "test/00-setup.js",
36
- "after": "test/zz-cleanup.js",
37
- "jobs": 1
38
- },
39
- "scripts": {
40
- "prepublish": "npm run benchclean",
41
- "profclean": "rm -f v8.log profile.txt",
42
- "test": "tap",
43
- "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js",
44
- "bench": "bash benchmark.sh",
45
- "prof": "bash prof.sh && cat profile.txt",
46
- "benchclean": "node benchclean.js"
47
- },
48
- "license": "ISC",
49
- "funding": {
50
- "url": "https://github.com/sponsors/isaacs"
51
- }
52
- }
@@ -1,483 +0,0 @@
1
- module.exports = globSync
2
- globSync.GlobSync = GlobSync
3
-
4
- var rp = require('fs.realpath')
5
- var minimatch = require('minimatch')
6
- var Minimatch = minimatch.Minimatch
7
- var Glob = require('./glob.js').Glob
8
- var util = require('util')
9
- var path = require('path')
10
- var assert = require('assert')
11
- var isAbsolute = require('path-is-absolute')
12
- var common = require('./common.js')
13
- var setopts = common.setopts
14
- var ownProp = common.ownProp
15
- var childrenIgnored = common.childrenIgnored
16
- var isIgnored = common.isIgnored
17
-
18
- function globSync (pattern, options) {
19
- if (typeof options === 'function' || arguments.length === 3)
20
- throw new TypeError('callback provided to sync glob\n'+
21
- 'See: https://github.com/isaacs/node-glob/issues/167')
22
-
23
- return new GlobSync(pattern, options).found
24
- }
25
-
26
- function GlobSync (pattern, options) {
27
- if (!pattern)
28
- throw new Error('must provide pattern')
29
-
30
- if (typeof options === 'function' || arguments.length === 3)
31
- throw new TypeError('callback provided to sync glob\n'+
32
- 'See: https://github.com/isaacs/node-glob/issues/167')
33
-
34
- if (!(this instanceof GlobSync))
35
- return new GlobSync(pattern, options)
36
-
37
- setopts(this, pattern, options)
38
-
39
- if (this.noprocess)
40
- return this
41
-
42
- var n = this.minimatch.set.length
43
- this.matches = new Array(n)
44
- for (var i = 0; i < n; i ++) {
45
- this._process(this.minimatch.set[i], i, false)
46
- }
47
- this._finish()
48
- }
49
-
50
- GlobSync.prototype._finish = function () {
51
- assert(this instanceof GlobSync)
52
- if (this.realpath) {
53
- var self = this
54
- this.matches.forEach(function (matchset, index) {
55
- var set = self.matches[index] = Object.create(null)
56
- for (var p in matchset) {
57
- try {
58
- p = self._makeAbs(p)
59
- var real = rp.realpathSync(p, self.realpathCache)
60
- set[real] = true
61
- } catch (er) {
62
- if (er.syscall === 'stat')
63
- set[self._makeAbs(p)] = true
64
- else
65
- throw er
66
- }
67
- }
68
- })
69
- }
70
- common.finish(this)
71
- }
72
-
73
-
74
- GlobSync.prototype._process = function (pattern, index, inGlobStar) {
75
- assert(this instanceof GlobSync)
76
-
77
- // Get the first [n] parts of pattern that are all strings.
78
- var n = 0
79
- while (typeof pattern[n] === 'string') {
80
- n ++
81
- }
82
- // now n is the index of the first one that is *not* a string.
83
-
84
- // See if there's anything else
85
- var prefix
86
- switch (n) {
87
- // if not, then this is rather simple
88
- case pattern.length:
89
- this._processSimple(pattern.join('/'), index)
90
- return
91
-
92
- case 0:
93
- // pattern *starts* with some non-trivial item.
94
- // going to readdir(cwd), but not include the prefix in matches.
95
- prefix = null
96
- break
97
-
98
- default:
99
- // pattern has some string bits in the front.
100
- // whatever it starts with, whether that's 'absolute' like /foo/bar,
101
- // or 'relative' like '../baz'
102
- prefix = pattern.slice(0, n).join('/')
103
- break
104
- }
105
-
106
- var remain = pattern.slice(n)
107
-
108
- // get the list of entries.
109
- var read
110
- if (prefix === null)
111
- read = '.'
112
- else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {
113
- if (!prefix || !isAbsolute(prefix))
114
- prefix = '/' + prefix
115
- read = prefix
116
- } else
117
- read = prefix
118
-
119
- var abs = this._makeAbs(read)
120
-
121
- //if ignored, skip processing
122
- if (childrenIgnored(this, read))
123
- return
124
-
125
- var isGlobStar = remain[0] === minimatch.GLOBSTAR
126
- if (isGlobStar)
127
- this._processGlobStar(prefix, read, abs, remain, index, inGlobStar)
128
- else
129
- this._processReaddir(prefix, read, abs, remain, index, inGlobStar)
130
- }
131
-
132
-
133
- GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) {
134
- var entries = this._readdir(abs, inGlobStar)
135
-
136
- // if the abs isn't a dir, then nothing can match!
137
- if (!entries)
138
- return
139
-
140
- // It will only match dot entries if it starts with a dot, or if
141
- // dot is set. Stuff like @(.foo|.bar) isn't allowed.
142
- var pn = remain[0]
143
- var negate = !!this.minimatch.negate
144
- var rawGlob = pn._glob
145
- var dotOk = this.dot || rawGlob.charAt(0) === '.'
146
-
147
- var matchedEntries = []
148
- for (var i = 0; i < entries.length; i++) {
149
- var e = entries[i]
150
- if (e.charAt(0) !== '.' || dotOk) {
151
- var m
152
- if (negate && !prefix) {
153
- m = !e.match(pn)
154
- } else {
155
- m = e.match(pn)
156
- }
157
- if (m)
158
- matchedEntries.push(e)
159
- }
160
- }
161
-
162
- var len = matchedEntries.length
163
- // If there are no matched entries, then nothing matches.
164
- if (len === 0)
165
- return
166
-
167
- // if this is the last remaining pattern bit, then no need for
168
- // an additional stat *unless* the user has specified mark or
169
- // stat explicitly. We know they exist, since readdir returned
170
- // them.
171
-
172
- if (remain.length === 1 && !this.mark && !this.stat) {
173
- if (!this.matches[index])
174
- this.matches[index] = Object.create(null)
175
-
176
- for (var i = 0; i < len; i ++) {
177
- var e = matchedEntries[i]
178
- if (prefix) {
179
- if (prefix.slice(-1) !== '/')
180
- e = prefix + '/' + e
181
- else
182
- e = prefix + e
183
- }
184
-
185
- if (e.charAt(0) === '/' && !this.nomount) {
186
- e = path.join(this.root, e)
187
- }
188
- this._emitMatch(index, e)
189
- }
190
- // This was the last one, and no stats were needed
191
- return
192
- }
193
-
194
- // now test all matched entries as stand-ins for that part
195
- // of the pattern.
196
- remain.shift()
197
- for (var i = 0; i < len; i ++) {
198
- var e = matchedEntries[i]
199
- var newPattern
200
- if (prefix)
201
- newPattern = [prefix, e]
202
- else
203
- newPattern = [e]
204
- this._process(newPattern.concat(remain), index, inGlobStar)
205
- }
206
- }
207
-
208
-
209
- GlobSync.prototype._emitMatch = function (index, e) {
210
- if (isIgnored(this, e))
211
- return
212
-
213
- var abs = this._makeAbs(e)
214
-
215
- if (this.mark)
216
- e = this._mark(e)
217
-
218
- if (this.absolute) {
219
- e = abs
220
- }
221
-
222
- if (this.matches[index][e])
223
- return
224
-
225
- if (this.nodir) {
226
- var c = this.cache[abs]
227
- if (c === 'DIR' || Array.isArray(c))
228
- return
229
- }
230
-
231
- this.matches[index][e] = true
232
-
233
- if (this.stat)
234
- this._stat(e)
235
- }
236
-
237
-
238
- GlobSync.prototype._readdirInGlobStar = function (abs) {
239
- // follow all symlinked directories forever
240
- // just proceed as if this is a non-globstar situation
241
- if (this.follow)
242
- return this._readdir(abs, false)
243
-
244
- var entries
245
- var lstat
246
- var stat
247
- try {
248
- lstat = this.fs.lstatSync(abs)
249
- } catch (er) {
250
- if (er.code === 'ENOENT') {
251
- // lstat failed, doesn't exist
252
- return null
253
- }
254
- }
255
-
256
- var isSym = lstat && lstat.isSymbolicLink()
257
- this.symlinks[abs] = isSym
258
-
259
- // If it's not a symlink or a dir, then it's definitely a regular file.
260
- // don't bother doing a readdir in that case.
261
- if (!isSym && lstat && !lstat.isDirectory())
262
- this.cache[abs] = 'FILE'
263
- else
264
- entries = this._readdir(abs, false)
265
-
266
- return entries
267
- }
268
-
269
- GlobSync.prototype._readdir = function (abs, inGlobStar) {
270
- var entries
271
-
272
- if (inGlobStar && !ownProp(this.symlinks, abs))
273
- return this._readdirInGlobStar(abs)
274
-
275
- if (ownProp(this.cache, abs)) {
276
- var c = this.cache[abs]
277
- if (!c || c === 'FILE')
278
- return null
279
-
280
- if (Array.isArray(c))
281
- return c
282
- }
283
-
284
- try {
285
- return this._readdirEntries(abs, this.fs.readdirSync(abs))
286
- } catch (er) {
287
- this._readdirError(abs, er)
288
- return null
289
- }
290
- }
291
-
292
- GlobSync.prototype._readdirEntries = function (abs, entries) {
293
- // if we haven't asked to stat everything, then just
294
- // assume that everything in there exists, so we can avoid
295
- // having to stat it a second time.
296
- if (!this.mark && !this.stat) {
297
- for (var i = 0; i < entries.length; i ++) {
298
- var e = entries[i]
299
- if (abs === '/')
300
- e = abs + e
301
- else
302
- e = abs + '/' + e
303
- this.cache[e] = true
304
- }
305
- }
306
-
307
- this.cache[abs] = entries
308
-
309
- // mark and cache dir-ness
310
- return entries
311
- }
312
-
313
- GlobSync.prototype._readdirError = function (f, er) {
314
- // handle errors, and cache the information
315
- switch (er.code) {
316
- case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205
317
- case 'ENOTDIR': // totally normal. means it *does* exist.
318
- var abs = this._makeAbs(f)
319
- this.cache[abs] = 'FILE'
320
- if (abs === this.cwdAbs) {
321
- var error = new Error(er.code + ' invalid cwd ' + this.cwd)
322
- error.path = this.cwd
323
- error.code = er.code
324
- throw error
325
- }
326
- break
327
-
328
- case 'ENOENT': // not terribly unusual
329
- case 'ELOOP':
330
- case 'ENAMETOOLONG':
331
- case 'UNKNOWN':
332
- this.cache[this._makeAbs(f)] = false
333
- break
334
-
335
- default: // some unusual error. Treat as failure.
336
- this.cache[this._makeAbs(f)] = false
337
- if (this.strict)
338
- throw er
339
- if (!this.silent)
340
- console.error('glob error', er)
341
- break
342
- }
343
- }
344
-
345
- GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) {
346
-
347
- var entries = this._readdir(abs, inGlobStar)
348
-
349
- // no entries means not a dir, so it can never have matches
350
- // foo.txt/** doesn't match foo.txt
351
- if (!entries)
352
- return
353
-
354
- // test without the globstar, and with every child both below
355
- // and replacing the globstar.
356
- var remainWithoutGlobStar = remain.slice(1)
357
- var gspref = prefix ? [ prefix ] : []
358
- var noGlobStar = gspref.concat(remainWithoutGlobStar)
359
-
360
- // the noGlobStar pattern exits the inGlobStar state
361
- this._process(noGlobStar, index, false)
362
-
363
- var len = entries.length
364
- var isSym = this.symlinks[abs]
365
-
366
- // If it's a symlink, and we're in a globstar, then stop
367
- if (isSym && inGlobStar)
368
- return
369
-
370
- for (var i = 0; i < len; i++) {
371
- var e = entries[i]
372
- if (e.charAt(0) === '.' && !this.dot)
373
- continue
374
-
375
- // these two cases enter the inGlobStar state
376
- var instead = gspref.concat(entries[i], remainWithoutGlobStar)
377
- this._process(instead, index, true)
378
-
379
- var below = gspref.concat(entries[i], remain)
380
- this._process(below, index, true)
381
- }
382
- }
383
-
384
- GlobSync.prototype._processSimple = function (prefix, index) {
385
- // XXX review this. Shouldn't it be doing the mounting etc
386
- // before doing stat? kinda weird?
387
- var exists = this._stat(prefix)
388
-
389
- if (!this.matches[index])
390
- this.matches[index] = Object.create(null)
391
-
392
- // If it doesn't exist, then just mark the lack of results
393
- if (!exists)
394
- return
395
-
396
- if (prefix && isAbsolute(prefix) && !this.nomount) {
397
- var trail = /[\/\\]$/.test(prefix)
398
- if (prefix.charAt(0) === '/') {
399
- prefix = path.join(this.root, prefix)
400
- } else {
401
- prefix = path.resolve(this.root, prefix)
402
- if (trail)
403
- prefix += '/'
404
- }
405
- }
406
-
407
- if (process.platform === 'win32')
408
- prefix = prefix.replace(/\\/g, '/')
409
-
410
- // Mark this as a match
411
- this._emitMatch(index, prefix)
412
- }
413
-
414
- // Returns either 'DIR', 'FILE', or false
415
- GlobSync.prototype._stat = function (f) {
416
- var abs = this._makeAbs(f)
417
- var needDir = f.slice(-1) === '/'
418
-
419
- if (f.length > this.maxLength)
420
- return false
421
-
422
- if (!this.stat && ownProp(this.cache, abs)) {
423
- var c = this.cache[abs]
424
-
425
- if (Array.isArray(c))
426
- c = 'DIR'
427
-
428
- // It exists, but maybe not how we need it
429
- if (!needDir || c === 'DIR')
430
- return c
431
-
432
- if (needDir && c === 'FILE')
433
- return false
434
-
435
- // otherwise we have to stat, because maybe c=true
436
- // if we know it exists, but not what it is.
437
- }
438
-
439
- var exists
440
- var stat = this.statCache[abs]
441
- if (!stat) {
442
- var lstat
443
- try {
444
- lstat = this.fs.lstatSync(abs)
445
- } catch (er) {
446
- if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {
447
- this.statCache[abs] = false
448
- return false
449
- }
450
- }
451
-
452
- if (lstat && lstat.isSymbolicLink()) {
453
- try {
454
- stat = this.fs.statSync(abs)
455
- } catch (er) {
456
- stat = lstat
457
- }
458
- } else {
459
- stat = lstat
460
- }
461
- }
462
-
463
- this.statCache[abs] = stat
464
-
465
- var c = true
466
- if (stat)
467
- c = stat.isDirectory() ? 'DIR' : 'FILE'
468
-
469
- this.cache[abs] = this.cache[abs] || c
470
-
471
- if (needDir && c === 'FILE')
472
- return false
473
-
474
- return c
475
- }
476
-
477
- GlobSync.prototype._mark = function (p) {
478
- return common.mark(this, p)
479
- }
480
-
481
- GlobSync.prototype._makeAbs = function (f) {
482
- return common.makeAbs(this, f)
483
- }
@@ -1,15 +0,0 @@
1
- The ISC License
2
-
3
- Copyright (c) Isaac Z. Schlueter
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted, provided that the above
7
- copyright notice and this permission notice appear in all copies.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
15
- IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -1,37 +0,0 @@
1
- # inflight
2
-
3
- Add callbacks to requests in flight to avoid async duplication
4
-
5
- ## USAGE
6
-
7
- ```javascript
8
- var inflight = require('inflight')
9
-
10
- // some request that does some stuff
11
- function req(key, callback) {
12
- // key is any random string. like a url or filename or whatever.
13
- //
14
- // will return either a falsey value, indicating that the
15
- // request for this key is already in flight, or a new callback
16
- // which when called will call all callbacks passed to inflightk
17
- // with the same key
18
- callback = inflight(key, callback)
19
-
20
- // If we got a falsey value back, then there's already a req going
21
- if (!callback) return
22
-
23
- // this is where you'd fetch the url or whatever
24
- // callback is also once()-ified, so it can safely be assigned
25
- // to multiple events etc. First call wins.
26
- setTimeout(function() {
27
- callback(null, key)
28
- }, 100)
29
- }
30
-
31
- // only assigns a single setTimeout
32
- // when it dings, all cbs get called
33
- req('foo', cb1)
34
- req('foo', cb2)
35
- req('foo', cb3)
36
- req('foo', cb4)
37
- ```
@@ -1,54 +0,0 @@
1
- var wrappy = require('wrappy')
2
- var reqs = Object.create(null)
3
- var once = require('once')
4
-
5
- module.exports = wrappy(inflight)
6
-
7
- function inflight (key, cb) {
8
- if (reqs[key]) {
9
- reqs[key].push(cb)
10
- return null
11
- } else {
12
- reqs[key] = [cb]
13
- return makeres(key)
14
- }
15
- }
16
-
17
- function makeres (key) {
18
- return once(function RES () {
19
- var cbs = reqs[key]
20
- var len = cbs.length
21
- var args = slice(arguments)
22
-
23
- // XXX It's somewhat ambiguous whether a new callback added in this
24
- // pass should be queued for later execution if something in the
25
- // list of callbacks throws, or if it should just be discarded.
26
- // However, it's such an edge case that it hardly matters, and either
27
- // choice is likely as surprising as the other.
28
- // As it happens, we do go ahead and schedule it for later execution.
29
- try {
30
- for (var i = 0; i < len; i++) {
31
- cbs[i].apply(null, args)
32
- }
33
- } finally {
34
- if (cbs.length > len) {
35
- // added more in the interim.
36
- // de-zalgo, just in case, but don't call again.
37
- cbs.splice(0, len)
38
- process.nextTick(function () {
39
- RES.apply(null, args)
40
- })
41
- } else {
42
- delete reqs[key]
43
- }
44
- }
45
- })
46
- }
47
-
48
- function slice (args) {
49
- var length = args.length
50
- var array = []
51
-
52
- for (var i = 0; i < length; i++) array[i] = args[i]
53
- return array
54
- }
@@ -1,29 +0,0 @@
1
- {
2
- "name": "inflight",
3
- "version": "1.0.6",
4
- "description": "Add callbacks to requests in flight to avoid async duplication",
5
- "main": "inflight.js",
6
- "files": [
7
- "inflight.js"
8
- ],
9
- "dependencies": {
10
- "once": "^1.3.0",
11
- "wrappy": "1"
12
- },
13
- "devDependencies": {
14
- "tap": "^7.1.2"
15
- },
16
- "scripts": {
17
- "test": "tap test.js --100"
18
- },
19
- "repository": {
20
- "type": "git",
21
- "url": "https://github.com/npm/inflight.git"
22
- },
23
- "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
24
- "bugs": {
25
- "url": "https://github.com/isaacs/inflight/issues"
26
- },
27
- "homepage": "https://github.com/isaacs/inflight",
28
- "license": "ISC"
29
- }
@@ -1,16 +0,0 @@
1
- The ISC License
2
-
3
- Copyright (c) Isaac Z. Schlueter
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted, provided that the above
7
- copyright notice and this permission notice appear in all copies.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
11
- FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
12
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
- PERFORMANCE OF THIS SOFTWARE.
16
-