@geekmidas/cloud 10.0.0-alpha.130 → 10.0.0-alpha.132
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/package.json +7 -7
- package/src/sst/errors.ts +15 -0
- package/src/sst/fromManifest.ts +4 -0
- package/src/sst/index.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geekmidas/cloud",
|
|
3
|
-
"version": "10.0.0-alpha.
|
|
3
|
+
"version": "10.0.0-alpha.132",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"lodash.snakecase": "~4.1.1",
|
|
44
|
-
"@geekmidas/envkit": "10.0.0-alpha.
|
|
45
|
-
"@geekmidas/manifest": "10.0.0-alpha.
|
|
44
|
+
"@geekmidas/envkit": "10.0.0-alpha.132",
|
|
45
|
+
"@geekmidas/manifest": "10.0.0-alpha.132"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/lodash.get": "~4.4.9",
|
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
"@pulumi/aws": ">=7.47.0",
|
|
59
59
|
"@pulumi/random": ">=4.21.2",
|
|
60
60
|
"@pulumi/pulumi": ">=3.263.0",
|
|
61
|
-
"@geekmidas/manifest": "^10.0.0-alpha.
|
|
62
|
-
"@geekmidas/storage": "^10.0.0-alpha.
|
|
63
|
-
"@geekmidas/events": "^10.0.0-alpha.
|
|
64
|
-
"@geekmidas/db": "^10.0.0-alpha.
|
|
61
|
+
"@geekmidas/manifest": "^10.0.0-alpha.132",
|
|
62
|
+
"@geekmidas/storage": "^10.0.0-alpha.132",
|
|
63
|
+
"@geekmidas/events": "^10.0.0-alpha.132",
|
|
64
|
+
"@geekmidas/db": "^10.0.0-alpha.132"
|
|
65
65
|
},
|
|
66
66
|
"peerDependenciesMeta": {
|
|
67
67
|
"@geekmidas/manifest": {
|
package/src/sst/errors.ts
CHANGED
|
@@ -63,3 +63,18 @@ export class UnresolvedDependency extends Error {
|
|
|
63
63
|
this.available = available;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* A site declared `subdomain: '*'`, which the AWS target cannot serve yet: a
|
|
69
|
+
* distribution answers on the hosts it was given, and a tenant's host is
|
|
70
|
+
* created by the running app.
|
|
71
|
+
*/
|
|
72
|
+
export class WildcardSiteNotSupported extends Error {
|
|
73
|
+
constructor(readonly id: string) {
|
|
74
|
+
super(
|
|
75
|
+
`'${id}' answers on every subdomain, which the AWS target cannot ` +
|
|
76
|
+
`serve yet. Give it a subdomain of its own to deploy it here.`,
|
|
77
|
+
);
|
|
78
|
+
this.name = 'WildcardSiteNotSupported';
|
|
79
|
+
}
|
|
80
|
+
}
|
package/src/sst/fromManifest.ts
CHANGED
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
cookieDomain,
|
|
29
29
|
DEFAULT_POSTGRES_VERSION,
|
|
30
30
|
dependentsOf,
|
|
31
|
+
isWildcardSite,
|
|
31
32
|
mobileOrigins,
|
|
32
33
|
PUBLIC,
|
|
33
34
|
PUBLIC_PREFIX,
|
|
@@ -65,6 +66,7 @@ import {
|
|
|
65
66
|
ProvidesMismatch,
|
|
66
67
|
UnknownDeclarationKind,
|
|
67
68
|
UnresolvedDependency,
|
|
69
|
+
WildcardSiteNotSupported,
|
|
68
70
|
} from './errors';
|
|
69
71
|
import type { GkmLinkable } from './Linkable';
|
|
70
72
|
import type { ManifestBackends, ManifestOverrides } from './overrides';
|
|
@@ -182,6 +184,8 @@ const PROVISIONERS: Partial<Record<DeclarationKind, Provisioner>> = {
|
|
|
182
184
|
|
|
183
185
|
site: (stack, d, props, context) => {
|
|
184
186
|
if (d.kind !== 'site') throw new UnknownDeclarationKind(d.kind, []);
|
|
187
|
+
// Routing every subdomain through CloudFront is #299's.
|
|
188
|
+
if (isWildcardSite(d)) throw new WildcardSiteNotSupported(d.id);
|
|
185
189
|
|
|
186
190
|
return new StaticSite(stack, d.id, {
|
|
187
191
|
path: d.app.path,
|