-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
50 additions
and
20 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
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 |
---|---|---|
@@ -1,3 +1,18 @@ | ||
export { ProjectJson } from "./sfdx-project/sfdxProjectJson"; | ||
import fs from "node:fs"; | ||
import path from "node:path"; | ||
|
||
export { ProjectJson } from "./sfdx-project/sfdxProjectJson"; | ||
export { PackageDir, PackageDirDependency } from "./sfdx-project/packageDir"; | ||
|
||
/** 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 = fs | ||
.readdirSync(__dirname) | ||
.filter(filename => filename.endsWith("schema.json")); | ||
|
||
for (const schema of schemas) { | ||
exports[path.basename(schema, ".schema.json")] = path.resolve( | ||
path.join(__dirname, schema) | ||
); | ||
} |
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