@lynxwall/cucumber-tsflow 6.0.2 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cucumber-tsflow +0 -0
- package/lib/behave.d.ts +1 -1
- package/lib/behave.js +27 -27
- package/lib/cli/argv-parser.d.ts +24 -24
- package/lib/cli/argv-parser.js +103 -103
- package/lib/cli/index.d.ts +22 -22
- package/lib/cli/index.js +100 -100
- package/lib/cli/load-configuration.d.ts +20 -20
- package/lib/cli/load-configuration.js +92 -92
- package/lib/cli/run.d.ts +1 -1
- package/lib/cli/run.js +47 -49
- package/lib/cucumber/binding-decorator.d.ts +10 -10
- package/lib/cucumber/binding-decorator.js +180 -180
- package/lib/cucumber/binding-registry.d.ts +82 -82
- package/lib/cucumber/binding-registry.js +215 -215
- package/lib/cucumber/hook-decorators.d.ts +46 -46
- package/lib/cucumber/hook-decorators.js +102 -102
- package/lib/cucumber/managed-scenario-context.d.ts +21 -21
- package/lib/cucumber/managed-scenario-context.js +95 -95
- package/lib/cucumber/message-collector.d.ts +81 -81
- package/lib/cucumber/message-collector.js +250 -250
- package/lib/cucumber/parallel/coordinator.d.ts +79 -79
- package/lib/cucumber/parallel/coordinator.js +246 -246
- package/lib/cucumber/parallel/run-worker.d.ts +1 -1
- package/lib/cucumber/parallel/run-worker.js +31 -31
- package/lib/cucumber/parallel/worker.d.ts +30 -30
- package/lib/cucumber/parallel/worker.js +103 -103
- package/lib/cucumber/run-cucumber.d.ts +14 -14
- package/lib/cucumber/run-cucumber.js +117 -117
- package/lib/cucumber/runtime.d.ts +25 -25
- package/lib/cucumber/runtime.js +39 -39
- package/lib/cucumber/step-definition-decorators.d.ts +24 -24
- package/lib/cucumber/step-definition-decorators.js +91 -91
- package/lib/cucumber/utils.d.ts +16 -16
- package/lib/cucumber/utils.js +77 -77
- package/lib/esnode.js +18 -18
- package/lib/esvue.d.ts +1 -1
- package/lib/esvue.js +40 -40
- package/lib/formatters/behave-json-formatter.d.ts +49 -49
- package/lib/formatters/behave-json-formatter.js +74 -74
- package/lib/formatters/tsflow-snippet-syntax.d.ts +9 -9
- package/lib/formatters/tsflow-snippet-syntax.js +89 -89
- package/lib/gherkin/configuration.d.ts +30 -30
- package/lib/gherkin/configuration.js +26 -26
- package/lib/gherkin/gherkin-feature.d.ts +28 -28
- package/lib/gherkin/gherkin-feature.js +333 -333
- package/lib/gherkin/gherkin-manager.d.ts +29 -29
- package/lib/gherkin/gherkin-manager.js +139 -114
- package/lib/gherkin/models.d.ts +45 -45
- package/lib/gherkin/models.js +2 -2
- package/lib/index.d.ts +4 -4
- package/lib/index.js +22 -22
- package/lib/snippet.d.ts +1 -1
- package/lib/snippet.js +27 -27
- package/lib/transpilers/esbuild-transpiler.d.ts +4 -4
- package/lib/transpilers/esbuild-transpiler.js +18 -18
- package/lib/transpilers/esbuild.d.ts +12 -12
- package/lib/transpilers/esbuild.js +54 -54
- package/lib/transpilers/vue-sfc/compiler.d.ts +7 -7
- package/lib/transpilers/vue-sfc/compiler.js +21 -21
- package/lib/transpilers/vue-sfc/index.d.ts +23 -23
- package/lib/transpilers/vue-sfc/index.js +46 -46
- package/lib/transpilers/vue-sfc/main.d.ts +8 -8
- package/lib/transpilers/vue-sfc/main.js +247 -247
- package/lib/transpilers/vue-sfc/script.d.ts +5 -5
- package/lib/transpilers/vue-sfc/script.js +41 -41
- package/lib/transpilers/vue-sfc/template.d.ts +8 -8
- package/lib/transpilers/vue-sfc/template.js +101 -101
- package/lib/transpilers/vue-sfc/types.d.ts +55 -55
- package/lib/transpilers/vue-sfc/types.js +2 -2
- package/lib/transpilers/vue-sfc/utils/descriptorCache.d.ts +13 -13
- package/lib/transpilers/vue-sfc/utils/descriptorCache.js +67 -67
- package/lib/transpilers/vue-sfc/utils/error.d.ts +3 -3
- package/lib/transpilers/vue-sfc/utils/error.js +22 -22
- package/lib/transpilers/vue-sfc/utils/query.d.ts +13 -13
- package/lib/transpilers/vue-sfc/utils/query.js +35 -35
- package/lib/tsnode.js +17 -17
- package/lib/tsvue.d.ts +1 -1
- package/lib/tsvue.js +39 -39
- package/lib/types/scenario-context.d.ts +16 -16
- package/lib/types/scenario-context.js +17 -17
- package/lib/types/scenario-info.d.ts +16 -16
- package/lib/types/scenario-info.js +22 -22
- package/lib/types/step-binding-flags.d.ts +53 -53
- package/lib/types/step-binding-flags.js +58 -58
- package/lib/types/step-binding.d.ts +50 -50
- package/lib/types/step-binding.js +17 -17
- package/lib/types/types.d.ts +21 -21
- package/lib/types/types.js +2 -2
- package/lib/utils/helpers.d.ts +6 -6
- package/lib/utils/helpers.js +17 -17
- package/lib/utils/logger.d.ts +3 -3
- package/lib/utils/logger.js +29 -29
- package/lib/utils/our-callsite.d.ts +27 -27
- package/lib/utils/our-callsite.js +72 -72
- package/lib/version.d.ts +1 -1
- package/lib/version.js +5 -5
- package/package.json +1 -1
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.transpileCode = exports.supports = exports.loaders = void 0;
|
|
7
|
-
const esbuild_1 = require("esbuild");
|
|
8
|
-
const path_1 = __importDefault(require("path"));
|
|
9
|
-
const defaultOptions = {
|
|
10
|
-
debug: false
|
|
11
|
-
};
|
|
12
|
-
const commonOptions = {
|
|
13
|
-
format: 'cjs',
|
|
14
|
-
logLevel: 'error',
|
|
15
|
-
target: [`node${process.version.slice(1)}`],
|
|
16
|
-
minify: false,
|
|
17
|
-
sourcemap: 'external'
|
|
18
|
-
};
|
|
19
|
-
exports.loaders = {
|
|
20
|
-
'.js': 'js',
|
|
21
|
-
'.mjs': 'js',
|
|
22
|
-
'.cjs': 'js',
|
|
23
|
-
'.jsx': 'jsx',
|
|
24
|
-
'.ts': 'ts',
|
|
25
|
-
'.tsx': 'tsx',
|
|
26
|
-
'.json': 'json'
|
|
27
|
-
};
|
|
28
|
-
const supports = (filename) => {
|
|
29
|
-
if (filename.includes('node_modules') || filename.includes('cucumber-tsflow/lib'))
|
|
30
|
-
return false;
|
|
31
|
-
return path_1.default.extname(filename) in exports.loaders;
|
|
32
|
-
};
|
|
33
|
-
exports.supports = supports;
|
|
34
|
-
const getLoaders = (options) => {
|
|
35
|
-
const ret = { ...exports.loaders };
|
|
36
|
-
if (typeof options.esbuild?.loader == 'object') {
|
|
37
|
-
for (const [e, l] of Object.entries(options.esbuild.loader))
|
|
38
|
-
ret[e] = l;
|
|
39
|
-
}
|
|
40
|
-
return ret;
|
|
41
|
-
};
|
|
42
|
-
const transpileCode = (code, filename, ext, _options) => {
|
|
43
|
-
const options = { ...defaultOptions, ..._options };
|
|
44
|
-
const loaders = getLoaders(options);
|
|
45
|
-
const loaderExt = ext != undefined ? ext : path_1.default.extname(filename);
|
|
46
|
-
const ret = (0, esbuild_1.transformSync)(code, {
|
|
47
|
-
...commonOptions,
|
|
48
|
-
...options.esbuild,
|
|
49
|
-
loader: loaders[loaderExt],
|
|
50
|
-
sourcefile: filename
|
|
51
|
-
});
|
|
52
|
-
return { output: ret.code, sourceMap: ret.map };
|
|
53
|
-
};
|
|
54
|
-
exports.transpileCode = transpileCode;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.transpileCode = exports.supports = exports.loaders = void 0;
|
|
7
|
+
const esbuild_1 = require("esbuild");
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const defaultOptions = {
|
|
10
|
+
debug: false
|
|
11
|
+
};
|
|
12
|
+
const commonOptions = {
|
|
13
|
+
format: 'cjs',
|
|
14
|
+
logLevel: 'error',
|
|
15
|
+
target: [`node${process.version.slice(1)}`],
|
|
16
|
+
minify: false,
|
|
17
|
+
sourcemap: 'external'
|
|
18
|
+
};
|
|
19
|
+
exports.loaders = {
|
|
20
|
+
'.js': 'js',
|
|
21
|
+
'.mjs': 'js',
|
|
22
|
+
'.cjs': 'js',
|
|
23
|
+
'.jsx': 'jsx',
|
|
24
|
+
'.ts': 'ts',
|
|
25
|
+
'.tsx': 'tsx',
|
|
26
|
+
'.json': 'json'
|
|
27
|
+
};
|
|
28
|
+
const supports = (filename) => {
|
|
29
|
+
if (filename.includes('node_modules') || filename.includes('cucumber-tsflow/lib'))
|
|
30
|
+
return false;
|
|
31
|
+
return path_1.default.extname(filename) in exports.loaders;
|
|
32
|
+
};
|
|
33
|
+
exports.supports = supports;
|
|
34
|
+
const getLoaders = (options) => {
|
|
35
|
+
const ret = { ...exports.loaders };
|
|
36
|
+
if (typeof options.esbuild?.loader == 'object') {
|
|
37
|
+
for (const [e, l] of Object.entries(options.esbuild.loader))
|
|
38
|
+
ret[e] = l;
|
|
39
|
+
}
|
|
40
|
+
return ret;
|
|
41
|
+
};
|
|
42
|
+
const transpileCode = (code, filename, ext, _options) => {
|
|
43
|
+
const options = { ...defaultOptions, ..._options };
|
|
44
|
+
const loaders = getLoaders(options);
|
|
45
|
+
const loaderExt = ext != undefined ? ext : path_1.default.extname(filename);
|
|
46
|
+
const ret = (0, esbuild_1.transformSync)(code, {
|
|
47
|
+
...commonOptions,
|
|
48
|
+
...options.esbuild,
|
|
49
|
+
loader: loaders[loaderExt],
|
|
50
|
+
sourcefile: filename
|
|
51
|
+
});
|
|
52
|
+
return { output: ret.code, sourceMap: ret.map };
|
|
53
|
+
};
|
|
54
|
+
exports.transpileCode = transpileCode;
|
|
55
55
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXNidWlsZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90cmFuc3BpbGVycy9lc2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UsQ0FBQztBQUNqRCxDQUFDLENBQUM7QUFqQlcsUUFBQSxhQUFhLGlCQWlCeEIifQ==
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
declare module 'vue/compiler-sfc' {
|
|
2
|
-
interface SFCDescriptor {
|
|
3
|
-
id: string;
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
|
-
import type * as _compiler from 'vue/compiler-sfc';
|
|
7
|
-
export declare const resolveCompiler: (root: string) => typeof _compiler;
|
|
1
|
+
declare module 'vue/compiler-sfc' {
|
|
2
|
+
interface SFCDescriptor {
|
|
3
|
+
id: string;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
import type * as _compiler from 'vue/compiler-sfc';
|
|
7
|
+
export declare const resolveCompiler: (root: string) => typeof _compiler;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveCompiler = void 0;
|
|
4
|
-
const resolveCompiler = (root) => {
|
|
5
|
-
// resolve from project root first, then fallback to peer dep (if any)
|
|
6
|
-
const compiler = tryRequire('vue/compiler-sfc', root) || tryRequire('vue/compiler-sfc');
|
|
7
|
-
if (!compiler) {
|
|
8
|
-
throw new Error(`Failed to resolve vue/compiler-sfc.\n` +
|
|
9
|
-
`@lynxwall/cucumber-tsflow/vue requires vue (>=3.2.25) ` +
|
|
10
|
-
`to be present in the dependency tree.`);
|
|
11
|
-
}
|
|
12
|
-
return compiler;
|
|
13
|
-
};
|
|
14
|
-
exports.resolveCompiler = resolveCompiler;
|
|
15
|
-
const tryRequire = (id, from) => {
|
|
16
|
-
try {
|
|
17
|
-
return from ? require(require.resolve(id, { paths: [from] })) : require(id);
|
|
18
|
-
// eslint-disable-next-line no-empty
|
|
19
|
-
}
|
|
20
|
-
catch (e) { }
|
|
21
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveCompiler = void 0;
|
|
4
|
+
const resolveCompiler = (root) => {
|
|
5
|
+
// resolve from project root first, then fallback to peer dep (if any)
|
|
6
|
+
const compiler = tryRequire('vue/compiler-sfc', root) || tryRequire('vue/compiler-sfc');
|
|
7
|
+
if (!compiler) {
|
|
8
|
+
throw new Error(`Failed to resolve vue/compiler-sfc.\n` +
|
|
9
|
+
`@lynxwall/cucumber-tsflow/vue requires vue (>=3.2.25) ` +
|
|
10
|
+
`to be present in the dependency tree.`);
|
|
11
|
+
}
|
|
12
|
+
return compiler;
|
|
13
|
+
};
|
|
14
|
+
exports.resolveCompiler = resolveCompiler;
|
|
15
|
+
const tryRequire = (id, from) => {
|
|
16
|
+
try {
|
|
17
|
+
return from ? require(require.resolve(id, { paths: [from] })) : require(id);
|
|
18
|
+
// eslint-disable-next-line no-empty
|
|
19
|
+
}
|
|
20
|
+
catch (e) { }
|
|
21
|
+
};
|
|
22
22
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcGlsZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdHJhbnNwaWxlcnMvdnVlLXNmYy9jb21waWxlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFTTyxNQUFNLGVBQWUsR0FBRyxDQUFDLElBQVksRUFBb0IsRUFBRTtJQUNqRSxzRUFBc0U7SUFDdEUsTUFBTSxRQUFRLEdBQUcsVUFBVSxDQUFDLGtCQUFrQixFQUFFLElBQUksQ0FBQyxJQUFJLFVBQVUsQ0FBQyxrQkFBa0IsQ0FBQyxDQUFDO0lBRXhGLElBQUksQ0FBQyxRQUFRLEVBQUU7UUFDZCxNQUFNLElBQUksS0FBSyxDQUNkLHVDQUF1QztZQUN0Qyx3REFBd0Q7WUFDeEQsdUNBQXVDLENBQ3hDLENBQUM7S0FDRjtJQUVELE9BQU8sUUFBUSxDQUFDO0FBQ2pCLENBQUMsQ0FBQztBQWJXLFFBQUEsZUFBZSxtQkFhMUI7QUFFRixNQUFNLFVBQVUsR0FBRyxDQUFDLEVBQVUsRUFBRSxJQUFhLEVBQUUsRUFBRTtJQUNoRCxJQUFJO1FBQ0gsT0FBTyxJQUFJLENBQUMsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxPQUFPLENBQUMsT0FBTyxDQUFDLEVBQUUsRUFBRSxFQUFFLEtBQUssRUFBRSxDQUFDLElBQUksQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUFDLENBQUM7UUFDNUUsb0NBQW9DO0tBQ3BDO0lBQUMsT0FBTyxDQUFDLEVBQUUsR0FBRTtBQUNmLENBQUMsQ0FBQyJ9
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import type { RollupError, RollupWarning } from 'rollup';
|
|
2
|
-
import type { Options, VueTransformerContext, VueResolvedId } from './types';
|
|
3
|
-
export { parseVueRequest, VueQuery } from './utils/query';
|
|
4
|
-
declare class VueTransformer implements VueTransformerContext {
|
|
5
|
-
private customElementFilter;
|
|
6
|
-
private options;
|
|
7
|
-
private isSSR;
|
|
8
|
-
constructor(rawOptions?: Options);
|
|
9
|
-
error: (err: string | RollupError, pos?: number | {
|
|
10
|
-
column: number;
|
|
11
|
-
line: number;
|
|
12
|
-
} | undefined) => void;
|
|
13
|
-
resolve: (id: string) => VueResolvedId | null;
|
|
14
|
-
warn: (warning: string | RollupWarning, pos?: number | {
|
|
15
|
-
column: number;
|
|
16
|
-
line: number;
|
|
17
|
-
} | undefined) => void;
|
|
18
|
-
transformCode: (code: string, filename: string) => {
|
|
19
|
-
code: string | undefined;
|
|
20
|
-
map: string | undefined;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
export default VueTransformer;
|
|
1
|
+
import type { RollupError, RollupWarning } from 'rollup';
|
|
2
|
+
import type { Options, VueTransformerContext, VueResolvedId } from './types';
|
|
3
|
+
export { parseVueRequest, VueQuery } from './utils/query';
|
|
4
|
+
declare class VueTransformer implements VueTransformerContext {
|
|
5
|
+
private customElementFilter;
|
|
6
|
+
private options;
|
|
7
|
+
private isSSR;
|
|
8
|
+
constructor(rawOptions?: Options);
|
|
9
|
+
error: (err: string | RollupError, pos?: number | {
|
|
10
|
+
column: number;
|
|
11
|
+
line: number;
|
|
12
|
+
} | undefined) => void;
|
|
13
|
+
resolve: (id: string) => VueResolvedId | null;
|
|
14
|
+
warn: (warning: string | RollupWarning, pos?: number | {
|
|
15
|
+
column: number;
|
|
16
|
+
line: number;
|
|
17
|
+
} | undefined) => void;
|
|
18
|
+
transformCode: (code: string, filename: string) => {
|
|
19
|
+
code: string | undefined;
|
|
20
|
+
map: string | undefined;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export default VueTransformer;
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseVueRequest = void 0;
|
|
4
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
5
|
-
const pluginutils_1 = require("@rollup/pluginutils");
|
|
6
|
-
const compiler_1 = require("./compiler");
|
|
7
|
-
const query_1 = require("./utils/query");
|
|
8
|
-
const main_1 = require("./main");
|
|
9
|
-
var query_2 = require("./utils/query");
|
|
10
|
-
Object.defineProperty(exports, "parseVueRequest", { enumerable: true, get: function () { return query_2.parseVueRequest; } });
|
|
11
|
-
class VueTransformer {
|
|
12
|
-
customElementFilter;
|
|
13
|
-
options;
|
|
14
|
-
isSSR = (opt) => opt === undefined ? false : typeof opt === 'boolean' ? opt : opt?.ssr === true;
|
|
15
|
-
constructor(rawOptions = {}) {
|
|
16
|
-
const { include = /\.vue$/, exclude, customElement = /\.ce\.vue$/, reactivityTransform = false } = rawOptions;
|
|
17
|
-
this.customElementFilter = typeof customElement === 'boolean' ? () => customElement : (0, pluginutils_1.createFilter)(customElement);
|
|
18
|
-
const rootDir = process.cwd();
|
|
19
|
-
this.options = {
|
|
20
|
-
isProduction: process.env.NODE_ENV === 'production',
|
|
21
|
-
compiler: (0, compiler_1.resolveCompiler)(rootDir),
|
|
22
|
-
...rawOptions,
|
|
23
|
-
include,
|
|
24
|
-
exclude,
|
|
25
|
-
customElement,
|
|
26
|
-
reactivityTransform,
|
|
27
|
-
root: rootDir,
|
|
28
|
-
sourceMap: true
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
error = (err, pos) => { };
|
|
32
|
-
resolve = (id) => {
|
|
33
|
-
// serve sub-part requests (*?vue) as virtual modules
|
|
34
|
-
if ((0, query_1.parseVueRequest)(id).query.vue) {
|
|
35
|
-
return { external: false, id: id };
|
|
36
|
-
}
|
|
37
|
-
return null;
|
|
38
|
-
};
|
|
39
|
-
warn = (warning, pos) => { };
|
|
40
|
-
transformCode = (code, filename) => {
|
|
41
|
-
const ssr = this.isSSR(false);
|
|
42
|
-
const result = (0, main_1.transformMain)(code, filename, this.options, this, ssr, this.customElementFilter(filename));
|
|
43
|
-
return { code: result?.code, map: result?.map.mappings };
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
exports.default = VueTransformer;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseVueRequest = void 0;
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
5
|
+
const pluginutils_1 = require("@rollup/pluginutils");
|
|
6
|
+
const compiler_1 = require("./compiler");
|
|
7
|
+
const query_1 = require("./utils/query");
|
|
8
|
+
const main_1 = require("./main");
|
|
9
|
+
var query_2 = require("./utils/query");
|
|
10
|
+
Object.defineProperty(exports, "parseVueRequest", { enumerable: true, get: function () { return query_2.parseVueRequest; } });
|
|
11
|
+
class VueTransformer {
|
|
12
|
+
customElementFilter;
|
|
13
|
+
options;
|
|
14
|
+
isSSR = (opt) => opt === undefined ? false : typeof opt === 'boolean' ? opt : opt?.ssr === true;
|
|
15
|
+
constructor(rawOptions = {}) {
|
|
16
|
+
const { include = /\.vue$/, exclude, customElement = /\.ce\.vue$/, reactivityTransform = false } = rawOptions;
|
|
17
|
+
this.customElementFilter = typeof customElement === 'boolean' ? () => customElement : (0, pluginutils_1.createFilter)(customElement);
|
|
18
|
+
const rootDir = process.cwd();
|
|
19
|
+
this.options = {
|
|
20
|
+
isProduction: process.env.NODE_ENV === 'production',
|
|
21
|
+
compiler: (0, compiler_1.resolveCompiler)(rootDir),
|
|
22
|
+
...rawOptions,
|
|
23
|
+
include,
|
|
24
|
+
exclude,
|
|
25
|
+
customElement,
|
|
26
|
+
reactivityTransform,
|
|
27
|
+
root: rootDir,
|
|
28
|
+
sourceMap: true
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
error = (err, pos) => { };
|
|
32
|
+
resolve = (id) => {
|
|
33
|
+
// serve sub-part requests (*?vue) as virtual modules
|
|
34
|
+
if ((0, query_1.parseVueRequest)(id).query.vue) {
|
|
35
|
+
return { external: false, id: id };
|
|
36
|
+
}
|
|
37
|
+
return null;
|
|
38
|
+
};
|
|
39
|
+
warn = (warning, pos) => { };
|
|
40
|
+
transformCode = (code, filename) => {
|
|
41
|
+
const ssr = this.isSSR(false);
|
|
42
|
+
const result = (0, main_1.transformMain)(code, filename, this.options, this, ssr, this.customElementFilter(filename));
|
|
43
|
+
return { code: result?.code, map: result?.map.mappings };
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
exports.default = VueTransformer;
|
|
47
47
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdHJhbnNwaWxlcnMvdnVlLXNmYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxzREFBc0Q7QUFDdEQscURBQW1EO0FBRW5ELHlDQUE2QztBQUM3Qyx5Q0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RawSourceMap } from 'source-map';
|
|
2
|
-
import { VueTransformerContext, ResolvedOptions } from './types';
|
|
3
|
-
export declare const transformMain: (code: string, filename: string, options: ResolvedOptions, transformerContext: VueTransformerContext, ssr: boolean, asCustomElement: boolean) => {
|
|
4
|
-
code: string;
|
|
5
|
-
map: RawSourceMap | {
|
|
6
|
-
mappings: string;
|
|
7
|
-
};
|
|
8
|
-
} | null;
|
|
1
|
+
import type { RawSourceMap } from 'source-map';
|
|
2
|
+
import { VueTransformerContext, ResolvedOptions } from './types';
|
|
3
|
+
export declare const transformMain: (code: string, filename: string, options: ResolvedOptions, transformerContext: VueTransformerContext, ssr: boolean, asCustomElement: boolean) => {
|
|
4
|
+
code: string;
|
|
5
|
+
map: RawSourceMap | {
|
|
6
|
+
mappings: string;
|
|
7
|
+
};
|
|
8
|
+
} | null;
|