ignite-parse-auth-kit 1.0.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.
- package/CONTRIBUTING.md +0 -0
- package/LICENSE +21 -0
- package/README.md +492 -0
- package/app/app.tsx +116 -0
- package/app/components/AlertTongle.tsx +105 -0
- package/app/components/AutoImage.tsx +89 -0
- package/app/components/Button.tsx +248 -0
- package/app/components/Card.tsx +314 -0
- package/app/components/EmptyState.tsx +248 -0
- package/app/components/Header.tsx +332 -0
- package/app/components/Icon.tsx +140 -0
- package/app/components/ListItem.tsx +243 -0
- package/app/components/ListView.tsx +42 -0
- package/app/components/Screen.tsx +305 -0
- package/app/components/Text.test.tsx +23 -0
- package/app/components/Text.tsx +116 -0
- package/app/components/TextField.tsx +292 -0
- package/app/components/Toggle/Checkbox.tsx +123 -0
- package/app/components/Toggle/Radio.tsx +106 -0
- package/app/components/Toggle/Switch.tsx +264 -0
- package/app/components/Toggle/Toggle.tsx +285 -0
- package/app/components/index copy.ts +15 -0
- package/app/components/index.ts +18 -0
- package/app/config/config.base.ts +26 -0
- package/app/config/config.dev.ts +10 -0
- package/app/config/config.prod.ts +10 -0
- package/app/config/index.ts +28 -0
- package/app/context/AuthContext.tsx +14 -0
- package/app/context/EpisodeContext.tsx +136 -0
- package/app/context/auth/AuthProvider.tsx +340 -0
- package/app/context/auth/hooks.ts +29 -0
- package/app/context/auth/index.ts +38 -0
- package/app/context/auth/reducer.ts +68 -0
- package/app/context/auth/services.ts +394 -0
- package/app/context/auth/types.ts +99 -0
- package/app/context/auth/validation.ts +45 -0
- package/app/devtools/ReactotronClient.ts +9 -0
- package/app/devtools/ReactotronClient.web.ts +12 -0
- package/app/devtools/ReactotronConfig.ts +139 -0
- package/app/i18n/ar.ts +126 -0
- package/app/i18n/demo-ar.ts +464 -0
- package/app/i18n/demo-en.ts +462 -0
- package/app/i18n/demo-es.ts +469 -0
- package/app/i18n/demo-fr.ts +471 -0
- package/app/i18n/demo-hi.ts +468 -0
- package/app/i18n/demo-ja.ts +464 -0
- package/app/i18n/demo-ko.ts +457 -0
- package/app/i18n/en.ts +146 -0
- package/app/i18n/es.ts +132 -0
- package/app/i18n/fr.ts +132 -0
- package/app/i18n/hi.ts +131 -0
- package/app/i18n/index.ts +86 -0
- package/app/i18n/ja.ts +130 -0
- package/app/i18n/ko.ts +129 -0
- package/app/i18n/translate.ts +33 -0
- package/app/lib/Parse/index.ts +2 -0
- package/app/lib/Parse/parse.ts +62 -0
- package/app/navigators/AppNavigator.tsx +145 -0
- package/app/navigators/DemoNavigator.tsx +137 -0
- package/app/navigators/navigationUtilities.ts +208 -0
- package/app/screens/ChooseAuthScreen.tsx +224 -0
- package/app/screens/DemoCommunityScreen.tsx +141 -0
- package/app/screens/DemoDebugScreen.tsx +192 -0
- package/app/screens/DemoPodcastListScreen.tsx +387 -0
- package/app/screens/DemoShowroomScreen/DemoDivider.tsx +66 -0
- package/app/screens/DemoShowroomScreen/DemoShowroomScreen.tsx +313 -0
- package/app/screens/DemoShowroomScreen/DemoUseCase.tsx +52 -0
- package/app/screens/DemoShowroomScreen/DrawerIconButton.tsx +120 -0
- package/app/screens/DemoShowroomScreen/SectionListWithKeyboardAwareScrollView.tsx +59 -0
- package/app/screens/DemoShowroomScreen/demos/DemoAutoImage.tsx +230 -0
- package/app/screens/DemoShowroomScreen/demos/DemoButton.tsx +234 -0
- package/app/screens/DemoShowroomScreen/demos/DemoCard.tsx +181 -0
- package/app/screens/DemoShowroomScreen/demos/DemoEmptyState.tsx +78 -0
- package/app/screens/DemoShowroomScreen/demos/DemoHeader.tsx +151 -0
- package/app/screens/DemoShowroomScreen/demos/DemoIcon.tsx +115 -0
- package/app/screens/DemoShowroomScreen/demos/DemoListItem.tsx +218 -0
- package/app/screens/DemoShowroomScreen/demos/DemoText.tsx +144 -0
- package/app/screens/DemoShowroomScreen/demos/DemoTextField.tsx +233 -0
- package/app/screens/DemoShowroomScreen/demos/DemoToggle.tsx +354 -0
- package/app/screens/DemoShowroomScreen/demos/index.ts +12 -0
- package/app/screens/ErrorScreen/ErrorBoundary.tsx +76 -0
- package/app/screens/ErrorScreen/ErrorDetails.tsx +98 -0
- package/app/screens/ForgetPasswordScreen.tsx +180 -0
- package/app/screens/LoginScreen.tsx +260 -0
- package/app/screens/RegisterScreen.tsx +395 -0
- package/app/screens/WelcomeScreen.tsx +114 -0
- package/app/services/api/apiProblem.test.ts +73 -0
- package/app/services/api/apiProblem.ts +74 -0
- package/app/services/api/index.ts +91 -0
- package/app/services/api/types.ts +50 -0
- package/app/theme/colors.ts +85 -0
- package/app/theme/colorsDark.ts +50 -0
- package/app/theme/context.tsx +145 -0
- package/app/theme/context.utils.ts +25 -0
- package/app/theme/spacing.ts +14 -0
- package/app/theme/spacingDark.ts +14 -0
- package/app/theme/styles.ts +24 -0
- package/app/theme/theme.ts +23 -0
- package/app/theme/timing.ts +6 -0
- package/app/theme/types.ts +64 -0
- package/app/theme/typography.ts +71 -0
- package/app/utils/crashReporting.ts +62 -0
- package/app/utils/delay.ts +6 -0
- package/app/utils/formatDate.ts +49 -0
- package/app/utils/gestureHandler.native.ts +3 -0
- package/app/utils/gestureHandler.ts +6 -0
- package/app/utils/hasValidStringProp.ts +11 -0
- package/app/utils/openLinkInBrowser.ts +8 -0
- package/app/utils/storage/index.ts +82 -0
- package/app/utils/storage/storage.test.ts +61 -0
- package/app/utils/useHeader.tsx +37 -0
- package/app/utils/useIsMounted.ts +18 -0
- package/app/utils/useSafeAreaInsetsStyle.ts +46 -0
- package/app.config.ts +39 -0
- package/app.json +67 -0
- package/assets/icons/back.png +0 -0
- package/assets/icons/back@2x.png +0 -0
- package/assets/icons/back@3x.png +0 -0
- package/assets/icons/bell.png +0 -0
- package/assets/icons/bell@2x.png +0 -0
- package/assets/icons/bell@3x.png +0 -0
- package/assets/icons/caretLeft.png +0 -0
- package/assets/icons/caretLeft@2x.png +0 -0
- package/assets/icons/caretLeft@3x.png +0 -0
- package/assets/icons/caretRight.png +0 -0
- package/assets/icons/caretRight@2x.png +0 -0
- package/assets/icons/caretRight@3x.png +0 -0
- package/assets/icons/check.png +0 -0
- package/assets/icons/check@2x.png +0 -0
- package/assets/icons/check@3x.png +0 -0
- package/assets/icons/demo/clap.png +0 -0
- package/assets/icons/demo/clap@2x.png +0 -0
- package/assets/icons/demo/clap@3x.png +0 -0
- package/assets/icons/demo/community.png +0 -0
- package/assets/icons/demo/community@2x.png +0 -0
- package/assets/icons/demo/community@3x.png +0 -0
- package/assets/icons/demo/components.png +0 -0
- package/assets/icons/demo/components@2x.png +0 -0
- package/assets/icons/demo/components@3x.png +0 -0
- package/assets/icons/demo/debug.png +0 -0
- package/assets/icons/demo/debug@2x.png +0 -0
- package/assets/icons/demo/debug@3x.png +0 -0
- package/assets/icons/demo/github.png +0 -0
- package/assets/icons/demo/github@2x.png +0 -0
- package/assets/icons/demo/github@3x.png +0 -0
- package/assets/icons/demo/heart.png +0 -0
- package/assets/icons/demo/heart@2x.png +0 -0
- package/assets/icons/demo/heart@3x.png +0 -0
- package/assets/icons/demo/pin.png +0 -0
- package/assets/icons/demo/pin@2x.png +0 -0
- package/assets/icons/demo/pin@3x.png +0 -0
- package/assets/icons/demo/podcast.png +0 -0
- package/assets/icons/demo/podcast@2x.png +0 -0
- package/assets/icons/demo/podcast@3x.png +0 -0
- package/assets/icons/demo/slack.png +0 -0
- package/assets/icons/demo/slack@2x.png +0 -0
- package/assets/icons/demo/slack@3x.png +0 -0
- package/assets/icons/google.png +0 -0
- package/assets/icons/hidden.png +0 -0
- package/assets/icons/hidden@2x.png +0 -0
- package/assets/icons/hidden@3x.png +0 -0
- package/assets/icons/ladybug.png +0 -0
- package/assets/icons/ladybug@2x.png +0 -0
- package/assets/icons/ladybug@3x.png +0 -0
- package/assets/icons/lock.png +0 -0
- package/assets/icons/lock@2x.png +0 -0
- package/assets/icons/lock@3x.png +0 -0
- package/assets/icons/menu.png +0 -0
- package/assets/icons/menu@2x.png +0 -0
- package/assets/icons/menu@3x.png +0 -0
- package/assets/icons/more.png +0 -0
- package/assets/icons/more@2x.png +0 -0
- package/assets/icons/more@3x.png +0 -0
- package/assets/icons/settings.png +0 -0
- package/assets/icons/settings@2x.png +0 -0
- package/assets/icons/settings@3x.png +0 -0
- package/assets/icons/view.png +0 -0
- package/assets/icons/view@2x.png +0 -0
- package/assets/icons/view@3x.png +0 -0
- package/assets/icons/x.png +0 -0
- package/assets/icons/x@2x.png +0 -0
- package/assets/icons/x@3x.png +0 -0
- package/assets/images/app-icon-all.png +0 -0
- package/assets/images/app-icon-android-adaptive-background.png +0 -0
- package/assets/images/app-icon-android-adaptive-foreground.png +0 -0
- package/assets/images/app-icon-android-legacy.png +0 -0
- package/assets/images/app-icon-ios.png +0 -0
- package/assets/images/app-icon-web-favicon.png +0 -0
- package/assets/images/demo/cr-logo.png +0 -0
- package/assets/images/demo/cr-logo@2x.png +0 -0
- package/assets/images/demo/cr-logo@3x.png +0 -0
- package/assets/images/demo/rnl-logo.png +0 -0
- package/assets/images/demo/rnl-logo@2x.png +0 -0
- package/assets/images/demo/rnl-logo@3x.png +0 -0
- package/assets/images/demo/rnn-logo.png +0 -0
- package/assets/images/demo/rnn-logo@2x.png +0 -0
- package/assets/images/demo/rnn-logo@3x.png +0 -0
- package/assets/images/demo/rnr-image-1.png +0 -0
- package/assets/images/demo/rnr-image-1@2x.png +0 -0
- package/assets/images/demo/rnr-image-1@3x.png +0 -0
- package/assets/images/demo/rnr-image-2.png +0 -0
- package/assets/images/demo/rnr-image-2@2x.png +0 -0
- package/assets/images/demo/rnr-image-2@3x.png +0 -0
- package/assets/images/demo/rnr-image-3.png +0 -0
- package/assets/images/demo/rnr-image-3@2x.png +0 -0
- package/assets/images/demo/rnr-image-3@3x.png +0 -0
- package/assets/images/demo/rnr-logo.png +0 -0
- package/assets/images/demo/rnr-logo@2x.png +0 -0
- package/assets/images/demo/rnr-logo@3x.png +0 -0
- package/assets/images/logo.png +0 -0
- package/assets/images/logo@2x.png +0 -0
- package/assets/images/logo@3x.png +0 -0
- package/assets/images/sad-face.png +0 -0
- package/assets/images/sad-face@2x.png +0 -0
- package/assets/images/sad-face@3x.png +0 -0
- package/assets/images/welcome-face.png +0 -0
- package/assets/images/welcome-face@2x.png +0 -0
- package/assets/images/welcome-face@3x.png +0 -0
- package/babel.config.js +7 -0
- package/bin/cli.js +196 -0
- package/ignite/templates/app-icon/android-adaptive-background.png +0 -0
- package/ignite/templates/app-icon/android-adaptive-foreground.png +0 -0
- package/ignite/templates/app-icon/android-legacy.png +0 -0
- package/ignite/templates/app-icon/ios-universal.png +0 -0
- package/ignite/templates/component/NAME.tsx.ejs +39 -0
- package/ignite/templates/navigator/NAMENavigator.tsx.ejs +18 -0
- package/ignite/templates/screen/NAMEScreen.tsx.ejs +29 -0
- package/ignite/templates/splash-screen/logo.png +0 -0
- package/index.tsx +9 -0
- package/jest.config.js +5 -0
- package/metro.config.js +31 -0
- package/package.json +166 -0
- package/plugins/withSplashScreen.ts +69 -0
- package/src/app/_layout.tsx +58 -0
- package/src/app/index.tsx +5 -0
- package/test/i18n.test.ts +75 -0
- package/test/mockFile.ts +6 -0
- package/test/setup.ts +58 -0
- package/test/test-tsconfig.json +8 -0
- package/tsconfig.json +52 -0
- package/types/lib.es5.d.ts +25 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/babel.config.js
ADDED
package/bin/cli.js
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { execSync, spawn } = require('child_process');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
|
|
7
|
+
const chalk = require('chalk');
|
|
8
|
+
const { program } = require('commander');
|
|
9
|
+
const ora = require('ora');
|
|
10
|
+
|
|
11
|
+
const packageJson = require('../package.json');
|
|
12
|
+
|
|
13
|
+
program
|
|
14
|
+
.name('ignite-parse-auth-kit')
|
|
15
|
+
.description('Create a new React Native app with Parse authentication')
|
|
16
|
+
.version(packageJson.version)
|
|
17
|
+
.argument('[project-name]', 'Name of the project to create')
|
|
18
|
+
.option('-d, --directory <path>', 'Directory to create the project in')
|
|
19
|
+
.option('--skip-install', 'Skip installing dependencies')
|
|
20
|
+
.option('--use-npm', 'Use npm instead of yarn')
|
|
21
|
+
.option('--use-bun', 'Use bun instead of yarn')
|
|
22
|
+
.action(async (projectName, options) => {
|
|
23
|
+
console.log(chalk.cyan('\n🔥 Ignite Parse Auth Kit\n'));
|
|
24
|
+
console.log(chalk.gray(`v${packageJson.version}\n`));
|
|
25
|
+
|
|
26
|
+
if (!projectName) {
|
|
27
|
+
console.log(chalk.yellow('Usage: npx ignite-parse-auth-kit <project-name>\n'));
|
|
28
|
+
console.log(chalk.gray('Example: npx ignite-parse-auth-kit my-app\n'));
|
|
29
|
+
process.exit(1);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const targetDir = options.directory
|
|
33
|
+
? path.resolve(options.directory, projectName)
|
|
34
|
+
: path.resolve(process.cwd(), projectName);
|
|
35
|
+
|
|
36
|
+
if (fs.existsSync(targetDir)) {
|
|
37
|
+
console.log(chalk.red(`\n❌ Directory "${projectName}" already exists.\n`));
|
|
38
|
+
process.exit(1);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const spinner = ora('Creating your new project...').start();
|
|
42
|
+
|
|
43
|
+
try {
|
|
44
|
+
// Create the target directory
|
|
45
|
+
fs.mkdirSync(targetDir, { recursive: true });
|
|
46
|
+
|
|
47
|
+
// Get the template source directory (where this package is installed)
|
|
48
|
+
const templateDir = path.resolve(__dirname, '..');
|
|
49
|
+
|
|
50
|
+
// Files and directories to copy
|
|
51
|
+
const itemsToCopy = [
|
|
52
|
+
'app',
|
|
53
|
+
'assets',
|
|
54
|
+
'ignite',
|
|
55
|
+
'plugins',
|
|
56
|
+
'src',
|
|
57
|
+
'template',
|
|
58
|
+
'test',
|
|
59
|
+
'types',
|
|
60
|
+
'index.tsx',
|
|
61
|
+
'app.config.ts',
|
|
62
|
+
'app.json',
|
|
63
|
+
'babel.config.js',
|
|
64
|
+
'metro.config.js',
|
|
65
|
+
'tsconfig.json',
|
|
66
|
+
'jest.config.js',
|
|
67
|
+
'.gitignore',
|
|
68
|
+
'README.md',
|
|
69
|
+
'LICENSE',
|
|
70
|
+
'CONTRIBUTING.md'
|
|
71
|
+
];
|
|
72
|
+
|
|
73
|
+
// Copy each item
|
|
74
|
+
for (const item of itemsToCopy) {
|
|
75
|
+
const sourcePath = path.join(templateDir, item);
|
|
76
|
+
const destPath = path.join(targetDir, item);
|
|
77
|
+
|
|
78
|
+
if (fs.existsSync(sourcePath)) {
|
|
79
|
+
copyRecursive(sourcePath, destPath);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Copy package.json but modify it for the new project
|
|
84
|
+
const templatePkgPath = path.join(templateDir, 'package.json');
|
|
85
|
+
const templatePkg = JSON.parse(fs.readFileSync(templatePkgPath, 'utf8'));
|
|
86
|
+
|
|
87
|
+
// Create a clean package.json for the new project
|
|
88
|
+
const newPkg = {
|
|
89
|
+
name: projectName.toLowerCase().replace(/[^a-z0-9-]/g, '-'),
|
|
90
|
+
version: '1.0.0',
|
|
91
|
+
private: true,
|
|
92
|
+
main: templatePkg.main,
|
|
93
|
+
scripts: { ...templatePkg.scripts },
|
|
94
|
+
dependencies: { ...templatePkg.dependencies },
|
|
95
|
+
devDependencies: {},
|
|
96
|
+
engines: templatePkg.engines,
|
|
97
|
+
expo: templatePkg.expo
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
// Copy devDependencies except CLI-specific ones
|
|
101
|
+
const cliDeps = ['chalk', 'commander', 'fs-extra', 'ora'];
|
|
102
|
+
for (const [dep, version] of Object.entries(templatePkg.devDependencies || {})) {
|
|
103
|
+
if (!cliDeps.includes(dep)) {
|
|
104
|
+
newPkg.devDependencies[dep] = version;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Remove bin and files entries (not needed for the project)
|
|
109
|
+
delete newPkg.bin;
|
|
110
|
+
delete newPkg.files;
|
|
111
|
+
delete newPkg.repository;
|
|
112
|
+
delete newPkg.bugs;
|
|
113
|
+
delete newPkg.homepage;
|
|
114
|
+
delete newPkg.keywords;
|
|
115
|
+
|
|
116
|
+
fs.writeFileSync(
|
|
117
|
+
path.join(targetDir, 'package.json'),
|
|
118
|
+
JSON.stringify(newPkg, null, 2)
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
// Update app.json with the new project name
|
|
122
|
+
const appJsonPath = path.join(targetDir, 'app.json');
|
|
123
|
+
if (fs.existsSync(appJsonPath)) {
|
|
124
|
+
const appJson = JSON.parse(fs.readFileSync(appJsonPath, 'utf8'));
|
|
125
|
+
appJson.expo = appJson.expo || {};
|
|
126
|
+
appJson.expo.name = projectName;
|
|
127
|
+
appJson.expo.slug = projectName.toLowerCase().replace(/[^a-z0-9-]/g, '-');
|
|
128
|
+
fs.writeFileSync(appJsonPath, JSON.stringify(appJson, null, 2));
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
spinner.succeed(chalk.green('Project created successfully!'));
|
|
132
|
+
|
|
133
|
+
// Install dependencies
|
|
134
|
+
if (!options.skipInstall) {
|
|
135
|
+
const installSpinner = ora('Installing dependencies...').start();
|
|
136
|
+
|
|
137
|
+
try {
|
|
138
|
+
const packageManager = options.useBun ? 'bun' : (options.useNpm ? 'npm' : 'yarn');
|
|
139
|
+
const installCmd = packageManager === 'npm' ? 'npm install' : `${packageManager} install`;
|
|
140
|
+
|
|
141
|
+
execSync(installCmd, {
|
|
142
|
+
cwd: targetDir,
|
|
143
|
+
stdio: 'pipe'
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
installSpinner.succeed(chalk.green('Dependencies installed!'));
|
|
147
|
+
} catch (error) {
|
|
148
|
+
installSpinner.warn(chalk.yellow('Could not install dependencies automatically.'));
|
|
149
|
+
console.log(chalk.gray('Run "npm install" or "yarn install" manually.\n'));
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// Print next steps
|
|
154
|
+
console.log('\n' + chalk.cyan('🎉 Your project is ready!\n'));
|
|
155
|
+
console.log(chalk.white('Next steps:\n'));
|
|
156
|
+
console.log(chalk.gray(` cd ${projectName}`));
|
|
157
|
+
if (options.skipInstall) {
|
|
158
|
+
console.log(chalk.gray(' npm install'));
|
|
159
|
+
}
|
|
160
|
+
console.log(chalk.gray(' npx expo start\n'));
|
|
161
|
+
|
|
162
|
+
console.log(chalk.white('Configure your Parse Server:\n'));
|
|
163
|
+
console.log(chalk.gray(' Edit app/config/config.dev.ts with your Parse Server credentials\n'));
|
|
164
|
+
|
|
165
|
+
console.log(chalk.cyan('Happy coding! 🚀\n'));
|
|
166
|
+
|
|
167
|
+
} catch (error) {
|
|
168
|
+
spinner.fail(chalk.red('Failed to create project'));
|
|
169
|
+
console.error(chalk.red(error.message));
|
|
170
|
+
process.exit(1);
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Recursively copy files and directories
|
|
176
|
+
*/
|
|
177
|
+
function copyRecursive(src, dest) {
|
|
178
|
+
const stat = fs.statSync(src);
|
|
179
|
+
|
|
180
|
+
if (stat.isDirectory()) {
|
|
181
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
182
|
+
const items = fs.readdirSync(src);
|
|
183
|
+
|
|
184
|
+
for (const item of items) {
|
|
185
|
+
// Skip node_modules and other unwanted directories
|
|
186
|
+
if (['node_modules', '.git', '.expo', 'android', 'ios'].includes(item)) {
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
189
|
+
copyRecursive(path.join(src, item), path.join(dest, item));
|
|
190
|
+
}
|
|
191
|
+
} else {
|
|
192
|
+
fs.copyFileSync(src, dest);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
program.parse();
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
destinationDir: app/components/<%= props.subdirectory %>
|
|
3
|
+
---
|
|
4
|
+
import { StyleProp, TextStyle, View, ViewStyle } from "react-native"
|
|
5
|
+
import { useAppTheme } from "@/theme/context"
|
|
6
|
+
import type { ThemedStyle } from "@/theme/types"
|
|
7
|
+
import { Text } from "@/components/Text"
|
|
8
|
+
|
|
9
|
+
export interface <%= props.pascalCaseName %>Props {
|
|
10
|
+
/**
|
|
11
|
+
* An optional style override useful for padding & margin.
|
|
12
|
+
*/
|
|
13
|
+
style?: StyleProp<ViewStyle>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Describe your component here
|
|
18
|
+
*/
|
|
19
|
+
export const <%= props.pascalCaseName %> = (props: <%= props.pascalCaseName %>Props) => {
|
|
20
|
+
const { style } = props
|
|
21
|
+
const $styles = [$container, style]
|
|
22
|
+
const { themed } = useAppTheme();
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<View style={$styles}>
|
|
26
|
+
<Text style={themed($text)}>Hello</Text>
|
|
27
|
+
</View>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const $container: ViewStyle = {
|
|
32
|
+
justifyContent: "center",
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const $text: ThemedStyle<TextStyle> = ({ colors, typography }) => ({
|
|
36
|
+
fontFamily: typography.primary.normal,
|
|
37
|
+
fontSize: 14,
|
|
38
|
+
color: colors.palette.primary500,
|
|
39
|
+
})
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
destinationDir: app/navigators
|
|
3
|
+
---
|
|
4
|
+
import { createNativeStackNavigator } from "@react-navigation/native-stack"
|
|
5
|
+
import { WelcomeScreen } from "@/screens/WelcomeScreen"
|
|
6
|
+
|
|
7
|
+
export type <%= props.pascalCaseName %>NavigatorParamList = {
|
|
8
|
+
Demo: undefined
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const Stack = createNativeStackNavigator<<%= props.pascalCaseName %>NavigatorParamList>()
|
|
12
|
+
export const <%= props.pascalCaseName %>Navigator = () => {
|
|
13
|
+
return (
|
|
14
|
+
<Stack.Navigator screenOptions={{ cardStyle: { backgroundColor: "transparent" }, headerShown: false, }}>
|
|
15
|
+
<Stack.Screen name="Demo" component={WelcomeScreen} />
|
|
16
|
+
</Stack.Navigator>
|
|
17
|
+
)
|
|
18
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
destinationDir: app/screens
|
|
3
|
+
patches:
|
|
4
|
+
- path: "app/navigators/AppNavigator.tsx"
|
|
5
|
+
replace: "// IGNITE_GENERATOR_ANCHOR_APP_STACK_PARAM_LIST"
|
|
6
|
+
insert: "<%= props.pascalCaseName %>: undefined\n\t// IGNITE_GENERATOR_ANCHOR_APP_STACK_PARAM_LIST"
|
|
7
|
+
---
|
|
8
|
+
import { FC } from "react"
|
|
9
|
+
import { ViewStyle } from "react-native"
|
|
10
|
+
import type { AppStackScreenProps } from "@/navigators/AppNavigator"
|
|
11
|
+
import { Screen } from "@/components/Screen"
|
|
12
|
+
import { Text } from "@/components/Text"
|
|
13
|
+
// import { useNavigation } from "@react-navigation/native"
|
|
14
|
+
|
|
15
|
+
interface <%= props.pascalCaseName %>ScreenProps extends AppStackScreenProps<"<%= props.pascalCaseName %>"> {}
|
|
16
|
+
|
|
17
|
+
export const <%= props.pascalCaseName %>Screen: FC<<%= props.pascalCaseName %>ScreenProps> = () => {
|
|
18
|
+
// Pull in navigation via hook
|
|
19
|
+
// const navigation = useNavigation()
|
|
20
|
+
return (
|
|
21
|
+
<Screen style={$root} preset="scroll">
|
|
22
|
+
<Text text="<%= props.camelCaseName %>" />
|
|
23
|
+
</Screen>
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const $root: ViewStyle = {
|
|
28
|
+
flex: 1,
|
|
29
|
+
}
|
|
Binary file
|
package/index.tsx
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "@expo/metro-runtime" // this is for fast refresh on web w/o expo-router
|
|
2
|
+
import { registerRootComponent } from "expo"
|
|
3
|
+
|
|
4
|
+
import { App } from "@/app"
|
|
5
|
+
|
|
6
|
+
// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
|
|
7
|
+
// It also ensures that whether you load the app in Expo Go or in a native build,
|
|
8
|
+
// the environment is set up appropriately
|
|
9
|
+
registerRootComponent(App)
|
package/jest.config.js
ADDED
package/metro.config.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* eslint-env node */
|
|
2
|
+
// Learn more https://docs.expo.io/guides/customizing-metro
|
|
3
|
+
const { getDefaultConfig } = require("expo/metro-config")
|
|
4
|
+
|
|
5
|
+
/** @type {import('expo/metro-config').MetroConfig} */
|
|
6
|
+
const config = getDefaultConfig(__dirname)
|
|
7
|
+
|
|
8
|
+
config.transformer.getTransformOptions = async () => ({
|
|
9
|
+
transform: {
|
|
10
|
+
// Inline requires are very useful for deferring loading of large dependencies/components.
|
|
11
|
+
// For example, we use it in app.tsx to conditionally load Reactotron.
|
|
12
|
+
// However, this comes with some gotchas.
|
|
13
|
+
// Read more here: https://reactnative.dev/docs/optimizing-javascript-loading
|
|
14
|
+
// And here: https://github.com/expo/expo/issues/27279#issuecomment-1971610698
|
|
15
|
+
inlineRequires: true,
|
|
16
|
+
},
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
// This is a temporary fix that helps fixing an issue with axios/apisauce.
|
|
20
|
+
// See the following issues in Github for more details:
|
|
21
|
+
// https://github.com/infinitered/apisauce/issues/331
|
|
22
|
+
// https://github.com/axios/axios/issues/6899
|
|
23
|
+
// The solution was taken from the following issue:
|
|
24
|
+
// https://github.com/facebook/metro/issues/1272
|
|
25
|
+
config.resolver.unstable_conditionNames = ["require", "default", "browser"]
|
|
26
|
+
|
|
27
|
+
// This helps support certain popular third-party libraries
|
|
28
|
+
// such as Firebase that use the extension cjs.
|
|
29
|
+
config.resolver.sourceExts.push("cjs")
|
|
30
|
+
|
|
31
|
+
module.exports = config
|
package/package.json
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ignite-parse-auth-kit",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "A comprehensive React Native (Expo) template powered by Ignite CLI and Parse Server, providing production-ready authentication solutions.",
|
|
6
|
+
"main": "index.tsx",
|
|
7
|
+
"bin": {
|
|
8
|
+
"ignite-parse-auth-kit": "./bin/cli.js",
|
|
9
|
+
"create-ignite-parse-auth-app": "./bin/cli.js"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/neweracy/IgniteParseAuthKit.git"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"react-native",
|
|
17
|
+
"expo",
|
|
18
|
+
"ignite",
|
|
19
|
+
"parse-server",
|
|
20
|
+
"authentication",
|
|
21
|
+
"google-signin",
|
|
22
|
+
"template",
|
|
23
|
+
"boilerplate",
|
|
24
|
+
"typescript",
|
|
25
|
+
"mobile"
|
|
26
|
+
],
|
|
27
|
+
"author": "neweracy",
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"bugs": {
|
|
30
|
+
"url": "https://github.com/neweracy/IgniteParseAuthKit/issues"
|
|
31
|
+
},
|
|
32
|
+
"homepage": "https://github.com/neweracy/IgniteParseAuthKit#readme",
|
|
33
|
+
"scripts": {
|
|
34
|
+
"start": "expo start --dev-client",
|
|
35
|
+
"android": "expo run:android",
|
|
36
|
+
"ios": "expo run:ios",
|
|
37
|
+
"web": "expo start --web",
|
|
38
|
+
"bundle:web": "npx expo export --platform web",
|
|
39
|
+
"serve:web": "npx serve dist",
|
|
40
|
+
"prebuild:clean": "npx expo prebuild --clean",
|
|
41
|
+
"compile": "tsc --noEmit -p . --pretty",
|
|
42
|
+
"lint": "eslint . --fix",
|
|
43
|
+
"lint:check": "eslint .",
|
|
44
|
+
"align-deps": "npx expo install --fix",
|
|
45
|
+
"test": "jest",
|
|
46
|
+
"test:watch": "jest --watch",
|
|
47
|
+
"test:maestro": "maestro test -e MAESTRO_APP_ID=com.authtemplate .maestro/flows",
|
|
48
|
+
"adb": "adb reverse tcp:9090 tcp:9090 && adb reverse tcp:3000 tcp:3000 && adb reverse tcp:9001 tcp:9001 && adb reverse tcp:8081 tcp:8081",
|
|
49
|
+
"build:ios:sim": "eas build --profile development --platform ios --local",
|
|
50
|
+
"build:ios:dev": "eas build --profile development:device --platform ios --local",
|
|
51
|
+
"build:ios:preview": "eas build --profile preview --platform ios --local",
|
|
52
|
+
"build:ios:prod": "eas build --profile production --platform ios --local",
|
|
53
|
+
"build:android:sim": "eas build --profile development --platform android --local",
|
|
54
|
+
"build:android:dev": "eas build --profile development:device --platform android --local",
|
|
55
|
+
"build:android:preview": "eas build --profile preview --platform android --local",
|
|
56
|
+
"build:android:prod": "eas build --profile production --platform android --local"
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"@expo-google-fonts/space-grotesk": "^0.4.0",
|
|
60
|
+
"@expo/metro-runtime": "~5.0.4",
|
|
61
|
+
"@parse/react-native": "^0.0.1-alpha.18",
|
|
62
|
+
"@react-native-async-storage/async-storage": "^2.2.0",
|
|
63
|
+
"@react-navigation/bottom-tabs": "^7.2.0",
|
|
64
|
+
"@react-navigation/native": "^7.0.14",
|
|
65
|
+
"@react-navigation/native-stack": "^7.2.0",
|
|
66
|
+
"@shopify/flash-list": "1.8.1",
|
|
67
|
+
"@types/jwt-decode": "^3.1.0",
|
|
68
|
+
"@types/parse": "^3.0.9",
|
|
69
|
+
"@types/react-native-keychain": "^3.1.0",
|
|
70
|
+
"apisauce": "3.1.1",
|
|
71
|
+
"date-fns": "^4.1.0",
|
|
72
|
+
"expo": "^53.0.15",
|
|
73
|
+
"expo-application": "~6.1.4",
|
|
74
|
+
"expo-auth-session": "~6.2.1",
|
|
75
|
+
"expo-build-properties": "~0.14.6",
|
|
76
|
+
"expo-crypto": "~14.1.5",
|
|
77
|
+
"expo-dev-client": "~5.2.1",
|
|
78
|
+
"expo-font": "~13.3.0",
|
|
79
|
+
"expo-linking": "~7.1.4",
|
|
80
|
+
"expo-localization": "~16.1.5",
|
|
81
|
+
"expo-splash-screen": "~0.30.9",
|
|
82
|
+
"expo-system-ui": "~5.0.9",
|
|
83
|
+
"expo-web-browser": "~14.2.0",
|
|
84
|
+
"i18next": "^23.14.0",
|
|
85
|
+
"intl-pluralrules": "^2.0.1",
|
|
86
|
+
"jwt-decode": "^4.0.0",
|
|
87
|
+
"mobx-react-lite": "^4.1.0",
|
|
88
|
+
"parse": "^6.1.1",
|
|
89
|
+
"react": "19.0.0",
|
|
90
|
+
"react-dom": "19.0.0",
|
|
91
|
+
"react-i18next": "^15.0.1",
|
|
92
|
+
"react-native": "0.79.4",
|
|
93
|
+
"react-native-drawer-layout": "^4.0.1",
|
|
94
|
+
"react-native-edge-to-edge": "1.6.0",
|
|
95
|
+
"react-native-gesture-handler": "~2.24.0",
|
|
96
|
+
"react-native-get-random-values": "^1.11.0",
|
|
97
|
+
"react-native-keyboard-controller": "^1.12.7",
|
|
98
|
+
"react-native-keychain": "^10.0.0",
|
|
99
|
+
"react-native-mmkv": "^3.2.0",
|
|
100
|
+
"react-native-reanimated": "~3.17.4",
|
|
101
|
+
"react-native-safe-area-context": "5.4.0",
|
|
102
|
+
"react-native-screens": "~4.11.1",
|
|
103
|
+
"react-native-web": "^0.20.0"
|
|
104
|
+
},
|
|
105
|
+
"devDependencies": {
|
|
106
|
+
"@babel/core": "^7.20.0",
|
|
107
|
+
"@babel/preset-env": "^7.20.0",
|
|
108
|
+
"@babel/runtime": "^7.20.0",
|
|
109
|
+
"@react-native-community/cli": "latest",
|
|
110
|
+
"@testing-library/react-native": "^13.2.0",
|
|
111
|
+
"@types/jest": "^29.5.14",
|
|
112
|
+
"@types/react": "~19.0.10",
|
|
113
|
+
"babel-jest": "^29.2.1",
|
|
114
|
+
"chalk": "^4.1.2",
|
|
115
|
+
"commander": "^11.1.0",
|
|
116
|
+
"eslint": "^8.57.0",
|
|
117
|
+
"eslint-config-expo": "~9.2.0",
|
|
118
|
+
"eslint-config-prettier": "^9.1.0",
|
|
119
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
120
|
+
"eslint-plugin-react-native": "^4.1.0",
|
|
121
|
+
"eslint-plugin-reactotron": "^0.1.2",
|
|
122
|
+
"fs-extra": "^11.3.3",
|
|
123
|
+
"jest": "~29.7.0",
|
|
124
|
+
"jest-expo": "~53.0.7",
|
|
125
|
+
"ora": "^5.4.1",
|
|
126
|
+
"prettier": "^3.3.3",
|
|
127
|
+
"react-test-renderer": "19.0.0",
|
|
128
|
+
"reactotron-core-client": "^2.9.4",
|
|
129
|
+
"reactotron-react-js": "^3.3.11",
|
|
130
|
+
"reactotron-react-native": "^5.0.5",
|
|
131
|
+
"reactotron-react-native-mmkv": "^0.2.6",
|
|
132
|
+
"ts-jest": "^29.1.1",
|
|
133
|
+
"ts-node": "^10.9.2",
|
|
134
|
+
"typescript": "~5.8.3"
|
|
135
|
+
},
|
|
136
|
+
"engines": {
|
|
137
|
+
"node": ">=18.0.0"
|
|
138
|
+
},
|
|
139
|
+
"files": [
|
|
140
|
+
"bin/",
|
|
141
|
+
"app/",
|
|
142
|
+
"assets/",
|
|
143
|
+
"ignite/",
|
|
144
|
+
"plugins/",
|
|
145
|
+
"types/",
|
|
146
|
+
"src/",
|
|
147
|
+
"test/",
|
|
148
|
+
"index.tsx",
|
|
149
|
+
"app.config.ts",
|
|
150
|
+
"app.json",
|
|
151
|
+
"babel.config.js",
|
|
152
|
+
"metro.config.js",
|
|
153
|
+
"tsconfig.json",
|
|
154
|
+
"jest.config.js",
|
|
155
|
+
"README.md",
|
|
156
|
+
"LICENSE",
|
|
157
|
+
"CONTRIBUTING.md"
|
|
158
|
+
],
|
|
159
|
+
"expo": {
|
|
160
|
+
"install": {
|
|
161
|
+
"exclude": [
|
|
162
|
+
"@shopify/flash-list"
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|