@ctx-core/env 14.0.9 → 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 +6 -0
- package/COMMIT_EDITMSG +0 -1
- package/dist/CACHE_VERSION$_b.d.ts +2 -4
- package/dist/CACHE_VERSION$_b.js +2 -2
- package/dist/CACHE_VERSION$_b.js.map +1 -1
- package/dist/NODE_ENV$_b.d.ts +2 -4
- package/dist/NODE_ENV$_b.js +2 -2
- package/dist/NODE_ENV$_b.js.map +1 -1
- package/dist/VERSION$_b.d.ts +2 -4
- package/dist/VERSION$_b.js +2 -2
- package/dist/VERSION$_b.js.map +1 -1
- package/dist/is_development$_b.d.ts +2 -4
- package/dist/is_development$_b.js +2 -2
- package/dist/is_development$_b.js.map +1 -1
- package/dist/is_production$_b.d.ts +2 -4
- package/dist/is_production$_b.js +2 -2
- package/dist/is_production$_b.js.map +1 -1
- package/dist/is_staging$_b.d.ts +2 -4
- package/dist/is_staging$_b.js +2 -2
- package/dist/is_staging$_b.js.map +1 -1
- package/package.json +3 -3
- package/src/CACHE_VERSION$_b.ts +3 -4
- package/src/NODE_ENV$_b.ts +3 -4
- package/src/VERSION$_b.ts +3 -4
- package/src/is_development$_b.ts +3 -4
- package/src/is_production$_b.ts +3 -4
- package/src/is_staging$_b.ts +3 -4
package/CHANGELOG.md
CHANGED
package/COMMIT_EDITMSG
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { B } from '@ctx-core/object';
|
|
2
|
-
import {
|
|
2
|
+
import { WritableAtom$ } from '@ctx-core/nanostores';
|
|
3
3
|
export declare const CACHE_VERSION$_b: B<CACHE_VERSION$_T>;
|
|
4
|
-
export declare type
|
|
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, };
|
package/dist/CACHE_VERSION$_b.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { be_ } from '@ctx-core/object';
|
|
2
|
-
import {
|
|
2
|
+
import { atom$ } from '@ctx-core/nanostores';
|
|
3
3
|
const key = 'CACHE_VERSION$';
|
|
4
|
-
export const CACHE_VERSION$_b = be_(key, ()=>
|
|
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 {
|
|
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"}
|
package/dist/NODE_ENV$_b.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { B } from '@ctx-core/object';
|
|
2
|
-
import {
|
|
2
|
+
import { WritableAtom$ } from '@ctx-core/nanostores';
|
|
3
3
|
export declare const NODE_ENV$_b: B<NODE_ENV$_T>;
|
|
4
|
-
export declare type
|
|
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 };
|
package/dist/NODE_ENV$_b.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { be_ } from '@ctx-core/object';
|
|
2
|
-
import {
|
|
2
|
+
import { atom$ } from '@ctx-core/nanostores';
|
|
3
3
|
const key = 'NODE_ENV$';
|
|
4
|
-
export const NODE_ENV$_b = be_(key, ()=>
|
|
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
|
|
package/dist/NODE_ENV$_b.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/NODE_ENV$_b.ts"],"sourcesContent":["import { B, be_ } from '@ctx-core/object'\nimport {
|
|
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"}
|
package/dist/VERSION$_b.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { B } from '@ctx-core/object';
|
|
2
|
-
import {
|
|
2
|
+
import { WritableAtom$ } from '@ctx-core/nanostores';
|
|
3
3
|
export declare const VERSION$_b: B<VERSION$_T>;
|
|
4
|
-
export declare type
|
|
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, };
|
package/dist/VERSION$_b.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { be_ } from '@ctx-core/object';
|
|
2
|
-
import {
|
|
2
|
+
import { atom$ } from '@ctx-core/nanostores';
|
|
3
3
|
const key = 'VERSION$';
|
|
4
|
-
export const VERSION$_b = be_(key, ()=>
|
|
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
|
|
package/dist/VERSION$_b.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/VERSION$_b.ts"],"sourcesContent":["import { B, be_ } from '@ctx-core/object'\nimport {
|
|
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 {
|
|
2
|
+
import { ReadableAtom$ } from '@ctx-core/nanostores';
|
|
3
3
|
export declare const is_development$_b: B<is_development$_T>;
|
|
4
|
-
export declare type
|
|
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 {
|
|
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)=>
|
|
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 {
|
|
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 {
|
|
2
|
+
import { ReadableAtom$ } from '@ctx-core/nanostores';
|
|
3
3
|
export declare const is_production$_b: B<is_production$_T>;
|
|
4
|
-
export declare type
|
|
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 };
|
package/dist/is_production$_b.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { be_ } from '@ctx-core/object';
|
|
2
|
-
import {
|
|
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)=>
|
|
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 {
|
|
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"}
|
package/dist/is_staging$_b.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { B } from '@ctx-core/object';
|
|
2
|
-
import {
|
|
2
|
+
import { ReadableAtom$ } from '@ctx-core/nanostores';
|
|
3
3
|
export declare const is_staging$_b: B<is_staging$_T>;
|
|
4
|
-
export declare type
|
|
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 };
|
package/dist/is_staging$_b.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { eql_ } from '@ctx-core/function';
|
|
2
2
|
import { be_ } from '@ctx-core/object';
|
|
3
|
-
import {
|
|
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)=>
|
|
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 {
|
|
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": "
|
|
3
|
+
"version": "15.0.0",
|
|
4
4
|
"description": "ctx-core env",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ctx-core",
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@ctx-core/error": "^11.1.17",
|
|
29
29
|
"@ctx-core/function": "^20.2.20",
|
|
30
|
+
"@ctx-core/nanostores": "^0.1.0",
|
|
30
31
|
"@ctx-core/object": "^22.0.8",
|
|
31
|
-
"@ctx-core/store": "^27.0.55",
|
|
32
32
|
"svelte": "^3.44.3"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@swc/cli": "^0.1.55",
|
|
36
|
-
"@swc/core": "^1.2.
|
|
36
|
+
"@swc/core": "^1.2.121",
|
|
37
37
|
"rimraf": "^3.0.2",
|
|
38
38
|
"typescript": "next"
|
|
39
39
|
},
|
package/src/CACHE_VERSION$_b.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { B, be_ } from '@ctx-core/object'
|
|
2
|
-
import {
|
|
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
|
-
|
|
5
|
+
atom$(
|
|
6
6
|
typeof process === 'object' && process.env.CACHE_VERSION
|
|
7
7
|
) as CACHE_VERSION$_T
|
|
8
8
|
)
|
|
9
|
-
export type
|
|
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
|
}
|
package/src/NODE_ENV$_b.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { B, be_ } from '@ctx-core/object'
|
|
2
|
-
import {
|
|
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
|
-
|
|
5
|
+
atom$(process.env.NODE_ENV) as NODE_ENV$_T
|
|
6
6
|
)
|
|
7
|
-
export type
|
|
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 {
|
|
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
|
-
|
|
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
|
|
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
|
}
|
package/src/is_development$_b.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { B, be_ } from '@ctx-core/object'
|
|
2
|
-
import {
|
|
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
|
-
|
|
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
|
|
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 }
|
package/src/is_production$_b.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { B, be_ } from '@ctx-core/object'
|
|
2
|
-
import {
|
|
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
|
-
|
|
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
|
|
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 }
|
package/src/is_staging$_b.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { eql_ } from '@ctx-core/function'
|
|
2
2
|
import { B, be_ } from '@ctx-core/object'
|
|
3
|
-
import {
|
|
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
|
-
|
|
7
|
+
computed$(
|
|
8
8
|
NODE_ENV$_b(ctx),
|
|
9
9
|
eql_(['staging'])
|
|
10
10
|
) as is_staging$_T
|
|
11
11
|
)
|
|
12
|
-
export type
|
|
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 }
|