create-twinbloc-app 0.1.7 → 0.1.9
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/README.md +1 -1
- package/bin/cli.js +18 -13
- package/package.json +1 -1
- package/template/react-native-starter/.github/dependabot.yml +10 -0
- package/template/react-native-starter/.github/labeler.yml +29 -0
- package/template/react-native-starter/.github/release-drafter.yml +36 -0
- package/template/react-native-starter/.github/workflows/ci.yml +38 -0
- package/template/react-native-starter/.github/workflows/codeql.yml +56 -0
- package/template/react-native-starter/.github/workflows/commitlint.yml +28 -0
- package/template/react-native-starter/.github/workflows/dependency-review.yml +17 -0
- package/template/react-native-starter/.github/workflows/expo-doctor.yml +34 -0
- package/template/react-native-starter/.github/workflows/labeler.yml +12 -0
- package/template/react-native-starter/.github/workflows/release-drafter.yml +27 -0
- package/template/react-native-starter/.husky/commit-msg +1 -0
- package/template/react-native-starter/.husky/post-merge +18 -0
- package/template/react-native-starter/.husky/pre-commit +1 -0
- package/template/react-native-starter/.maestro/auth/onboarding.yaml +14 -0
- package/template/react-native-starter/.maestro/config.yaml +7 -0
- package/template/react-native-starter/.vscode/extensions.json +18 -1
- package/template/react-native-starter/.vscode/project.code-snippets +161 -0
- package/template/react-native-starter/.vscode/settings.json +44 -4
- package/template/react-native-starter/README.md +2 -2
- package/template/react-native-starter/babel.config.js +12 -2
- package/template/react-native-starter/commitlint.config.js +1 -0
- package/template/react-native-starter/eas.json +20 -0
- package/template/react-native-starter/eslint.config.js +205 -32
- package/template/react-native-starter/jest.config.js +5 -2
- package/template/react-native-starter/jest.setup.js +15 -8
- package/template/react-native-starter/metro.config.js +4 -4
- package/template/react-native-starter/package.json +43 -5
- package/template/react-native-starter/pnpm-lock.yaml +13025 -0
- package/template/react-native-starter/src/api/common/__tests__/api-provider.test.tsx +6 -2
- package/template/react-native-starter/src/api/common/__tests__/api-utils.test.ts +27 -5
- package/template/react-native-starter/src/api/common/__tests__/execute-client.test.ts +8 -4
- package/template/react-native-starter/src/api/common/api-provider.tsx +9 -3
- package/template/react-native-starter/src/api/common/api-utils.ts +72 -16
- package/template/react-native-starter/src/api/common/execute-client.ts +30 -11
- package/template/react-native-starter/src/api/common/index.ts +1 -1
- package/template/react-native-starter/src/app/(main)/_layout.tsx +2 -1
- package/template/react-native-starter/src/app/(main)/index.tsx +36 -206
- package/template/react-native-starter/src/app/+html.tsx +1 -1
- package/template/react-native-starter/src/app/[...messing].tsx +4 -2
- package/template/react-native-starter/src/app/_layout.tsx +7 -6
- package/template/react-native-starter/src/app/onboarding.tsx +5 -3
- package/template/react-native-starter/src/components/providers/index.tsx +35 -5
- package/template/react-native-starter/src/components/ui/__tests__/ui-basic.test.tsx +79 -19
- package/template/react-native-starter/src/components/ui/__tests__/ui-forms.test.tsx +31 -8
- package/template/react-native-starter/src/components/ui/accordion.tsx +37 -5
- package/template/react-native-starter/src/components/ui/avatar.tsx +86 -14
- package/template/react-native-starter/src/components/ui/bottom-sheet.tsx +65 -43
- package/template/react-native-starter/src/components/ui/button.tsx +52 -28
- package/template/react-native-starter/src/components/ui/check-box.tsx +29 -5
- package/template/react-native-starter/src/components/ui/container.tsx +28 -6
- package/template/react-native-starter/src/components/ui/icon.tsx +10 -3
- package/template/react-native-starter/src/components/ui/image.tsx +18 -7
- package/template/react-native-starter/src/components/ui/index.ts +8 -7
- package/template/react-native-starter/src/components/ui/input-view.tsx +9 -2
- package/template/react-native-starter/src/components/ui/input.tsx +43 -22
- package/template/react-native-starter/src/components/ui/progress-bar.tsx +70 -39
- package/template/react-native-starter/src/components/ui/radio.tsx +20 -4
- package/template/react-native-starter/src/components/ui/safe-fast-image.tsx +8 -2
- package/template/react-native-starter/src/components/ui/select.tsx +99 -25
- package/template/react-native-starter/src/components/ui/separator.tsx +26 -0
- package/template/react-native-starter/src/components/ui/stacks.tsx +13 -4
- package/template/react-native-starter/src/components/ui/switch.tsx +23 -9
- package/template/react-native-starter/src/components/ui/text.tsx +58 -16
- package/template/react-native-starter/src/components/ui/toggle-shared.tsx +12 -2
- package/template/react-native-starter/src/components/ui/view.tsx +105 -0
- package/template/react-native-starter/src/components/utilities/confirm-dialog.tsx +31 -10
- package/template/react-native-starter/src/components/utilities/show-toast.ts +45 -10
- package/template/react-native-starter/src/components/utilities/ui-utils.tsx +1 -1
- package/template/react-native-starter/src/global.css +150 -0
- package/template/react-native-starter/src/hooks/general/use-countdown.ts +5 -1
- package/template/react-native-starter/src/hooks/general/use-is-first-time.tsx +4 -1
- package/template/react-native-starter/src/hooks/general/{use-select-theme.ts → use-selected-theme.ts} +18 -9
- package/template/react-native-starter/src/hooks/general/use-theme.tsx +28 -11
- package/template/react-native-starter/src/lib/app-initializer.ts +6 -1
- package/template/react-native-starter/src/lib/env.ts +4 -1
- package/template/react-native-starter/src/lib/i18n/__tests__/index.test.ts +19 -3
- package/template/react-native-starter/src/lib/i18n/__tests__/utils.test.ts +14 -3
- package/template/react-native-starter/src/lib/i18n/react-i18next.d.ts +3 -3
- package/template/react-native-starter/src/lib/i18n/types.ts +1 -0
- package/template/react-native-starter/src/lib/i18n/utils.tsx +12 -6
- package/template/react-native-starter/src/lib/utils/__tests__/secure-store.test.ts +10 -3
- package/template/react-native-starter/src/lib/utils/__tests__/storage.test.ts +38 -11
- package/template/react-native-starter/src/lib/utils/blurhash.ts +10 -2
- package/template/react-native-starter/src/lib/utils/format-currency.ts +5 -1
- package/template/react-native-starter/src/lib/utils/rate-app.ts +10 -4
- package/template/react-native-starter/src/lib/utils/secure-store.ts +12 -12
- package/template/react-native-starter/src/lib/utils/storage.ts +9 -4
- package/template/react-native-starter/src/lib/utils/toast-config.ts +2 -1
- package/template/react-native-starter/src/store/auth/index.ts +15 -7
- package/template/react-native-starter/src/store/auth/utils.ts +7 -2
- package/template/react-native-starter/src/store/store-utils.ts +8 -3
- package/template/react-native-starter/src/store/utility/index.tsx +7 -3
- package/template/react-native-starter/src/types/eslint-plugins.d.ts +7 -0
- package/template/react-native-starter/src/types/expo-asset.d.ts +2 -0
- package/template/react-native-starter/tsconfig.json +19 -7
- package/template/react-native-starter/uniwind-types.d.ts +10 -0
- package/template/react-native-starter/global.css +0 -3
- package/template/react-native-starter/nativewind-env.d.ts +0 -3
- package/template/react-native-starter/package-lock.json +0 -17124
- package/template/react-native-starter/src/store/useCounterStore.ts +0 -15
- package/template/react-native-starter/tailwind.config.js +0 -18
package/README.md
CHANGED
package/bin/cli.js
CHANGED
|
@@ -69,10 +69,11 @@ const runInstall = (dir, pm) => {
|
|
|
69
69
|
const brandPrimary = chalk.hex("#6CABDD");
|
|
70
70
|
const brandDeep = chalk.hex("#1C2C5B");
|
|
71
71
|
const rnBlue = chalk.hex("#61DAFB");
|
|
72
|
-
const uiMuted = chalk.
|
|
73
|
-
const uiAccent = chalk.hex("#
|
|
74
|
-
const uiActive = chalk.hex("#
|
|
75
|
-
const uiSelected = chalk.hex("#
|
|
72
|
+
const uiMuted = chalk.hex("#A0A0A0");
|
|
73
|
+
const uiAccent = chalk.hex("#00F0FF");
|
|
74
|
+
const uiActive = chalk.hex("#FFFFFF");
|
|
75
|
+
const uiSelected = chalk.hex("#00FF9D");
|
|
76
|
+
const uiHighlight = chalk.hex("#FF79C6");
|
|
76
77
|
|
|
77
78
|
const printBanner = () => {
|
|
78
79
|
const lines = [
|
|
@@ -118,7 +119,7 @@ const getExistingAgentKeys = async (rootDir) => {
|
|
|
118
119
|
const renderAgentSelectionHeader = () => {
|
|
119
120
|
output.write("\x1b[2J\x1b[0;0H");
|
|
120
121
|
printBanner();
|
|
121
|
-
console.log(
|
|
122
|
+
console.log(uiHighlight.bold("Select agent configs"));
|
|
122
123
|
console.log(uiMuted("↑/↓ move · space toggle · enter confirm · empty = none"));
|
|
123
124
|
console.log("");
|
|
124
125
|
};
|
|
@@ -136,7 +137,7 @@ const renderAgentSelectionList = (choices, selectedKeys, activeIndex, { resetCur
|
|
|
136
137
|
const label = isSelected ? uiSelected.bold(choice.label) : uiAccent(choice.label);
|
|
137
138
|
const line = ` ${pointer} ${mark} ${label}`;
|
|
138
139
|
if (isActive) {
|
|
139
|
-
console.log(chalk.bgHex("#0F2438").hex("#
|
|
140
|
+
console.log(chalk.bgHex("#0F2438").hex("#FFFFFF")(line));
|
|
140
141
|
return;
|
|
141
142
|
}
|
|
142
143
|
console.log(line);
|
|
@@ -251,28 +252,32 @@ const main = async () => {
|
|
|
251
252
|
await fs.writeJson(targetPackageJson, pkg, { spaces: 2 });
|
|
252
253
|
}
|
|
253
254
|
|
|
255
|
+
const pm = detectPackageManager();
|
|
256
|
+
|
|
254
257
|
if (!options.skipInstall) {
|
|
255
|
-
const pm = detectPackageManager();
|
|
256
258
|
if (pm === "bun") {
|
|
257
259
|
await cleanLockfilesForBun(targetDir);
|
|
258
260
|
}
|
|
259
261
|
runInstall(targetDir, pm);
|
|
260
262
|
}
|
|
261
263
|
|
|
264
|
+
const runCommand = pm === "npm" ? "npm run" : pm;
|
|
265
|
+
const execCommand = pm === "npm" ? "npx" : pm;
|
|
266
|
+
|
|
262
267
|
printBanner();
|
|
263
268
|
console.log(
|
|
264
269
|
[
|
|
265
|
-
|
|
270
|
+
uiSelected.bold("Project created successfully."),
|
|
266
271
|
"",
|
|
267
272
|
uiMuted(`Agent configs: ${selectedLabels.length > 0 ? selectedLabels.join(", ") : "none"}`),
|
|
268
273
|
"",
|
|
269
|
-
|
|
274
|
+
uiHighlight("Next steps"),
|
|
270
275
|
uiAccent(` cd ${appName}`),
|
|
271
|
-
options.skipInstall ? uiAccent(
|
|
272
|
-
uiAccent(
|
|
276
|
+
options.skipInstall ? uiAccent(` ${pm} install`) : null,
|
|
277
|
+
uiAccent(` ${runCommand} start`),
|
|
273
278
|
"",
|
|
274
|
-
|
|
275
|
-
uiMuted(
|
|
279
|
+
uiHighlight("Then"),
|
|
280
|
+
uiMuted(` - Build a dev client (if you haven’t): ${execCommand} expo run:ios / ${execCommand} expo run:android`),
|
|
276
281
|
uiMuted(" - Open the app from the dev client on your device or simulator"),
|
|
277
282
|
]
|
|
278
283
|
.filter(Boolean)
|
package/package.json
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Add 'documentation' label to any changes within 'docs' folder or any .md file
|
|
2
|
+
documentation:
|
|
3
|
+
- changed-files:
|
|
4
|
+
- any-glob-to-any-file:
|
|
5
|
+
- '**/*.md'
|
|
6
|
+
- 'docs/**'
|
|
7
|
+
|
|
8
|
+
# Add 'source' label to any changes within 'src' folder
|
|
9
|
+
source:
|
|
10
|
+
- changed-files:
|
|
11
|
+
- any-glob-to-any-file:
|
|
12
|
+
- 'src/**'
|
|
13
|
+
|
|
14
|
+
# Add 'tests' label to any changes to test files
|
|
15
|
+
tests:
|
|
16
|
+
- changed-files:
|
|
17
|
+
- any-glob-to-any-file:
|
|
18
|
+
- '**/*.test.ts'
|
|
19
|
+
- '**/*.test.tsx'
|
|
20
|
+
- '**/__tests__/**'
|
|
21
|
+
|
|
22
|
+
# Add 'config' label to any changes to config files
|
|
23
|
+
config:
|
|
24
|
+
- changed-files:
|
|
25
|
+
- any-glob-to-any-file:
|
|
26
|
+
- '*.config.js'
|
|
27
|
+
- '*.json'
|
|
28
|
+
- '.github/**'
|
|
29
|
+
- '.vscode/**'
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name-template: 'v$RESOLVED_VERSION'
|
|
2
|
+
tag-template: 'v$RESOLVED_VERSION'
|
|
3
|
+
categories:
|
|
4
|
+
- title: '🚀 Features'
|
|
5
|
+
labels:
|
|
6
|
+
- 'feature'
|
|
7
|
+
- 'feat'
|
|
8
|
+
- title: '🐛 Bug Fixes'
|
|
9
|
+
labels:
|
|
10
|
+
- 'fix'
|
|
11
|
+
- 'bug'
|
|
12
|
+
- title: '🧰 Maintenance'
|
|
13
|
+
labels:
|
|
14
|
+
- 'chore'
|
|
15
|
+
- 'dependencies'
|
|
16
|
+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
|
|
17
|
+
version-resolver:
|
|
18
|
+
major:
|
|
19
|
+
labels:
|
|
20
|
+
- 'major'
|
|
21
|
+
minor:
|
|
22
|
+
labels:
|
|
23
|
+
- 'minor'
|
|
24
|
+
- 'feature'
|
|
25
|
+
- 'feat'
|
|
26
|
+
patch:
|
|
27
|
+
labels:
|
|
28
|
+
- 'patch'
|
|
29
|
+
- 'fix'
|
|
30
|
+
- 'bug'
|
|
31
|
+
- 'chore'
|
|
32
|
+
default: patch
|
|
33
|
+
template: |
|
|
34
|
+
## Changes
|
|
35
|
+
|
|
36
|
+
$CHANGES
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
quality:
|
|
11
|
+
name: Lint, Typecheck, and Test
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout
|
|
15
|
+
uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Install pnpm
|
|
18
|
+
uses: pnpm/action-setup@v4
|
|
19
|
+
with:
|
|
20
|
+
run_install: false
|
|
21
|
+
|
|
22
|
+
- name: Setup Node.js
|
|
23
|
+
uses: actions/setup-node@v4
|
|
24
|
+
with:
|
|
25
|
+
node-version: 22
|
|
26
|
+
cache: 'pnpm'
|
|
27
|
+
|
|
28
|
+
- name: Install dependencies
|
|
29
|
+
run: pnpm install --frozen-lockfile
|
|
30
|
+
|
|
31
|
+
- name: Lint
|
|
32
|
+
run: pnpm lint
|
|
33
|
+
|
|
34
|
+
- name: Typecheck
|
|
35
|
+
run: pnpm typecheck
|
|
36
|
+
|
|
37
|
+
- name: Test
|
|
38
|
+
run: pnpm test
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
name: "CodeQL"
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ "main" ]
|
|
6
|
+
pull_request:
|
|
7
|
+
# The branches below must be a subset of the branches above
|
|
8
|
+
branches: [ "main" ]
|
|
9
|
+
schedule:
|
|
10
|
+
- cron: '27 7 * * 3'
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
analyze:
|
|
14
|
+
name: Analyze
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
permissions:
|
|
17
|
+
actions: read
|
|
18
|
+
contents: read
|
|
19
|
+
security-events: write
|
|
20
|
+
|
|
21
|
+
strategy:
|
|
22
|
+
fail-fast: false
|
|
23
|
+
matrix:
|
|
24
|
+
language: [ 'javascript-typescript' ]
|
|
25
|
+
|
|
26
|
+
steps:
|
|
27
|
+
- name: Checkout repository
|
|
28
|
+
uses: actions/checkout@v4
|
|
29
|
+
|
|
30
|
+
- name: Initialize CodeQL
|
|
31
|
+
uses: github/codeql-action/init@v3
|
|
32
|
+
with:
|
|
33
|
+
languages: ${{ matrix.language }}
|
|
34
|
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
|
35
|
+
# By default, queries listed here will override any specified in a config file.
|
|
36
|
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
|
37
|
+
|
|
38
|
+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
|
|
39
|
+
# If this step fails, then you should remove it and run the build manually (see below)
|
|
40
|
+
- name: Autobuild
|
|
41
|
+
uses: github/codeql-action/autobuild@v3
|
|
42
|
+
|
|
43
|
+
# ℹ️ Command-line programs to run using the OS shell.
|
|
44
|
+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
|
45
|
+
|
|
46
|
+
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
|
47
|
+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
|
48
|
+
|
|
49
|
+
# - run: |
|
|
50
|
+
# echo "Run, Build Application using script"
|
|
51
|
+
# ./location_of_script_within_repo/buildscript.sh
|
|
52
|
+
|
|
53
|
+
- name: Perform CodeQL Analysis
|
|
54
|
+
uses: github/codeql-action/analyze@v3
|
|
55
|
+
with:
|
|
56
|
+
category: "/language:${{matrix.language}}"
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: Commit Lint
|
|
2
|
+
|
|
3
|
+
on: [pull_request]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
lint:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- uses: actions/checkout@v4
|
|
10
|
+
with:
|
|
11
|
+
fetch-depth: 0
|
|
12
|
+
|
|
13
|
+
- name: Install pnpm
|
|
14
|
+
uses: pnpm/action-setup@v4
|
|
15
|
+
with:
|
|
16
|
+
run_install: false
|
|
17
|
+
|
|
18
|
+
- name: Setup Node.js
|
|
19
|
+
uses: actions/setup-node@v4
|
|
20
|
+
with:
|
|
21
|
+
node-version: 22
|
|
22
|
+
cache: 'pnpm'
|
|
23
|
+
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: pnpm install --frozen-lockfile
|
|
26
|
+
|
|
27
|
+
- name: Validate Commits
|
|
28
|
+
run: pnpm exec commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
name: Dependency Review
|
|
2
|
+
|
|
3
|
+
on: [pull_request]
|
|
4
|
+
|
|
5
|
+
permissions:
|
|
6
|
+
contents: read
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
dependency-review:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- name: Checkout
|
|
13
|
+
uses: actions/checkout@v4
|
|
14
|
+
- name: Dependency Review
|
|
15
|
+
uses: actions/dependency-review-action@v4
|
|
16
|
+
with:
|
|
17
|
+
fail-on-severity: high
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: Expo Doctor
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
schedule:
|
|
9
|
+
- cron: '0 0 * * 0' # Weekly check
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
doctor:
|
|
13
|
+
name: Expo Doctor
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- name: Checkout
|
|
17
|
+
uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Install pnpm
|
|
20
|
+
uses: pnpm/action-setup@v4
|
|
21
|
+
with:
|
|
22
|
+
run_install: false
|
|
23
|
+
|
|
24
|
+
- name: Setup Node.js
|
|
25
|
+
uses: actions/setup-node@v4
|
|
26
|
+
with:
|
|
27
|
+
node-version: 22
|
|
28
|
+
cache: 'pnpm'
|
|
29
|
+
|
|
30
|
+
- name: Install dependencies
|
|
31
|
+
run: pnpm install --frozen-lockfile
|
|
32
|
+
|
|
33
|
+
- name: Run Expo Doctor
|
|
34
|
+
run: npx expo-doctor
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: Release Drafter
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
# branches to consider in the event; optional, defaults to all
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
# pull_request event is required only for autolabeler
|
|
9
|
+
pull_request:
|
|
10
|
+
types: [opened, reopened, synchronize]
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
update_release_draft:
|
|
17
|
+
permissions:
|
|
18
|
+
# write permission is required to create a github release
|
|
19
|
+
contents: write
|
|
20
|
+
# write permission is required for autolabeler
|
|
21
|
+
pull-requests: write
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
steps:
|
|
24
|
+
# (Optional) GitHub Enterprise requires GITHUB_TOKEN permissions
|
|
25
|
+
- uses: release-drafter/release-drafter@v6
|
|
26
|
+
env:
|
|
27
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pnpm commitlint --edit $1
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
function changed {
|
|
4
|
+
git diff --name-only HEAD@{1} HEAD | grep "^$1" >/dev/null 2>&1
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
echo 'Checking for changes in pnpm-lock.yml...'
|
|
8
|
+
|
|
9
|
+
if changed 'pnpm-lock.yml'; then
|
|
10
|
+
echo "📦 pnpm-lock.yml changed. Run pnpm install to bring your dependencies up to date."
|
|
11
|
+
pnpm install
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
echo 'You are up to date :)'
|
|
15
|
+
|
|
16
|
+
echo 'If necessary, you can run pnpm prebuild to generate native code.'
|
|
17
|
+
|
|
18
|
+
exit 0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pnpm exec lint-staged
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
appId: ${APP_ID}
|
|
2
|
+
---
|
|
3
|
+
- launchApp:
|
|
4
|
+
clearState: true
|
|
5
|
+
- extendedWaitUntil:
|
|
6
|
+
visible:
|
|
7
|
+
id: "onboarding-button"
|
|
8
|
+
timeout: 10000
|
|
9
|
+
- assertVisible:
|
|
10
|
+
id: "onboarding-button"
|
|
11
|
+
- tapOn:
|
|
12
|
+
id: "onboarding-button"
|
|
13
|
+
- assertVisible:
|
|
14
|
+
id: "app-reset-button"
|
|
@@ -1 +1,18 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"recommendations": [
|
|
3
|
+
"dbaeumer.vscode-eslint",
|
|
4
|
+
"esbenp.prettier-vscode",
|
|
5
|
+
"yoavbls.pretty-ts-errors",
|
|
6
|
+
"mikestead.dotenv",
|
|
7
|
+
"eamodio.gitlens",
|
|
8
|
+
"streetsidesoftware.code-spell-checker",
|
|
9
|
+
"formulahendry.auto-close-tag",
|
|
10
|
+
"formulahendry.auto-rename-tag",
|
|
11
|
+
"bradlc.vscode-tailwindcss",
|
|
12
|
+
"lokalise.i18n-ally",
|
|
13
|
+
"wesbos.theme-cobalt2",
|
|
14
|
+
"ChakrounAnas.turbo-console-log",
|
|
15
|
+
"expo.vscode-expo-tools",
|
|
16
|
+
"mobile-dev-inc.maestro-vscode"
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
{
|
|
2
|
+
"View": {
|
|
3
|
+
"prefix": "v",
|
|
4
|
+
"body": [
|
|
5
|
+
"<View className=\"flex-1 items-center justify-center\">",
|
|
6
|
+
" $1",
|
|
7
|
+
"</View>"
|
|
8
|
+
],
|
|
9
|
+
"description": "A Simple View "
|
|
10
|
+
},
|
|
11
|
+
"Text": {
|
|
12
|
+
"prefix": "t",
|
|
13
|
+
"body": [
|
|
14
|
+
"<Text className=\"text-center text-base\">",
|
|
15
|
+
" $1",
|
|
16
|
+
"</Text>"
|
|
17
|
+
],
|
|
18
|
+
"description": "A Simple Text"
|
|
19
|
+
},
|
|
20
|
+
"export *": {
|
|
21
|
+
"prefix": "ex *",
|
|
22
|
+
"body": [
|
|
23
|
+
"export * from '.$1';"
|
|
24
|
+
],
|
|
25
|
+
"description": "export *"
|
|
26
|
+
},
|
|
27
|
+
"Component": {
|
|
28
|
+
"prefix": "comp",
|
|
29
|
+
"body": [
|
|
30
|
+
"import * as React from 'react';",
|
|
31
|
+
"",
|
|
32
|
+
"import { Text, View } from '@/components/ui';",
|
|
33
|
+
"",
|
|
34
|
+
"type Props = {",
|
|
35
|
+
" $2",
|
|
36
|
+
"};",
|
|
37
|
+
"export const ${1:CompName} = ({}: Props) => {",
|
|
38
|
+
" return (",
|
|
39
|
+
" <View className=\"flex-1\">",
|
|
40
|
+
" <Text className=\"text-base\">${1:CompName} Component</Text>",
|
|
41
|
+
" </View>",
|
|
42
|
+
" );",
|
|
43
|
+
"};",
|
|
44
|
+
""
|
|
45
|
+
],
|
|
46
|
+
"description": "Component"
|
|
47
|
+
},
|
|
48
|
+
"useQuery with variables": {
|
|
49
|
+
"prefix": "useqv",
|
|
50
|
+
"body": [
|
|
51
|
+
"import { useQuery } from '@tanstack/react-query';",
|
|
52
|
+
"import type { AxiosError } from 'axios';",
|
|
53
|
+
"",
|
|
54
|
+
"import { client } from '@/api/common/execute-client';",
|
|
55
|
+
"",
|
|
56
|
+
"type Variables = {$3};",
|
|
57
|
+
"type Response = {$4};",
|
|
58
|
+
"",
|
|
59
|
+
"export const use$1 = (variables: Variables) => {",
|
|
60
|
+
" return useQuery<Response, AxiosError>({",
|
|
61
|
+
" queryKey: ['$2', variables],",
|
|
62
|
+
" queryFn: () => {",
|
|
63
|
+
" return client",
|
|
64
|
+
" .get(`$2/\\${variables.${5}}`)",
|
|
65
|
+
" .then((response) => response.data);",
|
|
66
|
+
" },",
|
|
67
|
+
" });",
|
|
68
|
+
"};",
|
|
69
|
+
""
|
|
70
|
+
],
|
|
71
|
+
"description": "useQuery with variables"
|
|
72
|
+
},
|
|
73
|
+
"useQuery": {
|
|
74
|
+
"prefix": "useq",
|
|
75
|
+
"body": [
|
|
76
|
+
"import { useQuery } from '@tanstack/react-query';",
|
|
77
|
+
"import type { AxiosError } from 'axios';",
|
|
78
|
+
"",
|
|
79
|
+
"import { client } from '@/api/common/execute-client';",
|
|
80
|
+
"",
|
|
81
|
+
"type Response = {$3};",
|
|
82
|
+
"",
|
|
83
|
+
"export const use$1 = () => {",
|
|
84
|
+
" return useQuery<Response, AxiosError>({",
|
|
85
|
+
" queryKey: ['$2'],",
|
|
86
|
+
" queryFn: () => {",
|
|
87
|
+
" return client.get(`$2`).then((response) => response.data);",
|
|
88
|
+
" },",
|
|
89
|
+
" });",
|
|
90
|
+
"};",
|
|
91
|
+
""
|
|
92
|
+
],
|
|
93
|
+
"description": "useQuery"
|
|
94
|
+
},
|
|
95
|
+
"useInfiniteQuery": {
|
|
96
|
+
"prefix": "useiq",
|
|
97
|
+
"body": [
|
|
98
|
+
"import { useInfiniteQuery } from '@tanstack/react-query';",
|
|
99
|
+
"import type { AxiosError } from 'axios';",
|
|
100
|
+
"",
|
|
101
|
+
"import { client } from '@/api/common/execute-client';",
|
|
102
|
+
"import { DEFAULT_LIMIT, getNextPageParam } from '@/api/common/api-utils';",
|
|
103
|
+
"import type { PaginateQuery } from '@/api/common/types';",
|
|
104
|
+
"",
|
|
105
|
+
"type Response = {$3};",
|
|
106
|
+
"",
|
|
107
|
+
"export const use$1 = () => {",
|
|
108
|
+
" return useInfiniteQuery<PaginateQuery<Response>, AxiosError>({",
|
|
109
|
+
" queryKey: ['$2'],",
|
|
110
|
+
" initialPageParam: 0,",
|
|
111
|
+
" getNextPageParam,",
|
|
112
|
+
" queryFn: ({ pageParam }) => {",
|
|
113
|
+
" return client",
|
|
114
|
+
" .get(`$2`, {",
|
|
115
|
+
" params: {",
|
|
116
|
+
" limit: DEFAULT_LIMIT,",
|
|
117
|
+
" offset: pageParam,",
|
|
118
|
+
" },",
|
|
119
|
+
" })",
|
|
120
|
+
" .then((response) => response.data);",
|
|
121
|
+
" },",
|
|
122
|
+
" });",
|
|
123
|
+
"};",
|
|
124
|
+
""
|
|
125
|
+
],
|
|
126
|
+
"description": "useInfiniteQuery"
|
|
127
|
+
},
|
|
128
|
+
"useMutation": {
|
|
129
|
+
"prefix": "usem",
|
|
130
|
+
"body": [
|
|
131
|
+
"import { useMutation } from '@tanstack/react-query';",
|
|
132
|
+
"import type { AxiosError } from 'axios';",
|
|
133
|
+
"",
|
|
134
|
+
"import { client } from '@/api/common/execute-client';",
|
|
135
|
+
"",
|
|
136
|
+
"type Variables = {$3};",
|
|
137
|
+
"type Response = {$4};",
|
|
138
|
+
"",
|
|
139
|
+
"export const use$1 = () => {",
|
|
140
|
+
" return useMutation<Response, AxiosError, Variables>({",
|
|
141
|
+
" mutationFn: (variables) =>",
|
|
142
|
+
" client({",
|
|
143
|
+
" url: '$2',",
|
|
144
|
+
" method: 'POST',",
|
|
145
|
+
" data: variables,",
|
|
146
|
+
" }).then((response) => response.data),",
|
|
147
|
+
" });",
|
|
148
|
+
"};",
|
|
149
|
+
""
|
|
150
|
+
],
|
|
151
|
+
"description": "useMutation"
|
|
152
|
+
},
|
|
153
|
+
"navigate": {
|
|
154
|
+
"prefix": "navigate",
|
|
155
|
+
"body": [
|
|
156
|
+
"const router = useRouter();",
|
|
157
|
+
""
|
|
158
|
+
],
|
|
159
|
+
"description": "navigate"
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -1,7 +1,47 @@
|
|
|
1
1
|
{
|
|
2
|
-
"editor.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
"
|
|
2
|
+
"editor.tabSize": 2,
|
|
3
|
+
"editor.detectIndentation": false,
|
|
4
|
+
"search.exclude": {
|
|
5
|
+
"yarn.lock": true
|
|
6
|
+
},
|
|
7
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
8
|
+
"editor.formatOnSave": true,
|
|
9
|
+
"typescript.tsdk": "node_modules/typescript/lib",
|
|
10
|
+
"eslint.format.enable": true,
|
|
11
|
+
"[javascript][typescript][typescriptreact]": {
|
|
12
|
+
"editor.formatOnSave": true,
|
|
13
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
14
|
+
"editor.codeActionsOnSave": {
|
|
15
|
+
"source.fixAll.eslint": true,
|
|
16
|
+
"source.addMissingImports": true
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"[json][jsonc]": {
|
|
20
|
+
"editor.formatOnSave": true,
|
|
21
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
22
|
+
},
|
|
23
|
+
"[astro]": {
|
|
24
|
+
"editor.formatOnSave": true,
|
|
25
|
+
"editor.defaultFormatter": "astro-build.astro-vscode"
|
|
26
|
+
},
|
|
27
|
+
"cSpell.words": [
|
|
28
|
+
"blurhash",
|
|
29
|
+
"Favorited",
|
|
30
|
+
"Flashlist",
|
|
31
|
+
"Galeria",
|
|
32
|
+
"irapada",
|
|
33
|
+
"Lato",
|
|
34
|
+
"nandorojo",
|
|
35
|
+
"partialize",
|
|
36
|
+
"Unfollowing"
|
|
37
|
+
],
|
|
38
|
+
"i18n-ally.localesPaths": ["src/translations/"],
|
|
39
|
+
"i18n-ally.keystyle": "nested",
|
|
40
|
+
"i18n-ally.disabled": false, // make sure to disable i18n-ally in your global setting and only enable it for such projects
|
|
41
|
+
"tailwindCSS.experimental.classRegex": [
|
|
42
|
+
["tv\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
|
|
43
|
+
],
|
|
44
|
+
"yaml.schemas": {
|
|
45
|
+
"http://json-schema.org/draft-07/schema": [".maestro/*.yaml"]
|
|
6
46
|
}
|
|
7
47
|
}
|