@ctx-core/env 16.0.30 → 16.1.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 +18 -0
- package/package.json +4 -4
- package/src/CACHE_VERSION__.d.ts +7 -0
- package/src/CACHE_VERSION__.js +10 -0
- package/src/NODE_ENV__.d.ts +7 -0
- package/src/NODE_ENV__.js +8 -0
- package/src/VERSION__.d.ts +4 -0
- package/src/{VERSION$_.js → VERSION__.js} +3 -2
- package/src/index.d.ts +6 -6
- package/src/index.js +6 -6
- package/src/is_development__.d.ts +4 -0
- package/src/is_development__.js +11 -0
- package/src/is_production__.d.ts +8 -0
- package/src/is_production__.js +14 -0
- package/src/is_staging__.d.ts +7 -0
- package/src/is_staging__.js +15 -0
- package/src/CACHE_VERSION$_.d.ts +0 -5
- package/src/CACHE_VERSION$_.js +0 -7
- package/src/NODE_ENV$_.d.ts +0 -5
- package/src/NODE_ENV$_.js +0 -6
- package/src/VERSION$_.d.ts +0 -4
- package/src/is_development$_.d.ts +0 -4
- package/src/is_development$_.js +0 -10
- package/src/is_production$_.d.ts +0 -5
- package/src/is_production$_.js +0 -11
- package/src/is_staging$_.d.ts +0 -5
- package/src/is_staging$_.js +0 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @ctx-core/env
|
|
2
2
|
|
|
3
|
+
## 16.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- update dependencies
|
|
8
|
+
|
|
9
|
+
## 16.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- \__ suffix aliased by \$_
|
|
14
|
+
|
|
15
|
+
## 16.0.31
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- @ctx-core/nanostores: 1.4.0
|
|
20
|
+
|
|
3
21
|
## 16.0.30
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ctx-core/env",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.1.1",
|
|
4
4
|
"description": "ctx-core env",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ctx-core",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"./package.json": "./package.json"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@ctx-core/error": "^11.
|
|
26
|
+
"@ctx-core/error": "^11.5.0",
|
|
27
27
|
"@ctx-core/function": "^20.8.0",
|
|
28
|
-
"@ctx-core/nanostores": "^1.
|
|
29
|
-
"@ctx-core/object": "^22.2.
|
|
28
|
+
"@ctx-core/nanostores": "^1.4.0",
|
|
29
|
+
"@ctx-core/object": "^22.2.1",
|
|
30
30
|
"svelte": "^3.48.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { atom_ } from '@ctx-core/nanostores'
|
|
2
|
+
import { be_ } from '@ctx-core/object'
|
|
3
|
+
/** @type {import('./CACHE_VERSION__').CACHE_VERSION__} */
|
|
4
|
+
export const CACHE_VERSION__ = be_('CACHE_VERSION__', ()=>
|
|
5
|
+
atom_(typeof process === 'object' && process.env.CACHE_VERSION)
|
|
6
|
+
)
|
|
7
|
+
export {
|
|
8
|
+
CACHE_VERSION__ as CACHE_VERSION$_,
|
|
9
|
+
CACHE_VERSION__ as b__CACHE_VERSION,
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { atom_ } from '@ctx-core/nanostores'
|
|
2
|
+
import { be_ } from '@ctx-core/object'
|
|
3
|
+
/** @type {import('NODE_ENV__').NODE_ENV__} */
|
|
4
|
+
export const NODE_ENV__ = be_('NODE_ENV__', ()=>atom_(process.env.NODE_ENV))
|
|
5
|
+
export {
|
|
6
|
+
NODE_ENV__ as NODE_ENV$_,
|
|
7
|
+
NODE_ENV__ as b__NODE_ENV,
|
|
8
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { atom_ } from '@ctx-core/nanostores'
|
|
2
2
|
import { be_ } from '@ctx-core/object'
|
|
3
|
-
/** @type {import('
|
|
4
|
-
export const
|
|
3
|
+
/** @type {import('VERSION__').VERSION__} */
|
|
4
|
+
export const VERSION__ = be_('VERSION__', ()=>
|
|
5
5
|
atom_(
|
|
6
6
|
typeof process === 'object' && (
|
|
7
7
|
process.env.VERSION || process.env.HEROKU_SLUG_COMMIT
|
|
8
8
|
)
|
|
9
9
|
|| Math.random().toString())
|
|
10
10
|
)
|
|
11
|
+
export { VERSION__ as VERSION$_ }
|
package/src/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
1
|
+
export * from './CACHE_VERSION__'
|
|
2
|
+
export * from './is_development__'
|
|
3
|
+
export * from './is_production__'
|
|
4
|
+
export * from './is_staging__'
|
|
5
|
+
export * from './NODE_ENV__'
|
|
6
6
|
export * from './throw_missing_env'
|
|
7
|
-
export * from './
|
|
7
|
+
export * from './VERSION__'
|
package/src/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
1
|
+
export * from './CACHE_VERSION__.js'
|
|
2
|
+
export * from './is_development__.js'
|
|
3
|
+
export * from './is_production__.js'
|
|
4
|
+
export * from './is_staging__.js'
|
|
5
|
+
export * from './NODE_ENV__.js'
|
|
6
6
|
export * from './throw_missing_env.js'
|
|
7
|
-
export * from './
|
|
7
|
+
export * from './VERSION__.js'
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { computed_ } from '@ctx-core/nanostores'
|
|
2
|
+
import { be_ } from '@ctx-core/object'
|
|
3
|
+
import { NODE_ENV__ } from './NODE_ENV__.js'
|
|
4
|
+
/** @type {import('is_development__').is_development__} */
|
|
5
|
+
export const is_development__ = be_('is_development__', ctx=>
|
|
6
|
+
computed_(NODE_ENV__(ctx),
|
|
7
|
+
(NODE_ENV)=>
|
|
8
|
+
NODE_ENV === 'dev' || NODE_ENV === 'development'
|
|
9
|
+
)
|
|
10
|
+
)
|
|
11
|
+
export { is_development__ as is_development$_ }
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReadableAtom_ } from '@ctx-core/nanostores'
|
|
2
|
+
import { B } from '@ctx-core/object'
|
|
3
|
+
export declare const is_production__:B<is_production__T>
|
|
4
|
+
export declare type is_production__T = ReadableAtom_<boolean>;
|
|
5
|
+
export {
|
|
6
|
+
is_production__ as is_production$_,
|
|
7
|
+
is_production__ as b__is__production,
|
|
8
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { computed_ } from '@ctx-core/nanostores'
|
|
2
|
+
import { be_ } from '@ctx-core/object'
|
|
3
|
+
import { NODE_ENV__ } from './NODE_ENV__.js'
|
|
4
|
+
/** @type {import('is_production__').is_production__} */
|
|
5
|
+
export const is_production__ = be_('is_production__', ctx=>
|
|
6
|
+
computed_(NODE_ENV__(ctx),
|
|
7
|
+
(NODE_ENV)=>
|
|
8
|
+
NODE_ENV === 'prod' || NODE_ENV === 'production'
|
|
9
|
+
)
|
|
10
|
+
)
|
|
11
|
+
export {
|
|
12
|
+
is_production__ as is_production$_,
|
|
13
|
+
is_production__ as b__is__production,
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { eql_ } from '@ctx-core/function'
|
|
2
|
+
import { computed_ } from '@ctx-core/nanostores'
|
|
3
|
+
import { be_ } from '@ctx-core/object'
|
|
4
|
+
import { NODE_ENV__ } from './NODE_ENV__.js'
|
|
5
|
+
/** @type {import('is_staging__').is_staging__} */
|
|
6
|
+
export const is_staging__ = be_('is_staging__', ctx=>
|
|
7
|
+
computed_(NODE_ENV__(ctx),
|
|
8
|
+
eql_([
|
|
9
|
+
'staging'
|
|
10
|
+
]))
|
|
11
|
+
)
|
|
12
|
+
export {
|
|
13
|
+
is_staging__ as is_staging$_,
|
|
14
|
+
is_staging__ as b__is__staging,
|
|
15
|
+
}
|
package/src/CACHE_VERSION$_.d.ts
DELETED
package/src/CACHE_VERSION$_.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { atom_ } from '@ctx-core/nanostores'
|
|
2
|
-
import { be_ } from '@ctx-core/object'
|
|
3
|
-
/** @type {import('./CACHE_VERSION$_').CACHE_VERSION$_} */
|
|
4
|
-
export const CACHE_VERSION$_ = be_('CACHE_VERSION$', ()=>
|
|
5
|
-
atom_(typeof process === 'object' && process.env.CACHE_VERSION)
|
|
6
|
-
)
|
|
7
|
-
export { CACHE_VERSION$_ as b__CACHE_VERSION, }
|
package/src/NODE_ENV$_.d.ts
DELETED
package/src/NODE_ENV$_.js
DELETED
package/src/VERSION$_.d.ts
DELETED
package/src/is_development$_.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { computed_ } from '@ctx-core/nanostores'
|
|
2
|
-
import { be_ } from '@ctx-core/object'
|
|
3
|
-
import { NODE_ENV$_ } from './NODE_ENV$_.js'
|
|
4
|
-
/** @type {import('is_development$_').is_development$_} */
|
|
5
|
-
export const is_development$_ = be_('is_development$', ctx=>
|
|
6
|
-
computed_(NODE_ENV$_(ctx),
|
|
7
|
-
(NODE_ENV)=>
|
|
8
|
-
NODE_ENV === 'dev' || NODE_ENV === 'development.js'
|
|
9
|
-
)
|
|
10
|
-
)
|
package/src/is_production$_.d.ts
DELETED
package/src/is_production$_.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { computed_ } from '@ctx-core/nanostores'
|
|
2
|
-
import { be_ } from '@ctx-core/object'
|
|
3
|
-
import { NODE_ENV$_ } from './NODE_ENV$_.js'
|
|
4
|
-
/** @type {import('is_production$_').is_production$_} */
|
|
5
|
-
export const is_production$_ = be_('is_production$', ctx=>
|
|
6
|
-
computed_(NODE_ENV$_(ctx),
|
|
7
|
-
(NODE_ENV)=>
|
|
8
|
-
NODE_ENV === 'prod' || NODE_ENV === 'production.js'
|
|
9
|
-
)
|
|
10
|
-
)
|
|
11
|
-
export { is_production$_ as b__is__production }
|
package/src/is_staging$_.d.ts
DELETED
package/src/is_staging$_.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { eql_ } from '@ctx-core/function'
|
|
2
|
-
import { computed_ } from '@ctx-core/nanostores'
|
|
3
|
-
import { be_ } from '@ctx-core/object'
|
|
4
|
-
import { NODE_ENV$_ } from './NODE_ENV$_.js'
|
|
5
|
-
/** @type {import('is_staging$_').is_staging$_} */
|
|
6
|
-
export const is_staging$_ = be_('is_staging$', ctx=>
|
|
7
|
-
computed_(NODE_ENV$_(ctx),
|
|
8
|
-
eql_([
|
|
9
|
-
'staging'
|
|
10
|
-
]))
|
|
11
|
-
)
|
|
12
|
-
export { is_staging$_ as b__is__staging }
|