jiek 0.1.12-alpha.1 → 0.1.12-alpha.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. package/dist/commands/build.esm.js +9 -31
  2. package/dist/commands/build.esm.js.map +1 -1
  3. package/dist/commands/build.esm.min.js +1 -1
  4. package/dist/commands/build.esm.min.js.map +1 -1
  5. package/dist/commands/publish.esm.js +11 -17
  6. package/dist/commands/publish.esm.js.map +1 -1
  7. package/dist/commands/publish.esm.min.js +1 -1
  8. package/dist/commands/publish.esm.min.js.map +1 -1
  9. package/dist/index.esm.js +4 -4
  10. package/dist/index.esm.js.map +1 -1
  11. package/dist/index.esm.min.js +1 -1
  12. package/dist/index.esm.min.js.map +1 -1
  13. package/dist/index.iife.js +1 -56
  14. package/dist/index.iife.js.map +1 -1
  15. package/dist/index.iife.min.js +1 -1
  16. package/dist/index.iife.min.js.map +1 -1
  17. package/dist/index.umd.js +1 -56
  18. package/dist/index.umd.js.map +1 -1
  19. package/dist/index.umd.min.js +1 -1
  20. package/dist/index.umd.min.js.map +1 -1
  21. package/dist/rollup.esm.js +5 -5
  22. package/dist/rollup.esm.min.js +1 -1
  23. package/dist/rollup.esm.min.js.map +1 -1
  24. package/dist/utils/filterSupport.esm.js.map +1 -0
  25. package/dist/utils/filterSupport.esm.min.js.map +1 -0
  26. package/package.json +13 -9
  27. package/dist/package.json.esm.js +0 -58
  28. package/dist/package.json.esm.js.map +0 -1
  29. package/dist/package.json.esm.min.js +0 -2
  30. package/dist/package.json.esm.min.js.map +0 -1
  31. package/dist/src/commands/build.esm.js +0 -53
  32. package/dist/src/commands/build.esm.js.map +0 -1
  33. package/dist/src/commands/build.esm.min.js +0 -2
  34. package/dist/src/commands/build.esm.min.js.map +0 -1
  35. package/dist/src/commands/publish.esm.js +0 -54
  36. package/dist/src/commands/publish.esm.js.map +0 -1
  37. package/dist/src/commands/publish.esm.min.js +0 -2
  38. package/dist/src/commands/publish.esm.min.js.map +0 -1
  39. package/dist/src/inner.esm.js +0 -10
  40. package/dist/src/inner.esm.js.map +0 -1
  41. package/dist/src/inner.esm.min.js +0 -2
  42. package/dist/src/inner.esm.min.js.map +0 -1
  43. package/dist/src/merge-package-json.esm.js +0 -16
  44. package/dist/src/merge-package-json.esm.js.map +0 -1
  45. package/dist/src/merge-package-json.esm.min.js +0 -2
  46. package/dist/src/merge-package-json.esm.min.js.map +0 -1
  47. package/dist/src/rollup/plugins/globals.esm.js +0 -31
  48. package/dist/src/rollup/plugins/globals.esm.js.map +0 -1
  49. package/dist/src/rollup/plugins/globals.esm.min.js +0 -2
  50. package/dist/src/rollup/plugins/globals.esm.min.js.map +0 -1
  51. package/dist/src/rollup/plugins/skip.esm.js +0 -16
  52. package/dist/src/rollup/plugins/skip.esm.js.map +0 -1
  53. package/dist/src/rollup/plugins/skip.esm.min.js +0 -2
  54. package/dist/src/rollup/plugins/skip.esm.min.js.map +0 -1
  55. package/dist/src/rollup/utils/commonOptions.esm.js +0 -10
  56. package/dist/src/rollup/utils/commonOptions.esm.js.map +0 -1
  57. package/dist/src/rollup/utils/commonOptions.esm.min.js +0 -2
  58. package/dist/src/rollup/utils/commonOptions.esm.min.js.map +0 -1
  59. package/dist/src/rollup/utils/externalResolver.esm.js +0 -10
  60. package/dist/src/rollup/utils/externalResolver.esm.js.map +0 -1
  61. package/dist/src/rollup/utils/externalResolver.esm.min.js +0 -2
  62. package/dist/src/rollup/utils/externalResolver.esm.min.js.map +0 -1
  63. package/dist/src/rollup/utils/globalResolver.esm.js +0 -26
  64. package/dist/src/rollup/utils/globalResolver.esm.js.map +0 -1
  65. package/dist/src/rollup/utils/globalResolver.esm.min.js +0 -2
  66. package/dist/src/rollup/utils/globalResolver.esm.min.js.map +0 -1
  67. package/dist/src/rollup/utils/withMinify.esm.js +0 -15
  68. package/dist/src/rollup/utils/withMinify.esm.js.map +0 -1
  69. package/dist/src/rollup/utils/withMinify.esm.min.js +0 -2
  70. package/dist/src/rollup/utils/withMinify.esm.min.js.map +0 -1
  71. package/dist/src/utils/filterSupport.esm.js.map +0 -1
  72. package/dist/src/utils/filterSupport.esm.min.js.map +0 -1
  73. /package/dist/{src/utils → utils}/filterSupport.esm.js +0 -0
  74. /package/dist/{src/utils → utils}/filterSupport.esm.min.js +0 -0
@@ -1,54 +0,0 @@
1
- import fs from 'node:fs';
2
- import path from 'node:path';
3
- import { bump } from '@jiek/utils/bumper';
4
- import * as childProcess from 'child_process';
5
- import { program } from 'commander';
6
- import { actionRestore, actionDone } from '../inner.esm.js';
7
- import { mergePackageJson } from '../merge-package-json.esm.js';
8
- import { getSelectedProjectsGraph } from '../utils/filterSupport.esm.js';
9
-
10
- program.command("publish").aliases(["pub", "p"]).option("--bumper <bumper>", "bump version", "patch").action(async ({ bumper, ...options }) => {
11
- actionRestore();
12
- const { value = {} } = await getSelectedProjectsGraph() ?? {};
13
- const selectedProjectsGraphEntries = Object.entries(value);
14
- if (selectedProjectsGraphEntries.length === 0) {
15
- throw new Error("no packages selected");
16
- }
17
- const mainfests = [];
18
- selectedProjectsGraphEntries.forEach(([dir, manifest]) => {
19
- mainfests.push([
20
- dir,
21
- mergePackageJson(manifest, dir)
22
- ]);
23
- });
24
- const passArgs = Object.entries(options).reduce((acc, [key, value2]) => {
25
- if (value2) {
26
- acc.push(`--${key}`, value2);
27
- }
28
- return acc;
29
- }, []);
30
- for (const [dir, m] of mainfests) {
31
- const newVersion = bump(m.version, bumper);
32
- const newManifest = {
33
- ...m,
34
- version: newVersion
35
- };
36
- fs.renameSync(path.join(dir, "package.json"), path.join(dir, "package.json.bak"));
37
- fs.writeFileSync(path.join(dir, "package.json"), JSON.stringify(newManifest, null, 2));
38
- console.log(newManifest);
39
- try {
40
- childProcess.execSync(["pnpm", "publish", "--access", "public", "--no-git-checks", ...passArgs].join(" "), {
41
- cwd: dir,
42
- stdio: "inherit"
43
- });
44
- const oldPackageJson = JSON.parse(fs.readFileSync(path.join(dir, "package.json.bak"), "utf-8"));
45
- oldPackageJson.version = newVersion;
46
- fs.writeFileSync(path.join(dir, "package.json.bak"), JSON.stringify(oldPackageJson, null, 2));
47
- } finally {
48
- fs.unlinkSync(path.join(dir, "package.json"));
49
- fs.renameSync(path.join(dir, "package.json.bak"), path.join(dir, "package.json"));
50
- }
51
- }
52
- actionDone();
53
- });
54
- //# sourceMappingURL=publish.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"publish.esm.js","sources":["../../../src/commands/publish.ts"],"sourcesContent":["import fs from 'node:fs'\nimport path from 'node:path'\n\nimport { bump, type BumperType } from '@jiek/utils/bumper'\nimport type { PackageJson } from '@npm/types'\nimport * as childProcess from 'child_process'\nimport { program } from 'commander'\n\nimport { actionDone, actionRestore } from '../inner'\nimport { mergePackageJson } from '../merge-package-json'\nimport { getSelectedProjectsGraph } from '../utils/filterSupport'\n\nprogram\n .command('publish')\n .aliases(['pub', 'p'])\n .option('--bumper <bumper>', 'bump version', 'patch')\n .action(async ({ bumper, ...options }: {\n root?: string\n filter?: string\n bumper: BumperType\n }) => {\n actionRestore()\n\n const { value = {} } = await getSelectedProjectsGraph() ?? {}\n const selectedProjectsGraphEntries = Object.entries(value)\n if (selectedProjectsGraphEntries.length === 0) {\n throw new Error('no packages selected')\n }\n const mainfests: [dir: string, PackageJson][] = []\n selectedProjectsGraphEntries\n .forEach(([dir, manifest]) => {\n mainfests.push([\n dir, mergePackageJson(manifest, dir)\n ])\n })\n const passArgs = Object\n .entries(options)\n .reduce((acc, [key, value]) => {\n if (value) {\n acc.push(`--${key}`, value as string)\n }\n return acc\n }, [] as string[])\n for (const [dir, m] of mainfests) {\n const newVersion = bump(m.version, bumper)\n const newManifest = {\n ...m,\n version: newVersion\n }\n fs.renameSync(path.join(dir, 'package.json'), path.join(dir, 'package.json.bak'))\n fs.writeFileSync(path.join(dir, 'package.json'), JSON.stringify(newManifest, null, 2))\n console.log(newManifest)\n try {\n childProcess.execSync(['pnpm', 'publish', '--access', 'public', '--no-git-checks', ...passArgs].join(' '), {\n cwd: dir,\n stdio: 'inherit'\n })\n const oldPackageJson = JSON.parse(fs.readFileSync(path.join(dir, 'package.json.bak'), 'utf-8'))\n oldPackageJson.version = newVersion\n fs.writeFileSync(path.join(dir, 'package.json.bak'), JSON.stringify(oldPackageJson, null, 2))\n } finally {\n fs.unlinkSync(path.join(dir, 'package.json'))\n fs.renameSync(path.join(dir, 'package.json.bak'), path.join(dir, 'package.json'))\n }\n }\n actionDone()\n })\n"],"names":["value"],"mappings":";;;;;;;;;AAYA,OACG,CAAA,OAAA,CAAQ,SAAS,CACjB,CAAA,OAAA,CAAQ,CAAC,KAAO,EAAA,GAAG,CAAC,CACpB,CAAA,MAAA,CAAO,qBAAqB,cAAgB,EAAA,OAAO,EACnD,MAAO,CAAA,OAAO,EAAE,MAAQ,EAAA,GAAG,SAItB,KAAA;AACJ,EAAc,aAAA,EAAA,CAAA;AAEd,EAAM,MAAA,EAAE,QAAQ,EAAC,KAAM,MAAM,wBAAA,MAA8B,EAAC,CAAA;AAC5D,EAAM,MAAA,4BAAA,GAA+B,MAAO,CAAA,OAAA,CAAQ,KAAK,CAAA,CAAA;AACzD,EAAI,IAAA,4BAAA,CAA6B,WAAW,CAAG,EAAA;AAC7C,IAAM,MAAA,IAAI,MAAM,sBAAsB,CAAA,CAAA;AAAA,GACxC;AACA,EAAA,MAAM,YAA0C,EAAC,CAAA;AACjD,EAAA,4BAAA,CACG,OAAQ,CAAA,CAAC,CAAC,GAAA,EAAK,QAAQ,CAAM,KAAA;AAC5B,IAAA,SAAA,CAAU,IAAK,CAAA;AAAA,MACb,GAAA;AAAA,MAAK,gBAAA,CAAiB,UAAU,GAAG,CAAA;AAAA,KACpC,CAAA,CAAA;AAAA,GACF,CAAA,CAAA;AACH,EAAM,MAAA,QAAA,GAAW,MACd,CAAA,OAAA,CAAQ,OAAO,CAAA,CACf,MAAO,CAAA,CAAC,GAAK,EAAA,CAAC,GAAKA,EAAAA,MAAK,CAAM,KAAA;AAC7B,IAAA,IAAIA,MAAO,EAAA;AACT,MAAA,GAAA,CAAI,IAAK,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AAG,EAAA,CAAA,aAAA,CAAc,IAAK,CAAA,IAAA,CAAK,GAAK,EAAA,kBAAkB,CAAG,EAAA,IAAA,CAAK,SAAU,CAAA,cAAA,EAAgB,IAAM,EAAA,CAAC,CAAC,CAAA,CAAA;AAAA,KAC5F,SAAA;AACA,MAAA,EAAA,CAAG,UAAW,CAAA,IAAA,CAAK,IAAK,CAAA,GAAA,EAAK,cAAc,CAAC,CAAA,CAAA;AAC5C,MAAG,EAAA,CAAA,UAAA,CAAW,IAAK,CAAA,IAAA,CAAK,GAAK,EAAA,kBAAkB,GAAG,IAAK,CAAA,IAAA,CAAK,GAAK,EAAA,cAAc,CAAC,CAAA,CAAA;AAAA,KAClF;AAAA,GACF;AACA,EAAW,UAAA,EAAA,CAAA;AACb,CAAC,CAAA"}
@@ -1,2 +0,0 @@
1
- import n from"node:fs";import o from"node:path";import{bump as e}from"@jiek/utils/bumper";import*as i from"child_process";import{program as s}from"commander";import{actionRestore as r,actionDone as a}from"../inner.esm.min.js";import{mergePackageJson as c}from"../merge-package-json.esm.min.js";import{getSelectedProjectsGraph as p}from"../utils/filterSupport.esm.min.js";s.command("publish").aliases(["pub","p"]).option("--bumper <bumper>","bump version","patch").action((async({bumper:s,...t})=>{r();const{value:m={}}=await p()??{},j=Object.entries(m);if(0===j.length)throw new Error("no packages selected");const l=[];j.forEach((([n,o])=>{l.push([n,c(o,n)])}));const u=Object.entries(t).reduce(((n,[o,e])=>(e&&n.push(`--${o}`,e),n)),[]);for(const[r,a]of l){const c=e(a.version,s),p={...a,version:c};n.renameSync(o.join(r,"package.json"),o.join(r,"package.json.bak")),n.writeFileSync(o.join(r,"package.json"),JSON.stringify(p,null,2)),console.log(p);try{i.execSync(["pnpm","publish","--access","public","--no-git-checks",...u].join(" "),{cwd:r,stdio:"inherit"});const e=JSON.parse(n.readFileSync(o.join(r,"package.json.bak"),"utf-8"));e.version=c,n.writeFileSync(o.join(r,"package.json.bak"),JSON.stringify(e,null,2))}finally{n.unlinkSync(o.join(r,"package.json")),n.renameSync(o.join(r,"package.json.bak"),o.join(r,"package.json"))}}a()}));
2
- //# sourceMappingURL=publish.esm.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"publish.esm.min.js","sources":["../../../src/commands/publish.ts"],"sourcesContent":["import fs from 'node:fs'\nimport path from 'node:path'\n\nimport { bump, type BumperType } from '@jiek/utils/bumper'\nimport type { PackageJson } from '@npm/types'\nimport * as childProcess from 'child_process'\nimport { program } from 'commander'\n\nimport { actionDone, actionRestore } from '../inner'\nimport { mergePackageJson } from '../merge-package-json'\nimport { getSelectedProjectsGraph } from '../utils/filterSupport'\n\nprogram\n .command('publish')\n .aliases(['pub', 'p'])\n .option('--bumper <bumper>', 'bump version', 'patch')\n .action(async ({ bumper, ...options }: {\n root?: string\n filter?: string\n bumper: BumperType\n }) => {\n actionRestore()\n\n const { value = {} } = await getSelectedProjectsGraph() ?? {}\n const selectedProjectsGraphEntries = Object.entries(value)\n if (selectedProjectsGraphEntries.length === 0) {\n throw new Error('no packages selected')\n }\n const mainfests: [dir: string, PackageJson][] = []\n selectedProjectsGraphEntries\n .forEach(([dir, manifest]) => {\n mainfests.push([\n dir, mergePackageJson(manifest, dir)\n ])\n })\n const passArgs = Object\n .entries(options)\n .reduce((acc, [key, value]) => {\n if (value) {\n acc.push(`--${key}`, value as string)\n }\n return acc\n }, [] as string[])\n for (const [dir, m] of mainfests) {\n const newVersion = bump(m.version, bumper)\n const newManifest = {\n ...m,\n version: newVersion\n }\n fs.renameSync(path.join(dir, 'package.json'), path.join(dir, 'package.json.bak'))\n fs.writeFileSync(path.join(dir, 'package.json'), JSON.stringify(newManifest, null, 2))\n console.log(newManifest)\n try {\n childProcess.execSync(['pnpm', 'publish', '--access', 'public', '--no-git-checks', ...passArgs].join(' '), {\n cwd: dir,\n stdio: 'inherit'\n })\n const oldPackageJson = JSON.parse(fs.readFileSync(path.join(dir, 'package.json.bak'), 'utf-8'))\n oldPackageJson.version = newVersion\n fs.writeFileSync(path.join(dir, 'package.json.bak'), JSON.stringify(oldPackageJson, null, 2))\n } finally {\n fs.unlinkSync(path.join(dir, 'package.json'))\n fs.renameSync(path.join(dir, 'package.json.bak'), path.join(dir, 'package.json'))\n }\n }\n actionDone()\n })\n"],"names":["program","command","aliases","option","action","async","bumper","options","actionRestore","value","getSelectedProjectsGraph","selectedProjectsGraphEntries","Object","entries","length","Error","mainfests","forEach","dir","manifest","push","mergePackageJson","passArgs","reduce","acc","key","m","newVersion","bump","version","newManifest","fs","renameSync","path","join","writeFileSync","JSON","stringify","console","log","childProcess","execSync","cwd","stdio","oldPackageJson","parse","readFileSync","unlinkSync","actionDone"],"mappings":"mXAYAA,EACGC,QAAQ,WACRC,QAAQ,CAAC,MAAO,MAChBC,OAAO,oBAAqB,eAAgB,SAC5CC,QAAOC,OAASC,YAAWC,MAKZC,IAER,MAAAC,MAAEA,EAAQ,CAAC,SAAYC,KAA8B,CAAA,EACrDC,EAA+BC,OAAOC,QAAQJ,GAChD,GAAwC,IAAxCE,EAA6BG,OACzB,MAAA,IAAIC,MAAM,wBAElB,MAAMC,EAA0C,GAChDL,EACGM,SAAQ,EAAEC,EAAKC,MACdH,EAAUI,KAAK,CACbF,EAAKG,EAAiBF,EAAUD,IACjC,IAEC,MAAAI,EAAWV,OACdC,QAAQN,GACRgB,QAAO,CAACC,GAAMC,EAAKhB,MACdA,GACFe,EAAIJ,KAAK,KAAKK,IAAOhB,GAEhBe,IACN,IACL,IAAA,MAAYN,EAAKQ,KAAMV,EAAW,CAChC,MAAMW,EAAaC,EAAKF,EAAEG,QAASvB,GAC7BwB,EAAc,IACfJ,EACHG,QAASF,GAERI,EAAAC,WAAWC,EAAKC,KAAKhB,EAAK,gBAAiBe,EAAKC,KAAKhB,EAAK,qBAC1Da,EAAAI,cAAcF,EAAKC,KAAKhB,EAAK,gBAAiBkB,KAAKC,UAAUP,EAAa,KAAM,IACnFQ,QAAQC,IAAIT,GACR,IACFU,EAAaC,SAAS,CAAC,OAAQ,UAAW,WAAY,SAAU,qBAAsBnB,GAAUY,KAAK,KAAM,CACzGQ,IAAKxB,EACLyB,MAAO,YAEH,MAAAC,EAAiBR,KAAKS,MAAMd,EAAGe,aAAab,EAAKC,KAAKhB,EAAK,oBAAqB,UACtF0B,EAAef,QAAUF,EACtBI,EAAAI,cAAcF,EAAKC,KAAKhB,EAAK,oBAAqBkB,KAAKC,UAAUO,EAAgB,KAAM,GAAE,CAC5F,QACAb,EAAGgB,WAAWd,EAAKC,KAAKhB,EAAK,iBAC1Ba,EAAAC,WAAWC,EAAKC,KAAKhB,EAAK,oBAAqBe,EAAKC,KAAKhB,EAAK,gBACnE,CACF,CACW8B,GAAA"}
@@ -1,10 +0,0 @@
1
- let resolve;
2
- function actionDone() {
3
- resolve();
4
- }
5
- function actionRestore() {
6
- new Promise((r) => resolve = r);
7
- }
8
-
9
- export { actionDone, actionRestore };
10
- //# sourceMappingURL=inner.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inner.esm.js","sources":["../../src/inner.ts"],"sourcesContent":["let resolve: () => void\n\nexport let actionFuture: Promise<void>\n\nexport function actionDone() {\n resolve()\n}\n\nexport function actionRestore() {\n actionFuture = new Promise<void>(r => resolve = r)\n}\n"],"names":[],"mappings":"AAAA,IAAI,OAAA,CAAA;AAIG,SAAS,UAAa,GAAA;AAC3B,EAAQ,OAAA,EAAA,CAAA;AACV,CAAA;AAEO,SAAS,aAAgB,GAAA;AAC9B,EAAe,IAAI,OAAA,CAAc,CAAK,CAAA,KAAA,OAAA,GAAU,CAAC,CAAA,CAAA;AACnD;;;;"}
@@ -1,2 +0,0 @@
1
- let n;function e(){n()}function o(){new Promise((e=>n=e))}export{e as actionDone,o as actionRestore};
2
- //# sourceMappingURL=inner.esm.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inner.esm.min.js","sources":["../../src/inner.ts"],"sourcesContent":["let resolve: () => void\n\nexport let actionFuture: Promise<void>\n\nexport function actionDone() {\n resolve()\n}\n\nexport function actionRestore() {\n actionFuture = new Promise<void>(r => resolve = r)\n}\n"],"names":["resolve","actionDone","actionRestore","Promise","r"],"mappings":"AAAA,IAAIA,EAIG,SAASC,IACND,GACV,CAEO,SAASE,IACC,IAAIC,SAAmBC,GAAAJ,EAAUI,GAClD"}
@@ -1,16 +0,0 @@
1
- import { pkger } from '@jiek/pkger';
2
-
3
- function mergePackageJson(manifest, cwd) {
4
- const {
5
- jiek: { inputs: jiekInputs, cwd: _, ...jiek } = {},
6
- exports
7
- } = manifest;
8
- const inputs = jiekInputs ?? (Array.isArray(exports) ? exports : void 0);
9
- return {
10
- ...manifest,
11
- ...pkger({ inputs, cwd, ...jiek })
12
- };
13
- }
14
-
15
- export { mergePackageJson };
16
- //# sourceMappingURL=merge-package-json.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"merge-package-json.esm.js","sources":["../../src/merge-package-json.ts"],"sourcesContent":["import { type Options, pkger } from '@jiek/pkger'\nimport type { PackageJson } from '@npm/types'\nimport type { Manifest } from '@pnpm/workspace.pkgs-graph'\n\nexport function mergePackageJson(manifest: Manifest & {\n jiek?: Options\n exports?: unknown | unknown[]\n}, cwd: string) {\n const {\n jiek: { inputs: jiekInputs, cwd: _, ...jiek } = {}, exports\n } = manifest\n const inputs = jiekInputs ?? (\n Array.isArray(exports) ? exports : undefined\n )\n return {\n ...manifest,\n ...pkger({ inputs, cwd, ...jiek })\n } as PackageJson\n}\n"],"names":[],"mappings":";;AAIgB,SAAA,gBAAA,CAAiB,UAG9B,GAAa,EAAA;AACd,EAAM,MAAA;AAAA,IACJ,IAAA,EAAM,EAAE,MAAQ,EAAA,UAAA,EAAY,KAAK,CAAG,EAAA,GAAG,IAAK,EAAA,GAAI,EAAC;AAAA,IAAG,OAAA;AAAA,GAClD,GAAA,QAAA,CAAA;AACJ,EAAA,MAAM,SAAS,UACb,KAAA,KAAA,CAAM,OAAQ,CAAA,OAAO,IAAI,OAAU,GAAA,KAAA,CAAA,CAAA,CAAA;AAErC,EAAO,OAAA;AAAA,IACL,GAAG,QAAA;AAAA,IACH,GAAG,KAAM,CAAA,EAAE,QAAQ,GAAK,EAAA,GAAG,MAAM,CAAA;AAAA,GACnC,CAAA;AACF;;;;"}
@@ -1,2 +0,0 @@
1
- import{pkger as r}from"@jiek/pkger";function i(i,t){const{jiek:{inputs:o,cwd:e,...n}={},exports:p}=i,s=o??(Array.isArray(p)?p:void 0);return{...i,...r({inputs:s,cwd:t,...n})}}export{i as mergePackageJson};
2
- //# sourceMappingURL=merge-package-json.esm.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"merge-package-json.esm.min.js","sources":["../../src/merge-package-json.ts"],"sourcesContent":["import { type Options, pkger } from '@jiek/pkger'\nimport type { PackageJson } from '@npm/types'\nimport type { Manifest } from '@pnpm/workspace.pkgs-graph'\n\nexport function mergePackageJson(manifest: Manifest & {\n jiek?: Options\n exports?: unknown | unknown[]\n}, cwd: string) {\n const {\n jiek: { inputs: jiekInputs, cwd: _, ...jiek } = {}, exports\n } = manifest\n const inputs = jiekInputs ?? (\n Array.isArray(exports) ? exports : undefined\n )\n return {\n ...manifest,\n ...pkger({ inputs, cwd, ...jiek })\n } as PackageJson\n}\n"],"names":["mergePackageJson","manifest","cwd","jiek","inputs","jiekInputs","_","exports","Array","isArray","pkger"],"mappings":"oCAIgB,SAAAA,EAAiBC,EAG9BC,GACK,MACJC,MAAQC,OAAQC,EAAYH,IAAKI,KAAMH,GAAS,CAAC,EAAAI,QAAGA,GAClDN,EACEG,EAASC,IACbG,MAAMC,QAAQF,GAAWA,OAAU,GAE9B,MAAA,IACFN,KACAS,EAAM,CAAEN,SAAQF,SAAQC,IAE/B"}
@@ -1,31 +0,0 @@
1
- import globalResolver from '../utils/globalResolver.esm.js';
2
-
3
- function createGlobalsLinkage() {
4
- let globals = {};
5
- const dependencies = /* @__PURE__ */ new Set([]);
6
- return [
7
- ({ external } = {}) => {
8
- return {
9
- name: "globals",
10
- resolveId(id) {
11
- if (external?.some((dep) => dep instanceof RegExp ? dep.test(id) : dep === id)) {
12
- dependencies.add(id);
13
- return { id, external: true };
14
- }
15
- return null;
16
- },
17
- outputOptions(options) {
18
- globals = [...dependencies].reduce((acc, value) => ({
19
- ...acc,
20
- [value]: globalResolver(value)
21
- }), {});
22
- return { ...options, globals };
23
- }
24
- };
25
- },
26
- { outputOptions: (options) => ({ ...options, globals }) }
27
- ];
28
- }
29
-
30
- export { createGlobalsLinkage };
31
- //# sourceMappingURL=globals.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"globals.esm.js","sources":["../../../../src/rollup/plugins/globals.ts"],"sourcesContent":["import type { Plugin, PluginImpl } from 'rollup'\n\nimport globalResolver from '../utils/globalResolver'\n\ninterface GlobalsOptions {\n external?: (string | RegExp)[]\n}\n\nexport function createGlobalsLinkage() {\n let globals = {}\n const dependencies = new Set<string>([])\n return [\n (({ external } = {}) => {\n return {\n name: 'globals',\n resolveId(id) {\n if (external?.some(dep => dep instanceof RegExp ? dep.test(id) : dep === id)) {\n dependencies.add(id)\n return { id, external: true }\n }\n return null\n },\n outputOptions(options) {\n globals = [...dependencies].reduce((acc, value) => ({\n ...acc,\n [value]: globalResolver(value)\n }), {})\n return { ...options, globals }\n }\n }\n }) as PluginImpl<GlobalsOptions>,\n { outputOptions: options => ({ ...options, globals }) } as Plugin\n ] as const\n}\n"],"names":[],"mappings":";;AAQO,SAAS,oBAAuB,GAAA;AACrC,EAAA,IAAI,UAAU,EAAC,CAAA;AACf,EAAA,MAAM,YAAe,mBAAA,IAAI,GAAY,CAAA,EAAE,CAAA,CAAA;AACvC,EAAO,OAAA;AAAA,IACJ,CAAC,EAAE,QAAS,EAAA,GAAI,EAAO,KAAA;AACtB,MAAO,OAAA;AAAA,QACL,IAAM,EAAA,SAAA;AAAA,QACN,UAAU,EAAI,EAAA;AACZ,UAAI,IAAA,QAAA,EAAU,IAAK,CAAA,CAAA,GAAA,KAAO,GAAe,YAAA,MAAA,GAAS,GAAI,CAAA,IAAA,CAAK,EAAE,CAAA,GAAI,GAAQ,KAAA,EAAE,CAAG,EAAA;AAC5E,YAAA,YAAA,CAAa,IAAI,EAAE,CAAA,CAAA;AACnB,YAAO,OAAA,EAAE,EAAI,EAAA,QAAA,EAAU,IAAK,EAAA,CAAA;AAAA,WAC9B;AACA,UAAO,OAAA,IAAA,CAAA;AAAA,SACT;AAAA,QACA,cAAc,OAAS,EAAA;AACrB,UAAA,OAAA,GAAU,CAAC,GAAG,YAAY,EAAE,MAAO,CAAA,CAAC,KAAK,KAAW,MAAA;AAAA,YAClD,GAAG,GAAA;AAAA,YACH,CAAC,KAAK,GAAG,cAAA,CAAe,KAAK,CAAA;AAAA,WAC/B,CAAA,EAAI,EAAE,CAAA,CAAA;AACN,UAAO,OAAA,EAAE,GAAG,OAAA,EAAS,OAAQ,EAAA,CAAA;AAAA,SAC/B;AAAA,OACF,CAAA;AAAA,KACF;AAAA,IACA,EAAE,aAAe,EAAA,CAAA,OAAA,MAAY,EAAE,GAAG,OAAA,EAAS,SAAW,CAAA,EAAA;AAAA,GACxD,CAAA;AACF;;;;"}
@@ -1,2 +0,0 @@
1
- import e from"../utils/globalResolver.esm.min.js";function t(){let t={};const o=new Set([]);return[({external:l}={})=>({name:"globals",resolveId:e=>l?.some((t=>t instanceof RegExp?t.test(e):t===e))?(o.add(e),{id:e,external:!0}):null,outputOptions:l=>(t=[...o].reduce(((t,o)=>({...t,[o]:e(o)})),{}),{...l,globals:t})}),{outputOptions:e=>({...e,globals:t})}]}export{t as createGlobalsLinkage};
2
- //# sourceMappingURL=globals.esm.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"globals.esm.min.js","sources":["../../../../src/rollup/plugins/globals.ts"],"sourcesContent":["import type { Plugin, PluginImpl } from 'rollup'\n\nimport globalResolver from '../utils/globalResolver'\n\ninterface GlobalsOptions {\n external?: (string | RegExp)[]\n}\n\nexport function createGlobalsLinkage() {\n let globals = {}\n const dependencies = new Set<string>([])\n return [\n (({ external } = {}) => {\n return {\n name: 'globals',\n resolveId(id) {\n if (external?.some(dep => dep instanceof RegExp ? dep.test(id) : dep === id)) {\n dependencies.add(id)\n return { id, external: true }\n }\n return null\n },\n outputOptions(options) {\n globals = [...dependencies].reduce((acc, value) => ({\n ...acc,\n [value]: globalResolver(value)\n }), {})\n return { ...options, globals }\n }\n }\n }) as PluginImpl<GlobalsOptions>,\n { outputOptions: options => ({ ...options, globals }) } as Plugin\n ] as const\n}\n"],"names":["createGlobalsLinkage","globals","dependencies","Set","external","name","resolveId","id","some","dep","RegExp","test","add","outputOptions","options","reduce","acc","value","globalResolver"],"mappings":"kDAQO,SAASA,IACd,IAAIC,EAAU,CAAA,EACd,MAAMC,EAAe,IAAIC,IAAY,IAC9B,MAAA,CACJ,EAAGC,YAAa,MACR,CACLC,KAAM,UACNC,UAAUC,GACJH,GAAUI,MAAKC,GAAOA,aAAeC,OAASD,EAAIE,KAAKJ,GAAME,IAAQF,KACvEL,EAAaU,IAAIL,GACV,CAAEA,KAAIH,UAAU,IAElB,KAETS,cAAcC,IACZb,EAAU,IAAIC,GAAca,QAAO,CAACC,EAAKC,KAAW,IAC/CD,EACHC,CAACA,GAAQC,EAAeD,MACtB,CAAE,GACC,IAAKH,EAASb,cAI3B,CAAEY,cAAeC,IAAA,IAAiBA,EAASb,aAE/C"}
@@ -1,16 +0,0 @@
1
- var skip = (options = {}) => {
2
- return {
3
- name: "skip",
4
- // skip the specified files by `options.patterns`
5
- load(id) {
6
- if (options.patterns?.some(
7
- (pattern) => typeof pattern === "string" ? id.includes(pattern) : pattern.test(id)
8
- )) {
9
- return "";
10
- }
11
- }
12
- };
13
- };
14
-
15
- export { skip as default };
16
- //# sourceMappingURL=skip.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skip.esm.js","sources":["../../../../src/rollup/plugins/skip.ts"],"sourcesContent":["import type { PluginImpl } from 'rollup'\n\ninterface Options {\n patterns?: (string | RegExp)[]\n}\n\nexport default ((options = {}) => {\n return {\n name: 'skip',\n // skip the specified files by `options.patterns`\n load(id) {\n if (\n options.patterns?.some((pattern) =>\n typeof pattern === 'string'\n ? id.includes(pattern)\n : pattern.test(id)\n )\n ) {\n return ''\n }\n }\n }\n}) as PluginImpl<Options>\n"],"names":[],"mappings":"AAMA,WAAgB,CAAC,OAAU,GAAA,EAAO,KAAA;AAChC,EAAO,OAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA;AAAA,IAEN,KAAK,EAAI,EAAA;AACP,MAAA,IACE,QAAQ,QAAU,EAAA,IAAA;AAAA,QAAK,CAAC,OACtB,KAAA,OAAO,OAAY,KAAA,QAAA,GACf,EAAG,CAAA,QAAA,CAAS,OAAO,CAAA,GACnB,OAAQ,CAAA,IAAA,CAAK,EAAE,CAAA;AAAA,OAErB,EAAA;AACA,QAAO,OAAA,EAAA,CAAA;AAAA,OACT;AAAA,KACF;AAAA,GACF,CAAA;AACF,CAAA;;;;"}
@@ -1,2 +0,0 @@
1
- var e=(e={})=>({name:"skip",load(t){if(e.patterns?.some((e=>"string"==typeof e?t.includes(e):e.test(t))))return""}});export{e as default};
2
- //# sourceMappingURL=skip.esm.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skip.esm.min.js","sources":["../../../../src/rollup/plugins/skip.ts"],"sourcesContent":["import type { PluginImpl } from 'rollup'\n\ninterface Options {\n patterns?: (string | RegExp)[]\n}\n\nexport default ((options = {}) => {\n return {\n name: 'skip',\n // skip the specified files by `options.patterns`\n load(id) {\n if (\n options.patterns?.some((pattern) =>\n typeof pattern === 'string'\n ? id.includes(pattern)\n : pattern.test(id)\n )\n ) {\n return ''\n }\n }\n }\n}) as PluginImpl<Options>\n"],"names":["skip","options","name","load","id","patterns","some","pattern","includes","test"],"mappings":"AAMA,IAAAA,EAAgB,CAACC,EAAU,CAAA,KAClB,CACLC,KAAM,OAEN,IAAAC,CAAKC,GACH,GACEH,EAAQI,UAAUC,MAAMC,GACH,iBAAZA,EACHH,EAAGI,SAASD,GACZA,EAAQE,KAAKL,KAGZ,MAAA,EAEX"}
@@ -1,10 +0,0 @@
1
- const defineOutput = (output) => output;
2
- const commonOutputOptions = defineOutput({
3
- dir: "dist",
4
- exports: "named",
5
- interop: "auto",
6
- sourcemap: true
7
- });
8
-
9
- export { commonOutputOptions };
10
- //# sourceMappingURL=commonOptions.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"commonOptions.esm.js","sources":["../../../../src/rollup/utils/commonOptions.ts"],"sourcesContent":["import type { OutputOptions } from 'rollup'\n\nconst defineOutput = <O extends OutputOptions>(output: O) => output\n\nexport const commonOutputOptions = defineOutput({\n dir: 'dist',\n exports: 'named',\n interop: 'auto',\n sourcemap: true\n})\n"],"names":[],"mappings":"AAEA,MAAM,YAAA,GAAe,CAA0B,MAAc,KAAA,MAAA,CAAA;AAEtD,MAAM,sBAAsB,YAAa,CAAA;AAAA,EAC9C,GAAK,EAAA,MAAA;AAAA,EACL,OAAS,EAAA,OAAA;AAAA,EACT,OAAS,EAAA,MAAA;AAAA,EACT,SAAW,EAAA,IAAA;AACb,CAAC;;;;"}
@@ -1,2 +0,0 @@
1
- const o={dir:"dist",exports:"named",interop:"auto",sourcemap:!0};export{o as commonOutputOptions};
2
- //# sourceMappingURL=commonOptions.esm.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"commonOptions.esm.min.js","sources":["../../../../src/rollup/utils/commonOptions.ts"],"sourcesContent":["import type { OutputOptions } from 'rollup'\n\nconst defineOutput = <O extends OutputOptions>(output: O) => output\n\nexport const commonOutputOptions = defineOutput({\n dir: 'dist',\n exports: 'named',\n interop: 'auto',\n sourcemap: true\n})\n"],"names":["commonOutputOptions","dir","exports","interop","sourcemap"],"mappings":"AAEA,MAEaA,EAAmC,CAC9CC,IAAK,OACLC,QAAS,QACTC,QAAS,OACTC,WAAW"}
@@ -1,10 +0,0 @@
1
- function externalResolver() {
2
- const cwd = process.cwd();
3
- const pkg = require(`${cwd}/package.json`);
4
- const { dependencies = {}, peerDependencies = {} } = pkg;
5
- const external = Object.keys(dependencies).concat(Object.keys(peerDependencies));
6
- return external.map((dep) => new RegExp(`^${dep}(/.*)?$`));
7
- }
8
-
9
- export { externalResolver as default };
10
- //# sourceMappingURL=externalResolver.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"externalResolver.esm.js","sources":["../../../../src/rollup/utils/externalResolver.ts"],"sourcesContent":["export default function () {\n const cwd = process.cwd()\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const pkg = require(`${cwd}/package.json`)\n const { dependencies = {}, peerDependencies = {} } = pkg\n const external = <(string | RegExp)[]>Object\n .keys(dependencies)\n .concat(Object.keys(peerDependencies))\n return external\n .map(dep => new RegExp(`^${dep}(/.*)?$`))\n}\n"],"names":[],"mappings":"AAA2B,yBAAA,GAAA;AACzB,EAAM,MAAA,GAAA,GAAM,QAAQ,GAAI,EAAA,CAAA;AAExB,EAAA,MAAM,GAAM,GAAA,OAAA,CAAQ,CAAG,EAAA,GAAG,CAAe,aAAA,CAAA,CAAA,CAAA;AACzC,EAAA,MAAM,EAAE,YAAe,GAAA,IAAI,gBAAmB,GAAA,IAAO,GAAA,GAAA,CAAA;AACrD,EAAM,MAAA,QAAA,GAAgC,OACnC,IAAK,CAAA,YAAY,EACjB,MAAO,CAAA,MAAA,CAAO,IAAK,CAAA,gBAAgB,CAAC,CAAA,CAAA;AACvC,EAAO,OAAA,QAAA,CACJ,IAAI,CAAO,GAAA,KAAA,IAAI,OAAO,CAAI,CAAA,EAAA,GAAG,SAAS,CAAC,CAAA,CAAA;AAC5C;;;;"}
@@ -1,2 +0,0 @@
1
- function e(){const e=process.cwd(),c=require(`${e}/package.json`),{dependencies:n={},peerDependencies:s={}}=c;return Object.keys(n).concat(Object.keys(s)).map((e=>new RegExp(`^${e}(/.*)?$`)))}export{e as default};
2
- //# sourceMappingURL=externalResolver.esm.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"externalResolver.esm.min.js","sources":["../../../../src/rollup/utils/externalResolver.ts"],"sourcesContent":["export default function () {\n const cwd = process.cwd()\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const pkg = require(`${cwd}/package.json`)\n const { dependencies = {}, peerDependencies = {} } = pkg\n const external = <(string | RegExp)[]>Object\n .keys(dependencies)\n .concat(Object.keys(peerDependencies))\n return external\n .map(dep => new RegExp(`^${dep}(/.*)?$`))\n}\n"],"names":["externalResolver","cwd","process","pkg","require","dependencies","peerDependencies","Object","keys","concat","map","dep","RegExp"],"mappings":"AAA2B,SAAAA,IACnB,MAAAC,EAAMC,QAAQD,MAEdE,EAAMC,QAAQ,GAAGH,mBACjBI,aAAEA,EAAe,oBAAIC,EAAmB,IAAOH,EAI9C,OAH+BI,OACnCC,KAAKH,GACLI,OAAOF,OAAOC,KAAKF,IAEnBI,KAAWC,GAAA,IAAIC,OAAO,IAAID,aAC/B"}
@@ -1,26 +0,0 @@
1
- function globalResolver(external) {
2
- if (external.startsWith("@zodui/")) {
3
- return external.replace(/[@/-](\w)/g, (_, c) => c.toUpperCase());
4
- }
5
- return {
6
- react: "React",
7
- // TODO `react/jsx-runtime` is not supported `umd`
8
- "react/jsx-runtime": "ReactJSXRuntime",
9
- // https://cdn.jsdelivr.net/npm/react@18.2.0/umd/react.development.js
10
- "react-dom": "ReactDOM",
11
- // https://cdn.jsdelivr.net/npm/react-dom@18.2.0/umd/react-dom.development.js
12
- // TODO make the library use the global variable `TDesignReact` replace `TDesign`
13
- "tdesign-react/esm": "TDesign",
14
- // https://cdn.jsdelivr.net/npm/tdesign-react@1.4.0/dist/tdesign.js
15
- // https://cdn.jsdelivr.net/npm/tdesign-react@1.4.0/dist/tdesign.css
16
- "tdesign-icons-react": "TDesignIconReact",
17
- // https://cdn.jsdelivr.net/npm/tdesign-icons-react@1.4.0/dist/index.js
18
- zod: "Zod",
19
- "@zodui/core": "ZodUICore",
20
- "@zodui/core/utils": "ZodUICoreUtils",
21
- "@zodui/react": "ZodUIReact"
22
- }[external];
23
- }
24
-
25
- export { globalResolver as default };
26
- //# sourceMappingURL=globalResolver.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"globalResolver.esm.js","sources":["../../../../src/rollup/utils/globalResolver.ts"],"sourcesContent":["export default function (external: string) {\n if (external.startsWith('@zodui/')) {\n return external\n .replace(/[@/-](\\w)/g, (_, c) => c.toUpperCase())\n }\n return {\n react: 'React',\n // TODO `react/jsx-runtime` is not supported `umd`\n 'react/jsx-runtime': 'ReactJSXRuntime',\n // https://cdn.jsdelivr.net/npm/react@18.2.0/umd/react.development.js\n 'react-dom': 'ReactDOM',\n // https://cdn.jsdelivr.net/npm/react-dom@18.2.0/umd/react-dom.development.js\n // TODO make the library use the global variable `TDesignReact` replace `TDesign`\n 'tdesign-react/esm': 'TDesign',\n // https://cdn.jsdelivr.net/npm/tdesign-react@1.4.0/dist/tdesign.js\n // https://cdn.jsdelivr.net/npm/tdesign-react@1.4.0/dist/tdesign.css\n 'tdesign-icons-react': 'TDesignIconReact',\n // https://cdn.jsdelivr.net/npm/tdesign-icons-react@1.4.0/dist/index.js\n zod: 'Zod',\n '@zodui/core': 'ZodUICore',\n '@zodui/core/utils': 'ZodUICoreUtils',\n '@zodui/react': 'ZodUIReact'\n }[external]\n}\n"],"names":[],"mappings":"AAAA,uBAAA,CAAyB,QAAkB,EAAA;AACzC,EAAI,IAAA,QAAA,CAAS,UAAW,CAAA,SAAS,CAAG,EAAA;AAClC,IAAO,OAAA,QAAA,CACJ,QAAQ,YAAc,EAAA,CAAC,GAAG,CAAM,KAAA,CAAA,CAAE,aAAa,CAAA,CAAA;AAAA,GACpD;AACA,EAAO,OAAA;AAAA,IACL,KAAO,EAAA,OAAA;AAAA;AAAA,IAEP,mBAAqB,EAAA,iBAAA;AAAA;AAAA,IAErB,WAAa,EAAA,UAAA;AAAA;AAAA;AAAA,IAGb,mBAAqB,EAAA,SAAA;AAAA;AAAA;AAAA,IAGrB,qBAAuB,EAAA,kBAAA;AAAA;AAAA,IAEvB,GAAK,EAAA,KAAA;AAAA,IACL,aAAe,EAAA,WAAA;AAAA,IACf,mBAAqB,EAAA,gBAAA;AAAA,IACrB,cAAgB,EAAA,YAAA;AAAA,IAChB,QAAQ,CAAA,CAAA;AACZ;;;;"}
@@ -1,2 +0,0 @@
1
- function e(e){return e.startsWith("@zodui/")?e.replace(/[@/-](\w)/g,((e,t)=>t.toUpperCase())):{react:"React","react/jsx-runtime":"ReactJSXRuntime","react-dom":"ReactDOM","tdesign-react/esm":"TDesign","tdesign-icons-react":"TDesignIconReact",zod:"Zod","@zodui/core":"ZodUICore","@zodui/core/utils":"ZodUICoreUtils","@zodui/react":"ZodUIReact"}[e]}export{e as default};
2
- //# sourceMappingURL=globalResolver.esm.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"globalResolver.esm.min.js","sources":["../../../../src/rollup/utils/globalResolver.ts"],"sourcesContent":["export default function (external: string) {\n if (external.startsWith('@zodui/')) {\n return external\n .replace(/[@/-](\\w)/g, (_, c) => c.toUpperCase())\n }\n return {\n react: 'React',\n // TODO `react/jsx-runtime` is not supported `umd`\n 'react/jsx-runtime': 'ReactJSXRuntime',\n // https://cdn.jsdelivr.net/npm/react@18.2.0/umd/react.development.js\n 'react-dom': 'ReactDOM',\n // https://cdn.jsdelivr.net/npm/react-dom@18.2.0/umd/react-dom.development.js\n // TODO make the library use the global variable `TDesignReact` replace `TDesign`\n 'tdesign-react/esm': 'TDesign',\n // https://cdn.jsdelivr.net/npm/tdesign-react@1.4.0/dist/tdesign.js\n // https://cdn.jsdelivr.net/npm/tdesign-react@1.4.0/dist/tdesign.css\n 'tdesign-icons-react': 'TDesignIconReact',\n // https://cdn.jsdelivr.net/npm/tdesign-icons-react@1.4.0/dist/index.js\n zod: 'Zod',\n '@zodui/core': 'ZodUICore',\n '@zodui/core/utils': 'ZodUICoreUtils',\n '@zodui/react': 'ZodUIReact'\n }[external]\n}\n"],"names":["globalResolver","external","startsWith","replace","_","c","toUpperCase","react","zod"],"mappings":"AAAA,SAAAA,EAAyBC,GACnB,OAAAA,EAASC,WAAW,WACfD,EACJE,QAAQ,cAAc,CAACC,EAAGC,IAAMA,EAAEC,gBAEhC,CACLC,MAAO,QAEP,oBAAqB,kBAErB,YAAa,WAGb,oBAAqB,UAGrB,sBAAuB,mBAEvBC,IAAK,MACL,cAAe,YACf,oBAAqB,iBACrB,eAAgB,cAChBP,EACJ"}
@@ -1,15 +0,0 @@
1
- import terser from '@rollup/plugin-terser';
2
-
3
- function withMinify(output) {
4
- return [
5
- output,
6
- {
7
- ...output,
8
- entryFileNames: output.entryFileNames?.replace(/(\.js)$/, ".min$1"),
9
- plugins: [...output.plugins ?? [], terser()]
10
- }
11
- ];
12
- }
13
-
14
- export { withMinify as default };
15
- //# sourceMappingURL=withMinify.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"withMinify.esm.js","sources":["../../../../src/rollup/utils/withMinify.ts"],"sourcesContent":["import terser from '@rollup/plugin-terser'\nimport type { OutputOptions, OutputPlugin } from 'rollup'\n\nexport default function (output: OutputOptions & {\n entryFileNames?: string\n plugins?: OutputPlugin[]\n}): OutputOptions[] {\n return [\n output,\n {\n ...output,\n entryFileNames: output.entryFileNames?.replace(/(\\.js)$/, '.min$1'),\n plugins: [...(output.plugins ?? []), terser()]\n }\n ]\n}\n"],"names":[],"mappings":";;AAGA,mBAAA,CAAyB,MAGL,EAAA;AAClB,EAAO,OAAA;AAAA,IACL,MAAA;AAAA,IACA;AAAA,MACE,GAAG,MAAA;AAAA,MACH,cAAgB,EAAA,MAAA,CAAO,cAAgB,EAAA,OAAA,CAAQ,WAAW,QAAQ,CAAA;AAAA,MAClE,OAAA,EAAS,CAAC,GAAI,MAAA,CAAO,WAAW,EAAC,EAAI,QAAQ,CAAA;AAAA,KAC/C;AAAA,GACF,CAAA;AACF;;;;"}
@@ -1,2 +0,0 @@
1
- import e from"@rollup/plugin-terser";function r(r){return[r,{...r,entryFileNames:r.entryFileNames?.replace(/(\.js)$/,".min$1"),plugins:[...r.plugins??[],e()]}]}export{r as default};
2
- //# sourceMappingURL=withMinify.esm.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"withMinify.esm.min.js","sources":["../../../../src/rollup/utils/withMinify.ts"],"sourcesContent":["import terser from '@rollup/plugin-terser'\nimport type { OutputOptions, OutputPlugin } from 'rollup'\n\nexport default function (output: OutputOptions & {\n entryFileNames?: string\n plugins?: OutputPlugin[]\n}): OutputOptions[] {\n return [\n output,\n {\n ...output,\n entryFileNames: output.entryFileNames?.replace(/(\\.js)$/, '.min$1'),\n plugins: [...(output.plugins ?? []), terser()]\n }\n ]\n}\n"],"names":["withMinify","output","entryFileNames","replace","plugins","terser"],"mappings":"qCAGA,SAAAA,EAAyBC,GAIhB,MAAA,CACLA,EACA,IACKA,EACHC,eAAgBD,EAAOC,gBAAgBC,QAAQ,UAAW,UAC1DC,QAAS,IAAKH,EAAOG,SAAW,GAAKC,MAG3C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"filterSupport.esm.js","sources":["../../../src/utils/filterSupport.ts"],"sourcesContent":["import fs from 'node:fs'\nimport path from 'node:path'\n\nimport { getWorkspaceDir } from '@jiek/utils/getWorkspaceDir'\nimport { filterPackagesFromDir } from '@pnpm/filter-workspace-packages'\nimport { program } from 'commander'\nimport { load } from 'js-yaml'\n\nexport let type = ''\n\ntry {\n require.resolve('@pnpm/filter-workspace-packages')\n type = 'pnpm'\n} catch { /* empty */ }\nif (type !== '') {\n program\n .option('-f, --filter <filter>', 'filter packages')\n}\n\ninterface ProjectsGraph {\n wd: string\n root: string\n value?: Record<string, {\n name?: string\n }>\n}\n\nexport async function getSelectedProjectsGraph(): Promise<ProjectsGraph> {\n let filter = program.getOptionValue('filter')\n const rootOption = program.getOptionValue('root')\n const root = rootOption\n ? path.isAbsolute(rootOption)\n ? rootOption\n : path.resolve(process.cwd(), rootOption)\n : process.cwd()\n let notWorkspace = false\n let wd: string\n try {\n wd = getWorkspaceDir(root, type)\n } catch (e) {\n // @ts-ignore\n if ('message' in e && e.message === 'workspace root not found') {\n wd = root\n notWorkspace = true\n } else {\n throw e\n }\n }\n if (!notWorkspace && type === 'pnpm') {\n const pnpmWorkspaceFilePath = path.resolve(wd, 'pnpm-workspace.yaml')\n const pnpmWorkspaceFileContent = fs.readFileSync(pnpmWorkspaceFilePath, 'utf-8')\n const pnpmWorkspace = load(pnpmWorkspaceFileContent) as {\n packages: string[]\n }\n if (root === wd && !filter) {\n throw new Error('root path is workspace root, please provide a filter')\n // TODO inquirer prompt support user select packages\n }\n if (root !== wd && !filter) {\n const packageJSONIsExist = fs.existsSync(path.resolve(root, 'package.json'))\n if (!packageJSONIsExist) {\n throw new Error('root path is not workspace root, please provide a filter')\n }\n const packageJSON = JSON.parse(fs.readFileSync(path.resolve(root, 'package.json'), 'utf-8'))\n if (!packageJSON.name) {\n throw new Error('root path is not workspace root, please provide a filter')\n }\n filter = packageJSON.name\n }\n const { selectedProjectsGraph } = await filterPackagesFromDir(wd, [{\n filter: filter ?? '',\n followProdDepsOnly: true\n }], {\n prefix: root,\n workspaceDir: wd,\n patterns: pnpmWorkspace.packages\n })\n return {\n wd, root,\n value: Object.entries(selectedProjectsGraph)\n .reduce((acc, [key, value]) => {\n acc[key] = value.package.manifest\n return acc\n }, {} as NonNullable<ProjectsGraph['value']>)\n }\n }\n return {\n wd, root,\n value: {\n [wd]: JSON.parse(fs.readFileSync(path.resolve(wd, 'package.json'), 'utf-8'))\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;AAQO,IAAI,IAAO,GAAA,GAAA;AAElB,IAAI;AACF,EAAA,OAAA,CAAQ,QAAQ,iCAAiC,CAAA,CAAA;AACjD,EAAO,IAAA,GAAA,MAAA,CAAA;AACT,CAAQ,CAAA,MAAA;AAAc,CAAA;AACtB,IAAI,SAAS,EAAI,EAAA;AACf,EACG,OAAA,CAAA,MAAA,CAAO,yBAAyB,iBAAiB,CAAA,CAAA;AACtD,CAAA;AAUA,eAAsB,wBAAmD,GAAA;AACvE,EAAI,I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MACL,CAAC,EAAE,GAAG,IAAA,CAAK,KAAM,CAAA,EAAA,CAAG,YAAa,CAAA,IAAA,CAAK,OAAQ,CAAA,EAAA,EAAI,cAAc,CAAA,EAAG,OAAO,CAAC,CAAA;AAAA,KAC7E;AAAA,GACF,CAAA;AACF;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"filterSupport.esm.min.js","sources":["../../../src/utils/filterSupport.ts"],"sourcesContent":["import fs from 'node:fs'\nimport path from 'node:path'\n\nimport { getWorkspaceDir } from '@jiek/utils/getWorkspaceDir'\nimport { filterPackagesFromDir } from '@pnpm/filter-workspace-packages'\nimport { program } from 'commander'\nimport { load } from 'js-yaml'\n\nexport let type = ''\n\ntry {\n require.resolve('@pnpm/filter-workspace-packages')\n type = 'pnpm'\n} catch { /* empty */ }\nif (type !== '') {\n program\n .option('-f, --filter <filter>', 'filter packages')\n}\n\ninterface ProjectsGraph {\n wd: string\n root: string\n value?: Record<string, {\n name?: string\n }>\n}\n\nexport async function getSelectedProjectsGraph(): Promise<ProjectsGraph> {\n let filter = program.getOptionValue('filter')\n const rootOption = program.getOptionValue('root')\n const root = rootOption\n ? path.isAbsolute(rootOption)\n ? rootOption\n : path.resolve(process.cwd(), rootOption)\n : process.cwd()\n let notWorkspace = false\n let wd: string\n try {\n wd = getWorkspaceDir(root, type)\n } catch (e) {\n // @ts-ignore\n if ('message' in e && e.message === 'workspace root not found') {\n wd = root\n notWorkspace = true\n } else {\n throw e\n }\n }\n if (!notWorkspace && type === 'pnpm') {\n const pnpmWorkspaceFilePath = path.resolve(wd, 'pnpm-workspace.yaml')\n const pnpmWorkspaceFileContent = fs.readFileSync(pnpmWorkspaceFilePath, 'utf-8')\n const pnpmWorkspace = load(pnpmWorkspaceFileContent) as {\n packages: string[]\n }\n if (root === wd && !filter) {\n throw new Error('root path is workspace root, please provide a filter')\n // TODO inquirer prompt support user select packages\n }\n if (root !== wd && !filter) {\n const packageJSONIsExist = fs.existsSync(path.resolve(root, 'package.json'))\n if (!packageJSONIsExist) {\n throw new Error('root path is not workspace root, please provide a filter')\n }\n const packageJSON = JSON.parse(fs.readFileSync(path.resolve(root, 'package.json'), 'utf-8'))\n if (!packageJSON.name) {\n throw new Error('root path is not workspace root, please provide a filter')\n }\n filter = packageJSON.name\n }\n const { selectedProjectsGraph } = await filterPackagesFromDir(wd, [{\n filter: filter ?? '',\n followProdDepsOnly: true\n }], {\n prefix: root,\n workspaceDir: wd,\n patterns: pnpmWorkspace.packages\n })\n return {\n wd, root,\n value: Object.entries(selectedProjectsGraph)\n .reduce((acc, [key, value]) => {\n acc[key] = value.package.manifest\n return acc\n }, {} as NonNullable<ProjectsGraph['value']>)\n }\n }\n return {\n wd, root,\n value: {\n [wd]: JSON.parse(fs.readFileSync(path.resolve(wd, 'package.json'), 'utf-8'))\n }\n }\n}\n"],"names":["type","require","resolve","async","getSelectedProjectsGraph","filter","program","getOptionValue","rootOption","root","path","isAbsolute","process","cwd","wd","notWorkspace","getWorkspaceDir","e","message","pnpmWorkspaceFilePath","pnpmWorkspaceFileContent","fs","readFileSync","pnpmWorkspace","load","Error","existsSync","packageJSON","JSON","parse","name","selectedProjectsGraph","filterPackagesFromDir","followProdDepsOnly","prefix","workspaceDir","patterns","packages","value","Object","entries","reduce","acc","key","package","manifest","option"],"mappings":"yPAQO,IAAIA,EAAO,GAElB,IACEC,QAAQC,QAAQ,mCACTF,EAAA,MACT,CAAQ,MAAc,CActBG,eAAsBC,IAChB,IAAAC,EAASC,EAAQC,eAAe,UAC9B,MAAAC,EAAaF,EAAQC,eAAe,QACpCE,EAAOD,EACTE,EAAKC,WAAWH,GACdA,EACAE,EAAKR,QAAQU,QAAQC,MAAOL,GAC9BI,QAAQC,MACZ,IACIC,EADAC,GAAe,EAEf,IACGD,EAAAE,EAAgBP,EAAMT,SACpBiB,GAEP,KAAI,YAAaA,IAAmB,6BAAdA,EAAEC,QAIhB,MAAAD,EAHDH,EAAAL,EACUM,GAAA,CAInB,CACI,IAACA,GAAyB,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