@magidoc/plugin-starter-variables 0.13.2 → 0.14.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.
|
@@ -6,6 +6,7 @@ declare const _default: {
|
|
|
6
6
|
APP_LOGO: import("./variable").Variable<string>;
|
|
7
7
|
APP_TITLE: import("./variable").Variable<string>;
|
|
8
8
|
SITE_ROOT: import("./variable").Variable<string>;
|
|
9
|
+
SITE_META: import("./variable").Variable<Record<string, string | undefined>>;
|
|
9
10
|
QUERY_GENERATION_FACTORIES: import("./variable").Variable<Record<string, string | number | boolean | Record<string, unknown> | null | undefined>>;
|
|
10
11
|
PAGES: import("./variable").Variable<(Page | undefined)[]>;
|
|
11
12
|
};
|
|
@@ -7,6 +7,7 @@ var templates = {
|
|
|
7
7
|
APP_LOGO: createVariable('APP_LOGO', stringConverter()),
|
|
8
8
|
APP_TITLE: createVariable('APP_TITLE', stringConverter()),
|
|
9
9
|
SITE_ROOT: createVariable('SITE_ROOT', stringConverter()),
|
|
10
|
+
SITE_META: createVariable('SITE_META', recordConverter((zod) => zod.string())),
|
|
10
11
|
QUERY_GENERATION_FACTORIES: createVariable('QUERY_GENERATION_FACTORIES', recordConverter((zod) => zod.union([
|
|
11
12
|
zod.string(),
|
|
12
13
|
zod.boolean(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sources":["../../../src/variables/templates.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AASA,gBAAe;AACb,IAAA,QAAQ,EAAE,cAAc,CAAS,UAAU,EAAE,eAAe,EAAE,CAAC;AAC/D,IAAA,SAAS,EAAE,cAAc,CAAS,WAAW,EAAE,eAAe,EAAE,CAAC;AACjE,IAAA,SAAS,EAAE,cAAc,CAAS,WAAW,EAAE,eAAe,EAAE,CAAC;AACjE,IAAA,0BAA0B,EAAE,cAAc,CAMxC,4BAA4B,EAC5B,eAAe,CAAC,CAAC,GAAG,KAClB,GAAG,CAAC,K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Z,GAAG,CAAC,OAAO,EAAE;QACb,GAAG,CAAC,MAAM,EAAE;QACZ,GAAG,CAAC,IAAI,EAAE;AACV,QAAA,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;AAC1B,KAAA,CAAC,CACH,CACF;IACD,KAAK,EAAE,cAAc,CACnB,OAAO,EACP,cAAc,CAAC,CAAC,GAAG,KAAI;AACrB,QAAA,MAAM,IAAI,GAAkB,GAAG,CAAC,IAAI,CAAC,MACnC,GAAG,CAAC,MAAM,CAAC;AACT,YAAA,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC9B,OAAO,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC/D,SAAA,CAAC,CACH,CAAA;AACD,QAAA,OAAO,IAAI,CAAA;AACb,KAAC,CAAC,CACH;CACF;;;;"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@magidoc/plugin-starter-variables",
|
|
3
3
|
"description": "A shared library that contains common Magidoc starter environment variables keys.",
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.14.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"main": "./build/index.js",
|
|
@@ -13,15 +13,15 @@
|
|
|
13
13
|
],
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"@rollup/plugin-typescript": "^8.3.2",
|
|
16
|
-
"@types/jest": "^27.
|
|
17
|
-
"jest": "^
|
|
18
|
-
"rollup": "^2.
|
|
19
|
-
"ts-jest": "^
|
|
16
|
+
"@types/jest": "^27.5.0",
|
|
17
|
+
"jest": "^28.1.0",
|
|
18
|
+
"rollup": "^2.72.0",
|
|
19
|
+
"ts-jest": "^28.0.1",
|
|
20
20
|
"tslib": "^2.4.0",
|
|
21
21
|
"typescript": "^4.6.4"
|
|
22
22
|
},
|
|
23
23
|
"optionalDependencies": {
|
|
24
|
-
"zod": "^3.
|
|
24
|
+
"zod": "^3.15.1"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"start": "pnpm build:rollup && node build/index.js",
|
|
@@ -30,6 +30,5 @@
|
|
|
30
30
|
"build:tsc": "tsc --build tsconfig.build.json",
|
|
31
31
|
"test": "jest",
|
|
32
32
|
"release": "pnpm publish --no-git-checks --access public"
|
|
33
|
-
}
|
|
34
|
-
"readme": "# Magidoc Starters Variables\nThis is an internal Magidoc shared library used for starters environment variables. You most likely never will need to use this library directly. \n"
|
|
33
|
+
}
|
|
35
34
|
}
|
|
@@ -11,6 +11,10 @@ export default {
|
|
|
11
11
|
APP_LOGO: createVariable<string>('APP_LOGO', stringConverter()),
|
|
12
12
|
APP_TITLE: createVariable<string>('APP_TITLE', stringConverter()),
|
|
13
13
|
SITE_ROOT: createVariable<string>('SITE_ROOT', stringConverter()),
|
|
14
|
+
SITE_META: createVariable<Record<string, string | undefined>>(
|
|
15
|
+
'SITE_META',
|
|
16
|
+
recordConverter((zod) => zod.string()),
|
|
17
|
+
),
|
|
14
18
|
QUERY_GENERATION_FACTORIES: createVariable<
|
|
15
19
|
Record<
|
|
16
20
|
string,
|
package/tests/index.spec.ts
CHANGED
|
@@ -15,6 +15,7 @@ describe('variables', () => {
|
|
|
15
15
|
'APP_LOGO',
|
|
16
16
|
'APP_TITLE',
|
|
17
17
|
'SITE_ROOT',
|
|
18
|
+
'SITE_META',
|
|
18
19
|
'QUERY_GENERATION_FACTORIES',
|
|
19
20
|
'PAGES',
|
|
20
21
|
])
|
|
@@ -44,6 +45,14 @@ describe('variables', () => {
|
|
|
44
45
|
)
|
|
45
46
|
})
|
|
46
47
|
|
|
48
|
+
test('site meta', () => {
|
|
49
|
+
testRecordVariable(
|
|
50
|
+
variables.templates.SITE_META,
|
|
51
|
+
'VITE_SITE_META',
|
|
52
|
+
z.record(z.string().optional()).optional(),
|
|
53
|
+
)
|
|
54
|
+
})
|
|
55
|
+
|
|
47
56
|
test('query generation factories', () => {
|
|
48
57
|
testRecordVariable(
|
|
49
58
|
variables.templates.QUERY_GENERATION_FACTORIES,
|