@vxrn/vite-flow 2.0.0-beta.33.1 → 2.0.0-beta.45.1
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/dist/cjs/index.cjs +30 -34
- package/dist/cjs/index.native.cjs +48 -0
- package/dist/cjs/index.native.js +30 -33
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/transformFlowBabel.cjs +27 -46
- package/dist/cjs/transformFlowBabel.native.cjs +44 -0
- package/dist/cjs/transformFlowBabel.native.js +27 -45
- package/dist/cjs/transformFlowBabel.native.js.map +1 -1
- package/dist/esm/index.js +17 -18
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +17 -18
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +17 -18
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/transformFlowBabel.mjs +14 -18
- package/dist/esm/transformFlowBabel.mjs.map +1 -1
- package/dist/esm/transformFlowBabel.native.js +14 -18
- package/dist/esm/transformFlowBabel.native.js.map +1 -1
- package/package.json +4 -4
- package/src/transformFlowBabel.ts +2 -8
- package/types/transformFlowBabel.d.ts.map +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -3,48 +3,44 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
10
|
};
|
|
11
11
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
21
|
var index_exports = {};
|
|
24
22
|
__export(index_exports, {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
default: () => createFlowPlugin,
|
|
24
|
+
transformFlow: () => import_transformFlowBabel2.transformFlow,
|
|
25
|
+
transformFlowBabel: () => import_transformFlowBabel2.transformFlowBabel
|
|
28
26
|
});
|
|
29
27
|
module.exports = __toCommonJS(index_exports);
|
|
30
28
|
var import_vite = require("vite");
|
|
31
29
|
var import_transformFlowBabel = require("./transformFlowBabel.cjs");
|
|
32
30
|
var import_transformFlowBabel2 = require("./transformFlowBabel.cjs");
|
|
33
31
|
function createFlowPlugin(opts) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
};
|
|
50
|
-
}
|
|
32
|
+
if (!opts?.include || Array.isArray(opts.include) && opts.include.length === 0) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const filter = (0, import_vite.createFilter)(opts?.include, opts?.exclude);
|
|
36
|
+
return {
|
|
37
|
+
name: "@vxrn/vite-flow",
|
|
38
|
+
enforce: "pre",
|
|
39
|
+
transform(code, id) {
|
|
40
|
+
if (filter(id)) {
|
|
41
|
+
return (0, import_transformFlowBabel.transformFlow)(code, { path: id });
|
|
42
|
+
}
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
+
var index_exports = {};
|
|
24
|
+
__export(index_exports, {
|
|
25
|
+
default: () => createFlowPlugin,
|
|
26
|
+
transformFlow: () => import_transformFlowBabel2.transformFlow,
|
|
27
|
+
transformFlowBabel: () => import_transformFlowBabel2.transformFlowBabel
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(index_exports);
|
|
30
|
+
var import_vite = require("vite");
|
|
31
|
+
var import_transformFlowBabel = require("./transformFlowBabel.native.js");
|
|
32
|
+
var import_transformFlowBabel2 = require("./transformFlowBabel.native.js");
|
|
33
|
+
function createFlowPlugin(opts) {
|
|
34
|
+
if (!(opts === null || opts === void 0 ? void 0 : opts.include) || Array.isArray(opts.include) && opts.include.length === 0) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
var filter = (0, import_vite.createFilter)(opts === null || opts === void 0 ? void 0 : opts.include, opts === null || opts === void 0 ? void 0 : opts.exclude);
|
|
38
|
+
return {
|
|
39
|
+
name: "@vxrn/vite-flow",
|
|
40
|
+
enforce: "pre",
|
|
41
|
+
transform(code, id) {
|
|
42
|
+
if (filter(id)) {
|
|
43
|
+
return (0, import_transformFlowBabel.transformFlow)(code, { path: id });
|
|
44
|
+
}
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
}
|
package/dist/cjs/index.native.js
CHANGED
|
@@ -5,49 +5,46 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
12
|
};
|
|
13
13
|
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
21
|
};
|
|
22
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
-
value: true
|
|
24
|
-
}), mod);
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
23
|
var index_exports = {};
|
|
26
24
|
__export(index_exports, {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
default: () => createFlowPlugin,
|
|
26
|
+
transformFlow: () => import_transformFlowBabel2.transformFlow,
|
|
27
|
+
transformFlowBabel: () => import_transformFlowBabel2.transformFlowBabel
|
|
30
28
|
});
|
|
31
29
|
module.exports = __toCommonJS(index_exports);
|
|
32
30
|
var import_vite = require("vite");
|
|
33
31
|
var import_transformFlowBabel = require("./transformFlowBabel.native.js");
|
|
34
32
|
var import_transformFlowBabel2 = require("./transformFlowBabel.native.js");
|
|
35
33
|
function createFlowPlugin(opts) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
};
|
|
34
|
+
if (!(opts === null || opts === void 0 ? void 0 : opts.include) || Array.isArray(opts.include) && opts.include.length === 0) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
var filter = (0, import_vite.createFilter)(opts === null || opts === void 0 ? void 0 : opts.include, opts === null || opts === void 0 ? void 0 : opts.exclude);
|
|
38
|
+
return {
|
|
39
|
+
name: "@vxrn/vite-flow",
|
|
40
|
+
enforce: "pre",
|
|
41
|
+
transform(code, id) {
|
|
42
|
+
if (filter(id)) {
|
|
43
|
+
return (0, import_transformFlowBabel.transformFlow)(code, { path: id });
|
|
44
|
+
}
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
52
48
|
}
|
|
49
|
+
|
|
53
50
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.native.js","names":[],"sources":["cjs/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\n__export(index_exports, {\n default: () => createFlowPlugin,\n transformFlow: () => import_transformFlowBabel2.transformFlow,\n transformFlowBabel: () => import_transformFlowBabel2.transformFlowBabel\n});\nmodule.exports = __toCommonJS(index_exports);\nvar import_vite = require(\"vite\");\nvar import_transformFlowBabel = require(\"./transformFlowBabel\");\nvar import_transformFlowBabel2 = require(\"./transformFlowBabel\");\nfunction createFlowPlugin(opts) {\n if (!(opts === null || opts === void 0 ? void 0 : opts.include) || Array.isArray(opts.include) && opts.include.length === 0) {\n return;\n }\n var filter = (0, import_vite.createFilter)(opts === null || opts === void 0 ? void 0 : opts.include, opts === null || opts === void 0 ? void 0 : opts.exclude);\n return {\n name: \"@vxrn/vite-flow\",\n enforce: \"pre\",\n transform(code, id) {\n if (filter(id)) {\n return (0, import_transformFlowBabel.transformFlow)(code, {\n path: id\n });\n }\n return null;\n }\n };\n}\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,SAAS,eAAe;CACtB,eAAe;CACf,qBAAqB,2BAA2B;CAChD,0BAA0B,2BAA2B;AACvD,CAAC;AACD,OAAO,UAAU,aAAa,aAAa;AAC3C,IAAI,cAAc,QAAQ,MAAM;AAChC,IAAI,4BAA4B,QAAQ,gCAAsB;AAC9D,IAAI,6BAA6B,QAAQ,gCAAsB;AAC/D,SAAS,iBAAiB,MAAM;CAC9B,IAAI,EAAE,SAAS,QAAQ,SAAS,KAAK,IAAI,KAAK,IAAI,KAAK,YAAY,MAAM,QAAQ,KAAK,OAAO,KAAK,KAAK,QAAQ,WAAW,GAAG;EAC3H;CACF;CACA,IAAI,UAAU,GAAG,YAAY,aAAY,CAAE,SAAS,QAAQ,SAAS,KAAK,IAAI,KAAK,IAAI,KAAK,SAAS,SAAS,QAAQ,SAAS,KAAK,IAAI,KAAK,IAAI,KAAK,OAAO;CAC7J,OAAO;EACL,MAAM;EACN,SAAS;EACT,UAAU,MAAM,IAAI;GAClB,IAAI,OAAO,EAAE,GAAG;IACd,QAAQ,GAAG,0BAA0B,cAAa,CAAE,MAAM,EACxD,MAAM,GACR,CAAC;GACH;GACA,OAAO;EACT;CACF;AACF"}
|
|
@@ -1,61 +1,42 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
5
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
12
10
|
};
|
|
13
11
|
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
21
19
|
};
|
|
22
|
-
var
|
|
23
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
-
value: mod,
|
|
29
|
-
enumerable: true
|
|
30
|
-
}) : target, mod));
|
|
31
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
32
|
-
value: true
|
|
33
|
-
}), mod);
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
34
21
|
var transformFlowBabel_exports = {};
|
|
35
22
|
__export(transformFlowBabel_exports, {
|
|
36
|
-
|
|
37
|
-
|
|
23
|
+
transformFlow: () => transformFlow,
|
|
24
|
+
transformFlowBabel: () => transformFlowBabel
|
|
38
25
|
});
|
|
39
26
|
module.exports = __toCommonJS(transformFlowBabel_exports);
|
|
27
|
+
var import_compiler = require("@vxrn/compiler");
|
|
40
28
|
async function transformFlow(input, options) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return {
|
|
51
|
-
code: result.code,
|
|
52
|
-
map: result.map,
|
|
53
|
-
toString() {
|
|
54
|
-
return result.code;
|
|
55
|
-
}
|
|
56
|
-
};
|
|
29
|
+
const path = options?.path;
|
|
30
|
+
const result = await (0, import_compiler.stripFlowTypes)(path || "file.js", input);
|
|
31
|
+
return {
|
|
32
|
+
code: result.code,
|
|
33
|
+
map: result.map,
|
|
34
|
+
toString() {
|
|
35
|
+
return result.code;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
57
38
|
}
|
|
58
39
|
async function transformFlowBabel(input, options) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
40
|
+
const res = await transformFlow(input, options);
|
|
41
|
+
return res.code;
|
|
42
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
+
var transformFlowBabel_exports = {};
|
|
24
|
+
__export(transformFlowBabel_exports, {
|
|
25
|
+
transformFlow: () => transformFlow,
|
|
26
|
+
transformFlowBabel: () => transformFlowBabel
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(transformFlowBabel_exports);
|
|
29
|
+
var import_compiler = require("@vxrn/compiler");
|
|
30
|
+
async function transformFlow(input, options) {
|
|
31
|
+
var path = options === null || options === void 0 ? void 0 : options.path;
|
|
32
|
+
var result = await (0, import_compiler.stripFlowTypes)(path || "file.js", input);
|
|
33
|
+
return {
|
|
34
|
+
code: result.code,
|
|
35
|
+
map: result.map,
|
|
36
|
+
toString() {
|
|
37
|
+
return result.code;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
async function transformFlowBabel(input, options) {
|
|
42
|
+
var res = await transformFlow(input, options);
|
|
43
|
+
return res.code;
|
|
44
|
+
}
|
|
@@ -1,64 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var __create = Object.create;
|
|
4
3
|
var __defProp = Object.defineProperty;
|
|
5
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
7
|
var __export = (target, all) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
14
12
|
};
|
|
15
13
|
var __copyProps = (to, from, except, desc) => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
23
21
|
};
|
|
24
|
-
var
|
|
25
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
26
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
27
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
28
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
29
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
30
|
-
value: mod,
|
|
31
|
-
enumerable: true
|
|
32
|
-
}) : target, mod));
|
|
33
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
34
|
-
value: true
|
|
35
|
-
}), mod);
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
36
23
|
var transformFlowBabel_exports = {};
|
|
37
24
|
__export(transformFlowBabel_exports, {
|
|
38
|
-
|
|
39
|
-
|
|
25
|
+
transformFlow: () => transformFlow,
|
|
26
|
+
transformFlowBabel: () => transformFlowBabel
|
|
40
27
|
});
|
|
41
28
|
module.exports = __toCommonJS(transformFlowBabel_exports);
|
|
29
|
+
var import_compiler = require("@vxrn/compiler");
|
|
42
30
|
async function transformFlow(input, options) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
return {
|
|
53
|
-
code: result.code,
|
|
54
|
-
map: result.map,
|
|
55
|
-
toString() {
|
|
56
|
-
return result.code;
|
|
57
|
-
}
|
|
58
|
-
};
|
|
31
|
+
var path = options === null || options === void 0 ? void 0 : options.path;
|
|
32
|
+
var result = await (0, import_compiler.stripFlowTypes)(path || "file.js", input);
|
|
33
|
+
return {
|
|
34
|
+
code: result.code,
|
|
35
|
+
map: result.map,
|
|
36
|
+
toString() {
|
|
37
|
+
return result.code;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
59
40
|
}
|
|
60
41
|
async function transformFlowBabel(input, options) {
|
|
61
|
-
|
|
62
|
-
|
|
42
|
+
var res = await transformFlow(input, options);
|
|
43
|
+
return res.code;
|
|
63
44
|
}
|
|
45
|
+
|
|
64
46
|
//# sourceMappingURL=transformFlowBabel.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"transformFlowBabel.native.js","names":[],"sources":["cjs/transformFlowBabel.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar transformFlowBabel_exports = {};\n__export(transformFlowBabel_exports, {\n transformFlow: () => transformFlow,\n transformFlowBabel: () => transformFlowBabel\n});\nmodule.exports = __toCommonJS(transformFlowBabel_exports);\nvar import_compiler = require(\"@vxrn/compiler\");\nasync function transformFlow(input, options) {\n var path = options === null || options === void 0 ? void 0 : options.path;\n var result = await (0, import_compiler.stripFlowTypes)(path || \"file.js\", input);\n return {\n code: result.code,\n map: result.map,\n toString() {\n return result.code;\n }\n };\n}\nasync function transformFlowBabel(input, options) {\n var res = await transformFlow(input, options);\n return res.code;\n}\n//# sourceMappingURL=transformFlowBabel.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,6BAA6B,CAAC;AAClC,SAAS,4BAA4B;CACnC,qBAAqB;CACrB,0BAA0B;AAC5B,CAAC;AACD,OAAO,UAAU,aAAa,0BAA0B;AACxD,IAAI,kBAAkB,QAAQ,gBAAgB;AAC9C,eAAe,cAAc,OAAO,SAAS;CAC3C,IAAI,OAAO,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ;CACrE,IAAI,SAAS,OAAO,GAAG,gBAAgB,eAAc,CAAE,QAAQ,WAAW,KAAK;CAC/E,OAAO;EACL,MAAM,OAAO;EACb,KAAK,OAAO;EACZ,WAAW;GACT,OAAO,OAAO;EAChB;CACF;AACF;AACA,eAAe,mBAAmB,OAAO,SAAS;CAChD,IAAI,MAAM,MAAM,cAAc,OAAO,OAAO;CAC5C,OAAO,IAAI;AACb"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import { createFilter } from "vite";
|
|
2
|
-
import { transformFlow } from "./transformFlowBabel.mjs";
|
|
3
|
-
|
|
2
|
+
import { transformFlow, transformFlow as transformFlow2, transformFlowBabel as transformFlowBabel2 } from "./transformFlowBabel.mjs";
|
|
3
|
+
|
|
4
4
|
function createFlowPlugin(opts) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
};
|
|
5
|
+
if (!opts?.include || Array.isArray(opts.include) && opts.include.length === 0) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
const filter = createFilter(opts?.include, opts?.exclude);
|
|
9
|
+
return {
|
|
10
|
+
name: "@vxrn/vite-flow",
|
|
11
|
+
enforce: "pre",
|
|
12
|
+
transform(code, id) {
|
|
13
|
+
if (filter(id)) {
|
|
14
|
+
return transformFlow(code, { path: id });
|
|
15
|
+
}
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
21
19
|
}
|
|
20
|
+
|
|
22
21
|
export { createFlowPlugin as default, transformFlow2 as transformFlow, transformFlowBabel2 as transformFlowBabel };
|
|
23
22
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["esm/index.js"],"sourcesContent":["import { createFilter } from \"vite\";\nimport { transformFlow } from \"./transformFlowBabel\";\nimport { transformFlow as transformFlow2, transformFlowBabel as transformFlowBabel2 } from \"./transformFlowBabel\";\nfunction createFlowPlugin(opts) {\n if (!opts?.include || Array.isArray(opts.include) && opts.include.length === 0) {\n return;\n }\n const filter = createFilter(opts?.include, opts?.exclude);\n return {\n name: \"@vxrn/vite-flow\",\n enforce: \"pre\",\n transform(code, id) {\n if (filter(id)) {\n return transformFlow(code, { path: id });\n }\n return null;\n }\n };\n}\nexport {\n createFlowPlugin as default,\n transformFlow2 as transformFlow,\n transformFlowBabel2 as transformFlowBabel\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;AAGA,SAAS,iBAAiB,MAAM;CAC9B,IAAI,CAAC,MAAM,WAAW,MAAM,QAAQ,KAAK,OAAO,KAAK,KAAK,QAAQ,WAAW,GAAG;EAC9E;CACF;CACA,MAAM,SAAS,aAAa,MAAM,SAAS,MAAM,OAAO;CACxD,OAAO;EACL,MAAM;EACN,SAAS;EACT,UAAU,MAAM,IAAI;GAClB,IAAI,OAAO,EAAE,GAAG;IACd,OAAO,cAAc,MAAM,EAAE,MAAM,GAAG,CAAC;GACzC;GACA,OAAO;EACT;CACF;AACF"}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import { createFilter } from "vite";
|
|
2
|
-
import { transformFlow } from "./transformFlowBabel.mjs";
|
|
3
|
-
|
|
2
|
+
import { transformFlow, transformFlow as transformFlow2, transformFlowBabel as transformFlowBabel2 } from "./transformFlowBabel.mjs";
|
|
3
|
+
|
|
4
4
|
function createFlowPlugin(opts) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
};
|
|
5
|
+
if (!opts?.include || Array.isArray(opts.include) && opts.include.length === 0) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
const filter = createFilter(opts?.include, opts?.exclude);
|
|
9
|
+
return {
|
|
10
|
+
name: "@vxrn/vite-flow",
|
|
11
|
+
enforce: "pre",
|
|
12
|
+
transform(code, id) {
|
|
13
|
+
if (filter(id)) {
|
|
14
|
+
return transformFlow(code, { path: id });
|
|
15
|
+
}
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
21
19
|
}
|
|
20
|
+
|
|
22
21
|
export { createFlowPlugin as default, transformFlow2 as transformFlow, transformFlowBabel2 as transformFlowBabel };
|
|
23
22
|
//# sourceMappingURL=index.mjs.map
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["esm/index.js"],"sourcesContent":["import { createFilter } from \"vite\";\nimport { transformFlow } from \"./transformFlowBabel\";\nimport { transformFlow as transformFlow2, transformFlowBabel as transformFlowBabel2 } from \"./transformFlowBabel\";\nfunction createFlowPlugin(opts) {\n if (!opts?.include || Array.isArray(opts.include) && opts.include.length === 0) {\n return;\n }\n const filter = createFilter(opts?.include, opts?.exclude);\n return {\n name: \"@vxrn/vite-flow\",\n enforce: \"pre\",\n transform(code, id) {\n if (filter(id)) {\n return transformFlow(code, { path: id });\n }\n return null;\n }\n };\n}\nexport {\n createFlowPlugin as default,\n transformFlow2 as transformFlow,\n transformFlowBabel2 as transformFlowBabel\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;AAGA,SAAS,iBAAiB,MAAM;CAC9B,IAAI,CAAC,MAAM,WAAW,MAAM,QAAQ,KAAK,OAAO,KAAK,KAAK,QAAQ,WAAW,GAAG;EAC9E;CACF;CACA,MAAM,SAAS,aAAa,MAAM,SAAS,MAAM,OAAO;CACxD,OAAO;EACL,MAAM;EACN,SAAS;EACT,UAAU,MAAM,IAAI;GAClB,IAAI,OAAO,EAAE,GAAG;IACd,OAAO,cAAc,MAAM,EAAE,MAAM,GAAG,CAAC;GACzC;GACA,OAAO;EACT;CACF;AACF"}
|
package/dist/esm/index.native.js
CHANGED
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import { createFilter } from "vite";
|
|
2
|
-
import { transformFlow } from "./transformFlowBabel.native.js";
|
|
3
|
-
|
|
2
|
+
import { transformFlow, transformFlow as transformFlow2, transformFlowBabel } from "./transformFlowBabel.native.js";
|
|
3
|
+
|
|
4
4
|
function createFlowPlugin(opts) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
};
|
|
5
|
+
if (!(opts === null || opts === void 0 ? void 0 : opts.include) || Array.isArray(opts.include) && opts.include.length === 0) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
var filter = createFilter(opts === null || opts === void 0 ? void 0 : opts.include, opts === null || opts === void 0 ? void 0 : opts.exclude);
|
|
9
|
+
return {
|
|
10
|
+
name: "@vxrn/vite-flow",
|
|
11
|
+
enforce: "pre",
|
|
12
|
+
transform(code, id) {
|
|
13
|
+
if (filter(id)) {
|
|
14
|
+
return transformFlow(code, { path: id });
|
|
15
|
+
}
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
21
19
|
}
|
|
20
|
+
|
|
22
21
|
export { createFlowPlugin as default, transformFlow2 as transformFlow, transformFlowBabel };
|
|
23
22
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.native.js","names":[],"sources":["esm/index.native.js"],"sourcesContent":["import { createFilter } from \"vite\";\nimport { transformFlow } from \"./transformFlowBabel\";\nimport { transformFlow as transformFlow2, transformFlowBabel } from \"./transformFlowBabel\";\nfunction createFlowPlugin(opts) {\n if (!(opts === null || opts === void 0 ? void 0 : opts.include) || Array.isArray(opts.include) && opts.include.length === 0) {\n return;\n }\n var filter = createFilter(opts === null || opts === void 0 ? void 0 : opts.include, opts === null || opts === void 0 ? void 0 : opts.exclude);\n return {\n name: \"@vxrn/vite-flow\",\n enforce: \"pre\",\n transform(code, id) {\n if (filter(id)) {\n return transformFlow(code, {\n path: id\n });\n }\n return null;\n }\n };\n}\nexport {\n createFlowPlugin as default,\n transformFlow2 as transformFlow,\n transformFlowBabel\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;AAGA,SAAS,iBAAiB,MAAM;CAC9B,IAAI,EAAE,SAAS,QAAQ,SAAS,KAAK,IAAI,KAAK,IAAI,KAAK,YAAY,MAAM,QAAQ,KAAK,OAAO,KAAK,KAAK,QAAQ,WAAW,GAAG;EAC3H;CACF;CACA,IAAI,SAAS,aAAa,SAAS,QAAQ,SAAS,KAAK,IAAI,KAAK,IAAI,KAAK,SAAS,SAAS,QAAQ,SAAS,KAAK,IAAI,KAAK,IAAI,KAAK,OAAO;CAC5I,OAAO;EACL,MAAM;EACN,SAAS;EACT,UAAU,MAAM,IAAI;GAClB,IAAI,OAAO,EAAE,GAAG;IACd,OAAO,cAAc,MAAM,EACzB,MAAM,GACR,CAAC;GACH;GACA,OAAO;EACT;CACF;AACF"}
|
|
@@ -1,24 +1,20 @@
|
|
|
1
|
+
import { stripFlowTypes } from "@vxrn/compiler";
|
|
2
|
+
|
|
1
3
|
async function transformFlow(input, options) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return {
|
|
12
|
-
code: result.code,
|
|
13
|
-
map: result.map,
|
|
14
|
-
toString() {
|
|
15
|
-
return result.code;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
4
|
+
const path = options?.path;
|
|
5
|
+
const result = await stripFlowTypes(path || "file.js", input);
|
|
6
|
+
return {
|
|
7
|
+
code: result.code,
|
|
8
|
+
map: result.map,
|
|
9
|
+
toString() {
|
|
10
|
+
return result.code;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
18
13
|
}
|
|
19
14
|
async function transformFlowBabel(input, options) {
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
const res = await transformFlow(input, options);
|
|
16
|
+
return res.code;
|
|
22
17
|
}
|
|
18
|
+
|
|
23
19
|
export { transformFlow, transformFlowBabel };
|
|
24
20
|
//# sourceMappingURL=transformFlowBabel.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"transformFlowBabel.js","names":[],"sources":["esm/transformFlowBabel.js"],"sourcesContent":["import { stripFlowTypes } from \"@vxrn/compiler\";\nasync function transformFlow(input, options) {\n const path = options?.path;\n const result = await stripFlowTypes(path || \"file.js\", input);\n return {\n code: result.code,\n map: result.map,\n toString() {\n return result.code;\n }\n };\n}\nasync function transformFlowBabel(input, options) {\n const res = await transformFlow(input, options);\n return res.code;\n}\nexport {\n transformFlow,\n transformFlowBabel\n};\n//# sourceMappingURL=transformFlowBabel.js.map\n"],"mappings":";;;AACA,eAAe,cAAc,OAAO,SAAS;CAC3C,MAAM,OAAO,SAAS;CACtB,MAAM,SAAS,MAAM,eAAe,QAAQ,WAAW,KAAK;CAC5D,OAAO;EACL,MAAM,OAAO;EACb,KAAK,OAAO;EACZ,WAAW;GACT,OAAO,OAAO;EAChB;CACF;AACF;AACA,eAAe,mBAAmB,OAAO,SAAS;CAChD,MAAM,MAAM,MAAM,cAAc,OAAO,OAAO;CAC9C,OAAO,IAAI;AACb"}
|
|
@@ -1,24 +1,20 @@
|
|
|
1
|
+
import { stripFlowTypes } from "@vxrn/compiler";
|
|
2
|
+
|
|
1
3
|
async function transformFlow(input, options) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return {
|
|
12
|
-
code: result.code,
|
|
13
|
-
map: result.map,
|
|
14
|
-
toString() {
|
|
15
|
-
return result.code;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
4
|
+
var path = options === null || options === void 0 ? void 0 : options.path;
|
|
5
|
+
var result = await stripFlowTypes(path || "file.js", input);
|
|
6
|
+
return {
|
|
7
|
+
code: result.code,
|
|
8
|
+
map: result.map,
|
|
9
|
+
toString() {
|
|
10
|
+
return result.code;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
18
13
|
}
|
|
19
14
|
async function transformFlowBabel(input, options) {
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
var res = await transformFlow(input, options);
|
|
16
|
+
return res.code;
|
|
22
17
|
}
|
|
18
|
+
|
|
23
19
|
export { transformFlow, transformFlowBabel };
|
|
24
20
|
//# sourceMappingURL=transformFlowBabel.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"transformFlowBabel.native.js","names":[],"sources":["esm/transformFlowBabel.native.js"],"sourcesContent":["import { stripFlowTypes } from \"@vxrn/compiler\";\nasync function transformFlow(input, options) {\n var path = options === null || options === void 0 ? void 0 : options.path;\n var result = await stripFlowTypes(path || \"file.js\", input);\n return {\n code: result.code,\n map: result.map,\n toString() {\n return result.code;\n }\n };\n}\nasync function transformFlowBabel(input, options) {\n var res = await transformFlow(input, options);\n return res.code;\n}\nexport {\n transformFlow,\n transformFlowBabel\n};\n//# sourceMappingURL=transformFlowBabel.js.map\n"],"mappings":";;;AACA,eAAe,cAAc,OAAO,SAAS;CAC3C,IAAI,OAAO,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ;CACrE,IAAI,SAAS,MAAM,eAAe,QAAQ,WAAW,KAAK;CAC1D,OAAO;EACL,MAAM,OAAO;EACb,KAAK,OAAO;EACZ,WAAW;GACT,OAAO,OAAO;EAChB;CACF;AACF;AACA,eAAe,mBAAmB,OAAO,SAAS;CAChD,IAAI,MAAM,MAAM,cAAc,OAAO,OAAO;CAC5C,OAAO,IAAI;AACb"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vxrn/vite-flow",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.45.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./package.json": "./package.json",
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
"watch": "tamagui-build --watch"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@vxrn/
|
|
32
|
-
"
|
|
31
|
+
"@vxrn/compiler": "2.0.0-beta.45.1",
|
|
32
|
+
"@vxrn/resolve": "2.0.0-beta.45.1",
|
|
33
33
|
"vite": "^8.2.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@biomejs/biome": "2.3.3",
|
|
37
|
-
"@tamagui/build": "
|
|
37
|
+
"@tamagui/build": "3.0.0-beta.1309.1"
|
|
38
38
|
},
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
|
@@ -9,14 +9,7 @@ export async function transformFlow(
|
|
|
9
9
|
options?: { development?: boolean; path?: string }
|
|
10
10
|
): Promise<TransformFlowResult> {
|
|
11
11
|
const path = options?.path
|
|
12
|
-
const
|
|
13
|
-
const result = await fft.default({
|
|
14
|
-
filename: path || 'file.js',
|
|
15
|
-
source: input,
|
|
16
|
-
sourcemap: true,
|
|
17
|
-
dialect: 'flow',
|
|
18
|
-
format: 'pretty',
|
|
19
|
-
})
|
|
12
|
+
const result = await stripFlowTypes(path || 'file.js', input)
|
|
20
13
|
return {
|
|
21
14
|
code: result.code,
|
|
22
15
|
map: result.map,
|
|
@@ -33,3 +26,4 @@ export async function transformFlowBabel(
|
|
|
33
26
|
const res = await transformFlow(input, options)
|
|
34
27
|
return res.code
|
|
35
28
|
}
|
|
29
|
+
import { stripFlowTypes } from '@vxrn/compiler'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformFlowBabel.d.ts","sourceRoot":"","sources":["../src/transformFlowBabel.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,GAAG,CAAA;IACR,QAAQ,IAAI,MAAM,CAAA;CACnB;AAED,wBAAsB,aAAa,CACjC,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GACjD,OAAO,CAAC,mBAAmB,CAAC,
|
|
1
|
+
{"version":3,"file":"transformFlowBabel.d.ts","sourceRoot":"","sources":["../src/transformFlowBabel.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,GAAG,CAAA;IACR,QAAQ,IAAI,MAAM,CAAA;CACnB;AAED,wBAAsB,aAAa,CACjC,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GACjD,OAAO,CAAC,mBAAmB,CAAC,CAU9B;AAED,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GACjD,OAAO,CAAC,MAAM,CAAC,CAGjB"}
|