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

Method execute

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

Source from the content-addressed store, hash-verified

151 }
152
153 async execute() {
154 const startTime = Date.now();
155
156 await Promise.all([
157 this.bundler.bundle(),
158 this.site ? this.site.init() : Promise.resolve(),
159 this.kv.init()
160 ]);
161
162 logger.progress('Deploying worker...');
163
164 const zoneName = await deploy({
165 name: this.args.name,
166 code: this.bundler.code,
167 accountId: this.accountId,
168 accountEmail: this.accountEmail,
169 zoneId: this.zoneId,
170 apiKey: this.apiKey,
171 purgeCache: this.args.purgeCache,
172 routePattern: this.args.route,
173 site: this.site,
174 kv: this.kv
175 });
176
177 const url = 'https://' + (this.args.route ? this.args.route : zoneName);
178 logger.success(
179 `Deployed worker to ${chalk.cyan.underline(url)}`,
180 Date.now() - startTime
181 );
182 }
183
184 dispose() {
185 this.bundler.dispose();

Callers

nothing calls this directly

Calls 7

deployFunction · 0.90
allMethod · 0.80
bundleMethod · 0.80
resolveMethod · 0.80
initMethod · 0.45
progressMethod · 0.45
successMethod · 0.45

Tested by

no test coverage detected