@ctx-core/env 15.0.19 → 16.0.3
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 +27 -0
- package/package.json +6 -6
- package/src/{CACHE_VERSION$_b.d.ts → CACHE_VERSION$_.d.ts} +3 -3
- package/src/CACHE_VERSION$_.js +7 -0
- package/src/{NODE_ENV$_b.d.ts → NODE_ENV$_.d.ts} +3 -3
- package/src/NODE_ENV$_.js +6 -0
- package/src/VERSION$_.d.ts +4 -0
- package/src/VERSION$_.js +10 -0
- package/src/index.d.ts +6 -6
- package/src/index.js +6 -6
- package/src/{is_development$_b.d.ts → is_development$_.d.ts} +2 -3
- package/src/is_development$_.js +10 -0
- package/src/{is_production$_b.d.ts → is_production$_.d.ts} +3 -3
- package/src/is_production$_.js +11 -0
- package/src/{is_staging$_b.d.ts → is_staging$_.d.ts} +3 -3
- package/src/is_staging$_.js +12 -0
- package/src/CACHE_VERSION$_b.js +0 -8
- package/src/NODE_ENV$_b.js +0 -7
- package/src/VERSION$_b.d.ts +0 -5
- package/src/VERSION$_b.js +0 -6
- package/src/is_development$_b.js +0 -12
- package/src/is_production$_b.js +0 -12
- package/src/is_staging$_b.js +0 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @ctx-core/env
|
|
2
2
|
|
|
3
|
+
## 16.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- update dependencies
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @ctx-core/error@11.3.1
|
|
10
|
+
- @ctx-core/nanostores@0.5.4
|
|
11
|
+
|
|
12
|
+
## 16.0.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- update dependencies
|
|
17
|
+
|
|
18
|
+
## 16.0.1
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- update dependencies
|
|
23
|
+
|
|
24
|
+
## 16.0.0
|
|
25
|
+
|
|
26
|
+
### Major Changes
|
|
27
|
+
|
|
28
|
+
- flatten functions: remove \_b suffix from exports
|
|
29
|
+
|
|
3
30
|
## 15.0.19
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ctx-core/env",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "16.0.3",
|
|
4
4
|
"description": "ctx-core env",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ctx-core",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"./package.json": "./package.json"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@ctx-core/error": "^11.3.
|
|
29
|
-
"@ctx-core/function": "
|
|
30
|
-
"@ctx-core/nanostores": "^0.5.
|
|
31
|
-
"@ctx-core/object": "
|
|
32
|
-
"svelte": "^3.46.
|
|
28
|
+
"@ctx-core/error": "^11.3.1",
|
|
29
|
+
"@ctx-core/function": "20.4.0",
|
|
30
|
+
"@ctx-core/nanostores": "^0.5.4",
|
|
31
|
+
"@ctx-core/object": "22.1.0",
|
|
32
|
+
"svelte": "^3.46.4"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"c8": "^7.11.0",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B } from '@ctx-core/object'
|
|
2
1
|
import { WritableAtom$ } from '@ctx-core/nanostores'
|
|
3
|
-
|
|
2
|
+
import { B } from '@ctx-core/object'
|
|
3
|
+
export declare const CACHE_VERSION$_:B<CACHE_VERSION$_T>
|
|
4
4
|
export declare type CACHE_VERSION$_T = WritableAtom$<false|string>;
|
|
5
|
-
export { CACHE_VERSION$
|
|
5
|
+
export { CACHE_VERSION$_ as b__CACHE_VERSION, }
|
|
@@ -0,0 +1,7 @@
|
|
|
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, }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B } from '@ctx-core/object'
|
|
2
1
|
import { WritableAtom$ } from '@ctx-core/nanostores'
|
|
3
|
-
|
|
2
|
+
import { B } from '@ctx-core/object'
|
|
3
|
+
export declare const NODE_ENV$_:B<NODE_ENV$_T>
|
|
4
4
|
export declare type NODE_ENV$_T = WritableAtom$<string>;
|
|
5
|
-
export { NODE_ENV$
|
|
5
|
+
export { NODE_ENV$_ as b__NODE_ENV }
|
package/src/VERSION$_.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { atom$ } from '@ctx-core/nanostores'
|
|
2
|
+
import { be_ } from '@ctx-core/object'
|
|
3
|
+
/** @type {import('VERSION$_').VERSION$_} */
|
|
4
|
+
export const VERSION$_ = be_('VERSION$', ()=>
|
|
5
|
+
atom$(
|
|
6
|
+
typeof process === 'object' && (
|
|
7
|
+
process.env.VERSION || process.env.HEROKU_SLUG_COMMIT
|
|
8
|
+
)
|
|
9
|
+
|| Math.random().toString())
|
|
10
|
+
)
|
package/src/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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$
|
|
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 './VERSION$
|
|
7
|
+
export * from './VERSION$_'
|
package/src/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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$
|
|
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 './VERSION$
|
|
7
|
+
export * from './VERSION$_.js'
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { B } from '@ctx-core/object'
|
|
2
1
|
import { ReadableAtom$ } from '@ctx-core/nanostores'
|
|
3
|
-
|
|
2
|
+
import { B } from '@ctx-core/object'
|
|
3
|
+
export declare const is_development$_:B<is_development$_T>
|
|
4
4
|
export declare type is_development$_T = ReadableAtom$<boolean>;
|
|
5
|
-
export { is_development$_b as b__is__development }
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B } from '@ctx-core/object'
|
|
2
1
|
import { ReadableAtom$ } from '@ctx-core/nanostores'
|
|
3
|
-
|
|
2
|
+
import { B } from '@ctx-core/object'
|
|
3
|
+
export declare const is_production$_:B<is_production$_T>
|
|
4
4
|
export declare type is_production$_T = ReadableAtom$<boolean>;
|
|
5
|
-
export { is_production$
|
|
5
|
+
export { is_production$_ as b__is__production }
|
|
@@ -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_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 }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B } from '@ctx-core/object'
|
|
2
1
|
import { ReadableAtom$ } from '@ctx-core/nanostores'
|
|
3
|
-
|
|
2
|
+
import { B } from '@ctx-core/object'
|
|
3
|
+
export declare const is_staging$_:B<is_staging$_T>
|
|
4
4
|
export declare type is_staging$_T = ReadableAtom$<boolean>;
|
|
5
|
-
export { is_staging$
|
|
5
|
+
export { is_staging$_ as b__is__staging }
|
|
@@ -0,0 +1,12 @@
|
|
|
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 }
|
package/src/CACHE_VERSION$_b.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { be_ } from '@ctx-core/object'
|
|
2
|
-
import { atom$ } from '@ctx-core/nanostores'
|
|
3
|
-
const key = 'CACHE_VERSION$'
|
|
4
|
-
/** @type {import('./CACHE_VERSION$_b').CACHE_VERSION$_b} */
|
|
5
|
-
export const CACHE_VERSION$_b = be_(key, ()=>
|
|
6
|
-
atom$(typeof process === 'object' && process.env.CACHE_VERSION)
|
|
7
|
-
)
|
|
8
|
-
export { CACHE_VERSION$_b as b__CACHE_VERSION, }
|
package/src/NODE_ENV$_b.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { be_ } from '@ctx-core/object'
|
|
2
|
-
import { atom$ } from '@ctx-core/nanostores'
|
|
3
|
-
const key = 'NODE_ENV$'
|
|
4
|
-
/** @type {import('NODE_ENV$_b').NODE_ENV$_b} */
|
|
5
|
-
export const NODE_ENV$_b = be_(key, ()=>atom$(process.env.NODE_ENV)
|
|
6
|
-
)
|
|
7
|
-
export { NODE_ENV$_b as b__NODE_ENV }
|
package/src/VERSION$_b.d.ts
DELETED
package/src/VERSION$_b.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { be_ } from '@ctx-core/object'
|
|
2
|
-
import { atom$ } from '@ctx-core/nanostores'
|
|
3
|
-
const key = 'VERSION$'
|
|
4
|
-
/** @type {import('VERSION$_b').VERSION$_b} */
|
|
5
|
-
export const VERSION$_b = be_(key, ()=>atom$(typeof process === 'object' && (process.env.VERSION || process.env.HEROKU_SLUG_COMMIT) || Math.random().toString()))
|
|
6
|
-
export { VERSION$_b as b__VERSION, }
|
package/src/is_development$_b.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { be_ } from '@ctx-core/object'
|
|
2
|
-
import { computed$ } from '@ctx-core/nanostores'
|
|
3
|
-
import { NODE_ENV$_b } from './NODE_ENV$_b.js'
|
|
4
|
-
const key = 'is_development$'
|
|
5
|
-
/** @type {import('is_development$_b').is_development$_b} */
|
|
6
|
-
export const is_development$_b = be_(key, ctx=>
|
|
7
|
-
computed$(NODE_ENV$_b(ctx),
|
|
8
|
-
(NODE_ENV)=>
|
|
9
|
-
NODE_ENV === 'dev' || NODE_ENV === 'development.js'
|
|
10
|
-
)
|
|
11
|
-
)
|
|
12
|
-
export { is_development$_b as b__is__development }
|
package/src/is_production$_b.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { be_ } from '@ctx-core/object'
|
|
2
|
-
import { computed$ } from '@ctx-core/nanostores'
|
|
3
|
-
import { NODE_ENV$_b } from './NODE_ENV$_b.js'
|
|
4
|
-
const key = 'is_production$'
|
|
5
|
-
/** @type {import('is_production$_b').is_production$_b} */
|
|
6
|
-
export const is_production$_b = be_(key, ctx=>
|
|
7
|
-
computed$(NODE_ENV$_b(ctx),
|
|
8
|
-
(NODE_ENV)=>
|
|
9
|
-
NODE_ENV === 'prod' || NODE_ENV === 'production.js'
|
|
10
|
-
)
|
|
11
|
-
)
|
|
12
|
-
export { is_production$_b as b__is__production }
|
package/src/is_staging$_b.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { eql_ } from '@ctx-core/function'
|
|
2
|
-
import { be_ } from '@ctx-core/object'
|
|
3
|
-
import { computed$ } from '@ctx-core/nanostores'
|
|
4
|
-
import { NODE_ENV$_b } from './NODE_ENV$_b.js'
|
|
5
|
-
const key = 'is_staging$'
|
|
6
|
-
/** @type {import('is_staging$_b').is_staging$_b} */
|
|
7
|
-
export const is_staging$_b = be_(key, ctx=>
|
|
8
|
-
computed$(NODE_ENV$_b(ctx),
|
|
9
|
-
eql_([
|
|
10
|
-
'staging'
|
|
11
|
-
]))
|
|
12
|
-
)
|
|
13
|
-
export { is_staging$_b as b__is__staging }
|