jsrepo 3.7.0 → 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.
- package/dist/api/config.d.mts +1 -1
- package/dist/api/config.mjs +1 -1
- package/dist/api/errors.d.mts +1 -1
- package/dist/api/errors.mjs +1 -1
- package/dist/api/index.d.mts +2 -2
- package/dist/api/index.mjs +1 -1
- package/dist/api/langs/index.d.mts +1 -1
- package/dist/api/langs/index.mjs +1 -1
- package/dist/api/langs/js.d.mts +1 -1
- package/dist/api/langs/js.mjs +1 -1
- package/dist/api/outputs.d.mts +1 -1
- package/dist/api/outputs.mjs +1 -1
- package/dist/api/providers.d.mts +1 -1
- package/dist/api/providers.mjs +1 -1
- package/dist/api/utils.d.mts +2 -2
- package/dist/api/utils.mjs +1 -1
- package/dist/api/warnings.d.mts +1 -1
- package/dist/bin.mjs +15 -13
- package/dist/{config-DUViYum-.d.mts → config-DzI6aP1q.d.mts} +60 -20
- package/dist/errors-ZO96VU6k.mjs +2 -0
- package/dist/{providers-BWmvUfSv.mjs → providers-Dc3L9h_M.mjs} +3 -3
- package/package.json +1 -1
- package/dist/errors-C7KsbF1p.mjs +0 -2
|
@@ -524,12 +524,21 @@ declare class Unreachable extends JsrepoError {
|
|
|
524
524
|
constructor();
|
|
525
525
|
}
|
|
526
526
|
//#endregion
|
|
527
|
+
//#region src/utils/json.d.ts
|
|
528
|
+
type StringifyOptions = {
|
|
529
|
+
format?: StringifyFormat;
|
|
530
|
+
};
|
|
531
|
+
type StringifyFormat = boolean | {
|
|
532
|
+
space: string;
|
|
533
|
+
};
|
|
534
|
+
declare function stringify(data: unknown, options?: StringifyOptions): string;
|
|
535
|
+
//#endregion
|
|
527
536
|
//#region src/outputs/distributed.d.ts
|
|
528
537
|
type DistributedOutputOptions = {
|
|
529
538
|
/** The directory to output the files to */
|
|
530
539
|
dir: string;
|
|
531
540
|
/** Whether or not to format the output. @default false */
|
|
532
|
-
format?:
|
|
541
|
+
format?: StringifyFormat;
|
|
533
542
|
};
|
|
534
543
|
/**
|
|
535
544
|
* Use this output type when you are going to serve your registry as a static asset.
|
|
@@ -713,7 +722,7 @@ type DistributedOutputItem = z.infer<typeof DistributedOutputItemSchema>;
|
|
|
713
722
|
//#region src/outputs/repository.d.ts
|
|
714
723
|
type RepositoryOutputOptions = {
|
|
715
724
|
/** Whether or not to format the output. @default false */
|
|
716
|
-
format?:
|
|
725
|
+
format?: StringifyFormat;
|
|
717
726
|
};
|
|
718
727
|
/**
|
|
719
728
|
* Use this output type when you are serving your registry from a repository.
|
|
@@ -1646,7 +1655,7 @@ interface Output {
|
|
|
1646
1655
|
}
|
|
1647
1656
|
//#endregion
|
|
1648
1657
|
//#region src/commands/add.d.ts
|
|
1649
|
-
declare const schema$
|
|
1658
|
+
declare const schema$10: z.ZodObject<{
|
|
1650
1659
|
cwd: z.ZodPipe<z.ZodString, z.ZodTransform<AbsolutePath, string>>;
|
|
1651
1660
|
yes: z.ZodBoolean;
|
|
1652
1661
|
all: z.ZodBoolean;
|
|
@@ -1660,7 +1669,7 @@ declare const schema$9: z.ZodObject<{
|
|
|
1660
1669
|
expand: z.ZodBoolean;
|
|
1661
1670
|
maxUnchanged: z.ZodNumber;
|
|
1662
1671
|
}, z.core.$strip>;
|
|
1663
|
-
type AddOptions = z.infer<typeof schema$
|
|
1672
|
+
type AddOptions = z.infer<typeof schema$10>;
|
|
1664
1673
|
type AddCommandResult = {
|
|
1665
1674
|
items: (ItemRepository | ItemDistributed)[];
|
|
1666
1675
|
updatedFiles: string[];
|
|
@@ -1673,14 +1682,14 @@ type AddCommandResult = {
|
|
|
1673
1682
|
};
|
|
1674
1683
|
//#endregion
|
|
1675
1684
|
//#region src/commands/auth.d.ts
|
|
1676
|
-
declare const schema$
|
|
1685
|
+
declare const schema$9: z.ZodObject<{
|
|
1677
1686
|
cwd: z.ZodPipe<z.ZodString, z.ZodTransform<AbsolutePath, string>>;
|
|
1678
1687
|
registry: z.ZodOptional<z.ZodString>;
|
|
1679
1688
|
token: z.ZodOptional<z.ZodString>;
|
|
1680
1689
|
logout: z.ZodBoolean;
|
|
1681
1690
|
verbose: z.ZodBoolean;
|
|
1682
1691
|
}, z.core.$strip>;
|
|
1683
|
-
type AuthOptions = z.infer<typeof schema$
|
|
1692
|
+
type AuthOptions = z.infer<typeof schema$9>;
|
|
1684
1693
|
type AuthCommandResult = {
|
|
1685
1694
|
type: 'logout' | 'login';
|
|
1686
1695
|
provider: string;
|
|
@@ -1688,12 +1697,12 @@ type AuthCommandResult = {
|
|
|
1688
1697
|
};
|
|
1689
1698
|
//#endregion
|
|
1690
1699
|
//#region src/commands/build.d.ts
|
|
1691
|
-
declare const schema$
|
|
1700
|
+
declare const schema$8: z.ZodObject<{
|
|
1692
1701
|
cwd: z.ZodPipe<z.ZodString, z.ZodTransform<AbsolutePath, string>>;
|
|
1693
1702
|
watch: z.ZodBoolean;
|
|
1694
1703
|
debounce: z.ZodNumber;
|
|
1695
1704
|
}, z.core.$strip>;
|
|
1696
|
-
type BuildOptions = z.infer<typeof schema$
|
|
1705
|
+
type BuildOptions = z.infer<typeof schema$8>;
|
|
1697
1706
|
type RegistryBuildResult = {
|
|
1698
1707
|
time: number;
|
|
1699
1708
|
name: string;
|
|
@@ -1707,18 +1716,18 @@ type BuildCommandResult = {
|
|
|
1707
1716
|
};
|
|
1708
1717
|
//#endregion
|
|
1709
1718
|
//#region src/commands/config/language.d.ts
|
|
1710
|
-
declare const schema$
|
|
1719
|
+
declare const schema$7: z.ZodObject<{
|
|
1711
1720
|
cwd: z.ZodPipe<z.ZodString, z.ZodTransform<AbsolutePath, string>>;
|
|
1712
1721
|
yes: z.ZodBoolean;
|
|
1713
1722
|
}, z.core.$strip>;
|
|
1714
|
-
type ConfigAddLanguageOptions = z.infer<typeof schema$
|
|
1723
|
+
type ConfigAddLanguageOptions = z.infer<typeof schema$7>;
|
|
1715
1724
|
type ConfigAddLanguageCommandResult = {
|
|
1716
1725
|
duration: number;
|
|
1717
1726
|
languages: number;
|
|
1718
1727
|
};
|
|
1719
1728
|
//#endregion
|
|
1720
1729
|
//#region src/commands/config/mcp.d.ts
|
|
1721
|
-
declare const schema$
|
|
1730
|
+
declare const schema$6: z.ZodObject<{
|
|
1722
1731
|
cwd: z.ZodPipe<z.ZodString, z.ZodTransform<AbsolutePath, string>>;
|
|
1723
1732
|
client: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1724
1733
|
cursor: "cursor";
|
|
@@ -1729,7 +1738,7 @@ declare const schema$5: z.ZodObject<{
|
|
|
1729
1738
|
}>>>;
|
|
1730
1739
|
all: z.ZodOptional<z.ZodBoolean>;
|
|
1731
1740
|
}, z.core.$strip>;
|
|
1732
|
-
type ConfigMcpOptions = z.infer<typeof schema$
|
|
1741
|
+
type ConfigMcpOptions = z.infer<typeof schema$6>;
|
|
1733
1742
|
type ClientResult = {
|
|
1734
1743
|
name: string;
|
|
1735
1744
|
result: Result<{
|
|
@@ -1742,29 +1751,29 @@ type ConfigMcpCommandResult = {
|
|
|
1742
1751
|
};
|
|
1743
1752
|
//#endregion
|
|
1744
1753
|
//#region src/commands/config/provider.d.ts
|
|
1745
|
-
declare const schema$
|
|
1754
|
+
declare const schema$5: z.ZodObject<{
|
|
1746
1755
|
cwd: z.ZodPipe<z.ZodString, z.ZodTransform<AbsolutePath, string>>;
|
|
1747
1756
|
yes: z.ZodBoolean;
|
|
1748
1757
|
}, z.core.$strip>;
|
|
1749
|
-
type ConfigAddProviderOptions = z.infer<typeof schema$
|
|
1758
|
+
type ConfigAddProviderOptions = z.infer<typeof schema$5>;
|
|
1750
1759
|
type ConfigAddProviderCommandResult = {
|
|
1751
1760
|
duration: number;
|
|
1752
1761
|
providers: number;
|
|
1753
1762
|
};
|
|
1754
1763
|
//#endregion
|
|
1755
1764
|
//#region src/commands/config/transform.d.ts
|
|
1756
|
-
declare const schema$
|
|
1765
|
+
declare const schema$4: z.ZodObject<{
|
|
1757
1766
|
cwd: z.ZodPipe<z.ZodString, z.ZodTransform<AbsolutePath, string>>;
|
|
1758
1767
|
yes: z.ZodBoolean;
|
|
1759
1768
|
}, z.core.$strip>;
|
|
1760
|
-
type ConfigAddTransformOptions = z.infer<typeof schema$
|
|
1769
|
+
type ConfigAddTransformOptions = z.infer<typeof schema$4>;
|
|
1761
1770
|
type ConfigAddTransformCommandResult = {
|
|
1762
1771
|
duration: number;
|
|
1763
1772
|
transforms: number;
|
|
1764
1773
|
};
|
|
1765
1774
|
//#endregion
|
|
1766
1775
|
//#region src/commands/init.d.ts
|
|
1767
|
-
declare const schema$
|
|
1776
|
+
declare const schema$3: z.ZodObject<{
|
|
1768
1777
|
cwd: z.ZodPipe<z.ZodString, z.ZodTransform<AbsolutePath, string>>;
|
|
1769
1778
|
yes: z.ZodBoolean;
|
|
1770
1779
|
overwrite: z.ZodBoolean;
|
|
@@ -1773,11 +1782,35 @@ declare const schema$2: z.ZodObject<{
|
|
|
1773
1782
|
maxUnchanged: z.ZodNumber;
|
|
1774
1783
|
js: z.ZodBoolean;
|
|
1775
1784
|
}, z.core.$strip>;
|
|
1776
|
-
type InitOptions = z.infer<typeof schema$
|
|
1785
|
+
type InitOptions = z.infer<typeof schema$3>;
|
|
1777
1786
|
type InitCommandResult = {
|
|
1778
1787
|
registries: string[];
|
|
1779
1788
|
};
|
|
1780
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
|
|
1781
1814
|
//#region src/commands/publish.d.ts
|
|
1782
1815
|
declare const schema$1: z.ZodObject<{
|
|
1783
1816
|
cwd: z.ZodPipe<z.ZodString, z.ZodTransform<AbsolutePath, string>>;
|
|
@@ -1854,6 +1887,9 @@ type BeforeArgs = {
|
|
|
1854
1887
|
} | {
|
|
1855
1888
|
command: 'init';
|
|
1856
1889
|
options: InitOptions;
|
|
1890
|
+
} | {
|
|
1891
|
+
command: 'list';
|
|
1892
|
+
options: ListOptions;
|
|
1857
1893
|
} | {
|
|
1858
1894
|
command: 'publish';
|
|
1859
1895
|
options: PublishOptions;
|
|
@@ -1893,6 +1929,10 @@ type AfterArgs = {
|
|
|
1893
1929
|
command: 'init';
|
|
1894
1930
|
options: InitOptions;
|
|
1895
1931
|
result: InitCommandResult;
|
|
1932
|
+
} | {
|
|
1933
|
+
command: 'list';
|
|
1934
|
+
options: ListOptions;
|
|
1935
|
+
result: ListCommandResult;
|
|
1896
1936
|
} | {
|
|
1897
1937
|
command: 'publish';
|
|
1898
1938
|
options: PublishOptions;
|
|
@@ -2372,5 +2412,5 @@ declare function loadConfigSearch({
|
|
|
2372
2412
|
path: AbsolutePath;
|
|
2373
2413
|
} | null>;
|
|
2374
2414
|
//#endregion
|
|
2375
|
-
export { AzureOptions as $,
|
|
2376
|
-
//# sourceMappingURL=config-
|
|
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 };
|
|
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
|