@koralabs/kora-labs-common 6.1.12 → 6.2.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/constants/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export declare const IS_SERVER: boolean;
|
|
2
2
|
export declare const IS_LOCAL: boolean;
|
|
3
|
+
export declare const IS_AWS: string | false | undefined;
|
|
4
|
+
export declare const REDIS_HOST: string;
|
|
3
5
|
export declare const NETWORK: string;
|
|
4
6
|
export declare const IS_PRODUCTION: boolean;
|
|
5
7
|
export declare const AUTH_GRANT_DURATION: number;
|
package/constants/index.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var _a, _b, _c;
|
|
2
|
+
var _a, _b, _c, _d, _e;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.MINTED_OG_LIST = exports.TOU_URL = exports.AUTH_GRANT_DURATION = exports.IS_PRODUCTION = exports.NETWORK = exports.IS_LOCAL = exports.IS_SERVER = void 0;
|
|
4
|
+
exports.MINTED_OG_LIST = exports.TOU_URL = exports.AUTH_GRANT_DURATION = exports.IS_PRODUCTION = exports.NETWORK = exports.REDIS_HOST = exports.IS_AWS = exports.IS_LOCAL = exports.IS_SERVER = void 0;
|
|
5
5
|
const mintedOgList_1 = require("./mintedOgList");
|
|
6
6
|
exports.IS_SERVER = typeof process !== 'undefined' && typeof process.versions.node !== 'undefined';
|
|
7
7
|
exports.IS_LOCAL = exports.IS_SERVER ? process.env.IS_LOCAL === 'true' : window.location.host.includes('localhost');
|
|
8
|
-
exports.
|
|
8
|
+
exports.IS_AWS = exports.IS_SERVER && !exports.IS_LOCAL && process.env.AWS_REGION;
|
|
9
|
+
exports.REDIS_HOST = (_b = (_a = process.env[`REDIS_HOST_${process.env.AWS_REGION}`.toUpperCase().replace('-', '_')]) !== null && _a !== void 0 ? _a : process.env.REDIS_HOST) !== null && _b !== void 0 ? _b : '127.0.0.1';
|
|
10
|
+
exports.NETWORK = (_d = (_c = process.env.NETWORK) === null || _c === void 0 ? void 0 : _c.toLowerCase()) !== null && _d !== void 0 ? _d : 'preview';
|
|
9
11
|
exports.IS_PRODUCTION = exports.IS_SERVER
|
|
10
|
-
? ((
|
|
12
|
+
? ((_e = process.env.NODE_ENV) === null || _e === void 0 ? void 0 : _e.trim()) === 'production' && exports.NETWORK == 'mainnet'
|
|
11
13
|
: !(window.location.host.includes('preview.') ||
|
|
12
14
|
window.location.host.includes('preprod.') ||
|
|
13
15
|
window.location.host.includes('localhost'));
|
|
@@ -25,26 +25,17 @@ export interface IApiStore {
|
|
|
25
25
|
export interface SubHandleSettings extends ISubHandleSettings {
|
|
26
26
|
utxo: IUTxO;
|
|
27
27
|
}
|
|
28
|
-
export type ApiIndexType = Set<string> | Holder | ISlotHistory | StoredHandle | IMarketplaceListing;
|
|
28
|
+
export type ApiIndexType = Set<string> | Holder | ISlotHistory | StoredHandle | IMarketplaceListing | string;
|
|
29
29
|
export interface StoredHandle extends IPersonalizedHandle {
|
|
30
30
|
amount: number;
|
|
31
31
|
default?: boolean;
|
|
32
32
|
id_hash?: string;
|
|
33
|
-
pz_enabled?: boolean;
|
|
34
|
-
resolved_addresses: {
|
|
35
|
-
ada: string;
|
|
36
|
-
[key: string]: string;
|
|
37
|
-
};
|
|
38
33
|
payment_key_hash: string;
|
|
39
34
|
subhandle_settings?: SubHandleSettings;
|
|
40
35
|
sub_rarity?: string;
|
|
41
36
|
sub_length?: number;
|
|
42
37
|
sub_characters?: string;
|
|
43
38
|
sub_numeric_modifiers?: string;
|
|
44
|
-
virtual?: {
|
|
45
|
-
expires_time: number;
|
|
46
|
-
public_mint: boolean;
|
|
47
|
-
};
|
|
48
39
|
original_address?: string;
|
|
49
40
|
drep?: IDrep;
|
|
50
41
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koralabs/kora-labs-common",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.2.0",
|
|
4
4
|
"description": "Kora Labs Common Utilities",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint --ext=.js,.ts --fix --max-warnings=0 .",
|
|
22
22
|
"test": "NETWORK=mainnet node --experimental-vm-modules node_modules/.bin/jest",
|
|
23
23
|
"build": "tsc",
|
|
24
|
-
"build:local": "
|
|
25
|
-
"npm:publish": "
|
|
24
|
+
"build:local": "npm run build && cp package.json ./lib/package.json && cd lib && npm i --production",
|
|
25
|
+
"npm:publish": "npm run build && cp package.json ./lib/package.json && (cd ./lib && npm publish)"
|
|
26
26
|
},
|
|
27
27
|
"author": "",
|
|
28
28
|
"license": "ISC",
|