@synchronized-studio/cmsassets-agent 0.1.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/README.md +84 -0
- package/dist/aiReview-HZKRPSUV.js +8 -0
- package/dist/chunk-3YAY6ZA2.js +2052 -0
- package/dist/chunk-645ASJ55.js +1077 -0
- package/dist/chunk-J6E3CMX6.js +1431 -0
- package/dist/chunk-N2FYSVFJ.js +2296 -0
- package/dist/chunk-QGM4M3NI.js +37 -0
- package/dist/chunk-R6XRR66U.js +395 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +960 -0
- package/dist/fileFromPath-K33YIX5J.js +129 -0
- package/dist/index.d.ts +811 -0
- package/dist/index.js +152 -0
- package/dist/openai-E6ORPCAV.js +10931 -0
- package/package.json +68 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import {
|
|
2
|
+
File,
|
|
3
|
+
isFile
|
|
4
|
+
} from "./chunk-3YAY6ZA2.js";
|
|
5
|
+
import {
|
|
6
|
+
__commonJS,
|
|
7
|
+
__require,
|
|
8
|
+
__toESM
|
|
9
|
+
} from "./chunk-QGM4M3NI.js";
|
|
10
|
+
|
|
11
|
+
// node_modules/node-domexception/index.js
|
|
12
|
+
var require_node_domexception = __commonJS({
|
|
13
|
+
"node_modules/node-domexception/index.js"(exports, module) {
|
|
14
|
+
"use strict";
|
|
15
|
+
if (!globalThis.DOMException) {
|
|
16
|
+
try {
|
|
17
|
+
const { MessageChannel } = __require("worker_threads"), port = new MessageChannel().port1, ab = new ArrayBuffer();
|
|
18
|
+
port.postMessage(ab, [ab, ab]);
|
|
19
|
+
} catch (err) {
|
|
20
|
+
err.constructor.name === "DOMException" && (globalThis.DOMException = err.constructor);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
module.exports = globalThis.DOMException;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
// node_modules/formdata-node/lib/esm/fileFromPath.js
|
|
28
|
+
var import_node_domexception = __toESM(require_node_domexception(), 1);
|
|
29
|
+
import { statSync, createReadStream, promises as fs } from "fs";
|
|
30
|
+
import { basename } from "path";
|
|
31
|
+
|
|
32
|
+
// node_modules/formdata-node/lib/esm/isPlainObject.js
|
|
33
|
+
var getType = (value) => Object.prototype.toString.call(value).slice(8, -1).toLowerCase();
|
|
34
|
+
function isPlainObject(value) {
|
|
35
|
+
if (getType(value) !== "object") {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
const pp = Object.getPrototypeOf(value);
|
|
39
|
+
if (pp === null || pp === void 0) {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
const Ctor = pp.constructor && pp.constructor.toString();
|
|
43
|
+
return Ctor === Object.toString();
|
|
44
|
+
}
|
|
45
|
+
var isPlainObject_default = isPlainObject;
|
|
46
|
+
|
|
47
|
+
// node_modules/formdata-node/lib/esm/fileFromPath.js
|
|
48
|
+
var __classPrivateFieldSet = function(receiver, state, value, kind, f) {
|
|
49
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
50
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
51
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
52
|
+
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
53
|
+
};
|
|
54
|
+
var __classPrivateFieldGet = function(receiver, state, kind, f) {
|
|
55
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
56
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
57
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
58
|
+
};
|
|
59
|
+
var _FileFromPath_path;
|
|
60
|
+
var _FileFromPath_start;
|
|
61
|
+
var MESSAGE = "The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.";
|
|
62
|
+
var FileFromPath = class _FileFromPath {
|
|
63
|
+
constructor(input) {
|
|
64
|
+
_FileFromPath_path.set(this, void 0);
|
|
65
|
+
_FileFromPath_start.set(this, void 0);
|
|
66
|
+
__classPrivateFieldSet(this, _FileFromPath_path, input.path, "f");
|
|
67
|
+
__classPrivateFieldSet(this, _FileFromPath_start, input.start || 0, "f");
|
|
68
|
+
this.name = basename(__classPrivateFieldGet(this, _FileFromPath_path, "f"));
|
|
69
|
+
this.size = input.size;
|
|
70
|
+
this.lastModified = input.lastModified;
|
|
71
|
+
}
|
|
72
|
+
slice(start, end) {
|
|
73
|
+
return new _FileFromPath({
|
|
74
|
+
path: __classPrivateFieldGet(this, _FileFromPath_path, "f"),
|
|
75
|
+
lastModified: this.lastModified,
|
|
76
|
+
size: end - start,
|
|
77
|
+
start
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
async *stream() {
|
|
81
|
+
const { mtimeMs } = await fs.stat(__classPrivateFieldGet(this, _FileFromPath_path, "f"));
|
|
82
|
+
if (mtimeMs > this.lastModified) {
|
|
83
|
+
throw new import_node_domexception.default(MESSAGE, "NotReadableError");
|
|
84
|
+
}
|
|
85
|
+
if (this.size) {
|
|
86
|
+
yield* createReadStream(__classPrivateFieldGet(this, _FileFromPath_path, "f"), {
|
|
87
|
+
start: __classPrivateFieldGet(this, _FileFromPath_start, "f"),
|
|
88
|
+
end: __classPrivateFieldGet(this, _FileFromPath_start, "f") + this.size - 1
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
get [(_FileFromPath_path = /* @__PURE__ */ new WeakMap(), _FileFromPath_start = /* @__PURE__ */ new WeakMap(), Symbol.toStringTag)]() {
|
|
93
|
+
return "File";
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
function createFileFromPath(path, { mtimeMs, size }, filenameOrOptions, options = {}) {
|
|
97
|
+
let filename;
|
|
98
|
+
if (isPlainObject_default(filenameOrOptions)) {
|
|
99
|
+
[options, filename] = [filenameOrOptions, void 0];
|
|
100
|
+
} else {
|
|
101
|
+
filename = filenameOrOptions;
|
|
102
|
+
}
|
|
103
|
+
const file = new FileFromPath({ path, size, lastModified: mtimeMs });
|
|
104
|
+
if (!filename) {
|
|
105
|
+
filename = file.name;
|
|
106
|
+
}
|
|
107
|
+
return new File([file], filename, {
|
|
108
|
+
...options,
|
|
109
|
+
lastModified: file.lastModified
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
function fileFromPathSync(path, filenameOrOptions, options = {}) {
|
|
113
|
+
const stats = statSync(path);
|
|
114
|
+
return createFileFromPath(path, stats, filenameOrOptions, options);
|
|
115
|
+
}
|
|
116
|
+
async function fileFromPath(path, filenameOrOptions, options) {
|
|
117
|
+
const stats = await fs.stat(path);
|
|
118
|
+
return createFileFromPath(path, stats, filenameOrOptions, options);
|
|
119
|
+
}
|
|
120
|
+
export {
|
|
121
|
+
fileFromPath,
|
|
122
|
+
fileFromPathSync,
|
|
123
|
+
isFile
|
|
124
|
+
};
|
|
125
|
+
/*! Bundled license information:
|
|
126
|
+
|
|
127
|
+
node-domexception/index.js:
|
|
128
|
+
(*! node-domexception. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
|
|
129
|
+
*/
|