jsrepo 3.7.1 → 3.8.0

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.
@@ -1655,7 +1655,7 @@ interface Output {
1655
1655
  }
1656
1656
  //#endregion
1657
1657
  //#region src/commands/add.d.ts
1658
- declare const schema$9: z.ZodObject<{
1658
+ declare const schema$10: z.ZodObject<{
1659
1659
  cwd: z.ZodPipe<z.ZodString, z.ZodTransform<AbsolutePath, string>>;
1660
1660
  yes: z.ZodBoolean;
1661
1661
  all: z.ZodBoolean;
@@ -1669,7 +1669,7 @@ declare const schema$9: z.ZodObject<{
1669
1669
  expand: z.ZodBoolean;
1670
1670
  maxUnchanged: z.ZodNumber;
1671
1671
  }, z.core.$strip>;
1672
- type AddOptions = z.infer<typeof schema$9>;
1672
+ type AddOptions = z.infer<typeof schema$10>;
1673
1673
  type AddCommandResult = {
1674
1674
  items: (ItemRepository | ItemDistributed)[];
1675
1675
  updatedFiles: string[];
@@ -1682,14 +1682,14 @@ type AddCommandResult = {
1682
1682
  };
1683
1683
  //#endregion
1684
1684
  //#region src/commands/auth.d.ts
1685
- declare const schema$8: z.ZodObject<{
1685
+ declare const schema$9: z.ZodObject<{
1686
1686
  cwd: z.ZodPipe<z.ZodString, z.ZodTransform<AbsolutePath, string>>;
1687
1687
  registry: z.ZodOptional<z.ZodString>;
1688
1688
  token: z.ZodOptional<z.ZodString>;
1689
1689
  logout: z.ZodBoolean;
1690
1690
  verbose: z.ZodBoolean;
1691
1691
  }, z.core.$strip>;
1692
- type AuthOptions = z.infer<typeof schema$8>;
1692
+ type AuthOptions = z.infer<typeof schema$9>;
1693
1693
  type AuthCommandResult = {
1694
1694
  type: 'logout' | 'login';
1695
1695
  provider: string;
@@ -1697,12 +1697,12 @@ type AuthCommandResult = {
1697
1697
  };
1698
1698
  //#endregion
1699
1699
  //#region src/commands/build.d.ts
1700
- declare const schema$7: z.ZodObject<{
1700
+ declare const schema$8: z.ZodObject<{
1701
1701
  cwd: z.ZodPipe<z.ZodString, z.ZodTransform<AbsolutePath, string>>;
1702
1702
  watch: z.ZodBoolean;
1703
1703
  debounce: z.ZodNumber;
1704
1704
  }, z.core.$strip>;
1705
- type BuildOptions = z.infer<typeof schema$7>;
1705
+ type BuildOptions = z.infer<typeof schema$8>;
1706
1706
  type RegistryBuildResult = {
1707
1707
  time: number;
1708
1708
  name: string;
@@ -1716,18 +1716,18 @@ type BuildCommandResult = {
1716
1716
  };
1717
1717
  //#endregion
1718
1718
  //#region src/commands/config/language.d.ts
1719
- declare const schema$6: z.ZodObject<{
1719
+ declare const schema$7: z.ZodObject<{
1720
1720
  cwd: z.ZodPipe<z.ZodString, z.ZodTransform<AbsolutePath, string>>;
1721
1721
  yes: z.ZodBoolean;
1722
1722
  }, z.core.$strip>;
1723
- type ConfigAddLanguageOptions = z.infer<typeof schema$6>;
1723
+ type ConfigAddLanguageOptions = z.infer<typeof schema$7>;
1724
1724
  type ConfigAddLanguageCommandResult = {
1725
1725
  duration: number;
1726
1726
  languages: number;
1727
1727
  };
1728
1728
  //#endregion
1729
1729
  //#region src/commands/config/mcp.d.ts
1730
- declare const schema$5: z.ZodObject<{
1730
+ declare const schema$6: z.ZodObject<{
1731
1731
  cwd: z.ZodPipe<z.ZodString, z.ZodTransform<AbsolutePath, string>>;
1732
1732
  client: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1733
1733
  cursor: "cursor";
@@ -1738,7 +1738,7 @@ declare const schema$5: z.ZodObject<{
1738
1738
  }>>>;
1739
1739
  all: z.ZodOptional<z.ZodBoolean>;
1740
1740
  }, z.core.$strip>;
1741
- type ConfigMcpOptions = z.infer<typeof schema$5>;
1741
+ type ConfigMcpOptions = z.infer<typeof schema$6>;
1742
1742
  type ClientResult = {
1743
1743
  name: string;
1744
1744
  result: Result<{
@@ -1751,29 +1751,29 @@ type ConfigMcpCommandResult = {
1751
1751
  };
1752
1752
  //#endregion
1753
1753
  //#region src/commands/config/provider.d.ts
1754
- declare const schema$4: z.ZodObject<{
1754
+ declare const schema$5: z.ZodObject<{
1755
1755
  cwd: z.ZodPipe<z.ZodString, z.ZodTransform<AbsolutePath, string>>;
1756
1756
  yes: z.ZodBoolean;
1757
1757
  }, z.core.$strip>;
1758
- type ConfigAddProviderOptions = z.infer<typeof schema$4>;
1758
+ type ConfigAddProviderOptions = z.infer<typeof schema$5>;
1759
1759
  type ConfigAddProviderCommandResult = {
1760
1760
  duration: number;
1761
1761
  providers: number;
1762
1762
  };
1763
1763
  //#endregion
1764
1764
  //#region src/commands/config/transform.d.ts
1765
- declare const schema$3: z.ZodObject<{
1765
+ declare const schema$4: z.ZodObject<{
1766
1766
  cwd: z.ZodPipe<z.ZodString, z.ZodTransform<AbsolutePath, string>>;
1767
1767
  yes: z.ZodBoolean;
1768
1768
  }, z.core.$strip>;
1769
- type ConfigAddTransformOptions = z.infer<typeof schema$3>;
1769
+ type ConfigAddTransformOptions = z.infer<typeof schema$4>;
1770
1770
  type ConfigAddTransformCommandResult = {
1771
1771
  duration: number;
1772
1772
  transforms: number;
1773
1773
  };
1774
1774
  //#endregion
1775
1775
  //#region src/commands/init.d.ts
1776
- declare const schema$2: z.ZodObject<{
1776
+ declare const schema$3: z.ZodObject<{
1777
1777
  cwd: z.ZodPipe<z.ZodString, z.ZodTransform<AbsolutePath, string>>;
1778
1778
  yes: z.ZodBoolean;
1779
1779
  overwrite: z.ZodBoolean;
@@ -1782,11 +1782,35 @@ declare const schema$2: z.ZodObject<{
1782
1782
  maxUnchanged: z.ZodNumber;
1783
1783
  js: z.ZodBoolean;
1784
1784
  }, z.core.$strip>;
1785
- type InitOptions = z.infer<typeof schema$2>;
1785
+ type InitOptions = z.infer<typeof schema$3>;
1786
1786
  type InitCommandResult = {
1787
1787
  registries: string[];
1788
1788
  };
1789
1789
  //#endregion
1790
+ //#region src/commands/list.d.ts
1791
+ declare const detailLevels: readonly ["basic", "full"];
1792
+ type DetailLevel = (typeof detailLevels)[number];
1793
+ declare const schema$2: z.ZodObject<{
1794
+ cwd: z.ZodPipe<z.ZodString, z.ZodTransform<AbsolutePath, string>>;
1795
+ verbose: z.ZodBoolean;
1796
+ all: z.ZodBoolean;
1797
+ json: z.ZodBoolean;
1798
+ detail: z.ZodDefault<z.ZodEnum<{
1799
+ basic: "basic";
1800
+ full: "full";
1801
+ }>>;
1802
+ }, z.core.$strip>;
1803
+ type ListOptions = z.infer<typeof schema$2>;
1804
+ type ListItem = {
1805
+ registry: ResolvedRegistry;
1806
+ item: Manifest['items'][number];
1807
+ };
1808
+ type ListCommandResult = {
1809
+ registries: ResolvedRegistry[];
1810
+ items: ListItem[];
1811
+ detail: DetailLevel;
1812
+ };
1813
+ //#endregion
1790
1814
  //#region src/commands/publish.d.ts
1791
1815
  declare const schema$1: z.ZodObject<{
1792
1816
  cwd: z.ZodPipe<z.ZodString, z.ZodTransform<AbsolutePath, string>>;
@@ -1863,6 +1887,9 @@ type BeforeArgs = {
1863
1887
  } | {
1864
1888
  command: 'init';
1865
1889
  options: InitOptions;
1890
+ } | {
1891
+ command: 'list';
1892
+ options: ListOptions;
1866
1893
  } | {
1867
1894
  command: 'publish';
1868
1895
  options: PublishOptions;
@@ -1902,6 +1929,10 @@ type AfterArgs = {
1902
1929
  command: 'init';
1903
1930
  options: InitOptions;
1904
1931
  result: InitCommandResult;
1932
+ } | {
1933
+ command: 'list';
1934
+ options: ListOptions;
1935
+ result: ListCommandResult;
1905
1936
  } | {
1906
1937
  command: 'publish';
1907
1938
  options: PublishOptions;
@@ -2382,4 +2413,4 @@ declare function loadConfigSearch({
2382
2413
  } | null>;
2383
2414
  //#endregion
2384
2415
  export { AzureOptions as $, NoRegistriesError as $t, getPathsForItems as A, InvalidImportWarning as An, IllegalItemNameError as At, fetchManifest as B, InvalidRegistryVersionError as Bt, resolveWithRoles as C, ImportTransform as Cn, ConfigObjectNotFoundError as Ct, joinAbsolute as D, ResolveDependenciesResult as Dn, FailedToLoadConfigError as Dt, promptInstallDependenciesByEcosystem as E, ResolveDependenciesOptions as En, DuplicateItemNameError as Et, resolveRegistries as F, createWarningHandler as Fn, InvalidOptionsError as Ft, GitLabOptions as G, MultipleRegistriesError as Gt, jsrepo as H, ManifestFetchError as Ht, resolveTree as I, AbsolutePath as In, InvalidPluginError as It, github as J, NoListedItemsError as Jt, gitlab as K, NoFilesError as Kt, resolveWantedItems as L, ItemRelativePath as Ln, InvalidRegistryDependencyError as Lt, parseWantedItems as M, UnresolvableDynamicImportWarning as Mn, InvalidDependencyError as Mt, prepareUpdates as N, Warning as Nn, InvalidJSONError as Nt, RegistryItemWithContent as O, TransformImportsOptions as On, FileNotFoundError as Ot, resolveAndFetchAllItems as P, WarningHandler as Pn, InvalidKeyTypeError as Pt, bitbucket as Q, NoProviderFoundError as Qt, updateFiles as R, InvalidRegistryError as Rt, Output as S, css as Sn, ConfigNotFoundError as St, promptAddEnvVars as T, Language as Tn, DuplicateFileReferenceError as Tt, HttpOptions as U, MissingPeerDependencyError as Ut, JsrepoOptions as V, JsrepoError as Vt, http as W, ModuleNotFoundError as Wt, _fs as X, NoPackageJsonFoundError as Xt, FsOptions as Y, NoOutputsError as Yt, BitBucketOptions as Z, NoPathProvidedError as Zt, BeforeArgs as _, resolveImports as _n, StringifyOptions as _t, RegistryFileRoles as a, SelfReferenceError as an, Prompts as at, HookFn as b, html as bn, BuildError as bt, RegistryItemFile as c, DEFAULT_LANGS as cn, Manifest as ct, RemoteDependencyResolverOptions as d, SvelteOptions as dn, RepositoryOutputOptions as dt, ProviderFetchError as en, azure as et, Transform as f, svelte as fn, repository as ft, AfterHook as g, js as gn, StringifyFormat as gt, AfterArgs as h, installDependencies as hn, distributed as ht, RegistryConfig as i, RegistryNotProvidedError as in, GetTokenWithRegistry as it, normalizeItemTypeForPath as j, LanguageNotFoundWarning as jn, ImportedFileNotResolvedError as jt, fetchAllResolvedItems as k, GlobPatternNoMatchWarning as kn, GlobError as kt, RegistryItemType as l, VueOptions as ln, ManifestSchema as lt, defineConfig as m, getImports as mn, DistributedOutputOptions as mt, RemoteDependency as n, RegistryItemFetchError as nn, FetchOptions as nt, RegistryItem as o, Unreachable as on, Provider as ot, TransformOptions as p, JsOptions as pn, DistributedOutputManifest as pt, GitHubOptions as q, NoItemsToUpdateError as qt, Config as r, RegistryItemNotFoundError as rn, GetToken as rt, RegistryItemAdd as s, ZodError as sn, ProviderFactory as st, loadConfigSearch as t, RegistryFileFetchError as tn, CreateOptions as tt, RemoteDependencyResolver as u, vue as un, RepositoryOutputManifest as ut, BeforeHook as v, transformImports as vn, stringify as vt, detectPackageManager as w, InstallDependenciesOptions as wn, CouldNotFindJsrepoImportError as wt, InferHookArgs as x, CssOptions as xn, CLIError as xt, Hook as y, HtmlOptions as yn, AlreadyInitializedError as yt, DEFAULT_PROVIDERS as z, InvalidRegistryNameError as zt };
2385
- //# sourceMappingURL=config-DNuHb7Tn.d.mts.map
2416
+ //# sourceMappingURL=config-DzI6aP1q.d.mts.map
@@ -0,0 +1,2 @@
1
+ import{i as e,t}from"./picocolors-DQPB0Sb5.mjs";var n=e(t(),1),r=class extends Error{suggestion;docsLink;constructor(e,t){super(e),this.suggestion=t.suggestion,this.docsLink=t.docsLink}toString(){return`${this.message} ${this.suggestion}${n.default.gray(this.docsLink?`\n See: ${this.docsLink}`:``)}`}},i=class extends r{constructor(){super(`No package.json found.`,{suggestion:`Please run create a package.json first before initializing a jsrepo project.`})}},a=class extends r{constructor(e){super(`Invalid registry: ${n.default.bold(e)} A provider for this registry was not found.`,{suggestion:`Maybe you need to add a provider for this registry?`,docsLink:`See: https://jsrepo.dev/docs/providers`})}},o=class extends r{constructor(e,t){super(`${n.default.bold(e)} not found in ${n.default.bold(t?`${t}`:`any registry`)}.`,{suggestion:t?`Run ${n.default.bold(`\`jsrepo list ${t}\``)} to list all items in this registry`:`Run ${n.default.bold("`jsrepo list`")} to list all available registry items.`})}},s=class extends r{resourcePath;originalMessage;constructor(e,t){super(`Error fetching ${t}: ${e}`,{suggestion:`Please try again.`}),this.resourcePath=t,this.originalMessage=e}},c=class e extends r{constructor(t){super(t instanceof s?`Error fetching manifest file from ${n.default.bold(t.resourcePath)}: ${t.originalMessage}`:t instanceof e?t.message:`Error fetching manifest file: ${t instanceof Error?t.message:String(t)}`,{suggestion:`Please try again.`})}},l=class extends r{constructor(e,t){super(e instanceof s?`Error fetching ${n.default.bold(`${t.registry}/${t.item}`)} from ${n.default.bold(e.resourcePath)}: ${e.originalMessage}`:`Error fetching ${t.registry}/${t.item}: ${e instanceof Error?e.message:String(e)}`,{suggestion:`Please try again.`})}},u=class extends r{constructor(e,t){super(`Error fetching ${n.default.bold(`${t.registry}/${t.item}`)}${t.resourcePath?` from ${n.default.bold(t.resourcePath)}`:``}: ${e}`,{suggestion:`Please try again.`})}},d=class extends r{constructor(){super(`No registry was provided.`,{suggestion:"Fully qualify blocks ex: (github/ieedan/std/math) or supply them in your config with the `registries` key."})}},f=class extends r{constructor(e,t){super(`${t.map((e,n)=>`${n===t.length-1?`and `:``}${e}`).join(`, `)} contain ${n.default.bold(e)}.`,{suggestion:`You will have to be more specific by providing the registry url like: ${n.default.bold(`\`${t[0]}/${e}\``)}.`})}},p=class extends r{constructor(){super(`Config already initialized.`,{suggestion:`To configure a new registry run ${n.default.bold("`jsrepo init <registry>`")}.`})}},m=class extends r{constructor(e){super(`Failed to load config: ${e instanceof Error?e.message:String(e)}`,{suggestion:`Please try again.`})}},h=class extends r{constructor(e){super(`Config not found at ${n.default.bold(e)}.`,{suggestion:"Please run `jsrepo init` to create a config file.",docsLink:`https://jsrepo.dev/docs/jsrepo-config`})}},g=class extends r{constructor(e){super(`Invalid options: ${e.issues.map(e=>`${e.path.join(`.`)}: ${e.message}`).join(`, `)}`,{suggestion:`Please check the options and try again.`})}},_=class extends r{constructor(){super(`No registries were found in the config.`,{suggestion:"Please define at least one registry using the `registry` key."})}},v=class extends r{constructor({item:e,type:t}){super(`No path was provided for ${n.default.bold(e)} of type ${n.default.bold(t)}.`,{suggestion:"Please configure a path with the `paths` key.",docsLink:`https://jsrepo.dev/docs/jsrepo-config#paths`})}},y=class extends r{registryName;constructor(e,t){super(e,{suggestion:t.suggestion,docsLink:t.docsLink}),this.registryName=t.registryName}},b=class extends r{constructor(e,{fileName:t}){super(`Module referenced by ${n.default.bold(t)}: ${n.default.bold(e)} not found.`,{suggestion:`Please ensure the module exists.`})}},x=class extends y{constructor({registryName:e}){super(`No outputs were defined in the registry ${n.default.bold(e)}.`,{registryName:e,suggestion:"Please define at least one output using the `registry.outputs` key.",docsLink:`https://jsrepo.dev/docs/outputs`})}},S=class extends y{constructor({registryName:e}){super(`No items were listed in the registry ${n.default.bold(e)}.`,{registryName:e,suggestion:"Please list at least one item using the `items` key."})}},C=class extends y{constructor({name:e,registryName:t}){super(`Duplicate item name: ${n.default.bold(e)}.`,{registryName:t,suggestion:`Please ensure each item has a unique name.`})}},w=class extends y{constructor({name:e,registryName:t}){super(`Self reference: ${n.default.bold(e)}.`,{registryName:t,suggestion:`Please ensure each item does not reference itself.`})}},T=class extends y{constructor({name:e,registryName:t}){super(`No files were listed in the item ${n.default.bold(e)}.`,{registryName:t,suggestion:"Please list at least one file using the `files` key."})}},E=class extends y{constructor({name:e,registryName:t}){super(`Illegal item name: ${n.default.bold(e)}.`,{registryName:t,suggestion:`Please update the name of your item.`})}},D=class extends y{constructor({dependency:e,item:t,registryName:r}){super(`Invalid registry dependency: ${n.default.bold(e)} for item ${n.default.bold(t)}.`,{registryName:r,suggestion:`Please ensure the dependency is a valid item in the registry.`})}},O=class extends y{constructor({dependency:e,registryName:t,itemName:r}){super(`Invalid dependency: ${n.default.bold(e)} for ${n.default.bold(r)}.`,{registryName:t,suggestion:`Please ensure the dependency is a valid npm package name.`})}},k=class extends y{constructor({path:e,parent:t,duplicateParent:r,registryName:i}){super(`Duplicate file reference: ${n.default.bold(e)} is in both ${n.default.bold(`${t.type}/${t.name}`)} and ${n.default.bold(`${r.type}/${r.name}`)}.`,{registryName:i,suggestion:`Please ensure the file is not referenced multiple times.`})}},A=class extends y{constructor({path:e,parent:t,registryName:r}){super(`File not found: ${n.default.bold(e)} in ${n.default.bold(t.name)} of type ${n.default.bold(t.type)}.`,{registryName:r,suggestion:`Please ensure the file exists.`})}},j=class extends y{constructor({referencedFile:e,fileName:t,item:r,registryName:i}){super(`Imported file not resolved: ${n.default.bold(e)} in ${n.default.bold(t)} of item ${n.default.bold(r)}.`,{registryName:i,suggestion:`Make sure the file exists and is part of the registry.`})}},M=class extends r{constructor(e){super(`Invalid plugin name: ${n.default.bold(e)} is not a valid npm package name.`,{suggestion:`Double check the plugin name and try again.`})}},N=class extends r{constructor({key:e,type:t}){super(`The ${n.default.bold(e)} key in your config must be an ${n.default.bold(t)}.`,{suggestion:`Please check your config and try again.`})}},P=class extends r{constructor(){super(`We couldn't locate the config object in your config.`,{suggestion:`Please check your config and try again.`})}},F=class extends r{constructor(){super(`We couldn't find the jsrepo import in your config.`,{suggestion:`Please check your config and try again.`})}},I=class extends r{zodError;constructor(e){super(`Zod error: ${e.message}`,{suggestion:`Check the input schema and try again.`}),this.zodError=e}},L=class extends r{constructor(e){super(`Invalid JSON: ${e instanceof Error?e.stack??e.message:`${e}`}`,{suggestion:`Check the input JSON and try again.`})}},R=class extends y{constructor(e,t,r){super(`Error while parsing glob pattern ${n.default.bold(t)}: ${e instanceof Error?e.message:String(e)}`,{registryName:r,suggestion:`Please check the glob pattern and try again.`})}},z=class extends r{constructor(e){super(`No provider found for ${n.default.bold(e)}. Maybe you need to add it to your config?`,{suggestion:`Please check the provider name and try again.`})}},B=class extends r{constructor(){super(`We couldn't find any items to update.`,{suggestion:"Add items to your project using `jsrepo add` and then run `jsrepo update` to update them."})}},V=class extends r{constructor(e,t){super(`${n.default.bold(e)} is required for ${t} to work.`,{suggestion:`Please install it.`})}},H=class extends r{constructor(e){super(`Invalid registry name: ${n.default.bold(e)} is not a valid name. The name should be provided as ${n.default.bold("`@<scope>/<registry>`")}.`,{suggestion:`Please check the registry name and try again.`})}},U=class extends r{constructor(e,t){e===void 0?super(`No version was provided for ${n.default.bold(t)}.`,{suggestion:`Please provide a version using the ${n.default.bold("`version`")} key.`}):super(`Invalid version for ${n.default.bold(t)}: ${n.default.bold(e)} is not a valid version. The version should be provided as ${n.default.bold("`<major>.<minor>.<patch>`")}.`,{suggestion:`Please check the registry version and try again.`})}},W=class extends r{constructor(){super(`This code path should be unreachable.`,{suggestion:`This is a bug, please report it.`})}};export{x as A,w as B,c as C,T as D,f as E,s as F,I as H,u as I,l as L,v as M,z as N,B as O,_ as P,o as R,r as S,b as T,W as V,M as _,F as a,H as b,m as c,E as d,j as f,g,N as h,P as i,i as j,S as k,A as l,L as m,y as n,k as o,O as p,h as r,C as s,p as t,R as u,D as v,V as w,U as x,a as y,d as z};
2
+ //# sourceMappingURL=errors-ZO96VU6k.mjs.map