Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
await cauldron.updateContainerVersion(
napDescriptor,
cauldronContainerNewVersion
)
// Update version of ern used to generate this Container
await cauldron.updateContainerErnVersion(
napDescriptor,
Platform.currentVersion
)
// If there is a git publisher, now is the time to publish
// the raw (untransformed) container version, before running the transformers
if (gitPublisher) {
await kax.task('Publishing raw Container to git').run(
publishContainer({
containerPath: outDir,
containerVersion: `${cauldronContainerNewVersion}-raw`,
extra: {
branch: 'raw',
},
platform: napDescriptor.platform!,
publisher: 'git',
url: gitPublisher.url,
})
)
}
// Update yarn lock and run Container transformers sequentially
if (!publishOnly) {
const pathToNewYarnLock = path.join(compositeMiniAppDir, 'yarn.lock')
await cauldron.addOrUpdateYarnLock(
}
// ==================================================================
// Legacy code. To be deprecated
let publisherName = publisherFromCauldron.name
if (publisherName === 'github') {
log.warn(
`Your Cauldron is using the 'github' publisher which has been deprecated.
Please rename 'github' publisher name to 'git' in your Cauldron to get rid of this warning.`
)
publisherName = 'git'
}
// ==================================================================
await kax.task(`Running Container Publisher ${publisherName}`).run(
publishContainer({
containerPath,
containerVersion,
extra,
platform: napDescriptor.platform,
publisher: publisherName,
url: publisherFromCauldron.url,
})
)
}
log.info(
`Published new Container version ${containerVersion} for ${napDescriptor.toString()}`
)
}
}
typeof extra === 'string' &&
extra.startsWith(cauldronFileUriScheme)
) {
if (!(await cauldron.hasFile({ cauldronFilePath: extra }))) {
throw new Error(`Cannot find extra config file ${extra} in Cauldron`)
}
const extraFile = await cauldron.getFile({ cauldronFilePath: extra })
extra = parseJsonFromStringOrFile(extraFile.toString())
}
await kax
.task(
`[${curIdx}/${pipeline.length}] Running Container ${pipelineEltType} ${pipelineEltPackage.basePath}`
)
.run(
isPublisher(pipelineEltPackage)
? publishContainer({
containerPath,
containerVersion,
extra,
platform,
publisher: PackagePath.fromString(pipelineElt.name),
url: pipelineElt.url,
})
: transformContainer({
containerPath,
extra,
platform,
transformer: PackagePath.fromString(pipelineElt.name),
})
)
}
}
}
extra = extra || {}
extra.androidConfig = {
...(extra && extra.androidConfig),
artifactId: oldAndroidRunner
? `runner-ern-container`
: `runner-ern-container-${entryMiniAppName.toLowerCase()}`,
groupId: 'com.walmartlabs.ern',
packageFilePath: oldAndroidRunner
? 'com/walmartlabs/ern'
: `com/walmartlabs/ern/${entryMiniAppName.toLowerCase()}`,
packageName: oldAndroidRunner
? `com.walmartlabs.ern`
: `com.walmartlabs.ern.${entryMiniAppName.toLowerCase()}`,
}
await publishContainer({
containerPath: outDir,
containerVersion: '1.0.0',
extra: extra.androidConfig,
platform: 'android',
publisher: PackagePath.fromString('ern-container-publisher-maven'),
url: getDefaultMavenLocalDirectory(),
})
}
const compositeNativeDeps = await containerGenResult.config.composite.getNativeDependencies()
const reactNativeDep = _.find(
compositeNativeDeps.all,
p => p.packagePath.basePath === 'react-native'
)
const hasErnNavigation =