@datadog/datadog-ci-base 5.8.0 → 5.9.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 (220) hide show
  1. package/dist/cli.d.ts +12 -0
  2. package/dist/cli.js +76 -33
  3. package/dist/cli.js.map +1 -1
  4. package/dist/commands/aas/common.d.ts +13 -2
  5. package/dist/commands/aas/common.js +46 -24
  6. package/dist/commands/aas/common.js.map +1 -1
  7. package/dist/commands/aas/instrument.js +1 -1
  8. package/dist/commands/aas/instrument.js.map +1 -1
  9. package/dist/commands/aas/uninstrument.js +1 -1
  10. package/dist/commands/aas/uninstrument.js.map +1 -1
  11. package/dist/commands/ci-env/cli.d.ts +2 -0
  12. package/dist/commands/ci-env/cli.js +10 -0
  13. package/dist/commands/ci-env/cli.js.map +1 -0
  14. package/dist/commands/ci-env/read.d.ts +7 -0
  15. package/dist/commands/ci-env/read.js +176 -0
  16. package/dist/commands/ci-env/read.js.map +1 -0
  17. package/dist/commands/cloud-run/constants.js +1 -2
  18. package/dist/commands/cloud-run/constants.js.map +1 -1
  19. package/dist/commands/container-app/common.js +10 -11
  20. package/dist/commands/container-app/common.js.map +1 -1
  21. package/dist/commands/coverage/upload.d.ts +2 -0
  22. package/dist/commands/coverage/upload.js +6 -0
  23. package/dist/commands/coverage/upload.js.map +1 -1
  24. package/dist/commands/dsyms/upload.js +2 -1
  25. package/dist/commands/dsyms/upload.js.map +1 -1
  26. package/dist/commands/dsyms/utils.js +2 -9
  27. package/dist/commands/dsyms/utils.js.map +1 -1
  28. package/dist/commands/elf-symbols/cli.d.ts +2 -0
  29. package/dist/commands/elf-symbols/cli.js +10 -0
  30. package/dist/commands/elf-symbols/cli.js.map +1 -0
  31. package/dist/commands/elf-symbols/elf-constants.d.ts +256 -0
  32. package/dist/commands/elf-symbols/elf-constants.js +465 -0
  33. package/dist/commands/elf-symbols/elf-constants.js.map +1 -0
  34. package/dist/commands/elf-symbols/elf.d.ts +105 -0
  35. package/dist/commands/elf-symbols/elf.js +431 -0
  36. package/dist/commands/elf-symbols/elf.js.map +1 -0
  37. package/dist/commands/elf-symbols/helpers.d.ts +4 -0
  38. package/dist/commands/elf-symbols/helpers.js +29 -0
  39. package/dist/commands/elf-symbols/helpers.js.map +1 -0
  40. package/dist/commands/elf-symbols/interfaces.d.ts +18 -0
  41. package/dist/commands/elf-symbols/interfaces.js +7 -0
  42. package/dist/commands/elf-symbols/interfaces.js.map +1 -0
  43. package/dist/commands/elf-symbols/renderer.d.ts +19 -0
  44. package/dist/commands/elf-symbols/renderer.js +87 -0
  45. package/dist/commands/elf-symbols/renderer.js.map +1 -0
  46. package/dist/commands/elf-symbols/upload.d.ts +31 -0
  47. package/dist/commands/elf-symbols/upload.js +413 -0
  48. package/dist/commands/elf-symbols/upload.js.map +1 -0
  49. package/dist/commands/flutter-symbols/cli.d.ts +2 -0
  50. package/dist/commands/flutter-symbols/cli.js +10 -0
  51. package/dist/commands/flutter-symbols/cli.js.map +1 -0
  52. package/dist/commands/flutter-symbols/helpers.d.ts +8 -0
  53. package/dist/commands/flutter-symbols/helpers.js +51 -0
  54. package/dist/commands/flutter-symbols/helpers.js.map +1 -0
  55. package/dist/commands/flutter-symbols/interfaces.d.ts +17 -0
  56. package/dist/commands/flutter-symbols/interfaces.js +10 -0
  57. package/dist/commands/flutter-symbols/interfaces.js.map +1 -0
  58. package/dist/commands/flutter-symbols/renderer.d.ts +23 -0
  59. package/dist/commands/flutter-symbols/renderer.js +106 -0
  60. package/dist/commands/flutter-symbols/renderer.js.map +1 -0
  61. package/dist/commands/flutter-symbols/upload.d.ts +44 -0
  62. package/dist/commands/flutter-symbols/upload.js +511 -0
  63. package/dist/commands/flutter-symbols/upload.js.map +1 -0
  64. package/dist/commands/git-metadata/api.js +3 -7
  65. package/dist/commands/git-metadata/api.js.map +1 -1
  66. package/dist/commands/git-metadata/git.js +11 -7
  67. package/dist/commands/git-metadata/git.js.map +1 -1
  68. package/dist/commands/measure/cli.d.ts +2 -0
  69. package/dist/commands/measure/cli.js +10 -0
  70. package/dist/commands/measure/cli.js.map +1 -0
  71. package/dist/commands/measure/measure.d.ts +18 -0
  72. package/dist/commands/measure/measure.js +171 -0
  73. package/dist/commands/measure/measure.js.map +1 -0
  74. package/dist/commands/pe-symbols/breakpad.d.ts +2 -0
  75. package/dist/commands/pe-symbols/breakpad.js +159 -0
  76. package/dist/commands/pe-symbols/breakpad.js.map +1 -0
  77. package/dist/commands/pe-symbols/cli.d.ts +2 -0
  78. package/dist/commands/pe-symbols/cli.js +10 -0
  79. package/dist/commands/pe-symbols/cli.js.map +1 -0
  80. package/dist/commands/pe-symbols/helpers.d.ts +4 -0
  81. package/dist/commands/pe-symbols/helpers.js +30 -0
  82. package/dist/commands/pe-symbols/helpers.js.map +1 -0
  83. package/dist/commands/pe-symbols/interfaces.d.ts +17 -0
  84. package/dist/commands/pe-symbols/interfaces.js +7 -0
  85. package/dist/commands/pe-symbols/interfaces.js.map +1 -0
  86. package/dist/commands/pe-symbols/pe-constants.d.ts +51 -0
  87. package/dist/commands/pe-symbols/pe-constants.js +160 -0
  88. package/dist/commands/pe-symbols/pe-constants.js.map +1 -0
  89. package/dist/commands/pe-symbols/pe.d.ts +40 -0
  90. package/dist/commands/pe-symbols/pe.js +249 -0
  91. package/dist/commands/pe-symbols/pe.js.map +1 -0
  92. package/dist/commands/pe-symbols/renderer.d.ts +19 -0
  93. package/dist/commands/pe-symbols/renderer.js +87 -0
  94. package/dist/commands/pe-symbols/renderer.js.map +1 -0
  95. package/dist/commands/pe-symbols/upload.d.ts +34 -0
  96. package/dist/commands/pe-symbols/upload.js +458 -0
  97. package/dist/commands/pe-symbols/upload.js.map +1 -0
  98. package/dist/commands/react-native/cli.d.ts +5 -0
  99. package/dist/commands/react-native/cli.js +16 -0
  100. package/dist/commands/react-native/cli.js.map +1 -0
  101. package/dist/commands/react-native/codepush.d.ts +29 -0
  102. package/dist/commands/react-native/codepush.js +176 -0
  103. package/dist/commands/react-native/codepush.js.map +1 -0
  104. package/dist/commands/react-native/errors.d.ts +9 -0
  105. package/dist/commands/react-native/errors.js +34 -0
  106. package/dist/commands/react-native/errors.js.map +1 -0
  107. package/dist/commands/react-native/injectDebugId.d.ts +42 -0
  108. package/dist/commands/react-native/injectDebugId.js +252 -0
  109. package/dist/commands/react-native/injectDebugId.js.map +1 -0
  110. package/dist/commands/react-native/interfaces.d.ts +20 -0
  111. package/dist/commands/react-native/interfaces.js +93 -0
  112. package/dist/commands/react-native/interfaces.js.map +1 -0
  113. package/dist/commands/react-native/renderer.d.ts +20 -0
  114. package/dist/commands/react-native/renderer.js +111 -0
  115. package/dist/commands/react-native/renderer.js.map +1 -0
  116. package/dist/commands/react-native/upload.d.ts +30 -0
  117. package/dist/commands/react-native/upload.js +318 -0
  118. package/dist/commands/react-native/upload.js.map +1 -0
  119. package/dist/commands/react-native/utils.d.ts +4 -0
  120. package/dist/commands/react-native/utils.js +35 -0
  121. package/dist/commands/react-native/utils.js.map +1 -0
  122. package/dist/commands/react-native/validation.d.ts +6 -0
  123. package/dist/commands/react-native/validation.js +24 -0
  124. package/dist/commands/react-native/validation.js.map +1 -0
  125. package/dist/commands/react-native/xcode.d.ts +58 -0
  126. package/dist/commands/react-native/xcode.js +561 -0
  127. package/dist/commands/react-native/xcode.js.map +1 -0
  128. package/dist/commands/sourcemaps/cli.d.ts +2 -0
  129. package/dist/commands/sourcemaps/cli.js +10 -0
  130. package/dist/commands/sourcemaps/cli.js.map +1 -0
  131. package/dist/commands/sourcemaps/interfaces.d.ts +18 -0
  132. package/dist/commands/sourcemaps/interfaces.js +59 -0
  133. package/dist/commands/sourcemaps/interfaces.js.map +1 -0
  134. package/dist/commands/sourcemaps/renderer.d.ts +13 -0
  135. package/dist/commands/sourcemaps/renderer.js +93 -0
  136. package/dist/commands/sourcemaps/renderer.js.map +1 -0
  137. package/dist/commands/sourcemaps/upload.d.ts +29 -0
  138. package/dist/commands/sourcemaps/upload.js +343 -0
  139. package/dist/commands/sourcemaps/upload.js.map +1 -0
  140. package/dist/commands/sourcemaps/utils.d.ts +3 -0
  141. package/dist/commands/sourcemaps/utils.js +73 -0
  142. package/dist/commands/sourcemaps/utils.js.map +1 -0
  143. package/dist/commands/sourcemaps/validation.d.ts +7 -0
  144. package/dist/commands/sourcemaps/validation.js +41 -0
  145. package/dist/commands/sourcemaps/validation.js.map +1 -0
  146. package/dist/commands/span/cli.d.ts +2 -0
  147. package/dist/commands/span/cli.js +10 -0
  148. package/dist/commands/span/cli.js.map +1 -0
  149. package/dist/commands/span/span.d.ts +10 -0
  150. package/dist/commands/span/span.js +112 -0
  151. package/dist/commands/span/span.js.map +1 -0
  152. package/dist/commands/tag/tag.js +2 -2
  153. package/dist/commands/tag/tag.js.map +1 -1
  154. package/dist/commands/terraform/cli.d.ts +2 -0
  155. package/dist/commands/terraform/cli.js +10 -0
  156. package/dist/commands/terraform/cli.js.map +1 -0
  157. package/dist/commands/terraform/upload.d.ts +14 -0
  158. package/dist/commands/terraform/upload.js +93 -0
  159. package/dist/commands/terraform/upload.js.map +1 -0
  160. package/dist/commands/trace/api.d.ts +6 -0
  161. package/dist/commands/trace/api.js +38 -0
  162. package/dist/commands/trace/api.js.map +1 -0
  163. package/dist/commands/trace/cli.d.ts +2 -0
  164. package/dist/commands/trace/cli.js +10 -0
  165. package/dist/commands/trace/cli.js.map +1 -0
  166. package/dist/commands/trace/helper.d.ts +16 -0
  167. package/dist/commands/trace/helper.js +125 -0
  168. package/dist/commands/trace/helper.js.map +1 -0
  169. package/dist/commands/trace/interfaces.d.ts +18 -0
  170. package/dist/commands/trace/interfaces.js +14 -0
  171. package/dist/commands/trace/interfaces.js.map +1 -0
  172. package/dist/commands/trace/test-utils.d.ts +4 -0
  173. package/dist/commands/trace/test-utils.js +156 -0
  174. package/dist/commands/trace/test-utils.js.map +1 -0
  175. package/dist/commands/trace/trace.d.ts +10 -0
  176. package/dist/commands/trace/trace.js +110 -0
  177. package/dist/commands/trace/trace.js.map +1 -0
  178. package/dist/commands/unity-symbols/cli.d.ts +2 -0
  179. package/dist/commands/unity-symbols/cli.js +10 -0
  180. package/dist/commands/unity-symbols/cli.js.map +1 -0
  181. package/dist/commands/unity-symbols/helpers.d.ts +4 -0
  182. package/dist/commands/unity-symbols/helpers.js +29 -0
  183. package/dist/commands/unity-symbols/helpers.js.map +1 -0
  184. package/dist/commands/unity-symbols/interfaces.d.ts +14 -0
  185. package/dist/commands/unity-symbols/interfaces.js +9 -0
  186. package/dist/commands/unity-symbols/interfaces.js.map +1 -0
  187. package/dist/commands/unity-symbols/renderer.d.ts +19 -0
  188. package/dist/commands/unity-symbols/renderer.js +88 -0
  189. package/dist/commands/unity-symbols/renderer.js.map +1 -0
  190. package/dist/commands/unity-symbols/upload.d.ts +32 -0
  191. package/dist/commands/unity-symbols/upload.js +393 -0
  192. package/dist/commands/unity-symbols/upload.js.map +1 -0
  193. package/dist/commands/version/cli.d.ts +2 -0
  194. package/dist/commands/version/cli.js +10 -0
  195. package/dist/commands/version/cli.js.map +1 -0
  196. package/dist/commands/version/version.d.ts +6 -0
  197. package/dist/commands/version/version.js +31 -0
  198. package/dist/commands/version/version.js.map +1 -0
  199. package/dist/helpers/api.d.ts +23 -0
  200. package/dist/helpers/api.js +34 -7
  201. package/dist/helpers/api.js.map +1 -1
  202. package/dist/helpers/app.js +2 -1
  203. package/dist/helpers/app.js.map +1 -1
  204. package/dist/helpers/base-intake-url.js +2 -9
  205. package/dist/helpers/base-intake-url.js.map +1 -1
  206. package/dist/helpers/ci.d.ts +1 -0
  207. package/dist/helpers/ci.js +9 -2
  208. package/dist/helpers/ci.js.map +1 -1
  209. package/dist/helpers/metrics.js +2 -7
  210. package/dist/helpers/metrics.js.map +1 -1
  211. package/dist/helpers/plugin.js +1 -1
  212. package/dist/helpers/plugin.js.map +1 -1
  213. package/dist/helpers/serverless/azure.d.ts +2 -0
  214. package/dist/helpers/serverless/azure.js +3 -3
  215. package/dist/helpers/serverless/azure.js.map +1 -1
  216. package/dist/helpers/serverless/common.js +2 -2
  217. package/dist/helpers/serverless/common.js.map +1 -1
  218. package/dist/helpers/serverless/lambda-layer-versions.d.ts +3 -3
  219. package/dist/helpers/serverless/lambda-layer-versions.js +3 -3
  220. package/package.json +24 -17
package/dist/cli.d.ts CHANGED
@@ -1,21 +1,33 @@
1
1
  export declare const commands: {
2
2
  aas: typeof import("./commands/aas/uninstrument").AasUninstrumentCommand[];
3
+ 'ci-env': typeof import("./commands/ci-env/read").CiEnvReadCommand[];
3
4
  'cloud-run': (typeof import("./commands/cloud-run/flare").CloudRunFlareCommand | typeof import("./commands/cloud-run/instrument").CloudRunInstrumentCommand | typeof import("./commands/cloud-run/uninstrument").CloudRunUninstrumentCommand)[];
4
5
  'container-app': (typeof import("./commands/container-app/instrument").ContainerAppInstrumentCommand | typeof import("./commands/container-app/uninstrument").ContainerAppUninstrumentCommand)[];
5
6
  coverage: typeof import("./commands/coverage/upload").CoverageUploadCommand[];
6
7
  deployment: (typeof import("./commands/deployment/correlate-image").DeploymentCorrelateImageCommand | typeof import("./commands/deployment/correlate").DeploymentCorrelateCommand | typeof import("./commands/deployment/gate").DeploymentGateCommand | typeof import("./commands/deployment/mark").DeploymentMarkCommand)[];
7
8
  dora: typeof import("./commands/dora/deployment").DoraDeploymentCommand[];
8
9
  dsyms: typeof import("./commands/dsyms/upload").DsymsUploadCommand[];
10
+ 'elf-symbols': typeof import("./commands/elf-symbols/upload").ElfSymbolsUploadCommand[];
11
+ 'flutter-symbols': typeof import("./commands/flutter-symbols/upload").FlutterSymbolsUploadCommand[];
9
12
  gate: typeof import("./commands/gate/evaluate").GateEvaluateCommand[];
10
13
  'git-metadata': typeof import("./commands/git-metadata/upload").GitMetadataUploadCommand[];
11
14
  junit: typeof import("./commands/junit/upload").JunitUploadCommand[];
12
15
  lambda: (typeof import("./commands/lambda/cloudwatch").LambdaCloudwatchCommand | typeof import("./commands/lambda/flare").LambdaFlareCommand | typeof import("./commands/lambda/instrument").LambdaInstrumentCommand | typeof import("./commands/lambda/uninstrument").LambdaUninstrumentCommand)[];
16
+ measure: typeof import("./commands/measure/measure").MeasureCommand[];
17
+ 'pe-symbols': typeof import("./commands/pe-symbols/upload").PeSymbolsUploadCommand[];
13
18
  plugin: (typeof import("./commands/plugin/install").PluginInstallCommand | typeof import("./commands/plugin/list").PluginListCommand)[];
19
+ 'react-native': (typeof import("./commands/react-native/upload").ReactNativeUploadCommand | typeof import("./commands/react-native/codepush").ReactNativeCodepushCommand | typeof import("./commands/react-native/injectDebugId").ReactNativeInjectDebugIdCommand | typeof import("./commands/react-native/xcode").ReactNativeXcodeCommand)[];
14
20
  sarif: typeof import("./commands/sarif/upload").SarifUploadCommand[];
15
21
  sbom: typeof import("./commands/sbom/upload").SbomUploadCommand[];
22
+ sourcemaps: typeof import("./commands/sourcemaps/upload").SourcemapsUploadCommand[];
23
+ span: typeof import("./commands/span/span").SpanCommand[];
16
24
  stepfunctions: (typeof import("./commands/stepfunctions/instrument").StepfunctionsInstrumentCommand | typeof import("./commands/stepfunctions/uninstrument").StepfunctionsUninstrumentCommand)[];
17
25
  synthetics: (typeof import("./commands/synthetics/deploy-tests").SyntheticsDeployTestsCommand | typeof import("./commands/synthetics/import-tests").SyntheticsImportTestsCommand | typeof import("./commands/synthetics/run-tests").SyntheticsRunTestsCommand | typeof import("./commands/synthetics/upload-application").SyntheticsUploadApplicationCommand)[];
18
26
  tag: typeof import("./commands/tag/tag").TagCommand[];
27
+ terraform: typeof import("./commands/terraform/upload").TerraformUploadCommand[];
28
+ trace: typeof import("./commands/trace/trace").TraceCommand[];
29
+ 'unity-symbols': typeof import("./commands/unity-symbols/upload").UnitySymbolsUploadCommand[];
30
+ version: typeof import("./commands/version/version").VersionCommand[];
19
31
  };
20
32
  /**
21
33
  * Some command scopes do not have a plugin package, and their logic is entirely included in `@datadog/datadog-ci-base`.
package/dist/cli.js CHANGED
@@ -1,45 +1,88 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.noPluginExceptions = exports.commands = void 0;
4
+ // DO NOT EDIT MANUALLY. Update the source of truth in `bin/lint-packages.ts` instead.
4
5
  const cli_1 = require("./commands/aas/cli");
5
- const cli_2 = require("./commands/cloud-run/cli");
6
- const cli_3 = require("./commands/container-app/cli");
7
- const cli_4 = require("./commands/coverage/cli");
8
- const cli_5 = require("./commands/deployment/cli");
9
- const cli_6 = require("./commands/dora/cli");
10
- const cli_7 = require("./commands/dsyms/cli");
11
- const cli_8 = require("./commands/gate/cli");
12
- const cli_9 = require("./commands/git-metadata/cli");
13
- const cli_10 = require("./commands/junit/cli");
14
- const cli_11 = require("./commands/lambda/cli");
15
- const cli_12 = require("./commands/plugin/cli");
16
- const cli_13 = require("./commands/sarif/cli");
17
- const cli_14 = require("./commands/sbom/cli");
18
- const cli_15 = require("./commands/stepfunctions/cli");
19
- const cli_16 = require("./commands/synthetics/cli");
20
- const cli_17 = require("./commands/tag/cli");
6
+ const cli_2 = require("./commands/ci-env/cli");
7
+ const cli_3 = require("./commands/cloud-run/cli");
8
+ const cli_4 = require("./commands/container-app/cli");
9
+ const cli_5 = require("./commands/coverage/cli");
10
+ const cli_6 = require("./commands/deployment/cli");
11
+ const cli_7 = require("./commands/dora/cli");
12
+ const cli_8 = require("./commands/dsyms/cli");
13
+ const cli_9 = require("./commands/elf-symbols/cli");
14
+ const cli_10 = require("./commands/flutter-symbols/cli");
15
+ const cli_11 = require("./commands/gate/cli");
16
+ const cli_12 = require("./commands/git-metadata/cli");
17
+ const cli_13 = require("./commands/junit/cli");
18
+ const cli_14 = require("./commands/lambda/cli");
19
+ const cli_15 = require("./commands/measure/cli");
20
+ const cli_16 = require("./commands/pe-symbols/cli");
21
+ const cli_17 = require("./commands/plugin/cli");
22
+ const cli_18 = require("./commands/react-native/cli");
23
+ const cli_19 = require("./commands/sarif/cli");
24
+ const cli_20 = require("./commands/sbom/cli");
25
+ const cli_21 = require("./commands/sourcemaps/cli");
26
+ const cli_22 = require("./commands/span/cli");
27
+ const cli_23 = require("./commands/stepfunctions/cli");
28
+ const cli_24 = require("./commands/synthetics/cli");
29
+ const cli_25 = require("./commands/tag/cli");
30
+ const cli_26 = require("./commands/terraform/cli");
31
+ const cli_27 = require("./commands/trace/cli");
32
+ const cli_28 = require("./commands/unity-symbols/cli");
33
+ const cli_29 = require("./commands/version/cli");
34
+ // DO NOT EDIT MANUALLY. Update the source of truth in `bin/lint-packages.ts` instead.
21
35
  // prettier-ignore
22
36
  exports.commands = {
23
37
  'aas': cli_1.commands,
24
- 'cloud-run': cli_2.commands,
25
- 'container-app': cli_3.commands,
26
- 'coverage': cli_4.commands,
27
- 'deployment': cli_5.commands,
28
- 'dora': cli_6.commands,
29
- 'dsyms': cli_7.commands,
30
- 'gate': cli_8.commands,
31
- 'git-metadata': cli_9.commands,
32
- 'junit': cli_10.commands,
33
- 'lambda': cli_11.commands,
34
- 'plugin': cli_12.commands,
35
- 'sarif': cli_13.commands,
36
- 'sbom': cli_14.commands,
37
- 'stepfunctions': cli_15.commands,
38
- 'synthetics': cli_16.commands,
39
- 'tag': cli_17.commands,
38
+ 'ci-env': cli_2.commands,
39
+ 'cloud-run': cli_3.commands,
40
+ 'container-app': cli_4.commands,
41
+ 'coverage': cli_5.commands,
42
+ 'deployment': cli_6.commands,
43
+ 'dora': cli_7.commands,
44
+ 'dsyms': cli_8.commands,
45
+ 'elf-symbols': cli_9.commands,
46
+ 'flutter-symbols': cli_10.commands,
47
+ 'gate': cli_11.commands,
48
+ 'git-metadata': cli_12.commands,
49
+ 'junit': cli_13.commands,
50
+ 'lambda': cli_14.commands,
51
+ 'measure': cli_15.commands,
52
+ 'pe-symbols': cli_16.commands,
53
+ 'plugin': cli_17.commands,
54
+ 'react-native': cli_18.commands,
55
+ 'sarif': cli_19.commands,
56
+ 'sbom': cli_20.commands,
57
+ 'sourcemaps': cli_21.commands,
58
+ 'span': cli_22.commands,
59
+ 'stepfunctions': cli_23.commands,
60
+ 'synthetics': cli_24.commands,
61
+ 'tag': cli_25.commands,
62
+ 'terraform': cli_26.commands,
63
+ 'trace': cli_27.commands,
64
+ 'unity-symbols': cli_28.commands,
65
+ 'version': cli_29.commands,
40
66
  };
67
+ // DO NOT EDIT MANUALLY. Update the source of truth in `bin/lint-packages.ts` instead.
41
68
  /**
42
69
  * Some command scopes do not have a plugin package, and their logic is entirely included in `@datadog/datadog-ci-base`.
43
70
  */
44
- exports.noPluginExceptions = new Set(['dsyms', 'git-metadata', 'plugin', 'tag']);
71
+ exports.noPluginExceptions = new Set([
72
+ 'ci-env',
73
+ 'dsyms',
74
+ 'elf-symbols',
75
+ 'flutter-symbols',
76
+ 'git-metadata',
77
+ 'measure',
78
+ 'pe-symbols',
79
+ 'plugin',
80
+ 'react-native',
81
+ 'sourcemaps',
82
+ 'span',
83
+ 'tag',
84
+ 'trace',
85
+ 'unity-symbols',
86
+ 'version',
87
+ ]);
45
88
  //# sourceMappingURL=cli.js.map
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;AAGA,4CAA0D;AAC1D,kDAAqE;AACrE,sDAA6E;AAC7E,iDAAoE;AACpE,mDAAwE;AACxE,6CAA4D;AAC5D,8CAA8D;AAC9D,6CAA4D;AAC5D,qDAA2E;AAC3E,+CAA8D;AAC9D,gDAAgE;AAChE,gDAAgE;AAChE,+CAA8D;AAC9D,8CAA4D;AAC5D,uDAA8E;AAC9E,oDAAwE;AACxE,6CAA0D;AAE1D,kBAAkB;AACL,QAAA,QAAQ,GAAG;IACtB,KAAK,EAAE,cAAW;IAClB,WAAW,EAAE,cAAgB;IAC7B,eAAe,EAAE,cAAoB;IACrC,UAAU,EAAE,cAAgB;IAC5B,YAAY,EAAE,cAAkB;IAChC,MAAM,EAAE,cAAY;IACpB,OAAO,EAAE,cAAa;IACtB,MAAM,EAAE,cAAY;IACpB,cAAc,EAAE,cAAmB;IACnC,OAAO,EAAE,eAAa;IACtB,QAAQ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B,SAAS,EAAE,eAAe;IAC1B,YAAY,EAAE,eAAiB;IAC/B,QAAQ,EAAE,eAAc;IACxB,cAAc,EAAE,eAAmB;IACnC,OAAO,EAAE,eAAa;IACtB,MAAM,EAAE,eAAY;IACpB,YAAY,EAAE,eAAkB;IAChC,MAAM,EAAE,eAAY;IACpB,eAAe,EAAE,eAAqB;IACtC,YAAY,EAAE,eAAkB;IAChC,KAAK,EAAE,eAAW;IAClB,WAAW,EAAE,eAAiB;IAC9B,OAAO,EAAE,eAAa;IACtB,eAAe,EAAE,eAAoB;IACrC,SAAS,EAAE,eAAe;CACO,CAAA;AAEnC,sFAAsF;AAEtF;;GAEG;AACU,QAAA,kBAAkB,GAAgB,IAAI,GAAG,CAAC;IACrD,QAAQ;IACR,OAAO;IACP,aAAa;IACb,iBAAiB;IACjB,cAAc;IACd,SAAS;IACT,YAAY;IACZ,QAAQ;IACR,cAAc;IACd,YAAY;IACZ,MAAM;IACN,KAAK;IACL,OAAO;IACP,eAAe;IACf,SAAS;CACV,CAAsC,CAAA"}
@@ -1,8 +1,17 @@
1
1
  import { BaseCommand } from '../..';
2
+ export interface WebApp {
3
+ name: string;
4
+ slot?: string;
5
+ }
6
+ export declare const renderWebApp: ({ name, slot }: WebApp) => string;
7
+ /**
8
+ * Returns the final segment of the resource ID after `.../sites/` for a web app
9
+ */
10
+ export declare const resourceIdSegment: ({ name, slot }: WebApp) => string;
2
11
  /**
3
12
  * Maps Subscription ID to Resource Group to App Service names.
4
13
  */
5
- export type AasBySubscriptionAndGroup = Record<string, Record<string, string[]>>;
14
+ export type WebAppBySubscriptionAndGroup = Record<string, Record<string, WebApp[]>>;
6
15
  export declare const WINDOWS_RUNTIME_EXTENSIONS: {
7
16
  readonly node: "Datadog.AzureAppServices.Node.Apm";
8
17
  readonly dotnet: "Datadog.AzureAppServices.DotNet";
@@ -25,6 +34,7 @@ export type AasConfigOptions = Partial<{
25
34
  subscriptionId: string;
26
35
  resourceGroup: string;
27
36
  aasName: string;
37
+ slotName: string;
28
38
  resourceIds: string[];
29
39
  service: string;
30
40
  environment: string;
@@ -45,6 +55,7 @@ export declare abstract class AasCommand extends BaseCommand {
45
55
  private subscriptionId;
46
56
  private resourceGroup;
47
57
  private aasName;
58
+ private slotName;
48
59
  private resourceIds;
49
60
  private envVars;
50
61
  private configPath;
@@ -54,5 +65,5 @@ export declare abstract class AasCommand extends BaseCommand {
54
65
  get dryRunPrefix(): string;
55
66
  get additionalConfig(): Partial<AasConfigOptions>;
56
67
  enableFips(): void;
57
- ensureConfig(): Promise<[AasBySubscriptionAndGroup, AasConfigOptions, string[]]>;
68
+ ensureConfig(): Promise<[WebAppBySubscriptionAndGroup, AasConfigOptions, string[]]>;
58
69
  }
@@ -8,8 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.AasCommand = exports.getExtensionId = exports.WINDOWS_RUNTIME_EXTENSIONS = void 0;
15
+ exports.AasCommand = exports.getExtensionId = exports.WINDOWS_RUNTIME_EXTENSIONS = exports.resourceIdSegment = exports.renderWebApp = void 0;
16
+ const chalk_1 = __importDefault(require("chalk"));
13
17
  const clipanion_1 = require("clipanion");
14
18
  const constants_1 = require("../../constants");
15
19
  const env_1 = require("../../helpers/env");
@@ -19,6 +23,17 @@ const azure_1 = require("../../helpers/serverless/azure");
19
23
  const constants_2 = require("../../helpers/serverless/constants");
20
24
  const utils_1 = require("../../helpers/utils");
21
25
  const __1 = require("../..");
26
+ const renderWebApp = ({ name, slot }) => {
27
+ return slot ? `${chalk_1.default.bold(name)} (slot: ${chalk_1.default.bold(slot)})` : `${chalk_1.default.bold(name)}`;
28
+ };
29
+ exports.renderWebApp = renderWebApp;
30
+ /**
31
+ * Returns the final segment of the resource ID after `.../sites/` for a web app
32
+ */
33
+ const resourceIdSegment = ({ name, slot }) => {
34
+ return slot ? `${name}/slots/${slot}` : name;
35
+ };
36
+ exports.resourceIdSegment = resourceIdSegment;
22
37
  exports.WINDOWS_RUNTIME_EXTENSIONS = {
23
38
  node: 'Datadog.AzureAppServices.Node.Apm',
24
39
  dotnet: 'Datadog.AzureAppServices.DotNet',
@@ -41,19 +56,22 @@ class AasCommand extends __1.BaseCommand {
41
56
  description: 'Run the command in dry-run mode, without making any changes',
42
57
  });
43
58
  this.subscriptionId = clipanion_1.Option.String('-s,--subscription-id', {
44
- description: 'Azure Subscription ID containing the App Service',
59
+ description: 'Azure Subscription ID containing the Web App (or slot)',
45
60
  });
46
61
  this.resourceGroup = clipanion_1.Option.String('-g,--resource-group', {
47
- description: 'Name of the Azure Resource Group containing the App Service',
62
+ description: 'Name of the Azure Resource Group containing the Web App (or slot)',
48
63
  });
49
64
  this.aasName = clipanion_1.Option.String('-n,--name', {
50
- description: 'Name of the Azure App Service to instrument',
65
+ description: 'Name of the Web App to instrument',
66
+ });
67
+ this.slotName = clipanion_1.Option.String('--slot', {
68
+ description: 'Name of the Web App slot to instrument',
51
69
  });
52
70
  this.resourceIds = clipanion_1.Option.Array('-r,--resource-id', {
53
- description: 'Full Azure resource IDs to instrument, for example, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Web/sites/{aasName}"',
71
+ description: 'Full Azure resource IDs to instrument, for example, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Web/sites/{aasName}" or "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Web/sites/{aasName}/slots/{slotName}"',
54
72
  });
55
73
  this.envVars = clipanion_1.Option.Array('-e,--env-vars', {
56
- description: 'Additional environment variables to set for the App Service. Can specify multiple in the form `--env-vars VAR1=VALUE1 --env-vars VAR2=VALUE2`.',
74
+ description: 'Additional environment variables to set for the Web App (or slot). Can specify multiple in the form `--env-vars VAR1=VALUE1 --env-vars VAR2=VALUE2`.',
57
75
  });
58
76
  this.configPath = clipanion_1.Option.String('--config', {
59
77
  description: 'Path to the configuration file',
@@ -78,12 +96,12 @@ class AasCommand extends __1.BaseCommand {
78
96
  var _a, _b, _c;
79
97
  return __awaiter(this, void 0, void 0, function* () {
80
98
  const config = (yield (0, utils_1.resolveConfigFromFile)({
81
- aas: Object.assign({ subscriptionId: this.subscriptionId, resourceGroup: this.resourceGroup, aasName: this.aasName, envVars: this.envVars }, this.additionalConfig),
99
+ aas: Object.assign({ subscriptionId: this.subscriptionId, resourceGroup: this.resourceGroup, aasName: this.aasName, slotName: this.slotName, envVars: this.envVars }, this.additionalConfig),
82
100
  }, {
83
101
  configPath: this.configPath,
84
102
  defaultConfigPaths: utils_1.DEFAULT_CONFIG_PATHS,
85
103
  })).aas;
86
- const appServices = {};
104
+ const webApps = {};
87
105
  const errors = [];
88
106
  if (process.env.DD_API_KEY === undefined) {
89
107
  errors.push('DD_API_KEY environment variable is required');
@@ -104,35 +122,39 @@ class AasCommand extends __1.BaseCommand {
104
122
  errors.push(`--windows-runtime must be one of: ${Object.keys(exports.WINDOWS_RUNTIME_EXTENSIONS).join(', ')}`);
105
123
  }
106
124
  const specifiedSiteArgs = [config.subscriptionId, config.resourceGroup, config.aasName];
107
- // all or none of the site args should be specified
108
- if (!(specifiedSiteArgs.every((arg) => arg) || specifiedSiteArgs.every((arg) => !arg))) {
125
+ // all or none of the site args should be specified (except slot)
126
+ const noneSpecified = specifiedSiteArgs.every((arg) => !arg);
127
+ const allSpecified = specifiedSiteArgs.every((arg) => arg);
128
+ if (!(allSpecified || noneSpecified)) {
109
129
  errors.push('--subscription-id, --resource-group, and --name must be specified together or not at all');
110
130
  }
111
- else if (specifiedSiteArgs.every((arg) => arg)) {
112
- appServices[config.subscriptionId] = { [config.resourceGroup]: [config.aasName] };
131
+ else if (!allSpecified && !!config.slotName) {
132
+ errors.push('--slot can only specified if --subscription-id, --resource-group, and --name are specified');
133
+ }
134
+ else if (!noneSpecified) {
135
+ webApps[config.subscriptionId] = { [config.resourceGroup]: [{ name: config.aasName, slot: config.slotName }] };
113
136
  }
114
137
  if ((_b = this.resourceIds) === null || _b === void 0 ? void 0 : _b.length) {
115
138
  for (const resourceId of this.resourceIds) {
116
139
  const parsed = (0, azure_1.parseResourceId)(resourceId);
117
- if (parsed) {
118
- const { subscriptionId, resourceGroup, name } = parsed;
119
- if (!appServices[subscriptionId]) {
120
- appServices[subscriptionId] = {};
121
- }
122
- if (!appServices[subscriptionId][resourceGroup]) {
123
- appServices[subscriptionId][resourceGroup] = [];
124
- }
125
- appServices[subscriptionId][resourceGroup].push(name);
140
+ if (!parsed || (!!parsed.subType && parsed.subType !== 'slots')) {
141
+ errors.push(`Invalid Web App (or Slot) resource ID: ${resourceId}`);
142
+ continue;
143
+ }
144
+ const { subscriptionId, resourceGroup, name, subResourceName: slot } = parsed;
145
+ if (!webApps[subscriptionId]) {
146
+ webApps[subscriptionId] = {};
126
147
  }
127
- else {
128
- errors.push(`Invalid AAS resource ID: ${resourceId}`);
148
+ if (!webApps[subscriptionId][resourceGroup]) {
149
+ webApps[subscriptionId][resourceGroup] = [];
129
150
  }
151
+ webApps[subscriptionId][resourceGroup].push({ name, slot });
130
152
  }
131
153
  }
132
154
  if (!((_c = this.resourceIds) === null || _c === void 0 ? void 0 : _c.length) && specifiedSiteArgs.every((arg) => !arg)) {
133
155
  errors.push('No App Services specified to instrument');
134
156
  }
135
- return [appServices, config, errors];
157
+ return [webApps, config, errors];
136
158
  });
137
159
  }
138
160
  }
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/commands/aas/common.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yCAAgC;AAEhC,+CAAuE;AACvE,2CAA2C;AAC3C,6CAA6C;AAC7C,qDAAgD;AAChD,0DAA8D;AAC9D,kEAAoF;AACpF,+CAA+E;AAE/E,6BAAiC;AAOpB,QAA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;oBAC1C,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,KAAK,OAAO,CAAC,EAAE;wBAC/D,MAAM,CAAC,IAAI,CAAC,0CAA0C,UAAU,EAAE,CAAC,CAAA;wBACnE,SAAQ;qBACT;oBAED,MAAM,EAAC,cAAc,EAAE,aAAa,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAC,GAAG,MAAM,CAAA;oBAC3E,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE;wBAC5B,OAAO,CAAC,cAAc,CAAC,GAAG,EAAE,CAAA;qBAC7B;oBACD,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,aAAa,CAAC,EAAE;wBAC3C,OAAO,CAAC,cAAc,CAAC,CAAC,aAAa,CAAC,GAAG,EAAE,CAAA;qBAC5C;oBACD,OAAO,CAAC,cAAc,CAAC,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,IAAI,EAAC,CAAC,CAAA;iBAC1D;aACF;YACD,IAAI,CAAC,CAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,MAAM,CAAA,IAAI,iBAAiB,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE;gBACvE,MAAM,CAAC,IAAI,CAAC,yCAAyC,CAAC,CAAA;aACvD;YAED,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;;KACjC;CACF;AA5HD,gCA4HC"}
@@ -79,6 +79,6 @@ exports.AasInstrumentCommand = AasInstrumentCommand;
79
79
  AasInstrumentCommand.paths = [['aas', 'instrument']];
80
80
  AasInstrumentCommand.usage = clipanion_1.Command.Usage({
81
81
  category: 'Serverless',
82
- description: 'Apply Datadog instrumentation to an Azure App Service.',
82
+ description: 'Apply Datadog instrumentation to an Azure Web App or slot.',
83
83
  });
84
84
  //# sourceMappingURL=instrument.js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,CAAC,CAAA;QAEM,mBAAc,GAAG,kBAAM,CAAC,MAAM,CAAC,mBAAmB,EAAE;YAC1D,WAAW,EACT,2HAA2H;SAC9H,CAAC,CAAA;IAsBJ,CAAC;IApBC,IAAW,gBAAgB;QACzB,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,wBAAwB,EAAE,IAAI,CAAC,wBAAwB;YACvD,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;YACvC,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,qBAAqB,EAAE,IAAI,CAAC,qBAAqB;YACjD,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;YACzC,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,cAAc,EAAE,IAAI,CAAC,cAA4C;SAClE,CAAA;IACH,CAAC;IAEY,OAAO;;YAClB,OAAO,IAAA,6BAAoB,EAAC,IAAI,CAAC,CAAA;QACnC,CAAC;KAAA;;AAzEH,oDA0EC;AAzEe,0BAAK,GAAG,CAAC,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC,AAA1B,CAA0B;AAC/B,0BAAK,GAAG,mBAAO,CAAC,KAAK,CAAC;IAClC,QAAQ,EAAE,YAAY;IACtB,WAAW,EAAE,4DAA4D;CAC1E,CAAC,AAHiB,CAGjB"}
@@ -24,6 +24,6 @@ exports.AasUninstrumentCommand = AasUninstrumentCommand;
24
24
  AasUninstrumentCommand.paths = [['aas', 'uninstrument']];
25
25
  AasUninstrumentCommand.usage = clipanion_1.Command.Usage({
26
26
  category: 'Serverless',
27
- description: 'Remove Datadog instrumentation from an Azure App Service.',
27
+ description: 'Remove Datadog instrumentation from an Azure Web App or slot.',
28
28
  });
29
29
  //# sourceMappingURL=uninstrument.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"uninstrument.js","sourceRoot":"","sources":["../../../src/commands/aas/uninstrument.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yCAAiC;AAEjC,iDAAyD;AAEzD,qCAAmC;AAEnC,MAAa,sBAAuB,SAAQ,mBAAU;IAOvC,OAAO;;YAClB,OAAO,IAAA,6BAAoB,EAAC,IAAI,CAAC,CAAA;QACnC,CAAC;KAAA;;AATH,wDAUC;AATe,4BAAK,GAAG,CAAC,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC,CAAA;AACjC,4BAAK,GAAG,mBAAO,CAAC,KAAK,CAAC;IAClC,QAAQ,EAAE,YAAY;IACtB,WAAW,EAAE,2DAA2D;CACzE,CAAC,CAAA"}
1
+ {"version":3,"file":"uninstrument.js","sourceRoot":"","sources":["../../../src/commands/aas/uninstrument.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yCAAiC;AAEjC,iDAAyD;AAEzD,qCAAmC;AAEnC,MAAa,sBAAuB,SAAQ,mBAAU;IAOvC,OAAO;;YAClB,OAAO,IAAA,6BAAoB,EAAC,IAAI,CAAC,CAAA;QACnC,CAAC;KAAA;;AATH,wDAUC;AATe,4BAAK,GAAG,CAAC,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC,CAAA;AACjC,4BAAK,GAAG,mBAAO,CAAC,KAAK,CAAC;IAClC,QAAQ,EAAE,YAAY;IACtB,WAAW,EAAE,+DAA+D;CAC7E,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { CiEnvReadCommand } from './read';
2
+ export declare const commands: (typeof CiEnvReadCommand)[];
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.commands = void 0;
4
+ /* eslint-disable import-x/order */
5
+ const read_1 = require("./read");
6
+ // prettier-ignore
7
+ exports.commands = [
8
+ read_1.CiEnvReadCommand,
9
+ ];
10
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../src/commands/ci-env/cli.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AACnC,iCAAuC;AAEvC,kBAAkB;AACL,QAAA,QAAQ,GAAG;IACtB,uBAAgB;CACjB,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { BaseCommand } from '@datadog/datadog-ci-base';
2
+ export declare class CiEnvReadCommand extends BaseCommand {
3
+ static paths: string[][];
4
+ static usage: import("clipanion").Usage;
5
+ private format;
6
+ execute(): Promise<1 | 0>;
7
+ }
@@ -0,0 +1,176 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
+ return new (P || (P = Promise))(function (resolve, reject) {
28
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
32
+ });
33
+ };
34
+ Object.defineProperty(exports, "__esModule", { value: true });
35
+ exports.CiEnvReadCommand = void 0;
36
+ const clipanion_1 = require("clipanion");
37
+ const t = __importStar(require("typanion"));
38
+ const datadog_ci_base_1 = require("@datadog/datadog-ci-base");
39
+ const ci_1 = require("../../helpers/ci");
40
+ const tags_1 = require("../../helpers/tags");
41
+ const user_provided_git_1 = require("../../helpers/user-provided-git");
42
+ /**
43
+ * Explicit mapping from internal tag keys to DD_* environment variable names.
44
+ */
45
+ const TAG_TO_ENV_VAR = {
46
+ // CI tags
47
+ [tags_1.CI_JOB_ID]: 'DD_CI_JOB_ID',
48
+ [tags_1.CI_JOB_NAME]: 'DD_CI_JOB_NAME',
49
+ [tags_1.CI_JOB_URL]: 'DD_CI_JOB_URL',
50
+ [tags_1.CI_NODE_LABELS]: 'DD_CI_NODE_LABELS',
51
+ [tags_1.CI_NODE_NAME]: 'DD_CI_NODE_NAME',
52
+ [tags_1.CI_PIPELINE_ID]: 'DD_CI_PIPELINE_ID',
53
+ [tags_1.CI_PIPELINE_NAME]: 'DD_CI_PIPELINE_NAME',
54
+ [tags_1.CI_PIPELINE_NUMBER]: 'DD_CI_PIPELINE_NUMBER',
55
+ [tags_1.CI_PIPELINE_URL]: 'DD_CI_PIPELINE_URL',
56
+ [tags_1.CI_PROVIDER_NAME]: 'DD_CI_PROVIDER_NAME',
57
+ [tags_1.CI_STAGE_NAME]: 'DD_CI_STAGE_NAME',
58
+ [tags_1.CI_WORKSPACE_PATH]: 'DD_CI_WORKSPACE_PATH',
59
+ [tags_1.CI_ENV_VARS]: 'DD_CI_ENV_VARS',
60
+ // Git tags
61
+ [tags_1.GIT_BRANCH]: 'DD_GIT_BRANCH',
62
+ [tags_1.GIT_COMMIT_AUTHOR_DATE]: 'DD_GIT_COMMIT_AUTHOR_DATE',
63
+ [tags_1.GIT_COMMIT_AUTHOR_EMAIL]: 'DD_GIT_COMMIT_AUTHOR_EMAIL',
64
+ [tags_1.GIT_COMMIT_AUTHOR_NAME]: 'DD_GIT_COMMIT_AUTHOR_NAME',
65
+ [tags_1.GIT_COMMIT_COMMITTER_DATE]: 'DD_GIT_COMMIT_COMMITTER_DATE',
66
+ [tags_1.GIT_COMMIT_COMMITTER_EMAIL]: 'DD_GIT_COMMIT_COMMITTER_EMAIL',
67
+ [tags_1.GIT_COMMIT_COMMITTER_NAME]: 'DD_GIT_COMMIT_COMMITTER_NAME',
68
+ [tags_1.GIT_COMMIT_MESSAGE]: 'DD_GIT_COMMIT_MESSAGE',
69
+ [tags_1.GIT_HEAD_SHA]: 'DD_GIT_COMMIT_HEAD_SHA',
70
+ [tags_1.GIT_PULL_REQUEST_BASE_BRANCH]: 'DD_GIT_PULL_REQUEST_BASE_BRANCH',
71
+ [tags_1.GIT_PULL_REQUEST_BASE_BRANCH_HEAD_SHA]: 'DD_GIT_PULL_REQUEST_BASE_BRANCH_HEAD_SHA',
72
+ [tags_1.GIT_PULL_REQUEST_BASE_BRANCH_SHA]: 'DD_GIT_PULL_REQUEST_BASE_BRANCH_SHA',
73
+ [tags_1.GIT_REPOSITORY_URL]: 'DD_GIT_REPOSITORY_URL',
74
+ [tags_1.GIT_SHA]: 'DD_GIT_COMMIT_SHA',
75
+ [tags_1.GIT_TAG]: 'DD_GIT_TAG',
76
+ // PR tags
77
+ [tags_1.PR_NUMBER]: 'DD_PR_NUMBER',
78
+ };
79
+ /**
80
+ * Converts a tag key to an environment variable name using explicit mapping.
81
+ * Falls back to the tag key itself if no explicit mapping exists.
82
+ */
83
+ const tagKeyToEnvVar = (tagKey) => {
84
+ return TAG_TO_ENV_VAR[tagKey] || tagKey;
85
+ };
86
+ /**
87
+ * Escapes a value for use in bash single-quoted strings.
88
+ * Uses single quotes to avoid variable expansion and command injection.
89
+ * Inside single quotes, nothing is interpreted by bash ($VAR, $(cmd), etc. stay literal).
90
+ */
91
+ const escapeBashValue = (value) => {
92
+ // Replace single quotes with '\'' which ends the quote, adds an escaped quote, and starts a new quote
93
+ return value.replace(/'/g, "'\\''");
94
+ };
95
+ /**
96
+ * Escapes a value for use in double-quoted tag values.
97
+ */
98
+ const escapeTagValue = (value) => {
99
+ // Escape backslashes first, then double quotes
100
+ return value.replace(/\\/g, '\\\\').replace(/"/g, '\\"');
101
+ };
102
+ /**
103
+ * Output for different formats.
104
+ */
105
+ const formatOutput = (tags, format) => {
106
+ const entries = Object.entries(tags).map(([key, value]) => {
107
+ const envVarName = tagKeyToEnvVar(key);
108
+ return { key, envVarName, value };
109
+ });
110
+ if (format === 'tags') {
111
+ return entries
112
+ .map(({ key, value }) => {
113
+ const escapedValue = escapeTagValue(value);
114
+ return `${key}:"${escapedValue}"`;
115
+ })
116
+ .join('\n');
117
+ }
118
+ if (format === 'json') {
119
+ const jsonObj = {};
120
+ for (const { envVarName, value } of entries) {
121
+ jsonObj[envVarName] = value;
122
+ }
123
+ return JSON.stringify(jsonObj, undefined, 2);
124
+ }
125
+ return entries
126
+ .map(({ envVarName, value }) => {
127
+ const escapedValue = escapeBashValue(value);
128
+ return `${envVarName}='${escapedValue}'`;
129
+ })
130
+ .join('\n');
131
+ };
132
+ class CiEnvReadCommand extends datadog_ci_base_1.BaseCommand {
133
+ constructor() {
134
+ super(...arguments);
135
+ this.format = clipanion_1.Option.String('--format', 'bash', {
136
+ description: 'Output format: bash (default), json, or tags',
137
+ validator: t.isEnum(['bash', 'json', 'tags']),
138
+ });
139
+ }
140
+ execute() {
141
+ return __awaiter(this, void 0, void 0, function* () {
142
+ // Merge CI-detected tags with user-provided tags (user-provided takes precedence)
143
+ const ciTags = (0, ci_1.getCISpanTags)();
144
+ const userCITags = (0, user_provided_git_1.getUserCISpanTags)();
145
+ const userGitTags = (0, user_provided_git_1.getUserGitSpanTags)();
146
+ const tags = Object.assign(Object.assign(Object.assign({}, ciTags), userCITags), userGitTags);
147
+ if (!tags || Object.keys(tags).length === 0) {
148
+ this.context.stderr.write('Warning: No CI environment detected or no CI tags found. ' +
149
+ 'This command should be run in a CI environment.\n');
150
+ return 1;
151
+ }
152
+ const output = formatOutput(tags, this.format);
153
+ this.context.stdout.write(output + '\n');
154
+ return 0;
155
+ });
156
+ }
157
+ }
158
+ exports.CiEnvReadCommand = CiEnvReadCommand;
159
+ CiEnvReadCommand.paths = [['ci-env', 'read']];
160
+ CiEnvReadCommand.usage = clipanion_1.Command.Usage({
161
+ category: 'CI Visibility',
162
+ description: 'Extract and normalize CI environment variables into `DD_CI_*` and `DD_GIT_*` format.',
163
+ details: `
164
+ This command reads CI-specific environment variables from various CI providers
165
+ and outputs them as normalized \`DD_CI_*\` and \`DD_GIT_*\` environment variables.
166
+ Supports bash (default), json, and tags output formats.
167
+ `,
168
+ examples: [
169
+ ['Set variables in current shell', 'eval "$(datadog-ci ci-env read)"'],
170
+ ['Save as .env file for Docker', 'datadog-ci ci-env read > .env'],
171
+ ['Use with shell scripts', 'datadog-ci ci-env read > ci.env && source ci.env'],
172
+ ['Get JSON output', 'datadog-ci ci-env read --format json'],
173
+ ['Get Datadog tags format', 'datadog-ci ci-env read --format tags'],
174
+ ],
175
+ });
176
+ //# sourceMappingURL=read.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read.js","sourceRoot":"","sources":["../../../src/commands/ci-env/read.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAyC;AACzC,4CAA6B;AAE7B,8DAAoD;AAEpD,yCAA8C;AAC9C,6CA8B2B;AAC3B,uEAAqF;AAErF;;GAEG;AACH,MAAM,cAAc,GAA2B;IAC7C,UAAU;IACV,CAAC,gBAAS,CAAC,EAAE,cAAc;IAC3B,CAAC,kBAAW,CAAC,EAAE,gBAAgB;IAC/B,CAAC,iBAAU,CAAC,EAAE,eAAe;IAC7B,CAAC,qBAAc,CAAC,EAAE,mBAAmB;IACrC,CAAC,mBAAY,CAA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