-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #109 from samply/release/v0.2.0
Release v0.2.0
- Loading branch information
Showing
56 changed files
with
3,295 additions
and
981 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
"use strict"; | ||
const __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
|
||
console.log( | ||
"Checking Lens options for ", | ||
process.env.VITE_TARGET_ENVIRONMENT, | ||
); | ||
|
||
let optionsPath = ""; | ||
if (process.env.VITE_TARGET_ENVIRONMENT === "production") { | ||
optionsPath = "./packages/demo/public/options-ccp-prod.json"; | ||
} else if (process.env.VITE_TARGET_ENVIRONMENT === "staging") { | ||
optionsPath = "./packages/demo/public/options-ccp-demo.json"; | ||
} else { | ||
optionsPath = "./packages/demo/public/options-dev.json"; | ||
} | ||
|
||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const options_schema_json_1 = __importDefault(require("./packages/lib/src/types/options.schema.json")); | ||
const schemasafe_1 = require("@exodus/schemasafe"); | ||
const options_json_1 = __importDefault(require(optionsPath)); | ||
console.log("Checking Lens options"); | ||
const parse = (0, schemasafe_1.parser)(options_schema_json_1.default, { | ||
includeErrors: true, | ||
allErrors: true, | ||
}); | ||
const 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); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import optionsSchema from "./packages/lib/src/types/options.schema.json"; | ||
import { parser } from "@exodus/schemasafe"; | ||
|
||
import devOptions from "./packages/demo/public/options-dev.json"; | ||
import demoOptions from "./packages/demo/public/options-ccp-demo.json"; | ||
import prodOptions from "./packages/demo/public/options-ccp-prod.json"; | ||
|
||
console.log( | ||
"Checking Lens options for ", | ||
import.meta.env.VITE_TARGET_ENVIRONMENT, | ||
); | ||
|
||
let options = {}; | ||
if (import.meta.env.VITE_TARGET_ENVIRONMENT === "production") { | ||
options = prodOptions; | ||
} else if (import.meta.env.VITE_TARGET_ENVIRONMENT === "staging") { | ||
options = demoOptions; | ||
} else { | ||
options = devOptions; | ||
} | ||
|
||
const parse = parser(optionsSchema, { | ||
includeErrors: true, | ||
allErrors: true, | ||
}); | ||
const validJSON = parse(JSON.stringify(options)); | ||
if (validJSON.valid === true) { | ||
console.log("Options are valid"); | ||
} else if (typeof options === "object") { | ||
console.error( | ||
"Lens-Options are not conform with the JSON schema", | ||
validJSON.errors, | ||
); | ||
process.exit(1); | ||
} |
Oops, something went wrong.