@tappify/extension-sdk 2.1.0-beta.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -54
- package/dist/{chunk-6HETNZJY.cjs → chunk-2DBSVKAU.cjs} +1 -1
- package/dist/{chunk-6HETNZJY.cjs.map → chunk-2DBSVKAU.cjs.map} +1 -1
- package/dist/{chunk-O357OJXL.cjs → chunk-3YWVYA42.cjs} +18 -14
- package/dist/chunk-3YWVYA42.cjs.map +1 -0
- package/dist/{chunk-GAUZYBXE.cjs → chunk-5AAPD5WV.cjs} +11 -11
- package/dist/chunk-5AAPD5WV.cjs.map +1 -0
- package/dist/{chunk-SGEYDV3K.mjs → chunk-BDCX6LRQ.mjs} +3 -3
- package/dist/chunk-BDCX6LRQ.mjs.map +1 -0
- package/dist/{chunk-KZ5NGFUP.mjs → chunk-C3YNVHBP.mjs} +7 -20
- package/dist/chunk-C3YNVHBP.mjs.map +1 -0
- package/dist/{chunk-QXD7WVKK.mjs → chunk-CSTYBKZC.mjs} +1 -1
- package/dist/chunk-CSTYBKZC.mjs.map +1 -0
- package/dist/{chunk-SWG7CNTZ.mjs → chunk-CTSZ5D7S.mjs} +5 -9
- package/dist/chunk-CTSZ5D7S.mjs.map +1 -0
- package/dist/chunk-EW54H7CR.cjs +722 -0
- package/dist/chunk-EW54H7CR.cjs.map +1 -0
- package/dist/chunk-EX3NFXDK.mjs +722 -0
- package/dist/chunk-EX3NFXDK.mjs.map +1 -0
- package/dist/{chunk-A74HCO6T.cjs → chunk-G7XZSN2Q.cjs} +18 -31
- package/dist/chunk-G7XZSN2Q.cjs.map +1 -0
- package/dist/{chunk-RBIQT75L.mjs → chunk-GG3IX52W.mjs} +2 -2
- package/dist/{chunk-SLGOHIBL.mjs → chunk-IGK2AP6J.mjs} +17 -13
- package/dist/chunk-IGK2AP6J.mjs.map +1 -0
- package/dist/{chunk-VV7ELNRW.cjs → chunk-JMUK3K47.cjs} +3 -3
- package/dist/{chunk-VV7ELNRW.cjs.map → chunk-JMUK3K47.cjs.map} +1 -1
- package/dist/{chunk-SGCYEEXD.mjs → chunk-MNDVYPEP.mjs} +2 -9
- package/dist/chunk-MNDVYPEP.mjs.map +1 -0
- package/dist/{chunk-BPCGXXMD.cjs → chunk-NFUPPCX4.cjs} +18 -22
- package/dist/chunk-NFUPPCX4.cjs.map +1 -0
- package/dist/{chunk-PRCZMOLD.cjs → chunk-OPPYEA7F.cjs} +3 -3
- package/dist/{chunk-PRCZMOLD.cjs.map → chunk-OPPYEA7F.cjs.map} +1 -1
- package/dist/{chunk-7YKH4LZN.cjs → chunk-PYJMJF44.cjs} +2 -9
- package/dist/chunk-PYJMJF44.cjs.map +1 -0
- package/dist/{chunk-QA5AL3VZ.mjs → chunk-QHM7XNRK.mjs} +2 -2
- package/dist/{chunk-QA5AL3VZ.mjs.map → chunk-QHM7XNRK.mjs.map} +1 -1
- package/dist/codegen.cjs.map +1 -1
- package/dist/codegen.d.cts +7 -40
- package/dist/codegen.d.ts +7 -40
- package/dist/codegen.mjs.map +1 -1
- package/dist/{constants-BAimnqOK.d.cts → constants-DJ_KgZpN.d.cts} +8 -41
- package/dist/{constants-BAimnqOK.d.ts → constants-DJ_KgZpN.d.ts} +8 -41
- package/dist/{context-Cr93B05o.d.ts → context-Dt6xh_5t.d.cts} +4 -5
- package/dist/{context-DJ3REtdT.d.cts → context-Ml7k_V14.d.ts} +4 -5
- package/dist/{errors-Cqh0wrqt.d.ts → errors-COsBh7kd.d.cts} +2 -3
- package/dist/{errors-Cqh0wrqt.d.cts → errors-COsBh7kd.d.ts} +2 -3
- package/dist/handler-CZIlZ5vu.d.ts +227 -0
- package/dist/handler-kU9Jf36K.d.cts +227 -0
- package/dist/host.cjs +4 -4
- package/dist/host.d.cts +4 -4
- package/dist/host.d.ts +4 -4
- package/dist/host.mjs +3 -3
- package/dist/index.cjs +34 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +627 -69
- package/dist/index.d.ts +627 -69
- package/dist/index.mjs +33 -4
- package/dist/manifest.cjs +23 -132
- package/dist/manifest.cjs.map +1 -1
- package/dist/manifest.d.cts +12 -93
- package/dist/manifest.d.ts +12 -93
- package/dist/manifest.mjs +9 -118
- package/dist/manifest.mjs.map +1 -1
- package/dist/server.cjs +66 -14
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +6 -6
- package/dist/server.d.ts +6 -6
- package/dist/server.mjs +61 -9
- package/dist/server.mjs.map +1 -1
- package/dist/styles.css +367 -0
- package/dist/testing/index.cjs +13 -72
- package/dist/testing/index.cjs.map +1 -1
- package/dist/testing/index.d.cts +10 -29
- package/dist/testing/index.d.ts +10 -29
- package/dist/testing/index.mjs +13 -72
- package/dist/testing/index.mjs.map +1 -1
- package/dist/testing/jest.cjs +5 -5
- package/dist/testing/jest.mjs +2 -2
- package/dist/testing/vitest.cjs +5 -5
- package/dist/testing/vitest.cjs.map +1 -1
- package/dist/testing/vitest.d.cts +0 -10
- package/dist/testing/vitest.d.ts +0 -10
- package/dist/testing/vitest.mjs +2 -2
- package/dist/testing/vitest.mjs.map +1 -1
- package/dist/{types-BYGcp5pZ.d.ts → types-DDAGLpov.d.ts} +3 -4
- package/dist/{types-I1JOZyI_.d.cts → types-DrpQSv_2.d.cts} +3 -4
- package/dist/vite-preview.cjs +125 -294
- package/dist/vite-preview.cjs.map +1 -1
- package/dist/vite-preview.d.cts +24 -6
- package/dist/vite-preview.d.ts +24 -6
- package/dist/vite-preview.mjs +118 -287
- package/dist/vite-preview.mjs.map +1 -1
- package/dist/vite.cjs +23 -133
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.d.cts +7 -40
- package/dist/vite.d.ts +7 -40
- package/dist/vite.mjs +17 -127
- package/dist/vite.mjs.map +1 -1
- package/package.json +2 -12
- package/schema/extension-v2.json +121 -432
- package/dist/chunk-2CY5HVY7.mjs +0 -59
- package/dist/chunk-2CY5HVY7.mjs.map +0 -1
- package/dist/chunk-7YKH4LZN.cjs.map +0 -1
- package/dist/chunk-A74HCO6T.cjs.map +0 -1
- package/dist/chunk-BPCGXXMD.cjs.map +0 -1
- package/dist/chunk-EB5XWQAU.cjs +0 -132
- package/dist/chunk-EB5XWQAU.cjs.map +0 -1
- package/dist/chunk-GAUZYBXE.cjs.map +0 -1
- package/dist/chunk-KZ5NGFUP.mjs.map +0 -1
- package/dist/chunk-O357OJXL.cjs.map +0 -1
- package/dist/chunk-ONJMPO3P.cjs +0 -59
- package/dist/chunk-ONJMPO3P.cjs.map +0 -1
- package/dist/chunk-QJMZRV7A.mjs +0 -132
- package/dist/chunk-QJMZRV7A.mjs.map +0 -1
- package/dist/chunk-QXD7WVKK.mjs.map +0 -1
- package/dist/chunk-SGCYEEXD.mjs.map +0 -1
- package/dist/chunk-SGEYDV3K.mjs.map +0 -1
- package/dist/chunk-SLGOHIBL.mjs.map +0 -1
- package/dist/chunk-SWG7CNTZ.mjs.map +0 -1
- package/dist/client-CV1qzQgx.d.cts +0 -25
- package/dist/client-CnlSHDWE.d.ts +0 -25
- package/dist/ui/styles.css +0 -740
- package/dist/ui.cjs +0 -1018
- package/dist/ui.cjs.map +0 -1
- package/dist/ui.d.cts +0 -231
- package/dist/ui.d.ts +0 -231
- package/dist/ui.mjs +0 -1018
- package/dist/ui.mjs.map +0 -1
- package/dist/vite-preview-bootstrap.cjs +0 -66
- package/dist/vite-preview-bootstrap.cjs.map +0 -1
- package/dist/vite-preview-bootstrap.d.cts +0 -15
- package/dist/vite-preview-bootstrap.d.ts +0 -15
- package/dist/vite-preview-bootstrap.mjs +0 -66
- package/dist/vite-preview-bootstrap.mjs.map +0 -1
- package/dist/work-events-DB3WR468.d.ts +0 -547
- package/dist/work-events-Dxe7Djdy.d.cts +0 -547
- /package/dist/{chunk-RBIQT75L.mjs.map → chunk-GG3IX52W.mjs.map} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
TapButton,
|
|
3
|
+
TapCard,
|
|
4
|
+
TapDialog,
|
|
5
|
+
TapEmptyState,
|
|
6
|
+
TapErrorState,
|
|
7
|
+
TapForm,
|
|
8
|
+
TapInput,
|
|
9
|
+
TapPageHeader,
|
|
10
|
+
TapSelect,
|
|
11
|
+
TapSkeleton,
|
|
12
|
+
TapStat,
|
|
13
|
+
TapTable,
|
|
14
|
+
cn,
|
|
15
|
+
formFields
|
|
16
|
+
} from "./chunk-EX3NFXDK.mjs";
|
|
2
17
|
import {
|
|
3
18
|
dataQueryKey,
|
|
4
19
|
installPrefix,
|
|
@@ -16,21 +31,35 @@ import {
|
|
|
16
31
|
useTapState,
|
|
17
32
|
useTapStorage,
|
|
18
33
|
useTapTheme
|
|
19
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-BDCX6LRQ.mjs";
|
|
20
35
|
import {
|
|
21
36
|
useTap
|
|
22
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-QHM7XNRK.mjs";
|
|
23
38
|
import {
|
|
24
39
|
TAP_ERROR_CODES,
|
|
25
40
|
TapError,
|
|
26
41
|
TapServerError
|
|
27
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-CSTYBKZC.mjs";
|
|
28
43
|
import "./chunk-J5LGTIGS.mjs";
|
|
29
44
|
export {
|
|
30
45
|
TAP_ERROR_CODES,
|
|
46
|
+
TapButton,
|
|
47
|
+
TapCard,
|
|
48
|
+
TapDialog,
|
|
49
|
+
TapEmptyState,
|
|
31
50
|
TapError,
|
|
51
|
+
TapErrorState,
|
|
52
|
+
TapForm,
|
|
53
|
+
TapInput,
|
|
54
|
+
TapPageHeader,
|
|
55
|
+
TapSelect,
|
|
32
56
|
TapServerError,
|
|
57
|
+
TapSkeleton,
|
|
58
|
+
TapStat,
|
|
59
|
+
TapTable,
|
|
60
|
+
cn,
|
|
33
61
|
dataQueryKey,
|
|
62
|
+
formFields,
|
|
34
63
|
installPrefix,
|
|
35
64
|
procedurePrefix,
|
|
36
65
|
procedureQueryKey,
|
package/dist/manifest.cjs
CHANGED
|
@@ -23,7 +23,7 @@ var _chunkNN263PGQcjs = require('./chunk-NN263PGQ.cjs');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkPYJMJF44cjs = require('./chunk-PYJMJF44.cjs');
|
|
27
27
|
require('./chunk-Q7SFCCGT.cjs');
|
|
28
28
|
|
|
29
29
|
// src/manifest/schema.ts
|
|
@@ -84,7 +84,7 @@ var contributionId = _zod.z.string().regex(CONTRIBUTION_ID).describe(
|
|
|
84
84
|
);
|
|
85
85
|
var title = _zod.z.string().min(1).max(60).describe("The label owners read on this contribution.");
|
|
86
86
|
var scopeEntry = _zod.z.object({
|
|
87
|
-
key: _zod.z.enum(
|
|
87
|
+
key: _zod.z.enum(_chunkPYJMJF44cjs.SCOPE_KEYS, {
|
|
88
88
|
error: "Unknown scope key; see the Scopes reference."
|
|
89
89
|
}).describe("The scope key, from the scopes reference."),
|
|
90
90
|
justification: _zod.z.string().min(20).max(500).describe(
|
|
@@ -94,7 +94,7 @@ var scopeEntry = _zod.z.object({
|
|
|
94
94
|
var mobile = _zod.z.boolean().describe(
|
|
95
95
|
"Whether this surface is drawn on phone layouts. Defaults to true; set false to hide it there."
|
|
96
96
|
).optional();
|
|
97
|
-
var hostPage = (what) => _zod.z.enum(
|
|
97
|
+
var hostPage = (what) => _zod.z.enum(_chunkPYJMJF44cjs.PAGE_KEYS).describe(what);
|
|
98
98
|
var pageContribution = _zod.z.object({
|
|
99
99
|
id: contributionId,
|
|
100
100
|
title,
|
|
@@ -116,7 +116,7 @@ var widgetContribution = _zod.z.object({
|
|
|
116
116
|
title,
|
|
117
117
|
entry: entryPath,
|
|
118
118
|
page: hostPage("The host page this widget renders on."),
|
|
119
|
-
slot: _zod.z.enum(
|
|
119
|
+
slot: _zod.z.enum(_chunkPYJMJF44cjs.SLOTS).describe(
|
|
120
120
|
"The named anchor on that page. A slot that is not on the page fails validation."
|
|
121
121
|
),
|
|
122
122
|
size: _zod.z.enum(["1x1", "2x1", "2x2"]).describe(
|
|
@@ -129,7 +129,7 @@ var widgetContribution = _zod.z.object({
|
|
|
129
129
|
var seriesContribution = _zod.z.object({
|
|
130
130
|
id: contributionId,
|
|
131
131
|
label: title,
|
|
132
|
-
chart: _zod.z.enum(
|
|
132
|
+
chart: _zod.z.enum(_chunkPYJMJF44cjs.CHARTS).describe("The host chart this line is drawn on."),
|
|
133
133
|
metric: _zod.z.string().min(1).max(60).describe(
|
|
134
134
|
"The connector metric this line plots. It has to be one the connector declares."
|
|
135
135
|
)
|
|
@@ -144,13 +144,13 @@ var bannerContribution = _zod.z.object({
|
|
|
144
144
|
var rowActionContribution = _zod.z.object({
|
|
145
145
|
id: contributionId,
|
|
146
146
|
title,
|
|
147
|
-
table: _zod.z.enum(
|
|
147
|
+
table: _zod.z.enum(_chunkPYJMJF44cjs.TABLE_KEYS).describe("The host table whose row menu gains this entry."),
|
|
148
148
|
entry: entryPath
|
|
149
149
|
}).strict();
|
|
150
150
|
var markerContribution = _zod.z.object({
|
|
151
151
|
id: contributionId,
|
|
152
152
|
label: title,
|
|
153
|
-
chart: _zod.z.union([_zod.z.enum(
|
|
153
|
+
chart: _zod.z.union([_zod.z.enum(_chunkPYJMJF44cjs.CHARTS), _zod.z.literal("*")]).describe(
|
|
154
154
|
"The host chart this marker is drawn on, or `*` for every chart."
|
|
155
155
|
),
|
|
156
156
|
event: _zod.z.string().regex(DOMAIN_EVENT).describe(
|
|
@@ -276,7 +276,7 @@ var aiContribution = _zod.z.object({
|
|
|
276
276
|
"Always true. An action goes through an owner approval; there is no way to opt out."
|
|
277
277
|
),
|
|
278
278
|
reversible: _zod.z.boolean().describe("Whether the owner can undo it after it runs."),
|
|
279
|
-
scope: _zod.z.enum(
|
|
279
|
+
scope: _zod.z.enum(_chunkPYJMJF44cjs.SCOPE_KEYS).describe(
|
|
280
280
|
"The scope this action needs. Declare it under `scopes` as well."
|
|
281
281
|
),
|
|
282
282
|
estimatesCost: _zod.z.boolean().describe(
|
|
@@ -342,7 +342,7 @@ var aiContribution = _zod.z.object({
|
|
|
342
342
|
).optional()
|
|
343
343
|
}).strict();
|
|
344
344
|
var statusNames = (stage) => _zod.z.array(_zod.z.string()).describe(`Your own status names that mean ${stage}.`);
|
|
345
|
-
var
|
|
345
|
+
var workContribution = _zod.z.object({
|
|
346
346
|
kind: _zod.z.enum(["tracker", "docs", "chat"]).describe("What kind of destination this is."),
|
|
347
347
|
container: _zod.z.object({
|
|
348
348
|
label: _zod.z.string().min(1).max(60).describe(
|
|
@@ -377,55 +377,6 @@ var legacyWorkContribution = _zod.z.object({
|
|
|
377
377
|
"Whether items are created as the owner who asked (`user`) or as the install itself."
|
|
378
378
|
)
|
|
379
379
|
}).strict();
|
|
380
|
-
var workDirection = _zod.z.enum([
|
|
381
|
-
"none",
|
|
382
|
-
"to_provider",
|
|
383
|
-
"from_provider",
|
|
384
|
-
"two-way"
|
|
385
|
-
]);
|
|
386
|
-
var workAuth = _zod.z.discriminatedUnion("method", [
|
|
387
|
-
_zod.z.object({
|
|
388
|
-
method: _zod.z.literal("oauth"),
|
|
389
|
-
provider: _zod.z.string().min(1).describe("The OAuth provider identifier."),
|
|
390
|
-
scopes: _zod.z.array(_zod.z.string()).describe("The scopes requested from the provider.")
|
|
391
|
-
}).strict(),
|
|
392
|
-
_zod.z.object({
|
|
393
|
-
method: _zod.z.literal("api_key"),
|
|
394
|
-
fields: _zod.z.array(credentialField).max(20)
|
|
395
|
-
}).strict()
|
|
396
|
-
]);
|
|
397
|
-
var currentWorkContribution = legacyWorkContribution.extend({
|
|
398
|
-
container: legacyWorkContribution.shape.container.describe(
|
|
399
|
-
"Deprecated. Resolve containers dynamically with describe_container."
|
|
400
|
-
).optional(),
|
|
401
|
-
fields: legacyWorkContribution.shape.fields.describe("Deprecated. Resolve fields dynamically with describe_container.").optional(),
|
|
402
|
-
comments: _zod.z.union([
|
|
403
|
-
_zod.z.enum(["two-way", "none"]).describe("Deprecated. Declare a comments capability object."),
|
|
404
|
-
_zod.z.object({
|
|
405
|
-
direction: workDirection,
|
|
406
|
-
supportsEdits: _zod.z.literal(false),
|
|
407
|
-
supportsDeletes: _zod.z.literal(false)
|
|
408
|
-
}).strict()
|
|
409
|
-
]),
|
|
410
|
-
status: _zod.z.object({
|
|
411
|
-
direction: workDirection,
|
|
412
|
-
webhook: _zod.z.string().regex(DOMAIN_EVENT).optional(),
|
|
413
|
-
map: _zod.z.object({
|
|
414
|
-
open: statusNames("not started"),
|
|
415
|
-
in_progress: statusNames("under way"),
|
|
416
|
-
done: statusNames("finished")
|
|
417
|
-
}).strict().describe(
|
|
418
|
-
"Deprecated. Resolve statuses dynamically with describe_container."
|
|
419
|
-
).optional()
|
|
420
|
-
}).strict().optional(),
|
|
421
|
-
auth: workAuth.describe("How owners authenticate the work destination.")
|
|
422
|
-
});
|
|
423
|
-
var workContribution = _zod.z.union([
|
|
424
|
-
currentWorkContribution,
|
|
425
|
-
legacyWorkContribution.describe(
|
|
426
|
-
"Deprecated SDK v2 work declaration. Migrate to work capabilities and auth."
|
|
427
|
-
)
|
|
428
|
-
]);
|
|
429
380
|
var listing = _zod.z.object({
|
|
430
381
|
longDescription: _zod.z.string().min(1).max(5e3).describe("The body of your listing page, in markdown.").optional(),
|
|
431
382
|
screenshots: _zod.z.array(_zod.z.string().min(1)).min(1, "A listing shows 1 to 6 screenshots.").max(6, "A listing shows 1 to 6 screenshots.").describe(
|
|
@@ -472,7 +423,7 @@ var manifestObject = _zod.z.object({
|
|
|
472
423
|
icon: _zod.z.string().min(1).max(200).describe(
|
|
473
424
|
"The icon file carried in the bundle, as a path relative to the manifest. Square png or svg, at most 512 KB."
|
|
474
425
|
),
|
|
475
|
-
category: _zod.z.enum(
|
|
426
|
+
category: _zod.z.enum(_chunkPYJMJF44cjs.CATEGORIES, {
|
|
476
427
|
error: "Choose a category from the Tap Store list (see the Categories reference)."
|
|
477
428
|
}).describe("The Tap Store section owners browse and filter by."),
|
|
478
429
|
sdk: _zod.z.string().min(1).max(60).describe(
|
|
@@ -484,7 +435,7 @@ var manifestObject = _zod.z.object({
|
|
|
484
435
|
installScope: _zod.z.enum(["project", "organization"]).describe(
|
|
485
436
|
"Whether one install belongs to a single project or to a whole organization. An organization install contributes no pages, tabs, widgets or series, because those render on a project."
|
|
486
437
|
),
|
|
487
|
-
scopes: _zod.z.array(scopeEntry).min(1).max(
|
|
438
|
+
scopes: _zod.z.array(scopeEntry).min(1).max(_chunkPYJMJF44cjs.SCOPE_KEYS.length).describe(
|
|
488
439
|
"The permissions an owner grants at install. Declare only what your contributions use."
|
|
489
440
|
),
|
|
490
441
|
contributes: _zod.z.object({
|
|
@@ -517,7 +468,7 @@ var manifestObject = _zod.z.object({
|
|
|
517
468
|
"What this extension offers the assistant: tools, mentions, actions, knowledge, skills, prompts and context providers."
|
|
518
469
|
).optional(),
|
|
519
470
|
work: workContribution.describe(
|
|
520
|
-
"The work destination this extension creates issues, pages or messages in. Needs `
|
|
471
|
+
"The work destination this extension creates issues, pages or messages in. Needs the `work:create` and `work:sync` scopes."
|
|
521
472
|
).optional()
|
|
522
473
|
}).strict().describe(
|
|
523
474
|
"What this extension adds to the host. At most 20 UI contributions in total, and a page, tab, widget, row action, marker or settings panel needs the `ui:render` scope."
|
|
@@ -539,7 +490,7 @@ var manifestObject = _zod.z.object({
|
|
|
539
490
|
"The procedures the host may call on your server, by name, each with its input and output schema. At most 30."
|
|
540
491
|
).optional(),
|
|
541
492
|
events: _zod.z.array(
|
|
542
|
-
_zod.z.enum(
|
|
493
|
+
_zod.z.enum(_chunkPYJMJF44cjs.EVENTS, {
|
|
543
494
|
error: (issue) => `"${String(issue.input)}" is not a Tappify event. Subscribe to a name from the event catalogue.`
|
|
544
495
|
})
|
|
545
496
|
).describe(
|
|
@@ -595,7 +546,7 @@ var manifestSchema = manifestObject.superRefine((manifest, ctx) => {
|
|
|
595
546
|
});
|
|
596
547
|
};
|
|
597
548
|
for (const [index, widget] of (_nullishCoalesce(contributes.widgets, () => ( []))).entries()) {
|
|
598
|
-
const slots =
|
|
549
|
+
const slots = _chunkPYJMJF44cjs.slotsForPage.call(void 0, widget.page);
|
|
599
550
|
if (!slots.includes(widget.slot)) {
|
|
600
551
|
ctx.addIssue({
|
|
601
552
|
code: "custom",
|
|
@@ -738,36 +689,16 @@ var manifestSchema = manifestObject.superRefine((manifest, ctx) => {
|
|
|
738
689
|
}
|
|
739
690
|
}
|
|
740
691
|
if (contributes.work) {
|
|
741
|
-
const work = contributes.work;
|
|
742
|
-
const legacy = isLegacyWork(work);
|
|
743
|
-
if (!legacy || !granted.has("reviews:read")) {
|
|
744
|
-
requireScope(
|
|
745
|
-
"review.threads:read",
|
|
746
|
-
["scopes"],
|
|
747
|
-
"the work destination reads Review threads."
|
|
748
|
-
);
|
|
749
|
-
}
|
|
750
692
|
requireScope(
|
|
751
693
|
"work:create",
|
|
752
694
|
["scopes"],
|
|
753
695
|
"the work destination creates items."
|
|
754
696
|
);
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
["scopes"],
|
|
761
|
-
"the work destination syncs comments or status."
|
|
762
|
-
);
|
|
763
|
-
}
|
|
764
|
-
if (work.identity === "user") {
|
|
765
|
-
ctx.addIssue({
|
|
766
|
-
code: "custom",
|
|
767
|
-
path: ["contributes", "work", "identity"],
|
|
768
|
-
message: 'Per-user work identity is not supported. Set identity to "install".'
|
|
769
|
-
});
|
|
770
|
-
}
|
|
697
|
+
requireScope(
|
|
698
|
+
"work:sync",
|
|
699
|
+
["scopes"],
|
|
700
|
+
"the work destination syncs comments and status."
|
|
701
|
+
);
|
|
771
702
|
}
|
|
772
703
|
const needsServer = contributes.connector !== void 0 || (_nullishCoalesce(_optionalChain([contributes, 'access', _46 => _46.webhooks, 'optionalAccess', _47 => _47.length]), () => ( 0))) > 0 || ai !== void 0 || contributes.work !== void 0 || _optionalChain([manifest, 'access', _48 => _48.server, 'optionalAccess', _49 => _49.procedures]) !== void 0;
|
|
773
704
|
if (needsServer && !_optionalChain([manifest, 'access', _50 => _50.server, 'optionalAccess', _51 => _51.baseUrl])) {
|
|
@@ -786,7 +717,7 @@ var manifestSchema = manifestObject.superRefine((manifest, ctx) => {
|
|
|
786
717
|
});
|
|
787
718
|
}
|
|
788
719
|
for (const scope of manifest.scopes) {
|
|
789
|
-
const definition =
|
|
720
|
+
const definition = _chunkPYJMJF44cjs.findScope.call(void 0, scope.key);
|
|
790
721
|
if (_optionalChain([definition, 'optionalAccess', _54 => _54.requiresJustification]) && !scope.justification) {
|
|
791
722
|
ctx.addIssue({
|
|
792
723
|
code: "custom",
|
|
@@ -819,11 +750,11 @@ var manifestSchema = manifestObject.superRefine((manifest, ctx) => {
|
|
|
819
750
|
});
|
|
820
751
|
}
|
|
821
752
|
}
|
|
822
|
-
if (!sdkMajors(manifest.sdk).some((major) =>
|
|
753
|
+
if (!sdkMajors(manifest.sdk).some((major) => _chunkPYJMJF44cjs.SERVED_SDK_MAJORS.includes(major))) {
|
|
823
754
|
ctx.addIssue({
|
|
824
755
|
code: "custom",
|
|
825
756
|
path: ["sdk"],
|
|
826
|
-
message: `The host serves SDK major ${
|
|
757
|
+
message: `The host serves SDK major ${_chunkPYJMJF44cjs.SERVED_SDK_MAJORS.join(", ")}. Set sdk to a range that includes it, such as "^2.0.0".`
|
|
827
758
|
});
|
|
828
759
|
}
|
|
829
760
|
});
|
|
@@ -854,46 +785,6 @@ function validateManifest(value) {
|
|
|
854
785
|
}));
|
|
855
786
|
return { ok: false, issues };
|
|
856
787
|
}
|
|
857
|
-
function isLegacyWork(work) {
|
|
858
|
-
return !("auth" in work);
|
|
859
|
-
}
|
|
860
|
-
function workManifestWarnings(manifest) {
|
|
861
|
-
const work = manifest.contributes.work;
|
|
862
|
-
if (!work) return [];
|
|
863
|
-
const warnings = [];
|
|
864
|
-
if (work.container) {
|
|
865
|
-
warnings.push({
|
|
866
|
-
path: "contributes.work.container",
|
|
867
|
-
message: "Static work containers are deprecated. Resolve containers dynamically with describe_container."
|
|
868
|
-
});
|
|
869
|
-
}
|
|
870
|
-
if (work.fields) {
|
|
871
|
-
warnings.push({
|
|
872
|
-
path: "contributes.work.fields",
|
|
873
|
-
message: "Static work fields are deprecated. Resolve fields dynamically with describe_container."
|
|
874
|
-
});
|
|
875
|
-
}
|
|
876
|
-
if (typeof work.comments === "string") {
|
|
877
|
-
warnings.push({
|
|
878
|
-
path: "contributes.work.comments",
|
|
879
|
-
message: "String work comments are deprecated. Declare direction, supportsEdits: false and supportsDeletes: false."
|
|
880
|
-
});
|
|
881
|
-
}
|
|
882
|
-
if (_optionalChain([work, 'access', _62 => _62.status, 'optionalAccess', _63 => _63.map])) {
|
|
883
|
-
warnings.push({
|
|
884
|
-
path: "contributes.work.status.map",
|
|
885
|
-
message: "Static work status maps are deprecated. Resolve statuses dynamically with describe_container."
|
|
886
|
-
});
|
|
887
|
-
}
|
|
888
|
-
if (isLegacyWork(work) && manifest.scopes.some((scope) => scope.key === "reviews:read") && !manifest.scopes.some((scope) => scope.key === "review.threads:read")) {
|
|
889
|
-
warnings.push({
|
|
890
|
-
path: "scopes",
|
|
891
|
-
message: "Using reviews:read for work is deprecated. Add review.threads:read for Review threads; reviews:read grants store-review access."
|
|
892
|
-
});
|
|
893
|
-
}
|
|
894
|
-
return warnings;
|
|
895
|
-
}
|
|
896
|
-
|
|
897
788
|
|
|
898
789
|
|
|
899
790
|
|
|
@@ -921,5 +812,5 @@ function workManifestWarnings(manifest) {
|
|
|
921
812
|
|
|
922
813
|
|
|
923
814
|
|
|
924
|
-
exports.CARD_KEYS =
|
|
815
|
+
exports.CARD_KEYS = _chunkPYJMJF44cjs.CARD_KEYS; exports.CATEGORIES = _chunkPYJMJF44cjs.CATEGORIES; exports.CHARTS = _chunkPYJMJF44cjs.CHARTS; exports.EVENTS = _chunkPYJMJF44cjs.EVENTS; exports.KINDS = _chunkPYJMJF44cjs.KINDS; exports.PAGES = _chunkPYJMJF44cjs.PAGES; exports.PAGE_KEYS = _chunkPYJMJF44cjs.PAGE_KEYS; exports.QUERY_SCOPES = _chunkPYJMJF44cjs.QUERY_SCOPES; exports.SCOPES = _chunkPYJMJF44cjs.SCOPES; exports.SCOPE_KEYS = _chunkPYJMJF44cjs.SCOPE_KEYS; exports.SERVED_SDK_MAJORS = _chunkPYJMJF44cjs.SERVED_SDK_MAJORS; exports.SLOTS = _chunkPYJMJF44cjs.SLOTS; exports.TABLES = _chunkPYJMJF44cjs.TABLES; exports.TABLE_KEYS = _chunkPYJMJF44cjs.TABLE_KEYS; exports.defineManifest = _chunkNN263PGQcjs.defineManifest; exports.exposeName = _chunkNN263PGQcjs.exposeName; exports.findPage = _chunkPYJMJF44cjs.findPage; exports.findScope = _chunkPYJMJF44cjs.findScope; exports.findTable = _chunkPYJMJF44cjs.findTable; exports.manifestJsonSchema = manifestJsonSchema; exports.manifestSchema = manifestSchema; exports.remoteName = _chunkNN263PGQcjs.remoteName; exports.sdkMajors = sdkMajors; exports.slotsForPage = _chunkPYJMJF44cjs.slotsForPage; exports.uiContributions = _chunkNN263PGQcjs.uiContributions; exports.validateManifest = validateManifest;
|
|
925
816
|
//# sourceMappingURL=manifest.cjs.map
|