Milestone 0: import zappier billing, Verae middleware, and Zapier research
Compose-ready workspace: packages/zappier (rate card, portal, Stripe), packages/verae-zapier-middleware (timestamp + NATS), packages/verae-zapier (CLI app), vendor/zapier-platform, and research/zapier vendor corpus. Gate 0 structure checks pass. Product code and research are not yet wired.
This commit is contained in:
commit
b4150c8250
1364 changed files with 6814366 additions and 0 deletions
49
vendor/zapier-platform/packages/cli/scripts/docs.js
vendored
Normal file
49
vendor/zapier-platform/packages/cli/scripts/docs.js
vendored
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
|
||||
const fs = require('node:fs');
|
||||
|
||||
const { COMMANDS } = require('../src/oclif/oCommands');
|
||||
|
||||
// Takes all the cmd.docs and puts them into a big md file.
|
||||
const generateCliMarkdown = () => {
|
||||
return (
|
||||
Object.keys(COMMANDS)
|
||||
.sort()
|
||||
// topics (such as `env` are listed as "true" in the commands so aliases play nice, but they don't need to be in docs
|
||||
.filter((name) => COMMANDS[name] !== true)
|
||||
.filter((name) => !COMMANDS[name].hide)
|
||||
.map((name) => {
|
||||
return COMMANDS[name].markdownHelp(name);
|
||||
})
|
||||
.join('\n\n\n')
|
||||
);
|
||||
};
|
||||
|
||||
// Writes out a big markdown file for the cli.
|
||||
const writeCliDocs = ({ markdownPath } = {}) => {
|
||||
const docs = generateCliMarkdown();
|
||||
|
||||
fs.writeFileSync(
|
||||
markdownPath,
|
||||
`\
|
||||
# Zapier CLI Command Reference
|
||||
|
||||
These are the generated docs for all Zapier platform CLI commands.
|
||||
|
||||
You can install the CLI with \`npm install -g zapier-platform-cli\`.
|
||||
|
||||
${'```'}bash
|
||||
$ npm install -g zapier-platform-cli
|
||||
${'```'}
|
||||
|
||||
# Commands
|
||||
|
||||
${docs}
|
||||
`,
|
||||
);
|
||||
};
|
||||
|
||||
writeCliDocs({
|
||||
markdownPath: './docs/cli.md',
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue