create-z3 0.0.20 → 0.0.21

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/index.js CHANGED
@@ -1765,6 +1765,11 @@ async function replacePlaceholder(filePath, placeholder, content, options) {
1765
1765
  `Placeholder "${placeholder}" not found in file: ${filePath}`
1766
1766
  );
1767
1767
  }
1768
+ if (options?.inline) {
1769
+ const updatedContent = fileContent.replace(placeholder, content);
1770
+ await fs3.writeFile(filePath, updatedContent, "utf-8");
1771
+ return;
1772
+ }
1768
1773
  const lines = fileContent.split("\n");
1769
1774
  const updatedLines = [];
1770
1775
  for (const line of lines) {
@@ -1787,7 +1792,7 @@ async function replacePlaceholder(filePath, placeholder, content, options) {
1787
1792
  await fs3.writeFile(filePath, updatedLines.join("\n"), "utf-8");
1788
1793
  }
1789
1794
  function generateCredentialsValue(enabled) {
1790
- return enabled ? "true" : "false";
1795
+ return `credentials={${enabled}}`;
1791
1796
  }
1792
1797
  function generateAuthProvidersBlock(oauthProviders, emailPasswordEnabled) {
1793
1798
  const parts = [];
@@ -1861,7 +1866,10 @@ function generateOAuthUIProvidersBlock(providers) {
1861
1866
  if (providers.length === 0) {
1862
1867
  return "";
1863
1868
  }
1864
- return providers.map((id) => `"${id}"`).join(", ");
1869
+ const providerList = providers.map((id) => `"${id}"`).join(", ");
1870
+ return `social={{
1871
+ providers: [${providerList}]
1872
+ }}`;
1865
1873
  }
1866
1874
  function generateEnvVarsBlock(providers, framework) {
1867
1875
  if (providers.length === 0) {
@@ -2142,7 +2150,8 @@ var FrameworkInstaller = class {
2142
2150
  const packageManager = this.detectPackageManager();
2143
2151
  const spinner = ora("Linting and fixing code...").start();
2144
2152
  try {
2145
- const result = await execa(packageManager, ["run", "lint", "--", "--fix"], {
2153
+ const args = packageManager === "pnpm" ? ["lint", "--fix"] : ["run", "lint", "--", "--fix"];
2154
+ const result = await execa(packageManager, args, {
2146
2155
  cwd: this.targetPath,
2147
2156
  stdio: "pipe",
2148
2157
  reject: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-z3",
3
- "version": "0.0.20",
3
+ "version": "0.0.21",
4
4
  "type": "module",
5
5
  "description": "CLI for scaffolding Z3 Stack applications (TanStack/Next.js + Convex + Better Auth)",
6
6
  "bin": {
@@ -31,14 +31,14 @@ export default function BetterAuthClientProvider({ children }: { children: React
31
31
  return (
32
32
  <AuthUIProvider
33
33
  authClient={authClient}
34
- credentials={/* {{EMAIL_PASSWORD_CREDENTIALS}} */}
34
+ /* {{EMAIL_PASSWORD_CREDENTIALS}} */
35
35
  Link={Link}
36
36
  navigate={router.push}
37
37
  onSessionChange={() => {
38
38
  router.refresh()
39
39
  }}
40
40
  replace={router.replace}
41
- // {{OAUTH_UI_PROVIDERS}}
41
+ // {{OAUTH_UI_PROVIDERS}}
42
42
  >
43
43
  {children}
44
44
  </AuthUIProvider>
@@ -23,15 +23,11 @@ export function Providers({ children }: { children: ReactNode }) {
23
23
  <AuthQueryProvider>
24
24
  <AuthUIProviderTanstack
25
25
  authClient={authClient}
26
- credentials={/* {{EMAIL_PASSWORD_CREDENTIALS}} */}
26
+ /* {{EMAIL_PASSWORD_CREDENTIALS}} */
27
27
  navigate={(href) => router.navigate({ href })}
28
28
  replace={(href) => router.navigate({ href, replace: true })}
29
29
  Link={({ href, ...props }) => <Link to={href} {...props} />}
30
- social={{
31
- providers: [
32
- // {{OAUTH_UI_PROVIDERS}}
33
- ],
34
- }}
30
+ // {{OAUTH_UI_PROVIDERS}}
35
31
  >
36
32
  {children}
37
33
  </AuthUIProviderTanstack>