@awsless/awsless 0.0.13 → 0.0.14

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/dist/index.cjs CHANGED
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var src_exports = {};
22
22
  __export(src_exports, {
23
+ defineAppConfig: () => defineAppConfig,
23
24
  definePlugin: () => definePlugin,
24
25
  getFunctionName: () => getFunctionName,
25
26
  getQueueName: () => getQueueName,
@@ -53,8 +54,14 @@ var getQueueName = (id, stack) => {
53
54
  var getStoreName = (id, stack) => {
54
55
  return getResourceName("store", id, stack);
55
56
  };
57
+
58
+ // src/index.ts
59
+ var defineAppConfig = (config) => {
60
+ return config;
61
+ };
56
62
  // Annotate the CommonJS export names for ESM import in node:
57
63
  0 && (module.exports = {
64
+ defineAppConfig,
58
65
  definePlugin,
59
66
  getFunctionName,
60
67
  getQueueName,
package/dist/index.d.ts CHANGED
@@ -1,13 +1,25 @@
1
- import * as aws_cdk_lib_aws_dynamodb_index_js from 'aws-cdk-lib/aws-dynamodb/index.js';
2
- import * as aws_cdk_lib_aws_events_index_js from 'aws-cdk-lib/aws-events/index.js';
1
+ import { AwsCredentialIdentityProvider } from '@aws-sdk/types';
3
2
  import * as aws_cdk_lib from 'aws-cdk-lib';
4
3
  import { Stack, App } from 'aws-cdk-lib';
5
4
  import * as zod from 'zod';
6
- import { z, AnyZodObject } from 'zod';
7
- import { AwsCredentialIdentityProvider } from '@aws-sdk/types';
5
+ import { AnyZodObject, z } from 'zod';
8
6
  import { Function } from 'aws-cdk-lib/aws-lambda';
7
+ import * as aws_cdk_lib_aws_route53_index_js from 'aws-cdk-lib/aws-route53/index.js';
8
+ import * as aws_cdk_lib_aws_dynamodb_index_js from 'aws-cdk-lib/aws-dynamodb/index.js';
9
+ import * as aws_cdk_lib_aws_events_index_js from 'aws-cdk-lib/aws-events/index.js';
9
10
  import * as aws_cdk_lib_aws_lambda_index_js from 'aws-cdk-lib/aws-lambda/index.js';
10
11
 
12
+ type ProgramOptions = {
13
+ configFile?: string;
14
+ stage?: string;
15
+ profile?: string;
16
+ region?: string;
17
+ mute?: boolean;
18
+ verbose?: boolean;
19
+ };
20
+
21
+ type Credentials = AwsCredentialIdentityProvider;
22
+
11
23
  type AssetDetails = Record<string, string>;
12
24
  type AssetOptions = {
13
25
  id: number;
@@ -29,46 +41,11 @@ declare class Assets {
29
41
  map(cb: (stackName: string, assets: AssetOptions[]) => Promise<void>): Promise<void>[];
30
42
  }
31
43
 
32
- type Credentials = AwsCredentialIdentityProvider;
33
-
34
44
  type StackConfig$1 = {
35
45
  name: string;
36
46
  depends?: Array<StackConfig$1>;
37
47
  };
38
48
 
39
- declare const AppSchema: z.ZodObject<{
40
- name: z.ZodString;
41
- region: z.ZodEnum<["us-east-2", "us-east-1", "us-west-1", "us-west-2", "af-south-1", "ap-east-1", "ap-south-2", "ap-southeast-3", "ap-southeast-4", "ap-south-1", "ap-northeast-3", "ap-northeast-2", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ca-central-1", "eu-central-1", "eu-west-1", "eu-west-2", "eu-south-1", "eu-west-3", "eu-south-2", "eu-north-1", "eu-central-2", "me-south-1", "me-central-1", "sa-east-1"]>;
42
- profile: z.ZodString;
43
- stage: z.ZodDefault<z.ZodString>;
44
- defaults: z.ZodDefault<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
45
- stacks: z.ZodArray<z.ZodType<StackConfig$1, z.ZodTypeDef, StackConfig$1>, "many">;
46
- plugins: z.ZodOptional<z.ZodArray<z.ZodType<Plugin<z.AnyZodObject | undefined>, z.ZodTypeDef, Plugin<z.AnyZodObject | undefined>>, "many">>;
47
- }, "strip", z.ZodTypeAny, {
48
- defaults: {};
49
- stacks: StackConfig$1[];
50
- name: string;
51
- region: "us-east-2" | "us-east-1" | "us-west-1" | "us-west-2" | "af-south-1" | "ap-east-1" | "ap-south-2" | "ap-southeast-3" | "ap-southeast-4" | "ap-south-1" | "ap-northeast-3" | "ap-northeast-2" | "ap-southeast-1" | "ap-southeast-2" | "ap-northeast-1" | "ca-central-1" | "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-south-1" | "eu-west-3" | "eu-south-2" | "eu-north-1" | "eu-central-2" | "me-south-1" | "me-central-1" | "sa-east-1";
52
- profile: string;
53
- stage: string;
54
- plugins?: Plugin<z.AnyZodObject | undefined>[] | undefined;
55
- }, {
56
- stacks: StackConfig$1[];
57
- name: string;
58
- region: "us-east-2" | "us-east-1" | "us-west-1" | "us-west-2" | "af-south-1" | "ap-east-1" | "ap-south-2" | "ap-southeast-3" | "ap-southeast-4" | "ap-south-1" | "ap-northeast-3" | "ap-northeast-2" | "ap-southeast-1" | "ap-southeast-2" | "ap-northeast-1" | "ca-central-1" | "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-south-1" | "eu-west-3" | "eu-south-2" | "eu-north-1" | "eu-central-2" | "me-south-1" | "me-central-1" | "sa-east-1";
59
- profile: string;
60
- stage?: string | undefined;
61
- defaults?: {} | undefined;
62
- plugins?: Plugin<z.AnyZodObject | undefined>[] | undefined;
63
- }>;
64
- type AppConfigInput = z.input<typeof AppSchema>;
65
- type AppConfigOutput = z.output<typeof AppSchema>;
66
-
67
- type BaseConfig = AppConfigOutput & {
68
- account: string;
69
- credentials: Credentials;
70
- };
71
-
72
49
  type Binding = (lambda: Function) => void;
73
50
 
74
51
  type ExtendedConfigOutput<S extends AnyZodObject | undefined = undefined> = (S extends AnyZodObject ? BaseConfig & z.output<S> : BaseConfig);
@@ -101,6 +78,34 @@ type Plugin<S extends AnyZodObject | undefined = undefined> = {
101
78
  };
102
79
  declare const definePlugin: <S extends AnyZodObject | undefined = undefined>(plugin: Plugin<S>) => Plugin<S>;
103
80
 
81
+ declare const AppSchema: z.ZodObject<{
82
+ name: z.ZodString;
83
+ region: z.ZodEnum<["us-east-2", "us-east-1", "us-west-1", "us-west-2", "af-south-1", "ap-east-1", "ap-south-2", "ap-southeast-3", "ap-southeast-4", "ap-south-1", "ap-northeast-3", "ap-northeast-2", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ca-central-1", "eu-central-1", "eu-west-1", "eu-west-2", "eu-south-1", "eu-west-3", "eu-south-2", "eu-north-1", "eu-central-2", "me-south-1", "me-central-1", "sa-east-1"]>;
84
+ profile: z.ZodString;
85
+ stage: z.ZodDefault<z.ZodString>;
86
+ defaults: z.ZodDefault<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
87
+ stacks: z.ZodArray<z.ZodType<StackConfig$1, z.ZodTypeDef, StackConfig$1>, "many">;
88
+ plugins: z.ZodOptional<z.ZodArray<z.ZodType<Plugin<z.AnyZodObject | undefined>, z.ZodTypeDef, Plugin<z.AnyZodObject | undefined>>, "many">>;
89
+ }, "strip", z.ZodTypeAny, {
90
+ defaults: {};
91
+ stacks: StackConfig$1[];
92
+ name: string;
93
+ region: "us-east-2" | "us-east-1" | "us-west-1" | "us-west-2" | "af-south-1" | "ap-east-1" | "ap-south-2" | "ap-southeast-3" | "ap-southeast-4" | "ap-south-1" | "ap-northeast-3" | "ap-northeast-2" | "ap-southeast-1" | "ap-southeast-2" | "ap-northeast-1" | "ca-central-1" | "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-south-1" | "eu-west-3" | "eu-south-2" | "eu-north-1" | "eu-central-2" | "me-south-1" | "me-central-1" | "sa-east-1";
94
+ profile: string;
95
+ stage: string;
96
+ plugins?: Plugin<z.AnyZodObject | undefined>[] | undefined;
97
+ }, {
98
+ stacks: StackConfig$1[];
99
+ name: string;
100
+ region: "us-east-2" | "us-east-1" | "us-west-1" | "us-west-2" | "af-south-1" | "ap-east-1" | "ap-south-2" | "ap-southeast-3" | "ap-southeast-4" | "ap-south-1" | "ap-northeast-3" | "ap-northeast-2" | "ap-southeast-1" | "ap-southeast-2" | "ap-northeast-1" | "ca-central-1" | "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-south-1" | "eu-west-3" | "eu-south-2" | "eu-north-1" | "eu-central-2" | "me-south-1" | "me-central-1" | "sa-east-1";
101
+ profile: string;
102
+ stage?: string | undefined;
103
+ defaults?: {} | undefined;
104
+ plugins?: Plugin<z.AnyZodObject | undefined>[] | undefined;
105
+ }>;
106
+ type AppConfigInput = z.input<typeof AppSchema>;
107
+ type AppConfigOutput = z.output<typeof AppSchema>;
108
+
104
109
  declare const defaultPlugins: (Plugin<zod.ZodObject<{
105
110
  defaults: zod.ZodDefault<zod.ZodObject<{
106
111
  function: zod.ZodDefault<zod.ZodObject<{
@@ -965,22 +970,6 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
965
970
  environment?: Record<string, string> | undefined;
966
971
  }> | undefined;
967
972
  }[];
968
- }>> | Plugin<zod.ZodObject<{
969
- stacks: zod.ZodArray<zod.ZodObject<{
970
- searchs: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
971
- }, "strip", zod.ZodTypeAny, {
972
- searchs?: string[] | undefined;
973
- }, {
974
- searchs?: string[] | undefined;
975
- }>, "many">;
976
- }, "strip", zod.ZodTypeAny, {
977
- stacks: {
978
- searchs?: string[] | undefined;
979
- }[];
980
- }, {
981
- stacks: {
982
- searchs?: string[] | undefined;
983
- }[];
984
973
  }>> | Plugin<zod.ZodObject<{
985
974
  defaults: zod.ZodDefault<zod.ZodObject<{
986
975
  graphql: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
@@ -1537,9 +1526,159 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
1537
1526
  sqlVersion?: "2015-10-08" | "2016-03-23" | "beta" | undefined;
1538
1527
  }> | undefined;
1539
1528
  }[];
1529
+ }>> | Plugin<zod.ZodObject<{
1530
+ domains: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodArray<zod.ZodObject<{
1531
+ name: zod.ZodOptional<zod.ZodString>;
1532
+ type: zod.ZodEffects<zod.ZodEnum<["A" | "AAAA" | "MX" | "TXT" | "CNAME"]>, aws_cdk_lib_aws_route53_index_js.RecordType, "A" | "AAAA" | "MX" | "TXT" | "CNAME">;
1533
+ ttl: zod.ZodEffects<zod.ZodType<`${number} second` | `${number} seconds` | `${number} minute` | `${number} minutes` | `${number} hour` | `${number} hours` | `${number} day` | `${number} days`, zod.ZodTypeDef, `${number} second` | `${number} seconds` | `${number} minute` | `${number} minutes` | `${number} hour` | `${number} hours` | `${number} day` | `${number} days`>, aws_cdk_lib.Duration, `${number} second` | `${number} seconds` | `${number} minute` | `${number} minutes` | `${number} hour` | `${number} hours` | `${number} day` | `${number} days`>;
1534
+ records: zod.ZodArray<zod.ZodString, "many">;
1535
+ }, "strip", zod.ZodTypeAny, {
1536
+ type: aws_cdk_lib_aws_route53_index_js.RecordType;
1537
+ ttl: aws_cdk_lib.Duration;
1538
+ records: string[];
1539
+ name?: string | undefined;
1540
+ }, {
1541
+ type: "A" | "AAAA" | "MX" | "TXT" | "CNAME";
1542
+ ttl: (`${number} second` | `${number} seconds` | `${number} minute` | `${number} minutes` | `${number} hour` | `${number} hours` | `${number} day` | `${number} days`) & (`${number} second` | `${number} seconds` | `${number} minute` | `${number} minutes` | `${number} hour` | `${number} hours` | `${number} day` | `${number} days` | undefined);
1543
+ records: string[];
1544
+ name?: string | undefined;
1545
+ }>, "many">>>;
1546
+ }, "strip", zod.ZodTypeAny, {
1547
+ domains?: Record<string, {
1548
+ type: aws_cdk_lib_aws_route53_index_js.RecordType;
1549
+ ttl: aws_cdk_lib.Duration;
1550
+ records: string[];
1551
+ name?: string | undefined;
1552
+ }[]> | undefined;
1553
+ }, {
1554
+ domains?: Record<string, {
1555
+ type: "A" | "AAAA" | "MX" | "TXT" | "CNAME";
1556
+ ttl: (`${number} second` | `${number} seconds` | `${number} minute` | `${number} minutes` | `${number} hour` | `${number} hours` | `${number} day` | `${number} days`) & (`${number} second` | `${number} seconds` | `${number} minute` | `${number} minutes` | `${number} hour` | `${number} hours` | `${number} day` | `${number} days` | undefined);
1557
+ records: string[];
1558
+ name?: string | undefined;
1559
+ }[]> | undefined;
1560
+ }>> | Plugin<zod.ZodObject<{
1561
+ defaults: zod.ZodDefault<zod.ZodObject<{
1562
+ http: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
1563
+ domain: zod.ZodString;
1564
+ subDomain: zod.ZodString;
1565
+ }, "strip", zod.ZodTypeAny, {
1566
+ domain: string;
1567
+ subDomain: string;
1568
+ }, {
1569
+ domain: string;
1570
+ subDomain: string;
1571
+ }>>>;
1572
+ }, "strip", zod.ZodTypeAny, {
1573
+ http?: Record<string, {
1574
+ domain: string;
1575
+ subDomain: string;
1576
+ }> | undefined;
1577
+ }, {
1578
+ http?: Record<string, {
1579
+ domain: string;
1580
+ subDomain: string;
1581
+ }> | undefined;
1582
+ }>>;
1583
+ stacks: zod.ZodArray<zod.ZodObject<{
1584
+ http: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodRecord<zod.ZodType<`POST /${string}` | `GET /${string}` | `PUT /${string}` | `DELETE /${string}` | `HEAD /${string}` | `OPTIONS /${string}`, zod.ZodTypeDef, `POST /${string}` | `GET /${string}` | `PUT /${string}` | `DELETE /${string}` | `HEAD /${string}` | `OPTIONS /${string}`>, zod.ZodUnion<[zod.ZodEffects<zod.ZodString, string, string>, zod.ZodObject<{
1585
+ file: zod.ZodEffects<zod.ZodString, string, string>;
1586
+ timeout: zod.ZodOptional<zod.ZodEffects<zod.ZodType<`${number} second` | `${number} seconds` | `${number} minute` | `${number} minutes` | `${number} hour` | `${number} hours` | `${number} day` | `${number} days`, zod.ZodTypeDef, `${number} second` | `${number} seconds` | `${number} minute` | `${number} minutes` | `${number} hour` | `${number} hours` | `${number} day` | `${number} days`>, aws_cdk_lib.Duration, `${number} second` | `${number} seconds` | `${number} minute` | `${number} minutes` | `${number} hour` | `${number} hours` | `${number} day` | `${number} days`>>;
1587
+ runtime: zod.ZodOptional<zod.ZodEffects<zod.ZodEnum<["container" | "rust" | "nodejs16.x" | "nodejs18.x" | "python3.9" | "python3.10" | "go1.x" | "go"]>, aws_cdk_lib_aws_lambda_index_js.Runtime, "container" | "rust" | "nodejs16.x" | "nodejs18.x" | "python3.9" | "python3.10" | "go1.x" | "go">>;
1588
+ memorySize: zod.ZodOptional<zod.ZodEffects<zod.ZodType<`${number} KB` | `${number} MB` | `${number} GB`, zod.ZodTypeDef, `${number} KB` | `${number} MB` | `${number} GB`>, aws_cdk_lib.Size, `${number} KB` | `${number} MB` | `${number} GB`>>;
1589
+ architecture: zod.ZodOptional<zod.ZodEffects<zod.ZodEnum<["x86_64", "arm_64"]>, aws_cdk_lib_aws_lambda_index_js.Architecture, "x86_64" | "arm_64">>;
1590
+ ephemeralStorageSize: zod.ZodOptional<zod.ZodEffects<zod.ZodType<`${number} KB` | `${number} MB` | `${number} GB`, zod.ZodTypeDef, `${number} KB` | `${number} MB` | `${number} GB`>, aws_cdk_lib.Size, `${number} KB` | `${number} MB` | `${number} GB`>>;
1591
+ retryAttempts: zod.ZodNumber;
1592
+ environment: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
1593
+ }, "strip", zod.ZodTypeAny, {
1594
+ retryAttempts: number;
1595
+ file: string;
1596
+ timeout?: aws_cdk_lib.Duration | undefined;
1597
+ runtime?: aws_cdk_lib_aws_lambda_index_js.Runtime | undefined;
1598
+ memorySize?: aws_cdk_lib.Size | undefined;
1599
+ architecture?: aws_cdk_lib_aws_lambda_index_js.Architecture | undefined;
1600
+ ephemeralStorageSize?: aws_cdk_lib.Size | undefined;
1601
+ environment?: Record<string, string> | undefined;
1602
+ }, {
1603
+ retryAttempts: number;
1604
+ file: string;
1605
+ timeout?: `${number} second` | `${number} seconds` | `${number} minute` | `${number} minutes` | `${number} hour` | `${number} hours` | `${number} day` | `${number} days` | undefined;
1606
+ runtime?: "container" | "rust" | "nodejs16.x" | "nodejs18.x" | "python3.9" | "python3.10" | "go1.x" | "go" | undefined;
1607
+ memorySize?: `${number} KB` | `${number} MB` | `${number} GB` | undefined;
1608
+ architecture?: "x86_64" | "arm_64" | undefined;
1609
+ ephemeralStorageSize?: `${number} KB` | `${number} MB` | `${number} GB` | undefined;
1610
+ environment?: Record<string, string> | undefined;
1611
+ }>]>>>>;
1612
+ }, "strip", zod.ZodTypeAny, {
1613
+ http?: Record<string, Partial<Record<`POST /${string}` | `GET /${string}` | `PUT /${string}` | `DELETE /${string}` | `HEAD /${string}` | `OPTIONS /${string}`, string | {
1614
+ retryAttempts: number;
1615
+ file: string;
1616
+ timeout?: aws_cdk_lib.Duration | undefined;
1617
+ runtime?: aws_cdk_lib_aws_lambda_index_js.Runtime | undefined;
1618
+ memorySize?: aws_cdk_lib.Size | undefined;
1619
+ architecture?: aws_cdk_lib_aws_lambda_index_js.Architecture | undefined;
1620
+ ephemeralStorageSize?: aws_cdk_lib.Size | undefined;
1621
+ environment?: Record<string, string> | undefined;
1622
+ }>>> | undefined;
1623
+ }, {
1624
+ http?: Record<string, Partial<Record<`POST /${string}` | `GET /${string}` | `PUT /${string}` | `DELETE /${string}` | `HEAD /${string}` | `OPTIONS /${string}`, string | {
1625
+ retryAttempts: number;
1626
+ file: string;
1627
+ timeout?: `${number} second` | `${number} seconds` | `${number} minute` | `${number} minutes` | `${number} hour` | `${number} hours` | `${number} day` | `${number} days` | undefined;
1628
+ runtime?: "container" | "rust" | "nodejs16.x" | "nodejs18.x" | "python3.9" | "python3.10" | "go1.x" | "go" | undefined;
1629
+ memorySize?: `${number} KB` | `${number} MB` | `${number} GB` | undefined;
1630
+ architecture?: "x86_64" | "arm_64" | undefined;
1631
+ ephemeralStorageSize?: `${number} KB` | `${number} MB` | `${number} GB` | undefined;
1632
+ environment?: Record<string, string> | undefined;
1633
+ }>>> | undefined;
1634
+ }>, "many">;
1635
+ }, "strip", zod.ZodTypeAny, {
1636
+ defaults: {
1637
+ http?: Record<string, {
1638
+ domain: string;
1639
+ subDomain: string;
1640
+ }> | undefined;
1641
+ };
1642
+ stacks: {
1643
+ http?: Record<string, Partial<Record<`POST /${string}` | `GET /${string}` | `PUT /${string}` | `DELETE /${string}` | `HEAD /${string}` | `OPTIONS /${string}`, string | {
1644
+ retryAttempts: number;
1645
+ file: string;
1646
+ timeout?: aws_cdk_lib.Duration | undefined;
1647
+ runtime?: aws_cdk_lib_aws_lambda_index_js.Runtime | undefined;
1648
+ memorySize?: aws_cdk_lib.Size | undefined;
1649
+ architecture?: aws_cdk_lib_aws_lambda_index_js.Architecture | undefined;
1650
+ ephemeralStorageSize?: aws_cdk_lib.Size | undefined;
1651
+ environment?: Record<string, string> | undefined;
1652
+ }>>> | undefined;
1653
+ }[];
1654
+ }, {
1655
+ stacks: {
1656
+ http?: Record<string, Partial<Record<`POST /${string}` | `GET /${string}` | `PUT /${string}` | `DELETE /${string}` | `HEAD /${string}` | `OPTIONS /${string}`, string | {
1657
+ retryAttempts: number;
1658
+ file: string;
1659
+ timeout?: `${number} second` | `${number} seconds` | `${number} minute` | `${number} minutes` | `${number} hour` | `${number} hours` | `${number} day` | `${number} days` | undefined;
1660
+ runtime?: "container" | "rust" | "nodejs16.x" | "nodejs18.x" | "python3.9" | "python3.10" | "go1.x" | "go" | undefined;
1661
+ memorySize?: `${number} KB` | `${number} MB` | `${number} GB` | undefined;
1662
+ architecture?: "x86_64" | "arm_64" | undefined;
1663
+ ephemeralStorageSize?: `${number} KB` | `${number} MB` | `${number} GB` | undefined;
1664
+ environment?: Record<string, string> | undefined;
1665
+ }>>> | undefined;
1666
+ }[];
1667
+ defaults?: {
1668
+ http?: Record<string, {
1669
+ domain: string;
1670
+ subDomain: string;
1671
+ }> | undefined;
1672
+ } | undefined;
1540
1673
  }>>)[];
1541
1674
  type CombinedDefaultPluginsConfigInput = ExtendedConfigInput<typeof defaultPlugins[number]['schema']>;
1542
1675
 
1676
+ type BaseConfig = AppConfigOutput & {
1677
+ account: string;
1678
+ credentials: Credentials;
1679
+ };
1680
+ type AppConfigFactory<C = AppConfigInput> = (options: ProgramOptions) => C | Promise<C>;
1681
+
1543
1682
  declare const getResourceName: (type: string, id: string, stack?: string) => string;
1544
1683
  declare const getFunctionName: (id: string, stack?: string) => string;
1545
1684
  declare const getTableName: (id: string, stack?: string) => string;
@@ -1548,5 +1687,6 @@ declare const getStoreName: (id: string, stack?: string) => string;
1548
1687
 
1549
1688
  type AppConfig = CombinedDefaultPluginsConfigInput;
1550
1689
  type StackConfig = CombinedDefaultPluginsConfigInput['stacks'][number];
1690
+ declare const defineAppConfig: (config: AppConfig | AppConfigFactory<AppConfig>) => CombinedDefaultPluginsConfigInput | AppConfigFactory<CombinedDefaultPluginsConfigInput>;
1551
1691
 
1552
- export { AppConfig, Plugin, StackConfig, definePlugin, getFunctionName, getQueueName, getResourceName, getStoreName, getTableName };
1692
+ export { AppConfig, Plugin, StackConfig, defineAppConfig, definePlugin, getFunctionName, getQueueName, getResourceName, getStoreName, getTableName };
package/dist/index.js CHANGED
@@ -23,7 +23,13 @@ var getQueueName = (id, stack) => {
23
23
  var getStoreName = (id, stack) => {
24
24
  return getResourceName("store", id, stack);
25
25
  };
26
+
27
+ // src/index.ts
28
+ var defineAppConfig = (config) => {
29
+ return config;
30
+ };
26
31
  export {
32
+ defineAppConfig,
27
33
  definePlugin,
28
34
  getFunctionName,
29
35
  getQueueName,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awsless/awsless",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {