@nexushub/client 1.1.3 → 1.1.6
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 +150 -148
- package/dist/index.cjs +5 -2
- package/dist/index.js +5 -2
- package/dist/react.cjs +5 -2
- package/dist/react.js +5 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1350,13 +1350,16 @@ var ContentEngine = class {
|
|
|
1350
1350
|
const slug = key.split(":")[1];
|
|
1351
1351
|
try {
|
|
1352
1352
|
const local = await this.localCache.getPage(slug);
|
|
1353
|
-
if (local) {
|
|
1353
|
+
if (local && (process.env.NODE_ENV === "development" || !this.config.apiKey)) {
|
|
1354
1354
|
return {
|
|
1355
1355
|
data: local,
|
|
1356
1356
|
metadata: {
|
|
1357
1357
|
timestamp: Date.now(),
|
|
1358
1358
|
expiresAt: Infinity,
|
|
1359
|
-
tags: [
|
|
1359
|
+
tags: [
|
|
1360
|
+
CacheTags.content(slug),
|
|
1361
|
+
CacheTags.project(this.config.projectId)
|
|
1362
|
+
],
|
|
1360
1363
|
etag: void 0
|
|
1361
1364
|
}
|
|
1362
1365
|
};
|
package/dist/index.js
CHANGED
|
@@ -1294,13 +1294,16 @@ var ContentEngine = class {
|
|
|
1294
1294
|
const slug = key.split(":")[1];
|
|
1295
1295
|
try {
|
|
1296
1296
|
const local = await this.localCache.getPage(slug);
|
|
1297
|
-
if (local) {
|
|
1297
|
+
if (local && (process.env.NODE_ENV === "development" || !this.config.apiKey)) {
|
|
1298
1298
|
return {
|
|
1299
1299
|
data: local,
|
|
1300
1300
|
metadata: {
|
|
1301
1301
|
timestamp: Date.now(),
|
|
1302
1302
|
expiresAt: Infinity,
|
|
1303
|
-
tags: [
|
|
1303
|
+
tags: [
|
|
1304
|
+
CacheTags.content(slug),
|
|
1305
|
+
CacheTags.project(this.config.projectId)
|
|
1306
|
+
],
|
|
1304
1307
|
etag: void 0
|
|
1305
1308
|
}
|
|
1306
1309
|
};
|
package/dist/react.cjs
CHANGED
|
@@ -1276,13 +1276,16 @@ var ContentEngine = class {
|
|
|
1276
1276
|
const slug = key.split(":")[1];
|
|
1277
1277
|
try {
|
|
1278
1278
|
const local = await this.localCache.getPage(slug);
|
|
1279
|
-
if (local) {
|
|
1279
|
+
if (local && (process.env.NODE_ENV === "development" || !this.config.apiKey)) {
|
|
1280
1280
|
return {
|
|
1281
1281
|
data: local,
|
|
1282
1282
|
metadata: {
|
|
1283
1283
|
timestamp: Date.now(),
|
|
1284
1284
|
expiresAt: Infinity,
|
|
1285
|
-
tags: [
|
|
1285
|
+
tags: [
|
|
1286
|
+
CacheTags.content(slug),
|
|
1287
|
+
CacheTags.project(this.config.projectId)
|
|
1288
|
+
],
|
|
1286
1289
|
etag: void 0
|
|
1287
1290
|
}
|
|
1288
1291
|
};
|
package/dist/react.js
CHANGED
|
@@ -1276,13 +1276,16 @@ var ContentEngine = class {
|
|
|
1276
1276
|
const slug = key.split(":")[1];
|
|
1277
1277
|
try {
|
|
1278
1278
|
const local = await this.localCache.getPage(slug);
|
|
1279
|
-
if (local) {
|
|
1279
|
+
if (local && (process.env.NODE_ENV === "development" || !this.config.apiKey)) {
|
|
1280
1280
|
return {
|
|
1281
1281
|
data: local,
|
|
1282
1282
|
metadata: {
|
|
1283
1283
|
timestamp: Date.now(),
|
|
1284
1284
|
expiresAt: Infinity,
|
|
1285
|
-
tags: [
|
|
1285
|
+
tags: [
|
|
1286
|
+
CacheTags.content(slug),
|
|
1287
|
+
CacheTags.project(this.config.projectId)
|
|
1288
|
+
],
|
|
1286
1289
|
etag: void 0
|
|
1287
1290
|
}
|
|
1288
1291
|
};
|