@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
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
BaseCollections
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-F467BYYR.js";
|
|
5
5
|
import {
|
|
6
6
|
getDatabaseClient
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Z2KMGFE6.js";
|
|
8
8
|
import {
|
|
9
9
|
publishRecordSchema
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-OQKDBLOZ.js";
|
|
11
11
|
|
|
12
12
|
// src/domains/project/deployments/get-deployments.ts
|
|
13
13
|
function orderDeployments(records) {
|
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
methodSchema
|
|
4
|
+
} from "./chunk-GSGZHE26.js";
|
|
5
|
+
import {
|
|
6
|
+
brandedUid,
|
|
7
|
+
docVersionSchema,
|
|
8
|
+
entitySchema,
|
|
9
|
+
external_exports,
|
|
10
|
+
mintUid,
|
|
11
|
+
namespaceSchema,
|
|
12
|
+
nanoidSchema,
|
|
13
|
+
randomManagedDocSlug,
|
|
14
|
+
scalarSet,
|
|
15
|
+
slugSchema,
|
|
16
|
+
timestampSchema
|
|
17
|
+
} from "./chunk-IKT5F47M.js";
|
|
18
|
+
|
|
19
|
+
// ../../packages/entities/dist/registry/instance.js
|
|
20
|
+
var contentShaSchema = external_exports.string().regex(/^[a-f0-9]{64}$/, "Content sha must be a sha-256 hex digest");
|
|
21
|
+
var docInstanceSourceSchema = external_exports.enum(["manual", "cli", "api", "git-sync", "url-sync", "migration"]).meta({ id: "doc-instance-source" });
|
|
22
|
+
var docInstanceOriginSchema = external_exports.discriminatedUnion("type", [
|
|
23
|
+
external_exports.object({ type: external_exports.literal("platform") }),
|
|
24
|
+
external_exports.object({
|
|
25
|
+
type: external_exports.literal("git"),
|
|
26
|
+
/**
|
|
27
|
+
* Commit that carried this content. Null when the content landed but the
|
|
28
|
+
* commit did not — the mirror is best-effort and can be switched off.
|
|
29
|
+
*/
|
|
30
|
+
commitSha: external_exports.string().nullable().default(null),
|
|
31
|
+
/** Branch this content was committed on. Null for direct-to-published writes. */
|
|
32
|
+
branch: external_exports.string().nullable().default(null),
|
|
33
|
+
/**
|
|
34
|
+
* A platform edit to a git-sourced document that went out as a pull
|
|
35
|
+
* request. Open while `resolution` is null; the webhook stamps `merged`
|
|
36
|
+
* or `closed` when the pull request settles, so "does this document have
|
|
37
|
+
* an open proposal" is answerable from the log alone. The row itself is
|
|
38
|
+
* append-only history — a merged proposal's content re-enters the log as
|
|
39
|
+
* a fresh instance via the merge push.
|
|
40
|
+
*/
|
|
41
|
+
draft: external_exports.object({
|
|
42
|
+
prNumber: external_exports.number(),
|
|
43
|
+
branch: external_exports.string(),
|
|
44
|
+
/** How the pull request settled; null while it is still open. */
|
|
45
|
+
resolution: external_exports.enum(["merged", "closed"]).nullable().default(null)
|
|
46
|
+
}).nullable().default(null)
|
|
47
|
+
}),
|
|
48
|
+
external_exports.object({
|
|
49
|
+
type: external_exports.literal("url"),
|
|
50
|
+
/** Upstream this content was fetched from. */
|
|
51
|
+
url: external_exports.url()
|
|
52
|
+
})
|
|
53
|
+
]).meta({ id: "doc-instance-origin" });
|
|
54
|
+
var docInstanceSchema = entitySchema.extend({
|
|
55
|
+
/** Own uid, branded so it cannot be confused with another entity's uid */
|
|
56
|
+
uid: brandedUid().default(mintUid).meta({ default: "nanoid()" }),
|
|
57
|
+
/** Version label the content declared (info.version) or the caller supplied */
|
|
58
|
+
version: docVersionSchema,
|
|
59
|
+
/**
|
|
60
|
+
* SHA-256 hex digest of the serialized JSON — the single content identity.
|
|
61
|
+
* Blob keys for BOTH formats derive from it: `blobs/<jsonSha>.json` and
|
|
62
|
+
* `blobs/<jsonSha>.yaml`.
|
|
63
|
+
*/
|
|
64
|
+
jsonSha: contentShaSchema,
|
|
65
|
+
/**
|
|
66
|
+
* SHA-256 hex digest of the serialized YAML twin. Integrity metadata for
|
|
67
|
+
* verifying served YAML bytes — never a storage key.
|
|
68
|
+
*/
|
|
69
|
+
yamlSha: contentShaSchema,
|
|
70
|
+
/** User uid or email that produced this content. Null for system syncs. */
|
|
71
|
+
uploadedBy: external_exports.string().nullable().default(null),
|
|
72
|
+
/** The channel that triggered the write */
|
|
73
|
+
source: docInstanceSourceSchema,
|
|
74
|
+
/** Where the bytes came from; platform-native unless a git or url source supplied them */
|
|
75
|
+
origin: docInstanceOriginSchema.default({ type: "platform" }),
|
|
76
|
+
/** Free-form commit-style message supplied by the writer */
|
|
77
|
+
message: external_exports.string().default(""),
|
|
78
|
+
/**
|
|
79
|
+
* Lineage pointers recorded from day one so instances form a DAG. Branch
|
|
80
|
+
* and merge flows build on this; backfilling parents later would be far
|
|
81
|
+
* more expensive than stamping them now.
|
|
82
|
+
*/
|
|
83
|
+
parentInstanceUid: brandedUid().nullable().default(null),
|
|
84
|
+
/** Second parent for merge commits */
|
|
85
|
+
mergeParentUid: brandedUid().nullable().default(null),
|
|
86
|
+
/**
|
|
87
|
+
* The instance this one reverts to. Set only by rollback, which appends a
|
|
88
|
+
* new instance carrying the target's content hashes rather than mutating
|
|
89
|
+
* any pointer — so history renders "reverted to X" without diffing hashes,
|
|
90
|
+
* and the chain stays append-only.
|
|
91
|
+
*/
|
|
92
|
+
revertOf: brandedUid().nullable().default(null),
|
|
93
|
+
/**
|
|
94
|
+
* Denormalized serving eligibility, stamped false only on draft instances.
|
|
95
|
+
* Exists solely for the chain's unique-parent index: Mongo partial indexes
|
|
96
|
+
* cannot express "origin.draft is null or missing", so eligibility needs a
|
|
97
|
+
* stored equality field. {@link isServingEligibleInstance} (origin-derived)
|
|
98
|
+
* stays the read-side authority; this field is never read by resolvers.
|
|
99
|
+
*/
|
|
100
|
+
servable: external_exports.boolean().default(true)
|
|
101
|
+
}).meta({ id: "doc-instance" });
|
|
102
|
+
|
|
103
|
+
// ../../packages/entities/dist/registry/schema.js
|
|
104
|
+
var RegistryAsset;
|
|
105
|
+
(function(RegistryAsset2) {
|
|
106
|
+
RegistryAsset2["Apis"] = "apis";
|
|
107
|
+
RegistryAsset2["Rules"] = "rules";
|
|
108
|
+
RegistryAsset2["Schemas"] = "schemas";
|
|
109
|
+
RegistryAsset2["Sdks"] = "sdks";
|
|
110
|
+
RegistryAsset2["Workspaces"] = "workspaces";
|
|
111
|
+
})(RegistryAsset || (RegistryAsset = {}));
|
|
112
|
+
var RegistryResourceTypes = [
|
|
113
|
+
RegistryAsset.Apis,
|
|
114
|
+
RegistryAsset.Schemas,
|
|
115
|
+
RegistryAsset.Rules,
|
|
116
|
+
RegistryAsset.Sdks,
|
|
117
|
+
RegistryAsset.Workspaces
|
|
118
|
+
];
|
|
119
|
+
var registryAssetSchema = external_exports.enum(RegistryAsset).meta({ id: "registry-asset" });
|
|
120
|
+
var registryGitExternalSchema = external_exports.discriminatedUnion("provider", [
|
|
121
|
+
external_exports.object({
|
|
122
|
+
provider: external_exports.literal("github"),
|
|
123
|
+
linkedBy: external_exports.string(),
|
|
124
|
+
installationId: external_exports.number().int(),
|
|
125
|
+
id: external_exports.number().int(),
|
|
126
|
+
name: external_exports.string().min(2),
|
|
127
|
+
branch: external_exports.string().default("main"),
|
|
128
|
+
/** Where the canonical file lives inside the linked repo. */
|
|
129
|
+
path: external_exports.string().default(""),
|
|
130
|
+
webhookId: external_exports.string().default("")
|
|
131
|
+
}),
|
|
132
|
+
external_exports.object({
|
|
133
|
+
provider: external_exports.literal("bitbucket"),
|
|
134
|
+
linkedBy: external_exports.string(),
|
|
135
|
+
workspaceUuid: external_exports.string(),
|
|
136
|
+
workspaceSlug: external_exports.string(),
|
|
137
|
+
repoUuid: external_exports.string(),
|
|
138
|
+
repoSlug: external_exports.string(),
|
|
139
|
+
name: external_exports.string().min(2),
|
|
140
|
+
branch: external_exports.string().default("main"),
|
|
141
|
+
webhookUuid: external_exports.string().default("")
|
|
142
|
+
})
|
|
143
|
+
]).meta({ id: "registry-git-external" });
|
|
144
|
+
var registryGitBindingSchema = external_exports.object({
|
|
145
|
+
forgejo: external_exports.object({
|
|
146
|
+
owner: external_exports.string(),
|
|
147
|
+
repo: external_exports.string(),
|
|
148
|
+
branch: external_exports.string().default("main")
|
|
149
|
+
}),
|
|
150
|
+
/** Publish when a commit lands on the tracked branch. */
|
|
151
|
+
publishOnPush: external_exports.boolean().default(true),
|
|
152
|
+
/** Publish when a pull request is merged. */
|
|
153
|
+
publishOnMerge: external_exports.boolean().default(false),
|
|
154
|
+
trackedBranch: external_exports.string().default("main"),
|
|
155
|
+
/** Forgejo webhook id, so it can be updated or removed. */
|
|
156
|
+
webhookId: external_exports.number().nullable().default(null),
|
|
157
|
+
external: registryGitExternalSchema.nullable().default(null),
|
|
158
|
+
/** The commit currently served as the published state. */
|
|
159
|
+
currentPublishedSha: external_exports.string().nullable().default(null),
|
|
160
|
+
lastPublishedAt: timestampSchema.nullable().default(null)
|
|
161
|
+
}).meta({ id: "registry-git-binding" });
|
|
162
|
+
var docSourceSchema = external_exports.discriminatedUnion("type", [
|
|
163
|
+
external_exports.object({ type: external_exports.literal("platform") }),
|
|
164
|
+
external_exports.object({
|
|
165
|
+
type: external_exports.literal("git"),
|
|
166
|
+
/** The team's linked repository this document sources from. */
|
|
167
|
+
repositoryUid: nanoidSchema.brand(),
|
|
168
|
+
/** Where the canonical file lives inside the repository. */
|
|
169
|
+
path: external_exports.string().min(1),
|
|
170
|
+
/**
|
|
171
|
+
* The branch publishes track and pull requests target. Null follows the
|
|
172
|
+
* repository's default branch.
|
|
173
|
+
*/
|
|
174
|
+
branch: external_exports.string().nullable().default(null),
|
|
175
|
+
/** Publish when a commit lands on the tracked branch. */
|
|
176
|
+
publishOnPush: external_exports.boolean().default(true),
|
|
177
|
+
/** Publish when a pull request merges into the tracked branch. */
|
|
178
|
+
publishOnMerge: external_exports.boolean().default(false),
|
|
179
|
+
/**
|
|
180
|
+
* The commit currently served as the published state. Advanced by
|
|
181
|
+
* compare-and-swap so redelivered webhooks and racing publishes cannot
|
|
182
|
+
* interleave the publish log and the pointer.
|
|
183
|
+
*/
|
|
184
|
+
currentPublishedSha: external_exports.string().nullable().default(null),
|
|
185
|
+
lastPublishedAt: timestampSchema.nullable().default(null)
|
|
186
|
+
}),
|
|
187
|
+
external_exports.object({
|
|
188
|
+
type: external_exports.literal("url"),
|
|
189
|
+
url: external_exports.url(),
|
|
190
|
+
linkedBy: external_exports.string(),
|
|
191
|
+
/** ETag from the last fetch so refreshes can use If-None-Match */
|
|
192
|
+
etag: external_exports.string().nullable().default(null),
|
|
193
|
+
lastFetchedAt: timestampSchema.nullable().default(null)
|
|
194
|
+
})
|
|
195
|
+
]).meta({ id: "doc-source" });
|
|
196
|
+
var baseRegistrySchema = entitySchema.extend({
|
|
197
|
+
/** Team namespace - not linked by UID */
|
|
198
|
+
namespace: namespaceSchema,
|
|
199
|
+
/** UI label for registry item */
|
|
200
|
+
title: external_exports.string().max(100).default(""),
|
|
201
|
+
/** Unique configuration identifier */
|
|
202
|
+
slug: slugSchema.default(randomManagedDocSlug).meta({ default: "randomManagedDocSlug()" }),
|
|
203
|
+
/** Extended description for registry item */
|
|
204
|
+
description: external_exports.string().default(""),
|
|
205
|
+
/** Public accessibility */
|
|
206
|
+
isPrivate: external_exports.boolean().default(false),
|
|
207
|
+
/**
|
|
208
|
+
* Surfaced ahead of the rest of the list on the namespace's registry page.
|
|
209
|
+
* A record only ever belongs to one namespace, so this needs no target.
|
|
210
|
+
*/
|
|
211
|
+
pinned: external_exports.boolean().default(false),
|
|
212
|
+
/** Grouping/identifier tags */
|
|
213
|
+
tags: scalarSet(external_exports.set(external_exports.string()).max(100)).default([]),
|
|
214
|
+
/** Access groups for private access permissions */
|
|
215
|
+
accessGroups: scalarSet(external_exports.set(nanoidSchema).max(50)).default([]),
|
|
216
|
+
/** The uid of the login portal customization object for private documents */
|
|
217
|
+
loginPortalUid: external_exports.string().optional(),
|
|
218
|
+
/** Whether the content has been scanned and confirmed to not to contain malicious content */
|
|
219
|
+
verifiedContent: external_exports.boolean().optional(),
|
|
220
|
+
/**
|
|
221
|
+
* Where this document's content is authored. Records written before this
|
|
222
|
+
* field existed omit it and read back as platform-native.
|
|
223
|
+
*
|
|
224
|
+
* Kept a plain `.default()` rather than a `.nullish().transform()` that
|
|
225
|
+
* would also absorb a stored `null`: the API framework drops piped fields
|
|
226
|
+
* from generated response types, so a transform here erases `source` from
|
|
227
|
+
* every registry response. Nothing writes `null`, so write it as `undefined`
|
|
228
|
+
* (omit the field) rather than reintroducing the pipe.
|
|
229
|
+
*/
|
|
230
|
+
source: docSourceSchema.default({ type: "platform" }),
|
|
231
|
+
/**
|
|
232
|
+
* @deprecated Forgejo registry backing is being retired in favor of
|
|
233
|
+
* content-addressed GCS blobs + the instance log. Use `source` for the
|
|
234
|
+
* external-repo link. Dropped once the backfill is verified.
|
|
235
|
+
*/
|
|
236
|
+
git: registryGitBindingSchema.nullable().optional()
|
|
237
|
+
}).meta({ id: "base-registry" });
|
|
238
|
+
|
|
239
|
+
// ../../packages/entities/dist/registry/migration.js
|
|
240
|
+
var registryGitMigrationResourceSchema = external_exports.object({
|
|
241
|
+
asset: registryAssetSchema,
|
|
242
|
+
namespace: namespaceSchema,
|
|
243
|
+
slug: slugSchema,
|
|
244
|
+
resourceUid: nanoidSchema,
|
|
245
|
+
status: external_exports.enum([
|
|
246
|
+
"migrated",
|
|
247
|
+
"already-migrated",
|
|
248
|
+
"partial",
|
|
249
|
+
"would-migrate",
|
|
250
|
+
"error"
|
|
251
|
+
]),
|
|
252
|
+
versionsImported: external_exports.number().default(0),
|
|
253
|
+
versionsSkipped: external_exports.number().default(0),
|
|
254
|
+
error: external_exports.string().default("")
|
|
255
|
+
});
|
|
256
|
+
var registryGitMigrationStatusSchema = external_exports.enum([
|
|
257
|
+
"running",
|
|
258
|
+
"complete",
|
|
259
|
+
"partial",
|
|
260
|
+
"failed"
|
|
261
|
+
]);
|
|
262
|
+
var registryGitMigrationSchema = entitySchema.extend({
|
|
263
|
+
teamUid: brandedUid(),
|
|
264
|
+
dryRun: external_exports.boolean().default(false),
|
|
265
|
+
status: registryGitMigrationStatusSchema,
|
|
266
|
+
/**
|
|
267
|
+
* While `running`, the unix time after which the lease is considered
|
|
268
|
+
* abandoned and another run may take over. Renewed as the run progresses, so
|
|
269
|
+
* it only lapses when the run really stopped (a crash, a killed pod) rather
|
|
270
|
+
* than because the work took a while. Zero once the run has finished.
|
|
271
|
+
*/
|
|
272
|
+
lockedUntil: external_exports.number().default(0),
|
|
273
|
+
resources: registryGitMigrationResourceSchema.array().default([])
|
|
274
|
+
}).meta({ id: "registry-git-migration" });
|
|
275
|
+
|
|
276
|
+
// ../../packages/entities/dist/registry/publish.js
|
|
277
|
+
var registryPublishSourceSchema = external_exports.enum(["manual", "git-hook", "external-push", "migration"]).meta({ id: "registry-publish-source" });
|
|
278
|
+
var registryPublishAuthorSchema = external_exports.object({
|
|
279
|
+
name: external_exports.string(),
|
|
280
|
+
email: external_exports.string()
|
|
281
|
+
});
|
|
282
|
+
var registryPublishRecordSchema = entitySchema.extend({
|
|
283
|
+
resourceUid: nanoidSchema,
|
|
284
|
+
asset: registryAssetSchema,
|
|
285
|
+
namespace: namespaceSchema,
|
|
286
|
+
slug: slugSchema,
|
|
287
|
+
/** Null for unversioned resources (rules). */
|
|
288
|
+
version: docVersionSchema.nullable().default(null),
|
|
289
|
+
commitSha: external_exports.string(),
|
|
290
|
+
parentSha: external_exports.string().nullable().default(null),
|
|
291
|
+
source: registryPublishSourceSchema,
|
|
292
|
+
message: external_exports.string().default(""),
|
|
293
|
+
author: registryPublishAuthorSchema.nullable().default(null)
|
|
294
|
+
}).meta({ id: "registry-publish" });
|
|
295
|
+
|
|
296
|
+
// ../../packages/entities/dist/registry/version.js
|
|
297
|
+
var docVersionToolSchema = external_exports.object({
|
|
298
|
+
path: external_exports.string(),
|
|
299
|
+
method: methodSchema,
|
|
300
|
+
enabledTools: external_exports.enum(["execute-request", "get-mini-openapi-spec"]).array()
|
|
301
|
+
});
|
|
302
|
+
var docEmbedStatusSchema = external_exports.enum(["complete", "failed"]);
|
|
303
|
+
var docVersionRecordSchema = entitySchema.extend({
|
|
304
|
+
/** Own uid, branded so it cannot be confused with another entity's uid */
|
|
305
|
+
uid: brandedUid().default(mintUid).meta({ default: "nanoid()" }),
|
|
306
|
+
version: docVersionSchema,
|
|
307
|
+
/** OpenAPI version normalized on upload */
|
|
308
|
+
upgraded: external_exports.boolean().default(false),
|
|
309
|
+
/**
|
|
310
|
+
* Endpoints (path + method pairs) counted from the document at ingest.
|
|
311
|
+
* Null when the count is unknown: rows minted before this field existed,
|
|
312
|
+
* heal-path rows created without a fresh parse, and non-OpenAPI documents.
|
|
313
|
+
* Feeds the included-SDK-size display; measure-and-warn only.
|
|
314
|
+
*/
|
|
315
|
+
endpointCount: external_exports.number().int().nullable().default(null),
|
|
316
|
+
embedStatus: docEmbedStatusSchema.nullable().default(null),
|
|
317
|
+
tags: external_exports.string().array().default([]),
|
|
318
|
+
/**
|
|
319
|
+
* Null is a legitimate stored state, not just absence: zod keeps optional
|
|
320
|
+
* keys explicitly passed as `undefined`, and a driver without
|
|
321
|
+
* `ignoreUndefined` stores those as BSON null. Records written that way
|
|
322
|
+
* carry `tools: null`, and rejecting it silently drops the whole record
|
|
323
|
+
* from egress — so null parses like "no tools configured".
|
|
324
|
+
*/
|
|
325
|
+
tools: docVersionToolSchema.array().nullish()
|
|
326
|
+
}).meta({ id: "doc-version-record" });
|
|
327
|
+
|
|
328
|
+
// ../../packages/entities/dist/registry/pages.js
|
|
329
|
+
var PAGES_SCHEMA_VERSION = 1;
|
|
330
|
+
var pagesNavigationEntrySchema = external_exports.looseObject({
|
|
331
|
+
id: external_exports.string(),
|
|
332
|
+
title: external_exports.string().default(""),
|
|
333
|
+
type: external_exports.string(),
|
|
334
|
+
get children() {
|
|
335
|
+
return external_exports.array(pagesNavigationEntrySchema).optional();
|
|
336
|
+
}
|
|
337
|
+
});
|
|
338
|
+
var pagesEntrySchema = external_exports.object({
|
|
339
|
+
/** The navigation entry's `type`, e.g. `operation`, `webhook`, `model`. */
|
|
340
|
+
type: external_exports.string(),
|
|
341
|
+
method: external_exports.string().optional(),
|
|
342
|
+
path: external_exports.string().optional(),
|
|
343
|
+
/** JSON pointer the entry renders, for the entry types that carry one. */
|
|
344
|
+
ref: external_exports.string().optional()
|
|
345
|
+
}).meta({ id: "pages-entry" });
|
|
346
|
+
var pagesCountsSchema = external_exports.object({
|
|
347
|
+
operations: external_exports.number().int().min(0).default(0),
|
|
348
|
+
webhooks: external_exports.number().int().min(0).default(0),
|
|
349
|
+
models: external_exports.number().int().min(0).default(0),
|
|
350
|
+
tags: external_exports.number().int().min(0).default(0),
|
|
351
|
+
/** Objects written under `chunks/`, which is every entry with a page. */
|
|
352
|
+
chunks: external_exports.number().int().min(0).default(0)
|
|
353
|
+
}).meta({ id: "pages-counts" });
|
|
354
|
+
var pagesManifestSchema = external_exports.object({
|
|
355
|
+
schemaVersion: external_exports.literal(PAGES_SCHEMA_VERSION),
|
|
356
|
+
/** Content identity of the instance this sidecar was derived from. */
|
|
357
|
+
jsonSha: contentShaSchema,
|
|
358
|
+
producedAt: timestampSchema,
|
|
359
|
+
counts: pagesCountsSchema,
|
|
360
|
+
/**
|
|
361
|
+
* The document with its operation-bearing buckets emptied — the base every
|
|
362
|
+
* page starts from, before its own chunk is merged in.
|
|
363
|
+
*/
|
|
364
|
+
stripped: external_exports.record(external_exports.string(), external_exports.unknown()),
|
|
365
|
+
/**
|
|
366
|
+
* The navigation tree, with the Models group's children dropped: a large
|
|
367
|
+
* document has thousands of them, and they are served separately by
|
|
368
|
+
* `pagesModels` on first expand.
|
|
369
|
+
*/
|
|
370
|
+
navigation: external_exports.array(pagesNavigationEntrySchema),
|
|
371
|
+
/** Navigation id to what it renders, for routing without walking the tree. */
|
|
372
|
+
entries: external_exports.record(external_exports.string(), pagesEntrySchema)
|
|
373
|
+
}).meta({ id: "pages-manifest" });
|
|
374
|
+
var pagesPreparingSchema = external_exports.object({
|
|
375
|
+
jsonSha: contentShaSchema,
|
|
376
|
+
claimedAt: timestampSchema,
|
|
377
|
+
/** Which producer holds the claim, so a stale takeover is attributable. */
|
|
378
|
+
instance: external_exports.string().default("")
|
|
379
|
+
}).meta({ id: "pages-preparing" });
|
|
380
|
+
var pagesFailedSchema = external_exports.object({
|
|
381
|
+
jsonSha: contentShaSchema,
|
|
382
|
+
failedAt: timestampSchema,
|
|
383
|
+
/** Operator-facing reason; surfaced to the client only as a failure. */
|
|
384
|
+
error: external_exports.string().default("")
|
|
385
|
+
}).meta({ id: "pages-failed" });
|
|
386
|
+
|
|
387
|
+
// ../../packages/entities/dist/registry/token.js
|
|
388
|
+
var registryTokenPayloadSchema = external_exports.object({
|
|
389
|
+
/** The team whose registry documents this token may read. */
|
|
390
|
+
teamUid: nanoidSchema,
|
|
391
|
+
exp: external_exports.number().int()
|
|
392
|
+
}).meta({ id: "registry-token-payload" });
|
|
393
|
+
|
|
394
|
+
export {
|
|
395
|
+
contentShaSchema,
|
|
396
|
+
docInstanceSchema,
|
|
397
|
+
RegistryResourceTypes,
|
|
398
|
+
registryGitBindingSchema,
|
|
399
|
+
docSourceSchema,
|
|
400
|
+
baseRegistrySchema,
|
|
401
|
+
registryPublishRecordSchema,
|
|
402
|
+
docVersionToolSchema,
|
|
403
|
+
docVersionRecordSchema
|
|
404
|
+
};
|
|
@@ -72,10 +72,28 @@ var levelPrefixes = {
|
|
|
72
72
|
warn: "[WARN]",
|
|
73
73
|
error: "[ERROR]"
|
|
74
74
|
};
|
|
75
|
+
var stdoutManager;
|
|
76
|
+
var stderrManager;
|
|
77
|
+
function getManager(level) {
|
|
78
|
+
if (level === "error") {
|
|
79
|
+
if (!stderrManager) {
|
|
80
|
+
stderrManager = new UpdateManager(process.stderr, process.stderr);
|
|
81
|
+
}
|
|
82
|
+
return stderrManager;
|
|
83
|
+
}
|
|
84
|
+
if (!stdoutManager) {
|
|
85
|
+
stdoutManager = new UpdateManager(
|
|
86
|
+
process.stdout,
|
|
87
|
+
process.stdout
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
return stdoutManager;
|
|
91
|
+
}
|
|
75
92
|
var outputFactory = (level) => (options) => {
|
|
76
93
|
const titlePrefix = levelPrefixes[level];
|
|
77
94
|
const cl = levelColors[level];
|
|
78
|
-
const manager =
|
|
95
|
+
const manager = getManager(level);
|
|
96
|
+
const stream = level === "error" ? process.stderr : process.stdout;
|
|
79
97
|
const state = [];
|
|
80
98
|
let i = 0;
|
|
81
99
|
const frames = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
|
|
@@ -87,7 +105,10 @@ var outputFactory = (level) => (options) => {
|
|
|
87
105
|
return cl(as.bold(`${titlePrefix} ${it.content}`));
|
|
88
106
|
}
|
|
89
107
|
if (it.type === "loader") {
|
|
90
|
-
|
|
108
|
+
if (!complete) {
|
|
109
|
+
return cl(`${frames[i % frames.length]} ${it.content}`);
|
|
110
|
+
}
|
|
111
|
+
return it.status === "error" ? as.red(`\u2716 ${it.content}`) : cl(`\u2714 ${it.content}`);
|
|
91
112
|
}
|
|
92
113
|
if (it.type === "table") {
|
|
93
114
|
return it.content.map((it2) => cl(it2.join(""))).join("\n");
|
|
@@ -102,7 +123,7 @@ var outputFactory = (level) => (options) => {
|
|
|
102
123
|
}, options?.frameRate ?? 100);
|
|
103
124
|
function end() {
|
|
104
125
|
update(true);
|
|
105
|
-
|
|
126
|
+
stream.write("");
|
|
106
127
|
manager.unhook();
|
|
107
128
|
clearInterval(interval);
|
|
108
129
|
return { state };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
registryUrl
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-COBPBRQF.js";
|
|
5
5
|
|
|
6
6
|
// src/domains/registry/helpers/fetch.ts
|
|
7
7
|
async function fetchFromRegistry(path, accessToken) {
|