@contract-case/case-connector 0.28.1 → 0.29.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/CHANGELOG.md +38 -0
- package/dist/cjs/src/entities/versionString.cjs +1 -1
- package/dist/cjs/src/entities/versionString.d.cts +1 -1
- package/dist/cjs/tsconfig.d841374c.tsbuildinfo +1 -0
- package/dist/src/entities/versionString.d.ts +1 -1
- package/dist/src/entities/versionString.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/eslint.config.mjs +4 -1
- package/package/case-connector.js +2 -2
- package/package/case-connector.js.LICENSE.txt +1 -1
- package/package/case-connector.js.map +1 -1
- package/package.json +8 -13
- package/rename-inner-webpack-vars-loader.cjs +22 -0
- package/webpack.config.cjs +7 -0
- package/dist/cjs/tsconfig.4b16e40d.tsbuildinfo +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contract-case/case-connector",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Connector to allow ContractCase to run as a server. Use only if you're creating a custom wrapper for a new language",
|
|
6
6
|
"author": "Timothy Jones <timothy.l.jones@gmail.com> (https://github.com/TimothyJones)",
|
|
@@ -35,9 +35,6 @@
|
|
|
35
35
|
"case-connector": "./dist/bin/case-connector.mjs"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
|
-
"build:proto": "npm run build:proto:js && npm run build:proto:ts && npm run format:fix",
|
|
39
|
-
"build:proto:js": "grpc_tools_node_protoc --js_out=import_style=commonjs,binary:src/connectors/grpc --grpc_out=grpc_js:src/connectors/grpc ./proto/contract_case_stream.proto",
|
|
40
|
-
"build:proto:ts": "grpc_tools_node_protoc --js_out=import_style=commonjs,binary:src/connectors/grpc --grpc_out=grpc_js:src/connectors/grpc --plugin=protoc-gen-grpc=../../node_modules/grpc_tools_node_protoc_ts/bin/protoc-gen-ts ./proto/contract_case_stream.proto",
|
|
41
38
|
"build": "rimraf {dist,package} && duel --project tsconfig.build.json && webpack-cli",
|
|
42
39
|
"postbuild": "attw --pack || attw --pack -f json",
|
|
43
40
|
"lint": "eslint",
|
|
@@ -52,14 +49,12 @@
|
|
|
52
49
|
},
|
|
53
50
|
"devDependencies": {
|
|
54
51
|
"@arethetypeswrong/cli": "^0.18.2",
|
|
55
|
-
"@contract-case/case-maintainer-config": "0.
|
|
56
|
-
"@contract-case/eslint-config-case-maintainer": "0.
|
|
52
|
+
"@contract-case/case-maintainer-config": "0.29.0",
|
|
53
|
+
"@contract-case/eslint-config-case-maintainer": "0.29.0",
|
|
57
54
|
"@knighted/duel": "^2.1.6",
|
|
58
55
|
"@types/google-protobuf": "^3.15.12",
|
|
59
56
|
"@types/jest": "^30.0.0",
|
|
60
57
|
"@types/uuid": "^11.0.0",
|
|
61
|
-
"grpc-tools": "^1.12.4",
|
|
62
|
-
"grpc_tools_node_protoc_ts": "^5.3.3",
|
|
63
58
|
"prettier": "3.6.2",
|
|
64
59
|
"rimraf": "^6.1.2",
|
|
65
60
|
"source-map-loader": "^5.0.0",
|
|
@@ -71,15 +66,15 @@
|
|
|
71
66
|
"webpack-cli": "^6.0.1"
|
|
72
67
|
},
|
|
73
68
|
"dependencies": {
|
|
74
|
-
"@contract-case/case-connector-proto": "0.
|
|
75
|
-
"@contract-case/case-core": "0.
|
|
76
|
-
"@contract-case/case-entities-internal": "0.
|
|
69
|
+
"@contract-case/case-connector-proto": "0.29.0",
|
|
70
|
+
"@contract-case/case-core": "0.29.0",
|
|
71
|
+
"@contract-case/case-entities-internal": "0.29.0",
|
|
77
72
|
"@grpc/grpc-js": "^1.13.3",
|
|
78
73
|
"@grpc/proto-loader": "^0.8.0",
|
|
79
74
|
"get-port": "^7.1.0",
|
|
80
75
|
"google-protobuf": "^3.21.4",
|
|
81
76
|
"pretty-format": "^30.2.0",
|
|
82
|
-
"uuid": "^
|
|
77
|
+
"uuid": "^14.0.0"
|
|
83
78
|
},
|
|
84
79
|
"stability": "stable",
|
|
85
80
|
"nx": {
|
|
@@ -118,5 +113,5 @@
|
|
|
118
113
|
}
|
|
119
114
|
}
|
|
120
115
|
},
|
|
121
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "f4d85d1ad6d31d2ba7f4cb14f5b7e8ee76e6a382"
|
|
122
117
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Webpack loader that renames internal webpack runtime variables in
|
|
3
|
+
* pre-bundled (webpack-compiled) third-party packages.
|
|
4
|
+
*
|
|
5
|
+
* pretty-format v30 ships its CJS build as a webpack bundle with its own
|
|
6
|
+
* __webpack_modules__, __webpack_require__, etc. When our outer webpack
|
|
7
|
+
* processes this file, it replaces bare `require()` calls (e.g.
|
|
8
|
+
* require("react-is")) with __webpack_require__(id). At runtime the inner
|
|
9
|
+
* __webpack_require__ shadows the outer one, so the outer's module ID is
|
|
10
|
+
* looked up in the inner's module map — which fails.
|
|
11
|
+
*
|
|
12
|
+
* By renaming the inner webpack variables, the shadowing is eliminated and
|
|
13
|
+
* the outer webpack can properly resolve and bundle all dependencies.
|
|
14
|
+
*/
|
|
15
|
+
module.exports = function renameInnerWebpackVars(source) {
|
|
16
|
+
return source
|
|
17
|
+
.replaceAll('__webpack_modules__', '__nested_webpack_modules__')
|
|
18
|
+
.replaceAll('__webpack_module_cache__', '__nested_webpack_module_cache__')
|
|
19
|
+
.replaceAll('__webpack_require__', '__nested_webpack_require__')
|
|
20
|
+
.replaceAll('__webpack_exports__', '__nested_webpack_exports__')
|
|
21
|
+
.replaceAll('__unused_webpack_module', '__unused_nested_webpack_module');
|
|
22
|
+
};
|
package/webpack.config.cjs
CHANGED
|
@@ -29,6 +29,13 @@ module.exports = {
|
|
|
29
29
|
use: ['source-map-loader'],
|
|
30
30
|
enforce: 'pre',
|
|
31
31
|
},
|
|
32
|
+
{
|
|
33
|
+
// pretty-format ships a nested webpack bundle as its CJS build.
|
|
34
|
+
// Rename its internal webpack variables so they don't shadow ours.
|
|
35
|
+
test: /pretty-format[/\\]build[/\\]index\.js$/,
|
|
36
|
+
enforce: 'pre',
|
|
37
|
+
use: [path.join(__dirname, 'rename-inner-webpack-vars-loader.cjs')],
|
|
38
|
+
},
|
|
32
39
|
],
|
|
33
40
|
},
|
|
34
41
|
optimization: {
|