@milaboratories/pframes-rs-node 1.1.18 → 1.1.24

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.
@@ -0,0 +1,23 @@
1
+ //#region \0rolldown/runtime.js
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 __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
+ key = keys[i];
11
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
+ get: ((k) => from[k]).bind(null, key),
13
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
+ });
15
+ }
16
+ return to;
17
+ };
18
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
19
+ value: mod,
20
+ enumerable: true
21
+ }) : target, mod));
22
+ //#endregion
23
+ exports.__toESM = __toESM;
@@ -1,24 +1,16 @@
1
- 'use strict';
2
-
3
- var node_module = require('node:module');
4
- var node_path = require('node:path');
5
- var node_url = require('node:url');
6
- var gyp = require('@mapbox/node-pre-gyp');
7
-
8
- var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
9
- const nodeFileUrl = (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('addon.cjs', document.baseURI).href));
10
- const nodeDirname = node_path.dirname(node_url.fileURLToPath(nodeFileUrl));
11
- const nodeRequire = node_module.createRequire(nodeFileUrl);
12
- const { find: findAddon } = gyp;
13
- // Pre-gyp reads binary section from package.json and constructs a path to addon
14
- // https://github.com/mapbox/node-pre-gyp/blob/a541932680034f5de9e7365ef8d9a0d7a11cc1a9/lib/package.js#L35
15
- // Require calls dlopen under the hood
16
- // https://nodejs.org/api/process.html#processdlopenmodule-filename-flags
17
- // DLOpen then searches for napi_register_module_v1 in addon export table
18
- // https://github.com/search?q=repo%3Anodejs%2Fnode%20NAPI_MODULE_INITIALIZER&type=code
19
- // And neon exports napi_register_module_v1 from #[neon::main]
20
- // https://github.com/neon-bindings/neon/blob/b1728fa21e968ccde9611ac9955cf6d638be16e6/crates/neon/src/context/internal.rs#L76
21
- const AddonSymbol = nodeRequire(findAddon(node_path.resolve(nodeDirname, "../package.json")));
22
-
1
+ const require_runtime = require("./_virtual/_rolldown/runtime.cjs");
2
+ let node_module = require("node:module");
3
+ let node_path = require("node:path");
4
+ let node_url = require("node:url");
5
+ let _mapbox_node_pre_gyp = require("@mapbox/node-pre-gyp");
6
+ _mapbox_node_pre_gyp = require_runtime.__toESM(_mapbox_node_pre_gyp, 1);
7
+ //#region export/addon.ts
8
+ const nodeFileUrl = require("url").pathToFileURL(__filename).href;
9
+ const nodeDirname = (0, node_path.dirname)((0, node_url.fileURLToPath)(nodeFileUrl));
10
+ const nodeRequire = (0, node_module.createRequire)(nodeFileUrl);
11
+ const { find: findAddon } = _mapbox_node_pre_gyp.default;
12
+ const AddonSymbol = nodeRequire(findAddon((0, node_path.resolve)(nodeDirname, "../package.json")));
13
+ //#endregion
23
14
  exports.AddonSymbol = AddonSymbol;
24
- //# sourceMappingURL=addon.cjs.map
15
+
16
+ //# sourceMappingURL=addon.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"addon.cjs","sources":["../export/addon.ts"],"sourcesContent":["import { createRequire } from \"node:module\";\nimport { dirname, resolve } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport gyp from \"@mapbox/node-pre-gyp\";\nimport type { AddonSymbol } from \"./addon-def\";\n\nconst nodeFileUrl = import.meta.url;\nconst nodeDirname = dirname(fileURLToPath(nodeFileUrl));\nconst nodeRequire = createRequire(nodeFileUrl);\n\nconst { find: findAddon } = gyp;\n\n// Pre-gyp reads binary section from package.json and constructs a path to addon\n// https://github.com/mapbox/node-pre-gyp/blob/a541932680034f5de9e7365ef8d9a0d7a11cc1a9/lib/package.js#L35\n// Require calls dlopen under the hood\n// https://nodejs.org/api/process.html#processdlopenmodule-filename-flags\n// DLOpen then searches for napi_register_module_v1 in addon export table\n// https://github.com/search?q=repo%3Anodejs%2Fnode%20NAPI_MODULE_INITIALIZER&type=code\n// And neon exports napi_register_module_v1 from #[neon::main]\n// https://github.com/neon-bindings/neon/blob/b1728fa21e968ccde9611ac9955cf6d638be16e6/crates/neon/src/context/internal.rs#L76\nconst AddonSymbol = nodeRequire(findAddon(resolve(nodeDirname, \"../package.json\"))) as AddonSymbol;\n\nexport { AddonSymbol };\n"],"names":["dirname","fileURLToPath","createRequire","resolve"],"mappings":";;;;;;;;AAMA,MAAM,WAAW,GAAG,2PAAe;AACnC,MAAM,WAAW,GAAGA,iBAAO,CAACC,sBAAa,CAAC,WAAW,CAAC,CAAC;AACvD,MAAM,WAAW,GAAGC,yBAAa,CAAC,WAAW,CAAC;AAE9C,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,GAAG;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,WAAW,GAAG,WAAW,CAAC,SAAS,CAACC,iBAAO,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC;;;;"}
1
+ {"version":3,"file":"addon.cjs","names":["gyp"],"sources":["../export/addon.ts"],"sourcesContent":["import { createRequire } from \"node:module\";\nimport { dirname, resolve } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport gyp from \"@mapbox/node-pre-gyp\";\nimport type { AddonSymbol } from \"./addon-def\";\n\nconst nodeFileUrl = import.meta.url;\nconst nodeDirname = dirname(fileURLToPath(nodeFileUrl));\nconst nodeRequire = createRequire(nodeFileUrl);\n\nconst { find: findAddon } = gyp;\n\n// Pre-gyp reads binary section from package.json and constructs a path to addon\n// https://github.com/mapbox/node-pre-gyp/blob/a541932680034f5de9e7365ef8d9a0d7a11cc1a9/lib/package.js#L35\n// Require calls dlopen under the hood\n// https://nodejs.org/api/process.html#processdlopenmodule-filename-flags\n// DLOpen then searches for napi_register_module_v1 in addon export table\n// https://github.com/search?q=repo%3Anodejs%2Fnode%20NAPI_MODULE_INITIALIZER&type=code\n// And neon exports napi_register_module_v1 from #[neon::main]\n// https://github.com/neon-bindings/neon/blob/b1728fa21e968ccde9611ac9955cf6d638be16e6/crates/neon/src/context/internal.rs#L76\nconst AddonSymbol = nodeRequire(findAddon(resolve(nodeDirname, \"../package.json\"))) as AddonSymbol;\n\nexport { AddonSymbol };\n"],"mappings":";;;;;;;AAMA,MAAM,cAAA,QAAA,MAAA,CAAA,cAAA,WAAA,CAAA;AACN,MAAM,eAAA,GAAA,UAAA,UAAA,GAAA,SAAA,eAAoC,YAAY,CAAC;AACvD,MAAM,eAAA,GAAA,YAAA,eAA4B,YAAY;AAE9C,MAAM,EAAE,MAAM,cAAcA,qBAAAA;AAU5B,MAAM,cAAc,YAAY,WAAA,GAAA,UAAA,SAAkB,aAAa,kBAAkB,CAAC,CAAC"}
@@ -1,21 +1,14 @@
1
- import { createRequire } from 'node:module';
2
- import { dirname, resolve } from 'node:path';
3
- import { fileURLToPath } from 'node:url';
4
- import gyp from '@mapbox/node-pre-gyp';
5
-
1
+ import { createRequire } from "node:module";
2
+ import { dirname, resolve } from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ import gyp from "@mapbox/node-pre-gyp";
5
+ //#region export/addon.ts
6
6
  const nodeFileUrl = import.meta.url;
7
7
  const nodeDirname = dirname(fileURLToPath(nodeFileUrl));
8
8
  const nodeRequire = createRequire(nodeFileUrl);
9
9
  const { find: findAddon } = gyp;
10
- // Pre-gyp reads binary section from package.json and constructs a path to addon
11
- // https://github.com/mapbox/node-pre-gyp/blob/a541932680034f5de9e7365ef8d9a0d7a11cc1a9/lib/package.js#L35
12
- // Require calls dlopen under the hood
13
- // https://nodejs.org/api/process.html#processdlopenmodule-filename-flags
14
- // DLOpen then searches for napi_register_module_v1 in addon export table
15
- // https://github.com/search?q=repo%3Anodejs%2Fnode%20NAPI_MODULE_INITIALIZER&type=code
16
- // And neon exports napi_register_module_v1 from #[neon::main]
17
- // https://github.com/neon-bindings/neon/blob/b1728fa21e968ccde9611ac9955cf6d638be16e6/crates/neon/src/context/internal.rs#L76
18
10
  const AddonSymbol = nodeRequire(findAddon(resolve(nodeDirname, "../package.json")));
19
-
11
+ //#endregion
20
12
  export { AddonSymbol };
21
- //# sourceMappingURL=addon.js.map
13
+
14
+ //# sourceMappingURL=addon.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"addon.js","sources":["../export/addon.ts"],"sourcesContent":["import { createRequire } from \"node:module\";\nimport { dirname, resolve } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport gyp from \"@mapbox/node-pre-gyp\";\nimport type { AddonSymbol } from \"./addon-def\";\n\nconst nodeFileUrl = import.meta.url;\nconst nodeDirname = dirname(fileURLToPath(nodeFileUrl));\nconst nodeRequire = createRequire(nodeFileUrl);\n\nconst { find: findAddon } = gyp;\n\n// Pre-gyp reads binary section from package.json and constructs a path to addon\n// https://github.com/mapbox/node-pre-gyp/blob/a541932680034f5de9e7365ef8d9a0d7a11cc1a9/lib/package.js#L35\n// Require calls dlopen under the hood\n// https://nodejs.org/api/process.html#processdlopenmodule-filename-flags\n// DLOpen then searches for napi_register_module_v1 in addon export table\n// https://github.com/search?q=repo%3Anodejs%2Fnode%20NAPI_MODULE_INITIALIZER&type=code\n// And neon exports napi_register_module_v1 from #[neon::main]\n// https://github.com/neon-bindings/neon/blob/b1728fa21e968ccde9611ac9955cf6d638be16e6/crates/neon/src/context/internal.rs#L76\nconst AddonSymbol = nodeRequire(findAddon(resolve(nodeDirname, \"../package.json\"))) as AddonSymbol;\n\nexport { AddonSymbol };\n"],"names":[],"mappings":";;;;;AAMA,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG;AACnC,MAAM,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;AACvD,MAAM,WAAW,GAAG,aAAa,CAAC,WAAW,CAAC;AAE9C,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,GAAG;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,WAAW,GAAG,WAAW,CAAC,SAAS,CAAC,OAAO,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC;;;;"}
1
+ {"version":3,"file":"addon.js","names":[],"sources":["../export/addon.ts"],"sourcesContent":["import { createRequire } from \"node:module\";\nimport { dirname, resolve } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport gyp from \"@mapbox/node-pre-gyp\";\nimport type { AddonSymbol } from \"./addon-def\";\n\nconst nodeFileUrl = import.meta.url;\nconst nodeDirname = dirname(fileURLToPath(nodeFileUrl));\nconst nodeRequire = createRequire(nodeFileUrl);\n\nconst { find: findAddon } = gyp;\n\n// Pre-gyp reads binary section from package.json and constructs a path to addon\n// https://github.com/mapbox/node-pre-gyp/blob/a541932680034f5de9e7365ef8d9a0d7a11cc1a9/lib/package.js#L35\n// Require calls dlopen under the hood\n// https://nodejs.org/api/process.html#processdlopenmodule-filename-flags\n// DLOpen then searches for napi_register_module_v1 in addon export table\n// https://github.com/search?q=repo%3Anodejs%2Fnode%20NAPI_MODULE_INITIALIZER&type=code\n// And neon exports napi_register_module_v1 from #[neon::main]\n// https://github.com/neon-bindings/neon/blob/b1728fa21e968ccde9611ac9955cf6d638be16e6/crates/neon/src/context/internal.rs#L76\nconst AddonSymbol = nodeRequire(findAddon(resolve(nodeDirname, \"../package.json\"))) as AddonSymbol;\n\nexport { AddonSymbol };\n"],"mappings":";;;;;AAMA,MAAM,cAAc,OAAO,KAAK;AAChC,MAAM,cAAc,QAAQ,cAAc,YAAY,CAAC;AACvD,MAAM,cAAc,cAAc,YAAY;AAE9C,MAAM,EAAE,MAAM,cAAc;AAU5B,MAAM,cAAc,YAAY,UAAU,QAAQ,aAAa,kBAAkB,CAAC,CAAC"}
@@ -1,190 +1,163 @@
1
- 'use strict';
2
-
3
- var node_crypto = require('node:crypto');
4
- var node_fs = require('node:fs');
5
- var node_path = require('node:path');
6
-
1
+ require("./_virtual/_rolldown/runtime.cjs");
2
+ let node_path = require("node:path");
3
+ let node_crypto = require("node:crypto");
4
+ let node_fs = require("node:fs");
5
+ //#region export/dump.ts
7
6
  function hashColumnId(columnId) {
8
- return node_crypto.createHash("sha256").update(columnId).digest("hex");
7
+ return (0, node_crypto.createHash)("sha256").update(columnId).digest("hex");
9
8
  }
10
9
  function hashTableColumnId(tableId) {
11
- if (tableId.type === "column") {
12
- return {
13
- ...tableId,
14
- id: hashColumnId(tableId.id),
15
- };
16
- }
17
- return tableId;
10
+ if (tableId.type === "column") return {
11
+ ...tableId,
12
+ id: hashColumnId(tableId.id)
13
+ };
14
+ return tableId;
18
15
  }
19
16
  function hashFilterColumnId(filter) {
20
- return {
21
- ...filter,
22
- column: hashTableColumnId(filter.column),
23
- };
17
+ return {
18
+ ...filter,
19
+ column: hashTableColumnId(filter.column)
20
+ };
24
21
  }
25
22
  function hashUniqueValuesRequestColumnId(request) {
26
- return {
27
- ...request,
28
- columnId: hashColumnId(request.columnId),
29
- filters: request.filters.map(hashFilterColumnId),
30
- };
23
+ return {
24
+ ...request,
25
+ columnId: hashColumnId(request.columnId),
26
+ filters: request.filters.map(hashFilterColumnId)
27
+ };
31
28
  }
32
29
  function hashSortingColumnId(sorting) {
33
- return {
34
- ...sorting,
35
- column: hashTableColumnId(sorting.column),
36
- };
30
+ return {
31
+ ...sorting,
32
+ column: hashTableColumnId(sorting.column)
33
+ };
37
34
  }
38
35
  function hashJoinEntryColumnId(entry) {
39
- const type = entry.type;
40
- switch (type) {
41
- case "column":
42
- return {
43
- ...entry,
44
- columnId: hashColumnId(entry.columnId),
45
- };
46
- case "slicedColumn":
47
- return {
48
- ...entry,
49
- columnId: hashColumnId(entry.columnId),
50
- newId: hashColumnId(entry.newId),
51
- };
52
- case "artificialColumn":
53
- return {
54
- ...entry,
55
- columnId: hashColumnId(entry.columnId),
56
- newId: hashColumnId(entry.newId),
57
- };
58
- case "inlineColumn":
59
- return {
60
- ...entry,
61
- newId: hashColumnId(entry.newId),
62
- };
63
- case "inner":
64
- return {
65
- ...entry,
66
- entries: entry.entries.map(hashJoinEntryColumnId),
67
- };
68
- case "full":
69
- return {
70
- ...entry,
71
- entries: entry.entries.map(hashJoinEntryColumnId),
72
- };
73
- case "outer":
74
- return {
75
- ...entry,
76
- primary: hashJoinEntryColumnId(entry.primary),
77
- secondary: entry.secondary.map(hashJoinEntryColumnId),
78
- };
79
- default:
80
- throw new Error(`Unsupported join entry type: ${type}`);
81
- }
36
+ const type = entry.type;
37
+ switch (type) {
38
+ case "column": return {
39
+ ...entry,
40
+ columnId: hashColumnId(entry.columnId)
41
+ };
42
+ case "slicedColumn": return {
43
+ ...entry,
44
+ columnId: hashColumnId(entry.columnId),
45
+ newId: hashColumnId(entry.newId)
46
+ };
47
+ case "artificialColumn": return {
48
+ ...entry,
49
+ columnId: hashColumnId(entry.columnId),
50
+ newId: hashColumnId(entry.newId)
51
+ };
52
+ case "inlineColumn": return {
53
+ ...entry,
54
+ newId: hashColumnId(entry.newId)
55
+ };
56
+ case "inner": return {
57
+ ...entry,
58
+ entries: entry.entries.map(hashJoinEntryColumnId)
59
+ };
60
+ case "full": return {
61
+ ...entry,
62
+ entries: entry.entries.map(hashJoinEntryColumnId)
63
+ };
64
+ case "outer": return {
65
+ ...entry,
66
+ primary: hashJoinEntryColumnId(entry.primary),
67
+ secondary: entry.secondary.map(hashJoinEntryColumnId)
68
+ };
69
+ default: throw new Error(`Unsupported join entry type: ${type}`);
70
+ }
82
71
  }
83
72
  function hashCreateTableRequestColumnId(request) {
84
- return {
85
- ...request,
86
- src: hashJoinEntryColumnId(request.src),
87
- filters: request.filters.map(hashFilterColumnId),
88
- };
73
+ return {
74
+ ...request,
75
+ src: hashJoinEntryColumnId(request.src),
76
+ filters: request.filters.map(hashFilterColumnId)
77
+ };
89
78
  }
90
79
  function hashTableColumnSpec(spec) {
91
- if (spec.type === "column") {
92
- return {
93
- ...spec,
94
- id: hashColumnId(spec.id),
95
- };
96
- }
97
- return spec;
80
+ if (spec.type === "column") return {
81
+ ...spec,
82
+ id: hashColumnId(spec.id)
83
+ };
84
+ return spec;
98
85
  }
99
86
  function hashDataQuery(query) {
100
- switch (query.type) {
101
- case "column":
102
- return {
103
- ...query,
104
- column: hashColumnId(query.column),
105
- };
106
- case "inlineColumn":
107
- return {
108
- ...query,
109
- spec: {
110
- ...query.spec,
111
- id: hashColumnId(query.spec.id),
112
- },
113
- };
114
- case "sparseToDenseColumn":
115
- return {
116
- ...query,
117
- column: hashColumnId(query.column),
118
- ...(query.specOverride
119
- ? {
120
- specOverride: {
121
- ...query.specOverride,
122
- id: hashColumnId(query.specOverride.id),
123
- },
124
- }
125
- : {}),
126
- };
127
- case "innerJoin":
128
- case "fullJoin":
129
- return {
130
- ...query,
131
- entries: query.entries.map((e) => ({
132
- ...e,
133
- entry: hashDataQuery(e.entry),
134
- })),
135
- };
136
- case "outerJoin":
137
- return {
138
- ...query,
139
- primary: {
140
- ...query.primary,
141
- entry: hashDataQuery(query.primary.entry),
142
- },
143
- secondary: query.secondary.map((e) => ({
144
- ...e,
145
- entry: hashDataQuery(e.entry),
146
- })),
147
- };
148
- case "sliceAxes":
149
- return {
150
- ...query,
151
- input: hashDataQuery(query.input),
152
- };
153
- case "sort":
154
- return {
155
- ...query,
156
- input: hashDataQuery(query.input),
157
- };
158
- case "filter":
159
- return {
160
- ...query,
161
- input: hashDataQuery(query.input),
162
- };
163
- }
87
+ switch (query.type) {
88
+ case "column": return {
89
+ ...query,
90
+ column: hashColumnId(query.column)
91
+ };
92
+ case "inlineColumn": return {
93
+ ...query,
94
+ spec: {
95
+ ...query.spec,
96
+ id: hashColumnId(query.spec.id)
97
+ }
98
+ };
99
+ case "sparseToDenseColumn": return {
100
+ ...query,
101
+ column: hashColumnId(query.column),
102
+ ...query.specOverride ? { specOverride: {
103
+ ...query.specOverride,
104
+ id: hashColumnId(query.specOverride.id)
105
+ } } : {}
106
+ };
107
+ case "innerJoin":
108
+ case "fullJoin": return {
109
+ ...query,
110
+ entries: query.entries.map((e) => ({
111
+ ...e,
112
+ entry: hashDataQuery(e.entry)
113
+ }))
114
+ };
115
+ case "outerJoin": return {
116
+ ...query,
117
+ primary: {
118
+ ...query.primary,
119
+ entry: hashDataQuery(query.primary.entry)
120
+ },
121
+ secondary: query.secondary.map((e) => ({
122
+ ...e,
123
+ entry: hashDataQuery(e.entry)
124
+ }))
125
+ };
126
+ case "sliceAxes": return {
127
+ ...query,
128
+ input: hashDataQuery(query.input)
129
+ };
130
+ case "sort": return {
131
+ ...query,
132
+ input: hashDataQuery(query.input)
133
+ };
134
+ case "filter": return {
135
+ ...query,
136
+ input: hashDataQuery(query.input)
137
+ };
138
+ }
164
139
  }
165
140
  function hashCreateTableV2RequestColumnId(request) {
166
- return {
167
- ...request,
168
- tableSpec: request.tableSpec.map(hashTableColumnSpec),
169
- dataQuery: hashDataQuery(request.dataQuery),
170
- };
141
+ return {
142
+ ...request,
143
+ tableSpec: request.tableSpec.map(hashTableColumnSpec),
144
+ dataQuery: hashDataQuery(request.dataQuery)
145
+ };
171
146
  }
172
147
  async function dump(relativePath, data, logger) {
173
- if (!process.env.MI_DUMP_PFRAMES_RS)
174
- return;
175
- try {
176
- const relativeUri = relativePath.map((part) => encodeURIComponent(part));
177
- const fileDir = node_path.join(process.env.MI_DUMP_PFRAMES_RS, ...relativeUri.slice(0, -1));
178
- await node_fs.promises.mkdir(fileDir, { recursive: true });
179
- const filePath = node_path.join(process.env.MI_DUMP_PFRAMES_RS, ...relativeUri);
180
- const fileData = ArrayBuffer.isView(data) ? data : JSON.stringify(data, null, 2);
181
- await node_fs.promises.writeFile(filePath, fileData, { flag: "wx" });
182
- }
183
- catch (error) {
184
- logger?.("warn", `error while dumping PFrames data: ${error}`);
185
- }
148
+ if (!process.env.MI_DUMP_PFRAMES_RS) return;
149
+ try {
150
+ const relativeUri = relativePath.map((part) => encodeURIComponent(part));
151
+ const fileDir = (0, node_path.join)(process.env.MI_DUMP_PFRAMES_RS, ...relativeUri.slice(0, -1));
152
+ await node_fs.promises.mkdir(fileDir, { recursive: true });
153
+ const filePath = (0, node_path.join)(process.env.MI_DUMP_PFRAMES_RS, ...relativeUri);
154
+ const fileData = ArrayBuffer.isView(data) ? data : JSON.stringify(data, null, 2);
155
+ await node_fs.promises.writeFile(filePath, fileData, { flag: "wx" });
156
+ } catch (error) {
157
+ logger?.("warn", `error while dumping PFrames data: ${error}`);
158
+ }
186
159
  }
187
-
160
+ //#endregion
188
161
  exports.dump = dump;
189
162
  exports.hashColumnId = hashColumnId;
190
163
  exports.hashCreateTableRequestColumnId = hashCreateTableRequestColumnId;
@@ -193,4 +166,5 @@ exports.hashFilterColumnId = hashFilterColumnId;
193
166
  exports.hashSortingColumnId = hashSortingColumnId;
194
167
  exports.hashTableColumnId = hashTableColumnId;
195
168
  exports.hashUniqueValuesRequestColumnId = hashUniqueValuesRequestColumnId;
196
- //# sourceMappingURL=dump.cjs.map
169
+
170
+ //# sourceMappingURL=dump.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"dump.cjs","sources":["../export/dump.ts"],"sourcesContent":["import { createHash } from \"node:crypto\";\nimport { promises as fs } from \"node:fs\";\nimport { join } from \"node:path\";\nimport type { PFrameInternal } from \"@milaboratories/pl-model-middle-layer\";\nimport type {\n PObjectId,\n PTableColumnId,\n PTableColumnSpec,\n PTableRecordFilter,\n PTableSorting,\n UniqueValuesRequest,\n DataQuery,\n} from \"@milaboratories/pl-model-common\";\n\nexport function hashColumnId(columnId: PObjectId): PObjectId {\n return createHash(\"sha256\").update(columnId).digest(\"hex\") as PObjectId;\n}\n\nexport function hashTableColumnId(tableId: PTableColumnId): PTableColumnId {\n if (tableId.type === \"column\") {\n return {\n ...tableId,\n id: hashColumnId(tableId.id),\n };\n }\n return tableId;\n}\n\nexport function hashFilterColumnId(filter: PTableRecordFilter): PTableRecordFilter {\n return {\n ...filter,\n column: hashTableColumnId(filter.column),\n };\n}\n\nexport function hashUniqueValuesRequestColumnId(request: UniqueValuesRequest): UniqueValuesRequest {\n return {\n ...request,\n columnId: hashColumnId(request.columnId),\n filters: request.filters.map(hashFilterColumnId),\n };\n}\n\nexport function hashSortingColumnId(sorting: PTableSorting): PTableSorting {\n return {\n ...sorting,\n column: hashTableColumnId(sorting.column),\n };\n}\n\nfunction hashJoinEntryColumnId(entry: PFrameInternal.JoinEntryV4): PFrameInternal.JoinEntryV4 {\n const type = entry.type;\n switch (type) {\n case \"column\":\n return {\n ...entry,\n columnId: hashColumnId(entry.columnId),\n };\n case \"slicedColumn\":\n return {\n ...entry,\n columnId: hashColumnId(entry.columnId),\n newId: hashColumnId(entry.newId),\n };\n case \"artificialColumn\":\n return {\n ...entry,\n columnId: hashColumnId(entry.columnId),\n newId: hashColumnId(entry.newId),\n };\n case \"inlineColumn\":\n return {\n ...entry,\n newId: hashColumnId(entry.newId),\n };\n case \"inner\":\n return {\n ...entry,\n entries: entry.entries.map(hashJoinEntryColumnId),\n };\n case \"full\":\n return {\n ...entry,\n entries: entry.entries.map(hashJoinEntryColumnId),\n };\n case \"outer\":\n return {\n ...entry,\n primary: hashJoinEntryColumnId(entry.primary),\n secondary: entry.secondary.map(hashJoinEntryColumnId),\n };\n default:\n throw new Error(`Unsupported join entry type: ${type}`);\n }\n}\n\nexport function hashCreateTableRequestColumnId(\n request: PFrameInternal.CreateTableRequestV4,\n): PFrameInternal.CreateTableRequestV4 {\n return {\n ...request,\n src: hashJoinEntryColumnId(request.src),\n filters: request.filters.map(hashFilterColumnId),\n };\n}\n\nfunction hashTableColumnSpec(spec: PTableColumnSpec): PTableColumnSpec {\n if (spec.type === \"column\") {\n return {\n ...spec,\n id: hashColumnId(spec.id),\n };\n }\n return spec;\n}\n\nfunction hashDataQuery(query: DataQuery): DataQuery {\n switch (query.type) {\n case \"column\":\n return {\n ...query,\n column: hashColumnId(query.column),\n };\n case \"inlineColumn\":\n return {\n ...query,\n spec: {\n ...query.spec,\n id: hashColumnId(query.spec.id),\n },\n };\n case \"sparseToDenseColumn\":\n return {\n ...query,\n column: hashColumnId(query.column),\n ...(query.specOverride\n ? {\n specOverride: {\n ...query.specOverride,\n id: hashColumnId(query.specOverride.id),\n },\n }\n : {}),\n };\n case \"innerJoin\":\n case \"fullJoin\":\n return {\n ...query,\n entries: query.entries.map((e) => ({\n ...e,\n entry: hashDataQuery(e.entry),\n })),\n };\n case \"outerJoin\":\n return {\n ...query,\n primary: {\n ...query.primary,\n entry: hashDataQuery(query.primary.entry),\n },\n secondary: query.secondary.map((e) => ({\n ...e,\n entry: hashDataQuery(e.entry),\n })),\n };\n case \"sliceAxes\":\n return {\n ...query,\n input: hashDataQuery(query.input),\n };\n case \"sort\":\n return {\n ...query,\n input: hashDataQuery(query.input),\n };\n case \"filter\":\n return {\n ...query,\n input: hashDataQuery(query.input),\n };\n }\n}\n\nexport function hashCreateTableV2RequestColumnId(request: {\n tableSpec: PTableColumnSpec[];\n dataQuery: DataQuery;\n}): {\n tableSpec: PTableColumnSpec[];\n dataQuery: DataQuery;\n} {\n return {\n ...request,\n tableSpec: request.tableSpec.map(hashTableColumnSpec),\n dataQuery: hashDataQuery(request.dataQuery),\n };\n}\n\nexport async function dump(\n relativePath: string[],\n data: { [key: string]: string | number | boolean | object } | Uint8Array,\n logger?: PFrameInternal.Logger,\n): Promise<void> {\n if (!process.env.MI_DUMP_PFRAMES_RS) return;\n try {\n const relativeUri = relativePath.map((part) => encodeURIComponent(part));\n const fileDir = join(process.env.MI_DUMP_PFRAMES_RS, ...relativeUri.slice(0, -1));\n await fs.mkdir(fileDir, { recursive: true });\n\n const filePath = join(process.env.MI_DUMP_PFRAMES_RS, ...relativeUri);\n const fileData = ArrayBuffer.isView(data) ? data : JSON.stringify(data, null, 2);\n await fs.writeFile(filePath, fileData, { flag: \"wx\" });\n } catch (error: unknown) {\n logger?.(\"warn\", `error while dumping PFrames data: ${error}`);\n }\n}\n"],"names":["createHash","join","fs"],"mappings":";;;;;;AAcM,SAAU,YAAY,CAAC,QAAmB,EAAA;AAC9C,IAAA,OAAOA,sBAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAc;AACzE;AAEM,SAAU,iBAAiB,CAAC,OAAuB,EAAA;AACvD,IAAA,IAAI,OAAO,CAAC,IAAI,KAAK,QAAQ,EAAE;QAC7B,OAAO;AACL,YAAA,GAAG,OAAO;AACV,YAAA,EAAE,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC;SAC7B;IACH;AACA,IAAA,OAAO,OAAO;AAChB;AAEM,SAAU,kBAAkB,CAAC,MAA0B,EAAA;IAC3D,OAAO;AACL,QAAA,GAAG,MAAM;AACT,QAAA,MAAM,EAAE,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC;KACzC;AACH;AAEM,SAAU,+BAA+B,CAAC,OAA4B,EAAA;IAC1E,OAAO;AACL,QAAA,GAAG,OAAO;AACV,QAAA,QAAQ,EAAE,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC;QACxC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC;KACjD;AACH;AAEM,SAAU,mBAAmB,CAAC,OAAsB,EAAA;IACxD,OAAO;AACL,QAAA,GAAG,OAAO;AACV,QAAA,MAAM,EAAE,iBAAiB,CAAC,OAAO,CAAC,MAAM,CAAC;KAC1C;AACH;AAEA,SAAS,qBAAqB,CAAC,KAAiC,EAAA;AAC9D,IAAA,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI;IACvB,QAAQ,IAAI;AAC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CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB;QAAE;AACrC,IAAA,IAAI;AACF,QAAA,MAAM,WAAW,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,kBAAkB,CAAC,IAAI,CAAC,CAAC;QACxE,MAAM,OAAO,GAAGC,cAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AACjF,QAAA,MAAMC,gBAAE,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;AAE5C,QAAA,MAAM,QAAQ,GAAGD,cAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,GAAG,WAAW,CAAC;QACrE,MAAM,QAAQ,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;AAChF,QAAA,MAAMC,gBAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACxD;IAAE,OAAO,KAAc,EAAE;QACvB,MAAM,GAAG,MAAM,EAAE,qCAAqC,KAAK,CAAA,CAAE,CAAC;IAChE;AACF;;;;;;;;;;;"}
1
+ {"version":3,"file":"dump.cjs","names":["fs"],"sources":["../export/dump.ts"],"sourcesContent":["import { createHash } from \"node:crypto\";\nimport { promises as fs } from \"node:fs\";\nimport { join } from \"node:path\";\nimport type { PFrameInternal } from \"@milaboratories/pl-model-middle-layer\";\nimport type {\n PObjectId,\n PTableColumnId,\n PTableColumnSpec,\n PTableRecordFilter,\n PTableSorting,\n UniqueValuesRequest,\n DataQuery,\n} from \"@milaboratories/pl-model-common\";\n\nexport function hashColumnId(columnId: PObjectId): PObjectId {\n return createHash(\"sha256\").update(columnId).digest(\"hex\") as PObjectId;\n}\n\nexport function hashTableColumnId(tableId: PTableColumnId): PTableColumnId {\n if (tableId.type === \"column\") {\n return {\n ...tableId,\n id: hashColumnId(tableId.id),\n };\n }\n return tableId;\n}\n\nexport function hashFilterColumnId(filter: PTableRecordFilter): PTableRecordFilter {\n return {\n ...filter,\n column: hashTableColumnId(filter.column),\n };\n}\n\nexport function hashUniqueValuesRequestColumnId(request: UniqueValuesRequest): UniqueValuesRequest {\n return {\n ...request,\n columnId: hashColumnId(request.columnId),\n filters: request.filters.map(hashFilterColumnId),\n };\n}\n\nexport function hashSortingColumnId(sorting: PTableSorting): PTableSorting {\n return {\n ...sorting,\n column: hashTableColumnId(sorting.column),\n };\n}\n\nfunction hashJoinEntryColumnId(entry: PFrameInternal.JoinEntryV4): PFrameInternal.JoinEntryV4 {\n const type = entry.type;\n switch (type) {\n case \"column\":\n return {\n ...entry,\n columnId: hashColumnId(entry.columnId),\n };\n case \"slicedColumn\":\n return {\n ...entry,\n columnId: hashColumnId(entry.columnId),\n newId: hashColumnId(entry.newId),\n };\n case \"artificialColumn\":\n return {\n ...entry,\n columnId: hashColumnId(entry.columnId),\n newId: hashColumnId(entry.newId),\n };\n case \"inlineColumn\":\n return {\n ...entry,\n newId: hashColumnId(entry.newId),\n };\n case \"inner\":\n return {\n ...entry,\n entries: entry.entries.map(hashJoinEntryColumnId),\n };\n case \"full\":\n return {\n ...entry,\n entries: entry.entries.map(hashJoinEntryColumnId),\n };\n case \"outer\":\n return {\n ...entry,\n primary: hashJoinEntryColumnId(entry.primary),\n secondary: entry.secondary.map(hashJoinEntryColumnId),\n };\n default:\n throw new Error(`Unsupported join entry type: ${type}`);\n }\n}\n\nexport function hashCreateTableRequestColumnId(\n request: PFrameInternal.CreateTableRequestV4,\n): PFrameInternal.CreateTableRequestV4 {\n return {\n ...request,\n src: hashJoinEntryColumnId(request.src),\n filters: request.filters.map(hashFilterColumnId),\n };\n}\n\nfunction hashTableColumnSpec(spec: PTableColumnSpec): PTableColumnSpec {\n if (spec.type === \"column\") {\n return {\n ...spec,\n id: hashColumnId(spec.id),\n };\n }\n return spec;\n}\n\nfunction hashDataQuery(query: DataQuery): DataQuery {\n switch (query.type) {\n case \"column\":\n return {\n ...query,\n column: hashColumnId(query.column),\n };\n case \"inlineColumn\":\n return {\n ...query,\n spec: {\n ...query.spec,\n id: hashColumnId(query.spec.id),\n },\n };\n case \"sparseToDenseColumn\":\n return {\n ...query,\n column: hashColumnId(query.column),\n ...(query.specOverride\n ? {\n specOverride: {\n ...query.specOverride,\n id: hashColumnId(query.specOverride.id),\n },\n }\n : {}),\n };\n case \"innerJoin\":\n case \"fullJoin\":\n return {\n ...query,\n entries: query.entries.map((e) => ({\n ...e,\n entry: hashDataQuery(e.entry),\n })),\n };\n case \"outerJoin\":\n return {\n ...query,\n primary: {\n ...query.primary,\n entry: hashDataQuery(query.primary.entry),\n },\n secondary: query.secondary.map((e) => ({\n ...e,\n entry: hashDataQuery(e.entry),\n })),\n };\n case \"sliceAxes\":\n return {\n ...query,\n input: hashDataQuery(query.input),\n };\n case \"sort\":\n return {\n ...query,\n input: hashDataQuery(query.input),\n };\n case \"filter\":\n return {\n ...query,\n input: hashDataQuery(query.input),\n };\n }\n}\n\nexport function hashCreateTableV2RequestColumnId(request: {\n tableSpec: PTableColumnSpec[];\n dataQuery: DataQuery;\n}): {\n tableSpec: PTableColumnSpec[];\n dataQuery: DataQuery;\n} {\n return {\n ...request,\n tableSpec: request.tableSpec.map(hashTableColumnSpec),\n dataQuery: hashDataQuery(request.dataQuery),\n };\n}\n\nexport async function dump(\n relativePath: string[],\n data: { [key: string]: string | number | boolean | object } | Uint8Array,\n logger?: PFrameInternal.Logger,\n): Promise<void> {\n if (!process.env.MI_DUMP_PFRAMES_RS) return;\n try {\n const relativeUri = relativePath.map((part) => encodeURIComponent(part));\n const fileDir = join(process.env.MI_DUMP_PFRAMES_RS, ...relativeUri.slice(0, -1));\n await fs.mkdir(fileDir, { recursive: true });\n\n const filePath = join(process.env.MI_DUMP_PFRAMES_RS, ...relativeUri);\n const fileData = ArrayBuffer.isView(data) ? data : JSON.stringify(data, null, 2);\n await fs.writeFile(filePath, fileData, { flag: \"wx\" });\n } catch (error: unknown) {\n logger?.(\"warn\", `error while dumping PFrames data: ${error}`);\n }\n}\n"],"mappings":";;;;;AAcA,SAAgB,aAAa,UAAgC;AAC3D,SAAA,GAAA,YAAA,YAAkB,SAAS,CAAC,OAAO,SAAS,CAAC,OAAO,MAAM;;AAG5D,SAAgB,kBAAkB,SAAyC;AACzE,KAAI,QAAQ,SAAS,SACnB,QAAO;EACL,GAAG;EACH,IAAI,aAAa,QAAQ,GAAG;EAC7B;AAEH,QAAO;;AAGT,SAAgB,mBAAmB,QAAgD;AACjF,QAAO;EACL,GAAG;EACH,QAAQ,kBAAkB,OAAO,OAAO;EACzC;;AAGH,SAAgB,gCAAgC,SAAmD;AACjG,QAAO;EACL,GAAG;EACH,UAAU,aAAa,QAAQ,SAAS;EACxC,SAAS,QAAQ,QAAQ,IAAI,mBAAmB;EACjD;;AAGH,SAAgB,oBAAoB,SAAuC;AACzE,QAAO;EACL,GAAG;EACH,QAAQ,kBAAkB,QAAQ,OAAO;EAC1C;;AAGH,SAAS,sBAAsB,OAA+D;CAC5F,MAAM,OAAO,MAAM;AACnB,SAAQ,MAAR;EACE,KAAK,SACH,QAAO;GACL,GAAG;GACH,UAAU,aAAa,MAAM,SAAS;GACvC;EACH,KAAK,eACH,QAAO;GACL,GAAG;GACH,UAAU,aAAa,MAAM,SAAS;GACtC,OAAO,aAAa,MAAM,MAAM;GACjC;EACH,KAAK,mBACH,QAAO;GACL,GAAG;GACH,UAAU,aAAa,MAAM,SAAS;GACtC,OAAO,aAAa,MAAM,MAAM;GACjC;EACH,KAAK,eACH,QAAO;GACL,GAAG;GACH,OAAO,aAAa,MAAM,MAAM;GACjC;EACH,KAAK,QACH,QAAO;GACL,GAAG;GACH,SAAS,MAAM,QAAQ,IAAI,sBAAsB;GAClD;EACH,KAAK,OACH,QAA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