@stacksjs/config 0.70.88 → 0.70.91
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/dist/config.d.ts +102 -0
- package/dist/config.js +109 -0
- package/dist/defaults.d.ts +20 -0
- package/dist/defaults.js +626 -0
- package/dist/features.d.ts +39 -0
- package/dist/features.js +53 -0
- package/dist/helpers.d.ts +45 -0
- package/dist/helpers.js +153 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +4 -0
- package/dist/overrides.d.ts +4 -0
- package/dist/overrides.js +111 -0
- package/dist/validators.d.ts +19 -0
- package/dist/validators.js +119 -0
- package/package.json +3 -3
package/dist/defaults.js
ADDED
|
@@ -0,0 +1,626 @@
|
|
|
1
|
+
var {require}=import.meta;import { commandsPath, projectPath, userDatabasePath } from "@stacksjs/path";
|
|
2
|
+
export const FRAMEWORK_DEFAULTS = {
|
|
3
|
+
awsRegion: "us-east-1",
|
|
4
|
+
timezone: "UTC",
|
|
5
|
+
noReplyEmail: "no-reply@stacksjs.com",
|
|
6
|
+
fallbackDomain: "stacks.localhost"
|
|
7
|
+
};
|
|
8
|
+
function deriveAppDefaults() {
|
|
9
|
+
try {
|
|
10
|
+
const pkgPath = projectPath("package.json"), raw = (require(pkgPath).name ?? "").trim();
|
|
11
|
+
if (!raw)
|
|
12
|
+
return { name: "Stacks", url: "stacks.localhost" };
|
|
13
|
+
const slug = raw.replace(/^@[^/]+\//, "").toLowerCase();
|
|
14
|
+
return { name: slug.replace(/[-_]+/g, " ").replace(/(^|\s)\w/g, (c) => c.toUpperCase()), url: `${slug}.localhost` };
|
|
15
|
+
} catch {
|
|
16
|
+
return { name: "Stacks", url: "stacks.localhost" };
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
const appDefaults = deriveAppDefaults();
|
|
20
|
+
export const defaults = {
|
|
21
|
+
cms: { enabled: !1 },
|
|
22
|
+
commerce: { enabled: !1 },
|
|
23
|
+
marketing: { enabled: !1 },
|
|
24
|
+
monitoring: { enabled: !1 },
|
|
25
|
+
ai: {
|
|
26
|
+
deploy: !1,
|
|
27
|
+
models: [
|
|
28
|
+
"anthropic.claude-sonnet-4-20250514-v1:0",
|
|
29
|
+
"anthropic.claude-haiku-4-20250514-v1:0",
|
|
30
|
+
"anthropic.claude-3-5-sonnet-20241022-v2:0",
|
|
31
|
+
"amazon.titan-embed-text-v2:0",
|
|
32
|
+
"amazon.titan-text-premier-v1:0",
|
|
33
|
+
"amazon.titan-image-generator-v2:0",
|
|
34
|
+
"meta.llama3-1-70b-instruct-v1:0",
|
|
35
|
+
"meta.llama3-1-8b-instruct-v1:0"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
auth: {
|
|
39
|
+
username: "email",
|
|
40
|
+
password: "password",
|
|
41
|
+
defaultTokenName: "auth-token",
|
|
42
|
+
tokenExpiry: 3600000,
|
|
43
|
+
refreshTokenExpiry: 2592000000,
|
|
44
|
+
defaultAbilities: ["*"]
|
|
45
|
+
},
|
|
46
|
+
realtime: {
|
|
47
|
+
driver: "pusher"
|
|
48
|
+
},
|
|
49
|
+
analytics: {
|
|
50
|
+
driver: void 0
|
|
51
|
+
},
|
|
52
|
+
app: {
|
|
53
|
+
name: appDefaults.name,
|
|
54
|
+
description: "A Stacks application.",
|
|
55
|
+
env: "local",
|
|
56
|
+
url: appDefaults.url,
|
|
57
|
+
debug: !0,
|
|
58
|
+
key: "",
|
|
59
|
+
timezone: FRAMEWORK_DEFAULTS.timezone,
|
|
60
|
+
locale: "en",
|
|
61
|
+
fallbackLocale: "en",
|
|
62
|
+
cipher: "AES-256-CBC",
|
|
63
|
+
docMode: !1,
|
|
64
|
+
redirectUrls: [],
|
|
65
|
+
maintenanceMode: !1,
|
|
66
|
+
comingSoonMode: !1,
|
|
67
|
+
comingSoonSecret: ""
|
|
68
|
+
},
|
|
69
|
+
cli: {
|
|
70
|
+
name: "My Custom CLI",
|
|
71
|
+
command: "my-custom-cli",
|
|
72
|
+
description: "Stacks is a full-stack framework for TypeScript.",
|
|
73
|
+
source: commandsPath(),
|
|
74
|
+
deploy: !1
|
|
75
|
+
},
|
|
76
|
+
cache: {
|
|
77
|
+
driver: "memory",
|
|
78
|
+
prefix: "stx",
|
|
79
|
+
ttl: 3600,
|
|
80
|
+
maxKeys: -1,
|
|
81
|
+
useClones: !0,
|
|
82
|
+
drivers: {
|
|
83
|
+
redis: {
|
|
84
|
+
host: "localhost",
|
|
85
|
+
port: 6379,
|
|
86
|
+
username: "",
|
|
87
|
+
password: "",
|
|
88
|
+
database: 0,
|
|
89
|
+
tls: !1
|
|
90
|
+
},
|
|
91
|
+
memory: {
|
|
92
|
+
maxKeys: -1,
|
|
93
|
+
checkPeriod: 600,
|
|
94
|
+
deleteOnExpire: !0
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
featureFlags: {
|
|
99
|
+
default: "memory",
|
|
100
|
+
missing: "false",
|
|
101
|
+
drivers: {
|
|
102
|
+
memory: { cloneValues: !0 },
|
|
103
|
+
database: { table: "feature_flags", autoCreate: !1 }
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
cloud: {
|
|
107
|
+
infrastructure: {
|
|
108
|
+
type: "serverless",
|
|
109
|
+
driver: "aws",
|
|
110
|
+
environments: ["production", "staging", "development"],
|
|
111
|
+
firewall: {
|
|
112
|
+
enabled: !0,
|
|
113
|
+
countryCodes: [],
|
|
114
|
+
ipAddresses: [],
|
|
115
|
+
queryString: [],
|
|
116
|
+
httpHeaders: [],
|
|
117
|
+
rateLimitPerMinute: 1000,
|
|
118
|
+
useIpReputationLists: !0,
|
|
119
|
+
useKnownBadInputsRuleSet: !0
|
|
120
|
+
},
|
|
121
|
+
cdn: {
|
|
122
|
+
allowedMethods: "GET_HEAD",
|
|
123
|
+
cachedMethods: "GET_HEAD",
|
|
124
|
+
minTtl: 0,
|
|
125
|
+
defaultTtl: 86400,
|
|
126
|
+
maxTtl: 31536000,
|
|
127
|
+
compress: !0,
|
|
128
|
+
priceClass: "PriceClass_All",
|
|
129
|
+
originShieldRegion: FRAMEWORK_DEFAULTS.awsRegion,
|
|
130
|
+
cookieBehavior: "none",
|
|
131
|
+
allowList: {
|
|
132
|
+
cookies: [],
|
|
133
|
+
headers: [],
|
|
134
|
+
queryStrings: []
|
|
135
|
+
},
|
|
136
|
+
realtimeLogs: {
|
|
137
|
+
enabled: !0,
|
|
138
|
+
samplingRate: 2
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
fileSystem: !1,
|
|
142
|
+
storage: {}
|
|
143
|
+
},
|
|
144
|
+
sites: {
|
|
145
|
+
root: "",
|
|
146
|
+
path: ""
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
dashboard: {
|
|
150
|
+
sections: {
|
|
151
|
+
library: { enabled: !0 },
|
|
152
|
+
content: { enabled: !0 },
|
|
153
|
+
commerce: { enabled: !0 },
|
|
154
|
+
marketing: { enabled: !0 },
|
|
155
|
+
analytics: { enabled: !0 },
|
|
156
|
+
management: { enabled: !0 },
|
|
157
|
+
utilities: { enabled: !0 }
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
database: {
|
|
161
|
+
default: "sqlite",
|
|
162
|
+
logging: !1,
|
|
163
|
+
connections: {
|
|
164
|
+
sqlite: {
|
|
165
|
+
database: userDatabasePath("stacks.sqlite"),
|
|
166
|
+
prefix: ""
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
migrations: "migrations",
|
|
170
|
+
migrationLocks: "migration_locks"
|
|
171
|
+
},
|
|
172
|
+
dns: {
|
|
173
|
+
driver: "aws",
|
|
174
|
+
a: [],
|
|
175
|
+
aaaa: [],
|
|
176
|
+
cname: [],
|
|
177
|
+
mx: [],
|
|
178
|
+
txt: []
|
|
179
|
+
},
|
|
180
|
+
docs: {
|
|
181
|
+
lang: "en-US",
|
|
182
|
+
title: "Stacks",
|
|
183
|
+
description: "Rapid application, cloud & library framework.",
|
|
184
|
+
lastUpdated: !0,
|
|
185
|
+
deploy: !1,
|
|
186
|
+
themeConfig: {
|
|
187
|
+
editLink: {
|
|
188
|
+
pattern: "https://github.com/stacksjs/stacks/edit/main/docs/docs/:path",
|
|
189
|
+
text: "Edit this page on GitHub"
|
|
190
|
+
},
|
|
191
|
+
footer: {
|
|
192
|
+
message: "Released under the MIT License.",
|
|
193
|
+
copyright: "Copyright \xA9 2024-present Stacks.js, Inc."
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
email: {
|
|
198
|
+
from: {
|
|
199
|
+
name: "Stacks",
|
|
200
|
+
address: FRAMEWORK_DEFAULTS.noReplyEmail
|
|
201
|
+
},
|
|
202
|
+
mailboxes: [],
|
|
203
|
+
server: {
|
|
204
|
+
enabled: !0,
|
|
205
|
+
scan: !0
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
errors: {
|
|
209
|
+
messages: {
|
|
210
|
+
string: "The {{ field }} field must be a string",
|
|
211
|
+
email: "The {{ field }} field must be a valid email address",
|
|
212
|
+
regex: "The {{ field }} field format is invalid",
|
|
213
|
+
url: "The {{ field }} field must be a valid URL",
|
|
214
|
+
activeUrl: "The {{ field }} field must be a valid URL",
|
|
215
|
+
alpha: "The {{ field }} field must contain only letters",
|
|
216
|
+
alphaNumeric: "The {{ field }} field must contain only letters and numbers",
|
|
217
|
+
"min(": "The {{ field }} field must have at least {{ min }} characters",
|
|
218
|
+
maxLength: "The {{ field }} field must not be greater than {{ max }} characters",
|
|
219
|
+
fixedLength: "The {{ field }} field must be {{ size }} characters long",
|
|
220
|
+
confirmed: "The {{ field }} field and {{ otherField }} field must be the same",
|
|
221
|
+
endsWith: "The {{ field }} field must end with {{ substring }}",
|
|
222
|
+
startsWith: "The {{ field }} field must start with {{ substring }}",
|
|
223
|
+
sameAs: "The {{ field }} field and {{ otherField }} field must be the same",
|
|
224
|
+
notSameAs: "The {{ field }} field and {{ otherField }} field must be different",
|
|
225
|
+
in: "The selected {{ field }} is invalid",
|
|
226
|
+
notIn: "The selected {{ field }} is invalid",
|
|
227
|
+
ipAddress: "The {{ field }} field must be a valid IP address",
|
|
228
|
+
uuid: "The {{ field }} field must be a valid UUID",
|
|
229
|
+
ascii: "The {{ field }} field must only contain ASCII characters",
|
|
230
|
+
creditCard: "The {{ field }} field must be a valid {{ providersList }} card number",
|
|
231
|
+
hexCode: "The {{ field }} field must be a valid hex color code",
|
|
232
|
+
iban: "The {{ field }} field must be a valid IBAN number",
|
|
233
|
+
jwt: "The {{ field }} field must be a valid JWT token",
|
|
234
|
+
coordinates: "The {{ field }} field must contain latitude and longitude coordinates",
|
|
235
|
+
mobile: "The {{ field }} field must be a valid mobile phone number",
|
|
236
|
+
passport: "The {{ field }} field must be a valid passport number",
|
|
237
|
+
postalCode: "The {{ field }} field must be a valid postal code",
|
|
238
|
+
boolean: "The value must be a boolean",
|
|
239
|
+
number: "The {{ field }} field must be a number",
|
|
240
|
+
min: "The {{ field }} field must be at least {{ min }}",
|
|
241
|
+
max: "The {{ field }} field must not be greater than {{ max }}",
|
|
242
|
+
range: "The {{ field }} field must be between {{ min }} and {{ max }}",
|
|
243
|
+
positive: "The {{ field }} field must be positive",
|
|
244
|
+
negative: "The {{ field }} field must be negative",
|
|
245
|
+
decimal: "The {{ field }} field must have {{ digits }} decimal places",
|
|
246
|
+
withoutDecimals: "The {{ field }} field must not have decimal places",
|
|
247
|
+
date: "The {{ field }} field must be a datetime value",
|
|
248
|
+
"date.equals": "The {{ field }} field must be a date equal to {{ expectedValue }}",
|
|
249
|
+
"date.after": "The {{ field }} field must be a date after {{ expectedValue }}",
|
|
250
|
+
"date.before": "The {{ field }} field must be a date before {{ expectedValue }}",
|
|
251
|
+
"date.afterOrEqual": "The {{ field }} field must be a date after or equal to {{ expectedValue }}",
|
|
252
|
+
"date.beforeOrEqual": "The {{ field }} field must be a date before or equal to {{ expectedValue }}",
|
|
253
|
+
"date.sameAs": "The {{ field }} field and {{ otherField }} field must be the same",
|
|
254
|
+
"date.notSameAs": "The {{ field }} field and {{ otherField }} field must be different",
|
|
255
|
+
"date.afterField": "The {{ field }} field must be a date after {{ otherField }}",
|
|
256
|
+
accepted: "The {{ field }} field must be accepted",
|
|
257
|
+
enum: "The selected {{ field }} is invalid",
|
|
258
|
+
literal: "The {{ field }} field must be {{ expectedValue }}",
|
|
259
|
+
object: "The {{ field }} field must be an object",
|
|
260
|
+
record: "The {{ field }} field must be an object",
|
|
261
|
+
"record.min(": "The {{ field }} field must have at least {{ min }} items",
|
|
262
|
+
"record.maxLength": "The {{ field }} field must not have more than {{ max }} items",
|
|
263
|
+
"record.fixedLength": "The {{ field }} field must contain {{ size }} items",
|
|
264
|
+
array: "The {{ field }} field must be an array",
|
|
265
|
+
"array.min(": "The {{ field }} field must have at least {{ min }} items",
|
|
266
|
+
"array.maxLength": "The {{ field }} field must not have more than {{ max }} items",
|
|
267
|
+
"array.fixedLength": "The {{ field }} field must contain {{ size }} items",
|
|
268
|
+
notEmpty: "The {{ field }} field must not be empty",
|
|
269
|
+
distinct: "The {{ field }} field has duplicate values",
|
|
270
|
+
tuple: "The {{ field }} field must be an array",
|
|
271
|
+
union: "Invalid value provided for {{ field }} field",
|
|
272
|
+
unionGroup: "Invalid value provided for {{ field }} field",
|
|
273
|
+
unionOfTypes: "Invalid value provided for {{ field }} field"
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
git: {
|
|
277
|
+
hooks: {
|
|
278
|
+
"pre-commit": "lint-staged"
|
|
279
|
+
},
|
|
280
|
+
scopes: [
|
|
281
|
+
"",
|
|
282
|
+
"ci",
|
|
283
|
+
"deps",
|
|
284
|
+
"dx",
|
|
285
|
+
"release",
|
|
286
|
+
"docs",
|
|
287
|
+
"test",
|
|
288
|
+
"core",
|
|
289
|
+
"actions",
|
|
290
|
+
"arrays",
|
|
291
|
+
"auth",
|
|
292
|
+
"build",
|
|
293
|
+
"cache",
|
|
294
|
+
"cli",
|
|
295
|
+
"cloud",
|
|
296
|
+
"collections",
|
|
297
|
+
"config",
|
|
298
|
+
"database",
|
|
299
|
+
"datetime",
|
|
300
|
+
"docs",
|
|
301
|
+
"errors",
|
|
302
|
+
"git",
|
|
303
|
+
"lint",
|
|
304
|
+
"x-ray",
|
|
305
|
+
"modules",
|
|
306
|
+
"notifications",
|
|
307
|
+
"objects",
|
|
308
|
+
"path",
|
|
309
|
+
"realtime",
|
|
310
|
+
"router",
|
|
311
|
+
"buddy",
|
|
312
|
+
"security",
|
|
313
|
+
"server",
|
|
314
|
+
"storage",
|
|
315
|
+
"strings",
|
|
316
|
+
"tests",
|
|
317
|
+
"types",
|
|
318
|
+
"ui",
|
|
319
|
+
"utils"
|
|
320
|
+
],
|
|
321
|
+
messages: {
|
|
322
|
+
type: "Select the type of change that you're committing:",
|
|
323
|
+
scope: "Select the SCOPE of this change (optional):",
|
|
324
|
+
customScope: "Select the SCOPE of this change:",
|
|
325
|
+
subject: `Write a SHORT, IMPERATIVE tense description of the change:
|
|
326
|
+
`,
|
|
327
|
+
body: `Provide a LONGER description of the change (optional). Use "|" to break new line:
|
|
328
|
+
`,
|
|
329
|
+
breaking: `List any BREAKING CHANGES (optional). Use "|" to break new line:
|
|
330
|
+
`,
|
|
331
|
+
footerPrefixesSelect: "Select the ISSUES type of the change list by this change (optional):",
|
|
332
|
+
customFooterPrefixes: "Input ISSUES prefix:",
|
|
333
|
+
footer: `List any ISSUES by this change. E.g.: #31, #34:
|
|
334
|
+
`,
|
|
335
|
+
confirmCommit: "Are you sure you want to proceed with the commit above?"
|
|
336
|
+
},
|
|
337
|
+
types: [
|
|
338
|
+
{
|
|
339
|
+
value: "feat",
|
|
340
|
+
name: "feat: \u2728 A new feature",
|
|
341
|
+
emoji: ":sparkles:"
|
|
342
|
+
},
|
|
343
|
+
{ value: "fix", name: "fix: \uD83D\uDC1B A bug fix", emoji: ":bug:" },
|
|
344
|
+
{
|
|
345
|
+
value: "docs",
|
|
346
|
+
name: "docs: \uD83D\uDCDD Documentation only changes",
|
|
347
|
+
emoji: ":memo:"
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
value: "style",
|
|
351
|
+
name: "style: \uD83D\uDC84 Changes that do not affect the meaning of the code",
|
|
352
|
+
emoji: ":lipstick:"
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
value: "refactor",
|
|
356
|
+
name: "refactor: \u267B\uFE0F A code change that neither fixes a bug nor adds a feature",
|
|
357
|
+
emoji: ":recycle:"
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
value: "perf",
|
|
361
|
+
name: "perf: \u26A1\uFE0F A code change that improves performance",
|
|
362
|
+
emoji: ":zap:"
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
value: "test",
|
|
366
|
+
name: "test: \u2705 Adding missing tests or adjusting existing tests",
|
|
367
|
+
emoji: ":white_check_mark:"
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
value: "build",
|
|
371
|
+
name: "build: \uD83D\uDCE6\uFE0F Changes that affect the build system or external dependencies",
|
|
372
|
+
emoji: ":package:"
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
value: "ci",
|
|
376
|
+
name: "ci: \uD83C\uDFA1 Changes to our CI configuration files and scripts",
|
|
377
|
+
emoji: ":ferris_wheel:"
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
value: "chore",
|
|
381
|
+
name: "chore: \uD83D\uDD28 Other changes that don't modify src or test files",
|
|
382
|
+
emoji: ":hammer:"
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
value: "revert",
|
|
386
|
+
name: "revert: \u23EA\uFE0F Reverts a previous commit",
|
|
387
|
+
emoji: ":rewind:"
|
|
388
|
+
}
|
|
389
|
+
]
|
|
390
|
+
},
|
|
391
|
+
hashing: {
|
|
392
|
+
driver: "bcrypt",
|
|
393
|
+
bcrypt: {
|
|
394
|
+
rounds: 12
|
|
395
|
+
},
|
|
396
|
+
argon2: {
|
|
397
|
+
memory: 65536,
|
|
398
|
+
time: 2
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
library: {
|
|
402
|
+
name: "hello-world",
|
|
403
|
+
owner: "@stacksjs",
|
|
404
|
+
repository: "stacksjs/stacks",
|
|
405
|
+
license: "MIT",
|
|
406
|
+
author: "",
|
|
407
|
+
contributors: [],
|
|
408
|
+
defaultLanguage: "en",
|
|
409
|
+
webComponents: {
|
|
410
|
+
name: "hello-world-elements",
|
|
411
|
+
description: "Your framework agnostic web component library description.",
|
|
412
|
+
keywords: ["custom-elements", "web-components", "library", "framework-agnostic", "typescript", "javascript"],
|
|
413
|
+
tags: [
|
|
414
|
+
{
|
|
415
|
+
name: ["HelloWorld", "AppHelloWorld"],
|
|
416
|
+
description: "The Hello World custom element, built via this framework.",
|
|
417
|
+
attributes: [
|
|
418
|
+
{
|
|
419
|
+
name: "greeting",
|
|
420
|
+
description: "The greeting."
|
|
421
|
+
}
|
|
422
|
+
]
|
|
423
|
+
}
|
|
424
|
+
]
|
|
425
|
+
},
|
|
426
|
+
functions: {
|
|
427
|
+
name: "hello-world-fx",
|
|
428
|
+
description: "Your function library description.",
|
|
429
|
+
keywords: ["functions", "composables", "library", "typescript", "javascript"],
|
|
430
|
+
shouldGenerateSourcemap: !1,
|
|
431
|
+
files: ["counter", "dark"]
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
logging: {
|
|
435
|
+
logsPath: "storage/logs/stacks.log",
|
|
436
|
+
deploymentsPath: "storage/logs/deployments.log"
|
|
437
|
+
},
|
|
438
|
+
notification: {
|
|
439
|
+
default: "email"
|
|
440
|
+
},
|
|
441
|
+
payment: {
|
|
442
|
+
driver: "stripe"
|
|
443
|
+
},
|
|
444
|
+
ports: {
|
|
445
|
+
frontend: 3000,
|
|
446
|
+
backend: 3001,
|
|
447
|
+
admin: 3002,
|
|
448
|
+
library: 3003,
|
|
449
|
+
desktop: 3004,
|
|
450
|
+
email: 3005,
|
|
451
|
+
docs: 3006,
|
|
452
|
+
inspect: 3007,
|
|
453
|
+
api: 3008,
|
|
454
|
+
systemTray: 3009,
|
|
455
|
+
database: 3010
|
|
456
|
+
},
|
|
457
|
+
queue: {
|
|
458
|
+
default: "sync",
|
|
459
|
+
connections: {
|
|
460
|
+
sync: {
|
|
461
|
+
driver: "sync"
|
|
462
|
+
},
|
|
463
|
+
database: {
|
|
464
|
+
driver: "database",
|
|
465
|
+
table: "jobs",
|
|
466
|
+
queue: "default",
|
|
467
|
+
retryAfter: 90
|
|
468
|
+
},
|
|
469
|
+
redis: {
|
|
470
|
+
driver: "redis",
|
|
471
|
+
queue: "default",
|
|
472
|
+
retryAfter: 90
|
|
473
|
+
},
|
|
474
|
+
sqs: {
|
|
475
|
+
driver: "sqs",
|
|
476
|
+
key: "",
|
|
477
|
+
secret: "",
|
|
478
|
+
prefix: "",
|
|
479
|
+
suffix: "",
|
|
480
|
+
queue: "default",
|
|
481
|
+
region: FRAMEWORK_DEFAULTS.awsRegion
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
},
|
|
485
|
+
saas: {
|
|
486
|
+
plans: [
|
|
487
|
+
{
|
|
488
|
+
productName: "Stacks Hobby",
|
|
489
|
+
description: "All the Stacks features.",
|
|
490
|
+
pricing: [
|
|
491
|
+
{
|
|
492
|
+
key: "stacks_hobby_monthly",
|
|
493
|
+
price: 3900,
|
|
494
|
+
interval: "month",
|
|
495
|
+
currency: "usd"
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
key: "stacks_hobby_yearly",
|
|
499
|
+
price: 37900,
|
|
500
|
+
interval: "year",
|
|
501
|
+
currency: "usd"
|
|
502
|
+
}
|
|
503
|
+
],
|
|
504
|
+
metadata: {
|
|
505
|
+
createdBy: "admin",
|
|
506
|
+
version: "1.0.0"
|
|
507
|
+
}
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
productName: "Stacks Pro",
|
|
511
|
+
description: "All the Stacks features, including being able to invite team members.",
|
|
512
|
+
pricing: [
|
|
513
|
+
{
|
|
514
|
+
key: "stacks_pro_monthly",
|
|
515
|
+
price: 5900,
|
|
516
|
+
interval: "month",
|
|
517
|
+
currency: "usd"
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
key: "stacks_pro_yearly",
|
|
521
|
+
price: 57900,
|
|
522
|
+
interval: "year",
|
|
523
|
+
currency: "usd"
|
|
524
|
+
}
|
|
525
|
+
],
|
|
526
|
+
metadata: {
|
|
527
|
+
createdBy: "admin",
|
|
528
|
+
version: "1.0.0"
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
],
|
|
532
|
+
webhook: {
|
|
533
|
+
endpoint: "/webhooks/stripe",
|
|
534
|
+
secret: ""
|
|
535
|
+
},
|
|
536
|
+
currencies: ["usd"],
|
|
537
|
+
coupons: [
|
|
538
|
+
{
|
|
539
|
+
code: "SUMMER2024",
|
|
540
|
+
amountOff: 500,
|
|
541
|
+
duration: "once"
|
|
542
|
+
}
|
|
543
|
+
],
|
|
544
|
+
products: [
|
|
545
|
+
{
|
|
546
|
+
name: "Stacks Pro",
|
|
547
|
+
description: "All the Stacks features.",
|
|
548
|
+
images: ["url_to_image"]
|
|
549
|
+
}
|
|
550
|
+
]
|
|
551
|
+
},
|
|
552
|
+
searchEngine: {
|
|
553
|
+
driver: "opensearch"
|
|
554
|
+
},
|
|
555
|
+
security: {
|
|
556
|
+
firewall: {
|
|
557
|
+
enabled: !0,
|
|
558
|
+
countryCodes: [],
|
|
559
|
+
ipAddresses: [],
|
|
560
|
+
queryString: [],
|
|
561
|
+
httpHeaders: [],
|
|
562
|
+
rateLimitPerMinute: 1000,
|
|
563
|
+
useIpReputationLists: !0,
|
|
564
|
+
useKnownBadInputsRuleSet: !0
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
services: {
|
|
568
|
+
aws: {
|
|
569
|
+
accountId: "",
|
|
570
|
+
appId: "",
|
|
571
|
+
apiKey: "",
|
|
572
|
+
region: FRAMEWORK_DEFAULTS.awsRegion
|
|
573
|
+
},
|
|
574
|
+
algolia: {
|
|
575
|
+
appId: "",
|
|
576
|
+
apiKey: ""
|
|
577
|
+
},
|
|
578
|
+
meilisearch: {
|
|
579
|
+
appId: "",
|
|
580
|
+
apiKey: ""
|
|
581
|
+
},
|
|
582
|
+
stripe: {
|
|
583
|
+
appId: "",
|
|
584
|
+
apiKey: ""
|
|
585
|
+
}
|
|
586
|
+
},
|
|
587
|
+
filesystems: {
|
|
588
|
+
driver: "s3"
|
|
589
|
+
},
|
|
590
|
+
team: {
|
|
591
|
+
name: "",
|
|
592
|
+
members: {}
|
|
593
|
+
},
|
|
594
|
+
ui: {
|
|
595
|
+
shortcuts: [
|
|
596
|
+
[
|
|
597
|
+
"btn",
|
|
598
|
+
"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"
|
|
599
|
+
]
|
|
600
|
+
],
|
|
601
|
+
safelist: "prose prose-sm m-auto text-left",
|
|
602
|
+
trigger: ":stx:",
|
|
603
|
+
classPrefix: "stx-",
|
|
604
|
+
reset: "tailwind",
|
|
605
|
+
icons: ["hugeicons"],
|
|
606
|
+
fonts: {
|
|
607
|
+
email: {
|
|
608
|
+
title: "Mona",
|
|
609
|
+
text: "Hubot"
|
|
610
|
+
},
|
|
611
|
+
desktop: {
|
|
612
|
+
title: "Mona",
|
|
613
|
+
text: "Hubot"
|
|
614
|
+
},
|
|
615
|
+
mobile: {
|
|
616
|
+
title: "Mona",
|
|
617
|
+
text: "Hubot"
|
|
618
|
+
},
|
|
619
|
+
web: {
|
|
620
|
+
title: "Mona",
|
|
621
|
+
text: "Hubot"
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
};
|
|
626
|
+
export default defaults;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Truthy when the named feature is enabled in the current environment.
|
|
3
|
+
*
|
|
4
|
+
* Resolution order (first match wins):
|
|
5
|
+
* 1. Runtime override via `enableFeature` / `disableFeature`
|
|
6
|
+
* 2. `config.<name>.enabled` — boolean or omitted
|
|
7
|
+
* - Optional `config.<name>.env: string[]` narrows the flag to specific
|
|
8
|
+
* deploy targets (compared against `config.app.env`)
|
|
9
|
+
* 3. Per-feature framework default (only `dashboard` defaults true)
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* if (feature('commerce')) {
|
|
14
|
+
* await loadCommerceRoutes()
|
|
15
|
+
* }
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare function feature(name: string): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Force-enable a feature in the running process. Intended for tests and
|
|
21
|
+
* staged rollouts; production code should prefer config-file overrides.
|
|
22
|
+
*/
|
|
23
|
+
export declare function enableFeature(name: string): void;
|
|
24
|
+
/**
|
|
25
|
+
* Force-disable a feature in the running process.
|
|
26
|
+
*/
|
|
27
|
+
export declare function disableFeature(name: string): void;
|
|
28
|
+
/**
|
|
29
|
+
* Drop a runtime override and fall back to the config-driven value.
|
|
30
|
+
*/
|
|
31
|
+
export declare function resetFeature(name: string): void;
|
|
32
|
+
/**
|
|
33
|
+
* Snapshot of the live flag set — useful for `/__features` debug endpoints
|
|
34
|
+
* and CLI commands that print the active configuration. Iterates the known
|
|
35
|
+
* framework features plus any runtime overrides for ad-hoc flags.
|
|
36
|
+
*/
|
|
37
|
+
export declare function listFeatures(): Record<string, boolean>;
|
|
38
|
+
export type StacksFeature = | 'auth' | 'marketing' | 'cms' | 'commerce'
|
|
39
|
+
| 'dashboard' | 'monitoring' | 'realtime' | 'queue';
|