@servicetitan/startup 17.5.0 → 19.0.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/dist/cli/utils/bundle.d.ts.map +1 -1
- package/dist/cli/utils/bundle.js +31 -17
- package/dist/cli/utils/bundle.js.map +1 -1
- package/dist/webpack/development.config.d.ts.map +1 -1
- package/dist/webpack/development.config.js +15 -11
- package/dist/webpack/development.config.js.map +1 -1
- package/dist/webpack/production.config.d.ts.map +1 -1
- package/dist/webpack/production.config.js +6 -3
- package/dist/webpack/production.config.js.map +1 -1
- package/dist/webpack/shared.config.d.ts +2 -0
- package/dist/webpack/shared.config.d.ts.map +1 -1
- package/dist/webpack/shared.config.js +29 -33
- package/dist/webpack/shared.config.js.map +1 -1
- package/dist/webpack/utils/feature-cohort.d.ts +5 -0
- package/dist/webpack/utils/feature-cohort.d.ts.map +1 -0
- package/dist/webpack/utils/feature-cohort.js +22 -0
- package/dist/webpack/utils/feature-cohort.js.map +1 -0
- package/dist/webpack/utils/hash-mod.d.ts +9 -0
- package/dist/webpack/utils/hash-mod.d.ts.map +1 -0
- package/dist/webpack/utils/hash-mod.js +35 -0
- package/dist/webpack/utils/hash-mod.js.map +1 -0
- package/package.json +6 -4
- package/src/cli/utils/bundle.ts +44 -26
- package/src/webpack/development.config.ts +14 -0
- package/src/webpack/production.config.ts +13 -7
- package/src/webpack/shared.config.ts +68 -58
- package/src/webpack/utils/feature-cohort.ts +19 -0
- package/src/webpack/utils/hash-mod.ts +32 -0
- package/template/packages/application/package.json +4 -4
- package/template/packages/feature-a/package.json +2 -2
- package/template/packages/feature-b/package.json +2 -2
- package/template/packages/feature-c/package.json +2 -2
- package/tsconfig/base.json +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/bundle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/bundle.ts"],"names":[],"mappings":"AA6DA,wBAAsB,MAAM,iCAkD3B;AAED,wBAAsB,WAAW,iCAsEhC"}
|
package/dist/cli/utils/bundle.js
CHANGED
|
@@ -49,6 +49,19 @@ function generateWebComponentMetadata() {
|
|
|
49
49
|
sharedDependencies: utils_1.sharedDependencies,
|
|
50
50
|
}), 'utf8');
|
|
51
51
|
}
|
|
52
|
+
function cacheSuffix(suffix, config) {
|
|
53
|
+
var _a;
|
|
54
|
+
if (typeof config.cache !== 'object') {
|
|
55
|
+
return config;
|
|
56
|
+
}
|
|
57
|
+
if (config.cache.type !== 'filesystem') {
|
|
58
|
+
return config;
|
|
59
|
+
}
|
|
60
|
+
const originName = (_a = config.cache.name) !== null && _a !== void 0 ? _a : 'mfe';
|
|
61
|
+
const name = `${originName}__${suffix}`;
|
|
62
|
+
const cache = Object.assign(Object.assign({}, config.cache), { name });
|
|
63
|
+
return Object.assign(Object.assign({}, config), { cache });
|
|
64
|
+
}
|
|
52
65
|
function bundle() {
|
|
53
66
|
return __awaiter(this, void 0, void 0, function* () {
|
|
54
67
|
utils_1.log.info('Bundling the package...');
|
|
@@ -89,20 +102,9 @@ exports.bundle = bundle;
|
|
|
89
102
|
function bundleWatch() {
|
|
90
103
|
return __awaiter(this, void 0, void 0, function* () {
|
|
91
104
|
utils_1.log.info('Bundling the package...');
|
|
92
|
-
const
|
|
105
|
+
const runServe = (_a) => { var _b, _c; return __awaiter(this, void 0, void 0, function* () {
|
|
93
106
|
var { devServer = {} } = _a, config = __rest(_a, ["devServer"]);
|
|
94
107
|
const compiler = (0, webpack_1.default)(config);
|
|
95
|
-
if (bundleOnly) {
|
|
96
|
-
return new Promise((_0, reject) => {
|
|
97
|
-
const watching = compiler.watch({}, e => {
|
|
98
|
-
if (e) {
|
|
99
|
-
watching.close(() => {
|
|
100
|
-
reject(e);
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
108
|
const host = (_b = devServer.host) !== null && _b !== void 0 ? _b : 'localhost';
|
|
107
109
|
const port = yield (0, portfinder_1.getPortPromise)({
|
|
108
110
|
port: (_c = devServer.port) !== null && _c !== void 0 ? _c : 8080,
|
|
@@ -119,18 +121,30 @@ function bundleWatch() {
|
|
|
119
121
|
});
|
|
120
122
|
});
|
|
121
123
|
}); };
|
|
124
|
+
const run = (config) => __awaiter(this, void 0, void 0, function* () {
|
|
125
|
+
const compiler = (0, webpack_1.default)(config);
|
|
126
|
+
return new Promise((_0, reject) => {
|
|
127
|
+
const watching = compiler.watch({}, e => {
|
|
128
|
+
if (e) {
|
|
129
|
+
watching.close(() => {
|
|
130
|
+
reject(e);
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
});
|
|
122
136
|
if ((0, utils_1.isWebComponent)()) {
|
|
123
137
|
generateWebComponentMetadata();
|
|
124
138
|
return Promise.all([
|
|
125
|
-
run((0, webpack_2.createWebpackConfig)({
|
|
139
|
+
run(cacheSuffix('light', (0, webpack_2.createWebpackConfig)({
|
|
126
140
|
configuration: { mode: 'development' },
|
|
127
|
-
}, { embed: true })
|
|
128
|
-
|
|
141
|
+
}, { embed: true }))),
|
|
142
|
+
runServe(cacheSuffix('full', (0, webpack_2.createWebpackConfig)({
|
|
129
143
|
configuration: { mode: 'development' },
|
|
130
|
-
})),
|
|
144
|
+
}))),
|
|
131
145
|
]);
|
|
132
146
|
}
|
|
133
|
-
return
|
|
147
|
+
return runServe(fs_1.default.existsSync('./webpack.dev.config.js')
|
|
134
148
|
? require(path_1.default.resolve('./webpack.dev.config.js'))
|
|
135
149
|
: (0, webpack_2.createWebpackConfig)({
|
|
136
150
|
configuration: { mode: 'development' },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.js","sourceRoot":"","sources":["../../../src/cli/utils/bundle.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4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,CACJ,WAAW,CACP,MAAM,EACN,IAAA,6BAAmB,EAAC;oBAChB,aAAa,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE;iBACzC,CAAC,CACL,CACJ;aACJ,CAAC,CAAC;SACN;QAED,OAAO,QAAQ,CACX,YAAE,CAAC,UAAU,CAAC,yBAAyB,CAAC;YACpC,CAAC,CAAC,OAAO,CAAC,cAAI,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC;YAClD,CAAC,CAAC,IAAA,6BAAmB,EAAC;gBAChB,aAAa,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE;aACzC,CAAC,CACX,CAAC;IACN,CAAC;CAAA;AAtED,kCAsEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"development.config.d.ts","sourceRoot":"","sources":["../../src/webpack/development.config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"development.config.d.ts","sourceRoot":"","sources":["../../src/webpack/development.config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAkBxC,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,CAAC;AAC5B,OAAO,EAAsC,SAAS,IAAI,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAInG,MAAM,WAAW,SAAS;IACtB,aAAa,EAAE,eAAe,CAAC,eAAe,CAAC,GAAG;QAC9C,IAAI,EAAE,aAAa,CAAC;KACvB,CAAC;IACF,OAAO,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;CACxC;AAED,wBAAgB,YAAY,CACxB,EAAE,aAAa,EAAE,OAAY,EAAE,EAAE,SAAS,EAC1C,OAAO,GAAE,OAAY,GACtB,aAAa,CA8Lf"}
|
|
@@ -9,15 +9,14 @@ const mini_css_extract_plugin_1 = __importDefault(require("mini-css-extract-plug
|
|
|
9
9
|
const webpack_merge_1 = __importDefault(require("webpack-merge"));
|
|
10
10
|
const utils_1 = require("../utils");
|
|
11
11
|
const shared_config_1 = require("./shared.config");
|
|
12
|
+
const feature_cohort_1 = require("./utils/feature-cohort");
|
|
12
13
|
function createConfig({ configuration, plugins = {} }, options = {}) {
|
|
13
14
|
var _a;
|
|
14
15
|
const sharedConfig = (0, shared_config_1.createConfig)({ plugins }, options);
|
|
15
16
|
const watchIgnore = (0, utils_1.getPackages)({ scope: (0, utils_1.getPackageName)() })
|
|
16
17
|
.filter(({ type }) => type === utils_1.PackageType.TSC)
|
|
17
18
|
.map(({ location }) => path_1.default.join(location, (0, utils_1.getFolders)(location).source));
|
|
18
|
-
return (0, webpack_merge_1.default)(sharedConfig, {
|
|
19
|
-
devtool: 'cheap-module-source-map',
|
|
20
|
-
devServer: Object.assign(Object.assign({ port: (_a = (0, utils_1.getDevServerPort)()) !== null && _a !== void 0 ? _a : 8080, historyApiFallback: true, stats: sharedConfig.stats }, (watchIgnore.length
|
|
19
|
+
return (0, webpack_merge_1.default)(sharedConfig, Object.assign(Object.assign({ devtool: 'cheap-module-source-map', devServer: Object.assign(Object.assign({ port: (_a = (0, utils_1.getDevServerPort)()) !== null && _a !== void 0 ? _a : 8080, historyApiFallback: true, stats: sharedConfig.stats }, (watchIgnore.length
|
|
21
20
|
? {
|
|
22
21
|
watchOptions: {
|
|
23
22
|
ignored: watchIgnore,
|
|
@@ -26,8 +25,7 @@ function createConfig({ configuration, plugins = {} }, options = {}) {
|
|
|
26
25
|
: {})), { writeToDisk: true, headers: {
|
|
27
26
|
'Access-Control-Allow-Origin': '*',
|
|
28
27
|
'Access-Control-Allow-Headers': 'Origin, X-Requested-With, Content-Type, Accept',
|
|
29
|
-
} }),
|
|
30
|
-
module: {
|
|
28
|
+
} }), module: {
|
|
31
29
|
rules: !(0, utils_1.isCustomStyleRules)()
|
|
32
30
|
? [
|
|
33
31
|
{
|
|
@@ -157,8 +155,7 @@ function createConfig({ configuration, plugins = {} }, options = {}) {
|
|
|
157
155
|
: []),
|
|
158
156
|
]
|
|
159
157
|
: [],
|
|
160
|
-
},
|
|
161
|
-
plugins: [
|
|
158
|
+
}, plugins: [
|
|
162
159
|
...((0, utils_1.isWebComponent)() || ((0, utils_1.isExposeSharedDependencies)() && !(0, utils_1.isCustomStyleRules)())
|
|
163
160
|
? [
|
|
164
161
|
new mini_css_extract_plugin_1.default({
|
|
@@ -168,11 +165,18 @@ function createConfig({ configuration, plugins = {} }, options = {}) {
|
|
|
168
165
|
}),
|
|
169
166
|
]
|
|
170
167
|
: []),
|
|
171
|
-
],
|
|
172
|
-
|
|
168
|
+
] }, (0, feature_cohort_1.featureCohort)([2, 5], () => {
|
|
169
|
+
utils_1.log.info('Persistent cache is active');
|
|
170
|
+
return {
|
|
171
|
+
cache: {
|
|
172
|
+
type: 'filesystem',
|
|
173
|
+
name: (0, utils_1.readJson)('./package.json').name,
|
|
174
|
+
profile: true,
|
|
175
|
+
},
|
|
176
|
+
};
|
|
177
|
+
})), { output: {
|
|
173
178
|
filename: (0, utils_1.isWebComponent)() ? '[name].js' : '[name].bundle.js',
|
|
174
|
-
},
|
|
175
|
-
}, configuration);
|
|
179
|
+
} }), configuration);
|
|
176
180
|
}
|
|
177
181
|
exports.createConfig = createConfig;
|
|
178
182
|
//# sourceMappingURL=development.config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"development.config.js","sourceRoot":"","sources":["../../src/webpack/development.config.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAIxB,sFAA2D;AAC3D,kEAAkC;AAElC,
|
|
1
|
+
{"version":3,"file":"development.config.js","sourceRoot":"","sources":["../../src/webpack/development.config.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAIxB,sFAA2D;AAC3D,kEAAkC;AAElC,oCAWkB;AAGlB,mDAAmG;AAEnG,2DAAuD;AASvD,SAAgB,YAAY,CACxB,EAAE,aAAa,EAAE,OAAO,GAAG,EAAE,EAAa,EAC1C,UAAmB,EAAE;;IAErB,MAAM,YA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BACH,CAAC,CAAC,EAAE,CAAC;SACZ,IACE,IAAA,8BAAa,EAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE;QAC1B,WAAG,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;QACvC,OAAO;YACH,KAAK,EAAE;gBACH,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,IAAA,gBAAQ,EAAC,gBAAgB,CAAC,CAAC,IAAI;gBACrC,OAAO,EAAE,IAAI;aAChB;SACJ,CAAC;IACN,CAAC,CAAC,KACF,MAAM,EAAE;YACJ,QAAQ,EAAE,IAAA,sBAAc,GAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,kBAAkB;SAChE,KAEL,aAAa,CAChB,CAAC;AACN,CAAC;AAjMD,oCAiMC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"production.config.d.ts","sourceRoot":"","sources":["../../src/webpack/production.config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"production.config.d.ts","sourceRoot":"","sources":["../../src/webpack/production.config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,OAA6B,EACzB,aAAa,IAAI,2BAA2B,EAC/C,MAAM,yBAAyB,CAAC;AAKjC,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,CAAC;AAC5B,OAAO,EAAsC,SAAS,IAAI,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEnG,MAAM,WAAW,SAAS;IACtB,aAAa,EAAE,eAAe,CAAC,eAAe,CAAC,GAAG;QAC9C,IAAI,EAAE,YAAY,CAAC;KACtB,CAAC;IACF,OAAO,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,GAAG;QACnC,oBAAoB,CAAC,EAAE,2BAA2B,CAAC;KACtD,CAAC;CACL;AAID,wBAAgB,YAAY,CACxB,EAAE,aAAa,EAAE,OAAY,EAAE,EAAE,SAAS,EAC1C,OAAO,GAAE,OAAY,GACtB,aAAa,CAgJf"}
|
|
@@ -4,13 +4,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.createConfig = void 0;
|
|
7
|
+
const deepmerge_1 = __importDefault(require("deepmerge"));
|
|
7
8
|
const mini_css_extract_plugin_1 = __importDefault(require("mini-css-extract-plugin"));
|
|
8
9
|
const webpack_merge_1 = __importDefault(require("webpack-merge"));
|
|
9
10
|
const utils_1 = require("../utils");
|
|
10
11
|
const shared_config_1 = require("./shared.config");
|
|
11
12
|
const cdnPath = process.env.CLIENT_CDN_PATH;
|
|
12
13
|
function createConfig({ configuration, plugins = {} }, options = {}) {
|
|
13
|
-
const { MiniCssExtractPlugin: miniCssExtractPluginOptions } = plugins;
|
|
14
|
+
const { MiniCssExtractPlugin: miniCssExtractPluginOptions = {} } = plugins;
|
|
14
15
|
return (0, webpack_merge_1.default)((0, shared_config_1.createConfig)({ plugins }, options), {
|
|
15
16
|
devtool: (0, utils_1.isWebComponent)() ? false : 'source-map',
|
|
16
17
|
module: {
|
|
@@ -123,9 +124,11 @@ function createConfig({ configuration, plugins = {} }, options = {}) {
|
|
|
123
124
|
plugins: [
|
|
124
125
|
...(!(0, utils_1.isCustomStyleRules)()
|
|
125
126
|
? [
|
|
126
|
-
new mini_css_extract_plugin_1.default(
|
|
127
|
+
new mini_css_extract_plugin_1.default((0, deepmerge_1.default)({
|
|
128
|
+
filename: (0, utils_1.isWebComponent)()
|
|
127
129
|
? '[name].css'
|
|
128
|
-
: '[name].[contenthash:8].bundle.css'
|
|
130
|
+
: '[name].[contenthash:8].bundle.css',
|
|
131
|
+
}, miniCssExtractPluginOptions)),
|
|
129
132
|
]
|
|
130
133
|
: []),
|
|
131
134
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"production.config.js","sourceRoot":"","sources":["../../src/webpack/production.config.ts"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"production.config.js","sourceRoot":"","sources":["../../src/webpack/production.config.ts"],"names":[],"mappings":";;;;;;AAAA,0DAAkC;AAIlC,sFAEiC;AACjC,kEAAkC;AAElC,oCAA8D;AAG9D,mDAAmG;AAWnG,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;AAE5C,SAAgB,YAAY,CACxB,EAAE,aAAa,EAAE,OAAO,GAAG,EAAE,EAAa,EAC1C,UAAmB,EAAE;IAErB,MAAM,EAAE,oBAAoB,EAAE,2BAA2B,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC;IAE3E,OAAO,IAAA,uBAAK,EACR,IAAA,4BAAkB,EAAC,EAAE,OAAO,EAAE,EAAE,OAAO,CAAC,EACxC;QACI,OAAO,EAAE,IAAA,sBAAc,GAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY;QAChD,MAAM,EAAE;YACJ,KAAK,EAAE,CAAC,IAAA,0BAAkB,GAAE;gBACxB,CAAC,CAAC;oBACI;wBACI,IAAI,EAAE,gBAAgB;wBACtB,GAAG,EAAE;4BACD;gCACI,MAAM,EAAE,iCAAoB,CAAC,MAAM;gCACnC,OAAO,EAAE;oCACL,QAAQ,EAAE,IAAI;iCACjB;6BACJ;4BACD;gCACI,MAAM,EAAE,YAAY;gCACpB,OAAO,EAAE;oCACL,QAAQ,EAAE,IAAI;oCACd,OAAO,EAAE;wCACL,cAAc,EAAE,0BAA0B;wCAC1C,sBAAsB,EAAE,eAAe;wCACvC,WAAW,EAAE,IAAI;qCACpB;iCACJ;6BACJ;4BACD,aAAa;yBAChB;qBACJ;oBACD;wBACI,IAAI,EAAE,WAAW;wBACjB,OAAO,EAAE,gBAAgB;wBACzB,GAAG,EAAE,CAAC,iCAAoB,CAAC,MAAM,EAAE,YAAY,EAAE,aAAa,CAAC;qBAClE;oBACD;wBACI,IAAI,EAAE,gBAAgB;wBACtB,GAAG,EAAE;4BACD;g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IAAA,0BAAkB,GAAE;gBACrB,CAAC,CAAC;oBACI,IAAI,iCAAoB,CACpB,IAAA,mBAAS,EACL;wBACI,QAAQ,EAAE,IAAA,sBAAc,GAAE;4BACtB,CAAC,CAAC,YAAY;4BACd,CAAC,CAAC,mCAAmC;qBAC5C,EACD,2BAA2B,CAC9B,CACJ;iBACJ;gBACH,CAAC,CAAC,EAAE,CAAC;SACZ;QACD,MAAM,EAAE;YACJ,QAAQ,EAAE,IAAA,sBAAc,GAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,kCAAkC;YAC7E,KAAK,EAAE,IAAI;SACd;KACJ,EACD,aAAa,EACb,OAAO;QACH,CAAC,CAAC;YACI,MAAM,EAAE;gBACJ,UAAU,EAAE,OAAO;aACtB;SACJ;QACH,CAAC,CAAC,EAAE,CACX,CAAC;AACN,CAAC;AAnJD,oCAmJC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Configuration } from 'webpack';
|
|
2
|
+
import { ForkTsCheckerWebpackPluginOptions } from 'fork-ts-checker-webpack-plugin/lib/ForkTsCheckerWebpackPluginOptions';
|
|
2
3
|
import { Options as HtmlWebpackPluginOptions } from 'html-webpack-plugin';
|
|
3
4
|
import { Options } from '.';
|
|
4
5
|
export interface Overrides {
|
|
5
6
|
configuration?: Configuration;
|
|
6
7
|
plugins?: {
|
|
8
|
+
ForkTsCheckerWebpackPlugin?: ForkTsCheckerWebpackPluginOptions;
|
|
7
9
|
HtmlWebpackPlugin?: HtmlWebpackPluginOptions;
|
|
8
10
|
};
|
|
9
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.config.d.ts","sourceRoot":"","sources":["../../src/webpack/shared.config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shared.config.d.ts","sourceRoot":"","sources":["../../src/webpack/shared.config.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAgB,MAAM,SAAS,CAAC;AAStD,OAAO,EAAE,iCAAiC,EAAE,MAAM,sEAAsE,CAAC;AAEzH,OAA0B,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAa7F,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,CAAC;AAE5B,MAAM,WAAW,SAAS;IACtB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,OAAO,CAAC,EAAE;QACN,0BAA0B,CAAC,EAAE,iCAAiC,CAAC;QAC/D,iBAAiB,CAAC,EAAE,wBAAwB,CAAC;KAChD,CAAC;CACL;AAED,wBAAgB,YAAY,CACxB,EAAE,aAAkB,EAAE,OAAY,EAAE,GAAE,SAAc,EACpD,EAAE,KAAK,EAAE,GAAE,OAAY,GACxB,aAAa,CAsOf"}
|
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.createConfig = void 0;
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const deepmerge_1 = __importDefault(require("deepmerge"));
|
|
8
9
|
const webpack_1 = require("webpack");
|
|
9
10
|
/*
|
|
10
11
|
* the following caused by major incompat in the types of this plugin
|
|
@@ -24,7 +25,7 @@ function createConfig({ configuration = {}, plugins = {} } = {}, { embed } = {})
|
|
|
24
25
|
const dependencies = (0, utils_1.isExposeSharedDependencies)()
|
|
25
26
|
? Object.assign(Object.assign({}, (0, utils_1.readJson)('../../package.json').dependencies), (0, utils_1.readJson)('./package.json').dependencies) : undefined;
|
|
26
27
|
const metadata = (0, utils_1.isWebComponent)() ? (0, utils_1.readJson)(`./${destination}/metadata.json`) : undefined;
|
|
27
|
-
const { HtmlWebpackPlugin: htmlWebpackPluginOptions } = plugins;
|
|
28
|
+
const { ForkTsCheckerWebpackPlugin: forkTsCheckerWebpackPluginOptions = {}, HtmlWebpackPlugin: htmlWebpackPluginOptions = {}, } = plugins;
|
|
28
29
|
return (0, webpack_merge_1.default)(Object.assign(Object.assign({ entry: (0, utils_1.isWebComponent)()
|
|
29
30
|
? { index: `./${source}/index` }
|
|
30
31
|
: [
|
|
@@ -59,17 +60,15 @@ function createConfig({ configuration = {}, plugins = {} } = {}, { embed } = {})
|
|
|
59
60
|
use: { loader: 'worker-loader' },
|
|
60
61
|
},
|
|
61
62
|
{
|
|
62
|
-
test: /\.(png|svg|jpg|jpeg|gif)
|
|
63
|
+
test: /\.(png|svg|jpg|jpeg|gif)$/i,
|
|
63
64
|
type: 'asset',
|
|
64
|
-
parser: { dataUrlCondition: { maxSize: 65000 } },
|
|
65
65
|
generator: {
|
|
66
66
|
filename: 'images/[contenthash][ext][query]',
|
|
67
67
|
},
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
|
-
test: /\.(woff|woff2|eot|ttf|otf)
|
|
71
|
-
type: 'asset',
|
|
72
|
-
parser: { dataUrlCondition: { maxSize: 65000 } },
|
|
70
|
+
test: /\.(woff|woff2|eot|ttf|otf)$/i,
|
|
71
|
+
type: 'asset/resource',
|
|
73
72
|
generator: {
|
|
74
73
|
filename: 'fonts/[contenthash][ext][query]',
|
|
75
74
|
},
|
|
@@ -87,28 +86,28 @@ function createConfig({ configuration = {}, plugins = {} } = {}, { embed } = {})
|
|
|
87
86
|
}, plugins: [
|
|
88
87
|
...(!embed
|
|
89
88
|
? [
|
|
90
|
-
new ForkTsCheckerWebpackPlugin({
|
|
89
|
+
new ForkTsCheckerWebpackPlugin((0, deepmerge_1.default)({
|
|
91
90
|
typescript: { configOverwrite: { references: [] } },
|
|
92
|
-
}),
|
|
91
|
+
}, forkTsCheckerWebpackPluginOptions)),
|
|
93
92
|
new FilterWarningsPlugin({
|
|
94
93
|
exclude: /export .* was not found in/,
|
|
95
94
|
}),
|
|
96
|
-
new html_webpack_plugin_1.default(
|
|
95
|
+
new html_webpack_plugin_1.default((0, deepmerge_1.default)(Object.assign(Object.assign({ title: 'ServiceTitan', hash: true }, ((0, utils_1.isWebComponent)()
|
|
97
96
|
? {
|
|
98
97
|
inject: false,
|
|
99
98
|
templateContent: ({ htmlWebpackPlugin }) => `
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
99
|
+
<!DOCTYPE html>
|
|
100
|
+
<html>
|
|
101
|
+
<head>
|
|
102
|
+
${htmlWebpackPlugin.tags.headTags}
|
|
103
|
+
</head>
|
|
104
|
+
<body>
|
|
105
|
+
<${metadata.name} />
|
|
106
|
+
|
|
107
|
+
${htmlWebpackPlugin.tags.bodyTags}
|
|
108
|
+
</body>
|
|
109
|
+
</html>
|
|
110
|
+
`,
|
|
112
111
|
}
|
|
113
112
|
: {})), { templateParameters: {
|
|
114
113
|
splitByEntry: split_by_entry_1.splitByEntry,
|
|
@@ -117,22 +116,19 @@ function createConfig({ configuration = {}, plugins = {} } = {}, { embed } = {})
|
|
|
117
116
|
: []),
|
|
118
117
|
...((0, utils_1.isWebComponent)() || (0, utils_1.isExposeSharedDependencies)()
|
|
119
118
|
? [
|
|
120
|
-
new webpack_1.DefinePlugin(
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
119
|
+
new webpack_1.DefinePlugin({
|
|
120
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
121
|
+
EXPOSED_DEPENDENCIES: JSON.stringify((0, utils_1.isExposeSharedDependencies)()
|
|
122
|
+
? Object.entries(utils_1.sharedDependencies).reduce((result, [dependency, variable]) => Object.assign(result, {
|
|
124
123
|
[dependency]: {
|
|
125
124
|
version: dependencies[dependency],
|
|
126
125
|
variable,
|
|
127
126
|
},
|
|
128
|
-
}), {})
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
?
|
|
132
|
-
|
|
133
|
-
WEB_COMPONENT_NAME: JSON.stringify(metadata.name),
|
|
134
|
-
}
|
|
135
|
-
: {}))),
|
|
127
|
+
}), {})
|
|
128
|
+
: undefined),
|
|
129
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
130
|
+
WEB_COMPONENT_NAME: JSON.stringify((0, utils_1.isWebComponent)() ? metadata.name : undefined),
|
|
131
|
+
}),
|
|
136
132
|
]
|
|
137
133
|
: []),
|
|
138
134
|
...((0, utils_1.isWebComponent)()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.config.js","sourceRoot":"","sources":["../../src/webpack/shared.config.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,qCAAsD;AAEtD;;;;GAIG;AACH,2EAA2E;AAC3E,MAAM,0BAA0B,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAC,CAAC,WAAW;
|
|
1
|
+
{"version":3,"file":"shared.config.js","sourceRoot":"","sources":["../../src/webpack/shared.config.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,0DAAkC;AAElC,qCAAsD;AAEtD;;;;GAIG;AACH,2EAA2E;AAC3E,MAAM,0BAA0B,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAC,CAAC,WAAW;AAEzF,MAAM,oBAAoB,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAC;AACvE,8EAA6F;AAC7F,sFAA2D;AAC3D,kEAAkC;AAElC,oCAMkB;AAClB,2DAAsD;AAYtD,SAAgB,YAAY,CACxB,EAAE,aAAa,GAAG,EAAE,EAAE,OAAO,GAAG,EAAE,KAAgB,EAAE,EACpD,EAAE,KAAK,KAAc,EAAE;IAEvB,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,IAAA,kBAAU,GAAE,CAAC;IAC7C,MAAM,YAAY,GAAG,IAAA,kCAA0B,GAAE;QAC7C,CAAC,iCACQ,IAAA,gBAAQ,EAAC,oBAAoB,CAAC,CAAC,YAAY,GAC3C,IAAA,gBAAQ,EAAC,gBAAgB,CAAC,CAAC,YAAY,EAEhD,CAAC,CAAC,SAAS,CAAC;IAChB,MAAM,Q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AAC,GACN,CAAC,IAAA,sBAAc,GAAE;oBAChB,CAAC,CAAC;wBACI,MAAM,EAAE;4BACJ,IAAI,EAAE,kBAAkB;4BACxB,IAAI,EAAE,OAAO;4BACb,MAAM,EAAE,KAAK;4BACb,OAAO,EAAE,IAAI;yBAChB;qBACJ;oBACH,CAAC,CAAC,EAAE,CAAC,CACZ;aACJ;SACJ,EACD,KAAK,EAAE;YACH,GAAG,EAAE,KAAK;YACV,MAAM,EAAE,IAAI;YACZ,YAAY,EAAE,IAAI;YAClB,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,IAAI;SACf,KAEL,aAAa,CAChB,CAAC;AACN,CAAC;AAzOD,oCAyOC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-cohort.d.ts","sourceRoot":"","sources":["../../../src/webpack/utils/feature-cohort.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAS7F"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.featureCohort = void 0;
|
|
4
|
+
const username_1 = require("username");
|
|
5
|
+
const utils_1 = require("../../utils");
|
|
6
|
+
const hash_mod_1 = require("./hash-mod");
|
|
7
|
+
/**
|
|
8
|
+
* Allows to enable feature for part of the auditory based on stable trait (username).
|
|
9
|
+
*/
|
|
10
|
+
function featureCohort([limit, total], fn) {
|
|
11
|
+
var _a;
|
|
12
|
+
if (limit >= total) {
|
|
13
|
+
utils_1.log.warning('featureCohort: feature always active');
|
|
14
|
+
}
|
|
15
|
+
const mod = (0, hash_mod_1.hashMod)(total);
|
|
16
|
+
const cohort = mod((_a = (0, username_1.sync)()) !== null && _a !== void 0 ? _a : '');
|
|
17
|
+
if (cohort < limit) {
|
|
18
|
+
return fn();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.featureCohort = featureCohort;
|
|
22
|
+
//# sourceMappingURL=feature-cohort.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-cohort.js","sourceRoot":"","sources":["../../../src/webpack/utils/feature-cohort.ts"],"names":[],"mappings":";;;AAAA,uCAA4C;AAE5C,uCAAkC;AAElC,yCAAqC;AAErC;;GAEG;AACH,SAAgB,aAAa,CAAI,CAAC,KAAK,EAAE,KAAK,CAAmB,EAAE,EAAW;;IAC1E,IAAI,KAAK,IAAI,KAAK,EAAE;QAChB,WAAG,CAAC,OAAO,CAAC,sCAAsC,CAAC,CAAC;KACvD;IACD,MAAM,GAAG,GAAG,IAAA,kBAAO,EAAC,KAAK,CAAC,CAAC;IAC3B,MAAM,MAAM,GAAG,GAAG,CAAC,MAAA,IAAA,eAAQ,GAAE,mCAAI,EAAE,CAAC,CAAC;IACrC,IAAI,MAAM,GAAG,KAAK,EAAE;QAChB,OAAO,EAAE,EAAE,CAAC;KACf;AACL,CAAC;AATD,sCASC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns a `hashMod` function that will return an integer hash of a string
|
|
3
|
+
* modded by `buckets`.
|
|
4
|
+
*
|
|
5
|
+
* @param {Number} buckets
|
|
6
|
+
* @return {Function}
|
|
7
|
+
*/
|
|
8
|
+
export declare function hashMod(buckets: number): (string: string) => number;
|
|
9
|
+
//# sourceMappingURL=hash-mod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hash-mod.d.ts","sourceRoot":"","sources":["../../../src/webpack/utils/hash-mod.ts"],"names":[],"mappings":"AAMA;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,YACV,MAAM,YAGlC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* salvaged from https://github.com/segment-boneyard/hash-mod
|
|
4
|
+
* 1. recent code from repo never got into npm registry
|
|
5
|
+
* 2. no types in DefinitelyTyped
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.hashMod = void 0;
|
|
9
|
+
/**
|
|
10
|
+
* Returns a `hashMod` function that will return an integer hash of a string
|
|
11
|
+
* modded by `buckets`.
|
|
12
|
+
*
|
|
13
|
+
* @param {Number} buckets
|
|
14
|
+
* @return {Function}
|
|
15
|
+
*/
|
|
16
|
+
function hashMod(buckets) {
|
|
17
|
+
return function (string) {
|
|
18
|
+
return integerHash(string) % buckets;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
exports.hashMod = hashMod;
|
|
22
|
+
/**
|
|
23
|
+
* Return the integer hash of a `string`.
|
|
24
|
+
*
|
|
25
|
+
* http://stackoverflow.com/questions/2624192/good-hash-function-for-strings
|
|
26
|
+
*
|
|
27
|
+
* @param {String} string
|
|
28
|
+
* @returns {Number}
|
|
29
|
+
*/
|
|
30
|
+
function integerHash(string) {
|
|
31
|
+
return (string + '').split('').reduce(function (memo, item) {
|
|
32
|
+
return (memo * 31 * item.charCodeAt(0)) % 982451653;
|
|
33
|
+
}, 7);
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=hash-mod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hash-mod.js","sourceRoot":"","sources":["../../../src/webpack/utils/hash-mod.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH;;;;;;GAMG;AACH,SAAgB,OAAO,CAAC,OAAe;IACnC,OAAO,UAAU,MAAc;QAC3B,OAAO,WAAW,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC;IACzC,CAAC,CAAC;AACN,CAAC;AAJD,0BAIC;AAED;;;;;;;GAOG;AACH,SAAS,WAAW,CAAC,MAAc;IAC/B,OAAO,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,IAAI,EAAE,IAAI;QACtD,OAAO,CAAC,IAAI,GAAG,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;IACxD,CAAC,EAAE,CAAC,CAAC,CAAC;AACV,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@servicetitan/startup",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "19.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"homepage": "https://docs.st.dev/docs/frontend/startup",
|
|
6
6
|
"repository": {
|
|
@@ -34,13 +34,14 @@
|
|
|
34
34
|
"@jest/core": "~27.3.1",
|
|
35
35
|
"@jest/types": "~27.2.5",
|
|
36
36
|
"@lerna/exec": "~4.0.0",
|
|
37
|
-
"@servicetitan/eslint-config": "^
|
|
38
|
-
"@servicetitan/stylelint-config": "^
|
|
37
|
+
"@servicetitan/eslint-config": "^19.0.0",
|
|
38
|
+
"@servicetitan/stylelint-config": "^19.0.0",
|
|
39
39
|
"@types/jest": "~27.0.2",
|
|
40
40
|
"chalk": "~4.1.2",
|
|
41
41
|
"chokidar": "~3.5.2",
|
|
42
42
|
"cpx": "~1.5.0",
|
|
43
43
|
"css-loader": "~6.5.1",
|
|
44
|
+
"deepmerge": "~4.2.2",
|
|
44
45
|
"eslint": "~7.31.0",
|
|
45
46
|
"execa": "~5.1.1",
|
|
46
47
|
"fork-ts-checker-webpack-plugin": "~6.4.0",
|
|
@@ -68,6 +69,7 @@
|
|
|
68
69
|
"ts-node": "~10.4.0",
|
|
69
70
|
"typed-css-modules": "~0.7.0",
|
|
70
71
|
"typescript": "~4.4.4",
|
|
72
|
+
"username": "~5.1.0",
|
|
71
73
|
"webpack": "~5.61.0",
|
|
72
74
|
"webpack-dev-server": "~3.11.2",
|
|
73
75
|
"webpack-filter-warnings-plugin": "~1.2.1",
|
|
@@ -83,5 +85,5 @@
|
|
|
83
85
|
"cli": {
|
|
84
86
|
"webpack": false
|
|
85
87
|
},
|
|
86
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "efb844833047aa20f082a4f71dfd2c6af06937a9"
|
|
87
89
|
}
|
package/src/cli/utils/bundle.ts
CHANGED
|
@@ -46,6 +46,19 @@ function generateWebComponentMetadata() {
|
|
|
46
46
|
);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
function cacheSuffix(suffix: string, config: Configuration): Configuration {
|
|
50
|
+
if (typeof config.cache !== 'object') {
|
|
51
|
+
return config;
|
|
52
|
+
}
|
|
53
|
+
if (config.cache.type !== 'filesystem') {
|
|
54
|
+
return config;
|
|
55
|
+
}
|
|
56
|
+
const originName = config.cache.name ?? 'mfe';
|
|
57
|
+
const name = `${originName}__${suffix}`;
|
|
58
|
+
const cache = { ...config.cache, name };
|
|
59
|
+
return { ...config, cache };
|
|
60
|
+
}
|
|
61
|
+
|
|
49
62
|
export async function bundle() {
|
|
50
63
|
log.info('Bundling the package...');
|
|
51
64
|
|
|
@@ -101,21 +114,8 @@ export async function bundle() {
|
|
|
101
114
|
export async function bundleWatch() {
|
|
102
115
|
log.info('Bundling the package...');
|
|
103
116
|
|
|
104
|
-
const
|
|
117
|
+
const runServe = async ({ devServer = {}, ...config }: Configuration) => {
|
|
105
118
|
const compiler = webpack(config);
|
|
106
|
-
|
|
107
|
-
if (bundleOnly) {
|
|
108
|
-
return new Promise<void>((_0, reject) => {
|
|
109
|
-
const watching = compiler.watch({}, e => {
|
|
110
|
-
if (e) {
|
|
111
|
-
watching.close(() => {
|
|
112
|
-
reject(e);
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
|
|
119
119
|
const host = devServer.host ?? 'localhost';
|
|
120
120
|
const port = await getPortPromise({
|
|
121
121
|
port: devServer.port ?? 8080,
|
|
@@ -135,28 +135,46 @@ export async function bundleWatch() {
|
|
|
135
135
|
});
|
|
136
136
|
};
|
|
137
137
|
|
|
138
|
+
const run = async (config: Configuration) => {
|
|
139
|
+
const compiler = webpack(config);
|
|
140
|
+
return new Promise<void>((_0, reject) => {
|
|
141
|
+
const watching = compiler.watch({}, e => {
|
|
142
|
+
if (e) {
|
|
143
|
+
watching.close(() => {
|
|
144
|
+
reject(e);
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
};
|
|
150
|
+
|
|
138
151
|
if (isWebComponent()) {
|
|
139
152
|
generateWebComponentMetadata();
|
|
140
153
|
|
|
141
154
|
return Promise.all([
|
|
142
155
|
run(
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
156
|
+
cacheSuffix(
|
|
157
|
+
'light',
|
|
158
|
+
createWebpackConfig(
|
|
159
|
+
{
|
|
160
|
+
configuration: { mode: 'development' },
|
|
161
|
+
},
|
|
162
|
+
{ embed: true }
|
|
163
|
+
)
|
|
164
|
+
)
|
|
150
165
|
),
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
166
|
+
runServe(
|
|
167
|
+
cacheSuffix(
|
|
168
|
+
'full',
|
|
169
|
+
createWebpackConfig({
|
|
170
|
+
configuration: { mode: 'development' },
|
|
171
|
+
})
|
|
172
|
+
)
|
|
155
173
|
),
|
|
156
174
|
]);
|
|
157
175
|
}
|
|
158
176
|
|
|
159
|
-
return
|
|
177
|
+
return runServe(
|
|
160
178
|
fs.existsSync('./webpack.dev.config.js')
|
|
161
179
|
? require(path.resolve('./webpack.dev.config.js'))
|
|
162
180
|
: createWebpackConfig({
|
|
@@ -14,11 +14,15 @@ import {
|
|
|
14
14
|
isExposeSharedDependencies,
|
|
15
15
|
isWebComponent,
|
|
16
16
|
PackageType,
|
|
17
|
+
readJson,
|
|
18
|
+
log,
|
|
17
19
|
} from '../utils';
|
|
18
20
|
|
|
19
21
|
import { Options } from '.';
|
|
20
22
|
import { createConfig as createSharedConfig, Overrides as SharedOverrides } from './shared.config';
|
|
21
23
|
|
|
24
|
+
import { featureCohort } from './utils/feature-cohort';
|
|
25
|
+
|
|
22
26
|
export interface Overrides {
|
|
23
27
|
configuration: SharedOverrides['configuration'] & {
|
|
24
28
|
mode: 'development';
|
|
@@ -203,6 +207,16 @@ export function createConfig(
|
|
|
203
207
|
]
|
|
204
208
|
: []),
|
|
205
209
|
],
|
|
210
|
+
...featureCohort([2, 5], () => {
|
|
211
|
+
log.info('Persistent cache is active');
|
|
212
|
+
return {
|
|
213
|
+
cache: {
|
|
214
|
+
type: 'filesystem',
|
|
215
|
+
name: readJson('./package.json').name,
|
|
216
|
+
profile: true,
|
|
217
|
+
},
|
|
218
|
+
};
|
|
219
|
+
}),
|
|
206
220
|
output: {
|
|
207
221
|
filename: isWebComponent() ? '[name].js' : '[name].bundle.js',
|
|
208
222
|
},
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import deepmerge from 'deepmerge';
|
|
2
|
+
|
|
1
3
|
import { Configuration } from 'webpack';
|
|
2
4
|
|
|
3
5
|
import MiniCssExtractPlugin, {
|
|
@@ -25,7 +27,7 @@ export function createConfig(
|
|
|
25
27
|
{ configuration, plugins = {} }: Overrides,
|
|
26
28
|
options: Options = {}
|
|
27
29
|
): Configuration {
|
|
28
|
-
const { MiniCssExtractPlugin: miniCssExtractPluginOptions } = plugins;
|
|
30
|
+
const { MiniCssExtractPlugin: miniCssExtractPluginOptions = {} } = plugins;
|
|
29
31
|
|
|
30
32
|
return merge(
|
|
31
33
|
createSharedConfig({ plugins }, options),
|
|
@@ -141,12 +143,16 @@ export function createConfig(
|
|
|
141
143
|
plugins: [
|
|
142
144
|
...(!isCustomStyleRules()
|
|
143
145
|
? [
|
|
144
|
-
new MiniCssExtractPlugin(
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
146
|
+
new MiniCssExtractPlugin(
|
|
147
|
+
deepmerge<MiniCssExtractPluginOptions>(
|
|
148
|
+
{
|
|
149
|
+
filename: isWebComponent()
|
|
150
|
+
? '[name].css'
|
|
151
|
+
: '[name].[contenthash:8].bundle.css',
|
|
152
|
+
},
|
|
153
|
+
miniCssExtractPluginOptions
|
|
154
|
+
)
|
|
155
|
+
),
|
|
150
156
|
]
|
|
151
157
|
: []),
|
|
152
158
|
],
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
|
|
3
|
+
import deepmerge from 'deepmerge';
|
|
4
|
+
|
|
3
5
|
import { Configuration, DefinePlugin } from 'webpack';
|
|
4
6
|
|
|
5
7
|
/*
|
|
@@ -9,6 +11,7 @@ import { Configuration, DefinePlugin } from 'webpack';
|
|
|
9
11
|
*/
|
|
10
12
|
// import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
|
|
11
13
|
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); // TODO: rm
|
|
14
|
+
import { ForkTsCheckerWebpackPluginOptions } from 'fork-ts-checker-webpack-plugin/lib/ForkTsCheckerWebpackPluginOptions';
|
|
12
15
|
const FilterWarningsPlugin = require('webpack-filter-warnings-plugin');
|
|
13
16
|
import HtmlWebpackPlugin, { Options as HtmlWebpackPluginOptions } from 'html-webpack-plugin';
|
|
14
17
|
import VirtualModulesPlugin from 'webpack-virtual-modules';
|
|
@@ -28,6 +31,7 @@ import { Options } from '.';
|
|
|
28
31
|
export interface Overrides {
|
|
29
32
|
configuration?: Configuration;
|
|
30
33
|
plugins?: {
|
|
34
|
+
ForkTsCheckerWebpackPlugin?: ForkTsCheckerWebpackPluginOptions;
|
|
31
35
|
HtmlWebpackPlugin?: HtmlWebpackPluginOptions;
|
|
32
36
|
};
|
|
33
37
|
}
|
|
@@ -45,7 +49,10 @@ export function createConfig(
|
|
|
45
49
|
: undefined;
|
|
46
50
|
const metadata = isWebComponent() ? readJson(`./${destination}/metadata.json`) : undefined;
|
|
47
51
|
|
|
48
|
-
const {
|
|
52
|
+
const {
|
|
53
|
+
ForkTsCheckerWebpackPlugin: forkTsCheckerWebpackPluginOptions = {},
|
|
54
|
+
HtmlWebpackPlugin: htmlWebpackPluginOptions = {},
|
|
55
|
+
} = plugins;
|
|
49
56
|
|
|
50
57
|
return merge(
|
|
51
58
|
{
|
|
@@ -87,17 +94,15 @@ export function createConfig(
|
|
|
87
94
|
use: { loader: 'worker-loader' },
|
|
88
95
|
},
|
|
89
96
|
{
|
|
90
|
-
test: /\.(png|svg|jpg|jpeg|gif)
|
|
97
|
+
test: /\.(png|svg|jpg|jpeg|gif)$/i,
|
|
91
98
|
type: 'asset',
|
|
92
|
-
parser: { dataUrlCondition: { maxSize: 65000 } },
|
|
93
99
|
generator: {
|
|
94
100
|
filename: 'images/[contenthash][ext][query]',
|
|
95
101
|
},
|
|
96
102
|
},
|
|
97
103
|
{
|
|
98
|
-
test: /\.(woff|woff2|eot|ttf|otf)
|
|
99
|
-
type: 'asset',
|
|
100
|
-
parser: { dataUrlCondition: { maxSize: 65000 } },
|
|
104
|
+
test: /\.(woff|woff2|eot|ttf|otf)$/i,
|
|
105
|
+
type: 'asset/resource',
|
|
101
106
|
generator: {
|
|
102
107
|
filename: 'fonts/[contenthash][ext][query]',
|
|
103
108
|
},
|
|
@@ -116,66 +121,71 @@ export function createConfig(
|
|
|
116
121
|
plugins: [
|
|
117
122
|
...(!embed
|
|
118
123
|
? [
|
|
119
|
-
new ForkTsCheckerWebpackPlugin(
|
|
120
|
-
|
|
121
|
-
|
|
124
|
+
new ForkTsCheckerWebpackPlugin(
|
|
125
|
+
deepmerge<ForkTsCheckerWebpackPluginOptions>(
|
|
126
|
+
{
|
|
127
|
+
typescript: { configOverwrite: { references: [] } },
|
|
128
|
+
},
|
|
129
|
+
forkTsCheckerWebpackPluginOptions
|
|
130
|
+
)
|
|
131
|
+
),
|
|
122
132
|
new FilterWarningsPlugin({
|
|
123
133
|
exclude: /export .* was not found in/,
|
|
124
134
|
}),
|
|
125
|
-
new HtmlWebpackPlugin(
|
|
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
|
-
|
|
135
|
+
new HtmlWebpackPlugin(
|
|
136
|
+
deepmerge<HtmlWebpackPluginOptions>(
|
|
137
|
+
{
|
|
138
|
+
title: 'ServiceTitan',
|
|
139
|
+
hash: true,
|
|
140
|
+
...(isWebComponent()
|
|
141
|
+
? {
|
|
142
|
+
inject: false,
|
|
143
|
+
templateContent: ({ htmlWebpackPlugin }) => `
|
|
144
|
+
<!DOCTYPE html>
|
|
145
|
+
<html>
|
|
146
|
+
<head>
|
|
147
|
+
${htmlWebpackPlugin.tags.headTags}
|
|
148
|
+
</head>
|
|
149
|
+
<body>
|
|
150
|
+
<${metadata.name} />
|
|
151
|
+
|
|
152
|
+
${htmlWebpackPlugin.tags.bodyTags}
|
|
153
|
+
</body>
|
|
154
|
+
</html>
|
|
155
|
+
`,
|
|
156
|
+
}
|
|
157
|
+
: {}),
|
|
158
|
+
templateParameters: {
|
|
159
|
+
splitByEntry,
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
htmlWebpackPluginOptions
|
|
163
|
+
)
|
|
164
|
+
),
|
|
151
165
|
]
|
|
152
166
|
: []),
|
|
153
167
|
...(isWebComponent() || isExposeSharedDependencies()
|
|
154
168
|
? [
|
|
155
169
|
new DefinePlugin({
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
(result,
|
|
162
|
-
|
|
163
|
-
[dependency]
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
176
|
-
WEB_COMPONENT_NAME: JSON.stringify(metadata.name),
|
|
177
|
-
}
|
|
178
|
-
: {}),
|
|
170
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
171
|
+
EXPOSED_DEPENDENCIES: JSON.stringify(
|
|
172
|
+
isExposeSharedDependencies()
|
|
173
|
+
? Object.entries(sharedDependencies).reduce(
|
|
174
|
+
(result, [dependency, variable]) =>
|
|
175
|
+
Object.assign(result, {
|
|
176
|
+
[dependency]: {
|
|
177
|
+
version: dependencies[dependency],
|
|
178
|
+
variable,
|
|
179
|
+
},
|
|
180
|
+
}),
|
|
181
|
+
{}
|
|
182
|
+
)
|
|
183
|
+
: undefined
|
|
184
|
+
),
|
|
185
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
186
|
+
WEB_COMPONENT_NAME: JSON.stringify(
|
|
187
|
+
isWebComponent() ? metadata.name : undefined
|
|
188
|
+
),
|
|
179
189
|
}),
|
|
180
190
|
]
|
|
181
191
|
: []),
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { sync as username } from 'username';
|
|
2
|
+
|
|
3
|
+
import { log } from '../../utils';
|
|
4
|
+
|
|
5
|
+
import { hashMod } from './hash-mod';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Allows to enable feature for part of the auditory based on stable trait (username).
|
|
9
|
+
*/
|
|
10
|
+
export function featureCohort<T>([limit, total]: [number, number], fn: () => T): T | undefined {
|
|
11
|
+
if (limit >= total) {
|
|
12
|
+
log.warning('featureCohort: feature always active');
|
|
13
|
+
}
|
|
14
|
+
const mod = hashMod(total);
|
|
15
|
+
const cohort = mod(username() ?? '');
|
|
16
|
+
if (cohort < limit) {
|
|
17
|
+
return fn();
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* salvaged from https://github.com/segment-boneyard/hash-mod
|
|
3
|
+
* 1. recent code from repo never got into npm registry
|
|
4
|
+
* 2. no types in DefinitelyTyped
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Returns a `hashMod` function that will return an integer hash of a string
|
|
9
|
+
* modded by `buckets`.
|
|
10
|
+
*
|
|
11
|
+
* @param {Number} buckets
|
|
12
|
+
* @return {Function}
|
|
13
|
+
*/
|
|
14
|
+
export function hashMod(buckets: number) {
|
|
15
|
+
return function (string: string) {
|
|
16
|
+
return integerHash(string) % buckets;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Return the integer hash of a `string`.
|
|
22
|
+
*
|
|
23
|
+
* http://stackoverflow.com/questions/2624192/good-hash-function-for-strings
|
|
24
|
+
*
|
|
25
|
+
* @param {String} string
|
|
26
|
+
* @returns {Number}
|
|
27
|
+
*/
|
|
28
|
+
function integerHash(string: string) {
|
|
29
|
+
return (string + '').split('').reduce(function (memo, item) {
|
|
30
|
+
return (memo * 31 * item.charCodeAt(0)) % 982451653;
|
|
31
|
+
}, 7);
|
|
32
|
+
}
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
"typings": "./dist/index.d.ts",
|
|
8
8
|
"scripts": {},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@servicetitan/design-system": "~10.
|
|
11
|
-
"@servicetitan/link-item": "~17.
|
|
10
|
+
"@servicetitan/design-system": "~10.6.0",
|
|
11
|
+
"@servicetitan/link-item": "~17.5.0",
|
|
12
12
|
"feature-a": "^0.0.0",
|
|
13
13
|
"feature-b": "^0.0.0",
|
|
14
14
|
"feature-c": "^0.0.0",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"react-router-dom": "~5.3.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@types/react": "~17.0.
|
|
21
|
-
"@types/react-dom": "~17.0.
|
|
20
|
+
"@types/react": "~17.0.34",
|
|
21
|
+
"@types/react-dom": "~17.0.11",
|
|
22
22
|
"@types/react-router-dom": "~5.3.2"
|
|
23
23
|
}
|
|
24
24
|
}
|