@artinstack/migrator 0.1.3 → 0.1.5
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 +11 -0
- package/dist/bundle-uAAHehbv.d.ts +23 -0
- package/dist/chunk-CIOYDRY5.js +851 -0
- package/dist/chunk-CIOYDRY5.js.map +1 -0
- package/dist/chunk-S7TRWILI.js +71 -0
- package/dist/chunk-S7TRWILI.js.map +1 -0
- package/dist/{chunk-QEXTXHFG.js → chunk-XUBCG3IA.js} +221 -41
- package/dist/{chunk-QEXTXHFG.js.map → chunk-XUBCG3IA.js.map} +1 -1
- package/dist/{chunk-HH7666MQ.js → chunk-YLFVYPB3.js} +207 -75
- package/dist/chunk-YLFVYPB3.js.map +1 -0
- package/dist/cli/index.js +42 -8
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +8 -87
- package/dist/index.js +23 -351
- package/dist/index.js.map +1 -1
- package/dist/normalizer/index.d.ts +4 -2
- package/dist/rewrite-inline-images-BckVKPbh.d.ts +21 -0
- package/dist/sinks/index.d.ts +262 -3
- package/dist/sinks/index.js +4 -2
- package/dist/transformers/index.d.ts +157 -0
- package/dist/transformers/index.js +32 -0
- package/dist/transformers/index.js.map +1 -0
- package/dist/{bundle-DfM_jKbq.d.ts → types-DWOP8Dcy.d.ts} +1 -21
- package/package.json +5 -1
- package/dist/chunk-HH7666MQ.js.map +0 -1
- package/dist/index-D88mjcF5.d.ts +0 -279
package/README.md
CHANGED
|
@@ -11,6 +11,7 @@ See [docs/architecture.md](./docs/architecture.md) for the high-level blueprint:
|
|
|
11
11
|
```
|
|
12
12
|
src/
|
|
13
13
|
parsers/ WordPress, SmugMug, Squarespace, Wix → normalizer DTOs
|
|
14
|
+
wordpress/ WXR parse, builder flattening (theme registry)
|
|
14
15
|
normalizer/ Canonical DTOs + portable idempotency types
|
|
15
16
|
sinks/ filesystem export, MigrationSink interface
|
|
16
17
|
cli/ artinstack-migrate
|
|
@@ -56,6 +57,8 @@ artinstack-migrate validate <platform> <export-file>
|
|
|
56
57
|
| `--dry-run` | Parse and analyze only; no export files |
|
|
57
58
|
| `--report <dir>` | With `--dry-run`, write `conflicts.json` and `migration-report.json` |
|
|
58
59
|
| `--offline` | Skip network HEAD requests for asset size estimates |
|
|
60
|
+
| `--rewrite-gateway <url>` | WordPress: legacy API-gateway base (use with `--rewrite-public`) |
|
|
61
|
+
| `--rewrite-public <url>` | WordPress: public origin for `/wp-content/` asset paths |
|
|
59
62
|
| `--sink filesystem` | Run through `MigrationSink` before writing (requires `--out`) |
|
|
60
63
|
| `--urls <file>` | Wix only: URL list or `sitemap.xml` for static page snapshots |
|
|
61
64
|
|
|
@@ -68,6 +71,12 @@ artinstack-migrate wordpress export.xml --out ./output
|
|
|
68
71
|
# Preview conflicts without writing content
|
|
69
72
|
artinstack-migrate wordpress export.xml --dry-run --report ./preview/
|
|
70
73
|
|
|
74
|
+
# WordPress: rewrite legacy gateway URLs before dry-run / export (e.g. API Gateway → public CDN)
|
|
75
|
+
artinstack-migrate wordpress export.xml \
|
|
76
|
+
--rewrite-gateway "https://gateway.example/prod" \
|
|
77
|
+
--rewrite-public "https://www.example.com" \
|
|
78
|
+
--dry-run --report ./preview/
|
|
79
|
+
|
|
71
80
|
# Validate export structure (JSON result on stdout, exit 0/1)
|
|
72
81
|
artinstack-migrate validate wordpress export.xml
|
|
73
82
|
|
|
@@ -119,8 +128,10 @@ pnpm dev # watch build
|
|
|
119
128
|
| Piece | `@artinstack/migrator` | Host application |
|
|
120
129
|
|-------|------------------------|------------------|
|
|
121
130
|
| Parsers + normalizer DTOs | Yes | No |
|
|
131
|
+
| WordPress builder flattening + origin URL rewrite (pre-DTO) | Yes | Optional same config on adapter input |
|
|
122
132
|
| CLI + filesystem JSON export | Yes | No |
|
|
123
133
|
| `MigrationSink` interface | Yes | Implementation |
|
|
134
|
+
| Dynamic shortcodes (`[portfolio]`, `[recent_posts]`), forms, sanitize | No | Yes |
|
|
124
135
|
| Jobs, worker, credentials, UI | No | Yes |
|
|
125
136
|
|
|
126
137
|
## License
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { N as NormalizedPost, a as NormalizedPage, b as NormalizedAsset, c as NormalizedPortfolio, d as NormalizedCategory, e as NormalizedTag, f as NormalizedEntity } from './types-DWOP8Dcy.js';
|
|
2
|
+
|
|
3
|
+
interface EntityBundle {
|
|
4
|
+
posts: NormalizedPost[];
|
|
5
|
+
pages: NormalizedPage[];
|
|
6
|
+
media: NormalizedAsset[];
|
|
7
|
+
portfolios: NormalizedPortfolio[];
|
|
8
|
+
categories: NormalizedCategory[];
|
|
9
|
+
tags: NormalizedTag[];
|
|
10
|
+
}
|
|
11
|
+
declare function emptyBundle(): EntityBundle;
|
|
12
|
+
declare function collectEntities(entities: AsyncIterable<NormalizedEntity>): Promise<EntityBundle>;
|
|
13
|
+
interface BundleCounts {
|
|
14
|
+
posts: number;
|
|
15
|
+
pages: number;
|
|
16
|
+
assets: number;
|
|
17
|
+
portfolios: number;
|
|
18
|
+
categories: number;
|
|
19
|
+
tags: number;
|
|
20
|
+
}
|
|
21
|
+
declare function bundleCounts(bundle: EntityBundle): BundleCounts;
|
|
22
|
+
|
|
23
|
+
export { type BundleCounts as B, type EntityBundle as E, bundleCounts as b, collectEntities as c, emptyBundle as e };
|