mango-cms 0.1.14 → 0.1.17

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 (57) hide show
  1. package/cli.js +30 -1
  2. package/index.js +2 -0
  3. package/package.json +21 -2
  4. package/default/config/automation/index.js +0 -37
  5. package/default/config/collections/examples.js +0 -60
  6. package/default/config/config/.collections.json +0 -1
  7. package/default/config/config/globalFields.js +0 -15
  8. package/default/config/config/settings.json +0 -23
  9. package/default/config/config/statuses.js +0 -0
  10. package/default/config/config/users.js +0 -35
  11. package/default/config/endpoints/index.js +0 -19
  12. package/default/config/fields/vimeo.js +0 -36
  13. package/default/config/hooks/test.js +0 -5
  14. package/default/config/plugins/.gitkeep +0 -0
  15. package/default/front/README.md +0 -8
  16. package/default/front/dist/_redirects +0 -1
  17. package/default/front/dist/assets/index.00922bd5.js +0 -99
  18. package/default/front/dist/assets/index.1781f175.css +0 -1
  19. package/default/front/dist/favicon.png +0 -0
  20. package/default/front/dist/index.html +0 -53
  21. package/default/front/dist/index.js +0 -66
  22. package/default/front/index.html +0 -25
  23. package/default/front/index.js +0 -197
  24. package/default/front/package.json +0 -40
  25. package/default/front/postcss.config.js +0 -6
  26. package/default/front/public/_redirects +0 -1
  27. package/default/front/public/favicon.png +0 -0
  28. package/default/front/public/index.js +0 -66
  29. package/default/front/src/App.vue +0 -27
  30. package/default/front/src/components/layout/login.vue +0 -212
  31. package/default/front/src/components/layout/modal.vue +0 -113
  32. package/default/front/src/components/layout/spinner.vue +0 -17
  33. package/default/front/src/components/pages/404.vue +0 -28
  34. package/default/front/src/components/pages/home.vue +0 -74
  35. package/default/front/src/components/partials/button.vue +0 -31
  36. package/default/front/src/helpers/Mango.vue +0 -455
  37. package/default/front/src/helpers/breakpoints.js +0 -34
  38. package/default/front/src/helpers/darkMode.js +0 -38
  39. package/default/front/src/helpers/email.js +0 -32
  40. package/default/front/src/helpers/formatPhone.js +0 -18
  41. package/default/front/src/helpers/localDB.js +0 -315
  42. package/default/front/src/helpers/mango.js +0 -341
  43. package/default/front/src/helpers/model.js +0 -9
  44. package/default/front/src/helpers/multiSelect.vue +0 -252
  45. package/default/front/src/helpers/pills.vue +0 -75
  46. package/default/front/src/helpers/reconnecting-websocket.js +0 -357
  47. package/default/front/src/helpers/uploadFile.vue +0 -157
  48. package/default/front/src/helpers/uploadFiles.vue +0 -100
  49. package/default/front/src/helpers/uploadImages.vue +0 -89
  50. package/default/front/src/helpers/user.js +0 -40
  51. package/default/front/src/index.css +0 -281
  52. package/default/front/src/main.js +0 -145
  53. package/default/front/tailwind.config.js +0 -46
  54. package/default/front/vite.config.js +0 -10
  55. package/default/front/yarn.lock +0 -3380
  56. package/default/package.json +0 -8
  57. package/webpack.config.js +0 -56
package/cli.js CHANGED
@@ -195,6 +195,35 @@ Make sure MongoDB and Redis services are running before starting the application
195
195
  }
196
196
  });
197
197
 
198
+ program
199
+ .command('init')
200
+ .description('Initialize Mango CMS config in the current directory')
201
+ .action(async () => {
202
+ try {
203
+ const currentDir = process.cwd();
204
+ const templateConfigDir = path.join(__dirname, 'default/config');
205
+ const targetConfigDir = path.join(currentDir, 'config');
206
+
207
+ // Check if config directory already exists
208
+ if (fs.existsSync(targetConfigDir)) {
209
+ console.log('⚠️ Config directory already exists. Please remove or rename it first.');
210
+ process.exit(1);
211
+ }
212
+
213
+ console.log('Initializing Mango CMS config...');
214
+
215
+ // Copy config directory
216
+ fs.copySync(templateConfigDir, targetConfigDir);
217
+
218
+ console.log(`
219
+ ✨ Mango CMS config initialized successfully!
220
+ `);
221
+ } catch (error) {
222
+ console.error('Error initializing Mango CMS:', error.message);
223
+ process.exit(1);
224
+ }
225
+ });
226
+
198
227
  program
199
228
  .command('start')
200
229
  .description('Start the Mango CMS in watch mode')
@@ -222,7 +251,7 @@ program
222
251
  // Run Webpack with the config from @mango-cms/core, but in the user's project context
223
252
  const webpackConfigPath = path.join(cmsPackagePath, 'webpack.config.js');
224
253
  execSync(
225
- `npx webpack --config "${webpackConfigPath}" --watch`,
254
+ `npx webpack --config "${webpackConfigPath}" --watch --mode development`,
226
255
  {
227
256
  cwd: cmsPackagePath,
228
257
  stdio: 'inherit',
package/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export { default as mango } from './default/front/src/helpers/mango.js'
2
+ export { default as Mango } from './default/front/src/helpers/Mango.vue'
package/package.json CHANGED
@@ -1,7 +1,16 @@
1
1
  {
2
2
  "name": "mango-cms",
3
- "version": "0.1.14",
4
- "main": "index.js",
3
+ "version": "0.1.17",
4
+ "type": "module",
5
+ "main": "./index.js",
6
+ "exports": {
7
+ ".": "./index.js"
8
+ },
9
+ "files": [
10
+ "index.js",
11
+ "default/front/src/helpers/mango.js",
12
+ "default/front/src/helpers/Mango.vue"
13
+ ],
5
14
  "author": "Colton Neifert",
6
15
  "license": "ISC",
7
16
  "bin": {
@@ -13,6 +22,16 @@
13
22
  "watch": "NODE_OPTIONS='--trace-warnings' npx webpack --watch --mode development",
14
23
  "dev": "NODE_OPTIONS='--trace-warnings' npx webpack --watch --mode development"
15
24
  },
25
+ "peerDependencies": {
26
+ "vue": "^3.0.0",
27
+ "vue-router": "^4.0.0",
28
+ "axios": "^0.21.4",
29
+ "algoliasearch": "^4.10.3"
30
+ },
31
+ "devDependencies": {
32
+ "@vitejs/plugin-vue": "^4.0.0",
33
+ "vite": "^4.0.0"
34
+ },
16
35
  "dependencies": {
17
36
  "@aws-sdk/client-s3": "^3.423.0",
18
37
  "@aws-sdk/lib-storage": "^3.423.0",
@@ -1,37 +0,0 @@
1
- let days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
2
-
3
- Date.prototype.monthDays = function () {
4
- var d = new Date(this.getFullYear(), this.getMonth() + 1, 0);
5
- return d.getDate();
6
- }
7
-
8
- let startAutomations = function () {
9
-
10
- // console.log('starting!')
11
-
12
- setInterval(() => {
13
-
14
- // Five hour timezone offset for DigitalOcean server
15
- let now = new Date(Date.now() - 1000 * 60 * 60 * 5)
16
-
17
- let day = now.getDay()
18
- let weekday = days[day]
19
- let date = now.getDate()
20
- let month = now.getMonth()
21
-
22
- let hour = now.getHours()
23
- let minute = now.getMinutes()
24
-
25
- let monthDays = now.monthDays()
26
- let nthWeekdayOfMonth = Math.ceil(day / 7)
27
- let daysRemainingInMonth = monthDays - date
28
- let lastWeekdayOfMonth = (daysRemainingInMonth) < 7
29
-
30
- // Automations to run (cron)
31
- // if ((weekday == 'Thursday' || weekday == 'Friday') && hour == 8 && minute == 1) doSomethingCool()
32
-
33
- }, 1000 * 60);
34
-
35
- }
36
-
37
- export default startAutomations
@@ -1,60 +0,0 @@
1
- /*
2
- This is an example collection. It will inherit its name
3
- from the filename for the plural of this collection type
4
- (examples)
5
-
6
- The singular should be defined on the root of the export
7
- or it will be declared as `singularExamples` by default.
8
-
9
- There should also be a `fields` attribute on the root
10
- which contains all of the fields in the collection.
11
- Custom fields can be imported directly, and default fields
12
- can be imported from the CMS.
13
- */
14
-
15
- import fields from '@fields'
16
- let { Relationship, Image } = fields
17
-
18
- export default {
19
- permissions: {
20
- public: ['create', 'read', 'update', 'delete'],
21
- },
22
- singular: 'example',
23
- fields: {
24
- someData: String,
25
- anotherField: 'Int',
26
- anArrayOfInts: ['Int'],
27
- image: Image({ width: 500 }),
28
- /* Relationships require that you specify the singular form
29
- of the collection that you're relating to */
30
- exampleRelationship: Relationship({ collection: 'example' }),
31
- /* This is an example of a `complexField`, just think of it
32
- as a nested object structured the same way as a collection
33
- with the `fields` attribute. */
34
- someLegitData: {
35
- fields: {
36
- coordinates: {
37
- x: 'Int',
38
- y: 'Int'
39
- }
40
- }
41
- },
42
- /* There are also some sweet things like computed fields.
43
- There are some cool caching options for computed fields you
44
- can lookup in the docs */
45
- productOfXY: {
46
- computed: doc => doc.someLegitData?.coordinates?.x * doc.someLegitData?.coordinates?.y
47
- },
48
- /* Sometimes you might want to store a different type of data
49
- than you're taking in. There are some cool field options to help
50
- with this */
51
- vimeo: {
52
- inputType: 'Int',
53
- fields: {
54
- id: 'Int',
55
- url: 'String'
56
- },
57
- translateInput: input => ({ id: input, url: `https://vimeo.com/${input}` })
58
- }
59
- }
60
- }
@@ -1 +0,0 @@
1
- [{"name":"members","ssrModel":null,"titleName":"Members","singular":"member","titleSingular":"Member","humanName":" Members","humanSingular":" Member","fields":[{"name":"title","relationship":false,"instanceOf":null,"options":null,"humanName":"title","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":true,"customField":false,"global":true,"fields":null},{"name":"author","relationship":"members","instanceOf":"relationship","options":null,"humanName":"author","type":"Member","inputType":null,"computed":true,"complex":false,"translate":true,"required":false,"customField":false,"global":true,"fields":null},{"name":"editId","relationship":false,"instanceOf":null,"options":null,"humanName":"edit Id","type":"String","inputType":null,"computed":true,"complex":false,"translate":false,"required":false,"customField":false,"global":true,"fields":null},{"name":"created","relationship":false,"instanceOf":null,"options":null,"humanName":"created","type":"Float","inputType":null,"computed":true,"complex":false,"translate":false,"required":false,"customField":false,"global":true,"fields":null},{"name":"updated","relationship":false,"instanceOf":null,"options":null,"humanName":"updated","type":"Float","inputType":null,"computed":true,"complex":false,"translate":false,"required":false,"customField":false,"global":true,"fields":null},{"name":"slug","relationship":false,"instanceOf":null,"options":null,"humanName":"slug","type":"String","inputType":null,"computed":true,"complex":false,"translate":false,"required":false,"customField":false,"global":true,"fields":null},{"name":"startDate","relationship":false,"instanceOf":null,"options":null,"humanName":"start Date","type":"DateTime","inputType":"DateTime","computed":false,"complex":false,"translate":true,"required":false,"customField":false,"global":true,"fields":null},{"name":"endDate","relationship":false,"instanceOf":null,"options":null,"humanName":"end Date","type":"DateTime","inputType":"DateTime","computed":false,"complex":false,"translate":true,"required":false,"customField":false,"global":true,"fields":null},{"name":"email","relationship":false,"instanceOf":null,"options":null,"humanName":"email","type":"String","inputType":"String","computed":false,"complex":false,"translate":true,"required":false,"customField":false,"global":false,"fields":null},{"name":"password","relationship":false,"instanceOf":null,"options":null,"humanName":"password","type":"MembersPassword","inputType":"String","computed":false,"complex":true,"translate":true,"required":true,"customField":false,"global":false,"fields":[{"name":"salt","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"salt","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"hash","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"hash","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"apiKey","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"api Key","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null}]},{"name":"roles","relationship":false,"instanceOf":"select","options":["admin","member","contributor","editor"],"humanName":"roles","type":"[String]","inputType":"[String]","computed":false,"complex":false,"translate":true,"required":false,"customField":false,"global":false,"fields":null},{"name":"firstName","relationship":false,"instanceOf":null,"options":null,"humanName":"first Name","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"lastName","relationship":false,"instanceOf":null,"options":null,"humanName":"last Name","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null}]},{"name":"examples","ssrModel":null,"titleName":"Examples","singular":"example","titleSingular":"Example","humanName":" Examples","humanSingular":" Example","fields":[{"name":"title","relationship":false,"instanceOf":null,"options":null,"humanName":"title","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":true,"customField":false,"global":true,"fields":null},{"name":"author","relationship":"members","instanceOf":"relationship","options":null,"humanName":"author","type":"Member","inputType":null,"computed":true,"complex":false,"translate":true,"required":false,"customField":false,"global":true,"fields":null},{"name":"editId","relationship":false,"instanceOf":null,"options":null,"humanName":"edit Id","type":"String","inputType":null,"computed":true,"complex":false,"translate":false,"required":false,"customField":false,"global":true,"fields":null},{"name":"created","relationship":false,"instanceOf":null,"options":null,"humanName":"created","type":"Float","inputType":null,"computed":true,"complex":false,"translate":false,"required":false,"customField":false,"global":true,"fields":null},{"name":"updated","relationship":false,"instanceOf":null,"options":null,"humanName":"updated","type":"Float","inputType":null,"computed":true,"complex":false,"translate":false,"required":false,"customField":false,"global":true,"fields":null},{"name":"slug","relationship":false,"instanceOf":null,"options":null,"humanName":"slug","type":"String","inputType":null,"computed":true,"complex":false,"translate":false,"required":false,"customField":false,"global":true,"fields":null},{"name":"startDate","relationship":false,"instanceOf":null,"options":null,"humanName":"start Date","type":"DateTime","inputType":"DateTime","computed":false,"complex":false,"translate":true,"required":false,"customField":false,"global":true,"fields":null},{"name":"endDate","relationship":false,"instanceOf":null,"options":null,"humanName":"end Date","type":"DateTime","inputType":"DateTime","computed":false,"complex":false,"translate":true,"required":false,"customField":false,"global":true,"fields":null},{"name":"someData","relationship":false,"instanceOf":null,"options":null,"humanName":"some Data","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"anotherField","relationship":false,"instanceOf":null,"options":null,"humanName":"another Field","type":"Int","inputType":"Int","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"anArrayOfInts","array":true,"relationship":false,"instanceOf":null,"options":null,"humanName":"an Array Of Ints","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"image","relationship":false,"instanceOf":"image","options":null,"humanName":"image","type":"ExamplesImage","inputType":"String","computed":false,"complex":true,"translate":true,"required":false,"customField":false,"global":false,"fields":[{"name":"width","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"width","type":"Int","inputType":"Int","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"height","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"height","type":"Int","inputType":"Int","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"url","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"url","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null}]},{"name":"exampleRelationship","relationship":"examples","instanceOf":"relationship","options":null,"humanName":"example Relationship","type":"[Example]","inputType":"[String]","computed":false,"complex":false,"translate":true,"required":false,"customField":false,"global":false,"fields":null},{"name":"someLegitData","relationship":false,"instanceOf":null,"options":null,"humanName":"some Legit Data","type":"ExamplesSomeLegitData","inputType":"CreateExamplesSomeLegitDataInput","computed":false,"complex":true,"translate":false,"required":false,"customField":true,"global":false,"fields":[{"name":"coordinates","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"coordinates","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null}]},{"name":"productOfXY","relationship":false,"instanceOf":null,"options":null,"humanName":"product Of X Y","type":"String","inputType":null,"computed":true,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"vimeo","relationship":false,"instanceOf":null,"options":null,"humanName":"vimeo","type":"ExamplesVimeo","inputType":"Int","computed":false,"complex":true,"translate":true,"required":false,"customField":false,"global":false,"fields":[{"name":"id","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"id","type":"Int","inputType":"Int","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"url","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"url","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null}]}]},{"name":"items","ssrModel":null,"titleName":"Items","singular":"item","titleSingular":"Item","humanName":" Items","humanSingular":" Item","library":"Mango-stand","fields":[{"name":"title","relationship":false,"instanceOf":null,"options":null,"humanName":"title","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":true,"customField":false,"global":true,"fields":null},{"name":"author","relationship":"members","instanceOf":"relationship","options":null,"humanName":"author","type":"Member","inputType":null,"computed":true,"complex":false,"translate":true,"required":false,"customField":false,"global":true,"fields":null},{"name":"editId","relationship":false,"instanceOf":null,"options":null,"humanName":"edit Id","type":"String","inputType":null,"computed":true,"complex":false,"translate":false,"required":false,"customField":false,"global":true,"fields":null},{"name":"created","relationship":false,"instanceOf":null,"options":null,"humanName":"created","type":"Float","inputType":null,"computed":true,"complex":false,"translate":false,"required":false,"customField":false,"global":true,"fields":null},{"name":"updated","relationship":false,"instanceOf":null,"options":null,"humanName":"updated","type":"Float","inputType":null,"computed":true,"complex":false,"translate":false,"required":false,"customField":false,"global":true,"fields":null},{"name":"slug","relationship":false,"instanceOf":null,"options":null,"humanName":"slug","type":"String","inputType":null,"computed":true,"complex":false,"translate":false,"required":false,"customField":false,"global":true,"fields":null},{"name":"startDate","relationship":false,"instanceOf":null,"options":null,"humanName":"start Date","type":"DateTime","inputType":"DateTime","computed":false,"complex":false,"translate":true,"required":false,"customField":false,"global":true,"fields":null},{"name":"endDate","relationship":false,"instanceOf":null,"options":null,"humanName":"end Date","type":"DateTime","inputType":"DateTime","computed":false,"complex":false,"translate":true,"required":false,"customField":false,"global":true,"fields":null},{"name":"price","relationship":false,"instanceOf":null,"options":null,"humanName":"price","type":"Int","inputType":"Int","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"stock","relationship":false,"instanceOf":null,"options":null,"humanName":"stock","type":"Int","inputType":"Int","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"description","relationship":false,"instanceOf":null,"options":null,"humanName":"description","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null}]},{"name":"carts","ssrModel":null,"titleName":"Carts","singular":"cart","titleSingular":"Cart","humanName":" Carts","humanSingular":" Cart","library":"Mango-stand","fields":[{"name":"title","relationship":false,"instanceOf":null,"options":null,"humanName":"title","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"author","relationship":"members","instanceOf":"relationship","options":null,"humanName":"author","type":"Member","inputType":null,"computed":true,"complex":false,"translate":true,"required":false,"customField":false,"global":true,"fields":null},{"name":"editId","relationship":false,"instanceOf":null,"options":null,"humanName":"edit Id","type":"String","inputType":null,"computed":true,"complex":false,"translate":false,"required":false,"customField":false,"global":true,"fields":null},{"name":"created","relationship":false,"instanceOf":null,"options":null,"humanName":"created","type":"Float","inputType":null,"computed":true,"complex":false,"translate":false,"required":false,"customField":false,"global":true,"fields":null},{"name":"updated","relationship":false,"instanceOf":null,"options":null,"humanName":"updated","type":"Float","inputType":null,"computed":true,"complex":false,"translate":false,"required":false,"customField":false,"global":true,"fields":null},{"name":"slug","relationship":false,"instanceOf":null,"options":null,"humanName":"slug","type":"String","inputType":null,"computed":true,"complex":false,"translate":false,"required":false,"customField":false,"global":true,"fields":null},{"name":"startDate","relationship":false,"instanceOf":null,"options":null,"humanName":"start Date","type":"DateTime","inputType":"DateTime","computed":false,"complex":false,"translate":true,"required":false,"customField":false,"global":true,"fields":null},{"name":"endDate","relationship":false,"instanceOf":null,"options":null,"humanName":"end Date","type":"DateTime","inputType":"DateTime","computed":false,"complex":false,"translate":true,"required":false,"customField":false,"global":true,"fields":null},{"name":"transactionId","relationship":false,"instanceOf":null,"options":null,"humanName":"transaction Id","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"finalized","relationship":false,"instanceOf":null,"options":null,"humanName":"finalized","type":"Boolean","inputType":"Boolean","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"completed","relationship":false,"instanceOf":null,"options":null,"humanName":"completed","type":"Boolean","inputType":"Boolean","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"completedDate","relationship":false,"instanceOf":null,"options":null,"humanName":"completed Date","type":"DateTime","inputType":"DateTime","computed":false,"complex":false,"translate":true,"required":false,"customField":false,"global":false,"fields":null},{"name":"cartItems","array":true,"relationship":false,"instanceOf":null,"options":null,"humanName":"cart Items","type":"CartsCartItems","inputType":"CreateCartsCartItemsInput","computed":false,"complex":true,"translate":false,"required":false,"customField":true,"global":false,"fields":[{"name":"quantity","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"quantity","type":"Int","inputType":"Int","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"discount","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"discount","type":"Float","inputType":"Float","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"item","array":false,"relationship":"items","instanceOf":"relationship","options":null,"humanName":"item","type":"Item","inputType":"String","computed":false,"complex":false,"translate":true,"required":false,"customField":false,"global":false,"fields":null}]},{"name":"coupons","relationship":"discounts","instanceOf":"relationship","options":null,"humanName":"coupons","type":"[Discount]","inputType":"[String]","computed":false,"complex":false,"translate":true,"required":false,"customField":false,"global":false,"fields":null},{"name":"customerId","relationship":false,"instanceOf":null,"options":null,"humanName":"customer Id","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"billing","relationship":false,"instanceOf":null,"options":null,"humanName":"billing","type":"CartsBilling","inputType":"CreateCartsBillingInput","computed":false,"complex":true,"translate":false,"required":false,"customField":true,"global":false,"fields":[{"name":"paymentId","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"payment Id","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"firstName","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"first Name","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"lastName","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"last Name","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"phoneNumber","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"phone Number","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"address","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"address","type":"CartsBillingAddress","inputType":"CreateCartsBillingAddressInput","computed":false,"complex":true,"translate":false,"required":false,"customField":true,"global":false,"fields":[{"name":"venue","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"venue","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"address","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"address","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"city","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"city","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"state","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"state","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"zip","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"zip","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"country","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"country","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"human","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"human","type":"String","inputType":null,"computed":true,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"coordinates","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"coordinates","type":"CartsBillingAddressCoordinates","inputType":null,"computed":true,"complex":true,"translate":false,"required":false,"customField":true,"global":false,"fields":[{"name":"lat","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"lat","type":"Float","inputType":"Float","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"lng","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"lng","type":"Float","inputType":"Float","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null}]}]},{"name":"payment","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"payment","type":"CartsBillingPayment","inputType":"CreateCartsBillingPaymentInput","computed":false,"complex":true,"translate":false,"required":false,"customField":true,"global":false,"fields":[{"name":"creditCard","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"credit Card","type":"CartsBillingPaymentCreditCard","inputType":"CreateCartsBillingPaymentCreditCardInput","computed":false,"complex":true,"translate":false,"required":false,"customField":true,"global":false,"fields":[{"name":"cardNumber","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"card Number","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"cardType","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"card Type","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"expirationDate","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"expiration Date","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null}]},{"name":"bankAccount","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"bank Account","type":"CartsBillingPaymentBankAccount","inputType":"CreateCartsBillingPaymentBankAccountInput","computed":false,"complex":true,"translate":false,"required":false,"customField":true,"global":false,"fields":[{"name":"accountNumber","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"account Number","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"accountType","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"account Type","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"echeckType","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"echeck Type","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"nameOnAccount","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"name On Account","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"routingNumber","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"routing Number","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null}]}]}]},{"name":"shipping","relationship":false,"instanceOf":null,"options":null,"humanName":"shipping","type":"CartsShipping","inputType":"CreateCartsShippingInput","computed":false,"complex":true,"translate":false,"required":false,"customField":true,"global":false,"fields":[{"name":"method","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"method","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"price","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"price","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"addressId","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"address Id","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"firstName","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"first Name","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"lastName","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"last Name","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"phoneNumber","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"phone Number","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"address","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"address","type":"CartsShippingAddress","inputType":"CreateCartsShippingAddressInput","computed":false,"complex":true,"translate":false,"required":false,"customField":true,"global":false,"fields":[{"name":"venue","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"venue","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"address","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"address","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"city","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"city","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"state","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"state","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"zip","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"zip","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"country","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"country","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"human","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"human","type":"String","inputType":null,"computed":true,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"coordinates","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"coordinates","type":"CartsShippingAddressCoordinates","inputType":null,"computed":true,"complex":true,"translate":false,"required":false,"customField":true,"global":false,"fields":[{"name":"lat","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"lat","type":"Float","inputType":"Float","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"lng","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"lng","type":"Float","inputType":"Float","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null}]}]},{"name":"free","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"free","type":"Boolean","inputType":null,"computed":true,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null}]},{"name":"price","relationship":false,"instanceOf":null,"options":null,"humanName":"price","type":"CartsPrice","inputType":null,"computed":true,"complex":true,"translate":false,"required":false,"customField":true,"global":false,"fields":[{"name":"subtotal","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"subtotal","type":"Float","inputType":"Float","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"discount","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"discount","type":"Float","inputType":"Float","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"total","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"total","type":"Float","inputType":"Float","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null}]}]},{"name":"discounts","ssrModel":null,"titleName":"Discounts","singular":"discount","titleSingular":"Discount","humanName":" Discounts","humanSingular":" Discount","library":"Mango-stand","fields":[{"name":"title","relationship":false,"instanceOf":null,"options":null,"humanName":"title","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":true,"customField":false,"global":true,"fields":null},{"name":"author","relationship":"members","instanceOf":"relationship","options":null,"humanName":"author","type":"Member","inputType":null,"computed":true,"complex":false,"translate":true,"required":false,"customField":false,"global":true,"fields":null},{"name":"editId","relationship":false,"instanceOf":null,"options":null,"humanName":"edit Id","type":"String","inputType":null,"computed":true,"complex":false,"translate":false,"required":false,"customField":false,"global":true,"fields":null},{"name":"created","relationship":false,"instanceOf":null,"options":null,"humanName":"created","type":"Float","inputType":null,"computed":true,"complex":false,"translate":false,"required":false,"customField":false,"global":true,"fields":null},{"name":"updated","relationship":false,"instanceOf":null,"options":null,"humanName":"updated","type":"Float","inputType":null,"computed":true,"complex":false,"translate":false,"required":false,"customField":false,"global":true,"fields":null},{"name":"slug","relationship":false,"instanceOf":null,"options":null,"humanName":"slug","type":"String","inputType":null,"computed":true,"complex":false,"translate":false,"required":false,"customField":false,"global":true,"fields":null},{"name":"startDate","relationship":false,"instanceOf":null,"options":null,"humanName":"start Date","type":"DateTime","inputType":"DateTime","computed":false,"complex":false,"translate":true,"required":false,"customField":false,"global":true,"fields":null},{"name":"endDate","relationship":false,"instanceOf":null,"options":null,"humanName":"end Date","type":"DateTime","inputType":"DateTime","computed":false,"complex":false,"translate":true,"required":false,"customField":false,"global":true,"fields":null},{"name":"type","relationship":false,"instanceOf":"select","options":["coupon","sale"],"humanName":"type","type":"String","inputType":"String","computed":false,"complex":false,"translate":true,"required":true,"customField":false,"global":false,"fields":null},{"name":"code","relationship":false,"instanceOf":null,"options":null,"humanName":"code","type":"String","inputType":"String","computed":false,"complex":false,"translate":true,"required":true,"customField":false,"global":false,"fields":null},{"name":"limitations","relationship":false,"instanceOf":null,"options":null,"humanName":"limitations","type":"DiscountsLimitations","inputType":"CreateDiscountsLimitationsInput","computed":false,"complex":true,"translate":false,"required":false,"customField":true,"global":false,"fields":[{"name":"items","array":false,"relationship":"items","instanceOf":"relationship","options":null,"humanName":"items","type":"[Item]","inputType":"[String]","computed":false,"complex":false,"translate":true,"required":false,"customField":false,"global":false,"fields":null},{"name":"perCustomer","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"per Customer","type":"Int","inputType":"Int","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"totalUses","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"total Uses","type":"Int","inputType":"Int","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"perOrder","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"per Order","type":"Int","inputType":"Int","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"quantity","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"quantity","type":"Int","inputType":"Int","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null}]},{"name":"freeShipping","relationship":false,"instanceOf":null,"options":null,"humanName":"free Shipping","type":"Boolean","inputType":"Boolean","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"discount","relationship":false,"instanceOf":null,"options":null,"humanName":"discount","type":"DiscountsDiscount","inputType":"String","computed":false,"complex":true,"translate":true,"required":false,"customField":false,"example":"$12.50 or 50% etc.","global":false,"fields":[{"name":"type","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"type","type":"String","inputType":"String","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null},{"name":"value","array":false,"relationship":false,"instanceOf":null,"options":null,"humanName":"value","type":"Float","inputType":"Float","computed":false,"complex":false,"translate":false,"required":false,"customField":false,"global":false,"fields":null}]}]}]
@@ -1,15 +0,0 @@
1
- import fields from '@cms/1. build/fields'
2
- let { PlainText, Select, Timestamp, Relationship } = fields
3
-
4
- export default {
5
-
6
- title: PlainText({ required: true }),
7
- author: Relationship({ collection: 'member', single: true, computed: (doc, req) => [req?.member?.id] || [] }),
8
- editId: { computed: (doc, req) => req?.member?.id || null },
9
- created: { computed: doc => doc.created || new Date, type: 'Float' },
10
- updated: { computed: doc => doc.updated ? new Date : doc.created, type: 'Float' },
11
- slug: { computed: doc => doc?.title?.toLowerCase()?.trim()?.replace(/[^a-zA-Z0-9\s]/g, '')?.replace(/\s/g, '-') },
12
- startDate: Timestamp(),
13
- endDate: Timestamp(),
14
-
15
- }
@@ -1,23 +0,0 @@
1
- {
2
- "port": 3001,
3
- "siteName": "Example",
4
- "siteDomain": "example.com",
5
-
6
- "domain": "api.example.com",
7
-
8
- "mongoURI":"mongodb://127.0.0.1:27017",
9
- "database":"exampleMongoDB",
10
-
11
- "s3AccessKeyId": null,
12
- "s3AccessKeySecret": null,
13
- "s3Region": null,
14
- "s3Bucket":"exampleBucket",
15
-
16
- "mailgunKey": null,
17
- "mailgunDomain": null,
18
-
19
- "algoliaAppId": null,
20
- "algoliaSearchKey": null,
21
- "algoliaIndex": null
22
-
23
- }
File without changes
@@ -1,35 +0,0 @@
1
- import { readEntries, updateEntry } from "@cms/1. build/libraries/mongo"
2
-
3
- export default {
4
- fields: {
5
- firstName: String,
6
- lastName: String,
7
- },
8
- families: {
9
- contributors: { singular: 'contributor' },
10
- editors: { singular: 'editor' },
11
- },
12
- hooks: {
13
- async created({ document }) {
14
-
15
- let members = await readEntries({ collection: 'members' })
16
- if (members.length == 1 && members[0].id == document.id) {
17
-
18
- document.roles = ['admin']
19
- document.authorId = document.id
20
- document.author = document.id
21
-
22
- await updateEntry({
23
- collection: 'members',
24
- document: {
25
- roles: ['admin'],
26
- author: [document.id],
27
- authorId: document.id
28
- },
29
- search: { id: document.id }
30
- })
31
- }
32
-
33
- }
34
- }
35
- }
@@ -1,19 +0,0 @@
1
- export default {
2
- test: {
3
- async get(req) {
4
- return `Mango is online! 🥭`
5
- }
6
- },
7
- contact: {
8
- admin: {
9
- async post(req) {
10
- return `You hit /contact/admin with a post request`
11
- }
12
- },
13
- editor: {
14
- async get(req) {
15
- return `You hit /contact/editor with a get request`
16
- }
17
- }
18
- },
19
- }
@@ -1,36 +0,0 @@
1
- import axios from 'axios'
2
- const apiKey = 'YOUR-VIMEO-API-KEY'
3
-
4
- const getVideoThumbnail = async function (video) {
5
- let videoData = await axios.get(`https://vimeo.com/api/v2/video/${video.id}.json`)
6
- return videoData?.data?.[0]?.thumbnail_large
7
- }
8
-
9
- // const getDownloadLink = async function(video) {
10
- // let url = `https://api.vimeo.com/videos/${video.id}?access_token=${apiKey}`
11
- // let videoData = await axios.get(url)
12
- // videoData = videoData?.data?.download?.filter(download => download?.quality != 'source')
13
- // let bestDownload = videoData.reduce((challenger, champ) => challenger.height > champ.height ? challenger : champ, videoData[0])
14
- // return bestDownload?.link
15
- // }
16
-
17
- export default {
18
- type: 'Vimeo',
19
- inputType: String,
20
- fields: {
21
- id: {},
22
- url: {},
23
- thumbnail: {
24
- computed: getVideoThumbnail,
25
- expireCache: 60 * 60 * 24 * 30
26
- },
27
- // download: {
28
- // computed: getDownloadLink,
29
- // expireCache: 60*60*24*1
30
- // },
31
- },
32
- translateInput: input => ({
33
- id: `${input}`,
34
- url: `https://vimeo.com/${input}`,
35
- })
36
- }
@@ -1,5 +0,0 @@
1
- const exampleHook = () => {
2
- console.log(`Hey, I'm the result of an example hook running! (You can find me at ${import.meta.url})`)
3
- }
4
-
5
- export { exampleHook }
File without changes
@@ -1,8 +0,0 @@
1
- # Vue 3 + Vite
2
-
3
- This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
4
-
5
- ## Recommended IDE Setup
6
-
7
- - [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)
8
- # cfl-front
@@ -1 +0,0 @@
1
- /* /index.html 200