@sanity/blueprints 0.34.1 → 0.36.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 +1 -2
- package/dist/definers/agents.d.ts +3 -1
- package/dist/definers/agents.js +4 -2
- package/dist/definers/agents.js.map +1 -1
- package/dist/definers/applications.d.ts +30 -18
- package/dist/definers/applications.js +36 -24
- package/dist/definers/applications.js.map +1 -1
- package/dist/definers/blueprints.d.ts +1 -0
- package/dist/definers/blueprints.js +5 -27
- package/dist/definers/blueprints.js.map +1 -1
- package/dist/definers/context.d.ts +6 -2
- package/dist/definers/context.js +8 -4
- package/dist/definers/context.js.map +1 -1
- package/dist/definers/cors.d.ts +11 -1
- package/dist/definers/cors.js +11 -13
- package/dist/definers/cors.js.map +1 -1
- package/dist/definers/datasets.d.ts +30 -3
- package/dist/definers/datasets.js +32 -16
- package/dist/definers/datasets.js.map +1 -1
- package/dist/definers/functions/document.d.ts +29 -0
- package/dist/definers/functions/document.js +1 -1
- package/dist/definers/functions/document.js.map +1 -1
- package/dist/definers/functions/durable.d.ts +4 -3
- package/dist/definers/functions/durable.js +5 -4
- package/dist/definers/functions/durable.js.map +1 -1
- package/dist/definers/functions/index.js +1 -1
- package/dist/definers/functions/index.js.map +1 -1
- package/dist/definers/functions/media-library.d.ts +30 -0
- package/dist/definers/functions/media-library.js +19 -21
- package/dist/definers/functions/media-library.js.map +1 -1
- package/dist/definers/functions/pubsub.d.ts +2 -3
- package/dist/definers/functions/pubsub.js +3 -4
- package/dist/definers/functions/pubsub.js.map +1 -1
- package/dist/definers/functions/queue.d.ts +26 -6
- package/dist/definers/functions/queue.js +31 -10
- package/dist/definers/functions/queue.js.map +1 -1
- package/dist/definers/functions/scheduled.d.ts +7 -6
- package/dist/definers/functions/scheduled.js +8 -7
- package/dist/definers/functions/scheduled.js.map +1 -1
- package/dist/definers/functions/sync-tag-invalidate.d.ts +5 -2
- package/dist/definers/functions/sync-tag-invalidate.js +6 -3
- package/dist/definers/functions/sync-tag-invalidate.js.map +1 -1
- package/dist/definers/installation-config.d.ts +4 -2
- package/dist/definers/installation-config.js +5 -3
- package/dist/definers/installation-config.js.map +1 -1
- package/dist/definers/permissions.d.ts +8 -2
- package/dist/definers/permissions.js +12 -5
- package/dist/definers/permissions.js.map +1 -1
- package/dist/definers/projects.d.ts +3 -4
- package/dist/definers/projects.js +4 -5
- package/dist/definers/projects.js.map +1 -1
- package/dist/definers/resources.d.ts +1 -0
- package/dist/definers/resources.js +1 -11
- package/dist/definers/resources.js.map +1 -1
- package/dist/definers/robotTokens.d.ts +22 -4
- package/dist/definers/robotTokens.js +53 -20
- package/dist/definers/robotTokens.js.map +1 -1
- package/dist/definers/roles.d.ts +49 -9
- package/dist/definers/roles.js +54 -55
- package/dist/definers/roles.js.map +1 -1
- package/dist/definers/studios.d.ts +5 -3
- package/dist/definers/studios.js +6 -4
- package/dist/definers/studios.js.map +1 -1
- package/dist/definers/webhooks.d.ts +19 -1
- package/dist/definers/webhooks.js +18 -22
- package/dist/definers/webhooks.js.map +1 -1
- package/dist/index.d.ts +18 -18
- package/dist/index.js +19 -20
- package/dist/index.js.map +1 -1
- package/dist/resolve/index.d.ts +2 -3
- package/dist/resolve/index.js +2 -3
- package/dist/resolve/index.js.map +1 -1
- package/dist/types/agents.d.ts +7 -3
- package/dist/types/applications.d.ts +68 -50
- package/dist/types/applications.js +9 -6
- package/dist/types/applications.js.map +1 -1
- package/dist/types/context.d.ts +17 -7
- package/dist/types/cors.d.ts +0 -2
- package/dist/types/datasets.d.ts +0 -6
- package/dist/types/functions/index.d.ts +96 -21
- package/dist/types/functions/index.js +2 -1
- package/dist/types/functions/index.js.map +1 -1
- package/dist/types/installation-config.d.ts +14 -11
- package/dist/types/permissions.d.ts +8 -4
- package/dist/types/projects.d.ts +5 -4
- package/dist/types/robotTokens.d.ts +14 -4
- package/dist/types/roles.d.ts +10 -9
- package/dist/types/studios.d.ts +29 -14
- package/dist/types/studios.js +3 -2
- package/dist/types/studios.js.map +1 -1
- package/dist/types/webhooks.d.ts +0 -3
- package/dist/utils/debounce.d.ts +0 -11
- package/dist/utils/debounce.js +0 -22
- package/dist/utils/debounce.js.map +1 -1
- package/dist/utils/parse-duration.d.ts +13 -0
- package/dist/utils/parse-duration.js +24 -0
- package/dist/utils/parse-duration.js.map +1 -1
- package/dist/utils/throttle.d.ts +9 -0
- package/dist/utils/throttle.js +22 -0
- package/dist/utils/throttle.js.map +1 -0
- package/dist/utils/validation.d.ts +14 -11
- package/dist/utils/validation.js +25 -17
- package/dist/utils/validation.js.map +1 -1
- package/dist/validation/applications.js +7 -2
- package/dist/validation/applications.js.map +1 -1
- package/dist/validation/blueprints.js +120 -4
- package/dist/validation/blueprints.js.map +1 -1
- package/dist/validation/functions.d.ts +19 -0
- package/dist/validation/functions.js +169 -36
- package/dist/validation/functions.js.map +1 -1
- package/dist/validation/projects.js +3 -0
- package/dist/validation/projects.js.map +1 -1
- package/dist/validation/resources.js +1 -1
- package/dist/validation/resources.js.map +1 -1
- package/dist/validation/studios.js +4 -0
- package/dist/validation/studios.js.map +1 -1
- package/package.json +1 -1
- package/src/definers/agents.ts +4 -2
- package/src/definers/applications.ts +36 -24
- package/src/definers/blueprints.ts +4 -27
- package/src/definers/context.ts +8 -4
- package/src/definers/cors.ts +11 -13
- package/src/definers/datasets.ts +40 -16
- package/src/definers/functions/document.ts +17 -25
- package/src/definers/functions/durable.ts +5 -4
- package/src/definers/functions/index.ts +1 -1
- package/src/definers/functions/media-library.ts +19 -21
- package/src/definers/functions/pubsub.ts +3 -4
- package/src/definers/functions/queue.ts +31 -10
- package/src/definers/functions/scheduled.ts +8 -7
- package/src/definers/functions/sync-tag-invalidate.ts +6 -3
- package/src/definers/installation-config.ts +5 -3
- package/src/definers/permissions.ts +14 -6
- package/src/definers/projects.ts +4 -5
- package/src/definers/resources.ts +1 -11
- package/src/definers/robotTokens.ts +55 -20
- package/src/definers/roles.ts +60 -58
- package/src/definers/studios.ts +6 -4
- package/src/definers/webhooks.ts +18 -23
- package/src/index.ts +20 -21
- package/src/resolve/index.ts +2 -4
- package/src/types/agents.ts +7 -3
- package/src/types/applications.ts +68 -50
- package/src/types/context.ts +17 -7
- package/src/types/cors.ts +0 -2
- package/src/types/datasets.ts +0 -6
- package/src/types/functions/index.ts +100 -21
- package/src/types/installation-config.ts +14 -11
- package/src/types/permissions.ts +8 -4
- package/src/types/projects.ts +6 -4
- package/src/types/robotTokens.ts +15 -4
- package/src/types/roles.ts +10 -9
- package/src/types/studios.ts +33 -14
- package/src/types/webhooks.ts +0 -3
- package/src/utils/debounce.ts +0 -25
- package/src/utils/parse-duration.ts +27 -0
- package/src/utils/throttle.ts +25 -0
- package/src/utils/validation.ts +24 -17
- package/src/validation/applications.ts +6 -2
- package/src/validation/blueprints.ts +132 -5
- package/src/validation/functions.ts +183 -37
- package/src/validation/projects.ts +4 -0
- package/src/validation/resources.ts +1 -1
- package/src/validation/studios.ts +3 -0
package/dist/definers/roles.d.ts
CHANGED
|
@@ -1,36 +1,78 @@
|
|
|
1
1
|
import { type BlueprintCrossStackReferenceConfig, type BlueprintProjectRoleResource, type BlueprintResource, type BlueprintRoleConfig, type BlueprintRoleResource } from '../index.js';
|
|
2
2
|
/**
|
|
3
|
-
* Defines a role
|
|
3
|
+
* Defines a custom role. Set `project` to scope the role to a project. Without it, the role is scoped to the same resource
|
|
4
|
+
* as the blueprint.
|
|
4
5
|
*
|
|
6
|
+
* @example
|
|
5
7
|
* ```ts
|
|
6
8
|
* defineRole({
|
|
7
9
|
* name: 'custom-robot-role',
|
|
8
10
|
* title: 'Custom Robot Role',
|
|
9
11
|
* appliesToRobots: true,
|
|
12
|
+
* appliesToUsers: false,
|
|
10
13
|
* permissions: [{
|
|
11
14
|
* name: 'sanity-project-cors',
|
|
12
15
|
* action: 'create',
|
|
13
16
|
* }],
|
|
14
17
|
* })
|
|
15
18
|
* ```
|
|
19
|
+
*
|
|
20
|
+
* @example All options
|
|
21
|
+
* ```ts
|
|
22
|
+
* defineRole({
|
|
23
|
+
* name: 'ci-deploy-role',
|
|
24
|
+
* title: 'CI Deploy Role',
|
|
25
|
+
* description: 'Permissions for CI/CD pipelines to manage CORS origins',
|
|
26
|
+
* appliesToRobots: true,
|
|
27
|
+
* appliesToUsers: false,
|
|
28
|
+
* permissions: [{
|
|
29
|
+
* name: 'sanity-project-cors',
|
|
30
|
+
* action: 'create',
|
|
31
|
+
* }, {
|
|
32
|
+
* name: 'sanity-project-cors',
|
|
33
|
+
* action: 'read',
|
|
34
|
+
* }, {
|
|
35
|
+
* name: 'sanity-project-cors',
|
|
36
|
+
* action: 'delete',
|
|
37
|
+
* }],
|
|
38
|
+
* })
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* @example In a project, for a robot token
|
|
42
|
+
* ```ts
|
|
43
|
+
* defineRole({
|
|
44
|
+
* name: 'ci-deploy-role',
|
|
45
|
+
* title: 'CI Deploy Role',
|
|
46
|
+
* project: 'my-project-id',
|
|
47
|
+
* appliesToRobots: true,
|
|
48
|
+
* appliesToUsers: false,
|
|
49
|
+
* permissions: [{name: 'sanity-project-cors', action: 'create'}],
|
|
50
|
+
* })
|
|
51
|
+
*
|
|
52
|
+
* defineRobotToken({
|
|
53
|
+
* name: 'ci-robot',
|
|
54
|
+
* memberships: [{project: 'my-project-id', roleNames: ['$.resources.ci-deploy-role']}],
|
|
55
|
+
* })
|
|
56
|
+
* ```
|
|
16
57
|
* @param parameters The configuration of the role
|
|
17
58
|
* @public
|
|
18
|
-
* @beta Deploying Roles via Blueprints is experimental. This feature is stabilizing but may still be subject to breaking changes.
|
|
19
59
|
* @category Definers
|
|
20
60
|
* @expandType BlueprintRoleConfig
|
|
21
61
|
* @returns The role resource
|
|
22
62
|
*/
|
|
23
|
-
export declare function defineRole(parameters: BlueprintRoleConfig
|
|
24
|
-
skipValidation?: boolean;
|
|
25
|
-
}): BlueprintRoleResource;
|
|
63
|
+
export declare function defineRole(parameters: BlueprintRoleConfig): BlueprintRoleResource;
|
|
26
64
|
/**
|
|
27
65
|
* Defines a role that is scoped to the specified project.
|
|
28
66
|
*
|
|
67
|
+
* @deprecated Use {@link defineRole} with `project` instead.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
29
70
|
* ```ts
|
|
30
|
-
* defineProjectRole(
|
|
71
|
+
* defineProjectRole('my-project-id', {
|
|
31
72
|
* name: 'viewer-role',
|
|
32
73
|
* title: 'Viewer',
|
|
33
74
|
* appliesToUsers: true,
|
|
75
|
+
* appliesToRobots: false,
|
|
34
76
|
* permissions: [{
|
|
35
77
|
* name: 'sanity-project-cors',
|
|
36
78
|
* action: 'read',
|
|
@@ -38,8 +80,6 @@ export declare function defineRole(parameters: BlueprintRoleConfig, options?: {
|
|
|
38
80
|
* })
|
|
39
81
|
* ```
|
|
40
82
|
* @public
|
|
41
|
-
* @beta Deploying Roles via Blueprints is experimental. This feature is stabilizing but may still be subject to breaking changes.
|
|
42
|
-
* @hidden
|
|
43
83
|
* @category Definers
|
|
44
84
|
* @expandType BlueprintRoleConfig
|
|
45
85
|
* @param projectId The ID of the project to which the role will be scoped
|
|
@@ -50,6 +90,7 @@ export declare function defineProjectRole(projectId: string, parameters: Bluepri
|
|
|
50
90
|
/**
|
|
51
91
|
* Creates a reference to a role in another stack.
|
|
52
92
|
*
|
|
93
|
+
* @example
|
|
53
94
|
* ```ts
|
|
54
95
|
* referenceRole({
|
|
55
96
|
* name: 'editor-role',
|
|
@@ -58,7 +99,6 @@ export declare function defineProjectRole(projectId: string, parameters: Bluepri
|
|
|
58
99
|
* ```
|
|
59
100
|
*
|
|
60
101
|
* @public
|
|
61
|
-
* @beta Referencing Roles via Blueprints is experimental. This feature is stabilizing but may still be subject to breaking changes.
|
|
62
102
|
* @category Referencers
|
|
63
103
|
* @expandType BlueprintCrossStackReferenceConfig
|
|
64
104
|
* @param params The parameters for referencing the role
|
package/dist/definers/roles.js
CHANGED
|
@@ -1,13 +1,29 @@
|
|
|
1
1
|
import { referenceResource, validateProjectRole, validateRole, } from '../index.js';
|
|
2
2
|
import { runValidation } from '../utils/validation.js';
|
|
3
|
-
|
|
4
|
-
*
|
|
3
|
+
/**
|
|
4
|
+
* Defines a custom role. Set `project` to scope the role to a project. Without it, the role is scoped to the same resource
|
|
5
|
+
* as the blueprint.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* defineRole({
|
|
10
|
+
* name: 'custom-robot-role',
|
|
11
|
+
* title: 'Custom Robot Role',
|
|
12
|
+
* appliesToRobots: true,
|
|
13
|
+
* appliesToUsers: false,
|
|
14
|
+
* permissions: [{
|
|
15
|
+
* name: 'sanity-project-cors',
|
|
16
|
+
* action: 'create',
|
|
17
|
+
* }],
|
|
18
|
+
* })
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
5
21
|
* @example All options
|
|
6
22
|
* ```ts
|
|
7
23
|
* defineRole({
|
|
8
24
|
* name: 'ci-deploy-role',
|
|
9
25
|
* title: 'CI Deploy Role',
|
|
10
|
-
* description: 'Permissions for CI/CD pipelines to manage CORS
|
|
26
|
+
* description: 'Permissions for CI/CD pipelines to manage CORS origins',
|
|
11
27
|
* appliesToRobots: true,
|
|
12
28
|
* appliesToUsers: false,
|
|
13
29
|
* permissions: [{
|
|
@@ -22,29 +38,37 @@ import { runValidation } from '../utils/validation.js';
|
|
|
22
38
|
* }],
|
|
23
39
|
* })
|
|
24
40
|
* ```
|
|
25
|
-
*/
|
|
26
|
-
/**
|
|
27
|
-
* Defines a role that is scoped to the same resource as the blueprint.
|
|
28
41
|
*
|
|
42
|
+
* @example In a project, for a robot token
|
|
29
43
|
* ```ts
|
|
30
44
|
* defineRole({
|
|
31
|
-
* name: '
|
|
32
|
-
* title: '
|
|
45
|
+
* name: 'ci-deploy-role',
|
|
46
|
+
* title: 'CI Deploy Role',
|
|
47
|
+
* project: 'my-project-id',
|
|
33
48
|
* appliesToRobots: true,
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
49
|
+
* appliesToUsers: false,
|
|
50
|
+
* permissions: [{name: 'sanity-project-cors', action: 'create'}],
|
|
51
|
+
* })
|
|
52
|
+
*
|
|
53
|
+
* defineRobotToken({
|
|
54
|
+
* name: 'ci-robot',
|
|
55
|
+
* memberships: [{project: 'my-project-id', roleNames: ['$.resources.ci-deploy-role']}],
|
|
38
56
|
* })
|
|
39
57
|
* ```
|
|
40
58
|
* @param parameters The configuration of the role
|
|
41
59
|
* @public
|
|
42
|
-
* @beta Deploying Roles via Blueprints is experimental. This feature is stabilizing but may still be subject to breaking changes.
|
|
43
60
|
* @category Definers
|
|
44
61
|
* @expandType BlueprintRoleConfig
|
|
45
62
|
* @returns The role resource
|
|
46
63
|
*/
|
|
47
|
-
export function defineRole(parameters
|
|
64
|
+
export function defineRole(parameters) {
|
|
65
|
+
if (parameters.project !== undefined)
|
|
66
|
+
return defineRoleInProject(parameters.project, parameters);
|
|
67
|
+
const roleResource = buildRoleResource(parameters);
|
|
68
|
+
runValidation(roleResource, () => validateRole(roleResource));
|
|
69
|
+
return roleResource;
|
|
70
|
+
}
|
|
71
|
+
function buildRoleResource(parameters) {
|
|
48
72
|
const roleResource = {
|
|
49
73
|
name: parameters.name,
|
|
50
74
|
type: 'sanity.access.role',
|
|
@@ -57,45 +81,29 @@ export function defineRole(parameters, options) {
|
|
|
57
81
|
if (parameters.lifecycle) {
|
|
58
82
|
roleResource.lifecycle = parameters.lifecycle;
|
|
59
83
|
}
|
|
60
|
-
if (options?.skipValidation !== true)
|
|
61
|
-
runValidation(() => validateRole(roleResource));
|
|
62
84
|
return roleResource;
|
|
63
85
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
* name: 'sanity-project-cors',
|
|
74
|
-
* action: 'create',
|
|
75
|
-
* }, {
|
|
76
|
-
* name: 'sanity-project-cors',
|
|
77
|
-
* action: 'delete',
|
|
78
|
-
* }],
|
|
79
|
-
* })
|
|
80
|
-
*
|
|
81
|
-
* defineRobotToken({
|
|
82
|
-
* name: 'ci-robot',
|
|
83
|
-
* memberships: [{
|
|
84
|
-
* resourceType: 'project',
|
|
85
|
-
* resourceId: projectId,
|
|
86
|
-
* roleNames: ['$.resources.ci-deploy-role'],
|
|
87
|
-
* }],
|
|
88
|
-
* })
|
|
89
|
-
* ```
|
|
90
|
-
*/
|
|
86
|
+
function defineRoleInProject(project, parameters) {
|
|
87
|
+
const projectRoleResource = {
|
|
88
|
+
...buildRoleResource(parameters),
|
|
89
|
+
resourceType: 'project',
|
|
90
|
+
resourceId: project,
|
|
91
|
+
};
|
|
92
|
+
runValidation(projectRoleResource, () => validateProjectRole(projectRoleResource));
|
|
93
|
+
return projectRoleResource;
|
|
94
|
+
}
|
|
91
95
|
/**
|
|
92
96
|
* Defines a role that is scoped to the specified project.
|
|
93
97
|
*
|
|
98
|
+
* @deprecated Use {@link defineRole} with `project` instead.
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
94
101
|
* ```ts
|
|
95
|
-
* defineProjectRole(
|
|
102
|
+
* defineProjectRole('my-project-id', {
|
|
96
103
|
* name: 'viewer-role',
|
|
97
104
|
* title: 'Viewer',
|
|
98
105
|
* appliesToUsers: true,
|
|
106
|
+
* appliesToRobots: false,
|
|
99
107
|
* permissions: [{
|
|
100
108
|
* name: 'sanity-project-cors',
|
|
101
109
|
* action: 'read',
|
|
@@ -103,8 +111,6 @@ export function defineRole(parameters, options) {
|
|
|
103
111
|
* })
|
|
104
112
|
* ```
|
|
105
113
|
* @public
|
|
106
|
-
* @beta Deploying Roles via Blueprints is experimental. This feature is stabilizing but may still be subject to breaking changes.
|
|
107
|
-
* @hidden
|
|
108
114
|
* @category Definers
|
|
109
115
|
* @expandType BlueprintRoleConfig
|
|
110
116
|
* @param projectId The ID of the project to which the role will be scoped
|
|
@@ -112,18 +118,12 @@ export function defineRole(parameters, options) {
|
|
|
112
118
|
* @returns The role resource
|
|
113
119
|
*/
|
|
114
120
|
export function defineProjectRole(projectId, parameters) {
|
|
115
|
-
|
|
116
|
-
const projectRoleResource = {
|
|
117
|
-
...roleResource,
|
|
118
|
-
resourceType: 'project',
|
|
119
|
-
resourceId: projectId,
|
|
120
|
-
};
|
|
121
|
-
runValidation(() => validateProjectRole(projectRoleResource));
|
|
122
|
-
return projectRoleResource;
|
|
121
|
+
return defineRoleInProject(projectId, parameters);
|
|
123
122
|
}
|
|
124
123
|
/**
|
|
125
124
|
* Creates a reference to a role in another stack.
|
|
126
125
|
*
|
|
126
|
+
* @example
|
|
127
127
|
* ```ts
|
|
128
128
|
* referenceRole({
|
|
129
129
|
* name: 'editor-role',
|
|
@@ -132,7 +132,6 @@ export function defineProjectRole(projectId, parameters) {
|
|
|
132
132
|
* ```
|
|
133
133
|
*
|
|
134
134
|
* @public
|
|
135
|
-
* @beta Referencing Roles via Blueprints is experimental. This feature is stabilizing but may still be subject to breaking changes.
|
|
136
135
|
* @category Referencers
|
|
137
136
|
* @expandType BlueprintCrossStackReferenceConfig
|
|
138
137
|
* @param params The parameters for referencing the role
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roles.js","sourceRoot":"","sources":["../../src/definers/roles.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,iBAAiB,EACjB,mBAAmB,EACnB,YAAY,GACb,MAAM,aAAa,CAAA;AACpB,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAA;AAEpD
|
|
1
|
+
{"version":3,"file":"roles.js","sourceRoot":"","sources":["../../src/definers/roles.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,iBAAiB,EACjB,mBAAmB,EACnB,YAAY,GACb,MAAM,aAAa,CAAA;AACpB,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAA;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,MAAM,UAAU,UAAU,CAAC,UAA+B;IACxD,IAAI,UAAU,CAAC,OAAO,KAAK,SAAS;QAAE,OAAO,mBAAmB,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,CAAA;IAEhG,MAAM,YAAY,GAAG,iBAAiB,CAAC,UAAU,CAAC,CAAA;IAElD,aAAa,CAAC,YAAY,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,CAAA;IAE7D,OAAO,YAAY,CAAA;AACrB,CAAC;AAED,SAAS,iBAAiB,CAAC,UAA+B;IACxD,MAAM,YAAY,GAA0B;QAC1C,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,IAAI,EAAE,oBAAoB;QAC1B,KAAK,EAAE,UAAU,CAAC,KAAK;QACvB,WAAW,EAAE,UAAU,CAAC,WAAW;QACnC,cAAc,EAAE,UAAU,CAAC,cAAc;QACzC,eAAe,EAAE,UAAU,CAAC,eAAe;QAC3C,WAAW,EAAE,UAAU,CAAC,WAAW;KACpC,CAAA;IAED,IAAI,UAAU,CAAC,SAAS,EAAE,CAAC;QACzB,YAAY,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,CAAA;IAC/C,CAAC;IAED,OAAO,YAAY,CAAA;AACrB,CAAC;AAED,SAAS,mBAAmB,CAAC,OAAe,EAAE,UAA+B;IAC3E,MAAM,mBAAmB,GAAiC;QACxD,GAAG,iBAAiB,CAAC,UAAU,CAAC;QAChC,YAAY,EAAE,SAAS;QACvB,UAAU,EAAE,OAAO;KACpB,CAAA;IAED,aAAa,CAAC,mBAAmB,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,mBAAmB,CAAC,CAAC,CAAA;IAElF,OAAO,mBAAmB,CAAA;AAC5B,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,iBAAiB,CAAC,SAAiB,EAAE,UAA+B;IAClF,OAAO,mBAAmB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAA;AACnD,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,aAAa,CAAC,EAAC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAqC;IACxF,OAAO,iBAAiB,CAAC,EAAC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,oBAAoB,EAAC,CAAC,CAAA;AAChF,CAAC"}
|
|
@@ -2,6 +2,9 @@ import type { BlueprintStudioConfig, BlueprintStudioResource } from '../types/st
|
|
|
2
2
|
/**
|
|
3
3
|
* Defines a studio.
|
|
4
4
|
*
|
|
5
|
+
* Deploying Studios via Blueprints is experimental. This may be subject to breaking changes.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
5
8
|
* ```ts
|
|
6
9
|
* defineStudio({
|
|
7
10
|
* name: 'my-studio',
|
|
@@ -12,12 +15,11 @@ import type { BlueprintStudioConfig, BlueprintStudioResource } from '../types/st
|
|
|
12
15
|
* }
|
|
13
16
|
* })
|
|
14
17
|
* ```
|
|
15
|
-
* @param
|
|
18
|
+
* @param config The studio configuration
|
|
16
19
|
* @public
|
|
17
|
-
* @beta
|
|
20
|
+
* @beta
|
|
18
21
|
* @category Definers
|
|
19
22
|
* @expandType BlueprintStudioConfig
|
|
20
23
|
* @returns The studio resource
|
|
21
|
-
* @hidden
|
|
22
24
|
*/
|
|
23
25
|
export declare function defineStudio(config: BlueprintStudioConfig): BlueprintStudioResource;
|
package/dist/definers/studios.js
CHANGED
|
@@ -3,6 +3,9 @@ import { runValidation } from '../utils/validation.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* Defines a studio.
|
|
5
5
|
*
|
|
6
|
+
* Deploying Studios via Blueprints is experimental. This may be subject to breaking changes.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
6
9
|
* ```ts
|
|
7
10
|
* defineStudio({
|
|
8
11
|
* name: 'my-studio',
|
|
@@ -13,13 +16,12 @@ import { runValidation } from '../utils/validation.js';
|
|
|
13
16
|
* }
|
|
14
17
|
* })
|
|
15
18
|
* ```
|
|
16
|
-
* @param
|
|
19
|
+
* @param config The studio configuration
|
|
17
20
|
* @public
|
|
18
|
-
* @beta
|
|
21
|
+
* @beta
|
|
19
22
|
* @category Definers
|
|
20
23
|
* @expandType BlueprintStudioConfig
|
|
21
24
|
* @returns The studio resource
|
|
22
|
-
* @hidden
|
|
23
25
|
*/
|
|
24
26
|
export function defineStudio(config) {
|
|
25
27
|
const autoUpdates = { enabled: config.autoUpdates?.enabled ?? true };
|
|
@@ -33,7 +35,7 @@ export function defineStudio(config) {
|
|
|
33
35
|
autoUpdates,
|
|
34
36
|
type: 'sanity.studio',
|
|
35
37
|
};
|
|
36
|
-
runValidation(() => validateStudio(studioResource));
|
|
38
|
+
runValidation(studioResource, () => validateStudio(studioResource));
|
|
37
39
|
return studioResource;
|
|
38
40
|
}
|
|
39
41
|
//# sourceMappingURL=studios.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"studios.js","sourceRoot":"","sources":["../../src/definers/studios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,aAAa,CAAA;AAE1C,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAA;AAEpD
|
|
1
|
+
{"version":3,"file":"studios.js","sourceRoot":"","sources":["../../src/definers/studios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,aAAa,CAAA;AAE1C,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAA;AAEpD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,YAAY,CAAC,MAA6B;IACxD,MAAM,WAAW,GAA2C,EAAC,OAAO,EAAE,MAAM,CAAC,WAAW,EAAE,OAAO,IAAI,IAAI,EAAC,CAAA;IAC1G,IAAI,MAAM,CAAC,WAAW,EAAE,OAAO,KAAK,SAAS,EAAE,CAAC;QAC9C,WAAW,CAAC,OAAO,GAAG,MAAM,CAAC,WAAW,CAAC,OAAO,CAAA;IAClD,CAAC;IAED,MAAM,cAAc,GAA4B;QAC9C,GAAG,MAAM;QACT,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI;QAChC,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,IAAI;QAClC,WAAW;QACX,IAAI,EAAE,eAAe;KACtB,CAAA;IAED,aAAa,CAAC,cAAc,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,CAAA;IAEnE,OAAO,cAAc,CAAA;AACvB,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { type BlueprintDocumentWebhookConfig, type BlueprintDocumentWebhookResou
|
|
|
2
2
|
/**
|
|
3
3
|
* Defines a webhook that is called when document changes occur.
|
|
4
4
|
*
|
|
5
|
+
* @example
|
|
5
6
|
* ```ts
|
|
6
7
|
* defineDocumentWebhook({
|
|
7
8
|
* name: 'my-webhook',
|
|
@@ -12,9 +13,26 @@ import { type BlueprintDocumentWebhookConfig, type BlueprintDocumentWebhookResou
|
|
|
12
13
|
* apiVersion: 'v2026-01-01',
|
|
13
14
|
* })
|
|
14
15
|
* ```
|
|
16
|
+
*
|
|
17
|
+
* @example All options
|
|
18
|
+
* ```ts
|
|
19
|
+
* defineDocumentWebhook({
|
|
20
|
+
* name: 'sync-webhook',
|
|
21
|
+
* url: 'https://example.com/sync',
|
|
22
|
+
* on: ['create', 'update', 'delete'],
|
|
23
|
+
* dataset: 'production',
|
|
24
|
+
* apiVersion: 'v2026-01-01',
|
|
25
|
+
* filter: "_type == 'product'",
|
|
26
|
+
* projection: '{_id, title, slug}',
|
|
27
|
+
* httpMethod: 'POST',
|
|
28
|
+
* headers: {'X-Custom-Header': 'value'},
|
|
29
|
+
* secret: 'my-webhook-secret',
|
|
30
|
+
* includeDrafts: false,
|
|
31
|
+
* status: 'enabled',
|
|
32
|
+
* })
|
|
33
|
+
* ```
|
|
15
34
|
* @param parameters The webhook configuration
|
|
16
35
|
* @public
|
|
17
|
-
* @beta Deploying Webhooks via Blueprints is experimental. This feature is stabilizing but may still be subject to breaking changes.
|
|
18
36
|
* @category Definers
|
|
19
37
|
* @expandType BlueprintDocumentWebhookConfig
|
|
20
38
|
* @returns The webhook resource
|
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
import { validateDocumentWebhook } from '../index.js';
|
|
2
2
|
import { runValidation } from '../utils/validation.js';
|
|
3
|
-
|
|
4
|
-
*
|
|
3
|
+
/**
|
|
4
|
+
* Defines a webhook that is called when document changes occur.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* defineDocumentWebhook({
|
|
9
|
+
* name: 'my-webhook',
|
|
10
|
+
* on: ['create'],
|
|
11
|
+
* url: 'https://example.com/webhook',
|
|
12
|
+
* projection: '{_id}',
|
|
13
|
+
* dataset: 'production',
|
|
14
|
+
* apiVersion: 'v2026-01-01',
|
|
15
|
+
* })
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
5
18
|
* @example All options
|
|
6
19
|
* ```ts
|
|
7
20
|
* defineDocumentWebhook({
|
|
@@ -19,37 +32,20 @@ import { runValidation } from '../utils/validation.js';
|
|
|
19
32
|
* status: 'enabled',
|
|
20
33
|
* })
|
|
21
34
|
* ```
|
|
22
|
-
*/
|
|
23
|
-
/**
|
|
24
|
-
* Defines a webhook that is called when document changes occur.
|
|
25
|
-
*
|
|
26
|
-
* ```ts
|
|
27
|
-
* defineDocumentWebhook({
|
|
28
|
-
* name: 'my-webhook',
|
|
29
|
-
* on: ['create'],
|
|
30
|
-
* url: 'https://example.com/webhook',
|
|
31
|
-
* projection: '{_id}',
|
|
32
|
-
* dataset: 'production',
|
|
33
|
-
* apiVersion: 'v2026-01-01',
|
|
34
|
-
* })
|
|
35
|
-
* ```
|
|
36
35
|
* @param parameters The webhook configuration
|
|
37
36
|
* @public
|
|
38
|
-
* @beta Deploying Webhooks via Blueprints is experimental. This feature is stabilizing but may still be subject to breaking changes.
|
|
39
37
|
* @category Definers
|
|
40
38
|
* @expandType BlueprintDocumentWebhookConfig
|
|
41
39
|
* @returns The webhook resource
|
|
42
40
|
*/
|
|
43
41
|
export function defineDocumentWebhook(parameters) {
|
|
44
|
-
// default the display name
|
|
45
|
-
if (!parameters.displayName) {
|
|
46
|
-
parameters.displayName = parameters.name.substring(0, 100);
|
|
47
|
-
}
|
|
48
42
|
const webhookResource = {
|
|
49
43
|
...parameters,
|
|
44
|
+
// default the display name
|
|
45
|
+
displayName: parameters.displayName || parameters.name.substring(0, 100),
|
|
50
46
|
type: 'sanity.project.webhook',
|
|
51
47
|
};
|
|
52
|
-
runValidation(() => validateDocumentWebhook(webhookResource));
|
|
48
|
+
runValidation(webhookResource, () => validateDocumentWebhook(webhookResource));
|
|
53
49
|
return webhookResource;
|
|
54
50
|
}
|
|
55
51
|
//# sourceMappingURL=webhooks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../src/definers/webhooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6E,uBAAuB,EAAC,MAAM,aAAa,CAAA;AAC/H,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAA;AAEpD
|
|
1
|
+
{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../src/definers/webhooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6E,uBAAuB,EAAC,MAAM,aAAa,CAAA;AAC/H,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAA;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,UAAU,qBAAqB,CAAC,UAA0C;IAC9E,MAAM,eAAe,GAAqC;QACxD,GAAG,UAAU;QACb,2BAA2B;QAC3B,WAAW,EAAE,UAAU,CAAC,WAAW,IAAI,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC;QACxE,IAAI,EAAE,wBAAwB;KAC/B,CAAA;IAED,aAAa,CAAC,eAAe,EAAE,GAAG,EAAE,CAAC,uBAAuB,CAAC,eAAe,CAAC,CAAC,CAAA;IAE9E,OAAO,eAAe,CAAA;AACxB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
*
|
|
2
4
|
* @categoryDescription Definers
|
|
3
5
|
* These functions are used to define resources in a Blueprint.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
*
|
|
7
|
+
* @categoryDescription Application Children
|
|
8
|
+
* These functions define the views and web workers of an application. Pass them to `defineApplication`.
|
|
9
|
+
*
|
|
6
10
|
* @categoryDescription Referencers
|
|
7
11
|
* These functions are used to reference resources in another Blueprint.
|
|
12
|
+
*
|
|
13
|
+
* @categoryDescription Resource Types
|
|
14
|
+
* These types are used to define the shape of resources in a Blueprint.
|
|
15
|
+
*
|
|
16
|
+
* @categoryDescription Functions Types
|
|
17
|
+
* Resource types for functions in a Blueprint.
|
|
18
|
+
*
|
|
19
|
+
* @categoryDescription Validation
|
|
20
|
+
* These functions are used to validate resources in a Blueprint.
|
|
21
|
+
*
|
|
22
|
+
* @categoryDescription Blueprint Internals
|
|
23
|
+
* Shared types that Blueprints and resources are built on. Definers and resource types use them, so most code does not need to import them.
|
|
8
24
|
*/
|
|
9
25
|
export * from './definers/agents.js';
|
|
10
26
|
export * from './definers/applications.js';
|
|
@@ -29,14 +45,6 @@ export * from './definers/robotTokens.js';
|
|
|
29
45
|
export * from './definers/roles.js';
|
|
30
46
|
export * from './definers/studios.js';
|
|
31
47
|
export * from './definers/webhooks.js';
|
|
32
|
-
/**
|
|
33
|
-
* @categoryDescription Resource Types
|
|
34
|
-
* These types are used to define the shape of resources in a Blueprint.
|
|
35
|
-
*/
|
|
36
|
-
/**
|
|
37
|
-
* @categoryDescription Functions Types
|
|
38
|
-
* Resource types for functions in a Blueprint.
|
|
39
|
-
*/
|
|
40
48
|
export * from './types/agents.js';
|
|
41
49
|
export * from './types/applications.js';
|
|
42
50
|
export * from './types/blueprints.js';
|
|
@@ -54,10 +62,6 @@ export * from './types/robotTokens.js';
|
|
|
54
62
|
export * from './types/roles.js';
|
|
55
63
|
export * from './types/studios.js';
|
|
56
64
|
export * from './types/webhooks.js';
|
|
57
|
-
/**
|
|
58
|
-
* @categoryDescription Validation
|
|
59
|
-
* These functions are used to validate resources in a Blueprint.
|
|
60
|
-
*/
|
|
61
65
|
export * from './validation/agents.js';
|
|
62
66
|
export * from './validation/applications.js';
|
|
63
67
|
export * from './validation/blueprints.js';
|
|
@@ -74,7 +78,3 @@ export * from './validation/robotTokens.js';
|
|
|
74
78
|
export * from './validation/roles.js';
|
|
75
79
|
export * from './validation/studios.js';
|
|
76
80
|
export * from './validation/webhooks.js';
|
|
77
|
-
/**
|
|
78
|
-
* @categoryDescription Blueprint Internals
|
|
79
|
-
* Miscellaneous Blueprint types that make up the public API but are not exported directly.
|
|
80
|
-
*/
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,28 @@
|
|
|
1
|
-
// DEFINERS - helper functions to create resources
|
|
2
1
|
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
*
|
|
3
4
|
* @categoryDescription Definers
|
|
4
5
|
* These functions are used to define resources in a Blueprint.
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
*
|
|
7
|
+
* @categoryDescription Application Children
|
|
8
|
+
* These functions define the views and web workers of an application. Pass them to `defineApplication`.
|
|
9
|
+
*
|
|
7
10
|
* @categoryDescription Referencers
|
|
8
11
|
* These functions are used to reference resources in another Blueprint.
|
|
12
|
+
*
|
|
13
|
+
* @categoryDescription Resource Types
|
|
14
|
+
* These types are used to define the shape of resources in a Blueprint.
|
|
15
|
+
*
|
|
16
|
+
* @categoryDescription Functions Types
|
|
17
|
+
* Resource types for functions in a Blueprint.
|
|
18
|
+
*
|
|
19
|
+
* @categoryDescription Validation
|
|
20
|
+
* These functions are used to validate resources in a Blueprint.
|
|
21
|
+
*
|
|
22
|
+
* @categoryDescription Blueprint Internals
|
|
23
|
+
* Shared types that Blueprints and resources are built on. Definers and resource types use them, so most code does not need to import them.
|
|
9
24
|
*/
|
|
25
|
+
// DEFINERS - helper functions to create resources
|
|
10
26
|
export * from './definers/agents.js';
|
|
11
27
|
export * from './definers/applications.js';
|
|
12
28
|
export * from './definers/blueprints.js';
|
|
@@ -31,14 +47,6 @@ export * from './definers/roles.js';
|
|
|
31
47
|
export * from './definers/studios.js';
|
|
32
48
|
export * from './definers/webhooks.js';
|
|
33
49
|
// TYPES - base types for all resources
|
|
34
|
-
/**
|
|
35
|
-
* @categoryDescription Resource Types
|
|
36
|
-
* These types are used to define the shape of resources in a Blueprint.
|
|
37
|
-
*/
|
|
38
|
-
/**
|
|
39
|
-
* @categoryDescription Functions Types
|
|
40
|
-
* Resource types for functions in a Blueprint.
|
|
41
|
-
*/
|
|
42
50
|
export * from './types/agents.js';
|
|
43
51
|
export * from './types/applications.js';
|
|
44
52
|
export * from './types/blueprints.js';
|
|
@@ -57,10 +65,6 @@ export * from './types/roles.js';
|
|
|
57
65
|
export * from './types/studios.js';
|
|
58
66
|
export * from './types/webhooks.js';
|
|
59
67
|
// VALIDATION - validation for all resources
|
|
60
|
-
/**
|
|
61
|
-
* @categoryDescription Validation
|
|
62
|
-
* These functions are used to validate resources in a Blueprint.
|
|
63
|
-
*/
|
|
64
68
|
export * from './validation/agents.js';
|
|
65
69
|
export * from './validation/applications.js';
|
|
66
70
|
export * from './validation/blueprints.js';
|
|
@@ -77,9 +81,4 @@ export * from './validation/robotTokens.js';
|
|
|
77
81
|
export * from './validation/roles.js';
|
|
78
82
|
export * from './validation/studios.js';
|
|
79
83
|
export * from './validation/webhooks.js';
|
|
80
|
-
// Public BLUEPRINTS INTERNALS - published bucket of misc Blueprint types
|
|
81
|
-
/**
|
|
82
|
-
* @categoryDescription Blueprint Internals
|
|
83
|
-
* Miscellaneous Blueprint types that make up the public API but are not exported directly.
|
|
84
|
-
*/
|
|
85
84
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,kDAAkD;AAClD,cAAc,sBAAsB,CAAA;AACpC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,0BAA0B,CAAA;AACxC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,wBAAwB,CAAA;AACtC,cAAc,kCAAkC,CAAA;AAChD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,uCAAuC,CAAA;AACrD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,mCAAmC,CAAA;AACjD,cAAc,6CAA6C,CAAA;AAC3D,cAAc,mCAAmC,CAAA;AACjD,cAAc,2BAA2B,CAAA;AACzC,cAAc,wBAAwB,CAAA;AACtC,cAAc,yBAAyB,CAAA;AACvC,cAAc,sBAAsB,CAAA;AACpC,cAAc,2BAA2B,CAAA;AACzC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AAEtC,uCAAuC;AACvC,cAAc,mBAAmB,CAAA;AACjC,cAAc,yBAAyB,CAAA;AACvC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,qBAAqB,CAAA;AACnC,cAAc,mBAAmB,CAAA;AACjC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA;AACjC,cAAc,wBAAwB,CAAA;AACtC,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AAEnC,4CAA4C;AAC5C,cAAc,wBAAwB,CAAA;AACtC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA;AACxC,cAAc,2BAA2B,CAAA;AACzC,cAAc,qCAAqC,CAAA;AACnD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,0BAA0B,CAAA;AACxC,cAAc,2BAA2B,CAAA;AACzC,cAAc,wBAAwB,CAAA;AACtC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA"}
|
package/dist/resolve/index.d.ts
CHANGED
|
@@ -6,11 +6,10 @@
|
|
|
6
6
|
* {@link readStack} reads remote stack.
|
|
7
7
|
*
|
|
8
8
|
* This entry point imports Node built-ins, so it is separate from `@sanity/blueprints`.
|
|
9
|
-
*
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
9
|
+
*
|
|
12
10
|
* @categoryDescription Resolve
|
|
13
11
|
* These functions read a blueprint from disk, resolve the Stack it deploys to, and read that Stack from the Blueprints API.
|
|
12
|
+
* @module
|
|
14
13
|
*/
|
|
15
14
|
export { BLUEPRINT_FILE_NAMES, findBlueprintFile, loadBlueprintFile, readBlueprint, } from './load.js';
|
|
16
15
|
export { DEFAULT_BLUEPRINTS_API_VERSION, readStack, } from './stack.js';
|
package/dist/resolve/index.js
CHANGED
|
@@ -6,11 +6,10 @@
|
|
|
6
6
|
* {@link readStack} reads remote stack.
|
|
7
7
|
*
|
|
8
8
|
* This entry point imports Node built-ins, so it is separate from `@sanity/blueprints`.
|
|
9
|
-
*
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
9
|
+
*
|
|
12
10
|
* @categoryDescription Resolve
|
|
13
11
|
* These functions read a blueprint from disk, resolve the Stack it deploys to, and read that Stack from the Blueprints API.
|
|
12
|
+
* @module
|
|
14
13
|
*/
|
|
15
14
|
export { BLUEPRINT_FILE_NAMES, findBlueprintFile, loadBlueprintFile, readBlueprint, } from './load.js';
|
|
16
15
|
export { DEFAULT_BLUEPRINTS_API_VERSION, readStack, } from './stack.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resolve/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resolve/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,GACd,MAAM,WAAW,CAAA;AAClB,OAAO,EACL,8BAA8B,EAC9B,SAAS,GACV,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,GAChB,MAAM,mBAAmB,CAAA;AAC1B,cAAc,YAAY,CAAA"}
|