@omnia/tooling-vue 8.0.256-dev → 8.0.258-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/tooling.output.json +1 -1
- package/internal-do-not-import-from-here/config/wctypings.d.ts +38 -32
- package/internal-do-not-import-from-here/index.js +2 -2
- package/internal-do-not-import-from-here/shared.js +7 -7
- package/internal-do-not-import-from-here/tasks/ComponentDocRegistrations.js +1 -1
- package/internal-do-not-import-from-here/tasks/bundle.js +11 -12
- package/internal-do-not-import-from-here/tasks/doc.js +2 -3
- package/internal-do-not-import-from-here/vite/hmr/graph.js +5 -6
- package/internal-do-not-import-from-here/vite/hmr/manifest.js +6 -6
- package/internal-do-not-import-from-here/vite/hmr/resolvers/base.js +1 -2
- package/internal-do-not-import-from-here/vite/hmr/runtime.js +2 -3
- package/internal-do-not-import-from-here/vite/hmr/transformers/base.js +1 -2
- package/internal-do-not-import-from-here/vite/hmr/transformers/vendorImportPath.js +2 -2
- package/internal-do-not-import-from-here/vite/hmr/utils/env.js +4 -5
- package/internal-do-not-import-from-here/vite/hmr/utils/manifest.js +4 -5
- package/internal-do-not-import-from-here/vite/hmr/utils/moduleAnalysis.js +5 -6
- package/internal-do-not-import-from-here/vite/hmr/utils/path.js +17 -17
- package/internal-do-not-import-from-here/vite/hmr/utils/transform.js +3 -3
- package/internal-do-not-import-from-here/vite/hmr/utils/webpack.js +1 -2
- package/internal-do-not-import-from-here/vite/hmr/vueJsx.js +1 -2
- package/internal-do-not-import-from-here/vite/index.js +23 -3
- package/internal-do-not-import-from-here/vite/middlewares/HmrMiddleware.js +4 -4
- package/internal-do-not-import-from-here/vite/middlewares/OmniaMiddleware.js +2 -2
- package/internal-do-not-import-from-here/vite/middlewares/StaticFileMiddleware.js +1 -2
- package/internal-do-not-import-from-here/vite/middlewares/WebpackMiddleware.js +1 -2
- package/internal-do-not-import-from-here/vite/plugins/OmniaPlugin.js +1 -2
- package/internal-do-not-import-from-here/webpack-loaders/doc-loader.js +1 -1
- package/internal-do-not-import-from-here/webpack-loaders/esbuild-custom-loader.js +1 -1
- package/internal-do-not-import-from-here/webpack-loaders/group-manifest-hot-loader.js +1 -1
- package/internal-do-not-import-from-here/webpack-loaders/ingore-vuetify-locale.js +1 -1
- package/internal-do-not-import-from-here/webpack-loaders/replacement-loader.js +1 -1
- package/internal-do-not-import-from-here/webpack-loaders/ts-loader.js +1 -1
- package/internal-do-not-import-from-here/webpack-loaders/tsx-loader.js +1 -1
- package/internal-do-not-import-from-here/webpack-loaders/vue-domprops-loader.js +1 -1
- package/internal-do-not-import-from-here/webpack-loaders/vue-localization-hot-loader.js +1 -1
- package/internal-do-not-import-from-here/webpack-plugins/omnia.webpack.plugins.js +3 -3
- package/internal-do-not-import-from-here/webpack-plugins/stylexjs/loader.js +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ensureManifestDependencyInRuntime = ensureManifestDependencyInRuntime;
|
|
4
|
+
exports.bundleManifest = bundleManifest;
|
|
5
|
+
exports.getServiceId = getServiceId;
|
|
6
|
+
exports.getBuildOption = getBuildOption;
|
|
7
|
+
exports.cleanUpComposer = cleanUpComposer;
|
|
8
|
+
exports.createVueWebpackConfig = createVueWebpackConfig;
|
|
9
|
+
exports.createCombinedManfest = createCombinedManfest;
|
|
10
|
+
exports.registerManifestsReference = registerManifestsReference;
|
|
11
|
+
exports.checkDuplicateBundle = checkDuplicateBundle;
|
|
12
|
+
exports.processManifestGenerated = processManifestGenerated;
|
|
13
|
+
exports.addDependency = addDependency;
|
|
4
14
|
const tslib_1 = require("tslib");
|
|
5
15
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
6
16
|
const del_1 = tslib_1.__importDefault(require("del"));
|
|
@@ -502,7 +512,6 @@ function bundleManifest(entries) {
|
|
|
502
512
|
}
|
|
503
513
|
});
|
|
504
514
|
}
|
|
505
|
-
exports.bundleManifest = bundleManifest;
|
|
506
515
|
function afterBundleManifest(entries) {
|
|
507
516
|
return new Promise(function (resolve, reject) {
|
|
508
517
|
let startTime = new Date().getTime();
|
|
@@ -880,7 +889,6 @@ function createVueWebpackConfig(currentEntry, entries, bundleOutputDir, viteHmrO
|
|
|
880
889
|
plugins: plugins
|
|
881
890
|
};
|
|
882
891
|
}
|
|
883
|
-
exports.createVueWebpackConfig = createVueWebpackConfig;
|
|
884
892
|
function createWebpackConfigForManifestMetadata(entry, metadataOutputDir) {
|
|
885
893
|
var entensionId = getServiceId();
|
|
886
894
|
return Object.assign({}, getBaseWebpackConfigForManifestMetadata(entry, metadataOutputDir), {
|
|
@@ -1090,7 +1098,6 @@ function processManifestGenerated(entries, outDir) {
|
|
|
1090
1098
|
return allow;
|
|
1091
1099
|
}
|
|
1092
1100
|
}
|
|
1093
|
-
exports.processManifestGenerated = processManifestGenerated;
|
|
1094
1101
|
function createCombinedManfests(outputDir) {
|
|
1095
1102
|
return new Promise(function (resolve, reject) {
|
|
1096
1103
|
var manifestGroupRegistry = $.composers.ManifestGroupRegistry;
|
|
@@ -1199,7 +1206,6 @@ ${$.composers.LoadableManifestRegistry.isDefineWithNoDependency(targetManifestId
|
|
|
1199
1206
|
}
|
|
1200
1207
|
});
|
|
1201
1208
|
}
|
|
1202
|
-
exports.createCombinedManfest = createCombinedManfest;
|
|
1203
1209
|
function importManifestsPackage() {
|
|
1204
1210
|
return new Promise(function (resolve, reject) {
|
|
1205
1211
|
if (process.argv.length > 0 && process.argv.find(argv => argv === "--no-import") !== undefined) {
|
|
@@ -1301,7 +1307,6 @@ function buildReferenceManifest(currentEntry, entries) {
|
|
|
1301
1307
|
function cleanUpComposer() {
|
|
1302
1308
|
$.composers.ManifestRegistry.clearState();
|
|
1303
1309
|
}
|
|
1304
|
-
exports.cleanUpComposer = cleanUpComposer;
|
|
1305
1310
|
function buildReferenceManifestFromConfig(entryName) {
|
|
1306
1311
|
var manifests = [];
|
|
1307
1312
|
let buildOptions = getBuildOption();
|
|
@@ -1392,7 +1397,6 @@ function getBuildOption() {
|
|
|
1392
1397
|
}
|
|
1393
1398
|
return keepTrackbuildOptions;
|
|
1394
1399
|
}
|
|
1395
|
-
exports.getBuildOption = getBuildOption;
|
|
1396
1400
|
function getServiceId() {
|
|
1397
1401
|
const serviceInfo = $.composers.ServiceManifestRegistry.getServiceInfo();
|
|
1398
1402
|
let result;
|
|
@@ -1407,7 +1411,6 @@ function getServiceId() {
|
|
|
1407
1411
|
}
|
|
1408
1412
|
return result;
|
|
1409
1413
|
}
|
|
1410
|
-
exports.getServiceId = getServiceId;
|
|
1411
1414
|
function createVueEntryFormComponentRegistrations(registrations) {
|
|
1412
1415
|
let entryPaths = {};
|
|
1413
1416
|
for (let r of registrations) {
|
|
@@ -1495,7 +1498,6 @@ function ensureManifestDependencyInRuntime(currentManifestId, manifestBundleFile
|
|
|
1495
1498
|
});
|
|
1496
1499
|
}
|
|
1497
1500
|
}
|
|
1498
|
-
exports.ensureManifestDependencyInRuntime = ensureManifestDependencyInRuntime;
|
|
1499
1501
|
function buildManifestsDependency(entries, manifestId, manifestBundleContent) {
|
|
1500
1502
|
let configReferenceManifests = getRegisteredReferenceManifests().filter(m => m.resourceId !== undefined);
|
|
1501
1503
|
if (configReferenceManifests) {
|
|
@@ -1566,7 +1568,6 @@ function addDependency(currentManifest, dependentManifest, dependentOmniaService
|
|
|
1566
1568
|
$.composers.ManifestRegistry.setCurrentManifestPath();
|
|
1567
1569
|
}
|
|
1568
1570
|
}
|
|
1569
|
-
exports.addDependency = addDependency;
|
|
1570
1571
|
function chunkAsset(entries, compilation, fileName, viteHmrOption) {
|
|
1571
1572
|
//console.log(chunk.name)
|
|
1572
1573
|
if (fileName) {
|
|
@@ -1657,7 +1658,6 @@ function checkDuplicateBundle() {
|
|
|
1657
1658
|
});
|
|
1658
1659
|
return foundDuplicated;
|
|
1659
1660
|
}
|
|
1660
|
-
exports.checkDuplicateBundle = checkDuplicateBundle;
|
|
1661
1661
|
function checkDuplicateWebpackEntryPoints(entries) {
|
|
1662
1662
|
let foundDuplicated = false;
|
|
1663
1663
|
let entryPathInfos = {};
|
|
@@ -1730,7 +1730,6 @@ function registerManifestsReference(manifests) {
|
|
|
1730
1730
|
_registeredReferenceManifests.push(manifest);
|
|
1731
1731
|
});
|
|
1732
1732
|
}
|
|
1733
|
-
exports.registerManifestsReference = registerManifestsReference;
|
|
1734
1733
|
function getRegisteredReferenceManifests() {
|
|
1735
1734
|
return _registeredReferenceManifests;
|
|
1736
1735
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.generateComponentTypingsAndDoc = generateComponentTypingsAndDoc;
|
|
4
|
+
exports.importSnippetCode = importSnippetCode;
|
|
4
5
|
const tslib_1 = require("tslib");
|
|
5
6
|
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
6
7
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
@@ -117,7 +118,6 @@ extendApi(api => api.fx.docs.registrations, api => {
|
|
|
117
118
|
shared_1.ConfigurationManager.outputInfo.update(info);
|
|
118
119
|
tooling_1.utils.logTime('Done - Generate components typings and documentation', startTime);
|
|
119
120
|
}
|
|
120
|
-
exports.generateComponentTypingsAndDoc = generateComponentTypingsAndDoc;
|
|
121
121
|
function generateWebComponentTypings(wc, template, info, elementNamespace) {
|
|
122
122
|
// export default defineVueWebComponent
|
|
123
123
|
const wcPath = wc.componentOptions.entryPointPath;
|
|
@@ -189,7 +189,6 @@ function importSnippetCode(content, filePath) {
|
|
|
189
189
|
}
|
|
190
190
|
return result;
|
|
191
191
|
}
|
|
192
|
-
exports.importSnippetCode = importSnippetCode;
|
|
193
192
|
function populateElementNamespace(namespace, elementName, importElement) {
|
|
194
193
|
const parts = elementName.split(".");
|
|
195
194
|
for (let i = 0; i < parts.length; i++) {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getFileGraph = getFileGraph;
|
|
4
|
+
exports.toFileGraphId = toFileGraphId;
|
|
5
|
+
exports.toModuleId = toModuleId;
|
|
6
|
+
exports.buildFileGraphs = buildFileGraphs;
|
|
7
|
+
exports.buildFileGraph = buildFileGraph;
|
|
4
8
|
const tslib_1 = require("tslib");
|
|
5
9
|
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
6
10
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
@@ -23,7 +27,6 @@ function getFileGraph(unknownId) {
|
|
|
23
27
|
const id = toFileGraphId(unknownId);
|
|
24
28
|
return fileGraphs[id];
|
|
25
29
|
}
|
|
26
|
-
exports.getFileGraph = getFileGraph;
|
|
27
30
|
function toFileGraphId(unknownId) {
|
|
28
31
|
let id = unknownId;
|
|
29
32
|
if (utils_1.pathUtils.isTsPath(id)) {
|
|
@@ -38,7 +41,6 @@ function toFileGraphId(unknownId) {
|
|
|
38
41
|
}
|
|
39
42
|
return id;
|
|
40
43
|
}
|
|
41
|
-
exports.toFileGraphId = toFileGraphId;
|
|
42
44
|
function toModuleId(unknownId) {
|
|
43
45
|
let id = unknownId;
|
|
44
46
|
if (utils_1.pathUtils.isTsPath(id)) {
|
|
@@ -53,7 +55,6 @@ function toModuleId(unknownId) {
|
|
|
53
55
|
}
|
|
54
56
|
return id;
|
|
55
57
|
}
|
|
56
|
-
exports.toModuleId = toModuleId;
|
|
57
58
|
async function buildFileGraphs(entries) {
|
|
58
59
|
fileGraphs = {};
|
|
59
60
|
manifests = {};
|
|
@@ -146,7 +147,6 @@ async function buildFileGraphs(entries) {
|
|
|
146
147
|
});
|
|
147
148
|
return manifests;
|
|
148
149
|
}
|
|
149
|
-
exports.buildFileGraphs = buildFileGraphs;
|
|
150
150
|
async function buildFileGraph(unknownId, code) {
|
|
151
151
|
const id = toFileGraphId(unknownId);
|
|
152
152
|
const fileGraph = ensureFileGraph(id, false, undefined);
|
|
@@ -171,7 +171,6 @@ async function buildFileGraph(unknownId, code) {
|
|
|
171
171
|
code = (0, doc_1.importSnippetCode)(code, fileGraph.id);
|
|
172
172
|
return { fileGraph, code, esbuildTransformResult };
|
|
173
173
|
}
|
|
174
|
-
exports.buildFileGraph = buildFileGraph;
|
|
175
174
|
async function buildFileGraphRecursive(id, manifestDependencies, entry, resourceId) {
|
|
176
175
|
const fileGraph = ensureFileGraph(id, entry, resourceId);
|
|
177
176
|
if (!fileGraph.js) {
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.entriesResolver = void 0;
|
|
4
|
+
exports.getManifestCollection = getManifestCollection;
|
|
5
|
+
exports.clearManifestCollection = clearManifestCollection;
|
|
6
|
+
exports.getManifest = getManifest;
|
|
7
|
+
exports.validatePreBundles = validatePreBundles;
|
|
8
|
+
exports.getPreBundleInfo = getPreBundleInfo;
|
|
4
9
|
const tslib_1 = require("tslib");
|
|
5
10
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
6
11
|
const globby_1 = require("globby");
|
|
@@ -64,11 +69,9 @@ function getManifestCollection() {
|
|
|
64
69
|
}
|
|
65
70
|
return _manifestCollection;
|
|
66
71
|
}
|
|
67
|
-
exports.getManifestCollection = getManifestCollection;
|
|
68
72
|
function clearManifestCollection() {
|
|
69
73
|
_manifestCollection = null;
|
|
70
74
|
}
|
|
71
|
-
exports.clearManifestCollection = clearManifestCollection;
|
|
72
75
|
function getManifest(resourceId) {
|
|
73
76
|
let manifests = getManifestCollection();
|
|
74
77
|
let manifest = manifests.webcomponent?.find(r => r.resourceId == resourceId);
|
|
@@ -80,7 +83,6 @@ function getManifest(resourceId) {
|
|
|
80
83
|
}
|
|
81
84
|
return manifest;
|
|
82
85
|
}
|
|
83
|
-
exports.getManifest = getManifest;
|
|
84
86
|
async function validatePreBundles(fileNames) {
|
|
85
87
|
const preBundleDir = utils_1.envUtils.getBundleOutputDirPath();
|
|
86
88
|
const filePaths = fileNames.map(fileName => path_1.default.join(preBundleDir, fileName).replace(/\\/g, '/'));
|
|
@@ -90,7 +92,6 @@ async function validatePreBundles(fileNames) {
|
|
|
90
92
|
}).catch(reject);
|
|
91
93
|
});
|
|
92
94
|
}
|
|
93
|
-
exports.validatePreBundles = validatePreBundles;
|
|
94
95
|
function getPreBundleInfo() {
|
|
95
96
|
return exports.entriesResolver.getPreBundleEntries().then(entries => {
|
|
96
97
|
const serviceId = $.tooling.composer.getServiceId();
|
|
@@ -109,4 +110,3 @@ function getPreBundleInfo() {
|
|
|
109
110
|
}, []);
|
|
110
111
|
});
|
|
111
112
|
}
|
|
112
|
-
exports.getPreBundleInfo = getPreBundleInfo;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.defineResolver =
|
|
3
|
+
exports.defineResolver = defineResolver;
|
|
4
4
|
const utils_1 = require("../utils");
|
|
5
5
|
function defineResolver(name, ctor) {
|
|
6
6
|
if (typeof ctor != 'function') {
|
|
@@ -24,4 +24,3 @@ function defineResolver(name, ctor) {
|
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
exports.defineResolver = defineResolver;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getModuleTimestamp = getModuleTimestamp;
|
|
4
|
+
exports.setupHmrPlugin = setupHmrPlugin;
|
|
4
5
|
const tslib_1 = require("tslib");
|
|
5
6
|
const rimraf_1 = tslib_1.__importDefault(require("rimraf"));
|
|
6
7
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
@@ -22,7 +23,6 @@ function getModuleTimestamp(id) {
|
|
|
22
23
|
return fileGraph.timestamp;
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
|
-
exports.getModuleTimestamp = getModuleTimestamp;
|
|
26
26
|
function setupHmrPlugin(options, config) {
|
|
27
27
|
const coreManifesIds = [
|
|
28
28
|
o$.enums.omniaResourceManifests.FxCoreBoot,
|
|
@@ -153,7 +153,6 @@ function setupHmrPlugin(options, config) {
|
|
|
153
153
|
}
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
|
-
exports.setupHmrPlugin = setupHmrPlugin;
|
|
157
156
|
async function executeTransformers(id, code, fileGraph, transformers, fromWorker) {
|
|
158
157
|
if (transformers.length == 0) {
|
|
159
158
|
return code;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.defineTransformer =
|
|
3
|
+
exports.defineTransformer = defineTransformer;
|
|
4
4
|
const utils_1 = require("../utils");
|
|
5
5
|
function defineTransformer(name, ctor) {
|
|
6
6
|
if (typeof ctor != 'function') {
|
|
@@ -29,7 +29,6 @@ function defineTransformer(name, ctor) {
|
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
exports.defineTransformer = defineTransformer;
|
|
33
32
|
function validate(name, test, transform) {
|
|
34
33
|
if (typeof name != 'string' || name.length == 0) {
|
|
35
34
|
throw new utils_1.ErrorHMR('transformer.name is empty or undefined');
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.sharedVendorImportPath = exports.vendorImportPath = void 0;
|
|
4
|
+
exports.createTransformer = createTransformer;
|
|
4
5
|
const tslib_1 = require("tslib");
|
|
5
6
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
6
7
|
const vite_1 = require("vite");
|
|
@@ -44,4 +45,3 @@ function createTransformer(replacers, runtimeVariable) {
|
|
|
44
45
|
transform: instance.transform
|
|
45
46
|
};
|
|
46
47
|
}
|
|
47
|
-
exports.createTransformer = createTransformer;
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getRootDirPath = getRootDirPath;
|
|
4
|
+
exports.getTsConfigPath = getTsConfigPath;
|
|
5
|
+
exports.getBundleOutputDirPath = getBundleOutputDirPath;
|
|
6
|
+
exports.getImageOutputDirPath = getImageOutputDirPath;
|
|
4
7
|
const tslib_1 = require("tslib");
|
|
5
8
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
6
9
|
const $ = tslib_1.__importStar(require("../../../variables"));
|
|
7
10
|
function getRootDirPath() {
|
|
8
11
|
return process.cwd();
|
|
9
12
|
}
|
|
10
|
-
exports.getRootDirPath = getRootDirPath;
|
|
11
13
|
function getTsConfigPath() {
|
|
12
14
|
return path_1.default.join(getRootDirPath(), 'tsconfig.json');
|
|
13
15
|
}
|
|
14
|
-
exports.getTsConfigPath = getTsConfigPath;
|
|
15
16
|
function getBundleOutputDirPath() {
|
|
16
17
|
return path_1.default.join(getRootDirPath(), 'wwwroot/omnia/dist/hmr/bundles');
|
|
17
18
|
}
|
|
18
|
-
exports.getBundleOutputDirPath = getBundleOutputDirPath;
|
|
19
19
|
function getImageOutputDirPath() {
|
|
20
20
|
return path_1.default.join(getRootDirPath(), $.tooling.composer.OmniaOutput.OutputImagePath);
|
|
21
21
|
}
|
|
22
|
-
exports.getImageOutputDirPath = getImageOutputDirPath;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getExternalManifestReferences = getExternalManifestReferences;
|
|
4
|
+
exports.getInternalManifestReferences = getInternalManifestReferences;
|
|
5
|
+
exports.getResourceIdFromEntryKey = getResourceIdFromEntryKey;
|
|
6
|
+
exports.getEntryKeyFromManifest = getEntryKeyFromManifest;
|
|
4
7
|
const tslib_1 = require("tslib");
|
|
5
8
|
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
6
9
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
@@ -37,7 +40,6 @@ const externalManifestReferences = (function () {
|
|
|
37
40
|
function getExternalManifestReferences() {
|
|
38
41
|
return externalManifestReferences;
|
|
39
42
|
}
|
|
40
|
-
exports.getExternalManifestReferences = getExternalManifestReferences;
|
|
41
43
|
function getInternalManifestReferences() {
|
|
42
44
|
if (!internalManifestReferences) {
|
|
43
45
|
const buildOptions = $.composers.BuildConfigurationRegistry.getBuildOptions();
|
|
@@ -60,7 +62,6 @@ function getInternalManifestReferences() {
|
|
|
60
62
|
}
|
|
61
63
|
return internalManifestReferences;
|
|
62
64
|
}
|
|
63
|
-
exports.getInternalManifestReferences = getInternalManifestReferences;
|
|
64
65
|
function getResourceIdFromEntryKey(key) {
|
|
65
66
|
let [resourceName, resourceId] = key.split('_');
|
|
66
67
|
if (!!resourceId) {
|
|
@@ -68,11 +69,9 @@ function getResourceIdFromEntryKey(key) {
|
|
|
68
69
|
}
|
|
69
70
|
return resourceName;
|
|
70
71
|
}
|
|
71
|
-
exports.getResourceIdFromEntryKey = getResourceIdFromEntryKey;
|
|
72
72
|
function getEntryKeyFromManifest(manifest) {
|
|
73
73
|
if (!!manifest.resourceName) {
|
|
74
74
|
return `${manifest.resourceName}_${manifest.resourceId}`;
|
|
75
75
|
}
|
|
76
76
|
return manifest.resourceId.toString();
|
|
77
77
|
}
|
|
78
|
-
exports.getEntryKeyFromManifest = getEntryKeyFromManifest;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.analyze = analyze;
|
|
4
|
+
exports.getDependencyStatements = getDependencyStatements;
|
|
5
|
+
exports.replaceNamelessDefaultExport = replaceNamelessDefaultExport;
|
|
6
|
+
exports.replaceWildcardDefaultExport = replaceWildcardDefaultExport;
|
|
7
|
+
exports.tempFix = tempFix;
|
|
4
8
|
const tslib_1 = require("tslib");
|
|
5
9
|
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
6
10
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
@@ -95,19 +99,16 @@ function analyze(code, id) {
|
|
|
95
99
|
};
|
|
96
100
|
return metadata;
|
|
97
101
|
}
|
|
98
|
-
exports.analyze = analyze;
|
|
99
102
|
function getDependencyStatements(code) {
|
|
100
103
|
const removedCommentsCode = code.replace(commentRegex, '');
|
|
101
104
|
const dependencyStatements = removedCommentsCode.match(dependencyRegex);
|
|
102
105
|
return dependencyStatements;
|
|
103
106
|
}
|
|
104
|
-
exports.getDependencyStatements = getDependencyStatements;
|
|
105
107
|
function replaceNamelessDefaultExport(code) {
|
|
106
108
|
code = code.replace(exportedNamelessDefaultRegex, `const ${replacedDefaultVariable} = `);
|
|
107
109
|
code += `\nexport default ${replacedDefaultVariable};`;
|
|
108
110
|
return code;
|
|
109
111
|
}
|
|
110
|
-
exports.replaceNamelessDefaultExport = replaceNamelessDefaultExport;
|
|
111
112
|
function replaceWildcardDefaultExport(code, wildcard) {
|
|
112
113
|
if (!wildcard.defaultAvailable) {
|
|
113
114
|
return code;
|
|
@@ -115,7 +116,6 @@ function replaceWildcardDefaultExport(code, wildcard) {
|
|
|
115
116
|
code = code.replace(wildcard.statement, `import * as ${replacedDefaultVariable} from '${wildcard.rawPath}'\nexport default ${replacedDefaultVariable}`);
|
|
116
117
|
return code;
|
|
117
118
|
}
|
|
118
|
-
exports.replaceWildcardDefaultExport = replaceWildcardDefaultExport;
|
|
119
119
|
function tempFix(id, code, fromWorker) {
|
|
120
120
|
const imageFilePaths = [];
|
|
121
121
|
let transformedCode = code;
|
|
@@ -147,7 +147,6 @@ function tempFix(id, code, fromWorker) {
|
|
|
147
147
|
});
|
|
148
148
|
return transformedCode;
|
|
149
149
|
}
|
|
150
|
-
exports.tempFix = tempFix;
|
|
151
150
|
function resolveRawPath(rawPath, id, external) {
|
|
152
151
|
let dependencyFilePath;
|
|
153
152
|
if (rawPath.startsWith('.')) {
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.WORKER_IDENTIFIER = exports.HMR_DYNAMIC_BUNDLE_REQUEST = exports.HMR_ESM_REQUEST = exports.OMNIA_BUNDLE_REQUEST = void 0;
|
|
4
|
+
exports.isBundlePath = isBundlePath;
|
|
5
|
+
exports.isEsmPath = isEsmPath;
|
|
6
|
+
exports.isSourceCodePath = isSourceCodePath;
|
|
7
|
+
exports.isJavaScriptSuperset = isJavaScriptSuperset;
|
|
8
|
+
exports.isTsPath = isTsPath;
|
|
9
|
+
exports.isNodeModulePath = isNodeModulePath;
|
|
10
|
+
exports.isPublicDirPath = isPublicDirPath;
|
|
11
|
+
exports.isImageFilePath = isImageFilePath;
|
|
12
|
+
exports.parseOmniaBundlePath = parseOmniaBundlePath;
|
|
13
|
+
exports.parseHmrEsmPath = parseHmrEsmPath;
|
|
14
|
+
exports.parseHmrDynamicBundlePath = parseHmrDynamicBundlePath;
|
|
15
|
+
exports.parsePhysicalPath = parsePhysicalPath;
|
|
16
|
+
exports.modify = modify;
|
|
17
|
+
exports.resolveModulePath = resolveModulePath;
|
|
18
|
+
exports.resolveTsPath = resolveTsPath;
|
|
19
|
+
exports.normalizeRelativePath = normalizeRelativePath;
|
|
4
20
|
const tslib_1 = require("tslib");
|
|
5
21
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
6
22
|
const vite_1 = require("vite");
|
|
@@ -26,11 +42,9 @@ function getTsConfig() {
|
|
|
26
42
|
function isBundlePath(value) {
|
|
27
43
|
return ensureRelativePath(value).startsWith(exports.OMNIA_BUNDLE_REQUEST);
|
|
28
44
|
}
|
|
29
|
-
exports.isBundlePath = isBundlePath;
|
|
30
45
|
function isEsmPath(value) {
|
|
31
46
|
return ensureRelativePath(value).startsWith(exports.HMR_ESM_REQUEST);
|
|
32
47
|
}
|
|
33
|
-
exports.isEsmPath = isEsmPath;
|
|
34
48
|
function isSourceCodePath(value) {
|
|
35
49
|
const relativePath = ensureRelativePath(value);
|
|
36
50
|
const baseUrl = getTsConfig().compilerOptions.baseUrl;
|
|
@@ -39,33 +53,27 @@ function isSourceCodePath(value) {
|
|
|
39
53
|
}
|
|
40
54
|
return relativePath.startsWith(baseUrl) || relativePath.startsWith('.' + baseUrl);
|
|
41
55
|
}
|
|
42
|
-
exports.isSourceCodePath = isSourceCodePath;
|
|
43
56
|
function isJavaScriptSuperset(value) {
|
|
44
57
|
return value.endsWith('.ts')
|
|
45
58
|
|| value.endsWith('.tsx')
|
|
46
59
|
|| value.endsWith('.mjs');
|
|
47
60
|
}
|
|
48
|
-
exports.isJavaScriptSuperset = isJavaScriptSuperset;
|
|
49
61
|
function isTsPath(importPath) {
|
|
50
62
|
const configBaseUrl = getTsConfig().compilerOptions.baseUrl;
|
|
51
63
|
const hasBaseUrlImport = !!configBaseUrl ? !!resolveModulePath((0, vite_1.normalizePath)(path_1.default.join(envUtils.getRootDirPath(), configBaseUrl, importPath))) : false;
|
|
52
64
|
return hasBaseUrlImport || Object.keys(getTsConfig().compilerOptions.paths || {}).some(p => importPath.startsWith(p.replace('/*', '')));
|
|
53
65
|
}
|
|
54
|
-
exports.isTsPath = isTsPath;
|
|
55
66
|
function isNodeModulePath(value) {
|
|
56
67
|
const relativePath = ensureRelativePath(value);
|
|
57
68
|
return relativePath.startsWith('/node_modules') || relativePath.startsWith('./node_modules');
|
|
58
69
|
}
|
|
59
|
-
exports.isNodeModulePath = isNodeModulePath;
|
|
60
70
|
function isPublicDirPath(value) {
|
|
61
71
|
const relativePath = ensureRelativePath(value);
|
|
62
72
|
return relativePath.startsWith('/wwwroot') || relativePath.startsWith('./wwwroot');
|
|
63
73
|
}
|
|
64
|
-
exports.isPublicDirPath = isPublicDirPath;
|
|
65
74
|
function isImageFilePath(value) {
|
|
66
75
|
return value.endsWith('.svg');
|
|
67
76
|
}
|
|
68
|
-
exports.isImageFilePath = isImageFilePath;
|
|
69
77
|
function parseOmniaBundlePath(value) {
|
|
70
78
|
value = ensureRelativePath(value).replace(exports.OMNIA_BUNDLE_REQUEST, '');
|
|
71
79
|
if (value.startsWith('/')) {
|
|
@@ -80,7 +88,6 @@ function parseOmniaBundlePath(value) {
|
|
|
80
88
|
bundleFileExtension
|
|
81
89
|
};
|
|
82
90
|
}
|
|
83
|
-
exports.parseOmniaBundlePath = parseOmniaBundlePath;
|
|
84
91
|
function parseHmrEsmPath(value) {
|
|
85
92
|
value = ensureRelativePath(value).replace(exports.HMR_ESM_REQUEST, '');
|
|
86
93
|
if (value.startsWith('/')) {
|
|
@@ -94,7 +101,6 @@ function parseHmrEsmPath(value) {
|
|
|
94
101
|
fromWorker
|
|
95
102
|
};
|
|
96
103
|
}
|
|
97
|
-
exports.parseHmrEsmPath = parseHmrEsmPath;
|
|
98
104
|
function parseHmrDynamicBundlePath(value) {
|
|
99
105
|
value = ensureRelativePath(value).replace(exports.HMR_DYNAMIC_BUNDLE_REQUEST, '');
|
|
100
106
|
if (value.startsWith('/')) {
|
|
@@ -109,7 +115,6 @@ function parseHmrDynamicBundlePath(value) {
|
|
|
109
115
|
fromWorker
|
|
110
116
|
};
|
|
111
117
|
}
|
|
112
|
-
exports.parseHmrDynamicBundlePath = parseHmrDynamicBundlePath;
|
|
113
118
|
function parsePhysicalPath(value) {
|
|
114
119
|
value = ensureRelativePath(value);
|
|
115
120
|
if (value.startsWith('/')) {
|
|
@@ -122,7 +127,6 @@ function parsePhysicalPath(value) {
|
|
|
122
127
|
fromWorker
|
|
123
128
|
};
|
|
124
129
|
}
|
|
125
|
-
exports.parsePhysicalPath = parsePhysicalPath;
|
|
126
130
|
function modify(value) {
|
|
127
131
|
const builder = {
|
|
128
132
|
appendWorkerIdentifier(checker) {
|
|
@@ -143,7 +147,6 @@ function modify(value) {
|
|
|
143
147
|
};
|
|
144
148
|
return builder;
|
|
145
149
|
}
|
|
146
|
-
exports.modify = modify;
|
|
147
150
|
function resolveModulePath(modulePath, external) {
|
|
148
151
|
let pattern = null;
|
|
149
152
|
const path = modulePath.replace(/\\/g, '/');
|
|
@@ -185,7 +188,6 @@ function resolveModulePath(modulePath, external) {
|
|
|
185
188
|
console.error('Unknown module path: ' + result);
|
|
186
189
|
}
|
|
187
190
|
}
|
|
188
|
-
exports.resolveModulePath = resolveModulePath;
|
|
189
191
|
function resolveTsPath(importPath) {
|
|
190
192
|
const configBaseUrl = getTsConfig().compilerOptions.baseUrl;
|
|
191
193
|
const configPaths = getTsConfig().compilerOptions.paths;
|
|
@@ -220,14 +222,12 @@ function resolveTsPath(importPath) {
|
|
|
220
222
|
};
|
|
221
223
|
return loop();
|
|
222
224
|
}
|
|
223
|
-
exports.resolveTsPath = resolveTsPath;
|
|
224
225
|
function normalizeRelativePath(value) {
|
|
225
226
|
if (value.toLowerCase().replace(/\\/g, "/").indexOf(rootDirPathLowerCase) === 0) {
|
|
226
227
|
return value.substring(rootDirPathLowerCase.length);
|
|
227
228
|
}
|
|
228
229
|
return value;
|
|
229
230
|
}
|
|
230
|
-
exports.normalizeRelativePath = normalizeRelativePath;
|
|
231
231
|
function ensureRelativePath(value) {
|
|
232
232
|
if (path_1.default.isAbsolute(value)) {
|
|
233
233
|
value = value.replace(envUtils.getRootDirPath(), '/');
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.HMR_MODULE_EXPORTS_VARIABLE = void 0;
|
|
4
|
+
exports.injectDefaultImportVariableDecleration = injectDefaultImportVariableDecleration;
|
|
5
|
+
exports.wrapDefaultImportVariable = wrapDefaultImportVariable;
|
|
4
6
|
const DEFAULT_IMPORT_VARIABLE = '__hmr_default_import__';
|
|
5
7
|
const DEFAULT_IMPORT_VARIABLE_DECLERATION = `const ${DEFAULT_IMPORT_VARIABLE} = (val) => !!val['default'] ? val['default'] : val;`;
|
|
6
8
|
exports.HMR_MODULE_EXPORTS_VARIABLE = '__hmr_module_exports__';
|
|
@@ -10,8 +12,6 @@ function injectDefaultImportVariableDecleration(code) {
|
|
|
10
12
|
}
|
|
11
13
|
return code;
|
|
12
14
|
}
|
|
13
|
-
exports.injectDefaultImportVariableDecleration = injectDefaultImportVariableDecleration;
|
|
14
15
|
function wrapDefaultImportVariable(runtimeVariable) {
|
|
15
16
|
return `${DEFAULT_IMPORT_VARIABLE}(${runtimeVariable})`;
|
|
16
17
|
}
|
|
17
|
-
exports.wrapDefaultImportVariable = wrapDefaultImportVariable;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createWebpackConfig =
|
|
3
|
+
exports.createWebpackConfig = createWebpackConfig;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const envUtils = tslib_1.__importStar(require("./env"));
|
|
6
6
|
const bundler = tslib_1.__importStar(require("../../../tasks/bundle"));
|
|
@@ -40,4 +40,3 @@ function createWebpackConfig(entries, option) {
|
|
|
40
40
|
});
|
|
41
41
|
return configs;
|
|
42
42
|
}
|
|
43
|
-
exports.createWebpackConfig = createWebpackConfig;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transformVueJsx =
|
|
3
|
+
exports.transformVueJsx = transformVueJsx;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const node_crypto_1 = require("node:crypto");
|
|
6
6
|
const core_1 = require("@babel/core");
|
|
@@ -118,7 +118,6 @@ function transformVueJsx(code, id) {
|
|
|
118
118
|
map: result.map,
|
|
119
119
|
};
|
|
120
120
|
}
|
|
121
|
-
exports.transformVueJsx = transformVueJsx;
|
|
122
121
|
function parseComponentDecls(node, source) {
|
|
123
122
|
const names = [];
|
|
124
123
|
for (const decl of node.declarations) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createViteServer =
|
|
3
|
+
exports.createViteServer = createViteServer;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
6
6
|
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
@@ -49,7 +49,6 @@ async function createViteServer() {
|
|
|
49
49
|
tooling_1.utils.log(`Done hosting -> https://localhost:${hosting.port}`);
|
|
50
50
|
return server;
|
|
51
51
|
}
|
|
52
|
-
exports.createViteServer = createViteServer;
|
|
53
52
|
function getCert() {
|
|
54
53
|
return new Promise((resolve, reject) => {
|
|
55
54
|
let appPath = (0, appdata_path_1.default)();
|
|
@@ -84,10 +83,30 @@ function getCert() {
|
|
|
84
83
|
}
|
|
85
84
|
});
|
|
86
85
|
}
|
|
86
|
+
function generateCert() {
|
|
87
|
+
return new Promise((resolve, reject) => {
|
|
88
|
+
const spawn = require('child_process').spawn;
|
|
89
|
+
spawn('dotnet', [
|
|
90
|
+
'dev-certs',
|
|
91
|
+
'https',
|
|
92
|
+
'--clean'
|
|
93
|
+
], { stdio: 'inherit', })
|
|
94
|
+
.on('exit', (code) => {
|
|
95
|
+
spawn('dotnet', [
|
|
96
|
+
'dev-certs',
|
|
97
|
+
'https',
|
|
98
|
+
'--trust'
|
|
99
|
+
], { stdio: 'inherit', })
|
|
100
|
+
.on('exit', (code) => {
|
|
101
|
+
resolve();
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
}
|
|
87
106
|
tooling_1.core.registerCleanTask({
|
|
88
107
|
order: 2,
|
|
89
108
|
task: function () {
|
|
90
|
-
return new Promise(function (resolve, reject) {
|
|
109
|
+
return new Promise(async function (resolve, reject) {
|
|
91
110
|
let appPath = (0, appdata_path_1.default)();
|
|
92
111
|
let certFolderPath = path_1.default.join(appPath, "omnia", "https");
|
|
93
112
|
const certName = "devcert";
|
|
@@ -103,6 +122,7 @@ tooling_1.core.registerCleanTask({
|
|
|
103
122
|
force: true
|
|
104
123
|
});
|
|
105
124
|
}
|
|
125
|
+
// await generateCert();
|
|
106
126
|
resolve();
|
|
107
127
|
});
|
|
108
128
|
}
|