UNPKG

@azure-tools/codemodel-v3

Version:
17 lines 1.04 kB
"use strict"; /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ Object.defineProperty(exports, "__esModule", { value: true }); exports.processCodeModel = void 0; const codegen_1 = require("@azure-tools/codegen"); const model_state_1 = require("./model-state"); async function processCodeModel(processExtension, service, callerName) { // Get the list of files const state = await new model_state_1.ModelState(service).init(); // output the model back to the pipeline await service.WriteFile(`code-model-v3${callerName ? `-${callerName}` : ''}.yaml`, codegen_1.serialize(await processExtension(state)), undefined, 'code-model-v3'); } exports.processCodeModel = processCodeModel; //# sourceMappingURL=process-code-model.js.map