@ctx-core/env 13.0.53 → 14.0.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.
- package/CHANGELOG.md +43 -0
- package/dist/CACHE_VERSION$_b.js.map +1 -1
- package/dist/NODE_ENV$_b.js.map +1 -1
- package/dist/VERSION$_b.js.map +1 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/dist/is_development$_b.js.map +1 -1
- package/dist/is_production$_b.js.map +1 -1
- package/dist/is_staging$_b.js.map +1 -1
- package/dist/throw_missing_env.js.map +1 -1
- package/package.json +14 -17
- package/src/CACHE_VERSION$_b.ts +1 -2
- package/src/NODE_ENV$_b.ts +1 -2
- package/src/VERSION$_b.ts +1 -2
- package/src/index.ts +0 -2
- package/src/is_development$_b.ts +1 -2
- package/src/is_production$_b.ts +1 -2
- package/src/is_staging$_b.ts +1 -2
- package/COMMIT_EDITMSG +0 -2
- package/dist/env_Ctx.js +0 -3
- package/dist/env_Ctx.js.map +0 -1
- package/dist/env_ctx_I.generated.js +0 -5
- package/dist/env_ctx_I.generated.js.map +0 -1
- package/src/env_Ctx.ts +0 -2
- package/src/env_ctx_I.generated.ts +0 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# @ctx-core/env
|
|
2
2
|
|
|
3
|
+
## 14.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- package.json: svelte: ./dist/index.js
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @ctx-core/error@11.1.10
|
|
10
|
+
- @ctx-core/function@20.2.13
|
|
11
|
+
- @ctx-core/object@22.0.1
|
|
12
|
+
- @ctx-core/store@27.0.48
|
|
13
|
+
|
|
14
|
+
## 14.0.1
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- svelte: 3.44.2 -> 3.44.3
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
- @ctx-core/store@27.0.47
|
|
21
|
+
|
|
22
|
+
## 14.0.0
|
|
23
|
+
|
|
24
|
+
### Major Changes
|
|
25
|
+
|
|
26
|
+
- \*\_b: ctx is a map: @ctx-core/object: 22.0.0
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- package.json: - module
|
|
31
|
+
- Updated dependencies
|
|
32
|
+
- Updated dependencies
|
|
33
|
+
- @ctx-core/object@22.0.0
|
|
34
|
+
- @ctx-core/error@11.1.9
|
|
35
|
+
- @ctx-core/store@27.0.46
|
|
36
|
+
|
|
37
|
+
## 13.0.54
|
|
38
|
+
|
|
39
|
+
### Patch Changes
|
|
40
|
+
|
|
41
|
+
- package.json: - "main": explicitly not support cjs
|
|
42
|
+
- Updated dependencies
|
|
43
|
+
- @ctx-core/error@11.1.8
|
|
44
|
+
- @ctx-core/store@27.0.45
|
|
45
|
+
|
|
3
46
|
## 13.0.53
|
|
4
47
|
|
|
5
48
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/CACHE_VERSION$_b.ts"],"sourcesContent":["import { B, be_ } from '@ctx-core/object'\nimport { Writable$, writable$ } from '@ctx-core/store'\
|
|
1
|
+
{"version":3,"sources":["../src/CACHE_VERSION$_b.ts"],"sourcesContent":["import { B, be_ } from '@ctx-core/object'\nimport { Writable$, writable$ } from '@ctx-core/store'\nconst key = 'CACHE_VERSION$'\nexport const CACHE_VERSION$_b:B<CACHE_VERSION$_T> = be_(key, ()=>\n\twritable$(\n\t\ttypeof process === 'object' && process.env.CACHE_VERSION\n\t) as CACHE_VERSION$_T\n)\nexport type CACHE_VERSION_T = false|string\nexport interface CACHE_VERSION$_T extends Writable$<CACHE_VERSION_T> {}\nexport {\n\tCACHE_VERSION$_b as b__CACHE_VERSION,\n}\n"],"names":["be_","writable$","key","CACHE_VERSION$_b","process","env","CACHE_VERSION","b__CACHE_VERSION"],"mappings":"AAAA,MAAM,GAAMA,GAAG,QAAQ,CAAkB;AACzC,MAAM,GAAcC,SAAS,QAAQ,CAAiB;AACtD,KAAK,CAACC,GAAG,GAAG,CAAgB;AAC5B,MAAM,CAAC,KAAK,CAACC,gBAAgB,GAAuBH,GAAG,CAACE,GAAG,MAC1DD,SAAS,CACR,MAAM,CAACG,OAAO,KAAK,CAAQ,WAAIA,OAAO,CAACC,GAAG,CAACC,aAAa;;AAK1D,MAAM,GACLH,gBAAgB,IAAII,gBAAgB"}
|
package/dist/NODE_ENV$_b.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/NODE_ENV$_b.ts"],"sourcesContent":["import { B, be_ } from '@ctx-core/object'\nimport { writable$, Writable$ } from '@ctx-core/store'\
|
|
1
|
+
{"version":3,"sources":["../src/NODE_ENV$_b.ts"],"sourcesContent":["import { B, be_ } from '@ctx-core/object'\nimport { writable$, Writable$ } from '@ctx-core/store'\nconst key = 'NODE_ENV$'\nexport const NODE_ENV$_b:B<NODE_ENV$_T> = be_(key, ()=>\n\twritable$(process.env.NODE_ENV) as NODE_ENV$_T\n)\nexport type NODE_ENV_T = string\nexport interface NODE_ENV$_T extends Writable$<NODE_ENV_T> {}\nexport { NODE_ENV$_b as b__NODE_ENV }\n"],"names":["be_","writable$","key","NODE_ENV$_b","process","env","NODE_ENV","b__NODE_ENV"],"mappings":"AAAA,MAAM,GAAMA,GAAG,QAAQ,CAAkB;AACzC,MAAM,GAAGC,SAAS,QAAmB,CAAiB;AACtD,KAAK,CAACC,GAAG,GAAG,CAAW;AACvB,MAAM,CAAC,KAAK,CAACC,WAAW,GAAkBH,GAAG,CAACE,GAAG,MAChDD,SAAS,CAACG,OAAO,CAACC,GAAG,CAACC,QAAQ;;AAI/B,MAAM,GAAGH,WAAW,IAAII,WAAW"}
|
package/dist/VERSION$_b.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/VERSION$_b.ts"],"sourcesContent":["import { B, be_ } from '@ctx-core/object'\nimport { Writable$, writable$ } from '@ctx-core/store'\
|
|
1
|
+
{"version":3,"sources":["../src/VERSION$_b.ts"],"sourcesContent":["import { B, be_ } from '@ctx-core/object'\nimport { Writable$, writable$ } from '@ctx-core/store'\nconst key = 'VERSION$'\nexport const VERSION$_b:B<VERSION$_T> = be_(key, ()=>\n\twritable$(\n\t\t(typeof process === 'object' && (\n\t\t\tprocess.env.VERSION\n\t\t\t|| process.env.HEROKU_SLUG_COMMIT\n\t\t))\n\t\t|| Math.random().toString()\n\t) as VERSION$_T\n)\nexport type VERSION_T = string\nexport interface VERSION$_T extends Writable$<VERSION_T> {}\nexport {\n\tVERSION$_b as b__VERSION,\n}\n"],"names":["be_","writable$","key","VERSION$_b","process","env","VERSION","HEROKU_SLUG_COMMIT","Math","random","toString","b__VERSION"],"mappings":"AAAA,MAAM,GAAMA,GAAG,QAAQ,CAAkB;AACzC,MAAM,GAAcC,SAAS,QAAQ,CAAiB;AACtD,KAAK,CAACC,GAAG,GAAG,CAAU;AACtB,MAAM,CAAC,KAAK,CAACC,UAAU,GAAiBH,GAAG,CAACE,GAAG,MAC9CD,SAAS,CACP,MAAM,CAACG,OAAO,KAAK,CAAQ,YAC3BA,OAAO,CAACC,GAAG,CAACC,OAAO,IAChBF,OAAO,CAACC,GAAG,CAACE,kBAAkB,KAE/BC,IAAI,CAACC,MAAM,GAAGC,QAAQ;;AAK3B,MAAM,GACLP,UAAU,IAAIQ,UAAU"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './CACHE_VERSION$_b.js'\nexport * from './
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './CACHE_VERSION$_b.js'\nexport * from './is_development$_b.js'\nexport * from './is_production$_b.js'\nexport * from './is_staging$_b.js'\nexport * from './NODE_ENV$_b.js'\nexport * from './throw_missing_env.js'\nexport * from './VERSION$_b.js'\n"],"names":[],"mappings":"cAAc,CAAuB;cACvB,CAAwB;cACxB,CAAuB;cACvB,CAAoB;cACpB,CAAkB;cAClB,CAAwB;cACxB,CAAiB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/is_development$_b.ts"],"sourcesContent":["import { B, be_ } from '@ctx-core/object'\nimport { derived$, Readable$ } from '@ctx-core/store'\nimport
|
|
1
|
+
{"version":3,"sources":["../src/is_development$_b.ts"],"sourcesContent":["import { B, be_ } from '@ctx-core/object'\nimport { derived$, Readable$ } from '@ctx-core/store'\nimport { NODE_ENV$_b } from './NODE_ENV$_b.js'\nconst key = 'is_development$'\nexport const is_development$_b:B<is_development$_T> = be_(key, ctx=>\n\tderived$(NODE_ENV$_b(ctx),\n\t\tNODE_ENV=>\n\t\t\tNODE_ENV === 'dev' || NODE_ENV === 'development.js'\n\t) as is_development$_T\n)\nexport type is_development_T = boolean\nexport interface is_development$_T extends Readable$<is_development_T> {}\nexport { is_development$_b as b__is__development }\n"],"names":["be_","derived$","NODE_ENV$_b","key","is_development$_b","ctx","NODE_ENV","b__is__development"],"mappings":"AAAA,MAAM,GAAMA,GAAG,QAAQ,CAAkB;AACzC,MAAM,GAAGC,QAAQ,QAAmB,CAAiB;AACrD,MAAM,GAAGC,WAAW,QAAQ,CAAkB;AAC9C,KAAK,CAACC,GAAG,GAAG,CAAiB;AAC7B,MAAM,CAAC,KAAK,CAACC,iBAAiB,GAAwBJ,GAAG,CAACG,GAAG,GAAEE,GAAG,GACjEJ,QAAQ,CAACC,WAAW,CAACG,GAAG,IACvBC,QAAQ,GACPA,QAAQ,KAAK,CAAK,QAAIA,QAAQ,KAAK,CAAgB;;;AAKtD,MAAM,GAAGF,iBAAiB,IAAIG,kBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/is_production$_b.ts"],"sourcesContent":["import { B, be_ } from '@ctx-core/object'\nimport { derived$, Readable$ } from '@ctx-core/store'\nimport
|
|
1
|
+
{"version":3,"sources":["../src/is_production$_b.ts"],"sourcesContent":["import { B, be_ } from '@ctx-core/object'\nimport { derived$, Readable$ } from '@ctx-core/store'\nimport { NODE_ENV$_b } from './NODE_ENV$_b.js'\nconst key = 'is_production$'\nexport const is_production$_b:B<is_production$_T> = be_(key, ctx=>\n\tderived$(NODE_ENV$_b(ctx), NODE_ENV=>\n\t\tNODE_ENV === 'prod' || NODE_ENV === 'production.js'\n\t) as is_production$_T\n)\nexport type is_production_T = boolean\nexport interface is_production$_T extends Readable$<is_production_T> {}\nexport { is_production$_b as b__is__production }\n"],"names":["be_","derived$","NODE_ENV$_b","key","is_production$_b","ctx","NODE_ENV","b__is__production"],"mappings":"AAAA,MAAM,GAAMA,GAAG,QAAQ,CAAkB;AACzC,MAAM,GAAGC,QAAQ,QAAmB,CAAiB;AACrD,MAAM,GAAGC,WAAW,QAAQ,CAAkB;AAC9C,KAAK,CAACC,GAAG,GAAG,CAAgB;AAC5B,MAAM,CAAC,KAAK,CAACC,gBAAgB,GAAuBJ,GAAG,CAACG,GAAG,GAAEE,GAAG,GAC/DJ,QAAQ,CAACC,WAAW,CAACG,GAAG,IAAGC,QAAQ,GAClCA,QAAQ,KAAK,CAAM,SAAIA,QAAQ,KAAK,CAAe;;;AAKrD,MAAM,GAAGF,gBAAgB,IAAIG,iBAAiB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/is_staging$_b.ts"],"sourcesContent":["import { eql_ } from '@ctx-core/function'\nimport { B, be_ } from '@ctx-core/object'\nimport { derived$, Readable$ } from '@ctx-core/store'\nimport
|
|
1
|
+
{"version":3,"sources":["../src/is_staging$_b.ts"],"sourcesContent":["import { eql_ } from '@ctx-core/function'\nimport { B, be_ } from '@ctx-core/object'\nimport { derived$, Readable$ } from '@ctx-core/store'\nimport { NODE_ENV$_b } from './NODE_ENV$_b.js'\nconst key = 'is_staging$'\nexport const is_staging$_b:B<is_staging$_T> = be_(key, ctx=>\n\tderived$(\n\t\tNODE_ENV$_b(ctx),\n\t\teql_(['staging'])\n\t) as is_staging$_T\n)\nexport type is_staging_T = boolean\nexport interface is_staging$_T extends Readable$<is_staging_T> {}\nexport { is_staging$_b as b__is__staging }\n"],"names":["eql_","be_","derived$","NODE_ENV$_b","key","is_staging$_b","ctx","b__is__staging"],"mappings":"AAAA,MAAM,GAAGA,IAAI,QAAQ,CAAoB;AACzC,MAAM,GAAMC,GAAG,QAAQ,CAAkB;AACzC,MAAM,GAAGC,QAAQ,QAAmB,CAAiB;AACrD,MAAM,GAAGC,WAAW,QAAQ,CAAkB;AAC9C,KAAK,CAACC,GAAG,GAAG,CAAa;AACzB,MAAM,CAAC,KAAK,CAACC,aAAa,GAAoBJ,GAAG,CAACG,GAAG,GAAEE,GAAG,GACzDJ,QAAQ,CACPC,WAAW,CAACG,GAAG,GACfN,IAAI,CAAC,CAAC;QAAA,CAAS;IAAA,CAAC;;AAKlB,MAAM,GAAGK,aAAa,IAAIE,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/throw_missing_env.ts"],"sourcesContent":["import { error_ctx_I, throw_error } from '@ctx-core/error'\n/**\n * Throws an error for for a missing env variable\n */\nexport function throw_missing_env(env_name: string) {\n\tconst error_message = `\n${env_name} environment variable not set.\ndev: make sure ${env_name} is set in your .env file\nheroku: make sure ${env_name} is set using \\`heroku config:set\\`\n\t`.trim()\n\tthrow_error({ error_message, type: 'missing_env' } as error_ctx_I)\n}\nexport {\n\tthrow_missing_env as throw__missing__env\n}\n"],"names":["throw_error","throw_missing_env","env_name","error_message","trim","type","throw__missing__env"],"mappings":"AAAA,MAAM,GAAgBA,WAAW,QAAQ,CAAiB;AAC1D,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,MAAM,UAAUC,iBAAiB,CAACC,QAAgB,EAAE,CAAC;IACpD,KAAK,CAACC,aAAa,IAAI,
|
|
1
|
+
{"version":3,"sources":["../src/throw_missing_env.ts"],"sourcesContent":["import { error_ctx_I, throw_error } from '@ctx-core/error'\n/**\n * Throws an error for for a missing env variable\n */\nexport function throw_missing_env(env_name: string) {\n\tconst error_message = `\n${env_name} environment variable not set.\ndev: make sure ${env_name} is set in your .env file\nheroku: make sure ${env_name} is set using \\`heroku config:set\\`\n\t`.trim()\n\tthrow_error({ error_message, type: 'missing_env' } as error_ctx_I)\n}\nexport {\n\tthrow_missing_env as throw__missing__env\n}\n"],"names":["throw_error","throw_missing_env","env_name","error_message","trim","type","throw__missing__env"],"mappings":"AAAA,MAAM,GAAgBA,WAAW,QAAQ,CAAiB;AAC1D,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,MAAM,UAAUC,iBAAiB,CAACC,QAAgB,EAAE,CAAC;IACpD,KAAK,CAACC,aAAa,IAAI;AACxB,EAAED,QAAQ,CAAC;eACI,EAAEA,QAAQ,CAAC;kBACR,EAAEA,QAAQ,CAAC;CAC5B,EAAEE,IAAI;IACNJ,WAAW,CAAC,CAAC;QAACG,aAAa;QAAEE,IAAI,EAAE,CAAa;IAAC,CAAC;AACnD,CAAC;AACD,MAAM,GACLJ,iBAAiB,IAAIK,mBAAmB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ctx-core/env",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.0.2",
|
|
4
4
|
"description": "ctx-core env",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ctx-core",
|
|
@@ -17,38 +17,35 @@
|
|
|
17
17
|
"license": "Apache-2.0",
|
|
18
18
|
"author": "Brian Takita",
|
|
19
19
|
"type": "module",
|
|
20
|
-
"main": "./dist/index.js",
|
|
21
|
-
"module": "./dist/index.js",
|
|
22
|
-
"types": "./src/index.ts",
|
|
23
20
|
"exports": {
|
|
24
21
|
".": {
|
|
25
|
-
"
|
|
22
|
+
"types": "./src/index.ts",
|
|
26
23
|
"import": "./dist/index.js"
|
|
27
24
|
},
|
|
28
25
|
"./package.json": "./package.json"
|
|
29
26
|
},
|
|
30
27
|
"dependencies": {
|
|
31
|
-
"@ctx-core/error": "^11.1.
|
|
32
|
-
"@ctx-core/function": "^20.2.
|
|
33
|
-
"@ctx-core/object": "^
|
|
34
|
-
"@ctx-core/store": "^27.0.
|
|
35
|
-
"svelte": "3.44.
|
|
28
|
+
"@ctx-core/error": "^11.1.10",
|
|
29
|
+
"@ctx-core/function": "^20.2.13",
|
|
30
|
+
"@ctx-core/object": "^22.0.1",
|
|
31
|
+
"@ctx-core/store": "^27.0.48",
|
|
32
|
+
"svelte": "^3.44.3"
|
|
36
33
|
},
|
|
37
34
|
"devDependencies": {
|
|
38
|
-
"@
|
|
39
|
-
"@swc/
|
|
40
|
-
"
|
|
35
|
+
"@swc/cli": "^0.1.55",
|
|
36
|
+
"@swc/core": "^1.2.120",
|
|
37
|
+
"rimraf": "^3.0.2",
|
|
41
38
|
"typescript": "next"
|
|
42
39
|
},
|
|
43
40
|
"publishConfig": {
|
|
44
41
|
"access": "public",
|
|
45
42
|
"cache": "~/.npm"
|
|
46
43
|
},
|
|
44
|
+
"svelte": "./dist/index.js",
|
|
47
45
|
"scripts": {
|
|
48
|
-
"build": "npm run
|
|
49
|
-
"clean": "
|
|
46
|
+
"build": "npm run compile",
|
|
47
|
+
"clean": "rimraf dist",
|
|
50
48
|
"compile": "swc src --out-dir dist --copy-files --source-maps --config-file .swcrc",
|
|
51
|
-
"exec": "$@"
|
|
52
|
-
"generate_ctx_I_file": "swc $(./node_modules/.bin/generate_ctx_I_file | tail -n1) --out-dir dist --source-maps --config-file .swcrc"
|
|
49
|
+
"exec": "$@"
|
|
53
50
|
}
|
|
54
51
|
}
|
package/src/CACHE_VERSION$_b.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { B, be_ } from '@ctx-core/object'
|
|
2
2
|
import { Writable$, writable$ } from '@ctx-core/store'
|
|
3
|
-
import type { env_Ctx } from './env_Ctx.js'
|
|
4
3
|
const key = 'CACHE_VERSION$'
|
|
5
|
-
export const CACHE_VERSION$_b:B<
|
|
4
|
+
export const CACHE_VERSION$_b:B<CACHE_VERSION$_T> = be_(key, ()=>
|
|
6
5
|
writable$(
|
|
7
6
|
typeof process === 'object' && process.env.CACHE_VERSION
|
|
8
7
|
) as CACHE_VERSION$_T
|
package/src/NODE_ENV$_b.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { B, be_ } from '@ctx-core/object'
|
|
2
2
|
import { writable$, Writable$ } from '@ctx-core/store'
|
|
3
|
-
import type { env_Ctx } from './env_Ctx.js'
|
|
4
3
|
const key = 'NODE_ENV$'
|
|
5
|
-
export const NODE_ENV$_b:B<
|
|
4
|
+
export const NODE_ENV$_b:B<NODE_ENV$_T> = be_(key, ()=>
|
|
6
5
|
writable$(process.env.NODE_ENV) as NODE_ENV$_T
|
|
7
6
|
)
|
|
8
7
|
export type NODE_ENV_T = string
|
package/src/VERSION$_b.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { B, be_ } from '@ctx-core/object'
|
|
2
2
|
import { Writable$, writable$ } from '@ctx-core/store'
|
|
3
|
-
import type { env_Ctx } from './env_Ctx.js'
|
|
4
3
|
const key = 'VERSION$'
|
|
5
|
-
export const VERSION$_b:B<
|
|
4
|
+
export const VERSION$_b:B<VERSION$_T> = be_(key, ()=>
|
|
6
5
|
writable$(
|
|
7
6
|
(typeof process === 'object' && (
|
|
8
7
|
process.env.VERSION
|
package/src/index.ts
CHANGED
package/src/is_development$_b.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { B, be_ } from '@ctx-core/object'
|
|
2
2
|
import { derived$, Readable$ } from '@ctx-core/store'
|
|
3
|
-
import type { env_Ctx } from './env_Ctx.js'
|
|
4
3
|
import { NODE_ENV$_b } from './NODE_ENV$_b.js'
|
|
5
4
|
const key = 'is_development$'
|
|
6
|
-
export const is_development$_b:B<
|
|
5
|
+
export const is_development$_b:B<is_development$_T> = be_(key, ctx=>
|
|
7
6
|
derived$(NODE_ENV$_b(ctx),
|
|
8
7
|
NODE_ENV=>
|
|
9
8
|
NODE_ENV === 'dev' || NODE_ENV === 'development.js'
|
package/src/is_production$_b.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { B, be_ } from '@ctx-core/object'
|
|
2
2
|
import { derived$, Readable$ } from '@ctx-core/store'
|
|
3
|
-
import type { env_Ctx } from './env_Ctx.js'
|
|
4
3
|
import { NODE_ENV$_b } from './NODE_ENV$_b.js'
|
|
5
4
|
const key = 'is_production$'
|
|
6
|
-
export const is_production$_b:B<
|
|
5
|
+
export const is_production$_b:B<is_production$_T> = be_(key, ctx=>
|
|
7
6
|
derived$(NODE_ENV$_b(ctx), NODE_ENV=>
|
|
8
7
|
NODE_ENV === 'prod' || NODE_ENV === 'production.js'
|
|
9
8
|
) as is_production$_T
|
package/src/is_staging$_b.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { eql_ } from '@ctx-core/function'
|
|
2
2
|
import { B, be_ } from '@ctx-core/object'
|
|
3
3
|
import { derived$, Readable$ } from '@ctx-core/store'
|
|
4
|
-
import type { env_Ctx } from './env_Ctx.js'
|
|
5
4
|
import { NODE_ENV$_b } from './NODE_ENV$_b.js'
|
|
6
5
|
const key = 'is_staging$'
|
|
7
|
-
export const is_staging$_b:B<
|
|
6
|
+
export const is_staging$_b:B<is_staging$_T> = be_(key, ctx=>
|
|
8
7
|
derived$(
|
|
9
8
|
NODE_ENV$_b(ctx),
|
|
10
9
|
eql_(['staging'])
|
package/COMMIT_EDITMSG
DELETED
package/dist/env_Ctx.js
DELETED
package/dist/env_Ctx.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/env_Ctx.ts"],"sourcesContent":["import type { env_ctx_I } from './env_ctx_I.generated.js'\nexport interface env_Ctx extends env_ctx_I {}\n"],"names":[],"mappings":"AAAA,MAAM"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/env_ctx_I.generated.ts"],"sourcesContent":["/*\n * This file was generated by `npm run generate_ctx_I_file` in @ctx-core/dev-tools\n*/\nimport type { CACHE_VERSION$_T } from './CACHE_VERSION$_b.js'\nimport type { NODE_ENV$_T } from './NODE_ENV$_b.js'\nimport type { VERSION$_T } from './VERSION$_b.js'\nimport type { is_development$_T } from './is_development$_b.js'\nimport type { is_production$_T } from './is_production$_b.js'\nimport type { is_staging$_T } from './is_staging$_b.js'\nexport interface env_ctx_I {\n\tCACHE_VERSION$?:CACHE_VERSION$_T\n\tNODE_ENV$?:NODE_ENV$_T\n\tVERSION$?:VERSION$_T\n\tis_development$?:is_development$_T\n\tis_production$?:is_production$_T\n\tis_staging$?:is_staging$_T\n}"],"names":[],"mappings":"AAAA,EAEE,AAFF;;AAEE,AAFF,EAEE,CACF,MAAM"}
|
package/src/env_Ctx.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* This file was generated by `npm run generate_ctx_I_file` in @ctx-core/dev-tools
|
|
3
|
-
*/
|
|
4
|
-
import type { CACHE_VERSION$_T } from './CACHE_VERSION$_b.js'
|
|
5
|
-
import type { NODE_ENV$_T } from './NODE_ENV$_b.js'
|
|
6
|
-
import type { VERSION$_T } from './VERSION$_b.js'
|
|
7
|
-
import type { is_development$_T } from './is_development$_b.js'
|
|
8
|
-
import type { is_production$_T } from './is_production$_b.js'
|
|
9
|
-
import type { is_staging$_T } from './is_staging$_b.js'
|
|
10
|
-
export interface env_ctx_I {
|
|
11
|
-
CACHE_VERSION$?:CACHE_VERSION$_T
|
|
12
|
-
NODE_ENV$?:NODE_ENV$_T
|
|
13
|
-
VERSION$?:VERSION$_T
|
|
14
|
-
is_development$?:is_development$_T
|
|
15
|
-
is_production$?:is_production$_T
|
|
16
|
-
is_staging$?:is_staging$_T
|
|
17
|
-
}
|