iobroker.parcelapp 0.2.3 → 0.2.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/README.md CHANGED
@@ -94,6 +94,9 @@ parcelapp.0.
94
94
 
95
95
  ## Changelog
96
96
 
97
+ ### 0.2.4 (2026-04-03)
98
+ - Modernize dev tooling (esbuild, TypeScript 5.9 pin, testing-action-check v2)
99
+
97
100
  ### 0.2.3 (2026-03-28)
98
101
  - Fix carrier name cache not retrying after initial failure
99
102
 
@@ -114,9 +117,6 @@ parcelapp.0.
114
117
  ### 0.1.4 (2026-03-24)
115
118
  - Improved README
116
119
 
117
- ### 0.1.3 (2026-03-24)
118
- - Added Dependabot automerge workflow
119
-
120
120
  Older changelog: [CHANGELOG.md](CHANGELOG.md)
121
121
 
122
122
  ---
@@ -1,178 +1,186 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var parcel_client_exports = {};
30
+ __export(parcel_client_exports, {
31
+ ParcelClient: () => ParcelClient
17
32
  });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.ParcelClient = void 0;
37
- const https = __importStar(require("node:https"));
33
+ module.exports = __toCommonJS(parcel_client_exports);
34
+ var https = __toESM(require("node:https"));
38
35
  const API_BASE = "https://api.parcel.app/external";
39
- const REQUEST_TIMEOUT = 15_000;
40
- /** HTTP client for the parcel.app API */
36
+ const REQUEST_TIMEOUT = 15e3;
41
37
  class ParcelClient {
42
- apiKey;
43
- carrierCache = null;
44
- /** @param apiKey The parcel.app API key */
45
- constructor(apiKey) {
46
- this.apiKey = apiKey;
47
- }
48
- /**
49
- * Fetch deliveries from parcel.app.
50
- *
51
- * @param filterMode Filter active or recent deliveries
52
- */
53
- async getDeliveries(filterMode = "active") {
54
- const response = await this.request("GET", `/deliveries/?filter_mode=${filterMode}`, true);
55
- if (!response.success) {
56
- const code = response.error_code || response.error_message || "UNKNOWN";
57
- const err = new Error(`API error: ${response.error_message || code}`);
58
- err.code = code === "INVALID_API_KEY" ? "INVALID_API_KEY" : "API_ERROR";
59
- throw err;
60
- }
61
- return response.deliveries || [];
38
+ apiKey;
39
+ carrierCache = null;
40
+ /** @param apiKey The parcel.app API key */
41
+ constructor(apiKey) {
42
+ this.apiKey = apiKey;
43
+ }
44
+ /**
45
+ * Fetch deliveries from parcel.app.
46
+ *
47
+ * @param filterMode Filter active or recent deliveries
48
+ */
49
+ async getDeliveries(filterMode = "active") {
50
+ const response = await this.request(
51
+ "GET",
52
+ `/deliveries/?filter_mode=${filterMode}`,
53
+ true
54
+ );
55
+ if (!response.success) {
56
+ const code = response.error_code || response.error_message || "UNKNOWN";
57
+ const err = new Error(
58
+ `API error: ${response.error_message || code}`
59
+ );
60
+ err.code = code === "INVALID_API_KEY" ? "INVALID_API_KEY" : "API_ERROR";
61
+ throw err;
62
62
  }
63
- /**
64
- * Add a new delivery to parcel.app.
65
- *
66
- * @param delivery The delivery to add
67
- */
68
- async addDelivery(delivery) {
69
- return this.request("POST", "/add-delivery/", true, delivery);
63
+ return response.deliveries || [];
64
+ }
65
+ /**
66
+ * Add a new delivery to parcel.app.
67
+ *
68
+ * @param delivery The delivery to add
69
+ */
70
+ async addDelivery(delivery) {
71
+ return this.request(
72
+ "POST",
73
+ "/add-delivery/",
74
+ true,
75
+ delivery
76
+ );
77
+ }
78
+ /** Get carrier names (cached after first call) */
79
+ async getCarrierNames() {
80
+ if (this.carrierCache) {
81
+ return this.carrierCache;
70
82
  }
71
- /** Get carrier names (cached after first call) */
72
- async getCarrierNames() {
73
- if (this.carrierCache) {
74
- return this.carrierCache;
75
- }
76
- try {
77
- this.carrierCache = await this.request("GET", "/supported_carriers.json", false);
78
- }
79
- catch {
80
- // Return empty map but don't cache it — allow retry next time
81
- return {};
82
- }
83
- return this.carrierCache;
83
+ try {
84
+ this.carrierCache = await this.request(
85
+ "GET",
86
+ "/supported_carriers.json",
87
+ false
88
+ );
89
+ } catch {
90
+ return {};
84
91
  }
85
- /**
86
- * Resolve a carrier code to a display name.
87
- *
88
- * @param carrierCode The carrier code from API
89
- */
90
- async getCarrierName(carrierCode) {
91
- const carriers = await this.getCarrierNames();
92
- return carriers[carrierCode] || carrierCode.toUpperCase();
93
- }
94
- /** Test if the API key is valid */
95
- async testConnection() {
96
- try {
97
- await this.getDeliveries("active");
98
- return { success: true, message: "Connection successful" };
99
- }
100
- catch (err) {
101
- const error = err;
102
- if (error.code === "INVALID_API_KEY") {
103
- return { success: false, message: "Invalid API key" };
104
- }
105
- return { success: false, message: error.message };
106
- }
92
+ return this.carrierCache;
93
+ }
94
+ /**
95
+ * Resolve a carrier code to a display name.
96
+ *
97
+ * @param carrierCode The carrier code from API
98
+ */
99
+ async getCarrierName(carrierCode) {
100
+ const carriers = await this.getCarrierNames();
101
+ return carriers[carrierCode] || carrierCode.toUpperCase();
102
+ }
103
+ /** Test if the API key is valid */
104
+ async testConnection() {
105
+ try {
106
+ await this.getDeliveries("active");
107
+ return { success: true, message: "Connection successful" };
108
+ } catch (err) {
109
+ const error = err;
110
+ if (error.code === "INVALID_API_KEY") {
111
+ return { success: false, message: "Invalid API key" };
112
+ }
113
+ return { success: false, message: error.message };
107
114
  }
108
- /**
109
- * Execute an HTTP request against the parcel.app API.
110
- *
111
- * @param method HTTP method
112
- * @param path API path
113
- * @param authenticated Whether to send the API key
114
- * @param body Optional request body
115
- */
116
- request(method, path, authenticated, body) {
117
- return new Promise((resolve, reject) => {
118
- const url = new URL(`${API_BASE}${path}`);
119
- const headers = {};
120
- if (authenticated) {
121
- headers["api-key"] = this.apiKey;
115
+ }
116
+ /**
117
+ * Execute an HTTP request against the parcel.app API.
118
+ *
119
+ * @param method HTTP method
120
+ * @param path API path
121
+ * @param authenticated Whether to send the API key
122
+ * @param body Optional request body
123
+ */
124
+ request(method, path, authenticated, body) {
125
+ return new Promise((resolve, reject) => {
126
+ const url = new URL(`${API_BASE}${path}`);
127
+ const headers = {};
128
+ if (authenticated) {
129
+ headers["api-key"] = this.apiKey;
130
+ }
131
+ if (body) {
132
+ headers["Content-Type"] = "application/json";
133
+ }
134
+ const options = {
135
+ hostname: url.hostname,
136
+ port: url.port || 443,
137
+ path: url.pathname + url.search,
138
+ method,
139
+ headers,
140
+ timeout: REQUEST_TIMEOUT
141
+ };
142
+ const req = https.request(options, (res) => {
143
+ const chunks = [];
144
+ res.on("data", (chunk) => chunks.push(chunk));
145
+ res.on("end", () => {
146
+ const raw = Buffer.concat(chunks).toString("utf-8");
147
+ if (res.statusCode && (res.statusCode < 200 || res.statusCode >= 300)) {
148
+ if (res.statusCode === 429) {
149
+ const retryAfter = parseInt(res.headers["retry-after"] || "", 10);
150
+ const err2 = new Error("Rate limit exceeded");
151
+ err2.code = "RATE_LIMITED";
152
+ err2.retryAfterSeconds = retryAfter > 0 ? retryAfter : 5 * 60;
153
+ reject(err2);
154
+ return;
122
155
  }
123
- if (body) {
124
- headers["Content-Type"] = "application/json";
125
- }
126
- const options = {
127
- hostname: url.hostname,
128
- port: url.port || 443,
129
- path: url.pathname + url.search,
130
- method,
131
- headers,
132
- timeout: REQUEST_TIMEOUT,
133
- };
134
- const req = https.request(options, (res) => {
135
- const chunks = [];
136
- res.on("data", (chunk) => chunks.push(chunk));
137
- res.on("end", () => {
138
- const raw = Buffer.concat(chunks).toString("utf-8");
139
- if (res.statusCode &&
140
- (res.statusCode < 200 || res.statusCode >= 300)) {
141
- if (res.statusCode === 429) {
142
- const retryAfter = parseInt(res.headers["retry-after"] || "", 10);
143
- const err = new Error("Rate limit exceeded");
144
- err.code = "RATE_LIMITED";
145
- // Use Retry-After header or default to 5 minutes
146
- err.retryAfterSeconds = retryAfter > 0 ? retryAfter : 5 * 60;
147
- reject(err);
148
- return;
149
- }
150
- const err = new Error(`HTTP ${res.statusCode}: ${res.statusMessage}`);
151
- err.code =
152
- res.statusCode === 401 || res.statusCode === 403
153
- ? "INVALID_API_KEY"
154
- : "HTTP_ERROR";
155
- reject(err);
156
- return;
157
- }
158
- try {
159
- resolve(JSON.parse(raw));
160
- }
161
- catch {
162
- reject(new Error(`JSON parse error: ${raw.substring(0, 200)}`));
163
- }
164
- });
165
- });
166
- req.on("timeout", () => {
167
- req.destroy();
168
- reject(new Error("Request timeout"));
169
- });
170
- req.on("error", (err) => reject(err));
171
- if (body) {
172
- req.write(JSON.stringify(body));
173
- }
174
- req.end();
156
+ const err = new Error(
157
+ `HTTP ${res.statusCode}: ${res.statusMessage}`
158
+ );
159
+ err.code = res.statusCode === 401 || res.statusCode === 403 ? "INVALID_API_KEY" : "HTTP_ERROR";
160
+ reject(err);
161
+ return;
162
+ }
163
+ try {
164
+ resolve(JSON.parse(raw));
165
+ } catch {
166
+ reject(new Error(`JSON parse error: ${raw.substring(0, 200)}`));
167
+ }
175
168
  });
176
- }
169
+ });
170
+ req.on("timeout", () => {
171
+ req.destroy();
172
+ reject(new Error("Request timeout"));
173
+ });
174
+ req.on("error", (err) => reject(err));
175
+ if (body) {
176
+ req.write(JSON.stringify(body));
177
+ }
178
+ req.end();
179
+ });
180
+ }
177
181
  }
178
- exports.ParcelClient = ParcelClient;
182
+ // Annotate the CommonJS export names for ESM import in node:
183
+ 0 && (module.exports = {
184
+ ParcelClient
185
+ });
186
+ //# sourceMappingURL=parcel-client.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/lib/parcel-client.ts"],
4
+ "sourcesContent": ["import * as https from \"node:https\";\nimport type {\n ParcelApiResponse,\n ParcelDelivery,\n AddDeliveryRequest,\n AddDeliveryResponse,\n CarrierMap,\n} from \"./types\";\n\nconst API_BASE = \"https://api.parcel.app/external\";\nconst REQUEST_TIMEOUT = 15_000;\n\n/** HTTP client for the parcel.app API */\nexport class ParcelClient {\n private apiKey: string;\n private carrierCache: CarrierMap | null = null;\n\n /** @param apiKey The parcel.app API key */\n constructor(apiKey: string) {\n this.apiKey = apiKey;\n }\n\n /**\n * Fetch deliveries from parcel.app.\n *\n * @param filterMode Filter active or recent deliveries\n */\n async getDeliveries(\n filterMode: \"active\" | \"recent\" = \"active\",\n ): Promise<ParcelDelivery[]> {\n const response = await this.request<ParcelApiResponse>(\n \"GET\",\n `/deliveries/?filter_mode=${filterMode}`,\n true,\n );\n\n if (!response.success) {\n const code = response.error_code || response.error_message || \"UNKNOWN\";\n const err = new Error(\n `API error: ${response.error_message || code}`,\n ) as Error & {\n code: string;\n };\n err.code = code === \"INVALID_API_KEY\" ? \"INVALID_API_KEY\" : \"API_ERROR\";\n throw err;\n }\n\n return response.deliveries || [];\n }\n\n /**\n * Add a new delivery to parcel.app.\n *\n * @param delivery The delivery to add\n */\n async addDelivery(\n delivery: AddDeliveryRequest,\n ): Promise<AddDeliveryResponse> {\n return this.request<AddDeliveryResponse>(\n \"POST\",\n \"/add-delivery/\",\n true,\n delivery,\n );\n }\n\n /** Get carrier names (cached after first call) */\n async getCarrierNames(): Promise<CarrierMap> {\n if (this.carrierCache) {\n return this.carrierCache;\n }\n\n try {\n this.carrierCache = await this.request<CarrierMap>(\n \"GET\",\n \"/supported_carriers.json\",\n false,\n );\n } catch {\n // Return empty map but don't cache it \u2014 allow retry next time\n return {};\n }\n\n return this.carrierCache;\n }\n\n /**\n * Resolve a carrier code to a display name.\n *\n * @param carrierCode The carrier code from API\n */\n async getCarrierName(carrierCode: string): Promise<string> {\n const carriers = await this.getCarrierNames();\n return carriers[carrierCode] || carrierCode.toUpperCase();\n }\n\n /** Test if the API key is valid */\n async testConnection(): Promise<{ success: boolean; message: string }> {\n try {\n await this.getDeliveries(\"active\");\n return { success: true, message: \"Connection successful\" };\n } catch (err) {\n const error = err as Error & { code?: string };\n if (error.code === \"INVALID_API_KEY\") {\n return { success: false, message: \"Invalid API key\" };\n }\n return { success: false, message: error.message };\n }\n }\n\n /**\n * Execute an HTTP request against the parcel.app API.\n *\n * @param method HTTP method\n * @param path API path\n * @param authenticated Whether to send the API key\n * @param body Optional request body\n */\n private request<T>(\n method: string,\n path: string,\n authenticated: boolean,\n body?: unknown,\n ): Promise<T> {\n return new Promise((resolve, reject) => {\n const url = new URL(`${API_BASE}${path}`);\n\n const headers: Record<string, string> = {};\n if (authenticated) {\n headers[\"api-key\"] = this.apiKey;\n }\n if (body) {\n headers[\"Content-Type\"] = \"application/json\";\n }\n\n const options: https.RequestOptions = {\n hostname: url.hostname,\n port: url.port || 443,\n path: url.pathname + url.search,\n method,\n headers,\n timeout: REQUEST_TIMEOUT,\n };\n\n const req = https.request(options, (res) => {\n const chunks: Buffer[] = [];\n\n res.on(\"data\", (chunk: Buffer) => chunks.push(chunk));\n res.on(\"end\", () => {\n const raw = Buffer.concat(chunks).toString(\"utf-8\");\n\n if (\n res.statusCode &&\n (res.statusCode < 200 || res.statusCode >= 300)\n ) {\n if (res.statusCode === 429) {\n const retryAfter = parseInt(res.headers[\"retry-after\"] || \"\", 10);\n const err = new Error(\"Rate limit exceeded\") as Error & {\n code: string;\n retryAfterSeconds: number;\n };\n err.code = \"RATE_LIMITED\";\n // Use Retry-After header or default to 5 minutes\n err.retryAfterSeconds = retryAfter > 0 ? retryAfter : 5 * 60;\n reject(err);\n return;\n }\n const err = new Error(\n `HTTP ${res.statusCode}: ${res.statusMessage}`,\n ) as Error & { code: string };\n err.code =\n res.statusCode === 401 || res.statusCode === 403\n ? \"INVALID_API_KEY\"\n : \"HTTP_ERROR\";\n reject(err);\n return;\n }\n\n try {\n resolve(JSON.parse(raw) as T);\n } catch {\n reject(new Error(`JSON parse error: ${raw.substring(0, 200)}`));\n }\n });\n });\n\n req.on(\"timeout\", () => {\n req.destroy();\n reject(new Error(\"Request timeout\"));\n });\n\n req.on(\"error\", (err) => reject(err));\n\n if (body) {\n req.write(JSON.stringify(body));\n }\n req.end();\n });\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAuB;AASvB,MAAM,WAAW;AACjB,MAAM,kBAAkB;AAGjB,MAAM,aAAa;AAAA,EAChB;AAAA,EACA,eAAkC;AAAA;AAAA,EAG1C,YAAY,QAAgB;AAC1B,SAAK,SAAS;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,cACJ,aAAkC,UACP;AAC3B,UAAM,WAAW,MAAM,KAAK;AAAA,MAC1B;AAAA,MACA,4BAA4B,UAAU;AAAA,MACtC;AAAA,IACF;AAEA,QAAI,CAAC,SAAS,SAAS;AACrB,YAAM,OAAO,SAAS,cAAc,SAAS,iBAAiB;AAC9D,YAAM,MAAM,IAAI;AAAA,QACd,cAAc,SAAS,iBAAiB,IAAI;AAAA,MAC9C;AAGA,UAAI,OAAO,SAAS,oBAAoB,oBAAoB;AAC5D,YAAM;AAAA,IACR;AAEA,WAAO,SAAS,cAAc,CAAC;AAAA,EACjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,YACJ,UAC8B;AAC9B,WAAO,KAAK;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA;AAAA,EAGA,MAAM,kBAAuC;AAC3C,QAAI,KAAK,cAAc;AACrB,aAAO,KAAK;AAAA,IACd;AAEA,QAAI;AACF,WAAK,eAAe,MAAM,KAAK;AAAA,QAC7B;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF,QAAQ;AAEN,aAAO,CAAC;AAAA,IACV;AAEA,WAAO,KAAK;AAAA,EACd;AAAA;AAAA;AAAA;AA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