@omnia/tooling-vue 7.5.75-dev → 8.0.0-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 (65) hide show
  1. package/internal-do-not-import-from-here/babel/preset-jsx.d.ts +2 -8
  2. package/internal-do-not-import-from-here/babel/preset-jsx.js +7 -105
  3. package/internal-do-not-import-from-here/config/omnia.vendor.manifest.json +1 -1
  4. package/internal-do-not-import-from-here/config/tooling.output.json +1 -0
  5. package/internal-do-not-import-from-here/config/wctypings.d.ts +2038 -0
  6. package/internal-do-not-import-from-here/index.d.ts +3 -1
  7. package/internal-do-not-import-from-here/index.js +6 -2
  8. package/internal-do-not-import-from-here/shared.d.ts +32 -100
  9. package/internal-do-not-import-from-here/shared.js +97 -208
  10. package/internal-do-not-import-from-here/swc/extract-doc-plugin/package.json +14 -0
  11. package/internal-do-not-import-from-here/tasks/ComponentDocRegistrations.d.ts +1 -0
  12. package/internal-do-not-import-from-here/tasks/ComponentDocRegistrations.js +9 -0
  13. package/internal-do-not-import-from-here/tasks/bundle.d.ts +3 -4
  14. package/internal-do-not-import-from-here/tasks/bundle.js +304 -353
  15. package/internal-do-not-import-from-here/tasks/doc.d.ts +3 -1
  16. package/internal-do-not-import-from-here/tasks/doc.js +282 -395
  17. package/internal-do-not-import-from-here/tasks/tsc.js +1 -0
  18. package/internal-do-not-import-from-here/tasks/vendor.js +163 -40
  19. package/internal-do-not-import-from-here/variables.d.ts +1 -1
  20. package/internal-do-not-import-from-here/variables.js +2 -2
  21. package/internal-do-not-import-from-here/vite/hmr/graph.js +6 -2
  22. package/internal-do-not-import-from-here/vite/hmr/manifest.js +6 -7
  23. package/internal-do-not-import-from-here/vite/hmr/runtime.js +8 -6
  24. package/internal-do-not-import-from-here/vite/hmr/transformers/importPath.js +10 -6
  25. package/internal-do-not-import-from-here/vite/hmr/transformers/internal/dynamicBundle.js +14 -3
  26. package/internal-do-not-import-from-here/vite/hmr/transformers/internal/omniaRuntime.js +8 -8
  27. package/internal-do-not-import-from-here/vite/hmr/transformers/vendorImportPath.d.ts +4 -0
  28. package/internal-do-not-import-from-here/vite/hmr/transformers/vendorImportPath.js +2 -1
  29. package/internal-do-not-import-from-here/vite/hmr/utils/manifest.js +3 -3
  30. package/internal-do-not-import-from-here/vite/hmr/utils/path.js +12 -8
  31. package/internal-do-not-import-from-here/vite/hmr/utils/webpack.js +2 -2
  32. package/internal-do-not-import-from-here/vite/hmr/vueJsx.d.ts +4 -3
  33. package/internal-do-not-import-from-here/vite/hmr/vueJsx.js +160 -54
  34. package/internal-do-not-import-from-here/vite/index.js +4 -0
  35. package/internal-do-not-import-from-here/vite/middlewares/HmrMiddleware.js +22 -18
  36. package/internal-do-not-import-from-here/vite/middlewares/OmniaMiddleware.js +55 -17
  37. package/internal-do-not-import-from-here/vite/middlewares/StaticFileMiddleware.js +32 -11
  38. package/internal-do-not-import-from-here/vite/middlewares/WebpackMiddleware.js +1 -1
  39. package/internal-do-not-import-from-here/vite/plugins/OmniaPlugin.js +44 -26
  40. package/internal-do-not-import-from-here/wctypings.ts +0 -0
  41. package/internal-do-not-import-from-here/webpack-loaders/doc-loader.js +11 -0
  42. package/internal-do-not-import-from-here/webpack-loaders/ingore-vuetify-locale.js +1 -1
  43. package/internal-do-not-import-from-here/webpack-loaders/ts-loader.d.ts +11 -4
  44. package/internal-do-not-import-from-here/webpack-loaders/ts-loader.js +12 -12
  45. package/internal-do-not-import-from-here/webpack-loaders/tsx-loader.d.ts +25 -4
  46. package/internal-do-not-import-from-here/webpack-loaders/tsx-loader.js +33 -32
  47. package/internal-do-not-import-from-here/webpack-loaders/wc-loader.d.ts +1 -0
  48. package/internal-do-not-import-from-here/webpack-loaders/wc-loader.js +11 -0
  49. package/package.json +14 -11
  50. package/internal-do-not-import-from-here/1cacb55c-202b-4cd7-819d-11bad92fa9cb.wcdefinitions.json +0 -1
  51. package/internal-do-not-import-from-here/1cacb55c-202b-4cd7-819d-11bad92fa9cb.wctypings.d.ts +0 -11
  52. package/internal-do-not-import-from-here/bb000000-0000-bbbb-0000-0000000000bb.wcdefinitions.json +0 -1
  53. package/internal-do-not-import-from-here/bb000000-0000-bbbb-0000-0000000000bb.wctypings.d.ts +0 -322
  54. package/internal-do-not-import-from-here/bb000000-0000-bbbb-0000-0000000000bb.wctypings.js +0 -2
  55. package/internal-do-not-import-from-here/cc000000-0000-cccc-0000-0000000000cc.wcdefinitions.json +0 -1
  56. package/internal-do-not-import-from-here/config/tsconfig.es2015.json +0 -21
  57. package/internal-do-not-import-from-here/webpack-loaders/esbuild-custom-loader.js +0 -13
  58. package/internal-do-not-import-from-here/webpack-loaders/jsx-loader.d.ts +0 -8
  59. package/internal-do-not-import-from-here/webpack-loaders/jsx-loader.js +0 -61
  60. package/internal-do-not-import-from-here/webpack-loaders/vue-tsx-hot-loader.d.ts +0 -1
  61. package/internal-do-not-import-from-here/webpack-loaders/vue-tsx-hot-loader.js +0 -44
  62. package/internal-do-not-import-from-here/webpack-loaders/wcmanifest-loader.d.ts +0 -1
  63. package/internal-do-not-import-from-here/webpack-loaders/wcmanifest-loader.js +0 -10
  64. /package/internal-do-not-import-from-here/{1cacb55c-202b-4cd7-819d-11bad92fa9cb.wctypings.js → config/wctypings.js} +0 -0
  65. /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,109 +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;
25
- "vue-tsx-support/enable-check": any;
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;
26
10
  };
27
11
  };
28
- output: {
29
- pathinfo: boolean;
30
- path: any;
31
- filename: string;
32
- };
33
- externals: (({ context, request }: {
34
- context: any;
35
- request: any;
36
- }, callback: any) => any)[];
37
- module: {
38
- noParse: RegExp;
39
- rules: ({
40
- test: RegExp;
41
- use: ({
42
- loader: any;
43
- options?: undefined;
44
- } | {
45
- loader: string;
46
- options: {
47
- loader: string;
48
- target: string;
49
- };
50
- })[];
51
- } | {
52
- test: RegExp;
53
- exclude: RegExp;
54
- use: {
55
- loader: any;
56
- options: any;
57
- }[];
58
- } | {
59
- test: RegExp;
60
- resolve: {
61
- fullySpecified: boolean;
62
- };
63
- use?: undefined;
64
- loader?: undefined;
65
- } | {
66
- test: RegExp;
67
- use: string[];
68
- resolve?: undefined;
69
- loader?: undefined;
70
- } | {
71
- test: RegExp;
72
- use: {
73
- loader: string;
74
- options: {
75
- implementation: any;
76
- sassOptions: {
77
- indentedSyntax: boolean;
78
- };
79
- };
80
- }[];
81
- resolve?: undefined;
82
- loader?: undefined;
83
- } | {
84
- test: RegExp;
85
- loader: string;
86
- resolve?: undefined;
87
- use?: undefined;
88
- } | {
89
- test: RegExp;
90
- use: {
91
- loader: string;
92
- options: {
93
- name: string;
94
- outputPath: string;
95
- publicPath: string;
96
- };
97
- }[];
98
- resolve?: undefined;
99
- loader?: undefined;
100
- })[];
101
- };
102
12
  };
103
- 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[];
104
18
  export declare const buildContext: {
105
19
  isManifestsChanged: boolean;
106
20
  };
107
21
  export declare var cacheKeys: {
108
22
  bundleManifests: string;
109
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,223 +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', '.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.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
- "vue-tsx-support/enable-check": $.isExtensionEnv ? $.path.resolve($.tooling.utils.root(""), "node_modules/@omnia/tooling-vue/internal-do-not-import-from-here/tasks/materials//dummy-vue-tsx-support-enable-check.js") : $.path.resolve($.tooling.utils.root(""), "client/tooling/vue/tasks/materials/dummy-vue-tsx-support-enable-check.js")
73
- //'w3c-keyname$': 'w3c-keyname/index.es.js',
74
- //'orderedmap$': 'orderedmap/index.js'
75
- }),
76
- //mainFields: ['main', 'browser', 'module']
77
- },
78
- output: {
79
- pathinfo: false,
80
- path: $.tooling.utils.root(bundleOutputDir),
81
- filename: '[name].js'
82
- },
83
- externals: [
84
- function ({ context, request }, callback) {
85
- if (request.indexOf("node_modules") > -1 || (/\.(sass|scss|styl|less|css)$/i).test(request)) {
86
- return callback(null, 'commonjs ' + request);
87
- }
88
- callback();
89
- }
90
- ],
91
- //optimization: {
92
- // removeAvailableModules: false,
93
- // removeEmptyChunks: false,
94
- // splitChunks: false,
95
- //},
96
- module: {
97
- noParse: /wwwroot(.*)/,
98
- rules: [
99
- //{
100
- // parser: {
101
- // amd: false,
102
- // harmony: false
103
- // }
104
- //},
105
- {
106
- test: /\.m?js$/,
107
- resolve: {
108
- fullySpecified: false, // disable the behaviour
109
- },
110
- },
111
- ...(0, ts_loader_1.default)(enableTreeShaking),
112
- ...(0, tsx_loader_1.default)(enableTreeShaking, wcDomProps),
113
- {
114
- test: /\.jsx$/,
115
- exclude: /(node_modules|bower_components)/,
116
- use: [
117
- //{
118
- // loader: 'cache-loader'
119
- //},
120
- {
121
- loader: 'babel-loader',
122
- options: {
123
- cacheDirectory: true,
124
- //presets: ["@babel/preset-env"],
125
- //presets: [["@babel/preset-env", {
126
- // "targets": {
127
- // "chrome": "59"
128
- // }
129
- //}]],
130
- plugins: ["syntax-jsx", "jsx-v-model", "transform-vue-jsx"]
131
- }
132
- }
133
- ]
134
- },
135
- //{
136
- // test: /\.vue$/,
137
- // use: [
138
- // {
139
- // loader: 'vue-loader',
140
- // options: {
141
- // hotReload: false,
142
- // loaders: {
143
- // ts: 'ts-loader',
144
- // sass: 'vue-style-loader!css-loader!sass-loader!less-loader', // <style lang="scss">
145
- // }
146
- // }
147
- // }
148
- // ]
149
- //},
150
- {
151
- test: /\.styl$/,
152
- use: [
153
- //'style-loader',
154
- //'css-loader',
155
- 'stylus-loader'
156
- ]
157
- },
158
- ...($.isExtensionEnv ? [] : [{
159
- test: /\.s(c|a)ss$/,
160
- use: [
161
- {
162
- loader: 'sass-loader',
163
- options: {
164
- implementation: require('sass'),
165
- sassOptions: {
166
- //fiber: require('fibers'),
167
- indentedSyntax: true
168
- }
169
- //fiber: require('fibers')
170
- }
171
- }
172
- ]
173
- }]),
174
- {
175
- test: /\.less$/,
176
- use: [
177
- //'style-loader',
178
- //'css-loader',
179
- 'less-loader'
180
- ]
181
- },
182
- {
183
- test: /\.css$/,
184
- use: [
185
- //'style-loader',
186
- {
187
- loader: 'css-loader'
188
- }
189
- ]
190
- },
191
- {
192
- test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
193
- loader: 'url-loader'
194
- },
195
- {
196
- test: /\.(ico|gif|png|jpe?g|svg)$/i,
197
- use: [{
198
- loader: 'file-loader',
199
- options: {
200
- name: '[name].[ext]',
201
- outputPath: "../images/",
202
- publicPath: '/omnia/images/'
203
- }
204
- }]
205
- //loader: 'url-loader'
206
- }
207
- ]
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");
208
30
  }
209
- };
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;
210
49
  }
211
- exports.getBaseWebpackConfigForManifestMetadata = getBaseWebpackConfigForManifestMetadata;
212
50
  function convertManifestPathToEntryPath(pathToManifest, pathsInManifest) {
213
51
  if (!pathsInManifest)
214
52
  return [];
215
53
  let pathsToSearch = [];
216
54
  pathsInManifest.forEach(p => {
217
- 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, "/")
218
56
  : p.replace(/^!/, '').replace(/\\/g, "/")));
219
57
  });
220
- let result = globby.sync(pathsToSearch.concat(["!./**/*.manifest.+(js|ts)"]));
58
+ let result = (0, globby_1.globbySync)(pathsToSearch.concat(["!./**/*.manifest.+(js|ts)"]));
221
59
  if (!result || result.length === 0) {
222
60
  throw new Error("Path: " + pathsInManifest.join(', ') + " in manifest: " + pathToManifest + " resolved as " + result + " which was not found");
223
61
  }
@@ -231,3 +69,54 @@ exports.cacheKeys = {
231
69
  //buildManifestMetadatas: "buildManifestMetadatas",
232
70
  bundleManifests: "bundleManifests"
233
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
+ }