create-manifest
Version:
Create a new Manifest backend
66 lines (65 loc) • 2.46 kB
TypeScript
import { Command } from '@oclif/core';
export default class CreateManifest extends Command {
static description: string;
static args: {
firstArg: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
};
static flags: {
backendFile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
cursor: import("@oclif/core/interfaces").BooleanFlag<boolean>;
copilot: import("@oclif/core/interfaces").BooleanFlag<boolean>;
windsurf: import("@oclif/core/interfaces").BooleanFlag<boolean>;
};
/**
* The run method is called when the command is run.
*
* Steps:
* 1. Create a folder named after the first arg or ask for it
* 2. Create a folder with the name `manifest`.
* 3. Create a file inside the folder with the name `manifest.yml`.
* 4. Update the `package.json` file with the new packages and scripts.
* 5. Update the .vscode/extensions.json file with the recommended extensions.
* 6. Update the .vscode/settings.json file with the recommended settings.
* 7. Update the .gitignore file with the recommended settings.
* 8. Update the .env file with the environment variables.
* 9. If no README.md file exists, create one.
* 10. Add optional files based on flags
* 11. Install the new packages.
* 12. Serve the new app.
* 13. Wait for the server to start.
* 14. Seed the database.
* 15. Open the browser.
*/
run(): Promise<void>;
/**
* Check if the server is ready.
*
* @returns {Promise<boolean>} - Returns a promise that resolves to a boolean.
*
**/
isServerReady(): Promise<boolean>;
/**
* Wait for the server to be ready.
*
* @returns a promise that resolves to void when the server is ready.
*
**/
waitForServerToBeReady(): Promise<void>;
/**
* Transform a JSON with comments to a JSON without comments.
*
* @param jsonString - The JSON with comments.
*
* @returns the JSON without comments.
*
**/
removeComments(jsonString: string): string;
/**
* Kill a process without logging an error if it fails.
*
* @param {number} pid - The process ID.
* @returns {Promise<void>} - A promise that resolves when the process is killed.
*
*/
silentKill(pid: number): Promise<void>;
}