@inkeep/agents-cli 0.0.0-dev-20251125083010 → 0.0.0-dev-20251125085423
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +829 -752
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -568,9 +568,9 @@ var init_logger = __esm({
|
|
|
568
568
|
/**
|
|
569
569
|
* Remove a transport by index
|
|
570
570
|
*/
|
|
571
|
-
removeTransport(
|
|
572
|
-
if (
|
|
573
|
-
this.transportConfigs.splice(
|
|
571
|
+
removeTransport(index3) {
|
|
572
|
+
if (index3 >= 0 && index3 < this.transportConfigs.length) {
|
|
573
|
+
this.transportConfigs.splice(index3, 1);
|
|
574
574
|
this.recreateInstance();
|
|
575
575
|
}
|
|
576
576
|
}
|
|
@@ -1243,8 +1243,8 @@ var init_body = __esm({
|
|
|
1243
1243
|
handleParsingNestedValues = (form, key, value) => {
|
|
1244
1244
|
let nestedForm = form;
|
|
1245
1245
|
const keys = key.split(".");
|
|
1246
|
-
keys.forEach((key2,
|
|
1247
|
-
if (
|
|
1246
|
+
keys.forEach((key2, index3) => {
|
|
1247
|
+
if (index3 === keys.length - 1) {
|
|
1248
1248
|
nestedForm[key2] = value;
|
|
1249
1249
|
} else {
|
|
1250
1250
|
if (!nestedForm[key2] || typeof nestedForm[key2] !== "object" || Array.isArray(nestedForm[key2]) || nestedForm[key2] instanceof File) {
|
|
@@ -1572,8 +1572,9 @@ var init_dist4 = __esm({
|
|
|
1572
1572
|
});
|
|
1573
1573
|
|
|
1574
1574
|
// ../packages/agents-core/src/auth/auth-schema.ts
|
|
1575
|
-
import {
|
|
1576
|
-
|
|
1575
|
+
import { relations } from "drizzle-orm";
|
|
1576
|
+
import { boolean, index, pgTable, text, timestamp } from "drizzle-orm/pg-core";
|
|
1577
|
+
var user, session, account, verification, ssoProvider, organization, member, invitation, userRelations, sessionRelations, accountRelations, ssoProviderRelations, organizationRelations, memberRelations, invitationRelations;
|
|
1577
1578
|
var init_auth_schema = __esm({
|
|
1578
1579
|
"../packages/agents-core/src/auth/auth-schema.ts"() {
|
|
1579
1580
|
"use strict";
|
|
@@ -1587,40 +1588,52 @@ var init_auth_schema = __esm({
|
|
|
1587
1588
|
createdAt: timestamp("created_at").defaultNow().notNull(),
|
|
1588
1589
|
updatedAt: timestamp("updated_at").defaultNow().$onUpdate(() => /* @__PURE__ */ new Date()).notNull()
|
|
1589
1590
|
});
|
|
1590
|
-
session = pgTable(
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1591
|
+
session = pgTable(
|
|
1592
|
+
"session",
|
|
1593
|
+
{
|
|
1594
|
+
id: text("id").primaryKey(),
|
|
1595
|
+
expiresAt: timestamp("expires_at").notNull(),
|
|
1596
|
+
token: text("token").notNull().unique(),
|
|
1597
|
+
createdAt: timestamp("created_at").defaultNow().notNull(),
|
|
1598
|
+
updatedAt: timestamp("updated_at").$onUpdate(() => /* @__PURE__ */ new Date()).notNull(),
|
|
1599
|
+
ipAddress: text("ip_address"),
|
|
1600
|
+
userAgent: text("user_agent"),
|
|
1601
|
+
userId: text("user_id").notNull().references(() => user.id, { onDelete: "cascade" }),
|
|
1602
|
+
activeOrganizationId: text("active_organization_id")
|
|
1603
|
+
},
|
|
1604
|
+
(table) => [index("session_userId_idx").on(table.userId)]
|
|
1605
|
+
);
|
|
1606
|
+
account = pgTable(
|
|
1607
|
+
"account",
|
|
1608
|
+
{
|
|
1609
|
+
id: text("id").primaryKey(),
|
|
1610
|
+
accountId: text("account_id").notNull(),
|
|
1611
|
+
providerId: text("provider_id").notNull(),
|
|
1612
|
+
userId: text("user_id").notNull().references(() => user.id, { onDelete: "cascade" }),
|
|
1613
|
+
accessToken: text("access_token"),
|
|
1614
|
+
refreshToken: text("refresh_token"),
|
|
1615
|
+
idToken: text("id_token"),
|
|
1616
|
+
accessTokenExpiresAt: timestamp("access_token_expires_at"),
|
|
1617
|
+
refreshTokenExpiresAt: timestamp("refresh_token_expires_at"),
|
|
1618
|
+
scope: text("scope"),
|
|
1619
|
+
password: text("password"),
|
|
1620
|
+
createdAt: timestamp("created_at").defaultNow().notNull(),
|
|
1621
|
+
updatedAt: timestamp("updated_at").$onUpdate(() => /* @__PURE__ */ new Date()).notNull()
|
|
1622
|
+
},
|
|
1623
|
+
(table) => [index("account_userId_idx").on(table.userId)]
|
|
1624
|
+
);
|
|
1625
|
+
verification = pgTable(
|
|
1626
|
+
"verification",
|
|
1627
|
+
{
|
|
1628
|
+
id: text("id").primaryKey(),
|
|
1629
|
+
identifier: text("identifier").notNull(),
|
|
1630
|
+
value: text("value").notNull(),
|
|
1631
|
+
expiresAt: timestamp("expires_at").notNull(),
|
|
1632
|
+
createdAt: timestamp("created_at").defaultNow().notNull(),
|
|
1633
|
+
updatedAt: timestamp("updated_at").defaultNow().$onUpdate(() => /* @__PURE__ */ new Date()).notNull()
|
|
1634
|
+
},
|
|
1635
|
+
(table) => [index("verification_identifier_idx").on(table.identifier)]
|
|
1636
|
+
);
|
|
1624
1637
|
ssoProvider = pgTable("sso_provider", {
|
|
1625
1638
|
id: text("id").primaryKey(),
|
|
1626
1639
|
issuer: text("issuer").notNull(),
|
|
@@ -1639,30 +1652,94 @@ var init_auth_schema = __esm({
|
|
|
1639
1652
|
createdAt: timestamp("created_at").notNull(),
|
|
1640
1653
|
metadata: text("metadata")
|
|
1641
1654
|
});
|
|
1642
|
-
member = pgTable(
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1655
|
+
member = pgTable(
|
|
1656
|
+
"member",
|
|
1657
|
+
{
|
|
1658
|
+
id: text("id").primaryKey(),
|
|
1659
|
+
organizationId: text("organization_id").notNull().references(() => organization.id, { onDelete: "cascade" }),
|
|
1660
|
+
userId: text("user_id").notNull().references(() => user.id, { onDelete: "cascade" }),
|
|
1661
|
+
role: text("role").default("member").notNull(),
|
|
1662
|
+
createdAt: timestamp("created_at").notNull()
|
|
1663
|
+
},
|
|
1664
|
+
(table) => [
|
|
1665
|
+
index("member_organizationId_idx").on(table.organizationId),
|
|
1666
|
+
index("member_userId_idx").on(table.userId)
|
|
1667
|
+
]
|
|
1668
|
+
);
|
|
1669
|
+
invitation = pgTable(
|
|
1670
|
+
"invitation",
|
|
1671
|
+
{
|
|
1672
|
+
id: text("id").primaryKey(),
|
|
1673
|
+
organizationId: text("organization_id").notNull().references(() => organization.id, { onDelete: "cascade" }),
|
|
1674
|
+
email: text("email").notNull(),
|
|
1675
|
+
role: text("role"),
|
|
1676
|
+
status: text("status").default("pending").notNull(),
|
|
1677
|
+
expiresAt: timestamp("expires_at").notNull(),
|
|
1678
|
+
createdAt: timestamp("created_at").defaultNow().notNull(),
|
|
1679
|
+
inviterId: text("inviter_id").notNull().references(() => user.id, { onDelete: "cascade" })
|
|
1680
|
+
},
|
|
1681
|
+
(table) => [
|
|
1682
|
+
index("invitation_organizationId_idx").on(table.organizationId),
|
|
1683
|
+
index("invitation_email_idx").on(table.email)
|
|
1684
|
+
]
|
|
1685
|
+
);
|
|
1686
|
+
userRelations = relations(user, ({ many }) => ({
|
|
1687
|
+
sessions: many(session),
|
|
1688
|
+
accounts: many(account),
|
|
1689
|
+
ssoProviders: many(ssoProvider),
|
|
1690
|
+
members: many(member),
|
|
1691
|
+
invitations: many(invitation)
|
|
1692
|
+
}));
|
|
1693
|
+
sessionRelations = relations(session, ({ one }) => ({
|
|
1694
|
+
user: one(user, {
|
|
1695
|
+
fields: [session.userId],
|
|
1696
|
+
references: [user.id]
|
|
1697
|
+
})
|
|
1698
|
+
}));
|
|
1699
|
+
accountRelations = relations(account, ({ one }) => ({
|
|
1700
|
+
user: one(user, {
|
|
1701
|
+
fields: [account.userId],
|
|
1702
|
+
references: [user.id]
|
|
1703
|
+
})
|
|
1704
|
+
}));
|
|
1705
|
+
ssoProviderRelations = relations(ssoProvider, ({ one }) => ({
|
|
1706
|
+
user: one(user, {
|
|
1707
|
+
fields: [ssoProvider.userId],
|
|
1708
|
+
references: [user.id]
|
|
1709
|
+
})
|
|
1710
|
+
}));
|
|
1711
|
+
organizationRelations = relations(organization, ({ many }) => ({
|
|
1712
|
+
members: many(member),
|
|
1713
|
+
invitations: many(invitation)
|
|
1714
|
+
}));
|
|
1715
|
+
memberRelations = relations(member, ({ one }) => ({
|
|
1716
|
+
organization: one(organization, {
|
|
1717
|
+
fields: [member.organizationId],
|
|
1718
|
+
references: [organization.id]
|
|
1719
|
+
}),
|
|
1720
|
+
user: one(user, {
|
|
1721
|
+
fields: [member.userId],
|
|
1722
|
+
references: [user.id]
|
|
1723
|
+
})
|
|
1724
|
+
}));
|
|
1725
|
+
invitationRelations = relations(invitation, ({ one }) => ({
|
|
1726
|
+
organization: one(organization, {
|
|
1727
|
+
fields: [invitation.organizationId],
|
|
1728
|
+
references: [organization.id]
|
|
1729
|
+
}),
|
|
1730
|
+
user: one(user, {
|
|
1731
|
+
fields: [invitation.inviterId],
|
|
1732
|
+
references: [user.id]
|
|
1733
|
+
})
|
|
1734
|
+
}));
|
|
1658
1735
|
}
|
|
1659
1736
|
});
|
|
1660
1737
|
|
|
1661
1738
|
// ../packages/agents-core/src/db/schema.ts
|
|
1662
|
-
import { relations } from "drizzle-orm";
|
|
1739
|
+
import { relations as relations2 } from "drizzle-orm";
|
|
1663
1740
|
import {
|
|
1664
1741
|
foreignKey,
|
|
1665
|
-
index,
|
|
1742
|
+
index as index2,
|
|
1666
1743
|
integer,
|
|
1667
1744
|
jsonb,
|
|
1668
1745
|
pgTable as pgTable2,
|
|
@@ -1782,7 +1859,7 @@ var init_schema = __esm({
|
|
|
1782
1859
|
foreignColumns: [projects.tenantId, projects.id],
|
|
1783
1860
|
name: "context_cache_project_fk"
|
|
1784
1861
|
}).onDelete("cascade"),
|
|
1785
|
-
|
|
1862
|
+
index2("context_cache_lookup_idx").on(
|
|
1786
1863
|
table.conversationId,
|
|
1787
1864
|
table.contextConfigId,
|
|
1788
1865
|
table.contextVariableKey
|
|
@@ -2214,9 +2291,9 @@ var init_schema = __esm({
|
|
|
2214
2291
|
foreignColumns: [projects.tenantId, projects.id],
|
|
2215
2292
|
name: "ledger_artifacts_project_fk"
|
|
2216
2293
|
}).onDelete("cascade"),
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2294
|
+
index2("ledger_artifacts_task_id_idx").on(table.taskId),
|
|
2295
|
+
index2("ledger_artifacts_tool_call_id_idx").on(table.toolCallId),
|
|
2296
|
+
index2("ledger_artifacts_context_id_idx").on(table.contextId),
|
|
2220
2297
|
unique("ledger_artifacts_task_context_name_unique").on(
|
|
2221
2298
|
table.taskId,
|
|
2222
2299
|
table.contextId,
|
|
@@ -2252,9 +2329,9 @@ var init_schema = __esm({
|
|
|
2252
2329
|
foreignColumns: [agents.tenantId, agents.projectId, agents.id],
|
|
2253
2330
|
name: "api_keys_agent_fk"
|
|
2254
2331
|
}).onDelete("cascade"),
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2332
|
+
index2("api_keys_tenant_agent_idx").on(t2.tenantId, t2.agentId),
|
|
2333
|
+
index2("api_keys_prefix_idx").on(t2.keyPrefix),
|
|
2334
|
+
index2("api_keys_public_id_idx").on(t2.publicId)
|
|
2258
2335
|
]
|
|
2259
2336
|
);
|
|
2260
2337
|
credentialReferences = pgTable2(
|
|
@@ -2276,7 +2353,7 @@ var init_schema = __esm({
|
|
|
2276
2353
|
}).onDelete("cascade")
|
|
2277
2354
|
]
|
|
2278
2355
|
);
|
|
2279
|
-
tasksRelations =
|
|
2356
|
+
tasksRelations = relations2(tasks, ({ one, many }) => ({
|
|
2280
2357
|
project: one(projects, {
|
|
2281
2358
|
fields: [tasks.tenantId, tasks.projectId],
|
|
2282
2359
|
references: [projects.tenantId, projects.id]
|
|
@@ -2296,7 +2373,7 @@ var init_schema = __esm({
|
|
|
2296
2373
|
messages: many(messages),
|
|
2297
2374
|
ledgerArtifacts: many(ledgerArtifacts)
|
|
2298
2375
|
}));
|
|
2299
|
-
projectsRelations =
|
|
2376
|
+
projectsRelations = relations2(projects, ({ many }) => ({
|
|
2300
2377
|
subAgents: many(subAgents),
|
|
2301
2378
|
agents: many(agents),
|
|
2302
2379
|
tools: many(tools),
|
|
@@ -2310,7 +2387,7 @@ var init_schema = __esm({
|
|
|
2310
2387
|
ledgerArtifacts: many(ledgerArtifacts),
|
|
2311
2388
|
credentialReferences: many(credentialReferences)
|
|
2312
2389
|
}));
|
|
2313
|
-
taskRelationsRelations =
|
|
2390
|
+
taskRelationsRelations = relations2(taskRelations, ({ one }) => ({
|
|
2314
2391
|
parentTask: one(tasks, {
|
|
2315
2392
|
fields: [taskRelations.parentTaskId],
|
|
2316
2393
|
references: [tasks.id],
|
|
@@ -2322,7 +2399,7 @@ var init_schema = __esm({
|
|
|
2322
2399
|
relationName: "childTask"
|
|
2323
2400
|
})
|
|
2324
2401
|
}));
|
|
2325
|
-
contextConfigsRelations =
|
|
2402
|
+
contextConfigsRelations = relations2(contextConfigs, ({ many, one }) => ({
|
|
2326
2403
|
project: one(projects, {
|
|
2327
2404
|
fields: [contextConfigs.tenantId, contextConfigs.projectId],
|
|
2328
2405
|
references: [projects.tenantId, projects.id]
|
|
@@ -2330,13 +2407,13 @@ var init_schema = __esm({
|
|
|
2330
2407
|
agents: many(agents),
|
|
2331
2408
|
cache: many(contextCache)
|
|
2332
2409
|
}));
|
|
2333
|
-
contextCacheRelations =
|
|
2410
|
+
contextCacheRelations = relations2(contextCache, ({ one }) => ({
|
|
2334
2411
|
contextConfig: one(contextConfigs, {
|
|
2335
2412
|
fields: [contextCache.contextConfigId],
|
|
2336
2413
|
references: [contextConfigs.id]
|
|
2337
2414
|
})
|
|
2338
2415
|
}));
|
|
2339
|
-
subAgentsRelations =
|
|
2416
|
+
subAgentsRelations = relations2(subAgents, ({ many, one }) => ({
|
|
2340
2417
|
project: one(projects, {
|
|
2341
2418
|
fields: [subAgents.tenantId, subAgents.projectId],
|
|
2342
2419
|
references: [projects.tenantId, projects.id]
|
|
@@ -2360,7 +2437,7 @@ var init_schema = __esm({
|
|
|
2360
2437
|
dataComponentRelations: many(subAgentDataComponents),
|
|
2361
2438
|
artifactComponentRelations: many(subAgentArtifactComponents)
|
|
2362
2439
|
}));
|
|
2363
|
-
agentRelations =
|
|
2440
|
+
agentRelations = relations2(agents, ({ one, many }) => ({
|
|
2364
2441
|
project: one(projects, {
|
|
2365
2442
|
fields: [agents.tenantId, agents.projectId],
|
|
2366
2443
|
references: [projects.tenantId, projects.id]
|
|
@@ -2375,7 +2452,7 @@ var init_schema = __esm({
|
|
|
2375
2452
|
}),
|
|
2376
2453
|
functionTools: many(functionTools)
|
|
2377
2454
|
}));
|
|
2378
|
-
externalAgentsRelations =
|
|
2455
|
+
externalAgentsRelations = relations2(externalAgents, ({ one, many }) => ({
|
|
2379
2456
|
project: one(projects, {
|
|
2380
2457
|
fields: [externalAgents.tenantId, externalAgents.projectId],
|
|
2381
2458
|
references: [projects.tenantId, projects.id]
|
|
@@ -2386,7 +2463,7 @@ var init_schema = __esm({
|
|
|
2386
2463
|
references: [credentialReferences.id]
|
|
2387
2464
|
})
|
|
2388
2465
|
}));
|
|
2389
|
-
apiKeysRelations =
|
|
2466
|
+
apiKeysRelations = relations2(apiKeys, ({ one }) => ({
|
|
2390
2467
|
project: one(projects, {
|
|
2391
2468
|
fields: [apiKeys.tenantId, apiKeys.projectId],
|
|
2392
2469
|
references: [projects.tenantId, projects.id]
|
|
@@ -2396,7 +2473,7 @@ var init_schema = __esm({
|
|
|
2396
2473
|
references: [agents.id]
|
|
2397
2474
|
})
|
|
2398
2475
|
}));
|
|
2399
|
-
agentToolRelationsRelations =
|
|
2476
|
+
agentToolRelationsRelations = relations2(subAgentToolRelations, ({ one }) => ({
|
|
2400
2477
|
subAgent: one(subAgents, {
|
|
2401
2478
|
fields: [subAgentToolRelations.subAgentId],
|
|
2402
2479
|
references: [subAgents.id]
|
|
@@ -2406,7 +2483,7 @@ var init_schema = __esm({
|
|
|
2406
2483
|
references: [tools.id]
|
|
2407
2484
|
})
|
|
2408
2485
|
}));
|
|
2409
|
-
credentialReferencesRelations =
|
|
2486
|
+
credentialReferencesRelations = relations2(credentialReferences, ({ one, many }) => ({
|
|
2410
2487
|
project: one(projects, {
|
|
2411
2488
|
fields: [credentialReferences.tenantId, credentialReferences.projectId],
|
|
2412
2489
|
references: [projects.tenantId, projects.id]
|
|
@@ -2414,7 +2491,7 @@ var init_schema = __esm({
|
|
|
2414
2491
|
tools: many(tools),
|
|
2415
2492
|
externalAgents: many(externalAgents)
|
|
2416
2493
|
}));
|
|
2417
|
-
toolsRelations =
|
|
2494
|
+
toolsRelations = relations2(tools, ({ one, many }) => ({
|
|
2418
2495
|
project: one(projects, {
|
|
2419
2496
|
fields: [tools.tenantId, tools.projectId],
|
|
2420
2497
|
references: [projects.tenantId, projects.id]
|
|
@@ -2425,7 +2502,7 @@ var init_schema = __esm({
|
|
|
2425
2502
|
references: [credentialReferences.id]
|
|
2426
2503
|
})
|
|
2427
2504
|
}));
|
|
2428
|
-
conversationsRelations =
|
|
2505
|
+
conversationsRelations = relations2(conversations, ({ one, many }) => ({
|
|
2429
2506
|
project: one(projects, {
|
|
2430
2507
|
fields: [conversations.tenantId, conversations.projectId],
|
|
2431
2508
|
references: [projects.tenantId, projects.id]
|
|
@@ -2436,7 +2513,7 @@ var init_schema = __esm({
|
|
|
2436
2513
|
references: [subAgents.id]
|
|
2437
2514
|
})
|
|
2438
2515
|
}));
|
|
2439
|
-
messagesRelations =
|
|
2516
|
+
messagesRelations = relations2(messages, ({ one, many }) => ({
|
|
2440
2517
|
conversation: one(conversations, {
|
|
2441
2518
|
fields: [messages.conversationId],
|
|
2442
2519
|
references: [conversations.id]
|
|
@@ -2484,14 +2561,14 @@ var init_schema = __esm({
|
|
|
2484
2561
|
relationName: "parentChild"
|
|
2485
2562
|
})
|
|
2486
2563
|
}));
|
|
2487
|
-
artifactComponentsRelations =
|
|
2564
|
+
artifactComponentsRelations = relations2(artifactComponents, ({ many, one }) => ({
|
|
2488
2565
|
project: one(projects, {
|
|
2489
2566
|
fields: [artifactComponents.tenantId, artifactComponents.projectId],
|
|
2490
2567
|
references: [projects.tenantId, projects.id]
|
|
2491
2568
|
}),
|
|
2492
2569
|
subAgentRelations: many(subAgentArtifactComponents)
|
|
2493
2570
|
}));
|
|
2494
|
-
subAgentArtifactComponentsRelations =
|
|
2571
|
+
subAgentArtifactComponentsRelations = relations2(
|
|
2495
2572
|
subAgentArtifactComponents,
|
|
2496
2573
|
({ one }) => ({
|
|
2497
2574
|
subAgent: one(subAgents, {
|
|
@@ -2504,14 +2581,14 @@ var init_schema = __esm({
|
|
|
2504
2581
|
})
|
|
2505
2582
|
})
|
|
2506
2583
|
);
|
|
2507
|
-
dataComponentsRelations =
|
|
2584
|
+
dataComponentsRelations = relations2(dataComponents, ({ many, one }) => ({
|
|
2508
2585
|
project: one(projects, {
|
|
2509
2586
|
fields: [dataComponents.tenantId, dataComponents.projectId],
|
|
2510
2587
|
references: [projects.tenantId, projects.id]
|
|
2511
2588
|
}),
|
|
2512
2589
|
subAgentRelations: many(subAgentDataComponents)
|
|
2513
2590
|
}));
|
|
2514
|
-
subAgentDataComponentsRelations =
|
|
2591
|
+
subAgentDataComponentsRelations = relations2(subAgentDataComponents, ({ one }) => ({
|
|
2515
2592
|
subAgent: one(subAgents, {
|
|
2516
2593
|
fields: [subAgentDataComponents.subAgentId],
|
|
2517
2594
|
references: [subAgents.id]
|
|
@@ -2521,7 +2598,7 @@ var init_schema = __esm({
|
|
|
2521
2598
|
references: [dataComponents.id]
|
|
2522
2599
|
})
|
|
2523
2600
|
}));
|
|
2524
|
-
ledgerArtifactsRelations =
|
|
2601
|
+
ledgerArtifactsRelations = relations2(ledgerArtifacts, ({ one }) => ({
|
|
2525
2602
|
project: one(projects, {
|
|
2526
2603
|
fields: [ledgerArtifacts.tenantId, ledgerArtifacts.projectId],
|
|
2527
2604
|
references: [projects.tenantId, projects.id]
|
|
@@ -2531,14 +2608,14 @@ var init_schema = __esm({
|
|
|
2531
2608
|
references: [tasks.id]
|
|
2532
2609
|
})
|
|
2533
2610
|
}));
|
|
2534
|
-
functionsRelations =
|
|
2611
|
+
functionsRelations = relations2(functions, ({ many, one }) => ({
|
|
2535
2612
|
functionTools: many(functionTools),
|
|
2536
2613
|
project: one(projects, {
|
|
2537
2614
|
fields: [functions.tenantId, functions.projectId],
|
|
2538
2615
|
references: [projects.tenantId, projects.id]
|
|
2539
2616
|
})
|
|
2540
2617
|
}));
|
|
2541
|
-
subAgentRelationsRelations =
|
|
2618
|
+
subAgentRelationsRelations = relations2(subAgentRelations, ({ one }) => ({
|
|
2542
2619
|
agent: one(agents, {
|
|
2543
2620
|
fields: [subAgentRelations.agentId],
|
|
2544
2621
|
references: [agents.id]
|
|
@@ -2554,7 +2631,7 @@ var init_schema = __esm({
|
|
|
2554
2631
|
relationName: "targetRelations"
|
|
2555
2632
|
})
|
|
2556
2633
|
}));
|
|
2557
|
-
functionToolsRelations =
|
|
2634
|
+
functionToolsRelations = relations2(functionTools, ({ one, many }) => ({
|
|
2558
2635
|
project: one(projects, {
|
|
2559
2636
|
fields: [functionTools.tenantId, functionTools.projectId],
|
|
2560
2637
|
references: [projects.tenantId, projects.id]
|
|
@@ -2569,7 +2646,7 @@ var init_schema = __esm({
|
|
|
2569
2646
|
}),
|
|
2570
2647
|
subAgentRelations: many(subAgentFunctionToolRelations)
|
|
2571
2648
|
}));
|
|
2572
|
-
subAgentFunctionToolRelationsRelations =
|
|
2649
|
+
subAgentFunctionToolRelationsRelations = relations2(
|
|
2573
2650
|
subAgentFunctionToolRelations,
|
|
2574
2651
|
({ one }) => ({
|
|
2575
2652
|
subAgent: one(subAgents, {
|
|
@@ -2582,7 +2659,7 @@ var init_schema = __esm({
|
|
|
2582
2659
|
})
|
|
2583
2660
|
})
|
|
2584
2661
|
);
|
|
2585
|
-
subAgentExternalAgentRelationsRelations =
|
|
2662
|
+
subAgentExternalAgentRelationsRelations = relations2(
|
|
2586
2663
|
subAgentExternalAgentRelations,
|
|
2587
2664
|
({ one }) => ({
|
|
2588
2665
|
subAgent: one(subAgents, {
|
|
@@ -2604,7 +2681,7 @@ var init_schema = __esm({
|
|
|
2604
2681
|
})
|
|
2605
2682
|
})
|
|
2606
2683
|
);
|
|
2607
|
-
subAgentTeamAgentRelationsRelations =
|
|
2684
|
+
subAgentTeamAgentRelationsRelations = relations2(
|
|
2608
2685
|
subAgentTeamAgentRelations,
|
|
2609
2686
|
({ one }) => ({
|
|
2610
2687
|
subAgent: one(subAgents, {
|
|
@@ -4722,14 +4799,14 @@ var require_jmespath = __commonJS({
|
|
|
4722
4799
|
},
|
|
4723
4800
|
_parseSliceExpression: function() {
|
|
4724
4801
|
var parts2 = [null, null, null];
|
|
4725
|
-
var
|
|
4802
|
+
var index3 = 0;
|
|
4726
4803
|
var currentToken = this._lookahead(0);
|
|
4727
|
-
while (currentToken !== TOK_RBRACKET &&
|
|
4804
|
+
while (currentToken !== TOK_RBRACKET && index3 < 3) {
|
|
4728
4805
|
if (currentToken === TOK_COLON) {
|
|
4729
|
-
|
|
4806
|
+
index3++;
|
|
4730
4807
|
this._advance();
|
|
4731
4808
|
} else if (currentToken === TOK_NUMBER) {
|
|
4732
|
-
parts2[
|
|
4809
|
+
parts2[index3] = this._lookaheadToken(0).value;
|
|
4733
4810
|
this._advance();
|
|
4734
4811
|
} else {
|
|
4735
4812
|
var t2 = this._lookahead(0);
|
|
@@ -4858,11 +4935,11 @@ var require_jmespath = __commonJS({
|
|
|
4858
4935
|
if (!isArray3(value)) {
|
|
4859
4936
|
return null;
|
|
4860
4937
|
}
|
|
4861
|
-
var
|
|
4862
|
-
if (
|
|
4863
|
-
|
|
4938
|
+
var index3 = node.value;
|
|
4939
|
+
if (index3 < 0) {
|
|
4940
|
+
index3 = value.length + index3;
|
|
4864
4941
|
}
|
|
4865
|
-
result = value[
|
|
4942
|
+
result = value[index3];
|
|
4866
4943
|
if (result === void 0) {
|
|
4867
4944
|
result = null;
|
|
4868
4945
|
}
|
|
@@ -5978,11 +6055,11 @@ var require_util = __commonJS({
|
|
|
5978
6055
|
aRoot = aRoot.replace(/\/$/, "");
|
|
5979
6056
|
var level = 0;
|
|
5980
6057
|
while (aPath.indexOf(aRoot + "/") !== 0) {
|
|
5981
|
-
var
|
|
5982
|
-
if (
|
|
6058
|
+
var index3 = aRoot.lastIndexOf("/");
|
|
6059
|
+
if (index3 < 0) {
|
|
5983
6060
|
return aPath;
|
|
5984
6061
|
}
|
|
5985
|
-
aRoot = aRoot.slice(0,
|
|
6062
|
+
aRoot = aRoot.slice(0, index3);
|
|
5986
6063
|
if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
|
|
5987
6064
|
return aPath;
|
|
5988
6065
|
}
|
|
@@ -6135,9 +6212,9 @@ var require_util = __commonJS({
|
|
|
6135
6212
|
throw new Error("sourceMapURL could not be parsed");
|
|
6136
6213
|
}
|
|
6137
6214
|
if (parsed.path) {
|
|
6138
|
-
var
|
|
6139
|
-
if (
|
|
6140
|
-
parsed.path = parsed.path.substring(0,
|
|
6215
|
+
var index3 = parsed.path.lastIndexOf("/");
|
|
6216
|
+
if (index3 >= 0) {
|
|
6217
|
+
parsed.path = parsed.path.substring(0, index3 + 1);
|
|
6141
6218
|
}
|
|
6142
6219
|
}
|
|
6143
6220
|
sourceURL = join19(urlGenerate(parsed), sourceURL);
|
|
@@ -6575,7 +6652,7 @@ var require_binary_search = __commonJS({
|
|
|
6575
6652
|
if (aHaystack.length === 0) {
|
|
6576
6653
|
return -1;
|
|
6577
6654
|
}
|
|
6578
|
-
var
|
|
6655
|
+
var index3 = recursiveSearch(
|
|
6579
6656
|
-1,
|
|
6580
6657
|
aHaystack.length,
|
|
6581
6658
|
aNeedle,
|
|
@@ -6583,16 +6660,16 @@ var require_binary_search = __commonJS({
|
|
|
6583
6660
|
aCompare,
|
|
6584
6661
|
aBias || exports.GREATEST_LOWER_BOUND
|
|
6585
6662
|
);
|
|
6586
|
-
if (
|
|
6663
|
+
if (index3 < 0) {
|
|
6587
6664
|
return -1;
|
|
6588
6665
|
}
|
|
6589
|
-
while (
|
|
6590
|
-
if (aCompare(aHaystack[
|
|
6666
|
+
while (index3 - 1 >= 0) {
|
|
6667
|
+
if (aCompare(aHaystack[index3], aHaystack[index3 - 1], true) !== 0) {
|
|
6591
6668
|
break;
|
|
6592
6669
|
}
|
|
6593
|
-
--
|
|
6670
|
+
--index3;
|
|
6594
6671
|
}
|
|
6595
|
-
return
|
|
6672
|
+
return index3;
|
|
6596
6673
|
};
|
|
6597
6674
|
}
|
|
6598
6675
|
});
|
|
@@ -6677,8 +6754,8 @@ var require_source_map_consumer = __commonJS({
|
|
|
6677
6754
|
return this.__originalMappings;
|
|
6678
6755
|
}
|
|
6679
6756
|
});
|
|
6680
|
-
SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr,
|
|
6681
|
-
var c2 = aStr.charAt(
|
|
6757
|
+
SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index3) {
|
|
6758
|
+
var c2 = aStr.charAt(index3);
|
|
6682
6759
|
return c2 === ";" || c2 === ",";
|
|
6683
6760
|
};
|
|
6684
6761
|
SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
|
|
@@ -6728,7 +6805,7 @@ var require_source_map_consumer = __commonJS({
|
|
|
6728
6805
|
return [];
|
|
6729
6806
|
}
|
|
6730
6807
|
var mappings = [];
|
|
6731
|
-
var
|
|
6808
|
+
var index3 = this._findMapping(
|
|
6732
6809
|
needle,
|
|
6733
6810
|
this._originalMappings,
|
|
6734
6811
|
"originalLine",
|
|
@@ -6736,8 +6813,8 @@ var require_source_map_consumer = __commonJS({
|
|
|
6736
6813
|
util.compareByOriginalPositions,
|
|
6737
6814
|
binarySearch.LEAST_UPPER_BOUND
|
|
6738
6815
|
);
|
|
6739
|
-
if (
|
|
6740
|
-
var mapping = this._originalMappings[
|
|
6816
|
+
if (index3 >= 0) {
|
|
6817
|
+
var mapping = this._originalMappings[index3];
|
|
6741
6818
|
if (aArgs.column === void 0) {
|
|
6742
6819
|
var originalLine = mapping.originalLine;
|
|
6743
6820
|
while (mapping && mapping.originalLine === originalLine) {
|
|
@@ -6746,7 +6823,7 @@ var require_source_map_consumer = __commonJS({
|
|
|
6746
6823
|
column: util.getArg(mapping, "generatedColumn", null),
|
|
6747
6824
|
lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
|
|
6748
6825
|
});
|
|
6749
|
-
mapping = this._originalMappings[++
|
|
6826
|
+
mapping = this._originalMappings[++index3];
|
|
6750
6827
|
}
|
|
6751
6828
|
} else {
|
|
6752
6829
|
var originalColumn = mapping.originalColumn;
|
|
@@ -6756,7 +6833,7 @@ var require_source_map_consumer = __commonJS({
|
|
|
6756
6833
|
column: util.getArg(mapping, "generatedColumn", null),
|
|
6757
6834
|
lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
|
|
6758
6835
|
});
|
|
6759
|
-
mapping = this._originalMappings[++
|
|
6836
|
+
mapping = this._originalMappings[++index3];
|
|
6760
6837
|
}
|
|
6761
6838
|
}
|
|
6762
6839
|
}
|
|
@@ -6871,37 +6948,37 @@ var require_source_map_consumer = __commonJS({
|
|
|
6871
6948
|
var previousSource = 0;
|
|
6872
6949
|
var previousName = 0;
|
|
6873
6950
|
var length = aStr.length;
|
|
6874
|
-
var
|
|
6951
|
+
var index3 = 0;
|
|
6875
6952
|
var cachedSegments = {};
|
|
6876
6953
|
var temp = {};
|
|
6877
6954
|
var originalMappings = [];
|
|
6878
6955
|
var generatedMappings = [];
|
|
6879
6956
|
var mapping, str2, segment, end, value;
|
|
6880
|
-
while (
|
|
6881
|
-
if (aStr.charAt(
|
|
6957
|
+
while (index3 < length) {
|
|
6958
|
+
if (aStr.charAt(index3) === ";") {
|
|
6882
6959
|
generatedLine++;
|
|
6883
|
-
|
|
6960
|
+
index3++;
|
|
6884
6961
|
previousGeneratedColumn = 0;
|
|
6885
|
-
} else if (aStr.charAt(
|
|
6886
|
-
|
|
6962
|
+
} else if (aStr.charAt(index3) === ",") {
|
|
6963
|
+
index3++;
|
|
6887
6964
|
} else {
|
|
6888
6965
|
mapping = new Mapping();
|
|
6889
6966
|
mapping.generatedLine = generatedLine;
|
|
6890
|
-
for (end =
|
|
6967
|
+
for (end = index3; end < length; end++) {
|
|
6891
6968
|
if (this._charIsMappingSeparator(aStr, end)) {
|
|
6892
6969
|
break;
|
|
6893
6970
|
}
|
|
6894
6971
|
}
|
|
6895
|
-
str2 = aStr.slice(
|
|
6972
|
+
str2 = aStr.slice(index3, end);
|
|
6896
6973
|
segment = cachedSegments[str2];
|
|
6897
6974
|
if (segment) {
|
|
6898
|
-
|
|
6975
|
+
index3 += str2.length;
|
|
6899
6976
|
} else {
|
|
6900
6977
|
segment = [];
|
|
6901
|
-
while (
|
|
6902
|
-
base64VLQ.decode(aStr,
|
|
6978
|
+
while (index3 < end) {
|
|
6979
|
+
base64VLQ.decode(aStr, index3, temp);
|
|
6903
6980
|
value = temp.value;
|
|
6904
|
-
|
|
6981
|
+
index3 = temp.rest;
|
|
6905
6982
|
segment.push(value);
|
|
6906
6983
|
}
|
|
6907
6984
|
if (segment.length === 2) {
|
|
@@ -6948,10 +7025,10 @@ var require_source_map_consumer = __commonJS({
|
|
|
6948
7025
|
return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
|
|
6949
7026
|
};
|
|
6950
7027
|
BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() {
|
|
6951
|
-
for (var
|
|
6952
|
-
var mapping = this._generatedMappings[
|
|
6953
|
-
if (
|
|
6954
|
-
var nextMapping = this._generatedMappings[
|
|
7028
|
+
for (var index3 = 0; index3 < this._generatedMappings.length; ++index3) {
|
|
7029
|
+
var mapping = this._generatedMappings[index3];
|
|
7030
|
+
if (index3 + 1 < this._generatedMappings.length) {
|
|
7031
|
+
var nextMapping = this._generatedMappings[index3 + 1];
|
|
6955
7032
|
if (mapping.generatedLine === nextMapping.generatedLine) {
|
|
6956
7033
|
mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
|
|
6957
7034
|
continue;
|
|
@@ -6965,7 +7042,7 @@ var require_source_map_consumer = __commonJS({
|
|
|
6965
7042
|
generatedLine: util.getArg(aArgs, "line"),
|
|
6966
7043
|
generatedColumn: util.getArg(aArgs, "column")
|
|
6967
7044
|
};
|
|
6968
|
-
var
|
|
7045
|
+
var index3 = this._findMapping(
|
|
6969
7046
|
needle,
|
|
6970
7047
|
this._generatedMappings,
|
|
6971
7048
|
"generatedLine",
|
|
@@ -6973,8 +7050,8 @@ var require_source_map_consumer = __commonJS({
|
|
|
6973
7050
|
util.compareByGeneratedPositionsDeflated,
|
|
6974
7051
|
util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND)
|
|
6975
7052
|
);
|
|
6976
|
-
if (
|
|
6977
|
-
var mapping = this._generatedMappings[
|
|
7053
|
+
if (index3 >= 0) {
|
|
7054
|
+
var mapping = this._generatedMappings[index3];
|
|
6978
7055
|
if (mapping.generatedLine === needle.generatedLine) {
|
|
6979
7056
|
var source = util.getArg(mapping, "source", null);
|
|
6980
7057
|
if (source !== null) {
|
|
@@ -7012,9 +7089,9 @@ var require_source_map_consumer = __commonJS({
|
|
|
7012
7089
|
if (!this.sourcesContent) {
|
|
7013
7090
|
return null;
|
|
7014
7091
|
}
|
|
7015
|
-
var
|
|
7016
|
-
if (
|
|
7017
|
-
return this.sourcesContent[
|
|
7092
|
+
var index3 = this._findSourceIndex(aSource);
|
|
7093
|
+
if (index3 >= 0) {
|
|
7094
|
+
return this.sourcesContent[index3];
|
|
7018
7095
|
}
|
|
7019
7096
|
var relativeSource = aSource;
|
|
7020
7097
|
if (this.sourceRoot != null) {
|
|
@@ -7051,7 +7128,7 @@ var require_source_map_consumer = __commonJS({
|
|
|
7051
7128
|
originalLine: util.getArg(aArgs, "line"),
|
|
7052
7129
|
originalColumn: util.getArg(aArgs, "column")
|
|
7053
7130
|
};
|
|
7054
|
-
var
|
|
7131
|
+
var index3 = this._findMapping(
|
|
7055
7132
|
needle,
|
|
7056
7133
|
this._originalMappings,
|
|
7057
7134
|
"originalLine",
|
|
@@ -7059,8 +7136,8 @@ var require_source_map_consumer = __commonJS({
|
|
|
7059
7136
|
util.compareByOriginalPositions,
|
|
7060
7137
|
util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND)
|
|
7061
7138
|
);
|
|
7062
|
-
if (
|
|
7063
|
-
var mapping = this._originalMappings[
|
|
7139
|
+
if (index3 >= 0) {
|
|
7140
|
+
var mapping = this._originalMappings[index3];
|
|
7064
7141
|
if (mapping.source === needle.source) {
|
|
7065
7142
|
return {
|
|
7066
7143
|
line: util.getArg(mapping, "generatedLine", null),
|
|
@@ -10751,10 +10828,10 @@ var require_typescript = __commonJS({
|
|
|
10751
10828
|
let last2 = array[indices[0]];
|
|
10752
10829
|
const deduplicated = [indices[0]];
|
|
10753
10830
|
for (let i3 = 1; i3 < indices.length; i3++) {
|
|
10754
|
-
const
|
|
10755
|
-
const item = array[
|
|
10831
|
+
const index3 = indices[i3];
|
|
10832
|
+
const item = array[index3];
|
|
10756
10833
|
if (!equalityComparer(last2, item)) {
|
|
10757
|
-
deduplicated.push(
|
|
10834
|
+
deduplicated.push(index3);
|
|
10758
10835
|
last2 = item;
|
|
10759
10836
|
}
|
|
10760
10837
|
}
|
|
@@ -10996,9 +11073,9 @@ var require_typescript = __commonJS({
|
|
|
10996
11073
|
function singleOrMany(array) {
|
|
10997
11074
|
return array !== void 0 && array.length === 1 ? array[0] : array;
|
|
10998
11075
|
}
|
|
10999
|
-
function replaceElement(array,
|
|
11076
|
+
function replaceElement(array, index3, value) {
|
|
11000
11077
|
const result = array.slice(0);
|
|
11001
|
-
result[
|
|
11078
|
+
result[index3] = value;
|
|
11002
11079
|
return result;
|
|
11003
11080
|
}
|
|
11004
11081
|
function binarySearch(array, value, keySelector, keyComparer, offset) {
|
|
@@ -11636,14 +11713,14 @@ var require_typescript = __commonJS({
|
|
|
11636
11713
|
}
|
|
11637
11714
|
return false;
|
|
11638
11715
|
}
|
|
11639
|
-
function orderedRemoveItemAt(array,
|
|
11640
|
-
for (let i3 =
|
|
11716
|
+
function orderedRemoveItemAt(array, index3) {
|
|
11717
|
+
for (let i3 = index3; i3 < array.length - 1; i3++) {
|
|
11641
11718
|
array[i3] = array[i3 + 1];
|
|
11642
11719
|
}
|
|
11643
11720
|
array.pop();
|
|
11644
11721
|
}
|
|
11645
|
-
function unorderedRemoveItemAt(array,
|
|
11646
|
-
array[
|
|
11722
|
+
function unorderedRemoveItemAt(array, index3) {
|
|
11723
|
+
array[index3] = array[array.length - 1];
|
|
11647
11724
|
array.pop();
|
|
11648
11725
|
}
|
|
11649
11726
|
function unorderedRemoveItem(array, item) {
|
|
@@ -11762,8 +11839,8 @@ var require_typescript = __commonJS({
|
|
|
11762
11839
|
);
|
|
11763
11840
|
return result;
|
|
11764
11841
|
}
|
|
11765
|
-
function cartesianProductWorker(arrays, result, outer,
|
|
11766
|
-
for (const element of arrays[
|
|
11842
|
+
function cartesianProductWorker(arrays, result, outer, index3) {
|
|
11843
|
+
for (const element of arrays[index3]) {
|
|
11767
11844
|
let inner;
|
|
11768
11845
|
if (outer) {
|
|
11769
11846
|
inner = outer.slice();
|
|
@@ -11771,31 +11848,31 @@ var require_typescript = __commonJS({
|
|
|
11771
11848
|
} else {
|
|
11772
11849
|
inner = [element];
|
|
11773
11850
|
}
|
|
11774
|
-
if (
|
|
11851
|
+
if (index3 === arrays.length - 1) {
|
|
11775
11852
|
result.push(inner);
|
|
11776
11853
|
} else {
|
|
11777
|
-
cartesianProductWorker(arrays, result, inner,
|
|
11854
|
+
cartesianProductWorker(arrays, result, inner, index3 + 1);
|
|
11778
11855
|
}
|
|
11779
11856
|
}
|
|
11780
11857
|
}
|
|
11781
11858
|
function takeWhile(array, predicate) {
|
|
11782
11859
|
if (array !== void 0) {
|
|
11783
11860
|
const len = array.length;
|
|
11784
|
-
let
|
|
11785
|
-
while (
|
|
11786
|
-
|
|
11861
|
+
let index3 = 0;
|
|
11862
|
+
while (index3 < len && predicate(array[index3])) {
|
|
11863
|
+
index3++;
|
|
11787
11864
|
}
|
|
11788
|
-
return array.slice(0,
|
|
11865
|
+
return array.slice(0, index3);
|
|
11789
11866
|
}
|
|
11790
11867
|
}
|
|
11791
11868
|
function skipWhile(array, predicate) {
|
|
11792
11869
|
if (array !== void 0) {
|
|
11793
11870
|
const len = array.length;
|
|
11794
|
-
let
|
|
11795
|
-
while (
|
|
11796
|
-
|
|
11871
|
+
let index3 = 0;
|
|
11872
|
+
while (index3 < len && predicate(array[index3])) {
|
|
11873
|
+
index3++;
|
|
11797
11874
|
}
|
|
11798
|
-
return array.slice(
|
|
11875
|
+
return array.slice(index3);
|
|
11799
11876
|
}
|
|
11800
11877
|
}
|
|
11801
11878
|
function isNodeLikeSystem() {
|
|
@@ -13374,8 +13451,8 @@ ${lanes.join("\n")}
|
|
|
13374
13451
|
}
|
|
13375
13452
|
tracingEnabled2.popAll = popAll;
|
|
13376
13453
|
const sampleInterval = 1e3 * 10;
|
|
13377
|
-
function writeStackEvent(
|
|
13378
|
-
const { phase, name: name14, args: args2, time, separateBeginAndEnd } = eventStack[
|
|
13454
|
+
function writeStackEvent(index3, endTime, results) {
|
|
13455
|
+
const { phase, name: name14, args: args2, time, separateBeginAndEnd } = eventStack[index3];
|
|
13379
13456
|
if (separateBeginAndEnd) {
|
|
13380
13457
|
Debug.assert(!results, "`results` are not supported for events with `separateBeginAndEnd`");
|
|
13381
13458
|
writeEvent(
|
|
@@ -17226,34 +17303,34 @@ ${lanes.join("\n")}
|
|
|
17226
17303
|
const length2 = path7.length;
|
|
17227
17304
|
const root = path7.substring(0, rootLength);
|
|
17228
17305
|
let normalized;
|
|
17229
|
-
let
|
|
17230
|
-
let segmentStart =
|
|
17231
|
-
let normalizedUpTo =
|
|
17306
|
+
let index3 = rootLength;
|
|
17307
|
+
let segmentStart = index3;
|
|
17308
|
+
let normalizedUpTo = index3;
|
|
17232
17309
|
let seenNonDotDotSegment = rootLength !== 0;
|
|
17233
|
-
while (
|
|
17234
|
-
segmentStart =
|
|
17235
|
-
let ch = path7.charCodeAt(
|
|
17236
|
-
while (ch === 47 &&
|
|
17237
|
-
|
|
17238
|
-
ch = path7.charCodeAt(
|
|
17239
|
-
}
|
|
17240
|
-
if (
|
|
17310
|
+
while (index3 < length2) {
|
|
17311
|
+
segmentStart = index3;
|
|
17312
|
+
let ch = path7.charCodeAt(index3);
|
|
17313
|
+
while (ch === 47 && index3 + 1 < length2) {
|
|
17314
|
+
index3++;
|
|
17315
|
+
ch = path7.charCodeAt(index3);
|
|
17316
|
+
}
|
|
17317
|
+
if (index3 > segmentStart) {
|
|
17241
17318
|
normalized ?? (normalized = path7.substring(0, segmentStart - 1));
|
|
17242
|
-
segmentStart =
|
|
17319
|
+
segmentStart = index3;
|
|
17243
17320
|
}
|
|
17244
|
-
let segmentEnd = path7.indexOf(directorySeparator,
|
|
17321
|
+
let segmentEnd = path7.indexOf(directorySeparator, index3 + 1);
|
|
17245
17322
|
if (segmentEnd === -1) {
|
|
17246
17323
|
segmentEnd = length2;
|
|
17247
17324
|
}
|
|
17248
17325
|
const segmentLength = segmentEnd - segmentStart;
|
|
17249
|
-
if (segmentLength === 1 && path7.charCodeAt(
|
|
17326
|
+
if (segmentLength === 1 && path7.charCodeAt(index3) === 46) {
|
|
17250
17327
|
normalized ?? (normalized = path7.substring(0, normalizedUpTo));
|
|
17251
|
-
} else if (segmentLength === 2 && path7.charCodeAt(
|
|
17328
|
+
} else if (segmentLength === 2 && path7.charCodeAt(index3) === 46 && path7.charCodeAt(index3 + 1) === 46) {
|
|
17252
17329
|
if (!seenNonDotDotSegment) {
|
|
17253
17330
|
if (normalized !== void 0) {
|
|
17254
17331
|
normalized += normalized.length === rootLength ? ".." : "/..";
|
|
17255
17332
|
} else {
|
|
17256
|
-
normalizedUpTo =
|
|
17333
|
+
normalizedUpTo = index3 + 2;
|
|
17257
17334
|
}
|
|
17258
17335
|
} else if (normalized === void 0) {
|
|
17259
17336
|
if (normalizedUpTo - 2 >= 0) {
|
|
@@ -17282,7 +17359,7 @@ ${lanes.join("\n")}
|
|
|
17282
17359
|
seenNonDotDotSegment = true;
|
|
17283
17360
|
normalizedUpTo = segmentEnd;
|
|
17284
17361
|
}
|
|
17285
|
-
|
|
17362
|
+
index3 = segmentEnd + 1;
|
|
17286
17363
|
}
|
|
17287
17364
|
return normalized ?? (length2 > rootLength ? removeTrailingDirectorySeparator(path7) : path7);
|
|
17288
17365
|
}
|
|
@@ -30187,7 +30264,7 @@ ${lanes.join("\n")}
|
|
|
30187
30264
|
forEach(objectAllocatorPatchers, (fn2) => fn2(objectAllocator));
|
|
30188
30265
|
}
|
|
30189
30266
|
function formatStringFromArgs(text4, args2) {
|
|
30190
|
-
return text4.replace(/\{(\d+)\}/g, (_match,
|
|
30267
|
+
return text4.replace(/\{(\d+)\}/g, (_match, index3) => "" + Debug.checkDefined(args2[+index3]));
|
|
30191
30268
|
}
|
|
30192
30269
|
var localizedDiagnosticMessages;
|
|
30193
30270
|
function setLocalizedDiagnosticMessages(messages2) {
|
|
@@ -30346,8 +30423,8 @@ ${lanes.join("\n")}
|
|
|
30346
30423
|
return 0;
|
|
30347
30424
|
}
|
|
30348
30425
|
if (d1.relatedInformation && d2.relatedInformation) {
|
|
30349
|
-
return compareValues(d2.relatedInformation.length, d1.relatedInformation.length) || forEach(d1.relatedInformation, (d1i,
|
|
30350
|
-
const d2i = d2.relatedInformation[
|
|
30426
|
+
return compareValues(d2.relatedInformation.length, d1.relatedInformation.length) || forEach(d1.relatedInformation, (d1i, index3) => {
|
|
30427
|
+
const d2i = d2.relatedInformation[index3];
|
|
30351
30428
|
return compareDiagnostics(d1i, d2i);
|
|
30352
30429
|
}) || 0;
|
|
30353
30430
|
}
|
|
@@ -31459,9 +31536,9 @@ ${lanes.join("\n")}
|
|
|
31459
31536
|
return findBestPatternMatch(patterns, (_3) => _3, candidate);
|
|
31460
31537
|
}
|
|
31461
31538
|
function sliceAfter(arr, value) {
|
|
31462
|
-
const
|
|
31463
|
-
Debug.assert(
|
|
31464
|
-
return arr.slice(
|
|
31539
|
+
const index3 = arr.indexOf(value);
|
|
31540
|
+
Debug.assert(index3 !== -1);
|
|
31541
|
+
return arr.slice(index3);
|
|
31465
31542
|
}
|
|
31466
31543
|
function addRelatedInfo(diagnostic, ...relatedInformation) {
|
|
31467
31544
|
if (!relatedInformation.length) {
|
|
@@ -32874,12 +32951,12 @@ ${lanes.join("\n")}
|
|
|
32874
32951
|
let skipChildren;
|
|
32875
32952
|
return forEach(
|
|
32876
32953
|
resolvedProjectReferences2,
|
|
32877
|
-
(resolvedRef,
|
|
32954
|
+
(resolvedRef, index3) => {
|
|
32878
32955
|
if (resolvedRef && (seenResolvedRefs == null ? void 0 : seenResolvedRefs.has(resolvedRef.sourceFile.path))) {
|
|
32879
32956
|
(skipChildren ?? (skipChildren = /* @__PURE__ */ new Set())).add(resolvedRef);
|
|
32880
32957
|
return void 0;
|
|
32881
32958
|
}
|
|
32882
|
-
const result = cbResolvedRef(resolvedRef, parent2,
|
|
32959
|
+
const result = cbResolvedRef(resolvedRef, parent2, index3);
|
|
32883
32960
|
if (result || !resolvedRef) return result;
|
|
32884
32961
|
(seenResolvedRefs || (seenResolvedRefs = /* @__PURE__ */ new Set())).add(resolvedRef.sourceFile.path);
|
|
32885
32962
|
}
|
|
@@ -35740,7 +35817,7 @@ ${lanes.join("\n")}
|
|
|
35740
35817
|
node.flowNode = void 0;
|
|
35741
35818
|
return node;
|
|
35742
35819
|
}
|
|
35743
|
-
function createElementAccessExpression(expression,
|
|
35820
|
+
function createElementAccessExpression(expression, index3) {
|
|
35744
35821
|
const node = createBaseElementAccessExpression(
|
|
35745
35822
|
parenthesizerRules().parenthesizeLeftSideOfAccess(
|
|
35746
35823
|
expression,
|
|
@@ -35749,7 +35826,7 @@ ${lanes.join("\n")}
|
|
|
35749
35826
|
),
|
|
35750
35827
|
/*questionDotToken*/
|
|
35751
35828
|
void 0,
|
|
35752
|
-
asExpression(
|
|
35829
|
+
asExpression(index3)
|
|
35753
35830
|
);
|
|
35754
35831
|
if (isSuperKeyword(expression)) {
|
|
35755
35832
|
node.transformFlags |= 256 | 128;
|
|
@@ -35762,7 +35839,7 @@ ${lanes.join("\n")}
|
|
|
35762
35839
|
}
|
|
35763
35840
|
return node.expression !== expression || node.argumentExpression !== argumentExpression ? update(createElementAccessExpression(expression, argumentExpression), node) : node;
|
|
35764
35841
|
}
|
|
35765
|
-
function createElementAccessChain(expression, questionDotToken,
|
|
35842
|
+
function createElementAccessChain(expression, questionDotToken, index3) {
|
|
35766
35843
|
const node = createBaseElementAccessExpression(
|
|
35767
35844
|
parenthesizerRules().parenthesizeLeftSideOfAccess(
|
|
35768
35845
|
expression,
|
|
@@ -35770,7 +35847,7 @@ ${lanes.join("\n")}
|
|
|
35770
35847
|
true
|
|
35771
35848
|
),
|
|
35772
35849
|
questionDotToken,
|
|
35773
|
-
asExpression(
|
|
35850
|
+
asExpression(index3)
|
|
35774
35851
|
);
|
|
35775
35852
|
node.flags |= 64;
|
|
35776
35853
|
node.transformFlags |= 32;
|
|
@@ -51503,9 +51580,9 @@ ${lanes.join("\n")}
|
|
|
51503
51580
|
/* Ts */
|
|
51504
51581
|
)) {
|
|
51505
51582
|
const baseName = getBaseFileName(fileName);
|
|
51506
|
-
const
|
|
51507
|
-
if (
|
|
51508
|
-
return baseName.substring(
|
|
51583
|
+
const index3 = baseName.lastIndexOf(".d.");
|
|
51584
|
+
if (index3 >= 0) {
|
|
51585
|
+
return baseName.substring(index3);
|
|
51509
51586
|
}
|
|
51510
51587
|
}
|
|
51511
51588
|
return void 0;
|
|
@@ -54557,9 +54634,9 @@ ${lanes.join("\n")}
|
|
|
54557
54634
|
function getSubstitutedStringArrayWithConfigDirTemplate(list, basePath) {
|
|
54558
54635
|
if (!list) return list;
|
|
54559
54636
|
let result;
|
|
54560
|
-
list.forEach((element,
|
|
54637
|
+
list.forEach((element, index3) => {
|
|
54561
54638
|
if (!startsWithConfigDirTemplate(element)) return;
|
|
54562
|
-
(result ?? (result = list.slice()))[
|
|
54639
|
+
(result ?? (result = list.slice()))[index3] = getSubstitutedPathWithConfigDirTemplate(element, basePath);
|
|
54563
54640
|
});
|
|
54564
54641
|
return result;
|
|
54565
54642
|
}
|
|
@@ -54690,8 +54767,8 @@ ${lanes.join("\n")}
|
|
|
54690
54767
|
);
|
|
54691
54768
|
} else if (isArray3(value)) {
|
|
54692
54769
|
extendedConfigPath = [];
|
|
54693
|
-
for (let
|
|
54694
|
-
const fileName = value[
|
|
54770
|
+
for (let index3 = 0; index3 < value.length; index3++) {
|
|
54771
|
+
const fileName = value[index3];
|
|
54695
54772
|
if (isString(fileName)) {
|
|
54696
54773
|
extendedConfigPath = append(
|
|
54697
54774
|
extendedConfigPath,
|
|
@@ -54700,12 +54777,12 @@ ${lanes.join("\n")}
|
|
|
54700
54777
|
host,
|
|
54701
54778
|
newBase,
|
|
54702
54779
|
errors,
|
|
54703
|
-
valueExpression == null ? void 0 : valueExpression.elements[
|
|
54780
|
+
valueExpression == null ? void 0 : valueExpression.elements[index3],
|
|
54704
54781
|
sourceFile
|
|
54705
54782
|
)
|
|
54706
54783
|
);
|
|
54707
54784
|
} else {
|
|
54708
|
-
convertJsonOption(extendsOptionDeclaration.element, value, basePath, errors, propertyAssignment, valueExpression == null ? void 0 : valueExpression.elements[
|
|
54785
|
+
convertJsonOption(extendsOptionDeclaration.element, value, basePath, errors, propertyAssignment, valueExpression == null ? void 0 : valueExpression.elements[index3], sourceFile);
|
|
54709
54786
|
}
|
|
54710
54787
|
}
|
|
54711
54788
|
} else {
|
|
@@ -54952,7 +55029,7 @@ ${lanes.join("\n")}
|
|
|
54952
55029
|
}
|
|
54953
55030
|
}
|
|
54954
55031
|
function convertJsonOptionOfListType(option, values, basePath, errors, propertyAssignment, valueExpression, sourceFile) {
|
|
54955
|
-
return filter2(map(values, (v3,
|
|
55032
|
+
return filter2(map(values, (v3, index3) => convertJsonOption(option.element, v3, basePath, errors, propertyAssignment, valueExpression == null ? void 0 : valueExpression.elements[index3], sourceFile)), (v3) => option.listPreserveFalsyValues ? true : !!v3);
|
|
54956
55033
|
}
|
|
54957
55034
|
var invalidTrailingRecursionPattern = /(?:^|\/)\*\*\/?$/;
|
|
54958
55035
|
var wildcardDirectoryPattern = /^[^*?]*(?=\/[^/]*[*?])/;
|
|
@@ -58291,8 +58368,8 @@ ${lanes.join("\n")}
|
|
|
58291
58368
|
case 170:
|
|
58292
58369
|
Debug.assert(node.parent.kind === 318, "Impossible parameter parent kind", () => `parent is: ${Debug.formatSyntaxKind(node.parent.kind)}, expected JSDocFunctionType`);
|
|
58293
58370
|
const functionType = node.parent;
|
|
58294
|
-
const
|
|
58295
|
-
return "arg" +
|
|
58371
|
+
const index3 = functionType.parameters.indexOf(node);
|
|
58372
|
+
return "arg" + index3;
|
|
58296
58373
|
}
|
|
58297
58374
|
}
|
|
58298
58375
|
function getDisplayName(node) {
|
|
@@ -58359,11 +58436,11 @@ ${lanes.join("\n")}
|
|
|
58359
58436
|
relatedInformation.push(createDiagnosticForNode2(node, Diagnostics.Did_you_mean_0, `export type { ${unescapeLeadingUnderscores(node.name.escapedText)} }`));
|
|
58360
58437
|
}
|
|
58361
58438
|
const declarationName = getNameOfDeclaration(node) || node;
|
|
58362
|
-
forEach(symbol15.declarations, (declaration,
|
|
58439
|
+
forEach(symbol15.declarations, (declaration, index3) => {
|
|
58363
58440
|
const decl = getNameOfDeclaration(declaration) || declaration;
|
|
58364
58441
|
const diag3 = messageNeedsName ? createDiagnosticForNode2(decl, message, getDisplayName(declaration)) : createDiagnosticForNode2(decl, message);
|
|
58365
58442
|
file.bindDiagnostics.push(
|
|
58366
|
-
multipleDefaultExports ? addRelatedInfo(diag3, createDiagnosticForNode2(declarationName,
|
|
58443
|
+
multipleDefaultExports ? addRelatedInfo(diag3, createDiagnosticForNode2(declarationName, index3 === 0 ? Diagnostics.Another_export_default_is_here : Diagnostics.and_here)) : diag3
|
|
58367
58444
|
);
|
|
58368
58445
|
if (multipleDefaultExports) {
|
|
58369
58446
|
relatedInformation.push(createDiagnosticForNode2(decl, Diagnostics.The_first_export_default_is_here));
|
|
@@ -65337,7 +65414,7 @@ ${lanes.join("\n")}
|
|
|
65337
65414
|
const exportedSymbol = exports2 ? find(symbolsToArray(exports2), (symbol15) => !!getSymbolIfSameReference(symbol15, localSymbol)) : void 0;
|
|
65338
65415
|
const diagnostic = exportedSymbol ? error2(name14, Diagnostics.Module_0_declares_1_locally_but_it_is_exported_as_2, moduleName, declarationName, symbolToString(exportedSymbol)) : error2(name14, Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported, moduleName, declarationName);
|
|
65339
65416
|
if (localSymbol.declarations) {
|
|
65340
|
-
addRelatedInfo(diagnostic, ...map(localSymbol.declarations, (decl,
|
|
65417
|
+
addRelatedInfo(diagnostic, ...map(localSymbol.declarations, (decl, index3) => createDiagnosticForNode(decl, index3 === 0 ? Diagnostics._0_is_declared_here : Diagnostics.and_here, declarationName)));
|
|
65341
65418
|
}
|
|
65342
65419
|
}
|
|
65343
65420
|
} else {
|
|
@@ -66609,8 +66686,8 @@ ${lanes.join("\n")}
|
|
|
66609
66686
|
}
|
|
66610
66687
|
function getNamedOrIndexSignatureMembers(members) {
|
|
66611
66688
|
const result = getNamedMembers(members);
|
|
66612
|
-
const
|
|
66613
|
-
return
|
|
66689
|
+
const index3 = getIndexSymbolFromSymbolTable(members);
|
|
66690
|
+
return index3 ? concatenate(result, [index3]) : result;
|
|
66614
66691
|
}
|
|
66615
66692
|
function setStructuredTypeMembers(type, members, callSignatures, constructSignatures, indexInfos) {
|
|
66616
66693
|
const resolved = type;
|
|
@@ -69716,10 +69793,10 @@ ${lanes.join("\n")}
|
|
|
69716
69793
|
}
|
|
69717
69794
|
return typeParameterNodes;
|
|
69718
69795
|
}
|
|
69719
|
-
function lookupTypeParameterNodes(chain,
|
|
69796
|
+
function lookupTypeParameterNodes(chain, index3, context) {
|
|
69720
69797
|
var _a18;
|
|
69721
|
-
Debug.assert(chain && 0 <=
|
|
69722
|
-
const symbol15 = chain[
|
|
69798
|
+
Debug.assert(chain && 0 <= index3 && index3 < chain.length);
|
|
69799
|
+
const symbol15 = chain[index3];
|
|
69723
69800
|
const symbolId = getSymbolId(symbol15);
|
|
69724
69801
|
if ((_a18 = context.typeParameterSymbolList) == null ? void 0 : _a18.has(symbolId)) {
|
|
69725
69802
|
return void 0;
|
|
@@ -69730,9 +69807,9 @@ ${lanes.join("\n")}
|
|
|
69730
69807
|
}
|
|
69731
69808
|
context.typeParameterSymbolList.add(symbolId);
|
|
69732
69809
|
let typeParameterNodes;
|
|
69733
|
-
if (context.flags & 512 &&
|
|
69810
|
+
if (context.flags & 512 && index3 < chain.length - 1) {
|
|
69734
69811
|
const parentSymbol = symbol15;
|
|
69735
|
-
const nextSymbol = chain[
|
|
69812
|
+
const nextSymbol = chain[index3 + 1];
|
|
69736
69813
|
if (getCheckFlags(nextSymbol) & 1) {
|
|
69737
69814
|
const params = getTypeParametersOfClassOrInterface(
|
|
69738
69815
|
parentSymbol.flags & 2097152 ? resolveAlias(parentSymbol) : parentSymbol
|
|
@@ -69902,12 +69979,12 @@ ${lanes.join("\n")}
|
|
|
69902
69979
|
);
|
|
69903
69980
|
return factory.createTypeReferenceNode(entityName, lastTypeArgs);
|
|
69904
69981
|
}
|
|
69905
|
-
function createAccessFromSymbolChain(chain2,
|
|
69906
|
-
const typeParameterNodes =
|
|
69907
|
-
const symbol22 = chain2[
|
|
69908
|
-
const parent2 = chain2[
|
|
69982
|
+
function createAccessFromSymbolChain(chain2, index3, stopper) {
|
|
69983
|
+
const typeParameterNodes = index3 === chain2.length - 1 ? overrideTypeArguments : lookupTypeParameterNodes(chain2, index3, context);
|
|
69984
|
+
const symbol22 = chain2[index3];
|
|
69985
|
+
const parent2 = chain2[index3 - 1];
|
|
69909
69986
|
let symbolName2;
|
|
69910
|
-
if (
|
|
69987
|
+
if (index3 === 0) {
|
|
69911
69988
|
context.flags |= 16777216;
|
|
69912
69989
|
symbolName2 = getNameOfSymbolAsWritten(symbol22, context);
|
|
69913
69990
|
context.approximateLength += (symbolName2 ? symbolName2.length : 0) + 1;
|
|
@@ -69926,7 +70003,7 @@ ${lanes.join("\n")}
|
|
|
69926
70003
|
if (symbolName2 === void 0) {
|
|
69927
70004
|
const name14 = firstDefined(symbol22.declarations, getNameOfDeclaration);
|
|
69928
70005
|
if (name14 && isComputedPropertyName(name14) && isEntityName(name14.expression)) {
|
|
69929
|
-
const LHS = createAccessFromSymbolChain(chain2,
|
|
70006
|
+
const LHS = createAccessFromSymbolChain(chain2, index3 - 1, stopper);
|
|
69930
70007
|
if (isEntityName(LHS)) {
|
|
69931
70008
|
return factory.createIndexedAccessTypeNode(factory.createParenthesizedType(factory.createTypeQueryNode(LHS)), factory.createTypeQueryNode(name14.expression));
|
|
69932
70009
|
}
|
|
@@ -69936,7 +70013,7 @@ ${lanes.join("\n")}
|
|
|
69936
70013
|
}
|
|
69937
70014
|
context.approximateLength += symbolName2.length + 1;
|
|
69938
70015
|
if (!(context.flags & 16) && parent2 && getMembersOfSymbol(parent2) && getMembersOfSymbol(parent2).get(symbol22.escapedName) && getSymbolIfSameReference(getMembersOfSymbol(parent2).get(symbol22.escapedName), symbol22)) {
|
|
69939
|
-
const LHS = createAccessFromSymbolChain(chain2,
|
|
70016
|
+
const LHS = createAccessFromSymbolChain(chain2, index3 - 1, stopper);
|
|
69940
70017
|
if (isIndexedAccessTypeNode(LHS)) {
|
|
69941
70018
|
return factory.createIndexedAccessTypeNode(LHS, factory.createLiteralTypeNode(factory.createStringLiteral(symbolName2)));
|
|
69942
70019
|
} else {
|
|
@@ -69950,8 +70027,8 @@ ${lanes.join("\n")}
|
|
|
69950
70027
|
);
|
|
69951
70028
|
if (typeParameterNodes) setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes));
|
|
69952
70029
|
identifier.symbol = symbol22;
|
|
69953
|
-
if (
|
|
69954
|
-
const LHS = createAccessFromSymbolChain(chain2,
|
|
70030
|
+
if (index3 > stopper) {
|
|
70031
|
+
const LHS = createAccessFromSymbolChain(chain2, index3 - 1, stopper);
|
|
69955
70032
|
if (!isEntityName(LHS)) {
|
|
69956
70033
|
return Debug.fail("Impossible construct - an export of an indexed access cannot be reachable");
|
|
69957
70034
|
}
|
|
@@ -70028,14 +70105,14 @@ ${lanes.join("\n")}
|
|
|
70028
70105
|
context.encounteredError = true;
|
|
70029
70106
|
}
|
|
70030
70107
|
return createEntityNameFromSymbolChain(chain, chain.length - 1);
|
|
70031
|
-
function createEntityNameFromSymbolChain(chain2,
|
|
70032
|
-
const typeParameterNodes = lookupTypeParameterNodes(chain2,
|
|
70033
|
-
const symbol22 = chain2[
|
|
70034
|
-
if (
|
|
70108
|
+
function createEntityNameFromSymbolChain(chain2, index3) {
|
|
70109
|
+
const typeParameterNodes = lookupTypeParameterNodes(chain2, index3, context);
|
|
70110
|
+
const symbol22 = chain2[index3];
|
|
70111
|
+
if (index3 === 0) {
|
|
70035
70112
|
context.flags |= 16777216;
|
|
70036
70113
|
}
|
|
70037
70114
|
const symbolName2 = getNameOfSymbolAsWritten(symbol22, context);
|
|
70038
|
-
if (
|
|
70115
|
+
if (index3 === 0) {
|
|
70039
70116
|
context.flags ^= 16777216;
|
|
70040
70117
|
}
|
|
70041
70118
|
const identifier = setEmitFlags(
|
|
@@ -70045,20 +70122,20 @@ ${lanes.join("\n")}
|
|
|
70045
70122
|
);
|
|
70046
70123
|
if (typeParameterNodes) setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes));
|
|
70047
70124
|
identifier.symbol = symbol22;
|
|
70048
|
-
return
|
|
70125
|
+
return index3 > 0 ? factory.createQualifiedName(createEntityNameFromSymbolChain(chain2, index3 - 1), identifier) : identifier;
|
|
70049
70126
|
}
|
|
70050
70127
|
}
|
|
70051
70128
|
function symbolToExpression(symbol15, context, meaning) {
|
|
70052
70129
|
const chain = lookupSymbolChain(symbol15, context, meaning);
|
|
70053
70130
|
return createExpressionFromSymbolChain(chain, chain.length - 1);
|
|
70054
|
-
function createExpressionFromSymbolChain(chain2,
|
|
70055
|
-
const typeParameterNodes = lookupTypeParameterNodes(chain2,
|
|
70056
|
-
const symbol22 = chain2[
|
|
70057
|
-
if (
|
|
70131
|
+
function createExpressionFromSymbolChain(chain2, index3) {
|
|
70132
|
+
const typeParameterNodes = lookupTypeParameterNodes(chain2, index3, context);
|
|
70133
|
+
const symbol22 = chain2[index3];
|
|
70134
|
+
if (index3 === 0) {
|
|
70058
70135
|
context.flags |= 16777216;
|
|
70059
70136
|
}
|
|
70060
70137
|
let symbolName2 = getNameOfSymbolAsWritten(symbol22, context);
|
|
70061
|
-
if (
|
|
70138
|
+
if (index3 === 0) {
|
|
70062
70139
|
context.flags ^= 16777216;
|
|
70063
70140
|
}
|
|
70064
70141
|
let firstChar = symbolName2.charCodeAt(0);
|
|
@@ -70067,7 +70144,7 @@ ${lanes.join("\n")}
|
|
|
70067
70144
|
context.approximateLength += 2 + specifier.length;
|
|
70068
70145
|
return factory.createStringLiteral(specifier);
|
|
70069
70146
|
}
|
|
70070
|
-
if (
|
|
70147
|
+
if (index3 === 0 || canUsePropertyAccess(symbolName2, languageVersion)) {
|
|
70071
70148
|
const identifier = setEmitFlags(
|
|
70072
70149
|
factory.createIdentifier(symbolName2),
|
|
70073
70150
|
16777216
|
|
@@ -70076,7 +70153,7 @@ ${lanes.join("\n")}
|
|
|
70076
70153
|
if (typeParameterNodes) setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes));
|
|
70077
70154
|
identifier.symbol = symbol22;
|
|
70078
70155
|
context.approximateLength += 1 + symbolName2.length;
|
|
70079
|
-
return
|
|
70156
|
+
return index3 > 0 ? factory.createPropertyAccessExpression(createExpressionFromSymbolChain(chain2, index3 - 1), identifier) : identifier;
|
|
70080
70157
|
} else {
|
|
70081
70158
|
if (firstChar === 91) {
|
|
70082
70159
|
symbolName2 = symbolName2.substring(1, symbolName2.length - 1);
|
|
@@ -70107,7 +70184,7 @@ ${lanes.join("\n")}
|
|
|
70107
70184
|
expression = identifier;
|
|
70108
70185
|
}
|
|
70109
70186
|
context.approximateLength += 2;
|
|
70110
|
-
return factory.createElementAccessExpression(createExpressionFromSymbolChain(chain2,
|
|
70187
|
+
return factory.createElementAccessExpression(createExpressionFromSymbolChain(chain2, index3 - 1), expression);
|
|
70111
70188
|
}
|
|
70112
70189
|
}
|
|
70113
70190
|
}
|
|
@@ -70661,9 +70738,9 @@ ${lanes.join("\n")}
|
|
|
70661
70738
|
return statements;
|
|
70662
70739
|
}
|
|
70663
70740
|
function inlineExportModifiers(statements) {
|
|
70664
|
-
const
|
|
70665
|
-
if (
|
|
70666
|
-
const exportDecl = statements[
|
|
70741
|
+
const index3 = findIndex(statements, (d2) => isExportDeclaration(d2) && !d2.moduleSpecifier && !d2.attributes && !!d2.exportClause && isNamedExports(d2.exportClause));
|
|
70742
|
+
if (index3 >= 0) {
|
|
70743
|
+
const exportDecl = statements[index3];
|
|
70667
70744
|
const replacements = mapDefined(exportDecl.exportClause.elements, (e) => {
|
|
70668
70745
|
if (!e.propertyName && e.name.kind !== 11) {
|
|
70669
70746
|
const name14 = e.name;
|
|
@@ -70679,9 +70756,9 @@ ${lanes.join("\n")}
|
|
|
70679
70756
|
return e;
|
|
70680
70757
|
});
|
|
70681
70758
|
if (!length(replacements)) {
|
|
70682
|
-
orderedRemoveItemAt(statements,
|
|
70759
|
+
orderedRemoveItemAt(statements, index3);
|
|
70683
70760
|
} else {
|
|
70684
|
-
statements[
|
|
70761
|
+
statements[index3] = factory.updateExportDeclaration(
|
|
70685
70762
|
exportDecl,
|
|
70686
70763
|
exportDecl.modifiers,
|
|
70687
70764
|
exportDecl.isTypeOnly,
|
|
@@ -72945,12 +73022,12 @@ ${lanes.join("\n")}
|
|
|
72945
73022
|
}
|
|
72946
73023
|
} else {
|
|
72947
73024
|
const elementType = checkIteratedTypeOrElementType(65 | (declaration.dotDotDotToken ? 0 : 128), parentType, undefinedType, pattern);
|
|
72948
|
-
const
|
|
73025
|
+
const index3 = pattern.elements.indexOf(declaration);
|
|
72949
73026
|
if (declaration.dotDotDotToken) {
|
|
72950
73027
|
const baseConstraint = mapType(parentType, (t2) => t2.flags & 58982400 ? getBaseConstraintOrType(t2) : t2);
|
|
72951
|
-
type = everyType(baseConstraint, isTupleType) ? mapType(baseConstraint, (t2) => sliceTupleType(t2,
|
|
73028
|
+
type = everyType(baseConstraint, isTupleType) ? mapType(baseConstraint, (t2) => sliceTupleType(t2, index3)) : createArrayType(elementType);
|
|
72952
73029
|
} else if (isArrayLikeType(parentType)) {
|
|
72953
|
-
const indexType = getNumberLiteralType(
|
|
73030
|
+
const indexType = getNumberLiteralType(index3);
|
|
72954
73031
|
const declaredType = getIndexedAccessTypeOrUndefined(parentType, indexType, accessFlags, declaration.name) || errorType;
|
|
72955
73032
|
type = getFlowTypeOfDestructuring(declaration, declaredType);
|
|
72956
73033
|
} else {
|
|
@@ -75381,10 +75458,10 @@ ${lanes.join("\n")}
|
|
|
75381
75458
|
}
|
|
75382
75459
|
return mixinFlags;
|
|
75383
75460
|
}
|
|
75384
|
-
function includeMixinType(type, types, mixinFlags,
|
|
75461
|
+
function includeMixinType(type, types, mixinFlags, index3) {
|
|
75385
75462
|
const mixedTypes = [];
|
|
75386
75463
|
for (let i3 = 0; i3 < types.length; i3++) {
|
|
75387
|
-
if (i3 ===
|
|
75464
|
+
if (i3 === index3) {
|
|
75388
75465
|
mixedTypes.push(type);
|
|
75389
75466
|
} else if (mixinFlags[i3]) {
|
|
75390
75467
|
mixedTypes.push(getReturnTypeOfSignature(getSignaturesOfType(
|
|
@@ -77311,9 +77388,9 @@ ${lanes.join("\n")}
|
|
|
77311
77388
|
const typeReference = grandParent;
|
|
77312
77389
|
const typeParameters = getTypeParametersForTypeReferenceOrImport(typeReference);
|
|
77313
77390
|
if (typeParameters) {
|
|
77314
|
-
const
|
|
77315
|
-
if (
|
|
77316
|
-
const declaredConstraint = getConstraintOfTypeParameter(typeParameters[
|
|
77391
|
+
const index3 = typeReference.typeArguments.indexOf(childTypeParameter);
|
|
77392
|
+
if (index3 < typeParameters.length) {
|
|
77393
|
+
const declaredConstraint = getConstraintOfTypeParameter(typeParameters[index3]);
|
|
77317
77394
|
if (declaredConstraint) {
|
|
77318
77395
|
const mapper = makeDeferredTypeMapper(
|
|
77319
77396
|
typeParameters,
|
|
@@ -78574,23 +78651,23 @@ ${lanes.join("\n")}
|
|
|
78574
78651
|
expandedDeclarations.push(declaration);
|
|
78575
78652
|
}
|
|
78576
78653
|
}
|
|
78577
|
-
function sliceTupleType(type,
|
|
78654
|
+
function sliceTupleType(type, index3, endSkipCount = 0) {
|
|
78578
78655
|
const target = type.target;
|
|
78579
78656
|
const endIndex = getTypeReferenceArity(type) - endSkipCount;
|
|
78580
|
-
return
|
|
78581
|
-
getTypeArguments(type).slice(
|
|
78582
|
-
target.elementFlags.slice(
|
|
78657
|
+
return index3 > target.fixedLength ? getRestArrayTypeOfTupleType(type) || createTupleType(emptyArray) : createTupleType(
|
|
78658
|
+
getTypeArguments(type).slice(index3, endIndex),
|
|
78659
|
+
target.elementFlags.slice(index3, endIndex),
|
|
78583
78660
|
/*readonly*/
|
|
78584
78661
|
false,
|
|
78585
|
-
target.labeledElementDeclarations && target.labeledElementDeclarations.slice(
|
|
78662
|
+
target.labeledElementDeclarations && target.labeledElementDeclarations.slice(index3, endIndex)
|
|
78586
78663
|
);
|
|
78587
78664
|
}
|
|
78588
78665
|
function getKnownKeysOfTupleType(type) {
|
|
78589
78666
|
return getUnionType(append(arrayOf(type.target.fixedLength, (i3) => getStringLiteralType("" + i3)), getIndexType(type.target.readonly ? globalReadonlyArrayType : globalArrayType)));
|
|
78590
78667
|
}
|
|
78591
78668
|
function getStartElementCount(type, flags2) {
|
|
78592
|
-
const
|
|
78593
|
-
return
|
|
78669
|
+
const index3 = findIndex(type.elementFlags, (f3) => !(f3 & flags2));
|
|
78670
|
+
return index3 >= 0 ? index3 : type.elementFlags.length;
|
|
78594
78671
|
}
|
|
78595
78672
|
function getEndElementCount(type, flags2) {
|
|
78596
78673
|
return type.elementFlags.length - findLastIndex(type.elementFlags, (f3) => !(f3 & flags2)) - 1;
|
|
@@ -78621,9 +78698,9 @@ ${lanes.join("\n")}
|
|
|
78621
78698
|
return binarySearch(types, type, getTypeId, compareValues) >= 0;
|
|
78622
78699
|
}
|
|
78623
78700
|
function insertType(types, type) {
|
|
78624
|
-
const
|
|
78625
|
-
if (
|
|
78626
|
-
types.splice(~
|
|
78701
|
+
const index3 = binarySearch(types, type, getTypeId, compareValues);
|
|
78702
|
+
if (index3 < 0) {
|
|
78703
|
+
types.splice(~index3, 0, type);
|
|
78627
78704
|
return true;
|
|
78628
78705
|
}
|
|
78629
78706
|
return false;
|
|
@@ -78640,9 +78717,9 @@ ${lanes.join("\n")}
|
|
|
78640
78717
|
if (!(getObjectFlags(type) & 65536)) includes |= 4194304;
|
|
78641
78718
|
} else {
|
|
78642
78719
|
const len = typeSet.length;
|
|
78643
|
-
const
|
|
78644
|
-
if (
|
|
78645
|
-
typeSet.splice(~
|
|
78720
|
+
const index3 = len && type.id > typeSet[len - 1].id ? ~len : binarySearch(typeSet, type, getTypeId, compareValues);
|
|
78721
|
+
if (index3 < 0) {
|
|
78722
|
+
typeSet.splice(~index3, 0, type);
|
|
78646
78723
|
}
|
|
78647
78724
|
}
|
|
78648
78725
|
}
|
|
@@ -78744,17 +78821,17 @@ ${lanes.join("\n")}
|
|
|
78744
78821
|
const typeVariables = [];
|
|
78745
78822
|
for (const type of types) {
|
|
78746
78823
|
if (type.flags & 2097152 && getObjectFlags(type) & 67108864) {
|
|
78747
|
-
const
|
|
78748
|
-
pushIfUnique(typeVariables, type.types[
|
|
78824
|
+
const index3 = type.types[0].flags & 8650752 ? 0 : 1;
|
|
78825
|
+
pushIfUnique(typeVariables, type.types[index3]);
|
|
78749
78826
|
}
|
|
78750
78827
|
}
|
|
78751
78828
|
for (const typeVariable of typeVariables) {
|
|
78752
78829
|
const primitives = [];
|
|
78753
78830
|
for (const type of types) {
|
|
78754
78831
|
if (type.flags & 2097152 && getObjectFlags(type) & 67108864) {
|
|
78755
|
-
const
|
|
78756
|
-
if (type.types[
|
|
78757
|
-
insertType(primitives, type.types[1 -
|
|
78832
|
+
const index3 = type.types[0].flags & 8650752 ? 0 : 1;
|
|
78833
|
+
if (type.types[index3] === typeVariable) {
|
|
78834
|
+
insertType(primitives, type.types[1 - index3]);
|
|
78758
78835
|
}
|
|
78759
78836
|
}
|
|
78760
78837
|
}
|
|
@@ -78765,8 +78842,8 @@ ${lanes.join("\n")}
|
|
|
78765
78842
|
i3--;
|
|
78766
78843
|
const type = types[i3];
|
|
78767
78844
|
if (type.flags & 2097152 && getObjectFlags(type) & 67108864) {
|
|
78768
|
-
const
|
|
78769
|
-
if (type.types[
|
|
78845
|
+
const index3 = type.types[0].flags & 8650752 ? 0 : 1;
|
|
78846
|
+
if (type.types[index3] === typeVariable && containsType(primitives, type.types[1 - index3])) {
|
|
78770
78847
|
orderedRemoveItemAt(types, i3);
|
|
78771
78848
|
}
|
|
78772
78849
|
}
|
|
@@ -78804,8 +78881,8 @@ ${lanes.join("\n")}
|
|
|
78804
78881
|
}
|
|
78805
78882
|
if (types.length === 2 && !origin && (types[0].flags & 1048576 || types[1].flags & 1048576)) {
|
|
78806
78883
|
const infix = unionReduction === 0 ? "N" : unionReduction === 2 ? "S" : "L";
|
|
78807
|
-
const
|
|
78808
|
-
const id = types[
|
|
78884
|
+
const index3 = types[0].id < types[1].id ? 0 : 1;
|
|
78885
|
+
const id = types[index3].id + infix + types[1 - index3].id + getAliasId(aliasSymbol, aliasTypeArguments);
|
|
78809
78886
|
let type = unionOfUnionTypes.get(id);
|
|
78810
78887
|
if (!type) {
|
|
78811
78888
|
type = getUnionTypeWorker(
|
|
@@ -79033,15 +79110,15 @@ ${lanes.join("\n")}
|
|
|
79033
79110
|
}
|
|
79034
79111
|
function intersectUnionsOfPrimitiveTypes(types) {
|
|
79035
79112
|
let unionTypes2;
|
|
79036
|
-
const
|
|
79037
|
-
if (
|
|
79113
|
+
const index3 = findIndex(types, (t2) => !!(getObjectFlags(t2) & 32768));
|
|
79114
|
+
if (index3 < 0) {
|
|
79038
79115
|
return false;
|
|
79039
79116
|
}
|
|
79040
|
-
let i3 =
|
|
79117
|
+
let i3 = index3 + 1;
|
|
79041
79118
|
while (i3 < types.length) {
|
|
79042
79119
|
const t2 = types[i3];
|
|
79043
79120
|
if (getObjectFlags(t2) & 32768) {
|
|
79044
|
-
(unionTypes2 || (unionTypes2 = [types[
|
|
79121
|
+
(unionTypes2 || (unionTypes2 = [types[index3]])).push(t2);
|
|
79045
79122
|
orderedRemoveItemAt(types, i3);
|
|
79046
79123
|
} else {
|
|
79047
79124
|
i3++;
|
|
@@ -79068,7 +79145,7 @@ ${lanes.join("\n")}
|
|
|
79068
79145
|
}
|
|
79069
79146
|
}
|
|
79070
79147
|
}
|
|
79071
|
-
types[
|
|
79148
|
+
types[index3] = getUnionTypeFromSortedList(
|
|
79072
79149
|
result,
|
|
79073
79150
|
32768
|
|
79074
79151
|
/* PrimitiveUnion */
|
|
@@ -79587,11 +79664,11 @@ ${lanes.join("\n")}
|
|
|
79587
79664
|
return accessExpression && getAssignmentTargetKind(accessExpression) !== 1 ? getFlowTypeOfReference(accessExpression, propType) : accessNode && isIndexedAccessTypeNode(accessNode) && containsMissingType(propType) ? getUnionType([propType, undefinedType]) : propType;
|
|
79588
79665
|
}
|
|
79589
79666
|
if (everyType(objectType, isTupleType) && isNumericLiteralName(propName)) {
|
|
79590
|
-
const
|
|
79667
|
+
const index3 = +propName;
|
|
79591
79668
|
if (accessNode && everyType(objectType, (t2) => !(t2.target.combinedFlags & 12)) && !(accessFlags & 16)) {
|
|
79592
79669
|
const indexNode = getIndexNodeForAccessExpression(accessNode);
|
|
79593
79670
|
if (isTupleType(objectType)) {
|
|
79594
|
-
if (
|
|
79671
|
+
if (index3 < 0) {
|
|
79595
79672
|
error2(indexNode, Diagnostics.A_tuple_type_cannot_be_indexed_with_a_negative_value);
|
|
79596
79673
|
return undefinedType;
|
|
79597
79674
|
}
|
|
@@ -79600,9 +79677,9 @@ ${lanes.join("\n")}
|
|
|
79600
79677
|
error2(indexNode, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(propName), typeToString(objectType));
|
|
79601
79678
|
}
|
|
79602
79679
|
}
|
|
79603
|
-
if (
|
|
79680
|
+
if (index3 >= 0) {
|
|
79604
79681
|
errorIfWritingToReadonlyIndex(getIndexInfoOfType(objectType, numberType));
|
|
79605
|
-
return getTupleElementTypeOutOfStartCount(objectType,
|
|
79682
|
+
return getTupleElementTypeOutOfStartCount(objectType, index3, accessFlags & 1 ? missingType : void 0);
|
|
79606
79683
|
}
|
|
79607
79684
|
}
|
|
79608
79685
|
}
|
|
@@ -79884,11 +79961,11 @@ ${lanes.join("\n")}
|
|
|
79884
79961
|
function isIntersectionEmpty(type1, type2) {
|
|
79885
79962
|
return !!(getUnionType([intersectTypes(type1, type2), neverType]).flags & 131072);
|
|
79886
79963
|
}
|
|
79887
|
-
function substituteIndexedMappedType(objectType,
|
|
79888
|
-
const mapper = createTypeMapper([getTypeParameterFromMappedType(objectType)], [
|
|
79964
|
+
function substituteIndexedMappedType(objectType, index3) {
|
|
79965
|
+
const mapper = createTypeMapper([getTypeParameterFromMappedType(objectType)], [index3]);
|
|
79889
79966
|
const templateMapper = combineTypeMappers(objectType.mapper, mapper);
|
|
79890
79967
|
const instantiatedTemplateType = instantiateType(getTemplateTypeFromMappedType(objectType.target || objectType), templateMapper);
|
|
79891
|
-
const isOptional = getMappedTypeOptionality(objectType) > 0 || (isGenericType(objectType) ? getCombinedMappedTypeOptionality(getModifiersTypeFromMappedType(objectType)) > 0 : couldAccessOptionalProperty(objectType,
|
|
79968
|
+
const isOptional = getMappedTypeOptionality(objectType) > 0 || (isGenericType(objectType) ? getCombinedMappedTypeOptionality(getModifiersTypeFromMappedType(objectType)) > 0 : couldAccessOptionalProperty(objectType, index3));
|
|
79892
79969
|
return addOptionality(
|
|
79893
79970
|
instantiatedTemplateType,
|
|
79894
79971
|
/*isProperty*/
|
|
@@ -79912,8 +79989,8 @@ ${lanes.join("\n")}
|
|
|
79912
79989
|
if (t2.flags & 384) {
|
|
79913
79990
|
const propName = getPropertyNameFromType(t2);
|
|
79914
79991
|
if (isNumericLiteralName(propName)) {
|
|
79915
|
-
const
|
|
79916
|
-
return
|
|
79992
|
+
const index3 = +propName;
|
|
79993
|
+
return index3 >= 0 && index3 < limit3;
|
|
79917
79994
|
}
|
|
79918
79995
|
}
|
|
79919
79996
|
return false;
|
|
@@ -80762,8 +80839,8 @@ ${lanes.join("\n")}
|
|
|
80762
80839
|
void 0
|
|
80763
80840
|
);
|
|
80764
80841
|
}
|
|
80765
|
-
function createBackreferenceMapper(context,
|
|
80766
|
-
const forwardInferences = context.inferences.slice(
|
|
80842
|
+
function createBackreferenceMapper(context, index3) {
|
|
80843
|
+
const forwardInferences = context.inferences.slice(index3);
|
|
80767
80844
|
return createTypeMapper(map(forwardInferences, (i3) => i3.typeParameter), map(forwardInferences, () => unknownType));
|
|
80768
80845
|
}
|
|
80769
80846
|
function createOuterReturnMapper(context) {
|
|
@@ -81089,12 +81166,12 @@ ${lanes.join("\n")}
|
|
|
81089
81166
|
error2(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite);
|
|
81090
81167
|
return errorType;
|
|
81091
81168
|
}
|
|
81092
|
-
const
|
|
81093
|
-
if (
|
|
81169
|
+
const index3 = findActiveMapper(mapper);
|
|
81170
|
+
if (index3 === -1) {
|
|
81094
81171
|
pushActiveMapper(mapper);
|
|
81095
81172
|
}
|
|
81096
81173
|
const key = type.id + getAliasId(aliasSymbol, aliasTypeArguments);
|
|
81097
|
-
const mapperCache = activeTypeMappersCaches[
|
|
81174
|
+
const mapperCache = activeTypeMappersCaches[index3 !== -1 ? index3 : activeTypeMappersCount - 1];
|
|
81098
81175
|
const cached = mapperCache.get(key);
|
|
81099
81176
|
if (cached) {
|
|
81100
81177
|
return cached;
|
|
@@ -81103,7 +81180,7 @@ ${lanes.join("\n")}
|
|
|
81103
81180
|
instantiationCount++;
|
|
81104
81181
|
instantiationDepth++;
|
|
81105
81182
|
const result = instantiateTypeWorker(type, mapper, aliasSymbol, aliasTypeArguments);
|
|
81106
|
-
if (
|
|
81183
|
+
if (index3 === -1) {
|
|
81107
81184
|
popActiveMapper();
|
|
81108
81185
|
} else {
|
|
81109
81186
|
mapperCache.set(key, result);
|
|
@@ -84995,12 +85072,12 @@ ${lanes.join("\n")}
|
|
|
84995
85072
|
for (const t2 of getTypeArguments(type)) {
|
|
84996
85073
|
if (t2.flags & 262144) {
|
|
84997
85074
|
if (ignoreConstraints || isUnconstrainedTypeParameter(t2)) {
|
|
84998
|
-
let
|
|
84999
|
-
if (
|
|
85000
|
-
|
|
85075
|
+
let index3 = typeParameters.indexOf(t2);
|
|
85076
|
+
if (index3 < 0) {
|
|
85077
|
+
index3 = typeParameters.length;
|
|
85001
85078
|
typeParameters.push(t2);
|
|
85002
85079
|
}
|
|
85003
|
-
result += "=" +
|
|
85080
|
+
result += "=" + index3;
|
|
85004
85081
|
continue;
|
|
85005
85082
|
}
|
|
85006
85083
|
constraintMarker = "*";
|
|
@@ -85323,13 +85400,13 @@ ${lanes.join("\n")}
|
|
|
85323
85400
|
function isArrayOrTupleLikeType(type) {
|
|
85324
85401
|
return isArrayLikeType(type) || isTupleLikeType(type);
|
|
85325
85402
|
}
|
|
85326
|
-
function getTupleElementType(type,
|
|
85327
|
-
const propType = getTypeOfPropertyOfType(type, "" +
|
|
85403
|
+
function getTupleElementType(type, index3) {
|
|
85404
|
+
const propType = getTypeOfPropertyOfType(type, "" + index3);
|
|
85328
85405
|
if (propType) {
|
|
85329
85406
|
return propType;
|
|
85330
85407
|
}
|
|
85331
85408
|
if (everyType(type, isTupleType)) {
|
|
85332
|
-
return getTupleElementTypeOutOfStartCount(type,
|
|
85409
|
+
return getTupleElementTypeOutOfStartCount(type, index3, compilerOptions.noUncheckedIndexedAccess ? undefinedType : void 0);
|
|
85333
85410
|
}
|
|
85334
85411
|
return void 0;
|
|
85335
85412
|
}
|
|
@@ -85397,14 +85474,14 @@ ${lanes.join("\n")}
|
|
|
85397
85474
|
function getRestTypeOfTupleType(type) {
|
|
85398
85475
|
return getElementTypeOfSliceOfTupleType(type, type.target.fixedLength);
|
|
85399
85476
|
}
|
|
85400
|
-
function getTupleElementTypeOutOfStartCount(type,
|
|
85477
|
+
function getTupleElementTypeOutOfStartCount(type, index3, undefinedOrMissingType2) {
|
|
85401
85478
|
return mapType(type, (t2) => {
|
|
85402
85479
|
const tupleType = t2;
|
|
85403
85480
|
const restType = getRestTypeOfTupleType(tupleType);
|
|
85404
85481
|
if (!restType) {
|
|
85405
85482
|
return undefinedType;
|
|
85406
85483
|
}
|
|
85407
|
-
if (undefinedOrMissingType2 &&
|
|
85484
|
+
if (undefinedOrMissingType2 && index3 >= getTotalFixedElementCount(tupleType.target)) {
|
|
85408
85485
|
return getUnionType([restType, undefinedOrMissingType2]);
|
|
85409
85486
|
}
|
|
85410
85487
|
return restType;
|
|
@@ -85414,12 +85491,12 @@ ${lanes.join("\n")}
|
|
|
85414
85491
|
const restType = getRestTypeOfTupleType(type);
|
|
85415
85492
|
return restType && createArrayType(restType);
|
|
85416
85493
|
}
|
|
85417
|
-
function getElementTypeOfSliceOfTupleType(type,
|
|
85494
|
+
function getElementTypeOfSliceOfTupleType(type, index3, endSkipCount = 0, writing = false, noReductions = false) {
|
|
85418
85495
|
const length2 = getTypeReferenceArity(type) - endSkipCount;
|
|
85419
|
-
if (
|
|
85496
|
+
if (index3 < length2) {
|
|
85420
85497
|
const typeArguments = getTypeArguments(type);
|
|
85421
85498
|
const elementTypes = [];
|
|
85422
|
-
for (let i3 =
|
|
85499
|
+
for (let i3 = index3; i3 < length2; i3++) {
|
|
85423
85500
|
const t2 = typeArguments[i3];
|
|
85424
85501
|
elementTypes.push(type.target.elementFlags[i3] & 8 ? getIndexedAccessType(t2, numberType) : t2);
|
|
85425
85502
|
}
|
|
@@ -86259,8 +86336,8 @@ ${lanes.join("\n")}
|
|
|
86259
86336
|
}
|
|
86260
86337
|
addMatch(lastSourceIndex, getSourceText(lastSourceIndex).length);
|
|
86261
86338
|
return matches;
|
|
86262
|
-
function getSourceText(
|
|
86263
|
-
return
|
|
86339
|
+
function getSourceText(index3) {
|
|
86340
|
+
return index3 < lastSourceIndex ? sourceTexts[index3] : remainingEndText;
|
|
86264
86341
|
}
|
|
86265
86342
|
function addMatch(s4, p12) {
|
|
86266
86343
|
const matchType = s4 === seg ? getStringLiteralType(getSourceText(s4).slice(pos, p12)) : getTemplateLiteralType(
|
|
@@ -86980,8 +87057,8 @@ ${lanes.join("\n")}
|
|
|
86980
87057
|
) : getCommonSupertype(baseCandidates);
|
|
86981
87058
|
return getWidenedType(unwidenedType);
|
|
86982
87059
|
}
|
|
86983
|
-
function getInferredType(context,
|
|
86984
|
-
const inference = context.inferences[
|
|
87060
|
+
function getInferredType(context, index3) {
|
|
87061
|
+
const inference = context.inferences[index3];
|
|
86985
87062
|
if (!inference.inferredType) {
|
|
86986
87063
|
let inferredType;
|
|
86987
87064
|
let fallbackType;
|
|
@@ -86997,7 +87074,7 @@ ${lanes.join("\n")}
|
|
|
86997
87074
|
} else {
|
|
86998
87075
|
const defaultType = getDefaultFromTypeParameter(inference.typeParameter);
|
|
86999
87076
|
if (defaultType) {
|
|
87000
|
-
inferredType = instantiateType(defaultType, mergeTypeMappers(createBackreferenceMapper(context,
|
|
87077
|
+
inferredType = instantiateType(defaultType, mergeTypeMappers(createBackreferenceMapper(context, index3), context.nonFixingMapper));
|
|
87001
87078
|
}
|
|
87002
87079
|
}
|
|
87003
87080
|
} else {
|
|
@@ -87526,8 +87603,8 @@ ${lanes.join("\n")}
|
|
|
87526
87603
|
const text4 = getPropertyNameFromType(nameType);
|
|
87527
87604
|
return getTypeOfPropertyOfType(type, text4) || includeUndefinedInIndexSignature((_a18 = getApplicableIndexInfoForName(type, text4)) == null ? void 0 : _a18.type) || errorType;
|
|
87528
87605
|
}
|
|
87529
|
-
function getTypeOfDestructuredArrayElement(type,
|
|
87530
|
-
return everyType(type, isTupleLikeType) && getTupleElementType(type,
|
|
87606
|
+
function getTypeOfDestructuredArrayElement(type, index3) {
|
|
87607
|
+
return everyType(type, isTupleLikeType) && getTupleElementType(type, index3) || includeUndefinedInIndexSignature(checkIteratedTypeOrElementType(
|
|
87531
87608
|
65,
|
|
87532
87609
|
type,
|
|
87533
87610
|
undefinedType,
|
|
@@ -89998,8 +90075,8 @@ ${lanes.join("\n")}
|
|
|
89998
90075
|
void 0,
|
|
89999
90076
|
location2.flowNode
|
|
90000
90077
|
);
|
|
90001
|
-
const
|
|
90002
|
-
return getIndexedAccessType(narrowedType, getNumberLiteralType(
|
|
90078
|
+
const index3 = func2.parameters.indexOf(declaration) - (getThisParameter(func2) ? 1 : 0);
|
|
90079
|
+
return getIndexedAccessType(narrowedType, getNumberLiteralType(index3));
|
|
90003
90080
|
}
|
|
90004
90081
|
}
|
|
90005
90082
|
}
|
|
@@ -90685,8 +90762,8 @@ ${lanes.join("\n")}
|
|
|
90685
90762
|
}
|
|
90686
90763
|
const contextualSignature = getContextualSignature(func2);
|
|
90687
90764
|
if (contextualSignature) {
|
|
90688
|
-
const
|
|
90689
|
-
return parameter.dotDotDotToken && lastOrUndefined(func2.parameters) === parameter ? getRestTypeAtPosition(contextualSignature,
|
|
90765
|
+
const index3 = func2.parameters.indexOf(parameter) - (getThisParameter(func2) ? 1 : 0);
|
|
90766
|
+
return parameter.dotDotDotToken && lastOrUndefined(func2.parameters) === parameter ? getRestTypeAtPosition(contextualSignature, index3) : tryGetTypeAtPosition(contextualSignature, index3);
|
|
90690
90767
|
}
|
|
90691
90768
|
}
|
|
90692
90769
|
function getContextualTypeForVariableLikeDeclaration(declaration, contextFlags) {
|
|
@@ -90715,9 +90792,9 @@ ${lanes.join("\n")}
|
|
|
90715
90792
|
);
|
|
90716
90793
|
if (!parentType || isBindingPattern(name14) || isComputedNonLiteralName(name14)) return void 0;
|
|
90717
90794
|
if (parent2.name.kind === 208) {
|
|
90718
|
-
const
|
|
90719
|
-
if (
|
|
90720
|
-
return getContextualTypeForElementExpression(parentType,
|
|
90795
|
+
const index3 = indexOfNode(declaration.parent.elements, declaration);
|
|
90796
|
+
if (index3 < 0) return void 0;
|
|
90797
|
+
return getContextualTypeForElementExpression(parentType, index3);
|
|
90721
90798
|
}
|
|
90722
90799
|
const nameType = getLiteralTypeFromPropertyName(name14);
|
|
90723
90800
|
if (isTypeUsableAsPropertyName(nameType)) {
|
|
@@ -91240,15 +91317,15 @@ ${lanes.join("\n")}
|
|
|
91240
91317
|
}
|
|
91241
91318
|
return { first: first2, last: last2 };
|
|
91242
91319
|
}
|
|
91243
|
-
function getContextualTypeForElementExpression(type,
|
|
91320
|
+
function getContextualTypeForElementExpression(type, index3, length2, firstSpreadIndex, lastSpreadIndex) {
|
|
91244
91321
|
return type && mapType(
|
|
91245
91322
|
type,
|
|
91246
91323
|
(t2) => {
|
|
91247
91324
|
if (isTupleType(t2)) {
|
|
91248
|
-
if ((firstSpreadIndex === void 0 ||
|
|
91249
|
-
return removeMissingType(getTypeArguments(t2)[
|
|
91325
|
+
if ((firstSpreadIndex === void 0 || index3 < firstSpreadIndex) && index3 < t2.target.fixedLength) {
|
|
91326
|
+
return removeMissingType(getTypeArguments(t2)[index3], !!(t2.target.elementFlags[index3] && 2));
|
|
91250
91327
|
}
|
|
91251
|
-
const offset = length2 !== void 0 && (lastSpreadIndex === void 0 ||
|
|
91328
|
+
const offset = length2 !== void 0 && (lastSpreadIndex === void 0 || index3 > lastSpreadIndex) ? length2 - index3 : 0;
|
|
91252
91329
|
const fixedEndLength = offset > 0 && t2.target.combinedFlags & 12 ? getEndElementCount(
|
|
91253
91330
|
t2.target,
|
|
91254
91331
|
3
|
|
@@ -91267,7 +91344,7 @@ ${lanes.join("\n")}
|
|
|
91267
91344
|
true
|
|
91268
91345
|
);
|
|
91269
91346
|
}
|
|
91270
|
-
return (!firstSpreadIndex ||
|
|
91347
|
+
return (!firstSpreadIndex || index3 < firstSpreadIndex) && getTypeOfPropertyOfContextualType(t2, "" + index3) || getIteratedTypeOrElementType(
|
|
91271
91348
|
1,
|
|
91272
91349
|
t2,
|
|
91273
91350
|
undefinedType,
|
|
@@ -91465,13 +91542,13 @@ ${lanes.join("\n")}
|
|
|
91465
91542
|
if (node.flags & 67108864) {
|
|
91466
91543
|
return void 0;
|
|
91467
91544
|
}
|
|
91468
|
-
const
|
|
91545
|
+
const index3 = findContextualNode(
|
|
91469
91546
|
node,
|
|
91470
91547
|
/*includeCaches*/
|
|
91471
91548
|
!contextFlags
|
|
91472
91549
|
);
|
|
91473
|
-
if (
|
|
91474
|
-
return contextualTypes[
|
|
91550
|
+
if (index3 >= 0) {
|
|
91551
|
+
return contextualTypes[index3];
|
|
91475
91552
|
}
|
|
91476
91553
|
const { parent: parent2 } = node;
|
|
91477
91554
|
switch (parent2.kind) {
|
|
@@ -91629,13 +91706,13 @@ ${lanes.join("\n")}
|
|
|
91629
91706
|
}
|
|
91630
91707
|
function getContextualJsxElementAttributesType(node, contextFlags) {
|
|
91631
91708
|
if (isJsxOpeningElement(node) && contextFlags !== 4) {
|
|
91632
|
-
const
|
|
91709
|
+
const index3 = findContextualNode(
|
|
91633
91710
|
node.parent,
|
|
91634
91711
|
/*includeCaches*/
|
|
91635
91712
|
!contextFlags
|
|
91636
91713
|
);
|
|
91637
|
-
if (
|
|
91638
|
-
return contextualTypes[
|
|
91714
|
+
if (index3 >= 0) {
|
|
91715
|
+
return contextualTypes[index3];
|
|
91639
91716
|
}
|
|
91640
91717
|
}
|
|
91641
91718
|
return getContextualTypeForArgumentAtIndex(node, 0);
|
|
@@ -93935,7 +94012,7 @@ ${lanes.join("\n")}
|
|
|
93935
94012
|
let lastParent;
|
|
93936
94013
|
let lastSymbol;
|
|
93937
94014
|
let cutoffIndex = 0;
|
|
93938
|
-
let
|
|
94015
|
+
let index3;
|
|
93939
94016
|
let specializedIndex = -1;
|
|
93940
94017
|
let spliceIndex;
|
|
93941
94018
|
Debug.assert(!result.length);
|
|
@@ -93944,13 +94021,13 @@ ${lanes.join("\n")}
|
|
|
93944
94021
|
const parent2 = signature.declaration && signature.declaration.parent;
|
|
93945
94022
|
if (!lastSymbol || symbol15 === lastSymbol) {
|
|
93946
94023
|
if (lastParent && parent2 === lastParent) {
|
|
93947
|
-
|
|
94024
|
+
index3 = index3 + 1;
|
|
93948
94025
|
} else {
|
|
93949
94026
|
lastParent = parent2;
|
|
93950
|
-
|
|
94027
|
+
index3 = cutoffIndex;
|
|
93951
94028
|
}
|
|
93952
94029
|
} else {
|
|
93953
|
-
|
|
94030
|
+
index3 = cutoffIndex = result.length;
|
|
93954
94031
|
lastParent = parent2;
|
|
93955
94032
|
}
|
|
93956
94033
|
lastSymbol = symbol15;
|
|
@@ -93959,7 +94036,7 @@ ${lanes.join("\n")}
|
|
|
93959
94036
|
spliceIndex = specializedIndex;
|
|
93960
94037
|
cutoffIndex++;
|
|
93961
94038
|
} else {
|
|
93962
|
-
spliceIndex =
|
|
94039
|
+
spliceIndex = index3;
|
|
93963
94040
|
}
|
|
93964
94041
|
result.splice(spliceIndex, 0, callChainFlags ? getOptionalCallSignature(signature, callChainFlags) : signature);
|
|
93965
94042
|
}
|
|
@@ -94198,9 +94275,9 @@ ${lanes.join("\n")}
|
|
|
94198
94275
|
/* Variadic */
|
|
94199
94276
|
]);
|
|
94200
94277
|
}
|
|
94201
|
-
function getSpreadArgumentType(args2,
|
|
94278
|
+
function getSpreadArgumentType(args2, index3, argCount, restType, context, checkMode) {
|
|
94202
94279
|
const inConstContext = isConstTypeVariable(restType);
|
|
94203
|
-
if (
|
|
94280
|
+
if (index3 >= argCount - 1) {
|
|
94204
94281
|
const arg = args2[argCount - 1];
|
|
94205
94282
|
if (isSpreadArgument(arg)) {
|
|
94206
94283
|
const spreadType = arg.kind === 238 ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode);
|
|
@@ -94213,7 +94290,7 @@ ${lanes.join("\n")}
|
|
|
94213
94290
|
const types = [];
|
|
94214
94291
|
const flags2 = [];
|
|
94215
94292
|
const names = [];
|
|
94216
|
-
for (let i3 =
|
|
94293
|
+
for (let i3 = index3; i3 < argCount; i3++) {
|
|
94217
94294
|
const arg = args2[i3];
|
|
94218
94295
|
if (isSpreadArgument(arg)) {
|
|
94219
94296
|
const spreadType = arg.kind === 238 ? arg.type : checkExpression(arg.expression);
|
|
@@ -94231,9 +94308,9 @@ ${lanes.join("\n")}
|
|
|
94231
94308
|
);
|
|
94232
94309
|
}
|
|
94233
94310
|
} else {
|
|
94234
|
-
const contextualType = isTupleType(restType) ? getContextualTypeForElementExpression(restType, i3 -
|
|
94311
|
+
const contextualType = isTupleType(restType) ? getContextualTypeForElementExpression(restType, i3 - index3, argCount - index3) || unknownType : getIndexedAccessType(
|
|
94235
94312
|
restType,
|
|
94236
|
-
getNumberLiteralType(i3 -
|
|
94313
|
+
getNumberLiteralType(i3 - index3),
|
|
94237
94314
|
256
|
|
94238
94315
|
/* Contextual */
|
|
94239
94316
|
);
|
|
@@ -96510,12 +96587,12 @@ ${lanes.join("\n")}
|
|
|
96510
96587
|
!!declaration && (hasInitializer(declaration) || isOptionalDeclaration(declaration))
|
|
96511
96588
|
);
|
|
96512
96589
|
}
|
|
96513
|
-
function getTupleElementLabelFromBindingElement(node,
|
|
96590
|
+
function getTupleElementLabelFromBindingElement(node, index3, elementFlags) {
|
|
96514
96591
|
switch (node.name.kind) {
|
|
96515
96592
|
case 80: {
|
|
96516
96593
|
const name14 = node.name.escapedText;
|
|
96517
96594
|
if (node.dotDotDotToken) {
|
|
96518
|
-
return elementFlags & 12 ? name14 : `${name14}_${
|
|
96595
|
+
return elementFlags & 12 ? name14 : `${name14}_${index3}`;
|
|
96519
96596
|
} else {
|
|
96520
96597
|
return elementFlags & 3 ? name14 : `${name14}_n`;
|
|
96521
96598
|
}
|
|
@@ -96525,24 +96602,24 @@ ${lanes.join("\n")}
|
|
|
96525
96602
|
const elements = node.name.elements;
|
|
96526
96603
|
const lastElement = tryCast(lastOrUndefined(elements), isBindingElement);
|
|
96527
96604
|
const elementCount = elements.length - ((lastElement == null ? void 0 : lastElement.dotDotDotToken) ? 1 : 0);
|
|
96528
|
-
if (
|
|
96529
|
-
const element = elements[
|
|
96605
|
+
if (index3 < elementCount) {
|
|
96606
|
+
const element = elements[index3];
|
|
96530
96607
|
if (isBindingElement(element)) {
|
|
96531
|
-
return getTupleElementLabelFromBindingElement(element,
|
|
96608
|
+
return getTupleElementLabelFromBindingElement(element, index3, elementFlags);
|
|
96532
96609
|
}
|
|
96533
96610
|
} else if (lastElement == null ? void 0 : lastElement.dotDotDotToken) {
|
|
96534
|
-
return getTupleElementLabelFromBindingElement(lastElement,
|
|
96611
|
+
return getTupleElementLabelFromBindingElement(lastElement, index3 - elementCount, elementFlags);
|
|
96535
96612
|
}
|
|
96536
96613
|
}
|
|
96537
96614
|
break;
|
|
96538
96615
|
}
|
|
96539
96616
|
}
|
|
96540
|
-
return `arg_${
|
|
96617
|
+
return `arg_${index3}`;
|
|
96541
96618
|
}
|
|
96542
|
-
function getTupleElementLabel(d2,
|
|
96619
|
+
function getTupleElementLabel(d2, index3 = 0, elementFlags = 3, restSymbol) {
|
|
96543
96620
|
if (!d2) {
|
|
96544
96621
|
const restParameter = tryCast(restSymbol == null ? void 0 : restSymbol.valueDeclaration, isParameter);
|
|
96545
|
-
return restParameter ? getTupleElementLabelFromBindingElement(restParameter,
|
|
96622
|
+
return restParameter ? getTupleElementLabelFromBindingElement(restParameter, index3, elementFlags) : `${(restSymbol == null ? void 0 : restSymbol.escapedName) ?? "arg"}_${index3}`;
|
|
96546
96623
|
}
|
|
96547
96624
|
Debug.assert(isIdentifier(d2.name));
|
|
96548
96625
|
return d2.name.escapedText;
|
|
@@ -96557,10 +96634,10 @@ ${lanes.join("\n")}
|
|
|
96557
96634
|
const restType = overrideRestType || getTypeOfSymbol(restParameter);
|
|
96558
96635
|
if (isTupleType(restType)) {
|
|
96559
96636
|
const tupleType = restType.target;
|
|
96560
|
-
const
|
|
96561
|
-
const associatedName = (_a18 = tupleType.labeledElementDeclarations) == null ? void 0 : _a18[
|
|
96562
|
-
const elementFlags = tupleType.elementFlags[
|
|
96563
|
-
return getTupleElementLabel(associatedName,
|
|
96637
|
+
const index3 = pos - paramCount;
|
|
96638
|
+
const associatedName = (_a18 = tupleType.labeledElementDeclarations) == null ? void 0 : _a18[index3];
|
|
96639
|
+
const elementFlags = tupleType.elementFlags[index3];
|
|
96640
|
+
return getTupleElementLabel(associatedName, index3, elementFlags, restParameter);
|
|
96564
96641
|
}
|
|
96565
96642
|
return restParameter.escapedName;
|
|
96566
96643
|
}
|
|
@@ -96587,8 +96664,8 @@ ${lanes.join("\n")}
|
|
|
96587
96664
|
const restType = getTypeOfSymbol(restParameter);
|
|
96588
96665
|
if (isTupleType(restType)) {
|
|
96589
96666
|
const associatedNames = restType.target.labeledElementDeclarations;
|
|
96590
|
-
const
|
|
96591
|
-
const associatedName = associatedNames == null ? void 0 : associatedNames[
|
|
96667
|
+
const index3 = pos - paramCount;
|
|
96668
|
+
const associatedName = associatedNames == null ? void 0 : associatedNames[index3];
|
|
96592
96669
|
const isRestTupleElement = !!(associatedName == null ? void 0 : associatedName.dotDotDotToken);
|
|
96593
96670
|
if (associatedName) {
|
|
96594
96671
|
Debug.assert(isIdentifier(associatedName.name));
|
|
@@ -96617,8 +96694,8 @@ ${lanes.join("\n")}
|
|
|
96617
96694
|
const restType = getTypeOfSymbol(restParameter);
|
|
96618
96695
|
if (isTupleType(restType)) {
|
|
96619
96696
|
const associatedNames = restType.target.labeledElementDeclarations;
|
|
96620
|
-
const
|
|
96621
|
-
return associatedNames && associatedNames[
|
|
96697
|
+
const index3 = pos - paramCount;
|
|
96698
|
+
return associatedNames && associatedNames[index3];
|
|
96622
96699
|
}
|
|
96623
96700
|
return restParameter.valueDeclaration && isValidDeclarationForTupleLabel(restParameter.valueDeclaration) ? restParameter.valueDeclaration : void 0;
|
|
96624
96701
|
}
|
|
@@ -96632,9 +96709,9 @@ ${lanes.join("\n")}
|
|
|
96632
96709
|
}
|
|
96633
96710
|
if (signatureHasRestParameter(signature)) {
|
|
96634
96711
|
const restType = getTypeOfSymbol(signature.parameters[paramCount]);
|
|
96635
|
-
const
|
|
96636
|
-
if (!isTupleType(restType) || restType.target.combinedFlags & 12 ||
|
|
96637
|
-
return getIndexedAccessType(restType, getNumberLiteralType(
|
|
96712
|
+
const index3 = pos - paramCount;
|
|
96713
|
+
if (!isTupleType(restType) || restType.target.combinedFlags & 12 || index3 < restType.target.fixedLength) {
|
|
96714
|
+
return getIndexedAccessType(restType, getNumberLiteralType(index3));
|
|
96638
96715
|
}
|
|
96639
96716
|
}
|
|
96640
96717
|
return void 0;
|
|
@@ -97041,11 +97118,11 @@ ${lanes.join("\n")}
|
|
|
97041
97118
|
if (getThisParameter(node.parent) === node) {
|
|
97042
97119
|
break;
|
|
97043
97120
|
}
|
|
97044
|
-
const
|
|
97045
|
-
Debug.assert(
|
|
97121
|
+
const index3 = getThisParameter(node.parent) ? node.parent.parameters.indexOf(node) - 1 : node.parent.parameters.indexOf(node);
|
|
97122
|
+
Debug.assert(index3 >= 0);
|
|
97046
97123
|
const targetType = isConstructorDeclaration(node.parent) ? getTypeOfSymbol(getSymbolOfDeclaration(node.parent.parent)) : getParentTypeOfClassElement(node.parent);
|
|
97047
97124
|
const keyType = isConstructorDeclaration(node.parent) ? undefinedType : getClassElementPropertyKeyType(node.parent);
|
|
97048
|
-
const indexType = getNumberLiteralType(
|
|
97125
|
+
const indexType = getNumberLiteralType(index3);
|
|
97049
97126
|
const targetParam = createParameter2("target", targetType);
|
|
97050
97127
|
const keyParam = createParameter2("propertyKey", keyType);
|
|
97051
97128
|
const indexParam = createParameter2("parameterIndex", indexType);
|
|
@@ -99599,8 +99676,8 @@ ${lanes.join("\n")}
|
|
|
99599
99676
|
let len = baseName.length;
|
|
99600
99677
|
while (len > 1 && baseName.charCodeAt(len - 1) >= 48 && baseName.charCodeAt(len - 1) <= 57) len--;
|
|
99601
99678
|
const s4 = baseName.slice(0, len);
|
|
99602
|
-
for (let
|
|
99603
|
-
const augmentedName = s4 +
|
|
99679
|
+
for (let index3 = 1; true; index3++) {
|
|
99680
|
+
const augmentedName = s4 + index3;
|
|
99604
99681
|
if (!hasTypeParameterByName(typeParameters, augmentedName)) {
|
|
99605
99682
|
return augmentedName;
|
|
99606
99683
|
}
|
|
@@ -100450,11 +100527,11 @@ ${lanes.join("\n")}
|
|
|
100450
100527
|
function checkMissingDeclaration(node) {
|
|
100451
100528
|
checkDecorators(node);
|
|
100452
100529
|
}
|
|
100453
|
-
function getEffectiveTypeArgumentAtIndex(node, typeParameters,
|
|
100454
|
-
if (node.typeArguments &&
|
|
100455
|
-
return getTypeFromTypeNode(node.typeArguments[
|
|
100530
|
+
function getEffectiveTypeArgumentAtIndex(node, typeParameters, index3) {
|
|
100531
|
+
if (node.typeArguments && index3 < node.typeArguments.length) {
|
|
100532
|
+
return getTypeFromTypeNode(node.typeArguments[index3]);
|
|
100456
100533
|
}
|
|
100457
|
-
return getEffectiveTypeArguments2(node, typeParameters)[
|
|
100534
|
+
return getEffectiveTypeArguments2(node, typeParameters)[index3];
|
|
100458
100535
|
}
|
|
100459
100536
|
function getEffectiveTypeArguments2(node, typeParameters) {
|
|
100460
100537
|
return fillMissingTypeArguments(map(node.typeArguments, getTypeFromTypeNode), typeParameters, getMinTypeArgumentCount(typeParameters), isInJSFile(node));
|
|
@@ -103691,12 +103768,12 @@ ${lanes.join("\n")}
|
|
|
103691
103768
|
const isJs = isInJSFile(node);
|
|
103692
103769
|
const parameters = /* @__PURE__ */ new Set();
|
|
103693
103770
|
const excludedParameters = /* @__PURE__ */ new Set();
|
|
103694
|
-
forEach(node.parameters, ({ name: name14 },
|
|
103771
|
+
forEach(node.parameters, ({ name: name14 }, index3) => {
|
|
103695
103772
|
if (isIdentifier(name14)) {
|
|
103696
103773
|
parameters.add(name14.escapedText);
|
|
103697
103774
|
}
|
|
103698
103775
|
if (isBindingPattern(name14)) {
|
|
103699
|
-
excludedParameters.add(
|
|
103776
|
+
excludedParameters.add(index3);
|
|
103700
103777
|
}
|
|
103701
103778
|
});
|
|
103702
103779
|
const containsArguments = containsArgumentsReference(node);
|
|
@@ -103707,8 +103784,8 @@ ${lanes.join("\n")}
|
|
|
103707
103784
|
error2(lastJSDocParam.name, Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type, idText(lastJSDocParam.name));
|
|
103708
103785
|
}
|
|
103709
103786
|
} else {
|
|
103710
|
-
forEach(jsdocParameters, ({ name: name14, isNameFirst },
|
|
103711
|
-
if (excludedParameters.has(
|
|
103787
|
+
forEach(jsdocParameters, ({ name: name14, isNameFirst }, index3) => {
|
|
103788
|
+
if (excludedParameters.has(index3) || isIdentifier(name14) && parameters.has(name14.escapedText)) {
|
|
103712
103789
|
return;
|
|
103713
103790
|
}
|
|
103714
103791
|
if (isQualifiedName(name14)) {
|
|
@@ -103748,13 +103825,13 @@ ${lanes.join("\n")}
|
|
|
103748
103825
|
};
|
|
103749
103826
|
}
|
|
103750
103827
|
}
|
|
103751
|
-
function checkTypeParametersNotReferenced(root, typeParameters,
|
|
103828
|
+
function checkTypeParametersNotReferenced(root, typeParameters, index3) {
|
|
103752
103829
|
visit(root);
|
|
103753
103830
|
function visit(node) {
|
|
103754
103831
|
if (node.kind === 184) {
|
|
103755
103832
|
const type = getTypeFromTypeReference(node);
|
|
103756
103833
|
if (type.flags & 262144) {
|
|
103757
|
-
for (let i3 =
|
|
103834
|
+
for (let i3 = index3; i3 < typeParameters.length; i3++) {
|
|
103758
103835
|
if (type.symbol === getSymbolOfDeclaration(typeParameters[i3])) {
|
|
103759
103836
|
error2(node, Diagnostics.Type_parameter_defaults_can_only_reference_previously_declared_type_parameters);
|
|
103760
103837
|
}
|
|
@@ -108576,7 +108653,7 @@ ${lanes.join("\n")}
|
|
|
108576
108653
|
createDiagnosticForNode(useStrictDirective, Diagnostics.use_strict_directive_used_here)
|
|
108577
108654
|
);
|
|
108578
108655
|
});
|
|
108579
|
-
const diagnostics2 = nonSimpleParameters.map((parameter,
|
|
108656
|
+
const diagnostics2 = nonSimpleParameters.map((parameter, index3) => index3 === 0 ? createDiagnosticForNode(parameter, Diagnostics.Non_simple_parameter_declared_here) : createDiagnosticForNode(parameter, Diagnostics.and_here));
|
|
108580
108657
|
addRelatedInfo(error2(useStrictDirective, Diagnostics.use_strict_directive_cannot_be_used_with_non_simple_parameter_list), ...diagnostics2);
|
|
108581
108658
|
return true;
|
|
108582
108659
|
}
|
|
@@ -109795,7 +109872,7 @@ ${lanes.join("\n")}
|
|
|
109795
109872
|
getFileIncludeReasons: () => host.getFileIncludeReasons(),
|
|
109796
109873
|
readFile: host.readFile ? (fileName) => host.readFile(fileName) : void 0,
|
|
109797
109874
|
getDefaultResolutionModeForFile: (file) => host.getDefaultResolutionModeForFile(file),
|
|
109798
|
-
getModeForResolutionAtIndex: (file,
|
|
109875
|
+
getModeForResolutionAtIndex: (file, index3) => host.getModeForResolutionAtIndex(file, index3),
|
|
109799
109876
|
getGlobalTypingsCacheLocation: maybeBind(host, host.getGlobalTypingsCacheLocation)
|
|
109800
109877
|
};
|
|
109801
109878
|
}
|
|
@@ -111859,8 +111936,8 @@ ${lanes.join("\n")}
|
|
|
111859
111936
|
};
|
|
111860
111937
|
}
|
|
111861
111938
|
function tryGetSourceMappingURL(lineInfo) {
|
|
111862
|
-
for (let
|
|
111863
|
-
const line = lineInfo.getLineText(
|
|
111939
|
+
for (let index3 = lineInfo.getLineCount() - 1; index3 >= 0; index3--) {
|
|
111940
|
+
const line = lineInfo.getLineText(index3);
|
|
111864
111941
|
const comment = sourceMapCommentRegExp.exec(line);
|
|
111865
111942
|
if (comment) {
|
|
111866
111943
|
return comment[1].trimEnd();
|
|
@@ -129962,20 +130039,20 @@ ${lanes.join("\n")}
|
|
|
129962
130039
|
blockOffsets = [];
|
|
129963
130040
|
blockStack = [];
|
|
129964
130041
|
}
|
|
129965
|
-
const
|
|
129966
|
-
blockActions[
|
|
129967
|
-
blockOffsets[
|
|
129968
|
-
blocks[
|
|
130042
|
+
const index3 = blockActions.length;
|
|
130043
|
+
blockActions[index3] = 0;
|
|
130044
|
+
blockOffsets[index3] = operations ? operations.length : 0;
|
|
130045
|
+
blocks[index3] = block;
|
|
129969
130046
|
blockStack.push(block);
|
|
129970
|
-
return
|
|
130047
|
+
return index3;
|
|
129971
130048
|
}
|
|
129972
130049
|
function endBlock() {
|
|
129973
130050
|
const block = peekBlock();
|
|
129974
130051
|
if (block === void 0) return Debug.fail("beginBlock was never called.");
|
|
129975
|
-
const
|
|
129976
|
-
blockActions[
|
|
129977
|
-
blockOffsets[
|
|
129978
|
-
blocks[
|
|
130052
|
+
const index3 = blockActions.length;
|
|
130053
|
+
blockActions[index3] = 1;
|
|
130054
|
+
blockOffsets[index3] = operations ? operations.length : 0;
|
|
130055
|
+
blocks[index3] = block;
|
|
129979
130056
|
blockStack.pop();
|
|
129980
130057
|
return block;
|
|
129981
130058
|
}
|
|
@@ -138099,7 +138176,7 @@ ${lanes.join("\n")}
|
|
|
138099
138176
|
var { enter: enterComment, exit: exitComment } = createTimerIf(extendedDiagnostics, "commentTime", "beforeComment", "afterComment");
|
|
138100
138177
|
var parenthesizer = factory.parenthesizer;
|
|
138101
138178
|
var typeArgumentParenthesizerRuleSelector = {
|
|
138102
|
-
select: (
|
|
138179
|
+
select: (index3) => index3 === 0 ? parenthesizer.parenthesizeLeadingTypeArgument : void 0
|
|
138103
138180
|
};
|
|
138104
138181
|
var emitBinaryExpression = createEmitBinaryExpression();
|
|
138105
138182
|
reset2();
|
|
@@ -141052,7 +141129,7 @@ ${lanes.join("\n")}
|
|
|
141052
141129
|
pushNameGenerationScope(node);
|
|
141053
141130
|
forEach(node.statements, generateNames);
|
|
141054
141131
|
emitHelpers(node);
|
|
141055
|
-
const
|
|
141132
|
+
const index3 = findIndex(statements, (statement) => !isPrologueDirective(statement));
|
|
141056
141133
|
emitTripleSlashDirectivesIfNeeded(node);
|
|
141057
141134
|
emitList(
|
|
141058
141135
|
node,
|
|
@@ -141060,7 +141137,7 @@ ${lanes.join("\n")}
|
|
|
141060
141137
|
1,
|
|
141061
141138
|
/*parenthesizerRule*/
|
|
141062
141139
|
void 0,
|
|
141063
|
-
|
|
141140
|
+
index3 === -1 ? statements.length : index3
|
|
141064
141141
|
);
|
|
141065
141142
|
popNameGenerationScope(node);
|
|
141066
141143
|
}
|
|
@@ -142748,8 +142825,8 @@ ${lanes.join("\n")}
|
|
|
142748
142825
|
function emitListItemNoParenthesizer(node, emit, _parenthesizerRule, _index) {
|
|
142749
142826
|
emit(node);
|
|
142750
142827
|
}
|
|
142751
|
-
function emitListItemWithParenthesizerRuleSelector(node, emit, parenthesizerRuleSelector,
|
|
142752
|
-
emit(node, parenthesizerRuleSelector.select(
|
|
142828
|
+
function emitListItemWithParenthesizerRuleSelector(node, emit, parenthesizerRuleSelector, index3) {
|
|
142829
|
+
emit(node, parenthesizerRuleSelector.select(index3));
|
|
142753
142830
|
}
|
|
142754
142831
|
function emitListItemWithParenthesizerRule(node, emit, parenthesizerRule, _index) {
|
|
142755
142832
|
emit(node, parenthesizerRule);
|
|
@@ -142835,8 +142912,8 @@ ${lanes.join("\n")}
|
|
|
142835
142912
|
}
|
|
142836
142913
|
}
|
|
142837
142914
|
function hasEntry(entries, name14) {
|
|
142838
|
-
const
|
|
142839
|
-
return
|
|
142915
|
+
const index3 = binarySearch(entries, name14, identity, compareStringsCaseSensitive);
|
|
142916
|
+
return index3 >= 0;
|
|
142840
142917
|
}
|
|
142841
142918
|
function writeFile2(fileName, data, writeByteOrderMark) {
|
|
142842
142919
|
const path7 = toPath3(fileName);
|
|
@@ -143680,8 +143757,8 @@ ${lanes.join("\n")}
|
|
|
143680
143757
|
function getModeForFileReference(ref, containingFileMode) {
|
|
143681
143758
|
return (isString(ref) ? containingFileMode : ref.resolutionMode) || containingFileMode;
|
|
143682
143759
|
}
|
|
143683
|
-
function getModeForResolutionAtIndex(file,
|
|
143684
|
-
return getModeForUsageLocationWorker(file, getModuleNameStringLiteralAt(file,
|
|
143760
|
+
function getModeForResolutionAtIndex(file, index3, compilerOptions) {
|
|
143761
|
+
return getModeForUsageLocationWorker(file, getModuleNameStringLiteralAt(file, index3), compilerOptions);
|
|
143685
143762
|
}
|
|
143686
143763
|
function isExclusivelyTypeOnlyImportOrExport(decl) {
|
|
143687
143764
|
var _a18;
|
|
@@ -143855,25 +143932,25 @@ ${lanes.join("\n")}
|
|
|
143855
143932
|
function getReferencedFileLocation(program2, ref) {
|
|
143856
143933
|
var _a18, _b, _c, _d;
|
|
143857
143934
|
const file = Debug.checkDefined(program2.getSourceFileByPath(ref.file));
|
|
143858
|
-
const { kind, index:
|
|
143935
|
+
const { kind, index: index3 } = ref;
|
|
143859
143936
|
let pos, end, packageId;
|
|
143860
143937
|
switch (kind) {
|
|
143861
143938
|
case 3:
|
|
143862
|
-
const importLiteral = getModuleNameStringLiteralAt(file,
|
|
143939
|
+
const importLiteral = getModuleNameStringLiteralAt(file, index3);
|
|
143863
143940
|
packageId = (_b = (_a18 = program2.getResolvedModuleFromModuleSpecifier(importLiteral, file)) == null ? void 0 : _a18.resolvedModule) == null ? void 0 : _b.packageId;
|
|
143864
143941
|
if (importLiteral.pos === -1) return { file, packageId, text: importLiteral.text };
|
|
143865
143942
|
pos = skipTrivia(file.text, importLiteral.pos);
|
|
143866
143943
|
end = importLiteral.end;
|
|
143867
143944
|
break;
|
|
143868
143945
|
case 4:
|
|
143869
|
-
({ pos, end } = file.referencedFiles[
|
|
143946
|
+
({ pos, end } = file.referencedFiles[index3]);
|
|
143870
143947
|
break;
|
|
143871
143948
|
case 5:
|
|
143872
|
-
({ pos, end } = file.typeReferenceDirectives[
|
|
143873
|
-
packageId = (_d = (_c = program2.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(file.typeReferenceDirectives[
|
|
143949
|
+
({ pos, end } = file.typeReferenceDirectives[index3]);
|
|
143950
|
+
packageId = (_d = (_c = program2.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(file.typeReferenceDirectives[index3], file)) == null ? void 0 : _c.resolvedTypeReferenceDirective) == null ? void 0 : _d.packageId;
|
|
143874
143951
|
break;
|
|
143875
143952
|
case 7:
|
|
143876
|
-
({ pos, end } = file.libReferenceDirectives[
|
|
143953
|
+
({ pos, end } = file.libReferenceDirectives[index3]);
|
|
143877
143954
|
break;
|
|
143878
143955
|
default:
|
|
143879
143956
|
return Debug.assertNever(kind);
|
|
@@ -143899,8 +143976,8 @@ ${lanes.join("\n")}
|
|
|
143899
143976
|
function sourceFileVersionUptoDate(sourceFile) {
|
|
143900
143977
|
return sourceFile.version === getSourceVersion(sourceFile.resolvedPath, sourceFile.fileName);
|
|
143901
143978
|
}
|
|
143902
|
-
function projectReferenceUptoDate(oldRef, newRef,
|
|
143903
|
-
return projectReferenceIsEqualTo(oldRef, newRef) && resolvedProjectReferenceUptoDate(program2.getResolvedProjectReferences()[
|
|
143979
|
+
function projectReferenceUptoDate(oldRef, newRef, index3) {
|
|
143980
|
+
return projectReferenceIsEqualTo(oldRef, newRef) && resolvedProjectReferenceUptoDate(program2.getResolvedProjectReferences()[index3], oldRef);
|
|
143904
143981
|
}
|
|
143905
143982
|
function resolvedProjectReferenceUptoDate(oldResolvedRef, oldRef) {
|
|
143906
143983
|
if (oldResolvedRef) {
|
|
@@ -143913,9 +143990,9 @@ ${lanes.join("\n")}
|
|
|
143913
143990
|
(seenResolvedRefs || (seenResolvedRefs = [])).push(oldResolvedRef);
|
|
143914
143991
|
return !forEach(
|
|
143915
143992
|
oldResolvedRef.references,
|
|
143916
|
-
(childResolvedRef,
|
|
143993
|
+
(childResolvedRef, index3) => !resolvedProjectReferenceUptoDate(
|
|
143917
143994
|
childResolvedRef,
|
|
143918
|
-
oldResolvedRef.commandLine.projectReferences[
|
|
143995
|
+
oldResolvedRef.commandLine.projectReferences[index3]
|
|
143919
143996
|
)
|
|
143920
143997
|
);
|
|
143921
143998
|
}
|
|
@@ -144240,18 +144317,18 @@ ${lanes.join("\n")}
|
|
|
144240
144317
|
resolvedProjectReferences = projectReferences.map(parseProjectReferenceConfigFile);
|
|
144241
144318
|
}
|
|
144242
144319
|
if (rootNames.length) {
|
|
144243
|
-
resolvedProjectReferences == null ? void 0 : resolvedProjectReferences.forEach((parsedRef,
|
|
144320
|
+
resolvedProjectReferences == null ? void 0 : resolvedProjectReferences.forEach((parsedRef, index3) => {
|
|
144244
144321
|
if (!parsedRef) return;
|
|
144245
144322
|
const out2 = parsedRef.commandLine.options.outFile;
|
|
144246
144323
|
if (useSourceOfProjectReferenceRedirect) {
|
|
144247
144324
|
if (out2 || getEmitModuleKind(parsedRef.commandLine.options) === 0) {
|
|
144248
144325
|
for (const fileName of parsedRef.commandLine.fileNames) {
|
|
144249
|
-
processProjectReferenceFile(fileName, { kind: 1, index:
|
|
144326
|
+
processProjectReferenceFile(fileName, { kind: 1, index: index3 });
|
|
144250
144327
|
}
|
|
144251
144328
|
}
|
|
144252
144329
|
} else {
|
|
144253
144330
|
if (out2) {
|
|
144254
|
-
processProjectReferenceFile(changeExtension(out2, ".d.ts"), { kind: 2, index:
|
|
144331
|
+
processProjectReferenceFile(changeExtension(out2, ".d.ts"), { kind: 2, index: index3 });
|
|
144255
144332
|
} else if (getEmitModuleKind(parsedRef.commandLine.options) === 0) {
|
|
144256
144333
|
const getCommonSourceDirectory3 = memoize(() => getCommonSourceDirectoryOfConfig(parsedRef.commandLine, !host.useCaseSensitiveFileNames()));
|
|
144257
144334
|
for (const fileName of parsedRef.commandLine.fileNames) {
|
|
@@ -144260,7 +144337,7 @@ ${lanes.join("\n")}
|
|
|
144260
144337
|
".json"
|
|
144261
144338
|
/* Json */
|
|
144262
144339
|
)) {
|
|
144263
|
-
processProjectReferenceFile(getOutputDeclarationFileName(fileName, parsedRef.commandLine, !host.useCaseSensitiveFileNames(), getCommonSourceDirectory3), { kind: 2, index:
|
|
144340
|
+
processProjectReferenceFile(getOutputDeclarationFileName(fileName, parsedRef.commandLine, !host.useCaseSensitiveFileNames(), getCommonSourceDirectory3), { kind: 2, index: index3 });
|
|
144264
144341
|
}
|
|
144265
144342
|
}
|
|
144266
144343
|
}
|
|
@@ -144269,13 +144346,13 @@ ${lanes.join("\n")}
|
|
|
144269
144346
|
}
|
|
144270
144347
|
}
|
|
144271
144348
|
(_i = tracing) == null ? void 0 : _i.push(tracing.Phase.Program, "processRootFiles", { count: rootNames.length });
|
|
144272
|
-
forEach(rootNames, (name14,
|
|
144349
|
+
forEach(rootNames, (name14, index3) => processRootFile(
|
|
144273
144350
|
name14,
|
|
144274
144351
|
/*isDefaultLib*/
|
|
144275
144352
|
false,
|
|
144276
144353
|
/*ignoreNoDefaultLib*/
|
|
144277
144354
|
false,
|
|
144278
|
-
{ kind: 0, index:
|
|
144355
|
+
{ kind: 0, index: index3 }
|
|
144279
144356
|
));
|
|
144280
144357
|
(_j = tracing) == null ? void 0 : _j.pop();
|
|
144281
144358
|
automaticTypeDirectiveNames ?? (automaticTypeDirectiveNames = rootNames.length ? getAutomaticTypeDirectiveNames(options, host) : emptyArray);
|
|
@@ -144321,14 +144398,14 @@ ${lanes.join("\n")}
|
|
|
144321
144398
|
}
|
|
144322
144399
|
);
|
|
144323
144400
|
} else {
|
|
144324
|
-
forEach(options.lib, (libFileName,
|
|
144401
|
+
forEach(options.lib, (libFileName, index3) => {
|
|
144325
144402
|
processRootFile(
|
|
144326
144403
|
pathForLibFile(libFileName),
|
|
144327
144404
|
/*isDefaultLib*/
|
|
144328
144405
|
true,
|
|
144329
144406
|
/*ignoreNoDefaultLib*/
|
|
144330
144407
|
false,
|
|
144331
|
-
{ kind: 6, index:
|
|
144408
|
+
{ kind: 6, index: index3 }
|
|
144332
144409
|
);
|
|
144333
144410
|
});
|
|
144334
144411
|
}
|
|
@@ -144366,8 +144443,8 @@ ${lanes.join("\n")}
|
|
|
144366
144443
|
forEachProjectReference(
|
|
144367
144444
|
oldProgram.getProjectReferences(),
|
|
144368
144445
|
oldProgram.getResolvedProjectReferences(),
|
|
144369
|
-
(oldResolvedRef, parent2,
|
|
144370
|
-
const oldReference = (parent2 == null ? void 0 : parent2.commandLine.projectReferences[
|
|
144446
|
+
(oldResolvedRef, parent2, index3) => {
|
|
144447
|
+
const oldReference = (parent2 == null ? void 0 : parent2.commandLine.projectReferences[index3]) || oldProgram.getProjectReferences()[index3];
|
|
144371
144448
|
const oldRefPath = resolveProjectReferencePath(oldReference);
|
|
144372
144449
|
if (!(projectReferenceRedirects == null ? void 0 : projectReferenceRedirects.has(toPath3(oldRefPath)))) {
|
|
144373
144450
|
host.onReleaseParsedCommandLine(oldRefPath, oldResolvedRef, oldProgram.getCompilerOptions());
|
|
@@ -144593,8 +144670,8 @@ ${lanes.join("\n")}
|
|
|
144593
144670
|
const basename4 = getBaseFileName(a2.fileName);
|
|
144594
144671
|
if (basename4 === "lib.d.ts" || basename4 === "lib.es6.d.ts") return 0;
|
|
144595
144672
|
const name14 = removeSuffix(removePrefix(basename4, "lib."), ".d.ts");
|
|
144596
|
-
const
|
|
144597
|
-
if (
|
|
144673
|
+
const index3 = libs.indexOf(name14);
|
|
144674
|
+
if (index3 !== -1) return index3 + 1;
|
|
144598
144675
|
}
|
|
144599
144676
|
return libs.length + 2;
|
|
144600
144677
|
}
|
|
@@ -144729,15 +144806,15 @@ ${lanes.join("\n")}
|
|
|
144729
144806
|
if (!unknownEntries) return result;
|
|
144730
144807
|
const resolutions = resolutionWorker(unknownEntries, containingFile, reusedNames);
|
|
144731
144808
|
if (!result) return resolutions;
|
|
144732
|
-
resolutions.forEach((resolution,
|
|
144809
|
+
resolutions.forEach((resolution, index3) => result[unknownEntryIndices[index3]] = resolution);
|
|
144733
144810
|
return result;
|
|
144734
144811
|
}
|
|
144735
144812
|
function canReuseProjectReferences() {
|
|
144736
144813
|
return !forEachProjectReference(
|
|
144737
144814
|
oldProgram.getProjectReferences(),
|
|
144738
144815
|
oldProgram.getResolvedProjectReferences(),
|
|
144739
|
-
(oldResolvedRef, parent2,
|
|
144740
|
-
const newRef = (parent2 ? parent2.commandLine.projectReferences : projectReferences)[
|
|
144816
|
+
(oldResolvedRef, parent2, index3) => {
|
|
144817
|
+
const newRef = (parent2 ? parent2.commandLine.projectReferences : projectReferences)[index3];
|
|
144741
144818
|
const newResolvedRef = parseProjectReferenceConfigFile(newRef);
|
|
144742
144819
|
if (oldResolvedRef) {
|
|
144743
144820
|
return !newResolvedRef || newResolvedRef.sourceFile !== oldResolvedRef.sourceFile || !arrayIsEqualTo(oldResolvedRef.commandLine.fileNames, newResolvedRef.commandLine.fileNames);
|
|
@@ -145963,7 +146040,7 @@ ${lanes.join("\n")}
|
|
|
145963
146040
|
return projectReferenceRedirects.get(projectReferencePath) || void 0;
|
|
145964
146041
|
}
|
|
145965
146042
|
function processReferencedFiles(file, isDefaultLib) {
|
|
145966
|
-
forEach(file.referencedFiles, (ref,
|
|
146043
|
+
forEach(file.referencedFiles, (ref, index3) => {
|
|
145967
146044
|
processSourceFile(
|
|
145968
146045
|
resolveTripleslashReference(ref.fileName, file.fileName),
|
|
145969
146046
|
isDefaultLib,
|
|
@@ -145971,7 +146048,7 @@ ${lanes.join("\n")}
|
|
|
145971
146048
|
false,
|
|
145972
146049
|
/*packageId*/
|
|
145973
146050
|
void 0,
|
|
145974
|
-
{ kind: 4, file: file.path, index:
|
|
146051
|
+
{ kind: 4, file: file.path, index: index3 }
|
|
145975
146052
|
);
|
|
145976
146053
|
});
|
|
145977
146054
|
}
|
|
@@ -145981,13 +146058,13 @@ ${lanes.join("\n")}
|
|
|
145981
146058
|
const resolutions = (resolvedTypeReferenceDirectiveNamesProcessing == null ? void 0 : resolvedTypeReferenceDirectiveNamesProcessing.get(file.path)) || resolveTypeReferenceDirectiveNamesReusingOldState(typeDirectives, file);
|
|
145982
146059
|
const resolutionsInFile = createModeAwareCache();
|
|
145983
146060
|
(resolvedTypeReferenceDirectiveNames ?? (resolvedTypeReferenceDirectiveNames = /* @__PURE__ */ new Map())).set(file.path, resolutionsInFile);
|
|
145984
|
-
for (let
|
|
145985
|
-
const ref = file.typeReferenceDirectives[
|
|
145986
|
-
const resolvedTypeReferenceDirective = resolutions[
|
|
146061
|
+
for (let index3 = 0; index3 < typeDirectives.length; index3++) {
|
|
146062
|
+
const ref = file.typeReferenceDirectives[index3];
|
|
146063
|
+
const resolvedTypeReferenceDirective = resolutions[index3];
|
|
145987
146064
|
const fileName = ref.fileName;
|
|
145988
146065
|
const mode = getModeForTypeReferenceDirectiveInFile(ref, file);
|
|
145989
146066
|
resolutionsInFile.set(fileName, mode, resolvedTypeReferenceDirective);
|
|
145990
|
-
processTypeReferenceDirective(fileName, mode, resolvedTypeReferenceDirective, { kind: 5, file: file.path, index:
|
|
146067
|
+
processTypeReferenceDirective(fileName, mode, resolvedTypeReferenceDirective, { kind: 5, file: file.path, index: index3 });
|
|
145991
146068
|
}
|
|
145992
146069
|
}
|
|
145993
146070
|
function getCompilerOptionsForFile(file) {
|
|
@@ -146081,7 +146158,7 @@ ${lanes.join("\n")}
|
|
|
146081
146158
|
return result;
|
|
146082
146159
|
}
|
|
146083
146160
|
function processLibReferenceDirectives(file) {
|
|
146084
|
-
forEach(file.libReferenceDirectives, (libReference,
|
|
146161
|
+
forEach(file.libReferenceDirectives, (libReference, index3) => {
|
|
146085
146162
|
const libFileName = getLibFileNameFromLibReference(libReference);
|
|
146086
146163
|
if (libFileName) {
|
|
146087
146164
|
processRootFile(
|
|
@@ -146090,12 +146167,12 @@ ${lanes.join("\n")}
|
|
|
146090
146167
|
true,
|
|
146091
146168
|
/*ignoreNoDefaultLib*/
|
|
146092
146169
|
true,
|
|
146093
|
-
{ kind: 7, file: file.path, index:
|
|
146170
|
+
{ kind: 7, file: file.path, index: index3 }
|
|
146094
146171
|
);
|
|
146095
146172
|
} else {
|
|
146096
146173
|
programDiagnostics.addFileProcessingDiagnostic({
|
|
146097
146174
|
kind: 0,
|
|
146098
|
-
reason: { kind: 7, file: file.path, index:
|
|
146175
|
+
reason: { kind: 7, file: file.path, index: index3 }
|
|
146099
146176
|
});
|
|
146100
146177
|
}
|
|
146101
146178
|
});
|
|
@@ -146112,12 +146189,12 @@ ${lanes.join("\n")}
|
|
|
146112
146189
|
const optionsForFile = getCompilerOptionsForFile(file);
|
|
146113
146190
|
const resolutionsInFile = createModeAwareCache();
|
|
146114
146191
|
(resolvedModules ?? (resolvedModules = /* @__PURE__ */ new Map())).set(file.path, resolutionsInFile);
|
|
146115
|
-
for (let
|
|
146116
|
-
const resolution = resolutions[
|
|
146117
|
-
const moduleName = moduleNames[
|
|
146118
|
-
const mode = getModeForUsageLocationWorker(file, moduleNames[
|
|
146119
|
-
resolutionsInFile.set(moduleName, mode, resolutions[
|
|
146120
|
-
addResolutionDiagnosticsFromResolutionOrCache(file, moduleName, resolutions[
|
|
146192
|
+
for (let index3 = 0; index3 < moduleNames.length; index3++) {
|
|
146193
|
+
const resolution = resolutions[index3].resolvedModule;
|
|
146194
|
+
const moduleName = moduleNames[index3].text;
|
|
146195
|
+
const mode = getModeForUsageLocationWorker(file, moduleNames[index3], optionsForFile);
|
|
146196
|
+
resolutionsInFile.set(moduleName, mode, resolutions[index3]);
|
|
146197
|
+
addResolutionDiagnosticsFromResolutionOrCache(file, moduleName, resolutions[index3], mode);
|
|
146121
146198
|
if (!resolution) {
|
|
146122
146199
|
continue;
|
|
146123
146200
|
}
|
|
@@ -146129,7 +146206,7 @@ ${lanes.join("\n")}
|
|
|
146129
146206
|
currentNodeModulesDepth++;
|
|
146130
146207
|
}
|
|
146131
146208
|
const elideImport = isJsFileFromNodeModules && currentNodeModulesDepth > maxNodeModuleJsDepth;
|
|
146132
|
-
const shouldAddFile = resolvedFileName && !getResolutionDiagnostic(optionsForFile, resolution, file) && !optionsForFile.noResolve &&
|
|
146209
|
+
const shouldAddFile = resolvedFileName && !getResolutionDiagnostic(optionsForFile, resolution, file) && !optionsForFile.noResolve && index3 < file.imports.length && !elideImport && !(isJsFile && !getAllowJSCompilerOption(optionsForFile)) && (isInJSFile(file.imports[index3]) || !(file.imports[index3].flags & 16777216));
|
|
146133
146210
|
if (elideImport) {
|
|
146134
146211
|
modulesWithElidedImports.set(file.path, true);
|
|
146135
146212
|
} else if (shouldAddFile) {
|
|
@@ -146139,7 +146216,7 @@ ${lanes.join("\n")}
|
|
|
146139
146216
|
false,
|
|
146140
146217
|
/*ignoreNoDefaultLib*/
|
|
146141
146218
|
false,
|
|
146142
|
-
{ kind: 3, file: file.path, index:
|
|
146219
|
+
{ kind: 3, file: file.path, index: index3 },
|
|
146143
146220
|
resolution.packageId
|
|
146144
146221
|
);
|
|
146145
146222
|
}
|
|
@@ -146662,9 +146739,9 @@ ${lanes.join("\n")}
|
|
|
146662
146739
|
}
|
|
146663
146740
|
});
|
|
146664
146741
|
}
|
|
146665
|
-
function verifyDeprecatedProjectReference(ref, parentFile,
|
|
146742
|
+
function verifyDeprecatedProjectReference(ref, parentFile, index3) {
|
|
146666
146743
|
function createDiagnostic(_name, _value, _useInstead, message, ...args2) {
|
|
146667
|
-
createDiagnosticForReference(parentFile,
|
|
146744
|
+
createDiagnosticForReference(parentFile, index3, message, ...args2);
|
|
146668
146745
|
}
|
|
146669
146746
|
checkDeprecations("5.0", "5.5", createDiagnostic, (createDeprecatedDiagnostic) => {
|
|
146670
146747
|
if (ref.prepend) {
|
|
@@ -146686,24 +146763,24 @@ ${lanes.join("\n")}
|
|
|
146686
146763
|
forEachProjectReference(
|
|
146687
146764
|
projectReferences,
|
|
146688
146765
|
resolvedProjectReferences,
|
|
146689
|
-
(resolvedRef, parent2,
|
|
146690
|
-
const ref = (parent2 ? parent2.commandLine.projectReferences : projectReferences)[
|
|
146766
|
+
(resolvedRef, parent2, index3) => {
|
|
146767
|
+
const ref = (parent2 ? parent2.commandLine.projectReferences : projectReferences)[index3];
|
|
146691
146768
|
const parentFile = parent2 && parent2.sourceFile;
|
|
146692
|
-
verifyDeprecatedProjectReference(ref, parentFile,
|
|
146769
|
+
verifyDeprecatedProjectReference(ref, parentFile, index3);
|
|
146693
146770
|
if (!resolvedRef) {
|
|
146694
|
-
createDiagnosticForReference(parentFile,
|
|
146771
|
+
createDiagnosticForReference(parentFile, index3, Diagnostics.File_0_not_found, ref.path);
|
|
146695
146772
|
return;
|
|
146696
146773
|
}
|
|
146697
146774
|
const options2 = resolvedRef.commandLine.options;
|
|
146698
146775
|
if (!options2.composite || options2.noEmit) {
|
|
146699
146776
|
const inputs = parent2 ? parent2.commandLine.fileNames : rootNames;
|
|
146700
146777
|
if (inputs.length) {
|
|
146701
|
-
if (!options2.composite) createDiagnosticForReference(parentFile,
|
|
146702
|
-
if (options2.noEmit) createDiagnosticForReference(parentFile,
|
|
146778
|
+
if (!options2.composite) createDiagnosticForReference(parentFile, index3, Diagnostics.Referenced_project_0_must_have_setting_composite_Colon_true, ref.path);
|
|
146779
|
+
if (options2.noEmit) createDiagnosticForReference(parentFile, index3, Diagnostics.Referenced_project_0_may_not_disable_emit, ref.path);
|
|
146703
146780
|
}
|
|
146704
146781
|
}
|
|
146705
146782
|
if (!parent2 && buildInfoPath && buildInfoPath === getTsBuildInfoEmitOutputFilePath(options2)) {
|
|
146706
|
-
createDiagnosticForReference(parentFile,
|
|
146783
|
+
createDiagnosticForReference(parentFile, index3, Diagnostics.Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1, buildInfoPath, ref.path);
|
|
146707
146784
|
hasEmitBlockingDiagnostics.set(toPath3(buildInfoPath), true);
|
|
146708
146785
|
}
|
|
146709
146786
|
}
|
|
@@ -146771,10 +146848,10 @@ ${lanes.join("\n")}
|
|
|
146771
146848
|
...args2
|
|
146772
146849
|
);
|
|
146773
146850
|
}
|
|
146774
|
-
function createDiagnosticForReference(sourceFile,
|
|
146851
|
+
function createDiagnosticForReference(sourceFile, index3, message, ...args2) {
|
|
146775
146852
|
const referencesSyntax = forEachTsConfigPropArray(sourceFile || options.configFile, "references", (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0);
|
|
146776
|
-
if (referencesSyntax && referencesSyntax.elements.length >
|
|
146777
|
-
programDiagnostics.addConfigDiagnostic(createDiagnosticForNodeInSourceFile(sourceFile || options.configFile, referencesSyntax.elements[
|
|
146853
|
+
if (referencesSyntax && referencesSyntax.elements.length > index3) {
|
|
146854
|
+
programDiagnostics.addConfigDiagnostic(createDiagnosticForNodeInSourceFile(sourceFile || options.configFile, referencesSyntax.elements[index3], message, ...args2));
|
|
146778
146855
|
} else {
|
|
146779
146856
|
programDiagnostics.addConfigDiagnostic(createCompilerDiagnostic(message, ...args2));
|
|
146780
146857
|
}
|
|
@@ -146888,8 +146965,8 @@ ${lanes.join("\n")}
|
|
|
146888
146965
|
function getEmitSyntaxForUsageLocation(file, usage) {
|
|
146889
146966
|
return getEmitSyntaxForUsageLocationWorker(file, usage, getCompilerOptionsForFile(file));
|
|
146890
146967
|
}
|
|
146891
|
-
function getModeForResolutionAtIndex2(file,
|
|
146892
|
-
return getModeForUsageLocation2(file, getModuleNameStringLiteralAt(file,
|
|
146968
|
+
function getModeForResolutionAtIndex2(file, index3) {
|
|
146969
|
+
return getModeForUsageLocation2(file, getModuleNameStringLiteralAt(file, index3));
|
|
146893
146970
|
}
|
|
146894
146971
|
function getDefaultResolutionModeForFile2(sourceFile) {
|
|
146895
146972
|
return getDefaultResolutionModeForFileWorker(sourceFile, getCompilerOptionsForFile(sourceFile));
|
|
@@ -147160,12 +147237,12 @@ ${lanes.join("\n")}
|
|
|
147160
147237
|
}
|
|
147161
147238
|
return res;
|
|
147162
147239
|
}
|
|
147163
|
-
function getModuleNameStringLiteralAt({ imports, moduleAugmentations },
|
|
147164
|
-
if (
|
|
147240
|
+
function getModuleNameStringLiteralAt({ imports, moduleAugmentations }, index3) {
|
|
147241
|
+
if (index3 < imports.length) return imports[index3];
|
|
147165
147242
|
let augIndex = imports.length;
|
|
147166
147243
|
for (const aug of moduleAugmentations) {
|
|
147167
147244
|
if (aug.kind === 11) {
|
|
147168
|
-
if (
|
|
147245
|
+
if (index3 === augIndex) return aug;
|
|
147169
147246
|
augIndex++;
|
|
147170
147247
|
}
|
|
147171
147248
|
}
|
|
@@ -147424,11 +147501,11 @@ ${lanes.join("\n")}
|
|
|
147424
147501
|
(resolvedRef, parent2, index22) => resolvedRef === referencedResolvedRef ? { sourceFile: (parent2 == null ? void 0 : parent2.sourceFile) || options.configFile, index: index22 } : void 0
|
|
147425
147502
|
);
|
|
147426
147503
|
if (!referenceInfo) return void 0;
|
|
147427
|
-
const { sourceFile, index:
|
|
147504
|
+
const { sourceFile, index: index3 } = referenceInfo;
|
|
147428
147505
|
const referencesSyntax = forEachTsConfigPropArray(sourceFile, "references", (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0);
|
|
147429
|
-
return referencesSyntax && referencesSyntax.elements.length >
|
|
147506
|
+
return referencesSyntax && referencesSyntax.elements.length > index3 ? createDiagnosticForNodeInSourceFile(
|
|
147430
147507
|
sourceFile,
|
|
147431
|
-
referencesSyntax.elements[
|
|
147508
|
+
referencesSyntax.elements[index3],
|
|
147432
147509
|
reason.kind === 2 ? Diagnostics.File_is_output_from_referenced_project_specified_here : Diagnostics.File_is_source_from_referenced_project_specified_here
|
|
147433
147510
|
) : void 0;
|
|
147434
147511
|
case 8:
|
|
@@ -148703,12 +148780,12 @@ ${lanes.join("\n")}
|
|
|
148703
148780
|
}
|
|
148704
148781
|
function toReusableDiagnosticMessageChainArray(array) {
|
|
148705
148782
|
if (!array) return array;
|
|
148706
|
-
return forEach(array, (chain,
|
|
148783
|
+
return forEach(array, (chain, index3) => {
|
|
148707
148784
|
const reusable = toReusableDiagnosticMessageChain(chain);
|
|
148708
148785
|
if (chain === reusable) return void 0;
|
|
148709
|
-
const result =
|
|
148786
|
+
const result = index3 > 0 ? array.slice(0, index3 - 1) : [];
|
|
148710
148787
|
result.push(reusable);
|
|
148711
|
-
for (let i3 =
|
|
148788
|
+
for (let i3 = index3 + 1; i3 < array.length; i3++) {
|
|
148712
148789
|
result.push(toReusableDiagnosticMessageChain(array[i3]));
|
|
148713
148790
|
}
|
|
148714
148791
|
return result;
|
|
@@ -149216,8 +149293,8 @@ ${lanes.join("\n")}
|
|
|
149216
149293
|
const fileInfos = /* @__PURE__ */ new Map();
|
|
149217
149294
|
const changedFilesSet = new Set(map(buildInfo.changeFileSet, toFilePath));
|
|
149218
149295
|
if (isIncrementalBundleEmitBuildInfo(buildInfo)) {
|
|
149219
|
-
buildInfo.fileInfos.forEach((fileInfo,
|
|
149220
|
-
const path7 = toFilePath(
|
|
149296
|
+
buildInfo.fileInfos.forEach((fileInfo, index3) => {
|
|
149297
|
+
const path7 = toFilePath(index3 + 1);
|
|
149221
149298
|
fileInfos.set(path7, isString(fileInfo) ? { version: fileInfo, signature: void 0, affectsGlobalScope: void 0, impliedFormat: void 0 } : fileInfo);
|
|
149222
149299
|
});
|
|
149223
149300
|
state = {
|
|
@@ -149236,8 +149313,8 @@ ${lanes.join("\n")}
|
|
|
149236
149313
|
} else {
|
|
149237
149314
|
filePathsSetList = (_b = buildInfo.fileIdsList) == null ? void 0 : _b.map((fileIds) => new Set(fileIds.map(toFilePath)));
|
|
149238
149315
|
const emitSignatures = ((_c = buildInfo.options) == null ? void 0 : _c.composite) && !buildInfo.options.outFile ? /* @__PURE__ */ new Map() : void 0;
|
|
149239
|
-
buildInfo.fileInfos.forEach((fileInfo,
|
|
149240
|
-
const path7 = toFilePath(
|
|
149316
|
+
buildInfo.fileInfos.forEach((fileInfo, index3) => {
|
|
149317
|
+
const path7 = toFilePath(index3 + 1);
|
|
149241
149318
|
const stateFileInfo = toBuilderStateFileInfoForMultiEmit(fileInfo);
|
|
149242
149319
|
fileInfos.set(path7, stateFileInfo);
|
|
149243
149320
|
if (emitSignatures && stateFileInfo.signature) emitSignatures.set(path7, stateFileInfo.signature);
|
|
@@ -149336,13 +149413,13 @@ ${lanes.join("\n")}
|
|
|
149336
149413
|
let rootIndex = 0;
|
|
149337
149414
|
const roots = /* @__PURE__ */ new Map();
|
|
149338
149415
|
const resolvedRoots = new Map(program2.resolvedRoot);
|
|
149339
|
-
program2.fileInfos.forEach((fileInfo,
|
|
149340
|
-
const path7 = toPath(program2.fileNames[
|
|
149416
|
+
program2.fileInfos.forEach((fileInfo, index3) => {
|
|
149417
|
+
const path7 = toPath(program2.fileNames[index3], buildInfoDirectory, getCanonicalFileName);
|
|
149341
149418
|
const version2 = isString(fileInfo) ? fileInfo : fileInfo.version;
|
|
149342
149419
|
fileInfos.set(path7, version2);
|
|
149343
149420
|
if (rootIndex < program2.root.length) {
|
|
149344
149421
|
const current = program2.root[rootIndex];
|
|
149345
|
-
const fileId =
|
|
149422
|
+
const fileId = index3 + 1;
|
|
149346
149423
|
if (isArray3(current)) {
|
|
149347
149424
|
if (current[0] <= fileId && fileId <= current[1]) {
|
|
149348
149425
|
addRoot(fileId, path7);
|
|
@@ -150682,7 +150759,7 @@ ${lanes.join("\n")}
|
|
|
150682
150759
|
function getErrorSummaryText(errorCount, filesInError, newLine, host) {
|
|
150683
150760
|
if (errorCount === 0) return "";
|
|
150684
150761
|
const nonNilFiles = filesInError.filter((fileInError) => fileInError !== void 0);
|
|
150685
|
-
const distinctFileNamesWithLines = nonNilFiles.map((fileInError) => `${fileInError.fileName}:${fileInError.line}`).filter((value,
|
|
150762
|
+
const distinctFileNamesWithLines = nonNilFiles.map((fileInError) => `${fileInError.fileName}:${fileInError.line}`).filter((value, index3, self2) => self2.indexOf(value) === index3);
|
|
150686
150763
|
const firstFileReference = nonNilFiles[0] && prettyPathForFileError(nonNilFiles[0], host.getCurrentDirectory());
|
|
150687
150764
|
let messageAndArgs;
|
|
150688
150765
|
if (errorCount === 1) {
|
|
@@ -150695,7 +150772,7 @@ ${lanes.join("\n")}
|
|
|
150695
150772
|
return `${newLine}${flattenDiagnosticMessageText(d2.messageText, newLine)}${newLine}${newLine}${suffix}`;
|
|
150696
150773
|
}
|
|
150697
150774
|
function createTabularErrorsDisplay(filesInError, host) {
|
|
150698
|
-
const distinctFiles = filesInError.filter((value,
|
|
150775
|
+
const distinctFiles = filesInError.filter((value, index3, self2) => index3 === self2.findIndex((file) => (file == null ? void 0 : file.fileName) === (value == null ? void 0 : value.fileName)));
|
|
150699
150776
|
if (distinctFiles.length === 0) return "";
|
|
150700
150777
|
const numberLength = (num) => Math.log(num) * Math.LOG10E + 1;
|
|
150701
150778
|
const fileToErrorCount = distinctFiles.map((file) => [file, countWhere(filesInError, (fileInError) => fileInError.fileName === file.fileName)]);
|
|
@@ -150796,8 +150873,8 @@ ${lanes.join("\n")}
|
|
|
150796
150873
|
if (!((_a18 = configFile == null ? void 0 : configFile.configFileSpecs) == null ? void 0 : _a18.validatedFilesSpec)) return void 0;
|
|
150797
150874
|
const filePath = program2.getCanonicalFileName(fileName);
|
|
150798
150875
|
const basePath = getDirectoryPath(getNormalizedAbsolutePath(configFile.fileName, program2.getCurrentDirectory()));
|
|
150799
|
-
const
|
|
150800
|
-
return
|
|
150876
|
+
const index3 = findIndex(configFile.configFileSpecs.validatedFilesSpec, (fileSpec) => program2.getCanonicalFileName(getNormalizedAbsolutePath(fileSpec, basePath)) === filePath);
|
|
150877
|
+
return index3 !== -1 ? configFile.configFileSpecs.validatedFilesSpecBeforeSubstitution[index3] : void 0;
|
|
150801
150878
|
}
|
|
150802
150879
|
function getMatchedIncludeSpec(program2, fileName) {
|
|
150803
150880
|
var _a18, _b;
|
|
@@ -150811,7 +150888,7 @@ ${lanes.join("\n")}
|
|
|
150811
150888
|
);
|
|
150812
150889
|
const basePath = getDirectoryPath(getNormalizedAbsolutePath(configFile.fileName, program2.getCurrentDirectory()));
|
|
150813
150890
|
const useCaseSensitiveFileNames2 = program2.useCaseSensitiveFileNames();
|
|
150814
|
-
const
|
|
150891
|
+
const index3 = findIndex((_b = configFile == null ? void 0 : configFile.configFileSpecs) == null ? void 0 : _b.validatedIncludeSpecs, (includeSpec) => {
|
|
150815
150892
|
if (isJsonFile && !endsWith(
|
|
150816
150893
|
includeSpec,
|
|
150817
150894
|
".json"
|
|
@@ -150820,7 +150897,7 @@ ${lanes.join("\n")}
|
|
|
150820
150897
|
const pattern = getPatternFromSpec(includeSpec, basePath, "files");
|
|
150821
150898
|
return !!pattern && getRegexFromPattern(`(?:${pattern})$`, useCaseSensitiveFileNames2).test(fileName);
|
|
150822
150899
|
});
|
|
150823
|
-
return
|
|
150900
|
+
return index3 !== -1 ? configFile.configFileSpecs.validatedIncludeSpecsBeforeSubstitution[index3] : void 0;
|
|
150824
150901
|
}
|
|
150825
150902
|
function fileIncludeReasonToDiagnostics(program2, reason, fileNameConvertor) {
|
|
150826
150903
|
var _a18, _b;
|
|
@@ -153195,8 +153272,8 @@ ${lanes.join("\n")}
|
|
|
153195
153272
|
function queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, buildResult) {
|
|
153196
153273
|
if (state.options.stopBuildOnErrors && buildResult & 4) return;
|
|
153197
153274
|
if (!config.options.composite) return;
|
|
153198
|
-
for (let
|
|
153199
|
-
const nextProject = buildOrder[
|
|
153275
|
+
for (let index3 = projectIndex + 1; index3 < buildOrder.length; index3++) {
|
|
153276
|
+
const nextProject = buildOrder[index3];
|
|
153200
153277
|
const nextProjectPath = toResolvedConfigFilePath(state, nextProject);
|
|
153201
153278
|
if (state.projectPendingBuild.has(nextProjectPath)) continue;
|
|
153202
153279
|
const nextProjectConfig = parseConfigFile(state, nextProject, nextProjectPath);
|
|
@@ -155424,8 +155501,8 @@ ${lanes.join("\n")}
|
|
|
155424
155501
|
/* DotDotDotToken */
|
|
155425
155502
|
) : void 0);
|
|
155426
155503
|
}
|
|
155427
|
-
function getNameForJSDocFunctionParameter(p12,
|
|
155428
|
-
return p12.name && isIdentifier(p12.name) && p12.name.escapedText === "this" ? "this" : getEffectiveDotDotDotForParameter(p12) ? `args` : `arg${
|
|
155504
|
+
function getNameForJSDocFunctionParameter(p12, index3) {
|
|
155505
|
+
return p12.name && isIdentifier(p12.name) && p12.name.escapedText === "this" ? "this" : getEffectiveDotDotDotForParameter(p12) ? `args` : `arg${index3}`;
|
|
155429
155506
|
}
|
|
155430
155507
|
function rewriteModuleSpecifier2(parent2, lit) {
|
|
155431
155508
|
const newName = resolver.getModuleSpecifierOverride(context, parent2, lit);
|
|
@@ -156286,8 +156363,8 @@ ${lanes.join("\n")}
|
|
|
156286
156363
|
return sys.args.includes(argumentName);
|
|
156287
156364
|
}
|
|
156288
156365
|
function findArgument(argumentName) {
|
|
156289
|
-
const
|
|
156290
|
-
return
|
|
156366
|
+
const index3 = sys.args.indexOf(argumentName);
|
|
156367
|
+
return index3 >= 0 && index3 < sys.args.length - 1 ? sys.args[index3 + 1] : void 0;
|
|
156291
156368
|
}
|
|
156292
156369
|
function nowString() {
|
|
156293
156370
|
const d2 = /* @__PURE__ */ new Date();
|
|
@@ -158343,7 +158420,7 @@ ${lanes.join("\n")}
|
|
|
158343
158420
|
getFileIncludeReasons: () => program2.getFileIncludeReasons(),
|
|
158344
158421
|
getCommonSourceDirectory: () => program2.getCommonSourceDirectory(),
|
|
158345
158422
|
getDefaultResolutionModeForFile: (file) => program2.getDefaultResolutionModeForFile(file),
|
|
158346
|
-
getModeForResolutionAtIndex: (file,
|
|
158423
|
+
getModeForResolutionAtIndex: (file, index3) => program2.getModeForResolutionAtIndex(file, index3)
|
|
158347
158424
|
};
|
|
158348
158425
|
}
|
|
158349
158426
|
function getModuleSpecifierResolverHost(program2, host) {
|
|
@@ -158990,9 +159067,9 @@ ${lanes.join("\n")}
|
|
|
158990
159067
|
Debug.assert(fileName === renameFilename);
|
|
158991
159068
|
for (const change of textChanges2) {
|
|
158992
159069
|
const { span, newText } = change;
|
|
158993
|
-
const
|
|
158994
|
-
if (
|
|
158995
|
-
lastPos = span.start + delta +
|
|
159070
|
+
const index3 = indexInTextChange(newText, escapeString(name14));
|
|
159071
|
+
if (index3 !== -1) {
|
|
159072
|
+
lastPos = span.start + delta + index3;
|
|
158996
159073
|
if (!preferLastLocation) {
|
|
158997
159074
|
return lastPos;
|
|
158998
159075
|
}
|
|
@@ -159444,33 +159521,33 @@ ${lanes.join("\n")}
|
|
|
159444
159521
|
}
|
|
159445
159522
|
function findDiagnosticForNode(node, sortedFileDiagnostics) {
|
|
159446
159523
|
const span = createTextSpanFromNode(node);
|
|
159447
|
-
const
|
|
159448
|
-
if (
|
|
159449
|
-
const diagnostic = sortedFileDiagnostics[
|
|
159524
|
+
const index3 = binarySearchKey(sortedFileDiagnostics, span, identity, compareTextSpans);
|
|
159525
|
+
if (index3 >= 0) {
|
|
159526
|
+
const diagnostic = sortedFileDiagnostics[index3];
|
|
159450
159527
|
Debug.assertEqual(diagnostic.file, node.getSourceFile(), "Diagnostics proided to 'findDiagnosticForNode' must be from a single SourceFile");
|
|
159451
159528
|
return cast(diagnostic, isDiagnosticWithLocation);
|
|
159452
159529
|
}
|
|
159453
159530
|
}
|
|
159454
159531
|
function getDiagnosticsWithinSpan(span, sortedFileDiagnostics) {
|
|
159455
159532
|
var _a18;
|
|
159456
|
-
let
|
|
159457
|
-
if (
|
|
159458
|
-
|
|
159533
|
+
let index3 = binarySearchKey(sortedFileDiagnostics, span.start, (diag2) => diag2.start, compareValues);
|
|
159534
|
+
if (index3 < 0) {
|
|
159535
|
+
index3 = ~index3;
|
|
159459
159536
|
}
|
|
159460
|
-
while (((_a18 = sortedFileDiagnostics[
|
|
159461
|
-
|
|
159537
|
+
while (((_a18 = sortedFileDiagnostics[index3 - 1]) == null ? void 0 : _a18.start) === span.start) {
|
|
159538
|
+
index3--;
|
|
159462
159539
|
}
|
|
159463
159540
|
const result = [];
|
|
159464
159541
|
const end = textSpanEnd(span);
|
|
159465
159542
|
while (true) {
|
|
159466
|
-
const diagnostic = tryCast(sortedFileDiagnostics[
|
|
159543
|
+
const diagnostic = tryCast(sortedFileDiagnostics[index3], isDiagnosticWithLocation);
|
|
159467
159544
|
if (!diagnostic || diagnostic.start > end) {
|
|
159468
159545
|
break;
|
|
159469
159546
|
}
|
|
159470
159547
|
if (textSpanContainsTextSpan(span, diagnostic)) {
|
|
159471
159548
|
result.push(diagnostic);
|
|
159472
159549
|
}
|
|
159473
|
-
|
|
159550
|
+
index3++;
|
|
159474
159551
|
}
|
|
159475
159552
|
return result;
|
|
159476
159553
|
}
|
|
@@ -162122,8 +162199,8 @@ ${lanes.join("\n")}
|
|
|
162122
162199
|
return spans;
|
|
162123
162200
|
}
|
|
162124
162201
|
function matchTextChunk(candidate, chunk, stringToWordSpans) {
|
|
162125
|
-
const
|
|
162126
|
-
if (
|
|
162202
|
+
const index3 = indexOfIgnoringCase(candidate, chunk.textLowerCase);
|
|
162203
|
+
if (index3 === 0) {
|
|
162127
162204
|
return createPatternMatch(
|
|
162128
162205
|
chunk.text.length === candidate.length ? 0 : 1,
|
|
162129
162206
|
/*isCaseSensitive:*/
|
|
@@ -162131,7 +162208,7 @@ ${lanes.join("\n")}
|
|
|
162131
162208
|
);
|
|
162132
162209
|
}
|
|
162133
162210
|
if (chunk.isLowerCase) {
|
|
162134
|
-
if (
|
|
162211
|
+
if (index3 === -1) return void 0;
|
|
162135
162212
|
const wordSpans = getWordSpans(candidate, stringToWordSpans);
|
|
162136
162213
|
for (const span of wordSpans) {
|
|
162137
162214
|
if (partStartsWith(
|
|
@@ -162154,7 +162231,7 @@ ${lanes.join("\n")}
|
|
|
162154
162231
|
);
|
|
162155
162232
|
}
|
|
162156
162233
|
}
|
|
162157
|
-
if (chunk.text.length < candidate.length && isUpperCaseLetter(candidate.charCodeAt(
|
|
162234
|
+
if (chunk.text.length < candidate.length && isUpperCaseLetter(candidate.charCodeAt(index3))) {
|
|
162158
162235
|
return createPatternMatch(
|
|
162159
162236
|
2,
|
|
162160
162237
|
/*isCaseSensitive*/
|
|
@@ -162409,12 +162486,12 @@ ${lanes.join("\n")}
|
|
|
162409
162486
|
function isAllPunctuation(identifier, start2, end) {
|
|
162410
162487
|
return every2(identifier, (ch) => charIsPunctuation(ch) && ch !== 95, start2, end);
|
|
162411
162488
|
}
|
|
162412
|
-
function transitionFromUpperToLower(identifier,
|
|
162413
|
-
return
|
|
162489
|
+
function transitionFromUpperToLower(identifier, index3, wordStart) {
|
|
162490
|
+
return index3 !== wordStart && index3 + 1 < identifier.length && isUpperCaseLetter(identifier.charCodeAt(index3)) && isLowerCaseLetter(identifier.charCodeAt(index3 + 1)) && every2(identifier, isUpperCaseLetter, wordStart, index3);
|
|
162414
162491
|
}
|
|
162415
|
-
function transitionFromLowerToUpper(identifier, word,
|
|
162416
|
-
const lastIsUpper = isUpperCaseLetter(identifier.charCodeAt(
|
|
162417
|
-
const currentIsUpper = isUpperCaseLetter(identifier.charCodeAt(
|
|
162492
|
+
function transitionFromLowerToUpper(identifier, word, index3) {
|
|
162493
|
+
const lastIsUpper = isUpperCaseLetter(identifier.charCodeAt(index3 - 1));
|
|
162494
|
+
const currentIsUpper = isUpperCaseLetter(identifier.charCodeAt(index3));
|
|
162418
162495
|
return currentIsUpper && (!word || !lastIsUpper);
|
|
162419
162496
|
}
|
|
162420
162497
|
function everyInRange(start2, end, pred) {
|
|
@@ -163756,7 +163833,7 @@ interface Symbol {
|
|
|
163756
163833
|
}
|
|
163757
163834
|
function mergeChildren(children, node) {
|
|
163758
163835
|
const nameToItems = /* @__PURE__ */ new Map();
|
|
163759
|
-
filterMutate(children, (child,
|
|
163836
|
+
filterMutate(children, (child, index3) => {
|
|
163760
163837
|
const declName = child.name || getNameOfDeclaration(child.node);
|
|
163761
163838
|
const name14 = declName && nodeText(declName);
|
|
163762
163839
|
if (!name14) {
|
|
@@ -163769,7 +163846,7 @@ interface Symbol {
|
|
|
163769
163846
|
}
|
|
163770
163847
|
if (itemsWithSameName instanceof Array) {
|
|
163771
163848
|
for (const itemWithSameName of itemsWithSameName) {
|
|
163772
|
-
if (tryMerge(itemWithSameName, child,
|
|
163849
|
+
if (tryMerge(itemWithSameName, child, index3, node)) {
|
|
163773
163850
|
return false;
|
|
163774
163851
|
}
|
|
163775
163852
|
}
|
|
@@ -163777,7 +163854,7 @@ interface Symbol {
|
|
|
163777
163854
|
return true;
|
|
163778
163855
|
} else {
|
|
163779
163856
|
const itemWithSameName = itemsWithSameName;
|
|
163780
|
-
if (tryMerge(itemWithSameName, child,
|
|
163857
|
+
if (tryMerge(itemWithSameName, child, index3, node)) {
|
|
163781
163858
|
return false;
|
|
163782
163859
|
}
|
|
163783
163860
|
nameToItems.set(name14, [itemWithSameName, child]);
|
|
@@ -166129,8 +166206,8 @@ interface Symbol {
|
|
|
166129
166206
|
}
|
|
166130
166207
|
function replaceTemplateStringVariableWithLiteral(tracker, sourceFile, reference, replacement) {
|
|
166131
166208
|
const templateExpression = reference.parent;
|
|
166132
|
-
const
|
|
166133
|
-
const prevNode =
|
|
166209
|
+
const index3 = templateExpression.templateSpans.indexOf(reference);
|
|
166210
|
+
const prevNode = index3 === 0 ? templateExpression.head : templateExpression.templateSpans[index3 - 1];
|
|
166134
166211
|
tracker.replaceRangeWithText(
|
|
166135
166212
|
sourceFile,
|
|
166136
166213
|
{
|
|
@@ -167410,10 +167487,10 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
|
|
|
167410
167487
|
const { nodes, operators, validOperators, hasString } = loop(current);
|
|
167411
167488
|
return { nodes, operators, isValidConcatenation: validOperators && hasString };
|
|
167412
167489
|
}
|
|
167413
|
-
var copyTrailingOperatorComments = (operators, file) => (
|
|
167414
|
-
if (
|
|
167490
|
+
var copyTrailingOperatorComments = (operators, file) => (index3, targetNode) => {
|
|
167491
|
+
if (index3 < operators.length) {
|
|
167415
167492
|
copyTrailingComments(
|
|
167416
|
-
operators[
|
|
167493
|
+
operators[index3],
|
|
167417
167494
|
targetNode,
|
|
167418
167495
|
file,
|
|
167419
167496
|
3,
|
|
@@ -167424,16 +167501,16 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
|
|
|
167424
167501
|
};
|
|
167425
167502
|
var copyCommentFromMultiNode = (nodes, file, copyOperatorComments) => (indexes, targetNode) => {
|
|
167426
167503
|
while (indexes.length > 0) {
|
|
167427
|
-
const
|
|
167504
|
+
const index3 = indexes.shift();
|
|
167428
167505
|
copyTrailingComments(
|
|
167429
|
-
nodes[
|
|
167506
|
+
nodes[index3],
|
|
167430
167507
|
targetNode,
|
|
167431
167508
|
file,
|
|
167432
167509
|
3,
|
|
167433
167510
|
/*hasTrailingNewLine*/
|
|
167434
167511
|
false
|
|
167435
167512
|
);
|
|
167436
|
-
copyOperatorComments(
|
|
167513
|
+
copyOperatorComments(index3, targetNode);
|
|
167437
167514
|
}
|
|
167438
167515
|
};
|
|
167439
167516
|
function escapeRawStringForTemplate(s4) {
|
|
@@ -167443,16 +167520,16 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
|
|
|
167443
167520
|
const rightShaving = isTemplateHead(node) || isTemplateMiddle(node) ? -2 : -1;
|
|
167444
167521
|
return getTextOfNode(node).slice(1, rightShaving);
|
|
167445
167522
|
}
|
|
167446
|
-
function concatConsecutiveString(
|
|
167523
|
+
function concatConsecutiveString(index3, nodes) {
|
|
167447
167524
|
const indexes = [];
|
|
167448
167525
|
let text4 = "", rawText = "";
|
|
167449
|
-
while (
|
|
167450
|
-
const node = nodes[
|
|
167526
|
+
while (index3 < nodes.length) {
|
|
167527
|
+
const node = nodes[index3];
|
|
167451
167528
|
if (isStringLiteralLike(node)) {
|
|
167452
167529
|
text4 += node.text;
|
|
167453
167530
|
rawText += escapeRawStringForTemplate(getTextOfNode(node).slice(1, -1));
|
|
167454
|
-
indexes.push(
|
|
167455
|
-
|
|
167531
|
+
indexes.push(index3);
|
|
167532
|
+
index3++;
|
|
167456
167533
|
} else if (isTemplateExpression(node)) {
|
|
167457
167534
|
text4 += node.head.text;
|
|
167458
167535
|
rawText += getRawTextOfTemplate(node.head);
|
|
@@ -167461,7 +167538,7 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
|
|
|
167461
167538
|
break;
|
|
167462
167539
|
}
|
|
167463
167540
|
}
|
|
167464
|
-
return [
|
|
167541
|
+
return [index3, text4, rawText, indexes];
|
|
167465
167542
|
}
|
|
167466
167543
|
function nodesToTemplate({ nodes, operators }, file) {
|
|
167467
167544
|
const copyOperatorComments = copyTrailingOperatorComments(operators, file);
|
|
@@ -167482,9 +167559,9 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
|
|
|
167482
167559
|
i3 = newIndex - 1;
|
|
167483
167560
|
const isLast = i3 === nodes.length - 1;
|
|
167484
167561
|
if (isTemplateExpression(currentNode)) {
|
|
167485
|
-
const spans = map(currentNode.templateSpans, (span,
|
|
167562
|
+
const spans = map(currentNode.templateSpans, (span, index3) => {
|
|
167486
167563
|
copyExpressionComments(span);
|
|
167487
|
-
const isLastSpan =
|
|
167564
|
+
const isLastSpan = index3 === currentNode.templateSpans.length - 1;
|
|
167488
167565
|
const text4 = span.literal.text + (isLastSpan ? subsequentText : "");
|
|
167489
167566
|
const rawText = getRawTextOfTemplate(span.literal) + (isLastSpan ? rawSubsequentText : "");
|
|
167490
167567
|
return factory.createTemplateSpan(
|
|
@@ -167890,15 +167967,15 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
|
|
|
167890
167967
|
const targetRange = rangeToExtract.targetRange;
|
|
167891
167968
|
const parsedFunctionIndexMatch = /^function_scope_(\d+)$/.exec(actionName2);
|
|
167892
167969
|
if (parsedFunctionIndexMatch) {
|
|
167893
|
-
const
|
|
167894
|
-
Debug.assert(isFinite(
|
|
167895
|
-
return getFunctionExtractionAtIndex(targetRange, context,
|
|
167970
|
+
const index3 = +parsedFunctionIndexMatch[1];
|
|
167971
|
+
Debug.assert(isFinite(index3), "Expected to parse a finite number from the function scope index");
|
|
167972
|
+
return getFunctionExtractionAtIndex(targetRange, context, index3);
|
|
167896
167973
|
}
|
|
167897
167974
|
const parsedConstantIndexMatch = /^constant_scope_(\d+)$/.exec(actionName2);
|
|
167898
167975
|
if (parsedConstantIndexMatch) {
|
|
167899
|
-
const
|
|
167900
|
-
Debug.assert(isFinite(
|
|
167901
|
-
return getConstantExtractionAtIndex(targetRange, context,
|
|
167976
|
+
const index3 = +parsedConstantIndexMatch[1];
|
|
167977
|
+
Debug.assert(isFinite(index3), "Expected to parse a finite number from the constant scope index");
|
|
167978
|
+
return getConstantExtractionAtIndex(targetRange, context, index3);
|
|
167902
167979
|
}
|
|
167903
167980
|
Debug.fail("Unrecognized action name");
|
|
167904
167981
|
}
|
|
@@ -169960,8 +170037,8 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
|
|
|
169960
170037
|
getChildCount(sourceFile) {
|
|
169961
170038
|
return this.getChildren(sourceFile).length;
|
|
169962
170039
|
}
|
|
169963
|
-
getChildAt(
|
|
169964
|
-
return this.getChildren(sourceFile)[
|
|
170040
|
+
getChildAt(index3, sourceFile) {
|
|
170041
|
+
return this.getChildren(sourceFile)[index3];
|
|
169965
170042
|
}
|
|
169966
170043
|
getChildren(sourceFile = getSourceFileOfNode(this)) {
|
|
169967
170044
|
this.assertHasRealPosition("Node without a real position cannot be scanned and thus has no token nodes - use forEachChild and collect the result if that's fine");
|
|
@@ -170097,8 +170174,8 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
|
|
|
170097
170174
|
getChildCount() {
|
|
170098
170175
|
return this.getChildren().length;
|
|
170099
170176
|
}
|
|
170100
|
-
getChildAt(
|
|
170101
|
-
return this.getChildren()[
|
|
170177
|
+
getChildAt(index3) {
|
|
170178
|
+
return this.getChildren()[index3];
|
|
170102
170179
|
}
|
|
170103
170180
|
getChildren() {
|
|
170104
170181
|
return this.kind === 1 ? this.jsDoc || emptyArray : emptyArray;
|
|
@@ -172351,10 +172428,10 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
|
|
|
172351
172428
|
}
|
|
172352
172429
|
function spanInNodeArray(nodeArray, node, match2) {
|
|
172353
172430
|
if (nodeArray) {
|
|
172354
|
-
const
|
|
172355
|
-
if (
|
|
172356
|
-
let start2 =
|
|
172357
|
-
let end =
|
|
172431
|
+
const index3 = nodeArray.indexOf(node);
|
|
172432
|
+
if (index3 >= 0) {
|
|
172433
|
+
let start2 = index3;
|
|
172434
|
+
let end = index3 + 1;
|
|
172358
172435
|
while (start2 > 0 && match2(nodeArray[start2 - 1])) start2--;
|
|
172359
172436
|
while (end < nodeArray.length && match2(nodeArray[end])) end++;
|
|
172360
172437
|
return createTextSpanFromBounds(skipTrivia(sourceFile.text, nodeArray[start2].pos), nodeArray[end - 1].end);
|
|
@@ -174246,9 +174323,9 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
|
|
|
174246
174323
|
));
|
|
174247
174324
|
}
|
|
174248
174325
|
function transformJSDocParameter(node) {
|
|
174249
|
-
const
|
|
174250
|
-
const isRest = node.type.kind === 319 &&
|
|
174251
|
-
const name14 = node.name || (isRest ? "rest" : "arg" +
|
|
174326
|
+
const index3 = node.parent.parameters.indexOf(node);
|
|
174327
|
+
const isRest = node.type.kind === 319 && index3 === node.parent.parameters.length - 1;
|
|
174328
|
+
const name14 = node.name || (isRest ? "rest" : "arg" + index3);
|
|
174252
174329
|
const dotdotdot = isRest ? factory.createToken(
|
|
174253
174330
|
26
|
|
174254
174331
|
/* DotDotDotToken */
|
|
@@ -174286,7 +174363,7 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
|
|
|
174286
174363
|
return factory.createTypeReferenceNode(name14, args2);
|
|
174287
174364
|
}
|
|
174288
174365
|
function transformJSDocIndexSignature(node) {
|
|
174289
|
-
const
|
|
174366
|
+
const index3 = factory.createParameterDeclaration(
|
|
174290
174367
|
/*modifiers*/
|
|
174291
174368
|
void 0,
|
|
174292
174369
|
/*dotDotDotToken*/
|
|
@@ -174301,7 +174378,7 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
|
|
|
174301
174378
|
const indexSignature = factory.createTypeLiteralNode([factory.createIndexSignature(
|
|
174302
174379
|
/*modifiers*/
|
|
174303
174380
|
void 0,
|
|
174304
|
-
[
|
|
174381
|
+
[index3],
|
|
174305
174382
|
node.typeArguments[1]
|
|
174306
174383
|
)]);
|
|
174307
174384
|
setEmitFlags(
|
|
@@ -179910,8 +179987,8 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
|
|
|
179910
179987
|
}
|
|
179911
179988
|
);
|
|
179912
179989
|
} else {
|
|
179913
|
-
forEach(updateParameters(importAdder, scriptTarget, declaration, newParameters), (parameter,
|
|
179914
|
-
if (length(declaration.parameters) === 0 &&
|
|
179990
|
+
forEach(updateParameters(importAdder, scriptTarget, declaration, newParameters), (parameter, index3) => {
|
|
179991
|
+
if (length(declaration.parameters) === 0 && index3 === 0) {
|
|
179915
179992
|
changes.insertNodeAt(sourceFile, declaration.parameters.end, parameter);
|
|
179916
179993
|
} else {
|
|
179917
179994
|
changes.insertNodeAtEndOfList(sourceFile, declaration.parameters, parameter);
|
|
@@ -180860,24 +180937,24 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
|
|
|
180860
180937
|
}
|
|
180861
180938
|
}
|
|
180862
180939
|
function isNotProvidedArguments(parameter, checker, sourceFiles) {
|
|
180863
|
-
const
|
|
180864
|
-
return !ts_FindAllReferences_exports.Core.someSignatureUsage(parameter.parent, sourceFiles, checker, (_3, call) => !call || call.arguments.length >
|
|
180940
|
+
const index3 = parameter.parent.parameters.indexOf(parameter);
|
|
180941
|
+
return !ts_FindAllReferences_exports.Core.someSignatureUsage(parameter.parent, sourceFiles, checker, (_3, call) => !call || call.arguments.length > index3);
|
|
180865
180942
|
}
|
|
180866
180943
|
function mayDeleteParameter(checker, sourceFile, parameter, sourceFiles, program2, cancellationToken, isFixAll) {
|
|
180867
180944
|
const { parent: parent2 } = parameter;
|
|
180868
180945
|
switch (parent2.kind) {
|
|
180869
180946
|
case 175:
|
|
180870
180947
|
case 177:
|
|
180871
|
-
const
|
|
180948
|
+
const index3 = parent2.parameters.indexOf(parameter);
|
|
180872
180949
|
const referent = isMethodDeclaration(parent2) ? parent2.name : parent2;
|
|
180873
180950
|
const entries = ts_FindAllReferences_exports.Core.getReferencedSymbolsForNode(parent2.pos, referent, program2, sourceFiles, cancellationToken);
|
|
180874
180951
|
if (entries) {
|
|
180875
180952
|
for (const entry of entries) {
|
|
180876
180953
|
for (const reference of entry.references) {
|
|
180877
180954
|
if (reference.kind === ts_FindAllReferences_exports.EntryKind.Node) {
|
|
180878
|
-
const isSuperCall2 = isSuperKeyword(reference.node) && isCallExpression(reference.node.parent) && reference.node.parent.arguments.length >
|
|
180879
|
-
const isSuperMethodCall = isPropertyAccessExpression(reference.node.parent) && isSuperKeyword(reference.node.parent.expression) && isCallExpression(reference.node.parent.parent) && reference.node.parent.parent.arguments.length >
|
|
180880
|
-
const isOverriddenMethod = (isMethodDeclaration(reference.node.parent) || isMethodSignature(reference.node.parent)) && reference.node.parent !== parameter.parent && reference.node.parent.parameters.length >
|
|
180955
|
+
const isSuperCall2 = isSuperKeyword(reference.node) && isCallExpression(reference.node.parent) && reference.node.parent.arguments.length > index3;
|
|
180956
|
+
const isSuperMethodCall = isPropertyAccessExpression(reference.node.parent) && isSuperKeyword(reference.node.parent.expression) && isCallExpression(reference.node.parent.parent) && reference.node.parent.parent.arguments.length > index3;
|
|
180957
|
+
const isOverriddenMethod = (isMethodDeclaration(reference.node.parent) || isMethodSignature(reference.node.parent)) && reference.node.parent !== parameter.parent && reference.node.parent.parameters.length > index3;
|
|
180881
180958
|
if (isSuperCall2 || isSuperMethodCall || isOverriddenMethod) return false;
|
|
180882
180959
|
}
|
|
180883
180960
|
}
|
|
@@ -180906,9 +180983,9 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
|
|
|
180906
180983
|
}
|
|
180907
180984
|
function isLastParameter(func2, parameter, isFixAll) {
|
|
180908
180985
|
const parameters = func2.parameters;
|
|
180909
|
-
const
|
|
180910
|
-
Debug.assert(
|
|
180911
|
-
return isFixAll ? parameters.slice(
|
|
180986
|
+
const index3 = parameters.indexOf(parameter);
|
|
180987
|
+
Debug.assert(index3 !== -1, "The parameter should already be in the list");
|
|
180988
|
+
return isFixAll ? parameters.slice(index3 + 1).every((p12) => isIdentifier(p12.name) && !p12.symbol.isReferenced) : index3 === parameters.length - 1;
|
|
180912
180989
|
}
|
|
180913
180990
|
function mayDeleteExpression(node) {
|
|
180914
180991
|
return (isBinaryExpression(node.parent) && node.parent.left === node || (isPostfixUnaryExpression(node.parent) || isPrefixUnaryExpression(node.parent)) && node.parent.operand === node) && isExpressionStatement(node.parent.parent);
|
|
@@ -183824,8 +183901,8 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
|
|
|
183824
183901
|
}
|
|
183825
183902
|
);
|
|
183826
183903
|
}
|
|
183827
|
-
function createTypeParameterName(
|
|
183828
|
-
return 84 +
|
|
183904
|
+
function createTypeParameterName(index3) {
|
|
183905
|
+
return 84 + index3 <= 90 ? String.fromCharCode(84 + index3) : `T${index3}`;
|
|
183829
183906
|
}
|
|
183830
183907
|
function typeToAutoImportableTypeNode(checker, importAdder, type, contextNode, scriptTarget, flags2, internalFlags, tracker) {
|
|
183831
183908
|
const typeNode = checker.typeToTypeNode(type, contextNode, flags2, internalFlags, tracker);
|
|
@@ -187111,8 +187188,8 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
|
|
|
187111
187188
|
const { symbols, literals, location: location2, completionKind, symbolToOriginInfoMap, contextToken, previousToken, isJsxInitializer, isTypeOnlyLocation } = completionData;
|
|
187112
187189
|
const literal = find(literals, (l3) => completionNameForLiteral(sourceFile, preferences, l3) === entryId.name);
|
|
187113
187190
|
if (literal !== void 0) return { type: "literal", literal };
|
|
187114
|
-
return firstDefined(symbols, (symbol15,
|
|
187115
|
-
const origin = symbolToOriginInfoMap[
|
|
187191
|
+
return firstDefined(symbols, (symbol15, index3) => {
|
|
187192
|
+
const origin = symbolToOriginInfoMap[index3];
|
|
187116
187193
|
const info2 = getCompletionEntryDisplayNameForSymbol(symbol15, getEmitScriptTarget(compilerOptions), origin, completionKind, completionData.isJsxIdentifierExpected);
|
|
187117
187194
|
return info2 && info2.name === entryId.name && (entryId.source === "ClassMemberSnippet/" && symbol15.flags & 106500 || entryId.source === "ObjectLiteralMethodSnippet/" && symbol15.flags & (4 | 8192) || getSourceFromOrigin(origin) === entryId.source || entryId.source === "ObjectLiteralMemberWithComma/") ? { type: "symbol", symbol: symbol15, location: location2, origin, contextToken, previousToken, isJsxInitializer, isTypeOnlyLocation } : void 0;
|
|
187118
187195
|
}) || { type: "none" };
|
|
@@ -187812,12 +187889,12 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
|
|
|
187812
187889
|
const firstAccessibleSymbol = nameSymbol && getFirstSymbolInChain(nameSymbol, contextToken, typeChecker);
|
|
187813
187890
|
const firstAccessibleSymbolId = firstAccessibleSymbol && getSymbolId(firstAccessibleSymbol);
|
|
187814
187891
|
if (firstAccessibleSymbolId && addToSeen(seenPropertySymbols, firstAccessibleSymbolId)) {
|
|
187815
|
-
const
|
|
187892
|
+
const index3 = symbols.length;
|
|
187816
187893
|
symbols.push(firstAccessibleSymbol);
|
|
187817
187894
|
symbolToSortTextMap[getSymbolId(firstAccessibleSymbol)] = SortText.GlobalsOrKeywords;
|
|
187818
187895
|
const moduleSymbol = firstAccessibleSymbol.parent;
|
|
187819
187896
|
if (!moduleSymbol || !isExternalModuleSymbol(moduleSymbol) || typeChecker.tryGetMemberInModuleExportsAndProperties(firstAccessibleSymbol.name, moduleSymbol) !== firstAccessibleSymbol) {
|
|
187820
|
-
symbolToOriginInfoMap[
|
|
187897
|
+
symbolToOriginInfoMap[index3] = { kind: getNullableSymbolOriginInfoKind(
|
|
187821
187898
|
2
|
|
187822
187899
|
/* SymbolMemberNoExport */
|
|
187823
187900
|
) };
|
|
@@ -187848,7 +187925,7 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
|
|
|
187848
187925
|
fileName,
|
|
187849
187926
|
moduleSpecifier
|
|
187850
187927
|
};
|
|
187851
|
-
symbolToOriginInfoMap[
|
|
187928
|
+
symbolToOriginInfoMap[index3] = origin;
|
|
187852
187929
|
}
|
|
187853
187930
|
}
|
|
187854
187931
|
} else if (preferences.includeCompletionsWithInsertText) {
|
|
@@ -188487,14 +188564,14 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
|
|
|
188487
188564
|
return classElementModifierFlags & 256 ? (type == null ? void 0 : type.symbol) && typeChecker.getPropertiesOfType(typeChecker.getTypeOfSymbolAtLocation(type.symbol, decl)) : type && typeChecker.getPropertiesOfType(type);
|
|
188488
188565
|
});
|
|
188489
188566
|
symbols = concatenate(symbols, filterClassMembersList(baseSymbols, decl.members, classElementModifierFlags));
|
|
188490
|
-
forEach(symbols, (symbol15,
|
|
188567
|
+
forEach(symbols, (symbol15, index3) => {
|
|
188491
188568
|
const declaration = symbol15 == null ? void 0 : symbol15.valueDeclaration;
|
|
188492
188569
|
if (declaration && isClassElement(declaration) && declaration.name && isComputedPropertyName(declaration.name)) {
|
|
188493
188570
|
const origin = {
|
|
188494
188571
|
kind: 512,
|
|
188495
188572
|
symbolName: typeChecker.symbolToString(symbol15)
|
|
188496
188573
|
};
|
|
188497
|
-
symbolToOriginInfoMap[
|
|
188574
|
+
symbolToOriginInfoMap[index3] = origin;
|
|
188498
188575
|
}
|
|
188499
188576
|
});
|
|
188500
188577
|
}
|
|
@@ -188968,8 +189045,8 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
|
|
|
188968
189045
|
});
|
|
188969
189046
|
function getKeywordCompletions(keywordFilter, filterOutTsOnlyKeywords) {
|
|
188970
189047
|
if (!filterOutTsOnlyKeywords) return getTypescriptKeywordCompletions(keywordFilter);
|
|
188971
|
-
const
|
|
188972
|
-
return _keywordCompletions[
|
|
189048
|
+
const index3 = keywordFilter + 8 + 1;
|
|
189049
|
+
return _keywordCompletions[index3] || (_keywordCompletions[index3] = getTypescriptKeywordCompletions(keywordFilter).filter((entry) => !isTypeScriptOnlyKeyword(stringToToken(entry.name))));
|
|
188973
189050
|
}
|
|
188974
189051
|
function getTypescriptKeywordCompletions(keywordFilter) {
|
|
188975
189052
|
return _keywordCompletions[keywordFilter] || (_keywordCompletions[keywordFilter] = allKeywordsCompletions().filter((entry) => {
|
|
@@ -190501,8 +190578,8 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
|
|
|
190501
190578
|
return result;
|
|
190502
190579
|
}
|
|
190503
190580
|
function getDirectoryFragmentTextSpan(text4, textStart) {
|
|
190504
|
-
const
|
|
190505
|
-
const offset =
|
|
190581
|
+
const index3 = Math.max(text4.lastIndexOf(directorySeparator), text4.lastIndexOf(altDirectorySeparator));
|
|
190582
|
+
const offset = index3 !== -1 ? index3 + 1 : 0;
|
|
190506
190583
|
const length2 = text4.length - offset;
|
|
190507
190584
|
return length2 === 0 || isIdentifierText(
|
|
190508
190585
|
text4.substr(offset, length2),
|
|
@@ -194424,8 +194501,8 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
|
|
|
194424
194501
|
parts2.push({ text: ")" });
|
|
194425
194502
|
}
|
|
194426
194503
|
function visitDisplayPartList(nodes, separator) {
|
|
194427
|
-
nodes.forEach((node2,
|
|
194428
|
-
if (
|
|
194504
|
+
nodes.forEach((node2, index3) => {
|
|
194505
|
+
if (index3 > 0) {
|
|
194429
194506
|
parts2.push({ text: separator });
|
|
194430
194507
|
}
|
|
194431
194508
|
visitForDisplayParts(node2);
|
|
@@ -195761,12 +195838,12 @@ ${content}
|
|
|
195761
195838
|
return { specifierComparer, isSorted };
|
|
195762
195839
|
}
|
|
195763
195840
|
function getImportDeclarationInsertionIndex(sortedImports, newImport, comparer) {
|
|
195764
|
-
const
|
|
195765
|
-
return
|
|
195841
|
+
const index3 = binarySearch(sortedImports, newImport, identity, (a2, b3) => compareImportsOrRequireStatements(a2, b3, comparer));
|
|
195842
|
+
return index3 < 0 ? ~index3 : index3;
|
|
195766
195843
|
}
|
|
195767
195844
|
function getImportSpecifierInsertionIndex(sortedImports, newImport, comparer) {
|
|
195768
|
-
const
|
|
195769
|
-
return
|
|
195845
|
+
const index3 = binarySearch(sortedImports, newImport, identity, comparer);
|
|
195846
|
+
return index3 < 0 ? ~index3 : index3;
|
|
195770
195847
|
}
|
|
195771
195848
|
function compareImportsOrRequireStatements(s1, s22, comparer) {
|
|
195772
195849
|
return compareModuleSpecifiersWorker(getModuleSpecifierExpression(s1), getModuleSpecifierExpression(s22), comparer) || compareImportKind(s1, s22);
|
|
@@ -198732,8 +198809,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
198732
198809
|
insertExportModifier(sourceFile, node) {
|
|
198733
198810
|
this.insertText(sourceFile, node.getStart(sourceFile), "export ");
|
|
198734
198811
|
}
|
|
198735
|
-
insertImportSpecifierAtIndex(sourceFile, importSpecifier, namedImports,
|
|
198736
|
-
const prevSpecifier = namedImports.elements[
|
|
198812
|
+
insertImportSpecifierAtIndex(sourceFile, importSpecifier, namedImports, index3) {
|
|
198813
|
+
const prevSpecifier = namedImports.elements[index3 - 1];
|
|
198737
198814
|
if (prevSpecifier) {
|
|
198738
198815
|
this.insertNodeInListAfter(sourceFile, prevSpecifier, importSpecifier);
|
|
198739
198816
|
} else {
|
|
@@ -198755,15 +198832,15 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
198755
198832
|
Debug.fail("node is not a list element");
|
|
198756
198833
|
return;
|
|
198757
198834
|
}
|
|
198758
|
-
const
|
|
198759
|
-
if (
|
|
198835
|
+
const index3 = indexOfNode(containingList, after);
|
|
198836
|
+
if (index3 < 0) {
|
|
198760
198837
|
return;
|
|
198761
198838
|
}
|
|
198762
198839
|
const end = after.getEnd();
|
|
198763
|
-
if (
|
|
198840
|
+
if (index3 !== containingList.length - 1) {
|
|
198764
198841
|
const nextToken = getTokenAtPosition(sourceFile, after.end);
|
|
198765
198842
|
if (nextToken && isSeparator(after, nextToken)) {
|
|
198766
|
-
const nextNode = containingList[
|
|
198843
|
+
const nextNode = containingList[index3 + 1];
|
|
198767
198844
|
const startPos = skipWhitespacesAndLineBreaks(sourceFile.text, nextNode.getFullStart());
|
|
198768
198845
|
const suffix = `${tokenToString(nextToken.kind)}${sourceFile.text.substring(nextToken.end, startPos)}`;
|
|
198769
198846
|
this.insertNodesAt(sourceFile, startPos, [newNode], { suffix });
|
|
@@ -198778,7 +198855,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
198778
198855
|
} else {
|
|
198779
198856
|
const tokenBeforeInsertPosition = findPrecedingToken(after.pos, sourceFile);
|
|
198780
198857
|
separator = isSeparator(after, tokenBeforeInsertPosition) ? tokenBeforeInsertPosition.kind : 28;
|
|
198781
|
-
const afterMinusOneStartLinePosition = getLineStartPositionForPosition(containingList[
|
|
198858
|
+
const afterMinusOneStartLinePosition = getLineStartPositionForPosition(containingList[index3 - 1].getStart(sourceFile), sourceFile);
|
|
198782
198859
|
multilineList = afterMinusOneStartLinePosition !== afterStartLinePosition;
|
|
198783
198860
|
}
|
|
198784
198861
|
if (hasCommentsBeforeLineBreak(sourceFile.text, after.end) || !positionsAreOnSameLine(containingList.pos, containingList.end, sourceFile)) {
|
|
@@ -199508,8 +199585,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
199508
199585
|
}
|
|
199509
199586
|
function deleteNodeInList(changes, deletedNodesInLists, sourceFile, node) {
|
|
199510
199587
|
const containingList = Debug.checkDefined(ts_formatting_exports.SmartIndenter.getContainingList(node, sourceFile));
|
|
199511
|
-
const
|
|
199512
|
-
Debug.assert(
|
|
199588
|
+
const index3 = indexOfNode(containingList, node);
|
|
199589
|
+
Debug.assert(index3 !== -1);
|
|
199513
199590
|
if (containingList.length === 1) {
|
|
199514
199591
|
deleteNode(changes, sourceFile, node);
|
|
199515
199592
|
return;
|
|
@@ -199518,7 +199595,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
199518
199595
|
deletedNodesInLists.add(node);
|
|
199519
199596
|
changes.deleteRange(sourceFile, {
|
|
199520
199597
|
pos: startPositionToDeleteNodeInList(sourceFile, node),
|
|
199521
|
-
end:
|
|
199598
|
+
end: index3 === containingList.length - 1 ? getAdjustedEndPosition(sourceFile, node, {}) : endPositionToDeleteNodeInList(sourceFile, node, containingList[index3 - 1], containingList[index3 + 1])
|
|
199522
199599
|
});
|
|
199523
199600
|
}
|
|
199524
199601
|
var ts_formatting_exports = {};
|
|
@@ -201780,12 +201857,12 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
201780
201857
|
const specificRule = rule2.leftTokenRange.isSpecific && rule2.rightTokenRange.isSpecific;
|
|
201781
201858
|
for (const left of rule2.leftTokenRange.tokens) {
|
|
201782
201859
|
for (const right of rule2.rightTokenRange.tokens) {
|
|
201783
|
-
const
|
|
201784
|
-
let rulesBucket = map2[
|
|
201860
|
+
const index3 = getRuleBucketIndex(left, right);
|
|
201861
|
+
let rulesBucket = map2[index3];
|
|
201785
201862
|
if (rulesBucket === void 0) {
|
|
201786
|
-
rulesBucket = map2[
|
|
201863
|
+
rulesBucket = map2[index3] = [];
|
|
201787
201864
|
}
|
|
201788
|
-
addRule(rulesBucket, rule2.rule, specificRule, rulesBucketConstructionStateList,
|
|
201865
|
+
addRule(rulesBucket, rule2.rule, specificRule, rulesBucketConstructionStateList, index3);
|
|
201789
201866
|
}
|
|
201790
201867
|
}
|
|
201791
201868
|
}
|
|
@@ -201814,12 +201891,12 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
201814
201891
|
constructionState[rulesBucketIndex] = increaseInsertionIndex(state, position);
|
|
201815
201892
|
}
|
|
201816
201893
|
function getInsertionIndex(indexBitmap, maskPosition) {
|
|
201817
|
-
let
|
|
201894
|
+
let index3 = 0;
|
|
201818
201895
|
for (let pos = 0; pos <= maskPosition; pos += maskBitSize) {
|
|
201819
|
-
|
|
201896
|
+
index3 += indexBitmap & mask;
|
|
201820
201897
|
indexBitmap >>= maskBitSize;
|
|
201821
201898
|
}
|
|
201822
|
-
return
|
|
201899
|
+
return index3;
|
|
201823
201900
|
}
|
|
201824
201901
|
function increaseInsertionIndex(indexBitmap, maskPosition) {
|
|
201825
201902
|
const value = (indexBitmap >> maskPosition & mask) + 1;
|
|
@@ -201976,20 +202053,20 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
201976
202053
|
if (!sorted.length) {
|
|
201977
202054
|
return rangeHasNoErrors;
|
|
201978
202055
|
}
|
|
201979
|
-
let
|
|
202056
|
+
let index3 = 0;
|
|
201980
202057
|
return (r) => {
|
|
201981
202058
|
while (true) {
|
|
201982
|
-
if (
|
|
202059
|
+
if (index3 >= sorted.length) {
|
|
201983
202060
|
return false;
|
|
201984
202061
|
}
|
|
201985
|
-
const error2 = sorted[
|
|
202062
|
+
const error2 = sorted[index3];
|
|
201986
202063
|
if (r.end <= error2.start) {
|
|
201987
202064
|
return false;
|
|
201988
202065
|
}
|
|
201989
202066
|
if (startEndOverlapsWithStartEnd(r.pos, r.end, error2.start, error2.start + error2.length)) {
|
|
201990
202067
|
return true;
|
|
201991
202068
|
}
|
|
201992
|
-
|
|
202069
|
+
index3++;
|
|
201993
202070
|
}
|
|
201994
202071
|
};
|
|
201995
202072
|
function rangeHasNoErrors() {
|
|
@@ -203233,9 +203310,9 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
203233
203310
|
}
|
|
203234
203311
|
const containingList = getContainingList(node, sourceFile);
|
|
203235
203312
|
if (containingList) {
|
|
203236
|
-
const
|
|
203237
|
-
if (
|
|
203238
|
-
const result = deriveActualIndentationFromList(containingList,
|
|
203313
|
+
const index3 = containingList.indexOf(node);
|
|
203314
|
+
if (index3 !== -1) {
|
|
203315
|
+
const result = deriveActualIndentationFromList(containingList, index3, sourceFile, options);
|
|
203239
203316
|
if (result !== -1) {
|
|
203240
203317
|
return result;
|
|
203241
203318
|
}
|
|
@@ -203244,11 +203321,11 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
203244
203321
|
}
|
|
203245
203322
|
return -1;
|
|
203246
203323
|
}
|
|
203247
|
-
function deriveActualIndentationFromList(list,
|
|
203248
|
-
Debug.assert(
|
|
203249
|
-
const node = list[
|
|
203324
|
+
function deriveActualIndentationFromList(list, index3, sourceFile, options) {
|
|
203325
|
+
Debug.assert(index3 >= 0 && index3 < list.length);
|
|
203326
|
+
const node = list[index3];
|
|
203250
203327
|
let lineAndCharacter = getStartLineAndCharacterForNode(node, sourceFile);
|
|
203251
|
-
for (let i3 =
|
|
203328
|
+
for (let i3 = index3 - 1; i3 >= 0; i3--) {
|
|
203252
203329
|
if (list[i3].kind === 28) {
|
|
203253
203330
|
continue;
|
|
203254
203331
|
}
|
|
@@ -205878,17 +205955,17 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
205878
205955
|
Object.defineProperty(call, "name", { ...Object.getOwnPropertyDescriptor(call, "name"), value: name14 });
|
|
205879
205956
|
if (deprecations) {
|
|
205880
205957
|
for (const key of Object.keys(deprecations)) {
|
|
205881
|
-
const
|
|
205882
|
-
if (!isNaN(
|
|
205883
|
-
overloads[
|
|
205958
|
+
const index3 = +key;
|
|
205959
|
+
if (!isNaN(index3) && hasProperty(overloads, `${index3}`)) {
|
|
205960
|
+
overloads[index3] = deprecate(overloads[index3], { ...deprecations[index3], name: name14 });
|
|
205884
205961
|
}
|
|
205885
205962
|
}
|
|
205886
205963
|
}
|
|
205887
205964
|
const bind = createBinder2(overloads, binder2);
|
|
205888
205965
|
return call;
|
|
205889
205966
|
function call(...args2) {
|
|
205890
|
-
const
|
|
205891
|
-
const fn2 =
|
|
205967
|
+
const index3 = bind(args2);
|
|
205968
|
+
const fn2 = index3 !== void 0 ? overloads[index3] : void 0;
|
|
205892
205969
|
if (typeof fn2 === "function") {
|
|
205893
205970
|
return fn2(...args2);
|
|
205894
205971
|
}
|
|
@@ -207162,12 +207239,12 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
207162
207239
|
let firstInferredProject;
|
|
207163
207240
|
let firstNonSourceOfProjectReferenceRedirect;
|
|
207164
207241
|
let defaultConfiguredProject;
|
|
207165
|
-
for (let
|
|
207166
|
-
const project = this.containingProjects[
|
|
207242
|
+
for (let index3 = 0; index3 < this.containingProjects.length; index3++) {
|
|
207243
|
+
const project = this.containingProjects[index3];
|
|
207167
207244
|
if (isConfiguredProject(project)) {
|
|
207168
207245
|
if (project.deferredClose) continue;
|
|
207169
207246
|
if (!project.isSourceOfProjectReferenceRedirect(this.fileName)) {
|
|
207170
|
-
if (defaultConfiguredProject === void 0 &&
|
|
207247
|
+
if (defaultConfiguredProject === void 0 && index3 !== this.containingProjects.length - 1) {
|
|
207171
207248
|
defaultConfiguredProject = project.projectService.findDefaultConfiguredProject(this) || false;
|
|
207172
207249
|
}
|
|
207173
207250
|
if (defaultConfiguredProject === project) return project;
|
|
@@ -213197,7 +213274,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
213197
213274
|
let retainProjects;
|
|
213198
213275
|
forEach(
|
|
213199
213276
|
existingOpenScriptInfos,
|
|
213200
|
-
(existing,
|
|
213277
|
+
(existing, index3) => !existing && openScriptInfos[index3] && !openScriptInfos[index3].isDynamic ? this.tryInvokeWildCardDirectories(openScriptInfos[index3]) : void 0
|
|
213201
213278
|
);
|
|
213202
213279
|
openScriptInfos == null ? void 0 : openScriptInfos.forEach(
|
|
213203
213280
|
(info2) => {
|
|
@@ -213357,13 +213434,13 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
213357
213434
|
rootFiles: filesToKeep,
|
|
213358
213435
|
excludedFiles
|
|
213359
213436
|
} : void 0;
|
|
213360
|
-
function addExcludedFile(
|
|
213437
|
+
function addExcludedFile(index3) {
|
|
213361
213438
|
if (!excludedFiles) {
|
|
213362
213439
|
Debug.assert(!filesToKeep);
|
|
213363
|
-
filesToKeep = rootFiles.slice(0,
|
|
213440
|
+
filesToKeep = rootFiles.slice(0, index3);
|
|
213364
213441
|
excludedFiles = [];
|
|
213365
213442
|
}
|
|
213366
|
-
excludedFiles.push(normalizedNames[
|
|
213443
|
+
excludedFiles.push(normalizedNames[index3]);
|
|
213367
213444
|
}
|
|
213368
213445
|
}
|
|
213369
213446
|
// eslint-disable-line @typescript-eslint/unified-signatures
|
|
@@ -215722,10 +215799,10 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
215722
215799
|
Debug.assert(!this.suppressDiagnosticEvents);
|
|
215723
215800
|
const seq = this.changeSeq;
|
|
215724
215801
|
const followMs = Math.min(ms, 200);
|
|
215725
|
-
let
|
|
215802
|
+
let index3 = 0;
|
|
215726
215803
|
const goNext = () => {
|
|
215727
|
-
|
|
215728
|
-
if (checkList.length >
|
|
215804
|
+
index3++;
|
|
215805
|
+
if (checkList.length > index3) {
|
|
215729
215806
|
return next.delay("checkOne", followMs, checkOne);
|
|
215730
215807
|
}
|
|
215731
215808
|
};
|
|
@@ -215747,7 +215824,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
215747
215824
|
return;
|
|
215748
215825
|
}
|
|
215749
215826
|
let ranges;
|
|
215750
|
-
let item = checkList[
|
|
215827
|
+
let item = checkList[index3];
|
|
215751
215828
|
if (isString(item)) {
|
|
215752
215829
|
item = this.toPendingErrorCheck(item);
|
|
215753
215830
|
} else if ("ranges" in item) {
|
|
@@ -215783,7 +215860,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
215783
215860
|
}
|
|
215784
215861
|
next.immediate("semanticCheck", () => doSemanticCheck(fileName, project));
|
|
215785
215862
|
};
|
|
215786
|
-
if (checkList.length >
|
|
215863
|
+
if (checkList.length > index3 && this.changeSeq === seq) {
|
|
215787
215864
|
next.delay("checkOne", ms, checkOne);
|
|
215788
215865
|
}
|
|
215789
215866
|
}
|
|
@@ -217981,9 +218058,9 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
|
217981
218058
|
return this._getSnapshot().index.positionToLineOffset(position);
|
|
217982
218059
|
}
|
|
217983
218060
|
lineToTextSpan(line) {
|
|
217984
|
-
const
|
|
217985
|
-
const { lineText, absolutePosition } =
|
|
217986
|
-
const len = lineText !== void 0 ? lineText.length :
|
|
218061
|
+
const index3 = this._getSnapshot().index;
|
|
218062
|
+
const { lineText, absolutePosition } = index3.lineNumberToInfo(line + 1);
|
|
218063
|
+
const len = lineText !== void 0 ? lineText.length : index3.absolutePositionOfStartOfLine(line + 2) - absolutePosition;
|
|
217987
218064
|
return createTextSpan(absolutePosition, len);
|
|
217988
218065
|
}
|
|
217989
218066
|
getTextChangesBetweenVersions(oldVersion, newVersion) {
|
|
@@ -218021,10 +218098,10 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
|
218021
218098
|
_ScriptVersionCache.maxVersions = 8;
|
|
218022
218099
|
var ScriptVersionCache = _ScriptVersionCache;
|
|
218023
218100
|
var LineIndexSnapshot = class _LineIndexSnapshot {
|
|
218024
|
-
constructor(version2, cache,
|
|
218101
|
+
constructor(version2, cache, index3, changesSincePreviousVersion = emptyArray2) {
|
|
218025
218102
|
this.version = version2;
|
|
218026
218103
|
this.cache = cache;
|
|
218027
|
-
this.index =
|
|
218104
|
+
this.index = index3;
|
|
218028
218105
|
this.changesSincePreviousVersion = changesSincePreviousVersion;
|
|
218029
218106
|
}
|
|
218030
218107
|
getText(rangeStart, rangeEnd) {
|
|
@@ -228872,8 +228949,8 @@ var init_dist9 = __esm({
|
|
|
228872
228949
|
}
|
|
228873
228950
|
if (delta.tool_calls != null) {
|
|
228874
228951
|
for (const toolCallDelta of delta.tool_calls) {
|
|
228875
|
-
const
|
|
228876
|
-
if (toolCalls[
|
|
228952
|
+
const index3 = toolCallDelta.index;
|
|
228953
|
+
if (toolCalls[index3] == null) {
|
|
228877
228954
|
if (toolCallDelta.id == null) {
|
|
228878
228955
|
throw new InvalidResponseDataError({
|
|
228879
228956
|
data: toolCallDelta,
|
|
@@ -228891,7 +228968,7 @@ var init_dist9 = __esm({
|
|
|
228891
228968
|
id: toolCallDelta.id,
|
|
228892
228969
|
toolName: toolCallDelta.function.name
|
|
228893
228970
|
});
|
|
228894
|
-
toolCalls[
|
|
228971
|
+
toolCalls[index3] = {
|
|
228895
228972
|
id: toolCallDelta.id,
|
|
228896
228973
|
type: "function",
|
|
228897
228974
|
function: {
|
|
@@ -228900,7 +228977,7 @@ var init_dist9 = __esm({
|
|
|
228900
228977
|
},
|
|
228901
228978
|
hasFinished: false
|
|
228902
228979
|
};
|
|
228903
|
-
const toolCall2 = toolCalls[
|
|
228980
|
+
const toolCall2 = toolCalls[index3];
|
|
228904
228981
|
if (((_d = toolCall2.function) == null ? void 0 : _d.name) != null && ((_e3 = toolCall2.function) == null ? void 0 : _e3.arguments) != null) {
|
|
228905
228982
|
if (toolCall2.function.arguments.length > 0) {
|
|
228906
228983
|
controller.enqueue({
|
|
@@ -228925,7 +229002,7 @@ var init_dist9 = __esm({
|
|
|
228925
229002
|
}
|
|
228926
229003
|
continue;
|
|
228927
229004
|
}
|
|
228928
|
-
const toolCall = toolCalls[
|
|
229005
|
+
const toolCall = toolCalls[index3];
|
|
228929
229006
|
if (toolCall.hasFinished) {
|
|
228930
229007
|
continue;
|
|
228931
229008
|
}
|
|
@@ -230542,13 +230619,13 @@ var init_path = __esm({
|
|
|
230542
230619
|
return statics[0];
|
|
230543
230620
|
let postPath = false;
|
|
230544
230621
|
const invalidSegments = [];
|
|
230545
|
-
const path8 = statics.reduce((previousValue, currentValue,
|
|
230622
|
+
const path8 = statics.reduce((previousValue, currentValue, index3) => {
|
|
230546
230623
|
if (/[?#]/.test(currentValue)) {
|
|
230547
230624
|
postPath = true;
|
|
230548
230625
|
}
|
|
230549
|
-
const value = params[
|
|
230626
|
+
const value = params[index3];
|
|
230550
230627
|
let encoded = (postPath ? encodeURIComponent : pathEncoder)("" + value);
|
|
230551
|
-
if (
|
|
230628
|
+
if (index3 !== params.length && (value == null || typeof value === "object" && // handle values from other realms
|
|
230552
230629
|
value.toString === Object.getPrototypeOf(Object.getPrototypeOf(value.hasOwnProperty ?? EMPTY) ?? EMPTY)?.toString)) {
|
|
230553
230630
|
encoded = value + "";
|
|
230554
230631
|
invalidSegments.push({
|
|
@@ -230557,7 +230634,7 @@ var init_path = __esm({
|
|
|
230557
230634
|
error: `Value of type ${Object.prototype.toString.call(value).slice(8, -1)} is not a valid path parameter`
|
|
230558
230635
|
});
|
|
230559
230636
|
}
|
|
230560
|
-
return previousValue + currentValue + (
|
|
230637
|
+
return previousValue + currentValue + (index3 === params.length ? "" : encoded);
|
|
230561
230638
|
}, "");
|
|
230562
230639
|
const pathOnly = path8.split(/[?#]/, 1)[0];
|
|
230563
230640
|
const invalidSegmentPattern = /(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;
|
|
@@ -233564,10 +233641,10 @@ function concatBytes(buffers) {
|
|
|
233564
233641
|
length += buffer.length;
|
|
233565
233642
|
}
|
|
233566
233643
|
const output = new Uint8Array(length);
|
|
233567
|
-
let
|
|
233644
|
+
let index3 = 0;
|
|
233568
233645
|
for (const buffer of buffers) {
|
|
233569
|
-
output.set(buffer,
|
|
233570
|
-
|
|
233646
|
+
output.set(buffer, index3);
|
|
233647
|
+
index3 += buffer.length;
|
|
233571
233648
|
}
|
|
233572
233649
|
return output;
|
|
233573
233650
|
}
|
|
@@ -233799,9 +233876,9 @@ async function* iterSSEChunks(iterator) {
|
|
|
233799
233876
|
}
|
|
233800
233877
|
}
|
|
233801
233878
|
function partition(str2, delimiter) {
|
|
233802
|
-
const
|
|
233803
|
-
if (
|
|
233804
|
-
return [str2.substring(0,
|
|
233879
|
+
const index3 = str2.indexOf(delimiter);
|
|
233880
|
+
if (index3 !== -1) {
|
|
233881
|
+
return [str2.substring(0, index3), delimiter, str2.substring(index3 + delimiter.length)];
|
|
233805
233882
|
}
|
|
233806
233883
|
return [str2, "", ""];
|
|
233807
233884
|
}
|
|
@@ -234472,13 +234549,13 @@ var init_path2 = __esm({
|
|
|
234472
234549
|
return statics[0];
|
|
234473
234550
|
let postPath = false;
|
|
234474
234551
|
const invalidSegments = [];
|
|
234475
|
-
const path8 = statics.reduce((previousValue, currentValue,
|
|
234552
|
+
const path8 = statics.reduce((previousValue, currentValue, index3) => {
|
|
234476
234553
|
if (/[?#]/.test(currentValue)) {
|
|
234477
234554
|
postPath = true;
|
|
234478
234555
|
}
|
|
234479
|
-
const value = params[
|
|
234556
|
+
const value = params[index3];
|
|
234480
234557
|
let encoded = (postPath ? encodeURIComponent : pathEncoder)("" + value);
|
|
234481
|
-
if (
|
|
234558
|
+
if (index3 !== params.length && (value == null || typeof value === "object" && // handle values from other realms
|
|
234482
234559
|
value.toString === Object.getPrototypeOf(Object.getPrototypeOf(value.hasOwnProperty ?? EMPTY2) ?? EMPTY2)?.toString)) {
|
|
234483
234560
|
encoded = value + "";
|
|
234484
234561
|
invalidSegments.push({
|
|
@@ -234487,7 +234564,7 @@ var init_path2 = __esm({
|
|
|
234487
234564
|
error: `Value of type ${Object.prototype.toString.call(value).slice(8, -1)} is not a valid path parameter`
|
|
234488
234565
|
});
|
|
234489
234566
|
}
|
|
234490
|
-
return previousValue + currentValue + (
|
|
234567
|
+
return previousValue + currentValue + (index3 === params.length ? "" : encoded);
|
|
234491
234568
|
}, "");
|
|
234492
234569
|
const pathOnly = path8.split(/[?#]/, 1)[0];
|
|
234493
234570
|
const invalidSegmentPattern = /(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;
|
|
@@ -234777,9 +234854,9 @@ var init_EventStream = __esm({
|
|
|
234777
234854
|
const listeners = __classPrivateFieldGet2(this, _EventStream_listeners, "f")[event];
|
|
234778
234855
|
if (!listeners)
|
|
234779
234856
|
return this;
|
|
234780
|
-
const
|
|
234781
|
-
if (
|
|
234782
|
-
listeners.splice(
|
|
234857
|
+
const index3 = listeners.findIndex((l3) => l3.listener === listener);
|
|
234858
|
+
if (index3 >= 0)
|
|
234859
|
+
listeners.splice(index3, 1);
|
|
234783
234860
|
return this;
|
|
234784
234861
|
}
|
|
234785
234862
|
/**
|
|
@@ -235238,66 +235315,66 @@ var init_parser2 = __esm({
|
|
|
235238
235315
|
};
|
|
235239
235316
|
_parseJSON = (jsonString, allow) => {
|
|
235240
235317
|
const length = jsonString.length;
|
|
235241
|
-
let
|
|
235318
|
+
let index3 = 0;
|
|
235242
235319
|
const markPartialJSON = (msg) => {
|
|
235243
|
-
throw new PartialJSON(`${msg} at position ${
|
|
235320
|
+
throw new PartialJSON(`${msg} at position ${index3}`);
|
|
235244
235321
|
};
|
|
235245
235322
|
const throwMalformedError = (msg) => {
|
|
235246
|
-
throw new MalformedJSON(`${msg} at position ${
|
|
235323
|
+
throw new MalformedJSON(`${msg} at position ${index3}`);
|
|
235247
235324
|
};
|
|
235248
235325
|
const parseAny = () => {
|
|
235249
235326
|
skipBlank();
|
|
235250
|
-
if (
|
|
235327
|
+
if (index3 >= length)
|
|
235251
235328
|
markPartialJSON("Unexpected end of input");
|
|
235252
|
-
if (jsonString[
|
|
235329
|
+
if (jsonString[index3] === '"')
|
|
235253
235330
|
return parseStr();
|
|
235254
|
-
if (jsonString[
|
|
235331
|
+
if (jsonString[index3] === "{")
|
|
235255
235332
|
return parseObj();
|
|
235256
|
-
if (jsonString[
|
|
235333
|
+
if (jsonString[index3] === "[")
|
|
235257
235334
|
return parseArr();
|
|
235258
|
-
if (jsonString.substring(
|
|
235259
|
-
|
|
235335
|
+
if (jsonString.substring(index3, index3 + 4) === "null" || Allow.NULL & allow && length - index3 < 4 && "null".startsWith(jsonString.substring(index3))) {
|
|
235336
|
+
index3 += 4;
|
|
235260
235337
|
return null;
|
|
235261
235338
|
}
|
|
235262
|
-
if (jsonString.substring(
|
|
235263
|
-
|
|
235339
|
+
if (jsonString.substring(index3, index3 + 4) === "true" || Allow.BOOL & allow && length - index3 < 4 && "true".startsWith(jsonString.substring(index3))) {
|
|
235340
|
+
index3 += 4;
|
|
235264
235341
|
return true;
|
|
235265
235342
|
}
|
|
235266
|
-
if (jsonString.substring(
|
|
235267
|
-
|
|
235343
|
+
if (jsonString.substring(index3, index3 + 5) === "false" || Allow.BOOL & allow && length - index3 < 5 && "false".startsWith(jsonString.substring(index3))) {
|
|
235344
|
+
index3 += 5;
|
|
235268
235345
|
return false;
|
|
235269
235346
|
}
|
|
235270
|
-
if (jsonString.substring(
|
|
235271
|
-
|
|
235347
|
+
if (jsonString.substring(index3, index3 + 8) === "Infinity" || Allow.INFINITY & allow && length - index3 < 8 && "Infinity".startsWith(jsonString.substring(index3))) {
|
|
235348
|
+
index3 += 8;
|
|
235272
235349
|
return Infinity;
|
|
235273
235350
|
}
|
|
235274
|
-
if (jsonString.substring(
|
|
235275
|
-
|
|
235351
|
+
if (jsonString.substring(index3, index3 + 9) === "-Infinity" || Allow.MINUS_INFINITY & allow && 1 < length - index3 && length - index3 < 9 && "-Infinity".startsWith(jsonString.substring(index3))) {
|
|
235352
|
+
index3 += 9;
|
|
235276
235353
|
return -Infinity;
|
|
235277
235354
|
}
|
|
235278
|
-
if (jsonString.substring(
|
|
235279
|
-
|
|
235355
|
+
if (jsonString.substring(index3, index3 + 3) === "NaN" || Allow.NAN & allow && length - index3 < 3 && "NaN".startsWith(jsonString.substring(index3))) {
|
|
235356
|
+
index3 += 3;
|
|
235280
235357
|
return NaN;
|
|
235281
235358
|
}
|
|
235282
235359
|
return parseNum();
|
|
235283
235360
|
};
|
|
235284
235361
|
const parseStr = () => {
|
|
235285
|
-
const start2 =
|
|
235362
|
+
const start2 = index3;
|
|
235286
235363
|
let escape2 = false;
|
|
235287
|
-
|
|
235288
|
-
while (
|
|
235289
|
-
escape2 = jsonString[
|
|
235290
|
-
|
|
235364
|
+
index3++;
|
|
235365
|
+
while (index3 < length && (jsonString[index3] !== '"' || escape2 && jsonString[index3 - 1] === "\\")) {
|
|
235366
|
+
escape2 = jsonString[index3] === "\\" ? !escape2 : false;
|
|
235367
|
+
index3++;
|
|
235291
235368
|
}
|
|
235292
|
-
if (jsonString.charAt(
|
|
235369
|
+
if (jsonString.charAt(index3) == '"') {
|
|
235293
235370
|
try {
|
|
235294
|
-
return JSON.parse(jsonString.substring(start2, ++
|
|
235371
|
+
return JSON.parse(jsonString.substring(start2, ++index3 - Number(escape2)));
|
|
235295
235372
|
} catch (e) {
|
|
235296
235373
|
throwMalformedError(String(e));
|
|
235297
235374
|
}
|
|
235298
235375
|
} else if (Allow.STR & allow) {
|
|
235299
235376
|
try {
|
|
235300
|
-
return JSON.parse(jsonString.substring(start2,
|
|
235377
|
+
return JSON.parse(jsonString.substring(start2, index3 - Number(escape2)) + '"');
|
|
235301
235378
|
} catch (e) {
|
|
235302
235379
|
return JSON.parse(jsonString.substring(start2, jsonString.lastIndexOf("\\")) + '"');
|
|
235303
235380
|
}
|
|
@@ -235305,17 +235382,17 @@ var init_parser2 = __esm({
|
|
|
235305
235382
|
markPartialJSON("Unterminated string literal");
|
|
235306
235383
|
};
|
|
235307
235384
|
const parseObj = () => {
|
|
235308
|
-
|
|
235385
|
+
index3++;
|
|
235309
235386
|
skipBlank();
|
|
235310
235387
|
const obj = {};
|
|
235311
235388
|
try {
|
|
235312
|
-
while (jsonString[
|
|
235389
|
+
while (jsonString[index3] !== "}") {
|
|
235313
235390
|
skipBlank();
|
|
235314
|
-
if (
|
|
235391
|
+
if (index3 >= length && Allow.OBJ & allow)
|
|
235315
235392
|
return obj;
|
|
235316
235393
|
const key = parseStr();
|
|
235317
235394
|
skipBlank();
|
|
235318
|
-
|
|
235395
|
+
index3++;
|
|
235319
235396
|
try {
|
|
235320
235397
|
const value = parseAny();
|
|
235321
235398
|
Object.defineProperty(obj, key, { value, writable: true, enumerable: true, configurable: true });
|
|
@@ -235326,8 +235403,8 @@ var init_parser2 = __esm({
|
|
|
235326
235403
|
throw e;
|
|
235327
235404
|
}
|
|
235328
235405
|
skipBlank();
|
|
235329
|
-
if (jsonString[
|
|
235330
|
-
|
|
235406
|
+
if (jsonString[index3] === ",")
|
|
235407
|
+
index3++;
|
|
235331
235408
|
}
|
|
235332
235409
|
} catch (e) {
|
|
235333
235410
|
if (Allow.OBJ & allow)
|
|
@@ -235335,18 +235412,18 @@ var init_parser2 = __esm({
|
|
|
235335
235412
|
else
|
|
235336
235413
|
markPartialJSON("Expected '}' at end of object");
|
|
235337
235414
|
}
|
|
235338
|
-
|
|
235415
|
+
index3++;
|
|
235339
235416
|
return obj;
|
|
235340
235417
|
};
|
|
235341
235418
|
const parseArr = () => {
|
|
235342
|
-
|
|
235419
|
+
index3++;
|
|
235343
235420
|
const arr = [];
|
|
235344
235421
|
try {
|
|
235345
|
-
while (jsonString[
|
|
235422
|
+
while (jsonString[index3] !== "]") {
|
|
235346
235423
|
arr.push(parseAny());
|
|
235347
235424
|
skipBlank();
|
|
235348
|
-
if (jsonString[
|
|
235349
|
-
|
|
235425
|
+
if (jsonString[index3] === ",") {
|
|
235426
|
+
index3++;
|
|
235350
235427
|
}
|
|
235351
235428
|
}
|
|
235352
235429
|
} catch (e) {
|
|
@@ -235355,11 +235432,11 @@ var init_parser2 = __esm({
|
|
|
235355
235432
|
}
|
|
235356
235433
|
markPartialJSON("Expected ']' at end of array");
|
|
235357
235434
|
}
|
|
235358
|
-
|
|
235435
|
+
index3++;
|
|
235359
235436
|
return arr;
|
|
235360
235437
|
};
|
|
235361
235438
|
const parseNum = () => {
|
|
235362
|
-
if (
|
|
235439
|
+
if (index3 === 0) {
|
|
235363
235440
|
if (jsonString === "-" && Allow.NUM & allow)
|
|
235364
235441
|
markPartialJSON("Not sure what '-' is");
|
|
235365
235442
|
try {
|
|
@@ -235376,17 +235453,17 @@ var init_parser2 = __esm({
|
|
|
235376
235453
|
throwMalformedError(String(e));
|
|
235377
235454
|
}
|
|
235378
235455
|
}
|
|
235379
|
-
const start2 =
|
|
235380
|
-
if (jsonString[
|
|
235381
|
-
|
|
235382
|
-
while (jsonString[
|
|
235383
|
-
|
|
235384
|
-
if (
|
|
235456
|
+
const start2 = index3;
|
|
235457
|
+
if (jsonString[index3] === "-")
|
|
235458
|
+
index3++;
|
|
235459
|
+
while (jsonString[index3] && !",]}".includes(jsonString[index3]))
|
|
235460
|
+
index3++;
|
|
235461
|
+
if (index3 == length && !(Allow.NUM & allow))
|
|
235385
235462
|
markPartialJSON("Unterminated number literal");
|
|
235386
235463
|
try {
|
|
235387
|
-
return JSON.parse(jsonString.substring(start2,
|
|
235464
|
+
return JSON.parse(jsonString.substring(start2, index3));
|
|
235388
235465
|
} catch (e) {
|
|
235389
|
-
if (jsonString.substring(start2,
|
|
235466
|
+
if (jsonString.substring(start2, index3) === "-" && Allow.NUM & allow)
|
|
235390
235467
|
markPartialJSON("Not sure what '-' is");
|
|
235391
235468
|
try {
|
|
235392
235469
|
return JSON.parse(jsonString.substring(start2, jsonString.lastIndexOf("e")));
|
|
@@ -235396,8 +235473,8 @@ var init_parser2 = __esm({
|
|
|
235396
235473
|
}
|
|
235397
235474
|
};
|
|
235398
235475
|
const skipBlank = () => {
|
|
235399
|
-
while (
|
|
235400
|
-
|
|
235476
|
+
while (index3 < length && " \n\r ".includes(jsonString[index3])) {
|
|
235477
|
+
index3++;
|
|
235401
235478
|
}
|
|
235402
235479
|
};
|
|
235403
235480
|
return parseAny();
|
|
@@ -235421,22 +235498,22 @@ function finalizeChatCompletion(snapshot, params) {
|
|
|
235421
235498
|
const completion = {
|
|
235422
235499
|
...rest,
|
|
235423
235500
|
id,
|
|
235424
|
-
choices: choices.map(({ message, finish_reason, index:
|
|
235501
|
+
choices: choices.map(({ message, finish_reason, index: index3, logprobs, ...choiceRest }) => {
|
|
235425
235502
|
if (!finish_reason) {
|
|
235426
|
-
throw new OpenAIError(`missing finish_reason for choice ${
|
|
235503
|
+
throw new OpenAIError(`missing finish_reason for choice ${index3}`);
|
|
235427
235504
|
}
|
|
235428
235505
|
const { content = null, function_call, tool_calls, ...messageRest } = message;
|
|
235429
235506
|
const role = message.role;
|
|
235430
235507
|
if (!role) {
|
|
235431
|
-
throw new OpenAIError(`missing role for choice ${
|
|
235508
|
+
throw new OpenAIError(`missing role for choice ${index3}`);
|
|
235432
235509
|
}
|
|
235433
235510
|
if (function_call) {
|
|
235434
235511
|
const { arguments: args2, name: name14 } = function_call;
|
|
235435
235512
|
if (args2 == null) {
|
|
235436
|
-
throw new OpenAIError(`missing function_call.arguments for choice ${
|
|
235513
|
+
throw new OpenAIError(`missing function_call.arguments for choice ${index3}`);
|
|
235437
235514
|
}
|
|
235438
235515
|
if (!name14) {
|
|
235439
|
-
throw new OpenAIError(`missing function_call.name for choice ${
|
|
235516
|
+
throw new OpenAIError(`missing function_call.name for choice ${index3}`);
|
|
235440
235517
|
}
|
|
235441
235518
|
return {
|
|
235442
235519
|
...choiceRest,
|
|
@@ -235447,14 +235524,14 @@ function finalizeChatCompletion(snapshot, params) {
|
|
|
235447
235524
|
refusal: message.refusal ?? null
|
|
235448
235525
|
},
|
|
235449
235526
|
finish_reason,
|
|
235450
|
-
index:
|
|
235527
|
+
index: index3,
|
|
235451
235528
|
logprobs
|
|
235452
235529
|
};
|
|
235453
235530
|
}
|
|
235454
235531
|
if (tool_calls) {
|
|
235455
235532
|
return {
|
|
235456
235533
|
...choiceRest,
|
|
235457
|
-
index:
|
|
235534
|
+
index: index3,
|
|
235458
235535
|
finish_reason,
|
|
235459
235536
|
logprobs,
|
|
235460
235537
|
message: {
|
|
@@ -235466,19 +235543,19 @@ function finalizeChatCompletion(snapshot, params) {
|
|
|
235466
235543
|
const { function: fn2, type, id: id2, ...toolRest } = tool_call;
|
|
235467
235544
|
const { arguments: args2, name: name14, ...fnRest } = fn2 || {};
|
|
235468
235545
|
if (id2 == null) {
|
|
235469
|
-
throw new OpenAIError(`missing choices[${
|
|
235546
|
+
throw new OpenAIError(`missing choices[${index3}].tool_calls[${i3}].id
|
|
235470
235547
|
${str(snapshot)}`);
|
|
235471
235548
|
}
|
|
235472
235549
|
if (type == null) {
|
|
235473
|
-
throw new OpenAIError(`missing choices[${
|
|
235550
|
+
throw new OpenAIError(`missing choices[${index3}].tool_calls[${i3}].type
|
|
235474
235551
|
${str(snapshot)}`);
|
|
235475
235552
|
}
|
|
235476
235553
|
if (name14 == null) {
|
|
235477
|
-
throw new OpenAIError(`missing choices[${
|
|
235554
|
+
throw new OpenAIError(`missing choices[${index3}].tool_calls[${i3}].function.name
|
|
235478
235555
|
${str(snapshot)}`);
|
|
235479
235556
|
}
|
|
235480
235557
|
if (args2 == null) {
|
|
235481
|
-
throw new OpenAIError(`missing choices[${
|
|
235558
|
+
throw new OpenAIError(`missing choices[${index3}].tool_calls[${i3}].function.arguments
|
|
235482
235559
|
${str(snapshot)}`);
|
|
235483
235560
|
}
|
|
235484
235561
|
return { ...toolRest, id: id2, type, function: { ...fnRest, name: name14, arguments: args2 } };
|
|
@@ -235490,7 +235567,7 @@ ${str(snapshot)}`);
|
|
|
235490
235567
|
...choiceRest,
|
|
235491
235568
|
message: { ...messageRest, content, role, refusal: message.refusal ?? null },
|
|
235492
235569
|
finish_reason,
|
|
235493
|
-
index:
|
|
235570
|
+
index: index3,
|
|
235494
235571
|
logprobs
|
|
235495
235572
|
};
|
|
235496
235573
|
}),
|
|
@@ -235752,10 +235829,10 @@ var init_ChatCompletionStream = __esm({
|
|
|
235752
235829
|
} else {
|
|
235753
235830
|
Object.assign(snapshot, rest);
|
|
235754
235831
|
}
|
|
235755
|
-
for (const { delta, finish_reason, index:
|
|
235756
|
-
let choice = snapshot.choices[
|
|
235832
|
+
for (const { delta, finish_reason, index: index3, logprobs = null, ...other } of chunk.choices) {
|
|
235833
|
+
let choice = snapshot.choices[index3];
|
|
235757
235834
|
if (!choice) {
|
|
235758
|
-
choice = snapshot.choices[
|
|
235835
|
+
choice = snapshot.choices[index3] = { finish_reason, index: index3, message: {}, logprobs, ...other };
|
|
235759
235836
|
}
|
|
235760
235837
|
if (logprobs) {
|
|
235761
235838
|
if (!choice.logprobs) {
|
|
@@ -235817,8 +235894,8 @@ var init_ChatCompletionStream = __esm({
|
|
|
235817
235894
|
if (tool_calls) {
|
|
235818
235895
|
if (!choice.message.tool_calls)
|
|
235819
235896
|
choice.message.tool_calls = [];
|
|
235820
|
-
for (const { index:
|
|
235821
|
-
const tool_call = (_d = choice.message.tool_calls)[
|
|
235897
|
+
for (const { index: index4, id, type, function: fn2, ...rest3 } of tool_calls) {
|
|
235898
|
+
const tool_call = (_d = choice.message.tool_calls)[index4] ?? (_d[index4] = {});
|
|
235822
235899
|
Object.assign(tool_call, rest3);
|
|
235823
235900
|
if (id)
|
|
235824
235901
|
tool_call.id = id;
|
|
@@ -236903,19 +236980,19 @@ var init_AssistantStream = __esm({
|
|
|
236903
236980
|
if (!isObj(deltaEntry)) {
|
|
236904
236981
|
throw new Error(`Expected array delta entry to be an object but got: ${deltaEntry}`);
|
|
236905
236982
|
}
|
|
236906
|
-
const
|
|
236907
|
-
if (
|
|
236983
|
+
const index3 = deltaEntry["index"];
|
|
236984
|
+
if (index3 == null) {
|
|
236908
236985
|
console.error(deltaEntry);
|
|
236909
236986
|
throw new Error("Expected array delta entry to have an `index` property");
|
|
236910
236987
|
}
|
|
236911
|
-
if (typeof
|
|
236912
|
-
throw new Error(`Expected array delta entry \`index\` property to be a number but got ${
|
|
236988
|
+
if (typeof index3 !== "number") {
|
|
236989
|
+
throw new Error(`Expected array delta entry \`index\` property to be a number but got ${index3}`);
|
|
236913
236990
|
}
|
|
236914
|
-
const accEntry = accValue[
|
|
236991
|
+
const accEntry = accValue[index3];
|
|
236915
236992
|
if (accEntry == null) {
|
|
236916
236993
|
accValue.push(deltaEntry);
|
|
236917
236994
|
} else {
|
|
236918
|
-
accValue[
|
|
236995
|
+
accValue[index3] = this.accumulateDelta(accEntry, deltaEntry);
|
|
236919
236996
|
}
|
|
236920
236997
|
}
|
|
236921
236998
|
continue;
|
|
@@ -240254,13 +240331,13 @@ var require_re = __commonJS({
|
|
|
240254
240331
|
};
|
|
240255
240332
|
var createToken = (name14, value, isGlobal) => {
|
|
240256
240333
|
const safe = makeSafeRegex(value);
|
|
240257
|
-
const
|
|
240258
|
-
debug(name14,
|
|
240259
|
-
t2[name14] =
|
|
240260
|
-
src[
|
|
240261
|
-
safeSrc[
|
|
240262
|
-
re4[
|
|
240263
|
-
safeRe[
|
|
240334
|
+
const index3 = R3++;
|
|
240335
|
+
debug(name14, index3, value);
|
|
240336
|
+
t2[name14] = index3;
|
|
240337
|
+
src[index3] = value;
|
|
240338
|
+
safeSrc[index3] = safe;
|
|
240339
|
+
re4[index3] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
240340
|
+
safeRe[index3] = new RegExp(safe, isGlobal ? "g" : void 0);
|
|
240264
240341
|
};
|
|
240265
240342
|
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
|
|
240266
240343
|
createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
|
|
@@ -243024,11 +243101,11 @@ var init_dist11 = __esm({
|
|
|
243024
243101
|
this.console = console;
|
|
243025
243102
|
}
|
|
243026
243103
|
formatMessage(args2) {
|
|
243027
|
-
const formattedArgs = args2.map((arg,
|
|
243104
|
+
const formattedArgs = args2.map((arg, index3) => {
|
|
243028
243105
|
if (typeof arg === "object") {
|
|
243029
243106
|
return JSON.stringify(arg);
|
|
243030
243107
|
} else {
|
|
243031
|
-
if (
|
|
243108
|
+
if (index3 === 0) {
|
|
243032
243109
|
if (args2.length > 1) {
|
|
243033
243110
|
return chalk.yellow(`${arg}`);
|
|
243034
243111
|
} else {
|
|
@@ -243197,7 +243274,7 @@ ${originalStackBody}`;
|
|
|
243197
243274
|
}
|
|
243198
243275
|
if (data.possibleFixes?.length) {
|
|
243199
243276
|
output += "\n" + chalk2.cyan.bold("Try the following:") + "\n";
|
|
243200
|
-
const fixes = data.possibleFixes?.map((fix,
|
|
243277
|
+
const fixes = data.possibleFixes?.map((fix, index3) => ` ${index3 + 1}. ` + chalk2.white(fix));
|
|
243201
243278
|
output += fixes?.join("\n") + "\n";
|
|
243202
243279
|
}
|
|
243203
243280
|
if (data.stack?.length) {
|
|
@@ -253567,8 +253644,8 @@ function generateDataComponentDefinition(componentId, componentData, style = DEF
|
|
|
253567
253644
|
lines.push(`${indentation}${indentation}component: ${componentString},`);
|
|
253568
253645
|
if (render.mockData && typeof render.mockData === "object") {
|
|
253569
253646
|
const mockDataStr = JSON.stringify(render.mockData, null, 2);
|
|
253570
|
-
const formattedMockData = mockDataStr.split("\n").map((line,
|
|
253571
|
-
if (
|
|
253647
|
+
const formattedMockData = mockDataStr.split("\n").map((line, index3) => {
|
|
253648
|
+
if (index3 === 0) return line;
|
|
253572
253649
|
return `${indentation}${indentation}${line}`;
|
|
253573
253650
|
}).join("\n");
|
|
253574
253651
|
lines.push(`${indentation}${indentation}mockData: ${formattedMockData},`);
|
|
@@ -253957,8 +254034,8 @@ ${indentation}}`;
|
|
|
253957
254034
|
const trimmedCode = executeCode.trim();
|
|
253958
254035
|
if (trimmedCode.includes("\n")) {
|
|
253959
254036
|
const lines = trimmedCode.split("\n");
|
|
253960
|
-
return lines.map((line,
|
|
253961
|
-
if (
|
|
254037
|
+
return lines.map((line, index3) => {
|
|
254038
|
+
if (index3 === 0) return line;
|
|
253962
254039
|
return indentation + line;
|
|
253963
254040
|
}).join("\n");
|
|
253964
254041
|
}
|
|
@@ -253999,8 +254076,8 @@ function generateFunctionToolDefinition(toolId, toolData, style = DEFAULT_STYLE6
|
|
|
253999
254076
|
const inputSchema = toolData.inputSchema || toolData.schema;
|
|
254000
254077
|
if (inputSchema) {
|
|
254001
254078
|
const schemaStr = JSON.stringify(inputSchema, null, 2);
|
|
254002
|
-
const formattedSchema = schemaStr.split("\n").map((line,
|
|
254003
|
-
if (
|
|
254079
|
+
const formattedSchema = schemaStr.split("\n").map((line, index3) => {
|
|
254080
|
+
if (index3 === 0) return `${indentation}inputSchema: ${line}`;
|
|
254004
254081
|
return `${indentation}${line}`;
|
|
254005
254082
|
}).join("\n");
|
|
254006
254083
|
lines.push(formattedSchema + ",");
|
|
@@ -254105,8 +254182,8 @@ function generateMcpToolDefinition(toolId, toolData, style = DEFAULT_STYLE7, reg
|
|
|
254105
254182
|
}
|
|
254106
254183
|
if (toolData.headers && typeof toolData.headers === "object") {
|
|
254107
254184
|
const headersStr = JSON.stringify(toolData.headers, null, 2);
|
|
254108
|
-
const formattedHeaders = headersStr.split("\n").map((line,
|
|
254109
|
-
if (
|
|
254185
|
+
const formattedHeaders = headersStr.split("\n").map((line, index3) => {
|
|
254186
|
+
if (index3 === 0) return `${indentation}headers: ${line}`;
|
|
254110
254187
|
return `${indentation}${line}`;
|
|
254111
254188
|
}).join("\n");
|
|
254112
254189
|
lines.push(formattedHeaders + ",");
|
|
@@ -254612,8 +254689,8 @@ function generateSubAgentDefinition(agentId, agentData, style = DEFAULT_STYLE, r
|
|
|
254612
254689
|
lines.push(`${indentation}canUse: () => [${toolReferences[0]}],`);
|
|
254613
254690
|
} else {
|
|
254614
254691
|
lines.push(`${indentation}canUse: () => [`);
|
|
254615
|
-
toolReferences.forEach((ref,
|
|
254616
|
-
const isLast =
|
|
254692
|
+
toolReferences.forEach((ref, index3) => {
|
|
254693
|
+
const isLast = index3 === toolReferences.length - 1;
|
|
254617
254694
|
lines.push(`${indentation}${nestedIndent}${ref}${isLast ? "" : ","}`);
|
|
254618
254695
|
});
|
|
254619
254696
|
lines.push(`${indentation}],`);
|
|
@@ -254676,8 +254753,8 @@ function generateSubAgentDefinition(agentId, agentData, style = DEFAULT_STYLE, r
|
|
|
254676
254753
|
lines.push(`${indentation}canDelegateTo: () => [${delegateReferences[0]}],`);
|
|
254677
254754
|
} else {
|
|
254678
254755
|
lines.push(`${indentation}canDelegateTo: () => [`);
|
|
254679
|
-
delegateReferences.forEach((ref,
|
|
254680
|
-
const isLast =
|
|
254756
|
+
delegateReferences.forEach((ref, index3) => {
|
|
254757
|
+
const isLast = index3 === delegateReferences.length - 1;
|
|
254681
254758
|
lines.push(`${indentation}${nestedIndent}${ref}${isLast ? "" : ","}`);
|
|
254682
254759
|
});
|
|
254683
254760
|
lines.push(`${indentation}],`);
|
|
@@ -257167,7 +257244,7 @@ function compareSubAgents(localAgents, remoteAgents, debug) {
|
|
|
257167
257244
|
}
|
|
257168
257245
|
function generateSubAgentChangeSummary(fieldChanges) {
|
|
257169
257246
|
const changeTypes = new Set(fieldChanges.map((c2) => c2.changeType));
|
|
257170
|
-
const fieldNames = fieldChanges.map((c2) => c2.field.split(".")[0]).filter((value,
|
|
257247
|
+
const fieldNames = fieldChanges.map((c2) => c2.field.split(".")[0]).filter((value, index3, self2) => self2.indexOf(value) === index3);
|
|
257171
257248
|
if (changeTypes.has("modified") && fieldNames.length === 1) {
|
|
257172
257249
|
return `Modified ${fieldNames[0]}`;
|
|
257173
257250
|
}
|
|
@@ -257364,13 +257441,13 @@ function compareArraysAsSet(basePath, oldArray, newArray, depth) {
|
|
|
257364
257441
|
};
|
|
257365
257442
|
const oldMap = /* @__PURE__ */ new Map();
|
|
257366
257443
|
const newMap = /* @__PURE__ */ new Map();
|
|
257367
|
-
oldArray.forEach((item,
|
|
257444
|
+
oldArray.forEach((item, index3) => {
|
|
257368
257445
|
const key = getItemKey(item);
|
|
257369
|
-
oldMap.set(key, { item, index:
|
|
257446
|
+
oldMap.set(key, { item, index: index3 });
|
|
257370
257447
|
});
|
|
257371
|
-
newArray.forEach((item,
|
|
257448
|
+
newArray.forEach((item, index3) => {
|
|
257372
257449
|
const key = getItemKey(item);
|
|
257373
|
-
newMap.set(key, { item, index:
|
|
257450
|
+
newMap.set(key, { item, index: index3 });
|
|
257374
257451
|
});
|
|
257375
257452
|
for (const [key, { item }] of newMap) {
|
|
257376
257453
|
if (!oldMap.has(key)) {
|
|
@@ -259670,8 +259747,8 @@ function replaceObjectProperty(content, propertyPath, replacement) {
|
|
|
259670
259747
|
}
|
|
259671
259748
|
if (braceCount <= 0) {
|
|
259672
259749
|
const hasTrailingComma = line.includes(",") || i3 + 1 < lines.length && lines[i3 + 1].trim().startsWith("}") === false && lines[i3 + 1].trim() !== "";
|
|
259673
|
-
const indentedReplacement = replacementStr.split("\n").map((replacementLine,
|
|
259674
|
-
if (
|
|
259750
|
+
const indentedReplacement = replacementStr.split("\n").map((replacementLine, index3) => {
|
|
259751
|
+
if (index3 === 0) {
|
|
259675
259752
|
return `${targetPropertyIndent}${propertyPath}: ${replacementLine}`;
|
|
259676
259753
|
}
|
|
259677
259754
|
return `${targetPropertyIndent}${replacementLine}`;
|
|
@@ -259699,8 +259776,8 @@ function replaceObjectProperty(content, propertyPath, replacement) {
|
|
|
259699
259776
|
}
|
|
259700
259777
|
if (braceCount <= 0) {
|
|
259701
259778
|
const hasTrailingComma = line.includes(",");
|
|
259702
|
-
const indentedReplacement = replacementStr.split("\n").map((replacementLine,
|
|
259703
|
-
if (
|
|
259779
|
+
const indentedReplacement = replacementStr.split("\n").map((replacementLine, index3) => {
|
|
259780
|
+
if (index3 === 0) {
|
|
259704
259781
|
return `${targetPropertyIndent}${propertyPath}: ${replacementLine}`;
|
|
259705
259782
|
}
|
|
259706
259783
|
return `${targetPropertyIndent}${replacementLine}`;
|
|
@@ -259756,8 +259833,8 @@ function injectPropertyIntoObject(content, propertyPath, replacement) {
|
|
|
259756
259833
|
const prevLine = lines[insertionPoint - 1].trim();
|
|
259757
259834
|
needsCommaPrefix = prevLine !== "" && !prevLine.endsWith(",") && !prevLine.startsWith("}");
|
|
259758
259835
|
}
|
|
259759
|
-
const indentedReplacement = replacementStr.split("\n").map((replacementLine,
|
|
259760
|
-
if (
|
|
259836
|
+
const indentedReplacement = replacementStr.split("\n").map((replacementLine, index3) => {
|
|
259837
|
+
if (index3 === 0) {
|
|
259761
259838
|
return `${propertyIndent}${propertyPath}: ${replacementLine}`;
|
|
259762
259839
|
}
|
|
259763
259840
|
return `${propertyIndent}${replacementLine}`;
|