-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1f4daf9
commit 55efe7d
Showing
5 changed files
with
75 additions
and
76 deletions.
There are no files selected for viewing
20 changes: 10 additions & 10 deletions
20
docs/cv-maker/assets/index-DfIrSN-W.js → docs/cv-maker/assets/index-CVGpbTpr.js
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
docs/cv-maker/assets/index-Blgfszbd.css → docs/cv-maker/assets/index-mEAmrE1W.css
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -165,7 +165,6 @@ | |
"companyDescription", | ||
"website", | ||
"start", | ||
"end", | ||
"location", | ||
"projects" | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,62 @@ | ||
import { makeS3Client, s3, S3ClientTag } from "#/generated/s3.js" | ||
import { Effect } from "effect" | ||
import { readFile } from "fs/promises"; | ||
|
||
const deploy = | ||
Effect.gen(function* () { | ||
|
||
const bucketName = "kondaurovdev"; | ||
|
||
yield* s3("create_bucket", { | ||
Bucket: bucketName | ||
}).pipe( | ||
Effect.catchTags({ | ||
S3BucketAlreadyOwnedByYou: () => Effect.void | ||
}) | ||
); | ||
|
||
yield* s3("put_public_access_block", { | ||
Bucket: bucketName, | ||
PublicAccessBlockConfiguration: { | ||
BlockPublicAcls: false, | ||
BlockPublicPolicy: false, | ||
IgnorePublicAcls: false, | ||
RestrictPublicBuckets: false | ||
} | ||
}) | ||
|
||
const policy = JSON.stringify({ | ||
Version: "2012-10-17", | ||
Statement: [{ | ||
Sid: "PublicRead", | ||
Effect: "Allow", | ||
Principal: "*", | ||
Action: "s3:GetObject", | ||
Resource: `arn:aws:s3:::${bucketName}/*`, | ||
}], | ||
}); | ||
|
||
yield* s3("put_bucket_policy", { | ||
Bucket: bucketName, | ||
Policy: policy | ||
}).pipe( | ||
Effect.catchAll(error => Effect.logError("policy error", error)) | ||
); | ||
|
||
const html = yield* Effect.tryPromise(() => readFile("resume.html")); | ||
|
||
yield* s3("put_object", { | ||
Bucket: bucketName, | ||
Key: "kondaurov_resume.pdf", | ||
Body: html | ||
}); | ||
|
||
}) | ||
|
||
deploy.pipe( | ||
Effect.provideServiceEffect(S3ClientTag, makeS3Client({ | ||
region: "eu-west-1" | ||
})), | ||
Effect.catchAllCause(error => Effect.logError("deploy error", error)), | ||
Effect.runPromise | ||
); | ||
// import { makeS3Client, s3, S3ClientTag } from "#/generated/s3.js" | ||
// import { Effect } from "effect" | ||
// import { readFile } from "fs/promises"; | ||
|
||
// const deploy = | ||
// Effect.gen(function* () { | ||
|
||
// const bucketName = "kondaurovdev"; | ||
|
||
// yield* s3("create_bucket", { | ||
// Bucket: bucketName | ||
// }).pipe( | ||
// Effect.catchTags({ | ||
// S3BucketAlreadyOwnedByYou: () => Effect.void | ||
// }) | ||
// ); | ||
|
||
// yield* s3("put_public_access_block", { | ||
// Bucket: bucketName, | ||
// PublicAccessBlockConfiguration: { | ||
// BlockPublicAcls: false, | ||
// BlockPublicPolicy: false, | ||
// IgnorePublicAcls: false, | ||
// RestrictPublicBuckets: false | ||
// } | ||
// }) | ||
|
||
// const policy = JSON.stringify({ | ||
// Version: "2012-10-17", | ||
// Statement: [{ | ||
// Sid: "PublicRead", | ||
// Effect: "Allow", | ||
// Principal: "*", | ||
// Action: "s3:GetObject", | ||
// Resource: `arn:aws:s3:::${bucketName}/*`, | ||
// }], | ||
// }); | ||
|
||
// yield* s3("put_bucket_policy", { | ||
// Bucket: bucketName, | ||
// Policy: policy | ||
// }).pipe( | ||
// Effect.catchAll(error => Effect.logError("policy error", error)) | ||
// ); | ||
|
||
// const html = yield* Effect.tryPromise(() => readFile("resume.html")); | ||
|
||
// yield* s3("put_object", { | ||
// Bucket: bucketName, | ||
// Key: "kondaurov_resume.pdf", | ||
// Body: html | ||
// }); | ||
|
||
// }) | ||
|
||
// deploy.pipe( | ||
// Effect.provideServiceEffect(S3ClientTag, makeS3Client({ | ||
// region: "eu-west-1" | ||
// })), | ||
// Effect.catchAllCause(error => Effect.logError("deploy error", error)), | ||
// Effect.runPromise | ||
// ); |