MCPcopy Create free account
hub / github.com/cfworker/cfworker / execute

Method execute

packages/dev/src/cli/deploy-command.js:52–76  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50 }
51
52 async execute() {
53 await Promise.all([
54 this.bundler.bundle(),
55 this.site ? this.site.init() : Promise.resolve(),
56 this.kv.init()
57 ]);
58
59 logger.progress('Getting subdomain...');
60 const subdomain = await getWorkersDevSubdomain(
61 this.accountId,
62 this.apiKey,
63 this.accountEmail
64 );
65 const url = `https://${this.project}.${subdomain}.workers.dev`;
66
67 if (this.watch) {
68 const update = () => this.deploy(url);
69 this.bundler.on('bundle-end', update);
70 if (this.site) {
71 this.site.on('change', update);
72 }
73 }
74
75 await this.deploy(url);
76 }
77
78 /**
79 * @param {string} url

Callers

nothing calls this directly

Calls 8

deployMethod · 0.95
getWorkersDevSubdomainFunction · 0.90
allMethod · 0.80
bundleMethod · 0.80
resolveMethod · 0.80
onMethod · 0.80
initMethod · 0.45
progressMethod · 0.45

Tested by

no test coverage detected