api 5.0.2 → 5.0.4
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/bin.js +1 -1
- package/dist/cache.d.ts +1 -1
- package/dist/cache.js +1 -1
- package/dist/cli/codegen/index.d.ts +1 -1
- package/dist/cli/codegen/languages/typescript.d.ts +2 -2
- package/dist/cli/codegen/languages/typescript.js +12 -3
- package/dist/cli/commands/install.js +1 -1
- package/dist/cli/lib/prompt.js +1 -1
- package/dist/cli/storage.d.ts +2 -2
- package/dist/cli/storage.js +1 -1
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.js +1 -1
- package/dist/core/parseResponse.js +1 -1
- package/dist/core/prepareParams.js +1 -1
- package/dist/fetcher.js +1 -1
- package/dist/index.js +1 -1
- package/dist/packageInfo.d.ts +1 -1
- package/dist/packageInfo.js +1 -1
- package/package.json +15 -12
- package/src/cli/codegen/languages/typescript.ts +13 -2
- package/src/packageInfo.ts +1 -1
package/dist/bin.js
CHANGED
|
@@ -37,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
38
38
|
function step(op) {
|
|
39
39
|
if (f) throw new TypeError("Generator is already executing.");
|
|
40
|
-
while (_) try {
|
|
40
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
41
41
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
42
42
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
43
43
|
switch (op[0]) {
|
package/dist/cache.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { OASDocument } from 'oas/dist/rmoas.types';
|
|
2
2
|
import 'isomorphic-fetch';
|
|
3
3
|
import Fetcher from './fetcher';
|
|
4
|
-
|
|
4
|
+
type CacheStore = Record<string, {
|
|
5
5
|
hash: string;
|
|
6
6
|
path?: string;
|
|
7
7
|
original: string | OASDocument;
|
package/dist/cache.js
CHANGED
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type CodeGeneratorLanguage from './language';
|
|
2
2
|
import type Oas from 'oas';
|
|
3
|
-
export
|
|
3
|
+
export type SupportedLanguages = 'js' | 'js-cjs' | 'js-esm' | 'ts';
|
|
4
4
|
export default function codegen(language: SupportedLanguages, spec: Oas, specPath: string, identifier: string): CodeGeneratorLanguage;
|
|
@@ -5,11 +5,11 @@ import type { Operation } from 'oas';
|
|
|
5
5
|
import type { ClassDeclaration } from 'ts-morph';
|
|
6
6
|
import { Project } from 'ts-morph';
|
|
7
7
|
import CodeGeneratorLanguage from '../language';
|
|
8
|
-
export
|
|
8
|
+
export type TSGeneratorOptions = {
|
|
9
9
|
outputJS?: boolean;
|
|
10
10
|
compilerTarget?: 'cjs' | 'esm';
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
type OperationTypeHousing = {
|
|
13
13
|
types: {
|
|
14
14
|
params?: false | Record<'body' | 'formData' | 'metadata', string>;
|
|
15
15
|
responses?: Record<string, string>;
|
|
@@ -40,7 +40,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
40
40
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
41
41
|
function step(op) {
|
|
42
42
|
if (f) throw new TypeError("Generator is already executing.");
|
|
43
|
-
while (_) try {
|
|
43
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
44
44
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
45
45
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
46
46
|
switch (op[0]) {
|
|
@@ -78,6 +78,7 @@ var fs_1 = __importDefault(require("fs"));
|
|
|
78
78
|
var path_1 = __importDefault(require("path"));
|
|
79
79
|
var execa_1 = __importDefault(require("execa"));
|
|
80
80
|
var lodash_setwith_1 = __importDefault(require("lodash.setwith"));
|
|
81
|
+
var semver_1 = __importDefault(require("semver"));
|
|
81
82
|
var ts_morph_1 = require("ts-morph");
|
|
82
83
|
var logger_1 = __importDefault(require("../../logger"));
|
|
83
84
|
var language_1 = __importDefault(require("../language"));
|
|
@@ -99,7 +100,7 @@ var TSGenerator = /** @class */ (function (_super) {
|
|
|
99
100
|
reason: "Required for the `api/dist/core` library that the codegen'd SDK uses for making requests.",
|
|
100
101
|
url: 'https://npm.im/api'
|
|
101
102
|
},
|
|
102
|
-
'json-schema-to-ts': {
|
|
103
|
+
'json-schema-to-ts@beta': {
|
|
103
104
|
reason: 'Required for TypeScript type handling.',
|
|
104
105
|
url: 'https://npm.im/json-schema-to-ts'
|
|
105
106
|
},
|
|
@@ -127,13 +128,21 @@ var TSGenerator = /** @class */ (function (_super) {
|
|
|
127
128
|
TSGenerator.prototype.installer = function (storage, opts) {
|
|
128
129
|
if (opts === void 0) { opts = {}; }
|
|
129
130
|
return __awaiter(this, void 0, void 0, function () {
|
|
130
|
-
var installDir, pkg, npmInstall;
|
|
131
|
+
var installDir, info, pkgVersion, pkg, npmInstall;
|
|
131
132
|
return __generator(this, function (_a) {
|
|
132
133
|
switch (_a.label) {
|
|
133
134
|
case 0:
|
|
134
135
|
installDir = storage.getIdentifierStorageDir();
|
|
136
|
+
info = this.spec.getDefinition().info;
|
|
137
|
+
pkgVersion = semver_1["default"].coerce(info.version);
|
|
138
|
+
if (!pkgVersion) {
|
|
139
|
+
// If the version that's in `info.version` isn't compatible with semver NPM won't be able to
|
|
140
|
+
// handle it properly so we need to fallback to something it can.
|
|
141
|
+
pkgVersion = semver_1["default"].coerce('0.0.0');
|
|
142
|
+
}
|
|
135
143
|
pkg = {
|
|
136
144
|
name: "@api/".concat(storage.identifier),
|
|
145
|
+
version: pkgVersion.version,
|
|
137
146
|
main: "./index.".concat(this.outputJS ? 'js' : 'ts'),
|
|
138
147
|
types: './index.d.ts'
|
|
139
148
|
};
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
package/dist/cli/lib/prompt.js
CHANGED
|
@@ -25,7 +25,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
25
25
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
26
|
function step(op) {
|
|
27
27
|
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
29
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
30
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
31
|
switch (op[0]) {
|
package/dist/cli/storage.d.ts
CHANGED
|
@@ -65,7 +65,7 @@ export default class Storage {
|
|
|
65
65
|
*/
|
|
66
66
|
save(spec: OASDocument): OASDocument;
|
|
67
67
|
}
|
|
68
|
-
export
|
|
68
|
+
export type Lockfile = {
|
|
69
69
|
/**
|
|
70
70
|
* The `api.json` schema version. This will only ever change if we introduce breaking changes to
|
|
71
71
|
* this store.
|
|
@@ -73,7 +73,7 @@ export declare type Lockfile = {
|
|
|
73
73
|
version: '1.0';
|
|
74
74
|
apis: LockfileAPI[];
|
|
75
75
|
};
|
|
76
|
-
export
|
|
76
|
+
export type LockfileAPI = {
|
|
77
77
|
/**
|
|
78
78
|
* A unique identifier of the API. This'll be used to do requires on `@api/<identifier>` and also
|
|
79
79
|
* where the SDK code will be located in `.api/apis/<identifier>`.
|
package/dist/cli/storage.js
CHANGED
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
package/dist/core/index.d.ts
CHANGED
|
@@ -14,14 +14,14 @@ export interface ConfigOptions {
|
|
|
14
14
|
*/
|
|
15
15
|
timeout?: number;
|
|
16
16
|
}
|
|
17
|
-
export
|
|
17
|
+
export type FetchResponse<status, data> = {
|
|
18
18
|
data: data;
|
|
19
19
|
status: status;
|
|
20
20
|
headers: Headers;
|
|
21
21
|
res: Response;
|
|
22
22
|
};
|
|
23
|
-
|
|
24
|
-
export
|
|
23
|
+
type Enumerate<N extends number, Acc extends number[] = []> = Acc['length'] extends N ? Acc[number] : Enumerate<N, [...Acc, Acc['length']]>;
|
|
24
|
+
export type HTTPMethodRange<F extends number, T extends number> = Exclude<Enumerate<T>, Enumerate<F>>;
|
|
25
25
|
export { getJSONSchemaDefaults, parseResponse, prepareAuth, prepareParams, prepareServer };
|
|
26
26
|
export default class APICore {
|
|
27
27
|
spec: Oas;
|
package/dist/core/index.js
CHANGED
|
@@ -25,7 +25,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
25
25
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
26
|
function step(op) {
|
|
27
27
|
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
29
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
30
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
31
|
switch (op[0]) {
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
package/dist/fetcher.js
CHANGED
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
package/dist/packageInfo.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const PACKAGE_NAME = "api";
|
|
2
|
-
export declare const PACKAGE_VERSION = "5.0.
|
|
2
|
+
export declare const PACKAGE_VERSION = "5.0.4";
|
package/dist/packageInfo.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "api",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.4",
|
|
4
4
|
"description": "Magical SDK generation from an OpenAPI definition 🪄",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"get-stream": "^6.0.1",
|
|
53
53
|
"isomorphic-fetch": "^3.0.0",
|
|
54
54
|
"js-yaml": "^4.1.0",
|
|
55
|
-
"json-schema-to-ts": "^2.
|
|
55
|
+
"json-schema-to-ts": "^2.6.2-beta.0",
|
|
56
56
|
"json-schema-traverse": "^1.0.0",
|
|
57
57
|
"lodash.camelcase": "^4.3.0",
|
|
58
58
|
"lodash.deburr": "^4.1.0",
|
|
@@ -61,19 +61,20 @@
|
|
|
61
61
|
"lodash.startcase": "^4.4.0",
|
|
62
62
|
"make-dir": "^3.1.0",
|
|
63
63
|
"node-abort-controller": "^3.0.1",
|
|
64
|
-
"oas": "^20.0.
|
|
64
|
+
"oas": "^20.0.1",
|
|
65
65
|
"ora": "^5.4.1",
|
|
66
|
-
"prettier": "^2.
|
|
66
|
+
"prettier": "^2.8.0",
|
|
67
67
|
"prompts": "^2.4.2",
|
|
68
68
|
"remove-undefined-objects": "^2.0.1",
|
|
69
|
+
"semver": "^7.3.8",
|
|
69
70
|
"ssri": "^10.0.0",
|
|
70
|
-
"ts-morph": "^
|
|
71
|
+
"ts-morph": "^17.0.1",
|
|
71
72
|
"validate-npm-package-name": "^5.0.0"
|
|
72
73
|
},
|
|
73
74
|
"devDependencies": {
|
|
74
75
|
"@readme/oas-examples": "^5.7.1",
|
|
75
76
|
"@types/caseless": "^0.12.2",
|
|
76
|
-
"@types/chai": "^4.3.
|
|
77
|
+
"@types/chai": "^4.3.4",
|
|
77
78
|
"@types/find-cache-dir": "^3.2.1",
|
|
78
79
|
"@types/js-yaml": "^4.0.5",
|
|
79
80
|
"@types/lodash.camelcase": "^4.3.7",
|
|
@@ -81,10 +82,11 @@
|
|
|
81
82
|
"@types/lodash.merge": "^4.6.7",
|
|
82
83
|
"@types/lodash.setwith": "^4.3.7",
|
|
83
84
|
"@types/lodash.startcase": "^4.4.7",
|
|
84
|
-
"@types/mocha": "^10.0.
|
|
85
|
+
"@types/mocha": "^10.0.1",
|
|
85
86
|
"@types/prettier": "^2.7.1",
|
|
86
|
-
"@types/prompts": "^2.
|
|
87
|
-
"@types/
|
|
87
|
+
"@types/prompts": "^2.4.1",
|
|
88
|
+
"@types/semver": "^7.3.13",
|
|
89
|
+
"@types/sinon-chai": "^3.2.9",
|
|
88
90
|
"@types/ssri": "^7.1.1",
|
|
89
91
|
"@types/validate-npm-package-name": "^4.0.0",
|
|
90
92
|
"chai": "^4.3.6",
|
|
@@ -92,9 +94,10 @@
|
|
|
92
94
|
"mocha": "^10.0.0",
|
|
93
95
|
"mock-require": "^3.0.3",
|
|
94
96
|
"nyc": "^15.1.0",
|
|
95
|
-
"oas-normalize": "^
|
|
96
|
-
"sinon": "^
|
|
97
|
+
"oas-normalize": "^8.1.3",
|
|
98
|
+
"sinon": "^15.0.0",
|
|
97
99
|
"sinon-chai": "^3.7.0",
|
|
100
|
+
"type-fest": "^3.3.0",
|
|
98
101
|
"typescript": "^4.7.4",
|
|
99
102
|
"unique-temp-dir": "^1.0.0"
|
|
100
103
|
},
|
|
@@ -105,5 +108,5 @@
|
|
|
105
108
|
"test/"
|
|
106
109
|
]
|
|
107
110
|
},
|
|
108
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "e566a19f6b6b36cad43b7e4edbe1deb4a6fe8609"
|
|
109
112
|
}
|
|
@@ -4,12 +4,14 @@ import type Oas from 'oas';
|
|
|
4
4
|
import type { Operation } from 'oas';
|
|
5
5
|
import type { HttpMethods, SchemaObject } from 'oas/dist/rmoas.types';
|
|
6
6
|
import type { ClassDeclaration, JSDocStructure, OptionalKind, ParameterDeclarationStructure } from 'ts-morph';
|
|
7
|
+
import type { PackageJson } from 'type-fest';
|
|
7
8
|
|
|
8
9
|
import fs from 'fs';
|
|
9
10
|
import path from 'path';
|
|
10
11
|
|
|
11
12
|
import execa from 'execa';
|
|
12
13
|
import setWith from 'lodash.setwith';
|
|
14
|
+
import semver from 'semver';
|
|
13
15
|
import { IndentationText, Project, QuoteKind, ScriptTarget, VariableDeclarationKind } from 'ts-morph';
|
|
14
16
|
|
|
15
17
|
import logger from '../../logger';
|
|
@@ -76,7 +78,7 @@ export default class TSGenerator extends CodeGeneratorLanguage {
|
|
|
76
78
|
reason: "Required for the `api/dist/core` library that the codegen'd SDK uses for making requests.",
|
|
77
79
|
url: 'https://npm.im/api',
|
|
78
80
|
},
|
|
79
|
-
'json-schema-to-ts': {
|
|
81
|
+
'json-schema-to-ts@beta': {
|
|
80
82
|
reason: 'Required for TypeScript type handling.',
|
|
81
83
|
url: 'https://npm.im/json-schema-to-ts',
|
|
82
84
|
},
|
|
@@ -119,8 +121,17 @@ export default class TSGenerator extends CodeGeneratorLanguage {
|
|
|
119
121
|
async installer(storage: Storage, opts: InstallerOptions = {}): Promise<void> {
|
|
120
122
|
const installDir = storage.getIdentifierStorageDir();
|
|
121
123
|
|
|
122
|
-
const
|
|
124
|
+
const info = this.spec.getDefinition().info;
|
|
125
|
+
let pkgVersion = semver.coerce(info.version);
|
|
126
|
+
if (!pkgVersion) {
|
|
127
|
+
// If the version that's in `info.version` isn't compatible with semver NPM won't be able to
|
|
128
|
+
// handle it properly so we need to fallback to something it can.
|
|
129
|
+
pkgVersion = semver.coerce('0.0.0');
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
const pkg: PackageJson = {
|
|
123
133
|
name: `@api/${storage.identifier}`,
|
|
134
|
+
version: pkgVersion.version,
|
|
124
135
|
main: `./index.${this.outputJS ? 'js' : 'ts'}`,
|
|
125
136
|
types: './index.d.ts', // Types are always present regardless if you're getting compiled JS.
|
|
126
137
|
};
|
package/src/packageInfo.ts
CHANGED