@knapsack/renderer-webpack-base 4.69.13--canary.4821.ae550c0.0 → 4.69.13
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +19 -0
- package/dist/client/index.d.mts +1 -1
- package/dist/client/index.d.mts.map +1 -1
- package/dist/client/renderer-webpack-client.d.mts +70 -12
- package/dist/client/renderer-webpack-client.d.mts.map +1 -1
- package/dist/client/renderer-webpack-client.mjs +111 -89
- package/dist/client/renderer-webpack-client.mjs.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/renderer-webpack-base.d.ts +58 -23
- package/dist/renderer-webpack-base.d.ts.map +1 -1
- package/dist/renderer-webpack-base.js +232 -159
- package/dist/renderer-webpack-base.js.map +1 -1
- package/dist/types.d.ts +23 -41
- package/dist/types.d.ts.map +1 -1
- package/package.json +11 -11
- package/dist/utils.d.ts +0 -3
- package/dist/utils.d.ts.map +0 -1
- package/dist/utils.js +0 -8
- package/dist/utils.js.map +0 -1
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
13
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
15
15
|
};
|
16
|
-
var
|
16
|
+
var _RendererWebpackBase_webpackAssetsPaths, _RendererWebpackBase_webpackAssetsPathsFilePath, _RendererWebpackBase_entryString;
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
18
18
|
exports.RendererWebpackBase = void 0;
|
19
19
|
const app_1 = require("@knapsack/app");
|
@@ -46,69 +46,18 @@ function normalizeAliases(aliases) {
|
|
46
46
|
}));
|
47
47
|
}
|
48
48
|
class RendererWebpackBase extends renderers_1.RendererBase {
|
49
|
-
constructor({ id, language, webpackConfig = {}, extraScripts = [],
|
49
|
+
constructor({ id, extension, language, webpackConfig = {}, extraScripts = [], }) {
|
50
50
|
super({
|
51
51
|
id,
|
52
|
+
extension,
|
52
53
|
language,
|
53
|
-
codeSrcs,
|
54
54
|
});
|
55
|
-
_RendererWebpackBase_instances.add(this);
|
56
55
|
_RendererWebpackBase_webpackAssetsPaths.set(this, void 0);
|
57
56
|
_RendererWebpackBase_webpackAssetsPathsFilePath.set(this, void 0);
|
58
57
|
/** Last written value of `getEntryString` - used for preventing file writes */
|
59
58
|
_RendererWebpackBase_entryString.set(this, void 0);
|
60
|
-
this.setConfig = (opt) => {
|
61
|
-
super.setConfig(opt);
|
62
|
-
this.publicPath = `/${(0, path_1.relative)(this.cacheDir, this.outputDir)}/`;
|
63
|
-
__classPrivateFieldSet(this, _RendererWebpackBase_webpackAssetsPathsFilePath, (0, path_1.join)(this.outputDir, 'webpack-asset-paths.json'), "f");
|
64
|
-
this.entryFilePath = (0, path_1.join)(this.outputDir, 'ks-pattern-import-global-setup.js');
|
65
|
-
};
|
66
|
-
this.hydrate = async () => {
|
67
|
-
try {
|
68
|
-
__classPrivateFieldSet(this, _RendererWebpackBase_webpackAssetsPaths, await (0, file_utils_1.readJSON)(__classPrivateFieldGet(this, _RendererWebpackBase_webpackAssetsPathsFilePath, "f")), "f");
|
69
|
-
}
|
70
|
-
catch (e) {
|
71
|
-
throw new Error(`It looks like 'knapsack build' was not ran before 'knapsack serve' - not able to find ${__classPrivateFieldGet(this, _RendererWebpackBase_webpackAssetsPathsFilePath, "f")}`);
|
72
|
-
}
|
73
|
-
};
|
74
|
-
this.build = async () => {
|
75
|
-
app_1.log.info('Building with Webpack...', null, this.logPrefix);
|
76
|
-
return new Promise((resolve, reject) => {
|
77
|
-
__classPrivateFieldGet(this, _RendererWebpackBase_instances, "m", _RendererWebpackBase_prepWebpack).call(this);
|
78
|
-
this.webpackCompiler.run(async (err, stats) => {
|
79
|
-
if (err) {
|
80
|
-
console.log();
|
81
|
-
console.error(err);
|
82
|
-
console.log();
|
83
|
-
app_1.log.error(`An error occured while building your components with Webpack. Please review above messages`, null, this.logPrefix);
|
84
|
-
reject();
|
85
|
-
return;
|
86
|
-
}
|
87
|
-
if (stats?.hasErrors?.()) {
|
88
|
-
console.log();
|
89
|
-
console.error(stats.toString());
|
90
|
-
console.log();
|
91
|
-
app_1.log.error(`An error occured while building your components with Webpack. Please review above messages`, null, this.logPrefix);
|
92
|
-
reject();
|
93
|
-
return;
|
94
|
-
}
|
95
|
-
/**
|
96
|
-
* Writing out this info to a file so that the `hydrate` step can read it and get it back in-memory
|
97
|
-
*/
|
98
|
-
await (0, file_utils_1.writeJSON)({
|
99
|
-
path: __classPrivateFieldGet(this, _RendererWebpackBase_webpackAssetsPathsFilePath, "f"),
|
100
|
-
contents: __classPrivateFieldGet(this, _RendererWebpackBase_webpackAssetsPaths, "f"),
|
101
|
-
});
|
102
|
-
app_1.log.info('Webpack built', null, this.logPrefix);
|
103
|
-
resolve();
|
104
|
-
});
|
105
|
-
});
|
106
|
-
};
|
107
59
|
this.getUsage = async (opt) => {
|
108
|
-
const { usage } = await this.getUsageAndImports(
|
109
|
-
...opt,
|
110
|
-
importMap: new Map(),
|
111
|
-
});
|
60
|
+
const { usage } = await this.getUsageAndImports(opt);
|
112
61
|
return usage;
|
113
62
|
};
|
114
63
|
this.webpack = webpack_1.default;
|
@@ -124,76 +73,147 @@ class RendererWebpackBase extends renderers_1.RendererBase {
|
|
124
73
|
this.extraScripts = extraScripts;
|
125
74
|
__classPrivateFieldSet(this, _RendererWebpackBase_entryString, '', "f");
|
126
75
|
}
|
127
|
-
async
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
76
|
+
async init(opt) {
|
77
|
+
await super.init(opt);
|
78
|
+
app_1.log.info(`Using WebPack v${this.webpackVersion.majorVersion}`, null, this.id);
|
79
|
+
this.publicPath = `/${(0, path_1.relative)(this.cacheDir, this.outputDir)}/`;
|
80
|
+
__classPrivateFieldSet(this, _RendererWebpackBase_webpackAssetsPathsFilePath, (0, path_1.join)(this.outputDir, 'webpack-asset-paths.json'), "f");
|
81
|
+
this.entryFilePath = (0, path_1.join)(this.outputDir, 'ks-pattern-import-global-setup.js');
|
82
|
+
}
|
83
|
+
async hydrate(opt) {
|
84
|
+
await super.hydrate(opt);
|
85
|
+
try {
|
86
|
+
__classPrivateFieldSet(this, _RendererWebpackBase_webpackAssetsPaths, await (0, file_utils_1.readJSON)(__classPrivateFieldGet(this, _RendererWebpackBase_webpackAssetsPathsFilePath, "f")), "f");
|
134
87
|
}
|
135
|
-
|
136
|
-
|
137
|
-
if (prior && prior.path === path) {
|
138
|
-
switch (prior.type) {
|
139
|
-
case 'default': {
|
140
|
-
if (isDefaultExport)
|
141
|
-
return prior;
|
142
|
-
break;
|
143
|
-
}
|
144
|
-
case 'named': {
|
145
|
-
if (prior.name === name)
|
146
|
-
return prior;
|
147
|
-
break;
|
148
|
-
}
|
149
|
-
case 'renamed': {
|
150
|
-
if (prior.originalName === alias)
|
151
|
-
return prior;
|
152
|
-
break;
|
153
|
-
}
|
154
|
-
default: {
|
155
|
-
throw new Error(`Unknown import type: ${JSON.stringify(prior)}`);
|
156
|
-
}
|
157
|
-
}
|
88
|
+
catch (e) {
|
89
|
+
throw new Error(`It looks like 'knapsack build' was not ran before 'knapsack serve' - not able to find ${__classPrivateFieldGet(this, _RendererWebpackBase_webpackAssetsPathsFilePath, "f")}`);
|
158
90
|
}
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
91
|
+
}
|
92
|
+
/**
|
93
|
+
* @see {getJsImport} for types "pattern-template" and "pattern-template-demo"
|
94
|
+
* @see {getJsImportExtra} for type "extra"
|
95
|
+
*/
|
96
|
+
getJsImports() {
|
97
|
+
const { allTemplates, allTemplateDemos } = this.getMyTemplates();
|
98
|
+
return [
|
99
|
+
...allTemplates.map(({ patternId, templateId, alias, path }) => {
|
100
|
+
const { type, absolutePath, originalPath } = this.patterns.getTemplatePath({
|
101
|
+
patternId,
|
102
|
+
templateId,
|
103
|
+
});
|
104
|
+
const hasSingleTemplate = allTemplates.filter((t) => t.patternId === patternId).length === 1;
|
105
|
+
const importPath = type === 'package' ? originalPath : absolutePath;
|
106
|
+
return {
|
107
|
+
type: 'pattern-template',
|
108
|
+
patternId,
|
109
|
+
templateId,
|
110
|
+
importInfo: alias
|
111
|
+
? {
|
112
|
+
type: 'named',
|
113
|
+
name: alias,
|
114
|
+
path: importPath,
|
115
|
+
}
|
116
|
+
: {
|
117
|
+
type: 'default',
|
118
|
+
path: importPath,
|
119
|
+
name: this.changeCase(hasSingleTemplate
|
120
|
+
? patternId
|
121
|
+
: `${patternId}-${templateId}`),
|
122
|
+
},
|
123
|
+
};
|
124
|
+
}),
|
125
|
+
...allTemplateDemos.map(({ patternId, templateId, demoId, alias, path }) => {
|
126
|
+
const { type, absolutePath, originalPath } = this.patterns.getTemplatePath({
|
127
|
+
patternId,
|
128
|
+
templateId,
|
129
|
+
demoId,
|
167
130
|
});
|
168
|
-
|
131
|
+
const importPath = type === 'package' ? originalPath : absolutePath;
|
132
|
+
return {
|
133
|
+
type: 'pattern-template-demo',
|
134
|
+
patternId,
|
135
|
+
templateId,
|
136
|
+
demoId,
|
137
|
+
importInfo: alias
|
138
|
+
? {
|
139
|
+
type: 'named',
|
140
|
+
name: alias,
|
141
|
+
path: importPath,
|
142
|
+
}
|
143
|
+
: {
|
144
|
+
type: 'default',
|
145
|
+
path: importPath,
|
146
|
+
name: this.changeCase(`${patternId}-${templateId}-${demoId}`),
|
147
|
+
},
|
148
|
+
};
|
149
|
+
}),
|
150
|
+
];
|
151
|
+
}
|
152
|
+
/**
|
153
|
+
* @see {getJsImports} for all
|
154
|
+
* @see {getJsImportExtra} for type "extra"
|
155
|
+
*/
|
156
|
+
getJsImport({ patternId, templateId, demoId, }) {
|
157
|
+
const result = this.getJsImports()
|
158
|
+
.filter((imp) => {
|
159
|
+
return demoId
|
160
|
+
? imp.type === 'pattern-template-demo'
|
161
|
+
: imp.type === 'pattern-template';
|
162
|
+
})
|
163
|
+
.find((imp) => {
|
164
|
+
switch (imp.type) {
|
165
|
+
case 'extra':
|
166
|
+
return false;
|
167
|
+
case 'pattern-template':
|
168
|
+
return imp.patternId === patternId && imp.templateId === templateId;
|
169
|
+
case 'pattern-template-demo':
|
170
|
+
return (imp.patternId === patternId &&
|
171
|
+
imp.templateId === templateId &&
|
172
|
+
imp.demoId === demoId);
|
173
|
+
default:
|
174
|
+
return (0, utils_1.expectNever)(imp);
|
169
175
|
}
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
name,
|
174
|
-
path,
|
175
|
-
});
|
176
|
-
return importMap.get(name);
|
176
|
+
});
|
177
|
+
if (!result) {
|
178
|
+
throw new Error(`Could not find import for patternId: ${patternId} templateId: ${templateId} demoId: ${demoId}`);
|
177
179
|
}
|
178
|
-
|
179
|
-
|
180
|
-
if (isDefaultExport) {
|
181
|
-
// not unique & default import
|
182
|
-
importMap.set(name, {
|
183
|
-
type: 'default',
|
184
|
-
name, // ok since `name` has been made unique
|
185
|
-
path,
|
186
|
-
});
|
187
|
-
return importMap.get(name);
|
180
|
+
if (result.type === 'extra') {
|
181
|
+
throw new Error('getJsImport: type "extra" not expected');
|
188
182
|
}
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
183
|
+
return result;
|
184
|
+
}
|
185
|
+
/**
|
186
|
+
* @see {getJsImports} for all
|
187
|
+
* @see {getJsImport} for types "pattern-template" and "pattern-template-demo"
|
188
|
+
*/
|
189
|
+
getJsImportExtra({ name, }) {
|
190
|
+
const result = this.getJsImports().find((imp) => {
|
191
|
+
if (imp.type !== 'extra')
|
192
|
+
return false;
|
193
|
+
return imp.importInfo.name === name;
|
194
|
+
});
|
195
|
+
if (!result) {
|
196
|
+
throw new Error(`Could not find import for name: ${name}`);
|
197
|
+
}
|
198
|
+
if (result.type !== 'extra') {
|
199
|
+
throw new Error('getJsImportExtra: type "extra" expected');
|
200
|
+
}
|
201
|
+
return result;
|
202
|
+
}
|
203
|
+
writeKsEntryFile() {
|
204
|
+
if (!this.entryFilePath) {
|
205
|
+
throw new Error('Cannot write entry file because entryFilePath is not set');
|
206
|
+
}
|
207
|
+
const imports = this.getJsImports();
|
208
|
+
const contents = (0, create_js_import_entry_1.getEntryString)(new Set(imports.map((imp) => imp.importInfo.path)));
|
209
|
+
if (contents === __classPrivateFieldGet(this, _RendererWebpackBase_entryString, "f"))
|
210
|
+
return;
|
211
|
+
__classPrivateFieldSet(this, _RendererWebpackBase_entryString, contents, "f");
|
212
|
+
(0, file_utils_1.writeFormattedFileSync)({
|
213
|
+
contents,
|
214
|
+
path: this.entryFilePath,
|
195
215
|
});
|
196
|
-
|
216
|
+
app_1.log.verbose(`Wrote entry file to ${this.entryFilePath}`, null, this.id);
|
197
217
|
}
|
198
218
|
get webpackVersion() {
|
199
219
|
const majorVersion = parseInt(this.webpack.version.split('.')[0], 10);
|
@@ -287,13 +307,20 @@ class RendererWebpackBase extends renderers_1.RendererBase {
|
|
287
307
|
};
|
288
308
|
return newWebpackConfig;
|
289
309
|
}
|
310
|
+
prepWebpack() {
|
311
|
+
this.writeKsEntryFile();
|
312
|
+
const webpackConfig = this.createWebpackConfig();
|
313
|
+
app_1.log.verbose(`Webpack Config module.rules`, webpackConfig.module.rules, this.logPrefix);
|
314
|
+
// should this look for an already running webpack instance to possibly shut it down first? would only be from watch
|
315
|
+
this.webpackCompiler = this.webpack(webpackConfig);
|
316
|
+
}
|
290
317
|
/**
|
291
318
|
* Every asset file path needed in `<script>` tags
|
292
319
|
*/
|
293
320
|
getWebpackAssetPaths() {
|
294
321
|
return __classPrivateFieldGet(this, _RendererWebpackBase_webpackAssetsPaths, "f")?.[wpEntryMainId] || [];
|
295
322
|
}
|
296
|
-
|
323
|
+
createHtmlTagsForAssetPaths({ assets, scriptTagsAreAsync, }) {
|
297
324
|
return assets
|
298
325
|
.filter((asset) => !asset.endsWith('.map')) // exclude source maps
|
299
326
|
.map((asset) => {
|
@@ -309,6 +336,39 @@ class RendererWebpackBase extends renderers_1.RendererBase {
|
|
309
336
|
})
|
310
337
|
.join('\n');
|
311
338
|
}
|
339
|
+
build() {
|
340
|
+
app_1.log.info('Building with Webpack...', null, this.logPrefix);
|
341
|
+
return new Promise((resolve, reject) => {
|
342
|
+
this.prepWebpack();
|
343
|
+
this.webpackCompiler.run(async (err, stats) => {
|
344
|
+
if (err) {
|
345
|
+
console.log();
|
346
|
+
console.error(err);
|
347
|
+
console.log();
|
348
|
+
app_1.log.error(`An error occured while building your components with Webpack. Please review above messages`, null, this.logPrefix);
|
349
|
+
reject();
|
350
|
+
return;
|
351
|
+
}
|
352
|
+
if (stats?.hasErrors?.()) {
|
353
|
+
console.log();
|
354
|
+
console.error(stats.toString());
|
355
|
+
console.log();
|
356
|
+
app_1.log.error(`An error occured while building your components with Webpack. Please review above messages`, null, this.logPrefix);
|
357
|
+
reject();
|
358
|
+
return;
|
359
|
+
}
|
360
|
+
/**
|
361
|
+
* Writing out this info to a file so that the `hydrate` step can read it and get it back in-memory
|
362
|
+
*/
|
363
|
+
await (0, file_utils_1.writeJSON)({
|
364
|
+
path: __classPrivateFieldGet(this, _RendererWebpackBase_webpackAssetsPathsFilePath, "f"),
|
365
|
+
contents: __classPrivateFieldGet(this, _RendererWebpackBase_webpackAssetsPaths, "f"),
|
366
|
+
});
|
367
|
+
app_1.log.info('Webpack built', null, this.logPrefix);
|
368
|
+
resolve();
|
369
|
+
});
|
370
|
+
});
|
371
|
+
}
|
312
372
|
/** Starts a webpack watch, returns an object with a `.close()` method for shutting down */
|
313
373
|
startWebpackWatch() {
|
314
374
|
if (!this.webpackCompiler) {
|
@@ -341,20 +401,47 @@ class RendererWebpackBase extends renderers_1.RendererBase {
|
|
341
401
|
}, 0);
|
342
402
|
});
|
343
403
|
}
|
344
|
-
async watch() {
|
404
|
+
async watch(_opt) {
|
345
405
|
// we don't call `await super.watch(opt);` b/c webpack is watching our source files for us
|
346
|
-
|
347
|
-
app_1.knapsackEvents.onPatternsDataReady(() => {
|
348
|
-
|
406
|
+
this.prepWebpack();
|
407
|
+
app_1.knapsackEvents.onPatternsDataReady(({ patterns: allPatterns }) => {
|
408
|
+
this.writeKsEntryFile();
|
349
409
|
});
|
350
410
|
this.startWebpackWatch();
|
351
411
|
}
|
412
|
+
// eslint-disable-next-line class-methods-use-this
|
352
413
|
onChange() {
|
353
414
|
// overwriting so we can call event after webpack compiles
|
354
415
|
}
|
355
|
-
|
416
|
+
makeKsJsImportsUnique({ imports }) {
|
417
|
+
const results = imports.reduce((cur, imp) => {
|
418
|
+
const prevImport = cur.imports.find(({ importInfo: { name, path } }) => {
|
419
|
+
if (name === imp.importInfo.name && path === imp.importInfo.path) {
|
420
|
+
return true;
|
421
|
+
}
|
422
|
+
return false;
|
423
|
+
});
|
424
|
+
if (!prevImport) {
|
425
|
+
cur.declaredVars.push(imp.importInfo.name);
|
426
|
+
cur.imports.push(imp);
|
427
|
+
}
|
428
|
+
return cur;
|
429
|
+
}, {
|
430
|
+
imports: [],
|
431
|
+
declaredVars: [],
|
432
|
+
});
|
433
|
+
return {
|
434
|
+
...results,
|
435
|
+
isDeclaredVarsUnique: (0, utils_1.isArrayOfStringsUnique)(results.declaredVars),
|
436
|
+
nameCollisions: (0, utils_1.getNonUniqueStringsFromArray)(results.declaredVars),
|
437
|
+
};
|
438
|
+
}
|
439
|
+
createJsImportCodeBlock({ imports: nonUniqueImports, }) {
|
440
|
+
const { imports } = this.makeKsJsImportsUnique({
|
441
|
+
imports: nonUniqueImports,
|
442
|
+
});
|
356
443
|
const declaredVars = [];
|
357
|
-
const impMap = (0, utils_1.groupBy)(
|
444
|
+
const impMap = (0, utils_1.groupBy)(imports, (imp) => imp.importInfo.path);
|
358
445
|
const importLines = Object.entries(impMap)
|
359
446
|
.sort(([a], [b]) => {
|
360
447
|
// sorting relative imports at bottom
|
@@ -370,60 +457,46 @@ class RendererWebpackBase extends renderers_1.RendererBase {
|
|
370
457
|
const importPath = (0, path_1.isAbsolute)(path)
|
371
458
|
? `./${(0, path_1.relative)(process.cwd(), path)}`
|
372
459
|
: path;
|
373
|
-
const {
|
374
|
-
declaredVars.push(imp.name);
|
375
|
-
switch (imp.type) {
|
376
|
-
case '
|
377
|
-
cur.
|
378
|
-
name: imp.name,
|
379
|
-
originalName: imp.originalName,
|
380
|
-
});
|
460
|
+
const { alls, defaults, names } = imps.reduce((cur, imp) => {
|
461
|
+
declaredVars.push(imp.importInfo.name);
|
462
|
+
switch (imp.importInfo.type) {
|
463
|
+
case 'all':
|
464
|
+
cur.alls.push(imp.importInfo.name);
|
381
465
|
break;
|
382
466
|
case 'default':
|
383
|
-
cur.defaults.push(imp.name);
|
467
|
+
cur.defaults.push(imp.importInfo.name);
|
384
468
|
break;
|
385
469
|
case 'named':
|
386
|
-
cur.names.push(imp.name);
|
470
|
+
cur.names.push(imp.importInfo.name);
|
387
471
|
break;
|
388
472
|
default: {
|
389
|
-
|
473
|
+
(0, utils_1.expectNever)(imp.importInfo);
|
390
474
|
}
|
391
475
|
}
|
392
476
|
return cur;
|
393
477
|
}, {
|
394
478
|
names: [],
|
395
479
|
defaults: [],
|
396
|
-
|
480
|
+
alls: [],
|
397
481
|
});
|
398
482
|
return [
|
399
|
-
...
|
483
|
+
...alls.map((name) => `import * as ${name} from '${importPath}';`),
|
400
484
|
...defaults.map((name) => `import ${name} from '${importPath}';`),
|
401
485
|
names.length > 0 &&
|
402
486
|
`import { ${names.join(',')} } from '${importPath}';`,
|
403
487
|
].filter(Boolean);
|
404
488
|
});
|
405
|
-
return
|
489
|
+
return {
|
490
|
+
code: (0, file_utils_1.formatCodeSync)({
|
491
|
+
contents: [...new Set(importLines)].join('\n'),
|
492
|
+
path: 'fake-file.js',
|
493
|
+
}),
|
494
|
+
declaredVars,
|
495
|
+
isDeclaredVarsUnique: (0, utils_1.isArrayOfStringsUnique)(declaredVars),
|
496
|
+
nameCollisions: (0, utils_1.getNonUniqueStringsFromArray)(declaredVars),
|
497
|
+
};
|
406
498
|
}
|
407
499
|
}
|
408
500
|
exports.RendererWebpackBase = RendererWebpackBase;
|
409
|
-
_RendererWebpackBase_webpackAssetsPaths = new WeakMap(), _RendererWebpackBase_webpackAssetsPathsFilePath = new WeakMap(), _RendererWebpackBase_entryString = new WeakMap()
|
410
|
-
if (!this.entryFilePath) {
|
411
|
-
throw new Error('Cannot write entry file because entryFilePath is not set');
|
412
|
-
}
|
413
|
-
const contents = (0, create_js_import_entry_1.getEntryString)(this.getCodeSrcs());
|
414
|
-
if (contents === __classPrivateFieldGet(this, _RendererWebpackBase_entryString, "f"))
|
415
|
-
return;
|
416
|
-
__classPrivateFieldSet(this, _RendererWebpackBase_entryString, contents, "f");
|
417
|
-
(0, file_utils_1.writeFormattedFileSync)({
|
418
|
-
contents,
|
419
|
-
path: this.entryFilePath,
|
420
|
-
});
|
421
|
-
app_1.log.verbose(`Wrote entry file to ${this.entryFilePath}`, null, this.id);
|
422
|
-
}, _RendererWebpackBase_prepWebpack = function _RendererWebpackBase_prepWebpack() {
|
423
|
-
__classPrivateFieldGet(this, _RendererWebpackBase_instances, "m", _RendererWebpackBase_writeKsEntryFile).call(this);
|
424
|
-
const webpackConfig = this.createWebpackConfig();
|
425
|
-
app_1.log.verbose(`Webpack Config module.rules`, webpackConfig.module.rules, this.logPrefix);
|
426
|
-
// should this look for an already running webpack instance to possibly shut it down first? would only be from watch
|
427
|
-
this.webpackCompiler = this.webpack(webpackConfig);
|
428
|
-
};
|
501
|
+
_RendererWebpackBase_webpackAssetsPaths = new WeakMap(), _RendererWebpackBase_webpackAssetsPathsFilePath = new WeakMap(), _RendererWebpackBase_entryString = new WeakMap();
|
429
502
|
//# sourceMappingURL=renderer-webpack-base.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"renderer-webpack-base.js","sourceRoot":"","sources":["../src/renderer-webpack-base.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,uCAAoD;AACpD,uDAIiC;AACjC,qDAK8B;AAC9B,2CAAuD;AACvD,yEAAyE;AACzE,+B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B,CAAC,CAAC,CAAC;QAEL,OAAO;YACL,IAAI,EAAE,IAAA,2BAAc,EAAC;gBACnB,QAAQ,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;gBAC9C,IAAI,EAAE,cAAc;aACrB,CAAC;YACF,YAAY;YACZ,oBAAoB,EAAE,IAAA,8BAAsB,EAAC,YAAY,CAAC;YAC1D,cAAc,EAAE,IAAA,oCAA4B,EAAC,YAAY,CAAC;SAC3D,CAAC;IACJ,CAAC;CACF;AAxmBD,kDAwmBC"}
|
package/dist/types.d.ts
CHANGED
@@ -1,39 +1,8 @@
|
|
1
|
-
import type { KsRendererClientMeta } from '@knapsack/types';
|
2
|
-
export type ImportedModules<ExportedComponentType> = {
|
3
|
-
[id: string]: () => Promise<EsModuleObject<ExportedComponentType>>;
|
4
|
-
};
|
5
|
-
/** The result of `import`-ing a module */
|
6
|
-
export type EsModuleObject<ExportedType = unknown> = {
|
7
|
-
default?: ExportedType;
|
8
|
-
[key: string]: ExportedType;
|
9
|
-
};
|
10
|
-
/**
|
11
|
-
* This is `window.knapsack` inside the renderer client: the iframe container for renderer components
|
12
|
-
*/
|
13
|
-
export interface KsRendererClientUtils<ExportedComponentType = unknown, RendererMetaType extends RendererMetaBase = RendererMetaBase, RendererMethods extends Record<string, unknown> = Record<string, unknown>> {
|
14
|
-
importedModules: ImportedModules<ExportedComponentType>;
|
15
|
-
rendererMeta: RendererMetaType;
|
16
|
-
rendererMethods: RendererMethods;
|
17
|
-
getNeededImports: () => Promise<Record<string, ExportedComponentType>>;
|
18
|
-
getExtraImports: () => Promise<Record<keyof RendererMetaType['extraImports'], ExportedComponentType>>;
|
19
|
-
meta: KsRendererClientMeta;
|
20
|
-
}
|
21
|
-
/**
|
22
|
-
* Keys are the `name`s of the imports
|
23
|
-
* This ensures that the names are unique since these become vars
|
24
|
-
*/
|
25
|
-
export type KsJsImportMap = Map<string, KsJsImportInfo>;
|
26
1
|
/**
|
27
2
|
* The shared requirements for the `rendererMeta` object that gets put in `<script>` tags in the client.
|
28
3
|
*/
|
29
|
-
export type RendererMetaBase
|
30
|
-
|
31
|
-
/**
|
32
|
-
* Use `getExtraImports()` to get these extra imports
|
33
|
-
*/
|
34
|
-
extraImports?: {
|
35
|
-
[Name in ExtraImportsNames]: KsJsImportInfo<Name>;
|
36
|
-
};
|
4
|
+
export type RendererMetaBase = {
|
5
|
+
neededImports: KsJsImport[];
|
37
6
|
};
|
38
7
|
/**
|
39
8
|
* Information about JS imports that can describe how to import a module in these ways:
|
@@ -43,22 +12,35 @@ export type RendererMetaBase<ExtraImportsNames extends string = string> = {
|
|
43
12
|
*
|
44
13
|
* Used in Webpack-based renderers
|
45
14
|
*/
|
46
|
-
export type KsJsImportInfo
|
15
|
+
export type KsJsImportInfo = {
|
47
16
|
type: 'default';
|
48
17
|
/** import name from 'path'; */
|
49
|
-
name:
|
18
|
+
name: string;
|
50
19
|
path: string;
|
51
20
|
} | {
|
52
21
|
type: 'named';
|
53
22
|
path: string;
|
54
23
|
/** import { name } from 'path'; */
|
55
|
-
name:
|
24
|
+
name: string;
|
56
25
|
} | {
|
57
|
-
type: '
|
26
|
+
type: 'all';
|
58
27
|
path: string;
|
59
|
-
/** import
|
60
|
-
name:
|
61
|
-
|
62
|
-
|
28
|
+
/** import * as name from 'path'; */
|
29
|
+
name: string;
|
30
|
+
};
|
31
|
+
export type KsJsImport = {
|
32
|
+
type: 'pattern-template';
|
33
|
+
patternId: string;
|
34
|
+
templateId: string;
|
35
|
+
importInfo: KsJsImportInfo;
|
36
|
+
} | {
|
37
|
+
type: 'pattern-template-demo';
|
38
|
+
patternId: string;
|
39
|
+
templateId: string;
|
40
|
+
demoId: string;
|
41
|
+
importInfo: KsJsImportInfo;
|
42
|
+
} | {
|
43
|
+
type: 'extra';
|
44
|
+
importInfo: KsJsImportInfo;
|
63
45
|
};
|
64
46
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,aAAa,EAAE,UAAU,EAAE,CAAC;CAC7B,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GACtB;IACE,IAAI,EAAE,SAAS,CAAC;IAChB,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,GACD;IACE,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;CACd,GACD;IACE,IAAI,EAAE,KAAK,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEN,MAAM,MAAM,UAAU,GAClB;IACE,IAAI,EAAE,kBAAkB,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,cAAc,CAAC;CAC5B,GACD;IACE,IAAI,EAAE,uBAAuB,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,cAAc,CAAC;CAC5B,GACD;IACE,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,cAAc,CAAC;CAC5B,CAAC"}
|