Skip to content

Commit a1c4fd6

Browse files
committed
continuous integration
2 parents 5990f29 + 68efaa2 commit a1c4fd6

186 files changed

Lines changed: 34341 additions & 6503 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.aiaccess

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
!lib/screens/creator/
2+
!lib/screens/creator.dart

.firebase/hosting.YnVpbGRcd2Vi.cache

Lines changed: 64 additions & 82 deletions
Large diffs are not rendered by default.

.firebaserc

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
{
22
"projects": {
33
"default": "homebase-6907d"
4-
}
4+
},
5+
"targets": {
6+
"default": {
7+
"hosting": [
8+
"homebase-6907d"
9+
]
10+
},
11+
"werule": {
12+
"hosting": [
13+
"werule"
14+
]
15+
},
16+
"homebase-6907d": {
17+
"hosting": {
18+
"werule": [
19+
"werule"
20+
]
21+
}
22+
}
23+
},
24+
"etags": {},
25+
"dataconnectEmulatorConfig": {}
526
}

.github/workflows/firebase-hosting-merge.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
# https://github.com/firebase/firebase-tools
33

44
name: Deploy to Firebase Hosting on merge
5-
'on':
5+
on:
66
push:
77
branches:
88
- master
99
jobs:
1010
build_and_deploy:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
14-
- run: npm run build
13+
- uses: actions/checkout@v4
14+
- run: flutter build web
1515
- uses: FirebaseExtended/action-hosting-deploy@v0
1616
with:
17-
repoToken: '${{ secrets.GITHUB_TOKEN }}'
18-
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_HOMEBASE_6907D }}'
17+
repoToken: ${{ secrets.GITHUB_TOKEN }}
18+
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_HOMEBASE_6907D }}
1919
channelId: live
2020
projectId: homebase-6907d

.github/workflows/firebase-hosting-pull-request.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,20 @@
22
# https://github.com/firebase/firebase-tools
33

44
name: Deploy to Firebase Hosting on PR
5-
'on': pull_request
5+
on: pull_request
6+
permissions:
7+
checks: write
8+
contents: read
9+
pull-requests: write
610
jobs:
711
build_and_preview:
8-
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
12+
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
913
runs-on: ubuntu-latest
1014
steps:
11-
- uses: actions/checkout@v3
12-
- run: npm run build
15+
- uses: actions/checkout@v4
16+
- run: npm ci && npm run build
1317
- uses: FirebaseExtended/action-hosting-deploy@v0
1418
with:
15-
repoToken: '${{ secrets.GITHUB_TOKEN }}'
16-
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_HOMEBASE_6907D }}'
19+
repoToken: ${{ secrets.GITHUB_TOKEN }}
20+
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_HOMEBASE_6907D }}
1721
projectId: homebase-6907d

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ migrate_working_dir/
1515
*.ipr
1616
*.iws
1717
.idea/
18-
18+
probe.py
1919
# The .vscode folder contains launch configuration and tasks you configure in
2020
# VS Code which you may wish to be included in version control, so this line
2121
# is commented out by default.

.vscode/launch.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "chrome",
9+
"request": "launch",
10+
"name": "Launch Chrome against localhost",
11+
"url": "http://localhost:8080",
12+
"webRoot": "${workspaceFolder}"
13+
}
14+
]
15+
}

README.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
1-
# homebase
1+
Parameter: new dao, Type: String
2+
js_primitives.dart:30 Parameter: SMO, Type: String
3+
js_primitives.dart:30 Parameter: something description, Type: String
4+
js_primitives.dart:30 Parameter: 2, Type: String
5+
js_primitives.dart:30 Parameter: 60, Type: String
6+
js_primitives.dart:30 Parameter: [0xa9F8F9C0bf3188cEDdb9684ae28655187552bAE9, 0xA6A40E0b6DB5a6f808703DBe91DbE50B7FC1fa3E], Type: List<String>
7+
js_primitives.dart:30 Parameter: [5000000, 3450000, 2, 3, 4000, 50], Type: List<String>
8+
js_primitives.dart:30 Parameter: [something key], Type: List<String>
9+
js_primitives.dart:30 Parameter: [something else value], Type: List<String>
210

3-
A new Flutter project.
411

5-
## Getting Started
612

7-
This project is a starting point for a Flutter application.
8-
9-
A few resources to get you started if this is your first Flutter project:
10-
11-
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
12-
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
13-
14-
For help getting started with Flutter development, view the
15-
[online documentation](https://docs.flutter.dev/), which offers tutorials,
16-
samples, guidance on mobile development, and a full API reference.
13+
Parameter: asd, Type: String
14+
js_primitives.dart:30 Parameter: RWE, Type: String
15+
js_primitives.dart:30 Parameter: 2, Type: String
16+
js_primitives.dart:30 Parameter: 60, Type: String
17+
js_primitives.dart:30 Parameter: [0xA6A40E0b6DB5a6f808703DBe91DbE50B7FC1fa3E], Type: List<String>
18+
js_primitives.dart:30 Parameter: [122, 1, 2, 3, 8], Type: List<String>
19+
js_primitives.dart:30 Parameter: [f3f3], Type: List<String>
20+
js_primitives.dart:30 Parameter: [4aa], Type: List<String>
21+
js_primitives.dart:30 nu s-a pututError: invalid value for array

aiaccess.py

Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
#!/usr/bin/env python3
2+
import os
3+
import sys
4+
from pathlib import Path
5+
from pathspec import PathSpec
6+
7+
def load_access(root_dir: Path):
8+
"""
9+
Parse .aiaccess. Lines starting with '!' are include patterns; others ignore patterns.
10+
Always ignore all '*.yaml' files anywhere and any '__pycache__/' directories anywhere.
11+
Directory patterns (ending with '/') match nested contents; bare directory names
12+
are treated as directories when included.
13+
Returns:
14+
ignore_spec: PathSpec for ignore patterns
15+
include_spec: PathSpec for include patterns
16+
include_raw: list of raw include patterns (pre-processed)
17+
has_includes: bool
18+
"""
19+
file = root_dir / '.aiaccess'
20+
ignore_lines, include_lines = [], []
21+
22+
# default global ignores
23+
ignore_lines.extend(["**/*.yaml", "**/__pycache__/"])
24+
25+
if file.exists():
26+
for line in file.read_text(encoding='utf-8').splitlines():
27+
raw = line.strip()
28+
if not raw or raw.startswith('#'):
29+
continue
30+
if raw.startswith('!'):
31+
include_lines.append(raw[1:].strip())
32+
else:
33+
ignore_lines.append(raw)
34+
35+
# detect literal conflicts
36+
conflicts = set(ignore_lines) & set(include_lines)
37+
if conflicts:
38+
print(f"Error: conflicting patterns in .aiaccess: {conflicts}")
39+
sys.exit(1)
40+
41+
# expand directory ignores
42+
def expand(lines):
43+
out = []
44+
for p in lines:
45+
if p.endswith('/'):
46+
out.append(p)
47+
out.append(p + '**')
48+
else:
49+
out.append(p)
50+
return out
51+
52+
ignore_patterns = expand(ignore_lines)
53+
include_patterns = expand(include_lines)
54+
55+
ignore_spec = PathSpec.from_lines('gitwildmatch', ignore_patterns)
56+
include_spec = PathSpec.from_lines('gitwildmatch', include_patterns)
57+
58+
include_raw = include_lines.copy()
59+
has_includes = bool(include_raw)
60+
return ignore_spec, include_spec, include_raw, has_includes
61+
62+
def compute_include_dirs(include_raw: list) -> list:
63+
"""
64+
From raw include patterns, derive a list of directories to preserve.
65+
For each pattern:
66+
- If it ends with '/', take that dir.
67+
- Else if it's a path, take its parent folder.
68+
- Else ignore (file in root).
69+
Normalize with trailing '/'.
70+
"""
71+
include_dirs = set()
72+
for p in include_raw:
73+
if p.endswith('/'):
74+
dirp = p.rstrip('/')
75+
else:
76+
parent = Path(p).parent
77+
if parent == Path('.'):
78+
continue
79+
dirp = parent.as_posix()
80+
if dirp:
81+
include_dirs.add(dirp.rstrip('/') + '/')
82+
return sorted(include_dirs)
83+
84+
def is_excluded(path: Path, root_dir: Path,
85+
ignore_spec: PathSpec, include_spec: PathSpec,
86+
include_dirs: list, has_includes: bool) -> bool:
87+
"""
88+
Exclusion logic:
89+
- root_dir never excluded
90+
- always drop paths matching ignore_spec
91+
- when whitelisting:
92+
* preserve any directory whose path is a prefix of an include_dir
93+
* drop paths not matching include_spec
94+
"""
95+
if path == root_dir:
96+
return False
97+
try:
98+
rel = path.relative_to(root_dir)
99+
except ValueError:
100+
return False
101+
rel_posix = rel.as_posix()
102+
if path.is_dir() and not rel_posix.endswith('/'):
103+
rel_posix += '/'
104+
105+
# global ignores
106+
if ignore_spec.match_file(rel_posix):
107+
return True
108+
109+
if has_includes:
110+
# preserve parent dirs of included patterns
111+
for idir in include_dirs:
112+
if rel_posix == idir or idir.startswith(rel_posix):
113+
return False
114+
# drop non-whitelisted
115+
if not include_spec.match_file(rel_posix):
116+
return True
117+
return False
118+
119+
def generate_tree_structure(root_dir: Path,
120+
ignore_spec: PathSpec, include_spec: PathSpec,
121+
include_dirs: list, has_includes: bool) -> str:
122+
tree = ""
123+
for root, dirs, files in os.walk(root_dir):
124+
current = Path(root)
125+
if is_excluded(current, root_dir,
126+
ignore_spec, include_spec,
127+
include_dirs, has_includes):
128+
continue
129+
dirs[:] = [d for d in dirs
130+
if not is_excluded(current / d, root_dir,
131+
ignore_spec, include_spec,
132+
include_dirs, has_includes)]
133+
files = [f for f in files
134+
if not is_excluded(current / f, root_dir,
135+
ignore_spec, include_spec,
136+
include_dirs, has_includes)]
137+
rel = current.relative_to(root_dir)
138+
indent = ' ' * len(rel.parts)
139+
tree += f"{indent}- {current.name}/\n"
140+
subindent = ' ' * (len(rel.parts) + 1)
141+
for f in sorted(files):
142+
tree += f"{subindent}- {f}\n"
143+
return tree
144+
145+
def write_file_contents_markdown(root_dir: Path,
146+
ignore_spec: PathSpec, include_spec: PathSpec,
147+
include_dirs: list, has_includes: bool) -> str:
148+
md = ""
149+
for root, dirs, files in os.walk(root_dir):
150+
current = Path(root)
151+
dirs[:] = [d for d in dirs
152+
if not is_excluded(current / d, root_dir,
153+
ignore_spec, include_spec,
154+
include_dirs, has_includes)]
155+
if is_excluded(current, root_dir,
156+
ignore_spec, include_spec,
157+
include_dirs, has_includes):
158+
continue
159+
for filename in sorted(files):
160+
file_path = current / filename
161+
if is_excluded(file_path, root_dir,
162+
ignore_spec, include_spec,
163+
include_dirs, has_includes):
164+
continue
165+
rel_path = file_path.relative_to(root_dir).as_posix()
166+
ext = file_path.suffix.lstrip('.') or 'txt'
167+
md += f"\n### `{rel_path}`\n```{ext}\n"
168+
try:
169+
md += file_path.read_text(encoding='utf-8')
170+
except Exception as e:
171+
md += f"# could not read file: {e}\n"
172+
md += "\n```\n"
173+
return md
174+
175+
def main():
176+
script_path = Path(__file__).resolve()
177+
root_dir = script_path.parent
178+
179+
ignore_spec, include_spec, include_raw, has_includes = load_access(root_dir)
180+
include_dirs = compute_include_dirs(include_raw) if has_includes else []
181+
182+
output = root_dir / f"{root_dir.name}.md"
183+
with open(output, 'w', encoding='utf-8') as out:
184+
out.write("# Folder Structure\n\n")
185+
out.write(generate_tree_structure(root_dir,
186+
ignore_spec, include_spec,
187+
include_dirs, has_includes))
188+
out.write("\n# File Contents\n")
189+
out.write(write_file_contents_markdown(root_dir,
190+
ignore_spec, include_spec,
191+
include_dirs, has_includes))
192+
193+
print(f"Markdown file created: {output.name}")
194+
195+
if __name__ == '__main__':
196+
main()

api_conversation_history.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)