@@ -27,7 +27,7 @@ The main directories that one would be looking at:
27
27
The in-memory server starts with no data. Prepopulated data can be created
28
28
with test-profiles, using the following steps:
29
29
30
- ### Create a test-profile description
30
+ ### Create a test-profile description
31
31
32
32
A test-profile is a short description of packages, publishers, users,
33
33
their flags and relations.
39
39
packages :
40
40
- name : retry
41
41
- name : http
42
+ publishers :
43
+ - # Only `example.com`` and `verified.com`` will verify.
44
+ # See app/lib/fake/backend/fake_domain_verifier.dart
45
+ name : example.com
46
+ members :
47
+
48
+ role : admin
42
49
` ` `
43
50
44
51
### Process and create data file
45
52
46
53
Using the test-profile above, the following process will:
47
- - fetch the latest versions and the archive file from pub.dev
54
+ - create the publishers and users.
55
+ - fetch the latest versions and the archive file from pub.dev.
48
56
- publish the archive locally under the name of the user or
49
- the publisher in the test-profile description
57
+ the publisher in the test-profile description.
50
58
- analyze the packages and runs dartdoc on them
51
59
- stores the results and all the entities in a local file.
52
60
@@ -74,12 +82,14 @@ cd app/
74
82
dart bin/fake_server.dart run --data-file=dev-data-file.jsonl
75
83
```
76
84
85
+ The fake_server.dart script picks up changes and rebuilds your style sheets when initializing.
86
+
77
87
## Local accounts
78
88
79
89
The web app and the API endpoints use a simple mechanism to map access tokens
80
- to authenticated accounts:
` user-at-domain-dot-com ` gets mapped to
` [email protected] ` .
90
+ to authenticated accounts:
` user-at-domain-dot-com ` gets mapped to
` [email protected] ` .
81
91
82
- - On the web app one can use this token by clicking on the ` Sign in ` top nav item .
92
+ - On the web app
, use
` localhost:8080/[email protected] ` to sign in .
83
93
- On the API endpoints one should send the ` Authorization ` header with ` Bearer $token ` as value.
84
94
85
95
## Updating generated code
@@ -90,7 +100,7 @@ annotations. Input files are usually listed in `build.yaml`, and generated
90
100
files usually suffixed ` .g.dart ` . To generate code use:
91
101
92
102
``` bash
93
- dart pub run build_runner build
103
+ dart run build_runner build
94
104
```
95
105
96
106
## Working with ` mono_repo `
0 commit comments