@shopvirge/shopvirge-client 0.4.4 → 0.4.5

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/README.md CHANGED
@@ -85,22 +85,13 @@ OpenAPI.interceptors.response.use((response) => {
85
85
 
86
86
  ## Development
87
87
 
88
- ### Regenerate the client
89
-
90
- From the `packages/shopvirge-client/` directory:
88
+ This package lives in `npm/` of [virge-io/shopvirge-client](https://github.com/virge-io/shopvirge-client) and is generated from the `openapi.json` in the repository root. Run everything from `npm/` with pnpm.
91
89
 
92
90
  ```bash
93
- # From a local openapi.json file
94
- yarn openapi-ts
95
-
96
- # From the live API
97
- yarn openapi-ts-live
91
+ pnpm generate # regenerate src/api/generated from ../openapi.json
92
+ pnpm generate:live # fetch the live spec from api.shopvirge.com first, then generate + sync-version
93
+ pnpm sync-version # copy the spec's info.version into package.json
94
+ pnpm build # ESM bundle + types into dist/
98
95
  ```
99
96
 
100
- ### Sync package version
101
-
102
- After regenerating, sync the package version from the OpenAPI spec:
103
-
104
- ```bash
105
- yarn sync-version
106
- ```
97
+ Releases: merge a version bump to `main` and the publish workflow publishes it to npm. See the repository README for the full flow.
package/dist/index.js CHANGED
@@ -35,16 +35,14 @@ var CancelablePromise = class {
35
35
  return;
36
36
  }
37
37
  this._isResolved = true;
38
- if (this._resolve)
39
- this._resolve(value);
38
+ if (this._resolve) this._resolve(value);
40
39
  };
41
40
  const onReject = (reason) => {
42
41
  if (this._isResolved || this._isRejected || this._isCancelled) {
43
42
  return;
44
43
  }
45
44
  this._isRejected = true;
46
- if (this._reject)
47
- this._reject(reason);
45
+ if (this._reject) this._reject(reason);
48
46
  };
49
47
  const onCancel = (cancelHandler) => {
50
48
  if (this._isResolved || this._isRejected || this._isCancelled) {
@@ -92,8 +90,7 @@ var CancelablePromise = class {
92
90
  }
93
91
  }
94
92
  this.cancelHandlers.length = 0;
95
- if (this._reject)
96
- this._reject(new CancelError("Request aborted"));
93
+ if (this._reject) this._reject(new CancelError("Request aborted"));
97
94
  }
98
95
  get isCancelled() {
99
96
  return this._isCancelled;
@@ -126,7 +123,7 @@ var OpenAPI = {
126
123
  PASSWORD: void 0,
127
124
  TOKEN: void 0,
128
125
  USERNAME: void 0,
129
- VERSION: "0.4.4",
126
+ VERSION: "0.4.5",
130
127
  WITH_CREDENTIALS: false,
131
128
  interceptors: {
132
129
  request: new Interceptors(),
@@ -8602,3 +8599,4 @@ export {
8602
8599
  updateShopsShopIdPut,
8603
8600
  updateTag
8604
8601
  };
8602
+ //# sourceMappingURL=index.js.map