@tanstack/router-vite-plugin 1.1.8

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 (156) hide show
  1. package/LICENSE +21 -0
  2. package/build/cjs/_virtual/_commonjsHelpers.js +16 -0
  3. package/build/cjs/_virtual/_commonjsHelpers.js.map +1 -0
  4. package/build/cjs/_virtual/index.js +16 -0
  5. package/build/cjs/_virtual/index.js.map +1 -0
  6. package/build/cjs/_virtual/make-dir.js +16 -0
  7. package/build/cjs/_virtual/make-dir.js.map +1 -0
  8. package/build/cjs/_virtual/utils.js +16 -0
  9. package/build/cjs/_virtual/utils.js.map +1 -0
  10. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/copy/copy-sync.js +188 -0
  11. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/copy/copy-sync.js.map +1 -0
  12. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/copy/copy.js +255 -0
  13. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/copy/copy.js.map +1 -0
  14. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/copy/index.js +24 -0
  15. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/copy/index.js.map +1 -0
  16. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/empty/index.js +59 -0
  17. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/empty/index.js.map +1 -0
  18. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/file.js +87 -0
  19. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/file.js.map +1 -0
  20. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/index.js +40 -0
  21. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/index.js.map +1 -0
  22. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/link.js +84 -0
  23. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/link.js.map +1 -0
  24. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/symlink-paths.js +116 -0
  25. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/symlink-paths.js.map +1 -0
  26. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/symlink-type.js +46 -0
  27. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/symlink-type.js.map +1 -0
  28. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/symlink.js +105 -0
  29. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/symlink.js.map +1 -0
  30. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/fs/index.js +146 -0
  31. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/fs/index.js.map +1 -0
  32. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/index.js +41 -0
  33. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/index.js.map +1 -0
  34. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/json/index.js +34 -0
  35. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/json/index.js.map +1 -0
  36. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/json/jsonfile.js +26 -0
  37. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/json/jsonfile.js.map +1 -0
  38. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/json/output-json-sync.js +28 -0
  39. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/json/output-json-sync.js.map +1 -0
  40. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/json/output-json.js +28 -0
  41. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/json/output-json.js.map +1 -0
  42. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/mkdirs/index.js +32 -0
  43. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/mkdirs/index.js.map +1 -0
  44. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/mkdirs/make-dir.js +49 -0
  45. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/mkdirs/make-dir.js.map +1 -0
  46. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/mkdirs/utils.js +35 -0
  47. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/mkdirs/utils.js.map +1 -0
  48. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/move/index.js +24 -0
  49. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/move/index.js.map +1 -0
  50. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/move/move-sync.js +74 -0
  51. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/move/move-sync.js.map +1 -0
  52. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/move/move.js +96 -0
  53. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/move/move.js.map +1 -0
  54. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/output-file/index.js +59 -0
  55. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/output-file/index.js.map +1 -0
  56. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/path-exists/index.js +30 -0
  57. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/path-exists/index.js.map +1 -0
  58. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/remove/index.js +39 -0
  59. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/remove/index.js.map +1 -0
  60. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/remove/rimraf.js +319 -0
  61. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/remove/rimraf.js.map +1 -0
  62. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/util/stat.js +172 -0
  63. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/util/stat.js.map +1 -0
  64. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/util/utimes.js +41 -0
  65. package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/util/utimes.js.map +1 -0
  66. package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/clone.js +36 -0
  67. package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/clone.js.map +1 -0
  68. package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/graceful-fs.js +469 -0
  69. package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/graceful-fs.js.map +1 -0
  70. package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/legacy-streams.js +135 -0
  71. package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/legacy-streams.js.map +1 -0
  72. package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/polyfills.js +372 -0
  73. package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/polyfills.js.map +1 -0
  74. package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js +45 -0
  75. package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js.map +1 -0
  76. package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js +479 -0
  77. package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js.map +1 -0
  78. package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js +143 -0
  79. package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js.map +1 -0
  80. package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js +380 -0
  81. package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js.map +1 -0
  82. package/build/cjs/node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/index.js +108 -0
  83. package/build/cjs/node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/index.js.map +1 -0
  84. package/build/cjs/node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js +29 -0
  85. package/build/cjs/node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js.map +1 -0
  86. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/doc.js +1286 -0
  87. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/doc.js.map +1 -0
  88. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/index.js +21292 -0
  89. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/index.js.map +1 -0
  90. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/internal/internal.js +6513 -0
  91. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/internal/internal.js.map +1 -0
  92. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/plugins/acorn.js +31 -0
  93. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/plugins/acorn.js.map +1 -0
  94. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/plugins/angular.js +20 -0
  95. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/plugins/angular.js.map +1 -0
  96. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/plugins/babel.js +34 -0
  97. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/plugins/babel.js.map +1 -0
  98. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/plugins/estree.js +55 -0
  99. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/plugins/estree.js.map +1 -0
  100. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/plugins/flow.js +39 -0
  101. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/plugins/flow.js.map +1 -0
  102. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/plugins/glimmer.js +50 -0
  103. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/plugins/glimmer.js.map +1 -0
  104. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/plugins/graphql.js +50 -0
  105. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/plugins/graphql.js.map +1 -0
  106. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/plugins/html.js +40 -0
  107. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/plugins/html.js.map +1 -0
  108. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/plugins/markdown.js +80 -0
  109. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/plugins/markdown.js.map +1 -0
  110. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/plugins/meriyah.js +23 -0
  111. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/plugins/meriyah.js.map +1 -0
  112. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/plugins/postcss.js +73 -0
  113. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/plugins/postcss.js.map +1 -0
  114. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/plugins/typescript.js +43 -0
  115. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/plugins/typescript.js.map +1 -0
  116. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/plugins/yaml.js +182 -0
  117. package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/plugins/yaml.js.map +1 -0
  118. package/build/cjs/node_modules/.pnpm/zod@3.21.4/node_modules/zod/lib/index.js +4071 -0
  119. package/build/cjs/node_modules/.pnpm/zod@3.21.4/node_modules/zod/lib/index.js.map +1 -0
  120. package/build/cjs/packages/router-cli/src/config.js +30 -0
  121. package/build/cjs/packages/router-cli/src/config.js.map +1 -0
  122. package/build/cjs/packages/router-cli/src/generator.js +291 -0
  123. package/build/cjs/packages/router-cli/src/generator.js.map +1 -0
  124. package/build/cjs/packages/router-vite-plugin/src/index.js +67 -0
  125. package/build/cjs/packages/router-vite-plugin/src/index.js.map +1 -0
  126. package/build/esm/acorn-cRrhQtA6.js +26 -0
  127. package/build/esm/acorn-cRrhQtA6.js.map +1 -0
  128. package/build/esm/angular-HROv_CFe.js +15 -0
  129. package/build/esm/angular-HROv_CFe.js.map +1 -0
  130. package/build/esm/babel-WUIEfgoi.js +29 -0
  131. package/build/esm/babel-WUIEfgoi.js.map +1 -0
  132. package/build/esm/estree-XSgQYP4a.js +48 -0
  133. package/build/esm/estree-XSgQYP4a.js.map +1 -0
  134. package/build/esm/flow-RpbLwlct.js +34 -0
  135. package/build/esm/flow-RpbLwlct.js.map +1 -0
  136. package/build/esm/glimmer-nYL0saZ4.js +43 -0
  137. package/build/esm/glimmer-nYL0saZ4.js.map +1 -0
  138. package/build/esm/graphql-w_qkTZIK.js +42 -0
  139. package/build/esm/graphql-w_qkTZIK.js.map +1 -0
  140. package/build/esm/html-4mPGSUFL.js +32 -0
  141. package/build/esm/html-4mPGSUFL.js.map +1 -0
  142. package/build/esm/index.js +33321 -0
  143. package/build/esm/index.js.map +1 -0
  144. package/build/esm/markdown-MvZ6UzH9.js +72 -0
  145. package/build/esm/markdown-MvZ6UzH9.js.map +1 -0
  146. package/build/esm/meriyah-kfEfGGMB.js +18 -0
  147. package/build/esm/meriyah-kfEfGGMB.js.map +1 -0
  148. package/build/esm/postcss-yu5rIF8w.js +65 -0
  149. package/build/esm/postcss-yu5rIF8w.js.map +1 -0
  150. package/build/esm/typescript-CETgxtB5.js +38 -0
  151. package/build/esm/typescript-CETgxtB5.js.map +1 -0
  152. package/build/esm/yaml-_aqeuMai.js +174 -0
  153. package/build/esm/yaml-_aqeuMai.js.map +1 -0
  154. package/build/types/index.d.ts +17 -0
  155. package/package.json +44 -0
  156. package/src/index.ts +58 -0
@@ -0,0 +1,479 @@
1
+ /**
2
+ * @tanstack/router-vite-plugin/src/index.ts
3
+ *
4
+ * Copyright (c) TanStack
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE.md file in the root directory of this source tree.
8
+ *
9
+ * @license MIT
10
+ */
11
+ 'use strict';
12
+
13
+ var _commonjsHelpers = require('../../../../../_virtual/_commonjsHelpers.js');
14
+ var require$$0 = require('fs');
15
+ var polyfills = require('./polyfills.js');
16
+ var legacyStreams = require('./legacy-streams.js');
17
+ var clone = require('./clone.js');
18
+ var require$$4 = require('util');
19
+ var assert4 = require('assert');
20
+
21
+ var gracefulFs;
22
+ var hasRequiredGracefulFs;
23
+
24
+ function requireGracefulFs () {
25
+ if (hasRequiredGracefulFs) return gracefulFs;
26
+ hasRequiredGracefulFs = 1;
27
+ var fs = require$$0;
28
+ var polyfills$1 = polyfills.__require();
29
+ var legacy = legacyStreams.__require();
30
+ var clone$1 = clone.__require();
31
+
32
+ var util = require$$4;
33
+
34
+ /* istanbul ignore next - node 0.x polyfill */
35
+ var gracefulQueue;
36
+ var previousSymbol;
37
+
38
+ /* istanbul ignore else - node 0.x polyfill */
39
+ if (typeof Symbol === 'function' && typeof Symbol.for === 'function') {
40
+ gracefulQueue = Symbol.for('graceful-fs.queue');
41
+ // This is used in testing by future versions
42
+ previousSymbol = Symbol.for('graceful-fs.previous');
43
+ } else {
44
+ gracefulQueue = '___graceful-fs.queue';
45
+ previousSymbol = '___graceful-fs.previous';
46
+ }
47
+
48
+ function noop () {}
49
+
50
+ function publishQueue(context, queue) {
51
+ Object.defineProperty(context, gracefulQueue, {
52
+ get: function() {
53
+ return queue
54
+ }
55
+ });
56
+ }
57
+
58
+ var debug = noop;
59
+ if (util.debuglog)
60
+ debug = util.debuglog('gfs4');
61
+ else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ''))
62
+ debug = function() {
63
+ var m = util.format.apply(util, arguments);
64
+ m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ');
65
+ console.error(m);
66
+ };
67
+
68
+ // Once time initialization
69
+ if (!fs[gracefulQueue]) {
70
+ // This queue can be shared by multiple loaded instances
71
+ var queue = _commonjsHelpers.commonjsGlobal[gracefulQueue] || [];
72
+ publishQueue(fs, queue);
73
+
74
+ // Patch fs.close/closeSync to shared queue version, because we need
75
+ // to retry() whenever a close happens *anywhere* in the program.
76
+ // This is essential when multiple graceful-fs instances are
77
+ // in play at the same time.
78
+ fs.close = (function (fs$close) {
79
+ function close (fd, cb) {
80
+ return fs$close.call(fs, fd, function (err) {
81
+ // This function uses the graceful-fs shared queue
82
+ if (!err) {
83
+ resetQueue();
84
+ }
85
+
86
+ if (typeof cb === 'function')
87
+ cb.apply(this, arguments);
88
+ })
89
+ }
90
+
91
+ Object.defineProperty(close, previousSymbol, {
92
+ value: fs$close
93
+ });
94
+ return close
95
+ })(fs.close);
96
+
97
+ fs.closeSync = (function (fs$closeSync) {
98
+ function closeSync (fd) {
99
+ // This function uses the graceful-fs shared queue
100
+ fs$closeSync.apply(fs, arguments);
101
+ resetQueue();
102
+ }
103
+
104
+ Object.defineProperty(closeSync, previousSymbol, {
105
+ value: fs$closeSync
106
+ });
107
+ return closeSync
108
+ })(fs.closeSync);
109
+
110
+ if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) {
111
+ process.on('exit', function() {
112
+ debug(fs[gracefulQueue]);
113
+ assert4.equal(fs[gracefulQueue].length, 0);
114
+ });
115
+ }
116
+ }
117
+
118
+ if (!_commonjsHelpers.commonjsGlobal[gracefulQueue]) {
119
+ publishQueue(_commonjsHelpers.commonjsGlobal, fs[gracefulQueue]);
120
+ }
121
+
122
+ gracefulFs = patch(clone$1(fs));
123
+ if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) {
124
+ gracefulFs = patch(fs);
125
+ fs.__patched = true;
126
+ }
127
+
128
+ function patch (fs) {
129
+ // Everything that references the open() function needs to be in here
130
+ polyfills$1(fs);
131
+ fs.gracefulify = patch;
132
+
133
+ fs.createReadStream = createReadStream;
134
+ fs.createWriteStream = createWriteStream;
135
+ var fs$readFile = fs.readFile;
136
+ fs.readFile = readFile;
137
+ function readFile (path, options, cb) {
138
+ if (typeof options === 'function')
139
+ cb = options, options = null;
140
+
141
+ return go$readFile(path, options, cb)
142
+
143
+ function go$readFile (path, options, cb, startTime) {
144
+ return fs$readFile(path, options, function (err) {
145
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
146
+ enqueue([go$readFile, [path, options, cb], err, startTime || Date.now(), Date.now()]);
147
+ else {
148
+ if (typeof cb === 'function')
149
+ cb.apply(this, arguments);
150
+ }
151
+ })
152
+ }
153
+ }
154
+
155
+ var fs$writeFile = fs.writeFile;
156
+ fs.writeFile = writeFile;
157
+ function writeFile (path, data, options, cb) {
158
+ if (typeof options === 'function')
159
+ cb = options, options = null;
160
+
161
+ return go$writeFile(path, data, options, cb)
162
+
163
+ function go$writeFile (path, data, options, cb, startTime) {
164
+ return fs$writeFile(path, data, options, function (err) {
165
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
166
+ enqueue([go$writeFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]);
167
+ else {
168
+ if (typeof cb === 'function')
169
+ cb.apply(this, arguments);
170
+ }
171
+ })
172
+ }
173
+ }
174
+
175
+ var fs$appendFile = fs.appendFile;
176
+ if (fs$appendFile)
177
+ fs.appendFile = appendFile;
178
+ function appendFile (path, data, options, cb) {
179
+ if (typeof options === 'function')
180
+ cb = options, options = null;
181
+
182
+ return go$appendFile(path, data, options, cb)
183
+
184
+ function go$appendFile (path, data, options, cb, startTime) {
185
+ return fs$appendFile(path, data, options, function (err) {
186
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
187
+ enqueue([go$appendFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]);
188
+ else {
189
+ if (typeof cb === 'function')
190
+ cb.apply(this, arguments);
191
+ }
192
+ })
193
+ }
194
+ }
195
+
196
+ var fs$copyFile = fs.copyFile;
197
+ if (fs$copyFile)
198
+ fs.copyFile = copyFile;
199
+ function copyFile (src, dest, flags, cb) {
200
+ if (typeof flags === 'function') {
201
+ cb = flags;
202
+ flags = 0;
203
+ }
204
+ return go$copyFile(src, dest, flags, cb)
205
+
206
+ function go$copyFile (src, dest, flags, cb, startTime) {
207
+ return fs$copyFile(src, dest, flags, function (err) {
208
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
209
+ enqueue([go$copyFile, [src, dest, flags, cb], err, startTime || Date.now(), Date.now()]);
210
+ else {
211
+ if (typeof cb === 'function')
212
+ cb.apply(this, arguments);
213
+ }
214
+ })
215
+ }
216
+ }
217
+
218
+ var fs$readdir = fs.readdir;
219
+ fs.readdir = readdir;
220
+ var noReaddirOptionVersions = /^v[0-5]\./;
221
+ function readdir (path, options, cb) {
222
+ if (typeof options === 'function')
223
+ cb = options, options = null;
224
+
225
+ var go$readdir = noReaddirOptionVersions.test(process.version)
226
+ ? function go$readdir (path, options, cb, startTime) {
227
+ return fs$readdir(path, fs$readdirCallback(
228
+ path, options, cb, startTime
229
+ ))
230
+ }
231
+ : function go$readdir (path, options, cb, startTime) {
232
+ return fs$readdir(path, options, fs$readdirCallback(
233
+ path, options, cb, startTime
234
+ ))
235
+ };
236
+
237
+ return go$readdir(path, options, cb)
238
+
239
+ function fs$readdirCallback (path, options, cb, startTime) {
240
+ return function (err, files) {
241
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
242
+ enqueue([
243
+ go$readdir,
244
+ [path, options, cb],
245
+ err,
246
+ startTime || Date.now(),
247
+ Date.now()
248
+ ]);
249
+ else {
250
+ if (files && files.sort)
251
+ files.sort();
252
+
253
+ if (typeof cb === 'function')
254
+ cb.call(this, err, files);
255
+ }
256
+ }
257
+ }
258
+ }
259
+
260
+ if (process.version.substr(0, 4) === 'v0.8') {
261
+ var legStreams = legacy(fs);
262
+ ReadStream = legStreams.ReadStream;
263
+ WriteStream = legStreams.WriteStream;
264
+ }
265
+
266
+ var fs$ReadStream = fs.ReadStream;
267
+ if (fs$ReadStream) {
268
+ ReadStream.prototype = Object.create(fs$ReadStream.prototype);
269
+ ReadStream.prototype.open = ReadStream$open;
270
+ }
271
+
272
+ var fs$WriteStream = fs.WriteStream;
273
+ if (fs$WriteStream) {
274
+ WriteStream.prototype = Object.create(fs$WriteStream.prototype);
275
+ WriteStream.prototype.open = WriteStream$open;
276
+ }
277
+
278
+ Object.defineProperty(fs, 'ReadStream', {
279
+ get: function () {
280
+ return ReadStream
281
+ },
282
+ set: function (val) {
283
+ ReadStream = val;
284
+ },
285
+ enumerable: true,
286
+ configurable: true
287
+ });
288
+ Object.defineProperty(fs, 'WriteStream', {
289
+ get: function () {
290
+ return WriteStream
291
+ },
292
+ set: function (val) {
293
+ WriteStream = val;
294
+ },
295
+ enumerable: true,
296
+ configurable: true
297
+ });
298
+
299
+ // legacy names
300
+ var FileReadStream = ReadStream;
301
+ Object.defineProperty(fs, 'FileReadStream', {
302
+ get: function () {
303
+ return FileReadStream
304
+ },
305
+ set: function (val) {
306
+ FileReadStream = val;
307
+ },
308
+ enumerable: true,
309
+ configurable: true
310
+ });
311
+ var FileWriteStream = WriteStream;
312
+ Object.defineProperty(fs, 'FileWriteStream', {
313
+ get: function () {
314
+ return FileWriteStream
315
+ },
316
+ set: function (val) {
317
+ FileWriteStream = val;
318
+ },
319
+ enumerable: true,
320
+ configurable: true
321
+ });
322
+
323
+ function ReadStream (path, options) {
324
+ if (this instanceof ReadStream)
325
+ return fs$ReadStream.apply(this, arguments), this
326
+ else
327
+ return ReadStream.apply(Object.create(ReadStream.prototype), arguments)
328
+ }
329
+
330
+ function ReadStream$open () {
331
+ var that = this;
332
+ open(that.path, that.flags, that.mode, function (err, fd) {
333
+ if (err) {
334
+ if (that.autoClose)
335
+ that.destroy();
336
+
337
+ that.emit('error', err);
338
+ } else {
339
+ that.fd = fd;
340
+ that.emit('open', fd);
341
+ that.read();
342
+ }
343
+ });
344
+ }
345
+
346
+ function WriteStream (path, options) {
347
+ if (this instanceof WriteStream)
348
+ return fs$WriteStream.apply(this, arguments), this
349
+ else
350
+ return WriteStream.apply(Object.create(WriteStream.prototype), arguments)
351
+ }
352
+
353
+ function WriteStream$open () {
354
+ var that = this;
355
+ open(that.path, that.flags, that.mode, function (err, fd) {
356
+ if (err) {
357
+ that.destroy();
358
+ that.emit('error', err);
359
+ } else {
360
+ that.fd = fd;
361
+ that.emit('open', fd);
362
+ }
363
+ });
364
+ }
365
+
366
+ function createReadStream (path, options) {
367
+ return new fs.ReadStream(path, options)
368
+ }
369
+
370
+ function createWriteStream (path, options) {
371
+ return new fs.WriteStream(path, options)
372
+ }
373
+
374
+ var fs$open = fs.open;
375
+ fs.open = open;
376
+ function open (path, flags, mode, cb) {
377
+ if (typeof mode === 'function')
378
+ cb = mode, mode = null;
379
+
380
+ return go$open(path, flags, mode, cb)
381
+
382
+ function go$open (path, flags, mode, cb, startTime) {
383
+ return fs$open(path, flags, mode, function (err, fd) {
384
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
385
+ enqueue([go$open, [path, flags, mode, cb], err, startTime || Date.now(), Date.now()]);
386
+ else {
387
+ if (typeof cb === 'function')
388
+ cb.apply(this, arguments);
389
+ }
390
+ })
391
+ }
392
+ }
393
+
394
+ return fs
395
+ }
396
+
397
+ function enqueue (elem) {
398
+ debug('ENQUEUE', elem[0].name, elem[1]);
399
+ fs[gracefulQueue].push(elem);
400
+ retry();
401
+ }
402
+
403
+ // keep track of the timeout between retry() calls
404
+ var retryTimer;
405
+
406
+ // reset the startTime and lastTime to now
407
+ // this resets the start of the 60 second overall timeout as well as the
408
+ // delay between attempts so that we'll retry these jobs sooner
409
+ function resetQueue () {
410
+ var now = Date.now();
411
+ for (var i = 0; i < fs[gracefulQueue].length; ++i) {
412
+ // entries that are only a length of 2 are from an older version, don't
413
+ // bother modifying those since they'll be retried anyway.
414
+ if (fs[gracefulQueue][i].length > 2) {
415
+ fs[gracefulQueue][i][3] = now; // startTime
416
+ fs[gracefulQueue][i][4] = now; // lastTime
417
+ }
418
+ }
419
+ // call retry to make sure we're actively processing the queue
420
+ retry();
421
+ }
422
+
423
+ function retry () {
424
+ // clear the timer and remove it to help prevent unintended concurrency
425
+ clearTimeout(retryTimer);
426
+ retryTimer = undefined;
427
+
428
+ if (fs[gracefulQueue].length === 0)
429
+ return
430
+
431
+ var elem = fs[gracefulQueue].shift();
432
+ var fn = elem[0];
433
+ var args = elem[1];
434
+ // these items may be unset if they were added by an older graceful-fs
435
+ var err = elem[2];
436
+ var startTime = elem[3];
437
+ var lastTime = elem[4];
438
+
439
+ // if we don't have a startTime we have no way of knowing if we've waited
440
+ // long enough, so go ahead and retry this item now
441
+ if (startTime === undefined) {
442
+ debug('RETRY', fn.name, args);
443
+ fn.apply(null, args);
444
+ } else if (Date.now() - startTime >= 60000) {
445
+ // it's been more than 60 seconds total, bail now
446
+ debug('TIMEOUT', fn.name, args);
447
+ var cb = args.pop();
448
+ if (typeof cb === 'function')
449
+ cb.call(null, err);
450
+ } else {
451
+ // the amount of time between the last attempt and right now
452
+ var sinceAttempt = Date.now() - lastTime;
453
+ // the amount of time between when we first tried, and when we last tried
454
+ // rounded up to at least 1
455
+ var sinceStart = Math.max(lastTime - startTime, 1);
456
+ // backoff. wait longer than the total time we've been retrying, but only
457
+ // up to a maximum of 100ms
458
+ var desiredDelay = Math.min(sinceStart * 1.2, 100);
459
+ // it's been long enough since the last retry, do it again
460
+ if (sinceAttempt >= desiredDelay) {
461
+ debug('RETRY', fn.name, args);
462
+ fn.apply(null, args.concat([startTime]));
463
+ } else {
464
+ // if we can't do this job yet, push it to the end of the queue
465
+ // and let the next iteration check again
466
+ fs[gracefulQueue].push(elem);
467
+ }
468
+ }
469
+
470
+ // schedule our next run if one isn't already scheduled
471
+ if (retryTimer === undefined) {
472
+ retryTimer = setTimeout(retry, 0);
473
+ }
474
+ }
475
+ return gracefulFs;
476
+ }
477
+
478
+ exports.__require = requireGracefulFs;
479
+ //# sourceMappingURL=graceful-fs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graceful-fs.js","sources":["../../../../../../../../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"],"sourcesContent":["var fs = require('fs')\nvar polyfills = require('./polyfills.js')\nvar legacy = require('./legacy-streams.js')\nvar clone = require('./clone.js')\n\nvar util = require('util')\n\n/* istanbul ignore next - node 0.x polyfill */\nvar gracefulQueue\nvar previousSymbol\n\n/* istanbul ignore else - node 0.x polyfill */\nif (typeof Symbol === 'function' && typeof Symbol.for === 'function') {\n gracefulQueue = Symbol.for('graceful-fs.queue')\n // This is used in testing by future versions\n previousSymbol = Symbol.for('graceful-fs.previous')\n} else {\n gracefulQueue = '___graceful-fs.queue'\n previousSymbol = '___graceful-fs.previous'\n}\n\nfunction noop () {}\n\nfunction publishQueue(context, queue) {\n Object.defineProperty(context, gracefulQueue, {\n get: function() {\n return queue\n }\n })\n}\n\nvar debug = noop\nif (util.debuglog)\n debug = util.debuglog('gfs4')\nelse if (/\\bgfs4\\b/i.test(process.env.NODE_DEBUG || ''))\n debug = function() {\n var m = util.format.apply(util, arguments)\n m = 'GFS4: ' + m.split(/\\n/).join('\\nGFS4: ')\n console.error(m)\n }\n\n// Once time initialization\nif (!fs[gracefulQueue]) {\n // This queue can be shared by multiple loaded instances\n var queue = global[gracefulQueue] || []\n publishQueue(fs, queue)\n\n // Patch fs.close/closeSync to shared queue version, because we need\n // to retry() whenever a close happens *anywhere* in the program.\n // This is essential when multiple graceful-fs instances are\n // in play at the same time.\n fs.close = (function (fs$close) {\n function close (fd, cb) {\n return fs$close.call(fs, fd, function (err) {\n // This function uses the graceful-fs shared queue\n if (!err) {\n resetQueue()\n }\n\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n })\n }\n\n Object.defineProperty(close, previousSymbol, {\n value: fs$close\n })\n return close\n })(fs.close)\n\n fs.closeSync = (function (fs$closeSync) {\n function closeSync (fd) {\n // This function uses the graceful-fs shared queue\n fs$closeSync.apply(fs, arguments)\n resetQueue()\n }\n\n Object.defineProperty(closeSync, previousSymbol, {\n value: fs$closeSync\n })\n return closeSync\n })(fs.closeSync)\n\n if (/\\bgfs4\\b/i.test(process.env.NODE_DEBUG || '')) {\n process.on('exit', function() {\n debug(fs[gracefulQueue])\n require('assert').equal(fs[gracefulQueue].length, 0)\n })\n }\n}\n\nif (!global[gracefulQueue]) {\n publishQueue(global, fs[gracefulQueue]);\n}\n\nmodule.exports = patch(clone(fs))\nif (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) {\n module.exports = patch(fs)\n fs.__patched = true;\n}\n\nfunction patch (fs) {\n // Everything that references the open() function needs to be in here\n polyfills(fs)\n fs.gracefulify = patch\n\n fs.createReadStream = createReadStream\n fs.createWriteStream = createWriteStream\n var fs$readFile = fs.readFile\n fs.readFile = readFile\n function readFile (path, options, cb) {\n if (typeof options === 'function')\n cb = options, options = null\n\n return go$readFile(path, options, cb)\n\n function go$readFile (path, options, cb, startTime) {\n return fs$readFile(path, options, function (err) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$readFile, [path, options, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n var fs$writeFile = fs.writeFile\n fs.writeFile = writeFile\n function writeFile (path, data, options, cb) {\n if (typeof options === 'function')\n cb = options, options = null\n\n return go$writeFile(path, data, options, cb)\n\n function go$writeFile (path, data, options, cb, startTime) {\n return fs$writeFile(path, data, options, function (err) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$writeFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n var fs$appendFile = fs.appendFile\n if (fs$appendFile)\n fs.appendFile = appendFile\n function appendFile (path, data, options, cb) {\n if (typeof options === 'function')\n cb = options, options = null\n\n return go$appendFile(path, data, options, cb)\n\n function go$appendFile (path, data, options, cb, startTime) {\n return fs$appendFile(path, data, options, function (err) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$appendFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n var fs$copyFile = fs.copyFile\n if (fs$copyFile)\n fs.copyFile = copyFile\n function copyFile (src, dest, flags, cb) {\n if (typeof flags === 'function') {\n cb = flags\n flags = 0\n }\n return go$copyFile(src, dest, flags, cb)\n\n function go$copyFile (src, dest, flags, cb, startTime) {\n return fs$copyFile(src, dest, flags, function (err) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$copyFile, [src, dest, flags, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n var fs$readdir = fs.readdir\n fs.readdir = readdir\n var noReaddirOptionVersions = /^v[0-5]\\./\n function readdir (path, options, cb) {\n if (typeof options === 'function')\n cb = options, options = null\n\n var go$readdir = noReaddirOptionVersions.test(process.version)\n ? function go$readdir (path, options, cb, startTime) {\n return fs$readdir(path, fs$readdirCallback(\n path, options, cb, startTime\n ))\n }\n : function go$readdir (path, options, cb, startTime) {\n return fs$readdir(path, options, fs$readdirCallback(\n path, options, cb, startTime\n ))\n }\n\n return go$readdir(path, options, cb)\n\n function fs$readdirCallback (path, options, cb, startTime) {\n return function (err, files) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([\n go$readdir,\n [path, options, cb],\n err,\n startTime || Date.now(),\n Date.now()\n ])\n else {\n if (files && files.sort)\n files.sort()\n\n if (typeof cb === 'function')\n cb.call(this, err, files)\n }\n }\n }\n }\n\n if (process.version.substr(0, 4) === 'v0.8') {\n var legStreams = legacy(fs)\n ReadStream = legStreams.ReadStream\n WriteStream = legStreams.WriteStream\n }\n\n var fs$ReadStream = fs.ReadStream\n if (fs$ReadStream) {\n ReadStream.prototype = Object.create(fs$ReadStream.prototype)\n ReadStream.prototype.open = ReadStream$open\n }\n\n var fs$WriteStream = fs.WriteStream\n if (fs$WriteStream) {\n WriteStream.prototype = Object.create(fs$WriteStream.prototype)\n WriteStream.prototype.open = WriteStream$open\n }\n\n Object.defineProperty(fs, 'ReadStream', {\n get: function () {\n return ReadStream\n },\n set: function (val) {\n ReadStream = val\n },\n enumerable: true,\n configurable: true\n })\n Object.defineProperty(fs, 'WriteStream', {\n get: function () {\n return WriteStream\n },\n set: function (val) {\n WriteStream = val\n },\n enumerable: true,\n configurable: true\n })\n\n // legacy names\n var FileReadStream = ReadStream\n Object.defineProperty(fs, 'FileReadStream', {\n get: function () {\n return FileReadStream\n },\n set: function (val) {\n FileReadStream = val\n },\n enumerable: true,\n configurable: true\n })\n var FileWriteStream = WriteStream\n Object.defineProperty(fs, 'FileWriteStream', {\n get: function () {\n return FileWriteStream\n },\n set: function (val) {\n FileWriteStream = val\n },\n enumerable: true,\n configurable: true\n })\n\n function ReadStream (path, options) {\n if (this instanceof ReadStream)\n return fs$ReadStream.apply(this, arguments), this\n else\n return ReadStream.apply(Object.create(ReadStream.prototype), arguments)\n }\n\n function ReadStream$open () {\n var that = this\n open(that.path, that.flags, that.mode, function (err, fd) {\n if (err) {\n if (that.autoClose)\n that.destroy()\n\n that.emit('error', err)\n } else {\n that.fd = fd\n that.emit('open', fd)\n that.read()\n }\n })\n }\n\n function WriteStream (path, options) {\n if (this instanceof WriteStream)\n return fs$WriteStream.apply(this, arguments), this\n else\n return WriteStream.apply(Object.create(WriteStream.prototype), arguments)\n }\n\n function WriteStream$open () {\n var that = this\n open(that.path, that.flags, that.mode, function (err, fd) {\n if (err) {\n that.destroy()\n that.emit('error', err)\n } else {\n that.fd = fd\n that.emit('open', fd)\n }\n })\n }\n\n function createReadStream (path, options) {\n return new fs.ReadStream(path, options)\n }\n\n function createWriteStream (path, options) {\n return new fs.WriteStream(path, options)\n }\n\n var fs$open = fs.open\n fs.open = open\n function open (path, flags, mode, cb) {\n if (typeof mode === 'function')\n cb = mode, mode = null\n\n return go$open(path, flags, mode, cb)\n\n function go$open (path, flags, mode, cb, startTime) {\n return fs$open(path, flags, mode, function (err, fd) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$open, [path, flags, mode, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n return fs\n}\n\nfunction enqueue (elem) {\n debug('ENQUEUE', elem[0].name, elem[1])\n fs[gracefulQueue].push(elem)\n retry()\n}\n\n// keep track of the timeout between retry() calls\nvar retryTimer\n\n// reset the startTime and lastTime to now\n// this resets the start of the 60 second overall timeout as well as the\n// delay between attempts so that we'll retry these jobs sooner\nfunction resetQueue () {\n var now = Date.now()\n for (var i = 0; i < fs[gracefulQueue].length; ++i) {\n // entries that are only a length of 2 are from an older version, don't\n // bother modifying those since they'll be retried anyway.\n if (fs[gracefulQueue][i].length > 2) {\n fs[gracefulQueue][i][3] = now // startTime\n fs[gracefulQueue][i][4] = now // lastTime\n }\n }\n // call retry to make sure we're actively processing the queue\n retry()\n}\n\nfunction retry () {\n // clear the timer and remove it to help prevent unintended concurrency\n clearTimeout(retryTimer)\n retryTimer = undefined\n\n if (fs[gracefulQueue].length === 0)\n return\n\n var elem = fs[gracefulQueue].shift()\n var fn = elem[0]\n var args = elem[1]\n // these items may be unset if they were added by an older graceful-fs\n var err = elem[2]\n var startTime = elem[3]\n var lastTime = elem[4]\n\n // if we don't have a startTime we have no way of knowing if we've waited\n // long enough, so go ahead and retry this item now\n if (startTime === undefined) {\n debug('RETRY', fn.name, args)\n fn.apply(null, args)\n } else if (Date.now() - startTime >= 60000) {\n // it's been more than 60 seconds total, bail now\n debug('TIMEOUT', fn.name, args)\n var cb = args.pop()\n if (typeof cb === 'function')\n cb.call(null, err)\n } else {\n // the amount of time between the last attempt and right now\n var sinceAttempt = Date.now() - lastTime\n // the amount of time between when we first tried, and when we last tried\n // rounded up to at least 1\n var sinceStart = Math.max(lastTime - startTime, 1)\n // backoff. wait longer than the total time we've been retrying, but only\n // up to a maximum of 100ms\n var desiredDelay = Math.min(sinceStart * 1.2, 100)\n // it's been long enough since the last retry, do it again\n if (sinceAttempt >= desiredDelay) {\n debug('RETRY', fn.name, args)\n fn.apply(null, args.concat([startTime]))\n } else {\n // if we can't do this job yet, push it to the end of the queue\n // and let the next iteration check again\n fs[gracefulQueue].push(elem)\n }\n }\n\n // schedule our next run if one isn't already scheduled\n if (retryTimer === undefined) {\n retryTimer = setTimeout(retry, 0)\n }\n}\n"],"names":["polyfills","require$$1","require$$2","clone","require$$3","global","require$$5"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;CAAA,IAAI,EAAE,GAAG,WAAa;CACtB,IAAIA,WAAS,GAAGC,mBAAyB,GAAA;CACzC,IAAI,MAAM,GAAGC,uBAA8B,GAAA;CAC3C,IAAIC,OAAK,GAAGC,eAAqB,GAAA;AACjC;CACA,IAAI,IAAI,GAAG,WAAe;AAC1B;AACA;AACA,CAAA,IAAI,cAAa;AACjB,CAAA,IAAI,eAAc;AAClB;AACA;CACA,IAAI,OAAO,MAAM,KAAK,UAAU,IAAI,OAAO,MAAM,CAAC,GAAG,KAAK,UAAU,EAAE;AACtE,GAAE,aAAa,GAAG,MAAM,CAAC,GAAG,CAAC,mBAAmB,EAAC;AACjD;AACA,GAAE,cAAc,GAAG,MAAM,CAAC,GAAG,CAAC,sBAAsB,EAAC;AACrD,EAAC,MAAM;GACL,aAAa,GAAG,uBAAsB;GACtC,cAAc,GAAG,0BAAyB;EAC3C;AACD;CACA,SAAS,IAAI,IAAI,EAAE;AACnB;AACA,CAAA,SAAS,YAAY,CAAC,OAAO,EAAE,KAAK,EAAE;AACtC,GAAE,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,aAAa,EAAE;KAC5C,GAAG,EAAE,WAAW;AACpB,OAAM,OAAO,KAAK;MACb;AACL,IAAG,EAAC;EACH;AACD;CACA,IAAI,KAAK,GAAG,KAAI;CAChB,IAAI,IAAI,CAAC,QAAQ;AACjB,GAAE,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAC;AAC/B,MAAK,IAAI,WAAW,CAAC,IAA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AC;IAClC;AACH,EAAA;;;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,143 @@
1
+ /**
2
+ * @tanstack/router-vite-plugin/src/index.ts
3
+ *
4
+ * Copyright (c) TanStack
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE.md file in the root directory of this source tree.
8
+ *
9
+ * @license MIT
10
+ */
11
+ 'use strict';
12
+
13
+ var require$$0 = require('stream');
14
+
15
+ var legacyStreams;
16
+ var hasRequiredLegacyStreams;
17
+
18
+ function requireLegacyStreams () {
19
+ if (hasRequiredLegacyStreams) return legacyStreams;
20
+ hasRequiredLegacyStreams = 1;
21
+ var Stream = require$$0.Stream;
22
+
23
+ legacyStreams = legacy;
24
+
25
+ function legacy (fs) {
26
+ return {
27
+ ReadStream: ReadStream,
28
+ WriteStream: WriteStream
29
+ }
30
+
31
+ function ReadStream (path, options) {
32
+ if (!(this instanceof ReadStream)) return new ReadStream(path, options);
33
+
34
+ Stream.call(this);
35
+
36
+ var self = this;
37
+
38
+ this.path = path;
39
+ this.fd = null;
40
+ this.readable = true;
41
+ this.paused = false;
42
+
43
+ this.flags = 'r';
44
+ this.mode = 438; /*=0666*/
45
+ this.bufferSize = 64 * 1024;
46
+
47
+ options = options || {};
48
+
49
+ // Mixin options into this
50
+ var keys = Object.keys(options);
51
+ for (var index = 0, length = keys.length; index < length; index++) {
52
+ var key = keys[index];
53
+ this[key] = options[key];
54
+ }
55
+
56
+ if (this.encoding) this.setEncoding(this.encoding);
57
+
58
+ if (this.start !== undefined) {
59
+ if ('number' !== typeof this.start) {
60
+ throw TypeError('start must be a Number');
61
+ }
62
+ if (this.end === undefined) {
63
+ this.end = Infinity;
64
+ } else if ('number' !== typeof this.end) {
65
+ throw TypeError('end must be a Number');
66
+ }
67
+
68
+ if (this.start > this.end) {
69
+ throw new Error('start must be <= end');
70
+ }
71
+
72
+ this.pos = this.start;
73
+ }
74
+
75
+ if (this.fd !== null) {
76
+ process.nextTick(function() {
77
+ self._read();
78
+ });
79
+ return;
80
+ }
81
+
82
+ fs.open(this.path, this.flags, this.mode, function (err, fd) {
83
+ if (err) {
84
+ self.emit('error', err);
85
+ self.readable = false;
86
+ return;
87
+ }
88
+
89
+ self.fd = fd;
90
+ self.emit('open', fd);
91
+ self._read();
92
+ });
93
+ }
94
+
95
+ function WriteStream (path, options) {
96
+ if (!(this instanceof WriteStream)) return new WriteStream(path, options);
97
+
98
+ Stream.call(this);
99
+
100
+ this.path = path;
101
+ this.fd = null;
102
+ this.writable = true;
103
+
104
+ this.flags = 'w';
105
+ this.encoding = 'binary';
106
+ this.mode = 438; /*=0666*/
107
+ this.bytesWritten = 0;
108
+
109
+ options = options || {};
110
+
111
+ // Mixin options into this
112
+ var keys = Object.keys(options);
113
+ for (var index = 0, length = keys.length; index < length; index++) {
114
+ var key = keys[index];
115
+ this[key] = options[key];
116
+ }
117
+
118
+ if (this.start !== undefined) {
119
+ if ('number' !== typeof this.start) {
120
+ throw TypeError('start must be a Number');
121
+ }
122
+ if (this.start < 0) {
123
+ throw new Error('start must be >= zero');
124
+ }
125
+
126
+ this.pos = this.start;
127
+ }
128
+
129
+ this.busy = false;
130
+ this._queue = [];
131
+
132
+ if (this.fd === null) {
133
+ this._open = fs.open;
134
+ this._queue.push([this._open, this.path, this.flags, this.mode, undefined]);
135
+ this.flush();
136
+ }
137
+ }
138
+ }
139
+ return legacyStreams;
140
+ }
141
+
142
+ exports.__require = requireLegacyStreams;
143
+ //# sourceMappingURL=legacy-streams.js.map