@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 +4 -4
- package/package.json +3 -3
- package/src/decorator.ts +1 -1
- package/src/parser/json.ts +1 -1
- package/src/parser/parser.ts +1 -1
- package/src/parser/properties.ts +1 -1
- package/src/parser/yaml.ts +1 -1
- package/src/service.ts +3 -3
- package/src/source/env.ts +1 -1
- package/src/source/file.ts +2 -2
- package/src/source/memory.ts +2 -2
- package/src/source/override.ts +2 -2
- package/src/source/types.ts +1 -1
- package/src/util.ts +1 -1
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.
|
|
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.
|
|
31
|
-
"@travetto/schema": "^7.0.
|
|
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
package/src/parser/json.ts
CHANGED
package/src/parser/parser.ts
CHANGED
|
@@ -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 {
|
package/src/parser/properties.ts
CHANGED
package/src/parser/yaml.ts
CHANGED
|
@@ -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
package/src/source/file.ts
CHANGED
|
@@ -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
|
|
package/src/source/memory.ts
CHANGED
|
@@ -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
|
package/src/source/override.ts
CHANGED
|
@@ -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
|
/**
|
package/src/source/types.ts
CHANGED
package/src/util.ts
CHANGED