@tanstack/router-vite-plugin 1.2.2 → 1.2.3
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/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/index.js +14 -14
- package/build/cjs/node_modules/.pnpm/prettier@3.0.2/node_modules/prettier/index.js.map +1 -1
- package/build/cjs/packages/router-cli/src/generator.js +29 -8
- package/build/cjs/packages/router-cli/src/generator.js.map +1 -1
- package/build/esm/index.js +13 -10
- package/build/esm/index.js.map +1 -1
- package/package.json +3 -3
- package/build/cjs/_virtual/_commonjsHelpers.js +0 -16
- package/build/cjs/_virtual/_commonjsHelpers.js.map +0 -1
- package/build/cjs/_virtual/index.js +0 -16
- package/build/cjs/_virtual/index.js.map +0 -1
- package/build/cjs/_virtual/make-dir.js +0 -16
- package/build/cjs/_virtual/make-dir.js.map +0 -1
- package/build/cjs/_virtual/utils.js +0 -16
- package/build/cjs/_virtual/utils.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/copy/copy-sync.js +0 -188
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/copy/copy-sync.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/copy/copy.js +0 -255
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/copy/copy.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/copy/index.js +0 -24
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/copy/index.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/empty/index.js +0 -59
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/empty/index.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/file.js +0 -87
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/file.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/index.js +0 -40
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/index.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/link.js +0 -84
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/link.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/symlink-paths.js +0 -116
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/symlink-paths.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/symlink-type.js +0 -46
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/symlink-type.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/symlink.js +0 -105
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/symlink.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/fs/index.js +0 -146
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/fs/index.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/index.js +0 -41
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/index.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/json/index.js +0 -34
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/json/index.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/json/jsonfile.js +0 -26
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/json/jsonfile.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/json/output-json-sync.js +0 -28
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/json/output-json-sync.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/json/output-json.js +0 -28
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/json/output-json.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/mkdirs/index.js +0 -32
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/mkdirs/index.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/mkdirs/make-dir.js +0 -49
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/mkdirs/make-dir.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/mkdirs/utils.js +0 -35
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/mkdirs/utils.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/move/index.js +0 -24
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/move/index.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/move/move-sync.js +0 -74
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/move/move-sync.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/move/move.js +0 -96
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/move/move.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/output-file/index.js +0 -59
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/output-file/index.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/path-exists/index.js +0 -30
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/path-exists/index.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/remove/index.js +0 -39
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/remove/index.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/remove/rimraf.js +0 -319
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/remove/rimraf.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/util/stat.js +0 -172
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/util/stat.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/util/utimes.js +0 -41
- package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/util/utimes.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/clone.js +0 -36
- package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/clone.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/graceful-fs.js +0 -469
- package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/graceful-fs.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/legacy-streams.js +0 -135
- package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/legacy-streams.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/polyfills.js +0 -372
- package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/polyfills.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js +0 -45
- package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js +0 -479
- package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js +0 -143
- package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js +0 -380
- package/build/cjs/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/index.js +0 -108
- package/build/cjs/node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/index.js.map +0 -1
- package/build/cjs/node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js +0 -29
- package/build/cjs/node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js.map +0 -1
package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/empty/index.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
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('universalify');
|
|
14
|
-
require('../fs/index.js');
|
|
15
|
-
var path$1 = require('path');
|
|
16
|
-
var index$1 = require('../mkdirs/index.js');
|
|
17
|
-
var index$2 = require('../remove/index.js');
|
|
18
|
-
var index = require('../../../../../../../_virtual/index.js');
|
|
19
|
-
|
|
20
|
-
const u = require$$0.fromPromise;
|
|
21
|
-
const fs = index.__exports;
|
|
22
|
-
const path = path$1;
|
|
23
|
-
const mkdir = index$1.mkdirs;
|
|
24
|
-
const remove = index$2.remove_1;
|
|
25
|
-
|
|
26
|
-
const emptyDir = u(async function emptyDir (dir) {
|
|
27
|
-
let items;
|
|
28
|
-
try {
|
|
29
|
-
items = await fs.readdir(dir);
|
|
30
|
-
} catch {
|
|
31
|
-
return mkdir.mkdirs(dir)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return Promise.all(items.map(item => remove.remove(path.join(dir, item))))
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
function emptyDirSync (dir) {
|
|
38
|
-
let items;
|
|
39
|
-
try {
|
|
40
|
-
items = fs.readdirSync(dir);
|
|
41
|
-
} catch {
|
|
42
|
-
return mkdir.mkdirsSync(dir)
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
items.forEach(item => {
|
|
46
|
-
item = path.join(dir, item);
|
|
47
|
-
remove.removeSync(item);
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
var empty = {
|
|
52
|
-
emptyDirSync,
|
|
53
|
-
emptydirSync: emptyDirSync,
|
|
54
|
-
emptyDir,
|
|
55
|
-
emptydir: emptyDir
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
exports.empty = empty;
|
|
59
|
-
//# sourceMappingURL=index.js.map
|
package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/empty/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../../../../../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/empty/index.js"],"sourcesContent":["'use strict'\n\nconst u = require('universalify').fromPromise\nconst fs = require('../fs')\nconst path = require('path')\nconst mkdir = require('../mkdirs')\nconst remove = require('../remove')\n\nconst emptyDir = u(async function emptyDir (dir) {\n let items\n try {\n items = await fs.readdir(dir)\n } catch {\n return mkdir.mkdirs(dir)\n }\n\n return Promise.all(items.map(item => remove.remove(path.join(dir, item))))\n})\n\nfunction emptyDirSync (dir) {\n let items\n try {\n items = fs.readdirSync(dir)\n } catch {\n return mkdir.mkdirsSync(dir)\n }\n\n items.forEach(item => {\n item = path.join(dir, item)\n remove.removeSync(item)\n })\n}\n\nmodule.exports = {\n emptyDirSync,\n emptydirSync: emptyDirSync,\n emptyDir,\n emptydir: emptyDir\n}\n"],"names":["require$$1","require$$2","require$$3","require$$4"],"mappings":";;;;;;;;;;;;;;;;;;;AAEA,MAAM,CAAC,GAAG,UAAuB,CAAC,YAAW;AAC7C,MAAM,EAAE,GAAGA,gBAAgB;AAC3B,MAAM,IAAI,GAAGC,OAAe;AAC5B,MAAM,KAAK,GAAGC,eAAoB;AAClC,MAAM,MAAM,GAAGC,iBAAoB;AACnC;AACA,MAAM,QAAQ,GAAG,CAAC,CAAC,eAAe,QAAQ,EAAE,GAAG,EAAE;AACjD,EAAE,IAAI,MAAK;AACX,EAAE,IAAI;AACN,IAAI,KAAK,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,GAAG,EAAC;AACjC,GAAG,CAAC,MAAM;AACV,IAAI,OAAO,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC;AAC5B,GAAG;AACH;AACA,EAAE,OAAO,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AAC5E,CAAC,EAAC;AACF;AACA,SAAS,YAAY,EAAE,GAAG,EAAE;AAC5B,EAAE,IAAI,MAAK;AACX,EAAE,IAAI;AACN,IAAI,KAAK,GAAG,EAAE,CAAC,WAAW,CAAC,GAAG,EAAC;AAC/B,GAAG,CAAC,MAAM;AACV,IAAI,OAAO,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC;AAChC,GAAG;AACH;AACA,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,IAAI;AACxB,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,EAAC;AAC/B,IAAI,MAAM,CAAC,UAAU,CAAC,IAAI,EAAC;AAC3B,GAAG,EAAC;AACJ,CAAC;AACD;AACA,IAAA,KAAc,GAAG;AACjB,EAAE,YAAY;AACd,EAAE,YAAY,EAAE,YAAY;AAC5B,EAAE,QAAQ;AACV,EAAE,QAAQ,EAAE,QAAQ;AACpB;;;;","x_google_ignoreList":[0]}
|
package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/file.js
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
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('universalify');
|
|
14
|
-
var path$1 = require('path');
|
|
15
|
-
var gracefulFs = require('../../../../../graceful-fs@4.2.10/node_modules/graceful-fs/graceful-fs.js');
|
|
16
|
-
var index = require('../mkdirs/index.js');
|
|
17
|
-
|
|
18
|
-
const u = require$$0.fromCallback;
|
|
19
|
-
const path = path$1;
|
|
20
|
-
const fs = gracefulFs.gracefulFs;
|
|
21
|
-
const mkdir = index.mkdirs;
|
|
22
|
-
|
|
23
|
-
function createFile (file, callback) {
|
|
24
|
-
function makeFile () {
|
|
25
|
-
fs.writeFile(file, '', err => {
|
|
26
|
-
if (err) return callback(err)
|
|
27
|
-
callback();
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err
|
|
32
|
-
if (!err && stats.isFile()) return callback()
|
|
33
|
-
const dir = path.dirname(file);
|
|
34
|
-
fs.stat(dir, (err, stats) => {
|
|
35
|
-
if (err) {
|
|
36
|
-
// if the directory doesn't exist, make it
|
|
37
|
-
if (err.code === 'ENOENT') {
|
|
38
|
-
return mkdir.mkdirs(dir, err => {
|
|
39
|
-
if (err) return callback(err)
|
|
40
|
-
makeFile();
|
|
41
|
-
})
|
|
42
|
-
}
|
|
43
|
-
return callback(err)
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if (stats.isDirectory()) makeFile();
|
|
47
|
-
else {
|
|
48
|
-
// parent is not a directory
|
|
49
|
-
// This is just to cause an internal ENOTDIR error to be thrown
|
|
50
|
-
fs.readdir(dir, err => {
|
|
51
|
-
if (err) return callback(err)
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function createFileSync (file) {
|
|
59
|
-
let stats;
|
|
60
|
-
try {
|
|
61
|
-
stats = fs.statSync(file);
|
|
62
|
-
} catch {}
|
|
63
|
-
if (stats && stats.isFile()) return
|
|
64
|
-
|
|
65
|
-
const dir = path.dirname(file);
|
|
66
|
-
try {
|
|
67
|
-
if (!fs.statSync(dir).isDirectory()) {
|
|
68
|
-
// parent is not a directory
|
|
69
|
-
// This is just to cause an internal ENOTDIR error to be thrown
|
|
70
|
-
fs.readdirSync(dir);
|
|
71
|
-
}
|
|
72
|
-
} catch (err) {
|
|
73
|
-
// If the stat call above failed because the directory doesn't exist, create it
|
|
74
|
-
if (err && err.code === 'ENOENT') mkdir.mkdirsSync(dir);
|
|
75
|
-
else throw err
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
fs.writeFileSync(file, '');
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
var file = {
|
|
82
|
-
createFile: u(createFile),
|
|
83
|
-
createFileSync
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
exports.file = file;
|
|
87
|
-
//# sourceMappingURL=file.js.map
|
package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/file.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file.js","sources":["../../../../../../../../../../../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/file.js"],"sourcesContent":["'use strict'\n\nconst u = require('universalify').fromCallback\nconst path = require('path')\nconst fs = require('graceful-fs')\nconst mkdir = require('../mkdirs')\n\nfunction createFile (file, callback) {\n function makeFile () {\n fs.writeFile(file, '', err => {\n if (err) return callback(err)\n callback()\n })\n }\n\n fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err\n if (!err && stats.isFile()) return callback()\n const dir = path.dirname(file)\n fs.stat(dir, (err, stats) => {\n if (err) {\n // if the directory doesn't exist, make it\n if (err.code === 'ENOENT') {\n return mkdir.mkdirs(dir, err => {\n if (err) return callback(err)\n makeFile()\n })\n }\n return callback(err)\n }\n\n if (stats.isDirectory()) makeFile()\n else {\n // parent is not a directory\n // This is just to cause an internal ENOTDIR error to be thrown\n fs.readdir(dir, err => {\n if (err) return callback(err)\n })\n }\n })\n })\n}\n\nfunction createFileSync (file) {\n let stats\n try {\n stats = fs.statSync(file)\n } catch {}\n if (stats && stats.isFile()) return\n\n const dir = path.dirname(file)\n try {\n if (!fs.statSync(dir).isDirectory()) {\n // parent is not a directory\n // This is just to cause an internal ENOTDIR error to be thrown\n fs.readdirSync(dir)\n }\n } catch (err) {\n // If the stat call above failed because the directory doesn't exist, create it\n if (err && err.code === 'ENOENT') mkdir.mkdirsSync(dir)\n else throw err\n }\n\n fs.writeFileSync(file, '')\n}\n\nmodule.exports = {\n createFile: u(createFile),\n createFileSync\n}\n"],"names":["require$$1","require$$2","require$$3"],"mappings":";;;;;;;;;;;;;;;;;AAEA,MAAM,CAAC,GAAG,UAAuB,CAAC,aAAY;AAC9C,MAAM,IAAI,GAAGA,OAAe;AAC5B,MAAM,EAAE,GAAGC,sBAAsB;AACjC,MAAM,KAAK,GAAGC,aAAoB;AAClC;AACA,SAAS,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE;AACrC,EAAE,SAAS,QAAQ,IAAI;AACvB,IAAI,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,IAAI;AAClC,MAAM,IAAI,GAAG,EAAE,OAAO,QAAQ,CAAC,GAAG,CAAC;AACnC,MAAM,QAAQ,GAAE;AAChB,KAAK,EAAC;AACN,GAAG;AACH;AACA,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK;AAChC,IAAI,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,MAAM,EAAE,EAAE,OAAO,QAAQ,EAAE;AACjD,IAAI,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAC;AAClC,IAAI,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK;AACjC,MAAM,IAAI,GAAG,EAAE;AACf;AACA,QAAQ,IAAI,GAAG,CAAC,IAAI,KAAK,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a,CAAC,IAAI,EAAE,EAAE,EAAC;AAC5B,CAAC;AACD;AACA,IAAA,IAAc,GAAG;AACjB,EAAE,UAAU,EAAE,CAAC,CAAC,UAAU,CAAC;AAC3B,EAAE,cAAc;AAChB;;;;","x_google_ignoreList":[0]}
|
package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/index.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
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 file = require('./file.js');
|
|
14
|
-
var link = require('./link.js');
|
|
15
|
-
var symlink = require('./symlink.js');
|
|
16
|
-
|
|
17
|
-
const { createFile, createFileSync } = file.file;
|
|
18
|
-
const { createLink, createLinkSync } = link.link;
|
|
19
|
-
const { createSymlink, createSymlinkSync } = symlink.symlink;
|
|
20
|
-
|
|
21
|
-
var ensure = {
|
|
22
|
-
// file
|
|
23
|
-
createFile,
|
|
24
|
-
createFileSync,
|
|
25
|
-
ensureFile: createFile,
|
|
26
|
-
ensureFileSync: createFileSync,
|
|
27
|
-
// link
|
|
28
|
-
createLink,
|
|
29
|
-
createLinkSync,
|
|
30
|
-
ensureLink: createLink,
|
|
31
|
-
ensureLinkSync: createLinkSync,
|
|
32
|
-
// symlink
|
|
33
|
-
createSymlink,
|
|
34
|
-
createSymlinkSync,
|
|
35
|
-
ensureSymlink: createSymlink,
|
|
36
|
-
ensureSymlinkSync: createSymlinkSync
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
exports.ensure = ensure;
|
|
40
|
-
//# sourceMappingURL=index.js.map
|
package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../../../../../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/index.js"],"sourcesContent":["'use strict'\n\nconst { createFile, createFileSync } = require('./file')\nconst { createLink, createLinkSync } = require('./link')\nconst { createSymlink, createSymlinkSync } = require('./symlink')\n\nmodule.exports = {\n // file\n createFile,\n createFileSync,\n ensureFile: createFile,\n ensureFileSync: createFileSync,\n // link\n createLink,\n createLinkSync,\n ensureLink: createLink,\n ensureLinkSync: createLinkSync,\n // symlink\n createSymlink,\n createSymlinkSync,\n ensureSymlink: createSymlink,\n ensureSymlinkSync: createSymlinkSync\n}\n"],"names":["require$$0","require$$1","require$$2"],"mappings":";;;;;;;;;;;;;;;;AAEA,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,GAAGA,UAAiB;AACxD,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,GAAGC,UAAiB;AACxD,MAAM,EAAE,aAAa,EAAE,iBAAiB,EAAE,GAAGC,gBAAoB;AACjE;AACA,IAAA,MAAc,GAAG;AACjB;AACA,EAAE,UAAU;AACZ,EAAE,cAAc;AAChB,EAAE,UAAU,EAAE,UAAU;AACxB,EAAE,cAAc,EAAE,cAAc;AAChC;AACA,EAAE,UAAU;AACZ,EAAE,cAAc;AAChB,EAAE,UAAU,EAAE,UAAU;AACxB,EAAE,cAAc,EAAE,cAAc;AAChC;AACA,EAAE,aAAa;AACf,EAAE,iBAAiB;AACnB,EAAE,aAAa,EAAE,aAAa;AAC9B,EAAE,iBAAiB,EAAE,iBAAiB;AACtC;;;;","x_google_ignoreList":[0]}
|
package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/link.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
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('universalify');
|
|
14
|
-
var path$1 = require('path');
|
|
15
|
-
var gracefulFs = require('../../../../../graceful-fs@4.2.10/node_modules/graceful-fs/graceful-fs.js');
|
|
16
|
-
var index = require('../mkdirs/index.js');
|
|
17
|
-
var index$1 = require('../path-exists/index.js');
|
|
18
|
-
var stat = require('../util/stat.js');
|
|
19
|
-
|
|
20
|
-
const u = require$$0.fromCallback;
|
|
21
|
-
const path = path$1;
|
|
22
|
-
const fs = gracefulFs.gracefulFs;
|
|
23
|
-
const mkdir = index.mkdirs;
|
|
24
|
-
const pathExists = index$1.pathExists_1.pathExists;
|
|
25
|
-
const { areIdentical } = stat.stat;
|
|
26
|
-
|
|
27
|
-
function createLink (srcpath, dstpath, callback) {
|
|
28
|
-
function makeLink (srcpath, dstpath) {
|
|
29
|
-
fs.link(srcpath, dstpath, err => {
|
|
30
|
-
if (err) return callback(err)
|
|
31
|
-
callback(null);
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
fs.lstat(dstpath, (_, dstStat) => {
|
|
36
|
-
fs.lstat(srcpath, (err, srcStat) => {
|
|
37
|
-
if (err) {
|
|
38
|
-
err.message = err.message.replace('lstat', 'ensureLink');
|
|
39
|
-
return callback(err)
|
|
40
|
-
}
|
|
41
|
-
if (dstStat && areIdentical(srcStat, dstStat)) return callback(null)
|
|
42
|
-
|
|
43
|
-
const dir = path.dirname(dstpath);
|
|
44
|
-
pathExists(dir, (err, dirExists) => {
|
|
45
|
-
if (err) return callback(err)
|
|
46
|
-
if (dirExists) return makeLink(srcpath, dstpath)
|
|
47
|
-
mkdir.mkdirs(dir, err => {
|
|
48
|
-
if (err) return callback(err)
|
|
49
|
-
makeLink(srcpath, dstpath);
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
function createLinkSync (srcpath, dstpath) {
|
|
57
|
-
let dstStat;
|
|
58
|
-
try {
|
|
59
|
-
dstStat = fs.lstatSync(dstpath);
|
|
60
|
-
} catch {}
|
|
61
|
-
|
|
62
|
-
try {
|
|
63
|
-
const srcStat = fs.lstatSync(srcpath);
|
|
64
|
-
if (dstStat && areIdentical(srcStat, dstStat)) return
|
|
65
|
-
} catch (err) {
|
|
66
|
-
err.message = err.message.replace('lstat', 'ensureLink');
|
|
67
|
-
throw err
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
const dir = path.dirname(dstpath);
|
|
71
|
-
const dirExists = fs.existsSync(dir);
|
|
72
|
-
if (dirExists) return fs.linkSync(srcpath, dstpath)
|
|
73
|
-
mkdir.mkdirsSync(dir);
|
|
74
|
-
|
|
75
|
-
return fs.linkSync(srcpath, dstpath)
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
var link = {
|
|
79
|
-
createLink: u(createLink),
|
|
80
|
-
createLinkSync
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
exports.link = link;
|
|
84
|
-
//# sourceMappingURL=link.js.map
|
package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/link.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"link.js","sources":["../../../../../../../../../../../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/link.js"],"sourcesContent":["'use strict'\n\nconst u = require('universalify').fromCallback\nconst path = require('path')\nconst fs = require('graceful-fs')\nconst mkdir = require('../mkdirs')\nconst pathExists = require('../path-exists').pathExists\nconst { areIdentical } = require('../util/stat')\n\nfunction createLink (srcpath, dstpath, callback) {\n function makeLink (srcpath, dstpath) {\n fs.link(srcpath, dstpath, err => {\n if (err) return callback(err)\n callback(null)\n })\n }\n\n fs.lstat(dstpath, (_, dstStat) => {\n fs.lstat(srcpath, (err, srcStat) => {\n if (err) {\n err.message = err.message.replace('lstat', 'ensureLink')\n return callback(err)\n }\n if (dstStat && areIdentical(srcStat, dstStat)) return callback(null)\n\n const dir = path.dirname(dstpath)\n pathExists(dir, (err, dirExists) => {\n if (err) return callback(err)\n if (dirExists) return makeLink(srcpath, dstpath)\n mkdir.mkdirs(dir, err => {\n if (err) return callback(err)\n makeLink(srcpath, dstpath)\n })\n })\n })\n })\n}\n\nfunction createLinkSync (srcpath, dstpath) {\n let dstStat\n try {\n dstStat = fs.lstatSync(dstpath)\n } catch {}\n\n try {\n const srcStat = fs.lstatSync(srcpath)\n if (dstStat && areIdentical(srcStat, dstStat)) return\n } catch (err) {\n err.message = err.message.replace('lstat', 'ensureLink')\n throw err\n }\n\n const dir = path.dirname(dstpath)\n const dirExists = fs.existsSync(dir)\n if (dirExists) return fs.linkSync(srcpath, dstpath)\n mkdir.mkdirsSync(dir)\n\n return fs.linkSync(srcpath, dstpath)\n}\n\nmodule.exports = {\n createLink: u(createLink),\n createLinkSync\n}\n"],"names":["require$$1","require$$2","require$$3","require$$4","require$$5"],"mappings":";;;;;;;;;;;;;;;;;;;AAEA,MAAM,CAAC,GAAG,UAAuB,CAAC,aAAY;AAC9C,MAAM,IAAI,GAAGA,OAAe;AAC5B,MAAM,EAAE,GAAGC,sBAAsB;AACjC,MAAM,KAAK,GAAGC,aAAoB;AAClC,MAAM,UAAU,GAAGC,oBAAyB,CAAC,WAAU;AACvD,MAAM,EAAE,YAAY,EAAE,GAAGC,UAAuB;AAChD;AACA,SAAS,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE;AACjD,EAAE,SAAS,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE;AACvC,IAAI,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE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,EAAE,CAAC,SAAS,CAAC,OAAO,EAAC;AACnC,GAAG,CAAC,MAAM,EAAE;AACZ;AACA,EAAE,IAAI;AACN,IAAI,MAAM,OAAO,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,EAAC;AACzC,IAAI,IAAI,OAAO,IAAI,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM;AACzD,GAAG,CAAC,OAAO,GAAG,EAAE;AAChB,IAAI,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,YAAY,EAAC;AAC5D,IAAI,MAAM,GAAG;AACb,GAAG;AACH;AACA,EAAE,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAC;AACnC,EAAE,MAAM,SAAS,GAAG,EAAE,CAAC,UAAU,CAAC,GAAG,EAAC;AACtC,EAAE,IAAI,SAAS,EAAE,OAAO,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;AACrD,EAAE,KAAK,CAAC,UAAU,CAAC,GAAG,EAAC;AACvB;AACA,EAAE,OAAO,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;AACtC,CAAC;AACD;AACA,IAAA,IAAc,GAAG;AACjB,EAAE,UAAU,EAAE,CAAC,CAAC,UAAU,CAAC;AAC3B,EAAE,cAAc;AAChB;;;;","x_google_ignoreList":[0]}
|
|
@@ -1,116 +0,0 @@
|
|
|
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 path$1 = require('path');
|
|
14
|
-
var gracefulFs = require('../../../../../graceful-fs@4.2.10/node_modules/graceful-fs/graceful-fs.js');
|
|
15
|
-
var index = require('../path-exists/index.js');
|
|
16
|
-
|
|
17
|
-
const path = path$1;
|
|
18
|
-
const fs = gracefulFs.gracefulFs;
|
|
19
|
-
const pathExists = index.pathExists_1.pathExists;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Function that returns two types of paths, one relative to symlink, and one
|
|
23
|
-
* relative to the current working directory. Checks if path is absolute or
|
|
24
|
-
* relative. If the path is relative, this function checks if the path is
|
|
25
|
-
* relative to symlink or relative to current working directory. This is an
|
|
26
|
-
* initiative to find a smarter `srcpath` to supply when building symlinks.
|
|
27
|
-
* This allows you to determine which path to use out of one of three possible
|
|
28
|
-
* types of source paths. The first is an absolute path. This is detected by
|
|
29
|
-
* `path.isAbsolute()`. When an absolute path is provided, it is checked to
|
|
30
|
-
* see if it exists. If it does it's used, if not an error is returned
|
|
31
|
-
* (callback)/ thrown (sync). The other two options for `srcpath` are a
|
|
32
|
-
* relative url. By default Node's `fs.symlink` works by creating a symlink
|
|
33
|
-
* using `dstpath` and expects the `srcpath` to be relative to the newly
|
|
34
|
-
* created symlink. If you provide a `srcpath` that does not exist on the file
|
|
35
|
-
* system it results in a broken symlink. To minimize this, the function
|
|
36
|
-
* checks to see if the 'relative to symlink' source file exists, and if it
|
|
37
|
-
* does it will use it. If it does not, it checks if there's a file that
|
|
38
|
-
* exists that is relative to the current working directory, if does its used.
|
|
39
|
-
* This preserves the expectations of the original fs.symlink spec and adds
|
|
40
|
-
* the ability to pass in `relative to current working direcotry` paths.
|
|
41
|
-
*/
|
|
42
|
-
|
|
43
|
-
function symlinkPaths (srcpath, dstpath, callback) {
|
|
44
|
-
if (path.isAbsolute(srcpath)) {
|
|
45
|
-
return fs.lstat(srcpath, (err) => {
|
|
46
|
-
if (err) {
|
|
47
|
-
err.message = err.message.replace('lstat', 'ensureSymlink');
|
|
48
|
-
return callback(err)
|
|
49
|
-
}
|
|
50
|
-
return callback(null, {
|
|
51
|
-
toCwd: srcpath,
|
|
52
|
-
toDst: srcpath
|
|
53
|
-
})
|
|
54
|
-
})
|
|
55
|
-
} else {
|
|
56
|
-
const dstdir = path.dirname(dstpath);
|
|
57
|
-
const relativeToDst = path.join(dstdir, srcpath);
|
|
58
|
-
return pathExists(relativeToDst, (err, exists) => {
|
|
59
|
-
if (err) return callback(err)
|
|
60
|
-
if (exists) {
|
|
61
|
-
return callback(null, {
|
|
62
|
-
toCwd: relativeToDst,
|
|
63
|
-
toDst: srcpath
|
|
64
|
-
})
|
|
65
|
-
} else {
|
|
66
|
-
return fs.lstat(srcpath, (err) => {
|
|
67
|
-
if (err) {
|
|
68
|
-
err.message = err.message.replace('lstat', 'ensureSymlink');
|
|
69
|
-
return callback(err)
|
|
70
|
-
}
|
|
71
|
-
return callback(null, {
|
|
72
|
-
toCwd: srcpath,
|
|
73
|
-
toDst: path.relative(dstdir, srcpath)
|
|
74
|
-
})
|
|
75
|
-
})
|
|
76
|
-
}
|
|
77
|
-
})
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
function symlinkPathsSync (srcpath, dstpath) {
|
|
82
|
-
let exists;
|
|
83
|
-
if (path.isAbsolute(srcpath)) {
|
|
84
|
-
exists = fs.existsSync(srcpath);
|
|
85
|
-
if (!exists) throw new Error('absolute srcpath does not exist')
|
|
86
|
-
return {
|
|
87
|
-
toCwd: srcpath,
|
|
88
|
-
toDst: srcpath
|
|
89
|
-
}
|
|
90
|
-
} else {
|
|
91
|
-
const dstdir = path.dirname(dstpath);
|
|
92
|
-
const relativeToDst = path.join(dstdir, srcpath);
|
|
93
|
-
exists = fs.existsSync(relativeToDst);
|
|
94
|
-
if (exists) {
|
|
95
|
-
return {
|
|
96
|
-
toCwd: relativeToDst,
|
|
97
|
-
toDst: srcpath
|
|
98
|
-
}
|
|
99
|
-
} else {
|
|
100
|
-
exists = fs.existsSync(srcpath);
|
|
101
|
-
if (!exists) throw new Error('relative srcpath does not exist')
|
|
102
|
-
return {
|
|
103
|
-
toCwd: srcpath,
|
|
104
|
-
toDst: path.relative(dstdir, srcpath)
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
var symlinkPaths_1 = {
|
|
111
|
-
symlinkPaths,
|
|
112
|
-
symlinkPathsSync
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
exports.symlinkPaths_1 = symlinkPaths_1;
|
|
116
|
-
//# sourceMappingURL=symlink-paths.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"symlink-paths.js","sources":["../../../../../../../../../../../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/symlink-paths.js"],"sourcesContent":["'use strict'\n\nconst path = require('path')\nconst fs = require('graceful-fs')\nconst pathExists = require('../path-exists').pathExists\n\n/**\n * Function that returns two types of paths, one relative to symlink, and one\n * relative to the current working directory. Checks if path is absolute or\n * relative. If the path is relative, this function checks if the path is\n * relative to symlink or relative to current working directory. This is an\n * initiative to find a smarter `srcpath` to supply when building symlinks.\n * This allows you to determine which path to use out of one of three possible\n * types of source paths. The first is an absolute path. This is detected by\n * `path.isAbsolute()`. When an absolute path is provided, it is checked to\n * see if it exists. If it does it's used, if not an error is returned\n * (callback)/ thrown (sync). The other two options for `srcpath` are a\n * relative url. By default Node's `fs.symlink` works by creating a symlink\n * using `dstpath` and expects the `srcpath` to be relative to the newly\n * created symlink. If you provide a `srcpath` that does not exist on the file\n * system it results in a broken symlink. To minimize this, the function\n * checks to see if the 'relative to symlink' source file exists, and if it\n * does it will use it. If it does not, it checks if there's a file that\n * exists that is relative to the current working directory, if does its used.\n * This preserves the expectations of the original fs.symlink spec and adds\n * the ability to pass in `relative to current working direcotry` paths.\n */\n\nfunction symlinkPaths (srcpath, dstpath, callback) {\n if (path.isAbsolute(srcpath)) {\n return fs.lstat(srcpath, (err) => {\n if (err) {\n err.message = err.message.replace('lstat', 'ensureSymlink')\n return callback(err)\n }\n return callback(null, {\n toCwd: srcpath,\n toDst: srcpath\n })\n })\n } else {\n const dstdir = path.dirname(dstpath)\n const relativeToDst = path.join(dstdir, srcpath)\n return pathExists(relativeToDst, (err, exists) => {\n if (err) return callback(err)\n if (exists) {\n return callback(null, {\n toCwd: relativeToDst,\n toDst: srcpath\n })\n } else {\n return fs.lstat(srcpath, (err) => {\n if (err) {\n err.message = err.message.replace('lstat', 'ensureSymlink')\n return callback(err)\n }\n return callback(null, {\n toCwd: srcpath,\n toDst: path.relative(dstdir, srcpath)\n })\n })\n }\n })\n }\n}\n\nfunction symlinkPathsSync (srcpath, dstpath) {\n let exists\n if (path.isAbsolute(srcpath)) {\n exists = fs.existsSync(srcpath)\n if (!exists) throw new Error('absolute srcpath does not exist')\n return {\n toCwd: srcpath,\n toDst: srcpath\n }\n } else {\n const dstdir = path.dirname(dstpath)\n const relativeToDst = path.join(dstdir, srcpath)\n exists = fs.existsSync(relativeToDst)\n if (exists) {\n return {\n toCwd: relativeToDst,\n toDst: srcpath\n }\n } else {\n exists = fs.existsSync(srcpath)\n if (!exists) throw new Error('relative srcpath does not exist')\n return {\n toCwd: srcpath,\n toDst: path.relative(dstdir, srcpath)\n }\n }\n }\n}\n\nmodule.exports = {\n symlinkPaths,\n symlinkPathsSync\n}\n"],"names":["require$$0","require$$1","require$$2"],"mappings":";;;;;;;;;;;;;;;;AAEA,MAAM,IAAI,GAAGA,OAAe;AAC5B,MAAM,EAAE,GAAGC,sBAAsB;AACjC,MAAM,UAAU,GAAGC,kBAAyB,CAAC,WAAU;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE;AACnD,EAAE,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;AAChC,IAAI,OAAO,EAAE,CAA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
|
|
|
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 gracefulFs = require('../../../../../graceful-fs@4.2.10/node_modules/graceful-fs/graceful-fs.js');
|
|
14
|
-
|
|
15
|
-
const fs = gracefulFs.gracefulFs;
|
|
16
|
-
|
|
17
|
-
function symlinkType (srcpath, type, callback) {
|
|
18
|
-
callback = (typeof type === 'function') ? type : callback;
|
|
19
|
-
type = (typeof type === 'function') ? false : type;
|
|
20
|
-
if (type) return callback(null, type)
|
|
21
|
-
fs.lstat(srcpath, (err, stats) => {
|
|
22
|
-
if (err) return callback(null, 'file')
|
|
23
|
-
type = (stats && stats.isDirectory()) ? 'dir' : 'file';
|
|
24
|
-
callback(null, type);
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function symlinkTypeSync (srcpath, type) {
|
|
29
|
-
let stats;
|
|
30
|
-
|
|
31
|
-
if (type) return type
|
|
32
|
-
try {
|
|
33
|
-
stats = fs.lstatSync(srcpath);
|
|
34
|
-
} catch {
|
|
35
|
-
return 'file'
|
|
36
|
-
}
|
|
37
|
-
return (stats && stats.isDirectory()) ? 'dir' : 'file'
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
var symlinkType_1 = {
|
|
41
|
-
symlinkType,
|
|
42
|
-
symlinkTypeSync
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
exports.symlinkType_1 = symlinkType_1;
|
|
46
|
-
//# sourceMappingURL=symlink-type.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"symlink-type.js","sources":["../../../../../../../../../../../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/symlink-type.js"],"sourcesContent":["'use strict'\n\nconst fs = require('graceful-fs')\n\nfunction symlinkType (srcpath, type, callback) {\n callback = (typeof type === 'function') ? type : callback\n type = (typeof type === 'function') ? false : type\n if (type) return callback(null, type)\n fs.lstat(srcpath, (err, stats) => {\n if (err) return callback(null, 'file')\n type = (stats && stats.isDirectory()) ? 'dir' : 'file'\n callback(null, type)\n })\n}\n\nfunction symlinkTypeSync (srcpath, type) {\n let stats\n\n if (type) return type\n try {\n stats = fs.lstatSync(srcpath)\n } catch {\n return 'file'\n }\n return (stats && stats.isDirectory()) ? 'dir' : 'file'\n}\n\nmodule.exports = {\n symlinkType,\n symlinkTypeSync\n}\n"],"names":["require$$0"],"mappings":";;;;;;;;;;;;;;AAEA,MAAM,EAAE,GAAGA,sBAAsB;AACjC;AACA,SAAS,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE;AAC/C,EAAE,QAAQ,GAAG,CAAC,OAAO,IAAI,KAAK,UAAU,IAAI,IAAI,GAAG,SAAQ;AAC3D,EAAE,IAAI,GAAG,CAAC,OAAO,IAAI,KAAK,UAAU,IAAI,KAAK,GAAG,KAAI;AACpD,EAAE,IAAI,IAAI,EAAE,OAAO,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;AACvC,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK;AACpC,IAAI,IAAI,GAAG,EAAE,OAAO,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;AAC1C,IAAI,IAAI,GAAG,CAAC,KAAK,IAAI,KAAK,CAAC,WAAW,EAAE,IAAI,KAAK,GAAG,OAAM;AAC1D,IAAI,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAC;AACxB,GAAG,EAAC;AACJ,CAAC;AACD;AACA,SAAS,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE;AACzC,EAAE,IAAI,MAAK;AACX;AACA,EAAE,IAAI,IAAI,EAAE,OAAO,IAAI;AACvB,EAAE,IAAI;AACN,IAAI,KAAK,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,EAAC;AACjC,GAAG,CAAC,MAAM;AACV,IAAI,OAAO,MAAM;AACjB,GAAG;AACH,EAAE,OAAO,CAAC,KAAK,IAAI,KAAK,CAAC,WAAW,EAAE,IAAI,KAAK,GAAG,MAAM;AACxD,CAAC;AACD;AACA,IAAA,aAAc,GAAG;AACjB,EAAE,WAAW;AACb,EAAE,eAAe;AACjB;;;;","x_google_ignoreList":[0]}
|
package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/symlink.js
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
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('universalify');
|
|
14
|
-
var path$1 = require('path');
|
|
15
|
-
require('../fs/index.js');
|
|
16
|
-
var index = require('../mkdirs/index.js');
|
|
17
|
-
var symlinkPaths$1 = require('./symlink-paths.js');
|
|
18
|
-
var symlinkType$1 = require('./symlink-type.js');
|
|
19
|
-
var index$2 = require('../path-exists/index.js');
|
|
20
|
-
var stat = require('../util/stat.js');
|
|
21
|
-
var index$1 = require('../../../../../../../_virtual/index.js');
|
|
22
|
-
|
|
23
|
-
const u = require$$0.fromCallback;
|
|
24
|
-
const path = path$1;
|
|
25
|
-
const fs = index$1.__exports;
|
|
26
|
-
const _mkdirs = index.mkdirs;
|
|
27
|
-
const mkdirs = _mkdirs.mkdirs;
|
|
28
|
-
const mkdirsSync = _mkdirs.mkdirsSync;
|
|
29
|
-
|
|
30
|
-
const _symlinkPaths = symlinkPaths$1.symlinkPaths_1;
|
|
31
|
-
const symlinkPaths = _symlinkPaths.symlinkPaths;
|
|
32
|
-
const symlinkPathsSync = _symlinkPaths.symlinkPathsSync;
|
|
33
|
-
|
|
34
|
-
const _symlinkType = symlinkType$1.symlinkType_1;
|
|
35
|
-
const symlinkType = _symlinkType.symlinkType;
|
|
36
|
-
const symlinkTypeSync = _symlinkType.symlinkTypeSync;
|
|
37
|
-
|
|
38
|
-
const pathExists = index$2.pathExists_1.pathExists;
|
|
39
|
-
|
|
40
|
-
const { areIdentical } = stat.stat;
|
|
41
|
-
|
|
42
|
-
function createSymlink (srcpath, dstpath, type, callback) {
|
|
43
|
-
callback = (typeof type === 'function') ? type : callback;
|
|
44
|
-
type = (typeof type === 'function') ? false : type;
|
|
45
|
-
|
|
46
|
-
fs.lstat(dstpath, (err, stats) => {
|
|
47
|
-
if (!err && stats.isSymbolicLink()) {
|
|
48
|
-
Promise.all([
|
|
49
|
-
fs.stat(srcpath),
|
|
50
|
-
fs.stat(dstpath)
|
|
51
|
-
]).then(([srcStat, dstStat]) => {
|
|
52
|
-
if (areIdentical(srcStat, dstStat)) return callback(null)
|
|
53
|
-
_createSymlink(srcpath, dstpath, type, callback);
|
|
54
|
-
});
|
|
55
|
-
} else _createSymlink(srcpath, dstpath, type, callback);
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function _createSymlink (srcpath, dstpath, type, callback) {
|
|
60
|
-
symlinkPaths(srcpath, dstpath, (err, relative) => {
|
|
61
|
-
if (err) return callback(err)
|
|
62
|
-
srcpath = relative.toDst;
|
|
63
|
-
symlinkType(relative.toCwd, type, (err, type) => {
|
|
64
|
-
if (err) return callback(err)
|
|
65
|
-
const dir = path.dirname(dstpath);
|
|
66
|
-
pathExists(dir, (err, dirExists) => {
|
|
67
|
-
if (err) return callback(err)
|
|
68
|
-
if (dirExists) return fs.symlink(srcpath, dstpath, type, callback)
|
|
69
|
-
mkdirs(dir, err => {
|
|
70
|
-
if (err) return callback(err)
|
|
71
|
-
fs.symlink(srcpath, dstpath, type, callback);
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
function createSymlinkSync (srcpath, dstpath, type) {
|
|
79
|
-
let stats;
|
|
80
|
-
try {
|
|
81
|
-
stats = fs.lstatSync(dstpath);
|
|
82
|
-
} catch {}
|
|
83
|
-
if (stats && stats.isSymbolicLink()) {
|
|
84
|
-
const srcStat = fs.statSync(srcpath);
|
|
85
|
-
const dstStat = fs.statSync(dstpath);
|
|
86
|
-
if (areIdentical(srcStat, dstStat)) return
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
const relative = symlinkPathsSync(srcpath, dstpath);
|
|
90
|
-
srcpath = relative.toDst;
|
|
91
|
-
type = symlinkTypeSync(relative.toCwd, type);
|
|
92
|
-
const dir = path.dirname(dstpath);
|
|
93
|
-
const exists = fs.existsSync(dir);
|
|
94
|
-
if (exists) return fs.symlinkSync(srcpath, dstpath, type)
|
|
95
|
-
mkdirsSync(dir);
|
|
96
|
-
return fs.symlinkSync(srcpath, dstpath, type)
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
var symlink = {
|
|
100
|
-
createSymlink: u(createSymlink),
|
|
101
|
-
createSymlinkSync
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
exports.symlink = symlink;
|
|
105
|
-
//# sourceMappingURL=symlink.js.map
|
package/build/cjs/node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/symlink.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"symlink.js","sources":["../../../../../../../../../../../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/symlink.js"],"sourcesContent":["'use strict'\n\nconst u = require('universalify').fromCallback\nconst path = require('path')\nconst fs = require('../fs')\nconst _mkdirs = require('../mkdirs')\nconst mkdirs = _mkdirs.mkdirs\nconst mkdirsSync = _mkdirs.mkdirsSync\n\nconst _symlinkPaths = require('./symlink-paths')\nconst symlinkPaths = _symlinkPaths.symlinkPaths\nconst symlinkPathsSync = _symlinkPaths.symlinkPathsSync\n\nconst _symlinkType = require('./symlink-type')\nconst symlinkType = _symlinkType.symlinkType\nconst symlinkTypeSync = _symlinkType.symlinkTypeSync\n\nconst pathExists = require('../path-exists').pathExists\n\nconst { areIdentical } = require('../util/stat')\n\nfunction createSymlink (srcpath, dstpath, type, callback) {\n callback = (typeof type === 'function') ? type : callback\n type = (typeof type === 'function') ? false : type\n\n fs.lstat(dstpath, (err, stats) => {\n if (!err && stats.isSymbolicLink()) {\n Promise.all([\n fs.stat(srcpath),\n fs.stat(dstpath)\n ]).then(([srcStat, dstStat]) => {\n if (areIdentical(srcStat, dstStat)) return callback(null)\n _createSymlink(srcpath, dstpath, type, callback)\n })\n } else _createSymlink(srcpath, dstpath, type, callback)\n })\n}\n\nfunction _createSymlink (srcpath, dstpath, type, callback) {\n symlinkPaths(srcpath, dstpath, (err, relative) => {\n if (err) return callback(err)\n srcpath = relative.toDst\n symlinkType(relative.toCwd, type, (err, type) => {\n if (err) return callback(err)\n const dir = path.dirname(dstpath)\n pathExists(dir, (err, dirExists) => {\n if (err) return callback(err)\n if (dirExists) return fs.symlink(srcpath, dstpath, type, callback)\n mkdirs(dir, err => {\n if (err) return callback(err)\n fs.symlink(srcpath, dstpath, type, callback)\n })\n })\n })\n })\n}\n\nfunction createSymlinkSync (srcpath, dstpath, type) {\n let stats\n try {\n stats = fs.lstatSync(dstpath)\n } catch {}\n if (stats && stats.isSymbolicLink()) {\n const srcStat = fs.statSync(srcpath)\n const dstStat = fs.statSync(dstpath)\n if (areIdentical(srcStat, dstStat)) return\n }\n\n const relative = symlinkPathsSync(srcpath, dstpath)\n srcpath = relative.toDst\n type = symlinkTypeSync(relative.toCwd, type)\n const dir = path.dirname(dstpath)\n const exists = fs.existsSync(dir)\n if (exists) return fs.symlinkSync(srcpath, dstpath, type)\n mkdirsSync(dir)\n return fs.symlinkSync(srcpath, dstpath, type)\n}\n\nmodule.exports = {\n createSymlink: u(createSymlink),\n createSymlinkSync\n}\n"],"names":["require$$1","require$$2","require$$3","require$$4","require$$5","require$$6","require$$7"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAEA,MAAM,CAAC,GAAG,UAAuB,CAAC,aAAY;AAC9C,MAAM,IAAI,GAAGA,OAAe;AAC5B,MAAM,EAAE,GAAGC,kBAAgB;AAC3B,MAAM,OAAO,GAAGC,aAAoB;AACpC,MAAM,MAAM,GAAG,OAAO,CAAC,OAAM;AAC7B,MAAM,UAAU,GAAG,OAAO,CAAC,WAAU;AACrC;AACA,MAAM,aAAa,GAAGC,8BAA0B;AAChD,MAAM,YAAY,GAAG,aAAa,CAAC,aAAY;AAC/C,MAAM,gBAAgB,GAAG,aAAa,CAAC,iBAAgB;AACvD;AACA,MAAM,YAAY,GAAGC,4BAAyB;AAC9C,MAAM,WAAW,GAAG,YAAY,CAAC,YAAW;AAC5C,MAAM,eAAe,GAAG,YAAY,CAAC,gBAAe;AACpD;AACA,MAAM,UAAU,GAAGC,oBAAyB,CAAC,WAAU;AACvD;AACA,MAAM,EAAE,YAAY,EAAE,GAAGC,UAAuB;AAChD;AACA,SAAS,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE;AAC1D,EAAE,QAAQ,GAAG,CAAC,OAAO,IAAI,KAAK,UAAU,IAAI,IAAI,GAAG,SAAQ;AAC3D,EAAE,IAAI,GAAG,CAAC,OAAO,IAAI,KAAK,UAAU,IAAI,KAAK,GAAG,KAAI;AACpD;AACA,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK;AACpC,IAAI,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,cAAc,EAAE,EAAE;AACxC,MAAM,OAAO,CAAC,GAA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