@certik/skynet 0.22.3 → 0.23.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/dist/deploy.js CHANGED
@@ -1,22 +1,3 @@
1
- // src/env.ts
2
- function ensureAndGet(envName, defaultValue) {
3
- return process.env[envName] || defaultValue;
4
- }
5
- function getEnvironment() {
6
- return ensureAndGet("SKYNET_ENVIRONMENT", "dev");
7
- }
8
- function getEnvOrThrow(envName) {
9
- if (!process.env[envName]) {
10
- throw new Error(`Must set environment variable ${envName}`);
11
- }
12
- return process.env[envName];
13
- }
14
- function isProduction() {
15
- return getEnvironment() === "prd";
16
- }
17
- function isDev() {
18
- return getEnvironment() === "dev";
19
- }
20
1
  // src/selector.ts
21
2
  function getSelectorDesc(selector) {
22
3
  return Object.keys(selector).map((name) => {
@@ -55,6 +36,25 @@ function getJobName(name, selectorFlags, mode) {
55
36
  }
56
37
  return jobName;
57
38
  }
39
+ // src/env.ts
40
+ function ensureAndGet(envName, defaultValue) {
41
+ return process.env[envName] || defaultValue;
42
+ }
43
+ function getEnvironment() {
44
+ return ensureAndGet("SKYNET_ENVIRONMENT", "dev");
45
+ }
46
+ function getEnvOrThrow(envName) {
47
+ if (!process.env[envName]) {
48
+ throw new Error(`Must set environment variable ${envName}`);
49
+ }
50
+ return process.env[envName];
51
+ }
52
+ function isProduction() {
53
+ return getEnvironment() === "prd";
54
+ }
55
+ function isDev() {
56
+ return getEnvironment() === "dev";
57
+ }
58
58
  // src/cli.ts
59
59
  import path from "path";
60
60
  import fs from "fs";
@@ -424,7 +424,6 @@ ${getSelectorDesc(selector)}
424
424
  `, {
425
425
  importMeta: import.meta,
426
426
  description: false,
427
- version: false,
428
427
  flags: {
429
428
  ...getSelectorFlags(selector),
430
429
  mode: {
@@ -547,7 +546,6 @@ ${getSelectorDesc(selector)}
547
546
  `, {
548
547
  importMeta: import.meta,
549
548
  description: false,
550
- version: false,
551
549
  flags: {
552
550
  ...getSelectorFlags(selector),
553
551
  schedule: {
package/dist/dynamodb.js CHANGED
@@ -1,25 +1,3 @@
1
- // src/util.ts
2
- function range(startAt, endAt, step) {
3
- const arr = [];
4
- for (let i = startAt;i <= endAt; i += step) {
5
- arr.push([i, Math.min(endAt, i + step - 1)]);
6
- }
7
- return arr;
8
- }
9
- function arrayGroup(array, groupSize) {
10
- const groups = [];
11
- for (let i = 0;i < array.length; i += groupSize) {
12
- groups.push(array.slice(i, i + groupSize));
13
- }
14
- return groups;
15
- }
16
- function fillRange(start, end) {
17
- const result = [];
18
- for (let i = start;i <= end; i++) {
19
- result.push(i);
20
- }
21
- return result;
22
- }
23
1
  // src/object-hash.ts
24
2
  import xh from "@node-rs/xxhash";
25
3
  function getHash(obj) {
@@ -146,6 +124,28 @@ function memoize(func, options) {
146
124
  }
147
125
  return pMemoize(func, options);
148
126
  }
127
+ // src/util.ts
128
+ function range(startAt, endAt, step) {
129
+ const arr = [];
130
+ for (let i = startAt;i <= endAt; i += step) {
131
+ arr.push([i, Math.min(endAt, i + step - 1)]);
132
+ }
133
+ return arr;
134
+ }
135
+ function arrayGroup(array, groupSize) {
136
+ const groups = [];
137
+ for (let i = 0;i < array.length; i += groupSize) {
138
+ groups.push(array.slice(i, i + groupSize));
139
+ }
140
+ return groups;
141
+ }
142
+ function fillRange(start, end) {
143
+ const result = [];
144
+ for (let i = start;i <= end; i++) {
145
+ result.push(i);
146
+ }
147
+ return result;
148
+ }
149
149
  // src/dynamodb.ts
150
150
  import {
151
151
  DynamoDBDocumentClient,
@@ -0,0 +1,19 @@
1
+ export type GoAlertAction = "close";
2
+ export interface GoAlertGenericIncomingRequest {
3
+ /** Short description of the alert sent as SMS and voice. */
4
+ summary: string;
5
+ /** Additional information about the alert, supports markdown. */
6
+ details?: string;
7
+ /** If set to `close`, it will close any matching alerts. */
8
+ action?: GoAlertAction;
9
+ /** All calls for the same service with the same `dedup` string will update the same alert (if open) or create a new one. Defaults to using summary & details together. */
10
+ dedup?: string;
11
+ }
12
+ export interface GoAlertSendOptions {
13
+ url?: string;
14
+ }
15
+ export interface GoAlertSendResult {
16
+ ok: boolean;
17
+ status: number;
18
+ }
19
+ export declare function sendGoAlertAlert(body: GoAlertGenericIncomingRequest, options?: GoAlertSendOptions): Promise<GoAlertSendResult>;
@@ -0,0 +1,43 @@
1
+ // src/goalert.ts
2
+ function getGoAlertUrl(url) {
3
+ return url || process.env["SKYNET_GOALERT_URL"];
4
+ }
5
+ async function sendGoAlertAlert(body, options = {}) {
6
+ if (!body?.summary) {
7
+ throw new Error("missing GoAlert summary");
8
+ }
9
+ const url = getGoAlertUrl(options.url);
10
+ if (!url) {
11
+ throw new Error("missing SKYNET_GOALERT_URL");
12
+ }
13
+ const response = await fetch(url, {
14
+ method: "POST",
15
+ headers: {
16
+ "Content-Type": "application/json"
17
+ },
18
+ body: JSON.stringify(body)
19
+ });
20
+ let parsed = undefined;
21
+ const contentType = response.headers.get("content-type") || "";
22
+ try {
23
+ if (contentType.includes("application/json")) {
24
+ parsed = await response.json();
25
+ } else {
26
+ const text = await response.text();
27
+ parsed = text.length ? text : undefined;
28
+ }
29
+ } catch {
30
+ parsed = undefined;
31
+ }
32
+ if (!response.ok) {
33
+ const extra = typeof parsed === "string" && parsed ? `: ${parsed}` : "";
34
+ throw new Error(`GoAlert API error ${response.status}${extra}`);
35
+ }
36
+ return {
37
+ ok: response.ok,
38
+ status: response.status
39
+ };
40
+ }
41
+ export {
42
+ sendGoAlertAlert
43
+ };
package/dist/indexer.js CHANGED
@@ -1,3 +1,41 @@
1
+ // src/selector.ts
2
+ function getSelectorDesc(selector) {
3
+ return Object.keys(selector).map((name) => {
4
+ return ` --${name.padEnd(14)}${selector[name].desc || selector[name].description || ""}`;
5
+ }).join(`
6
+ `);
7
+ }
8
+ function getSelectorFlags(selector) {
9
+ return Object.keys(selector).reduce((acc, name) => {
10
+ const flag = {
11
+ type: selector[name].type || "string",
12
+ ...selector[name]
13
+ };
14
+ if (!selector[name].optional && selector[name].isRequired !== false) {
15
+ flag.isRequired = true;
16
+ }
17
+ return { ...acc, [name]: flag };
18
+ }, {});
19
+ }
20
+ function toSelectorString(selectorFlags, delim = ",") {
21
+ return Object.keys(selectorFlags).sort().map((flag) => {
22
+ return `${flag}=${selectorFlags[flag]}`;
23
+ }).join(delim);
24
+ }
25
+ function normalizeSelectorValue(v) {
26
+ return v.replace(/[^A-Za-z0-9]+/g, "-");
27
+ }
28
+ function getJobName(name, selectorFlags, mode) {
29
+ const selectorNamePart = Object.keys(selectorFlags).sort().map((name2) => selectorFlags[name2]).join("-");
30
+ let jobName = name;
31
+ if (mode) {
32
+ jobName += `-${mode}`;
33
+ }
34
+ if (selectorNamePart.length > 0) {
35
+ jobName += `-${normalizeSelectorValue(selectorNamePart)}`;
36
+ }
37
+ return jobName;
38
+ }
1
39
  // src/env.ts
2
40
  function ensureAndGet(envName, defaultValue) {
3
41
  return process.env[envName] || defaultValue;
@@ -17,56 +55,63 @@ function isProduction() {
17
55
  function isDev() {
18
56
  return getEnvironment() === "dev";
19
57
  }
20
- // src/util.ts
21
- function range(startAt, endAt, step) {
22
- const arr = [];
23
- for (let i = startAt;i <= endAt; i += step) {
24
- arr.push([i, Math.min(endAt, i + step - 1)]);
25
- }
26
- return arr;
58
+ // src/log.ts
59
+ function isObject(a) {
60
+ return !!a && a.constructor === Object;
27
61
  }
28
- function arrayGroup(array, groupSize) {
29
- const groups = [];
30
- for (let i = 0;i < array.length; i += groupSize) {
31
- groups.push(array.slice(i, i + groupSize));
62
+ function print(o) {
63
+ if (Array.isArray(o)) {
64
+ return `[${o.map(print).join(", ")}]`;
32
65
  }
33
- return groups;
34
- }
35
- function fillRange(start, end) {
36
- const result = [];
37
- for (let i = start;i <= end; i++) {
38
- result.push(i);
66
+ if (isObject(o)) {
67
+ return `{${Object.keys(o).map((k) => `${k}: ${o[k]}`).join(", ")}}`;
39
68
  }
40
- return result;
69
+ return `${o}`;
41
70
  }
42
- // src/date.ts
43
- var MS_IN_A_DAY = 3600 * 24 * 1000;
44
- function getDateOnly(date) {
45
- return new Date(date).toISOString().split("T")[0];
71
+ function getLine(params) {
72
+ let line = "";
73
+ for (let i = 0, l = params.length;i < l; i++) {
74
+ line += `${print(params[i])} `.replace(/\n/gm, "\t");
75
+ }
76
+ return line.trim();
46
77
  }
47
- function findDateAfter(date, n) {
48
- const d = new Date(date);
49
- const after = new Date(d.getTime() + MS_IN_A_DAY * n);
50
- return getDateOnly(after);
78
+ function timestamp() {
79
+ return new Date().toISOString();
51
80
  }
52
- function daysInRange(from, to) {
53
- const fromTime = new Date(from).getTime();
54
- const toTime = new Date(to).getTime();
55
- if (fromTime > toTime) {
56
- throw new Error(`range to date couldn't be earlier than range from date`);
81
+ var inline = {
82
+ debug: function(...args) {
83
+ if (true) {
84
+ console.log(`${timestamp()} ${getLine(args)}`);
85
+ }
86
+ },
87
+ log: function(...args) {
88
+ if (true) {
89
+ console.log(`${timestamp()} ${getLine(args)}`);
90
+ }
91
+ },
92
+ error: function(...args) {
93
+ if (true) {
94
+ console.error(`${timestamp()} ${getLine(args)}`);
95
+ }
57
96
  }
58
- const daysBetween = Math.floor((toTime - fromTime) / MS_IN_A_DAY);
59
- const dates = [getDateOnly(new Date(fromTime))];
60
- for (let i = 1;i <= daysBetween; i += 1) {
61
- dates.push(getDateOnly(new Date(fromTime + i * MS_IN_A_DAY)));
97
+ };
98
+ var logger = {
99
+ debug: function(...args) {
100
+ if (true) {
101
+ console.log(`[${timestamp()}]`, ...args);
102
+ }
103
+ },
104
+ log: function(...args) {
105
+ if (true) {
106
+ console.log(`[${timestamp()}]`, ...args);
107
+ }
108
+ },
109
+ error: function(...args) {
110
+ if (true) {
111
+ console.error(`[${timestamp()}]`, ...args);
112
+ }
62
113
  }
63
- return dates;
64
- }
65
- function dateRange(from, to, step) {
66
- const days = daysInRange(from, to);
67
- const windows = arrayGroup(days, step);
68
- return windows.map((w) => [w[0], w[w.length - 1]]);
69
- }
114
+ };
70
115
  // src/object-hash.ts
71
116
  import xh from "@node-rs/xxhash";
72
117
  function getHash(obj) {
@@ -193,63 +238,28 @@ function memoize(func, options) {
193
238
  }
194
239
  return pMemoize(func, options);
195
240
  }
196
- // src/log.ts
197
- function isObject(a) {
198
- return !!a && a.constructor === Object;
199
- }
200
- function print(o) {
201
- if (Array.isArray(o)) {
202
- return `[${o.map(print).join(", ")}]`;
203
- }
204
- if (isObject(o)) {
205
- return `{${Object.keys(o).map((k) => `${k}: ${o[k]}`).join(", ")}}`;
241
+ // src/util.ts
242
+ function range(startAt, endAt, step) {
243
+ const arr = [];
244
+ for (let i = startAt;i <= endAt; i += step) {
245
+ arr.push([i, Math.min(endAt, i + step - 1)]);
206
246
  }
207
- return `${o}`;
247
+ return arr;
208
248
  }
209
- function getLine(params) {
210
- let line = "";
211
- for (let i = 0, l = params.length;i < l; i++) {
212
- line += `${print(params[i])} `.replace(/\n/gm, "\t");
249
+ function arrayGroup(array, groupSize) {
250
+ const groups = [];
251
+ for (let i = 0;i < array.length; i += groupSize) {
252
+ groups.push(array.slice(i, i + groupSize));
213
253
  }
214
- return line.trim();
215
- }
216
- function timestamp() {
217
- return new Date().toISOString();
254
+ return groups;
218
255
  }
219
- var inline = {
220
- debug: function(...args) {
221
- if (true) {
222
- console.log(`${timestamp()} ${getLine(args)}`);
223
- }
224
- },
225
- log: function(...args) {
226
- if (true) {
227
- console.log(`${timestamp()} ${getLine(args)}`);
228
- }
229
- },
230
- error: function(...args) {
231
- if (true) {
232
- console.error(`${timestamp()} ${getLine(args)}`);
233
- }
234
- }
235
- };
236
- var logger = {
237
- debug: function(...args) {
238
- if (true) {
239
- console.log(`[${timestamp()}]`, ...args);
240
- }
241
- },
242
- log: function(...args) {
243
- if (true) {
244
- console.log(`[${timestamp()}]`, ...args);
245
- }
246
- },
247
- error: function(...args) {
248
- if (true) {
249
- console.error(`[${timestamp()}]`, ...args);
250
- }
256
+ function fillRange(start, end) {
257
+ const result = [];
258
+ for (let i = start;i <= end; i++) {
259
+ result.push(i);
251
260
  }
252
- };
261
+ return result;
262
+ }
253
263
  // src/dynamodb.ts
254
264
  import {
255
265
  DynamoDBDocumentClient,
@@ -564,44 +574,6 @@ async function deleteRecordsByHashKey(tableName, indexName, hashKeyValue, verbos
564
574
  }
565
575
  return totalDeleted;
566
576
  }
567
- // src/selector.ts
568
- function getSelectorDesc(selector) {
569
- return Object.keys(selector).map((name) => {
570
- return ` --${name.padEnd(14)}${selector[name].desc || selector[name].description || ""}`;
571
- }).join(`
572
- `);
573
- }
574
- function getSelectorFlags(selector) {
575
- return Object.keys(selector).reduce((acc, name) => {
576
- const flag = {
577
- type: selector[name].type || "string",
578
- ...selector[name]
579
- };
580
- if (!selector[name].optional && selector[name].isRequired !== false) {
581
- flag.isRequired = true;
582
- }
583
- return { ...acc, [name]: flag };
584
- }, {});
585
- }
586
- function toSelectorString(selectorFlags, delim = ",") {
587
- return Object.keys(selectorFlags).sort().map((flag) => {
588
- return `${flag}=${selectorFlags[flag]}`;
589
- }).join(delim);
590
- }
591
- function normalizeSelectorValue(v) {
592
- return v.replace(/[^A-Za-z0-9]+/g, "-");
593
- }
594
- function getJobName(name, selectorFlags, mode) {
595
- const selectorNamePart = Object.keys(selectorFlags).sort().map((name2) => selectorFlags[name2]).join("-");
596
- let jobName = name;
597
- if (mode) {
598
- jobName += `-${mode}`;
599
- }
600
- if (selectorNamePart.length > 0) {
601
- jobName += `-${normalizeSelectorValue(selectorNamePart)}`;
602
- }
603
- return jobName;
604
- }
605
577
  // src/cli.ts
606
578
  import path from "path";
607
579
  import fs from "fs";
@@ -637,6 +609,34 @@ function detectBin() {
637
609
  const wd = detectDirectory(process.argv[1], "package.json");
638
610
  return process.argv[1].slice(wd.length + path.sep.length).replace(path.sep, "/");
639
611
  }
612
+ // src/date.ts
613
+ var MS_IN_A_DAY = 3600 * 24 * 1000;
614
+ function getDateOnly(date) {
615
+ return new Date(date).toISOString().split("T")[0];
616
+ }
617
+ function findDateAfter(date, n) {
618
+ const d = new Date(date);
619
+ const after = new Date(d.getTime() + MS_IN_A_DAY * n);
620
+ return getDateOnly(after);
621
+ }
622
+ function daysInRange(from, to) {
623
+ const fromTime = new Date(from).getTime();
624
+ const toTime = new Date(to).getTime();
625
+ if (fromTime > toTime) {
626
+ throw new Error(`range to date couldn't be earlier than range from date`);
627
+ }
628
+ const daysBetween = Math.floor((toTime - fromTime) / MS_IN_A_DAY);
629
+ const dates = [getDateOnly(new Date(fromTime))];
630
+ for (let i = 1;i <= daysBetween; i += 1) {
631
+ dates.push(getDateOnly(new Date(fromTime + i * MS_IN_A_DAY)));
632
+ }
633
+ return dates;
634
+ }
635
+ function dateRange(from, to, step) {
636
+ const days = daysInRange(from, to);
637
+ const windows = arrayGroup(days, step);
638
+ return windows.map((w) => [w[0], w[w.length - 1]]);
639
+ }
640
640
  // src/indexer.ts
641
641
  import meow from "meow";
642
642
  var STATE_TABLE_NAME = "skynet-" + getEnvironment() + "-indexer-state";
@@ -996,7 +996,6 @@ ${selector ? getSelectorDesc(selector) : ""}
996
996
  `, {
997
997
  importMeta: import.meta,
998
998
  description: false,
999
- version: false,
1000
999
  flags: {
1001
1000
  ...getSelectorFlags(selector),
1002
1001
  mode: {
@@ -1050,7 +1049,6 @@ ${selector ? getSelectorDesc(selector) : ""}
1050
1049
  `, {
1051
1050
  importMeta: import.meta,
1052
1051
  description: false,
1053
- version: false,
1054
1052
  flags: {
1055
1053
  ...getSelectorFlags(selector),
1056
1054
  verbose: {
package/dist/slack.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import type { ChatPostMessageArguments } from "@slack/web-api";
2
2
  declare function postMessageToConversation({ conversationId, message, token, verbose, }: {
3
3
  conversationId: string;
4
- message: string | Partial<ChatPostMessageArguments>;
4
+ message: string | ChatPostMessageArguments;
5
5
  token?: string;
6
6
  verbose?: boolean;
7
7
  }): Promise<void>;
8
8
  export { postMessageToConversation };
9
+ export type { ChatPostMessageArguments };
package/examples/api.ts CHANGED
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@certik/skynet",
3
- "version": "0.22.3",
3
+ "version": "0.23.0",
4
4
  "description": "Skynet Shared JS library",
5
5
  "type": "module",
6
6
  "exports": {
@@ -52,6 +52,10 @@
52
52
  "import": "./dist/env.js",
53
53
  "types": "./dist/env.d.ts"
54
54
  },
55
+ "./goalert": {
56
+ "import": "./dist/goalert.js",
57
+ "types": "./dist/goalert.d.ts"
58
+ },
55
59
  "./graphql": {
56
60
  "import": "./dist/graphql.js",
57
61
  "types": "./dist/graphql.d.ts"
@@ -68,10 +72,6 @@
68
72
  "import": "./dist/object-hash.js",
69
73
  "types": "./dist/object-hash.d.ts"
70
74
  },
71
- "./opsgenie": {
72
- "import": "./dist/opsgenie.js",
73
- "types": "./dist/opsgenie.d.ts"
74
- },
75
75
  "./por": {
76
76
  "import": "./dist/por.js",
77
77
  "types": "./dist/por.d.ts"
@@ -110,45 +110,46 @@
110
110
  "node": ">= 18"
111
111
  },
112
112
  "dependencies": {
113
- "@aws-sdk/client-dynamodb": "^3.758.0",
114
- "@aws-sdk/client-s3": "^3.758.0",
115
- "@aws-sdk/client-sqs": "^3.758.0",
116
- "@aws-sdk/lib-dynamodb": "^3.758.0",
117
- "@databricks/sql": "^1.9.0",
118
- "@elastic/elasticsearch": "^8.17.1",
113
+ "@aws-sdk/client-dynamodb": "^3.975.0",
114
+ "@aws-sdk/client-s3": "^3.975.0",
115
+ "@aws-sdk/client-sqs": "^3.975.0",
116
+ "@aws-sdk/lib-dynamodb": "^3.975.0",
117
+ "@databricks/sql": "^1.12.0",
118
+ "@elastic/elasticsearch": "^8.19.1",
119
119
  "@node-rs/xxhash": "^1.7.6",
120
- "@slack/web-api": "^6.13.0",
121
- "chalk": "^5.4.1",
122
- "execa": "^9.5.2",
123
- "express": "^4.21.2",
120
+ "@slack/web-api": "^7.13.0",
121
+ "chalk": "^5.6.2",
122
+ "execa": "^9.6.1",
123
+ "express": "^5.2.1",
124
124
  "md5": "^2.3.0",
125
- "meow": "^13.2.0",
126
- "p-memoize": "^7.1.1",
127
- "p-throttle": "^7.0.0",
128
- "quick-lru": "^7.0.0",
129
- "type-fest": "^4.35.0",
130
- "which": "^5.0.0"
125
+ "meow": "^14.0.0",
126
+ "p-memoize": "^8.0.0",
127
+ "p-throttle": "^8.1.0",
128
+ "quick-lru": "^7.3.0",
129
+ "type-fest": "^5.4.1",
130
+ "which": "^6.0.0"
131
131
  },
132
132
  "devDependencies": {
133
- "@eslint/js": "^9.21.0",
134
- "@types/bun": "^1.2.4",
135
- "@types/express": "^5.0.0",
136
- "@types/md5": "^2.3.5",
133
+ "@eslint/js": "^9.39.2",
134
+ "@types/bun": "^1.3.6",
135
+ "@types/express": "^5.0.6",
136
+ "@types/md5": "^2.3.6",
137
137
  "@types/which": "^3.0.4",
138
- "eslint": "^9.21.0",
139
- "eslint-plugin-import": "^2.31.0",
138
+ "eslint": "^9.39.2",
139
+ "eslint-plugin-import": "^2.32.0",
140
140
  "eslint-plugin-md": "^1.0.19",
141
- "eslint-plugin-prettier": "^5.2.3",
142
- "prettier": "^3.5.2",
143
- "rimraf": "^6.0.1",
144
- "typescript": "^5.8.2",
145
- "typescript-eslint": "^8.38.0"
141
+ "eslint-plugin-prettier": "^5.5.5",
142
+ "prettier": "^3.8.1",
143
+ "rimraf": "^6.1.2",
144
+ "typescript": "^5.9.3",
145
+ "typescript-eslint": "^8.53.1"
146
146
  },
147
147
  "license": "MIT",
148
148
  "publishConfig": {
149
149
  "access": "public"
150
150
  },
151
151
  "patchedDependencies": {
152
- "@databricks/sql@1.9.0": "patches/@databricks%2Fsql@1.9.0.patch"
152
+ "@databricks/sql@1.9.0": "patches/@databricks%2Fsql@1.9.0.patch",
153
+ "@databricks/sql@1.12.0": "patches/@databricks%2Fsql@1.12.0.patch"
153
154
  }
154
155
  }
@@ -0,0 +1,31 @@
1
+ diff --git a/dist/utils/lz4.js b/dist/utils/lz4.js
2
+ index 5f067ab1c3bdf1430deabf488c8259a804dd33f8..fe440516e86f428446afe3c78ab0211a5a5b139c 100644
3
+ --- a/dist/utils/lz4.js
4
+ +++ b/dist/utils/lz4.js
5
+ @@ -1,25 +1,7 @@
6
+ "use strict";
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ function tryLoadLZ4Module() {
9
+ - try {
10
+ - return require('lz4'); // eslint-disable-line global-require
11
+ - }
12
+ - catch (err) {
13
+ - if (!(err instanceof Error) || !('code' in err)) {
14
+ - console.warn('Unexpected error loading LZ4 module: Invalid error object', err);
15
+ - return undefined;
16
+ - }
17
+ - if (err.code === 'MODULE_NOT_FOUND') {
18
+ - return undefined;
19
+ - }
20
+ - if (err.code === 'ERR_DLOPEN_FAILED') {
21
+ - console.warn('LZ4 native module failed to load: Architecture or version mismatch', err);
22
+ - return undefined;
23
+ - }
24
+ - // If it's not a known error, return undefined
25
+ - console.warn('Unknown error loading LZ4 module: Unhandled error code', err);
26
+ - return undefined;
27
+ - }
28
+ + return undefined;
29
+ }
30
+ exports.default = tryLoadLZ4Module();
31
+ //# sourceMappingURL=lz4.js.map
package/src/api.ts CHANGED
@@ -156,7 +156,6 @@ ${getSelectorDesc(selector)}
156
156
  {
157
157
  importMeta: import.meta,
158
158
  description: false,
159
- version: false,
160
159
  flags: {
161
160
  ...getSelectorFlags(selector),
162
161
  verbose: {
package/src/deploy.ts CHANGED
@@ -491,7 +491,6 @@ ${getSelectorDesc(selector)}
491
491
  {
492
492
  importMeta: import.meta,
493
493
  description: false,
494
- version: false,
495
494
  flags: {
496
495
  ...getSelectorFlags(selector),
497
496
  mode: {
@@ -655,7 +654,6 @@ ${getSelectorDesc(selector)}
655
654
  {
656
655
  importMeta: import.meta,
657
656
  description: false,
658
- version: false,
659
657
  flags: {
660
658
  ...getSelectorFlags(selector),
661
659
  schedule: {