@nexushub/client 0.4.8 → 0.5.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/cli.cjs +59 -59
- package/dist/content/local-cache-server.cjs +7 -3
- package/dist/content/local-cache-server.d.cts +1 -1
- package/dist/content/local-cache-server.d.ts +1 -1
- package/dist/content/local-cache-server.js +7 -3
- package/dist/index.cjs +7 -3
- package/dist/index.js +7 -3
- package/dist/{local-cache-server-SF5SXE7H.cjs → local-cache-server-SGSGWUCL.cjs} +7 -3
- package/dist/{local-cache-server-BNLLL4NR.js → local-cache-server-VL4YNBME.js} +7 -3
- package/dist/react.cjs +1 -1
- package/dist/react.js +1 -1
- package/dist/studio/assets/{mB7eUryk.js → PIuWTMTX.js} +1 -1
- package/dist/studio/assets/iM6t2qjn.css +2 -0
- package/dist/studio/index.html +2 -2
- package/package.json +1 -1
- package/dist/studio/assets/Z3_yTMYS.css +0 -2
|
@@ -162,11 +162,11 @@ BinaryCompiler.ALGORITHM = "aes-256-cbc";
|
|
|
162
162
|
|
|
163
163
|
// src/content/local-cache-server.ts
|
|
164
164
|
var LocalCache = class {
|
|
165
|
-
constructor(customPath) {
|
|
165
|
+
constructor(customPath, apiKey) {
|
|
166
166
|
this.apiKey = "";
|
|
167
167
|
this.baseDir = customPath || ".nexus/local";
|
|
168
168
|
const config = getEnvConfig();
|
|
169
|
-
this.apiKey = config.apiKey || "";
|
|
169
|
+
this.apiKey = apiKey || config.apiKey || "";
|
|
170
170
|
}
|
|
171
171
|
isLoaded() {
|
|
172
172
|
return import_fs.default.existsSync(import_path.default.resolve(process.cwd(), this.baseDir));
|
|
@@ -214,7 +214,11 @@ var LocalCache = class {
|
|
|
214
214
|
if (import_fs.default.existsSync(filePath)) {
|
|
215
215
|
const pageData = this.decompileFile(filePath);
|
|
216
216
|
if (!pageData) return null;
|
|
217
|
-
|
|
217
|
+
let content = pageData;
|
|
218
|
+
while (content && typeof content === "object" && content.data !== void 0) {
|
|
219
|
+
content = content.data;
|
|
220
|
+
}
|
|
221
|
+
return content;
|
|
218
222
|
}
|
|
219
223
|
return null;
|
|
220
224
|
}
|
|
@@ -3,7 +3,7 @@ import { I as ILocalCache } from '../cache-types-B39iNHfE.cjs';
|
|
|
3
3
|
declare class LocalCache implements ILocalCache {
|
|
4
4
|
private baseDir;
|
|
5
5
|
private apiKey;
|
|
6
|
-
constructor(customPath?: string);
|
|
6
|
+
constructor(customPath?: string, apiKey?: string);
|
|
7
7
|
isLoaded(): boolean;
|
|
8
8
|
/**
|
|
9
9
|
* Helper to decrypt and decompile `.nx` files on-the-fly.
|
|
@@ -3,7 +3,7 @@ import { I as ILocalCache } from '../cache-types-B39iNHfE.js';
|
|
|
3
3
|
declare class LocalCache implements ILocalCache {
|
|
4
4
|
private baseDir;
|
|
5
5
|
private apiKey;
|
|
6
|
-
constructor(customPath?: string);
|
|
6
|
+
constructor(customPath?: string, apiKey?: string);
|
|
7
7
|
isLoaded(): boolean;
|
|
8
8
|
/**
|
|
9
9
|
* Helper to decrypt and decompile `.nx` files on-the-fly.
|
|
@@ -128,11 +128,11 @@ BinaryCompiler.ALGORITHM = "aes-256-cbc";
|
|
|
128
128
|
|
|
129
129
|
// src/content/local-cache-server.ts
|
|
130
130
|
var LocalCache = class {
|
|
131
|
-
constructor(customPath) {
|
|
131
|
+
constructor(customPath, apiKey) {
|
|
132
132
|
this.apiKey = "";
|
|
133
133
|
this.baseDir = customPath || ".nexus/local";
|
|
134
134
|
const config = getEnvConfig();
|
|
135
|
-
this.apiKey = config.apiKey || "";
|
|
135
|
+
this.apiKey = apiKey || config.apiKey || "";
|
|
136
136
|
}
|
|
137
137
|
isLoaded() {
|
|
138
138
|
return fs.existsSync(path.resolve(process.cwd(), this.baseDir));
|
|
@@ -180,7 +180,11 @@ var LocalCache = class {
|
|
|
180
180
|
if (fs.existsSync(filePath)) {
|
|
181
181
|
const pageData = this.decompileFile(filePath);
|
|
182
182
|
if (!pageData) return null;
|
|
183
|
-
|
|
183
|
+
let content = pageData;
|
|
184
|
+
while (content && typeof content === "object" && content.data !== void 0) {
|
|
185
|
+
content = content.data;
|
|
186
|
+
}
|
|
187
|
+
return content;
|
|
184
188
|
}
|
|
185
189
|
return null;
|
|
186
190
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -202,11 +202,11 @@ var init_local_cache_server = __esm({
|
|
|
202
202
|
init_config();
|
|
203
203
|
init_binary_compiler();
|
|
204
204
|
LocalCache = class {
|
|
205
|
-
constructor(customPath) {
|
|
205
|
+
constructor(customPath, apiKey) {
|
|
206
206
|
this.apiKey = "";
|
|
207
207
|
this.baseDir = customPath || ".nexus/local";
|
|
208
208
|
const config = getEnvConfig();
|
|
209
|
-
this.apiKey = config.apiKey || "";
|
|
209
|
+
this.apiKey = apiKey || config.apiKey || "";
|
|
210
210
|
}
|
|
211
211
|
isLoaded() {
|
|
212
212
|
return import_fs.default.existsSync(import_path.default.resolve(process.cwd(), this.baseDir));
|
|
@@ -254,7 +254,11 @@ var init_local_cache_server = __esm({
|
|
|
254
254
|
if (import_fs.default.existsSync(filePath)) {
|
|
255
255
|
const pageData = this.decompileFile(filePath);
|
|
256
256
|
if (!pageData) return null;
|
|
257
|
-
|
|
257
|
+
let content = pageData;
|
|
258
|
+
while (content && typeof content === "object" && content.data !== void 0) {
|
|
259
|
+
content = content.data;
|
|
260
|
+
}
|
|
261
|
+
return content;
|
|
258
262
|
}
|
|
259
263
|
return null;
|
|
260
264
|
}
|
package/dist/index.js
CHANGED
|
@@ -180,11 +180,11 @@ var init_local_cache_server = __esm({
|
|
|
180
180
|
init_config();
|
|
181
181
|
init_binary_compiler();
|
|
182
182
|
LocalCache = class {
|
|
183
|
-
constructor(customPath) {
|
|
183
|
+
constructor(customPath, apiKey) {
|
|
184
184
|
this.apiKey = "";
|
|
185
185
|
this.baseDir = customPath || ".nexus/local";
|
|
186
186
|
const config = getEnvConfig();
|
|
187
|
-
this.apiKey = config.apiKey || "";
|
|
187
|
+
this.apiKey = apiKey || config.apiKey || "";
|
|
188
188
|
}
|
|
189
189
|
isLoaded() {
|
|
190
190
|
return fs.existsSync(path.resolve(process.cwd(), this.baseDir));
|
|
@@ -232,7 +232,11 @@ var init_local_cache_server = __esm({
|
|
|
232
232
|
if (fs.existsSync(filePath)) {
|
|
233
233
|
const pageData = this.decompileFile(filePath);
|
|
234
234
|
if (!pageData) return null;
|
|
235
|
-
|
|
235
|
+
let content = pageData;
|
|
236
|
+
while (content && typeof content === "object" && content.data !== void 0) {
|
|
237
|
+
content = content.data;
|
|
238
|
+
}
|
|
239
|
+
return content;
|
|
236
240
|
}
|
|
237
241
|
return null;
|
|
238
242
|
}
|
|
@@ -106,11 +106,11 @@ BinaryCompiler.ALGORITHM = "aes-256-cbc";
|
|
|
106
106
|
|
|
107
107
|
// src/content/local-cache-server.ts
|
|
108
108
|
var LocalCache = class {
|
|
109
|
-
constructor(customPath) {
|
|
109
|
+
constructor(customPath, apiKey) {
|
|
110
110
|
this.apiKey = "";
|
|
111
111
|
this.baseDir = customPath || ".nexus/local";
|
|
112
112
|
const config = _chunkVFVPDENWcjs.getEnvConfig.call(void 0, );
|
|
113
|
-
this.apiKey = config.apiKey || "";
|
|
113
|
+
this.apiKey = apiKey || config.apiKey || "";
|
|
114
114
|
}
|
|
115
115
|
isLoaded() {
|
|
116
116
|
return _fs2.default.existsSync(_path2.default.resolve(process.cwd(), this.baseDir));
|
|
@@ -158,7 +158,11 @@ var LocalCache = class {
|
|
|
158
158
|
if (_fs2.default.existsSync(filePath)) {
|
|
159
159
|
const pageData = this.decompileFile(filePath);
|
|
160
160
|
if (!pageData) return null;
|
|
161
|
-
|
|
161
|
+
let content = pageData;
|
|
162
|
+
while (content && typeof content === "object" && content.data !== void 0) {
|
|
163
|
+
content = content.data;
|
|
164
|
+
}
|
|
165
|
+
return content;
|
|
162
166
|
}
|
|
163
167
|
return null;
|
|
164
168
|
}
|
|
@@ -106,11 +106,11 @@ BinaryCompiler.ALGORITHM = "aes-256-cbc";
|
|
|
106
106
|
|
|
107
107
|
// src/content/local-cache-server.ts
|
|
108
108
|
var LocalCache = class {
|
|
109
|
-
constructor(customPath) {
|
|
109
|
+
constructor(customPath, apiKey) {
|
|
110
110
|
this.apiKey = "";
|
|
111
111
|
this.baseDir = customPath || ".nexus/local";
|
|
112
112
|
const config = getEnvConfig();
|
|
113
|
-
this.apiKey = config.apiKey || "";
|
|
113
|
+
this.apiKey = apiKey || config.apiKey || "";
|
|
114
114
|
}
|
|
115
115
|
isLoaded() {
|
|
116
116
|
return fs.existsSync(path.resolve(process.cwd(), this.baseDir));
|
|
@@ -158,7 +158,11 @@ var LocalCache = class {
|
|
|
158
158
|
if (fs.existsSync(filePath)) {
|
|
159
159
|
const pageData = this.decompileFile(filePath);
|
|
160
160
|
if (!pageData) return null;
|
|
161
|
-
|
|
161
|
+
let content = pageData;
|
|
162
|
+
while (content && typeof content === "object" && content.data !== void 0) {
|
|
163
|
+
content = content.data;
|
|
164
|
+
}
|
|
165
|
+
return content;
|
|
162
166
|
}
|
|
163
167
|
return null;
|
|
164
168
|
}
|
package/dist/react.cjs
CHANGED
|
@@ -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-SGSGWUCL.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")));
|
package/dist/react.js
CHANGED
|
@@ -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-VL4YNBME.js");
|
|
286
286
|
this.instance = new mod.LocalCache(this.cachePath);
|
|
287
287
|
} else {
|
|
288
288
|
const mod = await import("./local-cache-client-I6UYVJJV.js");
|