@devup-ui/next-plugin 1.0.61 → 1.0.63

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/preload.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("node:fs"),o=require("node:path"),f=require("@devup-ui/wasm"),d=require("glob"),w=require("./find-top-package-root.cjs"),j=require("./get-package-name.cjs"),y=require("./has-localpackage.cjs");function p(r,l,i,s,a,g=process.cwd()){if(a.length>0&&y.hasLocalPackage()){const n=w.findTopPackageRoot(),t=d.globSync(["package.json","!**/node_modules/**"],{follow:!0,absolute:!0,cwd:n}).filter(e=>a.includes(j.getPackageName(e))).map(e=>o.dirname(e));for(const e of t)p(r,l,i,s,a,e);return}const u=d.globSync(["**/*.tsx","**/*.ts","**/*.js","**/*.mjs"],{follow:!0,absolute:!0,cwd:g});u.sort();for(const n of u){const t=o.relative(process.cwd(),c.realpathSync(n));if(/\.(test(-d)?|d|spec)\.(tsx|ts|js|mjs)$/.test(t)||/^(out|.next)[/\\]/.test(t)||r.test(t))continue;const{cssFile:e,css:m}=f.codeExtract(t,c.readFileSync(t,"utf-8"),l,s,i,!1,!0);e&&c.writeFileSync(o.join(s,o.basename(e)),m??"","utf-8")}c.writeFileSync(o.join(s,"devup-ui.css"),f.getCss(null,!1),"utf-8")}exports.preload=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("node:fs"),o=require("node:path"),f=require("@devup-ui/wasm"),d=require("tinyglobby"),b=require("./find-top-package-root.cjs"),S=require("./get-package-name.cjs"),k=require("./has-localpackage.cjs");function p(r,l,i,s,a,g=process.cwd(),m=!1){if(a.length>0&&k.hasLocalPackage()){const n=b.findTopPackageRoot(),t=d.globSync(["package.json","!**/node_modules/**"],{followSymbolicLinks:!0,absolute:!0,cwd:n}).filter(e=>a.includes(S.getPackageName(e))).map(e=>o.dirname(e));for(const e of t)p(r,l,i,s,a,e,!0);if(m)return}const u=d.globSync(["**/*.tsx","**/*.ts","**/*.js","**/*.mjs"],{followSymbolicLinks:!0,absolute:!0,cwd:g});u.sort();for(const n of u){const t=o.relative(process.cwd(),c.realpathSync(n));if(/\.(test(-d)?|d|spec)\.(tsx|ts|js|mjs)$/.test(t)||/^(out|.next)[/\\]/.test(t)||r.test(t))continue;const{cssFile:e,css:y}=f.codeExtract(t,c.readFileSync(t,"utf-8"),l,s,i,!1,!0);e&&c.writeFileSync(o.join(s,o.basename(e)),y??"","utf-8")}c.writeFileSync(o.join(s,"devup-ui.css"),f.getCss(null,!1),"utf-8")}exports.preload=p;
package/dist/preload.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare function preload(excludeRegex: RegExp, libPackage: string, singleCss: boolean, cssDir: string, include: string[], pwd?: string): void;
1
+ export declare function preload(excludeRegex: RegExp, libPackage: string, singleCss: boolean, cssDir: string, include: string[], pwd?: string, nested?: boolean): void;
2
2
  //# sourceMappingURL=preload.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"preload.d.ts","sourceRoot":"","sources":["../src/preload.ts"],"names":[],"mappings":"AAUA,wBAAgB,OAAO,CACrB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,OAAO,EAClB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EAAE,EACjB,GAAG,SAAgB,QAgDpB"}
1
+ {"version":3,"file":"preload.d.ts","sourceRoot":"","sources":["../src/preload.ts"],"names":[],"mappings":"AAUA,wBAAgB,OAAO,CACrB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,OAAO,EAClB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EAAE,EACjB,GAAG,SAAgB,EACnB,MAAM,UAAQ,QA+Cf"}
package/dist/preload.js CHANGED
@@ -1,44 +1,44 @@
1
- import { realpathSync as d, readFileSync as w, writeFileSync as n } from "node:fs";
2
- import { dirname as g, relative as j, join as m, basename as h } from "node:path";
3
- import { codeExtract as k, getCss as y } from "@devup-ui/wasm";
4
- import { globSync as i } from "glob";
5
- import { findTopPackageRoot as S } from "./find-top-package-root.js";
6
- import { getPackageName as b } from "./get-package-name.js";
7
- import { hasLocalPackage as x } from "./has-localpackage.js";
8
- function F(c, f, a, e, s, p = process.cwd()) {
9
- if (s.length > 0 && x()) {
10
- const r = S(), o = i(["package.json", "!**/node_modules/**"], {
11
- follow: !0,
1
+ import { realpathSync as w, readFileSync as g, writeFileSync as n } from "node:fs";
2
+ import { dirname as j, relative as k, join as i, basename as y } from "node:path";
3
+ import { codeExtract as S, getCss as b } from "@devup-ui/wasm";
4
+ import { globSync as m } from "tinyglobby";
5
+ import { findTopPackageRoot as h } from "./find-top-package-root.js";
6
+ import { getPackageName as x } from "./get-package-name.js";
7
+ import { hasLocalPackage as F } from "./has-localpackage.js";
8
+ function L(c, f, a, e, s, p = process.cwd(), u = !1) {
9
+ if (s.length > 0 && F()) {
10
+ const r = h(), o = m(["package.json", "!**/node_modules/**"], {
11
+ followSymbolicLinks: !0,
12
12
  absolute: !0,
13
13
  cwd: r
14
- }).filter((t) => s.includes(b(t))).map((t) => g(t));
14
+ }).filter((t) => s.includes(x(t))).map((t) => j(t));
15
15
  for (const t of o)
16
- F(c, f, a, e, s, t);
17
- return;
16
+ L(c, f, a, e, s, t, !0);
17
+ if (u) return;
18
18
  }
19
- const l = i(["**/*.tsx", "**/*.ts", "**/*.js", "**/*.mjs"], {
20
- follow: !0,
19
+ const l = m(["**/*.tsx", "**/*.ts", "**/*.js", "**/*.mjs"], {
20
+ followSymbolicLinks: !0,
21
21
  absolute: !0,
22
22
  cwd: p
23
23
  });
24
24
  l.sort();
25
25
  for (const r of l) {
26
- const o = j(process.cwd(), d(r));
26
+ const o = k(process.cwd(), w(r));
27
27
  if (/\.(test(-d)?|d|spec)\.(tsx|ts|js|mjs)$/.test(o) || /^(out|.next)[/\\]/.test(o) || c.test(o))
28
28
  continue;
29
- const { cssFile: t, css: u } = k(
29
+ const { cssFile: t, css: d } = S(
30
30
  o,
31
- w(o, "utf-8"),
31
+ g(o, "utf-8"),
32
32
  f,
33
33
  e,
34
34
  a,
35
35
  !1,
36
36
  !0
37
37
  );
38
- t && n(m(e, h(t)), u ?? "", "utf-8");
38
+ t && n(i(e, y(t)), d ?? "", "utf-8");
39
39
  }
40
- n(m(e, "devup-ui.css"), y(null, !1), "utf-8");
40
+ n(i(e, "devup-ui.css"), b(null, !1), "utf-8");
41
41
  }
42
42
  export {
43
- F as preload
43
+ L as preload
44
44
  };
package/package.json CHANGED
@@ -19,7 +19,7 @@
19
19
  "webpack"
20
20
  ],
21
21
  "type": "module",
22
- "version": "1.0.61",
22
+ "version": "1.0.63",
23
23
  "publishConfig": {
24
24
  "access": "public"
25
25
  },
@@ -46,7 +46,7 @@
46
46
  "types": "./dist/index.d.ts",
47
47
  "dependencies": {
48
48
  "next": "^16.1",
49
- "glob": "^13.0",
49
+ "tinyglobby": "^0.2",
50
50
  "@devup-ui/webpack-plugin": "^1.0.51",
51
51
  "@devup-ui/wasm": "^1.0.54"
52
52
  },