@batijs/core 0.0.79-beta.1 → 0.0.79-beta.2

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.
@@ -0,0 +1,15 @@
1
+ declare const features: readonly ["framework:solid", "framework:react", "framework:vue", "db:edgedb", "db:prisma", "auth:authjs", "rpc:telefunc", "server:hattip", "server:express", "uikit:tailwindcss", "analytics:plausible.io", "hosting:vercel"];
2
+ type BeforeColon<T extends string> = T extends `${infer A}:${string}` ? A : never;
3
+ type Namespaces = BeforeColon<(typeof features)[number]>;
4
+
5
+ type Features = (typeof features)[number];
6
+ type FeaturesOrNamespaces = Features | Namespaces;
7
+ type Rule = (fts: Set<FeaturesOrNamespaces>) => null | undefined | false | string | ErrorWrapper;
8
+ type ErrorFormatter = (str: string, index: number) => string;
9
+ type ErrorWrapper = (wrapper?: ErrorFormatter) => string;
10
+
11
+ declare const _default: Rule[];
12
+
13
+ declare function conflicts(fts: FeaturesOrNamespaces[], formatter: ErrorFormatter): string[];
14
+
15
+ export { conflicts, _default as rules };
@@ -0,0 +1 @@
1
+ function u(a,e,r){let s=Array.from(p(r));return o=>o.has(e)&&!s.every(t=>o.has(t))&&a}function p(a){let e=new Set;for(let r of a)r.includes(":")&&e.add(r.split(":")[0]),e.add(r);return e}function n(a,...e){return r=>{let s="";return a.forEach((o,t)=>{s+=o+(r?.(e[t],t)??"")}),s}}var i=[u(n`A ${"Server"} is mandatory when using ${"Auth"}. Check https://vite-plugin-ssr.com/integration#server-side-tools for details and https://batijs.github.io for available servers`,"auth",["server"])];function y(a,e){let r=p(a),s=[];for(let o of i){let t=o(r);typeof t=="string"?s.push(t):typeof t=="function"&&s.push(t(e))}return s}export{y as conflicts,i as rules};
package/dist/index.d.ts CHANGED
@@ -50,12 +50,6 @@ declare function addDependency<T extends PackageJsonDeps, U extends PackageJsonD
50
50
  }): T;
51
51
  declare function setScripts<T extends PackageJsonScripts>(packageJson: T, scripts: PackageJsonScriptOptions): T;
52
52
 
53
- type Features = (typeof features)[number];
54
- type FeaturesOrNamespaces = Features | Namespaces;
55
- type ErrorFormatter = (str: string, index: number) => string;
56
-
57
- declare function conflicts(fts: FeaturesOrNamespaces[], formatter: ErrorFormatter): string[];
58
-
59
53
  declare function withIcon(icon: string, iconColor?: Color, indentLevel?: number): (str: string) => string;
60
54
 
61
- export { Flags, MaybeContentGetter, Namespaces, PackageJsonDeps, PackageJsonScriptOption, PackageJsonScriptOptions, PackageJsonScripts, VikeMeta, addDependency, conflicts, features, flags, loadAsJson, loadAsMagicast, loadRelativeFileAsMagicast, renderSquirrelly, setScripts, transformAstAndGenerate, withIcon };
55
+ export { Flags, MaybeContentGetter, Namespaces, PackageJsonDeps, PackageJsonScriptOption, PackageJsonScriptOptions, PackageJsonScripts, VikeMeta, addDependency, features, flags, loadAsJson, loadAsMagicast, loadRelativeFileAsMagicast, renderSquirrelly, setScripts, transformAstAndGenerate, withIcon };