skuba-dive 1.2.0 → 2.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/README.md +10 -5
- package/lib/env/create.js.map +1 -1
- package/lib/env/presets.js +4 -4
- package/lib/env/presets.js.map +1 -1
- package/package.json +7 -5
- package/register.js +0 -8
package/README.md
CHANGED
|
@@ -70,15 +70,20 @@ Each function will throw if its environment variable is not set and `opts.defaul
|
|
|
70
70
|
|
|
71
71
|
### Register
|
|
72
72
|
|
|
73
|
-
Runtime hook for
|
|
73
|
+
Runtime hook for import paths relative to `/src`.
|
|
74
74
|
|
|
75
|
-
-
|
|
76
|
-
- Stack traces that map back to your `.ts` sources
|
|
77
|
-
|
|
78
|
-
Make a side-effectful import at the top of your entry point, e.g. `/src/app.ts`:
|
|
75
|
+
Make a side-effectful import at the top of your entry point(s):
|
|
79
76
|
|
|
80
77
|
```typescript
|
|
78
|
+
// /src/register.ts
|
|
79
|
+
|
|
81
80
|
import 'skuba-dive/register';
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
```typescript
|
|
84
|
+
// /src/app.ts
|
|
85
|
+
|
|
86
|
+
import './register';
|
|
82
87
|
|
|
83
88
|
import { config } from 'src/config';
|
|
84
89
|
|
package/lib/env/create.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../src/env/create.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACI,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../src/env/create.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACI,MAAM,MAAM,GACjB,CAAI,KAAyC,EAAE,EAAE,CACjD,CAAQ,IAAY,EAAE,IAA+B,EAAS,EAAE;IAC9D,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAEhC,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE;QAChC,OAAO,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;KAC3B;IAED,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC;KACrB;IAED,MAAM,KAAK,CAAC,eAAe,IAAI,aAAa,CAAC,CAAC;AAChD,CAAC,CAAC;AAdS,QAAA,MAAM,UAcf"}
|
package/lib/env/presets.js
CHANGED
|
@@ -27,19 +27,19 @@ const parsers = __importStar(require("./parsers"));
|
|
|
27
27
|
*
|
|
28
28
|
* This includes (positive) zero.
|
|
29
29
|
*/
|
|
30
|
-
exports.nonNegativeInteger = create_1.create(parsers.nonNegativeInteger);
|
|
30
|
+
exports.nonNegativeInteger = (0, create_1.create)(parsers.nonNegativeInteger);
|
|
31
31
|
/**
|
|
32
32
|
* Create a function that reads an environment variable and validates it against
|
|
33
33
|
* the provided array of choices.
|
|
34
34
|
*/
|
|
35
|
-
const oneOf = (choices) => create_1.create(parsers.oneOf(choices));
|
|
35
|
+
const oneOf = (choices) => (0, create_1.create)(parsers.oneOf(choices));
|
|
36
36
|
exports.oneOf = oneOf;
|
|
37
37
|
/**
|
|
38
38
|
* Read an environment variable as a string.
|
|
39
39
|
*/
|
|
40
|
-
exports.string = create_1.create(parsers.noop);
|
|
40
|
+
exports.string = (0, create_1.create)(parsers.noop);
|
|
41
41
|
/**
|
|
42
42
|
* Read an environment variable as a boolean.
|
|
43
43
|
*/
|
|
44
|
-
exports.boolean = create_1.create(parsers.boolean);
|
|
44
|
+
exports.boolean = (0, create_1.create)(parsers.boolean);
|
|
45
45
|
//# sourceMappingURL=presets.js.map
|
package/lib/env/presets.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presets.js","sourceRoot":"","sources":["../../src/env/presets.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAkC;AAClC,mDAAqC;AAErC;;;;GAIG;AACU,QAAA,kBAAkB,GAAG,eAAM,
|
|
1
|
+
{"version":3,"file":"presets.js","sourceRoot":"","sources":["../../src/env/presets.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAkC;AAClC,mDAAqC;AAErC;;;;GAIG;AACU,QAAA,kBAAkB,GAAG,IAAA,eAAM,EAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAErE;;;GAGG;AACI,MAAM,KAAK,GAAG,CAAI,OAAqB,EAAE,EAAE,CAChD,IAAA,eAAM,EAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AADpB,QAAA,KAAK,SACe;AAEjC;;GAEG;AACU,QAAA,MAAM,GAAG,IAAA,eAAM,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAE3C;;GAEG;AACU,QAAA,OAAO,GAAG,IAAA,eAAM,EAAC,OAAO,CAAC,OAAO,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -3,13 +3,15 @@
|
|
|
3
3
|
"url": "https://github.com/seek-oss/skuba-dive/issues"
|
|
4
4
|
},
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"module-alias": "^2.2.2"
|
|
7
|
-
"source-map-support": "^0.5.16"
|
|
6
|
+
"module-alias": "^2.2.2"
|
|
8
7
|
},
|
|
9
8
|
"description": "Minimal runtime for skuba",
|
|
10
9
|
"devDependencies": {
|
|
11
|
-
"@types/module-alias": "2.0.
|
|
12
|
-
"skuba": "3.
|
|
10
|
+
"@types/module-alias": "2.0.1",
|
|
11
|
+
"skuba": "3.17.2"
|
|
12
|
+
},
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=14.18"
|
|
13
15
|
},
|
|
14
16
|
"files": [
|
|
15
17
|
"lib/**/*.d.ts",
|
|
@@ -42,5 +44,5 @@
|
|
|
42
44
|
"version": "3.7.3"
|
|
43
45
|
},
|
|
44
46
|
"types": "./lib/index.d.ts",
|
|
45
|
-
"version": "
|
|
47
|
+
"version": "2.0.0"
|
|
46
48
|
}
|
package/register.js
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
// istanbul ignore if
|
|
2
|
-
/**
|
|
3
|
-
* @see {@link https://github.com/kulshekhar/ts-jest/issues/727#issuecomment-422743605}
|
|
4
|
-
*/
|
|
5
|
-
if (typeof jest === 'undefined') {
|
|
6
|
-
require('source-map-support/register');
|
|
7
|
-
}
|
|
8
|
-
|
|
9
1
|
/**
|
|
10
2
|
* @see {@link https://nodejs.org/api/deprecations.html#DEP0144}
|
|
11
3
|
*/
|