@knapsack/renderer-webpack-base 4.70.0--canary.4821.e250df4.0 → 4.70.0--canary.4821.ef34743.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +1,5 @@
1
- import type { KsJsImportInfo, RendererMetaBase, KsRendererClientUtils } from '../types.js';
2
- export declare function getKsRendererClientUtils<ExportedComponentType, RendererMetaType extends RendererMetaBase,
3
- /**
4
- * Any extra properties or methods placed on the window.knapsack object by the renderer in a `<script>` tag
5
- */
6
- RendererMethods extends Record<string, unknown>>({ rendererMetaScriptTagId, assertImport, assertExtraImport, }: {
1
+ import type { KsJsImportInfo, KsRendererClientUtils, RendererMetaBase } from '../types.js';
2
+ export declare function getKsRendererClientUtils<ExportedComponentType = unknown, RendererMetaType extends RendererMetaBase = RendererMetaBase, RendererMethods extends Record<string, unknown> = Record<string, unknown>, ExtraImportNames extends string = string>({ rendererMetaScriptTagId, assertImport, assertExtraImport, }: {
7
3
  rendererMetaScriptTagId: string;
8
4
  assertImport?: (opt: {
9
5
  imp: unknown;
@@ -11,9 +7,8 @@ RendererMethods extends Record<string, unknown>>({ rendererMetaScriptTagId, asse
11
7
  }) => void;
12
8
  assertExtraImport?: (opt: {
13
9
  imp: unknown;
14
- importInfo: KsJsImportInfo;
15
10
  }) => void;
16
- }): KsRendererClientUtils<ExportedComponentType, RendererMetaType, RendererMethods>;
11
+ }): KsRendererClientUtils<ExportedComponentType, RendererMetaType, RendererMethods, ExtraImportNames>;
17
12
  export declare function showUiToastMsg({ msg }: {
18
13
  msg: string;
19
14
  }): void;
@@ -1 +1 @@
1
- {"version":3,"file":"renderer-webpack-client.d.mts","sourceRoot":"","sources":["../../src/client/renderer-webpack-client.mts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EAGtB,MAAM,aAAa,CAAC;AAmFrB,wBAAgB,wBAAwB,CACtC,qBAAqB,EACrB,gBAAgB,SAAS,gBAAgB;AACzC;;GAEG;AACH,eAAe,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/C,EACA,uBAAuB,EACvB,YAAY,EACZ,iBAAiB,GAClB,EAAE;IACD,uBAAuB,EAAE,MAAM,CAAC;IAChC,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE;QAAE,GAAG,EAAE,OAAO,CAAC;QAAC,UAAU,EAAE,cAAc,CAAA;KAAE,KAAK,IAAI,CAAC;IAC3E,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE;QACxB,GAAG,EAAE,OAAO,CAAC;QACb,UAAU,EAAE,cAAc,CAAC;KAC5B,KAAK,IAAI,CAAC;CACZ,GAsFoB,qBAAqB,CACtC,qBAAqB,EACrB,gBAAgB,EAChB,eAAe,CAChB,CACF;AAED,wBAAgB,cAAc,CAAC,EAAE,GAAG,EAAE,EAAE;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,QAYtD"}
1
+ {"version":3,"file":"renderer-webpack-client.d.mts","sourceRoot":"","sources":["../../src/client/renderer-webpack-client.mts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EAGrB,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAmFrB,wBAAgB,wBAAwB,CACtC,qBAAqB,GAAG,OAAO,EAC/B,gBAAgB,SAAS,gBAAgB,GAAG,gBAAgB,EAC5D,eAAe,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACzE,gBAAgB,SAAS,MAAM,GAAG,MAAM,EACxC,EACA,uBAAuB,EACvB,YAAY,EACZ,iBAAiB,GAClB,EAAE;IACD,uBAAuB,EAAE,MAAM,CAAC;IAChC,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE;QAAE,GAAG,EAAE,OAAO,CAAC;QAAC,UAAU,EAAE,cAAc,CAAA;KAAE,KAAK,IAAI,CAAC;IAC3E,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE;QAAE,GAAG,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;CACrD,GA6FoB,qBAAqB,CACtC,qBAAqB,EACrB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,CACjB,CACF;AAED,wBAAgB,cAAc,CAAC,EAAE,GAAG,EAAE,EAAE;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,QAYtD"}
@@ -58,23 +58,24 @@ export function getKsRendererClientUtils({ rendererMetaScriptTagId, assertImport
58
58
  if (!isObject(window?.knapsack)) {
59
59
  throw new Error(`Could not find "window.knapsack"`);
60
60
  }
61
- const { importedModules, ...rendererMethods } = window.knapsack;
62
- if (!isObject(importedModules)) {
63
- throw new Error(`The object "window.knapsack.importedModules" is not a valid "KsRendererClientGlobalImportedModules"`);
61
+ const { codeSrcModules, extraImports, ...rendererMethods } = window
62
+ .knapsack;
63
+ if (!isObject(codeSrcModules)) {
64
+ throw new Error(`The object "window.knapsack.codeSrcModules" is not a valid "CodeSrcModules"`);
64
65
  }
65
66
  const meta = getJsonFromScriptTag(ksRendererClientMetaId);
66
67
  const rendererMeta = getJsonFromScriptTag(rendererMetaScriptTagId);
67
- const { neededImportsByPath, extraImports } = rendererMeta;
68
+ const { neededImportsByCodeSrcId } = rendererMeta;
68
69
  const getNeededImports = async () => {
69
70
  const neededImports = {};
70
- await Promise.all(Object.entries(neededImportsByPath).map(async ([path, importInfos]) => {
71
- const getModule = importedModules[path];
72
- if (!getModule) {
73
- throw new Error(`No "${path}" module found for "${path}"`);
71
+ await Promise.all(Object.entries(neededImportsByCodeSrcId).map(async ([codeSrcId, importInfos]) => {
72
+ const moduleInfo = codeSrcModules[codeSrcId];
73
+ if (!moduleInfo) {
74
+ throw new Error(`No "${codeSrcId}" module found`);
74
75
  }
75
- const mod = await getModule();
76
+ const mod = await moduleInfo.getModule();
76
77
  if (!mod) {
77
- throw new Error(`No module contents found for "${path}"`);
78
+ throw new Error(`No module contents found for "${moduleInfo.path}"`);
78
79
  }
79
80
  importInfos.forEach((importInfo) => {
80
81
  addImportToAllImports({
@@ -88,27 +89,26 @@ export function getKsRendererClientUtils({ rendererMetaScriptTagId, assertImport
88
89
  return neededImports;
89
90
  };
90
91
  const getExtraImports = async () => {
91
- const theExtraImports = {};
92
- await Promise.all(Object.entries(extraImports).map(async ([name, importInfo]) => {
93
- const getModule = importedModules[importInfo.path];
94
- if (!getModule) {
95
- throw new Error(`No "${importInfo.path}" module found for "${name}"`);
96
- }
92
+ return Promise.all(extraImports.map(async ({ exportName, getModule, isDefaultExport, }) => {
97
93
  const mod = await getModule();
98
94
  if (!mod) {
99
- throw new Error(`No module found for "${importInfo.path}"`);
95
+ throw new Error(`No module found for "${exportName}"`);
100
96
  }
101
- addImportToAllImports({
102
- importInfo,
103
- mod,
104
- allImports: theExtraImports,
105
- assertImport: assertExtraImport,
106
- });
107
- }));
108
- return theExtraImports;
97
+ const extraImport = isDefaultExport
98
+ ? mod.default || mod
99
+ : mod[exportName];
100
+ if (!extraImport) {
101
+ throw new Error(`No extra import found for "${exportName}" in `);
102
+ }
103
+ assertExtraImport?.({ imp: extraImport });
104
+ return [exportName, extraImport];
105
+ })).then((entries) => {
106
+ const it = Object.fromEntries(entries);
107
+ return it;
108
+ });
109
109
  };
110
110
  const knapsack = {
111
- importedModules,
111
+ codeSrcModules,
112
112
  meta,
113
113
  rendererMeta,
114
114
  rendererMethods,
@@ -1 +1 @@
1
- {"version":3,"file":"renderer-webpack-client.mjs","sourceRoot":"","sources":["../../src/client/renderer-webpack-client.mts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,sBAAsB,GAEvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AASnD,MAAM,SAAS,GACb,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,MAAM,CAAC,QAAQ,KAAK,WAAW,CAAC;AAE1E,IAAI,CAAC,SAAS,EAAE,CAAC;IACf,MAAM,IAAI,KAAK,CACb,gEAAgE,CACjE,CAAC;AACJ,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CAAC,IAAI,CAAC,CAAC;YACnD,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,OAAO,UAAU,CAAC,IAAI,uBAAuB,IAAI,GAAG,CAAC,CAAC;YACxE,CAAC;YACD,MAAM,GAAG,GAAG,MAAM,SAAS,EAAE,CAAC;YAC9B,IAAI,CAAC,GAAG,EAAE,CAAC;gBACT,MAAM,IAAI,KAAK,CAAC,wBAAwB,UAAU,CAAC,IAAI,GAAG,CAAC,CAAC;YAC9D,CAAC;YACD,qBAAqB,CAAC;gBACpB,UAAU;gBACV,GAAG;gBACH,UAAU,EAAE,eAAe;gBAC3B,YAAY,EAAE,iBAAiB;aAChC,CAAC,CAAC;QACL,CAAC,CAAC,CACH,CAAC;QAEF,OAAO,eAGN,CAAC;IACJ,CAAC,CAAC;IAEF,MAAM,QAAQ,GAA0B;QACtC,eAAe;QACf,IAAI;QACJ,YAAY;QACZ,eAAe;QACf,gBAAgB;QAChB,eAAe;KAChB,CAAC;IAED,MAAc,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAEpC,OAAO,QAIN,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,EAAE,GAAG,EAAmB;IACrD,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,KAAK,MAAM,CAAC;IACjD,IAAI,CAAC,eAAe;QAAE,OAAO;IAC7B,MAAM,CAAC,MAAM,CAAC,WAAW,CACvB;QACE,gGAAgG;QAChG,IAAI,EAAE,4BAA4B;QAClC,GAAG;QACH,YAAY,EAAE,MAAM;KACS,EAC/B,GAAG,CACJ,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"renderer-webpack-client.mjs","sourceRoot":"","sources":["../../src/client/renderer-webpack-client.mts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,sBAAsB,GAEvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AASnD,MAAM,SAA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AAY,EAAE,MAAM;KACS,EAC/B,GAAG,CACJ,CAAC;AACJ,CAAC"}
@@ -1,2 +1,13 @@
1
- export declare function getEntryString(importPaths: Set<string>): string;
1
+ import { Except } from '@knapsack/utils';
2
+ import type { CodeSrcModules, ExtraImportInfo } from './types';
3
+ /**
4
+ * This creates the string of a file that will be the entry point for Webpack.
5
+ * Since it contains a bunch of dynamic imports, Webpack will be able to build them all.
6
+ * Great care should be taken to ensure that `const codeSrcModules` matches the type `CodeSrcModules`
7
+ * @see CodeSrcModules
8
+ */
9
+ export declare function getEntryString({ importPaths, extraImports, }: {
10
+ importPaths: Except<CodeSrcModules<unknown>[string], 'getModule'>[];
11
+ extraImports: ExtraImportInfo[];
12
+ }): string;
2
13
  //# sourceMappingURL=create-js-import-entry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-js-import-entry.d.ts","sourceRoot":"","sources":["../src/create-js-import-entry.ts"],"names":[],"mappings":"AAAA,wBAAgB,cAAc,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,CAW/D"}
1
+ {"version":3,"file":"create-js-import-entry.d.ts","sourceRoot":"","sources":["../src/create-js-import-entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/D;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAC7B,WAAW,EACX,YAAY,GACb,EAAE;IACD,WAAW,EAAE,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,EAAE,CAAC;IACpE,YAAY,EAAE,eAAe,EAAE,CAAC;CACjC,GAAG,MAAM,CA+BT"}
@@ -1,16 +1,38 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getEntryString = getEntryString;
4
- function getEntryString(importPaths) {
4
+ /**
5
+ * This creates the string of a file that will be the entry point for Webpack.
6
+ * Since it contains a bunch of dynamic imports, Webpack will be able to build them all.
7
+ * Great care should be taken to ensure that `const codeSrcModules` matches the type `CodeSrcModules`
8
+ * @see CodeSrcModules
9
+ */
10
+ function getEntryString({ importPaths, extraImports, }) {
5
11
  return `
6
- const importedModules = {
7
- ${[...importPaths]
8
- .map((path) => `'${path}': () => import('${path}'),`)
12
+ const codeSrcModules = {
13
+ ${importPaths
14
+ .map(({ path, codeSrcId }) => `'${codeSrcId}': {
15
+ path: '${path}',
16
+ codeSrcId: '${codeSrcId}',
17
+ getModule: () => import('${path}'),
18
+ },`)
9
19
  .join('\n')}
10
20
  };
11
21
 
22
+ const extraImports = [
23
+ ${extraImports
24
+ .map(({ path, exportName, isDefaultExport }) => `{
25
+ exportName: '${exportName}',
26
+ path: '${path}',
27
+ isDefaultExport: ${isDefaultExport},
28
+ getModule: () => import('${path}'),
29
+ },`)
30
+ .join('\n')}
31
+ ];
32
+
12
33
  window.knapsack = window.knapsack || {};
13
- window.knapsack.importedModules = importedModules;
34
+ window.knapsack.codeSrcModules = codeSrcModules;
35
+ window.knapsack.extraImports = extraImports;
14
36
  `;
15
37
  }
16
38
  //# sourceMappingURL=create-js-import-entry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-js-import-entry.js","sourceRoot":"","sources":["../src/create-js-import-entry.ts"],"names":[],"mappings":";;AAAA,wCAWC;AAXD,SAAgB,cAAc,CAAC,WAAwB;IACrD,OAAO;;IAEL,CAAC,GAAG,WAAW,CAAC;SACf,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,oBAAoB,IAAI,KAAK,CAAC;SACpD,IAAI,CAAC,IAAI,CAAC;;;;;CAKd,CAAC;AACF,CAAC"}
1
+ {"version":3,"file":"create-js-import-entry.js","sourceRoot":"","sources":["../src/create-js-import-entry.ts"],"names":[],"mappings":";;AASA,wCAqCC;AA3CD;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,EAC7B,WAAW,EACX,YAAY,GAIb;IACC,OAAO;;IAEL,WAAW;SACV,GAAG,CACF,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,IAAI,SAAS;eAC7B,IAAI;oBACC,SAAS;iCACI,IAAI;OAC9B,CACF;SACA,IAAI,CAAC,IAAI,CAAC;;;;IAIX,YAAY;SACX,GAAG,CACF,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC;qBAC5B,UAAU;eAChB,IAAI;yBACM,eAAe;iCACP,IAAI;OAC9B,CACF;SACA,IAAI,CAAC,IAAI,CAAC;;;;;;CAMd,CAAC;AACF,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { RendererId } from '@knapsack/types';
2
2
  import { CliLifecycle, RendererBase, type Renderable } from '@knapsack/app/renderers';
3
3
  import { Configuration as WebpackConfig } from 'webpack';
4
- import { KsJsImportInfo, KsJsImportMap } from './types';
4
+ import { ExtraImportInfo, KsJsImportInfo, KsJsImportMap } from './types';
5
5
  export declare abstract class RendererWebpackBase extends RendererBase implements CliLifecycle {
6
6
  #private;
7
7
  private webpack;
@@ -9,20 +9,20 @@ export declare abstract class RendererWebpackBase extends RendererBase implement
9
9
  private webpackCompiler;
10
10
  private extraScripts;
11
11
  private entryFilePath;
12
- constructor({ id, language, webpackConfig, extraScripts, codeSrcs, }: {
12
+ constructor({ id, language, webpackConfig, extraScripts, }: {
13
13
  id: RendererId;
14
14
  language: string;
15
15
  webpackConfig?: WebpackConfig;
16
16
  extraScripts?: string[];
17
- codeSrcs: string[];
18
17
  });
19
18
  setConfig(opt: Parameters<RendererBase['setConfig']>[0]): ReturnType<RendererBase['setConfig']>;
20
19
  hydrate(_opt: Parameters<CliLifecycle['hydrate']>[0]): ReturnType<CliLifecycle['hydrate']>;
21
- addUniqueValueToImportMap({ importMap, path: originalPath, alias, }: {
20
+ addUniqueValueToImportMap({ importMap, path, alias, }: {
22
21
  importMap: KsJsImportMap;
23
22
  path: string;
24
23
  alias: string;
25
24
  }): Promise<KsJsImportInfo>;
25
+ registerExtraJsImports<ExportNames extends string>(extraImports: Record<ExportNames, ExtraImportInfo>): void;
26
26
  get webpackVersion(): {
27
27
  majorVersion: number;
28
28
  isWebpack4: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"renderer-webpack-base.d.ts","sourceRoot":"","sources":["../src/renderer-webpack-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,KAAK,UAAU,EAChB,MAAM,yBAAyB,CAAC;AAUjC,OAAgB,EAEd,aAAa,IAAI,aAAa,EAG/B,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AA8BxD,8BAAsB,mBACpB,SAAQ,YACR,YAAW,YAAY;;IAEvB,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,eAAe,CAAkB;IAGzC,OAAO,CAAC,YAAY,CAAW;IAC/B,OAAO,CAAC,aAAa,CAAS;gBAIlB,EACV,EAAE,EACF,QAAQ,EACR,aAAkB,EAClB,YAAiB,EACjB,QAAQ,GACT,EAAE;QACD,EAAE,EAAE,UAAU,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,CAAC,EAAE,aAAa,CAAC;QAC9B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;QACxB,QAAQ,EAAE,MAAM,EAAE,CAAC;KACpB;IAoBQ,SAAS,CAChB,GAAG,EAAE,UAAU,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,GAC5C,UAAU,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;IAYlC,OAAO,CACX,IAAI,EAAE,UAAU,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,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AI,cAAc;;;;;MAQjB;IAED,mBAAmB,IAAI,aAAa;IA0GpC;;OAEG;IACH,oBAAoB,IAAI,MAAM,EAAE;IAIhC,MAAM,CAAC,2BAA2B,CAAC,EACjC,MAAM,EACN,kBAAkB,GACnB,EAAE;QACD,MAAM,EAAE,MAAM,EAAE,CAAC;QACjB,kBAAkB,EAAE,OAAO,CAAC;KAC7B,GAAG,MAAM;IAmBV,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,CAyC1B;IAEF,2FAA2F;IAC3F,OAAO,CAAC,iBAAiB;IA6CV,KAAK;IASX,QAAQ;IAIjB,QAAQ,CAAC,kBAAkB,CACzB,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAC1C,SAAS,EAAE,aAAa,CAAC;KAC1B,GACA,OAAO,CAAC;QACT,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,aAAa,CAAC;KAC1B,CAAC;IAEF,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC,CAM9B;IAEF,MAAM,CAAC,uBAAuB,CAAC,EAC7B,SAAS,GACV,EAAE;QACD,SAAS,EAAE,aAAa,CAAC;KAC1B,GAAG,MAAM;CA+DX;AAED,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,mBAAmB,GAAG,YAAY,CAAC"}
@@ -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 _RendererWebpackBase_instances, _RendererWebpackBase_webpackAssetsPaths, _RendererWebpackBase_webpackAssetsPathsFilePath, _RendererWebpackBase_entryString, _RendererWebpackBase_writeKsEntryFile, _RendererWebpackBase_prepWebpack;
16
+ var _RendererWebpackBase_instances, _RendererWebpackBase_webpackAssetsPaths, _RendererWebpackBase_webpackAssetsPathsFilePath, _RendererWebpackBase_entryString, _RendererWebpackBase_extraJsImports, _RendererWebpackBase_writeKsEntryFile, _RendererWebpackBase_prepWebpack;
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.RendererWebpackBase = void 0;
19
19
  const app_1 = require("@knapsack/app");
@@ -46,17 +46,17 @@ function normalizeAliases(aliases) {
46
46
  }));
47
47
  }
48
48
  class RendererWebpackBase extends renderers_1.RendererBase {
49
- constructor({ id, language, webpackConfig = {}, extraScripts = [], codeSrcs, }) {
49
+ constructor({ id, language, webpackConfig = {}, extraScripts = [], }) {
50
50
  super({
51
51
  id,
52
52
  language,
53
- codeSrcs,
54
53
  });
55
54
  _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);
59
+ _RendererWebpackBase_extraJsImports.set(this, {});
60
60
  this.build = async () => {
61
61
  app_1.log.info('Building with Webpack...', null, this.logPrefix);
62
62
  return new Promise((resolve, reject) => {
@@ -123,9 +123,11 @@ class RendererWebpackBase extends renderers_1.RendererBase {
123
123
  throw new Error(`It looks like 'knapsack build' was not ran before 'knapsack serve' - not able to find ${__classPrivateFieldGet(this, _RendererWebpackBase_webpackAssetsPathsFilePath, "f")}`);
124
124
  }
125
125
  }
126
- async addUniqueValueToImportMap({ importMap, path: originalPath, alias, }) {
127
- const { type, absolutePath } = await this.resolvePath(originalPath);
128
- const path = type === 'package' ? originalPath : absolutePath;
126
+ async addUniqueValueToImportMap({ importMap, path, alias, }) {
127
+ const codeSrc = this.codeSrcs.get(path);
128
+ if (!codeSrc) {
129
+ throw new Error(`Code Src not found: ${path}`);
130
+ }
129
131
  const isDefaultExport = !alias || alias === 'default';
130
132
  let preChangedName = alias;
131
133
  if (isDefaultExport) {
@@ -194,6 +196,28 @@ class RendererWebpackBase extends renderers_1.RendererBase {
194
196
  });
195
197
  return importMap.get(name);
196
198
  }
199
+ registerExtraJsImports(extraImports) {
200
+ const it = (0, utils_1.entries)(extraImports).map(([exportName, { path, isDefaultExport }]) => {
201
+ const { absolutePath, type, exists } = this.resolvePathSync(path);
202
+ if (!exists) {
203
+ throw new Error(`File not found: ${path}`);
204
+ }
205
+ if (type === 'relative') {
206
+ throw new Error(`Extra import "${exportName}" should not have a relative path: ${path}`);
207
+ }
208
+ return [
209
+ exportName,
210
+ {
211
+ path: type === 'package'
212
+ ? path
213
+ : (0, path_1.relative)(this.outputDir, absolutePath),
214
+ isDefaultExport,
215
+ exportName,
216
+ },
217
+ ];
218
+ });
219
+ __classPrivateFieldSet(this, _RendererWebpackBase_extraJsImports, Object.fromEntries(it), "f");
220
+ }
197
221
  get webpackVersion() {
198
222
  const majorVersion = parseInt(this.webpack.version.split('.')[0], 10);
199
223
  return {
@@ -405,11 +429,17 @@ class RendererWebpackBase extends renderers_1.RendererBase {
405
429
  }
406
430
  }
407
431
  exports.RendererWebpackBase = RendererWebpackBase;
408
- _RendererWebpackBase_webpackAssetsPaths = new WeakMap(), _RendererWebpackBase_webpackAssetsPathsFilePath = new WeakMap(), _RendererWebpackBase_entryString = new WeakMap(), _RendererWebpackBase_instances = new WeakSet(), _RendererWebpackBase_writeKsEntryFile = function _RendererWebpackBase_writeKsEntryFile() {
432
+ _RendererWebpackBase_webpackAssetsPaths = new WeakMap(), _RendererWebpackBase_webpackAssetsPathsFilePath = new WeakMap(), _RendererWebpackBase_entryString = new WeakMap(), _RendererWebpackBase_extraJsImports = new WeakMap(), _RendererWebpackBase_instances = new WeakSet(), _RendererWebpackBase_writeKsEntryFile = function _RendererWebpackBase_writeKsEntryFile() {
409
433
  if (!this.entryFilePath) {
410
434
  throw new Error('Cannot write entry file because entryFilePath is not set');
411
435
  }
412
- const contents = (0, create_js_import_entry_1.getEntryString)(this.getCodeSrcs());
436
+ const contents = (0, create_js_import_entry_1.getEntryString)({
437
+ importPaths: this.getCodeSrcs().map(({ path, pathFromOutputDir }) => ({
438
+ path: pathFromOutputDir,
439
+ codeSrcId: path,
440
+ })),
441
+ extraImports: Object.values(__classPrivateFieldGet(this, _RendererWebpackBase_extraJsImports, "f")),
442
+ });
413
443
  if (contents === __classPrivateFieldGet(this, _RendererWebpackBase_entryString, "f"))
414
444
  return;
415
445
  __classPrivateFieldSet(this, _RendererWebpackBase_entryString, contents, "f");
@@ -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,+BAAsE;AACtE,sDAKiB;AACjB,qEAAkF;AAClF,qEAA0D;AAG1D;;;GAGG;AACH,MAAM,aAAa,GAAG,MAAM,CAAC;AAI7B,SAAS,gBAAgB,CACvB,OAA0C;IAE1C,IAAI,CAAC,OAAO;QAAE,OAAO,EAAE,CAAC;IACxB,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;QACtC,CAAC,CAAC,OAAO;QACT,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IACtE,OAAO,MAAM,CAAC,WAAW,CACvB,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE;QACpC,IAAI,CAAC,KAAK;YAAE,OAAO,EAAE,CAAC;QACtB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CACb,aAAa,IAAI,sEAAsE,KAAK,EAAE,CAC/F,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,CAAC,IAAI,EA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,aAAa,GAAG,IAAI,CAAC,mBAAmB,EAAE,CAAC;IACjD,SAAG,CAAC,OAAO,CACT,6BAA6B,EAC7B,aAAa,CAAC,MAAM,CAAC,KAAK,EAC1B,IAAI,CAAC,SAAS,CACf,CAAC;IACF,oHAAoH;IACpH,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;AACrD,CAAC"}
package/dist/types.d.ts CHANGED
@@ -1,6 +1,21 @@
1
1
  import type { KsRendererClientMeta } from '@knapsack/types';
2
- export type ImportedModules<ExportedComponentType> = {
3
- [id: string]: () => Promise<EsModuleObject<ExportedComponentType>>;
2
+ export type ExtraImportInfo<ExportName extends string = string> = {
3
+ exportName: ExportName;
4
+ isDefaultExport: boolean;
5
+ path: string;
6
+ };
7
+ export type CodeSrcModules<ExportedComponentType> = {
8
+ [codeSrcId: string]: {
9
+ getModule: () => Promise<EsModuleObject<ExportedComponentType>>;
10
+ path: string;
11
+ codeSrcId: string;
12
+ };
13
+ };
14
+ export type KsGlobalForWebpackEntry<ExportedComponentType, ExtraImportNames extends string> = {
15
+ codeSrcModules: CodeSrcModules<ExportedComponentType>;
16
+ extraImports: Array<{
17
+ getModule: () => Promise<EsModuleObject<ExportedComponentType>>;
18
+ } & ExtraImportInfo<ExtraImportNames>>;
4
19
  };
5
20
  /** The result of `import`-ing a module */
6
21
  export type EsModuleObject<ExportedType = unknown> = {
@@ -10,12 +25,12 @@ export type EsModuleObject<ExportedType = unknown> = {
10
25
  /**
11
26
  * This is `window.knapsack` inside the renderer client: the iframe container for renderer components
12
27
  */
13
- export interface KsRendererClientUtils<ExportedComponentType = unknown, RendererMetaType extends RendererMetaBase = RendererMetaBase, RendererMethods extends Record<string, unknown> = Record<string, unknown>> {
14
- importedModules: ImportedModules<ExportedComponentType>;
28
+ export interface KsRendererClientUtils<ExportedComponentType = unknown, RendererMetaType extends RendererMetaBase = RendererMetaBase, RendererMethods extends Record<string, unknown> = Record<string, unknown>, ExtraImportNames extends string = string> {
29
+ codeSrcModules: CodeSrcModules<ExportedComponentType>;
15
30
  rendererMeta: RendererMetaType;
16
31
  rendererMethods: RendererMethods;
17
32
  getNeededImports: () => Promise<Record<string, ExportedComponentType>>;
18
- getExtraImports: () => Promise<Record<keyof RendererMetaType['extraImports'], ExportedComponentType>>;
33
+ getExtraImports: () => Promise<Record<ExtraImportNames, ExportedComponentType>>;
19
34
  meta: KsRendererClientMeta;
20
35
  }
21
36
  /**
@@ -26,14 +41,8 @@ export type KsJsImportMap = Map<string, KsJsImportInfo>;
26
41
  /**
27
42
  * The shared requirements for the `rendererMeta` object that gets put in `<script>` tags in the client.
28
43
  */
29
- export type RendererMetaBase<ExtraImportsNames extends string = string> = {
30
- neededImportsByPath: Record<string, KsJsImportInfo[]>;
31
- /**
32
- * Use `getExtraImports()` to get these extra imports
33
- */
34
- extraImports?: {
35
- [Name in ExtraImportsNames]: KsJsImportInfo<Name>;
36
- };
44
+ export type RendererMetaBase = {
45
+ neededImportsByCodeSrcId: Record<string, KsJsImportInfo[]>;
37
46
  };
38
47
  /**
39
48
  * Information about JS imports that can describe how to import a module in these ways:
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,MAAM,MAAM,eAAe,CAAC,qBAAqB,IAAI;IACnD,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,OAAO,CAAC,cAAc,CAAC,qBAAqB,CAAC,CAAC,CAAC;CACpE,CAAC;AAEF,0CAA0C;AAC1C,MAAM,MAAM,cAAc,CAAC,YAAY,GAAG,OAAO,IAAI;IACnD,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,qBAAqB,CACpC,qBAAqB,GAAG,OAAO,EAC/B,g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AG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACzE,gBAAgB,SAAS,MAAM,GAAG,MAAM;IAExC,cAAc,EAAE,cAAc,CAAC,qBAAqB,CAAC,CAAC;IACtD,YAAY,EAAE,gBAAgB,CAAC;IAC/B,eAAe,EAAE,eAAe,CAAC;IACjC,gBAAgB,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC,CAAC;IACvE,eAAe,EAAE,MAAM,OAAO,CAC5B,MAAM,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,CAChD,CAAC;IACF,IAAI,EAAE,oBAAoB,CAAC;CAC5B;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC;CAC5D,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,CAAC,IAAI,SAAS,MAAM,GAAG,MAAM,IACnD;IACE,IAAI,EAAE,SAAS,CAAC;IAChB,+BAA+B;IAC/B,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd,GACD;IACE,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,IAAI,EAAE,IAAI,CAAC;CACZ,GACD;IACE,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,IAAI,EAAE,IAAI,CAAC;IACX,mDAAmD;IACnD,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC"}
package/dist/utils.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import { KsJsImportMap, RendererMetaBase } from './types';
2
- export declare function convertImportMapToNeededImportsByPath(importMap: KsJsImportMap): RendererMetaBase['neededImportsByPath'];
2
+ export declare function convertImportMapToNeededImportsByCodeSrcId(importMap: KsJsImportMap): RendererMetaBase['neededImportsByCodeSrcId'];
3
3
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE1D,wBAAgB,qCAAqC,CACnD,SAAS,EAAE,aAAa,GACvB,gBAAgB,CAAC,qBAAqB,CAAC,CAEzC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE1D,wBAAgB,0CAA0C,CACxD,SAAS,EAAE,aAAa,GACvB,gBAAgB,CAAC,0BAA0B,CAAC,CAE9C"}
package/dist/utils.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.convertImportMapToNeededImportsByPath = convertImportMapToNeededImportsByPath;
3
+ exports.convertImportMapToNeededImportsByCodeSrcId = convertImportMapToNeededImportsByCodeSrcId;
4
4
  const utils_1 = require("@knapsack/utils");
5
- function convertImportMapToNeededImportsByPath(importMap) {
5
+ function convertImportMapToNeededImportsByCodeSrcId(importMap) {
6
6
  return (0, utils_1.groupBy)([...importMap.values()], (imp) => imp.path);
7
7
  }
8
8
  //# sourceMappingURL=utils.js.map
package/dist/utils.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;AAGA,sFAIC;AAPD,2CAA0C;AAG1C,SAAgB,qCAAqC,CACnD,SAAwB;IAExB,OAAO,IAAA,eAAO,EAAC,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC7D,CAAC"}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;AAGA,gGAIC;AAPD,2CAA0C;AAG1C,SAAgB,0CAA0C,CACxD,SAAwB;IAExB,OAAO,IAAA,eAAO,EAAC,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC7D,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@knapsack/renderer-webpack-base",
3
3
  "description": "",
4
- "version": "4.70.0--canary.4821.e250df4.0",
4
+ "version": "4.70.0--canary.4821.ef34743.0",
5
5
  "type": "commonjs",
6
6
  "exports": {
7
7
  ".": {
@@ -23,20 +23,20 @@
23
23
  "test": "time ava"
24
24
  },
25
25
  "dependencies": {
26
- "@knapsack/app": "4.70.0--canary.4821.e250df4.0",
27
- "@knapsack/babel-config-starter": "4.70.0--canary.4821.e250df4.0",
28
- "@knapsack/file-utils": "4.70.0--canary.4821.e250df4.0",
29
- "@knapsack/types": "4.70.0--canary.4821.e250df4.0",
30
- "@knapsack/utils": "4.70.0--canary.4821.e250df4.0",
26
+ "@knapsack/app": "4.70.0--canary.4821.ef34743.0",
27
+ "@knapsack/babel-config-starter": "4.70.0--canary.4821.ef34743.0",
28
+ "@knapsack/file-utils": "4.70.0--canary.4821.ef34743.0",
29
+ "@knapsack/types": "4.70.0--canary.4821.ef34743.0",
30
+ "@knapsack/utils": "4.70.0--canary.4821.ef34743.0",
31
31
  "babel-loader": "^9.2.1",
32
32
  "webpack": "^5.94.0",
33
33
  "webpack-manifest-plugin": "^4.1.1"
34
34
  },
35
35
  "devDependencies": {
36
- "@knapsack/eslint-config-starter": "4.70.0--canary.4821.e250df4.0",
37
- "@knapsack/prettier-config": "4.70.0--canary.4821.e250df4.0",
38
- "@knapsack/test-ava": "4.70.0--canary.4821.e250df4.0",
39
- "@knapsack/typescript-config-starter": "4.70.0--canary.4821.e250df4.0",
36
+ "@knapsack/eslint-config-starter": "4.70.0--canary.4821.ef34743.0",
37
+ "@knapsack/prettier-config": "4.70.0--canary.4821.ef34743.0",
38
+ "@knapsack/test-ava": "4.70.0--canary.4821.ef34743.0",
39
+ "@knapsack/typescript-config-starter": "4.70.0--canary.4821.ef34743.0",
40
40
  "@types/node": "^20.16.6",
41
41
  "@types/webpack": "^5.28.5",
42
42
  "@types/webpack-manifest-plugin": "^3.0.8",
@@ -53,5 +53,5 @@
53
53
  "directory": "apps/client/libs/renderer-webpack-base",
54
54
  "type": "git"
55
55
  },
56
- "gitHead": "e250df48da2f11087600f3902a9cd936d30f26c2"
56
+ "gitHead": "ef34743371e8e5d6c05f0f3dac6cd756c9ebb078"
57
57
  }