@driveflux/env 5.0.11 → 5.1.1
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/.turbo/turbo-build$colon$all.log +16 -0
- package/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +22 -0
- package/dist/augment-env.js +8 -3
- package/dist/augment-env.js.map +3 -6
- package/dist/bin/init-env-bin.js.map +9 -11
- package/dist/bin/init-env.js +10708 -30
- package/dist/chunk-a04mfzxz.js +130 -0
- package/dist/chunk-a04mfzxz.js.map +12 -0
- package/dist/chunk-rjywhrqs.js +34 -0
- package/dist/chunk-rjywhrqs.js.map +10 -0
- package/dist/chunk-tx1bsdta.js +11092 -0
- package/dist/chunk-tx1bsdta.js.map +105 -0
- package/dist/init-env.js +9 -30
- package/dist/init-env.js.map +3 -99
- package/dist/init-shell.js +10 -3
- package/dist/init-shell.js.map +3 -4
- package/dist/main.js +16 -2
- package/dist/main.js.map +2 -2
- package/package.json +2 -2
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
$ bun tsc --emitDeclarationOnly && bun run ./build.ts
|
|
2
|
+
🔍 Scanning folder: ./dist
|
|
3
|
+
📄 Found 4 JS files to process
|
|
4
|
+
|
|
5
|
+
📊 Processing Summary:
|
|
6
|
+
Files processed: 4
|
|
7
|
+
Total exports found: 9
|
|
8
|
+
Duplicates removed: 3
|
|
9
|
+
Total processing time: 20.44ms
|
|
10
|
+
Average time per file: 5.11ms
|
|
11
|
+
|
|
12
|
+
🔧 Files with duplicates removed:
|
|
13
|
+
dist/augment-env.js: 1 duplicates removed (3.11ms)
|
|
14
|
+
dist/init-shell.js: 1 duplicates removed (3.31ms)
|
|
15
|
+
dist/init-env.js: 1 duplicates removed (10.89ms)
|
|
16
|
+
✅ Build successful
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
$ bun run ./build.ts
|
|
2
2
|
🔍 Scanning folder: ./dist
|
|
3
|
-
📄 Found
|
|
3
|
+
📄 Found 8 JS files to process
|
|
4
4
|
|
|
5
5
|
📊 Processing Summary:
|
|
6
|
-
Files processed:
|
|
6
|
+
Files processed: 8
|
|
7
7
|
Total exports found: 9
|
|
8
8
|
Duplicates removed: 0
|
|
9
|
-
Total processing time:
|
|
10
|
-
Average time per file:
|
|
9
|
+
Total processing time: 37.25ms
|
|
10
|
+
Average time per file: 4.66ms
|
|
11
11
|
|
|
12
12
|
✅ No duplicate exports found in any files
|
|
13
13
|
✅ Build successful
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @driveflux/env
|
|
2
2
|
|
|
3
|
+
## 5.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 83047ad: upgraded deps
|
|
8
|
+
|
|
9
|
+
## 5.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 2e1009f: Increment minor
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- e96957a: bump
|
|
18
|
+
|
|
19
|
+
## 5.0.12
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- b51fd80: Bump
|
|
24
|
+
|
|
3
25
|
## 5.0.11
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/dist/augment-env.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
augmentEnv
|
|
4
|
+
} from "./chunk-a04mfzxz.js";
|
|
5
|
+
export {
|
|
6
|
+
augmentEnv
|
|
7
|
+
};
|
|
3
8
|
|
|
4
|
-
//# debugId=
|
|
9
|
+
//# debugId=F8FE29C9C8790CF764756E2164756E21
|
|
5
10
|
//# sourceMappingURL=augment-env.js.map
|
package/dist/augment-env.js.map
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [
|
|
3
|
+
"sources": [],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"export const getAppEnv = () => {\n if (process.env.APP_ENV) {\n return process.env.APP_ENV\n }\n\n // If USE_ENV is set, use it\n if (process.env.USE_ENV) {\n return process.env.USE_ENV\n }\n\n // If NODE_ENV is set, use it\n if (process.env.NODE_ENV) {\n return process.env.NODE_ENV\n }\n\n // Default to development as a last resort\n return 'development'\n}\n\nconst isAppEnv = (env: string) => getAppEnv() === env\nexport const isProd = () => isAppEnv('production')\n",
|
|
6
|
-
"type SlackIds = {\n -readonly [k in keyof typeof slackProductionChannels]: string\n}\ntype NotionIds = {\n -readonly [k in keyof typeof notionProductionChannels]: string\n}\n\nconst slackProductionChannels = {\n SLACK_DEFAULT_CHANNEL_ID: 'C0679V8KGSH',\n SLACK_RESERVATIONS_CHANNEL_ID: 'C01G8B12G67',\n SLACK_FBC_CHANNEL: 'C01L1AAKB3N',\n SLACK_BD_CHANNEL: 'CN21PGKK8',\n SLACK_MAIN_FLUX_CHANNEL: 'GHDPV1858',\n SLACK_INQUIRIES_CHANNEL_ID: 'C067CSK5J5Q',\n SLACK_INVOICE_FAILURES_CHANNEL_ID: 'C067CPUMB8T',\n SLACK_SST_CHANNEL_ID: 'C068NH60A78',\n SLACK_ERROR_CHANNEL_ID: 'C04N4Q7HA79',\n SLACK_ISSUES_CHANNEL_ID: 'C0680P99AE8',\n SLACK_COMING_SERVICES_CHANNEL_ID: 'C06SB20H2J1',\n SLACK_ESMS_CHANNEL_ID: 'C07RPEP2BMY',\n SLACK_EXCESS_MILEAGE_CHANNEL_ID: 'C0679URBY93',\n SLACK_ENGINEERING_REQUESTS_CHANNEL_ID: 'C01U8GTK3K9',\n SLACK_ENDING_SUBSCRIPTIONS_CHANNEL_ID: 'C0A01LNT6AU',\n} as const\n\nconst getSlackIdsMap = (processEnv?: Record<string, string | undefined>) =>\n ({\n production: slackProductionChannels,\n staging: Object.keys(slackProductionChannels).reduce((acc, key) => {\n acc[key as keyof SlackIds] = 'C0661UNMBQU' // #platform-staging-notifications\n return acc\n }, {} as SlackIds),\n development: Object.keys(slackProductionChannels).reduce((acc, key) => {\n acc[key as keyof SlackIds] =\n processEnv?.SLACK_MY_CHANNEL_ID || 'C09GJ4FJVRS' // #platform-dev-notifications\n return acc\n }, {} as SlackIds),\n }) as const satisfies Record<string, SlackIds>\n\nexport const getSlackIds = (\n appEnv?: string,\n processEnv?: Record<string, string | undefined>,\n): SlackIds => {\n const slackIdsMap = getSlackIdsMap(processEnv)\n const envIds: SlackIds =\n appEnv && appEnv in slackIdsMap\n ? slackIdsMap[appEnv as keyof typeof slackIdsMap]\n : slackIdsMap.staging\n\n // Override the values from ENV if available\n for (const key of Object.keys(envIds)) {\n if (processEnv?.[key]) {\n envIds[key as keyof SlackIds] = processEnv[key] as string\n }\n }\n\n return envIds\n}\n\nconst notionProductionChannels = {\n NOTION_REQUEST_DATABASE_ID: '32332c0e-4277-43fa-b10e-7d458234f9ea',\n NOTION_REVIEWS_DATABASE_ID: '8a8b0df9-567d-433f-8937-583db2766176', // Seems to be unused\n NOTION_FBC_DATABASE_ID: '76960d4b-2b43-4019-a77e-ac46a0b3d752', // Seems to be unused\n NOTION_FLUXSTERS_DATABASE_ID: '4ea6953a-61c2-4673-8950-c0d0e158de0a',\n NOTION_BD_DATABASE_ID: '172a9182-56c0-4358-b4f1-7e8fcfa44e46',\n NOTION_BRANDS_LANDING_PAGES_DATABASE_ID:\n 'e321d71a-0d29-42da-ab0b-dca2260b643e',\n NOTION_KNOWLEDGE_BASE_DATABASE_ID: '7a81653f-4351-4a17-aa1e-c3082c378441',\n NOTION_REFERRALS_DATABASE_ID: 'b5599d70-b414-4aa9-9ff2-d445c8f3f0fc',\n} as const satisfies Record<string, string>\n\nconst NOTION_IDS_MAP = {\n production: notionProductionChannels,\n staging: {\n ...notionProductionChannels,\n NOTION_KNOWLEDGE_BASE_DATABASE_ID: 'f95b9986-c1c9-46ca-a742-d49f3f80d7dd',\n },\n} as const satisfies Record<string, NotionIds>\n\nexport const getNotionIds = (\n appEnv?: string,\n processEnv?: Record<string, string>,\n): NotionIds => {\n const envIds: NotionIds =\n appEnv && appEnv in NOTION_IDS_MAP\n ? NOTION_IDS_MAP[appEnv as keyof typeof NOTION_IDS_MAP]\n : NOTION_IDS_MAP.staging\n\n // Override the values from ENV if available\n for (const key of Object.keys(envIds)) {\n if (processEnv?.[key]) {\n envIds[key as keyof NotionIds] = processEnv[key] as string\n }\n }\n\n return envIds\n}\n",
|
|
7
|
-
"import { getAppEnv } from './app-env'\nimport { getNotionIds, getSlackIds } from './base-configs'\n\nexport const augmentEnv = () => {\n const slackIds = getSlackIds(getAppEnv(), process.env)\n const notionIds = getNotionIds(getAppEnv())\n\n for (const [key, value] of Object.entries({ ...slackIds, ...notionIds })) {\n if (process.env[key]) {\n continue\n }\n\n process.env[key] = value\n }\n}\n"
|
|
8
5
|
],
|
|
9
|
-
"mappings": "
|
|
10
|
-
"debugId": "
|
|
6
|
+
"mappings": "",
|
|
7
|
+
"debugId": "F8FE29C9C8790CF764756E2164756E21",
|
|
11
8
|
"names": []
|
|
12
9
|
}
|