@spoosh/angular 0.6.2 → 0.6.4

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/index.js CHANGED
@@ -69,10 +69,9 @@ function createInjectRead(options) {
69
69
  if (currentSubscription) {
70
70
  currentSubscription();
71
71
  }
72
- const pathSegments = capturedCall.path.split("/").filter(Boolean);
73
72
  const controller = (0, import_core2.createOperationController)({
74
73
  operationType: "read",
75
- path: pathSegments,
74
+ path: capturedCall.path,
76
75
  method: capturedCall.method,
77
76
  tags: resolvedTags,
78
77
  requestOptions: capturedCall.options,
@@ -106,7 +105,7 @@ function createInjectRead(options) {
106
105
  fetchingSignal.set(true);
107
106
  try {
108
107
  const execOptions = overrideOptions ? {
109
- ...currentController?.getContext().requestOptions,
108
+ ...currentController?.getContext().request,
110
109
  ...overrideOptions
111
110
  } : void 0;
112
111
  const response = await controller.execute(execOptions, { force });
@@ -145,7 +144,7 @@ function createInjectRead(options) {
145
144
  initialResolvedPath
146
145
  );
147
146
  const initialQueryKey = stateManager.createQueryKey({
148
- path: initialPathSegments,
147
+ path: initialCapturedCall.path,
149
148
  method: initialCapturedCall.method,
150
149
  options: initialCapturedCall.options
151
150
  });
@@ -171,7 +170,7 @@ function createInjectRead(options) {
171
170
  resolvedPath
172
171
  );
173
172
  const queryKey = stateManager.createQueryKey({
174
- path: pathSegments,
173
+ path: capturedCall.path,
175
174
  method: capturedCall.method,
176
175
  options: capturedCall.options
177
176
  });
@@ -302,7 +301,7 @@ function createInjectRead(options) {
302
301
  };
303
302
  const pathSegments = capturedCall.path.split("/").filter(Boolean);
304
303
  const newQueryKey = stateManager.createQueryKey({
305
- path: pathSegments,
304
+ path: capturedCall.path,
306
305
  method: capturedCall.method,
307
306
  options: mergedOptions
308
307
  });
@@ -390,7 +389,7 @@ function createInjectWrite(options) {
390
389
  const resolvedPath = (0, import_core4.resolvePath)(pathSegments, params);
391
390
  const tags = (0, import_core4.resolveTags)(triggerOptions, resolvedPath);
392
391
  const queryKey = stateManager.createQueryKey({
393
- path: pathSegments,
392
+ path: selectedEndpoint.path,
394
393
  method: selectedEndpoint.method,
395
394
  options: triggerOptions
396
395
  });
@@ -401,7 +400,7 @@ function createInjectWrite(options) {
401
400
  }
402
401
  const controller = (0, import_core4.createOperationController)({
403
402
  operationType: "write",
404
- path: pathSegments,
403
+ path: selectedEndpoint.path,
405
404
  method: selectedEndpoint.method,
406
405
  tags,
407
406
  stateManager,
@@ -576,7 +575,6 @@ function createInjectInfiniteRead(options) {
576
575
  unsubRefetchAll();
577
576
  }
578
577
  const requestOptions = capturedCall.options;
579
- const pathSegments = capturedCall.path.split("/").filter(Boolean);
580
578
  const baseOptionsForKey = {
581
579
  ...capturedCall.options,
582
580
  query: void 0,
@@ -589,7 +587,7 @@ function createInjectInfiniteRead(options) {
589
587
  body: requestOptions?.body
590
588
  };
591
589
  const controller = (0, import_core6.createInfiniteReadController)({
592
- path: pathSegments,
590
+ path: capturedCall.path,
593
591
  method: capturedCall.method,
594
592
  tags: resolvedTags,
595
593
  initialRequest,
@@ -675,7 +673,7 @@ function createInjectInfiniteRead(options) {
675
673
  body: void 0
676
674
  };
677
675
  const initialQueryKey = stateManager.createQueryKey({
678
- path: initialPathSegments,
676
+ path: initialCapturedCall.path,
679
677
  method: initialCapturedCall.method,
680
678
  options: initialBaseOptionsForKey
681
679
  });
@@ -698,7 +696,7 @@ function createInjectInfiniteRead(options) {
698
696
  body: void 0
699
697
  };
700
698
  const queryKey = stateManager.createQueryKey({
701
- path: pathSegments,
699
+ path: capturedCall.path,
702
700
  method: capturedCall.method,
703
701
  options: baseOptionsForKey
704
702
  });
package/dist/index.mjs CHANGED
@@ -54,10 +54,9 @@ function createInjectRead(options) {
54
54
  if (currentSubscription) {
55
55
  currentSubscription();
56
56
  }
57
- const pathSegments = capturedCall.path.split("/").filter(Boolean);
58
57
  const controller = createOperationController({
59
58
  operationType: "read",
60
- path: pathSegments,
59
+ path: capturedCall.path,
61
60
  method: capturedCall.method,
62
61
  tags: resolvedTags,
63
62
  requestOptions: capturedCall.options,
@@ -91,7 +90,7 @@ function createInjectRead(options) {
91
90
  fetchingSignal.set(true);
92
91
  try {
93
92
  const execOptions = overrideOptions ? {
94
- ...currentController?.getContext().requestOptions,
93
+ ...currentController?.getContext().request,
95
94
  ...overrideOptions
96
95
  } : void 0;
97
96
  const response = await controller.execute(execOptions, { force });
@@ -130,7 +129,7 @@ function createInjectRead(options) {
130
129
  initialResolvedPath
131
130
  );
132
131
  const initialQueryKey = stateManager.createQueryKey({
133
- path: initialPathSegments,
132
+ path: initialCapturedCall.path,
134
133
  method: initialCapturedCall.method,
135
134
  options: initialCapturedCall.options
136
135
  });
@@ -156,7 +155,7 @@ function createInjectRead(options) {
156
155
  resolvedPath
157
156
  );
158
157
  const queryKey = stateManager.createQueryKey({
159
- path: pathSegments,
158
+ path: capturedCall.path,
160
159
  method: capturedCall.method,
161
160
  options: capturedCall.options
162
161
  });
@@ -287,7 +286,7 @@ function createInjectRead(options) {
287
286
  };
288
287
  const pathSegments = capturedCall.path.split("/").filter(Boolean);
289
288
  const newQueryKey = stateManager.createQueryKey({
290
- path: pathSegments,
289
+ path: capturedCall.path,
291
290
  method: capturedCall.method,
292
291
  options: mergedOptions
293
292
  });
@@ -380,7 +379,7 @@ function createInjectWrite(options) {
380
379
  const resolvedPath = resolvePath2(pathSegments, params);
381
380
  const tags = resolveTags2(triggerOptions, resolvedPath);
382
381
  const queryKey = stateManager.createQueryKey({
383
- path: pathSegments,
382
+ path: selectedEndpoint.path,
384
383
  method: selectedEndpoint.method,
385
384
  options: triggerOptions
386
385
  });
@@ -391,7 +390,7 @@ function createInjectWrite(options) {
391
390
  }
392
391
  const controller = createOperationController2({
393
392
  operationType: "write",
394
- path: pathSegments,
393
+ path: selectedEndpoint.path,
395
394
  method: selectedEndpoint.method,
396
395
  tags,
397
396
  stateManager,
@@ -578,7 +577,6 @@ function createInjectInfiniteRead(options) {
578
577
  unsubRefetchAll();
579
578
  }
580
579
  const requestOptions = capturedCall.options;
581
- const pathSegments = capturedCall.path.split("/").filter(Boolean);
582
580
  const baseOptionsForKey = {
583
581
  ...capturedCall.options,
584
582
  query: void 0,
@@ -591,7 +589,7 @@ function createInjectInfiniteRead(options) {
591
589
  body: requestOptions?.body
592
590
  };
593
591
  const controller = createInfiniteReadController({
594
- path: pathSegments,
592
+ path: capturedCall.path,
595
593
  method: capturedCall.method,
596
594
  tags: resolvedTags,
597
595
  initialRequest,
@@ -677,7 +675,7 @@ function createInjectInfiniteRead(options) {
677
675
  body: void 0
678
676
  };
679
677
  const initialQueryKey = stateManager.createQueryKey({
680
- path: initialPathSegments,
678
+ path: initialCapturedCall.path,
681
679
  method: initialCapturedCall.method,
682
680
  options: initialBaseOptionsForKey
683
681
  });
@@ -700,7 +698,7 @@ function createInjectInfiniteRead(options) {
700
698
  body: void 0
701
699
  };
702
700
  const queryKey = stateManager.createQueryKey({
703
- path: pathSegments,
701
+ path: capturedCall.path,
704
702
  method: capturedCall.method,
705
703
  options: baseOptionsForKey
706
704
  });
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@spoosh/angular",
3
- "version": "0.6.2",
3
+ "version": "0.6.4",
4
4
  "license": "MIT",
5
- "description": "Angular signals integration for Spoosh API client",
5
+ "description": "Angular signals integration for Spoosh API toolkit",
6
6
  "keywords": [
7
7
  "spoosh",
8
8
  "angular",
9
9
  "signals",
10
- "api-client",
10
+ "api-toolkit",
11
11
  "injectRead",
12
12
  "injectWrite"
13
13
  ],
@@ -34,13 +34,13 @@
34
34
  }
35
35
  },
36
36
  "peerDependencies": {
37
- "@spoosh/core": ">=0.7.0",
37
+ "@spoosh/core": ">=0.11.1",
38
38
  "@angular/core": ">=16.0.0"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@angular/core": "^19.0.0",
42
- "@spoosh/core": "0.10.0",
43
- "@spoosh/test-utils": "0.1.5"
42
+ "@spoosh/core": "0.11.1",
43
+ "@spoosh/test-utils": "0.1.6"
44
44
  },
45
45
  "scripts": {
46
46
  "dev": "tsup --watch",