@hygraph/cli 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/define.js CHANGED
@@ -1,315 +1,2 @@
1
- import { t as __exportAll } from "./rolldown-runtime.js";
2
- import { t as isEmpty } from "./is-empty.js";
3
- //#region src/define/not-implemented.ts
4
- /**
5
- * Every builder is declared so the authoring surface is fixed, but none of
6
- * them are implemented yet. They throw rather than returning a half-shaped
7
- * object: a config that silently produced the wrong schema would be worse
8
- * than one that refuses to load.
9
- */
10
- function notImplemented(builder) {
11
- throw new Error(`${builder} is not implemented yet`);
12
- }
13
- //#endregion
14
- //#region src/define/fields/asset.ts
15
- /** A reference to the Asset model. Its reverse is hidden and never exposed. */
16
- function asset$1(_options) {
17
- return notImplemented("define.field.asset");
18
- }
19
- //#endregion
20
- //#region src/define/fields/boolean.ts
21
- /** True or false. Can drive a `visibilityCondition`. */
22
- function boolean(_options) {
23
- return notImplemented("define.field.boolean");
24
- }
25
- //#endregion
26
- //#region src/define/fields/color.ts
27
- /** A colour value. */
28
- function color(_options) {
29
- return notImplemented("define.field.color");
30
- }
31
- //#endregion
32
- //#region src/define/fields/component.ts
33
- /** An instance of one component. */
34
- function component$1(_options) {
35
- return notImplemented("define.field.component");
36
- }
37
- //#endregion
38
- //#region src/define/fields/componentUnion.ts
39
- /** A choice of components. Members are replaced wholesale on update. */
40
- function componentUnion(_options) {
41
- return notImplemented("define.field.componentUnion");
42
- }
43
- //#endregion
44
- //#region src/define/fields/date.ts
45
- /** A date. `initialValue` is an ISO string. */
46
- function date(_options) {
47
- return notImplemented("define.field.date");
48
- }
49
- //#endregion
50
- //#region src/define/fields/dateTime.ts
51
- /** A date and time. `initialValue` is an ISO string. */
52
- function dateTime(_options) {
53
- return notImplemented("define.field.dateTime");
54
- }
55
- //#endregion
56
- //#region src/define/fields/enumeration.ts
57
- /** A value from an enumeration. Takes the enumeration itself, not a lambda. */
58
- function enumeration$1(_options) {
59
- return notImplemented("define.field.enumeration");
60
- }
61
- //#endregion
62
- //#region src/define/fields/float.ts
63
- /** Decimal number. `validations`: range, listItemCount. */
64
- function float(_options) {
65
- return notImplemented("define.field.float");
66
- }
67
- //#endregion
68
- //#region src/define/fields/int.ts
69
- /** Whole number. `validations`: range, listItemCount. */
70
- function int(_options) {
71
- return notImplemented("define.field.int");
72
- }
73
- //#endregion
74
- //#region src/define/fields/json.ts
75
- /** Arbitrary JSON. */
76
- function json(_options) {
77
- return notImplemented("define.field.json");
78
- }
79
- //#endregion
80
- //#region src/define/fields/location.ts
81
- /** A latitude and longitude. */
82
- function location(_options) {
83
- return notImplemented("define.field.location");
84
- }
85
- //#endregion
86
- //#region src/define/fields/markdown.ts
87
- /** The Markdown editor. Same validations as `singleLine`. */
88
- function markdown(_options) {
89
- return notImplemented("define.field.markdown");
90
- }
91
- //#endregion
92
- //#region src/define/fields/multiLine.ts
93
- /** The text area editor. Same validations as `singleLine`. */
94
- function multiLine(_options) {
95
- return notImplemented("define.field.multiLine");
96
- }
97
- //#endregion
98
- //#region src/define/fields/referenceOneWay.ts
99
- /** Visible from this side only. Hygraph keeps a hidden reverse that is never diffed. Allowed on components. */
100
- function referenceOneWay(_options) {
101
- return notImplemented("define.field.referenceOneWay");
102
- }
103
- //#endregion
104
- //#region src/define/fields/referenceTwoWay.ts
105
- /** Both sides declared. The partner on `to` must point back through `reverse`. Models only. */
106
- function referenceTwoWay(_options) {
107
- return notImplemented("define.field.referenceTwoWay");
108
- }
109
- //#endregion
110
- //#region src/define/fields/referenceUnion.ts
111
- /** A reference to several models. On models every member declares `unionMember`. */
112
- function referenceUnion(_options) {
113
- return notImplemented("define.field.referenceUnion");
114
- }
115
- //#endregion
116
- //#region src/define/fields/remote.ts
117
- /** A field resolved from a remote source. `visibility` defaults to READ_ONLY. */
118
- function remote(_options) {
119
- return notImplemented("define.field.remote");
120
- }
121
- //#endregion
122
- //#region src/define/fields/richText.ts
123
- /** Rich text. `embeds` enables embedding; `actions` picks the toolbar. */
124
- function richText(_options) {
125
- return notImplemented("define.field.richText");
126
- }
127
- //#endregion
128
- //#region src/define/fields/singleLine.ts
129
- /** One line of text. `validations`: characters, matches, notMatches, listItemCount. */
130
- function singleLine(_options) {
131
- return notImplemented("define.field.singleLine");
132
- }
133
- //#endregion
134
- //#region src/define/fields/slug.ts
135
- /** The slug editor. Adds `lowercase`, `autoGenerate` and `template`, e.g. `"{title}"`. */
136
- function slug(_options) {
137
- return notImplemented("define.field.slug");
138
- }
139
- //#endregion
140
- //#region src/define/fields/string.ts
141
- /** Text rendered by an installed app's element. `renderer` is required. */
142
- function string(_options) {
143
- return notImplemented("define.field.string");
144
- }
145
- //#endregion
146
- //#region src/define/fields/taxonomy.ts
147
- /** A node from a taxonomy. `localized` is not available in v1. */
148
- function taxonomy$1(_options) {
149
- return notImplemented("define.field.taxonomy");
150
- }
151
- //#endregion
152
- //#region src/define/fields/unionMember.ts
153
- /** The slot a union's member model declares. All members share one `apiId`. Models only. */
154
- function unionMember(_options) {
155
- return notImplemented("define.field.unionMember");
156
- }
157
- //#endregion
158
- //#region src/define/fields/vector.ts
159
- /** An embedding. `dimension` is required (1 to 3072); `index` is refused above 2000. */
160
- function vector(_options) {
161
- return notImplemented("define.field.vector");
162
- }
163
- //#endregion
164
- //#region src/define/fields/index.ts
165
- var fields_exports = /* @__PURE__ */ __exportAll({
166
- asset: () => asset$1,
167
- boolean: () => boolean,
168
- color: () => color,
169
- component: () => component$1,
170
- componentUnion: () => componentUnion,
171
- date: () => date,
172
- dateTime: () => dateTime,
173
- enumeration: () => enumeration$1,
174
- float: () => float,
175
- int: () => int,
176
- json: () => json,
177
- location: () => location,
178
- markdown: () => markdown,
179
- multiLine: () => multiLine,
180
- referenceOneWay: () => referenceOneWay,
181
- referenceTwoWay: () => referenceTwoWay,
182
- referenceUnion: () => referenceUnion,
183
- remote: () => remote,
184
- richText: () => richText,
185
- singleLine: () => singleLine,
186
- slug: () => slug,
187
- string: () => string,
188
- taxonomy: () => taxonomy$1,
189
- unionMember: () => unionMember,
190
- vector: () => vector
191
- });
192
- //#endregion
193
- //#region src/define/resources/component.ts
194
- /** Same options as `model` minus `sidebar`; no two-way references or union members. */
195
- function component(_options) {
196
- return notImplemented("define.component");
197
- }
198
- //#endregion
199
- //#region src/define/resources/enumeration.ts
200
- function enumeration(_options) {
201
- return notImplemented("define.enumeration");
202
- }
203
- //#endregion
204
- //#region src/define/resources/model.ts
205
- /**
206
- * One model.
207
- *
208
- * Nothing here is validated. Format rules, `apiIdPlural` against `apiId` and
209
- * uniqueness are plan-time checks, reported together rather than thrown one
210
- * at a time while the config loads.
211
- */
212
- function model(input) {
213
- return {
214
- __typename: "Model",
215
- apiId: input.apiId,
216
- apiIdPlural: input.apiIdPlural,
217
- displayName: input.displayName,
218
- description: isEmpty(input.description) ? null : input.description
219
- };
220
- }
221
- //#endregion
222
- //#region src/define/resources/environment.ts
223
- /**
224
- * One environment: typed arrays per resource kind. The what.
225
- *
226
- * Ordering, keying and positions are not decided here. This returns the
227
- * models as written; `convertToIR` turns them into the canonical form.
228
- */
229
- function environment(input) {
230
- return {
231
- __typename: "Environment",
232
- models: [...input.models]
233
- };
234
- }
235
- //#endregion
236
- //#region src/define/resources/graphqlRemoteSource.ts
237
- function graphqlRemoteSource(_options) {
238
- return notImplemented("define.graphqlRemoteSource");
239
- }
240
- //#endregion
241
- //#region src/define/resources/locale.ts
242
- function locale(_options) {
243
- return notImplemented("define.locale");
244
- }
245
- //#endregion
246
- //#region src/define/resources/restRemoteSource.ts
247
- function restRemoteSource(_options) {
248
- return notImplemented("define.restRemoteSource");
249
- }
250
- //#endregion
251
- //#region src/define/resources/stage.ts
252
- function stage(_options) {
253
- return notImplemented("define.stage");
254
- }
255
- //#endregion
256
- //#region src/define/resources/target.ts
257
- /**
258
- * One environment of one project, where to reach it and the token to do so,
259
- * and the environment definition to apply there. The where.
260
- */
261
- function target(input) {
262
- return {
263
- __typename: "Target",
264
- name: input.name,
265
- project: input.project.replace(/-/g, ""),
266
- environment: input.environment,
267
- endpoint: input.endpoint,
268
- token: input.token,
269
- apply: input.apply
270
- };
271
- }
272
- //#endregion
273
- //#region src/define/resources/taxonomy.ts
274
- function taxonomy(_options) {
275
- return notImplemented("define.taxonomy");
276
- }
277
- //#endregion
278
- //#region src/define/index.ts
279
- var define_exports = /* @__PURE__ */ __exportAll({
280
- component: () => component,
281
- enumeration: () => enumeration,
282
- environment: () => environment,
283
- field: () => fields_exports,
284
- graphqlRemoteSource: () => graphqlRemoteSource,
285
- locale: () => locale,
286
- model: () => model,
287
- restRemoteSource: () => restRemoteSource,
288
- stage: () => stage,
289
- target: () => target,
290
- taxonomy: () => taxonomy
291
- });
292
- //#endregion
293
- //#region src/define/system/asset.ts
294
- function asset(_options) {
295
- return notImplemented("system.asset");
296
- }
297
- //#endregion
298
- //#region src/define/system/query.ts
299
- function query(_options) {
300
- return notImplemented("system.query");
301
- }
302
- //#endregion
303
- //#region src/define/system/segment.ts
304
- function segment(_options) {
305
- return notImplemented("system.segment");
306
- }
307
- //#endregion
308
- //#region src/define/system/index.ts
309
- var system_exports = /* @__PURE__ */ __exportAll({
310
- asset: () => asset,
311
- query: () => query,
312
- segment: () => segment
313
- });
314
- //#endregion
1
+ import { r as define_exports, t as system_exports } from "./define2.js";
315
2
  export { define_exports as define, system_exports as system };