Socket
Socket
Sign inDemoInstall

asl-validator

Package Overview
Dependencies
10
Maintainers
2
Versions
63
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.7.0 to 3.8.0

19

bin/asl-validator.ts
#!/usr/bin/env node
import fs from "fs";
import path from "path";
import { program } from "commander";

@@ -24,4 +25,22 @@ import YAML from "yaml";

function getVersion(packageJsonPath: string): string | null {
if (!fs.existsSync(packageJsonPath)) {
return null;
}
const { version } = JSON.parse(
fs.readFileSync(packageJsonPath).toString()
) as {
version: string;
};
return version;
}
program
.description("Amazon States Language validator")
// make it work wether it is compiled or not
.version(
getVersion(path.join(__dirname, "../package.json")) ??
getVersion(path.join(__dirname, "../../package.json")) ??
""
)
.option("--json-definition <jsonDefinition>", "JSON definition", collect, [])

@@ -28,0 +47,0 @@ .option("--json-path <jsonPath>", "JSON path", collect, [])

@@ -6,4 +6,6 @@ #!/usr/bin/env node

};
var _a, _b;
Object.defineProperty(exports, "__esModule", { value: true });
var fs_1 = __importDefault(require("fs"));
var path_1 = __importDefault(require("path"));
var commander_1 = require("commander");

@@ -24,4 +26,13 @@ var yaml_1 = __importDefault(require("yaml"));

}
function getVersion(packageJsonPath) {
if (!fs_1.default.existsSync(packageJsonPath)) {
return null;
}
var version = JSON.parse(fs_1.default.readFileSync(packageJsonPath).toString()).version;
return version;
}
commander_1.program
.description("Amazon States Language validator")
// make it work wether it is compiled or not
.version((_b = (_a = getVersion(path_1.default.join(__dirname, "../package.json"))) !== null && _a !== void 0 ? _a : getVersion(path_1.default.join(__dirname, "../../package.json"))) !== null && _b !== void 0 ? _b : "")
.option("--json-definition <jsonDefinition>", "JSON definition", collect, [])

@@ -28,0 +39,0 @@ .option("--json-path <jsonPath>", "JSON path", collect, [])

2

package.json
{
"name": "asl-validator",
"version": "3.7.0",
"version": "3.8.0",
"description": "Amazon States Language validator",

@@ -5,0 +5,0 @@ "main": "./dist/src/validator.js",

@@ -30,2 +30,3 @@ # asl-validator

Options:
-V, --version output the version number
--json-definition <jsonDefinition> JSON definition (default: [])

@@ -32,0 +33,0 @@ --json-path <jsonPath> JSON path (default: [])

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc