@vxrn/vite-flow 1.1.537 → 1.1.539

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,32 +1,43 @@
1
1
  "use strict";
2
+
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
7
  var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: !0 });
9
- }, __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from == "object" || typeof from == "function")
11
- for (let key of __getOwnPropNames(from))
12
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
- return to;
14
- };
15
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: !0
11
+ });
12
+ },
13
+ __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ return to;
19
+ };
20
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
+ value: !0
22
+ }), mod);
16
23
  var index_exports = {};
17
24
  __export(index_exports, {
18
25
  default: () => createFlowPlugin,
19
26
  transformFlow: () => transformFlow
20
27
  });
21
28
  module.exports = __toCommonJS(index_exports);
22
- var import_vite = require("vite"), import_transformFlowBabel = require("./transformFlowBabel");
29
+ var import_vite = require("vite"),
30
+ import_transformFlowBabel = require("./transformFlowBabel.native.js");
23
31
  async function transformFlow(input) {
24
- var { development = !1 } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, final = await (0, import_transformFlowBabel.transformFlowBabel)(input);
32
+ var {
33
+ development = !1
34
+ } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {},
35
+ final = await (0, import_transformFlowBabel.transformFlowBabel)(input);
25
36
  return final;
26
37
  }
27
38
  function createFlowPlugin(opts) {
28
- if (!(!(opts != null && opts.include) || Array.isArray(opts.include) && opts.include.length === 0)) {
29
- var filter = (0, import_vite.createFilter)(opts == null ? void 0 : opts.include, opts == null ? void 0 : opts.exclude);
39
+ if (!(!opts?.include || Array.isArray(opts.include) && opts.include.length === 0)) {
40
+ var filter = (0, import_vite.createFilter)(opts?.include, opts?.exclude);
30
41
  return {
31
42
  name: "@vxrn/vite-flow",
32
43
  enforce: "pre",
@@ -36,8 +47,4 @@ function createFlowPlugin(opts) {
36
47
  };
37
48
  }
38
49
  }
39
- // Annotate the CommonJS export names for ESM import in node:
40
- 0 && (module.exports = {
41
- transformFlow
42
- });
43
- //# sourceMappingURL=index.js.map
50
+ //# sourceMappingURL=index.native.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;AACA;;;;;;kBAA6B,iBAC7B,4BAAmC;AAEnC,eAAsBA,cACpBC,OAAa;MACb,EAAEC,cAAc,GAAK,IAArB,UAAA,SAAA,KAAA,UAAA,CAAA,MAAA,SAAA,UAAA,CAAA,IAAqD,CAAC,GAEhDC,QAAQ,UAAMC,8CAAmBH,KAAAA;AAEvC,SAAOE;AACT;AAOe,SAAf,iBAAyCE,MAAc;AACrD,MAAI,IAACA,QAAAA,QAAAA,KAAMC,YAAYC,MAAMC,QAAQH,KAAKC,OAAO,KAAKD,KAAKC,QAAQG,WAAW,IAI9E;QAAMC,aAASC,0BAAaN,QAAAA,OAAAA,SAAAA,KAAMC,SAASD,QAAAA,OAAAA,SAAAA,KAAMO,OAAO;AAExD,WAAO;MACLC,MAAM;MACNC,SAAS;MACTC,UAAUC,MAAMC,IAAE;AAChB,eAAIP,OAAOO,EAAAA,IACFjB,cAAcgB,IAAAA,IAEhB;MACT;IACF;;AACF;",
5
- "names": ["transformFlow", "input", "development", "final", "transformFlowBabel", "opts", "include", "Array", "isArray", "length", "filter", "createFilter", "exclude", "name", "enforce", "transform", "code", "id"]
6
- }
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","__export","default","createFlowPlugin","transformFlow","module","exports","import_vite","require","import_transformFlowBabel","input","development","arguments","length","final","transformFlowBabel","opts","include","Array","isArray","filter","createFilter","exclude","name","enforce","transform","code","id"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,QAAA,CAAAD,aAAA;EAAAE,OAAA,EAAAA,CAAA,KAAAC,gBAAA;EAAAC,aAAA,EAAAA,CAAA,KAAAA;AAAA;AACAC,MAAA,CAAAC,OAAA,GAAAX,YAA6B,CAAAK,aAC7B;AAEA,IAAAO,WAAsB,GAAAC,OAAA,OACpB;EAAAC,yBACsD,GACtDD,OAAA;AAGA,eAFcJ,aAAMA,CAAAM,KAAA;EAGtB;MAAAC,WAAA;IAAA,IAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,iBAAAA,SAAA;IAAAE,KAAA,aAAAL,yBAAA,CAAAM,kBAAA,EAAAL,KAAA;EAOe,OAARI,KAAA;AACL;AACE,SAAAX,iBAAAa,IAAA;EAGF,MAAM,CAAAA,IAAA,EAAAC,OAAS,IAAAC,KAAA,CAAAC,OAAA,CAAAH,IAAA,CAAAC,OAAa,CAAM,IAAAD,IAAA,CAASC,OAAM,CAAAJ,MAAO;IAExD,IAAAO,MAAO,OAAAb,WAAA,CAAAc,YAAA,EAAAL,IAAA,EAAAC,OAAA,EAAAD,IAAA,EAAAM,OAAA;IACL,OAAM;MACNC,IAAA,mBAAS;MACTC,OAAA,EAAU,KAAM;MACdC,SAAIA,CAAAC,IAAO,EAAEC,EAAA,EACJ;QAGX,OAAAP,MAAA,CAAAO,EAAA,IAAAvB,aAAA,CAAAsB,IAAA;MACF;IACF","ignoreList":[]}
@@ -1,84 +1,75 @@
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;
6
- var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __getProtoOf = Object.getPrototypeOf,
8
+ __hasOwnProp = Object.prototype.hasOwnProperty;
7
9
  var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: !0 });
10
- }, __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from == "object" || typeof from == "function")
12
- for (let key of __getOwnPropNames(from))
13
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- return to;
15
- };
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: !0
13
+ });
14
+ },
15
+ __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ return to;
21
+ };
16
22
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
23
  // If the importer is in node compatibility mode or this is not an ESM
18
24
  // file that has been converted to a CommonJS file using a Babel-
19
25
  // compatible transform (i.e. "__esModule" has not been set), then set
20
26
  // "default" to the CommonJS "module.exports" for node compatibility.
21
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
22
- mod
23
- )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
+ value: mod,
29
+ enumerable: !0
30
+ }) : target, mod)),
31
+ __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
+ value: !0
33
+ }), mod);
24
34
  var transformFlowBabel_exports = {};
25
35
  __export(transformFlowBabel_exports, {
26
36
  transformFlowBabel: () => transformFlowBabel
27
37
  });
28
38
  module.exports = __toCommonJS(transformFlowBabel_exports);
29
- var import_core = __toESM(require("@babel/core"), 1), import_resolve = require("@vxrn/resolve"), import_promises = require("node:fs/promises");
39
+ var import_core = __toESM(require("@babel/core"), 1),
40
+ import_resolve = require("@vxrn/resolve"),
41
+ import_promises = require("fs/promises");
30
42
  async function transformFlowBabel(input) {
31
- var { development = !1 } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, metroPresetPath = "module:metro-react-native-babel-preset";
43
+ var {
44
+ development = !1
45
+ } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {},
46
+ metroPresetPath = "module:metro-react-native-babel-preset";
32
47
  try {
33
48
  var attempt = (0, import_resolve.resolvePath)("metro-react-native-babel-preset", (0, import_resolve.resolvePath)("@vxrn/vite-flow"));
34
49
  (await (0, import_promises.stat)(attempt)).isDirectory() && (metroPresetPath = attempt);
35
- } catch {
36
- }
37
- return await new Promise(function(res, rej) {
50
+ } catch {}
51
+ return await new Promise(function (res, rej) {
38
52
  import_core.default.transform(input, {
39
53
  filename: "file.js",
40
54
  // this is required for @react-native/babel-plugin-codegen to work.
41
- presets: [
42
- [
43
- metroPresetPath,
44
- {
45
- // To use the `@babel/plugin-transform-react-jsx` plugin for JSX.
46
- useTransformReactJSXExperimental: !0,
47
- unstable_transformProfile: "hermes-stable"
48
- }
49
- ]
50
- ],
51
- plugins: [
52
- [
53
- "babel-plugin-syntax-hermes-parser"
54
- ],
55
- // This parser is required for the `@babel/plugin-transform-react-jsx` plugin to work.
56
- [
57
- "@react-native/babel-plugin-codegen"
58
- ],
59
- // Transforms thing like `export default (codegenNativeComponent<NativeProps>('DebuggingOverlay'));` into `export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);`, we need to do this here since Flow types are required to generate that `__INTERNAL_VIEW_CONFIG`. Without this we'll get warnings/errors like "Codegen didn't run for DebuggingOverlay".
60
- [
61
- "@babel/plugin-transform-react-jsx",
62
- {
63
- development
64
- }
65
- ],
66
- [
67
- "@babel/plugin-transform-private-methods",
68
- {
69
- loose: !0
70
- }
71
- ]
72
- ]
73
- }, function(err, result) {
74
- if (!result || err)
75
- return rej(err || "no res");
55
+ presets: [[metroPresetPath, {
56
+ // To use the `@babel/plugin-transform-react-jsx` plugin for JSX.
57
+ useTransformReactJSXExperimental: !0,
58
+ unstable_transformProfile: "hermes-stable"
59
+ }]],
60
+ plugins: [["babel-plugin-syntax-hermes-parser"],
61
+ // This parser is required for the `@babel/plugin-transform-react-jsx` plugin to work.
62
+ ["@react-native/babel-plugin-codegen"],
63
+ // Transforms thing like `export default (codegenNativeComponent<NativeProps>('DebuggingOverlay'));` into `export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);`, we need to do this here since Flow types are required to generate that `__INTERNAL_VIEW_CONFIG`. Without this we'll get warnings/errors like "Codegen didn't run for DebuggingOverlay".
64
+ ["@babel/plugin-transform-react-jsx", {
65
+ development
66
+ }], ["@babel/plugin-transform-private-methods", {
67
+ loose: !0
68
+ }]]
69
+ }, function (err, result) {
70
+ if (!result || err) return rej(err || "no res");
76
71
  res(result.code);
77
72
  });
78
73
  });
79
74
  }
80
- // Annotate the CommonJS export names for ESM import in node:
81
- 0 && (module.exports = {
82
- transformFlowBabel
83
- });
84
- //# sourceMappingURL=transformFlowBabel.js.map
75
+ //# sourceMappingURL=transformFlowBabel.native.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/transformFlowBabel.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;kBAAkB,oCAClB,iBAA4B,0BAC5B,kBAAqB;AAErB,eAAsBA,mBACpBC,OAAa;MACb,EAAEC,cAAc,GAAK,IAArB,UAAA,SAAA,KAAA,UAAA,CAAA,MAAA,SAAA,UAAA,CAAA,IAAqD,CAAC,GAElDC,kBAAkB;AAEtB,MAAI;AAGF,QAAMC,cAAUC,4BAAY,uCAAmCA,4BAAY,iBAAA,CAAA;AAC3E,KAAK,UAAMC,sBAAKF,OAAAA,GAAUG,YAAW,MACnCJ,kBAAkBC;EAEtB,QAAc;EAEd;AAEA,SAAO,MAAM,IAAII,QAAgB,SAACC,KAAKC,KAAAA;AACrCC,gBAAAA,QAAMC,UACJX,OACA;MACEY,UAAU;;MACVC,SAAS;QACP;UACEX;UACA;;YAEEY,kCAAkC;YAClCC,2BAA2B;UAC7B;;;MAGJC,SAAS;QACP;UAAC;;;QACD;UAAC;;;QACD;UAAC;UAAqC;YAAEf;UAAY;;QACpD;UAAC;UAA2C;YAAEgB,OAAO;UAAK;;;IAE9D,GACA,SAACC,KAAUC,QAAAA;AACT,UAAI,CAACA,UAAUD;AACb,eAAOT,IAAIS,OAAO,QAAA;AAEpBV,UAAIW,OAAQC,IAAI;IAClB,CAAA;EAEJ,CAAA;AACF;",
5
- "names": ["transformFlowBabel", "input", "development", "metroPresetPath", "attempt", "resolvePath", "stat", "isDirectory", "Promise", "res", "rej", "babel", "transform", "filename", "presets", "useTransformReactJSXExperimental", "unstable_transformProfile", "plugins", "loose", "err", "result", "code"]
6
- }
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","transformFlowBabel_exports","__export","transformFlowBabel","module","exports","import_core","__toESM","require","import_resolve","import_promises","input","development","arguments","length","metroPresetPath","attempt","resolvePath","stat","isDirectory","Promise","res","rej","default","transform","filename","presets","useTransformReactJSXExperimental","unstable_transformProfile","plugins"],"sources":["../../src/transformFlowBabel.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAA;EAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;IAAAC,KAAA;EAAA,IAAAH,GAAA;AAAA,IAAAI,0BAAA;AAAAC,QAAA,CAAAD,0BAAA;EAAAE,kBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAkB,CAAAK,0BAClB;AAGA,IAAAK,WAAsB,GAAAC,OAAA,CAAAC,OAAA,CACpB,aACE;EAAAC,cACF,GAAAD,OAAA;EAAAE,eAAA,GAAAF,OAAA;AACA,eAAIL,kBAAkBA,CAAAQ,KAAA;EAEtB,IAAI;MAAAC,WAAA;IAAA,IAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,iBAAAA,SAAA;IAAAE,eAAA;EAGF;IACA,IAAKC,OAAM,OAAAP,cAAA,CAAKQ,WAAU,mCACN,MAAAR,cAAA,CAAAQ,WAAA;IAEtB,OAAc,IAAAP,eAAA,CAAAQ,IAAA,EAAAF,OAAA,GAAAG,WAAA,OAAAJ,eAAA,GAAAC,OAAA;EAEd,SAEA;EACE,iBAAAI,OAAM,WAAAC,GAAA,EAAAC,GAAA;IAAAhB,WACJ,CAAAiB,OAAA,CAAAC,SAAA,CAAAb,KAAA;MACAc,QAAA;MAAA;MACYC,OAAA,GACV,CACEX,eAAA;QAEE;QAAAY,gCAAA;QAAAC,yBAEE;MAAkC,EACP,CAC7B;MACFC,OACF,GACA,CACE,mCAAC,CAAmC;MAAA;MACC,CACrC,oCAAC,CAAoD;MAEvD;MACF,CACC,mCAAqB,EACpB;QACEjB;MAEF,EACF,EACF,CACD,2CACH","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  import babel from "@babel/core";
2
2
  import { resolvePath } from "@vxrn/resolve";
3
- import { stat } from "node:fs/promises";
3
+ import { stat } from "fs/promises";
4
4
  async function transformFlowBabel(input) {
5
5
  var {
6
6
  development = !1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vxrn/vite-flow",
3
- "version": "1.1.537",
3
+ "version": "1.1.539",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./package.json": "./package.json",
@@ -31,7 +31,7 @@
31
31
  "@babel/helper-plugin-utils": "7.26.5",
32
32
  "@babel/plugin-transform-private-methods": "~7.25.9",
33
33
  "@react-native/babel-plugin-codegen": "^0.76.5",
34
- "@vxrn/resolve": "1.1.537",
34
+ "@vxrn/resolve": "1.1.539",
35
35
  "babel-plugin-syntax-hermes-parser": "^0.25.1",
36
36
  "flow-remove-types": "^2.247.1",
37
37
  "metro-react-native-babel-preset": "^0.77.0",
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "devDependencies": {
41
41
  "@biomejs/biome": "1.9.4",
42
- "@tamagui/build": "^1.132.23"
42
+ "@tamagui/build": "^1.135.6"
43
43
  },
44
44
  "publishConfig": {
45
45
  "access": "public"