@nexushub/client 0.8.8 → 0.9.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/dist/{chunk-WZ47UVA2.cjs → chunk-3TDCUTZR.cjs} +4 -4
- package/dist/{chunk-HUABKET6.js → chunk-VQ6IEN4I.js} +4 -4
- package/dist/cli.cjs +125 -154
- package/dist/content/local-cache-server.cjs +4 -4
- package/dist/content/local-cache-server.js +4 -4
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +5 -5
- package/dist/{local-cache-server-S5KIABVH.cjs → local-cache-server-KUGMBMJP.cjs} +2 -2
- package/dist/{local-cache-server-667T23JJ.js → local-cache-server-RM7T456Z.js} +1 -1
- package/dist/react.cjs +5 -5
- package/dist/react.js +3 -3
- package/package.json +1 -1
|
@@ -37,10 +37,10 @@ var import_fs = __toESM(require("fs"), 1);
|
|
|
37
37
|
var import_path = __toESM(require("path"), 1);
|
|
38
38
|
|
|
39
39
|
// src/config.ts
|
|
40
|
-
var DEFAULT_API_URL = "https://gnapex.
|
|
41
|
-
var DEFAULT_ANALYTICS_URL = "https://sentry.
|
|
42
|
-
var LOCAL_NEST_URL = "https://gnapex.
|
|
43
|
-
var LOCAL_RUST_URL = "https://sentry.
|
|
40
|
+
var DEFAULT_API_URL = "https://api.gnapex.com";
|
|
41
|
+
var DEFAULT_ANALYTICS_URL = "https://sentry.gnapex.com";
|
|
42
|
+
var LOCAL_NEST_URL = "https://api.gnapex.com";
|
|
43
|
+
var LOCAL_RUST_URL = "https://sentry.gnapex.com";
|
|
44
44
|
var getEnvConfig = () => {
|
|
45
45
|
const NEXT_PUBLIC_ID = typeof process !== "undefined" ? process.env.NEXT_PUBLIC_NEXUS_ID : void 0;
|
|
46
46
|
const NEXT_PUBLIC_KEY = typeof process !== "undefined" ? process.env.NEXT_PUBLIC_NEXUS_KEY : void 0;
|
|
@@ -3,10 +3,10 @@ import fs from "fs";
|
|
|
3
3
|
import path from "path";
|
|
4
4
|
|
|
5
5
|
// src/config.ts
|
|
6
|
-
var DEFAULT_API_URL = "https://gnapex.
|
|
7
|
-
var DEFAULT_ANALYTICS_URL = "https://sentry.
|
|
8
|
-
var LOCAL_NEST_URL = "https://gnapex.
|
|
9
|
-
var LOCAL_RUST_URL = "https://sentry.
|
|
6
|
+
var DEFAULT_API_URL = "https://api.gnapex.com";
|
|
7
|
+
var DEFAULT_ANALYTICS_URL = "https://sentry.gnapex.com";
|
|
8
|
+
var LOCAL_NEST_URL = "https://api.gnapex.com";
|
|
9
|
+
var LOCAL_RUST_URL = "https://sentry.gnapex.com";
|
|
10
10
|
var getEnvConfig = () => {
|
|
11
11
|
const NEXT_PUBLIC_ID = typeof process !== "undefined" ? process.env.NEXT_PUBLIC_NEXUS_ID : void 0;
|
|
12
12
|
const NEXT_PUBLIC_KEY = typeof process !== "undefined" ? process.env.NEXT_PUBLIC_NEXUS_KEY : void 0;
|
package/dist/index.cjs
CHANGED
|
@@ -35,10 +35,10 @@ var DEFAULT_API_URL, DEFAULT_ANALYTICS_URL, LOCAL_NEST_URL, LOCAL_RUST_URL, getE
|
|
|
35
35
|
var init_config = __esm({
|
|
36
36
|
"src/config.ts"() {
|
|
37
37
|
"use strict";
|
|
38
|
-
DEFAULT_API_URL = "https://gnapex.
|
|
39
|
-
DEFAULT_ANALYTICS_URL = "https://sentry.
|
|
40
|
-
LOCAL_NEST_URL = "https://gnapex.
|
|
41
|
-
LOCAL_RUST_URL = "https://sentry.
|
|
38
|
+
DEFAULT_API_URL = "https://api.gnapex.com";
|
|
39
|
+
DEFAULT_ANALYTICS_URL = "https://sentry.gnapex.com";
|
|
40
|
+
LOCAL_NEST_URL = "https://api.gnapex.com";
|
|
41
|
+
LOCAL_RUST_URL = "https://sentry.gnapex.com";
|
|
42
42
|
getEnvConfig = () => {
|
|
43
43
|
const NEXT_PUBLIC_ID = typeof process !== "undefined" ? process.env.NEXT_PUBLIC_NEXUS_ID : void 0;
|
|
44
44
|
const NEXT_PUBLIC_KEY = typeof process !== "undefined" ? process.env.NEXT_PUBLIC_NEXUS_KEY : void 0;
|
|
@@ -2590,7 +2590,7 @@ function getSelector(el, depth = 0) {
|
|
|
2590
2590
|
}
|
|
2591
2591
|
|
|
2592
2592
|
// src/client.ts
|
|
2593
|
-
var DEFAULT_REVALIDATE_SECONDS =
|
|
2593
|
+
var DEFAULT_REVALIDATE_SECONDS = false;
|
|
2594
2594
|
var NexusClient = class {
|
|
2595
2595
|
constructor(config) {
|
|
2596
2596
|
const fullConfig = getFullConfig(config);
|
package/dist/index.d.cts
CHANGED
|
@@ -6,10 +6,10 @@ interface MinimalNexusConfig {
|
|
|
6
6
|
apiKey?: string;
|
|
7
7
|
projectId?: string;
|
|
8
8
|
}
|
|
9
|
-
declare const DEFAULT_API_URL = "https://gnapex.
|
|
10
|
-
declare const DEFAULT_ANALYTICS_URL = "https://sentry.
|
|
11
|
-
declare const LOCAL_NEST_URL = "https://gnapex.
|
|
12
|
-
declare const LOCAL_RUST_URL = "https://sentry.
|
|
9
|
+
declare const DEFAULT_API_URL = "https://api.gnapex.com";
|
|
10
|
+
declare const DEFAULT_ANALYTICS_URL = "https://sentry.gnapex.com";
|
|
11
|
+
declare const LOCAL_NEST_URL = "https://api.gnapex.com";
|
|
12
|
+
declare const LOCAL_RUST_URL = "https://sentry.gnapex.com";
|
|
13
13
|
declare const getEnvConfig: () => MinimalNexusConfig;
|
|
14
14
|
declare const mergeConfigs: (base: MinimalNexusConfig, override: Partial<MinimalNexusConfig>) => MinimalNexusConfig;
|
|
15
15
|
declare const getFullConfig: (partialConfig?: Partial<MinimalNexusConfig>) => MinimalNexusConfig;
|
package/dist/index.d.ts
CHANGED
|
@@ -6,10 +6,10 @@ interface MinimalNexusConfig {
|
|
|
6
6
|
apiKey?: string;
|
|
7
7
|
projectId?: string;
|
|
8
8
|
}
|
|
9
|
-
declare const DEFAULT_API_URL = "https://gnapex.
|
|
10
|
-
declare const DEFAULT_ANALYTICS_URL = "https://sentry.
|
|
11
|
-
declare const LOCAL_NEST_URL = "https://gnapex.
|
|
12
|
-
declare const LOCAL_RUST_URL = "https://sentry.
|
|
9
|
+
declare const DEFAULT_API_URL = "https://api.gnapex.com";
|
|
10
|
+
declare const DEFAULT_ANALYTICS_URL = "https://sentry.gnapex.com";
|
|
11
|
+
declare const LOCAL_NEST_URL = "https://api.gnapex.com";
|
|
12
|
+
declare const LOCAL_RUST_URL = "https://sentry.gnapex.com";
|
|
13
13
|
declare const getEnvConfig: () => MinimalNexusConfig;
|
|
14
14
|
declare const mergeConfigs: (base: MinimalNexusConfig, override: Partial<MinimalNexusConfig>) => MinimalNexusConfig;
|
|
15
15
|
declare const getFullConfig: (partialConfig?: Partial<MinimalNexusConfig>) => MinimalNexusConfig;
|
package/dist/index.js
CHANGED
|
@@ -13,10 +13,10 @@ var DEFAULT_API_URL, DEFAULT_ANALYTICS_URL, LOCAL_NEST_URL, LOCAL_RUST_URL, getE
|
|
|
13
13
|
var init_config = __esm({
|
|
14
14
|
"src/config.ts"() {
|
|
15
15
|
"use strict";
|
|
16
|
-
DEFAULT_API_URL = "https://gnapex.
|
|
17
|
-
DEFAULT_ANALYTICS_URL = "https://sentry.
|
|
18
|
-
LOCAL_NEST_URL = "https://gnapex.
|
|
19
|
-
LOCAL_RUST_URL = "https://sentry.
|
|
16
|
+
DEFAULT_API_URL = "https://api.gnapex.com";
|
|
17
|
+
DEFAULT_ANALYTICS_URL = "https://sentry.gnapex.com";
|
|
18
|
+
LOCAL_NEST_URL = "https://api.gnapex.com";
|
|
19
|
+
LOCAL_RUST_URL = "https://sentry.gnapex.com";
|
|
20
20
|
getEnvConfig = () => {
|
|
21
21
|
const NEXT_PUBLIC_ID = typeof process !== "undefined" ? process.env.NEXT_PUBLIC_NEXUS_ID : void 0;
|
|
22
22
|
const NEXT_PUBLIC_KEY = typeof process !== "undefined" ? process.env.NEXT_PUBLIC_NEXUS_KEY : void 0;
|
|
@@ -2544,7 +2544,7 @@ function getSelector(el, depth = 0) {
|
|
|
2544
2544
|
}
|
|
2545
2545
|
|
|
2546
2546
|
// src/client.ts
|
|
2547
|
-
var DEFAULT_REVALIDATE_SECONDS =
|
|
2547
|
+
var DEFAULT_REVALIDATE_SECONDS = false;
|
|
2548
2548
|
var NexusClient = class {
|
|
2549
2549
|
constructor(config) {
|
|
2550
2550
|
const fullConfig = getFullConfig(config);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk3TDCUTZRcjs = require('./chunk-3TDCUTZR.cjs');
|
|
4
4
|
|
|
5
5
|
// src/content/local-cache-server.ts
|
|
6
6
|
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
@@ -109,7 +109,7 @@ var LocalCache = class {
|
|
|
109
109
|
constructor(customPath, apiKey) {
|
|
110
110
|
this.apiKey = "";
|
|
111
111
|
this.baseDir = customPath || ".nexus/local";
|
|
112
|
-
const config =
|
|
112
|
+
const config = _chunk3TDCUTZRcjs.getEnvConfig.call(void 0, );
|
|
113
113
|
this.apiKey = apiKey || config.apiKey || "";
|
|
114
114
|
}
|
|
115
115
|
isLoaded() {
|
package/dist/react.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk3TDCUTZRcjs = require('./chunk-3TDCUTZR.cjs');
|
|
5
5
|
|
|
6
6
|
// src/components/NexusProvider.tsx
|
|
7
7
|
|
|
@@ -282,7 +282,7 @@ var LocalCacheProxy = class {
|
|
|
282
282
|
async getInstance() {
|
|
283
283
|
if (this.instance) return this.instance;
|
|
284
284
|
if (typeof window === "undefined") {
|
|
285
|
-
const mod = await Promise.resolve().then(() => _interopRequireWildcard(require("./local-cache-server-
|
|
285
|
+
const mod = await Promise.resolve().then(() => _interopRequireWildcard(require("./local-cache-server-KUGMBMJP.cjs")));
|
|
286
286
|
this.instance = new mod.LocalCache(this.cachePath);
|
|
287
287
|
} else {
|
|
288
288
|
const mod = await Promise.resolve().then(() => _interopRequireWildcard(require("./local-cache-client-IGAL7SZ6.cjs")));
|
|
@@ -2189,10 +2189,10 @@ function getSelector(el, depth = 0) {
|
|
|
2189
2189
|
}
|
|
2190
2190
|
|
|
2191
2191
|
// src/client.ts
|
|
2192
|
-
var DEFAULT_REVALIDATE_SECONDS =
|
|
2192
|
+
var DEFAULT_REVALIDATE_SECONDS = false;
|
|
2193
2193
|
var NexusClient = class {
|
|
2194
2194
|
constructor(config) {
|
|
2195
|
-
const fullConfig =
|
|
2195
|
+
const fullConfig = _chunk3TDCUTZRcjs.getFullConfig.call(void 0, config);
|
|
2196
2196
|
this.config = {
|
|
2197
2197
|
debug: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _41 => _41.debug]), () => ( false)),
|
|
2198
2198
|
cacheStrategy: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _42 => _42.cacheStrategy]), () => ( "memory")),
|
|
@@ -2207,7 +2207,7 @@ var NexusClient = class {
|
|
|
2207
2207
|
retries: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _45 => _45.retries]), () => ( 3)),
|
|
2208
2208
|
...fullConfig
|
|
2209
2209
|
};
|
|
2210
|
-
const errors =
|
|
2210
|
+
const errors = _chunk3TDCUTZRcjs.validateConfig.call(void 0, this.config);
|
|
2211
2211
|
if (errors.length > 0) {
|
|
2212
2212
|
console.warn("\u26A0\uFE0F NexusHub: Configuration issues:", errors.join(", "));
|
|
2213
2213
|
if (!this.config.projectId) {
|
package/dist/react.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getFullConfig,
|
|
3
3
|
validateConfig
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VQ6IEN4I.js";
|
|
5
5
|
|
|
6
6
|
// src/components/NexusProvider.tsx
|
|
7
7
|
import React2, {
|
|
@@ -282,7 +282,7 @@ var LocalCacheProxy = class {
|
|
|
282
282
|
async getInstance() {
|
|
283
283
|
if (this.instance) return this.instance;
|
|
284
284
|
if (typeof window === "undefined") {
|
|
285
|
-
const mod = await import("./local-cache-server-
|
|
285
|
+
const mod = await import("./local-cache-server-RM7T456Z.js");
|
|
286
286
|
this.instance = new mod.LocalCache(this.cachePath);
|
|
287
287
|
} else {
|
|
288
288
|
const mod = await import("./local-cache-client-I6UYVJJV.js");
|
|
@@ -2189,7 +2189,7 @@ function getSelector(el, depth = 0) {
|
|
|
2189
2189
|
}
|
|
2190
2190
|
|
|
2191
2191
|
// src/client.ts
|
|
2192
|
-
var DEFAULT_REVALIDATE_SECONDS =
|
|
2192
|
+
var DEFAULT_REVALIDATE_SECONDS = false;
|
|
2193
2193
|
var NexusClient = class {
|
|
2194
2194
|
constructor(config) {
|
|
2195
2195
|
const fullConfig = getFullConfig(config);
|