@salsita-ai/common 0.50.0-develop.d7ce7f7857 → 0.50.0-develop.d815756961
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/README.md +1 -1
- package/dist/env/index.d.ts +5 -0
- package/dist/env/index.js +1 -1
- package/package.json +2 -12
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ There is no package-root export. Import from one of the paths declared in `packa
|
|
|
16
16
|
| Entry point | Contents |
|
|
17
17
|
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
18
18
|
| `utils` | General-purpose helpers for browser and Node: branded types, assertions, equality and nullish checks, cache and selector helpers, localization shapes, color parsing, Zod helpers. |
|
|
19
|
-
| `env` | `createEnvReader`, which loads environment variables into an `envalid` specification, and `
|
|
19
|
+
| `env` | `createEnvReader`, which loads environment variables into an `envalid` specification, `resolveGeneratedEnvFile`, and the `envalid` validators `bool`, `num`, `str` and `url`. |
|
|
20
20
|
| `eslint` | Shared flat ESLint configurations: `eslintrc`, `eslintrcReactWithStoryBook`, and the optional `devLinguiEslintrcRules`. |
|
|
21
21
|
| `prettier` | `prettierrc`, the shared Prettier configuration with its import-order plugin setup. |
|
|
22
22
|
|
package/dist/env/index.d.ts
CHANGED
|
@@ -24,3 +24,8 @@ export declare const resolveGeneratedEnvFile: (directory: string) => string;
|
|
|
24
24
|
* The function parses the variable based on the provided `envalid` specs and options
|
|
25
25
|
*/
|
|
26
26
|
export declare const createEnvReader: <S>(specs: S, options?: CleanOptions<S>) => () => CleanedEnv<S>;
|
|
27
|
+
/**
|
|
28
|
+
* The `envalid` validators that the env specs Phoenix generates into a project are built from. The generated code
|
|
29
|
+
* imports them through `@salsita-ai/sdk/common/env`, so a project needs no `envalid` of its own.
|
|
30
|
+
*/
|
|
31
|
+
export { bool, num, str, url } from 'envalid';
|
package/dist/env/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{config as e}from"dotenv";import{expand as r}from"dotenv-expand";import{cleanEnv as o}from"envalid";import{findUpSync as t,pathExistsSync as n}from"find-up";import{dirname as p,join as s,resolve as d}from"node:path";let a=(r,o)=>{let s=process.cwd(),a=[s],i=t("pnpm-workspace.yaml",{stopAt:"../../.."});if(i){let e=p(i);e!==s&&a.unshift(e)}return a.reduce((t,p)=>{let s=d(o(p));if(!n(s))return t;let a=e({processEnv:r,path:s,quiet:!0});return a.error&&(console.error("DotEnv error:",a.error),t.error=t.error??a.error),Object.assign(t.parsed,a.parsed),t},{error:void 0,parsed:{}})};export const resolveGeneratedEnvFile=e=>{let r=s(e,".env.generated");return n(r)?r:s(e,".phoenix/.env.generated")};export const createEnvReader=(e,t={})=>()=>{let n={...process.env},p=a(n,resolveGeneratedEnvFile),d=a(n,e=>s(e,".env"));return r({...d,parsed:{...d.parsed,...p.parsed},ignoreProcessEnv:!0}),o(n,e,t)};
|
|
1
|
+
import{config as e}from"dotenv";import{expand as r}from"dotenv-expand";import{cleanEnv as o}from"envalid";import{findUpSync as t,pathExistsSync as n}from"find-up";import{dirname as p,join as s,resolve as d}from"node:path";let a=(r,o)=>{let s=process.cwd(),a=[s],i=t("pnpm-workspace.yaml",{stopAt:"../../.."});if(i){let e=p(i);e!==s&&a.unshift(e)}return a.reduce((t,p)=>{let s=d(o(p));if(!n(s))return t;let a=e({processEnv:r,path:s,quiet:!0});return a.error&&(console.error("DotEnv error:",a.error),t.error=t.error??a.error),Object.assign(t.parsed,a.parsed),t},{error:void 0,parsed:{}})};export const resolveGeneratedEnvFile=e=>{let r=s(e,".env.generated");return n(r)?r:s(e,".phoenix/.env.generated")};export const createEnvReader=(e,t={})=>()=>{let n={...process.env},p=a(n,resolveGeneratedEnvFile),d=a(n,e=>s(e,".env"));return r({...d,parsed:{...d.parsed,...p.parsed},ignoreProcessEnv:!0}),o(n,e,t)};export{bool,num,str,url}from"envalid";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salsita-ai/common",
|
|
3
|
-
"version": "0.50.0-develop.
|
|
3
|
+
"version": "0.50.0-develop.d815756961",
|
|
4
4
|
"description": "Shared Phoenix utilities, environment loading, and lint and formatting configuration.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"salsita",
|
|
@@ -36,28 +36,20 @@
|
|
|
36
36
|
"CHANGELOG.md"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@babel/core": "7.29.7",
|
|
40
|
-
"@babel/plugin-syntax-flow": "7.23.3",
|
|
41
|
-
"@babel/plugin-transform-react-jsx": "7.23.4",
|
|
42
39
|
"@eslint/js": "9.39.4",
|
|
43
40
|
"@trivago/prettier-plugin-sort-imports": "4.3.0",
|
|
44
41
|
"@types/json-schema": "7.0.15",
|
|
45
42
|
"dotenv": "17.4.2",
|
|
46
43
|
"dotenv-expand": "10.0.0",
|
|
47
|
-
"eslint-config-prettier": "10.1.8",
|
|
48
44
|
"eslint-plugin-import": "2.32.0",
|
|
49
|
-
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
50
45
|
"eslint-plugin-lingui": "0.13.1",
|
|
51
46
|
"eslint-plugin-lodash": "8.0.0",
|
|
52
|
-
"eslint-plugin-n": "18.0.1",
|
|
53
|
-
"eslint-plugin-promise": "7.3.0",
|
|
54
47
|
"eslint-plugin-react": "7.37.5",
|
|
55
48
|
"eslint-plugin-react-hooks": "6.0.0",
|
|
56
49
|
"eslint-plugin-storybook": "10.4.1",
|
|
57
50
|
"eslint-plugin-unused-imports": "4.4.1",
|
|
58
51
|
"find-up": "7.0.0",
|
|
59
52
|
"globals": "17.6.0",
|
|
60
|
-
"lodash-es": "4.18.1",
|
|
61
53
|
"typescript-eslint": "8.60.0",
|
|
62
54
|
"zod": "3.25.76"
|
|
63
55
|
},
|
|
@@ -65,9 +57,7 @@
|
|
|
65
57
|
"@lingui/core": "5.9.5",
|
|
66
58
|
"@swc/cli": "0.8.1",
|
|
67
59
|
"@swc/core": "1.15.40",
|
|
68
|
-
"@types/babel__core": "7",
|
|
69
60
|
"@types/eslint": "9.6.1",
|
|
70
|
-
"@types/lodash-es": "4.17.12",
|
|
71
61
|
"@types/prettier": "2.7.1",
|
|
72
62
|
"envalid": "8.1.1",
|
|
73
63
|
"eslint": "9.39.4",
|
|
@@ -76,7 +66,7 @@
|
|
|
76
66
|
"typescript": "npm:@typescript/typescript6@6.0.2",
|
|
77
67
|
"vite": "6.4.3",
|
|
78
68
|
"vitest": "4.1.11",
|
|
79
|
-
"@salsita-ai/common": "0.50.0-develop.
|
|
69
|
+
"@salsita-ai/common": "0.50.0-develop.d815756961"
|
|
80
70
|
},
|
|
81
71
|
"peerDependencies": {
|
|
82
72
|
"envalid": "8.1.1",
|