@tramvai/build 6.0.2 → 6.1.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/README.md +6 -6
- package/lib/builds/browser.js +35 -38
- package/lib/builds/browser.js.map +1 -1
- package/lib/builds/common.js +11 -1
- package/lib/builds/common.js.map +1 -1
- package/lib/builds/migrations.js +38 -41
- package/lib/builds/migrations.js.map +1 -1
- package/lib/builds/node-cjs.js +23 -27
- package/lib/builds/node-cjs.js.map +1 -1
- package/lib/builds/node-es.js +23 -27
- package/lib/builds/node-es.js.map +1 -1
- package/lib/builds/tests.js +36 -29
- package/lib/builds/tests.js.map +1 -1
- package/lib/changeTypings/index.js +6 -4
- package/lib/changeTypings/index.js.map +1 -1
- package/lib/copyStaticAssets/index.js +3 -3
- package/lib/copyStaticAssets/index.js.map +1 -1
- package/lib/index.js +124 -137
- package/lib/index.js.map +1 -1
- package/lib/packageJson/index.js +1 -2
- package/lib/packageJson/index.js.map +1 -1
- package/lib/plugins/require.js +4 -1
- package/lib/plugins/require.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -95,11 +95,11 @@ Such builds, especially for monorepositories with big number of packages, can ta
|
|
|
95
95
|
|
|
96
96
|
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
97
|
|
|
98
|
-
All of the built bundles will contain `
|
|
98
|
+
All of the built bundles will contain `ES2020` standard code, it is expected that they will be bundled to `ES5` using bundler (Webpack, etc.) with configured transpilation through `babel` for packages inside `node_modules`, written in modern JS.
|
|
99
99
|
|
|
100
100
|
### NodeJS bundle in CommonJs format
|
|
101
101
|
|
|
102
|
-
NodeJS before 12 version hasn't supported ES modules or supported it only behind special flag. `@tramvai/build` generates bundle in `
|
|
102
|
+
NodeJS before 12 version hasn't supported ES modules or supported it only behind special flag. `@tramvai/build` generates bundle in `ES2020` standard in `CommonJS` format automatically. Name of the result bundle is taken from field `main` in `package.json`, e.g. `lib/index.js`.
|
|
103
103
|
|
|
104
104
|
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
105
|
|
|
@@ -107,17 +107,17 @@ When bundling package in the app using `webpack` with option `target: 'node'` th
|
|
|
107
107
|
|
|
108
108
|
### Bundle for bundlers (Webpack, etc.) in ES modules format
|
|
109
109
|
|
|
110
|
-
Modern bundlers support ES modules and non-standard field `"module"` in `package.json`. `@tramvai/build` generates bundle in `
|
|
110
|
+
Modern bundlers support ES modules and non-standard field `"module"` in `package.json`. `@tramvai/build` generates bundle in `ES2020` 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
111
|
|
|
112
112
|
If build was called with flag `--forPublish` to `package.json` will be added new field `"module": "lib/index.es.js"`.
|
|
113
113
|
|
|
114
114
|
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
115
|
|
|
116
|
-
> `
|
|
116
|
+
> `ES2020` 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. Why we still prefer to use `ES5` code over `ES2020`? Apparently, code in `ES5` is still notably faster on NodeJS server. In the same time output bundle size is not important on server.
|
|
117
117
|
|
|
118
118
|
### Bundle for browsers
|
|
119
119
|
|
|
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 `
|
|
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 `ES2020` standard in `ES modules` format.
|
|
121
121
|
|
|
122
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/browser.ts` and bundle will have a name `lib/browser.js`.
|
|
123
123
|
|
|
@@ -134,7 +134,7 @@ Otherwise, if field `browser` is defined as an object and build was called with
|
|
|
134
134
|
|
|
135
135
|
> Specification for the field [browser](https://github.com/defunctzombie/package-browser-field-spec)
|
|
136
136
|
|
|
137
|
-
> `
|
|
137
|
+
> `ES2020` 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
138
|
|
|
139
139
|
When building our package in the app with `webpack` with option `target: 'web'` bundle from field `browser` will be prioritized over field `module`.
|
|
140
140
|
|
package/lib/builds/browser.js
CHANGED
|
@@ -16,47 +16,44 @@ const buildFileName = (params) => {
|
|
|
16
16
|
};
|
|
17
17
|
exports.build = {
|
|
18
18
|
name: 'browser',
|
|
19
|
-
shouldExecute({ packageJSON }) {
|
|
20
|
-
return
|
|
21
|
-
return Boolean(packageJSON.main && packageJSON.browser);
|
|
22
|
-
});
|
|
19
|
+
async shouldExecute({ packageJSON }) {
|
|
20
|
+
return Boolean(packageJSON.main && packageJSON.browser);
|
|
23
21
|
},
|
|
24
|
-
getOptions(params) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
browser: true,
|
|
33
|
-
});
|
|
34
|
-
const output = (0, common_1.createOutputOptions)(params, {
|
|
35
|
-
file: buildFileName(params),
|
|
36
|
-
format: 'esm',
|
|
37
|
-
exportsField: 'auto',
|
|
38
|
-
postfix: '.browser.js',
|
|
39
|
-
// keep entry filename when browser entry point specified, e.g. `"browser": "lib/index.browser.js"`,
|
|
40
|
-
// or `"browser": { "./lib/server.js": "./lib/browser.js" }, "main": "lib/server.js"`,
|
|
41
|
-
// otherwise output file `lib/index.browser.browser.js` will be created
|
|
42
|
-
postfixForEntry: entryBrowserFilename === mainFileName,
|
|
43
|
-
});
|
|
44
|
-
return {
|
|
45
|
-
input,
|
|
46
|
-
output,
|
|
47
|
-
};
|
|
22
|
+
async getOptions(params) {
|
|
23
|
+
const mainFileName = params.packageJSON.main;
|
|
24
|
+
const entryBrowserFilename = (0, fileNames_ts_1.getBrowserEntryFilename)(params);
|
|
25
|
+
const input = (0, common_1.createInputOptions)(params, {
|
|
26
|
+
entry: (0, fileNames_ts_1.getBrowserSourceFilename)(params),
|
|
27
|
+
target: 'ES2020',
|
|
28
|
+
resolveMainFields: ['browser', 'module', 'main'],
|
|
29
|
+
browser: true,
|
|
48
30
|
});
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
return nextPackageJson;
|
|
31
|
+
const output = (0, common_1.createOutputOptions)(params, {
|
|
32
|
+
file: buildFileName(params),
|
|
33
|
+
format: 'esm',
|
|
34
|
+
exportsField: 'auto',
|
|
35
|
+
postfix: '.browser.js',
|
|
36
|
+
// keep entry filename when browser entry point specified, e.g. `"browser": "lib/index.browser.js"`,
|
|
37
|
+
// or `"browser": { "./lib/server.js": "./lib/browser.js" }, "main": "lib/server.js"`,
|
|
38
|
+
// otherwise output file `lib/index.browser.browser.js` will be created
|
|
39
|
+
postfixForEntry: entryBrowserFilename === mainFileName,
|
|
59
40
|
});
|
|
41
|
+
return {
|
|
42
|
+
input,
|
|
43
|
+
output,
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
async modifyPackageJSON(params) {
|
|
47
|
+
const outputFilename = buildFileName(params);
|
|
48
|
+
const nextPackageJson = { ...params.packageJSON };
|
|
49
|
+
if ((0, object_1.default)(params.packageJSON.browser)) {
|
|
50
|
+
nextPackageJson.browser = {
|
|
51
|
+
...params.packageJSON.browser,
|
|
52
|
+
[(0, packageJson_1.normalizeFilenameForBrowserObjectField)((0, node_es_1.buildFileName)(params))]: (0, packageJson_1.normalizeFilenameForBrowserObjectField)(outputFilename),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
delete nextPackageJson.es2017;
|
|
56
|
+
return nextPackageJson;
|
|
60
57
|
},
|
|
61
58
|
};
|
|
62
59
|
//# sourceMappingURL=browser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../../src/builds/browser.ts"],"names":[],"mappings":";;;;AAAA,8EAAgD;AAEhD,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;
|
|
1
|
+
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../../src/builds/browser.ts"],"names":[],"mappings":";;;;AAAA,8EAAgD;AAEhD,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,WAA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,EAAC,cAAc,CAAC;aACzD,CAAC;SACH;QAED,OAAO,eAAe,CAAC,MAAM,CAAC;QAE9B,OAAO,eAAe,CAAC;IACzB,CAAC;CACF,CAAC"}
|
package/lib/builds/common.js
CHANGED
|
@@ -57,7 +57,17 @@ const createInputOptions = (params, { entry, target, perf = true, resolveMainFie
|
|
|
57
57
|
tsconfig: {
|
|
58
58
|
fileName: tsconfig,
|
|
59
59
|
hook: (resolvedConfig) => {
|
|
60
|
-
return
|
|
60
|
+
return {
|
|
61
|
+
...resolvedConfig,
|
|
62
|
+
target: target,
|
|
63
|
+
rootDir: undefined,
|
|
64
|
+
module: typescript_1.ModuleKind.ESNext,
|
|
65
|
+
composite: false,
|
|
66
|
+
incremental: false,
|
|
67
|
+
sourceMap: false,
|
|
68
|
+
skipLibCheck: true,
|
|
69
|
+
...typescriptConfig,
|
|
70
|
+
};
|
|
61
71
|
},
|
|
62
72
|
},
|
|
63
73
|
})
|
package/lib/builds/common.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/builds/common.ts"],"names":[],"mappings":";;;;AAAA,+BAAmD;AAGnD,2CAAwC;AACxC,8EAAgD;AAChD,0FAAyD;AACzD,8EAA6C;AAC7C,8FAA4D;AAC5D,gFAAwC;AACxC,gDAAmD;AACnD,gDAA2D;AAC3D,kDAAsD;AAEtD,sCAAmC;AAEnC,MAAM,aAAa,GAAG,CAAC,IAAY,EAAE,QAAQ,EAAW,EAAE;IACxD,OAAO,CACL,IAAA,iCAAqB,EAAC,IAAI,CAAC;QAC3B,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,yBAAyB,CAAC;QACvC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAC1C,CAAC;AACJ,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,gCAAgC,GAAG,CACvC,SAAiB,EACjB,OAA+B,EACP,EAAE;IAC1B,OAAO,MAAM,CAAC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AA,eAAQ,EAAC,IAAI,CAAC,CAAC;IAErC,MAAM,KAAK,GAAG,aAAa,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACjD,MAAM,cAAc,GAAG,CAAC,SAA2B,EAAE,EAAE;QACrD,OAAO,SACL,CAAC,SAAS,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAC3E,EAAE,CAAC;IACL,CAAC,CAAC;IACF,MAAM,cAAc,GAAG,GAAG,KAAK,UAAU,OAAO,EAAE,CAAC;IAEnD,OAAO;QACL,GAAG;QACH,cAAc;QACd,cAAc;QACd,MAAM;QACN,OAAO,EAAE,YAAY;QACrB,MAAM,EAAE,KAAK;QACb,eAAe;QACf,mBAAmB,EAAE,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;QAC3E,YAAY,EACV,eAAe,IAAI,CAAC,YAAY;YAC9B,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE;gBACL,IAAI,EAAE,CAAC,KAAK,CAAC,gBAAgB,CAAC,EAAE;oBAC9B,OAAO,eAAe,CAAC;iBACxB;YACH,CAAC;KACR,CAAC;AACJ,CAAC,CAAC;AAhDW,QAAA,mBAAmB,uBAgD9B"}
|
package/lib/builds/migrations.js
CHANGED
|
@@ -9,57 +9,54 @@ const rollup_plugin_ts_1 = tslib_1.__importDefault(require("rollup-plugin-ts"));
|
|
|
9
9
|
const packageJson_1 = require("../packageJson");
|
|
10
10
|
const createBuild = () => {
|
|
11
11
|
let migrations = null;
|
|
12
|
-
const getMigrations = () =>
|
|
12
|
+
const getMigrations = async () => {
|
|
13
13
|
if (!migrations) {
|
|
14
14
|
migrations =
|
|
15
|
-
(
|
|
15
|
+
(await (0, fast_glob_1.default)(`migrations/*.{js,ts}`, {
|
|
16
16
|
ignore: ['**/*.spec.{js,ts}'],
|
|
17
17
|
})) || [];
|
|
18
18
|
}
|
|
19
19
|
return migrations;
|
|
20
|
-
}
|
|
20
|
+
};
|
|
21
21
|
return {
|
|
22
22
|
name: 'migrations',
|
|
23
|
-
shouldExecute() {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return entries.length > 0;
|
|
27
|
-
});
|
|
23
|
+
async shouldExecute() {
|
|
24
|
+
const entries = await getMigrations();
|
|
25
|
+
return entries.length > 0;
|
|
28
26
|
},
|
|
29
|
-
getOptions() {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
input:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
};
|
|
57
|
-
});
|
|
27
|
+
async getOptions() {
|
|
28
|
+
const entries = await getMigrations();
|
|
29
|
+
return {
|
|
30
|
+
input: {
|
|
31
|
+
input: entries,
|
|
32
|
+
external: rollup_external_modules_1.default,
|
|
33
|
+
plugins: [
|
|
34
|
+
(0, plugin_json_1.default)(),
|
|
35
|
+
(0, rollup_plugin_ts_1.default)({
|
|
36
|
+
browserslist: false,
|
|
37
|
+
tsconfig: {
|
|
38
|
+
target: 'es5',
|
|
39
|
+
module: 'esnext',
|
|
40
|
+
declaration: false,
|
|
41
|
+
experimentalDecorators: true,
|
|
42
|
+
sourceMap: false,
|
|
43
|
+
},
|
|
44
|
+
include: ['migrations/**/*'],
|
|
45
|
+
}),
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
output: {
|
|
49
|
+
dir: '__migrations__',
|
|
50
|
+
format: 'cjs',
|
|
51
|
+
exports: 'default',
|
|
52
|
+
},
|
|
53
|
+
};
|
|
58
54
|
},
|
|
59
|
-
modifyPackageJSON({ packageJSON }) {
|
|
60
|
-
return
|
|
61
|
-
|
|
62
|
-
|
|
55
|
+
async modifyPackageJSON({ packageJSON }) {
|
|
56
|
+
return {
|
|
57
|
+
...packageJSON,
|
|
58
|
+
files: (0, packageJson_1.mergeFiles)(packageJSON, ['__migrations__']),
|
|
59
|
+
};
|
|
63
60
|
},
|
|
64
61
|
};
|
|
65
62
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrations.js","sourceRoot":"","sources":["../../src/builds/migrations.ts"],"names":[],"mappings":";;;;AAAA,kEAA6B;AAC7B,8FAA4D;AAC5D,8EAA6C;AAC7C,gFAAwC;AAExC,gDAA4C;AAErC,MAAM,WAAW,GAAG,GAAU,EAAE;IACrC,IAAI,UAAU,GAAa,IAAI,CAAC;IAEhC,MAAM,aAAa,GAAG,
|
|
1
|
+
{"version":3,"file":"migrations.js","sourceRoot":"","sources":["../../src/builds/migrations.ts"],"names":[],"mappings":";;;;AAAA,kEAA6B;AAC7B,8FAA4D;AAC5D,8EAA6C;AAC7C,gFAAwC;AAExC,gDAA4C;AAErC,MAAM,WAAW,GAAG,GAAU,EAAE;IACrC,IAAI,UAAU,GAAa,IAAI,CAAC;IAEhC,MAAM,aAAa,GAAG,KAAK,IAAI,EAAE;QAC/B,IAAI,CAAC,UAAU,EAAE;YACf,UAAU;gBACR,CAAC,MAAM,IAAA,mBAAI,EAAC,sBAAsB,EAAE;oBAClC,MAAM,EAAE,CAAC,mBAAmB,CAAC;iBAC9B,CAAC,CAAC,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,KAAK;gCACb,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"}
|
package/lib/builds/node-cjs.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.build = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const common_1 = require("./common");
|
|
6
5
|
const fileNames_ts_1 = require("../fileNames.ts");
|
|
7
6
|
const buildFileName = (params) => {
|
|
@@ -11,35 +10,32 @@ const buildFileName = (params) => {
|
|
|
11
10
|
exports.build = {
|
|
12
11
|
name: 'node:cjs',
|
|
13
12
|
cacheName: 'node',
|
|
14
|
-
shouldExecute({ packageJSON }) {
|
|
15
|
-
return
|
|
16
|
-
return Boolean(packageJSON.main);
|
|
17
|
-
});
|
|
13
|
+
async shouldExecute({ packageJSON }) {
|
|
14
|
+
return Boolean(packageJSON.main);
|
|
18
15
|
},
|
|
19
|
-
getOptions(params) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
target: 'ES2019',
|
|
24
|
-
});
|
|
25
|
-
const output = (0, common_1.createOutputOptions)(params, {
|
|
26
|
-
file: buildFileName(params),
|
|
27
|
-
format: 'cjs',
|
|
28
|
-
exportsField: 'named',
|
|
29
|
-
postfix: '.js',
|
|
30
|
-
});
|
|
31
|
-
return {
|
|
32
|
-
input,
|
|
33
|
-
output,
|
|
34
|
-
};
|
|
16
|
+
async getOptions(params) {
|
|
17
|
+
const input = (0, common_1.createInputOptions)(params, {
|
|
18
|
+
entry: (0, fileNames_ts_1.getSourceFilename)(params),
|
|
19
|
+
target: 'ES2020',
|
|
35
20
|
});
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return nextPackageJson;
|
|
21
|
+
const output = (0, common_1.createOutputOptions)(params, {
|
|
22
|
+
file: buildFileName(params),
|
|
23
|
+
format: 'cjs',
|
|
24
|
+
exportsField: 'named',
|
|
25
|
+
postfix: '.js',
|
|
42
26
|
});
|
|
27
|
+
return {
|
|
28
|
+
input,
|
|
29
|
+
output,
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
async modifyPackageJSON(params) {
|
|
33
|
+
const nextPackageJson = {
|
|
34
|
+
...params.packageJSON,
|
|
35
|
+
main: buildFileName(params),
|
|
36
|
+
};
|
|
37
|
+
delete nextPackageJson.es2017;
|
|
38
|
+
return nextPackageJson;
|
|
43
39
|
},
|
|
44
40
|
};
|
|
45
41
|
//# sourceMappingURL=node-cjs.js.map
|
|
@@ -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":";;;AACA,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,MAAM,EAAE,QAAQ;SACjB,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"}
|
package/lib/builds/node-es.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.build = exports.buildFileName = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const common_1 = require("./common");
|
|
6
5
|
const fileNames_ts_1 = require("../fileNames.ts");
|
|
7
6
|
const buildFileName = (params) => {
|
|
@@ -12,35 +11,32 @@ exports.buildFileName = buildFileName;
|
|
|
12
11
|
exports.build = {
|
|
13
12
|
name: 'node:es',
|
|
14
13
|
cacheName: 'node',
|
|
15
|
-
shouldExecute({ packageJSON }) {
|
|
16
|
-
return
|
|
17
|
-
return Boolean(packageJSON.main);
|
|
18
|
-
});
|
|
14
|
+
async shouldExecute({ packageJSON }) {
|
|
15
|
+
return Boolean(packageJSON.main);
|
|
19
16
|
},
|
|
20
|
-
getOptions(params) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
target: 'ES2019',
|
|
25
|
-
});
|
|
26
|
-
const output = (0, common_1.createOutputOptions)(params, {
|
|
27
|
-
file: (0, exports.buildFileName)(params),
|
|
28
|
-
format: 'esm',
|
|
29
|
-
exportsField: 'auto',
|
|
30
|
-
postfix: '.es.js',
|
|
31
|
-
});
|
|
32
|
-
return {
|
|
33
|
-
input,
|
|
34
|
-
output,
|
|
35
|
-
};
|
|
17
|
+
async getOptions(params) {
|
|
18
|
+
const input = (0, common_1.createInputOptions)(params, {
|
|
19
|
+
entry: (0, fileNames_ts_1.getSourceFilename)(params),
|
|
20
|
+
target: 'ES2020',
|
|
36
21
|
});
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return nextPackageJson;
|
|
22
|
+
const output = (0, common_1.createOutputOptions)(params, {
|
|
23
|
+
file: (0, exports.buildFileName)(params),
|
|
24
|
+
format: 'esm',
|
|
25
|
+
exportsField: 'auto',
|
|
26
|
+
postfix: '.es.js',
|
|
43
27
|
});
|
|
28
|
+
return {
|
|
29
|
+
input,
|
|
30
|
+
output,
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
async modifyPackageJSON(params) {
|
|
34
|
+
const nextPackageJson = {
|
|
35
|
+
...params.packageJSON,
|
|
36
|
+
module: (0, exports.buildFileName)(params),
|
|
37
|
+
};
|
|
38
|
+
delete nextPackageJson.es2017;
|
|
39
|
+
return nextPackageJson;
|
|
44
40
|
},
|
|
45
41
|
};
|
|
46
42
|
//# sourceMappingURL=node-es.js.map
|
|
@@ -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":";;;AACA,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,EAAC,MAAM,EAAE;YACvC,KAAK,EAAE,IAAA,gCAAiB,EAAC,MAAM,CAAC;YAChC,MAAM,EAAE,QAAQ;SACjB,CAAC,CAAC;QACH,MAAM,MAAM,GAAG,IAAA,4BAAmB,EAAC,MAAM,EAAE;YACzC,IAAI,EAAE,IAAA,qBAAa,EAAC,MAAM,CAAC;YAC3B,MAAM,EAAE,KAAK;YACb,YAAY,EAAE,MAAM;YACpB,OAAO,EAAE,QAAQ;SAClB,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,MAAM,EAAE,IAAA,qBAAa,EAAC,MAAM,CAAC;SAC9B,CAAC;QAEF,OAAO,eAAe,CAAC,MAAM,CAAC;QAE9B,OAAO,eAAe,CAAC;IACzB,CAAC;CACF,CAAC"}
|
package/lib/builds/tests.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.testsBuild = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const path_1 = require("path");
|
|
6
5
|
const typescript_1 = require("typescript");
|
|
7
6
|
const fs_1 = require("fs");
|
|
@@ -9,37 +8,45 @@ const common_1 = require("./common");
|
|
|
9
8
|
const packageJson_1 = require("../packageJson");
|
|
10
9
|
exports.testsBuild = {
|
|
11
10
|
name: 'test',
|
|
12
|
-
shouldExecute: ({ cwd }) =>
|
|
11
|
+
shouldExecute: async ({ cwd }) => {
|
|
13
12
|
return (0, fs_1.existsSync)((0, path_1.resolve)(cwd, 'tests.ts'));
|
|
14
|
-
}),
|
|
15
|
-
getOptions(params) {
|
|
16
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
17
|
-
const input = (0, common_1.createInputOptions)(params, {
|
|
18
|
-
entry: './tests.ts',
|
|
19
|
-
target: typescript_1.ScriptTarget.ES2019,
|
|
20
|
-
newTsPlugin: true,
|
|
21
|
-
typescriptConfig: {
|
|
22
|
-
// сбрасываем указание declarationDir чтобы d.ts файл оказался в корне пакета
|
|
23
|
-
declarationDir: undefined,
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
const output = (0, common_1.createOutputOptions)(Object.assign(Object.assign({}, params), { options: Object.assign(Object.assign({}, params.options), { preserveModules: false }) }), {
|
|
27
|
-
file: 'tests.js',
|
|
28
|
-
format: 'cjs',
|
|
29
|
-
exportsField: 'named',
|
|
30
|
-
postfix: '.js',
|
|
31
|
-
inlineChunks: false,
|
|
32
|
-
});
|
|
33
|
-
return {
|
|
34
|
-
input,
|
|
35
|
-
output: Object.assign(Object.assign({}, output), { dir: '.' }),
|
|
36
|
-
};
|
|
37
|
-
});
|
|
38
13
|
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
14
|
+
async getOptions(params) {
|
|
15
|
+
const input = (0, common_1.createInputOptions)(params, {
|
|
16
|
+
entry: './tests.ts',
|
|
17
|
+
target: typescript_1.ScriptTarget.ES2020,
|
|
18
|
+
newTsPlugin: true,
|
|
19
|
+
typescriptConfig: {
|
|
20
|
+
// сбрасываем указание declarationDir чтобы d.ts файл оказался в корне пакета
|
|
21
|
+
declarationDir: undefined,
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
const output = (0, common_1.createOutputOptions)({
|
|
25
|
+
...params,
|
|
26
|
+
options: {
|
|
27
|
+
...params.options,
|
|
28
|
+
preserveModules: false,
|
|
29
|
+
},
|
|
30
|
+
}, {
|
|
31
|
+
file: 'tests.js',
|
|
32
|
+
format: 'cjs',
|
|
33
|
+
exportsField: 'named',
|
|
34
|
+
postfix: '.js',
|
|
35
|
+
inlineChunks: false,
|
|
42
36
|
});
|
|
37
|
+
return {
|
|
38
|
+
input,
|
|
39
|
+
output: {
|
|
40
|
+
...output,
|
|
41
|
+
dir: '.',
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
async modifyPackageJSON({ packageJSON }) {
|
|
46
|
+
return {
|
|
47
|
+
...packageJSON,
|
|
48
|
+
files: (0, packageJson_1.mergeFiles)(packageJSON, ['tests.js', 'tests.d.ts']),
|
|
49
|
+
};
|
|
43
50
|
},
|
|
44
51
|
};
|
|
45
52
|
//# sourceMappingURL=tests.js.map
|
package/lib/builds/tests.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tests.js","sourceRoot":"","sources":["../../src/builds/tests.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tests.js","sourceRoot":"","sources":["../../src/builds/tests.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,2CAA0C;AAC1C,2BAAgC;AAEhC,qCAAmE;AACnE,gDAA4C;AAE/B,QAAA,UAAU,GAAU;IAC/B,IAAI,EAAE,MAAM;IACZ,aAAa,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;QAC/B,OAAO,IAAA,eAAU,EAAC,IAAA,cAAO,EAAC,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC;IAC9C,CAAC;IACD,KAAK,CAAC,UAAU,CAAC,MAAM;QACrB,MAAM,KAAK,GAAG,IAAA,2BAAkB,EAAC,MAAM,EAAE;YACvC,KAAK,EAAE,YAAY;YACnB,MAAM,EAAE,yBAAY,CAAC,MAAM;YAC3B,WAAW,EAAE,IAAI;YACjB,gBAAgB,EAAE;gBAChB,6EAA6E;gBAC7E,cAAc,EAAE,SAAS;aAC1B;SACF,CAAC,CAAC;QACH,MAAM,MAAM,GAAG,IAAA,4BAAmB,EAChC;YACE,GAAG,MAAM;YACT,OAAO,EAAE;gBACP,GAAG,MAAM,CAAC,OAAO;gBACjB,eAAe,EAAE,KAAK;aACvB;SACF,EACD;YACE,IAAI,EAAE,UAAU;YAChB,MAAM,EAAE,KAAK;YACb,YAAY,EAAE,OAAO;YACrB,OAAO,EAAE,KAAK;YACd,YAAY,EAAE,KAAK;SACpB,CACF,CAAC;QAEF,OAAO;YACL,KAAK;YACL,MAAM,EAAE;gBACN,GAAG,MAAM;gBACT,GAAG,EAAE,GAAG;aACT;SACF,CAAC;IACJ,CAAC;IACD,KAAK,CAAC,iBAAiB,CAAC,EAAE,WAAW,EAAE;QACrC,OAAO;YACL,GAAG,WAAW;YACd,KAAK,EAAE,IAAA,wBAAU,EAAC,WAAW,EAAE,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;SAC3D,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.changeTypings = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const fileNames_ts_1 = require("../fileNames.ts");
|
|
6
5
|
/**
|
|
7
6
|
* ожидается, что поле typings в package.json будет указывать на исходные файлы,
|
|
@@ -9,7 +8,7 @@ const fileNames_ts_1 = require("../fileNames.ts");
|
|
|
9
8
|
* перед публикацией необходимо заменить его на итоговую файл-декларацию,
|
|
10
9
|
* например - `"typings": "lib/index.d.ts"`
|
|
11
10
|
*/
|
|
12
|
-
const changeTypings = ({ options, packageJSON, }) =>
|
|
11
|
+
const changeTypings = async ({ options, packageJSON, }) => {
|
|
13
12
|
const { sourceDir } = options;
|
|
14
13
|
const { main } = packageJSON;
|
|
15
14
|
const sourceExt = '.ts';
|
|
@@ -19,7 +18,10 @@ const changeTypings = ({ options, packageJSON, }) => tslib_1.__awaiter(void 0, v
|
|
|
19
18
|
const typings = packageJSON.typings.includes(declarationExt)
|
|
20
19
|
? packageJSON.typings
|
|
21
20
|
: packageJSON.typings.replace(sourceDir, outputDir).replace(sourceExt, declarationExt);
|
|
22
|
-
return
|
|
23
|
-
|
|
21
|
+
return {
|
|
22
|
+
...packageJSON,
|
|
23
|
+
typings,
|
|
24
|
+
};
|
|
25
|
+
};
|
|
24
26
|
exports.changeTypings = changeTypings;
|
|
25
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/changeTypings/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/changeTypings/index.ts"],"names":[],"mappings":";;;AACA,kDAA+C;AAG/C;;;;;GAKG;AACI,MAAM,aAAa,GAAG,KAAK,EAAE,EAClC,OAAO,EACP,WAAW,GACC,EAAwB,EAAE;IACtC,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;IAC9B,MAAM,EAAE,IAAI,EAAE,GAAG,WAAW,CAAC;IAC7B,MAAM,SAAS,GAAG,KAAK,CAAC;IACxB,MAAM,cAAc,GAAG,OAAO,CAAC;IAC/B,MAAM,SAAS,GAAG,IAAA,2BAAY,EAAC,IAAI,CAAC,CAAC;IAErC,8DAA8D;IAC9D,MAAM,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC;QAC1D,CAAC,CAAC,WAAW,CAAC,OAAO;QACrB,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;IAEzF,OAAO;QACL,GAAG,WAAW;QACd,OAAO;KACR,CAAC;AACJ,CAAC,CAAC;AAnBW,QAAA,aAAa,iBAmBxB"}
|
|
@@ -9,13 +9,13 @@ const logger_1 = require("../logger");
|
|
|
9
9
|
/**
|
|
10
10
|
* копирование статических файлов - css, шрифты, изображения
|
|
11
11
|
*/
|
|
12
|
-
const copyStaticAssets = ({ cwd, options, packageJSON }) =>
|
|
12
|
+
const copyStaticAssets = async ({ cwd, options, packageJSON }) => {
|
|
13
13
|
const { sourceDir } = options;
|
|
14
14
|
const glob = '**/*';
|
|
15
15
|
const ignoreGlob = '**/*.{ts,tsx,js,jsx,json,snap}';
|
|
16
16
|
const outputDir = (0, fileNames_ts_1.getOutputDir)(packageJSON.main);
|
|
17
17
|
logger_1.logger.info(`start copy static assets from ${sourceDir} to ${outputDir}`);
|
|
18
|
-
const result =
|
|
18
|
+
const result = await (0, cpy_1.default)(glob, (0, path_1.resolve)(cwd, outputDir), {
|
|
19
19
|
ignore: [ignoreGlob],
|
|
20
20
|
parents: true,
|
|
21
21
|
cwd: (0, path_1.resolve)(cwd, sourceDir),
|
|
@@ -26,6 +26,6 @@ const copyStaticAssets = ({ cwd, options, packageJSON }) => tslib_1.__awaiter(vo
|
|
|
26
26
|
else {
|
|
27
27
|
logger_1.logger.info(`no files to copy found`);
|
|
28
28
|
}
|
|
29
|
-
}
|
|
29
|
+
};
|
|
30
30
|
exports.copyStaticAssets = copyStaticAssets;
|
|
31
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/copyStaticAssets/index.ts"],"names":[],"mappings":";;;;AAAA,+BAA+B;AAC/B,sDAAsB;AAEtB,kDAA+C;AAC/C,sCAAmC;AAEnC;;GAEG;AACI,MAAM,gBAAgB,GAAG,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/copyStaticAssets/index.ts"],"names":[],"mappings":";;;;AAAA,+BAA+B;AAC/B,sDAAsB;AAEtB,kDAA+C;AAC/C,sCAAmC;AAEnC;;GAEG;AACI,MAAM,gBAAgB,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,WAAW,EAAe,EAAE,EAAE;IACnF,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;IAC9B,MAAM,IAAI,GAAG,MAAM,CAAC;IACpB,MAAM,UAAU,GAAG,gCAAgC,CAAC;IACpD,MAAM,SAAS,GAAG,IAAA,2BAAY,EAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAEjD,eAAM,CAAC,IAAI,CAAC,iCAAiC,SAAS,OAAO,SAAS,EAAE,CAAC,CAAC;IAE1E,MAAM,MAAM,GAAG,MAAM,IAAA,aAAG,EAAC,IAAI,EAAE,IAAA,cAAO,EAAC,GAAG,EAAE,SAAS,CAAC,EAAE;QACtD,MAAM,EAAE,CAAC,UAAU,CAAC;QACpB,OAAO,EAAE,IAAI;QACb,GAAG,EAAE,IAAA,cAAO,EAAC,GAAG,EAAE,SAAS,CAAC;KAC7B,CAAC,CAAC;IAEH,IAAI,MAAM,CAAC,MAAM,EAAE;QACjB,eAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,4BAA4B,CAAC,CAAC;KAC3D;SAAM;QACL,eAAM,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;KACvC;AACH,CAAC,CAAC;AAnBW,QAAA,gBAAgB,oBAmB3B"}
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TramvaiBuild = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const path_1 = require("path");
|
|
6
5
|
const fs_1 = require("fs");
|
|
7
6
|
const perf_hooks_1 = require("perf_hooks");
|
|
@@ -26,44 +25,39 @@ class TramvaiBuild {
|
|
|
26
25
|
constructor(options,
|
|
27
26
|
// список конфигураций rollup, на основе которых будут выполнены сборки
|
|
28
27
|
builds) {
|
|
29
|
-
var _a;
|
|
30
28
|
this.rollupCache = {};
|
|
31
29
|
this.cwd = process.cwd();
|
|
32
30
|
this.options = this.normalizeOptions(options);
|
|
33
|
-
this.builds =
|
|
31
|
+
this.builds = builds ?? (options.only ? BUILDS[options.only] : undefined) ?? ALL_BUILDS;
|
|
34
32
|
this.readPackageJson();
|
|
35
33
|
}
|
|
36
34
|
// eslint-disable-next-line max-statements
|
|
37
|
-
start() {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
yield this.clearOutput();
|
|
43
|
-
}
|
|
44
|
-
if (this.options.copyStaticAssets) {
|
|
45
|
-
yield this.copyStaticAssets();
|
|
46
|
-
}
|
|
47
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
48
|
-
for (const build of this.builds) {
|
|
49
|
-
yield this.build(build);
|
|
50
|
-
}
|
|
51
|
-
yield this.changeTypings();
|
|
52
|
-
if (this.options.forPublish && !this.options.watchMode) {
|
|
53
|
-
yield this.writePackageJson();
|
|
54
|
-
}
|
|
55
|
-
logger_1.logger.info(`successfully build ${this.packageJSON.name}`);
|
|
35
|
+
async start() {
|
|
36
|
+
logger_1.logger.info(`build${this.options.watchMode ? ' in watch mode' : ''} ${this.packageJSON.name}`);
|
|
37
|
+
try {
|
|
38
|
+
if (!this.options.only) {
|
|
39
|
+
await this.clearOutput();
|
|
56
40
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
throw error;
|
|
41
|
+
if (this.options.copyStaticAssets) {
|
|
42
|
+
await this.copyStaticAssets();
|
|
60
43
|
}
|
|
61
|
-
|
|
44
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
45
|
+
for (const build of this.builds) {
|
|
46
|
+
await this.build(build);
|
|
47
|
+
}
|
|
48
|
+
await this.changeTypings();
|
|
49
|
+
if (this.options.forPublish && !this.options.watchMode) {
|
|
50
|
+
await this.writePackageJson();
|
|
51
|
+
}
|
|
52
|
+
logger_1.logger.info(`successfully build ${this.packageJSON.name}`);
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
console.error(error);
|
|
56
|
+
throw error;
|
|
57
|
+
}
|
|
62
58
|
}
|
|
63
|
-
copy() {
|
|
64
|
-
return
|
|
65
|
-
return this.copyStaticAssets();
|
|
66
|
-
});
|
|
59
|
+
async copy() {
|
|
60
|
+
return this.copyStaticAssets();
|
|
67
61
|
}
|
|
68
62
|
readPackageJson() {
|
|
69
63
|
const path = (0, path_1.resolve)(this.cwd, 'package.json');
|
|
@@ -76,139 +70,132 @@ class TramvaiBuild {
|
|
|
76
70
|
}
|
|
77
71
|
}
|
|
78
72
|
normalizeOptions(options) {
|
|
79
|
-
return
|
|
73
|
+
return {
|
|
74
|
+
sourceDir: fileNames_ts_1.defaultSourceDir,
|
|
75
|
+
copyStaticAssets: true,
|
|
76
|
+
...options,
|
|
77
|
+
};
|
|
80
78
|
}
|
|
81
79
|
writePackageJson() {
|
|
82
80
|
logger_1.logger.info(`update package.json`);
|
|
83
81
|
const path = (0, path_1.resolve)(this.cwd, 'package.json');
|
|
84
82
|
return fs_1.promises.writeFile(path, `${JSON.stringify(this.packageJSON, null, 2)}\n`);
|
|
85
83
|
}
|
|
86
|
-
copyStaticAssets() {
|
|
87
|
-
return
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
packageJSON: this.packageJSON,
|
|
92
|
-
});
|
|
84
|
+
async copyStaticAssets() {
|
|
85
|
+
return (0, copyStaticAssets_1.copyStaticAssets)({
|
|
86
|
+
cwd: this.cwd,
|
|
87
|
+
options: this.options,
|
|
88
|
+
packageJSON: this.packageJSON,
|
|
93
89
|
});
|
|
94
90
|
}
|
|
95
|
-
clearOutput() {
|
|
96
|
-
return
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
packageJSON: this.packageJSON,
|
|
101
|
-
});
|
|
91
|
+
async clearOutput() {
|
|
92
|
+
return (0, clearOutput_1.clearOutput)({
|
|
93
|
+
cwd: this.cwd,
|
|
94
|
+
options: this.options,
|
|
95
|
+
packageJSON: this.packageJSON,
|
|
102
96
|
});
|
|
103
97
|
}
|
|
104
|
-
changeTypings() {
|
|
105
|
-
|
|
106
|
-
this.
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
packageJSON: this.packageJSON,
|
|
110
|
-
});
|
|
98
|
+
async changeTypings() {
|
|
99
|
+
this.packageJSON = await (0, changeTypings_1.changeTypings)({
|
|
100
|
+
cwd: this.cwd,
|
|
101
|
+
options: this.options,
|
|
102
|
+
packageJSON: this.packageJSON,
|
|
111
103
|
});
|
|
112
104
|
}
|
|
113
105
|
// eslint-disable-next-line max-statements
|
|
114
|
-
build(build) {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}
|
|
153
|
-
});
|
|
106
|
+
async build(build) {
|
|
107
|
+
const params = {
|
|
108
|
+
cwd: this.cwd,
|
|
109
|
+
options: this.options,
|
|
110
|
+
packageJSON: this.packageJSON,
|
|
111
|
+
};
|
|
112
|
+
const shouldExecute = await build.shouldExecute(params);
|
|
113
|
+
if (!shouldExecute) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
const options = await build.getOptions(params);
|
|
117
|
+
if (this.options.watchMode) {
|
|
118
|
+
// парсинг и компиляция исходных файлов, запись на диск при старте, и при каждом изменении исходников
|
|
119
|
+
await this.watch(build.name, options.input, options.output);
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
const start = perf_hooks_1.performance.now();
|
|
123
|
+
logger_1.logger.info(`start build ${build.name}`);
|
|
124
|
+
if (typeof options.input.input === 'string') {
|
|
125
|
+
logger_1.logger.info(`parse ${options.input.input.replace(this.cwd, '').substring(1)}`);
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
logger_1.logger.info(`parse ${JSON.stringify(options.input.input)}`);
|
|
129
|
+
}
|
|
130
|
+
const bundle = await this.getBundleWithCache(build, options);
|
|
131
|
+
if (typeof options.output.entryFileNames === 'string') {
|
|
132
|
+
logger_1.logger.info(`write ${options.output.dir}/${options.output.entryFileNames}`);
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
logger_1.logger.info(`write files to ${options.output.dir}`);
|
|
136
|
+
}
|
|
137
|
+
// запись скомпилированных файлов на диск
|
|
138
|
+
await this.write(bundle, options.output);
|
|
139
|
+
const end = perf_hooks_1.performance.now();
|
|
140
|
+
logger_1.logger.info(`end build ${build.name} in ${Math.round(end - start)}ms`);
|
|
141
|
+
if (build.modifyPackageJSON) {
|
|
142
|
+
this.packageJSON = await build.modifyPackageJSON(params);
|
|
143
|
+
}
|
|
154
144
|
}
|
|
155
145
|
// eslint-disable-next-line class-methods-use-this
|
|
156
|
-
rollup(inputOptions) {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
return bundle;
|
|
160
|
-
});
|
|
146
|
+
async rollup(inputOptions) {
|
|
147
|
+
const bundle = await (0, rollup_1.rollup)(inputOptions);
|
|
148
|
+
return bundle;
|
|
161
149
|
}
|
|
162
150
|
// eslint-disable-next-line class-methods-use-this
|
|
163
|
-
write(bundle, outputOptions) {
|
|
164
|
-
|
|
165
|
-
yield bundle.write(outputOptions);
|
|
166
|
-
});
|
|
151
|
+
async write(bundle, outputOptions) {
|
|
152
|
+
await bundle.write(outputOptions);
|
|
167
153
|
}
|
|
168
154
|
// @todo ждать первого билда до резолва?
|
|
169
155
|
// eslint-disable-next-line class-methods-use-this
|
|
170
|
-
watch(buildName, inputOptions, outputOptions) {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
case 'BUNDLE_START': {
|
|
177
|
-
logger_1.logger.info(`start build ${buildName}`);
|
|
178
|
-
break;
|
|
179
|
-
}
|
|
180
|
-
case 'BUNDLE_END': {
|
|
181
|
-
logger_1.logger.info(`build ${buildName} is successful`);
|
|
182
|
-
break;
|
|
183
|
-
}
|
|
184
|
-
case 'ERROR': {
|
|
185
|
-
logger_1.logger.error(`${buildName} build error:`, event.error);
|
|
186
|
-
break;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
});
|
|
190
|
-
return watcher;
|
|
156
|
+
async watch(buildName, inputOptions, outputOptions) {
|
|
157
|
+
const watcher = (0, rollup_1.watch)({
|
|
158
|
+
...inputOptions,
|
|
159
|
+
output: {
|
|
160
|
+
...outputOptions,
|
|
161
|
+
},
|
|
191
162
|
});
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
163
|
+
watcher.on('event', (event) => {
|
|
164
|
+
// eslint-disable-next-line default-case
|
|
165
|
+
switch (event.code) {
|
|
166
|
+
case 'BUNDLE_START': {
|
|
167
|
+
logger_1.logger.info(`start build ${buildName}`);
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
case 'BUNDLE_END': {
|
|
171
|
+
logger_1.logger.info(`build ${buildName} is successful`);
|
|
172
|
+
break;
|
|
201
173
|
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
174
|
+
case 'ERROR': {
|
|
175
|
+
logger_1.logger.error(`${buildName} build error:`, event.error);
|
|
176
|
+
break;
|
|
205
177
|
}
|
|
206
178
|
}
|
|
179
|
+
});
|
|
180
|
+
return watcher;
|
|
181
|
+
}
|
|
182
|
+
async getBundleWithCache(build, options) {
|
|
183
|
+
// парсинг и компиляция исходных файлов в памяти
|
|
184
|
+
const makeRollup = () => this.rollup(options.input);
|
|
185
|
+
let bundle;
|
|
186
|
+
if (build.cacheName) {
|
|
187
|
+
if (this.rollupCache[build.cacheName]) {
|
|
188
|
+
bundle = this.rollupCache[build.cacheName];
|
|
189
|
+
}
|
|
207
190
|
else {
|
|
208
|
-
bundle =
|
|
191
|
+
bundle = await makeRollup();
|
|
192
|
+
this.rollupCache.node = bundle;
|
|
209
193
|
}
|
|
210
|
-
|
|
211
|
-
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
bundle = await makeRollup();
|
|
197
|
+
}
|
|
198
|
+
return bundle;
|
|
212
199
|
}
|
|
213
200
|
}
|
|
214
201
|
exports.TramvaiBuild = TramvaiBuild;
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,2BAA8B;AAC9B,2CAAyC;AAEzC,mCAAuC;AAGvC,gDAA0D;AAC1D,8CAAwD;AACxD,8CAAyD;AACzD,oDAA2E;AAC3E,0CAA4C;AAC5C,+CAA4C;AAC5C,yDAAsD;AACtD,mDAAgD;AAEhD,qCAAkC;AAClC,iDAAkD;AAElD,MAAM,cAAc,GAAG,IAAA,wBAAqB,GAAE,CAAC;AAE/C,MAAM,UAAU,GAAG,CAAC,cAAc,EAAE,gBAAY,EAAE,eAAW,EAAE,eAAY,EAAE,kBAAU,CAAC,CAAC;AAEzF,MAAM,MAAM,GAAqC;IAC/C,UAAU,EAAE,CAAC,cAAc,CAAC;IAC5B,KAAK,EAAE,CAAC,kBAAU,CAAC;CACpB,CAAC;AAEF,MAAa,YAAY;IAOvB,YACE,OAAyB;IACzB,uEAAuE;IACvE,MAAgB;QALV,gBAAW,GAAgC,EAAE,CAAC;QAOpD,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAC9C,IAAI,CAAC,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,UAAU,CAAC;QAExF,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC;IAED,0CAA0C;IAC1C,KAAK,CAAC,KAAK;QACT,eAAM,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE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AAY,CAAC,CAAC;oBACjB,eAAM,CAAC,IAAI,CAAC,SAAS,SAAS,gBAAgB,CAAC,CAAC;oBAChD,MAAM;iBACP;gBACD,KAAK,OAAO,CAAC,CAAC;oBACZ,eAAM,CAAC,KAAK,CAAC,GAAG,SAAS,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;oBACvD,MAAM;iBACP;aACF;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,OAAO,CAAC;IACjB,CAAC;IAEO,KAAK,CAAC,kBAAkB,CAC9B,KAAY,EACZ,OAAiC;QAEjC,gDAAgD;QAChD,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACpD,IAAI,MAAmB,CAAC;QAExB,IAAI,KAAK,CAAC,SAAS,EAAE;YACnB,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE;gBACrC,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;aAC5C;iBAAM;gBACL,MAAM,GAAG,MAAM,UAAU,EAAE,CAAC;gBAC5B,IAAI,CAAC,WAAW,CAAC,IAAI,GAAG,MAAM,CAAC;aAChC;SACF;aAAM;YACL,MAAM,GAAG,MAAM,UAAU,EAAE,CAAC;SAC7B;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AA/ND,oCA+NC"}
|
package/lib/packageJson/index.js
CHANGED
|
@@ -8,8 +8,7 @@ const normalizeFilenameForBrowserObjectField = (name) => {
|
|
|
8
8
|
};
|
|
9
9
|
exports.normalizeFilenameForBrowserObjectField = normalizeFilenameForBrowserObjectField;
|
|
10
10
|
const mergeFiles = (packageJson, files) => {
|
|
11
|
-
|
|
12
|
-
return (0, uniq_1.default)([...((_a = packageJson.files) !== null && _a !== void 0 ? _a : []), ...files]);
|
|
11
|
+
return (0, uniq_1.default)([...(packageJson.files ?? []), ...files]);
|
|
13
12
|
};
|
|
14
13
|
exports.mergeFiles = mergeFiles;
|
|
15
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/packageJson/index.ts"],"names":[],"mappings":";;;;AAAA,6EAA6C;AActC,MAAM,sCAAsC,GAAG,CAAC,IAAY,EAAU,EAAE;IAC7E,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;AACpD,CAAC,CAAC;AAFW,QAAA,sCAAsC,0CAEjD;AAEK,MAAM,UAAU,GAAG,CAAC,WAAwB,EAAE,KAAe,EAAE,EAAE
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/packageJson/index.ts"],"names":[],"mappings":";;;;AAAA,6EAA6C;AActC,MAAM,sCAAsC,GAAG,CAAC,IAAY,EAAU,EAAE;IAC7E,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;AACpD,CAAC,CAAC;AAFW,QAAA,sCAAsC,0CAEjD;AAEK,MAAM,UAAU,GAAG,CAAC,WAAwB,EAAE,KAAe,EAAE,EAAE;IACtE,OAAO,IAAA,cAAI,EAAC,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC;AACxD,CAAC,CAAC;AAFW,QAAA,UAAU,cAErB"}
|
package/lib/plugins/require.js
CHANGED
|
@@ -12,7 +12,10 @@ const DEFAULT_OPTIONS = {
|
|
|
12
12
|
extensions: ['ts', 'tsx', 'json'],
|
|
13
13
|
};
|
|
14
14
|
const addRequireChunkPlugin = (options = {}) => {
|
|
15
|
-
const opts =
|
|
15
|
+
const opts = {
|
|
16
|
+
...DEFAULT_OPTIONS,
|
|
17
|
+
...options,
|
|
18
|
+
};
|
|
16
19
|
const filter = (0, rollup_pluginutils_1.createFilter)(opts.include, opts.exclude);
|
|
17
20
|
return {
|
|
18
21
|
name: 'add-require-chunk',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"require.js","sourceRoot":"","sources":["../../src/plugins/require.ts"],"names":[],"mappings":";;;;AAAA,+BAA+B;AAE/B,2DAAkD;AAClD,iDAAqC;AACrC,wEAAuC;AAQvC,MAAM,eAAe,GAAsB;IACzC,OAAO,EAAE,CAAC,gBAAgB,EAAE,mBAAmB,CAAC;IAChD,OAAO,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC;IAChC,UAAU,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC;CAClC,CAAC;AAEK,MAAM,qBAAqB,GAAG,CAAC,UAAmB,EAAE,EAAU,EAAE;IACrE,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"require.js","sourceRoot":"","sources":["../../src/plugins/require.ts"],"names":[],"mappings":";;;;AAAA,+BAA+B;AAE/B,2DAAkD;AAClD,iDAAqC;AACrC,wEAAuC;AAQvC,MAAM,eAAe,GAAsB;IACzC,OAAO,EAAE,CAAC,gBAAgB,EAAE,mBAAmB,CAAC;IAChD,OAAO,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC;IAChC,UAAU,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC;CAClC,CAAC;AAEK,MAAM,qBAAqB,GAAG,CAAC,UAAmB,EAAE,EAAU,EAAE;IACrE,MAAM,IAAI,GAAY;QACpB,GAAG,eAAe;QAClB,GAAG,OAAO;KACX,CAAC;IACF,MAAM,MAAM,GAAG,IAAA,iCAAY,EAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAExD,OAAO;QACL,IAAI,EAAE,mBAAmB;QAEzB,SAAS,CAAC,IAAI,EAAE,EAAE;YAChB,IAAI,CAAC,MAAM,CAAC,EAAE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