@omnia/tooling-vue 8.0.13-vnext → 8.0.14-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 (59) 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 +2122 -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 +32 -127
  7. package/internal-do-not-import-from-here/shared.js +97 -207
  8. package/internal-do-not-import-from-here/swc/extract-doc-plugin/package.json +14 -0
  9. package/internal-do-not-import-from-here/tasks/ComponentDocRegistrations.d.ts +1 -0
  10. package/internal-do-not-import-from-here/tasks/ComponentDocRegistrations.js +9 -0
  11. package/internal-do-not-import-from-here/tasks/bundle.d.ts +3 -4
  12. package/internal-do-not-import-from-here/tasks/bundle.js +268 -297
  13. package/internal-do-not-import-from-here/tasks/doc.d.ts +3 -1
  14. package/internal-do-not-import-from-here/tasks/doc.js +282 -395
  15. package/internal-do-not-import-from-here/tasks/tsc.js +1 -0
  16. package/internal-do-not-import-from-here/tasks/vendor.js +166 -19
  17. package/internal-do-not-import-from-here/variables.d.ts +1 -1
  18. package/internal-do-not-import-from-here/variables.js +2 -2
  19. package/internal-do-not-import-from-here/vite/hmr/graph.js +5 -1
  20. package/internal-do-not-import-from-here/vite/hmr/manifest.js +5 -5
  21. package/internal-do-not-import-from-here/vite/hmr/runtime.js +5 -5
  22. package/internal-do-not-import-from-here/vite/hmr/transformers/importPath.js +9 -5
  23. package/internal-do-not-import-from-here/vite/hmr/transformers/internal/dynamicBundle.js +64 -24
  24. package/internal-do-not-import-from-here/vite/hmr/transformers/vendorImportPath.d.ts +4 -0
  25. package/internal-do-not-import-from-here/vite/hmr/transformers/vendorImportPath.js +2 -1
  26. package/internal-do-not-import-from-here/vite/hmr/utils/manifest.js +3 -3
  27. package/internal-do-not-import-from-here/vite/hmr/utils/path.js +7 -6
  28. package/internal-do-not-import-from-here/vite/hmr/utils/webpack.js +8 -3
  29. package/internal-do-not-import-from-here/vite/index.js +4 -0
  30. package/internal-do-not-import-from-here/vite/middlewares/HmrMiddleware.js +8 -13
  31. package/internal-do-not-import-from-here/vite/middlewares/OmniaMiddleware.js +55 -17
  32. package/internal-do-not-import-from-here/vite/middlewares/StaticFileMiddleware.js +31 -10
  33. package/internal-do-not-import-from-here/vite/middlewares/WebpackMiddleware.js +1 -1
  34. package/internal-do-not-import-from-here/vite/plugins/OmniaPlugin.js +39 -21
  35. package/internal-do-not-import-from-here/wctypings.ts +0 -0
  36. package/internal-do-not-import-from-here/webpack-loaders/doc-loader.js +11 -0
  37. package/internal-do-not-import-from-here/webpack-loaders/ts-loader.d.ts +11 -4
  38. package/internal-do-not-import-from-here/webpack-loaders/ts-loader.js +12 -12
  39. package/internal-do-not-import-from-here/webpack-loaders/tsx-loader.d.ts +11 -1
  40. package/internal-do-not-import-from-here/webpack-loaders/tsx-loader.js +34 -29
  41. package/internal-do-not-import-from-here/webpack-loaders/wc-loader.d.ts +1 -0
  42. package/internal-do-not-import-from-here/webpack-loaders/wc-loader.js +11 -0
  43. package/package.json +13 -9
  44. package/internal-do-not-import-from-here/1cacb55c-202b-4cd7-819d-11bad92fa9cb.wcdefinitions.json +0 -1
  45. package/internal-do-not-import-from-here/1cacb55c-202b-4cd7-819d-11bad92fa9cb.wctypings.d.ts +0 -11
  46. package/internal-do-not-import-from-here/bb000000-0000-bbbb-0000-0000000000bb.wcdefinitions.json +0 -1
  47. package/internal-do-not-import-from-here/bb000000-0000-bbbb-0000-0000000000bb.wctypings.d.ts +0 -317
  48. package/internal-do-not-import-from-here/bb000000-0000-bbbb-0000-0000000000bb.wctypings.js +0 -2
  49. package/internal-do-not-import-from-here/cc000000-0000-cccc-0000-0000000000cc.wcdefinitions.json +0 -1
  50. package/internal-do-not-import-from-here/config/tsconfig.es2015.json +0 -21
  51. package/internal-do-not-import-from-here/webpack-loaders/esbuild-custom-loader.js +0 -13
  52. package/internal-do-not-import-from-here/webpack-loaders/jsx-loader.d.ts +0 -8
  53. package/internal-do-not-import-from-here/webpack-loaders/jsx-loader.js +0 -61
  54. package/internal-do-not-import-from-here/webpack-loaders/vue-tsx-hot-loader.d.ts +0 -1
  55. package/internal-do-not-import-from-here/webpack-loaders/vue-tsx-hot-loader.js +0 -44
  56. package/internal-do-not-import-from-here/webpack-loaders/wcmanifest-loader.d.ts +0 -1
  57. package/internal-do-not-import-from-here/webpack-loaders/wcmanifest-loader.js +0 -10
  58. /package/internal-do-not-import-from-here/{1cacb55c-202b-4cd7-819d-11bad92fa9cb.wctypings.js → config/wctypings.js} +0 -0
  59. /package/internal-do-not-import-from-here/webpack-loaders/{esbuild-custom-loader.d.ts → doc-loader.d.ts} +0 -0
@@ -1 +1,3 @@
1
- export { registerManifestsReference, registerWebComponentDefinitions } from "./tasks/bundle";
1
+ export { registerManifestsReference } from "./tasks/bundle";
2
+ export { registerOutputInfo } from "./shared";
3
+ export declare function registerWebComponentDefinitions(): void;
@@ -1,6 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.registerWebComponentDefinitions = exports.registerManifestsReference = void 0;
3
+ exports.registerWebComponentDefinitions = exports.registerOutputInfo = exports.registerManifestsReference = void 0;
4
4
  var bundle_1 = require("./tasks/bundle");
5
5
  Object.defineProperty(exports, "registerManifestsReference", { enumerable: true, get: function () { return bundle_1.registerManifestsReference; } });
6
- Object.defineProperty(exports, "registerWebComponentDefinitions", { enumerable: true, get: function () { return bundle_1.registerWebComponentDefinitions; } });
6
+ var shared_1 = require("./shared");
7
+ Object.defineProperty(exports, "registerOutputInfo", { enumerable: true, get: function () { return shared_1.registerOutputInfo; } });
8
+ // will remove legacy function when update all core extension packages
9
+ function registerWebComponentDefinitions() { }
10
+ exports.registerWebComponentDefinitions = registerWebComponentDefinitions;
@@ -1,136 +1,41 @@
1
- export declare function getBaseWebpackConfigForManifestMetadata(entry: any, bundleOutputDir: any, wcDomProps: any, enableTreeShaking?: boolean): {
2
- devtool: boolean;
3
- mode: string;
4
- context: any;
5
- entry: any;
6
- optimization: any;
7
- resolve: {
8
- modules: string[];
9
- extensions: string[];
10
- symlinks: boolean;
11
- cacheWithContext: boolean;
12
- descriptionFiles: string[];
13
- alias: Object & {
14
- tiptap$: string;
15
- 'tiptap-utils$': string;
16
- 'tiptap-extensions$': string;
17
- 'tiptap-commands$': string;
18
- axios$: string;
19
- typestyle$: string;
20
- vue$: string;
21
- 'rope-sequence$': string;
22
- 'w3c-keyname$': any;
23
- orderedmap$: string;
24
- '@microsoft/signalr': string;
1
+ import { WebComponentOptions } from '@omnia/tooling-composers';
2
+ export interface WebComponentOptionsExtends extends WebComponentOptions {
3
+ entryPointPath: string;
4
+ }
5
+ export type OutputInfo = {
6
+ wc: {
7
+ namespace: string;
8
+ mappings: {
9
+ [element: string]: string;
25
10
  };
26
11
  };
27
- output: {
28
- pathinfo: boolean;
29
- path: any;
30
- filename: string;
31
- };
32
- externals: (({ context, request }: {
33
- context: any;
34
- request: any;
35
- }, callback: any) => any)[];
36
- module: {
37
- noParse: RegExp;
38
- rules: ({
39
- test: RegExp;
40
- use: ({
41
- loader: any;
42
- options?: undefined;
43
- } | {
44
- loader: string;
45
- options: {
46
- loader: string;
47
- target: string;
48
- };
49
- })[];
50
- } | {
51
- test: RegExp;
52
- exclude: RegExp;
53
- use: ({
54
- loader: string;
55
- options: {
56
- cacheDirectory: boolean;
57
- plugins: any[];
58
- presets: string[][];
59
- };
60
- } | {
61
- loader: string;
62
- options: {
63
- loader: string;
64
- target: string;
65
- jsx: string;
66
- };
67
- })[];
68
- } | {
69
- test: RegExp;
70
- resolve: {
71
- fullySpecified: boolean;
72
- };
73
- exclude?: undefined;
74
- use?: undefined;
75
- loader?: undefined;
76
- } | {
77
- test: RegExp;
78
- exclude: RegExp;
79
- use: {
80
- loader: string;
81
- options: {
82
- cacheDirectory: boolean;
83
- plugins: string[];
84
- };
85
- }[];
86
- resolve?: undefined;
87
- loader?: undefined;
88
- } | {
89
- test: RegExp;
90
- use: string[];
91
- resolve?: undefined;
92
- exclude?: undefined;
93
- loader?: undefined;
94
- } | {
95
- test: RegExp;
96
- use: {
97
- loader: string;
98
- options: {
99
- implementation: any;
100
- sassOptions: {
101
- indentedSyntax: boolean;
102
- };
103
- };
104
- }[];
105
- resolve?: undefined;
106
- exclude?: undefined;
107
- loader?: undefined;
108
- } | {
109
- test: RegExp;
110
- loader: string;
111
- resolve?: undefined;
112
- exclude?: undefined;
113
- use?: undefined;
114
- } | {
115
- test: RegExp;
116
- use: {
117
- loader: string;
118
- options: {
119
- name: string;
120
- outputPath: string;
121
- publicPath: string;
122
- };
123
- }[];
124
- resolve?: undefined;
125
- exclude?: undefined;
126
- loader?: undefined;
127
- })[];
128
- };
129
12
  };
130
- export declare function convertManifestPathToEntryPath(pathToManifest: any, pathsInManifest: Array<string>): any;
13
+ export declare const isExtensionEnv: boolean;
14
+ export declare function getBuildOption(): import("@omnia/tooling-composers").BuildOptions;
15
+ export declare function registerOutputInfo(info: OutputInfo): void;
16
+ export declare function modifyComponent(content: string, filePath: string): string;
17
+ export declare function convertManifestPathToEntryPath(pathToManifest: any, pathsInManifest: Array<string>): string[];
131
18
  export declare const buildContext: {
132
19
  isManifestsChanged: boolean;
133
20
  };
134
21
  export declare var cacheKeys: {
135
22
  bundleManifests: string;
136
23
  };
24
+ export declare class ConfigurationManager {
25
+ private static _webComponentTypings;
26
+ private static _outputInfoManagaer;
27
+ static get webComponentTypings(): WebComponentTypingsManagaer;
28
+ static get outputInfo(): OutputInfoManagaer;
29
+ }
30
+ declare class OutputInfoManagaer {
31
+ private filePath;
32
+ private _value;
33
+ update(value: OutputInfo): void;
34
+ get(): OutputInfo;
35
+ }
36
+ declare class WebComponentTypingsManagaer {
37
+ private filePath;
38
+ update(value: string): void;
39
+ delete(): void;
40
+ }
41
+ export {};
@@ -1,222 +1,61 @@
1
1
  'use strict';
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.cacheKeys = exports.buildContext = exports.convertManifestPathToEntryPath = exports.getBaseWebpackConfigForManifestMetadata = void 0;
3
+ exports.ConfigurationManager = exports.cacheKeys = exports.buildContext = exports.convertManifestPathToEntryPath = exports.modifyComponent = exports.registerOutputInfo = exports.getBuildOption = exports.isExtensionEnv = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const globby = tslib_1.__importStar(require("globby"));
6
- const $ = tslib_1.__importStar(require("./variables"));
7
- const ts_loader_1 = tslib_1.__importDefault(require("./webpack-loaders/ts-loader"));
8
- const tsx_loader_1 = tslib_1.__importDefault(require("./webpack-loaders/tsx-loader"));
9
- function getBaseWebpackConfigForManifestMetadata(entry, bundleOutputDir, wcDomProps, enableTreeShaking = false) {
10
- return {
11
- devtool: false,
12
- mode: 'development',
13
- context: $.tooling.utils.root(""),
14
- entry: entry,
15
- //cache: {
16
- // type: "filesystem"
17
- //},
18
- //performance: {
19
- // hints: 'error',
20
- // maxEntrypointSize: 10000000,
21
- // maxAssetSize: 10000000 // ~ 10Mb
22
- //},
23
- //stats: 'errors-only',
24
- //stats: {
25
- // //all: false,
26
- // ////modules: true,
27
- // //maxModules: 0,
28
- // //errors: true,
29
- // warnings: false,
30
- // //moduleTrace: true,
31
- // //errorDetails: true
32
- //},
33
- //ignoreWarnings: [
34
- // {
35
- // module: /DEP_WEBPACK_MODULE_ID/ // A RegExp
36
- // },
37
- // {
38
- // module: /[DEP_WEBPACK_COMPILATION_OPTIMIZE_CHUNK_ASSETS]/ // A RegExp
39
- // },
40
- // (warning) => { console.log('marning', warning); return true;}
41
- //],
42
- optimization: Object.assign({
43
- removeAvailableModules: false,
44
- removeEmptyChunks: false,
45
- splitChunks: false,
46
- }),
47
- resolve: {
48
- modules: $.tooling.core.getWebpackResolveModules(),
49
- extensions: ['.ts', '.tsx', '.mjs', '.js', '.jsx'],
50
- //extensions: ['.js', '.jsx', '.ts', '.tsx', '.html', '.vue', '.less', '.styl'],
51
- symlinks: false,
52
- cacheWithContext: true,
53
- descriptionFiles: ['package.json'],
54
- alias: Object.assign({}, $.tooling.core.getWebpackResolveAlias(), {
55
- 'tiptap$': 'tiptap/dist/tiptap.esm.js',
56
- 'tiptap-utils$': 'tiptap-utils/dist/utils.esm.js',
57
- 'tiptap-extensions$': 'tiptap-extensions/dist/extensions.esm.js',
58
- 'tiptap-commands$': 'tiptap-commands/dist/commands.esm.js',
59
- //'prosemirror-model$': $.path.resolve($.tooling.utils.root(""), 'node_modules/prosemirror-model/dist/index.es.js'),
60
- //'rope-sequence$': 'rope-sequence/dist/index.js',
61
- //'tiptap$': 'tiptap/dist/tiptap.esm.js',
62
- //'tiptap$': 'tiptap/dist/tiptap.esm.js',
63
- //'tiptap$': 'tiptap/dist/tiptap.esm.js',
64
- //'tiptap$': 'tiptap/dist/tiptap.esm.js',
65
- 'axios$': 'axios/dist/axios.js',
66
- 'typestyle$': 'typestyle/lib.es2015/index.js',
67
- 'vue$': 'vue/dist/vue.esm-bundler.js',
68
- 'rope-sequence$': 'rope-sequence/dist/index.js',
69
- 'w3c-keyname$': $.path.resolve($.tooling.utils.root(""), 'node_modules/w3c-keyname/index.es.js'),
70
- 'orderedmap$': 'orderedmap/index.js',
71
- '@microsoft/signalr': '@microsoft/signalr/dist/webworker/signalr.js',
72
- //'w3c-keyname$': 'w3c-keyname/index.es.js',
73
- //'orderedmap$': 'orderedmap/index.js'
74
- }),
75
- //mainFields: ['main', 'browser', 'module']
76
- },
77
- output: {
78
- pathinfo: false,
79
- path: $.tooling.utils.root(bundleOutputDir),
80
- filename: '[name].js'
81
- },
82
- externals: [
83
- function ({ context, request }, callback) {
84
- if (request.indexOf("node_modules") > -1 || (/\.(sass|scss|styl|less|css)$/i).test(request)) {
85
- return callback(null, 'commonjs ' + request);
86
- }
87
- callback();
88
- }
89
- ],
90
- //optimization: {
91
- // removeAvailableModules: false,
92
- // removeEmptyChunks: false,
93
- // splitChunks: false,
94
- //},
95
- module: {
96
- noParse: /wwwroot(.*)/,
97
- rules: [
98
- //{
99
- // parser: {
100
- // amd: false,
101
- // harmony: false
102
- // }
103
- //},
104
- {
105
- test: /\.m?js$/,
106
- resolve: {
107
- fullySpecified: false, // disable the behaviour
108
- },
109
- },
110
- ...(0, ts_loader_1.default)(enableTreeShaking),
111
- ...(0, tsx_loader_1.default)(enableTreeShaking, wcDomProps),
112
- {
113
- test: /\.jsx$/,
114
- exclude: /(node_modules|bower_components)/,
115
- use: [
116
- //{
117
- // loader: 'cache-loader'
118
- //},
119
- {
120
- loader: 'babel-loader',
121
- options: {
122
- cacheDirectory: true,
123
- //presets: ["@babel/preset-env"],
124
- //presets: [["@babel/preset-env", {
125
- // "targets": {
126
- // "chrome": "59"
127
- // }
128
- //}]],
129
- plugins: ["syntax-jsx", "jsx-v-model", "transform-vue-jsx"]
130
- }
131
- }
132
- ]
133
- },
134
- //{
135
- // test: /\.vue$/,
136
- // use: [
137
- // {
138
- // loader: 'vue-loader',
139
- // options: {
140
- // hotReload: false,
141
- // loaders: {
142
- // ts: 'ts-loader',
143
- // sass: 'vue-style-loader!css-loader!sass-loader!less-loader', // <style lang="scss">
144
- // }
145
- // }
146
- // }
147
- // ]
148
- //},
149
- {
150
- test: /\.styl$/,
151
- use: [
152
- //'style-loader',
153
- //'css-loader',
154
- 'stylus-loader'
155
- ]
156
- },
157
- ...($.isExtensionEnv ? [] : [{
158
- test: /\.s(c|a)ss$/,
159
- use: [
160
- {
161
- loader: 'sass-loader',
162
- options: {
163
- implementation: require('sass'),
164
- sassOptions: {
165
- //fiber: require('fibers'),
166
- indentedSyntax: true
167
- }
168
- //fiber: require('fibers')
169
- }
170
- }
171
- ]
172
- }]),
173
- {
174
- test: /\.less$/,
175
- use: [
176
- //'style-loader',
177
- //'css-loader',
178
- 'less-loader'
179
- ]
180
- },
181
- {
182
- test: /\.css$/,
183
- use: [
184
- //'style-loader',
185
- {
186
- loader: 'css-loader'
187
- }
188
- ]
189
- },
190
- {
191
- test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
192
- loader: 'url-loader'
193
- },
194
- {
195
- test: /\.(ico|gif|png|jpe?g|svg)$/i,
196
- use: [{
197
- loader: 'file-loader',
198
- options: {
199
- name: '[name].[ext]',
200
- outputPath: "../images/",
201
- publicPath: '/omnia/images/'
202
- }
203
- }]
204
- //loader: 'url-loader'
205
- }
206
- ]
5
+ const globby_1 = require("globby");
6
+ const path_1 = tslib_1.__importDefault(require("path"));
7
+ const fsExtra = tslib_1.__importStar(require("fs-extra"));
8
+ const del_1 = tslib_1.__importDefault(require("del"));
9
+ const fs_1 = tslib_1.__importDefault(require("fs"));
10
+ const tooling_composers_1 = require("@omnia/tooling-composers");
11
+ const _outputInfos = [];
12
+ const basePathProcess = process.cwd();
13
+ exports.isExtensionEnv = fs_1.default.existsSync(basePathProcess + "/node_modules/@omnia/tooling/package.json");
14
+ function getBuildOption() {
15
+ return tooling_composers_1.BuildConfigurationRegistry.getBuildOptions();
16
+ }
17
+ exports.getBuildOption = getBuildOption;
18
+ function registerOutputInfo(info) {
19
+ _outputInfos.push(info);
20
+ }
21
+ exports.registerOutputInfo = registerOutputInfo;
22
+ function modifyComponent(content, filePath) {
23
+ let result = content;
24
+ const ext = path_1.default.extname(filePath);
25
+ if (ext === ".tsx") {
26
+ result = replaceWebComponentNamespaceMapping(content);
27
+ const wcs = tooling_composers_1.ComponentRegistry.getComponentRegistrations();
28
+ if (wcs.find(wc => filePath.indexOf(wc.componentOptions.entryPointPath) > -1)) {
29
+ result = result.replace(/defineVueComponent/g, "defineVueWebComponent");
207
30
  }
208
- };
31
+ }
32
+ return result;
33
+ }
34
+ exports.modifyComponent = modifyComponent;
35
+ function replaceWebComponentNamespaceMapping(content) {
36
+ const infos = _outputInfos.concat(ConfigurationManager.outputInfo.get());
37
+ infos.forEach(info => {
38
+ if (info.wc?.namespace) {
39
+ content = content.replace(new RegExp(`(<|<\/|\\s)${info.wc.namespace}\\..*?(>|\\s)`, 'g'), function (match) {
40
+ return match.replace(new RegExp(`(${info.wc.namespace}.*)(?=(>|\\s))`), function (token) {
41
+ return token.replace(/(\S+)/g, function (tag) {
42
+ return info.wc.mappings[tag.replace(`${info.wc.namespace}.`, "")] || tag;
43
+ });
44
+ });
45
+ });
46
+ }
47
+ });
48
+ return content;
209
49
  }
210
- exports.getBaseWebpackConfigForManifestMetadata = getBaseWebpackConfigForManifestMetadata;
211
50
  function convertManifestPathToEntryPath(pathToManifest, pathsInManifest) {
212
51
  if (!pathsInManifest)
213
52
  return [];
214
53
  let pathsToSearch = [];
215
54
  pathsInManifest.forEach(p => {
216
- pathsToSearch.push((p[0] === '!' ? '!./' : './') + (p.indexOf("./") > -1 || p.indexOf(".\\") > -1 ? $.path.join(pathToManifest.substring(0, pathToManifest.lastIndexOf('/')), p.replace(/^!/, '')).replace(/\\/g, "/")
55
+ pathsToSearch.push((p[0] === '!' ? '!./' : './') + (p.indexOf("./") > -1 || p.indexOf(".\\") > -1 ? path_1.default.join(pathToManifest.substring(0, pathToManifest.lastIndexOf('/')), p.replace(/^!/, '')).replace(/\\/g, "/")
217
56
  : p.replace(/^!/, '').replace(/\\/g, "/")));
218
57
  });
219
- let result = globby.sync(pathsToSearch.concat(["!./**/*.manifest.+(js|ts)"]));
58
+ let result = (0, globby_1.globbySync)(pathsToSearch.concat(["!./**/*.manifest.+(js|ts)"]));
220
59
  if (!result || result.length === 0) {
221
60
  throw new Error("Path: " + pathsInManifest.join(', ') + " in manifest: " + pathToManifest + " resolved as " + result + " which was not found");
222
61
  }
@@ -230,3 +69,54 @@ exports.cacheKeys = {
230
69
  //buildManifestMetadatas: "buildManifestMetadatas",
231
70
  bundleManifests: "bundleManifests"
232
71
  };
72
+ class ConfigurationManager {
73
+ static get webComponentTypings() {
74
+ if (!this._webComponentTypings) {
75
+ this._webComponentTypings = new WebComponentTypingsManagaer();
76
+ }
77
+ return this._webComponentTypings;
78
+ }
79
+ static get outputInfo() {
80
+ if (!this._outputInfoManagaer) {
81
+ this._outputInfoManagaer = new OutputInfoManagaer();
82
+ }
83
+ return this._outputInfoManagaer;
84
+ }
85
+ }
86
+ ConfigurationManager._webComponentTypings = null;
87
+ ConfigurationManager._outputInfoManagaer = null;
88
+ exports.ConfigurationManager = ConfigurationManager;
89
+ class OutputInfoManagaer {
90
+ constructor() {
91
+ this.filePath = exports.isExtensionEnv ? path_1.default.resolve(__dirname, "tooling.output.json") : path_1.default.resolve(__dirname, "config/tooling.output.json");
92
+ this._value = null;
93
+ }
94
+ update(value) {
95
+ fsExtra.ensureFileSync(this.filePath);
96
+ fsExtra.writeJsonSync(this.filePath, value);
97
+ }
98
+ get() {
99
+ if (this._value === null) {
100
+ fsExtra.ensureFileSync(this.filePath);
101
+ const content = fsExtra.readFileSync(this.filePath).toString();
102
+ this._value = content ? JSON.parse(content) : {};
103
+ }
104
+ return this._value;
105
+ }
106
+ }
107
+ class WebComponentTypingsManagaer {
108
+ constructor() {
109
+ this.filePath = exports.isExtensionEnv ? path_1.default.resolve(__dirname, "wctypings.ts") : path_1.default.resolve(__dirname, "config/wctypings.ts");
110
+ }
111
+ update(value) {
112
+ fsExtra.outputFileSync(this.filePath, value);
113
+ }
114
+ delete() {
115
+ del_1.default.sync(this.filePath);
116
+ }
117
+ }
118
+ // initial
119
+ if (exports.isExtensionEnv) {
120
+ //auto register output info from omnia
121
+ registerOutputInfo(fsExtra.readJSONSync(path_1.default.resolve(__dirname, "config/tooling.output.json")));
122
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "extract-doc-plugin",
3
+ "version": "0.1.0",
4
+ "description": "",
5
+ "author": "",
6
+ "license": "ISC",
7
+ "keywords": ["swc-plugin"],
8
+ "main": "target/wasm32-wasi/release/extract_doc_plugin.wasm",
9
+ "scripts": {
10
+ "prepublishOnly": "cargo build-wasi --release"
11
+ },
12
+ "files": [],
13
+ "preferUnplugged": true
14
+ }