@invarn/cibuild 1.3.16 → 1.3.18

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 (242) hide show
  1. package/dist/cli.cjs +1 -1
  2. package/dist/src/cli.d.ts +3 -0
  3. package/dist/src/cli.d.ts.map +1 -0
  4. package/dist/src/cli.js +987 -0
  5. package/dist/src/commands/android-scanner.d.ts +32 -0
  6. package/dist/src/commands/android-scanner.d.ts.map +1 -0
  7. package/dist/src/commands/android-scanner.js +667 -0
  8. package/dist/src/commands/build.d.ts +5 -0
  9. package/dist/src/commands/build.d.ts.map +1 -0
  10. package/dist/src/commands/build.js +1096 -0
  11. package/dist/src/commands/edit.d.ts +3 -0
  12. package/dist/src/commands/edit.d.ts.map +1 -0
  13. package/dist/src/commands/edit.js +651 -0
  14. package/dist/src/commands/file-secret-collector.d.ts +37 -0
  15. package/dist/src/commands/file-secret-collector.d.ts.map +1 -0
  16. package/dist/src/commands/file-secret-collector.js +199 -0
  17. package/dist/src/commands/github-workflow.d.ts +5 -0
  18. package/dist/src/commands/github-workflow.d.ts.map +1 -0
  19. package/dist/src/commands/github-workflow.js +45 -0
  20. package/dist/src/commands/ios-scanner.d.ts +27 -0
  21. package/dist/src/commands/ios-scanner.d.ts.map +1 -0
  22. package/dist/src/commands/ios-scanner.js +337 -0
  23. package/dist/src/commands/reset.d.ts +7 -0
  24. package/dist/src/commands/reset.d.ts.map +1 -0
  25. package/dist/src/commands/reset.js +81 -0
  26. package/dist/src/commands/secrets-sync-workflow.d.ts +15 -0
  27. package/dist/src/commands/secrets-sync-workflow.d.ts.map +1 -0
  28. package/dist/src/commands/secrets-sync-workflow.js +255 -0
  29. package/dist/src/commands/secrets-upload.d.ts +21 -0
  30. package/dist/src/commands/secrets-upload.d.ts.map +1 -0
  31. package/dist/src/commands/secrets-upload.js +177 -0
  32. package/dist/src/commands/secrets-upload.test.d.ts +5 -0
  33. package/dist/src/commands/secrets-upload.test.d.ts.map +1 -0
  34. package/dist/src/commands/secrets-upload.test.js +60 -0
  35. package/dist/src/config.d.ts +3 -0
  36. package/dist/src/config.d.ts.map +1 -0
  37. package/dist/src/config.js +47 -0
  38. package/dist/src/envman/cli.d.ts +21 -0
  39. package/dist/src/envman/cli.d.ts.map +1 -0
  40. package/dist/src/envman/cli.js +240 -0
  41. package/dist/src/envman/envman.d.ts +83 -0
  42. package/dist/src/envman/envman.d.ts.map +1 -0
  43. package/dist/src/envman/envman.js +361 -0
  44. package/dist/src/envman/envman.test.d.ts +5 -0
  45. package/dist/src/envman/envman.test.d.ts.map +1 -0
  46. package/dist/src/envman/envman.test.js +236 -0
  47. package/dist/src/envman/index.d.ts +23 -0
  48. package/dist/src/envman/index.d.ts.map +1 -0
  49. package/dist/src/envman/index.js +23 -0
  50. package/dist/src/envman/types.d.ts +55 -0
  51. package/dist/src/envman/types.d.ts.map +1 -0
  52. package/dist/src/envman/types.js +12 -0
  53. package/dist/src/lib.d.ts +27 -0
  54. package/dist/src/lib.d.ts.map +1 -0
  55. package/dist/src/lib.js +32 -0
  56. package/dist/src/pipeline.d.ts +3 -0
  57. package/dist/src/pipeline.d.ts.map +1 -0
  58. package/dist/src/pipeline.js +57 -0
  59. package/dist/src/runner.d.ts +17 -0
  60. package/dist/src/runner.d.ts.map +1 -0
  61. package/dist/src/runner.js +234 -0
  62. package/dist/src/types.d.ts +58 -0
  63. package/dist/src/types.d.ts.map +1 -0
  64. package/dist/src/types.js +2 -0
  65. package/dist/src/yaml/bitrise-compat.d.ts +65 -0
  66. package/dist/src/yaml/bitrise-compat.d.ts.map +1 -0
  67. package/dist/src/yaml/bitrise-compat.js +206 -0
  68. package/dist/src/yaml/bitrise-compat.test.d.ts +5 -0
  69. package/dist/src/yaml/bitrise-compat.test.d.ts.map +1 -0
  70. package/dist/src/yaml/bitrise-compat.test.js +347 -0
  71. package/dist/src/yaml/converter.d.ts +33 -0
  72. package/dist/src/yaml/converter.d.ts.map +1 -0
  73. package/dist/src/yaml/converter.js +222 -0
  74. package/dist/src/yaml/converter.test.d.ts +5 -0
  75. package/dist/src/yaml/converter.test.d.ts.map +1 -0
  76. package/dist/src/yaml/converter.test.js +348 -0
  77. package/dist/src/yaml/e2e.test.d.ts +6 -0
  78. package/dist/src/yaml/e2e.test.d.ts.map +1 -0
  79. package/dist/src/yaml/e2e.test.js +446 -0
  80. package/dist/src/yaml/env-resolver.d.ts +120 -0
  81. package/dist/src/yaml/env-resolver.d.ts.map +1 -0
  82. package/dist/src/yaml/env-resolver.js +405 -0
  83. package/dist/src/yaml/env-resolver.test.d.ts +5 -0
  84. package/dist/src/yaml/env-resolver.test.d.ts.map +1 -0
  85. package/dist/src/yaml/env-resolver.test.js +502 -0
  86. package/dist/src/yaml/interactive-prompts.d.ts +71 -0
  87. package/dist/src/yaml/interactive-prompts.d.ts.map +1 -0
  88. package/dist/src/yaml/interactive-prompts.js +258 -0
  89. package/dist/src/yaml/missing-env-handler.d.ts +45 -0
  90. package/dist/src/yaml/missing-env-handler.d.ts.map +1 -0
  91. package/dist/src/yaml/missing-env-handler.js +64 -0
  92. package/dist/src/yaml/parser.d.ts +33 -0
  93. package/dist/src/yaml/parser.d.ts.map +1 -0
  94. package/dist/src/yaml/parser.js +145 -0
  95. package/dist/src/yaml/pipeline-with-secrets.d.ts +25 -0
  96. package/dist/src/yaml/pipeline-with-secrets.d.ts.map +1 -0
  97. package/dist/src/yaml/pipeline-with-secrets.js +76 -0
  98. package/dist/src/yaml/platform-detector.d.ts +83 -0
  99. package/dist/src/yaml/platform-detector.d.ts.map +1 -0
  100. package/dist/src/yaml/platform-detector.js +188 -0
  101. package/dist/src/yaml/platform-detector.test.d.ts +5 -0
  102. package/dist/src/yaml/platform-detector.test.d.ts.map +1 -0
  103. package/dist/src/yaml/platform-detector.test.js +414 -0
  104. package/dist/src/yaml/preflight-validation.d.ts +40 -0
  105. package/dist/src/yaml/preflight-validation.d.ts.map +1 -0
  106. package/dist/src/yaml/preflight-validation.js +152 -0
  107. package/dist/src/yaml/secrets-manager.d.ts +77 -0
  108. package/dist/src/yaml/secrets-manager.d.ts.map +1 -0
  109. package/dist/src/yaml/secrets-manager.js +219 -0
  110. package/dist/src/yaml/step-validator.d.ts +54 -0
  111. package/dist/src/yaml/step-validator.d.ts.map +1 -0
  112. package/dist/src/yaml/step-validator.js +403 -0
  113. package/dist/src/yaml/steps/android-sign.d.ts +35 -0
  114. package/dist/src/yaml/steps/android-sign.d.ts.map +1 -0
  115. package/dist/src/yaml/steps/android-sign.js +147 -0
  116. package/dist/src/yaml/steps/android-version.d.ts +26 -0
  117. package/dist/src/yaml/steps/android-version.d.ts.map +1 -0
  118. package/dist/src/yaml/steps/android-version.js +128 -0
  119. package/dist/src/yaml/steps/android-version.test.d.ts +5 -0
  120. package/dist/src/yaml/steps/android-version.test.d.ts.map +1 -0
  121. package/dist/src/yaml/steps/android-version.test.js +196 -0
  122. package/dist/src/yaml/steps/android.d.ts +95 -0
  123. package/dist/src/yaml/steps/android.d.ts.map +1 -0
  124. package/dist/src/yaml/steps/android.js +916 -0
  125. package/dist/src/yaml/steps/app-store-deploy.d.ts +48 -0
  126. package/dist/src/yaml/steps/app-store-deploy.d.ts.map +1 -0
  127. package/dist/src/yaml/steps/app-store-deploy.js +162 -0
  128. package/dist/src/yaml/steps/base.d.ts +238 -0
  129. package/dist/src/yaml/steps/base.d.ts.map +1 -0
  130. package/dist/src/yaml/steps/base.js +345 -0
  131. package/dist/src/yaml/steps/bitrise-android-tools.d.ts +26 -0
  132. package/dist/src/yaml/steps/bitrise-android-tools.d.ts.map +1 -0
  133. package/dist/src/yaml/steps/bitrise-android-tools.js +198 -0
  134. package/dist/src/yaml/steps/bitrise-android-tools.test.d.ts +5 -0
  135. package/dist/src/yaml/steps/bitrise-android-tools.test.d.ts.map +1 -0
  136. package/dist/src/yaml/steps/bitrise-android-tools.test.js +280 -0
  137. package/dist/src/yaml/steps/bitrise-apk-info.d.ts +22 -0
  138. package/dist/src/yaml/steps/bitrise-apk-info.d.ts.map +1 -0
  139. package/dist/src/yaml/steps/bitrise-apk-info.js +144 -0
  140. package/dist/src/yaml/steps/bitrise-apk-info.test.d.ts +5 -0
  141. package/dist/src/yaml/steps/bitrise-apk-info.test.d.ts.map +1 -0
  142. package/dist/src/yaml/steps/bitrise-apk-info.test.js +331 -0
  143. package/dist/src/yaml/steps/bitrise-slack.d.ts +49 -0
  144. package/dist/src/yaml/steps/bitrise-slack.d.ts.map +1 -0
  145. package/dist/src/yaml/steps/bitrise-slack.js +280 -0
  146. package/dist/src/yaml/steps/bitrise-slack.test.d.ts +5 -0
  147. package/dist/src/yaml/steps/bitrise-slack.test.d.ts.map +1 -0
  148. package/dist/src/yaml/steps/bitrise-slack.test.js +484 -0
  149. package/dist/src/yaml/steps/bitrise-ssh.d.ts +27 -0
  150. package/dist/src/yaml/steps/bitrise-ssh.d.ts.map +1 -0
  151. package/dist/src/yaml/steps/bitrise-ssh.js +134 -0
  152. package/dist/src/yaml/steps/bitrise-ssh.test.d.ts +5 -0
  153. package/dist/src/yaml/steps/bitrise-ssh.test.d.ts.map +1 -0
  154. package/dist/src/yaml/steps/bitrise-ssh.test.js +205 -0
  155. package/dist/src/yaml/steps/cache.d.ts +52 -0
  156. package/dist/src/yaml/steps/cache.d.ts.map +1 -0
  157. package/dist/src/yaml/steps/cache.js +352 -0
  158. package/dist/src/yaml/steps/fastlane.d.ts +27 -0
  159. package/dist/src/yaml/steps/fastlane.d.ts.map +1 -0
  160. package/dist/src/yaml/steps/fastlane.js +79 -0
  161. package/dist/src/yaml/steps/file.d.ts +27 -0
  162. package/dist/src/yaml/steps/file.d.ts.map +1 -0
  163. package/dist/src/yaml/steps/file.js +35 -0
  164. package/dist/src/yaml/steps/flutter.d.ts +63 -0
  165. package/dist/src/yaml/steps/flutter.d.ts.map +1 -0
  166. package/dist/src/yaml/steps/flutter.js +215 -0
  167. package/dist/src/yaml/steps/git-clone.d.ts +26 -0
  168. package/dist/src/yaml/steps/git-clone.d.ts.map +1 -0
  169. package/dist/src/yaml/steps/git-clone.js +111 -0
  170. package/dist/src/yaml/steps/google-play-deploy.d.ts +37 -0
  171. package/dist/src/yaml/steps/google-play-deploy.d.ts.map +1 -0
  172. package/dist/src/yaml/steps/google-play-deploy.js +193 -0
  173. package/dist/src/yaml/steps/google-play-deploy.test.d.ts +5 -0
  174. package/dist/src/yaml/steps/google-play-deploy.test.d.ts.map +1 -0
  175. package/dist/src/yaml/steps/google-play-deploy.test.js +310 -0
  176. package/dist/src/yaml/steps/index.d.ts +10 -0
  177. package/dist/src/yaml/steps/index.d.ts.map +1 -0
  178. package/dist/src/yaml/steps/index.js +1361 -0
  179. package/dist/src/yaml/steps/ios-deps.d.ts +43 -0
  180. package/dist/src/yaml/steps/ios-deps.d.ts.map +1 -0
  181. package/dist/src/yaml/steps/ios-deps.js +141 -0
  182. package/dist/src/yaml/steps/ios-deps.test.d.ts +5 -0
  183. package/dist/src/yaml/steps/ios-deps.test.d.ts.map +1 -0
  184. package/dist/src/yaml/steps/ios-deps.test.js +90 -0
  185. package/dist/src/yaml/steps/ios-signing.d.ts +31 -0
  186. package/dist/src/yaml/steps/ios-signing.d.ts.map +1 -0
  187. package/dist/src/yaml/steps/ios-signing.js +144 -0
  188. package/dist/src/yaml/steps/ios-version.d.ts +47 -0
  189. package/dist/src/yaml/steps/ios-version.d.ts.map +1 -0
  190. package/dist/src/yaml/steps/ios-version.js +151 -0
  191. package/dist/src/yaml/steps/linting.d.ts +47 -0
  192. package/dist/src/yaml/steps/linting.d.ts.map +1 -0
  193. package/dist/src/yaml/steps/linting.js +148 -0
  194. package/dist/src/yaml/steps/phase2.test.d.ts +6 -0
  195. package/dist/src/yaml/steps/phase2.test.d.ts.map +1 -0
  196. package/dist/src/yaml/steps/phase2.test.js +197 -0
  197. package/dist/src/yaml/steps/phase3.test.d.ts +5 -0
  198. package/dist/src/yaml/steps/phase3.test.d.ts.map +1 -0
  199. package/dist/src/yaml/steps/phase3.test.js +144 -0
  200. package/dist/src/yaml/steps/phase4.test.d.ts +5 -0
  201. package/dist/src/yaml/steps/phase4.test.d.ts.map +1 -0
  202. package/dist/src/yaml/steps/phase4.test.js +166 -0
  203. package/dist/src/yaml/steps/phase5.test.d.ts +6 -0
  204. package/dist/src/yaml/steps/phase5.test.d.ts.map +1 -0
  205. package/dist/src/yaml/steps/phase5.test.js +263 -0
  206. package/dist/src/yaml/steps/registry.d.ts +88 -0
  207. package/dist/src/yaml/steps/registry.d.ts.map +1 -0
  208. package/dist/src/yaml/steps/registry.js +125 -0
  209. package/dist/src/yaml/steps/registry.test.d.ts +5 -0
  210. package/dist/src/yaml/steps/registry.test.d.ts.map +1 -0
  211. package/dist/src/yaml/steps/registry.test.js +235 -0
  212. package/dist/src/yaml/steps/release.d.ts +50 -0
  213. package/dist/src/yaml/steps/release.d.ts.map +1 -0
  214. package/dist/src/yaml/steps/release.js +154 -0
  215. package/dist/src/yaml/steps/script.d.ts +23 -0
  216. package/dist/src/yaml/steps/script.d.ts.map +1 -0
  217. package/dist/src/yaml/steps/script.js +63 -0
  218. package/dist/src/yaml/steps/spec-validation.test.d.ts +6 -0
  219. package/dist/src/yaml/steps/spec-validation.test.d.ts.map +1 -0
  220. package/dist/src/yaml/steps/spec-validation.test.js +130 -0
  221. package/dist/src/yaml/steps/steps.test.d.ts +6 -0
  222. package/dist/src/yaml/steps/steps.test.d.ts.map +1 -0
  223. package/dist/src/yaml/steps/steps.test.js +505 -0
  224. package/dist/src/yaml/steps/test-config.d.ts +3 -0
  225. package/dist/src/yaml/steps/test-config.d.ts.map +1 -0
  226. package/dist/src/yaml/steps/test-config.js +17 -0
  227. package/dist/src/yaml/steps/xcode-new.test.d.ts +5 -0
  228. package/dist/src/yaml/steps/xcode-new.test.d.ts.map +1 -0
  229. package/dist/src/yaml/steps/xcode-new.test.js +211 -0
  230. package/dist/src/yaml/steps/xcode.d.ts +222 -0
  231. package/dist/src/yaml/steps/xcode.d.ts.map +1 -0
  232. package/dist/src/yaml/steps/xcode.js +999 -0
  233. package/dist/src/yaml/types.d.ts +68 -0
  234. package/dist/src/yaml/types.d.ts.map +1 -0
  235. package/dist/src/yaml/types.js +5 -0
  236. package/dist/src/yaml/validation-types.d.ts +96 -0
  237. package/dist/src/yaml/validation-types.d.ts.map +1 -0
  238. package/dist/src/yaml/validation-types.js +8 -0
  239. package/dist/src/yaml/yaml-updater.d.ts +24 -0
  240. package/dist/src/yaml/yaml-updater.d.ts.map +1 -0
  241. package/dist/src/yaml/yaml-updater.js +128 -0
  242. package/package.json +16 -4
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Script step implementation
3
+ */
4
+ import { BaseStepExecutor } from './base.js';
5
+ import type { StepDef, CIConfig } from '../../types.js';
6
+ import type { ValidationRequirement } from '../validation-types.js';
7
+ /**
8
+ * Inputs for script step
9
+ */
10
+ export interface ScriptInputs {
11
+ content?: string;
12
+ working_dir?: string;
13
+ runner_bin?: string;
14
+ }
15
+ /**
16
+ * Script step executor
17
+ * Executes arbitrary shell scripts with optional working directory
18
+ */
19
+ export declare class ScriptStepExecutor extends BaseStepExecutor {
20
+ getValidationRequirements(inputs: ScriptInputs, _env: Record<string, string>, _config: CIConfig): ValidationRequirement[];
21
+ execute(inputs: ScriptInputs, env: Record<string, string>, config: CIConfig): Promise<StepDef>;
22
+ }
23
+ //# sourceMappingURL=script.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"script.d.ts","sourceRoot":"","sources":["../../../../src/yaml/steps/script.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAEpE;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,qBAAa,kBAAmB,SAAQ,gBAAgB;IACtD,yBAAyB,CACvB,MAAM,EAAE,YAAY,EACpB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,OAAO,EAAE,QAAQ,GAChB,qBAAqB,EAAE;IAmBpB,OAAO,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC;CAkDrG"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Script step implementation
3
+ */
4
+ import { BaseStepExecutor } from './base.js';
5
+ /**
6
+ * Script step executor
7
+ * Executes arbitrary shell scripts with optional working directory
8
+ */
9
+ export class ScriptStepExecutor extends BaseStepExecutor {
10
+ getValidationRequirements(inputs, _env, _config) {
11
+ const requirements = [];
12
+ // content is required
13
+ requirements.push(this.requireInput('content', inputs, 'Script content to execute', 'Provide content input with your script'));
14
+ // Check runner if non-bash
15
+ const runner = this.getInput(inputs, 'runner_bin', 'bash');
16
+ if (runner !== 'bash' && !runner.includes('bash')) {
17
+ requirements.push(this.requireCommand(runner, `Script runner: ${runner}`, `Install ${runner} or use bash as the runner`));
18
+ }
19
+ return requirements;
20
+ }
21
+ async execute(inputs, env, config) {
22
+ const stepName = 'script';
23
+ // Get script content - this is required
24
+ const content = this.getRequiredInput(inputs, 'content', stepName);
25
+ // Get working directory - optional, defaults to current directory
26
+ const workingDir = this.getInput(inputs, 'working_dir', '');
27
+ // Get runner bin - optional, defaults to bash
28
+ const runnerBin = this.getInput(inputs, 'runner_bin', 'bash');
29
+ const commands = [];
30
+ // Change to working directory if specified
31
+ if (workingDir && workingDir.trim() !== '') {
32
+ commands.push(`# Changing to working directory: ${this.escapeBash(workingDir)}`);
33
+ commands.push(`cd '${this.escapeBash(workingDir)}'`);
34
+ commands.push('');
35
+ }
36
+ // Add the user's script content
37
+ commands.push('# User script content');
38
+ commands.push(content);
39
+ const script = this.createBashScriptFromCommands(commands, stepName);
40
+ // Determine the kind based on runner_bin
41
+ let kind = 'script';
42
+ if (runnerBin.includes('python')) {
43
+ kind = 'python';
44
+ }
45
+ else if (runnerBin.includes('ruby')) {
46
+ kind = 'ruby';
47
+ }
48
+ else if (runnerBin.includes('node')) {
49
+ kind = 'node';
50
+ }
51
+ // For non-bash runners, return the content directly
52
+ if (kind !== 'script') {
53
+ return {
54
+ id: '',
55
+ name: stepName,
56
+ kind,
57
+ script: content,
58
+ };
59
+ }
60
+ return this.createScriptStep(script, stepName);
61
+ }
62
+ }
63
+ //# sourceMappingURL=script.js.map
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Validates that step spec YAML files stay in sync with the step registry
3
+ * and that bitrise-map.yml is consistent.
4
+ */
5
+ export {};
6
+ //# sourceMappingURL=spec-validation.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spec-validation.test.d.ts","sourceRoot":"","sources":["../../../../src/yaml/steps/spec-validation.test.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
@@ -0,0 +1,130 @@
1
+ /**
2
+ * Validates that step spec YAML files stay in sync with the step registry
3
+ * and that bitrise-map.yml is consistent.
4
+ */
5
+ import { describe, test, expect, beforeAll } from '@jest/globals';
6
+ import { readFileSync, readdirSync } from 'node:fs';
7
+ import { resolve, dirname } from 'node:path';
8
+ import { fileURLToPath } from 'node:url';
9
+ import { load } from 'js-yaml';
10
+ import { getAvailableSteps, clearRegistry } from './registry.js';
11
+ import { initializeStepRegistry } from './index.js';
12
+ const __filename = fileURLToPath(import.meta.url);
13
+ const __dirname = dirname(__filename);
14
+ const stepsDir = resolve(__dirname, '../../../steps');
15
+ function loadSpecFiles() {
16
+ const files = readdirSync(stepsDir).filter((f) => f.endsWith('.yml') && f !== 'bitrise-map.yml');
17
+ const specs = new Map();
18
+ for (const file of files) {
19
+ const content = readFileSync(resolve(stepsDir, file), 'utf-8');
20
+ const spec = load(content);
21
+ specs.set(spec.name, spec);
22
+ }
23
+ return specs;
24
+ }
25
+ function loadBitriseMap() {
26
+ const content = readFileSync(resolve(stepsDir, 'bitrise-map.yml'), 'utf-8');
27
+ return load(content);
28
+ }
29
+ // Ensure registry is populated (other tests may clear it)
30
+ let registeredSteps;
31
+ beforeAll(() => {
32
+ clearRegistry();
33
+ initializeStepRegistry();
34
+ registeredSteps = getAvailableSteps();
35
+ });
36
+ describe('Step spec YAML files', () => {
37
+ const specs = loadSpecFiles();
38
+ test('every spec file parses with required fields', () => {
39
+ for (const [name, spec] of specs) {
40
+ expect(spec.name).toBeTruthy();
41
+ expect(spec.version).toBe('1.0.0');
42
+ expect(['all', 'ios', 'android']).toContain(spec.platform);
43
+ expect(spec.description).toBeTruthy();
44
+ expect(spec.agent_notes).toBeTruthy();
45
+ }
46
+ });
47
+ test('spec file name matches the name field inside', () => {
48
+ const files = readdirSync(stepsDir).filter((f) => f.endsWith('.yml') && f !== 'bitrise-map.yml');
49
+ for (const file of files) {
50
+ const content = readFileSync(resolve(stepsDir, file), 'utf-8');
51
+ const spec = load(content);
52
+ const expectedFileName = `${spec.name}.yml`;
53
+ expect(file).toBe(expectedFileName);
54
+ }
55
+ });
56
+ test('every registered step in the registry has a matching spec file', () => {
57
+ const specNames = Array.from(specs.keys());
58
+ for (const step of registeredSteps) {
59
+ expect(specNames).toContain(step);
60
+ }
61
+ });
62
+ test('every spec file references a step that exists in the registry', () => {
63
+ for (const [name] of specs) {
64
+ expect(registeredSteps).toContain(name);
65
+ }
66
+ });
67
+ test('spec inputs have descriptions', () => {
68
+ for (const [name, spec] of specs) {
69
+ if (!spec.inputs)
70
+ continue;
71
+ for (const [inputName, input] of Object.entries(spec.inputs)) {
72
+ expect(input.description).toBeTruthy();
73
+ }
74
+ }
75
+ });
76
+ test('spec outputs have names and descriptions', () => {
77
+ for (const [name, spec] of specs) {
78
+ if (!spec.outputs)
79
+ continue;
80
+ for (const output of spec.outputs) {
81
+ expect(output.name).toBeTruthy();
82
+ expect(output.description).toBeTruthy();
83
+ }
84
+ }
85
+ });
86
+ test('spec examples are present', () => {
87
+ for (const [name, spec] of specs) {
88
+ expect(spec.example).toBeTruthy();
89
+ }
90
+ });
91
+ });
92
+ describe('Bitrise migration map', () => {
93
+ const bitriseMap = loadBitriseMap();
94
+ const specs = loadSpecFiles();
95
+ test('parses correctly with required fields', () => {
96
+ expect(bitriseMap.mappings).toBeDefined();
97
+ expect(Array.isArray(bitriseMap.mappings)).toBe(true);
98
+ expect(bitriseMap.mappings.length).toBeGreaterThan(0);
99
+ for (const mapping of bitriseMap.mappings) {
100
+ expect(mapping.bitrise_step).toBeTruthy();
101
+ expect(mapping.bitrise_version_ported).toBeTruthy();
102
+ expect(mapping.cibuild_step).toBeTruthy();
103
+ expect(mapping.notes).toBeTruthy();
104
+ }
105
+ });
106
+ test('every cibuild_step references a step that exists in specs', () => {
107
+ const specNames = Array.from(specs.keys());
108
+ for (const mapping of bitriseMap.mappings) {
109
+ // cibuild_step is formatted as "step-name@1.0.0"
110
+ const stepName = mapping.cibuild_step.replace(/@.*$/, '');
111
+ expect(specNames).toContain(stepName);
112
+ }
113
+ });
114
+ test('all cibuild_step references use @1.0.0 version', () => {
115
+ for (const mapping of bitriseMap.mappings) {
116
+ expect(mapping.cibuild_step).toMatch(/@1\.0\.0$/);
117
+ }
118
+ });
119
+ test('bitrise step aliases are unique', () => {
120
+ const bitriseNames = bitriseMap.mappings.map((m) => m.bitrise_step);
121
+ const uniqueNames = new Set(bitriseNames);
122
+ expect(uniqueNames.size).toBe(bitriseNames.length);
123
+ });
124
+ test('cibuild step targets are unique (no duplicate mappings)', () => {
125
+ const cibuildSteps = bitriseMap.mappings.map((m) => m.cibuild_step);
126
+ const uniqueSteps = new Set(cibuildSteps);
127
+ expect(uniqueSteps.size).toBe(cibuildSteps.length);
128
+ });
129
+ });
130
+ //# sourceMappingURL=spec-validation.test.js.map
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Integration tests for step implementations
3
+ * Tests each step executor with sample inputs
4
+ */
5
+ export {};
6
+ //# sourceMappingURL=steps.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"steps.test.d.ts","sourceRoot":"","sources":["../../../../src/yaml/steps/steps.test.ts"],"names":[],"mappings":"AAAA;;;GAGG"}