-
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
868e061
commit 7da4a2a
Showing
10 changed files
with
544 additions
and
499 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,41 +1,86 @@ | ||
# rename as .env | ||
AES_GCM_K=EXAMPLE_VALUE__1 | ||
AIRTABLE_BASE=EXAMPLE_VALUE__2 | ||
AIRTABLE_TABLE=EXAMPLE_VALUE__3 | ||
AIRTABLE_TOKEN=EXAMPLE_VALUE__4 | ||
AWS_DYN_TABLE_MEGA=EXAMPLE_VALUE__5 | ||
AWS_DYN_TABLE_SESSION=EXAMPLE_VALUE__6 | ||
AWS_KEY=EXAMPLE_VALUE__7 | ||
AWS_POLLY_BUCKET=EXAMPLE_VALUE__8 | ||
AWS_POLLY_PREFIX=EXAMPLE_VALUE__9 | ||
AWS_REGION=EXAMPLE_VALUE__10 | ||
AWS_SECRET=EXAMPLE_VALUE__11 | ||
CLOUDFLARE_ACCOUNT=EXAMPLE_VALUE__12 | ||
CLOUDFLARE_FEEDCITY_ACCESS_KEY=EXAMPLE_VALUE__13 | ||
CLOUDFLARE_FEEDCITY_ACCESS_SECRET=EXAMPLE_VALUE__14 | ||
CLOUDFLARE_FEEDCITY_TOKEN=EXAMPLE_VALUE__15 | ||
JWT_KEY_ALG=EXAMPLE_VALUE__16 | ||
JWT_KEY_CRV=EXAMPLE_VALUE__17 | ||
JWT_KEY_D_PRIVATE=EXAMPLE_VALUE__18 | ||
JWT_KEY_EXT=EXAMPLE_VALUE__19 | ||
JWT_KEY_ID=EXAMPLE_VALUE__20 | ||
JWT_KEY_KTY=EXAMPLE_VALUE__21 | ||
JWT_KEY_OPS_PRIVATE=EXAMPLE_VALUE__22 | ||
JWT_KEY_OPS_PUBLIC=EXAMPLE_VALUE__23 | ||
JWT_KEY_X=EXAMPLE_VALUE__24 | ||
JWT_KEY_Y=EXAMPLE_VALUE__25 | ||
OPENAI_ORGID=EXAMPLE_VALUE__26 | ||
OPENAI_PROD_KEY=EXAMPLE_VALUE__27 | ||
OPENAI_TEST_KEY=EXAMPLE_VALUE__28 | ||
RSA_KEY_E=EXAMPLE_VALUE__29 | ||
RSA_KEY_N=EXAMPLE_VALUE__30 | ||
RSA_KEY_PRIVATE_D=EXAMPLE_VALUE__31 | ||
RSA_KEY_PRIVATE_DP=EXAMPLE_VALUE__32 | ||
RSA_KEY_PRIVATE_DQ=EXAMPLE_VALUE__33 | ||
RSA_KEY_PRIVATE_P=EXAMPLE_VALUE__34 | ||
RSA_KEY_PRIVATE_Q=EXAMPLE_VALUE__35 | ||
RSA_KEY_PRIVATE_QI=EXAMPLE_VALUE__36 | ||
STRIPE_PUBLISHED_TOKEN=EXAMPLE_VALUE__37 | ||
STRIPE_SECRET_TOKEN=EXAMPLE_VALUE__38 | ||
STRIPE_TEST_PUBLISHED_TOKEN=EXAMPLE_VALUE__39 | ||
STRIPE_TEST_SECRET_TOKEN=EXAMPLE_VALUE__40 | ||
# duplicate as new file = /.env | ||
# | ||
# | ||
# AIRTABLE | ||
# Almost Helpful links | ||
# https://airtable.com/BASE/TABLE/viwpnTY4IlG3WaCow | ||
# https://airtable.com/BASE/api/docs#curl/introductio | ||
# https://airtable.com/create/tokens | ||
AIRTABLE_BASE="EXAMPLE_VALUE__" | ||
AIRTABLE_TABLE="EXAMPLE_VALUE__" | ||
AIRTABLE_TOKEN="EXAMPLE_VALUE__" | ||
|
||
|
||
# AWS | ||
# Almost Helpful Commands | ||
# $> aws dynamodb list-tables | ||
# $> aws s3 ls | ||
AWS_DYN_TABLE_MEGA="EXAMPLE_VALUE__" | ||
AWS_DYN_TABLE_SESSION="EXAMPLE_VALUE__" | ||
AWS_POLLY_BUCKET="EXAMPLE_VALUE__" | ||
AWS_POLLY_PREFIX="EXAMPLE_VALUE__" | ||
AWS_REGION="EXAMPLE_VALUE__" | ||
AWS_KEY="EXAMPLE_VALUE__" | ||
AWS_SECRET="EXAMPLE_VALUE__" | ||
|
||
|
||
## CLOUDFLARE | ||
# Helpful Links for My Account | ||
# https://dash.cloudflare.com/ACCOUNT/DOMAINNAME | ||
CLOUDFLARE_ACCOUNT="EXAMPLE_VALUE__" | ||
CLOUDFLARE_ZONEID="EXAMPLE_VALUE__" | ||
CLOUDFLARE_FEEDCITY_TOKEN="EXAMPLE_VALUE__" # TokenName: FeedsCityToken#2023.12.14 | ||
CLOUDFLARE_FEEDCITY_ACCESS_KEY="EXAMPLE_VALUE__" | ||
CLOUDFLARE_FEEDCITY_ACCESS_SECRET="EXAMPLE_VALUE__" | ||
|
||
## OPENAI | ||
# Helpful Links for My Account | ||
# https://platform.openai.com/account/organization | ||
# https://platform.openai.com/api-keys | ||
OPENAI_ORGID="EXAMPLE_VALUE__" | ||
OPENAI_PROD_KEY="EXAMPLE_VALUE__" # KeyName: ProdKey#2023.12.14 | ||
OPENAI_TEST_KEY="EXAMPLE_VALUE__" # KeyName: TestKey#2023.12.14 | ||
|
||
|
||
# STRIPE | ||
# Helpful Link | ||
# https://dashboard.stripe.com/test/apikeys | ||
STRIPE_PUBLISHED_TOKEN="EXAMPLE_VALUE__" | ||
STRIPE_SECRET_TOKEN="EXAMPLE_VALUE__" | ||
STRIPE_TEST_PUBLISHED_TOKEN="EXAMPLE_VALUE__" | ||
STRIPE_TEST_SECRET_TOKEN="EXAMPLE_VALUE__" | ||
STRIPE_ACCT_ID="EXAMPLE_VALUE__" | ||
|
||
# PRIVATE KEY VALUES GENERATED BY UTILS/KEYS | ||
# | ||
## AES | ||
# $> deno run utils/keys/gen-aes-gcm.ts | ||
AES_GCM_K="EXAMPLE_VALUE__" | ||
# | ||
# | ||
## JWT | ||
# $> deno run utils/keys/gen-ecdsa.ts | ||
JWT_KEY_ALG="EXAMPLE_VALUE__" | ||
JWT_KEY_CRV="EXAMPLE_VALUE__" | ||
JWT_KEY_D_PRIVATE="EXAMPLE_VALUE__" | ||
JWT_KEY_EXT="EXAMPLE_VALUE__" | ||
JWT_KEY_ID="EXAMPLE_VALUE__" | ||
JWT_KEY_KTY="EXAMPLE_VALUE__" | ||
JWT_KEY_OPS_PRIVATE="EXAMPLE_VALUE__" | ||
JWT_KEY_OPS_PUBLIC="EXAMPLE_VALUE__" | ||
JWT_KEY_X="EXAMPLE_VALUE__" | ||
JWT_KEY_Y="EXAMPLE_VALUE__" | ||
# | ||
# | ||
# | ||
## RSA | ||
# | ||
# $> deno run utils/keys/gen-rsa.ts | ||
RSA_KEY_E="EXAMPLE_VALUE__" | ||
RSA_KEY_N="EXAMPLE_VALUE__" | ||
RSA_KEY_PRIVATE_D="EXAMPLE_VALUE__" | ||
RSA_KEY_PRIVATE_DP="EXAMPLE_VALUE__" | ||
RSA_KEY_PRIVATE_DQ="EXAMPLE_VALUE__" | ||
RSA_KEY_PRIVATE_P="EXAMPLE_VALUE__" | ||
RSA_KEY_PRIVATE_Q="EXAMPLE_VALUE__" | ||
RSA_KEY_PRIVATE_QI="EXAMPLE_VALUE__" |
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
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,17 +1,27 @@ | ||
#!/usr/bin/env deno run ./utils/env/genExample.ts -A | ||
import { parse } from "$std/dotenv/mod.ts"; | ||
// import { parse } from "$std/dotenv/mod.ts"; | ||
import * as path from "$std/path/mod.ts"; | ||
|
||
const u = new URL(import.meta.url); | ||
const filePath = path.resolve(u.pathname, "../../../.env"); | ||
// console.log({filePath}); | ||
|
||
const realEnvText = await Deno.readTextFile(filePath); | ||
const ENVS = parse(realEnvText); | ||
// const ENVS = parse(realEnvText); | ||
|
||
console.log("# rename as .env"); | ||
Object.entries(ENVS) | ||
.sort(([keyA], [keyB]) => keyA.localeCompare(keyB)) | ||
.forEach(([k, _], i) => { | ||
console.log(`${k}=EXAMPLE_VALUE__${i + 1}`); | ||
}); | ||
// console.log("# rename as .env"); | ||
// Object.entries(ENVS) | ||
// .sort(([keyA], [keyB]) => keyA.localeCompare(keyB)) | ||
// .forEach(([k, _], i) => { | ||
// console.log(`${k}=EXAMPLE_VALUE__${i + 1}`); | ||
// }); | ||
|
||
// console.log("\n\n\n"); | ||
|
||
console.log(realEnvText | ||
.replace(/=[\w._+-]+/g, `="EXAMPLE_VALUE__"`) | ||
.replace(/="[\w._+-]+"/g, `="EXAMPLE_VALUE__"`) | ||
.replace(/='[\w._+-]+'/g, `="EXAMPLE_VALUE__"`) | ||
); | ||
|
||
console.log('Always double-check the data to not expose secrets before checking in an example') |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env deno run ./utils/env/genExample.ts -A | ||
import { parse } from "$std/dotenv/mod.ts"; | ||
import * as path from "$std/path/mod.ts"; | ||
|
||
const u = new URL(import.meta.url); | ||
const filePath = path.resolve(u.pathname, "../../../.env"); | ||
// console.log({filePath}); | ||
|
||
const realEnvText = await Deno.readTextFile(filePath); | ||
const ENVS = parse(realEnvText); | ||
|
||
console.log('Copy paste this to the env: section of deno.yml \n\n\n') | ||
|
||
const vars = { | ||
AWS_DYN_TABLE_MEGA: true, | ||
AWS_POLLY_BUCKET: true, | ||
AWS_POLLY_PREFIX: true, | ||
AWS_REGION: true, | ||
JWT_KEY_EXT: true, | ||
JWT_KEY_OPS_PRIVATE: true, | ||
JWT_KEY_OPS_PUBLIC: true, | ||
} | ||
|
||
Object.entries(ENVS) | ||
.sort(([keyA], [keyB]) => keyA.localeCompare(keyB)) | ||
.forEach(([key, _]) => { | ||
if(key in vars) { | ||
console.log(`${key}: \${{ vars.${key} }}`) | ||
} else { | ||
console.log(`${key}: \${{ secrets.${key} }}`) | ||
} | ||
}); | ||
|
||
console.log('\n\n\n') |
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
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
7da4a2a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failed to deploy: