@scalar/cli 2.1.0 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -24
- package/chunks/{action-CYP4VDK3.js → action-37EV4UHW.js} +12 -35
- package/chunks/{action-MENXFJH3.js → action-4XI7XJR4.js} +9 -9
- package/chunks/{action-H5OHT2GV.js → action-5IU77OII.js} +7 -3
- package/chunks/{action-STIEAXOE.js → action-B3KKREWQ.js} +16 -5
- package/chunks/{action-BYZUBXVB.js → action-CH24QGTE.js} +8 -4
- package/chunks/action-F3UX5E3M.js +522 -0
- package/chunks/{action-GB6DM53B.js → action-FDB7NEOK.js} +21 -10
- package/chunks/action-FIXBOJEW.js +244 -0
- package/chunks/{action-DFKHSDFV.js → action-G26LSVZ7.js} +7 -3
- package/chunks/{action-Q5UJ32D6.js → action-H3RTILLM.js} +1 -1
- package/chunks/{action-GEBRPNRT.js → action-HGBBV353.js} +15 -16
- package/chunks/{action-5R5FDF6S.js → action-IUE4IOWO.js} +67 -22
- package/chunks/{action-TPBKPHNS.js → action-JZLZ7ZAD.js} +22 -22
- package/chunks/action-LA6KVAXQ.js +374 -0
- package/chunks/{action-PVDDRIM6.js → action-M7RQKBSB.js} +65 -26
- package/chunks/{action-F4Y6Q2VB.js → action-MSLBC2SO.js} +21 -21
- package/chunks/{action-BNEGJBUH.js → action-NVSZT2ZD.js} +8 -9
- package/chunks/{action-ANU5HGC4.js → action-OGQSTRMX.js} +17 -14
- package/chunks/{action-CLSD7O2R.js → action-PAGJ5PWC.js} +10 -10
- package/chunks/action-QE2ZQQX7.js +250 -0
- package/chunks/{action-HD2T6BFJ.js → action-QPUSPD5M.js} +10 -10
- package/chunks/{action-45OGQB2M.js → action-R7IMFHQ5.js} +17 -8
- package/chunks/{action-UDZUUJSI.js → action-SH4UUXPL.js} +18 -7
- package/chunks/action-SNLCIBQC.js +84 -0
- package/chunks/{action-C5VB4ITT.js → action-SQG3JAII.js} +36 -18
- package/chunks/action-UZQJNYK4.js +18 -0
- package/chunks/{action-HNKM3Q65.js → action-VC4DCVST.js} +17 -14
- package/chunks/{action-BMFXENMX.js → action-VTVFY2MP.js} +39 -34
- package/chunks/{action-TZ5KGAQT.js → action-WFWYGY7O.js} +17 -14
- package/chunks/{action-W5BATF4Q.js → action-XMNX5ZYT.js} +24 -24
- package/chunks/{agent-XGLOHXNA.js → agent-HCQRMHQ5.js} +25 -5
- package/chunks/asyncapi-QM76O55R.js +105 -0
- package/chunks/{build.action-LKOILPA6.js → build.action-P7FCIMYU.js} +22 -22
- package/chunks/{chunk-23I5PKZZ.js → chunk-24WAOKGG.js} +32 -5
- package/chunks/chunk-3L6DLIXJ.js +25530 -0
- package/chunks/chunk-3ZJYGGAA.js +30 -0
- package/chunks/{chunk-ZTVWAKNJ.js → chunk-4NHMAG6F.js} +1 -1
- package/chunks/{chunk-IX7LJ3AD.js → chunk-4ORL4MST.js} +2 -3
- package/chunks/{chunk-OAXFCOJV.js → chunk-4ZDQXWBT.js} +2 -1
- package/chunks/{chunk-ASMHW5AY.js → chunk-6ZMT63IV.js} +1 -1
- package/chunks/{chunk-P2VH7DOC.js → chunk-7AGLC7WV.js} +6 -6
- package/chunks/{chunk-SXYALPYK.js → chunk-AO3F5XWR.js} +498 -60
- package/chunks/{chunk-B6QZJWCQ.js → chunk-B2MHTD3R.js} +4 -6
- package/chunks/{chunk-4QS7SJTG.js → chunk-CISTON3A.js} +51 -36
- package/chunks/chunk-COBPBRQF.js +25 -0
- package/chunks/{chunk-2BSG2QHO.js → chunk-F467BYYR.js} +133 -20
- package/chunks/{chunk-TLFMATXR.js → chunk-GSGZHE26.js} +33 -25
- package/chunks/{chunk-UPUTMFD4.js → chunk-HCPN3KNF.js} +185 -13
- package/chunks/{chunk-P646T2WH.js → chunk-HPL3ZZ2P.js} +131 -13
- package/chunks/{chunk-H2WRMLYY.js → chunk-IKT5F47M.js} +3571 -7
- package/chunks/{chunk-AHWWJ3MD.js → chunk-K4DTP5TV.js} +1 -1
- package/chunks/{chunk-TQ5XC2E3.js → chunk-LFU5ZUAP.js} +77 -11
- package/chunks/{chunk-5BISXQX4.js → chunk-M37TP6U2.js} +11 -13
- package/chunks/chunk-OQKDBLOZ.js +741 -0
- package/chunks/chunk-P7H7GY5A.js +14 -0
- package/chunks/{chunk-47Y4L5IT.js → chunk-PBXZN65A.js} +1031 -481
- package/chunks/{chunk-HQKBZOYU.js → chunk-PT5TI77I.js} +3 -3
- package/chunks/chunk-Q7DOQHZN.js +404 -0
- package/chunks/{chunk-X4QLDBB5.js → chunk-T5HJUAWB.js} +24 -3
- package/chunks/{chunk-NUXPNUSS.js → chunk-UGGNHILG.js} +1 -1
- package/chunks/{chunk-4DGQIAJX.js → chunk-VNYE4R7N.js} +154 -14
- package/chunks/{chunk-KWOL7A6J.js → chunk-X5T526CE.js} +2 -2
- package/chunks/chunk-XCSR4RIT.js +210 -0
- package/chunks/{chunk-SHSHFGA7.js → chunk-Z2KMGFE6.js} +4 -6
- package/chunks/{create.action-FFQLBSJH.js → create.action-HDD2WUON.js} +22 -22
- package/chunks/{delete.action-STHQHP4F.js → delete.action-7GOZY7ID.js} +22 -22
- package/chunks/{delete.action-QNN3LC2F.js → delete.action-VE66JFDS.js} +22 -22
- package/chunks/{get.action-OTKYOP3Z.js → get.action-2745EB4N.js} +15 -16
- package/chunks/{list.action-KDM5RHEH.js → list.action-3VTXQJRA.js} +19 -19
- package/chunks/{list.action-6I5EZAVB.js → list.action-4QDCZLSZ.js} +22 -22
- package/chunks/{publish.action-PODTVRXS.js → publish.action-ULQLZKWU.js} +44 -36
- package/chunks/{update.action-KMD4ZM75.js → update.action-6QEFP7NA.js} +22 -22
- package/chunks/{update.action-4F6STTEQ.js → update.action-OROQSP2S.js} +22 -22
- package/docs.html +104 -103
- package/index.js +84 -68
- package/package.json +16 -12
- package/chunks/action-CCW66QJN.js +0 -72
- package/chunks/action-CQ56FVES.js +0 -65
- package/chunks/action-JOSVV6YA.js +0 -71
- package/chunks/action-P7LN6FGY.js +0 -13
- package/chunks/action-R6ZZO26F.js +0 -299
- package/chunks/action-TWFJNQ2R.js +0 -95
- package/chunks/chunk-5BPPGTUU.js +0 -463
- package/chunks/chunk-DOVIWNKQ.js +0 -108
- package/chunks/chunk-ISGLWBXZ.js +0 -4265
- package/chunks/chunk-T7MDADON.js +0 -17
- package/chunks/chunk-VTYTPSXO.js +0 -161
|
@@ -2,18 +2,16 @@ import { createRequire as $$cR } from "node:module"; const require = $$cR(import
|
|
|
2
2
|
import {
|
|
3
3
|
teamImageSchema,
|
|
4
4
|
teamNameSchema
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VNYE4R7N.js";
|
|
6
6
|
import {
|
|
7
7
|
brandedUid,
|
|
8
8
|
emailSchema,
|
|
9
9
|
entitySchema,
|
|
10
|
-
mintUid,
|
|
11
|
-
timestampSchema
|
|
12
|
-
} from "./chunk-ISGLWBXZ.js";
|
|
13
|
-
import {
|
|
14
10
|
external_exports,
|
|
11
|
+
mintUid,
|
|
12
|
+
timestampSchema,
|
|
15
13
|
zod_default
|
|
16
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-IKT5F47M.js";
|
|
17
15
|
|
|
18
16
|
// ../../packages/entities/dist/user/bitbucket.js
|
|
19
17
|
var userBitbucketSchema = entitySchema.extend({
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
2
|
import {
|
|
3
|
-
baseRegistrySchema
|
|
4
|
-
|
|
3
|
+
baseRegistrySchema,
|
|
4
|
+
docVersionToolSchema
|
|
5
|
+
} from "./chunk-Q7DOQHZN.js";
|
|
5
6
|
import {
|
|
6
|
-
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
HTTP_METHODS
|
|
8
|
+
} from "./chunk-GSGZHE26.js";
|
|
8
9
|
import {
|
|
9
10
|
brandedUid,
|
|
10
11
|
compareVersionsDesc,
|
|
11
12
|
docVersionSchema,
|
|
13
|
+
external_exports,
|
|
12
14
|
mintUid,
|
|
13
15
|
nanoidSchema
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import {
|
|
16
|
-
external_exports
|
|
17
|
-
} from "./chunk-H2WRMLYY.js";
|
|
16
|
+
} from "./chunk-IKT5F47M.js";
|
|
18
17
|
|
|
19
18
|
// ../../packages/entities/dist/rule/default-data.js
|
|
20
19
|
var scalarRuleset = `extends: spectral:oas
|
|
@@ -46,11 +45,7 @@ var ApiEmbedStatus;
|
|
|
46
45
|
ApiEmbedStatus2["Complete"] = "complete";
|
|
47
46
|
ApiEmbedStatus2["Failed"] = "failed";
|
|
48
47
|
})(ApiEmbedStatus || (ApiEmbedStatus = {}));
|
|
49
|
-
var managedDocTool =
|
|
50
|
-
path: external_exports.string(),
|
|
51
|
-
method: methodSchema,
|
|
52
|
-
enabledTools: external_exports.enum(["execute-request", "get-mini-openapi-spec"]).array()
|
|
53
|
-
});
|
|
48
|
+
var managedDocTool = docVersionToolSchema;
|
|
54
49
|
var managedDocVersionSchema = external_exports.object({
|
|
55
50
|
uid: nanoidSchema,
|
|
56
51
|
/** Millisecond base timestamp of versions */
|
|
@@ -58,28 +53,47 @@ var managedDocVersionSchema = external_exports.object({
|
|
|
58
53
|
version: docVersionSchema,
|
|
59
54
|
/** OpenAPI version normalized on upload */
|
|
60
55
|
upgraded: external_exports.boolean().default(false),
|
|
56
|
+
/** Endpoints (path + method pairs) counted at ingest; null when unknown */
|
|
57
|
+
endpointCount: external_exports.number().int().nullable().default(null),
|
|
61
58
|
/** Vector embeddings processed, agent is enabled */
|
|
62
59
|
embedStatus: external_exports.enum(ApiEmbedStatus).nullable().default(null),
|
|
63
60
|
tags: external_exports.string().array().default([]),
|
|
64
61
|
tools: managedDocTool.array().optional(),
|
|
65
|
-
/** SHA-256 hex digest of the YAML content
|
|
62
|
+
/** SHA-256 hex digest of the YAML content the version serves (from its chain head) */
|
|
66
63
|
yamlSha: external_exports.string().optional(),
|
|
67
|
-
/** SHA-256 hex digest of the JSON content
|
|
68
|
-
jsonSha: external_exports.string().optional()
|
|
69
|
-
/** Random opaque token regenerated whenever the version's content changes */
|
|
70
|
-
versionSha: external_exports.string().optional()
|
|
64
|
+
/** SHA-256 hex digest of the JSON content the version serves (from its chain head) */
|
|
65
|
+
jsonSha: external_exports.string().optional()
|
|
71
66
|
}).meta({ id: "managed-doc-version" });
|
|
67
|
+
var managedDocTypeSchema = external_exports.enum(["openapi", "asyncapi"]);
|
|
72
68
|
var managedDocSchema = baseRegistrySchema.extend({
|
|
73
69
|
/** Own uid, branded so it cannot be confused with another entity's uid */
|
|
74
70
|
uid: brandedUid().default(mintUid).meta({ default: "nanoid()" }),
|
|
75
71
|
/** The current version served to consumers by default */
|
|
76
72
|
version: docVersionSchema,
|
|
77
73
|
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
74
|
+
* Whether the document is an OpenAPI or AsyncAPI description, detected from
|
|
75
|
+
* the document content on upload. Defaults to 'openapi' so records created
|
|
76
|
+
* before this field existed parse as OpenAPI, matching the registry's
|
|
77
|
+
* original OpenAPI-only behavior.
|
|
78
|
+
*/
|
|
79
|
+
type: managedDocTypeSchema.default("openapi"),
|
|
80
|
+
/** Initial upload format, used as the editor default. Absent on older APIs. */
|
|
81
|
+
sourceFormat: external_exports.enum(["json", "yaml"]).optional(),
|
|
82
|
+
/**
|
|
83
|
+
* Denormalized highest-ranked version label, maintained at ingest so
|
|
84
|
+
* `latest` resolution and list views never re-sort the versions collection.
|
|
85
|
+
* Absent until the document goes through the instance-based ingest path.
|
|
86
|
+
*/
|
|
87
|
+
latestVersion: docVersionSchema.optional(),
|
|
88
|
+
/**
|
|
89
|
+
* @deprecated Never read anywhere — superseded by `source` on the base
|
|
90
|
+
* registry schema. Dropped at decommission.
|
|
80
91
|
*/
|
|
81
92
|
isExternal: external_exports.boolean().default(true),
|
|
82
|
-
/**
|
|
93
|
+
/**
|
|
94
|
+
* @deprecated Never read anywhere — superseded by `source` with
|
|
95
|
+
* `type: 'git'`. Dropped at decommission.
|
|
96
|
+
*/
|
|
83
97
|
repository: external_exports.object({
|
|
84
98
|
linkedBy: external_exports.string(),
|
|
85
99
|
id: external_exports.number(),
|
|
@@ -87,28 +101,19 @@ var managedDocSchema = baseRegistrySchema.extend({
|
|
|
87
101
|
path: external_exports.string().default(""),
|
|
88
102
|
branch: external_exports.string().default("")
|
|
89
103
|
}).optional(),
|
|
90
|
-
/**
|
|
104
|
+
/**
|
|
105
|
+
* @deprecated Never read anywhere — superseded by `source` with
|
|
106
|
+
* `type: 'url'`. Dropped at decommission.
|
|
107
|
+
*/
|
|
91
108
|
sourceUrl: external_exports.url().optional(),
|
|
92
109
|
/** Theme assigned to API, supports custom theme slugs */
|
|
93
110
|
theme: external_exports.string().default(""),
|
|
94
111
|
/**
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
* This content will be replaced on submitted updates and able to be edited in real-time
|
|
98
|
-
* When a user is ready to commit their changes they can bump the version with the changed content
|
|
112
|
+
* @deprecated The collaborative YJS doc it pointed at was never built —
|
|
113
|
+
* no consumer exists anywhere. Dropped at decommission.
|
|
99
114
|
*/
|
|
100
115
|
editableUid: external_exports.string(),
|
|
101
116
|
ruleset: external_exports.string().default(scalarRuleset),
|
|
102
|
-
/**
|
|
103
|
-
* An ordered version history record
|
|
104
|
-
*
|
|
105
|
-
* When a sync update is requested we find any versions with timestamps
|
|
106
|
-
* later than the local base and determine the mutation records
|
|
107
|
-
*
|
|
108
|
-
* Mutations records will then need to be diffed and conflicts handled locally
|
|
109
|
-
* before pushing to the database
|
|
110
|
-
*/
|
|
111
|
-
versions: managedDocVersionSchema.array(),
|
|
112
117
|
/** Enable Agent Scalar */
|
|
113
118
|
agentEnabled: external_exports.boolean().default(true),
|
|
114
119
|
/**
|
|
@@ -120,7 +125,16 @@ var managedDocSchema = baseRegistrySchema.extend({
|
|
|
120
125
|
verified: external_exports.boolean().default(false)
|
|
121
126
|
}).meta({ id: "managed-doc" });
|
|
122
127
|
|
|
128
|
+
// ../../packages/entities/dist/managed-doc/count-endpoints.js
|
|
129
|
+
var MAX_OPERATIONS_PER_PATH_ITEM = HTTP_METHODS.length;
|
|
130
|
+
|
|
123
131
|
// ../../packages/entities/dist/managed-doc/helpers.js
|
|
132
|
+
function detectManagedDocType(document) {
|
|
133
|
+
if (typeof document === "object" && document !== null && "asyncapi" in document) {
|
|
134
|
+
return "asyncapi";
|
|
135
|
+
}
|
|
136
|
+
return "openapi";
|
|
137
|
+
}
|
|
124
138
|
function getLegacyWysiwygVersion(versions) {
|
|
125
139
|
if (versions.includes("latest")) {
|
|
126
140
|
return "latest";
|
|
@@ -131,6 +145,7 @@ function getLegacyWysiwygVersion(versions) {
|
|
|
131
145
|
|
|
132
146
|
export {
|
|
133
147
|
ruleSchema,
|
|
148
|
+
detectManagedDocType,
|
|
134
149
|
getLegacyWysiwygVersion,
|
|
135
150
|
RegistryAsset,
|
|
136
151
|
managedDocVersionSchema,
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
config
|
|
4
|
+
} from "./chunk-4ZDQXWBT.js";
|
|
5
|
+
import {
|
|
6
|
+
RegistryAsset
|
|
7
|
+
} from "./chunk-CISTON3A.js";
|
|
8
|
+
|
|
9
|
+
// src/domains/registry/helpers/links.ts
|
|
10
|
+
function registryUrl(path) {
|
|
11
|
+
return `${config.projects.registry}/${path}`;
|
|
12
|
+
}
|
|
13
|
+
var DASHBOARD_ASSET_PATHS = {
|
|
14
|
+
[RegistryAsset.Apis]: (uid) => `apis/${uid}`,
|
|
15
|
+
[RegistryAsset.Schemas]: (uid) => `apis/schemas/${uid}`,
|
|
16
|
+
[RegistryAsset.Rules]: (uid) => `apis/rulesets/${uid}`
|
|
17
|
+
};
|
|
18
|
+
function dashboardUrl(asset, uid) {
|
|
19
|
+
return `${config.projects.dashboard}/${DASHBOARD_ASSET_PATHS[asset]?.(uid) ?? "apis"}`;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
registryUrl,
|
|
24
|
+
dashboardUrl
|
|
25
|
+
};
|
|
@@ -5,32 +5,35 @@ import {
|
|
|
5
5
|
loginPortalSchema,
|
|
6
6
|
managedSchema,
|
|
7
7
|
workspaceSchema
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HCPN3KNF.js";
|
|
9
9
|
import {
|
|
10
10
|
userSchema
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-B2MHTD3R.js";
|
|
12
12
|
import {
|
|
13
13
|
sdkSchema
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import {
|
|
16
|
-
managedDocSchema,
|
|
17
|
-
ruleSchema
|
|
18
|
-
} from "./chunk-4QS7SJTG.js";
|
|
14
|
+
} from "./chunk-3L6DLIXJ.js";
|
|
19
15
|
import {
|
|
20
16
|
teamSchema
|
|
21
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-VNYE4R7N.js";
|
|
22
18
|
import {
|
|
23
19
|
activeDeploymentSchema,
|
|
24
|
-
emailSchema,
|
|
25
|
-
entitySchema,
|
|
26
|
-
nanoidSchema,
|
|
27
20
|
publishRecordSchema,
|
|
28
21
|
themeSchema
|
|
29
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-OQKDBLOZ.js";
|
|
30
23
|
import {
|
|
24
|
+
managedDocSchema,
|
|
25
|
+
ruleSchema
|
|
26
|
+
} from "./chunk-CISTON3A.js";
|
|
27
|
+
import {
|
|
28
|
+
docVersionRecordSchema
|
|
29
|
+
} from "./chunk-Q7DOQHZN.js";
|
|
30
|
+
import {
|
|
31
|
+
emailSchema,
|
|
32
|
+
entitySchema,
|
|
31
33
|
external_exports,
|
|
34
|
+
nanoidSchema,
|
|
32
35
|
zod_default
|
|
33
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-IKT5F47M.js";
|
|
34
37
|
|
|
35
38
|
// ../../packages/entities/dist/admins/index.js
|
|
36
39
|
var scalarAdminSchema = entitySchema.extend({
|
|
@@ -62,20 +65,62 @@ var typesenseConfigSchema = external_exports.object({
|
|
|
62
65
|
var subpathSchema = external_exports.object({
|
|
63
66
|
subpath: external_exports.string(),
|
|
64
67
|
projectUid: external_exports.string(),
|
|
68
|
+
/**
|
|
69
|
+
* The project's own title, for labelling it in cross-project search.
|
|
70
|
+
* Written on publish, so it is absent until the project next publishes.
|
|
71
|
+
*/
|
|
72
|
+
name: external_exports.string().optional(),
|
|
73
|
+
/**
|
|
74
|
+
* The project's active publish, used to cache-bust its search index the
|
|
75
|
+
* way a project already busts its own. Absent until it next publishes.
|
|
76
|
+
*/
|
|
77
|
+
publishUid: external_exports.string().optional(),
|
|
65
78
|
/**
|
|
66
79
|
* Present only for sites still served by Typesense. Builds on the jsonl
|
|
67
80
|
* search backend omit it; federated search fetches `${subpath}/search-entries.jsonl`.
|
|
68
81
|
*/
|
|
69
82
|
typesenseConfig: typesenseConfigSchema.optional().nullable()
|
|
70
83
|
}).meta({ id: "subpath" });
|
|
84
|
+
var cloudflareHttpTokenSchema = external_exports.object({
|
|
85
|
+
/** URL path, e.g. `/.well-known/pki-validation/ca3-<id>.txt` */
|
|
86
|
+
path: external_exports.string(),
|
|
87
|
+
/** Plain-text response body the token path must answer with */
|
|
88
|
+
body: external_exports.string()
|
|
89
|
+
}).meta({ id: "cloudflare-http-token" });
|
|
90
|
+
var cloudflareHostnameStateSchema = external_exports.object({
|
|
91
|
+
/** Custom hostname id in the Cloudflare zone */
|
|
92
|
+
hostnameId: external_exports.string(),
|
|
93
|
+
/** Hostname ownership status reported by Cloudflare (pending, active, …) */
|
|
94
|
+
status: external_exports.string(),
|
|
95
|
+
/** Certificate status reported by Cloudflare (pending_validation, active, …) */
|
|
96
|
+
sslStatus: external_exports.string(),
|
|
97
|
+
httpTokens: cloudflareHttpTokenSchema.array().default([]),
|
|
98
|
+
/** Unix seconds of the reconciler run that last wrote this state */
|
|
99
|
+
syncedAt: external_exports.number()
|
|
100
|
+
}).meta({ id: "cloudflare-hostname-state" });
|
|
71
101
|
var siteDeploySchema = entitySchema.extend({
|
|
72
102
|
domain: external_exports.string(),
|
|
73
103
|
teamUid: nanoidSchema,
|
|
74
104
|
projectUid: nanoidSchema,
|
|
75
|
-
|
|
105
|
+
/**
|
|
106
|
+
* Title of the project mounted at the domain root.
|
|
107
|
+
*
|
|
108
|
+
* The root project is deliberately not one of `subpaths` — both request
|
|
109
|
+
* matchers resolve by longest path prefix, so a '/' entry would become a
|
|
110
|
+
* catch-all that every request matched. It is denormalized here instead so
|
|
111
|
+
* search can name and scope it without a second lookup.
|
|
112
|
+
*/
|
|
113
|
+
rootName: external_exports.string().optional(),
|
|
114
|
+
subpaths: subpathSchema.array().default([]),
|
|
115
|
+
cloudflare: cloudflareHostnameStateSchema.optional().nullable()
|
|
76
116
|
}).meta({ id: "site-deploy" });
|
|
117
|
+
var searchConfigRootSchema = external_exports.object({
|
|
118
|
+
projectUid: external_exports.string(),
|
|
119
|
+
name: external_exports.string().optional()
|
|
120
|
+
}).meta({ id: "search-config-root" });
|
|
77
121
|
var searchConfigResponseSchema = external_exports.object({
|
|
78
|
-
subpaths: subpathSchema.array()
|
|
122
|
+
subpaths: subpathSchema.array(),
|
|
123
|
+
root: searchConfigRootSchema.optional()
|
|
79
124
|
}).meta({ id: "search-config-response" });
|
|
80
125
|
|
|
81
126
|
// ../../packages/entities/dist/user/ban.js
|
|
@@ -110,9 +155,15 @@ var BaseCollections = {
|
|
|
110
155
|
Themes: (teamUid) => `team/${teamUid}/themes`,
|
|
111
156
|
PublishRecords: (teamUid) => `team/${teamUid}/publish`,
|
|
112
157
|
ManagedDocs: (teamUid) => `team/${teamUid}/managed-docs`,
|
|
158
|
+
ManagedDocInstances: (teamUid, docUid) => `team/${teamUid}/managed-docs/${docUid}/instances`,
|
|
159
|
+
ManagedDocVersions: (teamUid, docUid) => `team/${teamUid}/managed-docs/${docUid}/versions`,
|
|
113
160
|
ManagedSchemas: (teamUid) => `team/${teamUid}/managed-schemas`,
|
|
161
|
+
ManagedSchemaInstances: (teamUid, schemaUid) => `team/${teamUid}/managed-schemas/${schemaUid}/instances`,
|
|
162
|
+
ManagedSchemaVersions: (teamUid, schemaUid) => `team/${teamUid}/managed-schemas/${schemaUid}/versions`,
|
|
114
163
|
Rules: (teamUid) => `team/${teamUid}/rules`,
|
|
164
|
+
RuleInstances: (teamUid, ruleUid) => `team/${teamUid}/rules/${ruleUid}/instances`,
|
|
115
165
|
RegistryPublishes: (teamUid) => `team/${teamUid}/registry-publishes`,
|
|
166
|
+
LinkedRepositories: (teamUid) => `team/${teamUid}/repositories`,
|
|
116
167
|
RegistryGitMigrations: "registry-git-migrations",
|
|
117
168
|
AccessGroups: (teamUid) => `team/${teamUid}/access-groups`,
|
|
118
169
|
LoginPortals: (teamUid) => `team/${teamUid}/login-portals`,
|
|
@@ -122,6 +173,10 @@ var BaseCollections = {
|
|
|
122
173
|
PersonalTokens: (userUid) => `user/${userUid}/personal-tokens`,
|
|
123
174
|
IdentityProviders: (teamUid) => `team/${teamUid}/identity-providers`,
|
|
124
175
|
Workspaces: (teamUid) => `team/${teamUid}/workspaces`,
|
|
176
|
+
WebhookSubscriptions: (teamUid) => `team/${teamUid}/webhook-subscriptions`,
|
|
177
|
+
WebhookDeliveries: (teamUid) => `team/${teamUid}/webhook-deliveries`,
|
|
178
|
+
WebhookSecrets: (teamUid) => `team/${teamUid}/webhook-secrets`,
|
|
179
|
+
WebhookEventClaims: "webhook-event-claims",
|
|
125
180
|
OauthStates: "oauth-states",
|
|
126
181
|
Waitlist: "waitlist",
|
|
127
182
|
BannedUsers: "banned-users"
|
|
@@ -150,7 +205,7 @@ function generateRegistryPath(entity) {
|
|
|
150
205
|
function teamUidFromPath(path) {
|
|
151
206
|
return path.split("/").at(1) ?? "";
|
|
152
207
|
}
|
|
153
|
-
var edgeCacheDeploySchema = siteDeploySchema.extend(requiredUid);
|
|
208
|
+
var edgeCacheDeploySchema = siteDeploySchema.omit({ cloudflare: true }).extend(requiredUid);
|
|
154
209
|
var edgeCacheProjectSchema = external_exports.object({
|
|
155
210
|
...requiredUid,
|
|
156
211
|
loginPortalUid: external_exports.string().default(""),
|
|
@@ -179,10 +234,15 @@ var edgeCacheApiSchema = managedDocSchema.pick({
|
|
|
179
234
|
...registryRequiredFields,
|
|
180
235
|
theme: true,
|
|
181
236
|
version: true,
|
|
182
|
-
|
|
237
|
+
latestVersion: true,
|
|
183
238
|
agentEnabled: true
|
|
184
239
|
}).extend(entityExtension).transform(generateRegistryPath);
|
|
185
|
-
var edgeCacheSchemaSchema = managedSchema.pick({ ...registryRequiredFields, version: true
|
|
240
|
+
var edgeCacheSchemaSchema = managedSchema.pick({ ...registryRequiredFields, version: true }).extend(entityExtension).transform(generateRegistryPath);
|
|
241
|
+
var edgeCacheDocVersionSchema = docVersionRecordSchema.pick({
|
|
242
|
+
uid: true,
|
|
243
|
+
version: true,
|
|
244
|
+
upgraded: true
|
|
245
|
+
}).extend({ ...requiredUid, _path: external_exports.string() });
|
|
186
246
|
var edgeCacheRuleSchema = ruleSchema.pick(registryRequiredFields).extend(entityExtension).transform(generateRegistryPath);
|
|
187
247
|
var edgeCacheSdkSchema = sdkSchema.pick({ ...registryRequiredFields, versions: true, targets: true }).extend(entityExtension).transform(generateRegistryPath);
|
|
188
248
|
var edgeCacheWorkspaceSchema = workspaceSchema.pick({ ...registryRequiredFields, version: true, versions: true }).extend(entityExtension).transform(generateRegistryPath);
|
|
@@ -241,6 +301,7 @@ var edgeCacheCollections = {
|
|
|
241
301
|
tableName: PROJECT_TABLE,
|
|
242
302
|
mongoCollection: BaseCollections.Projects,
|
|
243
303
|
source: "project",
|
|
304
|
+
priority: 2,
|
|
244
305
|
projection: {
|
|
245
306
|
uid: 1,
|
|
246
307
|
loginPortalUid: 1,
|
|
@@ -258,6 +319,7 @@ var edgeCacheCollections = {
|
|
|
258
319
|
tableName: PROJECT_TABLE,
|
|
259
320
|
mongoCollection: BaseCollections.GithubProjects,
|
|
260
321
|
source: "github",
|
|
322
|
+
priority: 1,
|
|
261
323
|
projection: {
|
|
262
324
|
uid: 1,
|
|
263
325
|
loginPortalUid: 1,
|
|
@@ -275,6 +337,7 @@ var edgeCacheCollections = {
|
|
|
275
337
|
tableName: PROJECT_TABLE,
|
|
276
338
|
mongoCollection: BaseCollections.DocsProjects,
|
|
277
339
|
source: "docs",
|
|
340
|
+
priority: 3,
|
|
278
341
|
projection: {
|
|
279
342
|
uid: 1,
|
|
280
343
|
loginPortalUid: 1,
|
|
@@ -310,7 +373,7 @@ var edgeCacheCollections = {
|
|
|
310
373
|
_path: 1,
|
|
311
374
|
_registryPath: 1,
|
|
312
375
|
version: 1,
|
|
313
|
-
|
|
376
|
+
latestVersion: 1,
|
|
314
377
|
agentEnabled: 1
|
|
315
378
|
}
|
|
316
379
|
}),
|
|
@@ -328,11 +391,42 @@ var edgeCacheCollections = {
|
|
|
328
391
|
isPrivate: 1,
|
|
329
392
|
accessGroups: 1,
|
|
330
393
|
version: 1,
|
|
331
|
-
versions: 1,
|
|
332
394
|
_path: 1,
|
|
333
395
|
_registryPath: 1
|
|
334
396
|
}
|
|
335
397
|
}),
|
|
398
|
+
// The versions collections are pseudo-nested under each document, so their
|
|
399
|
+
// physical Mongo collection names carry two uid placeholders (see
|
|
400
|
+
// collectionNameFromPath in mongobase) — written as static patterns here
|
|
401
|
+
// because the config's function form substitutes only the first uid.
|
|
402
|
+
apiVersion: defineCollection({
|
|
403
|
+
schema: edgeCacheDocVersionSchema,
|
|
404
|
+
indexFields: ["_path", "version"],
|
|
405
|
+
tableName: "docVersion",
|
|
406
|
+
mongoCollection: "team/<uid-0>/managed-docs/<uid-1>/versions",
|
|
407
|
+
source: "api",
|
|
408
|
+
priority: 2,
|
|
409
|
+
projection: {
|
|
410
|
+
uid: 1,
|
|
411
|
+
version: 1,
|
|
412
|
+
upgraded: 1,
|
|
413
|
+
_path: 1
|
|
414
|
+
}
|
|
415
|
+
}),
|
|
416
|
+
schemaVersion: defineCollection({
|
|
417
|
+
schema: edgeCacheDocVersionSchema,
|
|
418
|
+
indexFields: ["_path", "version"],
|
|
419
|
+
tableName: "docVersion",
|
|
420
|
+
mongoCollection: "team/<uid-0>/managed-schemas/<uid-1>/versions",
|
|
421
|
+
source: "schema",
|
|
422
|
+
priority: 1,
|
|
423
|
+
projection: {
|
|
424
|
+
uid: 1,
|
|
425
|
+
version: 1,
|
|
426
|
+
upgraded: 1,
|
|
427
|
+
_path: 1
|
|
428
|
+
}
|
|
429
|
+
}),
|
|
336
430
|
rule: defineCollection({
|
|
337
431
|
schema: edgeCacheRuleSchema,
|
|
338
432
|
indexFields: ["_registryPath"],
|
|
@@ -449,6 +543,25 @@ for (const [key, config] of Object.entries(edgeCacheCollections)) {
|
|
|
449
543
|
}
|
|
450
544
|
sourcesByTable.set(`${config.tableName}:${config.source}`, key);
|
|
451
545
|
}
|
|
546
|
+
var prioritiesByTable = /* @__PURE__ */ new Map();
|
|
547
|
+
for (const [key, config] of Object.entries(edgeCacheCollections)) {
|
|
548
|
+
const shared = sharedTables.has(config.tableName);
|
|
549
|
+
if (shared && config.priority === void 0) {
|
|
550
|
+
throw new Error(`Edge-cache collection "${key}" shares table "${config.tableName}" but declares no priority.`);
|
|
551
|
+
}
|
|
552
|
+
if (!shared && config.priority !== void 0) {
|
|
553
|
+
throw new Error(`Edge-cache collection "${key}" declares a priority but does not share table "${config.tableName}".`);
|
|
554
|
+
}
|
|
555
|
+
if (config.priority === void 0)
|
|
556
|
+
continue;
|
|
557
|
+
const taken = prioritiesByTable.get(config.tableName) ?? /* @__PURE__ */ new Map();
|
|
558
|
+
const holder = taken.get(config.priority);
|
|
559
|
+
if (holder) {
|
|
560
|
+
throw new Error(`Edge-cache collections "${holder}" and "${key}" both use priority ${config.priority} on table "${config.tableName}".`);
|
|
561
|
+
}
|
|
562
|
+
taken.set(config.priority, key);
|
|
563
|
+
prioritiesByTable.set(config.tableName, taken);
|
|
564
|
+
}
|
|
452
565
|
|
|
453
566
|
export {
|
|
454
567
|
BaseCollections
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
docVersionSchema,
|
|
4
|
+
external_exports,
|
|
4
5
|
namespaceSchema,
|
|
5
6
|
nanoidSchema,
|
|
6
|
-
slugSchema
|
|
7
|
-
} from "./chunk-ISGLWBXZ.js";
|
|
8
|
-
import {
|
|
9
|
-
external_exports,
|
|
7
|
+
slugSchema,
|
|
10
8
|
zod_default
|
|
11
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-IKT5F47M.js";
|
|
12
10
|
|
|
13
11
|
// ../../packages/entities/dist/agent/embed.js
|
|
14
12
|
var embedStatuses = ["pending", "success", "failed"];
|
|
@@ -106,6 +104,9 @@ var mcpServerSchema = external_exports.object({
|
|
|
106
104
|
teamUid: external_exports.string(),
|
|
107
105
|
name: external_exports.string(),
|
|
108
106
|
slug: slugSchema,
|
|
107
|
+
// Missing key parses to false, so a dashboard bundle keeps parsing agent
|
|
108
|
+
// responses that predate this column, whichever side deploys first.
|
|
109
|
+
autoAddOperations: external_exports.boolean().default(false),
|
|
109
110
|
createdAt: external_exports.string(),
|
|
110
111
|
updatedAt: external_exports.string()
|
|
111
112
|
}).meta({ id: "mcp-server" });
|
|
@@ -138,6 +139,8 @@ var mcpServerOperationToolSchema = external_exports.object({
|
|
|
138
139
|
curatedToolEnabled: external_exports.boolean(),
|
|
139
140
|
name: external_exports.string().nullable(),
|
|
140
141
|
description: external_exports.string().nullable(),
|
|
142
|
+
deprecated: external_exports.boolean(),
|
|
143
|
+
deprecationMessage: external_exports.string().nullable(),
|
|
141
144
|
createdAt: external_exports.string(),
|
|
142
145
|
updatedAt: external_exports.string()
|
|
143
146
|
}).meta({
|
|
@@ -244,7 +247,9 @@ var mcpInstallationSchema = external_exports.object({
|
|
|
244
247
|
accessGroups: external_exports.array(external_exports.string()).default([]),
|
|
245
248
|
loginPortalUid: external_exports.string().nullable().default(null),
|
|
246
249
|
authConfig: mcpAuthConfigSchema.default({}),
|
|
247
|
-
mcpVersion: external_exports.string().nullable().default(null)
|
|
250
|
+
mcpVersion: external_exports.string().nullable().default(null),
|
|
251
|
+
piiRedactionEnabled: external_exports.boolean().default(false),
|
|
252
|
+
credentialRedactionEnabled: external_exports.boolean().default(false)
|
|
248
253
|
}).meta({ id: "mcp-installation" });
|
|
249
254
|
|
|
250
255
|
// ../../packages/entities/dist/agent/monthly-usage.js
|
|
@@ -268,25 +273,6 @@ var monthlyUsageSchema = zod_default.object({
|
|
|
268
273
|
microCredits: zod_default.coerce.number()
|
|
269
274
|
}).meta({ id: "monthly-usage" });
|
|
270
275
|
|
|
271
|
-
// ../../node_modules/.pnpm/@scalar+helpers@0.9.2/node_modules/@scalar/helpers/dist/http/http-methods.js
|
|
272
|
-
var HTTP_METHODS = ["delete", "get", "head", "options", "patch", "post", "put", "trace"];
|
|
273
|
-
var httpMethods = Object.freeze(new Set(HTTP_METHODS));
|
|
274
|
-
|
|
275
|
-
// ../../packages/entities/dist/agent/operation.js
|
|
276
|
-
var methodSchema = zod_default.enum(HTTP_METHODS).meta({ id: "method" });
|
|
277
|
-
var operationSchema = zod_default.object({
|
|
278
|
-
id: zod_default.uuid(),
|
|
279
|
-
path: zod_default.string(),
|
|
280
|
-
method: methodSchema,
|
|
281
|
-
versionId: zod_default.uuid(),
|
|
282
|
-
embedding: zod_default.number().array(),
|
|
283
|
-
searchToolEnabled: zod_default.boolean(),
|
|
284
|
-
executeRequestToolEnabled: zod_default.boolean(),
|
|
285
|
-
operationId: zod_default.string().nullable(),
|
|
286
|
-
summary: zod_default.string().nullable(),
|
|
287
|
-
description: zod_default.string().nullable()
|
|
288
|
-
}).meta({ id: "operation" });
|
|
289
|
-
|
|
290
276
|
// ../../packages/entities/dist/agent/document.js
|
|
291
277
|
var documentSchema = zod_default.object({
|
|
292
278
|
id: zod_default.uuid(),
|
|
@@ -312,6 +298,27 @@ var keyDocumentSchema = zod_default.object({
|
|
|
312
298
|
documentId: zod_default.uuid()
|
|
313
299
|
}).meta({ id: "key-documents" });
|
|
314
300
|
|
|
301
|
+
// ../../node_modules/.pnpm/@scalar+helpers@0.11.3/node_modules/@scalar/helpers/dist/http/http-methods.js
|
|
302
|
+
var HTTP_METHODS = ["delete", "get", "head", "options", "patch", "post", "put", "trace"];
|
|
303
|
+
var httpMethods = Object.freeze(new Set(HTTP_METHODS));
|
|
304
|
+
|
|
305
|
+
// ../../packages/entities/dist/agent/operation.js
|
|
306
|
+
var methodSchema = zod_default.enum(HTTP_METHODS).meta({ id: "method" });
|
|
307
|
+
var operationSchema = zod_default.object({
|
|
308
|
+
id: zod_default.uuid(),
|
|
309
|
+
path: zod_default.string(),
|
|
310
|
+
method: methodSchema,
|
|
311
|
+
versionId: zod_default.uuid(),
|
|
312
|
+
embedding: zod_default.number().array(),
|
|
313
|
+
searchToolEnabled: zod_default.boolean(),
|
|
314
|
+
executeRequestToolEnabled: zod_default.boolean(),
|
|
315
|
+
operationId: zod_default.string().nullable(),
|
|
316
|
+
summary: zod_default.string().nullable(),
|
|
317
|
+
description: zod_default.string().nullable()
|
|
318
|
+
}).meta({ id: "operation" });
|
|
319
|
+
var UNEXECUTABLE_HTTP_METHODS = ["connect", "trace", "track"];
|
|
320
|
+
var unexecutableLookup = new Set(UNEXECUTABLE_HTTP_METHODS);
|
|
321
|
+
|
|
315
322
|
// ../../packages/entities/dist/agent/version.js
|
|
316
323
|
var versionSchema = zod_default.object({
|
|
317
324
|
id: zod_default.uuid(),
|
|
@@ -340,5 +347,6 @@ export {
|
|
|
340
347
|
mcpAuthConfigSchema,
|
|
341
348
|
mcpInstallationSchema,
|
|
342
349
|
monthlyUsageSchema,
|
|
350
|
+
HTTP_METHODS,
|
|
343
351
|
methodSchema
|
|
344
352
|
};
|