@wix/headless-site 1.8.0 → 1.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_monitoringVelo","require","_headers","_authUtils","createHostModule","__type","create","host","essentials","passThroughHeaders","getPassThroughHeaders","language","locale","timezone","getMonitoringClient","producer","req","document","location","href","Request","createVeloMonitoringClient","namespace","getAuthToken","resolveAuthToken","exports"],"sources":["../../src/host-module.ts"],"sourcesContent":["import type { HostModule, Host } from '@wix/sdk-types';\nimport { createVeloMonitoringClient } from '@wix/monitoring-velo';\nimport { getPassThroughHeaders } from './headers';\nimport { resolveAuthToken } from './utils/auth-utils';\nimport {SDK, SDKOptions} from './types';\n\nexport const createHostModule = (): HostModule<SDK, Host> & {\n host: () => Host;\n} => {\n return {\n __type: 'host',\n create: () => {\n return {};\n },\n host: ({ essentials }: SDKOptions = {}) => {\n return {\n essentials: {\n get passThroughHeaders() {\n return getPassThroughHeaders();\n },\n language: essentials?.language ?? 'en',\n locale: essentials?.locale ?? 'en-US',\n timezone: essentials?.timezone ?? 'UTC',\n },\n getMonitoringClient: () => {\n let producer = 'unknown';\n let req: Request | undefined;\n\n if (typeof document !== 'undefined') {\n producer = document.location.href;\n req = new Request(document.location.href);\n }\n\n return createVeloMonitoringClient({\n namespace: 'Headless',\n producer,\n getAuthToken: async () => resolveAuthToken(),\n req,\n });\n },\n };\n },\n };\n};\n"],"mappings":";;;;AACA,IAAAA,eAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAGO,MAAMG,gBAAgB,GAAGA,CAAA,KAE3B;EACH,OAAO;IACLC,MAAM,EAAE,MAAM;IACdC,MAAM,EAAEA,CAAA,KAAM;MACZ,OAAO,CAAC,CAAC;IACX,CAAC;IACDC,IAAI,EAAEA,CAAC;MAAEC;IAAuB,CAAC,GAAG,CAAC,CAAC,KAAK;MACzC,OAAO;QACLA,UAAU,EAAE;UACV,IAAIC,kBAAkBA,CAAA,EAAG;YACvB,OAAO,IAAAC,8BAAqB,EAAC,CAAC;UAChC,CAAC;UACDC,QAAQ,EAAE,CAAAH,UAAU,oBAAVA,UAAU,CAAEG,QAAQ,KAAI,IAAI;UACtCC,MAAM,EAAE,CAAAJ,UAAU,oBAAVA,UAAU,CAAEI,MAAM,KAAI,OAAO;UACrCC,QAAQ,EAAE,CAAAL,UAAU,oBAAVA,UAAU,CAAEK,QAAQ,KAAI;QACpC,CAAC;QACDC,mBAAmB,EAAEA,CAAA,KAAM;UACzB,IAAIC,QAAQ,GAAG,SAAS;UACxB,IAAIC,GAAwB;UAE5B,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;YACnCF,QAAQ,GAAGE,QAAQ,CAACC,QAAQ,CAACC,IAAI;YACjCH,GAAG,GAAG,IAAII,OAAO,CAACH,QAAQ,CAACC,QAAQ,CAACC,IAAI,CAAC;UAC3C;UAEA,OAAO,IAAAE,0CAA0B,EAAC;YAChCC,SAAS,EAAE,UAAU;YACrBP,QAAQ;YACRQ,YAAY,EAAE,MAAAA,CAAA,KAAY,IAAAC,2BAAgB,EAAC,CAAC;YAC5CR;UACF,CAAC,CAAC;QACJ;MACF,CAAC;IACH;EACF,CAAC;AACH,CAAC;AAACS,OAAA,CAAArB,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_monitoringVelo","require","_headers","_authUtils","createHostModule","__type","create","host","essentials","passThroughHeaders","getPassThroughHeaders","language","locale","timezone","getMonitoringClient","producer","req","document","location","href","Request","createVeloMonitoringClient","namespace","getAuthToken","resolveAuthToken","exports"],"sources":["../../src/host-module.ts"],"sourcesContent":["import type { HostModule, Host } from '@wix/sdk-types';\nimport { createVeloMonitoringClient } from '@wix/monitoring-velo';\nimport { getPassThroughHeaders } from './headers';\nimport { resolveAuthToken } from './utils/auth-utils';\nimport { SDK, SDKOptions } from './types';\n\nexport const createHostModule = (): HostModule<SDK, Host> & {\n host: (options: SDKOptions) => Host;\n} => {\n return {\n __type: 'host',\n create: () => {\n return {};\n },\n host: ({ essentials }: SDKOptions = {}) => {\n return {\n essentials: {\n get passThroughHeaders() {\n return getPassThroughHeaders();\n },\n language: essentials?.language ?? 'en',\n locale: essentials?.locale ?? 'en-US',\n timezone: essentials?.timezone ?? 'UTC',\n },\n getMonitoringClient: () => {\n let producer = 'unknown';\n let req: Request | undefined;\n\n if (typeof document !== 'undefined') {\n producer = document.location.href;\n req = new Request(document.location.href);\n }\n\n return createVeloMonitoringClient({\n namespace: 'Headless',\n producer,\n getAuthToken: async () => resolveAuthToken(),\n req,\n });\n },\n };\n },\n };\n};\n"],"mappings":";;;;AACA,IAAAA,eAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAGO,MAAMG,gBAAgB,GAAGA,CAAA,KAE3B;EACH,OAAO;IACLC,MAAM,EAAE,MAAM;IACdC,MAAM,EAAEA,CAAA,KAAM;MACZ,OAAO,CAAC,CAAC;IACX,CAAC;IACDC,IAAI,EAAEA,CAAC;MAAEC;IAAuB,CAAC,GAAG,CAAC,CAAC,KAAK;MACzC,OAAO;QACLA,UAAU,EAAE;UACV,IAAIC,kBAAkBA,CAAA,EAAG;YACvB,OAAO,IAAAC,8BAAqB,EAAC,CAAC;UAChC,CAAC;UACDC,QAAQ,EAAE,CAAAH,UAAU,oBAAVA,UAAU,CAAEG,QAAQ,KAAI,IAAI;UACtCC,MAAM,EAAE,CAAAJ,UAAU,oBAAVA,UAAU,CAAEI,MAAM,KAAI,OAAO;UACrCC,QAAQ,EAAE,CAAAL,UAAU,oBAAVA,UAAU,CAAEK,QAAQ,KAAI;QACpC,CAAC;QACDC,mBAAmB,EAAEA,CAAA,KAAM;UACzB,IAAIC,QAAQ,GAAG,SAAS;UACxB,IAAIC,GAAwB;UAE5B,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;YACnCF,QAAQ,GAAGE,QAAQ,CAACC,QAAQ,CAACC,IAAI;YACjCH,GAAG,GAAG,IAAII,OAAO,CAACH,QAAQ,CAACC,QAAQ,CAACC,IAAI,CAAC;UAC3C;UAEA,OAAO,IAAAE,0CAA0B,EAAC;YAChCC,SAAS,EAAE,UAAU;YACrBP,QAAQ;YACRQ,YAAY,EAAE,MAAAA,CAAA,KAAY,IAAAC,2BAAgB,EAAC,CAAC;YAC5CR;UACF,CAAC,CAAC;QACJ;MACF,CAAC;IACH;EACF,CAAC;AACH,CAAC;AAACS,OAAA,CAAArB,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createVeloMonitoringClient","getPassThroughHeaders","resolveAuthToken","createHostModule","__type","create","host","_temp","essentials","passThroughHeaders","language","locale","timezone","getMonitoringClient","producer","req","document","location","href","Request","namespace","getAuthToken"],"sources":["../../src/host-module.ts"],"sourcesContent":["import type { HostModule, Host } from '@wix/sdk-types';\nimport { createVeloMonitoringClient } from '@wix/monitoring-velo';\nimport { getPassThroughHeaders } from './headers';\nimport { resolveAuthToken } from './utils/auth-utils';\nimport {SDK, SDKOptions} from './types';\n\nexport const createHostModule = (): HostModule<SDK, Host> & {\n host: () => Host;\n} => {\n return {\n __type: 'host',\n create: () => {\n return {};\n },\n host: ({ essentials }: SDKOptions = {}) => {\n return {\n essentials: {\n get passThroughHeaders() {\n return getPassThroughHeaders();\n },\n language: essentials?.language ?? 'en',\n locale: essentials?.locale ?? 'en-US',\n timezone: essentials?.timezone ?? 'UTC',\n },\n getMonitoringClient: () => {\n let producer = 'unknown';\n let req: Request | undefined;\n\n if (typeof document !== 'undefined') {\n producer = document.location.href;\n req = new Request(document.location.href);\n }\n\n return createVeloMonitoringClient({\n namespace: 'Headless',\n producer,\n getAuthToken: async () => resolveAuthToken(),\n req,\n });\n },\n };\n },\n };\n};\n"],"mappings":"AACA,SAASA,0BAA0B,QA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thToken","createHostModule","__type","create","host","_temp","essentials","passThroughHeaders","language","locale","timezone","getMonitoringClient","producer","req","document","location","href","Request","namespace","getAuthToken"],"sources":["../../src/host-module.ts"],"sourcesContent":["import type { HostModule, Host } from '@wix/sdk-types';\nimport { createVeloMonitoringClient } from '@wix/monitoring-velo';\nimport { getPassThroughHeaders } from './headers';\nimport { resolveAuthToken } from './utils/auth-utils';\nimport { SDK, SDKOptions } from './types';\n\nexport const createHostModule = (): HostModule<SDK, Host> & {\n host: (options: SDKOptions) => Host;\n} => {\n return {\n __type: 'host',\n create: () => {\n return {};\n },\n host: ({ essentials }: SDKOptions = {}) => {\n return {\n essentials: {\n get passThroughHeaders() {\n return getPassThroughHeaders();\n },\n language: essentials?.language ?? 'en',\n locale: essentials?.locale ?? 'en-US',\n timezone: essentials?.timezone ?? 'UTC',\n },\n getMonitoringClient: () => {\n let producer = 'unknown';\n let req: Request | undefined;\n\n if (typeof document !== 'undefined') {\n producer = document.location.href;\n req = new Request(document.location.href);\n }\n\n return createVeloMonitoringClient({\n namespace: 'Headless',\n producer,\n getAuthToken: async () => resolveAuthToken(),\n req,\n });\n },\n };\n },\n };\n};\n"],"mappings":"AACA,SAASA,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,qBAAqB,QAAQ,WAAW;AACjD,SAASC,gBAAgB,QAAQ,oBAAoB;AAGrD,OAAO,MAAMC,gBAAgB,GAAGA,CAAA,KAE3B;EACH,OAAO;IACLC,MAAM,EAAE,MAAM;IACdC,MAAM,EAAEA,CAAA,KAAM;MACZ,OAAO,CAAC,CAAC;IACX,CAAC;IACDC,IAAI,EAAE,SAAAA,CAAAC,KAAA,EAAqC;MAAA,IAApC;QAAEC;MAAuB,CAAC,GAAAD,KAAA,cAAG,CAAC,CAAC,GAAAA,KAAA;MACpC,OAAO;QACLC,UAAU,EAAE;UACV,IAAIC,kBAAkBA,CAAA,EAAG;YACvB,OAAOR,qBAAqB,CAAC,CAAC;UAChC,CAAC;UACDS,QAAQ,EAAE,CAAAF,UAAU,oBAAVA,UAAU,CAAEE,QAAQ,KAAI,IAAI;UACtCC,MAAM,EAAE,CAAAH,UAAU,oBAAVA,UAAU,CAAEG,MAAM,KAAI,OAAO;UACrCC,QAAQ,EAAE,CAAAJ,UAAU,oBAAVA,UAAU,CAAEI,QAAQ,KAAI;QACpC,CAAC;QACDC,mBAAmB,EAAEA,CAAA,KAAM;UACzB,IAAIC,QAAQ,GAAG,SAAS;UACxB,IAAIC,GAAwB;UAE5B,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;YACnCF,QAAQ,GAAGE,QAAQ,CAACC,QAAQ,CAACC,IAAI;YACjCH,GAAG,GAAG,IAAII,OAAO,CAACH,QAAQ,CAACC,QAAQ,CAACC,IAAI,CAAC;UAC3C;UAEA,OAAOlB,0BAA0B,CAAC;YAChCoB,SAAS,EAAE,UAAU;YACrBN,QAAQ;YACRO,YAAY,EAAE,MAAAA,CAAA,KAAYnB,gBAAgB,CAAC,CAAC;YAC5Ca;UACF,CAAC,CAAC;QACJ;MACF,CAAC;IACH;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { HostModule, Host } from '@wix/sdk-types';
|
|
2
|
-
import { SDK } from './types';
|
|
3
|
-
export declare const createHostModule: () => HostModule<SDK, Host
|
|
4
|
-
host: () => Host;
|
|
2
|
+
import { SDK, SDKOptions } from './types';
|
|
3
|
+
export declare const createHostModule: () => HostModule<SDK, Host<unknown>> & {
|
|
4
|
+
host: (options: SDKOptions) => Host;
|
|
5
5
|
};
|
|
6
6
|
//# sourceMappingURL=host-module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host-module.d.ts","sourceRoot":"","sources":["../../src/host-module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAIvD,OAAO,
|
|
1
|
+
{"version":3,"file":"host-module.d.ts","sourceRoot":"","sources":["../../src/host-module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAIvD,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,eAAO,MAAM,gBAAgB;oBACX,UAAU,KAAK,IAAI;CAoCpC,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const headlessSite: import("@wix/sdk-types").HostModule<import("./types").SDK, import("@wix/sdk-types").Host<unknown>> & {
|
|
2
|
-
host: () => import("@wix/sdk-types").Host<unknown>;
|
|
2
|
+
host: (options: import("./types").SDKOptions) => import("@wix/sdk-types").Host<unknown>;
|
|
3
3
|
};
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/headless-site",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"unpkg": true,
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": {
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"wallaby": {
|
|
85
85
|
"autoDetect": true
|
|
86
86
|
},
|
|
87
|
-
"falconPackageHash": "
|
|
87
|
+
"falconPackageHash": "d539a39015ca2e70bbf47c3299370aa273534a0b0ea3b69dd5ffa2e7"
|
|
88
88
|
}
|