Comparing version 2.1.0 to 2.2.0
#!/usr/bin/env node | ||
import { spawnSync } from "node:child_process"; | ||
import { resolveBinary } from "./resolveBinary.js"; | ||
const child = spawnSync(resolveBinary(), process.argv.slice(2), { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const node_child_process_1 = require("node:child_process"); | ||
const resolveBinary_js_1 = require("./resolveBinary.js"); | ||
const child = (0, node_child_process_1.spawnSync)((0, resolveBinary_js_1.resolveBinary)(), process.argv.slice(2), { | ||
stdio: "inherit", | ||
@@ -6,0 +8,0 @@ }); |
@@ -1,3 +0,6 @@ | ||
import { resolveBinary } from "./resolveBinary.js"; | ||
export { resolveBinary }; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.resolveBinary = void 0; | ||
const resolveBinary_js_1 = require("./resolveBinary.js"); | ||
Object.defineProperty(exports, "resolveBinary", { enumerable: true, get: function () { return resolveBinary_js_1.resolveBinary; } }); | ||
//# sourceMappingURL=index.js.map |
@@ -1,11 +0,13 @@ | ||
import { createRequire } from "node:module"; | ||
import { arch, platform } from "node:process"; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.resolveBinary = void 0; | ||
const node_process_1 = require("node:process"); | ||
/** | ||
* Resolve path to dbmate for the current platform | ||
* */ | ||
export function resolveBinary() { | ||
const ext = platform === "win32" ? ".exe" : ""; | ||
const path = `@dbmate/${platform}-${arch}/bin/dbmate${ext}`; | ||
function resolveBinary() { | ||
const ext = node_process_1.platform === "win32" ? ".exe" : ""; | ||
const path = `@dbmate/${node_process_1.platform}-${node_process_1.arch}/bin/dbmate${ext}`; | ||
try { | ||
return createRequire(import.meta.url).resolve(path); | ||
return require.resolve(path); | ||
} | ||
@@ -24,2 +26,3 @@ catch (err) { | ||
} | ||
exports.resolveBinary = resolveBinary; | ||
//# sourceMappingURL=resolveBinary.js.map |
{ | ||
"name": "dbmate", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "A lightweight, framework-agnostic database migration tool", | ||
@@ -18,3 +18,2 @@ "repository": "https://github.com/amacneil/dbmate", | ||
], | ||
"type": "module", | ||
"bin": "./dist/cli.js", | ||
@@ -29,10 +28,10 @@ "main": "./dist/index.js", | ||
"optionalDependencies": { | ||
"@dbmate/linux-ia32": "2.1.0", | ||
"@dbmate/linux-x64": "2.1.0", | ||
"@dbmate/linux-arm": "2.1.0", | ||
"@dbmate/linux-arm64": "2.1.0", | ||
"@dbmate/darwin-x64": "2.1.0", | ||
"@dbmate/darwin-arm64": "2.1.0", | ||
"@dbmate/win32-x64": "2.1.0" | ||
"@dbmate/linux-ia32": "2.2.0", | ||
"@dbmate/linux-x64": "2.2.0", | ||
"@dbmate/linux-arm": "2.2.0", | ||
"@dbmate/linux-arm64": "2.2.0", | ||
"@dbmate/darwin-x64": "2.2.0", | ||
"@dbmate/darwin-arm64": "2.2.0", | ||
"@dbmate/win32-x64": "2.2.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
33544
48
2
No