@mittwald/ext-bridge 0.2.0-alpha.789 → 0.2.0-alpha.791
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/dist/js/config/parse.mjs +2 -1
- package/dist/js/config/parse.mjs.map +1 -1
- package/dist/js/config/schemas.mjs +1 -1
- package/dist/js/config/schemas.mjs.map +1 -1
- package/dist/types/config/parse.d.ts.map +1 -1
- package/dist/types/config/schemas.d.ts +1 -1
- package/dist/types/config/schemas.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/js/config/parse.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { config } from './schemas.mjs';
|
|
2
2
|
import { ExtBridgeError } from '../error.mjs';
|
|
3
|
+
import z from 'zod';
|
|
3
4
|
|
|
4
5
|
const parseConfig = (something) => {
|
|
5
|
-
const parsed = config.safeParse(something);
|
|
6
|
+
const parsed = config.catchall(z.string().optional().nullable()).safeParse(something);
|
|
6
7
|
if (parsed.error) {
|
|
7
8
|
throw new ExtBridgeError("Invalid config: " + parsed.error.message);
|
|
8
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.mjs","sources":["../../../src/config/parse.ts"],"sourcesContent":["import { config } from \"@/config/schemas\";\nimport { ExtBridgeError } from \"@/error\";\n\nexport const parseConfig = (something: unknown) => {\n const parsed = config.safeParse(something);\n if (parsed.error) {\n throw new ExtBridgeError(\"Invalid config: \" + parsed.error.message);\n }\n return parsed.data;\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parse.mjs","sources":["../../../src/config/parse.ts"],"sourcesContent":["import { config } from \"@/config/schemas\";\nimport { ExtBridgeError } from \"@/error\";\nimport z from \"zod\";\n\nexport const parseConfig = (something: unknown) => {\n const parsed = config\n .catchall(z.string().optional().nullable())\n .safeParse(something);\n if (parsed.error) {\n throw new ExtBridgeError(\"Invalid config: \" + parsed.error.message);\n }\n return parsed.data;\n};\n"],"names":[],"mappings":";;;;AAIO,MAAM,WAAA,GAAc,CAAC,SAAA,KAAuB;AACjD,EAAA,MAAM,MAAA,GAAS,MAAA,CACZ,QAAA,CAAS,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS,CAAE,QAAA,EAAU,CAAA,CACzC,SAAA,CAAU,SAAS,CAAA;AACtB,EAAA,IAAI,OAAO,KAAA,EAAO;AAChB,IAAA,MAAM,IAAI,cAAA,CAAe,kBAAA,GAAqB,MAAA,CAAO,MAAM,OAAO,CAAA;AAAA,EACpE;AACA,EAAA,OAAO,MAAA,CAAO,IAAA;AAChB;;;;"}
|
|
@@ -12,7 +12,7 @@ const contextParameters = z.object({
|
|
|
12
12
|
projectId: z.string().optional(),
|
|
13
13
|
customerId: z.string().optional()
|
|
14
14
|
});
|
|
15
|
-
const config = baseConfig.extend(contextParameters.shape)
|
|
15
|
+
const config = baseConfig.extend(contextParameters.shape);
|
|
16
16
|
|
|
17
17
|
export { config };
|
|
18
18
|
//# sourceMappingURL=schemas.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.mjs","sources":["../../../src/config/schemas.ts"],"sourcesContent":["import { z } from \"zod\";\n\n/**\n * Breaking Change warning: Do not remove/rename/modify existing properties in\n * the config schema, as they might be used by existing extensions.\n */\nconst baseConfig = z.object({\n sessionId: z.string(),\n userId: z.string(),\n extensionId: z.string(),\n extensionInstanceId: z.string(),\n variantKey: z.string().optional().nullable(),\n});\n\n/**\n * Breaking Change warning: Do not remove/rename/modify existing properties in\n * the config schema, as they might be used by existing extensions.\n */\nconst contextParameters = z.object({\n appInstallationId: z.string().optional(),\n projectId: z.string().optional(),\n customerId: z.string().optional(),\n});\n\nexport const config = baseConfig
|
|
1
|
+
{"version":3,"file":"schemas.mjs","sources":["../../../src/config/schemas.ts"],"sourcesContent":["import { z } from \"zod\";\n\n/**\n * Breaking Change warning: Do not remove/rename/modify existing properties in\n * the config schema, as they might be used by existing extensions.\n */\nconst baseConfig = z.object({\n sessionId: z.string(),\n userId: z.string(),\n extensionId: z.string(),\n extensionInstanceId: z.string(),\n variantKey: z.string().optional().nullable(),\n});\n\n/**\n * Breaking Change warning: Do not remove/rename/modify existing properties in\n * the config schema, as they might be used by existing extensions.\n */\nconst contextParameters = z.object({\n appInstallationId: z.string().optional(),\n projectId: z.string().optional(),\n customerId: z.string().optional(),\n});\n\nexport const config = baseConfig.extend(contextParameters.shape);\n"],"names":[],"mappings":";;AAMA,MAAM,UAAA,GAAa,EAAE,MAAA,CAAO;AAAA,EAC1B,SAAA,EAAW,EAAE,MAAA,EAAO;AAAA,EACpB,MAAA,EAAQ,EAAE,MAAA,EAAO;AAAA,EACjB,WAAA,EAAa,EAAE,MAAA,EAAO;AAAA,EACtB,mBAAA,EAAqB,EAAE,MAAA,EAAO;AAAA,EAC9B,YAAY,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,GAAW,QAAA;AACpC,CAAC,CAAA;AAMD,MAAM,iBAAA,GAAoB,EAAE,MAAA,CAAO;AAAA,EACjC,iBAAA,EAAmB,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EACvC,SAAA,EAAW,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EAC/B,UAAA,EAAY,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA;AACzB,CAAC,CAAA;AAEM,MAAM,MAAA,GAAS,UAAA,CAAW,MAAA,CAAO,iBAAA,CAAkB,KAAK;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../../src/config/parse.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../../src/config/parse.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,GAAI,WAAW,OAAO;;;;;;;;;;CAQ7C,CAAC"}
|
|
@@ -8,5 +8,5 @@ export declare const config: z.ZodObject<{
|
|
|
8
8
|
appInstallationId: z.ZodOptional<z.ZodString>;
|
|
9
9
|
projectId: z.ZodOptional<z.ZodString>;
|
|
10
10
|
customerId: z.ZodOptional<z.ZodString>;
|
|
11
|
-
}, z.core.$
|
|
11
|
+
}, z.core.$strip>;
|
|
12
12
|
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/config/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAwBxB,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/config/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAwBxB,eAAO,MAAM,MAAM;;;;;;;;;iBAA6C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/ext-bridge",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.791",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Bridge for mStudio embedded frontend extensions",
|
|
6
6
|
"homepage": "https://mittwald.github.io/flow",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"optional": true
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "058b97b06560ec253b5cb345a4537d6c5269884f"
|
|
84
84
|
}
|