Comparing version 1.0.1 to 1.0.2
"use strict"; | ||
var index_1 = require("../index"); | ||
index_1.default().then(function (data) { | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const index_1 = __importDefault(require("../index")); | ||
(0, index_1.default)().then(function (data) { | ||
console.log(data); | ||
}); | ||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJpbi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQ0Esc0JBQWdCLFVBQVUsQ0FBQyxDQUFBO0FBRTNCLGVBQUcsRUFBRSxDQUFDLElBQUksQ0FBQyxVQUFVLElBQUk7SUFDckIsT0FBTyxDQUFDLEdBQUcsQ0FBQyxJQUFJLENBQUMsQ0FBQztBQUV0QixDQUFDLENBQUMsQ0FBQSIsImZpbGUiOiJiaW4vaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyJcbmltcG9ydCBVc2IgZnJvbSBcIi4uL2luZGV4XCI7XG5cblVzYigpLnRoZW4oZnVuY3Rpb24gKGRhdGEpIHtcbiAgICBjb25zb2xlLmxvZyhkYXRhKTtcblxufSkiXX0= | ||
//# sourceMappingURL=index.js.map |
14
index.js
"use strict"; | ||
var child_process = require("child_process"); | ||
var Promise = require("bluebird"); | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const child_process_1 = require("child_process"); | ||
function lsusbdev(e) { | ||
return new Promise(function (resolve, reject) { | ||
var callbacked = false; | ||
var timo = setTimeout(function () { | ||
let callbacked = false; | ||
let timo = setTimeout(function () { | ||
if (!callbacked) { | ||
@@ -12,3 +12,3 @@ reject("timeout error"); | ||
}, 50000); | ||
child_process.exec(__dirname + "/list.sh", function (error, stdout, stderr) { | ||
(0, child_process_1.exec)(__dirname + "/list.sh", function (error, stdout, stderr) { | ||
callbacked = true; | ||
@@ -28,5 +28,3 @@ clearTimeout(timo); | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = lsusbdev; | ||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxJQUFZLGFBQWEsV0FBTSxlQUFlLENBQUMsQ0FBQTtBQUMvQyxJQUFZLE9BQU8sV0FBTSxVQUFVLENBQUMsQ0FBQTtBQVVwQyxrQkFBaUMsQ0FBTztJQUNwQyxNQUFNLENBQUMsSUFBSSxPQUFPLENBQVcsVUFBVSxPQUFPLEVBQUUsTUFBTTtRQUNsRCxJQUFJLFVBQVUsR0FBRyxLQUFLLENBQUM7UUFDdkIsSUFBSSxJQUFJLEdBQUcsVUFBVSxDQUFDO1lBQ2xCLEVBQUUsQ0FBQyxDQUFDLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQztnQkFDZCxNQUFNLENBQUMsZUFBZSxDQUFDLENBQUM7WUFDNUIsQ0FBQztRQUNMLENBQUMsRUFBRSxLQUFLLENBQUMsQ0FBQztRQUVWLGFBQWEsQ0FBQyxJQUFJLENBQUMsU0FBUyxHQUFHLFVBQVUsRUFBRSxVQUFVLEtBQUssRUFBRSxNQUFNLEVBQUUsTUFBTTtZQUN0RSxVQUFVLEdBQUcsSUFBSSxDQUFDO1lBQ2xCLFlBQVksQ0FBQyxJQUFJLENBQUMsQ0FBQztZQUNuQixFQUFFLENBQUMsQ0FBQyxLQUFLLElBQUksS0FBSyxJQUFJLElBQUksQ0FBQyxDQUFDLENBQUM7Z0JBQ3pCLE1BQU0sQ0FBQyxLQUFLLENBQUMsQ0FBQztZQUNsQixDQUFDO1lBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7Z0JBQ2hCLE1BQU0sQ0FBQyxNQUFNLENBQUMsQ0FBQztZQ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ICAgICAgY2FsbGJhY2tlZCA9IHRydWU7XG4gICAgICAgICAgICBjbGVhclRpbWVvdXQodGltbyk7XG4gICAgICAgICAgICBpZiAoZXJyb3IgJiYgZXJyb3IgIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIHJlamVjdChlcnJvcik7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHN0ZGVycikge1xuICAgICAgICAgICAgICAgIHJlamVjdChzdGRlcnIpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXNvbHZlKEpTT04ucGFyc2Uoc3Rkb3V0ICsgXCJcIikpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgIH0pO1xufVxuIl19 | ||
//# sourceMappingURL=index.js.map |
50
index.ts
@@ -1,34 +0,32 @@ | ||
import * as child_process from "child_process"; | ||
import * as Promise from "bluebird"; | ||
import { exec } from "child_process"; | ||
interface Answer { | ||
dev: string; | ||
type: string; | ||
hub: string; | ||
product: string; | ||
id: string; | ||
dev: string; | ||
type: string; | ||
hub: string; | ||
product: string; | ||
id: string; | ||
} | ||
export default function lsusbdev(e?: any) { | ||
return new Promise<Answer[]>(function (resolve, reject) { | ||
let callbacked = false; | ||
let timo = setTimeout(function () { | ||
if (!callbacked) { | ||
reject("timeout error"); | ||
} | ||
}, 50000); | ||
return new Promise<Answer[]>(function (resolve, reject) { | ||
let callbacked = false; | ||
let timo = setTimeout(function () { | ||
if (!callbacked) { | ||
reject("timeout error"); | ||
} | ||
}, 50000); | ||
child_process.exec(__dirname + "/list.sh", function (error, stdout, stderr) { | ||
callbacked = true; | ||
clearTimeout(timo); | ||
if (error && error != null) { | ||
reject(error); | ||
} else if (stderr) { | ||
reject(stderr); | ||
} else { | ||
resolve(JSON.parse(stdout + "")); | ||
} | ||
}); | ||
exec(__dirname + "/list.sh", function (error, stdout, stderr) { | ||
callbacked = true; | ||
clearTimeout(timo); | ||
if (error && error != null) { | ||
reject(error); | ||
} else if (stderr) { | ||
reject(stderr); | ||
} else { | ||
resolve(JSON.parse(stdout + "")); | ||
} | ||
}); | ||
}); | ||
} |
{ | ||
"name": "lsusbdev", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "", | ||
"main": "index.js", | ||
"bin": "bin/index.js", | ||
"scripts": { | ||
"test": "node_modules/.bin/mocha", | ||
"hw": "git add -A && git commit -m 'oki'&&npm version patch -m patch&&git add -A && git commit --amend -C HEAD&& git push&&npm publish", | ||
"patch": "npm version patch -m patch&&git add -A && git commit --amend -C HEAD&& git push&&npm publish", | ||
"prepublish": "npm test" | ||
"prepublish": "npm test", | ||
"build": "tsc", | ||
"watch": "tsc -w", | ||
"release:patch": "npm version patch && git push && git push --tags && npm publish", | ||
"release:minor": "npm version minor && git push && git push --tags && npm publish", | ||
"release:major": "npm version major && git push && git push --tags && npm publish" | ||
}, | ||
@@ -21,19 +26,12 @@ "repository": { | ||
}, | ||
"dependencies": { | ||
"bluebird": "^3.1.1" | ||
}, | ||
"devDependencies": { | ||
"chai": "^3.4.1", | ||
"gulp": "^3.9.0", | ||
"gulp-bump": "^1.0.0", | ||
"gulp-concat": "^2.6.0", | ||
"gulp-filter": "^3.0.1", | ||
"gulp-git": "^1.6.1", | ||
"gulp-mocha": "^2.2.0", | ||
"gulp-prompt": "^0.1.2", | ||
"gulp-sourcemaps": "^1.6.0", | ||
"gulp-tag-version": "^1.3.0", | ||
"gulp-typescript": "^2.10.0", | ||
"mocha": "^2.3.4" | ||
"@types/chai": "^4.3.4", | ||
"@types/mocha": "^10.0.1", | ||
"@types/node": "^18.15.0", | ||
"chai": "^4.3.7", | ||
"mocha": "^10.2.0", | ||
"prettier": "^2.8.4", | ||
"prettier-plugin-organize-imports": "^3.2.2", | ||
"typescript": "^4.9.5" | ||
} | ||
} |
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"module": "commonjs", | ||
"declaration": false, | ||
"noImplicitAny": false, | ||
"removeComments": true, | ||
"noLib": false, | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true | ||
}, | ||
"exclude": [ | ||
"node_modules" | ||
] | ||
} | ||
"compilerOptions": { | ||
/* Basic Options */ | ||
// "incremental": true, | ||
"resolveJsonModule": true, | ||
/* Enable incremental compilation */ | ||
"target": "es2020" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, | ||
// "lib": [], | ||
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, | ||
// "lib": [], /* Specify library files to be included in the compilation. */ | ||
// "allowJs": true, /* Allow javascript files to be compiled. */ | ||
// "checkJs": true, /* Report errors in .js files. */ | ||
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ | ||
// "declaration": true, /* Generates corresponding '.d.ts' file. */ | ||
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ | ||
"sourceMap": true /* Generates corresponding '.map' file. */, | ||
// "outFile": "./", /* Concatenate and emit output to single file. */ | ||
// "outDir": "./dist", /* Redirect output structure to the directory. */ | ||
// "rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ | ||
// "composite": true, /* Enable project compilation */ | ||
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ | ||
// "removeComments": true /* Do not emit comments to output. */, | ||
"noEmit": false /* Do not emit outputs. */, | ||
// "importHelpers": true, /* Import emit helpers from 'tslib'. */ | ||
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ | ||
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ | ||
/* Strict Type-Checking Options */ | ||
"strict": false /* Enable all strict type-checking options. */, | ||
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ | ||
// "strictNullChecks": true, /* Enable strict null checks. */ | ||
// "strictFunctionTypes": true, /* Enable strict checking of function types. */ | ||
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ | ||
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ | ||
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ | ||
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ | ||
/* Additional Checks */ | ||
// "noUnusedLocals": true, /* Report errors on unused locals. */ | ||
// "noUnusedParameters": true, /* Report errors on unused parameters. */ | ||
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ | ||
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ | ||
/* Module Resolution Options */ | ||
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, | ||
// "baseUrl": "src", /* Base directory to resolve non-absolute module names. *, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ | ||
// "rootDirs": ["./src"], /* List of root folders whose combined content represents the structure of the project at runtime. */ | ||
// "typeRoots": [], /* List of folders to include type definitions from. */ | ||
// "types": [], /* Type declaration files to be included in compilation. */ | ||
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ | ||
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, | ||
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ | ||
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ | ||
/* Source Map Options */ | ||
// "sourceRoot": "./src", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ | ||
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ | ||
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ | ||
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ | ||
/* Experimental Options */ | ||
"experimentalDecorators": false /* Enables experimental support for ES7 decorators. */, | ||
"emitDecoratorMetadata": false /* Enables experimental support for emitting type metadata for decorators. */, | ||
/* Advanced Options */ | ||
"skipLibCheck": true, | ||
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ | ||
} | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
22538
0
8
13
135
2
- Removedbluebird@^3.1.1
- Removedbluebird@3.7.2(transitive)