Remove unnecessary resources, add bulma, and add AdvMakefile
This commit is contained in:
11
bulma/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts
generated
vendored
Normal file
11
bulma/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts
generated
vendored
Normal file
@@ -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
|
||||
1
bulma/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts.map
generated
vendored
Normal file
1
bulma/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../src/adapters/fs.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB,oBAAY,iBAAiB,GAAG;IAC/B,KAAK,EAAE,OAAO,EAAE,CAAC,KAAK,CAAC;IACvB,IAAI,EAAE,OAAO,EAAE,CAAC,IAAI,CAAC;IACrB,SAAS,EAAE,OAAO,EAAE,CAAC,SAAS,CAAC;IAC/B,QAAQ,EAAE,OAAO,EAAE,CAAC,QAAQ,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,iBAKjC,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,iBAAiB,CASjG"}
|
||||
17
bulma/node_modules/@nodelib/fs.stat/out/adapters/fs.js
generated
vendored
Normal file
17
bulma/node_modules/@nodelib/fs.stat/out/adapters/fs.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
|
||||
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;
|
||||
2
bulma/node_modules/@nodelib/fs.stat/out/adapters/fs.spec.d.ts
generated
vendored
Normal file
2
bulma/node_modules/@nodelib/fs.stat/out/adapters/fs.spec.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export {};
|
||||
//# sourceMappingURL=fs.spec.d.ts.map
|
||||
1
bulma/node_modules/@nodelib/fs.stat/out/adapters/fs.spec.d.ts.map
generated
vendored
Normal file
1
bulma/node_modules/@nodelib/fs.stat/out/adapters/fs.spec.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"fs.spec.d.ts","sourceRoot":"","sources":["../../src/adapters/fs.spec.ts"],"names":[],"mappings":""}
|
||||
20
bulma/node_modules/@nodelib/fs.stat/out/adapters/fs.spec.js
generated
vendored
Normal file
20
bulma/node_modules/@nodelib/fs.stat/out/adapters/fs.spec.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const assert = require("assert");
|
||||
const fs_macchiato_1 = require("../../../fs.macchiato");
|
||||
const adapter = require("./fs");
|
||||
describe('Adapters → FileSystem', () => {
|
||||
it('should return original FS methods', () => {
|
||||
const expected = adapter.FILE_SYSTEM_ADAPTER;
|
||||
const actual = adapter.createFileSystemAdapter();
|
||||
assert.deepStrictEqual(actual, expected);
|
||||
});
|
||||
it('should return custom FS methods', () => {
|
||||
const customLstatSyncMethod = () => new fs_macchiato_1.Stats();
|
||||
const expected = Object.assign(Object.assign({}, adapter.FILE_SYSTEM_ADAPTER), { lstatSync: customLstatSyncMethod });
|
||||
const actual = adapter.createFileSystemAdapter({
|
||||
lstatSync: customLstatSyncMethod
|
||||
});
|
||||
assert.deepStrictEqual(actual, expected);
|
||||
});
|
||||
});
|
||||
13
bulma/node_modules/@nodelib/fs.stat/out/index.d.ts
generated
vendored
Normal file
13
bulma/node_modules/@nodelib/fs.stat/out/index.d.ts
generated
vendored
Normal file
@@ -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
|
||||
1
bulma/node_modules/@nodelib/fs.stat/out/index.d.ts.map
generated
vendored
Normal file
1
bulma/node_modules/@nodelib/fs.stat/out/index.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAE3C,OAAO,QAAQ,EAAE,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,aAAK,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC;AAEzC,iBAAS,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAC;AAC3D,iBAAS,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,GAAG,QAAQ,EAAE,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAC;AAWlG,OAAO,WAAW,IAAI,CAAC;IACtB,SAAS,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;CAC7F;AAED,iBAAS,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAI7E;AAUD,OAAO,EACN,QAAQ,EACR,IAAI,EACJ,QAAQ,EAIR,aAAa,EACb,iBAAiB,EACjB,OAAO,EACP,KAAK,EACL,CAAC"}
|
||||
25
bulma/node_modules/@nodelib/fs.stat/out/index.js
generated
vendored
Normal file
25
bulma/node_modules/@nodelib/fs.stat/out/index.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.statSync = exports.stat = exports.Settings = void 0;
|
||||
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);
|
||||
}
|
||||
2
bulma/node_modules/@nodelib/fs.stat/out/index.spec.d.ts
generated
vendored
Normal file
2
bulma/node_modules/@nodelib/fs.stat/out/index.spec.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export {};
|
||||
//# sourceMappingURL=index.spec.d.ts.map
|
||||
1
bulma/node_modules/@nodelib/fs.stat/out/index.spec.d.ts.map
generated
vendored
Normal file
1
bulma/node_modules/@nodelib/fs.stat/out/index.spec.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.spec.d.ts","sourceRoot":"","sources":["../src/index.spec.ts"],"names":[],"mappings":""}
|
||||
56
bulma/node_modules/@nodelib/fs.stat/out/index.spec.js
generated
vendored
Normal file
56
bulma/node_modules/@nodelib/fs.stat/out/index.spec.js
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const assert = require("assert");
|
||||
const fs = require("fs");
|
||||
const rimraf = require("rimraf");
|
||||
const _1 = require(".");
|
||||
describe('Package', () => {
|
||||
before(() => {
|
||||
rimraf.sync('fixtures');
|
||||
fs.mkdirSync('fixtures');
|
||||
fs.mkdirSync('fixtures/a');
|
||||
fs.symlinkSync('a', 'fixtures/b', 'junction');
|
||||
});
|
||||
after(() => {
|
||||
rimraf.sync('fixtures');
|
||||
});
|
||||
describe('.stat', () => {
|
||||
it('should work without options or settings', (done) => {
|
||||
_1.stat('fixtures/b', (error, stats) => {
|
||||
assert.strictEqual(error, null);
|
||||
assert.ok(stats);
|
||||
done();
|
||||
});
|
||||
});
|
||||
it('should work with options', (done) => {
|
||||
_1.stat('fixtures/b', { markSymbolicLink: true }, (error, stats) => {
|
||||
assert.strictEqual(error, null);
|
||||
assert.strictEqual(stats.isSymbolicLink(), true);
|
||||
done();
|
||||
});
|
||||
});
|
||||
it('should work with settings', (done) => {
|
||||
const settings = new _1.Settings({ markSymbolicLink: true });
|
||||
_1.stat('fixtures/b', settings, (error, stats) => {
|
||||
assert.strictEqual(error, null);
|
||||
assert.strictEqual(stats.isSymbolicLink(), true);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('.statSync', () => {
|
||||
it('should work without options or settings', () => {
|
||||
const actual = _1.statSync('fixtures/b');
|
||||
assert.ok(actual);
|
||||
});
|
||||
it('should work with options', () => {
|
||||
const actual = _1.statSync('fixtures/b', { markSymbolicLink: true });
|
||||
assert.strictEqual(actual.isSymbolicLink(), true);
|
||||
});
|
||||
it('should work with settings', () => {
|
||||
const settings = new _1.Settings({ markSymbolicLink: true });
|
||||
const actual = _1.statSync('fixtures/b', settings);
|
||||
assert.strictEqual(actual.isSymbolicLink(), true);
|
||||
});
|
||||
});
|
||||
});
|
||||
5
bulma/node_modules/@nodelib/fs.stat/out/providers/async.d.ts
generated
vendored
Normal file
5
bulma/node_modules/@nodelib/fs.stat/out/providers/async.d.ts
generated
vendored
Normal file
@@ -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
|
||||
1
bulma/node_modules/@nodelib/fs.stat/out/providers/async.d.ts.map
generated
vendored
Normal file
1
bulma/node_modules/@nodelib/fs.stat/out/providers/async.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../../src/providers/async.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAKjD,oBAAY,aAAa,GAAG,CAAC,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;AAExE,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,GAAG,IAAI,CA0BpF"}
|
||||
32
bulma/node_modules/@nodelib/fs.stat/out/providers/async.js
generated
vendored
Normal file
32
bulma/node_modules/@nodelib/fs.stat/out/providers/async.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.read = void 0;
|
||||
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);
|
||||
}
|
||||
2
bulma/node_modules/@nodelib/fs.stat/out/providers/async.spec.d.ts
generated
vendored
Normal file
2
bulma/node_modules/@nodelib/fs.stat/out/providers/async.spec.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export {};
|
||||
//# sourceMappingURL=async.spec.d.ts.map
|
||||
1
bulma/node_modules/@nodelib/fs.stat/out/providers/async.spec.d.ts.map
generated
vendored
Normal file
1
bulma/node_modules/@nodelib/fs.stat/out/providers/async.spec.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"async.spec.d.ts","sourceRoot":"","sources":["../../src/providers/async.spec.ts"],"names":[],"mappings":""}
|
||||
83
bulma/node_modules/@nodelib/fs.stat/out/providers/async.spec.js
generated
vendored
Normal file
83
bulma/node_modules/@nodelib/fs.stat/out/providers/async.spec.js
generated
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const assert = require("assert");
|
||||
const sinon = require("sinon");
|
||||
const fs_macchiato_1 = require("../../../fs.macchiato");
|
||||
const settings_1 = require("../settings");
|
||||
const provider = require("./async");
|
||||
describe('Providers → Async', () => {
|
||||
describe('.read', () => {
|
||||
it('should return lstat for non-symlink entry', (done) => {
|
||||
const lstat = sinon.stub().yields(null, new fs_macchiato_1.Stats());
|
||||
const settings = new settings_1.default({
|
||||
fs: { lstat }
|
||||
});
|
||||
provider.read('filepath', settings, (error, stats) => {
|
||||
assert.strictEqual(error, null);
|
||||
assert.strictEqual(stats.ino, 0);
|
||||
done();
|
||||
});
|
||||
});
|
||||
it('should return lstat for symlink entry when the "followSymbolicLink" option is disabled', (done) => {
|
||||
const lstat = sinon.stub().yields(null, new fs_macchiato_1.Stats({ isSymbolicLink: true }));
|
||||
const settings = new settings_1.default({
|
||||
followSymbolicLink: false,
|
||||
fs: { lstat }
|
||||
});
|
||||
provider.read('filepath', settings, (error, stats) => {
|
||||
assert.strictEqual(error, null);
|
||||
assert.strictEqual(stats.ino, 0);
|
||||
done();
|
||||
});
|
||||
});
|
||||
it('should return stat for symlink entry', (done) => {
|
||||
const lstat = sinon.stub().yields(null, new fs_macchiato_1.Stats({ isSymbolicLink: true }));
|
||||
const stat = sinon.stub().yields(null, new fs_macchiato_1.Stats({ ino: 1 }));
|
||||
const settings = new settings_1.default({
|
||||
fs: { lstat, stat }
|
||||
});
|
||||
provider.read('filepath', settings, (error, stats) => {
|
||||
assert.strictEqual(error, null);
|
||||
assert.strictEqual(stats.ino, 1);
|
||||
done();
|
||||
});
|
||||
});
|
||||
it('should return marked stat for symlink entry when the "markSymbolicLink" option is enabled', (done) => {
|
||||
const lstat = sinon.stub().yields(null, new fs_macchiato_1.Stats({ isSymbolicLink: true }));
|
||||
const stat = sinon.stub().yields(null, new fs_macchiato_1.Stats({ ino: 1 }));
|
||||
const settings = new settings_1.default({
|
||||
fs: { lstat, stat },
|
||||
markSymbolicLink: true
|
||||
});
|
||||
provider.read('filepath', settings, (error, stats) => {
|
||||
assert.strictEqual(error, null);
|
||||
assert.strictEqual(stats.isSymbolicLink(), true);
|
||||
done();
|
||||
});
|
||||
});
|
||||
it('should return lstat for broken symlink entry when the "throwErrorOnBrokenSymbolicLink" option is disabled', (done) => {
|
||||
const lstat = sinon.stub().yields(null, new fs_macchiato_1.Stats({ isSymbolicLink: true }));
|
||||
const stat = sinon.stub().yields(new Error());
|
||||
const settings = new settings_1.default({
|
||||
fs: { lstat, stat },
|
||||
throwErrorOnBrokenSymbolicLink: false
|
||||
});
|
||||
provider.read('filepath', settings, (error, stats) => {
|
||||
assert.strictEqual(error, null);
|
||||
assert.strictEqual(stats.ino, 0);
|
||||
done();
|
||||
});
|
||||
});
|
||||
it('should throw an error when symlink entry is broken', (done) => {
|
||||
const lstat = sinon.stub().yields(null, new fs_macchiato_1.Stats({ isSymbolicLink: true }));
|
||||
const stat = sinon.stub().yields(new Error('broken'));
|
||||
const settings = new settings_1.default({
|
||||
fs: { lstat, stat }
|
||||
});
|
||||
provider.read('filepath', settings, (error) => {
|
||||
assert.strictEqual(error.message, 'broken');
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
4
bulma/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts
generated
vendored
Normal file
4
bulma/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts
generated
vendored
Normal file
@@ -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
|
||||
1
bulma/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts.map
generated
vendored
Normal file
1
bulma/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/providers/sync.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,KAAK,CAsB5D"}
|
||||
23
bulma/node_modules/@nodelib/fs.stat/out/providers/sync.js
generated
vendored
Normal file
23
bulma/node_modules/@nodelib/fs.stat/out/providers/sync.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.read = void 0;
|
||||
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;
|
||||
2
bulma/node_modules/@nodelib/fs.stat/out/providers/sync.spec.d.ts
generated
vendored
Normal file
2
bulma/node_modules/@nodelib/fs.stat/out/providers/sync.spec.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export {};
|
||||
//# sourceMappingURL=sync.spec.d.ts.map
|
||||
1
bulma/node_modules/@nodelib/fs.stat/out/providers/sync.spec.d.ts.map
generated
vendored
Normal file
1
bulma/node_modules/@nodelib/fs.stat/out/providers/sync.spec.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"sync.spec.d.ts","sourceRoot":"","sources":["../../src/providers/sync.spec.ts"],"names":[],"mappings":""}
|
||||
66
bulma/node_modules/@nodelib/fs.stat/out/providers/sync.spec.js
generated
vendored
Normal file
66
bulma/node_modules/@nodelib/fs.stat/out/providers/sync.spec.js
generated
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const assert = require("assert");
|
||||
const sinon = require("sinon");
|
||||
const fs_macchiato_1 = require("../../../fs.macchiato");
|
||||
const settings_1 = require("../settings");
|
||||
const provider = require("./sync");
|
||||
describe('Providers → Sync', () => {
|
||||
describe('.read', () => {
|
||||
it('should return lstat for non-symlink entry', () => {
|
||||
const lstatSync = sinon.stub().returns(new fs_macchiato_1.Stats());
|
||||
const settings = new settings_1.default({
|
||||
fs: { lstatSync }
|
||||
});
|
||||
const actual = provider.read('filepath', settings);
|
||||
assert.strictEqual(actual.ino, 0);
|
||||
});
|
||||
it('should return lstat for symlink entry when the "followSymbolicLink" option is disabled', () => {
|
||||
const lstatSync = sinon.stub().returns(new fs_macchiato_1.Stats({ isSymbolicLink: true }));
|
||||
const settings = new settings_1.default({
|
||||
followSymbolicLink: false,
|
||||
fs: { lstatSync }
|
||||
});
|
||||
const actual = provider.read('filepath', settings);
|
||||
assert.strictEqual(actual.ino, 0);
|
||||
});
|
||||
it('should return stat for symlink entry', () => {
|
||||
const lstatSync = sinon.stub().returns(new fs_macchiato_1.Stats({ isSymbolicLink: true }));
|
||||
const statSync = sinon.stub().returns(new fs_macchiato_1.Stats({ ino: 1 }));
|
||||
const settings = new settings_1.default({
|
||||
fs: { lstatSync, statSync }
|
||||
});
|
||||
const actual = provider.read('filepath', settings);
|
||||
assert.strictEqual(actual.ino, 1);
|
||||
});
|
||||
it('should return marked stat for symlink entry when the "markSymbolicLink" option is enabled', () => {
|
||||
const lstatSync = sinon.stub().returns(new fs_macchiato_1.Stats({ isSymbolicLink: true }));
|
||||
const statSync = sinon.stub().returns(new fs_macchiato_1.Stats({ ino: 1 }));
|
||||
const settings = new settings_1.default({
|
||||
markSymbolicLink: true,
|
||||
fs: { lstatSync, statSync }
|
||||
});
|
||||
const actual = provider.read('filepath', settings);
|
||||
assert.strictEqual(actual.isSymbolicLink(), true);
|
||||
});
|
||||
it('should return lstat for broken symlink entry when the "throwErrorOnBrokenSymbolicLink" option is disabled', () => {
|
||||
const lstatSync = sinon.stub().returns(new fs_macchiato_1.Stats({ isSymbolicLink: true }));
|
||||
const statSync = sinon.stub().throws(new Error('error'));
|
||||
const settings = new settings_1.default({
|
||||
fs: { lstatSync, statSync },
|
||||
throwErrorOnBrokenSymbolicLink: false
|
||||
});
|
||||
const actual = provider.read('filepath', settings);
|
||||
assert.strictEqual(actual.ino, 0);
|
||||
});
|
||||
it('should throw an error when symlink entry is broken', () => {
|
||||
const lstatSync = sinon.stub().returns(new fs_macchiato_1.Stats({ isSymbolicLink: true }));
|
||||
const statSync = sinon.stub().throws(new Error('broken'));
|
||||
const settings = new settings_1.default({
|
||||
fs: { lstatSync, statSync }
|
||||
});
|
||||
const expectedErrorMessageRe = /broken/;
|
||||
assert.throws(() => provider.read('filepath', settings), expectedErrorMessageRe);
|
||||
});
|
||||
});
|
||||
});
|
||||
17
bulma/node_modules/@nodelib/fs.stat/out/settings.d.ts
generated
vendored
Normal file
17
bulma/node_modules/@nodelib/fs.stat/out/settings.d.ts
generated
vendored
Normal file
@@ -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
|
||||
1
bulma/node_modules/@nodelib/fs.stat/out/settings.d.ts.map
generated
vendored
Normal file
1
bulma/node_modules/@nodelib/fs.stat/out/settings.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,eAAe,CAAC;AAEpC,oBAAY,OAAO,GAAG;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAC;IACnC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,8BAA8B,CAAC,EAAE,OAAO,CAAC;CACzC,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,QAAQ;IAMhB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IALrC,SAAgB,kBAAkB,EAAE,OAAO,CAA0D;IACrG,SAAgB,EAAE,EAAE,EAAE,CAAC,iBAAiB,CAAgD;IACxF,SAAgB,gBAAgB,EAAE,OAAO,CAAyD;IAClG,SAAgB,8BAA8B,EAAE,OAAO,CAAsE;gBAEhG,QAAQ,GAAE,OAAY;IAEnD,OAAO,CAAC,SAAS;CAGjB"}
|
||||
16
bulma/node_modules/@nodelib/fs.stat/out/settings.js
generated
vendored
Normal file
16
bulma/node_modules/@nodelib/fs.stat/out/settings.js
generated
vendored
Normal file
@@ -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 !== null && option !== void 0 ? option : value;
|
||||
}
|
||||
}
|
||||
exports.default = Settings;
|
||||
2
bulma/node_modules/@nodelib/fs.stat/out/settings.spec.d.ts
generated
vendored
Normal file
2
bulma/node_modules/@nodelib/fs.stat/out/settings.spec.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export {};
|
||||
//# sourceMappingURL=settings.spec.d.ts.map
|
||||
1
bulma/node_modules/@nodelib/fs.stat/out/settings.spec.d.ts.map
generated
vendored
Normal file
1
bulma/node_modules/@nodelib/fs.stat/out/settings.spec.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"settings.spec.d.ts","sourceRoot":"","sources":["../src/settings.spec.ts"],"names":[],"mappings":""}
|
||||
26
bulma/node_modules/@nodelib/fs.stat/out/settings.spec.js
generated
vendored
Normal file
26
bulma/node_modules/@nodelib/fs.stat/out/settings.spec.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const assert = require("assert");
|
||||
const fs_macchiato_1 = require("../../fs.macchiato");
|
||||
const fs = require("./adapters/fs");
|
||||
const settings_1 = require("./settings");
|
||||
describe('Settings', () => {
|
||||
it('should return instance with default values', () => {
|
||||
const settings = new settings_1.default();
|
||||
assert.deepStrictEqual(settings.fs, fs.createFileSystemAdapter());
|
||||
assert.ok(settings.throwErrorOnBrokenSymbolicLink);
|
||||
assert.ok(!settings.markSymbolicLink);
|
||||
assert.ok(settings.followSymbolicLink);
|
||||
});
|
||||
it('should return instance with custom values', () => {
|
||||
const lstatSync = () => new fs_macchiato_1.Stats();
|
||||
const settings = new settings_1.default({
|
||||
followSymbolicLink: false,
|
||||
fs: fs.createFileSystemAdapter({ lstatSync }),
|
||||
throwErrorOnBrokenSymbolicLink: false
|
||||
});
|
||||
assert.deepStrictEqual(settings.fs, fs.createFileSystemAdapter({ lstatSync }));
|
||||
assert.ok(!settings.throwErrorOnBrokenSymbolicLink);
|
||||
assert.ok(!settings.followSymbolicLink);
|
||||
});
|
||||
});
|
||||
5
bulma/node_modules/@nodelib/fs.stat/out/types/index.d.ts
generated
vendored
Normal file
5
bulma/node_modules/@nodelib/fs.stat/out/types/index.d.ts
generated
vendored
Normal file
@@ -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
|
||||
1
bulma/node_modules/@nodelib/fs.stat/out/types/index.d.ts.map
generated
vendored
Normal file
1
bulma/node_modules/@nodelib/fs.stat/out/types/index.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB,oBAAY,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC;AAC7B,oBAAY,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC"}
|
||||
2
bulma/node_modules/@nodelib/fs.stat/out/types/index.js
generated
vendored
Normal file
2
bulma/node_modules/@nodelib/fs.stat/out/types/index.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
Reference in New Issue
Block a user