@prenta/import 0.5.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/CHANGELOG.md +686 -0
- package/LICENSE +21 -0
- package/README.md +24 -0
- package/dist/adapter.d.ts +47 -0
- package/dist/adapter.d.ts.map +1 -0
- package/dist/adapter.js +60 -0
- package/dist/adapter.js.map +1 -0
- package/dist/adapters/contentful/asset.d.ts +47 -0
- package/dist/adapters/contentful/asset.d.ts.map +1 -0
- package/dist/adapters/contentful/asset.js +88 -0
- package/dist/adapters/contentful/asset.js.map +1 -0
- package/dist/adapters/contentful/index.d.ts +24 -0
- package/dist/adapters/contentful/index.d.ts.map +1 -0
- package/dist/adapters/contentful/index.js +242 -0
- package/dist/adapters/contentful/index.js.map +1 -0
- package/dist/adapters/contentful/locale.d.ts +66 -0
- package/dist/adapters/contentful/locale.d.ts.map +1 -0
- package/dist/adapters/contentful/locale.js +125 -0
- package/dist/adapters/contentful/locale.js.map +1 -0
- package/dist/adapters/contentful/map.d.ts +69 -0
- package/dist/adapters/contentful/map.d.ts.map +1 -0
- package/dist/adapters/contentful/map.js +174 -0
- package/dist/adapters/contentful/map.js.map +1 -0
- package/dist/adapters/contentful/rich-text.d.ts +52 -0
- package/dist/adapters/contentful/rich-text.d.ts.map +1 -0
- package/dist/adapters/contentful/rich-text.js +95 -0
- package/dist/adapters/contentful/rich-text.js.map +1 -0
- package/dist/adapters/contentful/types.d.ts +189 -0
- package/dist/adapters/contentful/types.d.ts.map +1 -0
- package/dist/adapters/contentful/types.js +26 -0
- package/dist/adapters/contentful/types.js.map +1 -0
- package/dist/adapters/identity.d.ts +27 -0
- package/dist/adapters/identity.d.ts.map +1 -0
- package/dist/adapters/identity.js +116 -0
- package/dist/adapters/identity.js.map +1 -0
- package/dist/adapters/sanity/asset.d.ts +45 -0
- package/dist/adapters/sanity/asset.d.ts.map +1 -0
- package/dist/adapters/sanity/asset.js +79 -0
- package/dist/adapters/sanity/asset.js.map +1 -0
- package/dist/adapters/sanity/index.d.ts +19 -0
- package/dist/adapters/sanity/index.d.ts.map +1 -0
- package/dist/adapters/sanity/index.js +165 -0
- package/dist/adapters/sanity/index.js.map +1 -0
- package/dist/adapters/sanity/map.d.ts +75 -0
- package/dist/adapters/sanity/map.d.ts.map +1 -0
- package/dist/adapters/sanity/map.js +245 -0
- package/dist/adapters/sanity/map.js.map +1 -0
- package/dist/adapters/sanity/parse.d.ts +64 -0
- package/dist/adapters/sanity/parse.d.ts.map +1 -0
- package/dist/adapters/sanity/parse.js +71 -0
- package/dist/adapters/sanity/parse.js.map +1 -0
- package/dist/adapters/sanity/portable-text.d.ts +64 -0
- package/dist/adapters/sanity/portable-text.d.ts.map +1 -0
- package/dist/adapters/sanity/portable-text.js +112 -0
- package/dist/adapters/sanity/portable-text.js.map +1 -0
- package/dist/adapters/sanity/types.d.ts +182 -0
- package/dist/adapters/sanity/types.d.ts.map +1 -0
- package/dist/adapters/sanity/types.js +17 -0
- package/dist/adapters/sanity/types.js.map +1 -0
- package/dist/adapters/strapi/asset.d.ts +56 -0
- package/dist/adapters/strapi/asset.d.ts.map +1 -0
- package/dist/adapters/strapi/asset.js +94 -0
- package/dist/adapters/strapi/asset.js.map +1 -0
- package/dist/adapters/strapi/index.d.ts +20 -0
- package/dist/adapters/strapi/index.d.ts.map +1 -0
- package/dist/adapters/strapi/index.js +205 -0
- package/dist/adapters/strapi/index.js.map +1 -0
- package/dist/adapters/strapi/links.d.ts +79 -0
- package/dist/adapters/strapi/links.d.ts.map +1 -0
- package/dist/adapters/strapi/links.js +98 -0
- package/dist/adapters/strapi/links.js.map +1 -0
- package/dist/adapters/strapi/loader.d.ts +68 -0
- package/dist/adapters/strapi/loader.d.ts.map +1 -0
- package/dist/adapters/strapi/loader.js +177 -0
- package/dist/adapters/strapi/loader.js.map +1 -0
- package/dist/adapters/strapi/map.d.ts +53 -0
- package/dist/adapters/strapi/map.d.ts.map +1 -0
- package/dist/adapters/strapi/map.js +193 -0
- package/dist/adapters/strapi/map.js.map +1 -0
- package/dist/adapters/strapi/types.d.ts +174 -0
- package/dist/adapters/strapi/types.d.ts.map +1 -0
- package/dist/adapters/strapi/types.js +31 -0
- package/dist/adapters/strapi/types.js.map +1 -0
- package/dist/adapters/strapi/uid.d.ts +44 -0
- package/dist/adapters/strapi/uid.d.ts.map +1 -0
- package/dist/adapters/strapi/uid.js +58 -0
- package/dist/adapters/strapi/uid.js.map +1 -0
- package/dist/adapters/wordpress/attachments.d.ts +37 -0
- package/dist/adapters/wordpress/attachments.d.ts.map +1 -0
- package/dist/adapters/wordpress/attachments.js +134 -0
- package/dist/adapters/wordpress/attachments.js.map +1 -0
- package/dist/adapters/wordpress/authors.d.ts +24 -0
- package/dist/adapters/wordpress/authors.d.ts.map +1 -0
- package/dist/adapters/wordpress/authors.js +40 -0
- package/dist/adapters/wordpress/authors.js.map +1 -0
- package/dist/adapters/wordpress/index.d.ts +19 -0
- package/dist/adapters/wordpress/index.d.ts.map +1 -0
- package/dist/adapters/wordpress/index.js +281 -0
- package/dist/adapters/wordpress/index.js.map +1 -0
- package/dist/adapters/wordpress/map.d.ts +61 -0
- package/dist/adapters/wordpress/map.d.ts.map +1 -0
- package/dist/adapters/wordpress/map.js +265 -0
- package/dist/adapters/wordpress/map.js.map +1 -0
- package/dist/adapters/wordpress/parse.d.ts +50 -0
- package/dist/adapters/wordpress/parse.d.ts.map +1 -0
- package/dist/adapters/wordpress/parse.js +141 -0
- package/dist/adapters/wordpress/parse.js.map +1 -0
- package/dist/adapters/wordpress/terms.d.ts +46 -0
- package/dist/adapters/wordpress/terms.d.ts.map +1 -0
- package/dist/adapters/wordpress/terms.js +87 -0
- package/dist/adapters/wordpress/terms.js.map +1 -0
- package/dist/adapters/wordpress/types.d.ts +201 -0
- package/dist/adapters/wordpress/types.d.ts.map +1 -0
- package/dist/adapters/wordpress/types.js +24 -0
- package/dist/adapters/wordpress/types.js.map +1 -0
- package/dist/cli.d.ts +16 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +266 -0
- package/dist/cli.js.map +1 -0
- package/dist/formatter.d.ts +12 -0
- package/dist/formatter.d.ts.map +1 -0
- package/dist/formatter.js +48 -0
- package/dist/formatter.js.map +1 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -0
- package/dist/migrate.d.ts +151 -0
- package/dist/migrate.d.ts.map +1 -0
- package/dist/migrate.js +255 -0
- package/dist/migrate.js.map +1 -0
- package/dist/registry.d.ts +39 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +62 -0
- package/dist/registry.js.map +1 -0
- package/dist/runner.d.ts +33 -0
- package/dist/runner.d.ts.map +1 -0
- package/dist/runner.js +61 -0
- package/dist/runner.js.map +1 -0
- package/dist/types.d.ts +173 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +17 -0
- package/dist/types.js.map +1 -0
- package/package.json +59 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types for `@prenta/import`.
|
|
3
|
+
*
|
|
4
|
+
* The package is structured as a small framework + an open set of
|
|
5
|
+
* source-specific adapters. Each adapter knows how to read one
|
|
6
|
+
* upstream CMS's export format (Sanity NDJSON, Contentful JSON, Strapi
|
|
7
|
+
* REST dump, WordPress WXR, …) and turn it into a stream of
|
|
8
|
+
* {@link ImportedDocument}s the rest of the pipeline can write to disk
|
|
9
|
+
* or pipe into the Prenta API.
|
|
10
|
+
*
|
|
11
|
+
* Adapters never write to disk directly — the framework owns I/O. This
|
|
12
|
+
* keeps adapters pure functions of "raw bytes → typed documents,"
|
|
13
|
+
* makes them trivial to unit test against fixture data, and lets the
|
|
14
|
+
* CLI's `--dry-run` / `--write` / `--json` flags work uniformly.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* A single document the importer produced from an upstream export.
|
|
18
|
+
* Mirrors the shape Prenta's collections store at rest, minus
|
|
19
|
+
* server-generated fields like `id` and timestamps (the API layer
|
|
20
|
+
* fills those in on write).
|
|
21
|
+
*/
|
|
22
|
+
export interface ImportedDocument {
|
|
23
|
+
/** Target Prenta collection slug (e.g. `pages`, `posts`). */
|
|
24
|
+
collection: string;
|
|
25
|
+
/**
|
|
26
|
+
* Optional human-readable slug — adapters set this when the source
|
|
27
|
+
* CMS has a stable slug field. The Prenta API generates one if
|
|
28
|
+
* absent.
|
|
29
|
+
*/
|
|
30
|
+
slug?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Field values keyed by Prenta field name. Adapters decide the
|
|
33
|
+
* mapping from source-CMS shape to Prenta field shape; the
|
|
34
|
+
* framework treats this map as opaque.
|
|
35
|
+
*/
|
|
36
|
+
data: Record<string, unknown>;
|
|
37
|
+
/**
|
|
38
|
+
* Original identifier from the source CMS. Preserved so re-imports
|
|
39
|
+
* can match on the same key and so reports can cite the source
|
|
40
|
+
* record unambiguously.
|
|
41
|
+
*/
|
|
42
|
+
sourceId?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Original type name from the source CMS (e.g. Sanity's `_type`).
|
|
45
|
+
* Useful for diagnostics and adapter-side conditional logic.
|
|
46
|
+
*/
|
|
47
|
+
sourceType?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* A non-fatal note from an adapter. The import still produced a
|
|
51
|
+
* document; the adapter just wants the operator to know something
|
|
52
|
+
* lossy happened — a reference dropped, a default substituted, a
|
|
53
|
+
* locale flattened.
|
|
54
|
+
*/
|
|
55
|
+
export interface ImportWarning {
|
|
56
|
+
/** Identifies the source record the warning came from. */
|
|
57
|
+
source: {
|
|
58
|
+
type?: string;
|
|
59
|
+
id?: string;
|
|
60
|
+
};
|
|
61
|
+
/** Stable warning code (e.g. `dropped-reference`, `flattened-locale`). */
|
|
62
|
+
code: string;
|
|
63
|
+
/** Human-readable explanation. */
|
|
64
|
+
message: string;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* A field the adapter couldn't safely map. Surfaced to the operator
|
|
68
|
+
* so they can either edit the source export, extend the adapter
|
|
69
|
+
* config, or manually finish the import. Different from a
|
|
70
|
+
* {@link ImportWarning} in that the document is missing data — it's
|
|
71
|
+
* not just a lossy note.
|
|
72
|
+
*/
|
|
73
|
+
export interface UnresolvedField {
|
|
74
|
+
/** Identifies the source record + field that couldn't be mapped. */
|
|
75
|
+
source: {
|
|
76
|
+
type?: string;
|
|
77
|
+
id?: string;
|
|
78
|
+
field: string;
|
|
79
|
+
};
|
|
80
|
+
/** Stable code (e.g. `unknown-field-type`, `missing-asset`). */
|
|
81
|
+
code: string;
|
|
82
|
+
/** Human-readable explanation of why this field couldn't be mapped. */
|
|
83
|
+
reason: string;
|
|
84
|
+
/**
|
|
85
|
+
* The raw value from the source CMS, included so the operator (or
|
|
86
|
+
* a follow-up tool) can decide what to do without re-reading the
|
|
87
|
+
* original export. Adapters MAY omit this for very large blobs.
|
|
88
|
+
*/
|
|
89
|
+
rawValue?: unknown;
|
|
90
|
+
/** Optional actionable hint (e.g. "extend the typeMap with…"). */
|
|
91
|
+
hint?: string;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* The shape every adapter returns. Pure value — the framework owns
|
|
95
|
+
* disk writes, so adapters can be unit-tested against fixture inputs
|
|
96
|
+
* in pure-node memory.
|
|
97
|
+
*/
|
|
98
|
+
export interface ImportResult {
|
|
99
|
+
documents: ImportedDocument[];
|
|
100
|
+
warnings: ImportWarning[];
|
|
101
|
+
unresolved: UnresolvedField[];
|
|
102
|
+
summary: ImportSummary;
|
|
103
|
+
}
|
|
104
|
+
export interface ImportSummary {
|
|
105
|
+
/** Total records the adapter scanned from the source export. */
|
|
106
|
+
totalRead: number;
|
|
107
|
+
/** Records that successfully turned into documents. */
|
|
108
|
+
converted: number;
|
|
109
|
+
/** Records the adapter skipped entirely (no document emitted). */
|
|
110
|
+
skipped: number;
|
|
111
|
+
/** Adapter that produced this result. */
|
|
112
|
+
adapter: string;
|
|
113
|
+
/** ISO timestamp the import ran. */
|
|
114
|
+
importedAt: string;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Inputs an adapter accepts when running an import. Kept narrow on
|
|
118
|
+
* purpose — adapter-specific knobs live in {@link AdapterOptions.config}.
|
|
119
|
+
*/
|
|
120
|
+
export interface AdapterOptions {
|
|
121
|
+
/**
|
|
122
|
+
* Path or URL the adapter reads from. The adapter is responsible
|
|
123
|
+
* for interpreting this — most adapters expect a file or directory
|
|
124
|
+
* path; HTTP-based adapters might accept a URL.
|
|
125
|
+
*/
|
|
126
|
+
input: string;
|
|
127
|
+
/**
|
|
128
|
+
* Free-form per-adapter configuration (type mappings, ignore
|
|
129
|
+
* patterns, locale selection, etc.). Adapters define their own
|
|
130
|
+
* shape; the framework just forwards it untouched.
|
|
131
|
+
*/
|
|
132
|
+
config?: Record<string, unknown>;
|
|
133
|
+
/**
|
|
134
|
+
* Filter callback: return `false` to skip a source record before
|
|
135
|
+
* the adapter tries to map it. Useful for partial imports.
|
|
136
|
+
*/
|
|
137
|
+
shouldInclude?: (record: {
|
|
138
|
+
type?: string;
|
|
139
|
+
id?: string;
|
|
140
|
+
}) => boolean;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* The contract every importer adapter implements. Stateless +
|
|
144
|
+
* framework-owns-IO: an adapter is "given an input descriptor,
|
|
145
|
+
* produce a typed result." Side-effect-free except for what the
|
|
146
|
+
* adapter itself reads from disk / network.
|
|
147
|
+
*/
|
|
148
|
+
export interface ImportAdapter {
|
|
149
|
+
/** Stable identifier used by the CLI and the registry. */
|
|
150
|
+
readonly name: string;
|
|
151
|
+
/** One-line human-readable description for `prenta-import list`. */
|
|
152
|
+
readonly description: string;
|
|
153
|
+
/**
|
|
154
|
+
* Optional URL pointing to the adapter's reference doc. The CLI
|
|
155
|
+
* prints it in error messages so operators can debug quickly.
|
|
156
|
+
*/
|
|
157
|
+
readonly docsUrl?: string;
|
|
158
|
+
/**
|
|
159
|
+
* Run the import. Implementations should never write to disk — the
|
|
160
|
+
* framework calls {@link writeImportResult} when the caller opts in
|
|
161
|
+
* with `--write`.
|
|
162
|
+
*/
|
|
163
|
+
run(options: AdapterOptions): Promise<ImportResult> | ImportResult;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Top-level orchestrator inputs — what the CLI / library entry point
|
|
167
|
+
* accepts. Wraps {@link AdapterOptions} + names the adapter to use.
|
|
168
|
+
*/
|
|
169
|
+
export interface ImportInvocation extends AdapterOptions {
|
|
170
|
+
/** Adapter name as registered in the built-in registry. */
|
|
171
|
+
adapter: string;
|
|
172
|
+
}
|
|
173
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,6DAA6D;IAC7D,UAAU,EAAE,MAAM,CAAA;IAClB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,0DAA0D;IAC1D,MAAM,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IACtC,0EAA0E;IAC1E,IAAI,EAAE,MAAM,CAAA;IACZ,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,oEAAoE;IACpE,MAAM,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IACrD,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAA;IACZ,uEAAuE;IACvE,MAAM,EAAE,MAAM,CAAA;IACd;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,kEAAkE;IAClE,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,gBAAgB,EAAE,CAAA;IAC7B,QAAQ,EAAE,aAAa,EAAE,CAAA;IACzB,UAAU,EAAE,eAAe,EAAE,CAAA;IAC7B,OAAO,EAAE,aAAa,CAAA;CACvB;AAED,MAAM,WAAW,aAAa;IAC5B,gEAAgE;IAChE,SAAS,EAAE,MAAM,CAAA;IACjB,uDAAuD;IACvD,SAAS,EAAE,MAAM,CAAA;IACjB,kEAAkE;IAClE,OAAO,EAAE,MAAM,CAAA;IACf,yCAAyC;IACzC,OAAO,EAAE,MAAM,CAAA;IACf,oCAAoC;IACpC,UAAU,EAAE,MAAM,CAAA;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAA;CACpE;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,0DAA0D;IAC1D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,oEAAoE;IACpE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IACzB;;;;OAIG;IACH,GAAG,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,GAAG,YAAY,CAAA;CACnE;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAiB,SAAQ,cAAc;IACtD,2DAA2D;IAC3D,OAAO,EAAE,MAAM,CAAA;CAChB"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types for `@prenta/import`.
|
|
3
|
+
*
|
|
4
|
+
* The package is structured as a small framework + an open set of
|
|
5
|
+
* source-specific adapters. Each adapter knows how to read one
|
|
6
|
+
* upstream CMS's export format (Sanity NDJSON, Contentful JSON, Strapi
|
|
7
|
+
* REST dump, WordPress WXR, …) and turn it into a stream of
|
|
8
|
+
* {@link ImportedDocument}s the rest of the pipeline can write to disk
|
|
9
|
+
* or pipe into the Prenta API.
|
|
10
|
+
*
|
|
11
|
+
* Adapters never write to disk directly — the framework owns I/O. This
|
|
12
|
+
* keeps adapters pure functions of "raw bytes → typed documents,"
|
|
13
|
+
* makes them trivial to unit test against fixture data, and lets the
|
|
14
|
+
* CLI's `--dry-run` / `--write` / `--json` flags work uniformly.
|
|
15
|
+
*/
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG"}
|
package/package.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@prenta/import",
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"description": "Migrate content into Prenta from external CMSs (Sanity, Contentful, Strapi, WordPress) via pluggable adapters.",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/actuate-media/prenta.git",
|
|
9
|
+
"directory": "packages/import"
|
|
10
|
+
},
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"type": "module",
|
|
15
|
+
"main": "./dist/index.js",
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"bin": {
|
|
18
|
+
"prenta-import": "./dist/cli.js"
|
|
19
|
+
},
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"import": "./dist/index.js",
|
|
24
|
+
"default": "./dist/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./cli": {
|
|
27
|
+
"types": "./dist/cli.d.ts",
|
|
28
|
+
"import": "./dist/cli.js",
|
|
29
|
+
"default": "./dist/cli.js"
|
|
30
|
+
},
|
|
31
|
+
"./adapter": {
|
|
32
|
+
"types": "./dist/adapter.d.ts",
|
|
33
|
+
"import": "./dist/adapter.js",
|
|
34
|
+
"default": "./dist/adapter.js"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"files": [
|
|
38
|
+
"dist",
|
|
39
|
+
"CHANGELOG.md"
|
|
40
|
+
],
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"fast-xml-parser": "^5.8.0"
|
|
43
|
+
},
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"typescript": ">=5.0.0"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@types/node": "^22.0.0",
|
|
49
|
+
"typescript": "^5.7.0",
|
|
50
|
+
"vitest": "^4.1.0"
|
|
51
|
+
},
|
|
52
|
+
"scripts": {
|
|
53
|
+
"build": "tsc --project tsconfig.json",
|
|
54
|
+
"dev": "tsc --project tsconfig.json --watch --preserveWatchOutput",
|
|
55
|
+
"type-check": "tsc --noEmit",
|
|
56
|
+
"test": "vitest run",
|
|
57
|
+
"clean": "rm -rf dist .turbo"
|
|
58
|
+
}
|
|
59
|
+
}
|