@transcend-io/cli 8.29.0 → 8.30.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/dist/bin/bash-complete.cjs +1 -1
  2. package/dist/bin/cli.cjs +1 -1
  3. package/dist/bin/deprecated-command.cjs +2 -2
  4. package/dist/chunk-3FIDP42N.cjs +4 -0
  5. package/dist/chunk-3FIDP42N.cjs.map +1 -0
  6. package/dist/{chunk-N25PPQY4.cjs → chunk-6KRRRMY2.cjs} +21 -21
  7. package/dist/{chunk-N25PPQY4.cjs.map → chunk-6KRRRMY2.cjs.map} +1 -1
  8. package/dist/{chunk-2CAMTEJY.cjs → chunk-FIJLHU4Q.cjs} +4 -4
  9. package/dist/{chunk-2CAMTEJY.cjs.map → chunk-FIJLHU4Q.cjs.map} +1 -1
  10. package/dist/{chunk-NBXAOUWC.cjs → chunk-HTS7K7QD.cjs} +4 -4
  11. package/dist/{chunk-NBXAOUWC.cjs.map → chunk-HTS7K7QD.cjs.map} +1 -1
  12. package/dist/{chunk-ID7MP3QD.cjs → chunk-LRADV5OI.cjs} +2 -2
  13. package/dist/{chunk-ID7MP3QD.cjs.map → chunk-LRADV5OI.cjs.map} +1 -1
  14. package/dist/{chunk-K4IBAM5Z.cjs → chunk-LZA5Y4SB.cjs} +4 -4
  15. package/dist/{chunk-K4IBAM5Z.cjs.map → chunk-LZA5Y4SB.cjs.map} +1 -1
  16. package/dist/{chunk-F7QE6D3T.cjs → chunk-OMVVROKB.cjs} +2 -2
  17. package/dist/{chunk-F7QE6D3T.cjs.map → chunk-OMVVROKB.cjs.map} +1 -1
  18. package/dist/{chunk-BO6JY2EM.cjs → chunk-RAA5VWQS.cjs} +2 -2
  19. package/dist/{chunk-BO6JY2EM.cjs.map → chunk-RAA5VWQS.cjs.map} +1 -1
  20. package/dist/{chunk-4AOZYIVR.cjs → chunk-SPN6SWMF.cjs} +2 -2
  21. package/dist/{chunk-4AOZYIVR.cjs.map → chunk-SPN6SWMF.cjs.map} +1 -1
  22. package/dist/{chunk-HCPNMNS3.cjs → chunk-UXFL56TL.cjs} +6 -6
  23. package/dist/{chunk-HCPNMNS3.cjs.map → chunk-UXFL56TL.cjs.map} +1 -1
  24. package/dist/{chunk-LWPX5LJB.cjs → chunk-WURUFVEG.cjs} +2 -2
  25. package/dist/{chunk-LWPX5LJB.cjs.map → chunk-WURUFVEG.cjs.map} +1 -1
  26. package/dist/{chunk-BBIQYUL2.cjs → chunk-XEXS6R45.cjs} +2 -2
  27. package/dist/{chunk-BBIQYUL2.cjs.map → chunk-XEXS6R45.cjs.map} +1 -1
  28. package/dist/{chunk-GDNSAJQN.cjs → chunk-YYDWSYMF.cjs} +2 -2
  29. package/dist/{chunk-GDNSAJQN.cjs.map → chunk-YYDWSYMF.cjs.map} +1 -1
  30. package/dist/{chunk-UXYKFAP7.cjs → chunk-Z2DYKPKM.cjs} +2 -2
  31. package/dist/{chunk-UXYKFAP7.cjs.map → chunk-Z2DYKPKM.cjs.map} +1 -1
  32. package/dist/{impl-5JKO562Z.cjs → impl-2X2FNMJR.cjs} +2 -2
  33. package/dist/{impl-5JKO562Z.cjs.map → impl-2X2FNMJR.cjs.map} +1 -1
  34. package/dist/{impl-HQICWTNR.cjs → impl-3BTFEGV4.cjs} +5 -5
  35. package/dist/{impl-HQICWTNR.cjs.map → impl-3BTFEGV4.cjs.map} +1 -1
  36. package/dist/{impl-Y3WZAMYW.cjs → impl-463J7BYV.cjs} +2 -2
  37. package/dist/{impl-Y3WZAMYW.cjs.map → impl-463J7BYV.cjs.map} +1 -1
  38. package/dist/{impl-333FTGNJ.cjs → impl-4CA7VK4U.cjs} +2 -2
  39. package/dist/{impl-333FTGNJ.cjs.map → impl-4CA7VK4U.cjs.map} +1 -1
  40. package/dist/{impl-JYAU26KS.cjs → impl-5GGFGRTD.cjs} +2 -2
  41. package/dist/{impl-JYAU26KS.cjs.map → impl-5GGFGRTD.cjs.map} +1 -1
  42. package/dist/{impl-VYNKYTB5.cjs → impl-5WHENVVS.cjs} +2 -2
  43. package/dist/{impl-VYNKYTB5.cjs.map → impl-5WHENVVS.cjs.map} +1 -1
  44. package/dist/{impl-PHYCAOK7.cjs → impl-76E4DKAE.cjs} +2 -2
  45. package/dist/{impl-PHYCAOK7.cjs.map → impl-76E4DKAE.cjs.map} +1 -1
  46. package/dist/{impl-7NYN6PNG.cjs → impl-7BAUUGZT.cjs} +2 -2
  47. package/dist/{impl-7NYN6PNG.cjs.map → impl-7BAUUGZT.cjs.map} +1 -1
  48. package/dist/{impl-5IR5JVEX.cjs → impl-AWWB3TEU.cjs} +2 -2
  49. package/dist/{impl-5IR5JVEX.cjs.map → impl-AWWB3TEU.cjs.map} +1 -1
  50. package/dist/{impl-GJB4EKPW.cjs → impl-BLIELFUK.cjs} +3 -3
  51. package/dist/{impl-GJB4EKPW.cjs.map → impl-BLIELFUK.cjs.map} +1 -1
  52. package/dist/{impl-CGX5RD4A.cjs → impl-BSI3RBQ2.cjs} +2 -2
  53. package/dist/{impl-CGX5RD4A.cjs.map → impl-BSI3RBQ2.cjs.map} +1 -1
  54. package/dist/{impl-W7AB7VQY.cjs → impl-BSIFPZLW.cjs} +2 -2
  55. package/dist/{impl-W7AB7VQY.cjs.map → impl-BSIFPZLW.cjs.map} +1 -1
  56. package/dist/{impl-J5DLFX22.cjs → impl-COZ7ADUO.cjs} +4 -4
  57. package/dist/{impl-J5DLFX22.cjs.map → impl-COZ7ADUO.cjs.map} +1 -1
  58. package/dist/{impl-B5HWJ3KK.cjs → impl-DS73OYLE.cjs} +2 -2
  59. package/dist/{impl-B5HWJ3KK.cjs.map → impl-DS73OYLE.cjs.map} +1 -1
  60. package/dist/{impl-IWMRKBYP.cjs → impl-FKXR7U4X.cjs} +2 -2
  61. package/dist/{impl-IWMRKBYP.cjs.map → impl-FKXR7U4X.cjs.map} +1 -1
  62. package/dist/{impl-HXH7SZDU.cjs → impl-FTSCECOZ.cjs} +2 -2
  63. package/dist/{impl-HXH7SZDU.cjs.map → impl-FTSCECOZ.cjs.map} +1 -1
  64. package/dist/{impl-ZSNYO6VH.cjs → impl-GJMVAL3N.cjs} +2 -2
  65. package/dist/{impl-ZSNYO6VH.cjs.map → impl-GJMVAL3N.cjs.map} +1 -1
  66. package/dist/impl-IBOGAUVL.cjs +2 -0
  67. package/dist/{impl-ZMX57RSP.cjs.map → impl-IBOGAUVL.cjs.map} +1 -1
  68. package/dist/{impl-XUD5VFQX.cjs → impl-IFHM4YOL.cjs} +2 -2
  69. package/dist/{impl-XUD5VFQX.cjs.map → impl-IFHM4YOL.cjs.map} +1 -1
  70. package/dist/{impl-WGVGJV2F.cjs → impl-IM22LNW5.cjs} +3 -3
  71. package/dist/{impl-WGVGJV2F.cjs.map → impl-IM22LNW5.cjs.map} +1 -1
  72. package/dist/{impl-OMCKSCEI.cjs → impl-J62VZXDY.cjs} +2 -2
  73. package/dist/{impl-OMCKSCEI.cjs.map → impl-J62VZXDY.cjs.map} +1 -1
  74. package/dist/{impl-3HWWFZLZ.cjs → impl-KBVYLYIZ.cjs} +2 -2
  75. package/dist/{impl-3HWWFZLZ.cjs.map → impl-KBVYLYIZ.cjs.map} +1 -1
  76. package/dist/{impl-FXVXRV6Q.cjs → impl-LMKJ6UBT.cjs} +2 -2
  77. package/dist/{impl-FXVXRV6Q.cjs.map → impl-LMKJ6UBT.cjs.map} +1 -1
  78. package/dist/{impl-Z4GNVM3V.cjs → impl-NEV6KDPU.cjs} +2 -2
  79. package/dist/{impl-Z4GNVM3V.cjs.map → impl-NEV6KDPU.cjs.map} +1 -1
  80. package/dist/{impl-TJFUBDML.cjs → impl-OFB5I4S6.cjs} +2 -2
  81. package/dist/{impl-TJFUBDML.cjs.map → impl-OFB5I4S6.cjs.map} +1 -1
  82. package/dist/{impl-VV3UMWFG.cjs → impl-Q5WCETP4.cjs} +2 -2
  83. package/dist/{impl-VV3UMWFG.cjs.map → impl-Q5WCETP4.cjs.map} +1 -1
  84. package/dist/{impl-ATMXXGUO.cjs → impl-RTZTJWMX.cjs} +2 -2
  85. package/dist/{impl-ATMXXGUO.cjs.map → impl-RTZTJWMX.cjs.map} +1 -1
  86. package/dist/{impl-M3AZLM3Y.cjs → impl-T5V56TM5.cjs} +2 -2
  87. package/dist/{impl-M3AZLM3Y.cjs.map → impl-T5V56TM5.cjs.map} +1 -1
  88. package/dist/{impl-HSD25CEC.cjs → impl-T7EOUHYL.cjs} +2 -2
  89. package/dist/{impl-HSD25CEC.cjs.map → impl-T7EOUHYL.cjs.map} +1 -1
  90. package/dist/{impl-FTRCRS7H.cjs → impl-U76PZBUK.cjs} +2 -2
  91. package/dist/{impl-FTRCRS7H.cjs.map → impl-U76PZBUK.cjs.map} +1 -1
  92. package/dist/{impl-TU3DSCLK.cjs → impl-UMVE7IPO.cjs} +2 -2
  93. package/dist/{impl-TU3DSCLK.cjs.map → impl-UMVE7IPO.cjs.map} +1 -1
  94. package/dist/{impl-ITV3PGFS.cjs → impl-UPDFANVR.cjs} +2 -2
  95. package/dist/{impl-ITV3PGFS.cjs.map → impl-UPDFANVR.cjs.map} +1 -1
  96. package/dist/{impl-D2C22UEC.cjs → impl-VBE4QUJN.cjs} +2 -2
  97. package/dist/{impl-D2C22UEC.cjs.map → impl-VBE4QUJN.cjs.map} +1 -1
  98. package/dist/impl-VHY4ALCB.cjs +2 -0
  99. package/dist/{impl-6O4FILGB.cjs.map → impl-VHY4ALCB.cjs.map} +1 -1
  100. package/dist/{impl-OCDURTBG.cjs → impl-VPUALIUR.cjs} +2 -2
  101. package/dist/{impl-OCDURTBG.cjs.map → impl-VPUALIUR.cjs.map} +1 -1
  102. package/dist/{impl-5NEL56EQ.cjs → impl-X6TORGVF.cjs} +2 -2
  103. package/dist/{impl-5NEL56EQ.cjs.map → impl-X6TORGVF.cjs.map} +1 -1
  104. package/dist/{impl-SQHP2SZ4.cjs → impl-XAZ6YY3R.cjs} +2 -2
  105. package/dist/{impl-SQHP2SZ4.cjs.map → impl-XAZ6YY3R.cjs.map} +1 -1
  106. package/dist/{impl-ZWLFLVPK.cjs → impl-YEXEFJS7.cjs} +2 -2
  107. package/dist/{impl-ZWLFLVPK.cjs.map → impl-YEXEFJS7.cjs.map} +1 -1
  108. package/dist/{impl-LVPOYO4A.cjs → impl-Z3EAXTJV.cjs} +2 -2
  109. package/dist/{impl-LVPOYO4A.cjs.map → impl-Z3EAXTJV.cjs.map} +1 -1
  110. package/dist/{impl-HBJ7BPEI.cjs → impl-Z5HT5JQU.cjs} +2 -2
  111. package/dist/{impl-HBJ7BPEI.cjs.map → impl-Z5HT5JQU.cjs.map} +1 -1
  112. package/dist/{impl-QT2HKTCP.cjs → impl-ZJ2L727T.cjs} +2 -2
  113. package/dist/{impl-QT2HKTCP.cjs.map → impl-ZJ2L727T.cjs.map} +1 -1
  114. package/dist/index.cjs +3 -3
  115. package/dist/index.d.cts +1 -1
  116. package/package.json +1 -1
  117. package/dist/chunk-57L3G2BH.cjs +0 -4
  118. package/dist/chunk-57L3G2BH.cjs.map +0 -1
  119. package/dist/impl-6O4FILGB.cjs +0 -2
  120. package/dist/impl-ZMX57RSP.cjs +0 -2
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/chunk-57L3G2BH.cjs","../src/lib/code-scanning/integrations/cocoaPods.ts","../src/lib/code-scanning/integrations/gradle.ts","../src/lib/code-scanning/integrations/pubspec.ts","../src/lib/code-scanning/integrations/kotlin.ts"],"names":["POD_TARGET_REGEX","POD_PACKAGE_REGEX","cocoaPods","filePath","fileContents","readFileSync","targets","findAllWithRegex","packages","target","ind","CodePackageType","pkg","GRADLE_IMPLEMENTATION_REGEX","GRADLE_PLUGIN_REGEX","GRADLE_IMPLEMENTATION_GROUP_REGEX","GRADLE_APPLICATION_NAME_REGEX","gradle","directory","dirname","targetPlugins","targetGroups","applications"],"mappings":"AAAA,u/BAAwC,wDAAyC,wBCApD,qDAGI,2DACD,IAE1BA,CAAAA,CAAmB,wBAAA,CACnBC,CAAAA,CA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AAA,CAAIkB,CAAAA,CAAa,MAAA,CAAS,CAAA,CACxB,MAAM,IAAI,KAAA,CAAM,CAAA,0CAAA,EAA6CnB,CAAQ,CAAA,CAAA;AC/CjE;AC3BD","file":"/home/runner/work/cli/cli/dist/chunk-57L3G2BH.cjs","sourcesContent":[null,"import { readFileSync } from 'node:fs';\nimport { CodeScanningConfig } from '../types';\nimport { CodePackageSdk } from '../../../codecs';\nimport { findAllWithRegex } from '@transcend-io/type-utils';\nimport { CodePackageType } from '@transcend-io/privacy-types';\n\nconst POD_TARGET_REGEX = /target ('|\")(.*?)('|\")/;\nconst POD_PACKAGE_REGEX = /pod ('|\")(.*?)('|\")(, ('|\")~> (.+?)('|\")|)/;\n\nexport const cocoaPods: CodeScanningConfig = {\n supportedFiles: ['Podfile'],\n ignoreDirs: ['Pods'],\n scanFunction: (filePath) => {\n const fileContents = readFileSync(filePath, 'utf-8');\n\n const targets = findAllWithRegex(\n {\n value: new RegExp(POD_TARGET_REGEX, 'g'),\n matches: ['quote1', 'name', 'quote2'],\n },\n fileContents,\n );\n const packages = findAllWithRegex(\n {\n value: new RegExp(POD_PACKAGE_REGEX, 'g'),\n matches: [\n 'quote1',\n 'name',\n 'quote2',\n 'extra',\n 'quote3',\n 'version',\n 'quote4',\n ],\n },\n fileContents,\n );\n\n const deps: CodePackageSdk[] = targets.map((target, ind) => ({\n name: target.name,\n type: CodePackageType.CocoaPods,\n softwareDevelopmentKits: packages\n .filter(\n (pkg) =>\n pkg.matchIndex > target.matchIndex &&\n (!targets[ind + 1] || pkg.matchIndex < targets[ind + 1].matchIndex),\n )\n .map((pkg) => ({\n name: pkg.name,\n version: pkg.version,\n })),\n }));\n\n return deps;\n },\n};\n","import { readFileSync } from 'node:fs';\nimport { CodeScanningConfig } from '../types';\nimport { findAllWithRegex } from '@transcend-io/type-utils';\nimport { dirname } from 'node:path';\n\nconst GRADLE_IMPLEMENTATION_REGEX =\n /implementation( *)('|\")(.+?):(.+?):(.+?|)('|\")/;\nconst GRADLE_PLUGIN_REGEX = /apply plugin: *('|\")(.+?)(:(.+?)|)('|\")/;\nconst GRADLE_IMPLEMENTATION_GROUP_REGEX =\n /implementation group:( *)('|\")(.+?)('|\"),( *)name:( *)('|\")(.+?)('|\"),( *)version:( *)('|\")(.+?)('|\")/;\nconst GRADLE_APPLICATION_NAME_REGEX = /applicationId( *)\"(.+?)\"/;\n\n/**\n * So far, there are three ways of defining dependencies that is supported\n * implementation group: 'org.eclipse.jdt', name: 'org.eclipse.jdt.core', version: '3.28.0'\n * or\n * implementation 'com.google.firebase:firebase-analytics:18.0.0'\n * or\n * apply plugin: 'com.google.gms.google-services'\n *\n * single and double quotes are both recognized\n */\nexport const gradle: CodeScanningConfig = {\n supportedFiles: ['build.gradle**'],\n ignoreDirs: [\n 'gradle-app.setting',\n 'gradle-wrapper.jar',\n 'gradle-wrapper.properties',\n ],\n scanFunction: (filePath) => {\n const fileContents = readFileSync(filePath, 'utf-8');\n const directory = dirname(filePath);\n\n const targets = findAllWithRegex(\n {\n value: new RegExp(GRADLE_IMPLEMENTATION_REGEX, 'g'),\n matches: ['space', 'quote1', 'name', 'path', 'version', 'quote2'],\n },\n fileContents,\n );\n const targetPlugins = findAllWithRegex(\n {\n value: new RegExp(GRADLE_PLUGIN_REGEX, 'g'),\n matches: ['quote1', 'name', 'group', 'version', 'quote2'],\n },\n fileContents,\n );\n const targetGroups = findAllWithRegex(\n {\n value: new RegExp(GRADLE_IMPLEMENTATION_GROUP_REGEX, 'g'),\n matches: [\n 'space1',\n 'quote1',\n 'group',\n 'quote2',\n 'space2',\n 'space3',\n 'quote3',\n 'name',\n 'quote4',\n 'space4',\n 'space5',\n 'quote5',\n 'version',\n 'quote6',\n ],\n },\n fileContents,\n );\n const applications = findAllWithRegex(\n {\n value: new RegExp(GRADLE_APPLICATION_NAME_REGEX, 'g'),\n matches: ['space', 'name'],\n },\n fileContents,\n );\n if (applications.length > 1) {\n throw new Error(`Expected only one applicationId per file: ${filePath}`);\n }\n\n return [\n {\n name: applications[0]?.name || directory.split('/').pop()!,\n softwareDevelopmentKits: [\n ...targets,\n ...targetGroups,\n ...targetPlugins,\n ].map((target) => ({\n name: target.name,\n version: target.version || undefined,\n })),\n },\n ];\n },\n};\n","import { readFileSync } from 'node:fs';\nimport { CodeScanningConfig } from '../types';\nimport { CodePackageType } from '@transcend-io/privacy-types';\nimport yaml from 'js-yaml';\nimport { dirname } from 'node:path';\n\n/**\n * Remove YAML comments from a string\n *\n * @param yamlString - YAML string\n * @returns String without comments\n */\nfunction removeYAMLComments(yamlString: string): string {\n return yamlString\n .split('\\n')\n .map((line) => {\n // Remove inline comments\n const commentIndex = line.indexOf('#');\n if (commentIndex > -1) {\n // Check if '#' is not inside a string\n if (\n !line.substring(0, commentIndex).includes('\"') &&\n !line.substring(0, commentIndex).includes(\"'\")\n ) {\n return line.substring(0, commentIndex).trim();\n }\n }\n return line;\n })\n .filter((line) => line.length > 0)\n .join('\\n');\n}\n\nexport const pubspec: CodeScanningConfig = {\n supportedFiles: ['pubspec.yml'],\n ignoreDirs: ['build'],\n scanFunction: (filePath) => {\n const directory = dirname(filePath);\n const fileContents = readFileSync(filePath, 'utf-8');\n const {\n name,\n description,\n dev_dependencies = {},\n dependencies = {},\n } = yaml.load(removeYAMLComments(fileContents)) as {\n /** Name */\n name?: string;\n /** Description */\n description?: string;\n /** Dev dependencies */\n dev_dependencies?: { [k in string]: number | Record<string, string> };\n /** Dependencies */\n dependencies?: { [k in string]: number | Record<string, string> };\n };\n return [\n {\n name: name || directory.split('/').pop()!,\n description,\n type: CodePackageType.RequirementsTxt,\n softwareDevelopmentKits: [\n ...Object.entries(dependencies).map(([name, version]) => ({\n name,\n version:\n typeof version === 'string'\n ? version\n : typeof version === 'number'\n ? version.toString()\n : version?.sdk,\n })),\n ...Object.entries(dev_dependencies).map(([name, version]) => ({\n name,\n version:\n typeof version === 'string'\n ? version\n : typeof version === 'number'\n ? version.toString()\n : version?.sdk,\n isDevDependency: true,\n })),\n ],\n },\n ];\n },\n};\n","import { readFileSync } from 'node:fs';\nimport { dirname } from 'node:path';\nimport { CodeScanningConfig } from '../types';\nimport { findAllWithRegex } from '@transcend-io/type-utils';\n\n/**\n * Kotlin DSL (build.gradle.kts) dependency & plugin parsing\n */\n\nconst KTS_DEP_CONFIGS =\n // eslint-disable-next-line max-len\n '(implementation|api|kapt|ksp|debugImplementation|releaseImplementation|androidTestImplementation|testImplementation|compileOnly|runtimeOnly)';\n\n// e.g. implementation(\"com.google.firebase:firebase-analytics:18.0.0\")\nconst KTS_DEP_STRING_COORDS_REGEX = new RegExp(\n `${KTS_DEP_CONFIGS}\\\\s*\\\\(\\\\s*[\"']([^\"':\\\\s]+):([^\"':\\\\s]+):?([^\"']*)[\"']\\\\s*\\\\)`,\n 'g',\n);\n// captures: [1]=config, [2]=group, [3]=artifact, [4]=version (may be '')\n\n// e.g. implementation(platform(\"com.google.firebase:firebase-bom:33.1.2\"))\nconst KTS_DEP_PLATFORM_REGEX = new RegExp(\n `${KTS_DEP_CONFIGS}\\\\s*\\\\(\\\\s*platform\\\\(\\\\s*[\"']([^\"':\\\\s]+):([^\"':\\\\s]+):?([^\"']*)[\"']\\\\s*\\\\)\\\\s*\\\\)`,\n 'g',\n);\n\n// e.g. implementation(libs.androidx.appcompat) / implementation(libs[\"androidx-core-ktx\"])\nconst KTS_DEP_LIBS_ALIAS_REGEX = new RegExp(\n `${KTS_DEP_CONFIGS}\\\\s*\\\\(\\\\s*libs(?:\\\\.[\\\\w\\\\-\\\\.]+|\\\\[[\"'][^\"']+[\"']\\\\])\\\\s*\\\\)`,\n 'g',\n);\n\n// Plugins:\n// plugins { id(\"com.google.gms.google-services\") version \"4.4.2\" apply false }\n// plugins { id(\"org.jetbrains.kotlin.android\") }\n// apply(plugin = \"newrelic\")\n// plugins { alias(libs.plugins.kotlin.android) }\nconst KTS_PLUGIN_ID_REGEX =\n /id\\s*\\(\\s*[\"']([^\"']+)[\"']\\s*\\)(?:\\s*version\\s*[\"']([^\"']+)[\"'])?/g;\nconst KTS_PLUGIN_APPLY_REGEX =\n /apply\\s*\\(\\s*plugin\\s*=\\s*[\"']([^\"']+)[\"']\\s*\\)/g;\nconst KTS_PLUGIN_ALIAS_REGEX =\n /plugins\\s*\\{[^}]*alias\\s*\\(\\s*libs(?:\\.plugins)?(?:\\.[\\w\\-.]+|\\[[\"'][^\"']+[\"']\\])\\s*\\)[^}]*\\}/g;\n\n// applicationId in Kotlin DSL:\n// applicationId = \"com.foo.bar\"\n// applicationId(\"com.foo.bar\")\nconst KTS_APPLICATION_ID_EQ_REGEX = /applicationId\\s*=\\s*[\"']([^\"']+)[\"']/g;\nconst KTS_APPLICATION_ID_CALL_REGEX =\n /applicationId\\s*\\(\\s*[\"']([^\"']+)[\"']\\s*\\)/g;\n\n/**\n * Input dep entry (partial)\n */\ntype DepInput = {\n /** Name of the dependency */\n name: string;\n /** Version of the dependency */\n version?: string;\n};\n\n/**\n * Helper to normalize a parsed dep entry\n *\n * @param name - name\n * @param version - version\n * @returns normalized entry\n */\nfunction depEntry(name: string, version?: string): DepInput {\n const v =\n version && version.trim().length > 0 && version !== '_'\n ? version.trim()\n : undefined;\n return { name, version: v };\n}\n\nexport const kotlin: CodeScanningConfig = {\n supportedFiles: ['**/build.gradle.kts', '**/*.gradle.kts'],\n ignoreDirs: [\n 'gradle-app.setting',\n 'gradle-wrapper.jar',\n 'gradle-wrapper.properties',\n ],\n scanFunction: (filePath) => {\n const fileContents = readFileSync(filePath, 'utf-8');\n const directory = dirname(filePath);\n\n // ---------- applicationId ----------\n const appIds = [\n ...findAllWithRegex(\n { value: KTS_APPLICATION_ID_EQ_REGEX, matches: ['name'] },\n fileContents,\n ),\n ...findAllWithRegex(\n { value: KTS_APPLICATION_ID_CALL_REGEX, matches: ['name'] },\n fileContents,\n ),\n ];\n if (appIds.length > 1) {\n throw new Error(`Expected only one applicationId per file: ${filePath}`);\n }\n const appName = appIds[0]?.name || directory.split('/').pop()!;\n\n // ---------- dependencies ----------\n const deps: Array<DepInput> = [];\n\n // \"group:artifact:version\"\n for (const m of fileContents.matchAll(KTS_DEP_STRING_COORDS_REGEX)) {\n const [, , group, artifact, version] = m;\n deps.push(depEntry(`${group}:${artifact}`, version));\n }\n\n // platform(\"group:artifact:version\")\n for (const m of fileContents.matchAll(KTS_DEP_PLATFORM_REGEX)) {\n const [, , group, artifact, version] = m;\n // Record as regular coord (you may prefer to tag as BoM separately)\n deps.push(depEntry(`${group}:${artifact}`, version));\n }\n\n // libs aliases (version catalogs) — keep alias as name, unknown version\n for (const m of fileContents.matchAll(KTS_DEP_LIBS_ALIAS_REGEX)) {\n // Grab the exact token as name (best-effort)\n const token = m[0]\n .replace(/^[^(]+\\(\\s*/, '')\n .replace(/\\)\\s*$/, '')\n .trim(); // e.g., libs.androidx.appcompat or libs[\"androidx-core-ktx\"]\n deps.push(depEntry(token));\n }\n\n // ---------- plugins ----------\n const plugins: Array<DepInput> = [];\n\n for (const m of fileContents.matchAll(KTS_PLUGIN_ID_REGEX)) {\n const [, pid, pver] = m;\n plugins.push(depEntry(pid, pver));\n }\n\n for (const m of fileContents.matchAll(KTS_PLUGIN_APPLY_REGEX)) {\n const [, pid] = m;\n plugins.push(depEntry(pid));\n }\n\n // alias(libs.plugins...) — keep alias token (no version)\n if (KTS_PLUGIN_ALIAS_REGEX.test(fileContents)) {\n // Collect all alias lines to preserve identifiers; light parse:\n const aliasMatches = fileContents.matchAll(\n /alias\\s*\\(\\s*(libs(?:\\.plugins)?(?:\\.[\\w\\-.]+|\\[[\"'][^\"']+[\"']\\]))\\s*\\)/g,\n );\n for (const m of aliasMatches) {\n plugins.push(depEntry(m[1]));\n }\n }\n\n // ---------- compose final list ----------\n // Merge deps + plugins as \"softwareDevelopmentKits\"\n const softwareDevelopmentKits = [...deps, ...plugins]\n // de-dup by name+version\n .reduce(\n (acc, cur) => {\n const key = `${cur.name}@@${cur.version || ''}`;\n if (!acc.map.has(key)) {\n acc.map.set(key, cur);\n acc.list.push(cur);\n }\n return acc;\n },\n {\n map: new Map<string, DepInput>(),\n list: [] as Array<DepInput>,\n },\n ).list;\n\n return [\n {\n name: appName,\n softwareDevelopmentKits,\n },\n ];\n },\n};\n"]}
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkID7MP3QDcjs = require('./chunk-ID7MP3QD.cjs');require('./chunk-LWPX5LJB.cjs');require('./chunk-LU3DKRNK.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-NBXAOUWC.cjs');require('./chunk-FHUHBSLE.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-F7QE6D3T.cjs');require('./chunk-T3BBQIRY.cjs');async function m({auth:r,trackerStatus:s,file:a,transcendUrl:e}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkID7MP3QDcjs.c.call(void 0, {auth:r,trackerStatus:s,file:a,transcendUrl:e})}exports.uploadCookiesFromCsv = m;
2
- //# sourceMappingURL=impl-6O4FILGB.cjs.map
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkBO6JY2EMcjs = require('./chunk-BO6JY2EM.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-NBXAOUWC.cjs');require('./chunk-FHUHBSLE.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-F7QE6D3T.cjs');require('./chunk-T3BBQIRY.cjs');async function u({auth:r,transcendUrl:i,file:e,enricherId:o,concurrency:s,markSilent:a,sombraAuth:m}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkBO6JY2EMcjs.d.call(void 0, {file:e,transcendUrl:i,enricherId:o,concurrency:s,markSilent:a,auth:r,sombraAuth:m})}exports.pushIdentifiers = u;
2
- //# sourceMappingURL=impl-ZMX57RSP.cjs.map