@@ -2,7 +2,7 @@ import _ from 'lodash';
22import * as path from 'path' ;
33
44import { Builder } from './baseBuilder' ;
5- import { runCommand , isAppCenter , isYunXiao } from '../../../utils' ;
5+ import { runCommand , isAppCenter , isYunXiao , getUserAgent } from '../../../utils' ;
66import logger from '../../../logger' ;
77import { buildPythonLocalPath } from '../../../default/image' ;
88import { parseArgv } from '@serverless-devs/utils' ;
@@ -112,13 +112,10 @@ export class DefaultBuilder extends Builder {
112112 logger . debug ( `${ region } ` ) ;
113113 checkRegion ( region ) ;
114114 const credential = ( await this . inputs . getCredential ( ) ) as ICredentials ;
115- const function_ai = isAppCenter ( ) ? 'function_ai;' : '' ;
115+ const userAgent = getUserAgent ( this . inputs . userAgent , 'build-publish-layer' ) ;
116116 const fcSdk = new FC ( region , credential , {
117117 endpoint : this . getProps ( ) . endpoint ,
118- userAgent : `${
119- this . inputs . userAgent ||
120- `${ function_ai } Component:fc3;Nodejs:${ process . version } ;OS:${ process . platform } -${ process . arch } `
121- } command:build-publish-layer`,
118+ userAgent,
122119 } ) ;
123120 let buildDir : string = this . getBuildDir ( ) ;
124121 buildDir = path . isAbsolute ( buildDir ) ? buildDir : path . join ( this . baseDir , buildDir ) ;
0 commit comments