create-z3 0.0.20 → 0.0.22
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
|
|
1795
|
+
return `credentials={${enabled}}`;
|
|
1791
1796
|
}
|
|
1792
1797
|
function generateAuthProvidersBlock(oauthProviders, emailPasswordEnabled) {
|
|
1793
1798
|
const parts = [];
|
|
@@ -1803,11 +1808,11 @@ function generateAuthProvidersBlock(oauthProviders, emailPasswordEnabled) {
|
|
|
1803
1808
|
throw new Error(`Unknown OAuth provider: ${providerId}`);
|
|
1804
1809
|
}
|
|
1805
1810
|
const configLines = [
|
|
1806
|
-
`clientId: process.env.${provider.envPrefix}_CLIENT_ID
|
|
1807
|
-
`clientSecret: process.env.${provider.envPrefix}_CLIENT_SECRET
|
|
1811
|
+
`clientId: process.env.${provider.envPrefix}_CLIENT_ID!,`,
|
|
1812
|
+
`clientSecret: process.env.${provider.envPrefix}_CLIENT_SECRET!,`
|
|
1808
1813
|
];
|
|
1809
1814
|
if (providerId === "figma") {
|
|
1810
|
-
configLines.push(`clientKey: process.env.FIGMA_CLIENT_KEY
|
|
1815
|
+
configLines.push(`clientKey: process.env.FIGMA_CLIENT_KEY!,`);
|
|
1811
1816
|
}
|
|
1812
1817
|
return `${providerId}: {
|
|
1813
1818
|
${configLines.join("\n ")}
|
|
@@ -1861,7 +1866,10 @@ function generateOAuthUIProvidersBlock(providers) {
|
|
|
1861
1866
|
if (providers.length === 0) {
|
|
1862
1867
|
return "";
|
|
1863
1868
|
}
|
|
1864
|
-
|
|
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
|
|
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
|
@@ -31,14 +31,14 @@ export default function BetterAuthClientProvider({ children }: { children: React
|
|
|
31
31
|
return (
|
|
32
32
|
<AuthUIProvider
|
|
33
33
|
authClient={authClient}
|
|
34
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
31
|
-
providers: [
|
|
32
|
-
// {{OAUTH_UI_PROVIDERS}}
|
|
33
|
-
],
|
|
34
|
-
}}
|
|
30
|
+
// {{OAUTH_UI_PROVIDERS}}
|
|
35
31
|
>
|
|
36
32
|
{children}
|
|
37
33
|
</AuthUIProviderTanstack>
|