extension-create 2.0.0-alpha.27 → 2.0.0-alpha.29

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 (383) hide show
  1. package/dist/module.js +23 -22
  2. package/package.json +1 -1
  3. package/dist/test-template-action/README.md +0 -35
  4. package/dist/test-template-action/action/index.html +0 -40
  5. package/dist/test-template-action/action/scripts.js +0 -11
  6. package/dist/test-template-action/action/styles.css +0 -23
  7. package/dist/test-template-action/images/extension_128.png +0 -0
  8. package/dist/test-template-action/images/extension_16.png +0 -0
  9. package/dist/test-template-action/images/extension_48.png +0 -0
  10. package/dist/test-template-action/manifest.json +0 -21
  11. package/dist/test-template-action/package.json +0 -21
  12. package/dist/test-template-action-chatgpt/.env.example +0 -1
  13. package/dist/test-template-action-chatgpt/README.md +0 -35
  14. package/dist/test-template-action-chatgpt/action/ActionApp.tsx +0 -118
  15. package/dist/test-template-action-chatgpt/action/index.html +0 -13
  16. package/dist/test-template-action-chatgpt/action/scripts.tsx +0 -12
  17. package/dist/test-template-action-chatgpt/action/styles.css +0 -8
  18. package/dist/test-template-action-chatgpt/images/chatgpt.png +0 -0
  19. package/dist/test-template-action-chatgpt/images/extension.png +0 -0
  20. package/dist/test-template-action-chatgpt/images/extension_128.png +0 -0
  21. package/dist/test-template-action-chatgpt/images/extension_16.png +0 -0
  22. package/dist/test-template-action-chatgpt/images/extension_48.png +0 -0
  23. package/dist/test-template-action-chatgpt/manifest.json +0 -21
  24. package/dist/test-template-action-chatgpt/package.json +0 -30
  25. package/dist/test-template-action-chatgpt/postcss.config.js +0 -6
  26. package/dist/test-template-action-chatgpt/tailwind.config.js +0 -8
  27. package/dist/test-template-action-chatgpt/tsconfig.json +0 -22
  28. package/dist/test-template-config-babel/README.md +0 -35
  29. package/dist/test-template-config-babel/babel.config.json +0 -4
  30. package/dist/test-template-config-babel/extension.config.js +0 -17
  31. package/dist/test-template-config-babel/images/babel.png +0 -0
  32. package/dist/test-template-config-babel/images/extension_128.png +0 -0
  33. package/dist/test-template-config-babel/images/extension_16.png +0 -0
  34. package/dist/test-template-config-babel/images/extension_48.png +0 -0
  35. package/dist/test-template-config-babel/manifest.json +0 -15
  36. package/dist/test-template-config-babel/newtab/index.html +0 -40
  37. package/dist/test-template-config-babel/newtab/scripts.js +0 -11
  38. package/dist/test-template-config-babel/newtab/styles.css +0 -22
  39. package/dist/test-template-config-babel/package.json +0 -24
  40. package/dist/test-template-config-stylelint/.stylelintrc.json +0 -3
  41. package/dist/test-template-config-stylelint/README.md +0 -35
  42. package/dist/test-template-config-stylelint/images/extension_128.png +0 -0
  43. package/dist/test-template-config-stylelint/images/extension_16.png +0 -0
  44. package/dist/test-template-config-stylelint/images/extension_48.png +0 -0
  45. package/dist/test-template-config-stylelint/images/stylelint.svg +0 -1
  46. package/dist/test-template-config-stylelint/manifest.json +0 -15
  47. package/dist/test-template-config-stylelint/newtab/index.html +0 -40
  48. package/dist/test-template-config-stylelint/newtab/scripts.js +0 -11
  49. package/dist/test-template-config-stylelint/newtab/styles.scss +0 -20
  50. package/dist/test-template-config-stylelint/package.json +0 -24
  51. package/dist/test-template-content/README.md +0 -35
  52. package/dist/test-template-content/background.js +0 -21
  53. package/dist/test-template-content/content/scripts.js +0 -32
  54. package/dist/test-template-content/content/styles.css +0 -54
  55. package/dist/test-template-content/images/extension_128.png +0 -0
  56. package/dist/test-template-content/images/extension_16.png +0 -0
  57. package/dist/test-template-content/images/extension_48.png +0 -0
  58. package/dist/test-template-content/manifest.json +0 -35
  59. package/dist/test-template-content/package.json +0 -20
  60. package/dist/test-template-content-css-module/README.md +0 -35
  61. package/dist/test-template-content-css-module/background.js +0 -21
  62. package/dist/test-template-content-css-module/content/Logo.module.css +0 -11
  63. package/dist/test-template-content-css-module/content/scripts.js +0 -33
  64. package/dist/test-template-content-css-module/content/styles.css +0 -40
  65. package/dist/test-template-content-css-module/images/extension_128.png +0 -0
  66. package/dist/test-template-content-css-module/images/extension_16.png +0 -0
  67. package/dist/test-template-content-css-module/images/extension_48.png +0 -0
  68. package/dist/test-template-content-css-module/manifest.json +0 -35
  69. package/dist/test-template-content-css-module/package.json +0 -20
  70. package/dist/test-template-content-extension-config/README.md +0 -35
  71. package/dist/test-template-content-extension-config/background.ts +0 -1
  72. package/dist/test-template-content-extension-config/content/ContentApp.tsx +0 -82
  73. package/dist/test-template-content-extension-config/content/scripts.tsx +0 -17
  74. package/dist/test-template-content-extension-config/content/styles.css +0 -10
  75. package/dist/test-template-content-extension-config/extension.config.js +0 -22
  76. package/dist/test-template-content-extension-config/images/chromeWindow.png +0 -0
  77. package/dist/test-template-content-extension-config/images/extension_128.png +0 -0
  78. package/dist/test-template-content-extension-config/images/extension_16.png +0 -0
  79. package/dist/test-template-content-extension-config/images/extension_48.png +0 -0
  80. package/dist/test-template-content-extension-config/images/logo.svg +0 -9
  81. package/dist/test-template-content-extension-config/images/tailwind.png +0 -0
  82. package/dist/test-template-content-extension-config/images/tailwind_bg.png +0 -0
  83. package/dist/test-template-content-extension-config/images/typescript.png +0 -0
  84. package/dist/test-template-content-extension-config/manifest.json +0 -28
  85. package/dist/test-template-content-extension-config/package.json +0 -34
  86. package/dist/test-template-content-extension-config/postcss.config.js +0 -6
  87. package/dist/test-template-content-extension-config/tailwind.config.js +0 -8
  88. package/dist/test-template-content-extension-config/tsconfig.json +0 -22
  89. package/dist/test-template-content-less/README.md +0 -35
  90. package/dist/test-template-content-less/background.js +0 -21
  91. package/dist/test-template-content-less/content/scripts.js +0 -32
  92. package/dist/test-template-content-less/content/styles.less +0 -51
  93. package/dist/test-template-content-less/images/extension_128.png +0 -0
  94. package/dist/test-template-content-less/images/extension_16.png +0 -0
  95. package/dist/test-template-content-less/images/extension_48.png +0 -0
  96. package/dist/test-template-content-less/manifest.json +0 -35
  97. package/dist/test-template-content-less/package.json +0 -21
  98. package/dist/test-template-content-main-world/README.md +0 -35
  99. package/dist/test-template-content-main-world/background.js +0 -1
  100. package/dist/test-template-content-main-world/content/scripts.js +0 -20
  101. package/dist/test-template-content-main-world/content/styles.css +0 -46
  102. package/dist/test-template-content-main-world/extension.config.js +0 -8
  103. package/dist/test-template-content-main-world/images/extension_128.png +0 -0
  104. package/dist/test-template-content-main-world/images/extension_16.png +0 -0
  105. package/dist/test-template-content-main-world/images/extension_48.png +0 -0
  106. package/dist/test-template-content-main-world/manifest.json +0 -37
  107. package/dist/test-template-content-main-world/package.json +0 -20
  108. package/dist/test-template-content-preact/README.md +0 -35
  109. package/dist/test-template-content-preact/background.ts +0 -1
  110. package/dist/test-template-content-preact/content/ContentApp.tsx +0 -92
  111. package/dist/test-template-content-preact/content/scripts.tsx +0 -14
  112. package/dist/test-template-content-preact/content/styles.css +0 -10
  113. package/dist/test-template-content-preact/images/chromeWindow.png +0 -0
  114. package/dist/test-template-content-preact/images/extension_128.png +0 -0
  115. package/dist/test-template-content-preact/images/extension_16.png +0 -0
  116. package/dist/test-template-content-preact/images/extension_48.png +0 -0
  117. package/dist/test-template-content-preact/images/preact.png +0 -0
  118. package/dist/test-template-content-preact/images/tailwind.png +0 -0
  119. package/dist/test-template-content-preact/images/tailwind_bg.png +0 -0
  120. package/dist/test-template-content-preact/images/typescript.png +0 -0
  121. package/dist/test-template-content-preact/manifest.json +0 -31
  122. package/dist/test-template-content-preact/package.json +0 -29
  123. package/dist/test-template-content-preact/postcss.config.js +0 -6
  124. package/dist/test-template-content-preact/tailwind.config.js +0 -8
  125. package/dist/test-template-content-preact/tsconfig.json +0 -27
  126. package/dist/test-template-content-react/README.md +0 -35
  127. package/dist/test-template-content-react/background.ts +0 -1
  128. package/dist/test-template-content-react/content/ContentApp.tsx +0 -86
  129. package/dist/test-template-content-react/content/scripts.tsx +0 -17
  130. package/dist/test-template-content-react/content/styles.css +0 -10
  131. package/dist/test-template-content-react/images/chromeWindow.png +0 -0
  132. package/dist/test-template-content-react/images/extension_128.png +0 -0
  133. package/dist/test-template-content-react/images/extension_16.png +0 -0
  134. package/dist/test-template-content-react/images/extension_48.png +0 -0
  135. package/dist/test-template-content-react/images/react.png +0 -0
  136. package/dist/test-template-content-react/images/tailwind.png +0 -0
  137. package/dist/test-template-content-react/images/tailwind_bg.png +0 -0
  138. package/dist/test-template-content-react/images/typescript.png +0 -0
  139. package/dist/test-template-content-react/manifest.json +0 -28
  140. package/dist/test-template-content-react/package.json +0 -28
  141. package/dist/test-template-content-react/postcss.config.js +0 -6
  142. package/dist/test-template-content-react/tailwind.config.js +0 -8
  143. package/dist/test-template-content-react/tsconfig.json +0 -22
  144. package/dist/test-template-content-react-svgr/README.md +0 -35
  145. package/dist/test-template-content-react-svgr/background.ts +0 -1
  146. package/dist/test-template-content-react-svgr/content/ContentApp.tsx +0 -82
  147. package/dist/test-template-content-react-svgr/content/scripts.tsx +0 -17
  148. package/dist/test-template-content-react-svgr/content/styles.css +0 -10
  149. package/dist/test-template-content-react-svgr/extension.config.js +0 -22
  150. package/dist/test-template-content-react-svgr/images/chromeWindow.png +0 -0
  151. package/dist/test-template-content-react-svgr/images/extension_128.png +0 -0
  152. package/dist/test-template-content-react-svgr/images/extension_16.png +0 -0
  153. package/dist/test-template-content-react-svgr/images/extension_48.png +0 -0
  154. package/dist/test-template-content-react-svgr/images/logo.svg +0 -9
  155. package/dist/test-template-content-react-svgr/images/tailwind.png +0 -0
  156. package/dist/test-template-content-react-svgr/images/tailwind_bg.png +0 -0
  157. package/dist/test-template-content-react-svgr/images/typescript.png +0 -0
  158. package/dist/test-template-content-react-svgr/manifest.json +0 -28
  159. package/dist/test-template-content-react-svgr/package.json +0 -34
  160. package/dist/test-template-content-react-svgr/postcss.config.js +0 -6
  161. package/dist/test-template-content-react-svgr/tailwind.config.js +0 -8
  162. package/dist/test-template-content-react-svgr/tsconfig.json +0 -22
  163. package/dist/test-template-content-sass/README.md +0 -35
  164. package/dist/test-template-content-sass/background.js +0 -21
  165. package/dist/test-template-content-sass/content/scripts.js +0 -32
  166. package/dist/test-template-content-sass/content/styles.scss +0 -51
  167. package/dist/test-template-content-sass/images/extension_128.png +0 -0
  168. package/dist/test-template-content-sass/images/extension_16.png +0 -0
  169. package/dist/test-template-content-sass/images/extension_48.png +0 -0
  170. package/dist/test-template-content-sass/manifest.json +0 -35
  171. package/dist/test-template-content-sass/package.json +0 -21
  172. package/dist/test-template-content-sass-module/README.md +0 -35
  173. package/dist/test-template-content-sass-module/background.js +0 -21
  174. package/dist/test-template-content-sass-module/content/Logo.module.scss +0 -18
  175. package/dist/test-template-content-sass-module/content/scripts.js +0 -33
  176. package/dist/test-template-content-sass-module/content/styles.scss +0 -40
  177. package/dist/test-template-content-sass-module/images/extension_128.png +0 -0
  178. package/dist/test-template-content-sass-module/images/extension_16.png +0 -0
  179. package/dist/test-template-content-sass-module/images/extension_48.png +0 -0
  180. package/dist/test-template-content-sass-module/manifest.json +0 -35
  181. package/dist/test-template-content-sass-module/package.json +0 -21
  182. package/dist/test-template-content-tailwind/README.md +0 -35
  183. package/dist/test-template-content-tailwind/background.js +0 -21
  184. package/dist/test-template-content-tailwind/content/content.js +0 -45
  185. package/dist/test-template-content-tailwind/content/scripts.js +0 -6
  186. package/dist/test-template-content-tailwind/content/styles.css +0 -10
  187. package/dist/test-template-content-tailwind/images/chromeWindow.png +0 -0
  188. package/dist/test-template-content-tailwind/images/extension_128.png +0 -0
  189. package/dist/test-template-content-tailwind/images/extension_16.png +0 -0
  190. package/dist/test-template-content-tailwind/images/extension_48.png +0 -0
  191. package/dist/test-template-content-tailwind/images/react.png +0 -0
  192. package/dist/test-template-content-tailwind/images/tailwind.png +0 -0
  193. package/dist/test-template-content-tailwind/images/tailwind_bg.png +0 -0
  194. package/dist/test-template-content-tailwind/manifest.json +0 -35
  195. package/dist/test-template-content-tailwind/package.json +0 -23
  196. package/dist/test-template-content-tailwind/postcss.config.js +0 -6
  197. package/dist/test-template-content-tailwind/tailwind.config.js +0 -8
  198. package/dist/test-template-content-typescript/README.md +0 -35
  199. package/dist/test-template-content-typescript/background.ts +0 -26
  200. package/dist/test-template-content-typescript/content/scripts.ts +0 -33
  201. package/dist/test-template-content-typescript/content/styles.css +0 -51
  202. package/dist/test-template-content-typescript/images/extension_128.png +0 -0
  203. package/dist/test-template-content-typescript/images/extension_16.png +0 -0
  204. package/dist/test-template-content-typescript/images/extension_48.png +0 -0
  205. package/dist/test-template-content-typescript/images/typescript.png +0 -0
  206. package/dist/test-template-content-typescript/manifest.json +0 -35
  207. package/dist/test-template-content-typescript/package.json +0 -21
  208. package/dist/test-template-content-typescript/tsconfig.json +0 -22
  209. package/dist/test-template-content-vue/README.md +0 -35
  210. package/dist/test-template-content-vue/background.ts +0 -1
  211. package/dist/test-template-content-vue/content/ContentApp.vue +0 -90
  212. package/dist/test-template-content-vue/content/scripts.ts +0 -13
  213. package/dist/test-template-content-vue/content/shims-vue.d.ts +0 -6
  214. package/dist/test-template-content-vue/content/styles.css +0 -10
  215. package/dist/test-template-content-vue/images/chromeWindow.png +0 -0
  216. package/dist/test-template-content-vue/images/extension_128.png +0 -0
  217. package/dist/test-template-content-vue/images/extension_16.png +0 -0
  218. package/dist/test-template-content-vue/images/extension_48.png +0 -0
  219. package/dist/test-template-content-vue/images/tailwind.png +0 -0
  220. package/dist/test-template-content-vue/images/tailwind_bg.png +0 -0
  221. package/dist/test-template-content-vue/images/typescript.png +0 -0
  222. package/dist/test-template-content-vue/images/vue.svg +0 -8
  223. package/dist/test-template-content-vue/manifest.json +0 -31
  224. package/dist/test-template-content-vue/package.json +0 -25
  225. package/dist/test-template-content-vue/postcss.config.js +0 -6
  226. package/dist/test-template-content-vue/tailwind.config.js +0 -8
  227. package/dist/test-template-content-vue/tsconfig.json +0 -22
  228. package/dist/test-template-declarative_net_request/README.md +0 -35
  229. package/dist/test-template-declarative_net_request/images/extension_128.png +0 -0
  230. package/dist/test-template-declarative_net_request/images/extension_16.png +0 -0
  231. package/dist/test-template-declarative_net_request/images/extension_48.png +0 -0
  232. package/dist/test-template-declarative_net_request/manifest.json +0 -34
  233. package/dist/test-template-declarative_net_request/package.json +0 -21
  234. package/dist/test-template-declarative_net_request/public/public_ruleset.json +0 -72
  235. package/dist/test-template-declarative_net_request/rules_1.json +0 -72
  236. package/dist/test-template-init/README.md +0 -35
  237. package/dist/test-template-init/manifest.json +0 -7
  238. package/dist/test-template-init/package.json +0 -32
  239. package/dist/test-template-locales/README.md +0 -35
  240. package/dist/test-template-locales/_locales/en/messages.json +0 -10
  241. package/dist/test-template-locales/_locales/pt_BR/messages.json +0 -10
  242. package/dist/test-template-locales/action/index.html +0 -40
  243. package/dist/test-template-locales/action/scripts.js +0 -3
  244. package/dist/test-template-locales/action/styles.css +0 -23
  245. package/dist/test-template-locales/images/extension_128.png +0 -0
  246. package/dist/test-template-locales/images/extension_16.png +0 -0
  247. package/dist/test-template-locales/images/extension_48.png +0 -0
  248. package/dist/test-template-locales/manifest.json +0 -19
  249. package/dist/test-template-locales/package.json +0 -21
  250. package/dist/test-template-new-less/README.md +0 -35
  251. package/dist/test-template-new-less/images/extension_128.png +0 -0
  252. package/dist/test-template-new-less/images/extension_16.png +0 -0
  253. package/dist/test-template-new-less/images/extension_48.png +0 -0
  254. package/dist/test-template-new-less/manifest.json +0 -15
  255. package/dist/test-template-new-less/newtab/index.html +0 -40
  256. package/dist/test-template-new-less/newtab/scripts.js +0 -11
  257. package/dist/test-template-new-less/newtab/styles.less +0 -19
  258. package/dist/test-template-new-less/package.json +0 -21
  259. package/dist/test-template-new-preact/README.md +0 -35
  260. package/dist/test-template-new-preact/images/extension_128.png +0 -0
  261. package/dist/test-template-new-preact/images/extension_16.png +0 -0
  262. package/dist/test-template-new-preact/images/extension_48.png +0 -0
  263. package/dist/test-template-new-preact/images/preact.png +0 -0
  264. package/dist/test-template-new-preact/manifest.json +0 -15
  265. package/dist/test-template-new-preact/newtab/NewTabApp.tsx +0 -27
  266. package/dist/test-template-new-preact/newtab/index.html +0 -13
  267. package/dist/test-template-new-preact/newtab/scripts.tsx +0 -5
  268. package/dist/test-template-new-preact/newtab/styles.css +0 -32
  269. package/dist/test-template-new-preact/package.json +0 -29
  270. package/dist/test-template-new-preact/tsconfig.json +0 -22
  271. package/dist/test-template-new-react/README.md +0 -35
  272. package/dist/test-template-new-react/images/extension_128.png +0 -0
  273. package/dist/test-template-new-react/images/extension_16.png +0 -0
  274. package/dist/test-template-new-react/images/extension_48.png +0 -0
  275. package/dist/test-template-new-react/images/react.png +0 -0
  276. package/dist/test-template-new-react/manifest.json +0 -15
  277. package/dist/test-template-new-react/newtab/NewTabApp.tsx +0 -27
  278. package/dist/test-template-new-react/newtab/index.html +0 -13
  279. package/dist/test-template-new-react/newtab/scripts.tsx +0 -12
  280. package/dist/test-template-new-react/newtab/styles.css +0 -23
  281. package/dist/test-template-new-react/package.json +0 -28
  282. package/dist/test-template-new-react/tsconfig.json +0 -22
  283. package/dist/test-template-new-sass/README.md +0 -35
  284. package/dist/test-template-new-sass/images/extension_128.png +0 -0
  285. package/dist/test-template-new-sass/images/extension_16.png +0 -0
  286. package/dist/test-template-new-sass/images/extension_48.png +0 -0
  287. package/dist/test-template-new-sass/manifest.json +0 -15
  288. package/dist/test-template-new-sass/newtab/index.html +0 -40
  289. package/dist/test-template-new-sass/newtab/scripts.js +0 -11
  290. package/dist/test-template-new-sass/newtab/styles.scss +0 -19
  291. package/dist/test-template-new-sass/package.json +0 -22
  292. package/dist/test-template-new-tailwind/README.md +0 -35
  293. package/dist/test-template-new-tailwind/images/chromeWindow.png +0 -0
  294. package/dist/test-template-new-tailwind/images/extension_128.png +0 -0
  295. package/dist/test-template-new-tailwind/images/extension_16.png +0 -0
  296. package/dist/test-template-new-tailwind/images/extension_48.png +0 -0
  297. package/dist/test-template-new-tailwind/images/react.png +0 -0
  298. package/dist/test-template-new-tailwind/images/tailwind.png +0 -0
  299. package/dist/test-template-new-tailwind/images/tailwind_bg.png +0 -0
  300. package/dist/test-template-new-tailwind/manifest.json +0 -15
  301. package/dist/test-template-new-tailwind/newtab/NewTabApp.tsx +0 -67
  302. package/dist/test-template-new-tailwind/newtab/index.html +0 -13
  303. package/dist/test-template-new-tailwind/newtab/scripts.tsx +0 -12
  304. package/dist/test-template-new-tailwind/newtab/styles.css +0 -3
  305. package/dist/test-template-new-tailwind/package.json +0 -28
  306. package/dist/test-template-new-tailwind/postcss.config.js +0 -6
  307. package/dist/test-template-new-tailwind/tailwind.config.js +0 -8
  308. package/dist/test-template-new-tailwind/tsconfig.json +0 -22
  309. package/dist/test-template-new-typescript/README.md +0 -35
  310. package/dist/test-template-new-typescript/images/extension_128.png +0 -0
  311. package/dist/test-template-new-typescript/images/extension_16.png +0 -0
  312. package/dist/test-template-new-typescript/images/extension_48.png +0 -0
  313. package/dist/test-template-new-typescript/images/typescript.png +0 -0
  314. package/dist/test-template-new-typescript/manifest.json +0 -15
  315. package/dist/test-template-new-typescript/newtab/index.html +0 -25
  316. package/dist/test-template-new-typescript/newtab/scripts.ts +0 -10
  317. package/dist/test-template-new-typescript/newtab/styles.css +0 -18
  318. package/dist/test-template-new-typescript/package.json +0 -22
  319. package/dist/test-template-new-typescript/tsconfig.json +0 -22
  320. package/dist/test-template-new-vue/README.md +0 -35
  321. package/dist/test-template-new-vue/images/extension_128.png +0 -0
  322. package/dist/test-template-new-vue/images/extension_16.png +0 -0
  323. package/dist/test-template-new-vue/images/extension_48.png +0 -0
  324. package/dist/test-template-new-vue/images/vue.svg +0 -8
  325. package/dist/test-template-new-vue/manifest.json +0 -15
  326. package/dist/test-template-new-vue/newtab/NewTabApp.vue +0 -30
  327. package/dist/test-template-new-vue/newtab/index.html +0 -13
  328. package/dist/test-template-new-vue/newtab/scripts.ts +0 -7
  329. package/dist/test-template-new-vue/newtab/styles.css +0 -36
  330. package/dist/test-template-new-vue/package.json +0 -25
  331. package/dist/test-template-new-vue/tsconfig.json +0 -22
  332. package/dist/test-template-sidebar/README.md +0 -35
  333. package/dist/test-template-sidebar/images/extension_128.png +0 -0
  334. package/dist/test-template-sidebar/images/extension_16.png +0 -0
  335. package/dist/test-template-sidebar/images/extension_48.png +0 -0
  336. package/dist/test-template-sidebar/manifest.json +0 -37
  337. package/dist/test-template-sidebar/package.json +0 -21
  338. package/dist/test-template-sidebar/puzzle.png +0 -0
  339. package/dist/test-template-sidebar/sidebar/index.html +0 -39
  340. package/dist/test-template-sidebar/sidebar/scripts.js +0 -11
  341. package/dist/test-template-sidebar/sidebar/styles.css +0 -27
  342. package/dist/test-template-sidebar/test_16.png +0 -0
  343. package/dist/test-template-sidebar/test_32.png +0 -0
  344. package/dist/test-template-sidebar/test_48.png +0 -0
  345. package/dist/test-template-sidebar/test_64.png +0 -0
  346. package/dist/test-template-special-folders-pages/README.md +0 -35
  347. package/dist/test-template-special-folders-pages/background.js +0 -5
  348. package/dist/test-template-special-folders-pages/images/extension_128.png +0 -0
  349. package/dist/test-template-special-folders-pages/images/extension_16.png +0 -0
  350. package/dist/test-template-special-folders-pages/images/extension_48.png +0 -0
  351. package/dist/test-template-special-folders-pages/images/notpublic-file.png +0 -0
  352. package/dist/test-template-special-folders-pages/manifest.json +0 -26
  353. package/dist/test-template-special-folders-pages/package.json +0 -21
  354. package/dist/test-template-special-folders-pages/pages/custom.html +0 -8
  355. package/dist/test-template-special-folders-pages/pages/main.css +0 -18
  356. package/dist/test-template-special-folders-pages/pages/main.html +0 -16
  357. package/dist/test-template-special-folders-pages/pages/main.js +0 -1
  358. package/dist/test-template-special-folders-pages/public/css/file.css +0 -3
  359. package/dist/test-template-special-folders-pages/public/html/file.html +0 -8
  360. package/dist/test-template-special-folders-pages/public/img/icon.png +0 -0
  361. package/dist/test-template-special-folders-pages/public/js/file.js +0 -0
  362. package/dist/test-template-special-folders-pages/sandbox/index.html +0 -24
  363. package/dist/test-template-special-folders-pages/sandbox/scripts.js +0 -0
  364. package/dist/test-template-special-folders-pages/sandbox/styles.css +0 -1
  365. package/dist/test-template-special-folders-scripts/README.md +0 -35
  366. package/dist/test-template-special-folders-scripts/background.js +0 -24
  367. package/dist/test-template-special-folders-scripts/images/extension_128.png +0 -0
  368. package/dist/test-template-special-folders-scripts/images/extension_16.png +0 -0
  369. package/dist/test-template-special-folders-scripts/images/extension_48.png +0 -0
  370. package/dist/test-template-special-folders-scripts/manifest.json +0 -27
  371. package/dist/test-template-special-folders-scripts/package.json +0 -21
  372. package/dist/test-template-special-folders-scripts/pages/index.css +0 -5
  373. package/dist/test-template-special-folders-scripts/pages/index.html +0 -3
  374. package/dist/test-template-special-folders-scripts/pages/index.js +0 -1
  375. package/dist/test-template-special-folders-scripts/public/extension.png +0 -0
  376. package/dist/test-template-special-folders-scripts/scripts/content-script.js +0 -3
  377. package/dist/test-template-storage/README.md +0 -35
  378. package/dist/test-template-storage/images/extension_128.png +0 -0
  379. package/dist/test-template-storage/images/extension_16.png +0 -0
  380. package/dist/test-template-storage/images/extension_48.png +0 -0
  381. package/dist/test-template-storage/manifest.json +0 -15
  382. package/dist/test-template-storage/package.json +0 -21
  383. package/dist/test-template-storage/schema.json +0 -44
package/dist/module.js CHANGED
@@ -1,38 +1,39 @@
1
- "use strict";var Ae=Object.create;var v=Object.defineProperty;var Ge=Object.getOwnPropertyDescriptor;var We=Object.getOwnPropertyNames;var Oe=Object.getPrototypeOf,ze=Object.prototype.hasOwnProperty;var Le=(e,t)=>{for(var o in t)v(e,o,{get:t[o],enumerable:!0})},N=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of We(t))!ze.call(e,i)&&i!==o&&v(e,i,{get:()=>t[i],enumerable:!(r=Ge(t,i))||r.enumerable});return e};var a=(e,t,o)=>(o=e!=null?Ae(Oe(e)):{},N(t||!e||!e.__esModule?v(o,"default",{value:e,enumerable:!0}):o,e)),Ve=e=>N(v({},"__esModule",{value:!0}),e);var rt={};Le(rt,{extensionCreate:()=>it});module.exports=Ve(rt);var _=a(require("path"));var y=a(require("path")),n=require("@colors/colors/safe"),j=a(require("fs/promises")),A=require("package-manager-detector");function G(e){let t=y.default.basename(e);return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} Failed to write in the destination directory
1
+ "use strict";var ze=Object.create;var b=Object.defineProperty;var Le=Object.getOwnPropertyDescriptor;var Ve=Object.getOwnPropertyNames;var Xe=Object.getPrototypeOf,Ue=Object.prototype.hasOwnProperty;var Ye=(e,t)=>{for(var r in t)b(e,r,{get:t[r],enumerable:!0})},j=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ve(t))!Ue.call(e,i)&&i!==r&&b(e,i,{get:()=>t[i],enumerable:!(s=Le(t,i))||s.enumerable});return e};var a=(e,t,r)=>(r=e!=null?ze(Xe(e)):{},j(t||!e||!e.__esModule?b(r,"default",{value:e,enumerable:!0}):r,e)),Be=e=>j(b({},"__esModule",{value:!0}),e);var ct={};Ye(ct,{extensionCreate:()=>at});module.exports=Be(ct);var C=a(require("path"));var y=a(require("path")),n=require("@colors/colors/safe"),A=a(require("fs/promises")),G=require("package-manager-detector");function W(e){let t=y.default.basename(e);return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} Failed to write in the destination directory
2
2
 
3
3
  Path is not writable. Ensure you have write permissions for this folder.
4
- ${(0,n.red)("NOT WRITEABLE")}: ${(0,n.underline)(t)}`}async function W(e,t){let o=y.default.basename(e),r=`
5
- Conflict! Path to ${(0,n.cyan)(o)} includes conflicting files:
4
+ ${(0,n.red)("NOT WRITEABLE")}: ${(0,n.underline)(t)}`}async function O(e,t){let r=y.default.basename(e),s=`
5
+ Conflict! Path to ${(0,n.cyan)(r)} includes conflicting files:
6
6
 
7
- `;for(let i of t){let s=await j.default.lstat(y.default.join(e,i));r+=s.isDirectory()?`${(0,n.gray)("-")} ${(0,n.brightYellow)(i)}
7
+ `;for(let i of t){let o=await A.default.lstat(y.default.join(e,i));s+=o.isDirectory()?`${(0,n.gray)("-")} ${(0,n.brightYellow)(i)}
8
8
  `:`${(0,n.gray)("-")} ${(0,n.brightYellow)(i)}
9
- `}return r+=`
9
+ `}return s+=`
10
10
  You need to either rename/remove the files listed above, or choose a new directory name for your extension.
11
11
 
12
- Path to conflicting directory: ${(0,n.underline)(e)}`,r}function O(){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} You need to provide an extension name to create one. See ${(0,n.brightYellow)("--help")} for command info.`}function z(){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} URLs are not allowed as a project path. Either write a name or a path to a local folder.`}async function L(e,t){let o=y.default.relative(process.cwd(),e),r=await(0,A.detect)(),i="npm run";switch(r?.name){case"yarn":i="yarn dev";break;case"pnpm":i="pnpm dev";break;default:i="npm run dev"}return process.env.npm_config_user_agent&&process.env.npm_config_user_agent.includes("pnpm")&&(i="pnpm dev"),`\u{1F9E9} - ${(0,n.brightGreen)("Success!")} Extension ${(0,n.cyan)(t)} created.
12
+ Path to conflicting directory: ${(0,n.underline)(e)}`,s}function z(){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} You need to provide an extension name to create one. See ${(0,n.brightYellow)("--help")} for command info.`}function L(){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} URLs are not allowed as a project path. Either write a name or a path to a local folder.`}async function V(e,t){let r=y.default.relative(process.cwd(),e),s=await(0,G.detect)(),i="npm run";switch(s?.name){case"yarn":i="yarn dev";break;case"pnpm":i="pnpm dev";break;default:i="npm run dev"}return process.env.npm_config_user_agent&&process.env.npm_config_user_agent.includes("pnpm")&&(i="pnpm dev"),`\u{1F9E9} - ${(0,n.brightGreen)("Success!")} Extension ${(0,n.cyan)(t)} created.
13
13
 
14
- Now ${(0,n.magenta)(`cd ${(0,n.underline)(o)}`)} and ${(0,n.magenta)(`${i}`)} to open a new browser instance
14
+ Now ${(0,n.magenta)(`cd ${(0,n.underline)(r)}`)} and ${(0,n.magenta)(`${i}`)} to open a new browser instance
15
15
  with your extension installed, loaded, and enabled for development.
16
16
 
17
- ${(0,n.brightGreen)("You are ready")}. Time to hack on your extension!`}function V(e){return`\u{1F423} - Starting a new browser extension named ${(0,n.cyan)(e)}...`}function X(){return"\u{1F91E} - Checking if destination path is writeable..."}function U(){return"\u{1F50E} - Scanning for potential conflicting files..."}function Y(e,t){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} Can't create directory ${(0,n.cyan)(e)}:
17
+ ${(0,n.brightGreen)("You are ready")}. Time to hack on your extension!`}function X(e){return`\u{1F423} - Starting a new browser extension named ${(0,n.cyan)(e)}...`}function U(){return"\u{1F91E} - Checking if destination path is writeable..."}function Y(){return"\u{1F50E} - Scanning for potential conflicting files..."}function B(e,t){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} Can't create directory ${(0,n.cyan)(e)}:
18
18
  ${(0,n.red)(t)}`}function q(e){return`\u{1F537} - Writing type definitions for ${(0,n.cyan)(e)}...`}function H(e){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} Failed to write the extension type definition.
19
- ${(0,n.red)(e)}`}function x(e,t){return t==="init"?`\u{1F9F0} - Installing ${(0,n.cyan)(e)}...`:`\u{1F9F0} - Installing ${(0,n.cyan)(e)} from template ${(0,n.magenta)(t)}...`}function b(e,t,o){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} Can't find template ${(0,n.magenta)(t)} for ${(0,n.cyan)(e)}:
20
- ${(0,n.red)(o)}`}function B(e){return`\u{1F332} - Initializing git repository for ${(0,n.cyan)(e)}...`}function K(e,t,o){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} Command ${(0,n.brightYellow)(e)} ${(0,n.brightYellow)(t.join(" "))} failed with exit code ${o}`}function Q(e,t){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} Child process error: Can't initialize ${(0,n.brightYellow)("git")} for ${(0,n.cyan)(e)}:
21
- ${(0,n.red)(t.message)}`}function Z(e,t){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} Can't initialize ${(0,n.brightYellow)("git")} for ${(0,n.cyan)(e)}:
22
- ${(0,n.red)(t.message||t.toString())}`}function ee(){return"\u{1F6E0} - Installing dependencies... (takes a moment)"}function te(e,t,o){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} Command ${e} ${t.join(" ")} failed with exit code ${o}`}function ne(e,t){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} Child process error: Can't install dependencies for ${(0,n.cyan)(e)}:
23
- ${(0,n.red)(t)}`}function ie(e,t){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} Can't install dependencies for ${(0,n.cyan)(e)}:
24
- ${(0,n.red)(t.message||t.toString())}`}function re(){return`\u{1F4DD} - Writing ${(0,n.brightYellow)("package.json")} metadata...`}function oe(e,t){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} Can't write ${(0,n.brightYellow)("package.json")} for ${(0,n.cyan)(e)}:
25
- ${(0,n.red)(t)}`}function se(){return`\u{1F4DC} - Writing ${(0,n.brightYellow)("manifest.json")} metadata...`}function ae(e,t){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} Can't write ${(0,n.brightYellow)("manifest.json")} for ${(0,n.cyan)(e)}:
26
- ${(0,n.red)(t)}`}function ce(){return`\u{1F4C4} - Writing ${(0,n.brightYellow)("README.md")} metadata...`}function le(){return`\u{1F648} - Writing ${(0,n.brightYellow)(".gitignore")} lines...`}function me(e,t){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} Can't write the ${(0,n.brightYellow)("README.md")} file for ${(0,n.cyan)(e)}:
27
- ${(0,n.red)(t)}`}function pe(e){return`\u{1F91D} - Ensuring ${(0,n.cyan)(e)} folder exists...`}function ge(e){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} Error while checking directory writability:
28
- `+(0,n.red)(e)}var h=a(require("fs/promises")),E=a(require("path")),de=require("package-manager-detector");async function C(e,t){let o=await h.default.readdir(e,{withFileTypes:!0});return await h.default.mkdir(t,{recursive:!0}),await Promise.all(o.map(async r=>{let i=E.default.join(e,r.name),s=E.default.join(t,r.name);r.isDirectory()?await C(i,s):await h.default.copyFile(i,s)}))}async function D(){let e=await(0,de.detect)(),t="npm";if(process.env.npm_config_user_agent&&process.env.npm_config_user_agent.includes("pnpm"))return"pnpm";switch(e?.name){case"yarn":t="yarn";break;case"pnpm":t="pnpm";break;default:t="npm"}return t}function fe(e){let t=E.default.resolve(__dirname,"template");return E.default.resolve(e,t)}async function ue(e,t){try{return console.log(pe(t)),await h.default.mkdir(e,{recursive:!0}),!0}catch(o){return console.log(ge(o)),!1}}function we(e){return e!=="init"}function ye(e){return e.includes("typescript")||e.includes("react")||e.includes("preact")||e.includes("svelte")||e.includes("solid")}var xe=a(require("path")),P=a(require("fs/promises"));var Xe=["LICENSE","node_modules"];async function he(e,t){console.log(V(t));try{let o=await ue(e,t);console.log(X()),o||(console.error(G(e)),process.exit(1));let r=await P.default.readdir(e);console.log(U());let i=await Promise.all(r.filter(s=>!s.startsWith(".")).filter(s=>!s.endsWith(".log")).filter(s=>!Xe.includes(s)).map(async s=>(await P.default.lstat(xe.default.join(e,s))).isDirectory()?`${s}/`:`${s}`));if(i.length>0){let s=await W(e,i);throw new Error(s)}}catch(o){console.error(Y(t,o)),process.exit(1)}}var Ee=a(require("path"));async function $e(e,t,o){let r=Ee.default.resolve(__dirname,"template");try{console.log(x(t,o)),await C(r,e)}catch(i){console.error(b(t,o,i)),process.exit(1)}}var m=a(require("path")),f=a(require("fs/promises")),ve=a(require("go-git-it"));async function be(e,t,o){let r=m.default.dirname(e),i=m.default.basename(o),c=`https://github.com/extension-js/extension.js/tree/main/examples/${o}`;try{await f.default.mkdir(e,{recursive:!0});let l="";if(process.env.EXTENSION_ENV==="development"?(console.log(x(t,o)),l=m.default.join(e,i),await f.default.cp(m.default.join(__dirname,"..","..","..","examples",i),l,{recursive:!0})):(await(0,ve.default)(c,r,x(t,i)),l=m.default.join(r,i)),t!==i){let p=m.default.join(r,t);await f.default.mkdir(p,{recursive:!0});let g=await f.default.readdir(l);for(let u of g)await f.default.rename(m.default.join(l,u),m.default.join(p,u));await f.default.rm(l,{recursive:!0,force:!0})}else{let p=m.default.join(r,t+"-temp");await f.default.rename(l,p);let g=m.default.join(p,i),u=m.default.join(r,t);await f.default.mkdir(u,{recursive:!0});let je=await f.default.readdir(g);for(let R of je)await f.default.rename(m.default.join(g,R),m.default.join(u,R));await f.default.rm(p,{recursive:!0,force:!0})}}catch(l){console.error(b(t,i,l)),process.exit(1)}}var $=a(require("path")),S=a(require("fs/promises"));var Ue={dev:process.env.EXTENSION_ENV==="development"?"node node_modules/extension dev":"extension dev",start:process.env.EXTENSION_ENV==="development"?"node node_modules/extension start":"extension start",build:process.env.EXTENSION_ENV==="development"?"node node_modules/extension build":"extension build"};async function De(e,t,o){let r=fe(process.cwd()),i=we(o)?$.default.join(e,"package.json"):$.default.join(r,"package.json"),s=await S.default.readFile(i),c=JSON.parse(s.toString());c.scripts=c.scripts||{},c.dependencies=c.dependencies||{},c.devDependencies={...c.devDependencies||{},extension:process.env.EXTENSION_ENV==="development"?"*":"latest"};let l={...c,name:$.default.basename(e),private:!0,scripts:{...c.scripts,...Ue},dependencies:c.dependencies,devDependencies:c.devDependencies,author:{name:"Your Name",email:"your@email.com",url:"https://yourwebsite.com"}};try{console.log(re()),await S.default.writeFile($.default.join(e,"package.json"),JSON.stringify(l,null,2))}catch(p){console.error(oe(t,p)),process.exit(1)}}var Fe=a(require("path")),Te=require("cross-spawn"),ke=a(require("fs"));function Ye(){return["install","--silent"]}async function _e(e,t){let o=Fe.default.join(e,"node_modules"),r=await D(),i=Ye();console.log(ee());try{let s=process.cwd();process.chdir(e),await ke.default.promises.mkdir(o,{recursive:!0});let c=process.env.EXTENSION_ENV==="development"?"inherit":"ignore",l=(0,Te.spawn)(r,i,{stdio:c});await new Promise((p,g)=>{l.on("close",u=>{process.chdir(s),u!==0?g(new Error(te(r,i,u))):p()}),l.on("error",u=>{process.chdir(s),console.error(ne(t,u)),g(u)})})}catch(s){console.error(ie(t,s)),process.exit(1)}}var F=a(require("path")),T=a(require("fs/promises"));async function Ce(e,t){let o=await T.default.readFile(F.default.join(__dirname,"template","README.md"),"utf-8"),r=await D(),i=require(F.default.join(e,"manifest.json")),s=o.replaceAll("[projectName]",t).replaceAll("[templateDescription]",i.description).replaceAll("[runCommand]",r);try{console.log(ce()),await T.default.mkdir(e,{recursive:!0}),await T.default.writeFile(F.default.join(e,"README.md"),s)}catch(c){console.error(me(t,c)),process.exit(1)}}var k=a(require("path")),I=a(require("fs/promises"));async function Pe(e,t){let o=k.default.join(e,"manifest.json"),r=await I.default.readFile(o),s={...JSON.parse(r.toString()),name:k.default.basename(e),author:"Your Name"};try{console.log(se()),await I.default.writeFile(k.default.join(e,"manifest.json"),JSON.stringify(s,null,2))}catch(c){console.error(ae(t,c)),process.exit(1)}}var J=a(require("path")),M=a(require("fs/promises"));async function Se(e,t){let o=J.default.join(e,"extension-env.d.ts"),r=process.env.EXTENSION_ENV==="development"?J.default.resolve(process.cwd(),"programs/cli/types"):"extension/dist/types",i=`// Required Extension.js types for TypeScript projects.
19
+ ${(0,n.red)(e)}`}function x(e,t){return t==="init"?`\u{1F9F0} - Installing ${(0,n.cyan)(e)}...`:`\u{1F9F0} - Installing ${(0,n.cyan)(e)} from template ${(0,n.magenta)(t)}...`}function D(e,t,r){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} Can't find template ${(0,n.magenta)(t)} for ${(0,n.cyan)(e)}:
20
+ ${(0,n.red)(r)}`}function K(e){return`\u{1F332} - Initializing git repository for ${(0,n.cyan)(e)}...`}function Q(e,t,r){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} Command ${(0,n.brightYellow)(e)} ${(0,n.brightYellow)(t.join(" "))} failed with exit code ${r}`}function Z(e,t){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} Child process error: Can't initialize ${(0,n.brightYellow)("git")} for ${(0,n.cyan)(e)}:
21
+ ${(0,n.red)(t.message)}`}function ee(e,t){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} Can't initialize ${(0,n.brightYellow)("git")} for ${(0,n.cyan)(e)}:
22
+ ${(0,n.red)(t.message||t.toString())}`}function te(){return"\u{1F6E0} - Installing dependencies... (takes a moment)"}function ne(e,t,r){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} Command ${e} ${t.join(" ")} failed with exit code ${r}`}function ie(e,t){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} Child process error: Can't install dependencies for ${(0,n.cyan)(e)}:
23
+ ${(0,n.red)(t)}`}function re(e,t){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} Can't install dependencies for ${(0,n.cyan)(e)}:
24
+ ${(0,n.red)(t.message||t.toString())}`}function se(){return`\u{1F4DD} - Writing ${(0,n.brightYellow)("package.json")} metadata...`}function oe(e,t){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} Can't write ${(0,n.brightYellow)("package.json")} for ${(0,n.cyan)(e)}:
25
+ ${(0,n.red)(t)}`}function ae(){return`\u{1F4DC} - Writing ${(0,n.brightYellow)("manifest.json")} metadata...`}function ce(e,t){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} Can't write ${(0,n.brightYellow)("manifest.json")} for ${(0,n.cyan)(e)}:
26
+ ${(0,n.red)(t)}`}function le(){return`\u{1F4C4} - Writing ${(0,n.brightYellow)("README.md")} metadata...`}function me(){return`\u{1F648} - Writing ${(0,n.brightYellow)(".gitignore")} lines...`}function pe(e,t){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} Can't write the ${(0,n.brightYellow)("README.md")} file for ${(0,n.cyan)(e)}:
27
+ ${(0,n.red)(t)}`}function ge(e){return`\u{1F91D} - Ensuring ${(0,n.cyan)(e)} folder exists...`}function fe(e){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} Error while checking directory writability:
28
+ `+(0,n.red)(e)}function de(e,t){return`${(0,n.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")} Can't setup built-in tests for ${(0,n.cyan)(e)}:
29
+ ${(0,n.red)(t)}`}var h=a(require("fs/promises")),E=a(require("path")),ue=require("package-manager-detector");async function $(e,t){let r=await h.default.readdir(e,{withFileTypes:!0});return await h.default.mkdir(t,{recursive:!0}),await Promise.all(r.map(async s=>{let i=E.default.join(e,s.name),o=E.default.join(t,s.name);s.isDirectory()?await $(i,o):await h.default.copyFile(i,o)}))}async function T(){let e=await(0,ue.detect)(),t="npm";if(process.env.npm_config_user_agent&&process.env.npm_config_user_agent.includes("pnpm"))return"pnpm";switch(e?.name){case"yarn":t="yarn";break;case"pnpm":t="pnpm";break;default:t="npm"}return t}function we(e){let t=E.default.resolve(__dirname,"template");return E.default.resolve(e,t)}async function ye(e,t){try{return console.log(ge(t)),await h.default.mkdir(e,{recursive:!0}),!0}catch(r){return console.log(fe(r)),!1}}function xe(e){return e!=="init"}function he(e){return e.includes("typescript")||e.includes("react")||e.includes("preact")||e.includes("svelte")||e.includes("solid")}var Ee=a(require("path")),_=a(require("fs/promises"));var qe=["LICENSE","node_modules"];async function $e(e,t){console.log(X(t));try{let r=await ye(e,t);console.log(U()),r||(console.error(W(e)),process.exit(1));let s=await _.default.readdir(e);console.log(Y());let i=await Promise.all(s.filter(o=>!o.startsWith(".")).filter(o=>!o.endsWith(".log")).filter(o=>!qe.includes(o)).map(async o=>(await _.default.lstat(Ee.default.join(e,o))).isDirectory()?`${o}/`:`${o}`));if(i.length>0){let o=await O(e,i);throw new Error(o)}}catch(r){console.error(B(t,r)),process.exit(1)}}var ve=a(require("path"));async function be(e,t,r){let s=ve.default.resolve(__dirname,"template");try{console.log(x(t,r)),await $(s,e)}catch(i){console.error(D(t,r,i)),process.exit(1)}}var p=a(require("path")),u=a(require("fs/promises")),De=a(require("go-git-it"));async function Te(e,t,r){let s=p.default.dirname(e),i=p.default.basename(r),c=`https://github.com/extension-js/extension.js/tree/main/examples/${r}`;try{await u.default.mkdir(e,{recursive:!0});let l="";if(process.env.EXTENSION_ENV==="development"){console.log(x(t,r)),l=p.default.join(e,i);let m=p.default.join(__dirname,"..","..","..","examples",i);await $(m,l)}else await(0,De.default)(c,s,x(t,i)),l=p.default.join(s,i);if(t!==i){let m=p.default.join(s,t);await u.default.mkdir(m,{recursive:!0});let g=await u.default.readdir(l);for(let d of g)await u.default.rename(p.default.join(l,d),p.default.join(m,d));await u.default.rm(l,{recursive:!0,force:!0})}else{let m=p.default.join(s,t+"-temp");await u.default.rename(l,m);let g=p.default.join(m,i),d=p.default.join(s,t);await u.default.mkdir(d,{recursive:!0});let Oe=await u.default.readdir(g);for(let N of Oe)await u.default.rename(p.default.join(g,N),p.default.join(d,N));await u.default.rm(m,{recursive:!0,force:!0})}}catch(l){console.error(D(t,i,l)),process.exit(1)}}var v=a(require("path")),I=a(require("fs/promises"));var He={dev:process.env.EXTENSION_ENV==="development"?"node node_modules/extension dev":"extension dev",start:process.env.EXTENSION_ENV==="development"?"node node_modules/extension start":"extension start",build:process.env.EXTENSION_ENV==="development"?"node node_modules/extension build":"extension build"};async function Fe(e,t,r){let s=we(process.cwd()),i=xe(r)?v.default.join(e,"package.json"):v.default.join(s,"package.json"),o=await I.default.readFile(i),c=JSON.parse(o.toString());c.scripts=c.scripts||{},c.dependencies=c.dependencies||{},c.devDependencies={...c.devDependencies||{},extension:process.env.EXTENSION_ENV==="development"?"*":"latest"};let l={...c,name:v.default.basename(e),private:!0,scripts:{...c.scripts,...He},dependencies:c.dependencies,devDependencies:c.devDependencies,author:{name:"Your Name",email:"your@email.com",url:"https://yourwebsite.com"}};try{console.log(se()),await I.default.writeFile(v.default.join(e,"package.json"),JSON.stringify(l,null,2))}catch(m){console.error(oe(t,m)),process.exit(1)}}var ke=a(require("path")),Se=require("cross-spawn"),Ce=a(require("fs"));function Ke(){return["install","--silent"]}async function _e(e,t){let r=ke.default.join(e,"node_modules"),s=await T(),i=Ke();console.log(te());try{let o=process.cwd();process.chdir(e),await Ce.default.promises.mkdir(r,{recursive:!0});let c=process.env.EXTENSION_ENV==="development"?"inherit":"ignore",l=(0,Se.spawn)(s,i,{stdio:c});await new Promise((m,g)=>{l.on("close",d=>{process.chdir(o),d!==0?g(new Error(ne(s,i,d))):m()}),l.on("error",d=>{process.chdir(o),console.error(ie(t,d)),g(d)})})}catch(o){console.error(re(t,o)),process.exit(1)}}var F=a(require("path")),k=a(require("fs/promises"));async function Ie(e,t){let r=await k.default.readFile(F.default.join(__dirname,"template","README.md"),"utf-8"),s=await T(),i=require(F.default.join(e,"manifest.json")),o=r.replaceAll("[projectName]",t).replaceAll("[templateDescription]",i.description).replaceAll("[runCommand]",s);try{console.log(le()),await k.default.mkdir(e,{recursive:!0}),await k.default.writeFile(F.default.join(e,"README.md"),o)}catch(c){console.error(pe(t,c)),process.exit(1)}}var S=a(require("path")),P=a(require("fs/promises"));async function Pe(e,t){let r=S.default.join(e,"manifest.json"),s=await P.default.readFile(r),o={...JSON.parse(s.toString()),name:S.default.basename(e),author:"Your Name"};try{console.log(ae()),await P.default.writeFile(S.default.join(e,"manifest.json"),JSON.stringify(o,null,2))}catch(c){console.error(ce(t,c)),process.exit(1)}}var J=a(require("path")),M=a(require("fs/promises"));async function Je(e,t){let r=J.default.join(e,"extension-env.d.ts"),s=process.env.EXTENSION_ENV==="development"?J.default.resolve(process.cwd(),"programs/cli/types"):"extension/dist/types",i=`// Required Extension.js types for TypeScript projects.
29
30
  // This file is auto-generated and should not be excluded.
30
31
  // If you need additional types, consider creating a new *.d.ts file and
31
32
  // referencing it in the "include" array of your tsconfig.json file.
32
33
  // See https://www.typescriptlang.org/tsconfig#include for more information.
33
- /// <reference types="${r}/index.d.ts" />
34
+ /// <reference types="${s}/index.d.ts" />
34
35
 
35
36
  // Polyfill types for browser.* APIs.
36
- /// <reference types="${r}/polyfill.d.ts" />
37
- `;try{await M.default.mkdir(e,{recursive:!0}),console.log(q(t)),await M.default.writeFile(o,i)}catch(s){console.error(H(s)),process.exit(1)}}var Ie=a(require("fs/promises")),Je=a(require("path"));var qe=["","# dependencies","node_modules"],He=["","# testing","coverage"],Be=["","# production","dist"],Ke=["","# misc",".DS_Store"],Qe=["","# local env files",".env.local",".env.development.local",".env.test.local",".env.production.local"],Ze=["","# debug files","npm-debug.log*","yarn-debug.log*","yarn-error.log*"],et=["","# lock files","yarn.lock","package-lock.json"],tt=["","# extension.js","extension-env.d.ts"],nt=["# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.",...qe,...He,...Be,...Ke,...Qe,...et,...Ze,...tt];async function Me(e){let t=Je.default.join(e,".gitignore"),o=await Ie.default.open(t,"a+").catch(s=>{console.error(s),process.exit(1)}),r=new Set;for await(let s of o.readLines({autoClose:!1}))s=s.trim(),s.length!==0&&r.add(s);let i=nt.filter(s=>!r.has(s));for(;i[i.length-1]==="";)i.pop();console.log(le()),await o.appendFile(i.join(`
38
- `),{flush:!0}).catch(s=>{console.error(s),process.exit(1)})}var Re=require("cross-spawn");async function Ne(e,t){let o="git",r=["init","--quiet"];console.log(B(t));try{let i=process.cwd();process.chdir(e);let s=process.env.EXTENSION_ENV==="development"?"inherit":"ignore",c=(0,Re.spawn)(o,r,{stdio:s});await new Promise((l,p)=>{c.on("close",g=>{process.chdir(i),g!==0?p(new Error(K(o,r,g))):l()}),c.on("error",g=>{process.chdir(i),console.error(Q(t,g)),p(g)})})}catch(i){console.error(Z(t,i)),process.exit(1)}}async function it(e,{template:t="init",install:o=!0}){if(!e)throw new Error(O());if(e.startsWith("http"))throw new Error(z());let r=_.default.isAbsolute(e)?e:_.default.join(process.cwd(),e),i=_.default.basename(r);try{await he(r,i),t==="init"?await $e(r,i,t):await be(r,i,t),await De(r,i,t),o&&await _e(r,i),await Ce(r,i),await Pe(r,i),await Ne(r,i),await Me(r),ye(t)&&await Se(r,i);let s=await L(r,i);console.log(s)}catch(s){throw console.error(s),s}}0&&(module.exports={extensionCreate});
37
+ /// <reference types="${s}/polyfill.d.ts" />
38
+ `;try{await M.default.mkdir(e,{recursive:!0}),console.log(q(t)),await M.default.writeFile(r,i)}catch(o){console.error(H(o)),process.exit(1)}}var Me=a(require("fs/promises")),Re=a(require("path"));var Qe=["","# dependencies","node_modules"],Ze=["","# testing","coverage"],et=["","# production","dist"],tt=["","# misc",".DS_Store"],nt=["","# local env files",".env.local",".env.development.local",".env.test.local",".env.production.local"],it=["","# debug files","npm-debug.log*","yarn-debug.log*","yarn-error.log*"],rt=["","# lock files","yarn.lock","package-lock.json"],st=["","# extension.js","extension-env.d.ts"],ot=["# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.",...Qe,...Ze,...et,...tt,...nt,...rt,...it,...st];async function Ne(e){let t=Re.default.join(e,".gitignore"),r=await Me.default.open(t,"a+").catch(o=>{console.error(o),process.exit(1)}),s=new Set;for await(let o of r.readLines({autoClose:!1}))o=o.trim(),o.length!==0&&s.add(o);let i=ot.filter(o=>!s.has(o));for(;i[i.length-1]==="";)i.pop();console.log(me()),await r.appendFile(i.join(`
39
+ `),{flush:!0}).catch(o=>{console.error(o),process.exit(1)})}var je=require("cross-spawn");async function Ae(e,t){let r="git",s=["init","--quiet"];console.log(K(t));try{let i=process.cwd();process.chdir(e);let o=process.env.EXTENSION_ENV==="development"?"inherit":"ignore",c=(0,je.spawn)(r,s,{stdio:o});await new Promise((l,m)=>{c.on("close",g=>{process.chdir(i),g!==0?m(new Error(Q(r,s,g))):l()}),c.on("error",g=>{process.chdir(i),console.error(Z(t,g)),m(g)})})}catch(i){console.error(ee(t,i)),process.exit(1)}}var Ge=a(require("path")),R=a(require("fs"));async function We(e,t){try{let r=Ge.default.join(e,"tests","templates.spec.ts");R.default.existsSync(r)&&R.default.unlinkSync(r)}catch(r){console.error(de(t,r)),process.exit(1)}}async function at(e,{template:t="init",install:r=!0}){if(!e)throw new Error(z());if(e.startsWith("http"))throw new Error(L());let s=C.default.isAbsolute(e)?e:C.default.join(process.cwd(),e),i=C.default.basename(s);try{await $e(s,i),t==="init"?await be(s,i,t):await Te(s,i,t),await Fe(s,i,t),r&&await _e(s,i),await Ie(s,i),await Pe(s,i),await Ae(s,i),await Ne(s),await We(s,i),he(t)&&await Je(s,i);let o=await V(s,i);console.log(o)}catch(o){throw console.error(o),o}}0&&(module.exports={extensionCreate});
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "node": ">=18"
10
10
  },
11
11
  "name": "extension-create",
12
- "version": "2.0.0-alpha.27",
12
+ "version": "2.0.0-alpha.29",
13
13
  "description": "The Extension.js create step",
14
14
  "main": "./dist/module.js",
15
15
  "types": "./dist/module.d.ts",
@@ -1,35 +0,0 @@
1
- # test-template-action
2
-
3
- > An Extension.js example.
4
-
5
- ## Available Scripts
6
-
7
- In the project directory, you can run the following scripts:
8
-
9
- ### pnpm dev
10
-
11
- **Development Mode**: This command runs your extension in development mode. It will launch a new browser instance with your extension loaded. The page will automatically reload whenever you make changes to your code, allowing for a smooth development experience.
12
-
13
- ```bash
14
- pnpm dev
15
- ```
16
-
17
- ### pnpm start
18
-
19
- **Production Preview**: This command runs your extension in production mode. It will launch a new browser instance with your extension loaded, simulating the environment and behavior of your extension as it will appear once published.
20
-
21
- ```bash
22
- pnpm start
23
- ```
24
-
25
- ### pnpm build
26
-
27
- **Build for Production**: This command builds your extension for production. It optimizes and bundles your extension, preparing it for deployment to the target browser's store.
28
-
29
- ```bash
30
- pnpm build
31
- ```
32
-
33
- ## Learn More
34
-
35
- To learn more about creating cross-browser extensions with Extension.js, visit the [official documentation](https://extension.js.org).
@@ -1,40 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1" />
6
- <title>Action Extension</title>
7
- <link
8
- rel="stylesheet"
9
- href="https://unpkg.com/sakura.css/css/sakura.css"
10
- media="screen"
11
- />
12
- <link
13
- rel="stylesheet"
14
- href="https://unpkg.com/sakura.css/css/sakura-dark.css"
15
- media="screen and (prefers-color-scheme: dark)"
16
- />
17
- <link rel="stylesheet" href="./styles.css" media="screen" />
18
- </head>
19
- <body class="popup">
20
- <header>
21
- <h1>
22
- <img
23
- class="action"
24
- src="../images/extension_128.png"
25
- alt="The Extension logo"
26
- width="72px"
27
- />
28
- <br />
29
- Welcome to your Action Extension
30
- </h1>
31
- <p>
32
- Learn more about creating cross-browser extensions at
33
- <a href="https://extension.js.org" target="_blank"
34
- >https://extension.js.org</a
35
- >.
36
- </p>
37
- </header>
38
- </body>
39
- <script src="./scripts.js"></script>
40
- </html>
@@ -1,11 +0,0 @@
1
- function getManifest() {
2
- return chrome.runtime.getManifest()
3
- }
4
-
5
- const manifest = getManifest()
6
-
7
- console.table({
8
- name: manifest.name,
9
- version: manifest.version,
10
- description: manifest.description
11
- })
@@ -1,23 +0,0 @@
1
- body {
2
- display: flex;
3
- justify-content: center;
4
- align-items: center;
5
- width: 300px;
6
- padding: 2em;
7
- }
8
-
9
- h1 {
10
- font-size: 2.7em;
11
- }
12
-
13
- .action {
14
- filter: grayscale(1);
15
- transition:
16
- filter 2s,
17
- border-color 2s;
18
- }
19
-
20
- .action:hover {
21
- filter: grayscale(0);
22
- border-color: aquamarine;
23
- }
@@ -1,21 +0,0 @@
1
- {
2
- "manifest_version": 3,
3
- "version": "0.0.1",
4
- "name": "test-template-action",
5
- "description": "An Extension.js example.",
6
- "icons": {
7
- "16": "images/extension_16.png",
8
- "48": "images/extension_48.png",
9
- "128": "images/extension_128.png"
10
- },
11
- "action": {
12
- "default_popup": "action/index.html",
13
- "default_title": "Action",
14
- "default_icon": {
15
- "16": "images/extension_16.png",
16
- "48": "images/extension_48.png",
17
- "128": "images/extension_128.png"
18
- }
19
- },
20
- "author": "Your Name"
21
- }
@@ -1,21 +0,0 @@
1
- {
2
- "private": true,
3
- "name": "test-template-action",
4
- "description": "An Extension.js example.",
5
- "version": "0.0.1",
6
- "author": {
7
- "name": "Your Name",
8
- "email": "your@email.com",
9
- "url": "https://yourwebsite.com"
10
- },
11
- "license": "MIT",
12
- "scripts": {
13
- "dev": "extension dev",
14
- "start": "extension start",
15
- "build": "extension build"
16
- },
17
- "dependencies": {},
18
- "devDependencies": {
19
- "extension": "latest"
20
- }
21
- }
@@ -1 +0,0 @@
1
- EXTENSION_OPENAI_API_KEY='My API Key'
@@ -1,35 +0,0 @@
1
- # test-template-action-chatgpt
2
-
3
- > An Extension.js example.
4
-
5
- ## Available Scripts
6
-
7
- In the project directory, you can run the following scripts:
8
-
9
- ### pnpm dev
10
-
11
- **Development Mode**: This command runs your extension in development mode. It will launch a new browser instance with your extension loaded. The page will automatically reload whenever you make changes to your code, allowing for a smooth development experience.
12
-
13
- ```bash
14
- pnpm dev
15
- ```
16
-
17
- ### pnpm start
18
-
19
- **Production Preview**: This command runs your extension in production mode. It will launch a new browser instance with your extension loaded, simulating the environment and behavior of your extension as it will appear once published.
20
-
21
- ```bash
22
- pnpm start
23
- ```
24
-
25
- ### pnpm build
26
-
27
- **Build for Production**: This command builds your extension for production. It optimizes and bundles your extension, preparing it for deployment to the target browser's store.
28
-
29
- ```bash
30
- pnpm build
31
- ```
32
-
33
- ## Learn More
34
-
35
- To learn more about creating cross-browser extensions with Extension.js, visit the [official documentation](https://extension.js.org).
@@ -1,118 +0,0 @@
1
- import {useState, type FormEvent} from 'react'
2
- import OpenAI from 'openai'
3
- import chatgptLogo from '../images/chatgpt.png'
4
- import extensionJsLogo from '../images/extension_128.png'
5
-
6
- const openai = new OpenAI({
7
- apiKey: process.env.EXTENSION_OPENAI_API_KEY!,
8
- dangerouslyAllowBrowser: true
9
- })
10
-
11
- interface Message {
12
- content: string
13
- role: 'user' | 'assistant'
14
- }
15
-
16
- function ActionApp() {
17
- const [messages, setMessages] = useState<Message[]>([
18
- {
19
- content:
20
- 'Hello there! This is your ChatGPT extension sample, ' +
21
- 'built with React, Tailwind.css, and DaisyUI. ' +
22
- 'For it to work, create a .env file with your EXTENSION_OPENAI_API_KEY. ' +
23
- "You can get an API key from OpenAI's website",
24
- role: 'assistant'
25
- },
26
- {
27
- content: 'https://platform.openai.com/api-keys',
28
- role: 'assistant'
29
- }
30
- ])
31
-
32
- const [isTyping, setIsTyping] = useState(false)
33
-
34
- const handleSubmit = async (e: FormEvent<HTMLFormElement>) => {
35
- e.preventDefault()
36
-
37
- const form = e.target as HTMLFormElement
38
- const input = form[0] as HTMLInputElement
39
-
40
- const newMessage: Message = {
41
- content: input.value,
42
- role: 'user'
43
- }
44
-
45
- const newMessages = [...messages, newMessage]
46
-
47
- setMessages(newMessages)
48
- setIsTyping(true)
49
- form.reset()
50
-
51
- const completion = await openai.chat.completions.create({
52
- model: 'gpt-3.5-turbo',
53
- messages: newMessages
54
- })
55
-
56
- setMessages([...newMessages, completion.choices[0].message as Message])
57
- setIsTyping(false)
58
- }
59
-
60
- return (
61
- <section className="container mx-auto p-5 fixed inset-0">
62
- <div className="w-full h-full flex flex-col">
63
- <div className="flex-grow overflow-auto">
64
- {messages.length &&
65
- messages.map((msg, i) => (
66
- <div
67
- className={`chat ${
68
- msg.role === 'assistant' ? 'chat-start' : 'chat-end'
69
- }`}
70
- key={'chatKey' + i}
71
- >
72
- <div className="chat-image avatar">
73
- <div className="w-10 rounded-full">
74
- <img
75
- src={
76
- msg.role === 'assistant' ? chatgptLogo : extensionJsLogo
77
- }
78
- alt="avatar"
79
- />
80
- </div>
81
- </div>
82
- <div className="chat-bubble">{msg.content}</div>
83
- </div>
84
- ))}
85
- </div>
86
-
87
- <form className="form-control items-center" onSubmit={handleSubmit}>
88
- <div className="input-group max-w-full w-[800px] relative flex items-center">
89
- {isTyping && (
90
- <small className="absolute -top-5 left-0.5 animate-pulse">
91
- ChatGPT Extension is typing...
92
- </small>
93
- )}
94
-
95
- <input
96
- type="text"
97
- placeholder="Ask ChatGPT a question."
98
- className="input input-bordered flex-grow mr-2.5"
99
- required
100
- />
101
- <button className="btn btn-square" type="submit">
102
- <svg
103
- xmlns="http://www.w3.org/2000/svg"
104
- className="h-6 w-6"
105
- fill="currentColor"
106
- viewBox="0 0 16 16"
107
- >
108
- <path d="M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576 6.636 10.07Zm6.787-8.201L1.591 6.602l4.339 2.76 7.494-7.493Z" />
109
- </svg>
110
- </button>
111
- </div>
112
- </form>
113
- </div>
114
- </section>
115
- )
116
- }
117
-
118
- export default ActionApp
@@ -1,13 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1" />
6
- <title>ChatGPT Template</title>
7
- </head>
8
- <body>
9
- <noscript>You need to enable JavaScript to run this extension.</noscript>
10
- <div id="root"></div>
11
- </body>
12
- <script src="./scripts.tsx"></script>
13
- </html>
@@ -1,12 +0,0 @@
1
- import React from 'react'
2
- import ReactDOM from 'react-dom/client'
3
- import ActionApp from './ActionApp'
4
- import './styles.css'
5
-
6
- const root = ReactDOM.createRoot(document.getElementById('root')!)
7
-
8
- root.render(
9
- <React.StrictMode>
10
- <ActionApp />
11
- </React.StrictMode>
12
- )
@@ -1,8 +0,0 @@
1
- @tailwind base;
2
- @tailwind components;
3
- @tailwind utilities;
4
-
5
- #root {
6
- width: 350px;
7
- height: 600px;
8
- }
@@ -1,21 +0,0 @@
1
- {
2
- "manifest_version": 3,
3
- "version": "0.0.1",
4
- "name": "test-template-action-chatgpt",
5
- "description": "An Extension.js example.",
6
- "icons": {
7
- "16": "images/extension_16.png",
8
- "48": "images/extension_48.png",
9
- "128": "images/extension_128.png"
10
- },
11
- "action": {
12
- "default_icon": {
13
- "16": "images/extension_16.png",
14
- "48": "images/extension_48.png",
15
- "128": "images/extension_128.png"
16
- },
17
- "default_title": "ChatGPT",
18
- "default_popup": "action/index.html"
19
- },
20
- "author": "Your Name"
21
- }
@@ -1,30 +0,0 @@
1
- {
2
- "private": true,
3
- "name": "test-template-action-chatgpt",
4
- "description": "An Extension.js example.",
5
- "version": "0.0.1",
6
- "author": {
7
- "name": "Your Name",
8
- "email": "your@email.com",
9
- "url": "https://yourwebsite.com"
10
- },
11
- "license": "MIT",
12
- "dependencies": {
13
- "daisyui": "^4.12.10",
14
- "openai": "^4.57.2",
15
- "react": "^18.1.0",
16
- "react-dom": "^18.1.0",
17
- "tailwindcss": "^3.4.1"
18
- },
19
- "devDependencies": {
20
- "@types/react": "^18.3.5",
21
- "@types/react-dom": "^18.3.0",
22
- "typescript": "5.3.3",
23
- "extension": "latest"
24
- },
25
- "scripts": {
26
- "dev": "extension dev",
27
- "start": "extension start",
28
- "build": "extension build"
29
- }
30
- }
@@ -1,6 +0,0 @@
1
- module.exports = {
2
- plugins: {
3
- tailwindcss: {},
4
- autoprefixer: {}
5
- }
6
- }
@@ -1,8 +0,0 @@
1
- /** @type {import('tailwindcss').Config} */
2
- module.exports = {
3
- content: ['**/*.tsx'],
4
- theme: {
5
- extend: {}
6
- },
7
- plugins: [require('daisyui')]
8
- }
@@ -1,22 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "allowJs": true,
4
- "allowSyntheticDefaultImports": true,
5
- "esModuleInterop": true,
6
- "forceConsistentCasingInFileNames": true,
7
- "isolatedModules": true,
8
- "jsx": "react-jsx",
9
- "lib": ["dom", "dom.iterable", "esnext"],
10
- "moduleResolution": "node",
11
- "module": "esnext",
12
- "noEmit": true,
13
- "resolveJsonModule": true,
14
- "strict": true,
15
- "target": "esnext",
16
- "verbatimModuleSyntax": true,
17
- "useDefineForClassFields": true,
18
- "skipLibCheck": true
19
- },
20
- "include": ["./"],
21
- "exclude": ["node_modules", "dist"]
22
- }
@@ -1,35 +0,0 @@
1
- # test-template-config-babel
2
-
3
- > An Extension.js example.
4
-
5
- ## Available Scripts
6
-
7
- In the project directory, you can run the following scripts:
8
-
9
- ### pnpm dev
10
-
11
- **Development Mode**: This command runs your extension in development mode. It will launch a new browser instance with your extension loaded. The page will automatically reload whenever you make changes to your code, allowing for a smooth development experience.
12
-
13
- ```bash
14
- pnpm dev
15
- ```
16
-
17
- ### pnpm start
18
-
19
- **Production Preview**: This command runs your extension in production mode. It will launch a new browser instance with your extension loaded, simulating the environment and behavior of your extension as it will appear once published.
20
-
21
- ```bash
22
- pnpm start
23
- ```
24
-
25
- ### pnpm build
26
-
27
- **Build for Production**: This command builds your extension for production. It optimizes and bundles your extension, preparing it for deployment to the target browser's store.
28
-
29
- ```bash
30
- pnpm build
31
- ```
32
-
33
- ## Learn More
34
-
35
- To learn more about creating cross-browser extensions with Extension.js, visit the [official documentation](https://extension.js.org).