@instroc/auth 1.3.0 → 1.3.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.
|
@@ -32,7 +32,7 @@ function authErrorFromResponse(response, data, fallbackMessage) {
|
|
|
32
32
|
|
|
33
33
|
// src/version.ts
|
|
34
34
|
var SDK_NAME = "instroc-auth";
|
|
35
|
-
var SDK_VERSION = true ? "1.3.
|
|
35
|
+
var SDK_VERSION = true ? "1.3.1" : "0.0.0-dev";
|
|
36
36
|
function withSdkHeader(init) {
|
|
37
37
|
const headers = new Headers(init?.headers ?? {});
|
|
38
38
|
headers.set("X-Instroc-SDK", `${SDK_NAME}/${SDK_VERSION}`);
|
|
@@ -643,7 +643,7 @@ function isDevHost() {
|
|
|
643
643
|
if (typeof window === "undefined")
|
|
644
644
|
return false;
|
|
645
645
|
const h = window.location.hostname;
|
|
646
|
-
return h === "localhost" || h === "127.0.0.1" || h.endsWith(".fly.dev") || h.endsWith(".workers.dev");
|
|
646
|
+
return h === "localhost" || h === "127.0.0.1" || h.endsWith(".fly.dev") || h.endsWith(".workers.dev") || h === "preview.instroc.app";
|
|
647
647
|
}
|
|
648
648
|
function decodeIsOwnerClaim(accessToken) {
|
|
649
649
|
try {
|
package/dist/forms.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -57,10 +57,11 @@ declare function useIsOwner(): boolean;
|
|
|
57
57
|
* cookie is what the privacy gate uses to allow workspace members into
|
|
58
58
|
* private apps.
|
|
59
59
|
*
|
|
60
|
-
* Dev/preview note: when running on `localhost`, `*.fly.dev`,
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
* (`*.instroc.app` and
|
|
60
|
+
* Dev/preview note: when running on `localhost`, `*.fly.dev`, `*.workers.dev`,
|
|
61
|
+
* or `preview.instroc.app` (dev-session HMR, editor preview iframe, published
|
|
62
|
+
* preview snapshots), the hook returns `true` so template authors can see
|
|
63
|
+
* admin UI while building. In production (`*.instroc.app` subdomains and
|
|
64
|
+
* custom domains) the server answer is authoritative.
|
|
64
65
|
*/
|
|
65
66
|
declare function useIsWorkspaceMember(): boolean;
|
|
66
67
|
|
package/dist/index.js
CHANGED