vovk 3.0.0-draft.474 → 3.0.0-draft.475
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.
|
@@ -17,7 +17,7 @@ function resolveGeneratorConfigValues({ config, outputConfigs, segmentName, isBu
|
|
|
17
17
|
types: './index.d.mts',
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
|
-
}, Object.fromEntries(Object.entries(projectPackageJson ?? {}).filter(([key]) => ['name', 'version', 'description', 'license', 'authors', 'repository', 'homepage', 'bugs', 'keywords'].includes(key))), config?.outputConfig?.package,
|
|
20
|
+
}, Object.fromEntries(Object.entries(projectPackageJson ?? {}).filter(([key]) => ['name', 'version', 'description', 'license', 'authors', 'repository', 'homepage', 'bugs', 'keywords'].includes(key))), config?.outputConfig?.package, typeof segmentName === 'string' ? config?.outputConfig?.segments?.[segmentName]?.package : undefined, outputConfigs?.reduce((acc, config) => (0, deepExtend_1.default)(acc, config.package), {}), isBundle ? config?.bundle?.outputConfig?.package : undefined);
|
|
21
21
|
return {
|
|
22
22
|
package: packageJson,
|
|
23
23
|
openAPIObject: (0, deepExtend_1.default)({}, {
|
|
@@ -27,14 +27,14 @@ function resolveGeneratorConfigValues({ config, outputConfigs, segmentName, isBu
|
|
|
27
27
|
version: packageJson.version,
|
|
28
28
|
description: packageJson.description,
|
|
29
29
|
},
|
|
30
|
-
}, config?.outputConfig?.openAPIObject,
|
|
31
|
-
samples: (0, deepExtend_1.default)({}, config?.outputConfig?.samples,
|
|
32
|
-
readme: (0, deepExtend_1.default)({}, config?.outputConfig?.readme,
|
|
30
|
+
}, config?.outputConfig?.openAPIObject, typeof segmentName === 'string' ? config?.outputConfig?.segments?.[segmentName]?.openAPIObject : undefined, outputConfigs?.reduce((acc, config) => (0, deepExtend_1.default)(acc, config.openAPIObject), {}), isBundle ? config?.bundle?.outputConfig?.openAPIObject : undefined),
|
|
31
|
+
samples: (0, deepExtend_1.default)({}, config?.outputConfig?.samples, typeof segmentName === 'string' ? config?.outputConfig?.segments?.[segmentName]?.samples : undefined, outputConfigs?.reduce((acc, config) => (0, deepExtend_1.default)(acc, config.samples), {}), isBundle ? config?.bundle?.outputConfig?.samples : undefined),
|
|
32
|
+
readme: (0, deepExtend_1.default)({}, config?.outputConfig?.readme, typeof segmentName === 'string' ? config?.outputConfig?.segments?.[segmentName]?.readme : undefined, outputConfigs?.reduce((acc, config) => (0, deepExtend_1.default)(acc, config.readme), {}), isBundle ? config?.bundle?.outputConfig?.readme : undefined),
|
|
33
33
|
origin: [
|
|
34
34
|
config?.outputConfig?.origin,
|
|
35
|
-
isBundle ? config?.bundle?.outputConfig?.origin : undefined,
|
|
36
35
|
typeof segmentName === 'string' ? config?.outputConfig?.segments?.[segmentName]?.origin : undefined,
|
|
37
36
|
...(outputConfigs?.map((config) => config.origin) ?? []),
|
|
37
|
+
isBundle ? config?.bundle?.outputConfig?.origin : undefined,
|
|
38
38
|
]
|
|
39
39
|
.filter(Boolean)
|
|
40
40
|
.at(-1)
|
|
@@ -44,15 +44,15 @@ function resolveGeneratorConfigValues({ config, outputConfigs, segmentName, isBu
|
|
|
44
44
|
fetcher: ['vovk'],
|
|
45
45
|
validateOnClient: null,
|
|
46
46
|
createRPC: ['vovk'],
|
|
47
|
-
}, config?.outputConfig?.imports,
|
|
47
|
+
}, config?.outputConfig?.imports, typeof segmentName === 'string' ? config?.outputConfig?.segments?.[segmentName]?.imports : undefined, outputConfigs?.reduce((acc, config) => (0, deepExtend_1.default)(acc, config.imports), {}), isBundle ? config?.bundle?.outputConfig?.imports : undefined),
|
|
48
48
|
reExports: (0, deepExtend_1.default)(
|
|
49
49
|
// segmentName can be an empty string (for the root segment) and null (for composed clients)
|
|
50
50
|
// therefore, !segmentName indicates that this either a composed client or a root segment of a segmented client
|
|
51
|
-
{}, !segmentName && config?.outputConfig?.reExports,
|
|
51
|
+
{}, !segmentName && config?.outputConfig?.reExports,
|
|
52
52
|
// for segmented client, apply all reExports from all segments
|
|
53
53
|
typeof segmentName !== 'string' &&
|
|
54
54
|
Object.values(config?.outputConfig?.segments ?? {}).reduce((acc, segmentConfig) => (0, deepExtend_1.default)(acc, segmentConfig.reExports ?? {}), {}),
|
|
55
55
|
// for a specific segment, apply reExports from that segment
|
|
56
|
-
typeof segmentName === 'string' ? config?.outputConfig?.segments?.[segmentName]?.reExports : undefined, outputConfigs?.reduce((acc, config) => (0, deepExtend_1.default)(acc, config.reExports), {})),
|
|
56
|
+
typeof segmentName === 'string' ? config?.outputConfig?.segments?.[segmentName]?.reExports : undefined, outputConfigs?.reduce((acc, config) => (0, deepExtend_1.default)(acc, config.reExports), {}), isBundle ? config?.bundle?.outputConfig?.reExports : undefined),
|
|
57
57
|
};
|
|
58
58
|
}
|
|
@@ -17,7 +17,7 @@ function resolveGeneratorConfigValues({ config, outputConfigs, segmentName, isBu
|
|
|
17
17
|
types: './index.d.mts',
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
|
-
}, Object.fromEntries(Object.entries(projectPackageJson ?? {}).filter(([key]) => ['name', 'version', 'description', 'license', 'authors', 'repository', 'homepage', 'bugs', 'keywords'].includes(key))), config?.outputConfig?.package,
|
|
20
|
+
}, Object.fromEntries(Object.entries(projectPackageJson ?? {}).filter(([key]) => ['name', 'version', 'description', 'license', 'authors', 'repository', 'homepage', 'bugs', 'keywords'].includes(key))), config?.outputConfig?.package, typeof segmentName === 'string' ? config?.outputConfig?.segments?.[segmentName]?.package : undefined, outputConfigs?.reduce((acc, config) => (0, deepExtend_1.default)(acc, config.package), {}), isBundle ? config?.bundle?.outputConfig?.package : undefined);
|
|
21
21
|
return {
|
|
22
22
|
package: packageJson,
|
|
23
23
|
openAPIObject: (0, deepExtend_1.default)({}, {
|
|
@@ -27,14 +27,14 @@ function resolveGeneratorConfigValues({ config, outputConfigs, segmentName, isBu
|
|
|
27
27
|
version: packageJson.version,
|
|
28
28
|
description: packageJson.description,
|
|
29
29
|
},
|
|
30
|
-
}, config?.outputConfig?.openAPIObject,
|
|
31
|
-
samples: (0, deepExtend_1.default)({}, config?.outputConfig?.samples,
|
|
32
|
-
readme: (0, deepExtend_1.default)({}, config?.outputConfig?.readme,
|
|
30
|
+
}, config?.outputConfig?.openAPIObject, typeof segmentName === 'string' ? config?.outputConfig?.segments?.[segmentName]?.openAPIObject : undefined, outputConfigs?.reduce((acc, config) => (0, deepExtend_1.default)(acc, config.openAPIObject), {}), isBundle ? config?.bundle?.outputConfig?.openAPIObject : undefined),
|
|
31
|
+
samples: (0, deepExtend_1.default)({}, config?.outputConfig?.samples, typeof segmentName === 'string' ? config?.outputConfig?.segments?.[segmentName]?.samples : undefined, outputConfigs?.reduce((acc, config) => (0, deepExtend_1.default)(acc, config.samples), {}), isBundle ? config?.bundle?.outputConfig?.samples : undefined),
|
|
32
|
+
readme: (0, deepExtend_1.default)({}, config?.outputConfig?.readme, typeof segmentName === 'string' ? config?.outputConfig?.segments?.[segmentName]?.readme : undefined, outputConfigs?.reduce((acc, config) => (0, deepExtend_1.default)(acc, config.readme), {}), isBundle ? config?.bundle?.outputConfig?.readme : undefined),
|
|
33
33
|
origin: [
|
|
34
34
|
config?.outputConfig?.origin,
|
|
35
|
-
isBundle ? config?.bundle?.outputConfig?.origin : undefined,
|
|
36
35
|
typeof segmentName === 'string' ? config?.outputConfig?.segments?.[segmentName]?.origin : undefined,
|
|
37
36
|
...(outputConfigs?.map((config) => config.origin) ?? []),
|
|
37
|
+
isBundle ? config?.bundle?.outputConfig?.origin : undefined,
|
|
38
38
|
]
|
|
39
39
|
.filter(Boolean)
|
|
40
40
|
.at(-1)
|
|
@@ -44,15 +44,15 @@ function resolveGeneratorConfigValues({ config, outputConfigs, segmentName, isBu
|
|
|
44
44
|
fetcher: ['vovk'],
|
|
45
45
|
validateOnClient: null,
|
|
46
46
|
createRPC: ['vovk'],
|
|
47
|
-
}, config?.outputConfig?.imports,
|
|
47
|
+
}, config?.outputConfig?.imports, typeof segmentName === 'string' ? config?.outputConfig?.segments?.[segmentName]?.imports : undefined, outputConfigs?.reduce((acc, config) => (0, deepExtend_1.default)(acc, config.imports), {}), isBundle ? config?.bundle?.outputConfig?.imports : undefined),
|
|
48
48
|
reExports: (0, deepExtend_1.default)(
|
|
49
49
|
// segmentName can be an empty string (for the root segment) and null (for composed clients)
|
|
50
50
|
// therefore, !segmentName indicates that this either a composed client or a root segment of a segmented client
|
|
51
|
-
{}, !segmentName && config?.outputConfig?.reExports,
|
|
51
|
+
{}, !segmentName && config?.outputConfig?.reExports,
|
|
52
52
|
// for segmented client, apply all reExports from all segments
|
|
53
53
|
typeof segmentName !== 'string' &&
|
|
54
54
|
Object.values(config?.outputConfig?.segments ?? {}).reduce((acc, segmentConfig) => (0, deepExtend_1.default)(acc, segmentConfig.reExports ?? {}), {}),
|
|
55
55
|
// for a specific segment, apply reExports from that segment
|
|
56
|
-
typeof segmentName === 'string' ? config?.outputConfig?.segments?.[segmentName]?.reExports : undefined, outputConfigs?.reduce((acc, config) => (0, deepExtend_1.default)(acc, config.reExports), {})),
|
|
56
|
+
typeof segmentName === 'string' ? config?.outputConfig?.segments?.[segmentName]?.reExports : undefined, outputConfigs?.reduce((acc, config) => (0, deepExtend_1.default)(acc, config.reExports), {}), isBundle ? config?.bundle?.outputConfig?.reExports : undefined),
|
|
57
57
|
};
|
|
58
58
|
}
|