jsii-pacmak 1.102.0 → 1.103.1
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/lib/builder.js +1 -0
- package/lib/index.js +4 -1
- package/lib/targets/dotnet/dotnetgenerator.js +4 -0
- package/lib/targets/go.js +1 -0
- package/lib/targets/python/type-name.js +2 -2
- package/lib/targets/python.js +23 -2
- package/lib/version.d.ts +1 -1
- package/lib/version.js +3 -3
- package/package.json +14 -14
package/lib/builder.js
CHANGED
package/lib/index.js
CHANGED
|
@@ -79,6 +79,7 @@ async function pacmak({ argv = {}, clean = true, codeOnly = false, fingerprint =
|
|
|
79
79
|
}))
|
|
80
80
|
.then(() => logging.info(`${targetSet.targetType} finished`), (err) => {
|
|
81
81
|
logging.warn(`${targetSet.targetType} failed`);
|
|
82
|
+
// eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
|
|
82
83
|
return Promise.reject(err);
|
|
83
84
|
});
|
|
84
85
|
}, { parallel }));
|
|
@@ -135,7 +136,9 @@ function mapParallelOrSerial(collection, mapper, { parallel }) {
|
|
|
135
136
|
? // Running parallel, or first element
|
|
136
137
|
mapper(item)
|
|
137
138
|
: // Wait for the previous promise, then make the next one
|
|
138
|
-
result[result.length - 1].then(() => mapper(item),
|
|
139
|
+
result[result.length - 1].then(() => mapper(item),
|
|
140
|
+
// eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
|
|
141
|
+
(error) => Promise.reject(error)));
|
|
139
142
|
}
|
|
140
143
|
return result;
|
|
141
144
|
}
|
|
@@ -994,6 +994,7 @@ async function tryDownloadResource(urlText, into) {
|
|
|
994
994
|
fs.mkdirpSync(path.join(into, 'resources'));
|
|
995
995
|
}
|
|
996
996
|
catch (err) {
|
|
997
|
+
// eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
|
|
997
998
|
return ko(err);
|
|
998
999
|
}
|
|
999
1000
|
try {
|
|
@@ -1018,6 +1019,7 @@ async function tryDownloadResource(urlText, into) {
|
|
|
1018
1019
|
offset += fs.writeSync(fd, buff, offset);
|
|
1019
1020
|
}
|
|
1020
1021
|
catch (err) {
|
|
1022
|
+
// eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
|
|
1021
1023
|
return ko(err);
|
|
1022
1024
|
}
|
|
1023
1025
|
}
|
|
@@ -1028,11 +1030,13 @@ async function tryDownloadResource(urlText, into) {
|
|
|
1028
1030
|
ok(filePath);
|
|
1029
1031
|
}
|
|
1030
1032
|
catch (err) {
|
|
1033
|
+
// eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
|
|
1031
1034
|
ko(err);
|
|
1032
1035
|
}
|
|
1033
1036
|
});
|
|
1034
1037
|
}
|
|
1035
1038
|
catch (err) {
|
|
1039
|
+
// eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
|
|
1036
1040
|
return ko(err);
|
|
1037
1041
|
}
|
|
1038
1042
|
break;
|
package/lib/targets/go.js
CHANGED
|
@@ -42,6 +42,7 @@ class Golang extends target_1.Target {
|
|
|
42
42
|
}
|
|
43
43
|
catch (e) {
|
|
44
44
|
logging.info(`[${pkgDir}] Content of ${localGoMod.path} file:\n${localGoMod.content}`);
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
|
|
45
46
|
return Promise.reject(e);
|
|
46
47
|
}
|
|
47
48
|
if (process.env.JSII_BUILD_GO) {
|
|
@@ -305,8 +305,8 @@ function getPackageName(fqn, rootAssm) {
|
|
|
305
305
|
const assemblyName = segments[0];
|
|
306
306
|
const config = assemblyName === rootAssm.name
|
|
307
307
|
? rootAssm
|
|
308
|
-
: rootAssm.dependencyClosure?.[assemblyName] ??
|
|
309
|
-
(0, util_1.die)(`Unable to find configuration for assembly "${assemblyName}" in dependency closure`);
|
|
308
|
+
: (rootAssm.dependencyClosure?.[assemblyName] ??
|
|
309
|
+
(0, util_1.die)(`Unable to find configuration for assembly "${assemblyName}" in dependency closure`));
|
|
310
310
|
const rootPkg = config.targets?.python?.module ??
|
|
311
311
|
(0, util_1.die)(`No Python target was configured in assembly "${assemblyName}"`);
|
|
312
312
|
const pkg = new Array();
|
package/lib/targets/python.js
CHANGED
|
@@ -1191,7 +1191,28 @@ class PythonModule {
|
|
|
1191
1191
|
code.line('import publication');
|
|
1192
1192
|
code.line('import typing_extensions');
|
|
1193
1193
|
code.line();
|
|
1194
|
-
code.line('
|
|
1194
|
+
code.line('import typeguard');
|
|
1195
|
+
code.line('from importlib.metadata import version as _metadata_package_version');
|
|
1196
|
+
code.line("TYPEGUARD_MAJOR_VERSION = int(_metadata_package_version('typeguard').split('.')[0])");
|
|
1197
|
+
code.line();
|
|
1198
|
+
code.openBlock('def check_type(argname: str, value: object, expected_type: typing.Any) -> typing.Any');
|
|
1199
|
+
code.openBlock('if TYPEGUARD_MAJOR_VERSION <= 2');
|
|
1200
|
+
code.line('return typeguard.check_type(argname=argname, value=value, expected_type=expected_type) # type:ignore');
|
|
1201
|
+
code.closeBlock();
|
|
1202
|
+
code.openBlock('else');
|
|
1203
|
+
code.line('if isinstance(value, jsii._reference_map.InterfaceDynamicProxy): # pyright: ignore [reportAttributeAccessIssue]');
|
|
1204
|
+
code.line(' pass');
|
|
1205
|
+
code.openBlock('else');
|
|
1206
|
+
code.openBlock('if TYPEGUARD_MAJOR_VERSION == 3');
|
|
1207
|
+
code.line('typeguard.config.collection_check_strategy = typeguard.CollectionCheckStrategy.ALL_ITEMS # type:ignore');
|
|
1208
|
+
code.line('typeguard.check_type(value=value, expected_type=expected_type) # type:ignore');
|
|
1209
|
+
code.closeBlock();
|
|
1210
|
+
code.openBlock('else');
|
|
1211
|
+
code.line('typeguard.check_type(value=value, expected_type=expected_type, collection_check_strategy=typeguard.CollectionCheckStrategy.ALL_ITEMS) # type:ignore');
|
|
1212
|
+
code.closeBlock();
|
|
1213
|
+
code.closeBlock();
|
|
1214
|
+
code.closeBlock();
|
|
1215
|
+
code.closeBlock();
|
|
1195
1216
|
// Determine if we need to write out the kernel load line.
|
|
1196
1217
|
if (this.loadAssembly) {
|
|
1197
1218
|
this.emitDependencyImports(code);
|
|
@@ -1474,7 +1495,7 @@ class Package {
|
|
|
1474
1495
|
install_requires: [
|
|
1475
1496
|
`jsii${(0, version_utils_1.toPythonVersionRange)(`^${version_1.VERSION}`)}`,
|
|
1476
1497
|
'publication>=0.0.3',
|
|
1477
|
-
'typeguard
|
|
1498
|
+
'typeguard>=2.13.3,<5.0.0',
|
|
1478
1499
|
]
|
|
1479
1500
|
.concat(dependencies)
|
|
1480
1501
|
.sort(),
|
package/lib/version.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The short version number for this jsii-pacmak release (e.g: `X.Y.Z`) */
|
|
2
2
|
export declare const VERSION: string;
|
|
3
3
|
/** The qualified version number for this jsii-pacmak release (e.g: `X.Y.Z (build #######)`) */
|
|
4
|
-
export declare const VERSION_DESC = "1.
|
|
4
|
+
export declare const VERSION_DESC = "1.103.1 (build bef2dea)";
|
|
5
5
|
//# sourceMappingURL=version.d.ts.map
|
package/lib/version.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Generated at 2024-08-
|
|
2
|
+
// Generated at 2024-08-30T13:09:16Z by generate.sh
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.VERSION_DESC = exports.VERSION = void 0;
|
|
5
5
|
/** The short version number for this jsii-pacmak release (e.g: `X.Y.Z`) */
|
|
6
6
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
7
|
-
exports.VERSION = '1.
|
|
7
|
+
exports.VERSION = '1.103.1';
|
|
8
8
|
/** The qualified version number for this jsii-pacmak release (e.g: `X.Y.Z (build #######)`) */
|
|
9
|
-
exports.VERSION_DESC = '1.
|
|
9
|
+
exports.VERSION_DESC = '1.103.1 (build bef2dea)';
|
|
10
10
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsii-pacmak",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.103.1",
|
|
4
4
|
"description": "A code generation framework for jsii backend languages",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -37,38 +37,38 @@
|
|
|
37
37
|
"package": "package-js"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@jsii/check-node": "1.
|
|
41
|
-
"@jsii/spec": "^1.
|
|
40
|
+
"@jsii/check-node": "1.103.1",
|
|
41
|
+
"@jsii/spec": "^1.103.1",
|
|
42
42
|
"clone": "^2.1.2",
|
|
43
|
-
"codemaker": "^1.
|
|
43
|
+
"codemaker": "^1.103.1",
|
|
44
44
|
"commonmark": "^0.31.1",
|
|
45
45
|
"escape-string-regexp": "^4.0.0",
|
|
46
46
|
"fs-extra": "^10.1.0",
|
|
47
|
-
"jsii-reflect": "^1.
|
|
47
|
+
"jsii-reflect": "^1.103.1",
|
|
48
48
|
"semver": "^7.6.3",
|
|
49
49
|
"spdx-license-list": "^6.9.0",
|
|
50
50
|
"xmlbuilder": "^15.1.1",
|
|
51
51
|
"yargs": "^16.2.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@jsii/dotnet-runtime": "^1.
|
|
55
|
-
"@jsii/java-runtime": "^1.
|
|
56
|
-
"@jsii/go-runtime": "^1.
|
|
57
|
-
"@scope/jsii-calc-lib": "^1.
|
|
54
|
+
"@jsii/dotnet-runtime": "^1.103.1",
|
|
55
|
+
"@jsii/java-runtime": "^1.103.1",
|
|
56
|
+
"@jsii/go-runtime": "^1.103.1",
|
|
57
|
+
"@scope/jsii-calc-lib": "^1.103.1",
|
|
58
58
|
"@types/clone": "^2.1.4",
|
|
59
59
|
"@types/diff": "^5.2.1",
|
|
60
60
|
"@types/commonmark": "^0.27.9",
|
|
61
61
|
"@types/fs-extra": "^9.0.13",
|
|
62
62
|
"@types/semver": "^7.5.8",
|
|
63
63
|
"diff": "^5.2.0",
|
|
64
|
-
"jsii": "^1.
|
|
65
|
-
"jsii-build-tools": "^1.
|
|
64
|
+
"jsii": "^1.103.1",
|
|
65
|
+
"jsii-build-tools": "^1.103.1",
|
|
66
66
|
"jsii-calc": "^3.20.120",
|
|
67
|
-
"jsii-rosetta": "^1.
|
|
68
|
-
"pyright": "^1.1.
|
|
67
|
+
"jsii-rosetta": "^1.103.1",
|
|
68
|
+
"pyright": "^1.1.377"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
|
-
"jsii-rosetta": "^1.
|
|
71
|
+
"jsii-rosetta": "^1.103.1 || ~5.2.0 || ~5.3.0 || ~5.4.0 || ~5.5.0"
|
|
72
72
|
},
|
|
73
73
|
"keywords": [
|
|
74
74
|
"jsii",
|