@stacksjs/env 0.58.71 → 0.58.73
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/package.json +1 -1
- package/src/index.js +50 -41
- package/src/types.ts +1 -1
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -4,7 +4,7 @@ __commonJS,
|
|
|
4
4
|
__toESM
|
|
5
5
|
} from "../../core/buddy/chunk-0455e53fab4244b1.js";
|
|
6
6
|
|
|
7
|
-
//
|
|
7
|
+
// ../../../../node_modules/universalify/index.js
|
|
8
8
|
var require_universalify = __commonJS((exports) => {
|
|
9
9
|
exports.fromCallback = function(fn) {
|
|
10
10
|
return Object.defineProperty(function(...args) {
|
|
@@ -31,7 +31,7 @@ var require_universalify = __commonJS((exports) => {
|
|
|
31
31
|
};
|
|
32
32
|
});
|
|
33
33
|
|
|
34
|
-
//
|
|
34
|
+
// ../../../../node_modules/graceful-fs/polyfills.js
|
|
35
35
|
var require_polyfills = __commonJS((exports, module) => {
|
|
36
36
|
var patch = function(fs) {
|
|
37
37
|
if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
|
|
@@ -340,7 +340,7 @@ var require_polyfills = __commonJS((exports, module) => {
|
|
|
340
340
|
module.exports = patch;
|
|
341
341
|
});
|
|
342
342
|
|
|
343
|
-
//
|
|
343
|
+
// ../../../../node_modules/graceful-fs/legacy-streams.js
|
|
344
344
|
var require_legacy_streams = __commonJS((exports, module) => {
|
|
345
345
|
var legacy = function(fs) {
|
|
346
346
|
return {
|
|
@@ -437,7 +437,7 @@ var require_legacy_streams = __commonJS((exports, module) => {
|
|
|
437
437
|
module.exports = legacy;
|
|
438
438
|
});
|
|
439
439
|
|
|
440
|
-
//
|
|
440
|
+
// ../../../../node_modules/graceful-fs/clone.js
|
|
441
441
|
var require_clone = __commonJS((exports, module) => {
|
|
442
442
|
var clone = function(obj) {
|
|
443
443
|
if (obj === null || typeof obj !== "object")
|
|
@@ -457,7 +457,7 @@ var require_clone = __commonJS((exports, module) => {
|
|
|
457
457
|
};
|
|
458
458
|
});
|
|
459
459
|
|
|
460
|
-
//
|
|
460
|
+
// ../../../../node_modules/graceful-fs/graceful-fs.js
|
|
461
461
|
var require_graceful_fs = __commonJS((exports, module) => {
|
|
462
462
|
var noop = function() {
|
|
463
463
|
};
|
|
@@ -815,7 +815,7 @@ var require_graceful_fs = __commonJS((exports, module) => {
|
|
|
815
815
|
var retryTimer;
|
|
816
816
|
});
|
|
817
817
|
|
|
818
|
-
//
|
|
818
|
+
// ../../../../node_modules/fs-extra/lib/fs/index.js
|
|
819
819
|
var require_fs = __commonJS((exports) => {
|
|
820
820
|
var u = require_universalify().fromCallback;
|
|
821
821
|
var fs = require_graceful_fs();
|
|
@@ -924,7 +924,7 @@ var require_fs = __commonJS((exports) => {
|
|
|
924
924
|
}
|
|
925
925
|
});
|
|
926
926
|
|
|
927
|
-
//
|
|
927
|
+
// ../../../../node_modules/fs-extra/lib/mkdirs/utils.js
|
|
928
928
|
var require_utils = __commonJS((exports, module) => {
|
|
929
929
|
var path = import.meta.require("path");
|
|
930
930
|
exports.checkPath = function checkPath(pth) {
|
|
@@ -939,7 +939,7 @@ var require_utils = __commonJS((exports, module) => {
|
|
|
939
939
|
};
|
|
940
940
|
});
|
|
941
941
|
|
|
942
|
-
//
|
|
942
|
+
// ../../../../node_modules/fs-extra/lib/mkdirs/make-dir.js
|
|
943
943
|
var require_make_dir = __commonJS((exports, module) => {
|
|
944
944
|
var fs = require_fs();
|
|
945
945
|
var { checkPath } = require_utils();
|
|
@@ -965,7 +965,7 @@ var require_make_dir = __commonJS((exports, module) => {
|
|
|
965
965
|
};
|
|
966
966
|
});
|
|
967
967
|
|
|
968
|
-
//
|
|
968
|
+
// ../../../../node_modules/fs-extra/lib/mkdirs/index.js
|
|
969
969
|
var require_mkdirs = __commonJS((exports, module) => {
|
|
970
970
|
var u = require_universalify().fromPromise;
|
|
971
971
|
var { makeDir: _makeDir, makeDirSync } = require_make_dir();
|
|
@@ -980,7 +980,7 @@ var require_mkdirs = __commonJS((exports, module) => {
|
|
|
980
980
|
};
|
|
981
981
|
});
|
|
982
982
|
|
|
983
|
-
//
|
|
983
|
+
// ../../../../node_modules/fs-extra/lib/path-exists/index.js
|
|
984
984
|
var require_path_exists = __commonJS((exports, module) => {
|
|
985
985
|
var pathExists = function(path) {
|
|
986
986
|
return fs.access(path).then(() => true).catch(() => false);
|
|
@@ -993,7 +993,7 @@ var require_path_exists = __commonJS((exports, module) => {
|
|
|
993
993
|
};
|
|
994
994
|
});
|
|
995
995
|
|
|
996
|
-
//
|
|
996
|
+
// ../../../../node_modules/fs-extra/lib/util/utimes.js
|
|
997
997
|
var require_utimes = __commonJS((exports, module) => {
|
|
998
998
|
async function utimesMillis(path, atime, mtime) {
|
|
999
999
|
const fd = await fs.open(path, "r+");
|
|
@@ -1024,7 +1024,7 @@ var require_utimes = __commonJS((exports, module) => {
|
|
|
1024
1024
|
};
|
|
1025
1025
|
});
|
|
1026
1026
|
|
|
1027
|
-
//
|
|
1027
|
+
// ../../../../node_modules/fs-extra/lib/util/stat.js
|
|
1028
1028
|
var require_stat = __commonJS((exports, module) => {
|
|
1029
1029
|
var getStats = function(src, dest, opts) {
|
|
1030
1030
|
const statFunc = opts.dereference ? (file) => fs.stat(file, { bigint: true }) : (file) => fs.lstat(file, { bigint: true });
|
|
@@ -1156,7 +1156,7 @@ var require_stat = __commonJS((exports, module) => {
|
|
|
1156
1156
|
};
|
|
1157
1157
|
});
|
|
1158
1158
|
|
|
1159
|
-
//
|
|
1159
|
+
// ../../../../node_modules/fs-extra/lib/copy/copy.js
|
|
1160
1160
|
var require_copy = __commonJS((exports, module) => {
|
|
1161
1161
|
async function copy(src, dest, opts = {}) {
|
|
1162
1162
|
if (typeof opts === "function") {
|
|
@@ -1282,7 +1282,7 @@ var require_copy = __commonJS((exports, module) => {
|
|
|
1282
1282
|
module.exports = copy;
|
|
1283
1283
|
});
|
|
1284
1284
|
|
|
1285
|
-
//
|
|
1285
|
+
// ../../../../node_modules/fs-extra/lib/copy/copy-sync.js
|
|
1286
1286
|
var require_copy_sync = __commonJS((exports, module) => {
|
|
1287
1287
|
var copySync = function(src, dest, opts) {
|
|
1288
1288
|
if (typeof opts === "function") {
|
|
@@ -1416,7 +1416,7 @@ var require_copy_sync = __commonJS((exports, module) => {
|
|
|
1416
1416
|
module.exports = copySync;
|
|
1417
1417
|
});
|
|
1418
1418
|
|
|
1419
|
-
//
|
|
1419
|
+
// ../../../../node_modules/fs-extra/lib/copy/index.js
|
|
1420
1420
|
var require_copy2 = __commonJS((exports, module) => {
|
|
1421
1421
|
var u = require_universalify().fromPromise;
|
|
1422
1422
|
module.exports = {
|
|
@@ -1425,7 +1425,7 @@ var require_copy2 = __commonJS((exports, module) => {
|
|
|
1425
1425
|
};
|
|
1426
1426
|
});
|
|
1427
1427
|
|
|
1428
|
-
//
|
|
1428
|
+
// ../../../../node_modules/fs-extra/lib/remove/index.js
|
|
1429
1429
|
var require_remove = __commonJS((exports, module) => {
|
|
1430
1430
|
var remove = function(path, callback) {
|
|
1431
1431
|
fs.rm(path, { recursive: true, force: true }, callback);
|
|
@@ -1441,7 +1441,7 @@ var require_remove = __commonJS((exports, module) => {
|
|
|
1441
1441
|
};
|
|
1442
1442
|
});
|
|
1443
1443
|
|
|
1444
|
-
//
|
|
1444
|
+
// ../../../../node_modules/fs-extra/lib/empty/index.js
|
|
1445
1445
|
var require_empty = __commonJS((exports, module) => {
|
|
1446
1446
|
var emptyDirSync = function(dir) {
|
|
1447
1447
|
let items;
|
|
@@ -1477,7 +1477,7 @@ var require_empty = __commonJS((exports, module) => {
|
|
|
1477
1477
|
};
|
|
1478
1478
|
});
|
|
1479
1479
|
|
|
1480
|
-
//
|
|
1480
|
+
// ../../../../node_modules/fs-extra/lib/ensure/file.js
|
|
1481
1481
|
var require_file = __commonJS((exports, module) => {
|
|
1482
1482
|
async function createFile(file) {
|
|
1483
1483
|
let stats;
|
|
@@ -1537,7 +1537,7 @@ var require_file = __commonJS((exports, module) => {
|
|
|
1537
1537
|
};
|
|
1538
1538
|
});
|
|
1539
1539
|
|
|
1540
|
-
//
|
|
1540
|
+
// ../../../../node_modules/fs-extra/lib/ensure/link.js
|
|
1541
1541
|
var require_link = __commonJS((exports, module) => {
|
|
1542
1542
|
async function createLink(srcpath, dstpath) {
|
|
1543
1543
|
let dstStat;
|
|
@@ -1594,7 +1594,7 @@ var require_link = __commonJS((exports, module) => {
|
|
|
1594
1594
|
};
|
|
1595
1595
|
});
|
|
1596
1596
|
|
|
1597
|
-
//
|
|
1597
|
+
// ../../../../node_modules/fs-extra/lib/ensure/symlink-paths.js
|
|
1598
1598
|
var require_symlink_paths = __commonJS((exports, module) => {
|
|
1599
1599
|
async function symlinkPaths(srcpath, dstpath) {
|
|
1600
1600
|
if (path.isAbsolute(srcpath)) {
|
|
@@ -1666,7 +1666,7 @@ var require_symlink_paths = __commonJS((exports, module) => {
|
|
|
1666
1666
|
};
|
|
1667
1667
|
});
|
|
1668
1668
|
|
|
1669
|
-
//
|
|
1669
|
+
// ../../../../node_modules/fs-extra/lib/ensure/symlink-type.js
|
|
1670
1670
|
var require_symlink_type = __commonJS((exports, module) => {
|
|
1671
1671
|
async function symlinkType(srcpath, type) {
|
|
1672
1672
|
if (type)
|
|
@@ -1698,7 +1698,7 @@ var require_symlink_type = __commonJS((exports, module) => {
|
|
|
1698
1698
|
};
|
|
1699
1699
|
});
|
|
1700
1700
|
|
|
1701
|
-
//
|
|
1701
|
+
// ../../../../node_modules/fs-extra/lib/ensure/symlink.js
|
|
1702
1702
|
var require_symlink = __commonJS((exports, module) => {
|
|
1703
1703
|
async function createSymlink(srcpath, dstpath, type) {
|
|
1704
1704
|
let stats;
|
|
@@ -1759,7 +1759,7 @@ var require_symlink = __commonJS((exports, module) => {
|
|
|
1759
1759
|
};
|
|
1760
1760
|
});
|
|
1761
1761
|
|
|
1762
|
-
//
|
|
1762
|
+
// ../../../../node_modules/fs-extra/lib/ensure/index.js
|
|
1763
1763
|
var require_ensure = __commonJS((exports, module) => {
|
|
1764
1764
|
var { createFile, createFileSync } = require_file();
|
|
1765
1765
|
var { createLink, createLinkSync } = require_link();
|
|
@@ -1780,7 +1780,7 @@ var require_ensure = __commonJS((exports, module) => {
|
|
|
1780
1780
|
};
|
|
1781
1781
|
});
|
|
1782
1782
|
|
|
1783
|
-
//
|
|
1783
|
+
// ../../../../node_modules/jsonfile/utils.js
|
|
1784
1784
|
var require_utils2 = __commonJS((exports, module) => {
|
|
1785
1785
|
var stringify = function(obj, { EOL = "\n", finalEOL = true, replacer = null, spaces } = {}) {
|
|
1786
1786
|
const EOF = finalEOL ? EOL : "";
|
|
@@ -1795,7 +1795,7 @@ var require_utils2 = __commonJS((exports, module) => {
|
|
|
1795
1795
|
module.exports = { stringify, stripBom };
|
|
1796
1796
|
});
|
|
1797
1797
|
|
|
1798
|
-
//
|
|
1798
|
+
// ../../../../node_modules/jsonfile/index.js
|
|
1799
1799
|
var require_jsonfile = __commonJS((exports, module) => {
|
|
1800
1800
|
async function _readFile(file, options = {}) {
|
|
1801
1801
|
if (typeof options === "string") {
|
|
@@ -1866,7 +1866,7 @@ var require_jsonfile = __commonJS((exports, module) => {
|
|
|
1866
1866
|
module.exports = jsonfile;
|
|
1867
1867
|
});
|
|
1868
1868
|
|
|
1869
|
-
//
|
|
1869
|
+
// ../../../../node_modules/fs-extra/lib/json/jsonfile.js
|
|
1870
1870
|
var require_jsonfile2 = __commonJS((exports, module) => {
|
|
1871
1871
|
var jsonFile = require_jsonfile();
|
|
1872
1872
|
module.exports = {
|
|
@@ -1877,7 +1877,7 @@ var require_jsonfile2 = __commonJS((exports, module) => {
|
|
|
1877
1877
|
};
|
|
1878
1878
|
});
|
|
1879
1879
|
|
|
1880
|
-
//
|
|
1880
|
+
// ../../../../node_modules/fs-extra/lib/output-file/index.js
|
|
1881
1881
|
var require_output_file = __commonJS((exports, module) => {
|
|
1882
1882
|
async function outputFile(file, data, encoding = "utf-8") {
|
|
1883
1883
|
const dir = path.dirname(file);
|
|
@@ -1904,7 +1904,7 @@ var require_output_file = __commonJS((exports, module) => {
|
|
|
1904
1904
|
};
|
|
1905
1905
|
});
|
|
1906
1906
|
|
|
1907
|
-
//
|
|
1907
|
+
// ../../../../node_modules/fs-extra/lib/json/output-json.js
|
|
1908
1908
|
var require_output_json = __commonJS((exports, module) => {
|
|
1909
1909
|
async function outputJson(file, data, options = {}) {
|
|
1910
1910
|
const str = stringify(data, options);
|
|
@@ -1915,7 +1915,7 @@ var require_output_json = __commonJS((exports, module) => {
|
|
|
1915
1915
|
module.exports = outputJson;
|
|
1916
1916
|
});
|
|
1917
1917
|
|
|
1918
|
-
//
|
|
1918
|
+
// ../../../../node_modules/fs-extra/lib/json/output-json-sync.js
|
|
1919
1919
|
var require_output_json_sync = __commonJS((exports, module) => {
|
|
1920
1920
|
var outputJsonSync = function(file, data, options) {
|
|
1921
1921
|
const str = stringify(data, options);
|
|
@@ -1926,7 +1926,7 @@ var require_output_json_sync = __commonJS((exports, module) => {
|
|
|
1926
1926
|
module.exports = outputJsonSync;
|
|
1927
1927
|
});
|
|
1928
1928
|
|
|
1929
|
-
//
|
|
1929
|
+
// ../../../../node_modules/fs-extra/lib/json/index.js
|
|
1930
1930
|
var require_json = __commonJS((exports, module) => {
|
|
1931
1931
|
var u = require_universalify().fromPromise;
|
|
1932
1932
|
var jsonFile = require_jsonfile2();
|
|
@@ -1941,7 +1941,7 @@ var require_json = __commonJS((exports, module) => {
|
|
|
1941
1941
|
module.exports = jsonFile;
|
|
1942
1942
|
});
|
|
1943
1943
|
|
|
1944
|
-
//
|
|
1944
|
+
// ../../../../node_modules/fs-extra/lib/move/move.js
|
|
1945
1945
|
var require_move = __commonJS((exports, module) => {
|
|
1946
1946
|
async function move(src, dest, opts = {}) {
|
|
1947
1947
|
const overwrite = opts.overwrite || opts.clobber || false;
|
|
@@ -1990,7 +1990,7 @@ var require_move = __commonJS((exports, module) => {
|
|
|
1990
1990
|
module.exports = move;
|
|
1991
1991
|
});
|
|
1992
1992
|
|
|
1993
|
-
//
|
|
1993
|
+
// ../../../../node_modules/fs-extra/lib/move/move-sync.js
|
|
1994
1994
|
var require_move_sync = __commonJS((exports, module) => {
|
|
1995
1995
|
var moveSync = function(src, dest, opts) {
|
|
1996
1996
|
opts = opts || {};
|
|
@@ -2044,7 +2044,7 @@ var require_move_sync = __commonJS((exports, module) => {
|
|
|
2044
2044
|
module.exports = moveSync;
|
|
2045
2045
|
});
|
|
2046
2046
|
|
|
2047
|
-
//
|
|
2047
|
+
// ../../../../node_modules/fs-extra/lib/move/index.js
|
|
2048
2048
|
var require_move2 = __commonJS((exports, module) => {
|
|
2049
2049
|
var u = require_universalify().fromPromise;
|
|
2050
2050
|
module.exports = {
|
|
@@ -2053,7 +2053,7 @@ var require_move2 = __commonJS((exports, module) => {
|
|
|
2053
2053
|
};
|
|
2054
2054
|
});
|
|
2055
2055
|
|
|
2056
|
-
//
|
|
2056
|
+
// ../../../../node_modules/fs-extra/lib/index.js
|
|
2057
2057
|
var require_lib = __commonJS((exports, module) => {
|
|
2058
2058
|
module.exports = {
|
|
2059
2059
|
...require_fs(),
|
|
@@ -2069,7 +2069,7 @@ var require_lib = __commonJS((exports, module) => {
|
|
|
2069
2069
|
};
|
|
2070
2070
|
});
|
|
2071
2071
|
|
|
2072
|
-
//
|
|
2072
|
+
// ../env/src/index.ts
|
|
2073
2073
|
var import_fs_extra = __toESM(require_lib(), 1);
|
|
2074
2074
|
import p from "process";
|
|
2075
2075
|
import {projectPath} from "@stacksjs/path";
|
|
@@ -2089,17 +2089,26 @@ function writeEnv(key, value, options) {
|
|
|
2089
2089
|
import_fs_extra.default.writeFileSync(envPath, lines.join("\n"));
|
|
2090
2090
|
}
|
|
2091
2091
|
|
|
2092
|
-
//
|
|
2092
|
+
// ../env/src/types.ts
|
|
2093
2093
|
import {validator} from "@stacksjs/validation";
|
|
2094
2094
|
|
|
2095
|
-
//
|
|
2095
|
+
// ../../../../config/env.ts
|
|
2096
2096
|
import {validate} from "@stacksjs/validation";
|
|
2097
2097
|
var env_default = {
|
|
2098
2098
|
APP_NAME: validate.string(),
|
|
2099
2099
|
APP_ENV: validate.enum(["local", "dev", "stage", "prod"]),
|
|
2100
2100
|
APP_KEY: validate.string(),
|
|
2101
2101
|
APP_URL: validate.string(),
|
|
2102
|
-
|
|
2102
|
+
PORT: validate.number(),
|
|
2103
|
+
PORT_BACKEND: validate.number(),
|
|
2104
|
+
PORT_ADMIN: validate.number(),
|
|
2105
|
+
PORT_LIBRARY: validate.number(),
|
|
2106
|
+
PORT_DESKTOP: validate.number(),
|
|
2107
|
+
PORT_EMAIL: validate.number(),
|
|
2108
|
+
PORT_DOCS: validate.number(),
|
|
2109
|
+
PORT_INSPECT: validate.number(),
|
|
2110
|
+
PORT_API: validate.number(),
|
|
2111
|
+
PORT_SYSTEM_TRAY: validate.number(),
|
|
2103
2112
|
APP_MAINTENANCE: validate.boolean(),
|
|
2104
2113
|
DEBUG: validate.boolean(),
|
|
2105
2114
|
API_PREFIX: validate.string(),
|
|
@@ -2115,7 +2124,7 @@ var env_default = {
|
|
|
2115
2124
|
AWS_SECRET_ACCESS_KEY: validate.string(),
|
|
2116
2125
|
AWS_DEFAULT_REGION: validate.string(),
|
|
2117
2126
|
AWS_DEFAULT_PASSWORD: validate.string(),
|
|
2118
|
-
MAIL_MAILER: validate.enum(["
|
|
2127
|
+
MAIL_MAILER: validate.enum(["ses", "sendmail", "log", "smtp"]),
|
|
2119
2128
|
MAIL_HOST: validate.string(),
|
|
2120
2129
|
MAIL_PORT: validate.number(),
|
|
2121
2130
|
MAIL_USERNAME: validate.string(),
|
|
@@ -2130,7 +2139,7 @@ var env_default = {
|
|
|
2130
2139
|
FRONTEND_APP_URL: validate.string()
|
|
2131
2140
|
};
|
|
2132
2141
|
|
|
2133
|
-
//
|
|
2142
|
+
// ../env/src/types.ts
|
|
2134
2143
|
var envStructure = Object.entries(env_default).reduce((acc, [key, value]) => {
|
|
2135
2144
|
let validatorType;
|
|
2136
2145
|
switch (typeof value) {
|
|
@@ -2156,7 +2165,7 @@ var envStructure = Object.entries(env_default).reduce((acc, [key, value]) => {
|
|
|
2156
2165
|
}, {});
|
|
2157
2166
|
var envSchema = validator.object(envStructure);
|
|
2158
2167
|
|
|
2159
|
-
//
|
|
2168
|
+
// ../env/src/index.ts
|
|
2160
2169
|
var enums = {
|
|
2161
2170
|
APP_ENV: ["local", "dev", "development", "staging", "prod", "production"],
|
|
2162
2171
|
DB_CONNECTION: ["mysql", "sqlite", "postgres", "planetscale"],
|
package/src/types.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Infer, VineBoolean, VineEnum, VineNumber, VineString } from '@stacksjs/validation'
|
|
2
2
|
import { validator } from '@stacksjs/validation'
|
|
3
|
-
import env from 'config/env'
|
|
4
3
|
import type { EnvKey } from '../../../env'
|
|
4
|
+
import env from '~/config/env'
|
|
5
5
|
|
|
6
6
|
// import type { Validate } from '@stacksjs/validation'
|
|
7
7
|
|