@upstart.gg/sdk 0.0.78 → 0.0.79

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 (269) hide show
  1. package/dist/node/cli/api.js +2 -2
  2. package/dist/node/cli/commands/build/cmd-build.js +1 -1
  3. package/dist/node/cli/commands/login/cmd-login.js +2 -2
  4. package/dist/node/cli/commands/logout/cmd-logout.js +1 -1
  5. package/dist/node/cli/commands/publish/cmd-publish.js +3 -3
  6. package/dist/node/cli/commands/publish/parse-gitignore.js +1 -1
  7. package/dist/node/cli/commands/publish/uploader.js +2 -2
  8. package/dist/node/cli/constants.js +1 -1
  9. package/dist/node/cli/is-logged-in.js +2 -2
  10. package/dist/node/cli/program.js +3 -3
  11. package/dist/node/cli/store.js +1 -1
  12. package/dist/node/cli/types.js +1 -1
  13. package/dist/node/cli/utils.js +1 -1
  14. package/dist/node/shared/config.d.ts.map +1 -1
  15. package/dist/node/shared/config.js +5 -5
  16. package/dist/node/shared/logger.js +2 -2
  17. package/dist/shared/ajv.d.ts +1 -0
  18. package/dist/shared/ajv.d.ts.map +1 -1
  19. package/dist/shared/ajv.js +2 -2
  20. package/dist/shared/analytics/init.js +1 -1
  21. package/dist/shared/analytics/track.js +1 -1
  22. package/dist/shared/analytics/types.js +1 -1
  23. package/dist/shared/attributes.d.ts +36 -10
  24. package/dist/shared/attributes.d.ts.map +1 -1
  25. package/dist/shared/attributes.js +2 -2
  26. package/dist/shared/brick-manifest.d.ts +91 -46
  27. package/dist/shared/brick-manifest.d.ts.map +1 -1
  28. package/dist/shared/brick-manifest.js +2 -2
  29. package/dist/shared/bricks/manifests/all-manifests.d.ts +2 -3
  30. package/dist/shared/bricks/manifests/all-manifests.d.ts.map +1 -1
  31. package/dist/shared/bricks/manifests/all-manifests.js +2 -2
  32. package/dist/shared/bricks/manifests/button.manifest.d.ts +42 -124
  33. package/dist/shared/bricks/manifests/button.manifest.d.ts.map +1 -1
  34. package/dist/shared/bricks/manifests/button.manifest.js +2 -2
  35. package/dist/shared/bricks/manifests/card.manifest.d.ts +55 -137
  36. package/dist/shared/bricks/manifests/card.manifest.d.ts.map +1 -1
  37. package/dist/shared/bricks/manifests/card.manifest.js +2 -2
  38. package/dist/shared/bricks/manifests/carousel.manifest.d.ts +39 -124
  39. package/dist/shared/bricks/manifests/carousel.manifest.d.ts.map +1 -1
  40. package/dist/shared/bricks/manifests/carousel.manifest.js +2 -2
  41. package/dist/shared/bricks/manifests/container.manifest.d.ts +99 -136
  42. package/dist/shared/bricks/manifests/container.manifest.d.ts.map +1 -1
  43. package/dist/shared/bricks/manifests/container.manifest.js +2 -2
  44. package/dist/shared/bricks/manifests/countdown.manifest.d.ts +39 -76
  45. package/dist/shared/bricks/manifests/countdown.manifest.d.ts.map +1 -1
  46. package/dist/shared/bricks/manifests/countdown.manifest.js +2 -2
  47. package/dist/shared/bricks/manifests/footer.manifest.d.ts +57 -75
  48. package/dist/shared/bricks/manifests/footer.manifest.d.ts.map +1 -1
  49. package/dist/shared/bricks/manifests/footer.manifest.js +2 -2
  50. package/dist/shared/bricks/manifests/form.manifest.d.ts +39 -78
  51. package/dist/shared/bricks/manifests/form.manifest.d.ts.map +1 -1
  52. package/dist/shared/bricks/manifests/form.manifest.js +2 -2
  53. package/dist/shared/bricks/manifests/generic-component.manifest.d.ts +42 -124
  54. package/dist/shared/bricks/manifests/generic-component.manifest.d.ts.map +1 -1
  55. package/dist/shared/bricks/manifests/generic-component.manifest.js +2 -2
  56. package/dist/shared/bricks/manifests/header.manifest.d.ts +142 -75
  57. package/dist/shared/bricks/manifests/header.manifest.d.ts.map +1 -1
  58. package/dist/shared/bricks/manifests/header.manifest.js +2 -2
  59. package/dist/shared/bricks/manifests/hero.manifest.d.ts +78 -122
  60. package/dist/shared/bricks/manifests/hero.manifest.d.ts.map +1 -1
  61. package/dist/shared/bricks/manifests/hero.manifest.js +2 -2
  62. package/dist/shared/bricks/manifests/icon.manifest.d.ts +39 -76
  63. package/dist/shared/bricks/manifests/icon.manifest.d.ts.map +1 -1
  64. package/dist/shared/bricks/manifests/icon.manifest.js +2 -2
  65. package/dist/shared/bricks/manifests/image.manifest.d.ts +71 -77
  66. package/dist/shared/bricks/manifests/image.manifest.d.ts.map +1 -1
  67. package/dist/shared/bricks/manifests/image.manifest.js +2 -2
  68. package/dist/shared/bricks/manifests/images-wall.manifest.d.ts +93 -77
  69. package/dist/shared/bricks/manifests/images-wall.manifest.d.ts.map +1 -1
  70. package/dist/shared/bricks/manifests/images-wall.manifest.js +2 -2
  71. package/dist/shared/bricks/manifests/map.manifest.d.ts +39 -74
  72. package/dist/shared/bricks/manifests/map.manifest.d.ts.map +1 -1
  73. package/dist/shared/bricks/manifests/map.manifest.js +2 -2
  74. package/dist/shared/bricks/manifests/social-links.manifest.d.ts +39 -76
  75. package/dist/shared/bricks/manifests/social-links.manifest.d.ts.map +1 -1
  76. package/dist/shared/bricks/manifests/social-links.manifest.js +2 -2
  77. package/dist/shared/bricks/manifests/tests/header.manifest.test.d.ts +2 -0
  78. package/dist/shared/bricks/manifests/tests/header.manifest.test.d.ts.map +1 -0
  79. package/dist/shared/bricks/manifests/text.manifest.d.ts +54 -120
  80. package/dist/shared/bricks/manifests/text.manifest.d.ts.map +1 -1
  81. package/dist/shared/bricks/manifests/text.manifest.js +2 -2
  82. package/dist/shared/bricks/manifests/video.manifest.d.ts +39 -78
  83. package/dist/shared/bricks/manifests/video.manifest.d.ts.map +1 -1
  84. package/dist/shared/bricks/manifests/video.manifest.js +2 -2
  85. package/dist/shared/bricks/props/_style-presets.d.ts +18 -0
  86. package/dist/shared/bricks/props/_style-presets.d.ts.map +1 -0
  87. package/dist/shared/bricks/props/_style-presets.js +3 -0
  88. package/dist/shared/bricks/props/align.d.ts +15 -0
  89. package/dist/shared/bricks/props/align.d.ts.map +1 -0
  90. package/dist/shared/bricks/props/align.js +3 -0
  91. package/dist/shared/bricks/props/background.d.ts +23 -0
  92. package/dist/shared/bricks/props/background.d.ts.map +1 -0
  93. package/dist/shared/bricks/props/background.js +3 -0
  94. package/dist/shared/bricks/props/boolean.d.ts +4 -0
  95. package/dist/shared/bricks/props/boolean.d.ts.map +1 -0
  96. package/dist/shared/bricks/props/boolean.js +3 -0
  97. package/dist/shared/bricks/props/border.d.ts +27 -0
  98. package/dist/shared/bricks/props/border.d.ts.map +1 -0
  99. package/dist/shared/bricks/props/border.js +3 -0
  100. package/dist/shared/bricks/props/common.d.ts +5 -39
  101. package/dist/shared/bricks/props/common.d.ts.map +1 -1
  102. package/dist/shared/bricks/props/common.js +2 -2
  103. package/dist/shared/bricks/props/container.d.ts +50 -0
  104. package/dist/shared/bricks/props/container.d.ts.map +1 -0
  105. package/dist/shared/bricks/props/container.js +3 -0
  106. package/dist/shared/bricks/props/datasource.d.ts +18 -0
  107. package/dist/shared/bricks/props/datasource.d.ts.map +1 -0
  108. package/dist/shared/bricks/props/datasource.js +3 -0
  109. package/dist/shared/bricks/props/effects.d.ts +21 -0
  110. package/dist/shared/bricks/props/effects.d.ts.map +1 -0
  111. package/dist/shared/bricks/props/effects.js +3 -0
  112. package/dist/shared/bricks/props/helpers.d.ts +28 -0
  113. package/dist/shared/bricks/props/helpers.d.ts.map +1 -0
  114. package/dist/shared/bricks/props/helpers.js +3 -0
  115. package/dist/shared/bricks/props/image.d.ts +15 -0
  116. package/dist/shared/bricks/props/image.d.ts.map +1 -0
  117. package/dist/shared/bricks/props/image.js +3 -0
  118. package/dist/shared/bricks/props/number.d.ts +6 -0
  119. package/dist/shared/bricks/props/number.d.ts.map +1 -0
  120. package/dist/shared/bricks/props/number.js +3 -0
  121. package/dist/shared/bricks/props/padding.d.ts +4 -0
  122. package/dist/shared/bricks/props/padding.d.ts.map +1 -0
  123. package/dist/shared/bricks/props/padding.js +3 -0
  124. package/dist/shared/bricks/props/position.d.ts +6 -0
  125. package/dist/shared/bricks/props/position.d.ts.map +1 -0
  126. package/dist/shared/bricks/props/position.js +3 -0
  127. package/dist/shared/bricks/props/string.d.ts +11 -0
  128. package/dist/shared/bricks/props/string.d.ts.map +1 -0
  129. package/dist/shared/bricks/props/string.js +3 -0
  130. package/dist/shared/bricks/props/tests/align.test.d.ts +2 -0
  131. package/dist/shared/bricks/props/tests/align.test.d.ts.map +1 -0
  132. package/dist/shared/bricks/props/tests/background.test.d.ts +2 -0
  133. package/dist/shared/bricks/props/tests/background.test.d.ts.map +1 -0
  134. package/dist/shared/bricks/props/tests/border.test.d.ts +2 -0
  135. package/dist/shared/bricks/props/tests/border.test.d.ts.map +1 -0
  136. package/dist/shared/bricks/props/tests/container.test.d.ts +2 -0
  137. package/dist/shared/bricks/props/tests/container.test.d.ts.map +1 -0
  138. package/dist/shared/bricks/props/tests/effects.test.d.ts +2 -0
  139. package/dist/shared/bricks/props/tests/effects.test.d.ts.map +1 -0
  140. package/dist/shared/bricks/props/tests/helpers.test.d.ts +2 -0
  141. package/dist/shared/bricks/props/tests/helpers.test.d.ts.map +1 -0
  142. package/dist/shared/bricks/props/tests/image.test.d.ts +2 -0
  143. package/dist/shared/bricks/props/tests/image.test.d.ts.map +1 -0
  144. package/dist/shared/bricks/props/tests/padding.d.ts +2 -0
  145. package/dist/shared/bricks/props/tests/padding.d.ts.map +1 -0
  146. package/dist/shared/bricks/props/tests/string.test.d.ts +2 -0
  147. package/dist/shared/bricks/props/tests/string.test.d.ts.map +1 -0
  148. package/dist/shared/bricks/props/text.d.ts +15 -0
  149. package/dist/shared/bricks/props/text.d.ts.map +1 -0
  150. package/dist/shared/bricks/props/text.js +3 -0
  151. package/dist/shared/bricks/props/types.d.ts +43 -0
  152. package/dist/shared/bricks/props/types.d.ts.map +1 -0
  153. package/dist/shared/bricks/props/types.js +2 -0
  154. package/dist/shared/bricks.d.ts +51 -1541
  155. package/dist/shared/bricks.d.ts.map +1 -1
  156. package/dist/shared/bricks.js +2 -2
  157. package/dist/shared/chunk-2Y3ZNNGU.js +3 -0
  158. package/dist/shared/chunk-346JVEOR.js +3 -0
  159. package/dist/shared/chunk-3EUA65QC.js +3 -0
  160. package/dist/shared/chunk-4EEQT7D6.js +3 -0
  161. package/dist/shared/chunk-4IMPKXJT.js +14 -0
  162. package/dist/shared/chunk-4JJHQZYB.js +3 -0
  163. package/dist/shared/chunk-4SMJ4E32.js +19 -0
  164. package/dist/shared/chunk-56QQPQIE.js +3 -0
  165. package/dist/shared/chunk-5JEYUV4C.js +11 -0
  166. package/dist/shared/{chunk-X7ABR5GQ.js → chunk-6GYFUI5C.js} +2 -2
  167. package/dist/shared/chunk-764EAJFR.js +3 -0
  168. package/dist/shared/{chunk-KXVIWTJN.js → chunk-7XTKGW6E.js} +1 -1
  169. package/dist/shared/chunk-ANZZVPQC.js +22 -0
  170. package/dist/shared/{chunk-PXAK7ZJ3.js → chunk-BNKXJJ2R.js} +1 -1
  171. package/dist/shared/chunk-EIODRGFP.js +5 -0
  172. package/dist/shared/chunk-FHJRL7LV.js +9 -0
  173. package/dist/shared/chunk-FKUGABKJ.js +11 -0
  174. package/dist/shared/chunk-FM2MSU7Z.js +6 -0
  175. package/dist/shared/chunk-FNCNEYJX.js +8 -0
  176. package/dist/shared/chunk-GNZYWNA4.js +3 -0
  177. package/dist/shared/chunk-GOUUN46E.js +7 -0
  178. package/dist/shared/chunk-HL7WRX6G.js +7 -0
  179. package/dist/shared/chunk-HMQPELFK.js +3 -0
  180. package/dist/shared/chunk-HUNU6HSF.js +8 -0
  181. package/dist/shared/chunk-IEB7RHDF.js +3 -0
  182. package/dist/shared/chunk-K4NJQWFB.js +3 -0
  183. package/dist/shared/chunk-KGZMWRZS.js +3 -0
  184. package/dist/shared/chunk-M4CXYZTI.js +3 -0
  185. package/dist/shared/{chunk-A3ACTIE3.js → chunk-NNVPTAAH.js} +1 -1
  186. package/dist/shared/chunk-O3JLMHK3.js +3 -0
  187. package/dist/shared/chunk-OMOYRWNX.js +8 -0
  188. package/dist/shared/chunk-PSSJMWGU.js +3 -0
  189. package/dist/shared/chunk-PUPVTFFY.js +3 -0
  190. package/dist/shared/{chunk-G4K7GJZO.js → chunk-R7HRU3T4.js} +1 -1
  191. package/dist/shared/chunk-RGKPN4LE.js +3 -0
  192. package/dist/shared/chunk-RQT64JJW.js +9 -0
  193. package/dist/shared/chunk-VYNIBP33.js +7 -0
  194. package/dist/shared/chunk-WNS3A3LT.js +7 -0
  195. package/dist/shared/{chunk-XGI243DO.js → chunk-WXKRIUTA.js} +1 -1
  196. package/dist/shared/chunk-X3JYHXIE.js +6 -0
  197. package/dist/shared/chunk-X3LVSMNF.js +3 -0
  198. package/dist/shared/chunk-XIXSVFY6.js +3 -0
  199. package/dist/shared/chunk-ZWVJMSTT.js +3 -0
  200. package/dist/shared/datarecords/external/google/oauth/config.js +1 -1
  201. package/dist/shared/datarecords/types.js +1 -1
  202. package/dist/shared/datarecords.js +1 -1
  203. package/dist/shared/datasources/external/meta/oauth/config.js +2 -2
  204. package/dist/shared/datasources/external/tiktok/oauth/config.js +2 -2
  205. package/dist/shared/datasources/external/youtube/oauth/config.js +2 -2
  206. package/dist/shared/datasources/internal/job-board/schema.d.ts +87 -0
  207. package/dist/shared/datasources/internal/job-board/schema.d.ts.map +1 -0
  208. package/dist/shared/datasources/schemas.js +2 -2
  209. package/dist/shared/datasources/types.js +2 -2
  210. package/dist/shared/datasources.js +1 -1
  211. package/dist/shared/env.js +1 -1
  212. package/dist/shared/errors.js +1 -1
  213. package/dist/shared/layout-constants.js +2 -2
  214. package/dist/shared/oauth.js +2 -2
  215. package/dist/shared/page.d.ts +159 -2323
  216. package/dist/shared/page.d.ts.map +1 -1
  217. package/dist/shared/page.js +2 -2
  218. package/dist/shared/responsive.js +1 -1
  219. package/dist/shared/tests/test-config.d.ts.map +1 -1
  220. package/dist/shared/theme.js +2 -2
  221. package/dist/shared/themes/all-themes.js +1 -1
  222. package/dist/shared/themes/color-system.d.ts +3 -5
  223. package/dist/shared/themes/color-system.d.ts.map +1 -1
  224. package/dist/shared/themes/color-system.js +2 -2
  225. package/dist/shared/utils/canvas-data-uri.d.ts +2 -0
  226. package/dist/shared/utils/canvas-data-uri.d.ts.map +1 -0
  227. package/dist/shared/utils/invariant.js +2 -2
  228. package/dist/shared/utils/merge.d.ts +2 -0
  229. package/dist/shared/utils/merge.d.ts.map +1 -0
  230. package/dist/shared/utils/merge.js +3 -0
  231. package/dist/shared/utils/object-hash.d.ts +2 -0
  232. package/dist/shared/utils/object-hash.d.ts.map +1 -0
  233. package/dist/shared/utils/try-catch.d.ts +7 -0
  234. package/dist/shared/utils/try-catch.d.ts.map +1 -0
  235. package/package.json +3 -3
  236. package/dist/shared/bricks/manifests/loop.manifest.d.ts +0 -105
  237. package/dist/shared/bricks/manifests/loop.manifest.d.ts.map +0 -1
  238. package/dist/shared/bricks/manifests/loop.manifest.js +0 -3
  239. package/dist/shared/bricks/props/style-presets.d.ts +0 -10
  240. package/dist/shared/bricks/props/style-presets.d.ts.map +0 -1
  241. package/dist/shared/bricks/props/style-presets.js +0 -3
  242. package/dist/shared/bricks/props/style-props.d.ts +0 -90
  243. package/dist/shared/bricks/props/style-props.d.ts.map +0 -1
  244. package/dist/shared/bricks/props/style-props.js +0 -3
  245. package/dist/shared/chunk-3PPIJUXG.js +0 -32
  246. package/dist/shared/chunk-3T2OW4FE.js +0 -14
  247. package/dist/shared/chunk-5PE57DBS.js +0 -15
  248. package/dist/shared/chunk-6G2OUITX.js +0 -3
  249. package/dist/shared/chunk-6PCNIIO5.js +0 -3
  250. package/dist/shared/chunk-AVHF4FLR.js +0 -3
  251. package/dist/shared/chunk-G42AE2ZC.js +0 -13
  252. package/dist/shared/chunk-GBKDJDGW.js +0 -3
  253. package/dist/shared/chunk-GUOQD446.js +0 -22
  254. package/dist/shared/chunk-MEMG6QPT.js +0 -3
  255. package/dist/shared/chunk-NYPOZ5T2.js +0 -13
  256. package/dist/shared/chunk-PZCWP77P.js +0 -3
  257. package/dist/shared/chunk-QQ7YEIHB.js +0 -3
  258. package/dist/shared/chunk-RRTB52G4.js +0 -9
  259. package/dist/shared/chunk-UIKVMZNI.js +0 -13
  260. package/dist/shared/chunk-WGWJHVOE.js +0 -20
  261. package/dist/shared/chunk-WX4P2YIR.js +0 -11
  262. package/dist/shared/chunk-WXSQ2ZEK.js +0 -16
  263. package/dist/shared/chunk-XS5WCEA6.js +0 -16
  264. package/dist/shared/chunk-Y3TOGUNY.js +0 -9
  265. package/dist/shared/chunk-YSMFNK4R.js +0 -20
  266. package/dist/shared/chunk-YXGFGLKH.js +0 -16
  267. package/dist/shared/chunk-ZDZXB45C.js +0 -7
  268. package/dist/shared/chunk-ZWYM64YA.js +0 -8
  269. package/dist/shared/chunk-ZYVXEGAM.js +0 -11
@@ -1,4 +1,4 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{createLogger as E}from"vite";var g="0.0.78";import i from"chalk";function h(e,t,o=!1){let s=E(e==="debug"?"info":e,{prefix:"[enpage]",allowClearScreen:t});return o&&s.info(i.hex("#7270c6").bold(`\u{1F680} Enpage v${g}
3
+ import{createLogger as E}from"vite";var g="0.0.79";import i from"chalk";function h(e,t,o=!1){let s=E(e==="debug"?"info":e,{prefix:"[enpage]",allowClearScreen:t});return o&&s.info(i.hex("#7270c6").bold(`\u{1F680} Enpage v${g}
4
4
  `)),{...s,success:(r,n)=>s.info(i.green(r),n),error:(r,n)=>s.error(i.red(r),n),warn:(r,n)=>s.warn(i.yellow(r),n),warnOnce:(r,n)=>s.warnOnce(i.yellow(r),n),debug:(r,n)=>{e==="debug"&&s.info(i.gray(r),n)}}}var p=h();var m="enpage-cli";var I=process.env.PUBLIC_ENPAGE_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",u=process.env.PUBLIC_ENPAGE_API_BASE_URL??"https://api.enpage.co",b=process.env.PUBLIC_ENPAGE_FRONTEND_BASE_URL??"https://enpage.co";import T from"conf";import c from"node:path";import _ from"node:crypto";import a from"node:fs";import{fileURLToPath as L}from"node:url";import F from"chalk";var x=L(new URL(".",import.meta.url)),R=P(),d=new T({projectName:m,encryptionKey:R,clearInvalidConfig:!0});function O(){let e=x;for(;e!==c.parse(e).root;){let t=c.join(e,"node_modules");if(a.existsSync(t))return t;e=c.dirname(e)}return null}function P(){let e=O();if(!e)throw new Error("Could not find nearest node_modules directory.");let t=c.join(e,".enpage-tmp");a.existsSync(t)||a.mkdirSync(t,{recursive:!0,mode:448});let o=c.join(t,".enpage-key");if(!a.existsSync(o)){let r=_.randomBytes(32).toString("hex");return a.writeFileSync(o,r,{mode:384,flush:!0}),r}return a.readFileSync(o,"utf8")}async function J(e,t,o={}){d.get("access_token")&&(o.Authorization=`Bearer ${d.get("access_token")}`);let s=await fetch(l(e),{method:"POST",headers:{"Content-Type":t instanceof URLSearchParams?"application/x-www-form-urlencoded":"application/json",...o},body:t instanceof URLSearchParams?t:JSON.stringify(t)}).catch(r=>{p.error(`Fatal Error requesting API: ${r.message} (${r.cause.code})`),p.error("Please check your internet connection and try again, or retry later."),process.exit(1)});return y(s)}async function K(e,t={}){d.get("access_token")&&(t.Authorization=`Bearer ${d.get("access_token")}`);let o=await fetch(l(e),{headers:t,method:"GET"}).catch(s=>{p.error(`Fatal Error requesting API: ${s.message} (${s.cause.code})`),p.error("Please check your internet connection and try again, or retry later."),process.exit(1)});return y(o)}function l(e){let t=new URL(u.endsWith("/")?u:`${u}/`);return new URL(e,t)}async function y(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}}export{K as get,J as post};
@@ -1,4 +1,4 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
3
  var Ii=Object.create;var ts=Object.defineProperty;var Wi=Object.getOwnPropertyDescriptor;var ji=Object.getOwnPropertyNames;var Bi=Object.getPrototypeOf,zi=Object.prototype.hasOwnProperty;var es=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports);var Ui=(i,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ji(t))!zi.call(i,r)&&r!==e&&ts(i,r,{get:()=>t[r],enumerable:!(s=Wi(t,r))||s.enumerable});return i};var $i=(i,t,e)=>(e=i!=null?Ii(Bi(i)):{},Ui(t||!i||!i.__esModule?ts(e,"default",{value:i,enumerable:!0}):e,i));var os=es((So,ns)=>{"use strict";ns.exports=is;function is(i,t,e){i instanceof RegExp&&(i=ss(i,e)),t instanceof RegExp&&(t=ss(t,e));var s=rs(i,t,e);return s&&{start:s[0],end:s[1],pre:e.slice(0,s[0]),body:e.slice(s[0]+i.length,s[1]),post:e.slice(s[1]+t.length)}}function ss(i,t){var e=t.match(i);return e?e[0]:null}is.range=rs;function rs(i,t,e){var s,r,n,o,h,a=e.indexOf(i),l=e.indexOf(t,a+1),c=a;if(a>=0&&l>0){if(i===t)return[a,l];for(s=[],n=e.length;c>=0&&!h;)c==a?(s.push(c),a=e.indexOf(i,c+1)):s.length==1?h=[s.pop(),l]:(r=s.pop(),r<n&&(n=r,o=l),l=e.indexOf(t,c+1)),c=a<l&&a>=0?a:l;s.length&&(h=[n,o])}return h}});var ps=es((bo,ds)=>{"use strict";var hs=os();ds.exports=Vi;var as="\0SLASH"+Math.random()+"\0",ls="\0OPEN"+Math.random()+"\0",be="\0CLOSE"+Math.random()+"\0",cs="\0COMMA"+Math.random()+"\0",fs="\0PERIOD"+Math.random()+"\0";function Se(i){return parseInt(i,10)==i?parseInt(i,10):i.charCodeAt(0)}function Gi(i){return i.split("\\\\").join(as).split("\\{").join(ls).split("\\}").join(be).split("\\,").join(cs).split("\\.").join(fs)}function Hi(i){return i.split(as).join("\\").split(ls).join("{").split(be).join("}").split(cs).join(",").split(fs).join(".")}function us(i){if(!i)return[""];var t=[],e=hs("{","}",i);if(!e)return i.split(",");var s=e.pre,r=e.body,n=e.post,o=s.split(",");o[o.length-1]+="{"+r+"}";var h=us(n);return n.length&&(o[o.length-1]+=h.shift(),o.push.apply(o,h)),t.push.apply(t,o),t}function Vi(i){return i?(i.substr(0,2)==="{}"&&(i="\\{\\}"+i.substr(2)),xt(Gi(i),!0).map(Hi)):[]}function qi(i){return"{"+i+"}"}function Ki(i){return/^-?0\d/.test(i)}function Yi(i,t){return i<=t}function Xi(i,t){return i>=t}function xt(i,t){var e=[],s=hs("{","}",i);if(!s)return[i];var r=s.pre,n=s.post.length?xt(s.post,!1):[""];if(/\$$/.test(s.pre))for(var o=0;o<n.length;o++){var h=r+"{"+s.body+"}"+n[o];e.push(h)}else{var a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),c=a||l,f=s.body.indexOf(",")>=0;if(!c&&!f)return s.post.match(/,.*\}/)?(i=s.pre+"{"+s.body+be+s.post,xt(i)):[i];var u;if(c)u=s.body.split(/\.\./);else if(u=us(s.body),u.length===1&&(u=xt(u[0],!1).map(qi),u.length===1))return n.map(function(Bt){return s.pre+u[0]+Bt});var d;if(c){var g=Se(u[0]),p=Se(u[1]),w=Math.max(u[0].length,u[1].length),m=u.length==3?Math.abs(Se(u[2])):1,b=Yi,S=p<g;S&&(m*=-1,b=Xi);var y=u.some(Ki);d=[];for(var E=g;b(E,p);E+=m){var x;if(l)x=String.fromCharCode(E),x==="\\"&&(x="");else if(x=String(E),y){var W=w-x.length;if(W>0){var it=new Array(W+1).join("0");E<0?x="-"+it+x.slice(1):x=it+x}}d.push(x)}}else{d=[];for(var j=0;j<u.length;j++)d.push.apply(d,xt(u[j],!1))}for(var j=0;j<d.length;j++)for(var o=0;o<n.length;o++){var h=r+d[j]+n[o];(!t||c||h)&&e.push(h)}}return e}});import{build as Ze}from"vite";import mo,{resolve as Li}from"node:path";import{fileURLToPath as go}from"node:url";var vs=$i(ps(),1);var Tt=i=>{if(typeof i!="string")throw new TypeError("invalid pattern");if(i.length>65536)throw new TypeError("pattern is too long")};var Ji={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Rt=i=>i.replace(/[[\]\\-]/g,"\\$&"),Zi=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ms=i=>i.join(""),gs=(i,t)=>{let e=t;if(i.charAt(e)!=="[")throw new Error("not in a brace expression");let s=[],r=[],n=e+1,o=!1,h=!1,a=!1,l=!1,c=e,f="";t:for(;n<i.length;){let p=i.charAt(n);if((p==="!"||p==="^")&&n===e+1){l=!0,n++;continue}if(p==="]"&&o&&!a){c=n+1;break}if(o=!0,p==="\\"&&!a){a=!0,n++;continue}if(p==="["&&!a){for(let[w,[m,b,S]]of Object.entries(Ji))if(i.startsWith(w,n)){if(f)return["$.",!1,i.length-e,!0];n+=w.length,S?r.push(m):s.push(m),h=h||b;continue t}}if(a=!1,f){p>f?s.push(Rt(f)+"-"+Rt(p)):p===f&&s.push(Rt(p)),f="",n++;continue}if(i.startsWith("-]",n+1)){s.push(Rt(p+"-")),n+=2;continue}if(i.startsWith("-",n+1)){f=p,n+=2;continue}s.push(Rt(p)),n++}if(c<n)return["",!1,0,!1];if(!s.length&&!r.length)return["$.",!1,i.length-e,!0];if(r.length===0&&s.length===1&&/^\\?.$/.test(s[0])&&!l){let p=s[0].length===2?s[0].slice(-1):s[0];return[Zi(p),!1,c-e,!1]}let u="["+(l?"^":"")+ms(s)+"]",d="["+(l?"":"^")+ms(r)+"]";return[s.length&&r.length?"("+u+"|"+d+")":s.length?u:d,h,c-e,!0]};var B=(i,{windowsPathsNoEscape:t=!1}={})=>t?i.replace(/\[([^\/\\])\]/g,"$1"):i.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var Qi=new Set(["!","?","+","*","@"]),ws=i=>Qi.has(i),tr="(?!(?:^|/)\\.\\.?(?:$|/))",zt="(?!\\.)",er=new Set(["[","."]),sr=new Set(["..","."]),ir=new Set("().*{}+?[]^$\\!"),rr=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ee="[^/]",ys=Ee+"*?",Ss=Ee+"+?",ot=class i{type;#t;#e;#n=!1;#i=[];#o;#b;#l;#f=!1;#h;#a;#r=!1;constructor(t,e,s={}){this.type=t,t&&(this.#e=!0),this.#o=e,this.#t=this.#o?this.#o.#t:this,this.#h=this.#t===this?s:this.#t.#h,this.#l=this.#t===this?[]:this.#t.#l,t==="!"&&!this.#t.#f&&this.#l.push(this),this.#b=this.#o?this.#o.#i.length:0}get hasMagic(){if(this.#e!==void 0)return this.#e;for(let t of this.#i)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#e=!0;return this.#e}toString(){return this.#a!==void 0?this.#a:this.type?this.#a=this.type+"("+this.#i.map(t=>String(t)).join("|")+")":this.#a=this.#i.map(t=>String(t)).join("")}#g(){if(this!==this.#t)throw new Error("should only call on root");if(this.#f)return this;this.toString(),this.#f=!0;let t;for(;t=this.#l.pop();){if(t.type!=="!")continue;let e=t,s=e.#o;for(;s;){for(let r=e.#b+1;!s.type&&r<s.#i.length;r++)for(let n of t.#i){if(typeof n=="string")throw new Error("string part in extglob AST??");n.copyIn(s.#i[r])}e=s,s=e.#o}}return this}push(...t){for(let e of t)if(e!==""){if(typeof e!="string"&&!(e instanceof i&&e.#o===this))throw new Error("invalid part: "+e);this.#i.push(e)}}toJSON(){let t=this.type===null?this.#i.slice().map(e=>typeof e=="string"?e:e.toJSON()):[this.type,...this.#i.map(e=>e.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#f&&this.#o?.type==="!")&&t.push({}),t}isStart(){if(this.#t===this)return!0;if(!this.#o?.isStart())return!1;if(this.#b===0)return!0;let t=this.#o;for(let e=0;e<this.#b;e++){let s=t.#i[e];if(!(s instanceof i&&s.type==="!"))return!1}return!0}isEnd(){if(this.#t===this||this.#o?.type==="!")return!0;if(!this.#o?.isEnd())return!1;if(!this.type)return this.#o?.isEnd();let t=this.#o?this.#o.#i.length:0;return this.#b===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let e=new i(this.type,t);for(let s of this.#i)e.copyIn(s);return e}static#w(t,e,s,r){let n=!1,o=!1,h=-1,a=!1;if(e.type===null){let d=s,g="";for(;d<t.length;){let p=t.charAt(d++);if(n||p==="\\"){n=!n,g+=p;continue}if(o){d===h+1?(p==="^"||p==="!")&&(a=!0):p==="]"&&!(d===h+2&&a)&&(o=!1),g+=p;continue}else if(p==="["){o=!0,h=d,a=!1,g+=p;continue}if(!r.noext&&ws(p)&&t.charAt(d)==="("){e.push(g),g="";let w=new i(p,e);d=i.#w(t,w,d,r),e.push(w);continue}g+=p}return e.push(g),d}let l=s+1,c=new i(null,e),f=[],u="";for(;l<t.length;){let d=t.charAt(l++);if(n||d==="\\"){n=!n,u+=d;continue}if(o){l===h+1?(d==="^"||d==="!")&&(a=!0):d==="]"&&!(l===h+2&&a)&&(o=!1),u+=d;continue}else if(d==="["){o=!0,h=l,a=!1,u+=d;continue}if(ws(d)&&t.charAt(l)==="("){c.push(u),u="";let g=new i(d,c);c.push(g),l=i.#w(t,g,l,r);continue}if(d==="|"){c.push(u),u="",f.push(c),c=new i(null,e);continue}if(d===")")return u===""&&e.#i.length===0&&(e.#r=!0),c.push(u),u="",e.push(...f,c),l;u+=d}return e.type=null,e.#e=void 0,e.#i=[t.substring(s-1)],l}static fromGlob(t,e={}){let s=new i(null,void 0,e);return i.#w(t,s,0,e),s}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();let t=this.toString(),[e,s,r,n]=this.toRegExpSource();if(!(r||this.#e||this.#h.nocase&&!this.#h.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return s;let h=(this.#h.nocase?"i":"")+(n?"u":"");return Object.assign(new RegExp(`^${e}$`,h),{_src:e,_glob:t})}get options(){return this.#h}toRegExpSource(t){let e=t??!!this.#h.dot;if(this.#t===this&&this.#g(),!this.type){let a=this.isStart()&&this.isEnd(),l=this.#i.map(d=>{let[g,p,w,m]=typeof d=="string"?i.#u(d,this.#e,a):d.toRegExpSource(t);return this.#e=this.#e||w,this.#n=this.#n||m,g}).join(""),c="";if(this.isStart()&&typeof this.#i[0]=="string"&&!(this.#i.length===1&&sr.has(this.#i[0]))){let g=er,p=e&&g.has(l.charAt(0))||l.startsWith("\\.")&&g.has(l.charAt(2))||l.startsWith("\\.\\.")&&g.has(l.charAt(4)),w=!e&&!t&&g.has(l.charAt(0));c=p?tr:w?zt:""}let f="";return this.isEnd()&&this.#t.#f&&this.#o?.type==="!"&&(f="(?:$|\\/)"),[c+l+f,B(l),this.#e=!!this.#e,this.#n]}let s=this.type==="*"||this.type==="+",r=this.type==="!"?"(?:(?!(?:":"(?:",n=this.#d(e);if(this.isStart()&&this.isEnd()&&!n&&this.type!=="!"){let a=this.toString();return this.#i=[a],this.type=null,this.#e=void 0,[a,B(this.toString()),!1,!1]}let o=!s||t||e||!zt?"":this.#d(!0);o===n&&(o=""),o&&(n=`(?:${n})(?:${o})*?`);let h="";if(this.type==="!"&&this.#r)h=(this.isStart()&&!e?zt:"")+Ss;else{let a=this.type==="!"?"))"+(this.isStart()&&!e&&!t?zt:"")+ys+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;h=r+n+a}return[h,B(n),this.#e=!!this.#e,this.#n]}#d(t){return this.#i.map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");let[s,r,n,o]=e.toRegExpSource(t);return this.#n=this.#n||o,s}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")}static#u(t,e,s=!1){let r=!1,n="",o=!1;for(let h=0;h<t.length;h++){let a=t.charAt(h);if(r){r=!1,n+=(ir.has(a)?"\\":"")+a;continue}if(a==="\\"){h===t.length-1?n+="\\\\":r=!0;continue}if(a==="["){let[l,c,f,u]=gs(t,h);if(f){n+=l,o=o||c,h+=f-1,e=e||u;continue}}if(a==="*"){s&&t==="*"?n+=Ss:n+=ys,e=!0;continue}if(a==="?"){n+=Ee,e=!0;continue}n+=rr(a)}return[n,B(t),!!e,o]}};var ht=(i,{windowsPathsNoEscape:t=!1}={})=>t?i.replace(/[?*()[\]]/g,"[$&]"):i.replace(/[?*()[\]\\]/g,"\\$&");var k=(i,t,e={})=>(Tt(t),!e.nocomment&&t.charAt(0)==="#"?!1:new F(t,e).match(i)),nr=/^\*+([^+@!?\*\[\(]*)$/,or=i=>t=>!t.startsWith(".")&&t.endsWith(i),hr=i=>t=>t.endsWith(i),ar=i=>(i=i.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(i)),lr=i=>(i=i.toLowerCase(),t=>t.toLowerCase().endsWith(i)),cr=/^\*+\.\*+$/,fr=i=>!i.startsWith(".")&&i.includes("."),ur=i=>i!=="."&&i!==".."&&i.includes("."),dr=/^\.\*+$/,pr=i=>i!=="."&&i!==".."&&i.startsWith("."),mr=/^\*+$/,gr=i=>i.length!==0&&!i.startsWith("."),wr=i=>i.length!==0&&i!=="."&&i!=="..",yr=/^\?+([^+@!?\*\[\(]*)?$/,Sr=([i,t=""])=>{let e=xs([i]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},br=([i,t=""])=>{let e=Ts([i]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},Er=([i,t=""])=>{let e=Ts([i]);return t?s=>e(s)&&s.endsWith(t):e},vr=([i,t=""])=>{let e=xs([i]);return t?s=>e(s)&&s.endsWith(t):e},xs=([i])=>{let t=i.length;return e=>e.length===t&&!e.startsWith(".")},Ts=([i])=>{let t=i.length;return e=>e.length===t&&e!=="."&&e!==".."},Rs=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",bs={win32:{sep:"\\"},posix:{sep:"/"}},xr=Rs==="win32"?bs.win32.sep:bs.posix.sep;k.sep=xr;var A=Symbol("globstar **");k.GLOBSTAR=A;var Tr="[^/]",Rr=Tr+"*?",Or="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Ar="(?:(?!(?:\\/|^)\\.).)*?",Nr=(i,t={})=>e=>k(e,i,t);k.filter=Nr;var L=(i,t={})=>Object.assign({},i,t),Cr=i=>{if(!i||typeof i!="object"||!Object.keys(i).length)return k;let t=k;return Object.assign((s,r,n={})=>t(s,r,L(i,n)),{Minimatch:class extends t.Minimatch{constructor(r,n={}){super(r,L(i,n))}static defaults(r){return t.defaults(L(i,r)).Minimatch}},AST:class extends t.AST{constructor(r,n,o={}){super(r,n,L(i,o))}static fromGlob(r,n={}){return t.AST.fromGlob(r,L(i,n))}},unescape:(s,r={})=>t.unescape(s,L(i,r)),escape:(s,r={})=>t.escape(s,L(i,r)),filter:(s,r={})=>t.filter(s,L(i,r)),defaults:s=>t.defaults(L(i,s)),makeRe:(s,r={})=>t.makeRe(s,L(i,r)),braceExpand:(s,r={})=>t.braceExpand(s,L(i,r)),match:(s,r,n={})=>t.match(s,r,L(i,n)),sep:t.sep,GLOBSTAR:A})};k.defaults=Cr;var Os=(i,t={})=>(Tt(i),t.nobrace||!/\{(?:(?!\{).)*\}/.test(i)?[i]:(0,vs.default)(i));k.braceExpand=Os;var kr=(i,t={})=>new F(i,t).makeRe();k.makeRe=kr;var Dr=(i,t,e={})=>{let s=new F(t,e);return i=i.filter(r=>s.match(r)),s.options.nonull&&!i.length&&i.push(t),i};k.match=Dr;var Es=/[?*]|[+@!]\(.*?\)|\[|\]/,Mr=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),F=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){Tt(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||Rs,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let e of t)if(typeof e!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...n)=>console.error(...n)),this.debug(this.pattern,this.globSet);let s=this.globSet.map(n=>this.slashSplit(n));this.globParts=this.preprocess(s),this.debug(this.pattern,this.globParts);let r=this.globParts.map((n,o,h)=>{if(this.isWindows&&this.windowsNoMagicRoot){let a=n[0]===""&&n[1]===""&&(n[2]==="?"||!Es.test(n[2]))&&!Es.test(n[3]),l=/^[a-z]:/i.test(n[0]);if(a)return[...n.slice(0,4),...n.slice(4).map(c=>this.parse(c))];if(l)return[n[0],...n.slice(1).map(c=>this.parse(c))]}return n.map(a=>this.parse(a))});if(this.debug(this.pattern,r),this.set=r.filter(n=>n.indexOf(!1)===-1),this.isWindows)for(let n=0;n<this.set.length;n++){let o=this.set[n];o[0]===""&&o[1]===""&&this.globParts[n][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let s=0;s<t.length;s++)for(let r=0;r<t[s].length;r++)t[s][r]==="**"&&(t[s][r]="*");let{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let s=-1;for(;(s=e.indexOf("**",s+1))!==-1;){let r=s;for(;e[r+1]==="**";)r++;r!==s&&e.splice(s,r-s)}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((s,r)=>{let n=s[s.length-1];return r==="**"&&n==="**"?s:r===".."&&n&&n!==".."&&n!=="."&&n!=="**"?(s.pop(),s):(s.push(r),s)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let r=1;r<t.length-1;r++){let n=t[r];r===1&&n===""&&t[0]===""||(n==="."||n==="")&&(e=!0,t.splice(r,1),r--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(e=!0,t.pop())}let s=0;for(;(s=t.indexOf("..",s+1))!==-1;){let r=t[s-1];r&&r!=="."&&r!==".."&&r!=="**"&&(e=!0,t.splice(s-1,2),s-=2)}}while(e);return t.length===0?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let s of t){let r=-1;for(;(r=s.indexOf("**",r+1))!==-1;){let o=r;for(;s[o+1]==="**";)o++;o>r&&s.splice(r+1,o-r);let h=s[r+1],a=s[r+2],l=s[r+3];if(h!==".."||!a||a==="."||a===".."||!l||l==="."||l==="..")continue;e=!0,s.splice(r,1);let c=s.slice(0);c[r]="**",t.push(c),r--}if(!this.preserveMultipleSlashes){for(let o=1;o<s.length-1;o++){let h=s[o];o===1&&h===""&&s[0]===""||(h==="."||h==="")&&(e=!0,s.splice(o,1),o--)}s[0]==="."&&s.length===2&&(s[1]==="."||s[1]==="")&&(e=!0,s.pop())}let n=0;for(;(n=s.indexOf("..",n+1))!==-1;){let o=s[n-1];if(o&&o!=="."&&o!==".."&&o!=="**"){e=!0;let a=n===1&&s[n+1]==="**"?["."]:[];s.splice(n-1,2,...a),s.length===0&&s.push(""),n-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let s=e+1;s<t.length;s++){let r=this.partsMatch(t[e],t[s],!this.preserveMultipleSlashes);if(r){t[e]=[],t[s]=r;break}}return t.filter(e=>e.length)}partsMatch(t,e,s=!1){let r=0,n=0,o=[],h="";for(;r<t.length&&n<e.length;)if(t[r]===e[n])o.push(h==="b"?e[n]:t[r]),r++,n++;else if(s&&t[r]==="**"&&e[n]===t[r+1])o.push(t[r]),r++;else if(s&&e[n]==="**"&&t[r]===e[n+1])o.push(e[n]),n++;else if(t[r]==="*"&&e[n]&&(this.options.dot||!e[n].startsWith("."))&&e[n]!=="**"){if(h==="b")return!1;h="a",o.push(t[r]),r++,n++}else if(e[n]==="*"&&t[r]&&(this.options.dot||!t[r].startsWith("."))&&t[r]!=="**"){if(h==="a")return!1;h="b",o.push(e[n]),r++,n++}else return!1;return t.length===e.length&&o}parseNegate(){if(this.nonegate)return;let t=this.pattern,e=!1,s=0;for(let r=0;r<t.length&&t.charAt(r)==="!";r++)e=!e,s++;s&&(this.pattern=t.slice(s)),this.negate=e}matchOne(t,e,s=!1){let r=this.options;if(this.isWindows){let p=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),w=!p&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),m=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),b=!m&&e[0]===""&&e[1]===""&&e[2]==="?"&&typeof e[3]=="string"&&/^[a-z]:$/i.test(e[3]),S=w?3:p?0:void 0,y=b?3:m?0:void 0;if(typeof S=="number"&&typeof y=="number"){let[E,x]=[t[S],e[y]];E.toLowerCase()===x.toLowerCase()&&(e[y]=E,y>S?e=e.slice(y):S>y&&(t=t.slice(S)))}}let{optimizationLevel:n=1}=this.options;n>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var o=0,h=0,a=t.length,l=e.length;o<a&&h<l;o++,h++){this.debug("matchOne loop");var c=e[h],f=t[o];if(this.debug(e,c,f),c===!1)return!1;if(c===A){this.debug("GLOBSTAR",[e,c,f]);var u=o,d=h+1;if(d===l){for(this.debug("** at the end");o<a;o++)if(t[o]==="."||t[o]===".."||!r.dot&&t[o].charAt(0)===".")return!1;return!0}for(;u<a;){var g=t[u];if(this.debug(`
4
4
  globstar while`,t,u,e,d,g),this.matchOne(t.slice(u),e.slice(d),s))return this.debug("globstar found match!",u,a,g),!0;if(g==="."||g===".."||!r.dot&&g.charAt(0)==="."){this.debug("dot detected!",t,u,e,d);break}this.debug("globstar swallow a segment, and continue"),u++}return!!(s&&(this.debug(`
@@ -1,6 +1,6 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import I from"chalk";import{confirm as b}from"@inquirer/prompts";import A from"open";var f="enpage-cli";var g=process.env.PUBLIC_ENPAGE_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",u=process.env.PUBLIC_ENPAGE_API_BASE_URL??"https://api.enpage.co",j=process.env.PUBLIC_ENPAGE_FRONTEND_BASE_URL??"https://enpage.co";var _="oauth/devicecode",E="oauth/token";import{createLogger as L}from"vite";var h="0.0.78";import i from"chalk";function x(r,e,n=!1){let o=L(r==="debug"?"info":r,{prefix:"[enpage]",allowClearScreen:e});return n&&o.info(i.hex("#7270c6").bold(`\u{1F680} Enpage v${h}
3
+ import I from"chalk";import{confirm as b}from"@inquirer/prompts";import A from"open";var f="enpage-cli";var g=process.env.PUBLIC_ENPAGE_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",u=process.env.PUBLIC_ENPAGE_API_BASE_URL??"https://api.enpage.co",j=process.env.PUBLIC_ENPAGE_FRONTEND_BASE_URL??"https://enpage.co";var _="oauth/devicecode",E="oauth/token";import{createLogger as L}from"vite";var h="0.0.79";import i from"chalk";function x(r,e,n=!1){let o=L(r==="debug"?"info":r,{prefix:"[enpage]",allowClearScreen:e});return n&&o.info(i.hex("#7270c6").bold(`\u{1F680} Enpage v${h}
4
4
  `)),{...o,success:(t,s)=>o.info(i.green(t),s),error:(t,s)=>o.error(i.red(t),s),warn:(t,s)=>o.warn(i.yellow(t),s),warnOnce:(t,s)=>o.warnOnce(i.yellow(t),s),debug:(t,s)=>{r==="debug"&&o.info(i.gray(t),s)}}}var m=x();import R from"conf";import c from"node:path";import O from"node:crypto";import a from"node:fs";import{fileURLToPath as v}from"node:url";import Q from"chalk";var k=v(new URL(".",import.meta.url)),w=C(),p=new R({projectName:f,encryptionKey:w,clearInvalidConfig:!0});function P(){let r=k;for(;r!==c.parse(r).root;){let e=c.join(r,"node_modules");if(a.existsSync(e))return e;r=c.dirname(r)}return null}function C(){let r=P();if(!r)throw new Error("Could not find nearest node_modules directory.");let e=c.join(r,".enpage-tmp");a.existsSync(e)||a.mkdirSync(e,{recursive:!0,mode:448});let n=c.join(e,".enpage-key");if(!a.existsSync(n)){let t=O.randomBytes(32).toString("hex");return a.writeFileSync(n,t,{mode:384,flush:!0}),t}return a.readFileSync(n,"utf8")}async function l(r,e,n={}){p.get("access_token")&&(n.Authorization=`Bearer ${p.get("access_token")}`);let o=await fetch(N(r),{method:"POST",headers:{"Content-Type":e instanceof URLSearchParams?"application/x-www-form-urlencoded":"application/json",...n},body:e instanceof URLSearchParams?e:JSON.stringify(e)}).catch(t=>{m.error(`Fatal Error requesting API: ${t.message} (${t.cause.code})`),m.error("Please check your internet connection and try again, or retry later."),process.exit(1)});return S(o)}function N(r){let e=new URL(u.endsWith("/")?u:`${u}/`);return new URL(r,e)}async function S(r){let e=r.headers.get("content-type")?.startsWith("application/json")?await r.json():await r.text();return r.ok?{isSuccess:!0,isError:!1,status:r.status,statusText:r.statusText,data:e}:{isSuccess:!1,isError:!0,status:r.status,statusText:r.statusText,data:e}}async function D(r,e){for(;;){let n=new URLSearchParams({grant_type:"device_code",device_code:r,client_id:g}),o=await l(E,n),{data:t,isSuccess:s}=o;if(s)return t;if(t.error==="authorization_pending")await new Promise(y=>setTimeout(y,5e3));else return e.error(`Error while polling for login: ${t.error_description??t.error}`),!1}}async function de({options:r,logger:e}){e.info(`Logging in to Enpage...
5
5
  `);let{isError:n,data:o}=await l(_,{client_id:g,scope:"profile,templates:publish"});n&&(e.error("Failed to get device code. Please try again."),e.error(`Error: ${o.error_description??o.error}`),process.exit(1));let{verification_uri:t,device_code:s}=o;await b({message:"Would you like to open the login page in your browser?",default:!0}).catch(U=>{process.exit(0)})?A(t):e.info(`
6
6
  Please visit the following URL to login:
@@ -1,4 +1,4 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
3
  var c="enpage-cli";var d=process.env.PUBLIC_ENPAGE_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",O=process.env.PUBLIC_ENPAGE_API_BASE_URL??"https://api.enpage.co",l=process.env.PUBLIC_ENPAGE_FRONTEND_BASE_URL??"https://enpage.co";import p from"conf";import n from"node:path";import _ from"node:crypto";import t from"node:fs";import{fileURLToPath as a}from"node:url";import U from"chalk";var m=a(new URL(".",import.meta.url)),E=f(),i=new p({projectName:c,encryptionKey:E,clearInvalidConfig:!0});function u(){let o=m;for(;o!==n.parse(o).root;){let e=n.join(o,"node_modules");if(t.existsSync(e))return e;o=n.dirname(o)}return null}function f(){let o=u();if(!o)throw new Error("Could not find nearest node_modules directory.");let e=n.join(o,".enpage-tmp");t.existsSync(e)||t.mkdirSync(e,{recursive:!0,mode:448});let r=n.join(e,".enpage-key");if(!t.existsSync(r)){let s=_.randomBytes(32).toString("hex");return t.writeFileSync(r,s,{mode:384,flush:!0}),s}return t.readFileSync(r,"utf8")}async function R({options:o,logger:e}){e.info("Logging out fom Enpage..."),i.clear(),e.info(`Done.
4
4
  `),process.exit(0)}export{R as logout};
@@ -1,6 +1,6 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- var ye=Object.defineProperty;var b=(e,t)=>()=>(e&&(t=e(e=0)),t);var he=(e,t)=>{for(var r in t)ye(e,r,{get:t[r],enumerable:!0})};function F(){let e;if(process.env.npm_config_user_agent){let t=process.env.npm_config_user_agent.split(" ")[0];e=t.slice(0,t.lastIndexOf("/"))}return e||(console.log("Warning: could not detect package manager"),e="npm"),e}function J(e){return`[${e.error}]${e.error_description?`: ${e.error_description}`:""}`}var q=b(()=>{"use strict"});var X,ft,x,yt,Y,K,V,R=b(()=>{"use strict";X="enpage-cli",ft=process.env.PUBLIC_ENPAGE_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",x=process.env.PUBLIC_ENPAGE_API_BASE_URL??"https://api.enpage.co",yt=process.env.PUBLIC_ENPAGE_FRONTEND_BASE_URL??"https://enpage.co",Y=10,K="oauth/userinfo",V="v1/templates"});import Se from"conf";import v from"node:path";import Ee from"node:crypto";import A from"node:fs";import{fileURLToPath as Te}from"node:url";import Pe from"chalk";function Q(){let e=y.get("access_token");if(!e){let t=F();throw new Error(`Access token not found. Please run ${Pe.cyan(`${t} run enpage:login`)} to authenticate.`)}return e}function _e(){let e=xe;for(;e!==v.parse(e).root;){let t=v.join(e,"node_modules");if(A.existsSync(t))return t;e=v.dirname(e)}return null}function be(){let e=_e();if(!e)throw new Error("Could not find nearest node_modules directory.");let t=v.join(e,".enpage-tmp");A.existsSync(t)||A.mkdirSync(t,{recursive:!0,mode:448});let r=v.join(t,".enpage-key");if(!A.existsSync(r)){let n=Ee.randomBytes(32).toString("hex");return A.writeFileSync(r,n,{mode:384,flush:!0}),n}return A.readFileSync(r,"utf8")}var xe,we,y,G=b(()=>{"use strict";R();q();xe=Te(new URL(".",import.meta.url)),we=be(),y=new Se({projectName:X,encryptionKey:we,clearInvalidConfig:!0})});var ee,Z=b(()=>{ee="0.0.78"});import{createLogger as Ae}from"vite";import O from"chalk";function Oe(e,t,r=!1){let o=Ae(e==="debug"?"info":e,{prefix:"[enpage]",allowClearScreen:t});return r&&o.info(O.hex("#7270c6").bold(`\u{1F680} Enpage v${ee}
3
+ var ye=Object.defineProperty;var b=(e,t)=>()=>(e&&(t=e(e=0)),t);var he=(e,t)=>{for(var r in t)ye(e,r,{get:t[r],enumerable:!0})};function F(){let e;if(process.env.npm_config_user_agent){let t=process.env.npm_config_user_agent.split(" ")[0];e=t.slice(0,t.lastIndexOf("/"))}return e||(console.log("Warning: could not detect package manager"),e="npm"),e}function J(e){return`[${e.error}]${e.error_description?`: ${e.error_description}`:""}`}var q=b(()=>{"use strict"});var X,ft,x,yt,Y,K,V,R=b(()=>{"use strict";X="enpage-cli",ft=process.env.PUBLIC_ENPAGE_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",x=process.env.PUBLIC_ENPAGE_API_BASE_URL??"https://api.enpage.co",yt=process.env.PUBLIC_ENPAGE_FRONTEND_BASE_URL??"https://enpage.co",Y=10,K="oauth/userinfo",V="v1/templates"});import Se from"conf";import v from"node:path";import Ee from"node:crypto";import A from"node:fs";import{fileURLToPath as Te}from"node:url";import Pe from"chalk";function Q(){let e=y.get("access_token");if(!e){let t=F();throw new Error(`Access token not found. Please run ${Pe.cyan(`${t} run enpage:login`)} to authenticate.`)}return e}function _e(){let e=xe;for(;e!==v.parse(e).root;){let t=v.join(e,"node_modules");if(A.existsSync(t))return t;e=v.dirname(e)}return null}function be(){let e=_e();if(!e)throw new Error("Could not find nearest node_modules directory.");let t=v.join(e,".enpage-tmp");A.existsSync(t)||A.mkdirSync(t,{recursive:!0,mode:448});let r=v.join(t,".enpage-key");if(!A.existsSync(r)){let n=Ee.randomBytes(32).toString("hex");return A.writeFileSync(r,n,{mode:384,flush:!0}),n}return A.readFileSync(r,"utf8")}var xe,we,y,G=b(()=>{"use strict";R();q();xe=Te(new URL(".",import.meta.url)),we=be(),y=new Se({projectName:X,encryptionKey:we,clearInvalidConfig:!0})});var ee,Z=b(()=>{ee="0.0.79"});import{createLogger as Ae}from"vite";import O from"chalk";function Oe(e,t,r=!1){let o=Ae(e==="debug"?"info":e,{prefix:"[enpage]",allowClearScreen:t});return r&&o.info(O.hex("#7270c6").bold(`\u{1F680} Enpage v${ee}
4
4
  `)),{...o,success:(n,s)=>o.info(O.green(n),s),error:(n,s)=>o.error(O.red(n),s),warn:(n,s)=>o.warn(O.yellow(n),s),warnOnce:(n,s)=>o.warnOnce(O.yellow(n),s),debug:(n,s)=>{e==="debug"&&o.info(O.gray(n),s)}}}var g,M=b(()=>{"use strict";Z();g=Oe()});var se={};he(se,{get:()=>Ge,post:()=>N});async function N(e,t,r={}){y.get("access_token")&&(r.Authorization=`Bearer ${y.get("access_token")}`);let o=await fetch(oe(e),{method:"POST",headers:{"Content-Type":t instanceof URLSearchParams?"application/x-www-form-urlencoded":"application/json",...r},body:t instanceof URLSearchParams?t:JSON.stringify(t)}).catch(n=>{g.error(`Fatal Error requesting API: ${n.message} (${n.cause.code})`),g.error("Please check your internet connection and try again, or retry later."),process.exit(1)});return ne(o)}async function Ge(e,t={}){y.get("access_token")&&(t.Authorization=`Bearer ${y.get("access_token")}`);let r=await fetch(oe(e),{headers:t,method:"GET"}).catch(o=>{g.error(`Fatal Error requesting API: ${o.message} (${o.cause.code})`),g.error("Please check your internet connection and try again, or retry later."),process.exit(1)});return ne(r)}function oe(e){let t=new URL(x.endsWith("/")?x:`${x}/`);return new URL(e,t)}async function ne(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=b(()=>{"use strict";M();R();G()});q();G();import{resolve as h}from"node:path";import{existsSync as D,readFileSync as ct,writeFileSync as lt}from"node:fs";import T from"chalk";R();M();import I from"node:path";import j from"node:fs";import Me from"node:crypto";import Be from"fast-glob";import ae from"node:http";import ze from"node:https";import{pipeline as We}from"node:stream";import ie from"chalk";import qe from"form-data";import*as B from"node:fs";var ke=/[<>"|?*\n\r\t\f\x00-\x1F]/,$e=/(?:^|\/)[*]{2}($|\/)/,Le=248,Ce=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),Ue=e=>typeof e=="string"&&e.length<=Le&&!ke.test(e),ve=e=>e.split(/\r\n?|\n/);var Ne=e=>Ce(e)&&Array.isArray(e.patterns)&&Array.isArray(e.sections);var z=(e,t={})=>{let r=t.path;if(Ne(e))return e;Ue(e)&&B.existsSync(e)&&(r=e,e=B.readFileSync(e,"utf8"));let o=ve(e),n=new Map,s={sections:[],patterns:[]},p={name:"default",patterns:[]},i=null;for(let a of o){let c=a.trim();if(c.startsWith("#")){let[,d]=/^#+\s*(.*)\s*$/.exec(c)||[];if(i){n.delete(i.name),i.comment=i.comment?`${i.comment}
5
5
  ${c}`:c,i.name=d?`${i.name.trim()}
6
6
  ${d.trim()}`:i.name.trim(),n.set(i.name.toLowerCase().trim(),i);continue}p={name:d?.trim()||"",comment:c,patterns:[]},n.set(p.name.toLowerCase(),p),s.sections.push(p),i=p;continue}c!==""&&(p.patterns.push(c),s.patterns.push(c)),i=null}return(t.dedupe===!0||t.unique===!0)&&(s=te(s,{...t,format:!1})),s.path=r,s.input=Buffer.from(e),s.format=a=>Fe(s,{...t,...a}),s.dedupe=a=>te(s,{...t,...a}),s.globs=a=>je(s,{path:r,...t,...a}),s};var te=(e,t)=>{let r=z(e,{...t,dedupe:!1}),o=new Map,n={sections:[],patterns:[]},s;for(let p of r.sections){let{name:i="",comment:a,patterns:c}=p,d=i.trim().toLowerCase();for(let f of c)n.patterns.includes(f)||n.patterns.push(f);i&&o.has(d)?(s=o.get(d),s.patterns=[...s.patterns,...c]):(s={name:i,comment:a,patterns:c},n.sections.push(s),o.set(d,s))}for(let p of n.sections)p.patterns=[...new Set(p.patterns)];return n},Ie=e=>{if($e.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}`},je=(e,t={})=>{let r=z(e,t),o=[],n=0,s=r.patterns.concat(t.ignore||[]).concat((t.unignore||[]).map(i=>i.startsWith("!")?i:`!${i}`)),p=(i,a)=>{let c=o[o.length-1],d=i?"unignore":"ignore";c&&c.type===d?c.patterns.includes(a)||c.patterns.push(a):(o.push({type:d,path:t.path||null,patterns:[a],index:n}),n++)};for(let i of s){let a="";i.startsWith("!")&&(i=i.slice(1),a="!"),p(a,i.startsWith("/")?i.slice(1):i),p(a,Ie(i))}return o},De=(e={name:"",patterns:[]})=>{let t=[e.comment||""];return e.patterns?.length&&(t.push(e.patterns.join(`
@@ -11,7 +11,7 @@ ${d.trim()}`:i.name.trim(),n.set(i.name.toLowerCase().trim(),i);continue}p={name
11
11
  `),g.info("The following files would have been uploaded:"),i.forEach(m=>g.info(`- ${m}`)),process.exit(0));let S=Je(`Uploading ${a} files...`).start(),$=i.map(m=>{let P=I.resolve(t,m),l=I.relative(t,m),E=`${x}/v1/templates/${e}/upload/${d}`;return p.add(async()=>{let C=await Qe(P,l,E,e,S,r,s);return f++,C})}),L=await Promise.allSettled($);S.stop();let w=L.filter(m=>m.status==="fulfilled"),_=L.filter(m=>m.status==="rejected");if(et(e,w.map(m=>m.value),_),!_.length&&w.length){let m=`${x}/v1/templates/${e}/upload/${d}/finalize`,l=await N(m,{signatures:c});if(l.isError)return g.error(`Failed to finalize upload: ${l.data.error_description} (${l.data.error})`),{filesCount:a,uploadedFiles:w.map(E=>E.value),failedFiles:[],success:!1}}return{filesCount:a,uploadedFiles:w.map(m=>m.value),failedFiles:_,success:_.length===0}}async function tt(e){let t=await Me.subtle.digest("SHA-1",j.readFileSync(e));return Array.from(new Uint8Array(t)).map(r=>r.toString(16).padStart(2,"0")).join("")}function rt(){let e=Xe("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",5),t=new Date,r=t.getUTCFullYear(),o=(t.getUTCMonth()+1).toString().padStart(2,"0"),n=t.getUTCDate().toString().padStart(2,"0"),s=t.getUTCHours().toString().padStart(2,"0"),p=t.getUTCMinutes().toString().padStart(2,"0"),i=t.getUTCSeconds().toString().padStart(2,"0");return`${r}${o}${n}${s}${p}${i}_${e()}`}W();R();import ge from"node:path";import{Type as u}from"@sinclair/typebox";var ce=u.Object({id:u.Optional(u.String({title:"Template ID",description:"A unique identifier for the template. Can be any string, but should be unique."})),name:u.String({title:"Template Name"}),description:u.Optional(u.String({title:"Show template description"})),readme:u.Optional(u.Record(u.RegExp(/^[a-z]{2}$/),u.String(),{title:"Readme texts.",description:"A dictionary of readme files for different languages (iso 2 letters code). Currently on supported for 'en' and 'fr'."})),tags:u.Optional(u.Array(u.String(),{title:"Tags"})),author:u.Optional(u.String({title:"Author name"})),thumbnail:u.Optional(u.String({title:"Thumbnail",description:"A URL to the thumbnail image for the template."})),homepage:u.Optional(u.String({title:"Homepage",description:"A URL to the homepage of the template."}))});M();import ot from"node:fs";import{readFile as nt}from"node:fs/promises";import st from"fast-glob";import{fromError as it}from"zod-validation-error";import{basename as le,dirname as at,extname as pt}from"node:path";async function de(e,t=g){ot.existsSync(e)||(t.error(`\u{1F534} No enpage.config.js found!
12
12
  Your project must have an enpage.config.js file in the root directory.
13
13
 
14
- `),process.exit(1));let r=await import(e),o=at(e),n={},s=await st(["README.enpage.md","README.enpage.*.md"],{cwd:o,onlyFiles:!0,absolute:!0,caseSensitiveMatch:!1});for(let p of s){let i=le(p,".md"),a=pt(i),c=(a===".enpage"?"en":a.substring(1)).toLowerCase();t.debug(`Found template readme file (${c}): ${le(p)}`),n[c]=await nt(p,"utf-8")}return r.manifest.readme=n,r}function ue(e,t){for(let o in e.datasources)if(e.datasources[o].provider==="json"&&!e.datasources[o].sampleData)throw t.error(`\u{1F534} Error: Datasource "${o}" is missing sample data - nothing will be rendered during development! Please check your enpage.config.js file and add a "sampleData" key to your ${o} datasource.`),new Error(`Missing sample data for datasource "${o}"`);let r=ce.safeParse(e.manifest);if(!r.success){t.error(`\u{1F534} Error: template manifest is invalid. Check your call to defineManifest().
14
+ `),process.exit(1));let r=await import(e),o=at(e),n={},s=await st(["README.enpage.md","README.enpage.*.md"],{cwd:o,onlyFiles:!0,absolute:!0,caseSensitiveMatch:!1});for(let p of s){let i=le(p,".md"),a=pt(i),c=(a===".enpage"?"en":a.substring(1)).toLowerCase();t.debug(`Found template readme file (${c}): ${le(p)}`),n[c]=await nt(p,"utf-8")}return r.manifest&&(r.manifest.readme=n),r}function ue(e,t){for(let o in e.datasources)if(e.datasources[o].provider==="json"&&!e.datasources[o].sampleData)throw t.error(`\u{1F534} Error: Datasource "${o}" is missing sample data - nothing will be rendered during development! Please check your enpage.config.js file and add a "sampleData" key to your ${o} datasource.`),new Error(`Missing sample data for datasource "${o}"`);let r=ce.safeParse(e.manifest);if(!r.success){t.error(`\u{1F534} Error: template manifest is invalid. Check your call to defineManifest().
15
15
  `);let o=it(r.error);t.error(`Hint: ${o.toString()}
16
16
 
17
17
  `),process.exit(1)}return e}R();G();async function me(e=!1){let t=y.get("access_token"),r=y.get("expires_at");if(!t)return!1;if(r&&r<Date.now())return console.log("Seems like your token expired..."),!1;if(!e)return!0;let{get:o}=await Promise.resolve().then(()=>(W(),se)),{isSuccess:n}=await o(K);return n}async function _r({options:e,args:t,logger:r}){if(!await me(!0)){let f=F();r.error(` ${T.redBright("Error")}: User token not found. Please run ${T.cyan(`${f} run enpage:login`)} to authenticate or set the ${T.cyan("ENPAGE_API_TOKEN")} environment variable.
@@ -1,4 +1,4 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
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}
4
4
  ${i}`:i,s.name=g?`${s.name.trim()}
@@ -1,6 +1,6 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
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.78";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
+ 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.79";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
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 k=(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}
5
5
  ${p}`:p,o.name=u?`${o.name.trim()}
6
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=k(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=k(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(`
@@ -1,3 +1,3 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
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};
@@ -1,4 +1,4 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
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 k from"conf";import u from"node:path";import N from"node:crypto";import a from"node:fs";import{fileURLToPath as P}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=N.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=P(new URL(".",import.meta.url)),w=b(),i=new k({projectName:y,encryptionKey:w,clearInvalidConfig:!0})});var h,E=p(()=>{h="0.0.78"});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}
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 k from"conf";import u from"node:path";import N from"node:crypto";import a from"node:fs";import{fileURLToPath as P}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=N.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=P(new URL(".",import.meta.url)),w=b(),i=new k({projectName:y,encryptionKey:w,clearInvalidConfig:!0})});var h,E=p(()=>{h="0.0.79"});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
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};
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
2
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
3
3
 
4
- var Ur=Object.create;var ze=Object.defineProperty;var $r=Object.getOwnPropertyDescriptor;var Wr=Object.getOwnPropertyNames;var Br=Object.getPrototypeOf,zr=Object.prototype.hasOwnProperty;var pt=(i,t)=>()=>(i&&(t=i(i=0)),t);var _s=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports),Gr=(i,t)=>{for(var e in t)ze(i,e,{get:t[e],enumerable:!0})},Hr=(i,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Wr(t))!zr.call(i,r)&&r!==e&&ze(i,r,{get:()=>t[r],enumerable:!(s=$r(t,r))||s.enumerable});return i};var qr=(i,t,e)=>(e=i!=null?Ur(Br(i)):{},Hr(t||!i||!i.__esModule?ze(e,"default",{value:i,enumerable:!0}):e,i));function ae(){let i;if(process.env.npm_config_user_agent){let t=process.env.npm_config_user_agent.split(" ")[0];i=t.slice(0,t.lastIndexOf("/"))}return i||(console.log("Warning: could not detect package manager"),i="npm"),i}function ks(i){return`[${i.error}]${i.error_description?`: ${i.error_description}`:""}`}var Ge=pt(()=>{"use strict"});var Ns,He,lt,Ec,Ds,Ps,Ls,Fs,Ms,ft=pt(()=>{"use strict";Ns="enpage-cli",He=process.env.PUBLIC_ENPAGE_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",lt=process.env.PUBLIC_ENPAGE_API_BASE_URL??"https://api.enpage.co",Ec=process.env.PUBLIC_ENPAGE_FRONTEND_BASE_URL??"https://enpage.co",Ds=10,Ps="oauth/devicecode",Ls="oauth/token",Fs="oauth/userinfo",Ms="v1/templates"});import Vr from"conf";import It from"node:path";import Kr from"node:crypto";import mt from"node:fs";import{fileURLToPath as Yr}from"node:url";import Jr from"chalk";function Is(){let i=M.get("access_token");if(!i){let t=ae();throw new Error(`Access token not found. Please run ${Jr.cyan(`${t} run enpage:login`)} to authenticate.`)}return i}function Qr(){let i=Xr;for(;i!==It.parse(i).root;){let t=It.join(i,"node_modules");if(mt.existsSync(t))return t;i=It.dirname(i)}return null}function tn(){let i=Qr();if(!i)throw new Error("Could not find nearest node_modules directory.");let t=It.join(i,".enpage-tmp");mt.existsSync(t)||mt.mkdirSync(t,{recursive:!0,mode:448});let e=It.join(t,".enpage-key");if(!mt.existsSync(e)){let r=Kr.randomBytes(32).toString("hex");return mt.writeFileSync(e,r,{mode:384,flush:!0}),r}return mt.readFileSync(e,"utf8")}var Xr,Zr,M,gt=pt(()=>{"use strict";ft();Ge();Xr=Yr(new URL(".",import.meta.url)),Zr=tn(),M=new Vr({projectName:Ns,encryptionKey:Zr,clearInvalidConfig:!0})});var Us,js=pt(()=>{Us="0.0.78"});import{createLogger as sn}from"vite";import wt from"chalk";function qe(i,t,e=!1){let s=sn(i==="debug"?"info":i,{prefix:"[enpage]",allowClearScreen:t});return e&&s.info(wt.hex("#7270c6").bold(`\u{1F680} Enpage v${Us}
4
+ var Ur=Object.create;var ze=Object.defineProperty;var $r=Object.getOwnPropertyDescriptor;var Wr=Object.getOwnPropertyNames;var Br=Object.getPrototypeOf,zr=Object.prototype.hasOwnProperty;var pt=(i,t)=>()=>(i&&(t=i(i=0)),t);var _s=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports),Gr=(i,t)=>{for(var e in t)ze(i,e,{get:t[e],enumerable:!0})},Hr=(i,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Wr(t))!zr.call(i,r)&&r!==e&&ze(i,r,{get:()=>t[r],enumerable:!(s=$r(t,r))||s.enumerable});return i};var qr=(i,t,e)=>(e=i!=null?Ur(Br(i)):{},Hr(t||!i||!i.__esModule?ze(e,"default",{value:i,enumerable:!0}):e,i));function ae(){let i;if(process.env.npm_config_user_agent){let t=process.env.npm_config_user_agent.split(" ")[0];i=t.slice(0,t.lastIndexOf("/"))}return i||(console.log("Warning: could not detect package manager"),i="npm"),i}function ks(i){return`[${i.error}]${i.error_description?`: ${i.error_description}`:""}`}var Ge=pt(()=>{"use strict"});var Ns,He,lt,Ec,Ds,Ps,Ls,Fs,Ms,ft=pt(()=>{"use strict";Ns="enpage-cli",He=process.env.PUBLIC_ENPAGE_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",lt=process.env.PUBLIC_ENPAGE_API_BASE_URL??"https://api.enpage.co",Ec=process.env.PUBLIC_ENPAGE_FRONTEND_BASE_URL??"https://enpage.co",Ds=10,Ps="oauth/devicecode",Ls="oauth/token",Fs="oauth/userinfo",Ms="v1/templates"});import Vr from"conf";import It from"node:path";import Kr from"node:crypto";import mt from"node:fs";import{fileURLToPath as Yr}from"node:url";import Jr from"chalk";function Is(){let i=M.get("access_token");if(!i){let t=ae();throw new Error(`Access token not found. Please run ${Jr.cyan(`${t} run enpage:login`)} to authenticate.`)}return i}function Qr(){let i=Xr;for(;i!==It.parse(i).root;){let t=It.join(i,"node_modules");if(mt.existsSync(t))return t;i=It.dirname(i)}return null}function tn(){let i=Qr();if(!i)throw new Error("Could not find nearest node_modules directory.");let t=It.join(i,".enpage-tmp");mt.existsSync(t)||mt.mkdirSync(t,{recursive:!0,mode:448});let e=It.join(t,".enpage-key");if(!mt.existsSync(e)){let r=Kr.randomBytes(32).toString("hex");return mt.writeFileSync(e,r,{mode:384,flush:!0}),r}return mt.readFileSync(e,"utf8")}var Xr,Zr,M,gt=pt(()=>{"use strict";ft();Ge();Xr=Yr(new URL(".",import.meta.url)),Zr=tn(),M=new Vr({projectName:Ns,encryptionKey:Zr,clearInvalidConfig:!0})});var Us,js=pt(()=>{Us="0.0.79"});import{createLogger as sn}from"vite";import wt from"chalk";function qe(i,t,e=!1){let s=sn(i==="debug"?"info":i,{prefix:"[enpage]",allowClearScreen:t});return e&&s.info(wt.hex("#7270c6").bold(`\u{1F680} Enpage v${Us}
5
5
  `)),{...s,success:(r,n)=>s.info(wt.green(r),n),error:(r,n)=>s.error(wt.red(r),n),warn:(r,n)=>s.warn(wt.yellow(r),n),warnOnce:(r,n)=>s.warnOnce(wt.yellow(r),n),debug:(r,n)=>{i==="debug"&&s.info(wt.gray(r),n)}}}var k,jt=pt(()=>{"use strict";js();k=qe()});var Gs={};Gr(Gs,{get:()=>mn,post:()=>it});async function it(i,t,e={}){M.get("access_token")&&(e.Authorization=`Bearer ${M.get("access_token")}`);let s=await fetch(Bs(i),{method:"POST",headers:{"Content-Type":t instanceof URLSearchParams?"application/x-www-form-urlencoded":"application/json",...e},body:t instanceof URLSearchParams?t:JSON.stringify(t)}).catch(r=>{k.error(`Fatal Error requesting API: ${r.message} (${r.cause.code})`),k.error("Please check your internet connection and try again, or retry later."),process.exit(1)});return zs(s)}async function mn(i,t={}){M.get("access_token")&&(t.Authorization=`Bearer ${M.get("access_token")}`);let e=await fetch(Bs(i),{headers:t,method:"GET"}).catch(s=>{k.error(`Fatal Error requesting API: ${s.message} (${s.cause.code})`),k.error("Please check your internet connection and try again, or retry later."),process.exit(1)});return zs(e)}function Bs(i){let t=new URL(lt.endsWith("/")?lt:`${lt}/`);return new URL(i,t)}async function zs(i){let t=i.headers.get("content-type")?.startsWith("application/json")?await i.json():await i.text();return i.ok?{isSuccess:!0,isError:!1,status:i.status,statusText:i.statusText,data:t}:{isSuccess:!1,isError:!0,status:i.status,statusText:i.statusText,data:t}}var Ut=pt(()=>{"use strict";jt();ft();gt()});var oi=_s((Ih,ni)=>{"use strict";ni.exports=ii;function ii(i,t,e){i instanceof RegExp&&(i=si(i,e)),t instanceof RegExp&&(t=si(t,e));var s=ri(i,t,e);return s&&{start:s[0],end:s[1],pre:e.slice(0,s[0]),body:e.slice(s[0]+i.length,s[1]),post:e.slice(s[1]+t.length)}}function si(i,t){var e=t.match(i);return e?e[0]:null}ii.range=ri;function ri(i,t,e){var s,r,n,o,a,c=e.indexOf(i),h=e.indexOf(t,c+1),l=c;if(c>=0&&h>0){if(i===t)return[c,h];for(s=[],n=e.length;l>=0&&!a;)l==c?(s.push(l),c=e.indexOf(i,l+1)):s.length==1?a=[s.pop(),h]:(r=s.pop(),r<n&&(n=r,o=h),h=e.indexOf(t,l+1)),l=c<h&&c>=0?c:h;s.length&&(a=[n,o])}return a}});var pi=_s((jh,di)=>{"use strict";var ai=oi();di.exports=Kn;var ci="\0SLASH"+Math.random()+"\0",hi="\0OPEN"+Math.random()+"\0",Ke="\0CLOSE"+Math.random()+"\0",li="\0COMMA"+Math.random()+"\0",fi="\0PERIOD"+Math.random()+"\0";function Ve(i){return parseInt(i,10)==i?parseInt(i,10):i.charCodeAt(0)}function qn(i){return i.split("\\\\").join(ci).split("\\{").join(hi).split("\\}").join(Ke).split("\\,").join(li).split("\\.").join(fi)}function Vn(i){return i.split(ci).join("\\").split(hi).join("{").split(Ke).join("}").split(li).join(",").split(fi).join(".")}function ui(i){if(!i)return[""];var t=[],e=ai("{","}",i);if(!e)return i.split(",");var s=e.pre,r=e.body,n=e.post,o=s.split(",");o[o.length-1]+="{"+r+"}";var a=ui(n);return n.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),t.push.apply(t,o),t}function Kn(i){return i?(i.substr(0,2)==="{}"&&(i="\\{\\}"+i.substr(2)),zt(qn(i),!0).map(Vn)):[]}function Yn(i){return"{"+i+"}"}function Jn(i){return/^-?0\d/.test(i)}function Xn(i,t){return i<=t}function Zn(i,t){return i>=t}function zt(i,t){var e=[],s=ai("{","}",i);if(!s)return[i];var r=s.pre,n=s.post.length?zt(s.post,!1):[""];if(/\$$/.test(s.pre))for(var o=0;o<n.length;o++){var a=r+"{"+s.body+"}"+n[o];e.push(a)}else{var c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),h=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),l=c||h,f=s.body.indexOf(",")>=0;if(!l&&!f)return s.post.match(/,.*\}/)?(i=s.pre+"{"+s.body+Ke+s.post,zt(i)):[i];var u;if(l)u=s.body.split(/\.\./);else if(u=ui(s.body),u.length===1&&(u=zt(u[0],!1).map(Yn),u.length===1))return n.map(function(oe){return s.pre+u[0]+oe});var d;if(l){var g=Ve(u[0]),p=Ve(u[1]),y=Math.max(u[0].length,u[1].length),m=u.length==3?Math.abs(Ve(u[2])):1,b=Xn,w=p<g;w&&(m*=-1,b=Zn);var S=u.some(Jn);d=[];for(var E=g;b(E,p);E+=m){var v;if(h)v=String.fromCharCode(E),v==="\\"&&(v="");else if(v=String(E),S){var C=y-v.length;if(C>0){var K=new Array(C+1).join("0");E<0?v="-"+K+v.slice(1):v=K+v}}d.push(v)}}else{d=[];for(var B=0;B<u.length;B++)d.push.apply(d,zt(u[B],!1))}for(var B=0;B<d.length;B++)for(var o=0;o<n.length;o++){var a=r+d[B]+n[o];(!t||l||a)&&e.push(a)}}return e}});import{program as Mt}from"commander";Ge();gt();import{resolve as X}from"node:path";import{existsSync as Bt,readFileSync as jn,writeFileSync as Un}from"node:fs";import rt from"chalk";ft();jt();import $t from"node:path";import Wt from"node:fs";import gn from"node:crypto";import wn from"fast-glob";import qs from"node:http";import yn from"node:https";import{pipeline as Sn}from"node:stream";import Hs from"chalk";import bn from"form-data";import*as ce from"node:fs";var rn=/[<>"|?*\n\r\t\f\x00-\x1F]/,nn=/(?:^|\/)[*]{2}($|\/)/,on=248,an=i=>i!==null&&typeof i=="object"&&!Array.isArray(i),cn=i=>typeof i=="string"&&i.length<=on&&!rn.test(i),hn=i=>i.split(/\r\n?|\n/);var ln=i=>an(i)&&Array.isArray(i.patterns)&&Array.isArray(i.sections);var he=(i,t={})=>{let e=t.path;if(ln(i))return i;cn(i)&&ce.existsSync(i)&&(e=i,i=ce.readFileSync(i,"utf8"));let s=hn(i),r=new Map,n={sections:[],patterns:[]},o={name:"default",patterns:[]},a=null;for(let c of s){let h=c.trim();if(h.startsWith("#")){let[,l]=/^#+\s*(.*)\s*$/.exec(h)||[];if(a){r.delete(a.name),a.comment=a.comment?`${a.comment}
6
6
  ${h}`:h,a.name=l?`${a.name.trim()}
7
7
  ${l.trim()}`:a.name.trim(),r.set(a.name.toLowerCase().trim(),a);continue}o={name:l?.trim()||"",comment:h,patterns:[]},r.set(o.name.toLowerCase(),o),n.sections.push(o),a=o;continue}h!==""&&(o.patterns.push(h),n.patterns.push(h)),a=null}return(t.dedupe===!0||t.unique===!0)&&(n=$s(n,{...t,format:!1})),n.path=e,n.input=Buffer.from(i),n.format=c=>pn(n,{...t,...c}),n.dedupe=c=>$s(n,{...t,...c}),n.globs=c=>un(n,{path:e,...t,...c}),n};var $s=(i,t)=>{let e=he(i,{...t,dedupe:!1}),s=new Map,r={sections:[],patterns:[]},n;for(let o of e.sections){let{name:a="",comment:c,patterns:h}=o,l=a.trim().toLowerCase();for(let f of h)r.patterns.includes(f)||r.patterns.push(f);a&&s.has(l)?(n=s.get(l),n.patterns=[...n.patterns,...h]):(n={name:a,comment:c,patterns:h},r.sections.push(n),s.set(l,n))}for(let o of r.sections)o.patterns=[...new Set(o.patterns)];return r},fn=i=>{if(nn.test(i))return i;let t=!1;return i.startsWith("/")?(i=i.slice(1),t=!0):i.slice(1,i.length-1).includes("/")&&(t=!0),i+=i.endsWith("/")?"**/":"/**",t?i:`**/${i}`},un=(i,t={})=>{let e=he(i,t),s=[],r=0,n=e.patterns.concat(t.ignore||[]).concat((t.unignore||[]).map(a=>a.startsWith("!")?a:`!${a}`)),o=(a,c)=>{let h=s[s.length-1],l=a?"unignore":"ignore";h&&h.type===l?h.patterns.includes(c)||h.patterns.push(c):(s.push({type:l,path:t.path||null,patterns:[c],index:r}),r++)};for(let a of n){let c="";a.startsWith("!")&&(a=a.slice(1),c="!"),o(c,a.startsWith("/")?a.slice(1):a),o(c,fn(a))}return s},dn=(i={name:"",patterns:[]})=>{let t=[i.comment||""];return i.patterns?.length&&(t.push(i.patterns.join(`
@@ -12,7 +12,7 @@ ${l.trim()}`:a.name.trim(),r.set(a.name.toLowerCase().trim(),a);continue}o={name
12
12
  `),k.info("The following files would have been uploaded:"),a.forEach(m=>k.info(`- ${m}`)),process.exit(0));let u=xn(`Uploading ${c} files...`).start(),d=a.map(m=>{let b=$t.resolve(t,m),w=$t.relative(t,m),S=`${lt}/v1/templates/${i}/upload/${l}`;return o.add(async()=>{let E=await An(b,w,S,i,u,e,n);return f++,E})}),g=await Promise.allSettled(d);u.stop();let p=g.filter(m=>m.status==="fulfilled"),y=g.filter(m=>m.status==="rejected");if(_n(i,p.map(m=>m.value),y),!y.length&&p.length){let m=`${lt}/v1/templates/${i}/upload/${l}/finalize`,w=await it(m,{signatures:h});if(w.isError)return k.error(`Failed to finalize upload: ${w.data.error_description} (${w.data.error})`),{filesCount:c,uploadedFiles:p.map(S=>S.value),failedFiles:[],success:!1}}return{filesCount:c,uploadedFiles:p.map(m=>m.value),failedFiles:y,success:y.length===0}}async function kn(i){let t=await gn.subtle.digest("SHA-1",Wt.readFileSync(i));return Array.from(new Uint8Array(t)).map(e=>e.toString(16).padStart(2,"0")).join("")}function Nn(){let i=vn("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",5),t=new Date,e=t.getUTCFullYear(),s=(t.getUTCMonth()+1).toString().padStart(2,"0"),r=t.getUTCDate().toString().padStart(2,"0"),n=t.getUTCHours().toString().padStart(2,"0"),o=t.getUTCMinutes().toString().padStart(2,"0"),a=t.getUTCSeconds().toString().padStart(2,"0");return`${e}${s}${r}${n}${o}${a}_${i()}`}Ut();ft();import Qs from"node:path";import{Type as T}from"@sinclair/typebox";var Ks=T.Object({id:T.Optional(T.String({title:"Template ID",description:"A unique identifier for the template. Can be any string, but should be unique."})),name:T.String({title:"Template Name"}),description:T.Optional(T.String({title:"Show template description"})),readme:T.Optional(T.Record(T.RegExp(/^[a-z]{2}$/),T.String(),{title:"Readme texts.",description:"A dictionary of readme files for different languages (iso 2 letters code). Currently on supported for 'en' and 'fr'."})),tags:T.Optional(T.Array(T.String(),{title:"Tags"})),author:T.Optional(T.String({title:"Author name"})),thumbnail:T.Optional(T.String({title:"Thumbnail",description:"A URL to the thumbnail image for the template."})),homepage:T.Optional(T.String({title:"Homepage",description:"A URL to the homepage of the template."}))});jt();import Dn from"node:fs";import{readFile as Pn}from"node:fs/promises";import Ln from"fast-glob";import{fromError as Fn}from"zod-validation-error";import{basename as Ys,dirname as Mn,extname as In}from"node:path";async function Js(i,t=k){Dn.existsSync(i)||(t.error(`\u{1F534} No enpage.config.js found!
13
13
  Your project must have an enpage.config.js file in the root directory.
14
14
 
15
- `),process.exit(1));let e=await import(i),s=Mn(i),r={},n=await Ln(["README.enpage.md","README.enpage.*.md"],{cwd:s,onlyFiles:!0,absolute:!0,caseSensitiveMatch:!1});for(let o of n){let a=Ys(o,".md"),c=In(a),h=(c===".enpage"?"en":c.substring(1)).toLowerCase();t.debug(`Found template readme file (${h}): ${Ys(o)}`),r[h]=await Pn(o,"utf-8")}return e.manifest.readme=r,e}function Xs(i,t){for(let s in i.datasources)if(i.datasources[s].provider==="json"&&!i.datasources[s].sampleData)throw t.error(`\u{1F534} Error: Datasource "${s}" is missing sample data - nothing will be rendered during development! Please check your enpage.config.js file and add a "sampleData" key to your ${s} datasource.`),new Error(`Missing sample data for datasource "${s}"`);let e=Ks.safeParse(i.manifest);if(!e.success){t.error(`\u{1F534} Error: template manifest is invalid. Check your call to defineManifest().
15
+ `),process.exit(1));let e=await import(i),s=Mn(i),r={},n=await Ln(["README.enpage.md","README.enpage.*.md"],{cwd:s,onlyFiles:!0,absolute:!0,caseSensitiveMatch:!1});for(let o of n){let a=Ys(o,".md"),c=In(a),h=(c===".enpage"?"en":c.substring(1)).toLowerCase();t.debug(`Found template readme file (${h}): ${Ys(o)}`),r[h]=await Pn(o,"utf-8")}return e.manifest&&(e.manifest.readme=r),e}function Xs(i,t){for(let s in i.datasources)if(i.datasources[s].provider==="json"&&!i.datasources[s].sampleData)throw t.error(`\u{1F534} Error: Datasource "${s}" is missing sample data - nothing will be rendered during development! Please check your enpage.config.js file and add a "sampleData" key to your ${s} datasource.`),new Error(`Missing sample data for datasource "${s}"`);let e=Ks.safeParse(i.manifest);if(!e.success){t.error(`\u{1F534} Error: template manifest is invalid. Check your call to defineManifest().
16
16
  `);let s=Fn(e.error);t.error(`Hint: ${s.toString()}
17
17
 
18
18
  `),process.exit(1)}return i}ft();gt();async function Zs(i=!1){let t=M.get("access_token"),e=M.get("expires_at");if(!t)return!1;if(e&&e<Date.now())return console.log("Seems like your token expired..."),!1;if(!i)return!0;let{get:s}=await Promise.resolve().then(()=>(Ut(),Gs)),{isSuccess:r}=await s(Fs);return r}async function ti({options:i,args:t,logger:e}){if(!await Zs(!0)){let f=ae();e.error(` ${rt.redBright("Error")}: User token not found. Please run ${rt.cyan(`${f} run enpage:login`)} to authenticate or set the ${rt.cyan("ENPAGE_API_TOKEN")} environment variable.
@@ -1,3 +1,3 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
3
  var c="enpage-cli";var N=process.env.PUBLIC_ENPAGE_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",I=process.env.PUBLIC_ENPAGE_API_BASE_URL??"https://api.enpage.co",P=process.env.PUBLIC_ENPAGE_FRONTEND_BASE_URL??"https://enpage.co";import p from"conf";import r from"node:path";import a from"node:crypto";import o from"node:fs";import{fileURLToPath as _}from"node:url";function i(){let e;if(process.env.npm_config_user_agent){let t=process.env.npm_config_user_agent.split(" ")[0];e=t.slice(0,t.lastIndexOf("/"))}return e||(console.log("Warning: could not detect package manager"),e="npm"),e}import u from"chalk";var m=_(new URL(".",import.meta.url)),E=g(),d=new p({projectName:c,encryptionKey:E,clearInvalidConfig:!0});function R(){let e=d.get("access_token");if(!e){let t=i();throw new Error(`Access token not found. Please run ${u.cyan(`${t} run enpage:login`)} to authenticate.`)}return e}function f(){let e=m;for(;e!==r.parse(e).root;){let t=r.join(e,"node_modules");if(o.existsSync(t))return t;e=r.dirname(e)}return null}function g(){let e=f();if(!e)throw new Error("Could not find nearest node_modules directory.");let t=r.join(e,".enpage-tmp");o.existsSync(t)||o.mkdirSync(t,{recursive:!0,mode:448});let n=r.join(t,".enpage-key");if(!o.existsSync(n)){let s=a.randomBytes(32).toString("hex");return o.writeFileSync(n,s,{mode:384,flush:!0}),s}return o.readFileSync(n,"utf8")}export{d as accessStore,R as getTokenOrThrow};
@@ -1,2 +1,2 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
@@ -1,3 +1,3 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
3
  function n(){let r;if(process.env.npm_config_user_agent){let e=process.env.npm_config_user_agent.split(" ")[0];r=e.slice(0,e.lastIndexOf("/"))}return r||(console.log("Warning: could not detect package manager"),r="npm"),r}function t(r){return`[${r.error}]${r.error_description?`: ${r.error_description}`:""}`}export{t as formatAPIError,n as getPackageManager};
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/node/shared/config.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,EAA2B,MAAM,UAAU,CAAC;AAGhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,MAAM,EAClB,MAAM;;;;;;;;;;CAAgB,GACrB,OAAO,CAAC,cAAc,CAAC,CA8BzB;AAED,wBAAgB,0BAA0B,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc,CAM/F;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,kBAmB5E"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/node/shared/config.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,EAA2B,MAAM,UAAU,CAAC;AAGhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,MAAM,EAClB,MAAM;;;;;;;;;;CAAgB,GACrB,OAAO,CAAC,cAAc,CAAC,CAgCzB;AAED,wBAAgB,0BAA0B,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc,CAM/F;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,kBAmB5E"}
@@ -1,13 +1,13 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{Type as e}from"@sinclair/typebox";var m=e.Object({id:e.Optional(e.String({title:"Template ID",description:"A unique identifier for the template. Can be any string, but should be unique."})),name:e.String({title:"Template Name"}),description:e.Optional(e.String({title:"Show template description"})),readme:e.Optional(e.Record(e.RegExp(/^[a-z]{2}$/),e.String(),{title:"Readme texts.",description:"A dictionary of readme files for different languages (iso 2 letters code). Currently on supported for 'en' and 'fr'."})),tags:e.Optional(e.Array(e.String(),{title:"Tags"})),author:e.Optional(e.String({title:"Author name"})),thumbnail:e.Optional(e.String({title:"Thumbnail",description:"A URL to the thumbnail image for the template."})),homepage:e.Optional(e.String({title:"Homepage",description:"A URL to the homepage of the template."}))});import d from"node:fs";import{readFile as x}from"node:fs/promises";import L from"fast-glob";import{createLogger as b}from"vite";var g="0.0.78";import n from"chalk";function v(r,i,a=!1){let t=b(r==="debug"?"info":r,{prefix:"[enpage]",allowClearScreen:i});return a&&t.info(n.hex("#7270c6").bold(`\u{1F680} Enpage v${g}
4
- `)),{...t,success:(o,s)=>t.info(n.green(o),s),error:(o,s)=>t.error(n.red(o),s),warn:(o,s)=>t.warn(n.yellow(o),s),warnOnce:(o,s)=>t.warnOnce(n.yellow(o),s),debug:(o,s)=>{r==="debug"&&t.info(n.gray(o),s)}}}var u=v();import{fromError as O}from"zod-validation-error";import{basename as f,dirname as w,extname as S}from"node:path";async function P(r,i=u){d.existsSync(r)||(i.error(`\u{1F534} No enpage.config.js found!
3
+ import{Type as e}from"@sinclair/typebox";var c=e.Object({id:e.Optional(e.String({title:"Template ID",description:"A unique identifier for the template. Can be any string, but should be unique."})),name:e.String({title:"Template Name"}),description:e.Optional(e.String({title:"Show template description"})),readme:e.Optional(e.Record(e.RegExp(/^[a-z]{2}$/),e.String(),{title:"Readme texts.",description:"A dictionary of readme files for different languages (iso 2 letters code). Currently on supported for 'en' and 'fr'."})),tags:e.Optional(e.Array(e.String(),{title:"Tags"})),author:e.Optional(e.String({title:"Author name"})),thumbnail:e.Optional(e.String({title:"Thumbnail",description:"A URL to the thumbnail image for the template."})),homepage:e.Optional(e.String({title:"Homepage",description:"A URL to the homepage of the template."}))});import d from"node:fs";import{readFile as x}from"node:fs/promises";import L from"fast-glob";import{createLogger as b}from"vite";var g="0.0.79";import n from"chalk";function v(r,i,a=!1){let t=b(r==="debug"?"info":r,{prefix:"[enpage]",allowClearScreen:i});return a&&t.info(n.hex("#7270c6").bold(`\u{1F680} Enpage v${g}
4
+ `)),{...t,success:(s,o)=>t.info(n.green(s),o),error:(s,o)=>t.error(n.red(s),o),warn:(s,o)=>t.warn(n.yellow(s),o),warnOnce:(s,o)=>t.warnOnce(n.yellow(s),o),debug:(s,o)=>{r==="debug"&&t.info(n.gray(s),o)}}}var u=v();import{fromError as O}from"zod-validation-error";import{basename as f,dirname as w,extname as S}from"node:path";async function P(r,i=u){d.existsSync(r)||(i.error(`\u{1F534} No enpage.config.js found!
5
5
  Your project must have an enpage.config.js file in the root directory.
6
6
 
7
- `),process.exit(1));let a=await import(r),t=w(r),o={},s=await L(["README.enpage.md","README.enpage.*.md"],{cwd:t,onlyFiles:!0,absolute:!0,caseSensitiveMatch:!1});for(let p of s){let y=f(p,".md"),l=S(y),c=(l===".enpage"?"en":l.substring(1)).toLowerCase();i.debug(`Found template readme file (${c}): ${f(p)}`),o[c]=await x(p,"utf-8")}return a.manifest.readme=o,a}function B(r,i){return d.existsSync(r)||(i.error(`\u{1F534} No enpage.manifest.json found!
7
+ `),process.exit(1));let a=await import(r),t=w(r),s={},o=await L(["README.enpage.md","README.enpage.*.md"],{cwd:t,onlyFiles:!0,absolute:!0,caseSensitiveMatch:!1});for(let p of o){let y=f(p,".md"),l=S(y),m=(l===".enpage"?"en":l.substring(1)).toLowerCase();i.debug(`Found template readme file (${m}): ${f(p)}`),s[m]=await x(p,"utf-8")}return a.manifest&&(a.manifest.readme=s),a}function B(r,i){return d.existsSync(r)||(i.error(`\u{1F534} No enpage.manifest.json found!
8
8
  You may want to 'build' your template.
9
9
 
10
- `),process.exit(1)),JSON.parse(d.readFileSync(r,"utf-8"))}function H(r,i){for(let t in r.datasources)if(r.datasources[t].provider==="json"&&!r.datasources[t].sampleData)throw i.error(`\u{1F534} Error: Datasource "${t}" is missing sample data - nothing will be rendered during development! Please check your enpage.config.js file and add a "sampleData" key to your ${t} datasource.`),new Error(`Missing sample data for datasource "${t}"`);let a=m.safeParse(r.manifest);if(!a.success){i.error(`\u{1F534} Error: template manifest is invalid. Check your call to defineManifest().
10
+ `),process.exit(1)),JSON.parse(d.readFileSync(r,"utf-8"))}function H(r,i){for(let t in r.datasources)if(r.datasources[t].provider==="json"&&!r.datasources[t].sampleData)throw i.error(`\u{1F534} Error: Datasource "${t}" is missing sample data - nothing will be rendered during development! Please check your enpage.config.js file and add a "sampleData" key to your ${t} datasource.`),new Error(`Missing sample data for datasource "${t}"`);let a=c.safeParse(r.manifest);if(!a.success){i.error(`\u{1F534} Error: template manifest is invalid. Check your call to defineManifest().
11
11
  `);let t=O(a.error);i.error(`Hint: ${t.toString()}
12
12
 
13
13
  `),process.exit(1)}return r}export{P as loadConfigFromJsFile,B as loadConfigFromManifestFile,H as validateTemplateConfig};
@@ -1,4 +1,4 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{createLogger as d}from"vite";var i="0.0.78";import r from"chalk";function g(o,a,n=!1){let s=d(o==="debug"?"info":o,{prefix:"[enpage]",allowClearScreen:a});return n&&s.info(r.hex("#7270c6").bold(`\u{1F680} Enpage v${i}
3
+ import{createLogger as d}from"vite";var i="0.0.79";import r from"chalk";function g(o,a,n=!1){let s=d(o==="debug"?"info":o,{prefix:"[enpage]",allowClearScreen:a});return n&&s.info(r.hex("#7270c6").bold(`\u{1F680} Enpage v${i}
4
4
  `)),{...s,success:(e,t)=>s.info(r.green(e),t),error:(e,t)=>s.error(r.red(e),t),warn:(e,t)=>s.warn(r.yellow(e),t),warnOnce:(e,t)=>s.warnOnce(r.yellow(e),t),debug:(e,t)=>{o==="debug"&&s.info(r.gray(e),t)}}}var y=g();export{g as createLogger,y as logger};
@@ -1,5 +1,6 @@
1
1
  import Ajv, { type ErrorObject } from "ajv";
2
2
  export type { JSONSchemaType, AnySchemaObject, SchemaObject, JSONType } from "ajv";
3
3
  export declare const ajv: Ajv;
4
+ export declare const jsonStringsSupportedFormats: readonly ["date-time", "time", "date", "email", "hostname", "ipv4", "ipv6", "uri", "uri-reference", "uuid", "uri-template", "json-pointer", "relative-json-pointer", "regex"];
4
5
  export declare function serializeAjvErrors(errors: ErrorObject[] | null | undefined): string;
5
6
  //# sourceMappingURL=ajv.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ajv.d.ts","sourceRoot":"","sources":["../../src/shared/ajv.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,EAAE,EAAE,KAAK,WAAW,EAAE,MAAM,KAAK,CAAC;AAG5C,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAEnF,eAAO,MAAM,GAAG,KAGd,CAAC;AA0BH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAcnF"}
1
+ {"version":3,"file":"ajv.d.ts","sourceRoot":"","sources":["../../src/shared/ajv.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,EAAE,EAAE,KAAK,WAAW,EAAE,MAAM,KAAK,CAAC;AAG5C,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAEnF,eAAO,MAAM,GAAG,KAGd,CAAC;AAEH,eAAO,MAAM,2BAA2B,+KAe9B,CAAC;AAWX,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAcnF"}
@@ -1,3 +1,3 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{a,b}from"./chunk-6PCNIIO5.js";export{a as ajv,b as serializeAjvErrors};
3
+ import{a,b,c}from"./chunk-ZWVJMSTT.js";export{a as ajv,b as jsonStringsSupportedFormats,c as serializeAjvErrors};
@@ -1,3 +1,3 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
3
  function t(){window.upstartQueue=window.upstartQueue||[],document.addEventListener("visibilitychange",function(){if(document.visibilityState==="hidden"){let e=JSON.stringify(window.upstartQueue);navigator.sendBeacon?.(window.location.pathname,e)?(console.debug("beacon sent",e),window.upstartQueue=[]):console.debug("beacon failed",e)}})}export{t as init};
@@ -1,3 +1,3 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
3
  function o(t,a={}){let e={e:t,t:Date.now(),d:a};window.upstartQueue.push(e)}document.addEventListener("click",function(t){let a=t.target;o("click",{buttonId:a.id})},!0);export{o as track};
@@ -1,2 +1,2 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
@@ -1,4 +1,4 @@
1
- import { type StringOptions, type NumberOptions, type SchemaOptions, type ObjectOptions, type TProperties, type Static } from "@sinclair/typebox";
1
+ import { type StringOptions, type NumberOptions, type SchemaOptions, type ObjectOptions, type TProperties, type Static, type TObject } from "@sinclair/typebox";
2
2
  import type { ElementColor } from "./themes/color-system";
3
3
  import type { JSONSchemaType } from "ajv";
4
4
  type EnumOption = {
@@ -21,7 +21,32 @@ type GeoPoint = {
21
21
  lng: number;
22
22
  name?: string;
23
23
  };
24
- export declare function defineAttributes(attrs: TProperties): JSONSchemaType<Attributes>;
24
+ export declare function defineAttributes(attrs: TProperties): TObject<{
25
+ $pageLanguage: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<string>[]>;
26
+ $pageOgImage: import("@sinclair/typebox").TString;
27
+ $robotsIndexing: import("@sinclair/typebox").TBoolean;
28
+ $siteOgImage: import("@sinclair/typebox").TString;
29
+ $pagePath: import("@sinclair/typebox").TString;
30
+ $pageTitle: import("@sinclair/typebox").TString;
31
+ $pageDescription: import("@sinclair/typebox").TString;
32
+ $pageKeywords: import("@sinclair/typebox").TString;
33
+ $pageLastUpdated: import("@sinclair/typebox").TString;
34
+ $bodyBackground: TObject<{
35
+ repeat: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"no-repeat">, import("@sinclair/typebox").TLiteral<"repeat">, import("@sinclair/typebox").TLiteral<"repeat-x">, import("@sinclair/typebox").TLiteral<"repeat-y">, import("@sinclair/typebox").TLiteral<"space">, import("@sinclair/typebox").TLiteral<"round">]>>;
36
+ color: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
37
+ size: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"auto">, import("@sinclair/typebox").TLiteral<"cover">, import("@sinclair/typebox").TLiteral<"contain">]>>;
38
+ image: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
39
+ }>;
40
+ $pageBackground: TObject<{
41
+ repeat: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"no-repeat">, import("@sinclair/typebox").TLiteral<"repeat">, import("@sinclair/typebox").TLiteral<"repeat-x">, import("@sinclair/typebox").TLiteral<"repeat-y">, import("@sinclair/typebox").TLiteral<"space">, import("@sinclair/typebox").TLiteral<"round">]>>;
42
+ color: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
43
+ size: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"auto">, import("@sinclair/typebox").TLiteral<"cover">, import("@sinclair/typebox").TLiteral<"contain">]>>;
44
+ image: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
45
+ }>;
46
+ $textColor: import("@sinclair/typebox").TString;
47
+ $siteHeadTags: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
48
+ $siteBodyTags: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
49
+ }>;
25
50
  export type { JSONSchemaType };
26
51
  export type AttributesSchema = JSONSchemaType<Attributes>;
27
52
  export declare const attr: {
@@ -67,13 +92,13 @@ export declare const attr: {
67
92
  /**
68
93
  * Define a geolocation
69
94
  */
70
- geolocation(name: string, defaultValue: GeoPoint, opts?: AttributeOptions<Omit<ObjectOptions, "title" | "default">>): import("@sinclair/typebox").TObject<{
95
+ geolocation(name: string, defaultValue: GeoPoint, opts?: AttributeOptions<Omit<ObjectOptions, "title" | "default">>): TObject<{
71
96
  lat: import("@sinclair/typebox").TNumber;
72
97
  lng: import("@sinclair/typebox").TNumber;
73
98
  name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
74
99
  }>;
75
100
  };
76
- export declare const defaultAttributesSchema: import("@sinclair/typebox").TObject<{
101
+ export declare const defaultAttributesSchema: TObject<{
77
102
  $pageLanguage: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<string>[]>;
78
103
  $pageOgImage: import("@sinclair/typebox").TString;
79
104
  $robotsIndexing: import("@sinclair/typebox").TBoolean;
@@ -83,12 +108,13 @@ export declare const defaultAttributesSchema: import("@sinclair/typebox").TObjec
83
108
  $pageDescription: import("@sinclair/typebox").TString;
84
109
  $pageKeywords: import("@sinclair/typebox").TString;
85
110
  $pageLastUpdated: import("@sinclair/typebox").TString;
86
- $pagePadding: import("@sinclair/typebox").TObject<{
87
- vertical: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<string>[]>;
88
- horizontal: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<string>[]>;
111
+ $bodyBackground: TObject<{
112
+ repeat: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"no-repeat">, import("@sinclair/typebox").TLiteral<"repeat">, import("@sinclair/typebox").TLiteral<"repeat-x">, import("@sinclair/typebox").TLiteral<"repeat-y">, import("@sinclair/typebox").TLiteral<"space">, import("@sinclair/typebox").TLiteral<"round">]>>;
113
+ color: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
114
+ size: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"auto">, import("@sinclair/typebox").TLiteral<"cover">, import("@sinclair/typebox").TLiteral<"contain">]>>;
115
+ image: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
89
116
  }>;
90
- $pageWidth: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<string>[]>;
91
- $background: import("@sinclair/typebox").TObject<{
117
+ $pageBackground: TObject<{
92
118
  repeat: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"no-repeat">, import("@sinclair/typebox").TLiteral<"repeat">, import("@sinclair/typebox").TLiteral<"repeat-x">, import("@sinclair/typebox").TLiteral<"repeat-y">, import("@sinclair/typebox").TLiteral<"space">, import("@sinclair/typebox").TLiteral<"round">]>>;
93
119
  color: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
94
120
  size: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"auto">, import("@sinclair/typebox").TLiteral<"cover">, import("@sinclair/typebox").TLiteral<"contain">]>>;
@@ -99,5 +125,5 @@ export declare const defaultAttributesSchema: import("@sinclair/typebox").TObjec
99
125
  $siteBodyTags: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
100
126
  }>;
101
127
  export type Attributes = Static<typeof defaultAttributesSchema> & Record<string, unknown>;
102
- export declare function resolveAttributes(attributesSchema: JSONSchemaType<Attributes>, initialData?: Record<string, unknown>): Attributes;
128
+ export declare function resolveAttributes(attributesSchema: TObject<TProperties>, initialData?: Record<string, unknown>): Attributes;
103
129
  //# sourceMappingURL=attributes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../src/shared/attributes.ts"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../src/shared/attributes.ts"],"names":[],"mappings":"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"}
@@ -1,3 +1,3 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{a,b,c,d}from"./chunk-AVHF4FLR.js";import"./chunk-6PCNIIO5.js";import"./chunk-MEMG6QPT.js";export{b as attr,c as defaultAttributesSchema,a as defineAttributes,d as resolveAttributes};
3
+ import{a,b,c,d}from"./chunk-4JJHQZYB.js";import"./chunk-ZWVJMSTT.js";import"./chunk-IEB7RHDF.js";import"./chunk-XIXSVFY6.js";import"./chunk-PSSJMWGU.js";export{b as attr,c as defaultAttributesSchema,a as defineAttributes,d as resolveAttributes};