@dcl-regenesislabs/sdk-commands 0.0.0-stage → 7.0.0-42722791062.commit-bc8d909

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 (250) hide show
  1. package/.dclrc +19 -0
  2. package/LICENSE +201 -0
  3. package/README.md +106 -2
  4. package/dist/commands/build/index.d.ts +23 -0
  5. package/dist/commands/build/index.js +80 -0
  6. package/dist/commands/build/index.js.map +1 -0
  7. package/dist/commands/code-to-composite/asset-migrator.d.ts +25 -0
  8. package/dist/commands/code-to-composite/asset-migrator.js +238 -0
  9. package/dist/commands/code-to-composite/asset-migrator.js.map +1 -0
  10. package/dist/commands/code-to-composite/code-commenter.d.ts +11 -0
  11. package/dist/commands/code-to-composite/code-commenter.js +87 -0
  12. package/dist/commands/code-to-composite/code-commenter.js.map +1 -0
  13. package/dist/commands/code-to-composite/composite-generator.d.ts +6 -0
  14. package/dist/commands/code-to-composite/composite-generator.js +65 -0
  15. package/dist/commands/code-to-composite/composite-generator.js.map +1 -0
  16. package/dist/commands/code-to-composite/index.d.ts +16 -0
  17. package/dist/commands/code-to-composite/index.js +130 -0
  18. package/dist/commands/code-to-composite/index.js.map +1 -0
  19. package/dist/commands/code-to-composite/name-generator.d.ts +9 -0
  20. package/dist/commands/code-to-composite/name-generator.js +139 -0
  21. package/dist/commands/code-to-composite/name-generator.js.map +1 -0
  22. package/dist/commands/code-to-composite/scene-executor.d.ts +15 -0
  23. package/dist/commands/code-to-composite/scene-executor.js +421 -0
  24. package/dist/commands/code-to-composite/scene-executor.js.map +1 -0
  25. package/dist/commands/deploy/analytics-features.d.ts +4 -0
  26. package/dist/commands/deploy/analytics-features.js +11 -0
  27. package/dist/commands/deploy/analytics-features.js.map +1 -0
  28. package/dist/commands/deploy/deployment.d.ts +51 -0
  29. package/dist/commands/deploy/deployment.js +122 -0
  30. package/dist/commands/deploy/deployment.js.map +1 -0
  31. package/dist/commands/deploy/index.d.ts +37 -0
  32. package/dist/commands/deploy/index.js +312 -0
  33. package/dist/commands/deploy/index.js.map +1 -0
  34. package/dist/commands/deploy/routes.d.ts +27 -0
  35. package/dist/commands/deploy/routes.js +144 -0
  36. package/dist/commands/deploy/routes.js.map +1 -0
  37. package/dist/commands/deploy/state.d.ts +60 -0
  38. package/dist/commands/deploy/state.js +144 -0
  39. package/dist/commands/deploy/state.js.map +1 -0
  40. package/dist/commands/deploy/upload.d.ts +23 -0
  41. package/dist/commands/deploy/upload.js +120 -0
  42. package/dist/commands/deploy/upload.js.map +1 -0
  43. package/dist/commands/deploy/utils.d.ts +131 -0
  44. package/dist/commands/deploy/utils.js +432 -0
  45. package/dist/commands/deploy/utils.js.map +1 -0
  46. package/dist/commands/export-static/index.d.ts +27 -0
  47. package/dist/commands/export-static/index.js +155 -0
  48. package/dist/commands/export-static/index.js.map +1 -0
  49. package/dist/commands/get-context-files/index.d.ts +12 -0
  50. package/dist/commands/get-context-files/index.js +119 -0
  51. package/dist/commands/get-context-files/index.js.map +1 -0
  52. package/dist/commands/init/download-github-folder.d.ts +2 -0
  53. package/dist/commands/init/download-github-folder.js +69 -0
  54. package/dist/commands/init/download-github-folder.js.map +1 -0
  55. package/dist/commands/init/index.d.ts +18 -0
  56. package/dist/commands/init/index.js +98 -0
  57. package/dist/commands/init/index.js.map +1 -0
  58. package/dist/commands/init/project.d.ts +7 -0
  59. package/dist/commands/init/project.js +36 -0
  60. package/dist/commands/init/project.js.map +1 -0
  61. package/dist/commands/init/repos.d.ts +4 -0
  62. package/dist/commands/init/repos.js +21 -0
  63. package/dist/commands/init/repos.js.map +1 -0
  64. package/dist/commands/pack-smart-wearable/index.d.ts +16 -0
  65. package/dist/commands/pack-smart-wearable/index.js +108 -0
  66. package/dist/commands/pack-smart-wearable/index.js.map +1 -0
  67. package/dist/commands/quests/index.d.ts +28 -0
  68. package/dist/commands/quests/index.js +271 -0
  69. package/dist/commands/quests/index.js.map +1 -0
  70. package/dist/commands/quests/types.d.ts +41 -0
  71. package/dist/commands/quests/types.js +3 -0
  72. package/dist/commands/quests/types.js.map +1 -0
  73. package/dist/commands/quests/utils.d.ts +20 -0
  74. package/dist/commands/quests/utils.js +253 -0
  75. package/dist/commands/quests/utils.js.map +1 -0
  76. package/dist/commands/start/data-layer/fs.d.ts +8 -0
  77. package/dist/commands/start/data-layer/fs.js +73 -0
  78. package/dist/commands/start/data-layer/fs.js.map +1 -0
  79. package/dist/commands/start/data-layer/rpc.d.ts +8 -0
  80. package/dist/commands/start/data-layer/rpc.js +54 -0
  81. package/dist/commands/start/data-layer/rpc.js.map +1 -0
  82. package/dist/commands/start/data-layer/ws.d.ts +4 -0
  83. package/dist/commands/start/data-layer/ws.js +17 -0
  84. package/dist/commands/start/data-layer/ws.js.map +1 -0
  85. package/dist/commands/start/explorer-alpha.d.ts +19 -0
  86. package/dist/commands/start/explorer-alpha.js +109 -0
  87. package/dist/commands/start/explorer-alpha.js.map +1 -0
  88. package/dist/commands/start/index.d.ts +46 -0
  89. package/dist/commands/start/index.js +300 -0
  90. package/dist/commands/start/index.js.map +1 -0
  91. package/dist/commands/start/server/endpoints.d.ts +5 -0
  92. package/dist/commands/start/server/endpoints.js +417 -0
  93. package/dist/commands/start/server/endpoints.js.map +1 -0
  94. package/dist/commands/start/server/file-watch-notifier.d.ts +12 -0
  95. package/dist/commands/start/server/file-watch-notifier.js +96 -0
  96. package/dist/commands/start/server/file-watch-notifier.js.map +1 -0
  97. package/dist/commands/start/server/realm.d.ts +7 -0
  98. package/dist/commands/start/server/realm.js +58 -0
  99. package/dist/commands/start/server/realm.js.map +1 -0
  100. package/dist/commands/start/server/routes.d.ts +6 -0
  101. package/dist/commands/start/server/routes.js +77 -0
  102. package/dist/commands/start/server/routes.js.map +1 -0
  103. package/dist/commands/start/server/ws.d.ts +11 -0
  104. package/dist/commands/start/server/ws.js +19 -0
  105. package/dist/commands/start/server/ws.js.map +1 -0
  106. package/dist/commands/start/types.d.ts +16 -0
  107. package/dist/commands/start/types.js +3 -0
  108. package/dist/commands/start/types.js.map +1 -0
  109. package/dist/commands/start/utils.d.ts +8 -0
  110. package/dist/commands/start/utils.js +57 -0
  111. package/dist/commands/start/utils.js.map +1 -0
  112. package/dist/components/analytics.d.ts +105 -0
  113. package/dist/components/analytics.js +76 -0
  114. package/dist/components/analytics.js.map +1 -0
  115. package/dist/components/config.d.ts +18 -0
  116. package/dist/components/config.js +58 -0
  117. package/dist/components/config.js.map +1 -0
  118. package/dist/components/eth.d.ts +2 -0
  119. package/dist/components/eth.js +6 -0
  120. package/dist/components/eth.js.map +1 -0
  121. package/dist/components/exit-signal.d.ts +5 -0
  122. package/dist/components/exit-signal.js +21 -0
  123. package/dist/components/exit-signal.js.map +1 -0
  124. package/dist/components/fetch.d.ts +6 -0
  125. package/dist/components/fetch.js +9 -0
  126. package/dist/components/fetch.js.map +1 -0
  127. package/dist/components/fs.d.ts +18 -0
  128. package/dist/components/fs.js +85 -0
  129. package/dist/components/fs.js.map +1 -0
  130. package/dist/components/index.d.ts +14 -0
  131. package/dist/components/index.js +25 -0
  132. package/dist/components/index.js.map +1 -0
  133. package/dist/components/log.d.ts +24 -0
  134. package/dist/components/log.js +67 -0
  135. package/dist/components/log.js.map +1 -0
  136. package/dist/generated/decentraland/common/border_rect.gen.d.ts +49 -0
  137. package/dist/generated/decentraland/common/border_rect.gen.js +199 -0
  138. package/dist/generated/decentraland/common/border_rect.gen.js.map +1 -0
  139. package/dist/generated/decentraland/common/vectors.gen.d.ts +71 -0
  140. package/dist/generated/decentraland/common/vectors.gen.js +334 -0
  141. package/dist/generated/decentraland/common/vectors.gen.js.map +1 -0
  142. package/dist/generated/decentraland/realm/about.gen.d.ts +229 -0
  143. package/dist/generated/decentraland/realm/about.gen.js +1175 -0
  144. package/dist/generated/decentraland/realm/about.gen.js.map +1 -0
  145. package/dist/generated/decentraland/sdk/development/local_development.gen.d.ts +70 -0
  146. package/dist/generated/decentraland/sdk/development/local_development.gen.js +278 -0
  147. package/dist/generated/decentraland/sdk/development/local_development.gen.js.map +1 -0
  148. package/dist/index.d.ts +2 -0
  149. package/dist/index.js +37 -0
  150. package/dist/index.js.map +1 -0
  151. package/dist/linker-dapp/routes.d.ts +32 -0
  152. package/dist/linker-dapp/routes.js +140 -0
  153. package/dist/linker-dapp/routes.js.map +1 -0
  154. package/dist/locales/en.json +84 -0
  155. package/dist/locales/es.json +84 -0
  156. package/dist/locales/zh.json +84 -0
  157. package/dist/logic/account.d.ts +6 -0
  158. package/dist/logic/account.js +25 -0
  159. package/dist/logic/account.js.map +1 -0
  160. package/dist/logic/args.d.ts +6 -0
  161. package/dist/logic/args.js +25 -0
  162. package/dist/logic/args.js.map +1 -0
  163. package/dist/logic/beautiful-logs.d.ts +14 -0
  164. package/dist/logic/beautiful-logs.js +55 -0
  165. package/dist/logic/beautiful-logs.js.map +1 -0
  166. package/dist/logic/bundle.d.ts +47 -0
  167. package/dist/logic/bundle.js +573 -0
  168. package/dist/logic/bundle.js.map +1 -0
  169. package/dist/logic/catalyst-requests.d.ts +20 -0
  170. package/dist/logic/catalyst-requests.js +54 -0
  171. package/dist/logic/catalyst-requests.js.map +1 -0
  172. package/dist/logic/commands.d.ts +3 -0
  173. package/dist/logic/commands.js +30 -0
  174. package/dist/logic/commands.js.map +1 -0
  175. package/dist/logic/composite.d.ts +15 -0
  176. package/dist/logic/composite.js +105 -0
  177. package/dist/logic/composite.js.map +1 -0
  178. package/dist/logic/config.d.ts +24 -0
  179. package/dist/logic/config.js +88 -0
  180. package/dist/logic/config.js.map +1 -0
  181. package/dist/logic/coordinates.d.ts +14 -0
  182. package/dist/logic/coordinates.js +31 -0
  183. package/dist/logic/coordinates.js.map +1 -0
  184. package/dist/logic/dcl-ignore.d.ts +8 -0
  185. package/dist/logic/dcl-ignore.js +53 -0
  186. package/dist/logic/dcl-ignore.js.map +1 -0
  187. package/dist/logic/debounce.d.ts +1 -0
  188. package/dist/logic/debounce.js +11 -0
  189. package/dist/logic/debounce.js.map +1 -0
  190. package/dist/logic/error.d.ts +7 -0
  191. package/dist/logic/error.js +13 -0
  192. package/dist/logic/error.js.map +1 -0
  193. package/dist/logic/exec.d.ts +12 -0
  194. package/dist/logic/exec.js +40 -0
  195. package/dist/logic/exec.js.map +1 -0
  196. package/dist/logic/fetch.d.ts +25 -0
  197. package/dist/logic/fetch.js +42 -0
  198. package/dist/logic/fetch.js.map +1 -0
  199. package/dist/logic/fs.d.ts +33 -0
  200. package/dist/logic/fs.js +57 -0
  201. package/dist/logic/fs.js.map +1 -0
  202. package/dist/logic/future.d.ts +6 -0
  203. package/dist/logic/future.js +14 -0
  204. package/dist/logic/future.js.map +1 -0
  205. package/dist/logic/get-free-port.d.ts +1 -0
  206. package/dist/logic/get-free-port.js +70 -0
  207. package/dist/logic/get-free-port.js.map +1 -0
  208. package/dist/logic/lang.d.ts +7 -0
  209. package/dist/logic/lang.js +41 -0
  210. package/dist/logic/lang.js.map +1 -0
  211. package/dist/logic/open.d.ts +1 -0
  212. package/dist/logic/open.js +41 -0
  213. package/dist/logic/open.js.map +1 -0
  214. package/dist/logic/portable-experience-sw-validations.d.ts +18 -0
  215. package/dist/logic/portable-experience-sw-validations.js +48 -0
  216. package/dist/logic/portable-experience-sw-validations.js.map +1 -0
  217. package/dist/logic/project-files.d.ts +40 -0
  218. package/dist/logic/project-files.js +158 -0
  219. package/dist/logic/project-files.js.map +1 -0
  220. package/dist/logic/project-validations.d.ts +45 -0
  221. package/dist/logic/project-validations.js +143 -0
  222. package/dist/logic/project-validations.js.map +1 -0
  223. package/dist/logic/promise-utils.d.ts +1 -0
  224. package/dist/logic/promise-utils.js +20 -0
  225. package/dist/logic/promise-utils.js.map +1 -0
  226. package/dist/logic/prompts.d.ts +23 -0
  227. package/dist/logic/prompts.js +74 -0
  228. package/dist/logic/prompts.js.map +1 -0
  229. package/dist/logic/realm.d.ts +3 -0
  230. package/dist/logic/realm.js +32 -0
  231. package/dist/logic/realm.js.map +1 -0
  232. package/dist/logic/runtime-script.d.ts +42 -0
  233. package/dist/logic/runtime-script.js +217 -0
  234. package/dist/logic/runtime-script.js.map +1 -0
  235. package/dist/logic/runtime-script.ts +270 -0
  236. package/dist/logic/scene-validations.d.ts +35 -0
  237. package/dist/logic/scene-validations.js +135 -0
  238. package/dist/logic/scene-validations.js.map +1 -0
  239. package/dist/logic/script-module.d.ts.template +87 -0
  240. package/dist/logic/workspace-validations.d.ts +27 -0
  241. package/dist/logic/workspace-validations.js +136 -0
  242. package/dist/logic/workspace-validations.js.map +1 -0
  243. package/dist/run-command.d.ts +7 -0
  244. package/dist/run-command.js +95 -0
  245. package/dist/run-command.js.map +1 -0
  246. package/dist/run-dapp.d.ts +23 -0
  247. package/dist/run-dapp.js +66 -0
  248. package/dist/run-dapp.js.map +1 -0
  249. package/package.json +74 -3
  250. package/scripts/postinstall.js +17 -0
package/.dclrc ADDED
@@ -0,0 +1,19 @@
1
+ # This file provides the default configurations for sdk-commands
2
+
3
+ # Several .dcl.rc configuration files are loaded for each session, each key of the file
4
+ # overrides the previously loaded, and finally it uses env vars if present. Meaning:
5
+ # - multiple keys can be present in the same file
6
+ # - the last file overrides the first file
7
+ # - env vars override the config files entirely
8
+
9
+ # DCL_ANON_ID=0000000-0000000000-0000000
10
+ DCL_DISABLE_ANALYTICS=false
11
+
12
+ # Address of the LAND_REGISTRY smart contract
13
+ #DCL_LAND_REGISTRY_ADDRESS=
14
+
15
+ # Address of the ESTATE_REGISTRY smart contract
16
+ #DCL_ESTATE_REGISTRY_ADDRESS=
17
+
18
+ # Default catalyst node
19
+ DCL_CATALYST=https://peer.decentraland.org
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2019 Metaverse Holdings Ltd.
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md CHANGED
@@ -1,3 +1,107 @@
1
- # Temporary Holding Version
1
+ # @dcl/sdk-commands
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ CLI tools for Decentraland scene development.
4
+
5
+ ## Overview
6
+
7
+ This package provides command-line tools for creating, developing, and deploying Decentraland scenes. It includes commands for:
8
+
9
+ - Initializing new scene projects
10
+ - Starting a local development server
11
+ - Building scenes
12
+ - Testing and validating scenes
13
+ - Managing scene deployments
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ npm install @dcl/sdk-commands
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ The SDK commands are used via `npx` to run the version installed in your project:
24
+
25
+ ### Create a New Scene
26
+
27
+ ```bash
28
+ npx @dcl/sdk-commands init
29
+ ```
30
+
31
+ ### Start Development Server
32
+
33
+ ```bash
34
+ npx @dcl/sdk-commands start
35
+ ```
36
+
37
+ ### Build Scene
38
+
39
+ ```bash
40
+ npx @dcl/sdk-commands build
41
+ ```
42
+
43
+ ### Deploy Scene
44
+
45
+ ```bash
46
+ npx @dcl/sdk-commands deploy
47
+ ```
48
+
49
+ Large scenes upload in batches when the target server supports it. While deploying, the linker server exposes the deployment at `/api/deploy`: `GET` returns its state (JSON, or server-sent events with `Accept: text/event-stream`) and `DELETE` cancels it. Cancelling needs the `X-Deploy-Token` header, set with `--deploy-token <token>` (16+ characters) or random per run; the browser gets it in the linker URL fragment (`/#token=...`).
50
+
51
+ ### Export Static Content
52
+
53
+ ```bash
54
+ npx @dcl/sdk-commands export-static
55
+ ```
56
+
57
+ ### Pack Smart Wearable
58
+
59
+ ```bash
60
+ npx @dcl/sdk-commands pack-smart-wearable
61
+ ```
62
+
63
+ ### Manage Quests
64
+
65
+ ```bash
66
+ npx @dcl/sdk-commands quests
67
+ ```
68
+
69
+ ## Development
70
+
71
+ ### Building the Package
72
+
73
+ ```bash
74
+ # Build all packages in the monorepo
75
+ make build
76
+ ```
77
+
78
+ ### Testing
79
+
80
+ ```bash
81
+ # Run all tests in the monorepo
82
+ make test
83
+
84
+ # Run tests for a specific file
85
+ make test FILES="--watch packages/@dcl/sdk-commands/src/path/to/test.spec.ts"
86
+ ```
87
+
88
+ ### Development Commands
89
+
90
+ For local development:
91
+
92
+ ```bash
93
+ # Clean all build artifacts and reinstall dependencies
94
+ make clean && make install
95
+
96
+ # Format and fix linting issues
97
+ make lint-fix
98
+
99
+ # Update dependencies across packages
100
+ make sync-deps
101
+ ```
102
+
103
+ ## Documentation
104
+
105
+ For detailed documentation on using the CLI tools, visit:
106
+
107
+ - [CLI Documentation](https://docs.decentraland.org/creator/development-guide/sdk7/cli/)
@@ -0,0 +1,23 @@
1
+ import { CliComponents } from '../../components';
2
+ import { SceneProject, WearableProject } from '../../logic/project-validations';
3
+ import { Result } from 'arg';
4
+ interface Options {
5
+ args: Result<typeof args>;
6
+ components: Pick<CliComponents, 'fs' | 'logger' | 'analytics' | 'spawner'>;
7
+ }
8
+ export declare const args: {
9
+ '--watch': BooleanConstructor;
10
+ '-w': string;
11
+ '--production': BooleanConstructor;
12
+ '--single': StringConstructor;
13
+ '--emitDeclaration': BooleanConstructor;
14
+ '--ignoreComposite': BooleanConstructor;
15
+ '--customEntryPoint': BooleanConstructor;
16
+ '-p': string;
17
+ '--skip-install': BooleanConstructor;
18
+ '--dir': StringConstructor;
19
+ };
20
+ export declare function help(options: Options): void;
21
+ export declare function main(options: Options): Promise<void>;
22
+ export declare function buildScene(options: Options, project: SceneProject | WearableProject): Promise<void>;
23
+ export {};
@@ -0,0 +1,80 @@
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.args = void 0;
7
+ exports.help = help;
8
+ exports.main = main;
9
+ exports.buildScene = buildScene;
10
+ const path_1 = __importDefault(require("path"));
11
+ const args_1 = require("../../logic/args");
12
+ const project_validations_1 = require("../../logic/project-validations");
13
+ const scene_validations_1 = require("../../logic/scene-validations");
14
+ const project_files_1 = require("../../logic/project-files");
15
+ const bundle_1 = require("../../logic/bundle");
16
+ const beautiful_logs_1 = require("../../logic/beautiful-logs");
17
+ const workspace_validations_1 = require("../../logic/workspace-validations");
18
+ exports.args = (0, args_1.declareArgs)({
19
+ '--watch': Boolean,
20
+ '-w': '--watch',
21
+ '--production': Boolean,
22
+ '--single': String,
23
+ '--emitDeclaration': Boolean,
24
+ '--ignoreComposite': Boolean,
25
+ '--customEntryPoint': Boolean,
26
+ '-p': '--production',
27
+ '--skip-install': Boolean,
28
+ '--dir': String
29
+ });
30
+ function help(options) {
31
+ options.components.logger.log(`
32
+ Usage: 'sdk-commands build [options]'
33
+ Options:'
34
+ -h, --help Displays complete help
35
+ -w, --watch Watch for file changes and build on change
36
+ -p, --production Build without sourcemaps
37
+ --skip-install Skip installing dependencies
38
+ --dir Path to directory to build
39
+
40
+ Example:
41
+ - Build your scene:
42
+ '$ sdk-commands build'
43
+ `);
44
+ }
45
+ async function main(options) {
46
+ const workingDirectory = path_1.default.resolve(process.cwd(), options.args['--dir'] || '.');
47
+ const workspace = await (0, workspace_validations_1.getValidWorkspace)(options.components, workingDirectory);
48
+ for (const project of workspace.projects) {
49
+ (0, beautiful_logs_1.printCurrentProjectStarting)(options.components.logger, project, workspace);
50
+ if (project.kind === 'scene' || project.kind === 'smart-wearable') {
51
+ await buildScene(options, project);
52
+ }
53
+ }
54
+ }
55
+ async function buildScene(options, project) {
56
+ const canInstall = !options.args['--skip-install'];
57
+ if (canInstall) {
58
+ if (await (0, project_validations_1.needsDependencies)(options.components, project.workingDirectory)) {
59
+ await (0, project_validations_1.installDependencies)(options.components, project.workingDirectory);
60
+ }
61
+ }
62
+ const watch = !!options.args['--watch'];
63
+ const { sceneJson, inputs } = await (0, bundle_1.bundleProject)(options.components, {
64
+ workingDirectory: project.workingDirectory,
65
+ watch,
66
+ single: options.args['--single'],
67
+ production: !!options.args['--production'],
68
+ emitDeclaration: !!options.args['--emitDeclaration'],
69
+ ignoreComposite: !!options.args['--ignoreComposite'],
70
+ customEntryPoint: !!options.args['--customEntryPoint']
71
+ }, project.scene);
72
+ const coords = (0, scene_validations_1.getBaseCoords)(sceneJson);
73
+ options.components.analytics.track('Build scene', {
74
+ projectHash: (0, project_files_1.b64HashingFunction)(project.workingDirectory),
75
+ coords,
76
+ isWorkspace: inputs.length > 1,
77
+ isPortableExperience: !!sceneJson.isPortableExperience
78
+ });
79
+ }
80
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/build/index.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,25 @@
1
+ import { IEngine } from '@dcl/ecs/dist-cjs';
2
+ import { CliComponents } from '../../components';
3
+ import { SceneProject } from '../../logic/project-validations';
4
+ /**
5
+ * Asset Migrator for code-to-composite command
6
+ *
7
+ * This module handles migrating asset files to the Creator Hub directory structure:
8
+ * - Models: assets/scene/Models/{modelName}/*.{gltf,glb} (with dependencies)
9
+ * - Images: assets/scene/Images/*.{png,jpg,jpeg,bmp}
10
+ * - Audio: assets/scene/Audio/*.{mp3,wav,ogg}
11
+ * - Video: assets/scene/Video/*.{mp4}
12
+ *
13
+ * Models are treated specially: each model gets its own folder with all dependencies
14
+ * (textures, .bin files) copied into it, even if originally shared between models.
15
+ */
16
+ export type AssetType = 'Models' | 'Images' | 'Audio' | 'Video' | 'Other';
17
+ /**
18
+ * Main asset migration function
19
+ *
20
+ * Process:
21
+ * 1. Scan all components to find asset references
22
+ * 2. Copy asset files to new Creator Hub structure
23
+ * 3. Update all components with new asset paths
24
+ */
25
+ export declare function migrateAssets(components: Pick<CliComponents, 'fs' | 'logger'>, project: SceneProject, engine: IEngine): Promise<number>;