@fernir2/saas-kit-cli 0.1.37 → 0.1.39

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 (159) hide show
  1. package/base-repo/app-constants/alias-symbols.cjs.js +1 -1
  2. package/base-repo/app-constants/alias-symbols.js +1 -1
  3. package/base-repo/app-constants/aliases.cjs.js +1 -1
  4. package/base-repo/app-constants/aliases.js +1 -1
  5. package/base-repo/app-constants/project-paths.cjs.js +1 -1
  6. package/base-repo/app-constants/project-paths.js +1 -1
  7. package/base-repo/constants/create-app-constants.cjs.js +1 -1
  8. package/base-repo/constants/create-app-constants.js +2 -2
  9. package/cli/bin/create.ts +19 -15
  10. package/cli/configs/drizzle-cli-config.ts +3 -2
  11. package/cli/configs/next-cli-config.ts +78 -0
  12. package/cli/configs/playwright-cli-config.ts +1 -0
  13. package/cli/configs/tsconfig.cli.json +0 -2
  14. package/cli/next.config.js +2 -72
  15. package/cli/npm-commands/gen-meta.ts +2 -2
  16. package/cli/npm-commands/migrate-db.ts +2 -2
  17. package/cli/npm-commands/seed-db.ts +2 -2
  18. package/cli/package-template.json +3 -4
  19. package/cli/server.ts +4 -5
  20. package/cli/src/app/api/v1/(f)/search-result/route.ts +3 -0
  21. package/cli/src/app/api/v1/(f)/searchable-resources/route.ts +3 -0
  22. package/cli/src/app/f/(signed-in)/layout.tsx +5 -0
  23. package/cli/src/app/f/api-docs/page.tsx +15 -0
  24. package/cli/src/app/layout.tsx +2 -11
  25. package/cli/test/global-setup.ts +2 -24
  26. package/cli/tsconfig.json +2 -15
  27. package/cli/tsconfig.server.json +0 -3
  28. package/fd-toolbox/api/api-client.cjs.js +1 -1
  29. package/fd-toolbox/api/api-client.js +1 -1
  30. package/fd-toolbox/api/api-path-names.cjs.js +2 -2
  31. package/fd-toolbox/api/api-path-names.js +1 -1
  32. package/fd-toolbox/api/api-paths.cjs.js +1 -1
  33. package/fd-toolbox/api/api-paths.js +1 -1
  34. package/fd-toolbox/api/base-api.cjs.js +1 -1
  35. package/fd-toolbox/api/base-api.js +1 -1
  36. package/fd-toolbox/auth/login-states.cjs.js +1 -1
  37. package/fd-toolbox/auth/login-states.js +1 -1
  38. package/fd-toolbox/auth/session-storage.cjs.js +1 -1
  39. package/fd-toolbox/auth/session-storage.js +1 -1
  40. package/fd-toolbox/auth/tokens.cjs.js +1 -1
  41. package/fd-toolbox/auth/tokens.js +1 -1
  42. package/fd-toolbox/constants/constants.cjs.js +1 -1
  43. package/fd-toolbox/constants/constants.js +1 -1
  44. package/fd-toolbox/enums/enums.cjs.js +1 -1
  45. package/fd-toolbox/enums/enums.js +1 -1
  46. package/fd-toolbox/errors/error-handler.cjs.js +1 -1
  47. package/fd-toolbox/errors/error-handler.js +1 -1
  48. package/fd-toolbox/errors/errors.cjs.js +1 -1
  49. package/fd-toolbox/errors/errors.js +1 -1
  50. package/fd-toolbox/errors/problem-details.cjs.js +1 -1
  51. package/fd-toolbox/errors/problem-details.js +1 -1
  52. package/fd-toolbox/functions/value-checking-functions.cjs.js +1 -1
  53. package/fd-toolbox/functions/value-checking-functions.js +1 -1
  54. package/fd-toolbox/http/url/urls.cjs.js +1 -1
  55. package/fd-toolbox/http/url/urls.js +1 -1
  56. package/fd-toolbox/infra/env-config.cjs.js +2 -2
  57. package/fd-toolbox/infra/env-config.js +2 -2
  58. package/fd-toolbox/infra/env-functions.cjs.js +1 -1
  59. package/fd-toolbox/infra/env-functions.js +1 -1
  60. package/fd-toolbox/infra/env-schema.cjs.js +2 -2
  61. package/fd-toolbox/infra/env-schema.js +2 -2
  62. package/fd-toolbox/infra/env-store.cjs.js +1 -1
  63. package/fd-toolbox/infra/env-store.js +1 -1
  64. package/fd-toolbox/infra/toolbox-env-setting-keys.cjs.js +1 -1
  65. package/fd-toolbox/infra/toolbox-env-setting-keys.js +1 -1
  66. package/fd-toolbox/lib/environments.cjs.js +1 -1
  67. package/fd-toolbox/lib/environments.js +1 -1
  68. package/fd-toolbox/lib/utils.cjs.js +1 -1
  69. package/fd-toolbox/lib/utils.js +1 -1
  70. package/fd-toolbox/local-storage/local-storage.cjs.js +1 -1
  71. package/fd-toolbox/local-storage/local-storage.js +1 -1
  72. package/fd-toolbox/logging/loggers.cjs.js +1 -1
  73. package/fd-toolbox/logging/loggers.js +1 -1
  74. package/fd-toolbox/notifications.cjs.js +2 -2
  75. package/fd-toolbox/notifications.js +2 -2
  76. package/fd-toolbox/odata/odata-constants.cjs.js +1 -1
  77. package/fd-toolbox/odata/odata-constants.js +1 -1
  78. package/fd-toolbox/odata/odatas.cjs.js +1 -1
  79. package/fd-toolbox/odata/odatas.js +1 -1
  80. package/fd-toolbox/odata/services/odata-filters.cjs.js +1 -1
  81. package/fd-toolbox/odata/services/odata-filters.js +1 -1
  82. package/fd-toolbox/paths/paths-names.cjs.js +2 -2
  83. package/fd-toolbox/paths/paths-names.js +1 -1
  84. package/fd-toolbox/routing/login-routers.cjs.js +1 -1
  85. package/fd-toolbox/routing/login-routers.js +1 -1
  86. package/fd-toolbox/routing/paths.cjs.js +1 -1
  87. package/fd-toolbox/routing/paths.js +1 -1
  88. package/fd-toolbox/routing/routes.cjs.js +1 -1
  89. package/fd-toolbox/routing/routes.js +1 -1
  90. package/fd-toolbox/strings/strings-constants.cjs.js +1 -1
  91. package/fd-toolbox/strings/strings-constants.js +1 -1
  92. package/fd-toolbox/strings/strings.cjs.js +1 -1
  93. package/fd-toolbox/strings/strings.js +1 -1
  94. package/fd-toolbox/types/ensure-type.cjs.js +1 -1
  95. package/fd-toolbox/types/ensure-type.js +1 -1
  96. package/fd-toolbox-core/core/name-of.cjs.js +1 -1
  97. package/fd-toolbox-core/core/name-of.js +1 -1
  98. package/fd-toolbox-core/types/resource-with-id.cjs.js +1 -1
  99. package/fd-toolbox-core/types/resource-with-id.js +1 -1
  100. package/level2/cli/bin/index.cjs.js +1 -1
  101. package/level2/cli/bin/index.js +1 -1
  102. package/level2/cli/create/bin/create.cjs.js +4 -4
  103. package/level2/cli/create/bin/create.js +3 -3
  104. package/level2/npm-commands/build-npm/path.cjs.js +2 -1
  105. package/level2/npm-commands/build-npm/path.js +2 -2
  106. package/package.json +10 -9
  107. package/cli/public/images/shipment/076aecd1-7fb8-5d89-baa9-e48e61048525.pdf +0 -0
  108. package/cli/public/images/shipment/21884fb7-6e39-4f7b-9a49-0f46d527f50c.pdf +0 -0
  109. package/cli/public/images/shipment/e6367904-081e-479b-a8c5-5972057a261e.pdf +0 -0
  110. package/cli/public/images/store/00000000-0000-0000-0000-000000000000.webp +0 -0
  111. package/cli/public/images/test/photo-1460925895917-afdab827c52f.jpg +0 -0
  112. package/cli/public/images/test/photo-1499636136210-6f4ee915583e.jpg +0 -0
  113. package/cli/public/images/test/photo-1519681393784-d120267933ba.jpg +0 -0
  114. package/cli/src/app/api/v1/searchable-resources/route.ts +0 -11
  115. package/cli/src/app/api/v1/searchresult/route.ts +0 -35
  116. package/cli/src/app/f/(private)/layout.tsx +0 -5
  117. package/cli/src/app/f/defaultRedirect/page.tsx +0 -9
  118. /package/cli/src/app/api/v1/{[resourceName] → (f)/[resourceName]}/[id]/route.ts +0 -0
  119. /package/cli/src/app/api/v1/{[resourceName] → (f)/[resourceName]}/route.ts +0 -0
  120. /package/cli/src/app/api/v1/{[resourceName] → (f)/[resourceName]}/upsert/route.ts +0 -0
  121. /package/cli/src/app/api/v1/{blob → (f)/blob}/route.ts +0 -0
  122. /package/cli/src/app/api/v1/{log → (f)/log}/route.ts +0 -0
  123. /package/cli/src/app/api/v1/{otheruser → (f)/other-user}/[id]/route.ts +0 -0
  124. /package/cli/src/app/api/v1/{otheruser → (f)/other-user}/route.ts +0 -0
  125. /package/cli/src/app/api/v1/{password/forgotpassword → (f)/password/forgot-password}/route.ts +0 -0
  126. /package/cli/src/app/api/v1/{password/resetpassword → (f)/password/reset-password}/route.ts +0 -0
  127. /package/cli/src/app/api/v1/{payment → (f)/payment}/method/route.ts +0 -0
  128. /package/cli/src/app/api/v1/{payment → (f)/payment}/route.ts +0 -0
  129. /package/cli/src/app/api/v1/{payment → (f)/payment}/verify-fail/route.ts +0 -0
  130. /package/cli/src/app/api/v1/{payment → (f)/payment}/verify-success/route.ts +0 -0
  131. /package/cli/src/app/api/v1/{preload → (f)/preload}/route.ts +0 -0
  132. /package/cli/src/app/api/v1/{sign-in → (f)/sign-in}/route.ts +0 -0
  133. /package/cli/src/app/api/v1/{sign-out → (f)/sign-out}/route.ts +0 -0
  134. /package/cli/src/app/api/v1/{sign-up → (f)/sign-up}/route.ts +0 -0
  135. /package/cli/src/app/api/v1/{subscription → (f)/subscription}/cancel/route.ts +0 -0
  136. /package/cli/src/app/api/v1/{subscription → (f)/subscription}/create/route.ts +0 -0
  137. /package/cli/src/app/api/v1/{subscription → (f)/subscription}/update/route.ts +0 -0
  138. /package/cli/src/app/api/v1/{uimeta → (f)/uimeta}/route.ts +0 -0
  139. /package/cli/src/app/api/v1/{uimetas → (f)/uimetas}/route.ts +0 -0
  140. /package/cli/src/app/api/v1/{userfeature → (f)/user-feature}/isenabled/route.ts +0 -0
  141. /package/cli/src/app/api/v1/{userpermission → (f)/user-permission}/route.ts +0 -0
  142. /package/cli/src/app/api/v1/{visible-workspace → (f)/visible-workspace}/route.ts +0 -0
  143. /package/cli/src/app/api/v1/{workspace → (f)/workspace}/change/route.ts +0 -0
  144. /package/cli/src/app/f/{editpassword → (not-signed-in)/edit-password}/page.tsx +0 -0
  145. /package/cli/src/app/f/{forgotpassword → (not-signed-in)/forgot-password}/page.tsx +0 -0
  146. /package/cli/src/app/f/{resetpassword → (not-signed-in)/reset-password}/page.tsx +0 -0
  147. /package/cli/src/app/f/{sign-in → (not-signed-in)/sign-in}/microsoft/page.tsx +0 -0
  148. /package/cli/src/app/f/{sign-in → (not-signed-in)/sign-in}/page.tsx +0 -0
  149. /package/cli/src/app/f/{sign-up → (not-signed-in)/sign-up}/page.tsx +0 -0
  150. /package/cli/src/app/f/{(private) → (signed-in)}/dashboard/page.tsx +0 -0
  151. /package/cli/src/app/f/{(private) → (signed-in)}/dynamiclayout/page.tsx +0 -0
  152. /package/cli/src/app/f/{(private) → (signed-in)}/edituser/[id]/page.tsx +0 -0
  153. /package/cli/src/app/f/{(private) → (signed-in)}/edituser/page.tsx +0 -0
  154. /package/cli/src/app/f/{(private) → (signed-in)}/lm/page.tsx +0 -0
  155. /package/cli/src/app/f/{(private) → (signed-in)}/payment-plans/page.tsx +0 -0
  156. /package/cli/src/app/f/{(private) → (signed-in)}/preload/page.tsx +0 -0
  157. /package/cli/src/app/f/{(private) → (signed-in)}/statusboard/page.tsx +0 -0
  158. /package/cli/src/app/f/{(private) → (signed-in)}/userlist/page.tsx +0 -0
  159. /package/cli/src/app/f/{(private) → (signed-in)}/view/page.tsx +0 -0
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  'use strict';
3
3
 
4
- var __defProp=Object['defineProperty'],__name=(_0x108adb,_0x4eae0e)=>__defProp(_0x108adb,'name',{'value':_0x4eae0e,'configurable':!![]});function addQueryParamsToPath(_0x2a3702,_0x1adf00){let _0x3f82ab=_0x2a3702;if(_0x1adf00&&Array['isArray'](_0x1adf00))_0x3f82ab+=convertQueryParamsArrayToString(_0x1adf00);else _0x1adf00&&!Array['isArray'](_0x1adf00)&&(_0x3f82ab+=convertQueryParamsObjectToString(_0x1adf00));return _0x3f82ab;}__name(addQueryParamsToPath,'addQueryParamsToPath');function convertQueryParamsArrayToString(_0x4682e7){const _0x2b6544=_0x4682e7['map'](_0xace650=>_0xace650['name']+'='+_0xace650['value'])['join']('&');return _0x2b6544?'?'+_0x2b6544:'';}__name(convertQueryParamsArrayToString,'convertQueryParamsArrayToString');function convertQueryParamsObjectToString(_0x34d092){const _0x348a42=Object['entries'](_0x34d092)['map'](([_0x26c36f,_0x3faa6d])=>_0x26c36f+'='+_0x3faa6d)['join']('&');return _0x348a42?'?'+_0x348a42:'';}__name(convertQueryParamsObjectToString,'convertQueryParamsObjectToString');
4
+ var __defProp=Object['defineProperty'],__name=(_0x2790ca,_0x20f522)=>__defProp(_0x2790ca,'name',{'value':_0x20f522,'configurable':!![]});function addQueryParamsToPath(_0x8828a9,_0x25e426){let _0x98ca8e=_0x8828a9;if(_0x25e426&&Array['isArray'](_0x25e426))_0x98ca8e+=convertQueryParamsArrayToString(_0x25e426);else _0x25e426&&!Array['isArray'](_0x25e426)&&(_0x98ca8e+=convertQueryParamsObjectToString(_0x25e426));return _0x98ca8e;}__name(addQueryParamsToPath,'addQueryParamsToPath');function convertQueryParamsArrayToString(_0x3e6e85){const _0x53dff3=_0x3e6e85['map'](_0x594dfd=>_0x594dfd['name']+'='+_0x594dfd['value'])['join']('&');return _0x53dff3?'?'+_0x53dff3:'';}__name(convertQueryParamsArrayToString,'convertQueryParamsArrayToString');function convertQueryParamsObjectToString(_0x36d221){const _0x3e003=Object['entries'](_0x36d221)['map'](([_0x4fe4e2,_0x352f74])=>_0x4fe4e2+'='+_0x352f74)['join']('&');return _0x3e003?'?'+_0x3e003:'';}__name(convertQueryParamsObjectToString,'convertQueryParamsObjectToString');
5
5
 
6
6
  exports.addQueryParamsToPath = addQueryParamsToPath;
@@ -1,4 +1,4 @@
1
1
  'use strict';
2
- var __defProp=Object['defineProperty'],__name=(_0x108adb,_0x4eae0e)=>__defProp(_0x108adb,'name',{'value':_0x4eae0e,'configurable':!![]});function addQueryParamsToPath(_0x2a3702,_0x1adf00){let _0x3f82ab=_0x2a3702;if(_0x1adf00&&Array['isArray'](_0x1adf00))_0x3f82ab+=convertQueryParamsArrayToString(_0x1adf00);else _0x1adf00&&!Array['isArray'](_0x1adf00)&&(_0x3f82ab+=convertQueryParamsObjectToString(_0x1adf00));return _0x3f82ab;}__name(addQueryParamsToPath,'addQueryParamsToPath');function convertQueryParamsArrayToString(_0x4682e7){const _0x2b6544=_0x4682e7['map'](_0xace650=>_0xace650['name']+'='+_0xace650['value'])['join']('&');return _0x2b6544?'?'+_0x2b6544:'';}__name(convertQueryParamsArrayToString,'convertQueryParamsArrayToString');function convertQueryParamsObjectToString(_0x34d092){const _0x348a42=Object['entries'](_0x34d092)['map'](([_0x26c36f,_0x3faa6d])=>_0x26c36f+'='+_0x3faa6d)['join']('&');return _0x348a42?'?'+_0x348a42:'';}__name(convertQueryParamsObjectToString,'convertQueryParamsObjectToString');
2
+ var __defProp=Object['defineProperty'],__name=(_0x2790ca,_0x20f522)=>__defProp(_0x2790ca,'name',{'value':_0x20f522,'configurable':!![]});function addQueryParamsToPath(_0x8828a9,_0x25e426){let _0x98ca8e=_0x8828a9;if(_0x25e426&&Array['isArray'](_0x25e426))_0x98ca8e+=convertQueryParamsArrayToString(_0x25e426);else _0x25e426&&!Array['isArray'](_0x25e426)&&(_0x98ca8e+=convertQueryParamsObjectToString(_0x25e426));return _0x98ca8e;}__name(addQueryParamsToPath,'addQueryParamsToPath');function convertQueryParamsArrayToString(_0x3e6e85){const _0x53dff3=_0x3e6e85['map'](_0x594dfd=>_0x594dfd['name']+'='+_0x594dfd['value'])['join']('&');return _0x53dff3?'?'+_0x53dff3:'';}__name(convertQueryParamsArrayToString,'convertQueryParamsArrayToString');function convertQueryParamsObjectToString(_0x36d221){const _0x3e003=Object['entries'](_0x36d221)['map'](([_0x4fe4e2,_0x352f74])=>_0x4fe4e2+'='+_0x352f74)['join']('&');return _0x3e003?'?'+_0x3e003:'';}__name(convertQueryParamsObjectToString,'convertQueryParamsObjectToString');
3
3
 
4
4
  export { addQueryParamsToPath };
@@ -5,7 +5,7 @@ var apiPathNames = require('../api/api-path-names.cjs.js');
5
5
  var metaQueryParams = require('../constants/meta-query-params.cjs.js');
6
6
  var urls = require('../http/url/urls.cjs.js');
7
7
 
8
- const paramPart='/:',idPart=paramPart+metaQueryParams.metaQueryParams['id'],editItem='edititem';const paramRouteName='[param]';const list='view';const edit='edit';const blobRoute='blob';const routes={'root':'/','list':list,'edit':edit,'view':'view','editItem':editItem,'editWithId':editItem+idPart,'itemReview':'itemreview','itemHints':'itemhints','login':'sign-in','logout':'sign-out','user':apiPathNames.apiPathNames['user'],'editUser':'edituser','editUserWithId':'edituser'+idPart,'editPassword':'editpassword','userList':'userlist','home':'home','team':'team','about':'about','contact':'contact','companion':'companion','videoExample':'videoexample','chartExample':'chart-example','videoRecordingReview':'videorecordingreview','videoReview':'videoreview','videoRecording':'videorecording','viewVideoRecording':'viewvideorecording','mainDashboard':'maindashboard','tableExample':'tableexample','feed':'feed','resourceDetailList':'resource-detail-list','item':'item','fileUpload':'file-upload','viewCourse':'viewcourse','forgotPassword':'forgotpassword','resetPassword':'resetpassword','tableTemplateExample':'tabletemplateexample','paymentPlans':'payment-plans','api':'api','register':'sign-up','featureCode':'featurecode','userId':'userid','otherUser':'otheruser','preload':'preload','userFeature':'user-feature','log':'log','uiMeta':'uimeta','meta':'meta','dashboard':'dashboard','productPreview':'product-preview','export':'export','hd':'hd','productPreviewSegment':'product-preview','screenshot':'screenshot','lm':'lm','leadScanWebsite':'lm/lead-scan-website','googlePlaceScanWebsite':'lm/google-place-scan-website','googlePlaceSaveToGroup':'lm/google-place/save-to-group','remoteBlob':urls.combineEndpointPath(blobRoute,'remote')};
8
+ const paramPart='/:',idPart=paramPart+metaQueryParams.metaQueryParams['id'],editItem='edititem';const paramRouteName='[param]';const list='view';const edit='edit';const blobRoute='blob';const routes={'root':'/','list':list,'edit':edit,'view':'view','editItem':editItem,'editWithId':editItem+idPart,'itemReview':'itemreview','itemHints':'itemhints','login':'sign-in','logout':'sign-out','user':apiPathNames.apiPathNames['user'],'editUser':'edituser','editUserWithId':'edituser'+idPart,'editPassword':'edit-password','userList':'userlist','home':'home','team':'team','about':'about','contact':'contact','companion':'companion','videoExample':'videoexample','chartExample':'chart-example','videoRecordingReview':'videorecordingreview','videoReview':'videoreview','videoRecording':'videorecording','viewVideoRecording':'viewvideorecording','mainDashboard':'maindashboard','tableExample':'tableexample','feed':'feed','resourceDetailList':'resource-detail-list','item':'item','fileUpload':'file-upload','viewCourse':'viewcourse','forgotPassword':'forgot-password','resetPassword':'reset-password','tableTemplateExample':'tabletemplateexample','paymentPlans':'payment-plans','api':'api','register':'sign-up','featureCode':'featurecode','userId':'userid','otherUser':'other-user','preload':'preload','userFeature':'user-feature','log':'log','uiMeta':'uimeta','meta':'meta','dashboard':'dashboard','productPreview':'product-preview','export':'export','hd':'hd','productPreviewSegment':'product-preview','screenshot':'screenshot','lm':'lm','leadScanWebsite':'lm/lead-scan-website','googlePlaceScanWebsite':'lm/google-place-scan-website','googlePlaceSaveToGroup':'lm/google-place/save-to-group','remoteBlob':urls.combineEndpointPath(blobRoute,'remote')};
9
9
 
10
10
  exports.blobRoute = blobRoute;
11
11
  exports.edit = edit;
@@ -3,6 +3,6 @@ import { apiPathNames } from '../api/api-path-names.js';
3
3
  import { metaQueryParams } from '../constants/meta-query-params.js';
4
4
  import { combineEndpointPath } from '../http/url/urls.js';
5
5
 
6
- const paramPart='/:',idPart=paramPart+metaQueryParams['id'],editItem='edititem';const paramRouteName='[param]';const list='view';const edit='edit';const blobRoute='blob';const routes={'root':'/','list':list,'edit':edit,'view':'view','editItem':editItem,'editWithId':editItem+idPart,'itemReview':'itemreview','itemHints':'itemhints','login':'sign-in','logout':'sign-out','user':apiPathNames['user'],'editUser':'edituser','editUserWithId':'edituser'+idPart,'editPassword':'editpassword','userList':'userlist','home':'home','team':'team','about':'about','contact':'contact','companion':'companion','videoExample':'videoexample','chartExample':'chart-example','videoRecordingReview':'videorecordingreview','videoReview':'videoreview','videoRecording':'videorecording','viewVideoRecording':'viewvideorecording','mainDashboard':'maindashboard','tableExample':'tableexample','feed':'feed','resourceDetailList':'resource-detail-list','item':'item','fileUpload':'file-upload','viewCourse':'viewcourse','forgotPassword':'forgotpassword','resetPassword':'resetpassword','tableTemplateExample':'tabletemplateexample','paymentPlans':'payment-plans','api':'api','register':'sign-up','featureCode':'featurecode','userId':'userid','otherUser':'otheruser','preload':'preload','userFeature':'user-feature','log':'log','uiMeta':'uimeta','meta':'meta','dashboard':'dashboard','productPreview':'product-preview','export':'export','hd':'hd','productPreviewSegment':'product-preview','screenshot':'screenshot','lm':'lm','leadScanWebsite':'lm/lead-scan-website','googlePlaceScanWebsite':'lm/google-place-scan-website','googlePlaceSaveToGroup':'lm/google-place/save-to-group','remoteBlob':combineEndpointPath(blobRoute,'remote')};
6
+ const paramPart='/:',idPart=paramPart+metaQueryParams['id'],editItem='edititem';const paramRouteName='[param]';const list='view';const edit='edit';const blobRoute='blob';const routes={'root':'/','list':list,'edit':edit,'view':'view','editItem':editItem,'editWithId':editItem+idPart,'itemReview':'itemreview','itemHints':'itemhints','login':'sign-in','logout':'sign-out','user':apiPathNames['user'],'editUser':'edituser','editUserWithId':'edituser'+idPart,'editPassword':'edit-password','userList':'userlist','home':'home','team':'team','about':'about','contact':'contact','companion':'companion','videoExample':'videoexample','chartExample':'chart-example','videoRecordingReview':'videorecordingreview','videoReview':'videoreview','videoRecording':'videorecording','viewVideoRecording':'viewvideorecording','mainDashboard':'maindashboard','tableExample':'tableexample','feed':'feed','resourceDetailList':'resource-detail-list','item':'item','fileUpload':'file-upload','viewCourse':'viewcourse','forgotPassword':'forgot-password','resetPassword':'reset-password','tableTemplateExample':'tabletemplateexample','paymentPlans':'payment-plans','api':'api','register':'sign-up','featureCode':'featurecode','userId':'userid','otherUser':'other-user','preload':'preload','userFeature':'user-feature','log':'log','uiMeta':'uimeta','meta':'meta','dashboard':'dashboard','productPreview':'product-preview','export':'export','hd':'hd','productPreviewSegment':'product-preview','screenshot':'screenshot','lm':'lm','leadScanWebsite':'lm/lead-scan-website','googlePlaceScanWebsite':'lm/google-place-scan-website','googlePlaceSaveToGroup':'lm/google-place/save-to-group','remoteBlob':combineEndpointPath(blobRoute,'remote')};
7
7
 
8
8
  export { blobRoute, edit, list, paramRouteName, routes };
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
  'use strict';
3
3
 
4
- const shortTextLength=0x1*-0x325+0x1*-0x2571+0xf*0x2c2;const ellipsis='…';
4
+ const shortTextLength=0xffb+0x4*0x5f0+-0x26f3;const ellipsis='…';
5
5
 
6
6
  exports.ellipsis = ellipsis;
7
7
  exports.shortTextLength = shortTextLength;
@@ -1,4 +1,4 @@
1
1
  'use strict';
2
- const shortTextLength=0x1*-0x325+0x1*-0x2571+0xf*0x2c2;const ellipsis='…';
2
+ const shortTextLength=0xffb+0x4*0x5f0+-0x26f3;const ellipsis='…';
3
3
 
4
4
  export { ellipsis, shortTextLength };
@@ -4,7 +4,7 @@
4
4
  var stringsConstants = require('./strings-constants.cjs.js');
5
5
  var valueCheckingFunctions = require('../functions/value-checking-functions.cjs.js');
6
6
 
7
- var __defProp=Object['defineProperty'],__name=(_0x381f10,_0x552758)=>__defProp(_0x381f10,'name',{'value':_0x552758,'configurable':!![]});function shortenWithEllipsis(_0x5a88a0,_0x437757=stringsConstants.shortTextLength){if(valueCheckingFunctions.isNullOrUndefined(_0x5a88a0))return '';return _0x5a88a0['length']<0xaa8*0x3+-0x2237+0x241?_0x5a88a0['length']<=_0x437757?_0x5a88a0:_0x5a88a0['substring'](0xa8*-0x33+-0x382*0x6+0x3684,_0x437757):_0x5a88a0['length']<=_0x437757?_0x5a88a0:_0x5a88a0['substring'](0x1dda+-0x1fc2+0x7a*0x4,_0x437757-(0x1*0x1dff+0x1b89+-0x3987))+stringsConstants.ellipsis;}__name(shortenWithEllipsis,'shortenWithEllipsis');function trimCharacter(_0x5bdf07,_0x3c94f3){let _0x2398ea=_0x5bdf07;if(Array['isArray'](_0x3c94f3))for(let _0x560314 of _0x3c94f3){(_0x5bdf07['startsWith'](_0x560314)||_0x5bdf07['endsWith'](_0x560314))&&(_0x2398ea=trimOneCharacter(_0x5bdf07,_0x560314));}else _0x2398ea=trimOneCharacter(_0x5bdf07,_0x3c94f3);return _0x2398ea;}__name(trimCharacter,'trimCharacter');function trimOneCharacter(_0x570359,_0x5bfc85){let _0x4ce84c=_0x570359;return _0x4ce84c?.['startsWith'](_0x5bfc85)&&(_0x4ce84c=_0x4ce84c['substring'](0xf08+0x2150+-0x3057)),_0x4ce84c?.['endsWith'](_0x5bfc85)&&(_0x4ce84c=_0x4ce84c['substring'](-0x1f45+-0x4e+0x89*0x3b,_0x4ce84c['lastIndexOf'](_0x5bfc85))),_0x4ce84c;}__name(trimOneCharacter,'trimOneCharacter');
7
+ var __defProp=Object['defineProperty'],__name=(_0x560ffd,_0x52b4ed)=>__defProp(_0x560ffd,'name',{'value':_0x52b4ed,'configurable':!![]});function shortenWithEllipsis(_0x35a423,_0x3ba2be=stringsConstants.shortTextLength){if(valueCheckingFunctions.isNullOrUndefined(_0x35a423))return '';return _0x35a423['length']<-0x5f2*0x5+0x50*0x3a+0xb9c?_0x35a423['length']<=_0x3ba2be?_0x35a423:_0x35a423['substring'](0x1241+0x1aed+0x1*-0x2d2e,_0x3ba2be):_0x35a423['length']<=_0x3ba2be?_0x35a423:_0x35a423['substring'](0x198b+-0x589*-0x6+-0x485*0xd,_0x3ba2be-(0x3*0xbf8+0x133*-0x1c+0x1*-0x253))+stringsConstants.ellipsis;}__name(shortenWithEllipsis,'shortenWithEllipsis');function trimCharacter(_0x2194a9,_0xc1b118){let _0x22d4f5=_0x2194a9;if(Array['isArray'](_0xc1b118))for(let _0x989059 of _0xc1b118){(_0x2194a9['startsWith'](_0x989059)||_0x2194a9['endsWith'](_0x989059))&&(_0x22d4f5=trimOneCharacter(_0x2194a9,_0x989059));}else _0x22d4f5=trimOneCharacter(_0x2194a9,_0xc1b118);return _0x22d4f5;}__name(trimCharacter,'trimCharacter');function trimOneCharacter(_0x14cafe,_0x389541){let _0x1657f5=_0x14cafe;return _0x1657f5?.['startsWith'](_0x389541)&&(_0x1657f5=_0x1657f5['substring'](-0x8bd*0x2+-0xce*0x18+0x24cb)),_0x1657f5?.['endsWith'](_0x389541)&&(_0x1657f5=_0x1657f5['substring'](-0x259*-0x7+-0x1195*0x1+0x126,_0x1657f5['lastIndexOf'](_0x389541))),_0x1657f5;}__name(trimOneCharacter,'trimOneCharacter');
8
8
 
9
9
  exports.shortenWithEllipsis = shortenWithEllipsis;
10
10
  exports.trimCharacter = trimCharacter;
@@ -2,6 +2,6 @@
2
2
  import { shortTextLength, ellipsis } from './strings-constants.js';
3
3
  import { isNullOrUndefined } from '../functions/value-checking-functions.js';
4
4
 
5
- var __defProp=Object['defineProperty'],__name=(_0x381f10,_0x552758)=>__defProp(_0x381f10,'name',{'value':_0x552758,'configurable':!![]});function shortenWithEllipsis(_0x5a88a0,_0x437757=shortTextLength){if(isNullOrUndefined(_0x5a88a0))return '';return _0x5a88a0['length']<0xaa8*0x3+-0x2237+0x241?_0x5a88a0['length']<=_0x437757?_0x5a88a0:_0x5a88a0['substring'](0xa8*-0x33+-0x382*0x6+0x3684,_0x437757):_0x5a88a0['length']<=_0x437757?_0x5a88a0:_0x5a88a0['substring'](0x1dda+-0x1fc2+0x7a*0x4,_0x437757-(0x1*0x1dff+0x1b89+-0x3987))+ellipsis;}__name(shortenWithEllipsis,'shortenWithEllipsis');function trimCharacter(_0x5bdf07,_0x3c94f3){let _0x2398ea=_0x5bdf07;if(Array['isArray'](_0x3c94f3))for(let _0x560314 of _0x3c94f3){(_0x5bdf07['startsWith'](_0x560314)||_0x5bdf07['endsWith'](_0x560314))&&(_0x2398ea=trimOneCharacter(_0x5bdf07,_0x560314));}else _0x2398ea=trimOneCharacter(_0x5bdf07,_0x3c94f3);return _0x2398ea;}__name(trimCharacter,'trimCharacter');function trimOneCharacter(_0x570359,_0x5bfc85){let _0x4ce84c=_0x570359;return _0x4ce84c?.['startsWith'](_0x5bfc85)&&(_0x4ce84c=_0x4ce84c['substring'](0xf08+0x2150+-0x3057)),_0x4ce84c?.['endsWith'](_0x5bfc85)&&(_0x4ce84c=_0x4ce84c['substring'](-0x1f45+-0x4e+0x89*0x3b,_0x4ce84c['lastIndexOf'](_0x5bfc85))),_0x4ce84c;}__name(trimOneCharacter,'trimOneCharacter');
5
+ var __defProp=Object['defineProperty'],__name=(_0x560ffd,_0x52b4ed)=>__defProp(_0x560ffd,'name',{'value':_0x52b4ed,'configurable':!![]});function shortenWithEllipsis(_0x35a423,_0x3ba2be=shortTextLength){if(isNullOrUndefined(_0x35a423))return '';return _0x35a423['length']<-0x5f2*0x5+0x50*0x3a+0xb9c?_0x35a423['length']<=_0x3ba2be?_0x35a423:_0x35a423['substring'](0x1241+0x1aed+0x1*-0x2d2e,_0x3ba2be):_0x35a423['length']<=_0x3ba2be?_0x35a423:_0x35a423['substring'](0x198b+-0x589*-0x6+-0x485*0xd,_0x3ba2be-(0x3*0xbf8+0x133*-0x1c+0x1*-0x253))+ellipsis;}__name(shortenWithEllipsis,'shortenWithEllipsis');function trimCharacter(_0x2194a9,_0xc1b118){let _0x22d4f5=_0x2194a9;if(Array['isArray'](_0xc1b118))for(let _0x989059 of _0xc1b118){(_0x2194a9['startsWith'](_0x989059)||_0x2194a9['endsWith'](_0x989059))&&(_0x22d4f5=trimOneCharacter(_0x2194a9,_0x989059));}else _0x22d4f5=trimOneCharacter(_0x2194a9,_0xc1b118);return _0x22d4f5;}__name(trimCharacter,'trimCharacter');function trimOneCharacter(_0x14cafe,_0x389541){let _0x1657f5=_0x14cafe;return _0x1657f5?.['startsWith'](_0x389541)&&(_0x1657f5=_0x1657f5['substring'](-0x8bd*0x2+-0xce*0x18+0x24cb)),_0x1657f5?.['endsWith'](_0x389541)&&(_0x1657f5=_0x1657f5['substring'](-0x259*-0x7+-0x1195*0x1+0x126,_0x1657f5['lastIndexOf'](_0x389541))),_0x1657f5;}__name(trimOneCharacter,'trimOneCharacter');
6
6
 
7
7
  export { shortenWithEllipsis, trimCharacter };
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
  'use strict';
3
3
 
4
- var __defProp=Object['defineProperty'],__name=(_0x27a31b,_0x418eb4)=>__defProp(_0x27a31b,'name',{'value':_0x418eb4,'configurable':!![]});function ensureString(_0x371ad8){return isString(_0x371ad8)?_0x371ad8:String(_0x371ad8);}__name(ensureString,'ensureString');function ensureNumber(_0x3ce0df){if(isNumber(_0x3ce0df))return _0x3ce0df;else {if(isString(_0x3ce0df))return parseFloat(_0x3ce0df);else return NaN;}}__name(ensureNumber,'ensureNumber');function ensureObjectArray(_0x3ba1fa){if(Array['isArray'](_0x3ba1fa)&&_0x3ba1fa['length']>0x104e+-0x23a4+0x1356&&isObject(_0x3ba1fa[0x1d18+0x44c+-0x10b2*0x2])){const _0x316e07=[];for(const _0x4bc5d4 of _0x3ba1fa){if(isObject(_0x4bc5d4))_0x316e07['push'](_0x4bc5d4);}return _0x316e07;}return [];}__name(ensureObjectArray,'ensureObjectArray');function ensureWithIndexer(_0x5a9c17){let _0xd70201={};return isWithIndexer(_0x5a9c17)&&(_0xd70201=_0x5a9c17),_0xd70201;}__name(ensureWithIndexer,'ensureWithIndexer');function ensureWithIndexerArray(_0x273f2f){if(Array['isArray'](_0x273f2f))return _0x273f2f['filter'](isWithIndexer);if(isWithIndexer(_0x273f2f))return [_0x273f2f];return [];}__name(ensureWithIndexerArray,'ensureWithIndexerArray');const types={'object':'object','string':'string','number':'number'};const stripeConflictResponseProperties={'detail':'detail'};function isObject(_0x2c0799){return typeof _0x2c0799===types['object']&&_0x2c0799!==null;}__name(isObject,'isObject');function isString(_0x54434c){return typeof _0x54434c===types['string'];}__name(isString,'isString');function isNumber(_0x147071){return typeof _0x147071===types['number'];}__name(isNumber,'isNumber');function isError(_0x5e5857){return typeof _0x5e5857===types['object'];}__name(isError,'isError');function isKeyof(_0x23e38d,_0xb9b670){return isObject(_0x23e38d)&&_0xb9b670 in _0x23e38d;}__name(isKeyof,'isKeyof');function isWithIndexer(_0x2b8142){return isObject(_0x2b8142)&&!Array['isArray'](_0x2b8142);}__name(isWithIndexer,'isWithIndexer');function isArray(_0x494ac0){return isObject(_0x494ac0)&&Array['isArray'](_0x494ac0);}__name(isArray,'isArray');function isErrorResponseWithDetail(_0x3c47c9){return isObject(_0x3c47c9)&&stripeConflictResponseProperties['detail']in _0x3c47c9;}__name(isErrorResponseWithDetail,'isErrorResponseWithDetail');function isBoolean(_0x4073ba){return typeof _0x4073ba==='boolean';}__name(isBoolean,'isBoolean');function isDate(_0x45ffdc){return _0x45ffdc instanceof Date;}__name(isDate,'isDate');
4
+ var __defProp=Object['defineProperty'],__name=(_0x31f528,_0x386541)=>__defProp(_0x31f528,'name',{'value':_0x386541,'configurable':!![]});function ensureString(_0x1de962){return isString(_0x1de962)?_0x1de962:String(_0x1de962);}__name(ensureString,'ensureString');function ensureNumber(_0x19bb89){if(isNumber(_0x19bb89))return _0x19bb89;else {if(isString(_0x19bb89))return parseFloat(_0x19bb89);else return NaN;}}__name(ensureNumber,'ensureNumber');function ensureObjectArray(_0x4fa953){if(Array['isArray'](_0x4fa953)&&_0x4fa953['length']>0x1787+-0x12df+-0x4a8&&isObject(_0x4fa953[-0x3*-0x6ec+-0x66+-0x145e])){const _0x6b2b2b=[];for(const _0x3d866a of _0x4fa953){if(isObject(_0x3d866a))_0x6b2b2b['push'](_0x3d866a);}return _0x6b2b2b;}return [];}__name(ensureObjectArray,'ensureObjectArray');function ensureWithIndexer(_0x48b3ca){let _0x5c4803={};return isWithIndexer(_0x48b3ca)&&(_0x5c4803=_0x48b3ca),_0x5c4803;}__name(ensureWithIndexer,'ensureWithIndexer');function ensureWithIndexerArray(_0x5bb748){if(Array['isArray'](_0x5bb748))return _0x5bb748['filter'](isWithIndexer);if(isWithIndexer(_0x5bb748))return [_0x5bb748];return [];}__name(ensureWithIndexerArray,'ensureWithIndexerArray');const types={'object':'object','string':'string','number':'number'};const stripeConflictResponseProperties={'detail':'detail'};function isObject(_0x1665dd){return typeof _0x1665dd===types['object']&&_0x1665dd!==null;}__name(isObject,'isObject');function isString(_0x4771f0){return typeof _0x4771f0===types['string'];}__name(isString,'isString');function isNumber(_0x14abfe){return typeof _0x14abfe===types['number'];}__name(isNumber,'isNumber');function isError(_0x5c7e65){return typeof _0x5c7e65===types['object'];}__name(isError,'isError');function isKeyof(_0x302c64,_0x28a382){return isObject(_0x302c64)&&_0x28a382 in _0x302c64;}__name(isKeyof,'isKeyof');function isWithIndexer(_0x25d27d){return isObject(_0x25d27d)&&!Array['isArray'](_0x25d27d);}__name(isWithIndexer,'isWithIndexer');function isArray(_0x10cdfb){return isObject(_0x10cdfb)&&Array['isArray'](_0x10cdfb);}__name(isArray,'isArray');function isErrorResponseWithDetail(_0x5c06a7){return isObject(_0x5c06a7)&&stripeConflictResponseProperties['detail']in _0x5c06a7;}__name(isErrorResponseWithDetail,'isErrorResponseWithDetail');function isBoolean(_0x2780d2){return typeof _0x2780d2==='boolean';}__name(isBoolean,'isBoolean');function isDate(_0x2058a1){return _0x2058a1 instanceof Date;}__name(isDate,'isDate');
5
5
 
6
6
  exports.ensureNumber = ensureNumber;
7
7
  exports.ensureObjectArray = ensureObjectArray;
@@ -1,4 +1,4 @@
1
1
  'use strict';
2
- var __defProp=Object['defineProperty'],__name=(_0x27a31b,_0x418eb4)=>__defProp(_0x27a31b,'name',{'value':_0x418eb4,'configurable':!![]});function ensureString(_0x371ad8){return isString(_0x371ad8)?_0x371ad8:String(_0x371ad8);}__name(ensureString,'ensureString');function ensureNumber(_0x3ce0df){if(isNumber(_0x3ce0df))return _0x3ce0df;else {if(isString(_0x3ce0df))return parseFloat(_0x3ce0df);else return NaN;}}__name(ensureNumber,'ensureNumber');function ensureObjectArray(_0x3ba1fa){if(Array['isArray'](_0x3ba1fa)&&_0x3ba1fa['length']>0x104e+-0x23a4+0x1356&&isObject(_0x3ba1fa[0x1d18+0x44c+-0x10b2*0x2])){const _0x316e07=[];for(const _0x4bc5d4 of _0x3ba1fa){if(isObject(_0x4bc5d4))_0x316e07['push'](_0x4bc5d4);}return _0x316e07;}return [];}__name(ensureObjectArray,'ensureObjectArray');function ensureWithIndexer(_0x5a9c17){let _0xd70201={};return isWithIndexer(_0x5a9c17)&&(_0xd70201=_0x5a9c17),_0xd70201;}__name(ensureWithIndexer,'ensureWithIndexer');function ensureWithIndexerArray(_0x273f2f){if(Array['isArray'](_0x273f2f))return _0x273f2f['filter'](isWithIndexer);if(isWithIndexer(_0x273f2f))return [_0x273f2f];return [];}__name(ensureWithIndexerArray,'ensureWithIndexerArray');const types={'object':'object','string':'string','number':'number'};const stripeConflictResponseProperties={'detail':'detail'};function isObject(_0x2c0799){return typeof _0x2c0799===types['object']&&_0x2c0799!==null;}__name(isObject,'isObject');function isString(_0x54434c){return typeof _0x54434c===types['string'];}__name(isString,'isString');function isNumber(_0x147071){return typeof _0x147071===types['number'];}__name(isNumber,'isNumber');function isError(_0x5e5857){return typeof _0x5e5857===types['object'];}__name(isError,'isError');function isKeyof(_0x23e38d,_0xb9b670){return isObject(_0x23e38d)&&_0xb9b670 in _0x23e38d;}__name(isKeyof,'isKeyof');function isWithIndexer(_0x2b8142){return isObject(_0x2b8142)&&!Array['isArray'](_0x2b8142);}__name(isWithIndexer,'isWithIndexer');function isArray(_0x494ac0){return isObject(_0x494ac0)&&Array['isArray'](_0x494ac0);}__name(isArray,'isArray');function isErrorResponseWithDetail(_0x3c47c9){return isObject(_0x3c47c9)&&stripeConflictResponseProperties['detail']in _0x3c47c9;}__name(isErrorResponseWithDetail,'isErrorResponseWithDetail');function isBoolean(_0x4073ba){return typeof _0x4073ba==='boolean';}__name(isBoolean,'isBoolean');function isDate(_0x45ffdc){return _0x45ffdc instanceof Date;}__name(isDate,'isDate');
2
+ var __defProp=Object['defineProperty'],__name=(_0x31f528,_0x386541)=>__defProp(_0x31f528,'name',{'value':_0x386541,'configurable':!![]});function ensureString(_0x1de962){return isString(_0x1de962)?_0x1de962:String(_0x1de962);}__name(ensureString,'ensureString');function ensureNumber(_0x19bb89){if(isNumber(_0x19bb89))return _0x19bb89;else {if(isString(_0x19bb89))return parseFloat(_0x19bb89);else return NaN;}}__name(ensureNumber,'ensureNumber');function ensureObjectArray(_0x4fa953){if(Array['isArray'](_0x4fa953)&&_0x4fa953['length']>0x1787+-0x12df+-0x4a8&&isObject(_0x4fa953[-0x3*-0x6ec+-0x66+-0x145e])){const _0x6b2b2b=[];for(const _0x3d866a of _0x4fa953){if(isObject(_0x3d866a))_0x6b2b2b['push'](_0x3d866a);}return _0x6b2b2b;}return [];}__name(ensureObjectArray,'ensureObjectArray');function ensureWithIndexer(_0x48b3ca){let _0x5c4803={};return isWithIndexer(_0x48b3ca)&&(_0x5c4803=_0x48b3ca),_0x5c4803;}__name(ensureWithIndexer,'ensureWithIndexer');function ensureWithIndexerArray(_0x5bb748){if(Array['isArray'](_0x5bb748))return _0x5bb748['filter'](isWithIndexer);if(isWithIndexer(_0x5bb748))return [_0x5bb748];return [];}__name(ensureWithIndexerArray,'ensureWithIndexerArray');const types={'object':'object','string':'string','number':'number'};const stripeConflictResponseProperties={'detail':'detail'};function isObject(_0x1665dd){return typeof _0x1665dd===types['object']&&_0x1665dd!==null;}__name(isObject,'isObject');function isString(_0x4771f0){return typeof _0x4771f0===types['string'];}__name(isString,'isString');function isNumber(_0x14abfe){return typeof _0x14abfe===types['number'];}__name(isNumber,'isNumber');function isError(_0x5c7e65){return typeof _0x5c7e65===types['object'];}__name(isError,'isError');function isKeyof(_0x302c64,_0x28a382){return isObject(_0x302c64)&&_0x28a382 in _0x302c64;}__name(isKeyof,'isKeyof');function isWithIndexer(_0x25d27d){return isObject(_0x25d27d)&&!Array['isArray'](_0x25d27d);}__name(isWithIndexer,'isWithIndexer');function isArray(_0x10cdfb){return isObject(_0x10cdfb)&&Array['isArray'](_0x10cdfb);}__name(isArray,'isArray');function isErrorResponseWithDetail(_0x5c06a7){return isObject(_0x5c06a7)&&stripeConflictResponseProperties['detail']in _0x5c06a7;}__name(isErrorResponseWithDetail,'isErrorResponseWithDetail');function isBoolean(_0x2780d2){return typeof _0x2780d2==='boolean';}__name(isBoolean,'isBoolean');function isDate(_0x2058a1){return _0x2058a1 instanceof Date;}__name(isDate,'isDate');
3
3
 
4
4
  export { ensureNumber, ensureObjectArray, ensureString, ensureWithIndexer, ensureWithIndexerArray, isArray, isBoolean, isDate, isError, isErrorResponseWithDetail, isKeyof, isNumber, isObject, isString, isWithIndexer, stripeConflictResponseProperties, types };
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
  'use strict';
3
3
 
4
- var __defProp=Object['defineProperty'],__name=(_0x9f8462,_0x2ca881)=>__defProp(_0x9f8462,'name',{'value':_0x2ca881,'configurable':!![]});const nameOf=__name(_0xc26183=>_0xc26183['toString'](),'nameOf');const deepNameOf=__name((_0x184142,_0x836fd3)=>_0x184142+'.'+_0x836fd3,'deepNameOf');const nameOfWithType=__name(_0xdd1ea5=>_0xdd1ea5,'nameOfWithType');
4
+ var __defProp=Object['defineProperty'],__name=(_0x499a2e,_0x7209e5)=>__defProp(_0x499a2e,'name',{'value':_0x7209e5,'configurable':!![]});const nameOf=__name(_0x2e3252=>_0x2e3252['toString'](),'nameOf');const deepNameOf=__name((_0x2b0cb9,_0x1aa443)=>_0x2b0cb9+'.'+_0x1aa443,'deepNameOf');const nameOfWithType=__name(_0x5f30a4=>_0x5f30a4,'nameOfWithType');
5
5
 
6
6
  exports.deepNameOf = deepNameOf;
7
7
  exports.nameOf = nameOf;
@@ -1,4 +1,4 @@
1
1
  'use strict';
2
- var __defProp=Object['defineProperty'],__name=(_0x9f8462,_0x2ca881)=>__defProp(_0x9f8462,'name',{'value':_0x2ca881,'configurable':!![]});const nameOf=__name(_0xc26183=>_0xc26183['toString'](),'nameOf');const deepNameOf=__name((_0x184142,_0x836fd3)=>_0x184142+'.'+_0x836fd3,'deepNameOf');const nameOfWithType=__name(_0xdd1ea5=>_0xdd1ea5,'nameOfWithType');
2
+ var __defProp=Object['defineProperty'],__name=(_0x499a2e,_0x7209e5)=>__defProp(_0x499a2e,'name',{'value':_0x7209e5,'configurable':!![]});const nameOf=__name(_0x2e3252=>_0x2e3252['toString'](),'nameOf');const deepNameOf=__name((_0x2b0cb9,_0x1aa443)=>_0x2b0cb9+'.'+_0x1aa443,'deepNameOf');const nameOfWithType=__name(_0x5f30a4=>_0x5f30a4,'nameOfWithType');
3
3
 
4
4
  export { deepNameOf, nameOf, nameOfWithType };
@@ -3,7 +3,7 @@
3
3
 
4
4
  var nameOf = require('../core/name-of.cjs.js');
5
5
 
6
- var __defProp=Object['defineProperty'],__name=(_0x2c85d2,_0x7b702b)=>__defProp(_0x2c85d2,'name',{'value':_0x7b702b,'configurable':!![]});const withIdProps={'id':nameOf.nameOf('id')};function isResourceWithId(_0x291e58){return _0x291e58&&typeof _0x291e58==='object'&&typeof _0x291e58['id']==='string';}__name(isResourceWithId,'isResourceWithId');
6
+ var __defProp=Object['defineProperty'],__name=(_0x518b84,_0x1a315a)=>__defProp(_0x518b84,'name',{'value':_0x1a315a,'configurable':!![]});const withIdProps={'id':nameOf.nameOf('id')};function isResourceWithId(_0x3d7178){return _0x3d7178&&typeof _0x3d7178==='object'&&typeof _0x3d7178['id']==='string';}__name(isResourceWithId,'isResourceWithId');
7
7
 
8
8
  exports.isResourceWithId = isResourceWithId;
9
9
  exports.withIdProps = withIdProps;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  import { nameOf } from '../core/name-of.js';
3
3
 
4
- var __defProp=Object['defineProperty'],__name=(_0x2c85d2,_0x7b702b)=>__defProp(_0x2c85d2,'name',{'value':_0x7b702b,'configurable':!![]});const withIdProps={'id':nameOf('id')};function isResourceWithId(_0x291e58){return _0x291e58&&typeof _0x291e58==='object'&&typeof _0x291e58['id']==='string';}__name(isResourceWithId,'isResourceWithId');
4
+ var __defProp=Object['defineProperty'],__name=(_0x518b84,_0x1a315a)=>__defProp(_0x518b84,'name',{'value':_0x1a315a,'configurable':!![]});const withIdProps={'id':nameOf('id')};function isResourceWithId(_0x3d7178){return _0x3d7178&&typeof _0x3d7178==='object'&&typeof _0x3d7178['id']==='string';}__name(isResourceWithId,'isResourceWithId');
5
5
 
6
6
  export { isResourceWithId, withIdProps };
@@ -5,4 +5,4 @@
5
5
  var commander = require('commander');
6
6
  var create = require('../create/bin/create.cjs.js');
7
7
 
8
- 'use strict';const program=new commander.Command();program['command']('create\x20<folder>')['option']('-r,\x20--repo','Enable\x20repo\x20mode')['description']('Create\x20a\x20new\x20SaaS\x20Kit\x20project')['action']((_0x435028,_0x133a7a)=>{const _0x504609=[_0x435028];if(_0x133a7a['repo'])_0x504609['push']('-r');create.create(_0x504609);}),program['parse'](process['argv']);
8
+ 'use strict';const program=new commander.Command();program['command']('create\x20<folder>')['option']('-r,\x20--repo','Enable\x20repo\x20mode')['description']('Create\x20a\x20new\x20SaaS\x20Kit\x20project')['action']((_0x4b6271,_0x234490)=>{const _0x4329e5=[_0x4b6271];if(_0x234490['repo'])_0x4329e5['push']('-r');create.create(_0x4329e5);}),program['parse'](process['argv']);
@@ -3,4 +3,4 @@
3
3
  import { Command } from 'commander';
4
4
  import { create } from '../create/bin/create.js';
5
5
 
6
- 'use strict';const program=new Command();program['command']('create\x20<folder>')['option']('-r,\x20--repo','Enable\x20repo\x20mode')['description']('Create\x20a\x20new\x20SaaS\x20Kit\x20project')['action']((_0x435028,_0x133a7a)=>{const _0x504609=[_0x435028];if(_0x133a7a['repo'])_0x504609['push']('-r');create(_0x504609);}),program['parse'](process['argv']);
6
+ 'use strict';const program=new Command();program['command']('create\x20<folder>')['option']('-r,\x20--repo','Enable\x20repo\x20mode')['description']('Create\x20a\x20new\x20SaaS\x20Kit\x20project')['action']((_0x4b6271,_0x234490)=>{const _0x4329e5=[_0x4b6271];if(_0x234490['repo'])_0x4329e5['push']('-r');create(_0x4329e5);}),program['parse'](process['argv']);
@@ -4,8 +4,8 @@
4
4
  var child_process = require('child_process');
5
5
  var fs = require('fs');
6
6
  var node_url = require('node:url');
7
- var _0x1aa6b6 = require('path');
8
- var _0x41fbd6 = require('node:fs');
7
+ var _0x2657b6 = require('path');
8
+ var _0x4e9839 = require('node:fs');
9
9
  var createAppConstants = require('../../../../base-repo/constants/create-app-constants.cjs.js');
10
10
  var loggers = require('../../../../fd-toolbox/logging/loggers.cjs.js');
11
11
  var constants = require('../../../../fd-toolbox/constants/constants.cjs.js');
@@ -35,8 +35,8 @@ function _interopNamespaceDefault(e) {
35
35
  return Object.freeze(n);
36
36
  }
37
37
 
38
- var _0x1aa6b6__namespace = /*#__PURE__*/_interopNamespaceDefault(_0x1aa6b6);
38
+ var _0x2657b6__namespace = /*#__PURE__*/_interopNamespaceDefault(_0x2657b6);
39
39
 
40
- var __defProp=Object['defineProperty'],__name=(_0x21468c,_0x37691d)=>__defProp(_0x21468c,'name',{'value':_0x37691d,'configurable':!![]});const requiredNodeVersion='v20.0.0';process['version']<requiredNodeVersion&&(loggers.logStringError('Node.js\x20'+requiredNodeVersion+'+\x20is\x20required'),process['exit'](0x1c5a+0x20d2+0x1*-0x3d2b));const filename=node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('level2/cli/create/bin/create.cjs.js', document.baseURI).href))),sourceDir='../../../../',binDir=_0x1aa6b6__namespace['dirname'](filename),repoRoot=_0x1aa6b6__namespace['resolve'](binDir,sourceDir),envLocalPath=_0x1aa6b6__namespace['join'](binDir,''+sourceDir+projectPaths.folders['cli']+'/'+projectPaths.files['envExample']),envTemplate=_0x41fbd6['readFileSync'](envLocalPath,'utf8'),foldersToIgnore=[projectPaths.folders['cli']+'/'+projectPaths.folders['constants'],projectPaths.folders['cli']+'/'+projectPaths.files['packageTemplate'],projectPaths.folders['cli']+'/'+projectPaths.files['envExample'],projectPaths.folders['cli']+'/'+projectPaths.folders['bin'],projectPaths.folders['cli']+'/'+projectPaths.folders['configs']];function runCommand(_0x278bc1,_0x21dbad){loggers.logInfoRaw('Executing:\x20'+_0x278bc1);try{child_process.execSync(_0x278bc1,{'stdio':'inherit','cwd':_0x21dbad??process['cwd']()});}catch(_0x349a38){const _0x36e922=_0x349a38 instanceof Error?_0x349a38['message']:'Unknown\x20error';loggers.logStringError('Error\x20executing:\x20'+_0x278bc1),loggers.logStringError(_0x36e922),process['exit'](0x224d*0x1+0xc9*-0x31+0x42d);}}__name(runCommand,'runCommand');function checkTargetFolder(_0x431f06){fs.existsSync(_0x431f06)&&(loggers.logStringError('Error:\x20Folder\x20\x22'+_0x1aa6b6__namespace['basename'](_0x431f06)+'\x22\x20already\x20exists.'),process['exit'](-0x6*0x431+-0x6d9+-0x4*-0x800));}__name(checkTargetFolder,'checkTargetFolder');function getCreateNextAppVersion(){const _0x3bc958=_0x1aa6b6__namespace['resolve'](repoRoot,projectPaths.files['packageJson']),_0x5e7c1e=JSON['parse'](_0x41fbd6['readFileSync'](_0x3bc958,'utf-8'));return String(_0x5e7c1e['devDependencies']?.['next']??_0x5e7c1e['dependencies']?.['next']??'latest');}__name(getCreateNextAppVersion,'getCreateNextAppVersion');function createNextProject(_0x166814,_0x46f83a){loggers.logInfoRaw('Creating\x20Next.js\x20project...');const _0x325f03=getCreateNextAppVersion(),_0x263720=['npx\x20--yes\x20create-next-app@'+_0x325f03+'\x20\x22'+_0x166814+'\x22','--typescript','--tailwind','--eslint','--app','--src-dir','--turbopack','--no-import-alias','--no-git','--react-compiler']['join']('\x20');runCommand(_0x263720,_0x1aa6b6__namespace['dirname'](_0x46f83a)),loggers.logInfoRaw('Next.js\x20project\x20created!');const _0xa441dd=_0x1aa6b6__namespace['join'](_0x46f83a,'next.config.ts');_0x41fbd6['existsSync'](_0xa441dd)&&(_0x41fbd6['rmSync'](_0xa441dd),loggers.logInfoRaw('Removed\x20default\x20next.config.ts'));}__name(createNextProject,'createNextProject');async function createEnvFile(_0x2dd8f7){loggers.logInfoRaw('Creating\x20'+projectPaths.files['env']+'\x20file\x20with\x20default\x20values...');const _0x30f0b0=_0x1aa6b6__namespace['join'](_0x2dd8f7,projectPaths.files['env']);try{await fs.promises['writeFile'](_0x30f0b0,envTemplate,'utf8'),loggers.logInfoRaw(projectPaths.files['env']+'\x20file\x20created\x20with\x20values!');}catch(_0x43ca1b){const _0x119b3a=_0x43ca1b instanceof Error?_0x43ca1b['message']:'Unknown\x20error';loggers.logStringError('Error\x20creating\x20'+projectPaths.files['env']+'\x20file:'),loggers.logStringError(_0x119b3a);throw _0x43ca1b;}}__name(createEnvFile,'createEnvFile');async function overridePackageJson(_0x5021e1){const _0x30a11d=_0x1aa6b6__namespace['join'](_0x5021e1,projectPaths.files['packageJson']),_0x939518=_0x1aa6b6__namespace['join'](repoRoot,projectPaths.folders['cli']+'/'+projectPaths.files['packageTemplate']);try{const _0x1e0aff=JSON['parse'](await fs.promises['readFile'](_0x30a11d,'utf8')),_0xb6793d=_0x1e0aff['name'],_0x511ba1=JSON['parse'](await fs.promises['readFile'](_0x939518,'utf8')),_0x14eb6c={..._0x511ba1,'name':_0xb6793d};await fs.promises['writeFile'](_0x30a11d,JSON['stringify'](_0x14eb6c,null,0x25*0xd7+-0xb4a+0x3d*-0x53)+'\x0a','utf8');}catch(_0x38b540){const _0x20ab3d=_0x38b540 instanceof Error?_0x38b540['message']:'Unknown\x20error';loggers.logStringError('Error\x20overriding\x20'+projectPaths.files['packageJson']+':'),loggers.logStringError(_0x20ab3d);throw _0x38b540;}}__name(overridePackageJson,'overridePackageJson');function replaceImports(_0x359a82){const _0x2b48fb=/(import\s+)([^'"]+)(\s+from\s+["'])([^"']+)(["'])/g;return _0x359a82['replace'](_0x2b48fb,(_0x3bc804,_0x818e8f,_0x9a9bdd,_0x281c8a,_0x242d27,_0x309071)=>{if(!_0x242d27['startsWith'](aliases.aliasSymbols['atSign'])||_0x242d27['startsWith'](packages.npmPackages['saasKit']))return _0x3bc804;let _0xeabf6e;_0x242d27['startsWith'](aliases.aliasSymbols['atSign']+projectPaths.folders['server'])||_0x242d27['includes'](''+projectPaths.nonRootProjectPaths['server'])?_0xeabf6e=packages.npmPackages['saasKitServer']:_0xeabf6e=packages.npmPackages['saasKit'];let _0x4d669e=_0x9a9bdd['trim']();const _0x36de59=/^type\b/['test'](_0x4d669e),_0x481343=/^\*\s+as\s+/['test'](_0x4d669e);return !_0x36de59&&!_0x481343&&!_0x4d669e['startsWith']('{')&&(_0x4d669e='{\x20'+_0x4d669e+'\x20}'),''+_0x818e8f+_0x4d669e+_0x281c8a+_0xeabf6e+_0x309071;});}__name(replaceImports,'replaceImports');async function copyProjectFiles(_0x338f70){loggers.logInfoRaw('Copying\x20'+constants.projectName+'\x20files...');for(const _0x4f1ecb of path.allFilesToCopy){const _0x191773=projectPaths.folders['cli']+'/'+_0x4f1ecb,_0x374858=_0x1aa6b6__namespace['join'](repoRoot,_0x191773),_0x47f44f=replaceToolsFolder(_0x4f1ecb),_0x5c544e=_0x1aa6b6__namespace['join'](_0x338f70,_0x47f44f);if(fs.existsSync(_0x374858)){const _0xc41733=await fs.promises['stat'](_0x374858);_0xc41733['isDirectory']()?await copyDirectoryContents(_0x374858,_0x5c544e):await copyAndProcessFile(_0x374858,_0x5c544e);}else loggers.logInfoRaw('Source\x20file\x20not\x20found:\x20'+_0x191773);}loggers.logInfoRaw('Files\x20copied\x20and\x20imports\x20updated!');}__name(copyProjectFiles,'copyProjectFiles');function replaceToolsFolder(_0x78e40d){let _0x184456=_0x78e40d;for(const [_0xeedbb2,_0x13fd8a]of Object['entries'](createAppConstants.toolsFoldersToReplace)){if(_0x184456['startsWith'](_0xeedbb2)&&ensureType.isWithIndexer(_0x13fd8a)){const _0x4165ab=_0x13fd8a;for(const _0x2ca6a8 in _0x4165ab){const _0x924dad=_0x4165ab[_0x2ca6a8];ensureType.isString(_0x924dad)&&(_0x184456=_0x184456['replace'](_0x2ca6a8,_0x924dad));}break;}}return _0x184456;}__name(replaceToolsFolder,'replaceToolsFolder');function shouldIgnorePath(_0x25cc0b,_0x1c11e1,_0x480b0e=![]){const _0x1eec06=_0x1aa6b6__namespace['relative'](repoRoot,_0x25cc0b)['replace'](/\\/g,'/'),_0x3fe5f9=foldersToIgnore['map'](_0x1cf4d6=>_0x1cf4d6['replace'](/\\/g,'/'));if(_0x3fe5f9['includes'](_0x1eec06))return !![];if(_0x480b0e){const _0x294d78=_0x1aa6b6__namespace['relative'](_0x1c11e1,_0x25cc0b)['replace'](/\\/g,'/'),_0x5535ab=_0x294d78['split']('/');return _0x3fe5f9['some'](_0x45ea6d=>_0x5535ab['some'](_0x118365=>_0x118365===_0x45ea6d));}return ![];}__name(shouldIgnorePath,'shouldIgnorePath');async function copyDirectoryContents(_0x4ebffa,_0x3b411a){!fs.existsSync(_0x3b411a)&&fs.mkdirSync(_0x3b411a,{'recursive':!![]});try{const _0x6a8efa=await fs.promises['readdir'](_0x4ebffa,{'withFileTypes':!![]});for(const _0x14d42d of _0x6a8efa){const _0x39f53f=_0x1aa6b6__namespace['join'](_0x4ebffa,_0x14d42d['name']),_0x5f2246=_0x1aa6b6__namespace['join'](_0x3b411a,_0x14d42d['name']);!shouldIgnorePath(_0x39f53f,_0x4ebffa,_0x14d42d['isDirectory']())&&(_0x14d42d['isDirectory']()?await copyDirectoryContents(_0x39f53f,_0x5f2246):await copyAndProcessFile(_0x39f53f,_0x5f2246));}}catch(_0x514b57){const _0x4a4a6f=_0x514b57 instanceof Error?_0x514b57['message']:'Unknown\x20error';loggers.logStringError('Error\x20reading\x20directory\x20'+_0x4ebffa+':\x20'+_0x4a4a6f);throw _0x514b57;}}__name(copyDirectoryContents,'copyDirectoryContents');async function copyAndProcessFile(_0x3beba5,_0x227e1f){const _0x1a242a=_0x1aa6b6__namespace['dirname'](_0x227e1f);!fs.existsSync(_0x1a242a)&&fs.mkdirSync(_0x1a242a,{'recursive':!![]});const _0x474f04=await fs.promises['stat'](_0x3beba5);if(_0x474f04['isDirectory']())await copyDirectoryContents(_0x3beba5,_0x227e1f);else {const _0x2fd189=_0x1aa6b6__namespace['extname'](_0x3beba5)['toLowerCase'](),_0x354504=['.ico','.png','.jpg','.jpeg','.webp','.gif','.svg','.pdf'];if(_0x354504['includes'](_0x2fd189)){await fs.promises['copyFile'](_0x3beba5,_0x227e1f);return;}const _0x3cae32=await fs.promises['readFile'](_0x3beba5,'utf8'),_0x2ff221=replaceImports(_0x3cae32);await fs.promises['writeFile'](_0x227e1f,_0x2ff221,'utf8');}}__name(copyAndProcessFile,'copyAndProcessFile');function createAdditionalFolders(_0xea7641){for(const _0x2cc837 of createAppConstants.additionalFoldersToCreate){const _0x3492ea=_0x1aa6b6__namespace['join'](_0xea7641,_0x2cc837);!fs.existsSync(_0x3492ea)&&(fs.mkdirSync(_0x3492ea,{'recursive':!![]}),loggers.logInfoRaw('Created\x20folder:\x20'+_0x2cc837));}loggers.logInfoRaw('Additional\x20folders\x20created!');}__name(createAdditionalFolders,'createAdditionalFolders');async function setupPreCommitHooks(_0x106140){const _0x5dfd6e=_0x1aa6b6__namespace['join'](_0x106140,projectPaths.folders['husky']),_0x3a8501=_0x1aa6b6__namespace['join'](_0x5dfd6e,projectPaths.files['preCommit']),_0x3dbaf5=_0x1aa6b6__namespace['join'](_0x5dfd6e,projectPaths.files['commitMsg']);fs.mkdirSync(_0x5dfd6e,{'recursive':!![]}),await fs.promises['writeFile'](_0x3a8501,cliContents.cliScripts['preCommit'],'utf8'),await fs.promises['writeFile'](_0x3dbaf5,cliContents.cliScripts['commitMsg'],'utf8'),runCommand(cliContents.cliScripts['chmodPreCommit'],_0x106140),runCommand(cliContents.cliScripts['chmodCommitMsg'],_0x106140);}__name(setupPreCommitHooks,'setupPreCommitHooks');async function setupEslintConfig(_0x3347d2){const _0x1353cd=_0x1aa6b6__namespace['join'](_0x3347d2,projectPaths.files['eslintConfigMjs']);fs.existsSync(_0x1353cd)&&await fs.promises['rm'](_0x1353cd);const _0x2bc0f4=_0x1aa6b6__namespace['join'](_0x3347d2,projectPaths.files['eslintConfigJs']);await fs.promises['writeFile'](_0x2bc0f4,cliContents.cliEslintContent,'utf8');}__name(setupEslintConfig,'setupEslintConfig');async function enableRepoModeExtras(_0x3ab588){loggers.logInfoRaw('Enabling\x20recommendation\x20mode\x20(-r)...'),runCommand(cliContents.cliScripts['gitInit'],_0x3ab588),runCommand(cliContents.cliScripts['installDevHuskyTsx'],_0x3ab588),runCommand(cliContents.cliScripts['setLint'],_0x3ab588),runCommand(cliContents.cliScripts['installHusky'],_0x3ab588),await setupPreCommitHooks(_0x3ab588);}__name(enableRepoModeExtras,'enableRepoModeExtras');async function updateLayoutTitle(_0x3aa01f,_0x4ca4fa){const _0x87a866=_0x1aa6b6__namespace['join'](_0x3aa01f,projectPaths.projectPaths['app']+'/'+projectPaths.files['layout']);if(!fs.existsSync(_0x87a866))throw errors.createError(projectPaths.files['layout']+'\x20not\x20found\x20at\x20'+_0x87a866+',\x20cannot\x20update\x20title.');let _0x305dcd=await fs.promises['readFile'](_0x87a866,'utf8');const _0x30e313=/"SaaS Kit"/g;if(!_0x30e313['test'](_0x305dcd))throw errors.createError('SaaS\x20Kit\x20not\x20found\x20in\x20'+projectPaths.files['layout']+',\x20cannot\x20update\x20title.');_0x305dcd=_0x305dcd['replace'](_0x30e313,'\x22'+_0x4ca4fa+'\x22'),await fs.promises['writeFile'](_0x87a866,_0x305dcd,'utf8');}__name(updateLayoutTitle,'updateLayoutTitle');async function create(_0x58bf12){try{_0x58bf12['length']<0x26d0+0x142a+-0x3af9*0x1&&(loggers.logStringError('Error:\x20Specify\x20folder\x20name.\x20Example:\x20npx\x20create-saas-kit-app\x20<folder-name>'),process['exit'](0x33*-0x27+0x4c0*0x4+0x1*-0xb3a));const _0x2a606f=_0x58bf12[-0x1974+-0x137c+0x2cf0],_0x5c4aad=_0x58bf12['includes']('-r'),_0x20a0a6=_0x1aa6b6__namespace['resolve'](process['cwd'](),_0x2a606f);loggers.logInfoRaw('\x0aCreating\x20'+constants.projectName+'\x20project\x20\x22'+_0x2a606f+'\x22...\x0a');try{checkTargetFolder(_0x20a0a6),createNextProject(_0x2a606f,_0x20a0a6),await copyProjectFiles(_0x20a0a6),await overridePackageJson(_0x20a0a6),createAdditionalFolders(_0x20a0a6),await createEnvFile(_0x20a0a6),await updateLayoutTitle(_0x20a0a6,_0x2a606f),await setupEslintConfig(_0x20a0a6),_0x5c4aad&&await enableRepoModeExtras(_0x20a0a6),loggers.logInfoRaw('\x0a'+constants.projectName+'\x20project\x20\x22'+_0x2a606f+'\x22\x20is\x20ready!'),loggers.logInfoRaw('Next\x20steps:'),loggers.logInfoRaw('\x20\x20cd\x20'+_0x2a606f),loggers.logInfoRaw('\x20\x20npm\x20run\x20prod'),loggers.logInfoRaw('\x20\x20npm\x20start');}catch(_0x4aa1b5){const _0x2ebde0=_0x4aa1b5 instanceof Error?_0x4aa1b5['message']:'Unknown\x20error';loggers.logStringError('Error:'),loggers.logStringError(_0x2ebde0),fs.existsSync(_0x20a0a6)&&(loggers.logInfoRaw('Cleaning\x20up...'),fs.rmSync(_0x20a0a6,{'recursive':!![],'force':!![]})),process['exit'](-0x13c5+0x1896*-0x1+0x14e*0x22);}}catch(_0x33ca2e){const _0x35af1c=_0x33ca2e instanceof Error?_0x33ca2e['message']:'Unknown\x20error';loggers.logStringError('Unhandled\x20error:'),loggers.logStringError(_0x35af1c),process['exit'](-0x135a+0x1+0x135a);}}__name(create,'create');
40
+ var __defProp=Object['defineProperty'],__name=(_0x1b0777,_0x53b8d8)=>__defProp(_0x1b0777,'name',{'value':_0x53b8d8,'configurable':!![]});const requiredNodeVersion='v20.0.0';process['version']<requiredNodeVersion&&(loggers.logStringError('Node.js\x20'+requiredNodeVersion+'+\x20is\x20required'),process['exit'](0x1*-0x1585+0x19b*0xf+0x1*-0x28f));const filename=node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('level2/cli/create/bin/create.cjs.js', document.baseURI).href))),sourceDir='../../../../',binDir=_0x2657b6__namespace['dirname'](filename),repoRoot=_0x2657b6__namespace['resolve'](binDir,sourceDir),envLocalPath=_0x2657b6__namespace['join'](binDir,sourceDir+projectPaths.folders['cli']+'/'+projectPaths.files['envExample']),envTemplate=_0x4e9839['readFileSync'](envLocalPath,'utf8'),foldersToIgnore=[projectPaths.folders['cli']+'/'+projectPaths.folders['constants'],projectPaths.folders['cli']+'/'+projectPaths.files['packageTemplate'],projectPaths.folders['cli']+'/'+projectPaths.files['envExample'],projectPaths.folders['cli']+'/'+projectPaths.folders['bin'],projectPaths.folders['cli']+'/'+projectPaths.folders['configs']];function runCommand(_0x4f479c,_0x4b5078){loggers.logInfoRaw('Executing:\x20'+_0x4f479c);try{child_process.execSync(_0x4f479c,{'stdio':'inherit','cwd':_0x4b5078??process['cwd']()});}catch(_0x5db369){const _0x390bed=_0x5db369 instanceof Error?_0x5db369['message']:'Unknown\x20error';loggers.logStringError('Error\x20executing:\x20'+_0x4f479c),loggers.logStringError(_0x390bed),process['exit'](-0x1355*0x2+-0x221+-0x7*-0x5d4);}}__name(runCommand,'runCommand');function checkTargetFolder(_0x4a064c){fs.existsSync(_0x4a064c)&&(loggers.logStringError('Error:\x20Folder\x20\x22'+_0x2657b6__namespace['basename'](_0x4a064c)+'\x22\x20already\x20exists.'),process['exit'](-0x14dd+0x2512+-0x1034));}__name(checkTargetFolder,'checkTargetFolder');function getCreateNextAppVersion(){const _0x1cc3db=_0x2657b6__namespace['resolve'](repoRoot,projectPaths.files['packageJson']),_0x18c7f1=JSON['parse'](_0x4e9839['readFileSync'](_0x1cc3db,'utf-8'));return String(_0x18c7f1['devDependencies']?.['next']??_0x18c7f1['dependencies']?.['next']??'latest');}__name(getCreateNextAppVersion,'getCreateNextAppVersion');async function createNextProject(_0x43a2ec,_0x2c1a5c){loggers.logInfoRaw('Creating\x20Next.js\x20project...');const _0x52a455=getCreateNextAppVersion(),_0x4c18fa=['npx\x20--yes\x20create-next-app@'+_0x52a455+'\x20\x22'+_0x43a2ec+'\x22','--typescript','--tailwind','--eslint','--app','--src-dir','--turbopack','--no-import-alias','--no-git','--react-compiler']['join']('\x20');runCommand(_0x4c18fa,_0x2657b6__namespace['dirname'](_0x2c1a5c)),loggers.logInfoRaw('Next.js\x20project\x20created!');const _0x49a50b=_0x2657b6__namespace['join'](_0x2c1a5c,'next.config.ts'),_0x4d972b=_0x2657b6__namespace['join'](_0x2c1a5c,projectPaths.folders['public']);await fs.promises['rm'](_0x49a50b,{'force':!![]}),loggers.logInfoRaw('Removed\x20default\x20next.config.ts'),await fs.promises['rm'](_0x4d972b,{'recursive':!![],'force':!![]}),loggers.logInfoRaw('Removed\x20default\x20public\x20folder'),await fs.promises['mkdir'](_0x4d972b);}__name(createNextProject,'createNextProject');async function createEnvFile(_0x2b845e){loggers.logInfoRaw('Creating\x20'+projectPaths.files['env']+'\x20file\x20with\x20default\x20values...');const _0x29a66f=_0x2657b6__namespace['join'](_0x2b845e,projectPaths.files['env']);try{await fs.promises['writeFile'](_0x29a66f,envTemplate,'utf8'),loggers.logInfoRaw(projectPaths.files['env']+'\x20file\x20created\x20with\x20values!');}catch(_0xb0c791){const _0x38c34e=_0xb0c791 instanceof Error?_0xb0c791['message']:'Unknown\x20error';loggers.logStringError('Error\x20creating\x20'+projectPaths.files['env']+'\x20file:'),loggers.logStringError(_0x38c34e);throw _0xb0c791;}}__name(createEnvFile,'createEnvFile');async function overridePackageJson(_0x2b7a2a){const _0x992347=_0x2657b6__namespace['join'](_0x2b7a2a,projectPaths.files['packageJson']),_0x56ed97=_0x2657b6__namespace['join'](repoRoot,projectPaths.folders['cli']+'/'+projectPaths.files['packageTemplate']);try{const _0x576a20=JSON['parse'](await fs.promises['readFile'](_0x992347,'utf8')),_0x8821dd=_0x576a20['name'],_0x19743a=JSON['parse'](await fs.promises['readFile'](_0x56ed97,'utf8')),_0x52f8ac={..._0x19743a,'name':_0x8821dd};await fs.promises['writeFile'](_0x992347,JSON['stringify'](_0x52f8ac,null,0xe98+0x137*0x13+-0x1*0x25ab)+'\x0a','utf8');}catch(_0x396660){const _0x4307a8=_0x396660 instanceof Error?_0x396660['message']:'Unknown\x20error';loggers.logStringError('Error\x20overriding\x20'+projectPaths.files['packageJson']+':'),loggers.logStringError(_0x4307a8);throw _0x396660;}}__name(overridePackageJson,'overridePackageJson');function replaceImports(_0x139294){const _0x1edccc=/(import\s+)([^'"]+)(\s+from\s+["'])([^"']+)(["'])/g;return _0x139294['replace'](_0x1edccc,(_0x12cbd1,_0xaedecc,_0x260a0e,_0x1615dc,_0x4de4f4,_0x315e4e)=>{if(!_0x4de4f4['startsWith'](aliases.aliasSymbols['atSign'])||_0x4de4f4['startsWith'](packages.npmPackages['saasKit']))return _0x12cbd1;let _0x58032c;_0x4de4f4['startsWith'](aliases.aliasSymbols['atSign']+projectPaths.folders['server'])||_0x4de4f4['includes'](''+projectPaths.nonRootProjectPaths['server'])?_0x58032c=packages.npmPackages['saasKitServer']:_0x58032c=packages.npmPackages['saasKit'];let _0x584e94=_0x260a0e['trim']();const _0x19b308=/^type\b/['test'](_0x584e94),_0x10e814=/^\*\s+as\s+/['test'](_0x584e94);return !_0x19b308&&!_0x10e814&&!_0x584e94['startsWith']('{')&&(_0x584e94='{\x20'+_0x584e94+'\x20}'),''+_0xaedecc+_0x584e94+_0x1615dc+_0x58032c+_0x315e4e;});}__name(replaceImports,'replaceImports');async function copyProjectFiles(_0x366ecb){loggers.logInfoRaw('Copying\x20'+constants.projectName+'\x20files...');for(const _0x381a85 of path.allFilesToCopy){const _0xc6f65a=projectPaths.folders['cli']+'/'+_0x381a85,_0x5f0c79=_0x2657b6__namespace['join'](repoRoot,_0xc6f65a),_0x3d01d0=replaceToolsFolder(_0x381a85),_0x14bf77=_0x2657b6__namespace['join'](_0x366ecb,_0x3d01d0);if(fs.existsSync(_0x5f0c79)){const _0x45ce1f=await fs.promises['stat'](_0x5f0c79);_0x45ce1f['isDirectory']()?await copyDirectoryContents(_0x5f0c79,_0x14bf77):await copyAndProcessFile(_0x5f0c79,_0x14bf77);}else loggers.logInfoRaw('Source\x20file\x20not\x20found:\x20'+_0xc6f65a);}loggers.logInfoRaw('Files\x20copied\x20and\x20imports\x20updated!');}__name(copyProjectFiles,'copyProjectFiles');function replaceToolsFolder(_0xf111be){let _0x596f83=_0xf111be;for(const [_0x4b9621,_0x2e1997]of Object['entries'](createAppConstants.toolsFoldersToReplace)){if(_0x596f83['startsWith'](_0x4b9621)&&ensureType.isWithIndexer(_0x2e1997)){const _0x5746eb=_0x2e1997;for(const _0x2c5a95 in _0x5746eb){const _0x50be8b=_0x5746eb[_0x2c5a95];ensureType.isString(_0x50be8b)&&(_0x596f83=_0x596f83['replace'](_0x2c5a95,_0x50be8b));}break;}}return _0x596f83;}__name(replaceToolsFolder,'replaceToolsFolder');function shouldIgnorePath(_0x549db7,_0xa77ee3,_0x555e34=![]){const _0xaad736=_0x2657b6__namespace['relative'](repoRoot,_0x549db7)['replace'](/\\/g,'/'),_0x4af70e=foldersToIgnore['map'](_0x220b91=>_0x220b91['replace'](/\\/g,'/'));if(_0x4af70e['includes'](_0xaad736))return !![];if(_0x555e34){const _0x1c1513=_0x2657b6__namespace['relative'](_0xa77ee3,_0x549db7)['replace'](/\\/g,'/'),_0x28d938=_0x1c1513['split']('/');return _0x4af70e['some'](_0x7a84fb=>_0x28d938['some'](_0x5cfd87=>_0x5cfd87===_0x7a84fb));}return ![];}__name(shouldIgnorePath,'shouldIgnorePath');async function copyDirectoryContents(_0x516b90,_0x36fe04){!fs.existsSync(_0x36fe04)&&fs.mkdirSync(_0x36fe04,{'recursive':!![]});try{const _0xe32e15=await fs.promises['readdir'](_0x516b90,{'withFileTypes':!![]});for(const _0x25fbcf of _0xe32e15){const _0xb8d8d7=_0x2657b6__namespace['join'](_0x516b90,_0x25fbcf['name']),_0x2c4993=_0x2657b6__namespace['join'](_0x36fe04,_0x25fbcf['name']);!shouldIgnorePath(_0xb8d8d7,_0x516b90,_0x25fbcf['isDirectory']())&&(_0x25fbcf['isDirectory']()?await copyDirectoryContents(_0xb8d8d7,_0x2c4993):await copyAndProcessFile(_0xb8d8d7,_0x2c4993));}}catch(_0x4a024c){const _0xa666ea=_0x4a024c instanceof Error?_0x4a024c['message']:'Unknown\x20error';loggers.logStringError('Error\x20reading\x20directory\x20'+_0x516b90+':\x20'+_0xa666ea);throw _0x4a024c;}}__name(copyDirectoryContents,'copyDirectoryContents');async function copyAndProcessFile(_0x4a9fd6,_0x28cfe4){const _0x5c8de0=_0x2657b6__namespace['dirname'](_0x28cfe4);!fs.existsSync(_0x5c8de0)&&fs.mkdirSync(_0x5c8de0,{'recursive':!![]});const _0x2e43ad=await fs.promises['stat'](_0x4a9fd6);if(_0x2e43ad['isDirectory']())await copyDirectoryContents(_0x4a9fd6,_0x28cfe4);else {const _0x1cd805=_0x2657b6__namespace['extname'](_0x4a9fd6)['toLowerCase'](),_0x390f45=['.ico','.png','.jpg','.jpeg','.webp','.gif','.svg','.pdf'];if(_0x390f45['includes'](_0x1cd805)){await fs.promises['copyFile'](_0x4a9fd6,_0x28cfe4);return;}const _0x22c9b8=await fs.promises['readFile'](_0x4a9fd6,'utf8'),_0x4a2213=replaceImports(_0x22c9b8);await fs.promises['writeFile'](_0x28cfe4,_0x4a2213,'utf8');}}__name(copyAndProcessFile,'copyAndProcessFile');function createAdditionalFolders(_0x563ecd){for(const _0x548162 of createAppConstants.additionalFoldersToCreate){const _0x3db59f=_0x2657b6__namespace['join'](_0x563ecd,_0x548162);!fs.existsSync(_0x3db59f)&&(fs.mkdirSync(_0x3db59f,{'recursive':!![]}),loggers.logInfoRaw('Created\x20folder:\x20'+_0x548162));}loggers.logInfoRaw('Additional\x20folders\x20created!');}__name(createAdditionalFolders,'createAdditionalFolders');async function setupPreCommitHooks(_0x1872cc){const _0x37dc0c=_0x2657b6__namespace['join'](_0x1872cc,projectPaths.folders['husky']),_0x2f4d7d=_0x2657b6__namespace['join'](_0x37dc0c,projectPaths.files['preCommit']),_0x26cadf=_0x2657b6__namespace['join'](_0x37dc0c,projectPaths.files['commitMsg']);fs.mkdirSync(_0x37dc0c,{'recursive':!![]}),await fs.promises['writeFile'](_0x2f4d7d,cliContents.cliScripts['preCommit'],'utf8'),await fs.promises['writeFile'](_0x26cadf,cliContents.cliScripts['commitMsg'],'utf8'),runCommand(cliContents.cliScripts['chmodPreCommit'],_0x1872cc),runCommand(cliContents.cliScripts['chmodCommitMsg'],_0x1872cc);}__name(setupPreCommitHooks,'setupPreCommitHooks');async function setupEslintConfig(_0x479713){const _0xa1deb5=_0x2657b6__namespace['join'](_0x479713,projectPaths.files['eslintConfigMjs']);fs.existsSync(_0xa1deb5)&&await fs.promises['rm'](_0xa1deb5);const _0x132a49=_0x2657b6__namespace['join'](_0x479713,projectPaths.files['eslintConfigJs']);await fs.promises['writeFile'](_0x132a49,cliContents.cliEslintContent,'utf8');}__name(setupEslintConfig,'setupEslintConfig');async function enableRepoModeExtras(_0x109ef7){loggers.logInfoRaw('Enabling\x20recommendation\x20mode\x20(-r)...'),runCommand(cliContents.cliScripts['gitInit'],_0x109ef7),runCommand(cliContents.cliScripts['installDevHuskyTsx'],_0x109ef7),runCommand(cliContents.cliScripts['setLint'],_0x109ef7),runCommand(cliContents.cliScripts['installHusky'],_0x109ef7),await setupPreCommitHooks(_0x109ef7);}__name(enableRepoModeExtras,'enableRepoModeExtras');async function updateLayoutTitle(_0x1f9c79,_0x4e790b){const _0x47b4b1=_0x2657b6__namespace['join'](_0x1f9c79,projectPaths.projectPaths['app']+'/'+projectPaths.files['layout']);if(!fs.existsSync(_0x47b4b1))throw errors.createError(projectPaths.files['layout']+'\x20not\x20found\x20at\x20'+_0x47b4b1+',\x20cannot\x20update\x20title.');let _0x98c251=await fs.promises['readFile'](_0x47b4b1,'utf8');const _0x3ff355=/"SaaS Kit"/g;if(!_0x3ff355['test'](_0x98c251))throw errors.createError('SaaS\x20Kit\x20not\x20found\x20in\x20'+projectPaths.files['layout']+',\x20cannot\x20update\x20title.');_0x98c251=_0x98c251['replace'](_0x3ff355,'\x22'+_0x4e790b+'\x22'),await fs.promises['writeFile'](_0x47b4b1,_0x98c251,'utf8');}__name(updateLayoutTitle,'updateLayoutTitle');async function create(_0xaaa7fe){try{_0xaaa7fe['length']<0x7b2+-0x6b*-0x1b+-0x12fa&&(loggers.logStringError('Error:\x20Specify\x20folder\x20name.\x20Example:\x20npx\x20create-saas-kit-app\x20<folder-name>'),process['exit'](-0x15b4+0x1*0x13d+0x1478));const _0xcdd775=_0xaaa7fe[0x1f2d+-0xd67+-0x11c6],_0xe07060=_0xaaa7fe['includes']('-r'),_0x46475b=_0x2657b6__namespace['resolve'](process['cwd'](),_0xcdd775);loggers.logInfoRaw('\x0aCreating\x20'+constants.projectName+'\x20project\x20\x22'+_0xcdd775+'\x22...\x0a');try{checkTargetFolder(_0x46475b),await createNextProject(_0xcdd775,_0x46475b),await copyProjectFiles(_0x46475b),await overridePackageJson(_0x46475b),createAdditionalFolders(_0x46475b),await createEnvFile(_0x46475b),await updateLayoutTitle(_0x46475b,_0xcdd775),await setupEslintConfig(_0x46475b),_0xe07060&&await enableRepoModeExtras(_0x46475b),loggers.logInfoRaw('\x0a'+constants.projectName+'\x20project\x20\x22'+_0xcdd775+'\x22\x20is\x20ready!'),loggers.logInfoRaw('Next\x20steps:'),loggers.logInfoRaw('\x20\x20cd\x20'+_0xcdd775),loggers.logInfoRaw('\x20\x20npm\x20run\x20prod'),loggers.logInfoRaw('\x20\x20npm\x20start');}catch(_0x4c1a64){const _0x3b0c32=_0x4c1a64 instanceof Error?_0x4c1a64['message']:'Unknown\x20error';loggers.logStringError('Error:'),loggers.logStringError(_0x3b0c32),fs.existsSync(_0x46475b)&&(loggers.logInfoRaw('Cleaning\x20up...'),fs.rmSync(_0x46475b,{'recursive':!![],'force':!![]})),process['exit'](-0x1ea4+0x241*0x1+-0x2*-0xe32);}}catch(_0x69982d){const _0x21eaeb=_0x69982d instanceof Error?_0x69982d['message']:'Unknown\x20error';loggers.logStringError('Unhandled\x20error:'),loggers.logStringError(_0x21eaeb),process['exit'](0x2392+-0x8b1*-0x1+-0x2c42);}}__name(create,'create');
41
41
 
42
42
  exports.create = create;
@@ -2,8 +2,8 @@
2
2
  import { execSync } from 'child_process';
3
3
  import { existsSync, promises, mkdirSync, rmSync } from 'fs';
4
4
  import { fileURLToPath } from 'node:url';
5
- import * as _0x1aa6b6 from 'path';
6
- import _0x41fbd6 from 'node:fs';
5
+ import * as _0x2657b6 from 'path';
6
+ import _0x4e9839 from 'node:fs';
7
7
  import { toolsFoldersToReplace, additionalFoldersToCreate } from '../../../../base-repo/constants/create-app-constants.js';
8
8
  import { logStringError, logInfoRaw } from '../../../../fd-toolbox/logging/loggers.js';
9
9
  import { projectName } from '../../../../fd-toolbox/constants/constants.js';
@@ -15,6 +15,6 @@ import { aliasSymbols } from '../../../../base-repo/app-constants/aliases.js';
15
15
  import { isWithIndexer, isString } from '../../../../fd-toolbox/types/ensure-type.js';
16
16
  import { cliScripts, cliEslintContent } from '../../../npm-commands/build-npm/cli-contents.js';
17
17
 
18
- var __defProp=Object['defineProperty'],__name=(_0x21468c,_0x37691d)=>__defProp(_0x21468c,'name',{'value':_0x37691d,'configurable':!![]});const requiredNodeVersion='v20.0.0';process['version']<requiredNodeVersion&&(logStringError('Node.js\x20'+requiredNodeVersion+'+\x20is\x20required'),process['exit'](0x1c5a+0x20d2+0x1*-0x3d2b));const filename=fileURLToPath(import.meta.url),sourceDir='../../../../',binDir=_0x1aa6b6['dirname'](filename),repoRoot=_0x1aa6b6['resolve'](binDir,sourceDir),envLocalPath=_0x1aa6b6['join'](binDir,''+sourceDir+folders['cli']+'/'+files['envExample']),envTemplate=_0x41fbd6['readFileSync'](envLocalPath,'utf8'),foldersToIgnore=[folders['cli']+'/'+folders['constants'],folders['cli']+'/'+files['packageTemplate'],folders['cli']+'/'+files['envExample'],folders['cli']+'/'+folders['bin'],folders['cli']+'/'+folders['configs']];function runCommand(_0x278bc1,_0x21dbad){logInfoRaw('Executing:\x20'+_0x278bc1);try{execSync(_0x278bc1,{'stdio':'inherit','cwd':_0x21dbad??process['cwd']()});}catch(_0x349a38){const _0x36e922=_0x349a38 instanceof Error?_0x349a38['message']:'Unknown\x20error';logStringError('Error\x20executing:\x20'+_0x278bc1),logStringError(_0x36e922),process['exit'](0x224d*0x1+0xc9*-0x31+0x42d);}}__name(runCommand,'runCommand');function checkTargetFolder(_0x431f06){existsSync(_0x431f06)&&(logStringError('Error:\x20Folder\x20\x22'+_0x1aa6b6['basename'](_0x431f06)+'\x22\x20already\x20exists.'),process['exit'](-0x6*0x431+-0x6d9+-0x4*-0x800));}__name(checkTargetFolder,'checkTargetFolder');function getCreateNextAppVersion(){const _0x3bc958=_0x1aa6b6['resolve'](repoRoot,files['packageJson']),_0x5e7c1e=JSON['parse'](_0x41fbd6['readFileSync'](_0x3bc958,'utf-8'));return String(_0x5e7c1e['devDependencies']?.['next']??_0x5e7c1e['dependencies']?.['next']??'latest');}__name(getCreateNextAppVersion,'getCreateNextAppVersion');function createNextProject(_0x166814,_0x46f83a){logInfoRaw('Creating\x20Next.js\x20project...');const _0x325f03=getCreateNextAppVersion(),_0x263720=['npx\x20--yes\x20create-next-app@'+_0x325f03+'\x20\x22'+_0x166814+'\x22','--typescript','--tailwind','--eslint','--app','--src-dir','--turbopack','--no-import-alias','--no-git','--react-compiler']['join']('\x20');runCommand(_0x263720,_0x1aa6b6['dirname'](_0x46f83a)),logInfoRaw('Next.js\x20project\x20created!');const _0xa441dd=_0x1aa6b6['join'](_0x46f83a,'next.config.ts');_0x41fbd6['existsSync'](_0xa441dd)&&(_0x41fbd6['rmSync'](_0xa441dd),logInfoRaw('Removed\x20default\x20next.config.ts'));}__name(createNextProject,'createNextProject');async function createEnvFile(_0x2dd8f7){logInfoRaw('Creating\x20'+files['env']+'\x20file\x20with\x20default\x20values...');const _0x30f0b0=_0x1aa6b6['join'](_0x2dd8f7,files['env']);try{await promises['writeFile'](_0x30f0b0,envTemplate,'utf8'),logInfoRaw(files['env']+'\x20file\x20created\x20with\x20values!');}catch(_0x43ca1b){const _0x119b3a=_0x43ca1b instanceof Error?_0x43ca1b['message']:'Unknown\x20error';logStringError('Error\x20creating\x20'+files['env']+'\x20file:'),logStringError(_0x119b3a);throw _0x43ca1b;}}__name(createEnvFile,'createEnvFile');async function overridePackageJson(_0x5021e1){const _0x30a11d=_0x1aa6b6['join'](_0x5021e1,files['packageJson']),_0x939518=_0x1aa6b6['join'](repoRoot,folders['cli']+'/'+files['packageTemplate']);try{const _0x1e0aff=JSON['parse'](await promises['readFile'](_0x30a11d,'utf8')),_0xb6793d=_0x1e0aff['name'],_0x511ba1=JSON['parse'](await promises['readFile'](_0x939518,'utf8')),_0x14eb6c={..._0x511ba1,'name':_0xb6793d};await promises['writeFile'](_0x30a11d,JSON['stringify'](_0x14eb6c,null,0x25*0xd7+-0xb4a+0x3d*-0x53)+'\x0a','utf8');}catch(_0x38b540){const _0x20ab3d=_0x38b540 instanceof Error?_0x38b540['message']:'Unknown\x20error';logStringError('Error\x20overriding\x20'+files['packageJson']+':'),logStringError(_0x20ab3d);throw _0x38b540;}}__name(overridePackageJson,'overridePackageJson');function replaceImports(_0x359a82){const _0x2b48fb=/(import\s+)([^'"]+)(\s+from\s+["'])([^"']+)(["'])/g;return _0x359a82['replace'](_0x2b48fb,(_0x3bc804,_0x818e8f,_0x9a9bdd,_0x281c8a,_0x242d27,_0x309071)=>{if(!_0x242d27['startsWith'](aliasSymbols['atSign'])||_0x242d27['startsWith'](npmPackages['saasKit']))return _0x3bc804;let _0xeabf6e;_0x242d27['startsWith'](aliasSymbols['atSign']+folders['server'])||_0x242d27['includes'](''+nonRootProjectPaths['server'])?_0xeabf6e=npmPackages['saasKitServer']:_0xeabf6e=npmPackages['saasKit'];let _0x4d669e=_0x9a9bdd['trim']();const _0x36de59=/^type\b/['test'](_0x4d669e),_0x481343=/^\*\s+as\s+/['test'](_0x4d669e);return !_0x36de59&&!_0x481343&&!_0x4d669e['startsWith']('{')&&(_0x4d669e='{\x20'+_0x4d669e+'\x20}'),''+_0x818e8f+_0x4d669e+_0x281c8a+_0xeabf6e+_0x309071;});}__name(replaceImports,'replaceImports');async function copyProjectFiles(_0x338f70){logInfoRaw('Copying\x20'+projectName+'\x20files...');for(const _0x4f1ecb of allFilesToCopy){const _0x191773=folders['cli']+'/'+_0x4f1ecb,_0x374858=_0x1aa6b6['join'](repoRoot,_0x191773),_0x47f44f=replaceToolsFolder(_0x4f1ecb),_0x5c544e=_0x1aa6b6['join'](_0x338f70,_0x47f44f);if(existsSync(_0x374858)){const _0xc41733=await promises['stat'](_0x374858);_0xc41733['isDirectory']()?await copyDirectoryContents(_0x374858,_0x5c544e):await copyAndProcessFile(_0x374858,_0x5c544e);}else logInfoRaw('Source\x20file\x20not\x20found:\x20'+_0x191773);}logInfoRaw('Files\x20copied\x20and\x20imports\x20updated!');}__name(copyProjectFiles,'copyProjectFiles');function replaceToolsFolder(_0x78e40d){let _0x184456=_0x78e40d;for(const [_0xeedbb2,_0x13fd8a]of Object['entries'](toolsFoldersToReplace)){if(_0x184456['startsWith'](_0xeedbb2)&&isWithIndexer(_0x13fd8a)){const _0x4165ab=_0x13fd8a;for(const _0x2ca6a8 in _0x4165ab){const _0x924dad=_0x4165ab[_0x2ca6a8];isString(_0x924dad)&&(_0x184456=_0x184456['replace'](_0x2ca6a8,_0x924dad));}break;}}return _0x184456;}__name(replaceToolsFolder,'replaceToolsFolder');function shouldIgnorePath(_0x25cc0b,_0x1c11e1,_0x480b0e=![]){const _0x1eec06=_0x1aa6b6['relative'](repoRoot,_0x25cc0b)['replace'](/\\/g,'/'),_0x3fe5f9=foldersToIgnore['map'](_0x1cf4d6=>_0x1cf4d6['replace'](/\\/g,'/'));if(_0x3fe5f9['includes'](_0x1eec06))return !![];if(_0x480b0e){const _0x294d78=_0x1aa6b6['relative'](_0x1c11e1,_0x25cc0b)['replace'](/\\/g,'/'),_0x5535ab=_0x294d78['split']('/');return _0x3fe5f9['some'](_0x45ea6d=>_0x5535ab['some'](_0x118365=>_0x118365===_0x45ea6d));}return ![];}__name(shouldIgnorePath,'shouldIgnorePath');async function copyDirectoryContents(_0x4ebffa,_0x3b411a){!existsSync(_0x3b411a)&&mkdirSync(_0x3b411a,{'recursive':!![]});try{const _0x6a8efa=await promises['readdir'](_0x4ebffa,{'withFileTypes':!![]});for(const _0x14d42d of _0x6a8efa){const _0x39f53f=_0x1aa6b6['join'](_0x4ebffa,_0x14d42d['name']),_0x5f2246=_0x1aa6b6['join'](_0x3b411a,_0x14d42d['name']);!shouldIgnorePath(_0x39f53f,_0x4ebffa,_0x14d42d['isDirectory']())&&(_0x14d42d['isDirectory']()?await copyDirectoryContents(_0x39f53f,_0x5f2246):await copyAndProcessFile(_0x39f53f,_0x5f2246));}}catch(_0x514b57){const _0x4a4a6f=_0x514b57 instanceof Error?_0x514b57['message']:'Unknown\x20error';logStringError('Error\x20reading\x20directory\x20'+_0x4ebffa+':\x20'+_0x4a4a6f);throw _0x514b57;}}__name(copyDirectoryContents,'copyDirectoryContents');async function copyAndProcessFile(_0x3beba5,_0x227e1f){const _0x1a242a=_0x1aa6b6['dirname'](_0x227e1f);!existsSync(_0x1a242a)&&mkdirSync(_0x1a242a,{'recursive':!![]});const _0x474f04=await promises['stat'](_0x3beba5);if(_0x474f04['isDirectory']())await copyDirectoryContents(_0x3beba5,_0x227e1f);else {const _0x2fd189=_0x1aa6b6['extname'](_0x3beba5)['toLowerCase'](),_0x354504=['.ico','.png','.jpg','.jpeg','.webp','.gif','.svg','.pdf'];if(_0x354504['includes'](_0x2fd189)){await promises['copyFile'](_0x3beba5,_0x227e1f);return;}const _0x3cae32=await promises['readFile'](_0x3beba5,'utf8'),_0x2ff221=replaceImports(_0x3cae32);await promises['writeFile'](_0x227e1f,_0x2ff221,'utf8');}}__name(copyAndProcessFile,'copyAndProcessFile');function createAdditionalFolders(_0xea7641){for(const _0x2cc837 of additionalFoldersToCreate){const _0x3492ea=_0x1aa6b6['join'](_0xea7641,_0x2cc837);!existsSync(_0x3492ea)&&(mkdirSync(_0x3492ea,{'recursive':!![]}),logInfoRaw('Created\x20folder:\x20'+_0x2cc837));}logInfoRaw('Additional\x20folders\x20created!');}__name(createAdditionalFolders,'createAdditionalFolders');async function setupPreCommitHooks(_0x106140){const _0x5dfd6e=_0x1aa6b6['join'](_0x106140,folders['husky']),_0x3a8501=_0x1aa6b6['join'](_0x5dfd6e,files['preCommit']),_0x3dbaf5=_0x1aa6b6['join'](_0x5dfd6e,files['commitMsg']);mkdirSync(_0x5dfd6e,{'recursive':!![]}),await promises['writeFile'](_0x3a8501,cliScripts['preCommit'],'utf8'),await promises['writeFile'](_0x3dbaf5,cliScripts['commitMsg'],'utf8'),runCommand(cliScripts['chmodPreCommit'],_0x106140),runCommand(cliScripts['chmodCommitMsg'],_0x106140);}__name(setupPreCommitHooks,'setupPreCommitHooks');async function setupEslintConfig(_0x3347d2){const _0x1353cd=_0x1aa6b6['join'](_0x3347d2,files['eslintConfigMjs']);existsSync(_0x1353cd)&&await promises['rm'](_0x1353cd);const _0x2bc0f4=_0x1aa6b6['join'](_0x3347d2,files['eslintConfigJs']);await promises['writeFile'](_0x2bc0f4,cliEslintContent,'utf8');}__name(setupEslintConfig,'setupEslintConfig');async function enableRepoModeExtras(_0x3ab588){logInfoRaw('Enabling\x20recommendation\x20mode\x20(-r)...'),runCommand(cliScripts['gitInit'],_0x3ab588),runCommand(cliScripts['installDevHuskyTsx'],_0x3ab588),runCommand(cliScripts['setLint'],_0x3ab588),runCommand(cliScripts['installHusky'],_0x3ab588),await setupPreCommitHooks(_0x3ab588);}__name(enableRepoModeExtras,'enableRepoModeExtras');async function updateLayoutTitle(_0x3aa01f,_0x4ca4fa){const _0x87a866=_0x1aa6b6['join'](_0x3aa01f,projectPaths['app']+'/'+files['layout']);if(!existsSync(_0x87a866))throw createError(files['layout']+'\x20not\x20found\x20at\x20'+_0x87a866+',\x20cannot\x20update\x20title.');let _0x305dcd=await promises['readFile'](_0x87a866,'utf8');const _0x30e313=/"SaaS Kit"/g;if(!_0x30e313['test'](_0x305dcd))throw createError('SaaS\x20Kit\x20not\x20found\x20in\x20'+files['layout']+',\x20cannot\x20update\x20title.');_0x305dcd=_0x305dcd['replace'](_0x30e313,'\x22'+_0x4ca4fa+'\x22'),await promises['writeFile'](_0x87a866,_0x305dcd,'utf8');}__name(updateLayoutTitle,'updateLayoutTitle');async function create(_0x58bf12){try{_0x58bf12['length']<0x26d0+0x142a+-0x3af9*0x1&&(logStringError('Error:\x20Specify\x20folder\x20name.\x20Example:\x20npx\x20create-saas-kit-app\x20<folder-name>'),process['exit'](0x33*-0x27+0x4c0*0x4+0x1*-0xb3a));const _0x2a606f=_0x58bf12[-0x1974+-0x137c+0x2cf0],_0x5c4aad=_0x58bf12['includes']('-r'),_0x20a0a6=_0x1aa6b6['resolve'](process['cwd'](),_0x2a606f);logInfoRaw('\x0aCreating\x20'+projectName+'\x20project\x20\x22'+_0x2a606f+'\x22...\x0a');try{checkTargetFolder(_0x20a0a6),createNextProject(_0x2a606f,_0x20a0a6),await copyProjectFiles(_0x20a0a6),await overridePackageJson(_0x20a0a6),createAdditionalFolders(_0x20a0a6),await createEnvFile(_0x20a0a6),await updateLayoutTitle(_0x20a0a6,_0x2a606f),await setupEslintConfig(_0x20a0a6),_0x5c4aad&&await enableRepoModeExtras(_0x20a0a6),logInfoRaw('\x0a'+projectName+'\x20project\x20\x22'+_0x2a606f+'\x22\x20is\x20ready!'),logInfoRaw('Next\x20steps:'),logInfoRaw('\x20\x20cd\x20'+_0x2a606f),logInfoRaw('\x20\x20npm\x20run\x20prod'),logInfoRaw('\x20\x20npm\x20start');}catch(_0x4aa1b5){const _0x2ebde0=_0x4aa1b5 instanceof Error?_0x4aa1b5['message']:'Unknown\x20error';logStringError('Error:'),logStringError(_0x2ebde0),existsSync(_0x20a0a6)&&(logInfoRaw('Cleaning\x20up...'),rmSync(_0x20a0a6,{'recursive':!![],'force':!![]})),process['exit'](-0x13c5+0x1896*-0x1+0x14e*0x22);}}catch(_0x33ca2e){const _0x35af1c=_0x33ca2e instanceof Error?_0x33ca2e['message']:'Unknown\x20error';logStringError('Unhandled\x20error:'),logStringError(_0x35af1c),process['exit'](-0x135a+0x1+0x135a);}}__name(create,'create');
18
+ var __defProp=Object['defineProperty'],__name=(_0x1b0777,_0x53b8d8)=>__defProp(_0x1b0777,'name',{'value':_0x53b8d8,'configurable':!![]});const requiredNodeVersion='v20.0.0';process['version']<requiredNodeVersion&&(logStringError('Node.js\x20'+requiredNodeVersion+'+\x20is\x20required'),process['exit'](0x1*-0x1585+0x19b*0xf+0x1*-0x28f));const filename=fileURLToPath(import.meta.url),sourceDir='../../../../',binDir=_0x2657b6['dirname'](filename),repoRoot=_0x2657b6['resolve'](binDir,sourceDir),envLocalPath=_0x2657b6['join'](binDir,sourceDir+folders['cli']+'/'+files['envExample']),envTemplate=_0x4e9839['readFileSync'](envLocalPath,'utf8'),foldersToIgnore=[folders['cli']+'/'+folders['constants'],folders['cli']+'/'+files['packageTemplate'],folders['cli']+'/'+files['envExample'],folders['cli']+'/'+folders['bin'],folders['cli']+'/'+folders['configs']];function runCommand(_0x4f479c,_0x4b5078){logInfoRaw('Executing:\x20'+_0x4f479c);try{execSync(_0x4f479c,{'stdio':'inherit','cwd':_0x4b5078??process['cwd']()});}catch(_0x5db369){const _0x390bed=_0x5db369 instanceof Error?_0x5db369['message']:'Unknown\x20error';logStringError('Error\x20executing:\x20'+_0x4f479c),logStringError(_0x390bed),process['exit'](-0x1355*0x2+-0x221+-0x7*-0x5d4);}}__name(runCommand,'runCommand');function checkTargetFolder(_0x4a064c){existsSync(_0x4a064c)&&(logStringError('Error:\x20Folder\x20\x22'+_0x2657b6['basename'](_0x4a064c)+'\x22\x20already\x20exists.'),process['exit'](-0x14dd+0x2512+-0x1034));}__name(checkTargetFolder,'checkTargetFolder');function getCreateNextAppVersion(){const _0x1cc3db=_0x2657b6['resolve'](repoRoot,files['packageJson']),_0x18c7f1=JSON['parse'](_0x4e9839['readFileSync'](_0x1cc3db,'utf-8'));return String(_0x18c7f1['devDependencies']?.['next']??_0x18c7f1['dependencies']?.['next']??'latest');}__name(getCreateNextAppVersion,'getCreateNextAppVersion');async function createNextProject(_0x43a2ec,_0x2c1a5c){logInfoRaw('Creating\x20Next.js\x20project...');const _0x52a455=getCreateNextAppVersion(),_0x4c18fa=['npx\x20--yes\x20create-next-app@'+_0x52a455+'\x20\x22'+_0x43a2ec+'\x22','--typescript','--tailwind','--eslint','--app','--src-dir','--turbopack','--no-import-alias','--no-git','--react-compiler']['join']('\x20');runCommand(_0x4c18fa,_0x2657b6['dirname'](_0x2c1a5c)),logInfoRaw('Next.js\x20project\x20created!');const _0x49a50b=_0x2657b6['join'](_0x2c1a5c,'next.config.ts'),_0x4d972b=_0x2657b6['join'](_0x2c1a5c,folders['public']);await promises['rm'](_0x49a50b,{'force':!![]}),logInfoRaw('Removed\x20default\x20next.config.ts'),await promises['rm'](_0x4d972b,{'recursive':!![],'force':!![]}),logInfoRaw('Removed\x20default\x20public\x20folder'),await promises['mkdir'](_0x4d972b);}__name(createNextProject,'createNextProject');async function createEnvFile(_0x2b845e){logInfoRaw('Creating\x20'+files['env']+'\x20file\x20with\x20default\x20values...');const _0x29a66f=_0x2657b6['join'](_0x2b845e,files['env']);try{await promises['writeFile'](_0x29a66f,envTemplate,'utf8'),logInfoRaw(files['env']+'\x20file\x20created\x20with\x20values!');}catch(_0xb0c791){const _0x38c34e=_0xb0c791 instanceof Error?_0xb0c791['message']:'Unknown\x20error';logStringError('Error\x20creating\x20'+files['env']+'\x20file:'),logStringError(_0x38c34e);throw _0xb0c791;}}__name(createEnvFile,'createEnvFile');async function overridePackageJson(_0x2b7a2a){const _0x992347=_0x2657b6['join'](_0x2b7a2a,files['packageJson']),_0x56ed97=_0x2657b6['join'](repoRoot,folders['cli']+'/'+files['packageTemplate']);try{const _0x576a20=JSON['parse'](await promises['readFile'](_0x992347,'utf8')),_0x8821dd=_0x576a20['name'],_0x19743a=JSON['parse'](await promises['readFile'](_0x56ed97,'utf8')),_0x52f8ac={..._0x19743a,'name':_0x8821dd};await promises['writeFile'](_0x992347,JSON['stringify'](_0x52f8ac,null,0xe98+0x137*0x13+-0x1*0x25ab)+'\x0a','utf8');}catch(_0x396660){const _0x4307a8=_0x396660 instanceof Error?_0x396660['message']:'Unknown\x20error';logStringError('Error\x20overriding\x20'+files['packageJson']+':'),logStringError(_0x4307a8);throw _0x396660;}}__name(overridePackageJson,'overridePackageJson');function replaceImports(_0x139294){const _0x1edccc=/(import\s+)([^'"]+)(\s+from\s+["'])([^"']+)(["'])/g;return _0x139294['replace'](_0x1edccc,(_0x12cbd1,_0xaedecc,_0x260a0e,_0x1615dc,_0x4de4f4,_0x315e4e)=>{if(!_0x4de4f4['startsWith'](aliasSymbols['atSign'])||_0x4de4f4['startsWith'](npmPackages['saasKit']))return _0x12cbd1;let _0x58032c;_0x4de4f4['startsWith'](aliasSymbols['atSign']+folders['server'])||_0x4de4f4['includes'](''+nonRootProjectPaths['server'])?_0x58032c=npmPackages['saasKitServer']:_0x58032c=npmPackages['saasKit'];let _0x584e94=_0x260a0e['trim']();const _0x19b308=/^type\b/['test'](_0x584e94),_0x10e814=/^\*\s+as\s+/['test'](_0x584e94);return !_0x19b308&&!_0x10e814&&!_0x584e94['startsWith']('{')&&(_0x584e94='{\x20'+_0x584e94+'\x20}'),''+_0xaedecc+_0x584e94+_0x1615dc+_0x58032c+_0x315e4e;});}__name(replaceImports,'replaceImports');async function copyProjectFiles(_0x366ecb){logInfoRaw('Copying\x20'+projectName+'\x20files...');for(const _0x381a85 of allFilesToCopy){const _0xc6f65a=folders['cli']+'/'+_0x381a85,_0x5f0c79=_0x2657b6['join'](repoRoot,_0xc6f65a),_0x3d01d0=replaceToolsFolder(_0x381a85),_0x14bf77=_0x2657b6['join'](_0x366ecb,_0x3d01d0);if(existsSync(_0x5f0c79)){const _0x45ce1f=await promises['stat'](_0x5f0c79);_0x45ce1f['isDirectory']()?await copyDirectoryContents(_0x5f0c79,_0x14bf77):await copyAndProcessFile(_0x5f0c79,_0x14bf77);}else logInfoRaw('Source\x20file\x20not\x20found:\x20'+_0xc6f65a);}logInfoRaw('Files\x20copied\x20and\x20imports\x20updated!');}__name(copyProjectFiles,'copyProjectFiles');function replaceToolsFolder(_0xf111be){let _0x596f83=_0xf111be;for(const [_0x4b9621,_0x2e1997]of Object['entries'](toolsFoldersToReplace)){if(_0x596f83['startsWith'](_0x4b9621)&&isWithIndexer(_0x2e1997)){const _0x5746eb=_0x2e1997;for(const _0x2c5a95 in _0x5746eb){const _0x50be8b=_0x5746eb[_0x2c5a95];isString(_0x50be8b)&&(_0x596f83=_0x596f83['replace'](_0x2c5a95,_0x50be8b));}break;}}return _0x596f83;}__name(replaceToolsFolder,'replaceToolsFolder');function shouldIgnorePath(_0x549db7,_0xa77ee3,_0x555e34=![]){const _0xaad736=_0x2657b6['relative'](repoRoot,_0x549db7)['replace'](/\\/g,'/'),_0x4af70e=foldersToIgnore['map'](_0x220b91=>_0x220b91['replace'](/\\/g,'/'));if(_0x4af70e['includes'](_0xaad736))return !![];if(_0x555e34){const _0x1c1513=_0x2657b6['relative'](_0xa77ee3,_0x549db7)['replace'](/\\/g,'/'),_0x28d938=_0x1c1513['split']('/');return _0x4af70e['some'](_0x7a84fb=>_0x28d938['some'](_0x5cfd87=>_0x5cfd87===_0x7a84fb));}return ![];}__name(shouldIgnorePath,'shouldIgnorePath');async function copyDirectoryContents(_0x516b90,_0x36fe04){!existsSync(_0x36fe04)&&mkdirSync(_0x36fe04,{'recursive':!![]});try{const _0xe32e15=await promises['readdir'](_0x516b90,{'withFileTypes':!![]});for(const _0x25fbcf of _0xe32e15){const _0xb8d8d7=_0x2657b6['join'](_0x516b90,_0x25fbcf['name']),_0x2c4993=_0x2657b6['join'](_0x36fe04,_0x25fbcf['name']);!shouldIgnorePath(_0xb8d8d7,_0x516b90,_0x25fbcf['isDirectory']())&&(_0x25fbcf['isDirectory']()?await copyDirectoryContents(_0xb8d8d7,_0x2c4993):await copyAndProcessFile(_0xb8d8d7,_0x2c4993));}}catch(_0x4a024c){const _0xa666ea=_0x4a024c instanceof Error?_0x4a024c['message']:'Unknown\x20error';logStringError('Error\x20reading\x20directory\x20'+_0x516b90+':\x20'+_0xa666ea);throw _0x4a024c;}}__name(copyDirectoryContents,'copyDirectoryContents');async function copyAndProcessFile(_0x4a9fd6,_0x28cfe4){const _0x5c8de0=_0x2657b6['dirname'](_0x28cfe4);!existsSync(_0x5c8de0)&&mkdirSync(_0x5c8de0,{'recursive':!![]});const _0x2e43ad=await promises['stat'](_0x4a9fd6);if(_0x2e43ad['isDirectory']())await copyDirectoryContents(_0x4a9fd6,_0x28cfe4);else {const _0x1cd805=_0x2657b6['extname'](_0x4a9fd6)['toLowerCase'](),_0x390f45=['.ico','.png','.jpg','.jpeg','.webp','.gif','.svg','.pdf'];if(_0x390f45['includes'](_0x1cd805)){await promises['copyFile'](_0x4a9fd6,_0x28cfe4);return;}const _0x22c9b8=await promises['readFile'](_0x4a9fd6,'utf8'),_0x4a2213=replaceImports(_0x22c9b8);await promises['writeFile'](_0x28cfe4,_0x4a2213,'utf8');}}__name(copyAndProcessFile,'copyAndProcessFile');function createAdditionalFolders(_0x563ecd){for(const _0x548162 of additionalFoldersToCreate){const _0x3db59f=_0x2657b6['join'](_0x563ecd,_0x548162);!existsSync(_0x3db59f)&&(mkdirSync(_0x3db59f,{'recursive':!![]}),logInfoRaw('Created\x20folder:\x20'+_0x548162));}logInfoRaw('Additional\x20folders\x20created!');}__name(createAdditionalFolders,'createAdditionalFolders');async function setupPreCommitHooks(_0x1872cc){const _0x37dc0c=_0x2657b6['join'](_0x1872cc,folders['husky']),_0x2f4d7d=_0x2657b6['join'](_0x37dc0c,files['preCommit']),_0x26cadf=_0x2657b6['join'](_0x37dc0c,files['commitMsg']);mkdirSync(_0x37dc0c,{'recursive':!![]}),await promises['writeFile'](_0x2f4d7d,cliScripts['preCommit'],'utf8'),await promises['writeFile'](_0x26cadf,cliScripts['commitMsg'],'utf8'),runCommand(cliScripts['chmodPreCommit'],_0x1872cc),runCommand(cliScripts['chmodCommitMsg'],_0x1872cc);}__name(setupPreCommitHooks,'setupPreCommitHooks');async function setupEslintConfig(_0x479713){const _0xa1deb5=_0x2657b6['join'](_0x479713,files['eslintConfigMjs']);existsSync(_0xa1deb5)&&await promises['rm'](_0xa1deb5);const _0x132a49=_0x2657b6['join'](_0x479713,files['eslintConfigJs']);await promises['writeFile'](_0x132a49,cliEslintContent,'utf8');}__name(setupEslintConfig,'setupEslintConfig');async function enableRepoModeExtras(_0x109ef7){logInfoRaw('Enabling\x20recommendation\x20mode\x20(-r)...'),runCommand(cliScripts['gitInit'],_0x109ef7),runCommand(cliScripts['installDevHuskyTsx'],_0x109ef7),runCommand(cliScripts['setLint'],_0x109ef7),runCommand(cliScripts['installHusky'],_0x109ef7),await setupPreCommitHooks(_0x109ef7);}__name(enableRepoModeExtras,'enableRepoModeExtras');async function updateLayoutTitle(_0x1f9c79,_0x4e790b){const _0x47b4b1=_0x2657b6['join'](_0x1f9c79,projectPaths['app']+'/'+files['layout']);if(!existsSync(_0x47b4b1))throw createError(files['layout']+'\x20not\x20found\x20at\x20'+_0x47b4b1+',\x20cannot\x20update\x20title.');let _0x98c251=await promises['readFile'](_0x47b4b1,'utf8');const _0x3ff355=/"SaaS Kit"/g;if(!_0x3ff355['test'](_0x98c251))throw createError('SaaS\x20Kit\x20not\x20found\x20in\x20'+files['layout']+',\x20cannot\x20update\x20title.');_0x98c251=_0x98c251['replace'](_0x3ff355,'\x22'+_0x4e790b+'\x22'),await promises['writeFile'](_0x47b4b1,_0x98c251,'utf8');}__name(updateLayoutTitle,'updateLayoutTitle');async function create(_0xaaa7fe){try{_0xaaa7fe['length']<0x7b2+-0x6b*-0x1b+-0x12fa&&(logStringError('Error:\x20Specify\x20folder\x20name.\x20Example:\x20npx\x20create-saas-kit-app\x20<folder-name>'),process['exit'](-0x15b4+0x1*0x13d+0x1478));const _0xcdd775=_0xaaa7fe[0x1f2d+-0xd67+-0x11c6],_0xe07060=_0xaaa7fe['includes']('-r'),_0x46475b=_0x2657b6['resolve'](process['cwd'](),_0xcdd775);logInfoRaw('\x0aCreating\x20'+projectName+'\x20project\x20\x22'+_0xcdd775+'\x22...\x0a');try{checkTargetFolder(_0x46475b),await createNextProject(_0xcdd775,_0x46475b),await copyProjectFiles(_0x46475b),await overridePackageJson(_0x46475b),createAdditionalFolders(_0x46475b),await createEnvFile(_0x46475b),await updateLayoutTitle(_0x46475b,_0xcdd775),await setupEslintConfig(_0x46475b),_0xe07060&&await enableRepoModeExtras(_0x46475b),logInfoRaw('\x0a'+projectName+'\x20project\x20\x22'+_0xcdd775+'\x22\x20is\x20ready!'),logInfoRaw('Next\x20steps:'),logInfoRaw('\x20\x20cd\x20'+_0xcdd775),logInfoRaw('\x20\x20npm\x20run\x20prod'),logInfoRaw('\x20\x20npm\x20start');}catch(_0x4c1a64){const _0x3b0c32=_0x4c1a64 instanceof Error?_0x4c1a64['message']:'Unknown\x20error';logStringError('Error:'),logStringError(_0x3b0c32),existsSync(_0x46475b)&&(logInfoRaw('Cleaning\x20up...'),rmSync(_0x46475b,{'recursive':!![],'force':!![]})),process['exit'](-0x1ea4+0x241*0x1+-0x2*-0xe32);}}catch(_0x69982d){const _0x21eaeb=_0x69982d instanceof Error?_0x69982d['message']:'Unknown\x20error';logStringError('Unhandled\x20error:'),logStringError(_0x21eaeb),process['exit'](0x2392+-0x8b1*-0x1+-0x2c42);}}__name(create,'create');
19
19
 
20
20
  export { create };
@@ -3,10 +3,11 @@
3
3
 
4
4
  var projectPaths = require('../../../base-repo/app-constants/project-paths.cjs.js');
5
5
 
6
- const filesToCopy=['',''+projectPaths.folders['git']];const rootFilesToCopy=['.gitignore','postcss.config.mjs','server.ts'];const appFilesToCopy=[projectPaths.clientPaths['styles'],projectPaths.projectPaths['app']+'/favicon.ico',projectPaths.projectPaths['app']+'/globals.css',projectPaths.projectPaths['app']+'/layout.tsx',projectPaths.projectPaths['app']+'/page.tsx'];const apiRoutesToCopy=[projectPaths.projectPaths['apiV1']+'/searchable-resources/route.ts',projectPaths.projectPaths['apiV1']+'/searchresult/route.ts',projectPaths.projectPaths['apiV1']+'/workspace/change/route.ts',projectPaths.projectPaths['apiV1']+'/visible-workspace/route.ts',projectPaths.projectPaths['apiV1']+'/userpermission/route.ts',projectPaths.projectPaths['apiV1']+'/userfeature/isenabled/route.ts',projectPaths.projectPaths['apiV1']+'/uimetas/route.ts',projectPaths.projectPaths['apiV1']+'/uimeta/route.ts',projectPaths.projectPaths['apiV1']+'/subscription/update/route.ts',projectPaths.projectPaths['apiV1']+'/subscription/create/route.ts',projectPaths.projectPaths['apiV1']+'/subscription/cancel/route.ts',projectPaths.projectPaths['apiV1']+'/sign-up/route.ts',projectPaths.projectPaths['apiV1']+'/sign-out/route.ts',projectPaths.projectPaths['apiV1']+'/sign-in/route.ts',projectPaths.projectPaths['apiV1']+'/preload/route.ts',projectPaths.projectPaths['apiV1']+'/payment/route.ts',projectPaths.projectPaths['apiV1']+'/payment/verify-success/route.ts',projectPaths.projectPaths['apiV1']+'/payment/verify-fail/route.ts',projectPaths.projectPaths['apiV1']+'/payment/method/route.ts',projectPaths.projectPaths['apiV1']+'/password/resetpassword/route.ts',projectPaths.projectPaths['apiV1']+'/password/forgotpassword/route.ts',projectPaths.projectPaths['apiV1']+'/otheruser/route.ts',projectPaths.projectPaths['apiV1']+'/otheruser/[id]/route.ts',projectPaths.projectPaths['apiV1']+'/log/route.ts',projectPaths.projectPaths['apiV1']+'/blob/route.ts',projectPaths.projectPaths['apiV1']+'/[resourceName]/route.ts',projectPaths.projectPaths['apiV1']+'/[resourceName]/upsert/route.ts',projectPaths.projectPaths['apiV1']+'/[resourceName]/[id]/route.ts'];const allFilesToCopy=[...filesToCopy,...rootFilesToCopy,...appFilesToCopy,...apiRoutesToCopy];
6
+ var __defProp=Object['defineProperty'],__name=(_0x4848fd,_0x22a287)=>__defProp(_0x4848fd,'name',{'value':_0x22a287,'configurable':!![]});function normalizePathForRollUpCopy(_0x1e3147){return _0x1e3147['replace'](/\/\(([^)]+)\)\//g,'/[(]$1[)]/');}__name(normalizePathForRollUpCopy,'normalizePathForRollUpCopy');const filesToCopy=['',''+projectPaths.folders['git']];const rootFilesToCopy=['.gitignore','postcss.config.mjs','server.ts'];const appFilesToCopy=[projectPaths.clientPaths['styles'],projectPaths.projectPaths['app']+'/favicon.ico',projectPaths.projectPaths['app']+'/globals.css',projectPaths.projectPaths['app']+'/layout.tsx',projectPaths.projectPaths['app']+'/page.tsx'];const apiRoutesToCopy=[projectPaths.projectPaths['apiV1F']+'/searchable-resources/route.ts',projectPaths.projectPaths['apiV1F']+'/search-result/route.ts',projectPaths.projectPaths['apiV1F']+'/workspace/change/route.ts',projectPaths.projectPaths['apiV1F']+'/visible-workspace/route.ts',projectPaths.projectPaths['apiV1F']+'/user-permission/route.ts',projectPaths.projectPaths['apiV1F']+'/user-feature/isenabled/route.ts',projectPaths.projectPaths['apiV1F']+'/uimetas/route.ts',projectPaths.projectPaths['apiV1F']+'/uimeta/route.ts',projectPaths.projectPaths['apiV1F']+'/subscription/update/route.ts',projectPaths.projectPaths['apiV1F']+'/subscription/create/route.ts',projectPaths.projectPaths['apiV1F']+'/subscription/cancel/route.ts',projectPaths.projectPaths['apiV1F']+'/sign-up/route.ts',projectPaths.projectPaths['apiV1F']+'/sign-out/route.ts',projectPaths.projectPaths['apiV1F']+'/sign-in/route.ts',projectPaths.projectPaths['apiV1F']+'/preload/route.ts',projectPaths.projectPaths['apiV1F']+'/payment/route.ts',projectPaths.projectPaths['apiV1F']+'/payment/verify-success/route.ts',projectPaths.projectPaths['apiV1F']+'/payment/verify-fail/route.ts',projectPaths.projectPaths['apiV1F']+'/payment/method/route.ts',projectPaths.projectPaths['apiV1F']+'/password/reset-password/route.ts',projectPaths.projectPaths['apiV1F']+'/password/forgot-password/route.ts',projectPaths.projectPaths['apiV1F']+'/other-user/route.ts',projectPaths.projectPaths['apiV1F']+'/other-user/[id]/route.ts',projectPaths.projectPaths['apiV1F']+'/log/route.ts',projectPaths.projectPaths['apiV1F']+'/blob/route.ts',projectPaths.projectPaths['apiV1F']+'/[resourceName]/route.ts',projectPaths.projectPaths['apiV1F']+'/[resourceName]/upsert/route.ts',projectPaths.projectPaths['apiV1F']+'/[resourceName]/[id]/route.ts'];const allFilesToCopy=[...filesToCopy,...rootFilesToCopy,...appFilesToCopy,...apiRoutesToCopy];
7
7
 
8
8
  exports.allFilesToCopy = allFilesToCopy;
9
9
  exports.apiRoutesToCopy = apiRoutesToCopy;
10
10
  exports.appFilesToCopy = appFilesToCopy;
11
11
  exports.filesToCopy = filesToCopy;
12
+ exports.normalizePathForRollUpCopy = normalizePathForRollUpCopy;
12
13
  exports.rootFilesToCopy = rootFilesToCopy;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  import { folders, clientPaths, projectPaths } from '../../../base-repo/app-constants/project-paths.js';
3
3
 
4
- const filesToCopy=['',''+folders['git']];const rootFilesToCopy=['.gitignore','postcss.config.mjs','server.ts'];const appFilesToCopy=[clientPaths['styles'],projectPaths['app']+'/favicon.ico',projectPaths['app']+'/globals.css',projectPaths['app']+'/layout.tsx',projectPaths['app']+'/page.tsx'];const apiRoutesToCopy=[projectPaths['apiV1']+'/searchable-resources/route.ts',projectPaths['apiV1']+'/searchresult/route.ts',projectPaths['apiV1']+'/workspace/change/route.ts',projectPaths['apiV1']+'/visible-workspace/route.ts',projectPaths['apiV1']+'/userpermission/route.ts',projectPaths['apiV1']+'/userfeature/isenabled/route.ts',projectPaths['apiV1']+'/uimetas/route.ts',projectPaths['apiV1']+'/uimeta/route.ts',projectPaths['apiV1']+'/subscription/update/route.ts',projectPaths['apiV1']+'/subscription/create/route.ts',projectPaths['apiV1']+'/subscription/cancel/route.ts',projectPaths['apiV1']+'/sign-up/route.ts',projectPaths['apiV1']+'/sign-out/route.ts',projectPaths['apiV1']+'/sign-in/route.ts',projectPaths['apiV1']+'/preload/route.ts',projectPaths['apiV1']+'/payment/route.ts',projectPaths['apiV1']+'/payment/verify-success/route.ts',projectPaths['apiV1']+'/payment/verify-fail/route.ts',projectPaths['apiV1']+'/payment/method/route.ts',projectPaths['apiV1']+'/password/resetpassword/route.ts',projectPaths['apiV1']+'/password/forgotpassword/route.ts',projectPaths['apiV1']+'/otheruser/route.ts',projectPaths['apiV1']+'/otheruser/[id]/route.ts',projectPaths['apiV1']+'/log/route.ts',projectPaths['apiV1']+'/blob/route.ts',projectPaths['apiV1']+'/[resourceName]/route.ts',projectPaths['apiV1']+'/[resourceName]/upsert/route.ts',projectPaths['apiV1']+'/[resourceName]/[id]/route.ts'];const allFilesToCopy=[...filesToCopy,...rootFilesToCopy,...appFilesToCopy,...apiRoutesToCopy];
4
+ var __defProp=Object['defineProperty'],__name=(_0x4848fd,_0x22a287)=>__defProp(_0x4848fd,'name',{'value':_0x22a287,'configurable':!![]});function normalizePathForRollUpCopy(_0x1e3147){return _0x1e3147['replace'](/\/\(([^)]+)\)\//g,'/[(]$1[)]/');}__name(normalizePathForRollUpCopy,'normalizePathForRollUpCopy');const filesToCopy=['',''+folders['git']];const rootFilesToCopy=['.gitignore','postcss.config.mjs','server.ts'];const appFilesToCopy=[clientPaths['styles'],projectPaths['app']+'/favicon.ico',projectPaths['app']+'/globals.css',projectPaths['app']+'/layout.tsx',projectPaths['app']+'/page.tsx'];const apiRoutesToCopy=[projectPaths['apiV1F']+'/searchable-resources/route.ts',projectPaths['apiV1F']+'/search-result/route.ts',projectPaths['apiV1F']+'/workspace/change/route.ts',projectPaths['apiV1F']+'/visible-workspace/route.ts',projectPaths['apiV1F']+'/user-permission/route.ts',projectPaths['apiV1F']+'/user-feature/isenabled/route.ts',projectPaths['apiV1F']+'/uimetas/route.ts',projectPaths['apiV1F']+'/uimeta/route.ts',projectPaths['apiV1F']+'/subscription/update/route.ts',projectPaths['apiV1F']+'/subscription/create/route.ts',projectPaths['apiV1F']+'/subscription/cancel/route.ts',projectPaths['apiV1F']+'/sign-up/route.ts',projectPaths['apiV1F']+'/sign-out/route.ts',projectPaths['apiV1F']+'/sign-in/route.ts',projectPaths['apiV1F']+'/preload/route.ts',projectPaths['apiV1F']+'/payment/route.ts',projectPaths['apiV1F']+'/payment/verify-success/route.ts',projectPaths['apiV1F']+'/payment/verify-fail/route.ts',projectPaths['apiV1F']+'/payment/method/route.ts',projectPaths['apiV1F']+'/password/reset-password/route.ts',projectPaths['apiV1F']+'/password/forgot-password/route.ts',projectPaths['apiV1F']+'/other-user/route.ts',projectPaths['apiV1F']+'/other-user/[id]/route.ts',projectPaths['apiV1F']+'/log/route.ts',projectPaths['apiV1F']+'/blob/route.ts',projectPaths['apiV1F']+'/[resourceName]/route.ts',projectPaths['apiV1F']+'/[resourceName]/upsert/route.ts',projectPaths['apiV1F']+'/[resourceName]/[id]/route.ts'];const allFilesToCopy=[...filesToCopy,...rootFilesToCopy,...appFilesToCopy,...apiRoutesToCopy];
5
5
 
6
- export { allFilesToCopy, apiRoutesToCopy, appFilesToCopy, filesToCopy, rootFilesToCopy };
6
+ export { allFilesToCopy, apiRoutesToCopy, appFilesToCopy, filesToCopy, normalizePathForRollUpCopy, rootFilesToCopy };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fernir2/saas-kit-cli",
3
- "version": "0.1.37",
3
+ "version": "0.1.39",
4
4
  "description": "CLI for creating saas-kit apps",
5
5
  "bin": {
6
6
  "saaskitcli": "./level2/cli/bin/index.js"
@@ -16,9 +16,9 @@
16
16
  "@googleapis/sheets": "9.8.0",
17
17
  "@hookform/resolvers": "3.10.0",
18
18
  "@libsql/client": "0.15.15",
19
- "@next/eslint-plugin-next": "16.0.10",
19
+ "@next/eslint-plugin-next": "16.1.1",
20
20
  "@node-rs/argon2": "2.0.2",
21
- "@nx/s3-cache": "2.1.0",
21
+ "@nx/s3-cache": "5.0.0",
22
22
  "@pulumi/kubernetes": "4.23.0",
23
23
  "@pulumi/pulumi": "3.204.0",
24
24
  "@radix-ui/react-avatar": "1.1.10",
@@ -68,7 +68,7 @@
68
68
  "lru-cache": "11.1.0",
69
69
  "lucide-react": "0.503.0",
70
70
  "module-alias": "2.2.3",
71
- "next": "16.0.10",
71
+ "next": "16.1.1",
72
72
  "nodemailer": "6.10.1",
73
73
  "pg-boss": "10.3.2",
74
74
  "plaid": "30.1.0",
@@ -116,9 +116,9 @@
116
116
  "@eslint/eslintrc": "3.3.1",
117
117
  "@eslint/js": "9.35.0",
118
118
  "@mdx-js/react": "3.1.1",
119
- "@nx/eslint": "21.5.2",
120
- "@nx/js": "21.4.1",
121
- "@nx/next": "21.0.3",
119
+ "@nx/eslint": "22.3.3",
120
+ "@nx/js": "22.3.3",
121
+ "@nx/next": "22.3.3",
122
122
  "@rollup/plugin-babel": "6.1.0",
123
123
  "@rollup/plugin-terser": "0.4.4",
124
124
  "@rollup/plugin-typescript": "12.1.4",
@@ -153,7 +153,7 @@
153
153
  "cross-env": "7.0.3",
154
154
  "drizzle-kit": "0.28.1",
155
155
  "eslint": "9.35.0",
156
- "eslint-config-next": "16.0.10",
156
+ "eslint-config-next": "16.1.1",
157
157
  "eslint-config-prettier": "10.1.8",
158
158
  "eslint-import-resolver-typescript": "4.4.4",
159
159
  "eslint-plugin-github": "6.0.0",
@@ -166,8 +166,9 @@
166
166
  "eslint-plugin-react-hooks": "5.2.0",
167
167
  "eslint-plugin-react-refresh": "0.4.20",
168
168
  "eslint-plugin-sonarjs": "3.0.5",
169
+ "globby": "16.0.0",
169
170
  "husky": "9.1.7",
170
- "nx": "21.0.3",
171
+ "nx": "22.3.3",
171
172
  "postcss": "8.5.6",
172
173
  "prettier": "3.6.2",
173
174
  "prettier-plugin-tailwindcss": "0.7.1",
@@ -1,11 +0,0 @@
1
- import { getSearchableResources } from "@meta/server/resources/searchable-resources";
2
- import { apiBadRequestResponse, apiOkResponse } from "@meta/server/web/responses";
3
- import { httpApiWrapper } from "@meta/server/web/http-api-wrapper";
4
-
5
- export const GET = httpApiWrapper(async () => {
6
- const resourceNames = Array.from((await getSearchableResources()).keys());
7
-
8
- if (!resourceNames) return apiBadRequestResponse([]);
9
-
10
- return apiOkResponse(resourceNames);
11
- });