UNPKG

@salesforce/schemas

Version:

This repository contains the spec and schema for the Scratch Org Definition Configuration file and `sfdx-project.json` file.

17 lines 911 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const node_fs_1 = __importDefault(require("node:fs")); const node_path_1 = __importDefault(require("node:path")); /** TS really doesn't want us to export things with hyphens. I tried to statically export the 2 top-level json files * but that was throwing compiler errors. So I kept the original code from index.js to dynamically find and export the schemas. */ const schemas = node_fs_1.default .readdirSync(__dirname) .filter(filename => filename.endsWith("schema.json")); for (const schema of schemas) { exports[node_path_1.default.basename(schema, ".schema.json")] = node_path_1.default.resolve(node_path_1.default.join(__dirname, schema)); } //# sourceMappingURL=index.js.map