@omnia/tooling-vue 8.0.91-vnext → 8.0.92-dev

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.
Files changed (26) hide show
  1. package/internal-do-not-import-from-here/config/omnia.fx.core_a2892051-fd9f-4056-ae8d-30d16d48417d.manifest.json +1 -0
  2. package/internal-do-not-import-from-here/config/omnia.fx.ux_dee030cc-4ab3-4158-bb06-8049f5c67542.manifest.json +1 -0
  3. package/internal-do-not-import-from-here/config/omnia.fx_a5a89056-b5f5-475d-8518-a1f55090379d.manifest.json +1 -0
  4. package/internal-do-not-import-from-here/config/omnia.vendor.manifest.json +1 -1
  5. package/internal-do-not-import-from-here/config/tooling.output.json +1 -1
  6. package/internal-do-not-import-from-here/config/wctypings.d.ts +4435 -1498
  7. package/internal-do-not-import-from-here/shared.d.ts +11 -6
  8. package/internal-do-not-import-from-here/shared.js +32 -12
  9. package/internal-do-not-import-from-here/tasks/ComponentDocRegistrations.js +1 -1
  10. package/internal-do-not-import-from-here/tasks/bundle.js +65 -380
  11. package/internal-do-not-import-from-here/tasks/doc.d.ts +3 -1
  12. package/internal-do-not-import-from-here/tasks/doc.js +393 -392
  13. package/internal-do-not-import-from-here/tasks/vendor.js +16 -12
  14. package/internal-do-not-import-from-here/vite/hmr/graph.js +3 -1
  15. package/internal-do-not-import-from-here/vite/plugins/OmniaPlugin.js +1 -1
  16. package/internal-do-not-import-from-here/webpack-loaders/doc-loader.d.ts +1 -0
  17. package/internal-do-not-import-from-here/webpack-loaders/doc-loader.js +11 -0
  18. package/internal-do-not-import-from-here/webpack-loaders/esbuild-custom-loader.d.ts +1 -0
  19. package/internal-do-not-import-from-here/webpack-loaders/esbuild-custom-loader.js +10 -0
  20. package/internal-do-not-import-from-here/webpack-loaders/ts-loader.d.ts +5 -2
  21. package/internal-do-not-import-from-here/webpack-loaders/ts-loader.js +8 -0
  22. package/internal-do-not-import-from-here/webpack-loaders/tsx-loader.d.ts +3 -3
  23. package/internal-do-not-import-from-here/webpack-loaders/tsx-loader.js +3 -0
  24. package/internal-do-not-import-from-here/webpack-loaders/wc-loader.d.ts +1 -1
  25. package/internal-do-not-import-from-here/webpack-loaders/wc-loader.js +5 -1
  26. package/package.json +7 -8
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const $ = tslib_1.__importStar(require("../variables"));
5
5
  const ts_loader_1 = tslib_1.__importDefault(require("../webpack-loaders/ts-loader"));
6
+ const fsExtra = tslib_1.__importStar(require("fs-extra"));
6
7
  const ExtractTextPlugin = require('mini-css-extract-plugin');
7
- const fsExtra = require('fs-extra');
8
8
  const extractCSS = new ExtractTextPlugin({
9
9
  filename: "omnia.vendor.css",
10
10
  });
@@ -70,7 +70,7 @@ $.webpack({
70
70
  }
71
71
  },
72
72
  plugins: [
73
- new $.webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /ignore/),
73
+ new $.webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /ignore/), // we will load moment localize from cdn/localize
74
74
  extractCSS,
75
75
  new $.omniaWebpackPlugins.NamedModulesPlugin(),
76
76
  new $.omniaWebpackPlugins.ModifyContent([
@@ -118,7 +118,7 @@ $.webpack({
118
118
  var manifestPath = $.path.resolve(__dirname, "../config/omnia.shared.vendor.manifest.json");
119
119
  var manifestJson = require(manifestPath);
120
120
  manifestJson.content["./node_modules/webpack/buildin/module.js"] = undefined;
121
- $.fs.writeFileSync(manifestPath, JSON.stringify(manifestJson));
121
+ fsExtra.writeFileSync(manifestPath, JSON.stringify(manifestJson));
122
122
  $.tooling.log('omnia shared vendor generated');
123
123
  }
124
124
  });
@@ -175,6 +175,7 @@ $.webpack({
175
175
  vendor: [
176
176
  "tslib",
177
177
  "./client/fx/vue/VueBundler",
178
+ "lodash.isequal",
178
179
  "typestyle",
179
180
  "csx",
180
181
  "zepto-webpack",
@@ -186,15 +187,17 @@ $.webpack({
186
187
  'dayjs/plugin/duration',
187
188
  'dayjs/plugin/relativeTime',
188
189
  "dayjs/locale/da.js",
189
- "dayjs/locale/pl.js",
190
- "dayjs/locale/fr.js",
191
190
  "dayjs/locale/de.js",
192
191
  "dayjs/locale/et.js",
193
- "dayjs/locale/lv.js",
192
+ "dayjs/locale/fr.js",
194
193
  "dayjs/locale/lt.js",
194
+ "dayjs/locale/lv.js",
195
+ "dayjs/locale/pl.js",
195
196
  "dayjs/locale/sv.js",
196
197
  "dayjs/locale/nb.js",
197
198
  "dayjs/locale/fi.js",
199
+ "dayjs/locale/es.js",
200
+ "dayjs/locale/nl.js",
198
201
  "./wwwroot/scripts/zepto.extras.js",
199
202
  // "@material/material-color-utilities"
200
203
  ]
@@ -208,7 +211,7 @@ $.webpack({
208
211
  }
209
212
  },
210
213
  plugins: [
211
- new $.webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /ignore/),
214
+ new $.webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /ignore/), // we will load moment localize from cdn/localize
212
215
  extractCSS,
213
216
  new $.omniaWebpackPlugins.NamedModulesPlugin(),
214
217
  new $.omniaWebpackPlugins.ModifyContent([
@@ -270,7 +273,7 @@ return key;
270
273
  var manifestPath = $.path.resolve(__dirname, "../config/omnia.vendor.manifest.json");
271
274
  var manifestJson = require(manifestPath);
272
275
  manifestJson.content["./node_modules/webpack/buildin/module.js"] = undefined;
273
- $.fs.writeFileSync(manifestPath, JSON.stringify(manifestJson));
276
+ fsExtra.writeFileSync(manifestPath, JSON.stringify(manifestJson));
274
277
  $.tooling.log('omnia vendor devlopment generated');
275
278
  }
276
279
  });
@@ -327,6 +330,7 @@ $.webpack({
327
330
  vendor: [
328
331
  "tslib",
329
332
  "./client/fx/vue/VueBundler",
333
+ "lodash.isequal",
330
334
  "typestyle",
331
335
  "csx",
332
336
  "zepto-webpack",
@@ -358,7 +362,7 @@ $.webpack({
358
362
  }
359
363
  },
360
364
  plugins: [
361
- new $.webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /ignore/),
365
+ new $.webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /ignore/), // we will load moment localize from cdn/localize
362
366
  extractCSS,
363
367
  new $.omniaWebpackPlugins.NamedModulesPlugin(),
364
368
  new $.omniaWebpackPlugins.ModifyContent([
@@ -420,7 +424,7 @@ return key;
420
424
  var manifestPath = $.path.resolve(__dirname, "../config/omnia.vendor.manifest.json");
421
425
  var manifestJson = require(manifestPath);
422
426
  manifestJson.content["./node_modules/webpack/buildin/module.js"] = undefined;
423
- $.fs.writeFileSync(manifestPath, JSON.stringify(manifestJson));
427
+ fsExtra.writeFileSync(manifestPath, JSON.stringify(manifestJson));
424
428
  $.tooling.log('omnia vendor prod generated');
425
429
  }
426
430
  });
@@ -492,7 +496,7 @@ $.webpack({
492
496
  }
493
497
  },
494
498
  plugins: [
495
- new $.webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /ignore/),
499
+ new $.webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /ignore/), // we will load moment localize from cdn/localize
496
500
  extractCSS,
497
501
  new $.omniaWebpackPlugins.NamedModulesPlugin(),
498
502
  new $.omniaWebpackPlugins.ModifyContent([
@@ -540,7 +544,7 @@ $.webpack({
540
544
  var manifestPath = $.path.resolve(__dirname, "../config/omnia.worker.vendor.manifest.json");
541
545
  var manifestJson = require(manifestPath);
542
546
  manifestJson.content["./node_modules/webpack/buildin/module.js"] = undefined;
543
- $.fs.writeFileSync(manifestPath, JSON.stringify(manifestJson));
547
+ fsExtra.writeFileSync(manifestPath, JSON.stringify(manifestJson));
544
548
  $.tooling.log('omnia worker vendor generated');
545
549
  }
546
550
  });
@@ -11,6 +11,7 @@ const manifest_1 = require("./manifest");
11
11
  const vueJsx_1 = require("./vueJsx");
12
12
  const $ = tslib_1.__importStar(require("../../variables"));
13
13
  const shared_1 = require("../../shared");
14
+ const doc_1 = require("../../tasks/doc");
14
15
  let fileGraphs = {};
15
16
  let manifests = {};
16
17
  const initialManifests = [
@@ -152,7 +153,7 @@ async function buildFileGraph(unknownId, code) {
152
153
  return { fileGraph, code };
153
154
  }
154
155
  fileGraph.js.scanned = true;
155
- code = (0, shared_1.replaceWebComponentNamespaceMapping)(code);
156
+ code = (0, shared_1.modifyComponent)(code, fileGraph.id);
156
157
  const esbuildTransformResult = await (0, vite_1.transformWithEsbuild)(code, id, esbuildTransformOptions);
157
158
  code = esbuildTransformResult.code;
158
159
  // d.ts or interface only
@@ -165,6 +166,7 @@ async function buildFileGraph(unknownId, code) {
165
166
  }
166
167
  fileGraph.js.metadata = utils_1.moduleAnalysis.analyze(code, id);
167
168
  ensureDependencies(id, fileGraph.js.metadata);
169
+ code = (0, doc_1.importSnippetCode)(code, fileGraph.id);
168
170
  return { fileGraph, code, esbuildTransformResult };
169
171
  }
170
172
  exports.buildFileGraph = buildFileGraph;
@@ -20,7 +20,7 @@ function omniaPlugin(options) {
20
20
  'vue': 'vue/dist/vue.runtime.esm-bundler.js',
21
21
  // 'vue-class-component': 'vue-class-component/dist/vue-class-component.esm.js',
22
22
  // 'vue-property-decorator': 'vue-property-decorator/lib/vue-property-decorator.js',
23
- 'vue-virtual-scroller': 'vue-virtual-scroller/dist/vue-virtual-scroller.esm.js',
23
+ // 'vue-virtual-scroller': 'vue-virtual-scroller/dist/vue-virtual-scroller.esm.js',
24
24
  'typestyle': 'typestyle/lib.es2015/index.js',
25
25
  'dayjs': 'dayjs/dayjs.min.js',
26
26
  // '@tiptap/core': '@tiptap/core/dist/index.js',
@@ -0,0 +1 @@
1
+ export default function (content: any, context: any): any;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const path_1 = tslib_1.__importDefault(require("path"));
5
+ const doc_1 = require("../tasks/doc");
6
+ function default_1(content, context) {
7
+ const filePath = "./" + path_1.default.relative(process.cwd(), this.resourcePath).replace(/\\/g, "/");
8
+ content = (0, doc_1.importSnippetCode)(content, filePath);
9
+ return content;
10
+ }
11
+ exports.default = default_1;
@@ -0,0 +1 @@
1
+ export default function (content: string, context: any): string;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ function default_1(content, context) {
4
+ if (!content) {
5
+ // console.log(this.resourcePath)
6
+ return "export {}";
7
+ }
8
+ return content;
9
+ }
10
+ exports.default = default_1;
@@ -1,6 +1,9 @@
1
1
  export default function (): {
2
2
  test: RegExp;
3
- use: {
3
+ use: ({
4
+ loader: any;
5
+ options?: undefined;
6
+ } | {
4
7
  loader: string;
5
8
  options: {
6
9
  loader: string;
@@ -13,5 +16,5 @@ export default function (): {
13
16
  };
14
17
  };
15
18
  };
16
- }[];
19
+ })[];
17
20
  }[];
@@ -1,10 +1,15 @@
1
1
  'use strict';
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const $ = tslib_1.__importStar(require("../variables"));
3
5
  var path = require('path');
4
6
  function default_1() {
5
7
  return [{
6
8
  test: /\.ts$/,
7
9
  use: [
10
+ {
11
+ loader: path.resolve(__dirname, $.isExtensionEnv ? './esbuild-custom-loader.js' : './esbuild-custom-loader.ts'),
12
+ },
8
13
  {
9
14
  loader: 'esbuild-loader',
10
15
  options: {
@@ -18,6 +23,9 @@ function default_1() {
18
23
  }
19
24
  }
20
25
  },
26
+ },
27
+ {
28
+ loader: path.resolve(__dirname, $.isExtensionEnv ? './doc-loader.js' : './doc-loader.ts'),
21
29
  }
22
30
  ]
23
31
  }];
@@ -8,6 +8,9 @@ export default function (): {
8
8
  plugins: any[];
9
9
  presets: string[][];
10
10
  };
11
+ } | {
12
+ loader: any;
13
+ options?: undefined;
11
14
  } | {
12
15
  loader: string;
13
16
  options: {
@@ -22,8 +25,5 @@ export default function (): {
22
25
  };
23
26
  };
24
27
  };
25
- } | {
26
- loader: any;
27
- options?: undefined;
28
28
  })[];
29
29
  }[];
@@ -47,6 +47,9 @@ function default_1() {
47
47
  // }
48
48
  // }
49
49
  // },
50
+ {
51
+ loader: path.resolve(__dirname, $.isExtensionEnv ? './esbuild-custom-loader.js' : './esbuild-custom-loader.ts'),
52
+ },
50
53
  {
51
54
  loader: 'esbuild-loader',
52
55
  options: {
@@ -1 +1 @@
1
- export default function (content: any, context: any): string;
1
+ export default function (content: any, context: any): any;
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const path_1 = tslib_1.__importDefault(require("path"));
3
5
  const shared_1 = require("../shared");
4
6
  function default_1(content, context) {
5
- return (0, shared_1.replaceWebComponentNamespaceMapping)(content);
7
+ const filePath = "./" + path_1.default.relative(process.cwd(), this.resourcePath).replace(/\\/g, "/");
8
+ content = (0, shared_1.modifyComponent)(content, filePath);
9
+ return content;
6
10
  }
7
11
  exports.default = default_1;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@omnia/tooling-vue",
3
3
  "license": "MIT",
4
- "version": "8.0.91-vnext",
4
+ "version": "8.0.92-dev",
5
5
  "description": "Used to bundle and serve manifests web component that build on Vue framework.",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -19,8 +19,8 @@
19
19
  ],
20
20
  "author": "Precio Fishbone",
21
21
  "dependencies": {
22
- "@omnia/fx-models": "8.0.91-vnext",
23
- "@omnia/tooling-composers": "8.0.91-vnext",
22
+ "@omnia/fx-models": "8.0.92-dev",
23
+ "@omnia/tooling-composers": "8.0.92-dev",
24
24
  "@types/mousetrap": "1.5.34",
25
25
  "@types/quill": "1.3.6",
26
26
  "@types/zepto": "1.0.29",
@@ -32,7 +32,7 @@
32
32
  "console-timestamp": "0.3.0",
33
33
  "css-loader": "5.0.1",
34
34
  "file-loader": "6.2.0",
35
- "null-loader": "4.0.1",
35
+ "json-parse-better-errors": "1.0.2",
36
36
  "terser": "5.17.1",
37
37
  "less-loader": "10.2.0",
38
38
  "mini-css-extract-plugin": "1.3.3",
@@ -45,7 +45,7 @@
45
45
  "prettier": "1.17.0",
46
46
  "typestyle": "2.4.0",
47
47
  "url-loader": "4.1.1",
48
- "webpack": "5.82.0",
48
+ "webpack": "5.89.0",
49
49
  "webpack-core": "0.6.9",
50
50
  "webpack-dev-middleware": "5.3.1",
51
51
  "webpack-merge": "5.8.0",
@@ -56,10 +56,9 @@
56
56
  "es6-promise": "4.2.4",
57
57
  "hash-sum": "1.0.2",
58
58
  "lodash": "4.17.21",
59
- "vite": "4.4.1",
60
- "vite-plugin-inspect": "0.7.32",
59
+ "vite": "5.0.10",
60
+ "vite-plugin-inspect": "0.8.1",
61
61
  "appdata-path": "1.0.0",
62
- "json-parse-better-errors": "1.0.2",
63
62
  "url": "0.11.0"
64
63
  },
65
64
  "bugs": {