@raclettejs/core 0.1.25 → 0.1.27
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/CHANGELOG.md +17 -0
- package/dist/cli.js +99 -98
- package/dist/cli.js.map +4 -4
- package/package.json +4 -3
- package/services/backend/src/core/config/configService.ts +1 -1
- package/services/backend/src/modules/hooks/rate-limiter.ts +1 -12
- package/services/frontend/.yarn/install-state.gz +0 -0
- package/services/frontend/src/core/lib/data/dataApi.ts +2 -2
- package/services/frontend/src/core/lib/data/queryApi.ts +1 -2
- package/services/frontend/src/core/store/state.ts +6 -41
- package/templates/backend.Dockerfile +31 -0
- package/templates/build.yml +34 -0
- package/templates/compose.yml +0 -0
- package/templates/docker-compose.full.yml +0 -0
- package/templates/docker-compose.yml +161 -0
- package/templates/frontend.Dockerfile +49 -0
- package/templates/fs.yml +73 -0
- package/templates/raclette.config.js +0 -0
- package/templates/raclette.config.workbench.js +0 -0
- package/templates/raclette.config.workbench.yaml +61 -0
- package/templates/raclette.config.yaml +59 -0
- package/templates/shims.vue.d.ts +5 -0
- package/templates/tsconfig.json +0 -0
- package/templates/types.yaml +316 -0
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
RacletteAppMode: [ "workbench" , "product-view" ]
|
|
2
|
+
|
|
3
|
+
RacletteConfig:
|
|
4
|
+
name: string
|
|
5
|
+
root: string
|
|
6
|
+
|
|
7
|
+
services:
|
|
8
|
+
frontend?: ServiceFrontendConfig
|
|
9
|
+
backend?: ServiceBackendConfig
|
|
10
|
+
|
|
11
|
+
mongodb?:
|
|
12
|
+
enabled: boolean
|
|
13
|
+
port: number
|
|
14
|
+
name?: string
|
|
15
|
+
volume?: string
|
|
16
|
+
databaseName?: string
|
|
17
|
+
volumes?: VolumeDefinition[] // Add custom volumes property
|
|
18
|
+
cache?: {
|
|
19
|
+
enabled: boolean
|
|
20
|
+
port: number
|
|
21
|
+
name?: string
|
|
22
|
+
volume?: string
|
|
23
|
+
db?: number
|
|
24
|
+
volumes?: VolumeDefinition[]
|
|
25
|
+
|
|
26
|
+
# workbench?: {
|
|
27
|
+
# enabled: boolean
|
|
28
|
+
# debugPort?: number
|
|
29
|
+
# withLogs?: boolean
|
|
30
|
+
# frontendPort: number
|
|
31
|
+
# backendPort: number
|
|
32
|
+
# }
|
|
33
|
+
# [key: string]: any
|
|
34
|
+
# }
|
|
35
|
+
# plugins: Array<string | [string, any]>
|
|
36
|
+
# modules: Array<string | [string, any]>
|
|
37
|
+
# env: {
|
|
38
|
+
# development?: EnvironmentVariables
|
|
39
|
+
# production?: EnvironmentVariables
|
|
40
|
+
# [key: string]: EnvironmentVariables | undefined
|
|
41
|
+
# }
|
|
42
|
+
# global: {
|
|
43
|
+
# requireAuthentication: boolean
|
|
44
|
+
# appMode?: RacletteAppMode
|
|
45
|
+
# }
|
|
46
|
+
# frontend: {
|
|
47
|
+
# additonalPluginPaths?: string[]
|
|
48
|
+
# framework: "vue" | "react"
|
|
49
|
+
# pleaseLetUsAdvertiseOurselfs?: boolean
|
|
50
|
+
# advertiseYourself?: string
|
|
51
|
+
# preventNotifications?: boolean
|
|
52
|
+
# i18n?: {
|
|
53
|
+
# locales?: string[]
|
|
54
|
+
# priorities?: Record<string, number>
|
|
55
|
+
# }
|
|
56
|
+
# vue?: {
|
|
57
|
+
# plugins: string[]
|
|
58
|
+
# }
|
|
59
|
+
# react?: {
|
|
60
|
+
# plugins: string[]
|
|
61
|
+
# }
|
|
62
|
+
# custom?: {
|
|
63
|
+
# [key: string]: any
|
|
64
|
+
# }
|
|
65
|
+
# }
|
|
66
|
+
# backend: {
|
|
67
|
+
# additonalPluginPaths?: string[]
|
|
68
|
+
# sockets?: SocketConfig
|
|
69
|
+
# custom?: {
|
|
70
|
+
# [key: string]: any
|
|
71
|
+
# }
|
|
72
|
+
# cache?: CacheConfig
|
|
73
|
+
# }
|
|
74
|
+
# workbench?: WorkbenchConfig
|
|
75
|
+
# typescript?: {
|
|
76
|
+
# compilerOptions?: {
|
|
77
|
+
# // Allow for any compiler option to be overridden
|
|
78
|
+
# [key: string]: any
|
|
79
|
+
# }
|
|
80
|
+
# }
|
|
81
|
+
# eslint?: {
|
|
82
|
+
# rules?: Record<string, any>
|
|
83
|
+
# plugins?: string[]
|
|
84
|
+
# extends?: string[]
|
|
85
|
+
# ignores?: string[]
|
|
86
|
+
# // Whether to use recommended rules
|
|
87
|
+
# useRecommended?: boolean
|
|
88
|
+
# // For environment-specific configurations
|
|
89
|
+
# env?: Record<string, any>
|
|
90
|
+
# }
|
|
91
|
+
# // Multi-App Workspace feature - configurable source directories
|
|
92
|
+
# sourceDirectories?: Array<{
|
|
93
|
+
# name: string
|
|
94
|
+
# path: string // Supports env variables like process.env.SOME_PATH || "../fallback"
|
|
95
|
+
# priority: number
|
|
96
|
+
# servicePathMap?: {
|
|
97
|
+
# [service: string]: string
|
|
98
|
+
# }
|
|
99
|
+
# folderMappings?: {
|
|
100
|
+
# [targetPath: string]: string
|
|
101
|
+
# }
|
|
102
|
+
# }>
|
|
103
|
+
# // Generic package merging configuration
|
|
104
|
+
# packageMerging?: {
|
|
105
|
+
# frontend?: PackageSourceConfig[]
|
|
106
|
+
# backend?: PackageSourceConfig[]
|
|
107
|
+
# [service: string]: PackageSourceConfig[] | undefined
|
|
108
|
+
# }
|
|
109
|
+
# // Configurable lock file paths
|
|
110
|
+
# lockFiles?: {
|
|
111
|
+
# frontend?: string
|
|
112
|
+
# backend?: string
|
|
113
|
+
# [service: string]: string | undefined
|
|
114
|
+
# }
|
|
115
|
+
#}
|
|
116
|
+
#
|
|
117
|
+
#export type WorkbenchConfig = {
|
|
118
|
+
# frontend: {
|
|
119
|
+
# i18n?: {
|
|
120
|
+
# locales?: string[]
|
|
121
|
+
# }
|
|
122
|
+
# }
|
|
123
|
+
#}
|
|
124
|
+
#
|
|
125
|
+
#export type ServiceFrontendConfig = {
|
|
126
|
+
# enabled: boolean
|
|
127
|
+
# port: number
|
|
128
|
+
# name?: string
|
|
129
|
+
# nodeModulesVolume?: string
|
|
130
|
+
# installPackages?: string[]
|
|
131
|
+
# volumes?: VolumeDefinition[] // Add custom volumes property
|
|
132
|
+
#}
|
|
133
|
+
#
|
|
134
|
+
#export type ServiceBackendConfig = {
|
|
135
|
+
# enabled: boolean
|
|
136
|
+
# port: number
|
|
137
|
+
# name?: string
|
|
138
|
+
# nodeModulesVolume?: string
|
|
139
|
+
# enableDebug?: boolean
|
|
140
|
+
# installPackages?: string[]
|
|
141
|
+
# volumes?: VolumeDefinition[] // Add custom volumes property
|
|
142
|
+
#}
|
|
143
|
+
#
|
|
144
|
+
#export type EnvironmentVariables = {
|
|
145
|
+
# RACLETTE_CORE_ABSOLUTE_PATH?: string
|
|
146
|
+
# RACLETTE_DEBUG_MODE?: boolean
|
|
147
|
+
# RACLETTE_SOCKET_URL?: string
|
|
148
|
+
# RACLETTE_SERVER_BASE_URL?: string
|
|
149
|
+
# RACLETTE_INERHIT_NPMRC?: boolean
|
|
150
|
+
# RACLETTE_DISABLE_PLUGIN_LOGS?: boolean
|
|
151
|
+
# // overrides for service config
|
|
152
|
+
# RACLETTE_SERVER_CONTAINERNAME?: string
|
|
153
|
+
# RACLETTE_SERVER_PORT?: number
|
|
154
|
+
# RACLETTE_SERVER_TOKEN_SECRET?: string
|
|
155
|
+
# RACLETTE_CLIENT_CONTAINERNAME?: string
|
|
156
|
+
# RACLETTE_CLIENT_PORT?: number
|
|
157
|
+
# RACLETTE_MONGODB_HOST?: string
|
|
158
|
+
# RACLETTE_MONGODB_CONTAINERNAME?: string
|
|
159
|
+
# RACLETTE_MONGODB_PORT?: number
|
|
160
|
+
# RACLETTE_MONGODB_VOLUME?: string
|
|
161
|
+
# RACLETTE_MONGODB_CONFIG_VOLUME?: string
|
|
162
|
+
# RACLETTE_CACHE_URL?: string
|
|
163
|
+
# RACLETTE_CACHE_CONTAINERNAME?: string
|
|
164
|
+
# RACLETTE_CACHE_PORT?: number
|
|
165
|
+
# RACLETTE_CACHE_VOLUME?: string
|
|
166
|
+
#
|
|
167
|
+
# // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
168
|
+
# [key: string]: any // Allow additional vars
|
|
169
|
+
#}
|
|
170
|
+
#
|
|
171
|
+
#/**
|
|
172
|
+
# * Volume Definition for Docker Compose
|
|
173
|
+
# */
|
|
174
|
+
#export type VolumeDefinition = {
|
|
175
|
+
# // Source can be a named volume, host path, or volume specification
|
|
176
|
+
# source: string
|
|
177
|
+
# // Target is the path inside the container
|
|
178
|
+
# target: string
|
|
179
|
+
# // Optional volume type (bind, volume, tmpfs)
|
|
180
|
+
# type?: "bind" | "volume" | "tmpfs"
|
|
181
|
+
# // Optional read-only flag
|
|
182
|
+
# readonly?: boolean
|
|
183
|
+
# // Skip this volume if source path doesn't exist
|
|
184
|
+
# mustExist?: boolean
|
|
185
|
+
# // Optional volume driver-specific options
|
|
186
|
+
# volumeOptions?: {
|
|
187
|
+
# // Populate on service creation when volume doesn't exist
|
|
188
|
+
# nocopy?: boolean
|
|
189
|
+
# // Any other driver-specific options
|
|
190
|
+
# [key: string]: any
|
|
191
|
+
# }
|
|
192
|
+
# // Optional bind-specific options
|
|
193
|
+
# bindOptions?: {
|
|
194
|
+
# // Propagation mode for bind mounts
|
|
195
|
+
# propagation?:
|
|
196
|
+
# | "private"
|
|
197
|
+
# | "rprivate"
|
|
198
|
+
# | "shared"
|
|
199
|
+
# | "rshared"
|
|
200
|
+
# | "slave"
|
|
201
|
+
# | "rslave"
|
|
202
|
+
# // Create host path if it doesn't exist
|
|
203
|
+
# createHostPath?: boolean
|
|
204
|
+
# // Any other bind-specific options
|
|
205
|
+
# [key: string]: any
|
|
206
|
+
# }
|
|
207
|
+
# // Optional tmpfs-specific options
|
|
208
|
+
# tmpfsOptions?: {
|
|
209
|
+
# // Size of the tmpfs mount in bytes
|
|
210
|
+
# size?: number
|
|
211
|
+
# // File mode of the tmpfs in octal
|
|
212
|
+
# mode?: number
|
|
213
|
+
# }
|
|
214
|
+
#}
|
|
215
|
+
#/**
|
|
216
|
+
# * Cache Configuration
|
|
217
|
+
# */
|
|
218
|
+
#export type CacheConfig = {
|
|
219
|
+
# persistence?: "none" | "rdb" | "aof" | "rdb+aof"
|
|
220
|
+
# RDB_OPTIONS?: string
|
|
221
|
+
#}
|
|
222
|
+
#/**
|
|
223
|
+
# * Socket Configuration
|
|
224
|
+
# */
|
|
225
|
+
#export type SocketConfig = {
|
|
226
|
+
# /** Configure what data is automatically sent when a frontend joins */
|
|
227
|
+
# autoSend: {
|
|
228
|
+
# /** Send compositions data on join */
|
|
229
|
+
# compositions: boolean
|
|
230
|
+
# /** Send interaction links data on join */
|
|
231
|
+
# interactionLinks: boolean
|
|
232
|
+
# /** Send project configuration on join */
|
|
233
|
+
# projectConfig: boolean
|
|
234
|
+
# /** Additional custom data types to send (must be in the DB and registered via stream) */
|
|
235
|
+
# additionalDatatypes?: {
|
|
236
|
+
# [key: string]: boolean | undefined
|
|
237
|
+
# }
|
|
238
|
+
# customData?: {
|
|
239
|
+
# /** Key is the property name in the response, value is the static data */
|
|
240
|
+
# [key: string]: any
|
|
241
|
+
# }
|
|
242
|
+
# }
|
|
243
|
+
#
|
|
244
|
+
# /** Socket security configuration */
|
|
245
|
+
# security: {
|
|
246
|
+
# /** Whether authentication is required for socket connections */
|
|
247
|
+
# requireAuth: boolean
|
|
248
|
+
# /** Token validation method */
|
|
249
|
+
# tokenValidation: "jwt"
|
|
250
|
+
# /** Custom validation handler path */
|
|
251
|
+
# customValidator?: string
|
|
252
|
+
# }
|
|
253
|
+
#
|
|
254
|
+
# /** Advanced socket options */
|
|
255
|
+
# options: {
|
|
256
|
+
# /** Socket.io adapter configuration */
|
|
257
|
+
# adapter: "memory" | "cache" | "mongodb"
|
|
258
|
+
# /** Connection timeout in milliseconds */
|
|
259
|
+
# connectionTimeout: number
|
|
260
|
+
# /** Ping interval in milliseconds */
|
|
261
|
+
# pingInterval: number
|
|
262
|
+
# /** Ping timeout in milliseconds */
|
|
263
|
+
# pingTimeout: number
|
|
264
|
+
# }
|
|
265
|
+
#}
|
|
266
|
+
#
|
|
267
|
+
#/**
|
|
268
|
+
# * Raclette Module Definition
|
|
269
|
+
# */
|
|
270
|
+
#export type RacletteModule = {
|
|
271
|
+
# name: string
|
|
272
|
+
# services?: Record<string, any>
|
|
273
|
+
# extendConfig?: (config: RacletteConfig, options: any) => RacletteConfig
|
|
274
|
+
# backendExtensions?: {
|
|
275
|
+
# plugins?: string[]
|
|
276
|
+
# routes?: string[]
|
|
277
|
+
# }
|
|
278
|
+
# frontendExtensions?: {
|
|
279
|
+
# components?: string[]
|
|
280
|
+
# plugins?: string[]
|
|
281
|
+
# }
|
|
282
|
+
# hooks?: Record<string, (...args: any[]) => Promise<void>>
|
|
283
|
+
#}
|
|
284
|
+
#
|
|
285
|
+
#export type PluginMetadata = {
|
|
286
|
+
# name: string
|
|
287
|
+
# author: string
|
|
288
|
+
# version: string
|
|
289
|
+
# description?: string
|
|
290
|
+
# repository?: string
|
|
291
|
+
# license?: string
|
|
292
|
+
# hooks?: {
|
|
293
|
+
# beforeMount?: (app: any) => Promise<void>
|
|
294
|
+
# mounted?: (app: any) => Promise<void>
|
|
295
|
+
# beforeUnmount?: (app: any) => Promise<void>
|
|
296
|
+
# }
|
|
297
|
+
# pluginKey?: string
|
|
298
|
+
# dependencies?: string[]
|
|
299
|
+
# options?: Record<string, any>
|
|
300
|
+
# frontendDir?: string // default: "./frontend"
|
|
301
|
+
# backendDir?: string // default: "./backend"
|
|
302
|
+
#}
|
|
303
|
+
#
|
|
304
|
+
#export type PackageSourceConfig = {
|
|
305
|
+
# // Path to the packages.json file (supports env variables)
|
|
306
|
+
# file: string
|
|
307
|
+
# // Key within the file to extract (e.g., "frontend", "workbench.frontend")
|
|
308
|
+
# key: string
|
|
309
|
+
#}
|
|
310
|
+
#
|
|
311
|
+
#export type PackageTarget =
|
|
312
|
+
# | "frontend"
|
|
313
|
+
# | "backend"
|
|
314
|
+
# | "workbench.frontend"
|
|
315
|
+
# | "workbench.backend"
|
|
316
|
+
#
|