@upstart.gg/sdk 0.0.67 → 0.0.68

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 (333) hide show
  1. package/dist/node/cli/api.d.ts +34 -0
  2. package/dist/node/cli/api.d.ts.map +1 -0
  3. package/dist/node/cli/api.js +4 -3
  4. package/dist/node/cli/commands/build/cmd-build.d.ts +3 -0
  5. package/dist/node/cli/commands/build/cmd-build.d.ts.map +1 -0
  6. package/dist/node/cli/commands/build/cmd-build.js +2 -1
  7. package/dist/node/cli/commands/login/cmd-login.d.ts +14 -0
  8. package/dist/node/cli/commands/login/cmd-login.d.ts.map +1 -0
  9. package/dist/node/cli/commands/login/cmd-login.js +6 -5
  10. package/dist/node/cli/commands/logout/cmd-logout.d.ts +3 -0
  11. package/dist/node/cli/commands/logout/cmd-logout.d.ts.map +1 -0
  12. package/dist/node/cli/commands/logout/cmd-logout.js +4 -3
  13. package/dist/node/cli/commands/publish/cmd-publish.d.ts +3 -0
  14. package/dist/node/cli/commands/publish/cmd-publish.d.ts.map +1 -0
  15. package/dist/node/cli/commands/publish/cmd-publish.js +22 -21
  16. package/dist/node/cli/commands/publish/parse-gitignore.d.ts +56 -0
  17. package/dist/node/cli/commands/publish/parse-gitignore.d.ts.map +1 -0
  18. package/dist/node/cli/commands/publish/parse-gitignore.js +2 -1
  19. package/dist/node/cli/commands/publish/uploader.d.ts +20 -0
  20. package/dist/node/cli/commands/publish/uploader.d.ts.map +1 -0
  21. package/dist/node/cli/commands/publish/uploader.js +9 -8
  22. package/dist/node/cli/constants.d.ts +11 -0
  23. package/dist/node/cli/constants.d.ts.map +1 -0
  24. package/dist/node/cli/constants.js +2 -1
  25. package/dist/node/cli/is-logged-in.d.ts +2 -0
  26. package/dist/node/cli/is-logged-in.d.ts.map +1 -0
  27. package/dist/node/cli/is-logged-in.js +4 -0
  28. package/dist/node/cli/program.d.ts +3 -0
  29. package/dist/node/cli/program.d.ts.map +1 -0
  30. package/dist/node/cli/program.js +33 -32
  31. package/dist/node/cli/store.d.ts +9 -0
  32. package/dist/node/cli/store.d.ts.map +1 -0
  33. package/dist/node/cli/store.js +3 -3
  34. package/dist/node/cli/tests/api.test.d.ts +2 -0
  35. package/dist/node/cli/tests/api.test.d.ts.map +1 -0
  36. package/dist/node/cli/types.d.ts +30 -0
  37. package/dist/node/cli/types.d.ts.map +1 -0
  38. package/dist/node/cli/types.js +2 -1
  39. package/dist/node/cli/utils.d.ts +6 -0
  40. package/dist/node/cli/utils.d.ts.map +1 -0
  41. package/dist/node/cli/utils.js +2 -1
  42. package/dist/node/metafile-esm.json +1 -1
  43. package/dist/node/shared/config.d.ts +16 -0
  44. package/dist/node/shared/config.d.ts.map +1 -0
  45. package/dist/node/shared/config.js +8 -7
  46. package/dist/node/shared/logger.d.ts +30 -0
  47. package/dist/node/shared/logger.d.ts.map +1 -0
  48. package/dist/node/shared/logger.js +4 -3
  49. package/dist/shared/ajv.d.ts +4 -6
  50. package/dist/shared/ajv.d.ts.map +1 -0
  51. package/dist/shared/analytics/init.d.ts +2 -3
  52. package/dist/shared/analytics/init.d.ts.map +1 -0
  53. package/dist/shared/analytics/init.js +2 -1
  54. package/dist/shared/analytics/track.d.ts +3 -5
  55. package/dist/shared/analytics/track.d.ts.map +1 -0
  56. package/dist/shared/analytics/track.js +2 -1
  57. package/dist/shared/analytics/types.d.ts +3 -3
  58. package/dist/shared/analytics/types.d.ts.map +1 -0
  59. package/dist/shared/analytics/types.js +2 -1
  60. package/dist/shared/attributes.d.ts +33 -37
  61. package/dist/shared/attributes.d.ts.map +1 -0
  62. package/dist/shared/attributes.js +3 -2
  63. package/dist/shared/brick-manifest.d.ts +64 -0
  64. package/dist/shared/brick-manifest.d.ts.map +1 -0
  65. package/dist/shared/brick-manifest.js +3 -0
  66. package/dist/shared/bricks/manifests/all-manifests.d.ts +5 -0
  67. package/dist/shared/bricks/manifests/all-manifests.d.ts.map +1 -0
  68. package/dist/shared/bricks/manifests/all-manifests.js +3 -0
  69. package/dist/shared/bricks/manifests/button.manifest.d.ts +99 -0
  70. package/dist/shared/bricks/manifests/button.manifest.d.ts.map +1 -0
  71. package/dist/shared/bricks/manifests/button.manifest.js +3 -0
  72. package/dist/shared/bricks/manifests/card.manifest.d.ts +99 -0
  73. package/dist/shared/bricks/manifests/card.manifest.d.ts.map +1 -0
  74. package/dist/shared/bricks/manifests/card.manifest.js +3 -0
  75. package/dist/shared/bricks/manifests/carousel.manifest.d.ts +99 -0
  76. package/dist/shared/bricks/manifests/carousel.manifest.d.ts.map +1 -0
  77. package/dist/shared/bricks/manifests/carousel.manifest.js +3 -0
  78. package/dist/shared/bricks/manifests/countdown.manifest.d.ts +99 -0
  79. package/dist/shared/bricks/manifests/countdown.manifest.d.ts.map +1 -0
  80. package/dist/shared/bricks/manifests/countdown.manifest.js +3 -0
  81. package/dist/shared/bricks/manifests/footer.manifest.d.ts +99 -0
  82. package/dist/shared/bricks/manifests/footer.manifest.d.ts.map +1 -0
  83. package/dist/shared/bricks/manifests/footer.manifest.js +3 -0
  84. package/dist/shared/bricks/manifests/form.manifest.d.ts +99 -0
  85. package/dist/shared/bricks/manifests/form.manifest.d.ts.map +1 -0
  86. package/dist/shared/bricks/manifests/form.manifest.js +3 -0
  87. package/dist/shared/bricks/manifests/header.manifest.d.ts +99 -0
  88. package/dist/shared/bricks/manifests/header.manifest.d.ts.map +1 -0
  89. package/dist/shared/bricks/manifests/header.manifest.js +3 -0
  90. package/dist/shared/bricks/manifests/hero.manifest.d.ts +99 -0
  91. package/dist/shared/bricks/manifests/hero.manifest.d.ts.map +1 -0
  92. package/dist/shared/bricks/manifests/hero.manifest.js +3 -0
  93. package/dist/shared/bricks/manifests/icon.manifest.d.ts +99 -0
  94. package/dist/shared/bricks/manifests/icon.manifest.d.ts.map +1 -0
  95. package/dist/shared/bricks/manifests/icon.manifest.js +3 -0
  96. package/dist/shared/bricks/manifests/image.manifest.d.ts +97 -0
  97. package/dist/shared/bricks/manifests/image.manifest.d.ts.map +1 -0
  98. package/dist/shared/bricks/manifests/image.manifest.js +3 -0
  99. package/dist/shared/bricks/manifests/images-wall.manifest.d.ts +99 -0
  100. package/dist/shared/bricks/manifests/images-wall.manifest.d.ts.map +1 -0
  101. package/dist/shared/bricks/manifests/images-wall.manifest.js +3 -0
  102. package/dist/shared/bricks/manifests/map.manifest.d.ts +99 -0
  103. package/dist/shared/bricks/manifests/map.manifest.d.ts.map +1 -0
  104. package/dist/shared/bricks/manifests/map.manifest.js +3 -0
  105. package/dist/shared/bricks/manifests/social-links.manifest.d.ts +99 -0
  106. package/dist/shared/bricks/manifests/social-links.manifest.d.ts.map +1 -0
  107. package/dist/shared/bricks/manifests/social-links.manifest.js +3 -0
  108. package/dist/shared/bricks/manifests/text.manifest.d.ts +97 -0
  109. package/dist/shared/bricks/manifests/text.manifest.d.ts.map +1 -0
  110. package/dist/shared/bricks/manifests/text.manifest.js +3 -0
  111. package/dist/shared/bricks/manifests/video.manifest.d.ts +81 -0
  112. package/dist/shared/bricks/manifests/video.manifest.d.ts.map +1 -0
  113. package/dist/shared/bricks/manifests/video.manifest.js +3 -0
  114. package/dist/shared/bricks/props/common.d.ts +12 -0
  115. package/dist/shared/bricks/props/common.d.ts.map +1 -0
  116. package/dist/shared/bricks/props/common.js +3 -0
  117. package/dist/shared/bricks/props/style-props.d.ts +20 -0
  118. package/dist/shared/bricks/props/style-props.d.ts.map +1 -0
  119. package/dist/shared/bricks/props/style-props.js +3 -0
  120. package/dist/shared/bricks.d.ts +499 -119
  121. package/dist/shared/bricks.d.ts.map +1 -0
  122. package/dist/shared/bricks.js +3 -2
  123. package/dist/shared/chunk-2MYSBGXT.js +16 -0
  124. package/dist/shared/chunk-2OS3QYKE.js +20 -0
  125. package/dist/shared/chunk-4NZGINOT.js +3 -0
  126. package/dist/shared/chunk-BND2TMDC.js +13 -0
  127. package/dist/shared/chunk-CXABUYX7.js +3 -0
  128. package/dist/shared/chunk-EU3VNNEO.js +7 -0
  129. package/dist/shared/chunk-FNY3QNEQ.js +11 -0
  130. package/dist/shared/chunk-HIXVR4RL.js +3 -0
  131. package/dist/shared/chunk-J6I3OMQO.js +9 -0
  132. package/dist/shared/chunk-KGJQ6Z5A.js +32 -0
  133. package/dist/shared/chunk-NCF46HSZ.js +13 -0
  134. package/dist/shared/chunk-PXAK7ZJ3.js +3 -0
  135. package/dist/shared/chunk-QOPZIE3U.js +3 -0
  136. package/dist/shared/chunk-QXB632SL.js +15 -0
  137. package/dist/shared/chunk-SL7GGSYB.js +22 -0
  138. package/dist/shared/chunk-TVKRK6P4.js +14 -0
  139. package/dist/shared/chunk-VEXGLSUP.js +9 -0
  140. package/dist/shared/chunk-W4DP2HKI.js +3 -0
  141. package/dist/shared/chunk-W6X5NC5M.js +3 -0
  142. package/dist/shared/chunk-WF7I53QW.js +20 -0
  143. package/dist/shared/chunk-XBV2Q4OR.js +16 -0
  144. package/dist/shared/chunk-XGI243DO.js +3 -0
  145. package/dist/shared/chunk-XL6LPHCI.js +3 -0
  146. package/dist/shared/chunk-Z4S5CCLQ.js +16 -0
  147. package/dist/shared/datasources/external/facebook/posts/fetcher.d.ts +7 -16
  148. package/dist/shared/datasources/external/facebook/posts/fetcher.d.ts.map +1 -0
  149. package/dist/shared/datasources/external/facebook/posts/sample.d.ts +26 -0
  150. package/dist/shared/datasources/external/facebook/posts/sample.d.ts.map +1 -0
  151. package/dist/shared/datasources/external/facebook/posts/schema.d.ts +23 -26
  152. package/dist/shared/datasources/external/facebook/posts/schema.d.ts.map +1 -0
  153. package/dist/shared/datasources/external/facebook/posts/tests/fetcher.test.d.ts +2 -0
  154. package/dist/shared/datasources/external/facebook/posts/tests/fetcher.test.d.ts.map +1 -0
  155. package/dist/shared/datasources/external/instagram/feed/fetcher.d.ts +7 -16
  156. package/dist/shared/datasources/external/instagram/feed/fetcher.d.ts.map +1 -0
  157. package/dist/shared/datasources/external/instagram/feed/sample.d.ts +3 -0
  158. package/dist/shared/datasources/external/instagram/feed/sample.d.ts.map +1 -0
  159. package/dist/shared/datasources/external/instagram/feed/schema.d.ts +16 -19
  160. package/dist/shared/datasources/external/instagram/feed/schema.d.ts.map +1 -0
  161. package/dist/shared/datasources/external/instagram/feed/tests/fetcher.test.d.ts +2 -0
  162. package/dist/shared/datasources/external/instagram/feed/tests/fetcher.test.d.ts.map +1 -0
  163. package/dist/shared/datasources/external/json/fetcher.d.ts +4 -13
  164. package/dist/shared/datasources/external/json/fetcher.d.ts.map +1 -0
  165. package/dist/shared/datasources/external/json/options.d.ts +7 -10
  166. package/dist/shared/datasources/external/json/options.d.ts.map +1 -0
  167. package/dist/shared/datasources/external/json/tests/fetcher.test.d.ts +2 -0
  168. package/dist/shared/datasources/external/json/tests/fetcher.test.d.ts.map +1 -0
  169. package/dist/shared/datasources/external/mastodon/account/fetcher.d.ts +5 -14
  170. package/dist/shared/datasources/external/mastodon/account/fetcher.d.ts.map +1 -0
  171. package/dist/shared/datasources/external/mastodon/account/sample.d.ts +30 -0
  172. package/dist/shared/datasources/external/mastodon/account/sample.d.ts.map +1 -0
  173. package/dist/shared/datasources/external/mastodon/account/schema.d.ts +37 -40
  174. package/dist/shared/datasources/external/mastodon/account/schema.d.ts.map +1 -0
  175. package/dist/shared/datasources/external/mastodon/account/tests/fetcher.test.d.ts +2 -0
  176. package/dist/shared/datasources/external/mastodon/account/tests/fetcher.test.d.ts.map +1 -0
  177. package/dist/shared/datasources/external/mastodon/options.d.ts +6 -9
  178. package/dist/shared/datasources/external/mastodon/options.d.ts.map +1 -0
  179. package/dist/shared/datasources/external/mastodon/status/fetcher.d.ts +5 -14
  180. package/dist/shared/datasources/external/mastodon/status/fetcher.d.ts.map +1 -0
  181. package/dist/shared/datasources/external/mastodon/status/sample.array.d.ts +2 -3
  182. package/dist/shared/datasources/external/mastodon/status/sample.array.d.ts.map +1 -0
  183. package/dist/shared/datasources/external/mastodon/status/sample.single.d.ts +2 -3
  184. package/dist/shared/datasources/external/mastodon/status/sample.single.d.ts.map +1 -0
  185. package/dist/shared/datasources/external/mastodon/status/schema.d.ts +233 -235
  186. package/dist/shared/datasources/external/mastodon/status/schema.d.ts.map +1 -0
  187. package/dist/shared/datasources/external/mastodon/status/tests/fetcher.test.d.ts +2 -0
  188. package/dist/shared/datasources/external/mastodon/status/tests/fetcher.test.d.ts.map +1 -0
  189. package/dist/shared/datasources/external/meta/oauth/config.d.ts +28 -21
  190. package/dist/shared/datasources/external/meta/oauth/config.d.ts.map +1 -0
  191. package/dist/shared/datasources/external/meta/oauth/config.js +3 -1
  192. package/dist/shared/datasources/external/meta/options.d.ts +6 -9
  193. package/dist/shared/datasources/external/meta/options.d.ts.map +1 -0
  194. package/dist/shared/datasources/external/rss/fetcher.d.ts +5 -14
  195. package/dist/shared/datasources/external/rss/fetcher.d.ts.map +1 -0
  196. package/dist/shared/datasources/external/rss/options.d.ts +6 -9
  197. package/dist/shared/datasources/external/rss/options.d.ts.map +1 -0
  198. package/dist/shared/datasources/external/rss/sample.d.ts +3 -0
  199. package/dist/shared/datasources/external/rss/sample.d.ts.map +1 -0
  200. package/dist/shared/datasources/external/rss/schema.d.ts +14 -17
  201. package/dist/shared/datasources/external/rss/schema.d.ts.map +1 -0
  202. package/dist/shared/datasources/external/rss/tests/fetcher.test.d.ts +2 -0
  203. package/dist/shared/datasources/external/rss/tests/fetcher.test.d.ts.map +1 -0
  204. package/dist/shared/datasources/external/threads/media/fetcher.d.ts +7 -16
  205. package/dist/shared/datasources/external/threads/media/fetcher.d.ts.map +1 -0
  206. package/dist/shared/datasources/external/threads/media/sample.d.ts +40 -0
  207. package/dist/shared/datasources/external/threads/media/sample.d.ts.map +1 -0
  208. package/dist/shared/datasources/external/threads/media/schema.d.ts +22 -25
  209. package/dist/shared/datasources/external/threads/media/schema.d.ts.map +1 -0
  210. package/dist/shared/datasources/external/tiktok/oauth/config.d.ts +20 -22
  211. package/dist/shared/datasources/external/tiktok/oauth/config.d.ts.map +1 -0
  212. package/dist/shared/datasources/external/tiktok/oauth/config.js +3 -1
  213. package/dist/shared/datasources/external/tiktok/video/fetcher.d.ts +7 -16
  214. package/dist/shared/datasources/external/tiktok/video/fetcher.d.ts.map +1 -0
  215. package/dist/shared/datasources/external/tiktok/video/options.d.ts +6 -9
  216. package/dist/shared/datasources/external/tiktok/video/options.d.ts.map +1 -0
  217. package/dist/shared/datasources/external/tiktok/video/sample.d.ts +15 -0
  218. package/dist/shared/datasources/external/tiktok/video/sample.d.ts.map +1 -0
  219. package/dist/shared/datasources/external/tiktok/video/schema.d.ts +18 -21
  220. package/dist/shared/datasources/external/tiktok/video/schema.d.ts.map +1 -0
  221. package/dist/shared/datasources/external/youtube/list/fetcher.d.ts +7 -16
  222. package/dist/shared/datasources/external/youtube/list/fetcher.d.ts.map +1 -0
  223. package/dist/shared/datasources/external/youtube/list/options.d.ts +10 -13
  224. package/dist/shared/datasources/external/youtube/list/options.d.ts.map +1 -0
  225. package/dist/shared/datasources/external/youtube/list/sample.d.ts +38 -0
  226. package/dist/shared/datasources/external/youtube/list/sample.d.ts.map +1 -0
  227. package/dist/shared/datasources/external/youtube/list/schema.d.ts +32 -35
  228. package/dist/shared/datasources/external/youtube/list/schema.d.ts.map +1 -0
  229. package/dist/shared/datasources/external/youtube/oauth/config.d.ts +20 -22
  230. package/dist/shared/datasources/external/youtube/oauth/config.d.ts.map +1 -0
  231. package/dist/shared/datasources/external/youtube/oauth/config.js +3 -1
  232. package/dist/shared/datasources/fetcher.d.ts +9 -0
  233. package/dist/shared/datasources/fetcher.d.ts.map +1 -0
  234. package/dist/shared/datasources/internal/contact-info/schema.d.ts +12 -15
  235. package/dist/shared/datasources/internal/contact-info/schema.d.ts.map +1 -0
  236. package/dist/shared/datasources/internal/faq/schema.d.ts +8 -11
  237. package/dist/shared/datasources/internal/faq/schema.d.ts.map +1 -0
  238. package/dist/shared/datasources/internal/links/schema.d.ts +8 -11
  239. package/dist/shared/datasources/internal/links/schema.d.ts.map +1 -0
  240. package/dist/shared/datasources/provider-options.d.ts +6 -0
  241. package/dist/shared/datasources/provider-options.d.ts.map +1 -0
  242. package/dist/shared/datasources/samples.d.ts +4 -13
  243. package/dist/shared/datasources/samples.d.ts.map +1 -0
  244. package/dist/shared/datasources/types.d.ts +100 -9
  245. package/dist/shared/datasources/types.d.ts.map +1 -0
  246. package/dist/shared/datasources/utils.d.ts +2 -3
  247. package/dist/shared/datasources/utils.d.ts.map +1 -0
  248. package/dist/shared/datasources.d.ts +4 -9
  249. package/dist/shared/datasources.d.ts.map +1 -0
  250. package/dist/shared/datasources.js +3 -2
  251. package/dist/shared/env.d.ts +3 -5
  252. package/dist/shared/env.d.ts.map +1 -0
  253. package/dist/shared/env.js +2 -1
  254. package/dist/shared/errors.d.ts +2 -1
  255. package/dist/shared/errors.d.ts.map +1 -0
  256. package/dist/shared/errors.js +2 -1
  257. package/dist/shared/index.d.ts +2 -2
  258. package/dist/shared/index.d.ts.map +1 -0
  259. package/dist/shared/layout-constants.d.ts +4 -5
  260. package/dist/shared/layout-constants.d.ts.map +1 -0
  261. package/dist/shared/layout-constants.js +3 -2
  262. package/dist/shared/manifest.d.ts +13 -34
  263. package/dist/shared/manifest.d.ts.map +1 -0
  264. package/dist/shared/metafile-esm.json +1 -1
  265. package/dist/shared/oauth.d.ts +10 -0
  266. package/dist/shared/oauth.d.ts.map +1 -0
  267. package/dist/shared/page.d.ts +921 -9
  268. package/dist/shared/page.d.ts.map +1 -0
  269. package/dist/shared/page.js +3 -2
  270. package/dist/shared/responsive.d.ts +4 -6
  271. package/dist/shared/responsive.d.ts.map +1 -0
  272. package/dist/shared/responsive.js +2 -1
  273. package/dist/shared/social-icons.d.ts +2 -3
  274. package/dist/shared/social-icons.d.ts.map +1 -0
  275. package/dist/shared/tests/attributes.test.d.ts +2 -0
  276. package/dist/shared/tests/attributes.test.d.ts.map +1 -0
  277. package/dist/shared/theme.d.ts +50 -33
  278. package/dist/shared/theme.d.ts.map +1 -0
  279. package/dist/shared/theme.js +3 -2
  280. package/dist/shared/themes/all-themes.d.ts +3 -6
  281. package/dist/shared/themes/all-themes.d.ts.map +1 -0
  282. package/dist/shared/themes/all-themes.js +2 -1
  283. package/dist/shared/themes/color-system.d.ts +24 -27
  284. package/dist/shared/themes/color-system.d.ts.map +1 -0
  285. package/dist/shared/themes/color-system.js +2 -1
  286. package/dist/shared/utils/invariant.d.ts +2 -3
  287. package/dist/shared/utils/invariant.d.ts.map +1 -0
  288. package/dist/shared/utils/invariant.js +3 -2
  289. package/package.json +5 -14
  290. package/custom-attrs.d.ts +0 -63
  291. package/dist/shared/ajv.js +0 -2
  292. package/dist/shared/datarecords/types.d.ts +0 -32
  293. package/dist/shared/datarecords/types.js +0 -2
  294. package/dist/shared/datasources/external/facebook/posts/fetcher.js +0 -2
  295. package/dist/shared/datasources/external/facebook/posts/schema.js +0 -2
  296. package/dist/shared/datasources/external/instagram/feed/fetcher.js +0 -2
  297. package/dist/shared/datasources/external/instagram/feed/schema.js +0 -2
  298. package/dist/shared/datasources/external/json/fetcher.js +0 -2
  299. package/dist/shared/datasources/external/json/options.js +0 -2
  300. package/dist/shared/datasources/external/mastodon/account/fetcher.js +0 -2
  301. package/dist/shared/datasources/external/mastodon/account/schema.js +0 -2
  302. package/dist/shared/datasources/external/mastodon/options.js +0 -2
  303. package/dist/shared/datasources/external/mastodon/status/fetcher.js +0 -2
  304. package/dist/shared/datasources/external/mastodon/status/sample.array.js +0 -2
  305. package/dist/shared/datasources/external/mastodon/status/sample.single.js +0 -2
  306. package/dist/shared/datasources/external/mastodon/status/schema.js +0 -2
  307. package/dist/shared/datasources/external/meta/options.js +0 -2
  308. package/dist/shared/datasources/external/rss/fetcher.js +0 -2
  309. package/dist/shared/datasources/external/rss/options.js +0 -2
  310. package/dist/shared/datasources/external/rss/schema.js +0 -2
  311. package/dist/shared/datasources/external/threads/media/fetcher.js +0 -2
  312. package/dist/shared/datasources/external/threads/media/schema.js +0 -2
  313. package/dist/shared/datasources/external/tiktok/video/fetcher.js +0 -2
  314. package/dist/shared/datasources/external/tiktok/video/options.js +0 -2
  315. package/dist/shared/datasources/external/tiktok/video/schema.js +0 -2
  316. package/dist/shared/datasources/external/youtube/list/fetcher.js +0 -2
  317. package/dist/shared/datasources/external/youtube/list/options.js +0 -2
  318. package/dist/shared/datasources/external/youtube/list/schema.js +0 -2
  319. package/dist/shared/datasources/internal/contact-info/schema.js +0 -2
  320. package/dist/shared/datasources/internal/faq/schema.js +0 -2
  321. package/dist/shared/datasources/internal/links/schema.js +0 -2
  322. package/dist/shared/datasources/samples.js +0 -2
  323. package/dist/shared/datasources/types.js +0 -2
  324. package/dist/shared/datasources/utils.js +0 -2
  325. package/dist/shared/datasources-97V9CclE.d.ts +0 -316
  326. package/dist/shared/index.js +0 -2
  327. package/dist/shared/manifest.js +0 -2
  328. package/dist/shared/social-icons.js +0 -2
  329. package/dist/shared/template-config.d.ts +0 -9
  330. package/dist/shared/template-config.js +0 -1
  331. package/dist/shared/utils/layout-utils.d.ts +0 -24
  332. package/dist/shared/utils/layout-utils.js +0 -2
  333. package/env.d.ts +0 -24
@@ -0,0 +1,56 @@
1
+ /*!
2
+ * parse-gitignore <https://github.com/jonschlinkert/parse-gitignore>
3
+ * Copyright (c) 2015-present, Jon Schlinkert.
4
+ * Released under the MIT License.
5
+ *
6
+ * Converted to typescript by Matthias E. <matthias@enpage.co>
7
+ */
8
+ interface ParseOptions {
9
+ path?: string;
10
+ dedupe?: boolean;
11
+ unique?: boolean;
12
+ ignore?: string[];
13
+ unignore?: string[];
14
+ format?: boolean;
15
+ formatSection?: (section: Section) => string;
16
+ }
17
+ interface Section {
18
+ name: string;
19
+ comment?: string;
20
+ patterns: string[];
21
+ }
22
+ interface ParsedGitignore {
23
+ sections: Section[];
24
+ patterns: string[];
25
+ path?: string;
26
+ input: Buffer;
27
+ format: (opts?: ParseOptions) => string;
28
+ dedupe: (opts?: ParseOptions) => ParsedGitignore;
29
+ globs: (opts?: ParseOptions) => GlobResult[];
30
+ }
31
+ interface GlobResult {
32
+ type: "ignore" | "unignore";
33
+ path: string | null;
34
+ patterns: string[];
35
+ index: number;
36
+ }
37
+ declare const patterns: (input: string) => string[];
38
+ declare const parse: (input: string | ParsedGitignore, options?: ParseOptions) => ParsedGitignore;
39
+ declare const parseFile: (filepath: string, options?: ParseOptions) => ParsedGitignore;
40
+ declare const dedupe: (input: string | ParsedGitignore, options: ParseOptions) => ParsedGitignore;
41
+ declare const globs: (input: string | ParsedGitignore, options?: ParseOptions) => GlobResult[];
42
+ /**
43
+ * Formats a .gitignore section
44
+ */
45
+ declare const formatSection: (section?: Section) => string;
46
+ /**
47
+ * Format a .gitignore file from the given input or object from `.parse()`.
48
+ * @param {String | ParsedGitignore} input File path or contents.
49
+ * @param {ParseOptions} options
50
+ * @return {String} Returns formatted string.
51
+ * @api public
52
+ */
53
+ declare const format: (input: string | ParsedGitignore, options?: ParseOptions) => string;
54
+ export { parse, parseFile, dedupe, format, globs, formatSection, patterns, type ParseOptions, type Section, type ParsedGitignore, type GlobResult, };
55
+ export default parse;
56
+ //# sourceMappingURL=parse-gitignore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-gitignore.d.ts","sourceRoot":"","sources":["../../../../../src/node/cli/commands/publish/parse-gitignore.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,UAAU,YAAY;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAC;CAC9C;AAED,UAAU,OAAO;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,UAAU,eAAe;IACvB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,YAAY,KAAK,MAAM,CAAC;IACxC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,YAAY,KAAK,eAAe,CAAC;IACjD,KAAK,EAAE,CAAC,IAAI,CAAC,EAAE,YAAY,KAAK,UAAU,EAAE,CAAC;CAC9C;AAED,UAAU,UAAU;IAClB,IAAI,EAAE,QAAQ,GAAG,UAAU,CAAC;IAC5B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AAaD,QAAA,MAAM,QAAQ,UAAW,MAAM,KAAG,MAAM,EAGc,CAAC;AAEvD,QAAA,MAAM,KAAK,UAAW,MAAM,GAAG,eAAe,YAAW,YAAY,KAAQ,eAuD5E,CAAC;AAEF,QAAA,MAAM,SAAS,aAAc,MAAM,YAAY,YAAY,KAAG,eACX,CAAC;AAEpD,QAAA,MAAM,MAAM,UAAW,MAAM,GAAG,eAAe,WAAW,YAAY,KAAG,eAkCxE,CAAC;AA2BF,QAAA,MAAM,KAAK,UAAW,MAAM,GAAG,eAAe,YAAW,YAAY,KAAQ,UAAU,EAyCtF,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,aAAa,aAAa,OAAO,KAAgC,MAStE,CAAC;AAEF;;;;;;GAMG;AACH,QAAA,MAAM,MAAM,UAAW,MAAM,GAAG,eAAe,YAAW,YAAY,KAAQ,MAY7E,CAAC;AAEF,OAAO,EACL,KAAK,EACL,SAAS,EACT,MAAM,EACN,MAAM,EACN,KAAK,EACL,aAAa,EACb,QAAQ,EACR,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,eAAe,EACpB,KAAK,UAAU,GAChB,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -1,4 +1,5 @@
1
- /*! Enpage - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
2
+
2
3
  import*as p from"node:fs";var h=/[<>"|?*\n\r\t\f\x00-\x1F]/,P=/(?:^|\/)[*]{2}($|\/)/,G=248,S=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),y=t=>typeof t=="string"&&t.length<=G&&!h.test(t),d=t=>t.split(/\r\n?|\n/),b=t=>t.startsWith("#"),O=t=>S(t)&&Array.isArray(t.patterns)&&Array.isArray(t.sections),$=t=>d(t).map(e=>e.trim()).filter(e=>e!==""&&!b(e)),u=(t,e={})=>{let l=e.path;if(O(t))return t;y(t)&&p.existsSync(t)&&(l=t,t=p.readFileSync(t,"utf8"));let c=d(t),a=new Map,n={sections:[],patterns:[]},o={name:"default",patterns:[]},s=null;for(let r of c){let i=r.trim();if(i.startsWith("#")){let[,g]=/^#+\s*(.*)\s*$/.exec(i)||[];if(s){a.delete(s.name),s.comment=s.comment?`${s.comment}
3
4
  ${i}`:i,s.name=g?`${s.name.trim()}
4
5
  ${g.trim()}`:s.name.trim(),a.set(s.name.toLowerCase().trim(),s);continue}o={name:g?.trim()||"",comment:i,patterns:[]},a.set(o.name.toLowerCase(),o),n.sections.push(o),s=o;continue}i!==""&&(o.patterns.push(i),n.patterns.push(i)),s=null}return(e.dedupe===!0||e.unique===!0)&&(n=m(n,{...e,format:!1})),n.path=l,n.input=Buffer.from(t),n.format=r=>x(n,{...e,...r}),n.dedupe=r=>m(n,{...e,...r}),n.globs=r=>A(n,{path:l,...e,...r}),n},k=(t,e)=>u(p.readFileSync(t,"utf8"),e),m=(t,e)=>{let l=u(t,{...e,dedupe:!1}),c=new Map,a={sections:[],patterns:[]},n;for(let o of l.sections){let{name:s="",comment:r,patterns:i}=o,g=s.trim().toLowerCase();for(let f of i)a.patterns.includes(f)||a.patterns.push(f);s&&c.has(g)?(n=c.get(g),n.patterns=[...n.patterns,...i]):(n={name:s,comment:r,patterns:i},a.sections.push(n),c.set(g,n))}for(let o of a.sections)o.patterns=[...new Set(o.patterns)];return a},w=t=>{if(P.test(t))return t;let e=!1;return t.startsWith("/")?(t=t.slice(1),e=!0):t.slice(1,t.length-1).includes("/")&&(e=!0),t+=t.endsWith("/")?"**/":"/**",e?t:`**/${t}`},A=(t,e={})=>{let l=u(t,e),c=[],a=0,n=l.patterns.concat(e.ignore||[]).concat((e.unignore||[]).map(s=>s.startsWith("!")?s:`!${s}`)),o=(s,r)=>{let i=c[c.length-1],g=s?"unignore":"ignore";i&&i.type===g?i.patterns.includes(r)||i.patterns.push(r):(c.push({type:g,path:e.path||null,patterns:[r],index:a}),a++)};for(let s of n){let r="";s.startsWith("!")&&(s=s.slice(1),r="!"),o(r,s.startsWith("/")?s.slice(1):s),o(r,w(s))}return c},R=(t={name:"",patterns:[]})=>{let e=[t.comment||""];return t.patterns?.length&&(e.push(t.patterns.join(`
@@ -0,0 +1,20 @@
1
+ interface UploadStats {
2
+ fileName: string;
3
+ fileSize: number;
4
+ uploadDuration: number;
5
+ statusCode: number;
6
+ serverResponse: string;
7
+ }
8
+ interface UploadConfig {
9
+ maxDataSize: number;
10
+ retryAttempts: number;
11
+ retryDelay: number;
12
+ }
13
+ export declare function uploadTemplate(templateId: string, templateDir: string, token: string, dryRun?: boolean, config?: Partial<UploadConfig>): Promise<{
14
+ filesCount: number;
15
+ uploadedFiles: UploadStats[];
16
+ failedFiles: PromiseRejectedResult[];
17
+ success: boolean;
18
+ }>;
19
+ export {};
20
+ //# sourceMappingURL=uploader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uploader.d.ts","sourceRoot":"","sources":["../../../../../src/node/cli/commands/publish/uploader.ts"],"names":[],"mappings":"AAkBA,UAAU,WAAW;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;CACxB;AAaD,UAAU,YAAY;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB;AAsLD,wBAAsB,cAAc,CAClC,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,MAAM,UAAQ,EACd,MAAM,GAAE,OAAO,CAAC,YAAY,CAAM;;;;;GAoFnC"}
@@ -1,13 +1,14 @@
1
- /*! Enpage - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
2
- import b from"node:path";import O from"node:fs";import ge from"node:crypto";import me from"fast-glob";var N="enpage-cli";var Ue=process.env.PUBLIC_ENPAGE_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",y=process.env.PUBLIC_ENPAGE_API_BASE_URL??"https://api.enpage.co",Ae=process.env.PUBLIC_ENPAGE_FRONTEND_BASE_URL??"https://enpage.co",I=10;import B from"node:http";import fe from"node:https";import{pipeline as ye}from"node:stream";import{createLogger as q}from"vite";var D="0.0.67";import _ from"chalk";function H(e,t,n=!1){let i=q(e==="debug"?"info":e,{prefix:"[enpage]",allowClearScreen:t});return n&&i.info(_.hex("#7270c6").bold(`\u{1F680} Enpage v${D}
3
- `)),{...i,success:(r,s)=>i.info(_.green(r),s),error:(r,s)=>i.error(_.red(r),s),warn:(r,s)=>i.warn(_.yellow(r),s),warnOnce:(r,s)=>i.warnOnce(_.yellow(r),s),debug:(r,s)=>{e==="debug"&&i.info(_.gray(r),s)}}}var g=H();import z from"chalk";import he from"form-data";import*as k from"node:fs";var X=/[<>"|?*\n\r\t\f\x00-\x1F]/,J=/(?:^|\/)[*]{2}($|\/)/,V=248,K=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),Y=e=>typeof e=="string"&&e.length<=V&&!X.test(e),Q=e=>e.split(/\r\n?|\n/);var Z=e=>K(e)&&Array.isArray(e.patterns)&&Array.isArray(e.sections);var C=(e,t={})=>{let n=t.path;if(Z(e))return e;Y(e)&&k.existsSync(e)&&(n=e,e=k.readFileSync(e,"utf8"));let i=Q(e),r=new Map,s={sections:[],patterns:[]},c={name:"default",patterns:[]},o=null;for(let a of i){let p=a.trim();if(p.startsWith("#")){let[,u]=/^#+\s*(.*)\s*$/.exec(p)||[];if(o){r.delete(o.name),o.comment=o.comment?`${o.comment}
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
2
+
3
+ import L from"node:path";import U from"node:fs";import ge from"node:crypto";import me from"fast-glob";var N="enpage-cli";var Oe=process.env.PUBLIC_ENPAGE_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",y=process.env.PUBLIC_ENPAGE_API_BASE_URL??"https://api.enpage.co",Ae=process.env.PUBLIC_ENPAGE_FRONTEND_BASE_URL??"https://enpage.co",I=10;import B from"node:http";import fe from"node:https";import{pipeline as ye}from"node:stream";import{createLogger as q}from"vite";var D="0.0.68";import _ from"chalk";function H(e,t,n=!1){let i=q(e==="debug"?"info":e,{prefix:"[enpage]",allowClearScreen:t});return n&&i.info(_.hex("#7270c6").bold(`\u{1F680} Enpage v${D}
4
+ `)),{...i,success:(r,s)=>i.info(_.green(r),s),error:(r,s)=>i.error(_.red(r),s),warn:(r,s)=>i.warn(_.yellow(r),s),warnOnce:(r,s)=>i.warnOnce(_.yellow(r),s),debug:(r,s)=>{e==="debug"&&i.info(_.gray(r),s)}}}var g=H();import z from"chalk";import he from"form-data";import*as C from"node:fs";var X=/[<>"|?*\n\r\t\f\x00-\x1F]/,J=/(?:^|\/)[*]{2}($|\/)/,V=248,K=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),Y=e=>typeof e=="string"&&e.length<=V&&!X.test(e),Q=e=>e.split(/\r\n?|\n/);var Z=e=>K(e)&&Array.isArray(e.patterns)&&Array.isArray(e.sections);var $=(e,t={})=>{let n=t.path;if(Z(e))return e;Y(e)&&C.existsSync(e)&&(n=e,e=C.readFileSync(e,"utf8"));let i=Q(e),r=new Map,s={sections:[],patterns:[]},c={name:"default",patterns:[]},o=null;for(let a of i){let p=a.trim();if(p.startsWith("#")){let[,u]=/^#+\s*(.*)\s*$/.exec(p)||[];if(o){r.delete(o.name),o.comment=o.comment?`${o.comment}
4
5
  ${p}`:p,o.name=u?`${o.name.trim()}
5
- ${u.trim()}`:o.name.trim(),r.set(o.name.toLowerCase().trim(),o);continue}c={name:u?.trim()||"",comment:p,patterns:[]},r.set(c.name.toLowerCase(),c),s.sections.push(c),o=c;continue}p!==""&&(c.patterns.push(p),s.patterns.push(p)),o=null}return(t.dedupe===!0||t.unique===!0)&&(s=G(s,{...t,format:!1})),s.path=n,s.input=Buffer.from(e),s.format=a=>se(s,{...t,...a}),s.dedupe=a=>G(s,{...t,...a}),s.globs=a=>te(s,{path:n,...t,...a}),s};var G=(e,t)=>{let n=C(e,{...t,dedupe:!1}),i=new Map,r={sections:[],patterns:[]},s;for(let c of n.sections){let{name:o="",comment:a,patterns:p}=c,u=o.trim().toLowerCase();for(let h of p)r.patterns.includes(h)||r.patterns.push(h);o&&i.has(u)?(s=i.get(u),s.patterns=[...s.patterns,...p]):(s={name:o,comment:a,patterns:p},r.sections.push(s),i.set(u,s))}for(let c of r.sections)c.patterns=[...new Set(c.patterns)];return r},ee=e=>{if(J.test(e))return e;let t=!1;return e.startsWith("/")?(e=e.slice(1),t=!0):e.slice(1,e.length-1).includes("/")&&(t=!0),e+=e.endsWith("/")?"**/":"/**",t?e:`**/${e}`},te=(e,t={})=>{let n=C(e,t),i=[],r=0,s=n.patterns.concat(t.ignore||[]).concat((t.unignore||[]).map(o=>o.startsWith("!")?o:`!${o}`)),c=(o,a)=>{let p=i[i.length-1],u=o?"unignore":"ignore";p&&p.type===u?p.patterns.includes(a)||p.patterns.push(a):(i.push({type:u,path:t.path||null,patterns:[a],index:r}),r++)};for(let o of s){let a="";o.startsWith("!")&&(o=o.slice(1),a="!"),c(a,o.startsWith("/")?o.slice(1):o),c(a,ee(o))}return i},re=(e={name:"",patterns:[]})=>{let t=[e.comment||""];return e.patterns?.length&&(t.push(e.patterns.join(`
6
+ ${u.trim()}`:o.name.trim(),r.set(o.name.toLowerCase().trim(),o);continue}c={name:u?.trim()||"",comment:p,patterns:[]},r.set(c.name.toLowerCase(),c),s.sections.push(c),o=c;continue}p!==""&&(c.patterns.push(p),s.patterns.push(p)),o=null}return(t.dedupe===!0||t.unique===!0)&&(s=G(s,{...t,format:!1})),s.path=n,s.input=Buffer.from(e),s.format=a=>se(s,{...t,...a}),s.dedupe=a=>G(s,{...t,...a}),s.globs=a=>te(s,{path:n,...t,...a}),s};var G=(e,t)=>{let n=$(e,{...t,dedupe:!1}),i=new Map,r={sections:[],patterns:[]},s;for(let c of n.sections){let{name:o="",comment:a,patterns:p}=c,u=o.trim().toLowerCase();for(let h of p)r.patterns.includes(h)||r.patterns.push(h);o&&i.has(u)?(s=i.get(u),s.patterns=[...s.patterns,...p]):(s={name:o,comment:a,patterns:p},r.sections.push(s),i.set(u,s))}for(let c of r.sections)c.patterns=[...new Set(c.patterns)];return r},ee=e=>{if(J.test(e))return e;let t=!1;return e.startsWith("/")?(e=e.slice(1),t=!0):e.slice(1,e.length-1).includes("/")&&(t=!0),e+=e.endsWith("/")?"**/":"/**",t?e:`**/${e}`},te=(e,t={})=>{let n=$(e,t),i=[],r=0,s=n.patterns.concat(t.ignore||[]).concat((t.unignore||[]).map(o=>o.startsWith("!")?o:`!${o}`)),c=(o,a)=>{let p=i[i.length-1],u=o?"unignore":"ignore";p&&p.type===u?p.patterns.includes(a)||p.patterns.push(a):(i.push({type:u,path:t.path||null,patterns:[a],index:r}),r++)};for(let o of s){let a="";o.startsWith("!")&&(o=o.slice(1),a="!"),c(a,o.startsWith("/")?o.slice(1):o),c(a,ee(o))}return i},re=(e={name:"",patterns:[]})=>{let t=[e.comment||""];return e.patterns?.length&&(t.push(e.patterns.join(`
6
7
  `)),t.push("")),t.join(`
7
- `)},se=(e,t={})=>{let n=C(e,t),i=t.formatSection||re,r=n.sections||n,s=[];for(let c of[].concat(r))s.push(i(c));return s.join(`
8
- `)};var j=C;import Se from"p-queue";import Ee from"ora";import{customAlphabet as Pe}from"nanoid";import oe from"conf";import L from"node:path";import ne from"node:crypto";import T from"node:fs";import{fileURLToPath as ie}from"node:url";import He from"chalk";var ae=ie(new URL(".",import.meta.url)),ce=le(),$=new oe({projectName:N,encryptionKey:ce,clearInvalidConfig:!0});function pe(){let e=ae;for(;e!==L.parse(e).root;){let t=L.join(e,"node_modules");if(T.existsSync(t))return t;e=L.dirname(e)}return null}function le(){let e=pe();if(!e)throw new Error("Could not find nearest node_modules directory.");let t=L.join(e,".enpage-tmp");T.existsSync(t)||T.mkdirSync(t,{recursive:!0,mode:448});let n=L.join(t,".enpage-key");if(!T.existsSync(n)){let r=ne.randomBytes(32).toString("hex");return T.writeFileSync(n,r,{mode:384,flush:!0}),r}return T.readFileSync(n,"utf8")}async function F(e,t,n={}){$.get("access_token")&&(n.Authorization=`Bearer ${$.get("access_token")}`);let i=await fetch(ue(e),{method:"POST",headers:{"Content-Type":t instanceof URLSearchParams?"application/x-www-form-urlencoded":"application/json",...n},body:t instanceof URLSearchParams?t:JSON.stringify(t)}).catch(r=>{g.error(`Fatal Error requesting API: ${r.message} (${r.cause.code})`),g.error("Please check your internet connection and try again, or retry later."),process.exit(1)});return de(i)}function ue(e){let t=new URL(y.endsWith("/")?y:`${y}/`);return new URL(e,t)}async function de(e){let t=e.headers.get("content-type")?.startsWith("application/json")?await e.json():await e.text();return e.ok?{isSuccess:!0,isError:!1,status:e.status,statusText:e.statusText,data:t}:{isSuccess:!1,isError:!0,status:e.status,statusText:e.statusText,data:t}}var w=class extends Error{constructor(n,i,r){super(`${n}: ${i}`);this.error=n;this.error_description=i;this.filename=r;this.name="UploadError"}},_e={maxDataSize:12*1024*1024,retryAttempts:2,retryDelay:1e3},Te=new B.Agent({keepAlive:!0,maxSockets:10,keepAliveMsecs:3e3});async function we(e){let t=b.join(e,".gitignore"),i=O.existsSync(t)?j(O.readFileSync(t,"utf-8")).patterns:[];return me("**/*",{cwd:e,onlyFiles:!0,dot:!0,absolute:!0,ignore:["node_modules/**",".cache/**","**/.DS_Store",".gitignore",".env",".env.*",".git/**","dist/**",...i]})}async function xe(e,t,n,i,r,s,c){let o=async a=>{try{return await Re(e,t,n,i,r,s,c)}catch(p){if(a<c.retryAttempts)return g.warn(`Retrying upload for ${t} (attempt ${a+1})`),await new Promise(u=>setTimeout(u,c.retryDelay)),o(a+1);throw p}};return o(0)}async function Re(e,t,n,i,r,s,c){return new Promise((o,a)=>{let p=O.statSync(e),u=b.basename(e),h=Date.now(),S=new he({maxDataSize:c.maxDataSize}),U=O.createReadStream(e),A=0,E=l=>{A+=l.length};U.on("data",E),S.append("file",U,{filename:u,knownLength:p.size});let P={agent:Te,method:"POST",headers:{authorization:`Bearer ${s}`,"x-enpage-template-file-path":t,"x-enpage-template-id":i,...S.getHeaders()}},f=(n.startsWith("https")?fe:B).request(n,P,l=>{let m="";l.on("data",x=>{m+=x}),l.on("end",()=>{let x=Date.now(),W={fileName:u,fileSize:p.size,uploadDuration:x-h,statusCode:l.statusCode??0,serverResponse:m};if(l.statusCode&&l.statusCode>=200&&l.statusCode<300)r.text=`Uploaded ${t}`,o(W);else{let R;if(l.headers["content-type"]?.startsWith("application/json")){let v=JSON.parse(m);R=new w(v.error||"unknown_error",v.error_description||"Unknown error occurred",t)}else R=new w("unknown_error",m||"Unknown error occurred",t);r.fail(`Failed to upload ${t} [${R.error}] ${R.error_description}`),a(R)}})});f.on("error",l=>{a(new w("request_error",l.message,t))}),ye(S,f,l=>{l&&a(new w("pipeline_error",`Pipeline failed for ${u}: ${l.message}`,t))})})}function Le(e,t,n){n.length>0?(g.error(z.red(`Failed to upload ${n.length} files:`)),n.forEach(i=>{let r=i.reason;g.error(`- ${r.filename}: ${r.error_description} (${r.error})`)})):g.info(z.green(`Uploaded ${t.length} files successfully for template ${e}.
9
- `))}async function mt(e,t,n,i=!1,r={}){let s={..._e,...r},c=new Se({concurrency:I}),o=await we(t),a=o.length,p={},u=Oe(),h=0;for(let d of o){let f=b.relative(t,d),l=await be(d);p[f]=l}i&&(g.info(`Dry run mode enabled. Skipping upload.
10
- `),g.info("The following files would have been uploaded:"),o.forEach(d=>g.info(`- ${d}`)),process.exit(0));let S=Ee(`Uploading ${a} files...`).start(),U=o.map(d=>{let f=b.resolve(t,d),l=b.relative(t,d),m=`${y}/v1/templates/${e}/upload/${u}`;return c.add(async()=>{let x=await xe(f,l,m,e,S,n,s);return h++,x})}),A=await Promise.allSettled(U);S.stop();let E=A.filter(d=>d.status==="fulfilled"),P=A.filter(d=>d.status==="rejected");if(Le(e,E.map(d=>d.value),P),!P.length&&E.length){let d=`${y}/v1/templates/${e}/upload/${u}/finalize`,l=await F(d,{signatures:p});if(l.isError)return g.error(`Failed to finalize upload: ${l.data.error_description} (${l.data.error})`),{filesCount:a,uploadedFiles:E.map(m=>m.value),failedFiles:[],success:!1}}return{filesCount:a,uploadedFiles:E.map(d=>d.value),failedFiles:P,success:P.length===0}}async function be(e){let t=await ge.subtle.digest("SHA-1",O.readFileSync(e));return Array.from(new Uint8Array(t)).map(n=>n.toString(16).padStart(2,"0")).join("")}function Oe(){let e=Pe("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",5),t=new Date,n=t.getUTCFullYear(),i=(t.getUTCMonth()+1).toString().padStart(2,"0"),r=t.getUTCDate().toString().padStart(2,"0"),s=t.getUTCHours().toString().padStart(2,"0"),c=t.getUTCMinutes().toString().padStart(2,"0"),o=t.getUTCSeconds().toString().padStart(2,"0");return`${n}${i}${r}${s}${c}${o}_${e()}`}export{mt as uploadTemplate};
8
+ `)},se=(e,t={})=>{let n=$(e,t),i=t.formatSection||re,r=n.sections||n,s=[];for(let c of[].concat(r))s.push(i(c));return s.join(`
9
+ `)};var j=$;import Se from"p-queue";import Ee from"ora";import{customAlphabet as Pe}from"nanoid";import oe from"conf";import b from"node:path";import ne from"node:crypto";import T from"node:fs";import{fileURLToPath as ie}from"node:url";import He from"chalk";var ae=ie(new URL(".",import.meta.url)),ce=le(),k=new oe({projectName:N,encryptionKey:ce,clearInvalidConfig:!0});function pe(){let e=ae;for(;e!==b.parse(e).root;){let t=b.join(e,"node_modules");if(T.existsSync(t))return t;e=b.dirname(e)}return null}function le(){let e=pe();if(!e)throw new Error("Could not find nearest node_modules directory.");let t=b.join(e,".enpage-tmp");T.existsSync(t)||T.mkdirSync(t,{recursive:!0,mode:448});let n=b.join(t,".enpage-key");if(!T.existsSync(n)){let r=ne.randomBytes(32).toString("hex");return T.writeFileSync(n,r,{mode:384,flush:!0}),r}return T.readFileSync(n,"utf8")}async function F(e,t,n={}){k.get("access_token")&&(n.Authorization=`Bearer ${k.get("access_token")}`);let i=await fetch(ue(e),{method:"POST",headers:{"Content-Type":t instanceof URLSearchParams?"application/x-www-form-urlencoded":"application/json",...n},body:t instanceof URLSearchParams?t:JSON.stringify(t)}).catch(r=>{g.error(`Fatal Error requesting API: ${r.message} (${r.cause.code})`),g.error("Please check your internet connection and try again, or retry later."),process.exit(1)});return de(i)}function ue(e){let t=new URL(y.endsWith("/")?y:`${y}/`);return new URL(e,t)}async function de(e){let t=e.headers.get("content-type")?.startsWith("application/json")?await e.json():await e.text();return e.ok?{isSuccess:!0,isError:!1,status:e.status,statusText:e.statusText,data:t}:{isSuccess:!1,isError:!0,status:e.status,statusText:e.statusText,data:t}}var w=class extends Error{constructor(n,i,r){super(`${n}: ${i}`);this.error=n;this.error_description=i;this.filename=r;this.name="UploadError"}},_e={maxDataSize:12*1024*1024,retryAttempts:2,retryDelay:1e3},Te=new B.Agent({keepAlive:!0,maxSockets:10,keepAliveMsecs:3e3});async function we(e){let t=L.join(e,".gitignore"),i=U.existsSync(t)?j(U.readFileSync(t,"utf-8")).patterns:[];return me("**/*",{cwd:e,onlyFiles:!0,dot:!0,absolute:!0,ignore:["node_modules/**",".cache/**","**/.DS_Store",".gitignore",".env",".env.*",".git/**","dist/**",...i]})}async function Re(e,t,n,i,r,s,c){let o=async a=>{try{return await xe(e,t,n,i,r,s,c)}catch(p){if(a<c.retryAttempts)return g.warn(`Retrying upload for ${t} (attempt ${a+1})`),await new Promise(u=>setTimeout(u,c.retryDelay)),o(a+1);throw p}};return o(0)}async function xe(e,t,n,i,r,s,c){return new Promise((o,a)=>{let p=U.statSync(e),u=L.basename(e),h=Date.now(),S=new he({maxDataSize:c.maxDataSize}),O=U.createReadStream(e),A=0,E=l=>{A+=l.length};O.on("data",E),S.append("file",O,{filename:u,knownLength:p.size});let P={agent:Te,method:"POST",headers:{authorization:`Bearer ${s}`,"x-enpage-template-file-path":t,"x-enpage-template-id":i,...S.getHeaders()}},f=(n.startsWith("https")?fe:B).request(n,P,l=>{let m="";l.on("data",R=>{m+=R}),l.on("end",()=>{let R=Date.now(),W={fileName:u,fileSize:p.size,uploadDuration:R-h,statusCode:l.statusCode??0,serverResponse:m};if(l.statusCode&&l.statusCode>=200&&l.statusCode<300)r.text=`Uploaded ${t}`,o(W);else{let x;if(l.headers["content-type"]?.startsWith("application/json")){let v=JSON.parse(m);x=new w(v.error||"unknown_error",v.error_description||"Unknown error occurred",t)}else x=new w("unknown_error",m||"Unknown error occurred",t);r.fail(`Failed to upload ${t} [${x.error}] ${x.error_description}`),a(x)}})});f.on("error",l=>{a(new w("request_error",l.message,t))}),ye(S,f,l=>{l&&a(new w("pipeline_error",`Pipeline failed for ${u}: ${l.message}`,t))})})}function be(e,t,n){n.length>0?(g.error(z.red(`Failed to upload ${n.length} files:`)),n.forEach(i=>{let r=i.reason;g.error(`- ${r.filename}: ${r.error_description} (${r.error})`)})):g.info(z.green(`Uploaded ${t.length} files successfully for template ${e}.
10
+ `))}async function mt(e,t,n,i=!1,r={}){let s={..._e,...r},c=new Se({concurrency:I}),o=await we(t),a=o.length,p={},u=Ue(),h=0;for(let d of o){let f=L.relative(t,d),l=await Le(d);p[f]=l}i&&(g.info(`Dry run mode enabled. Skipping upload.
11
+ `),g.info("The following files would have been uploaded:"),o.forEach(d=>g.info(`- ${d}`)),process.exit(0));let S=Ee(`Uploading ${a} files...`).start(),O=o.map(d=>{let f=L.resolve(t,d),l=L.relative(t,d),m=`${y}/v1/templates/${e}/upload/${u}`;return c.add(async()=>{let R=await Re(f,l,m,e,S,n,s);return h++,R})}),A=await Promise.allSettled(O);S.stop();let E=A.filter(d=>d.status==="fulfilled"),P=A.filter(d=>d.status==="rejected");if(be(e,E.map(d=>d.value),P),!P.length&&E.length){let d=`${y}/v1/templates/${e}/upload/${u}/finalize`,l=await F(d,{signatures:p});if(l.isError)return g.error(`Failed to finalize upload: ${l.data.error_description} (${l.data.error})`),{filesCount:a,uploadedFiles:E.map(m=>m.value),failedFiles:[],success:!1}}return{filesCount:a,uploadedFiles:E.map(d=>d.value),failedFiles:P,success:P.length===0}}async function Le(e){let t=await ge.subtle.digest("SHA-1",U.readFileSync(e));return Array.from(new Uint8Array(t)).map(n=>n.toString(16).padStart(2,"0")).join("")}function Ue(){let e=Pe("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",5),t=new Date,n=t.getUTCFullYear(),i=(t.getUTCMonth()+1).toString().padStart(2,"0"),r=t.getUTCDate().toString().padStart(2,"0"),s=t.getUTCHours().toString().padStart(2,"0"),c=t.getUTCMinutes().toString().padStart(2,"0"),o=t.getUTCSeconds().toString().padStart(2,"0");return`${n}${i}${r}${s}${c}${o}_${e()}`}export{mt as uploadTemplate};
11
12
  /*!
12
13
  * parse-gitignore <https://github.com/jonschlinkert/parse-gitignore>
13
14
  * Copyright (c) 2015-present, Jon Schlinkert.
@@ -0,0 +1,11 @@
1
+ export declare const CLI_PROJECT_NAME = "enpage-cli";
2
+ export declare const CLI_LOGIN_POLL_INTERVAL = 5000;
3
+ export declare const CLI_LOGIN_CLIENT_ID: string;
4
+ export declare const API_BASE_URL: string;
5
+ export declare const FRONTEND_BASE_URL: string;
6
+ export declare const DEFAULT_UPLOAD_MAX_CONCURRENCY = 10;
7
+ export declare const OAUTH_ENDPOINT_DEVICE_CODE = "oauth/devicecode";
8
+ export declare const OAUTH_ENDPOINT_TOKEN = "oauth/token";
9
+ export declare const OAUTH_ENDPOINT_USER_INFO = "oauth/userinfo";
10
+ export declare const API_ENDPOINT_REGISTER_TEMPLATE = "v1/templates";
11
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/node/cli/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,eAAe,CAAC;AAC7C,eAAO,MAAM,uBAAuB,OAAO,CAAC;AAC5C,eAAO,MAAM,mBAAmB,QACqD,CAAC;AACtF,eAAO,MAAM,YAAY,QAAoE,CAAC;AAC9F,eAAO,MAAM,iBAAiB,QAAqE,CAAC;AACpG,eAAO,MAAM,8BAA8B,KAAK,CAAC;AAEjD,eAAO,MAAM,0BAA0B,qBAAqB,CAAC;AAC7D,eAAO,MAAM,oBAAoB,gBAAgB,CAAC;AAClD,eAAO,MAAM,wBAAwB,mBAAmB,CAAC;AAEzD,eAAO,MAAM,8BAA8B,iBAAiB,CAAC"}
@@ -1,2 +1,3 @@
1
- /*! Enpage - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
2
+
2
3
  var _="enpage-cli",E=5e3,o=process.env.PUBLIC_ENPAGE_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",t=process.env.PUBLIC_ENPAGE_API_BASE_URL??"https://api.enpage.co",e=process.env.PUBLIC_ENPAGE_FRONTEND_BASE_URL??"https://enpage.co",N=10,I="oauth/devicecode",p="oauth/token",s="oauth/userinfo",A="v1/templates";export{t as API_BASE_URL,A as API_ENDPOINT_REGISTER_TEMPLATE,o as CLI_LOGIN_CLIENT_ID,E as CLI_LOGIN_POLL_INTERVAL,_ as CLI_PROJECT_NAME,N as DEFAULT_UPLOAD_MAX_CONCURRENCY,e as FRONTEND_BASE_URL,I as OAUTH_ENDPOINT_DEVICE_CODE,p as OAUTH_ENDPOINT_TOKEN,s as OAUTH_ENDPOINT_USER_INFO};
@@ -0,0 +1,2 @@
1
+ export declare function isLoggedIn(checkRemote?: boolean): Promise<boolean>;
2
+ //# sourceMappingURL=is-logged-in.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-logged-in.d.ts","sourceRoot":"","sources":["../../../src/node/cli/is-logged-in.ts"],"names":[],"mappings":"AAGA,wBAAsB,UAAU,CAAC,WAAW,UAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,CAwBtE"}
@@ -0,0 +1,4 @@
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
2
+
3
+ var O=Object.defineProperty;var p=(e,t)=>()=>(e&&(t=e(e=0)),t);var S=(e,t)=>{for(var s in t)O(e,s,{get:t[s],enumerable:!0})};var y,F,g,M,f,m=p(()=>{"use strict";y="enpage-cli",F=process.env.PUBLIC_ENPAGE_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",g=process.env.PUBLIC_ENPAGE_API_BASE_URL??"https://api.enpage.co",M=process.env.PUBLIC_ENPAGE_FRONTEND_BASE_URL??"https://enpage.co",f="oauth/userinfo"});import N from"conf";import u from"node:path";import P from"node:crypto";import a from"node:fs";import{fileURLToPath as k}from"node:url";import X from"chalk";function I(){let e=v;for(;e!==u.parse(e).root;){let t=u.join(e,"node_modules");if(a.existsSync(t))return t;e=u.dirname(e)}return null}function b(){let e=I();if(!e)throw new Error("Could not find nearest node_modules directory.");let t=u.join(e,".enpage-tmp");a.existsSync(t)||a.mkdirSync(t,{recursive:!0,mode:448});let s=u.join(t,".enpage-key");if(!a.existsSync(s)){let r=P.randomBytes(32).toString("hex");return a.writeFileSync(s,r,{mode:384,flush:!0}),r}return a.readFileSync(s,"utf8")}var v,w,i,l=p(()=>{"use strict";m();v=k(new URL(".",import.meta.url)),w=b(),i=new N({projectName:y,encryptionKey:w,clearInvalidConfig:!0})});var h,E=p(()=>{h="0.0.68"});import{createLogger as U}from"vite";import c from"chalk";function C(e,t,s=!1){let o=U(e==="debug"?"info":e,{prefix:"[enpage]",allowClearScreen:t});return s&&o.info(c.hex("#7270c6").bold(`\u{1F680} Enpage v${h}
4
+ `)),{...o,success:(r,n)=>o.info(c.green(r),n),error:(r,n)=>o.error(c.red(r),n),warn:(r,n)=>o.warn(c.yellow(r),n),warnOnce:(r,n)=>o.warnOnce(c.yellow(r),n),debug:(r,n)=>{e==="debug"&&o.info(c.gray(r),n)}}}var d,_=p(()=>{"use strict";E();d=C()});var x={};S(x,{get:()=>j,post:()=>D});async function D(e,t,s={}){i.get("access_token")&&(s.Authorization=`Bearer ${i.get("access_token")}`);let o=await fetch(T(e),{method:"POST",headers:{"Content-Type":t instanceof URLSearchParams?"application/x-www-form-urlencoded":"application/json",...s},body:t instanceof URLSearchParams?t:JSON.stringify(t)}).catch(r=>{d.error(`Fatal Error requesting API: ${r.message} (${r.cause.code})`),d.error("Please check your internet connection and try again, or retry later."),process.exit(1)});return L(o)}async function j(e,t={}){i.get("access_token")&&(t.Authorization=`Bearer ${i.get("access_token")}`);let s=await fetch(T(e),{headers:t,method:"GET"}).catch(o=>{d.error(`Fatal Error requesting API: ${o.message} (${o.cause.code})`),d.error("Please check your internet connection and try again, or retry later."),process.exit(1)});return L(s)}function T(e){let t=new URL(g.endsWith("/")?g:`${g}/`);return new URL(e,t)}async function L(e){let t=e.headers.get("content-type")?.startsWith("application/json")?await e.json():await e.text();return e.ok?{isSuccess:!0,isError:!1,status:e.status,statusText:e.statusText,data:t}:{isSuccess:!1,isError:!0,status:e.status,statusText:e.statusText,data:t}}var R=p(()=>{"use strict";_();m();l()});m();l();async function ce(e=!1){let t=i.get("access_token"),s=i.get("expires_at");if(!t)return!1;if(s&&s<Date.now())return console.log("Seems like your token expired..."),!1;if(!e)return!0;let{get:o}=await Promise.resolve().then(()=>(R(),x)),{isSuccess:r}=await o(f);return r}export{ce as isLoggedIn};
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=program.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../../../src/node/cli/program.ts"],"names":[],"mappings":""}