@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/lib/index.esm.js +6 -3
- package/lib/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/push.test.ts +3 -3
- package/src/push.ts +14 -6
- package/lib/index.js +0 -22492
- package/lib/index.js.map +0 -1
package/package.json
CHANGED
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(
|
|
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
|
|
510
|
-
expect(findFiles).
|
|
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
|
-
|
|
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
|
-
|
|
191
|
+
|
|
192
|
+
...securityContextFilesList.map((entry): [string, string] => [
|
|
195
193
|
path.basename(entry[1]),
|
|
196
194
|
entry[1],
|
|
197
195
|
]),
|
|
198
|
-
|
|
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
|
]),
|