@wix/site-service-rendering-context 1.0.1 → 1.0.3
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.js.map +1 -1
- package/cjs/build/implementations/renderingContextService.js.map +1 -1
- package/cjs/build/service.js.map +1 -1
- package/cjs/package.json +1 -1
- package/definition/package.json +1 -1
- package/dist/definition/index.js.map +1 -1
- package/dist/implementations/renderingContextService.js.map +1 -1
- package/implementations/package.json +1 -1
- package/package.json +17 -17
- package/src/definition/index.ts +4 -4
- package/src/implementations/renderingContextService.ts +13 -13
- package/src/types/index.ts +3 -3
- package/types/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/definition/index.ts"],"names":[],"mappings":";;;AAAA,oEAAyD;AAc5C,QAAA,0BAA0B,GAAG,IAAA,oCAAa,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/definition/index.ts"],"names":[],"mappings":";;;AAAA,oEAAyD;AAc5C,QAAA,0BAA0B,GAAG,IAAA,oCAAa,EACtD,qCAAqC,CACrC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderingContextService.js","sourceRoot":"","sources":["../../../src/implementations/renderingContextService.ts"],"names":[],"mappings":";;;AAAA,oEAA4D;AAG5D,8CAA0D;AAE7C,QAAA,uBAAuB,GAAG,IAAA,uCAAgB,
|
|
1
|
+
{"version":3,"file":"renderingContextService.js","sourceRoot":"","sources":["../../../src/implementations/renderingContextService.ts"],"names":[],"mappings":";;;AAAA,oEAA4D;AAG5D,8CAA0D;AAE7C,QAAA,uBAAuB,GAAG,IAAA,uCAAgB,EACtD,uCAA0B,EAC1B,CAAC,EAAE,MAAM,EAAsD,EAA4B,EAAE;IAC5F,MAAM,GAAG,GAAG,UAAU,CAAC,MAAM,KAAK,SAAS,CAAA;IAC3C,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,IAAI,KAAK,CAAA;IAE/B,OAAO;QACN,IAAI,GAAG;YACN,OAAO,GAAG,CAAA;QACX,CAAC;QACD,IAAI,GAAG;YACN,OAAO,GAAG,CAAA;QACX,CAAC;KACD,CAAA;AACF,CAAC,CACD,CAAA"}
|
package/cjs/build/service.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../src/service.ts"],"names":[],"mappings":";;;AAAA,6CAAyD;AACzD,uFAAmF;AAEtE,QAAA,UAAU,GAAG,uCAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../src/service.ts"],"names":[],"mappings":";;;AAAA,6CAAyD;AACzD,uFAAmF;AAEtE,QAAA,UAAU,GAAG,uCAA0B,CAAA;kBACrC,iDAAuB"}
|
package/cjs/package.json
CHANGED
package/definition/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/definition/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAczD,MAAM,CAAC,MAAM,0BAA0B,GAAG,aAAa,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/definition/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAczD,MAAM,CAAC,MAAM,0BAA0B,GAAG,aAAa,CACtD,qCAAqC,CACrC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderingContextService.js","sourceRoot":"","sources":["../../src/implementations/renderingContextService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAG5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAA;AAE1D,MAAM,CAAC,MAAM,uBAAuB,GAAG,gBAAgB,
|
|
1
|
+
{"version":3,"file":"renderingContextService.js","sourceRoot":"","sources":["../../src/implementations/renderingContextService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAG5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAA;AAE1D,MAAM,CAAC,MAAM,uBAAuB,GAAG,gBAAgB,CACtD,0BAA0B,EAC1B,CAAC,EAAE,MAAM,EAAsD,EAA4B,EAAE;IAC5F,MAAM,GAAG,GAAG,UAAU,CAAC,MAAM,KAAK,SAAS,CAAA;IAC3C,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,IAAI,KAAK,CAAA;IAE/B,OAAO;QACN,IAAI,GAAG;YACN,OAAO,GAAG,CAAA;QACX,CAAC;QACD,IAAI,GAAG;YACN,OAAO,GAAG,CAAA;QACX,CAAC;KACD,CAAA;AACF,CAAC,CACD,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/site-service-rendering-context",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"main": "cjs/build/index.js",
|
|
5
|
-
"module": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
3
|
+
"version": "1.0.3",
|
|
7
4
|
"license": "UNLICENSED",
|
|
8
5
|
"files": [
|
|
9
6
|
"dist",
|
|
@@ -14,6 +11,10 @@
|
|
|
14
11
|
"types",
|
|
15
12
|
"!**/*.tsbuildinfo"
|
|
16
13
|
],
|
|
14
|
+
"sideEffects": false,
|
|
15
|
+
"main": "cjs/build/index.js",
|
|
16
|
+
"module": "dist/index.js",
|
|
17
|
+
"types": "dist/index.d.ts",
|
|
17
18
|
"exports": {
|
|
18
19
|
".": {
|
|
19
20
|
"types": "./dist/index.d.ts",
|
|
@@ -41,13 +42,9 @@
|
|
|
41
42
|
"require": "./cjs/build/service.js"
|
|
42
43
|
}
|
|
43
44
|
},
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
},
|
|
48
|
-
"devDependencies": {
|
|
49
|
-
"typescript": "^5.3.3",
|
|
50
|
-
"vitest": "4.1.0"
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"registry": "https://registry.npmjs.org/",
|
|
47
|
+
"access": "public"
|
|
51
48
|
},
|
|
52
49
|
"scripts": {
|
|
53
50
|
"build": "tsc -b . --force && tsc --project tsconfig.cjs.json",
|
|
@@ -55,12 +52,15 @@
|
|
|
55
52
|
"test": "vitest --run && yarn test-type-check",
|
|
56
53
|
"test-type-check": "echo 'validating typescript in test files' && tsc --project tsconfig.test.json && echo 'Finished validating typescript in test files successfully'"
|
|
57
54
|
},
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
"access": "public"
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"@wix/services-definitions": "^0.1.4",
|
|
57
|
+
"@wix/services-manager": "^0.2.20"
|
|
62
58
|
},
|
|
63
|
-
"
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"typescript": "~7.0.2",
|
|
61
|
+
"vitest": "4.1.11"
|
|
62
|
+
},
|
|
63
|
+
"publishUnscoped": false,
|
|
64
64
|
"wix": {
|
|
65
65
|
"artifact": {
|
|
66
66
|
"groupId": "com.wixpress.npm",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
]
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
|
-
"falconPackageHash": "
|
|
80
|
+
"falconPackageHash": "318e6db80f256f4628afcfa07bab0288a2d9fbc9046bada2e976a6f0"
|
|
81
81
|
}
|
package/src/definition/index.ts
CHANGED
|
@@ -2,16 +2,16 @@ import { defineService } from '@wix/services-definitions'
|
|
|
2
2
|
import type { ServiceDefinition } from '@wix/services-definitions'
|
|
3
3
|
|
|
4
4
|
export type IRenderingContextServiceConfig = {
|
|
5
|
-
|
|
5
|
+
readonly seo?: boolean
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
export interface IRenderingContextService {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
readonly SSR: boolean
|
|
10
|
+
readonly SEO: boolean
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export type IRenderingContextDefinition = ServiceDefinition<IRenderingContextService, IRenderingContextServiceConfig>
|
|
14
14
|
|
|
15
15
|
export const RenderingContextDefinition = defineService<IRenderingContextService, IRenderingContextServiceConfig>(
|
|
16
|
-
|
|
16
|
+
'@wix/site-service-rendering-context'
|
|
17
17
|
)
|
|
@@ -4,18 +4,18 @@ import type { IRenderingContextService, IRenderingContextServiceConfig } from '.
|
|
|
4
4
|
import { RenderingContextDefinition } from '../definition'
|
|
5
5
|
|
|
6
6
|
export const RenderingContextService = implementService(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
RenderingContextDefinition,
|
|
8
|
+
({ config }: ServiceFactoryOpts<IRenderingContextServiceConfig>): IRenderingContextService => {
|
|
9
|
+
const SSR = globalThis.window === undefined
|
|
10
|
+
const SEO = config.seo ?? false
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
return {
|
|
13
|
+
get SSR() {
|
|
14
|
+
return SSR
|
|
15
|
+
},
|
|
16
|
+
get SEO() {
|
|
17
|
+
return SEO
|
|
18
|
+
},
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
21
|
)
|
package/src/types/index.ts
CHANGED
package/types/package.json
CHANGED