Skip to content

Commit

Permalink
fix: ci without tsc
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickskowronekdkfz committed May 23, 2024
1 parent c600f4f commit f03527b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
2 changes: 2 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tsc --resolveJsonModule --esModuleInterop options_tester.ts
mv options_tester.js options_tester.cjs
21 changes: 21 additions & 0 deletions options_tester.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var options_schema_json_1 = __importDefault(require("./packages/lib/src/interfaces/options.schema.json"));
var schemasafe_1 = require("@exodus/schemasafe");
var options_json_1 = __importDefault(require("./packages/demo/public/options.json"));
console.log("Checking Lens options");
var parse = (0, schemasafe_1.parser)(options_schema_json_1.default, {
includeErrors: true,
allErrors: true,
});
var validJSON = parse(JSON.stringify(options_json_1.default));
if (validJSON.valid === true) {
console.log("Options are valid");
}
else if (typeof options_json_1.default === "object") {
console.error("Lens-Options are not conform with the JSON schema", validJSON.errors);
process.exit(1);
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"link": "wait-on dist/types.d.ts && cd dist/ && npm link",
"prepublishOnly": "npm run build -s",
"security:check": "npm audit --omit=dev --audit-level high",
"prepare": "husky install && tsc --resolveJsonModule --esModuleInterop options_tester.ts && mv options_tester.js options_tester.cjs",
"prepare": "husky install",
"version": "npm version -m \"build: release version %s\""
},
"devDependencies": {
Expand Down

0 comments on commit f03527b

Please sign in to comment.