@raclettejs/core 0.1.32 → 0.1.33-canary.1
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 +14 -0
- package/dist/cli.js +4 -4
- package/dist/cli.js.map +2 -2
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/services/backend/.yarn/install-state.gz +0 -0
- package/services/backend/src/corePlugins/raclette__core/backend/datatypes/user/routes/route.user.patchOwn.ts +1 -1
- package/services/backend/src/corePlugins/raclette__core/backend/datatypes/user/user.service.ts +22 -1
- package/services/backend/yarn.lock +1 -1
- package/services/frontend/.yarn/install-state.gz +0 -0
- package/services/frontend/package.json +2 -2
- package/services/frontend/src/core/lib/data/dataApi.ts +1 -2
- package/services/frontend/src/orchestrator/ProductOrchestrator.vue +8 -1
- package/services/frontend/src/orchestrator/assets/styles/layers.css +1 -4
- package/services/frontend/src/orchestrator/assets/styles/vuetifyStyles.scss +4 -1
- package/services/frontend/src/orchestrator/components/dataExport/DataExporter.vue +303 -0
- package/services/frontend/src/orchestrator/components/dataImport/ImportSelectionDialog.vue +169 -0
- package/services/frontend/src/orchestrator/components/dataImport/ImportSummaryDialog.vue +211 -0
- package/services/frontend/src/orchestrator/components/dataTable/BaseDataTable.vue +473 -0
- package/services/frontend/src/orchestrator/components/index.ts +10 -0
- package/services/frontend/src/orchestrator/components/input/FileUpload.vue +83 -0
- package/services/frontend/src/orchestrator/composables/index.ts +1 -0
- package/services/frontend/src/orchestrator/composables/useExport/formats/builtins.ts +124 -0
- package/services/frontend/src/orchestrator/composables/useExport/index.ts +176 -0
- package/services/frontend/src/orchestrator/composables/useExport/types.ts +141 -0
- package/services/frontend/src/orchestrator/i18n/de-DE.json +26 -1
- package/services/frontend/src/orchestrator/i18n/en-EU.json +26 -1
- package/services/frontend/src/orchestrator/i18n/sk.json +26 -1
- package/services/frontend/src/orchestrator/i18n/tl-TL.json +14 -0
- package/services/frontend/src/orchestrator/setup/vuetify.ts +0 -1
- package/services/frontend/yarn.lock +4854 -0
- package/types/index.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var ke=Object.create;var J=Object.defineProperty;var Ae=Object.getOwnPropertyDes
|
|
|
17
17
|
it: "readonly",
|
|
18
18
|
cy: "readonly"
|
|
19
19
|
},
|
|
20
|
-
ecmaVersion:
|
|
20
|
+
ecmaVersion: "latest",
|
|
21
21
|
sourceType: 'module'
|
|
22
22
|
},
|
|
23
23
|
rules: {
|
|
@@ -110,7 +110,7 @@ var ke=Object.create;var J=Object.defineProperty;var Ae=Object.getOwnPropertyDes
|
|
|
110
110
|
languageOptions: {
|
|
111
111
|
parser: tseslint.parser,
|
|
112
112
|
parserOptions: {
|
|
113
|
-
ecmaVersion:
|
|
113
|
+
ecmaVersion: "latest",
|
|
114
114
|
sourceType: 'module',
|
|
115
115
|
project: './tsconfig.json'
|
|
116
116
|
}
|
|
@@ -219,7 +219,7 @@ var ke=Object.create;var J=Object.defineProperty;var Ae=Object.getOwnPropertyDes
|
|
|
219
219
|
languageOptions: {
|
|
220
220
|
parser: vueEslintParser,
|
|
221
221
|
parserOptions: {
|
|
222
|
-
ecmaVersion:
|
|
222
|
+
ecmaVersion: "latest",
|
|
223
223
|
sourceType: 'module',
|
|
224
224
|
parser: tseslint.parser,
|
|
225
225
|
extraFileExtensions: [".vue"]
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../.yarn/.store/dotenv-npm-17.3.1-6caa0b86fa/package/package.json", "../../../.yarn/.store/dotenv-npm-17.3.1-6caa0b86fa/package/lib/main.js", "../../../.yarn/.store/chalk-npm-5.6.2-c1d291da8e/package/source/vendor/ansi-styles/index.js", "../../../.yarn/.store/chalk-npm-5.6.2-c1d291da8e/package/source/vendor/supports-color/index.js", "../../../.yarn/.store/chalk-npm-5.6.2-c1d291da8e/package/source/utilities.js", "../../../.yarn/.store/chalk-npm-5.6.2-c1d291da8e/package/source/index.js", "../src/config-loader.ts", "../src/config-generator.ts", "../src/logger.ts", "../src/eslint-generator/index.ts", "../src/eslint-generator/configs/core.ts", "../src/eslint-generator/configs/react.ts", "../src/eslint-generator/configs/typescript.ts", "../src/eslint-generator/configs/vue.ts", "../src/eslint-generator/dependencies.ts", "../src/eslint-generator/utils.ts"],
|
|
4
|
-
"sourcesContent": ["{\n \"name\": \"dotenv\",\n \"version\": \"17.3.1\",\n \"description\": \"Loads environment variables from .env file\",\n \"main\": \"lib/main.js\",\n \"types\": \"lib/main.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./lib/main.d.ts\",\n \"require\": \"./lib/main.js\",\n \"default\": \"./lib/main.js\"\n },\n \"./config\": \"./config.js\",\n \"./config.js\": \"./config.js\",\n \"./lib/env-options\": \"./lib/env-options.js\",\n \"./lib/env-options.js\": \"./lib/env-options.js\",\n \"./lib/cli-options\": \"./lib/cli-options.js\",\n \"./lib/cli-options.js\": \"./lib/cli-options.js\",\n \"./package.json\": \"./package.json\"\n },\n \"scripts\": {\n \"dts-check\": \"tsc --project tests/types/tsconfig.json\",\n \"lint\": \"standard\",\n \"pretest\": \"npm run lint && npm run dts-check\",\n \"test\": \"tap run tests/**/*.js --allow-empty-coverage --disable-coverage --timeout=60000\",\n \"test:coverage\": \"tap run tests/**/*.js --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov\",\n \"prerelease\": \"npm test\",\n \"release\": \"standard-version\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git://github.com/motdotla/dotenv.git\"\n },\n \"homepage\": \"https://github.com/motdotla/dotenv#readme\",\n \"funding\": \"https://dotenvx.com\",\n \"keywords\": [\n \"dotenv\",\n \"env\",\n \".env\",\n \"environment\",\n \"variables\",\n \"config\",\n \"settings\"\n ],\n \"readmeFilename\": \"README.md\",\n \"license\": \"BSD-2-Clause\",\n \"devDependencies\": {\n \"@types/node\": \"^18.11.3\",\n \"decache\": \"^4.6.2\",\n \"sinon\": \"^14.0.1\",\n \"standard\": \"^17.0.0\",\n \"standard-version\": \"^9.5.0\",\n \"tap\": \"^19.2.0\",\n \"typescript\": \"^4.8.4\"\n },\n \"engines\": {\n \"node\": \">=12\"\n },\n \"browser\": {\n \"fs\": false\n }\n}\n", "const fs = require('fs')\nconst path = require('path')\nconst os = require('os')\nconst crypto = require('crypto')\nconst packageJson = require('../package.json')\n\nconst version = packageJson.version\n\n// Array of tips to display randomly\nconst TIPS = [\n '\uD83D\uDD10 encrypt with Dotenvx: https://dotenvx.com',\n '\uD83D\uDD10 prevent committing .env to code: https://dotenvx.com/precommit',\n '\uD83D\uDD10 prevent building .env in docker: https://dotenvx.com/prebuild',\n '\uD83E\uDD16 agentic secret storage: https://dotenvx.com/as2',\n '\u26A1\uFE0F secrets for agents: https://dotenvx.com/as2',\n '\uD83D\uDEE1\uFE0F auth for agents: https://vestauth.com',\n '\uD83D\uDEE0\uFE0F run anywhere with `dotenvx run -- yourcommand`',\n '\u2699\uFE0F specify custom .env file path with { path: \\'/custom/path/.env\\' }',\n '\u2699\uFE0F enable debug logging with { debug: true }',\n '\u2699\uFE0F override existing env vars with { override: true }',\n '\u2699\uFE0F suppress all logs with { quiet: true }',\n '\u2699\uFE0F write to custom object with { processEnv: myObject }',\n '\u2699\uFE0F load multiple .env files with { path: [\\'.env.local\\', \\'.env\\'] }'\n]\n\n// Get a random tip from the tips array\nfunction _getRandomTip () {\n return TIPS[Math.floor(Math.random() * TIPS.length)]\n}\n\nfunction parseBoolean (value) {\n if (typeof value === 'string') {\n return !['false', '0', 'no', 'off', ''].includes(value.toLowerCase())\n }\n return Boolean(value)\n}\n\nfunction supportsAnsi () {\n return process.stdout.isTTY // && process.env.TERM !== 'dumb'\n}\n\nfunction dim (text) {\n return supportsAnsi() ? `\\x1b[2m${text}\\x1b[0m` : text\n}\n\nconst LINE = /(?:^|^)\\s*(?:export\\s+)?([\\w.-]+)(?:\\s*=\\s*?|:\\s+?)(\\s*'(?:\\\\'|[^'])*'|\\s*\"(?:\\\\\"|[^\"])*\"|\\s*`(?:\\\\`|[^`])*`|[^#\\r\\n]+)?\\s*(?:#.*)?(?:$|$)/mg\n\n// Parse src into an Object\nfunction parse (src) {\n const obj = {}\n\n // Convert buffer to string\n let lines = src.toString()\n\n // Convert line breaks to same format\n lines = lines.replace(/\\r\\n?/mg, '\\n')\n\n let match\n while ((match = LINE.exec(lines)) != null) {\n const key = match[1]\n\n // Default undefined or null to empty string\n let value = (match[2] || '')\n\n // Remove whitespace\n value = value.trim()\n\n // Check if double quoted\n const maybeQuote = value[0]\n\n // Remove surrounding quotes\n value = value.replace(/^(['\"`])([\\s\\S]*)\\1$/mg, '$2')\n\n // Expand newlines if double quoted\n if (maybeQuote === '\"') {\n value = value.replace(/\\\\n/g, '\\n')\n value = value.replace(/\\\\r/g, '\\r')\n }\n\n // Add to object\n obj[key] = value\n }\n\n return obj\n}\n\nfunction _parseVault (options) {\n options = options || {}\n\n const vaultPath = _vaultPath(options)\n options.path = vaultPath // parse .env.vault\n const result = DotenvModule.configDotenv(options)\n if (!result.parsed) {\n const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`)\n err.code = 'MISSING_DATA'\n throw err\n }\n\n // handle scenario for comma separated keys - for use with key rotation\n // example: DOTENV_KEY=\"dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=prod,dotenv://:key_7890@dotenvx.com/vault/.env.vault?environment=prod\"\n const keys = _dotenvKey(options).split(',')\n const length = keys.length\n\n let decrypted\n for (let i = 0; i < length; i++) {\n try {\n // Get full key\n const key = keys[i].trim()\n\n // Get instructions for decrypt\n const attrs = _instructions(result, key)\n\n // Decrypt\n decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key)\n\n break\n } catch (error) {\n // last key\n if (i + 1 >= length) {\n throw error\n }\n // try next key\n }\n }\n\n // Parse decrypted .env string\n return DotenvModule.parse(decrypted)\n}\n\nfunction _warn (message) {\n console.error(`[dotenv@${version}][WARN] ${message}`)\n}\n\nfunction _debug (message) {\n console.log(`[dotenv@${version}][DEBUG] ${message}`)\n}\n\nfunction _log (message) {\n console.log(`[dotenv@${version}] ${message}`)\n}\n\nfunction _dotenvKey (options) {\n // prioritize developer directly setting options.DOTENV_KEY\n if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) {\n return options.DOTENV_KEY\n }\n\n // secondary infra already contains a DOTENV_KEY environment variable\n if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) {\n return process.env.DOTENV_KEY\n }\n\n // fallback to empty string\n return ''\n}\n\nfunction _instructions (result, dotenvKey) {\n // Parse DOTENV_KEY. Format is a URI\n let uri\n try {\n uri = new URL(dotenvKey)\n } catch (error) {\n if (error.code === 'ERR_INVALID_URL') {\n const err = new Error('INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n throw error\n }\n\n // Get decrypt key\n const key = uri.password\n if (!key) {\n const err = new Error('INVALID_DOTENV_KEY: Missing key part')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n // Get environment\n const environment = uri.searchParams.get('environment')\n if (!environment) {\n const err = new Error('INVALID_DOTENV_KEY: Missing environment part')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n // Get ciphertext payload\n const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`\n const ciphertext = result.parsed[environmentKey] // DOTENV_VAULT_PRODUCTION\n if (!ciphertext) {\n const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`)\n err.code = 'NOT_FOUND_DOTENV_ENVIRONMENT'\n throw err\n }\n\n return { ciphertext, key }\n}\n\nfunction _vaultPath (options) {\n let possibleVaultPath = null\n\n if (options && options.path && options.path.length > 0) {\n if (Array.isArray(options.path)) {\n for (const filepath of options.path) {\n if (fs.existsSync(filepath)) {\n possibleVaultPath = filepath.endsWith('.vault') ? filepath : `${filepath}.vault`\n }\n }\n } else {\n possibleVaultPath = options.path.endsWith('.vault') ? options.path : `${options.path}.vault`\n }\n } else {\n possibleVaultPath = path.resolve(process.cwd(), '.env.vault')\n }\n\n if (fs.existsSync(possibleVaultPath)) {\n return possibleVaultPath\n }\n\n return null\n}\n\nfunction _resolveHome (envPath) {\n return envPath[0] === '~' ? path.join(os.homedir(), envPath.slice(1)) : envPath\n}\n\nfunction _configVault (options) {\n const debug = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || (options && options.debug))\n const quiet = parseBoolean(process.env.DOTENV_CONFIG_QUIET || (options && options.quiet))\n\n if (debug || !quiet) {\n _log('Loading env from encrypted .env.vault')\n }\n\n const parsed = DotenvModule._parseVault(options)\n\n let processEnv = process.env\n if (options && options.processEnv != null) {\n processEnv = options.processEnv\n }\n\n DotenvModule.populate(processEnv, parsed, options)\n\n return { parsed }\n}\n\nfunction configDotenv (options) {\n const dotenvPath = path.resolve(process.cwd(), '.env')\n let encoding = 'utf8'\n let processEnv = process.env\n if (options && options.processEnv != null) {\n processEnv = options.processEnv\n }\n let debug = parseBoolean(processEnv.DOTENV_CONFIG_DEBUG || (options && options.debug))\n let quiet = parseBoolean(processEnv.DOTENV_CONFIG_QUIET || (options && options.quiet))\n\n if (options && options.encoding) {\n encoding = options.encoding\n } else {\n if (debug) {\n _debug('No encoding is specified. UTF-8 is used by default')\n }\n }\n\n let optionPaths = [dotenvPath] // default, look for .env\n if (options && options.path) {\n if (!Array.isArray(options.path)) {\n optionPaths = [_resolveHome(options.path)]\n } else {\n optionPaths = [] // reset default\n for (const filepath of options.path) {\n optionPaths.push(_resolveHome(filepath))\n }\n }\n }\n\n // Build the parsed data in a temporary object (because we need to return it). Once we have the final\n // parsed data, we will combine it with process.env (or options.processEnv if provided).\n let lastError\n const parsedAll = {}\n for (const path of optionPaths) {\n try {\n // Specifying an encoding returns a string instead of a buffer\n const parsed = DotenvModule.parse(fs.readFileSync(path, { encoding }))\n\n DotenvModule.populate(parsedAll, parsed, options)\n } catch (e) {\n if (debug) {\n _debug(`Failed to load ${path} ${e.message}`)\n }\n lastError = e\n }\n }\n\n const populated = DotenvModule.populate(processEnv, parsedAll, options)\n\n // handle user settings DOTENV_CONFIG_ options inside .env file(s)\n debug = parseBoolean(processEnv.DOTENV_CONFIG_DEBUG || debug)\n quiet = parseBoolean(processEnv.DOTENV_CONFIG_QUIET || quiet)\n\n if (debug || !quiet) {\n const keysCount = Object.keys(populated).length\n const shortPaths = []\n for (const filePath of optionPaths) {\n try {\n const relative = path.relative(process.cwd(), filePath)\n shortPaths.push(relative)\n } catch (e) {\n if (debug) {\n _debug(`Failed to load ${filePath} ${e.message}`)\n }\n lastError = e\n }\n }\n\n _log(`injecting env (${keysCount}) from ${shortPaths.join(',')} ${dim(`-- tip: ${_getRandomTip()}`)}`)\n }\n\n if (lastError) {\n return { parsed: parsedAll, error: lastError }\n } else {\n return { parsed: parsedAll }\n }\n}\n\n// Populates process.env from .env file\nfunction config (options) {\n // fallback to original dotenv if DOTENV_KEY is not set\n if (_dotenvKey(options).length === 0) {\n return DotenvModule.configDotenv(options)\n }\n\n const vaultPath = _vaultPath(options)\n\n // dotenvKey exists but .env.vault file does not exist\n if (!vaultPath) {\n _warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`)\n\n return DotenvModule.configDotenv(options)\n }\n\n return DotenvModule._configVault(options)\n}\n\nfunction decrypt (encrypted, keyStr) {\n const key = Buffer.from(keyStr.slice(-64), 'hex')\n let ciphertext = Buffer.from(encrypted, 'base64')\n\n const nonce = ciphertext.subarray(0, 12)\n const authTag = ciphertext.subarray(-16)\n ciphertext = ciphertext.subarray(12, -16)\n\n try {\n const aesgcm = crypto.createDecipheriv('aes-256-gcm', key, nonce)\n aesgcm.setAuthTag(authTag)\n return `${aesgcm.update(ciphertext)}${aesgcm.final()}`\n } catch (error) {\n const isRange = error instanceof RangeError\n const invalidKeyLength = error.message === 'Invalid key length'\n const decryptionFailed = error.message === 'Unsupported state or unable to authenticate data'\n\n if (isRange || invalidKeyLength) {\n const err = new Error('INVALID_DOTENV_KEY: It must be 64 characters long (or more)')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n } else if (decryptionFailed) {\n const err = new Error('DECRYPTION_FAILED: Please check your DOTENV_KEY')\n err.code = 'DECRYPTION_FAILED'\n throw err\n } else {\n throw error\n }\n }\n}\n\n// Populate process.env with parsed values\nfunction populate (processEnv, parsed, options = {}) {\n const debug = Boolean(options && options.debug)\n const override = Boolean(options && options.override)\n const populated = {}\n\n if (typeof parsed !== 'object') {\n const err = new Error('OBJECT_REQUIRED: Please check the processEnv argument being passed to populate')\n err.code = 'OBJECT_REQUIRED'\n throw err\n }\n\n // Set process.env\n for (const key of Object.keys(parsed)) {\n if (Object.prototype.hasOwnProperty.call(processEnv, key)) {\n if (override === true) {\n processEnv[key] = parsed[key]\n populated[key] = parsed[key]\n }\n\n if (debug) {\n if (override === true) {\n _debug(`\"${key}\" is already defined and WAS overwritten`)\n } else {\n _debug(`\"${key}\" is already defined and was NOT overwritten`)\n }\n }\n } else {\n processEnv[key] = parsed[key]\n populated[key] = parsed[key]\n }\n }\n\n return populated\n}\n\nconst DotenvModule = {\n configDotenv,\n _configVault,\n _parseVault,\n config,\n decrypt,\n parse,\n populate\n}\n\nmodule.exports.configDotenv = DotenvModule.configDotenv\nmodule.exports._configVault = DotenvModule._configVault\nmodule.exports._parseVault = DotenvModule._parseVault\nmodule.exports.config = DotenvModule.config\nmodule.exports.decrypt = DotenvModule.decrypt\nmodule.exports.parse = DotenvModule.parse\nmodule.exports.populate = DotenvModule.populate\n\nmodule.exports = DotenvModule\n", "const ANSI_BACKGROUND_OFFSET = 10;\n\nconst wrapAnsi16 = (offset = 0) => code => `\\u001B[${code + offset}m`;\n\nconst wrapAnsi256 = (offset = 0) => code => `\\u001B[${38 + offset};5;${code}m`;\n\nconst wrapAnsi16m = (offset = 0) => (red, green, blue) => `\\u001B[${38 + offset};2;${red};${green};${blue}m`;\n\nconst styles = {\n\tmodifier: {\n\t\treset: [0, 0],\n\t\t// 21 isn't widely supported and 22 does the same thing\n\t\tbold: [1, 22],\n\t\tdim: [2, 22],\n\t\titalic: [3, 23],\n\t\tunderline: [4, 24],\n\t\toverline: [53, 55],\n\t\tinverse: [7, 27],\n\t\thidden: [8, 28],\n\t\tstrikethrough: [9, 29],\n\t},\n\tcolor: {\n\t\tblack: [30, 39],\n\t\tred: [31, 39],\n\t\tgreen: [32, 39],\n\t\tyellow: [33, 39],\n\t\tblue: [34, 39],\n\t\tmagenta: [35, 39],\n\t\tcyan: [36, 39],\n\t\twhite: [37, 39],\n\n\t\t// Bright color\n\t\tblackBright: [90, 39],\n\t\tgray: [90, 39], // Alias of `blackBright`\n\t\tgrey: [90, 39], // Alias of `blackBright`\n\t\tredBright: [91, 39],\n\t\tgreenBright: [92, 39],\n\t\tyellowBright: [93, 39],\n\t\tblueBright: [94, 39],\n\t\tmagentaBright: [95, 39],\n\t\tcyanBright: [96, 39],\n\t\twhiteBright: [97, 39],\n\t},\n\tbgColor: {\n\t\tbgBlack: [40, 49],\n\t\tbgRed: [41, 49],\n\t\tbgGreen: [42, 49],\n\t\tbgYellow: [43, 49],\n\t\tbgBlue: [44, 49],\n\t\tbgMagenta: [45, 49],\n\t\tbgCyan: [46, 49],\n\t\tbgWhite: [47, 49],\n\n\t\t// Bright color\n\t\tbgBlackBright: [100, 49],\n\t\tbgGray: [100, 49], // Alias of `bgBlackBright`\n\t\tbgGrey: [100, 49], // Alias of `bgBlackBright`\n\t\tbgRedBright: [101, 49],\n\t\tbgGreenBright: [102, 49],\n\t\tbgYellowBright: [103, 49],\n\t\tbgBlueBright: [104, 49],\n\t\tbgMagentaBright: [105, 49],\n\t\tbgCyanBright: [106, 49],\n\t\tbgWhiteBright: [107, 49],\n\t},\n};\n\nexport const modifierNames = Object.keys(styles.modifier);\nexport const foregroundColorNames = Object.keys(styles.color);\nexport const backgroundColorNames = Object.keys(styles.bgColor);\nexport const colorNames = [...foregroundColorNames, ...backgroundColorNames];\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`,\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false,\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false,\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tstyles.color.ansi = wrapAnsi16();\n\tstyles.color.ansi256 = wrapAnsi256();\n\tstyles.color.ansi16m = wrapAnsi16m();\n\tstyles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);\n\n\t// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js\n\tObject.defineProperties(styles, {\n\t\trgbToAnsi256: {\n\t\t\tvalue(red, green, blue) {\n\t\t\t\t// We use the extended greyscale palette here, with the exception of\n\t\t\t\t// black and white. normal palette only has 4 greyscale shades.\n\t\t\t\tif (red === green && green === blue) {\n\t\t\t\t\tif (red < 8) {\n\t\t\t\t\t\treturn 16;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (red > 248) {\n\t\t\t\t\t\treturn 231;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Math.round(((red - 8) / 247) * 24) + 232;\n\t\t\t\t}\n\n\t\t\t\treturn 16\n\t\t\t\t\t+ (36 * Math.round(red / 255 * 5))\n\t\t\t\t\t+ (6 * Math.round(green / 255 * 5))\n\t\t\t\t\t+ Math.round(blue / 255 * 5);\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToRgb: {\n\t\t\tvalue(hex) {\n\t\t\t\tconst matches = /[a-f\\d]{6}|[a-f\\d]{3}/i.exec(hex.toString(16));\n\t\t\t\tif (!matches) {\n\t\t\t\t\treturn [0, 0, 0];\n\t\t\t\t}\n\n\t\t\t\tlet [colorString] = matches;\n\n\t\t\t\tif (colorString.length === 3) {\n\t\t\t\t\tcolorString = [...colorString].map(character => character + character).join('');\n\t\t\t\t}\n\n\t\t\t\tconst integer = Number.parseInt(colorString, 16);\n\n\t\t\t\treturn [\n\t\t\t\t\t/* eslint-disable no-bitwise */\n\t\t\t\t\t(integer >> 16) & 0xFF,\n\t\t\t\t\t(integer >> 8) & 0xFF,\n\t\t\t\t\tinteger & 0xFF,\n\t\t\t\t\t/* eslint-enable no-bitwise */\n\t\t\t\t];\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi256: {\n\t\t\tvalue: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t\tansi256ToAnsi: {\n\t\t\tvalue(code) {\n\t\t\t\tif (code < 8) {\n\t\t\t\t\treturn 30 + code;\n\t\t\t\t}\n\n\t\t\t\tif (code < 16) {\n\t\t\t\t\treturn 90 + (code - 8);\n\t\t\t\t}\n\n\t\t\t\tlet red;\n\t\t\t\tlet green;\n\t\t\t\tlet blue;\n\n\t\t\t\tif (code >= 232) {\n\t\t\t\t\tred = (((code - 232) * 10) + 8) / 255;\n\t\t\t\t\tgreen = red;\n\t\t\t\t\tblue = red;\n\t\t\t\t} else {\n\t\t\t\t\tcode -= 16;\n\n\t\t\t\t\tconst remainder = code % 36;\n\n\t\t\t\t\tred = Math.floor(code / 36) / 5;\n\t\t\t\t\tgreen = Math.floor(remainder / 6) / 5;\n\t\t\t\t\tblue = (remainder % 6) / 5;\n\t\t\t\t}\n\n\t\t\t\tconst value = Math.max(red, green, blue) * 2;\n\n\t\t\t\tif (value === 0) {\n\t\t\t\t\treturn 30;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tlet result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));\n\n\t\t\t\tif (value === 2) {\n\t\t\t\t\tresult += 60;\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\trgbToAnsi: {\n\t\t\tvalue: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi: {\n\t\t\tvalue: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t});\n\n\treturn styles;\n}\n\nconst ansiStyles = assembleStyles();\n\nexport default ansiStyles;\n", "import process from 'node:process';\nimport os from 'node:os';\nimport tty from 'node:tty';\n\n// From: https://github.com/sindresorhus/has-flag/blob/main/index.js\n/// function hasFlag(flag, argv = globalThis.Deno?.args ?? process.argv) {\nfunction hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process.argv) {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n}\n\nconst {env} = process;\n\nlet flagForceColor;\nif (\n\thasFlag('no-color')\n\t|| hasFlag('no-colors')\n\t|| hasFlag('color=false')\n\t|| hasFlag('color=never')\n) {\n\tflagForceColor = 0;\n} else if (\n\thasFlag('color')\n\t|| hasFlag('colors')\n\t|| hasFlag('color=true')\n\t|| hasFlag('color=always')\n) {\n\tflagForceColor = 1;\n}\n\nfunction envForceColor() {\n\tif ('FORCE_COLOR' in env) {\n\t\tif (env.FORCE_COLOR === 'true') {\n\t\t\treturn 1;\n\t\t}\n\n\t\tif (env.FORCE_COLOR === 'false') {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3,\n\t};\n}\n\nfunction _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {\n\tconst noFlagForceColor = envForceColor();\n\tif (noFlagForceColor !== undefined) {\n\t\tflagForceColor = noFlagForceColor;\n\t}\n\n\tconst forceColor = sniffFlags ? flagForceColor : noFlagForceColor;\n\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (sniffFlags) {\n\t\tif (hasFlag('color=16m')\n\t\t\t|| hasFlag('color=full')\n\t\t\t|| hasFlag('color=truecolor')) {\n\t\t\treturn 3;\n\t\t}\n\n\t\tif (hasFlag('color=256')) {\n\t\t\treturn 2;\n\t\t}\n\t}\n\n\t// Check for Azure DevOps pipelines.\n\t// Has to be above the `!streamIsTTY` check.\n\tif ('TF_BUILD' in env && 'AGENT_NAME' in env) {\n\t\treturn 1;\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10\n\t\t\t&& Number(osRelease[2]) >= 10_586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14_931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['GITHUB_ACTIONS', 'GITEA_ACTIONS', 'CIRCLECI'].some(key => key in env)) {\n\t\t\treturn 3;\n\t\t}\n\n\t\tif (['TRAVIS', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif (env.TERM === 'xterm-kitty') {\n\t\treturn 3;\n\t}\n\n\tif (env.TERM === 'xterm-ghostty') {\n\t\treturn 3;\n\t}\n\n\tif (env.TERM === 'wezterm') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app': {\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\t}\n\n\t\t\tcase 'Apple_Terminal': {\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nexport function createSupportsColor(stream, options = {}) {\n\tconst level = _supportsColor(stream, {\n\t\tstreamIsTTY: stream && stream.isTTY,\n\t\t...options,\n\t});\n\n\treturn translateLevel(level);\n}\n\nconst supportsColor = {\n\tstdout: createSupportsColor({isTTY: tty.isatty(1)}),\n\tstderr: createSupportsColor({isTTY: tty.isatty(2)}),\n};\n\nexport default supportsColor;\n", "// TODO: When targeting Node.js 16, use `String.prototype.replaceAll`.\nexport function stringReplaceAll(string, substring, replacer) {\n\tlet index = string.indexOf(substring);\n\tif (index === -1) {\n\t\treturn string;\n\t}\n\n\tconst substringLength = substring.length;\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\treturnValue += string.slice(endIndex, index) + substring + replacer;\n\t\tendIndex = index + substringLength;\n\t\tindex = string.indexOf(substring, endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n\nexport function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\tconst gotCR = string[index - 1] === '\\r';\n\t\treturnValue += string.slice(endIndex, (gotCR ? index - 1 : index)) + prefix + (gotCR ? '\\r\\n' : '\\n') + postfix;\n\t\tendIndex = index + 1;\n\t\tindex = string.indexOf('\\n', endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n", "import ansiStyles from '#ansi-styles';\nimport supportsColor from '#supports-color';\nimport { // eslint-disable-line import/order\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex,\n} from './utilities.js';\n\nconst {stdout: stdoutColor, stderr: stderrColor} = supportsColor;\n\nconst GENERATOR = Symbol('GENERATOR');\nconst STYLER = Symbol('STYLER');\nconst IS_EMPTY = Symbol('IS_EMPTY');\n\n// `supportsColor.level` \u2192 `ansiStyles.color[name]` mapping\nconst levelMapping = [\n\t'ansi',\n\t'ansi',\n\t'ansi256',\n\t'ansi16m',\n];\n\nconst styles = Object.create(null);\n\nconst applyOptions = (object, options = {}) => {\n\tif (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {\n\t\tthrow new Error('The `level` option should be an integer from 0 to 3');\n\t}\n\n\t// Detect level if not set manually\n\tconst colorLevel = stdoutColor ? stdoutColor.level : 0;\n\tobject.level = options.level === undefined ? colorLevel : options.level;\n};\n\nexport class Chalk {\n\tconstructor(options) {\n\t\t// eslint-disable-next-line no-constructor-return\n\t\treturn chalkFactory(options);\n\t}\n}\n\nconst chalkFactory = options => {\n\tconst chalk = (...strings) => strings.join(' ');\n\tapplyOptions(chalk, options);\n\n\tObject.setPrototypeOf(chalk, createChalk.prototype);\n\n\treturn chalk;\n};\n\nfunction createChalk(options) {\n\treturn chalkFactory(options);\n}\n\nObject.setPrototypeOf(createChalk.prototype, Function.prototype);\n\nfor (const [styleName, style] of Object.entries(ansiStyles)) {\n\tstyles[styleName] = {\n\t\tget() {\n\t\t\tconst builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);\n\t\t\tObject.defineProperty(this, styleName, {value: builder});\n\t\t\treturn builder;\n\t\t},\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\tconst builder = createBuilder(this, this[STYLER], true);\n\t\tObject.defineProperty(this, 'visible', {value: builder});\n\t\treturn builder;\n\t},\n};\n\nconst getModelAnsi = (model, level, type, ...arguments_) => {\n\tif (model === 'rgb') {\n\t\tif (level === 'ansi16m') {\n\t\t\treturn ansiStyles[type].ansi16m(...arguments_);\n\t\t}\n\n\t\tif (level === 'ansi256') {\n\t\t\treturn ansiStyles[type].ansi256(ansiStyles.rgbToAnsi256(...arguments_));\n\t\t}\n\n\t\treturn ansiStyles[type].ansi(ansiStyles.rgbToAnsi(...arguments_));\n\t}\n\n\tif (model === 'hex') {\n\t\treturn getModelAnsi('rgb', level, type, ...ansiStyles.hexToRgb(...arguments_));\n\t}\n\n\treturn ansiStyles[type][model](...arguments_);\n};\n\nconst usedModels = ['rgb', 'hex', 'ansi256'];\n\nfor (const model of usedModels) {\n\tstyles[model] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(getModelAnsi(model, levelMapping[level], 'color', ...arguments_), ansiStyles.color.close, this[STYLER]);\n\t\t\t\treturn createBuilder(this, styler, this[IS_EMPTY]);\n\t\t\t};\n\t\t},\n\t};\n\n\tconst bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);\n\tstyles[bgModel] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(getModelAnsi(model, levelMapping[level], 'bgColor', ...arguments_), ansiStyles.bgColor.close, this[STYLER]);\n\t\t\t\treturn createBuilder(this, styler, this[IS_EMPTY]);\n\t\t\t};\n\t\t},\n\t};\n}\n\nconst proto = Object.defineProperties(() => {}, {\n\t...styles,\n\tlevel: {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn this[GENERATOR].level;\n\t\t},\n\t\tset(level) {\n\t\t\tthis[GENERATOR].level = level;\n\t\t},\n\t},\n});\n\nconst createStyler = (open, close, parent) => {\n\tlet openAll;\n\tlet closeAll;\n\tif (parent === undefined) {\n\t\topenAll = open;\n\t\tcloseAll = close;\n\t} else {\n\t\topenAll = parent.openAll + open;\n\t\tcloseAll = close + parent.closeAll;\n\t}\n\n\treturn {\n\t\topen,\n\t\tclose,\n\t\topenAll,\n\t\tcloseAll,\n\t\tparent,\n\t};\n};\n\nconst createBuilder = (self, _styler, _isEmpty) => {\n\t// Single argument is hot path, implicit coercion is faster than anything\n\t// eslint-disable-next-line no-implicit-coercion\n\tconst builder = (...arguments_) => applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));\n\n\t// We alter the prototype because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tObject.setPrototypeOf(builder, proto);\n\n\tbuilder[GENERATOR] = self;\n\tbuilder[STYLER] = _styler;\n\tbuilder[IS_EMPTY] = _isEmpty;\n\n\treturn builder;\n};\n\nconst applyStyle = (self, string) => {\n\tif (self.level <= 0 || !string) {\n\t\treturn self[IS_EMPTY] ? '' : string;\n\t}\n\n\tlet styler = self[STYLER];\n\n\tif (styler === undefined) {\n\t\treturn string;\n\t}\n\n\tconst {openAll, closeAll} = styler;\n\tif (string.includes('\\u001B')) {\n\t\twhile (styler !== undefined) {\n\t\t\t// Replace any instances already present with a re-opening code\n\t\t\t// otherwise only the part of the string until said closing code\n\t\t\t// will be colored, and the rest will simply be 'plain'.\n\t\t\tstring = stringReplaceAll(string, styler.close, styler.open);\n\n\t\t\tstyler = styler.parent;\n\t\t}\n\t}\n\n\t// We can move both next actions out of loop, because remaining actions in loop won't have\n\t// any/visible effect on parts we add here. Close the styling before a linebreak and reopen\n\t// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92\n\tconst lfIndex = string.indexOf('\\n');\n\tif (lfIndex !== -1) {\n\t\tstring = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);\n\t}\n\n\treturn openAll + string + closeAll;\n};\n\nObject.defineProperties(createChalk.prototype, styles);\n\nconst chalk = createChalk();\nexport const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});\n\nexport {\n\tmodifierNames,\n\tforegroundColorNames,\n\tbackgroundColorNames,\n\tcolorNames,\n\n\t// TODO: Remove these aliases in the next major version\n\tmodifierNames as modifiers,\n\tforegroundColorNames as foregroundColors,\n\tbackgroundColorNames as backgroundColors,\n\tcolorNames as colors,\n} from './vendor/ansi-styles/index.js';\n\nexport {\n\tstdoutColor as supportsColor,\n\tstderrColor as supportsColorStderr,\n};\n\nexport default chalk;\n", "import type { RacletteConfig } from \"./types\"\nimport chalk from \"chalk\"\nimport chokidar from \"chokidar\"\nimport * as dotenv from \"dotenv\"\nimport fs from \"fs-extra\"\nimport path from \"path\"\nimport { generateServiceConfigs } from \"./config-generator\"\nimport { mergeDeepRight } from \"ramda\"\nimport { logger } from \"src/logger\"\nimport * as Mustache from \"mustache\"\n\n/**\n * Default configuration values\n */\nconst defaultConfig: RacletteConfig = {\n name: \"raclette-app\",\n root: \".raclette\",\n services: {\n frontend: {\n enabled: true,\n port: 8081,\n installPackages: [],\n },\n backend: {\n enabled: true,\n port: 8082,\n enableDebug: false,\n installPackages: [],\n },\n mongodb: {\n enabled: true,\n port: 27017,\n },\n cache: {\n enabled: true,\n port: 6379,\n },\n workbench: {\n enabled: false,\n frontendPort: 8083,\n backendPort: 8084,\n },\n },\n modules: [],\n plugins: [],\n env: {\n development: {},\n production: {\n NODE_ENV: \"production\",\n },\n },\n global: {\n requireAuthentication: true,\n },\n frontend: {\n framework: \"vue\",\n i18n: {\n locales: [\"en-EU\"],\n priorities: {\n app: 10,\n \".\": 30,\n },\n },\n vue: {\n plugins: [],\n },\n },\n backend: {\n sockets: {\n autoSend: {\n compositions: true,\n interactionLinks: true,\n projectConfig: true,\n },\n security: {\n requireAuth: true,\n tokenValidation: \"jwt\",\n },\n options: {\n adapter: \"memory\",\n connectionTimeout: 3000,\n pingInterval: 1500,\n pingTimeout: 1000,\n },\n },\n },\n sourceDirectories: [],\n packageMerging: {\n frontend: [{ file: \"./packages.json\", key: \"frontend\" }],\n backend: [{ file: \"./packages.json\", key: \"backend\" }],\n },\n lockFiles: {\n frontend: \"./app.frontend.yarn.lock\",\n backend: \"./app.backend.yarn.lock\",\n },\n}\n\n/**\n * Load .env file and apply to process.env\n */\nconst loadAndApplyEnvFile = async (\n environment: string,\n): Promise<Record<string, string>> => {\n const envFile = environment === \"production\" ? \".env.production\" : \".env\"\n const envPath = path.join(process.cwd(), envFile)\n\n // Automatically set the RACLETTE_APP_PATH if not existing\n if (!process.env.RACLETTE_APP_PATH) {\n process.env.RACLETTE_APP_PATH = process.cwd()\n }\n\n if (await fs.pathExists(envPath)) {\n const envContent = await fs.readFile(envPath, \"utf-8\")\n const envVars = dotenv.parse(envContent)\n\n // Apply environment variables to process.env\n // Only set if they don't already exist (preserves existing env vars)\n Object.entries(envVars).forEach(([key, value]) => {\n process.env[key] = value\n })\n\n console.log(\n chalk.blue(\n `\uD83D\uDCC4 Loaded ${Object.keys(envVars).length} environment variables from ${envFile}`,\n ),\n )\n\n return {\n ...envVars,\n RACLETTE_APP_PATH: process.env.RACLETTE_APP_PATH,\n }\n }\n\n return {}\n}\n\nexport const loadJsConfig = async (configPath: string) => {\n try {\n const { pathToFileURL } = await import(\"url\")\n const importUrl = pathToFileURL(configPath).href\n\n // Add a cache-busting query parameter to make sure we load the most recent content\n const cacheBustedUrl = `${importUrl}?t=${Date.now()}`\n\n // Clear the module cache to ensure fresh load\n if (require.cache[configPath]) {\n delete require.cache[configPath]\n }\n\n const imported = await import(cacheBustedUrl)\n\n return imported.default || imported\n } catch (error) {\n console.error(chalk.red(`Error loading config from ${configPath}:`), error)\n throw error\n }\n}\n\n/**\n * Parse environment variable strings to appropriate types\n */\nconst parseEnvironmentValues = (obj: any): any => {\n if (typeof obj === \"string\") {\n // Parse boolean strings\n if (obj === \"true\") return true\n if (obj === \"false\") return false\n\n // Parse number strings (but only if they look like numbers)\n if (/^\\d+$/.test(obj)) {\n const num = Number(obj)\n if (!isNaN(num)) return num\n }\n\n // Parse float numbers\n if (/^\\d+\\.\\d+$/.test(obj)) {\n const num = Number(obj)\n if (!isNaN(num)) return num\n }\n\n return obj\n }\n\n if (Array.isArray(obj)) {\n return obj.map((item) => parseEnvironmentValues(item))\n }\n\n if (obj && typeof obj === \"object\") {\n const parsed: any = {}\n for (const [key, value] of Object.entries(obj)) {\n parsed[key] = parseEnvironmentValues(value)\n }\n return parsed\n }\n\n return obj\n}\n\n/**\n * Load and process raclette.config.js\n */\nexport const loadConfig = async (\n additionalConfigFilePath = \"\",\n environment = \"development\",\n): Promise<RacletteConfig> => {\n const cwd = process.cwd();\n const configPath = path.join(cwd, \"raclette.config.js\")\n const raclettePath = path.join(cwd, \".raclette\")\n\n\n // Check if config file exists\n if (!(await fs.pathExists(configPath))) {\n console.warn(\"No raclette.config.js found, using default configuration\")\n return defaultConfig\n }\n\n // CRITICAL: Load .env file and apply to process.env BEFORE loading config\n const envVars = await loadAndApplyEnvFile(environment)\n\n // Now load user config - process.env will have the .env values\n const userConfig = await loadJsConfig(configPath)\n\n // Parse environment variable strings to appropriate types (e.g. bools)\n const parsedUserConfig: Partial<RacletteConfig> =\n parseEnvironmentValues(userConfig)\n\n let parsedAdditionalConfig = {\n env: {},\n }\n if (additionalConfigFilePath) {\n const additionalConfig: Partial<RacletteConfig> = await loadJsConfig(\n additionalConfigFilePath,\n )\n\n // Parse environment variable strings to appropriate types (e.g. bools)\n parsedAdditionalConfig = parseEnvironmentValues(additionalConfig)\n }\n\n // Merge configurations\n const mergedConfig = mergeDeepRight(\n mergeDeepRight(defaultConfig, parsedUserConfig),\n mergeDeepRight(parsedAdditionalConfig, {\n env: {\n [environment]: envVars,\n },\n }),\n ) as RacletteConfig\n\n await writeMergedConfigFile(mergedConfig, raclettePath)\n await generateServiceConfigs(mergedConfig, raclettePath)\n\n return mergedConfig\n}\n\nconst writeMergedConfigFile = async (\n config: RacletteConfig,\n raclettePath: string,\n) => {\n // Format the merged config as an ES module\n const configFileContent = `// Generated Raclette Configuration\n// This file is auto-generated from the merged configuration\n// Do not edit directly\n\nexport default ${JSON.stringify(config, null, 2)};\n`\n\n await fs.writeFile(\n path.join(raclettePath, \"raclette.config.js\"),\n configFileContent,\n )\n\n logger.success(\"raclette Configuration file generated\")\n}\n\n/**\n * Watch the original user config file for changes and trigger a reload\n */\nexport const watchOriginalConfigFile = (): (() => void) => {\n const originalConfigPath = path.join(process.cwd(), \"raclette.config.js\")\n\n logger.progress(`\uD83D\uDD0D Watching for changes in original config: ${originalConfigPath}`)\n const watcher = chokidar.watch(originalConfigPath, {\n ignored: /(^|[/\\\\])\\../, // ignore dotfiles\n persistent: true,\n })\n\n watcher.on(\"change\", async (changedPath) => {\n logger.progress(`\uD83D\uDCDD Original config file changed: ${changedPath}`)\n try {\n await loadConfig()\n } catch (error: any) {\n logger.error(\"Error reloading configuration: \" + error.message)\n }\n })\n\n // Return a function to stop watching\n return () => watcher.close()\n}\n\n/**\n * Define raclette configuration (used in raclette.config.js)\n */\nexport const defineRacletteConfig = (\n config: Partial<RacletteConfig>,\n): Partial<RacletteConfig> => config\n\n\n\nexport const loadConfigTemplate = (\n name: string, env: any) : string => {\n //console.log(\"loadConfigTemplate!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\")\n return \"\"\n}", "import type { RacletteConfig, WorkbenchConfig } from \"./types\"\nimport chalk from \"chalk\"\nimport fs from \"fs-extra\"\nimport path from \"path\"\nimport { logger } from \"src/logger\"\n\n/**\n * Safely write a file, ensuring the target doesn't exist as a directory first\n */\nconst safeWriteFile = async (\n filePath: string,\n content: string,\n): Promise<void> => {\n try {\n // Ensure the parent directory exists\n await fs.ensureDir(path.dirname(filePath))\n\n // Check if the target path exists\n if (await fs.pathExists(filePath)) {\n const stats = await fs.stat(filePath)\n if (stats.isDirectory()) {\n console.warn(\n chalk.yellow(`\u26A0\uFE0F Removing directory at ${filePath} to create file`),\n )\n await fs.remove(filePath)\n }\n }\n\n // Write the file\n await fs.writeFile(filePath, content)\n } catch (error: any) {\n logger.error(` Error writing file ${filePath}: ${error.message}`)\n throw error\n }\n}\n\nexport const generateServiceConfigs = async (\n config: RacletteConfig,\n racletteDir: string,\n): Promise<void> => {\n logger.debug(\"Generating service configuration files...\")\n\n // Create directories if they don't exist\n const backendDir = path.join(racletteDir, \"backend\")\n const frontendDir = path.join(racletteDir, \"frontend\")\n\n await fs.ensureDir(backendDir)\n await fs.ensureDir(frontendDir)\n\n // Extract common/global attributes\n const globalConfig = {\n name: config.name,\n env: config.env,\n modules: config.modules,\n plugins: config.plugins,\n global: config.global,\n }\n\n // Generate backend config as a ts file with all backend-specific properties\n const backendConfigObj = {\n ...globalConfig,\n service: \"backend\",\n // Include all properties from backend\n ...config.backend,\n }\n\n const backendConfig = `\n// Generated racletteJS Backend Configuration\n// This file is auto-generated, do not edit directly\n\nexport const racletteConfig = ${JSON.stringify(backendConfigObj, null, 2)};\n\nexport default racletteConfig;\n`\n\n await safeWriteFile(\n path.join(backendDir, \"raclette.config.js\"),\n backendConfig,\n )\n\n // Generate frontend config as a ts file with all frontend-specific properties\n const frontendConfigObj = {\n ...globalConfig,\n service: \"frontend\",\n // Dynamically include all frontend properties\n ...config.frontend,\n }\n\n const frontendConfig = `\n// Generated racletteJS Frontend Configuration\n// This file is auto-generated, do not edit directly\n\nexport const racletteConfig = ${JSON.stringify(frontendConfigObj, null, 2)};\n\nexport default racletteConfig;\n`\n\n await safeWriteFile(\n path.join(frontendDir, \"raclette.config.js\"),\n frontendConfig,\n )\n\n logger.success(\"Service configuration files generated\")\n}\n\n/**\n * Dynamically generate TypeScript definitions from an object structure\n */\nconst generateDynamicTypeDefinition = (\n obj: any,\n interfaceName: string,\n): string => {\n // Start with the interface declaration\n let typeDefinition = `\n// Generated racletteJS Configuration Types\n// This file is auto-generated, do not edit directly\n\nexport interface ${interfaceName} {\n`\n\n // Process each top-level property\n for (const [key, value] of Object.entries(obj)) {\n if (typeof value === \"object\" && value !== null && !Array.isArray(value)) {\n // For nested objects, use the type generator\n typeDefinition += ` ${key}: ${generateTypeDefinitions(value)};\\n`\n } else if (Array.isArray(value)) {\n // For arrays, check if they're simple or complex\n if (\n value.length > 0 &&\n typeof value[0] === \"object\" &&\n value[0] !== null\n ) {\n typeDefinition += ` ${key}: Array<any>;\\n`\n } else if (value.length > 0) {\n typeDefinition += ` ${key}: Array<${typeof value[0]}>;\\n`\n } else {\n typeDefinition += ` ${key}: any[];\\n`\n }\n // For primitives, use their type\n } else if (typeof value === \"string\" && value.includes('\"')) {\n // For string literals like framework: \"vue\"\n typeDefinition += ` ${key}: \"${value}\";\\n`\n } else {\n typeDefinition += ` ${key}: ${typeof value};\\n`\n }\n }\n\n // Close the interface and add export\n typeDefinition += `}\n\nexport const racletteConfig: ${interfaceName};\nexport default racletteConfig;\n`\n\n return typeDefinition\n}\n\n/**\n * Generate TypeScript type definitions from an object\n */\nconst generateTypeDefinitions = (\n obj: any,\n indent = 0,\n isRoot = true,\n skipFirstLevel = false,\n): string => {\n if (!obj || typeof obj !== \"object\" || Array.isArray(obj)) {\n return \"any\"\n }\n\n const indentStr = \" \".repeat(indent)\n const entries = Object.entries(obj)\n\n if (entries.length === 0) {\n return \"Record<string, any>\"\n }\n\n if (skipFirstLevel) {\n return entries\n .map(([key, value]) => {\n if (\n typeof value === \"object\" &&\n value !== null &&\n !Array.isArray(value)\n ) {\n return `${key}: ${generateTypeDefinitions(value, indent + 2, false)}`\n } else if (Array.isArray(value)) {\n return `${key}: any[]`\n } else {\n return `${key}: ${typeof value}`\n }\n })\n .join(\";\\n\" + indentStr)\n }\n\n const typeDefinition = entries\n .map(([key, value]) => {\n if (\n typeof value === \"object\" &&\n value !== null &&\n !Array.isArray(value)\n ) {\n return `${indentStr} ${key}: ${generateTypeDefinitions(value, indent + 4, false)}`\n } else if (Array.isArray(value)) {\n return `${indentStr} ${key}: any[]`\n } else {\n return `${indentStr} ${key}: ${typeof value}`\n }\n })\n .join(\";\\n\")\n\n return `{\\n${typeDefinition};\\n${indentStr}}`\n}\n\n// TODO: we should use a validation lib/schema language here instead of that hardcoding\n// Validate workbench configuration against allowed keys\nexport const validateWorkbenchConfig = (\n config: any,\n): config is WorkbenchConfig => {\n if (!config || typeof config !== \"object\") {\n throw new Error(\"Workbench configuration must be an object\")\n }\n\n // Check if frontend exists and is an object\n if (!config.frontend || typeof config.frontend !== \"object\") {\n throw new Error('Workbench configuration must have a \"frontend\" object')\n }\n\n // Validate frontend.i18n if present\n if (config.frontend.i18n !== undefined) {\n if (typeof config.frontend.i18n !== \"object\") {\n throw new Error(\"frontend.i18n must be an object\")\n }\n\n if (config.frontend.i18n.locales !== undefined) {\n if (!Array.isArray(config.frontend.i18n.locales)) {\n throw new Error(\"frontend.i18n.locales must be an array\")\n }\n\n if (\n !config.frontend.i18n.locales.every(\n (locale: string) => typeof locale === \"string\",\n )\n ) {\n throw new Error(\"All locales must be strings\")\n }\n }\n }\n\n return true\n}\n\n// Create workbench configuration file\nexport const createWorkbenchConfigFile = async (\n workbenchConfig: WorkbenchConfig,\n projectPath: string = process.cwd(),\n): Promise<string> => {\n const racletteDir = path.join(projectPath, \".raclette\")\n const configFilePath = path.join(racletteDir, \"raclette.config.workbench.js\")\n\n // Ensure .raclette directory exists\n await fs.mkdir(racletteDir, { recursive: true })\n\n // Generate the config file content\n const configContent = `import { defineRacletteConfig } from \"@raclettejs/core\"\n\nexport default defineRacletteConfig(${JSON.stringify(workbenchConfig, null, 2)})\n`\n\n // Write the configuration file\n await fs.writeFile(configFilePath, configContent, \"utf8\")\n\n return configFilePath\n}\n", "// logger.ts\nimport chalk from \"chalk\"\n\nexport type LogLevel = \"error\" | \"warn\" | \"info\" | \"debug\"\nexport type LogType =\n | \"success\"\n | \"error\"\n | \"warning\"\n | \"info\"\n | \"instruction\"\n | \"progress\"\n | \"debug\"\n | \"raclette\"\n\nclass Logger {\n private level: LogLevel = \"info\"\n private verbose = false\n\n setLevel(level: LogLevel) {\n this.level = level\n }\n\n setVerbose(verbose: boolean) {\n this.verbose = verbose\n }\n\n private shouldLog(level: LogLevel): boolean {\n const levels: Record<LogLevel, number> = {\n error: 0,\n warn: 1,\n info: 2,\n debug: 3,\n }\n\n if (level === \"debug\" && this.verbose) return true\n return levels[level] <= levels[this.level]\n }\n\n private getTypeStyle(type: LogType): (text: string) => string {\n switch (type) {\n case \"success\":\n return chalk.green\n case \"error\":\n return chalk.red\n case \"warning\":\n return chalk.yellow\n case \"info\":\n return chalk.blue\n case \"instruction\":\n return chalk.cyan\n case \"progress\":\n return chalk.reset\n case \"debug\":\n return chalk.gray\n case \"raclette\":\n return chalk.rgb(221, 139, 64)\n default:\n return (text: string) => text\n }\n }\n\n private getTypeIcon(type: LogType): string {\n switch (type) {\n case \"success\":\n return \"\u2705\"\n case \"error\":\n return \"\u274C\"\n case \"warning\":\n return \"\u26A0\uFE0F\"\n case \"info\":\n return \"\u2139\uFE0F \"\n case \"instruction\":\n return \"\uD83D\uDCA1\"\n case \"progress\":\n return \"\uD83D\uDD04\"\n case \"debug\":\n return \"\"\n case \"raclette\":\n return \"\uD83E\uDDC0\"\n default:\n return \"\"\n }\n }\n\n private log(level: LogLevel, message: string, type?: LogType) {\n if (!this.shouldLog(level)) return\n\n const styleFunction = type ? this.getTypeStyle(type) : chalk.reset\n const icon = type ? this.getTypeIcon(type) : \"\"\n const prefix = icon ? `${icon} ` : \"\"\n\n console.log(styleFunction(`${prefix}${message}`))\n }\n\n private logError(message: string, error?: any) {\n if (!this.shouldLog(\"error\")) return\n\n const styleFunction = this.getTypeStyle(\"error\")\n const icon = this.getTypeIcon(\"error\")\n const prefix = icon ? `${icon} ` : \"\"\n\n if (error) {\n console.error(styleFunction(`${prefix}${message}`), error)\n } else {\n console.error(styleFunction(`${prefix}${message}`))\n }\n }\n\n // Main logging methods\n error(message: string, error?: any) {\n this.logError(message, error)\n }\n\n warn(message: string) {\n this.log(\"warn\", message, \"warning\")\n }\n\n info(message: string) {\n this.log(\"info\", message, \"info\")\n }\n\n debug(message: string) {\n this.log(\"debug\", message, \"debug\")\n }\n\n // Typed convenience methods\n success(message: string) {\n this.log(\"info\", message, \"success\")\n }\n\n instruction(message: string) {\n this.log(\"info\", message, \"instruction\")\n }\n\n progress(message: string) {\n this.log(\"info\", message, \"progress\")\n }\n\n raclette(message: string) {\n this.log(\"info\", message, \"raclette\")\n }\n\n // Raw methods (no styling)\n raw(message: string, level: LogLevel = \"info\") {\n if (this.shouldLog(level)) {\n console.log(message)\n }\n }\n}\n\n// Global logger instance\nexport const logger = new Logger()\n", "import type { RacletteConfig } from \"../types\"\nimport fs from \"fs-extra\"\nimport path from \"path\"\nimport { getCoreConfig, getCoreImports } from \"./configs/core\"\nimport { getReactConfig, getReactImports } from \"./configs/react\"\nimport {\n getTypeScriptConfig,\n getTypeScriptImports,\n} from \"./configs/typescript\"\nimport { getVueConfig, getVueImports } from \"./configs/vue\"\nimport { getAllDependencies } from \"./dependencies\"\nimport { generateInstallCommand } from \"./utils\"\nimport { logger } from \"src/logger\"\n\n/**\n * Generate an ESLint config file in the .raclette directory\n * This will be used as a base configuration that app projects can extend\n */\nexport const generateEslintConfig = async (\n config: RacletteConfig,\n outputDir: string,\n withReadme = true,\n): Promise<void> => {\n const eslintConfigPath = path.join(outputDir, \"eslint.config.mjs\")\n\n logger.debug(`Generating eslint.config.mjs in ${outputDir}`)\n\n // Default to true if not specified\n const useRecommended = config.eslint?.useRecommended !== false\n\n // Generate imports section\n const imports = generateImports(config, useRecommended)\n\n // Generate configuration sections\n const configSections = []\n\n // Add TypeScript base rules config instead of using tseslint.configs.recommended\n configSections.push(` // TS ESLint base rules\n {\n files: [\"**/*.{ts,tsx}\"],\n plugins: {\n '@typescript-eslint': tseslint.plugin\n },\n languageOptions: {\n parser: tseslint.parser\n },\n rules: {\n // Essential TypeScript syntax rules - equivalent to tseslint.configs.recommended\n \"@typescript-eslint/ban-ts-comment\": \"warn\",\n \"@typescript-eslint/no-explicit-any\": \"warn\",\n \"@typescript-eslint/no-var-requires\": \"error\",\n \"@typescript-eslint/no-empty-interface\": \"warn\",\n \"@typescript-eslint/no-inferrable-types\": \"warn\",\n \"@typescript-eslint/no-non-null-asserted-optional-chain\": \"error\",\n \"@typescript-eslint/no-non-null-assertion\": \"warn\",\n \"@typescript-eslint/no-unnecessary-type-constraint\": \"error\"\n }\n }`)\n\n // Add core ignores\n configSections.push(` // Ignore patterns\n {\n ignores: [\n \"**/node_modules/**\",\n \"**/dist/**\",\n \"**/build/**\",\n \"**/coverage/**\",\n \"**/*.d.ts\",\n \".raclette/**\",\n \".gitignore\"\n ]\n }`)\n\n // Add core JavaScript config\n configSections.push(getCoreConfig(useRecommended))\n\n // Add TypeScript config\n configSections.push(getTypeScriptConfig(useRecommended))\n\n // Add Vue config if needed\n if (config.frontend?.framework === \"vue\") {\n configSections.push(getVueConfig(useRecommended))\n }\n\n // Add React config if needed\n if (config.frontend?.framework === \"react\") {\n configSections.push(getReactConfig(useRecommended))\n }\n\n // Add user custom rules if any\n if (config.eslint?.rules && Object.keys(config.eslint.rules).length > 0) {\n const rulesStr = JSON.stringify(config.eslint.rules, null, 2).replace(\n /\"([^\"]+)\":/g,\n \"$1:\",\n ) // Convert \"key\": to key:\n\n configSections.push(` // User custom rules\n {\n rules: ${rulesStr}\n }`)\n }\n\n // Add user custom ignores if any\n if (config.eslint?.ignores && config.eslint.ignores.length > 0) {\n const ignoresStr = JSON.stringify(config.eslint.ignores).replace(\n /^\\[|\\]$/g,\n \"\",\n ) // Remove square brackets\n\n configSections.push(` // User custom ignores\n {\n ignores: [${ignoresStr}]\n }`)\n }\n\n // Add Prettier config (always include)\n configSections.push(` // Prettier config (must be last)\n {\n rules: {\n ...eslintConfigPrettier.rules\n }\n }`)\n\n // Generate the full config file\n const eslintConfigContent = `/*#############################################################\n \nGenerated ESLint Configuration for ${config.name || \"raclette\"}\nThis file is auto-generated and should not be edited directly\nExtend this config in your project's eslint.config.mjs\n\n#############################################################*/\n\n// Import required plugins and parsers\n${imports.join(\"\\n\")}\n\n// Exported configuration that can be extended\nexport const racletteEslintConfig = [\n${configSections.join(\",\\n\\n\")}\n]\n\n// Helper function for extending the config\nexport const withRaclette = (...userConfigs) => {\n // Simple array concatenation\n return [...racletteEslintConfig, ...userConfigs.flat()];\n}\n\n// Default export for direct usage\nexport default racletteEslintConfig\n`\n\n // Write the eslint.config.mjs file\n await fs.writeFile(eslintConfigPath, eslintConfigContent)\n\n // Generate a readme or guidance file explaining how to use the config\n if (withReadme) {\n await generateEslintReadme(outputDir, config)\n }\n\n logger.debug(`Generated eslint.config.mjs in ${outputDir}`)\n}\n\n/**\n * Generate the imports section of the ESLint config\n */\nconst generateImports = (\n config: RacletteConfig,\n useRecommended: boolean,\n): string[] => {\n const imports = []\n\n // Add core imports\n imports.push(...getCoreImports())\n\n // Add TypeScript imports\n imports.push(...getTypeScriptImports(useRecommended))\n\n // Add framework-specific imports\n if (config.frontend?.framework === \"vue\") {\n imports.push(...getVueImports())\n } else if (config.frontend?.framework === \"react\") {\n imports.push(...getReactImports())\n }\n\n return imports\n}\n\n/**\n * Generate a helpful README for using the ESLint config\n */\nconst generateEslintReadme = async (\n outputDir: string,\n config: RacletteConfig,\n): Promise<void> => {\n const readmePath = path.join(outputDir, \"ESLINT-README.md\")\n\n const allDeps = getAllDependencies(config)\n const installCommand = generateInstallCommand(allDeps)\n\n const readmeContent = `# racletteJS ESLint Configuration\n \nThis directory contains an auto-generated ESLint configuration for your racletteJS project.\n \n## Required Dependencies\n \nTo use this ESLint configuration, you need to install the following dependencies:\n \n\\`\\`\\`bash\n${installCommand}\n\\`\\`\\`\n \n## How to Use\n \nCreate an \\`eslint.config.mjs\\` file in your project root with:\n \n\\`\\`\\`js\n// eslint.config.mjs\nimport { withRaclette } from './.raclette/eslint.config.mjs'\n \nexport default withRaclette(\n // Your custom configs here\n {\n // Example: Override a rule\n rules: {\n 'no-console': 'off'\n }\n },\n // Add more config objects as needed\n)\n\\`\\`\\`\n \n## Features\n \n- Project-aware configuration that understands your racletteJS project structure\n- Framework-specific rules (Vue, React) automatically included based on your project\n- Seamless integration with your IDE\n- Clean, modern approach using ESLint's flat config system\n \n## Editor Integration\n \nFor Visual Studio Code users, make sure to add this to your \\`.vscode/settings.json\\`:\n \n\\`\\`\\`json\n{\n \"eslint.experimental.useFlatConfig\": true\n}\n\\`\\`\\`\n \nThis enables support for the flat config format in the ESLint extension.\n \n## Adding Custom Rules\n \nYou can customize the ESLint rules by:\n\n1. Adding rules in your \\`eslint.config.mjs\\` file:\n\n\\`\\`\\`js\nexport default withRaclette(\n {\n // Your custom rules\n rules: {\n 'indent': ['error', 4],\n 'quotes': ['error', 'single']\n }\n }\n)\n\\`\\`\\`\n\n2. Or by adding them to your \\`raclette.config.js\\` file:\n\n\\`\\`\\`js\nexport default {\n // ...other racletteJS config\n eslint: {\n useRecommended: true, // Set to false to disable recommended rules\n rules: {\n 'indent': ['error', 4],\n 'quotes': ['error', 'single']\n },\n ignores: [\n 'legacy/**'\n ]\n }\n}\n\\`\\`\\`\n`\n\n await fs.writeFile(readmePath, readmeContent)\n}\n", "/**\n * Core JavaScript ESLint configuration\n * Contains basic JavaScript rules that apply to all projects\n */\n\n/**\n * Get core dependencies\n */\nexport const getCoreDependencies = (useRecommended = false): string[] => {\n return [\n \"eslint\",\n \"@eslint/js\",\n \"globals\",\n \"eslint-config-prettier\",\n \"prettier\",\n \"eslint-plugin-prettier\",\n ...(useRecommended ? getCoreRecommendedDependencies() : []),\n ]\n}\n\n/**\n * Get core recommended dependencies\n */\nexport const getCoreRecommendedDependencies = (): string[] => {\n return [] // Currently none beyond base dependencies\n}\n\n/**\n * Get core import statements\n */\nexport const getCoreImports = (): string[] => {\n return [\n \"import globals from 'globals';\",\n \"import eslintConfigPrettier from 'eslint-config-prettier';\",\n ]\n}\n\nexport const getCoreConfig = (useRecommended = false): string => {\n const baseConfig = ` // JavaScript config\n {\n files: [\"**/*.{js,mjs,cjs}\"],\n languageOptions: {\n globals: {\n ...globals.browser,\n ...globals.node,\n test: \"readonly\",\n expect: \"readonly\",\n it: \"readonly\",\n cy: \"readonly\"\n },\n ecmaVersion: 2022,\n sourceType: 'module'\n },\n rules: {\n // Common recommended rules\n \"no-console\": \"warn\",\n \"prefer-const\": \"error\",\n \"no-unused-vars\": \"warn\",\n \"curly\": [\"error\", \"all\"],\n \"eqeqeq\": [\"error\", \"always\"],\n \"require-await\": \"error\",\n \"padding-line-between-statements\": [\n \"error\",\n // nextline after const\n { blankLine: \"always\", prev: \"const\", next: \"*\" },\n // nextline after let\n { blankLine: \"always\", prev: \"let\", next: \"*\" },\n // allow const after const\n { blankLine: \"any\", prev: \"const\", next: \"const\" },\n // allow let after const\n { blankLine: \"any\", prev: \"const\", next: \"let\" },\n // allow const after let\n { blankLine: \"any\", prev: \"let\", next: \"const\" },\n // allow let after let\n { blankLine: \"any\", prev: \"let\", next: \"let\" },\n // add blank line before return statements\n { blankLine: \"always\", prev: \"*\", next: \"return\" },\n // new line between method declarations\n { blankLine: \"always\", prev: \"const\", next: \"block-like\" }\n ]\n }\n }`\n\n // If useRecommended is true, include style configuration as well\n if (useRecommended) {\n return baseConfig + \",\\n\\n\" + getStyleRecommendedConfig()\n }\n\n return baseConfig\n}\n\n/**\n * Style-oriented rules for better code formatting\n * These are included when useRecommended is true\n */\nexport const getStyleRecommendedConfig = (): string => {\n return ` // Style recommended config\n {\n files: [\"**/*.{js,mjs,cjs,ts,tsx}\"],\n rules: {\n // Style and formatting rules\n \"semi\": [\"error\", \"never\"],\n \"quotes\": [\"error\", \"double\", { \"avoidEscape\": true }],\n \"comma-dangle\": [\"error\", \"always-multiline\"],\n \"no-multiple-empty-lines\": [\"error\", { \"max\": 1, \"maxEOF\": 0 }],\n \"object-curly-spacing\": [\"error\", \"always\"],\n \"array-bracket-spacing\": [\"error\", \"never\"],\n \"computed-property-spacing\": [\"error\", \"never\"],\n \"comma-spacing\": [\"error\", { \"before\": false, \"after\": true }],\n \"eol-last\": [\"error\", \"always\"],\n \"indent\": [\"error\", 2],\n \"linebreak-style\": [\"error\", \"unix\"],\n \"no-trailing-spaces\": \"error\",\n \"dot-notation\": [\"error\", { allowKeywords: true }],\n \"id-length\": [\n \"error\",\n { min: 3, exceptions: [\"i\", \"j\", \"a\", \"b\", \"fs\", \"id\"], properties: \"never\" },\n ],\n }\n }`\n}\n", "/**\n * React ESLint configuration\n * Contains React and React Hooks specific rules\n */\n\n/**\n * Get React dependencies\n */\nexport const getReactDependencies = (useRecommended = false): string[] => {\n return [\n \"eslint-plugin-react\",\n \"eslint-plugin-react-hooks\",\n ...(useRecommended ? getReactRecommendedDependencies() : []),\n ]\n}\n\n/**\n * Get React recommended dependencies\n */\nexport const getReactRecommendedDependencies = (): string[] => {\n return [] // Currently none beyond base React dependencies\n}\n\n/**\n * Get React import statements\n */\nexport const getReactImports = (): string[] => {\n return [\n \"import react from 'eslint-plugin-react';\",\n \"import reactHooks from 'eslint-plugin-react-hooks';\",\n ]\n}\n\nexport const getReactConfig = (useRecommended = false): string => {\n // For React, we currently don't have separate recommended rules\n // but we include the parameter for future expansion\n const baseConfig = ` // React config\n {\n files: [\"**/*.{jsx,tsx}\"],\n plugins: {\n react,\n 'react-hooks': reactHooks\n },\n rules: {\n // Essential React rules\n \"react/jsx-uses-react\": \"error\",\n \"react/jsx-uses-vars\": \"error\",\n \"react-hooks/rules-of-hooks\": \"error\",\n \"react-hooks/exhaustive-deps\": \"warn\",\n \n // Additional sensible React rules\n \"react/prop-types\": \"warn\",\n \"react/jsx-no-duplicate-props\": \"error\",\n \"react/jsx-no-undef\": \"error\",\n \"react/jsx-pascal-case\": \"error\",\n \"react/no-direct-mutation-state\": \"error\",\n \"react/no-unescaped-entities\": \"error\"\n }\n }`\n\n // If useRecommended is true, include the recommended React rules\n if (useRecommended) {\n return baseConfig + \",\\n\\n\" + getReactRecommendedConfig()\n }\n\n return baseConfig\n}\n\nexport const getReactRecommendedConfig = (): string => {\n // nothing here yet\n return \"\"\n}\n", "/**\n * Base TypeScript ESLint configuration\n * Contains essential TypeScript rules\n */\n\n/**\n * Get TypeScript base dependencies\n */\nexport const getTypeScriptDependencies = (useRecommended = false): string[] => {\n return [\n \"typescript-eslint\",\n ...(useRecommended ? getTypeScriptRecommendedDependencies() : []),\n ]\n}\n\n/**\n * Get TypeScript recommended dependencies\n */\nexport const getTypeScriptRecommendedDependencies = (): string[] => {\n return [\"eslint-plugin-import\", \"eslint-plugin-prefer-arrow-functions\"]\n}\n\n/**\n * Get TypeScript import statements\n */\nexport const getTypeScriptImports = (useRecommended: boolean): string[] => {\n const imports = [\n // Base imports\n \"import tseslint from 'typescript-eslint';\",\n ]\n\n // Add recommended imports if needed\n if (useRecommended) {\n imports.push(\"import importPlugin from 'eslint-plugin-import';\")\n imports.push(\n \"import preferArrow from 'eslint-plugin-prefer-arrow-functions';\",\n )\n }\n\n return imports\n}\n\nexport const getTypeScriptConfig = (useRecommended = false): string => {\n // Include import and prefer-arrow plugins if useRecommended is true\n const plugins = useRecommended\n ? `{\n '@typescript-eslint': tseslint.plugin,\n 'import': importPlugin,\n 'prefer-arrow': preferArrow\n }`\n : `{\n '@typescript-eslint': tseslint.plugin\n }`\n\n const baseConfig = ` // TypeScript config\n {\n files: [\"**/*.{ts,tsx}\"],\n plugins: ${plugins},\n languageOptions: {\n parser: tseslint.parser,\n parserOptions: {\n ecmaVersion: 2022,\n sourceType: 'module',\n project: './tsconfig.json'\n }\n },\n rules: {\n // Basic TypeScript rules\n 'no-unused-vars': 'off', // disable JS rule in favor of TS rule\n '@typescript-eslint/no-unused-vars': ['warn', { \n argsIgnorePattern: '^(_|error|config|options|args|props|params|fastify|req|request|res|reply)',\n varsIgnorePattern: '^(_|error|config|options|args|props|params)',\n caughtErrorsIgnorePattern: '^(_|error|config|options|args|props|params)'\n }]\n }\n }`\n\n // If useRecommended is true, include recommended configuration as well\n if (useRecommended) {\n return baseConfig + \",\\n\\n\" + getTypeScriptRecommendedConfig()\n }\n\n return baseConfig\n}\n\n/**\n * Recommended TypeScript ESLint configuration\n * Contains more opinionated rules for TypeScript\n */\nexport const getTypeScriptRecommendedConfig = (): string => {\n return ` // TypeScript recommended config\n {\n files: [\"**/*.{ts,tsx}\"],\n rules: {\n // More opinionated TypeScript rules\n '@typescript-eslint/no-explicit-any': 'warn',\n '@typescript-eslint/explicit-function-return-type': 'off',\n '@typescript-eslint/explicit-module-boundary-types': 'off',\n '@typescript-eslint/no-non-null-assertion': 'warn',\n '@typescript-eslint/no-inferrable-types': 'warn',\n '@typescript-eslint/naming-convention': [\n 'error',\n {\n selector: 'interface',\n format: ['PascalCase'],\n custom: {\n regex: '^I[A-Z]',\n match: false\n }\n },\n {\n selector: 'typeAlias',\n format: ['PascalCase']\n },\n {\n selector: 'enum',\n format: ['PascalCase']\n }\n ],\n '@typescript-eslint/consistent-type-imports': [\n 'error',\n {\n prefer: 'type-imports',\n disallowTypeAnnotations: false\n }\n ],\n '@typescript-eslint/consistent-type-definitions': ['warn', 'interface'],\n '@typescript-eslint/prefer-optional-chain': 'warn',\n '@typescript-eslint/prefer-nullish-coalescing': 'warn',\n '@typescript-eslint/prefer-ts-expect-error': 'warn',\n \n // Import organization\n 'import/order': ['error', {\n 'groups': [\n 'type',\n ['builtin', 'external'],\n ['internal', 'parent', 'sibling', 'index'],\n ],\n 'alphabetize': {\n 'order': 'asc',\n 'caseInsensitive': true,\n },\n 'pathGroups': [\n // Handle all type imports first, from both external and internal\n {\n 'pattern': 'type',\n 'group': 'type',\n 'position': 'before',\n },\n {\n 'pattern': '{type,types,Types}',\n 'group': 'type',\n 'position': 'before',\n },\n // Handle aliased paths as internal\n {\n 'pattern': '@/**',\n 'group': 'internal',\n }\n ],\n 'pathGroupsExcludedImportTypes': ['type'],\n }],\n \n // Arrow function preference\n 'prefer-arrow/prefer-arrow-functions': [\n 'error',\n {\n 'disallowPrototype': true,\n 'singleReturnOnly': false,\n 'classPropertiesAllowed': false,\n }\n ]\n }\n }`\n}\n", "/**\n * Vue ESLint base configuration\n * Contains essential Vue rules for basic linting\n */\n\n/**\n * Get Vue dependencies\n */\nexport const getVueDependencies = (useRecommended = false): string[] => {\n return [\n \"eslint-plugin-vue\",\n \"vue-eslint-parser\",\n ...(useRecommended ? getVueRecommendedDependencies() : []),\n ]\n}\n\n/**\n * Get Vue recommended dependencies\n */\nexport const getVueRecommendedDependencies = (): string[] => {\n return [] // Currently none beyond base Vue dependencies\n}\n\n/**\n * Get Vue import statements\n */\nexport const getVueImports = (): string[] => {\n return [\n \"import vue from 'eslint-plugin-vue';\",\n \"import vueEslintParser from 'vue-eslint-parser';\",\n ]\n}\n\nexport const getVueConfig = (useRecommended = false): string => {\n const baseConfig = ` // Vue config\n {\n files: [\"**/*.vue\"],\n // Manually add Vue plugin\n plugins: {\n vue\n },\n languageOptions: {\n parser: vueEslintParser,\n parserOptions: {\n ecmaVersion: 2022,\n sourceType: 'module',\n parser: tseslint.parser, \n extraFileExtensions: [\".vue\"]\n }\n },\n rules: {\n // Essential Vue rules (from ESLint plugin Vue)\n \"vue/multi-word-component-names\": \"off\",\n \"vue/no-mutating-props\": \"error\",\n \"vue/no-reserved-component-names\": \"error\",\n \"vue/no-use-v-if-with-v-for\": \"error\",\n \"vue/require-v-for-key\": \"error\",\n \"vue/valid-template-root\": \"error\",\n \"vue/valid-v-bind\": \"error\",\n \"vue/valid-v-cloak\": \"error\",\n \"vue/valid-v-else-if\": \"error\",\n \"vue/valid-v-else\": \"error\",\n \"vue/valid-v-for\": \"error\",\n \"vue/valid-v-html\": \"error\",\n \"vue/valid-v-if\": \"error\",\n \"vue/valid-v-model\": \"error\",\n \"vue/valid-v-on\": \"error\",\n \"vue/valid-v-once\": \"error\",\n \"vue/valid-v-pre\": \"error\",\n \"vue/valid-v-show\": \"error\",\n \"vue/valid-v-slot\": \"error\",\n \"vue/valid-v-text\": \"error\",\n }\n }`\n\n // If useRecommended is true, include the recommended Vue rules\n if (useRecommended) {\n return baseConfig + \",\\n\\n\" + getVueRecommendedConfig()\n }\n\n return baseConfig\n}\n\n/**\n * Vue ESLint recommended configuration\n * Contains more opinionated Vue rules for better code quality\n */\nexport const getVueRecommendedConfig = (): string => {\n return ` // Vue recommended config\n {\n files: [\"**/*.vue\"],\n rules: {\n // Recommended Vue rules\n \"vue/component-name-in-template-casing\": [\"error\", \"PascalCase\"],\n \"vue/match-component-file-name\": [\n \"error\",\n {\n extensions: [\"vue\"],\n shouldMatchCase: true\n }\n ],\n \"vue/match-component-import-name\": \"error\",\n \"vue/attribute-hyphenation\": \"error\",\n \"vue/component-definition-name-casing\": [\"error\", \"PascalCase\"],\n \"vue/html-closing-bracket-newline\": \"error\",\n \"vue/html-closing-bracket-spacing\": \"error\",\n \"vue/html-end-tags\": \"error\",\n \"vue/html-indent\": [\"error\", 2],\n \"vue/html-quotes\": \"error\",\n \"vue/html-self-closing\": [\"error\", {\n \"html\": {\n \"void\": \"any\",\n \"normal\": \"any\",\n \"component\": \"always\"\n }\n }],\n \"vue/max-attributes-per-line\": [\"error\", {\n \"singleline\": 3,\n \"multiline\": 1\n }],\n \"vue/no-multi-spaces\": \"error\",\n \"vue/no-spaces-around-equal-signs-in-attribute\": \"error\",\n \"vue/no-template-shadow\": \"error\",\n \"vue/one-component-per-file\": \"error\",\n \"vue/prop-name-casing\": [\"error\", \"camelCase\"],\n \"vue/require-default-prop\": \"error\",\n \"vue/require-prop-types\": \"error\",\n \"vue/v-bind-style\": \"error\",\n \"vue/v-on-style\": \"error\",\n \"vue/v-slot-style\": \"error\"\n }\n }`\n}\n", "/**\n * Dependencies Manager for ESLint Configuration\n *\n * This module manages the collection of dependencies from different ESLint rule sets.\n * It acts as an aggregator that can be extended with new rule sets without modifying\n * the core logic of the dependency collection system.\n */\n\nimport type { RacletteConfig } from \"../../types\"\nimport {\n getCoreDependencies,\n getCoreRecommendedDependencies,\n} from \"./configs/core\"\nimport {\n getTypeScriptDependencies,\n getTypeScriptRecommendedDependencies,\n} from \"./configs/typescript\"\nimport {\n getVueDependencies,\n getVueRecommendedDependencies,\n} from \"./configs/vue\"\nimport {\n getReactDependencies,\n getReactRecommendedDependencies,\n} from \"./configs/react\"\n\n/**\n * Get framework-specific dependencies based on the project configuration\n */\nexport const getFrameworkDependencies = (config: RacletteConfig): string[] => {\n const dependencies: string[] = []\n\n // Framework-specific dependencies\n if (config.frontend?.framework === \"vue\") {\n dependencies.push(...getVueDependencies())\n } else if (config.frontend?.framework === \"react\") {\n dependencies.push(...getReactDependencies())\n }\n\n return dependencies\n}\n\n/**\n * Get recommended dependencies based on the project configuration and useRecommended flag\n */\nexport const getRecommendedDependencies = (\n config: RacletteConfig,\n useRecommended: boolean,\n): string[] => {\n if (!useRecommended) {\n return []\n }\n\n const dependencies: string[] = []\n\n // Add core recommended dependencies\n dependencies.push(...getCoreRecommendedDependencies())\n\n // Add TypeScript recommended dependencies\n dependencies.push(...getTypeScriptRecommendedDependencies())\n\n // Add framework-specific recommended dependencies\n if (config.frontend?.framework === \"vue\") {\n dependencies.push(...getVueRecommendedDependencies())\n } else if (config.frontend?.framework === \"react\") {\n dependencies.push(...getReactRecommendedDependencies())\n }\n\n return dependencies\n}\n\n/**\n * Get all required dependencies for the project\n */\nexport const getAllDependencies = (config: RacletteConfig): string[] => {\n // Default to true if not specified\n const useRecommended = config.eslint?.useRecommended !== false\n\n // Collect all dependencies\n const dependencies = [\n // Core dependencies\n ...getCoreDependencies(),\n\n // TypeScript dependencies\n ...getTypeScriptDependencies(),\n ]\n\n // Add framework-specific dependencies\n if (config.frontend?.framework === \"vue\") {\n dependencies.push(...getVueDependencies())\n } else if (config.frontend?.framework === \"react\") {\n dependencies.push(...getReactDependencies())\n }\n\n // Add recommended dependencies if enabled\n if (useRecommended) {\n dependencies.push(\n ...getCoreRecommendedDependencies(),\n ...getTypeScriptRecommendedDependencies(),\n )\n\n // Add framework-specific recommended dependencies\n if (config.frontend?.framework === \"vue\") {\n dependencies.push(...getVueRecommendedDependencies())\n } else if (config.frontend?.framework === \"react\") {\n dependencies.push(...getReactRecommendedDependencies())\n }\n }\n\n // Remove duplicates by using a Set\n return [...new Set(dependencies)]\n}\n", "import { existsSync } from \"fs\"\nimport path from \"path\"\nimport { getVueDependencies } from \"./configs/vue\"\nimport { getReactDependencies } from \"./configs/react\"\n\n/**\n * Get framework-specific dependencies based on the project configuration\n */\nexport const getFrameworkDependencies = (config: any): string[] => {\n const framework = config.frontend?.framework\n\n if (framework === \"vue\") {\n return getVueDependencies()\n }\n\n if (framework === \"react\") {\n return getReactDependencies()\n }\n\n return []\n}\n\n/**\n * Generate the install command for the given dependencies\n */\nexport const generateInstallCommand = (dependencies: string[]): string => {\n // Sort dependencies for consistency\n const sortedDeps = [...dependencies].sort()\n\n // Check for package manager\n const hasYarn = existsSync(path.join(process.cwd(), \"yarn.lock\"))\n const hasPnpm = existsSync(path.join(process.cwd(), \"pnpm-lock.yaml\"))\n const hasBun = existsSync(path.join(process.cwd(), \"bun.lockb\"))\n\n let packageManager = \"npm\"\n let installCmd = \"install\"\n\n if (hasYarn) {\n packageManager = \"yarn\"\n installCmd = \"add\"\n } else if (hasPnpm) {\n packageManager = \"pnpm\"\n installCmd = \"add\"\n } else if (hasBun) {\n packageManager = \"bun\"\n installCmd = \"add\"\n }\n\n // Generate command\n return `${packageManager} ${installCmd} -D ${sortedDeps.join(\" \")}`\n}\n"],
|
|
4
|
+
"sourcesContent": ["{\n \"name\": \"dotenv\",\n \"version\": \"17.3.1\",\n \"description\": \"Loads environment variables from .env file\",\n \"main\": \"lib/main.js\",\n \"types\": \"lib/main.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./lib/main.d.ts\",\n \"require\": \"./lib/main.js\",\n \"default\": \"./lib/main.js\"\n },\n \"./config\": \"./config.js\",\n \"./config.js\": \"./config.js\",\n \"./lib/env-options\": \"./lib/env-options.js\",\n \"./lib/env-options.js\": \"./lib/env-options.js\",\n \"./lib/cli-options\": \"./lib/cli-options.js\",\n \"./lib/cli-options.js\": \"./lib/cli-options.js\",\n \"./package.json\": \"./package.json\"\n },\n \"scripts\": {\n \"dts-check\": \"tsc --project tests/types/tsconfig.json\",\n \"lint\": \"standard\",\n \"pretest\": \"npm run lint && npm run dts-check\",\n \"test\": \"tap run tests/**/*.js --allow-empty-coverage --disable-coverage --timeout=60000\",\n \"test:coverage\": \"tap run tests/**/*.js --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov\",\n \"prerelease\": \"npm test\",\n \"release\": \"standard-version\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git://github.com/motdotla/dotenv.git\"\n },\n \"homepage\": \"https://github.com/motdotla/dotenv#readme\",\n \"funding\": \"https://dotenvx.com\",\n \"keywords\": [\n \"dotenv\",\n \"env\",\n \".env\",\n \"environment\",\n \"variables\",\n \"config\",\n \"settings\"\n ],\n \"readmeFilename\": \"README.md\",\n \"license\": \"BSD-2-Clause\",\n \"devDependencies\": {\n \"@types/node\": \"^18.11.3\",\n \"decache\": \"^4.6.2\",\n \"sinon\": \"^14.0.1\",\n \"standard\": \"^17.0.0\",\n \"standard-version\": \"^9.5.0\",\n \"tap\": \"^19.2.0\",\n \"typescript\": \"^4.8.4\"\n },\n \"engines\": {\n \"node\": \">=12\"\n },\n \"browser\": {\n \"fs\": false\n }\n}\n", "const fs = require('fs')\nconst path = require('path')\nconst os = require('os')\nconst crypto = require('crypto')\nconst packageJson = require('../package.json')\n\nconst version = packageJson.version\n\n// Array of tips to display randomly\nconst TIPS = [\n '\uD83D\uDD10 encrypt with Dotenvx: https://dotenvx.com',\n '\uD83D\uDD10 prevent committing .env to code: https://dotenvx.com/precommit',\n '\uD83D\uDD10 prevent building .env in docker: https://dotenvx.com/prebuild',\n '\uD83E\uDD16 agentic secret storage: https://dotenvx.com/as2',\n '\u26A1\uFE0F secrets for agents: https://dotenvx.com/as2',\n '\uD83D\uDEE1\uFE0F auth for agents: https://vestauth.com',\n '\uD83D\uDEE0\uFE0F run anywhere with `dotenvx run -- yourcommand`',\n '\u2699\uFE0F specify custom .env file path with { path: \\'/custom/path/.env\\' }',\n '\u2699\uFE0F enable debug logging with { debug: true }',\n '\u2699\uFE0F override existing env vars with { override: true }',\n '\u2699\uFE0F suppress all logs with { quiet: true }',\n '\u2699\uFE0F write to custom object with { processEnv: myObject }',\n '\u2699\uFE0F load multiple .env files with { path: [\\'.env.local\\', \\'.env\\'] }'\n]\n\n// Get a random tip from the tips array\nfunction _getRandomTip () {\n return TIPS[Math.floor(Math.random() * TIPS.length)]\n}\n\nfunction parseBoolean (value) {\n if (typeof value === 'string') {\n return !['false', '0', 'no', 'off', ''].includes(value.toLowerCase())\n }\n return Boolean(value)\n}\n\nfunction supportsAnsi () {\n return process.stdout.isTTY // && process.env.TERM !== 'dumb'\n}\n\nfunction dim (text) {\n return supportsAnsi() ? `\\x1b[2m${text}\\x1b[0m` : text\n}\n\nconst LINE = /(?:^|^)\\s*(?:export\\s+)?([\\w.-]+)(?:\\s*=\\s*?|:\\s+?)(\\s*'(?:\\\\'|[^'])*'|\\s*\"(?:\\\\\"|[^\"])*\"|\\s*`(?:\\\\`|[^`])*`|[^#\\r\\n]+)?\\s*(?:#.*)?(?:$|$)/mg\n\n// Parse src into an Object\nfunction parse (src) {\n const obj = {}\n\n // Convert buffer to string\n let lines = src.toString()\n\n // Convert line breaks to same format\n lines = lines.replace(/\\r\\n?/mg, '\\n')\n\n let match\n while ((match = LINE.exec(lines)) != null) {\n const key = match[1]\n\n // Default undefined or null to empty string\n let value = (match[2] || '')\n\n // Remove whitespace\n value = value.trim()\n\n // Check if double quoted\n const maybeQuote = value[0]\n\n // Remove surrounding quotes\n value = value.replace(/^(['\"`])([\\s\\S]*)\\1$/mg, '$2')\n\n // Expand newlines if double quoted\n if (maybeQuote === '\"') {\n value = value.replace(/\\\\n/g, '\\n')\n value = value.replace(/\\\\r/g, '\\r')\n }\n\n // Add to object\n obj[key] = value\n }\n\n return obj\n}\n\nfunction _parseVault (options) {\n options = options || {}\n\n const vaultPath = _vaultPath(options)\n options.path = vaultPath // parse .env.vault\n const result = DotenvModule.configDotenv(options)\n if (!result.parsed) {\n const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`)\n err.code = 'MISSING_DATA'\n throw err\n }\n\n // handle scenario for comma separated keys - for use with key rotation\n // example: DOTENV_KEY=\"dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=prod,dotenv://:key_7890@dotenvx.com/vault/.env.vault?environment=prod\"\n const keys = _dotenvKey(options).split(',')\n const length = keys.length\n\n let decrypted\n for (let i = 0; i < length; i++) {\n try {\n // Get full key\n const key = keys[i].trim()\n\n // Get instructions for decrypt\n const attrs = _instructions(result, key)\n\n // Decrypt\n decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key)\n\n break\n } catch (error) {\n // last key\n if (i + 1 >= length) {\n throw error\n }\n // try next key\n }\n }\n\n // Parse decrypted .env string\n return DotenvModule.parse(decrypted)\n}\n\nfunction _warn (message) {\n console.error(`[dotenv@${version}][WARN] ${message}`)\n}\n\nfunction _debug (message) {\n console.log(`[dotenv@${version}][DEBUG] ${message}`)\n}\n\nfunction _log (message) {\n console.log(`[dotenv@${version}] ${message}`)\n}\n\nfunction _dotenvKey (options) {\n // prioritize developer directly setting options.DOTENV_KEY\n if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) {\n return options.DOTENV_KEY\n }\n\n // secondary infra already contains a DOTENV_KEY environment variable\n if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) {\n return process.env.DOTENV_KEY\n }\n\n // fallback to empty string\n return ''\n}\n\nfunction _instructions (result, dotenvKey) {\n // Parse DOTENV_KEY. Format is a URI\n let uri\n try {\n uri = new URL(dotenvKey)\n } catch (error) {\n if (error.code === 'ERR_INVALID_URL') {\n const err = new Error('INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n throw error\n }\n\n // Get decrypt key\n const key = uri.password\n if (!key) {\n const err = new Error('INVALID_DOTENV_KEY: Missing key part')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n // Get environment\n const environment = uri.searchParams.get('environment')\n if (!environment) {\n const err = new Error('INVALID_DOTENV_KEY: Missing environment part')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n // Get ciphertext payload\n const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`\n const ciphertext = result.parsed[environmentKey] // DOTENV_VAULT_PRODUCTION\n if (!ciphertext) {\n const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`)\n err.code = 'NOT_FOUND_DOTENV_ENVIRONMENT'\n throw err\n }\n\n return { ciphertext, key }\n}\n\nfunction _vaultPath (options) {\n let possibleVaultPath = null\n\n if (options && options.path && options.path.length > 0) {\n if (Array.isArray(options.path)) {\n for (const filepath of options.path) {\n if (fs.existsSync(filepath)) {\n possibleVaultPath = filepath.endsWith('.vault') ? filepath : `${filepath}.vault`\n }\n }\n } else {\n possibleVaultPath = options.path.endsWith('.vault') ? options.path : `${options.path}.vault`\n }\n } else {\n possibleVaultPath = path.resolve(process.cwd(), '.env.vault')\n }\n\n if (fs.existsSync(possibleVaultPath)) {\n return possibleVaultPath\n }\n\n return null\n}\n\nfunction _resolveHome (envPath) {\n return envPath[0] === '~' ? path.join(os.homedir(), envPath.slice(1)) : envPath\n}\n\nfunction _configVault (options) {\n const debug = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || (options && options.debug))\n const quiet = parseBoolean(process.env.DOTENV_CONFIG_QUIET || (options && options.quiet))\n\n if (debug || !quiet) {\n _log('Loading env from encrypted .env.vault')\n }\n\n const parsed = DotenvModule._parseVault(options)\n\n let processEnv = process.env\n if (options && options.processEnv != null) {\n processEnv = options.processEnv\n }\n\n DotenvModule.populate(processEnv, parsed, options)\n\n return { parsed }\n}\n\nfunction configDotenv (options) {\n const dotenvPath = path.resolve(process.cwd(), '.env')\n let encoding = 'utf8'\n let processEnv = process.env\n if (options && options.processEnv != null) {\n processEnv = options.processEnv\n }\n let debug = parseBoolean(processEnv.DOTENV_CONFIG_DEBUG || (options && options.debug))\n let quiet = parseBoolean(processEnv.DOTENV_CONFIG_QUIET || (options && options.quiet))\n\n if (options && options.encoding) {\n encoding = options.encoding\n } else {\n if (debug) {\n _debug('No encoding is specified. UTF-8 is used by default')\n }\n }\n\n let optionPaths = [dotenvPath] // default, look for .env\n if (options && options.path) {\n if (!Array.isArray(options.path)) {\n optionPaths = [_resolveHome(options.path)]\n } else {\n optionPaths = [] // reset default\n for (const filepath of options.path) {\n optionPaths.push(_resolveHome(filepath))\n }\n }\n }\n\n // Build the parsed data in a temporary object (because we need to return it). Once we have the final\n // parsed data, we will combine it with process.env (or options.processEnv if provided).\n let lastError\n const parsedAll = {}\n for (const path of optionPaths) {\n try {\n // Specifying an encoding returns a string instead of a buffer\n const parsed = DotenvModule.parse(fs.readFileSync(path, { encoding }))\n\n DotenvModule.populate(parsedAll, parsed, options)\n } catch (e) {\n if (debug) {\n _debug(`Failed to load ${path} ${e.message}`)\n }\n lastError = e\n }\n }\n\n const populated = DotenvModule.populate(processEnv, parsedAll, options)\n\n // handle user settings DOTENV_CONFIG_ options inside .env file(s)\n debug = parseBoolean(processEnv.DOTENV_CONFIG_DEBUG || debug)\n quiet = parseBoolean(processEnv.DOTENV_CONFIG_QUIET || quiet)\n\n if (debug || !quiet) {\n const keysCount = Object.keys(populated).length\n const shortPaths = []\n for (const filePath of optionPaths) {\n try {\n const relative = path.relative(process.cwd(), filePath)\n shortPaths.push(relative)\n } catch (e) {\n if (debug) {\n _debug(`Failed to load ${filePath} ${e.message}`)\n }\n lastError = e\n }\n }\n\n _log(`injecting env (${keysCount}) from ${shortPaths.join(',')} ${dim(`-- tip: ${_getRandomTip()}`)}`)\n }\n\n if (lastError) {\n return { parsed: parsedAll, error: lastError }\n } else {\n return { parsed: parsedAll }\n }\n}\n\n// Populates process.env from .env file\nfunction config (options) {\n // fallback to original dotenv if DOTENV_KEY is not set\n if (_dotenvKey(options).length === 0) {\n return DotenvModule.configDotenv(options)\n }\n\n const vaultPath = _vaultPath(options)\n\n // dotenvKey exists but .env.vault file does not exist\n if (!vaultPath) {\n _warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`)\n\n return DotenvModule.configDotenv(options)\n }\n\n return DotenvModule._configVault(options)\n}\n\nfunction decrypt (encrypted, keyStr) {\n const key = Buffer.from(keyStr.slice(-64), 'hex')\n let ciphertext = Buffer.from(encrypted, 'base64')\n\n const nonce = ciphertext.subarray(0, 12)\n const authTag = ciphertext.subarray(-16)\n ciphertext = ciphertext.subarray(12, -16)\n\n try {\n const aesgcm = crypto.createDecipheriv('aes-256-gcm', key, nonce)\n aesgcm.setAuthTag(authTag)\n return `${aesgcm.update(ciphertext)}${aesgcm.final()}`\n } catch (error) {\n const isRange = error instanceof RangeError\n const invalidKeyLength = error.message === 'Invalid key length'\n const decryptionFailed = error.message === 'Unsupported state or unable to authenticate data'\n\n if (isRange || invalidKeyLength) {\n const err = new Error('INVALID_DOTENV_KEY: It must be 64 characters long (or more)')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n } else if (decryptionFailed) {\n const err = new Error('DECRYPTION_FAILED: Please check your DOTENV_KEY')\n err.code = 'DECRYPTION_FAILED'\n throw err\n } else {\n throw error\n }\n }\n}\n\n// Populate process.env with parsed values\nfunction populate (processEnv, parsed, options = {}) {\n const debug = Boolean(options && options.debug)\n const override = Boolean(options && options.override)\n const populated = {}\n\n if (typeof parsed !== 'object') {\n const err = new Error('OBJECT_REQUIRED: Please check the processEnv argument being passed to populate')\n err.code = 'OBJECT_REQUIRED'\n throw err\n }\n\n // Set process.env\n for (const key of Object.keys(parsed)) {\n if (Object.prototype.hasOwnProperty.call(processEnv, key)) {\n if (override === true) {\n processEnv[key] = parsed[key]\n populated[key] = parsed[key]\n }\n\n if (debug) {\n if (override === true) {\n _debug(`\"${key}\" is already defined and WAS overwritten`)\n } else {\n _debug(`\"${key}\" is already defined and was NOT overwritten`)\n }\n }\n } else {\n processEnv[key] = parsed[key]\n populated[key] = parsed[key]\n }\n }\n\n return populated\n}\n\nconst DotenvModule = {\n configDotenv,\n _configVault,\n _parseVault,\n config,\n decrypt,\n parse,\n populate\n}\n\nmodule.exports.configDotenv = DotenvModule.configDotenv\nmodule.exports._configVault = DotenvModule._configVault\nmodule.exports._parseVault = DotenvModule._parseVault\nmodule.exports.config = DotenvModule.config\nmodule.exports.decrypt = DotenvModule.decrypt\nmodule.exports.parse = DotenvModule.parse\nmodule.exports.populate = DotenvModule.populate\n\nmodule.exports = DotenvModule\n", "const ANSI_BACKGROUND_OFFSET = 10;\n\nconst wrapAnsi16 = (offset = 0) => code => `\\u001B[${code + offset}m`;\n\nconst wrapAnsi256 = (offset = 0) => code => `\\u001B[${38 + offset};5;${code}m`;\n\nconst wrapAnsi16m = (offset = 0) => (red, green, blue) => `\\u001B[${38 + offset};2;${red};${green};${blue}m`;\n\nconst styles = {\n\tmodifier: {\n\t\treset: [0, 0],\n\t\t// 21 isn't widely supported and 22 does the same thing\n\t\tbold: [1, 22],\n\t\tdim: [2, 22],\n\t\titalic: [3, 23],\n\t\tunderline: [4, 24],\n\t\toverline: [53, 55],\n\t\tinverse: [7, 27],\n\t\thidden: [8, 28],\n\t\tstrikethrough: [9, 29],\n\t},\n\tcolor: {\n\t\tblack: [30, 39],\n\t\tred: [31, 39],\n\t\tgreen: [32, 39],\n\t\tyellow: [33, 39],\n\t\tblue: [34, 39],\n\t\tmagenta: [35, 39],\n\t\tcyan: [36, 39],\n\t\twhite: [37, 39],\n\n\t\t// Bright color\n\t\tblackBright: [90, 39],\n\t\tgray: [90, 39], // Alias of `blackBright`\n\t\tgrey: [90, 39], // Alias of `blackBright`\n\t\tredBright: [91, 39],\n\t\tgreenBright: [92, 39],\n\t\tyellowBright: [93, 39],\n\t\tblueBright: [94, 39],\n\t\tmagentaBright: [95, 39],\n\t\tcyanBright: [96, 39],\n\t\twhiteBright: [97, 39],\n\t},\n\tbgColor: {\n\t\tbgBlack: [40, 49],\n\t\tbgRed: [41, 49],\n\t\tbgGreen: [42, 49],\n\t\tbgYellow: [43, 49],\n\t\tbgBlue: [44, 49],\n\t\tbgMagenta: [45, 49],\n\t\tbgCyan: [46, 49],\n\t\tbgWhite: [47, 49],\n\n\t\t// Bright color\n\t\tbgBlackBright: [100, 49],\n\t\tbgGray: [100, 49], // Alias of `bgBlackBright`\n\t\tbgGrey: [100, 49], // Alias of `bgBlackBright`\n\t\tbgRedBright: [101, 49],\n\t\tbgGreenBright: [102, 49],\n\t\tbgYellowBright: [103, 49],\n\t\tbgBlueBright: [104, 49],\n\t\tbgMagentaBright: [105, 49],\n\t\tbgCyanBright: [106, 49],\n\t\tbgWhiteBright: [107, 49],\n\t},\n};\n\nexport const modifierNames = Object.keys(styles.modifier);\nexport const foregroundColorNames = Object.keys(styles.color);\nexport const backgroundColorNames = Object.keys(styles.bgColor);\nexport const colorNames = [...foregroundColorNames, ...backgroundColorNames];\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`,\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false,\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false,\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tstyles.color.ansi = wrapAnsi16();\n\tstyles.color.ansi256 = wrapAnsi256();\n\tstyles.color.ansi16m = wrapAnsi16m();\n\tstyles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);\n\n\t// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js\n\tObject.defineProperties(styles, {\n\t\trgbToAnsi256: {\n\t\t\tvalue(red, green, blue) {\n\t\t\t\t// We use the extended greyscale palette here, with the exception of\n\t\t\t\t// black and white. normal palette only has 4 greyscale shades.\n\t\t\t\tif (red === green && green === blue) {\n\t\t\t\t\tif (red < 8) {\n\t\t\t\t\t\treturn 16;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (red > 248) {\n\t\t\t\t\t\treturn 231;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Math.round(((red - 8) / 247) * 24) + 232;\n\t\t\t\t}\n\n\t\t\t\treturn 16\n\t\t\t\t\t+ (36 * Math.round(red / 255 * 5))\n\t\t\t\t\t+ (6 * Math.round(green / 255 * 5))\n\t\t\t\t\t+ Math.round(blue / 255 * 5);\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToRgb: {\n\t\t\tvalue(hex) {\n\t\t\t\tconst matches = /[a-f\\d]{6}|[a-f\\d]{3}/i.exec(hex.toString(16));\n\t\t\t\tif (!matches) {\n\t\t\t\t\treturn [0, 0, 0];\n\t\t\t\t}\n\n\t\t\t\tlet [colorString] = matches;\n\n\t\t\t\tif (colorString.length === 3) {\n\t\t\t\t\tcolorString = [...colorString].map(character => character + character).join('');\n\t\t\t\t}\n\n\t\t\t\tconst integer = Number.parseInt(colorString, 16);\n\n\t\t\t\treturn [\n\t\t\t\t\t/* eslint-disable no-bitwise */\n\t\t\t\t\t(integer >> 16) & 0xFF,\n\t\t\t\t\t(integer >> 8) & 0xFF,\n\t\t\t\t\tinteger & 0xFF,\n\t\t\t\t\t/* eslint-enable no-bitwise */\n\t\t\t\t];\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi256: {\n\t\t\tvalue: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t\tansi256ToAnsi: {\n\t\t\tvalue(code) {\n\t\t\t\tif (code < 8) {\n\t\t\t\t\treturn 30 + code;\n\t\t\t\t}\n\n\t\t\t\tif (code < 16) {\n\t\t\t\t\treturn 90 + (code - 8);\n\t\t\t\t}\n\n\t\t\t\tlet red;\n\t\t\t\tlet green;\n\t\t\t\tlet blue;\n\n\t\t\t\tif (code >= 232) {\n\t\t\t\t\tred = (((code - 232) * 10) + 8) / 255;\n\t\t\t\t\tgreen = red;\n\t\t\t\t\tblue = red;\n\t\t\t\t} else {\n\t\t\t\t\tcode -= 16;\n\n\t\t\t\t\tconst remainder = code % 36;\n\n\t\t\t\t\tred = Math.floor(code / 36) / 5;\n\t\t\t\t\tgreen = Math.floor(remainder / 6) / 5;\n\t\t\t\t\tblue = (remainder % 6) / 5;\n\t\t\t\t}\n\n\t\t\t\tconst value = Math.max(red, green, blue) * 2;\n\n\t\t\t\tif (value === 0) {\n\t\t\t\t\treturn 30;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tlet result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));\n\n\t\t\t\tif (value === 2) {\n\t\t\t\t\tresult += 60;\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\trgbToAnsi: {\n\t\t\tvalue: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi: {\n\t\t\tvalue: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t});\n\n\treturn styles;\n}\n\nconst ansiStyles = assembleStyles();\n\nexport default ansiStyles;\n", "import process from 'node:process';\nimport os from 'node:os';\nimport tty from 'node:tty';\n\n// From: https://github.com/sindresorhus/has-flag/blob/main/index.js\n/// function hasFlag(flag, argv = globalThis.Deno?.args ?? process.argv) {\nfunction hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process.argv) {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n}\n\nconst {env} = process;\n\nlet flagForceColor;\nif (\n\thasFlag('no-color')\n\t|| hasFlag('no-colors')\n\t|| hasFlag('color=false')\n\t|| hasFlag('color=never')\n) {\n\tflagForceColor = 0;\n} else if (\n\thasFlag('color')\n\t|| hasFlag('colors')\n\t|| hasFlag('color=true')\n\t|| hasFlag('color=always')\n) {\n\tflagForceColor = 1;\n}\n\nfunction envForceColor() {\n\tif ('FORCE_COLOR' in env) {\n\t\tif (env.FORCE_COLOR === 'true') {\n\t\t\treturn 1;\n\t\t}\n\n\t\tif (env.FORCE_COLOR === 'false') {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3,\n\t};\n}\n\nfunction _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {\n\tconst noFlagForceColor = envForceColor();\n\tif (noFlagForceColor !== undefined) {\n\t\tflagForceColor = noFlagForceColor;\n\t}\n\n\tconst forceColor = sniffFlags ? flagForceColor : noFlagForceColor;\n\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (sniffFlags) {\n\t\tif (hasFlag('color=16m')\n\t\t\t|| hasFlag('color=full')\n\t\t\t|| hasFlag('color=truecolor')) {\n\t\t\treturn 3;\n\t\t}\n\n\t\tif (hasFlag('color=256')) {\n\t\t\treturn 2;\n\t\t}\n\t}\n\n\t// Check for Azure DevOps pipelines.\n\t// Has to be above the `!streamIsTTY` check.\n\tif ('TF_BUILD' in env && 'AGENT_NAME' in env) {\n\t\treturn 1;\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10\n\t\t\t&& Number(osRelease[2]) >= 10_586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14_931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['GITHUB_ACTIONS', 'GITEA_ACTIONS', 'CIRCLECI'].some(key => key in env)) {\n\t\t\treturn 3;\n\t\t}\n\n\t\tif (['TRAVIS', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif (env.TERM === 'xterm-kitty') {\n\t\treturn 3;\n\t}\n\n\tif (env.TERM === 'xterm-ghostty') {\n\t\treturn 3;\n\t}\n\n\tif (env.TERM === 'wezterm') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app': {\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\t}\n\n\t\t\tcase 'Apple_Terminal': {\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nexport function createSupportsColor(stream, options = {}) {\n\tconst level = _supportsColor(stream, {\n\t\tstreamIsTTY: stream && stream.isTTY,\n\t\t...options,\n\t});\n\n\treturn translateLevel(level);\n}\n\nconst supportsColor = {\n\tstdout: createSupportsColor({isTTY: tty.isatty(1)}),\n\tstderr: createSupportsColor({isTTY: tty.isatty(2)}),\n};\n\nexport default supportsColor;\n", "// TODO: When targeting Node.js 16, use `String.prototype.replaceAll`.\nexport function stringReplaceAll(string, substring, replacer) {\n\tlet index = string.indexOf(substring);\n\tif (index === -1) {\n\t\treturn string;\n\t}\n\n\tconst substringLength = substring.length;\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\treturnValue += string.slice(endIndex, index) + substring + replacer;\n\t\tendIndex = index + substringLength;\n\t\tindex = string.indexOf(substring, endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n\nexport function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\tconst gotCR = string[index - 1] === '\\r';\n\t\treturnValue += string.slice(endIndex, (gotCR ? index - 1 : index)) + prefix + (gotCR ? '\\r\\n' : '\\n') + postfix;\n\t\tendIndex = index + 1;\n\t\tindex = string.indexOf('\\n', endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n", "import ansiStyles from '#ansi-styles';\nimport supportsColor from '#supports-color';\nimport { // eslint-disable-line import/order\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex,\n} from './utilities.js';\n\nconst {stdout: stdoutColor, stderr: stderrColor} = supportsColor;\n\nconst GENERATOR = Symbol('GENERATOR');\nconst STYLER = Symbol('STYLER');\nconst IS_EMPTY = Symbol('IS_EMPTY');\n\n// `supportsColor.level` \u2192 `ansiStyles.color[name]` mapping\nconst levelMapping = [\n\t'ansi',\n\t'ansi',\n\t'ansi256',\n\t'ansi16m',\n];\n\nconst styles = Object.create(null);\n\nconst applyOptions = (object, options = {}) => {\n\tif (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {\n\t\tthrow new Error('The `level` option should be an integer from 0 to 3');\n\t}\n\n\t// Detect level if not set manually\n\tconst colorLevel = stdoutColor ? stdoutColor.level : 0;\n\tobject.level = options.level === undefined ? colorLevel : options.level;\n};\n\nexport class Chalk {\n\tconstructor(options) {\n\t\t// eslint-disable-next-line no-constructor-return\n\t\treturn chalkFactory(options);\n\t}\n}\n\nconst chalkFactory = options => {\n\tconst chalk = (...strings) => strings.join(' ');\n\tapplyOptions(chalk, options);\n\n\tObject.setPrototypeOf(chalk, createChalk.prototype);\n\n\treturn chalk;\n};\n\nfunction createChalk(options) {\n\treturn chalkFactory(options);\n}\n\nObject.setPrototypeOf(createChalk.prototype, Function.prototype);\n\nfor (const [styleName, style] of Object.entries(ansiStyles)) {\n\tstyles[styleName] = {\n\t\tget() {\n\t\t\tconst builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);\n\t\t\tObject.defineProperty(this, styleName, {value: builder});\n\t\t\treturn builder;\n\t\t},\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\tconst builder = createBuilder(this, this[STYLER], true);\n\t\tObject.defineProperty(this, 'visible', {value: builder});\n\t\treturn builder;\n\t},\n};\n\nconst getModelAnsi = (model, level, type, ...arguments_) => {\n\tif (model === 'rgb') {\n\t\tif (level === 'ansi16m') {\n\t\t\treturn ansiStyles[type].ansi16m(...arguments_);\n\t\t}\n\n\t\tif (level === 'ansi256') {\n\t\t\treturn ansiStyles[type].ansi256(ansiStyles.rgbToAnsi256(...arguments_));\n\t\t}\n\n\t\treturn ansiStyles[type].ansi(ansiStyles.rgbToAnsi(...arguments_));\n\t}\n\n\tif (model === 'hex') {\n\t\treturn getModelAnsi('rgb', level, type, ...ansiStyles.hexToRgb(...arguments_));\n\t}\n\n\treturn ansiStyles[type][model](...arguments_);\n};\n\nconst usedModels = ['rgb', 'hex', 'ansi256'];\n\nfor (const model of usedModels) {\n\tstyles[model] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(getModelAnsi(model, levelMapping[level], 'color', ...arguments_), ansiStyles.color.close, this[STYLER]);\n\t\t\t\treturn createBuilder(this, styler, this[IS_EMPTY]);\n\t\t\t};\n\t\t},\n\t};\n\n\tconst bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);\n\tstyles[bgModel] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(getModelAnsi(model, levelMapping[level], 'bgColor', ...arguments_), ansiStyles.bgColor.close, this[STYLER]);\n\t\t\t\treturn createBuilder(this, styler, this[IS_EMPTY]);\n\t\t\t};\n\t\t},\n\t};\n}\n\nconst proto = Object.defineProperties(() => {}, {\n\t...styles,\n\tlevel: {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn this[GENERATOR].level;\n\t\t},\n\t\tset(level) {\n\t\t\tthis[GENERATOR].level = level;\n\t\t},\n\t},\n});\n\nconst createStyler = (open, close, parent) => {\n\tlet openAll;\n\tlet closeAll;\n\tif (parent === undefined) {\n\t\topenAll = open;\n\t\tcloseAll = close;\n\t} else {\n\t\topenAll = parent.openAll + open;\n\t\tcloseAll = close + parent.closeAll;\n\t}\n\n\treturn {\n\t\topen,\n\t\tclose,\n\t\topenAll,\n\t\tcloseAll,\n\t\tparent,\n\t};\n};\n\nconst createBuilder = (self, _styler, _isEmpty) => {\n\t// Single argument is hot path, implicit coercion is faster than anything\n\t// eslint-disable-next-line no-implicit-coercion\n\tconst builder = (...arguments_) => applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));\n\n\t// We alter the prototype because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tObject.setPrototypeOf(builder, proto);\n\n\tbuilder[GENERATOR] = self;\n\tbuilder[STYLER] = _styler;\n\tbuilder[IS_EMPTY] = _isEmpty;\n\n\treturn builder;\n};\n\nconst applyStyle = (self, string) => {\n\tif (self.level <= 0 || !string) {\n\t\treturn self[IS_EMPTY] ? '' : string;\n\t}\n\n\tlet styler = self[STYLER];\n\n\tif (styler === undefined) {\n\t\treturn string;\n\t}\n\n\tconst {openAll, closeAll} = styler;\n\tif (string.includes('\\u001B')) {\n\t\twhile (styler !== undefined) {\n\t\t\t// Replace any instances already present with a re-opening code\n\t\t\t// otherwise only the part of the string until said closing code\n\t\t\t// will be colored, and the rest will simply be 'plain'.\n\t\t\tstring = stringReplaceAll(string, styler.close, styler.open);\n\n\t\t\tstyler = styler.parent;\n\t\t}\n\t}\n\n\t// We can move both next actions out of loop, because remaining actions in loop won't have\n\t// any/visible effect on parts we add here. Close the styling before a linebreak and reopen\n\t// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92\n\tconst lfIndex = string.indexOf('\\n');\n\tif (lfIndex !== -1) {\n\t\tstring = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);\n\t}\n\n\treturn openAll + string + closeAll;\n};\n\nObject.defineProperties(createChalk.prototype, styles);\n\nconst chalk = createChalk();\nexport const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});\n\nexport {\n\tmodifierNames,\n\tforegroundColorNames,\n\tbackgroundColorNames,\n\tcolorNames,\n\n\t// TODO: Remove these aliases in the next major version\n\tmodifierNames as modifiers,\n\tforegroundColorNames as foregroundColors,\n\tbackgroundColorNames as backgroundColors,\n\tcolorNames as colors,\n} from './vendor/ansi-styles/index.js';\n\nexport {\n\tstdoutColor as supportsColor,\n\tstderrColor as supportsColorStderr,\n};\n\nexport default chalk;\n", "import type { RacletteConfig } from \"./types\"\nimport chalk from \"chalk\"\nimport chokidar from \"chokidar\"\nimport * as dotenv from \"dotenv\"\nimport fs from \"fs-extra\"\nimport path from \"path\"\nimport { generateServiceConfigs } from \"./config-generator\"\nimport { mergeDeepRight } from \"ramda\"\nimport { logger } from \"src/logger\"\nimport * as Mustache from \"mustache\"\n\n/**\n * Default configuration values\n */\nconst defaultConfig: RacletteConfig = {\n name: \"raclette-app\",\n root: \".raclette\",\n services: {\n frontend: {\n enabled: true,\n port: 8081,\n installPackages: [],\n },\n backend: {\n enabled: true,\n port: 8082,\n enableDebug: false,\n installPackages: [],\n },\n mongodb: {\n enabled: true,\n port: 27017,\n },\n cache: {\n enabled: true,\n port: 6379,\n },\n workbench: {\n enabled: false,\n frontendPort: 8083,\n backendPort: 8084,\n },\n },\n modules: [],\n plugins: [],\n env: {\n development: {},\n production: {\n NODE_ENV: \"production\",\n },\n },\n global: {\n requireAuthentication: true,\n },\n frontend: {\n framework: \"vue\",\n i18n: {\n locales: [\"en-EU\"],\n priorities: {\n app: 10,\n \".\": 30,\n },\n },\n vue: {\n plugins: [],\n },\n },\n backend: {\n sockets: {\n autoSend: {\n compositions: true,\n interactionLinks: true,\n projectConfig: true,\n },\n security: {\n requireAuth: true,\n tokenValidation: \"jwt\",\n },\n options: {\n adapter: \"memory\",\n connectionTimeout: 3000,\n pingInterval: 1500,\n pingTimeout: 1000,\n },\n },\n },\n sourceDirectories: [],\n packageMerging: {\n frontend: [{ file: \"./packages.json\", key: \"frontend\" }],\n backend: [{ file: \"./packages.json\", key: \"backend\" }],\n },\n lockFiles: {\n frontend: \"./app.frontend.yarn.lock\",\n backend: \"./app.backend.yarn.lock\",\n },\n}\n\n/**\n * Load .env file and apply to process.env\n */\nconst loadAndApplyEnvFile = async (\n environment: string,\n): Promise<Record<string, string>> => {\n const envFile = environment === \"production\" ? \".env.production\" : \".env\"\n const envPath = path.join(process.cwd(), envFile)\n\n // Automatically set the RACLETTE_APP_PATH if not existing\n if (!process.env.RACLETTE_APP_PATH) {\n process.env.RACLETTE_APP_PATH = process.cwd()\n }\n\n if (await fs.pathExists(envPath)) {\n const envContent = await fs.readFile(envPath, \"utf-8\")\n const envVars = dotenv.parse(envContent)\n\n // Apply environment variables to process.env\n // Only set if they don't already exist (preserves existing env vars)\n Object.entries(envVars).forEach(([key, value]) => {\n process.env[key] = value\n })\n\n console.log(\n chalk.blue(\n `\uD83D\uDCC4 Loaded ${Object.keys(envVars).length} environment variables from ${envFile}`,\n ),\n )\n\n return {\n ...envVars,\n RACLETTE_APP_PATH: process.env.RACLETTE_APP_PATH,\n }\n }\n\n return {}\n}\n\nexport const loadJsConfig = async (configPath: string) => {\n try {\n const { pathToFileURL } = await import(\"url\")\n const importUrl = pathToFileURL(configPath).href\n\n // Add a cache-busting query parameter to make sure we load the most recent content\n const cacheBustedUrl = `${importUrl}?t=${Date.now()}`\n\n // Clear the module cache to ensure fresh load\n if (require.cache[configPath]) {\n delete require.cache[configPath]\n }\n\n const imported = await import(cacheBustedUrl)\n\n return imported.default || imported\n } catch (error) {\n console.error(chalk.red(`Error loading config from ${configPath}:`), error)\n throw error\n }\n}\n\n/**\n * Parse environment variable strings to appropriate types\n */\nconst parseEnvironmentValues = (obj: any): any => {\n if (typeof obj === \"string\") {\n // Parse boolean strings\n if (obj === \"true\") return true\n if (obj === \"false\") return false\n\n // Parse number strings (but only if they look like numbers)\n if (/^\\d+$/.test(obj)) {\n const num = Number(obj)\n if (!isNaN(num)) return num\n }\n\n // Parse float numbers\n if (/^\\d+\\.\\d+$/.test(obj)) {\n const num = Number(obj)\n if (!isNaN(num)) return num\n }\n\n return obj\n }\n\n if (Array.isArray(obj)) {\n return obj.map((item) => parseEnvironmentValues(item))\n }\n\n if (obj && typeof obj === \"object\") {\n const parsed: any = {}\n for (const [key, value] of Object.entries(obj)) {\n parsed[key] = parseEnvironmentValues(value)\n }\n return parsed\n }\n\n return obj\n}\n\n/**\n * Load and process raclette.config.js\n */\nexport const loadConfig = async (\n additionalConfigFilePath = \"\",\n environment = \"development\",\n): Promise<RacletteConfig> => {\n const cwd = process.cwd();\n const configPath = path.join(cwd, \"raclette.config.js\")\n const raclettePath = path.join(cwd, \".raclette\")\n\n\n // Check if config file exists\n if (!(await fs.pathExists(configPath))) {\n console.warn(\"No raclette.config.js found, using default configuration\")\n return defaultConfig\n }\n\n // CRITICAL: Load .env file and apply to process.env BEFORE loading config\n const envVars = await loadAndApplyEnvFile(environment)\n\n // Now load user config - process.env will have the .env values\n const userConfig = await loadJsConfig(configPath)\n\n // Parse environment variable strings to appropriate types (e.g. bools)\n const parsedUserConfig: Partial<RacletteConfig> =\n parseEnvironmentValues(userConfig)\n\n let parsedAdditionalConfig = {\n env: {},\n }\n if (additionalConfigFilePath) {\n const additionalConfig: Partial<RacletteConfig> = await loadJsConfig(\n additionalConfigFilePath,\n )\n\n // Parse environment variable strings to appropriate types (e.g. bools)\n parsedAdditionalConfig = parseEnvironmentValues(additionalConfig)\n }\n\n // Merge configurations\n const mergedConfig = mergeDeepRight(\n mergeDeepRight(defaultConfig, parsedUserConfig),\n mergeDeepRight(parsedAdditionalConfig, {\n env: {\n [environment]: envVars,\n },\n }),\n ) as RacletteConfig\n\n await writeMergedConfigFile(mergedConfig, raclettePath)\n await generateServiceConfigs(mergedConfig, raclettePath)\n\n return mergedConfig\n}\n\nconst writeMergedConfigFile = async (\n config: RacletteConfig,\n raclettePath: string,\n) => {\n // Format the merged config as an ES module\n const configFileContent = `// Generated Raclette Configuration\n// This file is auto-generated from the merged configuration\n// Do not edit directly\n\nexport default ${JSON.stringify(config, null, 2)};\n`\n\n await fs.writeFile(\n path.join(raclettePath, \"raclette.config.js\"),\n configFileContent,\n )\n\n logger.success(\"raclette Configuration file generated\")\n}\n\n/**\n * Watch the original user config file for changes and trigger a reload\n */\nexport const watchOriginalConfigFile = (): (() => void) => {\n const originalConfigPath = path.join(process.cwd(), \"raclette.config.js\")\n\n logger.progress(`\uD83D\uDD0D Watching for changes in original config: ${originalConfigPath}`)\n const watcher = chokidar.watch(originalConfigPath, {\n ignored: /(^|[/\\\\])\\../, // ignore dotfiles\n persistent: true,\n })\n\n watcher.on(\"change\", async (changedPath) => {\n logger.progress(`\uD83D\uDCDD Original config file changed: ${changedPath}`)\n try {\n await loadConfig()\n } catch (error: any) {\n logger.error(\"Error reloading configuration: \" + error.message)\n }\n })\n\n // Return a function to stop watching\n return () => watcher.close()\n}\n\n/**\n * Define raclette configuration (used in raclette.config.js)\n */\nexport const defineRacletteConfig = (\n config: Partial<RacletteConfig>,\n): Partial<RacletteConfig> => config\n\n\n\nexport const loadConfigTemplate = (\n name: string, env: any) : string => {\n //console.log(\"loadConfigTemplate!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\")\n return \"\"\n}", "import type { RacletteConfig, WorkbenchConfig } from \"./types\"\nimport chalk from \"chalk\"\nimport fs from \"fs-extra\"\nimport path from \"path\"\nimport { logger } from \"src/logger\"\n\n/**\n * Safely write a file, ensuring the target doesn't exist as a directory first\n */\nconst safeWriteFile = async (\n filePath: string,\n content: string,\n): Promise<void> => {\n try {\n // Ensure the parent directory exists\n await fs.ensureDir(path.dirname(filePath))\n\n // Check if the target path exists\n if (await fs.pathExists(filePath)) {\n const stats = await fs.stat(filePath)\n if (stats.isDirectory()) {\n console.warn(\n chalk.yellow(`\u26A0\uFE0F Removing directory at ${filePath} to create file`),\n )\n await fs.remove(filePath)\n }\n }\n\n // Write the file\n await fs.writeFile(filePath, content)\n } catch (error: any) {\n logger.error(` Error writing file ${filePath}: ${error.message}`)\n throw error\n }\n}\n\nexport const generateServiceConfigs = async (\n config: RacletteConfig,\n racletteDir: string,\n): Promise<void> => {\n logger.debug(\"Generating service configuration files...\")\n\n // Create directories if they don't exist\n const backendDir = path.join(racletteDir, \"backend\")\n const frontendDir = path.join(racletteDir, \"frontend\")\n\n await fs.ensureDir(backendDir)\n await fs.ensureDir(frontendDir)\n\n // Extract common/global attributes\n const globalConfig = {\n name: config.name,\n env: config.env,\n modules: config.modules,\n plugins: config.plugins,\n global: config.global,\n }\n\n // Generate backend config as a ts file with all backend-specific properties\n const backendConfigObj = {\n ...globalConfig,\n service: \"backend\",\n // Include all properties from backend\n ...config.backend,\n }\n\n const backendConfig = `\n// Generated racletteJS Backend Configuration\n// This file is auto-generated, do not edit directly\n\nexport const racletteConfig = ${JSON.stringify(backendConfigObj, null, 2)};\n\nexport default racletteConfig;\n`\n\n await safeWriteFile(\n path.join(backendDir, \"raclette.config.js\"),\n backendConfig,\n )\n\n // Generate frontend config as a ts file with all frontend-specific properties\n const frontendConfigObj = {\n ...globalConfig,\n service: \"frontend\",\n // Dynamically include all frontend properties\n ...config.frontend,\n }\n\n const frontendConfig = `\n// Generated racletteJS Frontend Configuration\n// This file is auto-generated, do not edit directly\n\nexport const racletteConfig = ${JSON.stringify(frontendConfigObj, null, 2)};\n\nexport default racletteConfig;\n`\n\n await safeWriteFile(\n path.join(frontendDir, \"raclette.config.js\"),\n frontendConfig,\n )\n\n logger.success(\"Service configuration files generated\")\n}\n\n/**\n * Dynamically generate TypeScript definitions from an object structure\n */\nconst generateDynamicTypeDefinition = (\n obj: any,\n interfaceName: string,\n): string => {\n // Start with the interface declaration\n let typeDefinition = `\n// Generated racletteJS Configuration Types\n// This file is auto-generated, do not edit directly\n\nexport interface ${interfaceName} {\n`\n\n // Process each top-level property\n for (const [key, value] of Object.entries(obj)) {\n if (typeof value === \"object\" && value !== null && !Array.isArray(value)) {\n // For nested objects, use the type generator\n typeDefinition += ` ${key}: ${generateTypeDefinitions(value)};\\n`\n } else if (Array.isArray(value)) {\n // For arrays, check if they're simple or complex\n if (\n value.length > 0 &&\n typeof value[0] === \"object\" &&\n value[0] !== null\n ) {\n typeDefinition += ` ${key}: Array<any>;\\n`\n } else if (value.length > 0) {\n typeDefinition += ` ${key}: Array<${typeof value[0]}>;\\n`\n } else {\n typeDefinition += ` ${key}: any[];\\n`\n }\n // For primitives, use their type\n } else if (typeof value === \"string\" && value.includes('\"')) {\n // For string literals like framework: \"vue\"\n typeDefinition += ` ${key}: \"${value}\";\\n`\n } else {\n typeDefinition += ` ${key}: ${typeof value};\\n`\n }\n }\n\n // Close the interface and add export\n typeDefinition += `}\n\nexport const racletteConfig: ${interfaceName};\nexport default racletteConfig;\n`\n\n return typeDefinition\n}\n\n/**\n * Generate TypeScript type definitions from an object\n */\nconst generateTypeDefinitions = (\n obj: any,\n indent = 0,\n isRoot = true,\n skipFirstLevel = false,\n): string => {\n if (!obj || typeof obj !== \"object\" || Array.isArray(obj)) {\n return \"any\"\n }\n\n const indentStr = \" \".repeat(indent)\n const entries = Object.entries(obj)\n\n if (entries.length === 0) {\n return \"Record<string, any>\"\n }\n\n if (skipFirstLevel) {\n return entries\n .map(([key, value]) => {\n if (\n typeof value === \"object\" &&\n value !== null &&\n !Array.isArray(value)\n ) {\n return `${key}: ${generateTypeDefinitions(value, indent + 2, false)}`\n } else if (Array.isArray(value)) {\n return `${key}: any[]`\n } else {\n return `${key}: ${typeof value}`\n }\n })\n .join(\";\\n\" + indentStr)\n }\n\n const typeDefinition = entries\n .map(([key, value]) => {\n if (\n typeof value === \"object\" &&\n value !== null &&\n !Array.isArray(value)\n ) {\n return `${indentStr} ${key}: ${generateTypeDefinitions(value, indent + 4, false)}`\n } else if (Array.isArray(value)) {\n return `${indentStr} ${key}: any[]`\n } else {\n return `${indentStr} ${key}: ${typeof value}`\n }\n })\n .join(\";\\n\")\n\n return `{\\n${typeDefinition};\\n${indentStr}}`\n}\n\n// TODO: we should use a validation lib/schema language here instead of that hardcoding\n// Validate workbench configuration against allowed keys\nexport const validateWorkbenchConfig = (\n config: any,\n): config is WorkbenchConfig => {\n if (!config || typeof config !== \"object\") {\n throw new Error(\"Workbench configuration must be an object\")\n }\n\n // Check if frontend exists and is an object\n if (!config.frontend || typeof config.frontend !== \"object\") {\n throw new Error('Workbench configuration must have a \"frontend\" object')\n }\n\n // Validate frontend.i18n if present\n if (config.frontend.i18n !== undefined) {\n if (typeof config.frontend.i18n !== \"object\") {\n throw new Error(\"frontend.i18n must be an object\")\n }\n\n if (config.frontend.i18n.locales !== undefined) {\n if (!Array.isArray(config.frontend.i18n.locales)) {\n throw new Error(\"frontend.i18n.locales must be an array\")\n }\n\n if (\n !config.frontend.i18n.locales.every(\n (locale: string) => typeof locale === \"string\",\n )\n ) {\n throw new Error(\"All locales must be strings\")\n }\n }\n }\n\n return true\n}\n\n// Create workbench configuration file\nexport const createWorkbenchConfigFile = async (\n workbenchConfig: WorkbenchConfig,\n projectPath: string = process.cwd(),\n): Promise<string> => {\n const racletteDir = path.join(projectPath, \".raclette\")\n const configFilePath = path.join(racletteDir, \"raclette.config.workbench.js\")\n\n // Ensure .raclette directory exists\n await fs.mkdir(racletteDir, { recursive: true })\n\n // Generate the config file content\n const configContent = `import { defineRacletteConfig } from \"@raclettejs/core\"\n\nexport default defineRacletteConfig(${JSON.stringify(workbenchConfig, null, 2)})\n`\n\n // Write the configuration file\n await fs.writeFile(configFilePath, configContent, \"utf8\")\n\n return configFilePath\n}\n", "// logger.ts\nimport chalk from \"chalk\"\n\nexport type LogLevel = \"error\" | \"warn\" | \"info\" | \"debug\"\nexport type LogType =\n | \"success\"\n | \"error\"\n | \"warning\"\n | \"info\"\n | \"instruction\"\n | \"progress\"\n | \"debug\"\n | \"raclette\"\n\nclass Logger {\n private level: LogLevel = \"info\"\n private verbose = false\n\n setLevel(level: LogLevel) {\n this.level = level\n }\n\n setVerbose(verbose: boolean) {\n this.verbose = verbose\n }\n\n private shouldLog(level: LogLevel): boolean {\n const levels: Record<LogLevel, number> = {\n error: 0,\n warn: 1,\n info: 2,\n debug: 3,\n }\n\n if (level === \"debug\" && this.verbose) return true\n return levels[level] <= levels[this.level]\n }\n\n private getTypeStyle(type: LogType): (text: string) => string {\n switch (type) {\n case \"success\":\n return chalk.green\n case \"error\":\n return chalk.red\n case \"warning\":\n return chalk.yellow\n case \"info\":\n return chalk.blue\n case \"instruction\":\n return chalk.cyan\n case \"progress\":\n return chalk.reset\n case \"debug\":\n return chalk.gray\n case \"raclette\":\n return chalk.rgb(221, 139, 64)\n default:\n return (text: string) => text\n }\n }\n\n private getTypeIcon(type: LogType): string {\n switch (type) {\n case \"success\":\n return \"\u2705\"\n case \"error\":\n return \"\u274C\"\n case \"warning\":\n return \"\u26A0\uFE0F\"\n case \"info\":\n return \"\u2139\uFE0F \"\n case \"instruction\":\n return \"\uD83D\uDCA1\"\n case \"progress\":\n return \"\uD83D\uDD04\"\n case \"debug\":\n return \"\"\n case \"raclette\":\n return \"\uD83E\uDDC0\"\n default:\n return \"\"\n }\n }\n\n private log(level: LogLevel, message: string, type?: LogType) {\n if (!this.shouldLog(level)) return\n\n const styleFunction = type ? this.getTypeStyle(type) : chalk.reset\n const icon = type ? this.getTypeIcon(type) : \"\"\n const prefix = icon ? `${icon} ` : \"\"\n\n console.log(styleFunction(`${prefix}${message}`))\n }\n\n private logError(message: string, error?: any) {\n if (!this.shouldLog(\"error\")) return\n\n const styleFunction = this.getTypeStyle(\"error\")\n const icon = this.getTypeIcon(\"error\")\n const prefix = icon ? `${icon} ` : \"\"\n\n if (error) {\n console.error(styleFunction(`${prefix}${message}`), error)\n } else {\n console.error(styleFunction(`${prefix}${message}`))\n }\n }\n\n // Main logging methods\n error(message: string, error?: any) {\n this.logError(message, error)\n }\n\n warn(message: string) {\n this.log(\"warn\", message, \"warning\")\n }\n\n info(message: string) {\n this.log(\"info\", message, \"info\")\n }\n\n debug(message: string) {\n this.log(\"debug\", message, \"debug\")\n }\n\n // Typed convenience methods\n success(message: string) {\n this.log(\"info\", message, \"success\")\n }\n\n instruction(message: string) {\n this.log(\"info\", message, \"instruction\")\n }\n\n progress(message: string) {\n this.log(\"info\", message, \"progress\")\n }\n\n raclette(message: string) {\n this.log(\"info\", message, \"raclette\")\n }\n\n // Raw methods (no styling)\n raw(message: string, level: LogLevel = \"info\") {\n if (this.shouldLog(level)) {\n console.log(message)\n }\n }\n}\n\n// Global logger instance\nexport const logger = new Logger()\n", "import type { RacletteConfig } from \"../types\"\nimport fs from \"fs-extra\"\nimport path from \"path\"\nimport { getCoreConfig, getCoreImports } from \"./configs/core\"\nimport { getReactConfig, getReactImports } from \"./configs/react\"\nimport {\n getTypeScriptConfig,\n getTypeScriptImports,\n} from \"./configs/typescript\"\nimport { getVueConfig, getVueImports } from \"./configs/vue\"\nimport { getAllDependencies } from \"./dependencies\"\nimport { generateInstallCommand } from \"./utils\"\nimport { logger } from \"src/logger\"\n\n/**\n * Generate an ESLint config file in the .raclette directory\n * This will be used as a base configuration that app projects can extend\n */\nexport const generateEslintConfig = async (\n config: RacletteConfig,\n outputDir: string,\n withReadme = true,\n): Promise<void> => {\n const eslintConfigPath = path.join(outputDir, \"eslint.config.mjs\")\n\n logger.debug(`Generating eslint.config.mjs in ${outputDir}`)\n\n // Default to true if not specified\n const useRecommended = config.eslint?.useRecommended !== false\n\n // Generate imports section\n const imports = generateImports(config, useRecommended)\n\n // Generate configuration sections\n const configSections = []\n\n // Add TypeScript base rules config instead of using tseslint.configs.recommended\n configSections.push(` // TS ESLint base rules\n {\n files: [\"**/*.{ts,tsx}\"],\n plugins: {\n '@typescript-eslint': tseslint.plugin\n },\n languageOptions: {\n parser: tseslint.parser\n },\n rules: {\n // Essential TypeScript syntax rules - equivalent to tseslint.configs.recommended\n \"@typescript-eslint/ban-ts-comment\": \"warn\",\n \"@typescript-eslint/no-explicit-any\": \"warn\",\n \"@typescript-eslint/no-var-requires\": \"error\",\n \"@typescript-eslint/no-empty-interface\": \"warn\",\n \"@typescript-eslint/no-inferrable-types\": \"warn\",\n \"@typescript-eslint/no-non-null-asserted-optional-chain\": \"error\",\n \"@typescript-eslint/no-non-null-assertion\": \"warn\",\n \"@typescript-eslint/no-unnecessary-type-constraint\": \"error\"\n }\n }`)\n\n // Add core ignores\n configSections.push(` // Ignore patterns\n {\n ignores: [\n \"**/node_modules/**\",\n \"**/dist/**\",\n \"**/build/**\",\n \"**/coverage/**\",\n \"**/*.d.ts\",\n \".raclette/**\",\n \".gitignore\"\n ]\n }`)\n\n // Add core JavaScript config\n configSections.push(getCoreConfig(useRecommended))\n\n // Add TypeScript config\n configSections.push(getTypeScriptConfig(useRecommended))\n\n // Add Vue config if needed\n if (config.frontend?.framework === \"vue\") {\n configSections.push(getVueConfig(useRecommended))\n }\n\n // Add React config if needed\n if (config.frontend?.framework === \"react\") {\n configSections.push(getReactConfig(useRecommended))\n }\n\n // Add user custom rules if any\n if (config.eslint?.rules && Object.keys(config.eslint.rules).length > 0) {\n const rulesStr = JSON.stringify(config.eslint.rules, null, 2).replace(\n /\"([^\"]+)\":/g,\n \"$1:\",\n ) // Convert \"key\": to key:\n\n configSections.push(` // User custom rules\n {\n rules: ${rulesStr}\n }`)\n }\n\n // Add user custom ignores if any\n if (config.eslint?.ignores && config.eslint.ignores.length > 0) {\n const ignoresStr = JSON.stringify(config.eslint.ignores).replace(\n /^\\[|\\]$/g,\n \"\",\n ) // Remove square brackets\n\n configSections.push(` // User custom ignores\n {\n ignores: [${ignoresStr}]\n }`)\n }\n\n // Add Prettier config (always include)\n configSections.push(` // Prettier config (must be last)\n {\n rules: {\n ...eslintConfigPrettier.rules\n }\n }`)\n\n // Generate the full config file\n const eslintConfigContent = `/*#############################################################\n \nGenerated ESLint Configuration for ${config.name || \"raclette\"}\nThis file is auto-generated and should not be edited directly\nExtend this config in your project's eslint.config.mjs\n\n#############################################################*/\n\n// Import required plugins and parsers\n${imports.join(\"\\n\")}\n\n// Exported configuration that can be extended\nexport const racletteEslintConfig = [\n${configSections.join(\",\\n\\n\")}\n]\n\n// Helper function for extending the config\nexport const withRaclette = (...userConfigs) => {\n // Simple array concatenation\n return [...racletteEslintConfig, ...userConfigs.flat()];\n}\n\n// Default export for direct usage\nexport default racletteEslintConfig\n`\n\n // Write the eslint.config.mjs file\n await fs.writeFile(eslintConfigPath, eslintConfigContent)\n\n // Generate a readme or guidance file explaining how to use the config\n if (withReadme) {\n await generateEslintReadme(outputDir, config)\n }\n\n logger.debug(`Generated eslint.config.mjs in ${outputDir}`)\n}\n\n/**\n * Generate the imports section of the ESLint config\n */\nconst generateImports = (\n config: RacletteConfig,\n useRecommended: boolean,\n): string[] => {\n const imports = []\n\n // Add core imports\n imports.push(...getCoreImports())\n\n // Add TypeScript imports\n imports.push(...getTypeScriptImports(useRecommended))\n\n // Add framework-specific imports\n if (config.frontend?.framework === \"vue\") {\n imports.push(...getVueImports())\n } else if (config.frontend?.framework === \"react\") {\n imports.push(...getReactImports())\n }\n\n return imports\n}\n\n/**\n * Generate a helpful README for using the ESLint config\n */\nconst generateEslintReadme = async (\n outputDir: string,\n config: RacletteConfig,\n): Promise<void> => {\n const readmePath = path.join(outputDir, \"ESLINT-README.md\")\n\n const allDeps = getAllDependencies(config)\n const installCommand = generateInstallCommand(allDeps)\n\n const readmeContent = `# racletteJS ESLint Configuration\n \nThis directory contains an auto-generated ESLint configuration for your racletteJS project.\n \n## Required Dependencies\n \nTo use this ESLint configuration, you need to install the following dependencies:\n \n\\`\\`\\`bash\n${installCommand}\n\\`\\`\\`\n \n## How to Use\n \nCreate an \\`eslint.config.mjs\\` file in your project root with:\n \n\\`\\`\\`js\n// eslint.config.mjs\nimport { withRaclette } from './.raclette/eslint.config.mjs'\n \nexport default withRaclette(\n // Your custom configs here\n {\n // Example: Override a rule\n rules: {\n 'no-console': 'off'\n }\n },\n // Add more config objects as needed\n)\n\\`\\`\\`\n \n## Features\n \n- Project-aware configuration that understands your racletteJS project structure\n- Framework-specific rules (Vue, React) automatically included based on your project\n- Seamless integration with your IDE\n- Clean, modern approach using ESLint's flat config system\n \n## Editor Integration\n \nFor Visual Studio Code users, make sure to add this to your \\`.vscode/settings.json\\`:\n \n\\`\\`\\`json\n{\n \"eslint.experimental.useFlatConfig\": true\n}\n\\`\\`\\`\n \nThis enables support for the flat config format in the ESLint extension.\n \n## Adding Custom Rules\n \nYou can customize the ESLint rules by:\n\n1. Adding rules in your \\`eslint.config.mjs\\` file:\n\n\\`\\`\\`js\nexport default withRaclette(\n {\n // Your custom rules\n rules: {\n 'indent': ['error', 4],\n 'quotes': ['error', 'single']\n }\n }\n)\n\\`\\`\\`\n\n2. Or by adding them to your \\`raclette.config.js\\` file:\n\n\\`\\`\\`js\nexport default {\n // ...other racletteJS config\n eslint: {\n useRecommended: true, // Set to false to disable recommended rules\n rules: {\n 'indent': ['error', 4],\n 'quotes': ['error', 'single']\n },\n ignores: [\n 'legacy/**'\n ]\n }\n}\n\\`\\`\\`\n`\n\n await fs.writeFile(readmePath, readmeContent)\n}\n", "/**\n * Core JavaScript ESLint configuration\n * Contains basic JavaScript rules that apply to all projects\n */\n\n/**\n * Get core dependencies\n */\nexport const getCoreDependencies = (useRecommended = false): string[] => {\n return [\n \"eslint\",\n \"@eslint/js\",\n \"globals\",\n \"eslint-config-prettier\",\n \"prettier\",\n \"eslint-plugin-prettier\",\n ...(useRecommended ? getCoreRecommendedDependencies() : []),\n ]\n}\n\n/**\n * Get core recommended dependencies\n */\nexport const getCoreRecommendedDependencies = (): string[] => {\n return [] // Currently none beyond base dependencies\n}\n\n/**\n * Get core import statements\n */\nexport const getCoreImports = (): string[] => {\n return [\n \"import globals from 'globals';\",\n \"import eslintConfigPrettier from 'eslint-config-prettier';\",\n ]\n}\n\nexport const getCoreConfig = (useRecommended = false): string => {\n const baseConfig = ` // JavaScript config\n {\n files: [\"**/*.{js,mjs,cjs}\"],\n languageOptions: {\n globals: {\n ...globals.browser,\n ...globals.node,\n test: \"readonly\",\n expect: \"readonly\",\n it: \"readonly\",\n cy: \"readonly\"\n },\n ecmaVersion: \"latest\",\n sourceType: 'module'\n },\n rules: {\n // Common recommended rules\n \"no-console\": \"warn\",\n \"prefer-const\": \"error\",\n \"no-unused-vars\": \"warn\",\n \"curly\": [\"error\", \"all\"],\n \"eqeqeq\": [\"error\", \"always\"],\n \"require-await\": \"error\",\n \"padding-line-between-statements\": [\n \"error\",\n // nextline after const\n { blankLine: \"always\", prev: \"const\", next: \"*\" },\n // nextline after let\n { blankLine: \"always\", prev: \"let\", next: \"*\" },\n // allow const after const\n { blankLine: \"any\", prev: \"const\", next: \"const\" },\n // allow let after const\n { blankLine: \"any\", prev: \"const\", next: \"let\" },\n // allow const after let\n { blankLine: \"any\", prev: \"let\", next: \"const\" },\n // allow let after let\n { blankLine: \"any\", prev: \"let\", next: \"let\" },\n // add blank line before return statements\n { blankLine: \"always\", prev: \"*\", next: \"return\" },\n // new line between method declarations\n { blankLine: \"always\", prev: \"const\", next: \"block-like\" }\n ]\n }\n }`\n\n // If useRecommended is true, include style configuration as well\n if (useRecommended) {\n return baseConfig + \",\\n\\n\" + getStyleRecommendedConfig()\n }\n\n return baseConfig\n}\n\n/**\n * Style-oriented rules for better code formatting\n * These are included when useRecommended is true\n */\nexport const getStyleRecommendedConfig = (): string => {\n return ` // Style recommended config\n {\n files: [\"**/*.{js,mjs,cjs,ts,tsx}\"],\n rules: {\n // Style and formatting rules\n \"semi\": [\"error\", \"never\"],\n \"quotes\": [\"error\", \"double\", { \"avoidEscape\": true }],\n \"comma-dangle\": [\"error\", \"always-multiline\"],\n \"no-multiple-empty-lines\": [\"error\", { \"max\": 1, \"maxEOF\": 0 }],\n \"object-curly-spacing\": [\"error\", \"always\"],\n \"array-bracket-spacing\": [\"error\", \"never\"],\n \"computed-property-spacing\": [\"error\", \"never\"],\n \"comma-spacing\": [\"error\", { \"before\": false, \"after\": true }],\n \"eol-last\": [\"error\", \"always\"],\n \"indent\": [\"error\", 2],\n \"linebreak-style\": [\"error\", \"unix\"],\n \"no-trailing-spaces\": \"error\",\n \"dot-notation\": [\"error\", { allowKeywords: true }],\n \"id-length\": [\n \"error\",\n { min: 3, exceptions: [\"i\", \"j\", \"a\", \"b\", \"fs\", \"id\"], properties: \"never\" },\n ],\n }\n }`\n}\n", "/**\n * React ESLint configuration\n * Contains React and React Hooks specific rules\n */\n\n/**\n * Get React dependencies\n */\nexport const getReactDependencies = (useRecommended = false): string[] => {\n return [\n \"eslint-plugin-react\",\n \"eslint-plugin-react-hooks\",\n ...(useRecommended ? getReactRecommendedDependencies() : []),\n ]\n}\n\n/**\n * Get React recommended dependencies\n */\nexport const getReactRecommendedDependencies = (): string[] => {\n return [] // Currently none beyond base React dependencies\n}\n\n/**\n * Get React import statements\n */\nexport const getReactImports = (): string[] => {\n return [\n \"import react from 'eslint-plugin-react';\",\n \"import reactHooks from 'eslint-plugin-react-hooks';\",\n ]\n}\n\nexport const getReactConfig = (useRecommended = false): string => {\n // For React, we currently don't have separate recommended rules\n // but we include the parameter for future expansion\n const baseConfig = ` // React config\n {\n files: [\"**/*.{jsx,tsx}\"],\n plugins: {\n react,\n 'react-hooks': reactHooks\n },\n rules: {\n // Essential React rules\n \"react/jsx-uses-react\": \"error\",\n \"react/jsx-uses-vars\": \"error\",\n \"react-hooks/rules-of-hooks\": \"error\",\n \"react-hooks/exhaustive-deps\": \"warn\",\n \n // Additional sensible React rules\n \"react/prop-types\": \"warn\",\n \"react/jsx-no-duplicate-props\": \"error\",\n \"react/jsx-no-undef\": \"error\",\n \"react/jsx-pascal-case\": \"error\",\n \"react/no-direct-mutation-state\": \"error\",\n \"react/no-unescaped-entities\": \"error\"\n }\n }`\n\n // If useRecommended is true, include the recommended React rules\n if (useRecommended) {\n return baseConfig + \",\\n\\n\" + getReactRecommendedConfig()\n }\n\n return baseConfig\n}\n\nexport const getReactRecommendedConfig = (): string => {\n // nothing here yet\n return \"\"\n}\n", "/**\n * Base TypeScript ESLint configuration\n * Contains essential TypeScript rules\n */\n\n/**\n * Get TypeScript base dependencies\n */\nexport const getTypeScriptDependencies = (useRecommended = false): string[] => {\n return [\n \"typescript-eslint\",\n ...(useRecommended ? getTypeScriptRecommendedDependencies() : []),\n ]\n}\n\n/**\n * Get TypeScript recommended dependencies\n */\nexport const getTypeScriptRecommendedDependencies = (): string[] => {\n return [\"eslint-plugin-import\", \"eslint-plugin-prefer-arrow-functions\"]\n}\n\n/**\n * Get TypeScript import statements\n */\nexport const getTypeScriptImports = (useRecommended: boolean): string[] => {\n const imports = [\n // Base imports\n \"import tseslint from 'typescript-eslint';\",\n ]\n\n // Add recommended imports if needed\n if (useRecommended) {\n imports.push(\"import importPlugin from 'eslint-plugin-import';\")\n imports.push(\n \"import preferArrow from 'eslint-plugin-prefer-arrow-functions';\",\n )\n }\n\n return imports\n}\n\nexport const getTypeScriptConfig = (useRecommended = false): string => {\n // Include import and prefer-arrow plugins if useRecommended is true\n const plugins = useRecommended\n ? `{\n '@typescript-eslint': tseslint.plugin,\n 'import': importPlugin,\n 'prefer-arrow': preferArrow\n }`\n : `{\n '@typescript-eslint': tseslint.plugin\n }`\n\n const baseConfig = ` // TypeScript config\n {\n files: [\"**/*.{ts,tsx}\"],\n plugins: ${plugins},\n languageOptions: {\n parser: tseslint.parser,\n parserOptions: {\n ecmaVersion: \"latest\",\n sourceType: 'module',\n project: './tsconfig.json'\n }\n },\n rules: {\n // Basic TypeScript rules\n 'no-unused-vars': 'off', // disable JS rule in favor of TS rule\n '@typescript-eslint/no-unused-vars': ['warn', { \n argsIgnorePattern: '^(_|error|config|options|args|props|params|fastify|req|request|res|reply)',\n varsIgnorePattern: '^(_|error|config|options|args|props|params)',\n caughtErrorsIgnorePattern: '^(_|error|config|options|args|props|params)'\n }]\n }\n }`\n\n // If useRecommended is true, include recommended configuration as well\n if (useRecommended) {\n return baseConfig + \",\\n\\n\" + getTypeScriptRecommendedConfig()\n }\n\n return baseConfig\n}\n\n/**\n * Recommended TypeScript ESLint configuration\n * Contains more opinionated rules for TypeScript\n */\nexport const getTypeScriptRecommendedConfig = (): string => {\n return ` // TypeScript recommended config\n {\n files: [\"**/*.{ts,tsx}\"],\n rules: {\n // More opinionated TypeScript rules\n '@typescript-eslint/no-explicit-any': 'warn',\n '@typescript-eslint/explicit-function-return-type': 'off',\n '@typescript-eslint/explicit-module-boundary-types': 'off',\n '@typescript-eslint/no-non-null-assertion': 'warn',\n '@typescript-eslint/no-inferrable-types': 'warn',\n '@typescript-eslint/naming-convention': [\n 'error',\n {\n selector: 'interface',\n format: ['PascalCase'],\n custom: {\n regex: '^I[A-Z]',\n match: false\n }\n },\n {\n selector: 'typeAlias',\n format: ['PascalCase']\n },\n {\n selector: 'enum',\n format: ['PascalCase']\n }\n ],\n '@typescript-eslint/consistent-type-imports': [\n 'error',\n {\n prefer: 'type-imports',\n disallowTypeAnnotations: false\n }\n ],\n '@typescript-eslint/consistent-type-definitions': ['warn', 'interface'],\n '@typescript-eslint/prefer-optional-chain': 'warn',\n '@typescript-eslint/prefer-nullish-coalescing': 'warn',\n '@typescript-eslint/prefer-ts-expect-error': 'warn',\n \n // Import organization\n 'import/order': ['error', {\n 'groups': [\n 'type',\n ['builtin', 'external'],\n ['internal', 'parent', 'sibling', 'index'],\n ],\n 'alphabetize': {\n 'order': 'asc',\n 'caseInsensitive': true,\n },\n 'pathGroups': [\n // Handle all type imports first, from both external and internal\n {\n 'pattern': 'type',\n 'group': 'type',\n 'position': 'before',\n },\n {\n 'pattern': '{type,types,Types}',\n 'group': 'type',\n 'position': 'before',\n },\n // Handle aliased paths as internal\n {\n 'pattern': '@/**',\n 'group': 'internal',\n }\n ],\n 'pathGroupsExcludedImportTypes': ['type'],\n }],\n \n // Arrow function preference\n 'prefer-arrow/prefer-arrow-functions': [\n 'error',\n {\n 'disallowPrototype': true,\n 'singleReturnOnly': false,\n 'classPropertiesAllowed': false,\n }\n ]\n }\n }`\n}\n", "/**\n * Vue ESLint base configuration\n * Contains essential Vue rules for basic linting\n */\n\n/**\n * Get Vue dependencies\n */\nexport const getVueDependencies = (useRecommended = false): string[] => {\n return [\n \"eslint-plugin-vue\",\n \"vue-eslint-parser\",\n ...(useRecommended ? getVueRecommendedDependencies() : []),\n ]\n}\n\n/**\n * Get Vue recommended dependencies\n */\nexport const getVueRecommendedDependencies = (): string[] => {\n return [] // Currently none beyond base Vue dependencies\n}\n\n/**\n * Get Vue import statements\n */\nexport const getVueImports = (): string[] => {\n return [\n \"import vue from 'eslint-plugin-vue';\",\n \"import vueEslintParser from 'vue-eslint-parser';\",\n ]\n}\n\nexport const getVueConfig = (useRecommended = false): string => {\n const baseConfig = ` // Vue config\n {\n files: [\"**/*.vue\"],\n // Manually add Vue plugin\n plugins: {\n vue\n },\n languageOptions: {\n parser: vueEslintParser,\n parserOptions: {\n ecmaVersion: \"latest\",\n sourceType: 'module',\n parser: tseslint.parser, \n extraFileExtensions: [\".vue\"]\n }\n },\n rules: {\n // Essential Vue rules (from ESLint plugin Vue)\n \"vue/multi-word-component-names\": \"off\",\n \"vue/no-mutating-props\": \"error\",\n \"vue/no-reserved-component-names\": \"error\",\n \"vue/no-use-v-if-with-v-for\": \"error\",\n \"vue/require-v-for-key\": \"error\",\n \"vue/valid-template-root\": \"error\",\n \"vue/valid-v-bind\": \"error\",\n \"vue/valid-v-cloak\": \"error\",\n \"vue/valid-v-else-if\": \"error\",\n \"vue/valid-v-else\": \"error\",\n \"vue/valid-v-for\": \"error\",\n \"vue/valid-v-html\": \"error\",\n \"vue/valid-v-if\": \"error\",\n \"vue/valid-v-model\": \"error\",\n \"vue/valid-v-on\": \"error\",\n \"vue/valid-v-once\": \"error\",\n \"vue/valid-v-pre\": \"error\",\n \"vue/valid-v-show\": \"error\",\n \"vue/valid-v-slot\": \"error\",\n \"vue/valid-v-text\": \"error\",\n }\n }`\n\n // If useRecommended is true, include the recommended Vue rules\n if (useRecommended) {\n return baseConfig + \",\\n\\n\" + getVueRecommendedConfig()\n }\n\n return baseConfig\n}\n\n/**\n * Vue ESLint recommended configuration\n * Contains more opinionated Vue rules for better code quality\n */\nexport const getVueRecommendedConfig = (): string => {\n return ` // Vue recommended config\n {\n files: [\"**/*.vue\"],\n rules: {\n // Recommended Vue rules\n \"vue/component-name-in-template-casing\": [\"error\", \"PascalCase\"],\n \"vue/match-component-file-name\": [\n \"error\",\n {\n extensions: [\"vue\"],\n shouldMatchCase: true\n }\n ],\n \"vue/match-component-import-name\": \"error\",\n \"vue/attribute-hyphenation\": \"error\",\n \"vue/component-definition-name-casing\": [\"error\", \"PascalCase\"],\n \"vue/html-closing-bracket-newline\": \"error\",\n \"vue/html-closing-bracket-spacing\": \"error\",\n \"vue/html-end-tags\": \"error\",\n \"vue/html-indent\": [\"error\", 2],\n \"vue/html-quotes\": \"error\",\n \"vue/html-self-closing\": [\"error\", {\n \"html\": {\n \"void\": \"any\",\n \"normal\": \"any\",\n \"component\": \"always\"\n }\n }],\n \"vue/max-attributes-per-line\": [\"error\", {\n \"singleline\": 3,\n \"multiline\": 1\n }],\n \"vue/no-multi-spaces\": \"error\",\n \"vue/no-spaces-around-equal-signs-in-attribute\": \"error\",\n \"vue/no-template-shadow\": \"error\",\n \"vue/one-component-per-file\": \"error\",\n \"vue/prop-name-casing\": [\"error\", \"camelCase\"],\n \"vue/require-default-prop\": \"error\",\n \"vue/require-prop-types\": \"error\",\n \"vue/v-bind-style\": \"error\",\n \"vue/v-on-style\": \"error\",\n \"vue/v-slot-style\": \"error\"\n }\n }`\n}\n", "/**\n * Dependencies Manager for ESLint Configuration\n *\n * This module manages the collection of dependencies from different ESLint rule sets.\n * It acts as an aggregator that can be extended with new rule sets without modifying\n * the core logic of the dependency collection system.\n */\n\nimport type { RacletteConfig } from \"../../types\"\nimport {\n getCoreDependencies,\n getCoreRecommendedDependencies,\n} from \"./configs/core\"\nimport {\n getTypeScriptDependencies,\n getTypeScriptRecommendedDependencies,\n} from \"./configs/typescript\"\nimport {\n getVueDependencies,\n getVueRecommendedDependencies,\n} from \"./configs/vue\"\nimport {\n getReactDependencies,\n getReactRecommendedDependencies,\n} from \"./configs/react\"\n\n/**\n * Get framework-specific dependencies based on the project configuration\n */\nexport const getFrameworkDependencies = (config: RacletteConfig): string[] => {\n const dependencies: string[] = []\n\n // Framework-specific dependencies\n if (config.frontend?.framework === \"vue\") {\n dependencies.push(...getVueDependencies())\n } else if (config.frontend?.framework === \"react\") {\n dependencies.push(...getReactDependencies())\n }\n\n return dependencies\n}\n\n/**\n * Get recommended dependencies based on the project configuration and useRecommended flag\n */\nexport const getRecommendedDependencies = (\n config: RacletteConfig,\n useRecommended: boolean,\n): string[] => {\n if (!useRecommended) {\n return []\n }\n\n const dependencies: string[] = []\n\n // Add core recommended dependencies\n dependencies.push(...getCoreRecommendedDependencies())\n\n // Add TypeScript recommended dependencies\n dependencies.push(...getTypeScriptRecommendedDependencies())\n\n // Add framework-specific recommended dependencies\n if (config.frontend?.framework === \"vue\") {\n dependencies.push(...getVueRecommendedDependencies())\n } else if (config.frontend?.framework === \"react\") {\n dependencies.push(...getReactRecommendedDependencies())\n }\n\n return dependencies\n}\n\n/**\n * Get all required dependencies for the project\n */\nexport const getAllDependencies = (config: RacletteConfig): string[] => {\n // Default to true if not specified\n const useRecommended = config.eslint?.useRecommended !== false\n\n // Collect all dependencies\n const dependencies = [\n // Core dependencies\n ...getCoreDependencies(),\n\n // TypeScript dependencies\n ...getTypeScriptDependencies(),\n ]\n\n // Add framework-specific dependencies\n if (config.frontend?.framework === \"vue\") {\n dependencies.push(...getVueDependencies())\n } else if (config.frontend?.framework === \"react\") {\n dependencies.push(...getReactDependencies())\n }\n\n // Add recommended dependencies if enabled\n if (useRecommended) {\n dependencies.push(\n ...getCoreRecommendedDependencies(),\n ...getTypeScriptRecommendedDependencies(),\n )\n\n // Add framework-specific recommended dependencies\n if (config.frontend?.framework === \"vue\") {\n dependencies.push(...getVueRecommendedDependencies())\n } else if (config.frontend?.framework === \"react\") {\n dependencies.push(...getReactRecommendedDependencies())\n }\n }\n\n // Remove duplicates by using a Set\n return [...new Set(dependencies)]\n}\n", "import { existsSync } from \"fs\"\nimport path from \"path\"\nimport { getVueDependencies } from \"./configs/vue\"\nimport { getReactDependencies } from \"./configs/react\"\n\n/**\n * Get framework-specific dependencies based on the project configuration\n */\nexport const getFrameworkDependencies = (config: any): string[] => {\n const framework = config.frontend?.framework\n\n if (framework === \"vue\") {\n return getVueDependencies()\n }\n\n if (framework === \"react\") {\n return getReactDependencies()\n }\n\n return []\n}\n\n/**\n * Generate the install command for the given dependencies\n */\nexport const generateInstallCommand = (dependencies: string[]): string => {\n // Sort dependencies for consistency\n const sortedDeps = [...dependencies].sort()\n\n // Check for package manager\n const hasYarn = existsSync(path.join(process.cwd(), \"yarn.lock\"))\n const hasPnpm = existsSync(path.join(process.cwd(), \"pnpm-lock.yaml\"))\n const hasBun = existsSync(path.join(process.cwd(), \"bun.lockb\"))\n\n let packageManager = \"npm\"\n let installCmd = \"install\"\n\n if (hasYarn) {\n packageManager = \"yarn\"\n installCmd = \"add\"\n } else if (hasPnpm) {\n packageManager = \"pnpm\"\n installCmd = \"add\"\n } else if (hasBun) {\n packageManager = \"bun\"\n installCmd = \"add\"\n }\n\n // Generate command\n return `${packageManager} ${installCmd} -D ${sortedDeps.join(\" \")}`\n}\n"],
|
|
5
5
|
"mappings": ";+wBAAA,IAAAA,GAAAC,EAAA,CAAAC,GAAAC,KAAA,CAAAA,GAAA,SACE,KAAQ,SACR,QAAW,SACX,YAAe,6CACf,KAAQ,cACR,MAAS,gBACT,QAAW,CACT,IAAK,CACH,MAAS,kBACT,QAAW,gBACX,QAAW,eACb,EACA,WAAY,cACZ,cAAe,cACf,oBAAqB,uBACrB,uBAAwB,uBACxB,oBAAqB,uBACrB,uBAAwB,uBACxB,iBAAkB,gBACpB,EACA,QAAW,CACT,YAAa,0CACb,KAAQ,WACR,QAAW,oCACX,KAAQ,kFACR,gBAAiB,2GACjB,WAAc,WACd,QAAW,kBACb,EACA,WAAc,CACZ,KAAQ,MACR,IAAO,sCACT,EACA,SAAY,4CACZ,QAAW,sBACX,SAAY,CACV,SACA,MACA,OACA,cACA,YACA,SACA,UACF,EACA,eAAkB,YAClB,QAAW,eACX,gBAAmB,CACjB,cAAe,WACf,QAAW,SACX,MAAS,UACT,SAAY,UACZ,mBAAoB,SACpB,IAAO,UACP,WAAc,QAChB,EACA,QAAW,CACT,KAAQ,MACV,EACA,QAAW,CACT,GAAM,EACR,CACF,IC7DA,IAAAC,GAAAC,EAAA,CAAAC,GAAAC,IAAA,KAAMC,EAAK,EAAQ,IAAI,EACjBC,EAAO,EAAQ,MAAM,EACrBC,GAAK,EAAQ,IAAI,EACjBC,GAAS,EAAQ,QAAQ,EACzBC,GAAc,KAEdC,EAAUD,GAAY,QAGtBE,GAAO,CACX,sDACA,2EACA,0EACA,4DACA,2DACA,wDACA,kEACA,iFACA,0DACA,mEACA,uDACA,qEACA,8EACF,EAGA,SAASC,IAAiB,CACxB,OAAOD,GAAK,KAAK,MAAM,KAAK,OAAO,EAAIA,GAAK,MAAM,CAAC,C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,EAAO,MAAM,kCAAkCJ,CAAS,EAAE,CAC5D,EAKMO,GAAkB,CACtBR,EACAM,IACa,CACb,IAAMC,EAAU,CAAC,EAGjB,OAAAA,EAAQ,KAAK,GAAGY,GAAe,CAAC,EAGhCZ,EAAQ,KAAK,GAAGa,GAAqBd,CAAc,CAAC,EAGhDN,EAAO,UAAU,YAAc,MACjCO,EAAQ,KAAK,GAAGc,GAAc,CAAC,EACtBrB,EAAO,UAAU,YAAc,SACxCO,EAAQ,KAAK,GAAGe,GAAgB,CAAC,EAG5Bf,CACT,EAKMW,GAAuB,MAC3BjB,EACAD,IACkB,CAClB,IAAMuB,EAAanB,GAAK,KAAKH,EAAW,kBAAkB,EAEpDuB,EAAUC,GAAmBzB,CAAM,EAGnC0B,EAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAFCC,GAAuBH,CAAO,CAWvC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA+Ed,MAAMP,GAAG,UAAUM,EAAYG,CAAa,CAC9C",
|
|
6
6
|
"names": ["require_package", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "fs", "path", "os", "crypto", "packageJson", "version", "TIPS", "_getRandomTip", "parseBoolean", "value", "supportsAnsi", "dim", "text", "LINE", "parse", "src", "obj", "lines", "match", "key", "maybeQuote", "_parseVault", "options", "vaultPath", "_vaultPath", "result", "DotenvModule", "err", "keys", "_dotenvKey", "length", "decrypted", "i", "attrs", "_instructions", "error", "_warn", "message", "_debug", "_log", "dotenvKey", "uri", "environment", "environmentKey", "ciphertext", "possibleVaultPath", "filepath", "_resolveHome", "envPath", "_configVault", "debug", "quiet", "parsed", "processEnv", "configDotenv", "dotenvPath", "encoding", "optionPaths", "lastError", "parsedAll", "e", "populated", "keysCount", "shortPaths", "filePath", "relative", "config", "decrypt", "encrypted", "keyStr", "nonce", "authTag", "aesgcm", "isRange", "invalidKeyLength", "decryptionFailed", "populate", "override", "wrapAnsi16", "offset", "code", "wrapAnsi256", "wrapAnsi16m", "red", "green", "blue", "styles", "modifierNames", "foregroundColorNames", "backgroundColorNames", "colorNames", "assembleStyles", "codes", "groupName", "group", "styleName", "style", "hex", "matches", "colorString", "character", "integer", "remainder", "value", "result", "ansiStyles", "ansi_styles_default", "process", "os", "tty", "hasFlag", "flag", "argv", "prefix", "position", "terminatorPosition", "env", "flagForceColor", "envForceColor", "translateLevel", "level", "_supportsColor", "haveStream", "streamIsTTY", "sniffFlags", "noFlagForceColor", "forceColor", "min", "osRelease", "key", "sign", "version", "createSupportsColor", "stream", "options", "supportsColor", "supports_color_default", "stringReplaceAll", "string", "substring", "replacer", "index", "substringLength", "endIndex", "returnValue", "stringEncaseCRLFWithFirstIndex", "prefix", "postfix", "gotCR", "stdoutColor", "stderrColor", "supports_color_default", "GENERATOR", "STYLER", "IS_EMPTY", "levelMapping", "styles", "applyOptions", "object", "options", "colorLevel", "chalkFactory", "options", "chalk", "strings", "applyOptions", "createChalk", "styleName", "style", "ansi_styles_default", "styles", "builder", "createBuilder", "createStyler", "STYLER", "IS_EMPTY", "getModelAnsi", "model", "level", "type", "arguments_", "usedModels", "styler", "levelMapping", "bgModel", "proto", "GENERATOR", "open", "close", "parent", "openAll", "closeAll", "self", "_styler", "_isEmpty", "applyStyle", "string", "stringReplaceAll", "lfIndex", "stringEncaseCRLFWithFirstIndex", "chalkStderr", "stderrColor", "source_default", "chalk", "dotenv", "chokidar", "fs", "path", "fs", "path", "Logger", "level", "verbose", "levels", "type", "source_default", "text", "message", "styleFunction", "icon", "prefix", "error", "logger", "defineRacletteConfig", "config", "fs", "path", "getCoreDependencies", "useRecommended", "getCoreRecommendedDependencies", "getCoreImports", "getCoreConfig", "baseConfig", "getStyleRecommendedConfig", "getReactDependencies", "useRecommended", "getReactRecommendedDependencies", "getReactImports", "getReactConfig", "baseConfig", "getReactRecommendedConfig", "getTypeScriptDependencies", "useRecommended", "getTypeScriptRecommendedDependencies", "getTypeScriptImports", "imports", "getTypeScriptConfig", "baseConfig", "getTypeScriptRecommendedConfig", "getVueDependencies", "useRecommended", "getVueRecommendedDependencies", "getVueImports", "getVueConfig", "baseConfig", "getVueRecommendedConfig", "getAllDependencies", "config", "useRecommended", "dependencies", "getCoreDependencies", "getTypeScriptDependencies", "getVueDependencies", "getReactDependencies", "getCoreRecommendedDependencies", "getTypeScriptRecommendedDependencies", "getVueRecommendedDependencies", "getReactRecommendedDependencies", "existsSync", "path", "generateInstallCommand", "dependencies", "sortedDeps", "hasYarn", "existsSync", "path", "hasPnpm", "hasBun", "packageManager", "installCmd", "generateEslintConfig", "config", "outputDir", "withReadme", "eslintConfigPath", "path", "logger", "useRecommended", "imports", "generateImports", "configSections", "getCoreConfig", "getTypeScriptConfig", "getVueConfig", "getReactConfig", "rulesStr", "ignoresStr", "eslintConfigContent", "fs", "generateEslintReadme", "getCoreImports", "getTypeScriptImports", "getVueImports", "getReactImports", "readmePath", "allDeps", "getAllDependencies", "readmeContent", "generateInstallCommand"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raclettejs/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.33-canary.1",
|
|
4
4
|
"description": "racletteJS core package",
|
|
5
5
|
"repository": "https://gitlab.com/raclettejs/core",
|
|
6
6
|
"author": "Pacifico Digital Explorations GmbH <info@raclettejs.com>",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"@emnapi/core": "1.9.2",
|
|
81
81
|
"@emnapi/runtime": "1.9.2",
|
|
82
82
|
"@eslint/js": "9.35.0",
|
|
83
|
-
"@raclettejs/types": "^0.1.
|
|
83
|
+
"@raclettejs/types": "^0.1.33-canary.1",
|
|
84
84
|
"@types/fs-extra": "11.0.4",
|
|
85
85
|
"@types/js-yaml": "4.0.9",
|
|
86
86
|
"@types/node": "25.5.0",
|
|
Binary file
|
|
@@ -26,7 +26,7 @@ export default (fastify: PluginFastifyInstance) => {
|
|
|
26
26
|
if (req.body?.email?.length) {
|
|
27
27
|
updateObject.email = req.body.email
|
|
28
28
|
// TODO Creation of the field should be happening in the user.model pre save hook
|
|
29
|
-
updateObject.email_verified = false
|
|
29
|
+
// updateObject.email_verified = false
|
|
30
30
|
}
|
|
31
31
|
if (req.body?.firstname?.length) {
|
|
32
32
|
updateObject.firstname = req.body.firstname
|