@adobe/helix-admin-support 1.2.1 → 1.3.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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [1.3.0](https://github.com/adobe/helix-admin-support/compare/v1.2.1...v1.3.0) (2022-08-13)
2
+
3
+
4
+ ### Features
5
+
6
+ * improve exports ([#58](https://github.com/adobe/helix-admin-support/issues/58)) ([283d642](https://github.com/adobe/helix-admin-support/commit/283d642f07397dc3d7149887713d2b8350e7f938))
7
+
1
8
  ## [1.2.1](https://github.com/adobe/helix-admin-support/compare/v1.2.0...v1.2.1) (2022-08-12)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-admin-support",
3
- "version": "1.2.1",
3
+ "version": "1.3.0",
4
4
  "description": "Helix Admin Support Library",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -9,17 +9,17 @@
9
9
  * OF ANY KIND, either express or implied. See the License for the specific language
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
- import {AdminContext, ModifierSheet, PathInfo} from './index';
12
+ import { ModifierMap } from '@adobe/helix-shared-config';
13
+ import {AdminContext, PathInfo} from './index';
13
14
  import { ProjectConfig } from './fetch-config';
14
15
 
15
-
16
- export declare interface ProjectConfigData {
16
+ export declare interface ProjectConfigEntry {
17
17
  data: ProjectConfig;
18
18
  lastModified: string;
19
19
  }
20
20
 
21
- export declare interface ModifierSheetData {
22
- data: ModifierSheet;
21
+ export declare interface ModifierConfigEntry {
22
+ data: ModifierMap;
23
23
  lastModified: string;
24
24
  }
25
25
 
@@ -30,17 +30,17 @@ export declare interface ConfigAll {
30
30
  /**
31
31
  * Project config (from /.helix/config.json)
32
32
  */
33
- config?:ProjectConfigData;
33
+ config?:ProjectConfigEntry;
34
34
 
35
35
  /**
36
36
  * Metadata (from /metadata.json)
37
37
  */
38
- metadata?:ModifierSheet;
38
+ metadata?:ModifierConfigEntry;
39
39
 
40
40
  /**
41
41
  * Headers modifier (from /.helix/config.json)
42
42
  */
43
- headers?:ModifierSheet;
43
+ headers?:ModifierConfigEntry;
44
44
  }
45
45
 
46
46
  /**
@@ -48,6 +48,6 @@ export declare interface ConfigAll {
48
48
  * and stores it in the context as projectConfig.
49
49
  * @param {AdminContext} ctx the context
50
50
  * @param {PathInfo} info path info
51
- * @returns {Promise<object>} the project configuration
51
+ * @returns {Promise<ConfigAll>} the project configuration
52
52
  */
53
- export function fetchConfigAll(ctx: AdminContext, info:PathInfo): Promise<ProjectConfig>;
53
+ export function fetchConfigAll(ctx: AdminContext, info:PathInfo): Promise<ConfigAll>;
package/src/index.d.ts CHANGED
@@ -20,16 +20,16 @@ declare interface IgnoreConfig {}
20
20
  declare interface IndexConfig {}
21
21
  declare interface SitemapConfig {}
22
22
 
23
- export { fetchProjectConfig } from './fetch-config';
24
- export { fetchConfigAll } from './fetch-config-all';
25
- export { getContentBusId } from './contentbus';
26
- export { fetchCrontab } from './fetch-crontab';
27
- export { fetchFstab } from './fetch-fstab';
28
- export { fetchIgnore } from './fetch-ignore';
29
- export { fetchIndex } from './fetch-index';
30
- export { fetchS3 } from './fetch-s3';
31
- export { fetchSitemap } from './fetch-sitemap';
32
- export { flatJson2object } from './flatJson2Object';
23
+ export * from './fetch-config-all';
24
+ export * from './fetch-config';
25
+ export * from './contentbus';
26
+ export * from './fetch-crontab';
27
+ export * from './fetch-fstab';
28
+ export * from './fetch-ignore';
29
+ export * from './fetch-index';
30
+ export * from './fetch-s3';
31
+ export * from './fetch-sitemap';
32
+ export * from './flatJson2Object';
33
33
 
34
34
  export declare interface ErrorResponse {
35
35
  /**
@@ -224,36 +224,3 @@ export declare interface AdminContext extends UniversalContext {
224
224
  data?:object;
225
225
  }
226
226
 
227
- /**
228
- * Structure that groups name value pairs by url, used as modifier sheet, for example
229
- * in metadata.json or headers.json
230
- *
231
- * @example
232
- *
233
- * | url | key | value | Title | Description |
234
- * |-------|-----|-------|---------|----------------|
235
- * | "/*" | "A" | "B" | "" | "" |
236
- * | "/*" | "C" | "D" | "" | "" |
237
- * | "/f" | "" | "" | "Hero" | "Once upon..." |
238
- *
239
- * becomes:
240
- *
241
- * {
242
- * "/*": [
243
- * { "key": "A", "value": "B" },
244
- * { "key": "C", "value": "D" },
245
- * ],
246
- * "/f": [
247
- * { "key": "title", "value": "Hero" },
248
- * { "key": "description", "value": "Once upon..." },
249
- * ]
250
- * }
251
- */
252
- export declare interface ModifierSheet {
253
- [ModifierUrl:string]: Modifier[];
254
- }
255
-
256
- export declare interface Modifier {
257
- key: string;
258
- value: string;
259
- }