@geekmidas/cloud 10.0.0-alpha.99 → 10.0.0
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/README.md +6 -14
- package/dist/index-ByEJy40r.d.cts +56 -0
- package/dist/index-ByEJy40r.d.cts.map +1 -0
- package/dist/index-DZ0QrJQr.d.mts +56 -0
- package/dist/index-DZ0QrJQr.d.mts.map +1 -0
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +3 -2
- package/dist/utils/index.cjs +5 -106
- package/dist/utils/index.d.cts +2 -62
- package/dist/utils/index.d.mts +2 -62
- package/dist/utils/index.mjs +2 -78
- package/dist/utils-BdKG20_m.mjs +83 -0
- package/dist/utils-BdKG20_m.mjs.map +1 -0
- package/dist/utils-CtMjuIMR.cjs +129 -0
- package/dist/utils-CtMjuIMR.cjs.map +1 -0
- package/package.json +9 -47
- package/src/sst/{aws/Api.ts → Api.ts} +47 -19
- package/src/sst/{aws/Cron.ts → Cron.ts} +46 -6
- package/src/sst/{aws/Function.ts → Function.ts} +41 -12
- package/src/sst/Queue.ts +46 -0
- package/src/sst/{aws/Storage.ts → Storage.ts} +3 -3
- package/src/sst/Topic.ts +37 -0
- package/src/sst/__tests__/LinkedEnvironment.spec.ts +1 -4
- package/src/sst/__type-tests__/authorizers.type-test.ts +2 -2
- package/src/sst/__type-tests__/manifest.type-test.ts +77 -0
- package/src/sst/__type-tests__/messaging.type-test.ts +3 -3
- package/src/sst/__type-tests__/storage.type-test.ts +2 -2
- package/src/sst/index.ts +7 -67
- package/src/sst/naming.ts +16 -37
- package/src/sst/tsconfig.json +2 -2
- package/dist/utils/index.cjs.map +0 -1
- package/dist/utils/index.d.cts.map +0 -1
- package/dist/utils/index.d.mts.map +0 -1
- package/dist/utils/index.mjs.map +0 -1
- package/src/dokploy/Application.ts +0 -306
- package/src/dokploy/__tests__/Application.provider.spec.ts +0 -206
- package/src/dokploy/__tests__/Application.spec.ts +0 -69
- package/src/dokploy/index.ts +0 -18
- package/src/sst/__tests__/api.spec.ts +0 -185
- package/src/sst/__tests__/backends.spec.ts +0 -249
- package/src/sst/__tests__/bootstrap.spec.ts +0 -140
- package/src/sst/__tests__/database.spec.ts +0 -119
- package/src/sst/__tests__/encryption.spec.ts +0 -90
- package/src/sst/__tests__/fromManifest.integration.spec.ts +0 -427
- package/src/sst/__tests__/fromManifest.spec.ts +0 -567
- package/src/sst/__tests__/function.spec.ts +0 -121
- package/src/sst/__tests__/links.spec.ts +0 -209
- package/src/sst/__tests__/provides.spec.ts +0 -107
- package/src/sst/__tests__/ses.spec.ts +0 -93
- package/src/sst/__tests__/surfaces.spec.ts +0 -149
- package/src/sst/__type-tests__/overrides.type-test.ts +0 -152
- package/src/sst/aws/Cache.ts +0 -259
- package/src/sst/aws/Credential.ts +0 -61
- package/src/sst/aws/Database.ts +0 -204
- package/src/sst/aws/DatabaseBootstrap.ts +0 -312
- package/src/sst/aws/DerivedDatabase.ts +0 -117
- package/src/sst/aws/Email.ts +0 -181
- package/src/sst/aws/Encryption.ts +0 -91
- package/src/sst/aws/ExternalApi.ts +0 -58
- package/src/sst/aws/FileServer.ts +0 -82
- package/src/sst/aws/ObjectStorage.ts +0 -76
- package/src/sst/aws/Queue.ts +0 -149
- package/src/sst/aws/RestApiSurface.ts +0 -114
- package/src/sst/aws/Secret.ts +0 -76
- package/src/sst/aws/StaticSite.ts +0 -92
- package/src/sst/aws/Topic.ts +0 -68
- package/src/sst/aws/bootstrap/handler.ts +0 -119
- package/src/sst/aws/ses.ts +0 -132
- package/src/sst/errors.ts +0 -65
- package/src/sst/fromManifest.ts +0 -1116
- package/src/sst/overrides.ts +0 -133
- package/src/sst/upstash.d.ts +0 -38
package/src/sst/overrides.ts
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* What a deploy can say about each construct, inferred from the manifest.
|
|
3
|
-
*
|
|
4
|
-
* `fromManifest` used to take `Record<string, Record<string, unknown>>`, so a
|
|
5
|
-
* misspelt id, a prop the component never reads, and a missing VPC all passed
|
|
6
|
-
* the type checker — the first two silently, the last at synth, mid-deploy.
|
|
7
|
-
* The manifest is emitted `as const`, so every id's kind is known statically,
|
|
8
|
-
* and the kind decides what can be overridden:
|
|
9
|
-
*
|
|
10
|
-
* - only the manifest's own ids are keys;
|
|
11
|
-
* - each takes the props its kind's provisioner reads, minus those the
|
|
12
|
-
* declaration already decides (a site's `path`, a file server's `origin`);
|
|
13
|
-
* - what the synth refuses to guess is required — a database's `vpc`, mail's
|
|
14
|
-
* `from`, and, by backend, an ElastiCache `vpc` or a non-SES mail `url`;
|
|
15
|
-
* - a kind with nothing to override takes no key at all.
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
import type { ConstructManifest, DeclarationKind } from '@geekmidas/manifest';
|
|
19
|
-
import type { CacheProps } from './aws/Cache';
|
|
20
|
-
import type { CredentialProps } from './aws/Credential';
|
|
21
|
-
import type { DatabaseProps } from './aws/Database';
|
|
22
|
-
import type { EncryptionProps } from './aws/Encryption';
|
|
23
|
-
import type { ExternalApiProps } from './aws/ExternalApi';
|
|
24
|
-
import type { FileServerProps } from './aws/FileServer';
|
|
25
|
-
import type { ObjectStorageProps } from './aws/ObjectStorage';
|
|
26
|
-
import type { QueueProps } from './aws/Queue';
|
|
27
|
-
import type { SecretProps } from './aws/Secret';
|
|
28
|
-
import type { StaticSiteProps } from './aws/StaticSite';
|
|
29
|
-
import type { TopicProps } from './aws/Topic';
|
|
30
|
-
|
|
31
|
-
/** The backend choices that are config rather than declaration. */
|
|
32
|
-
export interface ManifestBackends {
|
|
33
|
-
cache?: 'upstash' | 'elasticache' | 'db';
|
|
34
|
-
email?: 'resend' | 'ses' | 'smtp';
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/** The backend a choice resolves to — the provisioner's default when unset. */
|
|
38
|
-
type CacheBackendOf<B extends ManifestBackends> =
|
|
39
|
-
B['cache'] extends NonNullable<ManifestBackends['cache']>
|
|
40
|
-
? B['cache']
|
|
41
|
-
: 'upstash';
|
|
42
|
-
type EmailBackendOf<B extends ManifestBackends> =
|
|
43
|
-
B['email'] extends NonNullable<ManifestBackends['email']>
|
|
44
|
-
? B['email']
|
|
45
|
-
: 'ses';
|
|
46
|
-
|
|
47
|
-
type CacheOverride<Backend> = Backend extends 'elasticache'
|
|
48
|
-
? { vpc: NonNullable<CacheProps['vpc']> }
|
|
49
|
-
: Backend extends 'upstash'
|
|
50
|
-
? { url?: CacheProps['url']; region?: string }
|
|
51
|
-
: never;
|
|
52
|
-
|
|
53
|
-
type EmailOverride<Backend> = {
|
|
54
|
-
/** Every provider rejects an unverified sender, so there is no default. */
|
|
55
|
-
from: $util.Input<string>;
|
|
56
|
-
region?: $util.Input<string>;
|
|
57
|
-
} & (Backend extends 'ses'
|
|
58
|
-
? { url?: $util.Input<string> }
|
|
59
|
-
: // Resend and a relay are accounts somebody created: their URL is theirs.
|
|
60
|
-
{ url: $util.Input<string> });
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* What one declaration takes, by its kind and the backends; `never` for a kind
|
|
64
|
-
* with nothing to override, which drops its id from the keys.
|
|
65
|
-
*/
|
|
66
|
-
export type OverrideFor<D, B extends ManifestBackends = {}> = D extends {
|
|
67
|
-
kind: infer K extends DeclarationKind;
|
|
68
|
-
}
|
|
69
|
-
? K extends 'objects'
|
|
70
|
-
? Partial<ObjectStorageProps>
|
|
71
|
-
: K extends 'file-server'
|
|
72
|
-
? Partial<Omit<FileServerProps, 'origin'>>
|
|
73
|
-
: K extends 'site'
|
|
74
|
-
? Partial<Omit<StaticSiteProps, 'path' | 'variant' | 'environment'>>
|
|
75
|
-
: K extends 'queue'
|
|
76
|
-
? Partial<Omit<QueueProps, 'fifo'>>
|
|
77
|
-
: K extends 'topic'
|
|
78
|
-
? Partial<TopicProps>
|
|
79
|
-
: K extends 'database'
|
|
80
|
-
? Omit<DatabaseProps, 'schema' | 'version'>
|
|
81
|
-
: K extends 'cache'
|
|
82
|
-
? // In a database: same address, one more table, nothing to say.
|
|
83
|
-
D extends { of: string }
|
|
84
|
-
? never
|
|
85
|
-
: CacheOverride<CacheBackendOf<B>>
|
|
86
|
-
: K extends 'email'
|
|
87
|
-
? EmailOverride<EmailBackendOf<B>>
|
|
88
|
-
: K extends 'rest-api'
|
|
89
|
-
? Partial<sst.aws.ApiGatewayV2Args>
|
|
90
|
-
: K extends 'secret'
|
|
91
|
-
? SecretProps
|
|
92
|
-
: K extends 'credential'
|
|
93
|
-
? CredentialProps
|
|
94
|
-
: K extends 'encryption'
|
|
95
|
-
? Partial<EncryptionProps>
|
|
96
|
-
: K extends 'external-api'
|
|
97
|
-
? Omit<ExternalApiProps, 'url'>
|
|
98
|
-
: // Derived databases, compute, mobile apps, OIDC.
|
|
99
|
-
never
|
|
100
|
-
: never;
|
|
101
|
-
|
|
102
|
-
/** Whether `{}` satisfies an override — whether the id can be left out. */
|
|
103
|
-
type IsOptional<T> = {} extends T ? true : false;
|
|
104
|
-
|
|
105
|
-
type Overridable<M, B extends ManifestBackends> = {
|
|
106
|
-
[Id in keyof M]: [OverrideFor<M[Id], B>] extends [never] ? never : Id;
|
|
107
|
-
}[keyof M];
|
|
108
|
-
|
|
109
|
-
type RequiredIds<M, B extends ManifestBackends> = {
|
|
110
|
-
[Id in Overridable<M, B>]: IsOptional<OverrideFor<M[Id], B>> extends true
|
|
111
|
-
? never
|
|
112
|
-
: Id;
|
|
113
|
-
}[Overridable<M, B>];
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* The overrides a manifest accepts, keyed by its own construct ids.
|
|
117
|
-
*
|
|
118
|
-
* A manifest typed only as `ConstructManifest` — ids unknown — falls back to
|
|
119
|
-
* the untyped record, and the provisioners' synth-time checks still apply.
|
|
120
|
-
*/
|
|
121
|
-
export type ManifestOverrides<
|
|
122
|
-
M extends ConstructManifest,
|
|
123
|
-
B extends ManifestBackends = {},
|
|
124
|
-
> = string extends keyof M
|
|
125
|
-
? Record<string, Record<string, unknown>>
|
|
126
|
-
: {
|
|
127
|
-
[Id in RequiredIds<M, B>]: OverrideFor<M[Id], B>;
|
|
128
|
-
} & {
|
|
129
|
-
[Id in Exclude<Overridable<M, B>, RequiredIds<M, B>>]?: OverrideFor<
|
|
130
|
-
M[Id],
|
|
131
|
-
B
|
|
132
|
-
>;
|
|
133
|
-
};
|
package/src/sst/upstash.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The slice of Upstash's provider this package uses.
|
|
3
|
-
*
|
|
4
|
-
* SST preloads AWS and Cloudflare and installs everything else on demand — `sst
|
|
5
|
-
* add upstash` — which "adds the namespace of the provider to your globals".
|
|
6
|
-
* So at runtime this global exists in an app that ran the command and does not
|
|
7
|
-
* in one that did not, and there is no package here to import types from.
|
|
8
|
-
*
|
|
9
|
-
* Declared rather than depended on, for the same reason `sst.aws.*` is: taking
|
|
10
|
-
* `@upstash/pulumi` as a real dependency would install a provider for every
|
|
11
|
-
* consumer, including the ones caching in Postgres.
|
|
12
|
-
*
|
|
13
|
-
* Narrow on purpose. It describes what `Cache` reads and nothing else, so it
|
|
14
|
-
* cannot drift into claiming knowledge of an API this package does not use.
|
|
15
|
-
*/
|
|
16
|
-
declare namespace upstash {
|
|
17
|
-
class RedisDatabase {
|
|
18
|
-
constructor(
|
|
19
|
-
name: string,
|
|
20
|
-
args: {
|
|
21
|
-
databaseName: $util.Input<string>;
|
|
22
|
-
/** A region name, or `global` with `primaryRegion` set alongside it. */
|
|
23
|
-
region: $util.Input<string>;
|
|
24
|
-
primaryRegion?: $util.Input<string>;
|
|
25
|
-
tls?: $util.Input<boolean>;
|
|
26
|
-
eviction?: $util.Input<boolean>;
|
|
27
|
-
},
|
|
28
|
-
opts?: unknown,
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
/** The host to reach it on. Not a URL despite the name — no scheme. */
|
|
32
|
-
readonly endpoint: $util.Output<string>;
|
|
33
|
-
/** The bearer token the HTTP client sends. */
|
|
34
|
-
readonly restToken: $util.Output<string>;
|
|
35
|
-
readonly readOnlyRestToken: $util.Output<string>;
|
|
36
|
-
readonly port: $util.Output<number>;
|
|
37
|
-
}
|
|
38
|
-
}
|