@embeddable.com/sdk-core 3.5.1 → 3.5.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/lib/defineConfig.d.ts +11 -1
- package/lib/index.esm.js +23 -4
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +23 -4
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/defineConfig.ts +7 -0
- package/src/defineConfit.test.ts +1 -0
- package/src/dev.ts +24 -5
package/lib/defineConfig.d.ts
CHANGED
|
@@ -15,8 +15,13 @@ export type EmbeddableConfig = {
|
|
|
15
15
|
previewBaseUrl?: string;
|
|
16
16
|
componentsSrc?: string;
|
|
17
17
|
modelsSrc?: string;
|
|
18
|
+
viteConfig?: {
|
|
19
|
+
resolve?: {
|
|
20
|
+
alias?: Record<string, string>;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
18
23
|
};
|
|
19
|
-
declare const _default: ({ plugins, pushBaseUrl, audienceUrl, authDomain, authClientId, errorFallbackComponent, applicationEnvironment, rollbarAccessToken, previewBaseUrl, modelsSrc, componentsSrc, }: EmbeddableConfig) => {
|
|
24
|
+
declare const _default: ({ plugins, pushBaseUrl, audienceUrl, authDomain, authClientId, errorFallbackComponent, applicationEnvironment, rollbarAccessToken, previewBaseUrl, modelsSrc, componentsSrc, viteConfig, }: EmbeddableConfig) => {
|
|
20
25
|
core: {
|
|
21
26
|
rootDir: string;
|
|
22
27
|
templatesDir: string;
|
|
@@ -50,5 +55,10 @@ declare const _default: ({ plugins, pushBaseUrl, audienceUrl, authDomain, authCl
|
|
|
50
55
|
cleanup: (config: EmbeddableConfig) => Promise<unknown>;
|
|
51
56
|
validate: (config: EmbeddableConfig) => Promise<unknown>;
|
|
52
57
|
})[];
|
|
58
|
+
viteConfig: {
|
|
59
|
+
resolve?: {
|
|
60
|
+
alias?: Record<string, string>;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
53
63
|
};
|
|
54
64
|
export default _default;
|
package/lib/index.esm.js
CHANGED
|
@@ -20762,7 +20762,7 @@ var dev = async () => {
|
|
|
20762
20762
|
const logger = createNodeLogger({ process });
|
|
20763
20763
|
const sys = createNodeSys({ process });
|
|
20764
20764
|
const defaultConfig = await provideConfig();
|
|
20765
|
-
const buildDir = path$2.resolve(defaultConfig.client.rootDir,
|
|
20765
|
+
const buildDir = path$2.resolve(defaultConfig.client.rootDir, BUILD_DEV_DIR);
|
|
20766
20766
|
const config = {
|
|
20767
20767
|
...defaultConfig,
|
|
20768
20768
|
dev: {
|
|
@@ -20772,7 +20772,7 @@ var dev = async () => {
|
|
|
20772
20772
|
},
|
|
20773
20773
|
client: {
|
|
20774
20774
|
...defaultConfig.client,
|
|
20775
|
-
buildDir
|
|
20775
|
+
buildDir,
|
|
20776
20776
|
componentDir: path$2.resolve(buildDir, "component"),
|
|
20777
20777
|
stencilBuild: path$2.resolve(buildDir, "dist", "embeddable-wrapper"),
|
|
20778
20778
|
tmpDir: path$2.resolve(defaultConfig.client.rootDir, ".embeddable-dev-tmp"),
|
|
@@ -20810,6 +20810,19 @@ var dev = async () => {
|
|
|
20810
20810
|
if (sys === null || sys === void 0 ? void 0 : sys.onProcessInterrupt) {
|
|
20811
20811
|
sys.onProcessInterrupt(async () => await onClose(server, sys, watchers, config));
|
|
20812
20812
|
}
|
|
20813
|
+
await createManifest({
|
|
20814
|
+
ctx: {
|
|
20815
|
+
...config,
|
|
20816
|
+
client: {
|
|
20817
|
+
...config.client,
|
|
20818
|
+
tmpDir: buildDir,
|
|
20819
|
+
},
|
|
20820
|
+
},
|
|
20821
|
+
typesFileName: "embeddable-types.js",
|
|
20822
|
+
stencilWrapperFileName: "embeddable-wrapper.js",
|
|
20823
|
+
metaFileName: "embeddable-components-meta.js",
|
|
20824
|
+
editorsMetaFileName: "embeddable-editors-meta.js",
|
|
20825
|
+
});
|
|
20813
20826
|
await sendDataModelsAndSecurityContextsChanges(config);
|
|
20814
20827
|
for (const getPlugin of config.plugins) {
|
|
20815
20828
|
const plugin = getPlugin();
|
|
@@ -20884,6 +20897,11 @@ const sendDataModelsAndSecurityContextsChanges = async (ctx) => {
|
|
|
20884
20897
|
const token = await getToken();
|
|
20885
20898
|
const sending = ora("Synchronising data models and/or security contexts...").start();
|
|
20886
20899
|
const filesList = await findFiles(ctx.client.modelsSrc, YAML_OR_JS_FILES);
|
|
20900
|
+
// add manifest to the archive
|
|
20901
|
+
filesList.push([
|
|
20902
|
+
"embeddable-manifest",
|
|
20903
|
+
path$2.resolve(ctx.client.buildDir, "embeddable-manifest.json"),
|
|
20904
|
+
]);
|
|
20887
20905
|
await archive(ctx, filesList, false);
|
|
20888
20906
|
await sendBuild(ctx, { workspaceId: previewWorkspace, token });
|
|
20889
20907
|
sending.succeed(`Data models and/or security context synchronized`);
|
|
@@ -20935,7 +20953,7 @@ const getPreviewWorkspace = async (ctx) => {
|
|
|
20935
20953
|
}
|
|
20936
20954
|
};
|
|
20937
20955
|
|
|
20938
|
-
var defineConfig = ({ plugins, pushBaseUrl, audienceUrl, authDomain, authClientId, errorFallbackComponent, applicationEnvironment, rollbarAccessToken, previewBaseUrl, modelsSrc = "src", componentsSrc = "src", }) => {
|
|
20956
|
+
var defineConfig = ({ plugins, pushBaseUrl, audienceUrl, authDomain, authClientId, errorFallbackComponent, applicationEnvironment, rollbarAccessToken, previewBaseUrl, modelsSrc = "src", componentsSrc = "src", viteConfig = {}, }) => {
|
|
20939
20957
|
const coreRoot = path$1.resolve(__dirname, "..");
|
|
20940
20958
|
const clientRoot = process.cwd();
|
|
20941
20959
|
if (!path$1.isAbsolute(componentsSrc)) {
|
|
@@ -20981,11 +20999,12 @@ var defineConfig = ({ plugins, pushBaseUrl, audienceUrl, authDomain, authClientI
|
|
|
20981
20999
|
applicationEnvironment: applicationEnvironment !== null && applicationEnvironment !== void 0 ? applicationEnvironment : "production",
|
|
20982
21000
|
rollbarAccessToken: rollbarAccessToken !== null && rollbarAccessToken !== void 0 ? rollbarAccessToken : "5c6028038d844bf1835a0f4db5f55d9e",
|
|
20983
21001
|
plugins,
|
|
21002
|
+
viteConfig,
|
|
20984
21003
|
};
|
|
20985
21004
|
};
|
|
20986
21005
|
|
|
20987
21006
|
var name = "@embeddable.com/sdk-core";
|
|
20988
|
-
var version = "3.5.
|
|
21007
|
+
var version = "3.5.3";
|
|
20989
21008
|
var description = "Core Embeddable SDK module responsible for web-components bundling and publishing.";
|
|
20990
21009
|
var keywords = [
|
|
20991
21010
|
"embeddable",
|