@cloudcannon/configuration-types 0.0.19 → 0.0.21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudcannon/configuration-types",
3
- "version": "0.0.19",
3
+ "version": "0.0.21",
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",
@@ -88,18 +88,25 @@ export interface ReaderConfiguration extends Configuration {
88
88
  output?: string;
89
89
  }
90
90
 
91
- export interface BuildCoupledCollectionConfig extends Omit<CollectionConfig, 'url'>, Filterable {
91
+ export interface BuildCoupledCollectionConfig
92
+ extends Omit<CollectionConfig, 'url' | 'path'>,
93
+ Filterable {
92
94
  /**
93
95
  * Overrides the default singular input key of the collection. This is used for naming conventions
94
96
  * for select and multiselect inputs.
95
97
  */
96
98
  singular_key?: string;
99
+ /**
100
+ * The top-most folder where the files in this collection are stored. It is relative to `source`.
101
+ */
102
+ path?: string;
97
103
  }
98
104
 
99
105
  interface BuildCoupledConfiguration
100
- extends Omit<Configuration, 'data_config'>,
106
+ extends Omit<Configuration, 'data_config' | 'collections_config'>,
101
107
  WithCollectionsConfigOverride {
102
108
  paths?: BuildCoupledPaths;
109
+ collections_config?: BuildCoupledCollectionConfig;
103
110
  }
104
111
 
105
112
  /**
@@ -137,11 +144,11 @@ export type EleventyConfiguration = JekyllConfiguration;
137
144
  export type ParsedDataset =
138
145
  | string[]
139
146
  | Record<string, string>
140
- | Record<string, Record<string, any>>
141
- | Record<string, any>[];
147
+ | Record<string, Record<string, unknown>>
148
+ | Record<string, unknown>[];
142
149
 
143
150
  interface ParsedCollectionItem {
144
- [index: string]: any;
151
+ [index: string]: unknown;
145
152
  /**
146
153
  * The path to the file this was parsed from.
147
154
  */
@@ -149,7 +156,7 @@ interface ParsedCollectionItem {
149
156
  /**
150
157
  * The collection key this is assigned to. Matches keys in `collections_config`.
151
158
  */
152
- collection: string;
159
+ collection?: string;
153
160
  /**
154
161
  * The URL this file is served at once built.
155
162
  */
@@ -201,12 +208,12 @@ interface WithIntegrationOutput {
201
208
  /**
202
209
  * The output from build-coupled non-Jekyll/Hugo/Eleventy sites.
203
210
  */
204
- export interface IntegrationOutput extends Configuration, WithIntegrationOutput {}
211
+ export type IntegrationOutput = Configuration & WithIntegrationOutput;
205
212
 
206
213
  /**
207
214
  * The output from build-coupled Hugo sites.
208
215
  */
209
- export interface HugoIntegrationOutput extends HugoConfiguration, WithIntegrationOutput {}
216
+ export type HugoIntegrationOutput = HugoConfiguration & WithIntegrationOutput;
210
217
 
211
218
  /**
212
219
  * The output from build-coupled Jekyll sites.
@@ -221,4 +228,4 @@ export interface JekyllIntegrationOutput extends JekyllConfiguration, WithIntegr
221
228
  /**
222
229
  * The output from build-coupled Eleventy sites.
223
230
  */
224
- export interface EleventyIntegrationOutput extends EleventyConfiguration, WithIntegrationOutput {}
231
+ export type EleventyIntegrationOutput = EleventyConfiguration & WithIntegrationOutput;