1{"version":3,"file":"Version.js","names":["withVersion","createInfoPlistPluginWithPropertyGuard","setVersion","infoPlistProperty","expoConfigProperty","withBuildNumber","setBuildNumber","getVersion","config","version","infoPlist","CFBundleShortVersionString","getBuildNumber","ios","buildNumber","CFBundleVersion"],"sources":["../../src/ios/Version.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config-types';\n\nimport { createInfoPlistPluginWithPropertyGuard } from '../plugins/ios-plugins';\nimport { InfoPlist } from './IosConfig.types';\n\nexport const withVersion = createInfoPlistPluginWithPropertyGuard(\n setVersion,\n {\n infoPlistProperty: 'CFBundleShortVersionString',\n expoConfigProperty: 'version',\n },\n 'withVersion'\n);\n\nexport const withBuildNumber = createInfoPlistPluginWithPropertyGuard(\n setBuildNumber,\n {\n infoPlistProperty: 'CFBundleVersion',\n expoConfigProperty: 'ios.buildNumber',\n },\n 'withBuildNumber'\n);\n\nexport function getVersion(config: Pick<ExpoConfig, 'version'>) {\n return config.version || '1.0.0';\n}\n\nexport function setVersion(config: Pick<ExpoConfig, 'version'>, infoPlist: InfoPlist): InfoPlist {\n return {\n ...infoPlist,\n CFBundleShortVersionString: getVersion(config),\n };\n}\n\nexport function getBuildNumber(config: Pick<ExpoConfig, 'ios'>) {\n return config.ios?.buildNumber ? config.ios.buildNumber : '1';\n}\n\nexport function setBuildNumber(config: Pick<ExpoConfig, 'ios'>, infoPlist: InfoPlist): InfoPlist {\n return {\n ...infoPlist,\n CFBundleVersion: getBuildNumber(config),\n };\n}\n"],"mappings":";;;;;;;;;;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGO,MAAMA,WAAW,GAAG,IAAAC,oDAAsC,EAC/DC,UAAU,EACV;EACEC,iBAAiB,EAAE,4BAA4B;EAC/CC,kBAAkB,EAAE;AACtB,CAAC,EACD,aAAa,CACd;AAAC;AAEK,MAAMC,eAAe,GAAG,IAAAJ,oDAAsC,EACnEK,cAAc,EACd;EACEH,iBAAiB,EAAE,iBAAiB;EACpCC,kBAAkB,EAAE;AACtB,CAAC,EACD,iBAAiB,CAClB;AAAC;AAEK,SAASG,UAAU,CAACC,MAAmC,EAAE;EAC9D,OAAOA,MAAM,CAACC,OAAO,IAAI,OAAO;AAClC;AAEO,SAASP,UAAU,CAACM,MAAmC,EAAEE,SAAoB,EAAa;EAC/F,OAAO;IACL,GAAGA,SAAS;IACZC,0BAA0B,EAAEJ,UAAU,CAACC,MAAM;EAC/C,CAAC;AACH;AAEO,SAASI,cAAc,CAACJ,MAA+B,EAAE;EAAA;EAC9D,OAAO,eAAAA,MAAM,CAACK,GAAG,wCAAV,YAAYC,WAAW,GAAGN,MAAM,CAACK,GAAG,CAACC,WAAW,GAAG,GAAG;AAC/D;AAEO,SAASR,cAAc,CAACE,MAA+B,EAAEE,SAAoB,EAAa;EAC/F,OAAO;IACL,GAAGA,SAAS;IACZK,eAAe,EAAEH,cAAc,CAACJ,MAAM;EACxC,CAAC;AACH"}