@geekmidas/cloud 10.0.0-alpha.98 → 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/aws/Topic.ts
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
// The codec alone — see the note in `Queue.ts`.
|
|
2
|
-
import * as snsUrl from '@geekmidas/events/sns/url';
|
|
3
|
-
import { type GkmLinkable, ResourceType } from '../Linkable';
|
|
4
|
-
import { regionOfArn } from '../naming';
|
|
5
|
-
import type { StackType } from '../Stack';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* `Topic` — a linkable SNS topic (wraps `sst.aws.SnsTopic`), the pub/sub fan-out
|
|
9
|
-
* bus. Link it to a publisher and the runtime resolves `<NAME>_ARN` and a
|
|
10
|
-
* `<NAME>_PUBLISHER_CONNECTION_STRING` (`sns://?topicArn=…`) that
|
|
11
|
-
* `@geekmidas/events`'s `Publisher.fromConnectionString` consumes. Subscribers
|
|
12
|
-
* attach via `TopicSubscriber`/`Subscriber`.
|
|
13
|
-
*
|
|
14
|
-
* `StorageProps`-style: `TopicProps` extends `sst.aws.SnsTopicArgs`.
|
|
15
|
-
* Source-only (extends ambient `sst.aws.*`); see docs §2.
|
|
16
|
-
*/
|
|
17
|
-
export class Topic<
|
|
18
|
-
TStage extends string = string,
|
|
19
|
-
TDomain extends string = string,
|
|
20
|
-
>
|
|
21
|
-
extends sst.aws.SnsTopic
|
|
22
|
-
implements GkmLinkable
|
|
23
|
-
{
|
|
24
|
-
readonly _id!: string;
|
|
25
|
-
|
|
26
|
-
get _type() {
|
|
27
|
-
return ResourceType.SnsTopic;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
constructor(
|
|
31
|
-
_stack: StackType<TStage, TDomain>,
|
|
32
|
-
name: string,
|
|
33
|
-
props: TopicProps = {},
|
|
34
|
-
) {
|
|
35
|
-
super(name, props);
|
|
36
|
-
this._id = name;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* The publisher's connection string, and nothing else.
|
|
41
|
-
*
|
|
42
|
-
* A subscriber is *bound* to a topic rather than depending on it, so the
|
|
43
|
-
* binding is an edge the deploy target reads and not a key anyone can hold —
|
|
44
|
-
* which is what keeps a subscriber from being able to publish.
|
|
45
|
-
*
|
|
46
|
-
* The region comes out of the topic's own ARN, for the same reason it does
|
|
47
|
-
* on a queue: the reader's region is not the resource's.
|
|
48
|
-
*/
|
|
49
|
-
provides(): Record<string, $util.Input<string>> {
|
|
50
|
-
return {
|
|
51
|
-
publisherConnectionString: $util
|
|
52
|
-
.output(this.arn)
|
|
53
|
-
.apply((topicArn) =>
|
|
54
|
-
snsUrl.build({ topicArn, region: regionOfArn(topicArn) }),
|
|
55
|
-
),
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
override getSSTLink() {
|
|
60
|
-
const link = super.getSSTLink();
|
|
61
|
-
return {
|
|
62
|
-
...link,
|
|
63
|
-
properties: { ...link.properties, ...this.provides() },
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export interface TopicProps extends sst.aws.SnsTopicArgs {}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The database bootstrap — role and schema DDL, run inside the VPC.
|
|
3
|
-
*
|
|
4
|
-
* SST provisions a cluster; nothing in Pulumi runs SQL. So the statements a
|
|
5
|
-
* tenant needs — its owner, its runtime role, its schema, and the grants between
|
|
6
|
-
* them — have to be applied by something that can reach the database, which on
|
|
7
|
-
* AWS means a Lambda in the same VPC.
|
|
8
|
-
*
|
|
9
|
-
* It connects **as the cluster master**, because that is the only credential
|
|
10
|
-
* that exists before any role does. That is also why this runs once per deploy
|
|
11
|
-
* and nothing else holds those credentials: the master reaches this function
|
|
12
|
-
* through its link and reaches nothing else.
|
|
13
|
-
*
|
|
14
|
-
* The statements come from `@geekmidas/db/pg/roles`, the same generator the
|
|
15
|
-
* local target uses. One implementation is what stops "works locally, fails
|
|
16
|
-
* deployed" — and it means the grants a developer tested against are the grants
|
|
17
|
-
* production gets.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
import { roleStatements } from '@geekmidas/db/pg/roles';
|
|
21
|
-
import pg from 'pg';
|
|
22
|
-
|
|
23
|
-
/** One tenant to bootstrap. */
|
|
24
|
-
export interface BootstrapTenant {
|
|
25
|
-
/** The construct id, so a failure can name it. */
|
|
26
|
-
id: string;
|
|
27
|
-
schema: string;
|
|
28
|
-
runtime: string;
|
|
29
|
-
owner: string;
|
|
30
|
-
reader?: string;
|
|
31
|
-
/**
|
|
32
|
-
* The database's own roles rather than a tenant's: its owner may create in
|
|
33
|
-
* the database, for trusted extensions.
|
|
34
|
-
*/
|
|
35
|
-
ownsDatabase?: boolean;
|
|
36
|
-
passwords: { runtime: string; owner: string; reader?: string };
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export interface BootstrapEvent {
|
|
40
|
-
/** The master credential, from the cluster's link. */
|
|
41
|
-
master: {
|
|
42
|
-
host: string;
|
|
43
|
-
port: number;
|
|
44
|
-
database: string;
|
|
45
|
-
username: string;
|
|
46
|
-
password: string;
|
|
47
|
-
};
|
|
48
|
-
tenants: BootstrapTenant[];
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export interface BootstrapResult {
|
|
52
|
-
applied: { tenant: string; describe: string; created: boolean }[];
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Apply every tenant's DDL, convergently.
|
|
57
|
-
*
|
|
58
|
-
* Each statement asks whether it is needed first, exactly as the local applier
|
|
59
|
-
* does, so a re-deploy is free and a half-applied run recovers by running again.
|
|
60
|
-
* That matters more here than locally: a Lambda can time out mid-way, and the
|
|
61
|
-
* recovery has to be "invoke it again" rather than "work out what happened".
|
|
62
|
-
*/
|
|
63
|
-
export async function handler(event: BootstrapEvent): Promise<BootstrapResult> {
|
|
64
|
-
const client = new pg.Client({
|
|
65
|
-
host: event.master.host,
|
|
66
|
-
port: event.master.port,
|
|
67
|
-
database: event.master.database,
|
|
68
|
-
user: event.master.username,
|
|
69
|
-
password: event.master.password,
|
|
70
|
-
// The cluster is inside the VPC and RDS presents a certificate this
|
|
71
|
-
// runtime does not carry a root for. Encrypted, unverified — which is the
|
|
72
|
-
// same posture the AWS SDK's own RDS helpers take, and worth naming rather
|
|
73
|
-
// than leaving as an unexplained `false`.
|
|
74
|
-
ssl: { rejectUnauthorized: false },
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
await client.connect();
|
|
78
|
-
|
|
79
|
-
const applied: BootstrapResult['applied'] = [];
|
|
80
|
-
|
|
81
|
-
try {
|
|
82
|
-
for (const tenant of event.tenants) {
|
|
83
|
-
const spec = {
|
|
84
|
-
...tenant,
|
|
85
|
-
...(tenant.ownsDatabase ? { database: event.master.database } : {}),
|
|
86
|
-
};
|
|
87
|
-
for (const statement of roleStatements(spec)) {
|
|
88
|
-
if (statement.exists) {
|
|
89
|
-
const { rows } = await client.query(
|
|
90
|
-
statement.exists.sql,
|
|
91
|
-
statement.exists.values,
|
|
92
|
-
);
|
|
93
|
-
|
|
94
|
-
if (rows.length > 0) {
|
|
95
|
-
applied.push({
|
|
96
|
-
tenant: tenant.id,
|
|
97
|
-
describe: statement.describe,
|
|
98
|
-
created: false,
|
|
99
|
-
});
|
|
100
|
-
continue;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
await client.query(statement.sql);
|
|
105
|
-
applied.push({
|
|
106
|
-
tenant: tenant.id,
|
|
107
|
-
describe: statement.describe,
|
|
108
|
-
// A grant has no existence check and re-granting is a no-op, so it
|
|
109
|
-
// reports unchanged — a converged deploy still reads as converged.
|
|
110
|
-
created: Boolean(statement.exists),
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
} finally {
|
|
115
|
-
await client.end();
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
return { applied };
|
|
119
|
-
}
|
package/src/sst/aws/ses.ts
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import { createHmac } from 'node:crypto';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* An SES SMTP password, derived from an IAM secret access key.
|
|
5
|
-
*
|
|
6
|
-
* SES does not hand you an SMTP password. It hands you IAM credentials, and the
|
|
7
|
-
* SMTP password is a *signature* computed from the secret access key with a
|
|
8
|
-
* fixed, documented recipe — so provisioning SMTP access means creating a user,
|
|
9
|
-
* creating an access key, and then doing this arithmetic. That is why `email` is
|
|
10
|
-
* the only kind whose provisioner is a chain rather than a component.
|
|
11
|
-
*
|
|
12
|
-
* The recipe is AWS's, verbatim: a SigV4 signing key over the constant date
|
|
13
|
-
* `11111111`, the region, the service `ses`, the terminator `aws4_request`, and
|
|
14
|
-
* the message `SendRawEmail` — then a one-byte version prefix, base64-encoded.
|
|
15
|
-
*
|
|
16
|
-
* Pure, which is the only way this gets checked at all: AWS documents the
|
|
17
|
-
* recipe but publishes no worked example, so there is no golden value to assert
|
|
18
|
-
* against. What the tests do instead is check the properties the recipe implies
|
|
19
|
-
* — the version byte survives, the output is deterministic, and it changes with
|
|
20
|
-
* both the key and the region. A wrong password fails at the first send, long
|
|
21
|
-
* after the stack reported success, so it is worth saying plainly that this has
|
|
22
|
-
* been verified against the documented algorithm and not against SES.
|
|
23
|
-
*
|
|
24
|
-
* @see https://docs.aws.amazon.com/ses/latest/dg/smtp-credentials.html
|
|
25
|
-
*/
|
|
26
|
-
export function smtpPassword(secretAccessKey: string, region: string): string {
|
|
27
|
-
// Not every region has an SMTP endpoint, and deriving a password for one
|
|
28
|
-
// that does not produces a credential that can never work — a failure that
|
|
29
|
-
// surfaces at the first send rather than at deploy.
|
|
30
|
-
if (!SMTP_REGIONS.includes(region)) throw new NoSmtpEndpoint(region);
|
|
31
|
-
|
|
32
|
-
// The date is a constant, not today's: this is a signing key that never
|
|
33
|
-
// rotates on a schedule, so AWS fixed the date rather than leaving a
|
|
34
|
-
// credential that silently expires.
|
|
35
|
-
const date = sign(`AWS4${secretAccessKey}`, '11111111');
|
|
36
|
-
const regional = sign(date, region);
|
|
37
|
-
const service = sign(regional, 'ses');
|
|
38
|
-
const terminated = sign(service, 'aws4_request');
|
|
39
|
-
const signature = sign(terminated, 'SendRawEmail');
|
|
40
|
-
|
|
41
|
-
// The version prefix tells SES which derivation produced the rest. Without
|
|
42
|
-
// it the password is the right bytes and still rejected.
|
|
43
|
-
return Buffer.concat([Buffer.from([VERSION]), signature]).toString('base64');
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/** The only version AWS has ever published. */
|
|
47
|
-
const VERSION = 0x04;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* The regions with an SES SMTP endpoint.
|
|
51
|
-
*
|
|
52
|
-
* Shorter than the list of regions SES runs in, and shorter still than the list
|
|
53
|
-
* of AWS regions — which is exactly why it is worth checking. AWS's own script
|
|
54
|
-
* raises on a region outside this set rather than returning a password that
|
|
55
|
-
* looks fine.
|
|
56
|
-
*/
|
|
57
|
-
export const SMTP_REGIONS: readonly string[] = [
|
|
58
|
-
'us-east-2',
|
|
59
|
-
'us-east-1',
|
|
60
|
-
'us-west-2',
|
|
61
|
-
'ap-south-1',
|
|
62
|
-
'ap-northeast-2',
|
|
63
|
-
'ap-southeast-1',
|
|
64
|
-
'ap-southeast-2',
|
|
65
|
-
'ap-northeast-1',
|
|
66
|
-
'ca-central-1',
|
|
67
|
-
'eu-central-1',
|
|
68
|
-
'eu-west-1',
|
|
69
|
-
'eu-west-2',
|
|
70
|
-
'eu-south-1',
|
|
71
|
-
'eu-north-1',
|
|
72
|
-
'sa-east-1',
|
|
73
|
-
'us-gov-west-1',
|
|
74
|
-
'us-gov-east-1',
|
|
75
|
-
];
|
|
76
|
-
|
|
77
|
-
/** SES has no SMTP endpoint in the region an email construct resolved to. */
|
|
78
|
-
export class NoSmtpEndpoint extends Error {
|
|
79
|
-
constructor(readonly region: string) {
|
|
80
|
-
super(
|
|
81
|
-
`SES has no SMTP endpoint in ${region}, so no SMTP password derived ` +
|
|
82
|
-
`for it can work. Send from one of: ${SMTP_REGIONS.join(', ')}.`,
|
|
83
|
-
);
|
|
84
|
-
this.name = 'NoSmtpEndpoint';
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function sign(key: string | Buffer, message: string): Buffer {
|
|
89
|
-
return createHmac('sha256', key).update(message, 'utf8').digest();
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Where SES accepts SMTP in a region.
|
|
94
|
-
*
|
|
95
|
-
* Read off the region rather than configured, for the same reason every other
|
|
96
|
-
* address in this package is: a host somebody types is a host that can be typed
|
|
97
|
-
* wrongly, and this one is derivable.
|
|
98
|
-
*/
|
|
99
|
-
export function smtpEndpoint(region: string): string {
|
|
100
|
-
return `email-smtp.${region}.amazonaws.com`;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* The submission port.
|
|
105
|
-
*
|
|
106
|
-
* 587 with STARTTLS rather than 465 with implicit TLS: both work, and 587 is the
|
|
107
|
-
* one that is not blocked by default on most networks — including, historically,
|
|
108
|
-
* on EC2.
|
|
109
|
-
*/
|
|
110
|
-
export const SMTP_PORT = 587;
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* An `smtp://` URL for a set of SES credentials.
|
|
114
|
-
*
|
|
115
|
-
* The same shape Mailpit gets locally and the same shape Resend gets deployed,
|
|
116
|
-
* which is the whole reason the declaration promises `smtp://` and names no
|
|
117
|
-
* provider: what changes between them is a host and a credential, and nothing a
|
|
118
|
-
* client can see.
|
|
119
|
-
*/
|
|
120
|
-
export function sesSmtpUrl(options: {
|
|
121
|
-
accessKeyId: string;
|
|
122
|
-
secretAccessKey: string;
|
|
123
|
-
region: string;
|
|
124
|
-
}): string {
|
|
125
|
-
const password = smtpPassword(options.secretAccessKey, options.region);
|
|
126
|
-
|
|
127
|
-
// Encoded, because a base64 password can contain `+` and `/` — both of which
|
|
128
|
-
// mean something else in a URL's authority section.
|
|
129
|
-
return `smtp://${encodeURIComponent(options.accessKeyId)}:${encodeURIComponent(
|
|
130
|
-
password,
|
|
131
|
-
)}@${smtpEndpoint(options.region)}:${SMTP_PORT}`;
|
|
132
|
-
}
|
package/src/sst/errors.ts
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Adapter errors.
|
|
3
|
-
*
|
|
4
|
-
* Messages state the rule, which is constant; the specifics are fields. An
|
|
5
|
-
* interpolated message cannot be matched on, reads differently every time it is
|
|
6
|
-
* thrown, and carries values into every log line that touches it.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/** A manifest declared a kind this adapter cannot provision. */
|
|
10
|
-
export class UnknownDeclarationKind extends Error {
|
|
11
|
-
/** The kind that had no provisioner. */
|
|
12
|
-
readonly kind: string;
|
|
13
|
-
/** What this adapter can provision — the actionable half of the failure. */
|
|
14
|
-
readonly supported: readonly string[];
|
|
15
|
-
|
|
16
|
-
constructor(kind: string, supported: readonly string[]) {
|
|
17
|
-
super('No provisioner for this declaration kind');
|
|
18
|
-
this.name = 'UnknownDeclarationKind';
|
|
19
|
-
this.kind = kind;
|
|
20
|
-
this.supported = supported;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* What the app declared a construct provides and what the component actually
|
|
26
|
-
* supplies have diverged.
|
|
27
|
-
*
|
|
28
|
-
* Caught at synth rather than as a missing environment variable at runtime,
|
|
29
|
-
* which is the failure it replaces.
|
|
30
|
-
*/
|
|
31
|
-
export class ProvidesMismatch extends Error {
|
|
32
|
-
/** The construct whose contract was broken. */
|
|
33
|
-
readonly id: string;
|
|
34
|
-
/** Declared by the app, not supplied by infra. */
|
|
35
|
-
readonly missing: readonly string[];
|
|
36
|
-
/** Supplied by infra, not declared by the app. */
|
|
37
|
-
readonly extra: readonly string[];
|
|
38
|
-
|
|
39
|
-
constructor(
|
|
40
|
-
id: string,
|
|
41
|
-
missing: readonly string[],
|
|
42
|
-
extra: readonly string[],
|
|
43
|
-
) {
|
|
44
|
-
super('Declared and supplied env keys do not match');
|
|
45
|
-
this.name = 'ProvidesMismatch';
|
|
46
|
-
this.id = id;
|
|
47
|
-
this.missing = missing;
|
|
48
|
-
this.extra = extra;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/** A dependency edge pointed at a construct the manifest does not contain. */
|
|
53
|
-
export class UnresolvedDependency extends Error {
|
|
54
|
-
/** The id the edge named. */
|
|
55
|
-
readonly target: string;
|
|
56
|
-
/** What the manifest does contain, so a typo is obvious. */
|
|
57
|
-
readonly available: readonly string[];
|
|
58
|
-
|
|
59
|
-
constructor(target: string, available: readonly string[]) {
|
|
60
|
-
super('Dependency target is not in the manifest');
|
|
61
|
-
this.name = 'UnresolvedDependency';
|
|
62
|
-
this.target = target;
|
|
63
|
-
this.available = available;
|
|
64
|
-
}
|
|
65
|
-
}
|