@awsless/awsless 0.0.29 → 0.0.30

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
@@ -42,13 +42,15 @@ var definePlugin = (plugin) => plugin;
42
42
  // src/node/resource.ts
43
43
  var APP = process.env.APP || "app";
44
44
  var STACK = process.env.STACK || "stack";
45
- var getLocalResourceName = (id, stack = STACK) => {
46
- return `${APP}-${stack}-${id}`;
45
+ var getLocalResourceName = (name, stack = STACK) => {
46
+ return `${APP}-${stack}-${name}`;
47
47
  };
48
- var getGlobalResourceName = (id) => {
49
- return `${APP}-${id}`;
48
+ var getGlobalResourceName = (name) => {
49
+ return `${APP}-${name}`;
50
+ };
51
+ var getFunctionName = (stack, name) => {
52
+ return getLocalResourceName(name, stack);
50
53
  };
51
- var getFunctionName = getLocalResourceName;
52
54
  var getSearchName = getLocalResourceName;
53
55
  var getTableName = getLocalResourceName;
54
56
  var getStoreName = getLocalResourceName;
package/dist/index.d.ts CHANGED
@@ -2466,16 +2466,16 @@ type Plugin<S extends AnyZodObject | undefined = undefined> = {
2466
2466
  };
2467
2467
  declare const definePlugin: <S extends AnyZodObject | undefined = undefined>(plugin: Plugin<S>) => Plugin<S>;
2468
2468
 
2469
- declare const getLocalResourceName: (id: string, stack?: string) => string;
2470
- declare const getGlobalResourceName: (id: string) => string;
2471
- declare const getFunctionName: (id: string, stack?: string) => string;
2472
- declare const getSearchName: (id: string, stack?: string) => string;
2473
- declare const getTableName: (id: string, stack?: string) => string;
2474
- declare const getStoreName: (id: string, stack?: string) => string;
2475
- declare const getQueueName: (id: string, stack?: string) => string;
2476
- declare const getTopicName: (id: string) => string;
2469
+ declare const getLocalResourceName: <N extends string, S extends string = "stack">(name: N, stack?: S) => `app-${S}-${N}`;
2470
+ declare const getGlobalResourceName: <N extends string>(name: N) => `app-${N}`;
2471
+ declare const getFunctionName: (stack: string, name: string) => `app-${string}-${string}`;
2472
+ declare const getSearchName: <N extends string, S extends string = "stack">(name: N, stack?: S) => `app-${S}-${N}`;
2473
+ declare const getTableName: <N extends string, S extends string = "stack">(name: N, stack?: S) => `app-${S}-${N}`;
2474
+ declare const getStoreName: <N extends string, S extends string = "stack">(name: N, stack?: S) => `app-${S}-${N}`;
2475
+ declare const getQueueName: <N extends string, S extends string = "stack">(name: N, stack?: S) => `app-${S}-${N}`;
2476
+ declare const getTopicName: <N extends string>(name: N) => `app-${N}`;
2477
2477
  declare const getSecretName: (name: string) => string;
2478
- declare const getCacheProps: (name: string, stack?: string) => {
2478
+ declare const getCacheProps: (name: string, stack?: "stack") => {
2479
2479
  readonly host: string;
2480
2480
  readonly port: number;
2481
2481
  };
package/dist/index.js CHANGED
@@ -5,13 +5,15 @@ import {
5
5
  // src/node/resource.ts
6
6
  var APP = process.env.APP || "app";
7
7
  var STACK = process.env.STACK || "stack";
8
- var getLocalResourceName = (id, stack = STACK) => {
9
- return `${APP}-${stack}-${id}`;
8
+ var getLocalResourceName = (name, stack = STACK) => {
9
+ return `${APP}-${stack}-${name}`;
10
10
  };
11
- var getGlobalResourceName = (id) => {
12
- return `${APP}-${id}`;
11
+ var getGlobalResourceName = (name) => {
12
+ return `${APP}-${name}`;
13
+ };
14
+ var getFunctionName = (stack, name) => {
15
+ return getLocalResourceName(name, stack);
13
16
  };
14
- var getFunctionName = getLocalResourceName;
15
17
  var getSearchName = getLocalResourceName;
16
18
  var getTableName = getLocalResourceName;
17
19
  var getStoreName = getLocalResourceName;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awsless/awsless",
3
- "version": "0.0.29",
3
+ "version": "0.0.30",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {