intlayer-editor 9.7.0 → 9.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/bin/intlayer-editor.mjs +4 -2
  2. package/client/dist/assets/CodeBlockShiki-DD9VdlSg.js +2 -0
  3. package/client/dist/assets/MarkDownRender-BEhMN6Gl.js +1 -0
  4. package/client/dist/assets/MarkDownRender-DrkSQMFl.js +25 -0
  5. package/client/dist/assets/MarkdownEditor-J8I3TH1I.js +174 -0
  6. package/client/dist/assets/{codeTransformer-aP9a_qk2.js → codeTransformer-pmm6yJGh.js} +1 -1
  7. package/client/dist/assets/compat-BqYysBkt.js +1 -0
  8. package/client/dist/assets/css-DgaLhXQH.js +1 -0
  9. package/client/dist/assets/{dist-DRjLHkdX.js → dist-VBWB9uC8.js} +1 -1
  10. package/client/dist/assets/html-BCy9P6D2.js +1 -0
  11. package/client/dist/assets/index-4JH6W8mY.js +114 -0
  12. package/client/dist/assets/index-CfrSXy49.css +2 -0
  13. package/client/dist/assets/javascript-CpIGwZ_Y.js +1 -0
  14. package/client/dist/assets/json-C3WlssX3.js +1 -0
  15. package/client/dist/assets/purify.es-Dqk5qvad.js +3 -0
  16. package/client/dist/assets/shikiBundle-D4rEwiaX.js +12 -0
  17. package/client/dist/assets/tsx-CGosfAUg.js +1 -0
  18. package/client/dist/assets/typescript-Bb1J8qyy.js +1 -0
  19. package/client/dist/assets/{vue-BqdMUtqy.js → vue-jUI-lpPb.js} +1 -1
  20. package/client/dist/assets/wasm-inlined-4KdTHw0F.js +1 -0
  21. package/client/dist/index.html +3 -3
  22. package/package.json +64 -64
  23. package/server/dist/_virtual/_rolldown/runtime.cjs +1 -2
  24. package/server/dist/controllers/auth.controller.cjs +4 -5
  25. package/server/dist/controllers/auth.controller.d.ts +1 -4
  26. package/server/dist/controllers/auth.controller.mjs +1 -2
  27. package/server/dist/controllers/configuration.controller.cjs +6 -5
  28. package/server/dist/controllers/configuration.controller.cjs.map +1 -1
  29. package/server/dist/controllers/configuration.controller.d.ts +9 -5
  30. package/server/dist/controllers/configuration.controller.mjs +6 -5
  31. package/server/dist/controllers/configuration.controller.mjs.map +1 -1
  32. package/server/dist/controllers/dictionary.controller.cjs +2 -3
  33. package/server/dist/controllers/dictionary.controller.d.ts +1 -3
  34. package/server/dist/controllers/dictionary.controller.mjs +1 -2
  35. package/server/dist/export.cjs +2 -2
  36. package/server/dist/export.d.ts +2 -2
  37. package/server/dist/index.cjs +18 -9
  38. package/server/dist/index.cjs.map +1 -1
  39. package/server/dist/index.mjs +14 -5
  40. package/server/dist/index.mjs.map +1 -1
  41. package/server/dist/routes/auth.routes.cjs +2 -3
  42. package/server/dist/routes/auth.routes.d.ts +1 -4
  43. package/server/dist/routes/auth.routes.mjs +1 -2
  44. package/server/dist/routes/config.routes.cjs +2 -3
  45. package/server/dist/routes/config.routes.d.ts +1 -4
  46. package/server/dist/routes/config.routes.mjs +1 -2
  47. package/server/dist/routes/dictionary.routes.cjs +2 -3
  48. package/server/dist/routes/dictionary.routes.d.ts +1 -4
  49. package/server/dist/routes/dictionary.routes.mjs +1 -2
  50. package/server/dist/services/editorAuth.service.cjs +2 -3
  51. package/server/dist/services/editorAuth.service.d.ts +2 -5
  52. package/server/dist/services/editorAuth.service.mjs +1 -2
  53. package/server/dist/types/Routes.d.ts +1 -4
  54. package/server/dist/utils/checkPortAvailability.cjs +2 -3
  55. package/server/dist/utils/checkPortAvailability.d.ts +1 -4
  56. package/server/dist/utils/checkPortAvailability.mjs +1 -2
  57. package/server/dist/utils/httpStatusCodes.cjs +1 -2
  58. package/server/dist/utils/httpStatusCodes.d.ts +10 -22
  59. package/server/dist/utils/httpStatusCodes.mjs +1 -2
  60. package/server/dist/utils/responseData.cjs +2 -3
  61. package/server/dist/utils/responseData.d.ts +1 -3
  62. package/server/dist/utils/responseData.mjs +1 -2
  63. package/client/dist/assets/CodeBlockShiki-B-OcGOY1.js +0 -2
  64. package/client/dist/assets/MarkDownRender-BzY_8i9Z.js +0 -1
  65. package/client/dist/assets/MarkDownRender-CIkPpFUW.js +0 -25
  66. package/client/dist/assets/MarkdownEditor-BpbsoP4E.js +0 -161
  67. package/client/dist/assets/compat-r4Owm_RW.js +0 -1
  68. package/client/dist/assets/css-DUjzNfgv.js +0 -1
  69. package/client/dist/assets/html-WQKKblVZ.js +0 -1
  70. package/client/dist/assets/index-C5SpC4ap.css +0 -2
  71. package/client/dist/assets/index-CmQV7Z_A.js +0 -105
  72. package/client/dist/assets/javascript-Yelw-5ZN.js +0 -1
  73. package/client/dist/assets/json-CaljABEy.js +0 -1
  74. package/client/dist/assets/purify.es-Bvo9QlJ8.js +0 -3
  75. package/client/dist/assets/shikiBundle-BIG1bVgc.js +0 -12
  76. package/client/dist/assets/tsx-5f3ulCja.js +0 -1
  77. package/client/dist/assets/typescript-Utq2Cl8c.js +0 -1
  78. package/client/dist/assets/wasm-BnjxR4X6.js +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { existsSync, lstatSync, readFileSync } from 'node:fs';\nimport { dirname, join, relative, resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport fastifyCompress from '@fastify/compress';\nimport fastifyCookie from '@fastify/cookie';\nimport fastifyCors, { type FastifyCorsOptions } from '@fastify/cors';\nimport fastifyFormbody from '@fastify/formbody';\nimport fastifyHelmet from '@fastify/helmet';\nimport fastifyStatic from '@fastify/static';\nimport * as ANSIColors from '@intlayer/config/colors';\nimport { getEnvFilePath } from '@intlayer/config/env';\nimport { colorize, colorizePath, getAppLogger } from '@intlayer/config/logger';\nimport {\n EDITOR_SERVER_PORT_ENV_VAR,\n getConfiguration,\n getEditorURLForPort,\n} from '@intlayer/config/node';\nimport { overrideBuiltEditorConfiguration } from '@intlayer/engine/build';\nimport { authRouter } from '@routes/auth.routes';\nimport { configurationRouter } from '@routes/config.routes';\nimport { dictionaryRouter } from '@routes/dictionary.routes';\nimport { findAvailablePort } from '@utils/checkPortAvailability';\nimport Fastify, { type FastifyInstance, LogController } from 'fastify';\nimport { intlayer } from 'fastify-intlayer';\nimport mime from 'mime';\n\nconst __dirname = dirname(fileURLToPath(import.meta.url));\n\nconst envFileOptions = {\n env: process.env.NODE_ENV,\n envFile: process.env.ENV_FILE,\n};\n\nconst FALLBACK_PORT = 8000;\nconst config = getConfiguration(envFileOptions);\n\nconst appLogger = getAppLogger(config);\n/** Port tried first; the next free one is used when it is taken. */\nconst preferredPort = config.editor.port ?? FALLBACK_PORT;\nconst HOST = '0.0.0.0';\n\n// Load package.json\nconst packageJson = JSON.parse(\n readFileSync(resolve(__dirname, '../../package.json'), 'utf8')\n);\n\nconst app: FastifyInstance = Fastify({\n logController: new LogController({\n disableRequestLogging: true, // Keep logs clean like the original\n }),\n});\n\n// Load internationalization plugin\n// Assuming fastify-intlayer is the Fastify equivalent of express-intlayer\napp.register(intlayer);\n\nconst clientDistPath = resolve(__dirname, '../../client/dist');\n\nconst corsOptions: FastifyCorsOptions = {\n origin: '*',\n credentials: true,\n};\n\nconst startServer = async (app: FastifyInstance) => {\n const port = await findAvailablePort(preferredPort, HOST);\n\n if (port === undefined) {\n appLogger(`Error: Port ${preferredPort} and the next ones are in use.`, {\n level: 'error',\n });\n process.exit(255);\n }\n\n if (port !== preferredPort) {\n appLogger(`Port ${preferredPort} is in use, using port ${port} instead.`, {\n level: 'warn',\n });\n }\n\n // Served by `/api/config`: the client calls the editor at its actual URL\n process.env[EDITOR_SERVER_PORT_ENV_VAR] = String(port);\n\n // Adapted in the built configuration only: the application must load the\n // editor client, and accept messages from the URL the editor is served at\n const overriddenKeys = await overrideBuiltEditorConfiguration(config, {\n enabled: true,\n editorURL: getEditorURLForPort(config.editor.editorURL, port),\n });\n\n if (overriddenKeys.length > 0) {\n const overriddenSettings = overriddenKeys.map((key) =>\n colorize(`editor.${key}`, ANSIColors.BLUE)\n );\n\n appLogger(\n `${overriddenSettings.join(' and ')} temporarily adapted in ${colorizePath(relative(config.system.baseDir, config.system.configDir))}. Set it in ${colorizePath('intlayer.config.ts')} to keep it after the next build.`,\n {\n level: 'warn',\n }\n );\n }\n\n // Security Headers\n await app.register(fastifyHelmet, {\n // Only restrict who may frame the editor: itself and IDE webviews (the\n // VS Code extension panel). `X-Frame-Options` cannot list a scheme.\n contentSecurityPolicy: {\n useDefaults: false,\n directives: {\n // Helmet requires a `default-src`; the editor sets no other policy\n defaultSrc:\n fastifyHelmet.contentSecurityPolicy.dangerouslyDisableDefaultSrc,\n frameAncestors: [\n \"'self'\",\n 'vscode-webview:',\n 'vscode-file:',\n 'https://*.vscode-cdn.net',\n 'https://*.vscode-webview.net',\n 'localhost:*',\n 'http://localhost:*',\n 'http://127.0.0.1:*',\n ],\n },\n },\n frameguard: false,\n global: true,\n });\n\n // CORS\n await app.register(fastifyCors, corsOptions);\n\n // Compression\n await app.register(fastifyCompress);\n\n // Cookie Parser\n await app.register(fastifyCookie);\n\n // Parse application/x-www-form-urlencoded\n await app.register(fastifyFormbody);\n\n // Register Routes\n await app.register(dictionaryRouter, { prefix: '/api/dictionary' });\n await app.register(configurationRouter, { prefix: '/api/config' });\n await app.register(authRouter, { prefix: '/api/auth' });\n\n // Serve Static Files\n await app.register(fastifyStatic, {\n root: clientDistPath,\n wildcard: false, // We handle the fallback manually to match SPA logic\n });\n\n // For single-page applications, redirect all unmatched routes to index.html\n app.setNotFoundHandler((req, reply) => {\n const requestedPath = join(clientDistPath, req.raw.url || '/');\n\n if (existsSync(requestedPath) && lstatSync(requestedPath).isFile()) {\n const mimeType =\n mime.getType(requestedPath) ?? 'application/octet-stream';\n reply.header('Content-Type', mimeType);\n return reply.sendFile(req.raw.url?.split('/').pop() || 'index.html');\n } else {\n return reply.sendFile('index.html');\n }\n });\n\n try {\n await app.listen({ port, host: HOST });\n\n const dotEnvFilePath = getEnvFilePath(\n envFileOptions.env,\n envFileOptions.envFile\n );\n\n console.log(`\n ${colorize(colorize('INTLAYER', ANSIColors.BOLD), ANSIColors.GREY_DARK)} ${colorize(`v${packageJson.version}`, ANSIColors.GREY_DARK)}\n\n Editor running at: ${colorizePath(`http://localhost:${port}`)}\n ${colorize('➜', ANSIColors.GREY_DARK)} Watching application at: ${config.editor.applicationURL === '' ? '-' : colorizePath(config.editor.applicationURL)}\n ${colorize('➜', ANSIColors.GREY_DARK)} Access key: ${config.editor.clientId ?? '-'}\n ${colorize('➜', ANSIColors.GREY_DARK)} Environment: ${dotEnvFilePath ?? '-'}\n `);\n } catch (error) {\n // The Fastify logger is disabled, so `app.log` would swallow this\n appLogger(`Failed to start the editor: ${(error as Error).message}`, {\n level: 'error',\n });\n process.exit(\n (error as NodeJS.ErrnoException).code === 'EADDRINUSE' ? 255 : 1\n );\n }\n};\n\n// Start it up!\nstartServer(app);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAM,YAAY,QAAQ,cAAc,YAAY,GAAG,CAAC;AAExD,MAAM,iBAAiB;CACrB;CACA,SAAS,QAAQ,IAAI;AACvB;AAEA,MAAM,gBAAgB;AACtB,MAAM,SAAS,iBAAiB,cAAc;AAE9C,MAAM,YAAY,aAAa,MAAM;;AAErC,MAAM,gBAAgB,OAAO,OAAO,QAAQ;AAC5C,MAAM,OAAO;AAGb,MAAM,cAAc,KAAK,MACvB,aAAa,QAAQ,WAAW,oBAAoB,GAAG,MAAM,CAC/D;AAEA,MAAM,MAAuB,QAAQ,EACnC,eAAe,IAAI,cAAc,EAC/B,uBAAuB,KACzB,CAAC,EACH,CAAC;AAID,IAAI,SAAS,QAAQ;AAErB,MAAM,iBAAiB,QAAQ,WAAW,mBAAmB;AAE7D,MAAM,cAAkC;CACtC,QAAQ;CACR,aAAa;AACf;AAEA,MAAM,cAAc,OAAO,QAAyB;CAClD,MAAM,OAAO,MAAM,kBAAkB,eAAe,IAAI;CAExD,IAAI,SAAS,QAAW;EACtB,UAAU,eAAe,cAAc,iCAAiC,EACtE,OAAO,QACT,CAAC;EACD,QAAQ,K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,CAAC,CAAC,OAAO,GAAG;GAClE,MAAM,WACJ,KAAK,QAAQ,aAAa,KAAK;GACjC,MAAM,OAAO,gBAAgB,QAAQ;GACrC,OAAO,MAAM,SAAS,IAAI,IAAI,KAAK,MAAM,GAAG,CAAC,CAAC,IAAI,KAAK,YAAY;EACrE,OACE,OAAO,MAAM,SAAS,YAAY;CAEtC,CAAC;CAED,IAAI;EACF,MAAM,IAAI,OAAO;GAAE;GAAM,MAAM;EAAK,CAAC;EAErC,MAAM,iBAAiB,eACrB,eAAe,KACf,eAAe,OACjB;EAEA,QAAQ,IAAI;MACV,SAAS,SAAS,YAAY,WAAW,IAAI,GAAG,WAAW,SAAS,EAAE,GAAG,SAAS,IAAI,YAAY,WAAW,WAAW,SAAS,EAAE;;mCAEtG,aAAa,oBAAoB,MAAM,EAAE;MACtE,SAAS,KAAK,WAAW,SAAS,EAAE,8BAA8B,OAAO,OAAO,mBAAmB,KAAK,MAAM,aAAa,OAAO,OAAO,cAAc,EAAE;MACzJ,SAAS,KAAK,WAAW,SAAS,EAAE,8BAA8B,OAAO,OAAO,YAAY,IAAI;MAChG,SAAS,KAAK,WAAW,SAAS,EAAE,8BAA8B,kBAAkB,IAAI;KACzF;CACH,SAAS,OAAO;EAEd,UAAU,+BAAgC,MAAgB,WAAW,EACnE,OAAO,QACT,CAAC;EACD,QAAQ,KACL,MAAgC,SAAS,eAAe,MAAM,CACjE;CACF;AACF;AAGA,YAAY,GAAG"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { existsSync, lstatSync, readFileSync } from 'node:fs';\nimport { dirname, join, relative, resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport fastifyCompress from '@fastify/compress';\nimport fastifyCookie from '@fastify/cookie';\nimport fastifyCors, { type FastifyCorsOptions } from '@fastify/cors';\nimport fastifyFormbody from '@fastify/formbody';\nimport fastifyHelmet from '@fastify/helmet';\nimport fastifyStatic from '@fastify/static';\nimport * as ANSIColors from '@intlayer/config/colors';\nimport { getEnvFilePath } from '@intlayer/config/env';\nimport { colorize, colorizePath, getAppLogger } from '@intlayer/config/logger';\nimport {\n EDITOR_SERVER_PORT_ENV_VAR,\n getConfiguration,\n getEditorURLForPort,\n} from '@intlayer/config/node';\nimport {\n type BuiltEditorOverride,\n overrideBuiltEditorConfiguration,\n watchBuiltEditorConfiguration,\n} from '@intlayer/engine/build';\nimport { authRouter } from '@routes/auth.routes';\nimport { configurationRouter } from '@routes/config.routes';\nimport { dictionaryRouter } from '@routes/dictionary.routes';\nimport { findAvailablePort } from '@utils/checkPortAvailability';\nimport Fastify, { type FastifyInstance, LogController } from 'fastify';\nimport { intlayer } from 'fastify-intlayer';\nimport mime from 'mime';\n\nconst __dirname = dirname(fileURLToPath(import.meta.url));\n\nconst envFileOptions = {\n env: process.env.NODE_ENV,\n envFile: process.env.ENV_FILE,\n};\n\nconst FALLBACK_PORT = 8000;\nconst config = getConfiguration(envFileOptions);\n\nconst appLogger = getAppLogger(config);\n/** Port tried first; the next free one is used when it is taken. */\nconst preferredPort = config.editor.port ?? FALLBACK_PORT;\nconst HOST = '0.0.0.0';\n\n// Load package.json\nconst packageJson = JSON.parse(\n readFileSync(resolve(__dirname, '../../package.json'), 'utf8')\n);\n\nconst app: FastifyInstance = Fastify({\n logController: new LogController({\n disableRequestLogging: true, // Keep logs clean like the original\n }),\n});\n\n// Load internationalization plugin\n// Assuming fastify-intlayer is the Fastify equivalent of express-intlayer\napp.register(intlayer);\n\nconst clientDistPath = resolve(__dirname, '../../client/dist');\n\nconst corsOptions: FastifyCorsOptions = {\n origin: '*',\n credentials: true,\n};\n\nconst startServer = async (app: FastifyInstance) => {\n const port = await findAvailablePort(preferredPort, HOST);\n\n if (port === undefined) {\n appLogger(`Error: Port ${preferredPort} and the next ones are in use.`, {\n level: 'error',\n });\n process.exit(255);\n }\n\n if (port !== preferredPort) {\n appLogger(`Port ${preferredPort} is in use, using port ${port} instead.`, {\n level: 'warn',\n });\n }\n\n // Served by `/api/config`: the client calls the editor at its actual URL\n process.env[EDITOR_SERVER_PORT_ENV_VAR] = String(port);\n\n // Adapted in the built configuration only: the application must load the\n // editor client, and accept messages from the URL the editor is served at\n const editorOverride: BuiltEditorOverride = {\n enabled: true,\n editorURL: getEditorURLForPort(config.editor.editorURL, port),\n };\n const overriddenKeys = await overrideBuiltEditorConfiguration(\n config,\n editorOverride\n );\n\n if (overriddenKeys.length > 0) {\n const overriddenSettings = overriddenKeys.map((key) =>\n colorize(`editor.${key}`, ANSIColors.BLUE)\n );\n\n appLogger(\n `${overriddenSettings.join(' and ')} temporarily adapted in ${colorizePath(relative(config.system.baseDir, config.system.configDir))}. Set it in ${colorizePath('intlayer.config.ts')} to keep it after the next build.`,\n {\n level: 'warn',\n }\n );\n\n // An application (re)started aside rebuilds the configuration without them\n watchBuiltEditorConfiguration(config.system.configDir, {\n loadConfiguration: () =>\n getConfiguration({ ...envFileOptions, cache: false }),\n editorOverride,\n onRestore: () =>\n appLogger(\n `${overriddenSettings.join(' and ')} adapted again in ${colorizePath(relative(config.system.baseDir, config.system.configDir))} after the application rebuilt it.`\n ),\n onError: (error) =>\n appLogger(\n `Failed to keep the editor settings in the built configuration: ${(error as Error).message}`,\n { level: 'warn' }\n ),\n });\n }\n\n // Security Headers\n await app.register(fastifyHelmet, {\n // Only restrict who may frame the editor: itself and IDE webviews (the\n // VS Code extension panel). `X-Frame-Options` cannot list a scheme.\n contentSecurityPolicy: {\n useDefaults: false,\n directives: {\n // Helmet requires a `default-src`; the editor sets no other policy\n defaultSrc:\n fastifyHelmet.contentSecurityPolicy.dangerouslyDisableDefaultSrc,\n frameAncestors: [\n \"'self'\",\n 'vscode-webview:',\n 'vscode-file:',\n 'https://*.vscode-cdn.net',\n 'https://*.vscode-webview.net',\n 'localhost:*',\n 'http://localhost:*',\n 'http://127.0.0.1:*',\n ],\n },\n },\n frameguard: false,\n global: true,\n });\n\n // CORS\n await app.register(fastifyCors, corsOptions);\n\n // Compression\n await app.register(fastifyCompress);\n\n // Cookie Parser\n await app.register(fastifyCookie);\n\n // Parse application/x-www-form-urlencoded\n await app.register(fastifyFormbody);\n\n // Register Routes\n await app.register(dictionaryRouter, { prefix: '/api/dictionary' });\n await app.register(configurationRouter, { prefix: '/api/config' });\n await app.register(authRouter, { prefix: '/api/auth' });\n\n // Serve Static Files\n await app.register(fastifyStatic, {\n root: clientDistPath,\n wildcard: false, // We handle the fallback manually to match SPA logic\n });\n\n // For single-page applications, redirect all unmatched routes to index.html\n app.setNotFoundHandler((req, reply) => {\n const requestedPath = join(clientDistPath, req.raw.url || '/');\n\n if (existsSync(requestedPath) && lstatSync(requestedPath).isFile()) {\n const mimeType =\n mime.getType(requestedPath) ?? 'application/octet-stream';\n reply.header('Content-Type', mimeType);\n return reply.sendFile(req.raw.url?.split('/').pop() || 'index.html');\n } else {\n return reply.sendFile('index.html');\n }\n });\n\n try {\n await app.listen({ port, host: HOST });\n\n const dotEnvFilePath = getEnvFilePath(\n envFileOptions.env,\n envFileOptions.envFile\n );\n\n console.log(`\n ${colorize(colorize('INTLAYER', ANSIColors.BOLD), ANSIColors.GREY_DARK)} ${colorize(`v${packageJson.version}`, ANSIColors.GREY_DARK)}\n\n Editor running at: ${colorizePath(`http://localhost:${port}`)}\n ${colorize('➜', ANSIColors.GREY_DARK)} Watching application at: ${config.editor.applicationURL === '' ? '-' : colorizePath(config.editor.applicationURL)}\n ${colorize('➜', ANSIColors.GREY_DARK)} Access key: ${config.editor.clientId ?? '-'}\n ${colorize('➜', ANSIColors.GREY_DARK)} Environment: ${dotEnvFilePath ?? '-'}\n `);\n } catch (error) {\n // The Fastify logger is disabled, so `app.log` would swallow this\n appLogger(`Failed to start the editor: ${(error as Error).message}`, {\n level: 'error',\n });\n process.exit(\n (error as NodeJS.ErrnoException).code === 'EADDRINUSE' ? 255 : 1\n );\n }\n};\n\n// Start it up!\nstartServer(app);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAM,YAAY,QA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AED,IAAI;EACF,MAAM,IAAI,OAAO;GAAE;GAAM,MAAM;EAAK,CAAC;EAErC,MAAM,iBAAiB,eACrB,eAAe,KACf,eAAe,OACjB;EAEA,QAAQ,IAAI;MACV,SAAS,SAAS,YAAY,WAAW,IAAI,GAAG,WAAW,SAAS,EAAE,GAAG,SAAS,IAAI,YAAY,WAAW,WAAW,SAAS,EAAE;;mCAEtG,aAAa,oBAAoB,MAAM,EAAE;MACtE,SAAS,KAAK,WAAW,SAAS,EAAE,8BAA8B,OAAO,OAAO,mBAAmB,KAAK,MAAM,aAAa,OAAO,OAAO,cAAc,EAAE;MACzJ,SAAS,KAAK,WAAW,SAAS,EAAE,8BAA8B,OAAO,OAAO,YAAY,IAAI;MAChG,SAAS,KAAK,WAAW,SAAS,EAAE,8BAA8B,kBAAkB,IAAI;KACzF;CACH,SAAS,OAAO;EAEd,UAAU,+BAAgC,MAAgB,WAAW,EACnE,OAAO,QACT,CAAC;EACD,QAAQ,KACL,MAAgC,SAAS,eAAe,MAAM,CACjE;CACF;AACF;AAGA,YAAY,GAAG"}
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_controllers_auth_controller = require('../controllers/auth.controller.cjs');
2
+ const require_controllers_auth_controller = require("../controllers/auth.controller.cjs");
3
3
  let _intlayer_config_node = require("@intlayer/config/node");
4
4
 
5
- //#region src/routes/auth.routes.ts
5
+ // src/routes/auth.routes.ts
6
6
  const { editor } = (0, _intlayer_config_node.getConfiguration)();
7
7
  const getBaseURL = () => `${editor.editorURL}/api/auth`;
8
8
  const getAuthRoutes = () => ({
@@ -29,7 +29,6 @@ const authRouter = async (fastify) => {
29
29
  fastify.post(getAuthRoutes().logout.urlModel, require_controllers_auth_controller.logout);
30
30
  };
31
31
 
32
- //#endregion
33
32
  exports.authRouter = authRouter;
34
33
  exports.getAuthRoutes = getAuthRoutes;
35
34
  //# sourceMappingURL=auth.routes.cjs.map
@@ -1,5 +1,4 @@
1
1
  import { FastifyInstance } from "fastify";
2
- //#region src/routes/auth.routes.d.ts
3
2
  export declare const getAuthRoutes: () => {
4
3
  getEditorAuth: {
5
4
  urlModel: string;
@@ -17,6 +16,4 @@ export declare const getAuthRoutes: () => {
17
16
  method: "POST";
18
17
  };
19
18
  };
20
- export declare const authRouter: (fastify: FastifyInstance) => Promise<void>;
21
- //#endregion
22
- //# sourceMappingURL=auth.routes.d.ts.map
19
+ export declare const authRouter: (fastify: FastifyInstance) => Promise<void>;
@@ -1,7 +1,7 @@
1
1
  import { assertSameOrigin, getEditorAuth, logout, startLogin } from "../controllers/auth.controller.mjs";
2
2
  import { getConfiguration } from "@intlayer/config/node";
3
3
 
4
- //#region src/routes/auth.routes.ts
4
+ // src/routes/auth.routes.ts
5
5
  const { editor } = getConfiguration();
6
6
  const getBaseURL = () => `${editor.editorURL}/api/auth`;
7
7
  const getAuthRoutes = () => ({
@@ -28,6 +28,5 @@ const authRouter = async (fastify) => {
28
28
  fastify.post(getAuthRoutes().logout.urlModel, logout);
29
29
  };
30
30
 
31
- //#endregion
32
31
  export { authRouter, getAuthRoutes };
33
32
  //# sourceMappingURL=auth.routes.mjs.map
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_controllers_configuration_controller = require('../controllers/configuration.controller.cjs');
2
+ const require_controllers_configuration_controller = require("../controllers/configuration.controller.cjs");
3
3
  let _intlayer_config_node = require("@intlayer/config/node");
4
4
 
5
- //#region src/routes/config.routes.ts
5
+ // src/routes/config.routes.ts
6
6
  const { editor } = (0, _intlayer_config_node.getConfiguration)();
7
7
  const getBaseURL = () => `${editor.editorURL}/api/dictionary`;
8
8
  const getConfigurationRoutes = () => ({ getConfiguration: {
@@ -14,7 +14,6 @@ const configurationRouter = async (fastify) => {
14
14
  fastify.get(getConfigurationRoutes().getConfiguration.urlModel, require_controllers_configuration_controller.getConfiguration);
15
15
  };
16
16
 
17
- //#endregion
18
17
  exports.configurationRouter = configurationRouter;
19
18
  exports.getConfigurationRoutes = getConfigurationRoutes;
20
19
  //# sourceMappingURL=config.routes.cjs.map
@@ -1,5 +1,4 @@
1
1
  import { FastifyInstance } from "fastify";
2
- //#region src/routes/config.routes.d.ts
3
2
  export declare const getConfigurationRoutes: () => {
4
3
  getConfiguration: {
5
4
  urlModel: string;
@@ -7,6 +6,4 @@ export declare const getConfigurationRoutes: () => {
7
6
  method: "GET";
8
7
  };
9
8
  };
10
- export declare const configurationRouter: (fastify: FastifyInstance) => Promise<void>;
11
- //#endregion
12
- //# sourceMappingURL=config.routes.d.ts.map
9
+ export declare const configurationRouter: (fastify: FastifyInstance) => Promise<void>;
@@ -1,7 +1,7 @@
1
1
  import { getConfiguration as getConfiguration$1 } from "../controllers/configuration.controller.mjs";
2
2
  import { getConfiguration } from "@intlayer/config/node";
3
3
 
4
- //#region src/routes/config.routes.ts
4
+ // src/routes/config.routes.ts
5
5
  const { editor } = getConfiguration();
6
6
  const getBaseURL = () => `${editor.editorURL}/api/dictionary`;
7
7
  const getConfigurationRoutes = () => ({ getConfiguration: {
@@ -13,6 +13,5 @@ const configurationRouter = async (fastify) => {
13
13
  fastify.get(getConfigurationRoutes().getConfiguration.urlModel, getConfiguration$1);
14
14
  };
15
15
 
16
- //#endregion
17
16
  export { configurationRouter, getConfigurationRoutes };
18
17
  //# sourceMappingURL=config.routes.mjs.map
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_controllers_dictionary_controller = require('../controllers/dictionary.controller.cjs');
2
+ const require_controllers_dictionary_controller = require("../controllers/dictionary.controller.cjs");
3
3
  let _intlayer_config_node = require("@intlayer/config/node");
4
4
 
5
- //#region src/routes/dictionary.routes.ts
5
+ // src/routes/dictionary.routes.ts
6
6
  const { editor } = (0, _intlayer_config_node.getConfiguration)();
7
7
  const getBaseURL = () => `${editor.editorURL}/api/dictionary`;
8
8
  const getDictionaryRoutes = () => ({
@@ -22,7 +22,6 @@ const dictionaryRouter = async (fastify) => {
22
22
  fastify.post(getDictionaryRoutes().writeContentDeclaration.urlModel, require_controllers_dictionary_controller.writeContentDeclaration);
23
23
  };
24
24
 
25
- //#endregion
26
25
  exports.dictionaryRouter = dictionaryRouter;
27
26
  exports.getDictionaryRoutes = getDictionaryRoutes;
28
27
  //# sourceMappingURL=dictionary.routes.cjs.map
@@ -1,5 +1,4 @@
1
1
  import { FastifyInstance } from "fastify";
2
- //#region src/routes/dictionary.routes.d.ts
3
2
  export declare const getDictionaryRoutes: () => {
4
3
  getDictionaries: {
5
4
  urlModel: string;
@@ -12,6 +11,4 @@ export declare const getDictionaryRoutes: () => {
12
11
  method: "POST";
13
12
  };
14
13
  };
15
- export declare const dictionaryRouter: (fastify: FastifyInstance) => Promise<void>;
16
- //#endregion
17
- //# sourceMappingURL=dictionary.routes.d.ts.map
14
+ export declare const dictionaryRouter: (fastify: FastifyInstance) => Promise<void>;
@@ -1,7 +1,7 @@
1
1
  import { getDictionaries, writeContentDeclaration } from "../controllers/dictionary.controller.mjs";
2
2
  import { getConfiguration } from "@intlayer/config/node";
3
3
 
4
- //#region src/routes/dictionary.routes.ts
4
+ // src/routes/dictionary.routes.ts
5
5
  const { editor } = getConfiguration();
6
6
  const getBaseURL = () => `${editor.editorURL}/api/dictionary`;
7
7
  const getDictionaryRoutes = () => ({
@@ -21,6 +21,5 @@ const dictionaryRouter = async (fastify) => {
21
21
  fastify.post(getDictionaryRoutes().writeContentDeclaration.urlModel, writeContentDeclaration);
22
22
  };
23
23
 
24
- //#endregion
25
24
  export { dictionaryRouter, getDictionaryRoutes };
26
25
  //# sourceMappingURL=dictionary.routes.mjs.map
@@ -1,12 +1,12 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
2
+ const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
3
3
  let _intlayer_config_colors = require("@intlayer/config/colors");
4
4
  _intlayer_config_colors = require_runtime.__toESM(_intlayer_config_colors, 1);
5
5
  let _intlayer_config_logger = require("@intlayer/config/logger");
6
6
  let _intlayer_api = require("@intlayer/api");
7
7
  let _intlayer_cli = require("@intlayer/cli");
8
8
 
9
- //#region src/services/editorAuth.service.ts
9
+ // src/services/editorAuth.service.ts
10
10
  /** Time after which an unanswered login is given up. */
11
11
  const LOGIN_TIMEOUT_MS = 3e5;
12
12
  /** Margin before expiry under which a cached access token is renewed. */
@@ -135,7 +135,6 @@ const startEditorLogin = async (configuration, configOptions) => {
135
135
  });
136
136
  };
137
137
 
138
- //#endregion
139
138
  exports.isEditorLoginPending = isEditorLoginPending;
140
139
  exports.logoutEditor = logoutEditor;
141
140
  exports.resolveEditorAuth = resolveEditorAuth;
@@ -1,9 +1,8 @@
1
+ import { IntlayerConfig } from "@intlayer/types/config";
1
2
  import { OrganizationAPI } from "@intlayer/backend-contract/organization";
2
3
  import { ProjectAPI } from "@intlayer/backend-contract/project";
3
4
  import { UserAPI } from "@intlayer/backend-contract/user";
4
5
  import { GetConfigurationOptions } from "@intlayer/config/node";
5
- import { IntlayerConfig } from "@intlayer/types/config";
6
- //#region src/services/editorAuth.service.d.ts
7
6
  /**
8
7
  * Identity the editor client uses to call the CMS, sent as a bearer token.
9
8
  *
@@ -38,6 +37,4 @@ export declare const isEditorLoginPending: () => boolean;
38
37
  * called back (the session token being stored for both the editor and the
39
38
  * CLI), or when the login is dropped or times out.
40
39
  */
41
- export declare const startEditorLogin: (configuration: IntlayerConfig, configOptions?: GetConfigurationOptions) => Promise<void>;
42
- //#endregion
43
- //# sourceMappingURL=editorAuth.service.d.ts.map
40
+ export declare const startEditorLogin: (configuration: IntlayerConfig, configOptions?: GetConfigurationOptions) => Promise<void>;
@@ -3,7 +3,7 @@ import { colorize, getAppLogger } from "@intlayer/config/logger";
3
3
  import { getIntlayerAPIProxy, getOAuthAPI } from "@intlayer/api";
4
4
  import { clearCliSessionToken, login, readCliSessionToken } from "@intlayer/cli";
5
5
 
6
- //#region src/services/editorAuth.service.ts
6
+ // src/services/editorAuth.service.ts
7
7
  /** Time after which an unanswered login is given up. */
8
8
  const LOGIN_TIMEOUT_MS = 3e5;
9
9
  /** Margin before expiry under which a cached access token is renewed. */
@@ -132,6 +132,5 @@ const startEditorLogin = async (configuration, configOptions) => {
132
132
  });
133
133
  };
134
134
 
135
- //#endregion
136
135
  export { isEditorLoginPending, logoutEditor, resolveEditorAuth, startEditorLogin };
137
136
  //# sourceMappingURL=editorAuth.service.mjs.map
@@ -1,9 +1,6 @@
1
- //#region src/types/Routes.d.ts
2
1
  export type Route = {
3
2
  urlModel: string;
4
3
  url: string | ((args: any) => string);
5
4
  method: 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE';
6
5
  };
7
- export type Routes = Record<string, Route>;
8
- //#endregion
9
- //# sourceMappingURL=Routes.d.ts.map
6
+ export type Routes = Record<string, Route>;
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
2
+ const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
3
3
  let node_net = require("node:net");
4
4
  node_net = require_runtime.__toESM(node_net, 1);
5
5
 
6
- //#region src/utils/checkPortAvailability.ts
6
+ // src/utils/checkPortAvailability.ts
7
7
  /**
8
8
  * Resolves `false` when `port` is already bound on `host`.
9
9
  *
@@ -44,7 +44,6 @@ const findAvailablePort = async (startPort, host = "0.0.0.0", attempts = 20) =>
44
44
  }
45
45
  };
46
46
 
47
- //#endregion
48
47
  exports.checkPortAvailability = checkPortAvailability;
49
48
  exports.findAvailablePort = findAvailablePort;
50
49
  //# sourceMappingURL=checkPortAvailability.cjs.map
@@ -1,4 +1,3 @@
1
- //#region src/utils/checkPortAvailability.d.ts
2
1
  /**
3
2
  * Resolves `false` when `port` is already bound on `host`.
4
3
  *
@@ -12,6 +11,4 @@ export declare const checkPortAvailability: (port: number, host?: string) => Pro
12
11
  *
13
12
  * @returns The port, or `undefined` when the `attempts` ports are all taken.
14
13
  */
15
- export declare const findAvailablePort: (startPort: number, host?: string, attempts?: number) => Promise<number | undefined>;
16
- //#endregion
17
- //# sourceMappingURL=checkPortAvailability.d.ts.map
14
+ export declare const findAvailablePort: (startPort: number, host?: string, attempts?: number) => Promise<number | undefined>;
@@ -1,6 +1,6 @@
1
1
  import net from "node:net";
2
2
 
3
- //#region src/utils/checkPortAvailability.ts
3
+ // src/utils/checkPortAvailability.ts
4
4
  /**
5
5
  * Resolves `false` when `port` is already bound on `host`.
6
6
  *
@@ -41,6 +41,5 @@ const findAvailablePort = async (startPort, host = "0.0.0.0", attempts = 20) =>
41
41
  }
42
42
  };
43
43
 
44
- //#endregion
45
44
  export { checkPortAvailability, findAvailablePort };
46
45
  //# sourceMappingURL=checkPortAvailability.mjs.map
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- //#region src/utils/httpStatusCodes.ts
2
+ // src/utils/httpStatusCodes.ts
3
3
  /**
4
4
  * Enum for HTTP response status codes.
5
5
  * Contains all the possible HTTP response codes according to the standard.
@@ -396,6 +396,5 @@ let HttpStatusCodes = /* @__PURE__ */ function(HttpStatusCodes) {
396
396
  return HttpStatusCodes;
397
397
  }({});
398
398
 
399
- //#endregion
400
399
  exports.HttpStatusCodes = HttpStatusCodes;
401
400
  //# sourceMappingURL=httpStatusCodes.cjs.map
@@ -1,4 +1,3 @@
1
- //#region src/utils/httpStatusCodes.d.ts
2
1
  /**
3
2
  * Enum for HTTP response status codes.
4
3
  * Contains all the possible HTTP response codes according to the standard.
@@ -155,8 +154,7 @@ export declare enum HttpStatusCodes {
155
154
  /**
156
155
  * Used to return some response headers before final HTTP message.
157
156
  */
158
- PROCESSING_102 = 102 // WebDAV
159
- ,
157
+ PROCESSING_102 = 102, // WebDAV
160
158
  /**
161
159
  * Early hints - part of optimization to improve page load time.
162
160
  */
@@ -192,13 +190,11 @@ export declare enum HttpStatusCodes {
192
190
  /**
193
191
  * Multi-status response providing status for multiple independent operations.
194
192
  */
195
- MULTI_STATUS_207 = 207 // WebDAV
196
- ,
193
+ MULTI_STATUS_207 = 207, // WebDAV
197
194
  /**
198
195
  * The members of a DAV binding have already been enumerated in a preceding part of the request.
199
196
  */
200
- ALREADY_REPORTED_208 = 208 // WebDAV
201
- ,
197
+ ALREADY_REPORTED_208 = 208, // WebDAV
202
198
  /**
203
199
  * The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance manipulations applied to the current instance.
204
200
  */
@@ -310,8 +306,7 @@ export declare enum HttpStatusCodes {
310
306
  /**
311
307
  * The server refuses the attempt to brew coffee with a teapot.
312
308
  */
313
- IM_A_TEAPOT_418 = 418 // Easter egg from the HTCPCP/1.0 protocol.
314
- ,
309
+ IM_A_TEAPOT_418 = 418, // Easter egg from the HTCPCP/1.0 protocol.
315
310
  /**
316
311
  * The request was directed at a server that is not able to produce a response.
317
312
  */
@@ -319,18 +314,15 @@ export declare enum HttpStatusCodes {
319
314
  /**
320
315
  * The request was well-formed but was unable to be followed due to semantic errors.
321
316
  */
322
- UNPROCESSABLE_ENTITY_422 = 422 // WebDAV
323
- ,
317
+ UNPROCESSABLE_ENTITY_422 = 422, // WebDAV
324
318
  /**
325
319
  * The resource that is being accessed is locked.
326
320
  */
327
- LOCKED_423 = 423 // WebDAV
328
- ,
321
+ LOCKED_423 = 423, // WebDAV
329
322
  /**
330
323
  * The request failed due to failure of a previous request.
331
324
  */
332
- FAILED_DEPENDENCY_424 = 424 // WebDAV
333
- ,
325
+ FAILED_DEPENDENCY_424 = 424, // WebDAV
334
326
  /**
335
327
  * Indicates that the server is unwilling to risk processing a request that might be replayed.
336
328
  */
@@ -386,13 +378,11 @@ export declare enum HttpStatusCodes {
386
378
  /**
387
379
  * The server is unable to store the representation needed to complete the request.
388
380
  */
389
- INSUFFICIENT_STORAGE_507 = 507 // WebDAV
390
- ,
381
+ INSUFFICIENT_STORAGE_507 = 507, // WebDAV
391
382
  /**
392
383
  * The server detected an infinite loop while processing a request.
393
384
  */
394
- LOOP_DETECTED_508 = 508 // WebDAV
395
- ,
385
+ LOOP_DETECTED_508 = 508, // WebDAV
396
386
  /**
397
387
  * Further extensions to the request are required for the server to fulfill it.
398
388
  */
@@ -401,6 +391,4 @@ export declare enum HttpStatusCodes {
401
391
  * The client needs to authenticate to gain network access.
402
392
  */
403
393
  NETWORK_AUTHENTICATION_REQUIRED_511 = 511
404
- }
405
- //#endregion
406
- //# sourceMappingURL=httpStatusCodes.d.ts.map
394
+ }
@@ -1,4 +1,4 @@
1
- //#region src/utils/httpStatusCodes.ts
1
+ // src/utils/httpStatusCodes.ts
2
2
  /**
3
3
  * Enum for HTTP response status codes.
4
4
  * Contains all the possible HTTP response codes according to the standard.
@@ -395,6 +395,5 @@ let HttpStatusCodes = /* @__PURE__ */ function(HttpStatusCodes) {
395
395
  return HttpStatusCodes;
396
396
  }({});
397
397
 
398
- //#endregion
399
398
  export { HttpStatusCodes };
400
399
  //# sourceMappingURL=httpStatusCodes.mjs.map
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_utils_httpStatusCodes = require('./httpStatusCodes.cjs');
2
+ const require_utils_httpStatusCodes = require("./httpStatusCodes.cjs");
3
3
 
4
- //#region src/utils/responseData.ts
4
+ // src/utils/responseData.ts
5
5
  const isSuccessStatus = (status) => status === 200 || status === 201 || status === 202 || status === 203 || status === 204 || status === 205 || status === 206 || status === 207 || status === 208 || status === 226;
6
6
  function formatResponse({ message, description, data, error, status = 200 }) {
7
7
  return {
@@ -28,7 +28,6 @@ function formatPaginatedResponse({ status = 200, message, description, data, err
28
28
  };
29
29
  }
30
30
 
31
- //#endregion
32
31
  exports.formatPaginatedResponse = formatPaginatedResponse;
33
32
  exports.formatResponse = formatResponse;
34
33
  //# sourceMappingURL=responseData.cjs.map
@@ -1,5 +1,4 @@
1
1
  import { HttpStatusCodes } from "./httpStatusCodes.js";
2
- //#region src/utils/responseData.d.ts
3
2
  type ErrorData = {
4
3
  code: string;
5
4
  title: string;
@@ -61,5 +60,4 @@ type ErrorPaginatedResponseArgs = {
61
60
  };
62
61
  export declare function formatPaginatedResponse<T>({ message, description, data, status, page, pageSize, totalPages, totalItems }: SuccessPaginatedResponseArgs<T>): PaginatedResponse<T>;
63
62
  export declare function formatPaginatedResponse<T>({ error, status }: ErrorPaginatedResponseArgs): PaginatedResponse<T>;
64
- //#endregion
65
- //# sourceMappingURL=responseData.d.ts.map
63
+ export {};
@@ -1,6 +1,6 @@
1
1
  import { HttpStatusCodes } from "./httpStatusCodes.mjs";
2
2
 
3
- //#region src/utils/responseData.ts
3
+ // src/utils/responseData.ts
4
4
  const isSuccessStatus = (status) => status === 200 || status === 201 || status === 202 || status === 203 || status === 204 || status === 205 || status === 206 || status === 207 || status === 208 || status === 226;
5
5
  function formatResponse({ message, description, data, error, status = 200 }) {
6
6
  return {
@@ -27,6 +27,5 @@ function formatPaginatedResponse({ status = 200, message, description, data, err
27
27
  };
28
28
  }
29
29
 
30
- //#endregion
31
30
  export { formatPaginatedResponse, formatResponse };
32
31
  //# sourceMappingURL=responseData.mjs.map
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/shikiBundle-BIG1bVgc.js","assets/compat-r4Owm_RW.js","assets/MarkDownRender-CIkPpFUW.js","assets/index-CmQV7Z_A.js","assets/index-C5SpC4ap.css"])))=>i.map(i=>d[i]);
2
- import{p as e,v as t,w as n}from"./compat-r4Owm_RW.js";import{d as r,l as i,o as a,u as o}from"./MarkDownRender-CIkPpFUW.js";import{G as s,U as c}from"./index-CmQV7Z_A.js";e();var l=async(e,t)=>{let{codeToHtml:n}=await c(async()=>{let{codeToHtml:e}=await import(`./shikiBundle-BIG1bVgc.js`).then(e=>e.i);return{codeToHtml:e}},__vite__mapDeps([0,1,2,3,4]));return n(String(e),{lang:i(t).id,themes:a,defaultColor:!1})},u=({children:e,lang:i})=>{let[a,c]=n(null);return t(()=>{let t=!1;return l(e,i).then(e=>{t||c(e)}).catch(e=>{console.error(`Failed to highlight code:`,e),t||c(``)}),()=>{t=!0}},[e,i]),s(`div`,{className:r,children:a?s(`div`,{dangerouslySetInnerHTML:{__html:a}}):s(o,{children:e})})};export{u as CodeBlockShiki};
@@ -1 +0,0 @@
1
- import{t as e}from"./MarkDownRender-CIkPpFUW.js";export{e as MarkdownRenderer};