@stacksjs/config 0.66.0 → 0.68.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/defaults.ts DELETED
@@ -1,618 +0,0 @@
1
- import type { StacksOptions } from '@stacksjs/types'
2
- import { commandsPath, userDatabasePath } from '@stacksjs/path'
3
-
4
- // import { userConfig as overrides } from './overrides'
5
-
6
- const config: StacksOptions = {
7
- ai: {
8
- deploy: false,
9
- models: [
10
- 'amazon.titan-embed-text-v1',
11
- 'amazon.titan-text-express-v1',
12
- 'amazon.titan-embed-image-v1',
13
- 'amazon.titan-image-generator-v1',
14
- 'anthropic.claude-v1',
15
- 'anthropic.claude-v2',
16
- 'anthropic.claude-v2:1',
17
- 'anthropic.claude-instant-v1',
18
- 'meta.llama2-13b-chat-v1',
19
- 'meta.llama2-70b-chat-v1',
20
- ],
21
- },
22
-
23
- analytics: {
24
- driver: undefined,
25
- },
26
-
27
- // api: {
28
- // // version: 'v1',
29
- // prefix: 'api',
30
- // middleware: ['Api'],
31
- // routes: {
32
- // index: true,
33
- // show: true,
34
- // store: true,
35
- // update: true,
36
- // destroy: true,
37
- // },
38
- // },
39
-
40
- app: {
41
- name: 'Stacks',
42
- description: 'A Stacks application.',
43
- env: 'local',
44
- url: 'stacks.localhost',
45
- debug: true,
46
- key: '',
47
- timezone: 'UTC',
48
- locale: 'en',
49
- fallbackLocale: 'en',
50
- cipher: 'AES-256-CBC',
51
- docMode: false,
52
- redirectUrls: [],
53
- maintenanceMode: false,
54
- },
55
-
56
- cli: {
57
- name: 'My Custom CLI',
58
- command: 'my-custom-cli',
59
- description: 'Stacks is a full-stack framework for TypeScript.',
60
- source: commandsPath(),
61
- deploy: false,
62
- },
63
-
64
- cache: {
65
- driver: 'redis',
66
- prefix: 'stx',
67
- ttl: 3600,
68
-
69
- drivers: {
70
- redis: {
71
- connection: 'default',
72
- host: 'localhost',
73
- port: 6379,
74
- username: '',
75
- password: '',
76
- },
77
- },
78
- },
79
-
80
- cloud: {
81
- type: 'serverless',
82
-
83
- driver: 'aws',
84
-
85
- storage: {},
86
-
87
- environments: ['production', 'staging', 'development'],
88
-
89
- firewall: {
90
- enabled: true,
91
- countryCodes: [],
92
- ipAddresses: [],
93
- queryString: [],
94
- httpHeaders: [],
95
- // ipSets: [],
96
- rateLimitPerMinute: 1000,
97
- useIpReputationLists: true,
98
- useKnownBadInputsRuleSet: true,
99
- },
100
-
101
- cdn: {
102
- allowedMethods: 'GET_HEAD',
103
- cachedMethods: 'GET_HEAD',
104
- minTtl: 0,
105
- defaultTtl: 86400,
106
- maxTtl: 31536000,
107
- compress: true,
108
- priceClass: 'PriceClass_All',
109
- originShieldRegion: 'us-east-1',
110
- cookieBehavior: 'none',
111
- allowList: {
112
- cookies: [],
113
- headers: [],
114
- queryStrings: [],
115
- },
116
- realtimeLogs: {
117
- enabled: true,
118
- samplingRate: 2,
119
- },
120
- },
121
-
122
- fileSystem: false,
123
- },
124
-
125
- database: {
126
- default: 'sqlite',
127
-
128
- connections: {
129
- sqlite: {
130
- database: userDatabasePath('stacks.sqlite'),
131
- prefix: '',
132
- },
133
- },
134
-
135
- migrations: 'migrations',
136
- migrationLocks: 'migration_locks',
137
- },
138
-
139
- dns: {
140
- driver: 'aws',
141
- a: [],
142
- aaaa: [],
143
- cname: [],
144
- mx: [],
145
- txt: [],
146
- },
147
-
148
- docs: {
149
- lang: 'en-US',
150
- title: 'Stacks',
151
- description: 'Rapid application, cloud & library framework.',
152
- lastUpdated: true,
153
- deploy: false,
154
-
155
- themeConfig: {
156
- editLink: {
157
- pattern: 'https://github.com/stacksjs/stacks/edit/main/docs/docs/:path',
158
- text: 'Edit this page on GitHub',
159
- },
160
-
161
- footer: {
162
- message: 'Released under the MIT License.',
163
- copyright: 'Copyright © 2024-present Stacks.js, Inc.',
164
- },
165
-
166
- // algolia: services.algolia,
167
-
168
- // carbonAds: {
169
- // code: '',
170
- // placement: '',
171
- // },
172
- },
173
- },
174
-
175
- email: {
176
- from: {
177
- name: 'Stacks',
178
- address: 'no-reply@stacksjs.org',
179
- },
180
-
181
- mailboxes: [],
182
-
183
- server: {
184
- scan: true,
185
- },
186
- },
187
-
188
- errors: {
189
- messages: {
190
- 'string': 'The {{ field }} field must be a string',
191
- 'email': 'The {{ field }} field must be a valid email address',
192
- 'regex': 'The {{ field }} field format is invalid',
193
- 'url': 'The {{ field }} field must be a valid URL',
194
- 'activeUrl': 'The {{ field }} field must be a valid URL',
195
- 'alpha': 'The {{ field }} field must contain only letters',
196
- 'alphaNumeric': 'The {{ field }} field must contain only letters and numbers',
197
- 'minLength': 'The {{ field }} field must have at least {{ min }} characters',
198
- 'maxLength': 'The {{ field }} field must not be greater than {{ max }} characters',
199
- 'fixedLength': 'The {{ field }} field must be {{ size }} characters long',
200
- 'confirmed': 'The {{ field }} field and {{ otherField }} field must be the same',
201
- 'endsWith': 'The {{ field }} field must end with {{ substring }}',
202
- 'startsWith': 'The {{ field }} field must start with {{ substring }}',
203
- 'sameAs': 'The {{ field }} field and {{ otherField }} field must be the same',
204
- 'notSameAs': 'The {{ field }} field and {{ otherField }} field must be different',
205
- 'in': 'The selected {{ field }} is invalid',
206
- 'notIn': 'The selected {{ field }} is invalid',
207
- 'ipAddress': 'The {{ field }} field must be a valid IP address',
208
- 'uuid': 'The {{ field }} field must be a valid UUID',
209
- 'ascii': 'The {{ field }} field must only contain ASCII characters',
210
- 'creditCard': 'The {{ field }} field must be a valid {{ providersList }} card number',
211
- 'hexCode': 'The {{ field }} field must be a valid hex color code',
212
- 'iban': 'The {{ field }} field must be a valid IBAN number',
213
- 'jwt': 'The {{ field }} field must be a valid JWT token',
214
- 'coordinates': 'The {{ field }} field must contain latitude and longitude coordinates',
215
- 'mobile': 'The {{ field }} field must be a valid mobile phone number',
216
- 'passport': 'The {{ field }} field must be a valid passport number',
217
- 'postalCode': 'The {{ field }} field must be a valid postal code',
218
-
219
- // boolean
220
- 'boolean': 'The value must be a boolean',
221
-
222
- // number
223
- 'number': 'The {{ field }} field must be a number',
224
- 'min': 'The {{ field }} field must be at least {{ min }}',
225
- 'max': 'The {{ field }} field must not be greater than {{ max }}',
226
- 'range': 'The {{ field }} field must be between {{ min }} and {{ max }}',
227
- 'positive': 'The {{ field }} field must be positive',
228
- 'negative': 'The {{ field }} field must be negative',
229
- 'decimal': 'The {{ field }} field must have {{ digits }} decimal places',
230
- 'withoutDecimals': 'The {{ field }} field must not have decimal places',
231
-
232
- // date
233
- 'date': 'The {{ field }} field must be a datetime value',
234
- 'date.equals': 'The {{ field }} field must be a date equal to {{ expectedValue }}',
235
- 'date.after': 'The {{ field }} field must be a date after {{ expectedValue }}',
236
- 'date.before': 'The {{ field }} field must be a date before {{ expectedValue }}',
237
- 'date.afterOrEqual': 'The {{ field }} field must be a date after or equal to {{ expectedValue }}',
238
- 'date.beforeOrEqual': 'The {{ field }} field must be a date before or equal to {{ expectedValue }}',
239
- 'date.sameAs': 'The {{ field }} field and {{ otherField }} field must be the same',
240
- 'date.notSameAs': 'The {{ field }} field and {{ otherField }} field must be different',
241
- 'date.afterField': 'The {{ field }} field must be a date after {{ otherField }}',
242
-
243
- // accepted
244
- 'accepted': 'The {{ field }} field must be accepted',
245
-
246
- // enum
247
- 'enum': 'The selected {{ field }} is invalid',
248
-
249
- // literal
250
- 'literal': 'The {{ field }} field must be {{ expectedValue }}',
251
-
252
- // object
253
- 'object': 'The {{ field }} field must be an object',
254
-
255
- // record
256
- 'record': 'The {{ field }} field must be an object',
257
- 'record.minLength': 'The {{ field }} field must have at least {{ min }} items',
258
- 'record.maxLength': 'The {{ field }} field must not have more than {{ max }} items',
259
- 'record.fixedLength': 'The {{ field }} field must contain {{ size }} items',
260
-
261
- // array
262
- 'array': 'The {{ field }} field must be an array',
263
- 'array.minLength': 'The {{ field }} field must have at least {{ min }} items',
264
- 'array.maxLength': 'The {{ field }} field must not have more than {{ max }} items',
265
- 'array.fixedLength': 'The {{ field }} field must contain {{ size }} items',
266
- 'notEmpty': 'The {{ field }} field must not be empty',
267
- 'distinct': 'The {{ field }} field has duplicate values',
268
-
269
- // tuple
270
- 'tuple': 'The {{ field }} field must be an array',
271
-
272
- // union
273
- 'union': 'Invalid value provided for {{ field }} field',
274
- 'unionGroup': 'Invalid value provided for {{ field }} field',
275
- 'unionOfTypes': 'Invalid value provided for {{ field }} field',
276
- },
277
- },
278
-
279
- git: {
280
- hooks: {
281
- 'pre-commit': 'lint-staged',
282
- },
283
-
284
- scopes: [
285
- '',
286
- 'ci',
287
- 'deps',
288
- 'dx',
289
- 'release',
290
- 'docs',
291
- 'test',
292
- 'core',
293
- 'actions',
294
- 'arrays',
295
- 'auth',
296
- 'build',
297
- 'cache',
298
- 'cli',
299
- 'cloud',
300
- 'collections',
301
- 'config',
302
- 'database',
303
- 'datetime',
304
- 'docs',
305
- 'errors',
306
- 'git',
307
- 'lint',
308
- 'x-ray',
309
- 'modules',
310
- 'notifications',
311
- 'objects',
312
- 'path',
313
- 'realtime',
314
- 'router',
315
- 'buddy',
316
- 'security',
317
- 'server',
318
- 'storage',
319
- 'strings',
320
- 'tests',
321
- 'types',
322
- 'ui',
323
- 'utils',
324
- ],
325
-
326
- messages: {
327
- type: 'Select the type of change that you’re committing:',
328
- scope: 'Select the SCOPE of this change (optional):',
329
- customScope: 'Select the SCOPE of this change:',
330
- subject: 'Write a SHORT, IMPERATIVE tense description of the change:\n',
331
- body: 'Provide a LONGER description of the change (optional). Use "|" to break new line:\n',
332
- breaking: 'List any BREAKING CHANGES (optional). Use "|" to break new line:\n',
333
- footerPrefixesSelect: 'Select the ISSUES type of the change list by this change (optional):',
334
- customFooterPrefixes: 'Input ISSUES prefix:',
335
- footer: 'List any ISSUES by this change. E.g.: #31, #34:\n',
336
- confirmCommit: 'Are you sure you want to proceed with the commit above?',
337
- },
338
-
339
- types: [
340
- {
341
- value: 'feat',
342
- name: 'feat: ✨ A new feature',
343
- emoji: ':sparkles:',
344
- },
345
- { value: 'fix', name: 'fix: 🐛 A bug fix', emoji: ':bug:' },
346
- {
347
- value: 'docs',
348
- name: 'docs: 📝 Documentation only changes',
349
- emoji: ':memo:',
350
- },
351
- {
352
- value: 'style',
353
- name: 'style: 💄 Changes that do not affect the meaning of the code',
354
- emoji: ':lipstick:',
355
- },
356
- {
357
- value: 'refactor',
358
- name: 'refactor: ♻️ A code change that neither fixes a bug nor adds a feature',
359
- emoji: ':recycle:',
360
- },
361
- {
362
- value: 'perf',
363
- name: 'perf: ⚡️ A code change that improves performance',
364
- emoji: ':zap:',
365
- },
366
- {
367
- value: 'test',
368
- name: 'test: ✅ Adding missing tests or adjusting existing tests',
369
- emoji: ':white_check_mark:',
370
- },
371
- {
372
- value: 'build',
373
- name: 'build: 📦️ Changes that affect the build system or external dependencies',
374
- emoji: ':package:',
375
- },
376
- {
377
- value: 'ci',
378
- name: 'ci: 🎡 Changes to our CI configuration files and scripts',
379
- emoji: ':ferris_wheel:',
380
- },
381
- {
382
- value: 'chore',
383
- name: 'chore: 🔨 Other changes that don’t modify src or test files',
384
- emoji: ':hammer:',
385
- },
386
- {
387
- value: 'revert',
388
- name: 'revert: ⏪️ Reverts a previous commit',
389
- emoji: ':rewind:',
390
- },
391
- ],
392
- },
393
-
394
- hashing: {
395
- driver: 'argon2',
396
-
397
- bcrypt: {
398
- rounds: 10,
399
- cost: 4, // number between 4-31
400
- },
401
-
402
- argon2: {
403
- memory: 65536, // memory usage in kibibytes
404
- // threads: 1,
405
- time: 1, // the number of iterations
406
- },
407
- },
408
-
409
- library: {
410
- name: 'hello-world',
411
- owner: '@stacksjs', // you may or may not add the @ prefix here (it is added automatically)
412
- repository: 'stacksjs/stacks',
413
- license: 'MIT',
414
- author: 'Chris Breuer',
415
- contributors: ['Chris Breuer <chris@stacksjs.org>'],
416
- defaultLanguage: 'en',
417
-
418
- vueComponents: {
419
- name: 'hello-world-vue',
420
- description: 'Your Vue component library description',
421
- keywords: ['component', 'library', 'vue', 'vite', 'typescript', 'javascript'],
422
- tags: [
423
- {
424
- name: ['HelloWorld', 'AppHelloWorld'],
425
- description: 'The Hello World custom element, built via this framework.',
426
- attributes: [
427
- {
428
- name: 'greeting',
429
- description: 'The greeting.',
430
- },
431
- ],
432
- },
433
- ],
434
- },
435
-
436
- webComponents: {
437
- name: 'hello-world-elements',
438
- description: 'Your framework agnostic web component library description.',
439
- keywords: ['custom-elements', 'web-components', 'library', 'framework-agnostic', 'typescript', 'javascript'],
440
- tags: [
441
- {
442
- name: ['HelloWorld', 'AppHelloWorld'],
443
- description: 'The Hello World custom element, built via this framework.',
444
- attributes: [
445
- {
446
- name: 'greeting',
447
- description: 'The greeting.',
448
- },
449
- ],
450
- },
451
- ],
452
- },
453
-
454
- functions: {
455
- name: 'hello-world-fx',
456
- description: 'Your function library description.',
457
- keywords: ['functions', 'composables', 'library', 'typescript', 'javascript'],
458
- shouldGenerateSourcemap: false,
459
- files: ['counter', 'dark'],
460
- },
461
- },
462
-
463
- logging: {
464
- logsPath: 'storage/logs/stacks.log',
465
- deploymentsPath: 'storage/logs/deployments.log',
466
- },
467
-
468
- notification: {
469
- default: 'email',
470
- },
471
-
472
- payment: {
473
- driver: 'stripe',
474
- },
475
-
476
- ports: {
477
- frontend: 3000,
478
- backend: 3001,
479
- admin: 3002,
480
- library: 3003,
481
- desktop: 3004,
482
- email: 3005,
483
- docs: 3006,
484
- inspect: 3007,
485
- api: 3008,
486
- systemTray: 3009,
487
- database: 3010,
488
- // mobile: 3010,
489
- },
490
-
491
- queue: {
492
- default: 'sync',
493
-
494
- connections: {
495
- sync: {
496
- driver: 'sync',
497
- },
498
-
499
- database: {
500
- driver: 'database',
501
- table: 'jobs',
502
- queue: 'default',
503
- retry_after: 90,
504
- },
505
-
506
- redis: {
507
- driver: 'redis',
508
- connection: 'default',
509
- queue: 'default',
510
- retry_after: 90,
511
- },
512
-
513
- sqs: {
514
- driver: 'sqs',
515
- key: '',
516
- secret: '',
517
- prefix: '',
518
- suffix: '',
519
- queue: 'default',
520
- region: 'us-east-1',
521
- },
522
- },
523
- },
524
-
525
- searchEngine: {
526
- driver: 'opensearch',
527
- },
528
-
529
- security: {
530
- firewall: {
531
- enabled: true,
532
- countryCodes: [],
533
- ipAddresses: [],
534
- queryString: [],
535
- httpHeaders: [],
536
- // ipSets: [],
537
- rateLimitPerMinute: 1000,
538
- useIpReputationLists: true,
539
- useKnownBadInputsRuleSet: true,
540
- },
541
- },
542
-
543
- services: {
544
- aws: {
545
- accountId: '',
546
- appId: '',
547
- apiKey: '',
548
- region: 'us-east-1',
549
- },
550
-
551
- algolia: {
552
- appId: '',
553
- apiKey: '',
554
- },
555
-
556
- meilisearch: {
557
- appId: '',
558
- apiKey: '',
559
- },
560
-
561
- stripe: {
562
- appId: '',
563
- apiKey: '',
564
- },
565
- },
566
-
567
- storage: {
568
- driver: 's3',
569
- },
570
-
571
- team: {
572
- name: 'Stacks',
573
- members: {
574
- 'Chris Breuer': 'chris@stacksjs.org',
575
- },
576
- },
577
-
578
- ui: {
579
- shortcuts: [
580
- [
581
- 'btn',
582
- 'inline-flex items-center px-4 py-2 ml-2 border border-transparent shadow-sm text-base font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-pointer',
583
- ],
584
- ],
585
-
586
- safelist: 'prose prose-sm m-auto text-left',
587
-
588
- trigger: ':stx:',
589
- classPrefix: 'stx-',
590
- reset: 'tailwind',
591
-
592
- icons: ['heroicons'],
593
-
594
- fonts: {
595
- email: {
596
- title: 'Mona',
597
- text: 'Hubot',
598
- },
599
-
600
- desktop: {
601
- title: 'Mona',
602
- text: 'Hubot',
603
- },
604
-
605
- mobile: {
606
- title: 'Mona',
607
- text: 'Hubot',
608
- },
609
-
610
- web: {
611
- title: 'Mona',
612
- text: 'Hubot',
613
- },
614
- },
615
- },
616
- }
617
-
618
- export default config