@vxrn/vite-flow 1.27.0 → 1.27.1-1789414853455

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.
@@ -1,8 +1,6 @@
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
6
  for (var name in all) __defProp(target, name, {
@@ -19,15 +17,6 @@ var __copyProps = (to, from, except, desc) => {
19
17
  }
20
18
  return to;
21
19
  };
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));
31
20
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
21
  value: true
33
22
  }), mod);
@@ -37,16 +26,10 @@ __export(transformFlowBabel_exports, {
37
26
  transformFlowBabel: () => transformFlowBabel
38
27
  });
39
28
  module.exports = __toCommonJS(transformFlowBabel_exports);
29
+ var import_compiler = require("@vxrn/compiler");
40
30
  async function transformFlow(input, options) {
41
31
  const path = options?.path;
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
- });
32
+ const result = await (0, import_compiler.stripFlowTypes)(path || "file.js", input);
50
33
  return {
51
34
  code: result.code,
52
35
  map: result.map,
@@ -1,10 +1,8 @@
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
8
  for (var name in all) __defProp(target, name, {
@@ -21,15 +19,6 @@ var __copyProps = (to, from, except, desc) => {
21
19
  }
22
20
  return to;
23
21
  };
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));
33
22
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
34
23
  value: true
35
24
  }), mod);
@@ -39,16 +28,10 @@ __export(transformFlowBabel_exports, {
39
28
  transformFlowBabel: () => transformFlowBabel
40
29
  });
41
30
  module.exports = __toCommonJS(transformFlowBabel_exports);
31
+ var import_compiler = require("@vxrn/compiler");
42
32
  async function transformFlow(input, options) {
43
33
  var path = options === null || options === void 0 ? void 0 : options.path;
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
- });
34
+ var result = await (0, import_compiler.stripFlowTypes)(path || "file.js", input);
52
35
  return {
53
36
  code: result.code,
54
37
  map: result.map,
@@ -1 +1 @@
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
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","transformFlowBabel_exports","__export","transformFlow","transformFlowBabel","module","exports","import_compiler","require","input","options","path","result","stripFlowTypes","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;AA4BAC,MAAA,CAAAC,OAAA,GAAAV,YAA+B,CAAAK,0BAAA;AAtB/B,IAAAM,eAAsB,GAAAC,OACpB,iBAE8B;AAC9B,eAAaL,aAASA,CAAAM,KAAA,EAAAC,OAAA;EACtB,IAAAC,IAAM,GAAAD,OAAS,SAAM,IAAAA,OAAA,mBAAe,IAAAA,OAAQ,CAAAC,IAAA;EAC5C,IAAAC,MAAO,aAAAL,eAAA,CAAAM,cAAA,EAAAF,IAAA,eAAAF,KAAA;EAAA,OACL;IACAK,IAAA,EAAKF,MAAO,CAAAE,IAAA;IACZC,GAAA,EAAAH,MAAW,CAAAG,GAAA;IACTC,SAAA,EAAO;MACT,OAAAJ,MAAA,CAAAE,IAAA;IACF;EACF;AAEA;AAIE,eAAYV,kBAAMA,CAAcK,KAAA,EAAOC,OAAO;EAC9C,IAAAO,GAAO,SAAId,aAAA,CAAAM,KAAA,EAAAC,OAAA;EACb,OAAAO,GAAA,CAAAH,IAAA","ignoreList":[]}
@@ -1,13 +1,7 @@
1
+ import { stripFlowTypes } from "@vxrn/compiler";
1
2
  async function transformFlow(input, options) {
2
3
  const path = options?.path;
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
- });
4
+ const result = await stripFlowTypes(path || "file.js", input);
11
5
  return {
12
6
  code: result.code,
13
7
  map: result.map,
@@ -1 +1 @@
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
+ {"version":3,"names":["stripFlowTypes","transformFlow","input","options","path","result","code","map","toString","transformFlowBabel","res"],"sources":["../../src/transformFlowBabel.ts"],"sourcesContent":[null],"mappings":"AA4BA,SAASA,cAAA,QAAsB;AAtB/B,eAAsBC,cACpBC,KAAA,EACAC,OAAA,EAC8B;EAC9B,MAAMC,IAAA,GAAOD,OAAA,EAASC,IAAA;EACtB,MAAMC,MAAA,GAAS,MAAML,cAAA,CAAeI,IAAA,IAAQ,WAAWF,KAAK;EAC5D,OAAO;IACLI,IAAA,EAAMD,MAAA,CAAOC,IAAA;IACbC,GAAA,EAAKF,MAAA,CAAOE,GAAA;IACZC,SAAA,EAAW;MACT,OAAOH,MAAA,CAAOC,IAAA;IAChB;EACF;AACF;AAEA,eAAsBG,mBACpBP,KAAA,EACAC,OAAA,EACiB;EACjB,MAAMO,GAAA,GAAM,MAAMT,aAAA,CAAcC,KAAA,EAAOC,OAAO;EAC9C,OAAOO,GAAA,CAAIJ,IAAA;AACb","ignoreList":[]}
@@ -1,13 +1,7 @@
1
+ import { stripFlowTypes } from "@vxrn/compiler";
1
2
  async function transformFlow(input, options) {
2
3
  var path = options === null || options === void 0 ? void 0 : options.path;
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
- });
4
+ var result = await stripFlowTypes(path || "file.js", input);
11
5
  return {
12
6
  code: result.code,
13
7
  map: result.map,
@@ -1 +1 @@
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":[]}
1
+ {"version":3,"names":["stripFlowTypes","transformFlow","input","options","path","result","code","map","toString","transformFlowBabel","res"],"sources":["../../src/transformFlowBabel.ts"],"sourcesContent":[null],"mappings":"AA4BA,SAASA,cAAA,QAAsB;AAtB/B,eAAsBC,cACpBC,KAAA,EACAC,OAAA,EAC8B;EAC9B,IAAAC,IAAM,GAAAD,OAAO,KAAS,QAAAA,OAAA,uBAAAA,OAAA,CAAAC,IAAA;EACtB,IAAAC,MAAM,SAASL,cAAM,CAAAI,IAAe,aAAQ,EAAAF,KAAW;EACvD,OAAO;IACLI,IAAA,EAAMD,MAAA,CAAOC,IAAA;IACbC,GAAA,EAAKF,MAAA,CAAOE,GAAA;IACZC,SAAA,EAAW;MACT,OAAOH,MAAA,CAAOC,IAAA;IAChB;EACF;AACF;AAEA,eAAsBG,mBACpBP,KAAA,EACAC,OAAA,EACiB;EACjB,IAAAO,GAAM,SAAMT,aAAM,CAAAC,KAAc,EAAAC,OAAO;EACvC,OAAOO,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.0",
3
+ "version": "1.27.1-1789414853455",
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/resolve": "1.27.0",
32
- "fast-flow-transform": "^0.0.3",
31
+ "@vxrn/compiler": "1.27.1-1789414853455",
32
+ "@vxrn/resolve": "1.27.1-1789414853455",
33
33
  "vite": "^8.2.2"
34
34
  },
35
35
  "devDependencies": {
@@ -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 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
- })
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,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"}
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"}