You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const generate = require("../../../openapi-forge/src/generate"); in utils.js in JS generator.
const generate = require("../../../openapi-forge/src/generate"); in features\support\base.ts in TS generator.
const log = require("../src/log.js"); in CICD\compareTestResults.js in forge project
const log = require("../src/log.js"); in CICD\updateWebpage.js in forge project
path.join(__dirname, "..", "..", generator) in the test-generators command. This enforces the location of the file with this code AND the location of the generators supplied to test-generators.
The text was updated successfully, but these errors were encountered:
Actually, I think there is a completely different and more conventional approach. Rather than considering these as files, we should consider this part of the public API for openapi-forge. Currently the API is a CLI tool, however, it could also provide a programmatic API.
With this in mind, the conventional approach would be to add an index.js file, which exports the public behaviour, and is pointed to via the main property of the package.json
At the very least, we need a warning comment in the forge project in the log.js and generate.js files.
Can we expose the files more publicly to make the behaviour more explicit? https://docs.npmjs.com/cli/v9/configuring-npm/package-json#files
References:
const generate = require("../../../openapi-forge/src/generate");
in utils.js in JS generator.const generate = require("../../../openapi-forge/src/generate");
in features\support\base.ts in TS generator.const log = require("../src/log.js");
in CICD\compareTestResults.js in forge projectconst log = require("../src/log.js");
in CICD\updateWebpage.js in forge projectpath.join(__dirname, "..", "..", generator)
in the test-generators command. This enforces the location of the file with this code AND the location of the generators supplied to test-generators.The text was updated successfully, but these errors were encountered: