@lynxwall/cucumber-tsflow 7.5.5 → 7.6.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.
Files changed (48) hide show
  1. package/README.md +21 -5
  2. package/lib/api/load-configuration.js +0 -3
  3. package/lib/api/load-configuration.js.map +1 -1
  4. package/lib/api/load-support.d.ts +14 -0
  5. package/lib/api/load-support.js +112 -0
  6. package/lib/api/load-support.js.map +1 -1
  7. package/lib/transpilers/esm/vue-sfc-compiler.mjs +14 -333
  8. package/lib/transpilers/esvue.js +6 -9
  9. package/lib/transpilers/esvue.js.map +1 -1
  10. package/lib/transpilers/tsvue-exp.js +6 -9
  11. package/lib/transpilers/tsvue-exp.js.map +1 -1
  12. package/lib/transpilers/tsvue.js +5 -8
  13. package/lib/transpilers/tsvue.js.map +1 -1
  14. package/lib/transpilers/vue-sfc-compiler.d.ts +23 -0
  15. package/lib/transpilers/vue-sfc-compiler.js +242 -0
  16. package/lib/transpilers/vue-sfc-compiler.js.map +1 -0
  17. package/lib/tsconfig.node.tsbuildinfo +1 -1
  18. package/lib/version.d.ts +1 -1
  19. package/lib/version.js +1 -1
  20. package/lib/version.js.map +1 -1
  21. package/package.json +1 -3
  22. package/lib/transpilers/vue-sfc/compiler.d.ts +0 -7
  23. package/lib/transpilers/vue-sfc/compiler.js +0 -22
  24. package/lib/transpilers/vue-sfc/compiler.js.map +0 -1
  25. package/lib/transpilers/vue-sfc/index.d.ts +0 -23
  26. package/lib/transpilers/vue-sfc/index.js +0 -46
  27. package/lib/transpilers/vue-sfc/index.js.map +0 -1
  28. package/lib/transpilers/vue-sfc/main.d.ts +0 -8
  29. package/lib/transpilers/vue-sfc/main.js +0 -258
  30. package/lib/transpilers/vue-sfc/main.js.map +0 -1
  31. package/lib/transpilers/vue-sfc/script.d.ts +0 -5
  32. package/lib/transpilers/vue-sfc/script.js +0 -41
  33. package/lib/transpilers/vue-sfc/script.js.map +0 -1
  34. package/lib/transpilers/vue-sfc/template.d.ts +0 -8
  35. package/lib/transpilers/vue-sfc/template.js +0 -101
  36. package/lib/transpilers/vue-sfc/template.js.map +0 -1
  37. package/lib/transpilers/vue-sfc/types.d.ts +0 -55
  38. package/lib/transpilers/vue-sfc/types.js +0 -3
  39. package/lib/transpilers/vue-sfc/types.js.map +0 -1
  40. package/lib/transpilers/vue-sfc/utils/descriptorCache.d.ts +0 -13
  41. package/lib/transpilers/vue-sfc/utils/descriptorCache.js +0 -68
  42. package/lib/transpilers/vue-sfc/utils/descriptorCache.js.map +0 -1
  43. package/lib/transpilers/vue-sfc/utils/error.d.ts +0 -3
  44. package/lib/transpilers/vue-sfc/utils/error.js +0 -23
  45. package/lib/transpilers/vue-sfc/utils/error.js.map +0 -1
  46. package/lib/transpilers/vue-sfc/utils/query.d.ts +0 -13
  47. package/lib/transpilers/vue-sfc/utils/query.js +0 -36
  48. package/lib/transpilers/vue-sfc/utils/query.js.map +0 -1
@@ -1,68 +0,0 @@
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.setSrcDescriptor = exports.getSrcDescriptor = exports.getDescriptor = exports.setPrevDescriptor = exports.getPrevDescriptor = exports.createDescriptor = void 0;
7
- const path_1 = __importDefault(require("path"));
8
- const hash_sum_1 = __importDefault(require("hash-sum"));
9
- const cache = new Map();
10
- const prevCache = new Map();
11
- /**
12
- * code copied from slash npm package to resolve issue with latest
13
- * version being esm only
14
- */
15
- const slash = (path) => {
16
- const isExtendedLengthPath = /^\\\\\?\\/.test(path);
17
- const hasNonAscii = /[^\u0000-\u0080]+/.test(path); // eslint-disable-line no-control-regex
18
- if (isExtendedLengthPath || hasNonAscii) {
19
- return path;
20
- }
21
- return path.replace(/\\/g, '/');
22
- };
23
- const createDescriptor = (filename, source, { root, isProduction, sourceMap, compiler }) => {
24
- const { descriptor, errors } = compiler.parse(source, {
25
- filename,
26
- sourceMap
27
- });
28
- // ensure the path is normalized in a way that is consistent inside
29
- // project (relative to root) and on different systems.
30
- const normalizedPath = slash(path_1.default.normalize(path_1.default.relative(root, filename)));
31
- descriptor.id = (0, hash_sum_1.default)(normalizedPath + (isProduction ? source : ''));
32
- cache.set(filename, descriptor);
33
- return { descriptor, errors };
34
- };
35
- exports.createDescriptor = createDescriptor;
36
- const getPrevDescriptor = (filename) => {
37
- return prevCache.get(filename);
38
- };
39
- exports.getPrevDescriptor = getPrevDescriptor;
40
- const setPrevDescriptor = (filename, entry) => {
41
- prevCache.set(filename, entry);
42
- };
43
- exports.setPrevDescriptor = setPrevDescriptor;
44
- const getDescriptor = (source, filename, options, createIfNotFound = true) => {
45
- if (cache.has(filename)) {
46
- return cache.get(filename);
47
- }
48
- if (createIfNotFound) {
49
- const { descriptor, errors } = (0, exports.createDescriptor)(filename, source, options);
50
- if (errors.length) {
51
- throw errors[0];
52
- }
53
- return descriptor;
54
- }
55
- return undefined;
56
- };
57
- exports.getDescriptor = getDescriptor;
58
- const getSrcDescriptor = (filename, query) => {
59
- return cache.get(`${filename}?src=${query.src}`);
60
- };
61
- exports.getSrcDescriptor = getSrcDescriptor;
62
- const setSrcDescriptor = (filename, entry) => {
63
- // if multiple Vue files use the same src file, they will be overwritten
64
- // should use other key
65
- cache.set(`${filename}?src=${entry.id}`, entry);
66
- };
67
- exports.setSrcDescriptor = setSrcDescriptor;
68
- //# sourceMappingURL=descriptorCache.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"descriptorCache.js","sourceRoot":"","sources":["../../../../src/transpilers/vue-sfc/utils/descriptorCache.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AACxB,wDAA4B;AAW5B,MAAM,KAAK,GAAG,IAAI,GAAG,EAAyB,CAAC;AAC/C,MAAM,SAAS,GAAG,IAAI,GAAG,EAAqC,CAAC;AAE/D;;;GAGG;AACH,MAAM,KAAK,GAAG,CAAC,IAAY,EAAU,EAAE;IACtC,M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{ VueQuery } from './query';\r\nimport type { ResolvedOptions } from '../types';\r\n\r\n// compiler-sfc should be exported so it can be re-used\r\nexport interface SFCParseResult {\r\n\tdescriptor: SFCDescriptor;\r\n\terrors: Array<CompilerError | SyntaxError>;\r\n}\r\n\r\nconst cache = new Map<string, SFCDescriptor>();\r\nconst prevCache = new Map<string, SFCDescriptor | undefined>();\r\n\r\n/**\r\n * code copied from slash npm package to resolve issue with latest\r\n * version being esm only\r\n */\r\nconst slash = (path: string): string => {\r\n\tconst isExtendedLengthPath = /^\\\\\\\\\\?\\\\/.test(path);\r\n\tconst hasNonAscii = /[^\\u0000-\\u0080]+/.test(path); // eslint-disable-line no-control-regex\r\n\r\n\tif (isExtendedLengthPath || hasNonAscii) {\r\n\t\treturn path;\r\n\t}\r\n\treturn path.replace(/\\\\/g, '/');\r\n};\r\n\r\nexport const createDescriptor = (\r\n\tfilename: string,\r\n\tsource: string,\r\n\t{ root, isProduction, sourceMap, compiler }: ResolvedOptions\r\n): SFCParseResult => {\r\n\tconst { descriptor, errors } = compiler.parse(source, {\r\n\t\tfilename,\r\n\t\tsourceMap\r\n\t});\r\n\r\n\t// ensure the path is normalized in a way that is consistent inside\r\n\t// project (relative to root) and on different systems.\r\n\tconst normalizedPath = slash(path.normalize(path.relative(root, filename)));\r\n\tdescriptor.id = hash(normalizedPath + (isProduction ? source : ''));\r\n\r\n\tcache.set(filename, descriptor);\r\n\treturn { descriptor, errors };\r\n};\r\n\r\nexport const getPrevDescriptor = (filename: string): SFCDescriptor | undefined => {\r\n\treturn prevCache.get(filename);\r\n};\r\n\r\nexport const setPrevDescriptor = (filename: string, entry: SFCDescriptor): void => {\r\n\tprevCache.set(filename, entry);\r\n};\r\n\r\nexport const getDescriptor = (\r\n\tsource: string,\r\n\tfilename: string,\r\n\toptions: ResolvedOptions,\r\n\tcreateIfNotFound = true\r\n): SFCDescriptor | undefined => {\r\n\tif (cache.has(filename)) {\r\n\t\treturn cache.get(filename)!;\r\n\t}\r\n\tif (createIfNotFound) {\r\n\t\tconst { descriptor, errors } = createDescriptor(filename, source, options);\r\n\t\tif (errors.length) {\r\n\t\t\tthrow errors[0];\r\n\t\t}\r\n\t\treturn descriptor;\r\n\t}\r\n\treturn undefined;\r\n};\r\n\r\nexport const getSrcDescriptor = (filename: string, query: VueQuery): SFCDescriptor => {\r\n\treturn cache.get(`${filename}?src=${query.src}`)!;\r\n};\r\n\r\nexport const setSrcDescriptor = (filename: string, entry: SFCDescriptor): void => {\r\n\t// if multiple Vue files use the same src file, they will be overwritten\r\n\t// should use other key\r\n\tcache.set(`${filename}?src=${entry.id}`, entry);\r\n};\r\n"]}
@@ -1,3 +0,0 @@
1
- import type { CompilerError } from 'vue/compiler-sfc';
2
- import type { RollupError } from 'rollup';
3
- export declare const createRollupError: (id: string, error: CompilerError | SyntaxError) => RollupError;
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createRollupError = void 0;
4
- const createRollupError = (id, error) => {
5
- const { message, name, stack } = error;
6
- const rollupError = {
7
- id,
8
- plugin: 'vue',
9
- message,
10
- name,
11
- stack
12
- };
13
- if ('code' in error && error.loc) {
14
- rollupError.loc = {
15
- file: id,
16
- line: error.loc.start.line,
17
- column: error.loc.start.column
18
- };
19
- }
20
- return rollupError;
21
- };
22
- exports.createRollupError = createRollupError;
23
- //# sourceMappingURL=error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error.js","sourceRoot":"","sources":["../../../../src/transpilers/vue-sfc/utils/error.ts"],"names":[],"mappings":";;;AAGO,MAAM,iBAAiB,GAAG,CAAC,EAAU,EAAE,KAAkC,EAAe,EAAE;IAChG,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IACvC,MAAM,WAAW,GAAgB;QAChC,EAAE;QACF,MAAM,EAAE,KAAK;QACb,OAAO;QACP,IAAI;QACJ,KAAK;KACL,CAAC;IAEF,IAAI,MAAM,IAAI,KAAK,IAAI,KAAK,CAAC,GAAG,EAAE,CAAC;QAClC,WAAW,CAAC,GAAG,GAAG;YACjB,IAAI,EAAE,EAAE;YACR,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI;YAC1B,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM;SAC9B,CAAC;IACH,CAAC;IAED,OAAO,WAAW,CAAC;AACpB,CAAC,CAAC;AAnBW,QAAA,iBAAiB,qBAmB5B","sourcesContent":["import type { CompilerError } from 'vue/compiler-sfc';\r\nimport type { RollupError } from 'rollup';\r\n\r\nexport const createRollupError = (id: string, error: CompilerError | SyntaxError): RollupError => {\r\n\tconst { message, name, stack } = error;\r\n\tconst rollupError: RollupError = {\r\n\t\tid,\r\n\t\tplugin: 'vue',\r\n\t\tmessage,\r\n\t\tname,\r\n\t\tstack\r\n\t};\r\n\r\n\tif ('code' in error && error.loc) {\r\n\t\trollupError.loc = {\r\n\t\t\tfile: id,\r\n\t\t\tline: error.loc.start.line,\r\n\t\t\tcolumn: error.loc.start.column\r\n\t\t};\r\n\t}\r\n\r\n\treturn rollupError;\r\n};\r\n"]}
@@ -1,13 +0,0 @@
1
- export interface VueQuery {
2
- vue?: boolean;
3
- src?: string;
4
- type?: 'script' | 'template' | 'style' | 'custom';
5
- index?: number;
6
- lang?: string;
7
- raw?: boolean;
8
- }
9
- export declare const parseVueRequest: (id: string) => {
10
- filename: string;
11
- query: VueQuery;
12
- };
13
- export declare const parseQuery: (querystring: string) => VueQuery;
@@ -1,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseQuery = exports.parseVueRequest = void 0;
4
- const parseVueRequest = (id) => {
5
- const [filename, rawQuery] = id.split(`?`, 2);
6
- const query = (0, exports.parseQuery)(rawQuery);
7
- if (query.vue != null) {
8
- query.vue = true;
9
- }
10
- if (query.index != null) {
11
- query.index = Number(query.index);
12
- }
13
- if (query.raw != null) {
14
- query.raw = true;
15
- }
16
- return {
17
- filename,
18
- query
19
- };
20
- };
21
- exports.parseVueRequest = parseVueRequest;
22
- const parseQuery = (querystring) => {
23
- const vueQuery = {};
24
- const params = new URLSearchParams(querystring);
25
- for (const key of params.keys()) {
26
- if (params.getAll(key).length > 1) {
27
- vueQuery[key] = params.getAll(key);
28
- }
29
- else {
30
- vueQuery[key] = params.get(key);
31
- }
32
- }
33
- return vueQuery;
34
- };
35
- exports.parseQuery = parseQuery;
36
- //# sourceMappingURL=query.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/transpilers/vue-sfc/utils/query.ts"],"names":[],"mappings":";;;AASO,MAAM,eAAe,GAAG,CAC9B,EAAU,EAIT,EAAE;IACH,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IAC9C,MAAM,KAAK,GAAG,IAAA,kBAAU,EAAC,QAAQ,CAAC,CAAC;IACnC,IAAI,KAAK,CAAC,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC;IAClB,CAAC;IACD,IAAI,KAAK,CAAC,KAAK,IAAI,IAAI,EAAE,CAAC;QACzB,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IACD,IAAI,KAAK,CAAC,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC;IAClB,CAAC;IACD,OAAO;QACN,QAAQ;QACR,KAAK;KACL,CAAC;AACH,CAAC,CAAC;AArBW,QAAA,eAAe,mBAqB1B;AAEK,MAAM,UAAU,GAAG,CAAC,WAAmB,EAAY,EAAE;IAC3D,MAAM,QAAQ,GAAQ,EAAE,CAAC;IACzB,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,WAAW,CAAC,CAAC;IAChD,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC;QACjC,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACnC,QAAQ,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACpC,CAAC;aAAM,CAAC;YACP,QAAQ,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACjC,CAAC;IACF,CAAC;IACD,OAAO,QAAQ,CAAC;AACjB,CAAC,CAAC;AAXW,QAAA,UAAU,cAWrB","sourcesContent":["export interface VueQuery {\r\n\tvue?: boolean;\r\n\tsrc?: string;\r\n\ttype?: 'script' | 'template' | 'style' | 'custom';\r\n\tindex?: number;\r\n\tlang?: string;\r\n\traw?: boolean;\r\n}\r\n\r\nexport const parseVueRequest = (\r\n\tid: string\r\n): {\r\n\tfilename: string;\r\n\tquery: VueQuery;\r\n} => {\r\n\tconst [filename, rawQuery] = id.split(`?`, 2);\r\n\tconst query = parseQuery(rawQuery);\r\n\tif (query.vue != null) {\r\n\t\tquery.vue = true;\r\n\t}\r\n\tif (query.index != null) {\r\n\t\tquery.index = Number(query.index);\r\n\t}\r\n\tif (query.raw != null) {\r\n\t\tquery.raw = true;\r\n\t}\r\n\treturn {\r\n\t\tfilename,\r\n\t\tquery\r\n\t};\r\n};\r\n\r\nexport const parseQuery = (querystring: string): VueQuery => {\r\n\tconst vueQuery: any = {};\r\n\tconst params = new URLSearchParams(querystring);\r\n\tfor (const key of params.keys()) {\r\n\t\tif (params.getAll(key).length > 1) {\r\n\t\t\tvueQuery[key] = params.getAll(key);\r\n\t\t} else {\r\n\t\t\tvueQuery[key] = params.get(key);\r\n\t\t}\r\n\t}\r\n\treturn vueQuery;\r\n};\r\n"]}