@driveflux/env 5.1.1 → 5.1.2

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.
@@ -1,130 +0,0 @@
1
- // @bun
2
- var __create = Object.create;
3
- var __getProtoOf = Object.getPrototypeOf;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- function __accessProp(key) {
8
- return this[key];
9
- }
10
- var __toESMCache_node;
11
- var __toESMCache_esm;
12
- var __toESM = (mod, isNodeMode, target) => {
13
- var canCache = mod != null && typeof mod === "object";
14
- if (canCache) {
15
- var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
16
- var cached = cache.get(mod);
17
- if (cached)
18
- return cached;
19
- }
20
- target = mod != null ? __create(__getProtoOf(mod)) : {};
21
- const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
22
- for (let key of __getOwnPropNames(mod))
23
- if (!__hasOwnProp.call(to, key))
24
- __defProp(to, key, {
25
- get: __accessProp.bind(mod, key),
26
- enumerable: true
27
- });
28
- if (canCache)
29
- cache.set(mod, to);
30
- return to;
31
- };
32
- var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
33
- var __require = import.meta.require;
34
-
35
- // src/app-env.ts
36
- var getAppEnv = () => {
37
- if (process.env.APP_ENV) {
38
- return process.env.APP_ENV;
39
- }
40
- if (process.env.USE_ENV) {
41
- return process.env.USE_ENV;
42
- }
43
- if ("development") {
44
- return "development";
45
- }
46
- return "development";
47
- };
48
-
49
- // src/base-configs.ts
50
- var slackProductionChannels = {
51
- SLACK_DEFAULT_CHANNEL_ID: "C0679V8KGSH",
52
- SLACK_RESERVATIONS_CHANNEL_ID: "C01G8B12G67",
53
- SLACK_FBC_CHANNEL: "C01L1AAKB3N",
54
- SLACK_BD_CHANNEL: "CN21PGKK8",
55
- SLACK_MAIN_FLUX_CHANNEL: "GHDPV1858",
56
- SLACK_INQUIRIES_CHANNEL_ID: "C067CSK5J5Q",
57
- SLACK_INVOICE_FAILURES_CHANNEL_ID: "C067CPUMB8T",
58
- SLACK_SST_CHANNEL_ID: "C068NH60A78",
59
- SLACK_ERROR_CHANNEL_ID: "C04N4Q7HA79",
60
- SLACK_ISSUES_CHANNEL_ID: "C0680P99AE8",
61
- SLACK_COMING_SERVICES_CHANNEL_ID: "C06SB20H2J1",
62
- SLACK_ESMS_CHANNEL_ID: "C07RPEP2BMY",
63
- SLACK_EXCESS_MILEAGE_CHANNEL_ID: "C0679URBY93",
64
- SLACK_ENGINEERING_REQUESTS_CHANNEL_ID: "C01U8GTK3K9",
65
- SLACK_ENDING_SUBSCRIPTIONS_CHANNEL_ID: "C0A01LNT6AU"
66
- };
67
- var getSlackIdsMap = (processEnv) => ({
68
- production: slackProductionChannels,
69
- staging: Object.keys(slackProductionChannels).reduce((acc, key) => {
70
- acc[key] = "C0661UNMBQU";
71
- return acc;
72
- }, {}),
73
- development: Object.keys(slackProductionChannels).reduce((acc, key) => {
74
- acc[key] = processEnv?.SLACK_MY_CHANNEL_ID || "C09GJ4FJVRS";
75
- return acc;
76
- }, {})
77
- });
78
- var getSlackIds = (appEnv, processEnv) => {
79
- const slackIdsMap = getSlackIdsMap(processEnv);
80
- const envIds = appEnv && appEnv in slackIdsMap ? slackIdsMap[appEnv] : slackIdsMap.staging;
81
- for (const key of Object.keys(envIds)) {
82
- if (processEnv?.[key]) {
83
- envIds[key] = processEnv[key];
84
- }
85
- }
86
- return envIds;
87
- };
88
- var notionProductionChannels = {
89
- NOTION_REQUEST_DATABASE_ID: "32332c0e-4277-43fa-b10e-7d458234f9ea",
90
- NOTION_REVIEWS_DATABASE_ID: "8a8b0df9-567d-433f-8937-583db2766176",
91
- NOTION_FBC_DATABASE_ID: "76960d4b-2b43-4019-a77e-ac46a0b3d752",
92
- NOTION_FLUXSTERS_DATABASE_ID: "4ea6953a-61c2-4673-8950-c0d0e158de0a",
93
- NOTION_BD_DATABASE_ID: "172a9182-56c0-4358-b4f1-7e8fcfa44e46",
94
- NOTION_BRANDS_LANDING_PAGES_DATABASE_ID: "e321d71a-0d29-42da-ab0b-dca2260b643e",
95
- NOTION_KNOWLEDGE_BASE_DATABASE_ID: "7a81653f-4351-4a17-aa1e-c3082c378441",
96
- NOTION_REFERRALS_DATABASE_ID: "b5599d70-b414-4aa9-9ff2-d445c8f3f0fc"
97
- };
98
- var NOTION_IDS_MAP = {
99
- production: notionProductionChannels,
100
- staging: {
101
- ...notionProductionChannels,
102
- NOTION_KNOWLEDGE_BASE_DATABASE_ID: "f95b9986-c1c9-46ca-a742-d49f3f80d7dd"
103
- }
104
- };
105
- var getNotionIds = (appEnv, processEnv) => {
106
- const envIds = appEnv && appEnv in NOTION_IDS_MAP ? NOTION_IDS_MAP[appEnv] : NOTION_IDS_MAP.staging;
107
- for (const key of Object.keys(envIds)) {
108
- if (processEnv?.[key]) {
109
- envIds[key] = processEnv[key];
110
- }
111
- }
112
- return envIds;
113
- };
114
-
115
- // src/augment-env.ts
116
- var augmentEnv = () => {
117
- const slackIds = getSlackIds(getAppEnv(), process.env);
118
- const notionIds = getNotionIds(getAppEnv());
119
- for (const [key, value] of Object.entries({ ...slackIds, ...notionIds })) {
120
- if (process.env[key]) {
121
- continue;
122
- }
123
- process.env[key] = value;
124
- }
125
- };
126
-
127
- export { __toESM, __commonJS, __require, augmentEnv };
128
-
129
- //# debugId=2A2F612CFF7CC1E664756E2164756E21
130
- //# sourceMappingURL=chunk-a04mfzxz.js.map
@@ -1,34 +0,0 @@
1
- // @bun
2
- import {
3
- initEnv
4
- } from "./chunk-tx1bsdta.js";
5
- import {
6
- __require
7
- } from "./chunk-a04mfzxz.js";
8
-
9
- // src/init-shell.ts
10
- var initShell = async (pathPrefix) => {
11
- const paths = Array.isArray(pathPrefix) ? pathPrefix : [pathPrefix];
12
- for (const path of paths) {
13
- await initEnv(path);
14
- }
15
- const args = process.argv.slice(2);
16
- if (args.length) {
17
- const { spawn } = await import("child_process");
18
- const binToRunRun = args.shift();
19
- if (!binToRunRun) {
20
- console.error("No binary to run provided");
21
- process.exit(1);
22
- }
23
- spawn(binToRunRun, args, {
24
- stdio: "inherit",
25
- shell: true,
26
- env: process.env
27
- });
28
- }
29
- };
30
-
31
- export { initShell };
32
-
33
- //# debugId=D6072D1AE6E8525364756E2164756E21
34
- //# sourceMappingURL=chunk-rjywhrqs.js.map