@haatlabs-core/shopify 0.12.0 → 0.12.2

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
@@ -14,6 +14,8 @@ has the inventory scope.
14
14
  ## Entry points
15
15
 
16
16
  - `@haatlabs-core/shopify`: everything below, for Node.
17
+ - `@haatlabs-core/shopify/contracts` (0.12.1): `SHOPIFY_ERRORS` and `ShopifyErrorCode`, with nothing
18
+ of Node: a project's contracts, which its pages load, import them from here.
17
19
  - `@haatlabs-core/shopify/embedded`: for an embedded app's pages in the browser; it imports nothing
18
20
  of Node.
19
21
  - `@haatlabs-core/shopify/testing`: helpers for a project's tests.
@@ -0,0 +1 @@
1
+ export * from './codes.js';
@@ -0,0 +1,21 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var contracts_exports = {};
16
+ module.exports = __toCommonJS(contracts_exports);
17
+ __reExport(contracts_exports, require("./codes.js"), module.exports);
18
+ // Annotate the CommonJS export names for ESM import in node:
19
+ 0 && (module.exports = {
20
+ ...require("./codes.js")
21
+ });
@@ -0,0 +1 @@
1
+ export * from './codes.js';
@@ -0,0 +1,6 @@
1
+ // What a project's contracts, which its browser code also loads, may take from this package:
2
+ // its error code.
3
+ // Nothing here loads a Node built-in or a server client: scripts/check-browser.mjs bundles
4
+ // it for a browser and runs it.
5
+ export * from './codes.js';
6
+ //# sourceMappingURL=contracts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contracts.js","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,kBAAkB;AAClB,2FAA2F;AAC3F,gCAAgC;AAChC,cAAc,YAAY,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haatlabs-core/shopify",
3
- "version": "0.12.0",
3
+ "version": "0.12.2",
4
4
  "description": "Shopify for Node apps: OAuth, session tokens, the Admin GraphQL client, products, webhooks and billing.",
5
5
  "keywords": [
6
6
  "haatlabs",
@@ -35,6 +35,16 @@
35
35
  "default": "./dist/cjs/index.js"
36
36
  }
37
37
  },
38
+ "./contracts": {
39
+ "import": {
40
+ "types": "./dist/contracts.d.ts",
41
+ "default": "./dist/contracts.js"
42
+ },
43
+ "require": {
44
+ "types": "./dist/cjs/contracts.d.ts",
45
+ "default": "./dist/cjs/contracts.js"
46
+ }
47
+ },
38
48
  "./embedded": {
39
49
  "import": {
40
50
  "types": "./dist/embedded.d.ts",
@@ -56,8 +66,14 @@
56
66
  }
57
67
  }
58
68
  },
69
+ "haatlabs": {
70
+ "browser": [
71
+ "./contracts",
72
+ "./embedded"
73
+ ]
74
+ },
59
75
  "dependencies": {
60
- "@haatlabs-core/errors": "0.12.0"
76
+ "@haatlabs-core/errors": "0.12.2"
61
77
  },
62
78
  "devDependencies": {
63
79
  "@nestjs/common": "12.1.2",
@@ -67,8 +83,8 @@
67
83
  "jose": "^6.2.12",
68
84
  "reflect-metadata": "^0.2.2",
69
85
  "rxjs": "^7.8.2",
70
- "@haatlabs-core/tsconfig": "0.12.0",
71
- "@haatlabs-core/vitest-config": "0.12.0"
86
+ "@haatlabs-core/vitest-config": "0.12.2",
87
+ "@haatlabs-core/tsconfig": "0.12.2"
72
88
  },
73
89
  "scripts": {
74
90
  "build": "rm -rf dist && tsc -p tsconfig.build.json && node ../../scripts/build-cjs.mjs",