@wix/site-service-configuration 1.0.5 → 1.0.7
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/cjs/build/definition/index.d.ts +40 -0
- package/cjs/build/definition/index.js.map +1 -1
- package/cjs/build/index.js +3 -16
- package/cjs/build/index.js.map +1 -1
- package/dist/definition/index.d.ts +40 -0
- package/dist/definition/index.js.map +1 -1
- package/package.json +17 -7
- package/src/definition/index.ts +40 -0
|
@@ -1,14 +1,54 @@
|
|
|
1
1
|
import type { ServiceDefinition } from '@wix/services-definitions';
|
|
2
|
+
/** Values the host supplies when it creates the service. */
|
|
2
3
|
export type IConfigurationServiceConfig = {
|
|
4
|
+
/** Whether the site is running in QA mode. */
|
|
3
5
|
readonly qaMode?: boolean;
|
|
6
|
+
/** Whether the site tracks site visitors' clicks for analytics. */
|
|
4
7
|
readonly trackClicksAnalytics?: boolean;
|
|
8
|
+
/** Whether components that embed custom HTML in an iframe must sandbox it. */
|
|
5
9
|
readonly sandboxInHTMLComp?: boolean;
|
|
6
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* Reports the site's click tracking, embedded HTML sandboxing, and QA mode settings.
|
|
13
|
+
*
|
|
14
|
+
* @beta
|
|
15
|
+
*/
|
|
7
16
|
export interface IConfigurationService {
|
|
17
|
+
/**
|
|
18
|
+
* Whether the site is running in QA mode.
|
|
19
|
+
*
|
|
20
|
+
* This value doesn't change for the lifetime of the page.
|
|
21
|
+
*
|
|
22
|
+
* @exampleValue false
|
|
23
|
+
*/
|
|
8
24
|
readonly qaMode: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Whether the site tracks site visitors' clicks for analytics.
|
|
27
|
+
*
|
|
28
|
+
* The value comes from the site's click tracking setting. The service doesn't report any clicks.
|
|
29
|
+
* When this value is `true`, your code reports them.
|
|
30
|
+
*
|
|
31
|
+
* The value doesn't account for preview. Before you report a click, check `previewMode` from
|
|
32
|
+
* `@wix/site-service-editor-context`, and don't report clicks while a Wix user previews the site.
|
|
33
|
+
*
|
|
34
|
+
* This value doesn't change for the lifetime of the page.
|
|
35
|
+
*
|
|
36
|
+
* @exampleValue true
|
|
37
|
+
*/
|
|
9
38
|
readonly trackClicksAnalytics: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Whether components that embed custom HTML in an iframe must sandbox it.
|
|
41
|
+
*
|
|
42
|
+
* The service doesn't sandbox anything. When this value is `true`, set the iframe's `sandbox`
|
|
43
|
+
* attribute yourself. When it's `false`, leave the attribute off.
|
|
44
|
+
*
|
|
45
|
+
* This value doesn't change for the lifetime of the page.
|
|
46
|
+
*
|
|
47
|
+
* @exampleValue true
|
|
48
|
+
*/
|
|
10
49
|
readonly sandboxInHTMLComp: boolean;
|
|
11
50
|
}
|
|
51
|
+
/** @internal Private service. Documented in the code, but left out of the developer docs. */
|
|
12
52
|
export type IConfigurationDefinition = ServiceDefinition<IConfigurationService, IConfigurationServiceConfig>;
|
|
13
53
|
export declare const ConfigurationDefinition: string & {
|
|
14
54
|
__api: IConfigurationService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/definition/index.ts"],"names":[],"mappings":";;;AAAA,oEAAyD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/definition/index.ts"],"names":[],"mappings":";;;AAAA,oEAAyD;AAyD5C,QAAA,uBAAuB,GAAG,IAAA,oCAAa,EACnD,iCAAiC,CACjC,CAAA"}
|
package/cjs/build/index.js
CHANGED
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
18
|
-
__exportStar(require("./
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./definition"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./implementations"), exports);
|
|
19
6
|
//# sourceMappingURL=index.js.map
|
package/cjs/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,uDAA4B;AAC5B,4DAAiC"}
|
|
@@ -1,14 +1,54 @@
|
|
|
1
1
|
import type { ServiceDefinition } from '@wix/services-definitions';
|
|
2
|
+
/** Values the host supplies when it creates the service. */
|
|
2
3
|
export type IConfigurationServiceConfig = {
|
|
4
|
+
/** Whether the site is running in QA mode. */
|
|
3
5
|
readonly qaMode?: boolean;
|
|
6
|
+
/** Whether the site tracks site visitors' clicks for analytics. */
|
|
4
7
|
readonly trackClicksAnalytics?: boolean;
|
|
8
|
+
/** Whether components that embed custom HTML in an iframe must sandbox it. */
|
|
5
9
|
readonly sandboxInHTMLComp?: boolean;
|
|
6
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* Reports the site's click tracking, embedded HTML sandboxing, and QA mode settings.
|
|
13
|
+
*
|
|
14
|
+
* @beta
|
|
15
|
+
*/
|
|
7
16
|
export interface IConfigurationService {
|
|
17
|
+
/**
|
|
18
|
+
* Whether the site is running in QA mode.
|
|
19
|
+
*
|
|
20
|
+
* This value doesn't change for the lifetime of the page.
|
|
21
|
+
*
|
|
22
|
+
* @exampleValue false
|
|
23
|
+
*/
|
|
8
24
|
readonly qaMode: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Whether the site tracks site visitors' clicks for analytics.
|
|
27
|
+
*
|
|
28
|
+
* The value comes from the site's click tracking setting. The service doesn't report any clicks.
|
|
29
|
+
* When this value is `true`, your code reports them.
|
|
30
|
+
*
|
|
31
|
+
* The value doesn't account for preview. Before you report a click, check `previewMode` from
|
|
32
|
+
* `@wix/site-service-editor-context`, and don't report clicks while a Wix user previews the site.
|
|
33
|
+
*
|
|
34
|
+
* This value doesn't change for the lifetime of the page.
|
|
35
|
+
*
|
|
36
|
+
* @exampleValue true
|
|
37
|
+
*/
|
|
9
38
|
readonly trackClicksAnalytics: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Whether components that embed custom HTML in an iframe must sandbox it.
|
|
41
|
+
*
|
|
42
|
+
* The service doesn't sandbox anything. When this value is `true`, set the iframe's `sandbox`
|
|
43
|
+
* attribute yourself. When it's `false`, leave the attribute off.
|
|
44
|
+
*
|
|
45
|
+
* This value doesn't change for the lifetime of the page.
|
|
46
|
+
*
|
|
47
|
+
* @exampleValue true
|
|
48
|
+
*/
|
|
10
49
|
readonly sandboxInHTMLComp: boolean;
|
|
11
50
|
}
|
|
51
|
+
/** @internal Private service. Documented in the code, but left out of the developer docs. */
|
|
12
52
|
export type IConfigurationDefinition = ServiceDefinition<IConfigurationService, IConfigurationServiceConfig>;
|
|
13
53
|
export declare const ConfigurationDefinition: string & {
|
|
14
54
|
__api: IConfigurationService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/definition/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/definition/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAyDzD,MAAM,CAAC,MAAM,uBAAuB,GAAG,aAAa,CACnD,iCAAiC,CACjC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/site-service-configuration",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -49,18 +49,29 @@
|
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"build": "tsc -b . && tsc --project tsconfig.cjs.json",
|
|
52
|
-
"lint": "pnpm --workspace-root run lint:package --package $npm_package_name",
|
|
53
52
|
"test": "vitest --run && pnpm run test-type-check",
|
|
54
53
|
"test-type-check": "echo 'validating typescript in test files' && tsc --project tsconfig.test.json && echo 'Finished validating typescript in test files successfully'"
|
|
55
54
|
},
|
|
56
55
|
"dependencies": {
|
|
57
|
-
"@wix/services-definitions": "^0.
|
|
58
|
-
"@wix/services-manager": "^0.
|
|
56
|
+
"@wix/services-definitions": "^1.0.5",
|
|
57
|
+
"@wix/services-manager": "^1.0.7",
|
|
58
|
+
"tslib": "^2.8.1"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"typescript": "~7.0.2",
|
|
62
62
|
"vitest": "4.1.11"
|
|
63
63
|
},
|
|
64
|
+
"nx": {
|
|
65
|
+
"targets": {
|
|
66
|
+
"build": {
|
|
67
|
+
"outputs": [
|
|
68
|
+
"{projectRoot}/dist/**/*",
|
|
69
|
+
"{projectRoot}/cjs/build/**/*",
|
|
70
|
+
"{projectRoot}/*.tsbuildinfo"
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
64
75
|
"publishUnscoped": false,
|
|
65
76
|
"wix": {
|
|
66
77
|
"artifact": {
|
|
@@ -73,10 +84,9 @@
|
|
|
73
84
|
},
|
|
74
85
|
"validations": {
|
|
75
86
|
"postBuild": [
|
|
76
|
-
"test"
|
|
77
|
-
"lint"
|
|
87
|
+
"test"
|
|
78
88
|
]
|
|
79
89
|
}
|
|
80
90
|
},
|
|
81
|
-
"falconPackageHash": "
|
|
91
|
+
"falconPackageHash": "2d0cb51b2abca94c7c2629ac212c08dbca4db69c3c6a2d7d0cb58a8e"
|
|
82
92
|
}
|
package/src/definition/index.ts
CHANGED
|
@@ -1,18 +1,58 @@
|
|
|
1
1
|
import { defineService } from '@wix/services-definitions'
|
|
2
2
|
import type { ServiceDefinition } from '@wix/services-definitions'
|
|
3
3
|
|
|
4
|
+
/** Values the host supplies when it creates the service. */
|
|
4
5
|
export type IConfigurationServiceConfig = {
|
|
6
|
+
/** Whether the site is running in QA mode. */
|
|
5
7
|
readonly qaMode?: boolean
|
|
8
|
+
/** Whether the site tracks site visitors' clicks for analytics. */
|
|
6
9
|
readonly trackClicksAnalytics?: boolean
|
|
10
|
+
/** Whether components that embed custom HTML in an iframe must sandbox it. */
|
|
7
11
|
readonly sandboxInHTMLComp?: boolean
|
|
8
12
|
}
|
|
9
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Reports the site's click tracking, embedded HTML sandboxing, and QA mode settings.
|
|
16
|
+
*
|
|
17
|
+
* @beta
|
|
18
|
+
*/
|
|
10
19
|
export interface IConfigurationService {
|
|
20
|
+
/**
|
|
21
|
+
* Whether the site is running in QA mode.
|
|
22
|
+
*
|
|
23
|
+
* This value doesn't change for the lifetime of the page.
|
|
24
|
+
*
|
|
25
|
+
* @exampleValue false
|
|
26
|
+
*/
|
|
11
27
|
readonly qaMode: boolean
|
|
28
|
+
/**
|
|
29
|
+
* Whether the site tracks site visitors' clicks for analytics.
|
|
30
|
+
*
|
|
31
|
+
* The value comes from the site's click tracking setting. The service doesn't report any clicks.
|
|
32
|
+
* When this value is `true`, your code reports them.
|
|
33
|
+
*
|
|
34
|
+
* The value doesn't account for preview. Before you report a click, check `previewMode` from
|
|
35
|
+
* `@wix/site-service-editor-context`, and don't report clicks while a Wix user previews the site.
|
|
36
|
+
*
|
|
37
|
+
* This value doesn't change for the lifetime of the page.
|
|
38
|
+
*
|
|
39
|
+
* @exampleValue true
|
|
40
|
+
*/
|
|
12
41
|
readonly trackClicksAnalytics: boolean
|
|
42
|
+
/**
|
|
43
|
+
* Whether components that embed custom HTML in an iframe must sandbox it.
|
|
44
|
+
*
|
|
45
|
+
* The service doesn't sandbox anything. When this value is `true`, set the iframe's `sandbox`
|
|
46
|
+
* attribute yourself. When it's `false`, leave the attribute off.
|
|
47
|
+
*
|
|
48
|
+
* This value doesn't change for the lifetime of the page.
|
|
49
|
+
*
|
|
50
|
+
* @exampleValue true
|
|
51
|
+
*/
|
|
13
52
|
readonly sandboxInHTMLComp: boolean
|
|
14
53
|
}
|
|
15
54
|
|
|
55
|
+
/** @internal Private service. Documented in the code, but left out of the developer docs. */
|
|
16
56
|
export type IConfigurationDefinition = ServiceDefinition<IConfigurationService, IConfigurationServiceConfig>
|
|
17
57
|
|
|
18
58
|
export const ConfigurationDefinition = defineService<IConfigurationService, IConfigurationServiceConfig>(
|