@strapi/openapi 0.0.0-experimental.1e4c115f717b021ca11c139584d4519db28ba786
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/LICENSE +37 -0
- package/README.md +1 -0
- package/dist/assemblers/document/factory.d.ts +8 -0
- package/dist/assemblers/document/factory.d.ts.map +1 -0
- package/dist/assemblers/document/factory.js +38 -0
- package/dist/assemblers/document/factory.js.map +1 -0
- package/dist/assemblers/document/factory.mjs +36 -0
- package/dist/assemblers/document/factory.mjs.map +1 -0
- package/dist/assemblers/document/index.d.ts +5 -0
- package/dist/assemblers/document/index.d.ts.map +1 -0
- package/dist/assemblers/document/info.d.ts +8 -0
- package/dist/assemblers/document/info.d.ts.map +1 -0
- package/dist/assemblers/document/info.js +32 -0
- package/dist/assemblers/document/info.js.map +1 -0
- package/dist/assemblers/document/info.mjs +30 -0
- package/dist/assemblers/document/info.mjs.map +1 -0
- package/dist/assemblers/document/metadata.d.ts +6 -0
- package/dist/assemblers/document/metadata.d.ts.map +1 -0
- package/dist/assemblers/document/metadata.js +23 -0
- package/dist/assemblers/document/metadata.js.map +1 -0
- package/dist/assemblers/document/metadata.mjs +21 -0
- package/dist/assemblers/document/metadata.mjs.map +1 -0
- package/dist/assemblers/document/path/factory.d.ts +6 -0
- package/dist/assemblers/document/path/factory.d.ts.map +1 -0
- package/dist/assemblers/document/path/factory.js +27 -0
- package/dist/assemblers/document/path/factory.js.map +1 -0
- package/dist/assemblers/document/path/factory.mjs +25 -0
- package/dist/assemblers/document/path/factory.mjs.map +1 -0
- package/dist/assemblers/document/path/index.d.ts +4 -0
- package/dist/assemblers/document/path/index.d.ts.map +1 -0
- package/dist/assemblers/document/path/path-item/factory.d.ts +6 -0
- package/dist/assemblers/document/path/path-item/factory.d.ts.map +1 -0
- package/dist/assemblers/document/path/path-item/factory.js +26 -0
- package/dist/assemblers/document/path/path-item/factory.js.map +1 -0
- package/dist/assemblers/document/path/path-item/factory.mjs +24 -0
- package/dist/assemblers/document/path/path-item/factory.mjs.map +1 -0
- package/dist/assemblers/document/path/path-item/index.d.ts +4 -0
- package/dist/assemblers/document/path/path-item/index.d.ts.map +1 -0
- package/dist/assemblers/document/path/path-item/operation/body.d.ts +7 -0
- package/dist/assemblers/document/path/path-item/operation/body.d.ts.map +1 -0
- package/dist/assemblers/document/path/path-item/operation/body.js +27 -0
- package/dist/assemblers/document/path/path-item/operation/body.js.map +1 -0
- package/dist/assemblers/document/path/path-item/operation/body.mjs +25 -0
- package/dist/assemblers/document/path/path-item/operation/body.mjs.map +1 -0
- package/dist/assemblers/document/path/path-item/operation/factory.d.ts +10 -0
- package/dist/assemblers/document/path/path-item/operation/factory.d.ts.map +1 -0
- package/dist/assemblers/document/path/path-item/operation/factory.js +37 -0
- package/dist/assemblers/document/path/path-item/operation/factory.js.map +1 -0
- package/dist/assemblers/document/path/path-item/operation/factory.mjs +35 -0
- package/dist/assemblers/document/path/path-item/operation/factory.mjs.map +1 -0
- package/dist/assemblers/document/path/path-item/operation/index.d.ts +8 -0
- package/dist/assemblers/document/path/path-item/operation/index.d.ts.map +1 -0
- package/dist/assemblers/document/path/path-item/operation/operation-id.d.ts +10 -0
- package/dist/assemblers/document/path/path-item/operation/operation-id.d.ts.map +1 -0
- package/dist/assemblers/document/path/path-item/operation/operation-id.js +47 -0
- package/dist/assemblers/document/path/path-item/operation/operation-id.js.map +1 -0
- package/dist/assemblers/document/path/path-item/operation/operation-id.mjs +45 -0
- package/dist/assemblers/document/path/path-item/operation/operation-id.mjs.map +1 -0
- package/dist/assemblers/document/path/path-item/operation/operation.d.ts +13 -0
- package/dist/assemblers/document/path/path-item/operation/operation.d.ts.map +1 -0
- package/dist/assemblers/document/path/path-item/operation/operation.js +48 -0
- package/dist/assemblers/document/path/path-item/operation/operation.js.map +1 -0
- package/dist/assemblers/document/path/path-item/operation/operation.mjs +46 -0
- package/dist/assemblers/document/path/path-item/operation/operation.mjs.map +1 -0
- package/dist/assemblers/document/path/path-item/operation/parameters.d.ts +9 -0
- package/dist/assemblers/document/path/path-item/operation/parameters.d.ts.map +1 -0
- package/dist/assemblers/document/path/path-item/operation/parameters.js +67 -0
- package/dist/assemblers/document/path/path-item/operation/parameters.js.map +1 -0
- package/dist/assemblers/document/path/path-item/operation/parameters.mjs +65 -0
- package/dist/assemblers/document/path/path-item/operation/parameters.mjs.map +1 -0
- package/dist/assemblers/document/path/path-item/operation/responses.d.ts +8 -0
- package/dist/assemblers/document/path/path-item/operation/responses.d.ts.map +1 -0
- package/dist/assemblers/document/path/path-item/operation/responses.js +51 -0
- package/dist/assemblers/document/path/path-item/operation/responses.js.map +1 -0
- package/dist/assemblers/document/path/path-item/operation/responses.mjs +49 -0
- package/dist/assemblers/document/path/path-item/operation/responses.mjs.map +1 -0
- package/dist/assemblers/document/path/path-item/operation/tags.d.ts +7 -0
- package/dist/assemblers/document/path/path-item/operation/tags.d.ts.map +1 -0
- package/dist/assemblers/document/path/path-item/operation/tags.js +25 -0
- package/dist/assemblers/document/path/path-item/operation/tags.js.map +1 -0
- package/dist/assemblers/document/path/path-item/operation/tags.mjs +23 -0
- package/dist/assemblers/document/path/path-item/operation/tags.mjs.map +1 -0
- package/dist/assemblers/document/path/path-item/path-item.d.ts +13 -0
- package/dist/assemblers/document/path/path-item/path-item.d.ts.map +1 -0
- package/dist/assemblers/document/path/path-item/path-item.js +53 -0
- package/dist/assemblers/document/path/path-item/path-item.js.map +1 -0
- package/dist/assemblers/document/path/path-item/path-item.mjs +51 -0
- package/dist/assemblers/document/path/path-item/path-item.mjs.map +1 -0
- package/dist/assemblers/document/path/path.d.ts +10 -0
- package/dist/assemblers/document/path/path.d.ts.map +1 -0
- package/dist/assemblers/document/path/path.js +28 -0
- package/dist/assemblers/document/path/path.js.map +1 -0
- package/dist/assemblers/document/path/path.mjs +26 -0
- package/dist/assemblers/document/path/path.mjs.map +1 -0
- package/dist/assemblers/index.d.ts +3 -0
- package/dist/assemblers/index.d.ts.map +1 -0
- package/dist/assemblers/types.d.ts +18 -0
- package/dist/assemblers/types.d.ts.map +1 -0
- package/dist/constants.d.ts +3 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +8 -0
- package/dist/constants.js.map +1 -0
- package/dist/constants.mjs +5 -0
- package/dist/constants.mjs.map +1 -0
- package/dist/context/factories/abstract.d.ts +11 -0
- package/dist/context/factories/abstract.d.ts.map +1 -0
- package/dist/context/factories/abstract.js +38 -0
- package/dist/context/factories/abstract.js.map +1 -0
- package/dist/context/factories/abstract.mjs +36 -0
- package/dist/context/factories/abstract.mjs.map +1 -0
- package/dist/context/factories/document.d.ts +11 -0
- package/dist/context/factories/document.d.ts.map +1 -0
- package/dist/context/factories/document.js +20 -0
- package/dist/context/factories/document.js.map +1 -0
- package/dist/context/factories/document.mjs +18 -0
- package/dist/context/factories/document.mjs.map +1 -0
- package/dist/context/factories/index.d.ts +6 -0
- package/dist/context/factories/index.d.ts.map +1 -0
- package/dist/context/factories/operation.d.ts +11 -0
- package/dist/context/factories/operation.d.ts.map +1 -0
- package/dist/context/factories/operation.js +20 -0
- package/dist/context/factories/operation.js.map +1 -0
- package/dist/context/factories/operation.mjs +18 -0
- package/dist/context/factories/operation.mjs.map +1 -0
- package/dist/context/factories/path-item.d.ts +10 -0
- package/dist/context/factories/path-item.d.ts.map +1 -0
- package/dist/context/factories/path-item.js +20 -0
- package/dist/context/factories/path-item.js.map +1 -0
- package/dist/context/factories/path-item.mjs +18 -0
- package/dist/context/factories/path-item.mjs.map +1 -0
- package/dist/context/factories/path.d.ts +10 -0
- package/dist/context/factories/path.d.ts.map +1 -0
- package/dist/context/factories/path.js +20 -0
- package/dist/context/factories/path.js.map +1 -0
- package/dist/context/factories/path.mjs +18 -0
- package/dist/context/factories/path.mjs.map +1 -0
- package/dist/context/index.d.ts +3 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/types.d.ts +28 -0
- package/dist/context/types.d.ts.map +1 -0
- package/dist/exports.d.ts +9 -0
- package/dist/exports.d.ts.map +1 -0
- package/dist/exports.js +49 -0
- package/dist/exports.js.map +1 -0
- package/dist/exports.mjs +47 -0
- package/dist/exports.mjs.map +1 -0
- package/dist/generator/generator.d.ts +29 -0
- package/dist/generator/generator.d.ts.map +1 -0
- package/dist/generator/generator.js +85 -0
- package/dist/generator/generator.js.map +1 -0
- package/dist/generator/generator.mjs +83 -0
- package/dist/generator/generator.mjs.map +1 -0
- package/dist/generator/index.d.ts +3 -0
- package/dist/generator/index.d.ts.map +1 -0
- package/dist/generator/types.d.ts +12 -0
- package/dist/generator/types.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -0
- package/dist/post-processor/component-writer.d.ts +6 -0
- package/dist/post-processor/component-writer.d.ts.map +1 -0
- package/dist/post-processor/component-writer.js +19 -0
- package/dist/post-processor/component-writer.js.map +1 -0
- package/dist/post-processor/component-writer.mjs +17 -0
- package/dist/post-processor/component-writer.mjs.map +1 -0
- package/dist/post-processor/factory.d.ts +5 -0
- package/dist/post-processor/factory.d.ts.map +1 -0
- package/dist/post-processor/factory.js +14 -0
- package/dist/post-processor/factory.js.map +1 -0
- package/dist/post-processor/factory.mjs +12 -0
- package/dist/post-processor/factory.mjs.map +1 -0
- package/dist/post-processor/index.d.ts +4 -0
- package/dist/post-processor/index.d.ts.map +1 -0
- package/dist/post-processor/types.d.ts +5 -0
- package/dist/post-processor/types.d.ts.map +1 -0
- package/dist/pre-processor/factory.d.ts +5 -0
- package/dist/pre-processor/factory.d.ts.map +1 -0
- package/dist/pre-processor/factory.js +10 -0
- package/dist/pre-processor/factory.js.map +1 -0
- package/dist/pre-processor/factory.mjs +8 -0
- package/dist/pre-processor/factory.mjs.map +1 -0
- package/dist/pre-processor/index.d.ts +3 -0
- package/dist/pre-processor/index.d.ts.map +1 -0
- package/dist/pre-processor/types.d.ts +5 -0
- package/dist/pre-processor/types.d.ts.map +1 -0
- package/dist/registries/factory.d.ts +4 -0
- package/dist/registries/factory.d.ts.map +1 -0
- package/dist/registries/factory.js +10 -0
- package/dist/registries/factory.js.map +1 -0
- package/dist/registries/factory.mjs +8 -0
- package/dist/registries/factory.mjs.map +1 -0
- package/dist/registries/index.d.ts +3 -0
- package/dist/registries/index.d.ts.map +1 -0
- package/dist/registries/types.d.ts +3 -0
- package/dist/registries/types.d.ts.map +1 -0
- package/dist/routes/collector.d.ts +29 -0
- package/dist/routes/collector.d.ts.map +1 -0
- package/dist/routes/collector.js +40 -0
- package/dist/routes/collector.js.map +1 -0
- package/dist/routes/collector.mjs +38 -0
- package/dist/routes/collector.mjs.map +1 -0
- package/dist/routes/index.d.ts +7 -0
- package/dist/routes/index.d.ts.map +1 -0
- package/dist/routes/matcher.d.ts +25 -0
- package/dist/routes/matcher.d.ts.map +1 -0
- package/dist/routes/matcher.js +24 -0
- package/dist/routes/matcher.js.map +1 -0
- package/dist/routes/matcher.mjs +22 -0
- package/dist/routes/matcher.mjs.map +1 -0
- package/dist/routes/providers/abstract.d.ts +35 -0
- package/dist/routes/providers/abstract.d.ts.map +1 -0
- package/dist/routes/providers/abstract.js +29 -0
- package/dist/routes/providers/abstract.js.map +1 -0
- package/dist/routes/providers/abstract.mjs +27 -0
- package/dist/routes/providers/abstract.mjs.map +1 -0
- package/dist/routes/providers/admin.d.ts +6 -0
- package/dist/routes/providers/admin.d.ts.map +1 -0
- package/dist/routes/providers/admin.js +19 -0
- package/dist/routes/providers/admin.js.map +1 -0
- package/dist/routes/providers/admin.mjs +17 -0
- package/dist/routes/providers/admin.mjs.map +1 -0
- package/dist/routes/providers/api.d.ts +22 -0
- package/dist/routes/providers/api.d.ts.map +1 -0
- package/dist/routes/providers/api.js +35 -0
- package/dist/routes/providers/api.js.map +1 -0
- package/dist/routes/providers/api.mjs +33 -0
- package/dist/routes/providers/api.mjs.map +1 -0
- package/dist/routes/providers/index.d.ts +6 -0
- package/dist/routes/providers/index.d.ts.map +1 -0
- package/dist/routes/providers/plugin.d.ts +23 -0
- package/dist/routes/providers/plugin.d.ts.map +1 -0
- package/dist/routes/providers/plugin.js +37 -0
- package/dist/routes/providers/plugin.js.map +1 -0
- package/dist/routes/providers/plugin.mjs +35 -0
- package/dist/routes/providers/plugin.mjs.map +1 -0
- package/dist/routes/providers/types.d.ts +13 -0
- package/dist/routes/providers/types.d.ts.map +1 -0
- package/dist/routes/rules/index.d.ts +2 -0
- package/dist/routes/rules/index.d.ts.map +1 -0
- package/dist/routes/rules/is-of-type.d.ts +3 -0
- package/dist/routes/rules/is-of-type.d.ts.map +1 -0
- package/dist/routes/rules/is-of-type.js +8 -0
- package/dist/routes/rules/is-of-type.js.map +1 -0
- package/dist/routes/rules/is-of-type.mjs +6 -0
- package/dist/routes/rules/is-of-type.mjs.map +1 -0
- package/dist/routes/types.d.ts +6 -0
- package/dist/routes/types.d.ts.map +1 -0
- package/dist/types.d.ts +14 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/utils/debug.d.ts +3 -0
- package/dist/utils/debug.d.ts.map +1 -0
- package/dist/utils/debug.js +11 -0
- package/dist/utils/debug.js.map +1 -0
- package/dist/utils/debug.mjs +9 -0
- package/dist/utils/debug.mjs.map +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/timer/factory.d.ts +5 -0
- package/dist/utils/timer/factory.d.ts.map +1 -0
- package/dist/utils/timer/factory.js +12 -0
- package/dist/utils/timer/factory.js.map +1 -0
- package/dist/utils/timer/factory.mjs +10 -0
- package/dist/utils/timer/factory.mjs.map +1 -0
- package/dist/utils/timer/index.d.ts +3 -0
- package/dist/utils/timer/index.d.ts.map +1 -0
- package/dist/utils/timer/timer.d.ts +14 -0
- package/dist/utils/timer/timer.d.ts.map +1 -0
- package/dist/utils/timer/timer.js +38 -0
- package/dist/utils/timer/timer.js.map +1 -0
- package/dist/utils/timer/timer.mjs +36 -0
- package/dist/utils/timer/timer.mjs.map +1 -0
- package/dist/utils/zod.d.ts +39 -0
- package/dist/utils/zod.d.ts.map +1 -0
- package/dist/utils/zod.js +86 -0
- package/dist/utils/zod.js.map +1 -0
- package/dist/utils/zod.mjs +64 -0
- package/dist/utils/zod.mjs.map +1 -0
- package/package.json +68 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
class Timer {
|
|
4
|
+
start() {
|
|
5
|
+
if (this._startTime !== null) {
|
|
6
|
+
throw new Error('Timer is already started. Use `reset()` to reset the timer before starting it again.');
|
|
7
|
+
}
|
|
8
|
+
this._startTime = Date.now();
|
|
9
|
+
this._endTime = null;
|
|
10
|
+
this._elapsedTime = null;
|
|
11
|
+
return this._startTime;
|
|
12
|
+
}
|
|
13
|
+
stop() {
|
|
14
|
+
if (this._startTime === null) {
|
|
15
|
+
throw new Error('Timer is not started. Use `start()` to start the timer before stopping it.');
|
|
16
|
+
}
|
|
17
|
+
this._endTime = Date.now();
|
|
18
|
+
this._elapsedTime = this._endTime - this._startTime;
|
|
19
|
+
return {
|
|
20
|
+
startTime: this._startTime,
|
|
21
|
+
endTime: this._endTime,
|
|
22
|
+
elapsedTime: this._elapsedTime
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
reset() {
|
|
26
|
+
this._startTime = null;
|
|
27
|
+
this._endTime = null;
|
|
28
|
+
this._elapsedTime = null;
|
|
29
|
+
}
|
|
30
|
+
constructor(){
|
|
31
|
+
this._startTime = null;
|
|
32
|
+
this._endTime = null;
|
|
33
|
+
this._elapsedTime = null;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
exports.Timer = Timer;
|
|
38
|
+
//# sourceMappingURL=timer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timer.js","sources":["../../../src/utils/timer/timer.ts"],"sourcesContent":["export class Timer {\n private _startTime: number | null;\n\n private _endTime: number | null;\n\n private _elapsedTime: number | null;\n\n constructor() {\n this._startTime = null;\n this._endTime = null;\n this._elapsedTime = null;\n }\n\n start(): number {\n if (this._startTime !== null) {\n throw new Error(\n 'Timer is already started. Use `reset()` to reset the timer before starting it again.'\n );\n }\n\n this._startTime = Date.now();\n\n this._endTime = null;\n this._elapsedTime = null;\n\n return this._startTime;\n }\n\n stop() {\n if (this._startTime === null) {\n throw new Error('Timer is not started. Use `start()` to start the timer before stopping it.');\n }\n\n this._endTime = Date.now();\n this._elapsedTime = this._endTime - this._startTime;\n\n return { startTime: this._startTime, endTime: this._endTime, elapsedTime: this._elapsedTime };\n }\n\n reset(): void {\n this._startTime = null;\n this._endTime = null;\n this._elapsedTime = null;\n }\n}\n"],"names":["Timer","start","_startTime","Error","Date","now","_endTime","_elapsedTime","stop","startTime","endTime","elapsedTime","reset","constructor"],"mappings":";;AAAO,MAAMA,KAAAA,CAAAA;IAaXC,KAAgB,GAAA;AACd,QAAA,IAAI,IAAI,CAACC,UAAU,KAAK,IAAM,EAAA;AAC5B,YAAA,MAAM,IAAIC,KACR,CAAA,sFAAA,CAAA;AAEJ;AAEA,QAAA,IAAI,CAACD,UAAU,GAAGE,IAAAA,CAAKC,GAAG,EAAA;QAE1B,IAAI,CAACC,QAAQ,GAAG,IAAA;QAChB,IAAI,CAACC,YAAY,GAAG,IAAA;QAEpB,OAAO,IAAI,CAACL,UAAU;AACxB;IAEAM,IAAO,GAAA;AACL,QAAA,IAAI,IAAI,CAACN,UAAU,KAAK,IAAM,EAAA;AAC5B,YAAA,MAAM,IAAIC,KAAM,CAAA,4EAAA,CAAA;AAClB;AAEA,QAAA,IAAI,CAACG,QAAQ,GAAGF,IAAAA,CAAKC,GAAG,EAAA;QACxB,IAAI,CAACE,YAAY,GAAG,IAAI,CAACD,QAAQ,GAAG,IAAI,CAACJ,UAAU;QAEnD,OAAO;YAAEO,SAAW,EAAA,IAAI,CAACP,UAAU;YAAEQ,OAAS,EAAA,IAAI,CAACJ,QAAQ;YAAEK,WAAa,EAAA,IAAI,CAACJ;AAAa,SAAA;AAC9F;IAEAK,KAAc,GAAA;QACZ,IAAI,CAACV,UAAU,GAAG,IAAA;QAClB,IAAI,CAACI,QAAQ,GAAG,IAAA;QAChB,IAAI,CAACC,YAAY,GAAG,IAAA;AACtB;IApCAM,WAAc,EAAA;QACZ,IAAI,CAACX,UAAU,GAAG,IAAA;QAClB,IAAI,CAACI,QAAQ,GAAG,IAAA;QAChB,IAAI,CAACC,YAAY,GAAG,IAAA;AACtB;AAiCF;;;;"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
class Timer {
|
|
2
|
+
start() {
|
|
3
|
+
if (this._startTime !== null) {
|
|
4
|
+
throw new Error('Timer is already started. Use `reset()` to reset the timer before starting it again.');
|
|
5
|
+
}
|
|
6
|
+
this._startTime = Date.now();
|
|
7
|
+
this._endTime = null;
|
|
8
|
+
this._elapsedTime = null;
|
|
9
|
+
return this._startTime;
|
|
10
|
+
}
|
|
11
|
+
stop() {
|
|
12
|
+
if (this._startTime === null) {
|
|
13
|
+
throw new Error('Timer is not started. Use `start()` to start the timer before stopping it.');
|
|
14
|
+
}
|
|
15
|
+
this._endTime = Date.now();
|
|
16
|
+
this._elapsedTime = this._endTime - this._startTime;
|
|
17
|
+
return {
|
|
18
|
+
startTime: this._startTime,
|
|
19
|
+
endTime: this._endTime,
|
|
20
|
+
elapsedTime: this._elapsedTime
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
reset() {
|
|
24
|
+
this._startTime = null;
|
|
25
|
+
this._endTime = null;
|
|
26
|
+
this._elapsedTime = null;
|
|
27
|
+
}
|
|
28
|
+
constructor(){
|
|
29
|
+
this._startTime = null;
|
|
30
|
+
this._endTime = null;
|
|
31
|
+
this._elapsedTime = null;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { Timer };
|
|
36
|
+
//# sourceMappingURL=timer.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timer.mjs","sources":["../../../src/utils/timer/timer.ts"],"sourcesContent":["export class Timer {\n private _startTime: number | null;\n\n private _endTime: number | null;\n\n private _elapsedTime: number | null;\n\n constructor() {\n this._startTime = null;\n this._endTime = null;\n this._elapsedTime = null;\n }\n\n start(): number {\n if (this._startTime !== null) {\n throw new Error(\n 'Timer is already started. Use `reset()` to reset the timer before starting it again.'\n );\n }\n\n this._startTime = Date.now();\n\n this._endTime = null;\n this._elapsedTime = null;\n\n return this._startTime;\n }\n\n stop() {\n if (this._startTime === null) {\n throw new Error('Timer is not started. Use `start()` to start the timer before stopping it.');\n }\n\n this._endTime = Date.now();\n this._elapsedTime = this._endTime - this._startTime;\n\n return { startTime: this._startTime, endTime: this._endTime, elapsedTime: this._elapsedTime };\n }\n\n reset(): void {\n this._startTime = null;\n this._endTime = null;\n this._elapsedTime = null;\n }\n}\n"],"names":["Timer","start","_startTime","Error","Date","now","_endTime","_elapsedTime","stop","startTime","endTime","elapsedTime","reset","constructor"],"mappings":"AAAO,MAAMA,KAAAA,CAAAA;IAaXC,KAAgB,GAAA;AACd,QAAA,IAAI,IAAI,CAACC,UAAU,KAAK,IAAM,EAAA;AAC5B,YAAA,MAAM,IAAIC,KACR,CAAA,sFAAA,CAAA;AAEJ;AAEA,QAAA,IAAI,CAACD,UAAU,GAAGE,IAAAA,CAAKC,GAAG,EAAA;QAE1B,IAAI,CAACC,QAAQ,GAAG,IAAA;QAChB,IAAI,CAACC,YAAY,GAAG,IAAA;QAEpB,OAAO,IAAI,CAACL,UAAU;AACxB;IAEAM,IAAO,GAAA;AACL,QAAA,IAAI,IAAI,CAACN,UAAU,KAAK,IAAM,EAAA;AAC5B,YAAA,MAAM,IAAIC,KAAM,CAAA,4EAAA,CAAA;AAClB;AAEA,QAAA,IAAI,CAACG,QAAQ,GAAGF,IAAAA,CAAKC,GAAG,EAAA;QACxB,IAAI,CAACE,YAAY,GAAG,IAAI,CAACD,QAAQ,GAAG,IAAI,CAACJ,UAAU;QAEnD,OAAO;YAAEO,SAAW,EAAA,IAAI,CAACP,UAAU;YAAEQ,OAAS,EAAA,IAAI,CAACJ,QAAQ;YAAEK,WAAa,EAAA,IAAI,CAACJ;AAAa,SAAA;AAC9F;IAEAK,KAAc,GAAA;QACZ,IAAI,CAACV,UAAU,GAAG,IAAA;QAClB,IAAI,CAACI,QAAQ,GAAG,IAAA;QAChB,IAAI,CAACC,YAAY,GAAG,IAAA;AACtB;IApCAM,WAAc,EAAA;QACZ,IAAI,CAACX,UAAU,GAAG,IAAA;QAClB,IAAI,CAACI,QAAQ,GAAG,IAAA;QAChB,IAAI,CAACC,YAAY,GAAG,IAAA;AACtB;AAiCF;;;;"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
import type { OpenAPIV3 } from 'openapi-types';
|
|
3
|
+
/**
|
|
4
|
+
* Converts a Zod schema to an OpenAPI Schema Object.
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* Takes a Zod schema and converts it into an OpenAPI Schema Object (v3.1).
|
|
8
|
+
* It uses a local registry to handle the conversion process and generates the appropriate
|
|
9
|
+
* OpenAPI components.
|
|
10
|
+
*
|
|
11
|
+
* @param zodSchema - The Zod schema to convert to OpenAPI format. Can be any valid Zod schema.
|
|
12
|
+
*
|
|
13
|
+
* @returns An OpenAPI Schema Object representing the input Zod schema structure.
|
|
14
|
+
* If the conversion cannot be completed, returns undefined.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* import { z } from 'zod';
|
|
19
|
+
*
|
|
20
|
+
* // Create a Zod schema
|
|
21
|
+
* const userSchema = z.object({
|
|
22
|
+
* id: z.number(),
|
|
23
|
+
* name: z.string(),
|
|
24
|
+
* email: z.string().email()
|
|
25
|
+
* });
|
|
26
|
+
*
|
|
27
|
+
* // Convert to OpenAPI schema
|
|
28
|
+
* const openAPISchema = zodToOpenAPI(userSchema);
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare const zodToOpenAPI: (zodSchema: z.ZodType) => OpenAPIV3.SchemaObject | OpenAPIV3.ReferenceObject;
|
|
32
|
+
/**
|
|
33
|
+
* Generates a path string for referencing a component schema by its identifier.
|
|
34
|
+
*
|
|
35
|
+
* @param id - The identifier of the component schema.
|
|
36
|
+
* @returns The constructed path string for the specified component schema.
|
|
37
|
+
*/
|
|
38
|
+
export declare const toComponentsPath: (id: string) => string;
|
|
39
|
+
//# sourceMappingURL=zod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zod.d.ts","sourceRoot":"","sources":["../../src/utils/zod.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,eAAO,MAAM,YAAY,cACZ,EAAE,OAAO,KACnB,UAAU,YAAY,GAAG,UAAU,eAsBrC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,OAAQ,MAAM,WAAiC,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var node_crypto = require('node:crypto');
|
|
4
|
+
var z = require('zod');
|
|
5
|
+
|
|
6
|
+
function _interopNamespaceDefault(e) {
|
|
7
|
+
var n = Object.create(null);
|
|
8
|
+
if (e) {
|
|
9
|
+
Object.keys(e).forEach(function (k) {
|
|
10
|
+
if (k !== 'default') {
|
|
11
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
12
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return e[k]; }
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
n.default = e;
|
|
20
|
+
return Object.freeze(n);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
var z__namespace = /*#__PURE__*/_interopNamespaceDefault(z);
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Converts a Zod schema to an OpenAPI Schema Object.
|
|
27
|
+
*
|
|
28
|
+
* @description
|
|
29
|
+
* Takes a Zod schema and converts it into an OpenAPI Schema Object (v3.1).
|
|
30
|
+
* It uses a local registry to handle the conversion process and generates the appropriate
|
|
31
|
+
* OpenAPI components.
|
|
32
|
+
*
|
|
33
|
+
* @param zodSchema - The Zod schema to convert to OpenAPI format. Can be any valid Zod schema.
|
|
34
|
+
*
|
|
35
|
+
* @returns An OpenAPI Schema Object representing the input Zod schema structure.
|
|
36
|
+
* If the conversion cannot be completed, returns undefined.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```typescript
|
|
40
|
+
* import { z } from 'zod';
|
|
41
|
+
*
|
|
42
|
+
* // Create a Zod schema
|
|
43
|
+
* const userSchema = z.object({
|
|
44
|
+
* id: z.number(),
|
|
45
|
+
* name: z.string(),
|
|
46
|
+
* email: z.string().email()
|
|
47
|
+
* });
|
|
48
|
+
*
|
|
49
|
+
* // Convert to OpenAPI schema
|
|
50
|
+
* const openAPISchema = zodToOpenAPI(userSchema);
|
|
51
|
+
* ```
|
|
52
|
+
*/ const zodToOpenAPI = (zodSchema)=>{
|
|
53
|
+
try {
|
|
54
|
+
const id = node_crypto.randomUUID();
|
|
55
|
+
const registry = z__namespace.registry();
|
|
56
|
+
// Add the schema to the local registry with a custom, unique ID
|
|
57
|
+
registry.add(zodSchema, {
|
|
58
|
+
id
|
|
59
|
+
});
|
|
60
|
+
// Copy the global registry definitions into the local registry to make sure references are resolved
|
|
61
|
+
// This prevent "__shared" definitions from being created
|
|
62
|
+
for (const [key, value] of z__namespace.globalRegistry._idmap){
|
|
63
|
+
registry.add(value, {
|
|
64
|
+
id: key
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
// Generate the schemas and only return the one we want, transform the URI path to be OpenAPI compliant
|
|
68
|
+
const { schemas } = z__namespace.toJSONSchema(registry, {
|
|
69
|
+
uri: toComponentsPath
|
|
70
|
+
});
|
|
71
|
+
// TODO: make sure it's compliant
|
|
72
|
+
return schemas[id];
|
|
73
|
+
} catch (e) {
|
|
74
|
+
throw new Error("Couldn't transform the zod schema into an OpenAPI schema");
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Generates a path string for referencing a component schema by its identifier.
|
|
79
|
+
*
|
|
80
|
+
* @param id - The identifier of the component schema.
|
|
81
|
+
* @returns The constructed path string for the specified component schema.
|
|
82
|
+
*/ const toComponentsPath = (id)=>`#/components/schemas/${id}`;
|
|
83
|
+
|
|
84
|
+
exports.toComponentsPath = toComponentsPath;
|
|
85
|
+
exports.zodToOpenAPI = zodToOpenAPI;
|
|
86
|
+
//# sourceMappingURL=zod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zod.js","sources":["../../src/utils/zod.ts"],"sourcesContent":["import { randomUUID } from 'node:crypto';\nimport * as z from 'zod';\n\nimport type { OpenAPIV3 } from 'openapi-types';\n\n/**\n * Converts a Zod schema to an OpenAPI Schema Object.\n *\n * @description\n * Takes a Zod schema and converts it into an OpenAPI Schema Object (v3.1).\n * It uses a local registry to handle the conversion process and generates the appropriate\n * OpenAPI components.\n *\n * @param zodSchema - The Zod schema to convert to OpenAPI format. Can be any valid Zod schema.\n *\n * @returns An OpenAPI Schema Object representing the input Zod schema structure.\n * If the conversion cannot be completed, returns undefined.\n *\n * @example\n * ```typescript\n * import { z } from 'zod';\n *\n * // Create a Zod schema\n * const userSchema = z.object({\n * id: z.number(),\n * name: z.string(),\n * email: z.string().email()\n * });\n *\n * // Convert to OpenAPI schema\n * const openAPISchema = zodToOpenAPI(userSchema);\n * ```\n */\n\nexport const zodToOpenAPI = (\n zodSchema: z.ZodType\n): OpenAPIV3.SchemaObject | OpenAPIV3.ReferenceObject => {\n try {\n const id = randomUUID();\n const registry = z.registry<{ id: string }>();\n\n // Add the schema to the local registry with a custom, unique ID\n registry.add(zodSchema, { id });\n\n // Copy the global registry definitions into the local registry to make sure references are resolved\n // This prevent \"__shared\" definitions from being created\n for (const [key, value] of z.globalRegistry._idmap) {\n registry.add(value, { id: key });\n }\n\n // Generate the schemas and only return the one we want, transform the URI path to be OpenAPI compliant\n const { schemas } = z.toJSONSchema(registry, { uri: toComponentsPath });\n\n // TODO: make sure it's compliant\n return schemas[id] as OpenAPIV3.SchemaObject;\n } catch (e) {\n throw new Error(\"Couldn't transform the zod schema into an OpenAPI schema\");\n }\n};\n\n/**\n * Generates a path string for referencing a component schema by its identifier.\n *\n * @param id - The identifier of the component schema.\n * @returns The constructed path string for the specified component schema.\n */\nexport const toComponentsPath = (id: string) => `#/components/schemas/${id}`;\n"],"names":["zodToOpenAPI","zodSchema","id","randomUUID","registry","z","add","key","value","globalRegistry","_idmap","schemas","toJSONSchema","uri","toComponentsPath","e","Error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;IA6BaA,MAAAA,YAAAA,GAAe,CAC1BC,SAAAA,GAAAA;IAEA,IAAI;AACF,QAAA,MAAMC,EAAKC,GAAAA,sBAAAA,EAAAA;QACX,MAAMC,QAAAA,GAAWC,aAAED,QAAQ,EAAA;;QAG3BA,QAASE,CAAAA,GAAG,CAACL,SAAW,EAAA;AAAEC,YAAAA;AAAG,SAAA,CAAA;;;QAI7B,KAAK,MAAM,CAACK,GAAKC,EAAAA,KAAAA,CAAM,IAAIH,YAAEI,CAAAA,cAAc,CAACC,MAAM,CAAE;YAClDN,QAASE,CAAAA,GAAG,CAACE,KAAO,EAAA;gBAAEN,EAAIK,EAAAA;AAAI,aAAA,CAAA;AAChC;;AAGA,QAAA,MAAM,EAAEI,OAAO,EAAE,GAAGN,YAAEO,CAAAA,YAAY,CAACR,QAAU,EAAA;YAAES,GAAKC,EAAAA;AAAiB,SAAA,CAAA;;QAGrE,OAAOH,OAAO,CAACT,EAAG,CAAA;AACpB,KAAA,CAAE,OAAOa,CAAG,EAAA;AACV,QAAA,MAAM,IAAIC,KAAM,CAAA,0DAAA,CAAA;AAClB;AACF;AAEA;;;;;IAMaF,MAAAA,gBAAAA,GAAmB,CAACZ,EAAAA,GAAe,CAAC,qBAAqB,EAAEA,EAAG,CAAA;;;;;"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
2
|
+
import * as z from 'zod';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Converts a Zod schema to an OpenAPI Schema Object.
|
|
6
|
+
*
|
|
7
|
+
* @description
|
|
8
|
+
* Takes a Zod schema and converts it into an OpenAPI Schema Object (v3.1).
|
|
9
|
+
* It uses a local registry to handle the conversion process and generates the appropriate
|
|
10
|
+
* OpenAPI components.
|
|
11
|
+
*
|
|
12
|
+
* @param zodSchema - The Zod schema to convert to OpenAPI format. Can be any valid Zod schema.
|
|
13
|
+
*
|
|
14
|
+
* @returns An OpenAPI Schema Object representing the input Zod schema structure.
|
|
15
|
+
* If the conversion cannot be completed, returns undefined.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```typescript
|
|
19
|
+
* import { z } from 'zod';
|
|
20
|
+
*
|
|
21
|
+
* // Create a Zod schema
|
|
22
|
+
* const userSchema = z.object({
|
|
23
|
+
* id: z.number(),
|
|
24
|
+
* name: z.string(),
|
|
25
|
+
* email: z.string().email()
|
|
26
|
+
* });
|
|
27
|
+
*
|
|
28
|
+
* // Convert to OpenAPI schema
|
|
29
|
+
* const openAPISchema = zodToOpenAPI(userSchema);
|
|
30
|
+
* ```
|
|
31
|
+
*/ const zodToOpenAPI = (zodSchema)=>{
|
|
32
|
+
try {
|
|
33
|
+
const id = randomUUID();
|
|
34
|
+
const registry = z.registry();
|
|
35
|
+
// Add the schema to the local registry with a custom, unique ID
|
|
36
|
+
registry.add(zodSchema, {
|
|
37
|
+
id
|
|
38
|
+
});
|
|
39
|
+
// Copy the global registry definitions into the local registry to make sure references are resolved
|
|
40
|
+
// This prevent "__shared" definitions from being created
|
|
41
|
+
for (const [key, value] of z.globalRegistry._idmap){
|
|
42
|
+
registry.add(value, {
|
|
43
|
+
id: key
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
// Generate the schemas and only return the one we want, transform the URI path to be OpenAPI compliant
|
|
47
|
+
const { schemas } = z.toJSONSchema(registry, {
|
|
48
|
+
uri: toComponentsPath
|
|
49
|
+
});
|
|
50
|
+
// TODO: make sure it's compliant
|
|
51
|
+
return schemas[id];
|
|
52
|
+
} catch (e) {
|
|
53
|
+
throw new Error("Couldn't transform the zod schema into an OpenAPI schema");
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Generates a path string for referencing a component schema by its identifier.
|
|
58
|
+
*
|
|
59
|
+
* @param id - The identifier of the component schema.
|
|
60
|
+
* @returns The constructed path string for the specified component schema.
|
|
61
|
+
*/ const toComponentsPath = (id)=>`#/components/schemas/${id}`;
|
|
62
|
+
|
|
63
|
+
export { toComponentsPath, zodToOpenAPI };
|
|
64
|
+
//# sourceMappingURL=zod.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zod.mjs","sources":["../../src/utils/zod.ts"],"sourcesContent":["import { randomUUID } from 'node:crypto';\nimport * as z from 'zod';\n\nimport type { OpenAPIV3 } from 'openapi-types';\n\n/**\n * Converts a Zod schema to an OpenAPI Schema Object.\n *\n * @description\n * Takes a Zod schema and converts it into an OpenAPI Schema Object (v3.1).\n * It uses a local registry to handle the conversion process and generates the appropriate\n * OpenAPI components.\n *\n * @param zodSchema - The Zod schema to convert to OpenAPI format. Can be any valid Zod schema.\n *\n * @returns An OpenAPI Schema Object representing the input Zod schema structure.\n * If the conversion cannot be completed, returns undefined.\n *\n * @example\n * ```typescript\n * import { z } from 'zod';\n *\n * // Create a Zod schema\n * const userSchema = z.object({\n * id: z.number(),\n * name: z.string(),\n * email: z.string().email()\n * });\n *\n * // Convert to OpenAPI schema\n * const openAPISchema = zodToOpenAPI(userSchema);\n * ```\n */\n\nexport const zodToOpenAPI = (\n zodSchema: z.ZodType\n): OpenAPIV3.SchemaObject | OpenAPIV3.ReferenceObject => {\n try {\n const id = randomUUID();\n const registry = z.registry<{ id: string }>();\n\n // Add the schema to the local registry with a custom, unique ID\n registry.add(zodSchema, { id });\n\n // Copy the global registry definitions into the local registry to make sure references are resolved\n // This prevent \"__shared\" definitions from being created\n for (const [key, value] of z.globalRegistry._idmap) {\n registry.add(value, { id: key });\n }\n\n // Generate the schemas and only return the one we want, transform the URI path to be OpenAPI compliant\n const { schemas } = z.toJSONSchema(registry, { uri: toComponentsPath });\n\n // TODO: make sure it's compliant\n return schemas[id] as OpenAPIV3.SchemaObject;\n } catch (e) {\n throw new Error(\"Couldn't transform the zod schema into an OpenAPI schema\");\n }\n};\n\n/**\n * Generates a path string for referencing a component schema by its identifier.\n *\n * @param id - The identifier of the component schema.\n * @returns The constructed path string for the specified component schema.\n */\nexport const toComponentsPath = (id: string) => `#/components/schemas/${id}`;\n"],"names":["zodToOpenAPI","zodSchema","id","randomUUID","registry","z","add","key","value","globalRegistry","_idmap","schemas","toJSONSchema","uri","toComponentsPath","e","Error"],"mappings":";;;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;IA6BaA,MAAAA,YAAAA,GAAe,CAC1BC,SAAAA,GAAAA;IAEA,IAAI;AACF,QAAA,MAAMC,EAAKC,GAAAA,UAAAA,EAAAA;QACX,MAAMC,QAAAA,GAAWC,EAAED,QAAQ,EAAA;;QAG3BA,QAASE,CAAAA,GAAG,CAACL,SAAW,EAAA;AAAEC,YAAAA;AAAG,SAAA,CAAA;;;QAI7B,KAAK,MAAM,CAACK,GAAKC,EAAAA,KAAAA,CAAM,IAAIH,CAAEI,CAAAA,cAAc,CAACC,MAAM,CAAE;YAClDN,QAASE,CAAAA,GAAG,CAACE,KAAO,EAAA;gBAAEN,EAAIK,EAAAA;AAAI,aAAA,CAAA;AAChC;;AAGA,QAAA,MAAM,EAAEI,OAAO,EAAE,GAAGN,CAAEO,CAAAA,YAAY,CAACR,QAAU,EAAA;YAAES,GAAKC,EAAAA;AAAiB,SAAA,CAAA;;QAGrE,OAAOH,OAAO,CAACT,EAAG,CAAA;AACpB,KAAA,CAAE,OAAOa,CAAG,EAAA;AACV,QAAA,MAAM,IAAIC,KAAM,CAAA,0DAAA,CAAA;AAClB;AACF;AAEA;;;;;IAMaF,MAAAA,gBAAAA,GAAmB,CAACZ,EAAAA,GAAe,CAAC,qBAAqB,EAAEA,EAAG,CAAA;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@strapi/openapi",
|
|
3
|
+
"version": "0.0.0-experimental.1e4c115f717b021ca11c139584d4519db28ba786",
|
|
4
|
+
"description": "A tool set to help generate and validate API documentation for Strapi projects",
|
|
5
|
+
"homepage": "https://strapi.io",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/strapi/strapi/issues"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git://github.com/strapi/strapi.git"
|
|
12
|
+
},
|
|
13
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
14
|
+
"author": {
|
|
15
|
+
"name": "Strapi Solutions SAS",
|
|
16
|
+
"email": "hi@strapi.io",
|
|
17
|
+
"url": "https://strapi.io"
|
|
18
|
+
},
|
|
19
|
+
"maintainers": [
|
|
20
|
+
{
|
|
21
|
+
"name": "Strapi Solutions SAS",
|
|
22
|
+
"email": "hi@strapi.io",
|
|
23
|
+
"url": "https://strapi.io"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"main": "./dist/index.js",
|
|
27
|
+
"module": "./dist/index.mjs",
|
|
28
|
+
"source": "./src/index.ts",
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"exports": {
|
|
31
|
+
".": {
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"source": "./src/index.ts",
|
|
34
|
+
"import": "./dist/index.mjs",
|
|
35
|
+
"require": "./dist/index.js",
|
|
36
|
+
"default": "./dist/index.js"
|
|
37
|
+
},
|
|
38
|
+
"./package.json": "./package.json"
|
|
39
|
+
},
|
|
40
|
+
"files": [
|
|
41
|
+
"dist/"
|
|
42
|
+
],
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "run -T npm-run-all clean --parallel build:code build:types",
|
|
45
|
+
"build:code": "run -T rollup -c",
|
|
46
|
+
"build:types": "run -T tsc -p tsconfig.build.json --emitDeclarationOnly",
|
|
47
|
+
"watch": "run -T rollup -c -w",
|
|
48
|
+
"clean": "run -T rimraf ./dist",
|
|
49
|
+
"lint": "run -T eslint .",
|
|
50
|
+
"prepublishOnly": "yarn clean && yarn build",
|
|
51
|
+
"test:unit": "run -T jest",
|
|
52
|
+
"test:unit:watch": "run -T jest --watch"
|
|
53
|
+
},
|
|
54
|
+
"engines": {
|
|
55
|
+
"node": ">=18.0.0 <=22.x.x",
|
|
56
|
+
"npm": ">=6.0.0"
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"@strapi/types": "0.0.0-experimental.1e4c115f717b021ca11c139584d4519db28ba786",
|
|
60
|
+
"debug": "4.3.4",
|
|
61
|
+
"openapi-types": "12.1.3",
|
|
62
|
+
"zod": "next"
|
|
63
|
+
},
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"@strapi/types": "5.13.0",
|
|
66
|
+
"@types/debug": "^4"
|
|
67
|
+
}
|
|
68
|
+
}
|