@ctx-core/env 14.0.6 → 15.0.0

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,44 @@
1
1
  # @ctx-core/env
2
2
 
3
+ ## 15.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - using @ctx-core/nanostores for stores instead of @ctx-core/store,@ctx-core/svelte
8
+
9
+ ## 14.0.9
10
+
11
+ ### Patch Changes
12
+
13
+ - fix: error TS6059: \* is not under 'rootDir': package.json: types: ./dist/index.d.ts
14
+ - Updated dependencies
15
+ - @ctx-core/error@11.1.17
16
+ - @ctx-core/function@20.2.20
17
+ - @ctx-core/object@22.0.8
18
+ - @ctx-core/store@27.0.55
19
+
20
+ ## 14.0.8
21
+
22
+ ### Patch Changes
23
+
24
+ - tsconfig.json: "target": "ES2021"
25
+ - Updated dependencies
26
+ - @ctx-core/error@11.1.16
27
+ - @ctx-core/function@20.2.19
28
+ - @ctx-core/object@22.0.7
29
+ - @ctx-core/store@27.0.54
30
+
31
+ ## 14.0.7
32
+
33
+ ### Patch Changes
34
+
35
+ - package.json: "types": "./src/index.ts": better editing experience
36
+ - Updated dependencies
37
+ - @ctx-core/error@11.1.15
38
+ - @ctx-core/function@20.2.18
39
+ - @ctx-core/object@22.0.6
40
+ - @ctx-core/store@27.0.53
41
+
3
42
  ## 14.0.6
4
43
 
5
44
  ### Patch Changes
package/COMMIT_EDITMSG ADDED
@@ -0,0 +1 @@
1
+
@@ -1,7 +1,5 @@
1
1
  import { B } from '@ctx-core/object';
2
- import { Writable$ } from '@ctx-core/store';
2
+ import { WritableAtom$ } from '@ctx-core/nanostores';
3
3
  export declare const CACHE_VERSION$_b: B<CACHE_VERSION$_T>;
4
- export declare type CACHE_VERSION_T = false | string;
5
- export interface CACHE_VERSION$_T extends Writable$<CACHE_VERSION_T> {
6
- }
4
+ export declare type CACHE_VERSION$_T = WritableAtom$<false | string>;
7
5
  export { CACHE_VERSION$_b as b__CACHE_VERSION, };
@@ -1,7 +1,7 @@
1
1
  import { be_ } from '@ctx-core/object';
2
- import { writable$ } from '@ctx-core/store';
2
+ import { atom$ } from '@ctx-core/nanostores';
3
3
  const key = 'CACHE_VERSION$';
4
- export const CACHE_VERSION$_b = be_(key, ()=>writable$(typeof process === 'object' && process.env.CACHE_VERSION)
4
+ export const CACHE_VERSION$_b = be_(key, ()=>atom$(typeof process === 'object' && process.env.CACHE_VERSION)
5
5
  );
6
6
  export { CACHE_VERSION$_b as b__CACHE_VERSION, };
7
7
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/CACHE_VERSION$_b.ts"],"sourcesContent":["import { B, be_ } from '@ctx-core/object'\nimport { Writable$, writable$ } from '@ctx-core/store'\nconst key = 'CACHE_VERSION$'\nexport const CACHE_VERSION$_b:B<CACHE_VERSION$_T> = be_(key, ()=>\n\twritable$(\n\t\ttypeof process === 'object' && process.env.CACHE_VERSION\n\t) as CACHE_VERSION$_T\n)\nexport type CACHE_VERSION_T = false|string\nexport interface CACHE_VERSION$_T extends Writable$<CACHE_VERSION_T> {}\nexport {\n\tCACHE_VERSION$_b as b__CACHE_VERSION,\n}\n"],"names":["be_","writable$","key","CACHE_VERSION$_b","process","env","CACHE_VERSION","b__CACHE_VERSION"],"mappings":"AAAA,MAAM,GAAMA,GAAG,QAAQ,CAAkB;AACzC,MAAM,GAAcC,SAAS,QAAQ,CAAiB;AACtD,KAAK,CAACC,GAAG,GAAG,CAAgB;AAC5B,MAAM,CAAC,KAAK,CAACC,gBAAgB,GAAuBH,GAAG,CAACE,GAAG,MAC1DD,SAAS,CACR,MAAM,CAACG,OAAO,KAAK,CAAQ,WAAIA,OAAO,CAACC,GAAG,CAACC,aAAa;;AAK1D,MAAM,GACLH,gBAAgB,IAAII,gBAAgB"}
1
+ {"version":3,"sources":["../src/CACHE_VERSION$_b.ts"],"sourcesContent":["import { B, be_ } from '@ctx-core/object'\nimport { WritableAtom$, atom$ } from '@ctx-core/nanostores'\nconst key = 'CACHE_VERSION$'\nexport const CACHE_VERSION$_b:B<CACHE_VERSION$_T> = be_(key, ()=>\n\tatom$(\n\t\ttypeof process === 'object' && process.env.CACHE_VERSION\n\t) as CACHE_VERSION$_T\n)\nexport type CACHE_VERSION$_T = WritableAtom$<false|string>\nexport {\n\tCACHE_VERSION$_b as b__CACHE_VERSION,\n}\n"],"names":["be_","atom$","key","CACHE_VERSION$_b","process","env","CACHE_VERSION","b__CACHE_VERSION"],"mappings":"AAAA,MAAM,GAAMA,GAAG,QAAQ,CAAkB;AACzC,MAAM,GAAkBC,KAAK,QAAQ,CAAsB;AAC3D,KAAK,CAACC,GAAG,GAAG,CAAgB;AAC5B,MAAM,CAAC,KAAK,CAACC,gBAAgB,GAAuBH,GAAG,CAACE,GAAG,MAC1DD,KAAK,CACJ,MAAM,CAACG,OAAO,KAAK,CAAQ,WAAIA,OAAO,CAACC,GAAG,CAACC,aAAa;;AAI1D,MAAM,GACLH,gBAAgB,IAAII,gBAAgB"}
@@ -1,7 +1,5 @@
1
1
  import { B } from '@ctx-core/object';
2
- import { Writable$ } from '@ctx-core/store';
2
+ import { WritableAtom$ } from '@ctx-core/nanostores';
3
3
  export declare const NODE_ENV$_b: B<NODE_ENV$_T>;
4
- export declare type NODE_ENV_T = string;
5
- export interface NODE_ENV$_T extends Writable$<NODE_ENV_T> {
6
- }
4
+ export declare type NODE_ENV$_T = WritableAtom$<string>;
7
5
  export { NODE_ENV$_b as b__NODE_ENV };
@@ -1,7 +1,7 @@
1
1
  import { be_ } from '@ctx-core/object';
2
- import { writable$ } from '@ctx-core/store';
2
+ import { atom$ } from '@ctx-core/nanostores';
3
3
  const key = 'NODE_ENV$';
4
- export const NODE_ENV$_b = be_(key, ()=>writable$(process.env.NODE_ENV)
4
+ export const NODE_ENV$_b = be_(key, ()=>atom$(process.env.NODE_ENV)
5
5
  );
6
6
  export { NODE_ENV$_b as b__NODE_ENV };
7
7
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/NODE_ENV$_b.ts"],"sourcesContent":["import { B, be_ } from '@ctx-core/object'\nimport { writable$, Writable$ } from '@ctx-core/store'\nconst key = 'NODE_ENV$'\nexport const NODE_ENV$_b:B<NODE_ENV$_T> = be_(key, ()=>\n\twritable$(process.env.NODE_ENV) as NODE_ENV$_T\n)\nexport type NODE_ENV_T = string\nexport interface NODE_ENV$_T extends Writable$<NODE_ENV_T> {}\nexport { NODE_ENV$_b as b__NODE_ENV }\n"],"names":["be_","writable$","key","NODE_ENV$_b","process","env","NODE_ENV","b__NODE_ENV"],"mappings":"AAAA,MAAM,GAAMA,GAAG,QAAQ,CAAkB;AACzC,MAAM,GAAGC,SAAS,QAAmB,CAAiB;AACtD,KAAK,CAACC,GAAG,GAAG,CAAW;AACvB,MAAM,CAAC,KAAK,CAACC,WAAW,GAAkBH,GAAG,CAACE,GAAG,MAChDD,SAAS,CAACG,OAAO,CAACC,GAAG,CAACC,QAAQ;;AAI/B,MAAM,GAAGH,WAAW,IAAII,WAAW"}
1
+ {"version":3,"sources":["../src/NODE_ENV$_b.ts"],"sourcesContent":["import { B, be_ } from '@ctx-core/object'\nimport { atom$, WritableAtom$ } from '@ctx-core/nanostores'\nconst key = 'NODE_ENV$'\nexport const NODE_ENV$_b:B<NODE_ENV$_T> = be_(key, ()=>\n\tatom$(process.env.NODE_ENV) as NODE_ENV$_T\n)\nexport type NODE_ENV$_T = WritableAtom$<string>\nexport { NODE_ENV$_b as b__NODE_ENV }\n"],"names":["be_","atom$","key","NODE_ENV$_b","process","env","NODE_ENV","b__NODE_ENV"],"mappings":"AAAA,MAAM,GAAMA,GAAG,QAAQ,CAAkB;AACzC,MAAM,GAAGC,KAAK,QAAuB,CAAsB;AAC3D,KAAK,CAACC,GAAG,GAAG,CAAW;AACvB,MAAM,CAAC,KAAK,CAACC,WAAW,GAAkBH,GAAG,CAACE,GAAG,MAChDD,KAAK,CAACG,OAAO,CAACC,GAAG,CAACC,QAAQ;;AAG3B,MAAM,GAAGH,WAAW,IAAII,WAAW"}
@@ -1,7 +1,5 @@
1
1
  import { B } from '@ctx-core/object';
2
- import { Writable$ } from '@ctx-core/store';
2
+ import { WritableAtom$ } from '@ctx-core/nanostores';
3
3
  export declare const VERSION$_b: B<VERSION$_T>;
4
- export declare type VERSION_T = string;
5
- export interface VERSION$_T extends Writable$<VERSION_T> {
6
- }
4
+ export declare type VERSION$_T = WritableAtom$<string>;
7
5
  export { VERSION$_b as b__VERSION, };
@@ -1,7 +1,7 @@
1
1
  import { be_ } from '@ctx-core/object';
2
- import { writable$ } from '@ctx-core/store';
2
+ import { atom$ } from '@ctx-core/nanostores';
3
3
  const key = 'VERSION$';
4
- export const VERSION$_b = be_(key, ()=>writable$(typeof process === 'object' && (process.env.VERSION || process.env.HEROKU_SLUG_COMMIT) || Math.random().toString())
4
+ export const VERSION$_b = be_(key, ()=>atom$(typeof process === 'object' && (process.env.VERSION || process.env.HEROKU_SLUG_COMMIT) || Math.random().toString())
5
5
  );
6
6
  export { VERSION$_b as b__VERSION, };
7
7
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/VERSION$_b.ts"],"sourcesContent":["import { B, be_ } from '@ctx-core/object'\nimport { Writable$, writable$ } from '@ctx-core/store'\nconst key = 'VERSION$'\nexport const VERSION$_b:B<VERSION$_T> = be_(key, ()=>\n\twritable$(\n\t\t(typeof process === 'object' && (\n\t\t\tprocess.env.VERSION\n\t\t\t|| process.env.HEROKU_SLUG_COMMIT\n\t\t))\n\t\t|| Math.random().toString()\n\t) as VERSION$_T\n)\nexport type VERSION_T = string\nexport interface VERSION$_T extends Writable$<VERSION_T> {}\nexport {\n\tVERSION$_b as b__VERSION,\n}\n"],"names":["be_","writable$","key","VERSION$_b","process","env","VERSION","HEROKU_SLUG_COMMIT","Math","random","toString","b__VERSION"],"mappings":"AAAA,MAAM,GAAMA,GAAG,QAAQ,CAAkB;AACzC,MAAM,GAAcC,SAAS,QAAQ,CAAiB;AACtD,KAAK,CAACC,GAAG,GAAG,CAAU;AACtB,MAAM,CAAC,KAAK,CAACC,UAAU,GAAiBH,GAAG,CAACE,GAAG,MAC9CD,SAAS,CACP,MAAM,CAACG,OAAO,KAAK,CAAQ,YAC3BA,OAAO,CAACC,GAAG,CAACC,OAAO,IAChBF,OAAO,CAACC,GAAG,CAACE,kBAAkB,KAE/BC,IAAI,CAACC,MAAM,GAAGC,QAAQ;;AAK3B,MAAM,GACLP,UAAU,IAAIQ,UAAU"}
1
+ {"version":3,"sources":["../src/VERSION$_b.ts"],"sourcesContent":["import { B, be_ } from '@ctx-core/object'\nimport { WritableAtom$, atom$ } from '@ctx-core/nanostores'\nconst key = 'VERSION$'\nexport const VERSION$_b:B<VERSION$_T> = be_(key, ()=>\n\tatom$(\n\t\t(typeof process === 'object' && (\n\t\t\tprocess.env.VERSION\n\t\t\t|| process.env.HEROKU_SLUG_COMMIT\n\t\t))\n\t\t|| Math.random().toString()\n\t) as VERSION$_T\n)\nexport type VERSION$_T = WritableAtom$<string>\nexport {\n\tVERSION$_b as b__VERSION,\n}\n"],"names":["be_","atom$","key","VERSION$_b","process","env","VERSION","HEROKU_SLUG_COMMIT","Math","random","toString","b__VERSION"],"mappings":"AAAA,MAAM,GAAMA,GAAG,QAAQ,CAAkB;AACzC,MAAM,GAAkBC,KAAK,QAAQ,CAAsB;AAC3D,KAAK,CAACC,GAAG,GAAG,CAAU;AACtB,MAAM,CAAC,KAAK,CAACC,UAAU,GAAiBH,GAAG,CAACE,GAAG,MAC9CD,KAAK,CACH,MAAM,CAACG,OAAO,KAAK,CAAQ,YAC3BA,OAAO,CAACC,GAAG,CAACC,OAAO,IAChBF,OAAO,CAACC,GAAG,CAACE,kBAAkB,KAE/BC,IAAI,CAACC,MAAM,GAAGC,QAAQ;;AAI3B,MAAM,GACLP,UAAU,IAAIQ,UAAU"}
@@ -1,7 +1,5 @@
1
1
  import { B } from '@ctx-core/object';
2
- import { Readable$ } from '@ctx-core/store';
2
+ import { ReadableAtom$ } from '@ctx-core/nanostores';
3
3
  export declare const is_development$_b: B<is_development$_T>;
4
- export declare type is_development_T = boolean;
5
- export interface is_development$_T extends Readable$<is_development_T> {
6
- }
4
+ export declare type is_development$_T = ReadableAtom$<boolean>;
7
5
  export { is_development$_b as b__is__development };
@@ -1,8 +1,8 @@
1
1
  import { be_ } from '@ctx-core/object';
2
- import { derived$ } from '@ctx-core/store';
2
+ import { computed$ } from '@ctx-core/nanostores';
3
3
  import { NODE_ENV$_b } from './NODE_ENV$_b.js';
4
4
  const key = 'is_development$';
5
- export const is_development$_b = be_(key, (ctx)=>derived$(NODE_ENV$_b(ctx), (NODE_ENV)=>NODE_ENV === 'dev' || NODE_ENV === 'development.js'
5
+ export const is_development$_b = be_(key, (ctx)=>computed$(NODE_ENV$_b(ctx), (NODE_ENV)=>NODE_ENV === 'dev' || NODE_ENV === 'development.js'
6
6
  )
7
7
  );
8
8
  export { is_development$_b as b__is__development };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/is_development$_b.ts"],"sourcesContent":["import { B, be_ } from '@ctx-core/object'\nimport { derived$, Readable$ } from '@ctx-core/store'\nimport { NODE_ENV$_b } from './NODE_ENV$_b.js'\nconst key = 'is_development$'\nexport const is_development$_b:B<is_development$_T> = be_(key, ctx=>\n\tderived$(NODE_ENV$_b(ctx),\n\t\tNODE_ENV=>\n\t\t\tNODE_ENV === 'dev' || NODE_ENV === 'development.js'\n\t) as is_development$_T\n)\nexport type is_development_T = boolean\nexport interface is_development$_T extends Readable$<is_development_T> {}\nexport { is_development$_b as b__is__development }\n"],"names":["be_","derived$","NODE_ENV$_b","key","is_development$_b","ctx","NODE_ENV","b__is__development"],"mappings":"AAAA,MAAM,GAAMA,GAAG,QAAQ,CAAkB;AACzC,MAAM,GAAGC,QAAQ,QAAmB,CAAiB;AACrD,MAAM,GAAGC,WAAW,QAAQ,CAAkB;AAC9C,KAAK,CAACC,GAAG,GAAG,CAAiB;AAC7B,MAAM,CAAC,KAAK,CAACC,iBAAiB,GAAwBJ,GAAG,CAACG,GAAG,GAAEE,GAAG,GACjEJ,QAAQ,CAACC,WAAW,CAACG,GAAG,IACvBC,QAAQ,GACPA,QAAQ,KAAK,CAAK,QAAIA,QAAQ,KAAK,CAAgB;;;AAKtD,MAAM,GAAGF,iBAAiB,IAAIG,kBAAkB"}
1
+ {"version":3,"sources":["../src/is_development$_b.ts"],"sourcesContent":["import { B, be_ } from '@ctx-core/object'\nimport { computed$, ReadableAtom$ } from '@ctx-core/nanostores'\nimport { NODE_ENV$_b } from './NODE_ENV$_b.js'\nconst key = 'is_development$'\nexport const is_development$_b:B<is_development$_T> = be_(key, ctx=>\n\tcomputed$(NODE_ENV$_b(ctx),\n\t\tNODE_ENV=>\n\t\t\tNODE_ENV === 'dev' || NODE_ENV === 'development.js'\n\t) as is_development$_T\n)\nexport type is_development$_T = ReadableAtom$<boolean>\nexport { is_development$_b as b__is__development }\n"],"names":["be_","computed$","NODE_ENV$_b","key","is_development$_b","ctx","NODE_ENV","b__is__development"],"mappings":"AAAA,MAAM,GAAMA,GAAG,QAAQ,CAAkB;AACzC,MAAM,GAAGC,SAAS,QAAuB,CAAsB;AAC/D,MAAM,GAAGC,WAAW,QAAQ,CAAkB;AAC9C,KAAK,CAACC,GAAG,GAAG,CAAiB;AAC7B,MAAM,CAAC,KAAK,CAACC,iBAAiB,GAAwBJ,GAAG,CAACG,GAAG,GAAEE,GAAG,GACjEJ,SAAS,CAACC,WAAW,CAACG,GAAG,IACxBC,QAAQ,GACPA,QAAQ,KAAK,CAAK,QAAIA,QAAQ,KAAK,CAAgB;;;AAItD,MAAM,GAAGF,iBAAiB,IAAIG,kBAAkB"}
@@ -1,7 +1,5 @@
1
1
  import { B } from '@ctx-core/object';
2
- import { Readable$ } from '@ctx-core/store';
2
+ import { ReadableAtom$ } from '@ctx-core/nanostores';
3
3
  export declare const is_production$_b: B<is_production$_T>;
4
- export declare type is_production_T = boolean;
5
- export interface is_production$_T extends Readable$<is_production_T> {
6
- }
4
+ export declare type is_production$_T = ReadableAtom$<boolean>;
7
5
  export { is_production$_b as b__is__production };
@@ -1,8 +1,8 @@
1
1
  import { be_ } from '@ctx-core/object';
2
- import { derived$ } from '@ctx-core/store';
2
+ import { computed$ } from '@ctx-core/nanostores';
3
3
  import { NODE_ENV$_b } from './NODE_ENV$_b.js';
4
4
  const key = 'is_production$';
5
- export const is_production$_b = be_(key, (ctx)=>derived$(NODE_ENV$_b(ctx), (NODE_ENV)=>NODE_ENV === 'prod' || NODE_ENV === 'production.js'
5
+ export const is_production$_b = be_(key, (ctx)=>computed$(NODE_ENV$_b(ctx), (NODE_ENV)=>NODE_ENV === 'prod' || NODE_ENV === 'production.js'
6
6
  )
7
7
  );
8
8
  export { is_production$_b as b__is__production };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/is_production$_b.ts"],"sourcesContent":["import { B, be_ } from '@ctx-core/object'\nimport { derived$, Readable$ } from '@ctx-core/store'\nimport { NODE_ENV$_b } from './NODE_ENV$_b.js'\nconst key = 'is_production$'\nexport const is_production$_b:B<is_production$_T> = be_(key, ctx=>\n\tderived$(NODE_ENV$_b(ctx), NODE_ENV=>\n\t\tNODE_ENV === 'prod' || NODE_ENV === 'production.js'\n\t) as is_production$_T\n)\nexport type is_production_T = boolean\nexport interface is_production$_T extends Readable$<is_production_T> {}\nexport { is_production$_b as b__is__production }\n"],"names":["be_","derived$","NODE_ENV$_b","key","is_production$_b","ctx","NODE_ENV","b__is__production"],"mappings":"AAAA,MAAM,GAAMA,GAAG,QAAQ,CAAkB;AACzC,MAAM,GAAGC,QAAQ,QAAmB,CAAiB;AACrD,MAAM,GAAGC,WAAW,QAAQ,CAAkB;AAC9C,KAAK,CAACC,GAAG,GAAG,CAAgB;AAC5B,MAAM,CAAC,KAAK,CAACC,gBAAgB,GAAuBJ,GAAG,CAACG,GAAG,GAAEE,GAAG,GAC/DJ,QAAQ,CAACC,WAAW,CAACG,GAAG,IAAGC,QAAQ,GAClCA,QAAQ,KAAK,CAAM,SAAIA,QAAQ,KAAK,CAAe;;;AAKrD,MAAM,GAAGF,gBAAgB,IAAIG,iBAAiB"}
1
+ {"version":3,"sources":["../src/is_production$_b.ts"],"sourcesContent":["import { B, be_ } from '@ctx-core/object'\nimport { computed$, ReadableAtom$ } from '@ctx-core/nanostores'\nimport { NODE_ENV$_b } from './NODE_ENV$_b.js'\nconst key = 'is_production$'\nexport const is_production$_b:B<is_production$_T> = be_(key, ctx=>\n\tcomputed$(NODE_ENV$_b(ctx), NODE_ENV=>\n\t\tNODE_ENV === 'prod' || NODE_ENV === 'production.js'\n\t) as is_production$_T\n)\nexport type is_production$_T = ReadableAtom$<boolean>\nexport { is_production$_b as b__is__production }\n"],"names":["be_","computed$","NODE_ENV$_b","key","is_production$_b","ctx","NODE_ENV","b__is__production"],"mappings":"AAAA,MAAM,GAAMA,GAAG,QAAQ,CAAkB;AACzC,MAAM,GAAGC,SAAS,QAAuB,CAAsB;AAC/D,MAAM,GAAGC,WAAW,QAAQ,CAAkB;AAC9C,KAAK,CAACC,GAAG,GAAG,CAAgB;AAC5B,MAAM,CAAC,KAAK,CAACC,gBAAgB,GAAuBJ,GAAG,CAACG,GAAG,GAAEE,GAAG,GAC/DJ,SAAS,CAACC,WAAW,CAACG,GAAG,IAAGC,QAAQ,GACnCA,QAAQ,KAAK,CAAM,SAAIA,QAAQ,KAAK,CAAe;;;AAIrD,MAAM,GAAGF,gBAAgB,IAAIG,iBAAiB"}
@@ -1,7 +1,5 @@
1
1
  import { B } from '@ctx-core/object';
2
- import { Readable$ } from '@ctx-core/store';
2
+ import { ReadableAtom$ } from '@ctx-core/nanostores';
3
3
  export declare const is_staging$_b: B<is_staging$_T>;
4
- export declare type is_staging_T = boolean;
5
- export interface is_staging$_T extends Readable$<is_staging_T> {
6
- }
4
+ export declare type is_staging$_T = ReadableAtom$<boolean>;
7
5
  export { is_staging$_b as b__is__staging };
@@ -1,9 +1,9 @@
1
1
  import { eql_ } from '@ctx-core/function';
2
2
  import { be_ } from '@ctx-core/object';
3
- import { derived$ } from '@ctx-core/store';
3
+ import { computed$ } from '@ctx-core/nanostores';
4
4
  import { NODE_ENV$_b } from './NODE_ENV$_b.js';
5
5
  const key = 'is_staging$';
6
- export const is_staging$_b = be_(key, (ctx)=>derived$(NODE_ENV$_b(ctx), eql_([
6
+ export const is_staging$_b = be_(key, (ctx)=>computed$(NODE_ENV$_b(ctx), eql_([
7
7
  'staging'
8
8
  ]))
9
9
  );
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/is_staging$_b.ts"],"sourcesContent":["import { eql_ } from '@ctx-core/function'\nimport { B, be_ } from '@ctx-core/object'\nimport { derived$, Readable$ } from '@ctx-core/store'\nimport { NODE_ENV$_b } from './NODE_ENV$_b.js'\nconst key = 'is_staging$'\nexport const is_staging$_b:B<is_staging$_T> = be_(key, ctx=>\n\tderived$(\n\t\tNODE_ENV$_b(ctx),\n\t\teql_(['staging'])\n\t) as is_staging$_T\n)\nexport type is_staging_T = boolean\nexport interface is_staging$_T extends Readable$<is_staging_T> {}\nexport { is_staging$_b as b__is__staging }\n"],"names":["eql_","be_","derived$","NODE_ENV$_b","key","is_staging$_b","ctx","b__is__staging"],"mappings":"AAAA,MAAM,GAAGA,IAAI,QAAQ,CAAoB;AACzC,MAAM,GAAMC,GAAG,QAAQ,CAAkB;AACzC,MAAM,GAAGC,QAAQ,QAAmB,CAAiB;AACrD,MAAM,GAAGC,WAAW,QAAQ,CAAkB;AAC9C,KAAK,CAACC,GAAG,GAAG,CAAa;AACzB,MAAM,CAAC,KAAK,CAACC,aAAa,GAAoBJ,GAAG,CAACG,GAAG,GAAEE,GAAG,GACzDJ,QAAQ,CACPC,WAAW,CAACG,GAAG,GACfN,IAAI,CAAC,CAAC;QAAA,CAAS;IAAA,CAAC;;AAKlB,MAAM,GAAGK,aAAa,IAAIE,cAAc"}
1
+ {"version":3,"sources":["../src/is_staging$_b.ts"],"sourcesContent":["import { eql_ } from '@ctx-core/function'\nimport { B, be_ } from '@ctx-core/object'\nimport { computed$, ReadableAtom$ } from '@ctx-core/nanostores'\nimport { NODE_ENV$_b } from './NODE_ENV$_b.js'\nconst key = 'is_staging$'\nexport const is_staging$_b:B<is_staging$_T> = be_(key, ctx=>\n\tcomputed$(\n\t\tNODE_ENV$_b(ctx),\n\t\teql_(['staging'])\n\t) as is_staging$_T\n)\nexport type is_staging$_T = ReadableAtom$<boolean>\nexport { is_staging$_b as b__is__staging }\n"],"names":["eql_","be_","computed$","NODE_ENV$_b","key","is_staging$_b","ctx","b__is__staging"],"mappings":"AAAA,MAAM,GAAGA,IAAI,QAAQ,CAAoB;AACzC,MAAM,GAAMC,GAAG,QAAQ,CAAkB;AACzC,MAAM,GAAGC,SAAS,QAAuB,CAAsB;AAC/D,MAAM,GAAGC,WAAW,QAAQ,CAAkB;AAC9C,KAAK,CAACC,GAAG,GAAG,CAAa;AACzB,MAAM,CAAC,KAAK,CAACC,aAAa,GAAoBJ,GAAG,CAACG,GAAG,GAAEE,GAAG,GACzDJ,SAAS,CACRC,WAAW,CAACG,GAAG,GACfN,IAAI,CAAC,CAAC;QAAA,CAAS;IAAA,CAAC;;AAIlB,MAAM,GAAGK,aAAa,IAAIE,cAAc"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctx-core/env",
3
- "version": "14.0.6",
3
+ "version": "15.0.0",
4
4
  "description": "ctx-core env",
5
5
  "keywords": [
6
6
  "ctx-core",
@@ -25,15 +25,15 @@
25
25
  "./package.json": "./package.json"
26
26
  },
27
27
  "dependencies": {
28
- "@ctx-core/error": "^11.1.14",
29
- "@ctx-core/function": "^20.2.17",
30
- "@ctx-core/object": "^22.0.5",
31
- "@ctx-core/store": "^27.0.52",
28
+ "@ctx-core/error": "^11.1.17",
29
+ "@ctx-core/function": "^20.2.20",
30
+ "@ctx-core/nanostores": "^0.1.0",
31
+ "@ctx-core/object": "^22.0.8",
32
32
  "svelte": "^3.44.3"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@swc/cli": "^0.1.55",
36
- "@swc/core": "^1.2.120",
36
+ "@swc/core": "^1.2.121",
37
37
  "rimraf": "^3.0.2",
38
38
  "typescript": "next"
39
39
  },
@@ -1,13 +1,12 @@
1
1
  import { B, be_ } from '@ctx-core/object'
2
- import { Writable$, writable$ } from '@ctx-core/store'
2
+ import { WritableAtom$, atom$ } from '@ctx-core/nanostores'
3
3
  const key = 'CACHE_VERSION$'
4
4
  export const CACHE_VERSION$_b:B<CACHE_VERSION$_T> = be_(key, ()=>
5
- writable$(
5
+ atom$(
6
6
  typeof process === 'object' && process.env.CACHE_VERSION
7
7
  ) as CACHE_VERSION$_T
8
8
  )
9
- export type CACHE_VERSION_T = false|string
10
- export interface CACHE_VERSION$_T extends Writable$<CACHE_VERSION_T> {}
9
+ export type CACHE_VERSION$_T = WritableAtom$<false|string>
11
10
  export {
12
11
  CACHE_VERSION$_b as b__CACHE_VERSION,
13
12
  }
@@ -1,9 +1,8 @@
1
1
  import { B, be_ } from '@ctx-core/object'
2
- import { writable$, Writable$ } from '@ctx-core/store'
2
+ import { atom$, WritableAtom$ } from '@ctx-core/nanostores'
3
3
  const key = 'NODE_ENV$'
4
4
  export const NODE_ENV$_b:B<NODE_ENV$_T> = be_(key, ()=>
5
- writable$(process.env.NODE_ENV) as NODE_ENV$_T
5
+ atom$(process.env.NODE_ENV) as NODE_ENV$_T
6
6
  )
7
- export type NODE_ENV_T = string
8
- export interface NODE_ENV$_T extends Writable$<NODE_ENV_T> {}
7
+ export type NODE_ENV$_T = WritableAtom$<string>
9
8
  export { NODE_ENV$_b as b__NODE_ENV }
package/src/VERSION$_b.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { B, be_ } from '@ctx-core/object'
2
- import { Writable$, writable$ } from '@ctx-core/store'
2
+ import { WritableAtom$, atom$ } from '@ctx-core/nanostores'
3
3
  const key = 'VERSION$'
4
4
  export const VERSION$_b:B<VERSION$_T> = be_(key, ()=>
5
- writable$(
5
+ atom$(
6
6
  (typeof process === 'object' && (
7
7
  process.env.VERSION
8
8
  || process.env.HEROKU_SLUG_COMMIT
@@ -10,8 +10,7 @@ export const VERSION$_b:B<VERSION$_T> = be_(key, ()=>
10
10
  || Math.random().toString()
11
11
  ) as VERSION$_T
12
12
  )
13
- export type VERSION_T = string
14
- export interface VERSION$_T extends Writable$<VERSION_T> {}
13
+ export type VERSION$_T = WritableAtom$<string>
15
14
  export {
16
15
  VERSION$_b as b__VERSION,
17
16
  }
@@ -1,13 +1,12 @@
1
1
  import { B, be_ } from '@ctx-core/object'
2
- import { derived$, Readable$ } from '@ctx-core/store'
2
+ import { computed$, ReadableAtom$ } from '@ctx-core/nanostores'
3
3
  import { NODE_ENV$_b } from './NODE_ENV$_b.js'
4
4
  const key = 'is_development$'
5
5
  export const is_development$_b:B<is_development$_T> = be_(key, ctx=>
6
- derived$(NODE_ENV$_b(ctx),
6
+ computed$(NODE_ENV$_b(ctx),
7
7
  NODE_ENV=>
8
8
  NODE_ENV === 'dev' || NODE_ENV === 'development.js'
9
9
  ) as is_development$_T
10
10
  )
11
- export type is_development_T = boolean
12
- export interface is_development$_T extends Readable$<is_development_T> {}
11
+ export type is_development$_T = ReadableAtom$<boolean>
13
12
  export { is_development$_b as b__is__development }
@@ -1,12 +1,11 @@
1
1
  import { B, be_ } from '@ctx-core/object'
2
- import { derived$, Readable$ } from '@ctx-core/store'
2
+ import { computed$, ReadableAtom$ } from '@ctx-core/nanostores'
3
3
  import { NODE_ENV$_b } from './NODE_ENV$_b.js'
4
4
  const key = 'is_production$'
5
5
  export const is_production$_b:B<is_production$_T> = be_(key, ctx=>
6
- derived$(NODE_ENV$_b(ctx), NODE_ENV=>
6
+ computed$(NODE_ENV$_b(ctx), NODE_ENV=>
7
7
  NODE_ENV === 'prod' || NODE_ENV === 'production.js'
8
8
  ) as is_production$_T
9
9
  )
10
- export type is_production_T = boolean
11
- export interface is_production$_T extends Readable$<is_production_T> {}
10
+ export type is_production$_T = ReadableAtom$<boolean>
12
11
  export { is_production$_b as b__is__production }
@@ -1,14 +1,13 @@
1
1
  import { eql_ } from '@ctx-core/function'
2
2
  import { B, be_ } from '@ctx-core/object'
3
- import { derived$, Readable$ } from '@ctx-core/store'
3
+ import { computed$, ReadableAtom$ } from '@ctx-core/nanostores'
4
4
  import { NODE_ENV$_b } from './NODE_ENV$_b.js'
5
5
  const key = 'is_staging$'
6
6
  export const is_staging$_b:B<is_staging$_T> = be_(key, ctx=>
7
- derived$(
7
+ computed$(
8
8
  NODE_ENV$_b(ctx),
9
9
  eql_(['staging'])
10
10
  ) as is_staging$_T
11
11
  )
12
- export type is_staging_T = boolean
13
- export interface is_staging$_T extends Readable$<is_staging_T> {}
12
+ export type is_staging$_T = ReadableAtom$<boolean>
14
13
  export { is_staging$_b as b__is__staging }
package/tsconfig.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "compileOnSave": true,
3
3
  "compilerOptions": {
4
- "target": "ES2020",
4
+ "target": "ES2021",
5
5
  "composite": true,
6
6
  "declaration": true,
7
7
  "sourceMap": true,