@getpara/create-para-app 0.6.0 → 2.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.
Files changed (142) hide show
  1. package/README.md +71 -0
  2. package/dist/cli.d.ts +2 -0
  3. package/dist/cli.d.ts.map +1 -0
  4. package/dist/cli.js +306 -0
  5. package/dist/cli.js.map +1 -0
  6. package/dist/index.d.ts +3 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +7 -48
  9. package/dist/index.js.map +1 -0
  10. package/dist/package-builder.d.ts +13 -0
  11. package/dist/package-builder.d.ts.map +1 -0
  12. package/dist/package-builder.js +89 -0
  13. package/dist/package-builder.js.map +1 -0
  14. package/dist/post-scaffold.d.ts +3 -0
  15. package/dist/post-scaffold.d.ts.map +1 -0
  16. package/dist/post-scaffold.js +64 -0
  17. package/dist/post-scaffold.js.map +1 -0
  18. package/dist/prompt-orchestrator.d.ts +3 -0
  19. package/dist/prompt-orchestrator.d.ts.map +1 -0
  20. package/dist/prompt-orchestrator.js +198 -0
  21. package/dist/prompt-orchestrator.js.map +1 -0
  22. package/dist/scaffolder.d.ts +3 -0
  23. package/dist/scaffolder.d.ts.map +1 -0
  24. package/dist/scaffolder.js +82 -0
  25. package/dist/scaffolder.js.map +1 -0
  26. package/dist/template-registry.d.ts +12 -0
  27. package/dist/template-registry.d.ts.map +1 -0
  28. package/dist/template-registry.js +29 -0
  29. package/dist/template-registry.js.map +1 -0
  30. package/dist/template-renderer.d.ts +11 -0
  31. package/dist/template-renderer.d.ts.map +1 -0
  32. package/dist/template-renderer.js +133 -0
  33. package/dist/template-renderer.js.map +1 -0
  34. package/dist/template-strategies/expo-template.d.ts +18 -0
  35. package/dist/template-strategies/expo-template.d.ts.map +1 -0
  36. package/dist/template-strategies/expo-template.js +173 -0
  37. package/dist/template-strategies/expo-template.js.map +1 -0
  38. package/dist/template-strategies/index.d.ts +4 -0
  39. package/dist/template-strategies/index.d.ts.map +1 -0
  40. package/dist/template-strategies/index.js +3 -0
  41. package/dist/template-strategies/index.js.map +1 -0
  42. package/dist/template-strategies/nextjs-template.d.ts +12 -0
  43. package/dist/template-strategies/nextjs-template.d.ts.map +1 -0
  44. package/dist/template-strategies/nextjs-template.js +123 -0
  45. package/dist/template-strategies/nextjs-template.js.map +1 -0
  46. package/dist/types.d.ts +67 -0
  47. package/dist/types.d.ts.map +1 -0
  48. package/dist/types.js +16 -0
  49. package/dist/types.js.map +1 -0
  50. package/dist/utils/fs.d.ts +11 -0
  51. package/dist/utils/fs.d.ts.map +1 -0
  52. package/dist/utils/fs.js +38 -0
  53. package/dist/utils/fs.js.map +1 -0
  54. package/dist/utils/logger.d.ts +10 -0
  55. package/dist/utils/logger.d.ts.map +1 -0
  56. package/dist/utils/logger.js +25 -19
  57. package/dist/utils/logger.js.map +1 -0
  58. package/package.json +36 -30
  59. package/templates/expo/_env.example +3 -0
  60. package/templates/expo/_gitignore +48 -0
  61. package/templates/expo/_yarnrc.yml +1 -0
  62. package/templates/expo/app/(auth)/_layout.tsx +12 -0
  63. package/templates/expo/app/(auth)/index.tsx.template +86 -0
  64. package/templates/expo/app/(tabs)/_layout.tsx +16 -0
  65. package/templates/expo/app/(tabs)/index.tsx +112 -0
  66. package/templates/expo/app/(tabs)/send.tsx +111 -0
  67. package/templates/expo/app/_layout.tsx +17 -0
  68. package/templates/expo/app/index.tsx +22 -0
  69. package/templates/expo/app.json.template +32 -0
  70. package/templates/expo/assets/adaptive-icon.png +0 -0
  71. package/templates/expo/assets/favicon.png +0 -0
  72. package/templates/expo/assets/icon.png +0 -0
  73. package/templates/expo/assets/splash.png +0 -0
  74. package/templates/expo/babel.config.cjs +12 -0
  75. package/templates/expo/components/features/AuthForm.tsx.template +138 -0
  76. package/templates/expo/components/features/OAuthButtons.tsx.template +27 -0
  77. package/templates/expo/components/features/index.ts.template +4 -0
  78. package/templates/expo/components/ui/Button.tsx +58 -0
  79. package/templates/expo/components/ui/Card.tsx +11 -0
  80. package/templates/expo/components/ui/Divider.tsx +19 -0
  81. package/templates/expo/components/ui/Input.tsx +23 -0
  82. package/templates/expo/components/ui/WalletCard.tsx +44 -0
  83. package/templates/expo/components/ui/index.ts +5 -0
  84. package/templates/expo/eslint.config.cjs +15 -0
  85. package/templates/expo/global.css +3 -0
  86. package/templates/expo/hooks/useOneClickLogin.ts.template +161 -0
  87. package/templates/expo/hooks/useViemClient.ts +118 -0
  88. package/templates/expo/hooks/useWallets.ts +52 -0
  89. package/templates/expo/index.js +2 -0
  90. package/templates/expo/lib/auth.ts +54 -0
  91. package/templates/expo/lib/constants.ts.template +2 -0
  92. package/templates/expo/lib/para.ts +13 -0
  93. package/templates/expo/metro.config.cjs +14 -0
  94. package/templates/expo/nativewind-env.d.ts +2 -0
  95. package/templates/expo/prettier.config.cjs +10 -0
  96. package/templates/expo/providers/ParaProvider.tsx +140 -0
  97. package/templates/expo/tailwind.config.cjs +23 -0
  98. package/templates/expo/tsconfig.json +11 -0
  99. package/templates/expo/types/index.ts +28 -0
  100. package/templates/nextjs/README.md +69 -0
  101. package/templates/nextjs/_env.example +8 -0
  102. package/templates/nextjs/_gitignore +36 -0
  103. package/templates/nextjs/_yarnrc.yml +1 -0
  104. package/templates/nextjs/next.config.ts +5 -0
  105. package/templates/nextjs/postcss.config.mjs +7 -0
  106. package/templates/nextjs/public/para.svg +3 -0
  107. package/templates/nextjs/src/app/layout.tsx +30 -0
  108. package/templates/nextjs/src/app/page.tsx +40 -0
  109. package/templates/nextjs/src/components/ParaProvider.tsx +116 -0
  110. package/templates/nextjs/src/components/layout/Header.tsx +44 -0
  111. package/templates/nextjs/src/components/ui/ConnectCard.tsx +24 -0
  112. package/templates/nextjs/src/components/ui/SignMessage.tsx +53 -0
  113. package/templates/nextjs/src/components/ui/WalletInfo.tsx +22 -0
  114. package/templates/nextjs/src/hooks/useSignHelloWorld.ts +23 -0
  115. package/templates/nextjs/src/styles/globals.css +1 -0
  116. package/templates/nextjs/tsconfig.json +27 -0
  117. package/dist/bin/index.js +0 -2
  118. package/dist/commands/scaffold.js +0 -137
  119. package/dist/integrations/codeGenerators.js +0 -637
  120. package/dist/integrations/packageJsonHelpers.js +0 -77
  121. package/dist/integrations/sdkSetup.js +0 -24
  122. package/dist/integrations/sdkSetupNextjs.js +0 -111
  123. package/dist/integrations/sdkSetupVite.js +0 -82
  124. package/dist/package.json +0 -44
  125. package/dist/prompts/interactive.js +0 -98
  126. package/dist/src/commands/scaffold.js +0 -157
  127. package/dist/src/index.js +0 -48
  128. package/dist/src/integrations/codeGenerators.js +0 -633
  129. package/dist/src/integrations/packageJsonHelpers.js +0 -77
  130. package/dist/src/integrations/sdkSetup.js +0 -24
  131. package/dist/src/integrations/sdkSetupNextjs.js +0 -111
  132. package/dist/src/integrations/sdkSetupVite.js +0 -82
  133. package/dist/src/prompts/interactive.js +0 -98
  134. package/dist/src/templates/nextjs.js +0 -68
  135. package/dist/src/templates/vite-react.js +0 -52
  136. package/dist/src/utils/exec.js +0 -16
  137. package/dist/src/utils/formatting.js +0 -31
  138. package/dist/src/utils/logger.js +0 -19
  139. package/dist/templates/nextjs.js +0 -61
  140. package/dist/templates/vite-react.js +0 -43
  141. package/dist/utils/exec.js +0 -16
  142. package/dist/utils/formatting.js +0 -31
@@ -1,43 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- import { execCommand } from '../utils/exec.js';
11
- import { logInfo } from '../utils/logger.js';
12
- export function scaffoldViteReact(config) {
13
- return __awaiter(this, void 0, void 0, function* () {
14
- logInfo(`🔧 Scaffolding Vite React app for project ${config.projectName}...`);
15
- const versionTag = config.useLatest ? 'latest' : 'latest';
16
- const templateName = config.typescript ? 'react-ts' : 'react';
17
- let cmd = '';
18
- if (config.packageManager === 'yarn') {
19
- cmd = `yarn create vite ${config.projectName} --template ${templateName}`;
20
- }
21
- else if (config.packageManager === 'npm') {
22
- cmd = `npm create vite@${versionTag} ${config.projectName} --template ${templateName}`;
23
- }
24
- else if (config.packageManager === 'pnpm') {
25
- cmd = `pnpm dlx create-vite@${versionTag} ${config.projectName} --template ${templateName}`;
26
- }
27
- else if (config.packageManager === 'bun') {
28
- logInfo('Warning: "bun create vite" not officially tested. Using npm create instead.');
29
- cmd = `npm create vite@${versionTag} ${config.projectName} --template ${templateName}`;
30
- }
31
- else {
32
- cmd = `npm create vite@${versionTag} ${config.projectName} --template ${templateName}`;
33
- }
34
- if (config.noGit) {
35
- cmd += ' --no-git';
36
- }
37
- if (config.skipDeps) {
38
- cmd += ' --skip-install';
39
- }
40
- logInfo(`💻 Executing command: ${cmd}`);
41
- yield execCommand(cmd);
42
- });
43
- }
@@ -1,16 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- import { execa } from 'execa';
11
- export function execCommand(command) {
12
- return __awaiter(this, void 0, void 0, function* () {
13
- const [cmd, ...args] = command.split(' ');
14
- yield execa(cmd, args, { stdio: 'inherit' });
15
- });
16
- }
@@ -1,31 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- import prettier from 'prettier';
11
- export function formatWithPrettier(code, filePath) {
12
- return __awaiter(this, void 0, void 0, function* () {
13
- let parser = 'babel';
14
- if (filePath.endsWith('.ts')) {
15
- parser = 'typescript';
16
- }
17
- else if (filePath.endsWith('.tsx')) {
18
- parser = 'babel-ts';
19
- }
20
- else if (filePath.endsWith('.js')) {
21
- parser = 'babel';
22
- }
23
- else if (filePath.endsWith('.jsx')) {
24
- parser = 'babel';
25
- }
26
- return prettier.format(code, {
27
- parser,
28
- singleQuote: true,
29
- });
30
- });
31
- }