@ctx-core/env 16.0.0 → 16.0.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/CHANGELOG.md +6 -0
- package/COMMIT_EDITMSG +2 -0
- package/package.json +2 -2
- package/src/CACHE_VERSION$_.js +1 -2
- package/src/NODE_ENV$_.js +1 -2
- package/src/VERSION$_.js +1 -2
- package/src/is_development$_.js +1 -2
- package/src/is_production$_.js +1 -2
- package/src/is_staging$_.js +1 -2
package/CHANGELOG.md
CHANGED
package/COMMIT_EDITMSG
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ctx-core/env",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.1",
|
|
4
4
|
"description": "ctx-core env",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ctx-core",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@ctx-core/error": "^11.3.0",
|
|
29
29
|
"@ctx-core/function": "^20.4.0",
|
|
30
|
-
"@ctx-core/nanostores": "^0.5.
|
|
30
|
+
"@ctx-core/nanostores": "^0.5.2",
|
|
31
31
|
"@ctx-core/object": "^22.0.13",
|
|
32
32
|
"svelte": "^3.46.3"
|
|
33
33
|
},
|
package/src/CACHE_VERSION$_.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { atom$ } from '@ctx-core/nanostores'
|
|
2
2
|
import { be_ } from '@ctx-core/object'
|
|
3
|
-
const key = 'CACHE_VERSION$'
|
|
4
3
|
/** @type {import('./CACHE_VERSION$_').CACHE_VERSION$_} */
|
|
5
|
-
export const CACHE_VERSION$_ = be_(
|
|
4
|
+
export const CACHE_VERSION$_ = be_('CACHE_VERSION$', ()=>
|
|
6
5
|
atom$(typeof process === 'object' && process.env.CACHE_VERSION)
|
|
7
6
|
)
|
|
8
7
|
export { CACHE_VERSION$_ as b__CACHE_VERSION, }
|
package/src/NODE_ENV$_.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { atom$ } from '@ctx-core/nanostores'
|
|
2
2
|
import { be_ } from '@ctx-core/object'
|
|
3
|
-
const key = 'NODE_ENV$'
|
|
4
3
|
/** @type {import('NODE_ENV$_').NODE_ENV$_} */
|
|
5
|
-
export const NODE_ENV$_ = be_(
|
|
4
|
+
export const NODE_ENV$_ = be_('NODE_ENV$', ()=>atom$(process.env.NODE_ENV)
|
|
6
5
|
)
|
|
7
6
|
export { NODE_ENV$_ as b__NODE_ENV }
|
package/src/VERSION$_.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { atom$ } from '@ctx-core/nanostores'
|
|
2
2
|
import { be_ } from '@ctx-core/object'
|
|
3
|
-
const key = 'VERSION$'
|
|
4
3
|
/** @type {import('VERSION$_').VERSION$_} */
|
|
5
|
-
export const VERSION$_ = be_(
|
|
4
|
+
export const VERSION$_ = be_('VERSION$', ()=>
|
|
6
5
|
atom$(
|
|
7
6
|
typeof process === 'object' && (
|
|
8
7
|
process.env.VERSION || process.env.HEROKU_SLUG_COMMIT
|
package/src/is_development$_.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { computed$ } from '@ctx-core/nanostores'
|
|
2
2
|
import { be_ } from '@ctx-core/object'
|
|
3
3
|
import { NODE_ENV$_ } from './NODE_ENV$_.js'
|
|
4
|
-
const key = 'is_development$'
|
|
5
4
|
/** @type {import('is_development$_').is_development$_} */
|
|
6
|
-
export const is_development$_ = be_(
|
|
5
|
+
export const is_development$_ = be_('is_development$', ctx=>
|
|
7
6
|
computed$(NODE_ENV$_(ctx),
|
|
8
7
|
(NODE_ENV)=>
|
|
9
8
|
NODE_ENV === 'dev' || NODE_ENV === 'development.js'
|
package/src/is_production$_.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { computed$ } from '@ctx-core/nanostores'
|
|
2
2
|
import { be_ } from '@ctx-core/object'
|
|
3
3
|
import { NODE_ENV$_ } from './NODE_ENV$_.js'
|
|
4
|
-
const key = 'is_production$'
|
|
5
4
|
/** @type {import('is_production$_').is_production$_} */
|
|
6
|
-
export const is_production$_ = be_(
|
|
5
|
+
export const is_production$_ = be_('is_production$', ctx=>
|
|
7
6
|
computed$(NODE_ENV$_(ctx),
|
|
8
7
|
(NODE_ENV)=>
|
|
9
8
|
NODE_ENV === 'prod' || NODE_ENV === 'production.js'
|
package/src/is_staging$_.js
CHANGED
|
@@ -2,9 +2,8 @@ import { eql_ } from '@ctx-core/function'
|
|
|
2
2
|
import { computed$ } from '@ctx-core/nanostores'
|
|
3
3
|
import { be_ } from '@ctx-core/object'
|
|
4
4
|
import { NODE_ENV$_ } from './NODE_ENV$_.js'
|
|
5
|
-
const key = 'is_staging$'
|
|
6
5
|
/** @type {import('is_staging$_').is_staging$_} */
|
|
7
|
-
export const is_staging$_ = be_(
|
|
6
|
+
export const is_staging$_ = be_('is_staging$', ctx=>
|
|
8
7
|
computed$(NODE_ENV$_(ctx),
|
|
9
8
|
eql_([
|
|
10
9
|
'staging'
|