@travetto/config 7.0.4 → 7.0.6

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/README.md CHANGED
@@ -103,8 +103,8 @@ The framework provides two simple base classes that assist with existing pattern
103
103
 
104
104
  **Code: Memory Provider**
105
105
  ```typescript
106
- import { ConfigData } from '../parser/types.ts';
107
- import { ConfigSource, ConfigPayload } from './types.ts';
106
+ import type { ConfigData } from '../parser/types.ts';
107
+ import type { ConfigSource, ConfigPayload } from './types.ts';
108
108
 
109
109
  /**
110
110
  * Meant to be instantiated and provided as a unique config source
@@ -125,7 +125,7 @@ export class MemoryConfigSource implements ConfigSource {
125
125
  **Code: Environment JSON Provider**
126
126
  ```typescript
127
127
  import { JSONUtil } from '@travetto/runtime';
128
- import { ConfigSource, ConfigPayload } from './types.ts';
128
+ import type { ConfigSource, ConfigPayload } from './types.ts';
129
129
 
130
130
  /**
131
131
  * Represents the environment mapped data as a JSON blob
@@ -155,7 +155,7 @@ In addition to files and environment variables, configuration sources can also b
155
155
 
156
156
  **Code: Custom Configuration Source**
157
157
  ```typescript
158
- import { ConfigSource, ConfigPayload } from '@travetto/config';
158
+ import type { ConfigSource, ConfigPayload } from '@travetto/config';
159
159
  import { Injectable } from '@travetto/di';
160
160
 
161
161
  @Injectable()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/config",
3
- "version": "7.0.4",
3
+ "version": "7.0.6",
4
4
  "type": "module",
5
5
  "description": "Configuration support",
6
6
  "keywords": [
@@ -27,8 +27,8 @@
27
27
  "directory": "module/config"
28
28
  },
29
29
  "dependencies": {
30
- "@travetto/di": "^7.0.4",
31
- "@travetto/schema": "^7.0.4",
30
+ "@travetto/di": "^7.0.6",
31
+ "@travetto/schema": "^7.0.6",
32
32
  "yaml": "^2.8.2"
33
33
  },
34
34
  "travetto": {
package/src/decorator.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Class, ClassInstance, getClass } from '@travetto/runtime';
1
+ import { type Class, type ClassInstance, getClass } from '@travetto/runtime';
2
2
  import { DependencyRegistryIndex } from '@travetto/di';
3
3
  import { SchemaRegistryIndex } from '@travetto/schema';
4
4
 
@@ -1,7 +1,7 @@
1
1
  import { Injectable } from '@travetto/di';
2
2
  import { JSONUtil } from '@travetto/runtime';
3
3
 
4
- import { ConfigParser } from './types.ts';
4
+ import type { ConfigParser } from './types.ts';
5
5
 
6
6
  @Injectable()
7
7
  export class JSONConfigParser implements ConfigParser {
@@ -4,7 +4,7 @@ import path from 'node:path';
4
4
  import { DependencyRegistryIndex, Injectable } from '@travetto/di';
5
5
  import { AppError, toConcrete } from '@travetto/runtime';
6
6
 
7
- import { ConfigData, ConfigParser } from './types.ts';
7
+ import type { ConfigData, ConfigParser } from './types.ts';
8
8
 
9
9
  @Injectable()
10
10
  export class ParserManager {
@@ -1,6 +1,6 @@
1
1
  import { Injectable } from '@travetto/di';
2
2
 
3
- import { ConfigData, ConfigParser } from './types.ts';
3
+ import type { ConfigData, ConfigParser } from './types.ts';
4
4
 
5
5
  const BACKSLASH = '\\'.charCodeAt(0);
6
6
  const EQUALS = '='.charCodeAt(0);
@@ -1,6 +1,6 @@
1
1
  import { parse as parseYaml } from 'yaml';
2
2
  import { Injectable } from '@travetto/di';
3
- import { ConfigData, ConfigParser } from './types.ts';
3
+ import type { ConfigData, ConfigParser } from './types.ts';
4
4
 
5
5
  @Injectable()
6
6
  export class YAMLConfigParser implements ConfigParser {
package/src/service.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import util from 'node:util';
2
2
 
3
- import { AppError, toConcrete, castTo, Class, Env, Runtime, RuntimeResources, getClass } from '@travetto/runtime';
3
+ import { AppError, toConcrete, castTo, type Class, Env, Runtime, RuntimeResources, getClass } from '@travetto/runtime';
4
4
  import { DependencyRegistryIndex, getDefaultQualifier, Injectable } from '@travetto/di';
5
5
  import { BindUtil, DataUtil, SchemaRegistryIndex, SchemaValidator, ValidationResultError } from '@travetto/schema';
6
6
 
7
7
  import { ParserManager } from './parser/parser.ts';
8
- import { ConfigData } from './parser/types.ts';
9
- import { ConfigSource, ConfigPayload } from './source/types.ts';
8
+ import type { ConfigData } from './parser/types.ts';
9
+ import type { ConfigSource, ConfigPayload } from './source/types.ts';
10
10
  import { FileConfigSource } from './source/file.ts';
11
11
  import { OverrideConfigSource } from './source/override.ts';
12
12
 
package/src/source/env.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { JSONUtil } from '@travetto/runtime';
2
- import { ConfigSource, ConfigPayload } from './types.ts';
2
+ import type { ConfigSource, ConfigPayload } from './types.ts';
3
3
 
4
4
  /**
5
5
  * Represents the environment mapped data as a JSON blob
@@ -3,8 +3,8 @@ import path from 'node:path';
3
3
 
4
4
  import { Env, Runtime, RuntimeResources } from '@travetto/runtime';
5
5
 
6
- import { ConfigSource, ConfigPayload } from './types.ts';
7
- import { ParserManager } from '../parser/parser.ts';
6
+ import type { ConfigSource, ConfigPayload } from './types.ts';
7
+ import type { ParserManager } from '../parser/parser.ts';
8
8
 
9
9
  type Profile = [string, number] | readonly [string, number];
10
10
 
@@ -1,5 +1,5 @@
1
- import { ConfigData } from '../parser/types.ts';
2
- import { ConfigSource, ConfigPayload } from './types.ts';
1
+ import type { ConfigData } from '../parser/types.ts';
2
+ import type { ConfigSource, ConfigPayload } from './types.ts';
3
3
 
4
4
  /**
5
5
  * Meant to be instantiated and provided as a unique config source
@@ -1,5 +1,5 @@
1
- import { ConfigData } from '../parser/types.ts';
2
- import { ConfigSource, ConfigPayload } from './types.ts';
1
+ import type { ConfigData } from '../parser/types.ts';
2
+ import type { ConfigSource, ConfigPayload } from './types.ts';
3
3
  import { ConfigOverrideUtil } from '../util.ts';
4
4
 
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { ConfigData } from '../parser/types.ts';
1
+ import type { ConfigData } from '../parser/types.ts';
2
2
 
3
3
  type OrProm<T> = T | Promise<T>;
4
4
  type OneOf<T> = T[] | T | undefined;
package/src/util.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Any, asFull, Class } from '@travetto/runtime';
1
+ import { type Any, asFull, type Class } from '@travetto/runtime';
2
2
  import { SchemaRegistryIndex } from '@travetto/schema';
3
3
 
4
4
  export const OverrideConfigSymbol = Symbol.for('@travetto/config:overrides');