diff options
author | 2020-11-16 00:10:28 +0100 | |
---|---|---|
committer | 2020-11-16 00:10:28 +0100 | |
commit | e06ec920f7a5d784e674c4c4b4e6d1da3dc7391d (patch) | |
tree | 55713f725f77b44ebfec86e4eec3ce33e71458ca /node_modules/@nodelib/fs.stat/out | |
download | website_creator-e06ec920f7a5d784e674c4c4b4e6d1da3dc7391d.tar.gz website_creator-e06ec920f7a5d784e674c4c4b4e6d1da3dc7391d.tar.bz2 website_creator-e06ec920f7a5d784e674c4c4b4e6d1da3dc7391d.zip |
api, login, auth
Diffstat (limited to 'node_modules/@nodelib/fs.stat/out')
-rw-r--r-- | node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts | 11 | ||||
-rw-r--r-- | node_modules/@nodelib/fs.stat/out/adapters/fs.js | 16 | ||||
-rw-r--r-- | node_modules/@nodelib/fs.stat/out/index.d.ts | 13 | ||||
-rw-r--r-- | node_modules/@nodelib/fs.stat/out/index.js | 24 | ||||
-rw-r--r-- | node_modules/@nodelib/fs.stat/out/providers/async.d.ts | 5 | ||||
-rw-r--r-- | node_modules/@nodelib/fs.stat/out/providers/async.js | 31 | ||||
-rw-r--r-- | node_modules/@nodelib/fs.stat/out/providers/sync.d.ts | 4 | ||||
-rw-r--r-- | node_modules/@nodelib/fs.stat/out/providers/sync.js | 22 | ||||
-rw-r--r-- | node_modules/@nodelib/fs.stat/out/settings.d.ts | 17 | ||||
-rw-r--r-- | node_modules/@nodelib/fs.stat/out/settings.js | 16 | ||||
-rw-r--r-- | node_modules/@nodelib/fs.stat/out/types/index.d.ts | 5 | ||||
-rw-r--r-- | node_modules/@nodelib/fs.stat/out/types/index.js | 2 |
12 files changed, 166 insertions, 0 deletions
diff --git a/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts b/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts new file mode 100644 index 0000000..d17b356 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts @@ -0,0 +1,11 @@ +/// <reference types="node" />
+import * as fs from 'fs';
+export declare type FileSystemAdapter = {
+ lstat: typeof fs.lstat;
+ stat: typeof fs.stat;
+ lstatSync: typeof fs.lstatSync;
+ statSync: typeof fs.statSync;
+};
+export declare const FILE_SYSTEM_ADAPTER: FileSystemAdapter;
+export declare function createFileSystemAdapter(fsMethods?: Partial<FileSystemAdapter>): FileSystemAdapter;
+//# sourceMappingURL=fs.d.ts.map
\ No newline at end of file diff --git a/node_modules/@nodelib/fs.stat/out/adapters/fs.js b/node_modules/@nodelib/fs.stat/out/adapters/fs.js new file mode 100644 index 0000000..3a9806f --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/adapters/fs.js @@ -0,0 +1,16 @@ +"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const fs = require("fs");
+exports.FILE_SYSTEM_ADAPTER = {
+ lstat: fs.lstat,
+ stat: fs.stat,
+ lstatSync: fs.lstatSync,
+ statSync: fs.statSync
+};
+function createFileSystemAdapter(fsMethods) {
+ if (fsMethods === undefined) {
+ return exports.FILE_SYSTEM_ADAPTER;
+ }
+ return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
+}
+exports.createFileSystemAdapter = createFileSystemAdapter;
diff --git a/node_modules/@nodelib/fs.stat/out/index.d.ts b/node_modules/@nodelib/fs.stat/out/index.d.ts new file mode 100644 index 0000000..5f092f9 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/index.d.ts @@ -0,0 +1,13 @@ +import { FileSystemAdapter } from './adapters/fs';
+import * as async from './providers/async';
+import Settings, { Options } from './settings';
+import { Stats } from './types';
+declare type AsyncCallback = async.AsyncCallback;
+declare function stat(path: string, callback: AsyncCallback): void;
+declare function stat(path: string, optionsOrSettings: Options | Settings, callback: AsyncCallback): void;
+declare namespace stat {
+ function __promisify__(path: string, optionsOrSettings?: Options | Settings): Promise<Stats>;
+}
+declare function statSync(path: string, optionsOrSettings?: Options | Settings): Stats;
+export { Settings, stat, statSync, AsyncCallback, FileSystemAdapter, Options, Stats };
+//# sourceMappingURL=index.d.ts.map
\ No newline at end of file diff --git a/node_modules/@nodelib/fs.stat/out/index.js b/node_modules/@nodelib/fs.stat/out/index.js new file mode 100644 index 0000000..6a98f77 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/index.js @@ -0,0 +1,24 @@ +"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const async = require("./providers/async");
+const sync = require("./providers/sync");
+const settings_1 = require("./settings");
+exports.Settings = settings_1.default;
+function stat(path, optionsOrSettingsOrCallback, callback) {
+ if (typeof optionsOrSettingsOrCallback === 'function') {
+ return async.read(path, getSettings(), optionsOrSettingsOrCallback);
+ }
+ async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
+}
+exports.stat = stat;
+function statSync(path, optionsOrSettings) {
+ const settings = getSettings(optionsOrSettings);
+ return sync.read(path, settings);
+}
+exports.statSync = statSync;
+function getSettings(settingsOrOptions = {}) {
+ if (settingsOrOptions instanceof settings_1.default) {
+ return settingsOrOptions;
+ }
+ return new settings_1.default(settingsOrOptions);
+}
diff --git a/node_modules/@nodelib/fs.stat/out/providers/async.d.ts b/node_modules/@nodelib/fs.stat/out/providers/async.d.ts new file mode 100644 index 0000000..a9637c5 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/providers/async.d.ts @@ -0,0 +1,5 @@ +import Settings from '../settings';
+import { ErrnoException, Stats } from '../types';
+export declare type AsyncCallback = (err: ErrnoException, stats: Stats) => void;
+export declare function read(path: string, settings: Settings, callback: AsyncCallback): void;
+//# sourceMappingURL=async.d.ts.map
\ No newline at end of file diff --git a/node_modules/@nodelib/fs.stat/out/providers/async.js b/node_modules/@nodelib/fs.stat/out/providers/async.js new file mode 100644 index 0000000..ab98c29 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/providers/async.js @@ -0,0 +1,31 @@ +"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+function read(path, settings, callback) {
+ settings.fs.lstat(path, (lstatError, lstat) => {
+ if (lstatError !== null) {
+ return callFailureCallback(callback, lstatError);
+ }
+ if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
+ return callSuccessCallback(callback, lstat);
+ }
+ settings.fs.stat(path, (statError, stat) => {
+ if (statError !== null) {
+ if (settings.throwErrorOnBrokenSymbolicLink) {
+ return callFailureCallback(callback, statError);
+ }
+ return callSuccessCallback(callback, lstat);
+ }
+ if (settings.markSymbolicLink) {
+ stat.isSymbolicLink = () => true;
+ }
+ callSuccessCallback(callback, stat);
+ });
+ });
+}
+exports.read = read;
+function callFailureCallback(callback, error) {
+ callback(error);
+}
+function callSuccessCallback(callback, result) {
+ callback(null, result);
+}
diff --git a/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts b/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts new file mode 100644 index 0000000..f4c1d78 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts @@ -0,0 +1,4 @@ +import Settings from '../settings';
+import { Stats } from '../types';
+export declare function read(path: string, settings: Settings): Stats;
+//# sourceMappingURL=sync.d.ts.map
\ No newline at end of file diff --git a/node_modules/@nodelib/fs.stat/out/providers/sync.js b/node_modules/@nodelib/fs.stat/out/providers/sync.js new file mode 100644 index 0000000..31dab38 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/providers/sync.js @@ -0,0 +1,22 @@ +"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+function read(path, settings) {
+ const lstat = settings.fs.lstatSync(path);
+ if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
+ return lstat;
+ }
+ try {
+ const stat = settings.fs.statSync(path);
+ if (settings.markSymbolicLink) {
+ stat.isSymbolicLink = () => true;
+ }
+ return stat;
+ }
+ catch (error) {
+ if (!settings.throwErrorOnBrokenSymbolicLink) {
+ return lstat;
+ }
+ throw error;
+ }
+}
+exports.read = read;
diff --git a/node_modules/@nodelib/fs.stat/out/settings.d.ts b/node_modules/@nodelib/fs.stat/out/settings.d.ts new file mode 100644 index 0000000..34c4620 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/settings.d.ts @@ -0,0 +1,17 @@ +import * as fs from './adapters/fs';
+export declare type Options = {
+ followSymbolicLink?: boolean;
+ fs?: Partial<fs.FileSystemAdapter>;
+ markSymbolicLink?: boolean;
+ throwErrorOnBrokenSymbolicLink?: boolean;
+};
+export default class Settings {
+ private readonly _options;
+ readonly followSymbolicLink: boolean;
+ readonly fs: fs.FileSystemAdapter;
+ readonly markSymbolicLink: boolean;
+ readonly throwErrorOnBrokenSymbolicLink: boolean;
+ constructor(_options?: Options);
+ private _getValue;
+}
+//# sourceMappingURL=settings.d.ts.map
\ No newline at end of file diff --git a/node_modules/@nodelib/fs.stat/out/settings.js b/node_modules/@nodelib/fs.stat/out/settings.js new file mode 100644 index 0000000..ef4d057 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/settings.js @@ -0,0 +1,16 @@ +"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const fs = require("./adapters/fs");
+class Settings {
+ constructor(_options = {}) {
+ this._options = _options;
+ this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
+ this.fs = fs.createFileSystemAdapter(this._options.fs);
+ this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
+ this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
+ }
+ _getValue(option, value) {
+ return option === undefined ? value : option;
+ }
+}
+exports.default = Settings;
diff --git a/node_modules/@nodelib/fs.stat/out/types/index.d.ts b/node_modules/@nodelib/fs.stat/out/types/index.d.ts new file mode 100644 index 0000000..227f7bf --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/types/index.d.ts @@ -0,0 +1,5 @@ +/// <reference types="node" />
+import * as fs from 'fs';
+export declare type Stats = fs.Stats;
+export declare type ErrnoException = NodeJS.ErrnoException;
+//# sourceMappingURL=index.d.ts.map
\ No newline at end of file diff --git a/node_modules/@nodelib/fs.stat/out/types/index.js b/node_modules/@nodelib/fs.stat/out/types/index.js new file mode 100644 index 0000000..ce03781 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/types/index.js @@ -0,0 +1,2 @@ +"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
|