@stacksjs/dns 0.70.23 → 0.70.25

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.
@@ -0,0 +1,28 @@
1
+ import type { CommandError, DeployOptions, Subprocess } from '@stacksjs/types';
2
+ import type { CreateHostedZoneResult, HostedZone } from '@stacksjs/ts-cloud/aws';
3
+ import type { Result } from '@stacksjs/error-handling';
4
+ export declare function deleteHostedZone(domainName: string): Promise<Result<string, Error>>;
5
+ // sometimes it's useful to delete all records but keep the hosted zone
6
+ // for example, if you want to keep the nameservers
7
+ export declare function deleteHostedZoneRecords(domainName: string): Promise<Result<string, Error>>;
8
+ export declare function createHostedZone(domainName: string): Promise<Result<HostedZone | CreateHostedZoneResult | string | null, Error>>;
9
+ export declare function writeNameserversToConfig(nameservers: string[]): void;
10
+ export declare function findHostedZone(domain: string): Promise<Result<string | null | undefined, Error>>;
11
+ /**
12
+ * Get nameservers from Route53 Domains (for domains registered via Route53)
13
+ */
14
+ export declare function getNameservers(domainName?: string): Promise<string[] | undefined>;
15
+ /**
16
+ * Get nameservers from the Route53 hosted zone's delegation set
17
+ * This works for any hosted zone, regardless of where the domain is registered
18
+ */
19
+ export declare function getHostedZoneNameservers(domainName: string): Promise<string[]>;
20
+ /**
21
+ * Update nameservers for a domain registered via Route53 Domains
22
+ * If the domain is not registered via Route53 (external domain), this will skip the update
23
+ * and just write the hosted zone nameservers to config
24
+ */
25
+ export declare function updateNameservers(hostedZoneNameservers: string[], domainName?: string): Promise<boolean | undefined>;
26
+ // please note, this function also updates the user's nameservers if they are out of date
27
+ export declare function hasUserDomainBeenAddedToCloud(domainName?: string): Promise<boolean>;
28
+ export declare function addDomain(options: DeployOptions): Promise<Result<Subprocess, CommandError>>;
@@ -0,0 +1,16 @@
1
+ // import { type NestedStackProps } from 'aws-cdk-lib'
2
+ // import { NestedStack, aws_route53 as route53 } from 'aws-cdk-lib'
3
+ // import { type Construct } from 'constructs'
4
+ // import { app } from '@stacksjs/config'
5
+ // export class DnsStack extends NestedStack {
6
+ // constructor(scope: Construct, id: string, props?: NestedStackProps) {
7
+ // super(scope, id, props)
8
+ // if (!app.url)
9
+ // throw new Error('./config app.url is not defined')
10
+ // new route53.PublicHostedZone(this, 'HostedZone', {
11
+ // zoneName: app.url,
12
+ // })
13
+ // }
14
+ // }
15
+ export * from './drivers/aws';
16
+ export * from '@stacksjs/dnsx';
package/package.json CHANGED
@@ -1,10 +1,12 @@
1
1
  {
2
2
  "name": "@stacksjs/dns",
3
3
  "type": "module",
4
- "version": "0.70.23",
4
+ "version": "0.70.25",
5
5
  "description": "Easily manage your DNS.",
6
6
  "author": "Chris Breuer",
7
- "contributors": ["Chris Breuer <chris@stacksjs.org>"],
7
+ "contributors": [
8
+ "Chris Breuer <chris@stacksjs.com>"
9
+ ],
8
10
  "license": "MIT",
9
11
  "funding": "https://github.com/sponsors/chrisbbreuer",
10
12
  "homepage": "https://github.com/stacksjs/stacks/tree/main/storage/framework/core/dns#readme",
@@ -30,28 +32,36 @@
30
32
  ],
31
33
  "exports": {
32
34
  ".": {
35
+ "bun": "./src/index.ts",
36
+ "types": "./dist/index.d.ts",
33
37
  "import": "./dist/index.js"
34
38
  },
35
39
  "./*": {
40
+ "bun": "./src/*",
36
41
  "import": "./dist/*"
37
42
  }
38
43
  },
39
- "files": ["README.md", "dist"],
44
+ "files": [
45
+ "README.md",
46
+ "dist"
47
+ ],
40
48
  "scripts": {
41
49
  "build": "bun build.ts",
42
50
  "typecheck": "bun tsc --noEmit",
43
51
  "prepublishOnly": "bun run build"
44
52
  },
53
+ "dependencies": {
54
+ "@stacksjs/dnsx": "^0.2.3",
55
+ "@stacksjs/ts-cloud": "^0.2.15"
56
+ },
45
57
  "devDependencies": {
46
- "@aws-sdk/client-route-53": "^3.777.0",
47
- "@stacksjs/actions": "0.70.22",
48
- "@stacksjs/development": "0.70.22",
49
- "@stacksjs/dnsx": "^0.2.2",
50
- "@stacksjs/error-handling": "0.70.22",
51
- "@stacksjs/path": "0.70.22",
52
- "@stacksjs/storage": "0.70.22",
53
- "@stacksjs/strings": "0.70.22",
54
- "@stacksjs/whois": "0.70.22",
55
- "aws-cdk-lib": "^2.187.0"
56
- }
58
+ "@stacksjs/actions": "0.70.23",
59
+ "better-dx": "^0.2.12",
60
+ "@stacksjs/error-handling": "0.70.23",
61
+ "@stacksjs/path": "0.70.23",
62
+ "@stacksjs/storage": "0.70.23",
63
+ "@stacksjs/strings": "0.70.23",
64
+ "@stacksjs/whois": "0.70.23"
65
+ },
66
+ "sideEffects": false
57
67
  }
package/dist/aws.d.ts DELETED
@@ -1,12 +0,0 @@
1
- import type { CommandError, DeployOptions, Subprocess } from '@stacksjs/types';
2
- import type { CreateHostedZoneCommandOutput, HostedZone } from '@aws-sdk/client-route-53';
3
-
4
- export declare function deleteHostedZone(domainName: string): Promise<Result<string, Error>>;
5
- export declare function deleteHostedZoneRecords(domainName: string): Promise<Result<string, Error>>;
6
- export declare function createHostedZone(domainName: string): Promise<Result<HostedZone | CreateHostedZoneCommandOutput | string | null, Error>>;
7
- export declare function writeNameserversToConfig(nameservers: string[]): void;
8
- export declare function findHostedZone(domain: string): Promise<Result<string | null | undefined, Error>>;
9
- export declare function getNameservers(domainName?: string): Promise<string[] | undefined>;
10
- export declare function updateNameservers(hostedZoneNameservers: string[], domainName?: string): Promise<boolean | undefined>;
11
- export declare function hasUserDomainBeenAddedToCloud(domainName?: string): Promise<boolean>;
12
- export declare function addDomain(options: DeployOptions): Promise<Result<Subprocess, CommandError>>;
package/dist/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './drivers/aws'
2
- export * from '@stacksjs/dnsx'