@tramvai/build 6.1.1 → 6.1.3
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 +12 -25
- package/lib/builds/browser.d.ts.map +1 -1
- package/lib/builds/browser.js +3 -1
- package/lib/builds/browser.js.map +1 -1
- package/lib/builds/migrations.js +1 -1
- package/lib/builds/migrations.js.map +1 -1
- package/lib/builds/node-cjs.d.ts.map +1 -1
- package/lib/builds/node-cjs.js +3 -1
- package/lib/builds/node-cjs.js.map +1 -1
- package/lib/builds/node-es.d.ts.map +1 -1
- package/lib/builds/node-es.js +3 -1
- package/lib/builds/node-es.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,9 +24,7 @@ Add necessary fields to `package.json`:
|
|
|
24
24
|
"module": "lib/index.es.js",
|
|
25
25
|
"typings": "lib/index.d.ts",
|
|
26
26
|
"sideEffects": false,
|
|
27
|
-
"files": [
|
|
28
|
-
"lib"
|
|
29
|
-
]
|
|
27
|
+
"files": ["lib"]
|
|
30
28
|
}
|
|
31
29
|
```
|
|
32
30
|
|
|
@@ -53,21 +51,10 @@ Create `tsconfig.json`:
|
|
|
53
51
|
"outDir": "./lib",
|
|
54
52
|
"declarationDir": "./lib",
|
|
55
53
|
"types": ["node"],
|
|
56
|
-
"lib": [
|
|
57
|
-
"es2015",
|
|
58
|
-
"es2016",
|
|
59
|
-
"es2017",
|
|
60
|
-
"es2018",
|
|
61
|
-
"dom"
|
|
62
|
-
]
|
|
54
|
+
"lib": ["es2015", "es2016", "es2017", "es2018", "dom"]
|
|
63
55
|
},
|
|
64
56
|
"include": ["./src"],
|
|
65
|
-
"exclude": [
|
|
66
|
-
"**/*.spec.ts",
|
|
67
|
-
"**/*.spec.tsx",
|
|
68
|
-
"**/*.test.ts",
|
|
69
|
-
"**/*.test.tsx"
|
|
70
|
-
]
|
|
57
|
+
"exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.test.ts", "**/*.test.tsx"]
|
|
71
58
|
}
|
|
72
59
|
```
|
|
73
60
|
|
|
@@ -95,11 +82,11 @@ Such builds, especially for monorepositories with big number of packages, can ta
|
|
|
95
82
|
|
|
96
83
|
Recommended and automatically generated `package.json` for `@tramvai/build` allows apps to use packages that were built either with `tsc`, or with `@tramvai/build` without any additional steps.
|
|
97
84
|
|
|
98
|
-
All of the built bundles will contain `
|
|
85
|
+
All of the built bundles will contain `ES2022` standard code, it is expected that they will be used in Node.js 16+ or will be bundled to `ES5` using bundler (Webpack, etc.) with configured transpilation through `babel` for packages inside `node_modules`, written in modern JS.
|
|
99
86
|
|
|
100
87
|
### NodeJS bundle in CommonJs format
|
|
101
88
|
|
|
102
|
-
NodeJS
|
|
89
|
+
Modern NodeJS has support for ES modules, but `@tramvai/build` still generates bundle in `ES2022` standard in `CommonJS` format automatically for better interoperability with existing packages and tools that still do not support ES modules fully. Name of the result bundle is taken from field `main` in `package.json`, e.g. `lib/index.js`.
|
|
103
90
|
|
|
104
91
|
When bundling package in the app using `webpack` with option `target: 'node'` this `CommonJS` bundle probably will not be used as webpack will prefer to use `module` field while resolving source code.
|
|
105
92
|
|
|
@@ -107,19 +94,19 @@ When bundling package in the app using `webpack` with option `target: 'node'` th
|
|
|
107
94
|
|
|
108
95
|
### Bundle for bundlers (Webpack, etc.) in ES modules format
|
|
109
96
|
|
|
110
|
-
Modern bundlers support ES modules and non-standard field `"module"` in `package.json`. `@tramvai/build` generates bundle in `
|
|
97
|
+
Modern bundlers support ES modules and non-standard field `"module"` in `package.json`. `@tramvai/build` generates bundle in `ES2022` standard in `ES modules` format automatically. Name of the result bundle is calculates from field `main` in `package.json` by adding postfix `.es` e.g. `lib/index.es.js`.
|
|
111
98
|
|
|
112
99
|
If build was called with flag `--forPublish` to `package.json` will be added new field `"module": "lib/index.es.js"`.
|
|
113
100
|
|
|
114
101
|
When bundling package in the app through `webpack` with option `target: 'node'` bundle from field `module` will have higher priority over bundle from `main`.
|
|
115
102
|
|
|
116
|
-
> `
|
|
103
|
+
> `ES2022` code standard is generated as it is expected that bundle from field `"module"` will be resolved by bundler with configured transpilation through `babel` for packages inside `node_modules`, written in modern JS. This target is fully supported in Node.js 16+ versions.
|
|
117
104
|
|
|
118
105
|
### Bundle for browsers
|
|
119
106
|
|
|
120
|
-
Modern bundlers support ES modules and non-standard field `"browser"` in `package.json`. When field `browser` in specified in `package.json`, `@tramvai/build` will generate bundle in `
|
|
107
|
+
Modern bundlers support ES modules and non-standard field `"browser"` in `package.json`. When field `browser` in specified in `package.json`, `@tramvai/build` will generate bundle in `ES2022` standard in `ES modules` format.
|
|
121
108
|
|
|
122
|
-
If field `browser` in `package.json` is defined as a string then this string determines entry point to `browser` bundle and its name. E.g. when `"browser": "lib/browser.js"` entry point will be `src/
|
|
109
|
+
If field `browser` in `package.json` is defined as a string then this string determines entry point to `browser` bundle and its name. E.g. when `"browser": "lib/browser.js"` entry point will be `src/index.ts` and bundle will have a name `lib/browser.js`.
|
|
123
110
|
|
|
124
111
|
Otherwise, if field `browser` is defined as an object and build was called with flag `--forPublish` then name is defined by the field `main` in `package.json` with adding postfix `.browser` e.g. `lib/index.browser.js`. After that to field `browser` new property will be added as pointer for bundlers to bundle for the browser, instead of the field `module`:
|
|
125
112
|
|
|
@@ -134,7 +121,7 @@ Otherwise, if field `browser` is defined as an object and build was called with
|
|
|
134
121
|
|
|
135
122
|
> Specification for the field [browser](https://github.com/defunctzombie/package-browser-field-spec)
|
|
136
123
|
|
|
137
|
-
> `
|
|
124
|
+
> `ES2022` code standard is generated as it is expected that bundle from `"browser"` field will be resolved by bundler with configured transpilation through `babel` for packages inside `node_modules` written in modern JS to the code according to the `browserslist` config.
|
|
138
125
|
|
|
139
126
|
When building our package in the app with `webpack` with option `target: 'web'` bundle from field `browser` will be prioritized over field `module`.
|
|
140
127
|
|
|
@@ -216,7 +203,7 @@ new TramvaiBuild(options).copy();
|
|
|
216
203
|
|
|
217
204
|
### Build separate bundle for browsers
|
|
218
205
|
|
|
219
|
-
Let's say we have to entry points. One is for the server - `src/server.ts` and for the client - `src/
|
|
206
|
+
Let's say we have to entry points. One is for the server - `src/server.ts` and for the client - `src/index.ts`. In this case we should set field `browser` in `package.json` the next way:
|
|
220
207
|
|
|
221
208
|
```json
|
|
222
209
|
{
|
|
@@ -238,7 +225,7 @@ After build for publication we will get next `package.json`:
|
|
|
238
225
|
|
|
239
226
|
### Replace specific module for browser bundle
|
|
240
227
|
|
|
241
|
-
Let's say we have one entry point - `src/index.ts` and a module `src/external.ts` we want to replace by `src/external.
|
|
228
|
+
Let's say we have one entry point - `src/index.ts` and a module `src/external.ts` we want to replace by `src/external.index.ts`. In this case we should set field `browser` in `package.json` the next way:
|
|
242
229
|
|
|
243
230
|
```json
|
|
244
231
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/builds/browser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/builds/browser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAe,MAAM,WAAW,CAAC;AAepD,eAAO,MAAM,KAAK,EAAE,KAgDnB,CAAC"}
|
package/lib/builds/browser.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.build = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const object_1 = tslib_1.__importDefault(require("@tinkoff/utils/is/object"));
|
|
6
|
+
const typescript_1 = require("typescript");
|
|
6
7
|
const common_1 = require("./common");
|
|
7
8
|
const fileNames_ts_1 = require("../fileNames.ts");
|
|
8
9
|
const packageJson_1 = require("../packageJson");
|
|
@@ -24,7 +25,8 @@ exports.build = {
|
|
|
24
25
|
const entryBrowserFilename = (0, fileNames_ts_1.getBrowserEntryFilename)(params);
|
|
25
26
|
const input = (0, common_1.createInputOptions)(params, {
|
|
26
27
|
entry: (0, fileNames_ts_1.getBrowserSourceFilename)(params),
|
|
27
|
-
target
|
|
28
|
+
// packages will be transpiled by @tramvai/cli with browserslist target
|
|
29
|
+
target: typescript_1.ScriptTarget.ES2022,
|
|
28
30
|
resolveMainFields: ['browser', 'module', 'main'],
|
|
29
31
|
browser: true,
|
|
30
32
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../../src/builds/browser.ts"],"names":[],"mappings":";;;;AAAA,8EAAgD;
|
|
1
|
+
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../../src/builds/browser.ts"],"names":[],"mappings":";;;;AAAA,8EAAgD;AAChD,2CAA0C;AAE1C,qCAAmE;AACnE,kDAAoF;AACpF,gDAAwE;AACxE,uCAAiE;AAEjE,MAAM,aAAa,GAAG,CAAC,MAAmB,EAAE,EAAE;IAC5C,MAAM,YAAY,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;IAC7C,MAAM,oBAAoB,GAAG,IAAA,sCAAuB,EAAC,MAAM,CAAC,CAAC;IAE7D,OAAO,oBAAoB,KAAK,YAAY;QAC1C,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,EAAE,aAAa,CAAC;QAC9C,CAAC,CAAC,oBAAoB,CAAC;AAC3B,CAAC,CAAC;AAEW,QAAA,KAAK,GAAU;IAC1B,IAAI,EAAE,SAAS;IACf,KAAK,CAAC,aAAa,CAAC,EAAE,WAAW,EAAE;QACjC,OAAO,OAAO,CAAC,WAAW,CAAC,IAAI,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC;IAC1D,CAAC;IACD,KAAK,CAAC,UAAU,CAAC,MAAM;QACrB,MAAM,YAAY,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;QAC7C,MAAM,oBAAoB,GAAG,IAAA,sCAAuB,EAAC,MAAM,CAAC,CAAC;QAE7D,MAAM,KAAK,GAAG,IAAA,2BAAkB,EAAC,MAAM,EAAE;YACvC,KAAK,EAAE,IAAA,uCAAwB,EAAC,MAAM,CAAC;YACvC,uEAAuE;YACvE,MAAM,EAAE,yBAAY,CAAC,MAAM;YAC3B,iBAAiB,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAC;YAChD,OAAO,EAAE,IAAI;SACd,CAAC,CAAC;QACH,MAAM,MAAM,GAAG,IAAA,4BAAmB,EAAC,MAAM,EAAE;YACzC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC;YAC3B,MAAM,EAAE,KAAK;YACb,YAAY,EAAE,MAAM;YACpB,OAAO,EAAE,aAAa;YACtB,oGAAoG;YACpG,sFAAsF;YACtF,uEAAuE;YACvE,eAAe,EAAE,oBAAoB,KAAK,YAAY;SACvD,CAAC,CAAC;QAEH,OAAO;YACL,KAAK;YACL,MAAM;SACP,CAAC;IACJ,CAAC;IACD,KAAK,CAAC,iBAAiB,CAAC,MAAM;QAC5B,MAAM,cAAc,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;QAC7C,MAAM,eAAe,GAAG,EAAE,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;QAElD,IAAI,IAAA,gBAAQ,EAAC,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE;YACxC,eAAe,CAAC,OAAO,GAAG;gBACxB,GAAG,MAAM,CAAC,WAAW,CAAC,OAAO;gBAC7B,CAAC,IAAA,oDAAsC,EAAC,IAAA,uBAAmB,EAAC,MAAM,CAAC,CAAC,CAAC,EACnE,IAAA,oDAAsC,EAAC,cAAc,CAAC;aACzD,CAAC;SACH;QAED,OAAO,eAAe,CAAC,MAAM,CAAC;QAE9B,OAAO,eAAe,CAAC;IACzB,CAAC;CACF,CAAC"}
|
package/lib/builds/migrations.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrations.js","sourceRoot":"","sources":["../../src/builds/migrations.ts"],"names":[],"mappings":";;;;AAAA,kEAA6B;AAC7B,8FAA4D;AAC5D,8EAA6C;AAC7C,gFAAw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AC,IAAI,EAAE,CAAC;SACb;QACD,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;IAEF,OAAO;QACL,IAAI,EAAE,YAAY;QAClB,KAAK,CAAC,aAAa;YACjB,MAAM,OAAO,GAAG,MAAM,aAAa,EAAE,CAAC;YACtC,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;QAC5B,CAAC;QACD,KAAK,CAAC,UAAU;YACd,MAAM,OAAO,GAAG,MAAM,aAAa,EAAE,CAAC;YAEtC,OAAO;gBACL,KAAK,EAAE;oBACL,KAAK,EAAE,OAAO;oBACd,QAAQ,EAAE,iCAAqB;oBAC/B,OAAO,EAAE;wBACP,IAAA,qBAAU,GAAE;wBACZ,IAAA,0BAAQ,EAAC;4BACP,YAAY,EAAE,KAAK;4BACnB,QAAQ,EAAE;gCACR,MAAM,EAAE,QAAQ;gCAChB,MAAM,EAAE,QAAQ;gCAChB,WAAW,EAAE,KAAK;gCAClB,sBAAsB,EAAE,IAAI;gCAC5B,SAAS,EAAE,KAAK;6BACjB;4BACD,OAAO,EAAE,CAAC,iBAAiB,CAAC;yBAC7B,CAAC;qBACH;iBACF;gBACD,MAAM,EAAE;oBACN,GAAG,EAAE,gBAAgB;oBACrB,MAAM,EAAE,KAAK;oBACb,OAAO,EAAE,SAAS;iBACnB;aACF,CAAC;QACJ,CAAC;QACD,KAAK,CAAC,iBAAiB,CAAC,EAAE,WAAW,EAAE;YACrC,OAAO;gBACL,GAAG,WAAW;gBACd,KAAK,EAAE,IAAA,wBAAU,EAAC,WAAW,EAAE,CAAC,gBAAgB,CAAC,CAAC;aACnD,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAvDW,QAAA,WAAW,eAuDtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-cjs.d.ts","sourceRoot":"","sources":["../../src/builds/node-cjs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"node-cjs.d.ts","sourceRoot":"","sources":["../../src/builds/node-cjs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAe,MAAM,WAAW,CAAC;AAUpD,eAAO,MAAM,KAAK,EAAE,KAkCnB,CAAC"}
|
package/lib/builds/node-cjs.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.build = void 0;
|
|
4
|
+
const typescript_1 = require("typescript");
|
|
4
5
|
const common_1 = require("./common");
|
|
5
6
|
const fileNames_ts_1 = require("../fileNames.ts");
|
|
6
7
|
const buildFileName = (params) => {
|
|
@@ -16,7 +17,8 @@ exports.build = {
|
|
|
16
17
|
async getOptions(params) {
|
|
17
18
|
const input = (0, common_1.createInputOptions)(params, {
|
|
18
19
|
entry: (0, fileNames_ts_1.getSourceFilename)(params),
|
|
19
|
-
|
|
20
|
+
// Node.js 16+ support - https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping#node-18
|
|
21
|
+
target: typescript_1.ScriptTarget.ES2022,
|
|
20
22
|
});
|
|
21
23
|
const output = (0, common_1.createOutputOptions)(params, {
|
|
22
24
|
file: buildFileName(params),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-cjs.js","sourceRoot":"","sources":["../../src/builds/node-cjs.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"node-cjs.js","sourceRoot":"","sources":["../../src/builds/node-cjs.ts"],"names":[],"mappings":";;;AAAA,2CAA0C;AAE1C,qCAAmE;AACnE,kDAAoD;AAEpD,MAAM,aAAa,GAAG,CAAC,MAAmB,EAAE,EAAE;IAC5C,MAAM,YAAY,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;IAE7C,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC;AAEW,QAAA,KAAK,GAAU;IAC1B,IAAI,EAAE,UAAU;IAChB,SAAS,EAAE,MAAM;IACjB,KAAK,CAAC,aAAa,CAAC,EAAE,WAAW,EAAE;QACjC,OAAO,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IACD,KAAK,CAAC,UAAU,CAAC,MAAM;QACrB,MAAM,KAAK,GAAG,IAAA,2BAAkB,EAAC,MAAM,EAAE;YACvC,KAAK,EAAE,IAAA,gCAAiB,EAAC,MAAM,CAAC;YAChC,iGAAiG;YACjG,MAAM,EAAE,yBAAY,CAAC,MAAM;SAC5B,CAAC,CAAC;QACH,MAAM,MAAM,GAAG,IAAA,4BAAmB,EAAC,MAAM,EAAE;YACzC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC;YAC3B,MAAM,EAAE,KAAK;YACb,YAAY,EAAE,OAAO;YACrB,OAAO,EAAE,KAAK;SACf,CAAC,CAAC;QAEH,OAAO;YACL,KAAK;YACL,MAAM;SACP,CAAC;IACJ,CAAC;IACD,KAAK,CAAC,iBAAiB,CAAC,MAAM;QAC5B,MAAM,eAAe,GAAG;YACtB,GAAG,MAAM,CAAC,WAAW;YACrB,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC;SAC5B,CAAC;QAEF,OAAO,eAAe,CAAC,MAAM,CAAC;QAE9B,OAAO,eAAe,CAAC;IACzB,CAAC;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-es.d.ts","sourceRoot":"","sources":["../../src/builds/node-es.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"node-es.d.ts","sourceRoot":"","sources":["../../src/builds/node-es.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAIpD,eAAO,MAAM,aAAa,WAAY,WAAW,WAIhD,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAkCnB,CAAC"}
|
package/lib/builds/node-es.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.build = exports.buildFileName = void 0;
|
|
4
|
+
const typescript_1 = require("typescript");
|
|
4
5
|
const common_1 = require("./common");
|
|
5
6
|
const fileNames_ts_1 = require("../fileNames.ts");
|
|
6
7
|
const buildFileName = (params) => {
|
|
@@ -17,7 +18,8 @@ exports.build = {
|
|
|
17
18
|
async getOptions(params) {
|
|
18
19
|
const input = (0, common_1.createInputOptions)(params, {
|
|
19
20
|
entry: (0, fileNames_ts_1.getSourceFilename)(params),
|
|
20
|
-
|
|
21
|
+
// Node.js 16+ support - https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping#node-18
|
|
22
|
+
target: typescript_1.ScriptTarget.ES2022,
|
|
21
23
|
});
|
|
22
24
|
const output = (0, common_1.createOutputOptions)(params, {
|
|
23
25
|
file: (0, exports.buildFileName)(params),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-es.js","sourceRoot":"","sources":["../../src/builds/node-es.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"node-es.js","sourceRoot":"","sources":["../../src/builds/node-es.ts"],"names":[],"mappings":";;;AAAA,2CAA0C;AAE1C,qCAAmE;AACnE,kDAAoD;AAE7C,MAAM,aAAa,GAAG,CAAC,MAAmB,EAAE,EAAE;IACnD,MAAM,YAAY,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;IAE7C,OAAO,YAAY,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;AACjD,CAAC,CAAC;AAJW,QAAA,aAAa,iBAIxB;AAEW,QAAA,KAAK,GAAU;IAC1B,IAAI,EAAE,SAAS;IACf,SAAS,EAAE,MAAM;IACjB,KAAK,CAAC,aAAa,CAAC,EAAE,WAAW,EAAE;QACjC,OAAO,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IACD,KAAK,CAAC,UAAU,CAAC,MAAM;QACrB,MAAM,KAAK,GAAG,IAAA,2BAAkB,E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