@omlet/cli
Advanced tools
Comparing version 0.0.1-test.1 to 1.0.0-07d3cb-09151622.0
@@ -0,4 +1,15 @@ | ||
import { AliasMap } from "./repoUtils"; | ||
export declare enum LogLevel { | ||
Error = "error", | ||
Warn = "warn", | ||
Info = "info", | ||
Debug = "debug", | ||
Trace = "trace" | ||
} | ||
interface ParseOptions { | ||
inputPatterns: string[]; | ||
ignorePatterns: string[]; | ||
logLevel?: LogLevel; | ||
verbose: boolean; | ||
tsconfigPath?: string; | ||
} | ||
@@ -9,7 +20,14 @@ interface AnalyzeOptions { | ||
corePatterns: string[]; | ||
tagPatterns: [string, string][]; | ||
logLevel?: LogLevel; | ||
verbose: boolean; | ||
output?: string; | ||
tsconfigPath?: string; | ||
cliVersion: string; | ||
} | ||
interface ModuleId { | ||
hash: number; | ||
hash: string; | ||
path: string; | ||
mtype: "package" | "local"; | ||
package_name: string; | ||
} | ||
@@ -22,2 +40,3 @@ interface SymbolWithSource { | ||
id: ComponentId; | ||
name: string; | ||
} | ||
@@ -42,2 +61,8 @@ interface ComponentDependency { | ||
} | ||
interface AnalysisStats { | ||
num_of_components: number; | ||
num_of_modules: number; | ||
num_of_exports: number; | ||
num_of_dependencies: number; | ||
} | ||
interface Module { | ||
@@ -55,5 +80,8 @@ source_path: string; | ||
name: string; | ||
type: "custom" | "core"; | ||
package_name: string; | ||
created_at?: Date; | ||
updated_at?: Date; | ||
tags: string[]; | ||
source: SymbolWithSource; | ||
declaration: Declaration; | ||
declaration?: Declaration; | ||
dependencies: ComponentDependency[]; | ||
@@ -65,5 +93,13 @@ reverse_dependencies: ComponentDependency[]; | ||
exports: Export[]; | ||
alias_map: AliasMap; | ||
stats: AnalysisStats & { | ||
duration_msec: number; | ||
}; | ||
cli_version: string; | ||
} | ||
export declare function parse(projectRoot: string, options: ParseOptions): Module[]; | ||
export declare function analyze(projectRoot: string, options: AnalyzeOptions): AnalyzeResult; | ||
export declare function parse(projectRoot: string, options: ParseOptions): Promise<Module[]>; | ||
export declare function analyze(projectRoot: string, options: AnalyzeOptions): Promise<{ | ||
data: AnalyzeResult; | ||
url: string; | ||
}>; | ||
export {}; |
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
@@ -6,11 +15,42 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.analyze = exports.parse = void 0; | ||
exports.analyze = exports.parse = exports.LogLevel = void 0; | ||
const fs_1 = require("fs"); | ||
const path_1 = __importDefault(require("path")); | ||
const perf_hooks_1 = require("perf_hooks"); | ||
const minimatch_1 = __importDefault(require("minimatch")); | ||
const node_fetch_1 = __importDefault(require("node-fetch")); | ||
const auth_1 = require("./auth"); | ||
const binding_1 = require("./binding"); | ||
function getComponentName(component) { | ||
return component.declaration.symbol.split("#")[0]; | ||
const config_1 = require("./config"); | ||
const error_1 = require("./error"); | ||
const repoUtils_1 = require("./repoUtils"); | ||
const LOG_FILE_PATH = path_1.default.join(process.cwd(), "omlet-cli.log"); | ||
const DEFAULT_EXPORT_NAME = "<default>"; | ||
var LogLevel; | ||
(function (LogLevel) { | ||
LogLevel["Error"] = "error"; | ||
LogLevel["Warn"] = "warn"; | ||
LogLevel["Info"] = "info"; | ||
LogLevel["Debug"] = "debug"; | ||
LogLevel["Trace"] = "trace"; | ||
})(LogLevel = exports.LogLevel || (exports.LogLevel = {})); | ||
function getModuleName(moduleId) { | ||
if (moduleId.mtype === "package") { | ||
return moduleId.path; | ||
} | ||
else if (moduleId.mtype === "local") { | ||
const modulePath = moduleId.path.replace(/\..+$/i, "").replace(/[\\/]index$/i, ""); | ||
return path_1.default.basename(modulePath); | ||
} | ||
else { | ||
throw new error_1.CliError(`Unknown module type: ${moduleId.mtype}")`); | ||
} | ||
} | ||
function getComponentId(component) { | ||
return `${component.source.source.hash}-${getComponentName(component)}`; | ||
function getComponentName(sws) { | ||
const name = sws.symbol.split("#")[0]; | ||
return name === DEFAULT_EXPORT_NAME ? `${getModuleName(sws.source)}#default` : name; | ||
} | ||
function getComponentId(sws) { | ||
return `${sws.source.package_name}:${getComponentName(sws)}`; | ||
} | ||
function createGlobMatcher(patterns) { | ||
@@ -26,5 +66,4 @@ if (patterns.length) { | ||
function transformEdge(e) { | ||
const name = e.symbol.split("#")[0]; | ||
const id = `${e.source.hash}-${name}`; | ||
return Object.assign(Object.assign({}, e), { id }); | ||
const id = getComponentId(e); | ||
return Object.assign(Object.assign({}, e), { name: getComponentName(e), id }); | ||
} | ||
@@ -37,18 +76,94 @@ return { | ||
} | ||
function transformComponent(nativeComp, globMatcher) { | ||
return (Object.assign(Object.assign({}, nativeComp), { id: getComponentId(nativeComp), name: getComponentName(nativeComp), type: globMatcher(nativeComp.source.source.path) ? "core" : "custom", dependencies: nativeComp.dependencies.map(transformDependency), reverse_dependencies: nativeComp.reverse_dependencies.map(transformDependency) })); | ||
function transformComponent(nativeComp, globMatchers) { | ||
const sws = nativeComp.source; | ||
const tags = []; | ||
for (const [tag, globMatcher] of globMatchers) { | ||
if (globMatcher(nativeComp.source.source.path)) { | ||
tags.push(tag); | ||
} | ||
} | ||
return (Object.assign(Object.assign({}, nativeComp), { id: getComponentId(sws), name: getComponentName(sws), package_name: sws.source.package_name, tags, dependencies: nativeComp.dependencies.map(transformDependency), reverse_dependencies: nativeComp.reverse_dependencies.map(transformDependency) })); | ||
} | ||
function parse(projectRoot, options) { | ||
const result = JSON.parse((0, binding_1.parse)(projectRoot, options.inputPatterns, options.ignorePatterns)); | ||
return result; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const extractedAliasMap = JSON.stringify(yield (0, repoUtils_1.extractAliasConfig)(projectRoot, { tsconfig: options.tsconfigPath })); | ||
const result = JSON.parse((0, binding_1.parse)(projectRoot, options.inputPatterns, options.ignorePatterns, options.verbose, options.logLevel, LOG_FILE_PATH, extractedAliasMap)); | ||
return result; | ||
}); | ||
} | ||
exports.parse = parse; | ||
function runAnalysis(projectRoot, workspaceSlug, options) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const startTime = perf_hooks_1.performance.now(); | ||
const aliasMap = yield (0, repoUtils_1.extractAliasConfig)(projectRoot, { tsconfig: options.tsconfigPath }); | ||
const extractedAliasMap = JSON.stringify(aliasMap); | ||
const result = JSON.parse((0, binding_1.analyze)(projectRoot, options.inputPatterns, options.ignorePatterns, options.verbose, options.logLevel, LOG_FILE_PATH, extractedAliasMap)); | ||
const globMatchers = [["core", createGlobMatcher(options.corePatterns)]]; | ||
globMatchers.push(...options.tagPatterns.map(([tag, pattern]) => [tag, createGlobMatcher([pattern])])); | ||
return { | ||
components: result.components.map(c => transformComponent(c, globMatchers)), | ||
exports: result.exports, | ||
alias_map: aliasMap, | ||
stats: Object.assign(Object.assign({}, result.stats), { duration_msec: Math.floor(perf_hooks_1.performance.now() - startTime) }), | ||
cli_version: options.cliVersion | ||
}; | ||
}); | ||
} | ||
function apiRequest(pathname, options = {}) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const token = yield (0, auth_1.getToken)(); | ||
if (!token) { | ||
throw new error_1.CliError("Login required"); | ||
} | ||
const url = new URL(pathname, config_1.BASE_URL).toString(); | ||
const headers = Object.assign(Object.assign({}, options.headers), { "Content-Type": "application/json", "Cookie": `omlet-auth-token=${token}` }); | ||
const response = yield (0, node_fetch_1.default)(url, Object.assign(Object.assign({}, options), { headers })); | ||
if (!response.ok) { | ||
throw new error_1.CliError(`API request failed`, { | ||
context: { | ||
url, | ||
requestHeaders: headers, | ||
requestParams: options, | ||
responseStatus: response.status, | ||
responseHeaders: response.headers, | ||
responseBody: yield response.text(), | ||
} | ||
}); | ||
} | ||
return { data: yield response.json(), response }; | ||
}); | ||
} | ||
function getDefaultWorkspace() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const { data } = yield apiRequest(`/api/workspaces/default`); | ||
return data; | ||
}); | ||
} | ||
function postAnalysis(workspace, analysisData) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const { data } = yield apiRequest(`/api/workspaces/${workspace.slug}/analyses`, { | ||
method: "POST", | ||
body: JSON.stringify(analysisData), | ||
}); | ||
return data; | ||
}); | ||
} | ||
function analyze(projectRoot, options) { | ||
const result = JSON.parse((0, binding_1.analyze)(projectRoot, options.inputPatterns, options.ignorePatterns)); | ||
const globMatcher = createGlobMatcher(options.corePatterns); | ||
return { | ||
components: result.components.map(c => transformComponent(c, globMatcher)), | ||
exports: result.exports | ||
}; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
console.log(`Running analysis on ${projectRoot}`); | ||
const workspace = yield getDefaultWorkspace(); | ||
const analysisData = yield runAnalysis(projectRoot, workspace.slug, options); | ||
if (options.output) { | ||
console.log(`Writing results to ${options.output}`); | ||
yield fs_1.promises.writeFile(options.output, JSON.stringify(analysisData, null, 2)); | ||
} | ||
yield postAnalysis(workspace, analysisData); | ||
const url = new URL(`/${workspace.slug}`, config_1.BASE_URL).toString(); | ||
console.log(`Analysis submitted successfully: ${url}`); | ||
return { | ||
data: analysisData, | ||
url | ||
}; | ||
}); | ||
} | ||
exports.analyze = analyze; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -16,13 +35,33 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
const commander_1 = __importDefault(require("commander")); | ||
const update_notifier_1 = __importDefault(require("update-notifier")); | ||
const analyzer_1 = require("./analyzer"); | ||
const package_json_1 = require("../package.json"); | ||
const pkgInfo = __importStar(require("../package.json")); | ||
const fs_1 = require("fs"); | ||
const auth_1 = require("./auth"); | ||
const error_1 = require("./error"); | ||
const repoUtils_1 = require("./repoUtils"); | ||
const LOGIN_SERVER_PORT = "8989"; | ||
function accumulateValues(value, previous = []) { | ||
return previous.concat(value); | ||
} | ||
function collectTagPatterns(tagPatterns) { | ||
if (tagPatterns.length % 2 !== 0) { | ||
throw new commander_1.default.InvalidArgumentError("Provide a tag name followed by a glob pattern"); | ||
} | ||
const tags = []; | ||
for (let i = 0; i < tagPatterns.length; i += 2) { | ||
const tag = tagPatterns[i]; | ||
const pattern = tagPatterns[i + 1]; | ||
if (/^<|>$/.test(tag)) { | ||
throw new commander_1.default.InvalidArgumentError("Tag names cannot contain < or >"); | ||
} | ||
tags.push([tag.trim(), pattern]); | ||
} | ||
return tags; | ||
} | ||
const program = new commander_1.default.Command(); | ||
program | ||
.name(Object.keys(package_json_1.bin)[0]) | ||
.version(package_json_1.version); | ||
program.command("parse") | ||
.name(Object.keys(pkgInfo.bin)[0]) | ||
.version(pkgInfo.version); | ||
program.command("parse", { hidden: true }) | ||
.description("Parse JS/TS modules and extract component information") | ||
@@ -32,9 +71,34 @@ .requiredOption("-r, --root <path>", "Path to the repository's root directory", process.cwd()) | ||
.option("--ignore <glob-pattern>", "List of ignore patterns for skipping input files", accumulateValues, []) | ||
.action((args) => { | ||
const result = (0, analyzer_1.parse)(args.root, { | ||
.option("--log-level <error|warn|info|debug|trace>", "Specify log level for the CLI (default: \"error\")", analyzer_1.LogLevel.Error) | ||
.option("-v, --verbose", "Run the CLI in debug mode", false) | ||
.option("--tsconfig-path <path>", "Path to the tsconfig.json file") | ||
.action((args) => __awaiter(void 0, void 0, void 0, function* () { | ||
const result = yield (0, analyzer_1.parse)(args.root, { | ||
inputPatterns: args.input, | ||
ignorePatterns: args.ignore | ||
ignorePatterns: args.ignore, | ||
logLevel: args.logLevel, | ||
verbose: args.verbose, | ||
tsconfigPath: args.tsconfigPath | ||
}); | ||
console.log(JSON.stringify(result, null, 2)); | ||
}); | ||
})); | ||
program.command("alias-config", { hidden: true }) | ||
.description("Extract alias config from the repository") | ||
.requiredOption("-r, --root <path>", "Path to the repository's root directory", process.cwd()) | ||
.option("--tsconfig-path <path>", "Path to the tsconfig.json file") | ||
.action((args) => __awaiter(void 0, void 0, void 0, function* () { | ||
try { | ||
const aliasMap = yield (0, repoUtils_1.extractAliasConfig)(args.root, { tsconfig: args.tsconfigPath }); | ||
console.log(JSON.stringify(aliasMap, null, 2)); | ||
} | ||
catch (e) { | ||
const error = e; | ||
if (error instanceof error_1.CliError) { | ||
console.error(`${error.message}\n${error.getContextString()}`); | ||
} | ||
else { | ||
console.error(`${error.message}\n${error.stack}`); | ||
} | ||
} | ||
})); | ||
program.command("analyze") | ||
@@ -46,20 +110,56 @@ .description("Identify components and analyze their usages across JS/TS modules") | ||
.option("-c, --core <glob-pattern>", "List of core patterns to identify reusable components", accumulateValues, []) | ||
.requiredOption("-o, --output <path|->", "Specify path for resulting output file", "omlet.json") | ||
.option("-t, --tag <name pattern...>", "List of patterns to be tagged as provided name, e.g. --tag v2 '**/v2/**/*.tsx' --tag icons '**/Icon*.tsx'") | ||
.option("-o, --output <path|->", "Specify path for resulting output file") | ||
.option("--log-level <error|warn|info|debug|trace>", "Specify log level for the CLI") | ||
.option("-v, --verbose", "Run the CLI in debug mode", false) | ||
.option("--tsconfig-path <path>", "Path to the tsconfig.json file") | ||
.action((args) => __awaiter(void 0, void 0, void 0, function* () { | ||
const result = (0, analyzer_1.analyze)(args.root, { | ||
inputPatterns: args.input, | ||
ignorePatterns: args.ignore, | ||
corePatterns: args.core | ||
}); | ||
const output = JSON.stringify(result, null, 2); | ||
if (args.output === "-") { | ||
console.log(output); | ||
var _a; | ||
try { | ||
if (!(yield (0, auth_1.isAuthenticated)())) { | ||
console.log("Looks like you need to login first"); | ||
yield (0, auth_1.login)(parseInt(LOGIN_SERVER_PORT, 10)); | ||
console.log("Login successful!"); | ||
} | ||
const tagPatterns = collectTagPatterns((_a = args.tag) !== null && _a !== void 0 ? _a : []); | ||
yield (0, analyzer_1.analyze)(args.root, { | ||
inputPatterns: args.input, | ||
ignorePatterns: args.ignore, | ||
corePatterns: args.core, | ||
tagPatterns, | ||
logLevel: args.logLevel, | ||
verbose: args.verbose, | ||
output: args.output, | ||
tsconfigPath: args.tsconfigPath, | ||
cliVersion: pkgInfo.version | ||
}); | ||
} | ||
else { | ||
yield fs_1.promises.writeFile(args.output, JSON.stringify(result, null, 2)); | ||
catch (e) { | ||
const error = e; | ||
const errorFile = "omlet-cli.error.log"; | ||
if (error instanceof error_1.CliError) { | ||
console.error(error.message); | ||
yield fs_1.promises.writeFile(errorFile, `${error.message}\n${error.getContextString()}`); | ||
} | ||
else { | ||
yield fs_1.promises.writeFile(errorFile, `${error.message}\n${error.stack}`); | ||
console.error("Something went wrong!"); | ||
} | ||
} | ||
})); | ||
program.command("login") | ||
.description("Login to Omlet and get an access token") | ||
.requiredOption("-p, --local-port <port>", "Port to be used by the local login server", LOGIN_SERVER_PORT) | ||
.option("--print-token", "Prints token to the command line instead of saving it to the .omletrc file") | ||
.action((args) => __awaiter(void 0, void 0, void 0, function* () { | ||
const token = yield (0, auth_1.login)(parseInt(args.localPort, 10)); | ||
console.log("Login successful!"); | ||
if (args.printToken) { | ||
console.log(token); | ||
} | ||
})); | ||
program.on("command:*", () => { | ||
program.outputHelp(); | ||
}); | ||
(0, update_notifier_1.default)({ pkg: pkgInfo, updateCheckInterval: 0 }).notify(); | ||
program.parseAsync(process.argv); |
{ | ||
"name": "@omlet/cli", | ||
"version": "0.0.1-alpha.5", | ||
"version": "1.0.0-07d3cb-09151622.0", | ||
"bin": { | ||
@@ -14,11 +14,10 @@ "omlet": "bin/omlet" | ||
"triples": { | ||
"defaults": false, | ||
"additional": [ | ||
"aarch64-apple-darwin", | ||
"x86_64-apple-darwin", | ||
"x86_64-unknown-linux-gnu", | ||
"x86_64-unknown-linux-musl", | ||
"aarch64-unknown-linux-gnu", | ||
"aarch64-unknown-linux-musl", | ||
"aarch64-pc-windows-msvc", | ||
"armv7-unknown-linux-gnueabihf", | ||
"x86_64-unknown-linux-musl", | ||
"x86_64-unknown-freebsd", | ||
"i686-pc-windows-msvc" | ||
"aarch64-unknown-linux-musl" | ||
] | ||
@@ -30,5 +29,12 @@ } | ||
"@napi-rs/cli": "^2.4.4", | ||
"@types/current-git-branch": "^1.1.2", | ||
"@types/hosted-git-info": "^3.0.2", | ||
"@types/inquirer": "^8.2.1", | ||
"@types/jest": "^27.4.1", | ||
"@types/minimatch": "^3.0.5", | ||
"@types/node": "^17.0.21", | ||
"@types/node-fetch": "^2.6.1", | ||
"@types/parse-git-config": "^3.0.1", | ||
"@types/server-destroy": "^1.0.1", | ||
"@types/update-notifier": "^5.1.0", | ||
"@typescript-eslint/eslint-plugin": "^5.13.0", | ||
@@ -52,3 +58,3 @@ "@typescript-eslint/parser": "^5.13.0", | ||
"build:release": "npm run build:napi -- --release", | ||
"build:napi": "napi build --platform --cargo-name node --js ./node-src/binding.js --dts ./node-src/binding.d.ts", | ||
"build:napi": "napi build --platform --cargo-name node -p node --js ./node-src/binding.js --dts ./node-src/binding.d.ts", | ||
"build:ts": "tsc", | ||
@@ -65,18 +71,26 @@ "build:test": "npm run build:napi && rm -rf artifacts && mkdir artifacts && mv *.node ./artifacts/ && npm run artifacts && npm run build:ts", | ||
"optionalDependencies": { | ||
"@omlet/cli-win32-x64-msvc": "0.0.1-alpha.5", | ||
"@omlet/cli-darwin-x64": "0.0.1-alpha.5", | ||
"@omlet/cli-linux-x64-gnu": "0.0.1-alpha.5", | ||
"@omlet/cli-darwin-arm64": "0.0.1-alpha.5", | ||
"@omlet/cli-linux-arm64-gnu": "0.0.1-alpha.5", | ||
"@omlet/cli-linux-arm64-musl": "0.0.1-alpha.5", | ||
"@omlet/cli-win32-arm64-msvc": "0.0.1-alpha.5", | ||
"@omlet/cli-linux-arm-gnueabihf": "0.0.1-alpha.5", | ||
"@omlet/cli-linux-x64-musl": "0.0.1-alpha.5", | ||
"@omlet/cli-freebsd-x64": "0.0.1-alpha.5", | ||
"@omlet/cli-win32-ia32-msvc": "0.0.1-alpha.5" | ||
"@omlet/cli-darwin-arm64": "0.0.1-alpha.28", | ||
"@omlet/cli-darwin-x64": "0.0.1-alpha.28", | ||
"@omlet/cli-linux-x64-gnu": "0.0.1-alpha.28", | ||
"@omlet/cli-linux-x64-musl": "0.0.1-alpha.28", | ||
"@omlet/cli-linux-arm64-gnu": "0.0.1-alpha.28", | ||
"@omlet/cli-linux-arm64-musl": "0.0.1-alpha.28" | ||
}, | ||
"dependencies": { | ||
"commander": "^9.0.0", | ||
"minimatch": "^5.0.1" | ||
"current-git-branch": "^1.1.0", | ||
"fast-glob": "^3.2.11", | ||
"find-git-root": "^1.0.4", | ||
"hosted-git-info": "^5.0.0", | ||
"inquirer": "^8.2.2", | ||
"json5": "^2.2.1", | ||
"minimatch": "^5.0.1", | ||
"node-fetch": "^2.6.6", | ||
"open": "^8.4.0", | ||
"parse-git-config": "^3.0.0", | ||
"server-destroy": "^1.0.1", | ||
"tsconfig-paths": "^4.0.0", | ||
"update-notifier": "^5.1.0", | ||
"yaml": "^2.0.1" | ||
} | ||
} |
{ | ||
"name": "@omlet/cli", | ||
"version": "0.0.1-test.1", | ||
"version": "1.0.0-07d3cb-09151622.0", | ||
"bin": { | ||
@@ -14,11 +14,10 @@ "omlet": "bin/omlet" | ||
"triples": { | ||
"defaults": false, | ||
"additional": [ | ||
"aarch64-apple-darwin", | ||
"x86_64-apple-darwin", | ||
"x86_64-unknown-linux-gnu", | ||
"x86_64-unknown-linux-musl", | ||
"aarch64-unknown-linux-gnu", | ||
"aarch64-unknown-linux-musl", | ||
"aarch64-pc-windows-msvc", | ||
"armv7-unknown-linux-gnueabihf", | ||
"x86_64-unknown-linux-musl", | ||
"x86_64-unknown-freebsd", | ||
"i686-pc-windows-msvc" | ||
"aarch64-unknown-linux-musl" | ||
] | ||
@@ -30,5 +29,12 @@ } | ||
"@napi-rs/cli": "^2.4.4", | ||
"@types/current-git-branch": "^1.1.2", | ||
"@types/hosted-git-info": "^3.0.2", | ||
"@types/inquirer": "^8.2.1", | ||
"@types/jest": "^27.4.1", | ||
"@types/minimatch": "^3.0.5", | ||
"@types/node": "^17.0.21", | ||
"@types/node-fetch": "^2.6.1", | ||
"@types/parse-git-config": "^3.0.1", | ||
"@types/server-destroy": "^1.0.1", | ||
"@types/update-notifier": "^5.1.0", | ||
"@typescript-eslint/eslint-plugin": "^5.13.0", | ||
@@ -52,3 +58,3 @@ "@typescript-eslint/parser": "^5.13.0", | ||
"build:release": "npm run build:napi -- --release", | ||
"build:napi": "napi build --platform --cargo-name node --js ./node-src/binding.js --dts ./node-src/binding.d.ts", | ||
"build:napi": "napi build --platform --cargo-name node -p node --js ./node-src/binding.js --dts ./node-src/binding.d.ts", | ||
"build:ts": "tsc", | ||
@@ -65,18 +71,26 @@ "build:test": "npm run build:napi && rm -rf artifacts && mkdir artifacts && mv *.node ./artifacts/ && npm run artifacts && npm run build:ts", | ||
"optionalDependencies": { | ||
"@omlet/cli-win32-x64-msvc": "0.0.1-test.1", | ||
"@omlet/cli-darwin-x64": "0.0.1-test.1", | ||
"@omlet/cli-linux-x64-gnu": "0.0.1-test.1", | ||
"@omlet/cli-darwin-arm64": "0.0.1-test.1", | ||
"@omlet/cli-linux-arm64-gnu": "0.0.1-test.1", | ||
"@omlet/cli-linux-arm64-musl": "0.0.1-test.1", | ||
"@omlet/cli-win32-arm64-msvc": "0.0.1-test.1", | ||
"@omlet/cli-linux-arm-gnueabihf": "0.0.1-test.1", | ||
"@omlet/cli-linux-x64-musl": "0.0.1-test.1", | ||
"@omlet/cli-freebsd-x64": "0.0.1-test.1", | ||
"@omlet/cli-win32-ia32-msvc": "0.0.1-test.1" | ||
"@omlet/cli-darwin-arm64": "1.0.0-07d3cb-09151622.0", | ||
"@omlet/cli-darwin-x64": "1.0.0-07d3cb-09151622.0", | ||
"@omlet/cli-linux-x64-gnu": "1.0.0-07d3cb-09151622.0", | ||
"@omlet/cli-linux-x64-musl": "1.0.0-07d3cb-09151622.0", | ||
"@omlet/cli-linux-arm64-gnu": "1.0.0-07d3cb-09151622.0", | ||
"@omlet/cli-linux-arm64-musl": "1.0.0-07d3cb-09151622.0" | ||
}, | ||
"dependencies": { | ||
"commander": "^9.0.0", | ||
"minimatch": "^5.0.1" | ||
"current-git-branch": "^1.1.0", | ||
"fast-glob": "^3.2.11", | ||
"find-git-root": "^1.0.4", | ||
"hosted-git-info": "^5.0.0", | ||
"inquirer": "^8.2.2", | ||
"json5": "^2.2.1", | ||
"minimatch": "^5.0.1", | ||
"node-fetch": "^2.6.6", | ||
"open": "^8.4.0", | ||
"parse-git-config": "^3.0.0", | ||
"server-destroy": "^1.0.1", | ||
"tsconfig-paths": "^4.0.0", | ||
"update-notifier": "^5.1.0", | ||
"yaml": "^2.0.1" | ||
} | ||
} |
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
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
51952
18
1166
21
21
7
3
+ Addedcurrent-git-branch@^1.1.0
+ Addedfast-glob@^3.2.11
+ Addedfind-git-root@^1.0.4
+ Addedhosted-git-info@^5.0.0
+ Addedinquirer@^8.2.2
+ Addedjson5@^2.2.1
+ Addednode-fetch@^2.6.6
+ Addedopen@^8.4.0
+ Addedparse-git-config@^3.0.0
+ Addedserver-destroy@^1.0.1
+ Addedtsconfig-paths@^4.0.0
+ Addedupdate-notifier@^5.1.0
+ Addedyaml@^2.0.1
+ Added@nodelib/fs.scandir@2.1.5(transitive)
+ Added@nodelib/fs.stat@2.0.5(transitive)
+ Added@nodelib/fs.walk@1.2.8(transitive)
+ Added@omlet/cli-darwin-arm64@1.0.0-07d3cb-09151622.0(transitive)
+ Added@omlet/cli-darwin-x64@1.0.0-07d3cb-09151622.0(transitive)
+ Added@omlet/cli-linux-arm64-gnu@1.0.0-07d3cb-09151622.0(transitive)
+ Added@omlet/cli-linux-arm64-musl@1.0.0-07d3cb-09151622.0(transitive)
+ Added@omlet/cli-linux-x64-gnu@1.0.0-07d3cb-09151622.0(transitive)
+ Added@omlet/cli-linux-x64-musl@1.0.0-07d3cb-09151622.0(transitive)
+ Added@sindresorhus/is@0.14.0(transitive)
+ Added@szmarczak/http-timer@1.1.2(transitive)
+ Addedansi-align@3.0.1(transitive)
+ Addedansi-escapes@4.3.2(transitive)
+ Addedansi-regex@5.0.1(transitive)
+ Addedansi-styles@4.3.0(transitive)
+ Addedbabel-plugin-add-module-exports@0.2.1(transitive)
+ Addedbase64-js@1.5.1(transitive)
+ Addedbl@4.1.0(transitive)
+ Addedboxen@5.1.2(transitive)
+ Addedbraces@3.0.3(transitive)
+ Addedbuffer@5.7.1(transitive)
+ Addedcacheable-request@6.1.0(transitive)
+ Addedcamelcase@6.3.0(transitive)
+ Addedchalk@4.1.2(transitive)
+ Addedchardet@0.7.0(transitive)
+ Addedci-info@2.0.0(transitive)
+ Addedcli-boxes@2.2.1(transitive)
+ Addedcli-cursor@3.1.0(transitive)
+ Addedcli-spinners@2.9.2(transitive)
+ Addedcli-width@3.0.0(transitive)
+ Addedclone@1.0.4(transitive)
+ Addedclone-response@1.0.3(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedconfigstore@5.0.1(transitive)
+ Addedcross-spawn@5.1.0(transitive)
+ Addedcrypto-random-string@2.0.0(transitive)
+ Addedcurrent-git-branch@1.1.0(transitive)
+ Addeddecompress-response@3.3.0(transitive)
+ Addeddeep-extend@0.6.0(transitive)
+ Addeddefaults@1.0.4(transitive)
+ Addeddefer-to-connect@1.1.3(transitive)
+ Addeddefine-lazy-prop@2.0.0(transitive)
+ Addeddot-prop@5.3.0(transitive)
+ Addedduplexer3@0.1.5(transitive)
+ Addedemoji-regex@8.0.0(transitive)
+ Addedend-of-stream@1.4.4(transitive)
+ Addedescape-goat@2.1.1(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedexeca@0.6.3(transitive)
+ Addedexternal-editor@3.1.0(transitive)
+ Addedfast-glob@3.3.3(transitive)
+ Addedfastq@1.19.0(transitive)
+ Addedfigures@3.2.0(transitive)
+ Addedfill-range@7.1.1(transitive)
+ Addedfind-git-root@1.0.4(transitive)
+ Addedget-stream@3.0.04.1.05.2.0(transitive)
+ Addedgit-config-path@2.0.0(transitive)
+ Addedglob-parent@5.1.2(transitive)
+ Addedglobal-dirs@3.0.1(transitive)
+ Addedgot@9.6.0(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedhas-flag@4.0.0(transitive)
+ Addedhas-yarn@2.1.0(transitive)
+ Addedhosted-git-info@5.2.1(transitive)
+ Addedhttp-cache-semantics@4.1.1(transitive)
+ Addediconv-lite@0.4.24(transitive)
+ Addedieee754@1.2.1(transitive)
+ Addedimport-lazy@2.1.0(transitive)
+ Addedimurmurhash@0.1.4(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedini@1.3.82.0.0(transitive)
+ Addedinquirer@8.2.6(transitive)
+ Addedis-ci@2.0.0(transitive)
+ Addedis-docker@2.2.1(transitive)
+ Addedis-extglob@2.1.1(transitive)
+ Addedis-fullwidth-code-point@3.0.0(transitive)
+ Addedis-git-repository@1.1.1(transitive)
+ Addedis-glob@4.0.3(transitive)
+ Addedis-installed-globally@0.4.0(transitive)
+ Addedis-interactive@1.0.0(transitive)
+ Addedis-npm@5.0.0(transitive)
+ Addedis-number@7.0.0(transitive)
+ Addedis-obj@2.0.0(transitive)
+ Addedis-path-inside@3.0.3(transitive)
+ Addedis-stream@1.1.0(transitive)
+ Addedis-typedarray@1.0.0(transitive)
+ Addedis-unicode-supported@0.1.0(transitive)
+ Addedis-wsl@2.2.0(transitive)
+ Addedis-yarn-global@0.3.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedjson-buffer@3.0.0(transitive)
+ Addedjson5@2.2.3(transitive)
+ Addedkeyv@3.1.0(transitive)
+ Addedlatest-version@5.1.0(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedlog-symbols@4.1.0(transitive)
+ Addedlowercase-keys@1.0.12.0.0(transitive)
+ Addedlru-cache@4.1.57.18.3(transitive)
+ Addedmake-dir@3.1.0(transitive)
+ Addedmerge2@1.4.1(transitive)
+ Addedmicromatch@4.0.8(transitive)
+ Addedmimic-fn@2.1.0(transitive)
+ Addedmimic-response@1.0.1(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmute-stream@0.0.8(transitive)
+ Addednode-fetch@2.7.0(transitive)
+ Addednormalize-url@4.5.1(transitive)
+ Addednpm-run-path@2.0.2(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedonetime@5.1.2(transitive)
+ Addedopen@8.4.2(transitive)
+ Addedora@5.4.1(transitive)
+ Addedos-tmpdir@1.0.2(transitive)
+ Addedp-cancelable@1.1.0(transitive)
+ Addedp-finally@1.0.0(transitive)
+ Addedpackage-json@6.5.0(transitive)
+ Addedparse-git-config@3.0.0(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedpath-key@2.0.1(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedprepend-http@2.0.0(transitive)
+ Addedpseudomap@1.0.2(transitive)
+ Addedpump@3.0.2(transitive)
+ Addedpupa@2.1.1(transitive)
+ Addedqueue-microtask@1.2.3(transitive)
+ Addedrc@1.2.8(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedregistry-auth-token@4.2.2(transitive)
+ Addedregistry-url@5.1.0(transitive)
+ Addedresponselike@1.0.2(transitive)
+ Addedrestore-cursor@3.1.0(transitive)
+ Addedreusify@1.0.4(transitive)
+ Addedrun-async@2.4.1(transitive)
+ Addedrun-parallel@1.2.0(transitive)
+ Addedrxjs@7.8.1(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsemver@6.3.17.7.0(transitive)
+ Addedsemver-diff@3.1.1(transitive)
+ Addedserver-destroy@1.0.1(transitive)
+ Addedshebang-command@1.2.0(transitive)
+ Addedshebang-regex@1.0.0(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedstring-width@4.2.3(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedstrip-ansi@6.0.1(transitive)
+ Addedstrip-bom@3.0.0(transitive)
+ Addedstrip-eof@1.0.0(transitive)
+ Addedstrip-json-comments@2.0.1(transitive)
+ Addedsupports-color@7.2.0(transitive)
+ Addedthrough@2.3.8(transitive)
+ Addedtmp@0.0.33(transitive)
+ Addedto-readable-stream@1.0.0(transitive)
+ Addedto-regex-range@5.0.1(transitive)
+ Addedtr46@0.0.3(transitive)
+ Addedtsconfig-paths@4.2.0(transitive)
+ Addedtslib@2.8.1(transitive)
+ Addedtype-fest@0.20.20.21.3(transitive)
+ Addedtypedarray-to-buffer@3.1.5(transitive)
+ Addedunique-string@2.0.0(transitive)
+ Addedupdate-notifier@5.1.0(transitive)
+ Addedurl-parse-lax@3.0.0(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedwcwidth@1.0.1(transitive)
+ Addedwebidl-conversions@3.0.1(transitive)
+ Addedwhatwg-url@5.0.0(transitive)
+ Addedwhich@1.3.1(transitive)
+ Addedwidest-line@3.1.0(transitive)
+ Addedwrap-ansi@6.2.07.0.0(transitive)
+ Addedwrappy@1.0.2(transitive)
+ Addedwrite-file-atomic@3.0.3(transitive)
+ Addedxdg-basedir@4.0.0(transitive)
+ Addedyallist@2.1.2(transitive)
+ Addedyaml@2.7.0(transitive)
- Removed@omlet/cli-darwin-arm64@0.0.1-test.1(transitive)
- Removed@omlet/cli-darwin-x64@0.0.1-test.1(transitive)