@spacefast/common 0.0.5 → 0.0.7
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/brand-assets/spacefast-favicon.svg +16 -0
- package/brand-assets/spacefast-sf-full-bleed.svg +13 -0
- package/brand-assets/spacefast-wordmark.svg +5 -0
- package/dist/agents/connect-targets.d.ts +138 -0
- package/dist/agents/connect-targets.js +243 -0
- package/dist/brand-assets-build.d.ts +26 -0
- package/dist/brand-assets-build.js +81 -0
- package/dist/brand-assets.d.ts +42 -0
- package/dist/brand-assets.js +30 -0
- package/dist/brand.d.ts +1 -0
- package/dist/brand.js +5 -0
- package/dist/config/domains.d.ts +12 -6
- package/dist/config/domains.js +30 -38
- package/dist/contracts/access.d.ts +967 -124
- package/dist/contracts/access.js +804 -148
- package/dist/contracts/activity.d.ts +1 -1
- package/dist/contracts/activity.js +28 -2
- package/dist/contracts/annotations.d.ts +2 -4
- package/dist/contracts/api-keys.d.ts +126 -4
- package/dist/contracts/api-keys.js +74 -6
- package/dist/contracts/archives.d.ts +8 -2
- package/dist/contracts/archives.js +11 -4
- package/dist/contracts/billing.d.ts +0 -9
- package/dist/contracts/builds.d.ts +65 -21
- package/dist/contracts/builds.js +29 -0
- package/dist/contracts/common.d.ts +2 -0
- package/dist/contracts/common.js +4 -0
- package/dist/contracts/continuation.d.ts +0 -3
- package/dist/contracts/countries.d.ts +2 -0
- package/dist/contracts/countries.js +261 -0
- package/dist/contracts/deployments.d.ts +34 -34
- package/dist/contracts/device-auth.d.ts +4 -11
- package/dist/contracts/device-auth.js +4 -0
- package/dist/contracts/docs.d.ts +119 -0
- package/dist/contracts/docs.js +51 -0
- package/dist/contracts/domains.d.ts +96 -54
- package/dist/contracts/domains.js +26 -4
- package/dist/contracts/enums.d.ts +15 -16
- package/dist/contracts/enums.js +26 -14
- package/dist/contracts/error-code-meta.d.ts +184 -0
- package/dist/contracts/error-code-meta.js +124 -10
- package/dist/contracts/error-codes.d.ts +1 -1
- package/dist/contracts/error-codes.js +42 -0
- package/dist/contracts/events.d.ts +1 -1
- package/dist/contracts/feature-lifecycle-core.d.ts +36 -0
- package/dist/contracts/feature-lifecycle-core.js +220 -0
- package/dist/contracts/feature-lifecycle.d.ts +7 -0
- package/dist/contracts/feature-lifecycle.js +31 -0
- package/dist/contracts/features.d.ts +76 -6
- package/dist/contracts/features.js +178 -13
- package/dist/contracts/generated-feature-launch-entries.d.ts +2 -0
- package/dist/contracts/generated-feature-launch-entries.js +518 -0
- package/dist/contracts/git.d.ts +2 -8
- package/dist/contracts/ids.d.ts +9 -0
- package/dist/contracts/ids.js +13 -0
- package/dist/contracts/mcp.d.ts +8 -10
- package/dist/contracts/me.js +1 -1
- package/dist/contracts/oauth-resources.d.ts +19 -8
- package/dist/contracts/oauth-resources.js +44 -13
- package/dist/contracts/operations.d.ts +161 -1
- package/dist/contracts/operations.js +49 -1
- package/dist/contracts/platform.d.ts +6 -102
- package/dist/contracts/platform.js +6 -50
- package/dist/contracts/publishes.d.ts +130 -0
- package/dist/contracts/publishes.js +145 -0
- package/dist/contracts/push-new.d.ts +4 -4
- package/dist/contracts/quotas.d.ts +2 -0
- package/dist/contracts/quotas.js +8 -0
- package/dist/contracts/repository-connections.d.ts +9 -8
- package/dist/contracts/repository-connections.js +13 -0
- package/dist/contracts/resources.d.ts +99 -13
- package/dist/contracts/resources.js +36 -4
- package/dist/contracts/routes.d.ts +0 -2
- package/dist/contracts/runtime-api.d.ts +363 -39
- package/dist/contracts/runtime-api.js +276 -6
- package/dist/contracts/sf-config-v1.d.ts +75 -0
- package/dist/contracts/sf-config-v1.js +6 -0
- package/dist/contracts/sites.d.ts +19 -2
- package/dist/contracts/sites.js +21 -0
- package/dist/contracts/space-config.d.ts +201 -2
- package/dist/contracts/space-config.js +135 -5
- package/dist/contracts/spaces.d.ts +376 -196
- package/dist/contracts/spaces.js +62 -10
- package/dist/contracts/superadmin-emails.d.ts +4 -2
- package/dist/contracts/superadmin-emails.js +8 -0
- package/dist/contracts/superadmin-queues.d.ts +26 -26
- package/dist/contracts/superadmin-spaces.d.ts +172 -42
- package/dist/contracts/superadmin-tenants.d.ts +6 -6
- package/dist/contracts/superadmin-tenants.js +6 -11
- package/dist/contracts/superadmin.d.ts +6 -93
- package/dist/contracts/superadmin.js +6 -14
- package/dist/contracts/tags.d.ts +10 -9
- package/dist/contracts/tags.js +2 -1
- package/dist/contracts/teams.d.ts +26 -30
- package/dist/contracts/teams.js +11 -17
- package/dist/contracts/theme-json.d.ts +30 -0
- package/dist/contracts/theme-json.js +48 -0
- package/dist/contracts/variables.d.ts +0 -2
- package/dist/contracts/variables.js +0 -5
- package/dist/contracts/webhooks.d.ts +2 -0
- package/dist/contracts/webhooks.js +1 -1
- package/dist/contracts/zero.d.ts +5 -10
- package/dist/docs/agent-prose.d.ts +43 -3
- package/dist/docs/agent-prose.js +146 -7
- package/dist/docs/agent-setup.d.ts +51 -0
- package/dist/docs/agent-setup.js +211 -14
- package/dist/docs/agent-solutions.d.ts +5 -5
- package/dist/docs/agent-solutions.js +2 -2
- package/dist/docs/catalog.d.ts +650 -0
- package/dist/docs/catalog.js +758 -0
- package/dist/docs/error-docs.d.ts +0 -2
- package/dist/docs/error-docs.js +189 -35
- package/dist/docs/index-build.d.ts +17 -0
- package/dist/docs/index-build.js +24 -0
- package/dist/docs/search.d.ts +54 -0
- package/dist/docs/search.js +96 -0
- package/dist/docs/skill-distribution.d.ts +5 -3
- package/dist/docs/skill-distribution.js +8 -8
- package/dist/slug-policy/blocklist.d.ts +4 -0
- package/dist/slug-policy/blocklist.js +122 -0
- package/dist/slug-policy/index.d.ts +17 -0
- package/dist/slug-policy/index.js +86 -0
- package/dist/utils/access-match.d.ts +39 -0
- package/dist/utils/access-match.js +296 -0
- package/dist/utils/auth-redirect.d.ts +3 -1
- package/dist/utils/auth-redirect.js +21 -1
- package/dist/utils/build-settings.d.ts +6 -0
- package/dist/utils/build-settings.js +429 -46
- package/dist/utils/claim-token.d.ts +8 -0
- package/dist/utils/claim-token.js +23 -2
- package/dist/utils/concurrency.d.ts +1 -0
- package/dist/utils/concurrency.js +22 -0
- package/dist/utils/content-type.d.ts +1 -0
- package/dist/utils/content-type.js +1 -1
- package/dist/utils/credential-policy.d.ts +54 -0
- package/dist/utils/{access-policy.js → credential-policy.js} +28 -2
- package/dist/utils/email.d.ts +1 -0
- package/dist/utils/email.js +3 -0
- package/dist/utils/gate-theme.d.ts +61 -0
- package/dist/utils/gate-theme.js +217 -0
- package/dist/utils/git-repository.d.ts +0 -1
- package/dist/utils/git-repository.js +0 -3
- package/dist/utils/id-hints.d.ts +8 -0
- package/dist/utils/id-hints.js +61 -0
- package/dist/utils/local-space-state.d.ts +91 -0
- package/dist/utils/local-space-state.js +251 -0
- package/dist/utils/oauth-signed-query.d.ts +8 -0
- package/dist/utils/oauth-signed-query.js +26 -0
- package/dist/utils/publish-detection.d.ts +0 -8
- package/dist/utils/publish-detection.js +0 -93
- package/dist/utils/publish-policy.d.ts +6 -5
- package/dist/utils/publish-policy.js +71 -7
- package/dist/utils/query-keys.d.ts +16 -4
- package/dist/utils/query-keys.js +31 -4
- package/dist/utils/runtime-paths.d.ts +0 -1
- package/dist/utils/runtime-paths.js +0 -1
- package/dist/utils/runtime-upload-batch.d.ts +18 -0
- package/dist/utils/runtime-upload-batch.js +90 -0
- package/dist/utils/runtime-upload.d.ts +2 -0
- package/dist/utils/runtime-upload.js +5 -0
- package/dist/utils/sf-config-v1.d.ts +2 -0
- package/dist/utils/sf-config-v1.js +542 -0
- package/dist/utils/space-config.d.ts +4 -0
- package/dist/utils/space-config.js +10 -1
- package/dist/utils/space-theme.d.ts +2 -0
- package/dist/utils/space-theme.js +9 -0
- package/dist/utils/static-runtime-policy.d.ts +0 -21
- package/dist/utils/static-runtime-policy.js +19 -103
- package/dist/utils/upload-session.d.ts +1 -1
- package/dist/utils/wpcom-auth-redirects.d.ts +32 -2
- package/dist/utils/wpcom-auth-redirects.js +26 -10
- package/dist/vocabulary.d.ts +130 -30
- package/dist/vocabulary.js +77 -36
- package/package.json +35 -1
- package/dist/contracts/account.d.ts +0 -28
- package/dist/contracts/account.js +0 -54
- package/dist/contracts/intercom.d.ts +0 -6
- package/dist/contracts/intercom.js +0 -5
- package/dist/contracts/telemetry.d.ts +0 -2
- package/dist/contracts/telemetry.js +0 -1
- package/dist/utils/access-policy.d.ts +0 -39
- package/dist/utils/error-display.d.ts +0 -7
- package/dist/utils/error-display.js +0 -42
package/dist/config/domains.js
CHANGED
|
@@ -5,37 +5,39 @@
|
|
|
5
5
|
//
|
|
6
6
|
// Env-var NAMES intentionally stay `SPACEFAST_*` (see migration plan); only the
|
|
7
7
|
// VALUES they carry are produced from this registry.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
8
|
+
/** The production apex. Everything else about prod derives from this string. */
|
|
9
|
+
export const PROD_ENV_DOMAIN = "spacefast.com";
|
|
10
|
+
/** The local-dev apex (portless serves every subdomain over HTTPS). */
|
|
11
|
+
export const DEV_ENV_DOMAIN = "sf.localhost";
|
|
12
|
+
/**
|
|
13
|
+
* Construct the full per-service host map from a single env domain
|
|
14
|
+
* (`spacefast.com`, `sf.localhost`, …). One knob — services are always
|
|
15
|
+
* `<service>.<domain>` over https, with two deliberate exceptions:
|
|
16
|
+
* the marketing site sits on the bare prod apex, and the internal handbook
|
|
17
|
+
* lives on the view.fast infra apex in prod.
|
|
18
|
+
*/
|
|
19
|
+
export function envDomainsFor(domain) {
|
|
20
|
+
const prod = domain === PROD_ENV_DOMAIN;
|
|
21
|
+
return {
|
|
22
|
+
apex: domain,
|
|
23
|
+
cookieDomain: `.${domain}`,
|
|
24
|
+
protocol: "https",
|
|
25
|
+
hosts: {
|
|
26
|
+
www: prod ? domain : `www.${domain}`,
|
|
27
|
+
api: `api.${domain}`,
|
|
28
|
+
dashboard: `my.${domain}`,
|
|
29
|
+
superadmin: `superadmin.${domain}`,
|
|
30
|
+
cast: `cast.${domain}`,
|
|
31
|
+
mcp: `mcp.${domain}`,
|
|
32
|
+
fieldguide: prod ? "fieldguide.view.fast" : `fieldguide.${domain}`,
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
const PROD = envDomainsFor(PROD_ENV_DOMAIN);
|
|
22
37
|
// Local dev runs every service under *.sf.localhost via portless (HTTPS, no
|
|
23
38
|
// ports in the URL — portless proxies the raw dev ports). `remove all other
|
|
24
39
|
// portless records` per the migration spec: sf.localhost is the only TLD.
|
|
25
|
-
const DEV =
|
|
26
|
-
apex: "sf.localhost",
|
|
27
|
-
cookieDomain: ".sf.localhost",
|
|
28
|
-
protocol: "https",
|
|
29
|
-
hosts: {
|
|
30
|
-
www: "www.sf.localhost",
|
|
31
|
-
api: "api.sf.localhost",
|
|
32
|
-
dashboard: "my.sf.localhost",
|
|
33
|
-
superadmin: "superadmin.sf.localhost",
|
|
34
|
-
cast: "cast.sf.localhost",
|
|
35
|
-
mcp: "mcp.sf.localhost",
|
|
36
|
-
fieldguide: "fieldguide.sf.localhost",
|
|
37
|
-
},
|
|
38
|
-
};
|
|
40
|
+
const DEV = envDomainsFor(DEV_ENV_DOMAIN);
|
|
39
41
|
// The test stack shares the sf.localhost hostname scheme but runs as its own
|
|
40
42
|
// isolated compose project on its own ports/resources (see ports config), so it
|
|
41
43
|
// can run side-by-side with dev. URL host scheme is identical to dev.
|
|
@@ -45,23 +47,13 @@ const BY_ENV = {
|
|
|
45
47
|
test: TEST,
|
|
46
48
|
prod: PROD,
|
|
47
49
|
};
|
|
48
|
-
/** The full domain map for an environment. */
|
|
49
|
-
export function domainsFor(env) {
|
|
50
|
-
return BY_ENV[env];
|
|
51
|
-
}
|
|
52
50
|
/** Origin (scheme + host, no trailing slash) for a service in an environment. */
|
|
53
51
|
export function serviceOrigin(service, env) {
|
|
54
52
|
const d = BY_ENV[env];
|
|
55
53
|
return `${d.protocol}://${d.hosts[service]}`;
|
|
56
54
|
}
|
|
57
|
-
/** Cookie domain that scopes auth across all subdomains of an environment. */
|
|
58
|
-
export function cookieDomainFor(env) {
|
|
59
|
-
return BY_ENV[env].cookieDomain;
|
|
60
|
-
}
|
|
61
55
|
// --- Apexes that are NOT spacefast.com subdomains -------------------------------
|
|
62
56
|
// These live outside the per-env map because they are stable infra identities.
|
|
63
|
-
/** Domain Search Terminal (Fly.io); its web redirects to spacefast.com/domains. */
|
|
64
|
-
export const FAST_DOMAIN_SEARCH_APEX = "fastdomainsearch.com";
|
|
65
57
|
/** Atomic infrastructure apex used for public managed/custom domains. */
|
|
66
58
|
export const VIEW_FAST_APEX = "view.fast";
|
|
67
59
|
// D-4 resolved 2026-06-26: default space hostnames are
|