@ctx-core/env 17.4.18 → 17.4.21

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.
@@ -3,7 +3,7 @@ export declare const [
3
3
  CACHE_VERSION$_,
4
4
  CACHE_VERSION_,
5
5
  CACHE_VERSION__set,
6
- ]:be_atom_triple_T<WritableAtom_<false|string>>
6
+ ]:be_atom_triple_T<false|string>
7
7
  export {
8
8
  CACHE_VERSION$_ as CACHE_VERSION__,
9
9
  CACHE_VERSION$_ as b__CACHE_VERSION,
@@ -1,11 +1,13 @@
1
1
  import { atom_, be_atom_triple_ } from '@ctx-core/nanostores'
2
2
  import { import_meta_env_ } from '../import_meta_env/index.js'
3
+ /** @typedef {import('@ctx-core/nanostores').be_atom_triple_T} */
3
4
  export const [
4
5
  CACHE_VERSION$_,
5
6
  CACHE_VERSION_,
6
7
  CACHE_VERSION__set,
7
- ] = be_atom_triple_('CACHE_VERSION', ()=>
8
- atom_(typeof process === 'object' && import_meta_env_().CACHE_VERSION))
8
+ ] = /** @type {be_atom_triple_T<false|string>} */ be_atom_triple_(()=>
9
+ typeof process === 'object' && import_meta_env_().CACHE_VERSION,
10
+ { id: 'CACHE_VERSION' })
9
11
  export {
10
12
  CACHE_VERSION$_ as CACHE_VERSION__,
11
13
  CACHE_VERSION$_ as b__CACHE_VERSION,
@@ -1,9 +1,9 @@
1
- import type { be_atom_triple_T, WritableAtom_ } from '@ctx-core/nanostores'
1
+ import type { be_atom_triple_T } from '@ctx-core/nanostores'
2
2
  export declare const [
3
3
  NODE_ENV$_,
4
4
  NODE_ENV_,
5
5
  NODE_ENV__set,
6
- ]:be_atom_triple_T<WritableAtom_<string>>
6
+ ]:be_atom_triple_T<string>
7
7
  export {
8
8
  NODE_ENV$_ as NODE_ENV__,
9
9
  NODE_ENV$_ as b__NODE_ENV,
package/NODE_ENV/index.js CHANGED
@@ -1,11 +1,13 @@
1
- import { atom_, be_atom_triple_ } from '@ctx-core/nanostores'
1
+ import { be_atom_triple_ } from '@ctx-core/nanostores'
2
2
  import { import_meta_env_ } from '../import_meta_env/index.js'
3
+ /** @typedef {import('@ctx-core/nanostores').be_atom_triple_T} */
3
4
  export const [
4
5
  NODE_ENV$_,
5
6
  NODE_ENV_,
6
7
  NODE_ENV__set,
7
- ] = be_atom_triple_('NODE_ENV', ()=>
8
- atom_(import_meta_env_().NODE_ENV))
8
+ ] = /** @type {be_atom_triple_T<string>} */be_atom_triple_(()=>
9
+ import_meta_env_().NODE_ENV,
10
+ { id: 'NODE_ENV' })
9
11
  export {
10
12
  NODE_ENV$_ as NODE_ENV__,
11
13
  NODE_ENV$_ as b__NODE_ENV,
@@ -1,7 +1,7 @@
1
- import type { be_atom_triple_T, WritableAtom_ } from '@ctx-core/nanostores'
1
+ import type { be_atom_triple_T } from '@ctx-core/nanostores'
2
2
  export declare const [
3
3
  VERSION$_,
4
4
  VERSION_,
5
5
  VERSION__set,
6
- ]:be_atom_triple_T<WritableAtom_<string>>
6
+ ]:be_atom_triple_T<string>
7
7
  export { VERSION$_ as VERSION__ }
package/VERSION/index.js CHANGED
@@ -1,14 +1,14 @@
1
- import { atom_, be_atom_triple_ } from '@ctx-core/nanostores'
1
+ import { be_atom_triple_ } from '@ctx-core/nanostores'
2
2
  import { import_meta_env_ } from '../import_meta_env/index.js'
3
+ /** @typedef {import('@ctx-core/nanostores').be_atom_triple_T} */
3
4
  export const [
4
5
  VERSION$_,
5
6
  VERSION_,
6
7
  VERSION__set,
7
- ] = be_atom_triple_('VERSION', ()=>
8
- atom_(
9
- typeof process === 'object' && (
10
- import_meta_env_().VERSION || import_meta_env_().HEROKU_SLUG_COMMIT
11
- )
12
- || Math.random().toString())
13
- )
8
+ ] = /** @type {be_atom_triple_T<string>} */be_atom_triple_(()=>
9
+ typeof process === 'object' && (
10
+ import_meta_env_().VERSION || import_meta_env_().HEROKU_SLUG_COMMIT
11
+ )
12
+ || Math.random().toString(),
13
+ { id: 'VERSION' })
14
14
  export { VERSION$_ as VERSION__ }
@@ -1,6 +1,6 @@
1
- import type { be_computed_pair_T, ReadableAtom_ } from '@ctx-core/nanostores'
1
+ import type { be_computed_pair_T } from '@ctx-core/nanostores'
2
2
  export declare const [
3
3
  is_development$_,
4
4
  is_development_,
5
- ]:be_computed_pair_T<ReadableAtom_<boolean>>
5
+ ]:be_computed_pair_T<boolean>
6
6
  export { is_development$_ as is_development__ }
@@ -1,10 +1,9 @@
1
1
  import { be_computed_pair_ } from '@ctx-core/nanostores'
2
- import { NODE_ENV_ } from '../NODE_ENV/index.js'
2
+ import { NODE_ENV$_ } from '../NODE_ENV/index.js'
3
3
  export const [
4
4
  is_development$_,
5
5
  is_development_,
6
- ] = be_computed_pair_(ctx=>
7
- NODE_ENV_(ctx) === 'dev'
8
- || NODE_ENV_(ctx) === 'development')
9
- .config({ id: 'is_development' })
6
+ ] = be_computed_pair_(ctx=>NODE_ENV$_(ctx),
7
+ NODE_ENV=>NODE_ENV === 'dev' || NODE_ENV === 'development',
8
+ { id: 'is_development' })
10
9
  export { is_development$_ as is_development__ }
@@ -1,12 +1,11 @@
1
1
  import { be_computed_pair_ } from '@ctx-core/nanostores'
2
- import { NODE_ENV_ } from '../NODE_ENV/index.js'
2
+ import { NODE_ENV$_ } from '../NODE_ENV/index.js'
3
3
  export const [
4
4
  is_production$_,
5
5
  is_production_,
6
- ] = be_computed_pair_(ctx=>
7
- NODE_ENV_(ctx) === 'prod'
8
- || NODE_ENV_(ctx) === 'production')
9
- .config({ id: 'is_production' })
6
+ ] = be_computed_pair_(ctx=>NODE_ENV$_(ctx),
7
+ NODE_ENV=>NODE_ENV === 'prod' || NODE_ENV === 'production',
8
+ { id: 'is_production' })
10
9
  export {
11
10
  is_production$_ as is_production__,
12
11
  is_production$_ as b__is__production,
@@ -1,7 +1,9 @@
1
- import type { ReadableAtom_ } from '@ctx-core/nanostores'
2
- import type { Be } from '@ctx-core/object'
3
- export declare const is_staging__:Be<ReadableAtom_<boolean>>
1
+ import type { be_computed_pair_T } from '@ctx-core/nanostores'
2
+ export const [
3
+ is_staging$_,
4
+ is_staging_,
5
+ ]: be_computed_pair_T<boolean>
4
6
  export {
5
- is_staging__ as is_staging$_,
6
- is_staging__ as b__is__staging,
7
+ is_staging$_ as is_staging__,
8
+ is_staging$_ as b__is__staging,
7
9
  }
@@ -1,11 +1,11 @@
1
1
  import { be_computed_pair_ } from '@ctx-core/nanostores'
2
- import { NODE_ENV_ } from '../NODE_ENV/index.js'
2
+ import { NODE_ENV$_ } from '../NODE_ENV/index.js'
3
3
  export const [
4
4
  is_staging$_,
5
5
  is_staging_,
6
- ] = be_computed_pair_(ctx=>
7
- NODE_ENV_(ctx) === 'staging')
8
- .config({ id: 'is_staging' })
6
+ ] = be_computed_pair_(ctx=>NODE_ENV$_(ctx),
7
+ NODE_ENV=>NODE_ENV === 'staging',
8
+ { id: 'is_staging' })
9
9
  export {
10
10
  is_staging$_ as is_staging__,
11
11
  is_staging$_ as b__is__staging,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctx-core/env",
3
- "version": "17.4.18",
3
+ "version": "17.4.21",
4
4
  "description": "ctx-core env",
5
5
  "keywords": [
6
6
  "ctx-core",
@@ -36,15 +36,15 @@
36
36
  "./package.json": "./package.json"
37
37
  },
38
38
  "dependencies": {
39
- "@ctx-core/error": "^12.4.16",
40
- "@ctx-core/function": "^21.22.12",
41
- "@ctx-core/nanostores": "^9.0.0",
42
- "@ctx-core/object": "^31.0.0"
39
+ "@ctx-core/error": "^12.4.18",
40
+ "@ctx-core/function": "^21.22.14",
41
+ "@ctx-core/nanostores": "^9.0.3",
42
+ "@ctx-core/object": "^31.1.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "c8": "^8.0.1",
46
46
  "check-dts": "^0.7.2",
47
- "tsx": "^4.1.3",
47
+ "tsx": "^4.1.4",
48
48
  "typescript": "next",
49
49
  "uvu": "^0.5.6"
50
50
  },