@awsless/awsless 0.0.476 → 0.0.477
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/bin.js +39 -22
- package/dist/client.js +5 -4
- package/dist/prebuild/rpc/bundle.zip +0 -0
- package/package.json +11 -11
package/dist/bin.js
CHANGED
|
@@ -4305,7 +4305,14 @@ var getForwardHostFunctionCode = () => {
|
|
|
4305
4305
|
|
|
4306
4306
|
// src/feature/site/index.ts
|
|
4307
4307
|
import { camelCase as camelCase6, constantCase as constantCase10 } from "change-case";
|
|
4308
|
+
|
|
4309
|
+
// src/util/exec.ts
|
|
4308
4310
|
import { exec } from "promisify-child-process";
|
|
4311
|
+
var execCommand = async ({ cwd, command }) => {
|
|
4312
|
+
await exec(command, { cwd });
|
|
4313
|
+
};
|
|
4314
|
+
|
|
4315
|
+
// src/feature/site/index.ts
|
|
4309
4316
|
var siteFeature = defineFeature({
|
|
4310
4317
|
name: "site",
|
|
4311
4318
|
onStack(ctx) {
|
|
@@ -4323,7 +4330,10 @@ var siteFeature = defineFeature({
|
|
|
4323
4330
|
const fingerprint = await generateCacheKey(buildProps.cacheKey);
|
|
4324
4331
|
return build3(fingerprint, async (write) => {
|
|
4325
4332
|
const cwd = join11(directories.root, dirname7(ctx.stackConfig.file));
|
|
4326
|
-
await
|
|
4333
|
+
await execCommand({
|
|
4334
|
+
cwd,
|
|
4335
|
+
command: buildProps.command
|
|
4336
|
+
});
|
|
4327
4337
|
await write("HASH", fingerprint);
|
|
4328
4338
|
return {
|
|
4329
4339
|
size: "n/a"
|
|
@@ -4418,24 +4428,26 @@ var siteFeature = defineFeature({
|
|
|
4418
4428
|
signingBehavior: "always",
|
|
4419
4429
|
signingProtocol: "sigv4"
|
|
4420
4430
|
});
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
for (const file of files) {
|
|
4427
|
-
const object = new $15.aws.s3.BucketObject(group, file, {
|
|
4428
|
-
bucket: bucket.bucket,
|
|
4429
|
-
key: file,
|
|
4430
|
-
cacheControl: getCacheControl(file),
|
|
4431
|
-
contentType: getContentType(file),
|
|
4432
|
-
source: join11(props.static, file),
|
|
4433
|
-
sourceHash: $hash(join11(props.static, file))
|
|
4431
|
+
ctx.onReady(() => {
|
|
4432
|
+
if (typeof props.static === "string") {
|
|
4433
|
+
const files = glob2.sync("**", {
|
|
4434
|
+
cwd: props.static,
|
|
4435
|
+
nodir: true
|
|
4434
4436
|
});
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
+
for (const file of files) {
|
|
4438
|
+
const object = new $15.aws.s3.BucketObject(group, file, {
|
|
4439
|
+
bucket: bucket.bucket,
|
|
4440
|
+
key: file,
|
|
4441
|
+
cacheControl: getCacheControl(file),
|
|
4442
|
+
contentType: getContentType(file),
|
|
4443
|
+
source: join11(props.static, file),
|
|
4444
|
+
sourceHash: $hash(join11(props.static, file))
|
|
4445
|
+
});
|
|
4446
|
+
versions.push(object.key);
|
|
4447
|
+
versions.push(object.etag);
|
|
4448
|
+
}
|
|
4437
4449
|
}
|
|
4438
|
-
}
|
|
4450
|
+
});
|
|
4439
4451
|
origins.push({
|
|
4440
4452
|
originId: "static",
|
|
4441
4453
|
domainName: bucket.bucketRegionalDomainName,
|
|
@@ -6013,13 +6025,16 @@ var createApp = (props) => {
|
|
|
6013
6025
|
}
|
|
6014
6026
|
}
|
|
6015
6027
|
}
|
|
6016
|
-
|
|
6017
|
-
listener
|
|
6018
|
-
|
|
6028
|
+
const ready = () => {
|
|
6029
|
+
for (const listener of readyListeners) {
|
|
6030
|
+
listener();
|
|
6031
|
+
}
|
|
6032
|
+
};
|
|
6019
6033
|
return {
|
|
6020
6034
|
app,
|
|
6021
6035
|
base,
|
|
6022
6036
|
zones,
|
|
6037
|
+
ready,
|
|
6023
6038
|
domainZones,
|
|
6024
6039
|
tests,
|
|
6025
6040
|
binds,
|
|
@@ -6239,7 +6254,8 @@ var del2 = (program2) => {
|
|
|
6239
6254
|
const profile = appConfig.profile;
|
|
6240
6255
|
const credentials = getCredentials(profile);
|
|
6241
6256
|
const accountId = await getAccountId(credentials, region);
|
|
6242
|
-
const { app } = createApp({ appConfig, stackConfigs, accountId });
|
|
6257
|
+
const { app, ready } = createApp({ appConfig, stackConfigs, accountId });
|
|
6258
|
+
ready();
|
|
6243
6259
|
const stackNames = app.stacks.filter((stack) => {
|
|
6244
6260
|
return !!filters.find((f) => wildstring2.match(f, stack.name));
|
|
6245
6261
|
}).map((s) => s.name);
|
|
@@ -6621,7 +6637,7 @@ var deploy = (program2) => {
|
|
|
6621
6637
|
const credentials = getCredentials(profile);
|
|
6622
6638
|
const accountId = await getAccountId(credentials, region);
|
|
6623
6639
|
await bootstrapAwsless({ credentials, region, accountId });
|
|
6624
|
-
const { app, tests, builders } = createApp({
|
|
6640
|
+
const { app, tests, builders, ready } = createApp({
|
|
6625
6641
|
appConfig,
|
|
6626
6642
|
stackConfigs,
|
|
6627
6643
|
accountId,
|
|
@@ -6649,6 +6665,7 @@ var deploy = (program2) => {
|
|
|
6649
6665
|
}
|
|
6650
6666
|
}
|
|
6651
6667
|
await buildAssets(builders, filters);
|
|
6668
|
+
ready();
|
|
6652
6669
|
const { workspace, state: state2 } = await createWorkSpace({
|
|
6653
6670
|
credentials,
|
|
6654
6671
|
accountId,
|
package/dist/client.js
CHANGED
|
@@ -89,13 +89,14 @@ var createPubSubClient = (app, props) => {
|
|
|
89
89
|
password: config.token
|
|
90
90
|
};
|
|
91
91
|
});
|
|
92
|
+
const getApp = () => {
|
|
93
|
+
return typeof app === "string" ? app : app();
|
|
94
|
+
};
|
|
92
95
|
const getPubSubTopic = (name) => {
|
|
93
|
-
|
|
94
|
-
return `${appName}/pubsub/${name}`;
|
|
96
|
+
return `${getApp()}/pubsub/${name}`;
|
|
95
97
|
};
|
|
96
98
|
const fromPubSubTopic = (name) => {
|
|
97
|
-
|
|
98
|
-
return name.replace(`${appName}/pubsub/`, "");
|
|
99
|
+
return name.replace(`${getApp()}/pubsub/`, "");
|
|
99
100
|
};
|
|
100
101
|
return {
|
|
101
102
|
...mqtt,
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awsless/awsless",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.477",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -29,17 +29,17 @@
|
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"@awsless/json": "^0.0.8",
|
|
32
|
-
"@awsless/
|
|
33
|
-
"@awsless/dynamodb": "^0.1.5",
|
|
34
|
-
"@awsless/lambda": "^0.0.32",
|
|
32
|
+
"@awsless/open-search": "^0.0.17",
|
|
35
33
|
"@awsless/redis": "^0.0.14",
|
|
34
|
+
"@awsless/dynamodb": "^0.1.5",
|
|
36
35
|
"@awsless/s3": "^0.0.20",
|
|
37
|
-
"@awsless/
|
|
38
|
-
"@awsless/sns": "^0.0.10",
|
|
36
|
+
"@awsless/lambda": "^0.0.32",
|
|
39
37
|
"@awsless/validate": "^0.0.19",
|
|
38
|
+
"@awsless/sns": "^0.0.10",
|
|
40
39
|
"@awsless/mqtt": "^0.0.2",
|
|
41
|
-
"@awsless/
|
|
40
|
+
"@awsless/iot": "^0.0.3",
|
|
42
41
|
"@awsless/weak-cache": "^0.0.1",
|
|
42
|
+
"@awsless/ssm": "^0.0.7",
|
|
43
43
|
"@awsless/sqs": "^0.0.8"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
@@ -120,13 +120,13 @@
|
|
|
120
120
|
"zod": "^3.24.2",
|
|
121
121
|
"zod-to-json-schema": "^3.24.3",
|
|
122
122
|
"@awsless/code": "^0.0.10",
|
|
123
|
-
"@awsless/formation": "^0.0.73",
|
|
124
123
|
"@awsless/duration": "^0.0.3",
|
|
125
|
-
"@awsless/
|
|
124
|
+
"@awsless/formation": "^0.0.73",
|
|
126
125
|
"@awsless/graphql": "^0.0.9",
|
|
127
126
|
"@awsless/json": "^0.0.8",
|
|
128
|
-
"@awsless/
|
|
129
|
-
"@awsless/validate": "^0.0.19"
|
|
127
|
+
"@awsless/size": "^0.0.2",
|
|
128
|
+
"@awsless/validate": "^0.0.19",
|
|
129
|
+
"@awsless/ts-file-cache": "^0.0.12"
|
|
130
130
|
},
|
|
131
131
|
"devDependencies": {
|
|
132
132
|
"@node-rs/bcrypt": "^1.10.5"
|