@omnia/tooling-vue 8.0.20-vnext → 8.0.21-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 -0
- package/internal-do-not-import-from-here/config/wctypings.d.ts +2213 -0
- package/internal-do-not-import-from-here/index.d.ts +3 -1
- package/internal-do-not-import-from-here/index.js +6 -2
- package/internal-do-not-import-from-here/shared.d.ts +32 -122
- package/internal-do-not-import-from-here/shared.js +97 -192
- package/internal-do-not-import-from-here/swc/extract-doc-plugin/package.json +14 -0
- package/internal-do-not-import-from-here/tasks/ComponentDocRegistrations.d.ts +1 -0
- package/internal-do-not-import-from-here/tasks/ComponentDocRegistrations.js +9 -0
- package/internal-do-not-import-from-here/tasks/bundle.d.ts +3 -4
- package/internal-do-not-import-from-here/tasks/bundle.js +264 -264
- package/internal-do-not-import-from-here/tasks/doc.d.ts +3 -1
- package/internal-do-not-import-from-here/tasks/doc.js +282 -395
- package/internal-do-not-import-from-here/tasks/vendor.js +166 -19
- package/internal-do-not-import-from-here/variables.d.ts +1 -1
- package/internal-do-not-import-from-here/variables.js +2 -2
- package/internal-do-not-import-from-here/vite/hmr/graph.js +5 -1
- package/internal-do-not-import-from-here/vite/hmr/manifest.js +5 -5
- package/internal-do-not-import-from-here/vite/hmr/runtime.js +5 -5
- package/internal-do-not-import-from-here/vite/hmr/transformers/internal/dynamicBundle.js +7 -1
- package/internal-do-not-import-from-here/vite/hmr/utils/manifest.js +3 -3
- package/internal-do-not-import-from-here/vite/hmr/utils/path.js +7 -6
- package/internal-do-not-import-from-here/vite/hmr/utils/webpack.js +2 -2
- package/internal-do-not-import-from-here/vite/index.js +4 -0
- package/internal-do-not-import-from-here/vite/middlewares/HmrMiddleware.js +8 -13
- package/internal-do-not-import-from-here/vite/middlewares/OmniaMiddleware.js +55 -17
- package/internal-do-not-import-from-here/vite/middlewares/StaticFileMiddleware.js +31 -10
- package/internal-do-not-import-from-here/vite/middlewares/WebpackMiddleware.js +1 -1
- package/internal-do-not-import-from-here/vite/plugins/OmniaPlugin.js +10 -2
- package/internal-do-not-import-from-here/wctypings.ts +0 -0
- package/internal-do-not-import-from-here/webpack-loaders/doc-loader.js +11 -0
- package/internal-do-not-import-from-here/webpack-loaders/ts-loader.d.ts +11 -4
- package/internal-do-not-import-from-here/webpack-loaders/ts-loader.js +12 -12
- package/internal-do-not-import-from-here/webpack-loaders/tsx-loader.d.ts +11 -1
- package/internal-do-not-import-from-here/webpack-loaders/tsx-loader.js +34 -29
- package/internal-do-not-import-from-here/webpack-loaders/wc-loader.d.ts +1 -0
- package/internal-do-not-import-from-here/webpack-loaders/wc-loader.js +11 -0
- package/package.json +12 -8
- package/internal-do-not-import-from-here/1cacb55c-202b-4cd7-819d-11bad92fa9cb.wcdefinitions.json +0 -1
- package/internal-do-not-import-from-here/1cacb55c-202b-4cd7-819d-11bad92fa9cb.wctypings.d.ts +0 -11
- package/internal-do-not-import-from-here/bb000000-0000-bbbb-0000-0000000000bb.wcdefinitions.json +0 -1
- package/internal-do-not-import-from-here/bb000000-0000-bbbb-0000-0000000000bb.wctypings.d.ts +0 -361
- package/internal-do-not-import-from-here/bb000000-0000-bbbb-0000-0000000000bb.wctypings.js +0 -2
- package/internal-do-not-import-from-here/cc000000-0000-cccc-0000-0000000000cc.wcdefinitions.json +0 -1
- package/internal-do-not-import-from-here/config/tsconfig.es2015.json +0 -21
- package/internal-do-not-import-from-here/webpack-loaders/esbuild-custom-loader.js +0 -13
- package/internal-do-not-import-from-here/webpack-loaders/jsx-loader.d.ts +0 -8
- package/internal-do-not-import-from-here/webpack-loaders/jsx-loader.js +0 -61
- package/internal-do-not-import-from-here/webpack-loaders/vue-tsx-hot-loader.d.ts +0 -1
- package/internal-do-not-import-from-here/webpack-loaders/vue-tsx-hot-loader.js +0 -44
- package/internal-do-not-import-from-here/webpack-loaders/wcmanifest-loader.d.ts +0 -1
- package/internal-do-not-import-from-here/webpack-loaders/wcmanifest-loader.js +0 -10
- /package/internal-do-not-import-from-here/{1cacb55c-202b-4cd7-819d-11bad92fa9cb.wctypings.js → config/wctypings.js} +0 -0
- /package/internal-do-not-import-from-here/webpack-loaders/{esbuild-custom-loader.d.ts → doc-loader.d.ts} +0 -0
|
@@ -3,11 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.registerOmniaMiddleware = exports.ManifestChangedMessage = exports.resolvableManifest = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const chokidar_1 = tslib_1.__importDefault(require("chokidar"));
|
|
6
|
+
const url_1 = tslib_1.__importDefault(require("url"));
|
|
6
7
|
const tooling_1 = require("@omnia/tooling");
|
|
7
8
|
const tooling_2 = require("@omnia/tooling");
|
|
8
9
|
const $ = tslib_1.__importStar(require("../../variables"));
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
const fx_models_1 = require("@omnia/fx-models");
|
|
11
|
+
const fsExtra = tslib_1.__importStar(require("fs-extra"));
|
|
12
|
+
let _middlewares = null;
|
|
13
|
+
let _server = null;
|
|
11
14
|
class ImplementManifestChangedMessage {
|
|
12
15
|
constructor() {
|
|
13
16
|
this._subcribers = [];
|
|
@@ -22,7 +25,8 @@ class ImplementManifestChangedMessage {
|
|
|
22
25
|
exports.resolvableManifest = null;
|
|
23
26
|
exports.ManifestChangedMessage = new ImplementManifestChangedMessage();
|
|
24
27
|
function registerOmniaMiddleware(server, hmr) {
|
|
25
|
-
|
|
28
|
+
_server = server;
|
|
29
|
+
_middlewares = server.middlewares;
|
|
26
30
|
server.middlewares.use('/omnia', function (req, res, next) {
|
|
27
31
|
ensureLoadManifest();
|
|
28
32
|
exports.resolvableManifest.promise.then(() => {
|
|
@@ -33,12 +37,9 @@ function registerOmniaMiddleware(server, hmr) {
|
|
|
33
37
|
res.setHeader('Content-Type', 'application/json');
|
|
34
38
|
res.end(JSON.stringify({ id: $.composers.ServiceManifestRegistry.getServiceInfo().id, hmr: hmr }));
|
|
35
39
|
});
|
|
36
|
-
server.middlewares.use('/omnia/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
//if (server.config.server.hmr) {
|
|
40
|
-
// manifestJson.groupedResouresAndComponents = [];
|
|
41
|
-
//}
|
|
40
|
+
server.middlewares.use('/omnia/manifest.json', function (req, res, next) {
|
|
41
|
+
const target = url_1.default.parse(req.url, true).query.target;
|
|
42
|
+
let manifestJson = JSON.parse(JSON.stringify($.tooling.composer.getManifestJsonByTarget(target)));
|
|
42
43
|
res.setHeader('Cache-Control', 'no-cache');
|
|
43
44
|
res.setHeader('Content-Type', 'application/json');
|
|
44
45
|
res.end(JSON.stringify({
|
|
@@ -46,6 +47,13 @@ function registerOmniaMiddleware(server, hmr) {
|
|
|
46
47
|
manifest: manifestJson
|
|
47
48
|
}));
|
|
48
49
|
});
|
|
50
|
+
server.middlewares.use('/omnia/localization', function (req, res, next) {
|
|
51
|
+
const target = url_1.default.parse(req.url, true).query.target;
|
|
52
|
+
let localizeObject = $.composers.getLocalizations();
|
|
53
|
+
res.setHeader('Cache-Control', 'no-cache');
|
|
54
|
+
res.setHeader('Content-Type', 'application/json');
|
|
55
|
+
res.end(JSON.stringify(localizeObject[target] || ""));
|
|
56
|
+
});
|
|
49
57
|
let watchManifests = chokidar_1.default.watch(["**/*.manifest.ts", "omnia.service.ts"], {
|
|
50
58
|
ignored: [/[\/\\]\./, '**/node_modules/**'],
|
|
51
59
|
persistent: true
|
|
@@ -53,12 +61,24 @@ function registerOmniaMiddleware(server, hmr) {
|
|
|
53
61
|
watchManifests.on('ready', function () {
|
|
54
62
|
watchManifests
|
|
55
63
|
.on('add', path => {
|
|
56
|
-
|
|
57
|
-
|
|
64
|
+
if (isLocalizeManifestFile(path)) {
|
|
65
|
+
$.tooling.utils.log(`Found localize manifest file added -> ${path}`);
|
|
66
|
+
rebuildLocalization(path);
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
$.tooling.utils.log(`Found manifest added -> ${path}`);
|
|
70
|
+
rebuildManifests();
|
|
71
|
+
}
|
|
58
72
|
})
|
|
59
73
|
.on('change', path => {
|
|
60
|
-
|
|
61
|
-
|
|
74
|
+
if (isLocalizeManifestFile(path)) {
|
|
75
|
+
$.tooling.utils.log(`Found localize manifest file changed -> ${path}`);
|
|
76
|
+
rebuildLocalization(path);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
$.tooling.utils.log(`Found manifest changed -> ${path}`);
|
|
80
|
+
rebuildManifests();
|
|
81
|
+
}
|
|
62
82
|
})
|
|
63
83
|
.on('unlink', path => {
|
|
64
84
|
$.tooling.utils.log(`Found manifest removed -> ${path}`);
|
|
@@ -70,6 +90,24 @@ function registerOmniaMiddleware(server, hmr) {
|
|
|
70
90
|
// setTimeout(ensureLoadManifest, 100);
|
|
71
91
|
}
|
|
72
92
|
exports.registerOmniaMiddleware = registerOmniaMiddleware;
|
|
93
|
+
function isLocalizeManifestFile(filePath) {
|
|
94
|
+
const content = fsExtra.readFileSync(filePath, 'utf8');
|
|
95
|
+
return content.indexOf(".registerLocalization") > -1;
|
|
96
|
+
}
|
|
97
|
+
function rebuildLocalization(filePath) {
|
|
98
|
+
try {
|
|
99
|
+
$.tooling.composer.processManifests([filePath]);
|
|
100
|
+
let localizeObject = $.composers.getLocalizations();
|
|
101
|
+
const payLoad = {
|
|
102
|
+
type: fx_models_1.LocalServingMessageType.LocalizeChanged,
|
|
103
|
+
data: localizeObject
|
|
104
|
+
};
|
|
105
|
+
_server.ws.send(payLoad);
|
|
106
|
+
}
|
|
107
|
+
catch (ex) {
|
|
108
|
+
// ignore ex because that already log error inside $.tooling.composer.processManifests
|
|
109
|
+
}
|
|
110
|
+
}
|
|
73
111
|
function rebuildManifests() {
|
|
74
112
|
tooling_1.utils.timeWatch("omniamiddleware_watchmanifest", () => {
|
|
75
113
|
if (exports.resolvableManifest) {
|
|
@@ -91,14 +129,14 @@ function rebuildManifests() {
|
|
|
91
129
|
tooling_1.utils.log(e, tooling_2.LogTypes.Error);
|
|
92
130
|
}
|
|
93
131
|
}
|
|
94
|
-
},
|
|
132
|
+
}, 100);
|
|
95
133
|
}
|
|
96
134
|
function ensureLoadManifest() {
|
|
97
|
-
if (
|
|
135
|
+
if (_middlewares && !exports.resolvableManifest) {
|
|
98
136
|
exports.resolvableManifest = new tooling_2.ResolvablePromise();
|
|
99
|
-
|
|
137
|
+
// ManifestChangedMessage.publish();
|
|
100
138
|
var tasks = tooling_1.core.getRegisteredServeTasks().filter(function (task) { return task.stage === tooling_1.core.TaskStage.AfterCreateServer; }).sort(sortTask) || [];
|
|
101
|
-
executeTasks(tasks,
|
|
139
|
+
executeTasks(tasks, _middlewares, () => {
|
|
102
140
|
exports.resolvableManifest.resolve();
|
|
103
141
|
}, err => {
|
|
104
142
|
exports.resolvableManifest.resolve();
|
|
@@ -6,9 +6,29 @@ const tooling_1 = require("@omnia/tooling");
|
|
|
6
6
|
const $ = tslib_1.__importStar(require("../../variables"));
|
|
7
7
|
const fx_models_1 = require("@omnia/fx-models");
|
|
8
8
|
const shared_1 = require("./shared");
|
|
9
|
+
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
9
10
|
function registerStaticFileMiddleware(server) {
|
|
10
|
-
server.middlewares.use(function (req, res, next) {
|
|
11
|
-
if (req.url.indexOf('/
|
|
11
|
+
server.middlewares.use(async function (req, res, next) {
|
|
12
|
+
if (req.url.indexOf('/api/uxdocs') === 0) {
|
|
13
|
+
if (req.method === "OPTIONS") {
|
|
14
|
+
res.end("OK");
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const rawReqToString = async (req) => {
|
|
18
|
+
const buffers = [];
|
|
19
|
+
for await (const chunk of req) {
|
|
20
|
+
buffers.push(chunk);
|
|
21
|
+
}
|
|
22
|
+
return Buffer.concat(buffers).toString();
|
|
23
|
+
};
|
|
24
|
+
const jsonString = await rawReqToString(req);
|
|
25
|
+
const jsonObject = JSON.parse(jsonString);
|
|
26
|
+
const fileUrl = `wwwroot/docs/${jsonObject.relativePath}`;
|
|
27
|
+
console.log(fileUrl);
|
|
28
|
+
const content = fs_1.default.readFileSync(fileUrl, 'utf8');
|
|
29
|
+
res.end(content);
|
|
30
|
+
}
|
|
31
|
+
else if (req.url.indexOf('/omnia/fonts/') === 0 || req.url.indexOf('/omnia/images/') === 0) {
|
|
12
32
|
res.setHeader('Cache-Control', 'public, max-age=31536000');
|
|
13
33
|
req.url = req.url.replace("/omnia/", "/omnia/dist/");
|
|
14
34
|
next();
|
|
@@ -28,15 +48,16 @@ function registerStaticFileMiddleware(server) {
|
|
|
28
48
|
res.setHeader('content-type', 'application/x-javascript');
|
|
29
49
|
let localizeObject = $.composers.getLocalizations();
|
|
30
50
|
res.end(`
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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"]["` + fx_models_1.OmniaResourceManifests.FxCore.toString() + `"]("97786ea9-4861-48bd-8a57-eae9bbdb4892").ServiceContainer;
|
|
53
|
+
const omniaCtx = container.createInstance(OmniaContext);
|
|
54
|
+
const useLocalizationStore = omniaWebpackJsonp["bb000000-0000-bbbb-0000-0000000000bb"]["` + fx_models_1.OmniaResourceManifests.Fx.toString() + `"]("5e618f4d-d014-414e-a681-89e34cbeda0f").useLocalizationStore;
|
|
55
|
+
const localizeStore = container.createInstance(useLocalizationStore);
|
|
56
|
+
const currentCulture = omniaCtx.language.toLowerCase();
|
|
57
|
+
const loc = JSON.parse('${JSON.stringify(localizeObject).replace(/'/g, "\\'").replace(/\\"/g, "\\\\\"")}');
|
|
37
58
|
|
|
38
|
-
|
|
39
|
-
|
|
59
|
+
localizeStore.actions.merge(loc['en-us'] || {}); // add default english
|
|
60
|
+
localizeStore.actions.merge(loc[currentCulture] || {});
|
|
40
61
|
`);
|
|
41
62
|
}
|
|
42
63
|
else {
|
|
@@ -94,7 +94,7 @@ function registerWebpackMiddleWareBundle(entries) {
|
|
|
94
94
|
if (manifestId) {
|
|
95
95
|
let manifest = $.tooling.composer.getManifestById(manifestId);
|
|
96
96
|
if (manifest) {
|
|
97
|
-
let manifestsData = $.tooling.composer.
|
|
97
|
+
let manifestsData = $.tooling.composer.getManifestsJson();
|
|
98
98
|
let bundleType = path_1.default.extname(filePath).replace('.', '');
|
|
99
99
|
manifest.version = manifest.version || {};
|
|
100
100
|
manifest.version[bundleType] = $.tooling.utils.generateGuid().replace(/-/g, '');
|
|
@@ -17,10 +17,10 @@ function omniaPlugin(options) {
|
|
|
17
17
|
// 'vue-tsx-support/lib/vca': 'vue-tsx-support/dist/esm/vca.js',
|
|
18
18
|
// 'vue-tsx-support/lib/api': 'vue-tsx-support/dist/esm/api.js',
|
|
19
19
|
'csx': 'csx/lib.es2015/index.js',
|
|
20
|
-
'vue': 'vue/dist/vue.esm-bundler.js',
|
|
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',
|
|
@@ -67,7 +67,15 @@ function omniaPlugin(options) {
|
|
|
67
67
|
server.middlewares.use(async (req, res, next) => {
|
|
68
68
|
res.setHeader('Access-Control-Allow-Origin', req.headers['origin'] || '*');
|
|
69
69
|
res.setHeader('Access-Control-Allow-Credentials', 'true');
|
|
70
|
+
res.setHeader('Access-Control-Request-Private-Network', 'true');
|
|
71
|
+
res.setHeader('Access-Control-Request-Method', '*');
|
|
70
72
|
res.setHeader('Access-Control-Allow-Headers', '*');
|
|
73
|
+
if (req.method === "OPTIONS") {
|
|
74
|
+
res.setHeader('Access-Control-Max-Age', 31536000);
|
|
75
|
+
// res.setHeader('Cache-Control', 'public, max-age=31536000');
|
|
76
|
+
res.end("OK");
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
71
79
|
next();
|
|
72
80
|
});
|
|
73
81
|
(0, middlewares_1.registerOmniaMiddleware)(server, hosting.hmr);
|
|
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,13 +1,20 @@
|
|
|
1
|
-
export default function (
|
|
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;
|
|
10
7
|
target: string;
|
|
8
|
+
tsconfigRaw: {
|
|
9
|
+
compilerOptions: {
|
|
10
|
+
jsx: string;
|
|
11
|
+
target: string;
|
|
12
|
+
useDefineForClassFields: boolean;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
11
15
|
};
|
|
16
|
+
} | {
|
|
17
|
+
loader: any;
|
|
18
|
+
options?: undefined;
|
|
12
19
|
})[];
|
|
13
20
|
}[];
|
|
@@ -3,26 +3,26 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const $ = tslib_1.__importStar(require("../variables"));
|
|
5
5
|
var path = require('path');
|
|
6
|
-
function default_1(
|
|
7
|
-
var tsLoaderOptions = {
|
|
8
|
-
happyPackMode: true,
|
|
9
|
-
transpileOnly: true
|
|
10
|
-
};
|
|
11
|
-
if (treeshaking) {
|
|
12
|
-
tsLoaderOptions.configFile = path.resolve(__dirname, "../config/tsconfig.es2015.json");
|
|
13
|
-
}
|
|
6
|
+
function default_1() {
|
|
14
7
|
return [{
|
|
15
8
|
test: /\.ts$/,
|
|
16
9
|
use: [
|
|
17
|
-
{
|
|
18
|
-
loader: path.resolve(__dirname, $.isExtensionEnv ? './esbuild-custom-loader.js' : './esbuild-custom-loader.ts'),
|
|
19
|
-
},
|
|
20
10
|
{
|
|
21
11
|
loader: 'esbuild-loader',
|
|
22
12
|
options: {
|
|
23
13
|
loader: 'ts',
|
|
24
|
-
target: '
|
|
14
|
+
target: 'es2020',
|
|
15
|
+
tsconfigRaw: {
|
|
16
|
+
compilerOptions: {
|
|
17
|
+
jsx: "preserve",
|
|
18
|
+
target: "es2020",
|
|
19
|
+
useDefineForClassFields: false
|
|
20
|
+
}
|
|
21
|
+
}
|
|
25
22
|
},
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
loader: path.resolve(__dirname, $.isExtensionEnv ? './doc-loader.js' : './doc-loader.ts'),
|
|
26
26
|
}
|
|
27
27
|
]
|
|
28
28
|
}];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export default function (
|
|
1
|
+
export default function (): {
|
|
2
2
|
test: RegExp;
|
|
3
3
|
exclude: RegExp;
|
|
4
4
|
use: ({
|
|
@@ -14,6 +14,16 @@ export default function (treeshaking: any, wcDomProps: any, hotModuleReload?: an
|
|
|
14
14
|
loader: string;
|
|
15
15
|
target: string;
|
|
16
16
|
jsx: string;
|
|
17
|
+
tsconfigRaw: {
|
|
18
|
+
compilerOptions: {
|
|
19
|
+
jsx: string;
|
|
20
|
+
target: string;
|
|
21
|
+
useDefineForClassFields: boolean;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
17
24
|
};
|
|
25
|
+
} | {
|
|
26
|
+
loader: any;
|
|
27
|
+
options?: undefined;
|
|
18
28
|
})[];
|
|
19
29
|
}[];
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
var path = require('path');
|
|
5
5
|
const $ = tslib_1.__importStar(require("../variables"));
|
|
6
|
-
function default_1(
|
|
6
|
+
function default_1() {
|
|
7
7
|
const babelLoaderOptions = {
|
|
8
8
|
cacheDirectory: true,
|
|
9
9
|
plugins: [
|
|
@@ -21,46 +21,51 @@ function default_1(treeshaking, wcDomProps, hotModuleReload) {
|
|
|
21
21
|
],
|
|
22
22
|
]
|
|
23
23
|
};
|
|
24
|
-
var tsLoaderOptions = {
|
|
25
|
-
happyPackMode: true,
|
|
26
|
-
transpileOnly: true
|
|
27
|
-
};
|
|
28
|
-
if (treeshaking) {
|
|
29
|
-
tsLoaderOptions.configFile = path.resolve(__dirname, "../config/tsconfig.es2015.json");
|
|
30
|
-
}
|
|
31
24
|
let loaders = [
|
|
32
|
-
//{
|
|
33
|
-
// loader: 'thread-loader',
|
|
34
|
-
// options: {
|
|
35
|
-
// workers: require('os').cpus().length,
|
|
36
|
-
// },
|
|
37
|
-
//},
|
|
38
25
|
{
|
|
39
26
|
loader: 'babel-loader',
|
|
40
27
|
options: babelLoaderOptions
|
|
41
28
|
},
|
|
42
|
-
//{
|
|
43
|
-
//
|
|
44
|
-
//
|
|
45
|
-
//
|
|
29
|
+
// {
|
|
30
|
+
// loader: "swc-loader",
|
|
31
|
+
// options: {
|
|
32
|
+
// jsc: {
|
|
33
|
+
// // parser: {
|
|
34
|
+
// // syntax: "typescript"
|
|
35
|
+
// // }
|
|
36
|
+
// // This makes swc-loader invoke swc synchronously.
|
|
37
|
+
// //sync: true,
|
|
38
|
+
// parser: {
|
|
39
|
+
// // "syntax": "ecmascript",
|
|
40
|
+
// // "jsx": true
|
|
41
|
+
// "syntax": "typescript",
|
|
42
|
+
// "tsx": true,
|
|
43
|
+
// },
|
|
44
|
+
// experimental: {
|
|
45
|
+
// plugins: [["swc-plugin-vue-jsx", {}]]
|
|
46
|
+
// }
|
|
47
|
+
// }
|
|
48
|
+
// }
|
|
49
|
+
// },
|
|
46
50
|
{
|
|
47
51
|
loader: 'esbuild-loader',
|
|
48
52
|
options: {
|
|
49
53
|
loader: 'tsx',
|
|
50
|
-
target: '
|
|
51
|
-
jsx: 'preserve'
|
|
54
|
+
target: 'es2020',
|
|
55
|
+
jsx: 'preserve',
|
|
56
|
+
tsconfigRaw: {
|
|
57
|
+
compilerOptions: {
|
|
58
|
+
jsx: "preserve",
|
|
59
|
+
target: "es2020",
|
|
60
|
+
useDefineForClassFields: false
|
|
61
|
+
}
|
|
62
|
+
}
|
|
52
63
|
},
|
|
53
64
|
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
// }
|
|
65
|
+
{
|
|
66
|
+
loader: path.resolve(__dirname, $.isExtensionEnv ? './wc-loader.js' : './wc-loader.ts'),
|
|
67
|
+
}
|
|
58
68
|
];
|
|
59
|
-
if (hotModuleReload) {
|
|
60
|
-
loaders.push({
|
|
61
|
-
loader: path.resolve(__dirname, __dirname, $.isExtensionEnv ? './vue-tsx-hot-loader.js' : './vue-tsx-hot-loader.ts'),
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
69
|
return [
|
|
65
70
|
{
|
|
66
71
|
test: /\.tsx$/,
|
|
@@ -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.
|
|
4
|
+
"version": "8.0.21-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.21-dev",
|
|
23
|
+
"@omnia/tooling-composers": "8.0.21-dev",
|
|
24
24
|
"@types/mousetrap": "1.5.34",
|
|
25
25
|
"@types/quill": "1.3.6",
|
|
26
26
|
"@types/zepto": "1.0.29",
|
|
@@ -32,11 +32,12 @@
|
|
|
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
|
-
"terser": "5.
|
|
37
|
+
"terser": "5.17.1",
|
|
37
38
|
"less-loader": "10.2.0",
|
|
38
39
|
"mini-css-extract-plugin": "1.3.3",
|
|
39
|
-
"postcss-loader": "
|
|
40
|
+
"postcss-loader": "7.2.4",
|
|
40
41
|
"postcss-prefix-selector": "1.14.0",
|
|
41
42
|
"sass": "1.43.4",
|
|
42
43
|
"sass-loader": "12.3.0",
|
|
@@ -45,19 +46,22 @@
|
|
|
45
46
|
"prettier": "1.17.0",
|
|
46
47
|
"typestyle": "2.4.0",
|
|
47
48
|
"url-loader": "4.1.1",
|
|
48
|
-
"webpack": "5.
|
|
49
|
+
"webpack": "5.82.0",
|
|
49
50
|
"webpack-core": "0.6.9",
|
|
50
51
|
"webpack-dev-middleware": "5.3.1",
|
|
51
52
|
"webpack-merge": "5.8.0",
|
|
52
53
|
"zepto-webpack": "1.2.1",
|
|
54
|
+
"@swc/core": "1.3.52",
|
|
53
55
|
"md5-file": "3.2.3",
|
|
54
56
|
"csx": "8.5.0",
|
|
55
57
|
"es6-promise": "4.2.4",
|
|
56
58
|
"hash-sum": "1.0.2",
|
|
57
59
|
"lodash": "4.17.21",
|
|
58
|
-
"vite": "4.
|
|
60
|
+
"vite": "4.4.1",
|
|
61
|
+
"vite-plugin-inspect": "0.7.32",
|
|
59
62
|
"appdata-path": "1.0.0",
|
|
60
|
-
"json-parse-better-errors": "1.0.2"
|
|
63
|
+
"json-parse-better-errors": "1.0.2",
|
|
64
|
+
"url": "0.11.0"
|
|
61
65
|
},
|
|
62
66
|
"bugs": {
|
|
63
67
|
"url": "https://github.com/preciofishbone/OmniaFx/issues"
|
package/internal-do-not-import-from-here/1cacb55c-202b-4cd7-819d-11bad92fa9cb.wcdefinitions.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
package/internal-do-not-import-from-here/bb000000-0000-bbbb-0000-0000000000bb.wcdefinitions.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"omfx-enterpriseproperties-taxonomyfield-value-definition":["availableParents"],"omfx-sp-language-picker":["valueBind","onValueChanged","scopedSlots","styles"],"omfx-targeting-filter":["filter","onFilterChanged","fullWidth"],"omfx-term-picker":["startWithIds","termSetId","preSelectedTermIds","lcid","onTermsSelected","filterOptions","validator","description"],"omfx-termset-picker":["termSetId","onChanged"],"omnia-fx-spfx-wp-settings":["onClosed","onChange"],"omfx-queryable-enterpriseproperties":["serviceId","additionalBuiltInProperties"],"omfx-app-instance-delete-blade":["appInstance","handleClose","handleDeleteCompleted"],"omfx-appinstance-editing-journey":["appInstance","content","onCanceled","onSave","onCompleted"],"omfx-app-instance-permission-blade":["appInstance","handleClose","onAppPermissionsUpdated"],"omfx-app-instance-information-step":["context","registerOnGoToNext","registerOnGoToPrev"],"omfx-app-instance-users-step":["context","registerOnGoToNext","registerOnGoToPrev"],"omfx-app-instance-enterprise-step":["context","registerOnGoToNext","registerOnGoToPrev"],"omfx-app-provisioning-wizard":["initialAppTemplate","initialAppDefinition","initialAppInstance","onInstancePropertiesChanged","onProvisioningStarted","onProvisioningCompleted","styles","templatesToShow"],"omfx-button":["preset","icon","tooltip","size","mode","styles","onClick"],"omfx-color-picker":["display","valueBind","onValueChanged","errorMessages","validator","attachedToParent"],"omfx-confirm-dialog":["dialogOptions","onClose","styles","icon"],"omfx-connected-tenant":["onValueChanged","scopedSlots"],"omfx-context-language-picker":["onValueChanged","scopedSlots"],"omfx-datatable":["items","header","onSort","renderItem","onPaging","scrollElementSelector"],"omfx-date-time-picker":["valueBind","onValueChanged","formatter","description"],"omfx-enterpriseproperties-datetimefield-display":["settings"],"omfx-enterpriseproperty-picker":["preSelectedPropertyInternalName","propertyItems","externalPropertyItems","onChange","requiredWithValidator"],"omfx-enterprisepropertyset-picker":["preSelectedPropertySetId","propertySetItems","onChange","requiredWithValidator"],"omfx-features-journey":["onInstanceClosed"],"omfx-file-uploader":["onFileChanged","limitedFileTypes"],"omfx-numeric-indicator":["clickCallback","valueBind","label","style"],"omfx-barchart-indicator":["clickCallback","loadData","hasData","chartValues"],"omfx-heading":["styles","onChange"],"omfx-icon":["valueBind","styles","iconAttrs"],"omfx-icon-picker":["valueBind","onValueChanged","errorMessages","validator"],"omfx-iframe":["js","html","css","iframeHeight","iframeCustomStyle"],"omfx-media-imagegrid":["images","onImageSelected"],"omfx-input-language-picker":["multilingualContext"],"omfx-journey":["onInstanceCreated","onInstanceClosed","blades"],"omfx-language-picker":["valueBind","onValueChanged","scopedSlots","styles","loadLanguage"],"omfx-media-picker-image":["image","imageStyle"],"omfx-media-picker-video":["video"],"omfx-multilingual-input":["valueBind","richTextSettings","requiredWithValidator","onValueChanged"],"omfx-organizationtree":["valueBind","onNewUserSelected"],"omfx-reportees":["users","manager","onUserClick"],"omfx-permission-input":["settings","contextParams"],"omfx-persona":["largeImage","linkToProfilecard","highlight","user","onUserClick"],"omfx-post-component":["richTextSettings","cardStyle","showMoreSize","styles","allowLikes","enableMention","customSlots"],"omfx-aboutuser":["user"],"omfx-profilecard":["user","scopedSlots","appendToBody"],"omfx-profilecard-dialog":["user"],"omfx-rich-text-editor":["onContentChange","onContentDataChange","onInstanceCreated"],"omfx-rich-text-editor-renderer":["editorContent"],"omfx-rollup-empty":["text","renderingMode"],"omfx-rollup-filter":["valueBind","onFilterChange","useRollupFilterRouter"],"omfx-security-trimer":["content","alternativeContent","roles"],"omfx-settings-pane":["valueBind","onCancel","onSave"],"omfx-comment-component":["topicId","comments","template","dynamicInput","richTextSettings","enableBestReply","canMarkBestReply","sortOrder","allowLikes","cardStyle","showMoreSize","additionalRoles"],"omfx-people-tagging-component":["content","disabled","richTextSettings","enableMention","contentChanged","mentionChanged","resetContetnRte"],"omfx-like-component":["topicId","commendId","commentLikeService","likes","likeListingTemplate","extendComponents"],"omfx-like-listing-template":["likes","socialReactionStylings","currentSocialReaction","close"],"omfx-template-picker":["valueBind","templates","onValueChanged"],"omfx-text-translator":["onTranslateCompleted"],"omfx-themedefinition-editor":["hideBodySettings","hideChromeSettings","hideBorderSettings","valueBind","onValueChanged","attachedToParent"],"omfx-timezone-picker":["valueBind","onValueChanged","scopedSlots","styles"],"omfx-url-input":["valueBind","requiredWithValidator","onValueChanged","onBlur"],"omfx-field-validation":["useValidator","checkValue","rules","getCheckValue"],"omfx-wizard":["styles","onInstanceCreated","steps"]}
|