@alint-js/plugin-simplicity 0.0.27 → 0.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,16 @@
1
+ //#region ../../node_modules/.pnpm/xsschema@0.5.0-beta.7_@valibot+to-json-schema@1.7.1_valibot@1.4.2_typescript@6.0.3___ef_dd15987b5d347427ac15b31bb7305983/node_modules/xsschema/dist/index-DoHiaFQM.js
2
+ const strictJsonSchema = (schema) => ({
3
+ ...schema,
4
+ additionalProperties: false,
5
+ properties: schema.properties != null ? Object.fromEntries(Object.entries(schema.properties).map(([k, v]) => [k, v != null && typeof v === "object" && "type" in v && v.type === "object" ? strictJsonSchema(v) : v])) : schema.properties
6
+ });
7
+ const missingDependenciesUrl = "https://xsai.js.org/docs/packages-top/xsschema#missing-dependencies";
8
+ const tryImport = async (result, name) => {
9
+ try {
10
+ return await result;
11
+ } catch {
12
+ throw new Error(`xsschema: Missing dependencies "${name}". see ${missingDependenciesUrl}`);
13
+ }
14
+ };
15
+ //#endregion
16
+ export { strictJsonSchema as n, tryImport as r, missingDependenciesUrl as t };