Remove unnecessary resources, add bulma, and add AdvMakefile
This commit is contained in:
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);
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user