@utoo/web 1.2.0-rc.1 → 1.2.0-rc.10
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/README.md +55 -0
- package/esm/{aa0ad15d2a587c43406f.wasm → a0a815481b4ff49f8961.wasm} +0 -0
- package/esm/index.d.ts +3 -2
- package/esm/index.js +3 -2
- package/esm/loaderWorker.js +1 -1
- package/esm/loaderWorker.js.LICENSE.txt +0 -21
- package/esm/{forkedProject.d.ts → project/ForkedProject.d.ts} +5 -3
- package/esm/{forkedProject.js → project/ForkedProject.js} +8 -0
- package/esm/{internalProject.d.ts → project/InternalProject.d.ts} +4 -3
- package/esm/project/InternalProject.js +132 -0
- package/esm/{project.d.ts → project/Project.d.ts} +3 -1
- package/esm/{project.js → project/Project.js} +19 -6
- package/esm/serviceWorker.js +4 -3
- package/esm/{type.d.ts → types.d.ts} +43 -0
- package/esm/types.js +56 -0
- package/esm/utils/sabcom.d.ts +61 -0
- package/esm/utils/sabcom.js +203 -0
- package/esm/utoo/index.d.ts +73 -38
- package/esm/utoo/index.js +165 -141
- package/esm/utoo/index_bg.wasm +0 -0
- package/esm/webpackLoaders/{worker/cjs.js → cjs.js} +65 -41
- package/esm/webpackLoaders/loaderWorkerPool.d.ts +2 -0
- package/esm/webpackLoaders/loaderWorkerPool.js +90 -0
- package/esm/webpackLoaders/polyfills/fsPolyfill.d.ts +78 -0
- package/esm/webpackLoaders/{worker/polyfills → polyfills}/fsPolyfill.js +154 -191
- package/esm/webpackLoaders/polyfills/fsPromisesPolyfill.d.ts +26 -0
- package/esm/webpackLoaders/polyfills/fsPromisesPolyfill.js +112 -0
- package/esm/webpackLoaders/{worker/polyfills → polyfills}/nodePolyFills.d.ts +0 -2
- package/esm/webpackLoaders/{worker/polyfills → polyfills}/nodePolyFills.js +4 -3
- package/esm/webpackLoaders/{worker/type.d.ts → types.d.ts} +1 -0
- package/esm/webpackLoaders/{worker/index.js → worker.js} +8 -3
- package/esm/worker.js +2 -2
- package/package.json +14 -13
- package/esm/internalProject.js +0 -110
- package/esm/loaderWorkerPool.d.ts +0 -3
- package/esm/loaderWorkerPool.js +0 -125
- package/esm/sabcom.d.ts +0 -31
- package/esm/sabcom.js +0 -71
- package/esm/type.js +0 -12
- package/esm/webpackLoaders/loaders/less-loader/index.d.ts +0 -3
- package/esm/webpackLoaders/loaders/less-loader/index.js +0 -103
- package/esm/webpackLoaders/loaders/less-loader/options.json +0 -67
- package/esm/webpackLoaders/loaders/less-loader/utils.d.ts +0 -14
- package/esm/webpackLoaders/loaders/less-loader/utils.js +0 -217
- package/esm/webpackLoaders/worker/polyfills/fastGlobPolyfill.d.ts +0 -2
- package/esm/webpackLoaders/worker/polyfills/fastGlobPolyfill.js +0 -48
- package/esm/webpackLoaders/worker/polyfills/fsPolyfill.d.ts +0 -124
- package/esm/webpackLoaders/worker/polyfills/fsPromisesPolyfill.d.ts +0 -9
- package/esm/webpackLoaders/worker/polyfills/fsPromisesPolyfill.js +0 -9
- /package/esm/{installServiceWorker.d.ts → utils/installServiceWorker.d.ts} +0 -0
- /package/esm/{installServiceWorker.js → utils/installServiceWorker.js} +0 -0
- /package/esm/{message.d.ts → utils/message.d.ts} +0 -0
- /package/esm/{message.js → utils/message.js} +0 -0
- /package/esm/webpackLoaders/{worker/cjs.d.ts → cjs.d.ts} +0 -0
- /package/esm/webpackLoaders/{worker/polyfills → polyfills}/workerThreadsPolyfill.d.ts +0 -0
- /package/esm/webpackLoaders/{worker/polyfills → polyfills}/workerThreadsPolyfill.js +0 -0
- /package/esm/webpackLoaders/{worker/type.js → types.js} +0 -0
- /package/esm/webpackLoaders/{worker/index.d.ts → worker.d.ts} +0 -0
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const { type } = require("os");
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.errorFactory = errorFactory;
|
|
7
|
-
exports.getLessImplementation = getLessImplementation;
|
|
8
|
-
exports.getLessOptions = getLessOptions;
|
|
9
|
-
exports.isUnsupportedUrl = isUnsupportedUrl;
|
|
10
|
-
exports.normalizeSourceMap = normalizeSourceMap;
|
|
11
|
-
var _path = _interopRequireDefault(require("path"));
|
|
12
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
-
/* eslint-disable class-methods-use-this */
|
|
14
|
-
const trailingSlash = /[/\\]$/;
|
|
15
|
-
// This somewhat changed in Less 3.x. Now the file name comes without the
|
|
16
|
-
// automatically added extension whereas the extension is passed in as `options.ext`.
|
|
17
|
-
// So, if the file name matches this regexp, we simply ignore the proposed extension.
|
|
18
|
-
const IS_SPECIAL_MODULE_IMPORT = /^~[^/]+$/;
|
|
19
|
-
// `[drive_letter]:\` + `\\[server]\[share_name]\`
|
|
20
|
-
const IS_NATIVE_WIN32_PATH = /^[a-z]:[/\\]|^\\\\/i;
|
|
21
|
-
// Examples:
|
|
22
|
-
// - ~package
|
|
23
|
-
// - ~package/
|
|
24
|
-
// - ~@org
|
|
25
|
-
// - ~@org/
|
|
26
|
-
// - ~@org/package
|
|
27
|
-
// - ~@org/package/
|
|
28
|
-
const IS_MODULE_IMPORT = /^~([^/]+|[^/]+\/|@[^/]+[/][^/]+|@[^/]+\/?|@[^/]+[/][^/]+\/)$/;
|
|
29
|
-
const MODULE_REQUEST_REGEX = /^[^?]*~/;
|
|
30
|
-
/**
|
|
31
|
-
* Creates a Less plugin that uses webpack's resolving engine that is provided by the loaderContext.
|
|
32
|
-
*
|
|
33
|
-
* @param {LoaderContext} loaderContext
|
|
34
|
-
* @param {object} implementation
|
|
35
|
-
* @returns {LessPlugin}
|
|
36
|
-
*/
|
|
37
|
-
function createWebpackLessPlugin(loaderContext, implementation) {
|
|
38
|
-
const lessOptions = loaderContext.getOptions();
|
|
39
|
-
const resolve = loaderContext.getResolve({
|
|
40
|
-
dependencyType: "less",
|
|
41
|
-
conditionNames: ["less", "style", "..."],
|
|
42
|
-
mainFields: ["less", "style", "main", "..."],
|
|
43
|
-
mainFiles: ["index", "..."],
|
|
44
|
-
extensions: [".less", ".css"],
|
|
45
|
-
preferRelative: true
|
|
46
|
-
});
|
|
47
|
-
class WebpackFileManager extends implementation.FileManager {
|
|
48
|
-
supports(filename) {
|
|
49
|
-
if (filename[0] === "/" || IS_NATIVE_WIN32_PATH.test(filename)) {
|
|
50
|
-
return true;
|
|
51
|
-
}
|
|
52
|
-
if (this.isPathAbsolute(filename)) {
|
|
53
|
-
return false;
|
|
54
|
-
}
|
|
55
|
-
return true;
|
|
56
|
-
}
|
|
57
|
-
// Sync resolving is used at least by the `data-uri` function.
|
|
58
|
-
// This file manager doesn't know how to do it, so let's delegate it
|
|
59
|
-
// to the default file manager of Less.
|
|
60
|
-
// We could probably use loaderContext.resolveSync, but it's deprecated,
|
|
61
|
-
// see https://webpack.js.org/api/loaders/#this-resolvesync
|
|
62
|
-
supportsSync() {
|
|
63
|
-
return false;
|
|
64
|
-
}
|
|
65
|
-
async resolveFilename(filename, currentDirectory) {
|
|
66
|
-
// Less is giving us trailing slashes, but the context should have no trailing slash
|
|
67
|
-
const context = currentDirectory.replace(trailingSlash, "");
|
|
68
|
-
let request = filename;
|
|
69
|
-
// A `~` makes the url an module
|
|
70
|
-
if (MODULE_REQUEST_REGEX.test(filename)) {
|
|
71
|
-
request = request.replace(MODULE_REQUEST_REGEX, "");
|
|
72
|
-
}
|
|
73
|
-
if (IS_MODULE_IMPORT.test(filename)) {
|
|
74
|
-
request = request[request.length - 1] === "/" ? request : `${request}/`;
|
|
75
|
-
}
|
|
76
|
-
return this.resolveRequests(context, [...new Set([request, filename])]);
|
|
77
|
-
}
|
|
78
|
-
async resolveRequests(context, possibleRequests) {
|
|
79
|
-
if (possibleRequests.length === 0) {
|
|
80
|
-
return Promise.reject();
|
|
81
|
-
}
|
|
82
|
-
let result;
|
|
83
|
-
try {
|
|
84
|
-
result = await resolve(context, possibleRequests[0]);
|
|
85
|
-
}
|
|
86
|
-
catch (error) {
|
|
87
|
-
const [, ...tailPossibleRequests] = possibleRequests;
|
|
88
|
-
if (tailPossibleRequests.length === 0) {
|
|
89
|
-
throw error;
|
|
90
|
-
}
|
|
91
|
-
result = await this.resolveRequests(context, tailPossibleRequests);
|
|
92
|
-
}
|
|
93
|
-
return result;
|
|
94
|
-
}
|
|
95
|
-
async loadFile(filename, ...args) {
|
|
96
|
-
let result;
|
|
97
|
-
try {
|
|
98
|
-
if (IS_SPECIAL_MODULE_IMPORT.test(filename) || lessOptions.webpackImporter === "only") {
|
|
99
|
-
const error = new Error();
|
|
100
|
-
error.type = "Next";
|
|
101
|
-
throw error;
|
|
102
|
-
}
|
|
103
|
-
result = await super.loadFile(filename, ...args);
|
|
104
|
-
}
|
|
105
|
-
catch (error) {
|
|
106
|
-
if (error.type !== "File" && error.type !== "Next") {
|
|
107
|
-
return Promise.reject(error);
|
|
108
|
-
}
|
|
109
|
-
try {
|
|
110
|
-
result = await this.resolveFilename(filename, ...args);
|
|
111
|
-
}
|
|
112
|
-
catch (webpackResolveError) {
|
|
113
|
-
error.message = `Less resolver error:\n${error.message}\n\n` + `Webpack resolver error details:\n${webpackResolveError.details}\n\n` + `Webpack resolver error missing:\n${webpackResolveError.missing}\n\n`;
|
|
114
|
-
return Promise.reject(error);
|
|
115
|
-
}
|
|
116
|
-
loaderContext.addDependency(result);
|
|
117
|
-
return super.loadFile(result, ...args);
|
|
118
|
-
}
|
|
119
|
-
const absoluteFilename = _path.default.isAbsolute(result.filename) ? result.filename : _path.default.resolve(".", result.filename);
|
|
120
|
-
loaderContext.addDependency(_path.default.normalize(absoluteFilename));
|
|
121
|
-
return result;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
return {
|
|
125
|
-
install(lessInstance, pluginManager) {
|
|
126
|
-
pluginManager.addFileManager(new WebpackFileManager());
|
|
127
|
-
},
|
|
128
|
-
minVersion: [3, 0, 0]
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Get the `less` options from the loader context and normalizes its values
|
|
133
|
-
*
|
|
134
|
-
* @param {object} loaderContext
|
|
135
|
-
* @param {object} loaderOptions
|
|
136
|
-
* @param {object} implementation
|
|
137
|
-
* @returns {Object}
|
|
138
|
-
*/
|
|
139
|
-
function getLessOptions(loaderContext, loaderOptions, implementation) {
|
|
140
|
-
const options = typeof loaderOptions.lessOptions === "function" ? loaderOptions.lessOptions(loaderContext) || {} : loaderOptions.lessOptions || {};
|
|
141
|
-
const lessOptions = {
|
|
142
|
-
plugins: [],
|
|
143
|
-
relativeUrls: true,
|
|
144
|
-
// We need to set the filename because otherwise our WebpackFileManager will receive an undefined path for the entry
|
|
145
|
-
filename: loaderContext.resourcePath,
|
|
146
|
-
...options
|
|
147
|
-
};
|
|
148
|
-
const plugins = lessOptions.plugins.slice();
|
|
149
|
-
const shouldUseWebpackImporter = typeof loaderOptions.webpackImporter === "boolean" || loaderOptions.webpackImporter === "only" ? loaderOptions.webpackImporter : true;
|
|
150
|
-
if (shouldUseWebpackImporter) {
|
|
151
|
-
plugins.unshift(createWebpackLessPlugin(loaderContext, implementation));
|
|
152
|
-
}
|
|
153
|
-
plugins.unshift({
|
|
154
|
-
install(lessProcessor, pluginManager) {
|
|
155
|
-
// eslint-disable-next-line no-param-reassign
|
|
156
|
-
pluginManager.webpackLoaderContext = loaderContext;
|
|
157
|
-
lessOptions.pluginManager = pluginManager;
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
lessOptions.plugins = plugins;
|
|
161
|
-
return lessOptions;
|
|
162
|
-
}
|
|
163
|
-
function isUnsupportedUrl(url) {
|
|
164
|
-
// Is Windows path
|
|
165
|
-
if (IS_NATIVE_WIN32_PATH.test(url)) {
|
|
166
|
-
return false;
|
|
167
|
-
}
|
|
168
|
-
// Scheme: https://tools.ietf.org/html/rfc3986#section-3.1
|
|
169
|
-
// Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3
|
|
170
|
-
return /^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(url);
|
|
171
|
-
}
|
|
172
|
-
function normalizeSourceMap(map) {
|
|
173
|
-
const newMap = map;
|
|
174
|
-
// map.file is an optional property that provides the output filename.
|
|
175
|
-
// Since we don't know the final filename in the webpack build chain yet, it makes no sense to have it.
|
|
176
|
-
// eslint-disable-next-line no-param-reassign
|
|
177
|
-
delete newMap.file;
|
|
178
|
-
// eslint-disable-next-line no-param-reassign
|
|
179
|
-
newMap.sourceRoot = "";
|
|
180
|
-
// `less` returns POSIX paths, that's why we need to transform them back to native paths.
|
|
181
|
-
// eslint-disable-next-line no-param-reassign
|
|
182
|
-
newMap.sources = newMap.sources.map(source => _path.default.normalize(source));
|
|
183
|
-
return newMap;
|
|
184
|
-
}
|
|
185
|
-
function getLessImplementation(loaderContext, implementation) {
|
|
186
|
-
let resolvedImplementation = implementation;
|
|
187
|
-
if (!implementation) {
|
|
188
|
-
// eslint-disable-next-line import/no-dynamic-require, global-require
|
|
189
|
-
resolvedImplementation = require("less/lib/less-node/index.js").default;
|
|
190
|
-
}
|
|
191
|
-
else if (typeof implementation === "string") {
|
|
192
|
-
// eslint-disable-next-line import/no-dynamic-require, global-require
|
|
193
|
-
resolvedImplementation = require(implementation);
|
|
194
|
-
}
|
|
195
|
-
// eslint-disable-next-line consistent-return
|
|
196
|
-
return resolvedImplementation;
|
|
197
|
-
}
|
|
198
|
-
function getFileExcerptIfPossible(error) {
|
|
199
|
-
if (typeof error.extract === "undefined") {
|
|
200
|
-
return [];
|
|
201
|
-
}
|
|
202
|
-
const excerpt = error.extract.slice(0, 2);
|
|
203
|
-
const column = Math.max(error.column - 1, 0);
|
|
204
|
-
if (typeof excerpt[0] === "undefined") {
|
|
205
|
-
excerpt.shift();
|
|
206
|
-
}
|
|
207
|
-
excerpt.push(`${new Array(column).join(" ")}^`);
|
|
208
|
-
return excerpt;
|
|
209
|
-
}
|
|
210
|
-
function errorFactory(error) {
|
|
211
|
-
const message = ["\n", ...getFileExcerptIfPossible(error), error.message.charAt(0).toUpperCase() + error.message.slice(1), error.filename ? ` Error in ${_path.default.normalize(error.filename)} (line ${error.line}, column ${error.column})` : ""].join("\n");
|
|
212
|
-
const obj = new Error(message, {
|
|
213
|
-
cause: error
|
|
214
|
-
});
|
|
215
|
-
obj.stack = null;
|
|
216
|
-
return obj;
|
|
217
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import micromatch from "micromatch";
|
|
2
|
-
import * as path from "path";
|
|
3
|
-
import * as fs from "./fsPolyfill";
|
|
4
|
-
const walkSync = (currentDir, rootDir, entries) => {
|
|
5
|
-
let list;
|
|
6
|
-
try {
|
|
7
|
-
list = fs.readdirSync(currentDir, { withFileTypes: true });
|
|
8
|
-
}
|
|
9
|
-
catch (e) {
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
for (const entry of list) {
|
|
13
|
-
const fullPath = path.join(currentDir, entry.name);
|
|
14
|
-
const relativePath = path.relative(rootDir, fullPath);
|
|
15
|
-
if (entry.isDirectory()) {
|
|
16
|
-
walkSync(fullPath, rootDir, entries);
|
|
17
|
-
}
|
|
18
|
-
else if (entry.isFile()) {
|
|
19
|
-
entries.push(relativePath);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
const fastGlob = (patterns, options = {}) => {
|
|
24
|
-
return Promise.resolve(fastGlob.sync(patterns, options));
|
|
25
|
-
};
|
|
26
|
-
fastGlob.sync = (patterns, options = {}) => {
|
|
27
|
-
const cwd = options.cwd || "/";
|
|
28
|
-
const ignore = options.ignore || [];
|
|
29
|
-
const allFiles = [];
|
|
30
|
-
walkSync(cwd, cwd, allFiles);
|
|
31
|
-
const matched = micromatch(allFiles, patterns, {
|
|
32
|
-
ignore: ignore,
|
|
33
|
-
dot: options.dot,
|
|
34
|
-
cwd: cwd,
|
|
35
|
-
});
|
|
36
|
-
if (options.absolute) {
|
|
37
|
-
return matched.map((p) => path.join(cwd, p));
|
|
38
|
-
}
|
|
39
|
-
return matched;
|
|
40
|
-
};
|
|
41
|
-
fastGlob.stream = (patterns, options = {}) => {
|
|
42
|
-
throw new Error("fastGlob.stream is not implemented in polyfill");
|
|
43
|
-
};
|
|
44
|
-
fastGlob.async = fastGlob;
|
|
45
|
-
fastGlob.generateTasks = () => [];
|
|
46
|
-
fastGlob.isDynamicPattern = (p) => micromatch.scan(p).isGlob;
|
|
47
|
-
fastGlob.escapePath = (p) => p.replace(/([*?|(){}[\]])/g, "\\$1");
|
|
48
|
-
export default fastGlob;
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import { Buffer } from "buffer";
|
|
2
|
-
export declare function readFile(path: string, options: any, cb: Function): void;
|
|
3
|
-
export declare function readFileSync(path: string, options: any): string | Buffer<any>;
|
|
4
|
-
export declare function readdirSync(path: string, options?: any): any;
|
|
5
|
-
export declare function readdir(path: string, options: any, cb: Function): void;
|
|
6
|
-
export declare function writeFileSync(path: string, data: string | Uint8Array, options?: any): void;
|
|
7
|
-
export declare function writeFile(path: string, data: string | Uint8Array, options: any, cb: Function): void;
|
|
8
|
-
export declare function mkdirSync(path: string, options?: any): void;
|
|
9
|
-
export declare function mkdir(path: string, options: any, cb: Function): void;
|
|
10
|
-
export declare function rmSync(path: string, options?: any): void;
|
|
11
|
-
export declare function rm(path: string, options: any, cb: Function): void;
|
|
12
|
-
export declare function rmdirSync(path: string, options?: any): void;
|
|
13
|
-
export declare function rmdir(path: string, options: any, cb: Function): void;
|
|
14
|
-
export declare function copyFileSync(src: string, dst: string): void;
|
|
15
|
-
export declare function copyFile(src: string, dst: string, cb: Function): void;
|
|
16
|
-
export declare function statSync(p: string): {
|
|
17
|
-
isDirectory: () => any;
|
|
18
|
-
isFile: () => any;
|
|
19
|
-
isSymbolicLink: () => any;
|
|
20
|
-
size: number;
|
|
21
|
-
mtime: Date;
|
|
22
|
-
};
|
|
23
|
-
export declare function lstatSync(p: string): {
|
|
24
|
-
isDirectory: () => any;
|
|
25
|
-
isFile: () => any;
|
|
26
|
-
isSymbolicLink: () => any;
|
|
27
|
-
size: number;
|
|
28
|
-
mtime: Date;
|
|
29
|
-
};
|
|
30
|
-
export declare function stat(path: string, cb: Function): void;
|
|
31
|
-
export declare function lstat(path: string, cb: Function): void;
|
|
32
|
-
export declare function realpathSync(p: string): string;
|
|
33
|
-
export declare function realpath(p: string, cb: Function): void;
|
|
34
|
-
export declare function accessSync(path: string, mode?: number): void;
|
|
35
|
-
export declare function access(path: string, mode: number | Function, cb?: Function): void;
|
|
36
|
-
export declare function existsSync(path: string): boolean;
|
|
37
|
-
export declare const promises: {
|
|
38
|
-
readFile: (path: string, options?: any) => Promise<string | Buffer<any>>;
|
|
39
|
-
writeFile: (path: string, data: string | Uint8Array, options?: any) => Promise<void>;
|
|
40
|
-
readdir: (path: string, options?: any) => Promise<any>;
|
|
41
|
-
mkdir: (path: string, options?: any) => Promise<void>;
|
|
42
|
-
rm: (path: string, options?: any) => Promise<void>;
|
|
43
|
-
rmdir: (path: string, options?: any) => Promise<void>;
|
|
44
|
-
copyFile: (src: string, dst: string) => Promise<void>;
|
|
45
|
-
stat: (p: string) => Promise<{
|
|
46
|
-
isDirectory: () => any;
|
|
47
|
-
isFile: () => any;
|
|
48
|
-
isSymbolicLink: () => any;
|
|
49
|
-
size: number;
|
|
50
|
-
mtime: Date;
|
|
51
|
-
}>;
|
|
52
|
-
lstat: (p: string) => Promise<{
|
|
53
|
-
isDirectory: () => any;
|
|
54
|
-
isFile: () => any;
|
|
55
|
-
isSymbolicLink: () => any;
|
|
56
|
-
size: number;
|
|
57
|
-
mtime: Date;
|
|
58
|
-
}>;
|
|
59
|
-
realpath: (p: string) => Promise<string>;
|
|
60
|
-
access: (path: string, mode?: number) => Promise<void>;
|
|
61
|
-
};
|
|
62
|
-
export declare const constants: {
|
|
63
|
-
F_OK: number;
|
|
64
|
-
R_OK: number;
|
|
65
|
-
W_OK: number;
|
|
66
|
-
X_OK: number;
|
|
67
|
-
};
|
|
68
|
-
declare const _default: {
|
|
69
|
-
readFile: typeof readFile;
|
|
70
|
-
readFileSync: typeof readFileSync;
|
|
71
|
-
readdir: typeof readdir;
|
|
72
|
-
readdirSync: typeof readdirSync;
|
|
73
|
-
writeFile: typeof writeFile;
|
|
74
|
-
writeFileSync: typeof writeFileSync;
|
|
75
|
-
mkdir: typeof mkdir;
|
|
76
|
-
mkdirSync: typeof mkdirSync;
|
|
77
|
-
rm: typeof rm;
|
|
78
|
-
rmSync: typeof rmSync;
|
|
79
|
-
rmdir: typeof rmdir;
|
|
80
|
-
rmdirSync: typeof rmdirSync;
|
|
81
|
-
copyFile: typeof copyFile;
|
|
82
|
-
copyFileSync: typeof copyFileSync;
|
|
83
|
-
stat: typeof stat;
|
|
84
|
-
statSync: typeof statSync;
|
|
85
|
-
lstat: typeof lstat;
|
|
86
|
-
lstatSync: typeof lstatSync;
|
|
87
|
-
realpath: typeof realpath;
|
|
88
|
-
realpathSync: typeof realpathSync;
|
|
89
|
-
access: typeof access;
|
|
90
|
-
accessSync: typeof accessSync;
|
|
91
|
-
existsSync: typeof existsSync;
|
|
92
|
-
promises: {
|
|
93
|
-
readFile: (path: string, options?: any) => Promise<string | Buffer<any>>;
|
|
94
|
-
writeFile: (path: string, data: string | Uint8Array, options?: any) => Promise<void>;
|
|
95
|
-
readdir: (path: string, options?: any) => Promise<any>;
|
|
96
|
-
mkdir: (path: string, options?: any) => Promise<void>;
|
|
97
|
-
rm: (path: string, options?: any) => Promise<void>;
|
|
98
|
-
rmdir: (path: string, options?: any) => Promise<void>;
|
|
99
|
-
copyFile: (src: string, dst: string) => Promise<void>;
|
|
100
|
-
stat: (p: string) => Promise<{
|
|
101
|
-
isDirectory: () => any;
|
|
102
|
-
isFile: () => any;
|
|
103
|
-
isSymbolicLink: () => any;
|
|
104
|
-
size: number;
|
|
105
|
-
mtime: Date;
|
|
106
|
-
}>;
|
|
107
|
-
lstat: (p: string) => Promise<{
|
|
108
|
-
isDirectory: () => any;
|
|
109
|
-
isFile: () => any;
|
|
110
|
-
isSymbolicLink: () => any;
|
|
111
|
-
size: number;
|
|
112
|
-
mtime: Date;
|
|
113
|
-
}>;
|
|
114
|
-
realpath: (p: string) => Promise<string>;
|
|
115
|
-
access: (path: string, mode?: number) => Promise<void>;
|
|
116
|
-
};
|
|
117
|
-
constants: {
|
|
118
|
-
F_OK: number;
|
|
119
|
-
R_OK: number;
|
|
120
|
-
W_OK: number;
|
|
121
|
-
X_OK: number;
|
|
122
|
-
};
|
|
123
|
-
};
|
|
124
|
-
export default _default;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { promises } from "./fsPolyfill";
|
|
2
|
-
export declare const readFile: (path: string, options?: any) => Promise<string | Buffer<any>>;
|
|
3
|
-
export declare const writeFile: (path: string, data: string | Uint8Array, options?: any) => Promise<void>;
|
|
4
|
-
export declare const readdir: (path: string, options?: any) => Promise<any>;
|
|
5
|
-
export declare const mkdir: (path: string, options?: any) => Promise<void>;
|
|
6
|
-
export declare const rm: (path: string, options?: any) => Promise<void>;
|
|
7
|
-
export declare const rmdir: (path: string, options?: any) => Promise<void>;
|
|
8
|
-
export declare const copyFile: (src: string, dst: string) => Promise<void>;
|
|
9
|
-
export default promises;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { promises } from "./fsPolyfill";
|
|
2
|
-
export const readFile = promises.readFile;
|
|
3
|
-
export const writeFile = promises.writeFile;
|
|
4
|
-
export const readdir = promises.readdir;
|
|
5
|
-
export const mkdir = promises.mkdir;
|
|
6
|
-
export const rm = promises.rm;
|
|
7
|
-
export const rmdir = promises.rmdir;
|
|
8
|
-
export const copyFile = promises.copyFile;
|
|
9
|
-
export default promises;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|