@slicemachine/adapter-nuxt 0.0.2-dev-plugins-m3.0

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 (343) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +98 -0
  3. package/dist/_node_modules/data-uri-to-buffer/dist/index.cjs +41 -0
  4. package/dist/_node_modules/data-uri-to-buffer/dist/index.cjs.map +1 -0
  5. package/dist/_node_modules/data-uri-to-buffer/dist/index.js +41 -0
  6. package/dist/_node_modules/data-uri-to-buffer/dist/index.js.map +1 -0
  7. package/dist/_node_modules/fetch-blob/file.cjs +61 -0
  8. package/dist/_node_modules/fetch-blob/file.cjs.map +1 -0
  9. package/dist/_node_modules/fetch-blob/file.js +61 -0
  10. package/dist/_node_modules/fetch-blob/file.js.map +1 -0
  11. package/dist/_node_modules/fetch-blob/index.cjs +223 -0
  12. package/dist/_node_modules/fetch-blob/index.cjs.map +1 -0
  13. package/dist/_node_modules/fetch-blob/index.js +223 -0
  14. package/dist/_node_modules/fetch-blob/index.js.map +1 -0
  15. package/dist/_node_modules/fetch-blob/streams.cjs +43 -0
  16. package/dist/_node_modules/fetch-blob/streams.cjs.map +1 -0
  17. package/dist/_node_modules/fetch-blob/streams.js +42 -0
  18. package/dist/_node_modules/fetch-blob/streams.js.map +1 -0
  19. package/dist/_node_modules/formdata-polyfill/esm.min.cjs +116 -0
  20. package/dist/_node_modules/formdata-polyfill/esm.min.cjs.map +1 -0
  21. package/dist/_node_modules/formdata-polyfill/esm.min.js +116 -0
  22. package/dist/_node_modules/formdata-polyfill/esm.min.js.map +1 -0
  23. package/dist/_node_modules/node-domexception/index.cjs +11 -0
  24. package/dist/_node_modules/node-domexception/index.cjs.map +1 -0
  25. package/dist/_node_modules/node-domexception/index.js +10 -0
  26. package/dist/_node_modules/node-domexception/index.js.map +1 -0
  27. package/dist/_node_modules/node-fetch/src/body.cjs +262 -0
  28. package/dist/_node_modules/node-fetch/src/body.cjs.map +1 -0
  29. package/dist/_node_modules/node-fetch/src/body.js +262 -0
  30. package/dist/_node_modules/node-fetch/src/body.js.map +1 -0
  31. package/dist/_node_modules/node-fetch/src/errors/abort-error.cjs +10 -0
  32. package/dist/_node_modules/node-fetch/src/errors/abort-error.cjs.map +1 -0
  33. package/dist/_node_modules/node-fetch/src/errors/abort-error.js +10 -0
  34. package/dist/_node_modules/node-fetch/src/errors/abort-error.js.map +1 -0
  35. package/dist/_node_modules/node-fetch/src/errors/base.cjs +17 -0
  36. package/dist/_node_modules/node-fetch/src/errors/base.cjs.map +1 -0
  37. package/dist/_node_modules/node-fetch/src/errors/base.js +17 -0
  38. package/dist/_node_modules/node-fetch/src/errors/base.js.map +1 -0
  39. package/dist/_node_modules/node-fetch/src/errors/fetch-error.cjs +19 -0
  40. package/dist/_node_modules/node-fetch/src/errors/fetch-error.cjs.map +1 -0
  41. package/dist/_node_modules/node-fetch/src/errors/fetch-error.js +19 -0
  42. package/dist/_node_modules/node-fetch/src/errors/fetch-error.js.map +1 -0
  43. package/dist/_node_modules/node-fetch/src/headers.cjs +190 -0
  44. package/dist/_node_modules/node-fetch/src/headers.cjs.map +1 -0
  45. package/dist/_node_modules/node-fetch/src/headers.js +190 -0
  46. package/dist/_node_modules/node-fetch/src/headers.js.map +1 -0
  47. package/dist/_node_modules/node-fetch/src/index.cjs +292 -0
  48. package/dist/_node_modules/node-fetch/src/index.cjs.map +1 -0
  49. package/dist/_node_modules/node-fetch/src/index.js +292 -0
  50. package/dist/_node_modules/node-fetch/src/index.js.map +1 -0
  51. package/dist/_node_modules/node-fetch/src/request.cjs +206 -0
  52. package/dist/_node_modules/node-fetch/src/request.cjs.map +1 -0
  53. package/dist/_node_modules/node-fetch/src/request.js +206 -0
  54. package/dist/_node_modules/node-fetch/src/request.js.map +1 -0
  55. package/dist/_node_modules/node-fetch/src/response.cjs +122 -0
  56. package/dist/_node_modules/node-fetch/src/response.cjs.map +1 -0
  57. package/dist/_node_modules/node-fetch/src/response.js +123 -0
  58. package/dist/_node_modules/node-fetch/src/response.js.map +1 -0
  59. package/dist/_node_modules/node-fetch/src/utils/get-search.cjs +12 -0
  60. package/dist/_node_modules/node-fetch/src/utils/get-search.cjs.map +1 -0
  61. package/dist/_node_modules/node-fetch/src/utils/get-search.js +12 -0
  62. package/dist/_node_modules/node-fetch/src/utils/get-search.js.map +1 -0
  63. package/dist/_node_modules/node-fetch/src/utils/is-redirect.cjs +8 -0
  64. package/dist/_node_modules/node-fetch/src/utils/is-redirect.cjs.map +1 -0
  65. package/dist/_node_modules/node-fetch/src/utils/is-redirect.js +8 -0
  66. package/dist/_node_modules/node-fetch/src/utils/is-redirect.js.map +1 -0
  67. package/dist/_node_modules/node-fetch/src/utils/is.cjs +28 -0
  68. package/dist/_node_modules/node-fetch/src/utils/is.cjs.map +1 -0
  69. package/dist/_node_modules/node-fetch/src/utils/is.js +28 -0
  70. package/dist/_node_modules/node-fetch/src/utils/is.js.map +1 -0
  71. package/dist/_node_modules/node-fetch/src/utils/multipart-parser.cjs +356 -0
  72. package/dist/_node_modules/node-fetch/src/utils/multipart-parser.cjs.map +1 -0
  73. package/dist/_node_modules/node-fetch/src/utils/multipart-parser.js +356 -0
  74. package/dist/_node_modules/node-fetch/src/utils/multipart-parser.js.map +1 -0
  75. package/dist/_node_modules/node-fetch/src/utils/referrer.cjs +149 -0
  76. package/dist/_node_modules/node-fetch/src/utils/referrer.cjs.map +1 -0
  77. package/dist/_node_modules/node-fetch/src/utils/referrer.js +149 -0
  78. package/dist/_node_modules/node-fetch/src/utils/referrer.js.map +1 -0
  79. package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.cjs +3822 -0
  80. package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.cjs.map +1 -0
  81. package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.js +3822 -0
  82. package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.js.map +1 -0
  83. package/dist/_virtual/_commonjsHelpers.cjs +5 -0
  84. package/dist/_virtual/_commonjsHelpers.cjs.map +1 -0
  85. package/dist/_virtual/_commonjsHelpers.js +5 -0
  86. package/dist/_virtual/_commonjsHelpers.js.map +1 -0
  87. package/dist/_virtual/ponyfill.es2018.cjs +13 -0
  88. package/dist/_virtual/ponyfill.es2018.cjs.map +1 -0
  89. package/dist/_virtual/ponyfill.es2018.js +14 -0
  90. package/dist/_virtual/ponyfill.es2018.js.map +1 -0
  91. package/dist/constants.cjs +5 -0
  92. package/dist/constants.cjs.map +1 -0
  93. package/dist/constants.d.ts +4 -0
  94. package/dist/constants.js +5 -0
  95. package/dist/constants.js.map +1 -0
  96. package/dist/hooks/customType-asset-delete.cjs +31 -0
  97. package/dist/hooks/customType-asset-delete.cjs.map +1 -0
  98. package/dist/hooks/customType-asset-delete.d.ts +3 -0
  99. package/dist/hooks/customType-asset-delete.js +14 -0
  100. package/dist/hooks/customType-asset-delete.js.map +1 -0
  101. package/dist/hooks/customType-asset-read.cjs +34 -0
  102. package/dist/hooks/customType-asset-read.cjs.map +1 -0
  103. package/dist/hooks/customType-asset-read.d.ts +3 -0
  104. package/dist/hooks/customType-asset-read.js +17 -0
  105. package/dist/hooks/customType-asset-read.js.map +1 -0
  106. package/dist/hooks/customType-asset-update.cjs +34 -0
  107. package/dist/hooks/customType-asset-update.cjs.map +1 -0
  108. package/dist/hooks/customType-asset-update.d.ts +3 -0
  109. package/dist/hooks/customType-asset-update.js +16 -0
  110. package/dist/hooks/customType-asset-update.js.map +1 -0
  111. package/dist/hooks/customType-create.cjs +43 -0
  112. package/dist/hooks/customType-create.cjs.map +1 -0
  113. package/dist/hooks/customType-create.d.ts +3 -0
  114. package/dist/hooks/customType-create.js +25 -0
  115. package/dist/hooks/customType-create.js.map +1 -0
  116. package/dist/hooks/customType-delete.cjs +32 -0
  117. package/dist/hooks/customType-delete.cjs.map +1 -0
  118. package/dist/hooks/customType-delete.d.ts +3 -0
  119. package/dist/hooks/customType-delete.js +15 -0
  120. package/dist/hooks/customType-delete.js.map +1 -0
  121. package/dist/hooks/customType-read.cjs +31 -0
  122. package/dist/hooks/customType-read.cjs.map +1 -0
  123. package/dist/hooks/customType-read.d.ts +3 -0
  124. package/dist/hooks/customType-read.js +14 -0
  125. package/dist/hooks/customType-read.js.map +1 -0
  126. package/dist/hooks/customType-rename.cjs +6 -0
  127. package/dist/hooks/customType-rename.cjs.map +1 -0
  128. package/dist/hooks/customType-rename.d.ts +1 -0
  129. package/dist/hooks/customType-rename.js +6 -0
  130. package/dist/hooks/customType-rename.js.map +1 -0
  131. package/dist/hooks/customType-update.cjs +6 -0
  132. package/dist/hooks/customType-update.cjs.map +1 -0
  133. package/dist/hooks/customType-update.d.ts +1 -0
  134. package/dist/hooks/customType-update.js +6 -0
  135. package/dist/hooks/customType-update.js.map +1 -0
  136. package/dist/hooks/customTypeLibrary-read.cjs +53 -0
  137. package/dist/hooks/customTypeLibrary-read.cjs.map +1 -0
  138. package/dist/hooks/customTypeLibrary-read.d.ts +3 -0
  139. package/dist/hooks/customTypeLibrary-read.js +35 -0
  140. package/dist/hooks/customTypeLibrary-read.js.map +1 -0
  141. package/dist/hooks/project-init.cjs +112 -0
  142. package/dist/hooks/project-init.cjs.map +1 -0
  143. package/dist/hooks/project-init.d.ts +3 -0
  144. package/dist/hooks/project-init.js +94 -0
  145. package/dist/hooks/project-init.js.map +1 -0
  146. package/dist/hooks/slice-asset-delete.cjs +33 -0
  147. package/dist/hooks/slice-asset-delete.cjs.map +1 -0
  148. package/dist/hooks/slice-asset-delete.d.ts +3 -0
  149. package/dist/hooks/slice-asset-delete.js +16 -0
  150. package/dist/hooks/slice-asset-delete.js.map +1 -0
  151. package/dist/hooks/slice-asset-read.cjs +36 -0
  152. package/dist/hooks/slice-asset-read.cjs.map +1 -0
  153. package/dist/hooks/slice-asset-read.d.ts +3 -0
  154. package/dist/hooks/slice-asset-read.js +19 -0
  155. package/dist/hooks/slice-asset-read.js.map +1 -0
  156. package/dist/hooks/slice-asset-update.cjs +36 -0
  157. package/dist/hooks/slice-asset-update.cjs.map +1 -0
  158. package/dist/hooks/slice-asset-update.d.ts +3 -0
  159. package/dist/hooks/slice-asset-update.js +18 -0
  160. package/dist/hooks/slice-asset-update.js.map +1 -0
  161. package/dist/hooks/slice-create.cjs +77 -0
  162. package/dist/hooks/slice-create.cjs.map +1 -0
  163. package/dist/hooks/slice-create.d.ts +3 -0
  164. package/dist/hooks/slice-create.js +59 -0
  165. package/dist/hooks/slice-create.js.map +1 -0
  166. package/dist/hooks/slice-delete.cjs +41 -0
  167. package/dist/hooks/slice-delete.cjs.map +1 -0
  168. package/dist/hooks/slice-delete.d.ts +3 -0
  169. package/dist/hooks/slice-delete.js +24 -0
  170. package/dist/hooks/slice-delete.js.map +1 -0
  171. package/dist/hooks/slice-read.cjs +62 -0
  172. package/dist/hooks/slice-read.cjs.map +1 -0
  173. package/dist/hooks/slice-read.d.ts +3 -0
  174. package/dist/hooks/slice-read.js +44 -0
  175. package/dist/hooks/slice-read.js.map +1 -0
  176. package/dist/hooks/slice-rename.cjs +51 -0
  177. package/dist/hooks/slice-rename.cjs.map +1 -0
  178. package/dist/hooks/slice-rename.d.ts +3 -0
  179. package/dist/hooks/slice-rename.js +34 -0
  180. package/dist/hooks/slice-rename.js.map +1 -0
  181. package/dist/hooks/slice-update.cjs +14 -0
  182. package/dist/hooks/slice-update.cjs.map +1 -0
  183. package/dist/hooks/slice-update.d.ts +3 -0
  184. package/dist/hooks/slice-update.js +14 -0
  185. package/dist/hooks/slice-update.js.map +1 -0
  186. package/dist/hooks/sliceLibrary-read.cjs +52 -0
  187. package/dist/hooks/sliceLibrary-read.cjs.map +1 -0
  188. package/dist/hooks/sliceLibrary-read.d.ts +3 -0
  189. package/dist/hooks/sliceLibrary-read.js +34 -0
  190. package/dist/hooks/sliceLibrary-read.js.map +1 -0
  191. package/dist/hooks/sliceSimulator-setup-read.cjs +150 -0
  192. package/dist/hooks/sliceSimulator-setup-read.cjs.map +1 -0
  193. package/dist/hooks/sliceSimulator-setup-read.d.ts +3 -0
  194. package/dist/hooks/sliceSimulator-setup-read.js +150 -0
  195. package/dist/hooks/sliceSimulator-setup-read.js.map +1 -0
  196. package/dist/hooks/snippet-read.cjs +101 -0
  197. package/dist/hooks/snippet-read.cjs.map +1 -0
  198. package/dist/hooks/snippet-read.d.ts +3 -0
  199. package/dist/hooks/snippet-read.js +101 -0
  200. package/dist/hooks/snippet-read.js.map +1 -0
  201. package/dist/index.cjs +4 -0
  202. package/dist/index.cjs.map +1 -0
  203. package/dist/index.d.ts +3 -0
  204. package/dist/index.js +5 -0
  205. package/dist/index.js.map +1 -0
  206. package/dist/lib/buildCustomTypeAssetPath.cjs +29 -0
  207. package/dist/lib/buildCustomTypeAssetPath.cjs.map +1 -0
  208. package/dist/lib/buildCustomTypeAssetPath.d.ts +9 -0
  209. package/dist/lib/buildCustomTypeAssetPath.js +12 -0
  210. package/dist/lib/buildCustomTypeAssetPath.js.map +1 -0
  211. package/dist/lib/buildCustomTypeDirectoryPath.cjs +26 -0
  212. package/dist/lib/buildCustomTypeDirectoryPath.cjs.map +1 -0
  213. package/dist/lib/buildCustomTypeDirectoryPath.d.ts +8 -0
  214. package/dist/lib/buildCustomTypeDirectoryPath.js +9 -0
  215. package/dist/lib/buildCustomTypeDirectoryPath.js.map +1 -0
  216. package/dist/lib/buildCustomTypeLibraryDirectoryPath.cjs +7 -0
  217. package/dist/lib/buildCustomTypeLibraryDirectoryPath.cjs.map +1 -0
  218. package/dist/lib/buildCustomTypeLibraryDirectoryPath.d.ts +7 -0
  219. package/dist/lib/buildCustomTypeLibraryDirectoryPath.js +7 -0
  220. package/dist/lib/buildCustomTypeLibraryDirectoryPath.js.map +1 -0
  221. package/dist/lib/buildSliceAssetPath.cjs +34 -0
  222. package/dist/lib/buildSliceAssetPath.cjs.map +1 -0
  223. package/dist/lib/buildSliceAssetPath.d.ts +11 -0
  224. package/dist/lib/buildSliceAssetPath.js +17 -0
  225. package/dist/lib/buildSliceAssetPath.js.map +1 -0
  226. package/dist/lib/buildSliceDirectoryPath.cjs +30 -0
  227. package/dist/lib/buildSliceDirectoryPath.cjs.map +1 -0
  228. package/dist/lib/buildSliceDirectoryPath.d.ts +10 -0
  229. package/dist/lib/buildSliceDirectoryPath.js +13 -0
  230. package/dist/lib/buildSliceDirectoryPath.js.map +1 -0
  231. package/dist/lib/buildSliceLibraryDirectoryPath.cjs +7 -0
  232. package/dist/lib/buildSliceLibraryDirectoryPath.cjs.map +1 -0
  233. package/dist/lib/buildSliceLibraryDirectoryPath.d.ts +8 -0
  234. package/dist/lib/buildSliceLibraryDirectoryPath.js +7 -0
  235. package/dist/lib/buildSliceLibraryDirectoryPath.js.map +1 -0
  236. package/dist/lib/checkIsTypeScriptProject.cjs +9 -0
  237. package/dist/lib/checkIsTypeScriptProject.cjs.map +1 -0
  238. package/dist/lib/checkIsTypeScriptProject.d.ts +8 -0
  239. package/dist/lib/checkIsTypeScriptProject.js +9 -0
  240. package/dist/lib/checkIsTypeScriptProject.js.map +1 -0
  241. package/dist/lib/checkPathExists.cjs +30 -0
  242. package/dist/lib/checkPathExists.cjs.map +1 -0
  243. package/dist/lib/checkPathExists.d.ts +2 -0
  244. package/dist/lib/checkPathExists.js +13 -0
  245. package/dist/lib/checkPathExists.js.map +1 -0
  246. package/dist/lib/isSharedSliceModel.cjs +7 -0
  247. package/dist/lib/isSharedSliceModel.cjs.map +1 -0
  248. package/dist/lib/isSharedSliceModel.d.ts +335 -0
  249. package/dist/lib/isSharedSliceModel.js +7 -0
  250. package/dist/lib/isSharedSliceModel.js.map +1 -0
  251. package/dist/lib/pascalCase.cjs +8 -0
  252. package/dist/lib/pascalCase.cjs.map +1 -0
  253. package/dist/lib/pascalCase.d.ts +8 -0
  254. package/dist/lib/pascalCase.js +8 -0
  255. package/dist/lib/pascalCase.js.map +1 -0
  256. package/dist/lib/readJSONFile.cjs +26 -0
  257. package/dist/lib/readJSONFile.cjs.map +1 -0
  258. package/dist/lib/readJSONFile.d.ts +1 -0
  259. package/dist/lib/readJSONFile.js +9 -0
  260. package/dist/lib/readJSONFile.js.map +1 -0
  261. package/dist/lib/rejectIfNecessary.cjs +10 -0
  262. package/dist/lib/rejectIfNecessary.cjs.map +1 -0
  263. package/dist/lib/rejectIfNecessary.d.ts +1 -0
  264. package/dist/lib/rejectIfNecessary.js +10 -0
  265. package/dist/lib/rejectIfNecessary.js.map +1 -0
  266. package/dist/lib/updateSliceModelFile.cjs +33 -0
  267. package/dist/lib/updateSliceModelFile.cjs.map +1 -0
  268. package/dist/lib/updateSliceModelFile.d.ts +9 -0
  269. package/dist/lib/updateSliceModelFile.js +15 -0
  270. package/dist/lib/updateSliceModelFile.js.map +1 -0
  271. package/dist/lib/upsertGlobalContentTypes.cjs +55 -0
  272. package/dist/lib/upsertGlobalContentTypes.cjs.map +1 -0
  273. package/dist/lib/upsertGlobalContentTypes.d.ts +12 -0
  274. package/dist/lib/upsertGlobalContentTypes.js +37 -0
  275. package/dist/lib/upsertGlobalContentTypes.js.map +1 -0
  276. package/dist/lib/upsertSliceLibraryIndexFile.cjs +83 -0
  277. package/dist/lib/upsertSliceLibraryIndexFile.cjs.map +1 -0
  278. package/dist/lib/upsertSliceLibraryIndexFile.d.ts +7 -0
  279. package/dist/lib/upsertSliceLibraryIndexFile.js +65 -0
  280. package/dist/lib/upsertSliceLibraryIndexFile.js.map +1 -0
  281. package/dist/packages/adapter-nuxt/package.json.cjs +5 -0
  282. package/dist/packages/adapter-nuxt/package.json.cjs.map +1 -0
  283. package/dist/packages/adapter-nuxt/package.json.js +5 -0
  284. package/dist/packages/adapter-nuxt/package.json.js.map +1 -0
  285. package/dist/plugin.cjs +59 -0
  286. package/dist/plugin.cjs.map +1 -0
  287. package/dist/plugin.d.ts +2 -0
  288. package/dist/plugin.js +59 -0
  289. package/dist/plugin.js.map +1 -0
  290. package/dist/simulator/SliceSimulator.cjs +79 -0
  291. package/dist/simulator/SliceSimulator.cjs.map +1 -0
  292. package/dist/simulator/SliceSimulator.d.ts +34 -0
  293. package/dist/simulator/SliceSimulator.js +79 -0
  294. package/dist/simulator/SliceSimulator.js.map +1 -0
  295. package/dist/simulator/index.d.ts +2 -0
  296. package/dist/simulator.cjs +5 -0
  297. package/dist/simulator.cjs.map +1 -0
  298. package/dist/simulator.js +5 -0
  299. package/dist/simulator.js.map +1 -0
  300. package/dist/types.d.ts +5 -0
  301. package/package.json +107 -0
  302. package/src/constants.ts +5 -0
  303. package/src/hooks/customType-asset-delete.ts +18 -0
  304. package/src/hooks/customType-asset-read.ts +22 -0
  305. package/src/hooks/customType-asset-update.ts +20 -0
  306. package/src/hooks/customType-create.ts +45 -0
  307. package/src/hooks/customType-delete.ts +21 -0
  308. package/src/hooks/customType-read.ts +24 -0
  309. package/src/hooks/customType-rename.ts +3 -0
  310. package/src/hooks/customType-update.ts +3 -0
  311. package/src/hooks/customTypeLibrary-read.ts +53 -0
  312. package/src/hooks/project-init.ts +163 -0
  313. package/src/hooks/slice-asset-delete.ts +21 -0
  314. package/src/hooks/slice-asset-read.ts +25 -0
  315. package/src/hooks/slice-asset-update.ts +23 -0
  316. package/src/hooks/slice-create.ts +115 -0
  317. package/src/hooks/slice-delete.ts +41 -0
  318. package/src/hooks/slice-read.ts +69 -0
  319. package/src/hooks/slice-rename.ts +46 -0
  320. package/src/hooks/slice-update.ts +19 -0
  321. package/src/hooks/sliceLibrary-read.ts +48 -0
  322. package/src/hooks/sliceSimulator-setup-read.ts +209 -0
  323. package/src/hooks/snippet-read.ts +145 -0
  324. package/src/index.ts +4 -0
  325. package/src/lib/buildCustomTypeAssetPath.ts +24 -0
  326. package/src/lib/buildCustomTypeDirectoryPath.ts +20 -0
  327. package/src/lib/buildCustomTypeLibraryDirectoryPath.ts +13 -0
  328. package/src/lib/buildSliceAssetPath.ts +32 -0
  329. package/src/lib/buildSliceDirectoryPath.ts +26 -0
  330. package/src/lib/buildSliceLibraryDirectoryPath.ts +14 -0
  331. package/src/lib/checkIsTypeScriptProject.ts +17 -0
  332. package/src/lib/checkPathExists.ts +12 -0
  333. package/src/lib/isSharedSliceModel.ts +14 -0
  334. package/src/lib/pascalCase.ts +12 -0
  335. package/src/lib/readJSONFile.ts +7 -0
  336. package/src/lib/rejectIfNecessary.ts +16 -0
  337. package/src/lib/updateSliceModelFile.ts +33 -0
  338. package/src/lib/upsertGlobalContentTypes.ts +62 -0
  339. package/src/lib/upsertSliceLibraryIndexFile.ts +90 -0
  340. package/src/plugin.ts +63 -0
  341. package/src/simulator/SliceSimulator.ts +157 -0
  342. package/src/simulator/index.ts +2 -0
  343. package/src/types.ts +5 -0
@@ -0,0 +1,41 @@
1
+ import type {
2
+ SliceDeleteHook,
3
+ SliceDeleteHookData,
4
+ SliceMachineContext,
5
+ } from "@slicemachine/plugin-kit";
6
+ import * as fs from "node:fs/promises";
7
+
8
+ import { buildSliceDirectoryPath } from "../lib/buildSliceDirectoryPath";
9
+ import { rejectIfNecessary } from "../lib/rejectIfNecessary";
10
+ import { upsertGlobalContentTypes } from "../lib/upsertGlobalContentTypes";
11
+ import { upsertSliceLibraryIndexFile } from "../lib/upsertSliceLibraryIndexFile";
12
+
13
+ import type { PluginOptions } from "../types";
14
+
15
+ type Args = {
16
+ data: SliceDeleteHookData;
17
+ } & SliceMachineContext<PluginOptions>;
18
+
19
+ const deleteSliceDir = async ({ data, helpers }: Args) => {
20
+ const dir = buildSliceDirectoryPath({
21
+ libraryID: data.libraryID,
22
+ model: data.model,
23
+ helpers,
24
+ });
25
+
26
+ await fs.rm(dir, { recursive: true });
27
+ };
28
+
29
+ export const sliceDelete: SliceDeleteHook<PluginOptions> = async (
30
+ data,
31
+ context,
32
+ ) => {
33
+ await deleteSliceDir({ data, ...context });
34
+
35
+ rejectIfNecessary(
36
+ await Promise.allSettled([
37
+ upsertGlobalContentTypes(context),
38
+ upsertSliceLibraryIndexFile({ libraryID: data.libraryID, ...context }),
39
+ ]),
40
+ );
41
+ };
@@ -0,0 +1,69 @@
1
+ import type { SliceReadHook } from "@slicemachine/plugin-kit";
2
+ import * as fs from "node:fs/promises";
3
+ import * as path from "node:path";
4
+
5
+ import { buildSliceLibraryDirectoryPath } from "../lib/buildSliceLibraryDirectoryPath";
6
+ import { isSharedSliceModel } from "../lib/isSharedSliceModel";
7
+ import { readJSONFile } from "../lib/readJSONFile";
8
+
9
+ import type { PluginOptions } from "../types";
10
+
11
+ export const sliceRead: SliceReadHook<PluginOptions> = async (
12
+ data,
13
+ { helpers },
14
+ ) => {
15
+ const libraryDir = buildSliceLibraryDirectoryPath({
16
+ libraryID: data.libraryID,
17
+ helpers,
18
+ });
19
+
20
+ // Ensure the directory exists.
21
+ await fs.mkdir(libraryDir, { recursive: true });
22
+
23
+ const childDirs = await fs.readdir(libraryDir, { withFileTypes: true });
24
+
25
+ const modelReadErrors: string[] = [];
26
+
27
+ // Find the first matching model.
28
+ const [model] = (
29
+ await Promise.all(
30
+ childDirs.map(async (childDir) => {
31
+ if (childDir.isDirectory()) {
32
+ const modelPath = path.join(libraryDir, childDir.name, "model.json");
33
+ try {
34
+ const modelContents = await readJSONFile(modelPath);
35
+
36
+ if (
37
+ isSharedSliceModel(modelContents) &&
38
+ modelContents.id === data.sliceID
39
+ ) {
40
+ return modelContents;
41
+ }
42
+ } catch (error) {
43
+ modelReadErrors.push(modelPath);
44
+ }
45
+ }
46
+ }),
47
+ )
48
+ ).filter((model): model is NonNullable<typeof model> => Boolean(model));
49
+
50
+ if (model) {
51
+ return {
52
+ model,
53
+ };
54
+ } else {
55
+ if (modelReadErrors.length) {
56
+ throw new Error(
57
+ `Did not find a Slice model with ID "${data.sliceID}" in the "${
58
+ data.libraryID
59
+ }" Slice Library.\n\nThose Slice models could not be read:\n - ${modelReadErrors.join(
60
+ "\n - ",
61
+ )}`,
62
+ );
63
+ }
64
+
65
+ throw new Error(
66
+ `Did not find a Slice model with ID "${data.sliceID}" in the "${data.libraryID}" Slice Library.`,
67
+ );
68
+ }
69
+ };
@@ -0,0 +1,46 @@
1
+ import type { SliceRenameHook } from "@slicemachine/plugin-kit";
2
+ import * as fse from "fs-extra";
3
+
4
+ import { buildSliceDirectoryPath } from "../lib/buildSliceDirectoryPath";
5
+ import { rejectIfNecessary } from "../lib/rejectIfNecessary";
6
+ import { updateSliceModelFile } from "../lib/updateSliceModelFile";
7
+ import { upsertGlobalContentTypes } from "../lib/upsertGlobalContentTypes";
8
+ import { upsertSliceLibraryIndexFile } from "../lib/upsertSliceLibraryIndexFile";
9
+
10
+ import type { PluginOptions } from "../types";
11
+
12
+ export const sliceRename: SliceRenameHook<PluginOptions> = async (
13
+ data,
14
+ context,
15
+ ) => {
16
+ const { model: currentModel } = await context.actions.readSliceModel({
17
+ libraryID: data.libraryID,
18
+ sliceID: data.model.id,
19
+ });
20
+
21
+ await fse.move(
22
+ buildSliceDirectoryPath({
23
+ libraryID: data.libraryID,
24
+ model: currentModel,
25
+ helpers: context.helpers,
26
+ }),
27
+ buildSliceDirectoryPath({
28
+ libraryID: data.libraryID,
29
+ model: data.model,
30
+ helpers: context.helpers,
31
+ }),
32
+ );
33
+
34
+ await updateSliceModelFile({
35
+ libraryID: data.libraryID,
36
+ model: data.model,
37
+ ...context,
38
+ });
39
+
40
+ rejectIfNecessary(
41
+ await Promise.allSettled([
42
+ upsertGlobalContentTypes(context),
43
+ upsertSliceLibraryIndexFile({ libraryID: data.libraryID, ...context }),
44
+ ]),
45
+ );
46
+ };
@@ -0,0 +1,19 @@
1
+ import type { SliceUpdateHook } from "@slicemachine/plugin-kit";
2
+
3
+ import { updateSliceModelFile } from "../lib/updateSliceModelFile";
4
+ import { upsertGlobalContentTypes } from "../lib/upsertGlobalContentTypes";
5
+
6
+ import type { PluginOptions } from "../types";
7
+
8
+ export const sliceUpdate: SliceUpdateHook<PluginOptions> = async (
9
+ data,
10
+ context,
11
+ ) => {
12
+ await updateSliceModelFile({
13
+ libraryID: data.libraryID,
14
+ model: data.model,
15
+ ...context,
16
+ });
17
+
18
+ await upsertGlobalContentTypes(context);
19
+ };
@@ -0,0 +1,48 @@
1
+ import type { SliceLibraryReadHook } from "@slicemachine/plugin-kit";
2
+ import * as fs from "node:fs/promises";
3
+ import * as path from "node:path";
4
+
5
+ import { buildSliceLibraryDirectoryPath } from "../lib/buildSliceLibraryDirectoryPath";
6
+ import { isSharedSliceModel } from "../lib/isSharedSliceModel";
7
+ import { readJSONFile } from "../lib/readJSONFile";
8
+
9
+ import type { PluginOptions } from "../types";
10
+
11
+ export const sliceLibraryRead: SliceLibraryReadHook<PluginOptions> = async (
12
+ data,
13
+ { helpers },
14
+ ) => {
15
+ const dir = buildSliceLibraryDirectoryPath({
16
+ libraryID: data.libraryID,
17
+ helpers,
18
+ });
19
+
20
+ // Ensure the directory exists.
21
+ await fs.mkdir(dir, { recursive: true });
22
+
23
+ const childDirs = await fs.readdir(dir, { withFileTypes: true });
24
+
25
+ const sliceIDs: string[] = [];
26
+ await Promise.all(
27
+ childDirs.map(async (childDir) => {
28
+ if (childDir.isDirectory()) {
29
+ const modelPath = path.join(dir, childDir.name, "model.json");
30
+
31
+ try {
32
+ const modelContents = await readJSONFile(modelPath);
33
+
34
+ if (isSharedSliceModel(modelContents)) {
35
+ sliceIDs.push(modelContents.id);
36
+ }
37
+ } catch {
38
+ // noop
39
+ }
40
+ }
41
+ }),
42
+ );
43
+
44
+ return {
45
+ id: data.libraryID,
46
+ sliceIDs: sliceIDs.sort(),
47
+ };
48
+ };
@@ -0,0 +1,209 @@
1
+ import type {
2
+ SliceMachineContext,
3
+ SliceSimulatorSetupReadHook,
4
+ SliceSimulatorSetupStep,
5
+ } from "@slicemachine/plugin-kit";
6
+ import { source } from "common-tags";
7
+ import { createRequire } from "node:module";
8
+ import fetch, { Response } from "node-fetch";
9
+
10
+ import { checkIsTypeScriptProject } from "../lib/checkIsTypeScriptProject";
11
+
12
+ import type { PluginOptions } from "../types";
13
+
14
+ const REQUIRED_DEPENDENCIES = ["@nuxtjs/prismic"];
15
+
16
+ type Args = SliceMachineContext<PluginOptions>;
17
+
18
+ const createStep1 = async ({
19
+ project,
20
+ helpers,
21
+ }: Args): Promise<SliceSimulatorSetupStep> => {
22
+ const require = createRequire(project.root);
23
+
24
+ return {
25
+ title: "Install packages",
26
+ description: "The simulator requires some dependencies.",
27
+ // TODO: Create a plugin runner helper to provide the correct
28
+ // package manager
29
+ body: source`
30
+ The simulator requires extra dependencies. Run the following command to install them.
31
+
32
+ ~~~sh
33
+ npm install --save ${REQUIRED_DEPENDENCIES.join(" ")}
34
+ ~~~
35
+ `,
36
+ validate: async () => {
37
+ const missingDependencies: string[] = [];
38
+
39
+ for (const dependency of REQUIRED_DEPENDENCIES) {
40
+ try {
41
+ // `require.resolve()` is preferred
42
+ // over `import()` because we don't
43
+ // want to load the module. Loading a
44
+ // module could introduce side-effects.
45
+ require.resolve(dependency, {
46
+ paths: [helpers.joinPathFromRoot("node_modules")],
47
+ });
48
+ } catch {
49
+ missingDependencies.push(dependency);
50
+ }
51
+ }
52
+
53
+ if (missingDependencies.length >= REQUIRED_DEPENDENCIES.length) {
54
+ return {
55
+ title: "Missing all dependencies",
56
+ message: source`
57
+ Install the required dependencies to continue.
58
+ `,
59
+ };
60
+ }
61
+
62
+ if (missingDependencies.length > 0) {
63
+ const formattedMissingDependencies = missingDependencies
64
+ .map((missingDependency) => `\`${missingDependency}\``)
65
+ .join(", ");
66
+
67
+ return {
68
+ title: "Missing some dependencies",
69
+ message: source`
70
+ The following dependencies are missing: ${formattedMissingDependencies}
71
+ `,
72
+ };
73
+ }
74
+ },
75
+ };
76
+ };
77
+
78
+ const createStep2 = async ({
79
+ helpers,
80
+ options,
81
+ }: Args): Promise<SliceSimulatorSetupStep> => {
82
+ const isTypeScriptProject = await checkIsTypeScriptProject({
83
+ helpers,
84
+ options,
85
+ });
86
+
87
+ const fileName = "slice-simulator.vue";
88
+ const filePath = helpers.joinPathFromRoot("pages", fileName);
89
+
90
+ const scriptAttributes = ["setup"];
91
+ if (isTypeScriptProject) {
92
+ scriptAttributes.push('lang="ts"');
93
+ }
94
+
95
+ const fileContents = await helpers.format(
96
+ source`
97
+ <template>
98
+ <SliceSimulator #default="{ slices }">
99
+ <SliceZone :slices="slices" :components="components" />
100
+ </SliceSimulator>
101
+ </template>
102
+
103
+ <script ${scriptAttributes.join(" ")}>
104
+ import { SliceSimulator } from "@slicemachine/adapter-nuxt/simulator";
105
+ import { components } from "~/slices";
106
+ </script>
107
+ `,
108
+ filePath,
109
+ {
110
+ includeNewlineAtEnd: false,
111
+ },
112
+ );
113
+
114
+ return {
115
+ title: "Create a page for the simulator",
116
+ description: `In your \`pages\` directory, create a file called \`${fileName}\` containing this code.`,
117
+ body: source`
118
+ In your \`pages\` directory, create a file called \`${fileName}\` and add the following code. This route will be used to simulate and develop your components.
119
+
120
+ ~~~vue
121
+ ${fileContents}
122
+ ~~~
123
+ `,
124
+ };
125
+ };
126
+
127
+ const createStep3 = async ({
128
+ helpers,
129
+ }: Args): Promise<SliceSimulatorSetupStep> => {
130
+ const filePath = helpers.joinPathFromRoot("slicemachine.config.json");
131
+ const fileContents = await helpers.format(
132
+ source`
133
+ {
134
+ "localSliceSimulatorURL": "http://localhost:3000/slice-simulator"
135
+ }
136
+ `,
137
+ filePath,
138
+ {
139
+ includeNewlineAtEnd: false,
140
+ },
141
+ );
142
+
143
+ return {
144
+ title: "Update `slicemachine.config.json`",
145
+ description: `Update your \`slicemachine.config.json\` file with a \`localSliceSimulatorURL\` property pointing to your \`/slice-simulator\` page.`,
146
+ body: source`
147
+ Update your \`slicemachine.config.json\` file with a \`localSliceSimulatorURL\` property pointing to your \`/slice-simulator\` page.
148
+
149
+ ~~~json
150
+ ${fileContents}
151
+ ~~~
152
+ `,
153
+ validate: async () => {
154
+ const project = await helpers.getProject();
155
+
156
+ if (!("localSliceSimulatorURL" in project.config)) {
157
+ return {
158
+ title: "Missing `localSliceSimulatorURL` property",
159
+ message: source`
160
+ A \`localSliceSimulatorURL\` property was not found in your \`slicemachine.config.json\` file.
161
+ `,
162
+ };
163
+ }
164
+
165
+ // Test if the URL is valid.
166
+ try {
167
+ if (project.config.localSliceSimulatorURL) {
168
+ new URL(project.config.localSliceSimulatorURL);
169
+ } else {
170
+ throw new Error("Undefined Slice Simulator URL");
171
+ }
172
+ } catch {
173
+ return {
174
+ title: "An invalid URL was provided",
175
+ message: source`
176
+ The \`localSliceSimulatorURL\` property should be of the shape \`http://localhost:PORT/PATH\`. See the codeblock for an example.
177
+ `,
178
+ };
179
+ }
180
+
181
+ // Check if the URL is accessible.
182
+ let res: Response | undefined = undefined;
183
+ try {
184
+ res = await fetch(project.config.localSliceSimulatorURL);
185
+ } catch (error) {
186
+ // Noop, we return if `res` is not defined
187
+ }
188
+
189
+ if (!res || !res.ok) {
190
+ return {
191
+ title: "Unable to connect to simulator page",
192
+ message: source`
193
+ Check that the \`localSliceSimulatorURL\` property in \`slicemachine.config.json\` is correct and try again. See the [troubleshooting page](https://prismic.io/docs/nuxt-setup) for more details.
194
+ `,
195
+ };
196
+ }
197
+ },
198
+ };
199
+ };
200
+
201
+ export const sliceSimulatorSetupRead: SliceSimulatorSetupReadHook<
202
+ PluginOptions
203
+ > = async (_data, context) => {
204
+ return Promise.all([
205
+ createStep1(context),
206
+ createStep2(context),
207
+ createStep3(context),
208
+ ]);
209
+ };
@@ -0,0 +1,145 @@
1
+ import type {
2
+ SliceMachineHelpers,
3
+ SnippetReadHook,
4
+ } from "@slicemachine/plugin-kit";
5
+ import { stripIndent } from "common-tags";
6
+
7
+ import type { PluginOptions } from "../types";
8
+
9
+ const dotPath = (segments: string[]): string => {
10
+ return segments.join(".");
11
+ };
12
+
13
+ const format = async (input: string, helpers: SliceMachineHelpers) => {
14
+ const formattedInput = await helpers.format(input, undefined, {
15
+ includeNewlineAtEnd: false,
16
+ prettier: {
17
+ parser: "vue",
18
+ },
19
+ });
20
+
21
+ return formattedInput.endsWith(";")
22
+ ? formattedInput.substring(0, formattedInput.length - 1)
23
+ : formattedInput;
24
+ };
25
+
26
+ export const snippetRead: SnippetReadHook<PluginOptions> = async (
27
+ data,
28
+ { helpers },
29
+ ) => {
30
+ const { fieldPath } = data;
31
+
32
+ const label = "Vue";
33
+
34
+ switch (data.model.type) {
35
+ case "StructuredText": {
36
+ return [
37
+ {
38
+ label: `${label} (rich)`,
39
+ language: "vue",
40
+ code: await format(
41
+ stripIndent`
42
+ <PrismicRichText :field="${dotPath(fieldPath)}" />
43
+ `,
44
+ helpers,
45
+ ),
46
+ },
47
+ {
48
+ label: `${label} (plain)`,
49
+ language: "vue",
50
+ code: await format(
51
+ stripIndent`
52
+ <PrismicText :field="${dotPath(fieldPath)}" />
53
+ `,
54
+ helpers,
55
+ ),
56
+ },
57
+ ];
58
+ }
59
+
60
+ case "Link": {
61
+ return {
62
+ label,
63
+ language: "vue",
64
+ code: await format(
65
+ stripIndent`
66
+ <PrismicLink :field="${dotPath(fieldPath)}">Link</PrismicLink>
67
+ `,
68
+ helpers,
69
+ ),
70
+ };
71
+ }
72
+
73
+ case "Image": {
74
+ return {
75
+ label,
76
+ language: "vue",
77
+ code: await format(
78
+ stripIndent`
79
+ <PrismicImage :field="${dotPath(fieldPath)}" />
80
+ `,
81
+ helpers,
82
+ ),
83
+ };
84
+ }
85
+
86
+ case "Embed": {
87
+ return {
88
+ label,
89
+ language: "vue",
90
+ code: await format(
91
+ stripIndent`
92
+ <PrismicEmbed :field="${dotPath(fieldPath)}" />
93
+ `,
94
+ helpers,
95
+ ),
96
+ };
97
+ }
98
+
99
+ case "Group": {
100
+ return {
101
+ label,
102
+ language: "vue",
103
+ code: await format(
104
+ stripIndent`
105
+ <template v-for="item in ${dotPath(fieldPath)}">
106
+ {{ item }}
107
+ </template>
108
+ `,
109
+ helpers,
110
+ ),
111
+ };
112
+ }
113
+
114
+ case "Slices": {
115
+ const code = await format(
116
+ stripIndent`
117
+ <SliceZone
118
+ :slices="${dotPath(fieldPath)}"
119
+ :components="components"
120
+ />
121
+ `,
122
+ helpers,
123
+ );
124
+
125
+ return {
126
+ label,
127
+ language: "vue",
128
+ code,
129
+ };
130
+ }
131
+
132
+ default: {
133
+ return {
134
+ label,
135
+ language: "vue",
136
+ code: await format(
137
+ stripIndent`
138
+ {{${dotPath(fieldPath)}}}
139
+ `,
140
+ helpers,
141
+ ),
142
+ };
143
+ }
144
+ }
145
+ };
package/src/index.ts ADDED
@@ -0,0 +1,4 @@
1
+ import { plugin } from "./plugin";
2
+ export default plugin;
3
+
4
+ export type { PluginOptions } from "./types";
@@ -0,0 +1,24 @@
1
+ import { SliceMachineContext } from "@slicemachine/plugin-kit";
2
+ import * as path from "node:path";
3
+
4
+ import { PluginOptions } from "../types";
5
+
6
+ import { buildCustomTypeDirectoryPath } from "./buildCustomTypeDirectoryPath";
7
+
8
+ type BuildCustomTypeAssetPathArgs = {
9
+ customTypeID: string;
10
+ assetID: string;
11
+ helpers: SliceMachineContext<PluginOptions>["helpers"];
12
+ };
13
+
14
+ export const buildCustomTypeAssetPath = (
15
+ args: BuildCustomTypeAssetPathArgs,
16
+ ): string => {
17
+ return path.join(
18
+ buildCustomTypeDirectoryPath({
19
+ customTypeID: args.customTypeID,
20
+ helpers: args.helpers,
21
+ }),
22
+ args.assetID,
23
+ );
24
+ };
@@ -0,0 +1,20 @@
1
+ import { SliceMachineContext } from "@slicemachine/plugin-kit";
2
+ import * as path from "node:path";
3
+
4
+ import { PluginOptions } from "../types";
5
+
6
+ import { buildCustomTypeLibraryDirectoryPath } from "./buildCustomTypeLibraryDirectoryPath";
7
+
8
+ type BuildCustomTypeDirectoryPathArgs = {
9
+ customTypeID: string;
10
+ helpers: SliceMachineContext<PluginOptions>["helpers"];
11
+ };
12
+
13
+ export const buildCustomTypeDirectoryPath = (
14
+ args: BuildCustomTypeDirectoryPathArgs,
15
+ ): string => {
16
+ return path.join(
17
+ buildCustomTypeLibraryDirectoryPath({ helpers: args.helpers }),
18
+ args.customTypeID,
19
+ );
20
+ };
@@ -0,0 +1,13 @@
1
+ import { SliceMachineContext } from "@slicemachine/plugin-kit";
2
+
3
+ import { PluginOptions } from "../types";
4
+
5
+ type BuildCustomTypeLibraryDirectoryPathArgs = {
6
+ helpers: SliceMachineContext<PluginOptions>["helpers"];
7
+ };
8
+
9
+ export const buildCustomTypeLibraryDirectoryPath = (
10
+ args: BuildCustomTypeLibraryDirectoryPathArgs,
11
+ ): string => {
12
+ return args.helpers.joinPathFromRoot("customtypes");
13
+ };
@@ -0,0 +1,32 @@
1
+ import { SliceMachineContext } from "@slicemachine/plugin-kit";
2
+ import * as path from "node:path";
3
+
4
+ import { PluginOptions } from "../types";
5
+
6
+ import { buildSliceDirectoryPath } from "./buildSliceDirectoryPath";
7
+
8
+ type BuildSliceAssetPathArgs = {
9
+ libraryID: string;
10
+ sliceID: string;
11
+ assetID: string;
12
+ actions: SliceMachineContext<PluginOptions>["actions"];
13
+ helpers: SliceMachineContext<PluginOptions>["helpers"];
14
+ };
15
+
16
+ export const buildSliceAssetPath = async (
17
+ args: BuildSliceAssetPathArgs,
18
+ ): Promise<string> => {
19
+ const { model } = await args.actions.readSliceModel({
20
+ libraryID: args.libraryID,
21
+ sliceID: args.sliceID,
22
+ });
23
+
24
+ return path.join(
25
+ buildSliceDirectoryPath({
26
+ libraryID: args.libraryID,
27
+ model,
28
+ helpers: args.helpers,
29
+ }),
30
+ args.assetID,
31
+ );
32
+ };
@@ -0,0 +1,26 @@
1
+ import type { SharedSlice } from "@prismicio/types-internal/lib/customtypes";
2
+ import { SliceMachineContext } from "@slicemachine/plugin-kit";
3
+ import * as path from "node:path";
4
+
5
+ import { PluginOptions } from "../types";
6
+
7
+ import { buildSliceLibraryDirectoryPath } from "./buildSliceLibraryDirectoryPath";
8
+ import { pascalCase } from "./pascalCase";
9
+
10
+ type BuildSliceDirectoryPathArgs = {
11
+ libraryID: string;
12
+ model: SharedSlice;
13
+ helpers: SliceMachineContext<PluginOptions>["helpers"];
14
+ };
15
+
16
+ export const buildSliceDirectoryPath = (
17
+ args: BuildSliceDirectoryPathArgs,
18
+ ): string => {
19
+ return path.join(
20
+ buildSliceLibraryDirectoryPath({
21
+ libraryID: args.libraryID,
22
+ helpers: args.helpers,
23
+ }),
24
+ pascalCase(args.model.name),
25
+ );
26
+ };