@carlonicora/nextjs-jsonapi 6.12.2 → 6.13.1
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/{ApiData-DPKNfY-9.d.mts → ApiData-Be8yxCOX.d.mts} +2 -0
- package/dist/{ApiData-DPKNfY-9.d.ts → ApiData-Be8yxCOX.d.ts} +2 -0
- package/dist/{BlockNoteEditor-7M5QW2YQ.js → BlockNoteEditor-UBVEUFNR.js} +34 -22
- package/dist/BlockNoteEditor-UBVEUFNR.js.map +1 -0
- package/dist/{BlockNoteEditor-75ED2CN2.mjs → BlockNoteEditor-VXMDSQAA.mjs} +20 -8
- package/dist/BlockNoteEditor-VXMDSQAA.mjs.map +1 -0
- package/dist/{BlockNoteViewer-WGCDB7IJ.js → BlockNoteViewer-2XYASA5Y.js} +8 -5
- package/dist/BlockNoteViewer-2XYASA5Y.js.map +1 -0
- package/dist/{BlockNoteViewer-MTGS6YJV.mjs → BlockNoteViewer-NBW2H6LC.mjs} +7 -4
- package/dist/{BlockNoteViewer-MTGS6YJV.mjs.map → BlockNoteViewer-NBW2H6LC.mjs.map} +1 -1
- package/dist/{JsonApiRequest-A66XK5WT.mjs → JsonApiRequest-F6TMJ42G.mjs} +2 -2
- package/dist/JsonApiRequest-WISJZSDE.js +26 -0
- package/dist/{JsonApiRequest-FZGPLNUF.js.map → JsonApiRequest-WISJZSDE.js.map} +1 -1
- package/dist/billing/index.js +499 -494
- package/dist/billing/index.js.map +1 -1
- package/dist/billing/index.mjs +13 -8
- package/dist/billing/index.mjs.map +1 -1
- package/dist/chunk-27LQDGNP.mjs +317 -0
- package/dist/chunk-27LQDGNP.mjs.map +1 -0
- package/dist/{chunk-KSYQEKJX.js → chunk-2SV4SS6N.js} +14 -14
- package/dist/{chunk-KSYQEKJX.js.map → chunk-2SV4SS6N.js.map} +1 -1
- package/dist/{chunk-4FNGWALA.mjs → chunk-47BBY5KA.mjs} +6 -4
- package/dist/{chunk-4FNGWALA.mjs.map → chunk-47BBY5KA.mjs.map} +1 -1
- package/dist/chunk-6JUCIWDC.mjs +570 -0
- package/dist/chunk-6JUCIWDC.mjs.map +1 -0
- package/dist/chunk-7DBJTNSU.mjs +1049 -0
- package/dist/chunk-7DBJTNSU.mjs.map +1 -0
- package/dist/chunk-7JZHPMGW.mjs +704 -0
- package/dist/chunk-7JZHPMGW.mjs.map +1 -0
- package/dist/{chunk-L6PYFQTO.js → chunk-7ZHTPFFT.js} +16 -14
- package/dist/chunk-7ZHTPFFT.js.map +1 -0
- package/dist/chunk-B6JGKDP2.js +214 -0
- package/dist/chunk-B6JGKDP2.js.map +1 -0
- package/dist/{chunk-3YW35YHQ.mjs → chunk-BH6JWIKI.mjs} +5 -5
- package/dist/chunk-BZ5J2FIV.js +570 -0
- package/dist/chunk-BZ5J2FIV.js.map +1 -0
- package/dist/{chunk-V5MI7RNB.mjs → chunk-DGWOVYEC.mjs} +2 -2
- package/dist/chunk-DOCIFE6A.mjs +212 -0
- package/dist/chunk-DOCIFE6A.mjs.map +1 -0
- package/dist/chunk-GB6DBFYY.js +25 -0
- package/dist/chunk-GB6DBFYY.js.map +1 -0
- package/dist/{chunk-EWCY6QJA.mjs → chunk-JJMMT24D.mjs} +37 -3
- package/dist/chunk-JJMMT24D.mjs.map +1 -0
- package/dist/{chunk-JTPRJNT2.js → chunk-KMW7UNL2.js} +38 -3
- package/dist/chunk-KMW7UNL2.js.map +1 -0
- package/dist/chunk-MHB36MYE.js +317 -0
- package/dist/chunk-MHB36MYE.js.map +1 -0
- package/dist/{chunk-FF4EIQ6H.js → chunk-MOGEGWXW.js} +1039 -1680
- package/dist/chunk-MOGEGWXW.js.map +1 -0
- package/dist/{chunk-RXQYEEKZ.mjs → chunk-N4RZZKL5.mjs} +58 -25
- package/dist/chunk-N4RZZKL5.mjs.map +1 -0
- package/dist/{chunk-AA52ORW2.mjs → chunk-P445QGOC.mjs} +61 -702
- package/dist/chunk-P445QGOC.mjs.map +1 -0
- package/dist/chunk-PV4Z5W6V.js +212 -0
- package/dist/chunk-PV4Z5W6V.js.map +1 -0
- package/dist/chunk-PXDUJ47N.js +1049 -0
- package/dist/chunk-PXDUJ47N.js.map +1 -0
- package/dist/{chunk-V3YDVJ63.js → chunk-PYRZCKC2.js} +1209 -1176
- package/dist/chunk-PYRZCKC2.js.map +1 -0
- package/dist/{chunk-GHE4VT2R.js → chunk-QKNGZDSQ.js} +2 -2
- package/dist/{chunk-GHE4VT2R.js.map → chunk-QKNGZDSQ.js.map} +1 -1
- package/dist/chunk-W62MHDWM.js +704 -0
- package/dist/chunk-W62MHDWM.js.map +1 -0
- package/dist/chunk-XXP3TQHF.mjs +25 -0
- package/dist/chunk-XXP3TQHF.mjs.map +1 -0
- package/dist/chunk-YRKIFYOE.mjs +214 -0
- package/dist/chunk-YRKIFYOE.mjs.map +1 -0
- package/dist/{chunk-O3PDL2CV.js → chunk-Z4POQWFG.js} +40 -6
- package/dist/chunk-Z4POQWFG.js.map +1 -0
- package/dist/{chunk-PI56A4DG.mjs → chunk-ZLTOUZN2.mjs} +37 -2
- package/dist/chunk-ZLTOUZN2.mjs.map +1 -0
- package/dist/client/index.d.mts +2 -2
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.js +14 -9
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +24 -19
- package/dist/components/index.d.mts +7 -1
- package/dist/components/index.d.ts +7 -1
- package/dist/components/index.js +11 -7
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +10 -6
- package/dist/contexts/index.d.mts +1 -1
- package/dist/contexts/index.d.ts +1 -1
- package/dist/contexts/index.js +11 -7
- package/dist/contexts/index.js.map +1 -1
- package/dist/contexts/index.mjs +10 -6
- package/dist/core/index.d.mts +128 -2
- package/dist/core/index.d.ts +128 -2
- package/dist/core/index.js +17 -4
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +22 -9
- package/dist/email-automations/index.js +101 -96
- package/dist/email-automations/index.js.map +1 -1
- package/dist/email-automations/index.mjs +13 -8
- package/dist/email-automations/index.mjs.map +1 -1
- package/dist/features/analytics/index.js +128 -123
- package/dist/features/analytics/index.js.map +1 -1
- package/dist/features/analytics/index.mjs +13 -8
- package/dist/features/analytics/index.mjs.map +1 -1
- package/dist/features/analytics/server.js +11 -8
- package/dist/features/analytics/server.js.map +1 -1
- package/dist/features/analytics/server.mjs +9 -6
- package/dist/features/analytics/server.mjs.map +1 -1
- package/dist/features/blog/index.js +158 -153
- package/dist/features/blog/index.js.map +1 -1
- package/dist/features/blog/index.mjs +14 -9
- package/dist/features/blog/index.mjs.map +1 -1
- package/dist/features/blog/server.js +30 -26
- package/dist/features/blog/server.js.map +1 -1
- package/dist/features/blog/server.mjs +10 -6
- package/dist/features/blog/server.mjs.map +1 -1
- package/dist/features/help/index.js +44 -40
- package/dist/features/help/index.js.map +1 -1
- package/dist/features/help/index.mjs +10 -6
- package/dist/features/help/index.mjs.map +1 -1
- package/dist/features/tokenusage/index.js +134 -129
- package/dist/features/tokenusage/index.js.map +1 -1
- package/dist/features/tokenusage/index.mjs +13 -8
- package/dist/features/tokenusage/index.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +18 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -11
- package/dist/lifecycle-4GUOTB46.js +23 -0
- package/dist/lifecycle-4GUOTB46.js.map +1 -0
- package/dist/lifecycle-LKGPRBS7.mjs +23 -0
- package/dist/local-transport-7H3SPZSA.js +15 -0
- package/dist/local-transport-7H3SPZSA.js.map +1 -0
- package/dist/local-transport-QYFKA6AN.mjs +15 -0
- package/dist/local-transport-QYFKA6AN.mjs.map +1 -0
- package/dist/offline/index.d.mts +607 -0
- package/dist/offline/index.d.ts +607 -0
- package/dist/offline/index.js +1052 -0
- package/dist/offline/index.js.map +1 -0
- package/dist/offline/index.mjs +1052 -0
- package/dist/offline/index.mjs.map +1 -0
- package/dist/offline/sqlite/device-worker.mjs +62 -0
- package/dist/offline/sqlite/index.mjs +17392 -0
- package/dist/offline/sqlite/sqlite3-opfs-async-proxy.js +881 -0
- package/dist/offline/sqlite/sqlite3.wasm +0 -0
- package/dist/request-KTBV6HHH.js +10 -0
- package/dist/request-KTBV6HHH.js.map +1 -0
- package/dist/request-SQOUNWZ4.mjs +10 -0
- package/dist/request-SQOUNWZ4.mjs.map +1 -0
- package/dist/server/cachedGet.d.mts +1 -1
- package/dist/server/cachedGet.d.ts +1 -1
- package/dist/server/cachedGet.stub.d.mts +1 -1
- package/dist/server/cachedGet.stub.d.ts +1 -1
- package/dist/server/index.d.mts +28 -2
- package/dist/server/index.d.ts +28 -2
- package/dist/server/index.js +18 -8
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +18 -8
- package/dist/{useSocket-IRHtk2xc.d.ts → useSocket-Bo9M0t0J.d.ts} +3 -1
- package/dist/{useSocket-C8fqU4od.d.mts → useSocket-J5qanQPN.d.mts} +3 -1
- package/dist/write-through-FDQ7N4YI.js +15 -0
- package/dist/write-through-FDQ7N4YI.js.map +1 -0
- package/dist/write-through-R25VQMH6.mjs +15 -0
- package/dist/write-through-R25VQMH6.mjs.map +1 -0
- package/package.json +7 -1
- package/pwa/sw.js +277 -26
- package/src/client/request.ts +37 -0
- package/src/components/editors/BlockNoteEditor.tsx +14 -0
- package/src/components/editors/__tests__/BlockNoteEditor.empty-change.spec.tsx +205 -0
- package/src/contexts/SocketContext.tsx +7 -1
- package/src/contexts/__tests__/SocketContext.session.spec.tsx +52 -5
- package/src/core/factories/RehydrationFactory.ts +28 -8
- package/src/core/factories/__tests__/RehydrationFactory.spec.ts +33 -0
- package/src/core/index.ts +3 -0
- package/src/core/interfaces/ApiData.ts +2 -0
- package/src/core/registry/ModuleRegistry.ts +3 -0
- package/src/features/auth/components/forms/Logout.tsx +8 -1
- package/src/features/auth/components/forms/__tests__/Logout.spec.tsx +62 -0
- package/src/features/onboarding/contexts/OnboardingContext.spec.tsx +42 -1
- package/src/features/onboarding/contexts/OnboardingContext.tsx +11 -1
- package/src/hooks/__tests__/useSocket.pause.spec.ts +39 -0
- package/src/hooks/useSocket.ts +20 -1
- package/src/offline/__tests__/answer-builders.spec.ts +176 -0
- package/src/offline/__tests__/device-switch.spec.ts +179 -0
- package/src/offline/__tests__/generic-answers.spec.ts +380 -0
- package/src/offline/__tests__/local-transport.spec.ts +150 -0
- package/src/offline/__tests__/logout.spec.ts +122 -0
- package/src/offline/__tests__/offline-fixtures.ts +89 -0
- package/src/offline/__tests__/router.spec.ts +56 -0
- package/src/offline/__tests__/state.spec.ts +62 -0
- package/src/offline/__tests__/write-through.spec.ts +137 -0
- package/src/offline/config.ts +229 -0
- package/src/offline/configure.ts +14 -0
- package/src/offline/device-switch.ts +75 -0
- package/src/offline/generic-answers.ts +706 -0
- package/src/offline/index.ts +67 -0
- package/src/offline/local-transport.ts +189 -0
- package/src/offline/logout.ts +41 -0
- package/src/offline/router.ts +41 -0
- package/src/offline/server/__tests__/build-offline-manifest.spec.ts +76 -0
- package/src/offline/server/build-offline-manifest.ts +49 -0
- package/src/offline/state-hooks.ts +10 -0
- package/src/offline/state.ts +143 -0
- package/src/offline/store/DeviceStore.ts +112 -0
- package/src/offline/store/__tests__/device-store-lifecycle.spec.ts +343 -0
- package/src/offline/store/__tests__/shared-database.spec.ts +151 -0
- package/src/offline/store/__tests__/sql-device-store.spec.ts +399 -0
- package/src/offline/store/lifecycle.ts +315 -0
- package/src/offline/store/schema.ts +101 -0
- package/src/offline/store/shared-database.ts +321 -0
- package/src/offline/store/sql-device-store.ts +469 -0
- package/src/offline/store/worker-client.ts +71 -0
- package/src/offline/store/worker.ts +87 -0
- package/src/offline/sync/__tests__/conflicts.spec.ts +185 -0
- package/src/offline/sync/__tests__/queue-drain.spec.ts +364 -0
- package/src/offline/sync/__tests__/runtime.spec.ts +337 -0
- package/src/offline/sync/__tests__/sync-fixtures.ts +103 -0
- package/src/offline/sync/__tests__/sync-root.spec.ts +727 -0
- package/src/offline/sync/artwork-cache.ts +67 -0
- package/src/offline/sync/conflicts.ts +211 -0
- package/src/offline/sync/counts.ts +39 -0
- package/src/offline/sync/drain-queue.ts +246 -0
- package/src/offline/sync/known-roots.ts +37 -0
- package/src/offline/sync/models/OfflineChangeSet.ts +34 -0
- package/src/offline/sync/models/OfflineChangeSetInterface.ts +54 -0
- package/src/offline/sync/models/RootSync.ts +68 -0
- package/src/offline/sync/models/RootSyncInterface.ts +20 -0
- package/src/offline/sync/models/__tests__/OfflineChangeSet.spec.ts +47 -0
- package/src/offline/sync/models/__tests__/RootSync.spec.ts +54 -0
- package/src/offline/sync/models/index.ts +5 -0
- package/src/offline/sync/models/offline.modules.ts +14 -0
- package/src/offline/sync/runtime.ts +226 -0
- package/src/offline/sync/session-refresh.ts +32 -0
- package/src/offline/sync/sync-root.ts +336 -0
- package/src/offline/sync/waiting.ts +40 -0
- package/src/offline/types.ts +115 -0
- package/src/offline/write-through.ts +189 -0
- package/src/pwa/__tests__/sw.spec.ts +358 -1
- package/src/server/index.ts +5 -0
- package/src/unified/__tests__/JsonApiRequest.offline.spec.ts +243 -0
- package/dist/BlockNoteEditor-75ED2CN2.mjs.map +0 -1
- package/dist/BlockNoteEditor-7M5QW2YQ.js.map +0 -1
- package/dist/BlockNoteViewer-WGCDB7IJ.js.map +0 -1
- package/dist/JsonApiRequest-FZGPLNUF.js +0 -26
- package/dist/chunk-AA52ORW2.mjs.map +0 -1
- package/dist/chunk-EWCY6QJA.mjs.map +0 -1
- package/dist/chunk-FF4EIQ6H.js.map +0 -1
- package/dist/chunk-JTPRJNT2.js.map +0 -1
- package/dist/chunk-L6PYFQTO.js.map +0 -1
- package/dist/chunk-O3PDL2CV.js.map +0 -1
- package/dist/chunk-PI56A4DG.mjs.map +0 -1
- package/dist/chunk-RXQYEEKZ.mjs.map +0 -1
- package/dist/chunk-V3YDVJ63.js.map +0 -1
- package/dist/request-5RLK2AM3.mjs +0 -9
- package/dist/request-EUGTI3BE.js +0 -9
- package/dist/request-EUGTI3BE.js.map +0 -1
- /package/dist/{JsonApiRequest-A66XK5WT.mjs.map → JsonApiRequest-F6TMJ42G.mjs.map} +0 -0
- /package/dist/{chunk-3YW35YHQ.mjs.map → chunk-BH6JWIKI.mjs.map} +0 -0
- /package/dist/{chunk-V5MI7RNB.mjs.map → chunk-DGWOVYEC.mjs.map} +0 -0
- /package/dist/{request-5RLK2AM3.mjs.map → lifecycle-LKGPRBS7.mjs.map} +0 -0
|
Binary file
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkKMW7UNL2js = require('./chunk-KMW7UNL2.js');
|
|
5
|
+
require('./chunk-MHB36MYE.js');
|
|
6
|
+
require('./chunk-7QVYU63E.js');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
exports.directFetch = _chunkKMW7UNL2js.directFetch;
|
|
10
|
+
//# sourceMappingURL=request-KTBV6HHH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/request-KTBV6HHH.js"],"names":[],"mappings":"AAAA,qFAAY;AACZ;AACE;AACF,sDAA4B;AAC5B,+BAA4B;AAC5B,+BAA4B;AAC5B;AACE;AACF,mDAAC","file":"/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/request-KTBV6HHH.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ApiData } from '../ApiData-
|
|
1
|
+
import { A as ApiData } from '../ApiData-Be8yxCOX.mjs';
|
|
2
2
|
|
|
3
3
|
/** Reads the HTTP status from an `HTTP_<status>` digest, or `undefined` when there is none. */
|
|
4
4
|
declare function statusFromDigest(error: unknown): number | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ApiData } from '../ApiData-
|
|
1
|
+
import { A as ApiData } from '../ApiData-Be8yxCOX.js';
|
|
2
2
|
|
|
3
3
|
/** Reads the HTTP status from an `HTTP_<status>` digest, or `undefined` when there is none. */
|
|
4
4
|
declare function statusFromDigest(error: unknown): number | undefined;
|
package/dist/server/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ApiData } from '../ApiData-
|
|
1
|
+
import { A as ApiData } from '../ApiData-Be8yxCOX.mjs';
|
|
2
2
|
export { a as ServerSession, S as SessionSnapshot } from '../ServerSession-DK1z0_Ql.mjs';
|
|
3
3
|
import { A as ApiRequestDataTypeInterface } from '../ApiRequestDataTypeInterface-CYEcRUrh.mjs';
|
|
4
4
|
import { A as ApiResponseInterface } from '../ApiResponseInterface-rsXRL_Hn.mjs';
|
|
@@ -135,4 +135,30 @@ declare function ServerJsonApiDelete(params: {
|
|
|
135
135
|
responseType?: ApiRequestDataTypeInterface;
|
|
136
136
|
}): Promise<ApiResponseInterface>;
|
|
137
137
|
|
|
138
|
-
|
|
138
|
+
type OfflineManifest = {
|
|
139
|
+
buildId: string;
|
|
140
|
+
assets: string[];
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* Describes the running build for the service worker's offline shell precache
|
|
144
|
+
* (`/offline-manifest.json`): the build id from `<distDir>/BUILD_ID` and every
|
|
145
|
+
* file under `<distDir>/static`, as the `/_next/static/...` URL Next serves it at.
|
|
146
|
+
* `next dev` writes no BUILD_ID (its folder is `.next/dev`): the id is then derived from the
|
|
147
|
+
* asset list, whose chunk names carry content hashes, so an edit gives a new id and the
|
|
148
|
+
* service worker refreshes the shell.
|
|
149
|
+
* `distDir` must be the value the app's next.config uses. `extraAssets` are further same-origin
|
|
150
|
+
* URLs the shell needs with no network (the SQLite files the device worker loads).
|
|
151
|
+
*/
|
|
152
|
+
declare function buildOfflineManifest(params: {
|
|
153
|
+
distDir: string;
|
|
154
|
+
extraAssets?: string[];
|
|
155
|
+
}): Promise<OfflineManifest>;
|
|
156
|
+
|
|
157
|
+
declare const DEFAULT_SQLITE_MODULE_URL = "/offline-sqlite/index.mjs";
|
|
158
|
+
/**
|
|
159
|
+
* The files of `dist/offline/sqlite/` the app serves: the device worker and the SQLite files
|
|
160
|
+
* copied from @sqlite.org/sqlite-wasm.
|
|
161
|
+
*/
|
|
162
|
+
declare const OFFLINE_SQLITE_FILES: readonly ["device-worker.mjs", "index.mjs", "sqlite3.wasm", "sqlite3-opfs-async-proxy.js"];
|
|
163
|
+
|
|
164
|
+
export { CACHE_PROFILES, type CacheProfile, DEFAULT_SQLITE_MODULE_URL, OFFLINE_SQLITE_FILES, type OfflineManifest, ServerJsonApiDelete, ServerJsonApiGet, ServerJsonApiPatch, ServerJsonApiPost, ServerJsonApiPut, type ServerRequestParams, buildOfflineManifest, configureServerJsonApi, getServerApiUrl, getServerAppUrl, getServerToken, getServerTrackablePages, invalidateCacheTag, invalidateCacheTags, serverRequest, updateCacheTag };
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ApiData } from '../ApiData-
|
|
1
|
+
import { A as ApiData } from '../ApiData-Be8yxCOX.js';
|
|
2
2
|
export { a as ServerSession, S as SessionSnapshot } from '../ServerSession-DFNNNkg7.js';
|
|
3
3
|
import { A as ApiRequestDataTypeInterface } from '../ApiRequestDataTypeInterface-CYEcRUrh.js';
|
|
4
4
|
import { A as ApiResponseInterface } from '../ApiResponseInterface-CWLvSCvS.js';
|
|
@@ -135,4 +135,30 @@ declare function ServerJsonApiDelete(params: {
|
|
|
135
135
|
responseType?: ApiRequestDataTypeInterface;
|
|
136
136
|
}): Promise<ApiResponseInterface>;
|
|
137
137
|
|
|
138
|
-
|
|
138
|
+
type OfflineManifest = {
|
|
139
|
+
buildId: string;
|
|
140
|
+
assets: string[];
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* Describes the running build for the service worker's offline shell precache
|
|
144
|
+
* (`/offline-manifest.json`): the build id from `<distDir>/BUILD_ID` and every
|
|
145
|
+
* file under `<distDir>/static`, as the `/_next/static/...` URL Next serves it at.
|
|
146
|
+
* `next dev` writes no BUILD_ID (its folder is `.next/dev`): the id is then derived from the
|
|
147
|
+
* asset list, whose chunk names carry content hashes, so an edit gives a new id and the
|
|
148
|
+
* service worker refreshes the shell.
|
|
149
|
+
* `distDir` must be the value the app's next.config uses. `extraAssets` are further same-origin
|
|
150
|
+
* URLs the shell needs with no network (the SQLite files the device worker loads).
|
|
151
|
+
*/
|
|
152
|
+
declare function buildOfflineManifest(params: {
|
|
153
|
+
distDir: string;
|
|
154
|
+
extraAssets?: string[];
|
|
155
|
+
}): Promise<OfflineManifest>;
|
|
156
|
+
|
|
157
|
+
declare const DEFAULT_SQLITE_MODULE_URL = "/offline-sqlite/index.mjs";
|
|
158
|
+
/**
|
|
159
|
+
* The files of `dist/offline/sqlite/` the app serves: the device worker and the SQLite files
|
|
160
|
+
* copied from @sqlite.org/sqlite-wasm.
|
|
161
|
+
*/
|
|
162
|
+
declare const OFFLINE_SQLITE_FILES: readonly ["device-worker.mjs", "index.mjs", "sqlite3.wasm", "sqlite3-opfs-async-proxy.js"];
|
|
163
|
+
|
|
164
|
+
export { CACHE_PROFILES, type CacheProfile, DEFAULT_SQLITE_MODULE_URL, OFFLINE_SQLITE_FILES, type OfflineManifest, ServerJsonApiDelete, ServerJsonApiGet, ServerJsonApiPatch, ServerJsonApiPost, ServerJsonApiPut, type ServerRequestParams, buildOfflineManifest, configureServerJsonApi, getServerApiUrl, getServerAppUrl, getServerToken, getServerTrackablePages, invalidateCacheTag, invalidateCacheTags, serverRequest, updateCacheTag };
|
package/dist/server/index.js
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
var _chunkZ4POQWFGjs = require('../chunk-Z4POQWFG.js');
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
var _chunkIK65TDQHjs = require('../chunk-IK65TDQH.js');
|
|
@@ -17,13 +18,13 @@ var _chunkIK65TDQHjs = require('../chunk-IK65TDQH.js');
|
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
|
|
20
|
-
var
|
|
21
|
+
var _chunk2SV4SS6Njs = require('../chunk-2SV4SS6N.js');
|
|
21
22
|
|
|
22
23
|
|
|
23
|
-
var
|
|
24
|
+
var _chunk6TUB7Y6Tjs = require('../chunk-6TUB7Y6T.js');
|
|
24
25
|
|
|
25
26
|
|
|
26
|
-
var
|
|
27
|
+
var _chunkYUO55Q5Ajs = require('../chunk-YUO55Q5A.js');
|
|
27
28
|
require('../chunk-G4JR3SFV.js');
|
|
28
29
|
|
|
29
30
|
|
|
@@ -35,10 +36,16 @@ require('../chunk-G4JR3SFV.js');
|
|
|
35
36
|
|
|
36
37
|
|
|
37
38
|
|
|
38
|
-
var
|
|
39
|
-
require('../chunk-
|
|
39
|
+
var _chunkMOGEGWXWjs = require('../chunk-MOGEGWXW.js');
|
|
40
|
+
require('../chunk-BZ5J2FIV.js');
|
|
41
|
+
require('../chunk-PV4Z5W6V.js');
|
|
42
|
+
require('../chunk-KMW7UNL2.js');
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
var _chunkMHB36MYEjs = require('../chunk-MHB36MYE.js');
|
|
47
|
+
require('../chunk-QKNGZDSQ.js');
|
|
40
48
|
require('../chunk-LXKSUWAV.js');
|
|
41
|
-
require('../chunk-JTPRJNT2.js');
|
|
42
49
|
require('../chunk-7QVYU63E.js');
|
|
43
50
|
|
|
44
51
|
|
|
@@ -66,5 +73,8 @@ require('../chunk-7QVYU63E.js');
|
|
|
66
73
|
|
|
67
74
|
|
|
68
75
|
|
|
69
|
-
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
exports.CACHE_PROFILES = _chunkIK65TDQHjs.CACHE_PROFILES; exports.DEFAULT_SQLITE_MODULE_URL = _chunkMHB36MYEjs.DEFAULT_SQLITE_MODULE_URL; exports.OFFLINE_SQLITE_FILES = _chunkMHB36MYEjs.OFFLINE_SQLITE_FILES; exports.ServerAuthService = _chunkMOGEGWXWjs.AuthService; exports.ServerCompanyService = _chunkMOGEGWXWjs.CompanyService; exports.ServerContentService = _chunkMOGEGWXWjs.ContentService; exports.ServerFeatureService = _chunkMOGEGWXWjs.FeatureService; exports.ServerJsonApiDelete = _chunk2SV4SS6Njs.ServerJsonApiDelete; exports.ServerJsonApiGet = _chunk2SV4SS6Njs.ServerJsonApiGet; exports.ServerJsonApiPatch = _chunk2SV4SS6Njs.ServerJsonApiPatch; exports.ServerJsonApiPost = _chunk2SV4SS6Njs.ServerJsonApiPost; exports.ServerJsonApiPut = _chunk2SV4SS6Njs.ServerJsonApiPut; exports.ServerNotificationService = _chunkMOGEGWXWjs.NotificationService; exports.ServerPushService = _chunkMOGEGWXWjs.PushService; exports.ServerRoleService = _chunkMOGEGWXWjs.RoleService; exports.ServerS3Service = _chunkMOGEGWXWjs.S3Service; exports.ServerSession = _chunkZ4POQWFGjs.ServerSession; exports.ServerUserService = _chunkMOGEGWXWjs.UserService; exports.buildOfflineManifest = _chunkZ4POQWFGjs.buildOfflineManifest; exports.configureServerJsonApi = _chunk2SV4SS6Njs.configureServerJsonApi; exports.getServerApiUrl = _chunk2SV4SS6Njs.getServerApiUrl; exports.getServerAppUrl = _chunk2SV4SS6Njs.getServerAppUrl; exports.getServerToken = _chunkYUO55Q5Ajs.getServerToken; exports.getServerTrackablePages = _chunk2SV4SS6Njs.getServerTrackablePages; exports.invalidateCacheTag = _chunkZ4POQWFGjs.invalidateCacheTag; exports.invalidateCacheTags = _chunkZ4POQWFGjs.invalidateCacheTags; exports.serverRequest = _chunk6TUB7Y6Tjs.serverRequest; exports.updateCacheTag = _chunkZ4POQWFGjs.updateCacheTag;
|
|
70
80
|
//# sourceMappingURL=index.js.map
|
package/dist/server/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/server/index.js"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACF,uDAA6B;AAC7B;AACE;AACF,uDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,uDAA6B;AAC7B;AACE;AACF,uDAA6B;AAC7B;AACE;AACF,uDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,uDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/server/index.js"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACF,uDAA6B;AAC7B;AACE;AACF,uDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,uDAA6B;AAC7B;AACE;AACF,uDAA6B;AAC7B;AACE;AACF,uDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,uDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,uDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,uvDAAC","file":"/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/server/index.js"}
|
package/dist/server/index.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ServerSession,
|
|
3
|
+
buildOfflineManifest,
|
|
3
4
|
invalidateCacheTag,
|
|
4
5
|
invalidateCacheTags,
|
|
5
6
|
updateCacheTag
|
|
6
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-JJMMT24D.mjs";
|
|
7
8
|
import {
|
|
8
9
|
CACHE_PROFILES
|
|
9
10
|
} from "../chunk-T7SAW3UW.mjs";
|
|
@@ -17,13 +18,13 @@ import {
|
|
|
17
18
|
getServerApiUrl,
|
|
18
19
|
getServerAppUrl,
|
|
19
20
|
getServerTrackablePages
|
|
20
|
-
} from "../chunk-
|
|
21
|
-
import {
|
|
22
|
-
getServerToken
|
|
23
|
-
} from "../chunk-F5UNXZ3J.mjs";
|
|
21
|
+
} from "../chunk-BH6JWIKI.mjs";
|
|
24
22
|
import {
|
|
25
23
|
serverRequest
|
|
26
24
|
} from "../chunk-E2LENTUH.mjs";
|
|
25
|
+
import {
|
|
26
|
+
getServerToken
|
|
27
|
+
} from "../chunk-F5UNXZ3J.mjs";
|
|
27
28
|
import "../chunk-PW42LRSL.mjs";
|
|
28
29
|
import {
|
|
29
30
|
AuthService,
|
|
@@ -35,13 +36,21 @@ import {
|
|
|
35
36
|
RoleService,
|
|
36
37
|
S3Service,
|
|
37
38
|
UserService
|
|
38
|
-
} from "../chunk-
|
|
39
|
-
import "../chunk-
|
|
39
|
+
} from "../chunk-P445QGOC.mjs";
|
|
40
|
+
import "../chunk-6JUCIWDC.mjs";
|
|
41
|
+
import "../chunk-DOCIFE6A.mjs";
|
|
42
|
+
import "../chunk-ZLTOUZN2.mjs";
|
|
43
|
+
import {
|
|
44
|
+
DEFAULT_SQLITE_MODULE_URL,
|
|
45
|
+
OFFLINE_SQLITE_FILES
|
|
46
|
+
} from "../chunk-27LQDGNP.mjs";
|
|
47
|
+
import "../chunk-DGWOVYEC.mjs";
|
|
40
48
|
import "../chunk-AUXK7QSA.mjs";
|
|
41
|
-
import "../chunk-PI56A4DG.mjs";
|
|
42
49
|
import "../chunk-PAWJFY3S.mjs";
|
|
43
50
|
export {
|
|
44
51
|
CACHE_PROFILES,
|
|
52
|
+
DEFAULT_SQLITE_MODULE_URL,
|
|
53
|
+
OFFLINE_SQLITE_FILES,
|
|
45
54
|
AuthService as ServerAuthService,
|
|
46
55
|
CompanyService as ServerCompanyService,
|
|
47
56
|
ContentService as ServerContentService,
|
|
@@ -57,6 +66,7 @@ export {
|
|
|
57
66
|
S3Service as ServerS3Service,
|
|
58
67
|
ServerSession,
|
|
59
68
|
UserService as ServerUserService,
|
|
69
|
+
buildOfflineManifest,
|
|
60
70
|
configureServerJsonApi,
|
|
61
71
|
getServerApiUrl,
|
|
62
72
|
getServerAppUrl,
|
|
@@ -2,6 +2,8 @@ import { N as NotificationInterface } from './notification.interface-DQItyY_Q.js
|
|
|
2
2
|
|
|
3
3
|
interface UseSocketOptions {
|
|
4
4
|
token: string;
|
|
5
|
+
/** While true the socket is disconnected (no reconnect attempts); false connects it again. */
|
|
6
|
+
paused?: boolean;
|
|
5
7
|
}
|
|
6
8
|
interface SocketLike {
|
|
7
9
|
emit: (event: string, ...args: any[]) => void;
|
|
@@ -20,6 +22,6 @@ interface UseSocketReturn {
|
|
|
20
22
|
clearMessages: () => void;
|
|
21
23
|
clearSocketNotifications: () => void;
|
|
22
24
|
}
|
|
23
|
-
declare function useSocket({ token }: UseSocketOptions): UseSocketReturn;
|
|
25
|
+
declare function useSocket({ token, paused }: UseSocketOptions): UseSocketReturn;
|
|
24
26
|
|
|
25
27
|
export { useSocket as u };
|
|
@@ -2,6 +2,8 @@ import { N as NotificationInterface } from './notification.interface-DoVS5RZB.mj
|
|
|
2
2
|
|
|
3
3
|
interface UseSocketOptions {
|
|
4
4
|
token: string;
|
|
5
|
+
/** While true the socket is disconnected (no reconnect attempts); false connects it again. */
|
|
6
|
+
paused?: boolean;
|
|
5
7
|
}
|
|
6
8
|
interface SocketLike {
|
|
7
9
|
emit: (event: string, ...args: any[]) => void;
|
|
@@ -20,6 +22,6 @@ interface UseSocketReturn {
|
|
|
20
22
|
clearMessages: () => void;
|
|
21
23
|
clearSocketNotifications: () => void;
|
|
22
24
|
}
|
|
23
|
-
declare function useSocket({ token }: UseSocketOptions): UseSocketReturn;
|
|
25
|
+
declare function useSocket({ token, paused }: UseSocketOptions): UseSocketReturn;
|
|
24
26
|
|
|
25
27
|
export { useSocket as u };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkB6JGKDP2js = require('./chunk-B6JGKDP2.js');
|
|
4
|
+
require('./chunk-PXDUJ47N.js');
|
|
5
|
+
require('./chunk-W62MHDWM.js');
|
|
6
|
+
require('./chunk-PV4Z5W6V.js');
|
|
7
|
+
require('./chunk-KMW7UNL2.js');
|
|
8
|
+
require('./chunk-MHB36MYE.js');
|
|
9
|
+
require('./chunk-QKNGZDSQ.js');
|
|
10
|
+
require('./chunk-LXKSUWAV.js');
|
|
11
|
+
require('./chunk-7QVYU63E.js');
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
exports.writeThrough = _chunkB6JGKDP2js.writeThrough;
|
|
15
|
+
//# sourceMappingURL=write-through-FDQ7N4YI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/write-through-FDQ7N4YI.js"],"names":[],"mappings":"AAAA;AACE;AACF,sDAA4B;AAC5B,+BAA4B;AAC5B,+BAA4B;AAC5B,+BAA4B;AAC5B,+BAA4B;AAC5B,+BAA4B;AAC5B,+BAA4B;AAC5B,+BAA4B;AAC5B,+BAA4B;AAC5B;AACE;AACF,qDAAC","file":"/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/write-through-FDQ7N4YI.js"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
writeThrough
|
|
3
|
+
} from "./chunk-YRKIFYOE.mjs";
|
|
4
|
+
import "./chunk-7DBJTNSU.mjs";
|
|
5
|
+
import "./chunk-7JZHPMGW.mjs";
|
|
6
|
+
import "./chunk-DOCIFE6A.mjs";
|
|
7
|
+
import "./chunk-ZLTOUZN2.mjs";
|
|
8
|
+
import "./chunk-27LQDGNP.mjs";
|
|
9
|
+
import "./chunk-DGWOVYEC.mjs";
|
|
10
|
+
import "./chunk-AUXK7QSA.mjs";
|
|
11
|
+
import "./chunk-PAWJFY3S.mjs";
|
|
12
|
+
export {
|
|
13
|
+
writeThrough
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=write-through-R25VQMH6.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carlonicora/nextjs-jsonapi",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.13.1",
|
|
4
4
|
"description": "Next.js JSON:API client with server/client support and caching",
|
|
5
5
|
"author": "Carlo Nicora",
|
|
6
6
|
"license": "GPL-3.0-or-later",
|
|
@@ -38,6 +38,11 @@
|
|
|
38
38
|
"import": "./dist/client/index.mjs",
|
|
39
39
|
"require": "./dist/client/index.js"
|
|
40
40
|
},
|
|
41
|
+
"./offline": {
|
|
42
|
+
"types": "./dist/offline/index.d.ts",
|
|
43
|
+
"import": "./dist/offline/index.mjs",
|
|
44
|
+
"require": "./dist/offline/index.js"
|
|
45
|
+
},
|
|
41
46
|
"./components": {
|
|
42
47
|
"types": "./dist/components/index.d.ts",
|
|
43
48
|
"import": "./dist/components/index.mjs",
|
|
@@ -185,6 +190,7 @@
|
|
|
185
190
|
"@radix-ui/react-label": "^2.1.16",
|
|
186
191
|
"@radix-ui/react-slot": "^1.4.0",
|
|
187
192
|
"@simplewebauthn/browser": "^13.3.0",
|
|
193
|
+
"@sqlite.org/sqlite-wasm": "3.53.4-build2",
|
|
188
194
|
"ai": "^6.0.238",
|
|
189
195
|
"class-variance-authority": "^0.7.1",
|
|
190
196
|
"clsx": "^2.1.1",
|