@omnia/tooling-vue 8.0.62-vnext → 8.0.63-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 (32) hide show
  1. package/internal-do-not-import-from-here/config/omnia.vendor.manifest.json +1 -1
  2. package/internal-do-not-import-from-here/config/tooling.output.json +1 -0
  3. package/internal-do-not-import-from-here/config/wctypings.d.ts +2549 -0
  4. package/internal-do-not-import-from-here/index.d.ts +3 -1
  5. package/internal-do-not-import-from-here/index.js +6 -2
  6. package/internal-do-not-import-from-here/shared.d.ts +31 -118
  7. package/internal-do-not-import-from-here/shared.js +95 -153
  8. package/internal-do-not-import-from-here/tasks/ComponentDocRegistrations.js +1 -1
  9. package/internal-do-not-import-from-here/tasks/bundle.d.ts +1 -2
  10. package/internal-do-not-import-from-here/tasks/bundle.js +144 -359
  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 +282 -395
  13. package/internal-do-not-import-from-here/tasks/vendor.js +9 -7
  14. package/internal-do-not-import-from-here/variables.d.ts +1 -1
  15. package/internal-do-not-import-from-here/variables.js +2 -2
  16. package/internal-do-not-import-from-here/vite/hmr/graph.js +4 -0
  17. package/internal-do-not-import-from-here/vite/plugins/OmniaPlugin.js +1 -1
  18. package/internal-do-not-import-from-here/wctypings.ts +0 -0
  19. package/internal-do-not-import-from-here/webpack-loaders/doc-loader.js +11 -0
  20. package/internal-do-not-import-from-here/webpack-loaders/ts-loader.d.ts +3 -3
  21. package/internal-do-not-import-from-here/webpack-loaders/ts-loader.js +3 -3
  22. package/internal-do-not-import-from-here/webpack-loaders/tsx-loader.d.ts +3 -0
  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 -0
  25. package/internal-do-not-import-from-here/webpack-loaders/wc-loader.js +11 -0
  26. package/package.json +4 -3
  27. package/internal-do-not-import-from-here/bb000000-0000-bbbb-0000-0000000000bb.wctypings.d.ts +0 -493
  28. package/internal-do-not-import-from-here/webpack-loaders/esbuild-custom-loader.js +0 -13
  29. package/internal-do-not-import-from-here/webpack-loaders/wcmanifest-loader.d.ts +0 -1
  30. package/internal-do-not-import-from-here/webpack-loaders/wcmanifest-loader.js +0 -10
  31. /package/internal-do-not-import-from-here/{bb000000-0000-bbbb-0000-0000000000bb.wctypings.js → config/wctypings.js} +0 -0
  32. /package/internal-do-not-import-from-here/webpack-loaders/{esbuild-custom-loader.d.ts → doc-loader.d.ts} +0 -0
@@ -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([
@@ -186,15 +186,17 @@ $.webpack({
186
186
  'dayjs/plugin/duration',
187
187
  'dayjs/plugin/relativeTime',
188
188
  "dayjs/locale/da.js",
189
- "dayjs/locale/pl.js",
190
- "dayjs/locale/fr.js",
191
189
  "dayjs/locale/de.js",
192
190
  "dayjs/locale/et.js",
193
- "dayjs/locale/lv.js",
191
+ "dayjs/locale/fr.js",
194
192
  "dayjs/locale/lt.js",
193
+ "dayjs/locale/lv.js",
194
+ "dayjs/locale/pl.js",
195
195
  "dayjs/locale/sv.js",
196
196
  "dayjs/locale/nb.js",
197
197
  "dayjs/locale/fi.js",
198
+ "dayjs/locale/es.js",
199
+ "dayjs/locale/nl.js",
198
200
  "./wwwroot/scripts/zepto.extras.js",
199
201
  // "@material/material-color-utilities"
200
202
  ]
@@ -208,7 +210,7 @@ $.webpack({
208
210
  }
209
211
  },
210
212
  plugins: [
211
- new $.webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /ignore/),
213
+ new $.webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /ignore/), // we will load moment localize from cdn/localize
212
214
  extractCSS,
213
215
  new $.omniaWebpackPlugins.NamedModulesPlugin(),
214
216
  new $.omniaWebpackPlugins.ModifyContent([
@@ -358,7 +360,7 @@ $.webpack({
358
360
  }
359
361
  },
360
362
  plugins: [
361
- new $.webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /ignore/),
363
+ new $.webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /ignore/), // we will load moment localize from cdn/localize
362
364
  extractCSS,
363
365
  new $.omniaWebpackPlugins.NamedModulesPlugin(),
364
366
  new $.omniaWebpackPlugins.ModifyContent([
@@ -492,7 +494,7 @@ $.webpack({
492
494
  }
493
495
  },
494
496
  plugins: [
495
- new $.webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /ignore/),
497
+ new $.webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /ignore/), // we will load moment localize from cdn/localize
496
498
  extractCSS,
497
499
  new $.omniaWebpackPlugins.NamedModulesPlugin(),
498
500
  new $.omniaWebpackPlugins.ModifyContent([
@@ -5,6 +5,7 @@ import * as composers from "@omnia/tooling-composers";
5
5
  import * as enums from "../composers/models/Enums";
6
6
  import * as composer from '../composers/task';
7
7
  import { core, utils } from '@omnia/tooling';
8
+ import { isExtensionEnv } from "./shared";
8
9
  import merge from 'webpack-merge';
9
10
  import webpack from 'webpack';
10
11
  declare var tooling: {
@@ -16,5 +17,4 @@ declare var tooling: {
16
17
  LogTypes: typeof utils.LogTypes;
17
18
  };
18
19
  declare var basePathProcess: string;
19
- declare var isExtensionEnv: boolean;
20
20
  export { omniaWebpackPlugins, basePathProcess, isExtensionEnv, tooling, webpack, chalk, timestamp, path, fs, extend, merge, del, md5File, composers, enums };
@@ -28,6 +28,8 @@ const enums = tslib_1.__importStar(require("@omnia/tooling-composers/internal-do
28
28
  exports.enums = enums;
29
29
  const composer = tslib_1.__importStar(require("@omnia/tooling-composers/internal-do-not-import-from-here/task"));
30
30
  const tooling_1 = require("@omnia/tooling");
31
+ const shared_1 = require("./shared");
32
+ Object.defineProperty(exports, "isExtensionEnv", { enumerable: true, get: function () { return shared_1.isExtensionEnv; } });
31
33
  const webpack_merge_1 = tslib_1.__importDefault(require("webpack-merge"));
32
34
  exports.merge = webpack_merge_1.default;
33
35
  const webpack_1 = tslib_1.__importDefault(require("webpack"));
@@ -36,5 +38,3 @@ var tooling = { composer, core: tooling_1.core, utils: tooling_1.utils, log: too
36
38
  exports.tooling = tooling;
37
39
  var basePathProcess = process.cwd();
38
40
  exports.basePathProcess = basePathProcess;
39
- var isExtensionEnv = fs.existsSync(basePathProcess + "/node_modules/@omnia/tooling-vue/package.json");
40
- exports.isExtensionEnv = isExtensionEnv;
@@ -10,6 +10,8 @@ const utils_1 = require("./utils");
10
10
  const manifest_1 = require("./manifest");
11
11
  const vueJsx_1 = require("./vueJsx");
12
12
  const $ = tslib_1.__importStar(require("../../variables"));
13
+ const shared_1 = require("../../shared");
14
+ const doc_1 = require("../../tasks/doc");
13
15
  let fileGraphs = {};
14
16
  let manifests = {};
15
17
  const initialManifests = [
@@ -151,6 +153,7 @@ async function buildFileGraph(unknownId, code) {
151
153
  return { fileGraph, code };
152
154
  }
153
155
  fileGraph.js.scanned = true;
156
+ code = (0, shared_1.modifyComponent)(code, fileGraph.id);
154
157
  const esbuildTransformResult = await (0, vite_1.transformWithEsbuild)(code, id, esbuildTransformOptions);
155
158
  code = esbuildTransformResult.code;
156
159
  // d.ts or interface only
@@ -163,6 +166,7 @@ async function buildFileGraph(unknownId, code) {
163
166
  }
164
167
  fileGraph.js.metadata = utils_1.moduleAnalysis.analyze(code, id);
165
168
  ensureDependencies(id, fileGraph.js.metadata);
169
+ code = (0, doc_1.importSnippetCode)(code, fileGraph.id);
166
170
  return { fileGraph, code, esbuildTransformResult };
167
171
  }
168
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',
File without changes
@@ -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;
@@ -1,9 +1,6 @@
1
1
  export default function (): {
2
2
  test: RegExp;
3
3
  use: ({
4
- loader: any;
5
- options?: undefined;
6
- } | {
7
4
  loader: string;
8
5
  options: {
9
6
  loader: string;
@@ -16,5 +13,8 @@ export default function (): {
16
13
  };
17
14
  };
18
15
  };
16
+ } | {
17
+ loader: any;
18
+ options?: undefined;
19
19
  })[];
20
20
  }[];
@@ -7,9 +7,6 @@ function default_1() {
7
7
  return [{
8
8
  test: /\.ts$/,
9
9
  use: [
10
- {
11
- loader: path.resolve(__dirname, $.isExtensionEnv ? './esbuild-custom-loader.js' : './esbuild-custom-loader.ts'),
12
- },
13
10
  {
14
11
  loader: 'esbuild-loader',
15
12
  options: {
@@ -23,6 +20,9 @@ function default_1() {
23
20
  }
24
21
  }
25
22
  },
23
+ },
24
+ {
25
+ loader: path.resolve(__dirname, $.isExtensionEnv ? './doc-loader.js' : './doc-loader.ts'),
26
26
  }
27
27
  ]
28
28
  }];
@@ -22,5 +22,8 @@ export default function (): {
22
22
  };
23
23
  };
24
24
  };
25
+ } | {
26
+ loader: any;
27
+ options?: undefined;
25
28
  })[];
26
29
  }[];
@@ -61,6 +61,9 @@ function default_1() {
61
61
  }
62
62
  }
63
63
  },
64
+ },
65
+ {
66
+ loader: path.resolve(__dirname, $.isExtensionEnv ? './wc-loader.js' : './wc-loader.ts'),
64
67
  }
65
68
  ];
66
69
  return [
@@ -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 shared_1 = require("../shared");
6
+ function default_1(content, context) {
7
+ const filePath = "./" + path_1.default.relative(process.cwd(), this.resourcePath).replace(/\\/g, "/");
8
+ content = (0, shared_1.modifyComponent)(content, filePath);
9
+ return content;
10
+ }
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.62-vnext",
4
+ "version": "8.0.63-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.62-vnext",
23
- "@omnia/tooling-composers": "8.0.62-vnext",
22
+ "@omnia/fx-models": "8.0.63-dev",
23
+ "@omnia/tooling-composers": "8.0.63-dev",
24
24
  "@types/mousetrap": "1.5.34",
25
25
  "@types/quill": "1.3.6",
26
26
  "@types/zepto": "1.0.29",
@@ -32,6 +32,7 @@
32
32
  "console-timestamp": "0.3.0",
33
33
  "css-loader": "5.0.1",
34
34
  "file-loader": "6.2.0",
35
+ "json-parse-better-errors": "1.0.2",
35
36
  "null-loader": "4.0.1",
36
37
  "terser": "5.17.1",
37
38
  "less-loader": "10.2.0",