@omnia/tooling-vue 8.0.196-dev → 8.0.198-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.
- package/internal-do-not-import-from-here/config/omnia.vendor.manifest.json +1 -1
- package/internal-do-not-import-from-here/config/tooling.output.json +1 -1
- package/internal-do-not-import-from-here/shared.js +2 -1
- package/internal-do-not-import-from-here/tasks/ComponentDocRegistrations.js +1 -1
- package/internal-do-not-import-from-here/tasks/bundle.js +13 -13
- package/internal-do-not-import-from-here/vite/hmr/graph.js +5 -6
- package/internal-do-not-import-from-here/vite/hmr/manifest.js +1 -2
- package/internal-do-not-import-from-here/vite/hmr/runtime.js +8 -9
- package/internal-do-not-import-from-here/vite/hmr/transformers/internal/omniaCurrentManifestRuntime.js +2 -3
- package/internal-do-not-import-from-here/vite/hmr/vueJsx.js +1 -1
- package/internal-do-not-import-from-here/vite/middlewares/HmrMiddleware.js +2 -2
- package/internal-do-not-import-from-here/vite/middlewares/StaticFileMiddleware.js +6 -6
- package/internal-do-not-import-from-here/webpack-loaders/vue-localization-hot-loader.js +1 -2
- package/package.json +3 -3
|
@@ -559,11 +559,11 @@ function minifyBundles() {
|
|
|
559
559
|
try {
|
|
560
560
|
$.tooling.log(`Minify Js -> ${filePath}`);
|
|
561
561
|
// only minify for omnia.vendor.prod
|
|
562
|
-
if (filePath.indexOf(
|
|
562
|
+
if (filePath.indexOf(o$.enums.omniaResourceManifests.Vendor.toString()) === -1) {
|
|
563
563
|
let content = await fsExtra.readFile(filePath, 'utf8');
|
|
564
564
|
let outFileName = `${filePath.substring(0, filePath.length - 3)}.min.js`;
|
|
565
565
|
if (filePath.indexOf(vendorProdId) > -1) {
|
|
566
|
-
content = content.replace(new RegExp(vendorProdId, "g"),
|
|
566
|
+
content = content.replace(new RegExp(vendorProdId, "g"), o$.enums.omniaResourceManifests.Vendor.toString());
|
|
567
567
|
outFileName = `${$.tooling.utils.root($.tooling.composer.OmniaOutput.OutputBundlePath)}/omnia.vendor_6270b632-1f44-4146-bace-137131c0471b.min.js`;
|
|
568
568
|
}
|
|
569
569
|
let minified = await (0, terser_1.minify)(content, {
|
|
@@ -1169,7 +1169,7 @@ function createCombinedManfest(omniaServiceId, manifestIds, targetManifestId, ta
|
|
|
1169
1169
|
let content = fsExtra.readFileSync(filePath, 'utf8');
|
|
1170
1170
|
mergedJsContent = `
|
|
1171
1171
|
${mergedJsContent}
|
|
1172
|
-
/* Start of resource:${manifestId} */omniaWebpackJsonp["bb000000-0000-bbbb-0000-0000000000bb"]["${
|
|
1172
|
+
/* Start of resource:${manifestId} */omniaWebpackJsonp["bb000000-0000-bbbb-0000-0000000000bb"]["${o$.enums.omniaResourceManifests.FxCore.toString()}"]("06e712d2-9897-4891-9353-148547efe61c").ManifestResourceLoader.registerWebComponentFromGroupBundle("${omniaServiceId}", "${manifestId}", "${targetManifestId}", function(){
|
|
1173
1173
|
${content}
|
|
1174
1174
|
})//End of resource:${manifestId} `;
|
|
1175
1175
|
});
|
|
@@ -1271,11 +1271,11 @@ function buildReferenceManifest(currentEntry, entries) {
|
|
|
1271
1271
|
return dynamicReferenceManifests.concat(buildReferenceManifestFromConfig(currentEntryName));
|
|
1272
1272
|
// exclude pre-built webpack manifest
|
|
1273
1273
|
if ($.isExtensionEnv
|
|
1274
|
-
|| (currentEntryName.indexOf(
|
|
1274
|
+
|| (currentEntryName.indexOf(o$.enums.omniaResourceManifests.Vendor.toString()) === -1
|
|
1275
1275
|
&& currentEntryName.indexOf(vendorProdId) === -1
|
|
1276
|
-
// && currentEntryName.indexOf(
|
|
1277
|
-
// && currentEntryName.indexOf(
|
|
1278
|
-
// && currentEntryName.indexOf(
|
|
1276
|
+
// && currentEntryName.indexOf(o$.enums.omniaResourceManifests.FxCore.toString()) === -1
|
|
1277
|
+
// && currentEntryName.indexOf(o$.enums.omniaResourceManifests.Fx.toString()) === -1
|
|
1278
|
+
// && currentEntryName.indexOf(o$.enums.omniaResourceManifests.FxUx.toString()) === -1
|
|
1279
1279
|
)) {
|
|
1280
1280
|
Object.keys(entries).forEach((entryName) => {
|
|
1281
1281
|
if (entryName !== currentEntryName) {
|
|
@@ -1466,9 +1466,9 @@ function ensureManifestDependencyInRuntime(currentManifestId, manifestBundleFile
|
|
|
1466
1466
|
Object.keys(_manifestsEntry).forEach((entryName) => {
|
|
1467
1467
|
var hasDependency = false;
|
|
1468
1468
|
if (entryName.toLowerCase() !== currentManifestId.toString().toLowerCase()
|
|
1469
|
-
&& entryName.indexOf(
|
|
1470
|
-
&& entryName.indexOf(
|
|
1471
|
-
&& entryName.indexOf(
|
|
1469
|
+
&& entryName.indexOf(o$.enums.omniaResourceManifests.FxWorkers.toString()) === -1
|
|
1470
|
+
&& entryName.indexOf(o$.enums.omniaResourceManifests.FxCore.toString()) === -1 /* ignore omnia.fx.core, omnia.fx.workers and vendor manifest because ith not loaded by our resource loader */
|
|
1471
|
+
&& entryName.indexOf(o$.enums.omniaResourceManifests.Vendor.toString()) === -1
|
|
1472
1472
|
&& entryName.indexOf(vendorProdId) === -1) {
|
|
1473
1473
|
for (let entryPointPath of _manifestsEntry[entryName]) {
|
|
1474
1474
|
if (!hasDependency) {
|
|
@@ -1518,9 +1518,9 @@ function buildManifestsDependency(entries, manifestId, manifestBundleContent) {
|
|
|
1518
1518
|
const entryName = val;
|
|
1519
1519
|
var hasDependency = false;
|
|
1520
1520
|
if (entryName.toLowerCase() !== manifestId.toLowerCase()
|
|
1521
|
-
&& entryName.indexOf(
|
|
1522
|
-
&& entryName.indexOf(
|
|
1523
|
-
&& entryName.indexOf(
|
|
1521
|
+
&& entryName.indexOf(o$.enums.omniaResourceManifests.FxWorkers.toString()) === -1
|
|
1522
|
+
&& entryName.indexOf(o$.enums.omniaResourceManifests.FxCore.toString()) === -1 /* ignore omnia.fx.core, omnia.fx.workers and vendor manifest because ith not loaded by our resource loader */
|
|
1523
|
+
&& entryName.indexOf(o$.enums.omniaResourceManifests.Vendor.toString()) === -1
|
|
1524
1524
|
&& entryName.indexOf(vendorProdId) === -1) {
|
|
1525
1525
|
for (let entryPointPath of entries[entryName]) {
|
|
1526
1526
|
if (!hasDependency) {
|
|
@@ -5,7 +5,6 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
6
6
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
7
7
|
const vite_1 = require("vite");
|
|
8
|
-
const fx_models_1 = require("@omnia/fx-models");
|
|
9
8
|
const utils_1 = require("./utils");
|
|
10
9
|
const manifest_1 = require("./manifest");
|
|
11
10
|
const vueJsx_1 = require("./vueJsx");
|
|
@@ -14,11 +13,6 @@ const shared_1 = require("../../shared");
|
|
|
14
13
|
const doc_1 = require("../../tasks/doc");
|
|
15
14
|
let fileGraphs = {};
|
|
16
15
|
let manifests = {};
|
|
17
|
-
const initialManifests = [
|
|
18
|
-
fx_models_1.OmniaResourceManifests.Vendor.toString(),
|
|
19
|
-
fx_models_1.OmniaResourceManifests.FxCore.toString(),
|
|
20
|
-
fx_models_1.OmniaResourceManifests.FxWorkers.toString()
|
|
21
|
-
];
|
|
22
16
|
const esbuildTransformOptions = {
|
|
23
17
|
target: 'es2022',
|
|
24
18
|
jsx: 'preserve',
|
|
@@ -64,6 +58,11 @@ async function buildFileGraphs(entries) {
|
|
|
64
58
|
fileGraphs = {};
|
|
65
59
|
manifests = {};
|
|
66
60
|
const graph = {};
|
|
61
|
+
const initialManifests = [
|
|
62
|
+
o$.enums.omniaResourceManifests.Vendor,
|
|
63
|
+
o$.enums.omniaResourceManifests.FxCore,
|
|
64
|
+
o$.enums.omniaResourceManifests.FxWorkers
|
|
65
|
+
];
|
|
67
66
|
// external manifests
|
|
68
67
|
const omniaPackageDependencies = utils_1.manifestUtils.getExternalManifestReferences().slice()
|
|
69
68
|
.filter(packageManifest => packageManifest.isVendor == false)
|
|
@@ -5,7 +5,6 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
6
6
|
const globby_1 = require("globby");
|
|
7
7
|
const $ = tslib_1.__importStar(require("../../variables"));
|
|
8
|
-
const fx_models_1 = require("@omnia/fx-models");
|
|
9
8
|
const utils_1 = require("./utils");
|
|
10
9
|
class ManifestBuildEntriesResolver {
|
|
11
10
|
constructor() {
|
|
@@ -24,7 +23,7 @@ class ManifestBuildEntriesResolver {
|
|
|
24
23
|
this.preBundle = Object.keys(entries).reduce((preBundleEntries, resourceIdentifier) => {
|
|
25
24
|
const filePaths = entries[resourceIdentifier];
|
|
26
25
|
const resourceId = utils_1.manifestUtils.getResourceIdFromEntryKey(resourceIdentifier);
|
|
27
|
-
if (resourceId ==
|
|
26
|
+
if (resourceId == o$.enums.omniaResourceManifests.Vendor.toString()) {
|
|
28
27
|
return Object.assign(preBundleEntries, {
|
|
29
28
|
[resourceIdentifier]: filePaths
|
|
30
29
|
});
|
|
@@ -6,7 +6,6 @@ const rimraf_1 = tslib_1.__importDefault(require("rimraf"));
|
|
|
6
6
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
7
7
|
const globby_1 = require("globby");
|
|
8
8
|
const vite_1 = require("vite");
|
|
9
|
-
const fx_models_1 = require("@omnia/fx-models");
|
|
10
9
|
const internal_1 = require("./transformers/internal");
|
|
11
10
|
const utils_1 = require("./utils");
|
|
12
11
|
const graph = tslib_1.__importStar(require("./graph"));
|
|
@@ -17,14 +16,6 @@ const transformerInstanceCache = {
|
|
|
17
16
|
configuredExternal: { resolved: false, value: [] },
|
|
18
17
|
postInternal: { resolved: false, value: [] }
|
|
19
18
|
};
|
|
20
|
-
const coreManifesIds = [
|
|
21
|
-
fx_models_1.OmniaResourceManifests.FxCoreBoot.toString(),
|
|
22
|
-
fx_models_1.OmniaGroupManifests.Fx.toString(),
|
|
23
|
-
fx_models_1.OmniaResourceManifests.Fx.toString(),
|
|
24
|
-
fx_models_1.OmniaResourceManifests.FxContexts.toString(),
|
|
25
|
-
fx_models_1.OmniaResourceManifests.FxCore.toString(),
|
|
26
|
-
fx_models_1.OmniaResourceManifests.FxShared.toString(),
|
|
27
|
-
];
|
|
28
19
|
function getModuleTimestamp(id) {
|
|
29
20
|
const fileGraph = graph.getFileGraph(id);
|
|
30
21
|
if (fileGraph && fileGraph.timestamp) {
|
|
@@ -33,6 +24,14 @@ function getModuleTimestamp(id) {
|
|
|
33
24
|
}
|
|
34
25
|
exports.getModuleTimestamp = getModuleTimestamp;
|
|
35
26
|
function setupHmrPlugin(options, config) {
|
|
27
|
+
const coreManifesIds = [
|
|
28
|
+
o$.enums.omniaResourceManifests.FxCoreBoot,
|
|
29
|
+
o$.enums.omniaGroupManifests.Fx,
|
|
30
|
+
o$.enums.omniaResourceManifests.Fx,
|
|
31
|
+
o$.enums.omniaResourceManifests.FxContexts,
|
|
32
|
+
o$.enums.omniaResourceManifests.FxCore,
|
|
33
|
+
o$.enums.omniaResourceManifests.FxShared,
|
|
34
|
+
];
|
|
36
35
|
const runtimeContext = {
|
|
37
36
|
options: options,
|
|
38
37
|
alias: config.alias,
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.omniaCurrentManifestRuntime = void 0;
|
|
4
4
|
const base_1 = require("../base");
|
|
5
|
-
const fx_models_1 = require("@omnia/fx-models");
|
|
6
5
|
const utils_1 = require("../../utils");
|
|
7
6
|
/** Inject omnia current manifest runtime */
|
|
8
7
|
exports.omniaCurrentManifestRuntime = (0, base_1.defineTransformer)("omnia-current-manifest-runtime", () => {
|
|
@@ -25,7 +24,7 @@ exports.omniaCurrentManifestRuntime = (0, base_1.defineTransformer)("omnia-curre
|
|
|
25
24
|
code = injectCurrentManifestSetter(code, ctx.serviceId, fileGraph, fxIndexPaths, declaredVariable, () => {
|
|
26
25
|
return isOmniaEnv ?
|
|
27
26
|
`import { setCurrentManifest as ${declaredVariable} } from '${ctx.toModuleId(fxIndexPaths[0])}';` :
|
|
28
|
-
`const { setCurrentManifest: ${declaredVariable} } = omniaWebpackJsonp['bb000000-0000-bbbb-0000-0000000000bb']['${
|
|
27
|
+
`const { setCurrentManifest: ${declaredVariable} } = omniaWebpackJsonp['bb000000-0000-bbbb-0000-0000000000bb']['${o$.enums.omniaResourceManifests.Fx}']('14a8d443-2e58-450b-a462-258bdaf69b49');`;
|
|
29
28
|
});
|
|
30
29
|
}
|
|
31
30
|
if (hasUxIndexPath) {
|
|
@@ -33,7 +32,7 @@ exports.omniaCurrentManifestRuntime = (0, base_1.defineTransformer)("omnia-curre
|
|
|
33
32
|
code = injectCurrentManifestSetter(code, ctx.serviceId, fileGraph, uxIndexPaths, declaredVariable, () => {
|
|
34
33
|
return isOmniaEnv ?
|
|
35
34
|
`import { setCurrentManifest as ${declaredVariable} } from '${ctx.toModuleId(uxIndexPaths[0])}';` :
|
|
36
|
-
`const { setCurrentManifest: ${declaredVariable} } = omniaWebpackJsonp['bb000000-0000-bbbb-0000-0000000000bb']['${
|
|
35
|
+
`const { setCurrentManifest: ${declaredVariable} } = omniaWebpackJsonp['bb000000-0000-bbbb-0000-0000000000bb']['${o$.enums.omniaResourceManifests.FxUx}']('d7327742-5647-4075-b7ab-4f9ca852addb');`;
|
|
37
36
|
});
|
|
38
37
|
}
|
|
39
38
|
return code;
|
|
@@ -133,7 +133,7 @@ exports.transformVueJsx = transformVueJsx;
|
|
|
133
133
|
// let code = babelFile.code;
|
|
134
134
|
// let callbackCode = ``;
|
|
135
135
|
// code = '\n' +
|
|
136
|
-
// `const __VUE_HOT_RELOAD_API__ = omniaWebpackJsonp['bb000000-0000-bbbb-0000-0000000000bb']['${
|
|
136
|
+
// `const __VUE_HOT_RELOAD_API__ = omniaWebpackJsonp['bb000000-0000-bbbb-0000-0000000000bb']['${o$.enums.omniaResourceManifests.HMR}']('f8ee4fc2-3876-4997-80d7-5264eaee44bb');` + '\n' + code;
|
|
137
137
|
// for (const { local, exported, id } of hotComponents) {
|
|
138
138
|
// code +=
|
|
139
139
|
// `\n\n/**\n * Vue Hot Reload\n */\n${local}.__hmrId = "${id}";` +
|
|
@@ -64,8 +64,8 @@ function registerHmrMiddleware(server) {
|
|
|
64
64
|
res.statusMessage = message;
|
|
65
65
|
console.error(message);
|
|
66
66
|
}
|
|
67
|
-
else if (resourceId ==
|
|
68
|
-
resourceId ==
|
|
67
|
+
else if (resourceId == o$.enums.omniaResourceManifests.Vendor ||
|
|
68
|
+
resourceId == o$.enums.omniaResourceManifests.FxWorkers) {
|
|
69
69
|
const serviceId = $.tooling.composer.getServiceId();
|
|
70
70
|
const bundleDirPath = utils_1.envUtils.getBundleOutputDirPath();
|
|
71
71
|
const bundleFileName = manifest.resourceName ? `${manifest.resourceName}_${resourceId}.${bundleFileExtension}` : `${resourceId}.${bundleFileExtension}`;
|
|
@@ -49,9 +49,9 @@ function registerStaticFileMiddleware(server) {
|
|
|
49
49
|
let localizeObject = $.composers.getLocalizations();
|
|
50
50
|
res.end(`
|
|
51
51
|
const OmniaContext = omniaWebpackJsonp["bb000000-0000-bbbb-0000-0000000000bb"]["a1602121-3070-4304-b4d8-0859e50c482b"]("5326a8ef-4e3c-49d6-b415-1ddf7fdcc830").OmniaContext;
|
|
52
|
-
const container = omniaWebpackJsonp["bb000000-0000-bbbb-0000-0000000000bb"]["` +
|
|
52
|
+
const container = omniaWebpackJsonp["bb000000-0000-bbbb-0000-0000000000bb"]["` + o$.enums.omniaResourceManifests.FxCore.toString() + `"]("97786ea9-4861-48bd-8a57-eae9bbdb4892").ServiceContainer;
|
|
53
53
|
const omniaCtx = container.createInstance(OmniaContext);
|
|
54
|
-
const useLocalizationStore = omniaWebpackJsonp["bb000000-0000-bbbb-0000-0000000000bb"]["` +
|
|
54
|
+
const useLocalizationStore = omniaWebpackJsonp["bb000000-0000-bbbb-0000-0000000000bb"]["` + o$.enums.omniaResourceManifests.Fx.toString() + `"]("5e618f4d-d014-414e-a681-89e34cbeda0f").useLocalizationStore;
|
|
55
55
|
const localizeStore = container.createInstance(useLocalizationStore);
|
|
56
56
|
const currentCulture = omniaCtx.language.toLowerCase();
|
|
57
57
|
const loc = JSON.parse('${JSON.stringify(localizeObject).replace(/'/g, "\\'").replace(/\\"/g, "\\\\\"")}');
|
|
@@ -64,10 +64,10 @@ function registerStaticFileMiddleware(server) {
|
|
|
64
64
|
res.setHeader('Cache-Control', 'public, max-age=31536000');
|
|
65
65
|
// Have issue server side rendering write out load vendor, fx core with version from hosting that not from current serving
|
|
66
66
|
// so hard code no-cache for them
|
|
67
|
-
if (manifestId ===
|
|
68
|
-
|| manifestId ===
|
|
69
|
-
|| manifestId ===
|
|
70
|
-
|| manifestId ===
|
|
67
|
+
if (manifestId === o$.enums.omniaResourceManifests.Vendor
|
|
68
|
+
|| manifestId === o$.enums.omniaResourceManifests.FxShared
|
|
69
|
+
|| manifestId === o$.enums.omniaResourceManifests.FxCore
|
|
70
|
+
|| manifestId === o$.enums.omniaResourceManifests.FxCoreBoot) {
|
|
71
71
|
res.setHeader('Cache-Control', 'no-cache');
|
|
72
72
|
}
|
|
73
73
|
let manifest = $.tooling.composer.getManifestById(manifestId);
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const loaderUtils = require("loader-utils");
|
|
5
|
-
const fx_models_1 = require("@omnia/fx-models");
|
|
6
5
|
const $ = tslib_1.__importStar(require("../variables"));
|
|
7
6
|
function processManifests(manifestPaths) {
|
|
8
7
|
$.composers.ManifestRegistry.clearState();
|
|
@@ -35,7 +34,7 @@ function default_1(contents, context) {
|
|
|
35
34
|
$.composers.ManifestRegistry.clearState();
|
|
36
35
|
return `
|
|
37
36
|
var OmniaContext = omniaWebpackJsonp["bb000000-0000-bbbb-0000-0000000000bb"]["a5a89056-b5f5-475d-8518-a1f55090379d"]("97786ea9-4861-48bd-8a57-eae9bbdb4892").OmniaContext;
|
|
38
|
-
var container = omniaWebpackJsonp["bb000000-0000-bbbb-0000-0000000000bb"]["` +
|
|
37
|
+
var container = omniaWebpackJsonp["bb000000-0000-bbbb-0000-0000000000bb"]["` + o$.enums.omniaResourceManifests.Fx.toString() + `"]("97786ea9-4861-48bd-8a57-eae9bbdb4892").ServiceContainer;
|
|
39
38
|
var omniaCtx = container.createInstance(OmniaContext);
|
|
40
39
|
var localizationStore = omniaWebpackJsonp["bb000000-0000-bbbb-0000-0000000000bb"]["a5a89056-b5f5-475d-8518-a1f55090379d"]("5e618f4d-d014-414e-a681-89e34cbeda0f").LocalizationStore;
|
|
41
40
|
var currentCulture = omniaCtx.language.toLowerCase();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omnia/tooling-vue",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "8.0.
|
|
4
|
+
"version": "8.0.198-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.
|
|
23
|
-
"@omnia/tooling-composers": "8.0.
|
|
22
|
+
"@omnia/fx-models": "8.0.198-dev",
|
|
23
|
+
"@omnia/tooling-composers": "8.0.198-dev",
|
|
24
24
|
"@types/mousetrap": "1.5.34",
|
|
25
25
|
"@types/quill": "1.3.6",
|
|
26
26
|
"@types/zepto": "1.0.29",
|