@vxrn/vite-flow 1.27.1-1789414853455 → 1.27.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/transformFlowBabel.cjs +19 -2
- package/dist/cjs/transformFlowBabel.native.js +19 -2
- package/dist/cjs/transformFlowBabel.native.js.map +1 -1
- package/dist/esm/transformFlowBabel.mjs +8 -2
- package/dist/esm/transformFlowBabel.mjs.map +1 -1
- package/dist/esm/transformFlowBabel.native.js +8 -2
- package/dist/esm/transformFlowBabel.native.js.map +1 -1
- package/package.json +3 -3
- package/src/transformFlowBabel.ts +8 -2
- package/types/transformFlowBabel.d.ts.map +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
4
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
7
|
var __export = (target, all) => {
|
|
6
8
|
for (var name in all) __defProp(target, name, {
|
|
@@ -17,6 +19,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
19
|
}
|
|
18
20
|
return to;
|
|
19
21
|
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
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));
|
|
20
31
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
32
|
value: true
|
|
22
33
|
}), mod);
|
|
@@ -26,10 +37,16 @@ __export(transformFlowBabel_exports, {
|
|
|
26
37
|
transformFlowBabel: () => transformFlowBabel
|
|
27
38
|
});
|
|
28
39
|
module.exports = __toCommonJS(transformFlowBabel_exports);
|
|
29
|
-
var import_compiler = require("@vxrn/compiler");
|
|
30
40
|
async function transformFlow(input, options) {
|
|
31
41
|
const path = options?.path;
|
|
32
|
-
const
|
|
42
|
+
const fft = await import("fast-flow-transform");
|
|
43
|
+
const result = await fft.default({
|
|
44
|
+
filename: path || "file.js",
|
|
45
|
+
source: input,
|
|
46
|
+
sourcemap: true,
|
|
47
|
+
dialect: "flow",
|
|
48
|
+
format: "pretty"
|
|
49
|
+
});
|
|
33
50
|
return {
|
|
34
51
|
code: result.code,
|
|
35
52
|
map: result.map,
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
9
|
var __export = (target, all) => {
|
|
8
10
|
for (var name in all) __defProp(target, name, {
|
|
@@ -19,6 +21,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
21
|
}
|
|
20
22
|
return to;
|
|
21
23
|
};
|
|
24
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
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));
|
|
22
33
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
34
|
value: true
|
|
24
35
|
}), mod);
|
|
@@ -28,10 +39,16 @@ __export(transformFlowBabel_exports, {
|
|
|
28
39
|
transformFlowBabel: () => transformFlowBabel
|
|
29
40
|
});
|
|
30
41
|
module.exports = __toCommonJS(transformFlowBabel_exports);
|
|
31
|
-
var import_compiler = require("@vxrn/compiler");
|
|
32
42
|
async function transformFlow(input, options) {
|
|
33
43
|
var path = options === null || options === void 0 ? void 0 : options.path;
|
|
34
|
-
var
|
|
44
|
+
var fft = await import("fast-flow-transform");
|
|
45
|
+
var result = await fft.default({
|
|
46
|
+
filename: path || "file.js",
|
|
47
|
+
source: input,
|
|
48
|
+
sourcemap: true,
|
|
49
|
+
dialect: "flow",
|
|
50
|
+
format: "pretty"
|
|
51
|
+
});
|
|
35
52
|
return {
|
|
36
53
|
code: result.code,
|
|
37
54
|
map: result.map,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","transformFlowBabel_exports","__export","transformFlow","transformFlowBabel","module","exports","
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","transformFlowBabel_exports","__export","transformFlow","transformFlowBabel","module","exports","input","options","path","fft","result","default","filename","source","sourcemap","dialect","format","code","map","toString","res"],"sources":["../../src/transformFlowBabel.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,0BAAA;AAAAC,QAAA,CAAAD,0BAAA;EAAAE,aAAA,EAAAA,CAAA,KAAAA,aAAA;EAAAC,kBAAA,EAAAA,CAAA,KAAAA;AAAA;AAMAC,MAAA,CAAAC,OAAA,GAAsBV,YACpB,CAAAK,0BAE8B;AAC9B,eAAaE,aAASA,CAAAI,KAAA,EAAAC,OAAA;EACtB,IAAAC,IAAM,GAAAD,OAAY,SAAO,IAAAA,OAAA,UAAqB,aAAAA,OAAA,CAAAC,IAAA;EAC9C,IAAAC,GAAM,SAAS,MAAM,sBAAY;EAAA,IAC/BC,MAAA,GAAU,MAAAD,GAAQ,CAAAE,OAAA;IAClBC,QAAQ,EAAAJ,IAAA;IACRK,MAAA,EAAAP,KAAW;IACXQ,SAAS;IACTC,OAAA,EAAQ;IACTC,MAAA;EACD;EAAO,OACL;IACAC,IAAA,EAAKP,MAAO,CAAAO,IAAA;IACZC,GAAA,EAAAR,MAAW,CAAAQ,GAAA;IACTC,SAAA,EAAO;MACT,OAAAT,MAAA,CAAAO,IAAA;IACF;EACF;AAEA;AAIE,eAAYd,kBAAMA,CAAcG,KAAA,EAAOC,OAAO;EAC9C,IAAAa,GAAO,SAAIlB,aAAA,CAAAI,KAAA,EAAAC,OAAA;EACb,OAAAa,GAAA,CAAAH,IAAA","ignoreList":[]}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import { stripFlowTypes } from "@vxrn/compiler";
|
|
2
1
|
async function transformFlow(input, options) {
|
|
3
2
|
const path = options?.path;
|
|
4
|
-
const
|
|
3
|
+
const fft = await import("fast-flow-transform");
|
|
4
|
+
const result = await fft.default({
|
|
5
|
+
filename: path || "file.js",
|
|
6
|
+
source: input,
|
|
7
|
+
sourcemap: true,
|
|
8
|
+
dialect: "flow",
|
|
9
|
+
format: "pretty"
|
|
10
|
+
});
|
|
5
11
|
return {
|
|
6
12
|
code: result.code,
|
|
7
13
|
map: result.map,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["transformFlow","input","options","path","fft","result","default","filename","source","sourcemap","dialect","format","code","map","toString","transformFlowBabel","res"],"sources":["../../src/transformFlowBabel.ts"],"sourcesContent":[null],"mappings":"AAMA,eAAsBA,cACpBC,KAAA,EACAC,OAAA,EAC8B;EAC9B,MAAMC,IAAA,GAAOD,OAAA,EAASC,IAAA;EACtB,MAAMC,GAAA,GAAM,MAAM,OAAO,qBAAqB;EAC9C,MAAMC,MAAA,GAAS,MAAMD,GAAA,CAAIE,OAAA,CAAQ;IAC/BC,QAAA,EAAUJ,IAAA,IAAQ;IAClBK,MAAA,EAAQP,KAAA;IACRQ,SAAA,EAAW;IACXC,OAAA,EAAS;IACTC,MAAA,EAAQ;EACV,CAAC;EACD,OAAO;IACLC,IAAA,EAAMP,MAAA,CAAOO,IAAA;IACbC,GAAA,EAAKR,MAAA,CAAOQ,GAAA;IACZC,SAAA,EAAW;MACT,OAAOT,MAAA,CAAOO,IAAA;IAChB;EACF;AACF;AAEA,eAAsBG,mBACpBd,KAAA,EACAC,OAAA,EACiB;EACjB,MAAMc,GAAA,GAAM,MAAMhB,aAAA,CAAcC,KAAA,EAAOC,OAAO;EAC9C,OAAOc,GAAA,CAAIJ,IAAA;AACb","ignoreList":[]}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import { stripFlowTypes } from "@vxrn/compiler";
|
|
2
1
|
async function transformFlow(input, options) {
|
|
3
2
|
var path = options === null || options === void 0 ? void 0 : options.path;
|
|
4
|
-
var
|
|
3
|
+
var fft = await import("fast-flow-transform");
|
|
4
|
+
var result = await fft.default({
|
|
5
|
+
filename: path || "file.js",
|
|
6
|
+
source: input,
|
|
7
|
+
sourcemap: true,
|
|
8
|
+
dialect: "flow",
|
|
9
|
+
format: "pretty"
|
|
10
|
+
});
|
|
5
11
|
return {
|
|
6
12
|
code: result.code,
|
|
7
13
|
map: result.map,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["transformFlow","input","options","path","fft","result","default","filename","source","sourcemap","dialect","format","code","map","toString","transformFlowBabel","res"],"sources":["../../src/transformFlowBabel.ts"],"sourcesContent":[null],"mappings":"AAMA,eAAsBA,cACpBC,KAAA,EACAC,OAAA,EAC8B;EAC9B,IAAAC,IAAM,GAAAD,OAAO,KAAS,QAAAA,OAAA,uBAAAA,OAAA,CAAAC,IAAA;EACtB,IAAAC,GAAM,SAAM,MAAM,sBAAO;EACzB,IAAAC,MAAM,SAASD,GAAM,CAAAE,OAAI;IACvBC,QAAA,EAAUJ,IAAA,IAAQ;IAClBK,MAAA,EAAQP,KAAA;IACRQ,SAAA,EAAW;IACXC,OAAA,EAAS;IACTC,MAAA,EAAQ;EACV,CAAC;EACD,OAAO;IACLC,IAAA,EAAMP,MAAA,CAAOO,IAAA;IACbC,GAAA,EAAKR,MAAA,CAAOQ,GAAA;IACZC,SAAA,EAAW;MACT,OAAOT,MAAA,CAAOO,IAAA;IAChB;EACF;AACF;AAEA,eAAsBG,mBACpBd,KAAA,EACAC,OAAA,EACiB;EACjB,IAAAc,GAAM,SAAMhB,aAAM,CAAAC,KAAc,EAAAC,OAAO;EACvC,OAAOc,GAAA,CAAIJ,IAAA;AACb","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vxrn/vite-flow",
|
|
3
|
-
"version": "1.27.1
|
|
3
|
+
"version": "1.27.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./package.json": "./package.json",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"watch": "tamagui-build --watch"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@vxrn/
|
|
32
|
-
"
|
|
31
|
+
"@vxrn/resolve": "1.27.1",
|
|
32
|
+
"fast-flow-transform": "^0.0.3",
|
|
33
33
|
"vite": "^8.2.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
@@ -9,7 +9,14 @@ export async function transformFlow(
|
|
|
9
9
|
options?: { development?: boolean; path?: string }
|
|
10
10
|
): Promise<TransformFlowResult> {
|
|
11
11
|
const path = options?.path
|
|
12
|
-
const
|
|
12
|
+
const fft = await import('fast-flow-transform')
|
|
13
|
+
const result = await fft.default({
|
|
14
|
+
filename: path || 'file.js',
|
|
15
|
+
source: input,
|
|
16
|
+
sourcemap: true,
|
|
17
|
+
dialect: 'flow',
|
|
18
|
+
format: 'pretty',
|
|
19
|
+
})
|
|
13
20
|
return {
|
|
14
21
|
code: result.code,
|
|
15
22
|
map: result.map,
|
|
@@ -26,4 +33,3 @@ export async function transformFlowBabel(
|
|
|
26
33
|
const res = await transformFlow(input, options)
|
|
27
34
|
return res.code
|
|
28
35
|
}
|
|
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,CAiB9B;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"}
|