Browse Source

delete component-compiler-utils (#1148)

* Dependency workflow add dependency correction value

* Download workflow instance map width adjustment and change "desc" field to "description"

* The third-party library that builds the dependency is recommended to be placed in 'devDependencies'

* Tree chart and Gantt chart style modification

* The workflow instance can be deleted only when its status is success, failure, stop and pause.

* change desc to description

* Maximum width of tooltip is set to 500px, note the copyright number of login page

* Delete copyright number

* No tenant in the list of selected tenants the default is default, and the status not shown in the repair page

* repair

* Repair security center module prompt

* Remove blank character during verification

* Remove blank character during verification

* Non admin users cannot create users, tenants, alarm groups, queues and worker groups

* Remove CI windows detection

* The value of loadaverage should be two decimal places

* Add license

* delete docs

* update package.json

* delete LICENSE

* Display icon when there is no data in process definition

* Worker group add IP format verification

* Modify MySQL page of monitoring center

* DB page rename and background color modification

* IO build replace with source code

* Replace ans charts with source code

* delete component-compiler-utils
break60 5 years ago
parent
commit
a50ca744b9
38 changed files with 0 additions and 1963 deletions
  1. 0 31
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/.circleci/config.yml
  2. 0 4
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/.prettierrc.js
  3. 0 125
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/CHANGELOG.md
  4. 0 146
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/README.md
  5. 0 25
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/compileStyle.d.ts
  6. 0 78
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/compileStyle.js
  7. 0 22
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/compileTemplate.d.ts
  8. 0 106
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/compileTemplate.js
  9. 0 5
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/index.d.ts
  10. 0 9
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/index.js
  11. 0 32
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/parse.d.ts
  12. 0 53
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/parse.js
  13. 0 3
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/stylePlugins/scoped.d.ts
  14. 0 95
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/stylePlugins/scoped.js
  15. 0 3
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/stylePlugins/trim.d.ts
  16. 0 10
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/stylePlugins/trim.js
  17. 0 11
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/styleProcessors/index.d.ts
  18. 0 87
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/styleProcessors/index.js
  19. 0 8
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/templateCompilerModules/assetUrl.d.ts
  20. 0 44
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/templateCompilerModules/assetUrl.js
  21. 0 5
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/templateCompilerModules/srcset.d.ts
  22. 0 51
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/templateCompilerModules/srcset.js
  23. 0 9
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/templateCompilerModules/utils.d.ts
  24. 0 17
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/templateCompilerModules/utils.js
  25. 0 30
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/types.d.ts
  26. 0 2
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/types.js
  27. 0 143
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/lib/compileStyle.ts
  28. 0 176
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/lib/compileTemplate.ts
  29. 0 28
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/lib/index.ts
  30. 0 112
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/lib/parse.ts
  31. 0 99
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/lib/stylePlugins/scoped.ts
  32. 0 10
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/lib/stylePlugins/trim.ts
  33. 0 133
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/lib/styleProcessors/index.ts
  34. 0 51
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/lib/templateCompilerModules/assetUrl.ts
  35. 0 66
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/lib/templateCompilerModules/srcset.ts
  36. 0 23
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/lib/templateCompilerModules/utils.ts
  37. 0 47
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/lib/types.ts
  38. 0 64
      dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/package.json

+ 0 - 31
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/.circleci/config.yml

@@ -1,31 +0,0 @@
-# Javascript Node CircleCI 2.0 configuration file
-#
-# Check https://circleci.com/docs/2.0/language-javascript/ for more details
-#
-version: 2
-jobs:
-  build:
-    docker:
-      - image: circleci/node:6
-
-    working_directory: ~/repo
-
-    steps:
-      - checkout
-
-      # Download and cache dependencies
-      - restore_cache:
-          keys:
-          - v1-dependencies-{{ checksum "package.json" }}
-          # fallback to using the latest cache if no exact match is found
-          - v1-dependencies-
-
-      - run: yarn install
-
-      - save_cache:
-          paths:
-            - node_modules
-          key: v1-dependencies-{{ checksum "package.json" }}
-        
-      # run tests!
-      - run: yarn test

+ 0 - 4
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/.prettierrc.js

@@ -1,4 +0,0 @@
-module.exports = {
-  semi: false,
-  singleQuote: true
-}

+ 0 - 125
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/CHANGELOG.md

@@ -1,125 +0,0 @@
-<a name="2.2.0"></a>
-# [2.2.0](https://github.com/vuejs/component-compiler-utils/compare/v2.1.2...v2.2.0) (2018-08-16)
-
-
-### Features
-
-* **scoped-css:** support leading >>> or /deep/ in selectors ([1a3b5bb](https://github.com/vuejs/component-compiler-utils/commit/1a3b5bb))
-
-
-
-<a name="2.1.2"></a>
-## [2.1.2](https://github.com/vuejs/component-compiler-utils/compare/v2.1.1...v2.1.2) (2018-08-09)
-
-
-### Bug Fixes
-
-* pin prettier version ([5f138a6](https://github.com/vuejs/component-compiler-utils/commit/5f138a6))
-
-
-
-<a name="2.1.1"></a>
-## [2.1.1](https://github.com/vuejs/component-compiler-utils/compare/v2.1.0...v2.1.1) (2018-08-07)
-
-
-### Bug Fixes
-
-* remove space after selector when inserting scoped attribute ([5b299ed](https://github.com/vuejs/component-compiler-utils/commit/5b299ed)), closes [vue-loader/#1370](https://github.com/vuejs/component-compiler-utils/issues/1370)
-
-
-
-<a name="2.1.0"></a>
-# [2.1.0](https://github.com/vuejs/component-compiler-utils/compare/v2.0.0...v2.1.0) (2018-07-03)
-
-
-### Bug Fixes
-
-* Forward preprocessor options to less ([#25](https://github.com/vuejs/component-compiler-utils/issues/25)) ([3b19c1e](https://github.com/vuejs/component-compiler-utils/commit/3b19c1e)), closes [#24](https://github.com/vuejs/component-compiler-utils/issues/24)
-* should work with variable named render (close [#23](https://github.com/vuejs/component-compiler-utils/issues/23)) ([273827b](https://github.com/vuejs/component-compiler-utils/commit/273827b))
-
-
-### Features
-
-* Support `stylus` as `<style>` lang ([#18](https://github.com/vuejs/component-compiler-utils/issues/18)) ([986084e](https://github.com/vuejs/component-compiler-utils/commit/986084e))
-
-
-
-<a name="2.0.0"></a>
-# [2.0.0](https://github.com/vuejs/component-compiler-utils/compare/v1.3.1...v2.0.0) (2018-06-03)
-
-
-### Features
-
-* Add async style compilation support ([#13](https://github.com/vuejs/component-compiler-utils/issues/13)) ([54464d6](https://github.com/vuejs/component-compiler-utils/commit/54464d6))
-* allow/require compiler to be passed in for `parse` ([caa1538](https://github.com/vuejs/component-compiler-utils/commit/caa1538))
-
-
-### BREAKING CHANGES
-
-* vue template compiler must now be passed to `parse`
-via options.
-
-
-
-<a name="1.3.1"></a>
-## [1.3.1](https://github.com/vuejs/component-compiler-utils/compare/v1.3.0...v1.3.1) (2018-05-28)
-
-
-### Bug Fixes
-
-* default parser was removed from prettier ([#15](https://github.com/vuejs/component-compiler-utils/issues/15)) ([598224d](https://github.com/vuejs/component-compiler-utils/commit/598224d))
-
-
-
-<a name="1.3.0"></a>
-# [1.3.0](https://github.com/vuejs/component-compiler-utils/compare/v1.2.1...v1.3.0) (2018-05-22)
-
-
-### Features
-
-* include href for <image> in transformAssetUrls (close [#12](https://github.com/vuejs/component-compiler-utils/issues/12)) ([86fddc2](https://github.com/vuejs/component-compiler-utils/commit/86fddc2))
-* Provide installation instructions on missing language preprocessors ([#10](https://github.com/vuejs/component-compiler-utils/issues/10)) ([97e772c](https://github.com/vuejs/component-compiler-utils/commit/97e772c))
-
-
-
-<a name="1.2.1"></a>
-## [1.2.1](https://github.com/vuejs/component-compiler-utils/compare/v1.2.0...v1.2.1) (2018-04-26)
-
-
-### Bug Fixes
-
-* postcss import ([c845a80](https://github.com/vuejs/component-compiler-utils/commit/c845a80))
-
-
-
-<a name="1.2.0"></a>
-# [1.2.0](https://github.com/vuejs/component-compiler-utils/compare/v1.1.0...v1.2.0) (2018-04-26)
-
-
-### Bug Fixes
-
-* compile only lib directory ([#6](https://github.com/vuejs/component-compiler-utils/issues/6)) ([4f787b3](https://github.com/vuejs/component-compiler-utils/commit/4f787b3))
-
-
-### Features
-
-* accept postcss options and plugins ([#7](https://github.com/vuejs/component-compiler-utils/issues/7)) ([1456e3d](https://github.com/vuejs/component-compiler-utils/commit/1456e3d))
-
-
-
-<a name="1.1.0"></a>
-# [1.1.0](https://github.com/vuejs/component-compiler-utils/compare/9204f16...v1.1.0) (2018-04-24)
-
-
-### Bug Fixes
-
-* use more strict regex for matching css animation rules ([4644727](https://github.com/vuejs/component-compiler-utils/commit/4644727))
-
-
-### Features
-
-* adds stylus & less preprocessor ([#5](https://github.com/vuejs/component-compiler-utils/issues/5)) ([f2fd8b9](https://github.com/vuejs/component-compiler-utils/commit/f2fd8b9))
-* preprocess scss/sass styles with node-sass ([#4](https://github.com/vuejs/component-compiler-utils/issues/4)) ([9204f16](https://github.com/vuejs/component-compiler-utils/commit/9204f16))
-
-
-

+ 0 - 146
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/README.md

@@ -1,146 +0,0 @@
-# @vue/component-compiler-utils [![Build Status](https://circleci.com/gh/vuejs/component-compiler-utils/tree/master.svg?style=shield)](https://circleci.com/gh/vuejs/component-compiler-utils/)
-
-> Lower level utilities for compiling Vue single file components
-
-This package contains lower level utilities that you can use if you are writing a plugin / transform for a bundler or module system that compiles Vue single file components into JavaScript. It is used in [vue-loader](https://github.com/vuejs/vue-loader) version 15 and above.
-
-The API surface is intentionally minimal - the goal is to reuse as much as possible while being as flexible as possible.
-
-## Why isn't `vue-template-compiler` a peerDependency?
-
-Since this package is more often used as a low-level utility, it is usually a transitive dependency in an actual Vue project. It is therefore the responsibility of the higher-level package (e.g. `vue-loader`) to inject `vue-template-compiler` via options when calling the `parse` and `compileTemplate` methods.
-
-Not listing it as a peer depedency also allows tooling authors to use a non-default template compiler instead of `vue-template-compiler` without having to include it just to fullfil the peer dep requirement.
-
-## API
-
-### parse(ParseOptions): SFCDescriptor
-
-Parse raw single file component source into a descriptor with source maps. The actual compiler (`vue-template-compiler`) must be passed in via the `compiler` option so that the specific version used can be determined by the end user.
-
-``` ts
-interface ParseOptions {
-  source: string
-  filename?: string
-  compiler: VueTemplateCompiler
-  // https://github.com/vuejs/vue/tree/dev/packages/vue-template-compiler#compilerparsecomponentfile-options
-  // defualt: { pad: 'line' }
-  compilerParseOptions?: VueTemplateCompilerParseOptions
-  sourceRoot?: string
-  needMap?: boolean
-}
-
-interface SFCDescriptor {
-  template?: SFCBlock
-  script?: SFCBlock
-  styles: SFCBlock[]
-  customBlocks: SFCCustomBlock[]
-}
-
-interface SFCCustomBlock {
-  type: string
-  content: string
-  attrs: { [key: string]: string }
-  start: number
-  end: number
-  map: RawSourceMap
-}
-
-interface SFCBlock extends SFCCustomBlock {
-  lang?: string
-  src?: string
-  scoped?: boolean
-  module?: string | boolean
-}
-```
-
-### compileTemplate(TemplateCompileOptions): TemplateCompileResults
-
-Takes raw template source and compile it into JavaScript code. The actual compiler (`vue-template-compiler`) must be passed in via the `compiler` option so that the specific version used can be determined by the end user.
-
-It can also optionally perform pre-processing for any templating engine supported by [consolidate](https://github.com/tj/consolidate.js/).
-
-``` ts
-interface TemplateCompileOptions {
-  source: string
-  filename: string
-
-  compiler: VueTemplateCompiler
-  https://github.com/vuejs/vue/tree/dev/packages/vue-template-compiler#compilercompiletemplate-options
-  // default: {}
-  compilerOptions?: VueTemplateCompilerOptions
-
-  // Template preprocessor
-  preprocessLang?: string
-  preprocessOptions?: any
-
-  // Transform asset urls found in the template into `require()` calls
-  // This is off by default. If set to true, the default value is
-  // {
-  //   video: ['src', 'poster'],
-  //   source: 'src',
-  //   img: 'src',
-  //   image: 'xlink:href'
-  // }
-  transformAssetUrls?: AssetURLOptions | boolean
-
-  // For vue-template-es2015-compiler, which is a fork of Buble
-  transpileOptions?: any
-
-  isProduction?: boolean  // default: false
-  isFunctional?: boolean  // default: false
-  optimizeSSR?: boolean   // default: false
-}
-
-interface TemplateCompileResult {
-  code: string
-  source: string
-  tips: string[]
-  errors: string[]
-}
-
-interface AssetURLOptions {
-  [name: string]: string | string[]
-}
-```
-
-#### Handling the Output
-
-The resulting JavaScript code will look like this:
-
-``` js
-var render = function (h) { /* ... */}
-var staticRenderFns = [function (h) { /* ... */}, function (h) { /* ... */}]
-```
-
-It **does NOT** assume any module system. It is your responsibility to handle the exports, if needed.
-
-### compileStyle(StyleCompileOptions)
-
-Take input raw CSS and applies scoped CSS transform. It does NOT handle pre-processors. If the component doesn't use scoped CSS then this step can be skipped.
-
-``` ts
-interface StyleCompileOptions {
-  source: string
-  filename: string
-  id: string
-  map?: any
-  scoped?: boolean
-  trim?: boolean
-  preprocessLang?: string
-  preprocessOptions?: any
-  postcssOptions?: any
-  postcssPlugins?: any[]
-}
-
-interface StyleCompileResults {
-  code: string
-  map: any | void
-  rawResult: LazyResult | void // raw lazy result from PostCSS
-  errors: string[]
-}
-```
-
-### compileStyleAsync(StyleCompileOptions)
-
-Same as `compileStyle(StyleCompileOptions)` but it returns a Promise resolving to `StyleCompileResults`. It can be used with async postcss plugins.

+ 0 - 25
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/compileStyle.d.ts

@@ -1,25 +0,0 @@
-import { LazyResult } from 'postcss';
-export interface StyleCompileOptions {
-    source: string;
-    filename: string;
-    id: string;
-    map?: any;
-    scoped?: boolean;
-    trim?: boolean;
-    preprocessLang?: string;
-    preprocessOptions?: any;
-    postcssOptions?: any;
-    postcssPlugins?: any[];
-}
-export interface AsyncStyleCompileOptions extends StyleCompileOptions {
-    isAsync?: boolean;
-}
-export interface StyleCompileResults {
-    code: string;
-    map: any | void;
-    rawResult: LazyResult | void;
-    errors: string[];
-}
-export declare function compileStyle(options: StyleCompileOptions): StyleCompileResults;
-export declare function compileStyleAsync(options: StyleCompileOptions): Promise<StyleCompileResults>;
-export declare function doCompileStyle(options: AsyncStyleCompileOptions): StyleCompileResults;

+ 0 - 78
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/compileStyle.js

@@ -1,78 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-const postcss = require('postcss');
-const trim_1 = require("./stylePlugins/trim");
-const scoped_1 = require("./stylePlugins/scoped");
-const styleProcessors_1 = require("./styleProcessors");
-function compileStyle(options) {
-    return doCompileStyle(Object.assign({}, options, { isAsync: false }));
-}
-exports.compileStyle = compileStyle;
-function compileStyleAsync(options) {
-    return Promise.resolve(doCompileStyle(Object.assign({}, options, { isAsync: true })));
-}
-exports.compileStyleAsync = compileStyleAsync;
-function doCompileStyle(options) {
-    const { filename, id, scoped = true, trim = true, preprocessLang, postcssOptions, postcssPlugins } = options;
-    const preprocessor = preprocessLang && styleProcessors_1.processors[preprocessLang];
-    const preProcessedSource = preprocessor && preprocess(options, preprocessor);
-    const map = preProcessedSource ? preProcessedSource.map : options.map;
-    const source = preProcessedSource ? preProcessedSource.code : options.source;
-    const plugins = (postcssPlugins || []).slice();
-    if (trim) {
-        plugins.push(trim_1.default());
-    }
-    if (scoped) {
-        plugins.push(scoped_1.default(id));
-    }
-    const postCSSOptions = Object.assign({}, postcssOptions, { to: filename, from: filename });
-    if (map) {
-        postCSSOptions.map = {
-            inline: false,
-            annotation: false,
-            prev: map
-        };
-    }
-    let result, code, outMap;
-    const errors = [];
-    if (preProcessedSource && preProcessedSource.errors.length) {
-        errors.push(...preProcessedSource.errors);
-    }
-    try {
-        result = postcss(plugins).process(source, postCSSOptions);
-        // In async mode, return a promise.
-        if (options.isAsync) {
-            return result
-                .then((result) => ({
-                code: result.css || '',
-                map: result.map && result.map.toJSON(),
-                errors,
-                rawResult: result
-            }))
-                .catch((error) => ({
-                code: '',
-                map: undefined,
-                errors: [...errors, error.message],
-                rawResult: undefined
-            }));
-        }
-        // force synchronous transform (we know we only have sync plugins)
-        code = result.css;
-        outMap = result.map;
-    }
-    catch (e) {
-        errors.push(e);
-    }
-    return {
-        code: code || ``,
-        map: outMap && outMap.toJSON(),
-        errors,
-        rawResult: result
-    };
-}
-exports.doCompileStyle = doCompileStyle;
-function preprocess(options, preprocessor) {
-    return preprocessor.render(options.source, options.map, Object.assign({
-        filename: options.filename
-    }, options.preprocessOptions));
-}

+ 0 - 22
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/compileTemplate.d.ts

@@ -1,22 +0,0 @@
-import { VueTemplateCompiler, VueTemplateCompilerOptions } from './types';
-import { AssetURLOptions } from './templateCompilerModules/assetUrl';
-export interface TemplateCompileOptions {
-    source: string;
-    filename: string;
-    compiler: VueTemplateCompiler;
-    compilerOptions?: VueTemplateCompilerOptions;
-    transformAssetUrls?: AssetURLOptions | boolean;
-    preprocessLang?: string;
-    preprocessOptions?: any;
-    transpileOptions?: any;
-    isProduction?: boolean;
-    isFunctional?: boolean;
-    optimizeSSR?: boolean;
-}
-export interface TemplateCompileResult {
-    code: string;
-    source: string;
-    tips: string[];
-    errors: string[];
-}
-export declare function compileTemplate(options: TemplateCompileOptions): TemplateCompileResult;

+ 0 - 106
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/compileTemplate.js

@@ -1,106 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-const assetUrl_1 = require("./templateCompilerModules/assetUrl");
-const srcset_1 = require("./templateCompilerModules/srcset");
-const prettier = require('prettier');
-const consolidate = require('consolidate');
-const transpile = require('vue-template-es2015-compiler');
-function compileTemplate(options) {
-    const { preprocessLang } = options;
-    const preprocessor = preprocessLang && consolidate[preprocessLang];
-    if (preprocessor) {
-        return actuallyCompile(Object.assign({}, options, {
-            source: preprocess(options, preprocessor)
-        }));
-    }
-    else if (preprocessLang) {
-        return {
-            code: `var render = function () {}\n` + `var staticRenderFns = []\n`,
-            source: options.source,
-            tips: [
-                `Component ${options.filename} uses lang ${preprocessLang} for template. Please install the language preprocessor.`
-            ],
-            errors: [
-                `Component ${options.filename} uses lang ${preprocessLang} for template, however it is not installed.`
-            ]
-        };
-    }
-    else {
-        return actuallyCompile(options);
-    }
-}
-exports.compileTemplate = compileTemplate;
-function preprocess(options, preprocessor) {
-    const { source, filename, preprocessOptions } = options;
-    const finalPreprocessOptions = Object.assign({
-        filename
-    }, preprocessOptions);
-    // Consolidate exposes a callback based API, but the callback is in fact
-    // called synchronously for most templating engines. In our case, we have to
-    // expose a synchronous API so that it is usable in Jest transforms (which
-    // have to be sync because they are applied via Node.js require hooks)
-    let res, err;
-    preprocessor.render(source, finalPreprocessOptions, (_err, _res) => {
-        if (_err)
-            err = _err;
-        res = _res;
-    });
-    if (err)
-        throw err;
-    return res;
-}
-function actuallyCompile(options) {
-    const { source, compiler, compilerOptions = {}, transpileOptions = {}, transformAssetUrls, isProduction = process.env.NODE_ENV === 'production', isFunctional = false, optimizeSSR = false } = options;
-    const compile = optimizeSSR && compiler.ssrCompile ? compiler.ssrCompile : compiler.compile;
-    let finalCompilerOptions = compilerOptions;
-    if (transformAssetUrls) {
-        const builtInModules = [
-            transformAssetUrls === true
-                ? assetUrl_1.default()
-                : assetUrl_1.default(transformAssetUrls),
-            srcset_1.default()
-        ];
-        finalCompilerOptions = Object.assign({}, compilerOptions, {
-            modules: [...builtInModules, ...(compilerOptions.modules || [])]
-        });
-    }
-    const { render, staticRenderFns, tips, errors } = compile(source, finalCompilerOptions);
-    if (errors && errors.length) {
-        return {
-            code: `var render = function () {}\n` + `var staticRenderFns = []\n`,
-            source,
-            tips,
-            errors
-        };
-    }
-    else {
-        const finalTranspileOptions = Object.assign({}, transpileOptions, {
-            transforms: Object.assign({}, transpileOptions.transforms, {
-                stripWithFunctional: isFunctional
-            })
-        });
-        const toFunction = (code) => {
-            return `function (${isFunctional ? `_h,_vm` : ``}) {${code}}`;
-        };
-        // transpile code with vue-template-es2015-compiler, which is a forked
-        // version of Buble that applies ES2015 transforms + stripping `with` usage
-        let code = transpile(`var __render__ = ${toFunction(render)}\n` +
-            `var __staticRenderFns__ = [${staticRenderFns.map(toFunction)}]`, finalTranspileOptions) + `\n`;
-        // #23 we use __render__ to avoid `render` not being prefixed by the
-        // transpiler when stripping with, but revert it back to `render` to
-        // maintain backwards compat
-        code = code.replace(/\s__(render|staticRenderFns)__\s/g, ' $1 ');
-        if (!isProduction) {
-            // mark with stripped (this enables Vue to use correct runtime proxy
-            // detection)
-            code += `render._withStripped = true`;
-            code = prettier.format(code, { semi: false, parser: 'babylon' });
-        }
-        return {
-            code,
-            source,
-            tips,
-            errors
-        };
-    }
-}

+ 0 - 5
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/index.d.ts

@@ -1,5 +0,0 @@
-import { parse, SFCBlock, SFCCustomBlock, SFCDescriptor } from './parse';
-import { compileTemplate, TemplateCompileOptions, TemplateCompileResult } from './compileTemplate';
-import { compileStyle, compileStyleAsync, StyleCompileOptions, StyleCompileResults } from './compileStyle';
-export { parse, compileTemplate, compileStyle, compileStyleAsync };
-export { SFCBlock, SFCCustomBlock, SFCDescriptor, TemplateCompileOptions, TemplateCompileResult, StyleCompileOptions, StyleCompileResults };

+ 0 - 9
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/index.js

@@ -1,9 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-const parse_1 = require("./parse");
-exports.parse = parse_1.parse;
-const compileTemplate_1 = require("./compileTemplate");
-exports.compileTemplate = compileTemplate_1.compileTemplate;
-const compileStyle_1 = require("./compileStyle");
-exports.compileStyle = compileStyle_1.compileStyle;
-exports.compileStyleAsync = compileStyle_1.compileStyleAsync;

+ 0 - 32
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/parse.d.ts

@@ -1,32 +0,0 @@
-import { RawSourceMap, VueTemplateCompiler, VueTemplateCompilerParseOptions } from './types';
-export interface ParseOptions {
-    source: string;
-    filename?: string;
-    compiler: VueTemplateCompiler;
-    compilerParseOptions?: VueTemplateCompilerParseOptions;
-    sourceRoot?: string;
-    needMap?: boolean;
-}
-export interface SFCCustomBlock {
-    type: string;
-    content: string;
-    attrs: {
-        [key: string]: string;
-    };
-    start: number;
-    end: number;
-    map: RawSourceMap;
-}
-export interface SFCBlock extends SFCCustomBlock {
-    lang?: string;
-    src?: string;
-    scoped?: boolean;
-    module?: string | boolean;
-}
-export interface SFCDescriptor {
-    template?: SFCBlock;
-    script?: SFCBlock;
-    styles: SFCBlock[];
-    customBlocks: SFCCustomBlock[];
-}
-export declare function parse(options: ParseOptions): SFCDescriptor;

+ 0 - 53
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/parse.js

@@ -1,53 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-const hash = require('hash-sum');
-const cache = require('lru-cache')(100);
-const { SourceMapGenerator } = require('source-map');
-const splitRE = /\r?\n/g;
-const emptyRE = /^(?:\/\/)?\s*$/;
-function parse(options) {
-    const { source, filename = '', compiler, compilerParseOptions = { pad: 'line' }, sourceRoot = process.cwd(), needMap = true } = options;
-    const cacheKey = hash(filename + source);
-    let output = cache.get(cacheKey);
-    if (output)
-        return output;
-    output = compiler.parseComponent(source, compilerParseOptions);
-    if (needMap) {
-        if (output.script && !output.script.src) {
-            output.script.map = generateSourceMap(filename, source, output.script.content, sourceRoot);
-        }
-        if (output.styles) {
-            output.styles.forEach(style => {
-                if (!style.src) {
-                    style.map = generateSourceMap(filename, source, style.content, sourceRoot);
-                }
-            });
-        }
-    }
-    cache.set(cacheKey, output);
-    return output;
-}
-exports.parse = parse;
-function generateSourceMap(filename, source, generated, sourceRoot) {
-    const map = new SourceMapGenerator({
-        file: filename,
-        sourceRoot
-    });
-    map.setSourceContent(filename, source);
-    generated.split(splitRE).forEach((line, index) => {
-        if (!emptyRE.test(line)) {
-            map.addMapping({
-                source: filename,
-                original: {
-                    line: index + 1,
-                    column: 0
-                },
-                generated: {
-                    line: index + 1,
-                    column: 0
-                }
-            });
-        }
-    });
-    return map.toJSON();
-}

+ 0 - 3
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/stylePlugins/scoped.d.ts

@@ -1,3 +0,0 @@
-import * as postcss from 'postcss';
-declare const _default: postcss.Plugin<any>;
-export default _default;

+ 0 - 95
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/stylePlugins/scoped.js

@@ -1,95 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-const postcss = require("postcss");
-// postcss-selector-parser does have typings but it's problematic to work with.
-const selectorParser = require('postcss-selector-parser');
-exports.default = postcss.plugin('add-id', (options) => (root) => {
-    const id = options;
-    const keyframes = Object.create(null);
-    root.each(function rewriteSelector(node) {
-        if (!node.selector) {
-            // handle media queries
-            if (node.type === 'atrule') {
-                if (node.name === 'media' || node.name === 'supports') {
-                    node.each(rewriteSelector);
-                }
-                else if (/-?keyframes$/.test(node.name)) {
-                    // register keyframes
-                    keyframes[node.params] = node.params = node.params + '-' + id;
-                }
-            }
-            return;
-        }
-        node.selector = selectorParser((selectors) => {
-            selectors.each((selector) => {
-                let node = null;
-                let hasDeep = false;
-                selector.each((n) => {
-                    // ">>>" combinator
-                    if (n.type === 'combinator' && n.value === '>>>') {
-                        n.value = ' ';
-                        n.spaces.before = n.spaces.after = '';
-                        hasDeep = true;
-                        return false;
-                    }
-                    // /deep/ alias for >>>, since >>> doesn't work in SASS
-                    if (n.type === 'tag' && n.value === '/deep/') {
-                        const prev = n.prev();
-                        if (prev && prev.type === 'combinator' && prev.value === ' ') {
-                            prev.remove();
-                        }
-                        n.remove();
-                        hasDeep = true;
-                        return false;
-                    }
-                    if (n.type !== 'pseudo' && n.type !== 'combinator') {
-                        node = n;
-                    }
-                });
-                if (node) {
-                    node.spaces.after = '';
-                    selector.insertAfter(node, selectorParser.attribute({
-                        attribute: id
-                    }));
-                }
-                else if (hasDeep) {
-                    selector.prepend(selectorParser.attribute({
-                        attribute: id
-                    }));
-                }
-            });
-        }).processSync(node.selector);
-    });
-    // If keyframes are found in this <style>, find and rewrite animation names
-    // in declarations.
-    // Caveat: this only works for keyframes and animation rules in the same
-    // <style> element.
-    if (Object.keys(keyframes).length) {
-        root.walkDecls(decl => {
-            // individual animation-name declaration
-            if (/^(-\w+-)?animation-name$/.test(decl.prop)) {
-                decl.value = decl.value
-                    .split(',')
-                    .map(v => keyframes[v.trim()] || v.trim())
-                    .join(',');
-            }
-            // shorthand
-            if (/^(-\w+-)?animation$/.test(decl.prop)) {
-                decl.value = decl.value
-                    .split(',')
-                    .map(v => {
-                    const vals = v.trim().split(/\s+/);
-                    const i = vals.findIndex(val => keyframes[val]);
-                    if (i !== -1) {
-                        vals.splice(i, 1, keyframes[vals[i]]);
-                        return vals.join(' ');
-                    }
-                    else {
-                        return v;
-                    }
-                })
-                    .join(',');
-            }
-        });
-    }
-});

+ 0 - 3
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/stylePlugins/trim.d.ts

@@ -1,3 +0,0 @@
-import * as postcss from 'postcss';
-declare const _default: postcss.Plugin<{}>;
-export default _default;

+ 0 - 10
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/stylePlugins/trim.js

@@ -1,10 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-const postcss = require("postcss");
-exports.default = postcss.plugin('trim', () => (css) => {
-    css.walk(({ type, raws }) => {
-        if (type === 'rule' || type === 'atrule') {
-            raws.before = raws.after = '\n';
-        }
-    });
-});

+ 0 - 11
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/styleProcessors/index.d.ts

@@ -1,11 +0,0 @@
-export interface StylePreprocessor {
-    render(source: string, map: any | null, options: any): StylePreprocessorResults;
-}
-export interface StylePreprocessorResults {
-    code: string;
-    map?: any;
-    errors: Array<Error>;
-}
-export declare const processors: {
-    [key: string]: StylePreprocessor;
-};

+ 0 - 87
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/styleProcessors/index.js

@@ -1,87 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-const merge = require('merge-source-map');
-// .scss/.sass processor
-const scss = {
-    render(source, map, options) {
-        const nodeSass = require('node-sass');
-        const finalOptions = Object.assign({}, options, {
-            data: source,
-            file: options.filename,
-            outFile: options.filename,
-            sourceMap: !!map
-        });
-        try {
-            const result = nodeSass.renderSync(finalOptions);
-            if (map) {
-                return {
-                    code: result.css.toString(),
-                    map: merge(map, JSON.parse(result.map.toString())),
-                    errors: []
-                };
-            }
-            return { code: result.css.toString(), errors: [] };
-        }
-        catch (e) {
-            return { code: '', errors: [e] };
-        }
-    }
-};
-const sass = {
-    render(source, map, options) {
-        return scss.render(source, map, Object.assign({}, options, { indentedSyntax: true }));
-    }
-};
-// .less
-const less = {
-    render(source, map, options) {
-        const nodeLess = require('less');
-        let result;
-        let error = null;
-        nodeLess.render(source, Object.assign({}, options, { syncImport: true }), (err, output) => {
-            error = err;
-            result = output;
-        });
-        if (error)
-            return { code: '', errors: [error] };
-        if (map) {
-            return {
-                code: result.css.toString(),
-                map: merge(map, result.map),
-                errors: []
-            };
-        }
-        return { code: result.css.toString(), errors: [] };
-    }
-};
-// .styl
-const styl = {
-    render(source, map, options) {
-        const nodeStylus = require('stylus');
-        try {
-            const ref = nodeStylus(source);
-            Object.keys(options).forEach(key => ref.set(key, options[key]));
-            if (map)
-                ref.set('sourcemap', { inline: false, comment: false });
-            const result = ref.render();
-            if (map) {
-                return {
-                    code: result,
-                    map: merge(map, ref.sourcemap),
-                    errors: []
-                };
-            }
-            return { code: result, errors: [] };
-        }
-        catch (e) {
-            return { code: '', errors: [e] };
-        }
-    }
-};
-exports.processors = {
-    less,
-    sass,
-    scss,
-    styl,
-    stylus: styl
-};

+ 0 - 8
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/templateCompilerModules/assetUrl.d.ts

@@ -1,8 +0,0 @@
-import { ASTNode } from './utils';
-export interface AssetURLOptions {
-    [name: string]: string | string[];
-}
-declare const _default: (userOptions?: AssetURLOptions | undefined) => {
-    postTransformNode: (node: ASTNode) => void;
-};
-export default _default;

+ 0 - 44
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/templateCompilerModules/assetUrl.js

@@ -1,44 +0,0 @@
-"use strict";
-// vue compiler module for transforming `<tag>:<attribute>` to `require`
-Object.defineProperty(exports, "__esModule", { value: true });
-const utils_1 = require("./utils");
-const defaultOptions = {
-    video: ['src', 'poster'],
-    source: 'src',
-    img: 'src',
-    image: ['xlink:href', 'href']
-};
-exports.default = (userOptions) => {
-    const options = userOptions
-        ? Object.assign({}, defaultOptions, userOptions)
-        : defaultOptions;
-    return {
-        postTransformNode: (node) => {
-            transform(node, options);
-        }
-    };
-};
-function transform(node, options) {
-    for (const tag in options) {
-        if ((tag === '*' || node.tag === tag) && node.attrs) {
-            const attributes = options[tag];
-            if (typeof attributes === 'string') {
-                node.attrs.some(attr => rewrite(attr, attributes));
-            }
-            else if (Array.isArray(attributes)) {
-                attributes.forEach(item => node.attrs.some(attr => rewrite(attr, item)));
-            }
-        }
-    }
-}
-function rewrite(attr, name) {
-    if (attr.name === name) {
-        const value = attr.value;
-        // only transform static URLs
-        if (value.charAt(0) === '"' && value.charAt(value.length - 1) === '"') {
-            attr.value = utils_1.urlToRequire(value.slice(1, -1));
-            return true;
-        }
-    }
-    return false;
-}

+ 0 - 5
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/templateCompilerModules/srcset.d.ts

@@ -1,5 +0,0 @@
-import { ASTNode } from './utils';
-declare const _default: () => {
-    postTransformNode: (node: ASTNode) => void;
-};
-export default _default;

+ 0 - 51
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/templateCompilerModules/srcset.js

@@ -1,51 +0,0 @@
-"use strict";
-// vue compiler module for transforming `img:srcset` to a number of `require`s
-Object.defineProperty(exports, "__esModule", { value: true });
-const utils_1 = require("./utils");
-exports.default = () => ({
-    postTransformNode: (node) => {
-        transform(node);
-    }
-});
-// http://w3c.github.io/html/semantics-embedded-content.html#ref-for-image-candidate-string-5
-const escapedSpaceCharacters = /( |\\t|\\n|\\f|\\r)+/g;
-function transform(node) {
-    const tags = ['img', 'source'];
-    if (tags.indexOf(node.tag) !== -1 && node.attrs) {
-        node.attrs.forEach(attr => {
-            if (attr.name === 'srcset') {
-                // same logic as in transform-require.js
-                const value = attr.value;
-                const isStatic = value.charAt(0) === '"' && value.charAt(value.length - 1) === '"';
-                if (!isStatic) {
-                    return;
-                }
-                const imageCandidates = value
-                    .substr(1, value.length - 2)
-                    .split(',')
-                    .map(s => {
-                    // The attribute value arrives here with all whitespace, except
-                    // normal spaces, represented by escape sequences
-                    const [url, descriptor] = s
-                        .replace(escapedSpaceCharacters, ' ')
-                        .trim()
-                        .split(' ', 2);
-                    return { require: utils_1.urlToRequire(url), descriptor };
-                });
-                // "require(url1)"
-                // "require(url1) 1x"
-                // "require(url1), require(url2)"
-                // "require(url1), require(url2) 2x"
-                // "require(url1) 1x, require(url2)"
-                // "require(url1) 1x, require(url2) 2x"
-                const code = imageCandidates
-                    .map(({ require, descriptor }) => `${require} + "${descriptor ? ' ' + descriptor : ''}, " + `)
-                    .join('')
-                    .slice(0, -6)
-                    .concat('"')
-                    .replace(/ \+ ""$/, '');
-                attr.value = code;
-            }
-        });
-    }
-}

+ 0 - 9
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/templateCompilerModules/utils.d.ts

@@ -1,9 +0,0 @@
-export interface Attr {
-    name: string;
-    value: string;
-}
-export interface ASTNode {
-    tag: string;
-    attrs: Attr[];
-}
-export declare function urlToRequire(url: string): string;

+ 0 - 17
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/templateCompilerModules/utils.js

@@ -1,17 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-function urlToRequire(url) {
-    // same logic as in transform-require.js
-    const firstChar = url.charAt(0);
-    if (firstChar === '.' || firstChar === '~' || firstChar === '@') {
-        if (firstChar === '~') {
-            const secondChar = url.charAt(1);
-            url = url.slice(secondChar === '/' ? 2 : 1);
-        }
-        return `require("${url}")`;
-    }
-    else {
-        return `"${url}"`;
-    }
-}
-exports.urlToRequire = urlToRequire;

+ 0 - 30
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/types.d.ts

@@ -1,30 +0,0 @@
-import { SFCDescriptor } from './parse';
-export interface StartOfSourceMap {
-    file?: string;
-    sourceRoot?: string;
-}
-export interface RawSourceMap extends StartOfSourceMap {
-    version: string;
-    sources: string[];
-    names: string[];
-    sourcesContent?: string[];
-    mappings: string;
-}
-export interface VueTemplateCompiler {
-    parseComponent(source: string, options?: any): SFCDescriptor;
-    compile(template: string, options: VueTemplateCompilerOptions): VueTemplateCompilerResults;
-    ssrCompile(template: string, options: VueTemplateCompilerOptions): VueTemplateCompilerResults;
-}
-export interface VueTemplateCompilerOptions {
-    modules?: Object[];
-}
-export interface VueTemplateCompilerParseOptions {
-    pad?: 'line' | 'space';
-}
-export interface VueTemplateCompilerResults {
-    ast: Object | void;
-    render: string;
-    staticRenderFns: string[];
-    errors: string[];
-    tips: string[];
-}

+ 0 - 2
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/dist/types.js

@@ -1,2 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });

+ 0 - 143
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/lib/compileStyle.ts

@@ -1,143 +0,0 @@
-const postcss = require('postcss')
-import { ProcessOptions, LazyResult } from 'postcss'
-import trimPlugin from './stylePlugins/trim'
-import scopedPlugin from './stylePlugins/scoped'
-import {
-  processors,
-  StylePreprocessor,
-  StylePreprocessorResults
-} from './styleProcessors'
-
-export interface StyleCompileOptions {
-  source: string
-  filename: string
-  id: string
-  map?: any
-  scoped?: boolean
-  trim?: boolean
-  preprocessLang?: string
-  preprocessOptions?: any
-  postcssOptions?: any
-  postcssPlugins?: any[]
-}
-
-export interface AsyncStyleCompileOptions extends StyleCompileOptions {
-  isAsync?: boolean
-}
-
-export interface StyleCompileResults {
-  code: string
-  map: any | void
-  rawResult: LazyResult | void
-  errors: string[]
-}
-
-export function compileStyle(
-  options: StyleCompileOptions
-): StyleCompileResults {
-  return doCompileStyle({ ...options, isAsync: false })
-}
-
-export function compileStyleAsync(
-  options: StyleCompileOptions
-): Promise<StyleCompileResults> {
-  return Promise.resolve(doCompileStyle({ ...options, isAsync: true }))
-}
-
-export function doCompileStyle(
-  options: AsyncStyleCompileOptions
-): StyleCompileResults {
-  const {
-    filename,
-    id,
-    scoped = true,
-    trim = true,
-    preprocessLang,
-    postcssOptions,
-    postcssPlugins
-  } = options
-  const preprocessor = preprocessLang && processors[preprocessLang]
-  const preProcessedSource = preprocessor && preprocess(options, preprocessor)
-  const map = preProcessedSource ? preProcessedSource.map : options.map
-  const source = preProcessedSource ? preProcessedSource.code : options.source
-
-  const plugins = (postcssPlugins || []).slice()
-  if (trim) {
-    plugins.push(trimPlugin())
-  }
-  if (scoped) {
-    plugins.push(scopedPlugin(id))
-  }
-
-  const postCSSOptions: ProcessOptions = {
-    ...postcssOptions,
-    to: filename,
-    from: filename
-  }
-  if (map) {
-    postCSSOptions.map = {
-      inline: false,
-      annotation: false,
-      prev: map
-    }
-  }
-
-  let result, code, outMap
-  const errors: any[] = []
-  if (preProcessedSource && preProcessedSource.errors.length) {
-    errors.push(...preProcessedSource.errors)
-  }
-  try {
-    result = postcss(plugins).process(source, postCSSOptions)
-
-    // In async mode, return a promise.
-    if (options.isAsync) {
-      return result
-        .then(
-          (result: LazyResult): StyleCompileResults => ({
-            code: result.css || '',
-            map: result.map && result.map.toJSON(),
-            errors,
-            rawResult: result
-          })
-        )
-        .catch(
-          (error: Error): StyleCompileResults => ({
-            code: '',
-            map: undefined,
-            errors: [...errors, error.message],
-            rawResult: undefined
-          })
-        )
-    }
-
-    // force synchronous transform (we know we only have sync plugins)
-    code = result.css
-    outMap = result.map
-  } catch (e) {
-    errors.push(e)
-  }
-
-  return {
-    code: code || ``,
-    map: outMap && outMap.toJSON(),
-    errors,
-    rawResult: result
-  }
-}
-
-function preprocess(
-  options: StyleCompileOptions,
-  preprocessor: StylePreprocessor
-): StylePreprocessorResults {
-  return preprocessor.render(
-    options.source,
-    options.map,
-    Object.assign(
-      {
-        filename: options.filename
-      },
-      options.preprocessOptions
-    )
-  )
-}

+ 0 - 176
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/lib/compileTemplate.ts

@@ -1,176 +0,0 @@
-import { VueTemplateCompiler, VueTemplateCompilerOptions } from './types'
-
-import assetUrlsModule, {
-  AssetURLOptions
-} from './templateCompilerModules/assetUrl'
-import srcsetModule from './templateCompilerModules/srcset'
-
-const prettier = require('prettier')
-const consolidate = require('consolidate')
-const transpile = require('vue-template-es2015-compiler')
-
-export interface TemplateCompileOptions {
-  source: string
-  filename: string
-  compiler: VueTemplateCompiler
-  compilerOptions?: VueTemplateCompilerOptions
-  transformAssetUrls?: AssetURLOptions | boolean
-  preprocessLang?: string
-  preprocessOptions?: any
-  transpileOptions?: any
-  isProduction?: boolean
-  isFunctional?: boolean
-  optimizeSSR?: boolean
-}
-
-export interface TemplateCompileResult {
-  code: string
-  source: string
-  tips: string[]
-  errors: string[]
-}
-
-export function compileTemplate(
-  options: TemplateCompileOptions
-): TemplateCompileResult {
-  const { preprocessLang } = options
-  const preprocessor = preprocessLang && consolidate[preprocessLang]
-  if (preprocessor) {
-    return actuallyCompile(
-      Object.assign({}, options, {
-        source: preprocess(options, preprocessor)
-      })
-    )
-  } else if (preprocessLang) {
-    return {
-      code: `var render = function () {}\n` + `var staticRenderFns = []\n`,
-      source: options.source,
-      tips: [
-        `Component ${
-          options.filename
-        } uses lang ${preprocessLang} for template. Please install the language preprocessor.`
-      ],
-      errors: [
-        `Component ${
-          options.filename
-        } uses lang ${preprocessLang} for template, however it is not installed.`
-      ]
-    }
-  } else {
-    return actuallyCompile(options)
-  }
-}
-
-function preprocess(
-  options: TemplateCompileOptions,
-  preprocessor: any
-): string {
-  const { source, filename, preprocessOptions } = options
-
-  const finalPreprocessOptions = Object.assign(
-    {
-      filename
-    },
-    preprocessOptions
-  )
-
-  // Consolidate exposes a callback based API, but the callback is in fact
-  // called synchronously for most templating engines. In our case, we have to
-  // expose a synchronous API so that it is usable in Jest transforms (which
-  // have to be sync because they are applied via Node.js require hooks)
-  let res: any, err
-  preprocessor.render(
-    source,
-    finalPreprocessOptions,
-    (_err: Error | null, _res: string) => {
-      if (_err) err = _err
-      res = _res
-    }
-  )
-
-  if (err) throw err
-  return res
-}
-
-function actuallyCompile(
-  options: TemplateCompileOptions
-): TemplateCompileResult {
-  const {
-    source,
-    compiler,
-    compilerOptions = {},
-    transpileOptions = {},
-    transformAssetUrls,
-    isProduction = process.env.NODE_ENV === 'production',
-    isFunctional = false,
-    optimizeSSR = false
-  } = options
-
-  const compile =
-    optimizeSSR && compiler.ssrCompile ? compiler.ssrCompile : compiler.compile
-
-  let finalCompilerOptions = compilerOptions
-  if (transformAssetUrls) {
-    const builtInModules = [
-      transformAssetUrls === true
-        ? assetUrlsModule()
-        : assetUrlsModule(transformAssetUrls),
-      srcsetModule()
-    ]
-    finalCompilerOptions = Object.assign({}, compilerOptions, {
-      modules: [...builtInModules, ...(compilerOptions.modules || [])]
-    })
-  }
-
-  const { render, staticRenderFns, tips, errors } = compile(
-    source,
-    finalCompilerOptions
-  )
-
-  if (errors && errors.length) {
-    return {
-      code: `var render = function () {}\n` + `var staticRenderFns = []\n`,
-      source,
-      tips,
-      errors
-    }
-  } else {
-    const finalTranspileOptions = Object.assign({}, transpileOptions, {
-      transforms: Object.assign({}, transpileOptions.transforms, {
-        stripWithFunctional: isFunctional
-      })
-    })
-
-    const toFunction = (code: string): string => {
-      return `function (${isFunctional ? `_h,_vm` : ``}) {${code}}`
-    }
-
-    // transpile code with vue-template-es2015-compiler, which is a forked
-    // version of Buble that applies ES2015 transforms + stripping `with` usage
-    let code =
-      transpile(
-        `var __render__ = ${toFunction(render)}\n` +
-          `var __staticRenderFns__ = [${staticRenderFns.map(toFunction)}]`,
-        finalTranspileOptions
-      ) + `\n`
-
-    // #23 we use __render__ to avoid `render` not being prefixed by the
-    // transpiler when stripping with, but revert it back to `render` to
-    // maintain backwards compat
-    code = code.replace(/\s__(render|staticRenderFns)__\s/g, ' $1 ')
-
-    if (!isProduction) {
-      // mark with stripped (this enables Vue to use correct runtime proxy
-      // detection)
-      code += `render._withStripped = true`
-      code = prettier.format(code, { semi: false, parser: 'babylon' })
-    }
-
-    return {
-      code,
-      source,
-      tips,
-      errors
-    }
-  }
-}

+ 0 - 28
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/lib/index.ts

@@ -1,28 +0,0 @@
-import { parse, SFCBlock, SFCCustomBlock, SFCDescriptor } from './parse'
-
-import {
-  compileTemplate,
-  TemplateCompileOptions,
-  TemplateCompileResult
-} from './compileTemplate'
-
-import {
-  compileStyle,
-  compileStyleAsync,
-  StyleCompileOptions,
-  StyleCompileResults
-} from './compileStyle'
-
-// API
-export { parse, compileTemplate, compileStyle, compileStyleAsync }
-
-// types
-export {
-  SFCBlock,
-  SFCCustomBlock,
-  SFCDescriptor,
-  TemplateCompileOptions,
-  TemplateCompileResult,
-  StyleCompileOptions,
-  StyleCompileResults
-}

+ 0 - 112
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/lib/parse.ts

@@ -1,112 +0,0 @@
-import {
-  RawSourceMap,
-  VueTemplateCompiler,
-  VueTemplateCompilerParseOptions
-} from './types'
-
-const hash = require('hash-sum')
-const cache = require('lru-cache')(100)
-const { SourceMapGenerator } = require('source-map')
-
-const splitRE = /\r?\n/g
-const emptyRE = /^(?:\/\/)?\s*$/
-
-export interface ParseOptions {
-  source: string
-  filename?: string
-  compiler: VueTemplateCompiler
-  compilerParseOptions?: VueTemplateCompilerParseOptions
-  sourceRoot?: string
-  needMap?: boolean
-}
-
-export interface SFCCustomBlock {
-  type: string
-  content: string
-  attrs: { [key: string]: string }
-  start: number
-  end: number
-  map: RawSourceMap
-}
-
-export interface SFCBlock extends SFCCustomBlock {
-  lang?: string
-  src?: string
-  scoped?: boolean
-  module?: string | boolean
-}
-
-export interface SFCDescriptor {
-  template?: SFCBlock
-  script?: SFCBlock
-  styles: SFCBlock[]
-  customBlocks: SFCCustomBlock[]
-}
-
-export function parse(options: ParseOptions): SFCDescriptor {
-  const {
-    source,
-    filename = '',
-    compiler,
-    compilerParseOptions = { pad: 'line' },
-    sourceRoot = process.cwd(),
-    needMap = true
-  } = options
-  const cacheKey = hash(filename + source)
-  let output: SFCDescriptor = cache.get(cacheKey)
-  if (output) return output
-  output = compiler.parseComponent(source, compilerParseOptions)
-  if (needMap) {
-    if (output.script && !output.script.src) {
-      output.script.map = generateSourceMap(
-        filename,
-        source,
-        output.script.content,
-        sourceRoot
-      )
-    }
-    if (output.styles) {
-      output.styles.forEach(style => {
-        if (!style.src) {
-          style.map = generateSourceMap(
-            filename,
-            source,
-            style.content,
-            sourceRoot
-          )
-        }
-      })
-    }
-  }
-  cache.set(cacheKey, output)
-  return output
-}
-
-function generateSourceMap(
-  filename: string,
-  source: string,
-  generated: string,
-  sourceRoot: string
-): RawSourceMap {
-  const map = new SourceMapGenerator({
-    file: filename,
-    sourceRoot
-  })
-  map.setSourceContent(filename, source)
-  generated.split(splitRE).forEach((line, index) => {
-    if (!emptyRE.test(line)) {
-      map.addMapping({
-        source: filename,
-        original: {
-          line: index + 1,
-          column: 0
-        },
-        generated: {
-          line: index + 1,
-          column: 0
-        }
-      })
-    }
-  })
-  return map.toJSON()
-}

+ 0 - 99
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/lib/stylePlugins/scoped.ts

@@ -1,99 +0,0 @@
-import { Root } from 'postcss'
-import * as postcss from 'postcss'
-// postcss-selector-parser does have typings but it's problematic to work with.
-const selectorParser = require('postcss-selector-parser')
-
-export default postcss.plugin('add-id', (options: any) => (root: Root) => {
-  const id: string = options
-  const keyframes = Object.create(null)
-
-  root.each(function rewriteSelector(node: any) {
-    if (!node.selector) {
-      // handle media queries
-      if (node.type === 'atrule') {
-        if (node.name === 'media' || node.name === 'supports') {
-          node.each(rewriteSelector)
-        } else if (/-?keyframes$/.test(node.name)) {
-          // register keyframes
-          keyframes[node.params] = node.params = node.params + '-' + id
-        }
-      }
-      return
-    }
-    node.selector = selectorParser((selectors: any) => {
-      selectors.each((selector: any) => {
-        let node: any = null
-        let hasDeep: boolean = false
-        selector.each((n: any) => {
-          // ">>>" combinator
-          if (n.type === 'combinator' && n.value === '>>>') {
-            n.value = ' '
-            n.spaces.before = n.spaces.after = ''
-            hasDeep = true
-            return false
-          }
-          // /deep/ alias for >>>, since >>> doesn't work in SASS
-          if (n.type === 'tag' && n.value === '/deep/') {
-            const prev = n.prev()
-            if (prev && prev.type === 'combinator' && prev.value === ' ') {
-              prev.remove()
-            }
-            n.remove()
-            hasDeep = true
-            return false
-          }
-          if (n.type !== 'pseudo' && n.type !== 'combinator') {
-            node = n
-          }
-        })
-        if (node) {
-          node.spaces.after = ''
-          selector.insertAfter(
-            node,
-            selectorParser.attribute({
-              attribute: id
-            })
-          )
-        } else if (hasDeep) {
-          selector.prepend(
-            selectorParser.attribute({
-              attribute: id
-            })
-          )
-        }
-      })
-    }).processSync(node.selector)
-  })
-
-  // If keyframes are found in this <style>, find and rewrite animation names
-  // in declarations.
-  // Caveat: this only works for keyframes and animation rules in the same
-  // <style> element.
-  if (Object.keys(keyframes).length) {
-    root.walkDecls(decl => {
-      // individual animation-name declaration
-      if (/^(-\w+-)?animation-name$/.test(decl.prop)) {
-        decl.value = decl.value
-          .split(',')
-          .map(v => keyframes[v.trim()] || v.trim())
-          .join(',')
-      }
-      // shorthand
-      if (/^(-\w+-)?animation$/.test(decl.prop)) {
-        decl.value = decl.value
-          .split(',')
-          .map(v => {
-            const vals = v.trim().split(/\s+/)
-            const i = vals.findIndex(val => keyframes[val])
-            if (i !== -1) {
-              vals.splice(i, 1, keyframes[vals[i]])
-              return vals.join(' ')
-            } else {
-              return v
-            }
-          })
-          .join(',')
-      }
-    })
-  }
-})

+ 0 - 10
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/lib/stylePlugins/trim.ts

@@ -1,10 +0,0 @@
-import { Root } from 'postcss'
-import * as postcss from 'postcss'
-
-export default postcss.plugin('trim', () => (css: Root) => {
-  css.walk(({ type, raws }) => {
-    if (type === 'rule' || type === 'atrule') {
-      raws.before = raws.after = '\n'
-    }
-  })
-})

+ 0 - 133
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/lib/styleProcessors/index.ts

@@ -1,133 +0,0 @@
-const merge = require('merge-source-map')
-
-export interface StylePreprocessor {
-  render(
-    source: string,
-    map: any | null,
-    options: any
-  ): StylePreprocessorResults
-}
-
-export interface StylePreprocessorResults {
-  code: string
-  map?: any
-  errors: Array<Error>
-}
-
-// .scss/.sass processor
-const scss: StylePreprocessor = {
-  render(
-    source: string,
-    map: any | null,
-    options: any
-  ): StylePreprocessorResults {
-    const nodeSass = require('node-sass')
-    const finalOptions = Object.assign({}, options, {
-      data: source,
-      file: options.filename,
-      outFile: options.filename,
-      sourceMap: !!map
-    })
-
-    try {
-      const result = nodeSass.renderSync(finalOptions)
-
-      if (map) {
-        return {
-          code: result.css.toString(),
-          map: merge(map, JSON.parse(result.map.toString())),
-          errors: []
-        }
-      }
-
-      return { code: result.css.toString(), errors: [] }
-    } catch (e) {
-      return { code: '', errors: [e] }
-    }
-  }
-}
-
-const sass = {
-  render(
-    source: string,
-    map: any | null,
-    options: any
-  ): StylePreprocessorResults {
-    return scss.render(
-      source,
-      map,
-      Object.assign({}, options, { indentedSyntax: true })
-    )
-  }
-}
-
-// .less
-const less = {
-  render(
-    source: string,
-    map: any | null,
-    options: any
-  ): StylePreprocessorResults {
-    const nodeLess = require('less')
-
-    let result: any
-    let error: Error | null = null
-    nodeLess.render(
-      source,
-      Object.assign({}, options, { syncImport: true }),
-      (err: Error | null, output: any) => {
-        error = err
-        result = output
-      }
-    )
-
-    if (error) return { code: '', errors: [error] }
-
-    if (map) {
-      return {
-        code: result.css.toString(),
-        map: merge(map, result.map),
-        errors: []
-      }
-    }
-
-    return { code: result.css.toString(), errors: [] }
-  }
-}
-
-// .styl
-const styl = {
-  render(
-    source: string,
-    map: any | null,
-    options: any
-  ): StylePreprocessorResults {
-    const nodeStylus = require('stylus')
-    try {
-      const ref = nodeStylus(source)
-      Object.keys(options).forEach(key => ref.set(key, options[key]))
-      if (map) ref.set('sourcemap', { inline: false, comment: false })
-
-      const result = ref.render()
-      if (map) {
-        return {
-          code: result,
-          map: merge(map, ref.sourcemap),
-          errors: []
-        }
-      }
-
-      return { code: result, errors: [] }
-    } catch (e) {
-      return { code: '', errors: [e] }
-    }
-  }
-}
-
-export const processors: { [key: string]: StylePreprocessor } = {
-  less,
-  sass,
-  scss,
-  styl,
-  stylus: styl
-}

+ 0 - 51
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/lib/templateCompilerModules/assetUrl.ts

@@ -1,51 +0,0 @@
-// vue compiler module for transforming `<tag>:<attribute>` to `require`
-
-import { urlToRequire, ASTNode, Attr } from './utils'
-
-export interface AssetURLOptions {
-  [name: string]: string | string[]
-}
-
-const defaultOptions: AssetURLOptions = {
-  video: ['src', 'poster'],
-  source: 'src',
-  img: 'src',
-  image: ['xlink:href', 'href']
-}
-
-export default (userOptions?: AssetURLOptions) => {
-  const options = userOptions
-    ? Object.assign({}, defaultOptions, userOptions)
-    : defaultOptions
-
-  return {
-    postTransformNode: (node: ASTNode) => {
-      transform(node, options)
-    }
-  }
-}
-
-function transform(node: ASTNode, options: AssetURLOptions) {
-  for (const tag in options) {
-    if ((tag === '*' || node.tag === tag) && node.attrs) {
-      const attributes = options[tag]
-      if (typeof attributes === 'string') {
-        node.attrs.some(attr => rewrite(attr, attributes))
-      } else if (Array.isArray(attributes)) {
-        attributes.forEach(item => node.attrs.some(attr => rewrite(attr, item)))
-      }
-    }
-  }
-}
-
-function rewrite(attr: Attr, name: string) {
-  if (attr.name === name) {
-    const value = attr.value
-    // only transform static URLs
-    if (value.charAt(0) === '"' && value.charAt(value.length - 1) === '"') {
-      attr.value = urlToRequire(value.slice(1, -1))
-      return true
-    }
-  }
-  return false
-}

+ 0 - 66
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/lib/templateCompilerModules/srcset.ts

@@ -1,66 +0,0 @@
-// vue compiler module for transforming `img:srcset` to a number of `require`s
-
-import { urlToRequire, ASTNode } from './utils'
-
-interface ImageCandidate {
-  require: string
-  descriptor: string
-}
-
-export default () => ({
-  postTransformNode: (node: ASTNode) => {
-    transform(node)
-  }
-})
-
-// http://w3c.github.io/html/semantics-embedded-content.html#ref-for-image-candidate-string-5
-const escapedSpaceCharacters = /( |\\t|\\n|\\f|\\r)+/g
-
-function transform(node: ASTNode) {
-  const tags = ['img', 'source']
-
-  if (tags.indexOf(node.tag) !== -1 && node.attrs) {
-    node.attrs.forEach(attr => {
-      if (attr.name === 'srcset') {
-        // same logic as in transform-require.js
-        const value = attr.value
-        const isStatic =
-          value.charAt(0) === '"' && value.charAt(value.length - 1) === '"'
-        if (!isStatic) {
-          return
-        }
-
-        const imageCandidates: ImageCandidate[] = value
-          .substr(1, value.length - 2)
-          .split(',')
-          .map(s => {
-            // The attribute value arrives here with all whitespace, except
-            // normal spaces, represented by escape sequences
-            const [url, descriptor] = s
-              .replace(escapedSpaceCharacters, ' ')
-              .trim()
-              .split(' ', 2)
-            return { require: urlToRequire(url), descriptor }
-          })
-
-        // "require(url1)"
-        // "require(url1) 1x"
-        // "require(url1), require(url2)"
-        // "require(url1), require(url2) 2x"
-        // "require(url1) 1x, require(url2)"
-        // "require(url1) 1x, require(url2) 2x"
-        const code = imageCandidates
-          .map(
-            ({ require, descriptor }) =>
-              `${require} + "${descriptor ? ' ' + descriptor : ''}, " + `
-          )
-          .join('')
-          .slice(0, -6)
-          .concat('"')
-          .replace(/ \+ ""$/, '')
-
-        attr.value = code
-      }
-    })
-  }
-}

+ 0 - 23
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/lib/templateCompilerModules/utils.ts

@@ -1,23 +0,0 @@
-export interface Attr {
-  name: string
-  value: string
-}
-
-export interface ASTNode {
-  tag: string
-  attrs: Attr[]
-}
-
-export function urlToRequire(url: string): string {
-  // same logic as in transform-require.js
-  const firstChar = url.charAt(0)
-  if (firstChar === '.' || firstChar === '~' || firstChar === '@') {
-    if (firstChar === '~') {
-      const secondChar = url.charAt(1)
-      url = url.slice(secondChar === '/' ? 2 : 1)
-    }
-    return `require("${url}")`
-  } else {
-    return `"${url}"`
-  }
-}

+ 0 - 47
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/lib/types.ts

@@ -1,47 +0,0 @@
-import { SFCDescriptor } from './parse'
-
-export interface StartOfSourceMap {
-  file?: string
-  sourceRoot?: string
-}
-
-export interface RawSourceMap extends StartOfSourceMap {
-  version: string
-  sources: string[]
-  names: string[]
-  sourcesContent?: string[]
-  mappings: string
-}
-
-export interface VueTemplateCompiler {
-  parseComponent(source: string, options?: any): SFCDescriptor
-
-  compile(
-    template: string,
-    options: VueTemplateCompilerOptions
-  ): VueTemplateCompilerResults
-
-  ssrCompile(
-    template: string,
-    options: VueTemplateCompilerOptions
-  ): VueTemplateCompilerResults
-}
-
-// we'll just shim this much for now - in the future these types
-// should come from vue-template-compiler directly, or this package should be
-// part of the vue monorepo.
-export interface VueTemplateCompilerOptions {
-  modules?: Object[]
-}
-
-export interface VueTemplateCompilerParseOptions {
-  pad?: 'line' | 'space'
-}
-
-export interface VueTemplateCompilerResults {
-  ast: Object | void
-  render: string
-  staticRenderFns: string[]
-  errors: string[]
-  tips: string[]
-}

+ 0 - 64
dolphinscheduler-ui/src/lib/@vue/component-compiler-utils/package.json

@@ -1,64 +0,0 @@
-{
-  "name": "@vue/component-compiler-utils",
-  "version": "2.2.0",
-  "description": "Lower level utilities for compiling Vue single file components",
-  "main": "dist/index.js",
-  "typings": "dist/index.d.ts",
-  "scripts": {
-    "lint": "prettier --write \"{lib,test}/**/*.ts\"",
-    "test": "prettier --list-different \"{lib,test}/**/*.ts\" && jest",
-    "build": "rm -rf dist && tsc",
-    "prepublishOnly": "yarn build && conventional-changelog -p angular -r 2 -i CHANGELOG.md -s"
-  },
-  "gitHooks": {
-    "pre-commit": "lint-staged"
-  },
-  "lint-staged": {
-    "*.{ts,js}": [
-      "prettier --write",
-      "git add"
-    ]
-  },
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/vuejs/component-compiler-utils.git"
-  },
-  "keywords": [
-    "vue",
-    "sfc",
-    "component",
-    "compiler"
-  ],
-  "author": "Evan You",
-  "license": "MIT",
-  "bugs": {
-    "url": "https://github.com/vuejs/component-compiler-utils/issues"
-  },
-  "homepage": "https://github.com/vuejs/component-compiler-utils#readme",
-  "devDependencies": {
-    "@types/jest": "^22.2.3",
-    "@types/node": "^9.4.7",
-    "conventional-changelog-cli": "^1.3.22",
-    "jest": "^22.4.2",
-    "less": "^3.0.1",
-    "lint-staged": "^7.2.0",
-    "node-sass": "^4.8.3",
-    "pug": "^2.0.3",
-    "stylus": "^0.54.5",
-    "ts-jest": "^22.4.2",
-    "typescript": "^2.7.2",
-    "vue-template-compiler": "^2.5.16",
-    "yorkie": "^1.0.3"
-  },
-  "dependencies": {
-    "consolidate": "^0.15.1",
-    "hash-sum": "^1.0.2",
-    "lru-cache": "^4.1.2",
-    "merge-source-map": "^1.1.0",
-    "postcss": "^6.0.20",
-    "postcss-selector-parser": "^3.1.1",
-    "prettier": "1.13.7",
-    "source-map": "^0.5.6",
-    "vue-template-es2015-compiler": "^1.6.0"
-  }
-}