MCPcopy Create free account
hub / github.com/loopbackio/loopback-next / end

Method end

packages/cli/lib/artifact-generator.js:118–147  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

116 }
117
118 async end() {
119 if (this.shouldExit()) {
120 await super.end();
121 return;
122 }
123
124 if (this._isGenerationSuccessful()) {
125 await this._updateIndexFiles();
126
127 const classes = this.artifactInfo.name
128 .split(this.classNameSeparator)
129 .map(utils.toClassName);
130 const classesOutput = classes.join(this.classNameSeparator);
131
132 // User Output
133 this.log();
134 this.log(
135 g.f(
136 '%s %s was/were created in %s',
137 utils.toClassName(this.artifactInfo.type),
138 chalk.yellow(classesOutput),
139 this.artifactInfo.relPath,
140 ),
141 );
142
143 this.log();
144 }
145
146 await super.end();
147 }
148
149 /**
150 * Update the index.ts in this.artifactInfo.outDir. Creates it if it

Callers

nothing calls this directly

Calls 4

_updateIndexFilesMethod · 0.95
shouldExitMethod · 0.80
logMethod · 0.65

Tested by

no test coverage detected