@cloudcannon/configuration-types 0.0.17 → 0.0.19

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schema.cloudcannon.com/cloudcannon-config.schema.json",
2
+ "$id": "https://github.com/cloudcannon/configuration-types/releases/latest/download/cloudcannon-config.schema.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "additionalProperties": false,
5
5
  "definitions": {
@@ -230,6 +230,24 @@
230
230
  "markdownDescription": "Optionally changes the text above this input.",
231
231
  "type": "string"
232
232
  },
233
+ "options": {
234
+ "anyOf": [
235
+ {
236
+ "$ref": "#/definitions/WithEmptyTypeText"
237
+ },
238
+ {
239
+ "$ref": "#/definitions/WithEmptyTypeNumber"
240
+ },
241
+ {
242
+ "$ref": "#/definitions/WithEmptyTypeObject"
243
+ },
244
+ {
245
+ "$ref": "#/definitions/WithEmptyTypeArray"
246
+ }
247
+ ],
248
+ "description": "Options that are specific to this `type` of input.",
249
+ "markdownDescription": "Options that are specific to this `type` of input."
250
+ },
233
251
  "type": {
234
252
  "anyOf": [
235
253
  {
@@ -8288,6 +8306,39 @@
8288
8306
  },
8289
8307
  "type": "object"
8290
8308
  },
8309
+ "WithEmptyTypeArray": {
8310
+ "additionalProperties": false,
8311
+ "properties": {
8312
+ "empty_type": {
8313
+ "$ref": "#/definitions/EmptyTypeArray",
8314
+ "description": "Set how an ‘empty’ value will be saved. Does not apply to existing empty values.",
8315
+ "markdownDescription": "Set how an ‘empty’ value will be saved. Does not apply to existing empty values."
8316
+ }
8317
+ },
8318
+ "type": "object"
8319
+ },
8320
+ "WithEmptyTypeNumber": {
8321
+ "additionalProperties": false,
8322
+ "properties": {
8323
+ "empty_type": {
8324
+ "$ref": "#/definitions/EmptyTypeNumber",
8325
+ "description": "Set how an ‘empty’ value will be saved. Does not apply to existing empty values.",
8326
+ "markdownDescription": "Set how an ‘empty’ value will be saved. Does not apply to existing empty values."
8327
+ }
8328
+ },
8329
+ "type": "object"
8330
+ },
8331
+ "WithEmptyTypeObject": {
8332
+ "additionalProperties": false,
8333
+ "properties": {
8334
+ "empty_type": {
8335
+ "$ref": "#/definitions/EmptyTypeObject",
8336
+ "description": "Set how an ‘empty’ value will be saved. Does not apply to existing empty values.",
8337
+ "markdownDescription": "Set how an ‘empty’ value will be saved. Does not apply to existing empty values."
8338
+ }
8339
+ },
8340
+ "type": "object"
8341
+ },
8291
8342
  "WithEmptyTypeText": {
8292
8343
  "additionalProperties": false,
8293
8344
  "properties": {
@@ -8300,6 +8351,8 @@
8300
8351
  "type": "object"
8301
8352
  }
8302
8353
  },
8354
+ "description": "The base format for the configuration file.",
8355
+ "markdownDescription": "The base format for the configuration file.",
8303
8356
  "properties": {
8304
8357
  "_array_structures": {
8305
8358
  "additionalProperties": {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudcannon/configuration-types",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "description": "Contains TypeScript declarations and generates JSONSchema files for the CloudCannon configuration file.",
5
5
  "author": "CloudCannon <support@cloudcannon.com>",
6
6
  "license": "MIT",
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "scripts": {
21
21
  "prebuild": "rimraf dist && mkdir -p dist",
22
- "build": "ts-json-schema-generator --no-top-ref --markdown-description --path src/index.d.ts --type Configuration --out dist/cloudcannon-config.schema.json --id 'https://schema.cloudcannon.com/cloudcannon-config.schema.json'",
22
+ "build": "ts-json-schema-generator --no-top-ref --markdown-description --path src/index.d.ts --type Configuration --out dist/cloudcannon-config.schema.json --id 'https://github.com/cloudcannon/configuration-types/releases/latest/download/cloudcannon-config.schema.json'",
23
23
  "lint": "npm run lint:tsc && npm run lint:format",
24
24
  "lint:tsc": "tsc --noEmit",
25
25
  "lint:format": "prettier -c src",
@@ -595,6 +595,10 @@ interface WithEmptyTypeArray {
595
595
 
596
596
  export interface BaseInput {
597
597
  type?: InputType | undefined | null;
598
+ /**
599
+ * Options that are specific to this `type` of input.
600
+ */
601
+ options?: WithEmptyTypeText | WithEmptyTypeNumber | WithEmptyTypeObject | WithEmptyTypeArray;
598
602
  /**
599
603
  * Changes the subtext below the _Label_. Has no default. Supports a limited set of Markdown:
600
604
  * links, bold, italic, subscript, superscript, and inline code elements are allowed.
@@ -1598,6 +1602,9 @@ export type SsgKey =
1598
1602
  | 'legacy'
1599
1603
  | 'other';
1600
1604
 
1605
+ /**
1606
+ * The base format for the configuration file.
1607
+ */
1601
1608
  export interface Configuration extends Cascade, WithSnippets, WithPaths {
1602
1609
  /**
1603
1610
  * Base path to your site source files, relative to the root folder.
package/src/index.d.ts CHANGED
@@ -3,5 +3,6 @@ export type * from './timezone';
3
3
  export type * from './mime-type';
4
4
  export type * from './theme';
5
5
  export type * from './syntax';
6
+ export type * from './markdown';
6
7
  export type * from './configuration';
7
8
  export type * from './build-coupled';