@openapi-typescript-infra/service 2.10.0 → 3.0.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/.eslintrc.js +1 -1
- package/.prettierrc.js +1 -1
- package/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/build/config/index.d.ts +3 -3
- package/build/config/index.js +5 -9
- package/build/config/index.js.map +1 -1
- package/build/config/schema.d.ts +1 -1
- package/build/config/shortstops.d.ts +2 -29
- package/build/config/shortstops.js +12 -18
- package/build/config/shortstops.js.map +1 -1
- package/build/tsconfig.build.tsbuildinfo +1 -1
- package/build/types.d.ts +4 -3
- package/package.json +9 -12
- package/src/config/index.ts +14 -19
- package/src/config/schema.ts +1 -1
- package/src/config/shortstops.ts +21 -23
- package/src/types.ts +4 -3
- package/vitest.config.ts +1 -1
- package/@types/config.d.ts +0 -64
- package/build/config/types.d.ts +0 -4
- package/build/config/types.js +0 -3
- package/build/config/types.js.map +0 -1
- package/src/config/types.ts +0 -6
package/.eslintrc.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Instead, edit the coconfig.js or coconfig.ts file in your project root.
|
|
4
4
|
*
|
|
5
5
|
* See https://github.com/gas-buddy/coconfig for more information.
|
|
6
|
-
* @version coconfig@0.
|
|
6
|
+
* @version coconfig@1.0.0
|
|
7
7
|
*/
|
|
8
8
|
const configModule = require('@openapi-typescript-infra/coconfig');
|
|
9
9
|
|
package/.prettierrc.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Instead, edit the coconfig.js or coconfig.ts file in your project root.
|
|
4
4
|
*
|
|
5
5
|
* See https://github.com/gas-buddy/coconfig for more information.
|
|
6
|
-
* @version coconfig@0.
|
|
6
|
+
* @version coconfig@1.0.0
|
|
7
7
|
*/
|
|
8
8
|
const configModule = require('@openapi-typescript-infra/coconfig');
|
|
9
9
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# [3.0.0](https://github.com/openapi-typescript-infra/service/compare/v2.10.0...v3.0.0) (2023-10-17)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **config:** move to a typed confit library ([9ff56b3](https://github.com/openapi-typescript-infra/service/commit/9ff56b3c666a0fa0f099f5a4d24365e6772ad83a))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### BREAKING CHANGES
|
|
10
|
+
|
|
11
|
+
* **config:** ServiceLocals now need a config schema
|
|
12
|
+
|
|
1
13
|
# [2.10.0](https://github.com/openapi-typescript-infra/service/compare/v2.9.2...v2.10.0) (2023-10-13)
|
|
2
14
|
|
|
3
15
|
|
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ precise configuration, which is not the intent.
|
|
|
29
29
|
|
|
30
30
|
This module has the following core functionality:
|
|
31
31
|
|
|
32
|
-
1. Loads multilevel environment aware configuration, merging configuration information as appropriate to yield a single hierarchical configuration store. We use [confit](https://github.com/
|
|
32
|
+
1. Loads multilevel environment aware configuration, merging configuration information as appropriate to yield a single hierarchical configuration store. We use a modern port of [confit](https://github.com/sesamecare/confit).
|
|
33
33
|
2. Engage OpenTelemetry for tracing and metrics monitoring (via Prometheus-format metrics) and wire this into JSON-based pino logging.
|
|
34
34
|
3. Setup an Express@5 application with common service hosting options such as body parsing, error handling and graceful shutdown.
|
|
35
35
|
4. Find and load route handlers and static content serving, if desired.
|
package/build/config/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Confit } from '@sesamecare-oss/confit';
|
|
2
|
+
import type { ConfigurationSchema } from './schema';
|
|
2
3
|
export interface ServiceConfigurationSpec {
|
|
3
4
|
sourceDirectory: string;
|
|
4
5
|
configurationDirectories: string[];
|
|
5
6
|
name: string;
|
|
6
7
|
}
|
|
7
|
-
export declare function loadConfiguration({ name, configurationDirectories: dirs, sourceDirectory, }: ServiceConfigurationSpec): Promise<
|
|
8
|
+
export declare function loadConfiguration<Config extends ConfigurationSchema>({ name, configurationDirectories: dirs, sourceDirectory, }: ServiceConfigurationSpec): Promise<Confit<Config>>;
|
|
8
9
|
export declare function insertConfigurationBefore(configDirs: string[] | undefined, insert: string, before: string): string[];
|
|
9
10
|
export * from './schema';
|
|
10
|
-
export * from './types';
|
package/build/config/index.js
CHANGED
|
@@ -20,7 +20,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
20
20
|
exports.insertConfigurationBefore = exports.loadConfiguration = void 0;
|
|
21
21
|
const fs_1 = __importDefault(require("fs"));
|
|
22
22
|
const path_1 = __importDefault(require("path"));
|
|
23
|
-
const confit_1 =
|
|
23
|
+
const confit_1 = require("@sesamecare-oss/confit");
|
|
24
24
|
const port_finder_1 = require("../development/port-finder");
|
|
25
25
|
const shortstops_1 = require("./shortstops");
|
|
26
26
|
// Order matters here.
|
|
@@ -59,10 +59,8 @@ async function loadConfiguration({ name, configurationDirectories: dirs, sourceD
|
|
|
59
59
|
const defaultProtocols = (0, shortstops_1.shortstops)({ name }, sourceDirectory);
|
|
60
60
|
const specificConfig = dirs[dirs.length - 1];
|
|
61
61
|
// This confit version just gets us environment info
|
|
62
|
-
const envConfit = await
|
|
63
|
-
|
|
64
|
-
});
|
|
65
|
-
const configFactory = (0, confit_1.default)({
|
|
62
|
+
const envConfit = await (0, confit_1.confit)({ basedir: specificConfig }).create();
|
|
63
|
+
const configFactory = (0, confit_1.confit)({
|
|
66
64
|
basedir: specificConfig,
|
|
67
65
|
protocols: defaultProtocols,
|
|
68
66
|
});
|
|
@@ -74,9 +72,7 @@ async function loadConfiguration({ name, configurationDirectories: dirs, sourceD
|
|
|
74
72
|
const defaultOrder = dirs.slice(0, dirs.length - 1).reverse();
|
|
75
73
|
defaultOrder.push(path_1.default.join(__dirname, '../..', 'config'));
|
|
76
74
|
await defaultOrder.reduce((promise, dir) => promise.then(() => addDefaultConfiguration(configFactory, dir, envConfit)), Promise.resolve());
|
|
77
|
-
const loaded = await
|
|
78
|
-
configFactory.create((err, config) => (err ? reject(err) : accept(config)));
|
|
79
|
-
});
|
|
75
|
+
const loaded = await configFactory.create();
|
|
80
76
|
// Because other things need to know the port we choose, we pick it here if it's
|
|
81
77
|
// configured to auto-select
|
|
82
78
|
const serverConfig = loaded.get('server');
|
|
@@ -86,6 +82,7 @@ async function loadConfiguration({ name, configurationDirectories: dirs, sourceD
|
|
|
86
82
|
}
|
|
87
83
|
// TODO init other stuff based on config here, such as key management or
|
|
88
84
|
// other cloud-aware shortstop handlers
|
|
85
|
+
// Not sure why this is necessary, but it is
|
|
89
86
|
return loaded;
|
|
90
87
|
}
|
|
91
88
|
exports.loadConfiguration = loadConfiguration;
|
|
@@ -102,5 +99,4 @@ function insertConfigurationBefore(configDirs, insert, before) {
|
|
|
102
99
|
}
|
|
103
100
|
exports.insertConfigurationBefore = insertConfigurationBefore;
|
|
104
101
|
__exportStar(require("./schema"), exports);
|
|
105
|
-
__exportStar(require("./types"), exports);
|
|
106
102
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,4CAAoB;AACpB,gDAAwB;AAExB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,4CAAoB;AACpB,gDAAwB;AAExB,mDAAiF;AAEjF,4DAAsD;AAEtD,6CAA0C;AAG1C,sBAAsB;AACtB,MAAM,YAAY,GAAG,CAAC,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,CAAU,CAAC;AAE/E,KAAK,UAAU,UAAU,CAAC,CAAS;IACjC,OAAO,IAAI,OAAO,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE;QACpC,YAAE,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,EAA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AwE;IACxE,uCAAuC;IAEvC,4CAA4C;IAC5C,OAAO,MAAmC,CAAC;AAC7C,CAAC;AA1CD,8CA0CC;AAED,SAAgB,yBAAyB,CACvC,UAAgC,EAChC,MAAc,EACd,MAAc;IAEd,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,CAAC;IACrC,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACnC,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;QAChB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KAC3B;SAAM;QACL,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;KAC/B;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAbD,8DAaC;AAED,2CAAyB"}
|
package/build/config/schema.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export interface ServiceConfiguration {
|
|
|
9
9
|
export interface ConfigurationItemEnabled {
|
|
10
10
|
enabled?: boolean;
|
|
11
11
|
}
|
|
12
|
-
export interface ConfigurationSchema
|
|
12
|
+
export interface ConfigurationSchema {
|
|
13
13
|
trustProxy?: string[];
|
|
14
14
|
logging?: {
|
|
15
15
|
level?: Level;
|
|
@@ -1,31 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import os from 'os';
|
|
4
|
-
import { ProtocolFn } from '@gasbuddy/confit';
|
|
5
|
-
declare const osMethods: {
|
|
6
|
-
hostname: typeof os.hostname;
|
|
7
|
-
platform: typeof os.platform;
|
|
8
|
-
type: typeof os.type;
|
|
9
|
-
version: typeof os.version;
|
|
10
|
-
};
|
|
1
|
+
import { type ShortstopHandler } from '@sesamecare-oss/confit';
|
|
11
2
|
export declare function shortstops(service: {
|
|
12
3
|
name: string;
|
|
13
|
-
}, sourcedir: string):
|
|
14
|
-
env: (envVarName: string) => string | undefined;
|
|
15
|
-
env_switch(v: string): boolean;
|
|
16
|
-
base64: (blob: string) => Buffer;
|
|
17
|
-
regex(v: string): RegExp;
|
|
18
|
-
path: (v: string) => string;
|
|
19
|
-
sourcepath: (relativePath: string) => string;
|
|
20
|
-
file: (v: string, callback: ((error: Error | null, result?: string | Buffer | undefined) => void) | undefined) => void;
|
|
21
|
-
sourcefile: ProtocolFn<string | Buffer | undefined>;
|
|
22
|
-
require: (v: string) => any;
|
|
23
|
-
sourcerequire: (v: string) => any;
|
|
24
|
-
yaml: ProtocolFn<any>;
|
|
25
|
-
servicetype: (v: string) => boolean;
|
|
26
|
-
servicename: (v: string) => string;
|
|
27
|
-
os(p: keyof typeof osMethods): string;
|
|
28
|
-
dns: ProtocolFn<string>;
|
|
29
|
-
literal(v: string): string;
|
|
30
|
-
};
|
|
31
|
-
export {};
|
|
4
|
+
}, sourcedir: string): Record<string, ShortstopHandler<string, unknown>>;
|
|
@@ -6,9 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.shortstops = void 0;
|
|
7
7
|
const os_1 = __importDefault(require("os"));
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
|
-
const
|
|
10
|
-
const shortstop_yaml_1 = __importDefault(require("shortstop-yaml"));
|
|
11
|
-
const shortstop_dns_1 = __importDefault(require("shortstop-dns"));
|
|
9
|
+
const confit_1 = require("@sesamecare-oss/confit");
|
|
12
10
|
/**
|
|
13
11
|
* Default shortstop handlers for GasBuddy service configuration
|
|
14
12
|
*/
|
|
@@ -17,7 +15,7 @@ const shortstop_dns_1 = __importDefault(require("shortstop-dns"));
|
|
|
17
15
|
* with a url-like hash pattern
|
|
18
16
|
*/
|
|
19
17
|
function betterRequire(basepath) {
|
|
20
|
-
const baseRequire =
|
|
18
|
+
const baseRequire = (0, confit_1.requireHandler)(basepath);
|
|
21
19
|
return function hashRequire(v) {
|
|
22
20
|
const [moduleName, func] = v.split('#');
|
|
23
21
|
const module = baseRequire(moduleName);
|
|
@@ -34,7 +32,7 @@ function betterRequire(basepath) {
|
|
|
34
32
|
* Just like path, but resolve ~/ to the home directory
|
|
35
33
|
*/
|
|
36
34
|
function betterPath(basepath) {
|
|
37
|
-
const basePath =
|
|
35
|
+
const basePath = (0, confit_1.pathHandler)(basepath);
|
|
38
36
|
return function pathWithHomeDir(v) {
|
|
39
37
|
if (v.startsWith('~/')) {
|
|
40
38
|
return basePath(path_1.default.join(os_1.default.homedir(), v.slice(2)));
|
|
@@ -46,15 +44,12 @@ function betterPath(basepath) {
|
|
|
46
44
|
* Just like file, but resolve ~/ to the home directory
|
|
47
45
|
*/
|
|
48
46
|
function betterFile(basepath) {
|
|
49
|
-
const baseFile =
|
|
50
|
-
return function fileWithHomeDir(v
|
|
51
|
-
if (!callback) {
|
|
52
|
-
return undefined;
|
|
53
|
-
}
|
|
47
|
+
const baseFile = (0, confit_1.fileHandler)(basepath);
|
|
48
|
+
return function fileWithHomeDir(v) {
|
|
54
49
|
if (v.startsWith('~/')) {
|
|
55
|
-
return baseFile(path_1.default.join(os_1.default.homedir(), v.slice(2))
|
|
50
|
+
return baseFile(path_1.default.join(os_1.default.homedir(), v.slice(2)));
|
|
56
51
|
}
|
|
57
|
-
return baseFile(v
|
|
52
|
+
return baseFile(v);
|
|
58
53
|
};
|
|
59
54
|
}
|
|
60
55
|
function canonicalizeServiceSuffix(suffix) {
|
|
@@ -100,7 +95,7 @@ function shortstops(service, sourcedir) {
|
|
|
100
95
|
* basedir and sourcedir are meaningfully different reference points.
|
|
101
96
|
*/
|
|
102
97
|
const basedir = path_1.default.join(sourcedir, '..');
|
|
103
|
-
const env =
|
|
98
|
+
const env = (0, confit_1.envHandler)();
|
|
104
99
|
return {
|
|
105
100
|
env,
|
|
106
101
|
// A version of env that can default to false
|
|
@@ -111,27 +106,26 @@ function shortstops(service, sourcedir) {
|
|
|
111
106
|
}
|
|
112
107
|
return !!env(v);
|
|
113
108
|
},
|
|
114
|
-
base64:
|
|
109
|
+
base64: (0, confit_1.base64Handler)(),
|
|
115
110
|
regex(v) {
|
|
116
111
|
const [, pattern, flags] = v.match(/^\/(.*)\/([a-z]*)/) || [];
|
|
117
112
|
return new RegExp(pattern, flags);
|
|
118
113
|
},
|
|
119
114
|
// handle source and base directory intelligently
|
|
120
115
|
path: betterPath(basedir),
|
|
121
|
-
sourcepath:
|
|
116
|
+
sourcepath: (0, confit_1.pathHandler)(sourcedir),
|
|
122
117
|
file: betterFile(basedir),
|
|
123
|
-
sourcefile:
|
|
118
|
+
sourcefile: (0, confit_1.fileHandler)(sourcedir),
|
|
124
119
|
require: betterRequire(basedir),
|
|
125
120
|
sourcerequire: betterRequire(sourcedir),
|
|
126
121
|
// Sometimes yaml is more pleasant for configuration
|
|
127
|
-
yaml: (0,
|
|
122
|
+
yaml: (0, confit_1.yamlHandler)(basedir),
|
|
128
123
|
// Switch on service type
|
|
129
124
|
servicetype: serviceTypeFactory(service.name),
|
|
130
125
|
servicename: (v) => v.replace(/\$\{name\}/g, service.name),
|
|
131
126
|
os(p) {
|
|
132
127
|
return osMethods[p]();
|
|
133
128
|
},
|
|
134
|
-
dns: (0, shortstop_dns_1.default)(),
|
|
135
129
|
// No-op in case you have values that start with a shortstop handler name (and colon)
|
|
136
130
|
literal(v) {
|
|
137
131
|
return v;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shortstops.js","sourceRoot":"","sources":["../../src/config/shortstops.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,gDAAwB;AAExB,
|
|
1
|
+
{"version":3,"file":"shortstops.js","sourceRoot":"","sources":["../../src/config/shortstops.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,gDAAwB;AAExB,mDAQgC;AAEhC;;GAEG;AAEH;;;GAGG;AACH,SAAS,aAAa,CAAC,QAAgB;IACrC,MAAM,WAAW,GAAG,IAAA,uBAAc,EAAC,QAAQ,CAAC,CAAC;IAC7C,OAAO,SAAS,WAAW,CAAC,CAAS;QACnC,M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