@volter/twin-googlefonts 1.0.1 → 1.0.2
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/api/spec/sources.json +11 -1
- package/api/src/semantics/doors.ts +4 -0
- package/css/spec/SOURCE.md +3 -1
- package/dist/api/spec/sources.json +11 -1
- package/dist/api/src/semantics/doors.js +4 -0
- package/dist/css/spec/SOURCE.md +3 -1
- package/dist/generated/pack-facts.json +68 -0
- package/dist/journeys/customer-life.json +81 -0
- package/dist/journeys/decisions.json +13 -3
- package/dist/journeys/demand.json +34 -0
- package/dist/src/cli.js +11 -10
- package/dist/src/manifest.js +4 -2
- package/dist/src/semantics/seed.js +40 -0
- package/generated/pack-facts.json +5 -2
- package/journeys/customer-life.json +81 -0
- package/journeys/decisions.json +13 -3
- package/journeys/demand.json +34 -0
- package/package.json +30 -14
- package/src/cli.ts +10 -10
- package/src/manifest.ts +4 -2
- package/src/semantics/seed.ts +40 -0
- package/vendor/SOURCE.md +7 -0
- package/vendor/inter-variable.json +52 -0
- package/dist/api/src/fetch.ts +0 -16
- package/dist/api/src/index.ts +0 -3
- package/dist/api/src/manifest.ts +0 -31
- package/dist/api/src/semantics/doors.ts +0 -131
- package/dist/api/src/semantics/index.ts +0 -8
- package/dist/api/src/semantics/shared.ts +0 -1
- package/dist/api/src/semantics/states.ts +0 -6
- package/dist/api/src/semantics/webfonts.ts +0 -32
- package/dist/assets/src/fetch.ts +0 -14
- package/dist/assets/src/index.ts +0 -3
- package/dist/assets/src/manifest.ts +0 -19
- package/dist/assets/src/semantics/index.ts +0 -10
- package/dist/assets/src/semantics/l.ts +0 -4
- package/dist/assets/src/semantics/s.ts +0 -4
- package/dist/assets/src/semantics/shared.ts +0 -13
- package/dist/css/src/fetch.ts +0 -14
- package/dist/css/src/index.ts +0 -3
- package/dist/css/src/manifest.ts +0 -19
- package/dist/css/src/semantics/css.ts +0 -19
- package/dist/css/src/semantics/css2.ts +0 -20
- package/dist/css/src/semantics/index.ts +0 -10
- package/dist/css/src/semantics/shared.ts +0 -1
- package/dist/journeys/customer-life.outline.md +0 -24
- package/dist/journeys/customer-life.outline.verdict.json +0 -82
- package/dist/journeys/customer-life.verdict.json +0 -149
- package/dist/vendor/Inter-OFL.txt +0 -93
- package/dist/vendor/OFL.txt +0 -94
- package/dist/vendor/SOURCE.md +0 -33
- package/dist/vendor/antic.json +0 -93
- package/dist/vendor/inputs.json +0 -460
- package/dist/vendor/inter.json +0 -44
- package/dist/vendor/noto-sans-sc-text.json +0 -24
- package/journeys/customer-life.outline.md +0 -24
- package/journeys/customer-life.outline.verdict.json +0 -82
- package/journeys/customer-life.verdict.json +0 -149
package/api/spec/sources.json
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"https://developers.google.com/fonts/docs/developer_api": {
|
|
3
3
|
"status": 200,
|
|
4
|
-
"checked": "2026-
|
|
4
|
+
"checked": "2026-11-11",
|
|
5
|
+
"quotes": {
|
|
6
|
+
"by including an API key with each request": true
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
"https://docs.cloud.google.com/docs/authentication/api-keys": {
|
|
10
|
+
"status": 200,
|
|
11
|
+
"checked": "2026-11-11",
|
|
12
|
+
"quotes": {
|
|
13
|
+
"Standard API keys provide a way to associate a request with a project for billing and quota purposes.": true
|
|
14
|
+
}
|
|
5
15
|
}
|
|
6
16
|
}
|
|
@@ -4,6 +4,10 @@ import { FONT, CATALOG, CSS, FILE, KEY, object, assetKey, cssKey, css2Key, css2Q
|
|
|
4
4
|
|
|
5
5
|
// source: https://developers.google.com/fonts/docs/developer_api
|
|
6
6
|
export async function appCredentials(ctx: HandlerContext): Promise<Response> {
|
|
7
|
+
// An app's key is a standard API key, made on a Google Cloud project's Credentials page and associating each request
|
|
8
|
+
// with that project for billing and quota; the Fonts Developer API takes it as `key=` and nothing else.
|
|
9
|
+
// source: https://docs.cloud.google.com/docs/authentication/api-keys "Standard API keys provide a way to associate a request with a project for billing and quota purposes."
|
|
10
|
+
// source: https://developers.google.com/fonts/docs/developer_api "by including an API key with each request"
|
|
7
11
|
const project = await ctx.tenant('_project', async organization =>
|
|
8
12
|
String((await ctx.create('_project', { name: organization.label, owner: organization.members[0] }, 'project.create')).id));
|
|
9
13
|
const value = async (id: string): Promise<string> => 'AIza' + (await ctx.secret(`googlefonts:application-api-key:${id}`)).slice(0, 35);
|
package/css/spec/SOURCE.md
CHANGED
|
@@ -7,7 +7,9 @@ GET /css?family=<family>:<variant>&subset=<subsets> with the exact configured
|
|
|
7
7
|
User-Agent and consumes each @font-face's font-family, style, weight and src URL.
|
|
8
8
|
Dub's Open Graph routes call GET /css2?family=Inter:wght@<weight> and Rallly's
|
|
9
9
|
calls GET /css2?family=Noto+Sans+SC:wght@<weight>&text=<text>, both from a server
|
|
10
|
-
without a browser User-Agent, and read the truetype src URL.
|
|
10
|
+
without a browser User-Agent, and read the truetype src URL. next/font/google's build (Rallly's and
|
|
11
|
+
Cal.diy's `next build`) calls GET /css2?family=Inter:wght@100..900&display=swap with a Chrome User-Agent and
|
|
12
|
+
reads each woff2 src URL of its unicode-range faces.
|
|
11
13
|
The supplied representations retain actual vendor CSS. Requests without a
|
|
12
14
|
published representation answer a refusal, never an invented font format.
|
|
13
15
|
text/display/effect on /css are outside this client's demand.
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"https://developers.google.com/fonts/docs/developer_api": {
|
|
3
3
|
"status": 200,
|
|
4
|
-
"checked": "2026-
|
|
4
|
+
"checked": "2026-11-11",
|
|
5
|
+
"quotes": {
|
|
6
|
+
"by including an API key with each request": true
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
"https://docs.cloud.google.com/docs/authentication/api-keys": {
|
|
10
|
+
"status": 200,
|
|
11
|
+
"checked": "2026-11-11",
|
|
12
|
+
"quotes": {
|
|
13
|
+
"Standard API keys provide a way to associate a request with a project for billing and quota purposes.": true
|
|
14
|
+
}
|
|
5
15
|
}
|
|
6
16
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { FONT, CATALOG, CSS, FILE, KEY, object, assetKey, cssKey, css2Key, css2Query, googleError } from "./shared.js";
|
|
2
2
|
// source: https://developers.google.com/fonts/docs/developer_api
|
|
3
3
|
export async function appCredentials(ctx) {
|
|
4
|
+
// An app's key is a standard API key, made on a Google Cloud project's Credentials page and associating each request
|
|
5
|
+
// with that project for billing and quota; the Fonts Developer API takes it as `key=` and nothing else.
|
|
6
|
+
// source: https://docs.cloud.google.com/docs/authentication/api-keys "Standard API keys provide a way to associate a request with a project for billing and quota purposes."
|
|
7
|
+
// source: https://developers.google.com/fonts/docs/developer_api "by including an API key with each request"
|
|
4
8
|
const project = await ctx.tenant('_project', async (organization) => String((await ctx.create('_project', { name: organization.label, owner: organization.members[0] }, 'project.create')).id));
|
|
5
9
|
const value = async (id) => 'AIza' + (await ctx.secret(`googlefonts:application-api-key:${id}`)).slice(0, 35);
|
|
6
10
|
const key = await ctx.accountKey('api-key', KEY, {
|
package/dist/css/spec/SOURCE.md
CHANGED
|
@@ -7,7 +7,9 @@ GET /css?family=<family>:<variant>&subset=<subsets> with the exact configured
|
|
|
7
7
|
User-Agent and consumes each @font-face's font-family, style, weight and src URL.
|
|
8
8
|
Dub's Open Graph routes call GET /css2?family=Inter:wght@<weight> and Rallly's
|
|
9
9
|
calls GET /css2?family=Noto+Sans+SC:wght@<weight>&text=<text>, both from a server
|
|
10
|
-
without a browser User-Agent, and read the truetype src URL.
|
|
10
|
+
without a browser User-Agent, and read the truetype src URL. next/font/google's build (Rallly's and
|
|
11
|
+
Cal.diy's `next build`) calls GET /css2?family=Inter:wght@100..900&display=swap with a Chrome User-Agent and
|
|
12
|
+
reads each woff2 src URL of its unicode-range faces.
|
|
11
13
|
The supplied representations retain actual vendor CSS. Requests without a
|
|
12
14
|
published representation answer a refusal, never an invented font format.
|
|
13
15
|
text/display/effect on /css are outside this client's demand.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"//": "GENERATED by twin-standard facts from the pack descriptor; no prior-artifact entries are retained.",
|
|
3
|
+
"packs": {
|
|
4
|
+
"googlefonts": {
|
|
5
|
+
"adoption": {
|
|
6
|
+
"sdks": [],
|
|
7
|
+
"envStems": [
|
|
8
|
+
"GOOGLE_FONTS"
|
|
9
|
+
],
|
|
10
|
+
"modules": [
|
|
11
|
+
"next/font/google"
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
"hosts": [
|
|
15
|
+
{
|
|
16
|
+
"host": "www.googleapis.com",
|
|
17
|
+
"pathPattern": "^/webfonts/v1/webfonts$"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"host": "webfonts.googleapis.com",
|
|
21
|
+
"pathPattern": "^/v1/webfonts$"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"host": "fonts.googleapis.com",
|
|
25
|
+
"pathPattern": "^/css2?$"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"host": "fonts.gstatic.com",
|
|
29
|
+
"pathPattern": "^/(s/|l/font$)"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"archetype": "crud",
|
|
33
|
+
"protocol": {
|
|
34
|
+
"declared": "3",
|
|
35
|
+
"major": 3,
|
|
36
|
+
"standing": "current"
|
|
37
|
+
},
|
|
38
|
+
"transport": "rest",
|
|
39
|
+
"resources": [
|
|
40
|
+
"webfont",
|
|
41
|
+
"_api_key",
|
|
42
|
+
"_font_catalog",
|
|
43
|
+
"_stylesheet",
|
|
44
|
+
"_font_file"
|
|
45
|
+
],
|
|
46
|
+
"endpointEnvNone": "Pinned helper hardcodes the vendor API and CSS hosts, then downloads their returned gstatic URLs. Scoped host routing preserves these URLs.",
|
|
47
|
+
"credentialDoor": {
|
|
48
|
+
"path": "/_twin/app-credentials",
|
|
49
|
+
"body": {},
|
|
50
|
+
"account": {
|
|
51
|
+
"field": "account",
|
|
52
|
+
"tenancy": "Google Cloud project",
|
|
53
|
+
"source": "https://developers.google.com/fonts/docs/developer_api"
|
|
54
|
+
},
|
|
55
|
+
"deployment": {
|
|
56
|
+
"field": "deployment",
|
|
57
|
+
"object": "Project API key",
|
|
58
|
+
"source": "https://docs.cloud.google.com/docs/authentication/api-keys"
|
|
59
|
+
},
|
|
60
|
+
"fill": {
|
|
61
|
+
"GOOGLE_FONTS_API_KEY": "api_key"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"serveExport": "createGooglefontsTwinServer"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"undeclared": []
|
|
68
|
+
}
|