@awsless/awsless 0.0.27 → 0.0.29
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 +1 -1
- package/dist/bin.cjs +13 -7
- package/dist/bin.js +13 -7
- package/dist/index.cjs +17 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.js +14 -0
- package/package.json +1 -1
package/README.MD
CHANGED
package/dist/bin.cjs
CHANGED
|
@@ -854,9 +854,7 @@ var rollupBundle = async (input) => {
|
|
|
854
854
|
},
|
|
855
855
|
plugins: [
|
|
856
856
|
(0, import_plugin_commonjs.default)({ sourceMap: true }),
|
|
857
|
-
(0, import_plugin_node_resolve.default)({
|
|
858
|
-
preferBuiltins: true
|
|
859
|
-
}),
|
|
857
|
+
(0, import_plugin_node_resolve.default)({ preferBuiltins: true }),
|
|
860
858
|
(0, import_rollup_plugin_swc3.swc)({
|
|
861
859
|
minify: true,
|
|
862
860
|
jsc: {
|
|
@@ -4210,6 +4208,9 @@ var fileExist = async (file) => {
|
|
|
4210
4208
|
var importFile = async (path) => {
|
|
4211
4209
|
const bundle = await (0, import_rollup3.rollup)({
|
|
4212
4210
|
input: path,
|
|
4211
|
+
onwarn: (error) => {
|
|
4212
|
+
debugError(error.message);
|
|
4213
|
+
},
|
|
4213
4214
|
plugins: [
|
|
4214
4215
|
(0, import_rollup_plugin_replace.default)({
|
|
4215
4216
|
__dirname: (id) => `'${(0, import_path3.dirname)(id)}'`
|
|
@@ -4530,7 +4531,7 @@ var Renderer = class {
|
|
|
4530
4531
|
flushing = false;
|
|
4531
4532
|
screen = [];
|
|
4532
4533
|
width() {
|
|
4533
|
-
return this.output.columns -
|
|
4534
|
+
return this.output.columns - 3;
|
|
4534
4535
|
}
|
|
4535
4536
|
height() {
|
|
4536
4537
|
return this.output.rows;
|
|
@@ -4783,10 +4784,13 @@ var assetBuilder = (app) => {
|
|
|
4783
4784
|
if (assets.length === 0) {
|
|
4784
4785
|
return;
|
|
4785
4786
|
}
|
|
4787
|
+
const showDetailedView = assets.length <= term.out.height() - 2;
|
|
4786
4788
|
const done = term.out.write(loadingDialog("Building stack assets..."));
|
|
4787
4789
|
const groups = new Signal([""]);
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
+
if (showDetailedView) {
|
|
4791
|
+
term.out.gap();
|
|
4792
|
+
term.out.write(groups);
|
|
4793
|
+
}
|
|
4790
4794
|
const stackNameSize = Math.max(...stacks.map((stack) => stack.name.length));
|
|
4791
4795
|
const assetTypeSize = Math.max(...assets.map((asset) => asset.type.length));
|
|
4792
4796
|
await Promise.all(app.stacks.map(async (stack) => {
|
|
@@ -4847,7 +4851,9 @@ var assetBuilder = (app) => {
|
|
|
4847
4851
|
}));
|
|
4848
4852
|
}));
|
|
4849
4853
|
done("Done building stack assets");
|
|
4850
|
-
|
|
4854
|
+
if (showDetailedView) {
|
|
4855
|
+
term.out.gap();
|
|
4856
|
+
}
|
|
4851
4857
|
};
|
|
4852
4858
|
};
|
|
4853
4859
|
|
package/dist/bin.js
CHANGED
|
@@ -831,9 +831,7 @@ var rollupBundle = async (input) => {
|
|
|
831
831
|
},
|
|
832
832
|
plugins: [
|
|
833
833
|
commonjs({ sourceMap: true }),
|
|
834
|
-
nodeResolve({
|
|
835
|
-
preferBuiltins: true
|
|
836
|
-
}),
|
|
834
|
+
nodeResolve({ preferBuiltins: true }),
|
|
837
835
|
swc({
|
|
838
836
|
minify: true,
|
|
839
837
|
jsc: {
|
|
@@ -4187,6 +4185,9 @@ var fileExist = async (file) => {
|
|
|
4187
4185
|
var importFile = async (path) => {
|
|
4188
4186
|
const bundle = await rollup2({
|
|
4189
4187
|
input: path,
|
|
4188
|
+
onwarn: (error) => {
|
|
4189
|
+
debugError(error.message);
|
|
4190
|
+
},
|
|
4190
4191
|
plugins: [
|
|
4191
4192
|
replace({
|
|
4192
4193
|
__dirname: (id) => `'${dirname2(id)}'`
|
|
@@ -4507,7 +4508,7 @@ var Renderer = class {
|
|
|
4507
4508
|
flushing = false;
|
|
4508
4509
|
screen = [];
|
|
4509
4510
|
width() {
|
|
4510
|
-
return this.output.columns -
|
|
4511
|
+
return this.output.columns - 3;
|
|
4511
4512
|
}
|
|
4512
4513
|
height() {
|
|
4513
4514
|
return this.output.rows;
|
|
@@ -4760,10 +4761,13 @@ var assetBuilder = (app) => {
|
|
|
4760
4761
|
if (assets.length === 0) {
|
|
4761
4762
|
return;
|
|
4762
4763
|
}
|
|
4764
|
+
const showDetailedView = assets.length <= term.out.height() - 2;
|
|
4763
4765
|
const done = term.out.write(loadingDialog("Building stack assets..."));
|
|
4764
4766
|
const groups = new Signal([""]);
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
+
if (showDetailedView) {
|
|
4768
|
+
term.out.gap();
|
|
4769
|
+
term.out.write(groups);
|
|
4770
|
+
}
|
|
4767
4771
|
const stackNameSize = Math.max(...stacks.map((stack) => stack.name.length));
|
|
4768
4772
|
const assetTypeSize = Math.max(...assets.map((asset) => asset.type.length));
|
|
4769
4773
|
await Promise.all(app.stacks.map(async (stack) => {
|
|
@@ -4824,7 +4828,9 @@ var assetBuilder = (app) => {
|
|
|
4824
4828
|
}));
|
|
4825
4829
|
}));
|
|
4826
4830
|
done("Done building stack assets");
|
|
4827
|
-
|
|
4831
|
+
if (showDetailedView) {
|
|
4832
|
+
term.out.gap();
|
|
4833
|
+
}
|
|
4828
4834
|
};
|
|
4829
4835
|
};
|
|
4830
4836
|
|
package/dist/index.cjs
CHANGED
|
@@ -23,10 +23,13 @@ __export(src_exports, {
|
|
|
23
23
|
defineAppConfig: () => defineAppConfig,
|
|
24
24
|
definePlugin: () => definePlugin,
|
|
25
25
|
defineStackConfig: () => defineStackConfig,
|
|
26
|
+
getCacheProps: () => getCacheProps,
|
|
26
27
|
getFunctionName: () => getFunctionName,
|
|
27
28
|
getGlobalResourceName: () => getGlobalResourceName,
|
|
28
29
|
getLocalResourceName: () => getLocalResourceName,
|
|
29
30
|
getQueueName: () => getQueueName,
|
|
31
|
+
getSearchName: () => getSearchName,
|
|
32
|
+
getSecretName: () => getSecretName,
|
|
30
33
|
getStoreName: () => getStoreName,
|
|
31
34
|
getTableName: () => getTableName,
|
|
32
35
|
getTopicName: () => getTopicName
|
|
@@ -46,10 +49,21 @@ var getGlobalResourceName = (id) => {
|
|
|
46
49
|
return `${APP}-${id}`;
|
|
47
50
|
};
|
|
48
51
|
var getFunctionName = getLocalResourceName;
|
|
52
|
+
var getSearchName = getLocalResourceName;
|
|
49
53
|
var getTableName = getLocalResourceName;
|
|
50
54
|
var getStoreName = getLocalResourceName;
|
|
51
55
|
var getQueueName = getLocalResourceName;
|
|
52
56
|
var getTopicName = getGlobalResourceName;
|
|
57
|
+
var getSecretName = (name) => {
|
|
58
|
+
return `/.awsless/${APP}/${name}`;
|
|
59
|
+
};
|
|
60
|
+
var getCacheProps = (name, stack = STACK) => {
|
|
61
|
+
const prefix = `CACHE_${stack}_${name}`;
|
|
62
|
+
return {
|
|
63
|
+
host: process.env[`${prefix}_HOST`],
|
|
64
|
+
port: parseInt(process.env[`${prefix}_PORT`], 10)
|
|
65
|
+
};
|
|
66
|
+
};
|
|
53
67
|
|
|
54
68
|
// src/index.ts
|
|
55
69
|
var defineStackConfig = (config) => {
|
|
@@ -63,10 +77,13 @@ var defineAppConfig = (config) => {
|
|
|
63
77
|
defineAppConfig,
|
|
64
78
|
definePlugin,
|
|
65
79
|
defineStackConfig,
|
|
80
|
+
getCacheProps,
|
|
66
81
|
getFunctionName,
|
|
67
82
|
getGlobalResourceName,
|
|
68
83
|
getLocalResourceName,
|
|
69
84
|
getQueueName,
|
|
85
|
+
getSearchName,
|
|
86
|
+
getSecretName,
|
|
70
87
|
getStoreName,
|
|
71
88
|
getTableName,
|
|
72
89
|
getTopicName
|
package/dist/index.d.ts
CHANGED
|
@@ -2469,10 +2469,16 @@ declare const definePlugin: <S extends AnyZodObject | undefined = undefined>(plu
|
|
|
2469
2469
|
declare const getLocalResourceName: (id: string, stack?: string) => string;
|
|
2470
2470
|
declare const getGlobalResourceName: (id: string) => string;
|
|
2471
2471
|
declare const getFunctionName: (id: string, stack?: string) => string;
|
|
2472
|
+
declare const getSearchName: (id: string, stack?: string) => string;
|
|
2472
2473
|
declare const getTableName: (id: string, stack?: string) => string;
|
|
2473
2474
|
declare const getStoreName: (id: string, stack?: string) => string;
|
|
2474
2475
|
declare const getQueueName: (id: string, stack?: string) => string;
|
|
2475
2476
|
declare const getTopicName: (id: string) => string;
|
|
2477
|
+
declare const getSecretName: (name: string) => string;
|
|
2478
|
+
declare const getCacheProps: (name: string, stack?: string) => {
|
|
2479
|
+
readonly host: string;
|
|
2480
|
+
readonly port: number;
|
|
2481
|
+
};
|
|
2476
2482
|
|
|
2477
2483
|
type AppConfig = CombinedDefaultPluginsConfigInput;
|
|
2478
2484
|
type StackConfig = CombinedDefaultPluginsConfigInput['stacks'][number];
|
|
@@ -2692,4 +2698,4 @@ declare const defineStackConfig: (config: StackConfig) => StackConfig$1 | (Stack
|
|
|
2692
2698
|
});
|
|
2693
2699
|
declare const defineAppConfig: (config: AppConfig | AppConfigFactory<AppConfig>) => CombinedDefaultPluginsConfigInput | AppConfigFactory<CombinedDefaultPluginsConfigInput>;
|
|
2694
2700
|
|
|
2695
|
-
export { AppConfig, Plugin, StackConfig, defineAppConfig, definePlugin, defineStackConfig, getFunctionName, getGlobalResourceName, getLocalResourceName, getQueueName, getStoreName, getTableName, getTopicName };
|
|
2701
|
+
export { AppConfig, Plugin, StackConfig, defineAppConfig, definePlugin, defineStackConfig, getCacheProps, getFunctionName, getGlobalResourceName, getLocalResourceName, getQueueName, getSearchName, getSecretName, getStoreName, getTableName, getTopicName };
|
package/dist/index.js
CHANGED
|
@@ -12,10 +12,21 @@ var getGlobalResourceName = (id) => {
|
|
|
12
12
|
return `${APP}-${id}`;
|
|
13
13
|
};
|
|
14
14
|
var getFunctionName = getLocalResourceName;
|
|
15
|
+
var getSearchName = getLocalResourceName;
|
|
15
16
|
var getTableName = getLocalResourceName;
|
|
16
17
|
var getStoreName = getLocalResourceName;
|
|
17
18
|
var getQueueName = getLocalResourceName;
|
|
18
19
|
var getTopicName = getGlobalResourceName;
|
|
20
|
+
var getSecretName = (name) => {
|
|
21
|
+
return `/.awsless/${APP}/${name}`;
|
|
22
|
+
};
|
|
23
|
+
var getCacheProps = (name, stack = STACK) => {
|
|
24
|
+
const prefix = `CACHE_${stack}_${name}`;
|
|
25
|
+
return {
|
|
26
|
+
host: process.env[`${prefix}_HOST`],
|
|
27
|
+
port: parseInt(process.env[`${prefix}_PORT`], 10)
|
|
28
|
+
};
|
|
29
|
+
};
|
|
19
30
|
|
|
20
31
|
// src/index.ts
|
|
21
32
|
var defineStackConfig = (config) => {
|
|
@@ -28,10 +39,13 @@ export {
|
|
|
28
39
|
defineAppConfig,
|
|
29
40
|
definePlugin,
|
|
30
41
|
defineStackConfig,
|
|
42
|
+
getCacheProps,
|
|
31
43
|
getFunctionName,
|
|
32
44
|
getGlobalResourceName,
|
|
33
45
|
getLocalResourceName,
|
|
34
46
|
getQueueName,
|
|
47
|
+
getSearchName,
|
|
48
|
+
getSecretName,
|
|
35
49
|
getStoreName,
|
|
36
50
|
getTableName,
|
|
37
51
|
getTopicName
|