@spree/cli 1.2.0 → 2.0.0-beta.2

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 (292) hide show
  1. package/README.md +167 -44
  2. package/dist/index.js +136 -6
  3. package/package.json +51 -77
  4. package/bin/dev +0 -17
  5. package/bin/dev.cmd +0 -3
  6. package/bin/run +0 -10
  7. package/bin/run.cmd +0 -3
  8. package/dist/commands/new/app.d.ts +0 -11
  9. package/dist/commands/new/app.d.ts.map +0 -1
  10. package/dist/commands/new/app.js +0 -164
  11. package/dist/commands/new/app.js.map +0 -1
  12. package/dist/commands/start/app.d.ts +0 -9
  13. package/dist/commands/start/app.d.ts.map +0 -1
  14. package/dist/commands/start/app.js +0 -42
  15. package/dist/commands/start/app.js.map +0 -1
  16. package/dist/domains/async/index.d.ts +0 -2
  17. package/dist/domains/async/index.d.ts.map +0 -1
  18. package/dist/domains/async/index.js +0 -9
  19. package/dist/domains/async/index.js.map +0 -1
  20. package/dist/domains/async/wait.d.ts +0 -7
  21. package/dist/domains/async/wait.d.ts.map +0 -1
  22. package/dist/domains/async/wait.js +0 -13
  23. package/dist/domains/async/wait.js.map +0 -1
  24. package/dist/domains/build/BuildScript.d.ts +0 -3
  25. package/dist/domains/build/BuildScript.d.ts.map +0 -1
  26. package/dist/domains/build/BuildScript.js +0 -3
  27. package/dist/domains/build/BuildScript.js.map +0 -1
  28. package/dist/domains/build/fetchBuildScript.d.ts +0 -4
  29. package/dist/domains/build/fetchBuildScript.d.ts.map +0 -1
  30. package/dist/domains/build/fetchBuildScript.js +0 -14
  31. package/dist/domains/build/fetchBuildScript.js.map +0 -1
  32. package/dist/domains/build/getBuildScript.d.ts +0 -4
  33. package/dist/domains/build/getBuildScript.d.ts.map +0 -1
  34. package/dist/domains/build/getBuildScript.js +0 -8
  35. package/dist/domains/build/getBuildScript.js.map +0 -1
  36. package/dist/domains/build/index.d.ts +0 -4
  37. package/dist/domains/build/index.d.ts.map +0 -1
  38. package/dist/domains/build/index.js +0 -12
  39. package/dist/domains/build/index.js.map +0 -1
  40. package/dist/domains/constants/api.d.ts +0 -2
  41. package/dist/domains/constants/api.d.ts.map +0 -1
  42. package/dist/domains/constants/api.js +0 -5
  43. package/dist/domains/constants/api.js.map +0 -1
  44. package/dist/domains/constants/index.d.ts +0 -2
  45. package/dist/domains/constants/index.d.ts.map +0 -1
  46. package/dist/domains/constants/index.js +0 -6
  47. package/dist/domains/constants/index.js.map +0 -1
  48. package/dist/domains/dependencies/ComparisonOperator.d.ts +0 -3
  49. package/dist/domains/dependencies/ComparisonOperator.d.ts.map +0 -1
  50. package/dist/domains/dependencies/ComparisonOperator.js +0 -3
  51. package/dist/domains/dependencies/ComparisonOperator.js.map +0 -1
  52. package/dist/domains/dependencies/ComparisonResult.d.ts +0 -3
  53. package/dist/domains/dependencies/ComparisonResult.d.ts.map +0 -1
  54. package/dist/domains/dependencies/ComparisonResult.js +0 -3
  55. package/dist/domains/dependencies/ComparisonResult.js.map +0 -1
  56. package/dist/domains/dependencies/VersionCheckResult.d.ts +0 -7
  57. package/dist/domains/dependencies/VersionCheckResult.d.ts.map +0 -1
  58. package/dist/domains/dependencies/VersionCheckResult.js +0 -3
  59. package/dist/domains/dependencies/VersionCheckResult.js.map +0 -1
  60. package/dist/domains/dependencies/VersionCondition.d.ts +0 -7
  61. package/dist/domains/dependencies/VersionCondition.d.ts.map +0 -1
  62. package/dist/domains/dependencies/VersionCondition.js +0 -3
  63. package/dist/domains/dependencies/VersionCondition.js.map +0 -1
  64. package/dist/domains/dependencies/checkDependencies.d.ts +0 -4
  65. package/dist/domains/dependencies/checkDependencies.d.ts.map +0 -1
  66. package/dist/domains/dependencies/checkDependencies.js +0 -25
  67. package/dist/domains/dependencies/checkDependencies.js.map +0 -1
  68. package/dist/domains/dependencies/checkVersionByShellCommand.d.ts +0 -4
  69. package/dist/domains/dependencies/checkVersionByShellCommand.d.ts.map +0 -1
  70. package/dist/domains/dependencies/checkVersionByShellCommand.js +0 -50
  71. package/dist/domains/dependencies/checkVersionByShellCommand.js.map +0 -1
  72. package/dist/domains/dependencies/compareVersions.d.ts +0 -4
  73. package/dist/domains/dependencies/compareVersions.d.ts.map +0 -1
  74. package/dist/domains/dependencies/compareVersions.js +0 -27
  75. package/dist/domains/dependencies/compareVersions.js.map +0 -1
  76. package/dist/domains/dependencies/extractVersion.d.ts +0 -3
  77. package/dist/domains/dependencies/extractVersion.d.ts.map +0 -1
  78. package/dist/domains/dependencies/extractVersion.js +0 -12
  79. package/dist/domains/dependencies/extractVersion.js.map +0 -1
  80. package/dist/domains/dependencies/parseVersionCondition.d.ts +0 -4
  81. package/dist/domains/dependencies/parseVersionCondition.d.ts.map +0 -1
  82. package/dist/domains/dependencies/parseVersionCondition.js +0 -47
  83. package/dist/domains/dependencies/parseVersionCondition.js.map +0 -1
  84. package/dist/domains/dependencies/validate/validateDependencies.d.ts +0 -4
  85. package/dist/domains/dependencies/validate/validateDependencies.d.ts.map +0 -1
  86. package/dist/domains/dependencies/validate/validateDependencies.js +0 -35
  87. package/dist/domains/dependencies/validate/validateDependencies.js.map +0 -1
  88. package/dist/domains/directory/createDirectory.d.ts +0 -3
  89. package/dist/domains/directory/createDirectory.d.ts.map +0 -1
  90. package/dist/domains/directory/createDirectory.js +0 -19
  91. package/dist/domains/directory/createDirectory.js.map +0 -1
  92. package/dist/domains/directory/existsDirectory.d.ts +0 -3
  93. package/dist/domains/directory/existsDirectory.d.ts.map +0 -1
  94. package/dist/domains/directory/existsDirectory.js +0 -16
  95. package/dist/domains/directory/existsDirectory.js.map +0 -1
  96. package/dist/domains/directory/getDirectory.d.ts +0 -4
  97. package/dist/domains/directory/getDirectory.d.ts.map +0 -1
  98. package/dist/domains/directory/getDirectory.js +0 -28
  99. package/dist/domains/directory/getDirectory.js.map +0 -1
  100. package/dist/domains/directory/index.d.ts +0 -5
  101. package/dist/domains/directory/index.d.ts.map +0 -1
  102. package/dist/domains/directory/index.js +0 -15
  103. package/dist/domains/directory/index.js.map +0 -1
  104. package/dist/domains/directory/removeFileOrDirectory.d.ts +0 -3
  105. package/dist/domains/directory/removeFileOrDirectory.d.ts.map +0 -1
  106. package/dist/domains/directory/removeFileOrDirectory.js +0 -8
  107. package/dist/domains/directory/removeFileOrDirectory.js.map +0 -1
  108. package/dist/domains/error/index.d.ts +0 -2
  109. package/dist/domains/error/index.d.ts.map +0 -1
  110. package/dist/domains/error/index.js +0 -9
  111. package/dist/domains/error/index.js.map +0 -1
  112. package/dist/domains/error/resolveToError.d.ts +0 -4
  113. package/dist/domains/error/resolveToError.d.ts.map +0 -1
  114. package/dist/domains/error/resolveToError.js +0 -16
  115. package/dist/domains/error/resolveToError.js.map +0 -1
  116. package/dist/domains/git-repository/cloneGitRepository.d.ts +0 -9
  117. package/dist/domains/git-repository/cloneGitRepository.d.ts.map +0 -1
  118. package/dist/domains/git-repository/cloneGitRepository.js +0 -35
  119. package/dist/domains/git-repository/cloneGitRepository.js.map +0 -1
  120. package/dist/domains/git-repository/index.d.ts +0 -3
  121. package/dist/domains/git-repository/index.d.ts.map +0 -1
  122. package/dist/domains/git-repository/index.js +0 -11
  123. package/dist/domains/git-repository/index.js.map +0 -1
  124. package/dist/domains/git-repository/terminateGitRepository.d.ts +0 -4
  125. package/dist/domains/git-repository/terminateGitRepository.d.ts.map +0 -1
  126. package/dist/domains/git-repository/terminateGitRepository.js +0 -11
  127. package/dist/domains/git-repository/terminateGitRepository.js.map +0 -1
  128. package/dist/domains/git-repository-url/extractSuggestionFromError.d.ts +0 -4
  129. package/dist/domains/git-repository-url/extractSuggestionFromError.d.ts.map +0 -1
  130. package/dist/domains/git-repository-url/extractSuggestionFromError.js +0 -18
  131. package/dist/domains/git-repository-url/extractSuggestionFromError.js.map +0 -1
  132. package/dist/domains/git-repository-url/getGitRepositoryURL.d.ts +0 -4
  133. package/dist/domains/git-repository-url/getGitRepositoryURL.d.ts.map +0 -1
  134. package/dist/domains/git-repository-url/getGitRepositoryURL.js +0 -42
  135. package/dist/domains/git-repository-url/getGitRepositoryURL.js.map +0 -1
  136. package/dist/domains/git-repository-url/index.d.ts +0 -4
  137. package/dist/domains/git-repository-url/index.d.ts.map +0 -1
  138. package/dist/domains/git-repository-url/index.js +0 -13
  139. package/dist/domains/git-repository-url/index.js.map +0 -1
  140. package/dist/domains/git-repository-url/validateGitRepositoryURL.d.ts +0 -5
  141. package/dist/domains/git-repository-url/validateGitRepositoryURL.d.ts.map +0 -1
  142. package/dist/domains/git-repository-url/validateGitRepositoryURL.js +0 -21
  143. package/dist/domains/git-repository-url/validateGitRepositoryURL.js.map +0 -1
  144. package/dist/domains/integration/Integration.d.ts +0 -6
  145. package/dist/domains/integration/Integration.d.ts.map +0 -1
  146. package/dist/domains/integration/Integration.js +0 -3
  147. package/dist/domains/integration/Integration.js.map +0 -1
  148. package/dist/domains/integration/fetchIntegrations.d.ts +0 -4
  149. package/dist/domains/integration/fetchIntegrations.d.ts.map +0 -1
  150. package/dist/domains/integration/fetchIntegrations.js +0 -17
  151. package/dist/domains/integration/fetchIntegrations.js.map +0 -1
  152. package/dist/domains/integration/getIntegration.d.ts +0 -9
  153. package/dist/domains/integration/getIntegration.d.ts.map +0 -1
  154. package/dist/domains/integration/getIntegration.js +0 -51
  155. package/dist/domains/integration/getIntegration.js.map +0 -1
  156. package/dist/domains/integration/index.d.ts +0 -4
  157. package/dist/domains/integration/index.d.ts.map +0 -1
  158. package/dist/domains/integration/index.js +0 -11
  159. package/dist/domains/integration/index.js.map +0 -1
  160. package/dist/domains/math/identity.d.ts +0 -8
  161. package/dist/domains/math/identity.d.ts.map +0 -1
  162. package/dist/domains/math/identity.js +0 -10
  163. package/dist/domains/math/identity.js.map +0 -1
  164. package/dist/domains/math/index.d.ts +0 -2
  165. package/dist/domains/math/index.d.ts.map +0 -1
  166. package/dist/domains/math/index.js +0 -9
  167. package/dist/domains/math/index.js.map +0 -1
  168. package/dist/domains/module/Module.d.ts +0 -10
  169. package/dist/domains/module/Module.d.ts.map +0 -1
  170. package/dist/domains/module/Module.js +0 -3
  171. package/dist/domains/module/Module.js.map +0 -1
  172. package/dist/domains/module/Runner.d.ts +0 -11
  173. package/dist/domains/module/Runner.d.ts.map +0 -1
  174. package/dist/domains/module/Runner.js +0 -3
  175. package/dist/domains/module/Runner.js.map +0 -1
  176. package/dist/domains/module/Template.d.ts +0 -18
  177. package/dist/domains/module/Template.d.ts.map +0 -1
  178. package/dist/domains/module/Template.js +0 -3
  179. package/dist/domains/module/Template.js.map +0 -1
  180. package/dist/domains/module/index.d.ts +0 -3
  181. package/dist/domains/module/index.d.ts.map +0 -1
  182. package/dist/domains/module/index.js +0 -5
  183. package/dist/domains/module/index.js.map +0 -1
  184. package/dist/domains/project-name/formatToProjectName.d.ts +0 -4
  185. package/dist/domains/project-name/formatToProjectName.d.ts.map +0 -1
  186. package/dist/domains/project-name/formatToProjectName.js +0 -8
  187. package/dist/domains/project-name/formatToProjectName.js.map +0 -1
  188. package/dist/domains/project-name/getProjectName.d.ts +0 -4
  189. package/dist/domains/project-name/getProjectName.d.ts.map +0 -1
  190. package/dist/domains/project-name/getProjectName.js +0 -33
  191. package/dist/domains/project-name/getProjectName.js.map +0 -1
  192. package/dist/domains/project-name/index.d.ts +0 -3
  193. package/dist/domains/project-name/index.d.ts.map +0 -1
  194. package/dist/domains/project-name/index.js +0 -11
  195. package/dist/domains/project-name/index.js.map +0 -1
  196. package/dist/domains/run/RunScript.d.ts +0 -3
  197. package/dist/domains/run/RunScript.d.ts.map +0 -1
  198. package/dist/domains/run/RunScript.js +0 -3
  199. package/dist/domains/run/RunScript.js.map +0 -1
  200. package/dist/domains/run/getRunScript.d.ts +0 -4
  201. package/dist/domains/run/getRunScript.d.ts.map +0 -1
  202. package/dist/domains/run/getRunScript.js +0 -14
  203. package/dist/domains/run/getRunScript.js.map +0 -1
  204. package/dist/domains/run/index.d.ts +0 -3
  205. package/dist/domains/run/index.d.ts.map +0 -1
  206. package/dist/domains/run/index.js +0 -10
  207. package/dist/domains/run/index.js.map +0 -1
  208. package/dist/domains/spree/Options.d.ts +0 -6
  209. package/dist/domains/spree/Options.d.ts.map +0 -1
  210. package/dist/domains/spree/Options.js +0 -3
  211. package/dist/domains/spree/Options.js.map +0 -1
  212. package/dist/domains/spree/Spree.d.ts +0 -6
  213. package/dist/domains/spree/Spree.d.ts.map +0 -1
  214. package/dist/domains/spree/Spree.js +0 -3
  215. package/dist/domains/spree/Spree.js.map +0 -1
  216. package/dist/domains/spree/SpreeChoice.d.ts +0 -7
  217. package/dist/domains/spree/SpreeChoice.d.ts.map +0 -1
  218. package/dist/domains/spree/SpreeChoice.js +0 -3
  219. package/dist/domains/spree/SpreeChoice.js.map +0 -1
  220. package/dist/domains/spree/UserOptions.d.ts +0 -6
  221. package/dist/domains/spree/UserOptions.d.ts.map +0 -1
  222. package/dist/domains/spree/UserOptions.js +0 -3
  223. package/dist/domains/spree/UserOptions.js.map +0 -1
  224. package/dist/domains/spree/buildSpreeChoices.d.ts +0 -7
  225. package/dist/domains/spree/buildSpreeChoices.d.ts.map +0 -1
  226. package/dist/domains/spree/buildSpreeChoices.js +0 -28
  227. package/dist/domains/spree/buildSpreeChoices.js.map +0 -1
  228. package/dist/domains/spree/fetchSpreeTemplates.d.ts +0 -4
  229. package/dist/domains/spree/fetchSpreeTemplates.d.ts.map +0 -1
  230. package/dist/domains/spree/fetchSpreeTemplates.js +0 -20
  231. package/dist/domains/spree/fetchSpreeTemplates.js.map +0 -1
  232. package/dist/domains/spree/getSpree.d.ts +0 -6
  233. package/dist/domains/spree/getSpree.d.ts.map +0 -1
  234. package/dist/domains/spree/getSpree.js +0 -24
  235. package/dist/domains/spree/getSpree.js.map +0 -1
  236. package/dist/domains/spree/index.d.ts +0 -8
  237. package/dist/domains/spree/index.d.ts.map +0 -1
  238. package/dist/domains/spree/index.js +0 -17
  239. package/dist/domains/spree/index.js.map +0 -1
  240. package/dist/domains/theme/index.d.ts +0 -2
  241. package/dist/domains/theme/index.d.ts.map +0 -1
  242. package/dist/domains/theme/index.js +0 -9
  243. package/dist/domains/theme/index.js.map +0 -1
  244. package/dist/domains/theme/inheritTheme.d.ts +0 -7
  245. package/dist/domains/theme/inheritTheme.d.ts.map +0 -1
  246. package/dist/domains/theme/inheritTheme.js +0 -38
  247. package/dist/domains/theme/inheritTheme.js.map +0 -1
  248. package/dist/domains/theme/processMagicComments.d.ts +0 -3
  249. package/dist/domains/theme/processMagicComments.d.ts.map +0 -1
  250. package/dist/domains/theme/processMagicComments.js +0 -14
  251. package/dist/domains/theme/processMagicComments.js.map +0 -1
  252. package/dist/domains/theme/removeDevCommentBlocks.d.ts +0 -3
  253. package/dist/domains/theme/removeDevCommentBlocks.d.ts.map +0 -1
  254. package/dist/domains/theme/removeDevCommentBlocks.js +0 -7
  255. package/dist/domains/theme/removeDevCommentBlocks.js.map +0 -1
  256. package/dist/domains/theme/uncommentProjectOnlyBlocks.d.ts +0 -3
  257. package/dist/domains/theme/uncommentProjectOnlyBlocks.d.ts.map +0 -1
  258. package/dist/domains/theme/uncommentProjectOnlyBlocks.js +0 -7
  259. package/dist/domains/theme/uncommentProjectOnlyBlocks.js.map +0 -1
  260. package/dist/domains/typescript/Diff.d.ts +0 -3
  261. package/dist/domains/typescript/Diff.d.ts.map +0 -1
  262. package/dist/domains/typescript/Diff.js +0 -3
  263. package/dist/domains/typescript/Diff.js.map +0 -1
  264. package/dist/domains/typescript/index.d.ts +0 -3
  265. package/dist/domains/typescript/index.d.ts.map +0 -1
  266. package/dist/domains/typescript/index.js +0 -10
  267. package/dist/domains/typescript/index.js.map +0 -1
  268. package/dist/domains/typescript/notEmpty.d.ts +0 -3
  269. package/dist/domains/typescript/notEmpty.d.ts.map +0 -1
  270. package/dist/domains/typescript/notEmpty.js +0 -7
  271. package/dist/domains/typescript/notEmpty.js.map +0 -1
  272. package/dist/domains/variables/Variables.d.ts +0 -9
  273. package/dist/domains/variables/Variables.d.ts.map +0 -1
  274. package/dist/domains/variables/Variables.js +0 -3
  275. package/dist/domains/variables/Variables.js.map +0 -1
  276. package/dist/domains/variables/index.d.ts +0 -3
  277. package/dist/domains/variables/index.d.ts.map +0 -1
  278. package/dist/domains/variables/index.js +0 -10
  279. package/dist/domains/variables/index.js.map +0 -1
  280. package/dist/domains/variables/useVariables.d.ts +0 -7
  281. package/dist/domains/variables/useVariables.d.ts.map +0 -1
  282. package/dist/domains/variables/useVariables.js +0 -19
  283. package/dist/domains/variables/useVariables.js.map +0 -1
  284. package/dist/index.d.ts +0 -2
  285. package/dist/index.d.ts.map +0 -1
  286. package/dist/index.js.map +0 -1
  287. package/dist/infrastructures/i18next.d.ts +0 -2
  288. package/dist/infrastructures/i18next.d.ts.map +0 -1
  289. package/dist/infrastructures/i18next.js +0 -23
  290. package/dist/infrastructures/i18next.js.map +0 -1
  291. package/locales/en-US/translation.json +0 -58
  292. package/oclif.manifest.json +0 -1
package/package.json CHANGED
@@ -1,87 +1,61 @@
1
1
  {
2
2
  "name": "@spree/cli",
3
- "version": "1.2.0",
4
- "description": "Spree's CLI that allows for setting up the store with selected backend template and front-end integration",
5
- "bin": "./bin/run",
6
- "homepage": "https://github.com/upsidelab/spree_cli_internal",
7
- "license": "MIT",
8
- "main": "dist/index.js",
9
- "repository": "upsidelab/spree_cli_internal",
3
+ "version": "2.0.0-beta.2",
4
+ "description": "CLI for managing Spree Commerce projects",
5
+ "type": "module",
6
+ "bin": {
7
+ "spree": "./dist/index.js"
8
+ },
10
9
  "files": [
11
- "/bin",
12
- "/dist",
13
- "/locales",
14
- "/npm-shrinkwrap.json",
15
- "/oclif.manifest.json"
10
+ "dist",
11
+ "README.md"
16
12
  ],
17
- "dependencies": {
18
- "@oclif/core": "^1.7.0",
19
- "@oclif/plugin-help": "^5.1.12",
20
- "@oclif/plugin-plugins": "^2.1.0",
21
- "@oclif/plugin-update": "^3.0.0",
22
- "@oclif/plugin-warn-if-update-available": "^2.0.4",
23
- "@vue-storefront/theme-utilities": "^0.1.7",
24
- "execa": "^5.1.1",
25
- "i18next": "^21.6.16",
26
- "i18next-fs-backend": "^1.1.4",
27
- "inquirer": "^8.2.4",
28
- "isomorphic-git": "^1.17.1",
29
- "node-fetch": "^2.6.7",
30
- "os-locale": "^5.0.0",
31
- "picocolors": "^1.0.0",
32
- "reasonable-filename": "^1.2.0",
33
- "rimraf": "^3.0.2",
34
- "tslib": "^2.4.0"
13
+ "scripts": {
14
+ "build": "tsup",
15
+ "dev": "tsup --watch",
16
+ "test": "vitest run",
17
+ "typecheck": "tsc --noEmit",
18
+ "clean": "rm -rf dist",
19
+ "prepublishOnly": "npm run build",
20
+ "changeset": "changeset",
21
+ "version": "changeset version",
22
+ "release": "npm run build && changeset publish"
35
23
  },
36
- "devDependencies": {
37
- "@babel/preset-typescript": "^7.18.6",
38
- "@types/i18next-fs-backend": "^1.1.2",
39
- "@types/inquirer": "^8.2.1",
40
- "@types/jest": "^28.1.4",
41
- "@types/mock-fs": "^4.13.1",
42
- "@types/node": "^12.20.50",
43
- "@types/node-fetch": "^2.6.1",
44
- "@types/rimraf": "^3.0.2",
45
- "@typescript-eslint/eslint-plugin": "^5.30.0",
46
- "@typescript-eslint/parser": "^5.30.0",
47
- "eslint": "^7.32.0",
48
- "globby": "^11.1.0",
49
- "jest": "^28.1.2",
50
- "mock-fs": "^5.1.2",
51
- "mock-stdin": "^1.0.0",
52
- "oclif": "^3.0.1",
53
- "ts-jest": "^28.0.5",
54
- "ts-node": "^10.7.0",
55
- "typescript": "^4.9.3"
24
+ "keywords": [
25
+ "spree",
26
+ "commerce",
27
+ "ecommerce",
28
+ "cli",
29
+ "docker",
30
+ "typescript"
31
+ ],
32
+ "author": "Vendo Connect Inc.",
33
+ "license": "MIT",
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "https://github.com/spree/spree.git",
37
+ "directory": "packages/cli"
56
38
  },
57
- "oclif": {
58
- "bin": "@spree/cli",
59
- "dirname": "@spree/cli",
60
- "plugins": [
61
- "@oclif/plugin-help",
62
- "@oclif/plugin-update",
63
- "@oclif/plugin-plugins",
64
- "@oclif/plugin-warn-if-update-available"
65
- ],
66
- "commands": "./dist/commands",
67
- "topicSeparator": " "
39
+ "homepage": "https://spreecommerce.org",
40
+ "bugs": {
41
+ "url": "https://github.com/spree/spree/issues"
68
42
  },
69
- "scripts": {
70
- "build": "rimraf dist && tsc --project ./tsconfig.build.json",
71
- "lint": "eslint . --ext .ts --config .eslintrc.js",
72
- "postpack": "rimraf oclif.manifest.json",
73
- "posttest": "yarn lint",
74
- "prepack": "yarn build && oclif manifest",
75
- "docs": "oclif readme",
76
- "test": "jest --rootDir .",
77
- "version": "oclif readme && git add README.md"
43
+ "dependencies": {
44
+ "@clack/prompts": "^0.10.0",
45
+ "commander": "^13.1.0",
46
+ "console-table-printer": "^2.12.0",
47
+ "execa": "^9.5.2",
48
+ "picocolors": "^1.1.1"
78
49
  },
79
- "engines": {
80
- "node": ">=14 <=16"
50
+ "devDependencies": {
51
+ "@changesets/changelog-github": "^0.5.2",
52
+ "@changesets/cli": "^2.29.8",
53
+ "@types/node": "^20.0.0",
54
+ "tsup": "^8.0.0",
55
+ "typescript": "^5.3.0",
56
+ "vitest": "^4.0.18"
81
57
  },
82
- "bugs": "https://github.com/upsidelab/spree_cli_internal/issues",
83
- "keywords": [
84
- "oclif"
85
- ],
86
- "types": "dist/index.d.ts"
58
+ "engines": {
59
+ "node": ">=20"
60
+ }
87
61
  }
package/bin/dev DELETED
@@ -1,17 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const oclif = require('@oclif/core');
4
-
5
- const path = require('path');
6
- const project = path.join(__dirname, '..', 'tsconfig.json');
7
-
8
- // In dev mode -> use ts-node and dev plugins
9
- process.env.NODE_ENV = 'development';
10
-
11
- require('ts-node').register({ project });
12
-
13
- // In dev mode, always show stack traces
14
- oclif.settings.debug = true;
15
-
16
- // Start the CLI
17
- oclif.run().then(oclif.flush).catch(oclif.Errors.handle);
package/bin/dev.cmd DELETED
@@ -1,3 +0,0 @@
1
- @echo off
2
-
3
- node "%~dp0\dev" %*
package/bin/run DELETED
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const oclif = require('@oclif/core');
4
-
5
- const { setupI18Next } = require('../dist/infrastructures/i18next');
6
-
7
- setupI18Next()
8
- .then(() => oclif.run())
9
- .then(require('@oclif/core/flush'))
10
- .catch(require('@oclif/core/handle'));
package/bin/run.cmd DELETED
@@ -1,3 +0,0 @@
1
- @echo off
2
-
3
- node "%~dp0\run" %*
@@ -1,11 +0,0 @@
1
- import { Command } from '@oclif/core';
2
- export default class NewApp extends Command {
3
- static description: string;
4
- static examples: string[];
5
- static flags: {
6
- beta: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
7
- };
8
- static args: never[];
9
- run(): Promise<void>;
10
- }
11
- //# sourceMappingURL=app.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/commands/new/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAgB,MAAM,aAAa,CAAC;AA6BpD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,OAAO;IACzC,OAAgB,WAAW,SAAoC;IAE/D,OAAgB,QAAQ,WAA2C;IAEnE,OAAgB,KAAK;;MAInB;IAEF,OAAgB,IAAI,UAAM;IAEpB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAmJ3B"}
@@ -1,164 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const core_1 = require("@oclif/core");
5
- const fs = tslib_1.__importStar(require("fs"));
6
- const os_1 = tslib_1.__importDefault(require("os"));
7
- const color_1 = tslib_1.__importDefault(require("@oclif/color"));
8
- const i18next_1 = require("i18next");
9
- const path = tslib_1.__importStar(require("path"));
10
- const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
11
- const child_process_1 = require("child_process");
12
- const project_name_1 = require("../../domains/project-name");
13
- const git_repository_1 = require("../../domains/git-repository");
14
- const directory_1 = require("../../domains/directory");
15
- const spree_1 = require("../../domains/spree");
16
- const integration_1 = require("../../domains/integration");
17
- const build_1 = require("../../domains/build");
18
- const run_1 = require("../../domains/run");
19
- const variables_1 = require("../../domains/variables");
20
- const typescript_1 = require("../../domains/typescript");
21
- const existsDirectory_1 = tslib_1.__importDefault(require("../../domains/directory/existsDirectory"));
22
- const directory_2 = require("../../domains/directory");
23
- const validateDependencies_1 = tslib_1.__importDefault(require("../../domains/dependencies/validate/validateDependencies"));
24
- class NewApp extends core_1.Command {
25
- async run() {
26
- const { flags } = await this.parse(NewApp);
27
- const variables = await (async () => {
28
- const projectName = await (0, project_name_1.getProjectName)((0, i18next_1.t)('command.new_app.input.project_name'));
29
- return (0, variables_1.useVariables)({ projectName });
30
- })();
31
- const projectDir = path.resolve(variables.projectName);
32
- const { samples, ...spree } = await (0, spree_1.getSpree)({
33
- message: (0, i18next_1.t)('command.new_app.input.spree'),
34
- includeBeta: flags.beta,
35
- platform: os_1.default.platform()
36
- });
37
- const { samples: withSamples } = await inquirer_1.default.prompt({
38
- message: (0, i18next_1.t)('command.new_app.input.samples'),
39
- type: 'confirm',
40
- name: 'samples'
41
- });
42
- const integration = await (0, integration_1.getIntegration)({
43
- message: (0, i18next_1.t)('command.new_app.input.integration'),
44
- customIntegrationRepositoryMessage: (0, i18next_1.t)('command.new_app.input.custom_integration_repository')
45
- });
46
- const modules = [
47
- {
48
- template: withSamples && samples ? {
49
- ...spree,
50
- ...samples
51
- } : { ...spree },
52
- path: variables.pathBackend,
53
- buildOptions: { encoding: 'utf-8', stdio: 'inherit', shell: true }
54
- },
55
- {
56
- template: integration,
57
- path: variables.pathIntegration,
58
- buildOptions: { stdio: 'inherit', shell: true }
59
- }
60
- ].map((m) => ({
61
- ...m,
62
- template: {
63
- ...m.template,
64
- runScriptLocalPath: m.template.runScriptURL ? `run-${m.path}` : undefined
65
- },
66
- absolutePath: `${projectDir}/${m.path}`
67
- }));
68
- const mountGitRepository = async (dir, gitRepositoryURL, gitRef) => {
69
- if (await (0, existsDirectory_1.default)(dir)) {
70
- await (0, directory_2.removeFileOrDirectory)(dir);
71
- }
72
- await (0, git_repository_1.cloneGitRepository)({ dir, gitRepositoryURL, gitRef });
73
- await (0, git_repository_1.terminateGitRepository)(projectDir);
74
- };
75
- const repositoriesToMount = [];
76
- await (0, validateDependencies_1.default)(modules);
77
- for (const { absolutePath, template: { gitRepositoryURL, name, gitRef } } of modules) {
78
- if (!gitRepositoryURL)
79
- continue;
80
- const gitRefWithDefault = gitRef || 'main';
81
- const shouldCreateDirectory = await (0, directory_1.createDirectory)(absolutePath);
82
- const fn = shouldCreateDirectory ? (async () => await mountGitRepository(absolutePath, gitRepositoryURL, gitRefWithDefault)) : undefined;
83
- repositoriesToMount.push({ name, fn });
84
- }
85
- for (const { name, fn } of repositoriesToMount) {
86
- if (fn) {
87
- await fn();
88
- }
89
- else {
90
- this.log((0, i18next_1.t)('command.new_app.message.skipping', { name }));
91
- }
92
- }
93
- this.log('');
94
- this.log((0, i18next_1.t)('command.new_app.message.success', { projectName: variables.projectName }));
95
- this.log('');
96
- const logModuleDocumentation = ({ template: { documentationURL, name } }) => {
97
- if (!documentationURL)
98
- return;
99
- this.log((0, i18next_1.t)('command.new_app.message.configure', { documentationURL, name }));
100
- this.log('');
101
- };
102
- modules.forEach(logModuleDocumentation);
103
- const fetchBuildScript = async ({ template: { buildScriptURL: url } }) => {
104
- if (!(0, typescript_1.notEmpty)(url))
105
- return;
106
- const preBuildScript = variables.pathBackend ? (integration.preSpreeBuildScript || '') : '';
107
- const buildScript = await (0, build_1.getBuildScript)(url);
108
- return preBuildScript.concat(buildScript);
109
- };
110
- core_1.CliUx.ux.action.start((0, i18next_1.t)('command.new_app.message.build_scripts'));
111
- const buildScripts = await Promise.all(modules.map(fetchBuildScript));
112
- core_1.CliUx.ux.action.stop(color_1.default.green((0, i18next_1.t)('command.new_app.message.done')));
113
- const fetchRunScript = async ({ template: { runScriptURL: url } }) => {
114
- if (!(0, typescript_1.notEmpty)(url))
115
- return;
116
- const runScript = await (0, run_1.getRunScript)(url);
117
- return runScript;
118
- };
119
- core_1.CliUx.ux.action.start((0, i18next_1.t)('command.new_app.message.run_scripts'));
120
- const runScripts = await Promise.all(modules.map(fetchRunScript));
121
- core_1.CliUx.ux.action.stop(color_1.default.green((0, i18next_1.t)('command.new_app.message.done')));
122
- const runnersMap = modules.reduce((res, { path, buildOptions, template: { name } }, i) => ({
123
- ...res,
124
- [path]: { name, buildOptions, buildScript: buildScripts[i], runScript: runScripts[i] }
125
- }), {});
126
- const runModules = modules.map(({ path, buildOptions, template: { name, runScriptPath, runScriptLocalPath, dependencies } }) => ({
127
- path: path,
128
- buildOptions: buildOptions,
129
- template: {
130
- name: name,
131
- runScriptPath: runScriptPath,
132
- runScriptLocalPath: runScriptLocalPath,
133
- dependencies: dependencies
134
- }
135
- }));
136
- fs.writeFileSync(`${projectDir}/${variables.projectDetailsFileName}.json`, JSON.stringify(runModules, null, 2));
137
- for (const [runnerKey, runner] of Object.entries(runnersMap)) {
138
- if (runner.runScript)
139
- fs.writeFileSync(`${projectDir}/run-${runnerKey}`, runner.runScript);
140
- }
141
- const executeRunner = ({ buildScript, buildOptions, name }) => {
142
- if (buildScript) {
143
- (0, child_process_1.spawn)(buildScript, buildOptions);
144
- }
145
- else {
146
- this.debug((0, i18next_1.t)('command.new_app.message.build_scripts_skipping', { name }));
147
- }
148
- };
149
- [variables.pathBackend, variables.pathIntegration]
150
- .map((path) => runnersMap[path])
151
- .filter((typescript_1.notEmpty))
152
- .forEach((runner) => executeRunner(runner));
153
- }
154
- }
155
- exports.default = NewApp;
156
- NewApp.description = (0, i18next_1.t)('command.new_app.description');
157
- NewApp.examples = ['<%= config.bin %> <%= command.id %>'];
158
- NewApp.flags = {
159
- beta: core_1.Flags.boolean({
160
- description: (0, i18next_1.t)('command.new_app.flag.beta')
161
- })
162
- };
163
- NewApp.args = [];
164
- //# sourceMappingURL=app.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file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;KAC5C,CAAC;CACH,CAAC;AAEc,WAAI,GAAG,EAAE,CAAC"}
@@ -1,9 +0,0 @@
1
- import { Command } from '@oclif/core';
2
- export default class StartApp extends Command {
3
- static description: string;
4
- static examples: string[];
5
- static flags: {};
6
- static args: never[];
7
- run(): Promise<void>;
8
- }
9
- //# sourceMappingURL=app.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/commands/start/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAWtC,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,OAAO;IAC3C,OAAgB,WAAW,SAAsC;IAEjE,OAAgB,QAAQ,WAA2C;IAEnE,OAAgB,KAAK,KAAM;IAE3B,OAAgB,IAAI,UAAM;IAEpB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA2B3B"}
@@ -1,42 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const core_1 = require("@oclif/core");
5
- const fs = tslib_1.__importStar(require("fs"));
6
- const i18next_1 = require("i18next");
7
- const path = tslib_1.__importStar(require("path"));
8
- const child_process_1 = require("child_process");
9
- const variables_1 = require("../../domains/variables");
10
- const validateDependencies_1 = tslib_1.__importDefault(require("../../domains/dependencies/validate/validateDependencies"));
11
- class StartApp extends core_1.Command {
12
- async run() {
13
- const projectDir = path.resolve();
14
- const variables = await (async () => {
15
- return (0, variables_1.useVariables)({ projectName: path.basename(projectDir) });
16
- })();
17
- const modules = JSON.parse(fs.readFileSync(`${projectDir}/${variables.projectDetailsFileName}.json`, { encoding: 'utf8', flag: 'r' }));
18
- await (0, validateDependencies_1.default)(modules);
19
- const runners = modules
20
- .filter(({ template: { runScriptLocalPath } }) => Boolean(runScriptLocalPath))
21
- .map(({ path, buildOptions, template: { name, runScriptLocalPath } }) => ({
22
- name: name,
23
- module: path,
24
- buildOptions: buildOptions,
25
- runScript: fs.readFileSync(`${projectDir}/${runScriptLocalPath}`, { encoding: 'utf8', flag: 'r' })
26
- }));
27
- runners.forEach(({ name, module, buildOptions, runScript }) => {
28
- if (runScript) {
29
- (0, child_process_1.spawn)(runScript, buildOptions);
30
- }
31
- else {
32
- this.log((0, i18next_1.t)('command.start_app.message.failure', { module, name }));
33
- }
34
- });
35
- }
36
- }
37
- exports.default = StartApp;
38
- StartApp.description = (0, i18next_1.t)('command.start_app.description');
39
- StartApp.examples = ['<%= config.bin %> <%= command.id %>'];
40
- StartApp.flags = {};
41
- StartApp.args = [];
42
- //# sourceMappingURL=app.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app.js","sourceRoot":"","sources":["../../../src/commands/start/app.ts"],"names":[],"mappings":";;;AAAA,sCAAsC;AACtC,+CAAyB;AACzB,qCAA4B;AAC5B,mDAA6B;AAC7B,iDAAsC;AAEtC,uDAAuD;AAGvD,4HAA4F;AAE5F,MAAqB,QAAS,SAAQ,cAAO;IAS3C,KAAK,CAAC,GAAG;QACP,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAClC,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,IAAI,EAAE;YAClC,OAAO,IAAA,wBAAY,EAAC,EAAE,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QAClE,CAAC,CAAC,EAAE,CAAC;QAEL,MAAM,OAAO,GAAiB,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,GAAG,UAAU,IAAI,SAAS,CAAC,sBAAsB,OAAO,EAAE,EAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAC,CAAC,CAAC,CAAC;QAEnJ,MAAM,IAAA,8BAAoB,EAAC,OAAO,CAAC,CAAC;QAEpC,MAAM,OAAO,GAAa,OAAO;aAC9B,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,kBAAkB,EAAE,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;aAC7E,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;YACxE,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,IAAI;YACZ,YAAY,EAAE,YAAY;YAC1B,SAAS,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,UAAU,IAAI,kBAAkB,EAAE,EAAE,EAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAC,CAAC;SACjG,CAAC,CAAC,CAAC;QAEN,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,EAAE;YAC5D,IAAI,SAAS,EAAE;gBACb,IAAA,qBAAK,EAAC,SAAS,EAAE,YAAY,CAAC,CAAC;aAChC;iBAAM;gBACL,IAAI,CAAC,GAAG,CAAC,IAAA,WAAC,EAAC,mCAAmC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;aACpE;QACH,CAAC,CAAC,CAAC;IACL,CAAC;;AAnCH,2BAoCC;AAnCiB,oBAAW,GAAG,IAAA,WAAC,EAAC,+BAA+B,CAAC,CAAC;AAEjD,iBAAQ,GAAG,CAAC,qCAAqC,CAAC,CAAC;AAEnD,cAAK,GAAG,EAAE,CAAC;AAEX,aAAI,GAAG,EAAE,CAAC"}
@@ -1,2 +0,0 @@
1
- export { default as wait } from './wait';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domains/async/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.wait = void 0;
7
- var wait_1 = require("./wait");
8
- Object.defineProperty(exports, "wait", { enumerable: true, get: function () { return __importDefault(wait_1).default; } });
9
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domains/async/index.ts"],"names":[],"mappings":";;;;;;AAAA,+BAAyC;AAAhC,6GAAA,OAAO,OAAQ"}
@@ -1,7 +0,0 @@
1
- /**
2
- * Waits received amount of time.
3
- * @param time - time in milliseconds.
4
- */
5
- declare const wait: (time: number) => Promise<void>;
6
- export default wait;
7
- //# sourceMappingURL=wait.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wait.d.ts","sourceRoot":"","sources":["../../../src/domains/async/wait.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,QAAA,MAAM,IAAI,SAAU,MAAM,KAAG,QAAQ,IAAI,CAIxC,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- /**
4
- * Waits received amount of time.
5
- * @param time - time in milliseconds.
6
- */
7
- const wait = (time) => {
8
- return new Promise((resolve) => {
9
- setTimeout(resolve, time);
10
- });
11
- };
12
- exports.default = wait;
13
- //# sourceMappingURL=wait.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wait.js","sourceRoot":"","sources":["../../../src/domains/async/wait.ts"],"names":[],"mappings":";;AAAA;;;GAGG;AACH,MAAM,IAAI,GAAG,CAAC,IAAY,EAAiB,EAAE;IAC3C,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;QACnC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,kBAAe,IAAI,CAAC"}
@@ -1,3 +0,0 @@
1
- type BuildScript = string;
2
- export default BuildScript;
3
- //# sourceMappingURL=BuildScript.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BuildScript.d.ts","sourceRoot":"","sources":["../../../src/domains/build/BuildScript.ts"],"names":[],"mappings":"AAAA,KAAK,WAAW,GAAG,MAAM,CAAC;AAE1B,eAAe,WAAW,CAAC"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=BuildScript.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BuildScript.js","sourceRoot":"","sources":["../../../src/domains/build/BuildScript.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- import type BuildScript from './BuildScript';
2
- declare const fetchBuildScript: (buildStringURL: string) => Promise<BuildScript>;
3
- export default fetchBuildScript;
4
- //# sourceMappingURL=fetchBuildScript.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fetchBuildScript.d.ts","sourceRoot":"","sources":["../../../src/domains/build/fetchBuildScript.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAE7C,QAAA,MAAM,gBAAgB,mBAA0B,MAAM,KAAG,QAAQ,WAAW,CAO3E,CAAC;AACF,eAAe,gBAAgB,CAAC"}
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
5
- const fetchBuildScript = async (buildStringURL) => {
6
- const response = await (0, node_fetch_1.default)(buildStringURL, {
7
- headers: {
8
- 'Content-Type': 'text/plain'
9
- }
10
- });
11
- return response.text();
12
- };
13
- exports.default = fetchBuildScript;
14
- //# sourceMappingURL=fetchBuildScript.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fetchBuildScript.js","sourceRoot":"","sources":["../../../src/domains/build/fetchBuildScript.ts"],"names":[],"mappings":";;;AAAA,oEAA+B;AAG/B,MAAM,gBAAgB,GAAG,KAAK,EAAE,cAAsB,EAAwB,EAAE;IAC9E,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAK,EAAC,cAAc,EAAE;QAC3C,OAAO,EAAE;YACP,cAAc,EAAE,YAAY;SAC7B;KACF,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC,IAAI,EAA0B,CAAC;AACjD,CAAC,CAAC;AACF,kBAAe,gBAAgB,CAAC"}
@@ -1,4 +0,0 @@
1
- import { BuildScript } from '.';
2
- declare const getBuildScript: (buildScriptURL: string) => Promise<BuildScript>;
3
- export default getBuildScript;
4
- //# sourceMappingURL=getBuildScript.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getBuildScript.d.ts","sourceRoot":"","sources":["../../../src/domains/build/getBuildScript.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAoB,MAAM,GAAG,CAAC;AAElD,QAAA,MAAM,cAAc,mBAA0B,MAAM,KAAG,QAAQ,WAAW,CAEzE,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const _1 = require(".");
4
- const getBuildScript = async (buildScriptURL) => {
5
- return await (0, _1.fetchBuildScript)(buildScriptURL);
6
- };
7
- exports.default = getBuildScript;
8
- //# sourceMappingURL=getBuildScript.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getBuildScript.js","sourceRoot":"","sources":["../../../src/domains/build/getBuildScript.ts"],"names":[],"mappings":";;AAAA,wBAAkD;AAElD,MAAM,cAAc,GAAG,KAAK,EAAE,cAAsB,EAAwB,EAAE;IAC5E,OAAO,MAAM,IAAA,mBAAgB,EAAC,cAAc,CAAC,CAAC;AAChD,CAAC,CAAC;AAEF,kBAAe,cAAc,CAAC"}
@@ -1,4 +0,0 @@
1
- export { default as getBuildScript } from './getBuildScript';
2
- export { default as fetchBuildScript } from './fetchBuildScript';
3
- export { default as BuildScript } from './BuildScript';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domains/build/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.fetchBuildScript = exports.getBuildScript = void 0;
7
- var getBuildScript_1 = require("./getBuildScript");
8
- Object.defineProperty(exports, "getBuildScript", { enumerable: true, get: function () { return __importDefault(getBuildScript_1).default; } });
9
- var fetchBuildScript_1 = require("./fetchBuildScript");
10
- Object.defineProperty(exports, "fetchBuildScript", { enumerable: true, get: function () { return __importDefault(fetchBuildScript_1).default; } });
11
- var BuildScript_1 = require("./BuildScript");
12
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domains/build/index.ts"],"names":[],"mappings":";;;;;;AAAA,mDAA6D;AAApD,iIAAA,OAAO,OAAkB;AAClC,uDAAiE;AAAxD,qIAAA,OAAO,OAAoB;AACpC,6CAAuD"}
@@ -1,2 +0,0 @@
1
- export declare const API_URL = "https://raw.githubusercontent.com/spree/spree_cli_data/master/cli-data";
2
- //# sourceMappingURL=api.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/domains/constants/api.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,2EAA2E,CAAC"}
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.API_URL = void 0;
4
- exports.API_URL = 'https://raw.githubusercontent.com/spree/spree_cli_data/master/cli-data';
5
- //# sourceMappingURL=api.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/domains/constants/api.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,wEAAwE,CAAC"}
@@ -1,2 +0,0 @@
1
- export { API_URL } from './api';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domains/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.API_URL = void 0;
4
- var api_1 = require("./api");
5
- Object.defineProperty(exports, "API_URL", { enumerable: true, get: function () { return api_1.API_URL; } });
6
- //# sourceMappingURL=index.js.map