larness 0.6.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apps/server/dist/{address-DpgJ0siq.js → address-B-gPq4hH.js} +2 -2
- package/apps/server/dist/cli.js +6 -6
- package/apps/server/dist/{client-CoxHAiNW.js → client-DmQOZ_VJ.js} +1 -1
- package/apps/server/dist/{client-CBpatu1B.js → client-nSfUt-Xw.js} +1 -1
- package/apps/server/dist/{doctor-rpwPrkoS.js → doctor--QI8obs_.js} +1 -1
- package/apps/server/dist/doctor-BWQ8wPEo.js +1 -0
- package/apps/server/dist/doctor.js +1 -1
- package/apps/server/dist/index.js +83 -18
- package/apps/server/dist/{inspect-DUe_-Yma.js → inspect-Dz79med6.js} +6 -1
- package/apps/server/dist/{lifecycle-Ck4LRKft.js → lifecycle-0-9eT-gl.js} +21 -11
- package/apps/server/dist/{managed-CpNf_iJZ.js → managed-FpQ4FjRh.js} +1 -1
- package/apps/server/dist/{status-C0hriYPD.js → status-Bv7nxvzW.js} +2 -2
- package/apps/server/dist/{status-B6kiOT0f.js → status-E5SdreUc.js} +2 -2
- package/apps/server/dist/status.js +1 -1
- package/apps/server/dist/{supervisor-BvHyiN7Z.js → supervisor-eW8XSzXm.js} +3 -3
- package/apps/server/dist/tui.js +5 -5
- package/apps/server/dist/{unlock-hrRXYx4L.js → unlock-ik1568g3.js} +4 -4
- package/apps/web/dist/assets/{FileEditor-2VPjs-RQ.js → FileEditor-DvUvGBju.js} +1 -1
- package/apps/web/dist/assets/{FileViewer-CZcKFZJT.js → FileViewer-DuLi65JA.js} +1 -1
- package/apps/web/dist/assets/{cssMode-D-Rled60.js → cssMode-BFtqV8eS.js} +1 -1
- package/apps/web/dist/assets/{editor.api-C3oaU0qj.js → editor.api-B-Hf6DWT.js} +1 -1
- package/apps/web/dist/assets/{freemarker2-D50E-mj1.js → freemarker2-QsBG6rLF.js} +1 -1
- package/apps/web/dist/assets/{handlebars-_Xg_xwtq.js → handlebars-BIDqo3ET.js} +1 -1
- package/apps/web/dist/assets/{html-BPuGWYaH.js → html-BoeVeWBr.js} +1 -1
- package/apps/web/dist/assets/{htmlMode-CwmSqoNt.js → htmlMode-pBOumAql.js} +1 -1
- package/apps/web/dist/assets/{index-DPZpqlAG.js → index-BcXxWUCA.js} +2 -2
- package/apps/web/dist/assets/{javascript-iFH4qFsX.js → javascript-z49fO24y.js} +1 -1
- package/apps/web/dist/assets/{jsonMode-On0Ct3VU.js → jsonMode-CcjrUe-N.js} +1 -1
- package/apps/web/dist/assets/{liquid-BX3WY7Z7.js → liquid-Bel5uheg.js} +1 -1
- package/apps/web/dist/assets/{lspLanguageFeatures-BXlOyN1U.js → lspLanguageFeatures-BqS1Q85I.js} +1 -1
- package/apps/web/dist/assets/main-B0YUBq2Q.js +157 -0
- package/apps/web/dist/assets/main-B6xFa89X.css +1 -0
- package/apps/web/dist/assets/{mdx-Bzq19TjL.js → mdx-m5Iaur5H.js} +1 -1
- package/apps/web/dist/assets/{monaco-DCdDhoJ6.js → monaco-b438wjl8.js} +3 -3
- package/apps/web/dist/assets/{python-CaZSKPNI.js → python-tC-5HtXS.js} +1 -1
- package/apps/web/dist/assets/{razor-CH1GgILn.js → razor-DmUARTT5.js} +1 -1
- package/apps/web/dist/assets/{tsMode-BWGjCNkx.js → tsMode-BUABwVTd.js} +1 -1
- package/apps/web/dist/assets/{typescript-D2FxAaol.js → typescript-sTt0HE01.js} +1 -1
- package/apps/web/dist/assets/{workers-BUPNyHSF.js → workers-D6L1Qkzp.js} +1 -1
- package/apps/web/dist/assets/{xml-nOgwOHKV.js → xml-asYBWpFY.js} +1 -1
- package/apps/web/dist/assets/{yaml-CyK2AZ1G.js → yaml-DWoILemf.js} +1 -1
- package/apps/web/dist/index.html +1 -1
- package/package.json +1 -1
- package/apps/server/dist/doctor-CGNZt_v3.js +0 -1
- package/apps/web/dist/assets/main-Bm74KyWu.css +0 -1
- package/apps/web/dist/assets/main-GXToakQe.js +0 -157
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { hr as MAX_EDITABLE_FILE_BYTES, rr as FilePathSchema, zn as OriginUrlSchema } from "./inspect-
|
|
1
|
+
import { hr as MAX_EDITABLE_FILE_BYTES, rr as FilePathSchema, zn as OriginUrlSchema } from "./inspect-Dz79med6.js";
|
|
2
2
|
import { createHash, randomUUID } from "node:crypto";
|
|
3
3
|
import { constants, createReadStream, statSync, watch } from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
@@ -1857,7 +1857,7 @@ async function listDirectory(root, input) {
|
|
|
1857
1857
|
}
|
|
1858
1858
|
}
|
|
1859
1859
|
function visibleEntry(entry, relative, directory, options) {
|
|
1860
|
-
return (entry.isFile() || entry.isDirectory()) && !isIgnoredFile(relative, entry.name, options.ignore ?? []) && !options.exclude?.(path.join(directory, entry.name));
|
|
1860
|
+
return (entry.isFile() || entry.isDirectory()) && ((options.includeIgnored ?? false) || !isIgnoredFile(relative, entry.name, options.ignore ?? [])) && !options.exclude?.(path.join(directory, entry.name));
|
|
1861
1861
|
}
|
|
1862
1862
|
function matchRank(query, name, relative) {
|
|
1863
1863
|
if (name === query || relative === query) return 0;
|
package/apps/server/dist/cli.js
CHANGED
|
@@ -288,7 +288,7 @@ async function runLogs(parsed, io) {
|
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
290
|
async function runDoctorCommand(io) {
|
|
291
|
-
const { runDoctor } = await import("./doctor-
|
|
291
|
+
const { runDoctor } = await import("./doctor-BWQ8wPEo.js");
|
|
292
292
|
const report = await runDoctor({ env: io.env });
|
|
293
293
|
io.stdout(`${JSON.stringify(report, null, 2)}\n`);
|
|
294
294
|
return report.checks.some((check) => check.status === "fail") ? 1 : 0;
|
|
@@ -322,23 +322,23 @@ async function runCli(argv, io) {
|
|
|
322
322
|
case "logs": return await runLogs(parsed, io);
|
|
323
323
|
case "doctor": return await runDoctorCommand(io);
|
|
324
324
|
case "start": {
|
|
325
|
-
const { startCommand } = await import("./lifecycle-
|
|
325
|
+
const { startCommand } = await import("./lifecycle-0-9eT-gl.js");
|
|
326
326
|
return await startCommand(io);
|
|
327
327
|
}
|
|
328
328
|
case "stop": {
|
|
329
|
-
const { stopCommand } = await import("./lifecycle-
|
|
329
|
+
const { stopCommand } = await import("./lifecycle-0-9eT-gl.js");
|
|
330
330
|
return await stopCommand(io);
|
|
331
331
|
}
|
|
332
332
|
case "restart": {
|
|
333
|
-
const { restartCommand } = await import("./lifecycle-
|
|
333
|
+
const { restartCommand } = await import("./lifecycle-0-9eT-gl.js");
|
|
334
334
|
return await restartCommand(io);
|
|
335
335
|
}
|
|
336
336
|
case "tui": {
|
|
337
|
-
const { tuiCommand } = await import("./lifecycle-
|
|
337
|
+
const { tuiCommand } = await import("./lifecycle-0-9eT-gl.js");
|
|
338
338
|
return await tuiCommand(io);
|
|
339
339
|
}
|
|
340
340
|
case "unlock": {
|
|
341
|
-
const { unlockCommand } = await import("./unlock-
|
|
341
|
+
const { unlockCommand } = await import("./unlock-ik1568g3.js");
|
|
342
342
|
return await unlockCommand(io, {
|
|
343
343
|
force: parsed.force,
|
|
344
344
|
allowLive: parsed.allowLive,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as IpcError, n as resolveIpcAddress, t as ipcTokenPath } from "./address-
|
|
1
|
+
import { c as IpcError, n as resolveIpcAddress, t as ipcTokenPath } from "./address-B-gPq4hH.js";
|
|
2
2
|
import { readFile } from "node:fs/promises";
|
|
3
3
|
import { connect } from "node:net";
|
|
4
4
|
// src/ipc/client.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as expectedMigrationCount, i as inspectInstanceLock, l as loadConfig, t as inspectDatabase } from "./inspect-
|
|
1
|
+
import { f as expectedMigrationCount, i as inspectInstanceLock, l as loadConfig, t as inspectDatabase } from "./inspect-Dz79med6.js";
|
|
2
2
|
import { r as resolveDataDir, t as DATA_SUBDIRS } from "./paths-BhVn34MT.js";
|
|
3
3
|
import { n as SUPPORTED_NODE_RANGE, t as SERVER_VERSION } from "./version-ui_X8H2k.js";
|
|
4
4
|
import { constants } from "node:fs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as runDoctor } from "./doctor--QI8obs_.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { $ as canonicalDirectory, A as scanWatchPath, B as searchFiles, C as parseLog, D as snapshotOf, E as scopeStatusToPrefix, F as normalizeFilePath, G as editTextFile, H as DEFAULT_IGNORED, I as readEditableFile, J as listFiles, K as hashContent, L as readRawFile, M as encodeEditableContent, N as fileEntryVersion, O as validateGitPath, P as listDirectory, Q as PathGuardError, R as resolveFilePath, S as parseCommitFiles, T as runGit, U as FileError, V as writeUploadedFile, W as applyPatch, X as searchCode, Y as readTextFile, Z as writeTextFile, _ as errorResponse, _t as OutputRedactor, a as DeviceRevokeParamsSchema, at as stopCommandGroup, b as gitPrefix, c as IpcError, ct as processAlive, d as PairingApproveParamsSchema, dt as terminateProcessTree, et as isInsideRoot, f as PairingDenyParamsSchema, ft as windowsTcpListeners, g as ShutdownParamsSchema, gt as windowsPowerShell, h as SessionRevokeParamsSchema, ht as powerShellEncodedCommand, it as runCommand, j as FileManagerError, k as createDirectoryWatcher, l as LogsTailParamsSchema, lt as processCommandLine, m as RequestEnvelopeSchema, mt as powerShellArguments, n as resolveIpcAddress, o as HelloParamsSchema, ot as resolveWindowsExecutable, p as PairingListParamsSchema, pt as commandEnvironment, q as isIgnoredFile, r as AuditTailParamsSchema, rt as groupAlive, s as InitApplyParamsSchema, st as windowsLaunch, t as ipcTokenPath, tt as resolveInsideRoot, ut as processSnapshot$1, v as ManagedPty, w as parseStatus, x as parseBranches, y as GitError, z as saveEditableFile } from "./address-
|
|
2
|
-
import { $ as secrets, $n as normalizeCommandRequest, $t as DEFAULT_INPUT_TTL_MS, A as deploymentAuthorizations, An as DeploymentTargetRefSchema, At as TerminalInputSchema, B as modelCatalogCache, Bn as deriveWebAuthn, Bt as ProcessIdSchema, Cn as DeploymentAuthorizationContextSchema, Ct as ServiceRegisterInputSchema, D as credentialProfiles, Dn as DeploymentSpecSchema, Dt as TerminalCreateSchema, En as DeploymentSourceSchema, Et as TERMINAL_LEASE_TTL_MS, Fn as ServiceOpsSubscriptionSchema, Ft as TerminalResizeSchema, G as resourceActions, Gn as CommandOutputChunkSchema, Gt as MemoryKeySchema, H as modelProfiles, Ht as ProcessStatusSchema, I as inputRequests, In as hasControlCharacters, It as TerminalSubscriptionSchema, Jn as CommandRequestSchema, Jt as ReadMemoryInputSchema, Kn as CommandOutputQuerySchema, Kt as MemoryKindSchema, L as memories, Ln as AppConfigSchema, Lt as TerminalTakeoverSchema, M as deploymentPlans, Mn as ServiceActionScopeSchema, Mt as TerminalOutputChunkSchema, N as deploymentTargets, Nn as ServiceControlInputSchema, Nt as TerminalPayloadSchema, O as deploymentApprovals, On as DeploymentTargetIdSchema, Ot as TerminalDevSchema, P as deviceRequests, Pn as ServiceOpsEventPayloadSchema, Pt as TerminalRenameSchema, Qn as ShellCommandParamsSchema, Qt as AskUserParamsSchema, R as memoryRevisions, Rn as DEFAULT_APP_CONFIG, S as approvals, Sn as DeploymentArtifactManifestSchema, St as ServiceIdSchema, T as browserSessions, Tn as DeploymentPlanDocumentSchema, Tt as ServiceSubscriptionSchema, U as modelVisibility, Un as CommandCancelSchema, Ut as StartProcessParamsSchema, V as modelDefaults, Vn as COMMAND_OUTPUT_RETENTION_MS, Vt as ProcessOutputQuerySchema, W as projects, Wn as CommandIdSchema, Wt as PlanParamsSchema, X as scheduledJobRuns, Xn as CommandSubscriptionSchema, Xt as ScheduledJobInputSchema, Yn as CommandStatusPayloadSchema, Yt as RememberToolInputSchema, Z as scheduledJobs, Zt as ScheduledJobPatchSchema, _ as setMeta, _n as DEPLOYMENT_ARTIFACT_MAX_BYTES, _r as isAcceptedAttachmentName, _t as FileStreamIdSchema, an as GitActionSchema, ar as FileReadQuerySchema, at as sessionContextSummaries, b as WEB_SEARCH_REGIONS, bn as DEPLOYMENT_BUILD_LOG_MAX_BYTES, br as isSourceViewMime, bt as ResourceEventsQuerySchema, cn as GitCommitParamsSchema, cr as FileSaveSchema, d as appliedMigrationCount, dn as GitRemoteActionRequestSchema, dr as FileUploadResultSchema, dt as webSearchConnections, er as FileActionResultSchema, et as serviceActionAuthorizations, f as expectedMigrationCount, fn as WORKSPACE_JOBS_CHANGED, fr as FileVersionSchema, ft as webauthnChallenges, g as getMeta, gn as DEPLOYMENT_APPROVAL_TTL_MS, gr as MAX_UPLOAD_FILE_BYTES, gt as FileResyncPayloadSchema, h as ensureInstanceId, hn as DEFAULT_PROJECT_ID, ht as FileChangedPayloadSchema, in as GitActionDecisionSchema, ir as FileRawQuerySchema, it as sessionAttachments, j as deploymentBuilds, jn as ServiceActionAuthorizationDtoSchema, jt as TerminalLeaseSchema, k as deploymentArtifacts, kn as DeploymentTargetNameSchema, kt as TerminalIdSchema, l as loadConfig, ln as GitDiffQuerySchema, lr as FileScopeSchema, lt as trustedDevices, m as runMigrations, mn as WORKSPACE_SESSIONS_CHANGED, mr as MAX_DOWNLOAD_FILE_BYTES, mt as newId, nn as InputAnswersSchema, nr as FileListQuerySchema, nt as serviceOpsServices, o as releaseInstanceLock, on as GitBranchesQuerySchema, or as FileResultTargetSchema, ot as sessions, p as findServerRoot, pn as WORKSPACE_MEMORY_CHANGED, pt as webauthnCredentials, q as resourceLocks, qn as CommandParamsSchema, qt as MemoryStatusSchema, r as acquireInstanceLock, rn as MAX_INPUT_TTL_MS, rr as FilePathSchema, rt as services, s as recoverInitialization, sn as GitCommitDiffQuerySchema, sr as FileSaveResultSchema, tr as FileActionSchema, tt as serviceOpsDeployments, un as GitLogQuerySchema, ur as FileSearchQuerySchema, ut as turns, v as MODEL_PROVIDER_IDS, vn as DEPLOYMENT_ARTIFACT_MAX_FILES, vr as isBlockedAttachmentName, vt as FileSubscriptionSchema, w as authSettings, wn as DeploymentAuthorizationScopeSchema, wt as ServiceStatusSchema, x as agentEvents, xn as DEPLOYMENT_PLAN_TTL_MS, xt as ServiceEventPayloadSchema, y as WEB_SEARCH_PROVIDER_IDS, yr as isSecretAttachmentName, yt as RESOURCE_EVENT_RETENTION_MS, z as memorySuppressions, zn as OriginUrlSchema } from "./inspect-
|
|
3
|
-
import { $ as updateOperation, A as getResourceLockRow, B as rootIsQuarantined, C as commandRow, D as operationRow, E as oldCommands, F as rootHasWriter, G as deleteResourceActionsForProject, H as cacheFileVersion, I as updateResourceLockRow, J as insertOperation, K as findOperation, L as clearRootQuarantine, M as insertResourceLockRow, N as releaseResourceLockRow, O as unfinishedCommands, P as renewResourceLockRow, Q as resourceSequence, R as quarantineRoot, S as commandByOperation, T as insertCommand, U as deleteCachedFile, V as appendResourceEvent, W as deleteOperation, X as pruneResourceEvents, Y as pendingOperations, Z as readResourceEvents, _ as terminalByOperation, a as reconciledResultJson, b as updateTerminal, c as isFileOperationKind, d as deleteTerminal, et as immediateTransaction, f as insertTerminal, g as runningTerminalCounts, h as rootHasTerminal, i as lockOwnerIsActive, j as getResourceLockRowById, k as updateCommand, l as activeTerminals, m as oldTerminals, nt as listRecentAudit, o as retainedCount, p as leaseRow, q as getCachedFile, s as settleWriteBarriers, t as collectStatus, tt as appendAudit, u as allTerminals, v as terminalRow, w as deleteCommand, x as activeCommandClient, y as updateLease, z as quarantinedRoots } from "./status-
|
|
1
|
+
import { $ as canonicalDirectory, A as scanWatchPath, B as searchFiles, C as parseLog, D as snapshotOf, E as scopeStatusToPrefix, F as normalizeFilePath, G as editTextFile, H as DEFAULT_IGNORED, I as readEditableFile, J as listFiles, K as hashContent, L as readRawFile, M as encodeEditableContent, N as fileEntryVersion, O as validateGitPath, P as listDirectory, Q as PathGuardError, R as resolveFilePath, S as parseCommitFiles, T as runGit, U as FileError, V as writeUploadedFile, W as applyPatch, X as searchCode, Y as readTextFile, Z as writeTextFile, _ as errorResponse, _t as OutputRedactor, a as DeviceRevokeParamsSchema, at as stopCommandGroup, b as gitPrefix, c as IpcError, ct as processAlive, d as PairingApproveParamsSchema, dt as terminateProcessTree, et as isInsideRoot, f as PairingDenyParamsSchema, ft as windowsTcpListeners, g as ShutdownParamsSchema, gt as windowsPowerShell, h as SessionRevokeParamsSchema, ht as powerShellEncodedCommand, it as runCommand, j as FileManagerError, k as createDirectoryWatcher, l as LogsTailParamsSchema, lt as processCommandLine, m as RequestEnvelopeSchema, mt as powerShellArguments, n as resolveIpcAddress, o as HelloParamsSchema, ot as resolveWindowsExecutable, p as PairingListParamsSchema, pt as commandEnvironment, q as isIgnoredFile, r as AuditTailParamsSchema, rt as groupAlive, s as InitApplyParamsSchema, st as windowsLaunch, t as ipcTokenPath, tt as resolveInsideRoot, ut as processSnapshot$1, v as ManagedPty, w as parseStatus, x as parseBranches, y as GitError, z as saveEditableFile } from "./address-B-gPq4hH.js";
|
|
2
|
+
import { $ as secrets, $n as normalizeCommandRequest, $t as DEFAULT_INPUT_TTL_MS, A as deploymentAuthorizations, An as DeploymentTargetRefSchema, At as TerminalInputSchema, B as modelCatalogCache, Bn as deriveWebAuthn, Bt as ProcessIdSchema, Cn as DeploymentAuthorizationContextSchema, Ct as ServiceRegisterInputSchema, D as credentialProfiles, Dn as DeploymentSpecSchema, Dt as TerminalCreateSchema, En as DeploymentSourceSchema, Et as TERMINAL_LEASE_TTL_MS, Fn as ServiceOpsSubscriptionSchema, Ft as TerminalResizeSchema, G as resourceActions, Gn as CommandOutputChunkSchema, Gt as MemoryKeySchema, H as modelProfiles, Ht as ProcessStatusSchema, I as inputRequests, In as hasControlCharacters, It as TerminalSubscriptionSchema, Jn as CommandRequestSchema, Jt as ReadMemoryInputSchema, Kn as CommandOutputQuerySchema, Kt as MemoryKindSchema, L as memories, Ln as AppConfigSchema, Lt as TerminalTakeoverSchema, M as deploymentPlans, Mn as ServiceActionScopeSchema, Mt as TerminalOutputChunkSchema, N as deploymentTargets, Nn as ServiceControlInputSchema, Nt as TerminalPayloadSchema, O as deploymentApprovals, On as DeploymentTargetIdSchema, Ot as TerminalDevSchema, P as deviceRequests, Pn as ServiceOpsEventPayloadSchema, Pt as TerminalRenameSchema, Qn as ShellCommandParamsSchema, Qt as AskUserParamsSchema, R as memoryRevisions, Rn as DEFAULT_APP_CONFIG, S as approvals, Sn as DeploymentArtifactManifestSchema, St as ServiceIdSchema, T as browserSessions, Tn as DeploymentPlanDocumentSchema, Tt as ServiceSubscriptionSchema, U as modelVisibility, Un as CommandCancelSchema, Ut as StartProcessParamsSchema, V as modelDefaults, Vn as COMMAND_OUTPUT_RETENTION_MS, Vt as ProcessOutputQuerySchema, W as projects, Wn as CommandIdSchema, Wt as PlanParamsSchema, X as scheduledJobRuns, Xn as CommandSubscriptionSchema, Xt as ScheduledJobInputSchema, Yn as CommandStatusPayloadSchema, Yt as RememberToolInputSchema, Z as scheduledJobs, Zt as ScheduledJobPatchSchema, _ as setMeta, _n as DEPLOYMENT_ARTIFACT_MAX_BYTES, _r as isAcceptedAttachmentName, _t as FileStreamIdSchema, an as GitActionSchema, ar as FileReadQuerySchema, at as sessionContextSummaries, b as WEB_SEARCH_REGIONS, bn as DEPLOYMENT_BUILD_LOG_MAX_BYTES, br as isSourceViewMime, bt as ResourceEventsQuerySchema, cn as GitCommitParamsSchema, cr as FileSaveSchema, d as appliedMigrationCount, dn as GitRemoteActionRequestSchema, dr as FileUploadResultSchema, dt as webSearchConnections, er as FileActionResultSchema, et as serviceActionAuthorizations, f as expectedMigrationCount, fn as WORKSPACE_JOBS_CHANGED, fr as FileVersionSchema, ft as webauthnChallenges, g as getMeta, gn as DEPLOYMENT_APPROVAL_TTL_MS, gr as MAX_UPLOAD_FILE_BYTES, gt as FileResyncPayloadSchema, h as ensureInstanceId, hn as DEFAULT_PROJECT_ID, ht as FileChangedPayloadSchema, in as GitActionDecisionSchema, ir as FileRawQuerySchema, it as sessionAttachments, j as deploymentBuilds, jn as ServiceActionAuthorizationDtoSchema, jt as TerminalLeaseSchema, k as deploymentArtifacts, kn as DeploymentTargetNameSchema, kt as TerminalIdSchema, l as loadConfig, ln as GitDiffQuerySchema, lr as FileScopeSchema, lt as trustedDevices, m as runMigrations, mn as WORKSPACE_SESSIONS_CHANGED, mr as MAX_DOWNLOAD_FILE_BYTES, mt as newId, nn as InputAnswersSchema, nr as FileListQuerySchema, nt as serviceOpsServices, o as releaseInstanceLock, on as GitBranchesQuerySchema, or as FileResultTargetSchema, ot as sessions, p as findServerRoot, pn as WORKSPACE_MEMORY_CHANGED, pt as webauthnCredentials, q as resourceLocks, qn as CommandParamsSchema, qt as MemoryStatusSchema, r as acquireInstanceLock, rn as MAX_INPUT_TTL_MS, rr as FilePathSchema, rt as services, s as recoverInitialization, sn as GitCommitDiffQuerySchema, sr as FileSaveResultSchema, tr as FileActionSchema, tt as serviceOpsDeployments, un as GitLogQuerySchema, ur as FileSearchQuerySchema, ut as turns, v as MODEL_PROVIDER_IDS, vn as DEPLOYMENT_ARTIFACT_MAX_FILES, vr as isBlockedAttachmentName, vt as FileSubscriptionSchema, w as authSettings, wn as DeploymentAuthorizationScopeSchema, wt as ServiceStatusSchema, x as agentEvents, xn as DEPLOYMENT_PLAN_TTL_MS, xt as ServiceEventPayloadSchema, y as WEB_SEARCH_PROVIDER_IDS, yr as isSecretAttachmentName, yt as RESOURCE_EVENT_RETENTION_MS, z as memorySuppressions, zn as OriginUrlSchema } from "./inspect-Dz79med6.js";
|
|
3
|
+
import { $ as updateOperation, A as getResourceLockRow, B as rootIsQuarantined, C as commandRow, D as operationRow, E as oldCommands, F as rootHasWriter, G as deleteResourceActionsForProject, H as cacheFileVersion, I as updateResourceLockRow, J as insertOperation, K as findOperation, L as clearRootQuarantine, M as insertResourceLockRow, N as releaseResourceLockRow, O as unfinishedCommands, P as renewResourceLockRow, Q as resourceSequence, R as quarantineRoot, S as commandByOperation, T as insertCommand, U as deleteCachedFile, V as appendResourceEvent, W as deleteOperation, X as pruneResourceEvents, Y as pendingOperations, Z as readResourceEvents, _ as terminalByOperation, a as reconciledResultJson, b as updateTerminal, c as isFileOperationKind, d as deleteTerminal, et as immediateTransaction, f as insertTerminal, g as runningTerminalCounts, h as rootHasTerminal, i as lockOwnerIsActive, j as getResourceLockRowById, k as updateCommand, l as activeTerminals, m as oldTerminals, nt as listRecentAudit, o as retainedCount, p as leaseRow, q as getCachedFile, s as settleWriteBarriers, t as collectStatus, tt as appendAudit, u as allTerminals, v as terminalRow, w as deleteCommand, x as activeCommandClient, y as updateLease, z as quarantinedRoots } from "./status-Bv7nxvzW.js";
|
|
4
4
|
import { t as SERVER_VERSION } from "./version-ui_X8H2k.js";
|
|
5
5
|
import { a as generatePairingCode, n as PAIRING_CODE_TTL_MS, o as generateShortCode, r as PAIRING_REQUEST_TTL_MS, s as normalizePairingCode, t as ENROLLMENT_TTL_MS } from "./code-B2JBoV4x.js";
|
|
6
|
-
import { f as isDevPath, l as HMR_PATH, n as receiveDevWebTarget, o as DevWebTargetSchema, p as permittedPath, t as managedWebFiles, u as NONCE_MARKER } from "./managed-
|
|
7
|
-
import { t as openDatabase } from "./client-
|
|
8
|
-
import { t as runDoctor } from "./doctor
|
|
6
|
+
import { f as isDevPath, l as HMR_PATH, n as receiveDevWebTarget, o as DevWebTargetSchema, p as permittedPath, t as managedWebFiles, u as NONCE_MARKER } from "./managed-FpQ4FjRh.js";
|
|
7
|
+
import { t as openDatabase } from "./client-nSfUt-Xw.js";
|
|
8
|
+
import { t as runDoctor } from "./doctor--QI8obs_.js";
|
|
9
9
|
import { t as findMainLogFile } from "./log-files-CFOaEy6O.js";
|
|
10
10
|
import { n as ensureDataDirs, r as resolveDataDir } from "./paths-BhVn34MT.js";
|
|
11
11
|
import { createRequire } from "node:module";
|
|
@@ -48,6 +48,25 @@ import websocket from "@fastify/websocket";
|
|
|
48
48
|
import { CronExpressionParser } from "cron-parser";
|
|
49
49
|
import { parse } from "node:querystring";
|
|
50
50
|
import pino from "pino";
|
|
51
|
+
// src/bootstrap/entry.ts
|
|
52
|
+
/**
|
|
53
|
+
* Finishes the entry process after a graceful shutdown. The shutdown promise
|
|
54
|
+
* only resolves after resources, the instance lock and the logger are done, so
|
|
55
|
+
* exiting here does not wait for third-party handles that may keep the event
|
|
56
|
+
* loop alive.
|
|
57
|
+
*/
|
|
58
|
+
async function completeShutdown(options) {
|
|
59
|
+
try {
|
|
60
|
+
await options.shutdown;
|
|
61
|
+
} catch {
|
|
62
|
+
options.onError?.();
|
|
63
|
+
options.disconnect?.();
|
|
64
|
+
options.exit(1);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
options.disconnect?.();
|
|
68
|
+
options.exit(0);
|
|
69
|
+
}
|
|
51
70
|
// ../../packages/agent/src/kernel/profile.ts
|
|
52
71
|
function profileToolNames(catalog, profile) {
|
|
53
72
|
const entry = catalog.profiles[profile];
|
|
@@ -8856,6 +8875,7 @@ async function getDirectory(options, scope, input) {
|
|
|
8856
8875
|
await authorizeFileTarget(resolved, input.path);
|
|
8857
8876
|
const result = await listDirectory(resolved.root, {
|
|
8858
8877
|
...input,
|
|
8878
|
+
includeIgnored: input.showIgnored === true,
|
|
8859
8879
|
ignore: resolved.ignore,
|
|
8860
8880
|
exclude: "projectId" in resolved.scope ? (target) => isInsideRoot(resolved.protectedRoot, target) : void 0
|
|
8861
8881
|
});
|
|
@@ -20287,6 +20307,44 @@ function getChallenge(db, id) {
|
|
|
20287
20307
|
function consumeChallenge(db, id, now = Date.now()) {
|
|
20288
20308
|
return db.update(webauthnChallenges).set({ consumedAt: now }).where(and(eq(webauthnChallenges.id, id), isNull(webauthnChallenges.consumedAt))).run().changes > 0;
|
|
20289
20309
|
}
|
|
20310
|
+
// src/webauthn/identity.ts
|
|
20311
|
+
const DISPLAY_LABEL_MAX = 40;
|
|
20312
|
+
const SLUG_MAX = 32;
|
|
20313
|
+
const SUFFIX_LENGTH = 4;
|
|
20314
|
+
const FALLBACK_SLUG = "larness";
|
|
20315
|
+
const FALLBACK_LABEL = "Larness";
|
|
20316
|
+
function sha256Hex(value) {
|
|
20317
|
+
return createHash("sha256").update(value, "utf8").digest("hex");
|
|
20318
|
+
}
|
|
20319
|
+
/** First four hex characters of sha256(instance_id). */
|
|
20320
|
+
function instanceSuffix(instanceId) {
|
|
20321
|
+
return sha256Hex(instanceId).slice(0, SUFFIX_LENGTH);
|
|
20322
|
+
}
|
|
20323
|
+
/**
|
|
20324
|
+
* Folds a normalized hostname into an ASCII slug. Hostnames are already
|
|
20325
|
+
* normalized by `serverHostInfo`; anything else becomes `-` so the name stays
|
|
20326
|
+
* readable in system password managers that dislike punctuation.
|
|
20327
|
+
*/
|
|
20328
|
+
function hostnameSlug(hostname) {
|
|
20329
|
+
const slug = Array.from(hostname).map((character) => /^[a-z0-9]$/i.test(character) ? character.toLowerCase() : "-").join("").replace(/-+/g, "-").replace(/^-+|-+$/g, "").slice(0, SLUG_MAX).replace(/-+$/, "");
|
|
20330
|
+
return slug.length === 0 ? FALLBACK_SLUG : slug;
|
|
20331
|
+
}
|
|
20332
|
+
/**
|
|
20333
|
+
* Derives the WebAuthn user entity for this workspace. The name only affects
|
|
20334
|
+
* what the authenticator displays; authorization still keys off the credential
|
|
20335
|
+
* ID, RP ID and origin.
|
|
20336
|
+
*/
|
|
20337
|
+
function passkeyUserIdentity(input) {
|
|
20338
|
+
const suffix = instanceSuffix(input.instanceId);
|
|
20339
|
+
const label = Array.from(input.hostname).slice(0, DISPLAY_LABEL_MAX).join("").trim() || FALLBACK_LABEL;
|
|
20340
|
+
return {
|
|
20341
|
+
userId: Uint8Array.from(createHash("sha256").update(input.instanceId, "utf8").digest()),
|
|
20342
|
+
userName: `operator@${hostnameSlug(input.hostname)}-${suffix}`,
|
|
20343
|
+
userDisplayName: `Larness · ${label} · ${suffix}`,
|
|
20344
|
+
label,
|
|
20345
|
+
suffix
|
|
20346
|
+
};
|
|
20347
|
+
}
|
|
20290
20348
|
// src/webauthn/service.ts
|
|
20291
20349
|
const CHALLENGE_TTL_MS = 3e5;
|
|
20292
20350
|
var DeviceAdminError = class extends Error {
|
|
@@ -20345,14 +20403,17 @@ async function registrationOptions(options, input) {
|
|
|
20345
20403
|
assertCanonicalOrigin(options.webAuthn, input.origin);
|
|
20346
20404
|
const now = nowOf(options);
|
|
20347
20405
|
const enrollment = requireEnrollment(options, input.enrollmentToken, now);
|
|
20348
|
-
const
|
|
20406
|
+
const identity = passkeyUserIdentity({
|
|
20407
|
+
instanceId: getMeta(options.db, "instance_id") ?? "larness-instance",
|
|
20408
|
+
hostname: serverHostInfo(options.hostname === void 0 ? {} : { hostname: options.hostname }).hostname
|
|
20409
|
+
});
|
|
20349
20410
|
const challenge = generateOpaqueToken();
|
|
20350
20411
|
const optionsJSON = await generateRegistrationOptions({
|
|
20351
20412
|
rpName: options.webAuthn.rpName,
|
|
20352
20413
|
rpID: options.webAuthn.rpId,
|
|
20353
|
-
userID:
|
|
20354
|
-
userName:
|
|
20355
|
-
userDisplayName:
|
|
20414
|
+
userID: identity.userId,
|
|
20415
|
+
userName: identity.userName,
|
|
20416
|
+
userDisplayName: identity.userDisplayName,
|
|
20356
20417
|
attestationType: "none",
|
|
20357
20418
|
authenticatorSelection: {
|
|
20358
20419
|
residentKey: "required",
|
|
@@ -38982,6 +39043,16 @@ async function startServer(options = {}) {
|
|
|
38982
39043
|
}
|
|
38983
39044
|
}
|
|
38984
39045
|
// src/index.ts
|
|
39046
|
+
function finishShutdown(running, reason) {
|
|
39047
|
+
return completeShutdown({
|
|
39048
|
+
shutdown: running.shutdown(reason),
|
|
39049
|
+
disconnect: () => {
|
|
39050
|
+
if (process.connected) process.disconnect();
|
|
39051
|
+
},
|
|
39052
|
+
exit: (code) => process.exit(code),
|
|
39053
|
+
onError: () => console.error("[larness] shutdown failed")
|
|
39054
|
+
});
|
|
39055
|
+
}
|
|
38985
39056
|
async function main() {
|
|
38986
39057
|
const managedDev = process.argv.includes("--managed-dev-web");
|
|
38987
39058
|
let running = null;
|
|
@@ -38990,12 +39061,7 @@ async function main() {
|
|
|
38990
39061
|
const stop = (signal) => {
|
|
38991
39062
|
stopping ??= signal;
|
|
38992
39063
|
abort.abort();
|
|
38993
|
-
if (running) running
|
|
38994
|
-
if (process.connected) process.disconnect();
|
|
38995
|
-
}).catch(() => {
|
|
38996
|
-
console.error("[larness] shutdown failed");
|
|
38997
|
-
process.exitCode = 1;
|
|
38998
|
-
});
|
|
39064
|
+
if (running) finishShutdown(running, signal);
|
|
38999
39065
|
};
|
|
39000
39066
|
process.once("SIGINT", () => stop("SIGINT"));
|
|
39001
39067
|
process.once("SIGTERM", () => stop("SIGTERM"));
|
|
@@ -39009,8 +39075,7 @@ async function main() {
|
|
|
39009
39075
|
abort.signal.throwIfAborted();
|
|
39010
39076
|
running = await startServer(target ? { devWeb: target } : {});
|
|
39011
39077
|
if (stopping) {
|
|
39012
|
-
await running
|
|
39013
|
-
if (process.connected) process.disconnect();
|
|
39078
|
+
await finishShutdown(running, stopping);
|
|
39014
39079
|
return;
|
|
39015
39080
|
}
|
|
39016
39081
|
if (target) process.send?.({
|
|
@@ -345,7 +345,12 @@ const FileReadQuerySchema = z.union([
|
|
|
345
345
|
const FileListQuerySchema = z.object({
|
|
346
346
|
path: FilePathSchema.default("."),
|
|
347
347
|
limit: z.coerce.number().int().min(1).max(200).default(50),
|
|
348
|
-
cursor: z.string().min(1).max(2048).optional()
|
|
348
|
+
cursor: z.string().min(1).max(2048).optional(),
|
|
349
|
+
/**
|
|
350
|
+
* Web 文件树的「显示忽略项」开关。只影响目录枚举;Agent 工具与快速打开
|
|
351
|
+
* 始终使用默认忽略(specs/140)。
|
|
352
|
+
*/
|
|
353
|
+
showIgnored: z.enum(["true", "false"]).default("false").transform((value) => value === "true")
|
|
349
354
|
}).strict();
|
|
350
355
|
const FileSaveResultSchema = z.object({
|
|
351
356
|
path: z.string(),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as isProcessAlive, i as inspectInstanceLock, p as findServerRoot } from "./inspect-
|
|
2
|
-
import { t as ipcTokenPath } from "./address-
|
|
3
|
-
import { n as connectIpc } from "./client-
|
|
1
|
+
import { a as isProcessAlive, i as inspectInstanceLock, p as findServerRoot } from "./inspect-Dz79med6.js";
|
|
2
|
+
import { t as ipcTokenPath } from "./address-B-gPq4hH.js";
|
|
3
|
+
import { n as connectIpc } from "./client-DmQOZ_VJ.js";
|
|
4
4
|
import { r as resolveDataDir } from "./paths-BhVn34MT.js";
|
|
5
|
-
import { t as loadManagedConfig } from "./supervisor-
|
|
5
|
+
import { t as loadManagedConfig } from "./supervisor-eW8XSzXm.js";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
7
7
|
import { existsSync } from "node:fs";
|
|
8
8
|
import path from "node:path";
|
|
@@ -179,7 +179,7 @@ async function startCommand(io, options = {}) {
|
|
|
179
179
|
if (barriers !== null && barriers.retained > 0) io.stdout(`[larness] ${barriers.retained} write barrier(s) cannot be proven orphaned; run \`larness unlock\`\n`);
|
|
180
180
|
return 0;
|
|
181
181
|
}
|
|
182
|
-
async function stopCommand(io) {
|
|
182
|
+
async function stopCommand(io, options = {}) {
|
|
183
183
|
const dataDir = resolveDataDir(io.env);
|
|
184
184
|
const lock = await inspectInstanceLock(dataDir);
|
|
185
185
|
if (lock === null) {
|
|
@@ -191,18 +191,28 @@ async function stopCommand(io) {
|
|
|
191
191
|
return 0;
|
|
192
192
|
}
|
|
193
193
|
const pid = lock.record?.pid ?? null;
|
|
194
|
-
if (!await requestShutdown(dataDir)) {
|
|
194
|
+
if (!await (options.requestShutdown ?? requestShutdown)(dataDir)) {
|
|
195
195
|
io.stderr("[larness] the server is running but its IPC endpoint is unreachable.\n");
|
|
196
196
|
io.stderr(`[larness] pid ${pid ?? "unknown"}; data ${dataDir}\n`);
|
|
197
197
|
io.stderr("[larness] no signal was sent and the lock was left untouched.\n");
|
|
198
198
|
return 1;
|
|
199
199
|
}
|
|
200
|
+
const isAlive = options.isAlive ?? isProcessAlive;
|
|
201
|
+
const selfPid = options.selfPid ?? process.pid;
|
|
202
|
+
const timeoutMs = options.stopTimeoutMs ?? STOP_TIMEOUT_MS;
|
|
200
203
|
if (!await waitUntil(async () => {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
204
|
+
if ((await inspectInstanceLock(dataDir))?.alive === true) return false;
|
|
205
|
+
if (pid === null || pid === selfPid) return true;
|
|
206
|
+
return !isAlive(pid);
|
|
207
|
+
}, timeoutMs)) {
|
|
208
|
+
if ((await inspectInstanceLock(dataDir))?.alive !== true) {
|
|
209
|
+
io.stderr(`[larness] the server released its lock but pid ${pid ?? "unknown"} is still running.\n`);
|
|
210
|
+
io.stderr("[larness] end that process manually before upgrading or starting another.\n");
|
|
211
|
+
io.stderr("[larness] no signal was sent.\n");
|
|
212
|
+
} else {
|
|
213
|
+
io.stderr(`[larness] the server did not stop within ${timeoutMs / 1e3}s.\n`);
|
|
214
|
+
io.stderr(`[larness] pid ${pid ?? "unknown"}; it may still be running.\n`);
|
|
215
|
+
}
|
|
206
216
|
return 1;
|
|
207
217
|
}
|
|
208
218
|
io.stdout("[larness] management server stopped.\n");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as auditLogs, E as commandExecutions, F as fileVersions, G as resourceActions, J as resourceOperations, K as resourceEvents, T as browserSessions, Y as resourceStreams, ct as terminals, i as inspectInstanceLock, l as loadConfig, mt as newId, q as resourceLocks, st as terminalLeases, t as inspectDatabase, ut as turns } from "./inspect-
|
|
2
|
-
import { ct as processAlive, et as isInsideRoot, rt as groupAlive } from "./address-
|
|
1
|
+
import { C as auditLogs, E as commandExecutions, F as fileVersions, G as resourceActions, J as resourceOperations, K as resourceEvents, T as browserSessions, Y as resourceStreams, ct as terminals, i as inspectInstanceLock, l as loadConfig, mt as newId, q as resourceLocks, st as terminalLeases, t as inspectDatabase, ut as turns } from "./inspect-Dz79med6.js";
|
|
2
|
+
import { ct as processAlive, et as isInsideRoot, rt as groupAlive } from "./address-B-gPq4hH.js";
|
|
3
3
|
import { t as SERVER_VERSION } from "./version-ui_X8H2k.js";
|
|
4
4
|
import { r as resolveDataDir } from "./paths-BhVn34MT.js";
|
|
5
5
|
import { t as findMainLogFile } from "./log-files-CFOaEy6O.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as connectIpc } from "./client-
|
|
2
|
-
import { r as inspectBarriersFile, t as collectStatus } from "./status-
|
|
1
|
+
import { n as connectIpc } from "./client-DmQOZ_VJ.js";
|
|
2
|
+
import { r as inspectBarriersFile, t as collectStatus } from "./status-Bv7nxvzW.js";
|
|
3
3
|
import { r as resolveDataDir } from "./paths-BhVn34MT.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as completeStatus, n as readBarrierSummary, r as readStatus } from "./status-
|
|
1
|
+
export { t as completeStatus, n as readBarrierSummary, r as readStatus } from "./status-E5SdreUc.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { dt as terminateProcessTree } from "./address-
|
|
2
|
-
import { c as configFilePath, l as loadConfig, n as inspectPendingInitialization, p as findServerRoot, u as resolveConfig } from "./inspect-
|
|
3
|
-
import { a as DevWebControl, c as EntryConfigError, d as devWebCache, i as DevWebAttachedSchema, r as waitChildMessage } from "./managed-
|
|
1
|
+
import { dt as terminateProcessTree } from "./address-B-gPq4hH.js";
|
|
2
|
+
import { c as configFilePath, l as loadConfig, n as inspectPendingInitialization, p as findServerRoot, u as resolveConfig } from "./inspect-Dz79med6.js";
|
|
3
|
+
import { a as DevWebControl, c as EntryConfigError, d as devWebCache, i as DevWebAttachedSchema, r as waitChildMessage } from "./managed-FpQ4FjRh.js";
|
|
4
4
|
import { r as resolveDataDir } from "./paths-BhVn34MT.js";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
import { randomUUID } from "node:crypto";
|
package/apps/server/dist/tui.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Bn as deriveWebAuthn, Rn as DEFAULT_APP_CONFIG, i as inspectInstanceLock } from "./inspect-
|
|
2
|
-
import { c as EntryConfigError, s as DevWebUnavailable } from "./managed-
|
|
3
|
-
import { n as connectIpc, t as IpcClientError } from "./client-
|
|
1
|
+
import { Bn as deriveWebAuthn, Rn as DEFAULT_APP_CONFIG, i as inspectInstanceLock } from "./inspect-Dz79med6.js";
|
|
2
|
+
import { c as EntryConfigError, s as DevWebUnavailable } from "./managed-FpQ4FjRh.js";
|
|
3
|
+
import { n as connectIpc, t as IpcClientError } from "./client-DmQOZ_VJ.js";
|
|
4
4
|
import { r as resolveDataDir } from "./paths-BhVn34MT.js";
|
|
5
5
|
import { t as SERVER_VERSION } from "./version-ui_X8H2k.js";
|
|
6
|
-
import { s as InitApplyParamsSchema } from "./address-
|
|
6
|
+
import { s as InitApplyParamsSchema } from "./address-B-gPq4hH.js";
|
|
7
7
|
import { i as formatPairingCode } from "./code-B2JBoV4x.js";
|
|
8
|
-
import { n as startManagedRuntime } from "./supervisor-
|
|
8
|
+
import { n as startManagedRuntime } from "./supervisor-eW8XSzXm.js";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import { z } from "zod";
|
|
11
11
|
import { stripVTControlCharacters } from "node:util";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { i as inspectInstanceLock } from "./inspect-
|
|
2
|
-
import { t as openDatabase } from "./client-
|
|
3
|
-
import { n as barrierReasonLabel, s as settleWriteBarriers } from "./status-
|
|
1
|
+
import { i as inspectInstanceLock } from "./inspect-Dz79med6.js";
|
|
2
|
+
import { t as openDatabase } from "./client-nSfUt-Xw.js";
|
|
3
|
+
import { n as barrierReasonLabel, s as settleWriteBarriers } from "./status-Bv7nxvzW.js";
|
|
4
4
|
import { r as resolveDataDir } from "./paths-BhVn34MT.js";
|
|
5
|
-
import { n as readBarrierSummary } from "./status-
|
|
5
|
+
import { n as readBarrierSummary } from "./status-E5SdreUc.js";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
// src/cli/unlock.ts
|
|
8
8
|
function databasePath(dataDir) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./monaco-
|
|
1
|
+
import{n as e}from"./monaco-b438wjl8.js";import{f as t,p as n}from"./editor.api-B-Hf6DWT.js";import{i as r,n as i,o as a,r as o}from"./main-B0YUBq2Q.js";var s=a(r(),1),c=o();function l({identity:t,path:n,text:r,original:a,readOnly:o,onChange:s}){let{resolved:l}=i(),d=n.endsWith(`.json`)?`json`:n.endsWith(`.md`)?`markdown`:/\.[cm]?tsx?$/.test(n)?`typescript`:/\.[cm]?jsx?$/.test(n)?`javascript`:n.endsWith(`.css`)?`css`:`plaintext`,p={readOnly:o,editContext:!1,automaticLayout:!0,minimap:{enabled:!1},fontSize:12,scrollBeyondLastLine:!1,ariaLabel:`文件内容`},m=l===`dark`?`vs-dark`:`light`,h=r.startsWith(``)?``:``;return a===void 0?(0,c.jsx)(e,{height:`100%`,path:u(t),keepCurrentModel:!0,language:d,value:r.slice(h.length),theme:m,options:p,onChange:e=>{e!==void 0&&h+e!==r&&s(h+e)}}):(0,c.jsx)(f,{original:a,modified:r,language:d,theme:m})}function u(e){return`larness-file:${encodeURIComponent(e)}`}function d(e){n.getModel(t.parse(u(e)))?.dispose()}function f({original:e,modified:t,language:r,theme:i}){let a=(0,s.useRef)(null);return(0,s.useEffect)(()=>{if(!a.current)return;let o=n.createModel(e,r),s=n.createModel(t,r),c=n.createDiffEditor(a.current,{readOnly:!0,originalEditable:!1,automaticLayout:!0,minimap:{enabled:!1},fontSize:12,renderSideBySide:!0});return n.setTheme(i),c.setModel({original:o,modified:s}),()=>{c.setModel(null),c.dispose(),o.dispose(),s.dispose()}},[e,t,r,i]),(0,c.jsx)(`section`,{ref:a,className:`h-full w-full`,"aria-label":`磁盘与草稿差异`})}export{l as default,d as disposeFileModel,u as fileModelPath};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./monaco-
|
|
1
|
+
import{n as e}from"./monaco-b438wjl8.js";import{n as t,r as n}from"./main-B0YUBq2Q.js";var r=n();function i({doc:n}){let{resolved:i}=t();return(0,r.jsx)(e,{height:`100%`,path:n.path,defaultLanguage:n.language,value:n.content,theme:i===`dark`?`vs-dark`:`light`,options:{readOnly:!0,domReadOnly:!0,automaticLayout:!0,minimap:{enabled:!1},fontSize:12,lineHeight:19,fontFamily:`ui-monospace, SFMono-Regular, Menlo, Consolas, monospace`,padding:{top:12,bottom:12},scrollBeyondLastLine:!1,renderLineHighlight:`none`,wordWrap:`off`,smoothScrolling:!0,overviewRulerLanes:0,hideCursorInOverviewRuler:!0,scrollbar:{verticalScrollbarSize:9,horizontalScrollbarSize:9}}})}export{i as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./workers-
|
|
1
|
+
import{t as e}from"./workers-D6L1Qkzp.js";import{_ as t,a as n,c as r,d as i,f as a,g as o,h as s,i as c,l,m as u,n as d,o as f,p,r as m,s as h,t as g,u as _,v}from"./lspLanguageFeatures-BqS1Q85I.js";import{m as y}from"./editor.api-B-Hf6DWT.js";var b=12e4,x=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){this._worker&&Date.now()-this._lastUsedTime>b&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||=(this._worker=e({moduleId:`vs/language/css/cssWorker`,createWorker:()=>new Worker(new URL(`/assets/css.worker-C5TGqYcS.js`,``+import.meta.url),{type:`module`}),label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then(e=>{t=e}).then(t=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(e=>t)}};function S(e){let t=[],o=[],s=new x(e);t.push(s);let h=(...e)=>s.getLanguageServiceWorker(...e);function v(){let{languageId:t,modeConfiguration:s}=e;w(o),s.completionItems&&o.push(y.registerCompletionItemProvider(t,new g(h,[`/`,`-`,`:`]))),s.hovers&&o.push(y.registerHoverProvider(t,new i(h))),s.documentHighlights&&o.push(y.registerDocumentHighlightProvider(t,new f(h))),s.definitions&&o.push(y.registerDefinitionProvider(t,new d(h))),s.references&&o.push(y.registerReferenceProvider(t,new a(h))),s.documentSymbols&&o.push(y.registerDocumentSymbolProvider(t,new l(h))),s.rename&&o.push(y.registerRenameProvider(t,new p(h))),s.colors&&o.push(y.registerColorProvider(t,new c(h))),s.foldingRanges&&o.push(y.registerFoldingRangeProvider(t,new _(h))),s.diagnostics&&o.push(new m(t,h,e.onDidChange)),s.selectionRanges&&o.push(y.registerSelectionRangeProvider(t,new u(h))),s.documentFormattingEdits&&o.push(y.registerDocumentFormattingEditProvider(t,new n(h))),s.documentRangeFormattingEdits&&o.push(y.registerDocumentRangeFormattingEditProvider(t,new r(h)))}return v(),t.push(C(o)),C(t)}function C(e){return{dispose:()=>w(e)}}function w(e){for(;e.length;)e.pop().dispose()}export{g as CompletionAdapter,d as DefinitionAdapter,m as DiagnosticsAdapter,c as DocumentColorAdapter,n as DocumentFormattingEditProvider,f as DocumentHighlightAdapter,h as DocumentLinkAdapter,r as DocumentRangeFormattingEditProvider,l as DocumentSymbolAdapter,_ as FoldingRangeAdapter,i as HoverAdapter,a as ReferenceAdapter,p as RenameAdapter,u as SelectionRangeAdapter,x as WorkerManager,s as fromPosition,o as fromRange,S as setupMode,t as toRange,v as toTextEdit};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./index-
|
|
1
|
+
import{t as e}from"./index-BcXxWUCA.js";function t(){return globalThis._VSCODE_NLS_MESSAGES}function n(){return globalThis._VSCODE_NLS_LANGUAGE}var r=n()===`pseudo`||typeof document<`u`&&document.location&&typeof document.location.hash==`string`&&document.location.hash.indexOf(`pseudo=true`)>=0;function i(e,t){let n;return n=t.length===0?e:e.replace(/\{(\d+)\}/g,(e,n)=>{let r=t[parseInt(n,10)],i=e;return typeof r==`string`?i=r:(typeof r==`number`||typeof r==`boolean`||r==null)&&(i=String(r)),i}),r&&(n=`[`+n.replace(/[aouei]/g,`$&$&`)+`]`),n}function a(e,t,...n){return i(typeof e==`number`?o(e,t):t,n)}function o(e,n){let r=t()?.[e];if(typeof r!=`string`){if(typeof n==`string`)return n;throw Error(`!!! NLS MISSING: ${e} !!!`)}return r}function s(e,t,...n){let r;r=typeof e==`number`?o(e,t):t;let a=i(r,n);return{value:a,original:t===r?a:i(t,n)}}function c(e,t){let n=e;typeof n.vscodeWindowId!=`number`&&Object.defineProperty(n,"vscodeWindowId",{get:()=>t})}var l=window,u,d=(class e{constructor(){this.mapWindowIdToZoomFactor=new Map}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}getWindowId(e){return e.vscodeWindowId}static#e=u=()=>(this.INSTANCE=new e,this)},u());function f(e,t,n){typeof t==`string`&&(t=e.matchMedia(t)),t.addEventListener(`change`,n)}function p(e){return d.INSTANCE.getZoomFactor(e)}var m=navigator.userAgent,h=m.indexOf(`Firefox`)>=0,g=m.indexOf(`AppleWebKit`)>=0,_=m.indexOf(`Chrome`)>=0,v=!_&&m.indexOf(`Safari`)>=0,y=!_&&!v&&g;m.indexOf(`Electron/`);var b=m.indexOf(`Android`)>=0,x=!1;if(typeof l.matchMedia==`function`){let e=l.matchMedia(`(display-mode: standalone) or (display-mode: window-controls-overlay)`),t=l.matchMedia(`(display-mode: fullscreen)`);x=e.matches,f(l,e,({matches:e})=>{x&&t.matches||(x=e)})}function S(){return globalThis.MonacoEnvironment}var C=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?le.isErrorNoTelemetry(e)?new le(e.message+`
|
|
2
2
|
|
|
3
3
|
`+e.stack):Error(e.message+`
|
|
4
4
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{m as e}from"./editor.api-
|
|
1
|
+
import{m as e}from"./editor.api-B-Hf6DWT.js";var t=[`assign`,`flush`,`ftl`,`return`,`global`,`import`,`include`,`break`,`continue`,`local`,`nested`,`nt`,`setting`,`stop`,`t`,`lt`,`rt`,`fallback`],n=[`attempt`,`autoesc`,`autoEsc`,`compress`,`comment`,`escape`,`noescape`,`function`,`if`,`list`,`items`,`sep`,`macro`,`noparse`,`noParse`,`noautoesc`,`noAutoEsc`,`outputformat`,`switch`,`visit`,`recurse`],r={close:`>`,id:`angle`,open:`<`},i={close:`\\]`,id:`bracket`,open:`\\[`},a={close:`[>\\]]`,id:`auto`,open:`[<\\[]`},o={close:`\\}`,id:`dollar`,open1:`\\$`,open2:`\\{`},s={close:`\\]`,id:`bracket`,open1:`\\[`,open2:`=`};function c(r){return{brackets:[[`<`,`>`],[`[`,`]`],[`(`,`)`],[`{`,`}`]],comments:{blockComment:[`${r.open}--`,`--${r.close}`]},autoCloseBefore:`
|
|
2
2
|
\r }]),.:;=`,autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`,notIn:[`string`]},{open:`'`,close:`'`,notIn:[`string`]}],surroundingPairs:[{open:`"`,close:`"`},{open:`'`,close:`'`},{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`<`,close:`>`}],folding:{markers:{start:RegExp(`${r.open}#(?:${n.join(`|`)})([^/${r.close}]*(?!/)${r.close})[^${r.open}]*$`),end:RegExp(`${r.open}/#(?:${n.join(`|`)})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:RegExp(`${r.open}#(?!(?:${t.join(`|`)}))([a-zA-Z_]+)([^/${r.close}]*(?!/)${r.close})[^${r.open}]*$`),afterText:RegExp(`^${r.open}/#([a-zA-Z_]+)[\\r\\n\\t ]*${r.close}$`),action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`${r.open}#(?!(?:${t.join(`|`)}))([a-zA-Z_]+)([^/${r.close}]*(?!/)${r.close})[^${r.open}]*$`),action:{indentAction:e.IndentAction.Indent}}]}}function l(){return{brackets:[[`<`,`>`],[`[`,`]`],[`(`,`)`],[`{`,`}`]],autoCloseBefore:`
|
|
3
3
|
\r }]),.:;=`,autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`,notIn:[`string`]},{open:`'`,close:`'`,notIn:[`string`]}],surroundingPairs:[{open:`"`,close:`"`},{open:`'`,close:`'`},{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`<`,close:`>`}],folding:{markers:{start:RegExp(`[<\\[]#(?:${n.join(`|`)})([^/>\\]]*(?!/)[>\\]])[^<\\[]*$`),end:RegExp(`[<\\[]/#(?:${n.join(`|`)})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:RegExp(`[<\\[]#(?!(?:${t.join(`|`)}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),afterText:RegExp(`^[<\\[]/#([a-zA-Z_]+)[\\r\\n\\t ]*[>\\]]$`),action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`[<\\[]#(?!(?:${t.join(`|`)}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),action:{indentAction:e.IndentAction.Indent}}]}}function u(e,t){let n=`_${e.id}_${t.id}`,r=e=>e.replace(/__id__/g,n),i=e=>{let t=e.source.replace(/__id__/g,n);return new RegExp(t,e.flags)};return{unicode:!0,includeLF:!1,start:r(`default__id__`),ignoreCase:!1,defaultToken:`invalid`,tokenPostfix:`.freemarker2`,brackets:[{open:`{`,close:`}`,token:`delimiter.curly`},{open:`[`,close:`]`,token:`delimiter.square`},{open:`(`,close:`)`,token:`delimiter.parenthesis`},{open:`<`,close:`>`,token:`delimiter.angle`}],[r(`open__id__`)]:new RegExp(e.open),[r(`close__id__`)]:new RegExp(e.close),[r(`iOpen1__id__`)]:new RegExp(t.open1),[r(`iOpen2__id__`)]:new RegExp(t.open2),[r(`iClose__id__`)]:new RegExp(t.close),[r(`startTag__id__`)]:i(/(@open__id__)(#)/),[r(`endTag__id__`)]:i(/(@open__id__)(\/#)/),[r(`startOrEndTag__id__`)]:i(/(@open__id__)(\/?#)/),[r(`closeTag1__id__`)]:i(/((?:@blank)*)(@close__id__)/),[r(`closeTag2__id__`)]:i(/((?:@blank)*\/?)(@close__id__)/),blank:/[ \t\n\r]/,keywords:[`false`,`true`,`in`,`as`,`using`],directiveStartCloseTag1:/attempt|recover|sep|auto[eE]sc|no(?:autoe|AutoE)sc|compress|default|no[eE]scape|comment|no[pP]arse/,directiveStartCloseTag2:/else|break|continue|return|stop|flush|t|lt|rt|nt|nested|recurse|fallback|ftl/,directiveStartBlank:/if|else[iI]f|list|for[eE]ach|switch|case|assign|global|local|include|import|function|macro|transform|visit|stop|return|call|setting|output[fF]ormat|nested|recurse|escape|ftl|items/,directiveEndCloseTag1:/if|list|items|sep|recover|attempt|for[eE]ach|local|global|assign|function|macro|output[fF]ormat|auto[eE]sc|no(?:autoe|AutoE)sc|compress|transform|switch|escape|no[eE]scape/,escapedChar:/\\(?:[ntrfbgla\\'"\{=]|(?:x[0-9A-Fa-f]{1,4}))/,asciiDigit:/[0-9]/,integer:/[0-9]+/,nonEscapedIdStartChar:/[\$@-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u1FFF\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183-\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3006\u3031-\u3035\u303B-\u303C\u3040-\u318F\u31A0-\u31BA\u31F0-\u31FF\u3300-\u337F\u3400-\u4DB5\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,escapedIdChar:/\\[\-\.:#]/,idStartChar:/(?:@nonEscapedIdStartChar)|(?:@escapedIdChar)/,id:/(?:@idStartChar)(?:(?:@idStartChar)|(?:@asciiDigit))*/,specialHashKeys:/\*\*|\*|false|true|in|as|using/,namedSymbols:/<=|>=|\\lte|\\lt|<|\\gte|\\gt|>|&&|\\and|->|->|==|!=|\+=|-=|\*=|\/=|%=|\+\+|--|<=|&&|\|\||:|\.\.\.|\.\.\*|\.\.<|\.\.!|\?\?|=|<|\+|-|\*|\/|%|\||\.\.|\?|!|&|\.|,|;/,arrows:[`->`,`->`],delimiters:[`;`,`:`,`,`,`.`],stringOperators:[`lte`,`lt`,`gte`,`gt`],noParseTags:[`noparse`,`noParse`,`comment`],tokenizer:{[r(`default__id__`)]:[{include:r(`@directive_token__id__`)},{include:r(`@interpolation_and_text_token__id__`)}],[r(`fmExpression__id__.directive`)]:[{include:r(`@blank_and_expression_comment_token__id__`)},{include:r(`@directive_end_token__id__`)},{include:r(`@expression_token__id__`)}],[r(`fmExpression__id__.interpolation`)]:[{include:r(`@blank_and_expression_comment_token__id__`)},{include:r(`@expression_token__id__`)},{include:r(`@greater_operators_token__id__`)}],[r(`inParen__id__.plain`)]:[{include:r(`@blank_and_expression_comment_token__id__`)},{include:r(`@directive_end_token__id__`)},{include:r(`@expression_token__id__`)}],[r(`inParen__id__.gt`)]:[{include:r(`@blank_and_expression_comment_token__id__`)},{include:r(`@expression_token__id__`)},{include:r(`@greater_operators_token__id__`)}],[r(`noSpaceExpression__id__`)]:[{include:r(`@no_space_expression_end_token__id__`)},{include:r(`@directive_end_token__id__`)},{include:r(`@expression_token__id__`)}],[r(`unifiedCall__id__`)]:[{include:r(`@unified_call_token__id__`)}],[r(`singleString__id__`)]:[{include:r(`@string_single_token__id__`)}],[r(`doubleString__id__`)]:[{include:r(`@string_double_token__id__`)}],[r(`rawSingleString__id__`)]:[{include:r(`@string_single_raw_token__id__`)}],[r(`rawDoubleString__id__`)]:[{include:r(`@string_double_raw_token__id__`)}],[r(`expressionComment__id__`)]:[{include:r(`@expression_comment_token__id__`)}],[r(`noParse__id__`)]:[{include:r(`@no_parse_token__id__`)}],[r(`terseComment__id__`)]:[{include:r(`@terse_comment_token__id__`)}],[r(`directive_token__id__`)]:[[i(/(?:@startTag__id__)(@directiveStartCloseTag1)(?:@closeTag1__id__)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{cases:{"@noParseTags":{token:`tag`,next:r(`@noParse__id__.$3`)},"@default":{token:`tag`}}},{token:`delimiter.directive`},{token:`@brackets.directive`}]],[i(/(?:@startTag__id__)(@directiveStartCloseTag2)(?:@closeTag2__id__)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:`delimiter.directive`},{token:`@brackets.directive`}]],[i(/(?:@startTag__id__)(@directiveStartBlank)(@blank)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:``,next:r(`@fmExpression__id__.directive`)}]],[i(/(?:@endTag__id__)(@directiveEndCloseTag1)(?:@closeTag1__id__)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:`delimiter.directive`},{token:`@brackets.directive`}]],[i(/(@open__id__)(@)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`,next:r(`@unifiedCall__id__`)}]],[i(/(@open__id__)(\/@)((?:(?:@id)(?:\.(?:@id))*)?)(?:@closeTag1__id__)/),[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:`delimiter.directive`},{token:`@brackets.directive`}]],[i(/(@open__id__)#--/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:{token:`comment`,next:r(`@terseComment__id__`)}],[i(/(?:@startOrEndTag__id__)([a-zA-Z_]+)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag.invalid`,next:r(`@fmExpression__id__.directive`)}]]],[r(`interpolation_and_text_token__id__`)]:[[i(/(@iOpen1__id__)(@iOpen2__id__)/),[{token:t.id===`bracket`?`@brackets.interpolation`:`delimiter.interpolation`},{token:t.id===`bracket`?`delimiter.interpolation`:`@brackets.interpolation`,next:r(`@fmExpression__id__.interpolation`)}]],[/[\$#<\[\{]|(?:@blank)+|[^\$<#\[\{\n\r\t ]+/,{token:`source`}]],[r(`string_single_token__id__`)]:[[/[^'\\]/,{token:`string`}],[/@escapedChar/,{token:`string.escape`}],[/'/,{token:`string`,next:`@pop`}]],[r(`string_double_token__id__`)]:[[/[^"\\]/,{token:`string`}],[/@escapedChar/,{token:`string.escape`}],[/"/,{token:`string`,next:`@pop`}]],[r(`string_single_raw_token__id__`)]:[[/[^']+/,{token:`string.raw`}],[/'/,{token:`string.raw`,next:`@pop`}]],[r(`string_double_raw_token__id__`)]:[[/[^"]+/,{token:`string.raw`}],[/"/,{token:`string.raw`,next:`@pop`}]],[r(`expression_token__id__`)]:[[/(r?)(['"])/,{cases:{"r'":[{token:`keyword`},{token:`string.raw`,next:r(`@rawSingleString__id__`)}],'r"':[{token:`keyword`},{token:`string.raw`,next:r(`@rawDoubleString__id__`)}],"'":[{token:`source`},{token:`string`,next:r(`@singleString__id__`)}],'"':[{token:`source`},{token:`string`,next:r(`@doubleString__id__`)}]}}],[/(?:@integer)(?:\.(?:@integer))?/,{cases:{"(?:@integer)":{token:`number`},"@default":{token:`number.float`}}}],[/(\.)(@blank*)(@specialHashKeys)/,[{token:`delimiter`},{token:``},{token:`identifier`}]],[/(?:@namedSymbols)/,{cases:{"@arrows":{token:`meta.arrow`},"@delimiters":{token:`delimiter`},"@default":{token:`operators`}}}],[/@id/,{cases:{"@keywords":{token:`keyword.$0`},"@stringOperators":{token:`operators`},"@default":{token:`identifier`}}}],[/[\[\]\(\)\{\}]/,{cases:{"\\[":{cases:{"$S2==gt":{token:`@brackets`,next:r(`@inParen__id__.gt`)},"@default":{token:`@brackets`,next:r(`@inParen__id__.plain`)}}},"\\]":{cases:{...t.id===`bracket`?{"$S2==interpolation":{token:`@brackets.interpolation`,next:`@popall`}}:{},...e.id===`bracket`?{"$S2==directive":{token:`@brackets.directive`,next:`@popall`}}:{},[r(`$S1==inParen__id__`)]:{token:`@brackets`,next:`@pop`},"@default":{token:`@brackets`}}},"\\(":{token:`@brackets`,next:r(`@inParen__id__.gt`)},"\\)":{cases:{[r(`$S1==inParen__id__`)]:{token:`@brackets`,next:`@pop`},"@default":{token:`@brackets`}}},"\\{":{cases:{"$S2==gt":{token:`@brackets`,next:r(`@inParen__id__.gt`)},"@default":{token:`@brackets`,next:r(`@inParen__id__.plain`)}}},"\\}":{cases:{...t.id===`bracket`?{}:{"$S2==interpolation":{token:`@brackets.interpolation`,next:`@popall`}},[r(`$S1==inParen__id__`)]:{token:`@brackets`,next:`@pop`},"@default":{token:`@brackets`}}}}}],[/\$\{/,{token:`delimiter.invalid`}]],[r(`blank_and_expression_comment_token__id__`)]:[[/(?:@blank)+/,{token:``}],[/[<\[][#!]--/,{token:`comment`,next:r(`@expressionComment__id__`)}]],[r(`directive_end_token__id__`)]:[[/>/,e.id===`bracket`?{token:`operators`}:{token:`@brackets.directive`,next:`@popall`}],[i(/(\/)(@close__id__)/),[{token:`delimiter.directive`},{token:`@brackets.directive`,next:`@popall`}]]],[r(`greater_operators_token__id__`)]:[[/>/,{token:`operators`}],[/>=/,{token:`operators`}]],[r(`no_space_expression_end_token__id__`)]:[[/(?:@blank)+/,{token:``,switchTo:r(`@fmExpression__id__.directive`)}]],[r(`unified_call_token__id__`)]:[[/(@id)((?:@blank)+)/,[{token:`tag`},{token:``,next:r(`@fmExpression__id__.directive`)}]],[i(/(@id)(\/?)(@close__id__)/),[{token:`tag`},{token:`delimiter.directive`},{token:`@brackets.directive`,next:`@popall`}]],[/./,{token:`@rematch`,next:r(`@noSpaceExpression__id__`)}]],[r(`no_parse_token__id__`)]:[[i(/(@open__id__)(\/#?)([a-zA-Z]+)((?:@blank)*)(@close__id__)/),{cases:{"$S2==$3":[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:``},{token:`@brackets.directive`,next:`@popall`}],"$S2==comment":[{token:`comment`},{token:`comment`},{token:`comment`},{token:`comment`},{token:`comment`}],"@default":[{token:`source`},{token:`source`},{token:`source`},{token:`source`},{token:`source`}]}}],[/[^<\[\-]+|[<\[\-]/,{cases:{"$S2==comment":{token:`comment`},"@default":{token:`source`}}}]],[r(`expression_comment_token__id__`)]:[[/--[>\]]/,{token:`comment`,next:`@pop`}],[/[^\->\]]+|[>\]\-]/,{token:`comment`}]],[r(`terse_comment_token__id__`)]:[[i(/--(?:@close__id__)/),{token:`comment`,next:`@popall`}],[/[^<\[\-]+|[<\[\-]/,{token:`comment`}]]}}}function d(e){let t=u(r,e),n=u(i,e),o=u(a,e);return{...t,...n,...o,unicode:!0,includeLF:!1,start:`default_auto_${e.id}`,ignoreCase:!1,defaultToken:`invalid`,tokenPostfix:`.freemarker2`,brackets:[{open:`{`,close:`}`,token:`delimiter.curly`},{open:`[`,close:`]`,token:`delimiter.square`},{open:`(`,close:`)`,token:`delimiter.parenthesis`},{open:`<`,close:`>`,token:`delimiter.angle`}],tokenizer:{...t.tokenizer,...n.tokenizer,...o.tokenizer}}}var f={conf:c(r),language:u(r,o)},p={conf:c(i),language:u(i,o)},m={conf:c(r),language:u(r,s)},h={conf:c(i),language:u(i,s)},g={conf:l(),language:d(o)},_={conf:l(),language:d(s)};export{m as TagAngleInterpolationBracket,f as TagAngleInterpolationDollar,_ as TagAutoInterpolationBracket,g as TagAutoInterpolationDollar,h as TagBracketInterpolationBracket,p as TagBracketInterpolationDollar};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e}from"./editor.api-
|
|
1
|
+
import{m as e}from"./editor.api-B-Hf6DWT.js";var t=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`menuitem`,`meta`,`param`,`source`,`track`,`wbr`],n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[`{{!--`,`--}}`]},brackets:[[`<!--`,`-->`],[`<`,`>`],[`{{`,`}}`],[`{`,`}`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`<`,close:`>`},{open:`"`,close:`"`},{open:`'`,close:`'`}],onEnterRules:[{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:e.IndentAction.Indent}}]},r={defaultToken:``,tokenPostfix:``,tokenizer:{root:[[/\{\{!--/,`comment.block.start.handlebars`,`@commentBlock`],[/\{\{!/,`comment.start.handlebars`,`@comment`],[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.root`}],[/<!DOCTYPE/,`metatag.html`,`@doctype`],[/<!--/,`comment.html`,`@commentHtml`],[/(<)(\w+)(\/>)/,[`delimiter.html`,`tag.html`,`delimiter.html`]],[/(<)(script)/,[`delimiter.html`,{token:`tag.html`,next:`@script`}]],[/(<)(style)/,[`delimiter.html`,{token:`tag.html`,next:`@style`}]],[/(<)([:\w]+)/,[`delimiter.html`,{token:`tag.html`,next:`@otherTag`}]],[/(<\/)(\w+)/,[`delimiter.html`,{token:`tag.html`,next:`@otherTag`}]],[/</,`delimiter.html`],[/\{/,`delimiter.html`],[/[^<{]+/]],doctype:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.comment`}],[/[^>]+/,`metatag.content.html`],[/>/,`metatag.html`,`@pop`]],comment:[[/\}\}/,`comment.end.handlebars`,`@pop`],[/./,`comment.content.handlebars`]],commentBlock:[[/--\}\}/,`comment.block.end.handlebars`,`@pop`],[/./,`comment.content.handlebars`]],commentHtml:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.comment`}],[/-->/,`comment.html`,`@pop`],[/[^-]+/,`comment.content.html`],[/./,`comment.content.html`]],otherTag:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.otherTag`}],[/\/?>/,`delimiter.html`,`@pop`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.script`}],[/type/,`attribute.name`,`@scriptAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,[`delimiter.html`,`tag.html`,{token:`delimiter.html`,next:`@pop`}]]],scriptAfterType:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.scriptAfterType`}],[/=/,`delimiter`,`@scriptAfterTypeEquals`],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptAfterTypeEquals:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.scriptAfterTypeEquals`}],[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptWithCustomType:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.scriptWithCustomType.$S2`}],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptEmbedded:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInEmbeddedState.scriptEmbedded.$S2`,nextEmbedded:`@pop`}],[/<\/script/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}]],style:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.style`}],[/type/,`attribute.name`,`@styleAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,[`delimiter.html`,`tag.html`,{token:`delimiter.html`,next:`@pop`}]]],styleAfterType:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.styleAfterType`}],[/=/,`delimiter`,`@styleAfterTypeEquals`],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleAfterTypeEquals:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.styleAfterTypeEquals`}],[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleWithCustomType:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.styleWithCustomType.$S2`}],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleEmbedded:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInEmbeddedState.styleEmbedded.$S2`,nextEmbedded:`@pop`}],[/<\/style/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}]],handlebarsInSimpleState:[[/\{\{\{?/,`delimiter.handlebars`],[/\}\}\}?/,{token:`delimiter.handlebars`,switchTo:`@$S2.$S3`}],{include:`handlebarsRoot`}],handlebarsInEmbeddedState:[[/\{\{\{?/,`delimiter.handlebars`],[/\}\}\}?/,{token:`delimiter.handlebars`,switchTo:`@$S2.$S3`,nextEmbedded:`$S3`}],{include:`handlebarsRoot`}],handlebarsRoot:[[/"[^"]*"/,`string.handlebars`],[/[#/][^\s}]+/,`keyword.helper.handlebars`],[/else\b/,`keyword.helper.handlebars`],[/[\s]+/],[/[^}]/,`variable.parameter.handlebars`]]}};export{n as conf,r as language};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e}from"./editor.api-
|
|
1
|
+
import{m as e}from"./editor.api-B-Hf6DWT.js";var t=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`menuitem`,`meta`,`param`,`source`,`track`,`wbr`],n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[`<!--`,`-->`]},brackets:[[`<!--`,`-->`],[`<`,`>`],[`{`,`}`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`"`,close:`"`},{open:`'`,close:`'`},{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`<`,close:`>`}],onEnterRules:[{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:e.IndentAction.Indent}}],folding:{markers:{start:RegExp(`^\\s*<!--\\s*#region\\b.*-->`),end:RegExp(`^\\s*<!--\\s*#endregion\\b.*-->`)}}},r={defaultToken:``,tokenPostfix:`.html`,ignoreCase:!0,tokenizer:{root:[[/<!DOCTYPE/,`metatag`,`@doctype`],[/<!--/,`comment`,`@comment`],[/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/,[`delimiter`,`tag`,``,`delimiter`]],[/(<)(script)/,[`delimiter`,{token:`tag`,next:`@script`}]],[/(<)(style)/,[`delimiter`,{token:`tag`,next:`@style`}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,[`delimiter`,{token:`tag`,next:`@otherTag`}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,[`delimiter`,{token:`tag`,next:`@otherTag`}]],[/</,`delimiter`],[/[^<]+/]],doctype:[[/[^>]+/,`metatag.content`],[/>/,`metatag`,`@pop`]],comment:[[/-->/,`comment`,`@pop`],[/[^-]+/,`comment.content`],[/./,`comment.content`]],otherTag:[[/\/?>/,`delimiter`,`@pop`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/]],script:[[/type/,`attribute.name`,`@scriptAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,[`delimiter`,`tag`,{token:`delimiter`,next:`@pop`}]]],scriptAfterType:[[/=/,`delimiter`,`@scriptAfterTypeEquals`],[/>/,{token:`delimiter`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptAfterTypeEquals:[[/"module"/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.text/javascript`}],[/'module'/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.text/javascript`}],[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/>/,{token:`delimiter`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptWithCustomType:[[/>/,{token:`delimiter`,next:`@scriptEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptEmbedded:[[/<\/script/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}],[/[^<]+/,``]],style:[[/type/,`attribute.name`,`@styleAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,[`delimiter`,`tag`,{token:`delimiter`,next:`@pop`}]]],styleAfterType:[[/=/,`delimiter`,`@styleAfterTypeEquals`],[/>/,{token:`delimiter`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/>/,{token:`delimiter`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleWithCustomType:[[/>/,{token:`delimiter`,next:`@styleEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleEmbedded:[[/<\/style/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}],[/[^<]+/,``]]}};export{n as conf,r as language};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./workers-
|
|
1
|
+
import{t as e}from"./workers-D6L1Qkzp.js";import{_ as t,a as n,c as r,d as i,f as a,g as o,h as s,i as c,l,m as u,n as d,o as f,p,r as m,s as h,t as g,u as _,v}from"./lspLanguageFeatures-BqS1Q85I.js";import{m as y}from"./editor.api-B-Hf6DWT.js";var b=12e4,x=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){this._worker&&Date.now()-this._lastUsedTime>b&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||=(this._worker=e({moduleId:`vs/language/html/htmlWorker`,createWorker:()=>new Worker(new URL(`/assets/html.worker-DthhmbAk.js`,``+import.meta.url),{type:`module`}),createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then(e=>{t=e}).then(t=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(e=>t)}},S=class extends g{constructor(e){super(e,[`.`,`:`,`<`,`"`,`=`,`/`])}};function C(e){let t=new x(e),a=(...e)=>t.getLanguageServiceWorker(...e),o=e.languageId;y.registerCompletionItemProvider(o,new S(a)),y.registerHoverProvider(o,new i(a)),y.registerDocumentHighlightProvider(o,new f(a)),y.registerLinkProvider(o,new h(a)),y.registerFoldingRangeProvider(o,new _(a)),y.registerDocumentSymbolProvider(o,new l(a)),y.registerSelectionRangeProvider(o,new u(a)),y.registerRenameProvider(o,new p(a)),o===`html`&&(y.registerDocumentFormattingEditProvider(o,new n(a)),y.registerDocumentRangeFormattingEditProvider(o,new r(a)))}function w(e){let t=[],a=[],o=new x(e);t.push(o);let s=(...e)=>o.getLanguageServiceWorker(...e);function c(){let{languageId:t,modeConfiguration:o}=e;E(a),o.completionItems&&a.push(y.registerCompletionItemProvider(t,new S(s))),o.hovers&&a.push(y.registerHoverProvider(t,new i(s))),o.documentHighlights&&a.push(y.registerDocumentHighlightProvider(t,new f(s))),o.links&&a.push(y.registerLinkProvider(t,new h(s))),o.documentSymbols&&a.push(y.registerDocumentSymbolProvider(t,new l(s))),o.rename&&a.push(y.registerRenameProvider(t,new p(s))),o.foldingRanges&&a.push(y.registerFoldingRangeProvider(t,new _(s))),o.selectionRanges&&a.push(y.registerSelectionRangeProvider(t,new u(s))),o.documentFormattingEdits&&a.push(y.registerDocumentFormattingEditProvider(t,new n(s))),o.documentRangeFormattingEdits&&a.push(y.registerDocumentRangeFormattingEditProvider(t,new r(s)))}return c(),t.push(T(a)),T(t)}function T(e){return{dispose:()=>E(e)}}function E(e){for(;e.length;)e.pop().dispose()}export{g as CompletionAdapter,d as DefinitionAdapter,m as DiagnosticsAdapter,c as DocumentColorAdapter,n as DocumentFormattingEditProvider,f as DocumentHighlightAdapter,h as DocumentLinkAdapter,r as DocumentRangeFormattingEditProvider,l as DocumentSymbolAdapter,_ as FoldingRangeAdapter,i as HoverAdapter,a as ReferenceAdapter,p as RenameAdapter,u as SelectionRangeAdapter,x as WorkerManager,s as fromPosition,o as fromRange,w as setupMode,C as setupMode1,t as toRange,v as toTextEdit};
|