@embeddable.com/sdk-core 3.14.0 → 3.14.1-next.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embeddable.com/sdk-core",
3
- "version": "3.14.0",
3
+ "version": "3.14.1-next.0",
4
4
  "description": "Core Embeddable SDK module responsible for web-components bundling and publishing.",
5
5
  "keywords": [
6
6
  "embeddable",
package/src/push.test.ts CHANGED
@@ -249,7 +249,7 @@ describe("push", () => {
249
249
  // Should include component build directory
250
250
  expect(mockArchiver.directory).toHaveBeenCalled();
251
251
  // Should not include model files (except global.css which is part of components)
252
- expect(mockArchiver.file).toHaveBeenCalledTimes(1);
252
+ expect(mockArchiver.file).toHaveBeenCalledTimes(2);
253
253
  expect(mockArchiver.file).toHaveBeenCalledWith(expect.anything(), {
254
254
  name: "global.css",
255
255
  });
@@ -506,8 +506,8 @@ describe("push", () => {
506
506
  name: "global.css",
507
507
  },
508
508
  );
509
- // Should not include any model files
510
- expect(findFiles).not.toHaveBeenCalled();
509
+ // Should only find client context files
510
+ expect(findFiles).toHaveBeenCalledOnce();
511
511
  });
512
512
 
513
513
  it("should search in custom directories for model files", async () => {
package/src/push.ts CHANGED
@@ -177,10 +177,7 @@ export async function buildArchive(config: ResolvedEmbeddableConfig) {
177
177
  config.client.modelsSrc || config.client.srcDir,
178
178
  CUBE_FILES,
179
179
  );
180
- const clientContextFilesList = await findFiles(
181
- config.client.presetsSrc || config.client.srcDir,
182
- CLIENT_CONTEXT_FILES,
183
- );
180
+
184
181
  const securityContextFilesList = await findFiles(
185
182
  config.client.presetsSrc || config.client.srcDir,
186
183
  SECURITY_CONTEXT_FILES,
@@ -191,11 +188,22 @@ export async function buildArchive(config: ResolvedEmbeddableConfig) {
191
188
  path.basename(entry[1]),
192
189
  entry[1],
193
190
  ]),
194
- ...clientContextFilesList.map((entry): [string, string] => [
191
+
192
+ ...securityContextFilesList.map((entry): [string, string] => [
195
193
  path.basename(entry[1]),
196
194
  entry[1],
197
195
  ]),
198
- ...securityContextFilesList.map((entry): [string, string] => [
196
+ );
197
+ }
198
+
199
+ if (config.pushComponents) {
200
+ const clientContextFilesList = await findFiles(
201
+ config.client.presetsSrc || config.client.srcDir,
202
+ CLIENT_CONTEXT_FILES,
203
+ );
204
+
205
+ filesList.push(
206
+ ...clientContextFilesList.map((entry): [string, string] => [
199
207
  path.basename(entry[1]),
200
208
  entry[1],
201
209
  ]),