@c-time/frelio-dependency-map 1.0.0 → 1.2.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/dist/guards.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import type { DependencyMap, ValidationResult } from './types.js';
1
+ import type { FrelioDependencyMap, ValidationResult } from './types.js';
2
2
  /**
3
- * Type guard to check if a value is a valid DependencyMap
3
+ * Type guard to check if a value is a valid FrelioDependencyMap
4
4
  */
5
- export declare function isDependencyMap(value: unknown): value is DependencyMap;
5
+ export declare function isFrelioDependencyMap(value: unknown): value is FrelioDependencyMap;
6
6
  /**
7
- * Validates a value as a DependencyMap and returns detailed errors
7
+ * Validates a value as a FrelioDependencyMap and returns detailed errors
8
8
  */
9
- export declare function validateDependencyMap(value: unknown): ValidationResult;
9
+ export declare function validateFrelioDependencyMap(value: unknown): ValidationResult;
package/dist/guards.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
- * Type guard to check if a value is a valid DependencyMap
2
+ * Type guard to check if a value is a valid FrelioDependencyMap
3
3
  */
4
- export function isDependencyMap(value) {
4
+ export function isFrelioDependencyMap(value) {
5
5
  if (value === null || typeof value !== 'object') {
6
6
  return false;
7
7
  }
@@ -24,9 +24,9 @@ export function isDependencyMap(value) {
24
24
  return true;
25
25
  }
26
26
  /**
27
- * Validates a value as a DependencyMap and returns detailed errors
27
+ * Validates a value as a FrelioDependencyMap and returns detailed errors
28
28
  */
29
- export function validateDependencyMap(value) {
29
+ export function validateFrelioDependencyMap(value) {
30
30
  const errors = [];
31
31
  if (value === null) {
32
32
  errors.push({ path: '', message: 'Value is null' });
package/dist/index.d.ts CHANGED
@@ -6,16 +6,16 @@
6
6
  * @example
7
7
  * ```typescript
8
8
  * import {
9
- * DependencyMap,
10
- * isDependencyMap,
11
- * validateDependencyMap,
9
+ * FrelioDependencyMap,
10
+ * isFrelioDependencyMap,
11
+ * validateFrelioDependencyMap,
12
12
  * findAffectedOutputs
13
13
  * } from 'frelio-dependency-map'
14
14
  *
15
15
  * // Load and validate a dependency map
16
16
  * const data = JSON.parse(fs.readFileSync('_dependency-map.json', 'utf-8'))
17
17
  *
18
- * if (isDependencyMap(data)) {
18
+ * if (isFrelioDependencyMap(data)) {
19
19
  * // Type-safe access
20
20
  * const affected = findAffectedOutputs(data, 'contents/published/article/my-post.json')
21
21
  * console.log('Affected outputs:', affected)
@@ -24,9 +24,9 @@
24
24
  *
25
25
  * @packageDocumentation
26
26
  */
27
- export type { DependencyMap, OutputPath, DependencyPath, DependencyPathPrefix, ValidationResult, ValidationError, } from './types.js';
27
+ export type { FrelioDependencyMap, OutputPath, DependencyPath, DependencyPathPrefix, ValidationResult, ValidationError, } from './types.js';
28
28
  export { DEPENDENCY_PATH_PREFIXES } from './types.js';
29
29
  export { dependencyMapSchema } from './schema.js';
30
- export type { DependencyMapSchema } from './schema.js';
31
- export { isDependencyMap, validateDependencyMap } from './guards.js';
32
- export { getDependencyPaths, getOutputPaths, getAllDependencyPaths, mergeDependencyMaps, findAffectedOutputs, createDependencyMap, setDependencies, removeDependencies, } from './utils.js';
30
+ export type { FrelioDependencyMapSchema } from './schema.js';
31
+ export { isFrelioDependencyMap, validateFrelioDependencyMap } from './guards.js';
32
+ export { getDependencyPaths, getOutputPaths, getAllDependencyPaths, mergeFrelioDependencyMaps, findAffectedOutputs, createFrelioDependencyMap, setDependencies, removeDependencies, } from './utils.js';
package/dist/index.js CHANGED
@@ -6,16 +6,16 @@
6
6
  * @example
7
7
  * ```typescript
8
8
  * import {
9
- * DependencyMap,
10
- * isDependencyMap,
11
- * validateDependencyMap,
9
+ * FrelioDependencyMap,
10
+ * isFrelioDependencyMap,
11
+ * validateFrelioDependencyMap,
12
12
  * findAffectedOutputs
13
13
  * } from 'frelio-dependency-map'
14
14
  *
15
15
  * // Load and validate a dependency map
16
16
  * const data = JSON.parse(fs.readFileSync('_dependency-map.json', 'utf-8'))
17
17
  *
18
- * if (isDependencyMap(data)) {
18
+ * if (isFrelioDependencyMap(data)) {
19
19
  * // Type-safe access
20
20
  * const affected = findAffectedOutputs(data, 'contents/published/article/my-post.json')
21
21
  * console.log('Affected outputs:', affected)
@@ -28,6 +28,6 @@ export { DEPENDENCY_PATH_PREFIXES } from './types.js';
28
28
  // Schema
29
29
  export { dependencyMapSchema } from './schema.js';
30
30
  // Type guards & validation
31
- export { isDependencyMap, validateDependencyMap } from './guards.js';
31
+ export { isFrelioDependencyMap, validateFrelioDependencyMap } from './guards.js';
32
32
  // Utilities
33
- export { getDependencyPaths, getOutputPaths, getAllDependencyPaths, mergeDependencyMaps, findAffectedOutputs, createDependencyMap, setDependencies, removeDependencies, } from './utils.js';
33
+ export { getDependencyPaths, getOutputPaths, getAllDependencyPaths, mergeFrelioDependencyMaps, findAffectedOutputs, createFrelioDependencyMap, setDependencies, removeDependencies, } from './utils.js';
package/dist/schema.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  /**
2
- * JSON Schema for DependencyMap validation
2
+ * JSON Schema for FrelioDependencyMap validation
3
3
  */
4
4
  export declare const dependencyMapSchema: {
5
5
  readonly $schema: "http://json-schema.org/draft-07/schema#";
6
- readonly title: "DependencyMap";
6
+ readonly title: "FrelioDependencyMap";
7
7
  readonly description: "Maps output file paths to arrays of dependency paths for incremental builds";
8
8
  readonly type: "object";
9
9
  readonly additionalProperties: {
@@ -19,4 +19,4 @@ export declare const dependencyMapSchema: {
19
19
  readonly '/articles/index.json': readonly ["content_types/article", "templates/article/list.html", "contents/*/article/*"];
20
20
  }];
21
21
  };
22
- export type DependencyMapSchema = typeof dependencyMapSchema;
22
+ export type FrelioDependencyMapSchema = typeof dependencyMapSchema;
package/dist/schema.js CHANGED
@@ -1,9 +1,9 @@
1
1
  /**
2
- * JSON Schema for DependencyMap validation
2
+ * JSON Schema for FrelioDependencyMap validation
3
3
  */
4
4
  export const dependencyMapSchema = {
5
5
  $schema: 'http://json-schema.org/draft-07/schema#',
6
- title: 'DependencyMap',
6
+ title: 'FrelioDependencyMap',
7
7
  description: 'Maps output file paths to arrays of dependency paths for incremental builds',
8
8
  type: 'object',
9
9
  additionalProperties: {
package/dist/types.d.ts CHANGED
@@ -38,7 +38,7 @@ export type DependencyPath = string;
38
38
  * }
39
39
  * ```
40
40
  */
41
- export type DependencyMap = {
41
+ export type FrelioDependencyMap = {
42
42
  [outputPath: OutputPath]: DependencyPath[];
43
43
  };
44
44
  /**
package/dist/utils.d.ts CHANGED
@@ -1,36 +1,36 @@
1
- import type { DependencyMap, DependencyPath, OutputPath } from './types.js';
1
+ import type { FrelioDependencyMap, DependencyPath, OutputPath } from './types.js';
2
2
  /**
3
3
  * Gets the dependency paths for a specific output path
4
4
  * Returns an empty array if the output path is not found
5
5
  */
6
- export declare function getDependencyPaths(map: DependencyMap, outputPath: OutputPath): DependencyPath[];
6
+ export declare function getDependencyPaths(map: FrelioDependencyMap, outputPath: OutputPath): DependencyPath[];
7
7
  /**
8
8
  * Gets all output paths defined in the dependency map
9
9
  */
10
- export declare function getOutputPaths(map: DependencyMap): OutputPath[];
10
+ export declare function getOutputPaths(map: FrelioDependencyMap): OutputPath[];
11
11
  /**
12
12
  * Gets all unique dependency paths across all outputs
13
13
  */
14
- export declare function getAllDependencyPaths(map: DependencyMap): DependencyPath[];
14
+ export declare function getAllDependencyPaths(map: FrelioDependencyMap): DependencyPath[];
15
15
  /**
16
16
  * Merges multiple dependency maps into one
17
17
  * Later maps override earlier ones for the same output path
18
18
  */
19
- export declare function mergeDependencyMaps(...maps: DependencyMap[]): DependencyMap;
19
+ export declare function mergeFrelioDependencyMaps(...maps: FrelioDependencyMap[]): FrelioDependencyMap;
20
20
  /**
21
21
  * Finds all output paths that depend on a given dependency path
22
22
  * Supports exact match and simple glob pattern matching
23
23
  */
24
- export declare function findAffectedOutputs(map: DependencyMap, changedPath: DependencyPath): OutputPath[];
24
+ export declare function findAffectedOutputs(map: FrelioDependencyMap, changedPath: DependencyPath): OutputPath[];
25
25
  /**
26
26
  * Creates an empty dependency map
27
27
  */
28
- export declare function createDependencyMap(): DependencyMap;
28
+ export declare function createFrelioDependencyMap(): FrelioDependencyMap;
29
29
  /**
30
30
  * Adds or updates dependencies for an output path
31
31
  */
32
- export declare function setDependencies(map: DependencyMap, outputPath: OutputPath, dependencies: DependencyPath[]): DependencyMap;
32
+ export declare function setDependencies(map: FrelioDependencyMap, outputPath: OutputPath, dependencies: DependencyPath[]): FrelioDependencyMap;
33
33
  /**
34
34
  * Removes an output path from the dependency map
35
35
  */
36
- export declare function removeDependencies(map: DependencyMap, outputPath: OutputPath): DependencyMap;
36
+ export declare function removeDependencies(map: FrelioDependencyMap, outputPath: OutputPath): FrelioDependencyMap;
package/dist/utils.js CHANGED
@@ -27,7 +27,7 @@ export function getAllDependencyPaths(map) {
27
27
  * Merges multiple dependency maps into one
28
28
  * Later maps override earlier ones for the same output path
29
29
  */
30
- export function mergeDependencyMaps(...maps) {
30
+ export function mergeFrelioDependencyMaps(...maps) {
31
31
  const result = {};
32
32
  for (const map of maps) {
33
33
  for (const [outputPath, deps] of Object.entries(map)) {
@@ -78,7 +78,7 @@ function matchesDependencyPath(pattern, path) {
78
78
  /**
79
79
  * Creates an empty dependency map
80
80
  */
81
- export function createDependencyMap() {
81
+ export function createFrelioDependencyMap() {
82
82
  return {};
83
83
  }
84
84
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c-time/frelio-dependency-map",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "description": "Type definitions and utilities for frelio dependency map files",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",