mcpmake 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +691 -0
- package/bin/mcpmake.mjs +2 -0
- package/dist/analyzer/auth-detector.d.ts +12 -0
- package/dist/analyzer/auth-detector.js +142 -0
- package/dist/analyzer/dom-parser.d.ts +10 -0
- package/dist/analyzer/dom-parser.js +259 -0
- package/dist/analyzer/goal-crawler.d.ts +25 -0
- package/dist/analyzer/goal-crawler.js +177 -0
- package/dist/analyzer/hybrid-detector.d.ts +28 -0
- package/dist/analyzer/hybrid-detector.js +96 -0
- package/dist/analyzer/index.d.ts +12 -0
- package/dist/analyzer/index.js +8 -0
- package/dist/analyzer/screenshot-capture.d.ts +29 -0
- package/dist/analyzer/screenshot-capture.js +42 -0
- package/dist/analyzer/selector-builder.d.ts +19 -0
- package/dist/analyzer/selector-builder.js +199 -0
- package/dist/analyzer/semantic-analyzer.d.ts +13 -0
- package/dist/analyzer/semantic-analyzer.js +145 -0
- package/dist/analyzer/site-crawler.d.ts +38 -0
- package/dist/analyzer/site-crawler.js +235 -0
- package/dist/cloud/billing/billing-engine.d.ts +44 -0
- package/dist/cloud/billing/billing-engine.js +81 -0
- package/dist/cloud/billing/credit-store.d.ts +64 -0
- package/dist/cloud/billing/credit-store.js +168 -0
- package/dist/cloud/billing/index.d.ts +4 -0
- package/dist/cloud/billing/index.js +2 -0
- package/dist/cloud/billing/usage-store.d.ts +42 -0
- package/dist/cloud/billing/usage-store.js +85 -0
- package/dist/cloud/billing/usage-tracker.d.ts +38 -0
- package/dist/cloud/billing/usage-tracker.js +95 -0
- package/dist/cloud/build-pipeline.d.ts +39 -0
- package/dist/cloud/build-pipeline.js +310 -0
- package/dist/cloud/build-queue.d.ts +30 -0
- package/dist/cloud/build-queue.js +70 -0
- package/dist/cloud/caddy-manager.d.ts +18 -0
- package/dist/cloud/caddy-manager.js +97 -0
- package/dist/cloud/container-backend.d.ts +62 -0
- package/dist/cloud/container-backend.js +59 -0
- package/dist/cloud/container-manager.d.ts +64 -0
- package/dist/cloud/container-manager.js +301 -0
- package/dist/cloud/crypto.d.ts +27 -0
- package/dist/cloud/crypto.js +63 -0
- package/dist/cloud/db/index.d.ts +27 -0
- package/dist/cloud/db/index.js +53 -0
- package/dist/cloud/db/migrations.d.ts +12 -0
- package/dist/cloud/db/migrations.js +329 -0
- package/dist/cloud/db/pg-store.d.ts +45 -0
- package/dist/cloud/db/pg-store.js +336 -0
- package/dist/cloud/failure-tracker.d.ts +51 -0
- package/dist/cloud/failure-tracker.js +102 -0
- package/dist/cloud/idle-monitor.d.ts +30 -0
- package/dist/cloud/idle-monitor.js +70 -0
- package/dist/cloud/mailer.d.ts +21 -0
- package/dist/cloud/mailer.js +193 -0
- package/dist/cloud/mcp-proxy.d.ts +58 -0
- package/dist/cloud/mcp-proxy.js +203 -0
- package/dist/cloud/metric-samples.d.ts +43 -0
- package/dist/cloud/metric-samples.js +85 -0
- package/dist/cloud/metrics.d.ts +26 -0
- package/dist/cloud/metrics.js +59 -0
- package/dist/cloud/multipart.d.ts +26 -0
- package/dist/cloud/multipart.js +132 -0
- package/dist/cloud/observability.d.ts +27 -0
- package/dist/cloud/observability.js +98 -0
- package/dist/cloud/rate-limiter.d.ts +31 -0
- package/dist/cloud/rate-limiter.js +58 -0
- package/dist/cloud/request-security.d.ts +5 -0
- package/dist/cloud/request-security.js +74 -0
- package/dist/cloud/resource-monitor.d.ts +69 -0
- package/dist/cloud/resource-monitor.js +130 -0
- package/dist/cloud/secret-store.d.ts +38 -0
- package/dist/cloud/secret-store.js +103 -0
- package/dist/cloud/security.d.ts +26 -0
- package/dist/cloud/security.js +142 -0
- package/dist/cloud/server.d.ts +21 -0
- package/dist/cloud/server.js +1079 -0
- package/dist/cloud/shared-state.d.ts +72 -0
- package/dist/cloud/shared-state.js +159 -0
- package/dist/cloud/ssrf.d.ts +43 -0
- package/dist/cloud/ssrf.js +150 -0
- package/dist/cloud/store.d.ts +41 -0
- package/dist/cloud/store.js +75 -0
- package/dist/cloud/stripe.d.ts +78 -0
- package/dist/cloud/stripe.js +317 -0
- package/dist/cloud/telemetry-store.d.ts +53 -0
- package/dist/cloud/telemetry-store.js +108 -0
- package/dist/cloud/web/auth.d.ts +225 -0
- package/dist/cloud/web/auth.js +555 -0
- package/dist/cloud/web/charts.d.ts +70 -0
- package/dist/cloud/web/charts.js +178 -0
- package/dist/cloud/web/csrf.d.ts +14 -0
- package/dist/cloud/web/csrf.js +22 -0
- package/dist/cloud/web/docs.d.ts +40 -0
- package/dist/cloud/web/docs.js +174 -0
- package/dist/cloud/web/router.d.ts +25 -0
- package/dist/cloud/web/router.js +1921 -0
- package/dist/cloud/web/static/alpine.min.js +5 -0
- package/dist/cloud/web/static/favicon.svg +4 -0
- package/dist/cloud/web/static/htmx-sse.js +290 -0
- package/dist/cloud/web/static/htmx.min.js +1 -0
- package/dist/cloud/web/static/style.css +2683 -0
- package/dist/cloud/web/static-server.d.ts +13 -0
- package/dist/cloud/web/static-server.js +73 -0
- package/dist/cloud/web/template-engine.d.ts +27 -0
- package/dist/cloud/web/template-engine.js +146 -0
- package/dist/cloud/web/templates/layouts/admin.hbs +57 -0
- package/dist/cloud/web/templates/layouts/auth.hbs +138 -0
- package/dist/cloud/web/templates/layouts/base.hbs +16 -0
- package/dist/cloud/web/templates/layouts/dashboard.hbs +39 -0
- package/dist/cloud/web/templates/layouts/landing.hbs +82 -0
- package/dist/cloud/web/templates/pages/admin/overview.hbs +123 -0
- package/dist/cloud/web/templates/pages/admin/servers.hbs +129 -0
- package/dist/cloud/web/templates/pages/admin/telemetry.hbs +39 -0
- package/dist/cloud/web/templates/pages/admin/user-edit.hbs +91 -0
- package/dist/cloud/web/templates/pages/admin/users.hbs +179 -0
- package/dist/cloud/web/templates/pages/auth/forgot-password.hbs +25 -0
- package/dist/cloud/web/templates/pages/auth/login.hbs +33 -0
- package/dist/cloud/web/templates/pages/auth/register.hbs +32 -0
- package/dist/cloud/web/templates/pages/auth/reset-password.hbs +34 -0
- package/dist/cloud/web/templates/pages/dashboard/billing.hbs +140 -0
- package/dist/cloud/web/templates/pages/dashboard/create.hbs +173 -0
- package/dist/cloud/web/templates/pages/dashboard/index.hbs +8 -0
- package/dist/cloud/web/templates/pages/dashboard/server-detail.hbs +280 -0
- package/dist/cloud/web/templates/pages/dashboard/server-logs.hbs +35 -0
- package/dist/cloud/web/templates/pages/dashboard/server-metrics.hbs +63 -0
- package/dist/cloud/web/templates/pages/dashboard/servers-partial.hbs +21 -0
- package/dist/cloud/web/templates/pages/dashboard/servers.hbs +44 -0
- package/dist/cloud/web/templates/pages/docs/show.hbs +16 -0
- package/dist/cloud/web/templates/pages/errors/404.hbs +9 -0
- package/dist/cloud/web/templates/pages/errors/500.hbs +8 -0
- package/dist/cloud/web/templates/pages/landing/index.hbs +223 -0
- package/dist/cloud/web/templates/pages/legal/privacy.hbs +71 -0
- package/dist/cloud/web/templates/pages/legal/terms.hbs +73 -0
- package/dist/cloud/web/templates/partials/admin-stats.hbs +52 -0
- package/dist/cloud/web/templates/partials/flash-message.hbs +6 -0
- package/dist/cloud/web/templates/partials/pricing-table.hbs +103 -0
- package/dist/cloud/web/templates/partials/server-card.hbs +19 -0
- package/dist/cloud/web/templates/partials/status-badge.hbs +1 -0
- package/dist/commands/bundle.d.ts +18 -0
- package/dist/commands/bundle.js +82 -0
- package/dist/commands/ci.d.ts +25 -0
- package/dist/commands/ci.js +149 -0
- package/dist/commands/deploy.d.ts +24 -0
- package/dist/commands/deploy.js +145 -0
- package/dist/commands/diff.d.ts +18 -0
- package/dist/commands/diff.js +185 -0
- package/dist/commands/from/describe.d.ts +65 -0
- package/dist/commands/from/describe.js +173 -0
- package/dist/commands/from/har.d.ts +81 -0
- package/dist/commands/from/har.js +255 -0
- package/dist/commands/from/openapi.d.ts +105 -0
- package/dist/commands/from/openapi.js +302 -0
- package/dist/commands/from/postman.d.ts +51 -0
- package/dist/commands/from/postman.js +146 -0
- package/dist/commands/from/target-support.d.ts +11 -0
- package/dist/commands/from/target-support.js +33 -0
- package/dist/commands/from/url.d.ts +75 -0
- package/dist/commands/from/url.js +244 -0
- package/dist/commands/from/website.d.ts +75 -0
- package/dist/commands/from/website.js +284 -0
- package/dist/commands/lint.d.ts +24 -0
- package/dist/commands/lint.js +184 -0
- package/dist/commands/merge.d.ts +18 -0
- package/dist/commands/merge.js +161 -0
- package/dist/commands/publish.d.ts +27 -0
- package/dist/commands/publish.js +334 -0
- package/dist/commands/rescan.d.ts +40 -0
- package/dist/commands/rescan.js +255 -0
- package/dist/commands/update.d.ts +14 -0
- package/dist/commands/update.js +87 -0
- package/dist/commands/verify.d.ts +14 -0
- package/dist/commands/verify.js +71 -0
- package/dist/config/configurable-command.d.ts +13 -0
- package/dist/config/configurable-command.js +70 -0
- package/dist/config/mcpmake-config.d.ts +68 -0
- package/dist/config/mcpmake-config.js +207 -0
- package/dist/docs/cli.md +400 -0
- package/dist/docs/mcp-2026-07-28-migration.md +78 -0
- package/dist/docs/migrate-from-stainless.md +94 -0
- package/dist/docs/quickstart.md +166 -0
- package/dist/docs/show-hn.md +26 -0
- package/dist/docs/website-servers.md +169 -0
- package/dist/emitter/code-writer.d.ts +8 -0
- package/dist/emitter/code-writer.js +25 -0
- package/dist/emitter/index.d.ts +32 -0
- package/dist/emitter/index.js +280 -0
- package/dist/emitter/mcpb-bundler.d.ts +31 -0
- package/dist/emitter/mcpb-bundler.js +172 -0
- package/dist/emitter/project-scaffolder.d.ts +4 -0
- package/dist/emitter/project-scaffolder.js +89 -0
- package/dist/emitter/python-template-loader.d.ts +4 -0
- package/dist/emitter/python-template-loader.js +30 -0
- package/dist/emitter/python-templates/dockerfile.hbs +14 -0
- package/dist/emitter/python-templates/env.example.hbs +6 -0
- package/dist/emitter/python-templates/requirements.txt.hbs +4 -0
- package/dist/emitter/python-templates/server.py.hbs +77 -0
- package/dist/emitter/site-scaffolder.d.ts +13 -0
- package/dist/emitter/site-scaffolder.js +70 -0
- package/dist/emitter/site-template-loader.d.ts +5 -0
- package/dist/emitter/site-template-loader.js +47 -0
- package/dist/emitter/site-templates/browser-manager.ts.hbs +233 -0
- package/dist/emitter/site-templates/config.ts.hbs +28 -0
- package/dist/emitter/site-templates/dockerfile.hbs +31 -0
- package/dist/emitter/site-templates/env.example.hbs +19 -0
- package/dist/emitter/site-templates/package.json.hbs +26 -0
- package/dist/emitter/site-templates/server-main-http.ts.hbs +108 -0
- package/dist/emitter/site-templates/server-main.ts.hbs +23 -0
- package/dist/emitter/site-templates/tool-handler-action.ts.hbs +86 -0
- package/dist/emitter/site-templates/tool-handler-form.ts.hbs +116 -0
- package/dist/emitter/site-templates/tool-handler-lifecycle.ts.hbs +146 -0
- package/dist/emitter/site-templates/tool-index.ts.hbs +11 -0
- package/dist/emitter/template-loader.d.ts +1 -0
- package/dist/emitter/template-loader.js +27 -0
- package/dist/emitter/templates/auth-provider.ts.hbs +57 -0
- package/dist/emitter/templates/config.ts.hbs +63 -0
- package/dist/emitter/templates/discovery.ts.hbs +301 -0
- package/dist/emitter/templates/dockerfile.hbs +34 -0
- package/dist/emitter/templates/env.example.hbs +28 -0
- package/dist/emitter/templates/gitignore.hbs +5 -0
- package/dist/emitter/templates/http-executor.ts.hbs +117 -0
- package/dist/emitter/templates/oauth.ts.hbs +188 -0
- package/dist/emitter/templates/package.json.hbs +25 -0
- package/dist/emitter/templates/prompts.ts.hbs +22 -0
- package/dist/emitter/templates/readme.md.hbs +123 -0
- package/dist/emitter/templates/resources.ts.hbs +63 -0
- package/dist/emitter/templates/server-main-http.ts.hbs +407 -0
- package/dist/emitter/templates/server-main.ts.hbs +40 -0
- package/dist/emitter/templates/task-handlers.ts.hbs +189 -0
- package/dist/emitter/templates/task-manager.ts.hbs +139 -0
- package/dist/emitter/templates/task-sse.ts.hbs +105 -0
- package/dist/emitter/templates/tool-handler.ts.hbs +124 -0
- package/dist/emitter/templates/tool-index.ts.hbs +11 -0
- package/dist/emitter/templates/tool-test.ts.hbs +57 -0
- package/dist/emitter/templates/trace.ts.hbs +79 -0
- package/dist/emitter/templates/tsconfig.json.hbs +16 -0
- package/dist/emitter/templates/types.ts.hbs +5 -0
- package/dist/emitter/worker-template-loader.d.ts +5 -0
- package/dist/emitter/worker-template-loader.js +33 -0
- package/dist/emitter/worker-templates/config.ts.hbs +54 -0
- package/dist/emitter/worker-templates/dev-vars.example.hbs +10 -0
- package/dist/emitter/worker-templates/gitignore.hbs +6 -0
- package/dist/emitter/worker-templates/package.json.hbs +24 -0
- package/dist/emitter/worker-templates/readme.md.hbs +53 -0
- package/dist/emitter/worker-templates/server.test.ts.hbs +20 -0
- package/dist/emitter/worker-templates/tool-handler.ts.hbs +85 -0
- package/dist/emitter/worker-templates/tool-index.ts.hbs +28 -0
- package/dist/emitter/worker-templates/tsconfig.json.hbs +17 -0
- package/dist/emitter/worker-templates/worker.ts.hbs +242 -0
- package/dist/emitter/worker-templates/wrangler.toml.hbs +19 -0
- package/dist/generator/spec-generator.d.ts +6 -0
- package/dist/generator/spec-generator.js +50 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +64 -0
- package/dist/parser/har-filter.d.ts +8 -0
- package/dist/parser/har-filter.js +71 -0
- package/dist/parser/har-loader.d.ts +2 -0
- package/dist/parser/har-loader.js +14 -0
- package/dist/parser/har-normalizer.d.ts +20 -0
- package/dist/parser/har-normalizer.js +78 -0
- package/dist/parser/index.d.ts +10 -0
- package/dist/parser/index.js +6 -0
- package/dist/parser/openapi-loader.d.ts +6 -0
- package/dist/parser/openapi-loader.js +308 -0
- package/dist/parser/operation-extractor.d.ts +13 -0
- package/dist/parser/operation-extractor.js +155 -0
- package/dist/parser/overlay-loader.d.ts +10 -0
- package/dist/parser/overlay-loader.js +184 -0
- package/dist/parser/postman-loader.d.ts +9 -0
- package/dist/parser/postman-loader.js +106 -0
- package/dist/parser/schema-converter.d.ts +12 -0
- package/dist/parser/schema-converter.js +117 -0
- package/dist/plugins/adapter.d.ts +40 -0
- package/dist/plugins/adapter.js +15 -0
- package/dist/plugins/loader.d.ts +25 -0
- package/dist/plugins/loader.js +58 -0
- package/dist/pricing.d.ts +55 -0
- package/dist/pricing.js +133 -0
- package/dist/providers/index.d.ts +15 -0
- package/dist/providers/index.js +56 -0
- package/dist/recorder/browser-recorder.d.ts +22 -0
- package/dist/recorder/browser-recorder.js +205 -0
- package/dist/registry/official-registry.d.ts +90 -0
- package/dist/registry/official-registry.js +129 -0
- package/dist/rescan/diff-engine.d.ts +5 -0
- package/dist/rescan/diff-engine.js +312 -0
- package/dist/rescan/index.d.ts +3 -0
- package/dist/rescan/index.js +2 -0
- package/dist/rescan/rescan-runner.d.ts +42 -0
- package/dist/rescan/rescan-runner.js +69 -0
- package/dist/rescan/rescan-scheduler.d.ts +41 -0
- package/dist/rescan/rescan-scheduler.js +179 -0
- package/dist/site-transformer/browser-tools.d.ts +10 -0
- package/dist/site-transformer/browser-tools.js +59 -0
- package/dist/site-transformer/index.d.ts +2 -0
- package/dist/site-transformer/index.js +2 -0
- package/dist/site-transformer/selector-healer.d.ts +8 -0
- package/dist/site-transformer/selector-healer.js +106 -0
- package/dist/site-transformer/tool-generator.d.ts +13 -0
- package/dist/site-transformer/tool-generator.js +245 -0
- package/dist/transformer/auth-detector.d.ts +13 -0
- package/dist/transformer/auth-detector.js +90 -0
- package/dist/transformer/catalog-builder.d.ts +18 -0
- package/dist/transformer/catalog-builder.js +56 -0
- package/dist/transformer/client-compat.d.ts +6 -0
- package/dist/transformer/client-compat.js +44 -0
- package/dist/transformer/har-clusterer.d.ts +9 -0
- package/dist/transformer/har-clusterer.js +27 -0
- package/dist/transformer/har-dedup.d.ts +10 -0
- package/dist/transformer/har-dedup.js +81 -0
- package/dist/transformer/har-schema-inferrer.d.ts +15 -0
- package/dist/transformer/har-schema-inferrer.js +90 -0
- package/dist/transformer/har-to-operations.d.ts +13 -0
- package/dist/transformer/har-to-operations.js +192 -0
- package/dist/transformer/index.d.ts +8 -0
- package/dist/transformer/index.js +6 -0
- package/dist/transformer/llm-namer.d.ts +6 -0
- package/dist/transformer/llm-namer.js +59 -0
- package/dist/transformer/naming.d.ts +4 -0
- package/dist/transformer/naming.js +30 -0
- package/dist/transformer/operation-filter.d.ts +13 -0
- package/dist/transformer/operation-filter.js +52 -0
- package/dist/transformer/resource-builder.d.ts +12 -0
- package/dist/transformer/resource-builder.js +80 -0
- package/dist/transformer/schema-merger.d.ts +14 -0
- package/dist/transformer/schema-merger.js +65 -0
- package/dist/transformer/tool-builder.d.ts +3 -0
- package/dist/transformer/tool-builder.js +114 -0
- package/dist/types/index.d.ts +131 -0
- package/dist/types/index.js +1 -0
- package/dist/types/site.d.ts +284 -0
- package/dist/types/site.js +8 -0
- package/dist/utils/fail.d.ts +48 -0
- package/dist/utils/fail.js +204 -0
- package/dist/utils/fs.d.ts +5 -0
- package/dist/utils/fs.js +28 -0
- package/dist/utils/interactive.d.ts +6 -0
- package/dist/utils/interactive.js +30 -0
- package/dist/utils/logger.d.ts +1 -0
- package/dist/utils/logger.js +2 -0
- package/dist/utils/sanitize.d.ts +28 -0
- package/dist/utils/sanitize.js +44 -0
- package/dist/utils/watcher.d.ts +11 -0
- package/dist/utils/watcher.js +36 -0
- package/package.json +65 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
declare const _default: import("citty").CommandDef<{
|
|
2
|
+
collection: {
|
|
3
|
+
type: "positional";
|
|
4
|
+
description: string;
|
|
5
|
+
required: true;
|
|
6
|
+
};
|
|
7
|
+
output: {
|
|
8
|
+
type: "string";
|
|
9
|
+
alias: string;
|
|
10
|
+
description: string;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
name: {
|
|
14
|
+
type: "string";
|
|
15
|
+
alias: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
transport: {
|
|
19
|
+
type: "string";
|
|
20
|
+
alias: string;
|
|
21
|
+
description: string;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
target: {
|
|
25
|
+
type: "string";
|
|
26
|
+
description: string;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
include: {
|
|
30
|
+
type: "string";
|
|
31
|
+
alias: string;
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
exclude: {
|
|
35
|
+
type: "string";
|
|
36
|
+
alias: string;
|
|
37
|
+
description: string;
|
|
38
|
+
};
|
|
39
|
+
force: {
|
|
40
|
+
type: "boolean";
|
|
41
|
+
alias: string;
|
|
42
|
+
description: string;
|
|
43
|
+
default: false;
|
|
44
|
+
};
|
|
45
|
+
'dry-run': {
|
|
46
|
+
type: "boolean";
|
|
47
|
+
description: string;
|
|
48
|
+
default: false;
|
|
49
|
+
};
|
|
50
|
+
}>;
|
|
51
|
+
export default _default;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { defineConfigurableCommand } from '../../config/configurable-command.js';
|
|
2
|
+
import { loadPostmanCollection } from '../../parser/postman-loader.js';
|
|
3
|
+
import { normalizeEntry } from '../../parser/har-normalizer.js';
|
|
4
|
+
import { clusterEntries } from '../../transformer/har-clusterer.js';
|
|
5
|
+
import { clustersToOperations } from '../../transformer/har-to-operations.js';
|
|
6
|
+
import { deduplicateEntries } from '../../transformer/har-dedup.js';
|
|
7
|
+
import { buildAllTools } from '../../transformer/tool-builder.js';
|
|
8
|
+
import { filterOperations } from '../../transformer/operation-filter.js';
|
|
9
|
+
import { buildResources, buildPrompts } from '../../transformer/resource-builder.js';
|
|
10
|
+
import { emitProject } from '../../emitter/index.js';
|
|
11
|
+
import { targetArg, resolveTarget, resolveTransport, printWorkerNextSteps, } from './target-support.js';
|
|
12
|
+
import { logger } from '../../utils/logger.js';
|
|
13
|
+
import { fail } from '../../utils/fail.js';
|
|
14
|
+
function toPackageName(name) {
|
|
15
|
+
return name
|
|
16
|
+
.toLowerCase()
|
|
17
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
18
|
+
.replace(/^-|-$/g, '');
|
|
19
|
+
}
|
|
20
|
+
export default defineConfigurableCommand('postman', {
|
|
21
|
+
meta: {
|
|
22
|
+
name: 'postman',
|
|
23
|
+
description: 'Generate an MCP server from a Postman Collection',
|
|
24
|
+
},
|
|
25
|
+
args: {
|
|
26
|
+
collection: {
|
|
27
|
+
type: 'positional',
|
|
28
|
+
description: 'Path to Postman Collection JSON file (v2.1)',
|
|
29
|
+
required: true,
|
|
30
|
+
},
|
|
31
|
+
output: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
alias: 'o',
|
|
34
|
+
description: 'Output directory for generated project',
|
|
35
|
+
required: true,
|
|
36
|
+
},
|
|
37
|
+
name: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
alias: 'n',
|
|
40
|
+
description: 'Server name (defaults to collection name)',
|
|
41
|
+
},
|
|
42
|
+
transport: {
|
|
43
|
+
type: 'string',
|
|
44
|
+
alias: 't',
|
|
45
|
+
description: 'Transport mode: "stdio" (default) or "http"',
|
|
46
|
+
default: 'stdio',
|
|
47
|
+
},
|
|
48
|
+
target: targetArg,
|
|
49
|
+
include: {
|
|
50
|
+
type: 'string',
|
|
51
|
+
alias: 'i',
|
|
52
|
+
description: 'Include operations matching patterns (comma-separated)',
|
|
53
|
+
},
|
|
54
|
+
exclude: {
|
|
55
|
+
type: 'string',
|
|
56
|
+
alias: 'e',
|
|
57
|
+
description: 'Exclude operations matching patterns (comma-separated)',
|
|
58
|
+
},
|
|
59
|
+
force: {
|
|
60
|
+
type: 'boolean',
|
|
61
|
+
alias: 'f',
|
|
62
|
+
description: 'Overwrite existing output directory',
|
|
63
|
+
default: false,
|
|
64
|
+
},
|
|
65
|
+
'dry-run': {
|
|
66
|
+
type: 'boolean',
|
|
67
|
+
description: 'Preview generated files without writing',
|
|
68
|
+
default: false,
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
async run({ args }) {
|
|
72
|
+
logger.info(`Loading Postman collection: ${args.collection}`);
|
|
73
|
+
const { entries, collectionName } = await loadPostmanCollection(args.collection);
|
|
74
|
+
logger.info(`Found ${entries.length} requests in collection`);
|
|
75
|
+
if (entries.length === 0) {
|
|
76
|
+
await fail('No requests found in collection.');
|
|
77
|
+
}
|
|
78
|
+
// Normalize → dedup → cluster → convert (shared pipeline)
|
|
79
|
+
let normalized = entries.map(normalizeEntry);
|
|
80
|
+
normalized = deduplicateEntries(normalized);
|
|
81
|
+
const clusters = clusterEntries(normalized);
|
|
82
|
+
logger.info(`Clustered into ${clusters.length} operations`);
|
|
83
|
+
const { operations: allOperations, baseUrl, detectedAuth } = clustersToOperations(clusters);
|
|
84
|
+
let operations = filterOperations(allOperations, {
|
|
85
|
+
include: args.include?.split(',').map((s) => s.trim()),
|
|
86
|
+
exclude: args.exclude?.split(',').map((s) => s.trim()),
|
|
87
|
+
});
|
|
88
|
+
if (operations.length === 0) {
|
|
89
|
+
await fail('No operations left after filtering.');
|
|
90
|
+
}
|
|
91
|
+
const tools = buildAllTools(operations);
|
|
92
|
+
const resources = buildResources(operations);
|
|
93
|
+
const prompts = buildPrompts(operations);
|
|
94
|
+
// Build auth
|
|
95
|
+
const authSchemes = [];
|
|
96
|
+
const envVars = [];
|
|
97
|
+
for (const auth of detectedAuth) {
|
|
98
|
+
if (auth.type === 'bearer') {
|
|
99
|
+
authSchemes.push({ type: 'http-bearer', envVarName: 'BEARER_TOKEN' });
|
|
100
|
+
envVars.push({ name: 'BEARER_TOKEN', description: 'Bearer token', required: true });
|
|
101
|
+
}
|
|
102
|
+
else if (auth.type === 'apiKey') {
|
|
103
|
+
authSchemes.push({
|
|
104
|
+
type: 'apiKey',
|
|
105
|
+
envVarName: 'API_KEY',
|
|
106
|
+
headerName: auth.headerName,
|
|
107
|
+
in: 'header',
|
|
108
|
+
});
|
|
109
|
+
envVars.push({
|
|
110
|
+
name: 'API_KEY',
|
|
111
|
+
description: `API key (${auth.headerName})`,
|
|
112
|
+
required: true,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
const seen = new Set();
|
|
117
|
+
const uniqueEnvVars = envVars.filter((v) => {
|
|
118
|
+
if (seen.has(v.name))
|
|
119
|
+
return false;
|
|
120
|
+
seen.add(v.name);
|
|
121
|
+
return true;
|
|
122
|
+
});
|
|
123
|
+
const serverName = args.name ?? toPackageName(collectionName);
|
|
124
|
+
const target = resolveTarget(args.target);
|
|
125
|
+
const transport = resolveTransport(target, args.transport);
|
|
126
|
+
await emitProject({
|
|
127
|
+
serverName,
|
|
128
|
+
serverVersion: '1.0.0',
|
|
129
|
+
baseUrl: baseUrl || 'https://api.example.com',
|
|
130
|
+
transport,
|
|
131
|
+
tools,
|
|
132
|
+
resources,
|
|
133
|
+
prompts,
|
|
134
|
+
authSchemes,
|
|
135
|
+
envVars: [
|
|
136
|
+
{ name: 'BASE_URL', description: 'API base URL', required: true, example: baseUrl },
|
|
137
|
+
...uniqueEnvVars,
|
|
138
|
+
],
|
|
139
|
+
target,
|
|
140
|
+
}, { outputDir: args.output, force: args.force ?? false, dryRun: args['dry-run'] ?? false });
|
|
141
|
+
logger.success(`MCP server generated at: ${args.output}`);
|
|
142
|
+
logger.info(`Tools generated: ${tools.length}`);
|
|
143
|
+
if (target === 'cloudflare')
|
|
144
|
+
printWorkerNextSteps(args.output);
|
|
145
|
+
},
|
|
146
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type EmitTarget = 'node' | 'cloudflare';
|
|
2
|
+
/** Citty arg definition — spread into a command's `args` block. */
|
|
3
|
+
export declare const targetArg: {
|
|
4
|
+
type: "string";
|
|
5
|
+
description: string;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function resolveTarget(raw: unknown): EmitTarget;
|
|
9
|
+
/** Workers is stateless HTTP-only; otherwise honour `--transport`. */
|
|
10
|
+
export declare function resolveTransport(target: EmitTarget, rawTransport: unknown): 'stdio' | 'http';
|
|
11
|
+
export declare function printWorkerNextSteps(output: string): void;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared `--target` (deployment target) support for the `from <source>` commands.
|
|
3
|
+
*
|
|
4
|
+
* `node` (default) emits a Node.js server; `cloudflare` emits a stateless
|
|
5
|
+
* Cloudflare Workers project. The Workers target always runs as an HTTP Fetch
|
|
6
|
+
* handler, so it overrides `--transport`.
|
|
7
|
+
*/
|
|
8
|
+
import { logger } from '../../utils/logger.js';
|
|
9
|
+
/** Citty arg definition — spread into a command's `args` block. */
|
|
10
|
+
export const targetArg = {
|
|
11
|
+
type: 'string',
|
|
12
|
+
description: 'Deployment target: "node" (default) or "cloudflare" (Cloudflare Workers)',
|
|
13
|
+
default: 'node',
|
|
14
|
+
};
|
|
15
|
+
export function resolveTarget(raw) {
|
|
16
|
+
return raw === 'cloudflare' ? 'cloudflare' : 'node';
|
|
17
|
+
}
|
|
18
|
+
/** Workers is stateless HTTP-only; otherwise honour `--transport`. */
|
|
19
|
+
export function resolveTransport(target, rawTransport) {
|
|
20
|
+
if (target === 'cloudflare')
|
|
21
|
+
return 'http';
|
|
22
|
+
return rawTransport === 'http' ? 'http' : 'stdio';
|
|
23
|
+
}
|
|
24
|
+
export function printWorkerNextSteps(output) {
|
|
25
|
+
logger.info('');
|
|
26
|
+
logger.info('Next steps:');
|
|
27
|
+
logger.info(` cd ${output}`);
|
|
28
|
+
logger.info(' npm install');
|
|
29
|
+
logger.info(' cp .dev.vars.example .dev.vars # fill in MCP_AUTH_TOKEN + API credentials');
|
|
30
|
+
logger.info(' npm run dev # local Workers runtime (wrangler dev)');
|
|
31
|
+
logger.info(' npx wrangler secret put MCP_AUTH_TOKEN # then each API credential');
|
|
32
|
+
logger.info(' npx wrangler deploy');
|
|
33
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
declare const _default: import("citty").CommandDef<{
|
|
2
|
+
url: {
|
|
3
|
+
type: "positional";
|
|
4
|
+
description: string;
|
|
5
|
+
required: true;
|
|
6
|
+
};
|
|
7
|
+
output: {
|
|
8
|
+
type: "string";
|
|
9
|
+
alias: string;
|
|
10
|
+
description: string;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
name: {
|
|
14
|
+
type: "string";
|
|
15
|
+
alias: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
timeout: {
|
|
19
|
+
type: "string";
|
|
20
|
+
description: string;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
headless: {
|
|
24
|
+
type: "boolean";
|
|
25
|
+
description: string;
|
|
26
|
+
default: false;
|
|
27
|
+
};
|
|
28
|
+
navigate: {
|
|
29
|
+
type: "string";
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
transport: {
|
|
33
|
+
type: "string";
|
|
34
|
+
alias: string;
|
|
35
|
+
description: string;
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
38
|
+
target: {
|
|
39
|
+
type: "string";
|
|
40
|
+
description: string;
|
|
41
|
+
default: string;
|
|
42
|
+
};
|
|
43
|
+
include: {
|
|
44
|
+
type: "string";
|
|
45
|
+
alias: string;
|
|
46
|
+
description: string;
|
|
47
|
+
};
|
|
48
|
+
exclude: {
|
|
49
|
+
type: "string";
|
|
50
|
+
alias: string;
|
|
51
|
+
description: string;
|
|
52
|
+
};
|
|
53
|
+
force: {
|
|
54
|
+
type: "boolean";
|
|
55
|
+
alias: string;
|
|
56
|
+
description: string;
|
|
57
|
+
default: false;
|
|
58
|
+
};
|
|
59
|
+
'improve-names': {
|
|
60
|
+
type: "boolean";
|
|
61
|
+
description: string;
|
|
62
|
+
default: false;
|
|
63
|
+
};
|
|
64
|
+
interactive: {
|
|
65
|
+
type: "boolean";
|
|
66
|
+
description: string;
|
|
67
|
+
default: false;
|
|
68
|
+
};
|
|
69
|
+
'dry-run': {
|
|
70
|
+
type: "boolean";
|
|
71
|
+
description: string;
|
|
72
|
+
default: false;
|
|
73
|
+
};
|
|
74
|
+
}>;
|
|
75
|
+
export default _default;
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import { defineCommand } from 'citty';
|
|
2
|
+
import { recordBrowserSession } from '../../recorder/browser-recorder.js';
|
|
3
|
+
import { filterHarEntries } from '../../parser/har-filter.js';
|
|
4
|
+
import { normalizeEntry } from '../../parser/har-normalizer.js';
|
|
5
|
+
import { clusterEntries } from '../../transformer/har-clusterer.js';
|
|
6
|
+
import { clustersToOperations } from '../../transformer/har-to-operations.js';
|
|
7
|
+
import { deduplicateEntries } from '../../transformer/har-dedup.js';
|
|
8
|
+
import { improveToolNames } from '../../transformer/llm-namer.js';
|
|
9
|
+
import { buildAllTools } from '../../transformer/tool-builder.js';
|
|
10
|
+
import { filterOperations } from '../../transformer/operation-filter.js';
|
|
11
|
+
import { emitProject } from '../../emitter/index.js';
|
|
12
|
+
import { targetArg, resolveTarget, resolveTransport, printWorkerNextSteps, } from './target-support.js';
|
|
13
|
+
import { logger } from '../../utils/logger.js';
|
|
14
|
+
import { fail } from '../../utils/fail.js';
|
|
15
|
+
import { confirmOperations } from '../../utils/interactive.js';
|
|
16
|
+
function toPackageName(name) {
|
|
17
|
+
return name
|
|
18
|
+
.toLowerCase()
|
|
19
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
20
|
+
.replace(/^-|-$/g, '');
|
|
21
|
+
}
|
|
22
|
+
export default defineCommand({
|
|
23
|
+
meta: {
|
|
24
|
+
name: 'url',
|
|
25
|
+
description: 'Generate an MCP server by recording browser interactions with a website',
|
|
26
|
+
},
|
|
27
|
+
args: {
|
|
28
|
+
url: {
|
|
29
|
+
type: 'positional',
|
|
30
|
+
description: 'URL to open in the browser',
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
33
|
+
output: {
|
|
34
|
+
type: 'string',
|
|
35
|
+
alias: 'o',
|
|
36
|
+
description: 'Output directory for generated project',
|
|
37
|
+
required: true,
|
|
38
|
+
},
|
|
39
|
+
name: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
alias: 'n',
|
|
42
|
+
description: 'Server name (defaults to hostname)',
|
|
43
|
+
},
|
|
44
|
+
timeout: {
|
|
45
|
+
type: 'string',
|
|
46
|
+
description: 'Idle timeout in seconds before auto-closing (default: 300)',
|
|
47
|
+
default: '300',
|
|
48
|
+
},
|
|
49
|
+
headless: {
|
|
50
|
+
type: 'boolean',
|
|
51
|
+
description: 'Headless / CI capture: load the page non-interactively (no window to drive) and capture API traffic automatically',
|
|
52
|
+
default: false,
|
|
53
|
+
},
|
|
54
|
+
navigate: {
|
|
55
|
+
type: 'string',
|
|
56
|
+
description: 'Comma-separated same-origin URLs/paths to auto-visit in --headless mode to surface more API calls',
|
|
57
|
+
},
|
|
58
|
+
transport: {
|
|
59
|
+
type: 'string',
|
|
60
|
+
alias: 't',
|
|
61
|
+
description: 'Transport mode: "stdio" (default) or "http"',
|
|
62
|
+
default: 'stdio',
|
|
63
|
+
},
|
|
64
|
+
target: targetArg,
|
|
65
|
+
include: {
|
|
66
|
+
type: 'string',
|
|
67
|
+
alias: 'i',
|
|
68
|
+
description: 'Only include operations matching these patterns (comma-separated)',
|
|
69
|
+
},
|
|
70
|
+
exclude: {
|
|
71
|
+
type: 'string',
|
|
72
|
+
alias: 'e',
|
|
73
|
+
description: 'Exclude operations matching these patterns (comma-separated)',
|
|
74
|
+
},
|
|
75
|
+
force: {
|
|
76
|
+
type: 'boolean',
|
|
77
|
+
alias: 'f',
|
|
78
|
+
description: 'Overwrite existing output directory',
|
|
79
|
+
default: false,
|
|
80
|
+
},
|
|
81
|
+
'improve-names': {
|
|
82
|
+
type: 'boolean',
|
|
83
|
+
description: 'Use AI to generate better tool names (requires ANTHROPIC_API_KEY)',
|
|
84
|
+
default: false,
|
|
85
|
+
},
|
|
86
|
+
interactive: {
|
|
87
|
+
type: 'boolean',
|
|
88
|
+
description: 'Review and confirm detected tools before generation',
|
|
89
|
+
default: false,
|
|
90
|
+
},
|
|
91
|
+
'dry-run': {
|
|
92
|
+
type: 'boolean',
|
|
93
|
+
description: 'Preview generated files without writing',
|
|
94
|
+
default: false,
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
async run({ args }) {
|
|
98
|
+
const timeoutMs = parseInt(args.timeout ?? '300', 10) * 1000;
|
|
99
|
+
// Record browser session
|
|
100
|
+
const { entries, baseUrl } = await recordBrowserSession({
|
|
101
|
+
url: args.url,
|
|
102
|
+
timeout: timeoutMs,
|
|
103
|
+
headless: args.headless ?? false,
|
|
104
|
+
navigate: args.navigate
|
|
105
|
+
?.split(',')
|
|
106
|
+
.map((s) => s.trim())
|
|
107
|
+
.filter(Boolean),
|
|
108
|
+
});
|
|
109
|
+
logger.info(`Captured ${entries.length} total requests`);
|
|
110
|
+
// Filter noise (reuse HAR pipeline)
|
|
111
|
+
const targetHost = new URL(args.url).hostname;
|
|
112
|
+
const filtered = filterHarEntries(entries, {
|
|
113
|
+
allowedDomains: [targetHost],
|
|
114
|
+
includeErrors: false,
|
|
115
|
+
});
|
|
116
|
+
logger.info(`${filtered.length} API requests after filtering`);
|
|
117
|
+
if (filtered.length === 0) {
|
|
118
|
+
await fail(args.headless
|
|
119
|
+
? 'No API requests captured. Pass --navigate with paths that trigger API calls, or use interactive mode (omit --headless).'
|
|
120
|
+
: 'No API requests captured. Try interacting with the page more.');
|
|
121
|
+
}
|
|
122
|
+
// Normalize → dedup → cluster → convert (shared HAR pipeline)
|
|
123
|
+
let normalized = filtered.map(normalizeEntry);
|
|
124
|
+
const beforeDedup = normalized.length;
|
|
125
|
+
normalized = deduplicateEntries(normalized);
|
|
126
|
+
if (normalized.length < beforeDedup) {
|
|
127
|
+
logger.info(`Deduplicated: ${beforeDedup} → ${normalized.length} entries`);
|
|
128
|
+
}
|
|
129
|
+
const clusters = clusterEntries(normalized);
|
|
130
|
+
logger.info(`Clustered into ${clusters.length} operations`);
|
|
131
|
+
let { operations: allOperations, detectedAuth } = clustersToOperations(clusters);
|
|
132
|
+
// LLM-assisted naming
|
|
133
|
+
if (args['improve-names']) {
|
|
134
|
+
allOperations = await improveToolNames(allOperations);
|
|
135
|
+
}
|
|
136
|
+
// Apply include/exclude filters
|
|
137
|
+
let operations = filterOperations(allOperations, {
|
|
138
|
+
include: args.include?.split(',').map((s) => s.trim()),
|
|
139
|
+
exclude: args.exclude?.split(',').map((s) => s.trim()),
|
|
140
|
+
});
|
|
141
|
+
if (operations.length === 0) {
|
|
142
|
+
await fail('No operations left after filtering.');
|
|
143
|
+
}
|
|
144
|
+
if (operations.length !== allOperations.length) {
|
|
145
|
+
logger.info(`${operations.length} operations after filtering`);
|
|
146
|
+
}
|
|
147
|
+
// Interactive confirmation
|
|
148
|
+
if (args.interactive) {
|
|
149
|
+
operations = await confirmOperations(operations);
|
|
150
|
+
if (operations.length === 0) {
|
|
151
|
+
await fail('No operations selected.');
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
// Build auth schemes
|
|
155
|
+
const authSchemes = [];
|
|
156
|
+
const envVars = [];
|
|
157
|
+
for (const auth of detectedAuth) {
|
|
158
|
+
if (auth.type === 'bearer') {
|
|
159
|
+
authSchemes.push({
|
|
160
|
+
type: 'http-bearer',
|
|
161
|
+
envVarName: 'BEARER_TOKEN',
|
|
162
|
+
description: 'Bearer token detected from browser session',
|
|
163
|
+
});
|
|
164
|
+
envVars.push({
|
|
165
|
+
name: 'BEARER_TOKEN',
|
|
166
|
+
description: 'Bearer authentication token',
|
|
167
|
+
required: true,
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
else if (auth.type === 'basic') {
|
|
171
|
+
authSchemes.push({
|
|
172
|
+
type: 'http-basic',
|
|
173
|
+
envVarName: 'BASIC_USERNAME',
|
|
174
|
+
description: 'Basic auth detected from browser session',
|
|
175
|
+
});
|
|
176
|
+
envVars.push({ name: 'BASIC_USERNAME', description: 'Basic auth username', required: true }, { name: 'BASIC_PASSWORD', description: 'Basic auth password', required: true });
|
|
177
|
+
}
|
|
178
|
+
else if (auth.type === 'apiKey') {
|
|
179
|
+
authSchemes.push({
|
|
180
|
+
type: 'apiKey',
|
|
181
|
+
envVarName: 'API_KEY',
|
|
182
|
+
headerName: auth.headerName,
|
|
183
|
+
in: 'header',
|
|
184
|
+
description: `API key header: ${auth.headerName}`,
|
|
185
|
+
});
|
|
186
|
+
envVars.push({
|
|
187
|
+
name: 'API_KEY',
|
|
188
|
+
description: `API key (sent as header "${auth.headerName}")`,
|
|
189
|
+
required: true,
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
// Dedupe env vars
|
|
194
|
+
const seen = new Set();
|
|
195
|
+
const uniqueEnvVars = envVars.filter((v) => {
|
|
196
|
+
if (seen.has(v.name))
|
|
197
|
+
return false;
|
|
198
|
+
seen.add(v.name);
|
|
199
|
+
return true;
|
|
200
|
+
});
|
|
201
|
+
const tools = buildAllTools(operations);
|
|
202
|
+
const serverName = args.name ?? toPackageName(new URL(baseUrl).hostname);
|
|
203
|
+
const target = resolveTarget(args.target);
|
|
204
|
+
const transport = resolveTransport(target, args.transport);
|
|
205
|
+
const manifest = {
|
|
206
|
+
serverName,
|
|
207
|
+
serverVersion: '1.0.0',
|
|
208
|
+
baseUrl,
|
|
209
|
+
transport,
|
|
210
|
+
tools,
|
|
211
|
+
authSchemes,
|
|
212
|
+
envVars: [
|
|
213
|
+
{ name: 'BASE_URL', description: 'API base URL', required: true, example: baseUrl },
|
|
214
|
+
...uniqueEnvVars,
|
|
215
|
+
],
|
|
216
|
+
target,
|
|
217
|
+
};
|
|
218
|
+
logger.info(`Generating MCP server: ${serverName}` +
|
|
219
|
+
(target === 'cloudflare' ? ' (Cloudflare Workers)' : ''));
|
|
220
|
+
await emitProject(manifest, {
|
|
221
|
+
outputDir: args.output,
|
|
222
|
+
force: args.force ?? false,
|
|
223
|
+
dryRun: args['dry-run'] ?? false,
|
|
224
|
+
});
|
|
225
|
+
logger.success(`MCP server generated at: ${args.output}`);
|
|
226
|
+
logger.info('');
|
|
227
|
+
logger.info(`Tools generated: ${tools.length}`);
|
|
228
|
+
if (detectedAuth.length > 0) {
|
|
229
|
+
logger.info(`Auth detected: ${detectedAuth.map((a) => a.type).join(', ')}`);
|
|
230
|
+
}
|
|
231
|
+
if (target === 'cloudflare') {
|
|
232
|
+
printWorkerNextSteps(args.output);
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
logger.info('');
|
|
236
|
+
logger.info('Next steps:');
|
|
237
|
+
logger.info(` cd ${args.output}`);
|
|
238
|
+
logger.info(' cp .env.example .env # fill in your credentials');
|
|
239
|
+
logger.info(' npm install');
|
|
240
|
+
logger.info(' npm run build');
|
|
241
|
+
logger.info(' npm start');
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
});
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
declare const _default: import("citty").CommandDef<{
|
|
2
|
+
url: {
|
|
3
|
+
type: "positional";
|
|
4
|
+
description: string;
|
|
5
|
+
required: true;
|
|
6
|
+
};
|
|
7
|
+
output: {
|
|
8
|
+
type: "string";
|
|
9
|
+
alias: string;
|
|
10
|
+
description: string;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
name: {
|
|
14
|
+
type: "string";
|
|
15
|
+
alias: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
depth: {
|
|
19
|
+
type: "string";
|
|
20
|
+
description: string;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
'max-pages': {
|
|
24
|
+
type: "string";
|
|
25
|
+
description: string;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
timeout: {
|
|
29
|
+
type: "string";
|
|
30
|
+
description: string;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
transport: {
|
|
34
|
+
type: "string";
|
|
35
|
+
alias: string;
|
|
36
|
+
description: string;
|
|
37
|
+
default: string;
|
|
38
|
+
};
|
|
39
|
+
headless: {
|
|
40
|
+
type: "boolean";
|
|
41
|
+
description: string;
|
|
42
|
+
default: false;
|
|
43
|
+
};
|
|
44
|
+
force: {
|
|
45
|
+
type: "boolean";
|
|
46
|
+
alias: string;
|
|
47
|
+
description: string;
|
|
48
|
+
default: false;
|
|
49
|
+
};
|
|
50
|
+
'dry-run': {
|
|
51
|
+
type: "boolean";
|
|
52
|
+
description: string;
|
|
53
|
+
default: false;
|
|
54
|
+
};
|
|
55
|
+
'improve-names': {
|
|
56
|
+
type: "boolean";
|
|
57
|
+
description: string;
|
|
58
|
+
default: false;
|
|
59
|
+
};
|
|
60
|
+
'max-sessions': {
|
|
61
|
+
type: "string";
|
|
62
|
+
description: string;
|
|
63
|
+
default: string;
|
|
64
|
+
};
|
|
65
|
+
hybrid: {
|
|
66
|
+
type: "boolean";
|
|
67
|
+
description: string;
|
|
68
|
+
default: false;
|
|
69
|
+
};
|
|
70
|
+
goal: {
|
|
71
|
+
type: "string";
|
|
72
|
+
description: string;
|
|
73
|
+
};
|
|
74
|
+
}>;
|
|
75
|
+
export default _default;
|