@batijs/core 0.0.78 → 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
@@ -6,8 +6,10 @@ import { Color } from 'colorette';
6
6
 
7
7
  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"];
8
8
  declare const flags: Map<string | undefined, "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">;
9
+ type BeforeColon<T extends string> = T extends `${infer A}:${string}` ? A : never;
9
10
  type AfterColon<T extends string> = T extends `${string}:${infer B}` ? B : never;
10
11
  type Flags = AfterColon<(typeof features)[number]>;
12
+ type Namespaces = BeforeColon<(typeof features)[number]>;
11
13
 
12
14
  type MaybeContentGetter = (() => string | Promise<string>) | undefined;
13
15
  interface VikeMeta {
@@ -50,4 +52,4 @@ declare function setScripts<T extends PackageJsonScripts>(packageJson: T, script
50
52
 
51
53
  declare function withIcon(icon: string, iconColor?: Color, indentLevel?: number): (str: string) => string;
52
54
 
53
- export { Flags, MaybeContentGetter, PackageJsonDeps, PackageJsonScriptOption, PackageJsonScriptOptions, PackageJsonScripts, VikeMeta, addDependency, 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@batijs/core",
3
- "version": "0.0.78",
3
+ "version": "0.0.79-beta.2",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
@@ -26,13 +26,17 @@
26
26
  "which": "^4.0.0"
27
27
  },
28
28
  "exports": {
29
- ".": "./dist/index.js"
29
+ ".": "./dist/index.js",
30
+ "./conflicts": "./dist/conflicts.js"
30
31
  },
31
32
  "typesVersions": {
32
33
  "*": {
33
34
  ".": [
34
35
  "./dist/index.d.ts"
35
36
  ],
37
+ "conflicts": [
38
+ "./dist/conflicts.d.ts"
39
+ ],
36
40
  "types": [
37
41
  "./global.d.ts"
38
42
  ]