@ctx-core/env 15.0.17 → 16.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 CHANGED
@@ -1,5 +1,36 @@
1
1
  # @ctx-core/env
2
2
 
3
+ ## 16.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - update dependencies
8
+
9
+ ## 16.0.1
10
+
11
+ ### Patch Changes
12
+
13
+ - update dependencies
14
+
15
+ ## 16.0.0
16
+
17
+ ### Major Changes
18
+
19
+ - flatten functions: remove \_b suffix from exports
20
+
21
+ ## 15.0.19
22
+
23
+ ### Patch Changes
24
+
25
+ - update dependencies
26
+
27
+ ## 15.0.18
28
+
29
+ ### Patch Changes
30
+
31
+ - Updated dependencies
32
+ - @ctx-core/nanostores@0.5.0
33
+
3
34
  ## 15.0.17
4
35
 
5
36
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctx-core/env",
3
- "version": "15.0.17",
3
+ "version": "16.0.2",
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.1.23",
29
- "@ctx-core/function": "^20.3.0",
30
- "@ctx-core/nanostores": "^0.4.1",
31
- "@ctx-core/object": "^22.0.12",
32
- "svelte": "^3.46.2"
28
+ "@ctx-core/error": "^11.3.0",
29
+ "@ctx-core/function": "^20.4.0",
30
+ "@ctx-core/nanostores": "^0.5.3",
31
+ "@ctx-core/object": "^22.0.13",
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
- export declare const CACHE_VERSION$_b:B<CACHE_VERSION$_T>
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$_b as b__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
- export declare const NODE_ENV$_b:B<NODE_ENV$_T>
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$_b as b__NODE_ENV }
5
+ export { NODE_ENV$_ as b__NODE_ENV }
@@ -0,0 +1,6 @@
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
+ )
6
+ export { NODE_ENV$_ as b__NODE_ENV }
@@ -0,0 +1,4 @@
1
+ import type { B } from '@ctx-core/object'
2
+ import type { WritableAtom$ } from '@ctx-core/nanostores'
3
+ export declare const VERSION$_:B<VERSION$_T>
4
+ export declare type VERSION$_T = WritableAtom$<string>;
@@ -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$_b'
2
- export * from './is_development$_b'
3
- export * from './is_production$_b'
4
- export * from './is_staging$_b'
5
- export * from './NODE_ENV$_b'
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$_b'
7
+ export * from './VERSION$_'
package/src/index.js CHANGED
@@ -1,7 +1,7 @@
1
- export * from './CACHE_VERSION$_b.js'
2
- export * from './is_development$_b.js'
3
- export * from './is_production$_b.js'
4
- export * from './is_staging$_b.js'
5
- export * from './NODE_ENV$_b.js'
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$_b.js'
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
- export declare const is_development$_b:B<is_development$_T>
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
- export declare const is_production$_b:B<is_production$_T>
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$_b as b__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
- export declare const is_staging$_b:B<is_staging$_T>
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$_b as b__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/COMMIT_EDITMSG DELETED
@@ -1,2 +0,0 @@
1
-
2
-
@@ -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, }
@@ -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 }
@@ -1,5 +0,0 @@
1
- import { B } from '@ctx-core/object'
2
- import { WritableAtom$ } from '@ctx-core/nanostores'
3
- export declare const VERSION$_b:B<VERSION$_T>
4
- export declare type VERSION$_T = WritableAtom$<string>;
5
- export { VERSION$_b as b__VERSION, }
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, }
@@ -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 }
@@ -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 }
@@ -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 }